This patch should be applied to an un-modified XFree86 version 4.4.0 source tree. It is patch 1 of 4 patches that will will convert the source tree to XFree86 version 4.5.0. To apply this patch, run the following from the directory containing your 'xc' directory: patch -p0 -E < XFree86-4.4.0-4.5.0.diff1 patch -p0 -E < XFree86-4.4.0-4.5.0.diff2 patch -p0 -E < XFree86-4.4.0-4.5.0.diff3 patch -p0 -E < XFree86-4.4.0-4.5.0.diff4 sh XFree86-4.4.0-4.5.0-cleanup.sh gzip -d < XFree86-4.4.0-4.5.0-diff0.tgz | tar vxf - ------------------------------------------------------------------------------- Prereq: 4.4.0 Index: xc/programs/Xserver/hw/xfree86/CHANGELOG diff -u xc/programs/Xserver/hw/xfree86/CHANGELOG:3.3157 xc/programs/Xserver/hw/xfree86/CHANGELOG:3.3471 --- xc/programs/Xserver/hw/xfree86/CHANGELOG:3.3157 Sat Feb 28 19:09:23 2004 +++ xc/programs/Xserver/hw/xfree86/CHANGELOG Wed Mar 16 20:11:52 2005 @@ -1,3 +1,775 @@ +XFree86 4.5.0 (16 March 2005) + 363. Readability updates for the BUILD and RELNOTES docs + (Georgina O. Economou). + 362. Fix KGA handling in s3 driver (Marc La France). + 361. Fix bugs in the Kyrgyz XKB map (based on Bugzilla #1555, Ilyas Bakirov). + 361. First cut at libXpm fix for CAN-2005-0605 (David Dawes). + 360. Append '.txt' to top-level document files to avoid problems with the + install target on case-insensitive platforms (reported by + Frank Giessler). + 359. Update the OpenBSD section of the mouse doc (Bugzilla #1563, + David Yerger). + 358. Fix bug that sometimes caused I/O PCI BARs to be mistaken for 64-bit + memory BARs (Egbert Eich). + 357. Fix DMX build for systems without SIGIO and/or SIGPOLL (Frank Giessler, + Marc La France). + 356. OS/2 build fixes (Bugzilla #1542, Frank Giessler). + +XFree86 4.4.99.903 (6 March 2005) + 355. DRM build fixes for the 2.6.11 Linux kernel (David Dawes). + 354. Fix a ScreenToScreenCopy bug in the s3 driver that shows up with xtest + (NMarci, Tim Roberts). + 353. Documentation readability updates (#7466, Georgina Economou). + 352. Limit the maximum refresh rate to 85Hz and remove the bogus + 100Hz and 120Hz settings as they don't match close enough and + are really unsupported in the i830 driver (Alan Hourihane). + 351. DRM fixes for recent FreeBSD 5.x versions (David Dawes, based on + FreeBSD 5.3 kernel source). + 350. Need to build/install/but not use XThrStubs lib for compatibility + purposes on recent FreeBSD (David Dawes). + 349. Fix for ServerFlags "Log" option, and document it in the XF86Config + man page (David Dawes). + 348. Fix an off by one error when scaling which caused occasional + overlay color lines at the far right and bottom of the window for + i830 chips (Alan Hourihane). + 347. Fix for i810 DRI missing lodbias functionality and related segfault + (David Dawes). + 346. Fix for radeon DRI lockup (Dave Airlie). + 345. Roll back the DRM kernel modules to the version from XFree86 4.4.0 + plus some minor updates (David Dawes). + 344. Set default monitor parameters to match the display size for the i830 + when they are not available from another source (Nicolas Joly). + 343. Separate the addition of EDID modes out from mode validation + (David Dawes). + 342. Handle screen blanking in the vesa driver for non-VGA compatible modes + (David Dawes). + 341. Separate monitor parameter initialisation out from mode validation, + and ensure that monitor parameters are initialised before the vbe module + sets up its mode pool (David Dawes). + 340. Add Kyrgyz locale (Bugzilla #1556, Timur Jamakeev). + 339. Add a standard Kyrgyz keyboard layout (Bugzilla #1555, Timur Jamakeev). + +XFree86 4.4.99.902 (20 February 2005) + 338. Fix bad external symbols in the sis driver (David Dawes). + 337. Build fix for when XKB is disabled (Bugzilla #1551, reported by + David Yerger). + 336. Modify most driver ValidMode() functions to return more specific + status values than "MODE_BAD" when they don't like a mode (David Dawes). + 335. Apply changelog #124 (don't do various keycode conversions on NEC + PC-98 platforms) to the kbd driver (Bugzilla #1549, reported by + Dejan Lesjak). + 334. Prevent EDID modes from overriding modes explicitly supplied in the + Monitor section (David Dawes). + 333. Log when modes are excluded due to not meeting TargetRefresh or + PreferredMode options, and improve the handling of these cases + (David Dawes). + 332. Increase MSE_MAXBUTTONS from 12 to 24 (Bugzilla #1536, Julian Cable). + 331. Fix a typo in xalloc.c (Rodion Vshevtsov). + 330. Back out CHANGELOG #100 (Marc La France). + 329. Add a Polish variant to the French keyboard layout (Bugzilla #1544, + Hubert Gburzynski). + 328. Fix server crash with -configure option (and -probe option) + (Bugzilla #1546 Nicolas Joly, David Dawes). + 327. Build fix for Mac OS X 10.4 (Bugzilla #1545, Torrey T. Lyons). + 326. Modify the SHLD/SHRD emulation to handle shifts > 15 for 16-bit + operands, behaviour expected by the BIOS in an SM722 controller + (Charles Dobson). + 325. Fix a substantial memory leak in the vesa driver (David Dawes). + 324. Fix unaligned YV12 videos that caused skew when playing in the i830 + driver (Alan Hourihane). + 323. Fix pixmap cache corruption when Xv was in use due to a memory + allocator calculation problem in the i830 driver (Alan Hourihane). + 322. Improve the detection of a running moused on FreeBSD, and add the + ums0 device to the fallbacks to try (David Dawes). + 321. Support automatic configuration for SBUS video devices on sparc + (David Dawes). + 320. Fix missing asm component in the sunffb module on Solaris/sparc build + (David Dawes). + 319. Make keyboard detection errors non-fatal on Solaris (David Dawes). + +XFree86 4.4.99.901 ( 8 February 2005) + 318. Install BSD DRM source (David Dawes). + 317. Various build fixes (Frank Giessler, Bugzilla #1542). + 316. Fix SEGV in linux/int10 that can occur under certain builds of glibc + 2.3.4 (J. Scott Berg, Marc La France). + 315. Add PCI class override for certain Ensoniq sound adapters that advertise + themselves as "prehistoric" VGA (Marc La France). + 314. Xterm patch #200 (Thomas Dickey). + 313. Darwin build fixes (David Dawes). + 312. Fix another buglet in atimisc's decoding of a panel's mode on server + entry (Marc La France). + 311. Extend OpenBSD auto mouse detection to PS/2 devices, and add initial + NetBSD auto mouse detection (David Dawes). + 310. Fix duplicate free error resulting from mouse os-support (David Dawes). + 309. Add Xasprintf() to the server, providing a cleaner mechanism for + printing into (X-)allocated memory (David Dawes). + 308. Update the bindist/installer to handle platforms that don't use /etc/X11 + equally well as those that do (David Dawes). + 307. Add extra fontset records into XLC_LOCALE. It fixes the problem with the + text output by Xutf8 functions under non-Unicode locales (Ivan Pascal). + 306. Add support to the fpit driver for the passive pen of the Stylistic + 3400, and fix a number of bugs in the original driver (David M. Clay). + 305. Fix a DRI initialization problem which occurred when people continued + to use the i830 DRM kernel driver and not the newer i915 kernel driver. + (Alan Hourihane) + 304. Fix xf86cfg to handle drivers (like 'ati') with no options + (Bugzilla #1539, David Laight). + 303. Assorted XFree86 driver man page updates (Bugzilla #1538, Nicolas Joly). + 302. Updates for building on NetBSD-current (#7386, Matthais Scheler, + Izumi Tsutsui, submitted by Bernd Ernesti). + 301. Modify getconfig's version handling to work with versions of perl + that do not have v-strings (David Dawes). + 300. Clean up Xprt, Xnest, Xvfb and Xdmx links (Marc La France). + 299. Rework DRM kernel source handling (David Dawes). + 298. Extend Solaris mouse detection to recognise protocol "Auto", and to + fall back to the kdmouse device when VUID doesn't work (David Dawes). + 297. Choose a better default videoram amount for i810 video when DRI is not + disabled (David Dawes). + 296. Set the vmware driver fallback monitor parameters to allow modes + one size smaller than the maximum reported screen size. This allows + it to work much better when using automatic configuration (David Dawes). + 295. Bindist installer script improvements: + - Log the installation. + - Make backup copies of config files before overwriting them. + - Add notes about config files that need to be installed and those + that may cause problems if installed. + (David Dawes). + 294. Back out CHANGELOG #273 (Marc La France). + 293. Fix a bug introduced into the i810 driver in 4.4.99.7 that resulted in + a SEGV (David Dawes). + 292. Installer improvements and bindist updates (David Dawes). + 291. Add basic automatic mouse device node detection for Solaris + (David Dawes). + 290. Improve autoconfig's handling of a failed driver PreInit() (David Dawes). + 289. Ignore sections called ".stab.indexstr" in elfloader, which fixes a + problem loading modules built with SunPRO C (as described by + Alan Coopersmith). + 288. Improvements to the Linux mouse auto-detection fallbacks, and + a development option to disable PnP probing (David Dawes). + 287. NLS build fix for IRIX; Change default to build and install + backward-compatible NLS configurations (Marc La France). + 286. Document the maximum number of buttons currently supported by the + mouse driver (Bugzilla #1537, reported by Julian Cable). + +XFree86 4.4.99.22 (27 January 2005) + 285. Print the XFree86 command line in the log file (David Dawes). + 284. Release notes details for xterm (Thomas Dickey). + 283. First phase of dynamic configuration (David Dawes, S. Lussos, + Michael Dawes, J. D. Darling, X-Oz Technologies). + 282. Fix sysarch() prototype for FreeBSD/alpha (Bugzilla #1325, Greg Lewis). + 281. Generalise SIGIO handling for silkenMouse (Marc La France). + 280. Fix missing Makefile dependencies for (f)lex source (Marc La France). + 279. Re-instate DMX builds; Fix glxProxy builds; By default, disable + glxProxy in XFree86 builds pending further work (Marc La France). + 278. Add an input driver for ELO Graphics 2500U USB touchscreens + (Fred Gleason). + 277. Make sure that all module ABI revs are bumped for Xllalloc and friends + (David Dawes). + 276. Ensure DGA screen dimensions fit in 16 bits (Marc La France). + 275. Fix handling of PCI 64-bit BARs (Derived from Michael Yaroslavtsev; + Bugzilla #1531). + 274. Fix strtkysym test failure (Alan Coopersmith). + 273. Fix for en_IE.ISO8859-15 locale (Barry Scott). + 272. Allow black as an XV colourkey in the Savage driver (Angelus Dei). + 271. Fix S3 Virge driver bug when mode restorations result in a switch between + colour and mono operation (Joachim Kuebart). + 270. Fixes for the Croatian XKB map (#7002, Vlatko Kosturjak). + 269. Fix off-by-one problem for keys on FreeBSD/sparc64 (Bugzilla #1503, + Marius Strobl). + 268. Improve the handling of timeouts in R128CCEWaitForIdle() (Bugzilla #271, + Michel Dänzer). + 267. Add 9 missing South African locales (Bugzilla #1526, Dwayne Bailey). + 266. Fix the xf86fbman's largest linear area offscreen computation + (Bugzilla #1527, Egbert Eich, submitted by Michael Lampe). + 265. Xterm patch #198 (Thomas Dickey). + +XFree86 4.4.99.21 (12 January 2005) + 264. In font handling, avoid potential security issues related to wrap-around + of memory allocation requests (Marc La France). + 263. Add Intel i915GM support, also.... + - PanelID identification + - DRI suspend/resume support + - Detection of monitor changes on VT switches + - Support custom video modes if available in the Video BIOS + - 3D enhancements + (Tungsten Graphics, Alan Hourihane & Keith Whitwell) + 262. Import Mesa 6.2.1 and the latest DRM code. (DRI Project) + 261. Fix bug in the recognition of PCI ROM images (Marc La France). + 260. Add MAX_DOMAINS and MAX_PCI_BUSES limit checks in the OpenPROM scan on + UltraSPARC's running SunOS/Solaris (Marc La France). + 259. Change PCI scan to not probe bus segments that lie behind PCI-to-PCI + bridges that are found to be in an inoperative power-saving mode. This + fixes system crashes that have been reported on Sun Blades + (Marc La France). + 258. Add tentative support for newer iterations of HP's zx1 chipsets + (Marc La France). + 257. Automatic configuration updates, including: + - Modify the parser/config support to allow multiple configuration + sources to be combined. + - Modify the parser/config support to allow multiple ServerFlags, + Files, and Module sections. + - Allow the automatically-generated configuration to be appended to + a partial static configuration. + - Use a more complete set of the probed EDID information in determining + the monitor parameters. + - Add a "preferred" mode type, which can be obtained from the probed + EDID information or from the configuration. + - Some parser interface cleanups. + (David Dawes, X-Oz Technologies). + 256. Extend the parser/config support to allow multiple Monitor sections + to be referenced from a Screen section (David Dawes). + 255. Fix the omission of the Mesa shader component from the GLcore module + (David Dawes). + 254. Fixups for protocol autodetection for Sun mice (Marc La France). + 253. Fix omission in BUILD instructions (Reported by Boris Dusek). + 252. Bump DGA client library minor version (Marc La France). + 251. Fix minor bug in Linux/Alpha's xf86GetPciSizeFromOS() (Marc La France). + 250. Cause the Linux port to warn when MAX_PCI_BUSES and/or MAX_PCI_DEVICES + need to be increased (Marc La France). + 249. Deal with Linux 2.6's PCI bus naming (Marc La France). + 248. Resync with Martin Mares's 2004.11.29 pci.ids snapshot and add to it an + entry for Sun's Schizo+ (Marc La France). + 247. Re-instate DGA support in atimisc driver on UltraSPARC's (Marc La France). + 246. Add support for the more recent UltraSPARC implementations to the Linux + port (Marc La France). + 245. Fix DGA for multi-domain architectures (except perhaps for Linux/Alpha, + see comment inserted into axpPci.c). PCI only for now + (Marc La France) + 244. Fix a typo in the xsetpointer(1) man page (Bugzilla #1524, NMarci). + 243. Fix build warning for lib/X11/Wraphelp.c (Bugzilla #1522, Nicolas Joly). + +XFree86 4.4.99.20 (27 December 2004) + 242. Change mmapr to optionally pretty-print its stdout; Fix usage message + in mmapr and mmapw (Marc La France). + 241. Define the log message verbosity level in one place for cases where it + isn't specified explicitly (David Dawes). + 240. Fix an error in bdftopcf's usage message (Bugzilla #1520, + Matthew Fischer). + 239. Add support for the newer UltraSPARC variants into the SunOS/Solaris port + (Marc La France). + 238. Ensure __i386__ or __sparc__ is defined when using Sun's compiler on + Solaris. Also fix Non-XFree86 builds on Solaris (Marc La France). + 237. Fix MISC extension's PassMessage(). Bump minor version to 9 to + indicate that PassMessage() is actually usable. (Thomas Winischhofer) + 236. An untested attempt at adding IBM RGB525 support to the s3 driver (user + requested) (Marc La France). + +XFree86 4.4.99.19 (12 December 2004) + 235. Add an experimental "EDID Data" option to allow EDID data to be + provided through the config file, and change the type of the + DDC/EDID root window property data from signed to unsigned (David Dawes). + 234. Change the server's infrastructure to generate a tree of SBUS display + adapters, rather than a simple list (Marc La France). + 233. Fix a typo in xeyes/Eyes.c (Bugzilla #1519, Phillip Vandry). + 232. Rationalise driver interface for DGA's OpenFramebuffer(); fix + siliconmotion driver's entry for it; bump driver ABI version (not + strictly necessary as this is only a source API change) + (Marc La France). + 231. Cleanup loader.c's handling of MAP_32BIT to match that in elfloader.c + (Bugzilla #1515, Nicolas Joly). + 230. Fix the code sequence order for the repaya in the Sinhala XKB map + (Bugzilla #1509, Harshula). + 229. Xterm patch #197 (Thomas Dickey). + 228. Build dummylib before drivers/chips/util, since the latter depends upon + the former (Thomas Dickey). + 227. Add mga/util to the build (Marc La France). + 226. Port chips/util to Alpha, ia64 and AMD64 architectures (Marc La France). + +XFree86 4.4.99.18 (27 November 2004) + 225. Fix DAC probing in s3 driver (Marc La France). + 224. An attempt at fixing various video mode timing issues in the apm, ark, + chips, cirrus, cyrix, i740, i810, neomagic, s3, s3virge, savage, sis, + tdfx, trident and tseng drivers (Marc La France). + 223. The s3 driver does not, in fact, support a depth of 32 (Marc La France). + 222. Remove cfb support from s3 driver (Marc La France). + 221. Include chips/util directory in builds and fix its dRegs utility + (Marc La France). + 220. Avoid reference to unloaded data, which can cause a server crash in + some situations (David Dawes). + 219. Cleanup handling of strlcat for the server (David Dawes). + 218. Xpm fixes for CAN-2004-0914 (Petr Mladek, Thomas Biege). + 217. Add content to the previously empty cirrus driver manual page + (Bugzilla #1511, Scot Wilcoxon). + 216. Add Sinhala (Sri Lanka) xkb map (Bugzilla #1509, Harshula). + +XFree86 4.4.99.17 (12 November 2004) + 215. Cleanup handling of mmap and SHM existence (David Dawes). + 214. Disable direct I/O writes to kbd controller on Linux by default + (David Dawes). + 213. Apply same fix for opcode 0xe8. + 212. Fix x86emu's handling of opcode 0xe9 (Bugzilla #1443, Alexei Kosut). + 211. Add experimental '-novt' and '-nohw' options to the XFree86 server + (David Dawes). + 210. Restore default mode "zoom" behaviour by not marking multiple + default modes of the same name as "userdef", and fix zoom when using + an randr-selected root window size (David Dawes). + 209. Add an example for setting the repeat rate to the xset(1) man page + (Bugzilla #1506, David Dawes, suggested by Alan Iwi). + 208. Remove vestigial rootlessAqua.h from XDarwin DDX (Torrey T. Lyons). + 207. Modify luit to extract information from pty before fork rather than + after, to avoid conflict with child process's modifications to the + line (Bugzilla #1093, Alexander E. Patrakov). + +XFree86 4.4.99.16 (27 October 2004) + 206. Add a missing keycode to xkbcomp/keycodes/xfree86, and update mapping + for Microsoft Natural Multimedia keyboard (David Dawes). + 205. Fix off-by-one error in VGA sync pulse positions for siliconmotion, vga, + via and vmware drivers; other drivers to follow; also see CHANGELOG 133 + (Marc La France). + 204. Update locale info for Kinyarwanda, the language of Rwanda + (Bugzilla #1494, Steve Murphy). + 203. Fix for fstobdf generating corrupted BDF files (Bugzilla #93, + Laurent Deniel). + 202. The Faroese keyboard layout wasn't getting installed (Bugzilla #1497, + Dejan Lesjak). + 201. Remove reference to non-existent file in the xf86config utility + (Bugzilla #1498, Dejan Lesjak). + 200. Fix various statement not reached warnings, including some real bugs + (David Dawes). + 199. Fix for server crash in the screen saver extension (David Dawes, + reported by Josip Deanovic). + 198. Fix detection of phantom PCI devices again (Marc La France). + 197. Fix an integer overflow in libICE/libSM (Radu Octavian, David Dawes). + 196. Fix NULL dereference in libSM when given a bad previous session ID + (Radu Octavian). + 195. Asm build fix (David Dawes). + +XFree86 4.4.99.15 (12 October 2004) + 194. Fix cut and paste error in the radeon driver (Bugzilla #1489, + Nicolas Joly). + 193. Add some missing Imakefile changes for new encodings (David Dawes). + 192. Back out altwin change in Bugzilla #1341 at the request of the + original submitter (Bugzilla #1473, Denis Barbier). + 191. Build fix for FreeBSD/amd64 (Bugzilla #1480, Jung-uk Kim). + +XFree86 4.4.99.14 (27 September 2004) + 190. Corrections to MIT-SHM's Xineramafication + (Mark Vojkovich, Marc La France). + 189. Fix incorrect application of Satoshi Kimura's fix (124) to avoid + various keycode conversions on NEC PC-98 platforms. + 188. Fix bug that caused restacks to be optimized away in rootless mode + (Torrey T. Lyons). + 187. Remove stale references to XAudio (Marc La France). + 186. Fix stack and integer overflows in libXpm (Chris Evans, Alan + Coopersmith, Matthieu Herrb). + 185. Updates for the Bengali XKB map (Taneem Ahmed). + 184. Reinstate the original mkfontdir program, since mkfontscale does not + handle creating encodings.dir files as well as it should (David Dawes). + 183. Export AllocateFontPrivateIndex (David Dawes, suggested by Rick De Laet). + 182. Fix segv in cfb (David Dawes, reported by Dave Williss, Bugzilla #1453). + +XFree86 4.4.99.13 (12 September 2004) + 181. Add support for i2c and Maven for the mga driver, providing DDC and + DPMS support for the second head (Bugzilla #1098, Ryan Underwood). + 180. Fix a synchronization problem with luit's handling of tty settings + (Bugzilla #641, Kuang-che Wu). + 179. Add XKB map for ur_PK (Urdu) (Bugzilla #1468, Zaeem Arshad). + 178. Fix atimisc driver for unusually small page sizes (Marc La France). + 177. Fix ELF loader for >=2.6.8-pre3 Linux kernels (Marc La France). + 176. Add support for the si_LK.UTF-8 locale (Bugzilla #1465, + Chamath Keppitiyagama on behalf of the Lanka Linux User Group). + 175. Fix the host memory to bus macro in xf86pciBus.c, and add translations + for the B2I and I2B macros (Bugzilla #1220, Bill Randle). + 174. Add PCI address mapping support to linuxPci.c (Bugzilla #1229, + Bill Randle). + 173. Add encoding file for suneu_greek (Bugzilla #1215, Roland Mainz). + 172. Add encoding files for cns11643-1, cns11643-2, cns11643-3 + (Bugzilla #1214, Roland Mainz). + 171. Add support to the savage driver for turning off the back light + when DPMS "off" mode is activated (Bugzilla #758, Herbert Graeber). + 170. Add support for interlaced video modes to the S3 driver (Bugzilla #1254, + Leo Savernik). + 169. Update the gb3212.1980-0 encoding to hande fonts that do not have + a unicode table (Bugzilla #1230, Roland Mainz). + 168. Fix glint driver build warning (Bugzilla #1462, Nicolas Joly). + 167. Fix some errors in the Dzongka/Tibetan XKB map (Bugzilla #1450, + Christopher Fynn). + 166. Update the vmware driver to save register state before changing it + (#6701, Nolan Leake). + +XFree86 4.4.99.12 (27 August 2004) + 165. Xterm patch #196 (Thomas Dickey). + +XFree86 4.4.99.11 (12 August 2004) + 164. Xterm patch #195 (Thomas Dickey). + 163. Xterm patch #194 (Thomas Dickey). + +XFree86 4.4.99.10 (27 July 2004) + 162. Install new pc/hu symbols file (#6576, Szilveszter Adam). + 161. Add an option for fixing flickering and blank screen problems for + iBooks (#6527, Emmanuel Dreyfus). + 160. Updates for the vmware driver: + - Save and restore the ID register. + - Send the cursor hot spot for both alpha and core cursors, fixing + host-cursor mode. + - Allow any reasonable bpp if 8BIT_EMULATION is set, supporting + non-host depths. + (#6522, Nolan Leake). + 159. Protect inlines everywhere io.h is used in TinyX (reported by + Andrew Aitchison). + 158. Disable R&R when using rotation with the savage driver (Tim Roberts). + 157. Update the 8859-7 unicode conversion data file to the current version + (Reported in Bugzilla #1406, Matthew Fischer). + 156. Fix typos in some spec docs (Bugzilla #1413, Mikko Markus Torni). + 155. Fix mga driver SEGV (Bugzilla #1401, Ryan Underwood). + 154. Fix HasSecureRPC build on FreeBSD 4.10 (Bugzilla #1422, Dejan Lesjak). + 153. Add __sparc64__ to imakemdep.h (Bugzilla #1424, John Heasley). + 152. Fix argument type for FIONREAD (Bugzilla #1426, John Heasley). + 151. Fix typo in Hu text in xfree86.xml (Bugzilla #1441, busmanus). + 150. + 149. Fix a problem with wsmouse driver loosing events on 64bit + architectures (Bugzilla #1438, John Heasley). + 148. Xterm patch #193 (Thomas Dickey). + 147. Modify CppRawFileTarget() to transform trailing backslashes in the input + manpages so the backslash is followed by a blank, defeating the C + preprocessor's tendency to remove the following newline (Thomas Dickey, + Debian #259996). + 146. Fix XDarwin's dynamic screen configuration change support so that it + works with Cocoa and Xplugin implementations (Torrey T. Lyons). + 145. Xterm patch #192 (Thomas Dickey). + +XFree86 4.4.99.9 (12 July 2004) + 144. Disable building DMX on OSs that have not been verified to build + correctly (Kevin Martin). + 143. Fix DMX build when Xinerama is not enabled (Kevin Martin). + 142. Add support for dynamic screen configuration changes in rootless XDarwin + (John Harper and Torrey T. Lyons). + 141. Add Distributed Multihead X (DMX) support (Kevin Martin and + Rik Faith). + +XFree86 4.4.99.8 (27 June 2004) + 140. DGA client library cleanups and fixups (Marc La France). + 139. Fixes and updates for XKB keymaps: + - Replace Latvian keymap with new one (Bugzilla #1415, Dmitry Golubev). + - Add geometry description for two variants of ABNT2 keyboard + (Bugzilla #1387, busmanus). + 138. SiS driver update 2004-06-20 + - Fix some modes for 1400x1050 and 1600x1200 panels + - Fixes for 661/741/760 (BIOS data layout related) + - Fix Xv (minimum overlay size; linebuffer size) + - Fix LCD support for ECS A90x + - Fix LCD support for ECS A907 (broken BIOS) + - Add video blitter as second Xv adaptor (M650/651 and later) + - Add hotplug support (including LCD) + - Add preliminary support for SiS340 + These changes are covered by the SiS driver license. See sis_driver.c. + 137. Fixes and updates for XKB keymaps: + - Update Serbian keymap with new variant (Bugzilla #1176, Zvezdan Petkovic). + - Add Genius KB-12e model to inet keymap (Ricardo Cruz). + - Update ABNT2 geometry file and change Brasilian keymap to avoid ABNT2 + spcific keycodes section (Bugzilla #1387, busmanus). + - Add 'Classical Latin' keymap (Bugzilla #1393, busmanus). + 136. Make XDarwin not default to StaticColor on ix86 (Shantonu Sen). + +XFree86 4.4.99.7 (12 June 2004) + 135. Import latest DRM kernel modules from DRI tree (DRI Project) + 134. Set subpixel order to horizontal RGB in atimisc panel support + (Adam J. Richter, Marc La France). + 133. Fix off-by-one error in the interpration and programming of VGA sync + pulses. This has only been done for atimisc, and should also be for + vgahw and callers, but the complexity of doing so right now far exceeds + my ability to test such a change (Marc La France). + 132. Some RENDER cleanup in drivers (Marc La France). + 131. Intel driver updates to support:- + - i915 latest generation hardware + - Dual Head & Clone support for i915, i855 and i830 chipsets. + - ARGB cursor support for all Intel chipsets (requires agpgart updates) + - Mobile lid status checking + - Fix XVideo when high resolutions are used on LFP's + - New i915 3D Driver + (Alan Hourihane, Keith Whitwell, Tungsten Graphics, Inc). + 130. Remove USE_MAKEDEPEND (no longer needed) (Marc La France). + 129. Fix makedepend for freetype2's #include structure (Marc La France). + 128. Add Wraphelp.c and enable XdmAuth by default. + 127. Define HAS_SHM when creating linker definition files for OS/2, and + disable IPv6 on OS/2 (Bugzilla #1398, Frank Giessler). + 126. Add option for XDarwin to always use Mac command key equivalents + (John Harper and Torrey T. Lyons). + 125. Add support for the NEC PC-9821 with CLGD755x to the Cirrus driver, + and update the relevant Japanese docs (Satoshi Kimura). + 124. Don't do various keycode conversions on NEC PC-98 platforms + (Satoshi Kimura). + 123. Add IconMaxWidth and TitleIndent configuration parameters for twm + (Bugzilla #1124, Alexander Pohoyda). + 122. Add support for XPM icons to twm (Bugzilla #968, Alexander Pohoyda). + 121. Xvfb is not ensuring that the root window depth and visuals are + set correctly (David Dawes, reported by Peng Hongbo). + 120. Fix a problem where a bigrequest length of zero does not generate + a BadLength error (based on report and patch from Peng Hongbo). + 119. Update xdm docs/config to handle authDir in a non-default location + (#6269, Luke Mewburn). + 118. Remove stale code for Mac OS X 10.0 support (Torrey T. Lyons). + 117. Add initial Xinput support for XDarwin (Greg Parker). + 116. Xterm patch #191 (Thomas Dickey). + 115. Integrate the TinyX servers into the standard XFree86 build: + - Numerous build and warning fixes. + - Eliminate unnecessary requirement differences at the DIX level + for the XFree86 and TinyX servers. + - Eliminate unnecessary wrapper-related hacks for non-XFree86 servers. + - Fix libglx module build. + - Support for building "tiny" sets of some device-independent modules, + allowing control over which pervasive extensions are included in + the TinyX servers. + - Support for omitting extensions and font backends from TinyX. + - Add per-server usage message support. + - Numerous build/config cleanups. + (X-Oz Technologies). + 114. Add serial PNP entry for the Genius NetScroll+ mouse (Bugzilla #1017, + N Marci). + 113. Automatic configuration updates: + - Auto-detect DPMS support based on EDID data. + - Fix DPMS enable/disable logic. + - Allow multiple probe phases, allowing the driver search to continue + after failures at the PreInit stage. + - Update static driver list handling to allow automatic configuration + to work with static servers. + - Add a '-autoconfig' command line option to force automatic + configuration mode. + (X-Oz Technologies). + +XFree86 4.4.99.6 (27 May 2004) + 112. Bump the limit on the number of PCI devices the X server will scan for to + 128 (Marc La France, requested by Dale L Busacker). + 111. Fixes for a few valgrind warnings in lib/Xt (Thomas Dickey). + 110. Xterm patch #190 (Thomas Dickey). + 109. Xterm patch #189 (Thomas Dickey). + 108. Xterm patch #188 (Thomas Dickey). + 107. Let XDarwin interpret scroll wheel mouse events correctly when shift is + held down (Benjamin Burke). + +XFree86 4.4.99.5 (12 May 2004) + 106. Fixes and updates for XKB keymaps: + - Replace comma keysym on KPDL key in Brasilian keymap with KP_Separator + (Rafael Ávila de Espíndola). + - Add multi-layout compatible Hungarian keymaps (Soós Péter). + - Remove unneeded Alt key changes in altwin:meta_win and left_meta_win + (Bugzilla #1341, Denis Barbier) + - Add multi-layout compatible Azerbaidjani, Canadian, Mongolian and + Vietnamese keymaps (Ivan Pascal). + 105. Fix ct_encoding sequence in zh_CN.gbk locale (Bugzilla #1362, Su Yong). + 104. Replace unicode keysyms in en_US.UTF-8 Compose file with 'traditional' + ones where such keysym exist (reported Bugzilla #1278) (Ivan Pascal). + 103. Add to xev WM_DELETE_WINDOW processing (Bugzilla #1154, Noah Levitt). + 102. Remove some more stale amoeba bits (Matthieu Herrb). + 101. Fix some typos in OS/2-specific code (Bugzilla #1358, Frank Giessler). + 100. Avoid wrapping a screen with RAC if it doesn't need it (Marc La France). + 99. Decouple a screen's need for RAC from the server's running state + (Marc La France). + 98. Fix indirect rendering problem after Mesa 6.0.1 merge (Bugzilla #439, + Frank Giessler). + 97. Convert lib/Xt to ANSI C (Thomas Dickey). + 96. Rework (and reformat) common layer's SBUS code so that SBUS adapters + are properly detected on SunOS (Marc La France). + 95. Fix segfault in sunffb driver under option "NoAccel" (Marc La France). + 94. Update README.Solaris to mention xload's limitations on sun4u SunOS + (Marc La France). + 93. Retire X-TT 1.x and FreeType 1.x (David Dawes). + 92. Fix Mac OS X build after FreeType 2.1.8 merge (Torrey T. Lyons). + 91. Fix TinyX touchscreen problem on server reset (Roman Vasylyev). + 90. Fix flickering during XVideo's on i830's (Marc La France). + +XFree86 4.4.99.4 (27 April 2004) + 89. Apply Miroslav Halas' multi-head input driver fix to the fpit, jamstudio, + magictouch and mutouch drivers. This needs testing, and other drivers + likely need a similar fix (David Dawes). + 88. Fix a problem with the cursor not correctly following the touch + in a dual-head elographics configuration (Bugzilla #1347, + Miroslav Halas). + 87. Change imake to produce a warning when it needs to clean Imakefile input; + See changed source for rationale (Marc La France). + 86. FreeType 2.1.8 import/merge (FreeType Project, imported and merged + by Chisato Yamauchi and David Dawes). + 85. Fix for Xv resolution loss problem with Matrox cards (Michael Lampe). + 84. Don't call VBESetGetDACPaletteFormat() in the vesa driver for + modes with depth > 8. This fixes a problem with a Toshiba R100 + laptop (Jonas Lund). + 83. Fix missing library symlinks during install on Darwin (Greg Parker). + 82. Cap potential infinite loop in nsc driver (Marc La France). + 81. Stopgap for console switch hangs with some Radeon models (Marc La France). + 80. Fix build on Mac OS X following Mesa 6 merge (Torrey T. Lyons). + 79. Fix GLX multithreaded bug (DRI Project). + 78. Xterm patch #186 (Thomas Dickey). + 77. Add an "AllowNoCntl" option to the elographics driver, which allows the + driver to be used with some other protocols (like the SmartSet 2500s) + which share the same default protocol (Bugzilla #1332, + Tristan Van Berkom). + 76. Fix a problem where the elographics driver gets out of sync under heavy + loads (Bugzilla #1332, Tristan Van Berkom). + 75. Update freetype2 and the freetype XFree86 server module to eliminate + the need to use private interfaces for embedded bitmap metrics + (Chisato Yamauchi). + 74. Fix TinyX build with REGION_* fixes (#Bugzilla #1338, + Bernhard RosenKraenzer) + 73. Build fixes and updates for OS/2 (Bugzilla #1340, Frank Giessler) + 72. Fix freetype module segfault with some Type1 fonts (Bugzilla #1330, + Werner Lemberg, from freetype 2.1.5, reported by Michael Lampe). + +XFree86 4.4.99.3 (12 April 2004) + 71. Fix a segfault in Xlib if IPv6 XDM-AUTHORIZATION-1 data is present + in .Xauthority (NetBSD PR xsrc/25098, Michel van Elst). + 70. Merge Mesa 6.0.1 which now contain the DRI drivers (DRI Project, + merge done by Alan Hourihane). + 69. Fix disabling of individual DPMS states (Bugzilla #1252, David Dawes, + reported by Sagi Zeevi). + 68. Fix sessreg.c for NetBSD (#6251, Mark Davies). + 67. Fix segfaults that occur in the MGA driver under options + XaaNoSolidFillRect and/or XaaNoMono8x8PatternFillRect + (Marc La France, with Frank Giessler's debugging assistance). + 66. Fix segfault when XAA's overlay acceleration is invoked with option + XaaNoSolidFillRect (Marc La France, with Frank Giessler's debugging + assistance). + 65. Fix typo in lnxLib.rules (Bugzilla #1328, Bernhard Rosenkraenzer). + 64. Initial support for building 64-bit libraries on Solaris/SPARC + (Mark Kandianis). + 63. Various ANSifications (#5965, #5966, #5967, #5984, Alexander Stohr). + 62. Modify xf86CommonSpecialKey() to match xf86PostKbdEvent() in + differentiating between Alt+Ctrl+SPECIAL and Alt+Ctrl+Shift+SPECIAL + (Bugzilla #1298, Kean Johnston). + 61. Updates for the SCO port: + - Update the transport layer code to allow the LOCAL SCO connection + type to be used for more than just X protocol connections. + - Handle the XFree86 server's reassignment of stdin and stdout at + startup more cleanly. + - Cleanup the mix of SCO-related preprocessor symbols, unifying them + to "__SCO__". + (Bugzilla #1301, Kean Johnston). + 60. Modify xdm's DefineLocal() to use Xlib's _XGetHostname() (Bugzilla #1302, + Kean Johnston). + 59. Cleanup the via driver's primary DDC/EDID retrieval: + - Remove NoDDCValue entirely (also adapts the manpage now). + - Comment out ddc1 and ddc1Read, as this is broken. + - Replace ddc2Read with xf86DoEDID_DDC2. + - Replace manually setting ranges for xf86SetDDCproperties. + (Bugzilla #812, Luc Verhaegen). + 58. Fix OS/2 build problems that showed up after removing the include:: + target dependencies (Bugzilla #1318, Frank Giessler). + 57. Fix some path-related issues on OS/2 with xman and xf86cfg + (Bugzilla #1319, Frank Giessler). + 56. Via driver updates: + - Workaround for not properly detected memory allocation failure + of the drm module. + - In case of drm memory allocation failure, added a fallback to + linear allocation in the pixmap cache when XFREE86_44 is set. + - Increased the pixmap cache size to the hardware blitting limit + if XFREE86_44 is set. + - Restructuring and cleanups in via_accel.c (Removed unecessary + comments and moved ViaInitLinear to via_memory.c) + - Fixed some warnings about unresolved drm symbols. + (Bugzilla #1320, Thomas Hellström). + 55. Fixes and updates for XKB keyboard maps: + - Add nodeadkeys variant to gb keymap (Philip Clayton). + - Rename microsoftprose keyboard model to microsoftprousb because it + is not Swedish specific but common USB variant (Bugzilla #1155, + Alex Holland) + - Fix wrong brokenbar keysym in de_CH keymap (Bugzilla #1255, + Adrian Fiechter) + - Add German Dvorak keymap (Bugzilla #1280, Andreas Rüden) + - Add Sorbian keymap (Bugzilla #1304, Edi Werner) + - Update Hindi/Devanagari keymap (Bugzilla #1317, David Holl) + 54. Fix xfs log file opening with -user nobody option (Matthieu Herrb). + 53. Add missing `make all` rule in sdk/Imakefile (Bugzilla #1323). + 52. Fix XDarwin's launch of X clients by double clicking in the Finder when + there is a space in the path (Torrey T. Lyons). + 51. Change crosscompile default for PreIncDir & StdIncDir (#5725, + Alexander Gottwald, Harold L Hunt II). + 50. Differentiate left and right modifier keys on Mac OS X 10.3 + (Kaleb Keithley). + 49. Warning fixes (#6190, Peter Breitenlohner). + +XFree86 4.4.99.2 (30 March 2004) + 48. IPv6 changes to xdm (#6202, Peter Breitenlohner). + 47. Free XrmDB in XCloseDisplay() only when implicitely allocated by + XGetDefaults(). If Client allocates it itself it should free it also. + Trying to free it for the client may result in segfault if the client + has already freed it (Egbert Eich). + 46. Protect removeOverlapsWithBrides() from NULL pointer in target + (Egbert Eich). + 45. Fixed stretching option and centering in C&T driver (Egbert Eich). + 44. Added support for memory size tweaking in BIOS for i845 (Egbert Eich, + thanks to Christian Ziez). + 43. Removed video playback dependency on Accel in NSC drivers (Egbert Eich). + 42. Fix HW cursor state on Savage driver when entering VT as some BIOSes + seem to enable it unconditionally (Egbert Eich). + 41. Fixed Emulate3Button message to distinguish between 'hard' (ie. + configured) and 'soft' (ie. automatic emulation that is disabled as + soon as the middle button is pressed) (Egbert Eich). + 40. Address Xv segfaults with Option "XaaNoSolidFillRect" by reducing output + driver dependence on xaalocal.h (Marc La France). + 39. Fix a crash that can happen with apps using the zh_CN.UTF-8 locale + (Bugzilla #991, Yu Shao). + 38. Remove dependencies from install targets so that from-tree installations + can be done without attempting to rebuild anything (David Dawes, based on + a patch and report from Lee Olsen). + 37. Use the standard shared library build mechanism for the i18n modules + rather than redefining its own (David Dawes). + 36. Add missing PCI definition for Creative Labs. This completes the + implementation of change 555 previously made in 4.2.99.3 + (Marc La France). + 35. Add OpenBSD/amd64 support (Matthieu Herrb, Todd Fries). + 34. Fix Rage 128 XV support for interlaced and doublescanned modes + (Marc La France). + 33. Fix bad xfree()'s in renditionProbe() (Reported by Lee Olsen). + 32. Fix multiple glyphs in RenderAddGlyphs which caused malloc corruption. + (Bugzilla #1276, Stephen McCamant) + 31. Work around bug in Mac OS X 10.1's AppKit that causes rootless XDarwin + to lock up when creating windows (Torrey T. Lyons). + 30. Disable building the old X-TT backend by default, and add a wrapper + "xtt" module for compatibility purposes that loads the "freetype" module + (David Dawes). + 29. Add formatCommand resource to xman, extend functionality of some key + bindings (Thomas Dickey). + 28. Xterm fix for Bugzilla #1158 (Andreas Schwab). + 27. Change the Mystique lockup workaround to apply some Mystique cards only + (David Dawes). + 26. Changes to make IPv6 enabled xdm work when OS support of IPv6 is disabled + (Peter Breitenlohner). + 25. Small tweak to fixed-clock line matching in the atimisc driver + (Marc La France). + 24. Add ExtraLoadFlags (a.k.a. $(EXTRA_LOAD_FLAGS) to shared library links + (Requested by Paul Jarc). + 23. The pre-generated -L1 bitmap fonts are no longer needed (David Dawes). + 22. Fix warnings in xedit (Terry R. Frienrichsen, Bugzilla 1267). + 21. Make makedepend's recognition of its -a, -m and -w flags stricter + (Marc La France). + 20. nv driver updates: PCI-Xpress, DPMS support for DVI (Mark Vojkovich). + 19. Fix SOSYMLINK support on various OS'es (Marc La France). + +XFree86 4.4.99.1 (12 March 2004) + 18. IRIX allows for a relatively low number of command arguments, so break up + font clean rules accordingly (Marc La France). + 17. Change radeon driver to save/restore colour lookup tables + (Marc La France). + 16. Fix ix86 pre-Solaris8 mmap() problems by deleting obsolete code + (Marc La France). + 15. Fix build glitch on SunOS SPARC (Marc La France). + 14. Clean up constype utility used on SPARC's (Marc La France). + 13. Experimental changes to recognise parameterised macros in makedepend + (From #6003, Alexander Stohr). + 12. Change scanpci utility to optionally display PCI bus linkages + (Marc La France). + 11. Fixes for building on Solaris/sparc with Sun's compiler (Mark Kandianis). + 10. Add support for specifying the screen origins for Xvfb, which is + useful when Xinerama is enabled (David Dawes). + 9. Fix X-Resource extension server crash when the client and server hosts + have different endianness (Bugzilla #1242, Alan Coopersmith). + 8. Fix an off-by-one error that can lead to malloc problems (Bugzilla #512, + Kyle Bateman). + 7. Xterm patch #185 (Thomas Dickey). + 6. Do the Linux KDKBDREP ioctl on the correct fd. This prevents the + fallback that tries to directly program the keyboard repeat rate, + and the related warning messages that recent Linux kernels generate + (David Dawes). + 5. Turn off the DAC for Radeon DPMS modes. Without this some monitors + can be badly affected. (Bugzilla #1221, Hui Yu@ATI, reported by + Paul Shupak). + 4. VeraIt.ttf wasn't getting installed (Bugzilla #1226, Matthieu Herrb). + 3. Fix an attempted free of an invalid pointer in ScreenSaverSetAttributes() + (Bugzilla #1224, Matthieu Herrb, David Dawes). + 2. Fix a build problem when build server side GL libraries on a system + with no installed X headers (Alan Hourihane). + 1. Fix HTML man page index generation to handle recent rman changes + (David Dawes). + XFree86 4.4.0 (29 February 2004) 821. Fix Radeon secondary head register initialization (Hui Yu@ATI, Benjamin Herrenschmidt). @@ -18683,7 +19455,7 @@ XFree86 3.0 (26 April 1994) -$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.3157 2004/02/29 00:09:23 dawes Exp $ +$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.3471 2005/03/17 01:11:52 dawes Exp $ Index: xc/BUILD.txt diff -u /dev/null xc/BUILD.txt:1.2 --- /dev/null Wed Mar 16 20:58:22 2005 +++ xc/BUILD.txt Wed Mar 16 20:11:51 2005 @@ -0,0 +1,288 @@ + Building XFree86® from a Source Distribution + + David Dawes, Matthieu Herrb + + 16 March 2005 + + Abstract + + This document describes how to build XFree86 from the source dis- + tribution and is designed to be used in conjunction with the oper- + ating system (OS) specific README files. + + NOTE: Refer to the appropriate OS-specific README file before + attempting to build XFree86. These files often contain additional + information that you need to successfully build for your OS. + +We recommend using gcc to build XFree86, but XFree86 generally builds with +the native compiler for each OS platform. + +1. How to get the XFree86 4.5.0 source + +The recommended way of getting the XFree86 4.5.0 source is to obtain it +directly from the XFree86 CVS repository. There are several ways of doing +that, and they are described at our CVS web page +. + +The CVS tag for this release is "xf-4_5_0". The tag for the maintenance +branch for this release is "xf-4_5-branch". + +Another method of getting the XFree86 4.5.0 source is to either download the +4.5.0 source tarballs from the XFree86 ftp site. The procedure for this is +as follows: + + o The XFree86 4.5.0 source is contained in the files: + + XFree86-4.5.0-src-1.tgz + + XFree86-4.5.0-src-2.tgz + + XFree86-4.5.0-src-3.tgz + + XFree86-4.5.0-src-4.tgz + + XFree86-4.5.0-src-5.tgz + + XFree86-4.5.0-src-6.tgz + + XFree86-4.5.0-src-7.tgz + + These can be found at ftp://ftp.xfree86.org/pub/XFree86/4.5.0/source/ + and similar locations on XFree86 mirror sites. XFree86-4.5.0-src-4.tgz + and XFree86-4.5.0-src-5.tgz contains the fonts. XFree86-4.5.0-src-6.tgz + contains the documentation source. XFree86-4.5.0-src-7.tgz contains the + hardcopy documentation. XFree86-4.5.0-src-1.tgz, + XFree86-4.5.0-src-2.tgz and XFree86-4.5.0-src-3.tgz contains everything + else. + + If you do not need either the documentation or the fonts, then you need + only XFree86-4.5.0-src-1.tgz, XFree86-4.5.0-src-2.tgz and + XFree86-4.5.0-src-3.tgz. + + o Extract each of these files by running the following from a directory on + a filesystem containing enough space (the full source requires around + 270MB, with a similar amount being required for the compiled binaries): + + gzip -d < XFree86-4.5.0-src-1.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-2.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-3.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-4.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-5.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-6.tgz | tar vxf - + + gzip -d < XFree86-4.5.0-src-7.tgz | tar vxf - + +Alternatively, if you already have a pristine copy of the XFree86 4.4.0 +source, you can download patches from +ftp://ftp.xfree86.org/pub/XFree86/4.5.0/patches/ that will allow you to con- +vert it to 4.5.0. Information about which patch files to download and how to +apply them can be found in the "How to get XFree86" section of the README for +this release. + +Each of the methods outlined above will produce one main source directory +called xc. + +2. Configuring the source before building + +In most cases it should not be necessary to configure anything before build- +ing. + +If you do want to make configuration changes, you should start by going to +the xc/config/cf directory, and copying the file xf86site.def to host.def. +After that, read thoroughly the the host.def file, which is heavily com- +mented, and set your configuration parameters. Usually you can find the +default settings by checking the .cf file(s) relevant to your OS. + +A good rule of thumb is to only change that you understand, as it is very +easy to create build problems by changing the default configuration unneces- +sarily. Before making too many modifications, check the configuration param- +eters specified in the xc/config/cf/README file. + +If you are using just the XFree86-4.5.0-src-1.tgz, XFree86-4.5.0-src-2.tgz +and XFree86-4.5.0-src-3.tgz parts of the source dist, you will need to define +BuildFonts to NO. + +3. Using a shadow directory of symbolic links for the build + +We recommend that you use a shadow directory of symbolic links to do the +build of XFree86, because it allows you to keep the source directory unmodi- +fied during the build process. It has the following benefits: + + o Foreign files not under CVS's control are not touched. + + o Greater flexibility in building XFree86 for several different Operating + Systems or hardware architectures from the same sources; shared by read- + only NFS mounts. + + o Different configuration options can be created by putting a real copy of + the host.def file in each build tree and by customizing it separately in + each build tree, and then customizing it separately. + +To make a shadow directory of symbolic links, use the following steps: + + o create the directory at the top of the build tree. This is often created + at the same level that the xc directory. + + cd the directory containing the xc directory + + mkdir build + + o use the "lndir" command to make the shadow tree: + + cd build + + lndir ../xc + + Note: You can refer to the xc directory by referencing it with an abso- + lute path also. + + See the lndir(1) manual page for details. + +If the lndir command is not already available on your system, you can build +it manually from the XFree86 sources by running the following commands: + + cd xc/config/util + + make -f Makefile.ini lndir + + cp lndir some directory in your PATH + +Occasionally there may be stale links in the build tree. This happens when +files in the source tree are either removed or renamed. These stale links +can be cleaned by running the "cleanlinks" script from the build directory +(see the cleanlinks(1) manual page for further details). + +Rarely will there be changes that require the build tree to be re-created +from scratch. If you think that this may be the case, look for build prob- +lems, which could indicate that this is the problem. The best solution in +this scenario is to remove the build tree,and then re-create it using the +steps outlined above. + +4. Building and installing the distribution + +Before building the distribution, read through your OS-specific documenta- +tion in README file in xc/programs/Xserver/hw/xfree86/doc. After that go to +your build directory which will either be the xc directory or the shadow +tree which was create previously, and run "make World". + +It is also advisable to that you redirect standard output stdout and standard +error output stderr to World.Log, so that you can track down problems that +might occur during the build. + +With Bourne-like shells (examples include the Bash, the Korn, and zsh shells) +use the following command: + + make World > World.log 2>&1 + +for C-shell variants (csh, tcsh, etc), use: + + make World >& World.log + +You can then follow the progress of the build by running: + + tail -f World.log + +in a terminal window. + +When the build is finished, you should check the World.Log file to see if +there were any problems. If there were not, then install the binaries. By +default "make World" stops when the first error is found. To restart that +same build process after correcting the various problems, run just 'make'. + +If Imakefiles or part of the build configuration were changed as part of cor- +recting the problem, then either re-run "make World", or run "make Every- +thing". + +If instead, you want "make World" to continue past errors, then instead exe- +cute it as follows: + +for Bourne-like shells: + + make WORLDOPTS=-k World > World.log 2>&1 + +for C-shell variants: + + make WORLDOPTS=-k World >& World.log + +For installation, run "make install" and "make install.man" and ensure that +there is enough space in the /usr/X11R6 directory. + +If instead you want to install XFree86 on a filesystem other than /usr, make +a symbolic link to /usr/X11R6 before running the install process. + +5. Reconfiguring the server (using the source distribution) + +If you would like to build several different sets of servers or server(s) +with a various sets of drivers then you should follow this procedure: + + 1. Ensure that the source for any new drivers is in the correct place + (e.g., all driver source should be in a subdirectory of xc/pro- + grams/Xserver/hw/xfree86/drivers). + + 2. Change the settings of the server definitions in host.def to specify + which servers you wish to build. Also, change the driver lists to suit + your needs. + + 3. From xc/programs/Xserver, run: + + make Makefile + make Makefiles + make includes + make depend + make + +6. Other useful make targets + +There are some other useful targets defined in the top level Makefile of +XFree86: + + Everything + After a make World, make Everything replicates make World except + for the cleaning of the source tree. make Everything very quickly + rebuilds the tree after a source patch, but there are times when + it is better to force a full build by using make World. + + clean + This does a partial cleaning of the source tree. Removes object + files and generated manual pages, but leaves the Makefiles and + the generated dependencies files in place. After a make clean you + need to re-run + + make includes + make depend + make + + to rebuild the XFree86. + + distclean + This does a full cleaning of the source tree, removing all gener- + ated files. After a make distclean, make World is the only option + to rebuild XFree86. + + includes + This generates all generated header files and in-tree symbolic + links needed by the build. These files are removed by a make + clean. + + depend + This recomputes the dependencies for the various targets in all + Makefiles. Depending on the operating system, the dependencies + are stored in the Makefile, or as a separate file, called + .depend. This target needs the generated include files produced + by make includes. + + VerifyOS + This displays the detected operating system version. If the num- + bers shown do not match your system, you probably need to set + them manually in host.def and report the problem to + . + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml,v 3.19 dawes Exp $ + + +$XFree86: xc/BUILD.txt,v 1.2 2005/03/17 01:11:51 dawes Exp $ Index: xc/INSTALL-X.org diff -u xc/INSTALL-X.org:1.5 xc/INSTALL-X.org:removed --- xc/INSTALL-X.org:1.5 Fri Dec 21 16:00:06 2001 +++ xc/INSTALL-X.org Wed Mar 16 20:58:22 2005 @@ -1,809 +0,0 @@ - - - - - - - - - - Building and Installing X11R6.6 - - - - - - - - - - - - - - April 4, 2001 - - - - - - - -Copyright (C) 1999,2000,2001 Compaq Computer Corporation -Copyright (C) 1999,2000,2001 Hewlett-Packard Company -Copyright (C) 1999,2000,2001 IBM Corporation -Copyright (C) 1999,2000,2001 Hummingbird Communications Ltd. -Copyright (C) 1999,2000,2001 Silicon Graphics, Inc. -Copyright (C) 1999,2000,2001 Sun Microsystems, Inc. -Copyright (C) 1998,1999,2000,2001 The Open Group - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Soft- -ware"), to deal in the Software without restriction, including without -limitation the rights to use, copy, modify, merge, publish, distribute, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, provided that the above copyright -notice(s) and this permission notice appear in all copies of the Soft- -ware and that both the above copyright notice(s) and this permission -notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- -ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY -RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN -THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- -QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- -MANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization of -the copyright holder. - -X Window System is a trademark of The Open Group. - - -1. Introduction - -This document is the installation notes that were provided with X.Org's -X11R6.6 release. If you're building XFree86, it can be used as a rough -guide. Be aware that most of the details are not targeted specifically -at the current XFree86 source tree. XFree86-specific documentation can -be found in the xc/programs/Xserver/hw/xfree86/doc directory and on-line -at http://www.xfree86.org/current/. Some of the documentation there is -out of date, so also be aware of that. There is currently no up to date -document specifically targeted at building XFree86 from source. - - -2. Easy Build Instructions - -This quick summary is no substitute for reading the full build instruc- -tions later in this document. - -Edit xc/config/cf/site.def for local preferences. If you want to -install and use the installation from somewhere other than /usr, change -ProjectRoot. (Do not use DESTDIR.) - -If you are cross compiling you will want to use DESTDIR to specify where -the installation should take place. Failure to do so will corrupt your -native installation of X. - -If you want to build with gcc uncomment the HasGcc2 line. If you have -gcc, but not cc, please read the full build instructions. - -If some time has elapsed since the initial release of R6.6, check to see -if any public patches have been released. The source tar files may have -been updated -- check the patch-level line in the bug-report template. -If the source in the tar files has not been updated then get all the -patches and apply them, following the instructions at the top of each -patch. Ignore the rebuild steps in the patch application instructions. - -Check the appropriate vendor-specific .cf file in xc/config/cf/ to make -sure that OSMajorVersion, OSMinorVersion, and OSTeenyVersion are set -correctly for your system. On most systems imake will figure these out -automatically; but you may override them in your xc/config/cf/site.def -if you want. - -See if there is a BootstrapCFlags mentioned in the comments in the ven- -dor-specific .cf file. (Most systems don't have or need one. The Boot- -strapCFlags in sun.cf is for SunOS 4.0.x, so if you're building on SunOS -4.1.x or SunOS 5/Solaris 2 then BootstrapCFlags doesn't apply.) If there -isn't one, cd to the xc directory and type (in csh): - - % make World >& world.log - - -If there is an applicable BootstrapCFlags, take its value and type: - - % make World BOOTSTRAPCFLAGS="value" >& world.log - - -Do not call the output file "make.log" when doing "make World". After a -successful build, you can install with: - - % make install >& install.log - - -You can install manual pages with: - - % make install.man >& man.log - - -While the system is building (or if things fail), read the rest of these -installation instructions. - - - -3. Building and Installing R6.6 - - -Historically the MIT X Consortium, The X Consortium, Inc., and X.Org -sample implementation releases have always been source-code-only -releases, and this release is no different. - - -3.1. Introduction - - -Every release of X has been progressively easier to configure, build, -and install than the preceding releases -- and we believe this release -is the easiest release to build yet. That notwithstanding, if things do -go amiss during the build we assume that you have the basic skills nec- -essary, and the willingness, to debug any errors that may occur in the -build process. When you install, if you're going to use xdm or replace -your system's old X, we assume you have a basic understanding of your -system's initialization process. For Remote Execution (RX, embedding) we -assume that you understand the fundamentals of HTTP, CGI, and HTML. If -these assumptions are not correct then you should consider finding some- -one who has proficiency in these areas to do the build and install for -you. - -After the release has been out for a while more up to date information -about any newly-discovered problems may be found in the Frequently Asked -Questions posting, which appears monthly on the Usenet newsgroup -comp.windows.x and xpert mailing list. The FAQ is also available via -anonymous FTP from ftp://ftp.x.org/ in the file ftp://ftp.x.org/con- -trib/faqs/FAQ.Z, or possibly on one of X mirror sites. - - -3.2. Preparing Your Build System - - -The source is distributed in four gzip compressed UNIX Tape ARchive -(tar) files. You will need about 230 Mb of disk space in order to unpack -and build the release. Installing requires an additional 30-50 Mb assum- -ing you have shared libraries (80-100 Mb without). - -On non-UNIX systems you'll need a utility that can extract gzip com- -pressed tar files to extract the sources. There are several to chose -from, we do not make recommendations about which one you should use. - -Release 6.6 sources are distributed among the tar files as follows: - - - xorg-1.tar contains everything in xc/ that isn't in the other tar files - xorg-2.tar contains xc/fonts - xorg-3.tar contains xc/doc/specs, xc/util - xorg-4.tar contains xc/doc/hardcopy - - -If you define BuildFonts to NO in your site.def file, then you only need -to unpack xorg-1.tar to build. If you build fonts, then you will also -need xorg-2.tar to build. If you already have the fonts from prior -releases you can use those instead of downloading them again. We presume -that you know how to copy or move them from your old source tree to the -R6.6 source tree. - - -3.3. Unpacking the Distribution - - -Create a directory to hold the sources and cd into it: - - % mkdir sourcedir - % cd sourcedir - -Then for each tar file xorg-*.tar.gz, execute this: - - % gunzip -c ftp-dir/xorg-N.tar.gz | tar xf - - - -or if you have GNU's tar (FreeBSD, NetBSD, OpenBSD, or Linux too) - - % tar xzf ftp-dir/xorg-N.tar.gz - - - -3.4. Applying Patches - - -If some time has elapsed since the initial release of R6.6, check to see -if any public patches have been released. The source tar files may have -been updated -- check the patch-level line in the bug-report template. -If the source in the tar files has not been updated then get all the -patches and apply them, following the instructions at the top of each -patch. Ignore the rebuild steps in the patch application instructions. - -See the section "Public Patches" later in this document. - -Then continue here. - - -3.5. Configuration Parameters (Imake Variables) - - -This release, like all the releases before it, uses imake, a utility for -creating system-specific Makefiles from system-independent Imakefiles. -Almost every directory in the release contains an Imakefile. System-spe- -cific configuration information is located in xc/config/cf/, which is -used by the imake program every time a Makefile is generated in the -source tree. - -Most of the configuration work prior to building the release is to set -parameters (imake variables) so that imake will generate correct Make- -files. If you're building on one of the supported systems almost no con- -figuration work should be necessary. - -You should define your configuration parameters in xc/con- -fig/cf/site.def. We provide an empty site.def file and a site.sample -file. The site.sample file is a suggested site.def file -- use it at -your own risk. - -Any public patches we release will never patch site.def, so you can be -assured that applying a public-patch will not corrupt your site.def -file. On rare occasion you may need to make the change in your vendor- -specific .cf file; but you should avoid doing that if at all possible -because any patch we might release could conceivably patch your vendor- -specific .cf file and your change may be lost or garbled. You can over- -ride most of the things in your vendor-specific .cf file in your -site.def file. (If you can't, it's a bug -- please file a bug-report.) - -On the systems we use here, imake will automatically determine the OSMa- -jorVersion, OSMinorVersion, and OSTeenyVersion for your system. If your -system isn't one of the systems we build on here, or you want to build -for a different version of your operating system, then you can override -them in the appropriate entry in your site.def file. - -The site.def file has two parts, one protected with "#ifdef BeforeVen- -dorCF" and one with "#ifdef AfterVendorCF". The file is actually pro- -cessed twice, once before the .cf file and once after. About the only -thing you need to set in the "before" section is HasGcc2; just about -everything else can be set in the "after" section. - -The site.sample also has commented out support to include another file, -host.def. This scheme may be useful if you want to set most parameters -site-wide, but some parameters vary from machine to machine. If you use -a symbolic link tree, you can share site.def across all machines, and -give each machine its own copy of host.def. - -The config parameters are listed in xc/config/cf/README, but here are -some of the new or more common parameters that you may wish to set in -your xc/config/cf/site.def. - -ProjectRoot - The destination where X will be installed. This variable needs to - be set before you build, as some programs that read files at run- - time have the installation directory compiled in to them. - -HasVarDirectory - Set to NO if your system doesn't have /var or you don't want cer- - tain files to be installed in VarDirectory. - -VarDirectory - The location of site editable configuration and run-time files. - Many sites prefer to install their X binaries on read-only media -- - either a disk slice (partition) that's mounted read-only for added - security, an NFS volume mounted read-only for security and/or - improved VM paging characteristics, or from a live filesystem on a - CD-ROM. In order to simplify things like installing app-default - files for locally built software, and allowing editing of miscella- - neous configuration and policy files, and to allow xdm to create - its master Xauthority file, some directories under $Project- - Root/lib/X11 are actually installed in /var/X11, and $Project- - Root/lib/X11 contains symlinks to the directories in /var/X11. - -HasGcc2 - Set to YES to build with gcc version 2.x instead of your system's - default compiler. - -BuildXInputExt - Set to YES to build the X Input Extension. This extension requires - device-dependent support in the X server, which exists only in Xhp - and XF86_* in the sample implementation. - -DefaultUsrBin - This is a directory where programs will be found even if PATH is - not set in the environment. It is independent of ProjectRoot and - defaults to /usr/bin. It is used, for example, when connecting from - a remote system via rsh. The rstart program installs its server in - this directory. - -InstallServerSetUID - Some systems require the X server to run as root to access the - devices it needs. If you are on such a system and will not be using - xdm, you may set this variable to YES to install the X server - setuid to root; however the X.Org Group strongly recommends that - you not install your server suid-root, but that you use xdm - instead. Talk to your system manager before setting this variable - to YES. - -InstallXdmConfig - By default set to NO, which suppresses installing xdm config files - over existing ones. Leave it set to NO if your site has customized - the files in $ProjectRoot/lib/X11/xdm, as many sites do. If you - don't install the new files, merge any changes present in the new - files. - -MotifBC - Causes Xlib and Xt to work around some bugs in older versions of - Motif. Set to YES only if you will be linking with Motif version - 1.1.1, 1.1.2, or 1.1.3. - -GetValuesBC - Setting this variable to YES allows illegal XtGetValues requests - with NULL ArgVal to usually succeed, as R5 did. Some applications - erroneously rely on this behavior. Support for this will be removed - in a future release. - -The following vendor-specific .cf files are in the release but have not -been tested recently and hence probably need changes to work: apollo.cf, -bsd.cf, convex.cf, DGUX.cf, luna.cf, macII.cf, Mips.cf, moto.cf, Oki.cf, -pegasus.cf, x386.cf. Amoeba.cf is known to require additional patches. - -The file xc/lib/Xdmcp/Wraphelp.c, for XDM-AUTHORIZATION-1, is not -included in this release. See ftp://ftp.x.org/pub/R6.6/xdm-auth/README. - - -3.6. System Build Notes - - -This section contains hints on building X with specific compilers and -operating systems. - -If the build isn't finding things right, make sure you are using a com- -piler for your operating system. For example, a pre-compiled gcc for a -different OS (e.g. as a cross-compiler) will not have right symbols -defined, so imake will not work correctly. - - -3.6.1. gcc - -X will not compile on some systems with gcc version 2.5, 2.5.1, or 2.5.2 -because of an incorrect declaration of memmove() in a gcc fixed include -file. - -If you are using a gcc version prior to 2.7 on Solaris x86, you need to -specify BOOTSTRAPCFLAGS="-Dsun" in the "make World" command. - -If you're building on a system that has an unbundled compiler, e.g. -Solaris 2.x, and you do not have the cc compiler, you need to contrive -to have cc in your path in order to bootstrap imake. One way to do this -is to create a symlink cc that points to gcc. - - % cd /usr/local/bin; ln -s path-to-gcc cc - -Once imake has been built all the Makefiles created with it will explic- -itly use gcc and you can remove the symlink. Another way around this is -to edit xc/config/imake/Makefile.ini to specify gcc instead of cc. - - -3.6.2. Other GNU tools - -Use of the GNU BinUtils assembler, as, and linker, ld, is not supported --- period! If you have them installed on your system you must rename or -remove them for the duration of the R6.6 build. (You can restore them -afterwards.) - -The system-supplied make works just fine for building R6.6 and that's -what we suggest you use. If you've replaced your system's make with GNU -make then we recommend that you restore the system make for the duration -of your R6.6 build. After R6.6 is done building you can revert to GNU -make. GNU make on most systems (except Linux, where it is the default -make) is not a supported build configuration. GNU make may work for you, -and if it does, great; but if it doesn't we do not consider it a bug in -R6.6. If, after this admonition, you still use GNU make and your build -fails, reread the above, and retry the build with the system's make -before you file a bug-report. - - -3.6.3. IBM AIX 4.x - - -On AIX 4.x, the file lib/font/Type1/objects.c must be compiled without -optimization (-O) or the X server and fontserver will exit when Type 1 -fonts are used. - - -3.6.4. SunOS 4.0.x - - -SunOS 4.0 and earlier need BOOTSTRAPCFLAGS=-DNOSTDHDRS because it does -not have unistd.h and stdlib.h. Do not supply a BOOTSTRAPCFLAGS when -building any SunOS 4.1 or 5.x (Solaris 2) version. - - -3.6.5. Linux - - -On Linux systems imake has preliminary support to automatically deter- -mine which Linux distribution you're using. At this time it only auto- -matically detects S.u.S.E. Linux. On other Linux systems you should set -the LinuxDistribution parameter in your xc/config/cf/site.def -- see the -xc/config/cf/linux.cf file for the list of valid values. On Linux sys- -tems imake will also automatically determine which version of libc and -binutils your system has. You may override these in your xc/con- -fig/cf/site.def file. - -Many distributions of Linux have poor or no support for ANSI/POSIX/ISO C -locale support. If your Linux distribution is one of these you should -make certain that the imake variable LinuxLocaleDefines is set to --DX_LOCALE so that compose processing and other internationalization -features will work correctly. To help decide if you should use --DX_LOCALE, look in /usr/share/locale -- if it's empty, you should prob- -ably use the -DX_LOCALE define. - - -3.6.6. Microsoft Windows NT - - -All of the base libraries are supported, including multi-threading in -Xlib and Xt, but some of the more complicated applications, specifically -xterm and xdm, are not supported. - -There are also some other rough edges in the implementation, such as -lack of support for non-socket file descriptors as Xt alternate inputs -and not using the registry for configurable parameters like the system -filenames and search paths. - -The Xnest server has been made to run on NT; although it still requires -a real X server for output still. A real X server can not be built from -these sources -- in order to display X applications on a MS-Windows host -you will have to acquire a real X Server. - -You have several choices for imake's RmTreeCmd. Look at the possible -definitions in the xc/config/cf/Win32.cf file, choose one that's right -for you, and add it to your xc/config/cf/site.def file. - - -3.7. The Build - - -For all the supported UNIX and UNIX-like systems you can simply type (in -csh): - - % make World >& world.log - -You can call the output file something other than "world.log"; but don't -call it "make.log" because files with this name are automatically -deleted during the initial "cleaning" stage of the build. - -The build can take several hours on older systems, and may take as lit- -tle as an hour on the faster systems that are available today. On UNIX -and UNIX-like systems you may want to run it in the background and keep -a watch on the output. For example: - - % make World >& world.log & - % tail -f world.log - - -If something goes wrong, the easiest thing is to correct the problem and -start over again, i.e. typing "make World". - - -3.7.1. UNIX and UNIX-like systems - - -Check your vendor-specific .cf file; if it doesn't have BootstrapCFlags -that apply to your version of the operating system then type (in csh): - - % make World >& world.log - - -Otherwise type (in csh): - - % make World BOOTSTRAPCFLAGS="value" >& world.log - - -None of the supported operating systems need to use BOOTSTRAPCFLAGS. - - -3.7.2. Microsoft Windows NT - - -On NT, make certain your Path, Include, and Lib environment variables -are set accordingly. For example here we use the command line compiler -in VC++ 4.0 Standard Edition, which is installed in C:\MSDEVSTD. To -setup the environment type: - - > set Path=old-path;C:\MSDEVSTD\bin;C:\path-to-RmTreeCmd - > set Include=C:\MSDEVSTD\include - > set Lib=C:\MSDEVSTD\lib - -Then to build, at the prompt, type: - - C:\> nmake World.Win32 > world.log - - - -3.8. Installing X - - -After the build has successfully completed you can install the software -by typing the following as root: - - % make install >& install.log - -or on Microsoft Windows NT - - C:\> nmake install > install.log - - -Again, you might want to run this in the background and use tail to -watch the progress. - -You can install the manual pages by typing the following as root: - - % make install.man >& man.log - - - -3.9. Shared Libraries - - -The version number of some of the shared libraries has been changed. On -SunOS 4, which supports minor version numbers for shared libraries, pro- -grams linked with the R6.6 libraries will use the new libraries with no -special action required. - -On most other modern operating systems the version portion of the -library name, i.e. "6.1" portion of "libX11.so.6.1" is a string. Even if -it's only one character long, e.g. "1" (as in libX11.so.1) it's still a -string. This string uniquely identifies and distinguishes one version of -the library from another. Even though all the libraries in this release -are compatible with the libraries from previous releases, and there's -otherwise no reason to change the version string, we do it to identify -which source release the libraries were built from. - -An old program that was linked with libXext.so.6.3 won't run if you -delete libXext.so.6.3 and install libXext.so.6.4 in its place. In gen- -eral on these systems you have the following choices: - -1. Keep the old versions of the libraries around. - -2. Relink all applications with the new libraries. - -3. Create a symlink using the old name which points to the new name. - - For example, to have programs that were linked against libX- - ext.so.6.3 use libXext.so.6.4, make this symlink: - - % cd $ProjectRoot/lib - % ln -s libXext.so.6.4 libXext.so.6.3 - - -On some distributions of Linux the run-time loader is broken -- requir- -ing that the library's internal SONAME match the filename -- and the -symlink solution won't work. We recommend that you get a new run-time -loader which is not broken or recompile your run-time loader to not -require that the SONAME match. - - -3.10. Setting Up xterm - - -If your /etc/termcap and /usr/lib/terminfo databases do not have correct -entries for xterm, use the sample entries provided in the directory -xc/programs/xterm/. System V users may need to compile and install the -terminfo entry with the tic utility. - -Since each xterm will need a separate pseudoterminal, you need a reason- -able number of them for normal execution. You probably will want at -least 32 on a small, multiuser system. On most systems, each pty has two -devices, a master and a slave, which are usually named -/dev/tty[pqrstu][0-f] and /dev/pty[pqrstu][0-f]. If you don't have at -least the "p" and "q" sets configured (try typing "ls /dev/?ty??"), you -should have your system administrator add them. This is commonly done -by running the MAKEDEV script in the /dev directory with appropriate -arguments. - - -3.11. Starting Servers Automatically at System Boot - - -The xfs and xdm programs are designed to be run automatically at system -startup. Please read the manual pages for details on setting up configu- -ration files; reasonable sample files are in xc/programs/xdm/config/ and -xc/programs/xfs/. - -Since xfs can serve fonts over the network, you do not need to run a -font server on every machine with an X display. You should start xfs -before xdm, since xdm may start an X server which is a client of (depen- -dent on) the font server. - - -3.11.1. On BSD-based systems using /etc/rc or /etc/rc.local - - -If your system uses an /etc/rc or /etc/rc.local file at boot time, you -can usually enable these programs by placing the following at or near -the end of the file: - - if [ -f $ProjectRoot/bin/xfs ]; then - $ProjectRoot/bin/xfs & echo -n ' xfs' - fi - - if [ -f $ProjectRoot/bin/xdm ]; then - $ProjectRoot/bin/xdm; echo -n ' xdm' - fi - - -On later versions of FreeBSD the preferred way of doing this is to cre- -ate the directory $ProjectRoot/etc/rc.d. Add this directory to the -local_startup variable defined in /etc/rc.conf, and then create short -scripts in this directory to start xfs and xdm. - -If you are unsure about how system boot works, or if your system does -not use /etc/rc, consult your system administrator for help. - - -3.11.2. On Linux systems - - -Most Linux distributions have an /etc/inittab entry specifically for -xdm. Depending on your distribution this may be run-level three, four, -or five. To use xdm, edit /etc/inittab and find the line which contains -initdefault and change it from 2 to the appropriate run-level - -You Linux distribution may already have a script to start xdm at a par- -ticular run-level. For example on S.u.S.E. Linux 5.0 there is the file -/sbin/init.d/xdm, and the symlink /sbin/init.d/rc3.d/S30xdm which points -to /sbin/init.d/xdm. Change /sbin/init.d/xdm to use $Project- -Root/bin/xdm. You can use the xdm script as a model write an xfs script. -Depending on your Linux distribution you may find these files in -/etc/init.d instead of /sbin/init.d. - - -3.11.3. On Digital Unix, HPUX 10, and SVR4 systems - - -Most systems run xdm by default at some particular run-level of the sys- -tem. There is a master init.d file and a run-level symlink rc?.d that -points to the master init.d file: - - Operating System rc?.d symlink init.d file - - Digital Unix 4.0 /sbin/rc3.d/S95xlogin /sbin/init.d/xlogin - HPUX 10.20 /sbin/rc3.d/S800xdm /sbin/init.d/xdm - Solaris 2.[0-4] - Solaris 2.5 /etc/rc3.d/S99xdm /etc/init.d/xdm.rc - Solaris 2.6 /etc/rc2.d/S99dtlogin /etc/init.d/dtlogin - IRIX 6.2 /etc/rc2.d/S98xdm /etc/init.d/xdm - Unixware /etc/rc2.d/S69xdm /etc/init.d/xdm - -In general you can edit the init.d file to use $ProjectRoot/bin/xdm. You -can use the xdm file as a model to write an /etc/rc?.d/S??xfs file to -start xfs. Some systems may already have files to start xfs. Starting in -Solaris 2.5 Sun uses inetd to start xfs -- you should remove the xfs -entries from /etc/inetd.conf and /etc/services before adding xfs to the -run-level files. - - -3.11.4. On Unix System V-based systems - - -On systems with a /etc/inittab file, you can edit this file to add the -lines - - xfs:3:once:$ProjectRoot/bin/xfs - xdm:3:once:$ProjectRoot/bin/xdm - - - - -3.12. Using OPEN LOOK applications - - -You can use the X11R6.x Xsun server with OPEN LOOK applications; but you -must pass the -swapLkeys flag to the server on startup, or the OPEN LOOK -Undo, Copy, Paste, Find, and Cut keys may not work correctly. For exam- -ple, to run Sun's OpenWindows 3.3 desktop environment with an X11R6 -server, use the command: - - % openwin -server $ProjectRoot/bin/Xsun -swapLkeys - - -The keysyms reported by keys on the numeric keypad have also changed -since X11R5; if you find that OpenWindows applications do not respond to -keypad keys and cursor control keys when using an R6 server, you can -remap the keypad to generate R5 style keysyms using the following -xmodmap commands: - - keysym Pause = F21 - keysym Print = F22 - keysym Break = F23 - keysym KP_Equal = F24 - keysym KP_Divide = F25 - keysym KP_Multiply = F26 - keysym KP_Home = F27 - keysym KP_Up = Up - keysym KP_Prior = F29 - keysym KP_Left = Left - keycode 100 = F31 - keysym KP_Right = Right - keysym KP_End = F33 - keysym KP_Down = Down - keysym KP_Next = F35 - keysym KP_Insert = Insert - keysym KP_Delete = Delete - - - -3.13. Rebuilding after Patches - - -Eventually you are going to make changes to the sources, for example by -applying any public patches that may be released or to fix any bugs you -may have found. - -If only source files are changed, rebuild by going to the base of your -source tree xc and typing: - - % make >& make.log - - -If there are imake configuration file changes, the best thing to do is -type: - - % make Everything >& every.log - - -"Everything" is similar to "World" in that it rebuilds every Makefile, -but unlike "World" it does not delete the existing objects, libraries, -and executables, and only rebuilds what is out of date. - - -3.14. Formatting the Documentation - - -The PostScript files in xc/doc/hardcopy can be generated from the -sources in xc/doc/specs. Most of the documentation is in troff using the --ms macros. The easiest way to format it is to use the Imakefiles pro- -vided. - -Set the name of your local troff program by setting the variable Trof- -fCmd in xc/config/cf/site.def. Then build the Makefiles: - - cd xc/doc - make SUBDIRS=specs Makefiles - - -Finally, go to the directory you are interested in and type "make" -there. This command will generate .PS files. You can also generate text -files by specifying the document name with a .txt extension as a make -target, e.g., "make icccm.txt". - - -4. Public Patches - - -The X.Org Group may from time to time issue public patches for this -release to fix any serious problems that are discovered. Such fixes are -a subset of fixes available to X.Org members. Public patches are avail- -able via anonymous FTP from ftp://ftp.x.org/pub/R6.6/fixes, or from your -local X mirror site. Check the site closest to you first. - -You can determine which public patches have already been applied to your -source tree by examining the "VERSION" line of xc/bug-report. The source -in the tar files you have may already have some patches applied; you -only need to apply later patches. If you try to apply patches out of -order or apply patches that are already in your tree, patch will tell -you that you have the wrong version and not apply the patch. - -Source for the patch program is in xc/util/patch/. The patch program -included on some systems may not support all the options this version -has. If you have problems applying patches, or if you're otherwise in -doubt, use this version. - - Index: xc/Imakefile diff -u xc/Imakefile:3.30 xc/Imakefile:3.32 --- xc/Imakefile:3.30 Sun Aug 24 16:31:43 2003 +++ xc/Imakefile Wed Jun 23 13:04:13 2004 @@ -3,13 +3,11 @@ -XCOMM $XFree86: xc/Imakefile,v 3.30 2003/08/24 20:31:43 tsi Exp $ +XCOMM $XFree86: xc/Imakefile,v 3.32 2004/06/23 17:04:13 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" -RELEASE = XOrgReleaseString - #ifdef XFree86VersionString VERSTRING = " "version XFree86VersionString "("XFree86DateString")" #endif @@ -56,10 +54,17 @@ @echo "" @echo Building XFree86 version XFree86VersionString "("XFree86DateString")." #endif +#ifdef OSRelVersion +VerifyOS:: + @echo "" + @echo Building on OSName "("OSMajorVersion"."OSMinorVersion"."OSTeenyVersion") ("OSRelVersion")" + @echo "" +#else VerifyOS:: @echo "" - @echo Building on OSName "("OSMajorVersion"."OSMinorVersion"."OSTeenyVersion")." + @echo Building on OSName "("OSMajorVersion"."OSMinorVersion"."OSTeenyVersion")" @echo "" +#endif #ifdef LinuxArchitecture VerifyOS:: @echo Linux Distribution: LinuxDistName Index: xc/Install.txt diff -u /dev/null xc/Install.txt:1.2 --- /dev/null Wed Mar 16 20:58:22 2005 +++ xc/Install.txt Wed Mar 16 20:11:51 2005 @@ -0,0 +1,399 @@ + Installation Details for XFree86® 4.5.0 + + The XFree86 Project, Inc + + 2 February 2005 + + Abstract + + How to install XFree86. + +1. Introduction + +This document contains information about installing the XFree86 binaries pro- +vided by The XFree86 Project. + +The XFree86 binaries that we provide for UNIX-like OS's (Linux, the BSDs, +Solaris, etc) are packaged in a platform-independent gzipped tar format, aka +"tarballs," identified by the .tgz suffix. Along with the binaries we pro- +vide a customized version of the GNU tar utility called "extract" and an +installation script. We recommend that these be used to install the bina- +ries. (The source for this customized version of GNU tar can be found in the +XFree86 CVS repository's "utils" module, and from our ftp site +.) + +2. Downloading the XFree86 4.5.0 binaries + +We provide XFree86 4.5.0 binaries for a range of operating systems at our ftp +site and our web site +. Often during +releases our site is heavily loaded. Instead of downloading directly from us +we recommend that instead you use one of our mirror sites. + +Our binaries are organized by sub-directories which correspond to each of the +OS/platforms for which we provide binaries. First go to the sub-directory +that represents your OS platform. In some cases (e.g., Linux) there may be a +number of choices depending on the architecture or libc version your platform +uses. In all case we recommend that you first download the Xinstall.sh +script, and run it as in the following example to find out which binary dis- +tribution you should download. + + sh Xinstall.sh -check + +The output of this utility tells you which is the correct set of binaries for +you to download. If you are careful with this step you will save yourself a +lot time and trouble from NOT downloading an incompatible distribution. + +NOTES: + + o The Xinstall.sh script must be downloaded in binary mode, otherwise it + will not run correctly. If you get lots of "command not found" mes- + sages when you try to run it, then it is most likely because the script + was not downloaded in binary mode. Some web browsers will not do this + for files of that name, so we also have a copy of it called "Xin- + stall.bin", and most browsers should download that correctly. When + downloading it under this name, select "save as" on your browser, and + save the file under the name "Xinstall.sh". + + o The Xinstall.sh script requires some system commands and utilities to + function correctly. While most systems will have these, some Linux + installations may not. If the script fails because of some missing sys- + tem command, you need to install it before you can continue. + + o Always use the version of the Xinstall.sh script that is provided with + the release. Older versions of the script may not install newer + releases correctly. + + o If the binary distribution reported by the Xinstall.sh script is not + present on the XFree86 site, then there are two possibilities: The first + is that it has not uploaded yet. This is likeliest possibility if you + are looking shortly after the release date. The second possibility is + that your target will not be be available for this release. This is + likeliest possibility if you are looking more than about two weeks after + the release date. Check here + for information about + updates to our binary distributions, and here + for errata related to + this release. + +Assuming that you have run the Xinstall.sh script and found the binary dis- +tribution suitable for your system, download the necessary files. The thir- +teen (13) mandatory files for all installations are listed below. The +installer script will complain if you do not have all of the required files +in the same directory. + + 1. Xinstall.sh The installer script + 2. extract The utility for extracting tarballs + 3. Xbin.tgz X clients/utilities and run-time libraries + 4. Xlib.tgz Some data files required at run-time + 5. Xman.tgz Manual pages + 6. Xdoc.tgz XFree86 documentation + 7. Xfnts.tgz Base set of fonts + 8. Xfenc.tgz Base set of font encoding data + 9. Xetc.tgz Run-time configuration files, part 1 + 10. Xrc.tgz Run-time configuration files, part 2 + 11. Xvar.tgz Run-time data + 12. Xxserv.tgz XFree86 X server + 13. Xmod.tgz XFree86 X server modules + +NOTES: + + o Some web browsers have a problem downloading the extract utility cor- + rectly. If you encounter this problem, download the version called + extract.exe. (NOTE: This is not a MS-DOS/Windows executable.) + + o Some distributions do not require the Xvar.tgz tarball. If it is + present in the binaries sub-directory for your platform, then it is + required. + + o The Darwin/Mac OS X distribution do not have or require the Xmod.tgz + tarball. + + o Some distributions may have additional mandatory tarballs. While rare, + the installer script will tell you if any are missing. + +The following thirteen (13) tarballs are optional. You should download the +ones you want to install. + + 1. Xdrm.tgz Source for DRM kernel modules + 2. Xfsrv.tgz Font server + 3. Xnest.tgz Nested X server + 4. Xprog.tgz X header files, config files and compile-time libs + 5. Xprt.tgz X Print server + 6. Xvfb.tgz Virtual framebuffer X server + 7. Xtinyx.tgz TinyX servers + 8. Xf100.tgz 100dpi fonts + 9. Xfcyr.tgz Cyrillic fonts + 10. Xfscl.tgz Scalable fonts (Speedo, Type1 and TrueType) + 11. Xhtml.tgz HTML version of the documentation + 12. Xps.tgz PostScript version of the documentation + 13. Xpdf.tgz PDF version of the documentation + +NOTES: + + o Not all distributions will have all of the above optional tarballs. + + o Some distributions may have some additional optional tarballs. + +If you miss some and want to install them later, go to the Manual Installa- +tion (section 4., page 1) section. + +3. Installing XFree86 4.5.0 using the Xinstall.sh script + +We strongly recommend that our XFree86 4.5.0 binaries be installed using the +Xinstall.sh script we provide. There are a lot of steps in the manual +installation process, and those steps can vary according to the platform and +hardware setup. There is a description of the manual installation process +for the most common cases below (section 4., page 1). + +You must login as the super user (root) to run the installer script and place +all of the downloaded files into a single directory. Use the cd command to +change to the chosen directory and run the installer script as follows: + + sh Xinstall.sh + +Answer the prompts as they come up. If you are missing something that is +required, the installer may tell you to install it before trying again. If +the problem is that you did not download all of mandatory files aforemen- +tioned, then the installer will tell you which ones are missing and ask you +to download them before proceeding. + +3.1 Questions the installer may ask + +The installer asks some questions that may not have obvious answers. The +information here should help you answer them. In most cases, apart from the +first question, the default answers should be OK. + +If you run the installer from within an X session (the installer checks if +$DISPLAY is set), you will be warned that doing so is not a good idea. +Unless you have a good reason for knowing that this will not be a problem, +you should exit your X session, including stopping xdm or equivalent if it is +running, before continuing. If you ignore this warning and run into prob- +lems, well, you were warned! + +If you have an existing X installation, you will be warned that proceeding +with this installation will overwrite it. Only those things that are part of +our standard distribution will be overwritten. Other X applications that you +may have installed will not be removed. Some configuration files may be +overwritten though, but the installer should prompt you before doing so and +will attempt to backup the existing files first. As the opening greeting +says, it is strongly recommended that you backup any existing installation +before proceeding. If you want your old applications to still be there after +you've installed, do not do the "backup" by simply renaming your old +/usr/X11R6 directory. It is better to make a copy of it, and then install +over the top of the original one. If you run into problems and want to +revert to the old installation, you can then delete the overwritten one and +copy the saved version back. + +During the first part of the installation over an existing version, the +script may remove some old files or directories that would get in the way of +the new installation. It will list which files/directories have been +removed. If none are listed, then none were removed. + +The next step when installing over an existing version is to check for exist- +ing configuration files. On most platforms, the run-time configuration files +are installed by default under /etc/X11 instead of under /usr/X11R6/lib/X11. +The installer will give you the option of moving any that are in the old +location, creating the necessary symbolic links. If you do not want to have +them moved, then you should answer "no" when asked about it. If you have no +exiting run-time configuration files in the /etc/X11, then the new configura- +tion files will be installed in /usr/X11R6/lib/X11 instead. + +Note: for the rare systems that do not have symbolic links, this question +will not be asked. The default answer is "yes" because that is best for most +situations. It makes it easier to share the /usr/X11R6 directory between +multiple hosts, and allows it to be mounted read-only. If you do not need +these features, then you can safely answer "no" if you do not want them +moved. + +When installing over an existing version, you will be prompted before each +set of configuration files is installed. If you haven't made any Customisa- +tions to your existing configuration files, then you can safely answer "yes" +for each of these. If you have made customisations, you can try answering +"no". If you run into problems later, you may need to manually merge your +customisations into the the new version of the configuration files. If your +platform uses customised xinit or xdm configuration files, overwriting them +may prevent your usual desktop from coming up after installing XFree86. For +this reason you may wish to answer "no" when prompted for those files. An +important set of files to answer "yes" to is the xkb files. If they are not +up to date you may run into problems running the latest XFree86 server. + +The installer will attempt to make a backup of your original files before +copying in the new ones. This may not be foolproof and it is recommended +that you still make your own backup of everything first. If you wish to +install the configuration manually, they can be found in the Xetc.tgz and +Xrc.tgz tarballs. See the section below (section 4., page 1) about manual +installation for information about extracting them separately. + +After the configuration files have been dealt with, the other mandatory com- +ponents of the binary distribution will be installed. This should proceed +without any user intervention. + +If you downloaded any of the optional components, the installer will ask you +about each one before it is installed. The default answer is "yes". If +there are any that you've since decided that you do not want to install, +answer "no" when prompted. + +After that is done, the main part of the installation is complete. The next +steps are to tidy up some aspects of the installation. The first of these is +to run "ldconfig" on systems that require it, so that the newly installed +shared libraries are accessible. Then the fonts.dir files in some directo- +ries are updated so that the fonts can be accessed correctly. Next, the +installer checks to see if your system has a termcap file or terminfo files. +If it finds the former, it tells you how you may update the entries in that +file. If it finds the latter, it asks you if you want it to update them for +you. + +You may be asked if you want to create links for the GL libraries and header +files. The OpenGL standard on some platforms (Linux in particular) says that +these should be installed in the standard system locations (/usr/lib and +/usr/include), so the installer offers to create the appropriate links. If +you're running Linux, you should probably answer yes. For other platforms it +is your choice. If you already have another version of libGL in /usr/lib, +answering "yes" will remove it and replace it with a link to the version we +supply. The installer will show you a listing of any existing versions +before asking if they should be replaced. + +Finally, the installer asks you if you want a link created for the rstart +utility. On most modern systems the link isn't essential, so the default +answer is "no". Answer "yes" if you know that you need it. If you find +later that you need it, you can create it easily by running: + + rm -f /usr/bin/rstartd + ln -s /usr/X11R6/bin/rstartd /usr/bin/rstartd + +3.2 After the installation is complete + +The next step is to get the XFree86 server running. The recommended way to +do this is to run: + + XFree86 -autoconfig + +This will work well in many cases, and if it suits your needs you can make it +the default by simply moving/renaming any existing XF86Config file so that +the XFree86 server does not find it. If it doesn't, or if you want to make +changes to the auto-detected configuration, try the xf86cfg or xf86config +utilities or try running: + + XFree86 -configure + +Note that if you are running Darwin/Mac OS X, there is no step 3 :-). You +should skip this step, as configuration is not required or possible. The X +server configuration file is not used on Darwin/Mac OS X. + +After the X server configuration is done, it may be advisable to reboot, +especially if you run xdm (or equivalent) or the font server (xfs). + +4. Installing XFree86 4.5.0 manually + +This section contains information about manually installing the XFree86 4.5.0 +binary distributions. You should only use this method if you know what +you're doing. The information here covers some common cases, but not every +possible case. It also may not be complete or up to date. Use at your own +risk. + +Put all of the downloaded files into a single directory (choose some tempo- +rary location with enough space). Become the super user (root). All of the +following commands should be run as root, and they should be run from the +directory that has all of the downloaded files. The "extract" utility should +be used to unpack the tarballs. This is a customised version of GNU tar that +has the gzip code built-in, and which has a different usage when run under +the name "extract". One important thing that extract does that most versions +of tar do not do by default is that it unlinks existing files before writing +new ones. This is important when installing over an existing version of X. +If you choose to use some other utility to extract the tarballs, you're on +your own. + +4.1 A new installation + +The simplest case is when there is no existing X installation. The installa- +tion procedure for this case is as follows: + + chmod +x extract + mkdir /usr/X11R6 + mkdir /etc/X11 + ./extract -C /usr/X11R6 X[a-df-qs-uw-z]*.tgz + ./extract -C /usr/X11R6 Xvfb.tgz # If you are installing Xvfb + ./extract -C /etc Xetc.tgz + ./extract -C /etc Xrc.tgz + ./extract -C /var Xvar.tgz + ln -s /etc/X11/app-defaults /usr/X11R6/lib/X11 + ln -s /etc/X11/fs /usr/X11R6/lib/X11 + ln -s /etc/X11/lbxproxy /usr/X11R6/lib/X11 + ln -s /etc/X11/proxymngr /usr/X11R6/lib/X11 + ln -s /etc/X11/rstart /usr/X11R6/lib/X11 + ln -s /etc/X11/twm /usr/X11R6/lib/X11 + ln -s /etc/X11/xdm /usr/X11R6/lib/X11 + ln -s /etc/X11/xinit /usr/X11R6/lib/X11 + ln -s /etc/X11/xsm /usr/X11R6/lib/X11 + ln -s /etc/X11/xserver /usr/X11R6/lib/X11 + chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK + /sbin/ldconfig /usr/X11R6/lib # For Linux + /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD + /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc + +4.2 Installing over an old installation + +If you have an existing installation of X, you should make a backup copy of +it before installing the new version over the top of it. + +Before doing anything else, make sure the extract command is executable, and +also link it to the name "gnu-tar" so that it can be used as a regular tar +command: + + chmod +x extract + rm -f gnu-tar + ln extract gnu-tar + +The first part of the procedure is to move the old run-time config files from +/usr/X11R6/lib/X11 to /etc/X11. Create /etc/X11 if it doesn't already exist. +For each of the following sub-directories (app-defaults, fs, lbxproxy, prox- +ymngr, rstart, twm, xdm, xinit, xsm, xserver) that you want to move, check +that there is a sub-directory of this name in /usr/X11R6/lib/X11. Create a +sub-directory of the same name under /etc/X11, then copy the files over by +running: + + ./gnu-tar -C /usr/X11R6/lib/X11/subdir -c -f - . | \ + ./gnu-tar -C /etc/X11/subdir -v -x -p -U -f - + +For each subdirectory that is moved, remove the one under /usr/X11R6/lib/X11 +and create a symbolic link to the new location: + + rm -fr /usr/X11R6/lib/X11/subdir + ln -s /etc/X11/subdir /usr/X11R6/lib/X11 + +For those subdirectories that didn't already exist under /usr/X11R6/lib/X11, +create one under /etc/X11 and create the symbolic link to it: + + mkdir /etc/X11/subdir + ln -s /etc/X11/subdir /usr/X11R6/lib/X11 + +Once that is done, extract the config files from the Xetc.tgz and Xrc.tgz +tarballs into a temporary directory: + + mkdir tmpdir + ./extract -C tmpdir Xetc.tgz + ./extract -C tmpdir Xrc.tgz + +and then copy each sub-directory over to the installed location: + + ./gnu-tar -C tmpdir/subdir -c -f - . | \ + ./gnu-tar -C /usr/X11R6/lib/X11/subdir -v -x -p -U -f - + +If you have customised any config files in your old installation, you may +want to omit those sub-directories, or copy selected files over by hand. + +Once that's done, the main part of the installation can be done: + + ./extract -C /usr/X11R6 `pwd`/X[a-df-qs-uw-z]*.tgz + ./extract -C /usr/X11R6 Xvfb.tgz # If you are installing Xvfb + ./extract -C /var Xvar.tgz + chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK + /sbin/ldconfig /usr/X11R6/lib # For Linux + /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD + /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.22 dawes Exp $ + + +$XFree86: xc/Install.txt,v 1.2 2005/03/17 01:11:51 dawes Exp $ Index: xc/LABEL diff -u xc/LABEL:1.2 xc/LABEL:removed --- xc/LABEL:1.2 Wed Jul 9 11:27:23 2003 +++ xc/LABEL Wed Mar 16 20:58:22 2005 @@ -1,132 +0,0 @@ - X Window System, Version 11 - Release 6.6 - - Portions Copyright by: - - The Open Group - - and - - Mark Adler - Adobe Systems Incorporated - AGE Logic, Inc. - Gerrit Jan Akkerman - Corin Anderson - Doug Anson - Apollo Computer Inc. - Ares Software Corp. - ATI - AT&T, Inc. - Robert V. Baron - David Bateman - Bigelow & Holmes - Bitstream, Inc. - Jon Block - Adam de Boor - Manfred Brands - Richard Burdick - Cognition Corp. - Simon P. Cooper - Régis Cridlig - Robin Cutshaw - Daniver Limited - Daewoo Electronics Co.,Ltd. - Data General Corporation - David Dawes - Jorge Delgado - Digital Equipment Corporation - Evans & Sutherland Computer Corporation - Rickard E. Faith - Erik Fortune - Free Software Foundation, Inc. - Joseph Friedman - Fuji Xerox Co., Ltd. - Fujitsu Limited - Fujitsu Open Systems Solutions, Inc. - Jean-loup Gailly - Tiago Gons - Pascal Haible - Harm Hanemaayer - Randy Hendry - Matthieu Herrb - Hewlett-Packard Company - Hitachi, Ltd. - Dirk Hohndel - David Holland - Philip Homburg - Alan Hourihane - IBM Corporation - The Institute of Software, Academia Sinica - INTERACTIVE Systems Corporation - Kaleb S. Keithley - Jeff Kirk - Harald Koenig - Marc Aurele La France - Glenn G. Lai - Scott Laird - Thomas G. Lane - Steven Lang - Harry Langenbacher - Patrick Lecoanet - Sam Leffler - Frederic Lepied - Lexmark International, Inc. - Sebastien Marineau - Michael P. Marking - Kevin E. Martin - Davor Matic - David McCullough - David J. McKay - MIPS Computer Systems, Inc. - Joseph V. Moss - Thomas Mueller - Rich Murphey - NCR Corporation, Inc. - Netscape Communications - Network Computing Devices, Inc. - Novell, Inc. - NTT Software Corporation - Number Nine Computer Corp. - NVIDIA Corp. - Erik Nygren - Hans Oey - Kazuyuki (ikko-) Okamoto - Oki Technosystems Laboratory, Inc. - OMRON Corporation - Open Software Foundation - Panacea Inc. - Prentice Hall - Quarterdeck Office Systems - Regents of the University of California - Bill Reynolds - Thomas Roell - The Santa Cruz Operation, Inc. - Dale Schumacher - Paolo Severini - ShoGraphics, Inc. - Silicon Graphics Computer Systems, Inc. - Sony Corporation - SRI - Craig Struble - Sun Microsystems, Inc. - SunSoft, Inc. - Tektronix, Inc. - Finn Thoegersen - Gerry Toll - Jon Tombs - Linus Torvalds - TOSHIBA Corp. - Peter Trattler - James Tsillas - UniSoft Group Limited - UNIX System Laboratories, Inc. - Holger Veit - Vrije Universiteit - Larry Wall - David E. Wexelblat - Thomas Wolfram - Henry A. Worth - Wyse Technology, Inc. - The XFree86 Project, Inc. - Ming Yu - Orest Zborowski Index: xc/LICENSE.txt diff -u /dev/null xc/LICENSE.txt:1.3 --- /dev/null Wed Mar 16 20:58:22 2005 +++ xc/LICENSE.txt Wed Mar 16 20:11:51 2005 @@ -0,0 +1,1642 @@ + Licenses + + Compiled by The XFree86 Project + + 9 March 2005 + +1. Introduction + +The information in this document is intended to be complete and accurate only +for formal XFree86 releases. It may not be complete or accurate for develop- +ment code obtained directly from the CVS repository or from development, +experimental, release candidate, or other snapshots. For licensing informa- +tion about development code, contact the relevant authors, contributors and +copyright holders. + +XFree86® code without an explicit copyright or not explicitly marked as being +in the public domain is covered by the XFree86 1.1 copyright/license as shown +below (section 4., page 1). Portions of code are covered by other +licenses/copyrights, as shown in subsequent sections. In all cases, see +individual source files for specific license details, copyright owner infor- +mation, and copyright dates. + +Note: XFree86 is a registered trademark of The XFree86 Project, Inc. + +2. XFree86 Project Licensing Policy + +The XFree86 Project's basic licensing philosophy has always been summed up as +"You can do what you like with the code except claim you wrote it." +Expressed more formally, it means that the licenses acceptable for code that +makes up XFree86 must meet the following conditions: + + o The code must be redistributable by others in either source or binary + form. + + o Others must be permitted to modify the code, and to distribute modified + code or derived code without being required to pay a licensing fee or + other financial consideration to the copyright holder. + + o Others must be permitted to distribute binary-only forms of the code if + they which to do so. + +A range of Open Source and Free Software licenses meet these conditions. The +licenses in this document are examples of acceptable licenses. Contributors +to XFree86 are encouraged to choose the license type that best suits them. +If you have any questions about whether a specific license fits in with the +XFree86 licensing policy, please contact us. + +3. License Classifications + +3.1 Open Source + +We believe that all of the code in this release (4.5.0) of XFree86 meet the +requirements of the Open Source Definition , as maintained by the Open Source Initiative +(OSI) . + +3.2 Free Software + +We believe that most of the code in this release (4.5.0) of XFree86 meets the +requirements of the Free Software definition as defined by the Free Software Foundation (FSF) +. + +Exceptions to this include the GLX extension and CID font code that are cov- +ered by the SGI Free Software License B, version 1.1 (section 9., page 1). + +4. XFree86 License (version 1.1) + +The text of the XFree86 1.1 license is included below. A FAQ for this +licence can be found at the XFree86 web site + + +Copyright (C) 1994-2005 The XFree86 Project, Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions, and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution, and in the same place +and form as other copyright, license and disclaimer information. + +3. The end-user documentation included with the redistribution, if any, must +include the following acknowledgment: "This product includes software devel- +oped by The XFree86 Project, Inc (http://www.xfree86.org/) and its contribu- +tors", in the same place and form as other third-party acknowledgments. +Alternately, this acknowledgment may appear in the software itself, in the +same form and location as other such third-party acknowledgments. + +4. Except as contained in this notice, the name of The XFree86 Project, Inc +shall not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from The +XFree86 Project, Inc. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLI- +GENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +5. X/MIT Licenses + +Some forms of the X/MIT licenses require that the copyright and license +notices be reproduced in supporting documentation. Copyright notices are +included here, grouped with the applicable license notices. + +5.1 MIT + +This is the form of the MIT licence that was used with X11R5. A lot of con- +tributors to XFree86 have adopted this license. + +Copyright (C) + +Copyright (C) 1984-1989, 1994 Adobe Systems Incorporated. + +Copyright (C) 2003 Eric Anholt + +Copyright (C) 2002 Apple Computer, Inc. All Rights Reserved. + +Copyright (C) 1988 AT&T. All Rights Reserved. + +Copyright (C) 1992 by Robert Baron + +Copyright (C) 1996-1998 by David Bateman + +Copyright (C) 1988 Bitstream, Inc., Cambridge, Massachusetts, USA + +Copyright (C) 2001 by Stephen Blackheath + +Copyright (C) 1993 by Jon Block + +Copyright (C) 2000 Compaq Computer Corporation, Inc. + +Copyright (C) 1998 by Concurrent Computer Corporation + +Copyright (C) 1994-2000 by Robin Cutshaw + +Copyright (C) 1992, 1993, 2002 by David Dawes + +Copyright (C) 2000 by Egbert Eich + +Copyright (C) 2002 by Paul Elliott + +Copyright (C) 1987-1994 by Digital Equipment Corporation + +Copyright (C) 1988 by Evans & Sutherland Computer Corporation. All Rights +Reserved + +Copyright (C) 1992, 1993, 1994 by FUJITSU LIMITED + +Copyright (C) 2003 by Bryan W. Headley. + +Copyright (C) 2000 by Richard A. Hecker, California, United States + +Copyright (C) 2002 Hewlett Packard Company, Inc. + +Copyright (C) 1997 Matthieu Herrb + +Copyright (C) 2000 Christian Herzog + +Copyright (C) 1999 by David Holland + +Copyright (C) 1992-2004 by Alan Hourihane + +Copyright (C) 2000 Roland Jansen + +Copyright (C) 2001 by J. Kean Johnston + +Copyright (C) 2000, 2001 Ani Joshi + +Copyright (C) 2000 by Rainer Keller + +Copyright (C) 1999-2003 by Peter Kunzmann, Citron GmbH, Germany. + +Copyright (C) 1994 through 2005 by Marc Aurele La France (TSI @ UQV), +tsi@xfree86.org + +Copyright (C) 1996 by Steven Lang + +Copyright (C) 1995, 1999 by Patrick Lecoanet, France. + +Copyright (C) 2001 by Patrick LERDA + +Copyright (C) 2000 Tuomas J. Lukka + +Copyright (C) 2000-2001 by Sven Luther + +Copyright (C) 2002, 2003 Torrey T. Lyons. All Rights Reserved. + +Copyright (C) 1996, 1998 by Sebastien Marineau + +Copyright (C) 1984-1989, 1991, 1993 Massachusetts Institute of Technology + +Copyright (C) 1993 by David McCullough + +Copyright (C) 1995-1998 Metro Link, Inc. + +Copyright (C) MontaVista Software Inc. + +Copyright (C) 1993, 1996, 1999 by Thomas Mueller + +Copyright (C) 1992 by Rich Murphey + +Copyright (C) 1993, 1994 NCR Corporation - Dayton, Ohio, USA + +Copyright (C) 1989-1995 Network Computing Devices; + +Copyright (C) 1990, 1991 by Nippon Telegraph and Telephone Corporation + +Copyright (C) 1990, 1991 by NTT Software Corporation + +Copyright (C) 1998 by Number Nine Visual Technology, Inc. + +Copyright (C) 1990, 1991 by OMRON Corporation + +Copyright (C) 1991 by the Open Software Foundation + +Copyright (C) 1998-2002 Keith Packard + +Copyright (C) 1997 Takis Psarogiannakopoulos, Cambridge, UK + +Copyright (C) 1993 Quarterdeck Office Systems + +Copyright (C) 2002 by Red Hat Inc. + +Copyright (C) 1990,91 by Thomas Roell, Dinkelscherben, Germany. + +Copyright (C) 1989 Dale Schumacher + +Copyright (C) 1993-1997 by Silicon Graphics Computer Systems, Inc. + +Copyright (C) 2002 Manish Singh + +Copyright (C) 1993, 1994 by Sony Corporation + +Copyright (C) 1988 SRI + +Copyright (C) 1987, 1988, 1991, 1992, 2000 by Sun Microsystems, Inc. All +Rights Reserved. + +Copyright (C) 1999, 2000 SuSE, Inc. + +Copyright (C) 2002 by SuSE Linux AG + +Copyright (C) 1993-2005 by The XFree86 Project, Inc. + +Copyright (C) 1999-2001 by Thomas Thanner, Citron GmbH, Germany. + +Copyright (C) 1992, 1993 by TOSHIBA Corp. + +Copyright (C) 1992 by Jim Tsillas + +Copyright (C) 1997, 1998 by UCHIYAMA Yasushi + +Copyright (C) 1990, 1991 UNIX System Laboratories, Inc. All Rights Reserved. + +Copyright (C) 1994, 1996 by Holger Veit + +Copyright (C) 1992 Vrije Universiteit, The Netherlands + +Copyright (C) 1993 by David Wexelblat + +Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria. + +Copyright (C) 1993 by Thomas Wolfram, Berlin, Germany. + +Copyright (C) 1996 X Consortium, Inc. + +Copyright (C) 1998 by Kazutaka YOKOTA + +Copyright (C) 1992 by Orest Zborowski + +Permission to use, copy, modify, and distribute this software and its docu- +mentation for any purpose and without fee is hereby granted, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or public- +ity pertaining to distribution of the software without specific, written +prior permission. The copyright holders makes no representations about the +suitability of this software for any purpose. It is provided "as is" without +express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT +SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSE- +QUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +5.2 The Open Group + +This is the license that The Open Group applied after the post X11R6.4 +license restoration. + +Copyright (C) 1991, 1996 Digital Equipment Corp. + +Copyright (C) 1996 Fujitsu Limited + +Copyright (C) 1996 Hewlett-Packard Company + +Copyright (C) 1996 Hitachi, Ltd. + +Copyright (C) 1996 International Business Machines Corp. + +Copyright (C) 1990, Network Computing Devices + +Copyright (C) 1996 Novell, Inc. + +Copyright (C) 1987, 1996, 2002 Sun Microsystems, Inc. All rights reserved. + +Copyright (C) 1990, Tektronix Inc. + +Copyright (C) 1985-1998 The Open Group + +Copyright (C) 2000 The XFree86 Project, Inc. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of copyright holders shall not +be used in advertising or otherwise to promote the sale, use or other deal- +ings in this Software without prior written authorization from the copyright +holders. + +5.3 X Consortium + +This is an intermediate form of the X Consortium license, and is essentially +the same as the XFree86 1.0 license. + +Copyright (C) X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X +CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +X Window System is a trademark of X Consortium, Inc. + +5.4 Nokia + +Copyright (C) 2000, 2001 - Nokia Home Communications + +Copyright (C) 1998, 1999 - The XFree86 Project Inc. + +Copyright (C) 2000 VA Linux Systems, Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +provided that the above copyright notice(s) and this permission notice appear +in all copies of the Software and that both the above copyright notice(s) and +this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE +LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other deal- +ings in this Software without prior written authorization of the copyright +holder. + +5.5 Tektronix, Inc + +Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. + +All Rights Reserved + +This file is a component of an X Window System-specific implementation of +Xcms based on the TekColor Color Management System. Permission is hereby +granted to use, copy, modify, sell, and otherwise distribute this software +and its documentation for any purpose and without fee, provided that this +copyright, permission, and disclaimer notice is reproduced in all copies of +this software and in supporting documentation. TekColor is a trademark of +Tektronix, Inc. + +Tektronix makes no representation about the suitability of this software for +any purpose. It is provided "as is" and with all faults. + +TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, INCLUDING THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUEN- +TIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA, OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR THE PERFORMANCE OF +THIS SOFTWARE. + +5.6 Digital Equipment Corporation (1) + +Copyright (C) 1987, 1988, 1989, 1990 by Digital Equipment Corporation, May- +nard, Massachusetts + +Copyright (C) 1998, 1989 by Hewlett-Packard Company, Palo Alto, California. + +Copyright (C) 1990, 1991 Network Computing Devices + +Copyright (C) 1993 by Sun Microsystems, Inc. Mountain View, CA. + +Copyright (C) 1988 by Wyse Technology, Inc., San Jose, Ca + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its docu- +mentation for any purpose and without fee is hereby granted, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or public- +ity pertaining to distribution of the software without specific, written +prior permission. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT +SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUEN- +TIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +5.7 IBM + +Copyright International Business Machines,Corp. 1991 + +All Rights Reserved + +License to use, copy, modify, and distribute this software and its documenta- +tion for any purpose and without fee is hereby granted, provided that +licensee provides a license to IBM, Corp. to use, copy, modify, and distrib- +ute derivative works and their documentation for any purpose and without fee, +that the above copyright notice appear in all copies and that both that copy- +right notice and this permission notice appear in supporting documentation, +and that the name of IBM not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior permission. + +IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY IMPLIED WAR- +RANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONIN- +FRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND PER- +FORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS +TO THE LICENSEE. SHOULD ANY PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE +LICENSEE (NOT IBM) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND COR- +RECTION. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSE- +QUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA +OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +5.8 Adobe + +(c) Copyright 1989-1994 Adobe Systems Incorporated. + +All rights reserved. + +Permission to use, copy, modify, distribute, and sublicense this software and +its documentation for any purpose and without fee is hereby granted, provided +that the above copyright notices appear in all copies and that both those +copyright notices and this permission notice appear in supporting documenta- +tion and that the name of Adobe Systems Incorporated not be used in advertis- +ing or publicity pertaining to distribution of the software without specific, +written prior permission. No trademark license to use the Adobe trademarks +is hereby granted. If the Adobe trademark "Display PostScript"(tm) is used +to describe this software, its functionality or for any other purpose, such +use shall be limited to a statement that this software works in conjunction +with the Display PostScript system. Proper trademark attribution to reflect +Adobe's ownership of the trademark shall be given whenever any such reference +to the Display PostScript system is made. + +ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY +PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- +INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU +OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE, STRICT LIA- +BILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER +SUPPORT FOR THE SOFTWARE. + +Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems +Incorporated which may be registered in certain jurisdictions + +5.9 Silicon Graphics, Inc. + +(c) Copyright 1993, Silicon Graphics, Inc. + +ALL RIGHTS RESERVED + +Permission to use, copy, modify, and distribute this software for any purpose +and without fee is hereby granted, provided that the above copyright notice +appear in all copies and that both the copyright notice and this permission +notice appear in supporting documentation, and that the name of Silicon +Graphics, Inc. not be used in advertising or publicity pertaining to distri- +bution of the software without specific, written prior permission. + +THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" AND WITHOUT +WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMI- +TATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR +ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY +KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, LOSS OF +PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, +WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR +IN CONNECTION WITH THE POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. + +5.10 Digital Equipment Corporation (2) + +Copyright 1987-1993 Digital Equipment Corporation, Maynard, Massachusetts + +All Rights Reserved. + +THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND +SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. +DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR +ANY PURPOSE. IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. + +IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS, +APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT +SET FORTH ABOVE. + +Permission to use, copy, modify, and distribute this software and its docu- +mentation for any purpose and without fee is hereby granted, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the software without specific, writ- +ten prior permission. + +5.11 XFree86 License (version 1.0) + +Copyright (C) 1994-2005 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- +NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other deal- +ings in this Software without prior written authorization from the XFree86 +Project. + +6. Berkeley-style Licenses + +The Berkeley-style licenses are similar to the X/MIT-style licenses, except +that they may include conditions requiring copies of the licenses and copy- +right notices accompany binary distributions, and in some cases that specific +attributions accompany binary distributions and/or are included with end user +documentation and/or advertising material. + +6.1 3-Clause BSD License (the revised BSD license) + +Copyright (C) 2001, Andy Ritger aritger@nvidia.com. + +Copyright (C) 1999,2000 by Eric Sunshine + +Copyright (C) Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. + +Copyright (C) 2001-2004 Thomas Winischhofer + +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- +CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- +CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- +ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +6.2 2-Clause BSD License + +Copyright (c) 1999 Lennart Augustsson + +Copyright (c) 1999 Chris Costello + +Copyright (c) 1995,1999 Theo de Raadt. + +Copyright (c) 2001-2002 Damien Miller. + +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- +CLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +6.3 Original 4-clause BSD license (UCB) + +Copyright (c) 1993 The Regents of the University of California. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes soft- + ware developed by the University of California, Berkeley and its con- + tributors. + + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- +CLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +6.4 UCB/LBL + +In addition to the standard 4-clause BSD License, this one carries the fol- +lowing statements: + +This software was developed by the Computer Systems Engineering group at +Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to +Berkeley. + +All advertising materials mentioning features or use of this software must +display the following acknowledgement: This product includes software devel- +oped by the University of California, Lawrence Berkeley Laboratory. + +6.5 Christopher G. Demetriou. + +Copyright (c) 1993, 1994 Christopher G. Demetriou + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes soft- + ware developed by Christopher G. Demetriou. + + 4. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- +CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- +CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- +ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +6.6 The NetBSD Foundation, Inc. + +Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation by +Ben Collver + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes soft- + ware developed by the NetBSD Foundation, Inc. and its contributors. + + 4. Neither the name of The NetBSD Foundation nor the names of its con- + tributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE- +QUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAM- +AGE. + +6.7 X-Oz Technologies + +Copyright 2003, 2004, 2005 by David H. Dawes. + +Copyright 2003, 2004, 2005 by X-Oz Technologies. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The end-user documentation included with the redistribution, if any, + must include the following acknowledgment: "This product includes soft- + ware developed by X-Oz Technologies (http://www.x-oz.com/)." Alter- + nately, this acknowledgment may appear in the software itself, if and + wherever such third-party acknowledgments normally appear. + + 4. Except as contained in this notice, the name of X-Oz Technologies shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from X-Oz Technologies. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL X-OZ +TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDEN- +TAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROF- +ITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- +ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + +6.8 X-TrueType Server Project, After X-TT Project, and contributors. + +Copyright (c) 1998 X-TrueType Server Project, All rights reserved. + +Copyright (c) 2003 After X-TT Project, All rights reserved. + +Contributors include: + +Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved. + +Copyright (c) 1998-1999 Shunsuke Akiyama . All +rights reserved. + +Copyright (c) 1998,1999 Pablo Saratxaga + +Copyright (c) 1998 Go Watanabe, All rights reserved. + +Copyright (c) 2001 Roger So, All rights reserved. + +Copyright (c) 1998,1999 Chen Xiangyang, All Rights reserved. + +Copyright (c) 1997 Jyunji Takagi, All rights reserved. + +Copyright (c) 1998 Kazushi (Jam) Marukawa, All rights reserved. + +Copyright (c) 1999 Mutsumi ISHIKAWA, All rights reserved. + +Copyright (c) 1999 Nozomi YTOW, All rights reserved. + +===Notice + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- +CLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Notice=== + +6.9 Todd C. Miller + +Copyright (c) 1998 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MER- +CHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CON- +TRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +7. BSD-style license with export notice + +7.1 National Semiconductor Corporation Open Source License for Durango + +(BSD License with Export Notice) + +Copyright (c) 1999-2001 + +National Semiconductor Corporation. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modifica- +tion, are permitted provided that the following conditions are met: + + o Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + o Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the doc- + umentation and/or other materials provided with the distribution. + + o Neither the name of the National Semiconductor Corporation nor the names + of its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE NATIONAL SEMICONDUCTOR CORPORATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEM- +PLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CON- +TRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, INTELLECTUAL PROPERTY +INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFT- +WARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF YOUR +JURISDICTION. It is licensee's responsibility to comply with any export regu- +lations applicable in licensee's jurisdiction. Under CURRENT (2001) U.S. +export regulations this software is eligible for export from the U.S. and can +be downloaded by or otherwise exported or reexported worldwide EXCEPT to U.S. +embargoed destinations which include Cuba, Iraq, Libya, North Korea, Iran, +Syria, Sudan, Afghanistan and any other country to which the U.S. has embar- +goed goods and services. + +8. NVIDIA Corp + +Copyright (c) 1996 NVIDIA, Corp. All rights reserved. + +NOTICE TO USER: The source code is copyrighted under U.S. and international +laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as +design patents pending on the design and interface of the NV chips. Users +and possessors of this source code are hereby granted a nonexclusive, roy- +alty-free copyright and design patent license to use this code in individual +and commercial software. + +Any use of this source code must include, in the user documentation and +internal comments to the code, notices to the end user as follows: + +Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. +and foreign countries. + +NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE +CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WAR- +RANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE +FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAM- +AGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. + +9. SGI Free Software License B Version 1.1 (GLX) + +Note: The definitive and binding form of this license is the form available +from SGI's web site at http://oss.sgi.com/projects/FreeB, and the source code +notices contained in the relevant source files. + +1. Definitions. + +1.1. "Additional Notice Provisions" means such additional provisions as +appear in the Notice in Original Code under the heading "Additional Notice +Provisions." + +1.2. "Covered Code" means the Original Code or Modifications, or any combina- +tion thereof. + +1.3. "Hardware" means any physical device that accepts input, processes +input, stores the results of processing, and/or provides output. + +1.4. "Larger Work" means a work that combines Covered Code or portions +thereof with code not governed by the terms of this License. + +1.5. "Licensable" means having the right to grant, to the maximum extent pos- +sible, whether at the time of the initial grant or subsequently acquired, any +and all of the rights covered herein. + +1.6. "License" means this document. + +1.7. "Licensed Patents" means patent claims Licensable by SGI that are +infringed by the use or sale of Original Code or any Modifications provided +by SGI, or any combination thereof. + +1.8. "Modifications" means any addition to or deletion from the substance or +structure of either the Original Code or any previous Modifications. When +Covered Code is released as a series of files, a Modification is: + + A. Any addition to the contents of a file containing Original code + and/or addition to or deletion from the contents of a file contain- + ing previous Modifications. + + B. Any new file that contains any part of the Original Code or pre- + vious Modifications. + +1.9. "Notice" means any notice in Original Code or Covered Code, as required +by and in compliance with this License. + +1.10. "Original Code" means source code of computer software code that is +described in the source code Notice required by Exhibit A as Original Code, +and updates the error corrections specifically thereto. + +1.11. "Recipient" means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License or a future ver- +sion of this License issued under Section 8. For legal entities, "Recipient" +includes any entity that controls, is controlled by, or is under common con- +trol with Recipient. For purposes of this definition, "control" of an entity +means (a) the power, direct or indirect, to direct or manage such entity, or +(b) ownership of fifty percent (50%) or more of the outstanding shares or +beneficial ownership of such entity. + +1.12. "Recipient Patents" means patent claims Licensable by a Recipient that +are infringed by the use of sale of Original Code or any Modifications pro- +vided by SGI, or any combination thereof. + +1.13. "SGI" means Silicon Graphics, Inc. + +1.14. "SGI Patents" means patent claims Licensable by SGI other than the +Licenses Patents. + +2. License Grant and Restrictions. + +2.1. SGI License Grant. Subject to the terms of this License and any third +party intellectual property claims, for the duration of intellectual property +protections inherent in the Original Code, SGI hereby grants Recipient a +worldwide, royalty-free, non-exclusive license, to do the following: (i) +under copyrights Licensable by SGI, to reproduce, distribute, create deriva- +tive works from, and, to the extent applicable, display and perform the Orig- +inal Code and/or any Modifications provided by SGI alone and/or as part of a +Larger Work; and (ii) under any Licensable Patents, to make, have made, use, +sell, offer for sale, import and/or otherwise transfer the Original Code +and/or any Modifications provided by SGI. Recipient accepts the terms and +conditions of this License by undertaking any of the aforementioned actions. +The patent license shall apply to the Covered Code if, at the time any +related Modification is added, such addition of the Modification causes such +combination to be covered by the Licensed Patents. The patent license in +Section 2.1(ii) shall not apply to any other combinations that include the +Modification. No patent license is provided under SGI Patents for infringe- +ments of SGI Patents by Modifications not provided by SGI or combinations of +Original Code and Modifications not provided by SGI. + +2.2. Recipient License Grant. Subject to the terms of this License and any +third party intellectual property claims, Recipient hereby grants SGI and any +other Recipients a worldwide, royalty-free, non-exclusive license, under any +Recipient Patents, to make, have made, use, sell, offer for sale, import +and/or otherwise transfer the Original Code and/or any Modifications provided +by SGI. + +2.3. No License for Hardware Implementations. The licenses granted in Sec- +tion 2.1 and 2.2 are not applicable to implementation in Hardware of the +algorithms embodied in the Original Code or any Modifications provided by +SGI. + +3. Redistributions + +3.1. Retention of Notice/Copy of License. The Notice set forth in Exhibit A, +below, must be conspicuously retained or included in any and all redistribu- +tions of Covered Code. For distributions of the Covered Code in source form, +the Notice must appear in every file that can include a text comments field; +in executable form, the Notice and a copy of this License must appear in +related documentation or collateral where the Recipient's rights relating to +Covered Code are described. Any Additional Notice Provisions which actually +appears in the Original Code must also be retained or included in any and all +redistributions of Covered Code. + +3.2. Alternative License. Provided that Recipient is in compliance with the +terms of this license, Recipient may, so long as without derogation of any of +SGI's rights in and to the Original Code, distribute the source code and/or +executable version(s) of Covered Code under (1) this License; (2) a license +identical to this License but for only such changes are necessary in order to +clarify Recipient's role as licensor of Modifications; and/or (3) a license +of the Recipient's choosing, containing terms different from this License, +provided that the license terms include this Section 3 and Sections 4, 6, 7, +10, 12, and 13, which terms may not be modified or superseded by any other +terms of such license. If Recipient elects to use any license other than +this License, Recipient must make it absolutely clear that any of its terms +which differ from this License are offered by Recipient alone, and not by +SGI. It is emphasized that this License is a limited license, and regardless +of the license form employed by Recipient in accordance with this Section +3.2, Recipient may relicense only such rights, in Original Code and Modifica- +tions by SGI, as it has actually been granted by SGI in this License. + +3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any liability +incurred by SGI as a result of any alternative license terms Recipient +offers. + +4. Termination. This License and the rights granted hereunder will terminate +automatically if Recipient breaches any term herein and fails to cure such +breach within 30 days thereof. Any sublicense to the Covered Code that is +properly granted shall survive any termination of this License, absent termi- +nation by the terms of such sublicense. Provisions that, but their nature, +must remain in effect beyond the termination of this License, shall survive. + +5. No Trademark Or Other Rights. This License does not grant any rights to: +(i) any software apart from the Covered Code, nor shall any other rights or +licenses not expressly granted hereunder arise by implication, estoppel or +otherwise with respect to the Covered Code; (ii) any trade name, trademark or +service mark whatsoever, including without limitation any related right for +purposes of endorsement or promotion of products derived from the Covered +Code, without prior written permission of SGI; or (iii) any title to or own- +ership of the Original Code, which shall at all times remain with SGI. All +rights in the Original Code not expressly granted under this License are +reserved. + +6. Compliance with Laws; Non-Infringement. There are various worldwide laws, +regulations, and executive orders applicable to dispositions of Covered Code, +including without limitation export, re-export, and import control laws, reg- +ulations, and executive orders, of the U.S. government and other countries, +and Recipient is reminded it is obliged to obey such laws, regulations, and +executive orders. Recipient may not distribute Covered Code that (i) in any +way infringes (directly or contributorily) any intellectual property rights +of any kind of any other person or entity of (ii) breaches any representation +or warranty, express, implied or statutory, to which under any applicable +law, it might be deemed to have been subject. + +7. Claims of Infringement. If Recipient learns of any third party claim that +any disposition of Covered Code and/or functionality wholly or partially +infringes the third party's intellectual property rights, Recipient will +promptly notify SGI of such claim. + +8. Versions of the License. SGI may publish revised and/or new versions of +the License from time to time, each with a distinguishing version number. +Once Covered Code has been published under a particular version of the +License, Recipient may, for the duration of the license, continue to use it +under the terms of that version, or choose to use such Covered Code under the +terms of any subsequent version published bi SGI. Subject to the provisions +of Sections 3 and 4 of this License, only SGI may modify the terms applicable +to Covered Code created under this License. + +9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS AND +IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT LIMITA- +TION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY +QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES +NO RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFT- +WARE PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR +SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL +PART OF THIS LICENSE. N O USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER +EXCEPT SUBJECT TO THIS DISCLAIMER. + +10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY, +WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), +CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHAR- +ACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOP- +PAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER +COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF +THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT +APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLI- +GENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDIC- +TIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL +DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. + +11. Indemnity. Recipient shall be solely responsible for damages arising, +directly or indirectly, out of its utilization of rights under this License. +Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. +from and against any loss, liability, damages, costs or expenses (including +the payment of reasonable attorneys fees) arising out of Recipient's use, +modification, reproduction and distribution of the Covered Code or out of any +representation of warranty made by Recipient. + +12. U.S. Government End Users. The Covered Code is a "commercial item" con- +sisting of "commercial computer software" as such terms are defined in title +48 of the Code of Federal Regulations and all U.S. Government End Users +acquire only the rights set forth in this License and are subject to the +terms of this License. + +13. Miscellaneous. This license represents the complete agreement concerning +the its subject matter. If any provisions of this License is held to be +unenforceable, such provisions shall be reformed so as to achieve as nearly +as possible the same legal and economic effect as the original provision and +the remainder of this License will remain in effect. This License shall be +governed by and construed in accordance with the laws of the United States +and the State of California as applied to agreements entered into and to be +performed entirely within California between California residents. Any liti- +gation relating to this License shall be subject to the exclusive jurisdic- +tion of the Federal Courts of the Northern District of California (or, absent +subject matter jurisdiction in such courts, the courts of the State of Cali- +fornia), with venue lying exclusively in Santa Clara County, California, and +with the losing party responsible for costs, including without limitation, +court costs and reasonable attorney fees and expenses. The application of +the United Nations Convention on Contracts for the International Sale of +Goods is expressly excluded. Any law or regulation that provides that the +language of a contract shall be construed against the drafter shall not apply +to this License. + +Exhibit A + +License Applicability. Except to the extent portions of this file are made +subject to an alternative license as permitted in the SGI Free Software +License B, Version 1.1 (the "License"), the contents of this file are subject +only to the provisions of the License. You may not use this file except in +compliance with the License. You may obtain a copy of the License at Silicon +Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain +View, CA 94043-1351, or at: + +http://oss.sgi.com/projects/FreeB + +Note that, as provided in the License, the Software is distributed on an "AS +IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, +INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MER- +CHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND +NON-INFRINGEMENT. + +Original Code. The Original Code is: OpenGL Sample Implementation, Version +1.2.1, released January 26, 2000, developed by Silicon Graphics, Inc. The +Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. Copyright in +any portions created by third parties is as indicated elsewhere herein. All +Rights Reserved. + +Additional Notice Provisions: The application programming interfaces estab- +lished by SGI in conjunction with the Original Code are The OpenGL(R) Graph- +ics System: A Specification (Version 1.2.1), released April 1, 1999; The +OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, +1998; and OpenGL(R) Graphics with the X Window System(R) (Version 1.3), +released October 19, 1998. This software was created using the OpenGL(R) ver- +sion 1.2.1 Sample Implementation published by SGI, but has not been indepen- +dently verified as being compliant with the OpenGL(R) version 1.2.1 Specifi- +cation. + +10. CID Font Code Public License + +CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License") + +Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI") +hereby grants permission to Recipient (defined below), under SGI's copyrights +in the Original Software (defined below), to use, copy, modify, merge, pub- +lish, distribute, sublicense and/or sell copies of Subject Software (defined +below) in both source code and executable form, and to permit persons to whom +the Subject Software is furnished in accordance with this License to do the +same, subject to all of the following terms and conditions, which Recipient +accepts by engaging in any such use, copying, modifying, merging, publica- +tion, distributing, sublicensing or selling: + +1. Definitions. + + a. "Original Software" means source code of computer software code + that is described in Exhibit A as Original Software. + + b. "Modifications" means any addition to or deletion from the sub- + stance or structure of either the Original Software or any previous + Modifications. When Subject Software is released as a series of + files, a Modification means (i) any addition to or deletion from + the contents of a file containing Original Software or previous + Modifications and (ii) any new file that contains any part of the + Original Code or previous Modifications. + + c. "Subject Software" means the Original Software or Modifications + or the combination of the Original Software and Modifications, or + portions of any of the foregoing. + + d. "Recipient" means an individual or a legal entity exercising + rights under the terms of this License. For legal entities, "Recip- + ient" includes any entity that controls, is controlled by, or is + under common control with Recipient. For purposes of this defini- + tion, "control" of an entity means (i) the power, direct or indi- + rect, to direct or manage such entity, or (ii) ownership of fifty + percent (50%) or more of the outstanding shares or beneficial own- + ership of such entity. + + e. "Required Notice" means the notice set forth in Exhibit A to + this License. + + f. "Accompanying Technology" means any software or other technology + that is not a Modification and that is distributed or made publicly + available by Recipient with the Subject Software. Separate soft- + ware files that do not contain any Original Software or any previ- + ous Modification shall not be deemed a Modification, even if such + software files are aggregated as part of a product, or in any + medium of storage, with any file that does contain Original Soft- + ware or any previous Modification. + +2. License Terms. All distribution of the Subject Software must be made sub- +ject to the terms of this License. A copy of this License and the Required +Notice must be included in any documentation for Subject Software where +Recipient's rights relating to Subject Software and/or any Accompanying Tech- +nology are described. Distributions of Subject Software in source code form +must also include the Required Notice in every file distributed. In addition, +a ReadMe file entitled "Important Legal Notice" must be distributed with each +distribution of one or more files that incorporate Subject Software. That +file must be included with distributions made in both source code and exe- +cutable form. A copy of the License and the Required Notice must be included +in that file. Recipient may distribute Accompanying Technology under a +license of Recipient's choice, which may contain terms different from this +License, provided that (i) Recipient is in compliance with the terms of this +License, (ii) such other license terms do not modify or supersede the terms +of this License as applicable to the Subject Software, (iii) Recipient hereby +indemnifies SGI for any liability incurred by SGI as a result of the distri- +bution of Accompanying Technology or the use of other license terms. + +3. Termination. This License and the rights granted hereunder will terminate +automatically if Recipient fails to comply with terms herein and fails to +cure such breach within 30 days of the breach. Any sublicense to the Subject +Software that is properly granted shall survive any termination of this +License absent termination by the terms of such sublicense. Provisions which, +by their nature, must remain in effect beyond the termination of this License +shall survive. + +4. Trademark Rights. This License does not grant any rights to use any trade +name, trademark or service mark whatsoever. No trade name, trademark or ser- +vice mark of SGI may be used to endorse or promote products derived from or +incorporating any Subject Software without prior written permission of SGI. + +5. No Other Rights. No rights or licenses not expressly granted hereunder +shall arise by implication, estoppel or otherwise. Title to and ownership of +the Original Software at all times remains with SGI. All rights in the Origi- +nal Software not expressly granted under this License are reserved. + +6. Compliance with Laws; Non-Infringement. Recipient shall comply with all +applicable laws and regulations in connection with use and distribution of +the Subject Software, including but not limited to, all export and import +control laws and regulations of the U.S. government and other countries. +Recipient may not distribute Subject Software that (i) in any way infringes +(directly or contributorily) the rights (including patent, copyright, trade +secret, trademark or other intellectual property rights of any kind) of any +other person or entity, or (ii) breaches any representation or warranty, +express, implied or statutory, which under any applicable law it might be +deemed to have been distributed. + +7. Claims of Infringement. If Recipient at any time has knowledge of any one +or more third party claims that reproduction, modification, use, distribu- +tion, import or sale of Subject Software (including particular functionality +or code incorporated in Subject Software) infringes the third party's intel- +lectual property rights, Recipient must place in a well-identified web page +bearing the title "LEGAL" a description of each such claim and a description +of the party making each such claim in sufficient detail that a user of the +Subject Software will know whom to contact regarding the claim. Also, upon +gaining such knowledge of any such claim, Recipient must conspicuously +include the URL for such web page in the Required Notice, and in the text of +any related documentation, license agreement or collateral in which Recipient +describes end user's rights relating to the Subject Software. If Recipient +obtains such knowledge after it makes Subject Software available to any other +person or entity, Recipient shall take other steps (such as notifying appro- +priate mailing lists or newsgroups) reasonably calculated to provide such +knowledge to those who received the Subject Software. + +8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, MER- +CHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO +RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE +PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY SER- +VICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN +ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED +HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, +WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), +CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT +ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND +LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED. + +10. Indemnity. Recipient shall be solely responsible for damages arising, +directly or indirectly, out of its utilization of rights under this License. +Recipient will defend, indemnify and hold SGI and its successors and assigns +harmless from and against any loss, liability, damages, costs or expenses +(including the payment of reasonable attorneys fees) arising out of (Recipi- +ent's use, modification, reproduction and distribution of the Subject Soft- +ware or out of any representation or warranty made by Recipient. + +11. U.S. Government End Users. The Subject Software is a "commercial item" +consisting of "commercial computer software" as such terms are defined in +title 48 of the Code of Federal Regulations and all U.S. Government End Users +acquire only the rights set forth in this License and are subject to the +terms of this License. + +12. Miscellaneous. This License represents the complete agreement concerning +subject matter hereof. If any provision of this License is held to be unen- +forceable by any judicial or administrative authority having proper jurisdic- +tion with respect thereto, such provision shall be reformed so as to achieve +as nearly as possible the same economic effect as the original provision and +the remainder of this License will remain in effect. This License shall be +governed by and construed in accordance with the laws of the United States +and the State of California as applied to agreements entered into and to be +performed entirely within California between California residents. Any liti- +gation relating to this License shall be subject to the exclusive jurisdic- +tion of the Federal Courts of the Northern District of California (or, absent +subject matter jurisdiction in such courts, the courts of the State of Cali- +fornia), with venue lying exclusively in Santa Clara County, California, with +the losing party responsible for costs, including without limitation, court +costs and reasonable attorneys fees and expenses. The application of the +United Nations Convention on Contracts for the International Sale of Goods is +expressly excluded. Any law or regulation that provides that the language of +a contract shall be construed against the drafter shall not apply to this +License. + +Exhibit A + +Copyright (c) 1994-1999 Silicon Graphics, Inc. + +The contents of this file are subject to the CID Font Code Public License +Version 1.0 (the "License"). You may not use this file except in compliance +with the License. You may obtain a copy of the License at Silicon Graphics, +Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 +or at http://www.sgi.com/software/opensource/cid/license.html + +Software distributed under the License is distributed on an "AS IS" basis. +ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED +WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON- +INFRINGEMENT. See the License for the specific language governing rights and +limitations under the License. + +The Original Software (as defined in the License) is CID font code that was +developed by Silicon Graphics, Inc. Those portions of the Subject Software +(as defined in the License) that were created by Silicon Graphics, Inc. are +Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. + +[NOTE: When using this text in connection with Subject Software delivered +solely in object code form, Recipient may replace the words "this file" with +"this software" in both the first and second sentences.] + +11. Bigelow & Holmes Inc and URW++ GmbH Luxi font license + +Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction +code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a regis- +tered trademark of Bigelow & Holmes Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of these Fonts and associated documentation files (the "Font Software"), to +deal in the Font Software, including without limitation the rights to use, +copy, merge, publish, distribute, sublicense, and/or sell copies of the Font +Software, and to permit persons to whom the Font Software is furnished to do +so, subject to the following conditions: + +The above copyright and trademark notices and this permission notice shall be +included in all copies of one or more of the Font Software. + +The Font Software may not be modified, altered, or added to, and in particu- +lar the designs of glyphs or characters in the Fonts may not be modified nor +may additional glyphs or characters be added to the Fonts. This License +becomes null and void when the Fonts or Font Software have been modified. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++ +GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GEN- +ERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFT- +WARE. + +Except as contained in this notice, the names of Bigelow & Holmes Inc. and +URW++ GmbH. shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Font Software without prior written +authorization from Bigelow & Holmes Inc. and URW++ GmbH. + +For further information, contact: + +info@urwpp.de or design@bigelowandholmes.com + +12. FreeType License + +0. Definitions + +Throughout this license, the terms `package', `FreeType Project', and +`FreeType archive' refer to the set of files originally distributed by +the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the +`FreeType Project', be they named as alpha, beta or final release. + +`You' refers to the licensee, or person using the project, where `using' is a +generic term including compiling the project's source code as well as linking +it to form a `program' or `executable'. This program is referred to as `a +program using the FreeType engine'. + +This license applies to all files distributed in the original FreeType +Project, including all source code, binaries and documentation, unless other- +wise stated in the file in its original, unmodified form as distributed in +the original archive. If you are unsure whether or not a particular file is +covered by this license, you must contact us to verify this. + +The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wil- +helm, and Werner Lemberg. All rights reserved except as specified below. + +1. No Warranty + +THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MER- +CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE +OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. + +2. Redistribution + +This license grants a worldwide, royalty-free, perpetual and irrevocable +right and license to use, execute, perform, compile, display, copy, create +derivative works of, distribute and sublicense the FreeType Project (in both +source and object code forms) and derivative works thereof for any purpose; +and to authorize others to exercise some or all of the rights granted herein, +subject to the following conditions: + + o Redistribution of source code must retain the license file (`FTL.TXT') + unaltered; any additions, deletions or changes to the original files + must be clearly indicated in accompanying documentation. The copyright + notices of the unaltered, original files must be preserved in all copies + of source files. + + o Redistribution in binary form must provide a disclaimer that states that + the software is based in part of the work of the FreeType Team, in the + distribution documentation. We also encourage you to put an URL to the + FreeType web page in your documentation, though this isn't mandatory. + +These conditions apply to any software derived from or based on the FreeType +Project, not just the unmodified files. If you use our work, you must +acknowledge us. However, no fee need be paid to us. + +3. Advertising + +Neither the FreeType authors and contributors nor you shall use the name of +the other for commercial, advertising, or promotional purposes without spe- +cific prior written permission. + +We suggest, but do not require, that you use one or more of the following +phrases to refer to this software in your documentation or advertising mate- +rials: `FreeType Project', `FreeType Engine', `FreeType library', or +`FreeType Distribution'. + +As you have not signed this license, you are not required to accept it. How- +ever, as the FreeType Project is copyrighted material, only this license, or +another one contracted with the authors, grants you the right to use, dis- +tribute, and modify it. Therefore, by using, distributing, or modifying the +FreeType Project, you indicate that you understand and accept all the terms +of this license. + +4. Contacts + +There are two mailing lists related to FreeType: + + o freetype@freetype.org + + Discusses general use and applications of FreeType, as well as future + and wanted additions to the library and distribution. If you are + looking for support, start in this list if you haven't found any- + thing to help you in the documentation. + + o devel@freetype.org + + Discusses bugs, as well as engine internals, design issues, specific + licenses, porting, etc. + + o http://www.freetype.org + + Holds the current FreeType web page, which will allow you to download + our latest development version and read online documentation. + +You can also contact us individually at: + +David Turner + +Robert Wilhelm + +Werner Lemberg + +13. Bitstream Vera Fonts Copyright + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream + +Vera is a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated documentation +files (the "Font Software"), to reproduce and distribute the Font Software, +including without limitation the rights to use, copy, merge, publish, dis- +tribute, and/or sell copies of the Font Software, and to permit persons to +whom the Font Software is furnished to do so, subject to the following condi- +tions: + +The above copyright and trademark notices and this permission notice shall be +included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and addi- +tional glyphs or characters may be added to the Fonts, only if the fonts are +renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream Vera" +names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDA- +TION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GEN- +ERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFT- +WARE. + +Except as contained in this notice, the names of Gnome, the Gnome Foundation, +and Bitstream Inc., shall not be used in advertising or otherwise to promote +the sale, use or other dealings in this Font Software without prior written +authorization from the Gnome Foundation or Bitstream Inc., respectively. For +further information, contact: fonts at gnome dot org. + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/LICENSE.sgml,v 1.41 dawes Exp $ + + +$XFree86: xc/LICENSE.txt,v 1.3 2005/03/17 01:11:51 dawes Exp $ Index: xc/README.txt diff -u /dev/null xc/README.txt:1.4 --- /dev/null Wed Mar 16 20:58:22 2005 +++ xc/README.txt Wed Mar 16 20:11:52 2005 @@ -0,0 +1,196 @@ + README for XFree86® 4.5.0 + + The XFree86 Project, Inc + + 16 March 2005 + + Abstract + + XFree86(R) is an Open Source version of the X Window System that + supports many UNIX(R) and UNIX-like operating systems (such as + Linux, FreeBSD, NetBSD, OpenBSD and Solaris) on Intel and other + platforms. This version is compatible with X11R6.6. + +1. What is XFree86 4.5.0? + +XFree86 4.5.0 is the eighth full release in the XFree86 4.x series. + +XFree86 4.x is the current XFree86 release series. The first release in this +series was in early 2000. The core of XFree86 4.x is a modular X server. +The 4.5.0 version is a new release that includes additional hardware support, +functional enhancements and bug fixes. Specific release enhancements can be +viewed in the Release Notes. + +Most modern PC video hardware is supported in XFree86 4.5.0, and most PC +video hardware that isn't supported explicitly can be used with the "vesa" +driver. The Release Notes has a table showing the drivers provided with +XFree86 4.5.0, and links to related documentation. + +XFree86® is produced by The XFree86 Project, Inc through the work of a group +of volunteer independent developers. The XFree86 Project is a non-commercial +organisation and XFree86 would not exist without the invaluable development +contributions of volunteers from around the world. + +XFree86 is a registered trademark of The XFree86 Project, Inc. + +2. Licensing + +XFree86 source code is covered by many licenses. All of these licenses have +in common the fact that they do not impose significant conditions on the mod- +ification or redistribution or either source code or binaries beyond requir- +ing one or more of the following: + + 1. Copyright and/or license notices are left intact. + + 2. Copyright and/or license notices are reproduced verbatim in documenta- + tion accompanying binary distributions. + + 3. Attributions are included with documentation accompanying binaries. + +Most of these licenses are based on the MIT, X Consortium, or BSD (original +and revised) licenses. All of them are consistent with the Open Source Defi- +nition, and most are consistent with the Free Software Foundation's Free +Software Definition. + +Copyright and Licensing information for XFree86, including the reproduction +of copyright and/or license notices and attributions required by some of the +licenses for binary distributions, can be found in the License Document. If +you find any omissions in that document, please contact us with details at +. + +3. Pointers to additional information + +The documentation for this release can be found online at the XFree86 web +site . Documentation for the latest +release version can always be found here , and documentation for the latest pre-release snapshot can be found +here . + +Information about binary distributions and the attendant installation +instructions can be found in the Installation Document. + +The XFree86 version numbering system (including historical information) can +be found in the Versions Document. + +Additional information may be available at the XFree86 web site +, and pointers to other information are avail- +able at the XFree86 support page . + +4. The Public Mailing Lists + +Current information about the XFree86 public mailing lists can be found at +our web site . + +4.1 CVS Commit + +For those who want to see what has been committed recently to our CVS reposi- +tory this is the list that will show you those updates. This list is updated +dynamically every time the repository is updated after the the commit hap- +pens. + +4.2 Devel + +This list is available for discussions about XFree86 development and for fol- +lowing up well-defined bug reports. Many experienced XFree86 developers are +present on this list. + +4.3 XFree86 + +This list is available for any discussions and questions related to XFree86. +Support related questions should be sent here. Many experienced XFree86 +developers monitor this list. + +4.4 Forum + +This list is available for high level discussions about XFree86 and related +technologies, their future, and for inter-project communication. + +5. Contributing to XFree86 + +If you have any new work or enhancements/bug fixes for existing work, please +submit them to or to our bug tracking system +. This will ensure that they are reviewed for +inclusion in future releases. New works should be discussed on our + list prior to submission. + +Current information about the XFree86 development process can be found at our +web site . + +6. How to get XFree86 4.5.0 + +XFree86 4.5.0 can be found at the XFree86 ftp server +, and at mirrors of this +server. Information about obtaining and installing binary distributions of +this release can be found in the Installation Document. Information about +obtaining the release in source form is given below. + +The source for version 4.5.0 is split into seven tarballs: + + XFree86-4.5.0-src-1.tgz + XFree86-4.5.0-src-2.tgz + XFree86-4.5.0-src-3.tgz + XFree86-4.5.0-src-4.tgz + XFree86-4.5.0-src-5.tgz + XFree86-4.5.0-src-6.tgz + XFree86-4.5.0-src-7.tgz + +The first three contain everything except the fonts and general X11 documen- +tation. Those three are sufficient for building XFree86 if you already have +a set of fonts. The fourth and fifth contain the fonts. The sixth contains +the source for the general X11 documentation. The seventh contains the gen- +eral X11 documentation in hardcopy format. + +A source patch relative to version 4.4.0 is also available. Because of its +size, it is split into four parts. The patch files are: + + XFree86-4.4.0-4.5.0.diff1.gz + XFree86-4.4.0-4.5.0.diff2.gz + XFree86-4.4.0-4.5.0.diff3.gz + XFree86-4.4.0-4.5.0.diff4.gz + +There is also a tarball and a cleanup script that handle files that have com- +ponents that can't be included in a diff. These are: + + XFree86-4.4.0-4.5.0-diff0.tgz + XFree86-4.4.0-4.5.0-cleanup.sh + +These patches should be applied to a clean 4.4.0 source tree, working from +the directory containing the xc/ directory. The patches should be applied by +running: + + gzip -d < XFree86-4.4.0-4.5.0.diff1.gz | patch -p0 -E + gzip -d < XFree86-4.4.0-4.5.0.diff2.gz | patch -p0 -E + gzip -d < XFree86-4.4.0-4.5.0.diff3.gz | patch -p0 -E + gzip -d < XFree86-4.4.0-4.5.0.diff4.gz | patch -p0 -E + + sh XFree86-4.4.0-4.5.0-cleanup.sh + gzip -d < XFree86-4.4.0-4.5.0-diff0.tgz | tar vxf - + +To format the XFree86 documentation use the latest version of our doctools +package available from the XFree86 CVS repository's "doctools" module, and +from our ftp site . + +The XFree86 source code for this and all releases/snapshots as well as devel- +opment versions can also be accessed via the XFree86 CVS repository. Infor- +mation about accessing this can be found at the CVS page + on our web site. It's also possible to +browse the XFree86 CVS repository at our CVSWeb server +. The CVS tag for this version is +"xf-4_5_0". The CVS tag for the stable branch for this release is +"xf-4_5-branch". To check out the latest development version, don't specify +any tag. + +7. Reporting Bugs + +Bugs should be reported to . Before reporting bugs, +please check the XFree86 server log file, which can be found at +/var/log/XFree86.0.log on most platforms. If you can't resolve the problem +yourself, send the entire log file with your bug report but not the operating +system core dump. Do not edit the log file as our developers use it to +reproduce and debug your problem. + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml,v 3.148 dawes Exp $ + + +$XFree86: xc/README.txt,v 1.4 2005/03/17 01:11:52 dawes Exp $ Index: xc/RELNOTES diff -u xc/RELNOTES:1.38 xc/RELNOTES:removed --- xc/RELNOTES:1.38 Sat Feb 28 11:37:58 2004 +++ xc/RELNOTES Wed Mar 16 20:58:22 2005 @@ -1,986 +0,0 @@ - Release Notes for XFree86[tm] 4.4.0 - - The XFree86 Project, Inc - - 29 February 2004 - - Abstract - - This document contains information about features and their status - in XFree86 4.4.0. - -1. Introduction to the 4.x Release Series - -XFree86 4.0 was the first official release of the new XFree86 4 series. The -current release (4.4.0) is the latest in that series. XFree86 4 represents a -significant redesign of the XFree86 X server. Not all of the hardware -drivers from 3.3.x have been ported to 4.x yet, but conversely, 4.x has sup- -port for a lot of hardware that is not supported in 3.3.x. Our Driver Status -document summarizes how the hardware driver support compares between 3.3.6 -and 4.4.0. - -XFree86 4.4 introduces an automatic configuration mechanism for the XFree86 -server which makes it now possible to start XFree86 without first creating a -configuration file. The initial automatic configuration support is targeted -towards Linux and FreeBSD and it is hoped that automatic configuration will -be supported on other platforms in future releases. - -If you are running either Linux or FreeBSD, try it out if you do not already -have a working XF86Config file. If you want to customise things afterwards, -you can cut and paste the automatically generated configuration from the -/var/log/XFree86.0.log file into an XF86Config file and make your customisa- -tions there. - -If you do not have any luck with automatic configuration, or you are using a -platform that is not currently supported, try one of the older methods for -getting started. - -XFree86 comes with a graphical configuration tool called "xf86cfg", which -also has a text mode interface and can be used to create an initial configu- -ration file. It can also be used to customise existing configurations. - -Next in the order of configuration preferences is to use the XFree86 server's -ability to create a starting configuration file. Run as root: - - XFree86 -configure - -and follow the instructions. - -Finally, if all else fails, the trusty old standby text-based tool "xf86con- -fig" can also be used for generating X server config files. - -At least one, and hopefully, all of these configuration options will give you -a reasonable starting point for a suitable configuration file. With the -automatic mechanism you might even find that you don't need one! - -If you do need to customise the configuration file, see the XF86Config manual -page. You can also check the driver-specific manual pages and the related -documentation (found at tables below (section 3., page 1) also. - -Before downloading the binary distributions for this release, please have a -quick read through the Installation Document. It may save you some time and -also help you figure out which of the binary releases you need. - -The next section describes what is new in the latest version (4.4.0) compared -with the previous full release (4.3.0). The other sections below describe -some of the new features and changes between 3.3.x and 4.0. There are lot's -of new features, and we definitely don't have enough space to cover them all -here. - -2. Summary of new features in 4.4.0. - -This is a sampling of the new features in XFree86 4.4.0. A more complete -list of changes can be found in the CHANGELOG that is part of the XFree86 -source tree. It can also be viewed online at our CVSweb server -. - -2.1 Video Driver Enhancements - - o Several stability issues with the support for the Intel 830M, 845G, - 852GM, 855GM and 865G integrated graphics chipsets have been fixed. - Some limitations related to the driver's use of the video BIOS remain, - especially for some laptops. - - o The nv driver for NVIDIA cards has been updated as follows: - - o Support added to the nv driver for the GeForce FX 5700, which - didn't work with XFree86 4.3. - - o The driver now does a much better job of auto-detecting which con- - nector of dual output cards the monitor is attached to, and this - should reduce or eliminate the need for manual XF86Config over- - rides. - - o The 2D acceleration for TNT and GeForce has been completely rewrit- - ten and its performance should be substantially improved. - - o TNT and GeForce cards have a new Xv PutImage adaptor which does - scaled YUV bit blits. - - o The SiS driver has seen major updates, including: - - o Support for 661/741/760 and support for 330 (Xabre). - - o Merged Framebuffer mode. - - o Support for DVI, and much more. - - o DRI for 300 series (300/305, 540, 630, 730) is supported again. - - o A new driver for several VIA integrated graphics chipsets has been - added. - - o Various updates and bug fixes have been made to most other drivers. - -2.2 Input Driver Enhancements - - o The mouse driver has some support on Linux and FreeBSD for auto-detect- - ing which device node to use. This makes it unnecessary to supply this - information in the XF86Config file in most cases. - -2.3 IPv6 support - -XFree86 4.4 supports IPv6, based on the code contributed by Sun Microsystems, -Inc. to X.Org. See X.org's document for a detailed list of what these changes are and how -your system is affected by them. - -2.3.1 Protocol names and aliases. - - o tcp is an alias for both IPv6 and IPv4 transports. - - o inet specifies IPv4 only. - - o inet6 specifies IPv6 only. - -You can force the X server to only listen to IPv4 connections with the X --nolisten inet6 command or you can force a IPv6 connection by setting DIS- -PLAY to inet6/host:0. - -2.3.2 XDM - -The IPv6 XDMCP code is not enabled by default on platforms that don't support -binding a IPv6 socket to a IPv4 address. - -The XDM-AUTHORIZATION-1 authentication scheme does not support IPv6 addresses -but a new release of the protocol, XDM-AUTHORIZATION-2 has been designed; -this though is yet to be implemented. By default XFree86 builds do not -enable the XDM-AUTHORIZATION-1 code. - -2.4 X Server and Extension Updates - - o The Mesa version used for OpenGL® 1.3 and DRI driver support has been - updated to 5.0.2. - -2.5 Client and Library Updates - -2.5.1 Xterm - -The user-visible changes to xterm since XFree86 4.3 are: - -Bug Fixes: - - o Make signalInhibit resource work, i.e., disable the menu entries that - would send signals to, or exit xterm. - - o Make cursor definition in tek4014 emulation work as originally imple- - mented. - - o Modify translations for scrollbar so that one can use shifted pageup, - wheel mouse, etc., while the mouse pointer is over the scrollbar. - - o Correct initialization of G1 character set mapping. - -New Features: - - o Modify the predictable version of the generated logfile name to append - the process-id rather than a random value. - - o Modify scroll-back and scroll-forw actions to accept an adjustment - value, e.g., - - scroll-back(1, page-2) - - to scroll back by 2 lines less than a page. - - o Add visualBellDelay resource to modify the length of time used for - visual bell, for very slow displays or very fast computers. - -Improved Locale Support: - - o modify uxterm script to strip modifiers such as "@euro" from the locale - setting before adding ".UTF-8". - - o Add logic to wide-character support which attempts to load fonts speci- - fied by utf8Fonts subresources at startup. The subresources have the - same names as the fonts which they replace, e.g., font, font1, etc., so - that the ISO-10646-1 fonts can be specified in the XTerm app-defaults - file. - - o Improved performance with chinput application. - -Improved Font Handling: - - o Document in xterm's manual page how to use XFree86 ":unscaled" keyword - to suppress scaling of bold fonts. - - o Improved logic for deriving bold fontname from normal fontname. - - o Make double-width characters work with -u8 option. - - o Updated table of Unicode line-drawing characters. - - o Several fixes for rendering using Xft (option -fa): - - o Make height of TrueType fonts match ascent+descent. - - o Translate Unicode values (from UTF-8 output to xterm) for line- - drawing to xterm's internal code, etc., since TrueType fonts gener- - ally do not have either set of line-drawing glyphs. xterm can draw - these directly. - - o Pass 16-bit values rather than 8-bit values to xtermXftDrawString() - to allow for wide-characters. - - o Use built-in line-drawing characters for Xft fonts. - - o Implement underlining. - - o Implement boldMode for wide-characters. - - o Modified to work with CJK double-width (bi-width/monospace) fonts. - -Workarounds for Special Applications: - - o Add option -k8 and resource allowC1Printable to allow users of non-VTxxx - character sets such as KOI-8 to treat the C1 control area (character - codes 128-159) as printable rather than control characters. - - o Add configure option --enable-broken-st and resource brokenStringTerm to - allow user to revert one part of the parsing table corrections. - - o Add configure option --enable-broken-osc and resource brokenLinuxOSC to - accommodate scripts which do not distinguish between running in the - Linux console and running in X. Linux console recognizes malformed con- - trol strings which start with an OSC, but are fixed-length, with no ter- - minator. - - o Add configure option --enable-pty-handshake to allow one to compile-in - support for the pty handshaking logic, and resource ptyHandshake to - enable or disable it. This feature is normally enabled. - -Modified Resources: - - o Change color4 to "dodger blue", since this provides better contrast. - - o Remove color resources from XTerm.ad, leaving them only in XTerm-col.ad - - o Modify UXTerm.ad resource file to include "XTerm-color" rather than - "XTerm", in case the latter file contains no color resource definitions. - - o Changed class of veryBoldColors to VeryBoldColors, since ColorMode is - associated with boolean resources. - - o Changed classes of colorBDMode and similar resources that override col- - ors when a video attribute is set to ColorAttrMode, to make them dis- - tinct from ColorMode. This avoids an unexpected rendering of reverse - video, for example. - -Modified terminfo/termcap entries: - - o Add indp and rin to terminfo entry. - - o Add le to termcap xterm-basic entry. Though missing from older termcaps - for xterm, some applications check for it. - - o Correct AF/AB strings in termcap for xterm-256color and xterm-88color - entries. - -2.6 I18N and Font Updates - - o FreeType2 updated to version 2.1.4. - - o The "freetype" X server font backend has been updated by the After X-TT - Project to include the functionality - previously provided by the "xtt" backend, and to fix some bugs. The - "xtt" backend will be dropped in the next release in favour of the - updated unified "freetype" backend. - - o The new "freetype" backend has the improved "very lazy" metric cal- - culation method which enables super-fast loading of proportional - CJKV fonts. - - o All of the servers, including xfs, Xnest, Xprt, Xvfb, the Cygwin- - XFree86 server (as well as the XFree86 server) can handle the per- - fect TTCap options. - - o The Compose file processing mechanism has been improved and made more - flexible. See the Xlib Compose file support and extensions section - below (section 5.20, page 1). - - o The Bitstream Vera TrueType fonts that Bitstream, Inc donated to the - GNOME Foundation have been included with this release. - -2.7 OS Support Updates - - o On Mac OS X, the appropriate backend drawing code is now dynamically - loaded at runtime which reduces the X server's memory footprint. In - rootless mode, Apple's Xplugin library is used where available. (Xplu- - gin is included as part of Mac OS X on Panther.) With Xplugin, XDarwin - provides identical performance to Apple's X11, including the following - improvements over 4.3: - - o Added direct GLX rendering with thread support. - - o Faster 2-D drawing. - - o Added support for the Apple-WM extension so XDarwin interoperates - with quartz-wm. - - o On Darwin, IOKit mode now uses shadowfb for much faster drawing. - - o Various GNU/Hurd support updates. - - o Experimental support added for GNU/KFreeBSD and GNU/KNetBSD systems. - - o SCO OpenServer support updates. XFree86 4.4 now works on Release 5.0.7 - with Maintenance Pack 1, or on prior releases through Release 5.0.4. - Please consult the README.SCO file for details. - -3. Drivers - -3.1 Video Drivers - -XFree86 4.4.0 includes the following video drivers: - -+--------------+--------------------------+---------------------------------------------+ -|Driver Name | Description | Further Information | -+--------------+--------------------------+---------------------------------------------+ -|apm | Alliance Pro Motion | README.apm | -|ark | Ark Logic | | -|ati | ATI | README.ati, README.r128, r128(4), radeon(4) | -|chips | Chips & Technologies | README.chips, chips(4) | -|cirrus | Cirrus Logic | | -|cyrix (*) | Cyrix MediaGX | README.cyrix | -|fbdev | Linux framebuffer device | fbdev(4) | -|glide | Glide2x (3Dfx) | glide(4) | -|glint | 3Dlabs, TI | glint(4) | -|i128 | Number Nine | README.I128, i128(4) | -|i740 | Intel i740 | README.i740 | -|i810 | Intel i8xx | README.i810, i810(4) | -|imstt | Integrated Micro Solns | | -|mga | Matrox | mga(4) | -|neomagic | NeoMagic | neomagic(4) | -|newport (-) | SGI Newport | README.newport, newport(4) | -|nsc | National Semiconductor | nsc(4) | -|nv | NVIDIA | nv(4) | -|rendition | Rendition | README.rendition, rendition(4) | -|s3 | S3 (not ViRGE or Savage) | | -|s3virge | S3 ViRGE | README.s3virge, s3virge(4) | -|savage | S3 Savage | savage(4) | -|siliconmotion | Silicon Motion | siliconmotion(4) | -|sis | SiS | README.SiS, sis(4) | -|sunbw2 (+) | Sun bw2 | | -|suncg14 (+) | Sun cg14 | | -|suncg3 (+) | Sun cg3 | | -|suncg6 (+) | Sun GX and Turbo GX | | -|sunffb (+) | Sun Creator/3D, Elite 3D | | -|sunleo (+) | Sun Leo (ZX) | | -|suntcx (+) | Sun TCX | | -|tdfx | 3Dfx | tdfx(4) | -|tga | DEC TGA | README.DECtga | -|trident | Trident | trident(4) | -|tseng | Tseng Labs | | -|via | VIA | via(4) | -|vesa | VESA | vesa(4) | -|vga | Generic VGA | vga(4) | -|vmware | VMWare guest OS | vmware(4) | -+--------------+--------------------------+---------------------------------------------+ - -Drivers marked with (*) are present in a preliminary form in this release, -but are not complete and/or stable yet. - -Drivers marked with (+) are for Linux/Sparc only. - -Drivers marked with (-) are for Linux/mips only. - -Darwin/Mac OS X uses IOKit drivers and does not use the module loader drivers -listed above. Further information can be found in README.Darwin. - -XFree86 4.4.0 includes the following input drivers: - -3.2 Input Drivers - - +------------+----------------------------------+---------------------+ - |Driver Name | Description | Further Information | - +------------+----------------------------------+---------------------+ - |aiptek(*) | Aiptek USB tablet | aiptek(4) | - |calcomp | Calcomp | | - |citron | Citron | citron(4) | - |digitaledge | DigitalEdge | | - |dmc | DMC | dmc(4) | - |dynapro | Dynapro | | - |elographics | EloGraphics | | - |fpit | Fujitsu Stylistic Tablet PCs | fpit(4) | - |hyperpen | Aiptek HyperPen 6000 | | - |js_x | JamStudio pentablet | js_x(4) | - |kbd | generic keyboards (alternate) | kbd(4) | - |keyboard | generic keyboards | keyboard(4) | - |microtouch | MicroTouch | | - |mouse | most mouse devices | mouse(4) | - |mutouch | MicroTouch | | - |palmax | Palmax PD1000/PD1100 | palmax(4) | - |penmount | PenMount | | - |spaceorb | SpaceOrb | | - |summa | SummaGraphics | | - |tek4957 | Tektronix 4957 tablet | tek4957(4) | - |ur98(*) | Union Reality UR-F98 headtracker | ur98(4) | - |void | dummy device | void(4) | - |wacom | Wacom tablets | wacom(4) | - +------------+----------------------------------+---------------------+ - -Drivers marked with (*) are available for Linux only. - -4. Known Problems - - o Known issues with this version of the SiS driver: - - o The driver will not work with upcoming laptops/notebooks with - 661/741/760 and 30xLV bridges as regards LCD output. This is due - folks at SiS at the very moment writing an entirely new VBIOS for - such machines whose data layout is not decided yet. (This might - affect machines with 650/740 as well within the next year.) - - o Xv does not work correctly in TV NTSC 1024x768 mode, if the overlay - is very large (or full screen). The effect are flickering lines on - the screen. This is a hardware problem. Do not use this mode for - video. - - o YPbPr 720p output is blurry (at least at 1024x768; unknown for - other modes). This is a driver problem; solution currently unknown. - - o We have received a late report that enabling DPMS support with the - radeon driver can damage some Viewsonic monitors. DPMS is usually dis- - abled by default. You can verify whether or not DPMS is enabled by run- - ning 'xset q' from within your X session. - -5. Overview of XFree86 4.x. - -XFree86 4.x has a single X server binary called XFree86. This binary can -either have one or more video and input drivers linked in statically, or more -usually, dynamically, and in that manner load the video drivers, input -drivers, and other modules that are needed. - -XFree86 4.4.0 has X server support for most UNIX® and UNIX-like operating -systems on Intel/x86 platforms, plus support for Linux and some BSD OSs on -Alpha, PowerPC, IA-64, AMD64, Sparc, and Mips platforms, and for Darwin on -PowerPC. Support for additional architectures and operating systems is in -progress and is planned for future releases. - -5.1 Loader and Modules - -The XFree86 X server has a built-in run-time loader, which can load normal -object files and libraries in most of the commonly used formats. The loader -does not rely on an operating system's native dynamic loader support and it -works on platforms that do not provide this feature. This allows for the -modules to be operating system independent (although not, of course, CPU -architecture independent) which means that a module compiled on Linux/x86 can -be loaded by an X server running on Solaris/x86, or FreeBSD, or even OS/2. - -A main benefit of this, is that when modules are updated, they do not need to -be recompiled for every different operating system. The loader in version -4.4.0 has support for Intel (x86), Alpha and PowerPC platforms. It also has -preliminary support for Sparc platforms. - -The X server makes use of modules for video drivers, X server extensions, -font rasterisers, input device drivers, framebuffer layers (like mfb, cfb, -etc), and internal components used by some drivers (like XAA), - -The module interfaces (both API and ABI) used in this release are subject to -change without notice. While we will attempt to provide backward compatibil- -ity for the module interfaces as of the 4.0 release (meaning that 4.0 modules -will work with future core X server binaries), we cannot guarantee this. -Compatibility in the other direction is explicitly not guaranteed because new -modules may rely on interfaces added in new releases. - -Note about module security - - The XFree86 X server runs with root privileges, i.e. the X server - loadable modules also run with these privileges. For this reason - we recommend that all users be careful to only use loadable modules - from reliable sources, otherwise the introduction of viruses and - contaminated code can occur and wreak havoc on your system. We - hope to have a mechanism for signing/verifying the modules that we - provide available in a future release. - -5.2 Configuration File - -The XFree86 server uses a configuration file as the primary mechanism for -providing configuration and run-time parameters. The configuration file for- -mat is described in detail in the XF86Config(5) manual page. - -The XFree86 server has support for automatically determining an initial con- -figuration on most platforms, as well as support or generating a basic ini- -tial configuration file. - -5.3 Command Line Options - -Command line options can be used to override some default parameters and -parameters provided in the configuration file. These command line options -are described in the XFree86(1) manual page. - -5.4 XAA - -The XFree86 Acceleration Architecture (XAA) was completely rewritten from -scratch for XFree86 4.x. Most drivers implement acceleration by making use -of the XAA module. - -5.5 Multi-head - -Some multi-head configurations are supported in XFree86 4.x, primarily with -multiple PCI/AGP cards. - -One of the main problems is with drivers not sufficiently initialising cards -that were not initialised at boot time. This has been improved somewhat with -the INT10 support that is used by most drivers (which allows secondary card -to be "soft-booted", but in some cases there are other issues that still need -to be resolved. Some combinations can be made to work better by changing -which card is the primary card (either by using a different PCI slot, or by -changing the system BIOS's preference for the primary card). - -5.6 Xinerama - -Xinerama is an X server extension that allows multiple physical screens to -behave as a single screen. With traditional multi-head in X11, windows can- -not span or cross physical screens. Xinerama removes this limitation. Xin- -erama does, however, require that the physical screens all have the same root -depth, so it isn't possible, for example, to use an 8-bit screen together -with a 16-bit screen in Xinerama mode. - -Xinerama is not enabled by default, and can be enabled with the +xinerama -command line option for the X server. - -Xinerama was included with X11R6.4. The version included in XFree86 4.x was -completely rewritten for improved performance and correctness. - -Known problems: - - o Most window managers are not Xinerama-aware, and so some operations like - window placement and resizing might not behave in an ideal way. This is - an issue that needs to be dealt with in the individual window managers, - and isn't specifically an XFree86 problem. - -5.7 DGA version 2 - -DGA 2.0 is included in 4.4.0. Documentation for the client libraries can be -found in the XDGA(3) man page. A good degree of backwards compatibility with -version 1.0 is provided. - -5.8 DDC - -The VESA® Display Data Channel (DDC[tm]) standard allows the monitor to tell -the video card (or on some cases the computer directly) about itself; partic- -ularly the supported screen resolutions and refresh rates. - -Partial or complete DDC support is available in most of the video drivers. -DDC is enabled by default, but can be disabled with a "Device" section entry: -Option "NoDDC". We have support for DDC versions 1 and 2; these can be dis- -abled independently with Option "NoDDC1" and Option "NoDDC2". - -At startup the server prints out DDC information from the display, and can -use this information to set the default monitor parameters, or to warn about -monitor sync limits if those provided in the configuration file don't match -those that are detected. - -5.8.1 Changed behavior caused by DDC. - -Several drivers uses DDC information to set the screen size and pitch. This -can be overridden by explicitly resetting it to the and non-DDC default value -75 with the -dpi 75 command line option for the X server, or by specifying -appropriate screen dimensions with the "DisplaySize" keyword in the "Monitor" -section of the config file. - -5.9 GLX and the Direct Rendering Infrastructure (DRI) - -Direct rendered OpenGL® support is provided for several hardware platforms by -the Direct Rendering Infrastructure (DRI). Further information about DRI can -be found at the DRI Project's web site . The 3D core -rendering component is provided by Mesa . - -5.10 XVideo Extension (Xv) - -The XVideo extension is supported in XFree86 4.x. An XvQueryPortAttributes -function has been added as well as support for XvImages. XvImages are XIm- -ages in alternate color spaces such as YUV and can be passed to the server -through shared memory segments. This allows clients to display YUV data with -high quality hardware scaling and filtering. - -5.11 X Rendering Extension (Render) - -The X Rendering extension provides a 2D rendering model that more closely -matches application demands and hardware capabilities. It provides a render- -ing model derived from Plan 9 based on Porter/Duff image composition rather -than binary raster operations. - -Using simple compositing operators provided by most hardware, Render can draw -anti-aliased text and geometric objects as well as perform translucent image -overlays and other image operations not possible with the core X rendering -system. - -XFree86 4.4.0 provides a partial implementation of Render sufficient for -drawing anti-aliased text and image composition. Still to be implemented are -geometric primitives and affine transformation of images. - -Unlike the core protocol, Render provides no font support for applications, -rather it allows applications to upload glyphs for display on the screen. -This allows the client greater control over text rendering and complete -access to the available font information while still providing hardware -acceleration. The Xft library provides font access for Render applications. - -5.11.1 The Xft Library - -On the client side, the Xft library provides access to fonts for applications -using the FreeType library, version 2. FreeType currently supports Type1 and -TrueType font files, a future release is expected to support BDF and PCF -files as well, so Render applications will have access to the complete range -of fonts available to core applications. One important thing to note is that -Xft uses the vertical size of the monitor to compute accurate pixel sizes for -provided point sizes; if your monitor doesn't provide accurate information -via DDC, you may want to add that information to XF86Config. - -To allow a graceful transition for applications moving from core text render- -ing to the Render extension, Xft can use either core fonts or FreeType and -the Render extension for text. By default, Xft is configured to support both -core fonts and FreeType fonts using the supplied version of FreeType 2. See -the section on FreeType support in Xft for instructions on configuring -XFree86 to use an existing FreeType installation. - -The Xft library uses a configuration file, XftConfig, which contains informa- -tion about which directories contain font files and also provides a sophisti- -cated font aliasing mechanism. Documentation for that file is included in -the Xft(3) man page. - -5.11.2 FreeType support in Xft - -XFree86 4.4.0 includes sources for FreeType version 2.1.4, and, by default, -they are built and installed automatically. - -5.11.3 Application Support For Anti-Aliased Text - -Only three applications have been modified in XFree86 4.4.0 to work with the -Render extension and the Xft and FreeType libraries to provide anti-aliased -text. Xterm, xditview and x11perf. Migration of other applications may -occur in future releases. - -By default, xterm uses core fonts through the standard core API. It has a -command line option and associated resource to direct it to use Xft instead: - - o -fa family / .VT100.faceName: family. Selects the font family to use. - -Xditview will use Xft instead of the core API by default. X11perf includes -tests to measure the performance of text rendered in three ways, anti- -aliased, anti-aliased with sub-pixel sampling and regular chunky text, but -through the Render extension, a path which is currently somewhat slower than -core text. - -5.12 Other extensions - -The XFree86-Misc extension has not been fully ported to the new server archi- -tecture yet. This should be completed in a future release. - -The XFree86-VidModeExtension extension has been updated, and mostly ported to -the new server architecture. The area of mode validation needs further work, -and the extension should be used with care. This extension has support for -changing the gamma setting at run-time, for modes where this is possible. -The xgamma utility makes use of this feature. Compatibility with the 3.3.x -version of the extension is provided. The missing parts of this extension -and some new features should be completed in a future release. - -5.13 xedit - -Xedit has several new features, including: - - o An embedded lisp interpreter that allows easier extension of the editor. - - o Several new syntax highlight modes, and indentation rules for C and - Lisp. - - o Flexible search/replace interface that allows regex matches. - - o Please refer to xedit(1) for more details. - -5.14 Font support - -Details about the font support in XFree86 4.x can be found in the -README.fonts document. - -5.15 TrueType support - -XFree86 4.x comes with two TrueType backends, known as "FreeType" backend -(the "freetype" module) and `X-TrueType' (the "xtt" module). Both of these -backends are based on the FreeType library. The functionality of X-TrueType -has been merged into the FreeType backend by the After X-TT Project for -XFree86 4.4. Consequently, the old X-TrueType backend will be dropped as of -XFree86 4.5. - -5.16 CID font support - -Support for CID-keyed fonts is included in XFree86 4.x. The CID-keyed font -format was designed by Adobe Systems for fonts -with large character sets. The CID-keyed font support in XFree86 was donated -by SGI . See the LICENSE document for a copy of the -CID Font Code Public License. - -5.17 Internationalisation of the scalable font backends - -XFree86 4.x has a ``fontenc'' layer to allow the scalable font backends to -use a common method of font re-encoding. This re-encoding makes it possible -to uses fonts in encodings other than their their native encoding. This -layer is used by the Type1 and Speedo backends and the `xfsft' version of the -TrueType backend. The `X-TrueType' version of the TrueType backend uses a -different re-encoding method based on loadable encoding modules. - -5.18 Large font optimisation - -The glyph metrics array, which all the X clients using a particular font have -access to, is placed in shared memory, so as to reduce redundant memory con- -sumption. For non-local clients, the glyph metrics array is transmitted in a -compressed format. - -5.19 Unicode/ISO 10646 support - -What is included in 4.x: - - o All ``-misc-fixed-*'' BDF fonts are now available in the ISO10646-1 - encoding and cover at least the 614 characters found in ISO - 8859-{1-5,7-10,14,15}, CP1252, and MES-1. The non-bold fonts also cover - all Windows Glyph List 4 (WGL4) characters, including those found in all - 8-bit MS-DOS/Windows code pages. The 8-bit variants of the ``-misc- - fixed-*'' BDF fonts (ISO8859-1, ISO8859-2, KOI8-R, etc.) have all been - automatically generated from the new ISO10646-1 master fonts. - - o Some ``-misc-fixed-*'' BDF ISO10646-1 fonts now cover a comprehensive - Unicode repertoire of over 3000 characters including all Latin, Greek, - Cyrillic, Armenian, Gregorian, Hebrew, IPA, and APL characters, plus - numerous scientific, typographic, technical, and backwards-compatibility - symbols. Some of these fonts also cover Arabic, Ethiopian, Thai, - Han/Kanji, Hangul, full ISO 8859, and more. For the 6x13 font there is - now a 12x13ja Kanji extension and for the 9x18 font there is a 18x18ja - Kanji/Han/Hangul extension, which covers all ISO-2022-JP-2 (RFC 1554) - characters. The 9x18 font can also be used to implement simple combining - characters by accent overstriking. For more information, read Markus - Kuhn's UTF-8 and Unicode FAQ . - - o Mark Leisher's ClearlyU proportional font (similar to Computer Modern). - - o ISO 10646/Unicode UTF-8 Level 1 support added to xterm (enabled with the - -u8 option). - - o Both the xfsft (the "freetype" module) and the X-TrueType (the "xtt" - module) TrueType font backends support Unicode-encoded fonts. - -5.20 Xlib Compose file support and extensions - -A more flexible Compose file processing system was added to Xlib in XFree86 -4.4.0. The compose file is searched for in the following order: - - 1. If the environment variable $XCOMPOSEFILE is set, its value is used as - the name of the Compose file. - - 2. If the user's home directory has a file named ".XCompose", it is used - as the Compose file. - - 3. The old method is used, and the compose file is "//Compose". - -Compose files can now use an "include" instruction. This allows local modi- -fications to be made to existing compose files without including all of the -content directly. For example, the system's iso8859-1 compose file can be -included with a line like this: - - include "/usr/X11R6/lib/X11/locale/iso8859-1/Compose" - -There are two substitutions that can be made in the file name of the include -instruction. %H expands to the user's home directory (the $HOME environment -variable), and %L expands to the name of the locale specific Compose file -(i.e., "//Compose"). - -For example, you can include in your compose file the default Compose file by -using: - - include "%L" - -and then rewrite only the few rules that you need to change. New compose -rules can be added, and previous ones replaced. - -Finally, it is no longer necessary to specify in the right part of a rule a -locale encoded string in addition to the keysym name. If the string is omit- -ted, Xlib figures it out from the keysym according to the current locale. -I.e., if a rule looks like: - - : "\300" Agrave - -the result of the composition is always the letter with the "\300" code. But -if the rule is: - - : Agrave - -the result depends on how Agrave is mapped in the current locale. - -5.21 Luxi fonts from Bigelow and Holmes - -XFree86 now includes the ``Luxi'' family of Type 1 fonts and TrueType fonts. -This family consists of the fonts ``Luxi Serif'', ``Luxi Sans'' and -``Luxi Mono'' in Roman, oblique, bold and bold oblique variants. The True- -Type version have glyphs covering the basic ASCII Unicode range, the Latin 1 -range, as well as the Extended Latin range and some additional punctuation -characters. In particular, these fonts include all the glyphs needed for -ISO 8859 parts 1, 2, 3, 4, 9, 13 and 15, as well as all the glyphs in the -Adobe Standard encoding and the Windows 3.1 character set. - -The glyph coverage of the Type 1 versions is somewhat reduced, and only cov- -ers ISO 8859 parts 1, 2 and 15 as well as the Adobe Standard encoding. - -The Luxi fonts are original designs by Kris Holmes and Charles Bigelow from -Bigelow and Holmes Inc., who developed the Luxi typeface designs in Ikarus -digital format. URW++ Design and Development GmbH converted the Ikarus for- -mat fonts to TrueType and Type 1 font programs and implemented the grid-fit- -ting "hints" and kerning tables in the Luxi fonts. - -The license terms for the Luxi fonts are included in the file `COPYRIGHT.BH', -as well as in the License document. For further information, please contact - or , or consult the URW++ web -site . - -6. Credits - -This section lists the credits for the XFree86 4.4.0 release. For a more -detailed breakdown, refer to the CHANGELOG file in the XFree86 source tree, -the cvs-commit archives , or the 'cvs log' information for individual -source files. - - New Features, Enhancements and Updates: - - IPv6 support: - Alan Coopersmith, Fabio Massimo Di Nitto, Marc Aurele - La France, Matthieu Herrb, David H. Dawes. - - NVIDIA 'nv' driver rewrite: - Mark Vojkovich. - - SiS driver development: - Thomas Winischhofer. - - New VIA video driver: - VIA, Alan Cox, Luc Verhaegen, Thomas Hellström. - - Intel 'i810' driver fixes and stability improvements: - Egbert Eich, David H. Dawes, Christian Zietz - - Improved and more flexible Compose system: - Ivan Pascal. - - Automatic configuration for the XFree86 server: - David H. Dawes. - - Reworked FreeType font backend module: - Chisato Yamauchi and the After X-TT Project. - - Xterm fixes, maintenance and enhancements: - Thomas E. Dickey. - - Mac OS X enhancements: - Torrey T. Lyons, John Harper. - - GNU/Hurd updates and preliminary GNU/KFreeBSD and GNU/KNetBSD - support:" Robert Millan. - - SCO support updates: - Kean Johnston. - - Bitstream Vera fonts: - Bitstream, Inc, and the GNOME Foundation. - - Integration: - - General Integration of Submissions: - Egbert Eich, David H. Dawes, Ivan Pascal, Alan Houri- - hane, Matthieu Herrb. - - DRI Integration: - Alan Hourihane. - - Release Engineering: - David H. Dawes. - - Patches and other submissions (in alphabetical order): - Roi a Torkilsheyggi, Dave Airlie, Andrew Aitchison, Marco Antonio - Alvarez, Alexandr Andreev, Jack Angel, Eric Anholt, Ani, Juuso - Ĺberg, Sergey Babkin, Alexey Baj, Bang Jun-Young, Uberto Barbini, - Matthew W. S. Bell, Vano Beridze, Hiroyuki Bessho, Andrew Bevitt, - Christian Biere, Martin Birgmeier, Jakub Bogusz, Le Hong Boi, - Paul Bolle, Charl Botha, Stanislav Brabec, Eric Branlund, Rob - Braun, Peter Breitenlohner, Michael Breuer, Kevin Brosius, Fred- - erick Bruckman, Oswald Buddenhagen, Nilgün Belma Bugüner, Julian - Cable, Yukun Chen, Ping Cheng, Juliusz Chroboczek, Fred Clift, - Alan Coopersmith, Martin Costabel, Alan Cox, Michel Dänzer, David - Dawes, Leif Delgass, Richard Dengler, John Dennis, Thomas Dickey, - Randy Dunlap, Chris Edgington, Paul Eggert, Paul Elliott, - Emmanuel, Visanu Euarchukiati, Mike Fabian, Rik Faith, Brian - Feldman, Wu Jian Feng, Kevin P. Fleming, Jose Fonseca, Hugues - Fournier, Miguel Freitas, Quentin Garnier, Břrre Gaup, Michael - Geddes, Frank Giessler, Hansruedi Glauser, Wolfram Gloger, - Alexander Gottwald, Guido Guenther, Ralf Habacker, Bruno Haible, - Lindsay Haigh, John Harper, James Harris, Mike A. Harris, Bryan - W. Headley, John Heasley, Thomas Hellström, Matthieu Herrb, - Jonathan Hough, Alan Hourihane, Joel Ray Holveck, Harold L Hunt - II, Ricardo Y. Igarashi, Mutsumi ISHIKAWA , Tsuyoshi ITO, Kean - Johnston, Nicolas JOLY, Phil Jones, Roman Kagan, Theppitak - Karoonboonyanan, Etsushi Kato, Koike Kazuhiko, Aidan Kehoe, Juer- - gen Keil, Andreas Kies, Thomas Klausner, Mario Klebsch, Egmont - Koblinger, Vlatko Kosturjak, Kusanagi Kouichi, Mel Kravitz, Peter - Kunzmann, Nick Kurshev, Mashrab Kuvatov, Marc La France, Radics - Laszlo, Zarick Lau, Nolan Leake, Michel Lespinasse, Noah Levitt, - Dave Love, H.J. Lu, Lubos Lunak, Sven Luther, Torrey T. Lyons, - Calum Mackay, Paul Mackerras, Roland Mainz, Kevin Martin, Michal - Maruska, Kensuke Matsuzaki, maxim, Stephen McCamant, Ferris - McCormick, Luke Mewburn, Nicholas Miell, Robert Millan, Hisashi - MIYASHITA, Gregory Mokhin, Patrik Montgomery, Joe Moss, Josselin - Mouette, Frank Murphy, Reiko Nakajima, Paul Nasrat, Dan Nelson, - Bastien Nocera, Alexandre Oliva, Hideki ONO, Peter Osterlund, - Sergey V. Oudaltsov, Séamus Ó Ciardhuáin, Bob Paauwe, Paul - Pacheco, Tom Pala, Ivan Pascal, T. M. Pederson, Earle F. Phil- - hower III, Nils Philippsen, Manfred Pohler, Alexander Pohoyda, - Alain Poirier, Arnaud Quette, Jim Radford, Dale Rahn, Lucas Cor- - reia Villa Real, René Rebe, Tyler Retzlaff, Sebastian Rittau, Tim - Roberts, Alastair M. Robinson, Branden Robinson, Daniel Rock, Ian - Romanick, Bernhard Rosenkraenzer, Mĺns Rullgĺrd, Andriy Rysin, - Supphachoke Santiwichaya, Pablo Saratxaga, Matthias Scheler, Jens - Schweikhardt, Danilo Segan, Shantonu Sen, Stas Sergeev, Jungshik - Shin, Nikola Smolenski, Andreas Stenglein, Paul Stewart, Alexan- - der Stohr, Alan Strohm, Will Styles, James Su, Mike Sulivan, - Ville Syrjala, Slava Sysoltsev, Akira TAGOH, Toshimitsu Tanaka, - Akira Taniguchi, Owen Taylor, Neil Terry, Jonathan Thambidurai, - John Tillman, Adam Tlalka, Linus Torvalds, Christian Tosta, War- - ren Turkal, Stephen J. Turnbull, Ted Unangst, Mike Urban, Simon - Vallet, Thuraiappah Vaseeharan, Luc Verhaegen, Yann Vernier, - Michail Vidiassov, Sebastiano Vigna, Mark Vojkovich, Stephane - Voltz, Boris Weissman, Keith Whitwell, Thomas Winischhofer, Eric - Wittry, Kim Woelders, Roy Wood, Jason L. Wright, Joerg Wunsch, - Chisato Yamauchi, Hui Yu. - - Docbook/XML conversion: - John Himpel and the XFree86 documentation team. - - Webmaster: - Georgina O. Economou - - Hosting: - Internet Systems Consortium, Inc . - -7. Attributions/Acknowledgements - -This product includes software developed by The XFree86 Project, Inc -(http://www.xfree86.org/) and its contributors. - -This produce includes software that is based in part of the work of the -FreeType Team (http://www.freetype.org). - -This product includes software developed by the University of California, -Berkeley and its contributors. - -This product includes software developed by Christopher G. Demetriou. - -This product includes software developed by the NetBSD Foundation, Inc. and -its contributors - -This product includes software developed by X-Oz Technologies (http://www.x- -oz.com/). - - Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/RELNOTES.sgml,v 1.116 dawes Exp $ - - -$XFree86: xc/RELNOTES,v 1.38 2004/02/28 16:37:58 dawes Exp $ Index: xc/RELNOTES-X.org diff -u xc/RELNOTES-X.org:1.4 xc/RELNOTES-X.org:removed --- xc/RELNOTES-X.org:1.4 Fri Dec 21 16:00:06 2001 +++ xc/RELNOTES-X.org Wed Mar 16 20:58:22 2005 @@ -1,553 +0,0 @@ - - - - - - - - - - X Window System, Version 11 - - Release 6.6 - - Release Notes - - - - - - - - - - - - - - April 4, 2001 - - - - - - - -Copyright (C) 1999,2000,2001 Compaq Computer Corporation -Copyright (C) 1999,2000,2001 Hewlett-Packard Company -Copyright (C) 1999,2000,2001 IBM Corporation -Copyright (C) 1999,2000,2001 Hummingbird Communications Ltd. -Copyright (C) 1999,2000,2001 Silicon Graphics, Inc. -Copyright (C) 1999,2000,2001 Sun Microsystems, Inc. -Copyright (C) 1999,2000,2001 The Open Group - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Soft- -ware"), to deal in the Software without restriction, including without -limitation the rights to use, copy, modify, merge, publish, distribute, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, provided that the above copyright -notice(s) and this permission notice appear in all copies of the Soft- -ware and that both the above copyright notice(s) and this permission -notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- -ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY -RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN -THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- -QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- -MANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization of -the copyright holder. - -X Window System is a trademark of The Open Group. - - - -1. Introductory Note - -This document is the release notes that were provided with X.Org's -X11R6.6 release. The XFree86-specific information in this document is -out of date. The XFree86-specific documentation can be found in the -xc/programs/Xserver/hw/xfree86/doc directory, and on-line at -http://www.xfree86.org/current/. - - -2. What Is X11 - - -X11, or X, is a vendor-neutral, system-architecture neutral network- -transparent window system and user interface standard. In other words -it's windows for UNIX. But X is not just for UNIX -- X runs on a wide -range of computing and graphics machines including Macintosh, OS/2, -Microsoft's MS-Windows family of operating systems, and almost all of -the so-called Network Computers. X can use your network -- you may run -CPU-intensive programs on high powered workstations and display the user -interface (the windows) on inexpensive desktop machines. - - -3. What is Release 6.6 - - -Release 6.6 (R6.6) is The X.Org Group's update to its Release 6.5.1 -patch 1 and all prior releases. It is compatible with with all releases -going back to R1 at both the source and protocol levels. - - -The X Consortium was an independent, not-for-profit membership corpora- -tion formed in 1993 as the successor to the MIT X Consortium. It was -dissolved at the end of 1996 and all assets such as trademarks and copy- -rights were transferred to The Open Group. The Open Group's X Project -Team was formed to continue maintenance and development of X. The X -Project Team was disbanded after Release 6.4 patch 3. - -X.Org has employed the services of a third party contractor to establish -a CVS repository of the source and a web-based interface for submit- -ting/viewing bug reports. The CVS repository and web-based interface are -available to X.Org members. The contractor has been chartered to pro- -vide quarterly update releases to the X source. - -Membership information for X.Org may be found at: - http://www.x.org/members.htm. - -This X.Org release addresses a portion of the backlog of bug reports -since Release 6.4 patch 3, along with additional fixes from the Xfree86 -community. - -Instructions for building and installing R6.6 can be found in the file -INSTALL.TXT (INSTALL-X.org), available separately and also contained in -the release. - - -4. Overview of the X.Org Release - - -Like all the releases that preceded it, R6.6 is a source code release. -In order to use the release it is necessary to first unpack the distri- -bution, compile it, and then install it. The source contains the follow- -ing items: - - - Documentation - Sample implementations - Fonts and bitmaps - Utility libraries - Programs - - - -5. Supported Operating Systems - - -This release was built and tested on the following reference platforms: - - - Compaq Tru64 UNIX V5.0 - HPUX 10.20 - Solaris 7.0 - - - - -6. Supported Graphics Devices - - -This release includes the necessary device-dependent support to build a -native X server for the following platforms: - - - HP-UX: Xhp - Compaq Tru64 UNIX: Xdec on DECstation 3000/400 (Alpha) with PMAG-B - SunOS/Solaris: Xsun -- see the Xsun man page for supported cards - XFree86: See the XF_* man pages for supported cards - -In addition to the above, the Xvfb and Xnest servers can be built on all -platforms. - -Native X servers are not built on AIX, Fujitsu UXP, IRIX, or Microsoft -Windows NT. - - -7. The Source Tree - - -The source is distributed in UNIX tar files. The source unpacks from the -tar files into a source tree, and the name of the base directory of the -source tree is xc. The name xc as the base of the source tree has been -retained from the X Consortium releases. - -The general layout under xc/ is as follows: - - -config/ imake config files, imake, makedepend, etc. -doc/ all documentation other than per-program manual pages -fonts/ BDF, Speedo, Type1 fonts -include/ common include files -lib/ libraries -nls/ national language support files -programs/ all programs, including the X server and rgb, -util/ patch, compress, other utilities -bug-report bug reporting template -registry X Registry - - - -8. X Registry - - -A registry of certain X-related items is maintained to aid in avoiding -conflicts and to aid in sharing of such items. The registry is in the -file xc/registry. - - -9. Extensions Supported - - -Release 6.6 includes source for the following extensions: BIG-REQUESTS, -DOUBLE-BUFFER, DPMS, Extended-Visual-Information, LBX, MIT-SHM, MIT- -SUNDRY-NONSTANDARD, Multi-Buffering, RECORD, SECURITY, SHAPE, SYNC, TOG- -CUP, X3D-PEX, XC-APPGROUP, XC-MISC, XFree86-VidModeExtension, XIE (X -Image Extension), XINERAMA. XInputExtension, XKEYBOARD, XpExtension -(printing), XTEST, and XTestExtension1, - -Not all of these extensions are standard; see the Standards manual page. -Some of these extensions may not be supported on every platform. - - -10. Implementation Dependent Parameters - - -Some of the specifications define some behavior as implementation-depen- -dent. Implementations must document how those parameters are imple- -mented. - - -The default values in this release of the implementation dependent -parameters are: - - -XFILESEARCHPATH default: - This default can be set at build time by setting the imake vari- - ables XFileSearchPathDefault, XAppLoadDir, XFileSearchPathBase, and - ProjectRoot in xc/config/cf/site.def. See xc/config/cf/README for - instructions and xc/config/cf/X11.tmpl for details of how these - configuration variables are used. - - By default the imake variable ProjectRoot is /usr/X11R6.6 and - XFILESEARCHPATH has these components: - - $ProjectRoot/lib/X11/%L/%T/%N%C%S - $ProjectRoot/lib/X11/%l/%T/%N%C%S - $ProjectRoot/lib/X11/%T/%N%C%S - $ProjectRoot/lib/X11/%L/%T/%N%S - $ProjectRoot/lib/X11/%l/%T/%N%S - $ProjectRoot/lib/X11/%T/%N%S - - - -XUSERFILESEARCHPATH default: - If the environment variable XAPPLRESDIR is defined, the default - value of XUSERFILESEARCHPATH has the following components: - - $XAPPLRESDIR/%L/%N%C - $XAPPLRESDIR/%l/%N%C - $XAPPLRESDIR/%N%C - $HOME/%N%C - $XAPPLRESDIR/%L/%N - $XAPPLRESDIR/%l/%N - $XAPPLRESDIR/%N - $HOME/%N - - Otherwise it has these components: - - $HOME/%L/%N%C - $HOME/%l/%N%C - $HOME/%N%C - $HOME/%L/%N - $HOME/%l/%N - $HOME/%N - - - -XKEYSYMDB default: - Defaults to $ProjectRoot/lib/X11/XKeysymDB. - - -XCMSDB default: - Defaults to $ProjectRoot/lib/X11/Xcms.txt. - - -XLOCALEDIR default: - Defaults to the directory $ProjectRoot/lib/X11/locale. The XLO- - CALEDIR variable can contain multiple colon-separated pathnames. - - -XErrorDB location - The Xlib error database file is $ProjectRoot/lib/X11/XErrorDB. - - -XtErrorDB location - The Xt error database file is $ProjectRoot/lib/X11/XtErrorDB. - - -Supported Locales - Locales supported by this implementation are in xc/nls/locale.dir. - The mapping between various system locale names and X locale names - is in xc/nls/locale.alias. Both files are installed in the default - XLOCALEDIR directory, i.e. $ProjectRoot/lib/X11/locale/). - - -Supported Input Methods - This distribution does not include source for any input method - servers; however Xlib supplies a default built-in input method that - supports compose processing in 8-bit locales. Compose files are - provided for Latin-1 and Latin-2. The built-in input method can - support other locales, given suitable compose files. See - xc/nls/Compose/iso8859-* for the supported compositions. - -The Input Method Server Development Kit (IMdkit) is at -ftp://ftp.x.org/pub/unsupported/lib/IMdkit/. - - -11. What is Unchanged in Release 6.6 - - -As this is an update release, there is a great deal of stability in the -standards, libraries, and clients. No existing standards have changed in -a material way. All previous interfaces are unchanged. - - -12. New OS Support - - -The following table shows the versions of the operating systems that -were used to develop this and prior releases: - - -System R6 R6.1 R6.[23] R6.4 R6.5R6.6 - -AIX 3.2.5 4.1.4 4.2 4.2 - - -A/UX 3.0.1 - - - - - -BSD/386 1.0 - - - - - -Compaq Tru64 UNIX 1.0/1.3 3.2C 4.0A4.0A5.0 -FreeBSD - 2.1.0 2.1.6 2.2.2 - - -Fujitsu UXP - - - V20L10 - -HP-UX 9.1 10.01 10.01 10.20 10.20 10.20 -IRIX 5.2 5.3 6.2 6.2 - - -Linux (kernel) -Slackware 2.3 - 1.2.11 - - - -Slackware 3.1 - - 2.0 - - -S.u.S.E. 5.0 - - - 2.0.30 - -Mach 2.5 - - - - - -NEWS-OS 6.0 - - - - - -Solaris 2.3 2.4 2.5 2.5 7.0 7.0 -SunOS 4.1.3 4.1.3 4.1.4 4.1.4 - - -Ultrix-32 4.3 4.4 - - - - -UNICOS 8.0 - - - - - -Unixware SVR4.2 1.0 2.02 2.02 - - -Windows NT 3.1 3.5 4.0 3.51 - - - - -13. Easy Resource Configuration - - -Setting and changing resources in X applications can be difficult for -both the application programmer and the end user. Resource Configura- -tion Management (RCM) addresses this problem by changing the X Intrin- -sics to immediately modify a resource for a specified widget and each -child widget in the hierarchy. In this context, immediate means: no -sourcing of a resource file is required; the application does not need -to be restarted for the new resource values to take effect; and the -change occurs immediately. - -The main difference between RCM and the Editres protocol is that the RCM -customizing hooks reside in the Intrinsics and thus are linked with -other toolkits such as Motif and the Athena widgets. However, the -EditRes protocol requires the application to link with the EditRes rou- -tines in the Xmu library and Xmu is not used by all applications that -use Motif. - -Easy Resource Configuration is not a standard part of the X Toolkit -Intrinsics (libXt). It is neither an X Consortium standard nor an X Pro- -ject Team specification. - - -14. ANSIfication - - -R6.1 was officially the last release that supported traditional K&R C. -Like all releases since R6.3, R6.6 assumes a Standard C compiler and -environment. We have not intentionally removed any K&R C support from -old code, and most of the release will continue to build on platforms -without an ANSI C compiler. - - -15. VSW5 - - -We have tested this release with VSW5 version 5.1.1A. This release -passes all tests in VSW5 with the following exceptions: - -o tests for which a permanent waiver has been granted. - -o tests for which a temporary waiver have been granted. - -o tests where a defect in the test has been identified and reported. - -VSW licensees may obtain a list of waivers granted from -http://www.rdg.opengroup.org/interpretations/database/. - - -16. XtAppPeekEvent() behavior - Environment variable no longer needed - - -XtAppPeekEvent() has been modified in R6.5.1 to behave as it is docu- -mented in the Xt spec. Certain applications, including Netscape, did -not work properly with these modifications, so the routine was changed -so that users could set the XTAPPPEEKEVENT_SKIPTIMER environment vari- -able in order to make XtAppPeekEvent() behave as it did prior to R6.5.1. - -In R6.6, the routine has been changed so that there is no need to set -the environment variable. Timers are handled as specified by the spec, -but Netscape and other applications now work properly without the envi- -ronment variable. In R6.6, the XTAPPPEEKEVENT_SKIPTIMER variable is -ignored, and users may unset it if they were using it in R6.5.1. - - -17. Year 2000 (Y2K) Compliance - - -For a statement of compliance see http://www.camb.open- -group.org/tech/desktop/faq/y2k.htm - - -18. Security Considerations - - -On UNIX and similar operating systems there are serious security impli- -cations associated with running suid-root programs. - -By default the xterm terminal emulation program is installed suid-root -in order to be able to update utmp or utmpx entries. All the known (as -of this writing) exploitable security holes in the X libraries have been -eliminated -- making it theoretically safe for xterm to be suid-root. -For additional security you may install xterm without suid-root; however -if you do, xterm will not be able to make utmp or utmpx entries. - -On many Intel-based machines the X server must have root privileges in -order to access the graphics card and open other devices. The easiest -way to grant the requisite privileges is to use xdm to run your X -server. Some people, who prefer not to use xdm, often work around the -need for the X server to run with root privileges by making their X -server a suid-root program. While all the known (as of this writing) -exploitable security holes in the server have been eliminated, it is -still recommended that you not make your X server suid-root. There are -safe suid-root wrapper programs available (but not in this release) that -you can use to start your server if you don't want to use xdm. - - -19. Filing Bug Reports - - -If you find a reproducible bug in software built from the source in this -distribution or find bugs in its documentation, please complete a bug- -report using the form in the file xc/bug-report and send it to: - - mailto:xbugs@x.org - - -Please try to provide all of the information requested on the form if it -is applicable; the little extra time you spend on the report will make -it much easier for someone to reproduce, find, and fix the bug. - -Bugs in the contributed software that is available on the net are not -handled on any official basis. Consult the documentation for the indi- -vidual software to see where (if anywhere) to report the bug. - - -20. Acknowledgements - - -The following individuals served as X.Org representatives for their -respective companies. These companies are Executive Members of X.Org. - - -Paul Anderson of Hewlett-Packard. - - -Heather Lanigan of Compaq. - - -Danny Masci of Hummingbird. - - -Dan McNichol of IBM. - - -Richard Offer of SGI. - - -Steve Swales of Sun Microsystems, Inc. - - -The following individuals contributed significantly to the development -of X11R6.6, in the form of code, testing, and support. - - -Stuart Anderson of Metro Link, Inc. - - -Robert W. Boone of Metro Link, Inc. - - -Alan Coopersmith of Sun Microsystems, Inc. - - -Glen Cornell of Metro Link, Inc. - - -Ernie Coskrey of Metro Link, Inc. - - -Gudrun Enger of Metro Link, Inc. - - -Gemma Exton of Adacel Technologies Limited. - - -Jay Hobson of Sun Microsystems, Inc. - - -Steve McClure of Metro Link, Inc. - - -Scott McDonald of Metro Link, Inc. - - -Andrew Miller of Marconi Corporation. - - -Quentin Neill of Metro Link, Inc. - - -Keith Packard of The XFree86 Project. - - -Simon Pickup of Adacel Technologies Limited. - - -Paul Shearer of IBM. - - -Hidetoshi Tajima of Sun Microsystems, Inc. - - Index: xc/RELNOTES.txt diff -u /dev/null xc/RELNOTES.txt:1.4 --- /dev/null Wed Mar 16 20:58:22 2005 +++ xc/RELNOTES.txt Wed Mar 16 20:11:52 2005 @@ -0,0 +1,1387 @@ + Release Notes for XFree86® 4.5.0 + + The XFree86 Project, Inc + + 16 March 2005 + + Abstract + + This document contains information about the various features and + their current status in the XFree86 4.5.0 release. + +1. Introduction to the 4.x Release Series + +XFree86 4.0 was the first official release of the XFree86 4 series. The cur- +rent release (4.5.0) is the latest in that series. The XFree86 4.x series +represents a significant redesign of the XFree86 X server, with a strong +focus on modularity and configurability. + +2. Configuration: a Quick Synopsis + +Automatic configuration was introduced with XFree86 4.4.0 which makes it pos- +sible to start XFree86 without first creating a configuration file. This was +further improved in XFree86 4.5.0. + +While the initial automatic configuration support was originally targeted ust +for Linux and the FreeBSD variants, in 4.5.0 it now includes Solaris, NetBSD +and OpenBSD support, and it is planned that automatic configuration will be +supported on other platforms in future releases. + +If you are running either Linux, FreeBSD, NetBSD, OpenBSD, or Solaris, try +Auto Configuration by running: + + XFree86 -autoconfig + +If you want to customise some things afterwards, you can cut and paste the +automatically generated configuration from the /var/log/XFree86.0.log file +into an XF86Config file and make your customisations there. If you need to +customise some parts of the configuration while leaving others to be automat- +ically detected, you can combine a partial static configuration with the +automatically detected one by running: + + XFree86 -appendauto + +If you using a platform that is not currently supported, then you must try +one of the older methods for getting started like xf86cfg", which is our +graphical configuration tool. It also has a text mode interface that an be +used to create an initial configuration file and customise existing configu- +rations. + +After that, you can use XFree86 server's ability to create a starting config- +uration file. To do so you must login as root, and run: + + XFree86 -configure + +and then follow the instructions. + +Finally, if all else fails, the trusty old standby text-based tool "xf86con- +fig" can also be used for generating X server config files. + +Hopefully, at least one, and perhaps all of these various configuration +options will give you a reasonable starting point for a suitable configura- +tion file but we think that with the automatic mechanism you will probably +not need any. + +If you would like to customise the configuration file, see the XF86Config +manual page. You should also check the driver-specific manual pages and the +related documentation, which is found at tables below (section 4., page 1). + +Before downloading any of the binary distributions for this release, read +through the Installation Document as it can point out which particular binary +you should download. + +The next section describes what is new in the latest version (4.5.0) compared +with the previous full release (4.4.0). There are many new features in this +release and we unfortunately do not have enough space to cover them all here. + +3. Summary of new features in 4.5.0. + +This is a sampling of the new features in XFree86 4.5.0. A more complete +list of changes can be found in the CHANGELOG that is part of the XFree86 +source tree. It can also be viewed online at our CVSweb server +. + +3.1 Security Updates + +The following security issues have been fixed in this release: + + o xdm would listen on a random socket when the DisplayManager.requestPort + resource was set to 0 (CAN-2004-0419 ). + + o Integer overflow in libICE/libSM. + + o libXpm stack and integer overflow and other issues (CAN-2004-0687 + , + CAN-2004-0688 , CAN-2004-0914 + , + CAN-2005-0605 ). + + o Potential security issues related to wrap-around of memory allocation + requests in font handling and other areas. + +3.2 Video Driver Enhancements + +3.2.1 General + + o In most drivers, fix a long-standing off-by-one error in the programming + of sync pulse start and end for video modes based on VGA or its exten- + sions. + +3.2.2 ati + + o Fix various bugs in the Mach64-based panel support. + + o Re-instate atimisc's support for DGA on UltraSPARC platforms. + +3.2.3 chips + + o Fix the stretching option and centering. + +3.2.4 cirrus + + o Add support for the NEC PC-9821 with CLGD755x. + +3.2.5 i810 + + o Add support for memory size tweaking in the BIOS for 845G. + + o Fix Xv flickering on the 830GM and later. + + o Add support for the 915G/915GM chipsets. + + o Add dual-head and clone support for the 915G, 855GM, 830GM chipsets. + + o Add ARGB cursor support for all chipsets. This requires an updated agp- + gart kernel driver. + + o Add module lid status checking. + + o Fix XVideo when high resolutions are used on local flat panels. + + o Add PanelID identification. + + o Detect monitor changes on VT switch (830GM and up). + + o Support custom video modes in the video BIOS, when available. + + o Fix some Xv bugs. + + o Set the default monitor parameters to match the display size for the + 830GM and up when they are not available from another source, improving + the default video mode selection in these cases. + +3.2.6 mga + + o Make the Mystique lockup workaround more selective, avoiding different + problems on cards that do not require the workaround. + + o Fix segfaults that occur when the XaaNoSolidFillRect and/or + XaaNoMono8x8PatternFillRect options are used. + + o Fix for Xv resolution loss problem. + + o Add i2c and Maven support, providing DDC and DPMS support for the second + head on dual-head cards. + +3.2.7 nv + + o PCI-Xpress support added. + + o Add support for newer hardware. + + o Workaround for Toshiba M30 laptop issue. + + o Reject modes larger than the flat panel. + + o DPMS support for DVI added. + + o Cursor update for NV11 so that alpha blended cursors will work in con- + junction with dithering (laptop panels). + +3.2.8 r128 + + o Improve the handling of timeouts in R128CCEWaitForIdle() + +3.2.9 radeon + + o The DAC is turned off for DPMS modes, fixing a problem that can badly + affect some monitors. + + o Add an option for avoid flickering and blank screen problems with + iBooks. + +3.2.10 rendition + + o Fix bad free() calls in the probe function. + +3.2.11 s3 + + o Add support for interlaced video modes. + + o Remove cfb support. + + o Correct the depth checking (32 is not a supported depth). + + o Fix DAC probing. + + o Add IBM RGB525 support. + + o Fix a ScreenToScreenCopy bug that shows up with xtest. + +3.2.12 s3virge + + o Fix a bug that shows up when mode restoration results in a switch + between colour and mono operation. + +3.2.13 savage + + o Fix HW cursor state on VT switching. + + o Disable the RANDR extension when using rotation. + + o Turn off the back light on panels when DPMS "off" mode is activated. + + o Allow black as an Xv colour key. + +3.2.14 sis + + o Fix some modes for 1400x1050 and 1600x1200 panels. + + o BIOS data layout-related fixes for 661/741/760. + + o Xv fixes. + + o Fix LCD support for ECS A90x and ECS A907. + + o Add video blitter as a second Xv adaptor for the M650/651 and later. + + o Add (display?) hot plug support. + + o Add preliminary support for the SiS340. + + o Fix bad external symbols in this driver module. + +3.2.15 sunffb + + o Fix a segfault when acceleration is disabled. + +3.2.16 vesa + + o Do not attempt to set the palette format for depths greater than 8. + This fixes a problem on some platforms. + + o Fix a substantial memory leak on server regeneration. + + o Fix screen blanking for non-VGA compatible modes. + + o Blank the screen at startup, so that the contents of the previous ses- + sion are not initially visible. + +3.2.17 via + + o Restructuring and acceleration cleanups. + + o Fix some DRM-related problems. + + o Cleanup the DDC/EDID retrieval. + +3.2.18 vmware + + o Various register state save/restore fixes. + + o Fix host-cursor mode. + + o Allow any reasonable depth if 8BIT_EMULATION is set, supporting non-host + depths. + + o Set the "monitor" parameters to allow the default resolution to be a + little smaller than the host resolution rather than simply 640x480. + +3.3 Input Driver Enhancements + +3.3.1 keyboard + + o A bug in the application of the Linux KDKBDREP ioctl has been fixed, + preventing unnecessary use of a fallback that directly programs the key- + board hardware and produces warning message with recent Linux kernels. + + o Differentiate between Alt+Ctrl+SPECIAL and Alt+Ctrl+Shift+SPECIAL key + sequences. + + o Avoid various keycode conversions on NEC PC-98 platforms. + + o Fix off-by-one problem for keys on FreeBSD/sparc64. + +3.3.2 mouse + + o Add a serial PNP entry for the Genius NetScroll+ mouse. + + o Fix a problem with the wsmouse driver losing events on 64-bit architec- + tures. + + o Add/improve protocol and device auto-detection for FreeBSD, Linux, + NetBSD, OpenBSD, and SunOS/Solaris, eliminating the need to provide any + of this information in the config file in the majority of situations. + + o Increase the maximum number of buttons supported from 12 to 24. + + o Fix a multiple-free bug, that could lead to a crash. + +3.3.3 elographics + + o Fix problems where the driver gets out of sync under heavy loads. + + o Add an "AllowNoCntl" option, which allows the driver to be used with + some other protocols, like the SmartSet 2500s, which share the same + default protocol. + + o Fix a problem with the cursor not correctly following the touch in a + dual-head configuration. This fix has also been applied to other rele- + vant input drivers. + +3.3.4 eloinput + + o A new driver for ELO Graphics 2500U USB touch screens. + +3.3.5 fpit + + o Add support for the passive pen of the Stylistic 2400. + + o Fix some driver bugs. + +3.4 XKB updates + + o Update the Hindi/Devanagari map. + + o Add Sorbian map. + + o Add German Dvorak map. + + o Fix wrong brokenbar keysym in the de_CH map. + + o Rename the microsoftprose keyboard model to microsoftprousb because it + is not Swedish-specific but a common USB variant. + + o Add nodeadkeys variant to the gb map. + + o Replace the comma keysym on the KPDL key in the Brazilian map with + KP_Separator. + + o Add multi-layout compatible Hungarian, Azerbaijani, Canadian, Mongolian, + and Vietnamese maps. + + o Update Serbian map with new variant. + + o Add Genius KB-12e model to the inet map. + + o Update ABNT2 geometry (including two variants) and change the Brazilian + map to avoid ABNT2 specific keycodes section. + + o Add Classical Latin map. + + o Replace the Latvian map with a new one. + + o Fix some errors in the Dzongka/Tibetan map. + + o Add ur_PK (Urdu) map. + + o Fixes for the Bengali map. + + o Add Sinhala (Sri Lanka) map. + + o Add missing keycode to the "xfree86" keycodes files. + + o Update the mapping for the Microsoft Natural Multimedia keyboard. + + o Fixes for the Croatian map. + + o Add a Polish variant to the French keyboard layout. + + o Add a standard Kyrgyz map. + +3.5 X Server and Extension Updates + + o Mesa as used in the XFree86 "GLcore" module for indirect GLX rendering + has been updated to version 6.2.1. + + o Fixed bugs in the Screen Saver extension that could cause an X server + crash. + + o Fixed a bug in the X-Resource extension that could cause an X server + crash when the client host and server host have different endianness. + + o Added support to the Xvfb server for specifying the screen origins when + Xinerama is enabled. + + o Ensure that the Xvfb's root window depth and visuals are set correctly. + + o Work around bug in Mac OS X 10.1's AppKit that causes rootless XDarwin + to lock up when creating windows + + o Fix XDarwin's launch of X clients by double clicking in the Finder when + there is a space in the path. + + o Allow XDarwin to interpret scroll wheel mouse events correctly when the + shift key is held down. + + o Add initial XInput support for XDarwin. + + o Add an option for XDarwin to always use Mac command key equivalents. + + o Make XDarwin not default to StaticColor on ix86. + + o Fix a bug that caused restacks to be optimized away in rootless mode. + + o Add support for dynamic screen configuration changes in rootless XDar- + win. + + o Fix a problem with multiple glyphs in the RENDER extension's RenderAddG- + lyphs that caused malloc corruption. + + o Fix a segfault when XAA's overlay acceleration is invoked with the + XaaNoSolidFillRect option. + + o Fix the disabling of individual DPMS states. + + o Rework the XFree86 server's SBUS code so that SBUS adapters are properly + detected on SunOS. + + o Auto-detect DPMS support based on EDID data. + + o Fix DPMS enable/disable logic. + + o Allow multiple probe phases when using automatic configuration, which + allows the driver search to continue after failures at the PreInit + stage. + + o Update the static XFree86 driver list to allow automatic configuration + to work with statically linked XFree86 servers. + + o Add a '-autoconfig' command line option to the XFree86 server to enable + automatic configuration even when a configuration file is present. + + o Integrate the TinyX servers into the standard XFree86 build. + + o Fix a problem where a big request length of zero does not generate a + BadLength error. + + o Add a Distributed Multihead X server (DMX) and related extension. + + o Fix a segfault in the cfb module. + + o Fixes for the MIT-SHM extension's Xineramafication. + + o Fix detection of phantom PCI devices. + + o Fix x86emu's handling of the 0xe8 and 0xe9 opcodes. + + o Modify x86emu's handling of SHLD/SHRD instructions to allow shifts + greater than 15 for 16-bit operands. This undocumented behaviour is + expected by the BIOS in an SM722 controller. + + o Avoid some references to unloaded data in the XFree86 server, which can + cause crashes in some situations. + + o Change the DDC/EDID root window property data from signed to unsigned. + + o Fix the XFree86-Misc extension's PassMessage function. + + o Fix XFree86-DGA for multi-domain architectures. + + o Extend the XF86Config format and parser/config to allow multiple Monitor + sections to be referenced from a Screen section. + + o Allow multiple XFree86 configuration sources to be combined, and add a + -appendauto" command line option to allow automatic configuration data + to be appended to a partial static configuration. + + o Extend the XF86Config format and parser/config to allow multiple Server- + Flags, Files, and Module sections in a config file. + + o Use a more complete set of the probed EDID data in determining the + default monitor parameters. + + o Add a "preferred" video mode type, which can be obtained from the probed + EDID information, or from the static configuration. This allows the + native video mode to be used by default for digital panels. + + o Add tentative support for newer iterations of HP's zx1 chipsets. + + o Fix xf86fbman's largest linear area offscreen computation. + + o Print the XFree86 server's command line in the log file. + + o Update getconfig to work with older versions of Perl, and to detect when + the version of Perl is too old and when Perl is not available. + + o Extend automatic configuration and getconfig to work with SBUS video + devices in SPARC platforms. + + o Update the ValidMode functions in most video drivers to return more spe- + cific status values when a mode is rejected. + +3.6 Client and Library Updates + +3.6.1 Xlib and related libraries + + o Fix an Xlib segfault that may occur when IPv6 XDM-AUTHORIZATION-1 data + is present in the .Xauthority file. + + o Add WrapHelp.c and enable XdmAuth by default. + + o Fix a null dereference in libSM when given a bad previous session ID. + +3.6.2 Xterm + +The changes to xterm since XFree86 4.4 are: + +Improved behavior + + o Change resource settings for color4 and color12, add some discussion in + XTerm-col.ad. + + o Modify the criteria for disowning primary selection. Previously, this + happened anytime the cursor was moved before the end of the selection. + That would ensure that any insert/delete of char or line, as well as + scrolling, would disown the selection. The new criteria change this to + checking if the operations would modify the data which is highlighted. + + o Change default translations so a BtnDown which is not recognized is sim- + ply ignored rather than emitting a bell. That makes it less obtrusive + when the user tries to use a mouse which provides more capabilities than + the X mouse driver supports, e.g., one with a horizontal scroll wheel. + + o Modify to allow turning UTF-8 mode via escape sequence even if -wc + option was not given at startup. + + o Add menu items and corresponding actions for switching on/off the UTF-8 + mode and Xft (TrueType) support. + + o Modify FreeType support to allow resizing the font, in the same ways the + window can be resized if fixed fonts are used. The relative font sizes + are derived from the fixed font sizes. + + o Implement blinking text, using the timer for blinking cursor. + + o Add translation to ASCII of commonly-used characters that groff trans- + lates to Unicode, when the font in use does not provide the correspond- + ing glyphs. + + o Modify constraints in form used to layout toolbar, to work with newer + Xaw in XFree86 4.x. + + o Make active-icon work properly when TrueType fonts are used, as well as + when UTF-8 mode is used. + + o Improve rendering for Xft, allow it to draw non-linedrawing characters + such as "pi", which were drawn from internal tables with patch #180. + + o Modify initialization of 256- and 88-colors so that colors beyond 16 are + normally not X resources. This works around a hard-coded limit in Xt + which breaks xterm when 256-colors and luit are both configured (report + by Noah Friedman). + + o Fix problem responding to session management events, e.g., which would + make logging out very slow. + +Modified behavior + + o Enable utmpx support for NetBSD 1.6C and newer. + + o Modify Help() to make "xterm -h" write to standard output rather than + standard error. + + o Improve error-reporting for root user by checking if $DISPLAY is set + rather than using the useless message from X11 library. + + o Improve $WINDOWID for configuration with toolbar by making it refer to + the top-level shell rather than the parent of the current window. For + that case, the parent is a form widget, which does not have a name, + which made the $WINDOWID not very useful as a parameter for xwininfo. + + o Improve pattern used in uxterm to check for UTF-8 locale, e.g., for + HPUX. + + o Modify uxterm script to use locale program to verify if the derived + locale is installed. + + o Add case to uxterm to accommodate locales ending with "@euro", e.g., + fr_FR.UTF-8@euro. + + o For Linux, if IUTF8 is defined, e.g., on recent 2.6.x kernels, set the + corresponding flag for the slave pty, to enable UTF-8 interpretation of + backspace in cooked mode. + + o Modify faceSize resource to use a floating-point internal value. + + o Modify XTerm.ad to set saveLines default to 1024. + + o Change xterm version string to use __vendorversion__ where that is + available, and "XTerm" otherwise. Rather than reporting the version of + X that was current when xterm was modified, it reports the version + against which it was built. + +New resource settings + + o Add scoFunctionKeys resource, to match manpage. + + o Add -fd option and resource faceNameDoublesize to specify double-wide + fonts with Xft. + + o Add resource showMissingGlyphs to outline places on the screen where a + font lacks the corresponding glyph. + + o Add resource showBlinkAsBold to control whether blinking text should be + shown as bold or actual blinking text. + + o Add utmpDisplayId resource to allow users to control whether the display + identifier (display number and screen number) are retained in the con- + nection information recorded in utmp. + + o Add bellOnReset resource to allow users to disable bell which sounds on + hard reset since patch #183 changes to DECSCL. + +New configure script options + + o Add --disable-setuid option to configure script. + + o Add --disable-full-tgetent option to configure script, allowing one to + ignore a termcap library in favor of ncurses/curses. + +Other new features + + o Add mini-luit feature, which supports Latin9 directly rather than via + luit, provided that Unicode fonts are used. + + o Add dynamic abbreviation support like Emacs. + + o Add "erase2" and "eol2" keywords to ttyModes resource, for recent/cur- + rent FreeBSD. + +Bug-fixes (see http://invisible-island.net/xterm/xterm.log.html for a more +complete list): + + o Modify initialization and cleanup of utmp data to also compare the + ut_line member. + + o Correct table entry for DEL in the ground state, which marked it as a + printable character from patch #171. + + o Correct change from patch #157 which uses getlogin() to check for an + alias; the storage used for the related getpwuid() call was overwritten + by the data used for comparison. + + o Correct case of SCS for character set 0 (line-drawing) to allow it to be + selected into GR. + + o Modify creat_as() to only fork if xterm is actually running as setuid + and/or setgid. This works around a Cygwin bug which hangs when logging + is enabled and makes xterm a little faster for systems using interfaces + such as utempter. + + o Modify Cleanup() to avoid operations such as X calls that might use + unsafe functions when it is called by a signal handler. + + o Check for type of failure in xim_real_init() to avoid looping when the + problem is an unsupported input method rather than a failure to connect + to the XIM server. Problem was introduced in patch #175. + + o Add missing #undef OPT_SESSION_MGT to xtermcfg.hin to make the configure + script's --disable-session-mgt option work. + + o Correct options parsing for -into option so it can be combined with -e. + + o Make escape sequence reporting dynamic colors consistent with the logic + that sets it; choosing the opposite color when reverse video is set. + + o Fix a repainting bug introduced in patch #180: when using a font lack- + ing line-drawing characters, a repaint of the screen could skip horizon- + tally an extra amount after filling in the missing character. + + o Modify terminfo to accommodate luit, which relies on G1 being used via + an ISO-2022 escape sequence. Note that this relies in turn on bug fixes + in ncurses after the 5.4 release. + +3.6.3 Luit + + o Fix a synchronization problem with luit's handling of tty settings. + + o Extract information from the pty before forking rather than after, to + avoid conflicting with the child process's modifications to the line. + +3.6.4 GLX/DRI + + o Mesa and its DRI drivers have been updated to version 6.2.1, plus some + bug fixes. + + o Add a 915G DRI driver. + + o Fix a GLX multi-thread bug. + +3.6.5 twm + + o Add support for XPM icons. + + o Add IconMaxWidth and TitleIndent configuration parameters. + +3.6.6 xdm + + o Improve the operation of IPv6-enabled xdm when the platforms's IPv6 sup- + port is disabled. + + o Make use of Xlib's _XGetHostname rather than attempting to duplicate it. + + o Fix sessreg for NetBSD. + + o Update docs and config to handle authDir being in a non-default loca- + tion. + +3.6.7 xfs + + o Fix log file opening with the '-user nobody' option. + +3.7 I18n and Fonts + + o FreeType has been updated to version 2.1.8. + + o The FreeType-1.x based X-TrueType XFree86 server font backend has been + retired. The functionality it provides is now available in the + "FreeType" font backend. The old "xtt" module is now a wrapper that + loads the "freetype" module. + + o A bug that prevented the VeraIt.ttf font from being installed has been + fixed. + + o Fix a problem that could cause apps using the zh_CN.UTF-8 locale to + crash. + + o Fix freetype module segfault with some Type1 fonts. + + o Replace unicode keysyms in the en_US.UTF-8 Compose file with "tradi- + tional" ones where such keysyms exist. + + o Fix the ct_encoding sequence in the zh_CN.gbk locale. + + o Update the 8859-7 unicode conversion data file to the current version. + + o Update the gb3212.1980-0 encoding to handle fonts that do not have a + unicode table. + + o Add encoding files for cns11643-1, cns11643-2, cns11643-3, and + suneu_greek. + + o Add support for the si_LK.UTF-8 locale. + + o Reinstate the original mkfontdir program, because its mkfontscale equiv- + alent does not handle creating encodings.dir files as well as is neces- + sary. + + o Fix for fstobdf generating corrupted BDF files. + + o Update locale info for Kinyarwanda, the language of Rwanda. + + o Add nine missing South African locales. + + o Add extra fontset records into XLC_LOCALE, fixing problems with text + output by Xuft8 functions under non-Unicode locales. + + o Add a Kyrgyz locale. + +3.8 OS Support Updates + + o Numerous fixes and enhancements for the Solaris/SPARC platform support, + including the ability to build 64-bit shared libraries. + + o Support added for OpenBSD/amd64. + + o Differentiate left and right modifier keys on Mac OS X 10.3. + + o Fix some path-related issues on OS/2 with xman and xf86cfg. + + o Update the transport layer to allow LOCAL SCO connection types to be + used for more than just X protocol connections. + + o Cleanups for the SCO port. + + o Fixes for FreeBSD/amd64 support. + + o Add support for newer UltraSPARC variants to the SunOS/Solaris and Linux + ports. + + o Understand the PCI bus naming scheme found in Linux 2.6 kernels. + +4. Drivers + +4.1 Video Drivers + +XFree86 4.5.0 includes the following video drivers: + + +--------------+--------------------------+--------------------------------+ + |Driver Name | Description | Further Information | + +--------------+--------------------------+--------------------------------+ + |apm | Alliance Pro Motion | README.apm | + |ark | Ark Logic | | + |ati | ATI | README.ati, README.r128, | + | | | r128(4), radeon(4) | + |chips | Chips & Technologies | README.chips, chips(4) | + |cirrus | Cirrus Logic | | + |cyrix (*) | Cyrix MediaGX | README.cyrix | + |fbdev | Linux framebuffer device | fbdev(4) | + |glide | Glide2x (3Dfx) | glide(4) | + |glint | 3Dlabs, TI | glint(4) | + |i128 | Number Nine | README.I128, i128(4) | + |i740 | Intel i740 | README.i740 | + |i810 | Intel i8xx | README.i810, i810(4) | + |imstt | Integrated Micro Solns | | + |mga | Matrox | mga(4) | + |neomagic | NeoMagic | neomagic(4) | + |newport (-) | SGI Newport | README.newport, newport(4) | + |nsc | National Semiconductor | nsc(4) | + |nv | NVIDIA | nv(4) | + |rendition | Rendition | README.rendition, rendition(4) | + |s3 | S3 (not ViRGE or Savage) | | + |s3virge | S3 ViRGE | README.s3virge, s3virge(4) | + |savage | S3 Savage | savage(4) | + |siliconmotion | Silicon Motion | siliconmotion(4) | + |sis | SiS | README.SiS, sis(4) | + |sunbw2 (+) | Sun bw2 | | + |suncg14 (+) | Sun cg14 | | + |suncg3 (+) | Sun cg3 | | + |suncg6 (+) | Sun GX and Turbo GX | | + |sunffb (+) | Sun Creator/3D, Elite 3D | | + |sunleo (+) | Sun Leo (ZX) | | + |suntcx (+) | Sun TCX | | + |tdfx | 3Dfx | tdfx(4) | + |tga | DEC TGA | README.DECtga | + |trident | Trident | trident(4) | + |tseng | Tseng Labs | | + |via | VIA | via(4) | + |vesa | VESA | vesa(4) | + |vga | Generic VGA | vga(4) | + |vmware | VMWare guest OS | vmware(4) | + +--------------+--------------------------+--------------------------------+ + +Drivers marked with (*) are present in a preliminary form in this release, +but are not complete and/or stable yet. + +Drivers marked with (+) are for Linux/SPARC only. + +Drivers marked with (-) are for Linux/mips only. + +Darwin/Mac OS X uses IOKit drivers and does not use the module loader drivers +listed above. Further information can be found in README.Darwin. + +4.2 Input Drivers + +XFree86 4.5.0 includes the following input drivers: + + +------------+----------------------------------+---------------------+ + |Driver Name | Description | Further Information | + +------------+----------------------------------+---------------------+ + |aiptek(*) | Aiptek USB tablet | aiptek(4) | + |calcomp | Calcomp | | + |citron | Citron | citron(4) | + |digitaledge | DigitalEdge | | + |dmc | DMC | dmc(4) | + |dynapro | Dynapro | | + |elographics | EloGraphics | | + |eloinput | Elo 2500U USB | eloinput(4) | + |fpit | Fujitsu Stylistic Tablet PCs | fpit(4) | + |hyperpen | Aiptek HyperPen 6000 | | + |js_x | JamStudio pentablet | js_x(4) | + |kbd | generic keyboards (alternate) | kbd(4) | + |keyboard | generic keyboards | keyboard(4) | + |microtouch | MicroTouch | | + |mouse | most mouse devices | mouse(4) | + |mutouch | MicroTouch | | + |palmax | Palmax PD1000/PD1100 | palmax(4) | + |penmount | PenMount | | + |spaceorb | SpaceOrb | | + |summa | SummaGraphics | | + |tek4957 | Tektronix 4957 tablet | tek4957(4) | + |ur98(*) | Union Reality UR-F98 headtracker | ur98(4) | + |void | dummy device | void(4) | + |wacom | Wacom tablets | wacom(4) | + +------------+----------------------------------+---------------------+ + +Drivers marked with (*) are available for Linux only. + +5. Known Problems + +Currently no known problems are documented. + +6. Overview of XFree86 4.x. + +XFree86 4.x has a single X server binary called XFree86. This binary can +either have one or more video and input drivers linked in statically, or more +usually, dynamically, and in that manner load the video drivers, input driv- +ers, and other modules that are needed. + +XFree86 4.5.0 has X server support for most UNIX® and UNIX-like operating +systems on Intel/x86 platforms, plus support for Linux and some BSD OSs on +Alpha, PowerPC, IA-64, AMD64, SPARC, and Mips platforms, and for Darwin on +PowerPC. Support for additional architectures and operating systems is in +progress and is planned for future releases. + +6.1 Loader and Modules + +The XFree86 X server has a built-in run-time loader, which can load normal +object files and libraries in most of the commonly used formats. The loader +does not rely on an operating system's native dynamic loader support and it +works on platforms that do not provide this feature. This allows for the +modules to be operating system independent (although not, of course, CPU +architecture independent) which means that a module compiled on Linux/x86 can +be loaded by an X server running on Solaris/x86, or FreeBSD, or even OS/2. + +The X server makes use of modules for video drivers, X server extensions, +font rasterisers, input device drivers, framebuffer layers (like mfb, cfb, +etc), and internal components used by some drivers (like XAA), + +The module interfaces (both API and ABI) used in this release are subject to +change without notice. While we will attempt to provide backward compatibil- +ity for the module interfaces as of the 4.0 release (meaning that 4.0 modules +will work with future core X server binaries), we cannot guarantee this. +Compatibility in the other direction is explicitly not guaranteed because new +modules may rely on interfaces added in new releases. + +Note about module security + + The XFree86 X server runs with root privileges, i.e. the X server + loadable modules also run with these privileges. For this reason + we recommend that all users be careful to only use loadable modules + from reliable sources, otherwise the introduction of viruses and + contaminated code can occur and wreak havoc on your system. We + hope to have a mechanism for signing/verifying the modules that we + provide available in a future release. + +6.2 Configuration + +The XFree86 server uses a configuration file as the primary mechanism for +providing configuration and run-time parameters. The configuration file for- +mat is described in detail in the XF86Config(5) manual page. + +The XFree86 server has support for automatically determining an initial con- +figuration on most platforms, as well as support or generating a basic ini- +tial configuration file. + +6.3 Command Line Options + +Command line options can be used to override some default parameters and +parameters provided in the configuration file. These command line options +are described in the XFree86(1) manual page. + +6.4 XAA + +The XFree86 Acceleration Architecture (XAA) was completely rewritten from +scratch for XFree86 4.x. Most drivers implement acceleration by making use +of the XAA module. + +6.5 Multi-head + +Some multi-head configurations are supported in XFree86 4.x, primarily with +multiple PCI/AGP cards. + +One of the main problems is with drivers not sufficiently initialising cards +that were not initialised at boot time. This has been improved somewhat with +the INT10 support that is used by most drivers (which allows secondary card +to be "soft-booted", but in some cases there are other issues that still need +to be resolved. Some combinations can be made to work better by changing +which card is the primary card (either by using a different PCI slot, or by +changing the system BIOS's preference for the primary card). + +6.6 Xinerama + +Xinerama is an X server extension that allows multiple physical screens to +behave as a single screen. With traditional multi-head in X11, windows can- +not span or cross physical screens. Xinerama removes this limitation. Xin- +erama does, however, require that the physical screens all have the same root +depth, so it isn't possible, for example, to use an 8-bit screen together +with a 16-bit screen in Xinerama mode. + +Xinerama is not enabled by default, and can be enabled with the +xinerama +command line option for the X server. + +Xinerama was included with X11R6.4. The version included in XFree86 4.x was +completely rewritten for improved performance and correctness. + +Known problems: + + o Not all window managers are Xinerama-aware, and so some operations like + window placement and resizing might not behave in an ideal way. This is + an issue that needs to be dealt with in the individual window managers, + and isn't specifically an XFree86 problem. + +6.7 DGA version 2 + +DGA 2.0 is included in 4.5.0. Documentation for the client libraries can be +found in the XDGA(3) man page. A good degree of backwards compatibility with +version 1.0 is provided. + +6.8 DDC + +The VESA® Display Data Channel (DDC[tm]) standard allows the monitor to tell +the video card (or on some cases the computer directly) about itself; partic- +ularly the supported screen resolutions and refresh rates. + +Partial or complete DDC support is available in most of the video drivers. +DDC is enabled by default, but can be disabled with a "Device" section entry: +Option "NoDDC". We have support for DDC versions 1 and 2; these can be dis- +abled independently with Option "NoDDC1" and Option "NoDDC2". + +At startup the server prints out DDC information from the display, and will +use this information to set the default monitor parameters and video mode +when none are provided explicitly in the configuration file. + +6.8.1 Changed behavior caused by DDC. + +Several drivers uses DDC information to set the screen size and pitch. This +can be overridden by explicitly resetting it to the and non-DDC default value +75 with the -dpi 75 command line option for the X server, or by specifying +appropriate screen dimensions with the "DisplaySize" keyword in the "Monitor" +section of the config file. + +6.9 GLX and the Direct Rendering Infrastructure (DRI) + +Direct rendered OpenGL® support is provided for several hardware platforms by +the Direct Rendering Infrastructure (DRI), which is part of Mesa. Mesa also +provides the 3D core rendering component of GLX. Further information can be +found at the DRI Project's web site and the Mesa web +site . + +6.10 XVideo Extension (Xv) + +The XVideo extension is supported in XFree86 4.x. An XvQueryPortAttributes +function has been added as well as support for XvImages. XvImages are XIm- +ages in alternate color spaces such as YUV and can be passed to the server +through shared memory segments. This allows clients to display YUV data with +high quality hardware scaling and filtering. + +6.11 X Rendering Extension (Render) + +The X Rendering extension provides a 2D rendering model that more closely +matches application demands and hardware capabilities. It provides a render- +ing model derived from Plan 9 based on Porter/Duff image composition rather +than binary raster operations. + +Using simple compositing operators provided by most hardware, Render can draw +anti-aliased text and geometric objects as well as perform translucent image +overlays and other image operations not possible with the core X rendering +system. + +XFree86 4.5.0 provides a partial implementation of Render sufficient for +drawing anti-aliased text and image composition. Still to be implemented are +geometric primitives and affine transformation of images. + +Unlike the core protocol, Render provides no font support for applications, +rather it allows applications to upload glyphs for display on the screen. +This allows the client greater control over text rendering and complete +access to the available font information while still providing hardware +acceleration. The Xft library provides font access for Render applications. + +6.11.1 The Xft Library + +On the client side, the Xft library provides access to fonts for applications +using the FreeType library, version 2. FreeType currently supports Type1 and +TrueType font files, a future release is expected to support BDF and PCF +files as well, so Render applications will have access to the complete range +of fonts available to core applications. One important thing to note is that +Xft uses the vertical size of the monitor to compute accurate pixel sizes for +provided point sizes; if your monitor doesn't provide accurate information +via DDC, you may want to add that information to XF86Config. + +To allow a graceful transition for applications moving from core text render- +ing to the Render extension, Xft can use either core fonts or FreeType and +the Render extension for text. By default, Xft is configured to support both +core fonts and FreeType fonts using the supplied version of FreeType 2. See +the section on FreeType support in Xft for instructions on configuring +XFree86 to use an existing FreeType installation. + +The Xft library uses a configuration file, XftConfig, which contains informa- +tion about which directories contain font files and also provides a sophisti- +cated font aliasing mechanism. Documentation for that file is included in +the Xft(3) man page. + +6.11.2 FreeType support in Xft + +XFree86 4.5.0 includes sources for FreeType version 2.1.8, and, by default, +they are built and installed automatically. + +6.11.3 Application Support For Anti-Aliased Text + +Only three applications have been modified in XFree86 4.5.0 to work with the +Render extension and the Xft and FreeType libraries to provide anti-aliased +text. Xterm, xditview and x11perf. Migration of other applications may +occur in future releases. + +By default, xterm uses core fonts through the standard core API. It has a +command line option and associated resource to direct it to use Xft instead: + + o -fa family / .VT100.faceName: family. Selects the font family to use. + +Xditview will use Xft instead of the core API by default. X11perf includes +tests to measure the performance of text rendered in three ways, anti- +aliased, anti-aliased with sub-pixel sampling and regular chunky text, but +through the Render extension, a path which is currently somewhat slower than +core text. + +6.12 Other extensions + +The XFree86-Misc extension has not been fully ported to the new server archi- +tecture yet. This might be completed in a future release. + +The XFree86-VidModeExtension extension has been updated, and mostly ported to +the new server architecture. The area of mode validation needs further work, +and the extension should be used with care. This extension has support for +changing the gamma setting at run-time, for modes where this is possible. +The xgamma utility makes use of this feature. Compatibility with the 3.3.x +version of the extension is provided. The missing parts of this extension +and some new features should be completed in a future release. + +6.13 xedit + +Xedit has several new features, including: + + o An embedded lisp interpreter that allows easier extension of the editor. + + o Several new syntax highlight modes, and indentation rules for C and + Lisp. + + o Flexible search/replace interface that allows regex matches. + + o Please refer to xedit(1) for more details. + +6.14 Font support + +Details about the font support in XFree86 4.x can be found in the +README.fonts document. + +6.15 TrueType support + +The XFree86 4.x server comes with a TrueType backend, known as the "FreeType" +backend, based on the FreeType library. The functionality of the former X- +TrueType was merged into the FreeType backend by the After X-TT Project for +the XFree86 4.4.0 release, and the old X-TrueType backend has been dropped as +of XFree86 4.5.0. + +6.16 CID font support + +Support for CID-keyed fonts is included in XFree86 4.x. The CID-keyed font +format was designed by Adobe Systems for fonts +with large character sets. The CID-keyed font support in XFree86 was donated +by SGI . See the LICENSE document for a copy of the +CID Font Code Public License. + +6.17 Internationalisation of the scalable font backends + +XFree86 4.x has a ``fontenc'' layer to allow the scalable font backends to +use a common method of font re-encoding. This re-encoding makes it possible +to use fonts in encodings other than their their native encoding. This layer +is used by the FreeType, Type1 and Speedo backends. + +6.18 Large font optimisation + +The glyph metrics array, which all the X clients using a particular font have +access to, is placed in shared memory, so as to reduce redundant memory con- +sumption. For non-local clients, the glyph metrics array is transmitted in a +compressed format. + +6.19 Unicode/ISO 10646 support + +What is included in 4.x: + + o All ``-misc-fixed-*'' BDF fonts are now available in the ISO10646-1 + encoding and cover at least the 614 characters found in ISO + 8859-{1-5,7-10,14,15}, CP1252, and MES-1. The non-bold fonts also cover + all Windows Glyph List 4 (WGL4) characters, including those found in all + 8-bit MS-DOS/Windows code pages. The 8-bit variants of the ``-misc- + fixed-*'' BDF fonts (ISO8859-1, ISO8859-2, KOI8-R, etc.) have all been + automatically generated from the new ISO10646-1 master fonts. + + o Some ``-misc-fixed-*'' BDF ISO10646-1 fonts now cover a comprehensive + Unicode repertoire of over 3000 characters including all Latin, Greek, + Cyrillic, Armenian, Gregorian, Hebrew, IPA, and APL characters, plus + numerous scientific, typographic, technical, and backwards-compatibility + symbols. Some of these fonts also cover Arabic, Ethiopian, Thai, + Han/Kanji, Hangul, full ISO 8859, and more. For the 6x13 font there is + now a 12x13ja Kanji extension and for the 9x18 font there is a 18x18ja + Kanji/Han/Hangul extension, which covers all ISO-2022-JP-2 (RFC 1554) + characters. The 9x18 font can also be used to implement simple combining + characters by accent overstriking. For more information, read Markus + Kuhn's UTF-8 and Unicode FAQ . + + o Mark Leisher's ClearlyU proportional font (similar to Computer Modern). + + o ISO 10646/Unicode UTF-8 Level 1 support added to xterm (enabled with the + -u8 option). + + o The FreeType font backend supports Unicode-encoded fonts. + +6.20 Xlib Compose file support and extensions + +A more flexible Compose file processing system was added to Xlib in XFree86 +4.4.0. The compose file is searched for in the following order: + + 1. If the environment variable $XCOMPOSEFILE is set, its value is used as + the name of the Compose file. + + 2. If the user's home directory has a file named ".XCompose", it is used + as the Compose file. + + 3. The old method is used, and the compose file is "//Compose". + +Compose files can now use an "include" instruction. This allows local modi- +fications to be made to existing compose files without including all of the +content directly. For example, the system's iso8859-1 compose file can be +included with a line like this: + + include "/usr/X11R6/lib/X11/locale/iso8859-1/Compose" + +There are two substitutions that can be made in the file name of the include +instruction. %H expands to the user's home directory (the $HOME environment +variable), and %L expands to the name of the locale specific Compose file +(i.e., "//Compose"). + +For example, you can include in your compose file the default Compose file by +using: + + include "%L" + +and then rewrite only the few rules that you need to change. New compose +rules can be added, and previous ones replaced. + +Finally, it is no longer necessary to specify in the right part of a rule a +locale encoded string in addition to the keysym name. If the string is omit- +ted, Xlib figures it out from the keysym according to the current locale. +I.e., if a rule looks like: + + : "\300" Agrave + +the result of the composition is always the letter with the "\300" code. But +if the rule is: + + : Agrave + +the result depends on how Agrave is mapped in the current locale. + +6.21 Luxi fonts from Bigelow and Holmes + +XFree86 now includes the ``Luxi'' family of Type 1 fonts and TrueType fonts. +This family consists of the fonts ``Luxi Serif'', ``Luxi Sans'' and +``Luxi Mono'' in Roman, oblique, bold and bold oblique variants. The True- +Type version have glyphs covering the basic ASCII Unicode range, the Latin 1 +range, as well as the Extended Latin range and some additional punctuation +characters. In particular, these fonts include all the glyphs needed for +ISO 8859 parts 1, 2, 3, 4, 9, 13 and 15, as well as all the glyphs in the +Adobe Standard encoding and the Windows 3.1 character set. + +The glyph coverage of the Type 1 versions is somewhat reduced, and only cov- +ers ISO 8859 parts 1, 2 and 15 as well as the Adobe Standard encoding. + +The Luxi fonts are original designs by Kris Holmes and Charles Bigelow from +Bigelow and Holmes Inc., who developed the Luxi typeface designs in Ikarus +digital format. URW++ Design and Development GmbH converted the Ikarus for- +mat fonts to TrueType and Type 1 font programs and implemented the grid-fit- +ting "hints" and kerning tables in the Luxi fonts. + +The license terms for the Luxi fonts are included in the file `COPYRIGHT.BH', +as well as in the License document. For further information, please contact + or , or consult the URW++ web +site . + +7. Credits + +This section lists the credits for the XFree86 4.5.0 release. For a more +detailed breakdown, refer to the CHANGELOG file in the XFree86 source tree, +the cvs-commit archives , or the 'cvs log' information for individual +source files. + + New Features, Enhancements and Updates: + + Xterm enhancements and updates: + Thomas Dickey + + Integrate TinyX into the mainline XFree86 build: + X-Oz Technologies + + Intel i915GM support, dual head i830/i855/i915 support: + Tungsten Graphics, Alan Hourihane, Keith Whitwell + + Automatic configuration enhancements: + X-Oz Technologies, David Dawes + + Distributed Multihead X: + Kevin Martin, Rik Faith + + Preliminary work on SunOS/SPARC and IRIX ports: + Marc La France + + Integration: + + General Integration of Submissions: + David H. Dawes, Marc La France, Alan Hourihane, Ivan + Pascal. + + DRI Integration: + Alan Hourihane, David H. Dawes. + + Release Engineering: + David H. Dawes. + + Patches and other submissions (in alphabetical order): + Szilveszter Adam, Tim Adye, Taneem Ahmed, Andrew Aitchison, Raoul + Arranz, Zaeem Arshad, Dwayne Bailey, Ilyas Bakirov, Denis Bar- + bier, Kyle Bateman, J. Scott Berg, Thomas Biege, Dmitry + Bolkhovityanov, H Merijn Brand, Peter Breitenlohner, Benjamin + Burke, Dale L Busacker, busmanus, Julian Cable, Mike Castle, + David M. Clay, Philip Clayton, Alan Coopersmith, Ricardo Cruz, + Michel Dänzer, J. D. Darling, David Dawes, Michael Dawes, Rafael + Ávila de Espíndola, Rick De Laet, Josip Deanovic, Angelus Dei, + Laurent Deniel, Thomas Dickey, Stefan Dirsch, Charles Dobson, DRI + Project, Emmanuel Dreyfus, Boris Dusek, Georgina O. Economou, + Egbert Eich, Bernd Ernesti, Chris Evans, Rik Faith, Adrian + Fiechter, Matthew Fischer, FreeType Team, Terry R. Frienrichsen, + Christopher Fynn, Hubert Gburzynski, Nicolas George, Frank + Giessler, Fred Gleason, Dmitry Golubev, Alexander Gottwald, Her- + bert Graeber, Miroslav Halas, John Harper, Harshula, John + Heasley, Matthieu Herrb, David Holl, Alex Holland, Peng Hongbo, + Alan Hourihane, Harold L Hunt II, Alan Iwi, Timur Jamakeev, Paul + Jarc, Kean Johnston, Nicolas Joly, Mark Kandianis, Kaleb Keith- + ley, Chamath Keppitiyagama, Jung-uk Kim, Satoshi Kimura, Michael + Knudsen, Vlatko Kosturjak, Alexei Kosut, Anton Kovalenko, Joachim + Kuebart, Marc La France, David Laight, Zarick Lau, Pierre Lalet, + Michael Lampe, Lanka Linux User Group, Nolan Leake, Werner Lem- + berg, Dejan Lesjak, Noah Levitt, Greg Lewis, Bernhard R Link, + Jonas Lund, S. Lussos, Torrey T. Lyons, Roland Mainz, N Marci, + Kevin Martin, Stephen McCamant, Mesa Developers, Luke Mewburn, + Petr Mladek, Bram Moolenaar, Steve Murphy, Ishikawa MUTSUMI, Radu + Octavian, Lee Olsen, Greg Parker, Ivan Pascal, Alexander E. + Patrakov, Mike Pechkin, Soós Péter, Zvezdan Petkovic, Alexander + Pohoyda, Xie Qian, Bill Randle, Adam J. Richter, Tim Roberts, + Bernhard Rosenkraenzer, Andreas Rüden, Steve Rumble, Oleg Safi- + ullin, Ty Sarna, Leo Savernik, Barry Scott, Shantonu Sen, Yu + Shao, Andreas Schwab, Matthias Scheler, Dan Shearer, Michael + Shell, Paul Shupak, Alexander Stohr, Marius Strobl, Mikko Markus + Torni, Jess Thrysoee, Izumi Tsutsui, Tungsten Graphics, Ryan + Underwood, Tristan Van Berkom, Michael van Elst, Phillip Vandry, + Roman Vasylyev, Luc Verhaegen, Rodion Vshevtsov, Mark Vojkovich, + Edi Werner, Keith Whitwell, Scot Wilcoxon, Dave Williss, Thomas + Winischhofer, Kuang-che Wu, X-Oz Technologies, Chisato Yamauchi, + Michael Yaroslavtsev, David Yerger, Su Yong, Hui Yu, Sagi Zeevi, + Christian Zietz + + Webmaster: + Georgina O. Economou + + Hosting: + Internet Systems Consortium, Inc . + +8. Attributions/Acknowledgements + +This product includes software developed by The XFree86 Project, Inc +(http://www.xfree86.org/) and its contributors. + +This product includes software that is based in part of the work of the +FreeType Team (http://www.freetype.org). + +This product includes software developed by the University of California, +Berkeley and its contributors. + +This product includes software developed by Christopher G. Demetriou. + +This product includes software developed by the NetBSD Foundation, Inc. and +its contributors + +This product includes software developed by X-Oz Technologies (http://www.x- +oz.com/). + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/RELNOTES.sgml,v 1.135 dawes Exp $ + + +$XFree86: xc/RELNOTES.txt,v 1.4 2005/03/17 01:11:52 dawes Exp $ Index: xc/bug-report diff -u xc/bug-report:1.6 xc/bug-report:removed --- xc/bug-report:1.6 Mon Jan 7 13:14:55 2002 +++ xc/bug-report Wed Mar 16 20:58:22 2005 @@ -1,67 +0,0 @@ -[PLEASE make your Subject: line as descriptive as possible. -Subjects like "xterm bug" or "bug report" are not helpful!] -[Remove all the explanatory text in brackets before mailing.] -[Send to xbugs@x.org, as shown in the sample message -header below] - -[NOTE: This form is intended for reporting bugs to X.Org about X.Org releases. -If you're reporting an XFree86-specific bug, please use the BugReport form -in xc/programs/Xserver/hw/xfree86/doc/ and send it to xfree86@xfree86.org.] - -To: xbugs@x.org -Subject: [area]: [synopsis] [replace with actual area and short description] - - VERSION: - -R6.6 - - CLIENT MACHINE and OPERATING SYSTEM: - -[e.g. Sparc/SunOS 5.6, S.u.S.E. Linux 5.0 kernel 2.0.30, etc.] - - DISPLAY TYPE: - -[e.g. Xsun, Xhp, Xdec, XF86_*, /usr/openwin/bin/Xsun, etc. ] - - WINDOW MANAGER: - -[e.g. twm, mwm, fvwm95, enlightenment, etc.] - - COMPILER: - -[e.g. native ANSI cc, native cc, ecgs 1.0, etc.] - - AREA: - -[Area of the source tree affected, -e.g., Xserver, Xlib, Xt, Xaw, PEX, twm, xterm, xmh, config, .... -Please only one area per bug report.] - - SYNOPSIS: - -[Brief description of the problem and where it is located] - - DESCRIPTION: - -[Detailed description of problem. Don't presume that the bug -is self evident. If possible cite specification references (X, -ANSI/POSIX/ISO, X/Open, etc.) to support why it is a bug. For -program crashes a little bit of analysis about why a NULL pointer -was dereferenced or why a buffer overflowed goes a long way. -If this is a request for an enhancement, justify it.] - - REPEAT BY: - -[What you did to get the error; include test program or session -transcript if at all possible. Be specific -- if we can't reproduce -it, we can't fix it. Don't just say "run this program and it will -be obvious," tell us exactly what we should see when the program -is run. Bug reports without a clear, deterministic way of reproducing -them will be fixed only after all bug reports that do.] - - SAMPLE FIX: - -[Please send context diffs (`diff -c original-file fixed-file`). -Be sure to include the "XConsortium" or "TOG" ident line in any -diffs -- the best way to do this is to add your own versioning -line immediately after ours.] Index: xc/config/Imakefile diff -u xc/config/Imakefile:1.4 xc/config/Imakefile:1.5 --- xc/config/Imakefile:1.4 Thu May 31 14:47:04 2001 +++ xc/config/Imakefile Sun Feb 6 20:38:22 2005 @@ -1,5 +1,5 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:45 cpqbld Exp $ -XCOMM $XFree86: xc/config/Imakefile,v 1.4 2001/05/31 18:47:04 dawes Exp $ +XCOMM $XFree86: xc/config/Imakefile,v 1.5 2005/02/07 01:38:22 tsi Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -10,7 +10,7 @@ #if BuildDPSLibrary PSWRAPDIR = pswrap #endif -SUBDIRS = cf $(BOOTSTRAPSUBDIRS) util $(PSWRAPDIR) +SUBDIRS = cf util $(BOOTSTRAPSUBDIRS) $(PSWRAPDIR) #if defined(XFree86VersionString) && defined(ProjectRoot) && \ defined(BuildBindist) Index: xc/config/cf/Amoeba.cf diff -u xc/config/cf/Amoeba.cf:3.11 xc/config/cf/Amoeba.cf:3.12 --- xc/config/cf/Amoeba.cf:3.11 Thu Nov 14 16:01:13 2002 +++ xc/config/cf/Amoeba.cf Wed Mar 24 22:36:20 2004 @@ -1,5 +1,5 @@ XCOMM platform: $Xorg: Amoeba.cf,v 1.3 2000/08/17 19:41:45 cpqbld Exp $ -XCOMM platform: $XFree86: xc/config/cf/Amoeba.cf,v 3.11 2002/11/14 21:01:13 tsi Exp $ +XCOMM platform: $XFree86: xc/config/cf/Amoeba.cf,v 3.12 2004/03/25 03:36:20 dawes Exp $ /* The presence of this configuration file in the X distribution * does not imply full support for the system it describes. @@ -280,13 +280,13 @@ #ifndef InstallLibrary #define InstallLibrary(libname,dest) @@\ -install:: Concat(lib,libname.a) @@\ +install:: @@\ @echo '** TODO: Install Library ' Concat(lib,libname.a) #endif /* InstallLibrary */ #ifndef MergeIntoInstalledLibrary #define MergeIntoInstalledLibrary(tolib,fromlib) @@\ -install:: fromlib @@\ +install:: @@\ @echo '** TODO: merge ' fromlib into tolib #endif /* MergeIntoInstalledLibrary */ @@ -298,19 +298,19 @@ #ifndef InstallLintLibrary #define InstallLintLibrary(libname,dest) @@\ -install.ln:: Concat(llib-l,libname.ln) @@\ +install.ln:: @@\ @echo '** TODO: Install lintlib ' Concat(llib-l,libname.ln) #endif /* InstallLintLibrary */ #ifndef InstallManPageLong #define InstallManPageLong(file,destdir,dest) @@\ -install.man:: file.man @@\ +install.man:: @@\ @echo '** TODO: Install man page ' file.man #endif /* InstallManPageLong */ #ifndef InstallGenManPageLong #define InstallGenManPageLong(file,destdir,dest,suffix) @@\ -install.man:: file.man @@\ +install.man:: @@\ @echo '** TODO: Install man page ' file.man #endif /* InstallGenManPageLong */ @@ -340,46 +340,46 @@ #ifndef InstallNamedNonExec #define InstallNamedNonExec(srcname,dstname,dest) @@\ -install:: srcname @@\ +install:: @@\ $(MKXDIRHIER) $(DESTDIR)dest @@\ $(TOB) srcname $(DESTDIR)dest/dstname #endif /* InstallNamedNonExec */ #ifndef InstallNonExecFile #define InstallNonExecFile(file,dest) @@\ -install:: file @@\ +install:: @@\ $(MKXDIRHIER) dest @@\ $(TOB) file dest/file #endif /* InstallNonExecFile */ #ifndef InstallNonExec #define InstallNonExec(file,dest) @@\ -install:: file @@\ +install:: @@\ $(TOB) file dest/file #endif /* InstallNonExec */ #ifndef InstallProgramWithFlags #define InstallProgramWithFlags(program,dest,flags) @@\ -install:: program @@\ +install:: @@\ $(MKXDIRHIER) dest/program @@\ $(AINSTALL) $(AINSTALLFLAGS) program dest/program/pd.$(ARCH) #endif /* InstallProgramWithFlags */ #ifndef InstallScript #define InstallScript(program,dest) @@\ -install:: program.script @@\ +install:: @@\ $(TOB) program.script dest/program #endif /* InstallScript */ #ifndef InstallNamedScript #define InstallNamedScript(srcname,dstname,dest) @@\ -install:: srcname @@\ +install:: @@\ $(TOB) srcname dest/dstname #endif /* InstallNamedScript */ #ifndef InstallNamedProg #define InstallNamedProg(srcname,dstname,dest) @@\ -install:: srcname @@\ +install:: @@\ $(MKXDIRHIER) $(DESTDIR)dest/dstname @@\ $(AINSTALL) $(AINSTALLFLAGS) srcname $(DESTDIR)dest/dstname/pd.$(ARCH) #endif /* InstallNamedProg */ @@ -396,7 +396,7 @@ #ifndef InstallMultipleProg #define InstallMultipleProg(list,dest) @@\ -install:: list @@\ +install:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for i in list; do \ @@\ (set -x; \ @@\ @@ -408,7 +408,7 @@ #ifndef InstallAppDefaults #if InstallAppDefFiles #define InstallAppDefaults(class) @@\ -install:: class.ad @@\ +install:: @@\ $(MKXDIRHIER) $(XAPPLOADDIR) @@\ $(TOB) class.ad $(DESTDIR)$(XAPPLOADDIR)/class #else @@ -419,7 +419,7 @@ #ifndef InstallAppDefaultsLong #if InstallAppDefFiles #define InstallAppDefaultsLong(file,class) @@\ -install:: file.ad @@\ +install:: @@\ $(MKXDIRHIER) $(DESTDIR)$(XAPPLOADDIR) @@\ $(TOB) file.ad $(DESTDIR)$(XAPPLOADDIR)/class #else Index: xc/config/cf/DGUX.cf diff -u xc/config/cf/DGUX.cf:1.6 xc/config/cf/DGUX.cf:1.8 --- xc/config/cf/DGUX.cf:1.6 Fri Jan 12 14:28:20 2001 +++ xc/config/cf/DGUX.cf Sat Jan 15 19:09:45 2005 @@ -1,4 +1,4 @@ -XCOMM platform: $XFree86: xc/config/cf/DGUX.cf,v 1.6 2001/01/12 19:28:20 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/DGUX.cf,v 1.8 2005/01/16 00:09:45 dawes Exp $ /* Copyright Takis Psarogiannakopoulos * This is the DG/ux configuration file of X11R6.3 */ @@ -102,7 +102,7 @@ #endif #ifndef DefaultCCOptions -#define DefaultCCOptions /* -ansi -pedantic */ +#define DefaultCCOptions /* -ansi */ #endif #define OptimizedCDebugFlags -O2 /* Add -g -mstandard for full debuging info */ #define OptimizedCplusplusDebugFlags @@ -145,7 +145,7 @@ #ifndef ServerOSDefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #endif #ifndef BuildDynamicLoading #define BuildDynamicLoading NO Index: xc/config/cf/FreeBSD.cf diff -u xc/config/cf/FreeBSD.cf:3.148 xc/config/cf/FreeBSD.cf:3.155 --- xc/config/cf/FreeBSD.cf:3.148 Fri Feb 6 23:30:15 2004 +++ xc/config/cf/FreeBSD.cf Wed Mar 2 22:32:17 2005 @@ -1,8 +1,52 @@ -XCOMM platform: $Xorg: FreeBSD.cf,v 1.3 2000/08/17 19:41:45 cpqbld Exp $ -XCOMM -XCOMM -XCOMM -XCOMM platform: $XFree86: xc/config/cf/FreeBSD.cf,v 3.148 2004/02/07 04:30:15 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/FreeBSD.cf,v 3.155 2005/03/03 03:32:17 dawes Exp $ + +/* + * Copyright (c) 1994-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef UseElfFormat #define UseElfFormat DefaultToElfFormat @@ -46,6 +90,7 @@ #define HasNdbm YES #define HasPutenv YES #define HasSnprintf YES +#define HasAsprintf YES #if OSMajorVersion == 3 && OSMinorVersion >= 3 || OSMajorVersion > 3 # define HasStrlcat YES #endif @@ -117,12 +162,12 @@ # if HasLibPthread # define ThreadsLibraries -lpthread # else +# define BuildThreadStubLibrary YES # if OSRelVersion >= 500043 -# define BuildThreadStubLibrary NO -# define NeedUIThrStubs NO +# define NeedUIThrStubs NO +# define ThrStubsForCompat YES # else -# define BuildThreadStubLibrary YES -# define NeedUIThrStubs YES +# define NeedUIThrStubs YES # endif # if (OSRelVersion >= 500016) # define ThreadsLibraries -lc_r @@ -130,8 +175,10 @@ # else # define ThreadsLibraries -pthread # endif -# define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB) -# define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB) +# if NeedUIThrStubs +# define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB) +# define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB) +# endif # endif #endif @@ -207,7 +254,7 @@ #else #define NoSystemWarn #endif -#define DefaultCCOptions -ansi -pedantic NoSystemWarn -Dasm=__asm \ +#define DefaultCCOptions -ansi NoSystemWarn -Dasm=__asm \ GccWarningOptions #endif #endif @@ -349,6 +396,11 @@ # endif # endif +# ifndef ExtraSharedLibraryLoadFlags +# if !UseElfFormat +# define ExtraSharedLibraryLoadFlags /**/ +# endif +# endif #endif #ifndef LibraryRpathLoadFlags @@ -396,7 +448,7 @@ #if UseElfFormat # define AsmElfDefines -D__ELF__ #else -# define AsmElfDefines /**/ +# define AsmElfDefines -D__AOUT__ #endif #if GccUsesGas @@ -414,7 +466,7 @@ defined(ia64Architecture) || defined(AMD64Architecture) #define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64 #endif -#ifdef Sparc64Architecture +#if defined(Sparc64Architecture) && UseElfFormat #define AsVISOption -Av9a #define AsOutputArchSize 64 #endif @@ -422,7 +474,7 @@ #define StandardDefines -DCSRG_BASED #if OSMajorVersion > 1 -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerOSDefines XFree86ServerOSDefines #define XawI18nDefines -DUSE_XWCHAR_STRING #define HasMakefileSafeInclude YES #define IncludeMakefile(file) @@# dependencies are in .depend @@ -435,7 +487,7 @@ #endif #define HasMkstemp YES #else -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF +#define ServerOSDefines XFree86ServerOSDefines -DXNO_SYSCONF #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC #endif Index: xc/config/cf/Imake.cf diff -u xc/config/cf/Imake.cf:3.89 xc/config/cf/Imake.cf:3.91 --- xc/config/cf/Imake.cf:3.89 Sat Jan 24 20:12:20 2004 +++ xc/config/cf/Imake.cf Sat Apr 3 17:26:20 2004 @@ -17,7 +17,7 @@ * * 4. Create a .cf file with the name given by MacroFile. */ -XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.89 2004/01/25 01:12:20 dawes Exp $ +XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.91 2004/04/03 22:26:20 dawes Exp $ #if defined(__APPLE__) # undef __APPLE__ @@ -145,6 +145,12 @@ # undef __alpha__ # undef alpha # endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif # if defined(__mc68020__) || defined(mc68020) # define Mc68020Architecture # if defined(amiga) @@ -335,9 +341,10 @@ # define HPArchitecture #endif /* hpux */ -#ifdef sco +#ifdef __SCO__ # define MacroIncludeFile # define MacroFile sco5.cf +# undef __SCO__ # undef sco # undef USL # undef SYSV @@ -369,7 +376,7 @@ # undef __pentium # undef pentiumpro # undef __pentiumpro -#endif /* sco - SCO Open Server 5 */ +#endif /* __SCO__ - SCO Open Server 5 */ #ifdef USL # define MacroIncludeFile Index: xc/config/cf/Imake.rules diff -u xc/config/cf/Imake.rules:3.129 xc/config/cf/Imake.rules:3.142 --- xc/config/cf/Imake.rules:3.129 Mon Feb 16 13:14:33 2004 +++ xc/config/cf/Imake.rules Sun Jan 23 12:05:23 2005 @@ -1,11 +1,52 @@ XCOMM --------------------------------------------------------------------- XCOMM Imake rules for building libraries, programs, scripts, and data files -XCOMM rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ -XCOMM -XCOMM -XCOMM -XCOMM -XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.129 2004/02/16 18:14:33 dawes Exp $ +XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.142 2005/01/23 17:05:23 tsi Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * MACHINE-INDEPENDENT RULES; DO NOT MODIFY @@ -1157,7 +1198,7 @@ #ifndef InstallNamedTarget #define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\ -step:: srcname @@\ +step:: @@\ MakeDir($(DESTDIR)dest) @@\ InstallNamedInline(srcname,flags,dest,dstname) #endif /* InstallNamedTarget */ @@ -1170,7 +1211,7 @@ */ #ifndef InstallNamedTargetNoClobber #define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\ -step:: srcname @@\ +step:: @@\ MakeDir($(DESTDIR)dest) @@\ @if [ -f $(DESTDIR)dest/dstname ]; then \ @@\ echo "Not overwriting existing" $(DESTDIR)dest/dstname; \ @@\ @@ -1192,7 +1233,7 @@ */ #ifndef InstallLibrary #define InstallLibrary(libname,dest) @@\ -install:: LibraryTargetName(libname) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname)) @@ -1237,7 +1278,7 @@ */ #ifndef MergeIntoInstalledLibrary #define MergeIntoInstalledLibrary(tolib,fromlib) @@\ -install:: fromlib @@\ +install:: @@\ $(SCRIPTSRC)/mergelib $(DESTDIR)tolib fromlib #endif /* MergeIntoInstalledLibrary */ @@ -1309,7 +1350,7 @@ @@\ CppManTarget(file, $(EXTRAMANDEFS)) @@\ @@\ -install.man:: file.$(MANNEWSUFFIX) @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ $(DESTDIR)destdir/dest.suffix @@ -1341,7 +1382,7 @@ @@\ CppManTarget(file, $(EXTRAMANDEFS)) @@\ @@\ -install.man:: file.$(MANNEWSUFFIX) @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ @@ -1355,7 +1396,7 @@ @@\ CppManTarget(file, $(EXTRAMANDEFS)) @@\ @@\ -install.man:: file.$(MANNEWSUFFIX) @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.suffix* @@\ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\ @@ -1365,7 +1406,7 @@ #ifndef InstallMultipleMan #define InstallMultipleMan(list,dest) @@\ -install.man:: list @@\ +install.man:: @@\ MakeDir($(DESTDIR)dest) @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for i in list; do \ @@\ @@ -1468,7 +1509,7 @@ RunProgram(RMAN,$(RMANOPTIONS) < file.$(MANNEWSUFFIX) \ @@\ > dest.suffix-html) && $(MV) dest.suffix-html $@ @@\ @@\ -install.man:: dest.suffix.html @@\ +install.man:: @@\ MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\ @(SUF=`expr suffix \: '\(.\)'`; \ @@\ set -x; \ @@\ @@ -1484,7 +1525,7 @@ #ifndef InstallHtmlManPageAliases #if BuildHtmlManPages #define InstallHtmlManPageAliases(file,aliases,suffix) @@\ -install.man:: file.suffix.html @@\ +install.man:: @@\ @SUF=`expr suffix \: '\(.\)'`; \ @@\ for i in aliases; do (set -x; \ @@\ RemoveFile($(DESTDIR)$(DOCHTMLDIR)/$$i.$$SUF.html); \ @@\ @@ -1575,7 +1616,7 @@ */ #ifndef InstallNonExec #define InstallNonExec(file,dest) @@\ -install:: file @@\ +install:: @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) file $(DESTDIR)dest #endif /* InstallNonExec */ @@ -2186,6 +2227,16 @@ $(CC) -S $(CFLAGS) options $*.c #endif +/* + * ObjectAsm - assemble fragment for a normal object file + */ +#ifndef ObjectAsm +#define ObjectAsm(options) RemoveFiles($@ $*.i) @@\ + $(CPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) options $*.S | \ @@\ + grep -v '^\#' > $*.i @@\ + $(AS) $(ASMOPTS) -o $*.o $*.i @@\ + RemoveFile($*.i) +#endif /* * CompileCplusplusToAsm - compile C++ file to assembler @@ -2218,6 +2269,10 @@ # endif #endif +#ifndef NormalLibObjAsm +#define NormalLibObjAsm(options) ObjectAsm(options) +#endif + #ifndef NormalLibObjCplusplusCompile #define NormalLibObjCplusplusCompile(options) ObjectCplusplusCompile(options) #endif @@ -2229,6 +2284,10 @@ #define NormalSharedLibObjCompile(options) NormalLibObjCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS)) #endif +#ifndef NormalSharedLibObjAsm +#define NormalSharedLibObjAsm(options) NormalLibObjAsm(options) +#endif + #ifndef NormalSharedLibObjCplusplusCompile #define NormalSharedLibObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(CXXPICFLAGS)) #endif @@ -2251,6 +2310,17 @@ #endif #endif +/* + * LibObjAsm - assemble fragment for unshared/profiled/debugged objects + */ +#ifndef LibObjAsm +#define LibObjAsm(dir,options,asmopt) RemoveFiles($@ dir/$@ $*.i) @@\ + $(CPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) options $*.S | \ @@\ + grep -v '^\#' > $*.i @@\ + $(AS) asmopt -o dir/$@ $*.i @@\ + RemoveFile($*.i) +#endif + #ifndef LibObjCplusplusCompile #if HasGcc || HasGcc2 #define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\ @@ -2295,6 +2365,12 @@ #define UnsharedLibObjCompile(options) LibObjCompile(unshared,$(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) options) #endif +#if 0 +#ifndef UnsharedLibObjAsm +#define UnsharedLibObjAsm(options) LibObjAsm(unshared,$(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) options,NullParameter) +#endif +#endif + #ifndef UnsharedLibObjCplusplusCompile #define UnsharedLibObjCplusplusCompile(options) LibObjCplusplusCompile(unshared,$(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) options) #endif @@ -2382,24 +2458,21 @@ #ifndef CPPOnlyAsm #define CPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\ - $(CPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\ + $(CPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\ grep -v '^\#' > basename.i #endif #ifndef AssembleObject #define AssembleObject(flags) CPPOnlyAsm($*,flags) @@\ RemoveFile($*.o) @@\ - $(AS) -o $*.o $*.i @@\ + $(AS) $(ASMOPTS) -o $*.o $*.i @@\ RemoveFile($*.i) #endif #ifndef NormalAsmObjectRule #define NormalAsmObjectRule() @@\ .S.o: @@\ - AssembleObject($(_NOOP_)) @@\ - @@\ -.S.i: @@\ - CPPOnlyAsm($*,$(_NOOP_)) + AssembleObject($(_NOOP_)) #endif #ifndef ObjectFromSpecialAsmSource @@ -2448,19 +2521,15 @@ @@\ clean:: @@\ RemoveFiles(lex.yy.c file.c) -#endif +#endif /* LexFilePrefix */ #ifndef LexFileExplicit -#if HasClearmake /* provide a place to hang ClearmakeOSName */ #define LexFileExplicit(file) @@\ file.c: file.l @@\ ClearmakeOSName \ $(LEX) $(LFLAGS) file.l @@\ $(MV) lex.yy.c file.c -#else -#define LexFileExplicit(file) /* the default rule is fine */ -#endif -#endif +#endif /* LexFileExplicit */ #ifndef LexFile #define LexFile(file) @@\ @@ -2515,7 +2584,7 @@ clean:: @@\ RemoveFiles(y.tab.c y.tab.h file.h file.c) #endif -#endif /* YaccFile */ +#endif /* YaccFilePrefix */ #ifndef YaccFile #if HasGnuMake @@ -2567,27 +2636,35 @@ #define MakeLibrary(libname,objlist) $(AR) libname objlist #endif -#ifndef LinkBuildLibrary +#ifndef LinkBuildLibrarySubdir #ifdef UseInstalled -#define LinkBuildLibrary(lib) $(_NULLCMD_) +#define LinkBuildLibrarySubdir(lib,down,up) $(_NULLCMD_) #else -#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ +#define LinkBuildLibrarySubdir(lib,down,up) MakeDir($(BUILDLIBDIR)/down) @@\ RemoveFile($(BUILDLIBDIR)/lib) @@\ - cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . + cd $(BUILDLIBDIR)/down && $(LN) $(BUILDLIBTOP)/up/$(CURRENT_DIR)/lib . #endif +#endif /* LinkBuildLibrarySubdir */ + +#ifndef LinkBuildLibrary +#define LinkBuildLibrary(lib) LinkBuildLibrarySubdir(lib,.,.) #endif /* LinkBuildLibrary */ -#ifndef LinkBuildLibraryMaybe +#ifndef LinkBuildLibrarySubdirMaybe #ifdef UseInstalled -#define LinkBuildLibraryMaybe(lib,doit) $(_NULLCMD_) +#define LinkBuildLibrarySubdirMaybe(lib,down,up,doit) $(_NULLCMD_) #else -#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ +#define LinkBuildLibrarySubdirMaybe(lib,down,up,doit) MakeDir($(BUILDLIBDIR)/down) @@\ @if doit; then (set -x; \ @@\ RemoveFile($(BUILDLIBDIR)/lib); \ @@\ - cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi + cd $(BUILDLIBDIR)/down && $(LN) $(BUILDLIBTOP)/up/$(CURRENT_DIR)/lib .); fi #endif #endif /* LinkBuildLibraryMaybe */ +#ifndef LinkBuildLibraryMaybe +#define LinkBuildLibraryMaybe(lib,doit) LinkBuildLibrarySubdirMaybe(lib,.,.,doit) +#endif + #ifndef _LinkBuildLibrary /* will get redefined elsewhere */ #define _LinkBuildLibrary(lib) $(_NULLCMD_) #endif /* _LinkBuildLibrary */ @@ -3214,7 +3291,7 @@ imakeprefix=$$newtop/ ;; \ @@\ esac; \ @@\ RemoveFile($$i/Makefile.bak); \ @@\ - if [ -f $$i/Makefile ]; then \ @@\ + if [ -f $$i/Makefile -o -h $$i/Makefile ]; then \ @@\ echo " $(MV) Makefile Makefile.bak"; \ @@\ if [ "$$executeit" != "no" ]; then \ @@\ $(MV) $$i/Makefile $$i/Makefile.bak; \ @@\ @@ -3335,7 +3412,7 @@ @@\ clean:: @@\ RemoveFiles(dst) -#endif /* CppFileTarget */ +#endif /* CppRawFileTarget */ /* * CppManTarget - preprocess man pages. OS-specific man sections are replaced. @@ -3399,15 +3476,14 @@ #endif /* MakeMutex */ /* - * Rules for dynamic modules. These are primarily used by XFree86 + * Rules for dynamic modules. These are primarily used by XFree86. */ #ifndef LinkBuildModule #ifdef UseInstalled #define LinkBuildModule(module,subdir) $(_NULLCMD_) #else -#define LinkBuildModule(module,subdir)\ - MakeDir($(BUILDMODULEDIR)/subdir) @@\ +#define LinkBuildModule(module,subdir) MakeDir($(BUILDMODULEDIR)/subdir) @@\ RemoveFile($(BUILDMODULEDIR)/subdir/module) @@\ @(UP="`$(REVPATH) subdir`"; set -x; \ @@\ cd $(BUILDMODULEDIR)/subdir && \ @@\ @@ -3419,8 +3495,7 @@ #ifdef UseInstalled #define LinkBuildNamedModule(module,name,subdir) $(_NULLCMD_) #else -#define LinkBuildNamedModule(module,name,subdir)\ - MakeDir($(BUILDMODULEDIR)/subdir) @@\ +#define LinkBuildNamedModule(module,name,subdir) MakeDir($(BUILDMODULEDIR)/subdir) @@\ RemoveFile($(BUILDMODULEDIR)/subdir/name) @@\ @(UP="`$(REVPATH) subdir`"; set -x; \ @@\ cd $(BUILDMODULEDIR)/subdir && \ @@\ @@ -3440,11 +3515,28 @@ */ #ifndef ObjectModuleTarget #if MakeDllModules && DoLoadableServer -#define ObjectModuleTarget(module,objects) @@\ -DynamicModuleTarget(Concat(module,_drv.so), objects) +#define ObjectModuleTarget(module,objects,subdir) @@\ +DynamicModuleTarget(Concat(module,_drv.so), objects) @@\ + LinkBuildModule($@,subdir) #else -#define ObjectModuleTarget(module,objects) @@\ -NormalRelocatableTarget(Concat(module,_drv), objects) +#define ObjectModuleTarget(module,objects,subdir) @@\ +NormalRelocatableTarget(Concat(module,_drv), objects) @@\ + LinkBuildModule($@,subdir) +#endif +#endif + +/* + * NamedObjectModuleTarget - build a module as a single object file + */ +#ifndef PlainObjectModuleTarget +#if MakeDllModules && DoLoadableServer +#define PlainObjectModuleTarget(module,objects,subdir) @@\ +DynamicModuleTarget(name.so, objects) @@\ + LinkBuildModule($@,subdir) +#else +#define PlainObjectModuleTarget(module,objects,subdir) @@\ +NormalRelocatableTarget(module,objects) @@\ + LinkBuildModule($@,subdir) #endif #endif @@ -3453,12 +3545,14 @@ */ #ifndef LibraryModuleTarget #if MakeDllModules && DoLoadableServer -#define LibraryModuleTarget(module,objects) @@\ +#define LibraryModuleTarget(module,objects,subdir) @@\ NormalLibraryTarget(module, objects) @@\ -DynamicModuleTarget(Concat3(lib,module,.so), objects) +DynamicModuleTarget(Concat3(lib,module,.so), objects) @@\ + LinkBuildModule($@,subdir) #else -#define LibraryModuleTarget(module, objects) @@\ -NormalLibraryTarget(module, objects) +#define LibraryModuleTarget(module, objects,subdir) @@\ +NormalLibraryTarget(module, objects) @@\ + LinkBuildModule($@,subdir) #endif #endif @@ -3467,12 +3561,14 @@ */ #ifndef DepLibraryModuleTarget #if MakeDllModules && DoLoadableServer -#define DepLibraryModuleTarget(module,deplist,objects) @@\ +#define DepLibraryModuleTarget(module,deplist,objects,subdir) @@\ NormalDepLibraryTarget(module, deplist, objects) @@\ -DepDynamicModuleTarget(Concat3(lib,module,.so), deplist, objects) +DepDynamicModuleTarget(Concat3(lib,module,.so), deplist, objects) @@\ + LinkBuildModule($@,subdir) #else -#define DepLibraryModuleTarget(module,deplist,objects) @@\ -NormalDepLibraryTarget(module, deplist, objects) +#define DepLibraryModuleTarget(module,deplist,objects,subdir) @@\ +NormalDepLibraryTarget(module, deplist, objects) @@\ + LinkBuildModule($@,subdir) #endif #endif @@ -3511,20 +3607,14 @@ */ #ifndef InstallDynamicModule #define InstallDynamicModule(module,dest,subdir) @@\ -AllTarget(module) @@\ - LinkBuildModule(module,subdir) @@\ - @@\ -install:: module @@\ +install:: @@\ MakeDir($(DESTDIR)dest/subdir) @@\ $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir #endif #ifndef InstallDynamicNamedModule #define InstallDynamicNamedModule(module,instname,dest,subdir) @@\ -AllTarget(module) @@\ - LinkBuildNamedModule(module,instname,subdir) @@\ - @@\ -install:: module @@\ +install:: @@\ MakeDir($(DESTDIR)dest/subdir) @@\ $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir/instname #endif @@ -3543,6 +3633,20 @@ #endif #endif +#ifndef InstallPlainObjectModule +#if !DoLoadableServer +#define InstallPlainObjectModule(module,dest,subdir) /**/ +#else +#if MakeDllModules +#define InstallPlainObjectModule(module,dest,subdir) @@\ +InstallDynamicModule(module.so,dest,subdir) +#else +#define InstallPlainObjectModule(module,dest,subdir) @@\ +InstallDynamicModule(module.o,dest,subdir) +#endif +#endif +#endif + #ifndef InstallLibraryModule #if !DoLoadableServer #define InstallLibraryModule(module,dest,subdir) /**/ Index: xc/config/cf/Imake.tmpl diff -u xc/config/cf/Imake.tmpl:3.156 xc/config/cf/Imake.tmpl:3.169 --- xc/config/cf/Imake.tmpl:3.156 Mon Jan 12 16:43:18 2004 +++ xc/config/cf/Imake.tmpl Thu Feb 10 22:02:53 2005 @@ -1,12 +1,53 @@ XCOMM ---------------------------------------------------------------------- XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE -XCOMM $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ -XCOMM -XCOMM -XCOMM -XCOMM -XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.156 2004/01/12 21:43:18 herrb Exp $ +XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.169 2005/02/11 03:02:53 dawes Exp $ XCOMM ---------------------------------------------------------------------- +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * generic imake template @@ -425,6 +466,9 @@ #ifndef HasSnprintf #define HasSnprintf NO /* assume not */ #endif +#ifndef HasAsprintf +#define HasAsprintf NO /* assume not */ +#endif #ifndef HasStrlcat #define HasStrlcat NO /* assume not */ #endif @@ -1133,6 +1177,15 @@ #ifndef AsmDefines #define AsmDefines /**/ #endif +#ifndef CPPAsmOptions +# if HasGcc && \ + ((GccMajorVersion < 3) || \ + ((GccMajorVersion == 3) && (GccMinorVersion < 3))) +# define CPPAsmOptions -$$ +# else +# define CPPAsmOptions /**/ +# endif +#endif #ifndef CompressCmd #define CompressCmd compress #endif @@ -1339,6 +1392,9 @@ #ifndef MathLibrary #define MathLibrary -lm #endif +#ifndef ExpatLibrary +#define ExpatLibrary $(EXPATLIB) +#endif #ifndef DBMLibrary #define DBMLibrary -ldbm #endif @@ -1362,6 +1418,12 @@ #ifndef ExtraLoadFlags #define ExtraLoadFlags /**/ #endif +#ifndef ExtraSharedLibraryLoadOptions +#define ExtraSharedLibraryLoadOptions ExtraLoadOptions +#endif +#ifndef ExtraSharedLibraryLoadFlags +#define ExtraSharedLibraryLoadFlags ExtraLoadFlags +#endif #ifndef LdCombineFlags #if SystemV4 #define LdCombineFlags -r @@ -1410,11 +1472,7 @@ #endif #endif #ifndef DependDefines -# if UseCCMakeDepend || UseGccMakeDepend -# define DependDefines /**/ -# else -# define DependDefines -DUSE_MAKEDEPEND -# endif +# define DependDefines /**/ #endif #ifndef DependFlags #define DependFlags /**/ @@ -1687,6 +1745,8 @@ IMAKESRC = $(CONFIGSRC)/imake DEPENDSRC = DependDir + LIBPREFIX = lib + INCROOT = IncRoot /* base of where to put header files */ USRLIBDIR = UsrLibDir /* nonshared libraries */ VARDIR = VarDirectory /* usually /var */ @@ -1815,7 +1875,7 @@ ADMINMANSUFFIX = AdminManSuffix /* suffix for admin command man pages */ MANSRCSUFFIX = ManSrcSuffix /* suffix for man page source */ MANNEWSUFFIX = ManNewSuffix /* suffix for preprocessed man source */ - MANDEFS = AppLoadDefs FileManDefs LibManDefs MiscManDefs DriverManDefs AdminManDefs ProjectManDefs $(XORGMANDEFS) $(VENDORMANDEFS) + MANDEFS = AppLoadDefs FileManDefs LibManDefs MiscManDefs DriverManDefs AdminManDefs ProjectManDefs $(VENDORMANDEFS) COMPRESSMANCMD = CompressManCmd @@ -1839,7 +1899,7 @@ #else MODCC = ModuleCcCmd #endif - MODCPP = ModuleCppCmd + MODCPP = ModuleCppCmd $(STD_CPP_DEFINES) MODCFLAGS = ModuleCFlags MODAS = ModuleAsCmd MODASFLAGS = ModuleAsFlags @@ -1897,7 +1957,9 @@ SHAREDCODEDEF = SharedCodeDef SHLIBDEF = SharedLibraryDef #ifdef SharedLibraryLoadFlags - SHLIBLDFLAGS = SharedLibraryLoadFlags $(SHLIBGLOBALSFLAGS) + SHLIBLDFLAGS = SharedLibraryLoadFlags \ + $(SHLIBGLOBALSFLAGS) \ + ExtraSharedLibraryLoadFlags ExtraSharedLibraryLoadOptions #endif /* * Here we set up flags needed to produce position-independent code @@ -2122,6 +2184,11 @@ .c.i: CPPOnlyCompile($*.c,$(_NOOP_)) +.SUFFIXES: .S + +.S.i: + CPPOnlyAsm($*,$(_NOOP_)) + .SUFFIXES: .ii .cc.ii: Index: xc/config/cf/Imakefile diff -u xc/config/cf/Imakefile:3.30 xc/config/cf/Imakefile:3.31 --- xc/config/cf/Imakefile:3.30 Wed Feb 26 04:21:32 2003 +++ xc/config/cf/Imakefile Sat Apr 3 16:45:53 2004 @@ -1,5 +1,5 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ -XCOMM $XFree86: xc/config/cf/Imakefile,v 3.30 2003/02/26 09:21:32 dawes Exp $ +XCOMM $XFree86: xc/config/cf/Imakefile,v 3.31 2004/04/03 21:45:53 dawes Exp $ XCOMM Some compilers generate fatal errors if an -L directory does XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use. @@ -42,7 +42,6 @@ oldlib.rules \ os2.rules \ os2Lib.rules \ -os2Lib.rules \ osfLib.rules \ scoLib.rules \ sgiLib.rules \ Index: xc/config/cf/Library.tmpl diff -u xc/config/cf/Library.tmpl:3.24 xc/config/cf/Library.tmpl:3.25 --- xc/config/cf/Library.tmpl:3.24 Tue Oct 21 13:41:43 2003 +++ xc/config/cf/Library.tmpl Sun Apr 4 22:33:07 2004 @@ -19,7 +19,7 @@ -XCOMM $XFree86: xc/config/cf/Library.tmpl,v 3.24 2003/10/21 17:41:43 tsi Exp $ +XCOMM $XFree86: xc/config/cf/Library.tmpl,v 3.25 2004/04/05 02:33:07 dawes Exp $ #ifndef DoNormalLib #define DoNormalLib NO @@ -179,11 +179,17 @@ # define _DebuggedObjCompile(options) DebuggedLibObjCompile(options) # define _DebuggedObjCplusplusCompile(options) DebuggedLibObjCplusplusCompile(options) # define _DebuggedCleanDir() LibCleanDir(debugger) +# ifdef DebuggedLibObjAsm +# define _DebuggedObjAsm(options) DebuggedLibObjAsm(options) +# else +# define _DebuggedObjAsm(options) $(_NULLCMD_) +# endif #else # define _DebuggedLibMkdir() $(_NULLCMD_) # define _DebuggedObjCompile(options) $(_NULLCMD_) # define _DebuggedObjCplusplusCompile(options) $(_NULLCMD_) # define _DebuggedCleanDir() $(_NULLCMD_) +# define _DebuggedObjAsm(options) $(_NULLCMD_) #endif #if DoProfileLib @@ -191,11 +197,17 @@ # define _ProfiledObjCompile(options) ProfiledLibObjCompile(options) # define _ProfiledObjCplusplusCompile(options) ProfiledLibObjCplusplusCompile(options) # define _ProfiledCleanDir() LibCleanDir(profiled) +# ifdef ProfiledLibObjAsm +# define _ProfiledObjAsm(options) ProfiledLibObjAsm(options) +# else +# define _ProfiledObjAsm(options) $(_NULLCMD_) +# endif #else # define _ProfiledLibMkdir() $(_NULLCMD_) # define _ProfiledObjCompile(options) $(_NULLCMD_) # define _ProfiledObjCplusplusCompile(options) $(_NULLCMD_) # define _ProfiledCleanDir() $(_NULLCMD_) +# define _ProfiledObjAsm(options) $(_NULLCMD_) #endif #if !DoNormalLib @@ -203,12 +215,18 @@ # define _NormalObjCompile(options) $(_NULLCMD_) # define _NormalObjCplusplusCompile(options) $(_NULLCMD_) # define _NormalCleanDir() $(_NULLCMD_) +# define _NormalObjAsm(options) $(_NULLCMD_) #else # if DoSharedLib && SeparateSharedCompile # define _NormalLibMkdir() _LibMkdir(unshared) # define _NormalObjCompile(options) UnsharedLibObjCompile(options) # define _NormalObjCplusplusCompile(options) UnsharedLibObjCplusplusCompile(options) # define _NormalCleanDir() LibCleanDir(unshared) +# ifdef UnsharedLibObjAsm +# define _NormalObjAsm(options) UnsharedLibObjAsm(options) +# else +# define _NormalObjAsm(options) $(_NULLCMD_) +# endif # else # define _NormalLibMkdir() $(_NULLCMD_) # if !DoSharedLib && defined(IncludeSharedObjectInNormalLib) @@ -218,19 +236,35 @@ # endif # define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options) # define _NormalCleanDir() $(_NULLCMD_) +# ifdef NormalLibObjAsm +# define _NormalObjAsm(options) NormalLibObjAsm(options) +# else +# define _NormalObjAsm(options) $(_NULLCMD_) +# endif # endif #endif #if !DoSharedLib || (DoNormalLib && !SeparateSharedCompile) # define _SharedObjCompile(options) $(_NULLCMD_) # define _SharedObjCplusplusCompile(options) $(_NULLCMD_) +# define _SharedObjAsm(options) $(_NULLCMD_) #else # if SeparateSharedCompile # define _SharedObjCompile(options) NormalSharedLibObjCompile(options) # define _SharedObjCplusplusCompile(options) NormalSharedLibObjCplusplusCompile(options) +# ifdef NormalSharedLibObjAsm +# define _SharedObjAsm(options) NormalSharedLibObjAsm(options) +# else +# define _SharedObjAsm(options) $(_NULLCMD_) +# endif #else # define _SharedObjCompile(options) NormalLibObjCompile(options) # define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options) +# ifdef NormalLibObjAsm +# define _SharedObjAsm(options) NormalLibObjAsm(options) +# else +# define _SharedObjAsm(options) $(_NULLCMD_) +# endif #endif #endif @@ -243,11 +277,17 @@ # define _ExtraObjCompile(options) ExtraObjCompile(options) # define _ExtraObjCplusplusCompile(options) ExtraObjCplusplusCompile(options) # define _ExtraCleanDir() ExtraCleanDir() +# ifdef ExtraObjAsm +# define _ExtraObjAsm(options) ExtraObjAsm(options) +# else +# define _ExtraObjAsm(options) $(_NULLCMD_) +# endif #else # define _ExtraLibMkdir() $(_NULLCMD_) # define _ExtraObjCompile(options) $(_NULLCMD_) # define _ExtraObjCplusplusCompile(options) $(_NULLCMD_) # define _ExtraCleanDir() $(_NULLCMD_) +# define _ExtraObjAsm(options) $(_NULLCMD_) #endif #ifndef CplusplusSource @@ -261,6 +301,14 @@ # endif #endif +#define _CompileObjAsm(target, options) @@\ +target @@\ + _DebuggedObjAsm(options) @@\ + _ProfiledObjAsm(options) @@\ + _NormalObjAsm(options) @@\ + _ExtraObjAsm(options) @@\ + _SharedObjAsm(options) + #define _CompileObj(target, options) @@\ target @@\ _DebuggedObjCompile(options) @@\ @@ -309,6 +357,7 @@ _ExtraLibMkdir() @@\ @@\ _CompileObj(.c.Osuf:,$(_NOOP_)) @@\ +_CompileObjAsm(.S.Osuf:,$(_NOOP)) @@\ _CompileObjCplusplus(.SRCsuf.Osuf:,$(_NOOP_)) @@\ @@\ clean:: @@\ @@ -334,6 +383,14 @@ CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options) #endif /* SpecialCLibObjectRule */ +#ifndef SpecialAsmLibObjectRule +# define SpecialAsmLibObjectRule(basename,depends,options) @@\ +_CompileObjAsm(basename.Osuf: basename.S depends,options) @@\ + @@\ +basename.Isuf: basename.SRCsuf depends @@\ + CPPOnlyAsm(basename,options) +#endif /* SpecialAsmLibObjectRule */ + #ifndef SpecialCLibObjectRuleSeparateOpts # define SpecialCLibObjectRuleSeparateOpts(basename,depends,staticopts,shopts) @@\ _CompileObjSeparateOpts(basename.Osuf: basename.SRCsuf depends,staticopts,shopts) @@\ @@ -514,7 +571,12 @@ # endif # endif # if DoExtraLib && defined(ExtraLibRules) -ExtraLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRAUNSHAREDOBJS)) +#ifdef ObjectPrefix +OBJS_EXTRA = ${OBJS:%=ObjectPrefix%} +#else +OBJS_EXTRA = $(OBJS) +#endif +ExtraLibraryTarget($(LIBNAME),$(SoRev),$(OBJS_EXTRA)) # if !defined(LibInstall) || LibInstall ExtraInstallLibrary($(LIBNAME),$(SoRev)) # endif Index: xc/config/cf/NetBSD.cf diff -u xc/config/cf/NetBSD.cf:3.123 xc/config/cf/NetBSD.cf:3.127 --- xc/config/cf/NetBSD.cf:3.123 Thu Nov 20 11:18:18 2003 +++ xc/config/cf/NetBSD.cf Thu Feb 3 21:58:27 2005 @@ -1,9 +1,51 @@ -XCOMM platform: $Xorg: NetBSD.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ - - - -XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.123 2003/11/20 16:18:18 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.127 2005/02/04 02:58:27 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef OSName #define OSName DefaultOSName OSBinaryType @@ -38,6 +80,7 @@ # define HasStrlcat YES #endif #define HasSnprintf YES +#define HasAsprintf YES #define HasBSD44Sockets YES #define Malloc0ReturnsNull NO #define SetTtyGroup YES @@ -120,7 +163,11 @@ # define ThreadedX YES # define HasThreadSafeAPI YES # define ThreadsLibraries -lpthread -# define LibraryMTDefines -DUSE_NBSD_THREADLIB +# if ((OSMajorVersion == 2 && OSMinorVersion == 99 && OSTeenyVersion < 11) || \ + (OSMajorVersion == 2 && OSMinorVersion < 99) || \ + (OSMajorVersion < 2)) +# define LibraryMTDefines -DUSE_NBSD_THREADLIB +# endif # define SystemMTDefines -D_REENTRANT # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI #else @@ -224,17 +271,21 @@ # define ServerExtraSysLibs -li386 # endif #else -# define OptimizedCDebugFlags -O2 # if defined(SparcArchitecture) # define ServerOSDefines -DDDXOSINIT +# define OptimizedCDebugFlags DefaultGcc2SparcOpt # elif defined(AlphaArchitecture) # define ServerOSDefines XFree86ServerOSDefines +# define OptimizedCDebugFlags DefaultGcc2AxpOpt # elif defined(Arm32Architecture) -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines +# define OptimizedCDebugFlags -O2 GccAliasingArgs # elif defined(PpcArchitecture) -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT +# define OptimizedCDebugFlags DefaultGcc2PpcOpt # else # define ServerOSDefines /**/ +# define OptimizedCDebugFlags -O2 # endif # if defined(AlphaArchitecture) # define ServerExtraSysLibs -lalpha Index: xc/config/cf/OpenBSD.cf diff -u xc/config/cf/OpenBSD.cf:3.101 xc/config/cf/OpenBSD.cf:3.112 --- xc/config/cf/OpenBSD.cf:3.101 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/OpenBSD.cf Thu Feb 3 21:58:27 2005 @@ -1,5 +1,51 @@ -XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.101 2004/01/09 00:35:00 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.112 2005/02/04 02:58:27 dawes Exp $ XCOMM +/* + * Copyright (c) 1994-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef OSName #define OSName DefaultOSName OSBinaryType @@ -44,6 +90,7 @@ #define HasNdbm YES #define HasPutenv YES #define HasSnprintf YES +#define HasAsprintf YES #if OSMajorVersion == 2 && OSMinorVersion >= 4 || OSMajorVersion >= 3 # define HasStrlcat YES #endif @@ -187,9 +234,6 @@ #endif #endif -#define GccGasOption -DGCCUSESGAS -#define AsmDefines -DUSE_GAS - /* UseElfFormat defaults to YES if __ELF__ set */ #ifndef UseElfFormat # ifdef __ELF__ @@ -200,6 +244,13 @@ # endif #endif +#define GccGasOption -DGCCUSESGAS +#if UseElfFormat +#define AsmDefines -DUSE_GAS +#else +#define AsmDefines -DUSE_GAS -D__AOUT__ +#endif + /* * Increment shared libraries major numbers if using Gcc Stack Protector * (This introduces an ABI change) @@ -353,7 +404,7 @@ */ #ifndef InstallFontAliasesNoComment #define InstallFontAliasesNoComment(dest) @@\ -install:: fonts.alias @@\ +install:: @@\ $(RM) _fonts.alias @@\ sed -e '/^!/d' -e '/^$$/d' < fonts.alias > _fonts.alias @@\ MakeDir($(DESTDIR)dest) @@\ @@ -414,8 +465,7 @@ # ifndef HasNetBSDApertureDriver # define HasNetBSDApertureDriver YES # endif -# define ServerOSDefines XFree86ServerOSDefines \ - -DDDXTIME -DDDXOSINIT +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT # define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines # define ServerExtraSysLibs -lalpha # ifndef DoLoadableServer @@ -432,6 +482,44 @@ #endif /* AlphaArchitecture */ +/* + * Definitions for the AMD64 architecture + */ +#ifdef AMD64Architecture + +# define HasWeakSymbols YES +# define HasSharedLibraries YES +# define HasDlopen YES + +# define XF86Server YES + +# ifndef DoLoadableServer +# define DoLoadableServer NO +# endif + +# ifndef HasNetBSDApertureDriver +# define HasNetBSDApertureDriver YES +# endif + +# define HasAgpGart YES + +# define ServerExtraSysLibs -lamd64 +# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines + +# ifndef XFree86ConsoleDefines +# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT +# endif + +# ifndef HasMMXSupport +# define HasMMXSupport YES +# endif + +# ifndef HasX86Support +# define HasX86Support YES +# endif +# include + +#endif /* AMD64Architecture */ /* * Definitions for the i386 architecture @@ -447,12 +535,6 @@ # ifndef BuildXF86DRI # define BuildXF86DRI NO # endif -# ifndef BuildXF86DRM -# define BuildXF86DRM NO -# endif -# ifndef BuildXF86OldDRMCompat -# define BuildXF86OldDRMCompat NO -# endif # endif #define HasWeakSymbols YES @@ -488,7 +570,7 @@ # endif # endif # define OptimizedCDebugFlags DefaultGcc2i386Opt -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraSysLibs -li386 # define LdPostLib /**/ # define ServerExtraDefines GccGasOption XFree86ServerDefines @@ -721,8 +803,7 @@ /* Definitions for building the X server */ # if XF86Server -# define ServerOSDefines XFree86ServerOSDefines \ - -DDDXTIME -DDDXOSINIT +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT # define ServerExtraDefines GccGasOption XFree86ServerDefines # ifndef DoLoadableServer # define DoLoadableServer YES @@ -746,6 +827,10 @@ # include +# ifdef DefaultGcc2PpcOpt +# define OptimizedCDebugFlags DefaultGcc2PpcOpt +# endif + #endif /* PpcArchitecture */ /* @@ -793,6 +878,10 @@ # define BuildXInputExt NO # include +# ifdef DefaultGcc2SparcOpt +# define OptimizedCDebugFlags DefaultGcc2SparcOpt +# endif + #endif /* SparcArchitecture */ /* @@ -810,8 +899,7 @@ # endif # define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines -# define ServerOSDefines XFree86ServerOSDefines \ - -DDDXTIME -DDDXOSINIT +# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT # define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT # if XF86Server @@ -823,6 +911,10 @@ # include +# if defined(DefaultGcc2SparcOpt) && !defined(OptimizedCDebugFlags) +# define OptimizedCDebugFlags DefaultGcc2SparcOpt +# endif + #endif /* Sparc64Architecture */ /* Index: xc/config/cf/OpenBSDLib.rules diff -u xc/config/cf/OpenBSDLib.rules:1.11 xc/config/cf/OpenBSDLib.rules:1.17 --- xc/config/cf/OpenBSDLib.rules:1.11 Mon Jan 26 20:37:38 2004 +++ xc/config/cf/OpenBSDLib.rules Mon May 31 20:16:53 2004 @@ -7,7 +7,53 @@ * OpenBSD shared library rules */ -XCOMM $XFree86: xc/config/cf/OpenBSDLib.rules,v 1.11 2004/01/27 01:37:38 dawes Exp $ +XCOMM $XFree86: xc/config/cf/OpenBSDLib.rules,v 1.17 2004/06/01 00:16:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef UseElfFormat #define UseElfFormat NO @@ -78,9 +124,9 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest #endif /* InstallSharedLibrary */ /* @@ -99,9 +145,9 @@ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist @@\ +Concat($(LIBPREFIX),libname.so.rev): solist @@\ $(RM) $@~ @@\ set -x; \ @@\ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$@\ @@\ @@ -111,7 +157,7 @@ $(MV) $@~ $@ @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedLibraryTarget */ @@ -121,9 +167,9 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ @@ -131,7 +177,7 @@ LinkBuildLibrary($@) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedDepLibraryTarget */ @@ -144,6 +190,7 @@ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ + LinkBuildModule($@,dri) @@\ @@\ clean:: @@\ $(RM) name Index: xc/config/cf/OpenBSDLib.tmpl diff -u xc/config/cf/OpenBSDLib.tmpl:1.9 xc/config/cf/OpenBSDLib.tmpl:1.11 --- xc/config/cf/OpenBSDLib.tmpl:1.9 Sat Jan 10 04:09:51 2004 +++ xc/config/cf/OpenBSDLib.tmpl Fri Dec 31 09:55:35 2004 @@ -1,5 +1,5 @@ XCOMM platform: $OpenBSD: OpenBSDLib.tmpl,v 1.6 2003/04/04 19:48:58 matthieu Exp $ -XCOMM platform: $XFree86: xc/config/cf/OpenBSDLib.tmpl,v 1.9 2004/01/10 09:09:51 herrb Exp $ +XCOMM platform: $XFree86: xc/config/cf/OpenBSDLib.tmpl,v 1.11 2004/12/31 14:55:35 tsi Exp $ XCOMM /* Shared libraries dependencies */ @@ -31,7 +31,7 @@ # define SharedXxf86vmRev 2.0 # endif # ifndef SharedXxf86dgaRev -# define SharedXxf86dgaRev 2.0 +# define SharedXxf86dgaRev 2.1 # endif # ifndef SharedXxf86rushRev # define SharedXxf86rushRev 2.0 @@ -149,8 +149,8 @@ # ifndef SharedXftRev # define SharedXftRev 3.0 # endif -# ifndef SharedXfontconfigRev -# define SharedXfontconfigRev 1.0 +# ifndef SharedFontconfigRev +# define SharedFontconfigRev 1.0 # endif # ifndef SharedXTrapRev # define SharedXTrapRev 7.0 Index: xc/config/cf/QNX4.cf diff -u xc/config/cf/QNX4.cf:1.4 xc/config/cf/QNX4.cf:1.5 --- xc/config/cf/QNX4.cf:1.4 Mon Jan 7 15:38:18 2002 +++ xc/config/cf/QNX4.cf Wed Jun 2 18:42:53 2004 @@ -1,4 +1,4 @@ -XCOMM platform: $XFree86: xc/config/cf/QNX4.cf,v 1.4 2002/01/07 20:38:18 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/QNX4.cf,v 1.5 2004/06/02 22:42:53 dawes Exp $ #define StripInstalledPrograms NO #define BuildServer YES @@ -85,7 +85,7 @@ #define StandardCppDefines -traditional StandardDefines #define StandardDefines OSDefines SourceDefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #define ServerExtraDefines XFree86ServerDefines #define ExtraFilesToClean *.err *.map Index: xc/config/cf/README diff -u xc/config/cf/README:1.21 xc/config/cf/README:1.24 --- xc/config/cf/README:1.21 Sat Dec 20 14:31:46 2003 +++ xc/config/cf/README Mon Sep 20 11:24:57 2004 @@ -3,7 +3,7 @@ -$XFree86: xc/config/cf/README,v 1.21 2003/12/20 19:31:46 dawes Exp $ +$XFree86: xc/config/cf/README,v 1.24 2004/09/20 15:24:57 tsi Exp $ The easiest way to write an Imakefile is to find another one that does something similar and copy/modify it! @@ -172,6 +172,7 @@ BuildAppgroup build AppGroup extension in server BuildCup build Colormap Utilization extension in server BuildDBE build DOUBLE-BUFFER extension + BuildDmx build Distributed Multihead X server and extension BuildDPMS build Display Power Management Signaling extension BuildFontServer build font server BuildFonts build pcf fonts @@ -183,8 +184,6 @@ BuildPlugin build xrx plug-in for web browsers BuildRECORD Build RECORD extension BuildServer build X server - BuildXAudio build Audio - BuildXAServer build Audio server BuildXCSecurity Build Security Extension BuildXInputExt build X Input extension (requires ddx support, which exists only in Xhp and XFree86) @@ -460,6 +459,7 @@ HtmlDir path used by Web server for HTML and RX docs CgiBinDir path used by Web server for CGI programs ProxyManager ICE network ID to contact a running proxymngr + XdmxServer build Distributed Multihead X server Make Variables Index: xc/config/cf/TinyX.cf diff -u xc/config/cf/TinyX.cf:1.1 xc/config/cf/TinyX.cf:1.2 --- xc/config/cf/TinyX.cf:1.1 Fri Dec 8 17:09:32 2000 +++ xc/config/cf/TinyX.cf Wed Jun 2 18:42:53 2004 @@ -1,22 +1,68 @@ -/* $XFree86: xc/config/cf/TinyX.cf,v 1.1 2000/12/08 22:09:32 keithp Exp $ */ +/* $XFree86: xc/config/cf/TinyX.cf,v 1.2 2004/06/02 22:42:53 dawes Exp $ */ /* * This configuration file contains additional configuration needed - * to compile a (nearly) minimal X server using the kdrive infrastructure + * to compile a (nearly) minimal X server using the TinyX infrastructure. * To use this, add the following to host.def: - #define KDriveXServer YES #define TinyXServer YES */ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #define BuildLBX NO #define BuildFonts NO #define BuildAppgroup NO #define BuildDBE NO #define BuildXCSecurity NO -#define FontServerAccess NO #undef BuildXF86RushExt #define BuildXF86RushExt NO #undef BuildRender #define BuildRender YES #define UseRgbTxt YES #define BuildFontServer NO +#define OmitSnfSupport YES + Index: xc/config/cf/Win32.rules diff -u xc/config/cf/Win32.rules:1.5 xc/config/cf/Win32.rules:1.6 --- xc/config/cf/Win32.rules:1.5 Tue Nov 5 12:46:06 2002 +++ xc/config/cf/Win32.rules Wed Mar 24 22:36:21 2004 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/config/cf/Win32.rules,v 1.5 2002/11/05 17:46:06 tsi Exp $ +XCOMM $XFree86: xc/config/cf/Win32.rules,v 1.6 2004/03/25 03:36:21 dawes Exp $ #define HasSharedLibraries YES #define NeedLibInsideFlag YES @@ -410,7 +410,7 @@ #define InstallScript(program,dest) /**/ #define InstallNamedProg(srcname,dstname,dest) @@\ -install:: srcname @@\ +install:: @@\ @echo sorry, unable to install srcname #define InstallSharedLibrary(libname,rev,dest) @@\ Index: xc/config/cf/X11.tmpl diff -u xc/config/cf/X11.tmpl:1.249 xc/config/cf/X11.tmpl:1.277 --- xc/config/cf/X11.tmpl:1.249 Mon Feb 16 13:14:33 2004 +++ xc/config/cf/X11.tmpl Mon Feb 28 22:48:45 2005 @@ -1,11 +1,52 @@ XCOMM ---------------------------------------------------------------------- XCOMM X Window System Build Parameters and Rules -XCOMM $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $ -XCOMM -XCOMM -XCOMM -XCOMM -XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.249 2004/02/16 18:14:33 dawes Exp $ +XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.277 2005/03/01 03:48:45 dawes Exp $ +/* + * Copyright (c) 1994-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /*************************************************************************** * * @@ -39,27 +80,20 @@ * MakeXkbDir (basedir,subdir) */ -/* X.Org release string */ -#ifndef XOrgReleaseString -#define XOrgReleaseString Release 6.6 +#ifndef XVendorString +# define XVendorString "The XFree86 Project, Inc" #endif -#ifndef XOrgManNameString -#define XOrgManNameString X Version 11 +#ifndef XVendorRelease +# define XVendorRelease 40400000 #endif -XORGRELSTRING = XOrgReleaseString -XORGMANNAME = XOrgManNameString - -#ifndef XOrgManDefs -#define XOrgManDefs -D__xorgversion__='"$(XORGRELSTRING)" "$(XORGMANNAME)"' +#ifndef XVendorManVersionString +#define XVendorManVersionString 4.x #endif #ifndef XVendorManNameString -#define XVendorManNameString XOrgManNameString -#endif -#ifndef XVendorManVersionString -#define XVendorManVersionString XOrgReleaseString +#define XVendorManNameString XFree86 #endif VENDORMANNAME = XVendorManNameString @@ -95,8 +129,18 @@ #ifndef BuildDocs #define BuildDocs !BuildServersOnly #endif +#ifndef BuildDmx +#define BuildDmx YES +#endif +#ifndef XdmxServer +#define XdmxServer BuildDmx && BuildServer +#endif +#ifndef BuildLibrariesForDmx +#define BuildLibrariesForDmx XdmxServer +#endif #ifndef BuildLibraries -#define BuildLibraries (!BuildServersOnly || BuildClients) +#define BuildLibraries (!BuildServersOnly || BuildClients || \ + BuildLibrariesForDmx) #endif #ifndef BuildLibrariesForXServers #define BuildLibrariesForXServers BuildServer @@ -104,6 +148,9 @@ #ifndef BuildFontServer #define BuildFontServer YES #endif +#ifndef OmitSnfSupport +#define OmitSnfSupport NO +#endif #ifndef XserverStaticFontLib #define XserverStaticFontLib YES #endif @@ -122,9 +169,6 @@ #ifndef BuildXTrueType #define BuildXTrueType NO #endif -#ifndef XTTInLibFont -#define XTTInLibFont NO -#endif #ifndef BuildBuiltinFonts #define BuildBuiltinFonts NO #endif @@ -248,18 +292,6 @@ #ifndef MakeLocalFontDir #define MakeLocalFontDir YES #endif -#ifndef HasXAudio -#define HasXAudio NO -#endif -#ifndef BuildXAudio -#define BuildXAudio (HasXAudio & HasCplusplus) -#endif -#ifndef HasXAServer -#define HasXAServer NO -#endif -#ifndef BuildXAServer -#define BuildXAServer (HasXAServer & HasCplusplus) -#endif #ifndef BuildX11Lib #define BuildX11Lib BuildLibraries #endif @@ -315,7 +347,9 @@ #define BuildXInputExt NO #endif #ifndef BuildXInputLib -#define BuildXInputLib (BuildXInputExt && !BuildServersOnly) +#define BuildXInputLib (BuildXInputExt && \ + BuildLibraries && \ + (!BuildServersOnly || BuildLibrariesForDmx)) #endif #ifndef BuildEVI #define BuildEVI YES @@ -339,14 +373,16 @@ #define BuildFontLib (BuildLibraries || \ (BuildServer && !DoLoadableServer) || \ XnestServer || XVirtualFramebufferServer || \ - XprtServer || KDriveXServer) + XprtServer || XdmxServer || \ + (defined(TinyXServer) && TinyXServer)) #endif #endif #ifndef BuildFontCache #define BuildFontCache YES #endif #ifndef BuildFontCacheLib -#define BuildFontCacheLib (BuildFontCache && !BuildServersOnly) +#define BuildFontCacheLib (BuildFontCache && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildFontEncLib #define BuildFontEncLib BuildLibraries @@ -367,6 +403,45 @@ #ifndef BuildLowMem #define BuildLowMem NO #endif + +#ifndef BuildTinyDIX +#if (defined(TinyXServer) && TinyXServer) && \ + !(defined(XF86Server) && XF86Server) +#define BuildTinyDIX YES +#else +#define BuildTinyDIX NO +#endif +#endif +#ifndef BuildSeparateTinyDIX +#if (defined(TinyXServer) && TinyXServer) && !BuildTinyDIX +#define BuildSeparateTinyDIX YES +#else +#define BuildSeparateTinyDIX NO +#endif +#endif +#ifndef TinyXExcludedExtensions +#define TinyXExcludedExtensions -UXKB -UXINPUT -ULBX -UXAPPGROUP -UXCSECURITY \ + -UDPMSExtension -UPANORAMIX -UGLXEXT \ + -UXF86VIDMODE -UXF86MISC -UXFreeXDGA \ + -UXF86DRI -UEVI -UXRECORD -USCREENSAVER \ + -URES -UXV -UXPRINT -UDBE -UXTRAP -UFONTCACHE \ + -UXF86BIGFONT -UXSYNC -UTOGCUP +#endif +#ifndef TinyXFontDefines +#define TinyXFontDefines /**/ +#endif +#ifndef TinyXFontServerAccess +#define TinyXFontServerAccess NO +#endif +#if !TinyXFontServerAccess +#define TinyXFontServerDefines -DNOFONTSERVERACCESS +#else +#define TinyXFontServerDefines /**/ +#endif +#ifndef TinyDIXDefines +#define TinyDIXDefines TinyXExcludedExtensions TinyXFontServerDefines +#endif + #ifndef BuildLBX #define BuildLBX YES #endif @@ -374,19 +449,23 @@ #define BuildXKB YES #endif #ifndef BuildXKBlib -#define BuildXKBlib (BuildXKB && !BuildServersOnly) +#define BuildXKBlib (BuildXKB && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXKBuilib -#define BuildXKBuilib (BuildXKB && !BuildServersOnly) +#define BuildXKBuilib (BuildXKB && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXKBfilelib -#define BuildXKBfilelib (BuildXKB && !BuildServersOnly) +#define BuildXKBfilelib (BuildXKB && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXTrap #define BuildXTrap YES #endif #ifndef BuildXTrapLibrary -#define BuildXTrapLibrary (BuildXTrap && !BuildServersOnly) +#define BuildXTrapLibrary (BuildXTrap && !BuildServersOnly && \ + BuildLibraries) #endif /* @@ -410,7 +489,16 @@ #define BuildXinerama NO #endif #ifndef BuildXineramaLibrary -#define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly) +#define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly && \ + BuildLibraries) +#endif +#ifndef BuildDmxDevelTools +#define BuildDmxDevelTools NO +#endif +#ifndef BuildDmxLibrary +#define BuildDmxLibrary (BuildDmx && \ + (BuildDmxDevelTools || \ + (!BuildServersOnly && BuildLibraries))) #endif #ifndef BuildXCSecurity #define BuildXCSecurity YES @@ -437,26 +525,44 @@ #define BuildXprint NO #endif #endif +#if BuildXprint +#ifndef XpRasterDDX +#define XpRasterDDX YES +#endif +#ifndef XpColorPclDDX +#define XpColorPclDDX YES +#endif +#ifndef XpMonoPclDDX +#define XpMonoPclDDX NO +#endif +#ifndef XpPostScriptDDX +#define XpPostScriptDDX YES +#endif +#endif #ifndef BuildXprintLib -#define BuildXprintLib (BuildXprint && !BuildServersOnly) +#define BuildXprintLib (BuildXprint && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildScreenSaverExt #define BuildScreenSaverExt NO #endif #ifndef BuildScreenSaverLibrary -#define BuildScreenSaverLibrary (BuildScreenSaverExt && !BuildServersOnly) +#define BuildScreenSaverLibrary (BuildScreenSaverExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXF86VidModeExt #define BuildXF86VidModeExt NO #endif #ifndef BuildXF86VidModeLibrary -#define BuildXF86VidModeLibrary (BuildXF86VidModeExt && !BuildServersOnly) +#define BuildXF86VidModeLibrary (BuildXF86VidModeExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXF86MiscExt #define BuildXF86MiscExt NO #endif #ifndef BuildXF86MiscLibrary -#define BuildXF86MiscLibrary (BuildXF86MiscExt && !BuildServersOnly) +#define BuildXF86MiscLibrary (BuildXF86MiscExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXF86BigfontExt #define BuildXF86BigfontExt NO @@ -465,40 +571,47 @@ #define BuildXF86DGA NO #endif #ifndef BuildXF86DGALibrary -#define BuildXF86DGALibrary (BuildXF86DGA && !BuildServersOnly) +#define BuildXF86DGALibrary (BuildXF86DGA && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXResExt #define BuildXResExt NO #endif #ifndef BuildXResLibrary -#define BuildXResLibrary (BuildXResExt && !BuildServersOnly) +#define BuildXResLibrary (BuildXResExt && \ + (BuildDmxDevelTools || \ + (!BuildServersOnly && BuildLibraries))) #endif #ifndef BuildXvExt #define BuildXvExt NO #endif #ifndef BuildXvLibrary -#define BuildXvLibrary (BuildXvExt && !BuildServersOnly) +#define BuildXvLibrary (BuildXvExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildXvMCExt #define BuildXvMCExt NO #endif #ifndef BuildXvMCLibrary -#define BuildXvMCLibrary (BuildXvMCExt && !BuildServersOnly) +#define BuildXvMCLibrary (BuildXvMCExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildGlxExt #define BuildGlxExt NO #else #if BuildGlxExt && !defined(XFree86Version) #undef BuildXF86DRI -#undef BuildXF86DRM #undef BuildXF86DRIDriverSupport #define BuildXF86DRI NO -#define BuildXF86DRM NO #define BuildXF86DRIDriverSupport NO #endif #endif #ifndef BuildGLXLibrary -#define BuildGLXLibrary (BuildGlxExt && !BuildServersOnly) +#define BuildGLXLibrary (BuildGlxExt && !BuildServersOnly && \ + BuildLibraries) +#endif +#ifndef BuildGlxInDmx +#define BuildGlxInDmx (XdmxServer && BuildGlxExt) #endif #ifndef BuildOSMesaLib #define BuildOSMesaLib BuildGlxExt @@ -514,10 +627,11 @@ #define BuildXF86RushExt NO #endif #ifndef BuildXF86RushLibrary -#define BuildXF86RushLibrary (BuildXF86RushExt && !BuildServersOnly) +#define BuildXF86RushLibrary (BuildXF86RushExt && !BuildServersOnly && \ + BuildLibraries) #endif #ifndef BuildDPSLibraries -#define BuildDPSLibraries !BuildServersOnly +#define BuildDPSLibraries (!BuildServersOnly && BuildLibraries) #endif #ifndef BuildDPSLibrary #define BuildDPSLibrary BuildDPSLibraries @@ -535,7 +649,8 @@ #define BuildRender YES #endif #ifndef BuildRenderLibrary -#define BuildRenderLibrary !BuildServersOnly +#define BuildRenderLibrary (XdmxServer || \ + (!BuildServersOnly && BuildLibraries)) #endif #ifndef BuildXftLibrary #define BuildXftLibrary BuildRenderLibrary @@ -557,7 +672,8 @@ #define HasExpat NO #endif #ifndef UseExpat -#define UseExpat (UseFontconfig) +#define UseExpat (UseFontconfig || \ + (BuildXF86DRI && BuildGLXLibrary)) #endif #ifndef BuildExpatLibrary #define BuildExpatLibrary (UseExpat && !HasExpat) @@ -568,16 +684,15 @@ #ifndef Freetype2BuildDefines #define Freetype2BuildDefines /**/ #endif -/* For FreeType 1.x */ -#ifndef Freetype1BuildDefines -#define Freetype1BuildDefines Freetype2BuildDefines +#ifndef UseMkfontscaleForMkfontdir +#define UseMkfontscaleForMkfontdir NO #endif #ifndef BuildRandR #define BuildRandR YES #endif #ifndef BuildRandRLibrary -#define BuildRandRLibrary !BuildServersOnly +#define BuildRandRLibrary (!BuildServersOnly && BuildLibraries) #endif #ifndef BuildXcursorLibrary @@ -679,7 +794,7 @@ #define HasWChar32 SystemV4 #endif #ifndef HasXdmAuth -#define HasXdmAuth NO /* if you can not use XDM-AUTH* */ +#define HasXdmAuth YES #endif #ifndef PrimaryScreenResolution #define PrimaryScreenResolution 72 /* a common resolution */ @@ -868,6 +983,9 @@ #define GlxDefines /**/ #endif #endif +#ifndef DRMIncludesDir +#define DRMIncludesDir $(XF86OSSRC)/shared/drm/kernel +#endif #ifndef MesaSrcDir #define MesaSrcDir $(TOP)/extras/Mesa #endif @@ -1206,8 +1324,15 @@ #define ServerSnprintfDefines /**/ #endif #endif +#ifndef ServerStrlcatDefines +#if !HasStrlcat +#define ServerStrlcatDefines -DNEED_STRLCAT +#else +#define ServerStrlcatDefines /**/ +#endif +#endif #ifndef ServerDefines -#define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines ServerSnprintfDefines +#define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines ServerSnprintfDefines ServerStrlcatDefines #endif #ifndef MesaUseX86Asm @@ -1585,7 +1710,11 @@ # if !CrossCompiling FONTC = $(CLIENTENVSETUP) $(PRELOADFONTSETUP) $(XBUILDBINDIR)/bdftopcf MKFONTSCALE = $(CLIENTENVSETUP) $(PRELOADFREETYPESETUP) $(XBUILDBINDIR)/mkfontscale +#if UseMkfontscaleForMkfontdir MKFONTDIR = $(MKFONTSCALE) -b -s -l +#else + MKFONTDIR = $(CLIENTENVSETUP) $(PRELOADFONTSETUP) $(XBUILDBINDIR)/mkfontdir +#endif XCURSORGEN = $(CLIENTENVSETUP) $(PRELOADSETUP) $(XBUILDBINDIR)/xcursorgen # elif UseInstalledOnCrossCompile MKFONTDIR = $(BINDIR)/mkfontdir @@ -1629,6 +1758,7 @@ FTSOURCEDIR = FreeTypeSrcDir XTTSOURCEDIR = XTrueTypeSrcDir MESASRCDIR = MesaSrcDir + DRMINCLUDESDIR = DRMIncludesDir OGLSAMPLESRCDIR = OglSampleSrcDir PSWRAPSRC = $(XTOP)/config/pswrap TRANSCOMMSRC = $(LIBSRC)/xtrans @@ -1638,7 +1768,6 @@ XPROJECTROOT = X11ProjectRoot #endif - XORGMANDEFS = XOrgManDefs VENDORMANDEFS = VendorManDefs #if HasSharedLibraries @@ -1689,6 +1818,9 @@ #ifndef SharedLibX11 #define SharedLibX11 HasSharedLibraries #endif +#ifndef ExtraLibX11 +#define ExtraLibX11 SharedLibX11 +#endif #ifndef NormalLibX11 #define NormalLibX11 (!SharedLibX11 | ForceNormalLib) #endif @@ -1715,6 +1847,9 @@ #ifndef SharedLibXThrStub #define SharedLibXThrStub YES #endif +#ifndef ExtraLibXThrStub +#define ExtraLibXThrStub SharedLibXThrStub +#endif #ifndef NormalLibXThrStub #define NormalLibXThrStub NO #endif @@ -1736,6 +1871,8 @@ #else #undef SharedLibXThrStub #define SharedLibXThrStub NO +#undef ExtraLibXThrStub +#define ExtraLibXThrStub NO #undef NormalLibXThrStub #define NormalLibXThrStub NO #undef DebugLibXThrStub @@ -1748,6 +1885,9 @@ #ifndef SharedLibXss #define SharedLibXss HasSharedLibraries #endif +#ifndef ExtraLibXss +#define ExtraLibXss SharedLibXss +#endif #ifndef NormalLibXss #define NormalLibXss (!SharedLibXss || ForceNormalLib) #endif @@ -1760,6 +1900,8 @@ #else #undef SharedLibXss #define SharedLibXss NO +#undef ExtraLibXss +#define ExtraLibXss NO #undef NormalLibXss #define NormalLibXss NO #undef DebugLibXss @@ -1772,6 +1914,9 @@ #ifndef SharedLibXxf86misc #define SharedLibXxf86misc HasSharedLibraries #endif +#ifndef ExtraLibXxf86misc +#define ExtraLibXxf86misc SharedLibXxf86misc +#endif #ifndef NormalLibXxf86misc #define NormalLibXxf86misc (!SharedLibXxf86misc || ForceNormalLib) #endif @@ -1784,6 +1929,8 @@ #else #undef SharedLibXxf86misc #define SharedLibXxf86misc NO +#undef ExtraLibXxf86misc +#define ExtraLibXxf86misc NO #undef NormalLibXxf86misc #define NormalLibXxf86misc NO #undef DebugLibXxf86misc @@ -1796,6 +1943,9 @@ #ifndef SharedLibXxf86vm #define SharedLibXxf86vm HasSharedLibraries #endif +#ifndef ExtraLibXxf86vm +#define ExtraLibXxf86vm SharedLibXxf86vm +#endif #ifndef NormalLibXxf86vm #define NormalLibXxf86vm (!SharedLibXxf86vm || ForceNormalLib) #endif @@ -1808,6 +1958,8 @@ #else #undef SharedLibXxf86vm #define SharedLibXxf86vm NO +#undef ExtraLibXxf86vm +#define ExtraLibXxf86vm NO #undef NormalLibXxf86vm #define NormalLibXxf86vm NO #undef DebugLibXxf86vm @@ -1820,6 +1972,9 @@ #ifndef SharedLibXxf86dga #define SharedLibXxf86dga HasSharedLibraries #endif +#ifndef ExtraLibXxf86dga +#define ExtraLibXxf86dga SharedLibXxf86dga +#endif #ifndef NormalLibXxf86dga #define NormalLibXxf86dga (!SharedLibXxf86dga || ForceNormalLib) #endif @@ -1832,6 +1987,8 @@ #else #undef SharedLibXxf86dga #define SharedLibXxf86dga NO +#undef ExtraLibXxf86dga +#define ExtraLibXxf86dga NO #undef NormalLibXxf86dga #define NormalLibXxf86dga NO #undef DebugLibXxf86dga @@ -1844,6 +2001,9 @@ #ifndef SharedLibXxf86rush #define SharedLibXxf86rush HasSharedLibraries #endif +#ifndef ExtraLibXxf86rush +#define ExtraLibXxf86rush SharedLibXxf86rush +#endif #ifndef NormalLibXxf86rush #define NormalLibXxf86rush (!SharedLibXxf86rush || ForceNormalLib) #endif @@ -1856,6 +2016,8 @@ #else #undef SharedLibXxf86rush #define SharedLibXxf86rush NO +#undef ExtraLibXxf86rush +#define ExtraLibXxf86rush NO #undef NormalLibXxf86rush #define NormalLibXxf86rush NO #undef DebugLibXxf86rush @@ -1868,6 +2030,9 @@ #ifndef SharedLibXv #define SharedLibXv HasSharedLibraries #endif +#ifndef ExtraLibXv +#define ExtraLibXv SharedLibXv +#endif #ifndef NormalLibXv #define NormalLibXv (!SharedLibXv || ForceNormalLib) #endif @@ -1880,6 +2045,8 @@ #else #undef SharedLibXv #define SharedLibXv NO +#undef ExtraLibXv +#define ExtraLibXv NO #undef NormalLibXv #define NormalLibXv NO #undef DebugLibXv @@ -1892,6 +2059,9 @@ #ifndef SharedLibXvMC #define SharedLibXvMC HasSharedLibraries #endif +#ifndef ExtraLibXvMC +#define ExtraLibXvMC SharedLibXvMC +#endif #ifndef NormalLibXvMC #define NormalLibXvMC (!SharedLibXvMC || ForceNormalLib) #endif @@ -1904,6 +2074,8 @@ #else #undef SharedLibXvMC #define SharedLibXvMC NO +#undef ExtraLibXvMC +#define ExtraLibXvMC NO #undef NormalLibXvMC #define NormalLibXvMC NO #undef DebugLibXvMC @@ -1916,6 +2088,9 @@ #ifndef SharedLibXinerama #define SharedLibXinerama HasSharedLibraries #endif +#ifndef ExtraLibXinerama +#define ExtraLibXinerama SharedLibXinerama +#endif #ifndef NormalLibXinerama #define NormalLibXinerama (!SharedLibXinerama || ForceNormalLib) #endif @@ -1928,6 +2103,8 @@ #else #undef SharedLibXinerama #define SharedLibXinerama NO +#undef ExtraLibXinerama +#define ExtraLibXinerama NO #undef NormalLibXinerama #define NormalLibXinerama NO #undef DebugLibXinerama @@ -1938,20 +2115,25 @@ #if BuildXResLibrary #ifndef SharedLibXRes -#define SharedLibXRes HasSharedLibraries +#define SharedLibXRes HasSharedLibraries +#endif +#ifndef ExtraLibXRes +#define ExtraLibXRes SharedLibXRes #endif #ifndef NormalLibXRes -#define NormalLibXRes (!SharedLibXRes || ForceNormalLib) +#define NormalLibXRes (!SharedLibXRes || ForceNormalLib) #endif #ifndef DebugLibXRes -#define DebugLibXRes NO +#define DebugLibXRes NO #endif #ifndef ProfileLibXRes -#define ProfileLibXRes NO +#define ProfileLibXRes NO #endif #else #undef SharedLibXRes #define SharedLibXRes NO +#undef ExtraLibXRes +#define ExtraLibXRes NO #undef NormalLibXRes #define NormalLibXRes NO #undef DebugLibXRes @@ -1964,6 +2146,9 @@ #ifndef SharedLibDps #define SharedLibDps HasSharedLibraries #endif +#ifndef ExtraLibDps +#define ExtraLibDps SharedLibDps +#endif #ifndef NormalLibDps #define NormalLibDps (!SharedLibDps || ForceNormalLib) #endif @@ -1976,6 +2161,8 @@ #else #undef SharedLibDps #define SharedLibDps NO +#undef ExtraLibDps +#define ExtraLibDps NO #undef NormalLibDps #define NormalLibDps NO #undef DebugLibDps @@ -1988,6 +2175,9 @@ #ifndef SharedLibDpsTk #define SharedLibDpsTk HasSharedLibraries #endif +#ifndef ExtraLibDpsTk +#define ExtraLibDpsTk SharedLibDpsTk +#endif #ifndef NormalLibDpsTk #define NormalLibDpsTk (!SharedLibDpsTk || ForceNormalLib) #endif @@ -2000,6 +2190,8 @@ #else #undef SharedLibDpsTk #define SharedLibDpsTk NO +#undef ExtraLibDpsTk +#define ExtraLibDpsTk NO #undef NormalLibDpsTk #define NormalLibDpsTk NO #undef DebugLibDpsTk @@ -2012,6 +2204,9 @@ #ifndef SharedLibPSRes #define SharedLibPSRes HasSharedLibraries #endif +#ifndef ExtraLibPSRes +#define ExtraLibPSRes SharedLibPSRes +#endif #ifndef NormalLibPSRes #define NormalLibPSRes (!SharedLibPSRes || ForceNormalLib) #endif @@ -2024,6 +2219,8 @@ #else #undef SharedLibPSRes #define SharedLibPSRes NO +#undef ExtraLibPSRes +#define ExtraLibPSRes NO #undef NormalLibPSRes #define NormalLibPSRes NO #undef DebugLibPSRes @@ -2036,6 +2233,9 @@ #ifndef SharedLibXrender #define SharedLibXrender HasSharedLibraries #endif +#ifndef ExtraLibXrender +#define ExtraLibXrender SharedLibXrender +#endif #ifndef NormalLibXrender #define NormalLibXrender (!SharedLibXrender || ForceNormalLib) #endif @@ -2048,6 +2248,8 @@ #else #undef SharedLibXrender #define SharedLibXrender NO +#undef ExtraLibXrender +#define ExtraLibXrender NO #undef NormalLibXrender #define NormalLibXrender NO #undef DebugLibXrender @@ -2060,6 +2262,9 @@ #ifndef SharedLibXrandr #define SharedLibXrandr HasSharedLibraries #endif +#ifndef ExtraLibXrandr +#define ExtraLibXrandr SharedLibXrandr +#endif #ifndef NormalLibXrandr #define NormalLibXrandr (!SharedLibXrandr || ForceNormalLib) #endif @@ -2072,6 +2277,8 @@ #else #undef SharedLibXrandr #define SharedLibXrandr NO +#undef ExtraLibXrandr +#define ExtraLibXrandr NO #undef NormalLibXrandr #define NormalLibXrandr NO #undef DebugLibXrandr @@ -2084,6 +2291,9 @@ #ifndef SharedLibXcursor #define SharedLibXcursor HasSharedLibraries #endif +#ifndef ExtraLibXcursor +#define ExtraLibXcursor SharedLibXcursor +#endif #ifndef NormalLibXcursor #define NormalLibXcursor (!SharedLibXcursor || ForceNormalLib) #endif @@ -2096,6 +2306,8 @@ #else #undef SharedLibXcursor #define SharedLibXcursor NO +#undef ExtraLibXcursor +#define ExtraLibXcursor NO #undef NormalLibXcursor #define NormalLibXcursor NO #undef DebugLibXcursor @@ -2108,6 +2320,9 @@ #ifndef SharedLibAppleWM #define SharedLibAppleWM HasSharedLibraries #endif +#ifndef ExtraLibAppleWM +#define ExtraLibAppleWM SharedLibAppleWM +#endif #ifndef NormalLibAppleWM #define NormalLibAppleWM (!SharedLibAppleWM || ForceNormalLib) #endif @@ -2120,6 +2335,8 @@ #else #undef SharedLibAppleWM #define SharedLibAppleWM NO +#undef ExtraLibAppleWM +#define ExtraLibAppleWM NO #undef NormalLibAppleWM #define NormalLibAppleWM NO #undef DebugLibAppleWM @@ -2132,6 +2349,9 @@ #ifndef SharedLibWindowsWM #define SharedLibWindowsWM HasSharedLibraries #endif +#ifndef ExtraLibWindowsWM +#define ExtraLibWindowsWM SharedLibWindowsWM +#endif #ifndef NormalLibWindowsWM #define NormalLibWindowsWM (!SharedLibWindowsWM || ForceNormalLib) #endif @@ -2144,6 +2364,8 @@ #else #undef SharedLibWindowsWM #define SharedLibWindowsWM NO +#undef ExtraLibWindowsWM +#define ExtraLibWindowsWM NO #undef NormalLibWindowsWM #define NormalLibWindowsWM NO #undef DebugLibWindowsWM @@ -2156,6 +2378,9 @@ #ifndef SharedLibGlu #define SharedLibGlu HasSharedLibraries #endif +#ifndef ExtraLibGlu +#define ExtraLibGlu SharedLibGlu +#endif #ifndef NormalLibGlu #define NormalLibGlu (!SharedLibX11 | ForceNormalLib) #endif @@ -2168,6 +2393,8 @@ #else #undef SharedLibGlu #define SharedLibGlu NO +#undef ExtraLibGlu +#define ExtraLibGlu NO #undef NormalLibGlu #define NormalLibGlu NO #undef DebugLibGlu @@ -2180,6 +2407,9 @@ #ifndef SharedLibGlx #define SharedLibGlx HasSharedLibraries #endif +#ifndef ExtraLibGlx +#define ExtraLibGlx SharedLibGlx +#endif #ifndef NormalLibGlx #define NormalLibGlx (!SharedLibX11 | ForceNormalLib) #endif @@ -2214,6 +2444,8 @@ #else #undef SharedLibGlx #define SharedLibGlx NO +#undef ExtraLibGlx +#define ExtraLibGlx NO #undef NormalLibGlx #define NormalLibGlx NO #undef DebugLibGlx @@ -2229,6 +2461,9 @@ #ifndef SharedLibGLw #define SharedLibGLw HasSharedLibraries && HasWeakSymbols #endif +#ifndef ExtraLibGLw +#define ExtraLibGLw SharedLibGLw +#endif #ifndef NormalLibGLw #define NormalLibGLw (!SharedLibGLw || ForceNormalLib) #endif @@ -2245,6 +2480,8 @@ #else #undef SharedLibGLw #define SharedLibGLw NO +#undef ExtraLibGLw +#define ExtraLibGLw NO #undef NormalLibGLw #define NormalLibGLw NO #undef DebugLibGLw @@ -2256,6 +2493,9 @@ #ifndef SharedLibXext #define SharedLibXext HasSharedLibraries #endif +#ifndef ExtraLibXext +#define ExtraLibXext SharedLibXext +#endif #ifndef NormalLibXext #define NormalLibXext (!SharedLibXext | ForceNormalLib) #endif @@ -2312,13 +2552,46 @@ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga #if SharedLibXxf86dga #ifndef SharedXxf86dgaRev -#define SharedXxf86dgaRev 1.0 +#define SharedXxf86dgaRev 1.1 #endif SharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev) #else ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir) #endif +#if BuildDmxLibrary +#ifndef SharedLibDmx +#define SharedLibDmx HasSharedLibraries +#endif +#ifndef ExtraLibDmx +#define ExtraLibDmx SharedLibDmx +#endif +#ifndef NormalLibDmx +#define NormalLibDmx YES +#endif +#ifndef DebugLibDmx +#define DebugLibDmx NO +#endif +#ifndef ProfileLibDmx +#define ProfileLibDmx NO +#endif +#else +#ifndef SharedLibDmx +#define SharedLibDmx NO +#endif +#ifndef ExtraLibDmx +#define ExtraLibDmx NO +#endif +#ifndef NormalLibDmx +#define NormalLibDmx NO +#endif +#ifndef DebugLibDmx +#define DebugLibDmx NO +#endif +#ifndef ProfileLibDmx +#define ProfileLibDmx NO +#endif +#endif XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush #if SharedLibXxf86rush @@ -2372,6 +2645,15 @@ ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir) #endif + DMXLIBSRC = $(LIBSRC)/dmx +#if SharedLibDmx +#ifndef SharedDmxRev +#define SharedDmxRev 1.0 +#endif +SharedLibReferences(DMX,dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev) +#else +ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir) +#endif DPSLIBSRC = $(LIBSRC)/dps #if SharedLibDps @@ -2485,6 +2767,9 @@ # ifndef SharedLibXfontcache # define SharedLibXfontcache HasSharedLibraries # endif +# ifndef ExtraLibXfontcache +# define ExtraLibXfontcache SharedLibXfontcache +# endif # ifndef NormalLibXfontcache # define NormalLibXfontcache (!SharedLibXfontcache || ForceNormalLib) # endif @@ -2508,6 +2793,9 @@ #ifndef SharedLibXau #define SharedLibXau NO #endif +#ifndef ExtraLibXau +#define ExtraLibXau SharedLibXau +#endif #ifndef NormalLibXau #define NormalLibXau (!SharedLibXau | ForceNormalLib) #endif @@ -2534,6 +2822,9 @@ #ifndef SharedLibXdmcp #define SharedLibXdmcp NO #endif +#ifndef ExtraLibXdmcp +#define ExtraLibXdmcp SharedLibXdmcp +#endif #ifndef NormalLibXdmcp #define NormalLibXdmcp (!SharedLibXdmcp | ForceNormalLib) #endif @@ -2560,6 +2851,9 @@ #ifndef SharedLibXmu #define SharedLibXmu HasSharedLibraries #endif +#ifndef ExtraLibXmu +#define ExtraLibXmu SharedLibXmu +#endif #ifndef NormalLibXmu #define NormalLibXmu (!SharedLibXmu | ForceNormalLib) #endif @@ -2582,6 +2876,9 @@ #ifndef SharedLibXmuu #define SharedLibXmuu HasSharedLibraries #endif +#ifndef ExtraLibXmuu +#define ExtraLibXmuu SharedLibXmuu +#endif #ifndef NormalLibXmuu #define NormalLibXmuu (!SharedLibXmuu | ForceNormalLib) #endif @@ -2604,6 +2901,9 @@ #ifndef SharedOldX #define SharedOldX HasSharedLibraries #endif +#ifndef ExtraOldX +#define ExtraOldX SharedOldX +#endif #ifndef NormalOldX #define NormalOldX (!SharedOldX | ForceNormalLib) #endif @@ -2626,6 +2926,9 @@ #ifndef SharedLibXp #define SharedLibXp HasSharedLibraries #endif +#ifndef ExtraLibXp +#define ExtraLibXp SharedLibXp +#endif #ifndef NormalLibXp #define NormalLibXp (!SharedLibXp | ForceNormalLib) #endif @@ -2648,6 +2951,9 @@ #ifndef SharedLibXt #define SharedLibXt HasSharedLibraries #endif +#ifndef ExtraLibXt +#define ExtraLibXt SharedLibXt +#endif #ifndef NormalLibXt #define NormalLibXt (!SharedLibXt | ForceNormalLib) #endif @@ -2670,32 +2976,12 @@ XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) LINTXTOOLLIB = $(LINTXTOOLONLYLIB) -#ifndef SharedLibXa -#define SharedLibXa (HasSharedLibraries & HasCplusplus) -#endif -#ifndef NormalLibXa -/* #define NormalLibXa ((!SharedLibXa | ForceNormalLib) & HasCplusplus) */ -#define NormalLibXa YES /* needed for current tests, will correct later */ -#endif -#ifndef DebugLibXa -#define DebugLibXa NO /* debugged audio library */ -#endif -#ifndef ProfileLibXa -#define ProfileLibXa NO /* profiled audio library */ -#endif - XALIBSRC = $(LIBSRC)/Xa -#if SharedLibXa -#ifndef SharedXaRev -#define SharedXaRev 1.0 -#endif -SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev) -#else -UnsharedLibReferences(XA,Xa,$(XALIBSRC)) -#endif - #ifndef SharedLibXaw #define SharedLibXaw HasSharedLibraries #endif +#ifndef ExtraLibXaw +#define ExtraLibXaw SharedLibXaw +#endif #ifndef NormalLibXaw #define NormalLibXaw (!SharedLibXaw | ForceNormalLib) #endif @@ -2723,6 +3009,9 @@ #ifndef SharedLibXaw6 #define SharedLibXaw6 HasSharedLibraries #endif +#ifndef ExtraLibXaw6 +#define ExtraLibXaw6 SharedLibXaw6 +#endif #ifndef NormalLibXaw6 #define NormalLibXaw6 NO #endif @@ -2746,6 +3035,9 @@ #ifndef SharedLibXi #define SharedLibXi HasSharedLibraries #endif +#ifndef ExtraLibXi +#define ExtraLibXi SharedLibXi +#endif #ifndef NormalLibXi #define NormalLibXi (!SharedLibXi | ForceNormalLib) #endif @@ -2768,6 +3060,9 @@ #ifndef SharedLibXtst #define SharedLibXtst HasSharedLibraries #endif +#ifndef ExtraLibXtst +#define ExtraLibXtst SharedLibXtst +#endif #ifndef NormalLibXtst #define NormalLibXtst (!SharedLibXtst | ForceNormalLib) #endif @@ -2792,6 +3087,9 @@ #ifndef SharedLibICE #define SharedLibICE HasSharedLibraries #endif +#ifndef ExtraLibICE +#define ExtraLibICE SharedLibICE +#endif #ifndef NormalLibICE #define NormalLibICE (!SharedLibICE | ForceNormalLib) #endif @@ -2814,6 +3112,9 @@ #ifndef SharedLibSM #define SharedLibSM HasSharedLibraries #endif +#ifndef ExtraLibSM +#define ExtraLibSM SharedLibSM +#endif #ifndef NormalLibSM #define NormalLibSM (!SharedLibSM | ForceNormalLib) #endif @@ -2836,6 +3137,9 @@ #ifndef SharedLibXkey #define SharedLibXkey HasSharedLibraries #endif +#ifndef ExtraLibXkey +#define ExtraLibXkey SharedLibXkey +#endif #ifndef NormalLibXkey #define NormalLibXkey (!SharedLibXkey | ForceNormalLib) #endif @@ -2858,6 +3162,9 @@ #ifndef SharedLibFS #define SharedLibFS HasSharedLibraries #endif +#ifndef ExtraLibFS +#define ExtraLibFS SharedLibFS +#endif #ifndef NormalLibFS #define NormalLibFS (!SharedLibFS | ForceNormalLib) #endif @@ -2880,6 +3187,9 @@ #ifndef SharedLibFont #define SharedLibFont HasSharedLibraries #endif +#ifndef ExtraLibFont +#define ExtraLibFont SharedLibFont +#endif #ifndef NormalLibFont #define NormalLibFont (!SharedLibFont | ForceNormalLib | XserverStaticFontLib) #endif @@ -2910,6 +3220,9 @@ #ifndef SharedLibFontEnc #define SharedLibFontEnc HasSharedLibraries #endif +#ifndef ExtraLibFontEnc +#define ExtraLibFontEnc SharedLibFontEnc +#endif #ifndef NormalLibFontEnc #define NormalLibFontEnc (!SharedLibFontEnc | ForceNormalLib) #endif @@ -2932,6 +3245,9 @@ #ifndef SharedLibXpm #define SharedLibXpm HasSharedLibraries #endif +#ifndef ExtraLibXpm +#define ExtraLibXpm SharedLibXpm +#endif #ifndef NormalLibXpm #define NormalLibXpm (!SharedLibXpm | ForceNormalLib) #endif @@ -2958,6 +3274,9 @@ #ifndef SharedLibFreetype2 #define SharedLibFreetype2 HasSharedLibraries #endif +#ifndef ExtraLibFreetype2 +#define ExtraLibFreetype2 SharedLibFreetype2 +#endif #ifndef NormalLibFreetype2 #define NormalLibFreetype2 (!SharedLibFreetype2 | ForceNormalLib) #endif @@ -2970,24 +3289,24 @@ FREETYPE2LIBSRC = $(LIBSRC)/freetype2 /* - * FreeType 2.1.4 + * FreeType 2.1.8 * * Get the library version information from version_info in * in xc/extras/freetype2/builds/unix/configure.ac. * - * current:revision:age = 9:3:3 + * current:revision:age = 9:6:3 * * The LibtoolMinorVersions revision is "(current - age).age". * The !LibtoolMinorVersions revision is "current.0". * Freetype2Version should be set to "current.revision.age" */ #ifndef Freetype2Version -#define Freetype2Version 9.3.3 +#define Freetype2Version 9.6.3 #endif #if SharedLibFreetype2 #ifndef SharedLibtoolFreetype2Rev -#define SharedLibtoolFreetype2Rev 9:3:3 +#define SharedLibtoolFreetype2Rev 9:6:3 #endif #ifndef SharedFreetype2Rev #if LibtoolMinorVersions @@ -3069,6 +3388,9 @@ #ifndef SharedLibExpat #define SharedLibExpat HasSharedLibraries #endif +#ifndef ExtraLibExpat +#define ExtraLibExpat SharedLibExpat +#endif #ifndef NormalLibExpat #define NormalLibExpat (!SharedLibExpat | ForceNormalLib) #endif @@ -3174,6 +3496,9 @@ #ifndef SharedLibXft1 #define SharedLibXft1 HasSharedLibraries #endif +#ifndef ExtraLibXft1 +#define ExtraLibXft1 SharedLibXft1 +#endif #ifndef NormalLibXft1 #define NormalLibXft1 NO #endif @@ -3211,6 +3536,9 @@ #ifndef SharedLibXft #define SharedLibXft HasSharedLibraries #endif +#ifndef ExtraLibXft +#define ExtraLibXft SharedLibXft +#endif #ifndef NormalLibXft #define NormalLibXft (!SharedLibXft | ForceNormalLib) #endif @@ -3244,6 +3572,9 @@ #ifndef SharedLibFontconfig #define SharedLibFontconfig HasSharedLibraries #endif +#ifndef ExtraLibFontconfig +#define ExtraLibFontconfig SharedLibFontconfig +#endif #ifndef NormalLibFontconfig #define NormalLibFontconfig (!SharedLibFontconfig | ForceNormalLib) #endif @@ -3435,6 +3766,9 @@ # ifndef SharedLibxkbfile # define SharedLibxkbfile HasSharedLibraries # endif +# ifndef ExtraLibxkbfile +# define ExtraLibxkbfile SharedLibxkbfile +# endif # ifndef NormalLibxkbfile # define NormalLibxkbfile (!SharedLibxkbfile | ForceNormalLib) # endif @@ -3507,6 +3841,9 @@ # ifndef SharedLibxkbui # define SharedLibxkbui HasSharedLibraries # endif +# ifndef ExtraLibxkbui +# define ExtraLibxkbui SharedLibxkbui +# endif # ifndef NormalLibxkbui # define NormalLibxkbui (!SharedLibxkbui || ForceNormalLib) # endif @@ -3557,6 +3894,9 @@ #ifndef SharedLibXTrap #define SharedLibXTrap HasSharedLibraries #endif +#ifndef ExtraLibXTrap +#define ExtraLibXTrap SharedLibXTrap +#endif #ifndef NormalLibXTrap #define NormalLibXTrap (!SharedLibXTrap | ForceNormalLib) #endif @@ -3643,9 +3983,9 @@ # ifndef MakeFcCache # define MakeFcCache(deplist) @@\ -all:: fonts.cache @@\ +all:: fonts.cache-1 @@\ @@\ -fonts.cache: deplist @@\ +fonts.cache-1: deplist @@\ RunProgram(FCCACHE, $(FCCACHEOPTS) .) @@\ @@\ clean:: @@\ @@ -3724,13 +4064,17 @@ MakeFontsDir($(OBJS)) @@\ @@\ clean:: @@\ - RemoveFiles(*.pcf *.pcf.Z *.pcf.gz) + RemoveFiles(*.pcf) @@\ + RemoveFiles(*.pcf.Z) @@\ + RemoveFiles(*.pcf.gz) # else # define MakeFonts() @@\ MakeFontsDir($(OBJS)) @@\ @@\ clean:: @@\ - RemoveFiles(*.pcf *.pcf.Z *.pcf.gz) + RemoveFiles(*.pcf) @@\ + RemoveFiles(*.pcf.Z) @@\ + RemoveFiles(*.pcf.gz) # endif #endif /* MakeFonts */ @@ -3832,11 +4176,17 @@ # if GzipFontCompression # define CompressedFontTargetLong(sname,tname) @@\ FontBaseObj(tname).gz: FontSrc(sname) @@\ - RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@ + RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@ @@\ + @@\ +clean:: @@\ + RemoveFile(FontBaseObj(tname).gz) # else # define CompressedFontTargetLong(sname,tname) @@\ FontBaseObj(tname).Z: FontSrc(sname) @@\ - RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@ + RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@ @@\ + @@\ +clean:: @@\ + RemoveFile(FontBaseObj(tname).Z) # endif # endif /* CompressedFontTargetLong */ #else @@ -4091,9 +4441,13 @@ #ifdef HTMLroffCmd #define MakeEqnHtmlDoc(file,srcs) @@\ file.html: srcs @@\ - $(TBL) $(XDOCMACROS) srcs | $(EQN) | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\ + @if [ X$(NOHTML) = X ]; then \ @@\ + (set -x; \ @@\ + $(TBL) $(XDOCMACROS) srcs | \ @@\ + $(EQN) | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\ 2> index.raw > file.nhtml \ @@\ - && PostProcessTroffHTML(file.nhtml,$@) + && PostProcessTroffHTML(file.nhtml,$@)); else \ @@\ + : > file.html; fi #else #define MakeEqnHtmlDoc(file,srcs) /**/ #endif @@ -4223,7 +4577,7 @@ #ifndef InstallDoc #define InstallDoc(name,deps) @@\ -install:: deps @@\ +install:: @@\ MakeDir($(DESTDIR)$(DOCPSDIR)) @@\ @if [ -f name.ps -a X$(NOPS) = X ]; then set -x; \ @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.ps \ @@\ Index: xc/config/cf/apollo.cf diff -u xc/config/cf/apollo.cf:1.1.1.5 xc/config/cf/apollo.cf:1.3 --- xc/config/cf/apollo.cf:1.1.1.5 Tue Jan 16 16:53:13 2001 +++ xc/config/cf/apollo.cf Thu Apr 22 10:15:05 2004 @@ -1,4 +1,5 @@ XCOMM platform: $Xorg: apollo.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ +XCOMM $XFree86: xc/config/cf/apollo.cf,v 1.3 2004/04/22 14:15:05 tsi Exp $ /* * Minimally tested, and only in the bsd4.3 environment. X_NOT_POSIX is not @@ -31,7 +32,7 @@ #define ConnectionFlags -DTCPCONN #define InstallManPageLong(file,destdir,dest) @@\ -install.man:: file.man @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(NROFF) $(MANMACROS) file.man > file.mantxt @@\ $(INSTALL) -c $(INSTMANFLAGS) file.mantxt $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\ Index: xc/config/cf/bsdLib.rules diff -u xc/config/cf/bsdLib.rules:3.28 xc/config/cf/bsdLib.rules:3.36 --- xc/config/cf/bsdLib.rules:3.28 Mon Jan 26 20:37:39 2004 +++ xc/config/cf/bsdLib.rules Mon May 31 20:16:53 2004 @@ -1,10 +1,50 @@ -XCOMM $Xorg: bsdLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ - - - - - -XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.28 2004/01/27 01:37:39 dawes Exp $ +XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.36 2004/06/01 00:16:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * NetBSD/FreeBSD shared library rules */ @@ -44,10 +84,9 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest -@@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest #endif /* InstallSharedLibrary */ @@ -58,9 +97,9 @@ */ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ @@ -68,7 +107,7 @@ LinkBuildLibrary($@) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedLibraryTarget */ @@ -77,9 +116,9 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ @@ -87,7 +126,7 @@ LinkBuildLibrary($@) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedDepLibraryTarget */ @@ -235,26 +274,31 @@ INSTALLMINORREV = false #endif +#ifndef SetSonameRev +#define SetSonameRev(rev) set +e; S=`expr rev : '\([0-9]*\)'`; set -e +#endif + #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - @T=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ @@\ + @SetSonameRev(rev); \ @@\ + T=Concat($(LIBPREFIX),libname.so.$$S) ;\ @@\ if $(INSTALLMINORREV); then \ @@\ - INST=Concat(lib,libname.so.rev); \ @@\ + INST=Concat($(LIBPREFIX),libname.so.rev); \ @@\ LINK=$$T; \ @@\ else \ @@\ INST=$$T; \ @@\ fi; \ @@\ (set -x; \ @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) $$INST $(DESTDIR)dest); \ @@\ - if [ X"$$LINK" != X ]; then (set -x; \ @@\ - $(RM) $(DESTDIR)dest/$$LINK; \ @@\ + if [ X"$$LINK" != X -a X"$$LINK" != X"$$INST" ]; then (set -x; \ @@\ + $(RM) $(DESTDIR)dest/$$LINK; \ @@\ $(LN) $$INST $(DESTDIR)dest/$$LINK); \ @@\ fi; \ @@\ if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ - $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) $$T Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so)); \ @@\ fi #endif /* InstallSharedLibrary */ @@ -272,11 +316,11 @@ done #define InstallSharedLibtoolLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ @set +e; SetRevisions(rev); \ @@\ set -e; \ @@\ - T=Concat(lib,libname.so.$$REV); \ @@\ + T=Concat($(LIBPREFIX),libname.so.$$REV); \ @@\ if $(INSTALLMINORREV); then \ @@\ INST=$$T.0; \ @@\ LINK=$$T; \ @@\ @@ -290,12 +334,12 @@ $(LN) $$INST $(DESTDIR)dest/$$LINK); \ @@\ fi; \ @@\ for i in $$REVLIST; do (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so.$$i); \ @@\ - $(LN) Concat(lib,libname.so.$$REV) Concat($(DESTDIR)dest/lib,libname.so.$$i)); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$i); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.$$REV) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$i)); \ @@\ done; \ @@\ if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ - $(LN) Concat(lib,libname.so.$$REV) Concat($(DESTDIR)dest/lib,libname.so)); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.$$REV) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so)); \ @@\ fi #endif /* InstallSharedLibtoolLibrary */ @@ -314,35 +358,38 @@ */ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist @@\ +Concat($(LIBPREFIX),libname.so.rev): solist @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - (set -x; $(RM) $$SONAME; $(LN) $@ $$SONAME); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ LinkBuildLibrary($@) @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ set -x; $(RM) $$SONAME @@\ - $(RM) Concat(lib,libname.so) @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedLibraryTarget */ #ifndef SharedLibtoolLibraryTarget #define SharedLibtoolLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so)) @@\ @@\ -Concat(lib,libname.so): solist @@\ +Concat($(LIBPREFIX),libname.so): solist @@\ $(RM) $@~ @@\ @set +e; SetRevisions(rev); \ @@\ SONAME=$@.$$REV; \ @@\ @@ -363,9 +410,9 @@ clean:: @@\ @set +e; SetRevisions(rev); \ @@\ set -xe; \ @@\ - $(RM) Concat(lib,libname.so.$$REV); \ @@\ - $(RM) Concat(lib,libname.so.$$REV.0) @@\ - $(RM) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.$$REV); \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so.$$REV.0) @@\ + $(RM) Concat($(LIBPREFIX),libname.so) #endif /* SharedLibtoolLibraryTarget */ @@ -374,26 +421,30 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ set -x; $(RM) $$SONAME @@\ - $(RM) Concat(lib,libname.so) @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedDepLibraryTarget */ @@ -402,26 +453,30 @@ */ #ifndef SharedDepCplusplusLibraryTarget #define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ set -x; $(RM) $$SONAME @@\ - $(RM) Concat(lib,libname.so) @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat($(LIBPREFIX),libname.so) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) #endif /* SharedDepCplusplusLibraryTarget */ @@ -450,6 +505,7 @@ $(CC) -o $@~ -Wl,--version-script=$@.map $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ $(RM) $@ $@.map @@\ $(MV) $@~ $@ @@\ + LinkBuildModule($@,dri) @@\ @@\ clean:: @@\ $(RM) name @@\ @@ -477,6 +533,8 @@ #define ExtraLibRules +#define AoutSubdir aout + #ifndef AoutSharedLibraryDef #define AoutSharedLibraryDef -DBSDSHLIB #endif @@ -487,15 +545,18 @@ #define AoutPositionIndependentCFlags -fpic #endif +#ifndef AoutAsmOptions +#define AoutAsmOptions -aout +#endif + /* * InstallAoutSharedLibrary - generate rules to install the shared library. */ #ifndef InstallAoutSharedLibrary #define InstallAoutSharedLibrary(libname,rev,dest) @@\ -install:: Concat(aout/lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) -c $(INSTLIBFLAGS) Concat(aout/lib,libname.so.rev) $(DESTDIR)dest -@@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat(AoutSubdir/$(LIBPREFIX),libname.so.rev) $(DESTDIR)dest #endif /* InstallAoutSharedLibrary */ @@ -506,32 +567,54 @@ */ #ifndef AoutSharedLibraryTarget #define AoutSharedLibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(down/$(LIBPREFIX),libname.so.rev)) @@\ + @@\ +Concat(down/$(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + $(LD) -o $@~ AoutSharedLibraryLoadFlags solist @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) Concat(down/$(LIBPREFIX),libname.so.rev) + +#endif /* AoutSharedLibraryTarget */ + +#ifndef AoutSharedDepLibraryTarget +#define AoutSharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ AllTarget(Concat(down/lib,libname.so.rev)) @@\ @@\ -Concat(down/lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat(down/lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - (cd down; $(LD) -o up/$@~ AoutSharedLibraryLoadFlags solist) @@\ + $(LD) -o $@~ AoutSharedLibraryLoadFlags solist @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @@\ clean:: @@\ $(RM) Concat(down/lib,libname.so.rev) -#endif /* AoutSharedLibraryTarget */ +#endif /* AoutSharedDepLibraryTarget */ #define AoutCDebugFlags -aout DefaultCDebugFlags #define AoutCplusplusDebugFlags -aout DefaultCplusplusDebugFlags -#define AoutLibObjCompile(options) LibObjCompile(aout,AoutCDebugFlags AoutSharedLibraryDef AoutPositionIndependentCFlags options) -#define AoutLibObjCplusplusCompile(options) LibObjCompile(aout,AoutCplusplusDebugFlags options) +#define AoutLibObjCompile(options) LibObjCompile(AoutSubdir,AoutCDebugFlags AoutSharedLibraryDef AoutPositionIndependentCFlags options) +#define AoutLibObjAsm(options) LibObjAsm(AoutSubdir,options -U__ELF__ -D__AOUT__ -UUSE_SSE_ASM -UUSE_MMX_ASM -UUSE_3DNOW_ASM, AoutAsmOptions) +#define AoutLibObjCplusplusCompile(options) LibObjCompile(AoutSubdir,AoutCplusplusDebugFlags options) + +#define ExtraSubdir AoutSubdir +EXTRASUBDIR = ExtraSubdir +#define ObjectPrefix ExtraSubdir/ -#define ExtraLibMkdir() _LibMkdir(aout) +#define ExtraLibMkdir() _LibMkdir(AoutSubdir) #define ExtraObjCompile(options) AoutLibObjCompile(options) +#define ExtraObjAsm(options) AoutLibObjAsm(options) #define ExtraObjCplusplusCompile(options) AoutLibObjCplusplusCompile(options) -#define ExtraCleanDir() LibCleanDir(aout) +#define ExtraCleanDir() LibCleanDir(AoutSubdir) -#define ExtraLibraryTarget(libname,so,objs) AoutSharedLibraryTarget(libname,so,objs,aout,..) -#define ExtraInstallLibrary(libname,so) InstallAoutSharedLibrary(libname,so,$(SHLIBDIR)/aout) +#define ExtraLibraryTarget(libname,so,objs) AoutSharedLibraryTarget(libname,so,objs,AoutSubdir,..) +#define ExtraDepLibraryTarget(libname,so,deplist,objs) AoutSharedDepLibraryTarget(libname,so,deplist,objs,AoutSubdir,..) +#define ExtraInstallLibrary(libname,so) InstallAoutSharedLibrary(libname,so,$(SHLIBDIR)/AoutSubdir) #endif #endif Index: xc/config/cf/bsdi.cf diff -u xc/config/cf/bsdi.cf:3.38 xc/config/cf/bsdi.cf:3.40 --- xc/config/cf/bsdi.cf:3.38 Sat Jan 24 20:12:20 2004 +++ xc/config/cf/bsdi.cf Fri Jun 25 11:33:21 2004 @@ -1,8 +1,53 @@ -XCOMM platform: $Xorg: bsdi.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ +XCOMM platform: $XFree86: xc/config/cf/bsdi.cf,v 3.40 2004/06/25 15:33:21 tsi Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/bsdi.cf,v 3.38 2004/01/25 01:12:20 dawes Exp $ #ifndef OSName #define OSName DefaultOSName #endif @@ -107,20 +152,20 @@ # define CcCmd gcc /* shlicc */ # define CplusplusCmd g++ /* shlicc++ */ # if ((OSMajorVersion == 4 && OSMinorVersion >= 2) || (OSMajorVersion > 4)) -# define OptimizedCDebugFlags -O3 -mcpu=pentiumpro -march=pentium +# define OptimizedCDebugFlags -O3 -mcpu=pentiumpro -march=pentium GccAliasingArgs # else -# define OptimizedCDebugFlags -O2 -m486 +# define OptimizedCDebugFlags -O2 -m486 GccAliasingArgs # endif # endif # ifdef PpcArchitecture # define CcCmd gcc # define CplusplusCmd g++ -# define OptimizedCDebugFlags -O2 +# define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # ifdef SparcArchitecture # define CcCmd gcc # define CplusplusCmd g++ -# define OptimizedCDebugFlags -O2 -cpu=v8 -mtune=v8 +# define OptimizedCDebugFlags -O2 -cpu=v8 -mtune=v8 GccAliasingArgs # endif #else # define CcCmd cc @@ -205,6 +250,7 @@ # define SharedLibXv YES # define SharedLibXinerama YES # define ServerExtraDefines GccGasOption XFree86ServerDefines -I/sys +# define ServerOSDefines XFree86ServerOSDefines # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME # define XFree86ConsoleDefines -DBSDI_VT # if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 1) Index: xc/config/cf/bsdiLib.rules diff -u xc/config/cf/bsdiLib.rules:3.4 xc/config/cf/bsdiLib.rules:3.9 --- xc/config/cf/bsdiLib.rules:3.4 Sat Oct 11 05:40:12 2003 +++ xc/config/cf/bsdiLib.rules Mon May 31 20:16:53 2004 @@ -1,4 +1,50 @@ -XCOMM $XFree86: xc/config/cf/bsdiLib.rules,v 3.4 2003/10/11 09:40:12 herrb Exp $ +XCOMM $XFree86: xc/config/cf/bsdiLib.rules,v 3.9 2004/06/01 00:16:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * BSDI shared library rules (converted from SVr4/Linux rules) @@ -47,11 +93,12 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ - $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so) + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.rev) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so)); fi #endif /* InstallSharedLibrary */ /* @@ -61,6 +108,9 @@ #define InstallSharedLibraryData(libname,rev,dest) #endif /* InstallSharedLibraryData */ +#ifndef SetSonameRev +#define SetSonameRev(rev) set +e; S=`expr rev : '\([0-9]*\)'`; set -e +#endif /* * SharedLibraryTarget - generate rules to create a shared library; @@ -69,26 +119,31 @@ */ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist @@\ +Concat($(LIBPREFIX),libname.so.rev): solist @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \ - -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; \ @@\ + $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \ @@\ + -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs);\ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ set -x; $(RM) $$SONAME @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedLibraryTarget */ @@ -99,26 +154,31 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \ - -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; \ @@\ + $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \ @@\ + -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs);\ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ set -x; $(RM) $$SONAME @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedDepLibraryTarget */ @@ -229,7 +289,7 @@ #ifndef InstallLibrary #define InstallLibrary(libname,dest) @@\ -install:: LibraryTargetName(libname) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \ LibraryTargetName(libname) $(DESTDIR)dest @@\ Index: xc/config/cf/cygwin.cf diff -u xc/config/cf/cygwin.cf:3.57 xc/config/cf/cygwin.cf:3.59 --- xc/config/cf/cygwin.cf:3.57 Wed Dec 24 13:58:41 2003 +++ xc/config/cf/cygwin.cf Sat Jan 15 19:09:45 2005 @@ -1,4 +1,4 @@ -XCOMM platform: $XFree86: xc/config/cf/cygwin.cf,v 3.57 2003/12/24 18:58:41 dickey Exp $ +XCOMM platform: $XFree86: xc/config/cf/cygwin.cf,v 3.59 2005/01/16 00:09:45 dawes Exp $ #ifndef OSName # define OSName Cygwin @@ -176,7 +176,7 @@ * we can remove these lines and use the default XFree86 options. */ #ifndef DefaultCCOptions -# define DefaultCCOptions /* -ansi -pedantic */ GccWarningOptions +# define DefaultCCOptions /* -ansi */ GccWarningOptions #endif /* @@ -301,7 +301,6 @@ #define BuildRender YES #define BuildRandR NO #define BuildXF86DRI NO /* No direct access to hardware */ -#define BuildXF86DRM NO /* No direct access to hardware */ #define BuildXKB YES #define BuildXCMiscExt YES #define BuildTestExt YES Index: xc/config/cf/darwin.cf diff -u xc/config/cf/darwin.cf:1.51 xc/config/cf/darwin.cf:1.53 --- xc/config/cf/darwin.cf:1.51 Tue Feb 10 19:30:27 2004 +++ xc/config/cf/darwin.cf Mon Feb 14 19:57:23 2005 @@ -1,4 +1,4 @@ -XCOMM platform: $XFree86: xc/config/cf/darwin.cf,v 1.51 2004/02/11 00:30:27 torrey Exp $ +XCOMM platform: $XFree86: xc/config/cf/darwin.cf,v 1.53 2005/02/15 00:57:23 dawes Exp $ /* Darwin / Mac OS X configuration by John Carmack */ @@ -155,15 +155,17 @@ /* * Our cpp isn't in /lib/cpp and early versions don't like -undef. - * The default cpp-3.3 that ships with Panther inserts spurious #pragmas, - * so we use the 3.1-based version. + * The gcc 3.3 cpp that Apple ships inserts spurious #pragmas, + * so we use the 3.1-based version in this case. */ -#if OSMajorVersion >= 7 +#if (GccMajorVersion == 3) && (GccMinorVersion == 3) # define CppCmd /usr/bin/cpp3 -# define StandardCppOptions -traditional -D__GNUC__ #else # define CppCmd /usr/bin/cpp #endif +#if (GccMajorVersion == 3) && (GccMinorVersion == 3) || (GccMajorVersion > 3) +# define StandardCppOptions -traditional -D__GNUC__ +#endif #if HasGcc3 # define RawCppCmd CppCmd -undef #else @@ -256,8 +258,10 @@ /* no direct graphics extension */ #define BuildXF86DGA NO -/* no server support for extra tablets and weird input devices */ -#define BuildXInputExt NO +/* Support for tablets and other non-standard input devices */ +#ifndef BuildXInputExt +# define BuildXInputExt YES +#endif #define BuildXInputLib YES /* no Display Power Management extension */ Index: xc/config/cf/darwinLib.rules diff -u xc/config/cf/darwinLib.rules:1.9 xc/config/cf/darwinLib.rules:1.13 --- xc/config/cf/darwinLib.rules:1.9 Sat Oct 11 05:40:12 2003 +++ xc/config/cf/darwinLib.rules Fri Apr 23 13:56:04 2004 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/darwinLib.rules,v 1.9 2003/10/11 09:40:12 herrb Exp $ +XCOMM $XFree86: xc/config/cf/darwinLib.rules,v 1.13 2004/04/23 17:56:04 torrey Exp $ /* * Darwin/Mac OS X shared library rules */ @@ -35,20 +35,25 @@ #define ExtraLoadFlags /**/ #endif +#ifndef SetMajorRev +#define SetMajorRev(rev) set +e; MAJREV=`expr rev : '\([0-9]*\)'`; set -e +#endif + /* * InstallSharedLibrary - generate rules to install the shared library. */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.rev.dylib) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.rev.dylib) $(DESTDIR)dest @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat($(DESTDIR)dest/lib,libname.$$MAJREV.dylib) && \ @@\ - $(LN) Concat(lib,libname.rev.dylib) Concat($(DESTDIR)dest/lib,libname.$$MAJREV.dylib) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat($(LIBPREFIX),libname.rev.dylib) $(DESTDIR)dest @@\ + @SetMajorRev(rev); \ @@\ + if [ rev != $$MAJREV ]; then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.$$MAJREV.dylib) && \ @@\ + $(LN) Concat($(LIBPREFIX),libname.rev.dylib) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.$$MAJREV.dylib)); fi @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.dylib); \ @@\ - $(LN) Concat(lib,libname.rev.dylib) Concat($(DESTDIR)dest/lib,libname.dylib)); fi + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.dylib); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.rev.dylib) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.dylib)); fi #endif /* InstallSharedLibrary */ /* @@ -58,27 +63,28 @@ */ #ifndef SharedLibraryTarget # define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.rev.dylib)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.rev.dylib)) @@\ @@\ -Concat(lib,libname.rev.dylib): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.rev.dylib): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\ - set -x; (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ - $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\ + @SetMajorRev(rev); \ @@\ + INSTALLNAME=Concat($(LIBPREFIX),libname.$$MAJREV.dylib); \ @@\ + (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ + if [ $$INSTALLNAME != $@ ]; then (set -x; \ @@\ + $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME); fi; \ @@\ LinkBuildSonameLibrary($$INSTALLNAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.dylib); \ @@\ - $(LN) $@ Concat(lib,libname.dylib)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.dylib); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.dylib)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.dylib),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\ - $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib) + @SetMajorRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.$$MAJREV.dylib) @@\ + $(RM) Concat($(LIBPREFIX),libname.rev.dylib) Concat($(LIBPREFIX),libname.dylib) #endif /* SharedLibraryTarget */ @@ -87,27 +93,28 @@ */ #ifndef SharedDepLibraryTarget # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.rev.dylib)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.rev.dylib)) @@\ @@\ -Concat(lib,libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\ - set -x; (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ - $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\ + @SetMajorRev(rev); \ @@\ + INSTALLNAME=Concat($(LIBPREFIX),libname.$$MAJREV.dylib); \ @@\ + (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ + if [ $$INSTALLNAME != $@ ]; then (set -x; \ @@\ + $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME); fi; \ @@\ LinkBuildSonameLibrary($$INSTALLNAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.dylib); \ @@\ - $(LN) $@ Concat(lib,libname.dylib)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.dylib); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.dylib)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.dylib),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\ - $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib) + @SetMajorRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.$$MAJREV.dylib) @@\ + $(RM) Concat($(LIBPREFIX),libname.rev.dylib) Concat($(LIBPREFIX),libname.dylib) #endif /* SharedDepLibraryTarget */ @@ -116,27 +123,28 @@ */ #ifndef SharedDepCplusplusLibraryTarget # define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.rev.dylib)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.rev.dylib)) @@\ @@\ -Concat(lib,libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\ - set -x; (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ - $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\ + @SetMajorRev(rev); \ @@\ + INSTALLNAME=Concat($(LIBPREFIX),libname.$$MAJREV.dylib); \ @@\ + (set -x; cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\ + if [ $$INSTALLNAME != $@ ]; then (set -x; \ @@\ + $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME); fi; \ @@\ LinkBuildSonameLibrary($$INSTALLNAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.dylib); \ @@\ - $(LN) $@ Concat(lib,libname.dylib)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.dylib); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.dylib)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.dylib),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\ - $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib) + @SetMajorRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.$$MAJREV.dylib) @@\ + $(RM) Concat($(LIBPREFIX),libname.rev.dylib) Concat($(LIBPREFIX),libname.dylib) #endif /* SharedDepCplusplusLibraryTarget */ Index: xc/config/cf/darwinLib.tmpl diff -u xc/config/cf/darwinLib.tmpl:1.20 xc/config/cf/darwinLib.tmpl:1.21 --- xc/config/cf/darwinLib.tmpl:1.20 Tue Nov 18 14:04:54 2003 +++ xc/config/cf/darwinLib.tmpl Fri Feb 4 21:01:39 2005 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/darwinLib.tmpl,v 1.20 2003/11/18 19:04:54 torrey Exp $ +XCOMM $XFree86: xc/config/cf/darwinLib.tmpl,v 1.21 2005/02/05 02:01:39 dawes Exp $ /* * Darwin/Mac OS X shared library template */ @@ -54,3 +54,4 @@ #define SharedXxf86vmReqs $(LDPRELIB) $(XLIB) #define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB) #define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB) +#define SharedDmxReqs $(LDPRELIB) $(XLIB) Index: xc/config/cf/dmx.cf diff -u /dev/null xc/config/cf/dmx.cf:1.1 --- /dev/null Wed Mar 16 20:58:23 2005 +++ xc/config/cf/dmx.cf Wed Jun 30 16:21:35 2004 @@ -0,0 +1,66 @@ +/* $XFree86: xc/config/cf/dmx.cf,v 1.1 2004/06/30 20:21:35 martin Exp $ */ + +/* + * This file contains DMX server specific defines + */ + +#undef XVendorString +#define XVendorString "DMX Project" + +/* + * Note 1: This is a signed int that is printed as a decimal number. + * Since we want to make it human-interpretable, the fields are + * defined as: + * 2147483648 + * AAbbyymmdd + * AA: major version 01-20 + * bb: minor version 00-99 + * yy: year 00-99 [See Note 2] + * mm: month 01-12 + * dd: day 01-31 + * + * Note 2: The default epoch for the year is 2000. + * To change the default epoch, change the DMX_VENDOR_RELEASE + * macro below, bumb the minor version number, and change + * xdpyinfo to key off the major/minor version to determine the + * new epoch. Remember to do this on January 1, 2100 and every + * 100 years thereafter. + */ +#define DMX_VENDOR_RELEASE(major,minor,year,month,day) \ + ((major) * 100000000) + \ + ((minor) * 1000000) + \ + ((year-2000) * 10000) + \ + ((month) * 100) + \ + ((day) * 1) +#undef XVendorRelease +#define XVendorRelease DMX_VENDOR_RELEASE(1,2,2004,6,30) + +EXTENSIONS_NOT_SUPPORTED = \ + -UBEZIER \ + -UPEXEXT \ + -UMULTIBUFFER \ + -UXV \ + -UXIE \ + -UDBE \ + -UXF86VIDMODE \ + -UXF86MISC \ + -UXFreeXDGA \ + -UXF86DRI \ + -UMITSHM \ + -UTOGCUP \ + -UDPSEXT \ + -UMITMISC \ + -USCREENSAVER \ + -URANDR + +EXT_TEMP_NOT_SUPPORTED = \ + -UFONTCACHE + +DMX_DEFINES = \ + $(EXTENSIONS_NOT_SUPPORTED) \ + $(EXT_TEMP_NOT_SUPPORTED) \ + -UXFree86LOADER + +XCOMM MITSHM -- works but doesn't quite do what people think it should +XCOMM DPMSExtension -- compiled in but is non-functional +XCOMM MITMISC provides legacy support for X11R1,2 applications. Disable. Index: xc/config/cf/gnu.cf diff -u xc/config/cf/gnu.cf:1.13 xc/config/cf/gnu.cf:1.14 --- xc/config/cf/gnu.cf:1.13 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/gnu.cf Wed Jun 2 18:42:53 2004 @@ -1,4 +1,52 @@ -XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.13 2004/01/09 00:35:00 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.14 2004/06/02 22:42:53 dawes Exp $ + +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef OSName #define OSName DefaultOSName @@ -127,7 +175,7 @@ XCOMM i386Architecture #define OptimizedCDebugFlags DefaultGcc2i386Opt #define GNUMachineDefines -D__i386__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerOSDefines XFree86ServerOSDefines #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #define HasPlugin YES #define VendorHasX11R6_3libXext YES Index: xc/config/cf/gnuLib.rules diff -u xc/config/cf/gnuLib.rules:1.10 xc/config/cf/gnuLib.rules:1.14 --- xc/config/cf/gnuLib.rules:1.10 Mon Jan 26 20:37:39 2004 +++ xc/config/cf/gnuLib.rules Wed Apr 7 21:40:19 2004 @@ -1,7 +1,7 @@ /* * GNU/Hurd shared library rules * - * $XFree86: xc/config/cf/gnuLib.rules,v 1.10 2004/01/27 01:37:39 dawes Exp $ + * $XFree86: xc/config/cf/gnuLib.rules,v 1.14 2004/04/08 01:40:19 dawes Exp $ */ /* @@ -71,20 +71,26 @@ #endif #endif +#ifndef SetSonameRev +#define SetSonameRev(rev) set +e; S=`expr rev : '\([0-9]*\)'`; set -e +#endif + /* * InstallSharedLibrary - generate rules to install the shared library. * NOTE: file must be executable, hence "INSTBINFLAGS" */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ - set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ - @if $(SOSYMLINK); then (set -x; \ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ - $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest @@\ + @SetSonameRev(rev); \ @@\ + T=Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$S); \ @@\ + if [ rev != $$S ]; then (set -x; \ @@\ + $(RM) $$T && $(LN) Concat($(LIBPREFIX),libname.so.rev) $$T); fi @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.rev) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so)); fi #endif /* InstallSharedLibrary */ /* @@ -102,26 +108,28 @@ */ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @SetSonameRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.so.$$S) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedLibraryTarget */ @@ -130,26 +138,28 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); \ @@\ + (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @SetSonameRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.so.$$S) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedDepLibraryTarget */ Index: xc/config/cf/hpLib.rules diff -u xc/config/cf/hpLib.rules:3.4 xc/config/cf/hpLib.rules:3.5 --- xc/config/cf/hpLib.rules:3.4 Wed Jan 17 11:22:31 2001 +++ xc/config/cf/hpLib.rules Wed Mar 24 22:36:21 2004 @@ -4,7 +4,7 @@ * HP shared library rules */ -XCOMM $XFree86: xc/config/cf/hpLib.rules,v 3.4 2001/01/17 16:22:31 dawes Exp $ +XCOMM $XFree86: xc/config/cf/hpLib.rules,v 3.5 2004/03/25 03:36:21 dawes Exp $ #ifndef HasSharedLibraries # define HasSharedLibraries YES @@ -70,7 +70,7 @@ */ #ifndef InstallSharedLibrary # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.sl.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ RMoveToBakFile(Concat($(DESTDIR)dest/lib,libname.sl.rev)) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sl.rev) $(DESTDIR)dest @@\ Index: xc/config/cf/iPAQH3600.cf diff -u xc/config/cf/iPAQH3600.cf:1.2 xc/config/cf/iPAQH3600.cf:removed --- xc/config/cf/iPAQH3600.cf:1.2 Tue Oct 10 10:05:48 2000 +++ xc/config/cf/iPAQH3600.cf Wed Mar 16 20:58:24 2005 @@ -1,109 +0,0 @@ -/* $XFree86: xc/config/cf/iPAQH3600.cf,v 1.2 2000/10/10 14:05:48 tsi Exp $ */ -/* - * This configuration file contains additional configuration needed - * to cross compile X for the Compaq iPAQ H3600 PocketPC. - * To use this, add the following to host.def: - #define KDriveXServer YES - #define XiPAQH3500Server YES - */ - -#define CrossCompiling YES - -#undef i386Architecture -#define Arm32Architecture - -#undef OptimizedCDebugFlags -#define OptimizedCDebugFlags -O2 -#define ServerCDebugFlags -O2 -#undef StandardDefines -#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE -#undef CcCmd -#define StdIncDir /skiff/local/arm-linux/include -#define PreIncDir -#undef PostIncDir -#define PostIncDir /skiff/local/lib/gcc-lib/arm-linux/2.95.2/include -#define CcCmd /skiff/local/bin/arm-linux-gcc -#define DoRanlibCmd YES -#define RanlibCmd /skiff/local/bin/arm-linux-ranlib -#undef ExtraLoadFlags -#define ExtraLoadFlags -#define FbNoPixelAddrCode -#undef TermcapLibrary -#define TermcapLibrary -ltermcap - -#undef LdPostLib -#define LdPostLib -L/skiff/local/arm-linux/lib - -#undef XfbdevServer -#define XfbdevServer YES -#undef BuildXprint -#define BuildLBX NO -#define BuildFonts NO -#define BuildAppgroup NO -#define BuildRECORD NO -#define BuildDBE NO -#define BuildXCSecurity NO -#define ItsyCompilerBug YES -#define FontServerAccess NO -#define ServerXdmcpDefines /**/ - -#undef ExtensionOSDefines -#define ExtensionOSDefines - -#define ProjectRoot /usr/X11R6 - -#define GzipFontCompression YES - -#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1 - -#define HostLinkRule(target, flags, src, libs) cc -I$(BUILDINCDIR) -o target src - -/* ComplexHostProgramTarget - Compile a program such that we can run - * it on this host, i.e., don't use the default cross compiler. - */ -#ifndef ComplexHostProgramTarget -#define ComplexHostProgramTarget(program) @@\ - CC=cc @@\ - STD_INCLUDES= @@\ - CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\ -EXTRA_LOAD_FLAGS= @@\ - PROGRAM = program @@\ - @@\ -AllTarget(program) @@\ - @@\ -program: $(OBJS) $(DEPLIBS) @@\ - RemoveTargetProgram($@) @@\ - HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ - @@\ -DependTarget() @@\ - @@\ -LintTarget() @@\ - @@\ -clean:: @@\ - RemoveFile(ProgramTargetName(program)) -#endif /* ComplexHostProgramTarget */ - -#ifndef SimpleHostProgramTarget -#define SimpleHostProgramTarget(program) @@\ - SRCS = program.c @@\ - @@\ - CC=cc @@\ - STD_INCLUDES= @@\ - CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\ -EXTRA_LOAD_FLAGS= @@\ - PROGRAM = program @@\ - @@\ -AllTarget(program) @@\ - @@\ -program: program.o $(DEPLIBS) @@\ - RemoveTargetProgram($@) @@\ - HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ - @@\ -DependTarget() @@\ - @@\ -LintTarget() @@\ - @@\ -clean:: @@\ - RemoveFile(ProgramTargetName(program)) -#endif /* SimpleHostProgramTarget */ Index: xc/config/cf/itsy.cf diff -u xc/config/cf/itsy.cf:1.2 xc/config/cf/itsy.cf:removed --- xc/config/cf/itsy.cf:1.2 Fri Mar 31 15:13:11 2000 +++ xc/config/cf/itsy.cf Wed Mar 16 20:58:24 2005 @@ -1,108 +0,0 @@ -/* - * This configuration file contains additional configuration needed - * to cross compile X for the Compaq Itsy handheld computer. - * To use this, add the following to host.def: - #define KDriveXServer YES - #define XItsyServer YES - */ - -#define CrossCompiling YES - -#undef i386Architecture -#define Arm32Architecture - -#undef OptimizedCDebugFlags -#define OptimizedCDebugFlags -O2 -#define ServerCDebugFlags -O2 -#undef StandardDefines -#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE -#undef CcCmd -#define StdIncDir /usr/local/arm-unknown-linuxelf/include -#define PreIncDir /usr/local/arm-unknown-linuxelf/lib/gcc-include -#undef PostIncDir -#define PostIncDir /usr/local/lib/gcc-lib/arm-unknown-linuxelf/egcs-2.91.66/include -#define CcCmd /usr/local/bin/arm-unknown-linuxelf-gcc -#define DoRanlibCmd YES -#define RanlibCmd /usr/local/bin/arm-unknown-linuxelf-ranlib -#undef ExtraLoadFlags -#define ExtraLoadFlags -#define FbNoPixelAddrCode -#undef TermcapLibrary -#define TermcapLibrary -ltermcap - -#undef LdPostLib -#define LdPostLib -L/usr/local/arm-unknown-linuxelf/lib - -#undef XfbdevServer -#define XfbdevServer NO -#undef BuildXprint -#define BuildLBX NO -#define BuildFonts NO -#define BuildAppgroup NO -#define BuildRECORD NO -#define BuildDBE NO -#define BuildXCSecurity NO -#define ItsyCompilerBug YES -#define FontServerAccess NO -#define ServerXdmcpDefines /**/ - -#undef ExtensionOSDefines -#define ExtensionOSDefines - -#define ProjectRoot - -#define GzipFontCompression NO - -#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1 - -#define HostLinkRule(target, flags, src, libs) cc -I$(BUILDINCDIR) -o target src - -/* ComplexHostProgramTarget - Compile a program such that we can run - * it on this host, i.e., don't use the default cross compiler. - */ -#ifndef ComplexHostProgramTarget -#define ComplexHostProgramTarget(program) @@\ - CC=cc @@\ - STD_INCLUDES= @@\ - CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\ -EXTRA_LOAD_FLAGS= @@\ - PROGRAM = program @@\ - @@\ -AllTarget(program) @@\ - @@\ -program: $(OBJS) $(DEPLIBS) @@\ - RemoveTargetProgram($@) @@\ - HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ - @@\ -DependTarget() @@\ - @@\ -LintTarget() @@\ - @@\ -clean:: @@\ - RemoveFile(ProgramTargetName(program)) -#endif /* ComplexHostProgramTarget */ - -#ifndef SimpleHostProgramTarget -#define SimpleHostProgramTarget(program) @@\ - SRCS = program.c @@\ - @@\ - CC=cc @@\ - STD_INCLUDES= @@\ - CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\ -EXTRA_LOAD_FLAGS= @@\ - PROGRAM = program @@\ - @@\ -AllTarget(program) @@\ - @@\ -program: program.o $(DEPLIBS) @@\ - RemoveTargetProgram($@) @@\ - HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\ - @@\ -DependTarget() @@\ - @@\ -LintTarget() @@\ - @@\ -clean:: @@\ - RemoveFile(ProgramTargetName(program)) -#endif /* SimpleHostProgramTarget */ Index: xc/config/cf/kdrive.cf diff -u xc/config/cf/kdrive.cf:1.14 xc/config/cf/kdrive.cf:removed --- xc/config/cf/kdrive.cf:1.14 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/kdrive.cf Wed Mar 16 20:58:24 2005 @@ -1,242 +0,0 @@ -XCOMM $XFree86: xc/config/cf/kdrive.cf,v 1.14 2004/01/09 00:35:00 dawes Exp $ -/* - * This configuration file contains all of the configuration - * information for the XFree86 based X Servers. - * - * Most of these settings can be overridden in a vendor.cf or the - * BeforeVendor part of the site.def file. - */ -XCOMM $XConsortium: $ - -#undef BuildXprint -#define BuildXprint NO -#ifndef XTS300Server -#define XTS300Server NO -#endif -#ifndef XipaqServer -#define XipaqServer NO -#endif -#ifndef XfbdevServer -#define XfbdevServer NO -#endif -#ifndef XIGSServer -#define XIGSServer NO -#endif -#ifndef XTridentServer -#define XTridentServer NO -#endif -#ifndef XSavageServer -#define XSavageServer NO -#endif -#ifndef XItsyServer -#define XItsyServer NO -#endif -#ifndef TinyXServer -#define TinyXServer NO -#endif -#ifndef XvesaServer -#define XvesaServer NO -#endif -#ifndef Xmach64Server -#define Xmach64Server NO -#endif - -#if XItsyServer -#include -#endif - -#if TinyXServer -#include -#endif - -#if CrossCompiling -#include -#endif - -#define XprtServer NO -#define BuildXIE NO -#define BuildXInputExt NO -#define BuildPexExt NO -#ifndef BuildLBX -#define BuildLBX YES -#endif -#ifndef BuildPseudo8 -#define BuildPseudo8 NO -#endif -#ifndef BuildRender -#define BuildRender YES -#endif -#ifndef TouchScreen -#define TouchScreen NO -#endif - -/* - * By default, build all of the fonts. - */ -#ifndef Build75Dpi -#define Build75Dpi YES -#endif - -#ifndef Build100Dpi -#define Build100Dpi YES -#endif - -#ifndef BuildSpeedo -#define BuildSpeedo NO -#endif - -#ifndef BuildType1 -#define BuildType1 NO -#endif - -#ifndef BuildCID -#define BuildCID NO -#endif - -#ifndef BuildFreeType -#define BuildFreeType NO -#endif - -#ifndef BuildBuiltinFonts -#define BuildBuiltinFonts YES -#endif - -#ifndef CompressAllFonts -#define CompressAllFonts YES -#endif - -#ifndef GzipFontCompression -#define GzipFontCompression YES -#endif - -#define DefaultFontPath built-ins,$(FONTDIR)/misc/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/ - -#ifndef HasLinuxDoc -#define HasLinuxDoc NO -#endif - -#ifndef InstallJapaneseDocs -#define InstallJapaneseDocs NO -#endif - -#ifndef HasDlsymBug -#define HasDlsymBug NO -#endif - -#ifndef XVendorString -#define XVendorString "Keith Packard" -#endif - -#ifndef XVendorRelease -#define XVendorRelease 600300 -#endif - -#ifndef BuildXKB -#define BuildXKB NO -#endif - -#ifndef BuildXIE -#define BuildXIE NO -#endif - -#ifndef BuildEVI -#define BuildEVI NO -#endif - -#ifndef BuildRECORD -#define BuildRECORD NO -#endif - -#ifndef BuildPexExt -#define BuildPexExt NO -#endif - -#ifndef BuildDPMS -#define BuildDPMS NO -#endif - -#ifndef FontServerAccess -#define FontServerAccess YES -#endif - -/* - * Fix some xfree86 assumptions - */ - -#undef DoLoadableServer -#define DoLoadableServer NO - -#define NormalLibFont YES -#define SharedLibFont NO - -#define DBMLibrary /**/ - -#define DDXOsColor YES - -#if FontServerAccess -#else -FONTSERVERACCESS=-DNOFONTSERVERACCESS -#endif - -#if TouchScreen -#define TouchScreenDefines -DTOUCHSCREEN -#else -#define TouchScreenDefines /**/ -#endif - -#if BuildPseudo8 -#define Pseudo8Defines -DPSEUDO8 -#else -#define Pseudo8Defines -#endif - -#ifndef KdriveServerExtraDefines -#define KdriveServerExtraDefines -#endif - -XF86COMSRC=. - -#undef ServerExtraDefines -#define ServerExtraDefines -DKDRIVESERVER -DGCCUSESGAS -DDDXOSINIT -DSMART_SCHEDULE $(FONTSERVERACCESS) Pseudo8Defines TouchScreenDefines KdriveServerExtraDefines -#undef ServerOSDefines -#define ServerOSDefines -DDDXOSINIT - -#ifndef Other IConfigFiles -#define OtherIConfigFile $(IRULESRC)/kdrive.cf -#endif - -#if defined(HasGcc2) && defined(i386Architecture) -#ifndef DefaultGcc2i386Opt -#define DefaultGcc2i386Opt -O2 -fno-strength-reduce -#endif -#endif - -#if defined(HasGcc2) && defined(AlphaArchitecture) -#ifndef DefaultGcc2AxpOpt -#define DefaultGcc2AxpOpt -O2 -#endif -#endif - -#if defined(HasGcc2) && defined(PpcArchitecture) -#ifndef DefaultGcc2PpcOpt -#define DefaultGcc2PpcOpt -O2 -#endif -#endif - -#ifndef DefaultGcc2DebugOpt -#define DefaultGcc2DebugOpt -g -#endif - -#define InstallDriverSDKNonExecFile(file,dest) /**/ -#define InstallDriverSDKLibrary(libname,dest) /**/ -#define InstallDriverSDKNamedLibrary(libname,dlibname,dest) /**/ -#define InstallDriverSDKNamedNonExec(srcname,dstname,dest) /**/ -#define InstallDriverSDKNamedProg(srcname,dstname,dest) /**/ -#define InstallDriverSDKSubdirs(dirs) /**/ -#define InstallDriverSDKMultipleDestFlags(list,dest,flags) /**/ -#define InstallDriverSDKDynamicModule(module,dest,subdir) /**/ -#define InstallDriverSDKObjectModule(module,dest,subdir) /**/ -#define InstallDriverSDKObjectSubModule(module,dest,subdir) /**/ -#define InstallDriverSDKLibraryModule(module,dest,subdir) /**/ -#define ServerDriverSDKTarget(program) /**/ -#define InstallDriverSDKProgramWithFlags(program,dest,flags) /**/ Index: xc/config/cf/linux.cf diff -u xc/config/cf/linux.cf:3.221 xc/config/cf/linux.cf:3.235 --- xc/config/cf/linux.cf:3.221 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/linux.cf Wed Feb 9 14:49:09 2005 @@ -1,10 +1,52 @@ -XCOMM platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ - - - +XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.235 2005/02/09 19:49:09 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.221 2004/01/09 00:35:00 dawes Exp $ #ifndef LinuxElfDefault # define LinuxElfDefault YES @@ -115,61 +157,6 @@ # define MiscManSuffix 7x # define MiscManDir $(MANSOURCEPATH)7 -/* - * - * -# define DebianMaintainer YES - * - * - */ - -# ifdef DebianMaintainer -# ifndef XFree86CustomVersion -# define XFree86CustomVersion "Debian" -# endif -# ifndef BuilderEMailAddr -# define BuilderEMailAddr "debian-x@lists.debian.org" -# endif -# define XFree86Devel YES -# define BuildAllSpecsDocs YES -# define InstallXinitConfig YES -# define InstallXdmConfig YES -# define InstallFSConfig YES -# define DebuggableLibraries YES -# define ForceNormalLib YES -# define BuildSpecsDocs YES -# define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm -# define BuildRman NO -# define BuildHtmlManPages NO - -/* we build-depend on libfreetype6-dev (FreeType 2.x) */ -# define BuildFreetype2Library NO -# define HasFreetype2 YES -/* m68k has no 2.4 kernel yet */ -# ifndef Mc68020Architecture -# define HasLinuxInput YES -# endif -# define HasXdmAuth YES -# define HasLatex YES -/* at present, glide2 only works on i386 */ -# ifdef i386Architecture -# define HasGlide2 YES -# define Glide2IncDir /usr/include/glide -# endif /* i386Architecture */ -/* at present, glide3 only works on alpha and i386 */ -# if defined(i386Architecture) || defined(AlphaArchitecture) -# define HasGlide3 YES -# define Glide3IncDir /usr/include/glide3 -# endif /* i386Architecture || AlphaArchitecture */ -/* extended instruction set support */ -# ifdef i386Architecture -# define HasX86Support YES -# define HasMMXSupport YES -# define Has3DNowSupport YES -/* 2.4 is not yet the official (or predominant) kernel in unstable */ -# define HasSSESupport NO -# endif /* i386Architecture */ -# endif /* DebianMaintainer */ #endif /* LinuxDebian */ #if LinuxDistribution == LinuxRedHat @@ -351,14 +338,6 @@ # endif #endif -/* - * Building the DRM module requires kernel source be installed. It's safest - * to just not enable it by default. - */ -#ifndef BuildXF86DRM -#define BuildXF86DRM NO -#endif - #ifndef HasAgpGart # if defined(i386Architecture) || defined(ia64Architecture) || defined(AMD64Architecture) /* The AGPGART header file is included in os-support/linux, which @@ -430,6 +409,27 @@ # define LinuxFBDevSupport YES #endif +/* + * Defaults for the TinyX servers on Linux. + */ +#ifndef HaveTinyXSupport +# if defined(i386Architecture) +# define HaveTinyXSupport YES +# else +# define HaveTinyXSupport NO +# endif +#endif +#ifndef HaveTinyXVBESupport +# if defined(i386Architecture) +# define HaveTinyXVBESupport YES +# else +# define HaveTinyXVBESupport NO +# endif +#endif +#ifndef HaveTinyXFbdevSupport +# define HaveTinyXFbdevSupport LinuxFBDevSupport +#endif + /* For compatibility */ #define SourceDefines LinuxSourceDefines @@ -453,10 +453,16 @@ #define HasPutenv YES #define HasShm YES #define HasSockets YES -#if UseElfFormat || defined(AlphaArchitecture) +/* The semantics of snprintf() in libc version 5 are different. */ +#if (UseElfFormat && LinuxCLibMajorVersion >= 6) || defined(AlphaArchitecture) #ifndef HasSnprintf #define HasSnprintf YES #endif +#ifndef HasAsprintf +#define HasAsprintf YES +#endif +#endif +#if UseElfFormat || defined(AlphaArchitecture) #define HasMkstemp YES #endif /* getresuid() appeared in 2.1.4, and getresgid in 2.1.44 */ @@ -748,7 +754,7 @@ # define OSXInputDrivers1 /**/ # endif # if HasLinuxInput -# define OSXInputDrivers2 aiptek +# define OSXInputDrivers2 aiptek eloinput # else # define OSXInputDrivers2 /**/ # endif @@ -765,7 +771,7 @@ # define OptimizedCDebugFlags DefaultGcc2AxpOpt # endif # define LinuxMachineDefines -D__alpha__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT # ifdef UseCompaqMathLibrary # define MathLibrary -lcpml -lm @@ -775,17 +781,19 @@ #ifdef Arm32Architecture # define DefaultCCOptions -fsigned-char # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O3 +# define OptimizedCDebugFlags -O3 GccAliasingArgs # endif # define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* Arm32Achitecture */ #ifdef HPArchitecture -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 GccAliasingArgs +# endif # define LinuxMachineDefines -D__hppa__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif @@ -794,34 +802,34 @@ # define OptimizedCDebugFlags DefaultGcc2i386Opt # endif # define LinuxMachineDefines -D__i386__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* i386Architecture */ #ifdef ia64Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__ia64__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* ia64Architecture */ #ifdef Mc68020Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__mc68000__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* Mc68020Architecture */ #ifdef MipsArchitecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__mips__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif @@ -831,7 +839,7 @@ # define OptimizedCDebugFlags DefaultGcc2PpcOpt # endif # define LinuxMachineDefines -D__powerpc__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* PpcArchitecture */ @@ -840,30 +848,34 @@ # define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs # endif # define LinuxMachineDefines -D__s390__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* s390Architecture */ #ifdef s390xArchitecture /*#define DefaultCCOptions -fsigned-char */ -#define OptimizedCDebugFlags -O3 -fomit-frame-pointer -#define LinuxMachineDefines -D__s390x__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O3 -fomit-frame-pointer +# endif +# define LinuxMachineDefines -D__s390x__ +# define ServerOSDefines XFree86ServerOSDefines +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* s390xArchitecture */ #ifdef SparcArchitecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2SparcOpt # endif # define LinuxMachineDefines -D__sparc__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -# define AsVISOption -Av9a -# ifdef Sparc64Architecture -# define AsOutputArchSize 64 -# else -# define AsOutputArchSize 32 +# if UseElfFormat +# define AsVISOption -Av9a +# ifdef Sparc64Architecture +# define AsOutputArchSize 64 +# else +# define AsOutputArchSize 32 +# endif # endif #endif @@ -885,10 +897,10 @@ # endif # endif # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs +# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs # endif # define LinuxMachineDefines -D__sh__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines # ifndef DoLoadableServer # define DoLoadableServer NO @@ -900,10 +912,18 @@ # define OptimizedCDebugFlags DefaultGcc2AMD64Opt # endif # define LinuxMachineDefines -D__AMD64__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* AMD64Architecture */ +/* We never build these, on any architecture */ +#undef XsunServer +#define XsunServer NO +#undef XsunMonoServer +#define XsunMonoServer NO +#undef Xsun24Server +#define Xsun24Server NO + #ifndef StandardDefines # define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines #endif @@ -989,11 +1009,7 @@ #endif #include -#ifdef KDriveXServer -# include -#else -# include -#endif +#include #ifndef XFree86ServerOSDefines # define XFree86ServerOSDefines Index: xc/config/cf/lnxLib.rules diff -u xc/config/cf/lnxLib.rules:3.53 xc/config/cf/lnxLib.rules:3.61 --- xc/config/cf/lnxLib.rules:3.53 Mon Jan 26 20:37:39 2004 +++ xc/config/cf/lnxLib.rules Mon May 31 20:16:53 2004 @@ -1,5 +1,50 @@ -XCOMM $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ -XCOMM $XFree86: xc/config/cf/lnxLib.rules,v 3.53 2004/01/27 01:37:39 dawes Exp $ +XCOMM $XFree86: xc/config/cf/lnxLib.rules,v 3.61 2004/06/01 00:16:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * Linux shared library rules (DLL & ELF versions) @@ -106,20 +151,26 @@ # define ShlibGlobalsFlags -Wl,-Bsymbolic # endif +#ifndef SetSonameRev +#define SetSonameRev(rev) set +e; S=`expr rev : '\([0-9]*\)'`; set -e +#endif + /* * InstallSharedLibrary - generate rules to install the shared library. * NOTE: file must be executable, hence "INSTBINFLAGS" */ # ifndef InstallSharedLibrary # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ - set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ - @if $(SOSYMLINK); then (set -x; \ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ - $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest @@\ + @SetSonameRev(rev); \ @@\ + T=Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$S); \ @@\ + if [ rev != $$S ]; then (set -x; \ @@\ + $(RM) $$T && $(LN) Concat($(LIBPREFIX),libname.so.rev) $$T); fi @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.rev) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so)); fi # endif /* InstallSharedLibrary */ # ifndef InstallSharedLibtoolLibrary @@ -131,15 +182,15 @@ MIN=$$A.$$R # define InstallSharedLibtoolLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ @set +e; SetRevisions(rev); \ @@\ set -xe; \ @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.$$MAJ.$$MIN) $(DESTDIR)dest; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\ - $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ - $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so) + $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat($(LIBPREFIX),libname.so.$$MAJ.$$MIN) $(DESTDIR)dest; \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$MAJ); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.$$MAJ); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ + $(LN) Concat($(LIBPREFIX),libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so) # endif /* InstallSharedLibrary */ /* @@ -157,35 +208,37 @@ */ # ifndef SharedLibraryTarget # define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; (set -x; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); (set -x; \ @@\ cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs) || exit 1; \ @@\ - (set -x; $(RM) $$SONAME; $(LN) $@ $$SONAME); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @SetSonameRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.so.$$S) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) # endif /* SharedLibraryTarget */ # ifndef SharedLibtoolLibraryTarget # define SharedLibtoolLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so)) @@\ @@\ -Concat(lib,libname.so): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ @set +e; SetRevisions(rev); set -e; \ @@\ SONAME=$@.$$MAJ; \ @@\ @@ -206,9 +259,9 @@ clean:: @@\ @set +e; SetRevisions(rev); \ @@\ set -xe; \ @@\ - $(RM) Concat(lib,libname.so.$$MAJ); \ @@\ - $(RM) Concat(lib,libname.so.$$MAJ.$$MIN) @@\ - $(RM) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.$$MAJ); \ @@\ + $(RM) Concat($(LIBPREFIX),libname.so.$$MAJ.$$MIN) @@\ + $(RM) Concat($(LIBPREFIX),libname.so) # endif /* SharedLibtoolLibraryTarget */ @@ -217,26 +270,28 @@ */ # ifndef SharedDepLibraryTarget # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); (set -x; \ @@\ + cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @SetSonameRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.so.$$S) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedDepLibraryTarget */ @@ -245,26 +300,28 @@ */ #ifndef SharedDepCplusplusLibraryTarget #define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\ - (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ - $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ + @SetSonameRev(rev); \ @@\ + SONAME=Concat($(LIBPREFIX),libname.so.$$S); (set -x; \ @@\ + cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ + if [ $$SONAME != $@ ]; then (set -x; \ @@\ + $(RM) $$SONAME; $(LN) $@ $$SONAME); fi; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\ - set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @SetSonameRev(rev); \ @@\ + set -x; $(RM) Concat($(LIBPREFIX),libname.so.$$S) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedDepCplusplusLibraryTarget */ @@ -293,6 +350,7 @@ $(CC) -o $@~ -Wl,--version-script=$@.map $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ $(RM) $@ $@.map @@\ $(MV) $@~ $@ @@\ + LinkBuildModule($@,dri) @@\ @@\ clean:: @@\ $(RM) name @@\ @@ -660,7 +718,7 @@ */ # ifndef InstallSharedLibrary # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: $(JUMP_SA) $(JUMP_SO) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ @if [ "$(JUMP_IS_HOST)" = YES ]; then \ (T=$(DESTDIR)dest/`echo $(JUMP_SO)|sed 's/\.[^\.]*$$//'`;\ Index: xc/config/cf/lnxdoc.rules diff -u xc/config/cf/lnxdoc.rules:3.28 xc/config/cf/lnxdoc.rules:3.29 --- xc/config/cf/lnxdoc.rules:3.28 Fri Oct 17 22:14:21 2003 +++ xc/config/cf/lnxdoc.rules Sat Nov 27 22:52:09 2004 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.28 2003/10/18 02:14:21 dawes Exp $ +XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.29 2004/11/28 03:52:09 tsi Exp $ XCOMM XCOMM Rules for formatting Linuxdoc-SGML documentation XCOMM @@ -115,7 +115,7 @@ fi; \ @@\ cp textfile dstdir/dstfile ; \ @@\ echo "" >> dstdir/dstfile; \ @@\ - echo "\$$XFree86"": \$$" >> dstdir/dstfile; \ @@\ + echo "\$$XFree86\$$" >> dstdir/dstfile; \ @@\ fi; \ @@\ fi; \ @@\ fi @@\ Index: xc/config/cf/lnxdoc.tmpl diff -u xc/config/cf/lnxdoc.tmpl:3.12 xc/config/cf/lnxdoc.tmpl:3.13 --- xc/config/cf/lnxdoc.tmpl:3.12 Wed Apr 23 11:43:29 2003 +++ xc/config/cf/lnxdoc.tmpl Mon Mar 7 11:39:16 2005 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/lnxdoc.tmpl,v 3.12 2003/04/23 15:43:29 tsi Exp $ +XCOMM $XFree86: xc/config/cf/lnxdoc.tmpl,v 3.13 2005/03/07 16:39:16 tsi Exp $ XCOMM #ifndef HasSgmlFmt @@ -66,8 +66,8 @@ XCOMM Some extra things to clean -#ifdef ExtraFilesToClean -#undef ExtraFilesToClean +#ifdef DocFilesToClean +#undef DocFilesToClean #endif -#define ExtraFilesToClean *.aux *.dvi *.log *.tex *.toc *.html *.ps *.latin1 +#define DocFilesToClean *.aux *.dvi *.log *.tex *.toc *.html *.ps *.latin1 Index: xc/config/cf/lynx.cf diff -u xc/config/cf/lynx.cf:3.48 xc/config/cf/lynx.cf:3.53 --- xc/config/cf/lynx.cf:3.48 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/lynx.cf Sat Jan 15 19:09:45 2005 @@ -1,9 +1,50 @@ -XCOMM $Xorg: lynx.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ - - - - -XCOMM platform: $XFree86: xc/config/cf/lynx.cf,v 3.48 2004/01/09 00:35:00 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/lynx.cf,v 3.53 2005/01/16 00:09:45 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef OSName @@ -125,7 +166,7 @@ # define CcCmd gcc # endif # if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion == 5) -# define DefaultCCOptions -ansi -pedantic -fcommon GccWarningOptions +# define DefaultCCOptions -ansi -fcommon GccWarningOptions # endif #else # define CplusplusCmd g++ @@ -172,7 +213,14 @@ #if HasGcc2 # ifdef i386Architecture # define OptimizedCDebugFlags DefaultGcc2i386Opt -# else +# endif +# ifdef PpcArchitecture +# define OptimizedCDebugFlags DefaultGcc2PpcOpt +# endif +# ifdef SparcArchitecture +# define OptimizedCDebugFlags DefaultGcc2SparcOpt +# endif +# ifndef OptimizedCDebugFlags # define OptimizedCDebugFlags -O2 # endif #else @@ -200,7 +248,7 @@ #define StandardCppOptions -traditional #define StandardCppDefines StandardDefines #if defined(i386Architecture) || defined(PpcArchitecture) -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines # if OSMajorVersion == 2 && OSMinorVersion < 5 # define XkbServerDefines -DNEED_POPEN_WORKAROUND @@ -295,7 +343,7 @@ @@\ CppManTarget(file, $(EXTRAMANDEFS)) @@\ @@\ -install.man:: file.$(MANNEWSUFFIX) @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\ groff -e -t -man -Tascii file.$(MANNEWSUFFIX) >/tmp/file.man @@\ @@ -330,7 +378,7 @@ @@\ CppManTarget(file, $(EXTRAMANDEFS)) @@\ @@\ -install.man:: file.$(MANNEWSUFFIX) @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.suffix* @@\ groff -e -t -man -Tascii file.$(MANNEWSUFFIX) >/tmp/file.man @@\ @@ -345,7 +393,7 @@ #ifndef InstallMultipleMan #define InstallMultipleMan(list,dest) @@\ -install.man:: list @@\ +install.man:: @@\ MakeDir($(DESTDIR)dest) @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for i in list; do \ @@\ Index: xc/config/cf/mach.cf diff -u xc/config/cf/mach.cf:3.13 xc/config/cf/mach.cf:3.14 --- xc/config/cf/mach.cf:3.13 Thu Apr 19 15:54:43 2001 +++ xc/config/cf/mach.cf Wed Jun 2 18:42:53 2004 @@ -1,9 +1,53 @@ -XCOMM $Xorg: mach.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ +XCOMM platform: $XFree86: xc/config/cf/mach.cf,v 3.14 2004/06/02 22:42:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/mach.cf,v 3.13 2001/04/19 19:54:43 dawes Exp $ - #define OSName Mach 2.5/3.0 #define OSVendor /**/ XCOMM operating system: OSName @@ -33,7 +77,7 @@ #define StandardCppOptions -traditional #define StandardCppDefines /**/ #define StandardDefines -DNOSTDHDRS -DMACH386 -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerOSDefines XFree86ServerOSDefines #define AvoidNullMakeCommand YES #define CompressAllFonts YES Index: xc/config/cf/minix.cf diff -u xc/config/cf/minix.cf:3.6 xc/config/cf/minix.cf:3.7 --- xc/config/cf/minix.cf:3.6 Wed Jan 17 11:22:32 2001 +++ xc/config/cf/minix.cf Fri Apr 23 16:48:06 2004 @@ -2,7 +2,7 @@ -XCOMM platform: $XFree86: xc/config/cf/minix.cf,v 3.6 2001/01/17 16:22:32 dawes Exp $ +XCOMM $XFree86: xc/config/cf/minix.cf,v 3.7 2004/04/23 20:48:06 tsi Exp $ /* @@ -54,8 +54,8 @@ #define HasPutenv YES /* for xsm */ #ifndef AssembleObject -#define AssembleObject(flags) $(RM) $@ @@\ - $(CPP) AsmDefines $(DEFINES) $(INCLUDES) flags $*.S | \ @@\ +#define AssembleObject(flags) $(RM) $@ $*.i.s @@\ + $(CPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) flags $*.S | \ @@\ grep -v '^\#' > $*.i.s @@\ $(AS) -o $*.o $*.i.s @@\ $(RM) $*.i.s Index: xc/config/cf/ncr.cf diff -u xc/config/cf/ncr.cf:3.21 xc/config/cf/ncr.cf:3.22 --- xc/config/cf/ncr.cf:3.21 Tue Jan 23 18:31:49 2001 +++ xc/config/cf/ncr.cf Wed Jun 2 18:42:53 2004 @@ -1,9 +1,52 @@ -XCOMM platform: $Xorg: ncr.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ - - +XCOMM platform: $XFree86: xc/config/cf/ncr.cf,v 3.22 2004/06/02 22:42:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/ncr.cf,v 3.21 2001/01/23 23:31:49 dawes Exp $ #ifndef OSName #define OSName Unix System V Release 4/MP-RAS @@ -30,7 +73,7 @@ #define DefaultCDebugFlags -O3 #define AllocateLocalDefines -DINCLUDE_ALLOCA_H #define ServerExtraDefines -DNO_SECONDARY AllocateLocalDefines XFree86ServerDefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #define ToolkitStringsABIOptions -intelabi XCOMM This has not been tested, don't turn it on yet. Index: xc/config/cf/necLib.rules diff -u xc/config/cf/necLib.rules:1.3 xc/config/cf/necLib.rules:1.5 --- xc/config/cf/necLib.rules:1.3 Wed Jan 17 11:22:32 2001 +++ xc/config/cf/necLib.rules Wed Mar 24 22:36:21 2004 @@ -4,7 +4,7 @@ * NECOS shared library rules */ -XCOMM $XFree86: xc/config/cf/necLib.rules,v 1.3 2001/01/17 16:22:32 dawes Exp $ +XCOMM $XFree86: xc/config/cf/necLib.rules,v 1.5 2004/03/25 03:36:21 dawes Exp $ #ifndef HasSharedLibraries #define HasSharedLibraries YES @@ -40,10 +40,13 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - cd $(DESTDIR)/dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + cd $(DESTDIR)/dest; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi #endif /* InstallSharedLibrary */ @@ -52,7 +55,7 @@ */ #ifndef InstallSharedLibraryData #define InstallSharedLibraryData(libname,rev,dest) @@\ -install:: Concat(lib,libname.sa.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev)) @@ -73,17 +76,14 @@ $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - @@\ -AllTarget(Concat(lib,libname.so)) @@\ - @@\ -Concat(lib,libname.so): Concat(lib,libname.so.rev) @@\ - $(RM) $@ @@\ - $(LN) $? $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) #endif /* SharedLibraryTarget */ @@ -99,17 +99,14 @@ $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - @@\ -AllTarget(Concat(lib,libname.so)) @@\ - @@\ -Concat(lib,libname.so): Concat(lib,libname.so.rev) @@\ - $(RM) $@ @@\ - $(LN) $? $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) #endif /* SharedDepLibraryTarget */ Index: xc/config/cf/nto.cf diff -u xc/config/cf/nto.cf:1.4 xc/config/cf/nto.cf:1.5 --- xc/config/cf/nto.cf:1.4 Fri Nov 16 11:47:50 2001 +++ xc/config/cf/nto.cf Wed Jun 2 18:42:53 2004 @@ -1,7 +1,54 @@ -/* $XFree86: xc/config/cf/nto.cf,v 1.4 2001/11/16 16:47:50 dawes Exp $ */ +/* $XFree86: xc/config/cf/nto.cf,v 1.5 2004/06/02 22:42:53 dawes Exp $ */ /* Get X to build using the gcc toolchain, self hosted RTP x86 */ /* Let us try to separate the x86 stuff out of here as well... */ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + /* don't want to conflict with QSSL's Xphoton in /usr/X11R6 */ #define ProjectRoot /opt/X11R6 @@ -139,7 +186,7 @@ #define StandardDefines OSDefines SourceDefines NTODefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #define ServerExtraDefines XFree86ServerDefines #define ExtraFilesToClean *.err *.map Index: xc/config/cf/nto.rules diff -u xc/config/cf/nto.rules:1.8 xc/config/cf/nto.rules:1.10 --- xc/config/cf/nto.rules:1.8 Sat Oct 11 05:40:15 2003 +++ xc/config/cf/nto.rules Wed Mar 24 22:36:21 2004 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/nto.rules,v 1.8 2003/10/11 09:40:15 herrb Exp $ +XCOMM $XFree86: xc/config/cf/nto.rules,v 1.10 2004/03/25 03:36:21 dawes Exp $ XCOMM Rules for QNX/Neutrino XCOMM Note that some of these will disappear when we stop cross-compiling @@ -137,12 +137,12 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\ set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\ - @if $(SOSYMLINK); then (set -x; \ + @if $(SOSYMLINK); then (set -x; \ @@\ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi #endif /* InstallSharedLibrary */ Index: xc/config/cf/os2.cf diff -u xc/config/cf/os2.cf:3.41 xc/config/cf/os2.cf:3.46 --- xc/config/cf/os2.cf:3.41 Thu Nov 13 21:17:19 2003 +++ xc/config/cf/os2.cf Mon Mar 7 11:39:16 2005 @@ -1,8 +1,52 @@ -XCOMM $Xorg: os2.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - +XCOMM platform: $XFree86: xc/config/cf/os2.cf,v 3.46 2005/03/07 16:39:16 tsi Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/os2.cf,v 3.41 2003/11/14 02:17:19 dawes Exp $ XCOMM hv: This file will now require a compiler that defines XCOMM hv: the symbol __UNIXOS2__ (currently a modified EMX gcc, @@ -44,6 +88,7 @@ #ifndef BuildLBX #define BuildLBX YES #endif +#define BuildIPv6 NO #ifndef DoLoadableServer #define DoLoadableServer YES #endif @@ -52,7 +97,9 @@ #ifndef BuildModuleInSubdir #define BuildModuleInSubdir YES #endif - +#ifndef XF86FBDevHw +#define XF86FBDevHw NO +#endif /* some more properties of the OS/2 implementation */ #define HasNdbm YES @@ -114,7 +161,7 @@ #define HasPlugin NO #define VendorHasX11R6_3libExt YES -#define CppCmd cpp +#define CppCmd cpp -D__UNIXOS2__ #define YaccCmd bison -y #define StandardCppOptions -traditional #define StandardCppDefines /**/ @@ -148,7 +195,7 @@ #define LdCmd ld #define ExtraLoadFlags -Zbin-files #define ExtraLibraries -lshm -lemxfix -lsocket -lbsd -lgcc -#define ServerExtraSysLibs -lregex -lshm -lemxfix -lsocket +#define ServerExtraSysLibs -lregex -lshm -lemxfix -lsocket -lbsd /* quite a number of programs you need, most of them the same as * with Unix, but listed here for completeness @@ -180,7 +227,7 @@ #define InstallFlags /**/ #define OptimizedCDebugFlags DefaultGcc2i386Opt -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF +#define ServerOSDefines XFree86ServerOSDefines -DXNO_SYSCONF #define ServerExtraDefines GccGasOption XFree86ServerDefines /* @@ -208,6 +255,8 @@ #include #include +#define LocalConfigFiles os2def.db + # include Index: xc/config/cf/os2Lib.rules diff -u xc/config/cf/os2Lib.rules:3.20 xc/config/cf/os2Lib.rules:3.23 --- xc/config/cf/os2Lib.rules:3.20 Tue Nov 11 19:10:23 2003 +++ xc/config/cf/os2Lib.rules Mon May 31 20:16:53 2004 @@ -1,8 +1,4 @@ -XCOMM $Xorg: os2Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - - - -XCOMM $XFree86: xc/config/cf/os2Lib.rules,v 3.20 2003/11/12 00:10:23 dawes Exp $ +XCOMM $XFree86: xc/config/cf/os2Lib.rules,v 3.23 2004/06/01 00:16:53 dawes Exp $ /* * OS2/EMX shared library rules (DLL version) @@ -25,7 +21,7 @@ $(CC) -c $(CFLAGS) options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.c #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: libname.dll LibraryTargetName(libname) libname.lib @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) $(DLLNAME) $(DESTDIR)dest @@\ $(INSTALL) -c $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\ @@ -95,7 +91,15 @@ #define NormalLibraryTarget(libname,objlist) @@\ AllTarget(LibraryTargetName(libname)) @@\ @@\ -LibraryTargetName(libname): objlist @@\ +LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\ + RemoveFile($@) @@\ + MakeLibrary($@,objlist) @@\ + BuildLibSupportLibs2(libname) + +#define NormalDepLibraryTarget(libname,deplist,objlist) @@\ +AllTarget(LibraryTargetName(libname)) @@\ + @@\ +LibraryTargetName(libname): deplist $(EXTRALIBRARYDEPS) @@\ RemoveFile($@) @@\ MakeLibrary($@,objlist) @@\ BuildLibSupportLibs2(libname) @@ -152,7 +156,7 @@ #define InstallSharedLibraryData(libname,rev,dest) #define InstallLibrary(libname,dest) @@\ -install:: LibraryTargetName(libname) Concat(libname,.lib) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(libname,.lib) $(DESTDIR)dest @@\ @@ -169,7 +173,7 @@ RanLibrary($@) @@\ _LinkBuildLibrary($@) @@\ @@\ -install:: LibraryTargetNameSuffix(libname,_s) @@\ +install:: @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR) #define UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\ @@ -181,7 +185,7 @@ RanLibrary($@) @@\ _LinkBuildLibrary($@) @@\ @@\ -install:: LibraryTargetNameSuffix(libname,_s) @@\ +install:: @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR) #define DebuggedLibraryTarget(libname,objlist) @@\ @@ -201,10 +205,3 @@ (cd profiled; MakeStaticLibrary(../$@)) @@\ RanLibrary($@) @@\ _LinkBuildLibrary($@) - -#define LibraryModuleTarget(module,objlist) @@\ -AllTarget(LibraryTargetName(module)) @@\ - @@\ -LibraryTargetName(module): objlist @@\ - RemoveFile($@) @@\ - MakeLibrary($@,objlist) Index: xc/config/cf/os2Lib.tmpl diff -u xc/config/cf/os2Lib.tmpl:3.19 xc/config/cf/os2Lib.tmpl:3.20 --- xc/config/cf/os2Lib.tmpl:3.19 Fri Nov 28 20:51:31 2003 +++ xc/config/cf/os2Lib.tmpl Sun Feb 6 20:38:23 2005 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/config/cf/os2Lib.tmpl,v 3.19 2003/11/29 01:51:31 dawes Exp $ +XCOMM $XFree86: xc/config/cf/os2Lib.tmpl,v 3.20 2005/02/07 01:38:23 tsi Exp $ /* * OS2/EMX shared library template @@ -46,6 +46,7 @@ #define SharedXResReqs $(LDPRELIB) $(XLIB) #define SharedXfontcacheReqs $(LDPRELIB) $(XLIB) #define SharedFontencReqs $(LDPRELIB) GzipLibrary +#define SharedDmxReqs $(LDPRELIB) $(XLIB) /* library revisions, these are typically empty! */ #define SharedX11Rev /**/ @@ -92,9 +93,11 @@ #define SharedFontconfigRev /**/ #define SharedXcursorRev /**/ #define SharedxkbfileRev /**/ +#define SharedxkbuiRev /**/ #define SharedXvMCRev /**/ #define SharedXResRev /**/ #define SharedFontEncRev /**/ +#define SharedDmxRev /**/ /* * By setting this in your Imakefile, you can force using static libraries Index: xc/config/cf/os2def.db diff -u xc/config/cf/os2def.db:1.8 xc/config/cf/os2def.db:1.10 --- xc/config/cf/os2def.db:1.8 Fri Feb 20 16:41:40 2004 +++ xc/config/cf/os2def.db Sun Feb 6 20:38:23 2005 @@ -9,7 +9,7 @@ ; be TAB, not a nice looking number of spaces! Don't try to beautify this ; file!!!! ; -; $XFree86: xc/config/cf/os2def.db,v 1.8 2004/02/20 21:41:40 dawes Exp $ +; $XFree86: xc/config/cf/os2def.db,v 1.10 2005/02/07 01:38:23 tsi Exp $ ; LIBRARY PEX5 PEX5 PEX5 PEXAccumulateState 1 @@ -2421,6 +2421,7 @@ Xpm XpmCreateBufferFromXpmImage 33 ; 4.x exports starting from 40 Xpm XpmFree 40 +Xpm s_popen 41 LIBRARY Xss Xss Xss XScreenSaverQueryExtension 1 Xss XScreenSaverQueryVersion 2 @@ -4773,6 +4774,7 @@ Xft XftDrawSrcPicture 40 Xft XftCharExists 41 Xft XftDrawCharSpec 42 +Xft XftCharIndex 43 LIBRARY Xmuu Xmuu Xmuu XmuClientWindow 1 Xmuu XmuCursorNameToIndex 2 @@ -5121,6 +5123,7 @@ freetype FT_Get_X11_Font_Format 159 freetype FT_Get_BDF_Charset_ID 160 freetype FT_Get_Postscript_Name 161 +freetype FT_Stream_Seek 162 LIBRARY XTrap XTrap XTrap XEAddEventCB 1 XTrap XEAddEventCBs 2 @@ -5715,3 +5718,22 @@ Xfontcache FontCacheGetCacheStatistics 3 Xfontcache FontCacheQueryExtension 4 Xfontcache FontCacheQueryVersion 5 +LIBRARY dmx dmx +dmx DMXQueryExtension 1 +dmx DMXQueryVersion 2 +dmx DMXSync 3 +dmx DMXForceWindowCreation 4 +dmx DMXGetScreenCount 5 +dmx DMXGetScreenAttributes 6 +dmx DMXChangeScreensAttributes 7 +dmx DMXAddScreen 8 +dmx DMXRemoveScreen 9 +dmx DMXGetWindowAttributes 10 +dmx DMXGetDesktopAttributes 11 +dmx DMXChangeDesktopAttributes 12 +dmx DMXGetInputCount 13 +dmx DMXGetInputAttributes 14 +dmx DMXAddInput 15 +dmx DMXAddBackendInput 16 +dmx DMXAddConsoleInput 17 +dmx DMXRemoveInput 18 Index: xc/config/cf/osfLib.rules diff -u xc/config/cf/osfLib.rules:1.3 xc/config/cf/osfLib.rules:1.6 --- xc/config/cf/osfLib.rules:1.3 Wed Jan 17 11:22:32 2001 +++ xc/config/cf/osfLib.rules Mon May 31 20:16:53 2004 @@ -1,10 +1,8 @@ -XCOMM $Xorg: osfLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - /* * OSF/1 shared library rules */ -XCOMM $XFree86: xc/config/cf/osfLib.rules,v 1.3 2001/01/17 16:22:32 dawes Exp $ +XCOMM $XFree86: xc/config/cf/osfLib.rules,v 1.6 2004/06/01 00:16:53 dawes Exp $ #ifndef HasSharedLibraries #define HasSharedLibraries YES @@ -37,11 +35,12 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ - cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi #endif /* InstallSharedLibrary */ @@ -84,10 +83,11 @@ $(REQUIREDLIBS) BaseShLibReqs) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@ -102,10 +102,11 @@ $(REQUIREDLIBS) BaseShLibReqs @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@ -127,10 +128,11 @@ $(REQUIREDLIBS) BaseShLibReqs) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@ -145,10 +147,11 @@ $(REQUIREDLIBS) BaseShLibReqs @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) Index: xc/config/cf/sco.cf diff -u xc/config/cf/sco.cf:3.14 xc/config/cf/sco.cf:3.15 --- xc/config/cf/sco.cf:3.14 Wed Jan 17 11:22:33 2001 +++ xc/config/cf/sco.cf Wed Jun 2 18:42:53 2004 @@ -1,5 +1,51 @@ -XCOMM platform: $Xorg: sco.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ -XCOMM platform: $XFree86: xc/config/cf/sco.cf,v 3.14 2001/01/17 16:22:33 dawes Exp $ +XCOMM platform: $XFree86: xc/config/cf/sco.cf,v 3.15 2004/06/02 22:42:53 dawes Exp $ + +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * This is sco.cf, for SCO Open Server 5.0.2 and SCO UNIX. @@ -104,7 +150,7 @@ #define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS #define NeedWidePrototypes NO -#define ServerOSDefines -DDDXTIME +#define ServerOSDefines /**/ #define ToolkitStringsABIOptions -intelabi #define ThreadedX NO #define HasThreadSafeAPI NO Index: xc/config/cf/sco5.cf diff -u xc/config/cf/sco5.cf:3.16 xc/config/cf/sco5.cf:3.18 --- xc/config/cf/sco5.cf:3.16 Tue Jan 6 23:30:27 2004 +++ xc/config/cf/sco5.cf Wed Jun 2 18:42:53 2004 @@ -1,4 +1,51 @@ -XCOMM $XFree86: xc/config/cf/sco5.cf,v 3.16 2004/01/07 04:30:27 dawes Exp $ +XCOMM $XFree86: xc/config/cf/sco5.cf,v 3.18 2004/06/02 22:42:53 dawes Exp $ + +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * This is for SCO Open Server 5.0.6A or later. You must have the @@ -65,7 +112,7 @@ # define LibraryCCOptions -D_REENTRANT #endif -#define StandardDefines -Dsco -DSCO -DSCO5 -DSYSV -Di386 -DSCO325 -DFD_SETSIZE=256 -D_NO_STATIC -DMAXPATHLEN=1024 +#define StandardDefines -DSYSV -Di386 -DSCO325 -D__SCO__ -DFD_SETSIZE=256 -D_NO_STATIC -DMAXPATHLEN=1024 #ifdef HasGcc2 # define DefaultCCOptions GccWarningOptions # define CcCmd gcc @@ -110,7 +157,7 @@ #define ServerExtraSysLibs $(CBRT) -lm -levent SCODynamicFlags #define ExtraLibraries -lsocket #define NeedWidePrototypes NO -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #define ToolkitStringsABIOptions -intelabi #define ThreadedX NO #define HasThreadSafeAPI NO Index: xc/config/cf/scoLib.rules diff -u xc/config/cf/scoLib.rules:1.11 xc/config/cf/scoLib.rules:1.13 --- xc/config/cf/scoLib.rules:1.11 Tue Jan 6 23:30:28 2004 +++ xc/config/cf/scoLib.rules Mon May 31 20:16:53 2004 @@ -1,5 +1,4 @@ -XCOMM $Xorg: scoLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ -XCOMM $XFree86: xc/config/cf/scoLib.rules,v 1.11 2004/01/07 04:30:28 dawes Exp $ +XCOMM $XFree86: xc/config/cf/scoLib.rules,v 1.13 2004/06/01 00:16:53 dawes Exp $ #ifndef UseExportLists # define UseExportLists NO @@ -28,9 +27,9 @@ */ #ifndef SharedLibraryTarget3 #define SharedLibraryTarget3(libname,rev,solist1,solist2,solist3,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist1 solist2 solist3 $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist1 solist2 solist3 $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ echo -n $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist1 " " > Concat(down/lib,cmd) @@\ echo -n solist2 " " >> Concat(down/lib,cmd) @@\ @@ -40,13 +39,13 @@ $(RM) $@ Concat(lib,tmp1) Concat(lib,tmp2) @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedLibraryTarget */ Index: xc/config/cf/sequent.cf diff -u xc/config/cf/sequent.cf:1.1.1.4 xc/config/cf/sequent.cf:1.2 --- xc/config/cf/sequent.cf:1.1.1.4 Tue Jan 16 16:54:21 2001 +++ xc/config/cf/sequent.cf Mon Sep 20 11:24:57 2004 @@ -327,7 +327,6 @@ #define DebugLibXmu DebugLibDefault /* debugged Xmu library */ #define DebugLibXp DebugLibDefault /* debugged Xp library */ #define DebugLibXt DebugLibDefault /* debugged toolkit library */ -#define DebugLibXa DebugLibDefault /* debugged audio library */ #define DebugLibXaw DebugLibDefault /* debugged widget library */ #define DebugLibXi DebugLibDefault /* debugged Xi library */ #define DebugLibXtst DebugLibDefault /* debugged Xtst library */ Index: xc/config/cf/sequentLib.rules diff -u xc/config/cf/sequentLib.rules:1.1.1.1 xc/config/cf/sequentLib.rules:1.4 --- xc/config/cf/sequentLib.rules:1.1.1.1 Tue Jan 16 16:54:21 2001 +++ xc/config/cf/sequentLib.rules Mon May 31 20:16:53 2004 @@ -1,4 +1,4 @@ -XCOMM $Xorg: sequentLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ +XCOMM $XFree86: xc/config/cf/sequentLib.rules,v 1.4 2004/06/01 00:16:53 dawes Exp $ /* * SVR4 shared library rules @@ -89,7 +89,7 @@ */ #ifndef InstallLibrary #define InstallLibrary(libname,dest) @@\ -install:: LibraryTargetName(libname) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname)) @@\ @@ -128,7 +128,7 @@ */ #ifndef InstallSharedLibrary # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTSHLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ @@ -287,7 +287,7 @@ $(CP) /tmp/file.man.z file.$(MANSUFFIX).z; \ @@\ $(RM) /tmp/file.man.z @@\ @@\ -install.man:: file.$(MANSUFFIX).z @@\ +install.man:: @@\ MakeDir($(DESTDIR)$(MANDIR)) @@\ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANSUFFIX).z $(DESTDIR)$(MANDIR)/file.$(MANSUFFIX).z @@ -308,7 +308,7 @@ @@\ all:: prefix.cat @@\ @@\ -install:: prefix.cat @@\ +install:: @@\ MakeDir($(DESTDIR)$(MESSAGECATDIR)) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) prefix.cat $(DESTDIR)$(MESSAGECATDIR)/prefix.cat @@\ $(RM) $(DESTDIR)$(MESSAGECATDIR)/prefix @@\ Index: xc/config/cf/sgi.cf diff -u xc/config/cf/sgi.cf:1.13 xc/config/cf/sgi.cf:1.21 --- xc/config/cf/sgi.cf:1.13 Tue Oct 21 13:41:44 2003 +++ xc/config/cf/sgi.cf Sun Jan 30 12:48:43 2005 @@ -1,5 +1,5 @@ XCOMM platform: $Xorg: sgi.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $ -XCOMM $XFree86: xc/config/cf/sgi.cf,v 1.13 2003/10/21 17:41:44 tsi Exp $ +XCOMM $XFree86: xc/config/cf/sgi.cf,v 1.21 2005/01/30 17:48:43 tsi Exp $ #ifndef OSName # define OSName DefaultOSName @@ -46,6 +46,9 @@ #ifndef ExtraLoadFlags #define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) #endif +#ifndef ExtraSharedLibraryLoadFlags +#define ExtraSharedLibraryLoadFlags /* */ +#endif #endif /* @@ -66,16 +69,16 @@ # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY64_PATH # define SystemBuildLibPath /usr/lib64:/lib64 # define LdCmd ld -64 -# define AsCmd as -64 +# define AsCmd as -64 -mips3 #elif defined(MipsN32Architecture) # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARYN32_PATH # define SystemBuildLibPath /usr/lib32:/lib32 # define LdCmd ld -n32 -# define AsCmd as -n32 +# define AsCmd as -n32 -mips3 #else # define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY_PATH # define SystemBuildLibPath /usr/lib:/lib -# define LdCmd ld -32 +# define LdCmd ld -32 -allow_jump_at_eop # define AsCmd as -32 #endif #define HasCplusplus YES @@ -85,6 +88,7 @@ #define HasNdbm YES #define HasPoll YES #define ExpandManNames YES +#define LexCmd flex -l #define LexLib /* Not needed */ #ifndef BuildXInputExt #define BuildXInputExt YES @@ -159,17 +163,15 @@ #define BuildIPv6 NO #endif -#undef BuildXF86DRM #undef BuildXF86DRI -#define BuildXF86DRM NO #define BuildXF86DRI NO #if !HasGcc #if !defined(OptimizedCDebugFlags) #if defined(MipsN32Architecture) || defined(Mips64Architecture) -#define OptimizedCDebugFlags -O -OPT:Olimit=0 +#define OptimizedCDebugFlags -O -OPT:Olimit=4096 #else -#define OptimizedCDebugFlags -O -Olimit 2048 +#define OptimizedCDebugFlags -O -Olimit 4096 #endif #endif #if !defined(RawCppCmd) @@ -216,8 +218,9 @@ #define DefaultUserPath :/usr/sbin:/usr/bsd:/usr/bin:/bin:$(BINDIR):/etc:/usr/etc #define DefaultSystemPath /usr/sbin:/usr/bsd:/bin:/etc:/usr/bin:/usr/etc:$(BINDIR) -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines +#ifndef ServerExtraDefines #ifndef Mips64Architecture #define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \ XFree86ServerDefines @@ -225,6 +228,7 @@ #define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \ XFree86ServerDefines -D_XSERVER64 #endif +#endif /* Changed to a single shell command for pmake/smake */ #if OSMajorVersion < 5 Index: xc/config/cf/sgiLib.rules diff -u xc/config/cf/sgiLib.rules:1.4 xc/config/cf/sgiLib.rules:1.7 --- xc/config/cf/sgiLib.rules:1.4 Wed Jan 17 11:22:33 2001 +++ xc/config/cf/sgiLib.rules Mon May 31 20:16:53 2004 @@ -1,5 +1,4 @@ -XCOMM $Xorg: sgiLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ -XCOMM $XFree86: xc/config/cf/sgiLib.rules,v 1.4 2001/01/17 16:22:33 dawes Exp $ +XCOMM $XFree86: xc/config/cf/sgiLib.rules,v 1.7 2004/06/01 00:16:53 dawes Exp $ #ifndef HasSharedLibraries #define HasSharedLibraries YES @@ -55,7 +54,7 @@ * NOTE: file must be executable, hence "INSTBINFLAGS" */ #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat3(lib,libname,_s) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat3(lib,libname,_s) $(DESTDIR)dest @@ -111,11 +110,13 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ - cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + cd $(DESTDIR)dest; \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi @@\ if [ "libname" = X11 ]; then \ @@\ RemoveFile(Concat($(DESTDIR)dest/lib,libname.so.1)); \ @@\ cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so.1);\ @@\ @@ -159,14 +160,15 @@ AllTarget(Concat(lib,libname.so.rev)) @@\ @@\ Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ - $(RM) $@~ @@\ + $(RM) $@~ @@\ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $@ solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ sgiX11soHack(libname) @@\ @@\ clean:: @@\ @@ -182,22 +184,23 @@ #endif /* SharedLibraryTarget */ #ifndef SharedDepLibraryTarget -#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ - @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ - $(RM) $@~ @@\ - (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $@ solist $(REQUIREDLIBS)) @@\ - $(RM) $@ @@\ - $(MV) $@~ $@ @@\ - $(RM) Concat(lib,libname.so) @@\ - $(LN) $@ Concat(lib,libname.so) @@\ - LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ - sgiX11soHack(libname) @@\ - @@\ -clean:: @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) so_locations +#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ +Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $@ solist $(REQUIREDLIBS)) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(lib,libname.so); \ @@\ + $(LN) $@ Concat(lib,libname.so)); fi @@\ + LinkBuildLibrary($@) @@\ + LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + sgiX11soHack(libname) @@\ + @@\ +clean:: @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) so_locations #endif /* SharedDepLibraryTarget */ Index: xc/config/cf/site.def diff -u xc/config/cf/site.def:3.25 xc/config/cf/site.def:3.26 --- xc/config/cf/site.def:3.25 Tue Feb 26 19:51:12 2002 +++ xc/config/cf/site.def Wed Jun 9 14:30:56 2004 @@ -21,7 +21,7 @@ * .cf file, not overridden in site.def. * * * ***************************************************************************/ -XCOMM site: $XFree86: xc/config/cf/site.def,v 3.25 2002/02/27 00:51:12 dawes Exp $ +XCOMM site: $XFree86: xc/config/cf/site.def,v 3.26 2004/06/09 18:30:56 dawes Exp $ /* if you want host-specific customization, this is one way to do it */ /* @@ -90,10 +90,6 @@ #define EtcX11Directory ProjectRoot/etc */ - -/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */ -/* #define HasXdmAuth YES */ - /* #if defined(SunArchitecture) && defined(SparcArchitecture) #define HasCodeCenter YES Index: xc/config/cf/site.sample diff -u xc/config/cf/site.sample:1.3 xc/config/cf/site.sample:1.4 --- xc/config/cf/site.sample:1.3 Wed Jan 17 11:35:04 2001 +++ xc/config/cf/site.sample Wed Jun 9 14:30:56 2004 @@ -62,9 +62,6 @@ #define ProjectRoot /usr/X11R6.4 -/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */ -/* #define HasXdmAuth YES */ - /* #if defined(SunArchitecture) && defined(SparcArchitecture) #define HasCodeCenter YES Index: xc/config/cf/sun.cf diff -u xc/config/cf/sun.cf:3.71 xc/config/cf/sun.cf:3.79 --- xc/config/cf/sun.cf:3.71 Sun Feb 1 22:55:26 2004 +++ xc/config/cf/sun.cf Sun Feb 6 18:48:14 2005 @@ -1,9 +1,51 @@ -XCOMM platform: $Xorg: sun.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $ +XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.79 2005/02/06 23:48:14 dawes Exp $ - - - -XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.71 2004/02/02 03:55:26 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef OSName # define OSName DefaultOSName @@ -182,7 +224,12 @@ # define ServerExtraDefines AllocateLocalDefines # endif #else -# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines +# ifdef BuildXFree86OnSparcSunOS +# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines +# else +# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \ + -UXFree86Server +# endif # define HasPlugin YES #endif #define ServerOSDefines XFree86ServerOSDefines IncludeCG2HeaderDefine @@ -241,14 +288,16 @@ # endif # ifdef i386Architecture # if (OSMajorVersion < 4) || ((OSMajorVersion == 5) && (OSMinorVersion <= 5)) -# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \ - -D__SOL64__ +# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ -D__SOL64__ \ + -Di386 -D__i386 -D__i386__ # else -# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 +# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ \ + -Di386 -D__i386 -D__i386__ # endif # define ToolkitStringsABIOptions -intelabi # else -# define StandardDefines -Dsun -Dsparc -DSVR4 -D__EXTENSIONS__ +# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ \ + -Dsparc -D__sparc__ # define ToolkitStringsABIOptions -sparcabi # endif # define ExtraLibraries -lsocket -lnsl @@ -331,9 +380,7 @@ # define BuildPexExt (XsunServer || Xsun24Server) # endif # undef BuildXF86DRI -# undef BuildXF86DRM # define BuildXF86DRI NO -# define BuildXF86DRM NO # if (OSMajorVersion > 4) # if !defined(AsOutputArchSize) || \ ((AsOutputArchSize != 32) && (AsOutputArchSize != 64)) @@ -370,7 +417,7 @@ # elif OSMinorVersion > 6 # define DefaultCCOptions -DNO_ASM GccWarningOptions # elif OSMinorVersion > 3 -# define DefaultCCOptions -DNO_ASM GccWarningOptions -ansi -pedantic +# define DefaultCCOptions -DNO_ASM GccWarningOptions -ansi # else # define DefaultCCOptions -DNO_ASM # endif @@ -386,9 +433,17 @@ # ifndef OptimizedCDebugFlags # ifdef i386Architecture # define OptimizedCDebugFlags DefaultGcc2i386Opt -# else -# define OptimizedCDebugFlags -O2 # endif +# ifdef SparcArchitecture +# define OptimizedCDebugFlags DefaultGcc2SparcOpt +# endif +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags -O2 GccAliasingArgs +# endif +# endif +# if defined(SparcArchitecture) && \ + (GccMajorVersion == 3) && (GccMinorVersion == 3) +# define WorkaroundSparc64GccBug # endif # else # define SharedLibraryCcCmd cc @@ -444,6 +499,12 @@ # define PexCCOptions DefaultCCOptions +# ifndef AsCmd +# ifdef SparcArchitecture +# define AsCmd as +# endif +# endif + #endif /* HasGcc (else) */ #if OSMajorVersion < 5 @@ -523,13 +584,6 @@ #define BuildHtmlManPages NO #endif -/* - * Turn off seperate configuration directories. - */ -#ifndef UseSeparateConfDir -#define UseSeparateConfDir NO -#endif - #ifndef BuildGLULibrary #if HasSunC #define BuildGLULibrary NO Index: xc/config/cf/sunLib.rules diff -u xc/config/cf/sunLib.rules:1.4 xc/config/cf/sunLib.rules:1.7 --- xc/config/cf/sunLib.rules:1.4 Sun May 27 22:42:25 2001 +++ xc/config/cf/sunLib.rules Mon May 31 20:16:53 2004 @@ -1,10 +1,8 @@ -XCOMM $Xorg: sunLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - /* * SunOS shared library rules */ -XCOMM $XFree86: xc/config/cf/sunLib.rules,v 1.4 2001/05/28 02:42:25 tsi Exp $ +XCOMM $XFree86: xc/config/cf/sunLib.rules,v 1.7 2004/06/01 00:16:53 dawes Exp $ #ifndef HasSharedLibraries #define HasSharedLibraries YES @@ -51,7 +49,7 @@ */ #ifndef InstallSharedLibrary #define InstallSharedLibrary(libname,rev,dest) @@\ -InstallTarget(install,Concat(lib,libname.so.rev),$(INSTLIBFLAGS),dest) +InstallTarget(install,Concat($(LIBPREFIX),libname.so.rev),$(INSTLIBFLAGS),dest) #endif /* InstallSharedLibrary */ /* @@ -59,7 +57,7 @@ */ #ifndef InstallSharedLibraryData #define InstallSharedLibraryData(libname,rev,dest) @@\ -install:: Concat(lib,libname.sa.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev)) @@ -68,7 +66,7 @@ #if HasPurify #define PureCleanSharedLibrary(libname,rev) @@\ clean clean.pure:: @@\ - $(RM) Concat3(lib,libname,_pure_*.so.rev) + $(RM) Concat3($(LIBPREFIX),libname,_pure_*.so.rev) #else #define PureCleanSharedLibrary(libname,rev) /**/ #endif @@ -80,9 +78,9 @@ */ #ifndef SharedLibraryTarget #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ @@ -90,7 +88,7 @@ LinkBuildLibrary($@) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) @@\ @@\ PureCleanSharedLibrary(libname,rev) #endif /* SharedLibraryTarget */ @@ -100,9 +98,9 @@ */ #ifndef SharedDepLibraryTarget #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ @@ -110,7 +108,7 @@ LinkBuildLibrary($@) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) @@\ + $(RM) Concat($(LIBPREFIX),libname.so.rev) @@\ @@\ PureCleanSharedLibrary(libname,rev) #endif /* SharedDepLibraryTarget */ Index: xc/config/cf/sv3Lib.rules diff -u xc/config/cf/sv3Lib.rules:3.6 xc/config/cf/sv3Lib.rules:3.8 --- xc/config/cf/sv3Lib.rules:3.6 Mon Apr 14 16:35:50 2003 +++ xc/config/cf/sv3Lib.rules Mon May 31 20:16:53 2004 @@ -1,14 +1,56 @@ -XCOMM $Xorg: sv3Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - - - -XCOMM $XFree86: xc/config/cf/sv3Lib.rules,v 3.6 2003/04/14 20:35:50 herrb Exp $ +XCOMM $XFree86: xc/config/cf/sv3Lib.rules,v 3.8 2004/06/01 00:16:53 dawes Exp $ /* * SVR3 shared library rules * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de * Conception derived partially from work of Thomas Roell */ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef HasSharedLibraries #define HasSharedLibraries NO /* JUST FOR NOW */ @@ -164,7 +206,7 @@ #ifndef InstallSharedLibrary #if StripInstalledPrograms #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\ MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\ @@ -174,7 +216,7 @@ mcs -d Concat($(DESTDIR)$(LIBDIR)/shlib/lib,libname.rev) #else #define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\ MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\ Index: xc/config/cf/sv3Lib.tmpl diff -u xc/config/cf/sv3Lib.tmpl:3.3 xc/config/cf/sv3Lib.tmpl:3.4 --- xc/config/cf/sv3Lib.tmpl:3.3 Mon Apr 14 16:35:50 2003 +++ xc/config/cf/sv3Lib.tmpl Sun Mar 14 17:35:11 2004 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/config/cf/sv3Lib.tmpl,v 3.3 2003/04/14 20:35:50 herrb Exp $ +XCOMM $XFree86: xc/config/cf/sv3Lib.tmpl,v 3.4 2004/03/14 22:35:11 tsi Exp $ /* * SVR3 shared library template * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany @@ -32,7 +32,6 @@ #define SharedXinputRev 6.0 #endif - SHLIBLDFLAGS = SharedLibraryLoadFlags PICFLAGS = PositionIndependentCFlags /* Index: xc/config/cf/sv4Lib.rules diff -u xc/config/cf/sv4Lib.rules:3.9 xc/config/cf/sv4Lib.rules:3.15 --- xc/config/cf/sv4Lib.rules:3.9 Fri Nov 22 17:55:56 2002 +++ xc/config/cf/sv4Lib.rules Sun Feb 6 18:48:15 2005 @@ -1,10 +1,54 @@ -XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - /* * SVR4 shared library rules */ -XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.9 2002/11/22 22:55:56 tsi Exp $ +XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.15 2005/02/06 23:48:15 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef HasSharedLibraries # define HasSharedLibraries YES @@ -54,23 +98,23 @@ #ifndef InstallSharedLibrary #if StripInstalledPrograms # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ - mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest @@\ + mcs -d Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so.rev) @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ cd $(DESTDIR)dest; \ @@\ - $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi + $(LN) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so)); fi #else # define InstallSharedLibrary(libname,rev,dest) @@\ -install:: Concat(lib,libname.so.rev) @@\ +install:: @@\ MakeDir($(DESTDIR)dest) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat($(LIBPREFIX),libname.so.rev) $(DESTDIR)dest @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + $(RM) Concat($(DESTDIR)dest/$(LIBPREFIX),libname.so); \ @@\ cd $(DESTDIR)dest; \ @@\ - $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi + $(LN) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so)); fi #endif #endif /* InstallSharedLibrary */ @@ -106,21 +150,21 @@ */ #ifndef SharedLibraryTarget # define SharedLibraryTarget(libname,rev,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ LinkWithExports(libname,rev,solist,down,up) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedLibraryTarget */ @@ -129,21 +173,21 @@ */ #ifndef SharedDepLibraryTarget # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ -AllTarget(Concat(lib,libname.so.rev)) @@\ +AllTarget(Concat($(LIBPREFIX),libname.so.rev)) @@\ @@\ -Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ +Concat($(LIBPREFIX),libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ LinkWithExports(libname,rev,solist,down,up) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ @if $(SOSYMLINK); then (set -x; \ @@\ - $(RM) Concat(lib,libname.so); \ @@\ - $(LN) $@ Concat(lib,libname.so)); fi @@\ + $(RM) Concat($(LIBPREFIX),libname.so); \ @@\ + $(LN) $@ Concat($(LIBPREFIX),libname.so)); fi @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\ + LinkBuildLibraryMaybe(Concat($(LIBPREFIX),libname.so),$(SOSYMLINK)) @@\ @@\ clean:: @@\ - $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + $(RM) Concat($(LIBPREFIX),libname.so.rev) Concat($(LIBPREFIX),libname.so) #endif /* SharedDepLibraryTarget */ @@ -170,3 +214,190 @@ #ifndef SharedLibraryDataTarget # define SharedLibraryDataTarget(libname,rev,salist) #endif /* SharedLibraryTarget */ + +/* + * The 64-bit library build support is covered by the XFree86 1.1 license. + * Author: Mark Kandianis. + */ +/* + * Copyright (c) 2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef Build64BitLibraries +#define Build64BitLibraries NO +#endif + +#if Build64BitLibraries + +#define ExtraLibRules + +#ifndef Shared64Dir +#define Shared64Dir 64 +#endif + +SHARED64DIR = Shared64Dir + +#ifndef Shared64LibraryDef +#define Shared64LibraryDef SharedLibraryDef +#endif + +#ifndef Shared64LibraryLoadFlags +#define Shared64LibraryLoadFlags SharedLibraryLoadFlags +#endif + +SHLIB64LDFLAGS = Shared64LibraryLoadFlags + +#ifndef Shared64PositionIndependentCFlags +#ifdef LargePositionIndependentCFlags +#define Shared64PositionIndependentCFlags LargePositionIndependentCFlags +#else +#define Shared64PositionIndependentCFlags PositionIndependentCFlags +#endif +#endif + +#ifndef InstallShared64Library +#define InstallShared64Library(libname,rev,dest) @@\ +install:: Concat(Shared64Dir/lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat(Shared64Dir/lib,libname.so.rev) $(DESTDIR)dest @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\ + cd $(DESTDIR)dest; \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi +#endif + +#ifndef Link64WithExports +# if UseExportLists +# define Link64WithExports(libname,rev,solist,down,up) \ + $(CCENVSETUP) $(LD) -o $@~ $(SHLIB64LDFLAGS) -h Concat(lib,libname.so.rev) solist $(REQUIREDLIBS) @@\ + @if [ -f Concat(lib,libname.elist) ]; then \ @@\ + (set -x; $(RM) libname.exports libname.list; \ @@\ + $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >libname.list; \ @@\ + $(EXPORTLISTGEN) $@~ libname.list > libname.exports; \ @@\ + $(CCENVSETUP) $(LD) -o $@~ $(SHLIB64LDFLAGS) -h $@ ShlibExportListOpt(libname.exports) solist $(REQUIREDLIBS); \ @@\ + $(RM) libname.exports libname.list); \ @@\ + fi; +# else +# define Link64WithExports(libname,rev,solist,down,up) \ + $(CCENVSETUP) $(LD) -o $@~ $(SHLIB64LDFLAGS) -h $@ solist $(REQUIREDLIBS) +# endif +#endif + +#ifndef Shared64LibraryTarget +#define Shared64LibraryTarget(libname,rev,solist,down,up) @@\ +AllTarget(Concat(down/lib,libname.so.rev)) @@\ + @@\ +Concat(down/lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + Link64WithExports(libname,rev,solist,down,up) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(down/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(down/lib,libname.so)); fi @@\ + LinkBuildLibrarySubdir($@,down,up) @@\ + LinkBuildLibrarySubdirMaybe(Concat(down/lib,libname.so),down,up,$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + $(RM) Concat(down/lib,libname.so.rev) @@\ + $(RM) Concat(down/lib,libname.so) +#endif /* Shared64LibraryTarget */ + +#ifndef Shared64DepLibraryTarget +#define Shared64DepLibraryTarget(libname,rev,deplist,solist,down,up) @@\ +AllTarget(Concat(down/lib,libname.so.rev)) @@\ + @@\ +Concat(down/lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\ + $(RM) $@~ @@\ + Link64WithExports(libname,rev,solist,down,up) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @if $(SOSYMLINK); then (set -x; \ @@\ + $(RM) Concat(down/lib,libname.so); \ @@\ + $(LN) Concat(lib,libname.so.rev) Concat(down/lib,libname.so)); fi @@\ + LinkBuildLibrarySubdir($@,down,up) @@\ + LinkBuildLibrarySubdirMaybe(Concat(down/lib,libname.so),down,up,$(SOSYMLINK)) @@\ + @@\ +clean:: @@\ + $(RM) Concat(down/lib,libname.so.rev) @@\ + $(RM) Concat(down/lib,libname.so) +#endif /* Shared64DepLibraryTarget */ + +#define Shared64CDebugFlags $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) +#define Shared64CplusplusDebugFlags $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) +#if HasGcc +#define Shared64CArchFlags -m64 +#define Shared64CplusplusArchFlags -m64 +#define Shared64AsmOptions -m64 +#else +#define Shared64CArchFlags -xarch=v9 +#define Shared64CplusplusArchFlags xarch=v9 +#define Shared64AsmOptions -xarch=v9 +#endif + + +#define Shared64LibObjCompile(options) LibObjCompile(Shared64Dir,Shared64CArchFlags Shared64CDebugFlags Shared64LibraryDef Shared64PositionIndependentCFlags options) +#define Shared64LibObjAsm(options) LibObjAsm(Shared64Dir,options,Shared64AsmOptions) +#define Shared64LibObjCplusplusCompile(options) LibObjCompile(Shared64Dir,Shared64CplusplusArchFlags Shared64CplusplusDebugFlags Shared64LibraryDef Shared64PositionIndependentCFlags options) + +#define ExtraSubdir Shared64Dir +EXTRASUBDIR = ExtraSubdir +#define ObjectPrefix ExtraSubdir/ +#define ExtraLibMkdir() _LibMkdir(Shared64Dir) +#define ExtraObjCompile(options) Shared64LibObjCompile(options) +#define ExtraObjAsm(options) Shared64LibObjAsm(options) +#define ExtraObjCplusplusCompile(options) Shared64LibObjCplusplusCompile(options) +#define ExtraCleanDir() LibCleanDir(Shared64Dir) + +#define ExtraLibraryTarget(libname,so,objs) Shared64LibraryTarget(libname,so,objs,Shared64Dir,..) +#define ExtraDepLibraryTarget(libname,so,deplist,objs) Shared64DepLibraryTarget(libname,so,deplist,objs,Shared64Dir,..) +#define ExtraInstallLibrary(libname,so) InstallShared64Library(libname,so,$(SHLIBDIR)/Shared64Dir) + +#if !defined(UseInstalled) && !defined(LdPreLib) +#define LdPreLib -L$(BUILDLIBDIR)/Shared64Dir -L$(BUILDLIBDIR) +#endif + +#endif Index: xc/config/cf/svr3.cf diff -u xc/config/cf/svr3.cf:3.16 xc/config/cf/svr3.cf:3.19 --- xc/config/cf/svr3.cf:3.16 Thu Jan 8 19:35:00 2004 +++ xc/config/cf/svr3.cf Wed Jun 2 18:42:53 2004 @@ -1,8 +1,50 @@ -XCOMM $Xorg: svr3.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - - - -XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.16 2004/01/09 00:35:00 dawes Exp $ +XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.19 2004/06/02 22:42:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #ifndef HasGcc #define HasGcc YES @@ -135,9 +177,9 @@ #ifndef ServerOSDefines # ifdef i386Architecture -# define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +# define ServerOSDefines XFree86ServerOSDefines # else -# define ServerOSDefines -DDDXTIME +# define ServerOSDefines /**/ # endif #endif @@ -260,7 +302,7 @@ #define InstallManPageLong(file,destdir,dest) @@\ BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\ @@\ -install.man:: file.man @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\ $(RMDSDEMACCMD) file.man | neqn | nroff -man >/tmp/file.man @@\ @@ -273,7 +315,7 @@ #define InstallGenManPageLong(file,destdir,dest,suffix) @@\ BuildInstallHtmlManPage(file,dest,suffix) @@\ @@\ -install.man:: file.man @@\ +install.man:: @@\ MakeDir($(DESTDIR)destdir) @@\ $(RM) $(DESTDIR)destdir/dest.suffix* @@\ $(RMDSDEMACCMD) file.man | neqn | nroff -man >/tmp/file.man @@\ @@ -284,7 +326,7 @@ #ifndef InstallMultipleMan #define InstallMultipleMan(list,dest) @@\ -install.man:: list @@\ +install.man:: @@\ MakeDir($(DESTDIR)dest) @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ for i in list; do \ @@\ Index: xc/config/cf/svr4.cf diff -u xc/config/cf/svr4.cf:3.51 xc/config/cf/svr4.cf:3.54 --- xc/config/cf/svr4.cf:3.51 Tue Jan 6 23:28:01 2004 +++ xc/config/cf/svr4.cf Sat Sep 11 17:01:38 2004 @@ -1,8 +1,53 @@ -XCOMM $Xorg: svr4.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ +XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.54 2004/09/11 21:01:38 tsi Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.51 2004/01/07 04:28:01 dawes Exp $ /* * A default OS name */ @@ -71,6 +116,9 @@ #endif #ifndef CppCmd #define CppCmd /usr/ccs/lib/cpp +#ifndef CPPAsmOptions +#define CPPAsmOptions /* */ +#endif #endif #ifndef RawCppCmd #if !defined(SunArchitecture) @@ -218,7 +266,7 @@ #endif #endif #ifndef ServerOSDefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #endif #endif @@ -274,6 +322,11 @@ #ifndef GccWarningOptions # define GccWarningOptions /* */ #endif +#if HasGcc3 && ((GccMajorVersion > 3) || (GccMinorVersion >= 1)) +# define GccAliasingArgs -fno-strict-aliasing +#else +# define GccAliasingArgs /* */ +#endif #ifndef XFree86ServerDefines # define XFree86ServerDefines /* */ #endif Index: xc/config/cf/usl.cf diff -u xc/config/cf/usl.cf:3.23 xc/config/cf/usl.cf:3.24 --- xc/config/cf/usl.cf:3.23 Wed Jan 17 11:38:50 2001 +++ xc/config/cf/usl.cf Wed Jun 2 18:42:53 2004 @@ -1,9 +1,52 @@ -XCOMM platform: $Xorg: usl.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - - +XCOMM platform: $XFree86: xc/config/cf/usl.cf,v 3.24 2004/06/02 22:42:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ -XCOMM platform: $XFree86: xc/config/cf/usl.cf,v 3.23 2001/01/17 16:38:50 dawes Exp $ #ifndef OSName # define OSName DefaultOSName @@ -36,7 +79,7 @@ #define StandardDefines -DUSL -DSVR4 -Di386 #define NeedWidePrototypes NO /* experimental */ #define ServerExtraDefines -D__USLC__ XFree86ServerDefines -#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines +#define ServerOSDefines XFree86ServerOSDefines #define ToolkitStringsABIOptions -intelabi #if OSMajorVersion < 2 #define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS Index: xc/config/cf/x386.cf diff -u xc/config/cf/x386.cf:3.5 xc/config/cf/x386.cf:3.7 --- xc/config/cf/x386.cf:3.5 Tue Jan 23 18:31:50 2001 +++ xc/config/cf/x386.cf Thu Apr 22 10:15:05 2004 @@ -1,4 +1,5 @@ XCOMM platform: $Xorg: x386.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ +XCOMM $XFree86: xc/config/cf/x386.cf,v 3.7 2004/04/22 14:15:05 tsi Exp $ /***************************************************************************** * Site-specfic parameters * @@ -89,14 +90,14 @@ * imake rules. */ #define InstallManPageLong(file,destdir,dest) @@\ -install.man:: file.man @@\ +install.man:: @@\ $(RM) destdir/dest.$(MANSUFFIX) @@\ cat file.man | $(NEQN) | $(NROFF) $(MANMACROS) >/tmp/file.man @@\ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man destdir/dest.$(MANSUFFIX) @@\ $(RM) /tmp/file.man #define InstallMultipleMan(list,dest) @@\ -install.man:: list @@\ +install.man:: @@\ @MakeFlagsToShellFlags(i,set +e); \ @@\ for i in list; do \ @@\ (set -x; \ @@\ Index: xc/config/cf/xf86.rules diff -u xc/config/cf/xf86.rules:3.35 xc/config/cf/xf86.rules:3.37 --- xc/config/cf/xf86.rules:3.35 Mon Sep 1 17:20:01 2003 +++ xc/config/cf/xf86.rules Mon May 31 20:16:53 2004 @@ -1,9 +1,50 @@ -XCOMM $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/config/cf/xf86.rules,v 3.35 2003/09/01 21:20:01 tsi Exp $ +XCOMM $XFree86: xc/config/cf/xf86.rules,v 3.37 2004/06/01 00:16:53 dawes Exp $ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * Rules needed to build the XFree86 X Servers @@ -85,7 +126,7 @@ #define InstallDriverSDKNonExecFile(file,dest) /**/ #else #define InstallDriverSDKNonExecFile(file,dest) @@\ -install.sdk:: file @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest #endif @@ -96,7 +137,7 @@ #define InstallDriverSDKLibrary(libname,dest) /**/ #else #define InstallDriverSDKLibrary(libname,dest) @@\ -install.sdk:: Concat(lib,libname.a) @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.a) $(DESTDIR)dest @@\ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.a)) @@ -108,7 +149,7 @@ #define InstallDriverSDKNamedLibrary(libname,dlibname,dest) /**/ #else #define InstallDriverSDKNamedLibrary(libname,dlibname,dest) @@\ -install.sdk:: Concat(lib,libname.a) @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.a) \ @@\ Concat($(DESTDIR)dest/lib,dlibname.a) @@\ @@ -121,7 +162,7 @@ #define InstallDriverSDKNamedNonExec(srcname,dstname,dest) /**/ #else #define InstallDriverSDKNamedNonExec(srcname,dstname,dest) @@\ -install.sdk:: srcname @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTDATFLAGS) srcname $(DESTDIR)dest/dstname #endif @@ -132,7 +173,7 @@ #define InstallDriverSDKNamedProg(srcname,dstname,dest) /**/ #else #define InstallDriverSDKNamedProg(srcname,dstname,dest) @@\ -install.sdk:: srcname @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest) @@\ $(INSTALL) -c $(INSTBINFLAGS) srcname $(DESTDIR)dest/dstname #endif @@ -161,7 +202,7 @@ #define InstallDriverSDKDynamicModule(module,dest,subdir) /**/ #else #define InstallDriverSDKDynamicModule(module,dest,subdir) @@\ -install.sdk:: module @@\ +install.sdk:: @@\ MakeDir($(DESTDIR)dest/subdir) @@\ $(INSTALL) -c module $(DESTDIR)dest/subdir #endif Index: xc/config/cf/xf86.tmpl diff -u xc/config/cf/xf86.tmpl:3.33 xc/config/cf/xf86.tmpl:3.37 --- xc/config/cf/xf86.tmpl:3.33 Mon Dec 16 18:01:43 2002 +++ xc/config/cf/xf86.tmpl Sun Feb 6 20:38:23 2005 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/config/cf/xf86.tmpl,v 3.33 2002/12/16 23:01:43 herrb Exp $ +XCOMM $XFree86: xc/config/cf/xf86.tmpl,v 3.37 2005/02/07 01:38:23 tsi Exp $ #ifdef BuilderEMailAddr BUILDERADDR = BuilderEMailAddr @@ -85,11 +85,12 @@ ClearmakeOSName\ $(MODCC) $(MODCFLAGS) options -c $*.c -/* This overrides an AssembleObject in xf86.rules or in an os-dependent - * rules file (currently only minix.cf and os2.rules (uncritical)) +/* + * This overrides an AssembleObject in xf86.rules or in an os-dependent + * rules file. */ #define ModCPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\ - $(MODCPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\ + $(MODCPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\ grep -v '^\#' > basename.i #undef AssembleObject @@ -131,7 +132,26 @@ #define LibraryTargetName(libname)Concat(lib,libname.a) /* This disables an OS/2 rule */ -#undef BuildLibSupportLibs -#define BuildLibSupportLibs(dummy) +#undef BuildLibSupportLibs2 +#define BuildLibSupportLibs2(dummy) + +/* This overrides the ObjectAsm in Imake.rules */ +#undef ObjectAsm +#define ObjectAsm(options) RemoveFiles($@ $*.i) @@\ + $(MODCPP) CPPAsmOptions AsmDefines $(DEFINES) $(INCLUDES) options $*.S | \ @@\ + grep -v '^\#' > $*.i @@\ + $(MODAS) $(ASMOPTS) -o $*.o $*.i @@\ + RemoveFile($*.i) #endif /* IHaveModules */ + +/* + * A kludge to prevent a static build from linking objects into + * $(BUILDMODULEDIR). + */ +#if defined(IHaveModules) && !DoLoadableServer && !defined(UseInstalled) +#undef LinkBuildModule +#undef LinkBuildNamedModule +#define LinkBuildModule(module,subdir) $(_NULLCMD_) +#define LinkBuildNamedModule(module,name,subdir) $(_NULLCMD_) +#endif Index: xc/config/cf/xf86site.def diff -u xc/config/cf/xf86site.def:3.187 xc/config/cf/xf86site.def:3.191 --- xc/config/cf/xf86site.def:3.187 Sat Sep 6 19:38:04 2003 +++ xc/config/cf/xf86site.def Tue Jul 6 23:46:21 2004 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.187 2003/09/06 23:38:04 dawes Exp $ +XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.191 2004/07/07 03:46:21 martin Exp $ /******************************************************************************/ /* * This file is to provide a quick method for most people to change the @@ -57,6 +57,12 @@ */ /* + * To enable building Xdmx, uncomment this. + * +#define XdmxServer YES + */ + +/* * To disable building Xprt, uncomment this. * #define XprtServer NO @@ -181,13 +187,6 @@ */ /* - * To disable support for TrueType fonts, uncomment these. - * -#define BuildFreeType NO -#define BuildXTrueType NO - */ - -/* * To set non-default build options for the underlying FreeType libraries, * add them here and uncomment. * @@ -195,15 +194,6 @@ */ /* - * If you want to use FreeType 1.x build options that differ from the FreeType2 - * build options, set them here and uncomment. Otherwise the Freetype2 build - * options will be used for both FreeType 2.x and 1.x. Note: FreeType 1.x - * is currently only used for the X-TrueType (xtt) module. - * -#define Freetype1BuildDefines -DFREETYPE1_BUILD_DEFINES - */ - -/* * To build the FreeType libraries with the TrueType byte code interpreter * enabled, uncomment this. Note that there are patent issues related to the * TrueType byte code interpreter, and we only recommend you enabling this @@ -580,9 +570,9 @@ */ /* - * If you want XDMAUTH support (if you have Wraphelp.c), uncomment this. + * If you want to disable XDMAUTH support, uncomment this. * -#define HasXdmAuth YES +#define HasXdmAuth NO */ /* Index: xc/config/cf/xfree86.cf diff -u xc/config/cf/xfree86.cf:3.467 xc/config/cf/xfree86.cf:3.492 --- xc/config/cf/xfree86.cf:3.467 Tue Jan 27 20:47:26 2004 +++ xc/config/cf/xfree86.cf Mon Feb 28 18:19:12 2005 @@ -1,4 +1,50 @@ -XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.467 2004/01/28 01:47:26 dawes Exp $ +XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.492 2005/02/28 23:19:12 dawes Exp $ +/* + * Copyright (c) 1994-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * This configuration file contains all of the configuration * information for the XFree86 based X Servers. @@ -6,7 +52,6 @@ * Most of these settings can be overridden in a vendor.cf or the * BeforeVendor part of the site.def file. */ -XCOMM $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $ /* Get and set version information. */ @@ -102,17 +147,16 @@ /* * This enables some settings for developers. + * + * If your cpp cannot handle the 'if (XFree86Version % 1000)' line, + * put the exception in here. */ #ifndef XFree86Devel -# if !defined(PatheticCpp) || !PatheticCpp -# if (XFree86Version % 1000) -# define XFree86Devel YES -# else -# define XFree86Devel NO -# endif +# if (XFree86Version % 1000) +# define XFree86Devel YES # else -# define XFree86Devel NO /* Assume the worst */ +# define XFree86Devel NO # endif #endif @@ -154,6 +198,7 @@ #define BuildLibrariesForConfigTools BuildXFree86ConfigTools #endif +#if !defined(BuildServer) || BuildServer #if BuildXFree86ConfigTools && BuildLibrariesForConfigTools #define BuildLibraries YES #define BuildXF86MiscLibrary YES @@ -162,14 +207,6 @@ #define BuildXKBfilelib YES #define BuildXKBuilib YES #endif - -/* - * When this is set, modules are always built separately from the libraries - * that statically link into an Xserver. This is for platforms where the - * module and native object formats are different (e.g., OS/2). - */ -#ifndef BuildModuleInSubdir -#define BuildModuleInSubdir NO #endif #ifndef MakeDllModules @@ -223,55 +260,6 @@ #define HasAgpGart NO #endif -/* The glide driver only works for the loadable server at the moment */ -#ifndef HasGlide2 -#define HasGlide2 NO -#endif -#if HasGlide2 && DoLoadableServer -#define GlideDriver glide -#else -#define GlideDriver /**/ -#endif - -/* - * There are three parameters that determine where and how the Matrox HAL - * library is used: - * - * HaveMatroxHal -- You have the HALlib.a binary library installed - * in xfree86/drivers/mga/HALlib, and you want it to - * be used. - * Default: NO - * - * BuildMatroxHal -- You have the source for the HALlib library (installed - * in xfree86/drivers/mga/hallib), and want to build and - * use it. - * Default: NO - * - * UseMatroxHal -- You want to build support for loading/using the HAL - * library into the mga driver. For module server builds - * you don't need to have the HALlib library to do this. - * but you want to build support for loading it and using - * it into the mga driver module. - * Default: YES for loadable server build - * (HaveMatroxHal || BuildMatroxHal) for static - */ - -#ifndef HaveMatroxHal -#define HaveMatroxHal NO -#endif - -#ifndef BuildMatroxHal -#define BuildMatroxHal NO -#endif - -#ifndef UseMatroxHal -#if DoLoadableServer -#define UseMatroxHal YES -#else -#define UseMatroxHal (HaveMatroxHal || BuildMatroxHal) -#endif -#endif - /* * For Intel platforms, the default is to build all modules which * are supported on this platform. @@ -394,7 +382,7 @@ # endif # ifndef DriDrivers -# define DriDrivers gamma i810 i830 mga r128 radeon r200 \ +# define DriDrivers gamma i810 i915 mga r128 radeon r200 \ sis tdfx DevelDRIDrivers # endif #endif @@ -403,6 +391,9 @@ # ifndef XF86Server # define XF86Server YES # endif +# ifndef XF86AFB +# define XF86AFB (!XF86Server || !DoLoadableServer) +# endif /* 1bpp module */ # ifndef XF1Bpp # define XF1Bpp YES @@ -1131,6 +1122,55 @@ # define DoLoadableServer NO #endif +/* The glide driver only works for the loadable server at the moment */ +#ifndef HasGlide2 +#define HasGlide2 NO +#endif +#if HasGlide2 && DoLoadableServer +#define GlideDriver glide +#else +#define GlideDriver /**/ +#endif + +/* + * There are three parameters that determine where and how the Matrox HAL + * library is used: + * + * HaveMatroxHal -- You have the HALlib.a binary library installed + * in xfree86/drivers/mga/HALlib, and you want it to + * be used. + * Default: NO + * + * BuildMatroxHal -- You have the source for the HALlib library (installed + * in xfree86/drivers/mga/hallib), and want to build and + * use it. + * Default: NO + * + * UseMatroxHal -- You want to build support for loading/using the HAL + * library into the mga driver. For module server builds + * you don't need to have the HALlib library to do this. + * but you want to build support for loading it and using + * it into the mga driver module. + * Default: YES for loadable server build + * (HaveMatroxHal || BuildMatroxHal) for static + */ + +#ifndef HaveMatroxHal +#define HaveMatroxHal NO +#endif + +#ifndef BuildMatroxHal +#define BuildMatroxHal NO +#endif + +#ifndef UseMatroxHal +#if DoLoadableServer +#define UseMatroxHal YES +#else +#define UseMatroxHal (HaveMatroxHal || BuildMatroxHal) +#endif +#endif + /* * Fbdev module defines. They are set to indicate the fb types supported * on different architectures. @@ -1192,10 +1232,6 @@ #define BuildXF86DRI NO #endif -#ifndef BuildXF86DRM -#define BuildXF86DRM NO -#endif - #ifndef GlxUseSGISI #define GlxUseSGISI NO #endif @@ -1210,10 +1246,6 @@ # endif #endif -#ifndef BuildXF86OldDRMCompat -# define BuildXF86OldDRMCompat YES -#endif - /* * One and ONLY one of the GlxBuiltIn* drivers can be defined to be YES. * If more than one are defined, the compilation will fail with multiply @@ -1244,8 +1276,8 @@ # ifndef GlxBuiltInI810 # define GlxBuiltInI810 NO # endif -# ifndef GlxBuiltInI830 -# define GlxBuiltInI830 NO +# ifndef GlxBuiltInI915 +# define GlxBuiltInI915 NO # endif # ifndef GlxBuiltInR128 # define GlxBuiltInR128 NO @@ -1266,7 +1298,7 @@ # if GlxBuiltInTdfx || \ GlxBuiltInMga || \ GlxBuiltInI810 || \ - GlxBuiltInI830 || \ + GlxBuiltInI915 || \ GlxBuiltInR128 || \ GlxBuiltInRadeon || \ GlxBuiltInR200 || \ @@ -1281,7 +1313,7 @@ GlxBuiltInTdfx || \ GlxBuiltInMga || \ GlxBuiltInI810 || \ - GlxBuiltInI830 || \ + GlxBuiltInI915 || \ GlxBuiltInR128 || \ GlxBuiltInRadeon || \ GlxBuiltInR200 || \ @@ -1308,8 +1340,8 @@ # if GlxBuiltInI810 # define DriDrivers i810 # endif -# if GlxBuiltInI830 -# define DriDrivers i830 +# if GlxBuiltInI915 +# define DriDrivers i915 # endif # if GlxBuiltInR128 # define DriDrivers r128 @@ -1328,6 +1360,10 @@ # endif # endif +# else + +# define GlxDriverUsesMesa NO +# define GlxBuiltInXMesa NO #endif /* @@ -1375,6 +1411,10 @@ # define GlxExtraDefines DRIDefines GlxCoreLibDefines GlxArchDefines # endif +# ifndef BuildGlxInDmx +# define BuildGlxInDmx XFree86Devel /* Temporary */ +# endif + #else /* If we are not building GLX, then make sure the DRI is not built */ @@ -1592,11 +1632,13 @@ #endif #ifndef BuildFreeType -# define BuildFreeType YES -#endif - -#ifndef BuildXTrueType -# define BuildXTrueType YES +# if !defined(BuildLibraries) || BuildLibraries || \ + !defined(BuildServer) || BuildServer || \ + !defined(BuildClients) || BuildClients +# define BuildFreeType YES +# else +# define BuildFreeType NO +# endif #endif /* @@ -1706,12 +1748,15 @@ #ifndef HasBsdMake #define HasBsdMake NO #endif +#ifndef HasGnuMake +#define HasGnuMake NO +#endif #ifndef MakeHasPosixVariableSubstitutions -# if !HasBsdMake && !defined(SunArchitecture) -# define MakeHasPosixVariableSubstitutions NO -# else +#if HasBsdMake || HasGnuMake || defined(SunArchitecture) || SystemV4 # define MakeHasPosixVariableSubstitutions YES +# else +# define MakeHasPosixVariableSubstitutions NO # endif #endif @@ -1874,7 +1919,7 @@ # if defined(UseInstalled) # define DefaultCCOptions /* -ansi */ # else -# define DefaultCCOptions -ansi -pedantic GccWarningOptions +# define DefaultCCOptions -ansi GccWarningOptions # endif # endif # if defined(UseInstalled) @@ -1893,7 +1938,7 @@ # endif #endif -#if (GccMajorVersion == 3) && (GccMinorVersion >= 1) +#if HasGcc3 && ((GccMajorVersion > 3) || (GccMinorVersion >= 1)) # define GccAliasingArgs -fno-strict-aliasing #else # define GccAliasingArgs /* */ @@ -1923,6 +1968,12 @@ # endif #endif +#if HasGcc2 && defined(SparcArchitecture) +# ifndef DefaultGcc2SparcOpt +# define DefaultGcc2SparcOpt -O2 GccAliasingArgs +# endif +#endif + #ifndef DefaultGcc2DebugOpt # define DefaultGcc2DebugOpt -g #endif @@ -2008,6 +2059,92 @@ # define XF8_32Wid NO #endif +/* Defaults for the TinyX servers. */ + +#ifndef HaveTinyXSupport +#define HaveTinyXSupport NO +#endif +#ifndef HaveTinyXVBESupport +#define HaveTinyXVBESupport NO +#endif +#ifndef HaveTinyXFbdevSupport +#define HaveTinyXFbdevSupport NO +#endif + +#ifndef XchipsServer +#define XchipsServer HaveTinyXVBESupport +#endif +#ifndef XfbdevServer +#define XfbdevServer HaveTinyXFbdevSupport +#endif +#ifndef Xi810Server +#define Xi810Server HaveTinyXSupport +#endif +#ifndef XIgsServer +#define XIgsServer HaveTinyXSupport +#endif +#ifndef XipaqServer +#define XipaqServer HaveTinyXSupport +#endif +#ifndef XItsyServer +#define XItsyServer NO +#endif +#ifndef Xmach64Server +#define Xmach64Server HaveTinyXVBESupport +#endif +#ifndef XSavageServer +#define XSavageServer HaveTinyXSupport +#endif +#ifndef XSis530Server +#define XSis530Server HaveTinyXSupport +#endif +#ifndef XTridentServer +#define XTridentServer HaveTinyXVBESupport +#endif +#ifndef XTrioServer +#define XTrioServer HaveTinyXSupport +#endif +#ifndef XTS300Server +#define XTS300Server HaveTinyXSupport +#endif +#ifndef XvesaServer +#define XvesaServer HaveTinyXVBESupport +#endif + +#ifndef TinyXServer +#if XfbdevServer || Xi810Server || XIgsServer || XipaqServer || \ + XItsyServer || Xmach64Server || XSavageServer || XSis530Server || \ + XTridentServer || XTrioServer || XTS300Server || XvesaServer +#define TinyXServer YES +#else +#define TinyXServer NO +#endif +#endif + +#ifndef TouchScreen +#define TouchScreen NO +#endif + +#if TouchScreen +#define TouchScreenDefines -DTOUCHSCREEN +#else +#define TouchScreenDefines /**/ +#endif + +/* + * When this is set, modules are always built separately from the libraries + * that statically link into an Xserver. This is for platforms where the + * module and native object formats are different (e.g., OS/2). + */ +#ifndef BuildModuleInSubdir +#if TinyXServer || XVirtualFramebufferServer +#define BuildModuleInSubdir YES +#else +#define BuildModuleInSubdir NO +#endif +#endif + + #if CrossCompiling #include #endif Index: xc/config/cf/xttMod.tmpl diff -u xc/config/cf/xttMod.tmpl:1.6 xc/config/cf/xttMod.tmpl:removed --- xc/config/cf/xttMod.tmpl:1.6 Mon Apr 23 17:41:43 2001 +++ xc/config/cf/xttMod.tmpl Wed Mar 16 20:58:25 2005 @@ -1,86 +0,0 @@ -/* -*- Makefile -*- */ -XCOMM Code converter template of X-TT -XCOMM $XFree86: xc/config/cf/xttMod.tmpl,v 1.6 2001/04/23 21:41:43 dawes Exp $ */ - -#ifdef IHaveModules -/* New designed XFree86 module */ - -#include - -INCLUDES = -I.. -I../.. -I$(FONTINCSRC) -I../../../include \ - -I$(TOP)/include -I$(SERVERSRC)/include \ - -I$(FTSOURCEDIR)/lib -I$(FTSOURCEDIR)/lib/extend \ - -I$(FTSOURCEDIR)/lib/arch/unix -I$(XTTSOURCEDIR) - -#if 0 -LinkSourceFile(xttversion.h,$(XTTSOURCEDIR)) -LinkSourceFile(xttcommon.h,$(XTTSOURCEDIR)) -LinkSourceFile(xttcconv.h,$(XTTSOURCEDIR)) -LinkSourceFile(xttcconvP.h,$(XTTSOURCEDIR)) -LinkSourceFile(xttcap.h,$(XTTSOURCEDIR)) -#endif - -DEFINES = -DFONTMODULE -DMODNAME=$(MODULENAME) $(XTT_DEBUG_DEF) - -ModuleObjectRule() -LibraryModuleTarget($(MODULENAME),$(OBJS)) -InstallLibraryModule($(MODULENAME),$(MODULEDIR),codeconv) - -DependTarget() - -InstallDriverSDKLibraryModule($(MODULENAME),$(DRIVERSDKMODULEDIR),codeconv) - -# else -/* dlopen based code converter */ - -#if DoLoadableServer && BuildServer -#define IHaveSubdirs -#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" -SUBDIRS = module -#endif - -#if 0 - -DEFINES = -DMODNAME=$(MODULENAME) $(XTT_DEBUG_DEF) - -INCLUDES = -I./ -I../ -I../../ -I$(TOP)/lib/font/include -I$(FTSOURCEDIR)/lib \ - -I$(SERVERSRC)/include -I$(XTOP)/include -I$(FONTINCSRC) - -CCONV_MODULE_FILE = Concat(ModuleName,.so) - -#define DoNormalLib NormalLibFont -#define DoSharedLib SharedLibFont -#define DoDebugLib DebugLibFont -#define DoProfileLib ProfileLibFont -#include -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -#ifndef SharedDepModuleTarget -AllTarget($(CCONV_MODULE_FILE)) - -$(CCONV_MODULE_FILE): $(OBJS) - $(RM) $@~ - $(CC) -o $@~ $(SHLIBLDFLAGS) $(OBJS) $(REQUIREDLIBS) - $(RM) $@ - $(MV) $@~ $@ - -clean:: - $(RM) $(CCONV_MODULE_FILE) -#else -SharedDepModuleTarget($(CCONV_MODULE_FILE),$(OBJS),$(OBJS)) -#endif - -#endif /* 0 */ - -#if DoLoadableServer && BuildServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() -#endif - -/* end of file */ Index: xc/config/imake/ccimake.c diff -u xc/config/imake/ccimake.c:1.4 xc/config/imake/ccimake.c:1.5 --- xc/config/imake/ccimake.c:1.4 Thu Apr 4 09:05:34 2002 +++ xc/config/imake/ccimake.c Thu Mar 4 23:02:09 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group . */ -/* $XFree86: xc/config/imake/ccimake.c,v 1.4 2002/04/04 14:05:34 eich Exp $ */ +/* $XFree86: xc/config/imake/ccimake.c,v 1.5 2004/03/05 04:02:09 dawes Exp $ */ /* * Warning: This file must be kept as simple as possible so that it can @@ -46,6 +46,8 @@ #define crosscompile_ccflags " -DCROSSCOMPILE " #define crosscompiledir_str "-DCROSSCOMPILEDIR=" +extern int write(int, const void *, unsigned int); + int main() { Index: xc/config/imake/imake.c diff -u xc/config/imake/imake.c:3.64 xc/config/imake/imake.c:3.66 --- xc/config/imake/imake.c:3.64 Wed Mar 26 15:43:47 2003 +++ xc/config/imake/imake.c Mon Apr 26 12:24:26 2004 @@ -7,7 +7,6 @@ * be passed to the template file. * * * ***************************************************************************/ -/* $XFree86: xc/config/imake/imake.c,v 3.64 2003/03/26 20:43:47 tsi Exp $ */ /* * @@ -191,7 +190,7 @@ #include #ifndef X_NOT_POSIX # ifdef _POSIX_SOURCE -# ifdef SCO325 +# ifdef __SCO__ # include # include # endif @@ -1721,6 +1720,15 @@ tmpImakefile); } #endif + /* + * mktemp/mkstemp can generate a filename that makes + * '#include INCLUDE_IMAKEFILE' croak. So spit out a + * nice fat warning about the need to generate such + * filenames in the first place. + */ + fprintf(stderr, + "%s: warning: %s contains invalid %s input." + " Please fix!\n", program, imakefile, cpp); } writetmpfile(outFile, punwritten, pbuf-punwritten, tmpImakefile); @@ -1908,6 +1916,8 @@ fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n"); fprintf (tmpfd, "# %s\n", "$Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $"); + fprintf (tmpfd, "# %s\n", + "$XFree86: xc/config/imake/imake.c,v 3.66 2004/04/26 16:24:26 tsi Exp $"); } for (p1 = pline; p1 < end; p1++) { Index: xc/config/imake/imake.man diff -u xc/config/imake/imake.man:1.9 xc/config/imake/imake.man:1.11 --- xc/config/imake/imake.man:1.9 Wed Nov 20 16:48:46 2002 +++ xc/config/imake/imake.man Thu Feb 10 22:02:53 2005 @@ -23,9 +23,9 @@ .\" other dealings in this Software without prior written authorization .\" from The Open Group. .\" -.\" $XFree86: xc/config/imake/imake.man,v 1.9 2002/11/20 21:48:46 herrb Exp $ +.\" $XFree86: xc/config/imake/imake.man,v 1.11 2005/02/11 03:02:53 dawes Exp $ .\" -.TH IMAKE 1 __xorgversion__ +.TH IMAKE 1 __vendorversion__ .SH NAME imake \- C preprocessor interface to the make utility .SH SYNOPSIS @@ -176,7 +176,7 @@ \fIlib/X/\fP (relative to the top of the sources): .sp .nf - % ../.././config/imake \-I../.././config \\ + % ../.././config/imake \-I../.././config \\\& \-DTOPDIR=../../. \-DCURDIR=./lib/X .fi .sp Index: xc/config/imake/imakemdep.h diff -u xc/config/imake/imakemdep.h:3.72 xc/config/imake/imakemdep.h:3.80 --- xc/config/imake/imakemdep.h:3.72 Mon Dec 29 20:53:52 2003 +++ xc/config/imake/imakemdep.h Mon Jan 31 21:25:06 2005 @@ -1,4 +1,3 @@ -/* $Xorg: imakemdep.h,v 1.6 2001/02/09 02:03:16 xorgcvs Exp $ */ /* Copyright (c) 1993, 1994, 1998 The Open Group @@ -24,7 +23,53 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/imake/imakemdep.h,v 3.72 2003/12/30 01:53:52 tsi Exp $ */ +/* $XFree86: xc/config/imake/imakemdep.h,v 3.80 2005/02/01 02:25:06 dawes Exp $ */ +/* + * Copyright (c) 1994-2004 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* @@ -73,7 +118,7 @@ #ifdef imake_ccflags #undef imake_ccflags #endif -#define imake_ccflags "-Dsco -DSYSV -DSCO -DSCO325" +#define imake_ccflags "-DSYSV -DSCO325 -D__SCO__" #endif #ifdef sony @@ -199,7 +244,7 @@ * descriptor onto another, define such a mechanism here (if you don't * already fall under the existing category(ies). */ -#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco) +#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__) #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ fcntl(fd1, F_DUPFD, fd2))) #endif @@ -214,7 +259,7 @@ * all colons). One way to tell if you need this is to see whether or not * your Makefiles have no tabs in them and lots of @@ strings. */ -#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) +#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) #define FIXUP_CPP_WHITESPACE #endif #ifdef WIN32 @@ -374,6 +419,9 @@ # ifdef __AMD64__ "-D__AMD64__", # endif +# ifdef __amd64__ + "-D__amd64__", +# endif # ifdef __x86_64__ "-D__AMD64__", # endif @@ -392,6 +440,9 @@ # ifdef __sparc__ "-D__sparc__", # endif +# ifdef __sparc64__ + "-D__sparc64__", +# endif # ifdef __m68k__ "-D__m68k__", # endif @@ -482,8 +533,8 @@ "-DSVR4", # endif #endif /* MOTOROLA */ -#if defined(M_UNIX) || defined(sco) - "-Dsco", +#if defined(M_UNIX) || defined(__SCO__) || defined(sco) || defined(_SCO_DS) + "-D__SCO__", "-DSYSV", #endif #ifdef i386 @@ -509,11 +560,8 @@ # endif # endif # endif -# ifdef SCO - "-DSCO", -# ifdef _SCO_DS +# ifdef _SCO_DS "-DSCO325", -# endif # endif # endif # ifdef ESIX @@ -547,11 +595,8 @@ # endif # endif # endif -# ifdef SCO - "-DSCO", -# ifdef _SCO_DS +# ifdef _SCO_DS "-DSCO325", -# endif # endif # ifdef ESIX "-DESIX", @@ -837,7 +882,7 @@ buf[0] = '6'; \ else \ buf[0] = '8'; /* guess */ \ - } else { \ + } else if (__osrel < 420000) { \ buf[0] = ((__osrel / 1000) % 10) + '0'; \ } \ buf[1] = 0; \ @@ -863,16 +908,36 @@ */ # define DEFAULT_OS_MAJOR_REV "r %[0-9]" # define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" -# define DEFAULT_OS_TEENY_REV "r %*d.%*d%[A-Z]" +# define DEFAULT_OS_TEENY_REV "r %s" # define DEFAULT_OS_TEENY_REV_FROB(buf, size) \ do { \ - int teeny = 0; \ - char *ptr = (buf); \ + int major, minor, teeny = 0; \ + char *ptr = (buf), *endptr; \ + \ + major = (int)strtol(ptr, &endptr, 10); \ + if (ptr == endptr || *endptr++ != '.') \ + goto error; \ + \ + ptr = endptr; \ + minor = (int)strtol(ptr, &endptr, 10); \ + if (ptr == endptr) \ + goto error; \ + ptr = endptr; \ \ - while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */ \ - teeny = teeny * 26 + (int)(*ptr++ - 'A'); \ + if (major > 2 || (major == 2 && minor >= 99)) { \ + if (*ptr++ == '.') { \ + teeny = (int)strtol(ptr, &endptr, 10); \ + if (ptr == endptr) \ + goto error; \ + } \ + } else { \ + while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */ \ + teeny = teeny * 26 + (int)(*ptr++ - 'A'); \ + teeny++; \ + } \ \ - snprintf((buf), (size), "%d", teeny + 1); \ +error: \ + snprintf((buf), (size), "%d", teeny); \ } while (0) # define DEFAULT_OS_NAME "smr %[^\n]" # define DEFAULT_OS_NAME_FROB(buf, size) \ @@ -1023,6 +1088,9 @@ #ifdef __sparc__ {"__sparc__", "1"}, #endif +#ifdef __sparc64__ + {"__sparc64__", "1"}, +#endif #ifdef __sparcv9__ {"__sparcv9__", "1"}, #endif @@ -1272,6 +1340,9 @@ {"__AMD64__", "1"}, {"__x86_64__", "1"}, # endif +# if defined (__amd64__) + {"__amd64__", "1"}, +# endif # ifdef __i386 {"__i386", "1"}, # endif @@ -1338,6 +1409,9 @@ #if defined(__LITTLE_ENDIAN__) {"__LITTLE_ENDIAN__", "1"}, #endif +#ifdef __SIZE_TYPE__ + {"__SIZE_TYPE__", DEF_STRINGIFY(__SIZE_TYPE__)}, +#endif /* add any additional symbols before this line */ {NULL, NULL} }; Index: xc/config/makedepend/Imakefile diff -u xc/config/makedepend/Imakefile:3.13 xc/config/makedepend/Imakefile:3.14 --- xc/config/makedepend/Imakefile:3.13 Tue Oct 21 13:41:44 2003 +++ xc/config/makedepend/Imakefile Wed Mar 31 18:02:16 2004 @@ -3,7 +3,7 @@ XCOMM XCOMM XCOMM -XCOMM $XFree86: xc/config/makedepend/Imakefile,v 3.13 2003/10/21 17:41:44 tsi Exp $ +XCOMM $XFree86: xc/config/makedepend/Imakefile,v 3.14 2004/03/31 23:02:16 tsi Exp $ SRCS = include.c main.c parse.c pr.c cppsetup.c ifparser.c OBJS = include.o main.o parse.o pr.o cppsetup.o ifparser.o @@ -14,15 +14,21 @@ LDPRELIBS = #if HasGcc && !defined(PreIncDir) +#if !CrossCompiling #define PreIncDir /usr/local/lib/gcc-include #endif +#endif #ifdef PreIncDir PREINCDIR = PreIncDir PREINC_DEFINES = -DPREINCDIR=\"$(PREINCDIR)\" #endif #ifndef StdIncDir +#if CrossCompiling +#define StdIncDir Concat(CrossCompileDir,/../include) +#else #define StdIncDir /usr/include #endif +#endif STDINCDIR = StdIncDir STDINC_DEFINES = -DINCLUDEDIR=\"$(STDINCDIR)\" #ifdef PostIncDir Index: xc/config/makedepend/cppsetup.c diff -u xc/config/makedepend/cppsetup.c:3.11 xc/config/makedepend/cppsetup.c:3.12 --- xc/config/makedepend/cppsetup.c:3.11 Mon Dec 17 15:52:22 2001 +++ xc/config/makedepend/cppsetup.c Fri Mar 5 11:02:58 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/makedepend/cppsetup.c,v 3.11 2001/12/17 20:52:22 dawes Exp $ */ +/* $XFree86: xc/config/makedepend/cppsetup.c,v 3.12 2004/03/05 16:02:58 tsi Exp $ */ #include "def.h" @@ -86,8 +86,8 @@ pend = p; ptrtab = slotab+COFF; - *--inp = SALT; - outp=inp; + *--inp = SALT; + outp=inp; value = yyparse(); *p = savec; return(value); @@ -181,26 +181,231 @@ return 0; } + +int +variable_has_args (IfParser *ip, const char *var, int len) +{ + struct symtab **s = lookup_variable (ip, var, len); + + if (!s) + return 0; + + if ((*s)->s_args) + return 1; + else + return 0; +} + +/* + * this is tiny linked list implementation for temporarily storing + * and retriving pairs of macro parameter names and passed in macro arguments. + */ +typedef struct keyword_type_rec keyword_type; +struct keyword_type_rec { + keyword_type* pnext; + char *name; + char *value; +}; + + +static keyword_type* +build_keyword_list (const char* keys, const char* values) +{ + keyword_type *phead = NULL, *pnew; + const char *ptmp; + int len; + + while (*keys) + { + /* alloc new member */ + pnew = malloc(sizeof(*pnew)); + if (!pnew) + { + fprintf(stderr, "out of memory in my_eval_variable\n"); + exit(1); + } + + /* extract key */ + ptmp = keys; + len = 0; + while (*ptmp && (*ptmp != ',')) + ptmp++, len++; + pnew->name = malloc(len+1); + strncpy(pnew->name, keys, len); + pnew->name[len] = '\0'; + keys = ptmp; + if (*keys) + keys++; + + /* extract arg */ + ptmp = values; + len = 0; + while (*ptmp && (*ptmp != ',') && (*ptmp != ')')) + ptmp++, len++; + pnew->value = malloc(len+1); + strncpy(pnew->value, values, len); + pnew->value[len] = '\0'; + values = ptmp; + if (*values) + values++; + + /* chain in this new member */ + pnew->pnext = phead; + phead = pnew; + } + + return phead; +} + + +static const keyword_type* +get_keyword_entry (const keyword_type* phead, const char* keyname, const int keylen) +{ + while (phead) + { + if (keylen == strlen(phead->name)) + if (strncmp(keyname, phead->name, keylen) == 0) + return phead; + phead = phead->pnext; + } + + return phead; +} + + +static void +free_keyword_list (keyword_type* phead) +{ + keyword_type* pnext; + while (phead) + { + pnext = phead->pnext; + free(phead->name); + free(phead->value); + free(phead); + phead = pnext; + } +} + + #define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_') static long -my_eval_variable (IfParser *ip, const char *var, int len) +my_eval_variable (IfParser *ip, const char *var, int len, const char *args) { long val; + char *newline = NULL; + int newline_len = 0, newline_offset = 0; struct symtab **s; s = lookup_variable (ip, var, len); if (!s) return 0; - do { - var = (*s)->s_value; - if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var)) - break; - s = lookup_variable (ip, var, strlen(var)); - } while (s); + + if ((*s)->s_args) + { + const char *psrc, *psrc_qualifier; + char *pdst; + const keyword_type *pkeyword; + keyword_type *pkeylist; + + newline_len = 64; /* start with some buffer, might increase later */ + newline = malloc(newline_len); + if (!newline) + { + fprintf(stderr, "out of memory in my_eval_variable\n"); + exit(1); + } + + /* build up a list that pairs keywords and args */ + pkeylist = build_keyword_list((*s)->s_args,args); + + /* parse for keywords in macro content */ + psrc = (*s)->s_value; + pdst = newline; + while (*psrc) + { + /* parse for next qualifier */ + psrc_qualifier = psrc; + while (isalnum(*psrc) || *psrc == '_') + psrc++; + + /* check if qualifier is in parameter keywords listing of macro */ + pkeyword = get_keyword_entry(pkeylist,psrc_qualifier,psrc - psrc_qualifier); + if (pkeyword) + { /* convert from parameter keyword to given argument */ + const char *ptmp = pkeyword->value; + while (*ptmp) + { + *pdst++ = *ptmp++; + newline_offset++; + if (newline_offset + 2 >= newline_len) + { + newline_len *= 2; + newline = realloc(newline, newline_len); + if (!newline) + { + fprintf(stderr, "out of memory in my_eval_variable\n"); + exit(1); + } + pdst = &newline[newline_offset]; + } + } + } + else + { /* perform post copy of qualifier that is not a parameter keyword */ + const char *ptmp = psrc_qualifier; + while (ptmp < psrc) + { + *pdst++ = *ptmp++; + newline_offset++; + if (newline_offset + 2 >= newline_len) + { + newline_len *= 2; + newline = realloc(newline, newline_len); + if (!newline) + { + fprintf(stderr, "out of memory in my_eval_variable\n"); + exit(1); + } + pdst = &newline[newline_offset]; + } + } + } + + /* duplicate chars that are not qualifier chars */ + while (!(isalnum(*psrc) || *psrc == '_' || *psrc == '\0')) + { + *pdst++ = *psrc++; + newline_offset++; + if (newline_offset + 2 >= newline_len) + { + newline_len *= 2; + newline = realloc(newline, newline_len); + if (!newline) + { + fprintf(stderr, "out of memory in my_eval_variable\n"); + exit(1); + } + pdst = &newline[newline_offset]; + } + } + } + + *pdst = '\0'; + free_keyword_list(pkeylist); + var = newline; + } + else + { + var = (*s)->s_value; + } var = ParseIfExpression(ip, var, &val); if (var && *var) debug(4, ("extraneous: '%s'\n", var)); + + if (newline) free(newline); + return val; } Index: xc/config/makedepend/def.h diff -u xc/config/makedepend/def.h:3.14 xc/config/makedepend/def.h:3.16 --- xc/config/makedepend/def.h:3.14 Fri Jan 17 12:09:49 2003 +++ xc/config/makedepend/def.h Wed Jun 9 15:00:09 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/makedepend/def.h,v 3.14 2003/01/17 17:09:49 tsi Exp $ */ +/* $XFree86: xc/config/makedepend/def.h,v 3.16 2004/06/09 19:00:09 tsi Exp $ */ #include "Xos.h" #include "Xfuncproto.h" @@ -48,39 +48,39 @@ #define MAXINCFILES 128 /* "-include" files */ #define MAXDIRS 64 #define SYMTABINC 10 /* must be > 1 for define() to work right */ -#define TRUE 1 -#define FALSE 0 +#define TRUE 1 +#define FALSE 0 /* the following must match the directives table in main.c */ -#define IF 0 -#define IFDEF 1 -#define IFNDEF 2 -#define ELSE 3 -#define ENDIF 4 -#define DEFINE 5 -#define UNDEF 6 -#define INCLUDE 7 -#define LINE 8 -#define PRAGMA 9 -#define ERROR 10 -#define IDENT 11 -#define SCCS 12 -#define ELIF 13 -#define EJECT 14 -#define WARNING 15 -#define INCLUDENEXT 16 -#define IFFALSE 17 /* pseudo value --- never matched */ -#define ELIFFALSE 18 /* pseudo value --- never matched */ -#define INCLUDEDOT 19 /* pseudo value --- never matched */ -#define IFGUESSFALSE 20 /* pseudo value --- never matched */ -#define ELIFGUESSFALSE 21 /* pseudo value --- never matched */ -#define INCLUDENEXTDOT 22 /* pseudo value --- never matched */ +#define IF 0 +#define IFDEF 1 +#define IFNDEF 2 +#define ELSE 3 +#define ENDIF 4 +#define DEFINE 5 +#define UNDEF 6 +#define INCLUDE 7 +#define LINE 8 +#define PRAGMA 9 +#define ERROR 10 +#define IDENT 11 +#define SCCS 12 +#define ELIF 13 +#define EJECT 14 +#define WARNING 15 +#define INCLUDENEXT 16 +#define IFFALSE 17 /* pseudo value --- never matched */ +#define ELIFFALSE 18 /* pseudo value --- never matched */ +#define INCLUDEDOT 19 /* pseudo value --- never matched */ +#define IFGUESSFALSE 20 /* pseudo value --- never matched */ +#define ELIFGUESSFALSE 21 /* pseudo value --- never matched */ +#define INCLUDENEXTDOT 22 /* pseudo value --- never matched */ #ifdef DEBUG extern int _debugmask; /* * debug levels are: - * + * * 0 show ifn*(def)*,endif * 1 trace defined/!defined * 2 show #include @@ -89,7 +89,7 @@ */ #define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; } #else -#define debug(level,arg) /**/ +#define debug(level,arg) /**/ #endif /* DEBUG */ typedef unsigned char boolean; @@ -97,6 +97,7 @@ struct symtab { char *s_name; char *s_value; + char *s_args; }; /* possible i_flag */ @@ -105,8 +106,7 @@ #define MARKED (1<<2) /* whether it's in the makefile */ #define SEARCHED (1<<3) /* whether we have read this */ #define FINISHED (1<<4) /* whether we are done reading this */ -#define INCLUDED_SYM (1<<5) /* whether #include SYMBOL was found - Can't use i_list if TRUE */ + struct inclist { char *i_incstring; /* string from #include line */ char *i_file; /* path name of the include file */ @@ -138,7 +138,7 @@ #endif /* macII */ char *copy(char *str); -int match(char *str, char **list); +int match(char *str, char **list); char *base_name(char *file); char *getnextline(struct filepointer *fp); struct symtab **slookup(char *symbol, struct inclist *file); @@ -147,36 +147,36 @@ struct symtab **fdefined(char *symbol, struct inclist *file, struct inclist **srcfile); struct filepointer *getfile(char *file); -void included_by(struct inclist *ip, +void included_by(struct inclist *ip, struct inclist *newfile); struct inclist *newinclude(char *newfile, char *incstring); -void inc_clean (void); +void inc_clean(void); struct inclist *inc_path(char *file, char *include, int type); -void freefile(struct filepointer *fp); +void freefile(struct filepointer *fp); -void define2(char *name, char *val, struct inclist *file); -void define(char *def, struct inclist *file); -void undefine(char *symbol, struct inclist *file); -int find_includes(struct filepointer *filep, - struct inclist *file, - struct inclist *file_red, +void define2(char *name, char *args, char *val, + struct inclist *file); +void define(char *def, struct inclist *file); +void undefine(char *symbol, struct inclist *file); +int find_includes(struct filepointer *filep, + struct inclist *file, + struct inclist *file_red, int recursion, boolean failOK); -void recursive_pr_include(struct inclist *head, +void recursive_pr_include(struct inclist *head, char *file, char *base); -void add_include(struct filepointer *filep, - struct inclist *file, - struct inclist *file_red, +void add_include(struct filepointer *filep, + struct inclist *file, + struct inclist *file_red, char *include, int type, boolean failOK); -int cppsetup(char *filename, +int cppsetup(char *filename, char *line, struct filepointer *filep, struct inclist *inc); - extern void fatalerr(char *, ...); extern void warning(char *, ...); extern void warning1(char *, ...); Index: xc/config/makedepend/ifparser.c diff -u xc/config/makedepend/ifparser.c:3.11 xc/config/makedepend/ifparser.c:3.12 --- xc/config/makedepend/ifparser.c:3.11 Sun Sep 22 21:48:08 2002 +++ xc/config/makedepend/ifparser.c Fri Mar 5 11:02:58 2004 @@ -2,7 +2,7 @@ * $Xorg: ifparser.c,v 1.3 2000/08/17 19:41:50 cpqbld Exp $ * * Copyright 1992 Network Computing Devices, Inc. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that @@ -12,7 +12,7 @@ * without specific, written prior permission. Network Computing Devices makes * no representations about the suitability of this software for any purpose. * It is provided ``as is'' without express or implied warranty. - * + * * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL, @@ -20,46 +20,47 @@ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. - * + * * Author: Jim Fulton * Network Computing Devices, Inc. - * + * * Simple if statement processor * * This module can be used to evaluate string representations of C language * if constructs. It accepts the following grammar: - * + * * EXPRESSION := VALUE - * | VALUE BINOP EXPRESSION + * | VALUE BINOP EXPRESSION * | VALUE '?' EXPRESSION ':' EXPRESSION - * + * * VALUE := '(' EXPRESSION ')' - * | '!' VALUE - * | '-' VALUE - * | '+' VALUE + * | '!' VALUE + * | '-' VALUE + * | '+' VALUE * | '~' VALUE - * | 'defined' '(' variable ')' - * | 'defined' variable + * | 'defined' '(' variable_name ')' + * | 'defined' variable_name * | # variable '(' variable-list ')' - * | variable - * | number - * + * | variable(arglist) + * | variable + * | number + * * BINOP := '*' | '/' | '%' - * | '+' | '-' - * | '<<' | '>>' - * | '<' | '>' | '<=' | '>=' - * | '==' | '!=' - * | '&' | '^' | '|' - * | '&&' | '||' - * + * | '+' | '-' + * | '<<' | '>>' + * | '<' | '>' | '<=' | '>=' + * | '==' | '!=' + * | '&' | '^' | '|' + * | '&&' | '||' + * * The normal C order of precedence is supported. - * - * + * + * * External Entry Points: - * + * * ParseIfExpression parse a string for #if */ -/* $XFree86: xc/config/makedepend/ifparser.c,v 3.11 2002/09/23 01:48:08 tsi Exp $ */ +/* $XFree86: xc/config/makedepend/ifparser.c,v 3.12 2004/03/05 16:02:58 tsi Exp $ */ #include "ifparser.h" #include @@ -77,16 +78,53 @@ static const char * -parse_variable (IfParser *g, const char *cp, const char **varp) +parse_variable_name (IfParser *g, const char *cp, const char **varp, int *varlenp) { + *varlenp = 0; + SKIPSPACE (cp); + if (!isvarfirstletter(*cp)) + return CALLFUNC(g, handle_error) (g, cp, "variable name"); + + *varp = cp; + for (cp++; isalnum(*cp) || *cp == '_'; cp++) /* EMPTY */; + *varlenp = cp - *varp; + + return cp; +} + + +static const char * +parse_variable (IfParser *g, const char *cp, const char **varp, int *varlenp, const char **argsp) +{ + *argsp = NULL; + *varlenp = 0; + + SKIPSPACE (cp); + + /* this error handling call might prevent us from merging with above code */ if (!isvarfirstletter (*cp)) return CALLFUNC(g, handle_error) (g, cp, "variable name"); *varp = cp; - /* EMPTY */ - for (cp++; isalnum(*cp) || *cp == '_'; cp++) ; + for (cp++; isalnum(*cp) || *cp == '_'; cp++) /* EMPTY */; + *varlenp = cp - *varp; + + if (variable_has_args(g, *varp, *varlenp)) + { + SKIPSPACE (cp); + if (*cp != '(') + { + return CALLFUNC(g, handle_error) (g, cp, "argument list"); + } + cp++; + + *argsp = cp; + for (cp++; *cp != ')'; cp++) /* EMPTY */; + cp++; + } + return cp; } @@ -171,7 +209,8 @@ static const char * parse_value (IfParser *g, const char *cp, long *valp) { - const char *var, *varend; + const char *var, *args; + int varlen; *valp = 0; @@ -183,7 +222,7 @@ case '(': DO (cp = ParseIfExpression (g, cp + 1, valp)); SKIPSPACE (cp); - if (*cp != ')') + if (*cp != ')') return CALLFUNC(g, handle_error) (g, cp, ")"); return cp + 1; /* skip the right paren */ @@ -208,12 +247,12 @@ return cp; case '#': - DO (cp = parse_variable (g, cp + 1, &var)); + DO (cp = parse_variable (g, cp + 1, &var, &varlen, &args)); SKIPSPACE (cp); if (*cp != '(') return CALLFUNC(g, handle_error) (g, cp, "("); do { - DO (cp = parse_variable (g, cp + 1, &var)); + DO (cp = parse_variable (g, cp + 1, &var, &varlen, &args)); SKIPSPACE (cp); } while (*cp && *cp != ')'); if (*cp != ')') @@ -230,7 +269,6 @@ case 'd': if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) { int paren = 0; - int len; cp += 7; SKIPSPACE (cp); @@ -238,43 +276,31 @@ paren = 1; cp++; } - DO (cp = parse_variable (g, cp, &var)); - len = cp - var; + DO (cp = parse_variable_name (g, cp, &var, &varlen)); SKIPSPACE (cp); if (paren && *cp != ')') return CALLFUNC(g, handle_error) (g, cp, ")"); - *valp = (*(g->funcs.eval_defined)) (g, var, len); + *valp = (*(g->funcs.eval_defined)) (g, var, varlen); return cp + paren; /* skip the right paren */ } /* fall out */ } if (isdigit(*cp)) { + /* determine the numeric value */ DO (cp = parse_number (g, cp, valp)); - } else if (!isvarfirstletter(*cp)) - return CALLFUNC(g, handle_error) (g, cp, "variable or number"); + } else if (isvarfirstletter(*cp)) { + /* resolve the value of this macro. + * (macro argument substitution will take place + * and recursive macro resolvement will apply) */ + DO (cp = parse_variable (g, cp, &var, &varlen, &args)); + *valp = (*(g->funcs.eval_variable)) (g, var, varlen, args); + } else { - DO (cp = parse_variable (g, cp, &var)); - varend = cp; - SKIPSPACE(cp); - if (*cp != '(') { - *valp = (*(g->funcs.eval_variable)) (g, var, varend - var); - } else { - do { - long dummy; - DO (cp = ParseIfExpression (g, cp + 1, &dummy)); - SKIPSPACE(cp); - if (*cp == ')') - break; - if (*cp != ',') - return CALLFUNC(g, handle_error) (g, cp, ","); - } while (1); - - *valp = 1; /* XXX */ - cp++; - } + /* we finally got something that does not fit the syntax rules */ + return CALLFUNC(g, handle_error) (g, cp, "variable or number"); } - + return cp; } Index: xc/config/makedepend/ifparser.h diff -u xc/config/makedepend/ifparser.h:3.5 xc/config/makedepend/ifparser.h:3.6 --- xc/config/makedepend/ifparser.h:3.5 Wed Jul 25 11:04:40 2001 +++ xc/config/makedepend/ifparser.h Fri Mar 5 11:02:58 2004 @@ -2,7 +2,7 @@ * $Xorg: ifparser.h,v 1.3 2000/08/17 19:41:51 cpqbld Exp $ * * Copyright 1992 Network Computing Devices, Inc. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that @@ -12,7 +12,7 @@ * without specific, written prior permission. Network Computing Devices makes * no representations about the suitability of this software for any purpose. * It is provided ``as is'' without express or implied warranty. - * + * * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL, @@ -20,44 +20,19 @@ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. - * + * * Author: Jim Fulton * Network Computing Devices, Inc. - * - * Simple if statement processor * - * This module can be used to evaluate string representations of C language - * if constructs. It accepts the following grammar: - * - * EXPRESSION := VALUE - * | VALUE BINOP EXPRESSION - * | VALUE '?' EXPRESSION ':' EXPRESSION - * - * VALUE := '(' EXPRESSION ')' - * | '!' VALUE - * | '-' VALUE - * | '~' VALUE - * | 'defined' '(' variable ')' - * | variable - * | number - * - * BINOP := '*' | '/' | '%' - * | '+' | '-' - * | '<<' | '>>' - * | '<' | '>' | '<=' | '>=' - * | '==' | '!=' - * | '&' | '^' | '|' - * | '&&' | '||' - * - * The normal C order of precedence is supported. - * - * + * Simple if statement processor. Please see ifparser.c for the parsing tree. + * + * * External Entry Points: - * + * * ParseIfExpression parse a string for #if */ -/* $XFree86: xc/config/makedepend/ifparser.h,v 3.5 2001/07/25 15:04:40 dawes Exp $ */ +/* $XFree86: xc/config/makedepend/ifparser.h,v 3.6 2004/03/05 16:02:58 tsi Exp $ */ #include @@ -69,15 +44,17 @@ struct { /* functions */ const char *(*handle_error) (struct _if_parser *, const char *, const char *); - long (*eval_variable) (struct _if_parser *, const char *, int); + long (*eval_variable) (struct _if_parser *, const char *, int, + const char *); int (*eval_defined) (struct _if_parser *, const char *, int); } funcs; char *data; } IfParser; const char *ParseIfExpression ( - IfParser *, - const char *, + IfParser *, + const char *, long * ); +extern int variable_has_args(IfParser *ip, const char *var, int len); Index: xc/config/makedepend/include.c diff -u xc/config/makedepend/include.c:3.7 xc/config/makedepend/include.c:3.8 --- xc/config/makedepend/include.c:3.7 Fri Dec 14 14:53:20 2001 +++ xc/config/makedepend/include.c Wed Jun 9 15:00:09 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/makedepend/include.c,v 3.7 2001/12/14 19:53:20 dawes Exp $ */ +/* $XFree86: xc/config/makedepend/include.c,v 3.8 2004/06/09 19:00:09 tsi Exp $ */ #include "def.h" @@ -196,22 +196,12 @@ for (i=0; ii_listlen; i++) if (ip->i_list[ i ] == newfile) { i = strlen(newfile->i_file); - if (!(ip->i_flags & INCLUDED_SYM) && - !(i > 2 && - newfile->i_file[i-1] == 'c' && - newfile->i_file[i-2] == '.')) - { - /* only bitch if ip has */ - /* no #include SYMBOL lines */ - /* and is not a .c file */ - if (warn_multiple) - { - warning("%s includes %s more than once!\n", - ip->i_file, newfile->i_file); - warning1("Already have\n"); - for (i=0; ii_listlen; i++) - warning1("\t%s\n", ip->i_list[i]->i_file); - } + if (warn_multiple) { + warning("%s includes %s more than once!\n", + ip->i_file, newfile->i_file); + warning1("Already have\n"); + for (i=0; ii_listlen; i++) + warning1("\t%s\n", ip->i_list[i]->i_file); } return; } @@ -251,8 +241,7 @@ ip = inclistnext; for (; ip->i_file; ip++) { - if ((strcmp(ip->i_incstring, include) == 0) && - !(ip->i_flags & INCLUDED_SYM)) { + if (strcmp(ip->i_incstring, include) == 0) { inclistnext = ip + 1; return ip; } Index: xc/config/makedepend/main.c diff -u xc/config/makedepend/main.c:3.32 xc/config/makedepend/main.c:3.34 --- xc/config/makedepend/main.c:3.32 Wed Mar 26 15:43:48 2003 +++ xc/config/makedepend/main.c Sat Mar 13 18:52:23 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/makedepend/main.c,v 3.32 2003/03/26 20:43:48 tsi Exp $ */ +/* $XFree86: xc/config/makedepend/main.c,v 3.34 2004/03/13 23:52:23 tsi Exp $ */ #include "def.h" #ifdef hpux @@ -112,7 +112,7 @@ boolean verbose = FALSE; boolean show_where_not = FALSE; /* Warn on multiple includes of same file */ -boolean warn_multiple = FALSE; +boolean warn_multiple = FALSE; static void setfile_cmdinc(struct filepointer *filep, long count, char **list); static void redirect(char *line, char *makefile); @@ -162,7 +162,7 @@ while (psymp->s_name) { - define2(psymp->s_name, psymp->s_value, &maininclist); + define2(psymp->s_name, NULL, psymp->s_value, &maininclist); psymp++; } if (argc == 2 && argv[1][0] == '@') { @@ -213,7 +213,7 @@ argv = nargv; } for(argc--, argv++; argc; argc--, argv++) { - /* if looking for endmarker then check before parsing */ + /* if looking for endmarker then check before parsing */ if (endmarker && strcmp (endmarker, *argv) == 0) { endmarker = NULL; continue; @@ -271,6 +271,7 @@ /* do not use if endmarker processing */ case 'a': if (endmarker) break; + if (argv[0][2]) goto badopt; append = TRUE; break; case 'w': @@ -278,7 +279,8 @@ if (argv[0][2] == '\0') { argv++; argc--; - width = atoi(argv[0]); + if (argv[0]) + width = atoi(argv[0]); } else width = atoi(argv[0]+2); break; @@ -329,9 +331,11 @@ break; case 'm': + if (endmarker) break; + if (argv[0][2]) goto badopt; warn_multiple = TRUE; break; - + /* Ignore -O, -g so we can just pass ${CFLAGS} to makedepend */ @@ -351,7 +355,7 @@ buf = malloc(strlen(DASH_INC_PRE) + strlen(argv[0]) + strlen(DASH_INC_POST) + 1); - if(!buf) + if (!buf) fatalerr("out of memory at " "-include string\n"); cmdinc_list[2 * cmdinc_count + 0] = argv[0]; @@ -362,8 +366,10 @@ /* intentional fall through */ default: if (endmarker) break; - /* fatalerr("unknown opt = %s\n", argv[0]); */ + badopt: + /* fatalerr("unknown option = %s\n", argv[0]); */ warning("ignoring option %s\n", argv[0]); + break; } } /* Now do the undefs from the command line */ @@ -388,7 +394,7 @@ for (;;) { end = (char*)strchr(beg,';'); if (end) *end = 0; - if (incp >= includedirs + MAXDIRS) + if (incp >= includedirs + MAXDIRS) fatalerr("Too many include dirs\n"); *incp++ = beg; if (!end) break; @@ -509,7 +515,7 @@ /* * eliminate \r chars from file */ -static int +static int elim_cr(char *buf, int sz) { int i,wp; @@ -633,7 +639,7 @@ } whitespace = TRUE; } - + if (*p == '/' && (p+1) < eof && *(p+1) == '*') { /* Consume C comments */ *(p++) = ' '; @@ -661,7 +667,7 @@ lineno++; } else if (*p == '?' && (p+3) < eof && - *(p+1) == '?' && + *(p+1) == '?' && *(p+2) == '/' && *(p+3) == '\n') { *(p++) = ' '; @@ -697,7 +703,7 @@ *(p++) = '\0'; /* punt lines with just # (yacc generated) */ - for (cp = bol+1; + for (cp = bol+1; *cp && (*cp == ' ' || *cp == '\t'); cp++); if (*cp) goto done; --p; @@ -817,7 +823,7 @@ #if defined(USGISH) || defined(_SEQUENT_) || defined(USE_CHMOD) chmod(makefile, st.st_mode); #else - fchmod(fileno(fdout), st.st_mode); + fchmod(fileno(fdout), st.st_mode); #endif /* USGISH */ } Index: xc/config/makedepend/mkdepend.man diff -u xc/config/makedepend/mkdepend.man:1.7 xc/config/makedepend/mkdepend.man:1.8 --- xc/config/makedepend/mkdepend.man:1.7 Fri Dec 13 21:39:45 2002 +++ xc/config/makedepend/mkdepend.man Thu Feb 10 22:02:53 2005 @@ -23,9 +23,9 @@ .\" dealing in this Software without prior written authorization from The .\" Open Group. .\" -.\" $XFree86: xc/config/makedepend/mkdepend.man,v 1.7 2002/12/14 02:39:45 dawes Exp $ +.\" $XFree86: xc/config/makedepend/mkdepend.man,v 1.8 2005/02/11 03:02:53 dawes Exp $ .\" -.TH MAKEDEPEND 1 __xorgversion__ +.TH MAKEDEPEND 1 __vendorversion__ .UC 4 .SH NAME makedepend \- create dependencies in makefiles Index: xc/config/makedepend/parse.c diff -u xc/config/makedepend/parse.c:1.12 xc/config/makedepend/parse.c:1.16 --- xc/config/makedepend/parse.c:1.12 Tue Feb 26 00:09:10 2002 +++ xc/config/makedepend/parse.c Fri Jun 25 17:00:09 2004 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/config/makedepend/parse.c,v 1.12 2002/02/26 05:09:10 tsi Exp $ */ +/* $XFree86: xc/config/makedepend/parse.c,v 1.16 2004/06/25 21:00:09 tsi Exp $ */ #include "def.h" @@ -61,7 +61,7 @@ (type == ELIFGUESSFALSE)) type = gobble(filep, file, file_red); if (type == ELSE) - (void)gobble(filep, file, file_red); + (void)gobble(filep, file, file_red); break; case ELSE: case ENDIF: @@ -101,8 +101,8 @@ /* * Decide what type of # directive this line is. */ -static int -deftype (char *line, struct filepointer *filep, +static int +deftype (char *line, struct filepointer *filep, struct inclist *file_red, struct inclist *file, int parse_it) { register char *p; @@ -202,7 +202,7 @@ if (!*p || *p == '"' || *p == '<') break; - sym = isdefined(p, file_red, NULL); + sym = isdefined(p, file_red, NULL); if (!sym) break; @@ -211,8 +211,6 @@ file->i_incstring, (*sym) -> s_name, (*sym) -> s_value)); - /* mark file as having included a 'soft include' */ - file->i_flags |= INCLUDED_SYM; } /* @@ -322,7 +320,7 @@ } void -define2(char *name, char *val, struct inclist *file) +define2(char *name, char *args, char *val, struct inclist *file) { int first, last, below; register struct symtab **sp = NULL, **dest; @@ -359,14 +357,14 @@ if (s2[-1] == '\0') break; /* If exact match, set sp and break */ - if (*--s1 == *--s2) + if (*--s1 == *--s2) { sp = file->i_defs + middle; break; } /* If name > i_defs[middle] ... */ - if (*s1 > *s2) + if (*s1 > *s2) { below = first; first = middle + 1; @@ -379,11 +377,19 @@ } /* Search is done. If we found an exact match to the symbol name, - just replace its s_value */ + just replace its s_args and s_value if they are changed */ if (sp != NULL) { debug(1,("redefining %s from %s to %s in file %s\n", name, (*sp)->s_value, val, file->i_file)); + + if ( (*sp)->s_args ) + free((*sp)->s_args); + if (args) + (*sp)->s_args = copy(args); + else + (*sp)->s_args = NULL; + free((*sp)->s_value); (*sp)->s_value = copy(val); return; @@ -402,6 +408,10 @@ debug(1,("defining %s to %s in file %s\n", name, val, file->i_file)); stab->s_name = copy(name); + if (args) + stab->s_args = copy(args); + else + stab->s_args = NULL; stab->s_value = copy(val); *sp = stab; } @@ -409,29 +419,112 @@ void define(char *def, struct inclist *file) { +#define S_ARGS_BUFLEN 1024 /* we dont expect too much macro parameters usage */ +static char args[S_ARGS_BUFLEN]; + char *val; + char *p_args = args; + int fix_args = 0, var_args = 0, loop = 1; + char *p_tmp; + + args[0] = '\0'; /* Separate symbol name and its value */ val = def; while (isalnum(*val) || *val == '_') val++; + + if (*val == '(') /* is this macro definition with parameters? */ + { + *val++ = '\0'; + + do /* parse the parameter list */ + { + while (*val == ' ' || *val == '\t') + val++; + + /* extract next parameter name */ + if (*val == '.') + { /* it should be the var-args parameter: "..." */ + var_args++; + p_tmp = p_args; + while (*val == '.') + { + *p_args++ = *val++; + if (p_args >= &args[S_ARGS_BUFLEN-1]) + fatalerr("args buffer full failure in insert_defn()\n"); + } + *p_args = '\0'; + if (strcmp(p_tmp,"...")!=0) + { + fprintf(stderr, "unrecognized qualifier, should be \"...\" for-args\n"); + } + } + else + { /* regular parameter name */ + fix_args++; + while (isalnum(*val) || *val == '_') + { + *p_args++ = *val++; + if (p_args >= &args[S_ARGS_BUFLEN-1]) + fatalerr("args buffer full failure in insert_defn()\n"); + } + } + while (*val == ' ' || *val == '\t') + val++; + + if (*val == ',') + { + if (var_args) + { + fprintf(stderr, "there are more arguments after the first var-args qualifier\n"); + } + + *p_args++ = ','; /* we are using the , as a reserved char */ + if (p_args >= &args[S_ARGS_BUFLEN-1]) + fatalerr("args buffer full failure in insert_defn()\n"); + val++; + } + else + if (*val == ')') + { + *p_args = '\0'; + val++; + loop=0; + } + else + if (*val != '.') + { + fprintf(stderr, "trailing ) on macro arguments missing\n"); + loop=0; + } + } while (loop); + } + if (*val) *val++ = '\0'; while (*val == ' ' || *val == '\t') val++; - if (!*val) + if (!*val) /* define statements without a value will get a value of 1 */ val = "1"; - define2(def, val, file); + + if (args && (strlen(args)>0)) + define2(def, args, val, file); + else + define2(def, NULL, val, file); } struct symtab ** slookup(char *symbol, struct inclist *file) { - register int first = 0; - register int last = file->i_ndefs - 1; + register int first = 0, last; - if (file) while (last >= first) + if (!file) + return NULL; + + last = file->i_ndefs - 1; + while (last >= first) { /* Fast inline binary search */ register char *s1; @@ -442,29 +535,30 @@ s1 = symbol; s2 = file->i_defs[middle]->s_name; while (*s1++ == *s2++) - if (s2[-1] == '\0') break; + if (s2[-1] == '\0') break; /* If exact match, we're done */ - if (*--s1 == *--s2) + if (*--s1 == *--s2) { - return file->i_defs + middle; + return file->i_defs + middle; } /* If symbol > i_defs[middle] ... */ - if (*s1 > *s2) + if (*s1 > *s2) { - first = middle + 1; + first = middle + 1; } /* else ... */ else { - last = middle - 1; + last = middle - 1; } } - return(NULL); + + return NULL; } -static int +static int merge2defines(struct inclist *file1, struct inclist *file2) { int i; @@ -477,59 +571,59 @@ if (file2->i_merged[i]==FALSE) return 0; - { + { /* local var encapsulation */ int first1 = 0; int last1 = file1->i_ndefs - 1; int first2 = 0; int last2 = file2->i_ndefs - 1; - int first=0; - struct symtab** i_defs = NULL; + int first=0; + struct symtab** i_defs = NULL; int deflen=file1->i_ndefs+file2->i_ndefs; debug(2,("merging %s into %s\n", file2->i_file, file1->i_file)); - if (deflen>0) - { - /* make sure deflen % SYMTABINC == 0 is still true */ - deflen += (SYMTABINC - deflen % SYMTABINC) % SYMTABINC; - i_defs=(struct symtab**) + if (deflen>0) + { + /* make sure deflen % SYMTABINC == 0 is still true */ + deflen += (SYMTABINC - deflen % SYMTABINC) % SYMTABINC; + i_defs=(struct symtab**) malloc(deflen*sizeof(struct symtab*)); - if (i_defs==NULL) return 0; - } + if (i_defs==NULL) return 0; + } + + while ((last1 >= first1) && (last2 >= first2)) + { + char *s1=file1->i_defs[first1]->s_name; + char *s2=file2->i_defs[first2]->s_name; + + if (strcmp(s1,s2) < 0) + i_defs[first++]=file1->i_defs[first1++]; + else if (strcmp(s1,s2) > 0) + i_defs[first++]=file2->i_defs[first2++]; + else /* equal */ + { + i_defs[first++]=file2->i_defs[first2++]; + first1++; + } + } + while (last1 >= first1) + { + i_defs[first++]=file1->i_defs[first1++]; + } + while (last2 >= first2) + { + i_defs[first++]=file2->i_defs[first2++]; + } + + if (file1->i_defs) free(file1->i_defs); + file1->i_defs=i_defs; + file1->i_ndefs=first; - while ((last1 >= first1) && (last2 >= first2)) - { - char *s1=file1->i_defs[first1]->s_name; - char *s2=file2->i_defs[first2]->s_name; - - if (strcmp(s1,s2) < 0) - i_defs[first++]=file1->i_defs[first1++]; - else if (strcmp(s1,s2) > 0) - i_defs[first++]=file2->i_defs[first2++]; - else /* equal */ - { - i_defs[first++]=file2->i_defs[first2++]; - first1++; - } - } - while (last1 >= first1) - { - i_defs[first++]=file1->i_defs[first1++]; - } - while (last2 >= first2) - { - i_defs[first++]=file2->i_defs[first2++]; - } - - if (file1->i_defs) free(file1->i_defs); - file1->i_defs=i_defs; - file1->i_ndefs=first; - return 1; - } + } } void @@ -546,7 +640,7 @@ } int -find_includes(struct filepointer *filep, struct inclist *file, +find_includes(struct filepointer *filep, struct inclist *file, struct inclist *file_red, int recursion, boolean failOK) { struct inclist *inclistp; @@ -587,8 +681,11 @@ break; case IFDEF: case IFNDEF: - if ((type == IFDEF && isdefined(line, file_red, NULL)) - || (type == IFNDEF && !isdefined(line, file_red, NULL))) { + { + int isdef = (isdefined(line, file_red, NULL) != NULL); + if (type == IFNDEF) isdef = !isdef; + + if (isdef) { debug(1,(type == IFNDEF ? "line %d: %s !def'd in %s via %s%s\n" : "", filep->f_line, line, @@ -610,11 +707,12 @@ find_includes(filep, file, file_red, recursion+1, failOK); else if (type == ELIF) - goto doif; + goto doif; else if (type == ELIFFALSE || type == ELIFGUESSFALSE) - goto doiffalse; + goto doiffalse; } - break; + } + break; case ELSE: case ELIFFALSE: case ELIFGUESSFALSE: @@ -652,13 +750,13 @@ break; case ERROR: case WARNING: - warning("%s", file_red->i_file); + warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); warning1(", line %d: %s\n", filep->f_line, line); - break; - + break; + case PRAGMA: case IDENT: case SCCS: Index: xc/config/pswrap/lexer.l diff -u xc/config/pswrap/lexer.l:1.11 xc/config/pswrap/lexer.l:1.12 --- xc/config/pswrap/lexer.l:1.11 Fri May 31 12:31:21 2002 +++ xc/config/pswrap/lexer.l Sun Jan 30 12:48:43 2005 @@ -36,7 +36,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/config/pswrap/lexer.l,v 1.11 2002/05/31 16:31:21 dawes Exp $ */ +/* $XFree86: xc/config/pswrap/lexer.l,v 1.12 2005/01/30 17:48:43 tsi Exp $ */ #include #include @@ -186,20 +186,6 @@ } } -^defineps { /* part of string text */ - register int i = yyleng; - register unsigned char *c = (unsigned char *) yytext; - - if (yyleng + curleng >= maxstring) { - stringerr(1); - BEGIN PS; - *sbody = '\0'; - return PSSTRING; - } - curleng += yyleng; - for (; i > 0; --i) *sbody++ = *c++; -} - endps { /* BOGUS end of a wrap */ if (nonComment) { ErrIntro(yylineno); Index: xc/config/pswrap/pswfile.c diff -u xc/config/pswrap/pswfile.c:1.6 xc/config/pswrap/pswfile.c:1.7 --- xc/config/pswrap/pswfile.c:1.6 Tue May 27 18:26:20 2003 +++ xc/config/pswrap/pswfile.c Sat Apr 3 17:38:51 2004 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/config/pswrap/pswfile.c,v 1.6 2003/05/27 22:26:20 tsi Exp $ */ +/* $XFree86: xc/config/pswrap/pswfile.c,v 1.7 2004/04/03 22:38:51 tsi Exp $ */ #include #include "pswversion.h" @@ -49,7 +49,7 @@ { fprintf(f,"/* %s generated from %s\n",outfname,infname); fprintf(f," by %s %s %s\n */\n\n",PSW_OS,prog,PSW_VERSION); - return 4; /* number of output lines */ + return 3; /* number of output lines */ } void InitHFile(void) @@ -77,11 +77,14 @@ #endif /* __MACH__ */ printf("#include %s\n", FRIENDSFILE); printf("#include \n"); + printf("#include \"%s\"\n", hfile); outlineno += 3; /* UPDATE this if you add more prolog */ if (special_h) { - printf("#include \"%s\"\n\n", special_h); - outlineno ++; + printf("#include \"%s\"\n", special_h); + outlineno++; } + printf("\n"); + outlineno++; printf("#line 1 \"%s\"\n",ifile); outlineno++; } Index: xc/config/util/ccmakedep.man diff -u xc/config/util/ccmakedep.man:1.1 xc/config/util/ccmakedep.man:1.2 --- xc/config/util/ccmakedep.man:1.1 Sat Oct 12 12:06:40 2002 +++ xc/config/util/ccmakedep.man Thu Feb 10 22:02:53 2005 @@ -1,4 +1,4 @@ -.TH ccmakedep 1 __xorgversion__ +.TH ccmakedep 1 __vendorversion__ .SH NAME ccmakedep \- create dependencies in makefiles using a C compiler .SH SYNOPSIS Index: xc/config/util/cleanlinks.sh diff -u xc/config/util/cleanlinks.sh:1.3 xc/config/util/cleanlinks.sh:1.4 --- xc/config/util/cleanlinks.sh:1.3 Fri Feb 13 18:58:28 2004 +++ xc/config/util/cleanlinks.sh Tue Oct 19 12:49:11 2004 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright © 2000, 2003 by The XFree86 Project, Inc +# Copyright © 2000, 2003, 2004 by The XFree86 Project, Inc # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining @@ -50,14 +50,15 @@ # # Author: David Dawes # -# $XFree86: xc/config/util/cleanlinks.sh,v 1.3 2004/02/13 23:58:28 dawes Exp $ +# $XFree86: xc/config/util/cleanlinks.sh,v 1.4 2004/10/19 16:49:11 dawes Exp $ +echo Removing dangling symbolic links ... find . -type l -print | ( read i while [ X"$i" != X ]; do if [ ! -f "$i" ]; then - echo $i is a dangling symlink, removing + echo $i rm -f "$i" fi read i @@ -65,6 +66,9 @@ ) echo Removing empty directories ... -#find . -type d -depth -print | xargs rmdir > /dev/null 2>&1 -find . -type d -depth -empty -print -exec rmdir {} \; +if find . -prune -print -empty > /dev/null 2>&1; then + find . -type d -depth -empty -print -exec rmdir {} \; +else + find . -type d -depth -exec rmdir {} \; -print 2>/dev/null +fi exit 0 Index: xc/config/util/lndir.man diff -u xc/config/util/lndir.man:1.5 xc/config/util/lndir.man:1.6 --- xc/config/util/lndir.man:1.5 Tue Jun 24 11:44:45 2003 +++ xc/config/util/lndir.man Thu Feb 10 22:02:53 2005 @@ -25,9 +25,9 @@ .\" from The Open Group. .\" .\" -.\" $XFree86: xc/config/util/lndir.man,v 1.5 2003/06/24 15:44:45 eich Exp $ +.\" $XFree86: xc/config/util/lndir.man,v 1.6 2005/02/11 03:02:53 dawes Exp $ .\" -.TH LNDIR 1 __xorgversion__ +.TH LNDIR 1 __vendorversion__ .SH NAME lndir \- create a shadow directory of symbolic links to another directory tree .SH SYNOPSIS Index: xc/config/util/makedef.cmd diff -u xc/config/util/makedef.cmd:1.5 xc/config/util/makedef.cmd:1.7 --- xc/config/util/makedef.cmd:1.5 Wed Jan 14 12:32:39 2004 +++ xc/config/util/makedef.cmd Sun Feb 6 20:38:23 2005 @@ -1,5 +1,5 @@ /* This is OS/2 REXX */ -/* $XFree86: xc/config/util/makedef.cmd,v 1.5 2004/01/14 17:32:39 dawes Exp $ +/* $XFree86: xc/config/util/makedef.cmd,v 1.7 2005/02/07 01:38:23 tsi Exp $ * * This file was taken from Odin32 project and modified to suit * XFree86 4.x build process @@ -22,13 +22,13 @@ sASDFeatureId = ''; sCountryCode = ''; sDateTime = left(' 'date()' 'time(), 26); -sDescription = 'XFree86 4.4'; +sDescription = 'XFree86 4.5'; sFixPakVer = ''; sHostname = strip(substr(VALUE('HOSTNAME',,'OS2ENVIRONMENT'), 1, 11)); sLanguageCode = ''; sMiniVer = ''; sVendor = 'XFree86'; -sVersion = '4.4.0'; +sVersion = '4.5.0'; /* @@ -181,7 +181,7 @@ rc = LoadDBFile(sDBFile,sLibrary) /* engage gcc to parse the corresponding -def.cpp file */ -'@gcc -E -D__UNIXOS2__ 'sLibrary'-def.cpp >tmpos2.def' +'@gcc -E -D__UNIXOS2__ -DHAS_SHM 'sLibrary'-def.cpp >tmpos2.def' /* Signature */ sEnhSign = '##1##' Index: xc/config/util/makeg.man diff -u xc/config/util/makeg.man:1.3 xc/config/util/makeg.man:1.4 --- xc/config/util/makeg.man:1.3 Fri Dec 14 14:53:22 2001 +++ xc/config/util/makeg.man Thu Feb 10 22:02:53 2005 @@ -24,9 +24,9 @@ .\" from The Open Group. .\" .\" -.\" $XFree86: xc/config/util/makeg.man,v 1.3 2001/12/14 19:53:22 dawes Exp $ +.\" $XFree86: xc/config/util/makeg.man,v 1.4 2005/02/11 03:02:53 dawes Exp $ .\" -.TH MAKEG 1 __xorgversion__ +.TH MAKEG 1 __vendorversion__ .SH NAME makeg \- make a debuggable executable .SH SYNOPSIS Index: xc/config/util/makestrs.man diff -u xc/config/util/makestrs.man:3.9 xc/config/util/makestrs.man:3.10 --- xc/config/util/makestrs.man:3.9 Thu May 29 17:48:03 2003 +++ xc/config/util/makestrs.man Thu Feb 10 22:02:53 2005 @@ -23,9 +23,9 @@ .\" dealing in this Software without prior written authorization from The .\" Open Group. .\" -.\" $XFree86: xc/config/util/makestrs.man,v 3.9 2003/05/29 21:48:03 herrb Exp $ +.\" $XFree86: xc/config/util/makestrs.man,v 3.10 2005/02/11 03:02:53 dawes Exp $ .\" -.TH MAKESTRS 1 __xorgversion__ +.TH MAKESTRS 1 __vendorversion__ .SH NAME makestrs \- makes string table C source and header(s) .SH SYNOPSIS Index: xc/config/util/mergelib.man diff -u xc/config/util/mergelib.man:1.2 xc/config/util/mergelib.man:1.3 --- xc/config/util/mergelib.man:1.2 Mon Apr 7 18:03:49 2003 +++ xc/config/util/mergelib.man Thu Feb 10 22:02:53 2005 @@ -1,7 +1,7 @@ -.\" $XFree86: xc/config/util/mergelib.man,v 1.2 2003/04/07 22:03:49 herrb Exp $ +.\" $XFree86: xc/config/util/mergelib.man,v 1.3 2005/02/11 03:02:53 dawes Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' -.TH MERGELIB 1 __xorgversion__ +.TH MERGELIB 1 __vendorversion__ .SH NAME mergelib \- merge one library into another .SH SYNOPSIS Index: xc/config/util/mkdirhier.man diff -u xc/config/util/mkdirhier.man:1.3 xc/config/util/mkdirhier.man:1.4 --- xc/config/util/mkdirhier.man:1.3 Fri Dec 14 14:53:22 2001 +++ xc/config/util/mkdirhier.man Thu Feb 10 22:02:53 2005 @@ -23,9 +23,9 @@ .\" dealing in this Software without prior written authorization from The .\" Open Group. .\" -.\" $XFree86: xc/config/util/mkdirhier.man,v 1.3 2001/12/14 19:53:22 dawes Exp $ +.\" $XFree86: xc/config/util/mkdirhier.man,v 1.4 2005/02/11 03:02:53 dawes Exp $ .\" -.TH MKDIRHIER 1 __xorgversion__ +.TH MKDIRHIER 1 __vendorversion__ .SH NAME mkdirhier \- makes a directory hierarchy .SH SYNOPSIS Index: xc/config/util/mkhtmlindex.pl diff -u xc/config/util/mkhtmlindex.pl:1.3 xc/config/util/mkhtmlindex.pl:1.5 --- xc/config/util/mkhtmlindex.pl:1.3 Sun Mar 18 09:49:01 2001 +++ xc/config/util/mkhtmlindex.pl Mon May 31 20:16:55 2004 @@ -1,8 +1,55 @@ #!/usr/bin/perl # -# $XFree86: xc/config/util/mkhtmlindex.pl,v 1.3 2001/03/18 14:49:01 dawes Exp $ +# $XFree86: xc/config/util/mkhtmlindex.pl,v 1.5 2004/06/01 00:16:55 dawes Exp $ # # Copyright © 2000,2001 by VA Linux Systems, Inc. +# Copyright © 2004 by David H. Dawes. +# +# Copyright (c) 2004 by The XFree86 Project, Inc. +# All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject +# to the following conditions: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions, and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution, and in the same place and form as other copyright, +# license and disclaimer information. +# +# 3. The end-user documentation included with the redistribution, +# if any, must include the following acknowledgment: "This product +# includes software developed by The XFree86 Project, Inc +# (http://www.xfree86.org/) and its contributors", in the same +# place and form as other third-party acknowledgments. Alternately, +# this acknowledgment may appear in the software itself, in the +# same form and location as other such third-party acknowledgments. +# +# 4. Except as contained in this notice, the name of The XFree86 +# Project, Inc shall not be used in advertising or otherwise to +# promote the sale, use or other dealings in this Software without +# prior written authorization from The XFree86 Project, Inc. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# # # Generate index files for HTML man pages. # @@ -53,19 +100,19 @@ EOF foreach $file (sort readdir dir) { - if ($file =~ "\.$vol\.html") { + if ($file =~ /\.$vol\.html/) { open(file, "<$dir/$file") || die "Can't open $dir/$file"; while () { chop; - if (/^

/) { - if (! /<\/H2>$/) { - while ( && ! /<\/H2>$/) { + if (/^

/i) { + if (! /<\/H2>$/i) { + while ( && ! /<\/H2>$/i) { ; } } $heading = ""; while () { - if (/^

/) { + if (/^

/i) { last; } $heading = "$heading" . "$_"; @@ -76,7 +123,7 @@ ($name, $descr) = split(/-/, $heading, 2); $file =~ /(.*)\.$vol\.html/; $fname = $1; - $descr =~ s/<[P]>//g; + $descr =~ s/<[Pp]>//g; print mindex "
  • $fname - $descr
  • "; } Index: xc/config/util/xmkmf.man diff -u xc/config/util/xmkmf.man:1.3 xc/config/util/xmkmf.man:1.4 --- xc/config/util/xmkmf.man:1.3 Fri Dec 14 14:53:22 2001 +++ xc/config/util/xmkmf.man Thu Feb 10 22:02:53 2005 @@ -23,9 +23,9 @@ .\" dealing in this Software without prior written authorization from The .\" Open Group. .\" -.\" $XFree86: xc/config/util/xmkmf.man,v 1.3 2001/12/14 19:53:22 dawes Exp $ +.\" $XFree86: xc/config/util/xmkmf.man,v 1.4 2005/02/11 03:02:53 dawes Exp $ .\" -.TH XMKMF 1 __xorgversion__ +.TH XMKMF 1 __vendorversion__ .SH NAME xmkmf \- create a Makefile from an Imakefile .SH SYNOPSIS Index: xc/doc/hardcopy/Xpm/Imakefile diff -u /dev/null xc/doc/hardcopy/Xpm/Imakefile:1.1 --- /dev/null Wed Mar 16 20:58:37 2005 +++ xc/doc/hardcopy/Xpm/Imakefile Sat Mar 12 18:54:51 2005 @@ -0,0 +1,8 @@ +XCOMM $XFree86: xc/doc/hardcopy/Xpm/Imakefile,v 1.1 2005/03/12 23:54:51 dawes Exp $ + +InstallHardcopyDoc(xpm,xpm.PS.gz) + +XPMDOCDIR = $(TOP)/extras/Xpm/doc + +LinkSourceFile(xpm.PS.gz,$(XPMDOCDIR)) + Index: xc/doc/man/Imakefile diff -u xc/doc/man/Imakefile:1.7 xc/doc/man/Imakefile:1.8 --- xc/doc/man/Imakefile:1.7 Wed Jan 17 11:57:38 2001 +++ xc/doc/man/Imakefile Wed Jun 30 16:21:36 2004 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/doc/man/Imakefile,v 1.7 2001/01/17 16:57:38 dawes Exp $ +XCOMM $XFree86: xc/doc/man/Imakefile,v 1.8 2004/06/30 20:21:36 martin Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -16,13 +16,16 @@ #if BuildGLULibrary GLUDIRS = GLU #endif +#if BuildDmxLibrary +DMXDIR = DMX +#endif #if InstallMiscManPages MISCDIR = misc #endif #if InstallLibManPages -LIBMANDIRS = X11 Xt Xext Xi Xau $(XVDIR) $(GLXDIRS) $(GLUDIRS) +LIBMANDIRS = X11 Xt Xext Xi Xau $(XVDIR) $(GLXDIRS) $(GLUDIRS) $(DMXDIR) #endif SUBDIRS = general $(LIBMANDIRS) $(MISCDIR) Index: xc/doc/man/DMX/DMX.man diff -u /dev/null xc/doc/man/DMX/DMX.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMX.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,79 @@ +.\" $XFree86: xc/doc/man/DMX/DMX.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMX 3X __vendorversion__ +.SH NAME +DMX \- X Window System DMX (Distributed Multihead X) extension +.SH DESCRIPTION +The DMX extension provides support for communication with and control of +.BR Xdmx (1) +server. Attributes of the +.BR Xdmx (1) +server and of the back-end screens attached to the server can be queried +and modified via this protocol. +.SH "SUMMARY OF LIBRARY FUNCTIONS" +The following is a summary of DMX library functions: +.sp +DMXQueryExtension(3X) \- determine if DMX is available +.sp +DMXQueryVersion(3X) \- determine DMX extension version +.sp +DMXSync(3X) \- flush protocol requests between +.BR Xdmx (1) +and back-end X servers +.sp +DMXForceWindowCreation(3X) \- force immediate back-end window creation +.sp +DMXGetScreenCount(3X) \- determine number of back-end screens +.sp +DMXGetScreenAttributes(3X) \- determine back-end screen attributes +.sp +DMXChangeScreensAttributes(3X) \- change back-end screen attributes +.sp +DMXAddScreen(3X) \- attach a new back-end screen +.sp +DMXRemoveScreen(3X) \- detach a back-end screen +.sp +DMXGetWindowAttributes(3X) \- determine back-end window attributes +.sp +DMXGetDesktopAttributes(3X) \- determine global bounding box +.sp +DMXChangeDesktopAttributes(3X) \- change global bounding box +.sp +DMXGetInputCount(3X) \- determine number of input devices +.sp +DMXGetInputAttributes(3X) \- determine input device attributes +.sp +DMXAddInput(3X) \- attach a new backend or console input +.sp +DMXRemoveInput(3X) \- detach an input +.sp +DMXAddBackendInput(3X) \- attach a new back-end input +.sp +DMXAddConsoleInput(3X) \- attach a new console input +.PP +Each of these functions is described in its own man page. +.SH "SEE ALSO" +.BR Xdmx "(1), " xdmxconfig "(1), " vdltodmx (1) Index: xc/doc/man/DMX/DMXAddInput.man diff -u /dev/null xc/doc/man/DMX/DMXAddInput.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXAddInput.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,162 @@ +.\" $XFree86: xc/doc/man/DMX/DMXAddInput.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXAddInput 3X __vendorversion__ +.SH NAME +DMXAddInput, DMXAddBackendInput, DMXAddConsoleInput \- attach a new input +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXAddInput(Display " *dpy , +.BI " unsigned int " mask , +.BI " DMXInputAttributes " *attr , +.BI " int " *id ); +.br +.BI "Bool DMXAddBackendInput(Display " *dpy , +.BI " int " screen , +.BI " int " sendsCore , +.BI " int " *newId ); +.br +.BI "Bool DMXAddConsoleInput(Display " *dpy , +.BI " const char " *name , +.BI " int " sendsCore , +.BI " int " *newId ); +.fi +.SH DESCRIPTION +.B DMXAddInput() +is used to attach a new input (or a previously detached input) to the +.BR Xdmx (1) +server. +.I mask +specifies the fields in +.I attr +that are active, and +.I id +returns the device if of the first device in the series that is added. +.PP +The value of +.I mask +is computed from the following values: +.sp +.nf +DMXInputType +DMXInputPhysicalScreen +DMXInputSendsCore +.fi +.PP +The +.B DMXInputAttributes +structure is: +.sp +.nf +typedef struct { + DMXInputEnum inputType; + int physicalScreen; + int physicalId; + Bool isCore; + Bool sendsCore; + const char *name; + Bool detached; +} DMXInputAttributes; +.fi +.PP +.I inputType +may bave the value +.B DmxConsoleInputType " or " DmxBackendInputType . +.PP +For console devices, +.I name +will specify the display to be used. +.PP +For back-end devices, +.I physicalScreen +will specify the +.BR Xdmx (1) +screen number. +.PP +If +.I sendsCore +is +.BR True , +the new device will be added as a true core device. +.PP +If a device was removed with +.BR DMXRemoveInput (3X) +an attempt will be made to reconnect the previous devices +.RI ( sendsCore +is ignored in this case). +.PP +.B DMXAddBackendInput() +is a helper function that is used to add input from a back-end server. +With this function, +.I screen +refers to the back-end screen, +.I sendsCore +is +.B True +if the new input should send core events (and it ignored if the input +has been detached), and +.I newId +will hold the device id of the first device in the series added. +.PP +.B DMXAddConsoleInput() +is a helper function that is used to add input from a console. With +this function, +.I name +is the name of the console display, +.I sendsCore +is +.B True +if the new input should send core events (and it ignored if the input +has been detached), and +.I newId +will hold the device id of the first device in the series added. +.SH "RETURN VALUE" +.B DMXAddInput() +returns +.B True +on success and +.B False +otherwise. +.PP +.B DMXAddInput() +can generate +.B BadValue +(if +.I inputType +is invalid or +.I physicalScreen +is out of range), +.B BadAccess +(if the input has already been attached or if the backend screen is +currently detached). +.SH NOTES +Local devices cannot be attached or detached. +.PP +Attributes that are not specified will default to 0. This may lead to +unintended results. +.SH "SEE ALSO" +.BR DMXRemoveInput "(3X), " DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXAddScreen.man diff -u /dev/null xc/doc/man/DMX/DMXAddScreen.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXAddScreen.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,104 @@ +.\" $XFree86: xc/doc/man/DMX/DMXAddScreen.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXAddScreen 3X __vendorversion__ +.SH NAME +DMXAddScreen \- attach a new back-end screen +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXAddScreen(Display " *dpy , +.BI " const char " *displayName , +.BI " unsigned int " mask , +.BI " DMXScreenAttributes " *attr , +.BI " int " *screen ); +.fi +.SH DESCRIPTION +.B DMXAddScreen() +attaches a back-end screen to the +.BR Xdmx (1) +server, in place of the previously detached back-end server specified by +.IR screen . +.PP +.I displayName +is the name of the new back-end display, +.I mask +specifies the field in +.I attr +that are active, and +.I screen +returns the new +.BR Xdmx (1) +screen number for the attached screen. +.PP +The information stored in +.I mask " and " attr +is identical to that used by the +.BR DMXChangeScreenAttributes (3X) +and +.BR DMXGetScreenAttribues (3X) +functions. +.SH "RETURN VALUE" +.B DMXAddScreen() +will return +.B True +if the screen was successfully attached, and +.B False +otherwise. +.B False +will be returned if the +.I \-addremovescreens +command line option was not specified on the +.BR Xdmx (1) +command line, the input value of +.I screen +is out of range, +.I screen +is not currently detached, +.I displayName +cannot be opened, has unexpected visuals, or has characteristics that do +not match the previously detached screen. +.PP +.B DMXAddScreen() +can generate +.BR BadLength , +.BR BadAlloc , +and +.B BadValue +errors. +.SH NOTES +Attributes that are not specified will default to 0. This may lead to +unintended results. +.PP +Unlike other functions in the +.BR DMX (3X) +API, this function uses +.I screen +for both input and output. +.SH "SEE ALSO" +.BR DMXRemoveScreen "(3X), " +.BR DMXChangeScreenAttributes "(3X), " DMXGetScreenAttributes "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXChangeDesktopAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXChangeDesktopAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXChangeDesktopAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,102 @@ +.\" $XFree86: xc/doc/man/DMX/DMXChangeDesktopAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXChangeDesktopAttributes 3X __vendorversion__ +.SH NAME +DMXChangeDesktopAttributes \- change global bounding box +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "int DMXChangeDesktopAttributes(Display " *dpy , +.BI " unsigned int " mask , +.BI " DMXDesktopAttributes " *attr ); +.fi +.SH DESCRIPTION +.B DMXChangeDesktopAttributes() +resizes the bounding box of the whole screen when using the Xinerama +extension. Otherwise, it has no effect on the screen layout. +An attribute mask is placed in +.I mask +and the attributes to change are placed in +.IR attr . +.PP +The values that are used to compute +.I mask +are as follows: +.sp +.nf +DMXDesktopWidth +DMXDesktopHeight +DMXDesktopShiftX +DMXDesktopShiftY +.fi +.PP +The +.B DMXDesktopAttributes +structure is: +.sp +.nf +typedef struct { + unsigned int width; + unsigned int height; + int shiftX; + int shiftY; +} DMXDesktopAttributes; +.fi +.PP +.I width " and " height +specify the new width and height for the bounding box. +.I shiftX " and " shiftY +specify where the Xinerama origin will be placed with respect to the +origin of the new bounding box. This allows the left and upper edges of +the bounding box to be changed without changing the visual position of +the windows on the desktop. If +.I width " or " height +is not specified, the current values will be used. If +.I shiftX " or " shiftY +is not specified, 0 will be used. +.PP +All coordinants are in the global DMX coordinant system. If Xinerama is +not active, an error will be generated. +.SH "RETURN VALUE" +.B DMXChangeDesktopAttributes() +will return 0 on success, +.B DmxBadXinerama +if Xinerama is not active, +.B DmxBadValue +if the size of the bounding box is too large, and +.B DmxBadReply +if there was a protocol error. +.PP +.B DMXChangeDesktopAttributes() +can generate +.B BadLength +(if the request is malformed, which should never happen when using this +library interface), and +.B BadValue +(if any values are out of range). +.SH "SEE ALSO" +.BR DMXGetDesktopAttributes "(3X), " DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXChangeScreensAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXChangeScreensAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXChangeScreensAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,123 @@ +.\" $XFree86: xc/doc/man/DMX/DMXChangeScreensAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXChangeScreensAttributes 3X __vendorversion__ +.SH NAME +DMXChangeScreensAttributes \- change back-end screen attributes +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "int DMXChangeScreensAttributes(Display " *dpy , +.BI " int " screen_count , +.BI " int " *screens , +.BI " int " mask_count , +.BI " unsigned int " *masks , +.BI " DMXScreenAttributes " *attr , +.BI " int *" error_screen ); +.fi +.SH DESCRIPTION +.B DMXChangeScreensAttributes() +changes the geometries and positions of the DMX screen and DMX root +windows on the back-end X servers. +.I screen_count +specifies the number of screens to be changed. For each screen, the +screen number is placed in +.IR screens , +an attribute mask is placed in +.IR masks , +and a +.I DMXScreenAttributes +structure is included in +.IR attr . +.PP +An explanation of the +.I DMXScreenAttributes +structure is given in +.BR DMXGetScreenAttributes (3X). +.PP +The values that are used to compute each value in +.I masks +are as follows +.sp +.nf +DMXScreenWindowWidth +DMXScreenWindowHeight +DMXScreenWindowXoffset +DMXScreenWindowYoffset +DMXRootWindowWidth +DMXRootWindowHeight +DMXRootWindowXoffset +DMXRootWindowYoffset +DMXRootWindowXorigin +DMXRootWindowYorigin +.fi +.PP +In general, +.I mask_count +should be equal to +.IR screen_count . +However, as a convenience, +.I mask_count +may be less than +.IR screen_count , +and the last entry in +.I masks +will then be used for all of the remaining screens. For example, this +allows identical changes to be made to several screens using only one +mask. +.SH "RETURN VALUE" +On success, 0 is returned. Otherwise, +.I error_screen +is set to the value of the first screen in the list that caused the +error and a non-zero value is returned. If +.I screen_count +or +.I mask_count +is less than 1, or if any of the attribute values are not within the +appropriate bounding boxes, +.B DmxBadValue +is returned. If a protocol error occurs, +.B DmxBadReply +is returned. +.PP +.B DMXChangeScreensAttributes() +can generate +.B BadLength +(if the data provided does not match the data implicitly required by the +.I screen_count +and +.I mask_count +values), +.B BadValue +(if the values in +.I screens +are not valid), and +.B BadAlloc +errors. +.SH "SEE ALSO" +.BR DMXGetScreenCount "(3X), " +.BR DMXGetScreenAttributes "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXForceWindowCreation.man diff -u /dev/null xc/doc/man/DMX/DMXForceWindowCreation.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXForceWindowCreation.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,51 @@ +.\" $XFree86: xc/doc/man/DMX/DMXForceWindowCreation.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXForceWindowCreation 3X __vendorversion__ +.SH NAME +DMXForceWindowCreation \- force immediate back-end window creation +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXForceWindowCreation(Display " *dpy , +.BI " Window " window ); +.fi +.SH DESCRIPTION +When using the lazy window creation optimization, windows are not +created on the back-end X servers until they are required. +.B DMXForceWindowCreation() +forces the immediate creation of the window requested. +.SH "RETURN VALUE" +.B DMXForceWindowCreation() +returns +.B True +unless there is a protocol error. +.B DMXForceWindwoCreation() +can generate +.B BadWindow +errors. +.SH "SEE ALSO" +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetDesktopAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXGetDesktopAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetDesktopAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,67 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetDesktopAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXDesktopAttributes 3X __vendorversion__ +.SH NAME +DMXGetDesktopAttributes \- determine global bounding box +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetDesktopAttributes(Display " *dpy , +.BI " DMXDesktopAttributes " *attr ); +.fi +.SH DESCRIPTION +.B DMXGetDesktopAttributes() +returns information about the desktop in +.BR DMXDesktopAttributes : +.sp +.nf +typedef struct { + unsigned int width; + unsigned int height; + int shiftX; + int shiftY; +} DMXDesktopAttributes; +.fi +.PP +The size of the global bounding box is given in +.IR width ", and " height . +The +.IR shiftX " and " shiftY +values will always be 0. The global bounding box is computed whether or +not Xinerama is active, but it is only useful when using Xinerama. +.PP +The global bounding box used by +.BR Xdmx (1) +may be larger than the Xinerama screen size because of information in +the configuration file. +.SH "RETURN VALUE" +.B DMXGetDesktopAttributes() +returns +.B True +unless there is a protocol error. +.SH "SEE ALSO" +.BR DMXChangeDesktopAttributes "(3X), " DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetInputAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXGetInputAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetInputAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,135 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetInputAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXGetInputAttributes 3X __vendorversion__ +.SH NAME +DMXGetInputAttributes \- determine input device attributes +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetInputAttributes(Display " *dpy , +.BI " int " id , +.BI " DMXInputAttributes " *attr ); +.fi +.SH DESCRIPTION +.B DMXGetInputAttributes() +returns information about the input device specified with +.IR id . +This information cannot be +obtained from the +.BR XListInputDeivices (3X) +call. +.I id +is the same as that used by the +.BR XListInputDevices (3X) +call, and must be in +the range 0 to one less than the value returned by +.BR DMXGetInputCount(3X) , +inclusive. +.PP +The +.B DMXInputAttributes +structure is: +.sp +.nf +typedef struct { + DMXInputEnum inputType; + int physicalScreen; + int physicalId; + Bool isCore; + Bool sendsCore; + const char *name; + Bool detached; +} DMXInputAttributes; +.fi +.PP +The value of +.I inputType +will always be valid, and will have one of the following values, +depending on the type of input: +.B DMXLocalInputType ", " DMXConsoleInputType ", or" DMXBackendInputType . +.PP +For local devices, all other fields returned, except +.I isCore " and " sendsCore , +are invalid. +.PP +For console devices, +.I physicalScreen " and " physicalID +will be invalid, and +.I name +will return the name of the X server on which the console window is +displayed. +.PP +For back-end devices, +.I physicalScreen +will identify the back-end display and can be used as an argument to +.BR DMXGetScreenAttributes (3X) +to obtain more information; +.I physicalId +will be the XInput device id on the back-end X server; and +.I name +will be invalid (since it does not provide any additional information +that cannot be obtained with +.BR DMXGetScreenAttributes (3X)). +.PP +If +.I isCore +is +.BR True , +then this device is active as a true core input device and will send +core events. If +.B sendsCore +is True, then this device is an XInput extension device, but sends core +events +.I instead +of extension events. This behavior is different from that of XFree86 or +Xorg, where XInput extension devices may send +.I both +extension events and core events. +.PP +If +.I detached +is True, then this device has been detached and is no longer producing +input events. The device may be reattached using +.BR DMXAddInput (3X). +.SH "RETURN VALUE" +.B DMXGetInputAttributes() +returns +.B True +unless there is a protocol error. +.PP +.B DMXGetInputAttributes() +can generate +.B BadValue +(if the value of +.I id +is out of range). +.SH "SEE ALSO" +.BR DMXGetInputCount "(3X), " +.BR XListInputDevices "(3X), " +.BR DMXGetScreenAttributes "(3X), " +.BR DMXAddInput "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetInputCount.man diff -u /dev/null xc/doc/man/DMX/DMXGetInputCount.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetInputCount.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,53 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetInputCount.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXGetInputCount 3X __vendorversion__ +.SH NAME +DMXGetInputCount \- determine number of input devices +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetInputCount(Display " *dpy , +.BI " int " *input_count ); +.fi +.SH DESCRIPTION +.B DMXGetInputCount() +returns the number of input devices connected to the +.BR Xdmx (1) +server in +.IR input_count . +This number is the same as that returned by +.BR XListInputDevices (3X), +but is available even when the XInput extension is not supported. +.SH "RETURN VALUE" +.B DMXGetInputCount() +returns +.B True +unless there is a protocol error. +.SH "SEE ALSO" +.BR DMXGetInputAttributes "(3X), " +.BR XListInputDevices "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetScreenAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXGetScreenAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetScreenAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,112 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetScreenAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXGetScreenAttributes 3X __vendorversion__ +.SH NAME +DMXGetScreenAttributes \- determine back-end screen attributes +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetScreenAttributes(Display " *dpy , +.BI " int " screen , +.BI " DMXScreenAttributes " *attr ); +.fi +.SH DESCRIPTION +.B DMXGetScreenAttributes() +returns the attributes for the single DMX screen specified in +.IR screen . +.PP +The +.I DMXScreenAttributes +structure is: +.sp +.nf +typedef struct { + char *displayName; + int logicalScreen; + + unsigned int screenWindowWidth; + unsigned int screenWindowHeight; + int screenWindowXoffset; + int screenWindowYoffset; + + unsigned int rootWindowWidth; + unsigned int rootWindowHeight; + int rootWindowXoffset; + int rootWindowYoffset; + + int rootWindowXorigin; + int rootWindowYorigin; +} DMXScreenAttributes; +.fi +.PP +.I displayName +is the name used to open the display, either from the +.BR Xdmx (1) +command-line or from the configuration file. +.PP +.I logicalScreen +is the value of the screen that that +.BR Xdmx (1) +server exports to clients. When Xinerama is in use, this value is +typically 0 for all values of physicalScreen. If Xinerama is in +use, +.I rootWindowXorigin +and +.I rootWindowYorigin +specify where the physical screen is positioned in the global Xinerama +coordinate system. Otherwise, these values are set to 0. +.PP +.IR screenWindowWidth ", " screenWindowHeight ", " +.IR screenWindowXoffset ", and " screenWindowYoffset +are a geometry specification (see +.BR X (7x)) +for the location of the DMX screen on the back-end screen. The +coordinant system of the back-end display is used for these values. +.PP +.IR rootWindowWidth ", " rootWindowHeight ", " +.IR rootWindowXoffset ", and " rootWindowYoffset +are a geometry specification (see +.BR X (7x)) +for the location of the root window on the screen window. The +coordinant system of the screen window is used. In most cases, the root +window will have the same geometry as the DMX screen window, and will +occupy the same area of the back-end display. (This would not be the +case, for example, if automatic projector alignment is used.) +.SH "RETURN VALUE" +.B DMXGetScreenAttributes() +returns +.B True +unless there is a protocol error. +.PP +.B DMXGetScreenAttributes() +can generate +.B BadValue +errors. +.SH "SEE ALSO" +.BR DMXGetScreenCount "(3X), " +.BR DMXChangeScreenAttributes "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetScreenCount.man diff -u /dev/null xc/doc/man/DMX/DMXGetScreenCount.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetScreenCount.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,68 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetScreenCount.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXGetScreenCount 3X __vendorversion__ +.SH NAME +DMXGetScreenCount \- determine number of back-end screens +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetScreenCount(Display " *dpy , +.BI " int " *screen_count ); +.fi +.SH DESCRIPTION +.B DMXGetScreenCount() +returns the number of back-end screens that a +.BR Xdmx (1) +server controls. Since a DMX screen usually fills all of the available +area on a back-end server, there is usually a one-to-one correspondence +between DMX screens and backend servers. However, it is also possible +for a DMX screen to cover only part of the available area on a back-end +server, and for more than one DMX screens to occupy different parts of +the visible area on the same back-end server. +.PP +A DMX screen may be managed as a regular X screen in the +.BR Xdmx (1) +server or may be joined with other DMX screens using Xinerama. +.SH "RETURN VALUE" +.B DMXGetScreenCount() +sets +.I screen_count +and returns +.B True +unless there is a protocol error. +.SH NOTES +If Xinerama is active, only one logical screen will be available to +clients of the +.BR Xdmx (1) +server. However, this call will accurately reflect the number of +composite back-end screens that the +.BR Xdmx (1) +server is using. +.SH "SEE ALSO" +.BR DMXGetScreenAttribtues "(3X), " +.BR DMXChangeScreenAttributes "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXGetWindowAttributes.man diff -u /dev/null xc/doc/man/DMX/DMXGetWindowAttributes.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXGetWindowAttributes.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,154 @@ +.\" $XFree86: xc/doc/man/DMX/DMXGetWindowAttributes.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXGetWindowAttributes 3X __vendorversion__ +.SH NAME +DMXGetWindowAttributes \- determine back-end window attributes +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXGetWindowAttributes(Display " *dpy , +.BI " Window " window , +.BI " int " *screen_count , +.BI " int " available_count , +.BI " DMXWindowAttributes " *attr ); +.fi +.SH DESCRIPTION +When calling +.BR DMXGetWindowAttributes() , +.I window +specifies the window ID of a window on the +.BR Xdmx (1) +server and +.I available_count +specifies the length of +.I attr. +.PP +The number of screens for which information is available will be +returned in +.I screen_count +and information about those screen will be returned in +.IR attr . +If +.I screen_count +is less than +.IR available_count , +then information for all of the screens will be returned. Otherwise, +information for the first +.I available_count +screens will be returned. +.PP +The +.I DMXWindowAttributes +structure is: +.sp +.nf +typedef struct { + int screen; + Window window; + XRectangle pos, vis; +} DMXWindowAttributes; +.fi +.PP +For each back-end X server that displays a portion of +.IR window , +this structure contains the physical +.I screen +containing that portion, the +.I window +ID on the back-end X server of the window containing that portion, the +position and dimensions of the window on the back-end +.RI ( pos , +in screen coordinates), and the visible area of the window on the +back-end +.RI ( vis , +in window-relative coordinates -- all zeros if the window is not visible +on the backend). +.PP +To obtain more information about the physical screen use the +.BR DMXGetScreenAttributes (3X) +call. +.PP +Note that DMX allows multiple back-end windows to overlap in their +view of the DMX logical window. Further, a logical window does not +have to be completely covered by back-end windows -- there may be +gaps. +.PP +As an example, consider a 500x500 window that spans the top two +1024x768 back-end displays (A and B) of a 2048x1536 DMX display +composed of 4 1024x768 back-end displays arranged in a cube: +.sp +.nf + A B + C D +.fi +.sp +In this case, the DMXGetWindowAttributes call would return the +following information for the 500x500 window: +.sp +.nf +display A: 500x500 window at 1024-250,0 (relative to back end) + with 250x500 visible at 0,0 (relative to window origin) + +display B: 500x500 window at -250,0 (relative to back end) + with 250x500 visible at 250,0 (relative to window origin) + +display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0 + +display D: 500x500 window at -250,-768 with 0x0 visible at 0,0 +.fi +.SH "RETURN VALUE" +.B DMXGetWindowAttributes() +returns +.B True +unless there is a protocol error. +.PP +.B DMXGetWindowAttributes() +can generate +.B BadWindow +and +.B BadAlloc +errors. +.SH NOTES +Because this call transports a great deal of information over the wire, +please call +.BR DMXGetScreenCount (3X) +first, and make sure +.I attr +is sufficiently large. +.PP +On a particular back-end server, it is possible that the associated +window has not yet been mapped because the +.BR XMapWindow (3X) +call that will eventually map the window had been buffered by Xlib's +normal buffering system. To avoid this race condition, please call +.BR DMXSync (3X) +before communicating directly with the back-end X server. +.SH "SEE ALSO" +.BR DMXGetScreenCount "(3X), " +.BR DMXSync "(3X), " +.BR DMXGetScreenAttributes "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXQueryExtension.man diff -u /dev/null xc/doc/man/DMX/DMXQueryExtension.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXQueryExtension.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,55 @@ +.\" $XFree86: xc/doc/man/DMX/DMXQueryExtension.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXQueryExtension 3X __vendorversion__ +.SH NAME +DMXQueryExtension \- determine if DMX is available +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXQueryExtension(Display " *dpy , +.BI " int " *event_basep , +.BI " int " *error_basep ); +.fi +.SH DESCRIPTION +.B DMXQueryExtension() +determines if the DMX protocol extension is available. It will be +available if the server is an +.BR Xdmx (1) +server. +.SH "RETURN VALUE" +If the DMX protocol extension is available, +.I event_basep +and +.I error_basep +will be set to the event and error bases, respectively, and +.B True +will be returned. Otherwise, +.B False +will be returned. +.SH "SEE ALSO" +.BR DMXQueryVersion "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXQueryVersion.man diff -u /dev/null xc/doc/man/DMX/DMXQueryVersion.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXQueryVersion.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,80 @@ +.\" $XFree86: xc/doc/man/DMX/DMXQueryVersion.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXQueryVersion 3X __vendorversion__ +.SH NAME +DMXQueryVersion \- determine DMX extension version +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXQueryVersion(Display " *dpy , +.BI " int " *major_version , +.BI " int " *minor_version , +.BI " int " *patch_version ); +.fi +.SH DESCRIPTION +.B DMXQueryVersion() +returns version information about the DMX protocol extension. +.PP +Any incompatible changes to the protocol will be indicated by +a change in +.IR major_version . +Small, upward-compatible changes will be indicated by a change in +.IR minor_version . +In general, +.I patch_version +is for informational purposes and will encode the date of the last +protocol revision (e.g., 20040604). +.SH "RETURN VALUE" +If the DMX protocol extension is available, +.IR major_version , +.IR minor_version , +and +.I patch_version +will be set, and +.B True +will be returned. Otherwise, +.B False +will be returned. +.SH NOTES +At the time of this writing, the DMX protocol is at version 2.2. +.PP +Version 2.2 was the final development version, and code supporting this +version was submitted to upstream X server repositories in the summer of +2004. +.PP +Version 1.5 was the last of the 1.x series, which was used for +development before screen and input addition and removal were supported. +Version 2.0 and 2.1 were development versions that partially supported +screen and input addition and removal. +.PP +Since we do not expect development versions to be widely used, we +recommend that any software that uses the DMX protocol extension to +support only versions 2.2 and above (although they should detect earlier +versions and either reduce functionality or fail gracefully). +.SH "SEE ALSO" +.BR DMXQueryExtension "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXRemoveInput.man diff -u /dev/null xc/doc/man/DMX/DMXRemoveInput.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXRemoveInput.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,59 @@ +.\" $XFree86: xc/doc/man/DMX/DMXRemoveInput.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXRemoveInput 3X __vendorversion__ +.SH NAME +DMXRemoveInput \- detach an input +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXRemoveInput(Display " *dpy , +.BI " int " id ); +.fi +.SH DESCRIPTION +.B DMXRemoveInput() +detaches the input device with +.IR id , +and all associated inputs (e.g., if the +.I id +is a backend mouse, and a keyboard is also attached to the backend, then +both devices will be detached). +.SH "RETURN VALUE" +.B DMXRemoveInput() +returns +.B True +unless there is a protocol error. +.PP +.B DMXRemoveInput() +can generate +.B BadValue +(if the +.I id +is not valid) and +.B BadAccess +(if the input has already been detached). +.SH "SEE ALSO" +.BR DMXAddInput "(3X), " DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXRemoveScreen.man diff -u /dev/null xc/doc/man/DMX/DMXRemoveScreen.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXRemoveScreen.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,60 @@ +.\" $XFree86: xc/doc/man/DMX/DMXRemoveScreen.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXRemoveScreen 3X __vendorversion__ +.SH NAME +DMXRemoveScreen \- detach a back-end screen +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXRemoveScreen(Display " *dpy , +.BI " int " screen ); +.fi +.SH DESCRIPTION +.B DMXRemoveScreen() +detaches the back-end +.I screen +from the +.BR Xdmx (1) +server. +.SH "RETURN VALUE" +.B DMXRemoveScreen() +returns +.B True +on success, and +.B False +if there were protocol errors, if the +.I \-addremovescreens +command-line option was not specified on the +.BR Xdmx (1) +command line, if the value of +.I screen +is out of range, or if the back-end screen specified by +.I screen +has already been detached. +.SH "SEE ALSO" +.BR DMXAddScreen "(3X), " +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/DMXSync.man diff -u /dev/null xc/doc/man/DMX/DMXSync.man:1.1 --- /dev/null Wed Mar 16 20:58:43 2005 +++ xc/doc/man/DMX/DMXSync.man Wed Jun 30 16:21:36 2004 @@ -0,0 +1,50 @@ +.\" $XFree86: xc/doc/man/DMX/DMXSync.man,v 1.1 2004/06/30 20:21:36 martin Exp $ +.\" +.\" Copyright 2004 Red Hat Inc., Durham, North Carolina. +.\" All Rights Reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining +.\" a copy of this software and associated documentation files (the +.\" "Software"), to deal in the Software without restriction, including +.\" without limitation on the rights to use, copy, modify, merge, +.\" publish, distribute, sublicense, and/or sell copies of the Software, +.\" and to permit persons to whom the Software is furnished to do so, +.\" subject to the following conditions: +.\" +.\" he above copyright notice and this permission notice (including the +.\" next paragraph) shall be included in all copies or substantial +.\" portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +.\" SOFTWARE. +.TH DMXSync 3X __vendorversion__ +.SH NAME +DMXSync \- flush protocol requests between Xdmx and back-end X servers +.SH SYNOPSIS +.B #include +.sp +.nf +.BI "Bool DMXSync(Display " *dpy ); +.fi +.SH DESCRIPTION +.B DMXSync() +flushes all pending protocol requests between the +.BR Xdmx (1) +server and each back-end X server. It is used by clients that talk +directly to back-end X servers to ensure that all pending +.BR Xdmx (1) +requests have reached all back-end servers and have been processed by +those servers. +.SH "RETURN VALUE" +.B DMXSync() +returns +.BR True +unless there is a protocol error. +.SH "SEE ALSO" +.BR DMX "(3X), " Xdmx (1) Index: xc/doc/man/DMX/Imakefile diff -u /dev/null xc/doc/man/DMX/Imakefile:1.1 --- /dev/null Wed Mar 16 20:58:44 2005 +++ xc/doc/man/DMX/Imakefile Wed Jun 30 16:21:36 2004 @@ -0,0 +1,25 @@ +XCOMM $XFree86: xc/doc/man/DMX/Imakefile,v 1.1 2004/06/30 20:21:36 martin Exp $ + +MANDIR = $(LIBMANDIR) +MANSUFFIX = $(LIBMANSUFFIX) + +all:: + +InstallManPage(DMX,$(MANDIR)) +InstallManPage(DMXQueryExtension,$(MANDIR)) +InstallManPage(DMXQueryVersion,$(MANDIR)) +InstallManPage(DMXSync,$(MANDIR)) +InstallManPage(DMXForceWindowCreation,$(MANDIR)) +InstallManPage(DMXGetScreenCount,$(MANDIR)) +InstallManPage(DMXGetScreenAttributes,$(MANDIR)) +InstallManPage(DMXChangeScreensAttributes,$(MANDIR)) +InstallManPage(DMXAddScreen,$(MANDIR)) +InstallManPage(DMXRemoveScreen,$(MANDIR)) +InstallManPage(DMXGetWindowAttributes,$(MANDIR)) +InstallManPage(DMXGetDesktopAttributes,$(MANDIR)) +InstallManPage(DMXChangeDesktopAttributes,$(MANDIR)) +InstallManPage(DMXGetInputCount,$(MANDIR)) +InstallManPage(DMXGetInputAttributes,$(MANDIR)) +InstallManPage(DMXAddInput,$(MANDIR)) +InstallManPage(DMXRemoveInput,$(MANDIR)) +InstallManPageAliases(DMXAddInput,$(MANDIR),DMXAddBackendInput DMXAddConsoleInput) Index: xc/doc/man/X11/AllPlanes.man diff -u xc/doc/man/X11/AllPlanes.man:1.3 xc/doc/man/X11/AllPlanes.man:1.4 --- xc/doc/man/X11/AllPlanes.man:1.3 Mon Apr 28 18:17:53 2003 +++ xc/doc/man/X11/AllPlanes.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/AllPlanes.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/AllPlanes.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH AllPlanes 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH AllPlanes 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME AllPlanes, BlackPixel, WhitePixel, ConnectionNumber, DefaultColormap, DefaultDepth, XListDepths, DefaultGC, DefaultRootWindow, DefaultScreenOfDisplay, DefaultScreen, DefaultVisual, DisplayCells, DisplayPlanes, DisplayString, XMaxRequestSize, XExtendedMaxRequestSize, LastKnownRequestProcessed, NextRequest, ProtocolVersion, ProtocolRevision, QLength, RootWindow, ScreenCount, ScreenOfDisplay, ServerVendor, VendorRelease \- Display macros and functions .SH SYNTAX Index: xc/doc/man/X11/BlkPScrn.man diff -u xc/doc/man/X11/BlkPScrn.man:1.3 xc/doc/man/X11/BlkPScrn.man:1.4 --- xc/doc/man/X11/BlkPScrn.man:1.3 Mon Apr 28 18:17:53 2003 +++ xc/doc/man/X11/BlkPScrn.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/BlkPScrn.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/BlkPScrn.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH BlackPixelOfScreen 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH BlackPixelOfScreen 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME BlackPixelOfScreen, WhitePixelOfScreen, CellsOfScreen, DefaultColormapOfScreen, DefaultDepthOfScreen, DefaultGCOfScreen, DefaultVisualOfScreen, DoesBackingStore, DoesSaveUnders, DisplayOfScreen, XScreenNumberOfScreen, EventMaskOfScreen, HeightOfScreen, HeightMMOfScreen, MaxCmapsOfScreen, MinCmapsOfScreen, PlanesOfScreen, RootWindowOfScreen, WidthOfScreen, WidthMMOfScreen \- screen information functions and macros .SH SYNTAX Index: xc/doc/man/X11/Dis3C.man diff -u xc/doc/man/X11/Dis3C.man:1.3 xc/doc/man/X11/Dis3C.man:1.4 --- xc/doc/man/X11/Dis3C.man:1.3 Mon Apr 28 18:17:53 2003 +++ xc/doc/man/X11/Dis3C.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/Dis3C.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/Dis3C.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH DisplayOfCCC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH DisplayOfCCC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME DisplayOfCCC, VisualOfCCC, ScreenNumberOfCCC, ScreenWhitePointOfCCC, ClientWhitePointOfCCC \- Color Conversion Context macros .SH SYNTAX Index: xc/doc/man/X11/ImageOrd.man diff -u xc/doc/man/X11/ImageOrd.man:1.3 xc/doc/man/X11/ImageOrd.man:1.4 --- xc/doc/man/X11/ImageOrd.man:1.3 Mon Apr 28 18:17:53 2003 +++ xc/doc/man/X11/ImageOrd.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/ImageOrd.man,v 1.3 2003/04/28 22:17:53 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/ImageOrd.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH ImageByteOrder 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH ImageByteOrder 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME ImageByteOrder, BitmapBitOrder, BitmapPad, BitmapUnit, DisplayHeight, DisplayHeightMM, DisplayWidth, DisplayWidthMM, XListPixmapFormats, XPixmapFormatValues \- image format functions and macros .SH SYNTAX Index: xc/doc/man/X11/IsCKey.man diff -u xc/doc/man/X11/IsCKey.man:1.3 xc/doc/man/X11/IsCKey.man:1.4 --- xc/doc/man/X11/IsCKey.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/IsCKey.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/IsCKey.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/IsCKey.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH IsCursorKey 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH IsCursorKey 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME IsCursorKey, IsFunctionKey, IsKeypadKey, IsMiscFunctionKey, IsModiferKey, IsPFKey, IsPrivateKeypadKey \- keysym classification macros .SH SYNTAX Index: xc/doc/man/X11/XACHints.man diff -u xc/doc/man/X11/XACHints.man:1.3 xc/doc/man/X11/XACHints.man:1.4 --- xc/doc/man/X11/XACHints.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XACHints.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XACHints.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XACHints.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAllocClassHint 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocClassHint 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocClassHint, XSetClassHint, XGetClassHint, XClassHint \- allocate class hints structure and set or read a window's WM_CLASS property .SH SYNTAX Index: xc/doc/man/X11/XAIcSize.man diff -u xc/doc/man/X11/XAIcSize.man:1.3 xc/doc/man/X11/XAIcSize.man:1.4 --- xc/doc/man/X11/XAIcSize.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XAIcSize.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAIcSize.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XAIcSize.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAllocIconSize 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocIconSize 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocIconSize, XSetIconSizes, XGetIconSizes, XIconSize \- allocate icon size structure and set or read a window's WM_ICON_SIZES property .SH SYNTAX Index: xc/doc/man/X11/XASCmap.man diff -u xc/doc/man/X11/XASCmap.man:1.6 xc/doc/man/X11/XASCmap.man:1.7 --- xc/doc/man/X11/XASCmap.man:1.6 Sun Nov 23 00:40:32 2003 +++ xc/doc/man/X11/XASCmap.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XASCmap.man,v 1.6 2003/11/23 05:40:32 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XASCmap.man,v 1.7 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XAllocStandardColormap 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocStandardColormap 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocStandardColormap, XSetRGBColormaps, XGetRGBColormaps, XStandardColormap \- allocate, set, or read a standard colormap structure .SH SYNTAX Index: xc/doc/man/X11/XASHints.man diff -u xc/doc/man/X11/XASHints.man:1.6 xc/doc/man/X11/XASHints.man:1.7 --- xc/doc/man/X11/XASHints.man:1.6 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XASHints.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XASHints.man,v 1.6 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XASHints.man,v 1.7 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XAllocSizeHints 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocSizeHints 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocSizeHints, XSetWMNormalHints, XGetWMNormalHints, XSetWMSizeHints, XGetWMSizeHints, XSizeHints \- allocate size hints structure and set or read a window's WM_NORMAL_HINTS property .SH SYNTAX Index: xc/doc/man/X11/XAWMHints.man diff -u xc/doc/man/X11/XAWMHints.man:1.5 xc/doc/man/X11/XAWMHints.man:1.6 --- xc/doc/man/X11/XAWMHints.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XAWMHints.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAWMHints.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAWMHints.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -143,7 +143,7 @@ .. .ny0 '\" t -.TH XAllocWMHints 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocWMHints 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocWMHints, XSetWMHints, XGetWMHints, XWMHints \- allocate window manager hints structure and set or read a window's WM_HINTS property .SH SYNTAX Index: xc/doc/man/X11/XAddHost.man diff -u xc/doc/man/X11/XAddHost.man:1.4 xc/doc/man/X11/XAddHost.man:1.5 --- xc/doc/man/X11/XAddHost.man:1.4 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XAddHost.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAddHost.man,v 1.4 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAddHost.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAddHost 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAddHost 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccessControl, XEnableAccessControl, XDisableAccessControl, XHostAddress \- control host access and host control structure .SH SYNTAX Index: xc/doc/man/X11/XAllColor.man diff -u xc/doc/man/X11/XAllColor.man:1.4 xc/doc/man/X11/XAllColor.man:1.5 --- xc/doc/man/X11/XAllColor.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XAllColor.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAllColor.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XAllColor.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" e -.TH XAllocColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllocColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllocColor, XAllocNamedColor, XAllocColorCells, XAllocColorPlanes, XFreeColors \- allocate and free colors .SH SYNTAX Index: xc/doc/man/X11/XAllEvnt.man diff -u xc/doc/man/X11/XAllEvnt.man:1.3 xc/doc/man/X11/XAllEvnt.man:1.4 --- xc/doc/man/X11/XAllEvnt.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XAllEvnt.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAllEvnt.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XAllEvnt.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAllowEvents 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAllowEvents 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAllowEvents \- release queued events .SH SYNTAX Index: xc/doc/man/X11/XAnyEvent.man diff -u xc/doc/man/X11/XAnyEvent.man:1.3 xc/doc/man/X11/XAnyEvent.man:1.4 --- xc/doc/man/X11/XAnyEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XAnyEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XAnyEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XAnyEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAnyEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAnyEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAnyEvent, XEvent \- generic X event structures .SH STRUCTURES Index: xc/doc/man/X11/XButEvent.man diff -u xc/doc/man/X11/XButEvent.man:1.3 xc/doc/man/X11/XButEvent.man:1.4 --- xc/doc/man/X11/XButEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XButEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XButEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XButEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XButtonEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XButtonEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XButtonEvent, XKeyEvent, XMotionEvent \- KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify event structures .SH STRUCTURES Index: xc/doc/man/X11/XCKCntrl.man diff -u xc/doc/man/X11/XCKCntrl.man:1.5 xc/doc/man/X11/XCKCntrl.man:1.6 --- xc/doc/man/X11/XCKCntrl.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCKCntrl.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCKCntrl.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCKCntrl.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XChangeKeyboardControl 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XChangeKeyboardControl 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl \- manipulate keyboard settings and keyboard control structure .SH SYNTAX Index: xc/doc/man/X11/XCKMping.man diff -u xc/doc/man/X11/XCKMping.man:1.5 xc/doc/man/X11/XCKMping.man:1.6 --- xc/doc/man/X11/XCKMping.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCKMping.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCKMping.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCKMping.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XChangeKeyboardMapping 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XChangeKeyboardMapping 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifierMap XModifierKeymap \- manipulate keyboard encoding and keyboard encoding structure .SH SYNTAX Index: xc/doc/man/X11/XCMEvent.man diff -u xc/doc/man/X11/XCMEvent.man:1.3 xc/doc/man/X11/XCMEvent.man:1.4 --- xc/doc/man/X11/XCMEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCMEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCMEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCMEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XClientMessageEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XClientMessageEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XClientMessageEvent \- ClientMessage event structure .SH STRUCTURES Index: xc/doc/man/X11/XCPCntrl.man diff -u xc/doc/man/X11/XCPCntrl.man:1.3 xc/doc/man/X11/XCPCntrl.man:1.4 --- xc/doc/man/X11/XCPCntrl.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCPCntrl.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCPCntrl.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCPCntrl.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XChangePointerControl 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XChangePointerControl 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XChangePointerControl, XGetPointerControl \- control pointer .SH SYNTAX Index: xc/doc/man/X11/XCSSet.man diff -u xc/doc/man/X11/XCSSet.man:1.3 xc/doc/man/X11/XCSSet.man:1.4 --- xc/doc/man/X11/XCSSet.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCSSet.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCSSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCSSet.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XChangeSaveSet 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XChangeSaveSet 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XChangeSaveSet, XAddToSaveSet, XRemoveFromSaveSet \- change a client's save set .SH SYNTAX Index: xc/doc/man/X11/XCWAttrib.man diff -u xc/doc/man/X11/XCWAttrib.man:1.3 xc/doc/man/X11/XCWAttrib.man:1.4 --- xc/doc/man/X11/XCWAttrib.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCWAttrib.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCWAttrib.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCWAttrib.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XChangeWindowAttributes 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XChangeWindowAttributes 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XChangeWindowAttributes, XSetWindowBackground, XSetWindowBackgroundPixmap, XSetWindowBorder, XSetWindowBorderPixmap, XSetWindowColormap \- change window attributes .SH SYNTAX Index: xc/doc/man/X11/XCWEvent.man diff -u xc/doc/man/X11/XCWEvent.man:1.3 xc/doc/man/X11/XCWEvent.man:1.4 --- xc/doc/man/X11/XCWEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCWEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCWEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCWEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateWindowEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateWindowEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateWindowEvent \- CreateNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XCirEvent.man diff -u xc/doc/man/X11/XCirEvent.man:1.3 xc/doc/man/X11/XCirEvent.man:1.4 --- xc/doc/man/X11/XCirEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCirEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCirEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCirEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCirculateEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCirculateEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCirculateEvent \- CirculateNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XCirREven.man diff -u xc/doc/man/X11/XCirREven.man:1.3 xc/doc/man/X11/XCirREven.man:1.4 --- xc/doc/man/X11/XCirREven.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCirREven.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCirREven.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCirREven.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCirculateRequestEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCirculateRequestEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCirculateRequestEvent \- CirculateRequest event structure .SH STRUCTURES Index: xc/doc/man/X11/XClrArea.man diff -u xc/doc/man/X11/XClrArea.man:1.4 xc/doc/man/X11/XClrArea.man:1.5 --- xc/doc/man/X11/XClrArea.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XClrArea.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XClrArea.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XClrArea.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XClearArea 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XClearArea 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XClearArea, XClearWindow \- clear area or window .SH SYNTAX Index: xc/doc/man/X11/XCmpEvent.man diff -u xc/doc/man/X11/XCmpEvent.man:1.3 xc/doc/man/X11/XCmpEvent.man:1.4 --- xc/doc/man/X11/XCmpEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCmpEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCmpEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCmpEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XColormapEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XColormapEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XColormapEvent \- ColormapNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XConEvent.man diff -u xc/doc/man/X11/XConEvent.man:1.3 xc/doc/man/X11/XConEvent.man:1.4 --- xc/doc/man/X11/XConEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XConEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XConEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XConEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XConfigureEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XConfigureEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XConfigureEvent \- ConfigureNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XConREven.man diff -u xc/doc/man/X11/XConREven.man:1.3 xc/doc/man/X11/XConREven.man:1.4 --- xc/doc/man/X11/XConREven.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XConREven.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XConREven.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XConREven.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XConfigureRequestEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XConfigureRequestEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XConfigureRequestEvent \- ConfigureRequest event structure .SH STRUCTURES Index: xc/doc/man/X11/XConfWin.man diff -u xc/doc/man/X11/XConfWin.man:1.6 xc/doc/man/X11/XConfWin.man:1.7 --- xc/doc/man/X11/XConfWin.man:1.6 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XConfWin.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XConfWin.man,v 1.6 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XConfWin.man,v 1.7 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XConfigureWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XConfigureWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges \- configure windows and window changes structure .SH SYNTAX Index: xc/doc/man/X11/XCopyArea.man diff -u xc/doc/man/X11/XCopyArea.man:1.4 xc/doc/man/X11/XCopyArea.man:1.5 --- xc/doc/man/X11/XCopyArea.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCopyArea.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCopyArea.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCopyArea.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCopyArea 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCopyArea 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCopyArea, XCopyPlane \- copy areas .SH SYNTAX Index: xc/doc/man/X11/XCreCmap.man diff -u xc/doc/man/X11/XCreCmap.man:1.5 xc/doc/man/X11/XCreCmap.man:1.6 --- xc/doc/man/X11/XCreCmap.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCreCmap.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreCmap.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreCmap.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateColormap 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateColormap 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateColormap, XCopyColormapAndFree, XFreeColormap, XColor \- create, copy, or destroy colormaps and color structure .SH SYNTAX Index: xc/doc/man/X11/XCreFCur.man diff -u xc/doc/man/X11/XCreFCur.man:1.4 xc/doc/man/X11/XCreFCur.man:1.5 --- xc/doc/man/X11/XCreFCur.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreFCur.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreFCur.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreFCur.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateFontCursor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateFontCursor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateFontCursor, XCreatePixmapCursor, XCreateGlyphCursor \- create cursors .SH SYNTAX Index: xc/doc/man/X11/XCreFSet.man diff -u xc/doc/man/X11/XCreFSet.man:1.3 xc/doc/man/X11/XCreFSet.man:1.5 --- xc/doc/man/X11/XCreFSet.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreFSet.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreFSet.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateFontSet 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateFontSet 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateFontSet, XFreeFontSet \- create and free an international text drawing font set .SH SYNTAX @@ -254,9 +254,9 @@ For example: .LP .Ds 0 -"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240-JISX0208.1983-0,\\ --JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120-JISX0201.1976-0,\\ --GB-Fixed-Medium-R-Normal--26-180-100-100-C-240-GB2312-1980.0,\\ +"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240-JISX0208.1983-0,\\\& +-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120-JISX0201.1976-0,\\\& +-GB-Fixed-Medium-R-Normal--26-180-100-100-C-240-GB2312-1980.0,\\\& -Adobe-Courier-Bold-R-Normal--25-180-75-75-M-150-ISO8859-1" .De .LP @@ -266,9 +266,9 @@ For example: .LP .Ds 0 -"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\ --JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,\\ --GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\ +"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\\& +-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,\\\& +-GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,\\\& -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150" .De .LP Index: xc/doc/man/X11/XCreGC.man diff -u xc/doc/man/X11/XCreGC.man:1.7 xc/doc/man/X11/XCreGC.man:1.8 --- xc/doc/man/X11/XCreGC.man:1.7 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCreGC.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreGC.man,v 1.7 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreGC.man,v 1.8 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XCreateGC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateGC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateGC, XCopyGC, XChangeGC, XGetGCValues, XFreeGC, XGContextFromGC, XGCValues \- create or free graphics contexts and graphics context structure .SH SYNTAX Index: xc/doc/man/X11/XCreIC.man diff -u xc/doc/man/X11/XCreIC.man:1.3 xc/doc/man/X11/XCreIC.man:1.4 --- xc/doc/man/X11/XCreIC.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreIC.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreIC.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreIC.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateIC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateIC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateIC, XDestroyIC, XIMOfIC \- create, destroy, and obtain the input method of an input context .SH SYNTAX Index: xc/doc/man/X11/XCreImage.man diff -u xc/doc/man/X11/XCreImage.man:1.3 xc/doc/man/X11/XCreImage.man:1.4 --- xc/doc/man/X11/XCreImage.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreImage.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreImage.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreImage.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateImage 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateImage 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XInitImage, XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel, XDestroyImage \- image utilities .SH SYNTAX Index: xc/doc/man/X11/XCreOC.man diff -u xc/doc/man/X11/XCreOC.man:1.3 xc/doc/man/X11/XCreOC.man:1.4 --- xc/doc/man/X11/XCreOC.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreOC.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreOC.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreOC.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateOC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateOC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateOC, XDestroyOC, XSetOCValues, XGetOCValues, XOMOfOC \- create output contexts .SH SYNTAX Index: xc/doc/man/X11/XCrePmap.man diff -u xc/doc/man/X11/XCrePmap.man:1.3 xc/doc/man/X11/XCrePmap.man:1.4 --- xc/doc/man/X11/XCrePmap.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCrePmap.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCrePmap.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCrePmap.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreatePixmap 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreatePixmap 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreatePixmap, XFreePixmap \- create or destroy pixmaps .SH SYNTAX Index: xc/doc/man/X11/XCreReg.man diff -u xc/doc/man/X11/XCreReg.man:1.3 xc/doc/man/X11/XCreReg.man:1.4 --- xc/doc/man/X11/XCreReg.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XCreReg.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreReg.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XCreReg.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCreateRegion 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateRegion 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateRegion, XSetRegion, XDestroyRegion \- create or destroy regions .SH SYNTAX Index: xc/doc/man/X11/XCreWin.man diff -u xc/doc/man/X11/XCreWin.man:1.6 xc/doc/man/X11/XCreWin.man:1.7 --- xc/doc/man/X11/XCreWin.man:1.6 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCreWin.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCreWin.man,v 1.6 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCreWin.man,v 1.7 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XCreateWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCreateWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes \- create windows and window attributes structure .SH SYNTAX Index: xc/doc/man/X11/XCroEvent.man diff -u xc/doc/man/X11/XCroEvent.man:1.3 xc/doc/man/X11/XCroEvent.man:1.4 --- xc/doc/man/X11/XCroEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XCroEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XCroEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XCroEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XCrossingEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XCrossingEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XCrossingEvent \- EnterNotify and LeaveNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XDWEvent.man diff -u xc/doc/man/X11/XDWEvent.man:1.3 xc/doc/man/X11/XDWEvent.man:1.4 --- xc/doc/man/X11/XDWEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XDWEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDWEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDWEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDestroyWindowEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDestroyWindowEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDestroyWindowEvent \- DestroyNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XDefCur.man diff -u xc/doc/man/X11/XDefCur.man:1.3 xc/doc/man/X11/XDefCur.man:1.4 --- xc/doc/man/X11/XDefCur.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDefCur.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDefCur.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDefCur.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDefineCursor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDefineCursor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDefineCursor, XUndefineCursor \- define cursors .SH SYNTAX Index: xc/doc/man/X11/XDesWin.man diff -u xc/doc/man/X11/XDesWin.man:1.3 xc/doc/man/X11/XDesWin.man:1.4 --- xc/doc/man/X11/XDesWin.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDesWin.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDesWin.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDesWin.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDestroyWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDestroyWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDestroyWindow, XDestroySubwindows \- destroy windows .SH SYNTAX Index: xc/doc/man/X11/XDrArc.man diff -u xc/doc/man/X11/XDrArc.man:1.5 xc/doc/man/X11/XDrArc.man:1.6 --- xc/doc/man/X11/XDrArc.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XDrArc.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrArc.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDrArc.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" e -.TH XDrawArc 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawArc 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawArc, XDrawArcs, XArc \- draw arcs and arc structure .SH SYNTAX Index: xc/doc/man/X11/XDrIStr.man diff -u xc/doc/man/X11/XDrIStr.man:1.4 xc/doc/man/X11/XDrIStr.man:1.5 --- xc/doc/man/X11/XDrIStr.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDrIStr.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrIStr.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDrIStr.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawImageString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawImageString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawImageString, XDrawImageString16 \- draw image text .SH SYNTAX Index: xc/doc/man/X11/XDrLine.man diff -u xc/doc/man/X11/XDrLine.man:1.3 xc/doc/man/X11/XDrLine.man:1.4 --- xc/doc/man/X11/XDrLine.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDrLine.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrLine.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDrLine.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawLine 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawLine 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawLine, XDrawLines, XDrawSegments, XSegment \- draw lines, polygons, and line structure .SH SYNTAX Index: xc/doc/man/X11/XDrPoint.man diff -u xc/doc/man/X11/XDrPoint.man:1.3 xc/doc/man/X11/XDrPoint.man:1.4 --- xc/doc/man/X11/XDrPoint.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDrPoint.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrPoint.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDrPoint.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawPoint 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawPoint 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawPoint, XDrawPoints, XPoint \- draw points and points structure .SH SYNTAX Index: xc/doc/man/X11/XDrRect.man diff -u xc/doc/man/X11/XDrRect.man:1.3 xc/doc/man/X11/XDrRect.man:1.4 --- xc/doc/man/X11/XDrRect.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDrRect.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrRect.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDrRect.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawRectangle 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawRectangle 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawRectangle, XDrawRectangles, XRectangle \- draw rectangles and rectangles structure .SH SYNTAX Index: xc/doc/man/X11/XDrString.man diff -u xc/doc/man/X11/XDrString.man:1.4 xc/doc/man/X11/XDrString.man:1.5 --- xc/doc/man/X11/XDrString.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XDrString.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrString.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XDrString.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawString, XDrawString16 \- draw text characters .SH SYNTAX Index: xc/doc/man/X11/XDrText.man diff -u xc/doc/man/X11/XDrText.man:1.5 xc/doc/man/X11/XDrText.man:1.6 --- xc/doc/man/X11/XDrText.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XDrText.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XDrText.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XDrText.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XDrawText 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XDrawText 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XDrawText, XDrawText16, XTextItem, XTextItem16 \- draw polytext text and text drawing structures .SH SYNTAX Index: xc/doc/man/X11/XERegion.man diff -u xc/doc/man/X11/XERegion.man:1.4 xc/doc/man/X11/XERegion.man:1.5 --- xc/doc/man/X11/XERegion.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XERegion.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XERegion.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XERegion.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XEmptyRegion 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XEmptyRegion 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XEmptyRegion, XEqualRegion, XPointInRegion, XRectInRegion \- determine if regions are empty or equal .SH SYNTAX Index: xc/doc/man/X11/XEnumDB.man diff -u xc/doc/man/X11/XEnumDB.man:1.5 xc/doc/man/X11/XEnumDB.man:1.6 --- xc/doc/man/X11/XEnumDB.man:1.5 Thu May 29 17:48:04 2003 +++ xc/doc/man/X11/XEnumDB.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XEnumDB.man,v 1.5 2003/05/29 21:48:04 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XEnumDB.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XrmEnumerateDatabase 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmEnumerateDatabase 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmEnumerateDatabase \- enumerate resource database entries .SH SYNTAX Index: xc/doc/man/X11/XEofFSet.man diff -u xc/doc/man/X11/XEofFSet.man:1.3 xc/doc/man/X11/XEofFSet.man:1.4 --- xc/doc/man/X11/XEofFSet.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XEofFSet.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XEofFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XEofFSet.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XExtentsOfFontSet 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XExtentsOfFontSet 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XExtentsOfFontSet \- obtain the maximum extents structure for a font set .SH SYNTAX Index: xc/doc/man/X11/XErrEvent.man diff -u xc/doc/man/X11/XErrEvent.man:1.3 xc/doc/man/X11/XErrEvent.man:1.4 --- xc/doc/man/X11/XErrEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XErrEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XErrEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XErrEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XErrorEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XErrorEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XErrorEvent \- X error event structure .SH STRUCTURES Index: xc/doc/man/X11/XExpEvent.man diff -u xc/doc/man/X11/XExpEvent.man:1.3 xc/doc/man/X11/XExpEvent.man:1.4 --- xc/doc/man/X11/XExpEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XExpEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XExpEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XExpEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XExposeEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XExposeEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XExposeEvent \- Expose event structure .SH STRUCTURES Index: xc/doc/man/X11/XFCEvent.man diff -u xc/doc/man/X11/XFCEvent.man:1.3 xc/doc/man/X11/XFCEvent.man:1.4 --- xc/doc/man/X11/XFCEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XFCEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFCEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFCEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFocusChangeEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFocusChangeEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFocusChangeEvent \- FocusIn and FocusOut event structure .SH STRUCTURES Index: xc/doc/man/X11/XFEvent.man diff -u xc/doc/man/X11/XFEvent.man:1.3 xc/doc/man/X11/XFEvent.man:1.4 --- xc/doc/man/X11/XFEvent.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XFEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFEvent.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XFEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFilterEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFilterEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFilterEvent \- filter X events for an input method .SH SYNTAX Index: xc/doc/man/X11/XFSExt.man diff -u xc/doc/man/X11/XFSExt.man:1.3 xc/doc/man/X11/XFSExt.man:1.4 --- xc/doc/man/X11/XFSExt.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XFSExt.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFSExt.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XFSExt.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFontSetExtents 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFontSetExtents 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFontSetExtents \- XFontSetExtents structure .SH STRUCTURES Index: xc/doc/man/X11/XFillRect.man diff -u xc/doc/man/X11/XFillRect.man:1.4 xc/doc/man/X11/XFillRect.man:1.5 --- xc/doc/man/X11/XFillRect.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XFillRect.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFillRect.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XFillRect.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFillRectangle 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFillRectangle 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFillRectangle, XFillRectangles, XFillPolygon, XFillArc, XFillArcs \- fill rectangles, polygons, or arcs .SH SYNTAX Index: xc/doc/man/X11/XFlush.man diff -u xc/doc/man/X11/XFlush.man:1.3 xc/doc/man/X11/XFlush.man:1.4 --- xc/doc/man/X11/XFlush.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XFlush.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFlush.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XFlush.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFlush 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFlush 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFlush, XSync, XEventsQueued, XPending \- handle output buffer or event queue .SH SYNTAX Index: xc/doc/man/X11/XFofFSet.man diff -u xc/doc/man/X11/XFofFSet.man:1.3 xc/doc/man/X11/XFofFSet.man:1.4 --- xc/doc/man/X11/XFofFSet.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XFofFSet.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFofFSet.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XFofFSet.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFontsOfFontSet 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFontsOfFontSet 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFontsOfFontSet, XBaseFontNameListOfFontSet, XLocaleOfFontSet, XContextDependentDrawing, XContextualDrawing, XDirectionalDependentDrawing \- obtain fontset information .SH SYNTAX Index: xc/doc/man/X11/XFree.man diff -u xc/doc/man/X11/XFree.man:1.3 xc/doc/man/X11/XFree.man:1.4 --- xc/doc/man/X11/XFree.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XFree.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XFree.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XFree.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XFree 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XFree 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XFree \- free client data .SH SYNTAX Index: xc/doc/man/X11/XGEEvent.man diff -u xc/doc/man/X11/XGEEvent.man:1.3 xc/doc/man/X11/XGEEvent.man:1.4 --- xc/doc/man/X11/XGEEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XGEEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGEEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGEEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGraphicsExposeEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGraphicsExposeEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGraphicsExposeEvent, XNoExposeEvent \- GraphicsExpose and NoExpose event structures .SH STRUCTURES Index: xc/doc/man/X11/XGEvent.man diff -u xc/doc/man/X11/XGEvent.man:1.3 xc/doc/man/X11/XGEvent.man:1.4 --- xc/doc/man/X11/XGEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XGEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGravityEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGravityEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGravityEvent \- GravityNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XGFDBase.man diff -u xc/doc/man/X11/XGFDBase.man:1.3 xc/doc/man/X11/XGFDBase.man:1.4 --- xc/doc/man/X11/XGFDBase.man:1.3 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XGFDBase.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGFDBase.man,v 1.3 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGFDBase.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XrmGetFileDatabase 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmGetFileDatabase 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmGetFileDatabase, XrmPutFileDatabase, XrmGetStringDatabase, XrmLocaleOfDatabase, XrmGetDatabase, XrmSetDatabase, XrmDestroyDatabase \- retrieve and store resource databases .SH SYNTAX Index: xc/doc/man/X11/XGetRes.man diff -u xc/doc/man/X11/XGetRes.man:1.4 xc/doc/man/X11/XGetRes.man:1.5 --- xc/doc/man/X11/XGetRes.man:1.4 Mon Apr 28 18:17:54 2003 +++ xc/doc/man/X11/XGetRes.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetRes.man,v 1.4 2003/04/28 22:17:54 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGetRes.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" e -.TH XrmGetResource 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmGetResource 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmGetResource, XrmQGetResource, XrmQGetSearchList, XrmQGetSearchResource \- retrieve database resources and search lists .SH SYNTAX Index: xc/doc/man/X11/XGetVInfo.man diff -u xc/doc/man/X11/XGetVInfo.man:1.5 xc/doc/man/X11/XGetVInfo.man:1.6 --- xc/doc/man/X11/XGetVInfo.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XGetVInfo.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetVInfo.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGetVInfo.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XGetVisualInfo 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGetVisualInfo 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual, XVisualInfo \- obtain visual information and visual structure .SH SYNTAX Index: xc/doc/man/X11/XGetWAttr.man diff -u xc/doc/man/X11/XGetWAttr.man:1.4 xc/doc/man/X11/XGetWAttr.man:1.5 --- xc/doc/man/X11/XGetWAttr.man:1.4 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XGetWAttr.man Thu Feb 10 22:02:54 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.4 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -142,7 +142,7 @@ .. .ny0 '\" t -.TH XGetWindowAttributes 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGetWindowAttributes 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGetWindowAttributes, XGetGeometry, XWindowAttributes \- get current window attribute or geometry and current window attributes structure .SH SYNTAX Index: xc/doc/man/X11/XGetWProp.man diff -u xc/doc/man/X11/XGetWProp.man:1.3 xc/doc/man/X11/XGetWProp.man:1.4 --- xc/doc/man/X11/XGetWProp.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGetWProp.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGetWProp.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGetWProp.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGetWindowProperty 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGetWindowProperty 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGetWindowProperty, XListProperties, XChangeProperty, XRotateWindowProperties, XDeleteProperty \- obtain and change window properties .SH SYNTAX Index: xc/doc/man/X11/XGrButton.man diff -u xc/doc/man/X11/XGrButton.man:1.3 xc/doc/man/X11/XGrButton.man:1.4 --- xc/doc/man/X11/XGrButton.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGrButton.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrButton.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGrButton.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGrabButton 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGrabButton 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGrabButton, XUngrabButton \- grab pointer buttons .SH SYNTAX Index: xc/doc/man/X11/XGrKey.man diff -u xc/doc/man/X11/XGrKey.man:1.3 xc/doc/man/X11/XGrKey.man:1.4 --- xc/doc/man/X11/XGrKey.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGrKey.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrKey.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGrKey.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGrabKey 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGrabKey 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGrabKey, XUngrabKey \- grab keyboard keys .SH SYNTAX Index: xc/doc/man/X11/XGrKeybrd.man diff -u xc/doc/man/X11/XGrKeybrd.man:1.3 xc/doc/man/X11/XGrKeybrd.man:1.4 --- xc/doc/man/X11/XGrKeybrd.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGrKeybrd.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrKeybrd.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGrKeybrd.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGrabKeyboard 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGrabKeyboard 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGrabKeyboard, XUngrabKeyboard \- grab the keyboard .SH SYNTAX Index: xc/doc/man/X11/XGrPntr.man diff -u xc/doc/man/X11/XGrPntr.man:1.3 xc/doc/man/X11/XGrPntr.man:1.4 --- xc/doc/man/X11/XGrPntr.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGrPntr.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrPntr.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGrPntr.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGrabPointer 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGrabPointer 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGrabPointer, XUngrabPointer, XChangeActivePointerGrab \- grab the pointer .SH SYNTAX Index: xc/doc/man/X11/XGrServer.man diff -u xc/doc/man/X11/XGrServer.man:1.3 xc/doc/man/X11/XGrServer.man:1.4 --- xc/doc/man/X11/XGrServer.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XGrServer.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XGrServer.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XGrServer.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XGrabServer 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XGrabServer 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XGrabServer, XUngrabServer \- grab the server .SH SYNTAX Index: xc/doc/man/X11/XIcWin.man diff -u xc/doc/man/X11/XIcWin.man:1.4 xc/doc/man/X11/XIcWin.man:1.5 --- xc/doc/man/X11/XIcWin.man:1.4 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XIcWin.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIcWin.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XIcWin.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XIconifyWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XIconifyWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XIconifyWindow, XWithdrawWindow, XReconfigureWMWindow \- manipulate top-level windows .SH SYNTAX Index: xc/doc/man/X11/XIfEvent.man diff -u xc/doc/man/X11/XIfEvent.man:1.4 xc/doc/man/X11/XIfEvent.man:1.5 --- xc/doc/man/X11/XIfEvent.man:1.4 Mon Jan 12 15:54:21 2004 +++ xc/doc/man/X11/XIfEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIfEvent.man,v 1.4 2004/01/12 20:54:21 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XIfEvent.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XIfEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XIfEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XIfEvent, XCheckIfEvent, XPeekIfEvent \- check the event queue with a predicate procedure .SH SYNTAX Index: xc/doc/man/X11/XInitial.man diff -u xc/doc/man/X11/XInitial.man:1.5 xc/doc/man/X11/XInitial.man:1.6 --- xc/doc/man/X11/XInitial.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XInitial.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInitial.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XInitial.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XrmInitialize 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmInitialize 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmInitialize, XrmParseCommand, XrmValue, XrmOptionKind, XrmOptionDescRec \- initialize the Resource Manager, Resource Manager structures, and parse the command line .SH SYNTAX Index: xc/doc/man/X11/XInstCmap.man diff -u xc/doc/man/X11/XInstCmap.man:1.4 xc/doc/man/X11/XInstCmap.man:1.5 --- xc/doc/man/X11/XInstCmap.man:1.4 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XInstCmap.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInstCmap.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XInstCmap.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XInstallColormap 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XInstallColormap 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XInstallColormap, XUninstallColormap, XListInstalledColormaps \- control colormaps .SH SYNTAX Index: xc/doc/man/X11/XIntConn.man diff -u xc/doc/man/X11/XIntConn.man:1.4 xc/doc/man/X11/XIntConn.man:1.5 --- xc/doc/man/X11/XIntConn.man:1.4 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XIntConn.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XIntConn.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XIntConn.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XAddConnectionWatch 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XAddConnectionWatch 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XAddConnectionWatch, XRemoveConnectionWatch, XProcessInternalConnection, XInternalConnectionNumbers \- handle Xlib internal connections .SH SYNTAX Index: xc/doc/man/X11/XInterReg.man diff -u xc/doc/man/X11/XInterReg.man:1.4 xc/doc/man/X11/XInterReg.man:1.5 --- xc/doc/man/X11/XInterReg.man:1.4 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XInterReg.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInterReg.man,v 1.4 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XInterReg.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XIntersectRegion 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XIntersectRegion 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion \- region arithmetic .SH SYNTAX Index: xc/doc/man/X11/XInternA.man diff -u xc/doc/man/X11/XInternA.man:1.3 xc/doc/man/X11/XInternA.man:1.4 --- xc/doc/man/X11/XInternA.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XInternA.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XInternA.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XInternA.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XInternAtom 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XInternAtom 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames \- create or return atom names .SH SYNTAX Index: xc/doc/man/X11/XKMapEven.man diff -u xc/doc/man/X11/XKMapEven.man:1.3 xc/doc/man/X11/XKMapEven.man:1.4 --- xc/doc/man/X11/XKMapEven.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XKMapEven.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XKMapEven.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XKMapEven.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XKeymapEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XKeymapEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XKeymapEvent \- KeymapNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XListFont.man diff -u xc/doc/man/X11/XListFont.man:1.3 xc/doc/man/X11/XListFont.man:1.4 --- xc/doc/man/X11/XListFont.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XListFont.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XListFont.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XListFont.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XListFonts 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XListFonts 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo \- obtain or free font names and information .SH SYNTAX Index: xc/doc/man/X11/XLoadFont.man diff -u xc/doc/man/X11/XLoadFont.man:1.4 xc/doc/man/X11/XLoadFont.man:1.5 --- xc/doc/man/X11/XLoadFont.man:1.4 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XLoadFont.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XLoadFont.man,v 1.4 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XLoadFont.man,v 1.5 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XLoadFont 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XLoadFont 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XLoadFont, XQueryFont, XLoadQueryFont, XFreeFont, XGetFontProperty, XUnloadFont, XCharStruct, XFontProp, XChar2b, XFontStruct \- load or unload fonts and font metric structures .SH SYNTAX Index: xc/doc/man/X11/XLookKsym.man diff -u xc/doc/man/X11/XLookKsym.man:1.5 xc/doc/man/X11/XLookKsym.man:1.6 --- xc/doc/man/X11/XLookKsym.man:1.5 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XLookKsym.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XLookKsym.man,v 1.5 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XLookKsym.man,v 1.6 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XLookupKeysym 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XLookupKeysym 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeysym \- handle keyboard input events in Latin-1 .SH SYNTAX Index: xc/doc/man/X11/XMDBases.man diff -u xc/doc/man/X11/XMDBases.man:1.3 xc/doc/man/X11/XMDBases.man:1.4 --- xc/doc/man/X11/XMDBases.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XMDBases.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMDBases.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XMDBases.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XrmMergeDatabases 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmMergeDatabases 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmMergeDatabases, XrmCombineDatabase, XrmCombineFileDatabase \- merge resource databases .SH SYNTAX Index: xc/doc/man/X11/XMEvent.man diff -u xc/doc/man/X11/XMEvent.man:1.3 xc/doc/man/X11/XMEvent.man:1.4 --- xc/doc/man/X11/XMEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XMEvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XMEvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XMapEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XMapEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XMapEvent, XMappingEvent \- MapNotify and MappingNotify event structures .SH STRUCTURES Index: xc/doc/man/X11/XMREvent.man diff -u xc/doc/man/X11/XMREvent.man:1.3 xc/doc/man/X11/XMREvent.man:1.4 --- xc/doc/man/X11/XMREvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XMREvent.man Thu Feb 10 22:02:54 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMREvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XMREvent.man,v 1.4 2005/02/11 03:02:54 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XMapRequestEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XMapRequestEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XMapRequestEvent \- MapRequest event structure .SH STRUCTURES Index: xc/doc/man/X11/XMapWin.man diff -u xc/doc/man/X11/XMapWin.man:1.3 xc/doc/man/X11/XMapWin.man:1.4 --- xc/doc/man/X11/XMapWin.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XMapWin.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XMapWin.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XMapWin.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XMapWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XMapWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XMapWindow, XMapRaised, XMapSubwindows \- map windows .SH SYNTAX Index: xc/doc/man/X11/XNEvent.man diff -u xc/doc/man/X11/XNEvent.man:1.3 xc/doc/man/X11/XNEvent.man:1.4 --- xc/doc/man/X11/XNEvent.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XNEvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XNEvent.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XNEvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XNextEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XNextEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent, XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent \- select events by type .SH SYNTAX Index: xc/doc/man/X11/XNoOp.man diff -u xc/doc/man/X11/XNoOp.man:1.3 xc/doc/man/X11/XNoOp.man:1.4 --- xc/doc/man/X11/XNoOp.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XNoOp.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XNoOp.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XNoOp.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XNoOp 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XNoOp 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XNoOp \- No Operation .SH SYNTAX Index: xc/doc/man/X11/XOpDsply.man diff -u xc/doc/man/X11/XOpDsply.man:1.3 xc/doc/man/X11/XOpDsply.man:1.4 --- xc/doc/man/X11/XOpDsply.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XOpDsply.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpDsply.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XOpDsply.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XOpenDisplay 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XOpenDisplay 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XOpenDisplay, XCloseDisplay \- connect or disconnect to X server .SH SYNTAX Index: xc/doc/man/X11/XOpenIM.man diff -u xc/doc/man/X11/XOpenIM.man:1.3 xc/doc/man/X11/XOpenIM.man:1.4 --- xc/doc/man/X11/XOpenIM.man:1.3 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XOpenIM.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpenIM.man,v 1.3 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XOpenIM.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XOpenIM 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XOpenIM 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XOpenIM, XCloseIM, XSetIMValues, XGetIMValues, XDisplayOfIM, XLocaleOfIM, XRegisterIMInstantiateCallback, XUnregisterIMInstantiateCallback \- open, close, and otain input method information .SH SYNTAX Index: xc/doc/man/X11/XOpenOM.man diff -u xc/doc/man/X11/XOpenOM.man:1.5 xc/doc/man/X11/XOpenOM.man:1.6 --- xc/doc/man/X11/XOpenOM.man:1.5 Mon Apr 28 18:17:55 2003 +++ xc/doc/man/X11/XOpenOM.man Thu Feb 10 22:02:55 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XOpenOM.man,v 1.5 2003/04/28 22:17:55 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XOpenOM.man,v 1.6 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XOpenOM 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XOpenOM 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XOpenOM, XCloseOM, XSetOMValues, XGetOMValues, XDisplayOfOM, XLocaleOfOM \- open output methods .SH SYNTAX Index: xc/doc/man/X11/XPEvent.man diff -u xc/doc/man/X11/XPEvent.man:1.3 xc/doc/man/X11/XPEvent.man:1.4 --- xc/doc/man/X11/XPEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XPEvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XPEvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XPropertyEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XPropertyEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XPropertyEvent \- PropertyNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XParGeom.man diff -u xc/doc/man/X11/XParGeom.man:1.4 xc/doc/man/X11/XParGeom.man:1.5 --- xc/doc/man/X11/XParGeom.man:1.4 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XParGeom.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XParGeom.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XParGeom.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XParseGeometry 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XParseGeometry 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XParseGeometry, XWMGeometry \- parse window geometry .SH SYNTAX Index: xc/doc/man/X11/XPolyReg.man diff -u xc/doc/man/X11/XPolyReg.man:1.3 xc/doc/man/X11/XPolyReg.man:1.4 --- xc/doc/man/X11/XPolyReg.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XPolyReg.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPolyReg.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XPolyReg.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XPolygonRegion 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XPolygonRegion 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XPolygonRegion, XClipBox \- generate regions .SH SYNTAX Index: xc/doc/man/X11/XPutBEvnt.man diff -u xc/doc/man/X11/XPutBEvnt.man:1.3 xc/doc/man/X11/XPutBEvnt.man:1.4 --- xc/doc/man/X11/XPutBEvnt.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XPutBEvnt.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutBEvnt.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XPutBEvnt.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XPutBackEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XPutBackEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XPutBackEvent \- put events back on the queue .SH SYNTAX Index: xc/doc/man/X11/XPutImage.man diff -u xc/doc/man/X11/XPutImage.man:1.4 xc/doc/man/X11/XPutImage.man:1.5 --- xc/doc/man/X11/XPutImage.man:1.4 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XPutImage.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutImage.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XPutImage.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XPutImage 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XPutImage 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XPutImage, XGetImage, XGetSubImage \- transfer images .SH SYNTAX Index: xc/doc/man/X11/XPutRes.man diff -u xc/doc/man/X11/XPutRes.man:1.5 xc/doc/man/X11/XPutRes.man:1.6 --- xc/doc/man/X11/XPutRes.man:1.5 Mon Aug 4 06:32:20 2003 +++ xc/doc/man/X11/XPutRes.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XPutRes.man,v 1.5 2003/08/04 10:32:20 eich Exp $ +.\" $XFree86: xc/doc/man/X11/XPutRes.man,v 1.6 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XrmPutResource 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmPutResource 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmPutResource, XrmQPutResource, XrmPutStringResource, XrmQPutStringResource, XrmPutLineResource \- store database resources .SH SYNTAX Index: xc/doc/man/X11/XQBSize.man diff -u xc/doc/man/X11/XQBSize.man:1.3 xc/doc/man/X11/XQBSize.man:1.4 --- xc/doc/man/X11/XQBSize.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XQBSize.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQBSize.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XQBSize.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XQueryBestSize 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XQueryBestSize 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XQueryBestSize, XQueryBestTile, XQueryBestStipple \- determine efficient sizes .SH SYNTAX Index: xc/doc/man/X11/XQColor.man diff -u xc/doc/man/X11/XQColor.man:1.5 xc/doc/man/X11/XQColor.man:1.6 --- xc/doc/man/X11/XQColor.man:1.5 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XQColor.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQColor.man,v 1.5 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XQColor.man,v 1.6 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XQueryColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XQueryColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XQueryColor, XQueryColors, XLookupColor, XParseColor \- obtain color values .SH SYNTAX Index: xc/doc/man/X11/XQPointer.man diff -u xc/doc/man/X11/XQPointer.man:1.3 xc/doc/man/X11/XQPointer.man:1.4 --- xc/doc/man/X11/XQPointer.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XQPointer.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQPointer.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XQPointer.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XQueryPointer 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XQueryPointer 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XQueryPointer \- get pointer coordinates .SH SYNTAX Index: xc/doc/man/X11/XQTree.man diff -u xc/doc/man/X11/XQTree.man:1.4 xc/doc/man/X11/XQTree.man:1.5 --- xc/doc/man/X11/XQTree.man:1.4 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XQTree.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XQTree.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XQTree.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XQueryTree 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XQueryTree 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XQueryTree \- query window tree information .SH SYNTAX Index: xc/doc/man/X11/XREvent.man diff -u xc/doc/man/X11/XREvent.man:1.3 xc/doc/man/X11/XREvent.man:1.4 --- xc/doc/man/X11/XREvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XREvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XREvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XREvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XReparentEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XReparentEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XReparentEvent \- ReparentNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XRMStr.man diff -u xc/doc/man/X11/XRMStr.man:1.3 xc/doc/man/X11/XRMStr.man:1.4 --- xc/doc/man/X11/XRMStr.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XRMStr.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRMStr.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XRMStr.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XResourceManagerString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XResourceManagerString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XResourceManagerString, XScreenResourceString \- obtain server resource properties .SH SYNTAX Index: xc/doc/man/X11/XRREvent.man diff -u xc/doc/man/X11/XRREvent.man:1.3 xc/doc/man/X11/XRREvent.man:1.4 --- xc/doc/man/X11/XRREvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XRREvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRREvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XRREvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XResizeRequestEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XResizeRequestEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XResizeRequestEvent \- ResizeRequest event structure .SH STRUCTURES Index: xc/doc/man/X11/XRaiseWin.man diff -u xc/doc/man/X11/XRaiseWin.man:1.3 xc/doc/man/X11/XRaiseWin.man:1.4 --- xc/doc/man/X11/XRaiseWin.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XRaiseWin.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRaiseWin.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XRaiseWin.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XRaiseWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XRaiseWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XRaiseWindow, XLowerWindow, XCirculateSubwindows, XCirculateSubwindowsUp, XCirculateSubwindowsDown, XRestackWindows \- change window stacking order .SH SYNTAX Index: xc/doc/man/X11/XReadBF.man diff -u xc/doc/man/X11/XReadBF.man:1.4 xc/doc/man/X11/XReadBF.man:1.5 --- xc/doc/man/X11/XReadBF.man:1.4 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XReadBF.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XReadBF.man,v 1.4 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XReadBF.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XReadBitmapFile 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XReadBitmapFile 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XReadBitmapFile, XReadBitmapFileData, XWriteBitmapFile, XCreatePixmapFromBitmapData, XCreateBitmapFromData \- manipulate bitmaps .SH SYNTAX Index: xc/doc/man/X11/XRecCur.man diff -u xc/doc/man/X11/XRecCur.man:1.3 xc/doc/man/X11/XRecCur.man:1.4 --- xc/doc/man/X11/XRecCur.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XRecCur.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XRecCur.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XRecCur.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XRecolorCursor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XRecolorCursor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XRecolorCursor, XFreeCursor, XQueryBestCursor \- manipulate cursors .SH SYNTAX Index: xc/doc/man/X11/XReparWin.man diff -u xc/doc/man/X11/XReparWin.man:1.3 xc/doc/man/X11/XReparWin.man:1.4 --- xc/doc/man/X11/XReparWin.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XReparWin.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XReparWin.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XReparWin.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XReparentWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XReparentWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XReparentWindow \- reparent windows .SH SYNTAX Index: xc/doc/man/X11/XSCEvent.man diff -u xc/doc/man/X11/XSCEvent.man:1.3 xc/doc/man/X11/XSCEvent.man:1.4 --- xc/doc/man/X11/XSCEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XSCEvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSCEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSCEvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSelectionClearEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSelectionClearEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSelectionClearEvent \- SelectionClear event structure .SH STRUCTURES Index: xc/doc/man/X11/XSContext.man diff -u xc/doc/man/X11/XSContext.man:1.3 xc/doc/man/X11/XSContext.man:1.4 --- xc/doc/man/X11/XSContext.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSContext.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSContext.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSContext.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSaveContext 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSaveContext 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSaveContext, XFindContext, XDeleteContext, XUniqueContext \- associative look-up routines .SH SYNTAX Index: xc/doc/man/X11/XSEvent.man diff -u xc/doc/man/X11/XSEvent.man:1.3 xc/doc/man/X11/XSEvent.man:1.4 --- xc/doc/man/X11/XSEvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XSEvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSEvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSEvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSelectionEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSelectionEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSelectionEvent \- SelectionNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XSICFoc.man diff -u xc/doc/man/X11/XSICFoc.man:1.3 xc/doc/man/X11/XSICFoc.man:1.4 --- xc/doc/man/X11/XSICFoc.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSICFoc.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSICFoc.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSICFoc.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetICFocus 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetICFocus 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetICFocus, XUnsetICFocus \- set and unset input context focus .SH SYNTAX Index: xc/doc/man/X11/XSICVals.man diff -u xc/doc/man/X11/XSICVals.man:1.3 xc/doc/man/X11/XSICVals.man:1.4 --- xc/doc/man/X11/XSICVals.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSICVals.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSICVals.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSICVals.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetICValues 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetICValues 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetICValues, XGetICValues \- set and obtain XIC values .SH SYNTAX Index: xc/doc/man/X11/XSInput.man diff -u xc/doc/man/X11/XSInput.man:1.3 xc/doc/man/X11/XSInput.man:1.4 --- xc/doc/man/X11/XSInput.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSInput.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSInput.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSInput.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSelectInput 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSelectInput 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSelectInput \- select input events .SH SYNTAX Index: xc/doc/man/X11/XSLTTProp.man diff -u xc/doc/man/X11/XSLTTProp.man:1.6 xc/doc/man/X11/XSLTTProp.man:1.7 --- xc/doc/man/X11/XSLTTProp.man:1.6 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XSLTTProp.man Thu Feb 10 22:02:55 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSLTTProp.man,v 1.6 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSLTTProp.man,v 1.7 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XStringListToTextProperty 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XStringListToTextProperty 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XStringListToTextProperty, XTextPropertyToStringList, XFreeStringList, XTextProperty \- convert string lists and text property structure .SH SYNTAX Index: xc/doc/man/X11/XSREvent.man diff -u xc/doc/man/X11/XSREvent.man:1.3 xc/doc/man/X11/XSREvent.man:1.4 --- xc/doc/man/X11/XSREvent.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XSREvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSREvent.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSREvent.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSelectionRequestEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSelectionRequestEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSelectionRequestEvent \- SelectionRequest event structure .SH STRUCTURES Index: xc/doc/man/X11/XSeArcMod.man diff -u xc/doc/man/X11/XSeArcMod.man:1.3 xc/doc/man/X11/XSeArcMod.man:1.4 --- xc/doc/man/X11/XSeArcMod.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSeArcMod.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeArcMod.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeArcMod.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetArcMode 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetArcMode 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetArcMode, XSetSubwindowMode, XSetGraphicsExposure \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeClipO.man diff -u xc/doc/man/X11/XSeClipO.man:1.3 xc/doc/man/X11/XSeClipO.man:1.4 --- xc/doc/man/X11/XSeClipO.man:1.3 Mon Apr 28 18:17:56 2003 +++ xc/doc/man/X11/XSeClipO.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeClipO.man,v 1.3 2003/04/28 22:17:56 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeClipO.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetClipOrigin 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetClipOrigin 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetClipOrigin, XSetClipMask, XSetClipRectangles \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeClosDM.man diff -u xc/doc/man/X11/XSeClosDM.man:1.3 xc/doc/man/X11/XSeClosDM.man:1.4 --- xc/doc/man/X11/XSeClosDM.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeClosDM.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeClosDM.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeClosDM.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetCloseDownMode 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetCloseDownMode 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetCloseDownMode, XKillClient \- control clients .SH SYNTAX Index: xc/doc/man/X11/XSeCmd.man diff -u xc/doc/man/X11/XSeCmd.man:1.4 xc/doc/man/X11/XSeCmd.man:1.5 --- xc/doc/man/X11/XSeCmd.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeCmd.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeCmd.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeCmd.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetCommand 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetCommand 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetCommand, XGetCommand \- set or read a window's WM_COMMAND property .SH SYNTAX Index: xc/doc/man/X11/XSeErrHan.man diff -u xc/doc/man/X11/XSeErrHan.man:1.3 xc/doc/man/X11/XSeErrHan.man:1.4 --- xc/doc/man/X11/XSeErrHan.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeErrHan.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeErrHan.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeErrHan.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetErrorHandler 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetErrorHandler 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- default error handlers .SH SYNTAX Index: xc/doc/man/X11/XSeEvent.man diff -u xc/doc/man/X11/XSeEvent.man:1.4 xc/doc/man/X11/XSeEvent.man:1.5 --- xc/doc/man/X11/XSeEvent.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeEvent.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeEvent.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeEvent.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSendEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSendEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSendEvent, XDisplayMotionBufferSize, XGetMotionEvents, XTimeCoord \- send events and pointer motion history structure .SH SYNTAX Index: xc/doc/man/X11/XSeFillS.man diff -u xc/doc/man/X11/XSeFillS.man:1.3 xc/doc/man/X11/XSeFillS.man:1.4 --- xc/doc/man/X11/XSeFillS.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeFillS.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFillS.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFillS.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetFillStyle 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetFillStyle 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetFillStyle, XSetFillRule \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeFont.man diff -u xc/doc/man/X11/XSeFont.man:1.3 xc/doc/man/X11/XSeFont.man:1.4 --- xc/doc/man/X11/XSeFont.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeFont.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFont.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFont.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetFont 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetFont 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetFont \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeFontP.man diff -u xc/doc/man/X11/XSeFontP.man:1.3 xc/doc/man/X11/XSeFontP.man:1.4 --- xc/doc/man/X11/XSeFontP.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeFontP.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeFontP.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeFontP.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetFontPath 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetFontPath 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetFontPath, XGetFontPath, XFreeFontPath \- set, get, or free the font search path .SH SYNTAX Index: xc/doc/man/X11/XSeInFoc.man diff -u xc/doc/man/X11/XSeInFoc.man:1.3 xc/doc/man/X11/XSeInFoc.man:1.4 --- xc/doc/man/X11/XSeInFoc.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeInFoc.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeInFoc.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeInFoc.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetInputFocus 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetInputFocus 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetInputFocus, XGetInputFocus \- control input focus .SH SYNTAX Index: xc/doc/man/X11/XSeLAttr.man diff -u xc/doc/man/X11/XSeLAttr.man:1.3 xc/doc/man/X11/XSeLAttr.man:1.4 --- xc/doc/man/X11/XSeLAttr.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeLAttr.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeLAttr.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeLAttr.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetLineAttributes 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetLineAttributes 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetLineAttributes, XSetDashes \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSePMap.man diff -u xc/doc/man/X11/XSePMap.man:1.3 xc/doc/man/X11/XSePMap.man:1.4 --- xc/doc/man/X11/XSePMap.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSePMap.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSePMap.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSePMap.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetPointerMapping 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetPointerMapping 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetPointerMapping, XGetPointerMapping \- manipulate pointer settings .SH SYNTAX Index: xc/doc/man/X11/XSeScSav.man diff -u xc/doc/man/X11/XSeScSav.man:1.3 xc/doc/man/X11/XSeScSav.man:1.4 --- xc/doc/man/X11/XSeScSav.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeScSav.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeScSav.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeScSav.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetScreenSaver 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetScreenSaver 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetScreenSaver, XForceScreenSaver, XActivateScreenSaver, XResetScreenSaver, XGetScreenSaver \- manipulate the screen saver .SH SYNTAX Index: xc/doc/man/X11/XSeSelOwn.man diff -u xc/doc/man/X11/XSeSelOwn.man:1.3 xc/doc/man/X11/XSeSelOwn.man:1.4 --- xc/doc/man/X11/XSeSelOwn.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeSelOwn.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeSelOwn.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeSelOwn.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetSelectionOwner 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetSelectionOwner 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetSelectionOwner, XGetSelectionOwner, XConvertSelection \- manipulate window selection .SH SYNTAX Index: xc/doc/man/X11/XSeState.man diff -u xc/doc/man/X11/XSeState.man:1.4 xc/doc/man/X11/XSeState.man:1.5 --- xc/doc/man/X11/XSeState.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeState.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeState.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeState.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetState 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetState 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetState, XSetFunction, XSetPlaneMask, XSetForeground, XSetBackground \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeTFHint.man diff -u xc/doc/man/X11/XSeTFHint.man:1.3 xc/doc/man/X11/XSeTFHint.man:1.4 --- xc/doc/man/X11/XSeTFHint.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeTFHint.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTFHint.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTFHint.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetTransientForHint 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetTransientForHint 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetTransientForHint, XGetTransientForHint \- set or read a window's WM_TRANSIENT_FOR property .SH SYNTAX Index: xc/doc/man/X11/XSeTProp.man diff -u xc/doc/man/X11/XSeTProp.man:1.4 xc/doc/man/X11/XSeTProp.man:1.5 --- xc/doc/man/X11/XSeTProp.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeTProp.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTProp.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTProp.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetTextProperty 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetTextProperty 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetTextProperty, XGetTextProperty \- set and read text properties .SH SYNTAX Index: xc/doc/man/X11/XSeTile.man diff -u xc/doc/man/X11/XSeTile.man:1.3 xc/doc/man/X11/XSeTile.man:1.4 --- xc/doc/man/X11/XSeTile.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeTile.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeTile.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeTile.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetTile 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetTile 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetTile, XSetStipple, XSetTSOrigin \- GC convenience routines .SH SYNTAX Index: xc/doc/man/X11/XSeWMCMac.man diff -u xc/doc/man/X11/XSeWMCMac.man:1.3 xc/doc/man/X11/XSeWMCMac.man:1.4 --- xc/doc/man/X11/XSeWMCMac.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeWMCMac.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMCMac.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMCMac.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMClientMachine 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMClientMachine 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMClientMachine, XGetWMClientMachine \- set or read a window's WM_CLIENT_MACHINE property .SH SYNTAX Index: xc/doc/man/X11/XSeWMCWin.man diff -u xc/doc/man/X11/XSeWMCWin.man:1.4 xc/doc/man/X11/XSeWMCWin.man:1.5 --- xc/doc/man/X11/XSeWMCWin.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeWMCWin.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMCWin.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMCWin.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMColormapWindows 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMColormapWindows 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMColormapWindows, XGetWMColormapWindows \- set or read a window's WM_COLORMAP_WINDOWS property .SH SYNTAX Index: xc/doc/man/X11/XSeWMINam.man diff -u xc/doc/man/X11/XSeWMINam.man:1.3 xc/doc/man/X11/XSeWMINam.man:1.4 --- xc/doc/man/X11/XSeWMINam.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeWMINam.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMINam.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMINam.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMIconName 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMIconName 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMIconName, XGetWMIconName, XSetIconName, XGetIconName \- set or read a window's WM_ICON_NAME property .SH SYNTAX Index: xc/doc/man/X11/XSeWMName.man diff -u xc/doc/man/X11/XSeWMName.man:1.3 xc/doc/man/X11/XSeWMName.man:1.4 --- xc/doc/man/X11/XSeWMName.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeWMName.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMName.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMName.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMName 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMName 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMName, XGetWMName, XStoreName, XFetchName \- set or read a window's WM_NAME property .SH SYNTAX Index: xc/doc/man/X11/XSeWMProp.man diff -u xc/doc/man/X11/XSeWMProp.man:1.5 xc/doc/man/X11/XSeWMProp.man:1.6 --- xc/doc/man/X11/XSeWMProp.man:1.5 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSeWMProp.man Thu Feb 10 22:02:55 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMProp.man,v 1.5 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMProp.man,v 1.6 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMProperties 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMProperties 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMProperties, XmbSetWMProperties, Xutf8SetWMProperties \- set standard window properties .SH SYNTAX Index: xc/doc/man/X11/XSeWMProt.man diff -u xc/doc/man/X11/XSeWMProt.man:1.5 xc/doc/man/X11/XSeWMProt.man:1.6 --- xc/doc/man/X11/XSeWMProt.man:1.5 Tue Jul 15 20:38:42 2003 +++ xc/doc/man/X11/XSeWMProt.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSeWMProt.man,v 1.5 2003/07/16 00:38:42 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XSeWMProt.man,v 1.6 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSetWMProtocols 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSetWMProtocols 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSetWMProtocols, XGetWMProtocols \- set or read a window's WM_PROTOCOLS property .SH SYNTAX Index: xc/doc/man/X11/XStBytes.man diff -u xc/doc/man/X11/XStBytes.man:1.4 xc/doc/man/X11/XStBytes.man:1.5 --- xc/doc/man/X11/XStBytes.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XStBytes.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStBytes.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XStBytes.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XStoreBytes 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XStoreBytes 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers \- manipulate cut and paste buffers .SH SYNTAX Index: xc/doc/man/X11/XStColors.man diff -u xc/doc/man/X11/XStColors.man:1.3 xc/doc/man/X11/XStColors.man:1.4 --- xc/doc/man/X11/XStColors.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XStColors.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStColors.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XStColors.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XStoreColors 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XStoreColors 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XStoreColors, XStoreColor, XStoreNamedColor \- set colors .SH SYNTAX Index: xc/doc/man/X11/XStTKsym.man diff -u xc/doc/man/X11/XStTKsym.man:1.3 xc/doc/man/X11/XStTKsym.man:1.4 --- xc/doc/man/X11/XStTKsym.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XStTKsym.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XStTKsym.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XStTKsym.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XStringToKeysym 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XStringToKeysym 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase \- convert keysyms .SH SYNTAX Index: xc/doc/man/X11/XSupLoc.man diff -u xc/doc/man/X11/XSupLoc.man:1.3 xc/doc/man/X11/XSupLoc.man:1.4 --- xc/doc/man/X11/XSupLoc.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSupLoc.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSupLoc.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSupLoc.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSupportsLocal 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSupportsLocal 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSupportsLocale, XSetLocaleModifiers \- determine locale support and configure locale modifiers .SH SYNTAX Index: xc/doc/man/X11/XSync.man diff -u xc/doc/man/X11/XSync.man:1.3 xc/doc/man/X11/XSync.man:1.4 --- xc/doc/man/X11/XSync.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XSync.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XSync.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XSync.man,v 1.4 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XSynchronize 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XSynchronize 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XSynchronize, XSetAfterFunction \- enable or disable synchronization .SH SYNTAX Index: xc/doc/man/X11/XTLTTProp.man diff -u xc/doc/man/X11/XTLTTProp.man:1.7 xc/doc/man/X11/XTLTTProp.man:1.8 --- xc/doc/man/X11/XTLTTProp.man:1.7 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XTLTTProp.man Thu Feb 10 22:02:55 2005 @@ -42,7 +42,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTLTTProp.man,v 1.7 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XTLTTProp.man,v 1.8 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -143,7 +143,7 @@ .. .ny0 '\" t -.TH XmbTextListToTextProperty 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbTextListToTextProperty 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbTextListToTextProperty, XwcTextListToTextProperty, Xutf8TextListToTextProperty, XmbTextPropertyToTextList, XwcTextPropertyToTextList, Xutf8TextPropertyToTextList, XwcFreeStringList, XDefaultString \- convert text lists and text property structures .SH SYNTAX Index: xc/doc/man/X11/XTextExt.man diff -u xc/doc/man/X11/XTextExt.man:1.4 xc/doc/man/X11/XTextExt.man:1.5 --- xc/doc/man/X11/XTextExt.man:1.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XTextExt.man Thu Feb 10 22:02:55 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTextExt.man,v 1.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XTextExt.man,v 1.5 2005/02/11 03:02:55 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XTextExtents 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XTextExtents 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XTextExtents, XTextExtents16, XQueryTextExtents, XQueryTextExtents16 \- compute or query text extents .SH SYNTAX Index: xc/doc/man/X11/XTextWid.man diff -u xc/doc/man/X11/XTextWid.man:1.3 xc/doc/man/X11/XTextWid.man:1.4 --- xc/doc/man/X11/XTextWid.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XTextWid.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTextWid.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XTextWid.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XTextWidth 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XTextWidth 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XTextWidth, XTextWidth16 \- compute text width .SH SYNTAX Index: xc/doc/man/X11/XThreads.man diff -u xc/doc/man/X11/XThreads.man:1.3 xc/doc/man/X11/XThreads.man:1.4 --- xc/doc/man/X11/XThreads.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XThreads.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XThreads.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XThreads.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XInitThreads 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XInitThreads 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XInitThreads, XLockDisplay, XUnlockDisplay \- multi-threading support .SH SYNTAX Index: xc/doc/man/X11/XTranWCo.man diff -u xc/doc/man/X11/XTranWCo.man:1.3 xc/doc/man/X11/XTranWCo.man:1.4 --- xc/doc/man/X11/XTranWCo.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XTranWCo.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XTranWCo.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XTranWCo.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XTranslateCoordinates 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XTranslateCoordinates 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XTranslateCoordinates \- translate window coordinates .SH SYNTAX Index: xc/doc/man/X11/XUQuark.man diff -u xc/doc/man/X11/XUQuark.man:1.5 xc/doc/man/X11/XUQuark.man:1.6 --- xc/doc/man/X11/XUQuark.man:1.5 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XUQuark.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XUQuark.man,v 1.5 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XUQuark.man,v 1.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XrmUniqueQuark 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XrmUniqueQuark 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark, XrmQuarkToString, XrmStringToQuarkList, XrmStringToBindingQuarkList \- manipulate resource quarks .SH SYNTAX Index: xc/doc/man/X11/XUmapEven.man diff -u xc/doc/man/X11/XUmapEven.man:1.3 xc/doc/man/X11/XUmapEven.man:1.4 --- xc/doc/man/X11/XUmapEven.man:1.3 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XUmapEven.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XUmapEven.man,v 1.3 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XUmapEven.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XUnmapEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XUnmapEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XUnmapEvent \- UnmapNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XUnmapWin.man diff -u xc/doc/man/X11/XUnmapWin.man:1.3 xc/doc/man/X11/XUnmapWin.man:1.4 --- xc/doc/man/X11/XUnmapWin.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XUnmapWin.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XUnmapWin.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XUnmapWin.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XUnmapWindow 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XUnmapWindow 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XUnmapWindow, XUnmapSubwindows \- unmap windows .SH SYNTAX Index: xc/doc/man/X11/XVCNList.man diff -u xc/doc/man/X11/XVCNList.man:1.3 xc/doc/man/X11/XVCNList.man:1.4 --- xc/doc/man/X11/XVCNList.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XVCNList.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XVCNList.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XVCNList.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XVaCreateNestedList 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XVaCreateNestedList 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XVaCreateNestedList \- allocate a nested variable argument list .SH SYNTAX Index: xc/doc/man/X11/XVEvent.man diff -u xc/doc/man/X11/XVEvent.man:1.4 xc/doc/man/X11/XVEvent.man:1.5 --- xc/doc/man/X11/XVEvent.man:1.4 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XVEvent.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XVEvent.man,v 1.4 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XVEvent.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XVisibilityEvent 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XVisibilityEvent 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XVisibilityEvent \- VisibilityNotify event structure .SH STRUCTURES Index: xc/doc/man/X11/XWarpPntr.man diff -u xc/doc/man/X11/XWarpPntr.man:1.3 xc/doc/man/X11/XWarpPntr.man:1.4 --- xc/doc/man/X11/XWarpPntr.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XWarpPntr.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XWarpPntr.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XWarpPntr.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XWarpPointer 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XWarpPointer 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XWarpPointer \- move pointer .SH SYNTAX Index: xc/doc/man/X11/Xcms3CoC.man diff -u xc/doc/man/X11/Xcms3CoC.man:1.3 xc/doc/man/X11/Xcms3CoC.man:1.4 --- xc/doc/man/X11/Xcms3CoC.man:1.3 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/Xcms3CoC.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/Xcms3CoC.man,v 1.3 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/Xcms3CoC.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsCCCOfColormap 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsCCCOfColormap 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsCCCOfColormap, XcmsSetCCCOfColormap \- query and modify CCC of a colormap .SH SYNTAX Index: xc/doc/man/X11/XcmsAClr.man diff -u xc/doc/man/X11/XcmsAClr.man:3.4 xc/doc/man/X11/XcmsAClr.man:3.5 --- xc/doc/man/X11/XcmsAClr.man:3.4 Mon Apr 28 18:17:57 2003 +++ xc/doc/man/X11/XcmsAClr.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsAClr.man,v 3.4 2003/04/28 22:17:57 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsAClr.man,v 3.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsAllocColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsAllocColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsAllocColor, XcmsAllocNamedColor \- allocate colors .SH SYNTAX Index: xc/doc/man/X11/XcmsCClrs.man diff -u xc/doc/man/X11/XcmsCClrs.man:1.3 xc/doc/man/X11/XcmsCClrs.man:1.4 --- xc/doc/man/X11/XcmsCClrs.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsCClrs.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsCClrs.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsCClrs.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsConvertColors 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsConvertColors 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsConvertColors \- convert CCC color specifications .SH SYNTAX Index: xc/doc/man/X11/XcmsClr.man diff -u xc/doc/man/X11/XcmsClr.man:3.5 xc/doc/man/X11/XcmsClr.man:3.6 --- xc/doc/man/X11/XcmsClr.man:3.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XcmsClr.man Thu Feb 10 22:02:56 2005 @@ -39,7 +39,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsClr.man,v 3.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsClr.man,v 3.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -139,7 +139,7 @@ .el .sp 10p .. .ny0 -.TH XcmsColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsColor, XcmsRGB, XcmsRGBi, XcmsCIEXYZ, XcmsCIEuvY, XcmsCIExyY, XcmsCIELab, XcmsCIELuv, XcmsTekHVC, XcmsPad \- Xcms color struture .SH STRUCTURES Index: xc/doc/man/X11/XcmsCre3C.man diff -u xc/doc/man/X11/XcmsCre3C.man:1.3 xc/doc/man/X11/XcmsCre3C.man:1.4 --- xc/doc/man/X11/XcmsCre3C.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsCre3C.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsCre3C.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsCre3C.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsCreateCCC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsCreateCCC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsCreateCCC, XcmsFreeCCC \- creating and destroying CCCs .SH SYNTAX Index: xc/doc/man/X11/XcmsD3C.man diff -u xc/doc/man/X11/XcmsD3C.man:1.3 xc/doc/man/X11/XcmsD3C.man:1.4 --- xc/doc/man/X11/XcmsD3C.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsD3C.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsD3C.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsD3C.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsDefaultCCC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsDefaultCCC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsDefaultCCC \- obtain the default CCC for a screen .SH SYNTAX Index: xc/doc/man/X11/XcmsLaQMC.man diff -u xc/doc/man/X11/XcmsLaQMC.man:1.4 xc/doc/man/X11/XcmsLaQMC.man:1.5 --- xc/doc/man/X11/XcmsLaQMC.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsLaQMC.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsLaQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsLaQMC.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsCIELabQueryMax 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsCIELabQueryMax 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsCIELabQueryMaxC, XcmsCIELabQueryMaxL, XcmsCIELabQueryMaxLC, XcmsCIELabQueryMinL \- obtain the CIE L*a*b* coordinates .SH SYNTAX Index: xc/doc/man/X11/XcmsLuQMC.man diff -u xc/doc/man/X11/XcmsLuQMC.man:1.4 xc/doc/man/X11/XcmsLuQMC.man:1.5 --- xc/doc/man/X11/XcmsLuQMC.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsLuQMC.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsLuQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsLuQMC.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsCIELuvQueryMaxC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsCIELuvQueryMaxC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsCIELuvQueryMaxC, XcmsCIELuvQueryMaxL, XcmsCIELuvQueryMaxLC, XcmsCIELuvQueryMinL \- obtain the CIE L*u*v* coordinates .SH SYNTAX Index: xc/doc/man/X11/XcmsQBlk.man diff -u xc/doc/man/X11/XcmsQBlk.man:1.3 xc/doc/man/X11/XcmsQBlk.man:1.4 --- xc/doc/man/X11/XcmsQBlk.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsQBlk.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsQBlk.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsQBlk.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsQueryBlack 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsQueryBlack 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsQueryBlack, XcmsQueryBlue, XcmsQueryGreen, XcmsQueryRed, XcmsQueryWhite \- obtain black, blue, green, red, and white CCC color specifications .SH SYNTAX Index: xc/doc/man/X11/XcmsQClr.man diff -u xc/doc/man/X11/XcmsQClr.man:3.4 xc/doc/man/X11/XcmsQClr.man:3.5 --- xc/doc/man/X11/XcmsQClr.man:3.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsQClr.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsQClr.man,v 3.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsQClr.man,v 3.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsQueryColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsQueryColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsQueryColor, XcmsQueryColors, XcmsLookupColor \- obtain color values .SH SYNTAX Index: xc/doc/man/X11/XcmsSClr.man diff -u xc/doc/man/X11/XcmsSClr.man:1.3 xc/doc/man/X11/XcmsSClr.man:1.4 --- xc/doc/man/X11/XcmsSClr.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsSClr.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsSClr.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsSClr.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsStoreColor 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsStoreColor 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsStoreColor, XcmsStoreColors \- set colors .SH SYNTAX Index: xc/doc/man/X11/XcmsSWP.man diff -u xc/doc/man/X11/XcmsSWP.man:1.3 xc/doc/man/X11/XcmsSWP.man:1.4 --- xc/doc/man/X11/XcmsSWP.man:1.3 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsSWP.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsSWP.man,v 1.3 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsSWP.man,v 1.4 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsSetWhitePoint 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsSetWhitePoint 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsSetWhitePoint, XcmsSetWhiteAdjustProc \- modifying CCC attributes .SH SYNTAX Index: xc/doc/man/X11/XcmsTQMC.man diff -u xc/doc/man/X11/XcmsTQMC.man:1.4 xc/doc/man/X11/XcmsTQMC.man:1.5 --- xc/doc/man/X11/XcmsTQMC.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XcmsTQMC.man Thu Feb 10 22:02:56 2005 @@ -40,7 +40,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XcmsTQMC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XcmsTQMC.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -140,7 +140,7 @@ .el .sp 10p .. .ny0 -.TH XcmsTekHVCQueryMaxC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XcmsTekHVCQueryMaxC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XcmsTekHVCQueryMaxC, XcmsTekHVCQueryMaxV, XcmsTekHVCQueryMaxVC, XcmsTekHVCQueryMaxVSamples, XcmsTekHVCQueryMinV \- obtain the TekHVC coordinates .SH SYNTAX Index: xc/doc/man/X11/XmbDIStr.man diff -u xc/doc/man/X11/XmbDIStr.man:1.4 xc/doc/man/X11/XmbDIStr.man:1.5 --- xc/doc/man/X11/XmbDIStr.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbDIStr.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDIStr.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDIStr.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbDrawImageString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbDrawImageString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbDrawImageString, XwcDrawImageString, Xutf8DrawImageString \- draw image text using a single font set .SH SYNTAX Index: xc/doc/man/X11/XmbDStr.man diff -u xc/doc/man/X11/XmbDStr.man:1.5 xc/doc/man/X11/XmbDStr.man:1.6 --- xc/doc/man/X11/XmbDStr.man:1.5 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbDStr.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDStr.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDStr.man,v 1.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbDrawString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbDrawString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbDrawString, XwcDrawString, Xutf8DrawString \- draw text using a single font set .SH SYNTAX Index: xc/doc/man/X11/XmbDTxt.man diff -u xc/doc/man/X11/XmbDTxt.man:1.5 xc/doc/man/X11/XmbDTxt.man:1.6 --- xc/doc/man/X11/XmbDTxt.man:1.5 Sun Nov 23 00:40:33 2003 +++ xc/doc/man/X11/XmbDTxt.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbDTxt.man,v 1.5 2003/11/23 05:40:33 dawes Exp $ +.\" $XFree86: xc/doc/man/X11/XmbDTxt.man,v 1.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbDrawText 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbDrawText 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbDrawText, XwcDrawText, Xutf8DrawText \- draw text using multiple font sets .SH SYNTAX Index: xc/doc/man/X11/XmbLStr.man diff -u xc/doc/man/X11/XmbLStr.man:1.4 xc/doc/man/X11/XmbLStr.man:1.5 --- xc/doc/man/X11/XmbLStr.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbLStr.man Thu Feb 10 22:02:56 2005 @@ -42,7 +42,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbLStr.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbLStr.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -143,7 +143,7 @@ .. .ny0 '\" t -.TH XmbLookupString 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbLookupString 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbLookupString, XwcLookupString, Xutf8LookupString \- obtain composed input from an input method .SH SYNTAX Index: xc/doc/man/X11/XmbRIC.man diff -u xc/doc/man/X11/XmbRIC.man:1.4 xc/doc/man/X11/XmbRIC.man:1.5 --- xc/doc/man/X11/XmbRIC.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbRIC.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbRIC.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbRIC.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbResetIC 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbResetIC 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbResetIC, XwcResetIC, Xutf8ResetIC \- reset the state of an input context .SH SYNTAX Index: xc/doc/man/X11/XmbTEsc.man diff -u xc/doc/man/X11/XmbTEsc.man:1.4 xc/doc/man/X11/XmbTEsc.man:1.5 --- xc/doc/man/X11/XmbTEsc.man:1.4 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbTEsc.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTEsc.man,v 1.4 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTEsc.man,v 1.5 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbTextEscapement 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbTextEscapement 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbTextEscapement, XwcTextEscapement, Xutf8TextEscapement \- obtain the escapement of text .SH SYNTAX Index: xc/doc/man/X11/XmbTExt.man diff -u xc/doc/man/X11/XmbTExt.man:1.5 xc/doc/man/X11/XmbTExt.man:1.6 --- xc/doc/man/X11/XmbTExt.man:1.5 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbTExt.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTExt.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTExt.man,v 1.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbTextExtents 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbTextExtents 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbTextExtents, XwcTextExtents, Xutf8TextExtents \- compute text extents .SH SYNTAX Index: xc/doc/man/X11/XmbTPCEx.man diff -u xc/doc/man/X11/XmbTPCEx.man:1.5 xc/doc/man/X11/XmbTPCEx.man:1.6 --- xc/doc/man/X11/XmbTPCEx.man:1.5 Mon Apr 28 18:17:58 2003 +++ xc/doc/man/X11/XmbTPCEx.man Thu Feb 10 22:02:56 2005 @@ -41,7 +41,7 @@ .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" -.\" $XFree86: xc/doc/man/X11/XmbTPCEx.man,v 1.5 2003/04/28 22:17:58 herrb Exp $ +.\" $XFree86: xc/doc/man/X11/XmbTPCEx.man,v 1.6 2005/02/11 03:02:56 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface @@ -141,7 +141,7 @@ .el .sp 10p .. .ny0 -.TH XmbTextPerCharExtents 3X11 __xorgversion__ "XLIB FUNCTIONS" +.TH XmbTextPerCharExtents 3X11 __vendorversion__ "XLIB FUNCTIONS" .SH NAME XmbTextPerCharExtents, XwcTextPerCharExtents, Xutf8TextPerCharExtents \- obtain per-character information for a text string .SH SYNTAX Index: xc/doc/man/Xau/Xau.man diff -u xc/doc/man/Xau/Xau.man:1.3 xc/doc/man/Xau/Xau.man:1.5 --- xc/doc/man/Xau/Xau.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xau/Xau.man Thu Feb 10 22:03:02 2005 @@ -24,9 +24,9 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xau/Xau.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xau/Xau.man,v 1.5 2005/02/11 03:03:02 dawes Exp $ .\" -.TH Xau 3 __xorgversion__ +.TH Xau 3 __vendorversion__ .SH NAME Xau library: XauFileName, XauReadAuth, XauLockAuth, XauUnlockAuth, XauWriteAuth, XauDisposeAuth, @@ -82,7 +82,7 @@ \fBnot\fP statically allocated and should be freed by calling \fIXauDisposeAuth\fP. .PP -\fBXuWriteAuth\fP writes an authorization entry to \fIauth_file\fP. It +\fBXauWriteAuth\fP writes an authorization entry to \fIauth_file\fP. It returns 1 on success, 0 on failure. .PP \fBXauGetAuthByAddr\fP searches for an entry which matches the given network Index: xc/doc/man/Xext/XShape.man diff -u xc/doc/man/Xext/XShape.man:1.4 xc/doc/man/Xext/XShape.man:1.5 --- xc/doc/man/Xext/XShape.man:1.4 Sun Nov 23 00:40:35 2003 +++ xc/doc/man/Xext/XShape.man Thu Feb 10 22:03:02 2005 @@ -25,13 +25,13 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xext/XShape.man,v 1.4 2003/11/23 05:40:35 dawes Exp $ +.\" $XFree86: xc/doc/man/Xext/XShape.man,v 1.5 2005/02/11 03:03:02 dawes Exp $ .\" .de ZN .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. -.TH XSHAPE 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSHAPE 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XShapeQueryExtension, XShapeQueryVersion, XShapeCombineRegion, XShapeCombineRectangles, XShapeCombineMask, XShapeCombineShape, XShapeOffsetShape, XShapeQueryExtents, XShapeSelectInput, XShapeInputSelected, XShapeGetRectangles \- X nonrectangular shape functions .SH SYNTAX Index: xc/doc/man/Xext/Xevi.man diff -u xc/doc/man/Xext/Xevi.man:1.3 xc/doc/man/Xext/Xevi.man:1.4 --- xc/doc/man/Xext/Xevi.man:1.3 Wed Feb 7 17:35:21 2001 +++ xc/doc/man/Xext/Xevi.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from .\" Silicon Graphics, Inc. .\" -.\" $XFree86: xc/doc/man/Xext/Xevi.man,v 1.3 2001/02/07 22:35:21 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/Xevi.man,v 1.4 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XEVI 3X11 __xorgversion__ "X FUNCTIONS" +.TH XEVI 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XeviQueryExtension, XeviQueryVersion, XeviGetVisualInfo - X Extended Visual Information functions .SH SYNOPSIS Index: xc/doc/man/Xext/Xmbuf.man diff -u xc/doc/man/Xext/Xmbuf.man:1.4 xc/doc/man/Xext/Xmbuf.man:1.5 --- xc/doc/man/Xext/Xmbuf.man:1.4 Sun Nov 23 00:40:35 2003 +++ xc/doc/man/Xext/Xmbuf.man Thu Feb 10 22:03:02 2005 @@ -34,13 +34,13 @@ .\" without express or implied warranty. .\" .\" -.\" $XFree86: xc/doc/man/Xext/Xmbuf.man,v 1.4 2003/11/23 05:40:35 dawes Exp $ +.\" $XFree86: xc/doc/man/Xext/Xmbuf.man,v 1.5 2005/02/11 03:03:02 dawes Exp $ .\" .de ZN .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. -.TH XMBUF 3X11 __xorgversion__ "X FUNCTIONS" +.TH XMBUF 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XmbufQueryExtension, XmbufGetVersion, XmbufCreateBuffers, XmbufDestroyBuffers, XmbufDisplayBuffers, XmbufGetWindowAttributes, XmbufChangeWindowAttributes, XmbufGetBufferAttributes, XmbufChangeBufferAttributes, XmbufGetScreenInfo, XmbufCreateStereoWindow - X multibuffering functions .SH SYNTAX Index: xc/doc/man/Xext/dbe/DBE.man diff -u xc/doc/man/Xext/dbe/DBE.man:3.5 xc/doc/man/Xext/dbe/DBE.man:3.6 --- xc/doc/man/Xext/dbe/DBE.man:3.5 Thu May 29 17:48:04 2003 +++ xc/doc/man/Xext/dbe/DBE.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/DBE.man,v 3.5 2003/05/29 21:48:04 herrb Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/DBE.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH DBE 3X11 __xorgversion__ "X FUNCTIONS" +.TH DBE 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME DBE - Double Buffer Extension .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeAllo.man diff -u xc/doc/man/Xext/dbe/XdbeAllo.man:3.5 xc/doc/man/Xext/dbe/XdbeAllo.man:3.6 --- xc/doc/man/Xext/dbe/XdbeAllo.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeAllo.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeAllo.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeAllo.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeAllocateBackBufferName 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeAllocateBackBufferName 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeAllocateBackBufferName - allocates a DBE buffer. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeBegi.man diff -u xc/doc/man/Xext/dbe/XdbeBegi.man:3.5 xc/doc/man/Xext/dbe/XdbeBegi.man:3.6 --- xc/doc/man/Xext/dbe/XdbeBegi.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeBegi.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeBegi.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeBegi.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH DBE 3X11 __xorgversion__ "X FUNCTIONS" +.TH DBE 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeBeginIdiom - marks the beginning of a DBE idiom sequence. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeDeal.man diff -u xc/doc/man/Xext/dbe/XdbeDeal.man:3.5 xc/doc/man/Xext/dbe/XdbeDeal.man:3.6 --- xc/doc/man/Xext/dbe/XdbeDeal.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeDeal.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeDeal.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeDeal.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeDeallocateBackBufferName 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeDeallocateBackBufferName 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeDeallocateBackBufferName - frees a DBE buffer. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeEndI.man diff -u xc/doc/man/Xext/dbe/XdbeEndI.man:3.5 xc/doc/man/Xext/dbe/XdbeEndI.man:3.6 --- xc/doc/man/Xext/dbe/XdbeEndI.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeEndI.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeEndI.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeEndI.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeEndIdiom 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeEndIdiom 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeEndIdiom - marks the end of a DBE idiom sequence. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeFree.man diff -u xc/doc/man/Xext/dbe/XdbeFree.man:3.5 xc/doc/man/Xext/dbe/XdbeFree.man:3.6 --- xc/doc/man/Xext/dbe/XdbeFree.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeFree.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeFree.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeFree.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeFreeVisualInfo 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeFreeVisualInfo 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeFreeVisualInfo - frees information returned by .B XdbeGetVisualInfo(). Index: xc/doc/man/Xext/dbe/XdbeGetB.man diff -u xc/doc/man/Xext/dbe/XdbeGetB.man:3.5 xc/doc/man/Xext/dbe/XdbeGetB.man:3.6 --- xc/doc/man/Xext/dbe/XdbeGetB.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeGetB.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeGetB.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeGetB.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeGetBackBufferAttributes 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeGetBackBufferAttributes 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeGetBackBufferAttributes - returns attributes of a DBE buffer. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeGetV.man diff -u xc/doc/man/Xext/dbe/XdbeGetV.man:3.6 xc/doc/man/Xext/dbe/XdbeGetV.man:3.7 --- xc/doc/man/Xext/dbe/XdbeGetV.man:3.6 Tue Jun 26 11:13:06 2001 +++ xc/doc/man/Xext/dbe/XdbeGetV.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeGetV.man,v 3.6 2001/06/26 15:13:06 herrb Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeGetV.man,v 3.7 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeGetVisualInfo 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeGetVisualInfo 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeGetVisualInfo - Get dbe Visual Informations .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeQuer.man diff -u xc/doc/man/Xext/dbe/XdbeQuer.man:3.5 xc/doc/man/Xext/dbe/XdbeQuer.man:3.6 --- xc/doc/man/Xext/dbe/XdbeQuer.man:3.5 Wed Feb 7 17:35:22 2001 +++ xc/doc/man/Xext/dbe/XdbeQuer.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeQuer.man,v 3.5 2001/02/07 22:35:22 tsi Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeQuer.man,v 3.6 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeQueryExtension 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeQueryExtension 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeQueryExtension - returns the version of DBE supported by the server. .SH SYNOPSIS Index: xc/doc/man/Xext/dbe/XdbeSwap.man diff -u xc/doc/man/Xext/dbe/XdbeSwap.man:3.6 xc/doc/man/Xext/dbe/XdbeSwap.man:3.7 --- xc/doc/man/Xext/dbe/XdbeSwap.man:3.6 Thu May 29 17:48:04 2003 +++ xc/doc/man/Xext/dbe/XdbeSwap.man Thu Feb 10 22:03:02 2005 @@ -25,9 +25,9 @@ .\" dealing in this Software without prior written authorization from the .\" Hewlett-Packard Company. .\" -.\" $XFree86: xc/doc/man/Xext/dbe/XdbeSwap.man,v 3.6 2003/05/29 21:48:04 herrb Exp $ +.\" $XFree86: xc/doc/man/Xext/dbe/XdbeSwap.man,v 3.7 2005/02/11 03:03:02 dawes Exp $ .\" -.TH XdbeSwapBuffers 3X11 __xorgversion__ "X FUNCTIONS" +.TH XdbeSwapBuffers 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XdbeSwapBuffers - swaps front and back DBE buffers. .SH SYNOPSIS Index: xc/doc/man/Xi/XAllDvEv.man diff -u xc/doc/man/Xi/XAllDvEv.man:1.3 xc/doc/man/Xi/XAllDvEv.man:1.4 --- xc/doc/man/Xi/XAllDvEv.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XAllDvEv.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XAllDvEv.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XAllDvEv.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XAllDvEv.man,v 1.3 2000/08/17 19:41:55 cpqbld Exp $ .ds xL Programming With Xlib -.TH XAllowDeviceEvents 3X11 __xorgversion__ "X FUNCTIONS" +.TH XAllowDeviceEvents 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XAllowDeviceEvents \- release queued events .SH SYNTAX Index: xc/doc/man/Xi/XChDCtl.man diff -u xc/doc/man/Xi/XChDCtl.man:1.3 xc/doc/man/Xi/XChDCtl.man:1.4 --- xc/doc/man/Xi/XChDCtl.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChDCtl.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChDCtl.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChDCtl.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChDCtl.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGetDeviceControl 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetDeviceControl 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetDeviceControl, XChangeDeviceControl \- query and change input device controls .SH SYNTAX Index: xc/doc/man/Xi/XChFCtl.man diff -u xc/doc/man/Xi/XChFCtl.man:1.3 xc/doc/man/Xi/XChFCtl.man:1.4 --- xc/doc/man/Xi/XChFCtl.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChFCtl.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChFCtl.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChFCtl.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChFCtl.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGetFeedbackControl 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetFeedbackControl 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetFeedbackControl, XChangeFeedbackControl \- query and change input device feedbacks .SH SYNTAX Index: xc/doc/man/Xi/XChKMap.man diff -u xc/doc/man/Xi/XChKMap.man:1.3 xc/doc/man/Xi/XChKMap.man:1.4 --- xc/doc/man/Xi/XChKMap.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChKMap.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChKMap.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChKMap.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChKMap.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XGetDeviceKeyMapping 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetDeviceKeyMapping 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetDeviceKeyMapping, XChangeDeviceKeyMapping \- query or change device key mappings .SH SYNTAX Index: xc/doc/man/Xi/XChMMap.man diff -u xc/doc/man/Xi/XChMMap.man:1.3 xc/doc/man/Xi/XChMMap.man:1.4 --- xc/doc/man/Xi/XChMMap.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChMMap.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChMMap.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChMMap.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChMMap.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGetDeviceModifierMapping 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetDeviceModifierMapping 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetDeviceModifierMapping, XSetDeviceModifierMapping \- query or change device modifier mappings .SH SYNTAX Index: xc/doc/man/Xi/XChProp.man diff -u xc/doc/man/Xi/XChProp.man:1.3 xc/doc/man/Xi/XChProp.man:1.4 --- xc/doc/man/Xi/XChProp.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChProp.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChProp.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChProp.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChProp.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XChangeDeviceDontPropagateList 3X11 __xorgversion__ "X FUNCTIONS" +.TH XChangeDeviceDontPropagateList 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XChangeDeviceDontPropagateList, XGetDeviceDontPropagateList \- query or change the dont-propagate-list for extension devices .SH SYNTAX Index: xc/doc/man/Xi/XChgKbd.man diff -u xc/doc/man/Xi/XChgKbd.man:1.3 xc/doc/man/Xi/XChgKbd.man:1.4 --- xc/doc/man/Xi/XChgKbd.man:1.3 Mon Apr 28 18:18:14 2003 +++ xc/doc/man/Xi/XChgKbd.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChgKbd.man,v 1.3 2003/04/28 22:18:14 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChgKbd.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChgKbd.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XChangeKeyboardDevice 3X11 __xorgversion__ "X FUNCTIONS" +.TH XChangeKeyboardDevice 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XChangeKeyboardDevice \- change which device is used as the X keyboard .SH SYNTAX Index: xc/doc/man/Xi/XChgPtr.man diff -u xc/doc/man/Xi/XChgPtr.man:1.3 xc/doc/man/Xi/XChgPtr.man:1.4 --- xc/doc/man/Xi/XChgPtr.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XChgPtr.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XChgPtr.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XChgPtr.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XChgPtr.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XChangePointerDevice 3X11 __xorgversion__ "X FUNCTIONS" +.TH XChangePointerDevice 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XChangePointerDevice \- change which device is the X pointer .SH SYNTAX Index: xc/doc/man/Xi/XDevBell.man diff -u xc/doc/man/Xi/XDevBell.man:1.3 xc/doc/man/Xi/XDevBell.man:1.4 --- xc/doc/man/Xi/XDevBell.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XDevBell.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XDevBell.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XDevBell.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XDevBell.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XDeviceBell 3X11 __xorgversion__ "X FUNCTIONS" +.TH XDeviceBell 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XDeviceBell \- ring a bell on a device supported through the input extension .SH SYNTAX Index: xc/doc/man/Xi/XGetDvMo.man diff -u xc/doc/man/Xi/XGetDvMo.man:1.3 xc/doc/man/Xi/XGetDvMo.man:1.4 --- xc/doc/man/Xi/XGetDvMo.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XGetDvMo.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XGetDvMo.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XGetDvMo.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XGetDvMo.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XGetDeviceMotionEvents 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetDeviceMotionEvents 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetDeviceMotionEvents, XDeviceTimeCoord \- get device motion history .SH SYNTAX Index: xc/doc/man/Xi/XGetExtV.man diff -u xc/doc/man/Xi/XGetExtV.man:1.3 xc/doc/man/Xi/XGetExtV.man:1.4 --- xc/doc/man/Xi/XGetExtV.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XGetExtV.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XGetExtV.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XGetExtV.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XGetExtV.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGetExtensionVersion 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGetExtensionVersion 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGetExtensionVersion \- query the version of the input extension. .SH SYNTAX Index: xc/doc/man/Xi/XGrDvBut.man diff -u xc/doc/man/Xi/XGrDvBut.man:1.3 xc/doc/man/Xi/XGrDvBut.man:1.4 --- xc/doc/man/Xi/XGrDvBut.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XGrDvBut.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XGrDvBut.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XGrDvBut.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XGrDvBut.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGrabDeviceButton 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGrabDeviceButton 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGrabDeviceButton, XUngrabDeviceButton \- grab/ungrab extension input device buttons .SH SYNTAX Index: xc/doc/man/Xi/XGrDvKey.man diff -u xc/doc/man/Xi/XGrDvKey.man:1.3 xc/doc/man/Xi/XGrDvKey.man:1.4 --- xc/doc/man/Xi/XGrDvKey.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XGrDvKey.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XGrDvKey.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XGrDvKey.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XGrDvKey.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XGrabDeviceKey 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGrabDeviceKey 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGrabDeviceKey, XUngrabDeviceKey \- grab/ungrab extension input device Keys .SH SYNTAX Index: xc/doc/man/Xi/XGrabDev.man diff -u xc/doc/man/Xi/XGrabDev.man:1.3 xc/doc/man/Xi/XGrabDev.man:1.4 --- xc/doc/man/Xi/XGrabDev.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XGrabDev.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XGrabDev.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XGrabDev.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XGrabDev.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming With Xlib -.TH XGrabDevice 3X11 __xorgversion__ "X FUNCTIONS" +.TH XGrabDevice 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XGrabDevice, XUngrabDevice \- grab/release the specified extension device .SH SYNTAX Index: xc/doc/man/Xi/XListDev.man diff -u xc/doc/man/Xi/XListDev.man:1.3 xc/doc/man/Xi/XListDev.man:1.4 --- xc/doc/man/Xi/XListDev.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XListDev.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XListDev.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XListDev.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XListDev.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XListInputDevices 3X11 __xorgversion__ "X FUNCTIONS" +.TH XListInputDevices 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XListInputDevices, XFreeDeviceList \- list available input devices .SH SYNTAX Index: xc/doc/man/Xi/XOpenDev.man diff -u xc/doc/man/Xi/XOpenDev.man:1.3 xc/doc/man/Xi/XOpenDev.man:1.4 --- xc/doc/man/Xi/XOpenDev.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XOpenDev.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XOpenDev.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XOpenDev.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XOpenDev.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XOpenDevice 3X11 __xorgversion__ "X FUNCTIONS" +.TH XOpenDevice 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XOpenDevice, XCloseDevice \- open or close an extension input device .SH SYNTAX Index: xc/doc/man/Xi/XQueryDv.man diff -u xc/doc/man/Xi/XQueryDv.man:1.3 xc/doc/man/Xi/XQueryDv.man:1.4 --- xc/doc/man/Xi/XQueryDv.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XQueryDv.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XQueryDv.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XQueryDv.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XQueryDv.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XQueryDeviceState 3X11 __xorgversion__ "X FUNCTIONS" +.TH XQueryDeviceState 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XQueryDeviceState \- query the state of an extension input device. .SH SYNTAX Index: xc/doc/man/Xi/XSExEvnt.man diff -u xc/doc/man/Xi/XSExEvnt.man:1.4 xc/doc/man/Xi/XSExEvnt.man:1.5 --- xc/doc/man/Xi/XSExEvnt.man:1.4 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XSExEvnt.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSExEvnt.man,v 1.4 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XSExEvnt.man,v 1.5 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSExEvnt.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .ds xL Programming with Xlib -.TH XSendExtensionEvent 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSendExtensionEvent 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSendExtensionEvent \- send input extension events to a client .SH SYNTAX Index: xc/doc/man/Xi/XSeBMap.man diff -u xc/doc/man/Xi/XSeBMap.man:1.3 xc/doc/man/Xi/XSeBMap.man:1.4 --- xc/doc/man/Xi/XSeBMap.man:1.3 Mon Apr 28 18:18:15 2003 +++ xc/doc/man/Xi/XSeBMap.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSeBMap.man,v 1.3 2003/04/28 22:18:15 herrb Exp $ +.\" $XFree86: xc/doc/man/Xi/XSeBMap.man,v 1.4 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSeBMap.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $ .ds xL Programming With Xlib -.TH XSetDeviceButtonMapping 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSetDeviceButtonMapping 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSetDeviceButtonMapping, XGetDeviceButtonMapping \- query or change device button mappings .SH SYNTAX Index: xc/doc/man/Xi/XSeDvFoc.man diff -u xc/doc/man/Xi/XSeDvFoc.man:1.2 xc/doc/man/Xi/XSeDvFoc.man:1.3 --- xc/doc/man/Xi/XSeDvFoc.man:1.2 Sat Jan 27 13:20:21 2001 +++ xc/doc/man/Xi/XSeDvFoc.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSeDvFoc.man,v 1.2 2001/01/27 18:20:21 dawes Exp $ +.\" $XFree86: xc/doc/man/Xi/XSeDvFoc.man,v 1.3 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSeDvFoc.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $ .ds xL Programming with Xlib -.TH XSetDeviceFocus 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSetDeviceFocus 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSetDeviceFocus, XGetDeviceFocus \- control extension input device focus .SH SYNTAX Index: xc/doc/man/Xi/XSelExtEv.man diff -u xc/doc/man/Xi/XSelExtEv.man:1.2 xc/doc/man/Xi/XSelExtEv.man:1.3 --- xc/doc/man/Xi/XSelExtEv.man:1.2 Sat Jan 27 13:20:22 2001 +++ xc/doc/man/Xi/XSelExtEv.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSelExtEv.man,v 1.2 2001/01/27 18:20:22 dawes Exp $ +.\" $XFree86: xc/doc/man/Xi/XSelExtEv.man,v 1.3 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSelExtEv.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $ .ds xL Programming with Xlib -.TH XSelectExtensionEvent 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSelectExtensionEvent 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSelectExtensionEvent, XGetSelectedExtensionEvents \- select extension events, get the list of currently selected extension events .SH SYNTAX Index: xc/doc/man/Xi/XSetDVal.man diff -u xc/doc/man/Xi/XSetDVal.man:1.2 xc/doc/man/Xi/XSetDVal.man:1.3 --- xc/doc/man/Xi/XSetDVal.man:1.2 Sat Jan 27 13:20:22 2001 +++ xc/doc/man/Xi/XSetDVal.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSetDVal.man,v 1.2 2001/01/27 18:20:22 dawes Exp $ +.\" $XFree86: xc/doc/man/Xi/XSetDVal.man,v 1.3 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSetDVal.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $ .ds xL Programming with Xlib -.TH XSetDeviceValuators 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSetDeviceValuators 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSetDeviceValuators \- initialize the valuators on an extension input device .SH SYNTAX Index: xc/doc/man/Xi/XSetMode.man diff -u xc/doc/man/Xi/XSetMode.man:1.2 xc/doc/man/Xi/XSetMode.man:1.3 --- xc/doc/man/Xi/XSetMode.man:1.2 Sat Jan 27 13:20:22 2001 +++ xc/doc/man/Xi/XSetMode.man Thu Feb 10 22:03:03 2005 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/doc/man/Xi/XSetMode.man,v 1.2 2001/01/27 18:20:22 dawes Exp $ +.\" $XFree86: xc/doc/man/Xi/XSetMode.man,v 1.3 2005/02/11 03:03:03 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, @@ -13,7 +13,7 @@ .\" .\" $Xorg: XSetMode.man,v 1.3 2000/08/17 19:41:57 cpqbld Exp $ .ds xL Programming with Xlib -.TH XSetDeviceMode 3X11 __xorgversion__ "X FUNCTIONS" +.TH XSetDeviceMode 3X11 __vendorversion__ "X FUNCTIONS" .SH NAME XSetDeviceMode \- change the mode of a device .SH SYNTAX Index: xc/doc/man/Xt/XtActHook.man diff -u xc/doc/man/Xt/XtActHook.man:1.4 xc/doc/man/Xt/XtActHook.man:1.5 --- xc/doc/man/Xt/XtActHook.man:1.4 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtActHook.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtActHook.man,v 1.4 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtActHook.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddActionHook 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddActionHook 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddActionHook, XtRemoveActionHook \- register an action hook procedure .SH SYNTAX Index: xc/doc/man/Xt/XtAddAct.man diff -u xc/doc/man/Xt/XtAddAct.man:1.3 xc/doc/man/Xt/XtAddAct.man:1.4 --- xc/doc/man/Xt/XtAddAct.man:1.3 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddAct.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddAct.man,v 1.3 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddAct.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAddActions 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtAddActions 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAddActions \- register an action table .SH SYNTAX Index: xc/doc/man/Xt/XtAddCbk.man diff -u xc/doc/man/Xt/XtAddCbk.man:1.4 xc/doc/man/Xt/XtAddCbk.man:1.5 --- xc/doc/man/Xt/XtAddCbk.man:1.4 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddCbk.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddCbk.man,v 1.4 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddCbk.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAddCallback 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAddCallback 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAddCallback, XtAddCallbacks, XtRemoveCallback, XtRemoveCallbacks, XtRemoveAllCallbacks \- add and remove callback procedures .SH SYNTAX Index: xc/doc/man/Xt/XtAddEHand.man diff -u xc/doc/man/Xt/XtAddEHand.man:1.4 xc/doc/man/Xt/XtAddEHand.man:1.5 --- xc/doc/man/Xt/XtAddEHand.man:1.4 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddEHand.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddEHand.man,v 1.4 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddEHand.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAddEventHandler 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAddEventHandler 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAddEventHandler, XtAddRawEventHandler, XtRemoveEventHandler, XtRemoveRawEventHandler, XtInsertEventHandler, XtInsertRawEventHandler \- add and remove event handlers .SH SYNTAX Index: xc/doc/man/Xt/XtAddETReg.man diff -u xc/doc/man/Xt/XtAddETReg.man:1.3 xc/doc/man/Xt/XtAddETReg.man:1.4 --- xc/doc/man/Xt/XtAddETReg.man:1.3 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddETReg.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddETReg.man,v 1.3 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddETReg.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAddExposureToRegion 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAddExposureToRegion 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAddExposureToRegion \- merge exposure events into a region .SH SYNTAX Index: xc/doc/man/Xt/XtAddGrab.man diff -u xc/doc/man/Xt/XtAddGrab.man:1.3 xc/doc/man/Xt/XtAddGrab.man:1.4 --- xc/doc/man/Xt/XtAddGrab.man:1.3 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddGrab.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddGrab.man,v 1.3 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddGrab.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAddGrab 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAddGrab 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAddGrab, XtRemoveGrab \- redirect user input to a modal widget .SH SYNTAX Index: xc/doc/man/Xt/XtAddIn.man diff -u xc/doc/man/Xt/XtAddIn.man:1.4 xc/doc/man/Xt/XtAddIn.man:1.5 --- xc/doc/man/Xt/XtAddIn.man:1.4 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAddIn.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAddIn.man,v 1.4 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAddIn.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAddInput 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtAddInput 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAddInput, XtAddTimeout \- register input, timeout, and workprocs .SH SYNTAX Index: xc/doc/man/Xt/XtAllocGC.man diff -u xc/doc/man/Xt/XtAllocGC.man:1.4 xc/doc/man/Xt/XtAllocGC.man:1.5 --- xc/doc/man/Xt/XtAllocGC.man:1.4 Mon Apr 28 18:18:17 2003 +++ xc/doc/man/Xt/XtAllocGC.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAllocGC.man,v 1.4 2003/04/28 22:18:17 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAllocGC.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAllocateGC 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAllocateGC 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAllocateGC \- obtain a sharable GC with modifiable fields .SH SYNTAX Index: xc/doc/man/Xt/XtAppAAct.man diff -u xc/doc/man/Xt/XtAppAAct.man:1.3 xc/doc/man/Xt/XtAppAAct.man:1.4 --- xc/doc/man/Xt/XtAppAAct.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppAAct.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppAAct.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppAAct.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddActions 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddActions 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddActions \- register an action table .SH SYNTAX Index: xc/doc/man/Xt/XtAppAC.man diff -u xc/doc/man/Xt/XtAppAC.man:1.4 xc/doc/man/Xt/XtAppAC.man:1.5 --- xc/doc/man/Xt/XtAppAC.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppAC.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppAC.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppAC.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddConverter 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtAppAddConverter 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAppAddConverter, XtAddConverter \- register resource converter .SH SYNTAX Index: xc/doc/man/Xt/XtAppAI.man diff -u xc/doc/man/Xt/XtAppAI.man:1.6 xc/doc/man/Xt/XtAppAI.man:1.7 --- xc/doc/man/Xt/XtAppAI.man:1.6 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppAI.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from the X Consortium. -.\" $XFree86: xc/doc/man/Xt/XtAppAI.man,v 1.6 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppAI.man,v 1.7 2005/02/11 03:03:04 dawes Exp $ .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface .ds xI Intrinsics @@ -125,7 +125,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddInput 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddInput 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddInput, XtRemoveInput \- register and remove an input source .SH SYNTAX Index: xc/doc/man/Xt/XtAppASig.man diff -u xc/doc/man/Xt/XtAppASig.man:1.3 xc/doc/man/Xt/XtAppASig.man:1.4 --- xc/doc/man/Xt/XtAppASig.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppASig.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppASig.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppASig.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddSignal 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddSignal 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddSignal, XtRemoveSignal, XtNoticeSignal \- register and remove a signal source .SH SYNTAX Index: xc/doc/man/Xt/XtAppATO.man diff -u xc/doc/man/Xt/XtAppATO.man:1.4 xc/doc/man/Xt/XtAppATO.man:1.5 --- xc/doc/man/Xt/XtAppATO.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppATO.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppATO.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppATO.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddTimeOut 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddTimeOut 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddTimeOut, XtRemoveTimeOut \- register and remove timeouts .SH SYNTAX Index: xc/doc/man/Xt/XtAppAWP.man diff -u xc/doc/man/Xt/XtAppAWP.man:1.3 xc/doc/man/Xt/XtAppAWP.man:1.4 --- xc/doc/man/Xt/XtAppAWP.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppAWP.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppAWP.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppAWP.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddWorkProc 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddWorkProc 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddWorkProc, XtRemoveWorkProc \- Add and remove background processing procedures .SH SYNTAX Index: xc/doc/man/Xt/XtAppCSh.man diff -u xc/doc/man/Xt/XtAppCSh.man:1.4 xc/doc/man/Xt/XtAppCSh.man:1.5 --- xc/doc/man/Xt/XtAppCSh.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppCSh.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppCSh.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppCSh.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppCreateShell 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppCreateShell 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppCreateShell, XtVaAppCreateShell \- create top-level widget instance .SH SYNTAX Index: xc/doc/man/Xt/XtAppE.man diff -u xc/doc/man/Xt/XtAppE.man:1.4 xc/doc/man/Xt/XtAppE.man:1.5 --- xc/doc/man/Xt/XtAppE.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppE.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppE.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppE.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppError 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppError 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppError, XtAppSetErrorHandler, XtAppSetWarningHandler, XtAppWarning \- low-level error handlers .SH SYNTAX Index: xc/doc/man/Xt/XtAppEM.man diff -u xc/doc/man/Xt/XtAppEM.man:1.4 xc/doc/man/Xt/XtAppEM.man:1.5 --- xc/doc/man/Xt/XtAppEM.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppEM.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppEM.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppEM.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppErrorMsg 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppErrorMsg 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppErrorMsg, XtAppSetErrorMsgHandler, XtAppSetWarningMsgHandler, XtAppWarningMsg \- high-level error handlers .SH SYNTAX Index: xc/doc/man/Xt/XtAppGEDB.man diff -u xc/doc/man/Xt/XtAppGEDB.man:1.3 xc/doc/man/Xt/XtAppGEDB.man:1.4 --- xc/doc/man/Xt/XtAppGEDB.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppGEDB.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppGEDB.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppGEDB.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppGetErrorDatabase 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppGetErrorDatabase 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppGetErrorDatabase, XtAppGetErrorDatabaseText \- obtain error database .SH SYNTAX Index: xc/doc/man/Xt/XtAppGSTO.man diff -u xc/doc/man/Xt/XtAppGSTO.man:1.3 xc/doc/man/Xt/XtAppGSTO.man:1.4 --- xc/doc/man/Xt/XtAppGSTO.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppGSTO.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppGSTO.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppGSTO.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtAppGetSelectionTimeout 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppGetSelectionTimeout 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppGetSelectionTimeout, XtAppSetSelectionTimeout \- set and obtain selection timeout values .SH SYNTAX Index: xc/doc/man/Xt/XtAppInit.man diff -u xc/doc/man/Xt/XtAppInit.man:1.6 xc/doc/man/Xt/XtAppInit.man:1.7 --- xc/doc/man/Xt/XtAppInit.man:1.6 Thu May 29 17:48:04 2003 +++ xc/doc/man/Xt/XtAppInit.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppInit.man,v 1.6 2003/05/29 21:48:04 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppInit.man,v 1.7 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppInitialize 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppInitialize 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppInitialize, XtVaAppInitialize \- initialize, open, or close a display .SH SYNTAX Index: xc/doc/man/Xt/XtAppLock.man diff -u xc/doc/man/Xt/XtAppLock.man:1.3 xc/doc/man/Xt/XtAppLock.man:1.4 --- xc/doc/man/Xt/XtAppLock.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppLock.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppLock.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppLock.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppLock 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppLock 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppLock, XtAppUnlock \- lock and unlock application context .SH SYNTAX Index: xc/doc/man/Xt/XtAppNEv.man diff -u xc/doc/man/Xt/XtAppNEv.man:1.6 xc/doc/man/Xt/XtAppNEv.man:1.7 --- xc/doc/man/Xt/XtAppNEv.man:1.6 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppNEv.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from the X Consortium. -.\" $XFree86: xc/doc/man/Xt/XtAppNEv.man,v 1.6 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppNEv.man,v 1.7 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppNextEvent 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppNextEvent 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppNextEvent, XtAppPending, XtAppPeekEvent, XtAppProcessEvent, XtDispatchEvent, XtAppMainLoop \- query and process events and input .SH SYNTAX Index: xc/doc/man/Xt/XtAppRCR.man diff -u xc/doc/man/Xt/XtAppRCR.man:1.3 xc/doc/man/Xt/XtAppRCR.man:1.4 --- xc/doc/man/Xt/XtAppRCR.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppRCR.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppRCR.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppRCR.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppReleaseCacheRefs 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppReleaseCacheRefs 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppReleaseCacheRefs \- decrement reference counts for resources .SH SYNTAX Index: xc/doc/man/Xt/XtAppSEF.man diff -u xc/doc/man/Xt/XtAppSEF.man:1.3 xc/doc/man/Xt/XtAppSEF.man:1.4 --- xc/doc/man/Xt/XtAppSEF.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppSEF.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppSEF.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppSEF.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppSetExitFlag 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppSetExitFlag 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppSetExitFlag, XtAppGetExitFlag \- thread support functions .SH SYNTAX Index: xc/doc/man/Xt/XtAppSTC.man diff -u xc/doc/man/Xt/XtAppSTC.man:1.4 xc/doc/man/Xt/XtAppSTC.man:1.5 --- xc/doc/man/Xt/XtAppSTC.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtAppSTC.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppSTC.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppSTC.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppSetTypeConverter 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppSetTypeConverter 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppSetTypeConverter, XtSetTypeConverter \- register resource converter .SH SYNTAX Index: xc/doc/man/Xt/XtAppSetFR.man diff -u xc/doc/man/Xt/XtAppSetFR.man:1.7 xc/doc/man/Xt/XtAppSetFR.man:1.8 --- xc/doc/man/Xt/XtAppSetFR.man:1.7 Thu May 29 17:48:04 2003 +++ xc/doc/man/Xt/XtAppSetFR.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtAppSetFR.man,v 1.7 2003/05/29 21:48:04 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtAppSetFR.man,v 1.8 2005/02/11 03:03:04 dawes Exp $ .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface .ds xI Intrinsics @@ -125,7 +125,7 @@ .el .sp 10p .. .ny0 -.TH XtAppSetFallbackResources 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppSetFallbackResources 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppSetFallbackResources \- set fallback resources .SH SYNTAX Index: xc/doc/man/Xt/XtBEMask.man diff -u xc/doc/man/Xt/XtBEMask.man:1.3 xc/doc/man/Xt/XtBEMask.man:1.4 --- xc/doc/man/Xt/XtBEMask.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtBEMask.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtBEMask.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtBEMask.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtBuildEventMask 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtBuildEventMask 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtBuildEventMask \- retrieve a widget's event mask .SH SYNTAX Index: xc/doc/man/Xt/XtBlockH.man diff -u xc/doc/man/Xt/XtBlockH.man:1.4 xc/doc/man/Xt/XtBlockH.man:1.5 --- xc/doc/man/Xt/XtBlockH.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtBlockH.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtBlockH.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtBlockH.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtAppAddBlockHook 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtAppAddBlockHook 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtAppAddBlockHook, XtRemoveBlockHook \- register a block hook procedure .SH SYNTAX Index: xc/doc/man/Xt/XtCallAFoc.man diff -u xc/doc/man/Xt/XtCallAFoc.man:1.3 xc/doc/man/Xt/XtCallAFoc.man:1.4 --- xc/doc/man/Xt/XtCallAFoc.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCallAFoc.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCallAFoc.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCallAFoc.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCallAcceptFocus 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCallAcceptFocus 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCallAcceptFocus \- calla widget's accept_focus procedure .SH SYNTAX Index: xc/doc/man/Xt/XtCallActP.man diff -u xc/doc/man/Xt/XtCallActP.man:1.4 xc/doc/man/Xt/XtCallActP.man:1.5 --- xc/doc/man/Xt/XtCallActP.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCallActP.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCallActP.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCallActP.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtCallActionProc 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCallActionProc 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCallActionProc \- invoke an action procedure directly .SH SYNTAX Index: xc/doc/man/Xt/XtCallCbks.man diff -u xc/doc/man/Xt/XtCallCbks.man:1.4 xc/doc/man/Xt/XtCallCbks.man:1.5 --- xc/doc/man/Xt/XtCallCbks.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCallCbks.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCallCbks.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCallCbks.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtCallCallbacks 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCallCallbacks 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCallCallbacks, XtCallCallbackList, XtHasCallbacks \- process callbacks .SH SYNTAX Index: xc/doc/man/Xt/XtClass.man diff -u xc/doc/man/Xt/XtClass.man:1.3 xc/doc/man/Xt/XtClass.man:1.4 --- xc/doc/man/Xt/XtClass.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtClass.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtClass.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtClass.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtClass 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtClass 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtClass, XtSuperclass, XtIsSubclass, XtCheckSubclass, XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, XtIsSessionShell \- obtain and verify a widget's class .SH SYNTAX Index: xc/doc/man/Xt/XtClickT.man diff -u xc/doc/man/Xt/XtClickT.man:1.3 xc/doc/man/Xt/XtClickT.man:1.4 --- xc/doc/man/Xt/XtClickT.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtClickT.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtClickT.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtClickT.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtSetMultiClickTime 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetMultiClickTime 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetMultiClickTime, XtGetMultiClickTime \- set and get multi-click times .SH SYNTAX Index: xc/doc/man/Xt/XtConfWid.man diff -u xc/doc/man/Xt/XtConfWid.man:1.4 xc/doc/man/Xt/XtConfWid.man:1.5 --- xc/doc/man/Xt/XtConfWid.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtConfWid.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtConfWid.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtConfWid.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtConfigureWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtConfigureWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtConfigureWidget, XtMoveWidget, XtResizeWidget \- move and resize widgets .SH SYNTAX Index: xc/doc/man/Xt/XtConvSt.man diff -u xc/doc/man/Xt/XtConvSt.man:1.5 xc/doc/man/Xt/XtConvSt.man:1.6 --- xc/doc/man/Xt/XtConvSt.man:1.5 Sat Jan 3 11:30:59 2004 +++ xc/doc/man/Xt/XtConvSt.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtConvSt.man,v 1.5 2004/01/03 16:30:59 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtConvSt.man,v 1.6 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtConvertAndStore 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtConvertAndStore 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtConvertAndStore, XtCallConverter \- invoke resource converters .SH SYNTAX Index: xc/doc/man/Xt/XtConvert.man diff -u xc/doc/man/Xt/XtConvert.man:1.4 xc/doc/man/Xt/XtConvert.man:1.5 --- xc/doc/man/Xt/XtConvert.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtConvert.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtConvert.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtConvert.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtConvert 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtConvert 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtConvert, XtDirectConvert \- invoke resource converters .SH SYNTAX Index: xc/doc/man/Xt/XtCreACon.man diff -u xc/doc/man/Xt/XtCreACon.man:1.4 xc/doc/man/Xt/XtCreACon.man:1.5 --- xc/doc/man/Xt/XtCreACon.man:1.4 Mon Jan 12 16:43:19 2004 +++ xc/doc/man/Xt/XtCreACon.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCreACon.man,v 1.4 2004/01/12 21:43:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCreACon.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCreateApplicationContext 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCreateApplicationContext 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCreateApplicationContext, XtDestroyApplicationContext, XtWidgetToApplicationContext, XtToolkitInitialize \- create, destroy, and obtain an application context .SH SYNTAX Index: xc/doc/man/Xt/XtCreASh.man diff -u xc/doc/man/Xt/XtCreASh.man:1.4 xc/doc/man/Xt/XtCreASh.man:1.5 --- xc/doc/man/Xt/XtCreASh.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCreASh.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCreASh.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCreASh.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCreateApplicationShell 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtCreateApplicationShell 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtCreateApplicationShell \- create top-level widget instance .SH SYNTAX Index: xc/doc/man/Xt/XtCrePSh.man diff -u xc/doc/man/Xt/XtCrePSh.man:1.4 xc/doc/man/Xt/XtCrePSh.man:1.5 --- xc/doc/man/Xt/XtCrePSh.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCrePSh.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCrePSh.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCrePSh.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCreatePopupShell 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCreatePopupShell 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCreatePopupShell, XtVaCreatePopupShell \- create a popup shell .SH SYNTAX Index: xc/doc/man/Xt/XtCreWid.man diff -u xc/doc/man/Xt/XtCreWid.man:1.4 xc/doc/man/Xt/XtCreWid.man:1.5 --- xc/doc/man/Xt/XtCreWid.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCreWid.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCreWid.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCreWid.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCreateWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCreateWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCreateWidget, XtVaCreateWidget, XtCreateManagedWidget, XtVaCreateManagedWidget, XtDestroyWidget \- create and destroy widgets .SH SYNTAX Index: xc/doc/man/Xt/XtCreWin.man diff -u xc/doc/man/Xt/XtCreWin.man:1.4 xc/doc/man/Xt/XtCreWin.man:1.5 --- xc/doc/man/Xt/XtCreWin.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCreWin.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCreWin.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCreWin.man,v 1.5 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtCreateWindow 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCreateWindow 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCreateWindow \- window creation convenience function .SH SYNTAX Index: xc/doc/man/Xt/XtCreateSR.man diff -u xc/doc/man/Xt/XtCreateSR.man:1.3 xc/doc/man/Xt/XtCreateSR.man:1.4 --- xc/doc/man/Xt/XtCreateSR.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtCreateSR.man Thu Feb 10 22:03:04 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtCreateSR.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtCreateSR.man,v 1.4 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtCreateSelectionRequest 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtCreateSelectionRequest 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtCreateSelectionRequest, XtSendSelectionRequest, XtCancelSelectionRequest \- bundle multiple selection conversion requests into a single request using MULTIPLE target .SH SYNTAX Index: xc/doc/man/Xt/XtDStrCW.man diff -u xc/doc/man/Xt/XtDStrCW.man:1.5 xc/doc/man/Xt/XtDStrCW.man:1.6 --- xc/doc/man/Xt/XtDStrCW.man:1.5 Thu May 29 17:48:05 2003 +++ xc/doc/man/Xt/XtDStrCW.man Thu Feb 10 22:03:04 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtDStrCW.man,v 1.5 2003/05/29 21:48:05 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtDStrCW.man,v 1.6 2005/02/11 03:03:04 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtDisplayStringConversionWarning 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtDisplayStringConversionWarning 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtDisplayStringConversionWarning \- issue a conversion warning message .SH SYNTAX Index: xc/doc/man/Xt/XtDisACon.man diff -u xc/doc/man/Xt/XtDisACon.man:1.3 xc/doc/man/Xt/XtDisACon.man:1.4 --- xc/doc/man/Xt/XtDisACon.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtDisACon.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtDisACon.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtDisACon.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtDisplayToApplicationContext 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtDisplayToApplicationContext 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtDisplayToApplicationContext \- obtain an application context .SH SYNTAX Index: xc/doc/man/Xt/XtDisplay.man diff -u xc/doc/man/Xt/XtDisplay.man:1.3 xc/doc/man/Xt/XtDisplay.man:1.4 --- xc/doc/man/Xt/XtDisplay.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtDisplay.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtDisplay.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtDisplay.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtDisplay 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtDisplay 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtDisplay, XtDisplayOfObject, XtScreen, XtScreenOfObject, XtWindow, XtWindowOfObject \- obtain window information about a widget .SH SYNTAX Index: xc/doc/man/Xt/XtDisplayI.man diff -u xc/doc/man/Xt/XtDisplayI.man:1.4 xc/doc/man/Xt/XtDisplayI.man:1.5 --- xc/doc/man/Xt/XtDisplayI.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtDisplayI.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtDisplayI.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtDisplayI.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtDisplayInitialize 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtDisplayInitialize 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtDisplayInitialize, XtOpenDisplay, XtDatabase, XtScreenDatabase, XtCloseDisplay \- initialize, open, or close a display .SH SYNTAX Index: xc/doc/man/Xt/XtErr.man diff -u xc/doc/man/Xt/XtErr.man:1.4 xc/doc/man/Xt/XtErr.man:1.5 --- xc/doc/man/Xt/XtErr.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtErr.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtErr.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtErr.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtError 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtError 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtError, XtSetErrorHandler, XtSetWarningHandler, XtWarning \- low-level error handlers .SH SYNTAX Index: xc/doc/man/Xt/XtErrM.man diff -u xc/doc/man/Xt/XtErrM.man:1.4 xc/doc/man/Xt/XtErrM.man:1.5 --- xc/doc/man/Xt/XtErrM.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtErrM.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtErrM.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtErrM.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtErrorMsg 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtErrorMsg 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, XtSetWarningMsgHandler \- high-level error handlers .SH SYNTAX Index: xc/doc/man/Xt/XtExtEvDis.man diff -u xc/doc/man/Xt/XtExtEvDis.man:1.4 xc/doc/man/Xt/XtExtEvDis.man:1.5 --- xc/doc/man/Xt/XtExtEvDis.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtExtEvDis.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtExtEvDis.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtExtEvDis.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtInsertEventTypeHandler 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtInsertEventTypeHandler 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtInsertEventTypeHandler, XtRemoveEventTypeHandler, XtRegisterExtensionSelector, XtSetEventDispatcher, XtDispatchEventToWidget Index: xc/doc/man/Xt/XtFindF.man diff -u xc/doc/man/Xt/XtFindF.man:1.5 xc/doc/man/Xt/XtFindF.man:1.6 --- xc/doc/man/Xt/XtFindF.man:1.5 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtFindF.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtFindF.man,v 1.5 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtFindF.man,v 1.6 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtFindFile 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtFindFile 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtFindFile \- search for a file using substitutions in the path list .SH SYNTAX Index: xc/doc/man/Xt/XtGEDB.man diff -u xc/doc/man/Xt/XtGEDB.man:1.4 xc/doc/man/Xt/XtGEDB.man:1.5 --- xc/doc/man/Xt/XtGEDB.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGEDB.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGEDB.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGEDB.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetErrorDatabase 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtGetErrorDatabase 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtGetErrorDatabase, XtGetErrorDatabaseText \- obtain error database .SH SYNTAX Index: xc/doc/man/Xt/XtGetANC.man diff -u xc/doc/man/Xt/XtGetANC.man:1.4 xc/doc/man/Xt/XtGetANC.man:1.5 --- xc/doc/man/Xt/XtGetANC.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetANC.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetANC.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetANC.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetApplicationNameAndClass 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetApplicationNameAndClass 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetApplicationNameAndClass \- retrieve application name and class .SH SYNTAX Index: xc/doc/man/Xt/XtGetActK.man diff -u xc/doc/man/Xt/XtGetActK.man:1.3 xc/doc/man/Xt/XtGetActK.man:1.4 --- xc/doc/man/Xt/XtGetActK.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetActK.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetActK.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetActK.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetActionKeysym 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetActionKeysym 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetActionKeysym \- obtain corresponding keysym .SH SYNTAX Index: xc/doc/man/Xt/XtGetActL.man diff -u xc/doc/man/Xt/XtGetActL.man:1.4 xc/doc/man/Xt/XtGetActL.man:1.5 --- xc/doc/man/Xt/XtGetActL.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetActL.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetActL.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetActL.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetActionList 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetActionList 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetActionList \- obtain class action list .SH SYNTAX Index: xc/doc/man/Xt/XtGetAres.man diff -u xc/doc/man/Xt/XtGetAres.man:1.4 xc/doc/man/Xt/XtGetAres.man:1.5 --- xc/doc/man/Xt/XtGetAres.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetAres.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetAres.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetAres.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetApplicationResources 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetApplicationResources 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetApplicationResources, XtVaGetApplicationResources \- obtain application resources .SH SYNTAX Index: xc/doc/man/Xt/XtGetClExt.man diff -u xc/doc/man/Xt/XtGetClExt.man:1.4 xc/doc/man/Xt/XtGetClExt.man:1.5 --- xc/doc/man/Xt/XtGetClExt.man:1.4 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetClExt.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetClExt.man,v 1.4 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetClExt.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetClassExtension 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetClassExtension 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetClassExtension \- locate a class extension record .SH SYNTAX Index: xc/doc/man/Xt/XtGetDisp.man diff -u xc/doc/man/Xt/XtGetDisp.man:1.3 xc/doc/man/Xt/XtGetDisp.man:1.4 --- xc/doc/man/Xt/XtGetDisp.man:1.3 Mon Apr 28 18:18:18 2003 +++ xc/doc/man/Xt/XtGetDisp.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetDisp.man,v 1.3 2003/04/28 22:18:18 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetDisp.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetDisplays 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetDisplays 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetDisplays \- retrieve a list of displays associated with an application context .SH SYNTAX Index: xc/doc/man/Xt/XtGetGC.man diff -u xc/doc/man/Xt/XtGetGC.man:1.3 xc/doc/man/Xt/XtGetGC.man:1.4 --- xc/doc/man/Xt/XtGetGC.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetGC.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetGC.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetGC.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetGC 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetGC 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetGC, XtReleaseGC \- obtain and destroy a sharable GC .SH SYNTAX Index: xc/doc/man/Xt/XtGetKFoc.man diff -u xc/doc/man/Xt/XtGetKFoc.man:1.3 xc/doc/man/Xt/XtGetKFoc.man:1.4 --- xc/doc/man/Xt/XtGetKFoc.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetKFoc.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetKFoc.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetKFoc.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetKeyboardFocusWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetKeyboardFocusWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetKeyboardFocusWidget \- extension event handling .SH SYNTAX Index: xc/doc/man/Xt/XtGetRList.man diff -u xc/doc/man/Xt/XtGetRList.man:1.4 xc/doc/man/Xt/XtGetRList.man:1.5 --- xc/doc/man/Xt/XtGetRList.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetRList.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetRList.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetRList.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetResourceList 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetResourceList 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetResourceList, XtGetConstraintResourceList \- obtain resource list .SH SYNTAX Index: xc/doc/man/Xt/XtGetSP.man diff -u xc/doc/man/Xt/XtGetSP.man:1.5 xc/doc/man/Xt/XtGetSP.man:1.6 --- xc/doc/man/Xt/XtGetSP.man:1.5 Thu May 29 17:48:05 2003 +++ xc/doc/man/Xt/XtGetSP.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSP.man,v 1.5 2003/05/29 21:48:05 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSP.man,v 1.6 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSelectionParameters 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetSelectionParameters 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionParameters \- retrieve target parameters for a selection request with a single target .SH SYNTAX Index: xc/doc/man/Xt/XtGetSR.man diff -u xc/doc/man/Xt/XtGetSR.man:1.4 xc/doc/man/Xt/XtGetSR.man:1.5 --- xc/doc/man/Xt/XtGetSR.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetSR.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSR.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSR.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSelectionRequest 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetSelectionRequest 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionRequest \- retrieve the event that triggered the XtConvertSelectionProc .SH SYNTAX Index: xc/doc/man/Xt/XtGetSTO.man diff -u xc/doc/man/Xt/XtGetSTO.man:1.3 xc/doc/man/Xt/XtGetSTO.man:1.4 --- xc/doc/man/Xt/XtGetSTO.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetSTO.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSTO.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSTO.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSelectionTimeout 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtGetSelectionTimeout 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtGetSelectionTimeout, XtSetSelectionTimeout \- set and obtain selection timeout values .SH SYNTAX Index: xc/doc/man/Xt/XtGetSVal.man diff -u xc/doc/man/Xt/XtGetSVal.man:1.4 xc/doc/man/Xt/XtGetSVal.man:1.5 --- xc/doc/man/Xt/XtGetSVal.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetSVal.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSVal.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSVal.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSelectionValue 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetSelectionValue 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionValue, XtGetSelectionValues \- obtain selection values .SH SYNTAX Index: xc/doc/man/Xt/XtGetSValI.man diff -u xc/doc/man/Xt/XtGetSValI.man:1.5 xc/doc/man/Xt/XtGetSValI.man:1.6 --- xc/doc/man/Xt/XtGetSValI.man:1.5 Thu May 29 17:48:05 2003 +++ xc/doc/man/Xt/XtGetSValI.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSValI.man,v 1.5 2003/05/29 21:48:05 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSValI.man,v 1.6 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSelectionValueIncremental 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetSelectionValueIncremental 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionValueIncremental, XtGetSelectionValuesIncremental \- obtain selection values .SH SYNTAX Index: xc/doc/man/Xt/XtGetSres.man diff -u xc/doc/man/Xt/XtGetSres.man:1.4 xc/doc/man/Xt/XtGetSres.man:1.5 --- xc/doc/man/Xt/XtGetSres.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGetSres.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGetSres.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGetSres.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetSubresources 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetSubresources 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetSubresources, XtVaGetSubresources \- obtain subresources .SH SYNTAX Index: xc/doc/man/Xt/XtGrabKey.man diff -u xc/doc/man/Xt/XtGrabKey.man:1.4 xc/doc/man/Xt/XtGrabKey.man:1.5 --- xc/doc/man/Xt/XtGrabKey.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtGrabKey.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtGrabKey.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtGrabKey.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtGrabKey 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGrabKey 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGrabKey, XtUngrabKey, XtGrabKeyboard, XtUngrabKeyboard, XtGrabButton, XtUngrabButton, XtGrabPointer, XtUngrabPointer \- manage grabs .SH SYNTAX Index: xc/doc/man/Xt/XtHookOD.man diff -u xc/doc/man/Xt/XtHookOD.man:1.3 xc/doc/man/Xt/XtHookOD.man:1.4 --- xc/doc/man/Xt/XtHookOD.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtHookOD.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtHookOD.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtHookOD.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtHooksOfDisplay 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtHooksOfDisplay 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtHooksOfDisplay \- external agent access points .SH SYNTAX Index: xc/doc/man/Xt/XtInit.man diff -u xc/doc/man/Xt/XtInit.man:1.4 xc/doc/man/Xt/XtInit.man:1.5 --- xc/doc/man/Xt/XtInit.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtInit.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtInit.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtInit.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtInitialize 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtInitialize 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtInitialize \- initialize .SH SYNTAX Index: xc/doc/man/Xt/XtInitWC.man diff -u xc/doc/man/Xt/XtInitWC.man:1.3 xc/doc/man/Xt/XtInitWC.man:1.4 --- xc/doc/man/Xt/XtInitWC.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtInitWC.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtInitWC.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtInitWC.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtInitializeWidgetClass 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtInitializeWidgetClass 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtInitializeWidgetClass \- initialize a widget class .SH SYNTAX Index: xc/doc/man/Xt/XtKeysym.man diff -u xc/doc/man/Xt/XtKeysym.man:1.4 xc/doc/man/Xt/XtKeysym.man:1.5 --- xc/doc/man/Xt/XtKeysym.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtKeysym.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtKeysym.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtKeysym.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtGetKeysymTable 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtGetKeysymTable 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtGetKeysymTable, XtKeysymToKeycodeList \- query keysyms and keycodes .SH SYNTAX Index: xc/doc/man/Xt/XtLastProc.man diff -u xc/doc/man/Xt/XtLastProc.man:1.3 xc/doc/man/Xt/XtLastProc.man:1.4 --- xc/doc/man/Xt/XtLastProc.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtLastProc.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtLastProc.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtLastProc.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtLastEventProcessed 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtLastEventProcessed 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtLastEventProcessed, XtLastTimestampProcessed \- last event, last timestamp processed .SH SYNTAX Index: xc/doc/man/Xt/XtMakGReq.man diff -u xc/doc/man/Xt/XtMakGReq.man:1.4 xc/doc/man/Xt/XtMakGReq.man:1.5 --- xc/doc/man/Xt/XtMakGReq.man:1.4 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtMakGReq.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtMakGReq.man,v 1.4 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtMakGReq.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtMakeGeometryRequest 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtMakeGeometryRequest 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtMakeGeometryRequest, XtMakeResizeRequest \- make geometry manager request .SH SYNTAX Index: xc/doc/man/Xt/XtMalloc.man diff -u xc/doc/man/Xt/XtMalloc.man:1.3 xc/doc/man/Xt/XtMalloc.man:1.4 --- xc/doc/man/Xt/XtMalloc.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtMalloc.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtMalloc.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtMalloc.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtMalloc 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtMalloc 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtMalloc, XtCalloc, XtRealloc, XtFree, XtNew, XtNewString \- memory management functions .SH SYNTAX Index: xc/doc/man/Xt/XtManChild.man diff -u xc/doc/man/Xt/XtManChild.man:1.3 xc/doc/man/Xt/XtManChild.man:1.5 --- xc/doc/man/Xt/XtManChild.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtManChild.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtManChild.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtManChild.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtManageChildren 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtManageChildren 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, XtIsManaged \- manage and unmanage children .SH SYNTAX @@ -142,10 +142,10 @@ .HP void XtUnmanageChild(Widget \fIchild\fP); .HP -void XtChangeManagedSet(WidgetList \fIunmanage_children\fP, Cardinal -\fInum_unmanage_children\fP, WidgetList \fImanage_children\fP, Cardinal -\fInum_manage_children\fP, XtCSMProc \fIpost_unmanage_pre_manage_hook\fP, -XtPointer \fIclient_data\fP); +void XtChangeManagedSet(WidgetList \fIunmanage_children\fP, +Cardinal \fInum_unmanage_children\fP, XtDoChangeProc \fIdo_change_proc\fP, +XtPointer \fIclient_data\fP, WidgetList \fImanage_children\fP, +Cardinal \fInum_manage_children\fP); .HP Boolean XtIsManaged(Widget \fIwidget\fP); .SH ARGUMENTS @@ -165,7 +165,7 @@ Specifies the list of widget children to remove from the managed set. .IP \fInum_unmanage_children\fP 1i Specifies the number of entries in the unmanage_children list. -.IP \fIpost_unmanage_pre_manage_hook\fP 1i +.IP \fIdo_change_proc\fP 1i Specifies the post unmanage, pre manage hook procedure to invoke. .IP \fIclient_data\fP 1i Specifies the client data to be passed to the hook precedure. @@ -280,7 +280,7 @@ .ZN False , and .ZN XtChangeManagedSet -was invoked with a non-NULL \fIpost_unmanage_pre_manage_hook\fP procedure +was invoked with a non-NULL \fIdo_change_proc\fP procedure then .ZN XtChangeManagedSet performs the following: @@ -290,7 +290,7 @@ .ZN XtUnmanageChildren (\fIunmanage_children\fP, \fInum_unmanage_children\fP). .IP \- 5 -Calls the \fIpost_unmanage_pre_manage_hook\fP specified. +Calls the \fIdo_change_proc\fP specified. .IP \- 5 Calls .ZN XtManageChildren @@ -306,7 +306,7 @@ .ZN CompositeClassExtension is defined, and .ZN XtChangeManagedSet was invoked with a NULL -\fIpost_unmanage_pre_manage_hook\fP procedure, then the following is +\fIdo_change_proc\fP procedure, then the following is performed: .RS .IP \- 5 @@ -315,7 +315,7 @@ is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped. .IP \- 5 -If the \fIpost_unmanage_pre_manage_hook\fP procdedure is non-NULL then +If the \fIdo_change_proc\fP procdedure is non-NULL then it is invoked as specified. .IP \- 5 For each child on the \fImanage_children\fP list; if the child is Index: xc/doc/man/Xt/XtMapWid.man diff -u xc/doc/man/Xt/XtMapWid.man:1.3 xc/doc/man/Xt/XtMapWid.man:1.4 --- xc/doc/man/Xt/XtMapWid.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtMapWid.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtMapWid.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtMapWid.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtMapWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtMapWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtMapWidget, XtSetMappedWhenManaged, XtUnmapWidget \- map and unmap widgets .SH SYNTAX Index: xc/doc/man/Xt/XtName.man diff -u xc/doc/man/Xt/XtName.man:1.3 xc/doc/man/Xt/XtName.man:1.5 --- xc/doc/man/Xt/XtName.man:1.3 Mon Apr 28 18:18:19 2003 +++ xc/doc/man/Xt/XtName.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtName.man,v 1.3 2003/04/28 22:18:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtName.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,12 +126,12 @@ .el .sp 10p .. .ny0 -.TH XtName 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtName 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtName \- obtain widget's name .SH SYNTAX .HP -Widget XtName(Widget \fIw\fP); +String XtName(Widget \fIw\fP); .SH ARGUMENTS .IP \fIw\fP 1i Specifies the widget. Index: xc/doc/man/Xt/XtNameTWid.man diff -u xc/doc/man/Xt/XtNameTWid.man:1.3 xc/doc/man/Xt/XtNameTWid.man:1.4 --- xc/doc/man/Xt/XtNameTWid.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtNameTWid.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtNameTWid.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtNameTWid.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtNameToWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtNameToWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtNameToWidget, XtWindowToWidget \- translating strings to widgets or widgets to windows .SH SYNTAX Index: xc/doc/man/Xt/XtNextEv.man diff -u xc/doc/man/Xt/XtNextEv.man:1.5 xc/doc/man/Xt/XtNextEv.man:1.7 --- xc/doc/man/Xt/XtNextEv.man:1.5 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtNextEv.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealing in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtNextEv.man,v 1.5 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtNextEv.man,v 1.7 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtNextEvent 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtNextEvent 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtNextEvent, XtPending, XtPeekEvent, XtProcessEvent, XtMainLoop \- query and process events and input .SH SYNTAX @@ -137,7 +137,7 @@ Boolean XtPeekEvent(XEvent *\fIevent_return\fP); .HP Boolean XtPending(void); -.Hp +.HP void XtProcessEvent(XtInputMask \fImask\fP); .HP void XtMainLoop(void); Index: xc/doc/man/Xt/XtOffset.man diff -u xc/doc/man/Xt/XtOffset.man:1.3 xc/doc/man/Xt/XtOffset.man:1.4 --- xc/doc/man/Xt/XtOffset.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtOffset.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtOffset.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtOffset.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtOffset 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtOffset 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtOffset, XtOffsetOf, XtNumber \- determine the byte offset or number of array elements .SH SYNTAX Index: xc/doc/man/Xt/XtOpenApp.man diff -u xc/doc/man/Xt/XtOpenApp.man:1.6 xc/doc/man/Xt/XtOpenApp.man:1.7 --- xc/doc/man/Xt/XtOpenApp.man:1.6 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtOpenApp.man Thu Feb 10 22:03:05 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtOpenApp.man,v 1.6 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtOpenApp.man,v 1.7 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtOpenApplication 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtOpenApplication 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtOpenApplication, XtVaOpenApplication \- initialize, open, or close a display .SH SYNTAX Index: xc/doc/man/Xt/XtOwnSel.man diff -u xc/doc/man/Xt/XtOwnSel.man:1.4 xc/doc/man/Xt/XtOwnSel.man:1.5 --- xc/doc/man/Xt/XtOwnSel.man:1.4 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtOwnSel.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtOwnSel.man,v 1.4 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtOwnSel.man,v 1.5 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtOwnSelection 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtOwnSelection 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtOwnSelection, XtOwnSelectionIncremental, XtDisownSelection \- set selection owner .SH SYNTAX Index: xc/doc/man/Xt/XtParATab.man diff -u xc/doc/man/Xt/XtParATab.man:1.3 xc/doc/man/Xt/XtParATab.man:1.4 --- xc/doc/man/Xt/XtParATab.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtParATab.man Thu Feb 10 22:03:05 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtParATab.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtParATab.man,v 1.4 2005/02/11 03:03:05 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtParseAcceleratorTable 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtParseAcceleratorTable 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtParseAcceleratorTable, XtInstallAccelerators, XtInstallAllAccelerators \- managing accelerator tables .SH SYNTAX Index: xc/doc/man/Xt/XtParTTab.man diff -u xc/doc/man/Xt/XtParTTab.man:1.3 xc/doc/man/Xt/XtParTTab.man:1.4 --- xc/doc/man/Xt/XtParTTab.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtParTTab.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtParTTab.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtParTTab.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtParseTranslationTable 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtParseTranslationTable 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtParseTranslationTable, XtAugmentTranslations, XtOverrideTranslations, XtUninstallTranslations \- manage translation tables .SH SYNTAX Index: xc/doc/man/Xt/XtParent.man diff -u xc/doc/man/Xt/XtParent.man:1.3 xc/doc/man/Xt/XtParent.man:1.4 --- xc/doc/man/Xt/XtParent.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtParent.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtParent.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtParent.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtParent 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtParent 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtParent \- obtain widget's parent widget id .SH SYNTAX Index: xc/doc/man/Xt/XtPopdown.man diff -u xc/doc/man/Xt/XtPopdown.man:1.3 xc/doc/man/Xt/XtPopdown.man:1.4 --- xc/doc/man/Xt/XtPopdown.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtPopdown.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtPopdown.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtPopdown.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtPopdown 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtPopdown 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtPopdown, XtCallbackPopdown \- unmap a pop-up .SH SYNTAX Index: xc/doc/man/Xt/XtPopup.man diff -u xc/doc/man/Xt/XtPopup.man:1.3 xc/doc/man/Xt/XtPopup.man:1.4 --- xc/doc/man/Xt/XtPopup.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtPopup.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtPopup.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtPopup.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtPopup 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtPopup 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive \- map a pop-up .SH SYNTAX Index: xc/doc/man/Xt/XtProcLock.man diff -u xc/doc/man/Xt/XtProcLock.man:1.3 xc/doc/man/Xt/XtProcLock.man:1.4 --- xc/doc/man/Xt/XtProcLock.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtProcLock.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtProcLock.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtProcLock.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtProcessLock 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtProcessLock 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtProcessLock, XtProcessUnlock \- lock and unlock process .SH SYNTAX Index: xc/doc/man/Xt/XtQueryGeo.man diff -u xc/doc/man/Xt/XtQueryGeo.man:1.4 xc/doc/man/Xt/XtQueryGeo.man:1.5 --- xc/doc/man/Xt/XtQueryGeo.man:1.4 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtQueryGeo.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtQueryGeo.man,v 1.4 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtQueryGeo.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtQueryGeometry 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtQueryGeometry 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtQueryGeometry \- query the preferred geometry of a child widget .SH SYNTAX Index: xc/doc/man/Xt/XtRealize.man diff -u xc/doc/man/Xt/XtRealize.man:1.3 xc/doc/man/Xt/XtRealize.man:1.4 --- xc/doc/man/Xt/XtRealize.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtRealize.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtRealize.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtRealize.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtRealizeWidget 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtRealizeWidget 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtRealizeWidget, XtIsRealized, XtUnrealizeWidget \- realize and unrealize widgets .SH SYNTAX Index: xc/doc/man/Xt/XtRegDraw.man diff -u xc/doc/man/Xt/XtRegDraw.man:1.3 xc/doc/man/Xt/XtRegDraw.man:1.4 --- xc/doc/man/Xt/XtRegDraw.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtRegDraw.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtRegDraw.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtRegDraw.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtRegisterDrawable 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtRegisterDrawable 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtRegisterDrawable \- register a drawable with the Intrisics event dispatcher .SH SYNTAX Index: xc/doc/man/Xt/XtRegGA.man diff -u xc/doc/man/Xt/XtRegGA.man:1.4 xc/doc/man/Xt/XtRegGA.man:1.5 --- xc/doc/man/Xt/XtRegGA.man:1.4 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtRegGA.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtRegGA.man,v 1.4 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtRegGA.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtRegisterGrabAction 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtRegisterGrabAction 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtRegisterGrabAction \- register button and key grabs .SH SYNTAX Index: xc/doc/man/Xt/XtResPA.man diff -u xc/doc/man/Xt/XtResPA.man:1.3 xc/doc/man/Xt/XtResPA.man:1.4 --- xc/doc/man/Xt/XtResPA.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtResPA.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtResPA.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtResPA.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtReservePropertyAtom 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtReservePropertyAtom 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtReservePropertyAtom, XtReleasePropertyAtom \- maintain a cache of property atoms .SH SYNTAX Index: xc/doc/man/Xt/XtResPath.man diff -u xc/doc/man/Xt/XtResPath.man:1.5 xc/doc/man/Xt/XtResPath.man:1.7 --- xc/doc/man/Xt/XtResPath.man:1.5 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtResPath.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtResPath.man,v 1.5 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtResPath.man,v 1.7 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtResolvePathname 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtResolvePathname 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtResolvePathname \- search for a file using standard substitution .SH SYNTAX @@ -240,9 +240,9 @@ .LP A suggested value for the default path on POSIX-based systems is .IP -__projectroot__/lib/X11/%L/%T/%N%C%S:__projectroot__/lib/X11/%l/%T/%N%C%S:\\ +__projectroot__/lib/X11/%L/%T/%N%C%S:__projectroot__/lib/X11/%l/%T/%N%C%S:\\\& .br -__projectroot__/lib/X11/%T/%N%C%S:__projectroot__/lib/X11/%L/%T/%N%S:\\ +__projectroot__/lib/X11/%T/%N%C%S:__projectroot__/lib/X11/%L/%T/%N%S:\\\& .br __projectroot__/lib/X11/%l/%T/%N%S:__projectroot__/lib/X11/%T/%N%S .LP Index: xc/doc/man/Xt/XtSession.man diff -u xc/doc/man/Xt/XtSession.man:1.3 xc/doc/man/Xt/XtSession.man:1.4 --- xc/doc/man/Xt/XtSession.man:1.3 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtSession.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSession.man,v 1.3 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSession.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSessionGetToken 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSessionGetToken 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSessionGetToken, XtSessionReturnToken \- token management for checkpointing .SH SYNTAX Index: xc/doc/man/Xt/XtSetArg.man diff -u xc/doc/man/Xt/XtSetArg.man:1.4 xc/doc/man/Xt/XtSetArg.man:1.5 --- xc/doc/man/Xt/XtSetArg.man:1.4 Mon Apr 28 18:18:20 2003 +++ xc/doc/man/Xt/XtSetArg.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetArg.man,v 1.4 2003/04/28 22:18:20 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetArg.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSetArg 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetArg 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetArg, XtMergeArgLists \- set and merge ArgLists .SH SYNTAX Index: xc/doc/man/Xt/XtSetKFoc.man diff -u xc/doc/man/Xt/XtSetKFoc.man:1.4 xc/doc/man/Xt/XtSetKFoc.man:1.5 --- xc/doc/man/Xt/XtSetKFoc.man:1.4 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtSetKFoc.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetKFoc.man,v 1.4 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetKFoc.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSetKeyboardFocus 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetKeyboardFocus 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetKeyboardFocus \- focus events on a child widget .SH SYNTAX Index: xc/doc/man/Xt/XtSetKTr.man diff -u xc/doc/man/Xt/XtSetKTr.man:1.4 xc/doc/man/Xt/XtSetKTr.man:1.5 --- xc/doc/man/Xt/XtSetKTr.man:1.4 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtSetKTr.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetKTr.man,v 1.4 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetKTr.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSetKeyTranslator 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetKeyTranslator 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetKeyTranslator, XtTranslateKeycode, XtRegisterCaseConverter, XtConvertCase \- convert KeySym to KeyCodes .SH SYNTAX Index: xc/doc/man/Xt/XtSetLangP.man diff -u xc/doc/man/Xt/XtSetLangP.man:1.5 xc/doc/man/Xt/XtSetLangP.man:1.6 --- xc/doc/man/Xt/XtSetLangP.man:1.5 Mon Jan 12 16:43:19 2004 +++ xc/doc/man/Xt/XtSetLangP.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetLangP.man,v 1.5 2004/01/12 21:43:19 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetLangP.man,v 1.6 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSetLanguageProc 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetLanguageProc 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetLanguageProc \- set the language procedure .SH SYNTAX Index: xc/doc/man/Xt/XtSetSP.man diff -u xc/doc/man/Xt/XtSetSP.man:1.5 xc/doc/man/Xt/XtSetSP.man:1.6 --- xc/doc/man/Xt/XtSetSP.man:1.5 Thu May 29 17:48:05 2003 +++ xc/doc/man/Xt/XtSetSP.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetSP.man,v 1.5 2003/05/29 21:48:05 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetSP.man,v 1.6 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtSetSelectionParameters 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetSelectionParameters 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetSelectionParameters \- specify target parameters for a selection request with a single target .SH SYNTAX Index: xc/doc/man/Xt/XtSetSens.man diff -u xc/doc/man/Xt/XtSetSens.man:1.3 xc/doc/man/Xt/XtSetSens.man:1.4 --- xc/doc/man/Xt/XtSetSens.man:1.3 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtSetSens.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetSens.man,v 1.3 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetSens.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtSetSensitive 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetSensitive 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetSensitive, XtIsSensitive \- set and check a widget's sensitivity state .SH SYNTAX Index: xc/doc/man/Xt/XtSetVal.man diff -u xc/doc/man/Xt/XtSetVal.man:1.4 xc/doc/man/Xt/XtSetVal.man:1.5 --- xc/doc/man/Xt/XtSetVal.man:1.4 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtSetVal.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetVal.man,v 1.4 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetVal.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtSetValues 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetValues 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetValues, XtVaSetValues, XtSetSubvalues, XtVaSetSubvalues, XtGetValues, XtVaGetValues, XtGetSubvalues, XtVaGetSubvalues \- obtain and set widget resources .SH SYNTAX Index: xc/doc/man/Xt/XtSetWMC.man diff -u xc/doc/man/Xt/XtSetWMC.man:1.3 xc/doc/man/Xt/XtSetWMC.man:1.4 --- xc/doc/man/Xt/XtSetWMC.man:1.3 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtSetWMC.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtSetWMC.man,v 1.3 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtSetWMC.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtSetWMColormapWindows 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtSetWMColormapWindows 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtSetWMColormapWindows \- Set the value of the WM_COLORMAP_WINDOWS property .SH SYNTAX Index: xc/doc/man/Xt/XtStrCW.man diff -u xc/doc/man/Xt/XtStrCW.man:1.3 xc/doc/man/Xt/XtStrCW.man:1.4 --- xc/doc/man/Xt/XtStrCW.man:1.3 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtStrCW.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtStrCW.man,v 1.3 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtStrCW.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtStringConversionWarning 3Xt __xorgversion__ "XT COMPATIBILITY FUNCTIONS" +.TH XtStringConversionWarning 3Xt __vendorversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtStringConversionWarning \- issue a conversion warning message .SH SYNTAX Index: xc/doc/man/Xt/XtThreadI.man diff -u xc/doc/man/Xt/XtThreadI.man:1.3 xc/doc/man/Xt/XtThreadI.man:1.4 --- xc/doc/man/Xt/XtThreadI.man:1.3 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtThreadI.man Thu Feb 10 22:03:06 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtThreadI.man,v 1.3 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtThreadI.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -126,7 +126,7 @@ .el .sp 10p .. .ny0 -.TH XtToolkitThreadInitialize 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtToolkitThreadInitialize 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtToolkitThreadInitialize \- initialize the toolkit for multiple threads .SH SYNTAX Index: xc/doc/man/Xt/XtTransC.man diff -u xc/doc/man/Xt/XtTransC.man:1.4 xc/doc/man/Xt/XtTransC.man:1.5 --- xc/doc/man/Xt/XtTransC.man:1.4 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtTransC.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtTransC.man,v 1.4 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtTransC.man,v 1.5 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtTranslateCoords 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtTranslateCoords 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtTranslateCoords \- translate widget coordinates .SH SYNTAX Index: xc/doc/man/Xt/XtVaCrArgL.man diff -u xc/doc/man/Xt/XtVaCrArgL.man:1.3 xc/doc/man/Xt/XtVaCrArgL.man:1.4 --- xc/doc/man/Xt/XtVaCrArgL.man:1.3 Mon Apr 28 18:18:21 2003 +++ xc/doc/man/Xt/XtVaCrArgL.man Thu Feb 10 22:03:06 2005 @@ -26,7 +26,7 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/Xt/XtVaCrArgL.man,v 1.3 2003/04/28 22:18:21 herrb Exp $ +.\" $XFree86: xc/doc/man/Xt/XtVaCrArgL.man,v 1.4 2005/02/11 03:03:06 dawes Exp $ .\" .ds tk X Toolkit .ds xT X Toolkit Intrinsics \- C Language Interface @@ -127,7 +127,7 @@ .el .sp 10p .. .ny0 -.TH XtVaCreateArgsList 3Xt __xorgversion__ "XT FUNCTIONS" +.TH XtVaCreateArgsList 3Xt __vendorversion__ "XT FUNCTIONS" .SH NAME XtVaCreateArgsList \- dynamically allocate a varargs list .SH SYNTAX Index: xc/doc/man/general/Consortium.man diff -u xc/doc/man/general/Consortium.man:1.4 xc/doc/man/general/Consortium.man:removed --- xc/doc/man/general/Consortium.man:1.4 Sat Jan 27 13:20:38 2001 +++ xc/doc/man/general/Consortium.man Wed Mar 16 20:59:08 2005 @@ -1,238 +0,0 @@ -.\" $TOG: Consortium.cpp /main/71 1997/10/13 14:55:16 kaleb $ -.\" Copyright (c) 1993, 1994, 1996 X Consortium -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a -.\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation -.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, -.\" and/or sell copies of the Software, and to permit persons to whom the -.\" Software furnished to do so, subject to the following conditions: -.\" -.\" The above copyright notice and this permission notice shall be included in -.\" all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -.\" SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall not -.\" be used in advertising or otherwise to promote the sale, use or other -.\" dealing in this Software without prior written authorization from the -.\" X Consortium. -.\" -.\" $XFree86: xc/doc/man/general/Consortium.man,v 1.4 2001/01/27 18:20:38 dawes Exp $ -.\" -.TH XCONSORTIUM __miscmansuffix__ __xorgversion__ -.SH NAME -XConsortium \- X Consortium information -.SH SYNOPSIS -Release 6.3 of X Version 11 was brought to you by X Consortium, Inc. -.SH DESCRIPTION -The X Consortium was an independent, not-for-profit Delaware membership -corporation. It was formed in 1993 as the successor to the MIT X Consortium. -The purpose of the X Consortium was to foster the development, evolution, and -maintenance of the X Window System, a comprehensive set of vendor-neutral, -system-architecture neutral, network-transparent windowing and user interface -standards. -.PP -The X Window System was created in the mid-1980s at the Massachusetts -Institute of Technology. In 1988, MIT formed a member-funded consortium to -provide the technical and administrative leadership necessary to support -further development of the X Window System. In 1992, MIT and the membership -decided it was in their best interests to move the consortium out of MIT and -create an independent, stand-alone organization. All rights to the -X Window System were assigned by MIT to X Consortium, Inc. on January 1, 1994. -X Consortium, Inc. closed its doors on December 31, 1996. All rights to the -X Window System have been assigned to the Open Software Foundation. -.PP -The X Consortium was financially self-supporting through membership fees. -There are no license fees associated with the use of X Window System standards -and code developed by the X Consortium. Membership in the X Consortium was -open to any organization willing to execute a membership agreement. -.PP -The X Consortium was a highly participative body. Members were encouraged to -actively cooperate with the staff and other members in the design and review -of proposed specifications, and in the design, coding and testing of sample -implementations of those specifications. -.PP -The X Consortium accomplished most of its work using electronic mail over the -Internet, with individual mailing lists for working groups. Internet -electronic mail connectivity was viewed as a requirement for useful -participation in X Consortium activities. Meetings were held as necessary, -often in conjunction with industry conferences and trade shows. -.SH STAFF -.nf -President: -Bob Scheifler - -Office Manager: -Janet O'Halloran - -Director of Marketing: -Paul Lavallee - -Director of Engineering: -Jim Fournier - -Manager, X Window System: -Matt Landau, emeritus - -Technical Director, X Window System: -Ralph Swick - -Technical Staff, X Window System: - -Donna Converse, emeritus -Stephen Gildea, emeritus -Kaleb Keithley -Arnaud Le Hors -Ralph Mor, emeritus -Ray Tice -Dave Wiggins, emeritus - -Managers, CDE Development: -Giora Guth -Peter Bohnert, emeritus - -Manager, CDE Quality Engineering: -David Brooks - -CDE Architects: -Kevin Samborn -Daniel Dardailler, emeritus - -Technical Staff, CDE Development: - -Art Barstow -Pascale Dardailler -David Kaelbling -Mitch Greess -Robert Seacord - -Technical Staff, CDE Quality Engineering: - -Chris Burleson -Tom Cavin -Sami Mohammed -Mark Schuldenfrei - -Manager, Systems Administration: -Kevin Ethier - -Technical Staff, Systems Administration: -Mike Donati -Amy Rich, emeritus -Anne Salemme -.fi - -.SH "BOARD OF DIRECTORS" -The X Consortium's activities and affairs were managed under the direction and -oversight of a Board of Directors, elected annually by the Members. The Board -was responsible for reviewing the achievements of the Consortium, approving -planned work, appointing a President and other officers of the Consortium, and -setting membership dues. The last Directors were: - -.nf -Robert W. Scheifler, President, X Consortium -Dr. Forest Baskett, Senior VP of R&D, Silicon Graphics Computer Systems -Harold D. Blair, Apogee International Corp. -Roger S. Gourd, Gourd & Associates -Dr. Robin Hillyard, Chairman and Chief Technical Officer, Novasoft Systems -Don McGovern, General Operations Manager and Executive Dir., Hewlett Packard -Peter J. Shaw, Senior VP, NetManage -Michael Tobias, President, Tech-Source, Inc. -.fi - -.SH "ADDRESS" -To reach the X Consortium public Wide World Web server, use the URL: -http://www.x.org/ -.PP -To reach the X Consortium public ftp machine, use anonymous ftp to: -ftp.x.org - -.SH "FULL MEMBERS" - -.nf -Adobe Systems Inc. -Cray Research, Inc. -Digital Equipment Corp. -Fujitsu Limited -Hewlett-Packard Company -Hitachi Ltd. -IBM Corporation -Megatek Corp. -Motorola, Inc. -NEC Corporation -Novell, Inc. -Oki Electric Industry Co., Ltd. -OMRON Corporation -SCO, Inc. -Siemens Nixdorf Informationssysteme AG -Silicon Graphics, Inc. -Sony Corporation -Sun Microsystems, Inc. -Tektronix, Inc. -.fi - -.SH "ASSOCIATE MEMBERS" - -.nf -Boundless Technologies -Hummingbird Communications Ltd. -Insignia Solutions, Ltd. -Mercury Interactive Corp. -NetManage, Inc. -Network Computing Devices -VisiCom Laboratories, Inc. -Walker Richer & Quinn, Inc. -.fi - -.SH "END USERS" - -.nf -Hughes Aircraft Company -.fi - -.SH "AFFILIATE MEMBERS" - -.nf -ASTEC, Inc. -BARCO Chromatics, Inc. -CenterLine Software, Inc. -CliniComp, Intl. -Component Integration Laboratories, Inc. -Draper Laboratory. -Electronic Book Technologies, Inc. -Gallium Software, Inc. -Georgia Institiute of Technology -Human Designed Systems, Inc. -INRIA \- Institut National de Recherche en Informatique et en Automatique -Integrated Computer Solutions, Inc. -Investment Management Services, Inc. -Jupiter Systems -KL Group Inc. -Massachusetts Institute of Technology -Metheus Corporation -Metro Link, Inc. -Object Management Group, Inc. -Open Software Foundation -Performance Awareness Corp. -Peritek Corp. -Petrotechnical Open Software Corp. -Point Technologies, Inc. -Shiman Associates, Inc. -Smithsonian Astrophysical Observatory. -Software Development Corp. -SOUM Corporation -Spectragraphics Corp. -Tech-Source, Inc. -TriTeal Corp. -White Pine Software, Inc. -World Wide Web Consortium. -The XFree86 Project, Inc. -X Inside, Inc. -.fi Index: xc/doc/man/general/Imakefile diff -u xc/doc/man/general/Imakefile:1.8 xc/doc/man/general/Imakefile:1.9 --- xc/doc/man/general/Imakefile:1.8 Tue Jan 23 19:06:08 2001 +++ xc/doc/man/general/Imakefile Thu Feb 10 22:03:10 2005 @@ -2,14 +2,11 @@ -XCOMM $XFree86: xc/doc/man/general/Imakefile,v 1.8 2001/01/24 00:06:08 dawes Exp $ +XCOMM $XFree86: xc/doc/man/general/Imakefile,v 1.9 2005/02/11 03:03:10 dawes Exp $ MANDIR = $(MISCMANDIR) MANSUFFIX = $(MISCMANSUFFIX) InstallManPage(X,$(MANDIR)) -InstallManPageLong(Consortium,$(MANDIR),XConsortium) InstallManPageLong(Standards,$(MANDIR),XStandards) -InstallManPageLong(XProjectTeam,$(MANDIR),XProjectTeam) -InstallManPageAliases(XProjectTeam,$(MANDIR),X.Org) InstallManPageLong(security,$(MANDIR),Xsecurity) Index: xc/doc/man/general/Standards.man diff -u xc/doc/man/general/Standards.man:1.4 xc/doc/man/general/Standards.man:1.5 --- xc/doc/man/general/Standards.man:1.4 Sat Jan 27 13:20:38 2001 +++ xc/doc/man/general/Standards.man Thu Feb 10 22:03:10 2005 @@ -25,10 +25,10 @@ .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" -.\" $XFree86: xc/doc/man/general/Standards.man,v 1.4 2001/01/27 18:20:38 dawes Exp $ +.\" $XFree86: xc/doc/man/general/Standards.man,v 1.5 2005/02/11 03:03:10 dawes Exp $ .\" .\" -.TH XSTANDARDS __miscmansuffix__ __xorgversion__ +.TH XSTANDARDS __miscmansuffix__ __vendorversion__ .SH NAME XStandards \- X Consortium Standards and X Project Team Specifications .SH SYNOPSIS Index: xc/doc/man/general/X.man diff -u xc/doc/man/general/X.man:1.8 xc/doc/man/general/X.man:1.10 --- xc/doc/man/general/X.man:1.8 Sat Oct 12 12:06:41 2002 +++ xc/doc/man/general/X.man Thu Feb 10 22:03:10 2005 @@ -25,7 +25,7 @@ .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" -.\" $XFree86: xc/doc/man/general/X.man,v 1.8 2002/10/12 16:06:41 herrb Exp $ +.\" $XFree86: xc/doc/man/general/X.man,v 1.10 2005/02/11 03:03:10 dawes Exp $ .\" .TH X __miscmansuffix__ __vendorversion__ .SH NAME @@ -1030,11 +1030,11 @@ will search for resource files. The default value consists of .sp .nf - __projectroot__/lib/X11/%L/%T/%N%C%S:\\ - __projectroot__/lib/X11/%l/%T/%N%C%S:\\ - __projectroot__/lib/X11/%T/%N%C%S:\\ - __projectroot__/lib/X11/%L/%T/%N%S:\\ - __projectroot__/lib/X11/%l/%T/%N%S:\\ + __projectroot__/lib/X11/%L/%T/%N%C%S:\\\& + __projectroot__/lib/X11/%l/%T/%N%C%S:\\\& + __projectroot__/lib/X11/%T/%N%C%S:\\\& + __projectroot__/lib/X11/%L/%T/%N%S:\\\& + __projectroot__/lib/X11/%l/%T/%N%S:\\\& __projectroot__/lib/X11/%T/%N%S .fi .sp @@ -1059,13 +1059,13 @@ value is: .sp .nf - $XAPPLRESDIR/%L/%N%C:\\ - $XAPPLRESDIR/%l/%N%C:\\ - $XAPPLRESDIR/%N%C:\\ - $HOME/%N%C:\\ - $XAPPLRESDIR/%L/%N:\\ - $XAPPLRESDIR/%l/%N:\\ - $XAPPLRESDIR/%N:\\ + $XAPPLRESDIR/%L/%N%C:\\\& + $XAPPLRESDIR/%l/%N%C:\\\& + $XAPPLRESDIR/%N%C:\\\& + $HOME/%N%C:\\\& + $XAPPLRESDIR/%L/%N:\\\& + $XAPPLRESDIR/%l/%N:\\\& + $XAPPLRESDIR/%N:\\\& $HOME/%N .fi .sp @@ -1218,7 +1218,6 @@ .SH "SEE ALSO" .PP .\" introductions -.BR XProjectTeam (__miscmansuffix__), .BR XStandards (__miscmansuffix__), .BR Xsecurity (__miscmansuffix__), .\" clients, utilities, and demos Index: xc/doc/man/general/XProjectTeam.man diff -u xc/doc/man/general/XProjectTeam.man:1.3 xc/doc/man/general/XProjectTeam.man:removed --- xc/doc/man/general/XProjectTeam.man:1.3 Wed Dec 19 16:37:27 2001 +++ xc/doc/man/general/XProjectTeam.man Wed Mar 16 20:59:08 2005 @@ -1,92 +0,0 @@ -.\" $Xorg: XProjectTeam.cpp,v 1.6 2001/01/29 17:44:41 coskrey Exp $ -.\" Copyright (c) 1993, 1994, 1996 X Consortium -.\" Copyright (c) 1996, 2000 The Open Group -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a -.\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation -.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, -.\" and/or sell copies of the Software, and to permit persons to whom the -.\" Software furnished to do so, subject to the following conditions: -.\" -.\" The above copyright notice and this permission notice shall be included in -.\" all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -.\" SOFTWARE. -.\" -.\" Except as contained in this notice, the name of the X Consortium shall not -.\" be used in advertising or otherwise to promote the sale, use or other -.\" dealing in this Software without prior written authorization from the -.\" X Consortium. -.\" -.\" $XFree86: xc/doc/man/general/XProjectTeam.man,v 1.3 2001/12/19 21:37:27 dawes Exp $ -.\" -.TH X.Org __miscmansuffix__ __xorgversion__ -.SH NAME -X.Org, XProjectTeam \- X.Org Group information -.SH SYNOPSIS -Release 6.5 and 6.6 of X Version 11 was brought to you by The X.Org Group. -Release 6.4 of X Version 11 was brought to you by The X Project Team. -.SH DESCRIPTION -The Open Group's X Project Team was created as the successor -to the X Consortium, Inc., after the X Consortium was merged into -The Open Group. -The X.Org Group (hereinafter called "X.Org") was created as the successor -to The X Project Team after the The Open Group ceased operating -The X Project Team. -The purpose of X.Org is to foster development, evolution, and -maintenance of the X Window System. X.Org operates under the corporate -umbrella of The Open Group. -.PP -The X Consortium was an independent, not-for-profit Delaware membership -corporation. It was formed in 1993 as the successor to the MIT X -Consortium. -.PP -The X Window System was created in the mid-1980s at the Massachusetts -Institute of Technology. In 1988, MIT formed a member-funded consortium -to provide the technical and administrative leadership necessary to -support further development of the X Window System. In 1992, MIT and -the membership decided it was in their best interests to move the -consortium out of MIT and create an independent, stand-alone organization. -All rights to the X Window System were assigned by MIT to X Consortium, -Inc. on January 1, 1994. X Consortium, Inc. closed its doors on December -31, 1996. All rights to the X Window System have been assigned to The -Open Group, for the benefit of the members of X.Org. -.PP -.SH "ADDRESS" -To reach The Open Group public World Wide Web server, use -http://www.opengroup.org/. -.PP -To reach The X.Org public World Wide Web server, use -http://www.x.org/. -.PP -To reach The X.Org public ftp machine, use anonymous ftp at -ftp://ftp.x.org/ - -.SH "FULL MEMBERS" - -.nf -Attachmate -Barco -Compaq -Hewlett-Packard -Hummingbird -IBM -ICS -Metro Link -MITRE -Shiman Associates -Silicon Graphics Incorporated -Starnet Communications -Sun Microsystems -The XFree86 Project -US Navy -WRQ -Xi Graphics -.fi Index: xc/doc/man/general/security.man diff -u xc/doc/man/general/security.man:1.5 xc/doc/man/general/security.man:1.6 --- xc/doc/man/general/security.man:1.5 Wed Jul 9 11:27:25 2003 +++ xc/doc/man/general/security.man Thu Feb 10 22:03:10 2005 @@ -26,10 +26,10 @@ .\" from the X Consortium. .\" .\" -.\" $XFree86: xc/doc/man/general/security.man,v 1.5 2003/07/09 15:27:25 tsi Exp $ +.\" $XFree86: xc/doc/man/general/security.man,v 1.6 2005/02/11 03:03:10 dawes Exp $ .\" .nr )S 12 -.TH XSECURITY __miscmansuffix__ __xorgversion__ +.TH XSECURITY __miscmansuffix__ __vendorversion__ .SH NAME Xsecurity \- X display access control .SH SYNOPSIS Index: xc/doc/man/misc/Imakefile diff -u xc/doc/man/misc/Imakefile:1.6 xc/doc/man/misc/Imakefile:1.9 --- xc/doc/man/misc/Imakefile:1.6 Thu Dec 18 22:29:21 2003 +++ xc/doc/man/misc/Imakefile Sat Mar 12 18:36:27 2005 @@ -1,4 +1,51 @@ -XCOMM $XFree86: xc/doc/man/misc/Imakefile,v 1.6 2003/12/19 03:29:21 dawes Exp $ +XCOMM $XFree86: xc/doc/man/misc/Imakefile,v 1.9 2005/03/12 23:36:27 dawes Exp $ + +/* + * Copyright (c) 1994-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* * This Imakefile is intended to make it possible to install man pages @@ -10,9 +57,9 @@ * XFree86 Linux/sparc: sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo, * suntcx * XFree86 Linux/ix86: v4l, glide - * XFree86 Linux: ur98 + * XFree86 Linux: ur98, eloinput, aiptek * XFree86 Darwin: XDarwin, dumpkeymap - * XFree86 Kdrive: Xkdrive, Xvesa, Xfbdev + * XFree86 TinyX: TinyX, Xvesa, Xfbdev */ InstallGenManPage(newport,$(DRIVERMANDIR),$(DRIVERMANSUFFIX)) @@ -29,10 +76,16 @@ InstallGenManPage(aiptek,$(DRIVERMANDIR),$(DRIVERMANSUFFIX)) InstallGenManPage(XDarwin,$(MANDIR),$(MANSUFFIX)) InstallGenManPage(dumpkeymap,$(MANDIR),$(MANSUFFIX)) -InstallGenManPage(Xkdrive,$(MANDIR),$(MANSUFFIX)) -InstallGenManPageAliases(Xkdrive,$(MANDIR),$(MANSUFFIX),TinyX) +#if !defined(TinyXServer) || !TinyXServer +InstallGenManPage(TinyX,$(MANDIR),$(MANSUFFIX)) +InstallGenManPageAliases(TinyX,$(MANDIR),$(MANSUFFIX),Xchips Xi810 Xigs Xipaq Xmach64 Xsavage Xsis530 Xtrident Xtrio Xts300 Xkdrive kdrive) +#endif +#if !defined(XvesaServer) || !XvesaServer InstallGenManPage(Xvesa,$(MANDIR),$(MANSUFFIX)) +#endif +#if !defined(XfbdevServer) || !XfbdevServer InstallGenManPage(Xfbdev,$(MANDIR),$(MANSUFFIX)) +#endif LinkSourceFile(newport.man,$(XF86DRIVERSRC)/newport) LinkSourceFile(sunbw2.man,$(XF86DRIVERSRC)/sunbw2) @@ -45,10 +98,17 @@ LinkSourceFile(v4l.man,$(XF86DRIVERSRC)/v4l) LinkSourceFile(glide.man,$(XF86DRIVERSRC)/glide) LinkSourceFile(aiptek.man,$(XF86SRC)/input/aiptek) +LinkSourceFile(eloinput.man,$(XF86SRC)/input/eloinput) LinkSourceFile(ur98.man,$(XF86SRC)/input/ur98) LinkSourceFile(XDarwin.man,$(SERVERSRC)/hw/darwin) LinkSourceFile(dumpkeymap.man,$(SERVERSRC)/hw/darwin/utils) -LinkSourceFile(Xkdrive.man,$(SERVERSRC)/hw/kdrive) -LinkSourceFile(Xvesa.man,$(SERVERSRC)/hw/kdrive/vesa) -LinkSourceFile(Xfbdev.man,$(SERVERSRC)/hw/kdrive/fbdev) +#if !defined(TinyXServer) || !TinyXServer +LinkSourceFile(TinyX.man,$(SERVERSRC)/hw/tinyx) +#endif +#if !defined(XvesaServer) || !XvesaServer +LinkSourceFile(Xvesa.man,$(SERVERSRC)/hw/tinyx/vesa) +#endif +#if !defined(XfbdevServer) || !XfbdevServer +LinkSourceFile(Xfbdev.man,$(SERVERSRC)/hw/tinyx/fbdev) +#endif Index: xc/doc/specs/Imakefile diff -u xc/doc/specs/Imakefile:1.11 xc/doc/specs/Imakefile:1.13 --- xc/doc/specs/Imakefile:1.11 Sat Dec 6 14:11:52 2003 +++ xc/doc/specs/Imakefile Fri Jan 14 23:34:12 2005 @@ -1,9 +1,4 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:42:06 cpqbld Exp $ - - - - -XCOMM $XFree86: xc/doc/specs/Imakefile,v 1.11 2003/12/06 19:11:52 dawes Exp $ +XCOMM $XFree86: xc/doc/specs/Imakefile,v 1.13 2005/01/15 04:34:12 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -16,10 +11,16 @@ i18n programs rstart test xfs xterm xtrans #endif -all:: +AllTarget(specindex.html) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) +#if defined(AvoidGroffHtmlBug) && AvoidGroffHtmlBug +SPECINDEXDEFS = -DICE_PDF_ONLY -DICCCM_PDF_ONLY +#endif + +CppRawFileTarget(specindex.html,specindex.cpp,$(SPECINDEXDEFS),NullParameter) + InstallDoc(specindex,specindex.html) Index: xc/doc/specs/specindex.cpp diff -u /dev/null xc/doc/specs/specindex.cpp:1.2 --- /dev/null Wed Mar 16 20:59:08 2005 +++ xc/doc/specs/specindex.cpp Sat Mar 12 18:54:51 2005 @@ -0,0 +1,131 @@ + + + XFree86(TM): Documentation: Specification Documents + + + + + +

    XFree86™ Documentation: Specification and Related Documents

    + +

    The formatting of some of the HTML versions of these documents may + have some problems. In such cases refer to the PDF versions.

    + +

    Core and Extension Protocols

    + + + +

    Other Protocols and Interfaces

    + + +

    Internationalization

    + + +

    Client Libraries

    + + + +

    Formats and Encodings

    + + + +

    Implementation and Design

    + + + +

    Xtest Suite

    + +
      +
    • Xtest User Guide [PDF]
    • +
    • Xtest Programmers Guide [PDF]
    • +
    • Xtest Release Notes [PDF]
    • +
    + +

    Miscellaneous

    + + + + + + + Index: xc/doc/specs/specindex.html diff -u xc/doc/specs/specindex.html:1.5 xc/doc/specs/specindex.html:removed --- xc/doc/specs/specindex.html:1.5 Sat Dec 6 14:24:38 2003 +++ xc/doc/specs/specindex.html Wed Mar 16 20:59:08 2005 @@ -1,121 +0,0 @@ - - - XFree86(TM): Documentation: Specification Documents - - - - - -

    XFree86™ Documentation: Specification and Related Documents

    - -

    The formatting of some of the HTML versions of these documents may - have some problems. In such cases refer to the PDF versions.

    - -

    Core and Extension Protocols

    - - - -

    Other Protocols and Interfaces

    - - -

    Internationalization

    - - -

    Client Libraries

    - - - -

    Formats and Encodings

    - - - -

    Implementation and Design

    - - - -

    Xtest Suite

    - -
      -
    • Xtest User Guide [PDF]
    • -
    • Xtest Programmers Guide [PDF]
    • -
    • Xtest Release Notes [PDF]
    • -
    - -

    Miscellaneous

    - - - - - - - Index: xc/doc/specs/ICCCM/Imakefile diff -u xc/doc/specs/ICCCM/Imakefile:1.2 xc/doc/specs/ICCCM/Imakefile:1.3 --- xc/doc/specs/ICCCM/Imakefile:1.2 Mon Apr 23 11:53:49 2001 +++ xc/doc/specs/ICCCM/Imakefile Thu Jan 13 23:25:13 2005 @@ -1,5 +1,8 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:42:08 cpqbld Exp $ -XCOMM $XFree86: xc/doc/specs/ICCCM/Imakefile,v 1.2 2001/04/23 15:53:49 dawes Exp $ +XCOMM $XFree86: xc/doc/specs/ICCCM/Imakefile,v 1.3 2005/01/14 04:25:13 dawes Exp $ + +#if defined(AvoidGroffHtmlBug) && AvoidGroffHtmlBug +NOHTML = y +#endif MakeEqnDoc(icccm,icccm.ms) Index: xc/doc/specs/ICE/Imakefile diff -u xc/doc/specs/ICE/Imakefile:1.3 xc/doc/specs/ICE/Imakefile:1.4 --- xc/doc/specs/ICE/Imakefile:1.3 Fri Apr 27 08:58:27 2001 +++ xc/doc/specs/ICE/Imakefile Thu Jan 13 23:25:13 2005 @@ -1,5 +1,8 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:42:09 cpqbld Exp $ -XCOMM $XFree86: xc/doc/specs/ICE/Imakefile,v 1.3 2001/04/27 12:58:27 dawes Exp $ +XCOMM $XFree86: xc/doc/specs/ICE/Imakefile,v 1.4 2005/01/14 04:25:13 dawes Exp $ + +#if defined(AvoidGroffHtmlBug) && AvoidGroffHtmlBug +NOHTML = y +#endif MakeEqnDoc(ice,ice.ms) Index: xc/doc/specs/Xext/sync.tex diff -u xc/doc/specs/Xext/sync.tex:1.3 xc/doc/specs/Xext/sync.tex:1.4 --- xc/doc/specs/Xext/sync.tex:1.3 Fri Apr 27 08:58:27 2001 +++ xc/doc/specs/Xext/sync.tex Sun Jul 25 16:17:02 2004 @@ -20,7 +20,7 @@ % IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT % OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. % -% $XFree86: xc/doc/specs/Xext/sync.tex,v 1.3 2001/04/27 12:58:27 dawes Exp $ +% $XFree86: xc/doc/specs/Xext/sync.tex,v 1.4 2004/07/25 20:17:02 dawes Exp $ %\documentstyle[a4]{article} \documentstyle{article} @@ -685,7 +685,7 @@ \param{counter}: COUNTER \\ \param{wait-value}: INT64 \\ \param{counter-value}: INT64 \\ - \param{time}: TIME \\ + \param{time}: TIMESTAMP \\ \param{count}: CARD16 \\ \param{destroyed}: BOOL \end{tabular} @@ -713,7 +713,7 @@ \param{counter-value}: INT64 \\ \param{alarm-value}: INT64 \\ \param{state}: ALARMSTATE \\ - \param{time}: TIME + \param{time}: TIMESTAMP \end{tabular} % end marker @@ -990,7 +990,7 @@ \> 4 \> COUNTER \> counter \\ \> 8 \> INT64 \> wait value \\ \> 8 \> INT64 \> counter value \\ - \> 4 \> TIME \> timestamp \\ + \> 4 \> TIMESTAMP \> timestamp \\ \> 2 \> CARD16 \> count \\ \> 1 \> BOOL \> destroyed \\ \> 1 \> \> unused \\ @@ -1002,7 +1002,7 @@ \> 4 \> ALARM \> alarm \\ \> 8 \> INT64 \> counter value \\ \> 8 \> INT64 \> alarm value \\ - \> 4 \> TIME \> timestamp \\ + \> 4 \> TIMESTAMP \> timestamp \\ \> 1 \> ALARMSTATE \> state \\ \> 3 \> \> unused\\ \end{tabbing} Index: xc/doc/specs/Xext/xtest.ms diff -u xc/doc/specs/Xext/xtest.ms:1.1.1.4 xc/doc/specs/Xext/xtest.ms:1.2 --- xc/doc/specs/Xext/xtest.ms:1.1.1.4 Tue Jan 16 17:03:16 2001 +++ xc/doc/specs/Xext/xtest.ms Sun Jul 25 16:17:02 2004 @@ -149,7 +149,7 @@ .R FAKE_EVENT [type: FAKE_EVENT_TYPE, detail: BYTE, - time: TIME, + time: TIMESTAMP, root: WINDOW, rootX, rootY: INT16] .De @@ -451,7 +451,7 @@ 1 FAKE_EVENT_TYPE fake device event type 1 BYTE detail: button or keycode 2 unused - 4 TIME delay (milliseconds) + 4 TIMESTAMP delay (milliseconds) 0 CurrentTime 4 WINDOW root window for MotionNotify 0 None Index: xc/doc/specs/programs/Imakefile diff -u xc/doc/specs/programs/Imakefile:1.23 xc/doc/specs/programs/Imakefile:1.27 --- xc/doc/specs/programs/Imakefile:1.23 Sun Nov 23 00:40:35 2003 +++ xc/doc/specs/programs/Imakefile Sat Mar 12 18:13:28 2005 @@ -1,8 +1,50 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:42:50 cpqbld Exp $ - - - -XCOMM $XFree86: xc/doc/specs/programs/Imakefile,v 1.23 2003/11/23 05:40:35 dawes Exp $ +XCOMM $XFree86: xc/doc/specs/programs/Imakefile,v 1.27 2005/03/12 23:13:28 dawes Exp $ +/* + * Copyright (c) 2000-2005 by The XFree86 Project, Inc. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution, and in the same place and form as other copyright, + * license and disclaimer information. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: "This product + * includes software developed by The XFree86 Project, Inc + * (http://www.xfree86.org/) and its contributors", in the same + * place and form as other third-party acknowledgments. Alternately, + * this acknowledgment may appear in the software itself, in the + * same form and location as other such third-party acknowledgments. + * + * 4. Except as contained in this notice, the name of The XFree86 + * Project, Inc shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from The XFree86 Project, Inc. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* does not include manual pages under util (not X programs) or any of the library function manual pages under doc/man */ @@ -12,7 +54,6 @@ $(TOP)/programs/Xserver/hw/xfree86/XF86Config.man \ $(TOP)/programs/Xserver/hw/xfree86/xf86config/xf86config.man \ $(TOP)/programs/Xserver/hw/xfree86/xf86cfg/xf86cfg.man \ - $(TOP)/programs/Xserver/hw/xfree86/reconfig/reconfig.man \ $(TOP)/programs/Xserver/hw/xfree86/getconfig/getconfig.man \ $(TOP)/programs/Xserver/hw/xfree86/getconfig/cfg.man \ $(TOP)/programs/Xserver/hw/xfree86/drivers/apm/apm.man \ @@ -64,6 +105,7 @@ $(TOP)/programs/Xserver/hw/xfree86/input/dmc/dmc.man \ $(TOP)/programs/Xserver/hw/xfree86/input/dynapro/dynapro.man \ $(TOP)/programs/Xserver/hw/xfree86/input/elographics/elographics.man \ + $(TOP)/programs/Xserver/hw/xfree86/input/eloinput/eloinput.man \ $(TOP)/programs/Xserver/hw/xfree86/input/fpit/fpit.man \ $(TOP)/programs/Xserver/hw/xfree86/input/jamstudio/js_x.man \ $(TOP)/programs/Xserver/hw/xfree86/input/keyboard/kbd.man \ @@ -80,9 +122,9 @@ $(TOP)/programs/Xserver/hw/xfree86/input/wacom/wacom.man \ $(TOP)/programs/Xserver/hw/darwin/XDarwin.man \ $(TOP)/programs/Xserver/hw/darwin/utils/dumpkeymap.man \ - $(TOP)/programs/Xserver/hw/kdrive/Xkdrive.man \ - $(TOP)/programs/Xserver/hw/kdrive/vesa/Xvesa.man \ - $(TOP)/programs/Xserver/hw/kdrive/fbdev/Xfbdev.man \ + $(TOP)/programs/Xserver/hw/tinyx/TinyX.man \ + $(TOP)/programs/Xserver/hw/tinyx/vesa/Xvesa.man \ + $(TOP)/programs/Xserver/hw/tinyx/fbdev/Xfbdev.man \ $(TOP)/lib/Xxf86dga/XDGA.man \ $(TOP)/programs/Xserver/hw/xfree86/doc/man/XF86Misc.man \ $(TOP)/programs/Xserver/hw/xfree86/doc/man/XF86VM.man @@ -94,7 +136,6 @@ $(XFREE86_MANUALS) \ $(TOP)/doc/man/general/X.man \ $(TOP)/doc/man/general/Standards.man \ - $(TOP)/doc/man/general/Consortium.man \ $(TOP)/doc/man/general/security.man \ $(TOP)/programs/appres/appres.man \ $(TOP)/programs/bdftopcf/bdftopcf.man \ Index: xc/doc/specs/xterm/ctlseqs.ms diff -u xc/doc/specs/xterm/ctlseqs.ms:3.51 xc/doc/specs/xterm/ctlseqs.ms:3.55 --- xc/doc/specs/xterm/ctlseqs.ms:3.51 Sun Dec 14 19:53:20 2003 +++ xc/doc/specs/xterm/ctlseqs.ms Thu Jan 13 20:50:00 2005 @@ -1,14 +1,16 @@ .\"#! troff -ms $1 -*- Nroff -*- .\" "Xterm Control Sequences" document -.\" $Xorg: ctlseqs.ms,v 1.3 2000/08/17 19:42:51 cpqbld Exp $ +.\" $XTermId: ctlseqs.ms,v 1.148 2005/01/08 15:23:27 tom Exp $ +.\" .\" +.\" $Xorg: ctlseqs.ms,v 1.3 2000/08/17 19:42:51 cpqbld Exp $ .\" .\" .\" -.\" $XFree86: xc/doc/specs/xterm/ctlseqs.ms,v 3.51 2003/12/15 00:53:20 dickey Exp $ +.\" $XFree86: xc/doc/specs/xterm/ctlseqs.ms,v 3.55 2005/01/14 01:50:00 dickey Exp $ .\" .\" -.\" Copyright 1996-2002,2003 by Thomas E. Dickey +.\" Copyright 1996-2004,2005 by Thomas E. Dickey .\" .\" All Rights Reserved .\" @@ -159,7 +161,6 @@ .[] Us \v'-1p'\s\nsUS\s0\v'1p' .[] XX \v'-1p'\s\nsXX\s0\v'1p' .[] $ $ -.[] ! ! .[] # # .[] % % .[] (( ( @@ -292,7 +293,7 @@ .AU Thomas Dickey .AI -XFree86 Project (1996-2003) +XFree86 Project (1996-2004) .AU . .am BT \" add page numbers after first page @@ -363,10 +364,10 @@ .ds RH VT100 Mode .LP Most of these control sequences are standard VT102 control sequences, -but there is support for later DEC VT terminals (i.e., VT220 and VT320), +but there is support for later DEC VT terminals (i.e., VT220, VT320, VT420), as well as ISO 6429 and \fIaixterm\fP color controls. -VT102 features not supported are -auto-repeat and blinking characters. +The only VT102 features not supported is auto-repeat, +since the only way X provides for this will affect all windows. There are additional control sequences to provide \fIxterm-\fPdependent functions, such as the scrollbar or window size. Where the function is specified by DEC or ISO 6429, the code assigned @@ -392,7 +393,7 @@ .IP \\*(En Return Terminal Status (Ctrl-E). Default response is an empty string, but may be overridden -by a resource \fIanswerbackString\fP. +by a resource \fBanswerbackString\fP. . .IP \\*(Ff Form Feed or New Page (NP) (Ctrl-L) same as LF @@ -514,19 +515,19 @@ Memory Unlock (per HP terminals) . .IP \\*(Es\\*n -Invoke the G2 Character Set (LS2) +Invoke the G2 Character Set as GL (LS2). . .IP \\*(Es\\*o -Invoke the G3 Character Set (LS3) +Invoke the G3 Character Set as GL (LS3). . .IP \\*(Es\\*| -Invoke the G3 Character Set as GR (LS3R). Has no visible effect in \fIxterm\fP. +Invoke the G3 Character Set as GR (LS3R). . .IP \\*(Es\\*} -Invoke the G2 Character Set as GR (LS2R). Has no visible effect in \fIxterm\fP. +Invoke the G2 Character Set as GR (LS2R). . .IP \\*(Es\\*(c~ -Invoke the G1 Character Set as GR (LS1R). Has no visible effect in \fIxterm\fP. +Invoke the G1 Character Set as GR (LS1R). .Ed . .St @@ -747,6 +748,7 @@ \*(Ps = \*8 \(-> Auto-repeat Keys (DECARM) \*(Ps = \*9 \(-> Send Mouse X & Y on button press. See the section \fBMouse Tracking\fP. + \*(Ps = \*1\*0 \(-> Show toolbar (rxvt) \*(Ps = \*1\*2 \(-> Start Blinking Cursor (att610) \*(Ps = \*1\*8 \(-> Print form feed (DECPFF) \*(Ps = \*1\*9 \(-> Set print extent to full screen (DECPEX) @@ -755,7 +757,7 @@ \*(Ps = \*3\*5 \(-> Enable font-shifting functions (rxvt). \*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK) \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode - \*(Ps = \*4\*1 \(-> \fImore\fP(1) fix (see \fIcurses\fP resource) + \*(Ps = \*4\*1 \(-> \fImore\fP(1) fix (see \fBcurses\fP resource) \*(Ps = \*4\*2 \(-> Enable Nation Replacement Character sets (DECNRCM) \*(Ps = \*4\*4 \(-> Turn On Margin Bell \*(Ps = \*4\*5 \(-> Reverse-wraparound Mode @@ -782,9 +784,12 @@ disabled by the \fBtiteInhibit\fP resource) \*(Ps = \*1\*0\*4\*9 \(-> Save cursor as in DECSC and use Alternate Screen Buffer, clearing it first (unless -disabled by the \fBtiteInhibit\fP resource) +disabled by the \fBtiteInhibit\fP resource). +This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes. +Use this with terminfo-based applications rather than the \*4\*7 mode. \*(Ps = \*1\*0\*5\*1 \(-> Set Sun function-key mode. \*(Ps = \*1\*0\*5\*2 \(-> Set HP function-key mode. + \*(Ps = \*1\*0\*5\*3 \(-> Set SCO function-key mode. \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation (X11R6). \*(Ps = \*1\*0\*6\*1 \(-> Set Sun/PC keyboard emulation of VT220 keyboard. . @@ -820,6 +825,7 @@ \*(Ps = \*7 \(-> No Wraparound Mode (DECAWM) \*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM) \*(Ps = \*9 \(-> Don't Send Mouse X & Y on button press + \*(Ps = \*1\*0 \(-> Hide toolbar (rxvt) \*(Ps = \*1\*2 \(-> Stop Blinking Cursor (att610) \*(Ps = \*1\*8 \(-> Don't print form feed (DECPFF) \*(Ps = \*1\*9 \(-> Limit print to scrolling region (DECPEX) @@ -827,7 +833,7 @@ \*(Ps = \*3\*0 \(-> Don't show scrollbar (rxvt). \*(Ps = \*3\*5 \(-> Disable font-shifting functions (rxvt). \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode - \*(Ps = \*4\*1 \(-> No \fImore\fP(1) fix (see \fIcurses\fP resource) + \*(Ps = \*4\*1 \(-> No \fImore\fP(1) fix (see \fBcurses\fP resource) \*(Ps = \*4\*2 \(-> Disable Nation Replacement Character sets (DECNRCM) \*(Ps = \*4\*4 \(-> Turn Off Margin Bell \*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode @@ -855,9 +861,12 @@ disabled by the \fBtiteInhibit\fP resource) \*(Ps = \*1\*0\*4\*9 \(-> Use Normal Screen Buffer and restore cursor as in DECRC (unless -disabled by the \fBtiteInhibit\fP resource) +disabled by the \fBtiteInhibit\fP resource). +This combines the effects of the \*1\*0\*4\*7 and \*1\*0\*4\*8 modes. +Use this with terminfo-based applications rather than the \*4\*7 mode. \*(Ps = \*1\*0\*5\*1 \(-> Reset Sun function-key mode. \*(Ps = \*1\*0\*5\*2 \(-> Reset HP function-key mode. + \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode. \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation (X11R6). \*(Ps = \*1\*0\*6\*1 \(-> Reset Sun/PC keyboard emulation of VT220 keyboard. . @@ -954,7 +963,7 @@ .br \*(Cs\*?\*5\*0\*s\*n No Locator, if not. . -.IP \\*(Cs\\*s\\*!\\*p +.IP \\*(Cs\\*!\\*p Soft terminal reset (DECSTR) . .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Ps\\*s\\*(c"\\*p @@ -983,6 +992,11 @@ Restore DEC Private Mode Values. The value of \*(Ps previously saved is restored. \*(Ps values are the same as for DECSET. . +.IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Ps\\*$\\*r +Change Attributes in Rectangular Area (DECCARA). + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. + \*(Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7 +. .IP \\*(Cs\\*(cs Save cursor (ANSI.SYS) . @@ -1019,9 +1033,21 @@ \*(Os\*s\*l\*s\fItitle\fP\*s\*(ST \*(Ps >= \*2\*4 \(-> Resize to \*(Ps lines (DECSLPP) . +.IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Ps\\*$\\*t +Reverse Attributes in Rectangular Area (DECRARA). + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. + \*(Ps denotes the attributes to reverse. 1, 4, 5, 7 +. .IP \\*(Cs\\*u Save cursor (ANSI.SYS) . +.IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*;\\*(Pp\\*;\\*(Pt\\*;\\*(Pl\\*;\\*(Pp\\*$\\*v +Copy Rectangular Area (DECCRA) + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. + \*(Pp denotes the source page. + \*(Pt\*;\*(Pl denotes the target location. + \*(Pp denotes the target page. +. .IP \\*(Cs\\*(Pt\\*s\\*;\\*(Pl\\*s\\*;\\*(Pb\\*s\\*;\\*(Pr\\*s\\*(qu\\*w Enable Filter Rectangle (DECEFR) .br @@ -1049,6 +1075,17 @@ \*1 \(-> clock multiplier \*0 \(-> STP flags . +.IP \\*(Cs\\*(Ps\\*s\\*x +Select Attribute Change Extent (DECSACE). + \*(Ps = \*0 \(-> from start to end position, wrapped + \*(Ps = \*1 \(-> from start to end position, wrapped + \*(Ps = \*2 \(-> rectangle (exact). +. +.IP \\*(Cs\\*(Pc\\*;\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*x +Fill Rectangular Area (DECFRA). + \*(Pc is the character to use. + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. +. .IP \\*(Cs\\*(Ps\\*s\\*;\\*(Pu\\*s\\*(qu\\*z Enable Locator Reporting (DECELR) .br @@ -1064,6 +1101,10 @@ \*(Pu = \*1 \(-> device physical pixels \*(Pu = \*2 \(-> character cells . +.IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*z +Erase Rectangular Area (DECERA). + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. +. .IP \\*(Cs\\*(Pm\\*s\\*(qu\\*{ Select Locator Events (DECSLE) .br @@ -1075,6 +1116,10 @@ \*(Ps = \*3 \(-> report button up transitions \*(Ps = \*4 \(-> do not report button up transitions . +.IP \\*(Cs\\*(Pt\\*;\\*(Pl\\*;\\*(Pb\\*;\\*(Pr\\*$\\*{ +Selective Erase Rectangular Area (DECSERA). + \*(Pt\*;\*(Pl\*;\*(Pb\*;\*(Pr denotes the rectangle. +. .IP \\*(Cs\\*(Ps\\*s\\*(qu\\*| Request Locator Position (DECRQLP) .br @@ -1174,6 +1219,7 @@ \*(Ps = \*1\*5 \(-> Change Tektronix foreground color to \*(Pt \*(Ps = \*1\*6 \(-> Change Tektronix background color to \*(Pt \*(Ps = \*1\*7 \(-> Change highlight color to \*(Pt + \*(Ps = \*1\*8 \(-> Change Tektronix cursor color to \*(Pt .sp \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt (normally disabled by a compile-time option) @@ -1299,7 +1345,7 @@ .TE .LP Older versions of \fIxterm\fP implement different escape sequences for F1 through F4. -These can be activated by setting the \fIoldXtermFKeys\fP resource. +These can be activated by setting the \fBoldXtermFKeys\fP resource. However, since they do not correspond to any hardware terminal, they have been deprecated. (The DEC VT220 reserves F1 through F5 for local functions such as \fBSetup\fP). .TS @@ -1484,6 +1530,39 @@ Similarly, \fIxterm\fP can be compiled to support HP keyboards. See the xterm-hp terminfo entry for details. .SH +The Alternate Screen Buffer +.LP +\fBXterm\fP maintains two screen buffers. +The normal screen buffer allows you to scroll back to view saved lines +of output up to the maximum set by the \fBsaveLines\fP resource. +The alternate screen buffer is exactly as large as the display, +contains no additional saved lines. +When the alternate screen buffer is active, +you cannot scroll back to view saved lines. +\fBXterm\fP provides control sequences and menu entries +for switching between the two. +.LP +Most full-screen applications use terminfo or termcap to obtain +strings used to start/stop full-screen mode, +i.e., \fIsmcup\fP and \fIrmcup\fP for terminfo, +or the corresponding \fIti\fP and \fIte\fP for termcap. +The \fBtiteInhibit\fP resource removes the \fIti\fP and \fIte\fP strings +from the TERMCAP string which is set in the environment for some platforms. +That is not done when \fBxterm\fP is built with terminfo libraries because +terminfo does not provide the whole text of the termcap data in one piece. +It would not work for terminfo anyway, since terminfo data is not passed +in environment variables; +setting an environment variable in this manner would have no effect on +the application's ability to switch between normal and alternate screen +buffers. +Instead, the newer private mode controls +(such as \*1\*0\*4\*9) +for switching between normal +and alternate screen buffers simply disable the switching. +They add other features such as clearing the display for the same reason: +to make the details of switching independent of the application that +requests the switch. +.SH Mouse Tracking .ds RH Mouse Tracking .LP Index: xc/extras/FreeType/FILES diff -u xc/extras/FreeType/FILES:1.1.1.1 xc/extras/FreeType/FILES:removed --- xc/extras/FreeType/FILES:1.1.1.1 Sat Feb 12 23:54:38 2000 +++ xc/extras/FreeType/FILES Wed Mar 16 20:59:25 2005 @@ -1,76 +0,0 @@ -This text file contains an overview of this package's directory and -file hierarchy. - - - docs/ Documentation. - docs/image GIF images for documentation. - - lib/ The C engine source directory. - lib/extend Some standard engine extensions. - lib/arch/ System-specific configuration header files. - - howto/ Various system-specific HOWTOs, explaining how - to compile the library on different platforms. - - test/ The C test programs. - test/arch/ System-specific graphics drivers for test - programs. - - contrib/ Contributions directory. - contrib/mac An HQX archive containing a port to the Mac. - contrib/ttf2pk The ttf2pk TrueType to PK converter source - code. - contrib/ttf2pfb The ttf2pfb TrueType to PS font converter - source code. - contrib/ttf2bdf The ttf2bdf TrueType to BDF converter source - code. - contrib/ftos2 The FreeType/2 font server source code for - OS/2. - contrib/ttfbanner An ASCII poster program source code. - - po/ Contributions to the internationalized error - message strings extension. - - pascal/lib Pascal engine source directory. - pascal/test Pascal test programs. - - -The following files might be helpful: - -FILES This file. - -README A short and general introduction to FreeType. - -INSTALL The FreeType installation How-To. Everything you need - to know to build the library and the test programs. - This file contains only generic explanations. See the - `freetype/howto' directory for system-specific hints. - -license.txt The FreeType license. - -announce The FreeType UseNet announce post. This file is sent - to some newsgroups when a new release is made. - - -The following files are Unix-specific and can be ignored on other -platforms: - -ft_conf.h.in Generic library configuration header file for - autoconf. -configure.in Generic configure script for autoconf. -configure Configure script generated from `configure.in' by - autoconf. -config.sub Script needed by configure. -config.guess Script needed by configure. -Makefile.in Generic makefile for configure. -MakeSub.in Generic makefile for libtool. -ltconfig Libtool configuration script. -ltmain.sh Libtool script. -mkinstalldirs Tool for generating subdirectories. -a4local.m4, -net.m4 Auxiliary data files for autoconf. -install-sh Script used to install the library in a portable way -freetype.spec This file can be used as a specification to build RPMs - from the FreeType package. - ---- end of FILES --- Index: xc/extras/FreeType/INSTALL diff -u xc/extras/FreeType/INSTALL:1.1.1.2 xc/extras/FreeType/INSTALL:removed --- xc/extras/FreeType/INSTALL:1.1.1.2 Sat Feb 12 23:54:39 2000 +++ xc/extras/FreeType/INSTALL Wed Mar 16 20:59:25 2005 @@ -1,879 +0,0 @@ - - The FreeType compilation guide - - -Table of contents ------------------ - - I. Introduction - - II. Compiling and installing the C library - - 1. Choosing a configuration file - 2. Compiling the library - 3. System-specific builds - 4. Compiling the extensions - 5. Using a Makefile - 6. Building a dynamic library (`DLL' or `so') - 7. Internationalization and the `ftxerr18' extension - 8. TrueType patents - - -III. Compiling the test programs - - 1. Compiling the graphics sub-system - 2. Internationalization on Unix - 3. Compiling the test programs - 4. The `fdebug' program - - - IV. Compiling the Pascal source - - 1. Compiling the library - 2. Compiling the test programs - 3. Porting the library to a different Pascal compiler - --------------------------------------------------------------------- - - - -I. Introduction -=============== - - This file gives detailed information on how to compile and install - this release of FreeType on your system. - - -******************************************************************** -* * -* FOR A QUICK INSTALLATION GUIDE, WE STRONGLY RECOMMEND TO READ * -* THE SYSTEM-SPECIFIC DOCUMENTS LOCATED IN THE `howto' DIRECTORY * -* INSTEAD OF THIS GENERIC DOCUMENTATION. * -* * -******************************************************************** - - - This package, known as the FreeType 1.3.1 Public Release, contains - several things which are best described by the directories - containing them: - - - `lib' - - Contains the 1.3.1 release of the FreeType library. It is written - in portable ANSI C and should compile fine with any type of - ANSI C compiler. - - Note however that some system-specific files are provided in the - `lib/arch' directory, in order to provide enhanced performance. - - If you need to include FreeType in a graphics library or an - embedded system, you will most probably only need to use its - contents and discard the rest. - - - `test' - - Contains test and demo programs used during development. Note - that some of these programs might not compile on all platforms, - as they need to display graphics. - - - `pascal' - - Contains the Pascal version of FreeType's source code. Note - that the library has been successfully compiled with Turbo - Pascal 6, Borland Pascal 7, Virtual Pascal, Free Pascal, - Delphi 1, 2 and 3. - - The pascal source tree contains its own test programs which - should *only* run with either Borland or Virtual Pascal - compilers. - - - `po' - - On Unix, all of FreeType test programs support - internationalization through the use of the `gettext' library. - This directory contains `po' files, which are used to translate - the original english text into language-specific one. - - Note also that this release contains an extension, called - `ftxerr18' used to return internationalized strings from the - usual FreeType error codes. The `po' files also contain - translations for this extension. - - If you don't plan to use `ftxerr18' or internationalization, - simply ignore it. Note also that even if `gettext' isn't - available on your system, the test programs will be compiled - correctly (using the `--disable-nls' configure switch). - - - `contrib' - - Contains a set of contributed tools and utilities related to - TrueType or FreeType. Here you can find real situations how to - use the library. - - - This file explains how to compile the library, and the test - programs on various platforms. - - - -II. Compiling the C library -=========================== - - -******************************************************************** -* * -* NOTE THAT WE STRONGLY RECOMMEND TO READ THE SYSTEM-SPECIFIC * -* DOCUMENTS LOCATED IN THE `howto' DIRECTORY FOR A * -* `QUICK'N'EASY' COMPILATION & INSTALLATION GUIDE ON YOUR * -* PLATFORM. THE FOLLOWING IS A VERY DETAILED EXPLANATION ON HOW * -* TO COMPILE THE LIBRARY. * -* * -******************************************************************** - - - The following concepts are important to build the library. - - - 1. Choosing a configuration file - -------------------------------- - - The source code for the C library is located in the `lib' - directory. - - It uses a file named `ft_conf.h', which contains the definitions - of many configuration macros to toggle various engine features, - as well as tell system-specific information (e.g., the size of - the `int' type in bytes, etc). - - There are several configuration files provided with this - release. They are located in the `lib/arch/' directory, - where stands for a given architecture or environment. - - For example, the file `lib/arch/ansi/ft_conf.h' can be used to - build the library with any ANSI-compliant compiler and runtime - library. - - This release also provides configuration files for the following - systems: MS-DOS, OS/2, Unix, VMS, Win 16, Amiga OS, and Win 32. - - Make sure, when compiling each source file of the FreeType - library, to include the path to your configuration file in your - include directories. - - - 2. Compiling the library - ------------------------ - - The library can be quickly compiled by invoking a Makefile, as - described in the system-specific documents in the `howto' - directory. - - We will now describe how to compile the library by hand. - - Traditionally, building a library like FreeType needs the - following steps: - - - Compile each individual `.c' file into the corresponding - object file, whose extension might be `.o' or `.obj', - depending on the platform. - - - Group all object files into a library (e.g. `libfreetype.a' or - `freetype.lib'), which is later used at link time to build the - executables using it. - - For example, to build a static FreeType library on an ANSI - system, with gcc, one should type - - cd lib # go to `lib' directory - gcc -c -Iarch/ansi tt*.c # compile base engine sources - ar -r libfreetype.a tt*.o # create library from objects - - Note that we included the path to the configuration file in the - include list during compilation, by using the `-I' switch on the - `arch/ansi' directory. This is required to use the - configuration file named `lib/arch/ansi/ft_conf.h'. - - However, we recommend you to build the base FreeType engine as a - SINGLE OBJECT FILE, i.e., a single `freetype.o' or - `freetype.obj' file containing all the code for the base engine. - It works by including all the `.c' files in a single one, and - has a few advantages over a `traditional build': - - - Because all the code is `part' of a single source file, many - internal functions need not be declared as `extern' anymore. - - This means that when compiling the engine as a dynamic - library, only FreeType external functions will (correctly) be - exported as entry points. - - This also typically allows the compiler to perform more - aggressive optimizations on the source code, and results in - somewhat faster and/or smaller overall code size depending on - your compiler and environment. - - - Compilation speed is greatly improved, as the pre-processor - and compiler need to be called only once, instead of a dozen - times. - - - During development, this allows to detect very easily - unresolved dependencies regarding the base engine's internal - symbols. - - To compile the engine as a single object file, simply go to the - `lib' directory and compile the file - `lib/arch//freetype.c'. - - For example, to compile the ANSI build with gcc in SINGLE OBJECT - MODE, use - - cd lib - gcc -c -Iarch/ansi -I. arch/ansi/freetype.c - - This will create a single file called `freetype.o' containing - the object code for the base TrueType engine. - - Note that we did include the paths to the configuration file - (i.e. `arch/ansi') AND to the current directory (i.e. `.', - where the included source files are located). - - `freetype.o' only contains the base engine. Extensions to the - engine are located in the `lib/extend' directory and must be - compiled separately as described later. - - - 3. System-specific builds - ------------------------- - - The files `ttfile.c', `ttmemory.c', and `ttmutex.c' are used to - provide an implementation of i/o access, memory management, and - thread synchronization for the rest of the library. - - These source files, located in the `lib' directory, use the ANSI - C library for i/o and memory, and simply ignore threads (as the - standard doesn't know threads at all). - - However, this release provides, for each supported platform, - system-specific versions of these files, located in the - `lib/arch/' hierarchy. Here are a few examples: - - lib/arch/os2/os2file.c: - - A replacement for `ttfile' which directly uses OS/2 system - calls for i/o access. This results in slightly better - performance, but much reduced resource requirements. - - lib/arch/unix/ttmmap.c: - - A replacement for `ttfile' which uses memory-mapped files - instead of buffered-based reads on Unix. This increases - *dramatically* the engine's performance when reading font - files and loading glyphs. - - These files are directly included by the platform specific - versions of `freetype.c' which are located in - `lib/arch/'. This means that, by default, the - single-object build of FreeType always chooses the best - implementation available for a supported system. - - Note that it is also possible to redefine `ttmemory' or - `ttmutex' with a similar scheme. This is used, for example, by - the OS/2 font driver based on FreeType (called FreeType/2), - which uses some special system calls to allocate memory - shareable among distinct processes. - - By providing your own version of `ttfile', `ttmemory', and - `ttmutex', you are able to tailor the FreeType engine for - optimal performance and resource usage on your system. - - - 4. Compiling the extensions - --------------------------- - - The base TrueType engine is located in the `lib' directory. - This release also provides many specific extensions in - `lib/extend'. - - An extension is a simple way to extend FreeType's capabilities. - It is used to perform any of the following: - - - Access some TrueType tables that are not loaded and returned - by the base engine, like - - * the kerning table(s) - * the `gasp' table - * the glyph Postscript names - * some OpenType layout tables (GDEF, GSUB; GPOS is not - finished yet) - - - Perform some advanced operations on the TrueType data for very - specific uses, like - - * enumerate the contents of a given charmap - * access a font file's embedded bitmaps (called sbits) - * return an array containing the dimensions of each glyph in - the font - - The idea is to keep the base engine small (under 50kByte), while - providing optional enhancements for specific uses. - - Writing an extension is rather easy. And adding a new extension - to the engine doesn't need any modifications to the base - engine's source code. - - To compile the extensions, simply go to the `lib' directory, - then compile each file in `lib/extend'. Here is an example with - gcc: - - cd lib ; go to `lib' - gcc -c -Iarch/ansi -I. extend/ftx*.c ; compile all extensions - - - You can later add each extension object file to the FreeType - library file. For example, here is how to create the static - library on Unix: - - cd lib - -- compile the engine, then the extensions - ar libfreetype.a *.o ; create static library - - - 5. Using a Makefile - ------------------- - - This release also provides Makefiles for many systems and - compilers in the `lib/arch/' hierarchy. For more - information, please read the documentation in the `howto' - directory, which contains system-specific instructions on how to - use them. - - Generally, you should go the `lib' directory, then invoke your - system-specific Makefile from there. Here is an example: - - cd lib - make -farch\msdos\Makefile.TC - - to compile the library under DOS with the Turbo C compiler and - make tool. Or: - - cd lib - wmake -f arch\msdos\Makefile.wat - - to compile it under DOS with the Watcom compiler and wmake tool. - - The ANSI target does not come with a Makefile, as there is no - standard make tool available on all platforms. You will have to - compile the library by hand as described in section I.3. - - We welcome new Makefile submissions for platforms not currently - listed in the `lib/arch' hierarchy. - - Finally, note that most of the makefiles will build the library - in single object mode; for a `traditional compile', try the - `debug' target (i.e., say `make debug'). - - - 6. Building a dynamic library (`DLL' or `so') - --------------------------------------------- - - It is possible to build the engine as a dynamic library. The - method to do so can vary greatly depending on the platform. - - a. Building a shared object on Unix - - NOTE THAT THIS RELEASE USES `libtool' TO AUTOMATICALLY CREATE - A SHARED OBJECT FOR FREETYPE ON UNIX SYSTEMS THAT SUPPORT - DYNAMIC LIBRARIES. WE STRONGLY RECOMMEND YOU TO READ THE - `howto/unix.txt' FILE TO KNOW HOW TO USE THE `configure' - SCRIPT. THIS SUB-SECTION DESCRIBES HOW TO COMPILE THE SHARED - OBJECT BY HAND. - - In order to build a shared object like `libfreetype.so' on - Unix, one has to compile each object file as - position-independent code (a.k.a. PIC). - - We also strongly recommend to build the base engine as a - single object, as this prevents internal `extern' functions to - be exported as entry points (and creating a smaller overall - .so file). - - For example, this with gcc, one can use the `-fPIC' flag when - compiling the object files. Here is an example: - - cd lib ; go to `lib' - gcc -c -fPIC -Iarch/ansi -I. \ - arch/ansi/freetype.c ; compile engine - gcc -c -fPIC -Iarch/ansi -I. extend/ftx*.c ; & extensions - - You can now invoke your linker to create the shared object - from the various object files. See your system's - documentation for details, or read the Unix-specific howto to - know how to do it `easily' through the use of `libtool'. - - b. Building a DLL on Windows or OS/2 - - The dynamic linkers of Windows and OS/2 differ greatly from - Unix ones. - - - The first difference is that the object files that make up - the DLL do not need to be compiled as position-independent - code. - - - The second difference is that the DLL's entry points must - generally be declared as so in the source file, and/or maybe - listed in a `definition' file used at link time when - creating the DLL. - - Each FreeType API function is declared with the help of a - special macro named EXPORT_DEF. For example, here is the - declaration of the function `FT_Init_FreeType', as written in - `freetype.h': - - EXPORT_DEF - TT_Error TT_Init_FreeType( TT_Engine* engine ); - - If the configuration file `ft_conf.h' doesn't define - EXPORT_DEF, it is automatically set to `extern' by default. - - In order to build FreeType as a DLL, one might need to define - EXPORT_DEF in its `ft_conf.h' to a keyword tagging the - function as a DLL entry point. This keyword varies with - compilers and platforms; examples are `__system', - `__dllentry', etc. - - Please refer to your compiler's user guide for instructions. - - You can also `grep' for EXPORT_DEF in the `freetype.h' source - file to obtain the list of exported functions of the FreeType - API, which could then be used to write a `def' file for the - DLL. We provide a sample .def file (built with an Unix script) - for Windows. - - Note also that the definition (i.e. its implementation) of - each exported function is preceded with the EXPORT_FUNC macro, - as in - - EXPORT_FUNC - TT_Error TT_Init_FreeType( TT_Engine* engine ) - { - TT_Error error; - ... - } - - (to be found in `ttapi.c'). - - By default, EXPORT_FUNC converts to an empty string, but it - can also be redefined if you need to. - - Note that the EXPORT_DEF/EXPORT_FUNC mechanism does not work - for 16-bit Windows (in this environment, the special keyword - for declaring entry points, (the `__export' keyword), must be - after the type name). We suggest you to use the makefiles we - provide for both Microsoft and Borland compilers. - - - 7. Internationalization and the `ftxerr18' extension - ---------------------------------------------------- - - The engine extension named `ftxerr18' is used to convert a - FreeType error code into a human-readable string of text. - - However, it is able to support internationalization on Unix - systems through the use of the `gettext' library. This means - that the error messages will be localized to your system's - language, provided it is available in this release. The - currently available languages are - - - English (by default) - - Czech - - German - - Spanish - - French - - Dutch - - One can add a new language by adding a `.po' file in the `po' - directory. Please read the file `docs/i18n.txt' for more - details on how to use `gettext'. - - In order to enable localization of the `ftxerr18' extension, one - has to set the macro HAVE_LIBINTL_H at compile time. By - default, the extension will build with support for the English - language. - - Unix-specific: ------------------------------------------------- - - Note that the Unix `configure' script that comes with this - release is able to automatically detect whether your system - has `gettext' installed and set HAVE_LIBINTL_H in the - `ft_conf_h' file accordingly. - - To disable internationalization, run `configure' with the - option `--disable-nls' (NLS stands for `National Language - Support'). Then rebuild the library. - - ---------------------------------------------------------------- - - Note that we do not support internationalization on non-Unix - platforms, as the `gettext' library isn't available everywhere, - or does not work in a consistent way in different environments. - - - 8. TrueType patents - ------------------- - - We have recently discovered that Apple owns several patents that - relate to the rendering of TrueType fonts. This could mean that - the free use and distribution of the FreeType library could be - illegal in the US, Japan, and possibly other countries. - - For more information, please see the FreeType Patents page at: - - http://www.freetype.org/patents.htm - - This section will now explain how to build a `patent-free' - engine, at the cost of rendering quality. This is done simply - by de-activating the compilation of the TrueType bytecode - interpreter (which is the only part of FreeType that might - violate an Apple patent). This has two effects: - - - saving about 18kByte of code in the engine - - ignoring completely the grid-fitting of vector outlines, which - results in extremely low quality at small pixel sizes. - - Such an engine can be used by font converters and/or graphics - libraries to display glyphs at high pixel sizes. - - In order to do so, simply look for the following line in your - configuration file `ft_conf.h': - - #undef FT_CONFIG_OPTION_NO_INTERPRETER - - Then change the `#undef' into a `#define': - - #define FT_CONFIG_OPTION_NO_INTERPRETER - - Now rebuild the engine with this new configuration file. - - - -III. Compiling the test programs -================================ - - This section explains how to compile the FreeType test programs - located in the `test' directory. Note that you should have - successfully compiled the library, as described in section I - before proceeding. - - WE STRONGLY RECOMMEND TO READ THE SYSTEM-SPECIFIC DOCUMENTS IN THE - `howto' DIRECTORY FOR A `QUICK'N'EASY' GUIDE ON HOW TO COMPILE AND - RUN THE TEST PROGRAMS. - - - 1. Compile the graphics sub-system and utility sources - ------------------------------------------------------ - - Some of the test programs need to display a graphics window to - show their results. In order to do so, they use a tiny graphics - system which was specifically written for FreeType (Note: The - code isn't really clean there -- you have been warned). - - Also, some simple C sources in the `test' directory are utility - functions used by nearly all test programs, and they should also - be compiled before them. These are the following files: - - gmain.h: the sub-system interface - gmain.c: the sub-system device-independent implementation - gevents.h: the definition of the events used by the test - program - gdriver.h: the system-specific device interface - blitter.c: a set of simple bitmap blitting functions - common.c: common routines used by all test programs - display.c: some routines dealing with text display - - as well as a system-specific `graphics driver' located in the - `test/arch/' hierarchy. For example: - - test/arch/msdos/gfs_dos.c: used to display graphics in a - full-screen Dos session - test/arch/os2/gpm_os2.c: used to display graphics in an OS/2 - Presentation Manager window - test/arch/unix/gwin_x11.c: used to display graphics in an X11 - window. - - You must compile the graphics sub-system and utilities before - compiling the test programs. This can be done simply with gcc - as: - - cd test - gcc -c -I../lib gmain.c blitter.c common.c display.c - gcc -c -I../lib -I. arch//yourdriver.c -o ./gdriver.o - - Note that a given test program may require some specific include - paths (like `/usr/X11/include' with X11 for example). - - The resulting object files can be grouped in a library if you - want to. - - - 2. Internationalization on Unix - ------------------------------- - - On Unix and Unix-like systems, the test programs are able to - support internationalization through the use of the `gettext' - library and the `ftxerr18' engine extension (see section I.7). - - To enable it, one has to compile each test program with the - macro HAVE_LIBINTL_H set. This is the same macro used to enable - it in `ftxerr18'. - - Note that the Unix `configure' script that comes with this - release is able to automatically detect whether `gettext' is - available on your system and set the macro accordingly when - compiling the test programs. - - You can disable internationalisation with the `--disable-nls' - option when invoking the `configure' script. - - - 3. Compile the test programs - ---------------------------- - - All test programs begin with the `ft' prefix in the `test' - directory, as in `ftzoom', `ftdump', `ftmetric'", etc. are test - programs. - - The easiest way to compile the test programs is compiling each - source file to an object file, including the path to the - FreeType engine source and its extensions. You need to use the - following include paths: - - - the path to the engine's public header file, i.e. `freetype.h' - which normally is `lib' - - - the path to the engine's extensions header files, located - normally in `lib/extend' - - - the path to the configuration file `ft_conf.h'. This is only - required to support internationalisation, as the test programs - read `ft_conf.h' only to see whether HAVE_LIBINTL_H is - defined. - - When compiling your own programs to FreeType, you shouldn't - normally need this file and path. - - Here is an example, compiling a test program with the ANSI - build: - - cd test - gcc -c -I../lib -I../lib/extend -I../lib/arch/ansi \ - .c - - Then, link this object file to the FreeType library, utilities - and graphics sub-system to build an executable. - - You can then invoke each program directly. - - - 4. The `fdebug' test program - ---------------------------- - - All test programs begin with the `ft' prefix (in the `test' - directory) as in `ftzoom', `ftdump', `ftmetric', etc. - - However, one test program named `fdebug' is used exclusively by - FreeType developers. It is a very simple TrueType bytecode - debugger, and was written to inspect the execution of the - TrueType interpreter. - - Note that we rather use the Pascal debugger for real work on the - interpreter, as it provides a much easier windowed interface - through the use of the Turbo Vision library. The C debugger is - mainly used to check that both Pascal and C sources produce the - same output. - - You will need gcc to compile the debugger. It uses a special - build of the FreeType engine to work. Follow these steps to - compile it: - - 1. Compile the library for the `debugger' system, i.e. - - cd freetype/lib - make -f arch/debugger/Makefile - - this will create a file named `libttf.a' in the directory - `freetype/lib/arch/debugger' which will NOT interfere with - your normal build (which is located in `freetype/lib'). - - 2. Compile the debugger: - - cd freetype/test - make -f arch/debugger/Makefile - - This will create an executable called `fdebug.exe' or - `fdebug', which is linked with the version of the library - found in `freetype/lib/arch/debugger' as described above. - - [For old Unix variants like 4.2BSD please uncomment the flag - HAVE_POSIX_TERMIOS in the makefile.] - - You can invoke the debugger in two ways: - - a. To debug a given glyph program in a given font, type - - fdebug glyph_number pointsize fontfile[.ttf] - - b. To debug a given font's CVT program, type - - fdebug --cvt pointsize fontfile[.ttf] - - Type `?' while running fdebug for a list of key bindings. - - -IV. Compiling the Pascal source -=============================== - - This section deals with the compilation of the Pascal version of - the FreeType engine, whose source code is located in the `pascal' - directory. - - Note that the Pascal version is more limited than the C one, as it - lacks the following `features': - - - Extensions are neither supported nor provided in Pascal. - - - The interpreter is more pedantic than the C one and will - probably not work with many broken glyphs. - - - It doesn't compile on old Turbo Pascal (TP 6.0 is a minimum), as - it uses inline assembly code. - - Other than that, the Pascal version supports charmaps and the name - table correctly since the 1.3 release. - -******************************************************************** -* * -* AN IMPORTANT NOTE REGARDING TURBO AND BORLAND PASCAL USERS * -* ========================================================== * -* * -* Programs compiled with TP6 and BP7 might not be able to run on * -* fast machines! * -* * -* Usually, the program aborts immediately with a message like * -* * -* Runtime error 200: Divide by zero at xxxx:xxxx * -* * -* The bug is located in the runtime's initialization routine * -* used to compute the machine's speed. It does so by dividing a * -* value taken through the BIOS timer by a small constant. * -* * -* On fast machines, the result exceeds 16 bits, which causes a * -* CPU exception/interrupt. The latter is caught by the * -* runtime's exception handlers which aborts the execution and * -* prints the above message. * -* * -* We don't know anything that can be done to fix this bug, as it * -* would need a recompilation of a version of the Borland runtime * -* initialization code. * -* * -******************************************************************** - - Due to lack of time, the library could not be fully tested under - TP6 or BP7. - - - 1. Compiling the library - ------------------------ - - The library itself is located in `pascal/lib'. You can compile - it very simply by invoking your Pascal compiler on the file - `freetype.pas'. - - As always with Pascal, dependencies are resolved automatically. - - - 2. Compiling the test programs - ------------------------------ - - The test programs are located in `pascal/test'. You will mainly - find there the following: - - lint - A TrueType glyph loading checker. This test program - will simply load each glyph in a font file and check - for errors in its hinting programs. It is useful to - find broken glyphs in fonts. - - view - A simple TrueType glyph viewer. Shows all the glyphs - within a given font file on a graphics screen. Only - works under DOS (with Borland Pascal) and OS/2 (with - Virtual Pascal). - - timer - A simple benchmark program for the scan-line - converter. Similar to the C `fttimer' test program. - - debugger - A TrueType bytecode debugger. This one must be - compiled with the Turbo Vision library. It uses a - rather advanced windowed interface to display the - glyph program and their execution. It can also - display the current glyph in a graphics window. A - bit rough but extremely useful to the development - of FreeType. - - dump - A TrueType metrics checker. This test program simply - checks that the hinted width of each glyph corresponds - to the one found in the TrueType `hdmx' table when - present. This program is now obsolete and should be - ignored. - - As always, simply invoke the root source file to make an - executable automatically -- don't forget to include the path to - the FreeType unit as described in section III.1. - - - 3. Porting the library to a different Pascal compiler - ----------------------------------------------------- - - The Pascal sources use inline assembly to implement the 64-bit - computation routines needed by the TrueType engine. This - release comes with various versions of the `ttcalc' inline - assembly. - - These files are (within `pascal/lib'): - - ttcalc1.inc: for Turbo and Borland Pascal & Delphi 1 (16-bit) - ttcalc2.inc: for Virtual Pascal (32-bit) - ttcalc3.inc: for Delphi 2 & 3 (untested on Delphi 4 & 5) - ttcalc4.inc: for Free Pascal on a i386 (32-bit) - - Note that in order to port the Pascal source to a new compiler, - one has to: - - a. Write a specific version of `ttcalc?.inc' for the compiler's - inline assembly. - - Be sure to respect the compiler's assembler syntax, as well - as its parameter-passing function interface, i.e., which - registers and/or stack slots are used to pass arguments at - function call. - - b. Add some lines to detect your compiler in `ttconfig.inc'. - - This file contains some tests to define macros used to - determine which compiler is used. These macros are used - later in `ttcalc.pas' in order to select the correct inline - assembly file to use. - - See the source files for more details. - - c. Add an include to the new `ttcalc?.inc' in `ttcalc.pas'. - - Make this according to the compiler detected in - `ttconfig.inc'. - - See the source files for more details. - - d. Submit your changes to the FreeType Developers list. - - In order to see them added to the next release of the Pascal - engine. - - ---- end of INSTALL --- Index: xc/extras/FreeType/MakeSub.in diff -u xc/extras/FreeType/MakeSub.in:1.1.1.1 xc/extras/FreeType/MakeSub.in:removed --- xc/extras/FreeType/MakeSub.in:1.1.1.1 Sat Sep 5 23:00:46 1998 +++ xc/extras/FreeType/MakeSub.in Wed Mar 16 20:59:25 2005 @@ -1,7 +0,0 @@ -# this file is part of the FreeType project - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -bindir = @bindir@ -includedir = @includedir@ Index: xc/extras/FreeType/Makefile.in diff -u xc/extras/FreeType/Makefile.in:1.1.1.2 xc/extras/FreeType/Makefile.in:removed --- xc/extras/FreeType/Makefile.in:1.1.1.2 Sat Jan 23 22:21:44 1999 +++ xc/extras/FreeType/Makefile.in Wed Mar 16 20:59:25 2005 @@ -1,60 +0,0 @@ -# This file is part of the FreeType project. - -RMF = @RM@ -f - -MAKEFILE = arch/unix/Makefile - -FTLIBDIR = lib -FTTESTDIR = test -FTPODIR = po - -all: ttlib tttest ttpo - -debug: ttlibdebug tttest ttpo - -# we can't use the target names 'lib', 'test', etc. -# because make will believe that the directories are -# the targets and are up-to-date! Grrr... >:-( - -ttlib: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) all - -ttlibdebug: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) debug - -tttest: - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) all - -ttpo: - cd $(FTPODIR); $(MAKE) all - -install: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) install - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) install - cd $(FTPODIR); $(MAKE) install - -uninstall: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) uninstall - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) uninstall - cd $(FTPODIR); $(MAKE) uninstall - -clean: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) clean - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) clean - cd $(FTPODIR); $(MAKE) clean - -distclean: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) distclean - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) distclean - cd $(FTPODIR); $(MAKE) distclean - $(RMF) config.cache config.log config.status Makefile \ - MakeSub ft_conf.h libtool - -check: - @echo This package does not yet have a validation suite - -depend: - cd $(FTLIBDIR); $(MAKE) -f $(MAKEFILE) depend - cd $(FTTESTDIR); $(MAKE) -f $(MAKEFILE) depend - -# end of Makefile.in Index: xc/extras/FreeType/PATENTS diff -u xc/extras/FreeType/PATENTS:1.1.1.1 xc/extras/FreeType/PATENTS:removed --- xc/extras/FreeType/PATENTS:1.1.1.1 Sat Feb 12 23:54:40 2000 +++ xc/extras/FreeType/PATENTS Wed Mar 16 20:59:25 2005 @@ -1,27 +0,0 @@ - - FreeType Patents Disclaimer - August 1999 - - - -WE HAVE DISCOVERED THAT APPLE OWNS SEVERAL PATENTS RELATED TO THE -RENDERING OF TRUETYPE FONTS. THIS COULD MEAN THAT THE FREE USE OF -FREETYPE MIGHT BE ILLEGAL IN THE USA, JAPAN, AND POSSIBLY OTHER -COUNTRIES, BE IT IN COMMERCIAL OR OPEN SOURCE PRODUCTS. - -FOR MORE DETAILS, WE STRONGLY ADVISE YOU TO GO TO THE FREETYPE -PATENTS PAGE AT THE FOLLOWING WEB ADDRESS: - - http://www.freetype.org/patents.htm - -WE WILL NOT PLACE INFORMATION IN THIS FILE AS THE SITUATION IS STILL -UNDETERMINED FOR NOW. AT THE TIME THESE LINES ARE WRITTEN, WE HAVE -CONTACTED APPLE'S LEGAL DEPARTMENT AND ARE STILL WAITING FOR THEIR -ANSWER ON THE SUBJECT. - -PLEASE READ THE `INSTALL' FILE TO SEE HOW TO DISABLE THE ENGINE'S -BYTECODE INTERPRETER IN ORDER TO BUILD A PATENT-FREE ENGINE, AT THE -COST OF RENDERING QUALITY. - - ---- end of PATENTS --- Index: xc/extras/FreeType/README diff -u xc/extras/FreeType/README:1.1.1.3 xc/extras/FreeType/README:removed --- xc/extras/FreeType/README:1.1.1.3 Sat Feb 12 23:54:40 2000 +++ xc/extras/FreeType/README Wed Mar 16 20:59:26 2005 @@ -1,695 +0,0 @@ - - - Welcome to the - - F R E E T Y P E P R O J E C T - - http://www.freetype.org - - Release 1.3.1 - - The FREE TrueType Font Engine - - Copyright 1996 David Turner - - 1999 Robert Wilhelm - Werner Lemberg - - - Table of Contents - ----------------- - - I. Introduction - - II. The FreeType mini-FAQ - - III. How to use the test programs - - 1. ftzoom - 2. ftlint - 3. ftview - 4. fttimer - 5. ftdump - 6. ftstring - 7. ftstrpnm - 8. fterror - 9. ftsbit - 10. ftmetric - 11. ftstrtto - - IV. How to use the programs in the `contrib' directory - - V. Final remarks - - -I. Introduction -=============== - - Please read the file `INSTALL' for installation instructions! - - The FreeType engine is a free and portable TrueType font rendering - engine. It has been developed to provide TrueType support to a - great variety of platforms and environments. - - Notice that FreeType is a *library*. It is *not* a font server - for your preferred environment, even though it has been written to - allow the design of many font servers. - - To our knowledge, this is the only royalty-free complete TrueType - engine available. Moreover, its quality fully matches these of - Windows or the Macintosh, a thing that cannot be said for most - other commercial engines available. - - FreeType is a clean-room implementation that is not derived from - the original TrueType engine developed by Apple and Microsoft. It - has been created with the sole help of the published TrueType - specifications, which, to our great surprise and pain, turned out - to be extremely poor or misleading in critical areas. Much hard - work has been undertaken to solve numerous ambiguities; - nevertheless, its end result is a portable, fast quality renderer! - - The library itself takes about 55kByte of Intel code, complete - with a TrueType byte-code interpreter and a high-performance - scan-line converter. - - You will find in this release: - - - A TrueType engine, with source code in ANSI C and Pascal. - - The C source code has been successfully compiled and run on - various platforms, including MS-DOS, OS/2, Amiga, Linux, and - several other variants of Unix. It should be portable to many - other platforms too. - - The Pascal code has been successfully compiled and run on DOS - (Borland's BP7) and OS/2 (fPrint's Virtual Pascal). A Delphi - port is in beta (the code in freetype/pascal compiles). - Unfortunately, it is not up to date compared to the C version. - - - An API to be used by client applications and font servers, - providing several low level abstractions that can be used to - open font files and collections, create point sizes and load, - process and render glyph outlines and bitmaps. - - - Support for the following features: - - o Font smoothing, a.k.a. gray-level rendering. - - Just like Windows 95, the renderer uses a `fine' algorithm - that only smoothes diagonals and curves, while keeping the - horizontal and vertical stems intact. - - This results in glyphs that are much more legible than the - `fuzzy' ones generated by programs like Acrobat. - - o Support for all character mapping formats. - - o A full-featured TrueType byte-code interpreter. - - The engine is able to hint the glyphs to produce excellent - output at small sizes. It was extremely difficult to get this - component right, due to the ambiguous and misleading TrueType - specifications. However, we now *match* Windows and Macintosh - qualities. - - o TrueType collection support, when several fonts are embedded - in the same file. - - o Support for extensions. - - It is now possible to extend the library in parts to support - additional features, like optional tables that are not - considered by the current core engine. - - o Kerning support. - - Provided as a sample extension with this release, kerning - tables can be accessed from a TrueType font for applications - that need it. - - o Support for vertical metrics. - - It is possible to load vertical metrics when they are present - in a font file. Metrics can be retrieved glyph by glyph, - using the loader, or in arrays with a new API. - - o Support for thread-safety and re-entrancy. - - You will only need to specialize the file `ttmutex.c' for your - platform to include system-specific synchronization calls. - - o New in 1.3: Support for embedded bitmaps. - - This feature is already used in xtt, a TrueType font server - for X Window System. - - Note also that: - - - Though development of the library is mainly performed on OS/2 - and Linux, the library does not contain system-specific code. - - - The package contains some graphics drivers used by the test - programs for display purposes on MS-DOS, OS/2, Amiga, and X11. - These drivers are absolutely not mandatory for running the - FreeType engine. Some console-mode test programs like `ftlint' - or `ftdump' don't use graphics at all. - - - FreeType 1.3 is binary compatible with 1.2, which means that you - won't need to recompile your programs if they used the engine as - a shared library (libttf.so on Linux, or FreeType.dll on - Windows). See the file `freetype/docs/changes.txt' for more - information about (minimal) API changes. - - -II. The FreeType mini-FAQ -========================= - - Summary - - 0. Where to find the latest FreeType release? - - 1. Did the API change? - - 2. What does the `Free' in FreeType means? Can you use it in a - commercial product? (YES!) - - 3. I have made a small program based on the test programs but I - would like to know how to do xxx? - - 4. When will I be able to use FreeType to display TrueType fonts - under X11, OS/2 or Wine? (NOW!) - - 5. Trying to compile the FreeType sources gives me lots of - warnings with my ANSI C compliant compiler! - - ------------------------------------------------------------------ - - 0. Where to find the latest FreeType release? - - The latest package is usually uploaded to various source - repositories, like SunSite, SimTel, or Hobbes. There are two - archive formats (zip and tar.gz), which also differ by their - CR/LF conventions. - - * for DOS and OS/2: `ft-13.zip' - - which should be available at: - - Hobbes: ftp://ftp.cdrom.com/pub/os2/fonts - SimTel: ftp://oak.oakland.edu/pub/simtel.net/msdos/graphics - - * for UNIX and Amiga: `freetype-1.3.tar.gz' - - look at: - - SunSite: ftp://sunsite.unc.edu/pub/Linux/X11/fonts - - * As uploading can take several days before the package becomes - available to the public, we advise you to download it from - our own ftp site if you read this message few days after the - announcement at: - - ftp://ftp.freetype.org/pub/freetype - - Our home page is at: - - http://www.freetype.org - - Screen shots are available! - - There are also three mailing lists: - - o freetype-announce@freetype.org - - Announcements only about new versions of FreeType and - related packages. This list is moderated and expected to - have very low traffic. - - o freetype@freetype.org - - Discusses general use of FreeType, future, and needed - additions, as well as many other font-related discussions - which do not always relate directly to the FreeType code - itself... - - o devel@freetype.org - - Discusses development, design choices, portability issues, - internals, specific licenses, etc. - - To subscribe, send the usual subscription commands to: - - majordomo@freetype.org - - To report bugs please use send an email to the address - bugs@freetype.org -- if you want help fixing bugs, contact - robert.wilhelm@freetype.org to be manually subscribed to this - closed list. - - ------------------------------------------------------------------ - - 1. Did the API change since the version 1.2? - - Only very marginally. Please refer to `changes.txt'. - - ------------------------------------------------------------------ - - 2. What does the `Free' in FreeType means? Can you use it in a - commercial product? (YES!) - - We have placed this release under our special FreeType license. - - It was inspired by the BSD, Artistic, and IJG (Independent JPEG - group) licences, which specifically encourage the use of this - software in commercial products! - - The reason we did this is that we believe that TrueType is a - very useful technology, and want to make it available on all - machines and platforms. The license is there to ensure that - the engine can be spread as widely as possible. - - However, free does not mean public domain. This engine is - copyrighted by its authors, and they will fiercely defend their - rights. - - ------------------------------------------------------------------ - - 3. I have made a small program based on the test programs but I - would like to know how to do xxx? - - (Where xxx is a feature lacking from the current - implementation). - - First of all, read the documentation. The user guide gives - some basic hints and concepts. You can also read the source - code of the test programs that you didn't consider yet. If - you're really stuck, mail your question to: - - freetype@freetype.org - - We'll try to help you. - - ------------------------------------------------------------------ - - 4. When will I be able to use FreeType to display TrueType fonts - under X11, OS/2, or Wine? - - You can already do that under X11 and OS/2 :-) Go to the - FreeType web page (http://www.freetype.org) for up-to-date - information. - - And yes, it looks terrific! - - For X11, you could also take a look at `xfstt', an independent - TrueType font server for Unix which doesn't rely on the - FreeType code. - - You're welcome to volunteer for other platforms, like: - - Amiga, RISC OS, BeOS, and others - - Please contact devel@freetype.org for more information. - - ------------------------------------------------------------------ - - 5. Trying to compile the FreeType sources gives me lots of - warnings with my ANSI C compliant compiler! - - We use gcc as our reference compiler for warnings. This means - that we use the `-ansi -pedantic -Wall' flags and try to get - rid of warnings in this situation. - - If you're compiling with another compiler, you may encounter - warnings, not errors. - - We have spent much efforts to reduce seriously the number of - warnings produced by major compilers, including Visual Age, - Visual C++ and Borland C++. - - Note that the Borland compilers seem to produce lots of - irrelevant warnings (like `potential loss of precision'). - - -III. How to use the test programs -================================= - - All test programs having a graphic interface use the same key - convention: - - x : fine counter_clockwise rotation - c : fine clockwise rotation - - v : fast counter_clockwise rotation - b : fast clockwise rotation - - h : toggle hinting on/off - K : toggle kerning on/off - B : toggle display of embedded bitmaps on/off - G : toggle GSUB on/off - - + : fast scale up - - : fast scale down - u : fine scale up - j : fine scale down - - l : go to next glyph - k : go to previous glyph - - o : go to tenth next glyph - i : go to tenth previous glyph - - 0 : go to hundredth next glyph (useful for CJK fonts) - 9 : go to hundredth previous glyph - - ) : go to thousandth next glyph - ( : go to thousandth previous glyph - - } : go to tenthousandth next glyph - { : go to tenthousandth previous glyph - - q : - ESC : exit - - These keys were chosen because they are available on all - platforms. Note also that each program uses only a subset of this - key map. - - 1. FTZOOM - --------- - - `ftzoom' is a very simple glyph viewer that supports font - smoothing. Its usage is: - - ftzoom [-g] [-p platformID -e encodingID] - [-r resolution] [-z magnification] [-n] fontfilename - - With -g you can select gray-scaling; with -n you can suppress - usage of the `post' table in the TrueType font. - - For example: - - ftzoom arial.ttf to show the glyphs found - in the Arial font - ftzoom -g times.ttf to show smoothed version of - Times's glyphs. - ftzoom -p 3 -e 1 uwjmg3.ttf use cmap for platform ID 3, - encoding ID 1 for this Japanese - font. - - 2. FTLINT - --------- - - `ftlint' is used to execute all glyphs instructions found in a - font file at a given char size size. Its usage is: - - ftlint pointsize fontfilename [fontfilename] ... - - For example: - - ftlint 12 arial.ttf - ftlint 15 times.ttf - - It reports error codes and faulty glyph numbers. This is a - console tool that doesn't need the graphics subsystem. - - NOTE: Trying to hint at sizes smaller than 7 is irrelevant. - - 3. FTVIEW - --------- - - A font viewer that supports hinting and font smoothing. Its - usage: - - ftview [-g] -[r resolution] [-B] pointsize fontfilename - - like in: - - ftview 12 arial.ttf show the hinted Arial at size 12pt. - - ftview -g 15 timesi.ttf show the hinted and font-smoothed - Times at size 15pt. - - `-r' selects the resolution; `-B' forces the use of embedded - bitmaps. - - Note that it is possible to change the point size during display - with the keys `u', `j', `+', and `-'. It is also possible to - browse the whole glyph set with the `k', `l', `i', `o', `0', - `9', `(', `)', `{', and `}' keys (see key map above). - - The OS/2 PM driver comes with an additional magnifying window. - The magnified zone is set with the mouse, while the scale is - changed with the help of `PageUp' and `PageDown'. - - Note 1: The engine uses the font's CVT program to determine at - which size to enable or disable glyph hinting. Don't be - surprised to see unhinted glyphs at sizes < 7pt. - - Note 2: Vertical drop-out control has been added to the gray - scaling renderer. As a consequence, the library doesn't - produce unpleasant results at small ppems with badly - hinted glyphs. - - 4. FTTIMER - ---------- - - This program is used to benchmark FreeType's scan-converter (the - component in charge of translating a vectorial shape description - into a bitmap). It does so in preloading all glyphs from a font - file, then rendering them as fast as possible in a 640x450 - buffer. The glyphs are rendered at size 400pt / 96dpi, which is - _quite_ big. - - Its usage is: - - fttimer [-g] [-v] fontfilename - - where - - -g : Asks for gray-level rendering at size 200pt instead - (a.k.a. font-smoothing). - - -v : Asks for the display of the produced bitmap. Beware - that display slows things down (display on X11 is - _terrible_, especially with gray-levels, but this is - not a problem for us :-). - - Note that the returned numbers are not a benchmark of FreeType's - overall performance! Only of the scan-line renderer (which - seems quite fast, apparently :-). - - When comparing measured performances across machines, please - only consider the undisplayed ones. We're interested in all - kinds of results (please provide the following information: - - font file - number of rendered glyphs - render time - total time - glyphs / s - processor type - CPU clock - - and which compiler used (with optimization involved)! This - can make a great difference! - - etc.) - - 5. FTDUMP - --------- - - This program is a very simple font dumper. In its current - incarnation, it will only output a font's name table, character - encoding maps IDs and total memory consumption. For TrueType - Open files, the available GSUB tables are also shown. - - The `total memory used' reported is the amount that is used by - the engine to load one face, with one instance (a point size). - - Each additional instance takes only a fraction of that amount, - and is labeled by `instance object'. As you can see, FreeType - isn't really greedy. - - Usage: ftdump fontpathname[.ttf|.ttc] - - 6. FTSTRING - ----------- - - This program demonstrates string text generation. It only - displays a given message on the screen, and lets you resize it - with the classic key bindings `u', `j', `+', and `-'. - - Usage: - - ftstring ptsize fontname[.ttf|.ttc] [message_string] - - If the message is omitted, it will revert to the classic - typographic test sentence: - - The quick brown fox jumps over the lazy dog - - which is made of all letters of the English alphabet. - - `ftstring' only works with font files that contain a Unicode - character mapping table (either Windows Unicode or Apple - Unicode). For the moment, the message can however only be - written in ASCII, as accents aren't supported yet. - - 7. FTSTRPNM - ----------- - - Usage: - - ftstrpnm [options] filename [string] - - Options: - - -g gray-level rendering (default: off) - -h hinting off (default: on) - -r X resolution X dpi (default: 96) - -p X pointsize X pt (default: 12) - -b X border X pixels wide (default: 0) - - This program is quite similar to ftstring but converts the - rendered image of the specified string into a bitmap in PBM or - PGM format written to stdout; PBM (Portable BitMap) and PGM - (Portable GrayMap) formats can be further converted to popular - graphics formats like GIF or PNG with the netpbm tool suite - available via Internet. - - 8. FTERROR - ---------- - - This program tests the gettext() functionality on UNIX platforms - (usually provided in the GNU gettext package). It will return - language specific error and warning messages depending on your - locale. Currently French, Dutch, Spanish, German, and Czech - translations of the FreeType messages are included -- we invite - you to contribute more translations. - - Typically, you have to set the LANG environment variable to your - locale to get localized messages. Example: - - LANG=de fterror - - Note that providing message strings for FreeType's error and - warning messages is an extension and not part of the FreeType - library itself. Please refer to `docs/i18n.txt' for further - details. - - 9. FTSBIT - --------- - - Usage: - - ftsbit ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..] - - This tool dumps the information in the tables for embedded - bitmaps. Additionally, it prints (to the console) a selected - glyph bitmap. - - 10. FTMETRIC - ------------ - - Usage: - - ftmetric [options below] point fontname[.ttf|.ttc] ... - - -B show sbit's metrics (default: none) - -c C use C'th font index of TrueType collection - (default: 0) - -i index glyph index (default: 0) - -r R use resolution R dpi (default: 72dpi) - - With this small program you can inspect the metric data of a - given glyph; additionally, it dumps the particular glyph to the - console. - - 11. FTSTRTTO - ------------ - - Usage: - - ftstrtto [options below] ppem fontname[.ttf|.ttc] [string|-] - - -c C use font with index C in TrueType collection - (default: 0) - -f F use feature F (can be specified more than once) - -g gray-level rendering - -l L use language L - -r R use resolution R dpi (default: 96dpi) - -s S use script S - -u interpret input data as UTF8-encoded - -v display string vertically - -x display string from right to left - - F, L, and S must be specified as 4-character tags. - Specifying only F and S selects default language system of S. - Specifying only L and S selects the req. feature of L only - (if any). - - If `-' is specified as input string, stdin is read instead. - - This program uses almost all features of FreeType to display a - string on screen. Its usage is similar to `ftstring', but you - can additionally select GSUB features, the collection in a font, - toggle kerning and embedded bitmaps interactively, and input the - optional string in UTF8 encoding. - - For a list of available script, language, and feature tags - please refer to the TrueType Open (resp. OpenType) - specification. - - Example: - - ftstrtto -s "latn" -l "DEU " -f "liga" -f "frac" \ - 40 pala.ttf "fi ff ffi ffl 1/2" - - Note that you can inspect the available tags in a font with - `ftdump'. - - The features `init', `medi', and `fina', and `isol' are treated - specially. Internally, ftstrtto assigns initial, medial, - isolated, and final properties to Arabic characters in the input - string. If one of the features is switched on, all glyphs with - the corresponding property are modified (if covered). - - Example: - - ftstrtto -s arab -f init -f medi -f fina -f isol \ - -f liga -f mset -x -u 20 trado.ttf - < arab.utf8 - - `mset' is another, Arabic specific feature to position combining - marks. - - If you select the swash feature `swsh', the displayed - alternative in the string is always the first available one. - - - -IV. HOW TO USE THE PROGRAMS IN THE `CONTRIB' DIRECTORY -====================================================== - - These programs are contributions to FreeType and not really part - of it. Please read the documentation files in the respective - subdirectories how to compile and install them. - - -V. FINAL REMARKS -================ - -Of course, all source code is provided `as is'. Please read the -file `license.txt' for more information. - -We hope you will find this engine useful, and look forward to file. -your feed-back. We're of course very interested in bug reports, as -well as FreeType success stories :-) - - -Thanks for your time and consideration, - - - David Turner, Robert Wilhelm, Werner Lemberg, - and all the FreeType enthusiasts... - - ---- end of README --- Index: xc/extras/FreeType/README.XFree86 diff -u xc/extras/FreeType/README.XFree86:1.3 xc/extras/FreeType/README.XFree86:removed --- xc/extras/FreeType/README.XFree86:1.3 Sun Feb 13 01:15:21 2000 +++ xc/extras/FreeType/README.XFree86 Wed Mar 16 20:59:26 2005 @@ -1,20 +0,0 @@ -A few files in this directory and all the files in the `lib/' -subdirectory come from the FreeType 1.3.1 distribution. Please consult - - - - -for more information. - -Those files have been slightly modified. All the changes are marked -with a comment saying `Xserver-specific'. - - -When importing version A.B of FreeType, use: - - cvs import -m "FreeType version A.B" xc/extras/FreeType FreeType FreeType-A_B - - -Files that are modified relative to the most recent import should have -the ident text: $XFree86: xc/extras/FreeType/README.XFree86,v 1.3 2000/02/13 06:15:21 dawes Exp $ added in a comment. - Index: xc/extras/FreeType/aclocal.m4 diff -u xc/extras/FreeType/aclocal.m4:1.1.1.3 xc/extras/FreeType/aclocal.m4:removed --- xc/extras/FreeType/aclocal.m4:1.1.1.3 Sat Feb 12 23:54:40 2000 +++ xc/extras/FreeType/aclocal.m4 Wed Mar 16 20:59:26 2005 @@ -1,427 +0,0 @@ -## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- -## Copyright (C) 1996-1999 Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$host" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_SUBST(LD) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -AC_SUBST(NM) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$host" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl Index: xc/extras/FreeType/announce diff -u xc/extras/FreeType/announce:1.1.1.2 xc/extras/FreeType/announce:removed --- xc/extras/FreeType/announce:1.1.1.2 Sat Feb 12 23:54:41 2000 +++ xc/extras/FreeType/announce Wed Mar 16 20:59:26 2005 @@ -1,60 +0,0 @@ - - - Announcing - - - F R E E T Y P E 1 . 3 . 1 - - - The FREE TrueType Font Engine - - - Copyright (C) 1996-1999 The FreeType Development Team - - - - The FreeType engine is a free and portable TrueType font rendering - engine, available in ANSI C and Pascal source code. It has been - developed to provide TrueType support to a great variety of - platforms and environments. - - Notice that FreeType is a *library*. It is *not* a font server - for your preferred environment, even though it has been designed - to be the basis of many high-level libraries, tools and font - servers. - - - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - - WE HAVE RECENTLY DISCOVERED THAT APPLE OWNS SEVERAL PATENTS - RELATED TO THE RENDERING OF TRUETYPE FONTS. THIS COULD MEAN THAT - THE FREE USE OF THE FREETYPE LIBRARY MIGHT BE ILLEGAL IN THE USA, - JAPAN, AND POSSIBLY OTHER COUNTRIES. FOR MORE INFORMATION, WE - STRONGLY ADVISE YOU TO GO TO THE FREETYPE WEB SITE AT: - - http://www.freetype.org/patents.htm - - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER DISCLAIMER - - - It's a clean-room implementation that is not derived from the - original TrueType engine developed by Apple and Microsoft, though - it matches it regarding rendering quality. To our knowledge, it's - the only royalty-free complete TrueType engine available. - - Version 1.3.1 fixes several bugs found in 1.3. - - Version 1.3 fixes several bugs found in 1.2, as well as provide - the engine with enhanced capabilities, like support for embedded - bitmaps and rudimentary TrueType Open support. - - For more information, please visit the freetype web site at: - - http://www.freetype.org - Index: xc/extras/FreeType/config.guess diff -u xc/extras/FreeType/config.guess:1.1.1.3 xc/extras/FreeType/config.guess:removed --- xc/extras/FreeType/config.guess:1.1.1.3 Sat Feb 12 23:54:41 2000 +++ xc/extras/FreeType/config.guess Wed Mar 16 20:59:26 2005 @@ -1,1087 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 -# Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to the Autoconf mailing list . -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# Use $HOST_CC if defined. $CC may point to a cross-compiler -if test x"$CC_FOR_BUILD" = x; then - if test x"$HOST_CC" != x; then - CC_FOR_BUILD="$HOST_CC" - else - if test x"$CC" != x; then - CC_FOR_BUILD="$CC" - else - CC_FOR_BUILD=cc - fi - fi -fi - - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - sed 's/^ //' << EOF >$dummy.c - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - rm -f $dummy.c $dummy - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*T3E:*:*:*) - echo t3e-cray-unicosmk${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - if test -x /usr/bin/objformat; then - if test "elf" = "`/usr/bin/objformat`"; then - echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 - fi - fi - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - armv*) UNAME_MACHINE=$UNAME_MACHINE ;; - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - ld_help_string=`cd /; ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unkown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c < -#ifdef __cplusplus - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:5:7*) - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 Index: xc/extras/FreeType/config.sub diff -u xc/extras/FreeType/config.sub:1.1.1.3 xc/extras/FreeType/config.sub:removed --- xc/extras/FreeType/config.sub:1.1.1.3 Sat Feb 12 23:54:41 2000 +++ xc/extras/FreeType/config.sub Wed Mar 16 20:59:26 2005 @@ -1,1215 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=vxworks - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v) - basic_machine=$basic_machine-unknown - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ - | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* \ - | f301-* | armv*-* | t3e-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - i386-go32 | go32) - basic_machine=i386-unknown - os=-go32 - ;; - i386-mingw32 | mingw32) - basic_machine=i386-unknown - os=-mingw32 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | *MiNT) - basic_machine=m68k-atari - os=-mint - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - msdos) - basic_machine=i386-unknown - os=-msdos - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-corel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - np1) - basic_machine=np1-gould - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sparclite-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=t3e-cray - os=-unicos - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc | sparcv9) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -*MiNT) - os=-mint - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-corel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -*MiNT) - vendor=atari - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os Index: xc/extras/FreeType/configure diff -u xc/extras/FreeType/configure:1.1.1.3 xc/extras/FreeType/configure:removed --- xc/extras/FreeType/configure:1.1.1.3 Sat Feb 12 23:54:42 2000 +++ xc/extras/FreeType/configure Wed Mar 16 20:59:26 2005 @@ -1,4515 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --enable-static[=PKGS] build static libraries [default=no]" -ac_help="$ac_help - --enable-shared[=PKGS] build shared libraries [default=yes]" -ac_help="$ac_help - --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" -ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -ac_help="$ac_help - --disable-libtool-lock avoid locking (might break parallel builds)" -ac_help="$ac_help - --disable-nls don't use NLS" -ac_help="$ac_help - --with-locale-dir=DIR Location of the locale file(s) - [PREFIX/share/locale]" -ac_help="$ac_help - --with-x use the X Window System" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=lib/freetype.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -srcdir=`cd $srcdir; pwd` - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_static=no -fi - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_shared=yes -fi - -# Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_fast_install=yes -fi - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:640: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:661: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:681: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:711: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:741: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:792: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 835 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:871: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:899: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:942: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:966: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:969: checking for non-GNU ld" >&5 -fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$ac_cv_path_LD" -if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1005: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 - - -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1021: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi -fi - -NM="$ac_cv_path_NM" -echo "$ac_t""$NM" 1>&6 - - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1058: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" - - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - : -fi - -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$host" in -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 1102 "configure"' > conftest.$ac_ext - if { (eval echo configure:1103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1124: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - lt_cv_cc_needs_belf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - - -esac - - -# Save cache, so that ltconfig can load it -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ -|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } - -# Reload cache, that may have been modified by ltconfig -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log - - -freetype_version='1.2.0' - -version_info='4:0:2' - -# Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - USE_NLS=no -else - USE_NLS=yes -fi - - - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1280: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1301: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1319: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1345: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1375: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1426: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1458: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1469 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1500: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1505: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1533: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1565: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic -ansi" -else - case "$host" in - *-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi - - - -case "$host" in - *-dec-osf*) - ln -s ../../MakeSub lib/arch - ln -s ../../MakeSub test/arch - ;; -esac - - - - -if test "$USE_NLS" = "yes"; then - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1674: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -for ac_hdr in locale.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1704: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - for ac_func in setlocale -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1743: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - - - ALL_LINGUAS="de fr cs nl es" - for ac_hdr in libintl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1802: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:1839: checking for gettext in -lintl" >&5 -ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - - - - LOCALEDIR='${prefix}/share/locale' - # Check whether --with-locale-dir or --without-locale-dir was given. -if test "${with_locale_dir+set}" = set; then - withval="$with_locale_dir" - - if test x$withval = xyes; then - echo "configure: warning: Usage is: --with-locale-dir=basedir" 1>&2 - else - if test x$withval = xno; then - echo "configure: warning: Usage is: --with-locale-dir=basedir" 1>&2 - else - LOCALEDIR=$withval - fi - fi - -fi - - - - # Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1910: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="$MSGFMT" - ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test -n "$MSGFMT"; then - echo "$ac_t""$MSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -n "$MSGFMT"; then - for ac_func in dcgettext -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1947: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2002: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GMSGFMT" in - /*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GMSGFMT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac -fi -GMSGFMT="$ac_cv_path_GMSGFMT" -if test -n "$GMSGFMT"; then - echo "$ac_t""$GMSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - # Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2038: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="$XGETTEXT" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test -n "$XGETTEXT"; then - echo "$ac_t""$XGETTEXT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - # Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2074: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$MSGMERGE" in - /*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_MSGMERGE="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="$MSGMERGE" - ;; -esac -fi -MSGMERGE="$ac_cv_path_MSGMERGE" -if test -n "$MSGMERGE"; then - echo "$ac_t""$MSGMERGE" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - if test -n "$XGETTEXT"; then - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 - XGETTEXT="" - fi - fi - - if test -n "$XGETTEXT"; then - if $XGETTEXT --help > /dev/null 2> /dev/null; then - : ; - else - echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 - XGETTEXT="" - fi - fi - - if test -n "$MSGFMT"; then - if $MSGFMT < /dev/null 2> /dev/null; then - echo "$ac_t""found msgfmt program is not GNU msgfmt; NLS won't be installed" 1>&6 - MSGFMT="" - fi - fi - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - CATOBJEXT=.gmo - DATADIRNAME=share -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CATOBJEXT=.mo - DATADIRNAME=lib -fi -rm -f conftest* - INSTOBJEXT=.mo - fi - - if test -n "$ALL_LINGUAS"; then - for lang in $ALL_LINGUAS; do - CATALOGS="$CATALOGS $lang$CATOBJEXT" - done - fi - - - - -fi - -if test x"$MSGFMT" = x; then - USE_NLS=no -fi - - -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2176: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RM"; then - ac_cv_prog_RM="$RM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RM="rm" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RM="$ac_cv_prog_RM" -if test -n "$RM"; then - echo "$ac_t""$RM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "rmdir", so it can be a program name with args. -set dummy rmdir; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2205: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RMDIR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RMDIR"; then - ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RMDIR="rmdir" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RMDIR="$ac_cv_prog_RMDIR" -if test -n "$RMDIR"; then - echo "$ac_t""$RMDIR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2243: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2296: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - - - # Most operating systems have gethostbyname() in the default searched - # libraries (i.e. libc): - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2323: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -# Some OSes (eg. Solaris) place it in libnsl: - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2370: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -# Some strange OSes (SINIX) have it in libsocket: - echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6 -echo "configure:2416: checking for gethostbyname in -lsocket" >&5 -ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -# Unfortunately libsocket sometimes depends on libnsl. - # AC_CHECK_LIB's API is essentially broken so the following - # ugliness is necessary: - echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6 -echo "configure:2464: checking for gethostbyname in -lsocket" >&5 -ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket -lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lsocket -lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 -echo "configure:2502: checking for gethostbyname in -lresolv" >&5 -ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -fi - - -fi - - -fi - - -fi - - echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:2560: checking for socket" >&5 -if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_socket) || defined (__stub___socket) -choke me -#else -socket(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_socket=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_socket=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2606: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2651: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket -lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lsocket -lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -fi - - -echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6 -echo "configure:2696: checking for cos in -lm" >&5 -ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2748: checking for X" >&5 - -# Check whether --with-x or --without-x was given. -if test "${with_x+set}" = set; then - withval="$with_x" - : -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else -if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; - esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; - esac - fi - cd .. - rm -fr conftestdir -fi - -if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h - - # First, try using that file with no special directory specified. -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - # We can compile using X headers with no special include directory. -ac_x_includes= -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done -fi -rm -f conftest* -fi # $ac_x_includes = NO - -if test "$ac_x_libraries" = NO; then - # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - LIBS="$ac_save_LIBS" -# We can link X programs with no special library path. -ac_x_libraries= -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ -do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f conftest* -fi # $ac_x_libraries = NO - -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi -fi - fi - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - cat >> confdefs.h <<\EOF -#define X_DISPLAY_MISSING 1 -EOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2997: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_R_nospace=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no -fi -rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_R_space=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no -fi -rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:3062: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldnet $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:3103: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldnet_stub $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3151: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_gethostbyname = no; then - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3200: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3249: checking for connect" >&5 -if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) -choke me -#else -connect(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_connect = no; then - echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3298: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3341: checking for remove" >&5 -if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_remove) || defined (__stub___remove) -choke me -#else -remove(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3390: checking for remove in -lposix" >&5 -ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lposix $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3433: checking for shmat" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shmat(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shmat) || defined (__stub___shmat) -choke me -#else -shmat(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_func_shmat = no; then - echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3482: checking for shmat in -lipc" >&5 -ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lipc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -else - echo "$ac_t""no" 1>&6 -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3534: checking for IceConnectionNumber in -lICE" >&5 -ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -else - echo "$ac_t""no" 1>&6 -fi - - LDFLAGS="$ac_save_LDFLAGS" - -fi - -for ac_hdr in stdlib.h fcntl.h unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3581: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3619: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3694: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3733: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3777: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3816: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3869: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat > conftest.$ac_ext < -#include -#include - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} - -EOF -if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_mmap_fixed_mapped=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MMAP 1 -EOF - -fi - -if test "$ac_cv_func_mmap_fixed_mapped" != yes; then - TT_FILE_COMPONENT=ttfile.c -else - TT_FILE_COMPONENT=arch/unix/ttmmap.c -fi - - -for ac_func in memcpy memmove -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4049: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - - - -$srcdir/mkinstalldirs lib/arch/unix test/arch/unix - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile - MakeSub - lib/arch/unix/Makefile - test/arch/unix/Makefile - po/Makefile.in ft_conf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@RANLIB@%$RANLIB%g -s%@CC@%$CC%g -s%@LD@%$LD%g -s%@NM@%$NM%g -s%@LN_S@%$LN_S%g -s%@LIBTOOL@%$LIBTOOL%g -s%@USE_NLS@%$USE_NLS%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@CPP@%$CPP%g -s%@XX_CFLAGS@%$XX_CFLAGS%g -s%@freetype_version@%$freetype_version%g -s%@version_info@%$version_info%g -s%@SET_MAKE@%$SET_MAKE%g -s%@HAVE_LOCALE_H@%$HAVE_LOCALE_H%g -s%@HAVE_LIBINTL_H@%$HAVE_LIBINTL_H%g -s%@HAVE_LIBINTL@%$HAVE_LIBINTL%g -s%@LOCALEDIR@%$LOCALEDIR%g -s%@MSGFMT@%$MSGFMT%g -s%@GMSGFMT@%$GMSGFMT%g -s%@XGETTEXT@%$XGETTEXT%g -s%@MSGMERGE@%$MSGMERGE%g -s%@CATALOGS@%$CATALOGS%g -s%@CATOBJEXT@%$CATOBJEXT%g -s%@INSTOBJEXT@%$INSTOBJEXT%g -s%@DATADIRNAME@%$DATADIRNAME%g -s%@RM@%$RM%g -s%@RMDIR@%$RMDIR%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@X_CFLAGS@%$X_CFLAGS%g -s%@X_PRE_LIBS@%$X_PRE_LIBS%g -s%@X_LIBS@%$X_LIBS%g -s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -s%@TT_FILE_COMPONENT@%$TT_FILE_COMPONENT%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - Index: xc/extras/FreeType/configure.in diff -u xc/extras/FreeType/configure.in:1.1.1.3 xc/extras/FreeType/configure.in:removed --- xc/extras/FreeType/configure.in:1.1.1.3 Sat Feb 12 23:54:43 2000 +++ xc/extras/FreeType/configure.in Wed Mar 16 20:59:26 2005 @@ -1,201 +0,0 @@ -dnl This file is part of the FreeType project. -dnl -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(lib/freetype.h) - -dnl Due to a bug in autoconf we must set $srcdir explicitly to an absolute -dnl path. -srcdir=`cd $srcdir; pwd` - -AM_DISABLE_STATIC -AM_PROG_LIBTOOL - -dnl FreeType version -freetype_version='1.2.0' - -dnl libttf.so version -version_info='4:0:2' - -AC_ARG_ENABLE(nls, - [ --disable-nls don't use NLS], - USE_NLS=no, USE_NLS=yes) -AC_SUBST(USE_NLS) - -dnl Checks for system type. -AC_CANONICAL_SYSTEM - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CPP - -dnl get Compiler flags right. - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic -ansi" -else - case "$host" in - *-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi -AC_SUBST(XX_CFLAGS) - -dnl at least Digital UNIX 4.0d needs this due to a strange make program - -case "$host" in - *-dec-osf*) - ln -s ../../MakeSub lib/arch - ln -s ../../MakeSub test/arch - ;; -esac - -AC_SUBST(freetype_version) -AC_SUBST(version_info) - -dnl gettext support -if test "$USE_NLS" = "yes"; then - AC_REQUIRE([AC_PROG_MAKE_SET]) - AC_CHECK_HEADERS(locale.h) - AC_CHECK_FUNCS(setlocale) - AC_SUBST(HAVE_LOCALE_H) - - ALL_LINGUAS="de fr cs nl es" - AC_CHECK_HEADERS(libintl.h) - AC_CHECK_LIB(intl,gettext) - AC_SUBST(HAVE_LIBINTL_H) - AC_SUBST(HAVE_LIBINTL) - - dnl Handle localedir - LOCALEDIR='${prefix}/share/locale' - AC_ARG_WITH(locale-dir, - [ --with-locale-dir=DIR Location of the locale file(s) - [PREFIX/share/locale]],[ - if test x$withval = xyes; then - AC_MSG_WARN(Usage is: --with-locale-dir=basedir) - else - if test x$withval = xno; then - AC_MSG_WARN(Usage is: --with-locale-dir=basedir) - else - LOCALEDIR=$withval - fi - fi - ]) - AC_SUBST(LOCALEDIR) - - AC_PATH_PROG(MSGFMT, msgfmt, $MSGFMT) - if test -n "$MSGFMT"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AC_PATH_PROG(XGETTEXT, xgettext, $XGETTEXT) - AC_PATH_PROG(MSGMERGE, msgmerge, $MSGMERGE) - - dnl Test whether we really found GNU xgettext. - if test -n "$XGETTEXT"; then - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT="" - fi - fi - - dnl We add another test for comparing GNU xgettext with openwin xgettext - if test -n "$XGETTEXT"; then - if $XGETTEXT --help > /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext program is not GNU xgettext; ignore it]) - XGETTEXT="" - fi - fi - - dnl Test whether we really found GNU msgfmt. - if test -n "$MSGFMT"; then - if $MSGFMT < /dev/null 2> /dev/null; then - AC_MSG_RESULT( - [found msgfmt program is not GNU msgfmt; NLS won't be installed]) - MSGFMT="" - fi - fi - - AC_TRY_LINK(, - [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - - if test -n "$ALL_LINGUAS"; then - for lang in $ALL_LINGUAS; do - CATALOGS="$CATALOGS $lang$CATOBJEXT" - done - fi - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(INSTOBJEXT) - AC_SUBST(DATADIRNAME) -fi - -dnl don't use NLS, when there is no gettext installed -if test x"$MSGFMT" = x; then - USE_NLS=no -fi - - -AC_CHECK_PROG(RM, rm, rm) -AC_CHECK_PROG(RMDIR, rmdir, rmdir) -AC_PROG_INSTALL -AC_PROG_LN_S - -dnl Checks for libraries. -sinclude(net.m4) -AC_LIBRARY_NET -AC_CHECK_LIB(m, cos) - -dnl Checks for header files. -AC_PATH_XTRA -AC_CHECK_HEADERS(stdlib.h fcntl.h unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) - -dnl Checks for library functions. - -dnl Here we check whether we can use our mmap file component. -AC_FUNC_MMAP -if test "$ac_cv_func_mmap_fixed_mapped" != yes; then - TT_FILE_COMPONENT=ttfile.c -else - TT_FILE_COMPONENT=arch/unix/ttmmap.c -fi -AC_SUBST(TT_FILE_COMPONENT) - -AC_CHECK_FUNCS(memcpy memmove) - -AC_CONFIG_HEADER(ft_conf.h) - -dnl Another bug: to make --srcdir work correctly we have to create the -dnl directory hierarchy first since autoconf only uses mkdir. -$srcdir/mkinstalldirs lib/arch/unix test/arch/unix - -AC_OUTPUT(Makefile - MakeSub - lib/arch/unix/Makefile - test/arch/unix/Makefile - po/Makefile.in, - [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) - - -dnl end of configure.in Index: xc/extras/FreeType/freetype.spec diff -u xc/extras/FreeType/freetype.spec:1.1.1.3 xc/extras/FreeType/freetype.spec:removed --- xc/extras/FreeType/freetype.spec:1.1.1.3 Sat Feb 12 23:54:43 2000 +++ xc/extras/FreeType/freetype.spec Wed Mar 16 20:59:26 2005 @@ -1,162 +0,0 @@ -Summary: FreeType library -Name: freetype -Version: 1.3.1 -Release: 1 -Source: ftp://ftp.freetype.org/pub/freetype/freetype-%{version}.tar.gz -URL: http://www.freetype.org/ -Copyright: BSD-Like -Group: Libraries -BuildRoot: /var/tmp/freetype - -%description -The FreeType engine is a free and portable TrueType font rendering -engine. It has been developed to provide TrueType support to a -great variety of platforms and environments. - -Note that FreeType is a *library*. It is not a font server for your -favorite platform, even though it was designed to be used in many of -them. Note also that it is *not* a complete text-rendering library. -Its purpose is simply to open and manage font files, as well as -load, hint and render individual glyphs efficiently. You can also -see it as a `TrueType driver' for a higher-level library, though -rendering text with it is extremely easy, as demo-ed by the test -programs. - -This package contains the files needed to run programs that use the -FreeType engine. - -%package devel -Summary: FreeType development headers and libraries -Group: Development/Libraries -Requires: %{name} = %{version} - -%description devel -The FreeType engine is a free and portable TrueType font rendering -engine. It has been developed to provide TrueType support to a -great variety of platforms and environments. - -Note that FreeType is a *library*. It is not a font server for your -favorite platform, even though it was designed to be used in many of -them. Note also that it is *not* a complete text-rendering library. -Its purpose is simply to open and manage font files, as well as -load, hint and render individual glyphs efficiently. You can also -see it as a `TrueType driver' for a higher-level library, though -rendering text with it is extremely easy, as demo-ed by the test -programs. - -This package contains all supplementary files you need to develop -your own programs using the FreeType engine. - -%package demo -Summary: FreeType test and demo programs -Group: Applications/Graphics -Requires: %{name} = %{version} - -%description demo -The FreeType engine is a free and portable TrueType font rendering engine. -It has been developed to provide TT support to a great variety of platforms -and environments. - -Note that FreeType is a *library*. It is not a font server for your favorite -platform, even though it was designed to be used in many of them. Note also -that it is *not* a complete text-rendering library. Its purpose is simply to -open and manage font files, as well as load, hint and render individual -glyphs efficiently. You can also see it as a "TrueType driver" for a -higher-level library, though rendering text with it is extremely easy, as -demo-ed by the test programs. - -This package contains several programs bundled with the FreeType engine for -testing and demonstration purposes. - -%changelog -* Thu Sep 9 1998 Pavel Kankovsky -- Simplified (and fixed) file list. - -* Wed Jun 16 1999 Werner Lemberg -- Updated to version 1.3. - -* Sun Oct 25 1998 Pavel Kankovsky -- libttf.so version number updated again. -- Default localedir based on prefix. -- File list adjustments (howto/). - -* Sun Oct 16 1998 Pavel Kankovsky -- Source filename fixed. -- HOWTO removed. -- libttf.so version number updated. - -* Tue Sep 29 1998 Robert Wilhelm -- Updated to version 1.2. - -* Tue Jul 14 1998 Alexander Zimmermann -- Added missing files. -- Added %defattr tags. - -* Thu Jun 18 1998 Robert Wilhelm -- Added lots of attr(-,root,root). - -* Wed May 27 1998 Pavel Kankovsky -- Changed group attr of freetype and freetype-devel package. -- Fixed misc glitches. - -* Sun May 24 1998 Pavel Kankovsky -- Split the package into three parts (runtime library, development - tools, and demo programs). -- Added missing files (headers, NLS). -- Added ldconfing upon (de)installation. - -* Thu Mar 12 1998 Bruno Lopes F. Cabral -- NLS for Portuguese language is missing, sorry (may be in a near future) - (please note the workaround using --with-locale-dir and gnulocaledir. - NLS Makefile needs a bit more rework but again I'll not patch it here). - -%prep -%setup - -find . -name CVS -type d | xargs rm -rf - -%build -./configure --prefix=/usr --enable-static -make all - -%install -make install prefix=$RPM_BUILD_ROOT/usr - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - -%files -%defattr(644, root, root, 755) -%doc announce license.txt -/usr/lib/libttf.so.* -/usr/share/locale/ - -%files devel -%defattr(644, root, root, 755) -%doc INSTALL README PATENTS announce license.txt readme.1st -%doc docs/ howto/ -/usr/lib/libttf.so -/usr/lib/libttf.la -/usr/lib/libttf.a -/usr/include/freetype/ - -%files demo -%defattr(755, root, root, 755) -%doc announce license.txt -/usr/bin/ftdump -/usr/bin/fterror -/usr/bin/ftlint -/usr/bin/ftmetric -/usr/bin/ftsbit -/usr/bin/ftstring -/usr/bin/ftstrpnm -/usr/bin/ftstrtto -/usr/bin/fttimer -/usr/bin/ftview -/usr/bin/ftzoom Index: xc/extras/FreeType/ft_conf.h.in diff -u xc/extras/FreeType/ft_conf.h.in:1.1.1.3 xc/extras/FreeType/ft_conf.h.in:removed --- xc/extras/FreeType/ft_conf.h.in:1.1.1.3 Sat Feb 12 23:54:44 2000 +++ xc/extras/FreeType/ft_conf.h.in Wed Mar 16 20:59:26 2005 @@ -1,211 +0,0 @@ -/* ft_conf.h.in. */ - -/* This file is part of the FreeType project. */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING - -/* The number of bytes in a int. */ -#undef SIZEOF_INT - -/* The number of bytes in a long. */ -#undef SIZEOF_LONG - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#undef HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#undef HAVE_MEMMOVE - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define if you have the libintl library. */ -#undef HAVE_LIBINTL - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -#undef HAVE_TT_TEXT - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ Index: xc/extras/FreeType/install-sh diff -u xc/extras/FreeType/install-sh:1.1.1.1 xc/extras/FreeType/install-sh:removed --- xc/extras/FreeType/install-sh:1.1.1.1 Sat Sep 5 23:00:47 1998 +++ xc/extras/FreeType/install-sh Wed Mar 16 20:59:26 2005 @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 Index: xc/extras/FreeType/license.txt diff -u xc/extras/FreeType/license.txt:1.1.1.2 xc/extras/FreeType/license.txt:removed --- xc/extras/FreeType/license.txt:1.1.1.2 Sat Feb 12 23:54:44 2000 +++ xc/extras/FreeType/license.txt Wed Mar 16 20:59:26 2005 @@ -1,158 +0,0 @@ - The FreeType Project LICENSE - ---------------------------- - - Copyright 1996-1999 by - David Turner, Robert Wilhelm, and Werner Lemberg - - - -Introduction -============ - - The FreeType Project is distributed in several archive packages; - some of them may contain, in addition to the FreeType font engine, - various tools and contributions which rely on, or relate to, the - FreeType Project. - - This license applies to all files found in such packages, and - which do not fall under their own explicit license. The license - affects thus the FreeType font engine, the test programs, - documentation and makefiles, at the very least. - - This license was inspired by the BSD, Artistic, and IJG - (Independent JPEG Group) licenses, which all encourage inclusion - and use of free software in commercial and freeware products - alike. As a consequence, its main points are that: - - o We don't promise that this software works. However, we are be - interested in any kind of bug reports. (`as is' distribution) - - o You can use this software for whatever you want, in parts or - full form, without having to pay us. (`royalty-free' usage) - - o You may not pretend that you wrote this software. If you use - it, or only parts of it, in a program, you must acknowledge - somewhere in your documentation that you've used the FreeType - code. (`credits') - - We specifically permit and encourage the inclusion of this - software, with or without modifications, in commercial products, - provided that all warranty or liability claims are assumed by the - product vendor. - - -Legal Terms -=========== - -0. Definitions --------------- - - Throughout this license, the terms `package', `FreeType Project', - and `FreeType archive' refer to the set of files originally - distributed by the authors (David Turner, Robert Wilhelm, and - Werner Lemberg) as the `FreeType project', be they named as alpha, - beta or final release. - - `You' refers to the licensee, or person using the project, where - `using' is a generic term including compiling the project's source - code as well as linking it to form a `program' or `executable'. - This program is referred to as `a program using the FreeType - engine'. - - This license applies to all files distributed in the original - FreeType archive, including all source code, binaries and - documentation, unless otherwise stated in the file in its - original, unmodified form as distributed in the original archive. - If you are unsure whether or not a particular file is covered by - this license, you must contact us to verify this. - - The FreeType project is copyright (C) 1996-1999 by David Turner, - Robert Wilhelm, and Werner Lemberg. All rights reserved except as - specified below. - -1. No Warranty --------------- - - THE FREETYPE ARCHIVE IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY - KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO - USE, OF THE FREETYPE PROJECT. - - As you have not signed this license, you are not required to - accept it. However, as the FreeType project is copyrighted - material, only this license, or another one contracted with the - authors, grants you the right to use, distribute, and modify it. - Therefore, by using, distributing, or modifying the FreeType - project, you indicate that you understand and accept all the terms - of this license. - -2. Redistribution ------------------ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - o Redistribution of source code must retain this license file - (`licence.txt') unaltered; any additions, deletions or changes - to the original files must be clearly indicated in - accompanying documentation. The copyright notices of the - unaltered, original files must be preserved in all copies of - source files. - - o Redistribution in binary form must provide a disclaimer that - states that the software is based in part of the work of the - FreeType Team, in the distribution documentation. We also - encourage you to put an URL to the FreeType web page in your - documentation, though this isn't mandatory. - - These conditions apply to any software derived from or based on - the FreeType code, not just the unmodified files. If you use our - work, you must acknowledge us. However, no fee need be paid to - us. - -3. Advertising --------------- - - The names of FreeType's authors and contributors may not be used - to endorse or promote products derived from this software without - specific prior written permission. - - We suggest, but do not require, that you use one or more of the - following phrases to refer to this software in your documentation - or advertising materials: `FreeType Project', `FreeType Engine', - `FreeType library', or `FreeType Distribution'. - -4. Contacts ------------ - - There are two mailing lists related to FreeType: - - o freetype@freetype.org - - Discusses general use and applications of FreeType, as well as - future and wanted additions to the library and distribution. - If you are looking for support, start in this list if you - haven't found anything to help you in the documentation. - - o devel@freetype.org - - Discusses bugs, as well as engine internals, design issues, - specific licenses, porting, etc. - - o http://www.freetype.org - - Holds the current FreeType web page, which will allow you to - download our latest development version and read online - documentation. - - You can also contact us individually at: - - David Turner - Robert Wilhelm - Werner Lemberg - - ---- end of license.txt --- Index: xc/extras/FreeType/ltconfig diff -u xc/extras/FreeType/ltconfig:1.1.1.3 xc/extras/FreeType/ltconfig:removed --- xc/extras/FreeType/ltconfig:1.1.1.3 Sat Feb 12 23:54:45 2000 +++ xc/extras/FreeType/ltconfig Wed Mar 16 20:59:26 2005 @@ -1,3017 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A lot of this script is taken from autoconf-2.10. - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} -echo=echo -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec "$SHELL" "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null`} - case X$UNAME in - *-DOS) PATH_SEPARATOR=';' ;; - *) PATH_SEPARATOR=':' ;; - esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -if test "X${echo_test_string+set}" != "Xset"; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || - test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH /usr/ucb; do - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running ltconfig again with it. - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf "%s\n"' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # Cool, printf works - : - elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.3.3 -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)" -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -default_ofile=libtool -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -enable_static=yes -enable_fast_install=yes -enable_dlopen=unknown -enable_win32_dll=no -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -nonopt= -ofile="$default_ofile" -verify_host=yes -with_gcc=no -with_gnu_ld=no -need_locks=yes -ac_ext=c -objext=o -libext=a -exeext= -cache_file= - -old_AR="$AR" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LDFLAGS="$LDFLAGS" -old_LD="$LD" -old_LN_S="$LN_S" -old_LIBS="$LIBS" -old_NM="$NM" -old_RANLIB="$RANLIB" -old_DLLTOOL="$DLLTOOL" -old_OBJDUMP="$OBJDUMP" -old_AS="$AS" - -# Parse the command line options. -args= -prev= -for option -do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test ! -f "$ltmain"; then - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -if test -n "$cache_file" && test -r "$cache_file"; then - echo "loading cache $cache_file within ltconfig" - . $cache_file -fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$SHELL $ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$SHELL $ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case "$host_os" in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR cru $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -# Set a sane default for `AR'. -test -z "$AR" && AR=ar - -# Set a sane default for `OBJDUMP'. -test -z "$OBJDUMP" && OBJDUMP=objdump - -# If RANLIB is not set, then run the test. -if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then - RANLIB="ranlib" - result="ranlib" - break - fi - done - IFS="$save_ifs" - - echo "$ac_t$result" 1>&6 -fi - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -fi - -# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$AS" && AS=as - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:581: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo $ac_n "checking for object suffix... $ac_c" 1>&6 -$rm conftest* -echo 'int i = 1;' > conftest.c -echo "$progname:603: checking for object suffix" >& 5 -if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* -echo "$ac_t$objext" 1>&6 - -echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_exeext="no" - $rm conftest* - echo 'main () { return 0; }' > conftest.c - echo "$progname:629: checking for executable suffix" >& 5 - if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err | *.$objext ) ;; - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* -fi -if test "X$ac_cv_exeext" = Xno; then - exeext="" -else - exeext="$ac_cv_exeext" -fi -echo "$ac_t$ac_cv_exeext" 1>&6 - -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -pic_flag= -special_shlib_compile_flags= -wl= -link_static_flag= -no_builtin_flag= - -if test "$with_gcc" = yes; then - wl='-Wl,' - link_static_flag='-static' - - case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # we not sure about C++ programs. - link_static_flag="$link_static_flag ${wl}-lC" - ;; - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - pic_flag='-m68020 -resident32 -malways-restore-a4' - ;; - sysv4*MP*) - if test -d /usr/nec; then - pic_flag=-Kconform_pic - fi - ;; - *) - pic_flag='-fPIC' - ;; - esac -else - # PORTME Check for PIC flags for the system compiler. - case "$host_os" in - aix3* | aix4*) - # All AIX code is PIC. - link_static_flag='-bnso -bI:/lib/syscalls.exp' - ;; - - hpux9* | hpux10* | hpux11*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - link_static_flag="${wl}-a ${wl}archive" - pic_flag='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - pic_flag='-Kconform_pic' - link_static_flag='-Bstatic' - fi - ;; - *) - can_build_shared=no - ;; - esac -fi - -if test -n "$pic_flag"; then - echo "$ac_t$pic_flag" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - case "$host_os" in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - ;; - *) - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - ;; - esac - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - can_build_shared=no - pic_flag= - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - echo "$ac_t"none 1>&6 -fi - -# Check to see if options -o and -c are simultaneously supported by compiler -echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 -$rm -r conftest 2>/dev/null -mkdir conftest -cd conftest -$rm conftest* -echo "int some_variable = 0;" > conftest.c -mkdir out -# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -# that will create temporary files in the current directory regardless of -# the output directory. Thus, making CWD read-only will cause this test -# to fail, enabling locking or at least warning the user not to do parallel -# builds. -chmod -w . -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 -if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then - echo "$ac_t"no 1>&6 - compiler_c_o=no - else - echo "$ac_t"yes 1>&6 - compiler_c_o=yes - fi -else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - compiler_c_o=no - echo "$ac_t"no 1>&6 -fi -CFLAGS="$save_CFLAGS" -chmod u+w . -$rm conftest* out/* -rmdir out -cd .. -rmdir conftest -$rm -r conftest 2>/dev/null - -if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 -if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_o_lo=no - else - echo "$ac_t"yes 1>&6 - compiler_o_lo=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_o_lo=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - compiler_o_lo=no -fi - -# Check to see if we can do hard links to lock some files if needed -hard_links="nottested" -if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$ac_t$hard_links" 1>&6 - $rm conftest* - if test "$hard_links" = no; then - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 - need_locks=warn - fi -else - need_locks=no -fi - -if test "$with_gcc" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_rtti_exceptions=no - else - echo "$ac_t"yes 1>&6 - compiler_rtti_exceptions=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_rtti_exceptions=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi - -fi - -# Check for any special shared library compilation flags. -if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 -$rm conftest* -echo 'main(){return(0);}' > conftest.c -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - echo "$ac_t$link_static_flag" 1>&6 -else - echo "$ac_t"none 1>&6 - link_static_flag= -fi -LDFLAGS="$save_LDFLAGS" -$rm conftest* - -if test -z "$LN_S"; then - # Check to see if we can use ln -s, or we need hard links. - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftest.dat - if ln -s X conftest.dat 2>/dev/null; then - $rm conftest.dat - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - fi -fi - -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:991: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:1015: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:1018: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -allow_undefined_flag= -no_undefined_flag= -need_lib_prefix=unknown -need_version=unknown -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -archive_cmds= -archive_expsym_cmds= -old_archive_from_new_cmds= -export_dynamic_flag_spec= -whole_archive_flag_spec= -thread_safe_flag_spec= -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= -always_export_symbols=no -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -# include_expsyms should be a list of space-separated symbols to be *always* -# included in the symbol list -include_expsyms= -# exclude_expsyms can be an egrep regular expression of symbols to exclude -# it will be wrapped by ` (' and `)$', so one must not match beginning or -# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -# as well as any symbol that contains `d'. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -# platforms (ab)use it in PIC code, but their linkers get confused if -# the symbol is explicitly referenced. Since portable code cannot -# rely on this symbol name, it's probably fine to never include it in -# preloaded symbol tables. - -case "$host_os" in -cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case "$host_os" in - aix3* | aix4*) - # On AIX, the GNU linker is very broken - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' - - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ - _lt_hint=1; - for symbol in `cat $export_symbols`; do - echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; - _lt_hint=`expr 1 + \$_lt_hint`; - done~ - test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' - - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' - ;; - - netbsd*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - fi - ;; - - solaris*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - ;; - esac - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4*) - hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' - hardcode_libdir_separator=':' - if test "$with_gcc" = yes; then - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - shared_flag='-shared' - else - shared_flag='${wl}-bM:SRE' - hardcode_direct=yes - fi - allow_undefined_flag=' ${wl}-berok' - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' - case "$host_os" in aix4.[01]|aix4.[01].*) - # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on - always_export_symbols=yes ;; - esac - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs' - fix_srcfile_path='`cygpath -w $srcfile`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case "$host_os" in - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF - fi - hardcode_libdir_flag_spec='${wl}-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3* | osf4* | osf5*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case "$host_os" in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' - archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - *) - ld_shlibs=no - ;; - esac -fi -echo "$ac_t$ld_shlibs" 1>&6 -test "$ld_shlibs" = no && can_build_shared=no - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - break - else - NM=${NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - -# Transform an extracted symbol line into a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -# Define system-specific variables. -case "$host_os" in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" - ;; -irix*) - symcode='[BCDEGRST]' - ;; -solaris*) - symcode='[BDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTW]' -fi - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - $rm conftest* - cat > conftest.c <&5 - if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' - - cat <> conftest.c -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$objext conftstm.$objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$objext" - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - global_symbol_pipe= - fi -done -if test "$pipe_works" = yes; then - echo "${ac_t}ok" 1>&6 -else - echo "${ac_t}failed" 1>&6 -fi - -if test -z "$global_symbol_pipe"; then - global_symbol_to_cdecl= -fi - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$hardcode_shlibpath_var" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$ac_t$hardcode_action" 1>&6 - - -reload_flag= -reload_cmds='$LD$reload_flag -o $output$reload_objs' -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 -# PORTME Some linkers may need a different reload flag. -reload_flag='-r' -echo "$ac_t$reload_flag" 1>&6 -test -n "$reload_flag" && reload_flag=" $reload_flag" - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -file_magic_cmd= -file_magic_test_file= -deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [regex]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given egrep regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case "$host_os" in -aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$major' - ;; - -aix4*) - version_type=linux - # AIX has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - # We preserve .a as extension for shared libraries though AIX4.2 - # and later linker supports .so - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' - shlibpath_var=LIBPATH - deplibs_check_method=pass_all - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - deplibs_check_method=pass_all - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - -bsdi4*) - version_type=linux - library_names_spec='${libname}.so$major ${libname}.so' - soname_spec='${libname}.so' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw*) - version_type=windows - need_version=no - need_lib_prefix=no - if test "$with_gcc" = yes; then - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' - else - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - fi - dynamic_linker='Win32 ld.exe' - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - file_magic_cmd='${OBJDUMP} -f' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case "$version_type" in - freebsd-elf*) - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - deplibs_check_method=unknown - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - case "$host_os" in - freebsd2* | freebsd3.[01]*) - shlibpath_overrides_runpath=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6*) - version_type=irix - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' - case "$host_os" in - irix5*) - libsuff= shlibsuff= - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case "$LD" in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib${libsuff}/libc.so*` - deplibs_check_method='pass_all' - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - -netbsd*) - version_type=sunos - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - ;; - -openbsd*) - version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no - fi - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - shlibpath_var=LD_LIBRARY_PATH - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method='file_magic COFF format alpha shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - deplibs_check_method='pass_all' - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" - file_magic_cmd=/usr/bin/file - file_magic_test_file=/lib/libc.so - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case "$host_vendor" in - ncr) - deplibs_check_method='pass_all' - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - esac - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" 1>&6 -test "$dynamic_linker" = no && can_build_shared=no - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in -# configure.in, otherwise build static only libraries. -case "$host_os" in -cygwin* | mingw* | os2*) - if test x$can_build_shared = xyes; then - test x$enable_win32_dll = xno && can_build_shared=no - echo "checking if package supports dlls... $can_build_shared" 1>&6 - fi -;; -esac - -if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then - case "$deplibs_check_method" in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - egrep "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac -fi - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4*) - test "$enable_shared" = yes && enable_static=no - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else -if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then - lt_cv_dlopen=no lt_cv_dlopen_libs= -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2170: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2207: checking for dlopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2251: checking for dld_link in -ldld" >&5 -ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2288: checking for shl_load" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -shl_load(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shl_load=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2333: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - -fi - - -fi - -fi - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - fi - - case "$lt_cv_dlopen" in - dlopen) -for ac_hdr in dlfcn.h; do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2395: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int fnord = 0; -EOF -ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -done - - if test "x$ac_cv_header_dlfcn_h" = xyes; then - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - fi - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2433: checking whether a program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self" 1>&6 - - if test "$lt_cv_dlopen_self" = yes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self_static=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self_static=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self_static=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 -fi - ;; - esac - - case "$lt_cv_dlopen_self" in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case "$lt_cv_dlopen_self_static" in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" -if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ltecho="$CONFIG_SHELL \$0 --fallback-echo" -fi -LTSHELL="$SHELL" - -LTCONFIG_VERSION="$VERSION" - -# Only quote variables if we're using ltmain.sh. -case "$ltmain" in -*.sh) - # Now quote all the things that may contain metacharacters. - for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ - AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ - file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case "$ltecho" in - *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - trap "$rm \"$ofile\"; exit 1" 1 2 15 - echo "creating $ofile" - $rm "$ofile" - cat < "$ofile" -#! $SHELL - -# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -### BEGIN LIBTOOL CONFIG -EOF - cfgfile="$ofile" - ;; - -*) - # Double-quote the variables that need it (for aesthetics). - for var in old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do - eval "$var=\\\"\$var\\\"" - done - - # Just create a config file. - cfgfile="$ofile.cfg" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - echo "creating $cfgfile" - $rm "$cfgfile" - cat < "$cfgfile" -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -EOF - ;; -esac - -cat <> "$cfgfile" -# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ -# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ -# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ -# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# The version of $progname that generated this script. -LTCONFIG_VERSION=$LTCONFIG_VERSION - -# Shell to use when invoking shell scripts. -SHELL=$LTSHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$ltecho - -# The archiver. -AR=$AR - -# The default C compiler. -CC=$CC - -# The linker used to build libraries. -LD=$LD - -# Whether we need hard or soft links. -LN_S=$LN_S - -# A BSD-compatible nm program. -NM=$NM - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$reload_flag -reload_cmds=$reload_cmds - -# How to pass a linker flag through the compiler. -wl=$wl - -# Object file suffix (normally "o"). -objext="$objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$pic_flag - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$compiler_c_o - -# Can we write directly to a .lo ? -compiler_o_lo=$compiler_o_lo - -# Must we lock files when doing compilation ? -need_locks=$need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$link_static_flag - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$RANLIB -old_archive_cmds=$old_archive_cmds -old_postinstall_cmds=$old_postinstall_cmds -old_postuninstall_cmds=$old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$old_archive_from_new_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$archive_cmds -archive_expsym_cmds=$archive_expsym_cmds -postinstall_cmds=$postinstall_cmds -postuninstall_cmds=$postuninstall_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$global_symbol_to_cdecl - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$hardcode_libdir_separator - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$include_expsyms - -EOF - -case "$ltmain" in -*.sh) - echo '### END LIBTOOL CONFIG' >> "$ofile" - echo >> "$ofile" - case "$host_os" in - aix3*) - cat <<\EOF >> "$ofile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # Append the ltmain.sh script. - sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) - - chmod +x "$ofile" - ;; - -*) - # Compile the libtool program. - echo "FIXME: would compile $ltmain" - ;; -esac - -test -n "$cache_file" || exit 0 - -# AC_CACHE_SAVE -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: Index: xc/extras/FreeType/ltmain.sh diff -u xc/extras/FreeType/ltmain.sh:1.1.1.2 xc/extras/FreeType/ltmain.sh:removed --- xc/extras/FreeType/ltmain.sh:1.1.1.2 Sat Feb 12 23:54:46 2000 +++ xc/extras/FreeType/ltmain.sh Wed Mar 16 20:59:26 2005 @@ -1,3975 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -# Parse our command line options once, thoroughly. -while test $# -gt 0 -do - arg="$1" - shift - - case "$arg" in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - execute_dlfiles) - eval "$prev=\"\$$prev \$arg\"" - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - exit 0 - ;; - - --config) - sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 - exit 0 - ;; - - --debug) - echo "$progname: enabling shell trace mode" - set -x - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case "$nonopt" in - *cc | *++ | gcc* | *-gcc*) - mode=link - for arg - do - case "$arg" in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case "$mode" in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - lastarg= - srcfile="$nonopt" - suppress_output= - - user_target=no - for arg - do - # Accept any command-line options. - case "$arg" in - -o) - if test "$user_target" != "no"; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit 1 - fi - user_target=next - ;; - - -static) - build_old_libs=yes - continue - ;; - esac - - case "$user_target" in - next) - # The next one is the -o target name - user_target=yes - continue - ;; - yes) - # We got the output file - user_target=set - libobj="$arg" - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly in scan - # sets, so we specify it separately. - case "$lastarg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - case "$user_target" in - set) - ;; - no) - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - *) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit 1 - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSfmso]' - case "$libobj" in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case "$libobj" in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit 1 - ;; - esac - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $libobj" - else - removelist="$libobj" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit 1" 1 2 15 - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit 1" 1 2 15 - else - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until ln "$0" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - echo $srcfile > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $pic_flag -DPIC $srcfile" - if test "$build_old_libs" = yes; then - lo_libobj="$libobj" - dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$libobj"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - - if test -d "$dir"; then - $show "$rm $libobj" - $run $rm $libobj - else - $show "$mkdir $dir" - $run $mkdir $dir - status=$? - if test $status -ne 0 && test ! -d $dir; then - exit $status - fi - fi - fi - if test "$compiler_o_lo" = yes; then - output_obj="$libobj" - command="$command -o $output_obj" - elif test "$compiler_c_o" = yes; then - output_obj="$obj" - command="$command -o $output_obj" - fi - - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed, then go on to compile the next one - if test x"$output_obj" != x"$libobj"; then - $show "$mv $output_obj $libobj" - if $run $mv $output_obj $libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # If we have no pic_flag, then copy the object into place and finish. - if test -z "$pic_flag" && test "$build_old_libs" = yes; then - # Rename the .lo from within objdir to obj - if test -f $obj; then - $show $rm $obj - $run $rm $obj - fi - - $show "$mv $libobj $obj" - if $run $mv $libobj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - - # Now arrange that obj and lo_libobj become the same file - $show "$LN_S $obj $lo_libobj" - if $run $LN_S $obj $lo_libobj; then - exit 0 - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - command="$base_compile $srcfile" - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - output_obj="$obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed - if test x"$output_obj" != x"$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Create an invalid libtool object if no PIC, so that we do not - # accidentally link it into a program. - if test "$build_libtool_libs" != yes; then - $show "echo timestamp > $libobj" - $run eval "echo timestamp > \$libobj" || exit $? - else - # Move the .lo from within objdir - $show "$mv $libobj $lo_libobj" - if $run $mv $libobj $lo_libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - fi - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $rm "$lockfile" - fi - - exit 0 - ;; - - # libtool link mode - link) - modename="$modename: link" - C_compiler="$CC" # save it, to compile generated C sources - CC="$nonopt" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invokation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments -# /* impgen.c starts here */ -# /* Copyright (C) 1999 Free Software Foundation, Inc. -# -# This file is part of GNU libtool. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# */ -# -# #include /* for printf() */ -# #include /* for open(), lseek(), read() */ -# #include /* for O_RDONLY, O_BINARY */ -# #include /* for strdup() */ -# -# static unsigned int -# pe_get16 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[2]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 2); -# return b[0] + (b[1]<<8); -# } -# -# static unsigned int -# pe_get32 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[4]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 4); -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# static unsigned int -# pe_as32 (ptr) -# void *ptr; -# { -# unsigned char *b = ptr; -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# int -# main (argc, argv) -# int argc; -# char *argv[]; -# { -# int dll; -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -# unsigned long export_rva, export_size, nsections, secptr, expptr; -# unsigned long name_rvas, nexp; -# unsigned char *expdata, *erva; -# char *filename, *dll_name; -# -# filename = argv[1]; -# -# dll = open(filename, O_RDONLY|O_BINARY); -# if (!dll) -# return 1; -# -# dll_name = filename; -# -# for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; -# -# pe_header_offset = pe_get32 (dll, 0x3c); -# opthdr_ofs = pe_header_offset + 4 + 20; -# num_entries = pe_get32 (dll, opthdr_ofs + 92); -# -# if (num_entries < 1) /* no exports */ -# return 1; -# -# export_rva = pe_get32 (dll, opthdr_ofs + 96); -# export_size = pe_get32 (dll, opthdr_ofs + 100); -# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -# secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); -# -# expptr = 0; -# for (i = 0; i < nsections; i++) -# { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } -# } -# -# expdata = (unsigned char*)malloc(export_size); -# lseek (dll, expptr, SEEK_SET); -# read (dll, expdata, export_size); -# erva = expdata - export_rva; -# -# nexp = pe_as32 (expdata+24); -# name_rvas = pe_as32 (expdata+32); -# -# printf ("EXPORTS\n"); -# for (i = 0; i&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - fi - build_libtool_libs=no - build_old_libs=yes - prefer_static_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test $# -gt 0; do - arg="$1" - shift - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case "$prev" in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case "$arg" in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit 1 - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case "$arg" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi - - prevarg="$arg" - - case "$arg" in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: not more than one -exported-symbols argument allowed" - exit 1 - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" - fi - dir="$absdir" - ;; - esac - case " $deplibs " in - *" $arg "*) ;; - *) deplibs="$deplibs $arg";; - esac - case " $lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir";; - esac - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - case ":$dllsearchpath:" in - ::) dllsearchpath="$dllsearchdir";; - *":$dllsearchdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dllsearchdir";; - esac - ;; - esac - ;; - - -l*) - if test "$arg" = "-lc"; then - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # These systems don't actually have c library (as such) - continue - ;; - esac - elif test "$arg" = "-lm"; then - case "$host" in - *-*-cygwin* | *-*-beos*) - # These systems don't actually have math library (as such) - continue - ;; - esac - fi - deplibs="$deplibs $arg" - ;; - - -module) - module=yes - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -o) prev=output ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # If we have no pic_flag, then this is the same as -all-static. - if test -z "$pic_flag" && test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - - *.o | *.obj | *.a | *.lib) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A library object. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` - prev= - fi - libobjs="$libobjs $arg" - ;; - - *.la) - # A libtool-controlled library. - - dlname= - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 - exit 1 - fi - - # If the library was installed with an old release of libtool, - # it will not redefine variable installed. - installed=yes - - # Read the .la file - # If there is no directory component, then add one. - case "$arg" in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` - - if test "X$installed" = Xyes; then - dir="$libdir" - else - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - fi - - if test -n "$dependency_libs"; then - # Extract -R and -L from dependency_libs - temp_deplibs= - for deplib in $dependency_libs; do - case "$deplib" in - -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - case " $rpath $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - -L*) case "$compile_command $temp_deplibs " in - *" $deplib "*) ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` - case " $lib_search_path " in - *" $temp_dir "*) ;; - *) lib_search_path="$lib_search_path $temp_dir";; - esac - ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - done - dependency_libs="$temp_deplibs" - fi - - if test -z "$libdir"; then - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - deplibs="$deplibs$dependency_libs" - compile_command="$compile_command $dir/$old_library$dependency_libs" - finalize_command="$finalize_command $dir/$old_library$dependency_libs" - continue - fi - - # This library was specified with -dlopen. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking statically, - # we need to preload. - prev=dlprefiles - else - # We should not create a dependency on this library, but we - # may need any libraries it requires. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - prev= - continue - fi - fi - - # The library was specified with -dlpreopen. - if test "$prev" = dlprefiles; then - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - dlprefiles="$dlprefiles $dir/$old_library" - else - dlprefiles="$dlprefiles $dir/$linklib" - fi - prev= - fi - - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - link_against_libtool_libs="$link_against_libtool_libs $arg" - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - - # We need an absolute path. - case "$dir" in - [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" - fi - ;; - esac - - # This is the magic to use -rpath. - # Skip directories that are in the system default run-time - # search path, unless they have been requested with -R. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - - lib_linked=yes - case "$hardcode_action" in - immediate | unsupported) - if test "$hardcode_direct" = no; then - compile_command="$compile_command $dir/$linklib" - deplibs="$deplibs $dir/$linklib" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - if test -n "$dllsearchpath"; then - dllsearchpath="$dllsearchpath:$dllsearchdir" - else - dllsearchpath="$dllsearchdir" - fi - ;; - esac - elif test "$hardcode_minus_L" = no; then - case "$host" in - *-*-sunos*) - compile_shlibpath="$compile_shlibpath$dir:" - ;; - esac - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = no; then - case ":$compile_shlibpath:" in - *":$dir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$dir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - relink) - if test "$hardcode_direct" = yes; then - compile_command="$compile_command $absdir/$linklib" - deplibs="$deplibs $absdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$compile_command " in - *" -L$absdir "*) ;; - *) compile_command="$compile_command -L$absdir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$absdir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$compile_shlibpath:" in - *":$absdir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$absdir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - *) - lib_linked=no - ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 - fi - - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - finalize_command="$finalize_command $libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$finalize_command " in - *" -L$libdir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$finalize_shlibpath:" in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:";; - esac - finalize_command="$finalize_command -l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - fi - else - # Transform directly to old archives if we don't build new libraries. - if test -n "$pic_flag" && test -z "$old_library"; then - $echo "$modename: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - else - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$dir";; - esac - finalize_command="$finalize_command -l$name" - fi - fi - - # Add in any libraries that this one depends upon. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - esac - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - case "$output" in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *.a | *.lib) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - ;; - - *.la) - # Make sure we only generate libraries of the form `libNAME.la'. - case "$outputname" in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - if test -n "$objs"; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 - exit 1 - fi - - # How the heck are we supposed to write a wrapper for a shared library? - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 - exit 1 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test $# -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - libext=al - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - dependency_libs="$deplibs" - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - current="$2" - revision="$3" - age="$4" - - # Check that each of the things are valid numbers. - case "$current" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case "$version_type" in - none) ;; - - irix) - major=`expr $current - $age + 1` - versuffix="$major.$revision" - verstring="sgi$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test $loop != 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="sgi$major.$iface:$verstring" - done - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test $loop != 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - windows) - # Like Linux, but with '-' rather than '.', since we only - # want one extension on Windows 95. - major=`expr $current - $age` - versuffix="-$major-$age-$revision" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - verstring="0.0" - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - dependency_libs="$deplibs" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *) - # Add libc to deplibs on all other systems. - deplibs="$deplibs -lc" - ;; - esac - fi - - # Create the output directory, or remove our outputs if we need to. - if test -d $output_objdir; then - $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" - $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* - else - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - if test "$build_libtool_libs" = yes; then - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case "$deplibs_check_method" in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behaviour. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | sed 's/.* -> //'` - case "$potliblink" in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | sed 10q \ - | egrep "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | - grep . >/dev/null; then - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - echo "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - lib="$output_objdir/$realname" - for link - do - linknames="$linknames $link" - done - - # Ensure that we have .o objects for linkers which dislike .lo - # (e.g. aix) incase we are running --disable-static - for obj in $libobjs; do - oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` - if test ! -f $oldobj; then - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? - fi - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linkopts="$linkopts $flag" - fi - - # Do each of the archive commands. - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - *.lo | *.o | *.obj) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case "$output" in - *.lo) - if test -n "$objs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - # Create the old-style object. - reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" - - output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - $show "echo timestamp > $libobj" - $run eval "echo timestamp > $libobj" || exit $? - exit 0 - fi - - if test -n "$pic_flag"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - else - # Just create a symlink. - $show $rm $libobj - $run $rm $libobj - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj || exit $? - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - ;; - - # Anything else should be a program. - *) - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$compile_rpath " in - *" $libdir "*) ;; - *) compile_rpath="$compile_rpath $libdir" ;; - esac - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - # Create the binary in the object directory, then wrap it. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case "$dlsyms" in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" - $run $rm $export_symbols - $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - else - $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`echo "$arg" | sed -e 's%^.*/%%'` - $run eval 'echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{\ -" - - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case "$host" in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case "$0" in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`echo $output|sed 's,.exe$,,'` ;; - esac - $rm $output - trap "$rm $output; exit 1" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - link_against_libtool_libs='$link_against_libtool_libs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - echo >> $output "\ - program=lt-'$outputname' - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if (cd \"\$thisdir\" && eval \$relink_command); then : - else - $rm \"\$progdir/\$file\" - exit 1 - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - echo >> $output "\ - program='$outputname$exeext' - progdir=\"\$thisdir/$objdir\" -" - fi - - echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - *-*-cygwin* | *-*-mingw | *-*-os2*) - # win32 systems need to use the prog path for dll - # lookup to work - $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} -" - ;; - *) - $echo >> $output "\ - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` - done - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else - # Ensure that we have .o objects in place incase we decided - # not to build a shared library, and have fallen back to building - # static libs even though --disable-static was passed! - for oldobj in $oldobjs; do - if test ! -f $oldobj; then - obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"` - $show "${LN_S} $obj $oldobj" - $run ${LN_S} $obj $oldobj || exit $? - fi - done - - eval cmds=\"$old_archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case "$output" in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - if test -n "$xrpath"; then - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - done - dependency_libs="$temp_xrpath $dependency_libs" - fi - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - fi - $rm $output - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$dlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Directory that this library needs to be installed in: -libdir='$install_libdir'\ -" - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? - ;; - esac - exit 0 - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg="$nonopt" - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest="$arg" - continue - fi - - case "$arg" in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -s) - stripme=" -s" - continue - ;; - -*) ;; - - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest="$arg" - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - fi - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case "$file" in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case "$file" in - *.a | *.lib) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - library_names= - old_library= - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$realname $destdir/$realname" - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? - - if test $# -gt 0; then - # Delete the old symlinks, and create new ones. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case "$destfile" in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.o | *.obj) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit 0 - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - link_against_libtool_libs= - relink_command= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$link_against_libtool_libs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - fi - - finalize=yes - for lib in $link_against_libtool_libs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case "$lib" in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit 0 - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - echo " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "----------------------------------------------------------------------" - exit 0 - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit 1 - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - dir= - case "$file" in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case "$file" in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 - else - # Display what would be done. - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - $echo "$cmd$args" - exit 0 - fi - ;; - - # libtool uninstall mode - uninstall) - modename="$modename: uninstall" - rm="$nonopt" - files= - - for arg - do - case "$arg" in - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - rmfiles="$file" - - case "$name" in - *.la) - # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $dir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" - - $show "$rm $rmfiles" - $run $rm $rmfiles - - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - # FIXME: should reinstall the best remaining shared library. - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" - fi - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - - *) - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - esac - done - exit 0 - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 -fi # test -z "$show_help" - -# We need to display help for each of the modes. -case "$mode" in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --version print version information - -MODE must be one of the following: - - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: Index: xc/extras/FreeType/mkinstalldirs diff -u xc/extras/FreeType/mkinstalldirs:1.3 xc/extras/FreeType/mkinstalldirs:removed --- xc/extras/FreeType/mkinstalldirs:1.3 Tue Oct 21 14:10:05 2003 +++ xc/extras/FreeType/mkinstalldirs Wed Mar 16 20:59:26 2005 @@ -1,41 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# Id: mkinstalldirs,v 1.2 1998/09/01 16:52:17 werner Exp $ -# $XFree86: xc/extras/FreeType/mkinstalldirs,v 1.3 2003/10/21 18:10:05 tsi Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here Index: xc/extras/FreeType/net.m4 diff -u xc/extras/FreeType/net.m4:1.2 xc/extras/FreeType/net.m4:removed --- xc/extras/FreeType/net.m4:1.2 Tue Oct 21 14:10:06 2003 +++ xc/extras/FreeType/net.m4 Wed Mar 16 20:59:26 2005 @@ -1,56 +0,0 @@ -dnl -dnl The following was written by jhawk@mit.edu -dnl -dnl AC_LIBRARY_NET: Id: net.m4,v 1.4 1997/10/25 20:49:53 jhawk Exp -dnl $XFree86: xc/extras/FreeType/net.m4,v 1.2 2003/10/21 18:10:06 tsi Exp $ -dnl -dnl This test is for network applications that need socket() and -dnl gethostbyname() -ish functions. Under Solaris, those applications need to -dnl link with "-lsocket -lnsl". Under IRIX, they should *not* link with -dnl "-lsocket" because libsocket.a breaks a number of things (for instance: -dnl gethostbyname() under IRIX 5.2, and snoop sockets under most versions of -dnl IRIX). -dnl -dnl Unfortunately, many application developers are not aware of this, and -dnl mistakenly write tests that cause -lsocket to be used under IRIX. It is -dnl also easy to write tests that cause -lnsl to be used under operating -dnl systems where neither are necessary (or useful), such as SunOS 4.1.4, which -dnl uses -lnsl for TLI. -dnl -dnl This test exists so that every application developer does not test this in -dnl a different, and subtly broken fashion. -dnl -dnl It has been argued that this test should be broken up into two seperate -dnl tests, one for the resolver libraries, and one for the libraries necessary -dnl for using Sockets API. Unfortunately, the two are carefully intertwined and -dnl allowing the autoconf user to use them independantly potentially results in -dnl unfortunate ordering dependancies -- as such, such component macros would -dnl have to carefully use indirection and be aware if the other components were -dnl executed. Since other autoconf macros do not go to this trouble, and almost -dnl no applications use sockets without the resolver, this complexity has not -dnl been implemented. -dnl -dnl The check for libresolv is in case you are attempting to link statically -dnl and happen to have a libresolv.a lying around (and no libnsl.a). -dnl -AC_DEFUN(AC_LIBRARY_NET, [ - # Most operating systems have gethostbyname() in the default searched - # libraries (i.e. libc): - AC_CHECK_FUNC(gethostbyname, , - # Some OSes (eg. Solaris) place it in libnsl: - AC_CHECK_LIB(nsl, gethostbyname, , - # Some strange OSes (SINIX) have it in libsocket: - AC_CHECK_LIB(socket, gethostbyname, , - # Unfortunately libsocket sometimes depends on libnsl. - # AC_CHECK_LIB's API is essentially broken so the following - # ugliness is necessary: - AC_CHECK_LIB(socket, gethostbyname, - LIBS="-lsocket -lnsl $LIBS", - AC_CHECK_LIB(resolv, gethostbyname), - -lnsl) - ) - ) - ) - AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, , - AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))) - ]) Index: xc/extras/FreeType/readme.1st diff -u xc/extras/FreeType/readme.1st:1.1.1.3 xc/extras/FreeType/readme.1st:removed --- xc/extras/FreeType/readme.1st:1.1.1.3 Sat Feb 12 23:54:47 2000 +++ xc/extras/FreeType/readme.1st Wed Mar 16 20:59:26 2005 @@ -1,10 +0,0 @@ - - DISCLAIMER - - - PLEASE READ THE FILE `PATENTS' BEFORE ANYTHING ELSE! IT - CONTAINS *CRITICAL* INFORMATION REGARDING THE FREE USE OF THIS - LIBRARY. - - ---- end of readme.1st --- Index: xc/extras/FreeType/contrib/ftos2/DEVELFAQ diff -u xc/extras/FreeType/contrib/ftos2/DEVELFAQ:1.1.1.1 xc/extras/FreeType/contrib/ftos2/DEVELFAQ:removed --- xc/extras/FreeType/contrib/ftos2/DEVELFAQ:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/DEVELFAQ Wed Mar 16 20:59:26 2005 @@ -1,38 +0,0 @@ - - This is a FreeType/2 programmers' mini-FAQ - -Q1: Is the source code available? - -A1: Yes! But if you think you have all you need, you're probably wrong :-) - The source is now actually part of FreeType project, located at - ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype - - We have now the permission to distribute the OS/2 IFI headers with - the FreeType/2 source code. They're all the files beginning with a - "32" in the "ifi" directory. It seems that some people had problems - with the download indicated in the last beta. - - -Q2: What compilers are supported? - -A2: The development of FreeType/2 was done primarily in IBM's VisualAge C++ - version 3.0. It should be possible to build the DLL with Watcom C/C++ but - it's not quite working yet. - It is perhaps possible to build the Font Driver with another compiler, - but you'll have to know the compiler (and OS/2 of course) _quite_ well. - - Note that the FreeType library itself supports also EMX/GCC (and I - believe it was mainly developed in it). - - -Q3: What other tools do I need? - -A3: You'll need a kernel debugger. Check out IBM's ICAT, it's great and - it's free! Actually without ICAT this code would probably never happen. - If you've lived under a rock and don't know what ICAT is, it's actually - an interface to ol' good KDB. It is a source-level debugger and it looks - and feels very much like the VisualAge debugger, IPMD. - - And if you haven't got it yet, you'll need _two_ computers to use ICAT. - But believe me, it's worth it! - Index: xc/extras/FreeType/contrib/ftos2/FAQ diff -u xc/extras/FreeType/contrib/ftos2/FAQ:1.1.1.1 xc/extras/FreeType/contrib/ftos2/FAQ:removed --- xc/extras/FreeType/contrib/ftos2/FAQ:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/FAQ Wed Mar 16 20:59:26 2005 @@ -1,260 +0,0 @@ -This is a FreeType/2 users' mini-FAQ - -Table of Contents: - -Q1: Where can I find the latest FreeType/2 release? -Q2: Now that I have FreeType/2 installed, how do I actually add TrueType -fonts to OS/2? -Q3: When will you add font-smoothing to the DLL? I really want that! -Q4: Why does IBM's TrueType engine do such a poor job? -Q5: But there are still differences with the glyphs produced by Windows or -the Mac, right? -Q6: I've got TrueType Times New Roman installed but the system still seems -to be using the original ATM (Type 1) font. Why this odd behaviour? -Q7: I noticed it takes a second or two before the Font Palette object opens -for the first time. Why? -Q8: I noticed the characters sometimes have odd spacing. When will you fix -it? -Q9: Could you explain the open fonts limit? -Q10: Can you recommend some fonts to use? -Q11: What's a 'broken glyph'? -Q12: Why do some fonts appear twice, once starting with an '@'? -Q13: I've got a Chinese (Japanese, Korean) font but the characters aren't -there! Why? -Q14: I tried to use a DBCS font but I got an exception un UCONV.DLL. What's -wrong? -Q15: My system won't boot after I installed FreeType/2 and the uninstall -script won't work when I boot to command line. What now? -Q16: I'm upgrading from previous version and I don't want to uninstall and -reinstall. Is there any other way? -Q17: What's this stuff about Times New Roman being aliased to Tms Rmn? -Please explain this. - -Questions & Answers: - -Q1: Where can I find the latest FreeType/2 release? - -A1: Links to the latest release can be found at the FreeType/2 homepage at -http://www.freetype.org/ft_os2/index.html. - -Q2: Now that I have FreeType/2 installed, how do I actually add TrueType -fonts to OS/2? - -A2: I thought everyone knew that... It's simple, really. Open the Font -Palette object (in System Setup folder) then click 'Edit font' and 'Add'. -Now type the directory path where your TrueType fonts reside, such as -'C:\WINDOWS\FONTS' if you have Win95 and click 'Add'. You'll be presented a -list of all fonts that OS/2 found in specified directory. Simply select all -fonts you wish to install click 'Add' for the last time. If you wish to -remove fonts, just use the 'Delete' button in the 'Edit Font' dialog. -TIP: If you wish to add font to OS/2 but don't want to actually copy the -file, just type the directory name where the font files already are instead -of 'X:\PSFONTS' in the 'Add New Fonts' dialog. - -Q3: When will you add font-smoothing to the DLL? I really want that! - -A3: Short answer: We can't. -Long answer: The FreeType library already supports font-smoothing (or -antialiasing or grayscaling). The problem is that OS/2's font engine, in -its current incarnation, doesn't know anything about anti-aliased text and -is only able to manage monochrome bitmaps. Font smoothing support would -require some changes of PM/GPI/GRE components, which certainly is out of -our scope, and isn't planned by IBM (to our knowledge) in foreseeable -future, if ever. - -If you really need font smoothing in your application, you can still use -the FreeType library itself. Be warned that it is a rather low-level engine -and that you'll need to add a various number of text features on top of -this code to get the equivalent of PM's font API. - -There is a good chance that FreeType 2.0 will ease the pain for developers -when it's available. - -And if you really want font smoothing in OS/2, ask IBM! - -Q4: Why does IBM's TrueType engine do such a poor job? - -A4: It'd be easy to throw one or two stones at IBM's engineers if this was -the result of lazy coding or bad software engineering. However, the problem -is more complex, and PSP programmers deserve little, if any, blame. - -Trouble is that the TrueType specification, which can be found both on -Microsoft and Apple sites, has severe lacks, as well as particularly fuzzy -definitions. Part of the TT spec is the TrueType bytecode specification. -This bytecode is used to write glyph programs that are used to explicitely -hint each glyph to have it rendered perfectly on the screen (and on -printers). It is made of approximately 200 opcodes, which relate to moving -points on a pixel grid, measuring distances in any kind of direction, -keeping widths and heights consistent across a single font, etc.. - -Some of these opcodes are simply un-documented, or lack precise and -important details related to their exact implementation. As a consequence, -when FreeType started, it's first bytecode interpreter exhibited results -which were very similar to OS/2's one (i.e. bad baseline, incoherent -widths, "swashs" and bad serifs, etc..). There are several commercial -engines which provide the same kind of "erroneous" output, like the one in -the BeOS for instance. - -It took FreeType developers _many_ months and experimentation to discover -the real meaning of some opcodes, and incorporate it into the library. This -"spelunker" work has been painful and slow, which is why few commercial -companies, if any, dared to do it, but it finally pays off ! Moreover, the -FreeType library is released under a BSD-like free license. This means that -_anyone_ is now able to take the work that has been done to rewrite or fix -his own TrueType interpreter. (Of course, another good idea is to use -FreeType as your core TrueType engine, to be able to benefit to ongoing -fixes and "undocumented features" discoveries, etc...) - -Q5: But there are still differences with the glyphs produced by Windows or -the Mac, right? - -A5: Right. Another feature of the TrueType specification is to use fixed -float pixel coordinates. When measuring distances along diagonals, some -rouding error usually occur. Also, some TrueType opcodes have a more or -less "chaotic" behaviour, where a ridiculous difference in inputs can -produce vastly different results. These factors mean that the only way to -match bit-to-bit the glyphs produced by Windows or the Macintosh is to -implement the _exact_ same computation routines, and reproduce all their -rounding errors ! As FreeType is a clean-room implementation, this will -never be possible. Note that the bitmaps match in 95% cases, at least, and -that there are already differences between the Win 3.1 and Win95 TrueType -renderers (i.e. look at the "m" of Arial at size 8 for example). - -The FreeType team tries very hard to "catch" differences, but there is a -point where this just isn't possible... However, we're very satisfied with -its current quality, and we hope you'll be too :-) - -Q6: I've got TrueType Times New Roman installed but the system still seems -to be using the original ATM (Type 1) font. Why this odd behaviour? - -A6: It seems in case of a name clash OS/2 is using the font that was -installed later. Try removing and reinstalling the TrueType font. -Alternately remove the ATM (Type 1) font (not recommended). -Experiments also suggest that different apps behave differently. Some apps -will for example show both fonts but will use only one of them anyway. It -really depends. - -Q7: I noticed it takes a second or two before the Font Palette object opens -for the first time. Why? - -A7: Because FreeType/2 postpones as much work on the fonts as possible -until it's really needed. This means the first opening of a font is a bit -slower. But it also means no resources are unnecessarily wasted. And it's -not really that bad :-) This behaviour is also noticeable when e.g. opening -a document for the first time. Note that subsequent openings are OK because -OS/2 caches as much information as possible. - -Q8: I noticed the characters sometimes have odd spacing. When will you fix -it? - -A8: I won't. It's not really a bug, it's a feature. If they weren't spaced -'oddly', the result might look better, but only at the cost of -Windows-style 'WYSIWYG', i.e. what you see on screen will almost certainly -look totally different on any other device. Anyway, the spacing is -controlled by OS/2 and not by the Font Driver itself, so if you still don't -like it, IBM is the right one to ask :-) - -This problem is particularly visible in Netscape. Most probably this -happens because Netscape tries to use fractional pointsizes, but most -TrueType fonts don't allow that. This means that Netscape sometimes -positions characters as if they were e.g. 8.6 points while their actual -size is only 8 points. - -Q9: Could you explain the open fonts limit? - -A9: Sure. If you install 50 fonts in OS/2, the system opens them all at -startup and keeps them open until shutdown. While many users may want to -have large number of fonts installed (like me), very few of them probably -use all the fonts all the time. This of course wastes lots of memory and -swap space. Just for your information, normal fonts take up 30-50 K of -memory with FreeType/2, but for example Times New Roman MT 30 takes over -500K! - -FreeType/2 overcomes this problem by only actually keeping in memory the -last n most recently used fonts. The actual number is settable via entry in -OS2.INI and there's an simple REXX script to do that. Good default might be -10-15 fonts, depending what you want to do with them. - -Note that this process is totally transparent to the system. You won't have -to do anything, FreeType/2 will take care of everything. The only things -you will notice is dramatically reduced memory consumption and when working -with large numbers of fonts there may be slight delay when reopening a -font. - -Q10: Can you recommend some fonts to use? - -A10: Yes! I recommend to use Micro$oft's (oh no!) Core Fonts - Times New -Roman, Arial and Courier New, plus other MS fonts. There are several -reasons: the fonts have very good quality, stick to the TrueType spec prety -well, support many countries and are widely available. Moreover they're -free. You can certainly find some Win95 or NT machine in your neighbourhood -(all too easily I'm afraid). They should also be available from MS's Web -site. -Note: If you want to copy the fonts from a Win95 machine, they're in -\WINDOWS\FONTS. Watch out, the directory is hidden! - -Q11: What's a 'broken glyph'? - -A11: Some fonts contain buggy or 'broken' glyphs that cannot be reliably -loaded and rendered. Those glyphs are usually very rarely used so you might -never notice. There was a problem with the first Beta of FreeType/2 that if -there was a single broken glyph in a font, the -whole font didn't work. - -Q12: Why do some fonts appear twice, once starting with an '@'? - -A12: It's because of DBCS systems. If you don't have one, you can safely -ignore these fonts. The DBCS characters in them are rotated 90 degrees -counterclockwise. It allows you to write vertical text (e.g. Chinese) with -a normal word processor. You write the text horizontally but if you turn -the resulting page 90 degrees clockwise, you've got vertical text. -It's not working perfectly yet. - -Q13: I've got a Chinese (Japanese, Korean) font but the characters aren't -there! Why? - -A13: Most probably the font and your system settings don't mix. One -possible cause is that your country setting is different than that of the -font and the font contains no information about what language it's meant -for. In that case, FreeType/2 has to guess from your country setting. This -means it might try to treat e.g. Japanese font as a Korean one which means -you won't be able to access the Japanese characters in it. It's all a bit -more complicated but it's a result of how national language support is done -in OS/2. - -Q14: I tried to use a DBCS font but I got an exception un UCONV.DLL. What's -wrong? - -A14: UCONV.DLL it used for character code translation. A likely cause is -that you are missing the required translation table in \LANGUAGE\CODEPAGE -directory on your boot drive. Look for file named 'IBM', where is -the codepage you use, e.g. IBM950 for Taiwan or IBM949 for Korea. - -Q15: My system won't boot after I installed FreeType/2 and the uninstall -script won't work when I boot to command line. What now? - -A15: But you've archived the key files, haven't you? If not, one way out of -this mess is booting to command line and renaming or deleting FREETYPE.DLL -from \OS2\DLL. Your system should boot then. - -Q16: I'm upgrading from previous version and I don't want to uninstall and -reinstall. Is there any other way? - -A16: Yes! There's a little utility called REPMOD.EXE which allows you to -replace files that are in use. In case you don't already have it, it's -included in the FreeType/2 package. You should simply run UPDATE.CMD. The -new version will be used on next reboot. - -Q17: What's this stuff about Times New Roman being aliased to Tms Rmn? -Please explain this. - -A17: OS/2 contains bitmap font called Tms Rmn which is often used in dialog -windows and elsewhere. The bitmap font contains only several pointsizes (8, -10, 12, 14, 18, 24). If you request a missing pointsize, OS/2's graphics -engine (GRE) substitutes it from the (outline) ATM font Times New Roman -which can also be referred to as Roman/Tms Rmn. Now FreeType/2 mimics this -functionality and can fully replace the ATM version. I recommend to -uninstall the ATM font since if both fonts are installed, some apps use the -ATM one, others TrueType one, without any apparent logic. If you uninstall -(via Font Palette) the ATM version, you will always get high-quality -TrueType Times New Roman. Index: xc/extras/FreeType/contrib/ftos2/install.cmd diff -u xc/extras/FreeType/contrib/ftos2/install.cmd:1.1.1.1 xc/extras/FreeType/contrib/ftos2/install.cmd:removed --- xc/extras/FreeType/contrib/ftos2/install.cmd:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/install.cmd Wed Mar 16 20:59:26 2005 @@ -1,30 +0,0 @@ -/* */ -call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" -call SysLoadFuncs - - -say "Warning: This is your last chance to back out. If you do not wish to" -say "continue, please just press ENTER. Otherwise please type ""yes""" - -pull letter -if letter <> "YES" then exit - -/* Find drive where OS/2 is installed */ -bootdrive = SysSearchPath('PATH', 'OS2.INI') -/* say os2path */ -bootdrive = left(bootdrive, 2) - -copy "FREETYPE.DLL " || bootdrive || "\os2\dll" -if rc <> 0 then do - say "Error: Could not copy file!" - pause - exit -end - -app = "PM_Font_Drivers" -key = "TRUETYPE" -val = "\OS2\DLL\FREETYPE.DLL" || d2c(0) - -SysIni('BOTH', app, key, val) -say "Font Driver is installed. Please reboot." -pause Index: xc/extras/FreeType/contrib/ftos2/limit.cmd diff -u xc/extras/FreeType/contrib/ftos2/limit.cmd:1.1.1.1 xc/extras/FreeType/contrib/ftos2/limit.cmd:removed --- xc/extras/FreeType/contrib/ftos2/limit.cmd:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/limit.cmd Wed Mar 16 20:59:26 2005 @@ -1,63 +0,0 @@ -/* */ -call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" -call SysLoadFuncs - -Parse Upper Arg a1 a2 - -app = "FreeType/2" -key = "OPENFACES" - -if Arg() = 0 then call usage - -if a1 = 'Q' then call query - -if a1 = 'S' then call set -call usage - -set: - -val = a2 - -if val = '' then do - say 'Invalid limit!' - exit -end - -if val < 8 then do - say 'The lowest acceptable limit is 8!' - pause - exit -end - -szval = val || d2c(0) - -rc = SysIni('USER', app, key, szval) -say rc -if rc = 'ERROR:' then do - say 'Error updating OS2.INI!' - pause - exit -end - -say "Open faces limit updated to " || val || ". Please reboot to activate changes." -pause -exit - -query: -val = SysIni('USER', app, key) -if val = "ERROR:" then val = "not set" -/* strip the terminating NULL character */ -else val = substr(val, 1, pos(d2c(0), val) - 1) - -say 'The current open faces limit is ' || val -pause -exit - -usage: -say 'This program is used to set the limit of concurrently open typefaces for' -say 'FreeType/2. Use lower numbers to limit memory consumption and higher to' -say 'improve performance if you use lots of fonts.' -say -say 'Usage: LIMIT q - query the current limit' -say ' LIMIT s - set limit to (effective on next reboot).' -pause Index: xc/extras/FreeType/contrib/ftos2/query.cmd diff -u xc/extras/FreeType/contrib/ftos2/query.cmd:1.1.1.1 xc/extras/FreeType/contrib/ftos2/query.cmd:removed --- xc/extras/FreeType/contrib/ftos2/query.cmd:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/query.cmd Wed Mar 16 20:59:26 2005 @@ -1,15 +0,0 @@ -/* */ -call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" -call SysLoadFuncs - -app = "PM_Font_Drivers" -key = "TRUETYPE" - -val = SysIni('USER', app, key) - -if val = "ERROR:" then val = "none" -/* strip the terminating NULL character */ -else val = substr(val, 1, pos(d2c(0), val) - 1) - -say 'The current TrueType driver is ' || val -pause Index: xc/extras/FreeType/contrib/ftos2/readme.1st diff -u xc/extras/FreeType/contrib/ftos2/readme.1st:1.1.1.1 xc/extras/FreeType/contrib/ftos2/readme.1st:removed --- xc/extras/FreeType/contrib/ftos2/readme.1st:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/readme.1st Wed Mar 16 20:59:27 2005 @@ -1,87 +0,0 @@ -This is the source code from the FreeType/2 OS/2 font driver. -Copyright (C) 1997-1998 Michal Necasek (mike@mendelu.cz). - -Here's a description of the files in this package : - - readme.1st This file - - readme.txt The FreeType/2 Readme - - FAQ The FreeType/2 user faq - - DEVELFAQ The FreeType/2 developer faq. Read it before trying to - compile this program - - install.cmd The FreeType/2 installation script - uninstall.cmd The FreeType/2 uninstallation script - query.cmd A script used to query the name of the current font driver - - limit.cmd The driver controls the number of font files it keeps - opened at the same time, in order to save system resources - and memory (of course, this _doesn't_ limit the number of - opened fonts in PM, it just saves a _lot_ of memory when - many fonts are installed on your system). - - This script let you change this limit. It can be useful - if you use font-intensive applications (like DTP) and - want better performance (to the sake of memory). - - update.cmd The FreeType/2 update script - ifi/ Source code of the FreeType/2 font driver proper - - - lib/ files that must be added to the standard FreeType 1.1 - release. They take the place of the files located in - the corresponding "lib" file. - - lib/ttmemory.c replacement for the FreeType memory - manager component. This one uses the GRE - shared memory segment allocater, and is - required. - - lib/arch/makefile.icc Makefile to compile the FreeType library for - FreeType/2 with Visual Age. You'll need nmake. - - lib/arch/makefile.wat Makefile to compile with Watcom. NOTE that - you'll ALSO need nmake (wmake won't work !!) - - -Here's how to compile the font driver. - -0. Read the DEVELFAQ ! Now ! Then make a WPS backup ! - -1. Get the FreeType library, and copy the "lib" hierarchy into it to - replace the related files (i.e. ttmemory.c and makefiles). - -2. Compile FreeType with the new files, simply go to "freetype/lib" - and type : - - nmake -f arch\os2\makefile.icc for VisualAge - nmake -f arch\os2\makefile.wat for Watcom - -3. Adjust the makefiles in "ifi" to reflect the location of the - library file "libttf.lib" that was generated previously. - -5. Compile the font driver. Go to the "ft_os2/ifi" directory, then type - - nmake -f freetype.icc for VisualAge - nmake -f freetype.wat for Watcom - - You should have created a file called "FreeType.dll". Copy it to - your "ft_os2" directory.. - -6. Run the "install.cmd" script, then reboot after closing all - applications. - -7. When your desktop is back, go to the font palette and try to - install some new TrueType fonts. Enjoy the difference :-) - -8. You can also compile a small memory usage dumper called "ftmem.c" - to know how much memory the driver is using. Simply do - - nmake -f ftmem.icc for VisualAge - nmake -f ftmem.wat for Watcom - - Then launch it. A small window will appear with the current amount - of memory allocated by the driver. - Index: xc/extras/FreeType/contrib/ftos2/readme.txt diff -u xc/extras/FreeType/contrib/ftos2/readme.txt:1.1.1.1 xc/extras/FreeType/contrib/ftos2/readme.txt:removed --- xc/extras/FreeType/contrib/ftos2/readme.txt:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/readme.txt Wed Mar 16 20:59:27 2005 @@ -1,113 +0,0 @@ - - * * * FreeType/2 * * * - - (Version 1.0, 5. November 1998) - - Copyright (C) 1997,1998 Michal Necasek - Copyright (C) 1997,1998 The FreeType Development Team - - - Motto: "OS/2 is dead? Again? Thanks for telling me, I'd never notice!" - - - *** if you are upgrading from previous version, please see the FAQ (Q15) *** - - -- First a short Q&A: - -Q1: What's this? -A1: This is what OS/2 users have been waiting for only too long - a free, - high-quality TrueType renderer a.k.a. Font Driver conforming to the - OS/2 Intelligent Font Interface specification. It is based on FreeType - - a free portable library for using TrueType fonts. - Please note that although this code is free the FreeType team and - I will cheerfully accept any donations by happy users ;-) (not that I - expect to get any) - -Q2: How do I use this? -A2: Go to OS/2 command line and run INSTALL.CMD from the directory containing - FREETYPE.DLL. This will replace the original IBM TrueType driver if it is - installed. - -Q3: Where's the disclaimer? -A3: No, don't worry, I didn't forget that. I of course provide NO WARRANTY - that this code will work as you expect. Use only at your OWN RISK! - -Q4: What should I do RIGHT NOW? -A4: Before attempting to install this driver, you are STRONGLY advised - to archive your current configuration (Set Desktop Properties/Archive/ - Create archive at each startup, then reboot. Then of course switch archiving - off). It is always possible your system won't boot with the font driver - installed. You can risk it, but I warned you! You know how nasty the - computers can be ;-) - -Q5: What about the license? -A5: This code is distributed under the FreeType license. - It is free and the source code is available as part of the FreeType - distribution. - -Q6: How do I get rid of this? -A6: Ah, right question. Just run UNINSTALL.CMD. That removes the font driver - (not physically, it just isn't used on next startup) and restores the - original TRUETYPE.DLL if it exists. - -Q7: Is there something else? -A7: Yes, be prepared that the fonts just kick ass! You will no longer have - to envy those poor souls still using the so-called 95% OS from THAT - unspeakable company starting with the letter M ;-) - - -- Current features/bugs/limitations: - - Features : - outlines - - scaled/rotated text - - supports printed output - - works with TTCs (TrueType collections) - - national characters (if provided in the font, of course); - should work with all Latin codepages, Cyrillic and Greek. - - partial DBCS support - Traditional Chinese should work about - 98%. Fonts like Times New Roman MT30 should work on all - systems. If you want your language to be supported, you can - apply at and become a Beta tester. - - Bug/feature: - unharmonious glyph spacing in some applications. This seems - to come from OS/2's WYSIWYG glyph placement policy. This - is more or less visible depending on the application. We - can't do a lot about this... At least it's true WYSIWYG and - no nasty surprises when printing. - - - Limitations: - no grayscaling (a.k.a. antialiasing) - this is a limitation - of OS/2, not my code. If OS/2 starts supporting it, I'll - implement it the moment I lay my hands on the specs :) - Unfortunately it most probably won't happen any too soon. - Anyway, you have to bug IBM about this one, not me! - -- Planned features and features under consideration: - - possibly adding even support for Type 1 fonts, but that depends on - further FreeType engine development. Looks quite probable now. - -And finally, thanks go to: - - the FreeType team, the makers of FreeType. Without them, my work would be - impossible. - - especially David Turner of FreeType for his help, advice and support - - Robert Muchsel, I used one or two ideas from his code - - Marc L Cohen, Ken Borgendale and Tetsuro Nishimura from IBM. They provided - me with lots of extremely valuable 'inside' information. - - and last but not least - IBM, for providing us with the wonderful OS/2. - And for giving out the necessary docs for free. If all companies did - that, the world would be a better place. - - -Information on FreeType is available at - http://www.freetype.org - -Please send bug reports/suggestions and comments to : - - freetype-os2@physiol.med.tu-muenchen.de - - -Greetings can also be sent directly to the author at : mike@mendelu.cz - -And if you didn't know, IBM and OS/2 are registered trademarks of the -International Business Machines Corporation. Index: xc/extras/FreeType/contrib/ftos2/uninst.c diff -u xc/extras/FreeType/contrib/ftos2/uninst.c:1.1.1.1 xc/extras/FreeType/contrib/ftos2/uninst.c:removed --- xc/extras/FreeType/contrib/ftos2/uninst.c:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/uninst.c Wed Mar 16 20:59:27 2005 @@ -1,60 +0,0 @@ -/* */ -/* UNINST - FreeType/2 uninstaller */ -/* */ -/* Copyright 1998 Michal Necasek */ -/* */ -/* UNINSTALL.CMD rewritten in C - apparently the REXX version fails */ -/* when OS/2 is booted to command line. This causes problems if */ -/* FreeType/2 prevents PM from starting successfully. */ -/* */ -/* Note: This can be compiled as 16-bit app to keep the size down. */ - -#define INCL_NOXLATE_WIN16 -#define INCL_NOXLATE_DOS16 -#define INCL_WINSHELLDATA -#define INCL_DOSMISC -#include - -#include -#include -#include - -char szApp[] = "PM_Font_Drivers"; -char szKey[] = "TRUETYPE"; -char szBuffer[300]; - -void main(void) { - ULONG ulBootDrv; - USHORT usLen = 0; - APIRET rc; - char c; - - usLen = PrfQueryProfileString(HINI_USERPROFILE, szApp, szKey, NULL, - (PVOID)szBuffer, 260L); - - if (!strcmp("\\OS2\\DLL\\FREETYPE.DLL", szBuffer)) { - if(!PrfWriteProfileString(HINI_USERPROFILE, szApp, szKey, NULL)) - goto err; - - printf("FreeType/2 successfully removed.\n"); - printf("Do you wish to restore TRUETYPE.DLL (y/n)? "); - c = getch(); - if (c != 'y' && c != 'Y') - return; - - if(!PrfWriteProfileString(HINI_USERPROFILE, szApp, szKey, - "\\OS2\\DLL\\TRUETYPE.DLL")) - goto err; - - printf("\nTRUETYPE.DLL successfully restored"); - } - else { - printf("FreeType/2 not installed!"); - return; - } - - return; - -err: - printf("Uninstallation failed!"); -} Index: xc/extras/FreeType/contrib/ftos2/uninstall.cmd diff -u xc/extras/FreeType/contrib/ftos2/uninstall.cmd:1.1.1.1 xc/extras/FreeType/contrib/ftos2/uninstall.cmd:removed --- xc/extras/FreeType/contrib/ftos2/uninstall.cmd:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/uninstall.cmd Wed Mar 16 20:59:27 2005 @@ -1,34 +0,0 @@ -/* */ -call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" -call SysLoadFuncs - - -say "This utility will remove the FreeType/2 font driver and install " -say "the original TRUETYPE.DLL if it exists. If you do not wish to" -say "continue, please just press ENTER. Otherwise please type ""y""" - -pull letter -if letter <> "Y" then exit - -/* Find drive where OS/2 is installed */ -bootdrive = SysSearchPath('PATH', 'OS2.INI') -bootdrive = left(bootdrive, 1) - -app = "PM_Font_Drivers" -key = "TRUETYPE" - -/* look for TRUETYPE.DLL */ -rc = SysFileTree(left(bootdrive,1) || ":\OS2\DLL\TRUETYPE.DLL", "file", "F") - -if file.0 = 1 then do - say "Restoring TRUETYPE.DLL..." - val = "\OS2\DLL\TRUETYPE.DLL" || d2c(0) - SysIni('BOTH', app, key, val) -end -else do - say "Uninstalling FREETYPE.DLL..." - SysIni('BOTH', app, key, "DELETE:") -end - -say "FTIFI is uninstalled. Please reboot." -pause Index: xc/extras/FreeType/contrib/ftos2/ifi/32fddef.h diff -u xc/extras/FreeType/contrib/ftos2/ifi/32fddef.h:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/32fddef.h:removed --- xc/extras/FreeType/contrib/ftos2/ifi/32fddef.h:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/32fddef.h Wed Mar 16 20:59:27 2005 @@ -1,53 +0,0 @@ -/*********************************************************************\ -* Module Name: 32FDDEF.H -* -* OS/2 Intelligent Font Interface -* -* Copyright (c) 1989,1994 IBM Corporation -* Copyright (c) 1989 Microsoft Corporation -* -\*********************************************************************/ -#ifndef __32FDDEF_H__ -#define __32FDDEF_H__ - -/* Typedef the Font Driver 32 Bit entry points */ - -/* FdLoadFontFile */ -typedef HFF (* _syscall PFDLFF)(PSZ pszFileName); - -/* FdQueryFaces */ -typedef LONG (* _syscall PFDQF)(HFF hff, PIFIMETRICS pifim, - ULONG cMetricLen, ULONG cFontCount, - ULONG cStart); -/* FdConvertFontFile */ -typedef LONG (* _syscall PFDCFF)(PSZ pszSrc, PSZ pszDestDir, - PSZ pszName); - -/* FdClaimFontFile */ -typedef LONG (* _syscall PFDCLF)(PSZ pszFileName); - -/* FdUnloadFontFile */ -typedef LONG (* _syscall PFDUFF)(HFF hff); - -/* FdOpenFontContext */ -typedef HFC (* _syscall PFDOFC)(HFF hff, ULONG ulFont); - -/* FdSetFontContext */ -typedef LONG (* _syscall PFDSFC)(HFC hfc, PCONTEXTINFO pci); - -/* FdCloseFontContext */ -typedef LONG (* _syscall PFDCFC)(HFC hfc); - -/* FdQueryFaceAttr */ -typedef LONG (* _syscall PFDQFA)(HFC hfc, ULONG iQuery, PBYTE pBuffer, - ULONG cb, PGLYPH pagi, GLYPH gistart); - -/* FdQueryCharAttr */ -typedef LONG (* _syscall PFDQCA)(HFC hfc, PCHARATTR pCharAttr, - PBITMAPMETRICS pbmm); - -/* FdQueryFullFaces */ -typedef LONG (* _syscall PFDQFF)(HFF hff, PVOID pBuf, PULONG cBufLen, - PULONG cFontCount, ULONG cStart); -#endif - Index: xc/extras/FreeType/contrib/ftos2/ifi/32fdstrc.h diff -u xc/extras/FreeType/contrib/ftos2/ifi/32fdstrc.h:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/32fdstrc.h:removed --- xc/extras/FreeType/contrib/ftos2/ifi/32fdstrc.h:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/32fdstrc.h Wed Mar 16 20:59:27 2005 @@ -1,161 +0,0 @@ -/*********************************************************************\ -* Module Name: 32FDSTRC.H -* -* OS/2 Intelligent Font Interface -* -* Copyright (c) 1989,1994 IBM Corporation -* Copyright (c) 1989 Microsoft Corporation -* -\*********************************************************************/ -#ifndef __32FDSTRC_H__ -#define __32FDSTRC_H__ - -#define FACESIZE 32 -#define GLYPHNAMESIZE 16 - -/* Error codes defined to be returned by IFI */ -/* NOTE: The actual values are subject to change */ - -/*#define PMERR_BUFFER_TOO_SMALL 23003L*/ -#define PMERR_FACENAME_NOT_FOUND 23004L -#define PMERR_FD_ALREADY_INSTALLED 23005L -#define PMERR_INVALID_CONTEXTINFO 23006L -#define PMERR_NOT_A_FONT_FILE 23007L -#define PMERR_INVALID_FONT_SELECTION 23008L -#define PMERR_INVALID_FORMAT 23009L -#define PMERR_BUSY_HFC 230010L -#define PMERR_INVALID_HFC 230011L -#define PMERR_INVALID_INDEX 230012L -#define PMERR_INVALID_QUERY_TYPE 230013L -#define PMERR_CONTEXT_NOT_SET 230014L - -/* Query faces subfunction */ -#define FD_QUERY_CONTEXTMETRICS 1L -#define FD_QUERY_ABC_WIDTHS 2L -#define FD_QUERY_KERNINGPAIRS 3L - -/* Query char subfunction */ -#define FD_QUERY_CHARIMAGE 1L -#define FD_QUERY_OUTLINE 2L -#define FD_QUERY_BITMAPMETRICS 4L - -#define FD_CHARATTR_ALIGNED_8 0x00000001 -#define FD_CHARATTR_ALIGNED_16 0x00000002 -#define FD_CHARATTR_ALIGNED_32 0x00000004 -#define FD_CHARATTR_NO_CACHE 0x00000010 - -typedef struct _ABC_TRIPLETS /*abc*/ -{ - LONG lA; - ULONG ulB; - LONG lC; -} ABC_TRIPLETS; -typedef ABC_TRIPLETS *PABC_TRIPLETS; - -// THIS STRUCTURE NOW RESIDES IN PMDDI.H FOR CRUISER WORLD -// BUT IFI FONT DRIVER DOES NOT INCLUDE PMDDI.H - -#ifndef INCL_IFI -typedef struct _POINTFX { /* ptfx */ - FIXED x; - FIXED y; -} POINTFX; -typedef POINTFX *PPOINTFX; -#endif - -typedef struct _BITMAPMETRICS /* bmm */ -{ - SIZEL sizlExtent; - ULONG cyAscent; -#ifdef OLD_DRIVER - POINTFX *ppfxOrigin; /* Return character origin. */ -#else - POINTFX pfxOrigin; /* Return character origin. */ -#endif -} BITMAPMETRICS; -typedef BITMAPMETRICS *PBITMAPMETRICS; - -typedef struct _MAT2 /* mat */ -{ - FIXED eM11; - FIXED eM12; - FIXED eM21; - FIXED eM22; -} MAT2; - -typedef struct _FD_KERNINGPAIRS /* krnpr */ -{ - GLYPH giFirst; - GLYPH giSecond; - LONG eKerningAmount; -} FD_KERNINGPAIRS; - -typedef struct _CONTEXTINFO /* ci */ -{ - ULONG cb; /* Length in bytes of this structure. */ - ULONG fl; /* Flags. */ - SIZEL sizlPPM; /* Device resolution in pels/meter. */ - POINTFX pfxSpot; /* Spot size in pels. */ - MAT2 matXform; /* Notional to Device transform. */ -} CONTEXTINFO; -typedef CONTEXTINFO *PCONTEXTINFO; - -typedef struct _CHARATTR /* ca */ -{ - ULONG cb; - ULONG iQuery; /* Query type. */ - GLYPH gi; /* Glyph index in font. */ - PBYTE pBuffer; /* Bitmap buffer. */ - ULONG cbLen; /* Size of buffer in bytes. */ -} CHARATTR; -typedef CHARATTR *PCHARATTR; - -typedef struct _CHARATTR2 /* ca2 */ -{ - ULONG cb; - ULONG iQuery; /* Query type. */ - GLYPH gi; /* Glyph index in font. */ - PBYTE pBuffer; /* Bitmap buffer. */ - ULONG cbLen; /* Size of buffer in bytes. */ - ULONG fl; /* Flags */ -} CHARATTR2; -typedef CHARATTR2 *PCHARATTR2; - -typedef struct _CONTEXTMETRICS -{ - SIZEL sizlMax; - ULONG cyMaxAscent; - ULONG cyMaxDescent; - ULONG cxTotal; - ULONG cGlyphs; -} CONTEXTMETRICS; -typedef CONTEXTMETRICS * PCONTEXTMETRICS; - -typedef struct _POLYGONHEADER { - ULONG cb; - ULONG iType; /* Must be FD_POLYGON_TYPE */ -} POLYGONHEADER; -typedef POLYGONHEADER *PPOLYGONHEADER; - -typedef struct _PRIMLINE { - ULONG iType; /* Must be FD_PRIM_LINE */ - POINTFX pte; -} PRIMLINE; -typedef PRIMLINE *PPRIMLINE; - -typedef struct _PRIMSPLINE { - ULONG iType; /* Must be FD_PRIM_SPLINE */ - POINTFX pte[3]; -} PRIMSPLINE; -typedef PRIMSPLINE *PPRIMSPLINE; - -/* - * The names of these were changed to avoid conflict with PRIM_LINE - * which is defined ion some other header file. - */ -#define FD_POLYGON_TYPE 24 -#define FD_PRIM_LINE 1 -#define FD_PRIM_SPLINE 3 - -#endif - Index: xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h diff -u xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h:1.2 xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h:removed --- xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h:1.2 Sat Jan 11 22:55:43 2003 +++ xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h Wed Mar 16 20:59:27 2005 @@ -1,119 +0,0 @@ -/*********************************************************************\ -* Module Name: 32IFIMET.H -* -* OS/2 Intelligent Font Interface -* -* Copyright (c) 1989,1994 IBM Corporation -* Copyright (c) 1989 Microsoft Corporation -* -* Definition and description of IFIMETRICS structure -* This file is included by FDSTRUCS.H -* -\*********************************************************************/ -/* $XFree86: xc/extras/FreeType/contrib/ftos2/ifi/32ifimet.h,v 1.2 2003/01/12 03:55:43 tsi Exp $ */ -#ifndef __32IFIMET_H__ -#define __32IFIMET_H__ - -#define FACESIZE 32 -#define GLYPHNAMESIZE 16 - -/* #defines for fsType in IFIMETRICS */ - -#define IFIMETRICS_FIXED 0x0001 /*Fixed pitch */ -#define IFIMETRICS_LICENSED 0x0002 /*Font subject of licensing agreement */ -#define IFIMETRICS_KERNING 0x0004 /*Font has kerning data */ -#define IFIMETRICS_DBCS 0x0010 /*DBCS font */ -#define IFIMETRICS_MBCS 0x0018 /*MBCS (DBCS + SBCS) font */ -/* Reserved 0x8000 */ -#define IFIMETRICS_ATOMS 0x4000 /*The atom name fields are valid */ -#define IFIMETRICS_FAMTRUNC 0x2000 /*Familyname field is truncated */ -#define IFIMETRICS_FACETRUNC 0x1000 /*Facename field is truncated */ -#define IFIMETRICS_ANTIALIASED 0x0020 -#define IFIMETRICS_UNICODE 0x0040 -#define IFIMETRICS_NO_CACHE 0x0080 - -/* #defines for fsDefn in IFIMETRICS */ - -#define IFIMETRICS_OUTLINE 0x0001 /*1 - Outline. 0 - Raster */ -/* Reserved 0x0002 */ -/* Reserved 0x0004 */ -/* Reserved 0x8000 */ -#define IFIMETRICS_UDC_FONT 0x0010 /*User defined font */ -/* Reserved */ - -/* #defines for fsSelection in IFIMETRICS valid for bitmap or outline fonts */ - -#define IFIMETRICS_ITALIC 0x8000 /*Italic */ -#define IFIMETRICS_UNDERSCORE 0x4000 /*Underscored */ -#define IFIMETRICS_OVERSTRUCK 0x2000 /*Overstruck */ - -/* #defines for fsSelection in IFIMETRICS valid for bitmap fonts */ - -#define IFIMETRICS_NEGATIVE 0x1000 /*Negative image */ -#define IFIMETRICS_HOLLOW 0x0800 /*Outline (hollow) */ - -#if defined(__IBMCPP__) || defined(__IBMC__) -# pragma pack(1) -#else -# pragma Align_members(1) -#endif - -typedef struct _IFIMETRICS /* ifim */ -{ /* UNITS */ - UCHAR szFamilyname[FACESIZE]; /*Font Family Name, e.g. Roman */ - UCHAR szFacename[FACESIZE]; /*Face name, e.g. Tms Rmn Bold Italic */ - UCHAR szGlyphlistName[GLYPHNAMESIZE]; /*e.g. PM316, Latin-2, Greek */ - USHORT idRegistry; /*IBM registration number (or zero). I */ - LONG lCapEmHeight; /*Height of uppercase M N */ - LONG lXHeight; /*Nominal height of lowercase N */ - LONG lMaxAscender; /*Maximum height above baseline of any char N */ - LONG lMaxDescender; /*Maximum depth below baseline of any char N */ - LONG lLowerCaseAscent; /*Maximum height above baseline of any a-z N */ - LONG lLowerCaseDescent; /*Maximum depth below basiline of any a-z N */ - LONG lInternalLeading; /*White space within character N */ - LONG lExternalLeading; /*White space between lines N */ - LONG lAveCharWidth; /*Weighted average character width N */ - LONG lMaxCharInc; /*Maximum character increment N */ - LONG lEmInc; /*Increment for Capitals (typically 'M') N */ - LONG lMaxBaselineExt; /*Height of character cell N */ - FIXED fxCharSlope; /*Slope angle, degrees, clockwise D */ - FIXED fxInlineDir; /*Drawing direction, degrees clockwise D */ - FIXED fxCharRot; /*Glyph rotation in cell, degrees clockwise D */ - USHORT usWeightClass; /*Character weight, 1-9 (1=ultra-light) I */ - USHORT usWidthClass; /*Character width, 1-9 (1=ultra condensed) I */ - LONG lEmSquareSizeX; /*Em Square size, x-direction N */ - LONG lEmSquareSizeY; /*Em Square size, y-direction N */ - GLYPH giFirstChar; /*Number of first glyph in font I */ - GLYPH giLastChar; /*Number of last glyph in font I */ - GLYPH giDefaultChar; /*Glyph used if requested glyph invalid I */ - GLYPH giBreakChar; /*Space glyph I */ - USHORT usNominalPointSize; /*Point size for which font was designed N */ - USHORT usMinimumPointSize; /*Minimum point size scaling for font N */ - USHORT usMaximumPointSize; /*Maximum point size scaling for font N */ - USHORT fsType; /*Type indicators (see #defines) B */ - USHORT fsDefn; /*Font definition data (see #defines) B */ - USHORT fsSelection; /*Font selection flags (see #defines) B */ - USHORT fsCapabilities; /*Font capabilities must be 0 B */ - LONG lSubscriptXSize; /*Size in x-direction of subscript N */ - LONG lSubscriptYSize; /*Size in y-direction of subscript N */ - LONG lSubscriptXOffset; /*Offset in x-direction of subscript N */ - LONG lSubscriptYOffset; /*Offset in y-direction of subscript N */ - LONG lSuperscriptXSize; /*Size in x-direction of superscript N */ - LONG lSuperscriptYSize; /*Size in y-direction of superscript N */ - LONG lSuperscriptXOffset; /*Offset in x-direction of superscript N */ - LONG lSuperscriptYOffset; /*Offset in y-direction of superscript N */ - LONG lUnderscoreSize; /*Underscore size N */ - LONG lUnderscorePosition; /*Underscore position N */ - LONG lStrikeoutSize; /*Strikeout size N */ - LONG lStrikeoutPosition; /*Strikeout position N */ - SHORT cKerningPairs; /*Number of kerning pairs in pair table I */ - ULONG ulFontClass; /*IBM font classification B */ -} IFIMETRICS; -typedef IFIMETRICS FAR *PIFIMETRICS; -#if defined(__IBMCPP__) || defined(__IBMC__) -# pragma pack() -#else -# pragma Align_members() -#endif - -#endif Index: xc/extras/FreeType/contrib/ftos2/ifi/32pmifi.h diff -u xc/extras/FreeType/contrib/ftos2/ifi/32pmifi.h:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/32pmifi.h:removed --- xc/extras/FreeType/contrib/ftos2/ifi/32pmifi.h:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/32pmifi.h Wed Mar 16 20:59:27 2005 @@ -1,79 +0,0 @@ -/*********************************************************************\ -* Module Name: 32PMIFI.H -* -* OS/2 Intelligent Font Interface -* -* Copyright (c) 1989,1994 IBM Corporation -* Copyright (c) 1989 Microsoft Corporation -* -\*********************************************************************/ -#ifndef __32PMIFI_H__ -#define __32PMIFI_H__ - -#define INCL_IFD - -typedef PVOID HFF; /* Font file handle */ -typedef PVOID HFC; /* Font context handle */ - -#ifndef INCL_GRE_FONTS -typedef ULONG GLYPH; /* gi */ -typedef ULONG *PGLYPH; /* pgi */ -#endif - -#include "32fdstrc.h" /* Font Driver structures */ -#include "32ifimet.h" /* Pifi Metrics */ -#include "32fddef.h" /* Font Driver entry definitions */ - - -typedef struct _FDDISPATCH16 { /* fdisp */ - PVOID FdLoadFontFile; - PVOID FdQueryFaces; - PVOID FdUnloadFontFile; - PVOID FdOpenFontContext; - PVOID FdSetFontContext; - PVOID FdCloseFontContext; - PVOID FdQueryFaceAttr; - PVOID FdQueryCharAttr; - PVOID FdClaimFontFile; - PVOID FdConvertFontFile; -} FDDISPATCH16; -typedef FDDISPATCH16 FAR *PFDDISPATCH16; - - -typedef struct _FDDISPATCH { /* fdisp */ - PFDLFF FdLoadFontFile; - PFDQF FdQueryFaces; - PFDUFF FdUnloadFontFile; - PFDOFC FdOpenFontContext; - PFDSFC FdSetFontContext; - PFDCFC FdCloseFontContext; - PFDQFA FdQueryFaceAttr; - PFDQCA FdQueryCharAttr; - PFDCLF FdClaimFontFile; - PFDCFF FdConvertFontFile; - PFDQFF FdQueryFullFaces; -} FDDISPATCH; -typedef FDDISPATCH *PFDDISPATCH; - -typedef struct _FDHEADER { /* fdhdr */ - ULONG cbLength; /* Length of FDHEADER */ - UCHAR strId[16]; /* String 'OS/2 FONT DRIVER' */ - UCHAR szTechnology[40]; /* Identifier of Font Driver technology */ - ULONG ulVersion; /* IFI version number (0x0100) */ - ULONG ufDeviceCaps; /* Capabilities of device */ - PFDDISPATCH pfddisp; -} FDHEADER; - -typedef FDHEADER FAR *PFDHEADER; - -#define OK 0 -#define ERROR -1 - -#define IFI_VERSION 10 -#define IFI_VERSION20 20 -#define IFI_VERSION21 21 - -#define FD_DISPATCH_COUNT 11 -#define DISPATCHTABLE "FONT_DRIVER_DISPATCH_TABLE" - -#endif Index: xc/extras/FreeType/contrib/ftos2/ifi/FreeType.def diff -u xc/extras/FreeType/contrib/ftos2/ifi/FreeType.def:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/FreeType.def:removed --- xc/extras/FreeType/contrib/ftos2/ifi/FreeType.def:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/FreeType.def Wed Mar 16 20:59:27 2005 @@ -1,10 +0,0 @@ -;LIBRARY FreeType INITGLOBAL TERMGLOBAL -LIBRARY FreeType INITINSTANCE TERMINSTANCE - -PROTMODE - -DATA SINGLE SHARED READWRITE LOADONCALL -;DATA MULTIPLE NONSHARED READWRITE LOADONCALL -CODE LOADONCALL - -DESCRIPTION "FreeType/2, Copyright (C) 1998 Michal Necasek" Index: xc/extras/FreeType/contrib/ftos2/ifi/FreeType.icc diff -u xc/extras/FreeType/contrib/ftos2/ifi/FreeType.icc:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/FreeType.icc:removed --- xc/extras/FreeType/contrib/ftos2/ifi/FreeType.icc:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/FreeType.icc Wed Mar 16 20:59:27 2005 @@ -1,35 +0,0 @@ -# Makefile for FTIFI using IBM VisualAge C++ -# -# Explanation of compiler switches used: -# -C compile only, do not link -# -Sp1 pack structures on byte boundaries (quite important) -# -Ss accept double slash (//) comments -# -Ge- build a DLL -# -Rn build a subsystem DLL; means that a special C library is -# linked and some calls cannot be used -# -Fo create object file -# -O+ optimizations on -# -G4 optimize for 486 (should be better for my 6x86MX, produces smaller -# code than Pentium optimization) -# Linker switches used: -# /DE include debug info in executable -# /NOE no extended dictionary search -# /E:2 exepack (for Warp 3 and higher) -# /A:32 align pages of code on 32-byte boundaries (makes smaller file) -# /DBGPACK pack debug info - -# uncomment ICCR and LNKR to build a release version -ICCR=-O+ -G4 -LNKR=/PACKC /PACKD /M /A:32 /E:2 -# uncomment ICCD and LNKD to build a debug version. Note that debug and -# release version is not mutually exclusive in this case. -#ICCD=-Ti+ -DDEBUG -#ICCD=-Ti+ -#LNKD=/DE /DBGPACK /M - - -FreeType.dll: $*.obj $*.def ..\lib\libttf.lib - ilink /NOE $(LNKD) $(LNKR) $*.obj ..\lib\libttf.lib libconv.lib $*.def - -FreeType.obj: ftifi.c ftifi.h FreeType.icc - icc $(ICCD) $(ICCR) -C -Sp1 -Ss -Ge- -Rn -FoFreeType -I..\lib -I..\lib\extend -I..\lib\arch\os2 ftifi.c Index: xc/extras/FreeType/contrib/ftos2/ifi/FreeType.wat diff -u xc/extras/FreeType/contrib/ftos2/ifi/FreeType.wat:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/FreeType.wat:removed --- xc/extras/FreeType/contrib/ftos2/ifi/FreeType.wat:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/FreeType.wat Wed Mar 16 20:59:27 2005 @@ -1,29 +0,0 @@ -# WARNING!! this doesn't quite work yet!!!! -# -# Makefile for FTIFI using Watcom C/C++ -# -# Explanation of compiler switches used: -# -4r register calling convention, generate 486 code. Better than -# Pentium opt. for Cyrix/IBM and AMD -# -otexan maximum optimization for speed -# -zp1 pack structures on byte boundaries (quite important!) -# -bd build a DLL -# -zc -# -d2 include debug info -# -# Important linker options used: -# initglobal call DLL initialization function only once (not for each -# process) -# termglobal call DLL termination function only once -# oneautodata use only one shared data segment - -WCCR=-4r -otexan -#WCCD=-d2 -DDEBUG -#LNKD=debug all - - -FreeType.dll: $*.obj $*.def - wlink system os2v2 dll initglobal termglobal op oneautodata export GetOutline_ export FONT_DRIVER_DISPATCH_TABLE=_fdhdr file $* lib ..\lib\libttf.lib $(LNKD) - -FreeType.obj: ftifi.c ftifi.h - wcc386 $(WCCD) $(WCCR) -zp1 -bd -zc -I..\lib -I..\lib\extend ftifi.c /Fo=freetype.obj Index: xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c diff -u xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c:1.2 xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c:removed --- xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c:1.2 Sat Jan 11 22:55:43 2003 +++ xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c Wed Mar 16 20:59:27 2005 @@ -1,3208 +0,0 @@ -/* */ -/* OS/2 Font Driver using the FreeType library */ -/* */ -/* Copyright (C) 1997, 1998 Michal Necasek */ -/* Copyright (C) 1997, 1998 David Turner */ -/* Copyright (C) 1997, 1998 International Business Machines */ -/* */ -/* Version: 0.9.90 (Beta) */ -/* */ -/* This source is to be compiled with IBM VisualAge C++ 3.0 or possibly */ -/* Watcom C/C++ 10.0 or higher (Wactom doesn't quite work yet). */ -/* Other compilers may actually work too but don't forget this is NOT a */ -/* normal DLL but rather a subsystem DLL. That means it shouldn't use */ -/* the usual C library as it has to run without runtime environment. */ -/* VisualAge provides a special subsystem version of the run-time library. */ -/* All this is of course very compiler-dependent. See makefiles for */ -/* discussion of switches used. */ -/* */ -/* Implemantation Notes: */ -/* */ -/* Note #1: As a consequence of this being a subsystem librarary, I had to */ -/* slightly modify the FreeType source, namely ttmemory.c and ttfile.c. */ -/* FreeType/2 now allocates several chunks of memory and uses them as a */ -/* heap. Note that memory allocation should use TTAlloc(), possibly */ -/* directly SSAllocMem(). malloc() is unusable here and it doesn't work */ -/* at all (runtime library isn't even initialized). See ttmemory.c for */ -/* more info. */ -/* In ttfile.c I had to change all fopen(), fseek()... calls */ -/* to OS/2 API calls (DosOpen, DosSetFilePtr...) because without proper */ -/* runtime environment a subsystem DLL cannot use std C library calls. */ -/* */ -/* Note #2: On exit of each function reading from font file the API */ -/* TT_Flush_Stream() must be called. This is because file handles opened */ -/* by this DLL actually belong to the calling process. As a consequence */ -/* a) it's easy to run out of file handles, which results in really */ -/* very nasty behavior and/or crashes. This could be solved by */ -/* increased file handles limit, but cannot because */ -/* b) it is impossible to close files open by another process and */ -/* therefore the fonts cannot be properly uninstalled (you can't */ -/* delete them while the're open by other process) */ -/* The only solution I found is very simple - just close the file before */ -/* exiting a DLL function. This ensures files are not left open across */ -/* processes and other problems. */ -/* */ -/* Note #3: The whole business with linked lists is aimed at lowering */ -/* memory consumption drastically. If you install 50 TT fonts, OS/2 */ -/* opens all of them at startup. Even if you never use them, they take */ -/* up at least over 1 Meg memory. With certain fonts the consumption can */ -/* easily go over several MB. We limit such waste of memory by only */ -/* actually keeping open several typefaces most recently used. Their */ -/* number can be set via entry in OS2.INI. */ -/* */ -/* For Intelligent Font Interface (IFI) specification please see IFI32.TXT */ -/* $XFree86: xc/extras/FreeType/contrib/ftos2/ifi/ftifi.c,v 1.2 2003/01/12 03:55:43 tsi Exp $ */ - -#ifndef __IBMC__ -# ifndef __WATCOMC__ -# error "This source requires IBM VisualAge C++ or Watcom C/C++" -# endif -#endif - -/* Defining the following uses UCONV.DLL instead of the built-in */ -/* translation tables. This code should work on any Warp 4 and */ -/* Warp 3 w/ FixPak 35(?) and above */ -/* Note: this should be defined before FTIFI.H is #included */ -#undef USE_UCONV - -#define INCL_WINSHELLDATA /* for accessing OS2.INI */ -#define INCL_DOSMISC -#define INCL_DOSNLS -#define INCL_DOSPROCESS -#define INCL_GRE_DCS -#define INCL_GRE_DEVSUPPORT -#define INCL_DDIMISC -#define INCL_IFI -#include -#include /* SSAllocmem(), SSFreemem() and more */ - -#ifdef USE_UCONV /* uconv.h isn't always available */ -#include -#endif /* USE_UCONV */ - -#include -#include /* min and max macros */ - -#define _syscall _System /* the IFI headers don't compile without it */ - -#include "32pmifi.h" /* IFI header */ -#include "freetype.h" /* FreeType header */ -#include "ftxkern.h" /* kerning extension */ -#include "ftxwidth.h" /* glyph width extension */ -#include "ftifi.h" /* xlate table */ - - -/* For the sake of Netscape's text rendering bugs ! */ -#define NETSCAPE_FIX - -/* Create 'fake' Roman face for Times New Roman (to mimic PMATM's */ -/* behaviour */ -#define FAKE_TNR - -/* (indirectly) exported functions */ -LONG _System ConvertFontFile(PSZ pszSrc, PSZ pszDestDir, PSZ pszNewName); -HFF _System LoadFontFile(PSZ pszFileName); -LONG _System UnloadFontFile(HFF hff); -LONG _System QueryFaces(HFF hff, PIFIMETRICS pifiMetrics, ULONG cMetricLen, - ULONG cFountCount, ULONG cStart); -HFC _System OpenFontContext(HFF hff, ULONG ulFont); -LONG _System SetFontContext(HFC hfc, PCONTEXTINFO pci); -LONG _System CloseFontContext(HFC hfc); -LONG _System QueryFaceAttr(HFC hfc, ULONG iQuery, PBYTE pBuffer, - ULONG cb, PGLYPH pagi, GLYPH giStart); -LONG _System QueryCharAttr(HFC hfc, PCHARATTR pCharAttr, - PBITMAPMETRICS pbmm); -LONG _System QueryFullFaces(HFF hff, PVOID pBuff, PULONG buflen, - PULONG cFontCount, ULONG cStart); - -FDDISPATCH fdisp = { /* Font driver dispatch table */ - LoadFontFile, - QueryFaces, - UnloadFontFile, - OpenFontContext, - SetFontContext, - CloseFontContext, - QueryFaceAttr, - QueryCharAttr, - NULL, /* this one is no more used, only the spec fails to mention it */ - ConvertFontFile, - QueryFullFaces -}; - - - -/****************************************************************************/ -/* the single exported entry point; this way is faster than exporting every */ -/* single function and a bit more flexible */ -/* */ -#pragma export (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", 1) -FDHEADER fdhdr = -{ /* Font driver Header */ - sizeof(FDHEADER), - "OS/2 FONT DRIVER", /* do not change */ - "TrueType (Using FreeType Engine)", /* description up to 40 chars */ - IFI_VERSION20, /* version */ - 0, /* reserved */ - &fdisp -}; - - -/****************************************************************************/ -/* some debug macros and functions. the debug version logs system requests */ -/* to the file C:\FTIFI.LOG */ -/* */ -#ifdef DEBUG - HFILE LogHandle = NULLHANDLE; - ULONG Written = 0; - char log[2048] = ""; - char buf[2048] = ""; - - -char* itoa10( int i, char* buffer ) { - char* ptr = buffer; - char* rptr = buffer; - char digit; - - if (i == 0) { - buffer[0] = '0'; - buffer[1] = 0; - return buffer; - } - - if (i < 0) { - *ptr = '-'; - ptr++; rptr++; - i = -i; - } - - while (i != 0) { - *ptr = (char) (i % 10 + '0'); - ptr++; - i /= 10; - } - - *ptr = 0; ptr--; - - while (ptr > rptr) { - digit = *ptr; - *ptr = *rptr; - *rptr = digit; - ptr--; - rptr++; - } - - return buffer; -} - -# define COPY(s) strcpy(log, s) -# define CAT(s) strcat(log, s) -# define CATI(v) strcat(log, itoa10( (int)v, buf )) -# define WRITE DosWrite(LogHandle, log, strlen(log), &Written) - -# define ERET1(label) { COPY("Error at "); \ - CATI(__LINE__); \ - CAT("\r\n"); \ - WRITE; \ - goto label; \ - } - -# define ERRRET(e) { COPY("Error at "); \ - CATI(__LINE__); \ - CAT("\r\n"); \ - WRITE; \ - return(e); \ - } - - -#else - -# define COPY(s) -# define CAT(s) -# define CATI(v) -# define WRITE - -# define ERET1(label) goto label; - -# define ERRRET(e) return(e); - -#endif /* DEBUG */ - - -/****************************************************************************/ -/* */ -/* 'engine' : */ -/* */ -/* The FreeType engine instance. Although this is a DLL, it isn't */ -/* supposed to be shared by apps, as it is only called by the OS/2 GRE. */ -/* This means that there is no need to bother with reentrancy/thread */ -/* safety, which aren't supported by FreeType 1.0 anyway. */ -/* */ -TT_Engine engine; - -/****************************************************************************/ -/* */ -/* TList and TListElement : */ -/* */ -/* simple structures used to implement a doubly linked list. Lists are */ -/* used to implement the HFF object lists, as well as the font size and */ -/* outline caches. */ -/* */ - -typedef struct _TListElement TListElement, *PListElement; - -struct _TListElement -{ - PListElement next; /* next element in list - NULL if tail */ - PListElement prev; /* previous element in list - NULL if head */ - long key; /* value used for searches */ - void* data; /* pointer to the listed/cached object */ -}; - -typedef struct _TList TList, *PList; -struct _TList -{ - PListElement head; /* first element in list - NULL if empty */ - PListElement tail; /* last element in list - NULL if empty */ - int count; /* number of elements in list */ -}; - -static PListElement free_elements = 0; - -#if 0 -/****************************************************************************/ -/* */ -/* TGlyph_Image : */ -/* */ -/* structure used to store a glyph's attributes, i.e. outlines and metrics */ -/* Note that we do not cache bitmaps ourselves for the moment. */ -/* */ -typedef struct _TGlyph_Image TGlyph_Image, *PGlyph_Image; - -struct _TGlyph_Image -{ - PListElement element; /* list element for this glyph image */ - TT_Glyph_Metrics metrics; - TT_Outline outline; -}; -#endif - - -/****************************************************************************/ -/* */ -/* TFontFace : */ -/* */ -/* a structure related to an open font face. It contains data for each of */ -/* possibly several faces in a .TTC file. */ - -typedef struct _TFontFace TFontFace, *PFontFace; - -struct _TFontFace -{ - TT_Face face; /* handle to actual FreeType face object */ - TT_Glyph glyph; /* handle to FreeType glyph container */ - TT_CharMap charMap; /* handle to FreeType character map */ - TT_Kerning directory; /* kerning directory */ - USHORT *widths; /* glyph width cache for large fonts */ - USHORT *kernIndices; /* reverse translation cache for kerning */ - LONG em_size; /* points per em square */ - ULONG flags; /* various FC_* flags (like FC_FLAG_FIXED)*/ -#if 0 /* not now */ - TList sizes; /* list of live child font sizes */ -#endif - LONG charMode; /* character translation mode : */ - /* 0 = Unicode to UGL */ - /* 1 = Symbol (no translation) */ - /* 2 = Unicode w/o translation */ -}; - - -/****************************************************************************/ -/* */ -/* TFontFile : */ -/* */ -/* a structure related to an open font file handle. All TFontFiles are */ -/* kept in a simple linked list. There can be several faces in one font. */ -/* Face(s) information is stored in a variable-length array of TFontFaces. */ -/* A single TFontFile structure exactly corresponds to one HFF. */ - -typedef struct _TFontFile TFontFile, *PFontFile; - -struct _TFontFile -{ - PListElement element; /* list element for this font face */ - HFF hff; /* HFF handle used from outside */ - CHAR filename[260]; /* font file name */ - LONG ref_count; /* number of times this font file is open */ - ULONG flags; /* various FL_* flags */ - ULONG numFaces; /* number of faces in a file (normally 1) */ - TFontFace *faces; /* array of FontFace structures */ -}; - - -/* Flag : The font face has a fixed pitch width */ -#define FC_FLAG_FIXED_WIDTH 1 - -/* Flag : Effectively duplicated FL_FLAG_DBCS_FILE. This info is */ -/* kept twice for simplified access */ -#define FC_FLAG_DBCS_FACE 2 - -/* Flag : This face is an alias */ -#define FL_FLAG_FAKE_ROMAN 8 - -/* Flag : The font file has a live FreeType face object */ -#define FL_FLAG_LIVE_FACE 16 - -/* Flag : A font file's face has a context open - DON'T CLOSE IT! */ -#define FL_FLAG_CONTEXT_OPEN 32 - -/* Flag : This file has been already opened previously*/ -#define FL_FLAG_ALREADY_USED 64 - -/* Flag : This is a font including DBCS characters; this also means */ -/* the font driver presents to the system a second, vertically */ -/* rendered, version of this typeface with name prepended by */ -/* an '@' (used in horizontal-only word processors) */ -/* Note : For TTCs, the whole collection is either DBCS or not. I've */ -/* no idea if there are any TTCs with both DBCS and non-DBCS */ -/* faces. It's possible, but sounds unlikely. */ -#define FL_FLAG_DBCS_FILE 128 - -/* Note, we'll only keep the first max_open_files files with opened */ -/* FreeType objects/instances.. */ -int max_open_files = 10; - -/* number of processes using the font driver; used by the init/term */ -/* routine */ -ULONG ulProcessCount = 0; - -/* the list of live faces */ -static TList liveFiles = { NULL, NULL, 0 }; - -/* the list of sleeping faces */ -static TList idleFiles = { NULL, NULL, 0 }; - -/****************************************************************************/ -/* */ -/* TFontSize : */ -/* */ -/* a structure related to a opened font context (a.k.a. instance or */ -/* transform/pointsize). It exactly corresponds to a HFC. */ -/* */ - -typedef struct _TFontSize TFontSize, *PFontSize; - -struct _TFontSize -{ - PListElement element; /* List element for this font size */ - HFC hfc; /* HFC handle used from outside */ - TT_Instance instance; /* handle to FreeType instance */ - BOOL transformed; /* TRUE = rotation/shearing used (rare) */ - BOOL vertical; /* TRUE = vertically rendered DBCS face */ - TT_Matrix matrix; /* transformation matrix */ - PFontFile file; /* HFF this context belongs to */ - ULONG faceIndex; /* index of face in a font (for TTCs) */ -/* TList outlines;*/ /* outlines cache list */ -}; - -/****************************************************************************/ -/* array of font context handles. Note that there isn't more than one font */ -/* context open at any time anyway, but we want to be safe.. */ -/* */ -#define MAX_CONTEXTS 5 - -static TFontSize contexts[MAX_CONTEXTS]; /* this is rather too much */ - - -/****************************************************************************/ -/* few globals used for NLS */ -/* */ -/* Note: most of the internationalization (I18N) code was kindly provided */ -/* by Ken Borgendale and Marc L Cohen from IBM (big thanks!). I also */ -/* received help from Tetsuro Nishimura from IBM Japan. */ -/* I was also unable to test the I18N code on actual Japanese, Chinese... */ -/* etc. systems. But it might work. */ -/* */ - -static ULONG ScriptTag = -1; -static ULONG LangSysTag = -1; -static ULONG iLangId = TT_MS_LANGID_ENGLISH_UNITED_STATES; /* language ID */ -static ULONG uLastGlyph = 255; /* last glyph for language */ -static PSZ pGlyphlistName = "SYMBOL"; /* PM383, PMJPN, PMKOR.... */ -static BOOL isGBK = TRUE; /* only used for Chinese */ -static ULONG ulCp[2] = {1}; /* codepages used */ -static UCHAR DBCSLead[12]; /* DBCS lead byte table */ - -/* rather simple-minded test to decide if given glyph index is a 'halfchar',*/ -/* i.e. Latin character in a DBCS font which is _not_ to be rotated */ -#define is_HALFCHAR(_x) ((_x) < 0x0400) - - -/****************************************************************************/ -/* */ -/* interfaceSEId: */ -/* */ -/* interfaceSEId (Interface-specific Encoding Id) determines what encoding */ -/* the font driver should use if a font includes a Unicode encoding. */ -/* */ -LONG interfaceSEId(TT_Face face, BOOL UDCflag, LONG encoding); - -/****************************************************************************/ -/* */ -/* LookUpName : */ -/* */ -/* this function tries to find M$ English name for a face */ -/* length is limited to FACESIZE (defined by OS/2); returns NULL if */ -/* unsuccessful. warning: the string gets overwritten on the next */ -/* invocation */ -/* */ -/* TODO: needs enhancing for I18N */ -static char* LookupName(TT_Face face, int index ); - - -/****************************************************************************/ -/* */ -/* GetCharMap : */ -/* */ -/* get suitable charmap from font */ -/* */ -static ULONG GetCharmap(TT_Face face); - - -/****************************************************************************/ -/* */ -/* GetOutlineLen : */ -/* */ -/* get # of bytes needed for glyph outline */ -/* */ -static int GetOutlineLen(TT_Outline *ol); - - -/****************************************************************************/ -/* */ -/* GetOutline : */ -/* */ -/* get glyph outline in PM format */ -/* */ -static int GetOutline(TT_Outline *ol, PBYTE pb); - - - -/****************************************************************************/ -/* */ -/* IsDBCSChar : */ -/* */ -/* Returns TRUE if character is first byte of a DBCS char, FALSE otherwise */ -/* */ -BOOL IsDBCSChar(UCHAR c) -{ - ULONG i; - - for (i = 0; DBCSLead[i] && DBCSLead[i+1]; i += 2) - if ((c >= DBCSLead[i]) && (c <= DBCSLead[i+1])) - return TRUE; - return FALSE; -} - - -/****************************************************************************/ -/* */ -/* TT_Alloc & TT_Free : */ -/* */ -/* The following two functions are declared here because including */ -/* the entire ttmemory.h creates more problems than it solves */ -/* */ -TT_Error TT_Alloc( long Size, void** P ); -TT_Error TT_Free( void** P ); -TT_Error TTMemory_Init(void); - -static TT_Error error; - -#define ALLOC( p, size ) TT_Alloc( (size), (void**)&(p) ) -#define FREE( p ) TT_Free( (void**)&(p) ) - -/****************************************************************************/ -/* */ -/* New_Element : */ -/* */ -/* return a fresh list element. Either new or recycled. */ -/* returns NULL if out of memory. */ -/* */ -static PListElement New_Element( void ) -{ - PListElement e = free_elements; - - if (e) - free_elements = e->next; - else - { - if ( ALLOC( e, sizeof(TListElement) ) ) - return NULL; - } - e->next = e->prev = e->data = NULL; - e->key = 0; - - return e; -} - -/****************************************************************************/ -/* */ -/* Done_Element : */ -/* */ -/* recycles an old list element */ -/* */ -static void Done_Element( PListElement element ) -{ - element->next = free_elements; - free_elements = element; -} - -/****************************************************************************/ -/* */ -/* List_Insert : */ -/* */ -/* inserts a new object at the head of a given list */ -/* returns 0 in case of success, -1 otherwise. */ -/* */ -static int List_Insert( PList list, PListElement element ) -{ - if (!list || !element) - return -1; - - element->next = list->head; - - if (list->head) - list->head->prev = element; - - element->prev = NULL; - list->head = element; - - if (!list->tail) - list->tail = element; - - list->count++; - return 0; -} - -/****************************************************************************/ -/* */ -/* List_Remove : */ -/* */ -/* removes an element from its list. Returns 0 in case of success, */ -/* -1 otherwise. WARNING : this function doesn't check that the */ -/* element is part of the list. */ -/* */ -static int List_Remove( PList list, PListElement element ) -{ - if (!element) - return -1; - - if (element->prev) - element->prev->next = element->next; - else - list->head = element->next; - - if (element->next) - element->next->prev = element->prev; - else - list->tail = element->prev; - - element->next = element->prev = NULL; - list->count --; - return 0; -} - -/****************************************************************************/ -/* */ -/* List_Find : */ -/* */ -/* Look for a given object with a specified key. Returns NULL if the */ -/* list is empty, or the object wasn't found. */ -/* */ -static PListElement List_Find( PList list, long key ) -{ - static PListElement cur; - - for ( cur=list->head; cur; cur = cur->next ) - if ( cur->key == key ) - return cur; - - /* not found */ - return NULL; -} - -/****************************************************************************/ -/* */ -/* Sleep_FontFile : */ -/* */ -/* closes a font file's FreeType objects to leave room in memory. */ -/* */ -static int Sleep_FontFile( PFontFile cur_file ) -{ - int i; - - if (!(cur_file->flags & FL_FLAG_LIVE_FACE)) - ERRRET(-1); /* already asleep */ - - /* is this face in use? */ - if (cur_file->flags & FL_FLAG_CONTEXT_OPEN) { - /* move face to top of the list */ - if (List_Remove( &liveFiles, cur_file->element )) - ERRRET(-1); - if (List_Insert( &liveFiles, cur_file->element )) - ERRRET(-1); - - cur_file = (PFontFile)(liveFiles.tail->data); - } - - /* remove the face from the live list */ - if (List_Remove( &liveFiles, cur_file->element )) - ERRRET(-1); - - /* add it to the sleep list */ - if (List_Insert( &idleFiles, cur_file->element )) - ERRRET(-1); - - /* deactivate its objects - we ignore errors there */ - for (i = 0; i < cur_file->numFaces; i++) { - TT_Done_Glyph( cur_file->faces[i].glyph ); - TT_Close_Face( cur_file->faces[i].face ); - } - cur_file->flags &= ~FL_FLAG_LIVE_FACE; - - return 0; -} - -/****************************************************************************/ -/* */ -/* Wake_FontFile : */ -/* */ -/* awakes a font file, and reloads important data from disk. */ -/* */ -static int Wake_FontFile( PFontFile cur_file ) -{ - static TT_Face face; - static TT_Glyph glyph; - static TT_CharMap cmap; - static TT_Face_Properties props; - static PFontFace cur_face; - ULONG encoding, i; - - if (cur_file->flags & FL_FLAG_LIVE_FACE) - ERRRET(-1); /* already awoken !! */ - - /* OK, try to activate the FreeType objects */ - error = TT_Open_Face(engine, cur_file->filename, &face); - if (error) - { - COPY( "Error while opening " ); CAT( cur_file->filename ); - CAT( ", error code = " ); CATI( error ); CAT( "\r\n" ); WRITE; - return -1; /* error, can't open file */ - /* XXX : should set error condition here! */ - } - - /* Create a glyph container for it */ - error = TT_New_Glyph( face, &glyph ); - if (error) - { - COPY( "Error while creating container for " ); CAT( cur_file->filename ); - CAT( ", error code = " ); CATI( error ); CAT( "\r\n" ); WRITE; - goto Fail_Face; - } - - /* now get suitable charmap for this font */ - encoding = GetCharmap(face); - error = TT_Get_CharMap(face, encoding & 0xFFFF, &cmap); - if (error) - { - COPY( "Error: No char map in " ); CAT( cur_file->filename ); - CAT( "\r\n" ); WRITE; - goto Fail_Glyph; - } - - /* Get face properties. Necessary to find out number of fonts for TTCs */ - TT_Get_Face_Properties(face, &props); - - /* all right, now remove the face from the sleep list */ - if (List_Remove( &idleFiles, cur_file->element )) - ERET1( Fail_Glyph ); - - /* add it to the live list */ - if (List_Insert( &liveFiles, cur_file->element )) - ERET1( Fail_Glyph ); - - /* If the file is a TTC, the first face is now opened successfully. */ - - cur_file->numFaces = props.num_Faces; - - /* Now allocate memory for face data (one struct for each face in TTC). */ - if (cur_file->faces == NULL) { - if (ALLOC(cur_face, sizeof(TFontFace) * cur_file->numFaces)) - ERET1( Fail_Glyph ); - - cur_file->faces = cur_face; - } - else - cur_face = cur_file->faces; - - cur_face->face = face; /* possibly first face in a TTC */ - cur_face->glyph = glyph; - cur_face->charMap = cmap; - cur_file->flags |= FL_FLAG_LIVE_FACE; - - - if (!(cur_file->flags & FL_FLAG_ALREADY_USED)) { - cur_face->charMode = encoding >> 16; /* Unicode, Symbol, ... */ - cur_face->em_size = props.header->Units_Per_EM; - - /* if a face contains over 1024 glyphs, assume it's a DBCS font - */ - /* VERY probable */ - TT_Get_Face_Properties(cur_face->face, &props); - - if (props.num_Glyphs > 1024) { - cur_file->flags |= FL_FLAG_DBCS_FILE; - cur_face->flags |= FC_FLAG_DBCS_FACE; - } - - cur_face->widths = NULL; - cur_face->kernIndices = NULL; - } - /* load kerning directory, if any */ - error = TT_Get_Kerning_Directory(face, &(cur_face->directory)); - if (error) - cur_face->directory.nTables = 0; /* indicates no kerning in font */ - - TT_Flush_Face(face); /* this is important ! */ - - /* open remaining faces if this font is a TTC */ - for (i = 1; i < cur_file->numFaces; i++) { - error = TT_Open_Collection(engine, cur_file->filename, - i, &face); - if (error) - return -1; /* TODO: handle bad TTCs more tolerantly */ - - error = TT_New_Glyph( face, &glyph ); - if (error) - ERET1(Fail_Face); - - encoding = GetCharmap(face); - error = TT_Get_CharMap(face, encoding & 0xFFFF, &cmap); - if (error) - ERET1(Fail_Glyph); - - cur_face = &(cur_file->faces[i]); - - cur_face->face = face; - cur_face->glyph = glyph; - cur_face->charMap = cmap; - - if (!(cur_file->flags & FL_FLAG_ALREADY_USED)) { - cur_face->em_size = props.header->Units_Per_EM; - cur_face->charMode = encoding >> 16; /* 0 - Unicode; 1 - Symbol */ - - if (cur_file->flags & FL_FLAG_DBCS_FILE) - cur_face->flags |= FC_FLAG_DBCS_FACE; - - cur_face->widths = NULL; - cur_face->kernIndices = NULL; - } - - /* load kerning directory, if any */ - error = TT_Get_Kerning_Directory(face, &(cur_face->directory)); - if (error) - cur_face->directory.nTables = 0; /* indicates no kerning in font */ - } - - cur_file->flags |= FL_FLAG_ALREADY_USED; /* indicates some fields need no re-init */ - - error = TT_Flush_Face(face); /* this is important ! */ - if (error) { - COPY("Error flushing face\r\n"); WRITE; - } - - return 0; /* everything is in order, return 0 == success */ - -Fail_Glyph: - /* This line isn't really necessary, because the glyph container */ - /* would be destroyed by the following TT_Close_Face anyway. We */ - /* however use it for the sake of orthodoxy */ - TT_Done_Glyph( glyph ); - -Fail_Face: - TT_Close_Face(face); - - /* note that in case of error (e.g. out of memory), the face stays */ - /* on the sleeping list */ - return -1; -} - -/****************************************************************************/ -/* */ -/* Done_FontFile : */ -/* */ -/* destroys a given font file object. This will also destroy all of its */ -/* live child font sizes (which in turn will destroy the glyph caches). */ -/* This is done for all faces if the file is a collection. */ -/* */ -/* WARNING : The font face must be removed from its list by the caller */ -/* before this function is called. */ -/* */ -static void Done_FontFile( PFontFile *file ) -{ - static PListElement element; - static PListElement next; - ULONG i; - -#if 0 /* this part isn't really used and maybe it never will */ - /* destroy its font sizes */ - element = (*face)->sizes.head; - while (element) - { - next = element->next; - /* XXX : right now, we simply free the font size object, */ - /* because the instance is destroyed automatically */ - /* by FreeType. */ - - FREE( element->data ); - /* Done_FontSize( (PFontSize)element->data ); - later */ - - Done_Element( element ); - element = next; - } -#endif - - /* now discard the font face itself */ - if ((*file)->flags & FL_FLAG_LIVE_FACE) - { - for (i = 0; i < (*file)->numFaces; i++) { - TT_Done_Glyph( (*file)->faces[i].glyph ); - TT_Close_Face( (*file)->faces[i].face ); - - if ((*file)->faces[i].widths) - FREE((*file)->faces[i].widths); - if ((*file)->faces[i].kernIndices) - FREE((*file)->faces[i].kernIndices); - } - } - - FREE( (*file)->faces ); - FREE( *file ); -} - - -/****************************************************************************/ -/* */ -/* New_FontFile : */ -/* */ -/* return the address of the TFontFile corresponding to a given */ -/* HFF. Note that in our implementation, we could simply to a */ -/* typecast like '(PFontFile)hff'. However, for safety reasons, we */ -/* look up the handle in the list. */ -/* */ -static PFontFile New_FontFile( char* file_name ) -{ - static PListElement element; - static PFontFile cur_file; - static TT_CharMap cmap; - - /* first, check if it's already open - in the live list */ - for ( element = liveFiles.head; element; element = element->next ) - { - cur_file = (PFontFile)element->data; - if (strcmp( cur_file->filename, file_name ) == 0) - goto Exit_Same; - } - - /* check in the idle list */ - for ( element = idleFiles.head; element; element = element->next ) - { - cur_file = (PFontFile)element->data; - if (strcmp( cur_file->filename, file_name ) == 0) - goto Exit_Same; - } - - /* OK, this file isn't opened yet. Create a new font face object */ - /* then try to wake it up. This will fail if the file can't be found */ - /* or if we lack memory.. */ - - element = New_Element(); - if (!element) - ERRRET(NULL); - - if ( ALLOC( cur_file, sizeof(TFontFile) ) ) - ERET1( Fail_Element ); - - element->data = cur_file; - element->key = (long)cur_file; /* use the HFF as cur key */ - - cur_file->element = element; - cur_file->ref_count = 1; - cur_file->hff = (HFF)cur_file; - strcpy( cur_file->filename, file_name); - cur_file->flags = 0; - cur_file->faces = NULL; -#if 0 /* not used */ - cur_face->sizes.head = NULL; - cur_face->sizes.tail = NULL; - cur_face->sizes.count= 0; -#endif - - /* add new font face to sleep list */ - if (List_Insert( &idleFiles, element )) - ERET1( Fail_File ); - - /* Make enough room in the live list */ - if ( liveFiles.count >= max_open_files) - { - COPY( "rolling...\n" ); WRITE; - if (Sleep_FontFile( (PFontFile)(liveFiles.tail->data) )) - ERET1( Fail_File ); - } - - /* wake new font file */ - if ( Wake_FontFile( cur_file ) ) - { - COPY( "could not open/wake " ); CAT( file_name ); CAT( "\r\n" ); WRITE; - if (List_Remove( &idleFiles, element )) - ERET1( Fail_File ); - - ERET1( Fail_File ); - } - - return cur_file; /* everything is in order */ - -Fail_File: - FREE( cur_file ); - -Fail_Element: - Done_Element( element ); - return NULL; - -Exit_Same: - cur_file->ref_count++; /* increment reference count */ - - COPY( " -> (duplicate) hff = " ); CATI( cur_file->hff ); - CAT( "\r\n" ); WRITE; - - return cur_file; /* no sense going on */ -} - -/****************************************************************************/ -/* */ -/* getFontFile : */ -/* */ -/* return the address of the TFontFile corresponding to a given */ -/* HFF. If asleep, the file and its face object(s) is awoken. */ -/* */ -PFontFile getFontFile( HFF hff ) -{ - static PListElement element; - - /* look in the live list first */ - element = List_Find( &liveFiles, (long)hff ); - if (element) - { - /* move it to the front of the live list - if it isn't already */ - if ( liveFiles.head != element ) - { - if ( List_Remove( &liveFiles, element ) ) - ERRRET( NULL ); - - if ( List_Insert( &liveFiles, element ) ) - ERRRET( NULL ); - } - return (PFontFile)(element->data); - } - - /* the file may be asleep, look in the second list */ - element = List_Find( &idleFiles, (long)hff ); - if (element) - { - /* we need to awake the font, but before that, we must be sure */ - /* that there is enough room in the live list */ - if ( liveFiles.count >= max_open_files ) - if (Sleep_FontFile( (PFontFile)(liveFiles.tail->data) )) - ERRRET( NULL ); - - if ( Wake_FontFile( (PFontFile)(element->data) ) ) - ERRRET( NULL ); - - COPY ( "hff " ); CATI( hff ); CAT( " awoken\n" ); WRITE; - return (PFontFile)(element->data); - } - - COPY( "Could not find hff " ); CATI( hff ); CAT( " in lists\n" ); WRITE; - -#ifdef DEBUG - - /* dump files lists */ - COPY( "Live files : " ); CATI( liveFiles.count ); CAT( "\r\n" ); WRITE; - - for (element = liveFiles.head; element; element = element->next) - { - COPY( ((PFontFile)(element->data))->filename ); CAT("\r\n");WRITE; - } - - COPY( "Idle files : " ); CATI( idleFiles.count ); CAT( "\r\n" ); WRITE; - for (element = idleFiles.head; element; element = element->next) - { - COPY( ((PFontFile)(element->data))->filename ); CAT("\r\n");WRITE; - } -#endif - - /* could not find the HFF in the list */ - return NULL; -} - - -/****************************************************************************/ -/* */ -/* getFontSize : */ -/* */ -/* return pointer to a TFontSize given a HFC handle, NULL if error */ -/* */ -static PFontSize getFontSize( HFC hfc ) -{ - int i; - for ( i = 0; i < MAX_CONTEXTS; i++ ) - if ( contexts[i].hfc == hfc ) { - return &contexts[i]; - } - - return NULL; -} - -#ifdef USE_UCONV - -/* maximum number of cached UCONV objects */ -#define MAX_UCONV_CACHE 10 - -/* UCONV object used for conversion from UGL to Unicode */ -#define UCONV_TYPE_UGL 1 - -/* UCONV objects used for conversion from local DBCS codepage to Unicode */ -#define UCONV_TYPE_BIG5 2 -#define UCONV_TYPE_SJIS 4 - -/* UCONV objects cache entry */ -typedef struct _UCACHEENTRY { - UconvObject object; /* actual UCONV object */ - PID pid; /* process ID the object is valid for */ - ULONG type; /* type of UCONV object (UGL or DBCS) */ -} UCACHEENTRY, *PUCACHEENTRY; - -/* UCONV globals */ -static UCACHEENTRY UconvCache[MAX_UCONV_CACHE]; /* 10 should do it */ -static int slotsUsed = 0; /* number of cache slots used */ - -/****************************************************************************/ -/* */ -/* getUconvObject : */ -/* */ -/* a function to cache UCONV objects based on current process. The only */ -/* problem is that FT/2 currently doesn't keep track of processes and */ -/* consequently the objects aren't freed when a process ends. But UCONV */ -/* frees the objects itself anyway. */ -int getUconvObject(UniChar *name, UconvObject *ConvObj, ULONG UconvType) { - PPIB ppib; /* process/thread info blocks */ - PTIB ptib; - PID curPid; /* current process ID */ - int i; - - /* query current process ID */ - if (DosGetInfoBlocks(&ptib, &ppib)) - return -1; - - curPid = ppib->pib_ulpid; - - if (slotsUsed == 0) { /* initialize cache */ - if (UniCreateUconvObject(name, ConvObj) != ULS_SUCCESS) - return -1; - UconvCache[0].object = *ConvObj; - UconvCache[0].pid = curPid; - UconvCache[0].type = UconvType; - - for (i = 1; i < MAX_UCONV_CACHE; i++) { - UconvCache[i].object = NULL; - UconvCache[i].pid = 0; - } - slotsUsed = 1; - return 0; - } - - /* search cache for available conversion object */ - i = 0; - while ((UconvCache[i].pid != curPid || UconvCache[i].type != UconvType) - && i < slotsUsed) - i++; - - if (i < slotsUsed) { /* entry found in cache */ - *ConvObj = UconvCache[i].object; - return 0; - } - - /* if cache is full, remove first entry and shift the others 'down' */ - if (slotsUsed == MAX_UCONV_CACHE) { - UniFreeUconvObject(UconvCache[0].object); - for (i = 1; i < MAX_UCONV_CACHE; i++) { - UconvCache[i - 1].object = UconvCache[i].object; - UconvCache[i - 1].pid = UconvCache[i].pid; - UconvCache[i - 1].type = UconvCache[i].type; - } - } - - if (UniCreateUconvObject(name, ConvObj) != ULS_SUCCESS) - return -1; - - if (slotsUsed < MAX_UCONV_CACHE) - slotsUsed++; - - UconvCache[slotsUsed - 1].object = *ConvObj; - UconvCache[slotsUsed - 1].pid = curPid; - UconvCache[slotsUsed - 1].type = UconvType; - - return 0; -} - -/****************************************************************************/ -/* */ -/* CleanUCONVCache : */ -/* */ -/* When process is terminated, removes this process' entries in the UCONV */ -/* object cache. Errors are disregarded at this point. */ -void CleanUCONVCache(void) { - PPIB ppib; /* process/thread info blocks */ - PTIB ptib; - PID curPid; /* current process ID */ - int i = 0, j; - - /* query current process ID */ - if (DosGetInfoBlocks(&ptib, &ppib)) - return; - - curPid = ppib->pib_ulpid; - - while (i < slotsUsed) { - /* if PID matches, remove the entry and shift the others 'down' (or up?) */ - if (UconvCache[i].pid == curPid) { - UniFreeUconvObject(UconvCache[i].object); - for (j = i + 1; j < slotsUsed; j++) { - UconvCache[j - 1].object = UconvCache[j].object; - UconvCache[j - 1].pid = UconvCache[j].pid; - UconvCache[j - 1].type = UconvCache[j].type; - } - slotsUsed--; - } - i++; - } -} -#endif /* USE_UCONV */ - -/****************************************************************************/ -/* */ -/* PM2TT : */ -/* */ -/* a function to convert PM codepoint to TT glyph index. This is the real */ -/* tricky part. */ -/* mode = TRANSLATE_UGL - translate UGL to Unicode */ -/* mode = TRANSLATE_SYMBOL - no translation - symbol font */ -/* mode = TRANSLATE_UNICODE- no translation - Unicode */ -static int PM2TT( TT_CharMap charMap, - ULONG mode, - int index) -{ -#ifdef USE_UCONV - /* Brand new version that uses UCONV.DLL. This should make FreeType/2 */ - /* smaller and at the same time more flexible as it now should use */ - /* the Unicode translation tables supplied with base OS/2 Warp 4. */ - /* Unfortunately there's a complication (again) since UCONV objects */ - /* created in one process can't be used in another. Therefore we */ - /* keep a small cache of recently used UCONV objects. */ - static UconvObject UGLObj = NULL; /* UGL->Unicode conversion object */ - static BOOL UconvSet = FALSE; - char char_data[2], *pin_char_str; - size_t in_bytes_left, uni_chars_left, num_subs; - UniChar *pout_uni_str, uni_buffer[4]; - int rc; - static UniChar uglName[10] = L"OS2UGL"; - static UniChar uglNameBig5[10] = L"IBM-950"; - static UniChar uglNameSJIS[10] = L"IBM-943"; - - switch (mode) { - case TRANSLATE_UGL: - if (UconvSet == FALSE) { - switch (iLangId) { /* select proper conversion table */ - case TT_MS_LANGID_GREEK_GREECE: - strncpy((char*)uglName, (char*)L"OS2UGLG", 16); - break; - case TT_MS_LANGID_HEBREW_ISRAEL: - strncpy((char*)uglName, (char*)L"OS2UGLH", 16); - break; - case TT_MS_LANGID_ARABIC_SAUDI_ARABIA: - strncpy((char*)uglName, (char*)L"OS2UGLA", 16); - break; - } - UconvSet = TRUE; - } - - /* get Uconv object - either new or cached */ - if (getUconvObject(uglName, &UGLObj, UCONV_TYPE_UGL) != 0) - return 0; - - if (index > MAX_GLYPH) - return 0; - - char_data[0] = index; - char_data[1] = index >> 8; - - pout_uni_str = uni_buffer; - pin_char_str = char_data; - in_bytes_left = 2; - uni_chars_left = 1; - - rc = UniUconvToUcs(UGLObj, (void**)&pin_char_str, &in_bytes_left, - &pout_uni_str, &uni_chars_left, - &num_subs); - if (rc != ULS_SUCCESS) - return 0; - else - return TT_Char_Index(charMap, ((unsigned short*)uni_buffer)[0]); - - case TRANSLATE_SYMBOL: - case TRANSLATE_UNICODE: - case TRANSLATE_BIG5: - case TRANSLATE_SJIS: - return TT_Char_Index(charMap, index); - - case TRANSLATE_UNI_BIG5: - case TRANSLATE_UNI_SJIS: - - /* get Uconv object - either new or cached */ - switch (mode) { - /* get proper conversion object */ - case TRANSLATE_UNI_BIG5: - if (getUconvObject(uglNameBig5, &UGLObj, UCONV_TYPE_BIG5) != 0) - return 0; - break; - - case TRANSLATE_UNI_SJIS: - if (getUconvObject(uglNameSJIS, &UGLObj, UCONV_TYPE_SJIS) != 0) - return 0; - break; - } - - /* Note the bytes are swapped here for double byte chars! */ - if (index & 0xFF00) { - char_data[0] = (index & 0xFF00) >> 8; - char_data[1] = index & 0x00FF; - } - else { - char_data[0] = index; - char_data[1] = 0; - } - - pout_uni_str = uni_buffer; - pin_char_str = char_data; - in_bytes_left = 2; - uni_chars_left = 2; - - rc = UniUconvToUcs(UGLObj, (void**)&pin_char_str, &in_bytes_left, - &pout_uni_str, &uni_chars_left, - &num_subs); - if (rc != ULS_SUCCESS) - return 0; - else - return TT_Char_Index(charMap, ((unsigned short*)uni_buffer)[0]); - - default: - return 0; - } -#else - switch (mode) - { - /* convert from PM383 to Unicode */ - case TRANSLATE_UGL: - /* TODO: Hebrew and Arabic UGL */ - if (iLangId == TT_MS_LANGID_GREEK_GREECE) /* use Greek UGL */ - if ((index >= GREEK_START) && (index < GREEK_START + GREEK_GLYPHS)) - return TT_Char_Index(charMap, SubUGLGreek[index - GREEK_START]); - - if (index <= MAX_GLYPH) - return TT_Char_Index(charMap, UGL2Uni[index]); - else - ERRRET(0); - - case TRANSLATE_SYMBOL : - case TRANSLATE_UNICODE: - case TRANSLATE_BIG5: - case TRANSLATE_SJIS: - return TT_Char_Index(charMap, index); - - default: - return 0; - } -#endif -} - -/****************************************************************************/ -/* */ -/* mystricmp : */ -/* */ -/* A simple function for comparing strings without case sensitivity. Just */ -/* returns zero if strings match, one otherwise. I wrote this because */ -/* stricmp is not available in the subsystem run-time library (probably */ -/* because it uses locales). toupper() is unfortunately unavailable too. */ -/* */ - -#define toupper( c ) ( ((c) >= 'a') && ((c) <= 'z') ? (c) - 'a' + 'A' : (c) ) - -static -int mystricmp(const char *s1, const char *s2) { - int i = 0; - int match = 0; - int len = strlen(s1); - - if (len != strlen(s2)) - return 1; /* no match */ - - while (i < len) { - if (toupper(s1[i]) != toupper(s2[i])) { - match = 1; - break; - } - i++; - } - return match; -} - -/* DBCS enabled strrchr (only looks for SBCS chars though) */ -static -char *mystrrchr(char *s, char c) { - int i = 0; - int lastfound = -1; - int len = strlen(s); - - while (i <= len) { - if (IsDBCSChar(s[i])) { - i += 2; - continue; - } - if (s[i] == c) - lastfound = i; - i++; - } - if (lastfound == -1) - return NULL; - else - return s + lastfound; -} - -/* -------------------------------------------------------------------------*/ -/* here begin the exported functions */ -/* -------------------------------------------------------------------------*/ - -/****************************************************************************/ -/* */ -/* ConvertFontFile : */ -/* */ -/* Install/delete font file */ -/* */ -LONG _System ConvertFontFile( PSZ source, - PSZ dest_dir, - PSZ new_name ) -{ - PSZ source_name; - - COPY("ConvertFontFile: Src = "); CAT(source); - if (dest_dir) { - CAT(", DestDir = "); CAT(dest_dir); - } - CAT("\r\n"); WRITE; - - if (dest_dir && new_name) - { - /* install the font file */ - source_name = mystrrchr( source, '\\' ); /* find the last backslash */ - if (!source_name) - ERRRET(-1); - - source_name++; - strcpy( new_name, source_name ); - - /* check if file is to be copied onto itself */ - if (strncmp(source, dest_dir, strlen(dest_dir)) == 0) - return OK; /* do nothing */ - - if ( DosCopy( source, dest_dir, DCPY_EXISTING) ) /* overwrite file */ - ERRRET(-1); /* XXX : we should probably set the error condition */ - - COPY(" -> Name: "); CAT(new_name); CAT("\r\n"); WRITE; - } - else - { - COPY("Delete file "); CAT(source); CAT("\r\n"); WRITE; - DosDelete(source); /* fail quietly */ - } - - return OK; -} - -/****************************************************************************/ -/* */ -/* LoadFontFile : */ -/* */ -/* open a font file and return a handle for it */ -/* */ -HFF _System LoadFontFile( PSZ file_name ) -{ - PSZ extension; - PFontFile cur_file; - PListElement element; - - COPY( "LoadFontFile " ); CAT( file_name ); CAT( "\r\n" ); WRITE; - - /* first check if the file extension is supported */ - extension = mystrrchr( file_name, '.' ); /* find the last dot */ - if ( extension == NULL || - (mystricmp(extension, ".TTF") && - mystricmp(extension, ".TTC")) ) - return ((HFF)-1); - - /* now actually open the file */ - cur_file = New_FontFile( file_name ); - if (cur_file) - return cur_file->hff; - else - return (HFF)-1; -} - -/****************************************************************************/ -/* */ -/* UnloadFontFile : */ -/* */ -/* destroy resources associated with a given HFF */ -/* */ -LONG _System UnloadFontFile( HFF hff ) -{ - PListElement element; - - COPY("UnloadFontFile: hff = "); CATI((int) hff); CAT("\r\n"); WRITE; - - /* look in the live list first */ - for (element = liveFiles.head; element; element = element->next) - { - if (element->key == (long)hff) - { - PFontFile file = (PFontFile)element->data; - - if (--file->ref_count > 0) /* don't really close, return OK */ - return 0; - - List_Remove( &liveFiles, element ); - Done_Element( element ); - Done_FontFile( &file ); - return 0; - } - } - - /* now look in sleep list */ - for (element = idleFiles.head; element; element = element->next) - { - if (element->key == (long)hff) - { - PFontFile file = (PFontFile)element->data; - - if (--file->ref_count > 0) /* don't really close, return OK */ - return 0; - - List_Remove( &idleFiles, element ); - Done_Element( element ); - Done_FontFile( &file ); - return 0; - } - } - - /* didn't find the file */ - return -1; -} - -/****************************************************************************/ -/* */ -/* QueryFaces : */ -/* */ -/* Return font metrics. This routine has to do a lot of not very */ -/* hard work. */ -/* */ -LONG _System QueryFaces( HFF hff, - PIFIMETRICS pifiMetrics, - ULONG cMetricLen, - ULONG cFontCount, - ULONG cStart) -{ - static TT_Face_Properties properties; - static IFIMETRICS ifi; /* temporary structure */ - PFontFace pface; - TT_Header *phead; - TT_Horizontal_Header *phhea; - TT_OS2 *pOS2; - TT_Postscript *ppost; - PIFIMETRICS pifi2; - PFontFile file; - LONG index, faceIndex, ifiCount = 0; - char *name; - - COPY( "QueryFaces: hff = " ); CATI( hff ); - CAT( ", cFontCount = " ); CATI( cFontCount ); - CAT( ", cStart = " ); CATI( cStart ); - CAT( ", cMetricLen = " ); CATI( cMetricLen ); - CAT( "\r\n"); - WRITE; - - file = getFontFile(hff); - if (!file) - ERRRET(-1) /* error, invalid handle */ - - if (cMetricLen == 0) { /* only number of faces is requested */ -# ifdef FAKE_TNR - /* create an alias for Times New Roman */ - pface = &(file->faces[0]); - name = LookupName(pface->face, TT_NAME_ID_FONT_FAMILY); - if (!strcmp(name, "Times New Roman")) { - file->flags |= FL_FLAG_FAKE_ROMAN; - return 2; - } -# endif - if (file->flags & FL_FLAG_DBCS_FILE) - return file->numFaces * 2; - else - return file->numFaces; - } - - for (faceIndex = 0; faceIndex < file->numFaces; faceIndex++) { - /* get pointer to this face's data */ - pface = &(file->faces[faceIndex]); - - TT_Get_Face_Properties( pface->face, &properties ); - - pOS2 = properties.os2; - phead = properties.header; - phhea = properties.horizontal; - ppost = properties.postscript; - - /* get font name and check it's really found */ - name = LookupName(pface->face, TT_NAME_ID_FONT_FAMILY); - if (name == NULL) - ERET1(Fail); - - strncpy(ifi.szFamilyname, name, FACESIZE); - ifi.szFamilyname[FACESIZE - 1] = '\0'; - - name = LookupName(pface->face, TT_NAME_ID_FULL_NAME); - if (name == NULL) { - ERET1(Fail); - } - strncpy(ifi.szFacename, name, FACESIZE); - ifi.szFacename[FACESIZE - 1] = '\0'; - - /* If Unicode cmap exists in font and it contains more than 1024 glyphs, */ - /* then do not translate from UGL to Unicode and use straight Unicode. */ - /* But first check if it's a DBCS font and handle it properly */ - if ((pface->charMode == TRANSLATE_UGL) && (properties.num_Glyphs > 1024)) - { - LONG specEnc; - BOOL UDCflag = FALSE; /* !!!!TODO: UDC support */ - - specEnc = interfaceSEId(pface->face, UDCflag, PSEID_UNICODE); - switch (specEnc) { - case PSEID_SHIFTJIS: - strcpy( ifi.szGlyphlistName, "PMJPN" ); - pface->charMode = TRANSLATE_UNI_SJIS; - break; - - case PSEID_BIG5: - strcpy( ifi.szGlyphlistName, "PMCHT" ); - pface->charMode = TRANSLATE_UNI_BIG5; - break; - - default: /* do use straight Unicode */ - strcpy( ifi.szGlyphlistName, "UNICODE" ); - pface->charMode = TRANSLATE_UNICODE; /* straight Unicode */ - } -#if 0 - strcpy( ifi.szGlyphlistName, "PMJPN" ); - pface->charMode = TRANSLATE_UNI_SJIS; -#endif - } - else - if (pface->charMode == TRANSLATE_SYMBOL) /* symbol encoding */ - strcpy(ifi.szGlyphlistName, "SYMBOL"); - else - if (pface->charMode == TRANSLATE_BIG5) /* Big5 encoding */ - strcpy(ifi.szGlyphlistName, "PMCHT"); - else - if (pface->charMode == TRANSLATE_SJIS) - strcpy(ifi.szGlyphlistName, "PMJPN"); /* ShiftJIS encoding */ - else - strcpy(ifi.szGlyphlistName, "PM383"); - - ifi.idRegistry = 0; - ifi.lCapEmHeight = phead->Units_Per_EM; /* ??? probably correct */ - ifi.lXHeight = phead->yMax /2; /* IBM TRUETYPE.DLL does */ - ifi.lMaxAscender = pOS2->usWinAscent; - - if ((LONG)pOS2->usWinDescent >= 0) - ifi.lMaxDescender = pOS2->usWinDescent; - else - ifi.lMaxDescender = -pOS2->usWinDescent; - - ifi.lLowerCaseAscent = phhea->Ascender; - ifi.lLowerCaseDescent = -phhea->Descender; - - ifi.lInternalLeading = ifi.lMaxAscender + ifi.lMaxDescender - - ifi.lCapEmHeight; - - ifi.lExternalLeading = 0; - ifi.lAveCharWidth = pOS2->xAvgCharWidth; - ifi.lMaxCharInc = phhea->advance_Width_Max; - ifi.lEmInc = phead->Units_Per_EM; - ifi.lMaxBaselineExt = ifi.lMaxAscender + ifi.lMaxDescender; - ifi.fxCharSlope = -ppost->italicAngle; /* is this correct ? */ - ifi.fxInlineDir = 0; - ifi.fxCharRot = 0; - ifi.usWeightClass = pOS2->usWeightClass; /* hopefully OK */ - ifi.usWidthClass = pOS2->usWidthClass; - ifi.lEmSquareSizeX = phead->Units_Per_EM; - ifi.lEmSquareSizeY = phead->Units_Per_EM; /* probably correct */ - ifi.giFirstChar = 0; /* following values should work */ - ifi.giLastChar = 503; /* either 383 or 503 */ - ifi.giDefaultChar = 0; - ifi.giBreakChar = 32; - ifi.usNominalPointSize = 120; /* these are simply constants */ - ifi.usMinimumPointSize = 10; - ifi.usMaximumPointSize = 10000; /* limit to 1000 pt (like the ATM fonts) */ - ifi.fsType = pOS2->fsType & IFIMETRICS_LICENSED; /* ??? */ - ifi.fsDefn = IFIMETRICS_OUTLINE; /* always with TrueType */ - ifi.fsSelection = 0; - ifi.fsCapabilities = 0; /* must be zero according to the IFI spec */ - ifi.lSubscriptXSize = pOS2->ySubscriptXSize; - ifi.lSubscriptYSize = pOS2->ySubscriptYSize; - ifi.lSubscriptXOffset = pOS2->ySubscriptXOffset; - ifi.lSubscriptYOffset = pOS2->ySubscriptYOffset; - ifi.lSuperscriptXSize = pOS2->ySuperscriptXSize; - ifi.lSuperscriptYSize = pOS2->ySuperscriptYSize; - ifi.lSuperscriptXOffset = pOS2->ySuperscriptXOffset; - ifi.lSuperscriptYOffset = pOS2->ySuperscriptYOffset; - ifi.lUnderscoreSize = ppost->underlineThickness; - if (ifi.lUnderscoreSize == 150) - ifi.lUnderscoreSize = 100; /* little fix for Arial */ - ifi.lUnderscorePosition = -ppost->underlinePosition; - ifi.lStrikeoutSize = pOS2->yStrikeoutSize; - ifi.lStrikeoutPosition = pOS2->yStrikeoutPosition; - -#if 1 - if (pface->directory.nTables != 0 && - pface->directory.tables[0].format == 0) { /* we support only format */ - ifi.cKerningPairs = (pface->directory.tables[0].length - 8) / 6; - ifi.fsType |= IFIMETRICS_KERNING; /* !!! for testing only! */ - } - else -#endif - ifi.cKerningPairs = 0; - - /* Note that the following field seems to be the only reliable method of */ - /* recognizing a TT font from an app! Not that it should be done. */ - ifi.ulFontClass = 0x10D; /* just like TRUETYPE.DLL */ - - /* the following adjustment are needed because the TT spec defines */ - /* usWeightClass and fsType differently */ - if (ifi.usWeightClass >= 100) - ifi.usWeightClass /= 100; - if (ifi.usWeightClass == 4) - ifi.usWeightClass = 5; /* does this help? */ - if (pOS2->panose[3] == 9) { - ifi.fsType |= IFIMETRICS_FIXED; - pface->flags |= FC_FLAG_FIXED_WIDTH; /* we'll need this later */ - } - - switch (pface->charMode) { /* adjustments for var. encodings */ - case TRANSLATE_UNICODE: - ifi.giLastChar = pOS2->usLastCharIndex; - ifi.fsType |= IFIMETRICS_MBCS | IFIMETRICS_DBCS; - break; - - case TRANSLATE_SYMBOL: - ifi.giLastChar = 255; - break; - - case TRANSLATE_BIG5: - case TRANSLATE_UNI_BIG5: - ifi.giLastChar = 383; - ifi.fsType |= IFIMETRICS_MBCS | IFIMETRICS_DBCS; - break; - - case TRANSLATE_SJIS: - case TRANSLATE_UNI_SJIS: - ifi.giLastChar = 890; - ifi.fsType |= IFIMETRICS_MBCS | IFIMETRICS_DBCS; - break; - - } - - /* adjust fsSelection (TT defines this differently) */ - /* Note: Interestingly, the PMATM font driver seems to use the values - defined in TT spec, at least for italic. Strange. Better leave it. */ - if (pOS2->fsSelection & 0x01) { - ifi.fsSelection |= 0x01; - } - if (pOS2->fsSelection & 0x02) { - ifi.fsSelection |= IFIMETRICS_UNDERSCORE; - } - if (pOS2->fsSelection & 0x04) { - ifi.fsSelection |= IFIMETRICS_OVERSTRUCK; - } - - /* copy the right amount of data to output buffer, */ - /* also handle the 'fake' vertically rendered DBCS fonts */ - index = faceIndex * ((file->flags & FL_FLAG_DBCS_FILE) ? 2 : 1); - if ((index >= cStart) && (index < (cStart + cFontCount))) { - memcpy((((PBYTE) pifiMetrics) + ifiCount), &ifi, - sizeof(IFIMETRICS) > cMetricLen ? cMetricLen : sizeof(IFIMETRICS)); - ifiCount += cMetricLen; - } - if ((file->flags & FL_FLAG_DBCS_FILE) && (index + 1 >= cStart) && - (index + 1 < (cStart + cFontCount))) { - - pifi2 = (PIFIMETRICS) (((PBYTE) pifiMetrics) + ifiCount); - memcpy(pifi2, &ifi, - sizeof(IFIMETRICS) > cMetricLen ? cMetricLen : sizeof(IFIMETRICS)); - strcpy(pifi2->szFamilyname + 1, ifi.szFamilyname); - pifi2->szFamilyname[0] = '@'; - strcpy(pifi2->szFacename + 1, ifi.szFacename); - pifi2->szFacename[0] = '@'; - ifiCount += cMetricLen; - } -# ifdef FAKE_TNR - if ((file->flags & FL_FLAG_FAKE_ROMAN) && (index + 1 >= cStart) && - (index + 1 < (cStart + cFontCount))) { - pifi2 = (PIFIMETRICS) (((PBYTE) pifiMetrics) + ifiCount); - memcpy(pifi2, &ifi, - sizeof(IFIMETRICS) > cMetricLen ? cMetricLen : sizeof(IFIMETRICS)); - strcpy(pifi2->szFamilyname, "Roman"); - switch (strlen(ifi.szFacename)) { /* This looks weird but... works */ - case 15: /* Times New Roman */ - strcpy(pifi2->szFacename, "Tms Rmn"); - break; - case 20: /* Times New Roman Bold*/ - strcpy(pifi2->szFacename, "Tms Rmn Bold"); - break; - case 22: /* Times New Roman Italic*/ - strcpy(pifi2->szFacename, "Tms Rmn Italic"); - break; - case 27: /* Times New Roman Bold Italic*/ - strcpy(pifi2->szFacename, "Tms Rmn Bold Italic"); - break; - } - ifiCount += cMetricLen; - } -# endif - } - -Exit: - TT_Flush_Face(pface->face); - return cFontCount; - -Fail: - TT_Flush_Face(pface->face); - return -1; -} - -/****************************************************************************/ -/* */ -/* OpenFontContext : */ -/* */ -/* open new font context */ -/* */ -HFC _System OpenFontContext( HFF hff, - ULONG ulFont) -{ - int i = 0; - static TT_Instance instance; - static PFontFile file; - ULONG faceIndex; - - COPY("OpenFontContext: hff = "); CATI((int) hff); CAT("\r\n"); - COPY(" ulFont = "); CATI((int) ulFont); CAT("\r\n"); - WRITE; - - file = getFontFile(hff); - if (!file) - ERRRET((HFC)-1) /* error, invalid font handle */ - - /* calculate real face index in font file */ - faceIndex = file->flags & FL_FLAG_DBCS_FILE ? ulFont / 2 : ulFont; - -# ifdef FAKE_TNR - if (file->flags & FL_FLAG_FAKE_ROMAN) - /* This font isn't real! */ - faceIndex = 0; -# endif - - if (faceIndex > file->numFaces) - ERRRET((HFC)-1) - - /* OK, create new instance with defaults */ - error = TT_New_Instance( file->faces[faceIndex].face, &instance); - if (error) - ERET1( Fail ); - - /* Instance resolution is set to 72 dpi and is never changed */ - error = TT_Set_Instance_Resolutions(instance, 72, 72); - if (error) - ERRRET((HFC)-1) - - /* find first unused index */ - i = 0; - while ((contexts[i].hfc != 0) && (i < MAX_CONTEXTS)) - i++; - - if (i == MAX_CONTEXTS) - ERET1( Fail ); /* no free slot in table */ - - contexts[i].hfc = (HFC)(i + 0x100); /* initialize table entries */ - contexts[i].instance = instance; - contexts[i].transformed = FALSE; /* no scaling/rotation assumed */ - contexts[i].file = file; - contexts[i].faceIndex = faceIndex; - - /* for DBCS fonts/collections, odd indices are vertical versions*/ - if ((file->flags & FL_FLAG_DBCS_FILE) && (ulFont & 1)) - contexts[i].vertical = TRUE; - else - contexts[i].vertical = FALSE; - - file->flags |= FL_FLAG_CONTEXT_OPEN; /* flag as in-use */ - - COPY("-> hfc "); CATI((int) contexts[i].hfc); CAT("\r\n"); WRITE; - - TT_Flush_Face(file->faces[faceIndex].face); - return contexts[i].hfc; /* everything OK */ - -Fail: - TT_Flush_Face(file->faces[faceIndex].face); - return (HFC)-1; -} - -/****************************************************************************/ -/* */ -/* SetFontContext : */ -/* */ -/* set font context parameters */ -/* */ -LONG _System SetFontContext( HFC hfc, - PCONTEXTINFO pci ) -{ - LONG ptsize, temp, emsize; - PFontSize size; - - COPY("SetFontContext: hfc = "); CATI((int) hfc); - CAT(", sizlPPM.cx = "); CATI((int) pci->sizlPPM.cx); - CAT(", sizlPPM.cy = "); CATI((int) pci->sizlPPM.cy); - CAT("\r\n pfxSpot.x = "); CATI((int) pci->pfxSpot.x); - CAT(", pfxSpot.y = "); CATI((int) pci->pfxSpot.y); - CAT("\r\n eM11 = "); CATI((int) pci->matXform.eM11); - CAT(", eM12 = "); CATI((int) pci->matXform.eM12); - CAT(", eM21 = "); CATI((int) pci->matXform.eM21); - CAT(", eM22 = "); CATI((int) pci->matXform.eM22); - CAT("\r\n"); - WRITE; - - size = getFontSize(hfc); - if (!size) - ERRRET(-1) /* error, invalid context handle */ - - emsize = size->file->faces[size->faceIndex].em_size; - - /* Look at matrix and see if a transform is asked for */ - /* Actually when rotating by 90 degrees hinting could be used */ - - size->transformed = - ( pci->matXform.eM11 != pci->matXform.eM22 || - (pci->matXform.eM12 | pci->matXform.eM21) != 0 || - pci->matXform.eM11 <= 0 ); - - if ( size->transformed ) - { - /* check for simple stretch in one direction */ - if ((pci->matXform.eM11 > 0 && pci->matXform.eM22 > 0) && - (pci->matXform.eM12 | pci->matXform.eM21) == 0) { - - LONG ptsizex, ptsizey; - - size->transformed = FALSE; /* will be handled like nontransformed font */ - - ptsizex = (emsize * pci->matXform.eM11) >> 10; - ptsizey = (emsize * pci->matXform.eM22) >> 10; - - error = TT_Set_Instance_CharSizes(size->instance, ptsizex, ptsizey); - if (error) - ERRRET(-1) /* engine problem */ - - return 0; - } - /* note that eM21 and eM12 are swapped; I have no idea why, but */ - /* it seems to be correct */ - size->matrix.xx = pci->matXform.eM11 * 64; - size->matrix.xy = pci->matXform.eM21 * 64; - size->matrix.yx = pci->matXform.eM12 * 64; - size->matrix.yy = pci->matXform.eM22 * 64; - - /* set pointsize to Em size; this effectively disables scaling */ - /* but enables use of hinting */ - error = TT_Set_Instance_CharSize(size->instance, emsize); - if (error) - ERRRET(-1) /* engine problem */ - - return 0; - } - - /* calculate & set point size */ - ptsize = (emsize * (pci->matXform.eM11 + pci->matXform.eM21)) >> 10; - - if (ptsize <= 0) /* must not allow zero point size ! */ - ptsize = 1; /* !!! should be handled better */ - - error = TT_Set_Instance_CharSize(size->instance, ptsize); - if (error) - ERRRET(-1) /* engine problem */ - - return 0; /* pretend everything is OK */ -} - -/****************************************************************************/ -/* */ -/* CloseFontContext : */ -/* */ -/* destroy a font context */ -/* */ -LONG _System CloseFontContext( HFC hfc) -{ - PFontSize size; - - COPY("CloseFontContext: hfc = "); CATI((int)hfc); CAT("\r\n"); WRITE; - - size = getFontSize(hfc); - if (!size) - ERRRET(-1) /* error, invalid context handle */ - - /* mark table entry as free */ - size->hfc = 0; - - /* !!!!! set flag in TFontFile structure */ - size->file->flags &= ~FL_FLAG_CONTEXT_OPEN; /* reset the in-use flag */ - - if (size->file->flags & FL_FLAG_LIVE_FACE) { - COPY("Closing instance: "); CATI((int)(size->instance.z)); CAT("\r\n"); WRITE; - error = TT_Done_Instance(size->instance); - if (error) - ERRRET(-1) /* engine error */ - } - - COPY("CloseFontContext successful\r\n"); WRITE; - - return 0; /* success */ -} - -#define MAX_KERN_INDEX 504 - -GLYPH ReverseTranslate(PFontFace face, USHORT index) { - ULONG i; - GLYPH newidx = 0; - - /* TODO: enable larger fonts */ - for (i = 0; i < MAX_KERN_INDEX; i++) { - newidx = PM2TT(face->charMap, - face->charMode, - i); - if (newidx == index) - break; - } - if (i < MAX_KERN_INDEX) - return i; - else - return 0; -} - -/****************************************************************************/ -/* */ -/* QueryFaceAttr */ -/* */ -/* Return various info about font face */ -/* */ -LONG _System QueryFaceAttr( HFC hfc, - ULONG iQuery, - PBYTE pBuffer, - ULONG cb, - PGLYPH pagi, - GLYPH giStart ) -{ - int count, i = 0; - PFontSize size; - PFontFace face; - static TT_Face_Properties properties; - TT_OS2 *pOS2; - ABC_TRIPLETS* pt; - - COPY("QueryFaceAttr: hfc = "); CATI((int) hfc); CAT("\r\n"); WRITE; - - size = getFontSize(hfc); - if (!size) - ERRRET(-1) /* error, invalid context handle */ - - face = &(size->file->faces[size->faceIndex]); - - if (iQuery == FD_QUERY_KERNINGPAIRS) - { - TT_Kern_0 kerntab; /* actual kerning table */ - ULONG used = 0; /* # bytes used in output buffer */ - FD_KERNINGPAIRS *kpair; - USHORT *kernIndices, idx; - - count = cb / sizeof(FD_KERNINGPAIRS); - - COPY("QUERY_KERNINGPAIRS, "); CATI((int) count); - CAT("\r\n"); WRITE; -#if 1 - - if (face->directory.tables == NULL) - return 0; /* no kerning info provided */ - /* !!!! could use better error checking */ - /* Only format 0 is supported (which is what M$ recommends) */ - if (face->directory.tables[0].format != 0) /* need only format 0 */ - ERRRET(-1); - - error = TT_Load_Kerning_Table(face->face, 0); - if (error) - ERET1( Fail ); - - kerntab = face->directory.tables[0].t.kern0; - kpair = (PVOID)pBuffer; - - if (face->kernIndices == NULL) { - TT_Get_Face_Properties( face->face, &properties ); - error = ALLOC(face->kernIndices, - properties.num_Glyphs * sizeof (USHORT)); - if (error) - ERET1( Fail ); - - /* fill all entries with -1s */ - memset(face->kernIndices, 0xFF, - properties.num_Glyphs * sizeof (USHORT)); - } - - kernIndices = face->kernIndices; - - while ((i < kerntab.nPairs) && (i < count)) - { - idx = kerntab.pairs[i].left; - if (kernIndices[idx] == (USHORT)-1) - kernIndices[idx] = ReverseTranslate(face, idx); - kpair->giFirst = kernIndices[idx]; - idx = kerntab.pairs[i].right; - if (kernIndices[idx] == (USHORT)-1) - kernIndices[idx] = ReverseTranslate(face, idx); - kpair->giSecond = kernIndices[idx]; - kpair->eKerningAmount = kerntab.pairs[i].value; - kpair++; - i++; - } - - COPY("Returned kerning pairs: "); CATI(i); CAT("\r\n"); WRITE; - return i; /* # items filled */ -#else - return 0; /* no kerning support */ - -#endif - } - - if (iQuery == FD_QUERY_ABC_WIDTHS) - { - count = cb / sizeof(ABC_TRIPLETS); - - COPY("QUERY_ABC_WIDTHS, "); CATI((int) count); - CAT(" items, giStart = "); CATI((int) giStart); - if (pBuffer == NULL) - CAT(" NULL buffer"); - CAT("\r\n"); WRITE; - - /* This call never fails - no error check needed */ - TT_Get_Face_Properties( face->face, &properties ); - - pt = (ABC_TRIPLETS*)pBuffer; - for (i = giStart; i < giStart + count; i++, pt++) - { - int index; - unsigned short wid; - static unsigned short adv_widths [2]; - static unsigned short adv_heights[2]; - - static unsigned short widths[2], heights[2]; - static short lefts [2], tops [2]; - - index = PM2TT( face->charMap, - face->charMode, - i ); - - /* get advances and bearings */ - if (size->vertical && properties.vertical && 0) /* TODO: enable */ - error = TT_Get_Face_Metrics( face->face, index, index, - lefts, adv_widths, tops, adv_heights ); - else - error = TT_Get_Face_Metrics( face->face, index, index, - lefts, adv_widths, NULL, NULL ); - - if (error) - goto Broken_Glyph; - - /* skip complicated calculations for fixed fonts */ - if (face->flags & FC_FLAG_FIXED_WIDTH) { - wid = adv_widths[0] - lefts[0]; - } - else { /* proportianal font, it gets trickier */ - /* store glyph widths for DBCS fonts - - needed for reasonable performance */ - if (face->flags & FC_FLAG_DBCS_FACE) { - if (face->widths == NULL) { - error = ALLOC(face->widths, - properties.num_Glyphs * sizeof (USHORT)); - if (error) - goto Broken_Glyph; /* this error really shouldn't happen */ - - /* tag all entries as unused */ - memset(face->widths, 0xFF, - properties.num_Glyphs * sizeof (USHORT)); - } - if (face->widths[index] == 0xFFFF) { /* get from file if needed */ - error = TT_Get_Face_Widths( face->face, index, index, - widths, heights ); - if (error) - goto Broken_Glyph; - - /* save for later */ - wid = face->widths[index] = widths[0]; - } - else - wid = face->widths[index]; - } - /* 'small' font, no need to remember widths, OS/2 takes care of it */ - else { - /* get width or height - use ftxwidth.c */ - error = TT_Get_Face_Widths( face->face, index, index, - widths, heights ); - if (error) - goto Broken_Glyph; - - wid = widths[0]; - } - } - - if (size->vertical && !is_HALFCHAR(i)) - { - if (properties.vertical && 0) /* TODO: enable */ - { - pt->lA = tops[0]; - pt->ulB = heights[0]; - pt->lC = adv_heights[0] - pt->lA - pt->ulB; - } - else - { - pt->lA = pt->lC = 0; - pt->ulB = properties.os2->usWinAscent + - properties.os2->usWinDescent; - } - - } - else - { - pt->lA = lefts[0]; - pt->ulB = wid; - pt->lC = adv_widths[0] - pt->lA - pt->ulB; - } - -#ifdef NETSCAPE_FIX - if (face->charMode != TRANSLATE_SYMBOL && - !size->vertical) { - if (face->flags & FC_FLAG_FIXED_WIDTH) { - pt->ulB = pt->ulB + pt->lA + pt->lC; - pt->lA = 0; - pt->lC = 0; - } else if (i == 32) { - /* return nonzero B width for 'space' */ - pt->ulB = adv_widths[0] - 2 * lefts[0]; - pt->lC = lefts[0]; - } - } -#endif - continue; - - Broken_Glyph: /* handle broken glyphs gracefully */ - pt->lA = pt->lC = 0; - - if (size->vertical && !is_HALFCHAR(i)) - pt->ulB = properties.os2->usWinAscent + - properties.os2->usWinDescent; - else - pt->ulB = properties.horizontal->xMax_Extent; - - } - } - - TT_Flush_Face(face->face); - return count; /* number of entries filled in */ - -Fail: - TT_Flush_Face(face->face); - return -1; -} - -/****************************************************************************/ -/* */ -/* QueryCharAttr : */ -/* */ -/* Return glyph attributes, basically glyph's bit-map or outline */ -/* some variables are declared static to conserve stack space. */ -/* */ -LONG _System QueryCharAttr( HFC hfc, - PCHARATTR pCharAttr, - PBITMAPMETRICS pbmm ) -{ - static TT_Raster_Map bitmap; - static TT_Outline outline; - static TT_BBox bbox; - - PFontSize size; - PFontFace face; - LONG temp; - PBYTE pb; - int i, j; - ULONG cb; - - size = getFontSize(hfc); - if (!size) - ERRRET(-1) /* error, invalid context handle */ - - face = &(size->file->faces[size->faceIndex]); - - error = TT_Load_Glyph( size->instance, - face->glyph, - PM2TT( face->charMap, - face->charMode, - pCharAttr->gi), - TTLOAD_DEFAULT); - - if (error) - { - if (i == 0) - ERET1( Fail ) /* this font's no good, return error */ - else - { /* try to recover quietly */ - error = TT_Load_Glyph( size->instance, - face->glyph, - 0, - TTLOAD_DEFAULT); - if (error) { - COPY("Error code is "); CATI(error); CAT("\r\n"); WRITE; - ERET1( Fail ); - } - } - } - - TT_Flush_Face( face->face ); - - error = TT_Get_Glyph_Outline( face->glyph, &outline ); - if (error) - ERRRET(-1); - - /* --- Vertical fonts handling----------------------------------- */ - - if (size->vertical && !is_HALFCHAR(pCharAttr->gi)) { - TT_Matrix vertMatrix; - - vertMatrix.xx = 0x00000; - vertMatrix.xy = -0x10000; - vertMatrix.yx = 0x10000; - vertMatrix.yy = 0x00000; - TT_Get_Outline_BBox( &outline, &bbox ); - - /* rotate outline 90 degrees counterclockwise */ - TT_Transform_Outline(&outline, &vertMatrix); - - /* move outline to the right to adjust for rotation */ - TT_Translate_Outline(&outline, bbox.yMax, 0); - /* move outline down a bit */ - TT_Translate_Outline(&outline, 0, bbox.yMin); - } - - if (size->transformed) - TT_Transform_Outline( &outline, &size->matrix ); - - /* --- Outline processing --------------------------------------- */ - - if ( pCharAttr->iQuery & FD_QUERY_OUTLINE ) - { - if (pCharAttr->cbLen == 0) /* send required outline size in bytes */ - return GetOutlineLen( &outline ); - - return GetOutline( &outline, pCharAttr->pBuffer ); - } - - /* --- Bitmap processing ---------------------------------------- */ - - TT_Get_Outline_BBox( &outline, &bbox ); - - /* the following seems to be necessary for rotated glyphs */ - if (size->transformed) { - bbox.xMax = bbox.xMin = 0; - for (i = 0; i < outline.n_points; i++) { - if (bbox.xMin > outline.points[i].x) - bbox.xMin = outline.points[i].x; - if (bbox.xMax < outline.points[i].x) - bbox.xMax = outline.points[i].x; - } - } - /* grid-fit the bbox */ - bbox.xMin &= -64; - bbox.yMin &= -64; - - bbox.xMax = (bbox.xMax+63) & -64; - bbox.yMax = (bbox.yMax+63) & -64; - - if (pCharAttr->iQuery & FD_QUERY_BITMAPMETRICS) - { - /* fill in bitmap metrics */ - /* metrics values are in 26.6 format ! */ - pbmm->sizlExtent.cx = (bbox.xMax - bbox.xMin) >> 6; - pbmm->sizlExtent.cy = (bbox.yMax - bbox.yMin) >> 6; - pbmm->cyAscent = 0; - pbmm->pfxOrigin.x = bbox.xMin << 10; - pbmm->pfxOrigin.y = bbox.yMax << 10; - - if (!(pCharAttr->iQuery & FD_QUERY_CHARIMAGE)) - return sizeof(*pbmm); - } - - /* --- actual bitmap processing here --- */ - if (pCharAttr->iQuery & FD_QUERY_CHARIMAGE) - { - /* values in 26.6 format ?!? */ - bitmap.width = (bbox.xMax - bbox.xMin) >> 6; - bitmap.rows = (bbox.yMax - bbox.yMin) >> 6; - /* width rounded up to nearest multiple of 4 */ - bitmap.cols = ((bitmap.width + 31) / 8) & -4; - bitmap.flow = TT_Flow_Down; - bitmap.bitmap = pCharAttr->pBuffer; - bitmap.size = bitmap.rows * bitmap.cols; - - if (pCharAttr->cbLen == 0) - return bitmap.size; - - if (bitmap.size > pCharAttr->cbLen) - ERRRET(-1) /* otherwise we might overwrite something */ - - /* clean provided buffer (unfortunately necessary) */ - memset(bitmap.bitmap, 0, pCharAttr->cbLen); - - error = TT_Get_Glyph_Bitmap( face->glyph, - &bitmap, - -bbox.xMin, - -bbox.yMin ); - if (error) - ERRRET(-1); /* engine error */ - - return bitmap.size; /* return # of bytes */ - } - ERRRET(-1) /* error */ - -Fail: - TT_Flush_Face(face->face); - return -1; -} - -/****************************************************************************/ -/* */ -/* QueryFullFaces : */ -/* */ -/* Query names of all faces in this file */ -/* */ -LONG _System QueryFullFaces( HFF hff, - PVOID pBuff, - PULONG buflen, - PULONG cFontCount, - ULONG cStart ) -{ - COPY("!QueryFullFaces: hff = "); CATI((int) hff); CAT("\r\n"); WRITE; - ERRRET(-1) /* error ? */ -} - -/*---------------------------------------------------------------------------*/ -/* end of exported functions */ -/*---------------------------------------------------------------------------*/ - - -/****************************************************************************/ -/* LimitsInit reads OS2.INI and sets up max_open_files limit, possibly */ -/* other variables as well. */ -/* */ -static void LimitsInit(void) { - char cBuffer[25]; /* ought to be enough */ - - if (PrfQueryProfileString(HINI_USERPROFILE, "FreeType/2", "OPENFACES", - NULL, cBuffer, sizeof(cBuffer)) > 0) { - max_open_files = atoi(cBuffer); - - if (max_open_files < 8) /* ensure limit isn't too low */ - max_open_files = 8; - } - else - max_open_files = 12; /* reasonable default */ -} - - -/****************************************************************************/ -/* my_itoa is used only in the following function GetUdcInfo. */ -/* Works pretty much like expected. */ -/* */ -void my_itoa(int num, char *cp) { - char temp[10]; - int i = 0; - - do { - temp[i++] = (num % 10) + '0'; - num /= 10; - } while (num); /* enddo */ - - while (i--) { - *cp++ = temp[i]; - } /* endwhile */ - *cp = '\0'; -} - -/****************************************************************************/ -/* GetUdcInfo determines the UDC ranges used */ -/* */ -VOID GetUdcInfo(VOID) { - ULONG ulUdc, ulUdcInfo, i; - PVOID gPtr; - HINI hini; - CHAR szCpStr[10] = "CP"; - - DosQueryCp(sizeof(ulCp), (ULONG*)&ulCp, &i); /* find out default codepage */ - my_itoa((INT) ulCp, szCpStr + 2); /* convert to ASCII */ - -} - -/****************************************************************************/ -/* LangInit determines language used at DLL startup, non-zero return value */ -/* means error. */ -/* This code is crucial, because it determines behaviour of the font driver */ -/* with regard to language encodings it will use. */ -static ULONG LangInit(void) { - COUNTRYCODE cc = {0, 0}; - COUNTRYINFO ci; - ULONG cilen; - - isGBK = FALSE; - - GetUdcInfo(); /* get User Defined Character info */ - - /* get country info; ci.country then contains country code */ - if (DosQueryCtryInfo(sizeof(ci), &cc, &ci, &cilen)) - return -1; - /* get DBCS lead byte values for later use */ - DosQueryDBCSEnv(sizeof(DBCSLead), &cc, DBCSLead); - - uLastGlyph = 383; - switch (ci.country) { - case 81: /* Japan */ - iLangId = TT_MS_LANGID_JAPANESE_JAPAN; - ScriptTag = *(ULONG *) "kana"; - LangSysTag = *(ULONG *) "JAN "; - pGlyphlistName = "PMJPN"; - uLastGlyph = 890; - break; - - case 88: /* Taiwan */ - iLangId = TT_MS_LANGID_CHINESE_TAIWAN; - ScriptTag = *(ULONG *) "kana"; - LangSysTag = *(ULONG *) "CHT "; - pGlyphlistName = "PMCHT"; - break; - - case 86: /* People's Republic of China */ - if (ci.codepage == 1386 || ulCp[0] == 1386 || ulCp[1] == 1386) { - isGBK = TRUE; - } /* endif */ - iLangId = TT_MS_LANGID_CHINESE_PRC; - ScriptTag = *(ULONG *) "kana"; - LangSysTag = *(ULONG *) "CHS "; - pGlyphlistName = "PMPRC"; - break; - - case 82: /* Korea */ - iLangId = TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA; - ScriptTag = *(ULONG *) "hang"; - LangSysTag = *(ULONG *) "KOR "; - pGlyphlistName = "PMKOR"; - uLastGlyph = 949; - break; - - case 30: /* Greece - for Alex! */ - iLangId = TT_MS_LANGID_GREEK_GREECE; - - default: /* none of the above countries */ - ScriptTag = *(ULONG *) ""; - LangSysTag = *(ULONG *) ""; - break; - } /* endswitch */ - - return 0; -} - -/****************************************************************************/ -/* */ -/* FirstInit : */ -/* */ -/* Called when font driver is loaded for the first time. Performs the */ -/* necessary one-time initialization. */ -ULONG FirstInit(void) { - LONG lReqCount; - ULONG ulCurMaxFH; - -# ifdef DEBUG - ULONG Action; - DosOpen("C:\\FTIFI.LOG", &LogHandle, &Action, 0, FILE_NORMAL, - OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS, - OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_WRITE_THROUGH | - OPEN_FLAGS_SEQUENTIAL | OPEN_SHARE_DENYWRITE | OPEN_ACCESS_WRITEONLY, - NULL); - COPY("FreeType/2 loaded.\r\n"); - WRITE; -# endif /* DEBUG */ - - /* increase # of file handles by five to be on the safe side */ - lReqCount = 5; - DosSetRelMaxFH(&lReqCount, &ulCurMaxFH); - error = TT_Init_FreeType(&engine); /* turn on the FT engine */ - if (error) - return 0; /* exit immediately */ - error = TT_Init_Kerning_Extension(engine); /* load kerning support */ - COPY("FreeType Init called\r\n"); - WRITE; - - if (LangInit()) /* initialize NLS */ - return 0; /* exit on error */ - COPY("NLS initialized.\r\n"); - WRITE; - - LimitsInit(); /* initialize max_open_files */ - COPY("Open faces limit set to "); CATI(max_open_files); CAT("\r\n"); - WRITE; - - if (error) - return 0; /* exit immediately */ - COPY("Initialization successful.\r\n"); - WRITE; - return 1; -} - - -/****************************************************************************/ -/* */ -/* FinalTerm : */ -/* */ -/* Called when font driver is unloaded for the last time time. Performs */ -/* final clean-up, shuts down engine etc. */ -ULONG FinalTerm(void) { - PListElement cur; - PListElement tmp; - - /* throw away elements from 'free elements' list */ - cur = free_elements; - while (cur != NULL) { - tmp = cur; - cur = cur->next; - FREE(tmp); - } - - /* turn off engine */ - TT_Done_FreeType(engine); - -# ifdef DEBUG - COPY("FreeType/2 terminated.\r\n"); - WRITE; - DosClose(LogHandle); -# endif - return 1; -} -/****************************************************************************/ -/* */ -/* _DLL_InitTerm : */ -/* */ -/* This is the DLL Initialization/termination function. It initializes */ -/* the FreeType engine and some internal structures at startup. It cleans */ -/* up the UCONV cache at process termination. */ -ULONG _System _DLL_InitTerm(ULONG hModule, ULONG ulFlag) { - switch (ulFlag) { - case 0: /* initializing */ - if (++ulProcessCount == 1) - return FirstInit(); /* loaded for the first time */ - else - return 1; - - case 1: { /* terminating */ - int i; - /* clean UCONV cache */ -# ifdef USE_UCONV - CleanUCONVCache(); -# endif - if(--ulProcessCount == 0) - return FinalTerm(); - else - return 1; - } - } - return 0; -} - -/****************************************************************************/ -/* */ -/* interfaceSEId (Interface-specific Encoding Id) determines what encoding */ -/* the font driver should use if a font includes a Unicode encoding. */ -/* */ -LONG interfaceSEId(TT_Face face, BOOL UDCflag, LONG encoding) { - ULONG range1 = 0; - ULONG bits, mask; - TT_OS2 *pOS2; - static TT_Face_Properties props; - - TT_Get_Face_Properties(face, &props); - pOS2 = props.os2; - - if (encoding == PSEID_UNICODE) { - - /* if font is 'small', use PM383; this is done because of DBCS - systems */ - if (!UDCflag && props.num_Glyphs < 1024) { - encoding = PSEID_PM383; - } else if (pOS2->version >= 1) { - /* - * * OS/2 table version 1 and later contains codepage * - * bitfield to support multiple codepages. - */ - range1 = pOS2->ulCodePageRange1; - bits = 0; - - if (range1 & OS2_CP1_ANSI_OEM_JAPANESE_JIS) - bits++; - if (range1 & OS2_CP1_ANSI_OEM_CHINESE_SIMPLIFIED) - bits++; - if (range1 & OS2_CP1_ANSI_OEM_CHINESE_TRADITIONAL) - bits++; - if (range1 & OS2_CP1_ANSI_OEM_KOREAN_WANSUNG) - bits++; - if (range1 & OS2_CP1_ANSI_OEM_KOREAN_JOHAB) - bits++; - - /* Note: if font supports more than one of the following codepages, - * encoding is left at PSEID_UNICODE! - */ - if (bits == 1) { - switch (range1) { - case OS2_CP1_ANSI_OEM_JAPANESE_JIS: - encoding = PSEID_SHIFTJIS; - break; - case OS2_CP1_ANSI_OEM_CHINESE_SIMPLIFIED: - encoding = PSEID_PRC; - break; - case OS2_CP1_ANSI_OEM_CHINESE_TRADITIONAL: - encoding = PSEID_BIG5; - break; - case OS2_CP1_ANSI_OEM_KOREAN_WANSUNG: - encoding = PSEID_WANSUNG; - break; - case OS2_CP1_ANSI_OEM_KOREAN_JOHAB: - encoding = PSEID_JOHAB; - break; - default: - break; - } /* endswitch */ - } /* endif */ - } else { - /* - * The codepage range bitfield is not available. - * Codepage must be assumed from the COUNTRY setting. - * This means the user is on his own. - */ - - switch (iLangId) { - case TT_MS_LANGID_JAPANESE_JAPAN: - encoding = PSEID_SHIFTJIS; - break; - case TT_MS_LANGID_CHINESE_PRC: - case TT_MS_LANGID_CHINESE_SINGAPORE: - encoding = PSEID_PRC; - break; - case TT_MS_LANGID_CHINESE_TAIWAN: - case TT_MS_LANGID_CHINESE_HONG_KONG: - encoding = PSEID_BIG5; - break; - case TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA: - encoding = PSEID_WANSUNG; - break; - case TT_MS_LANGID_KOREAN_JOHAB_KOREA: - encoding = PSEID_JOHAB; - break; - } - - } - } - return encoding; -} - -/****************************************************************************/ -/* */ -/* LookupName : */ -/* */ -/* Look for a TrueType name by index, prefer current language */ -/* */ -static char* LookupName(TT_Face face, int index ) -{ - static char name_buffer[FACESIZE + 2]; - int name_len = 0; - int i, j, n; - - USHORT platform, encoding, language, id; - char* string; - USHORT string_len; - - int found; - - n = TT_Get_Name_Count( face ); - if ( n < 0 ) - return NULL; - - for ( i = 0; i < n; i++ ) - { - TT_Get_Name_ID( face, i, &platform, &encoding, &language, &id ); - TT_Get_Name_String( face, i, &string, &string_len ); - - if ( id == index ) - { - found = 0; - - /* Try to find an appropriate name */ - if ( platform == TT_PLATFORM_MICROSOFT ) - for ( j = 5; j >= 0; j-- ) - if ( encoding == j ) /* Microsoft ? */ - switch (language) - { - case TT_MS_LANGID_CHINESE_TAIWAN: - if (encoding == PSEID_PRC) - found = 1; - break; - - case TT_MS_LANGID_JAPANESE_JAPAN: - if (encoding == PSEID_SHIFTJIS) - found = 1; - break; - - /* these aren't all possibilities; just the most likely ones */ - case TT_MS_LANGID_ENGLISH_UNITED_STATES : - case TT_MS_LANGID_ENGLISH_UNITED_KINGDOM : - case TT_MS_LANGID_ENGLISH_AUSTRALIA : - case TT_MS_LANGID_ENGLISH_CANADA : - case TT_MS_LANGID_ENGLISH_NEW_ZEALAND : - case TT_MS_LANGID_ENGLISH_IRELAND : - case TT_MS_LANGID_ENGLISH_SOUTH_AFRICA : - found = 1; - break; - } - - if ( !found && platform == 0 && language == 0 ) - found = 1; - - if (found) - { - if (language == TT_MS_LANGID_CHINESE_TAIWAN || - language == TT_MS_LANGID_JAPANESE_JAPAN) { - /* it's a DBCS string, copy everything except NULLs */ - int i,j; - if (string_len > FACESIZE - 1) - string_len = FACESIZE - 1; - - for (i=0, j=0; i FACESIZE * 2) - string_len = FACESIZE * 2; - - name_len = 0; - - for ( i = 1; i < string_len; i += 2 ) - name_buffer[name_len++] = string[i]; - - name_buffer[name_len] = '\0'; - - return name_buffer; - } - } - } - } - - /* Not found */ - return NULL; -} - -/****************************************************************************/ -/* */ -/* GetCharMap : */ -/* */ -/* A function to find a suitable charmap, searching in the following */ -/* order of importance : */ -/* */ -/* 1) Windows Unicode */ -/* 2) Apple Unicode */ -/* 3) ROC (Taiwan) */ -/* 4) ShiftJIS (Japan) */ -/* 5) Apple Roman */ -/* 6) Windows Symbol - not really supported */ -/* */ -/* High word of returned ULONG contains type of encoding */ -/* */ -static ULONG GetCharmap(TT_Face face) -{ - int n; /* # of encodings (charmaps) available */ - USHORT platform, encoding; - int i, best, bestVal, val; - - n = TT_Get_CharMap_Count(face); - - if (n < 0) /* no encodings at all; don't yet know what the best course of action would be */ - ERRRET(-1) /* such font should probably be rejected */ - - bestVal = 16; - best = -1; - - for (i = 0; i < n; i++) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - - /* Windows Unicode is the highest encoding, return immediately */ - /* if we find it.. */ - if ( platform == TT_PLATFORM_MICROSOFT && encoding == TT_MS_ID_UNICODE_CS) - return i; - - /* otherwise, compare it to the best encoding found */ - val = -1; - if (platform == TT_PLATFORM_APPLE_UNICODE) - val = 2; - else if (platform == TT_PLATFORM_MICROSOFT - && encoding == TT_MS_ID_BIG_5) - val = 3; - else if (platform == TT_PLATFORM_MICROSOFT - && encoding == TT_MS_ID_SJIS) - val = 4; - else if (platform == TT_PLATFORM_MACINTOSH - && encoding == TT_MAC_ID_ROMAN) - val = 5; - else if (platform == TT_PLATFORM_MICROSOFT - && encoding == TT_MS_ID_SYMBOL_CS) - val = 6; - - if (val > 0 && val <= bestVal) - { - bestVal = val; - best = i; - } - } - - if (i < 0) - return 0; /* we didn't find any suitable encoding !! */ - - if (bestVal == 3) /* Taiwanese font */ - best |= ( TRANSLATE_BIG5 << 16 ); - - if (bestVal == 4) /* Japanese font */ - best |= ( TRANSLATE_SJIS << 16 ); - - if (bestVal == 5) /* for Apple Roman encoding only, this */ - best |= ( TRANSLATE_SYMBOL << 16 ); /* means no translation should be performed */ - - return best; -} - -/****************************************************************************/ -/* */ -/* GetOutlineLen : */ -/* */ -/* Used to compute the size of an outline once it is converted to */ -/* OS/2's specific format. The translation is performed by the later */ -/* function called simply "GetOultine". */ -/* */ -static int GetOutlineLen(TT_Outline *ol) -{ - int index; /* current point's index */ - BOOL on_curve; /* current point's state */ - int i, start = 0; - int first, last; - ULONG cb = 0; - - /* loop thru all contours in a glyph */ - for ( i = 0; i < ol->n_contours; i++ ) { - - cb += sizeof(POLYGONHEADER); - - first = start; - last = ol->contours[i]; - - on_curve = (ol->flags[first] & 1); - index = first; - - /* process each contour point individually */ - while ( index < last ) { - index++; - - if ( on_curve ) { - /* the previous point was on the curve */ - on_curve = ( ol->flags[index] & 1 ); - if ( on_curve ) { - /* two successive on points => emit segment */ - cb += sizeof(PRIMLINE); - } - } - else { - /* the previous point was off the curve */ - on_curve = ( ol->flags[index] & 1 ); - if ( on_curve ) { - /* reaching an `on' point */ - cb += sizeof(PRIMSPLINE); - } - else { - /* two successive `off' points => create middle point */ - cb += sizeof(PRIMSPLINE); - } - } - } - - /* end of contour, close curve cleanly */ - if ( ol->flags[first] & 1 ) - { - if ( on_curve ) - cb += sizeof(PRIMLINE); - else - cb += sizeof(PRIMSPLINE); - } - else - if (!on_curve) - cb += sizeof(PRIMSPLINE); - - start = ol->contours[i] + 1; - - } - return cb; /* return # bytes used */ -} - -/****************************************************************************/ -/* */ -/* a few global variables used in the following functions */ -/* */ -static ULONG cb = 0, polycb; -static LONG lastX, lastY; -static PBYTE pb; -static POINTFX Q, R; -static POLYGONHEADER hdr = {0, FD_POLYGON_TYPE}; -static PRIMLINE line = {FD_PRIM_LINE}; -static PRIMSPLINE spline = {FD_PRIM_SPLINE}; - -/****************************************************************************/ -/* */ -/* LineFrom : */ -/* */ -/* add a line segment to the PM outline that GetOultine is currently */ -/* building. */ -/* */ -static void Line_From(LONG x, LONG y) { - line.pte.x = x << 10; - line.pte.y = y << 10; - /* store to output buffer */ - memcpy(&(pb[cb]), &line, sizeof(line)); - cb += sizeof(PRIMLINE); - polycb += sizeof(PRIMLINE); -} - - -/****************************************************************************/ -/* */ -/* BezierFrom : */ -/* */ -/* add a bezier arc to the PM outline that GetOutline is currently */ -/* buidling. The second-order Bezier is trivially converted to its */ -/* equivalent third-order form. */ -/* */ -static void Bezier_From( LONG x0, LONG y0, LONG x2, LONG y2, LONG x1, LONG y1 ) { - spline.pte[0].x = x0 << 10; - spline.pte[0].y = y0 << 10; - /* convert from second-order to cubic Bezier spline */ - Q.x = (x0 + 2 * x1) / 3; - Q.y = (y0 + 2 * y1) / 3; - R.x = (x2 + 2 * x1) / 3; - R.y = (y2 + 2 * y1) / 3; - spline.pte[1].x = Q.x << 10; - spline.pte[1].y = Q.y << 10; - spline.pte[2].x = R.x << 10; - spline.pte[2].y = R.y << 10; - /* store to output buffer */ - memcpy(&(pb[cb]), &spline, sizeof(spline)); - cb += sizeof(PRIMSPLINE); - polycb += sizeof(PRIMSPLINE); -} - - -/****************************************************************************/ -/* */ -/* GetOutline : */ -/* */ -/* Translate a FreeType glyph outline into PM format. The buffer is */ -/* expected to be of the size returned by a previous call to the */ -/* function GetOutlineLen(). */ -/* */ -/* This code is taken right from the FreeType ttraster.c source, and */ -/* subsequently modified to emit PM segments and arcs. */ -/* */ -static int GetOutline(TT_Outline *ol, PBYTE pbuf) { - LONG x, y; /* current point */ - LONG cx, cy; /* current Bezier control point */ - LONG mx, my; /* current middle point */ - LONG x_first, y_first; /* first point's coordinates */ - LONG x_last, y_last; /* last point's coordinates */ - - int index; /* current point's index */ - BOOL on_curve; /* current point's state */ - int i, start = 0; - int first, last; - ULONG polystart; - - pb = pbuf; - cb = 0; - - /* loop thru all contours in a glyph */ - for ( i = 0; i < ol->n_contours; i++ ) { - - polystart = cb; /* save this polygon's start offset */ - polycb = sizeof(POLYGONHEADER); /* size of this polygon */ - cb += sizeof(POLYGONHEADER); - - first = start; - last = ol->contours[i]; - - x_first = ol->points[first].x; - y_first = ol->points[first].y; - - x_last = ol->points[last].x; - y_last = ol->points[last].y; - - lastX = cx = x_first; - lastY = cy = y_first; - - on_curve = (ol->flags[first] & 1); - index = first; - - /* check first point to determine origin */ - if ( !on_curve ) { - /* first point is off the curve. Yes, this happens... */ - if ( ol->flags[last] & 1 ) { - lastX = x_last; /* start at last point if it */ - lastY = y_last; /* is on the curve */ - } - else { - /* if both first and last points are off the curve, */ - /* start at their middle and record its position */ - /* for closure */ - lastX = (lastX + x_last)/2; - lastY = (lastY + y_last)/2; - - x_last = lastX; - y_last = lastY; - } - } - - /* now process each contour point individually */ - while ( index < last ) { - index++; - x = ( ol->points[index].x ); - y = ( ol->points[index].y ); - - if ( on_curve ) { - /* the previous point was on the curve */ - on_curve = ( ol->flags[index] & 1 ); - if ( on_curve ) { - /* two successive on points => emit segment */ - Line_From( lastX, lastY ); /*x, y*/ - lastX = x; - lastY = y; - } - else { - /* else, keep current control point for next bezier */ - cx = x; - cy = y; - } - } - else { - /* the previous point was off the curve */ - on_curve = ( ol->flags[index] & 1 ); - if ( on_curve ) { - /* reaching an `on' point */ - Bezier_From(lastX, lastY, x, y, cx, cy ); - lastX = x; - lastY = y; - } - else { - /* two successive `off' points => create middle point */ - mx = (cx + x) / 2; - my = (cy + y)/2; - - Bezier_From( lastX, lastY, mx, my, cx, cy ); - lastX = mx; - lastY = my; - - cx = x; - cy = y; - } - } - } - - /* end of contour, close curve cleanly */ - if ( ol->flags[first] & 1 ) { - if ( on_curve ) - Line_From( lastX, lastY); /* x_first, y_first );*/ - else - Bezier_From( lastX, lastY, x_first, y_first, cx, cy ); - } - else - if (!on_curve) - Bezier_From( lastX, lastY, x_last, y_last, cx, cy ); - - start = ol->contours[i] + 1; - - hdr.cb = polycb; - memcpy(&(pb[polystart]), &hdr, sizeof(hdr)); - - } - return cb; /* return # bytes used */ -} - Index: xc/extras/FreeType/contrib/ftos2/ifi/ftifi.h diff -u xc/extras/FreeType/contrib/ftos2/ifi/ftifi.h:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/ftifi.h:removed --- xc/extras/FreeType/contrib/ftos2/ifi/ftifi.h:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/ftifi.h Wed Mar 16 20:59:27 2005 @@ -1,305 +0,0 @@ -/* - Conversion from OS/2 UGL to Unicode - - Copyright (C) 1997 Robert Muchsel - Copyright (C) 1997,1998 Michal Necasek - - All entries that were previously 0xFFFF were changed to 0x0000 because - TrueType 'missing glyph' has index 0 -*/ - -#ifndef _FTIFI_H_INCLUDED_ -#define _FTIFI_H_INCLUDED_ - -/* Platform-specific Encoding IDs for MS platform */ -#define PSEID_SYMBOL 0 -#define PSEID_UNICODE 1 -#define PSEID_SHIFTJIS 2 -#define PSEID_BIG5 3 -#define PSEID_PRC 4 -#define PSEID_WANSUNG 5 -#define PSEID_JOHAB 6 -/* defined by me! */ -#define PSEID_PM383 100 - -/* bit masks for determining supported codepages */ -#define OS2_CP1_ANSI_OEM_JAPANESE_JIS (1 << 17) -#define OS2_CP1_ANSI_OEM_CHINESE_SIMPLIFIED (1 << 18) -#define OS2_CP1_ANSI_OEM_CHINESE_TRADITIONAL (1 << 19) -#define OS2_CP1_ANSI_OEM_KOREAN_WANSUNG (1 << 20) -#define OS2_CP1_ANSI_OEM_KOREAN_JOHAB (1 << 21) - -/* defines for character translation */ -/* from Unicode to UGL */ -#define TRANSLATE_UGL 0 -/* Symbol - no translation */ -#define TRANSLATE_SYMBOL 1 -/* Unicode - no translation */ -#define TRANSLATE_UNICODE 2 -/* Big5 - no translation */ -#define TRANSLATE_BIG5 4 -/* ShiftJIS - no translation */ -#define TRANSLATE_SJIS 5 -/* from Unicode to Big5 */ -#define TRANSLATE_UNI_BIG5 16 -/* from Unicode to ShiftJIS */ -#define TRANSLATE_UNI_SJIS 17 - - -#define MAX_GLYPH 504 -/* I suppose more than 949 is never used */ -/* 504 should be OK for (most) European and American countries */ - -#ifndef USE_UCONV -static const int UGL2Uni[MAX_GLYPH + 1] = { - - /* PM383 UGL mapping */ - - /* 0..9 */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25d8, 0x25cb, - /* 10..19 */ - 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, 0x25ba, 0x25c4, 0x2195, 0x203c, - /* 20..29 */ - 0xb6, 0xa7, 0x25ac, 0x21a8, 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, - /* 30..39 */ - 0x25b2, 0x25bc, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - /* 40..49 */ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, - /* 50..59 */ - 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, - /* 60..69 */ - 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, - /* 70..79 */ - 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, - /* 80..89 */ - 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, - /* 90..99 */ - 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, - /* 100..109 */ - 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, - /* 110..119 */ - 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - /* 120..129 */ - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x2302, 0xc7, 0xfc, - /* 130..139 */ - 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, 0xea, 0xeb, 0xe8, 0xef, - /* 140..149 */ - 0xee, 0xec, 0xc4, 0xc5, 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, - /* 150..159 */ - 0xfb, 0xf9, 0xff, 0xd6, 0xdc, 0xf8, 0xa3, 0xd8, 0xd7, 0x192, - /* 160..169 */ - 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, 0xbf, 0xae, - /* 170..179 */ - 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, 0x2591, 0x2592, 0x2593, 0x2502, - /* 180..189 */ - 0x2524, 0xc1, 0xc2, 0xc0, 0xa9, 0x2563, 0x2551, 0x2557, 0x255d, 0xa2, - /* 190..199 */ - 0xa5, 0x2510, 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0xe3, 0xc3, - /* 200..209 */ - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0xa4, 0xf0, 0xd0, - /* 210..219 */ - 0xca, 0xcb, 0xc8, 0x131, 0xcd, 0xce, 0xcf, 0x2518, 0x250c, 0x2588, - /* 220..229 */ - 0x2584, 0xa6, 0xcc, 0x2580, 0xd3, 0xdf, 0xd4, 0xd2, 0xf5, 0xd5, - /* 230..239 */ - 0xb5, 0xfe, 0xde, 0xda, 0xdb, 0xd9, 0xfd, 0xdd, 0xaf, 0xb4, - /* 240..249 */ - 0xad, 0xb1, 0x2017, 0xbe, 0xb6, 0xa7, 0xf7, 0xb8, 0xb0, 0xa8, - /* 250..259 */ - 0xb7, 0xb9, 0xb3, 0xb2, 0x25a0, 0xa0, 0x20a7, 0x2310, 0x2561, 0x2562, - /* 260..269 */ - 0x2556, 0x2555, 0x255c, 0x255b, 0x255e, 0x255f, 0x2567, 0x2568, 0x2564, 0x2565, - /* 270..279 */ - 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, 0x256a, 0x258c, 0x2590, 0x3b1, 0x393, - /* 280..289 */ - 0x3c0, 0x3a3, 0x3c3, 0x3c4, 0x3a6, 0x398, 0x3a9, 0x3b4, 0x221e, 0x3c6, - /* 290..299 */ - 0x3b5, 0x2229, 0x2261, 0x2265, 0x2264, 0x2320, 0x2321, 0x2248, 0x2219, 0x221a, - /* 300..309 */ - 0x207f, 0x2c9, 0x2d8, 0x2d9, 0x2da, 0x2dd, 0x2db, 0x2c7, 0x2018, 0x2019, - /* 310..318*/ - 0x201c, 0x201d, 0x2013, 0x2014, 0x2c6, 0x2dc, 0x201a, 0x201e, 0x2026, - - /* 319..329 */ - 0x2020, 0x2021, 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0x303, 0x2122, 0x161, 0x203a, - /* 330..339 */ - 0x153, 0x178, 0x11f, 0x11e, 0x130, 0x15f, 0x15e, 0x103, 0x102, 0x105, - /* 340..349 */ - 0x104, 0x107, 0x106, 0x10d, 0x10c, 0x10f, 0x10e, 0x111, 0x11b, 0x11a, - /* 350..359 */ - 0x119, 0x118, 0x13a, 0x139, 0x13e, 0x13d, 0x142, 0x141, 0x144, 0x143, - /* 360..369 */ - 0x148, 0x147, 0x151, 0x150, 0x155, 0x154, 0x159, 0x158, 0x15b, 0x15a, - /* 370..379 */ - 0x165, 0x164, 0x163, 0x162, 0x171, 0x170, 0x16f, 0x16e, 0x17a, 0x179, - /* 380..383 */ - 0x17e, 0x17d, 0x17c, 0x17b, - - /* I don't know whether the following are used by PM, but they are in - the I18N unicode library */ - /* yes they ARE used (for Cyrillic systems) */ - - /* 384..389 */ - 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, - /* 390..399 */ - 0x407, 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0x40e, 0x40f, 0x410, 0x411, - /* 400..409 */ - 0x412, 0x413, 0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41a, 0x41b, - /* 410..419 */ - 0x41c, 0x41d, 0x41e, 0x41f, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, - /* 420..429 */ - 0x426, 0x427, 0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, - /* 430..439 */ - 0x430, 0x431, 0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, - /* 440..449 */ - 0x43a, 0x43b, 0x43c, 0x43d, 0x43e, 0x43f, 0x440, 0x441, 0x442, 0x443, - /* 450..459 */ - 0x444, 0x445, 0x446, 0x447, 0x448, 0x449, 0x44a, 0x44b, 0x44c, 0x44d, - /* 460..469 */ - 0x44e, 0x44f, 0x2116, 0x451, 0x452, 0x453, 0x454, 0x455, 0x456, 0x457, - /* 470..479 */ - 0x458, 0x459, 0x45a, 0x45b, 0x45c, 0x45e, 0x45f, 0x490, 0x491, 0x156, - /* 480..489 */ - 0x12e, 0x100, 0x112, 0x116, 0x122, 0x136, 0x12a, 0x1eb, 0x145, 0x14c, - /* 490..499 */ - 0x172, 0x16a, 0x157, 0x12f, 0x101, 0x113, 0x117, 0x123, 0x137, 0x12b, - /* 500..504 */ - 0x13c, 0x146, 0x14d, 0x173, 0x16b - -#if MAX_GLYPH > 504 - , 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 510..519 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 520..529 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 530..539 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 540..549 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 550..559 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 560..569 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 570..579 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 580..589 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 590..599 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 600..609 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 610..619 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 620..629 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 630..639 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 640..649 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 650..659 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 660..669 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 670..679 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 680..689 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 690..699 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 700..709 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 710..719 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 720..729 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 730..739 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 740..749 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 750..759 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 760..769 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x303f, 0x21b5, - /* 770..779 */ - 0x3002, 0x300c, 0x300d, 0x3001, 0x0000, 0x30f2, 0x30a1, 0x30a3, 0x30a5, 0x30a7, - /* 780..789 */ - 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, - /* 790..799 */ - 0x30aa, 0x30ab, 0x30ad, 0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, 0x30bb, - /* 800..809 */ - 0x30bd, 0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cb, 0x30cc, 0x30cd, - /* 810..819 */ - 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, 0x30db, 0x30de, 0x30df, 0x30e0, 0x30e1, - /* 820..829 */ - 0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, - /* 830..839 */ - 0x30f3, 0x309b, 0x309c, 0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x3083, 0x3085, - /* 840..849 */ - 0x3049, 0x3063, 0x3042, 0x3044, 0x3046, 0x3048, 0x304a, 0x304b, 0x304d, 0x304f, - /* 850..859 */ - 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305b, 0x305d, 0x305f, 0x3061, 0x3064, - /* 860..869 */ - 0x3066, 0x3068, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3072, 0x3075, - /* 870..879 */ - 0x3078, 0x307b, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, - /* 880..889 */ - 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308f, 0x3092, 0x3093, 0x300e, 0x300f, - /* 890..899 */ - 0x30f6, 0x3005, 0x0000, 0x0000, 0x0000, 0x0000, 0x3131, 0x3132, 0x3133, 0x3134, - /* 900..909 */ - 0x3135, 0x3136, 0x3137, 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, - /* 910..919 */ - 0x313f, 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, - /* 920..929 */ - 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, 0x3151, 0x3152, - /* 930..939 */ - 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, - /* 940..949 */ - 0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163, 0x20a9, 0x0000, 0x3164, - /* 950..959 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 960..969 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 970..979 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 980..989 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 990..999 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 1000..1009 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 1010..1019 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 1020..1023 */ - 0x0000, 0x0000, 0x0000, 0x0000 -#endif /* MAX_GLYHP > 504 */ -}; - - -/* on Greek systems, the UGL is a bit different */ -/* and changes the entries 319-383 inclusive */ - -/* # of Greek glyphs in UGL */ -#define GREEK_GLYPHS 65 -/* start of Greek glyphs in UGL */ -#define GREEK_START 319 - -static const int SubUGLGreek[GREEK_GLYPHS] = { - /* 319..328 */ - 0x0391, 0x0392, 0x0395, 0x0396, 0x0397, 0x0399, 0x039a, 0x039c, 0x039d, 0x039f, - /* 329..338 */ - 0x03a1, 0x03a4, 0x03a5, 0x03a7, 0x03b7, 0x03bd, 0x03c7, 0x03bf, 0x0384, 0x0308, - /* 339..348 */ - 0x0385, 0x0390, 0x0020, 0x00A6, 0x0386, 0x0388, 0x0389, 0x038a, 0x038c, 0x038e, - /* 349..358 */ - 0x038f, 0x0394, 0x0398, 0x039b, 0x039e, 0x03a0, 0x03a8, 0x03aa, 0x03ab, 0x03ac, - /* 359..368 */ - 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b2, 0x03b3, 0x03b6, 0x03b8, 0x03b9, 0x03ba, - /* 369..378 */ - 0x03bb, 0x03bc, 0x03be, 0x03c1, 0x03c2, 0x03c5, 0x03c6, 0x03c8, 0x03c9, 0x03ca, - /* 379..383 */ - 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000 -}; -#endif /* USE_UCONV */ - -#endif /* _FTIFI_H_INCLUDED_ */ Index: xc/extras/FreeType/contrib/ftos2/ifi/ftmem.c diff -u xc/extras/FreeType/contrib/ftos2/ifi/ftmem.c:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/ftmem.c:removed --- xc/extras/FreeType/contrib/ftos2/ifi/ftmem.c:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/ftmem.c Wed Mar 16 20:59:27 2005 @@ -1,184 +0,0 @@ -/* */ -/* ** This is part of the FreeType/2 project! ** */ -/* A small utility to display online memory usage stats for FreeType/2 */ -/* */ -/* The method used to keep the window float on top may be completely */ -/* stupid but I found no other way (except putting WinSetWindowPos() */ -/* in the timer code which looks odd). */ -/* */ -/* Copyright (C) 1998 by M. Necasek */ - -#define INCL_DOSMISC -#define INCL_WINTIMER -#define INCL_PM -#include -#include - -#define ID_TIMER 42 -#define IDM_FLOAT 155 - - -/* name of shared memory used for memory usage reporting */ -#define MEM_NAME "\\sharemem\\freetype" - -typedef struct _INFOSTRUCT { - ULONG signature; /* signature (0x46524545, 'FREE') */ - ULONG used; /* bytes actually used */ - ULONG maxused; /* maximum amount ever used */ - ULONG num_err; /* number of (de)allocation errors */ -} INFOSTRUCT, *PINFOSTRUCT; - -/* structure (in named shared memory) pointing to the above struct */ -typedef struct _INFOPTR { - PINFOSTRUCT address; /* pointer to actual memory info */ -} INFOPTR, *PINFOPTR; - -HAB hab; -HWND hwndFrame; -PINFOSTRUCT meminfo; -PINFOPTR memptr; -ULONG bFloat = TRUE; -HWND hwndSysSubmenu; - -VOID AddFloat(HWND hwndFrame) { - MENUITEM mi; - HWND hwndSysMenu; - SHORT sMenuID; - - /* add Float option to system menu */ - hwndSysMenu = WinWindowFromID(hwndFrame, FID_SYSMENU); - sMenuID = (SHORT)WinSendMsg(hwndSysMenu, MM_ITEMIDFROMPOSITION, - MPFROMSHORT(0), MPVOID); - WinSendMsg(hwndSysMenu, MM_QUERYITEM, MPFROMSHORT(sMenuID), - MPFROMP(&mi)); - hwndSysSubmenu = mi.hwndSubMenu; - mi.iPosition = MIT_END; - mi.afStyle = MIS_SEPARATOR; - mi.afAttribute = 0; - mi.id = -1; - mi.hwndSubMenu = 0; - mi.hItem = 0; - WinSendMsg(hwndSysSubmenu, MM_INSERTITEM, MPFROMP (&mi), NULL); - mi.afStyle = MIS_TEXT; - mi.afAttribute = MIA_CHECKED; - mi.id = IDM_FLOAT; - WinSendMsg(hwndSysSubmenu, MM_INSERTITEM, MPFROMP (&mi), "~Float on top"); -} - -MRESULT EXPENTRY ClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) -{ - HPS hps; - RECTL rcl; - static ULONG i = 1; - ULONG ulMem; - char szBuf[200]; - - switch (msg) { - case WM_CREATE: - /* use smaller text */ - WinSetPresParam(hwnd, PP_FONTNAMESIZE, 7, (PVOID)"8.Helv"); - /* start the timer (ticks each 0.5 sec.) */ - AddFloat(WinQueryWindow(hwnd, QW_PARENT)); - WinStartTimer(hab, hwnd, ID_TIMER, 500); - break; - - /* make window always stay on top (if desired) */ - case WM_VRNENABLED: - if (bFloat) - WinSetWindowPos(hwndFrame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER); - break; - - case WM_COMMAND: /* why doesn't WM_SYSCOMMAND work? */ - if (LOUSHORT(mp1) == IDM_FLOAT) { - bFloat = !bFloat; - WinCheckMenuItem(hwndSysSubmenu, IDM_FLOAT, bFloat); - } - break; - - case WM_TIMER: - if (++i > 13) - i = 1; - WinInvalidateRect(hwnd, NULL, FALSE); - return FALSE; - - case WM_PAINT: - hps = WinBeginPaint(hwnd, NULLHANDLE, &rcl); - /* necessary to avoid incorrectly repainting window */ - WinQueryWindowRect(hwnd, &rcl); - -/* sprintf(szBuf, " Current use %dK Maximum ever used %dK Errors %d", - meminfo->used / 1024, - meminfo->maxused / 1024, meminfo->num_err);*/ - sprintf(szBuf, " Current use %dB Maximum ever used %dK Errors %d", - meminfo->used, - meminfo->maxused / 1024, meminfo->num_err); - WinDrawText(hps, -1, szBuf, &rcl, CLR_BLACK, CLR_WHITE, - DT_CENTER | DT_VCENTER | DT_ERASERECT); - - WinEndPaint(hps); - break; - } - - return WinDefWindowProc(hwnd, msg, mp1, mp2); -} - -void main (void) -{ - QMSG qmsg; - HMQ hmq; - HWND hwndClient; - ULONG flFrameFlags; - - WinInitialize(0); - hmq = WinCreateMsgQueue(hab, 0); - - /* get access to shared memory */ - DosGetNamedSharedMem((PVOID*)&memptr, MEM_NAME, PAG_READ); - if (!memptr) - WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, - " FreeType/2 is not running!", - "Error", 0, MB_OK | MB_ERROR); - - else { - meminfo = memptr->address; - if (meminfo->signature != 0x46524545) - WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, - " FreeType/2 is not running!", - "Error", 0, MB_OK | MB_ERROR); - else { - flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU | - FCF_TASKLIST ; - - WinRegisterClass(hab, "MyClass", - (PFNWP) ClientWndProc, - CS_SIZEREDRAW, 0); - - hwndFrame = WinCreateStdWindow(HWND_DESKTOP, - WS_VISIBLE, - &flFrameFlags, - "MyClass", "FreeType/2 Heap Usage", - 0, (HMODULE) NULL, - 0, &hwndClient); - - WinSetVisibleRegionNotify(hwndClient, TRUE); - - /* make titlebar text look better */ - WinSetPresParam(WinWindowFromID(hwndFrame, FID_TITLEBAR), - PP_FONTNAMESIZE, 9, (PVOID)"8.Helv"); - - WinSetWindowPos(hwndFrame, NULLHANDLE, 0, 0, 350, 42, - SWP_MOVE | SWP_SIZE | SWP_SHOW); - - while (WinGetMsg(hab, &qmsg, (HWND) NULL, 0, 0)) - WinDispatchMsg(hab, &qmsg); - - WinSetVisibleRegionNotify(hwndClient, FALSE); - } - } - /* free shared memory block */ - DosFreeMem(memptr); - - WinDestroyWindow(hwndFrame); - WinDestroyMsgQueue(hmq); - WinTerminate(hab); -} Index: xc/extras/FreeType/contrib/ftos2/ifi/ftmem.icc diff -u xc/extras/FreeType/contrib/ftos2/ifi/ftmem.icc:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/ftmem.icc:removed --- xc/extras/FreeType/contrib/ftos2/ifi/ftmem.icc:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/ftmem.icc Wed Mar 16 20:59:27 2005 @@ -1,4 +0,0 @@ -ftmem.exe: $*.obj - ilink /PM:PM /ST:0x8000 /BAS:0x10000 /E:2 /A:4 $*.obj -ftmem.obj: $*.c - icc -C $*.c Index: xc/extras/FreeType/contrib/ftos2/ifi/test.c diff -u xc/extras/FreeType/contrib/ftos2/ifi/test.c:1.2 xc/extras/FreeType/contrib/ftos2/ifi/test.c:removed --- xc/extras/FreeType/contrib/ftos2/ifi/test.c:1.2 Sat Jan 11 22:55:43 2003 +++ xc/extras/FreeType/contrib/ftos2/ifi/test.c Wed Mar 16 20:59:27 2005 @@ -1,239 +0,0 @@ -/* $XFree86: xc/extras/FreeType/contrib/ftos2/ifi/test.c,v 1.2 2003/01/12 03:55:43 tsi Exp $ */ - -#include - -#include -#include -#include -#include "32pmifi.h" - -//#define USE_ORIG -#ifdef USE_ORIG -# pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "TRUETYPE", 0) -#else -# if defined USE_ATM -# pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "PMATM", 0) -# else -# pragma import (fdhdr, "FONT_DRIVER_DISPATCH_TABLE", "FREETYPE", 0) -# endif -#endif - -extern FDHEADER fdhdr; - -char *fontnames[20] = { - "G:\\OS2\\MDOS\\WINOS2\\SYSTEM\\SYMBOL.TTF", - "G:\\OS2\\MDOS\\WINOS2\\SYSTEM\\WINGDING.TTF", - "G:\\PSFONTS\\ARIALB.ttf", - "G:\\PSFONTS\\ARIALI.ttf", - "G:\\PSFONTS\\ARIALZ.ttf", - "G:\\PSFONTS\\COUR.TTF", - "G:\\PSFONTS\\COURB.TTF", - "G:\\PSFONTS\\COURI.TTF", - "G:\\PSFONTS\\COURZ.TTF", - "G:\\PSFONTS\\ARIAL.ttf", - "G:\\PSFONTS\\TIMESB.TTF", - "G:\\PSFONTS\\TIMESI.ttf", - "G:\\PSFONTS\\TIMESZ.ttf", - "G:\\PSFONTS\\TIMES.TTF", - "G:\\PSFONTS\\ARIBLK.ttf", - "G:\\CHINESE\\AVSV.TTF", - "G:\\CHINESE\\MINGLI.TTC", - "D:\\PSFONTS\\TNRMT30.TTF" -}; - -#define FNTNAME1 "\\PSFONTS\\TIMES.TTF" -#ifdef USE_ATM -# define FNTNAME2 "\\PSFONTS\\helv.ofm" -#else -# define FNTNAME2 "\\PSFONTS\\symbol.tTf" -#endif - -#define BUFSIZE 32768 - -void ShowChar(PCHARATTR pca, PBITMAPMETRICS pbmm) { - int i, j; - int bufwidth = ((pbmm->sizlExtent.cx + 31) & -32) / 8; - - for (i =0; i < pbmm->sizlExtent.cy; i++) { - for (j = 0; j < bufwidth * 8; j++) - if (pca->pBuffer[i * bufwidth + j / 8] & (1 << (7-(j % 8)))) - printf("*"); - else - printf(" "); - printf("\n"); - } -} - -void main(int argc, char **argv) -{ - char fname[260]; - PFDDISPATCH pfdisp; - LONG rc; - HFF hff, hff2; /* font file */ - HFC hfc, hfc2; /* font context */ - static IFIMETRICS ifimet[12]; /* IFI metrics */ - CONTEXTINFO ci; - CHARATTR charattr; /* character attributes */ - BITMAPMETRICS bmm; /* bit-map metrics */ - PBYTE buf; - int glyph = 0, i, j; - int numFaces; - int faceIndex = 0; - - switch (argc) { - case 4: - strcpy(fname, argv[1]); - glyph = atoi(argv[2]); - faceIndex = atoi(argv[3]); - break; - - case 2: - glyph = atoi(argv[1]); - case 1: - strcpy(fname, FNTNAME1); - break; - - default: - strcpy(fname, argv[1]); - glyph = atoi(argv[2]); - } - - buf = (PBYTE)malloc(BUFSIZE); - if (strncmp("OS/2 FONT DRIVER", fdhdr.strId, 16)) { - printf("Invalid Font Driver\n"); - return; - } - printf("Font Driver OK, "); - printf("Version %d\n", fdhdr.ulVersion); - printf("Technology: %s\n", fdhdr.szTechnology); - - hff = fdhdr.pfddisp->FdLoadFontFile(fname); - printf("Loading font... HFF = %X\n", hff); - if (hff == (HFF)0xFFFFFFFF) - return; - -/* rc = fdhdr.pfddisp->FdConvertFontFile("G:\\PSFONTS\\TIMES.TTF", - "G:\\PSFONTS", buf); */ - -#if 0 - for (i = 0; i < 18; i++) { - hff = fdhdr.pfddisp->FdLoadFontFile(fontnames[i]); - if (hff == (HFF)-1) { - printf("x"); - continue; - } - numFaces = fdhdr.pfddisp->FdQueryFaces(hff, NULL, 0, -1, 0); - if (numFaces < 0) { - printf("x"); - continue; - } - for (j = 0; j < numFaces; j++) { - rc = fdhdr.pfddisp->FdQueryFaces(hff, &ifimet[0], 238, 1, j); - if (rc < 0) { - printf("x"); - continue; - } - } - - rc = fdhdr.pfddisp->FdUnloadFontFile(hff); - if (rc) - printf("x"); - else - printf("."); - } - printf("\n"); -#endif - - hff = fdhdr.pfddisp->FdLoadFontFile(FNTNAME2); - hff = fdhdr.pfddisp->FdLoadFontFile(fname); - rc = fdhdr.pfddisp->FdUnloadFontFile(hff); - - hff = fdhdr.pfddisp->FdLoadFontFile(fname); - printf("Loading font... HFF = %X\n", hff); - if (hff == (HFF)0xFFFFFFFF) - return; - numFaces = fdhdr.pfddisp->FdQueryFaces(hff, NULL, 0, -1, 0); - printf("Number of faces = %d\n", numFaces); - rc = fdhdr.pfddisp->FdQueryFaces(hff, &ifimet[0], sizeof(IFIMETRICS), numFaces, 0); - printf("Querying faces... RC = %X\n", rc); - hfc = fdhdr.pfddisp->FdOpenFontContext(hff, faceIndex); - printf("Opening context... HFC = %X\n", hfc); - if (hfc == (HFC)0xFFFFFFFF) { - rc = fdhdr.pfddisp->FdUnloadFontFile(hff); - printf("Unloading font... RC = %X\n", rc); - } - ci.cb = sizeof(ci); - ci.fl = 0; -/* ci.sizlPPM.cx = 3618; - ci.sizlPPM.cy = 3622; - ci.pfxSpot.x = 46340; - ci.pfxSpot.y = 46340; - ci.matXform.eM11 = 511; - ci.matXform.eM12 = 0; - ci.matXform.eM21 = 0; - ci.matXform.eM22 = 511; */ - ci.sizlPPM.cx = 3622; - ci.sizlPPM.cy = 3622; - ci.pfxSpot.x = 46340; - ci.pfxSpot.y = 46340; - ci.matXform.eM11 = 768; - ci.matXform.eM12 = 0; - ci.matXform.eM21 = 0; - ci.matXform.eM22 = 768; - - rc = fdhdr.pfddisp->FdQueryFaceAttr(hfc, FD_QUERY_ABC_WIDTHS, buf, - sizeof(ABC_TRIPLETS), NULL, glyph); - printf("Querying face attrs... RC = %d\n", rc); - rc = fdhdr.pfddisp->FdQueryFaceAttr(hfc, FD_QUERY_KERNINGPAIRS, buf, - ifimet[0].cKerningPairs * sizeof(FD_KERNINGPAIRS), - NULL, 0); - - - rc = fdhdr.pfddisp->FdSetFontContext(hfc, &ci); - printf("Setting context... rc = %X\n", rc); - - charattr.cb = sizeof(charattr); - charattr.iQuery = FD_QUERY_BITMAPMETRICS | FD_QUERY_CHARIMAGE; -// charattr.iQuery = FD_QUERY_OUTLINE; - charattr.gi = glyph; - charattr.pBuffer = buf; - charattr.cbLen = BUFSIZE; - if (rc == -1) - return; - rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm); - printf("Querying char attrs... bytes = %d\n", rc); - ShowChar(&charattr, &bmm); - -// rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm, NULL); -// printf("Querying char attrs... bytes = %d\n", rc); - - hff2 = fdhdr.pfddisp->FdLoadFontFile(FNTNAME2); - printf("Loading font... HFF = %X\n", hff2); - if (hff2 == (HFF)0xFFFFFFFF) - return; - - charattr.cbLen = 0; - rc = fdhdr.pfddisp->FdQueryCharAttr(hfc, &charattr, &bmm); - printf("Querying char attrs... bytes = %d\n", rc); - rc = fdhdr.pfddisp->FdQueryFaces(hff2, &ifimet[0], sizeof(ifimet), 1, 0); - printf("Querying faces... RC = %X\n", rc); - hfc2 = fdhdr.pfddisp->FdOpenFontContext(hff2, 0); - printf("Opening context... HFC = %X\n", hfc2); - if (hfc2 == (HFC)0xFFFFFFFF) { - rc = fdhdr.pfddisp->FdUnloadFontFile(hff2); - printf("Unloading font... RC = %X\n", rc); - } - rc = fdhdr.pfddisp->FdCloseFontContext(hfc); - printf("Closing context... RC = %X\n", rc); - rc = fdhdr.pfddisp->FdUnloadFontFile(hff); - printf("Unloading font... RC = %X\n", rc); - rc = fdhdr.pfddisp->FdUnloadFontFile(hff); - printf("Unloading font... RC = %X\n", rc); - - rc = fdhdr.pfddisp->FdCloseFontContext(hfc2); - printf("Closing context... RC = %X\n", rc); - rc = fdhdr.pfddisp->FdUnloadFontFile(hff2); - printf("Unloading font... RC = %X\n", rc); - rc = fdhdr.pfddisp->FdUnloadFontFile(hff2); - printf("Unloading font... RC = %X\n", rc); -} Index: xc/extras/FreeType/contrib/ftos2/ifi/test.icc diff -u xc/extras/FreeType/contrib/ftos2/ifi/test.icc:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/test.icc:removed --- xc/extras/FreeType/contrib/ftos2/ifi/test.icc:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/test.icc Wed Mar 16 20:59:27 2005 @@ -1,6 +0,0 @@ -test.exe: $*.obj freetype.lib - ilink /DE /PM:VIO /ST:0x1000 $*.obj freetype.lib -test.obj: $*.c - icc -Ti+ -C -Ss -Sp1 $*.c -freetype.lib: $*.dll - implib $*.lib $*.dll Index: xc/extras/FreeType/contrib/ftos2/ifi/test.wat diff -u xc/extras/FreeType/contrib/ftos2/ifi/test.wat:1.1.1.1 xc/extras/FreeType/contrib/ftos2/ifi/test.wat:removed --- xc/extras/FreeType/contrib/ftos2/ifi/test.wat:1.1.1.1 Sat Jan 23 22:21:51 1999 +++ xc/extras/FreeType/contrib/ftos2/ifi/test.wat Wed Mar 16 20:59:27 2005 @@ -1,4 +0,0 @@ -test.exe: $*.obj - wlink file $*.obj lib freetype.lib import _fdhdr freetype.FONT_DRIVER_DISPATCH_TABLE -test.obj: $*.c - wcc386 -d2 -zp1 $*.c Index: xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c diff -u xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c:1.2 xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c:removed --- xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c:1.2 Sat Jan 11 22:55:44 2003 +++ xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c Wed Mar 16 20:59:27 2005 @@ -1,386 +0,0 @@ -/******************************************************************* - * - * ttmemory.c 1.2 - * - * Memory management component (body). - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * Portions Copyright 1998 by Michal Necasek - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 1.1 and 1.2: - * - * - the font pool is gone. - * - * - introduced the FREE macro and the Free function for - * future use in destructors. - * - * - Init_FontPool() is now a macro to allow the compilation of - * 'legacy' applications (all four test programs have been updated). - * - * Note: This code was slightly adapted for use in the OS/2 - * Font Driver (FreeType/2). - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/contrib/ftos2/lib/ttmemory.c,v 1.2 2003/01/12 03:55:44 tsi Exp $ */ - -#include "ttdebug.h" -#include "ttmemory.h" -#include "ttengine.h" - -#define INCL_DEV -#include -#include - -#include - -#undef DEBUG_MEM - -/* -------------------- debugging defs ----------------------- */ -/* DEBUG_MEM creates a file and logs all actions to it */ - -#ifdef DEBUG_MEM - static HFILE MemLogHandle = NULLHANDLE; - static ULONG Written = 0; - static char log[2048] = ""; - static char buf[2048] = ""; - - -char* itoa10( int i, char* buffer ) { - char* ptr = buffer; - char* rptr = buffer; - char digit; - - if (i == 0) { - buffer[0] = '0'; - buffer[1] = 0; - return buffer; - } - - if (i < 0) { - *ptr = '-'; - ptr++; rptr++; - i = -i; - } - - while (i != 0) { - *ptr = (char) (i % 10 + '0'); - ptr++; - i /= 10; - } - - *ptr = 0; ptr--; - - while (ptr > rptr) { - digit = *ptr; - *ptr = *rptr; - *rptr = digit; - ptr--; - rptr++; - } - - return buffer; -} - -static const char* hexstr = "0123456789abcdef"; - -char* itohex2( int i, char* buffer ) - { - buffer[0] = hexstr[ (i >> 12) & 0xF ]; - buffer[1] = hexstr[ (i >> 8 ) & 0xF ]; - buffer[2] = hexstr[ (i >> 4 ) & 0xF ]; - buffer[3] = hexstr[ (i ) & 0xF ]; - buffer[4] = '\0'; - return buffer; -} - -char* itohex4( long i, char* buffer ) -{ - itohex2( (i >> 16) & 0xFFFF, buffer ); - /* We separate the high and low part with a dot to make it */ - /* more readable */ - buffer[4] = '.'; - itohex2( i & 0xFFFF, buffer+5 ); - return buffer; -} - -# define COPY(s) strcpy(log, s) -# define CAT(s) strcat(log, s) -# define CATI(v) strcat(log, itoa10( (int)v, buf )) -# define CATH(v) strcat(log, itohex4( (long)v, buf )) -# define CATW(v) strcat(log, itohex2( (short)v, buf )) -# define WRITE DosWrite(MemLogHandle, log, strlen(log), &Written) -# define ERRRET(e) { COPY("Error at "); \ - CATI(__LINE__); \ - CAT("\r\n"); \ - WRITE; \ - return(e); \ - } - -#else - -# define COPY(s) -# define CAT(s) -# define CATI(v) -# define CATH(v) -# define CATW(v) -# define WRITE -# define ERRRET(e) return(e); - -#endif /* DEBUG_MEM */ - - -#undef TRACK_MEM -/* TRACK_MEM allows online tracking of memory usage online (via shared */ -/* memory). It is used in conjunction with the FTMEM utility. */ - -#ifdef TRACK_MEM - /* name of shared memory used for memory usage reporting */ -# define MEM_NAME "\\sharemem\\freetype" - - /* structure containing memory usage information */ - typedef struct _INFOSTRUCT { - ULONG signature; /* signature (0x46524545, 'FREE') */ - ULONG used; /* bytes actually used */ - ULONG maxused; /* maximum amount ever used */ - ULONG num_err; /* number of (de)allocation errors */ - } INFOSTRUCT, *PINFOSTRUCT; - - /* structure (in named shared memory) pointing to the above struct */ - typedef struct _INFOPTR { - PINFOSTRUCT address; /* pointer to actual memory info */ - } INFOPTR, *PINFOPTR; - - PINFOSTRUCT meminfo; /* struct in shared memory holding usage info */ - PINFOPTR memptr; -#endif - -/* ----------------------------------------------------------------- - - A brief explanation of the memory allocator : - - - We store the block's size in front of it. The size implies the nature - of the block, and selects a de-allocation scheme.. - - - A note on the memory debugging schemes: logging and online tracking - are independent of each other and none, either or both may be used. - - ----------------------------------------------------------------- */ - - /****************************************************************/ - /* */ - /* Allocate a block of memory */ - /* */ - static - void* ft2_malloc( long size ) - { - long* head; - void* base; - int rc; - - /* add header size */ - size += sizeof(long); - - /* Allocate memory accessible from all processes */ - if (( rc = SSAllocMem( (PVOID)&head, size, 0 ))) - { - COPY( "ft2_malloc: block SSAllocMem failed with rc = " ); - CATH( rc ); - CAT ( "\r\n" ); - WRITE; - return NULL; - } - *head = size; - base = (void*)(head + 1); -# ifdef TRACK_MEM - meminfo->used += size; - if (meminfo->used > meminfo->maxused) - meminfo->maxused = meminfo->used; -# endif - return base; - } - - /****************************************************************/ - /* */ - /* Release a block of memory */ - /* */ - int ft2_free( void* block ) - { - long* head; - long size, offset; - int rc, h; - - if (!block) - return -1; - - head = ((long*)block) - 1; - size = *head; - - if (size <= 0) - { - COPY( "ft2_free: negative size !!\r\n" ); - WRITE; - return -1; - } - - rc = SSFreeMem( (PVOID)head ); - if (rc) - { - COPY( "ft2_free: block SSFreeMem failed with rc = " ); - CATI( rc ); - CAT ( "\r\n" ); - WRITE; - } -# ifdef TRACK_MEM - meminfo->used -= size; -# endif - return rc; - } - -/******************************************************************* - * - * Function : TT_Alloc - * - * Description : Allocates memory from the heap buffer. - * - * Input : Size size of the memory to be allocated - * P pointer to a buffer pointer - * - * Output : Error code. - * - * NOTE: The newly allocated block should _always_ be zeroed - * on return. Many parts of the engine rely on this to - * work properly. - * - ******************************************************************/ - - TT_Error TT_Alloc( long Size, void** P ) - { - if ( Size ) - { - *P = ft2_malloc( Size ); - if (!*P) { -# ifdef TRACK_MEM - meminfo->num_err++; -# endif - return TT_Err_Out_Of_Memory; - } - - /* MEM_Set( *P, 0, Size); */ /* not necessary, SSAllocMem does it */ - } - else - *P = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Free - * - * Description : Releases a previously allocated block of memory. - * - * Input : P pointer to memory block - * - * Output : Always SUCCESS. - * - * Note : The pointer must _always_ be set to NULL by this function. - * - ******************************************************************/ - - TT_Error TT_Free( void** P ) - { - if ( !P || !*P ) - return TT_Err_Ok; - - if (ft2_free( *P )) { -# ifdef TRACK_MEM - meminfo->num_err++; -# endif - } - *P = NULL; - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Init - * - * Description : Initializes the memory. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - TT_Error TTMemory_Init() - { - int rc; - -# ifdef DEBUG_MEM - ULONG Action; - - DosOpen("C:\\FTMEM.LOG", &MemLogHandle, &Action, 0, FILE_NORMAL, - OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS, - OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_WRITE_THROUGH | - OPEN_FLAGS_SEQUENTIAL | OPEN_SHARE_DENYWRITE | OPEN_ACCESS_WRITEONLY, - NULL); - - COPY("FTMEM Init.\r\n"); - WRITE; - -# endif /* DEBUG */ - -# ifdef TRACK_MEM - /* allocate named shared memory and global shared memory */ - - SSAllocMem(&meminfo, 4096, 0); - DosAllocSharedMem((PVOID*)&memptr, MEM_NAME, 4096, fALLOC); - memptr->address = meminfo; - meminfo->signature = 0x46524545; /* 'FREE' */ - meminfo->maxused = 0; - meminfo->used = 0; -# endif /* TRACK */ - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Done - * - * Description : Finalizes memory usage. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - TT_Error TTMemory_Done() - { - /* Never called by the font driver (beats me why). We do not - release the heaps */ - -# ifdef TRACK_MEM - DosFreeMem(memptr); /* free shared memory */ - SSFreeMem(meminfo); -# endif -# ifdef DEBUG_MEM - COPY("FTMEM Done.\r\n"); - WRITE; - DosClose(MemLogHandle); -# endif - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.icc diff -u xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.icc:1.1.1.1 xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.icc:removed --- xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.icc:1.1.1.1 Sat Jan 23 22:21:52 1999 +++ xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.icc Wed Mar 16 20:59:27 2005 @@ -1,72 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for IBM VisualAge C++ under OS/2. -# -# You will need nmake. -# -# Use this file while in the lib directory with the following statement: -# -# nmake -f arch\os2\Makefile.icc -# - -ARCH = arch\os2 -FT_MAKEFILE = $(ARCH)\Makefile.icc -FT_MAKE = $(MAKE) -nologo - -CC = icc -CFLAGS = -Wcnd- -Wpro- -Ss -Sp1 -Rn -Ge- -O+ -G4 -Q+ -Iarch\os2 -I. -Iextend -#CFLAGS = -Wcnd- -Wpro- -Ss -Sp1 -Rn -Ge- -Ti+ Q+ -Iarch\os2 -I. -Iextend - -# NOTE: Optimizations are discarded, as it seems that Visual Age -# is buggy when producing ttraster.obj. The resulting code -# crashes under some circumstances (performing vertical dropout -# control when rendering smoothed outlines)! - -TTFILE = $(ARCH)\os2file.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c \ - extend\ftxcmap.c extend\ftxwidth.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c \ - ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -all: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_S)" libttf.lib - -debug: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_M)" libttf.lib - - -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -$(OBJS_X): - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -$(ARCH)\os2file.obj: - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -libttf.lib: $(LIB_FILES) - !ilib /nologo /noignorecase /nobackup $@ -+$?,, - -clean: - -del *.obj - -del extend\*.obj - -del arch\os2\*.obj - -distclean: clean - -del libttf.lib - -# end of Makefile.icc Index: xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.wat diff -u xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.wat:1.1.1.1 xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.wat:removed --- xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.wat:1.1.1.1 Sat Jan 23 22:21:52 1999 +++ xc/extras/FreeType/contrib/ftos2/lib/arch/os2/Makefile.wat Wed Mar 16 20:59:27 2005 @@ -1,41 +0,0 @@ -# This file is part of the FreeType project. -# Modified for FTIFI - Mike -# -# It builds the library and test programs using Watcom C/C++ under OS/2. -# -# You will need nmake!! -# If you can change this makefile to work with wmake, please -# inform me. -# -# Use this file while in the lib directory with the following statement: -# -# nmake -f arch\os2\Makefile.icc - -CC = wcc386 -CFLAGS = -4r -Otexan -zp1 -bd -zc -Iarch\os2 -I. -Iextend - -SRC = ttapi.c ttcache.c ttcalc.c ttcmap.c tterror.c \ - ttfile.c ttgload.c ttinterp.c ttlists.c ttload.c \ - ttmemory.c ttmutex.c ttobjs.c ttraster.c ttextend.c \ - \ - extend\ftxgasp.c extend\ftxkern.c - -OBJ = $(SRC:.c=.obj) - -.c.obj: - $(CC) $(CFLAGS) $*.c - -all: libttf.lib - -libttf.lib: $(OBJ) - -move ft*.obj extend - !wlib -c $@ -+$? - -clean: - -del *.obj - -del extend\*.obj - -distclean: clean - -del libttf.lib - -# end of Makefile.wcc Index: xc/extras/FreeType/contrib/ttf2bdf/.cvsignore diff -u xc/extras/FreeType/contrib/ttf2bdf/.cvsignore:1.1.1.1 xc/extras/FreeType/contrib/ttf2bdf/.cvsignore:removed --- xc/extras/FreeType/contrib/ttf2bdf/.cvsignore:1.1.1.1 Sat Feb 12 23:54:51 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/.cvsignore Wed Mar 16 20:59:28 2005 @@ -1,5 +0,0 @@ -ttf2bdf -config.status -config.cache -config.log -Makefile Index: xc/extras/FreeType/contrib/ttf2bdf/Makefile.in diff -u xc/extras/FreeType/contrib/ttf2bdf/Makefile.in:1.3 xc/extras/FreeType/contrib/ttf2bdf/Makefile.in:removed --- xc/extras/FreeType/contrib/ttf2bdf/Makefile.in:1.3 Tue Oct 21 14:10:06 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/Makefile.in Wed Mar 16 20:59:28 2005 @@ -1,75 +0,0 @@ -# -# Id: Makefile.in,v 1.4 1998/12/06 18:50:22 mleisher Exp $ -# $XFree86: xc/extras/FreeType/contrib/ttf2bdf/Makefile.in,v 1.3 2003/10/21 18:10:06 tsi Exp $ -# - -# -# Copyright 1996, 1997, 1998 Computing Research Labs, New Mexico State -# University -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -# THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -RM = @RM@ -MKINSTALLDIRS = ../../mkinstalldirs - -CC = @CC@ -CFLAGS = @XX_CFLAGS@ @CFLAGS@ - -SRCS = remap.c ttf2bdf.c -OBJS = remap.o ttf2bdf.o - -# -# Point these at the FreeType source directories. -# -INCS = @CPPFLAGS@ -LIBS = @LIBS@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -mandir = @mandir@ - -all: ttf2bdf - -ttf2bdf: $(OBJS) - $(PURIFY) $(CC) $(STATIC) $(CFLAGS) -o ttf2bdf $(OBJS) $(LIBS) - -clean: - $(RM) -f *.o *BAK *CKP *~ a.out core - -realclean: clean - $(RM) -f ttf2bdf - -distclean: clean - $(RM) -f ttf2bdf config.* Makefile - -.c.o: - $(CC) $(CFLAGS) $(INCS) -c $< -o $@ - -install: ttf2bdf - @$(MKINSTALLDIRS) $(bindir) $(mandir)/man1 - @cp ttf2bdf $(bindir)/ttf2bdf - @cp ttf2bdf.man $(mandir)/man1/ttf2bdf.1 - -uninstall: - @$(RM) -f $(bindir)/ttf2bdf - @$(RM) -f $(mandir)/man1/ttf2bdf.1 - -# end of Makefile Index: xc/extras/FreeType/contrib/ttf2bdf/README diff -u xc/extras/FreeType/contrib/ttf2bdf/README:1.3 xc/extras/FreeType/contrib/ttf2bdf/README:removed --- xc/extras/FreeType/contrib/ttf2bdf/README:1.3 Tue Oct 21 14:10:06 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/README Wed Mar 16 20:59:28 2005 @@ -1,316 +0,0 @@ -# -# Id: README,v 1.18 1999/08/19 16:30:24 mleisher Exp $ -# $XFree86: xc/extras/FreeType/contrib/ttf2bdf/README,v 1.3 2003/10/21 18:10:06 tsi Exp $ -# - -# -# Copyright 1996, 1997, 1998, 1999 Computing Research Labs, -# New Mexico State University -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -# THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -This is version 2.7 of a program to convert TrueType fonts to BDF fonts using -the FreeType renderer. - -BDF fonts can be edited using the XmBDFEditor which is available from (replace -the with the most current version number): - - [Sources] - ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed.tar.gz - - [Binaries: Linux/Pentium, Solaris, SunOS] - ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed--ELF.tar.gz - ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed--SOLARIS.tar.gz - -COMPILING ttf2bdf ------------------ - -1. Pick up the latest FreeType distribution from: - -ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype/devel/freetype-current.tar.gz - -2. Unpack FreeType and build it. - -3. Go into the "contrib/ttf2bdf/" directory and type "make" to build "ttf2bdf". - -RUNNING ttf2bdf ---------------- - -Type the following to get a list of command line options: - - % ttf2bdf -h - -ACKNOWLEDGEMENTS ----------------- - -Thanks go to the following people: - - Robert Wilhelm for pointing out a - crucial problem with the pre-1.0 code. - - Lho Li-Da for pointing out a problem with Big5 and - GB2312 encoding ids being documented incorrectly in the TT docs and a - problem with glyphs that are height 1 or width 1, and a font name problem. - - Adrian Havill for unintentionally pointing out a - missing feature. - - Richard Verhoeven for pointing out a font names problem, - problem with bitmaps missing their last byte in each row, and an invalid - FONT_DESCENT property value. - - Choi Jun Ho for his inspiration from his - implementation that changed some character set names, and added a - number of new command line parameters. - - Pavel Kankovsky for providing some - critical grid fitting and metrics fixes when generating the bitmaps, - adding the code to "auto-detect" bold and italic fonts, removing the - dependency on ttobjs.h, finding some remapping bugs, and other fixes. - - Matti Koskinen for pointing out a problem with using - the code 0xffff. - - Eugene Bobin for contributing the Cyrillic mapping - tables (iso8859.5, koi8.r, windows.1251) and the sample shell scripts for - generating sets of BDF fonts. - - Oleg N. Yakovlev for alerting me to the - problem of certain codes not being loaded correctly in the mapping tables. - - Bertrand Petit for providing additional command line - parameters to allow more control over the XLFD name generated. - - Roman Czyborra for pointing out the need for a - change from UNICODE-2.0 to ISO10646-1 in the font XLFD name. - - Mike Blazer for pointing out the include changes - needed to compile on Windows. - - Solofo Ramangalahy for contributing the ISO8859.1 and - ISO8859.3 mapping tables. - - Antoine Leca for suggesting the exchange of - columns in the mapping table to better fit the mapping table format used by - many. - - Robert Brady for pointing out a problem with the - length of _XFREE86_GLYPH_RANGES properties and an Exceed font compiler. - -CHANGES -------- -Version 2.7 -=========== - 1. Swapped all the columns in the mapping files. - - 2. Changed the mapping table loader to index on the second column instead of - the first. - - 3. Reduced the line length of _XFREE86_GLYPH_RANGES properties to 256 - instead of 512. - -Version 2.6 -=========== - 1. Changed the includes to deal with compilation on Windows. - - 2. Added some new mapping tables. - -Version 2.5 -=========== - 1. Updated the copyright dates. - - 2. Fixed an incorrect parameter for Traditional C compilers. - - 3. Added generation of the _XFREE86_GLYPH_RANGES properties. - -Version 2.4 -=========== - 1. Change all CRLF's, CR's, or LF's in copyright strings to double spaces. - - 2. Changed it so gcc 2.8.1 likes the return type of main() again. - -Version 2.3 -=========== - 1. Changed Makefile.in a bit to make installation more consistent. - - 2. Changed the lower limit for the vertical and horizontal resolutions to be - 10dpi instead of 50dpi. - -Version 2.2 -=========== - 1. Added missing documentation in the manual page. - - 2. Added the `-u' parameter to allow setting the character used to replace - dashes or spaces in the font name. - - 3. Changed the CHARSET_REGISTRY and CHARSET_ENCODING to be "ISO10646-1" - instead of "Unicode-2.0". - - 4. The numGlyphs property comes back incorrect for some fonts, so the loop - cycles through all 65536 possibilities every time now. - -Version 2.1 -=========== - 1. Added patches provided by Bertrand Petit. - - 2. Insured compatibility with FreeType 1.1. - -Version 2.0 -=========== - 1. Created two new subdirectories. One for mapping tables and one for any - other contributed code, scripts, or data. - - 2. Updated Cyrillic mapping files sent by Eugene Bobin. - - 3. Minor fixes to make compatible with the latest version of FreeType. - -Version 1.9 -=========== - 1. Fixed a problem with the first code of a mapping table being lost. - -Version 1.8 -=========== - 1. Added the Unicode->Cyrillic mapping tables provided by Eugene Bobin. - - 2. Created a shell script based on Eugene Bobin's scripts to generate sets - of BDF fonts at one time. - -Version 1.7 -=========== - 1. If a remapping table is provided, code ranges are now expected to be - specified in terms of the codes in the mapping table. - - 2. The glyph generation loop is improved a bit. - -Version 1.6 -=========== - 1. Added two expected keywords REGISTRY and ENCODING in the remap files. - These values are used when the font's XLFD name is generated. - - 2. Added TTF2BDF_VERSION macro used for adding the "Converted by" comment. - - 3. Handle the case of no glyphs being generated. No BDF font is produced. - - 4. Updated for new API with TT_Engine. - -Version 1.5 -=========== - 1. Fixed a problem with updating the average width field of the XLFD - font name. - - 2. Changed things so bitmaps are generated to a temporay file so an - accurate count and metrics can be calculated. - - 3. Changed things so the font header is not generated until the bitmaps - have been generated. This allows accurate calculations of the various - fields needed. - - 4. Added the '-l' command line parameter that allows specification of a - subrange of glyphs to generate. The syntax is the same as that used in - X11 for subranges. See the X11 XLFD documentation, page 9 for more - detail. - - Example: - - % ttf2bdf -l '60 70 80_90' font.ttf -o font.bdf - - The command above will only generate the glyphs for codes 60, 70, - and 80 through 90 inclusive. - - 5. Added the ability to load a mapping table that will remap a font to - another character set. The mapping table should have two columns. - - The first column should be the hexadecimal code of the glyph in the - "cmap" table ttf2bdf is using. The second column should have the - code which should be used in the BDF font. An example mapping file - is provided which will map fonts from Unicode (default cmap table) to - ISO8859-2. - - 6. Fixed grid fitting to avoid dropout in some cases. - - 7. Removed dependency on ttobjs.h by using the new API function for - retrieving strings. - - 8. Removed warning about getpid() on Solaris. - - 9. Rearranged the man page a bit to be more useful. Minor - improvements also done. - - 10. Changed the loop so it does not include 0xffff as a code because - it causes crashes when converting some fonts. - -Version 1.4 [Never released as binaries] -=========== - 1. Changed the names of two MS encodings (Wansung and Johab) to - KSC5601.1987 and KSC5601.1992. - - 2. Added the '-n' command line flag to turn hinting off. - - 3. Added the '-c' command line flag to set the font spacing. - - 4. Added the '-t', '-w', and '-s' command line options to override the - default typeface, weight and slant names. - -Version 1.3 -=========== - 1. Converted to use the new FreeType API. - - 2. Added the '-rh' and '-rv' command line parameters to allow both the - horizontal and vertical resolutions to be set individually. - - 3. Fixed a problem with ignoring undefined glyphs. All undefined were - being rendered which caused missing glyphs on the end. - - 4. Fixed a problem with offset calculations needed to render glyph - bitmaps. - -Version 1.2 -=========== - 1. Fixed a problem with dashes that appear in the font family name causing - parse problems with the XLFD font names. - - 2. Fixed a problem with certain bitmaps missing their final byte on each - row. - - 3. Fixed an incorrect FONT_DESCENT value. - - 4. Changed things around so names can be retrieved in a more general way. - - 5. Fixed a problem with bitmaps not being generated after a certain point. - -Version 1.1 -=========== - 1. Fixed the actual glyph count for the CHARS line. - - 2. Swapped the Big5 and GB2312 XLFD encoding strings because of incorrect TT - specifications. - - 3. Fixed a problem with bitmap generation for glyphs that are width 1 or - height 1. - - 4. Added command line parameters to set the font and render pool memory - sizes in Kilobytes from the command line. - -Version 1.0 -=========== - 1. Initial release. - -mleisher@crl.nmsu.edu (Mark Leisher) -15 October 1997 Index: xc/extras/FreeType/contrib/ttf2bdf/configure diff -u xc/extras/FreeType/contrib/ttf2bdf/configure:1.1.1.2 xc/extras/FreeType/contrib/ttf2bdf/configure:removed --- xc/extras/FreeType/contrib/ttf2bdf/configure:1.1.1.2 Sat Feb 12 23:54:52 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/configure Wed Mar 16 20:59:28 2005 @@ -1,1357 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=../../lib/freetype.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:529: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:559: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:610: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 653 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:689: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:717: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="$CPPFLAGS -I../../lib" -echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:753: checking for TT_Init_FreeType in -lttf" >&5 -ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lttf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lttf" -else - echo "$ac_t""no" 1>&6 - - { echo "configure: error: Can't find ttf library! Compile FreeType first." 1>&2; exit 1; } -fi - - - - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi - - -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:814: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RM"; then - ac_cv_prog_RM="$RM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RM="rm" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RM="$ac_cv_prog_RM" -if test -n "$RM"; then - echo "$ac_t""$RM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:842: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:922: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1029: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:1067: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_clean=no -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@XX_CFLAGS@%$XX_CFLAGS%g -s%@RM@%$RM%g -s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - Index: xc/extras/FreeType/contrib/ttf2bdf/configure.in diff -u xc/extras/FreeType/contrib/ttf2bdf/configure.in:1.3 xc/extras/FreeType/contrib/ttf2bdf/configure.in:removed --- xc/extras/FreeType/contrib/ttf2bdf/configure.in:1.3 Tue Oct 21 14:10:06 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/configure.in Wed Mar 16 20:59:28 2005 @@ -1,41 +0,0 @@ -dnl Id: configure.in,v 1.1 1998/01/14 21:45:26 mleisher Exp $ -dnl $XFree86: xc/extras/FreeType/contrib/ttf2bdf/configure.in,v 1.3 2003/10/21 18:10:06 tsi Exp $ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(../../lib/freetype.h) - -AC_PROG_CC - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="$CPPFLAGS -I../../lib" -AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[ - AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])]) -AC_SUBST(LIBS) - -dnl get Compiler flags right. - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi -AC_SUBST(XX_CFLAGS) - -AC_CHECK_PROG(RM, rm, rm) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) - -dnl Checks for library functions. -AC_FUNC_MEMCMP - -AC_OUTPUT(Makefile) Index: xc/extras/FreeType/contrib/ttf2bdf/remap.c diff -u xc/extras/FreeType/contrib/ttf2bdf/remap.c:1.3 xc/extras/FreeType/contrib/ttf2bdf/remap.c:removed --- xc/extras/FreeType/contrib/ttf2bdf/remap.c:1.3 Tue Oct 21 14:10:06 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/remap.c Wed Mar 16 20:59:28 2005 @@ -1,692 +0,0 @@ -/* - * Copyright 1996, 1997, 1998, 1999 Computing Research Labs, - * New Mexico State University - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/FreeType/contrib/ttf2bdf/remap.c,v 1.3 2003/10/21 18:10:06 tsi Exp $ */ - -#ifndef lint -#ifdef __GNUC__ -static char rcsid[] __attribute__ ((unused)) = "Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $"; -#else -static char rcsid[] = "Id: remap.c,v 1.9 1999/06/16 16:13:11 mleisher Exp $"; -#endif -#endif - -#include -#include - -#ifdef WIN32 -#include -#else -#include -#include -#endif - -/* - * Structure for managing simple lists in place. - */ -typedef struct { - unsigned char *bfield; - unsigned long bsize; - unsigned long bused; - unsigned char **field; - unsigned long size; - unsigned long used; -} list_t; - -/* - * Callback type used with the high speed text file reader function. - */ -typedef int (*scanlines_callback_t)( -#ifdef __STDC__ - unsigned char *line, - unsigned long linelen, - unsigned long lineno, - void *client_data -#endif -); - -/* - * Various utility routines. - */ - -#define setsbit(m, cc) (m[(cc) >> 3] |= (1 << ((cc) & 7))) -#define sbitset(m, cc) (m[(cc) >> 3] & (1 << ((cc) & 7))) - -/* - * An empty string for empty fields. - */ -static unsigned char empty[1] = { 0 }; - -/* - * Assume the line is NULL terminated and that the `list' parameter was - * initialized the first time it was used. - */ -static void -#ifdef __STDC__ -splitline(unsigned char *separators, unsigned char *line, - unsigned long linelen, list_t *list) -#else -splitline(separators, line, linelen, list) -unsigned char *separators, *line; -unsigned long linelen; -list_t *list; -#endif -{ - int mult, final_empty; - unsigned char *sp, *ep, *end; - unsigned char seps[32]; - - /* - * Initialize the list. - */ - list->used = list->bused = 0; - - /* - * If the line is empty, then simply return. - */ - if (linelen == 0 || line[0] == 0) - return; - - /* - * If the `separators' parameter is NULL or empty, split the list into - * individual bytes. - */ - if (separators == 0 || *separators == 0) { - if (linelen > list->bsize) { - if (list->bsize) - list->bfield = (unsigned char *) malloc(linelen); - else - list->bfield = (unsigned char *) realloc(list->bfield, linelen); - list->bsize = linelen; - } - list->bused = linelen; - (void) memcpy(list->bfield, line, linelen); - return; - } - - /* - * Prepare the separator bitmap. - */ - (void) memset((char *) seps, 0, 32); - - /* - * If the very last character of the separator string is a plus, then set - * the `mult' flag to indicate that multiple separators should be - * collapsed into one. - */ - for (mult = 0, sp = separators; sp && *sp; sp++) { - if (*sp == '+' && *(sp + 1) == 0) - mult = 1; - else - setsbit(seps, *sp); - } - - /* - * Break the line up into fields. - */ - for (final_empty = 0, sp = ep = line, end = sp + linelen; - sp < end && *sp;) { - /* - * Collect everything that is not a separator. - */ - for (; ep < end && *ep && !sbitset(seps, *ep); ep++) ; - - /* - * Resize the list if necessary. - */ - if (list->used == list->size) { - if (list->size == 0) - list->field = (unsigned char **) - malloc(sizeof(unsigned char *) << 3); - else - list->field = (unsigned char **) - realloc((char *) list->field, - sizeof(unsigned char *) * (list->size + 8)); - - list->size += 8; - } - - /* - * Assign the field appropriately. - */ - list->field[list->used++] = (ep > sp) ? sp : empty; - - sp = ep; - if (mult) { - /* - * If multiple separators should be collapsed, do it now by - * setting all the separator characters to 0. - */ - for (; ep < end && *ep && sbitset(seps, *ep); ep++) - *ep = 0; - } else - /* - * Don't collapse multiple separators by making them 0, so just - * make the one encountered 0. - */ - *ep++ = 0; - final_empty = (ep > sp && *ep == 0); - sp = ep; - } - - /* - * Finally, NULL terminate the list. - */ - if (list->used + final_empty + 1 >= list->size) { - if (list->used == list->size) { - if (list->size == 0) - list->field = (unsigned char **) - malloc(sizeof(unsigned char *) << 3); - else - list->field = (unsigned char **) - realloc((unsigned char *) list->field, - sizeof(char *) * (list->size + 8)); - list->size += 8; - } - } - if (final_empty) - list->field[list->used++] = empty; - - if (list->used == list->size) { - if (list->size == 0) - list->field = (unsigned char **) - malloc(sizeof(unsigned char *) << 3); - else - list->field = (unsigned char **) - realloc((char *) list->field, - sizeof(unsigned char *) * (list->size + 8)); - list->size += 8; - } - list->field[list->used] = 0; -} - -static int -#ifdef __STDC__ -scanlines(int fd, scanlines_callback_t callback, void *client_data, - unsigned long *lineno) -#else -scanlines(fd, callback, client_data, lineno) -int fd; -scanlines_callback_t callback; -void *client_data; -unsigned long *lineno; -#endif -{ - unsigned long lno; - int n, res, done, refill, bytes, hold; - char *ls, *le, *pp, *pe, *hp; - char buf[65536]; - - if (callback == 0) - return -1; - - lno = 1; - (void) memset(buf, 0, 65536); - res = done = 0; - pp = ls = le = buf; - bytes = 65536; - while (!done && (n = read(fd, pp, bytes)) > 0) { - /* - * Determine the new end of the buffer pages. - */ - pe = pp + n; - - for (refill = 0; done == 0 && refill == 0; ) { - while (le < pe && *le != '\n' && *le != '\r') - le++; - - if (le == pe) { - /* - * Hit the end of the last page in the buffer. - * Need to find out how many pages to shift - * and how many pages need to be read in. - * Adjust the line start and end pointers down - * to point to the right places in the pages. - */ - pp = buf + (((ls - buf) >> 13) << 13); - n = pp - buf; - ls -= n; - le -= n; - n = pe - pp; - (void) memcpy(buf, pp, n); - pp = buf + n; - bytes = 65536 - n; - refill = 1; - } else { - /* - * Temporarily NULL terminate the line. - */ - hp = le; - hold = *le; - *le = 0; - - if (callback && *ls != '#' && *ls != 0x1a && le > ls && - (res = (*callback)((unsigned char *) ls, le - ls, lno, - client_data)) != 0) - done = 1; - else { - ls = ++le; - /* - * Handle the case of DOS CRLF sequences. - */ - if (le < pe && hold == '\n' && *le =='\r') - ls = ++le; - } - - /* - * Increment the line number. - */ - lno++; - - /* - * Restore the character at the end of the line. - */ - *hp = hold; - } - } - } - - /* - * Return with the last line number processed. - */ - *lineno = lno; - - return res; -} - -static unsigned char a2i[128] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -static unsigned char odigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static unsigned char ddigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static unsigned char hdigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, - 0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -#define isdigok(m, d) (m[(d) >> 3] & (1 << ((d) & 7))) - -static unsigned short -#ifdef __STDC__ -my_atous(unsigned char *s, unsigned char **end, int base) -#else -my_atous(s, end, base) -unsigned char *s, **end; -int base; -#endif -{ - unsigned short v; - unsigned char *dmap; - - if (s == 0 || *s == 0) - return 0; - - /* - * Make sure the radix is something recognizable. Default to 10. - */ - switch (base) { - case 8: dmap = odigits; break; - case 16: dmap = hdigits; break; - default: base = 10; dmap = ddigits; break; - } - - /* - * Check for the special hex prefix. - */ - if (*s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X')) { - base = 16; - dmap = hdigits; - s += 2; - } - - for (v = 0; isdigok(dmap, *s); s++) - v = (v * base) + a2i[(int) *s]; - - if (end != 0) - *end = s; - - return v; -} - -/******************************************************************** - * - * Routines to load, unload, and use mapping tables to remap BDF fonts - * generated using ttf2bdf. - * - ********************************************************************/ - -/* - * Strings used to store the registry and encoding values specified - * in the mapping table. - */ -static char *registry; -static char *encoding; - -/* - * Trie node structure. - */ -typedef struct { - unsigned short key; /* Key value. */ - unsigned short val; /* Data for the key. */ - unsigned long sibs; /* Offset of siblings from trie beginning. */ - unsigned long kids; /* Offset of children from trie beginning. */ -} node_t; - -/* - * The trie used for remapping codes. - */ -static node_t *nodes; -static unsigned long nodes_size = 0; -static unsigned long nodes_used = 0; - -/* - * Gets the next available node in the trie. - */ -static unsigned long -#ifdef __STDC__ -getnode(unsigned short key) -#else -getnode(key) -unsigned short key; -#endif -{ - unsigned long loc; - node_t *np; - - if (nodes_used == nodes_size) { - if (nodes_size == 0) - nodes = (node_t *) malloc(sizeof(node_t) << 7); - else - nodes = (node_t *) realloc((char *) nodes, sizeof(node_t) * - (nodes_size + 128)); - np = nodes + nodes_size; - nodes_size += 128; - (void) memset((char *) np, 0, sizeof(node_t) << 7); - } - - loc = nodes_used++; - np = nodes + loc; - np->kids = np->sibs = 0; - np->key = key; - return loc; -} - -/* - * Inserts a node in the trie. - */ -static void -#ifdef __STDC__ -trie_insert(unsigned short key, unsigned short val) -#else -trie_insert(key, val) -unsigned short key, val; -#endif -{ - unsigned long i, n, t, l; - unsigned short codes[2]; - - /* - * Convert the incoming key into two codes to make the trie lookup more - * efficient. - */ - codes[0] = (key >> 8) & 0xff; - codes[1] = key & 0xff; - - for (i = t = 0; i < 2; i++) { - if (nodes[t].kids == 0) { - n = getnode(codes[i]); - nodes[t].kids = t = n; - } else if (nodes[nodes[t].kids].key == codes[i]) - t = nodes[t].kids; - else if (nodes[nodes[t].kids].key > codes[i]) { - n = getnode(codes[i]); - nodes[n].sibs = nodes[t].kids; - nodes[t].kids = t = n; - } else { - t = nodes[t].kids; - for (l = t; nodes[t].sibs && nodes[t].key < codes[i]; ) { - l = t; - t = nodes[t].sibs; - } - if (nodes[t].key < codes[i]) { - n = getnode(codes[i]); - nodes[t].sibs = t = n; - } else if (nodes[t].key > codes[i]) { - n = getnode(codes[i]); - nodes[n].sibs = t; - nodes[l].sibs = t = n; - } - } - } - - /* - * Set the value in the leaf node. - */ - nodes[t].val = val; -} - -/* - * List used by the routine that parses the map lines. - */ -static list_t list; - -/* - * Routine to parse each line of the mapping file. - */ -static int -#ifdef __STDC__ -add_mapping(unsigned char *line, unsigned long linelen, unsigned long lineno, - void *client_data) -#else -add_mapping(line, linelen, lineno, client_data) -unsigned char *line; -unsigned long linelen, lineno; -void *client_data; -#endif -{ - unsigned short key, val; - - /* - * Split the line into parts separted by one or more spaces or tabs. - */ - splitline((unsigned char *) " \t+", line, linelen, &list); - - /* - * Check to see if the line starts with one of the keywords. - */ - if (memcmp((char *) list.field[0], "REGISTRY", 8) == 0) { - /* - * Collect the XLFD CHARSET_REGISTRY value. - */ - if (registry != 0) - free((char *) registry); - if ((val = strlen((char *) list.field[1])) == 0) - registry = 0; - else { - registry = (char *) malloc(val + 1); - (void) memcpy(registry, (char *) list.field[1], val + 1); - } - return 0; - } - - if (memcmp((char *) list.field[0], "ENCODING", 8) == 0) { - /* - * Collect the XLFD CHARSET_ENCODING value. - */ - if (encoding != 0) - free((char *) encoding); - if ((val = strlen((char *) list.field[1])) == 0) - encoding = 0; - else { - encoding = (char *) malloc(val + 1); - (void) memcpy(encoding, (char *) list.field[1], val + 1); - } - return 0; - } - - /* - * Get the second field value as the key (the Unicode value). Always - * assume the values are in hex. - */ - key = my_atous(list.field[1], 0, 16); - val = my_atous(list.field[0], 0, 16); - - trie_insert(key, val); - - return 0; -} - -/******************************************************************** - * - * API for mapping table support. - * - ********************************************************************/ - -int -#ifdef __STDC__ -ttf2bdf_load_map(FILE *in) -#else -ttf2bdf_load_map(in) -FILE *in; -#endif -{ - unsigned long lineno; - - /* - * Allocate some nodes initially. - */ - if (nodes_size == 0) { - nodes = (node_t *) malloc(sizeof(node_t) << 7); - nodes_size = 128; - } - - /* - * Reset the trie in case more than one gets loaded for some reason. - */ - if (nodes_size > 0) - (void) memset((char *) nodes, 0, sizeof(node_t) * nodes_size); - nodes_used = 1; - - return scanlines(fileno(in), add_mapping, 0, &lineno); -} - -/* - * Routine that deallocates the mapping trie. - */ -void -#ifdef __STDC__ -ttf2bdf_free_map(void) -#else -ttf2bdf_free_map() -#endif -{ - if (registry != 0) - free((char *) registry); - if (encoding != 0) - free((char *) encoding); - registry = encoding = 0; - - if (list.size > 0) - free((char *) list.field); - list.size = list.used = 0; - - if (nodes_size > 0) - free((char *) nodes); - nodes_size = nodes_used = 0; -} - -/* - * The routine that actually remaps the code by looking it up in the trie. - */ -int -#ifdef __STDC__ -ttf2bdf_remap(unsigned short *code) -#else -ttf2bdf_remap(code) -unsigned short *code; -#endif -{ - unsigned long i, n, t; - unsigned short c, codes[2]; - - /* - * If no mapping table was loaded, then simply return the code. - */ - if (nodes_used == 0) - return 1; - - c = *code; - codes[0] = (c >> 8) & 0xff; - codes[1] = c & 0xff; - - for (i = n = 0; i < 2; i++) { - t = nodes[n].kids; - if (t == 0) - return 0; - for (; nodes[t].sibs && nodes[t].key != codes[i]; t = nodes[t].sibs); - if (nodes[t].key != codes[i]) - return 0; - n = t; - } - - *code = nodes[n].val; - return 1; -} - -void -#ifdef __STDC__ -ttf2bdf_remap_charset(char **registry_name, char **encoding_name) -#else -ttf2bdf_remap_charset(registry_name, encoding_name) -char **registry_name, **encoding_name; -#endif -{ - if (registry_name != 0) - *registry_name = registry; - if (encoding_name != 0) - *encoding_name = encoding; -} Index: xc/extras/FreeType/contrib/ttf2bdf/remap.h diff -u xc/extras/FreeType/contrib/ttf2bdf/remap.h:1.3 xc/extras/FreeType/contrib/ttf2bdf/remap.h:removed --- xc/extras/FreeType/contrib/ttf2bdf/remap.h:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/remap.h Wed Mar 16 20:59:28 2005 @@ -1,65 +0,0 @@ -/* - * Copyright 1996, 1997, 1998, 1999 Computing Research Labs, - * New Mexico State University - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _h_remap -#define _h_remap - -/* - * Id: remap.h,v 1.4 1999/05/03 17:07:04 mleisher Exp $ - * $XFree86: xc/extras/FreeType/contrib/ttf2bdf/remap.h,v 1.3 2003/10/21 18:10:07 tsi Exp $ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -extern int ttf2bdf_load_map( -#ifdef __STDC__ - FILE *in -#endif -); - -extern void ttf2bdf_free_map( -#ifdef __STDC__ - void -#endif -); - -extern int ttf2bdf_remap( -#ifdef __STDC__ - unsigned short *code -#endif -); - -extern void ttf2bdf_remap_charset( -#ifdef __STDC__ - char **registry_name, - char **encoding_name -#endif -); - -#ifdef __cplusplus -} -#endif - -#endif /* _h_remap */ Index: xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c diff -u xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c:1.3 xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c:removed --- xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c Wed Mar 16 20:59:28 2005 @@ -1,1583 +0,0 @@ -/* - * Copyright 1996, 1997, 1998, 1999 Computing Research Labs, - * New Mexico State University - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.c,v 1.3 2003/10/21 18:10:07 tsi Exp $ */ - -#ifndef lint -#ifdef __GNUC__ -static char rcsid[] __attribute__ ((unused)) = "Id: ttf2bdf.c,v 1.25 1999/10/21 16:31:54 mleisher Exp $"; -#else -static char rcsid[] = "Id: ttf2bdf.c,v 1.25 1999/10/21 16:31:54 mleisher Exp $"; -#endif -#endif - -#include - -#ifdef WIN32 -#include -#else -#include -#include -#endif - -#include - -#include "freetype.h" - -/* - * Include the remapping support. - */ -#include "remap.h" - -/************************************************************************** - * - * Macros. - * - **************************************************************************/ - -/* - * The version of ttf2bdf. - */ -#define TTF2BDF_VERSION "2.8" - -/* - * Set the default values used to generate a BDF font. - */ -#ifndef DEFAULT_PLATFORM_ID -#define DEFAULT_PLATFORM_ID 3 -#endif - -#ifndef DEFAULT_ENCODING_ID -#define DEFAULT_ENCODING_ID 1 -#endif - -#ifndef DEFAULT_POINT_SIZE -#define DEFAULT_POINT_SIZE 12 -#endif - -#ifndef DEFAULT_RESOLUTION -#define DEFAULT_RESOLUTION 100 -#endif - -/* - * Used as a fallback for XLFD names where the character set/encoding can not - * be determined. - */ -#ifndef DEFAULT_XLFD_CSET -#define DEFAULT_XLFD_CSET "-FontSpecific-0" -#endif - -/* - * nameID macros for getting strings from the TT font. - */ -#define TTF_COPYRIGHT 0 -#define TTF_TYPEFACE 1 -#define TTF_PSNAME 6 - -#ifndef MAX -#define MAX(h,i) ((h) > (i) ? (h) : (i)) -#endif - -#ifndef MIN -#define MIN(l,o) ((l) < (o) ? (l) : (o)) -#endif - -/************************************************************************** - * - * General globals set from command line. - * - **************************************************************************/ - -/* - * The program name. - */ -static char *prog; - -/* - * The flag indicating whether messages should be printed or not. - */ -static int verbose = 0; - -/* - * Flags used when loading glyphs. - */ -static int load_flags = TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH; - -/* - * The default platform and encoding ID's. - */ -static int pid = DEFAULT_PLATFORM_ID; -static int eid = DEFAULT_ENCODING_ID; - -/* - * Default point size and resolutions. - */ -static int point_size = DEFAULT_POINT_SIZE; -static int hres = DEFAULT_RESOLUTION; -static int vres = DEFAULT_RESOLUTION; - -/* - * The user supplied foundry name to use in the XLFD name. - */ -static char *foundry_name = 0; - -/* - * The user supplied typeface name to use in the XLFD name. - */ -static char *face_name = 0; - -/* - * The user supplied weight name to use in the XLFD name. - */ -static char *weight_name = 0; - -/* - * The user supplied slant name to use in the XLFD name. - */ -static char *slant_name = 0; - -/* - * The user supplied width name to use in the XLFD name. - */ -static char *width_name = 0; - -/* - * The user supplied additional style name to use in the XLFD name. - */ -static char *style_name = 0; - -/* - * The user supplied spacing (p = proportional, c = character cell, - * m = monospace). - */ -static int spacing = 0; - -/* - * The dash character to use in the names retrieved from the font. Default is - * the space. - */ -static int dashchar = ' '; - -/* - * Flag, bitmask, and max code for generating a subset of the glyphs in a font. - */ -static int do_subset = 0; -static unsigned short maxcode; -static unsigned long subset[2048]; - -/* - * The flag that indicates the remapping table should be used to - * reencode the font. - */ -static int do_remap = 0; - -/************************************************************************** - * - * Internal globals. - * - **************************************************************************/ - -/* - * Structure used for calculating the font bounding box as the glyphs are - * generated. - */ -typedef struct { - short minlb; - short maxlb; - short maxrb; - short maxas; - short maxds; - short rbearing; -} bbx_t; - -static bbx_t bbx; - -/* - * The buffer used to transfer the temporary file to the actual output file. - */ -#define TTF2BDF_IOBUFSIZ 8192 -static char iobuf[TTF2BDF_IOBUFSIZ]; - -/* - * The Units Per Em value used in numerous places. - */ -static TT_UShort upm; - -/* - * A flag indicating if a CMap was found or not. - */ -static TT_UShort nocmap; - -/* - * The scaling factor needed to compute the SWIDTH (scalable width) value - * for BDF glyphs. - */ -static double swscale; - -/* - * Mac encoding names used when creating the BDF XLFD font name. - */ -static char *mac_encodings[] = { - "-MacRoman-0", "-MacJapanese-0", "-MacChinese-0", "-MacKorean-0", - "-MacArabic-0", "-MacHebrew-0", "-MacGreek-0", "-MacRussian-0", - "-MacRSymbol-0", "-MacDevanagari-0", "-MacGurmukhi-0", "-MacGujarati-0", - "-MacOriya-0", "-MacBengali-0", "-MacTamil-0", "-MacTelugu-0", - "-MacKannada-0", "-MacMalayalam-0", "-MacSinhalese-0", "-MacBurmese-0", - "-MacKhmer-0", "-MacThai-0", "-MacLaotian-0", "-MacGeorgian-0", - "-MacArmenian-0", "-MacMaldivian-0", "-MacTibetan-0", "-MacMongolian-0", - "-MacGeez-0", "-MacSlavic-0", "-MacVietnamese-0","-MacSindhi-0", - "-MacUninterp-0" -}; -static int num_mac_encodings = sizeof(mac_encodings) / - sizeof(mac_encodings[0]); - -/* - * ISO encoding names used when creating the BDF XLFD font name. - */ -static char *iso_encodings[] = { - "-ASCII-0", "-ISO10646-0", "-ISO8859-1" -}; -static int num_iso_encodings = sizeof(iso_encodings) / - sizeof(iso_encodings[0]); - -/* - * Microsoft encoding names used when creating the BDF XLFD font name. - */ -static char *ms_encodings[] = { - "-Symbol-0", "-ISO10646-1", "-ShiftJIS-0", "-GB2312.1980-0", "-Big5-0", - "-KSC5601.1987-0", "-KSC5601.1992-0" -}; -static int num_ms_encodings = sizeof(ms_encodings) / - sizeof(ms_encodings[0]); - -/* - * The propery names for all the XLFD properties. - */ -static char *xlfd_props[] = { - "FOUNDRY", - "FAMILY_NAME", - "WEIGHT_NAME", - "SLANT", - "SETWIDTH_NAME", - "ADD_STYLE_NAME", - "PIXEL_SIZE", - "POINT_SIZE", - "RESOLUTION_X", - "RESOLUTION_Y", - "SPACING", - "AVERAGE_WIDTH", - "CHARSET_REGISTRY", - "CHARSET_ENCODING", -}; - -/************************************************************************** - * - * Freetype globals. - * - **************************************************************************/ - -static TT_Engine engine; -static TT_Face face; -static TT_Face_Properties properties; - -static TT_Instance instance; - -static TT_Glyph glyph; -static TT_Glyph_Metrics metrics; -static TT_Instance_Metrics imetrics; - -static TT_Raster_Map raster; - -static TT_CharMap cmap; - -/************************************************************************** - * - * Freetype related code. - * - **************************************************************************/ - -/* - * A generic routine to get a name from the TT name table. This routine - * always looks for English language names and checks three possibilities: - * 1. English names with the MS Unicode encoding ID. - * 2. English names with the MS unknown encoding ID. - * 3. English names with the Apple Unicode encoding ID. - * - * The particular name ID mut be provided (e.g. nameID = 0 for copyright - * string, nameID = 6 for Postscript name, nameID = 1 for typeface name. - * - * If the `dash' flag is non-zero, all dashes (-) in the name will be replaced - * with the character passed. - * - * Returns the number of bytes added. - */ -static int -#ifdef __STDC__ -ttf_get_english_name(char *name, int nameID, int dash) -#else -ttf_get_english_name(name, nameID, dash) -char *name; -int nameID, dash; -#endif -{ - TT_UShort slen; - int i, j, encid, nrec; - unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID; - char *s; - - nrec = TT_Get_Name_Count(face); - - for (encid = 1, j = 0; j < 2; j++, encid--) { - /* - * Locate one of the MS English font names. - */ - for (i = 0; i < nrec; i++) { - TT_Get_Name_ID(face, i, &nrPlatformID, &nrEncodingID, - &nrLanguageID, &nrNameID); - if (nrPlatformID == 3 && - nrEncodingID == encid && - nrNameID == nameID && - (nrLanguageID == 0x0409 || nrLanguageID == 0x0809 || - nrLanguageID == 0x0c09 || nrLanguageID == 0x1009 || - nrLanguageID == 0x1409 || nrLanguageID == 0x1809)) { - TT_Get_Name_String(face, i, &s, &slen); - break; - } - } - - if (i < nrec) { - /* - * Found one of the MS English font names. The name is by - * definition encoded in Unicode, so copy every second byte into - * the `name' parameter, assuming there is enough space. - */ - for (i = 1; s != 0 && i < slen; i += 2) { - if (dash) - *name++ = (s[i] == '-' || s[i] == ' ') ? dash : s[i]; - else if (s[i] == '\r' || s[i] == '\n') { - if (s[i] == '\r' && i + 2 < slen && s[i + 2] == '\n') - i += 2; - *name++ = ' '; - *name++ = ' '; - } else - *name++ = s[i]; - } - *name = 0; - return (slen >> 1); - } - } - - /* - * No MS English name found, attempt to find an Apple Unicode English - * name. - */ - for (i = 0; i < nrec; i++) { - TT_Get_Name_ID(face, i, &nrPlatformID, &nrEncodingID, - &nrLanguageID, &nrNameID); - if (nrPlatformID == 0 && nrLanguageID == 0 && - nrNameID == nameID) { - TT_Get_Name_String(face, i, &s, &slen); - break; - } - } - - if (i < nrec) { - /* - * Found the Apple Unicode English name. The name is by definition - * encoded in Unicode, so copy every second byte into the `name' - * parameter, assuming there is enough space. - */ - for (i = 1; s != 0 && i < slen; i += 2) { - if (dash) - *name++ = (s[i] == '-' || s[i] == ' ') ? dash : s[i]; - else if (s[i] == '\r' || s[i] == '\n') { - if (s[i] == '\r' && i + 2 < slen && s[i + 2] == '\n') - i += 2; - *name++ = ' '; - *name++ = ' '; - } else - *name++ = s[i]; - } - *name = 0; - return (slen >> 1); - } - - return 0; -} - -/************************************************************************** - * - * General code. - * - **************************************************************************/ - -/* - * Create an XLFD name. Assumes there is enough space in the string passed - * to fit a reasonably long XLFD name into, up to the 256 byte maximum. - */ -static void -#ifdef __STDC__ -make_xlfd_name(char *name, TT_Long awidth, int ismono) -#else -make_xlfd_name(name, awidth, ismono) -char *name; -TT_Long awidth; -int ismono; -#endif -{ - TT_Long i; - TT_ULong val; - char *r, *e; - double dr, dp; - - /* - * Default the foundry name to "FreeType" in honor of the project and - * because the foundry name is too difficult to automatically determine - * from the names in TT fonts. But the user can provide his own. - */ - if (foundry_name == 0) { - (void) strcpy(name, "-FreeType"); - name += 9; - } else { - *(name++)='-'; - strcpy(name,foundry_name); - name+=strlen(foundry_name); - } - - /* - * Add the typeface name from the font. The fallback default will be - * "Unknown". - */ - *name++ = '-'; - if (face_name == 0) { - if((i = ttf_get_english_name(name, TTF_TYPEFACE, dashchar))) - name += i; - else { - (void) strcpy(name, "Unknown"); - name += 7; - } - } else { - (void) strcpy(name, face_name); - name += strlen(face_name); - } - - /* - * Add the weight name. The default will be "Medium". - */ - if (weight_name != 0) { - sprintf(name, "-%s", weight_name); - name += strlen(weight_name) + 1; - } else { - if (properties.os2->fsSelection & 0x20) { - (void) strcpy(name, "-Bold"); - name += 5; - } else { - (void) strcpy(name, "-Medium"); - name += 7; - } - } - - /* - * Add the slant name. The default will be 'R'. - */ - if (slant_name) { - sprintf(name, "-%s", slant_name); - name += strlen(slant_name) + 1; - } else { - *name++ = '-'; - if (properties.os2->fsSelection & 0x01) - *name++ = 'I'; - else - *name++ = 'R'; - } - - /* - * Default the setwidth name to "Normal" but user can specify one. - */ - if (width_name == 0) { - (void) strcpy(name, "-Normal"); - name += 7; - } else { - *(name++)='-'; - strcpy(name,width_name); - name+=strlen(width_name); - } - - /* - * Default the additional style name to NULL but user can specify one. - */ - *name++ = '-'; - if (style_name != 0) { - strcpy(name,style_name); - name+=strlen(style_name); - } - - /* - * Determine the pixel size from the point size and resolution. - */ - dr = (double) vres; - dp = (double) (point_size * 10); - val = (unsigned long) (((dp * dr) / 722.7) + 0.5); - - /* - * Set the pixel size, point size, and resolution. - */ - sprintf(name, "-%ld-%d-%d-%d", val, point_size * 10, hres, vres); - name += strlen(name); - - switch (spacing) { - case 'p': case 'P': spacing = 'P'; break; - case 'm': case 'M': spacing = 'M'; break; - case 'c': case 'C': spacing = 'C'; break; - default: spacing = 0; break; - } - - /* - * Set the spacing. - */ - if (!spacing) - spacing = (ismono) ? 'M' : 'P'; - *name++ = '-'; - *name++ = spacing; - - /* - * Add the average width. - */ - sprintf(name, "-%ld", awidth); - name += strlen(name); - - /* - * Check to see if the remapping table specified a registry and encoding - * and use those if they both exist. - */ - ttf2bdf_remap_charset(&r, &e); - if (r != 0 && e != 0) { - sprintf(name, "-%s-%s", r, e); - return; - } - - /* - * If the cmap for the platform and encoding id was not found, or the - * platform id is unknown, assume the character set registry and encoding - * are the XLFD default. - */ - if (nocmap || pid > 3) - (void) strcpy(name, DEFAULT_XLFD_CSET); - else { - /* - * Finally, determine the character set registry and encoding from the - * platform and encoding ID. - */ - switch (pid) { - case 0: - /* - * Apple Unicode platform, so "Unicode-2.0" is the default. - */ - (void) strcpy(name, "-Unicode-2.0"); - break; - case 1: - /* - * Macintosh platform, so choose from the Macintosh encoding - * strings. - */ - if (eid < 0 || eid >= num_mac_encodings) - (void) strcpy(name, DEFAULT_XLFD_CSET); - else - (void) strcpy(name, mac_encodings[eid]); - break; - case 2: - /* - * ISO platform, so choose from the ISO encoding strings. - */ - if (eid < 0 || eid >= num_iso_encodings) - (void) strcpy(name, DEFAULT_XLFD_CSET); - else - (void) strcpy(name, iso_encodings[eid]); - break; - case 3: - /* - * Microsoft platform, so choose from the MS encoding strings. - */ - if (eid < 0 || eid >= num_ms_encodings) - (void) strcpy(name, DEFAULT_XLFD_CSET); - else - (void) strcpy(name, ms_encodings[eid]); - break; - } - } -} - -static int -#ifdef __STDC__ -generate_font(FILE *out, char *iname, char *oname) -#else -generate_font(out, iname, oname) -FILE *out; -char *iname, *oname; -#endif -{ - int eof, ismono, i; - FILE *tmp; - TT_Short maxx, maxy, minx, miny, xoff, yoff, dwidth, swidth; - TT_Short y_off, x_off; - TT_UShort sx, sy, ex, ey, wd, ht; - TT_Long code, idx, ng, aw; - TT_UShort remapped_code; - unsigned char *bmap; - double dw; - char *xp, xlfd[256]; - char *tmpdir, tmpfile[BUFSIZ]; - - /* - * Open a temporary file to store the bitmaps in until the exact number - * of bitmaps are known. - */ - if ((tmpdir = getenv("TMPDIR")) == 0) - tmpdir = "/tmp"; - sprintf(tmpfile, "%s/ttf2bdf%ld", tmpdir, (long) getpid()); - if ((tmp = fopen(tmpfile, "w")) == 0) { - fprintf(stderr, "%s: unable to open temporary file '%s'.\n", - prog, tmpfile); - return -1; - } - - /* - * Calculate the scale factor for the SWIDTH field. - */ - swscale = ((double) vres) * ((double) point_size); - - /* - * Calculate the font bounding box again so enough storage for the largest - * bitmap can be allocated. - */ - minx = (properties.header->xMin * imetrics.x_ppem) / upm; - miny = (properties.header->yMin * imetrics.y_ppem) / upm; - maxx = (properties.header->xMax * imetrics.x_ppem) / upm; - maxy = (properties.header->yMax * imetrics.y_ppem) / upm; - - maxx -= minx; ++maxx; - maxy -= miny; ++maxy; - - /* - * Initialize the flag that tracks if the font is monowidth or not and - * initialize the glyph width variable that is used for testing for a - * monowidth font. - */ - wd = 0xffff; - ismono = 1; - - /* - * Use the upward flow because the version of FreeType being used when - * this was written did not support TT_Flow_Down. This insures that this - * routine will not mess up if TT_Flow_Down is implemented at some point. - */ - raster.flow = TT_Flow_Up; - raster.width = maxx; - raster.rows = maxy; - raster.cols = (maxx + 7) >> 3; - raster.size = raster.cols * raster.rows; - raster.bitmap = (void *) malloc(raster.size); - - for (ng = code = 0, eof = 0, aw = 0; eof != EOF && code < 0xffff; code++) { - - /* - * If a remap is indicated, attempt to remap the code. If a remapped - * code is not found, then skip generating the glyph. - */ - remapped_code = (TT_UShort) code; - if (do_remap && !ttf2bdf_remap(&remapped_code)) - continue; - - /* - * If a subset is being generated and the code is greater than the max - * code of the subset, break out of the loop to avoid doing any more - * work. - */ - if (do_subset && remapped_code > maxcode) - break; - - /* - * If a subset is being generated and the index is not in the subset - * bitmap, just continue. - */ - if (do_subset && - !(subset[remapped_code >> 5] & (1 << (remapped_code & 31)))) - continue; - - if (nocmap) { - if (code >= properties.num_Glyphs) - - /* - * At this point, all the glyphs are done. - */ - break; - idx = code; - } else - idx = TT_Char_Index(cmap, code); - - /* - * If the glyph could not be loaded for some reason, or a subset is - * being generated and the index is not in the subset bitmap, just - * continue. - */ - - if (idx <= 0 || TT_Load_Glyph(instance, glyph, idx, load_flags)) - continue; - - (void) TT_Get_Glyph_Metrics(glyph, &metrics); - - /* - * Clear the raster bitmap. - */ - (void) memset((char *) raster.bitmap, 0, raster.size); - - /* - * Grid fit to determine the x and y offsets that will force the - * bitmap to fit into the storage provided. - */ - xoff = (63 - metrics.bbox.xMin) & -64; - yoff = (63 - metrics.bbox.yMin) & -64; - - /* - * If the bitmap cannot be generated, simply continue. - */ - if (TT_Get_Glyph_Bitmap(glyph, &raster, xoff, yoff)) - continue; - - /* - * Determine the DWIDTH (device width, or advance width in TT terms) - * and the SWIDTH (scalable width) values. - */ - dwidth = metrics.advance >> 6; - dw = (double) dwidth; - swidth = (TT_Short) ((dw * 72000.0) / swscale); - - /* - * Determine the actual bounding box of the glyph bitmap. Do not - * forget that the glyph is rendered upside down! - */ - sx = ey = 0xffff; - sy = ex = 0; - bmap = (unsigned char *) raster.bitmap; - for (miny = 0; miny < raster.rows; miny++) { - for (minx = 0; minx < raster.width; minx++) { - if (bmap[(miny * raster.cols) + (minx >> 3)] & - (0x80 >> (minx & 7))) { - if (minx < sx) - sx = minx; - if (minx > ex) - ex = minx; - if (miny > sy) - sy = miny; - if (miny < ey) - ey = miny; - } - } - } - - /* - * If the glyph is actually an empty bitmap, set the size to 0 all - * around. - */ - if (sx == 0xffff && ey == 0xffff && sy == 0 && ex == 0) - sx = ex = sy = ey = 0; - - /* - * Increment the number of glyphs generated. - */ - ng++; - - /* - * Test to see if the font is going to be monowidth or not by - * comparing the current glyph width against the last one. - */ - if (ismono && (ex - sx) + 1 != wd) - ismono = 0; - - /* - * Adjust the font bounding box. - */ - wd = (ex - sx) + 1; - ht = (sy - ey) + 1; - x_off = sx - (xoff >> 6); - y_off = ey - (yoff >> 6); - - bbx.maxas = MAX(bbx.maxas, ht + y_off); - bbx.maxds = MAX(bbx.maxds, -y_off); - bbx.rbearing = wd + x_off; - bbx.maxrb = MAX(bbx.maxrb, bbx.rbearing); - bbx.minlb = MIN(bbx.minlb, x_off); - bbx.maxlb = MAX(bbx.maxlb, x_off); - - /* - * Add to the average width accumulator. - */ - aw += wd; - - /* - * Print the bitmap header. - */ - fprintf(tmp, "STARTCHAR %04lX\nENCODING %ld\n", code, - (long) remapped_code); - fprintf(tmp, "SWIDTH %hd 0\n", swidth); - fprintf(tmp, "DWIDTH %hd 0\n", dwidth); - fprintf(tmp, "BBX %hd %hd %hd %hd\n", wd, ht, x_off, y_off); - - /* - * Check for an error return here in case the temporary file system - * fills up or the file is deleted while it is being used. - */ - eof = fprintf(tmp, "BITMAP\n"); - - /* - * Now collect the bits so they can be printed. - */ - for (miny = sy; eof != EOF && miny >= ey; miny--) { - for (idx = 0, minx = sx; eof != EOF && minx <= ex; minx++) { - if (minx > sx && ((minx - sx) & 7) == 0) { - /* - * Print the next byte. - */ - eof = fprintf(tmp, "%02lX", idx & 0xff); - idx = 0; - } - if (bmap[(miny * raster.cols) + (minx >> 3)] & - (0x80 >> (minx & 7))) - idx |= 0x80 >> ((minx - sx) & 7); - } - if (eof != EOF) - /* - * Because of the structure of the loop, the last byte should - * always be printed. - */ - fprintf(tmp, "%02lX\n", idx & 0xff); - } - if (eof != EOF) - fprintf(tmp, "ENDCHAR\n"); - } - - fclose(tmp); - - /* - * If a write error occured, delete the temporary file and issue an error - * message. - */ - if (eof == EOF) { - (void) unlink(tmpfile); - fprintf(stderr, "%s: problem writing to temporary file '%s'.\n", - prog, tmpfile); - if (raster.size > 0) - free((char *) raster.bitmap); - return -1; - } - - /* - * If no characters were generated, just unlink the temp file and issue a - * warning. - */ - if (ng == 0) { - (void) unlink(tmpfile); - fprintf(stderr, "%s: no glyphs generated from '%s'.\n", prog, iname); - if (raster.size > 0) - free((char *) raster.bitmap); - return -1; - } - - /* - * Reopen the temporary file so it can be copied to the actual output - * file. - */ - if ((tmp = fopen(tmpfile, "r")) == 0) { - /* - * Unable to open the file for read, so attempt to delete it and issue - * an error message. - */ - (void) unlink(tmpfile); - fprintf(stderr, "%s: unable to open temporary file '%s' for read.\n", - prog, tmpfile); - if (raster.size > 0) - free((char *) raster.bitmap); - return -1; - } - - /* - * Free up the raster storage. - */ - if (raster.size > 0) - free((char *) raster.bitmap); - - /* - * Calculate the average width. - */ - aw = (TT_Long) ((((double) aw / (double) ng) + 0.5) * 10.0); - - /* - * Generate the XLFD font name. - */ - make_xlfd_name(xlfd, aw, ismono); - - /* - * Start writing the font out. - */ - fprintf(out, "STARTFONT 2.1\n"); - - /* - * Add the vanity comments. - */ - fprintf(out, "COMMENT\n"); - fprintf(out, "COMMENT Converted from TrueType font \"%s\" by \"%s %s\".\n", - iname, prog, TTF2BDF_VERSION); - fprintf(out, "COMMENT\n"); - - fprintf(out, "FONT %s\n", xlfd); - fprintf(out, "SIZE %d %d %d\n", point_size, hres, vres); - - /* - * Generate the font bounding box. - */ - fprintf(out, "FONTBOUNDINGBOX %hd %hd %hd %hd\n", - bbx.maxrb - bbx.minlb, bbx.maxas + bbx.maxds, - bbx.minlb, -bbx.maxds); - - /* - * Print the properties. - */ - fprintf(out, "STARTPROPERTIES %hd\n", 19); - - /* - * Print the font properties from the XLFD name. - */ - for (i = 0, xp = xlfd; i < 14; i++) { - /* - * Print the XLFD property name. - */ - fprintf(out, "%s ", xlfd_props[i]); - - /* - * Make sure the ATOM properties are wrapped in double quotes. - */ - if (i < 6 || i == 10 || i > 11) - putc('"', out); - - /* - * Skip the leading '-' in the XLFD name. - */ - xp++; - - /* - * Skip until the next '-' or NULL. - */ - for (; *xp && *xp != '-'; xp++) - putc(*xp, out); - - /* - * Make sure the ATOM properties are wrapped in double quotes. - */ - if (i < 6 || i == 10 || i > 11) - putc('"', out); - - putc('\n', out); - } - - /* - * Make sure to add the FONT_ASCENT and FONT_DESCENT properties - * because X11 can not live without them. - */ - fprintf(out, "FONT_ASCENT %hd\nFONT_DESCENT %hd\n", - (properties.horizontal->Ascender * imetrics.y_ppem) / upm, - -((properties.horizontal->Descender * imetrics.y_ppem) / upm)); - - /* - * Get the copyright string from the font. - */ - (void) ttf_get_english_name(xlfd, TTF_COPYRIGHT, 0); - fprintf(out, "COPYRIGHT \"%s\"\n", xlfd); - - /* - * Last, print the two user-defined properties _TTF_FONTFILE and - * _TTF_PSNAME. _TTF_FONTFILE provides a reference to the original TT - * font file which some systems can take advantage of, and _TTF_PSNAME - * provides the Postscript name of the font if it exists. - */ - (void) ttf_get_english_name(xlfd, TTF_PSNAME, 0); - fprintf(out, "_TTF_FONTFILE \"%s\"\n_TTF_PSNAME \"%s\"\n", iname, xlfd); - - fprintf(out, "ENDPROPERTIES\n"); - - /* - * Print the actual number of glyphs to the output file. - */ - eof = fprintf(out, "CHARS %ld\n", ng); - - /* - * Copy the temporary file to the output file. - */ - while (eof != EOF && (ng = fread(iobuf, 1, TTF2BDF_IOBUFSIZ, tmp))) { - if (fwrite(iobuf, 1, ng, out) == 0) - eof = EOF; - } - - /* - * Close the temporary file and delete it. - */ - fclose(tmp); - (void) unlink(tmpfile); - - /* - * If an error occured when writing to the output file, issue a warning - * and return. - */ - if (eof == EOF) { - fprintf(stderr, "%s: problem writing to output file '%s'.\n", - prog, oname); - if (raster.size > 0) - free((char *) raster.bitmap); - return -1; - } - - /* - * End the font and do memory cleanup on the glyph and raster structures. - */ - eof = fprintf(out, "ENDFONT\n"); - - return eof; -} - -static int -#ifdef __STDC__ -generate_bdf(FILE *out, char *iname, char *oname) -#else -generate_bdf(out, iname, oname) -FILE *out; -char *iname, *oname; -#endif -{ - TT_Long i; - TT_UShort p, e; - - /* - * Get the requested cmap. - */ - for (i = 0; i < TT_Get_CharMap_Count(face); i++) { - if (!TT_Get_CharMap_ID(face, i, &p, &e) && - p == pid && e == eid) - break; - } - if (i == TT_Get_CharMap_Count(face) && pid == 3 && eid == 1) { - /* - * Make a special case when this fails with pid == 3 and eid == 1. - * Change to eid == 0 and try again. This captures the two possible - * cases for MS fonts. Some other method should be used to cycle - * through all the alternatives later. - */ - for (i = 0; i < TT_Get_CharMap_Count(face); i++) { - if (!TT_Get_CharMap_ID(face, i, &p, &e) && - p == pid && e == 0) - break; - } - if (i < TT_Get_CharMap_Count(face)) { - if (!TT_Get_CharMap(face, i, &cmap)) - eid = 0; - else - nocmap = 1; - } - } else { - /* - * A CMap was found for the platform and encoding IDs. - */ - if (i < TT_Get_CharMap_Count(face) && TT_Get_CharMap(face, i, &cmap)) - nocmap = 1; - else - nocmap = 0; - } - - if (nocmap && verbose) { - fprintf(stderr, - "%s: no character map for platform %d encoding %d. ", - prog, pid, eid); - fprintf(stderr, "Generating all glyphs.\n"); - } - - /* - * Now go through and generate the glyph bitmaps themselves. - */ - return generate_font(out, iname, oname); -} - -#define isdig(cc) ((cc) >= '0' && (cc) <= '9') - -/* - * Routine to parse a subset specification supplied on the command line. - * The syntax for this specification is the same as the syntax used for - * the XLFD font names (XLFD documentation, page 9). - * - * Example: - * - * "60 70 80_90" means the glyphs at codes 60, 70, and between 80 and - * 90 inclusive. - */ -static void -#ifdef __STDC__ -parse_subset(char *s) -#else -parse_subset(s) -char *s; -#endif -{ - long l, r; - - /* - * Make sure to clear the flag and bitmap in case more than one subset is - * specified on the command line. - */ - maxcode = 0; - do_subset = 0; - (void) memset((char *) subset, 0, sizeof(unsigned long) * 2048); - - while (*s) { - /* - * Collect the next code value. - */ - for (l = r = 0; *s && isdig(*s); s++) - l = (l * 10) + (*s - '0'); - - /* - * If the next character is an '_', advance and collect the end of the - * specified range. - */ - if (*s == '_') { - s++; - for (; *s && isdig(*s); s++) - r = (r * 10) + (*s - '0'); - } else - r = l; - - /* - * Add the range just collected to the subset bitmap and set the flag - * that indicates a subset is wanted. - */ - for (; l <= r; l++) { - do_subset = 1; - subset[l >> 5] |= (1 << (l & 31)); - if (l > maxcode) - maxcode = l; - } - - /* - * Skip all non-digit characters. - */ - while (*s && !isdig(*s)) - s++; - } -} - -static void -#ifdef __STDC__ -usage(int eval) -#else -usage(eval) -int eval; -#endif -{ - fprintf(stderr, "Usage: %s [options below] font.ttf\n", prog); - fprintf(stderr, "-h\t\tThis message.\n"); - fprintf(stderr, "-v\t\tPrint warning messages during conversion.\n"); - fprintf(stderr, - "-l \"subset\"\tSpecify a subset of glyphs to generate.\n"); - fprintf(stderr, "-m mapfile\tGlyph reencoding file.\n"); - fprintf(stderr, "-n\t\tTurn off glyph hinting.\n"); - fprintf(stderr, - "-c c\t\tSet the character spacing (default: from font).\n"); - fprintf(stderr, - "-f name\t\tSet the foundry name (default: freetype).\n"); - fprintf(stderr, - "-t name\t\tSet the typeface name (default: from font).\n"); - fprintf(stderr, "-w name\t\tSet the weight name (default: Medium).\n"); - fprintf(stderr, "-s name\t\tSet the slant name (default: R).\n"); - fprintf(stderr, "-k name\t\tSet the width name (default: Normal).\n"); - fprintf(stderr, - "-d name\t\tSet the additional style name (default: empty).\n"); - fprintf(stderr, "-u char\t\tSet the character to replace '-' in names "); - fprintf(stderr, "(default: space).\n"); - fprintf(stderr, - "-pid id\t\tSet the platform ID for encoding (default: %d).\n", - DEFAULT_PLATFORM_ID); - fprintf(stderr, - "-eid id\t\tSet the encoding ID for encoding (default: %d).\n", - DEFAULT_ENCODING_ID); - fprintf(stderr, "-p n\t\tSet the point size (default: %dpt).\n", - DEFAULT_POINT_SIZE); - fprintf(stderr, "-r n\t\tSet the horizontal and vertical resolution "); - fprintf(stderr, "(default: %ddpi).\n", DEFAULT_RESOLUTION); - fprintf(stderr, "-rh n\t\tSet the horizontal resolution "); - fprintf(stderr, "(default: %ddpi)\n", DEFAULT_RESOLUTION); - fprintf(stderr, "-rv n\t\tSet the vertical resolution "); - fprintf(stderr, "(default: %ddpi)\n", DEFAULT_RESOLUTION); - fprintf(stderr, - "-o outfile\tSet the output filename (default: stdout).\n"); - exit(eval); -} - -int -#ifdef __STDC__ -main(int argc, char *argv[]) -#else -main(argc, argv) -int argc; -char *argv[]; -#endif -{ - int res; - char *infile, *outfile, *iname, *oname; - FILE *out, *mapin; - - if ((prog = strrchr(argv[0], '/'))) - prog++; - else - prog = argv[0]; - - out = stdout; - infile = outfile = 0; - - argc--; - argv++; - - while (argc > 0) { - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'v': case 'V': - verbose = 1; - break; - case 'l': case 'L': - argc--; - argv++; - parse_subset(argv[0]); - break; - case 'n': case 'N': - load_flags &= ~TTLOAD_HINT_GLYPH; - break; - case 'c': case 'C': - argc--; - argv++; - spacing = argv[0][0]; - break; - case 't': case 'T': - argc--; - argv++; - face_name = argv[0]; - break; - case 'w': case 'W': - argc--; - argv++; - weight_name = argv[0]; - break; - case 's': case 'S': - argc--; - argv++; - slant_name = argv[0]; - break; - case 'k': case 'K': - argc--; - argv++; - width_name = argv[0]; - break; - case 'd': case 'D': - argc--; - argv++; - style_name = argv[0]; - break; - case 'f': case 'F': - argc--; - argv++; - foundry_name = argv[0]; - break; - case 'u': case 'U': - argc--; - argv++; - dashchar = argv[0][0]; - break; - case 'p': case 'P': - res = argv[0][2]; - argc--; - argv++; - if (res == 'i' || res == 'I') - /* - * Set the platform ID. - */ - pid = atoi(argv[0]); - else - /* - * Set the point size. - */ - point_size = atoi(argv[0]); - break; - case 'e': case 'E': - /* - * Set the encoding ID. - */ - argc--; - argv++; - eid = atoi(argv[0]); - break; - case 'r': - /* - * Set the horizontal and vertical resolutions. - */ - if (argv[0][2] == 'h') - hres = atoi(argv[1]); - else if (argv[0][2] == 'v') - vres = atoi(argv[1]); - else - hres = vres = atoi(argv[1]); - argc--; - argv++; - break; - case 'm': case 'M': - /* - * Try to load a remap table. - */ - argc--; - argv++; - - /* - * Always reset the `do_remap' variable here in case more than - * one map file appears on the command line. - */ - do_remap = 0; - if ((mapin = fopen(argv[0], "r")) == 0) - fprintf(stderr, "%s: unable to open the remap table '%s'.\n", - prog, argv[0]); - else { - if (ttf2bdf_load_map(mapin) < 0) { - fprintf(stderr, - "%s: problem loading remap table '%s'.\n", - prog, argv[0]); - do_remap = 0; - } else - do_remap = 1; - fclose(mapin); - } - break; - case 'o': case 'O': - /* - * Set the output file name. - */ - argc--; - argv++; - outfile = argv[0]; - break; - default: - usage(1); - } - } else - /* - * Set the input file name. - */ - infile = argv[0]; - - argc--; - argv++; - } - - /* - * Validate the values passed on the command line. - */ - if (infile == 0) { - fprintf(stderr, "%s: no input file provided.\n", prog); - usage(1); - } - /* - * Set the input filename that will be passed to the generator - * routine. - */ - if ((iname = strrchr(infile, '/'))) - iname++; - else - iname = infile; - - /* - * Check the platform and encoding IDs. - */ - if (pid < 0 || pid > 255) { - fprintf(stderr, "%s: invalid platform ID '%d'.\n", prog, pid); - exit(1); - } - if (eid < 0 || eid > 65535) { - fprintf(stderr, "%s: invalid encoding ID '%d'.\n", prog, eid); - exit(1); - } - - /* - * Arbitrarily limit the point size to a minimum of 2pt and maximum of - * 256pt. - */ - if (point_size < 2 || point_size > 256) { - fprintf(stderr, "%s: invalid point size '%dpt'.\n", prog, point_size); - exit(1); - } - - /* - * Arbitrarily limit the resolutions to a minimum of 10dpi and a maximum - * of 1200dpi. - */ - if (hres < 10 || hres > 1200) { - fprintf(stderr, "%s: invalid horizontal resolution '%ddpi'.\n", - prog, hres); - exit(1); - } - if (vres < 10 || vres > 1200) { - fprintf(stderr, "%s: invalid vertical resolution '%ddpi'.\n", - prog, vres); - exit(1); - } - - /* - * Open the output file if specified. - */ - if (outfile != 0) { - /* - * Attempt to open the output file. - */ - if ((out = fopen(outfile, "w")) == 0) { - fprintf(stderr, "%s: unable to open the output file '%s'.\n", - prog, outfile); - exit(1); - } - /* - * Set the output filename to be passed to the generator routine. - */ - if ((oname = strrchr(outfile, '/'))) - oname++; - else - oname = outfile; - } else - /* - * Set the default output file name to . - */ - oname = ""; - - /* - * Intialize Freetype. - */ - if ((res = TT_Init_FreeType(&engine))) { - /* - * Close the output file. - */ - if (out != stdout) { - fclose(out); - (void) unlink(outfile); - } - fprintf(stderr, "%s[%d]: unable to initialize renderer.\n", - prog, res); - exit(1); - } - - /* - * Open the input file. - */ - if ((res = TT_Open_Face(engine, infile, &face))) { - if (out != stdout) { - fclose(out); - (void) unlink(outfile); - } - fprintf(stderr, "%s[%d]: unable to open input file '%s'.\n", - prog, res, infile); - exit(1); - } - - /* - * Create a new instance. - */ - if ((res = TT_New_Instance(face, &instance))) { - (void) TT_Close_Face(face); - if (out != stdout) { - fclose(out); - (void) unlink(outfile); - } - fprintf(stderr, "%s[%d]: unable to create instance.\n", - prog, res); - exit(1); - } - - /* - * Set the instance resolution and point size and the relevant - * metrics. - */ - (void) TT_Set_Instance_Resolutions(instance, hres, vres); - (void) TT_Set_Instance_CharSize(instance, point_size*64); - (void) TT_Get_Instance_Metrics(instance, &imetrics); - - /* - * Get the face properties and set the global units per em value for - * convenience. - */ - (void) TT_Get_Face_Properties(face, &properties); - upm = properties.header->Units_Per_EM; - - /* - * Create a new glyph container. - */ - if ((res = TT_New_Glyph(face, &glyph))) { - (void) TT_Done_Instance(instance); - (void) TT_Close_Face(face); - if (out != stdout) { - fclose(out); - (void) unlink(outfile); - } - fprintf(stderr, "%s[%d]: unable to create glyph.\n", - prog, res); - exit(1); - } - - /* - * Generate the BDF font from the TrueType font. - */ - res = generate_bdf(out, iname, oname); - - /* - * Free up the mapping table if one was loaded. - */ - ttf2bdf_free_map(); - - /* - * Close the input and output files. - */ - (void) TT_Close_Face(face); - if (out != stdout) { - fclose(out); - if (res < 0) - /* - * An error occured when generating the font, so delete the - * output file. - */ - (void) unlink(outfile); - } - - /* - * Shut down the renderer. - */ - (void) TT_Done_FreeType(engine); - - exit(res); - - return 0; -} Index: xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man diff -u xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man:1.3 xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man:removed --- xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man Wed Mar 16 20:59:28 2005 @@ -1,197 +0,0 @@ -.\" -.\" Id: ttf2bdf.man,v 1.14 1999/10/21 16:31:54 mleisher Exp $ -.\" $XFree86: xc/extras/FreeType/contrib/ttf2bdf/ttf2bdf.man,v 1.3 2003/10/21 18:10:07 tsi Exp $ -.\" -.TH TTF2BDF 1 "21 October 1999" "X Version 11" -.SH NAME -ttf2bdf \- TrueType to BDF font converter - -.SH SYNOPSIS -.B ttf2bdf -[\fIoptions\fP] [\fIfont.ttf\fP] - -.SH DESCRIPTION -.I ttf2bdf -will convert a TrueType font to a BDF font using the FreeType renderer. - -.SH OPTIONS -.I ttf2bdf -accepts the following command line arguments: - -.PP -.TP 8 -.I -v -print warning messages when the font is converted. -.PP -.TP 8 -.I -p n -set the desired point size (see default value by running the program with the --h option). -.PP -.TP 8 -.I -r n -set both the horizontal and the vertical resolution (see default value by -running the program with the -h option). The minimum is 10dpi and the maximum -is 1200dpi. -.PP -.TP 8 -.I -rh n -set the horizontal resolution (see default value by running the program with -the -h option). The minimum is 10dpi and the maximum is 1200dpi. -.PP -.TP 8 -.I -rv n -set the vertical resolution (see default value by running the program with -the -h option). The minimum is 10dpi and the maximum is 1200dpi. -.PP -.TP 8 -.I -o outfile -sets the output filename (default output is to stdout). -.PP -.TP 8 -.I -pid id -set the platform id for selecting the character map (see default value by -running the program with the -h option). -.PP -.TP 8 -.I -eid id -set the encoding id for selecting the character map (see default value by -running the program with the -h option). -.PP -.TP 8 -.I -c c -set the character spacing. This should be one of `P' for proportional, -`M' for monospace, or `C' for character cell. By default, the spacing -of a font will be automatically determined to be either `M' or `P' -according to values provided in the font. -.PP -.TP 8 -.I -f name -set the foundry name used in the XLFD name. The default value is -`Freetype'. -.PP -.TP 8 -.I -t name -set the typeface name used in the XLFD name. By default, -.I ttf2bdf -will attempt to get a name from the font first and then it will use the -name supplied with this command line option, and if all else fails, it -will use the name `Unknown'. -.PP -.TP 8 -.I -w name -set the weight name used in the XLFD name. If this value is not -supplied, the default value is assumed to be `Medium'. Some common -values for this are `Thin', `Delicate', `ExtraLight', `Light', `Normal', -`Medium', `SemiCondensed', `Condensed', `SemiBold', `Bold', `Heavy', -`ExtraBold', and `ExtraHeavy'. -.PP -.TP 8 -.I -s name -set the slant name used in the XLFD name. If this value is not -supplied, the default value is assumed to be `R', for Roman. Some common -values for this are `R' for Roman, `I' for Italic, `O' for Oblique, `RI' -for Reverse Italic, and `RO' for Reverse Oblique. -.PP -.TP 8 -.I -k name -set the width name used in the XLFD name. The default is `Normal'. -.PP -.TP 8 -.I -d name -set the additional style name used in the XLFD name. The default is an empty -string. -.PP -.TP 8 -.I -u char -set the character used to replace the dashes/spaces in a font name. The -default is the space character. -.PP -.TP 8 -.I -l subset -define a list of character codes which will be used to select a subset -of glyphs from the font. The syntax of the subset string is the same -as the syntax for selecting subsets in X11 XLFD font names. Example: -.sp -% ttf2bdf -l '60 70 80_90' font.ttf -o font.bdf -.sp -The command above will only generate the glyphs for codes 60, 70, and 80 -through 90 inclusive. Glyphs that are not in the subset are not -generated. -.PP -.TP 8 -.I -m mapfile -specifies a mapping file which will reencode the BDF font when it is -generated. Any glyphs with codes that do not have a mapping will not -be generated. -.sp -The remapping file should begin with two lines, one which starts with -REGISTRY followed by the character set registry and one which starts -with ENCODING followed by the encoding. An example from the -iso8859.2 file: -.sp -REGISTRY ISO8859 -.br -ENCODING 2 -.sp -The remapping data should be two columns of hexadecimal numbers, separated by -spaces or tabs. The first column should have the code which should be used in -the BDF font. The second column should be the hexadecimal code of the glyph -in the "cmap" table ttf2bdf is using. An example mapping file is provided -which will map fonts from Unicode (the default "cmap" table) to ISO8859-2. -.sp -Unicode is not the only option. If you choose another platform and -encoding ID on the command line, then the remapping is assumed to map -from the chosen platform and encoding to some other character set. - -.SH "SEE ALSO" -xmbdfed(1), xfed(1), bdftopcf(1), bdftosnf(1) -.br -\fIGlyph Bitmap Distribution Format (BDF) Specification\fP, Application -Note 5005, Adobe System Inc, 1993 -.br -\fIX Logical Font Description Conventions\fP, X Consortium - -.SH ACKNOWLEDGMENTS - -The FreeType project for providing the renderer! -.br -Robert Wilhelm for pointing out a -crucial problem with the pre-1.0 code. -.br -Lho Li-Da for problem reports. -.br -Adrian Havill for unintentionally pointing out a -missing feature. -.br -Richard Verhoeven for problem reports and patches. -.br -Choi Jun Ho whose implementation provided some -nice new features. -.br -Pavel Kankovsky for providing some -critical metrics fixes and other improvements. -.br -Matti Koskinen for pointing out a problem. -.br -Eugene Bobin for mapping tables and shell scripts. -.br -Oleg N. Yakovlev for pointing out a problem. -.br -Bertrand Petit for additional functionality. -.br -Roman Czyborra for pointing out some problems. -.br -Mike Blazer for some Window's compilation advice. -.br -Solofo Ramangalahy for contributing some mapping -tables. -Antoine Leca for mapping table suggestions. -.SH AUTHOR -Mark Leisher -.br -Computing Research Lab -.br -New Mexico State University -.br -Email: mleisher@crl.nmsu.edu Index: xc/extras/FreeType/contrib/ttf2bdf/contrib/KOI2iso_pcf diff -u xc/extras/FreeType/contrib/ttf2bdf/contrib/KOI2iso_pcf:1.1.1.1 xc/extras/FreeType/contrib/ttf2bdf/contrib/KOI2iso_pcf:removed --- xc/extras/FreeType/contrib/ttf2bdf/contrib/KOI2iso_pcf:1.1.1.1 Sat Jan 23 22:21:52 1999 +++ xc/extras/FreeType/contrib/ttf2bdf/contrib/KOI2iso_pcf Wed Mar 16 20:59:28 2005 @@ -1,28 +0,0 @@ -#!/usr/local/bin/perl -# -# hack a XFLD info - alias all fonts, declared as koi8*, to iso8859-1 -# -# usage: -# cd fontdir; ../ISO2koi < fonts.dir >> fonts.alias -# -# 1996/08/29 - vsv -# -while (<>) { - chop; - ($z, $koi8) = split /[ \t]+/; - $iso = $koi8; - $iso =~ s/-koi8r-1/-iso8859-1/g; - $iso =~ s/-koi8-1/-iso8859-1/g; - $iso =~ s/-koi8-r/-iso8859-1/g; - $iso =~ s/-cronyx-/-adobe-/g; - $iso =~ s/-cronix-/-adobe-/g; - ## $iso =~ s/-cronix-/-hack-/g; - ## $iso =~ s/-cronyx-/-hack-/g; - # Elvis+ fonts... - ## $iso =~ s/-adobe-/-hack-/g; - ## $iso =~ s/-dec-/-hack-/g; - next if ("$iso" !~ /-iso8859-/); - @z = split (/-/, $iso); - # no matter, 10 or 12, must be more then 3-4 ;) - printf ("\"%s\"\t\"%s\"\n", $iso, $koi8) if (@z > 10); -} Index: xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett diff -u xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett:1.1.1.1 xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett:removed --- xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett:1.1.1.1 Sat Feb 12 23:54:54 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett Wed Mar 16 20:59:28 2005 @@ -1,60 +0,0 @@ -#!/bin/csh -# -*- mode:SH; -*- -# -# This script creates series of bdf files from TTF file. -# -# -# Please set up parameters -# -# Font dpi: -set DPI=96 - -# -# TrueType files dir. -set ttf_dir=~/ttf - -# TTF files, please specify only base name -# Script will try to use BolD, Italic and BoldItalic versions of face -set FACES="ARIAL ARIBLK ARIALN TAHOMA TIMES VERDANA" - - -# Output codepage -# koi8.r -# windows.1251 -# iso8859.5 -# iso8859.2 -set LANG_ID=koi8.r - -foreach x ( 7 8 9 10 11 12 14 16 18 20 24 30 50 100 150) -foreach z ( $FACES ) -set y = ${ttf_dir}/${z} -# -# Simple face - if( -e ${y}.TTF ) then - echo ${y} at ${x}pt - ./ttf2bdf -m $LANG_ID -p $x -r $DPI ${y}.TTF | bdftopcf | compress > ${DPI}dpi/${z}${x}.pcf.Z - endif -# -# Bold face - if( -e ${y}BD.TTF ) then - echo Bold ${y} at ${x}pt - ./ttf2bdf -m $LANG_ID -p $x -r $DPI -w bold ${y}BD.TTF | bdftopcf | compress > ${DPI}dpi/${z}bd${x}.pcf.Z - endif -# -# Italic face - if( -e ${y}I.TTF ) then - echo Italic ${y} at ${x}pt - ./ttf2bdf -m $LANG_ID -p $x -r $DPI -s o ${y}I.TTF | bdftopcf | compress >${DPI}dpi/${z}i${x}.pcf.Z - endif -# -# Bold Italic face - if( -e ${y}BI.TTF ) then - echo Bold Italic ${y} at ${x}pt - ./ttf2bdf -m $LANG_ID -p $x -r $DPI -w bold -s o ${y}BI.TTF | bdftopcf | compress > ${DPI}dpi/${z}bi${x}.pcf.Z - endif -end -end - -echo Creating fonts directory... -cd ${DPI}dpi -mkfontdir Index: xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett.m diff -u xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett.m:1.1.1.1 xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett.m:removed --- xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett.m:1.1.1.1 Sat Feb 12 23:54:54 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/contrib/creatett.m Wed Mar 16 20:59:28 2005 @@ -1,59 +0,0 @@ -#!/bin/csh -# -*- mode:SH; -*- -# -# This script creates series of bdf files from TTF file. -# -# -# Please set up parameters -# -# Font dpi: -set DPI=96 - -# -# TrueType files dir. -set ttf_dir=~/ttf - -# TTF files, please specify only base name -# Script will try to use BolD, Italic and BoldItalic versions of face -set FACES="COUR MONOTYPE" - -# Output codepage -# koi8.r -# windows.1251 -# iso8859.5 -# iso8859.2 -set LANG_ID=koi8.r - -foreach x ( 7 8 9 10 11 12 14 16 18 20 24 30 50 100 150) -foreach z ( $FACES ) -set y = ${ttf_dir}/${z} -# -# Simple face - if( -e ${y}.TTF ) then - echo ${z} at ${x}pt - ./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI ${y}.TTF | bdftopcf | compress > ${DPI}dpi/${z}${x}.pcf.Z - endif -# -# Bold face - if( -e ${y}BD.TTF ) then - echo Bold ${z} at ${x}pt - ./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -w bold ${y}BD.TTF | bdftopcf | compress > ${DPI}dpi/${z}bd${x}.pcf.Z - endif -# -# Italic face - if( -e ${y}I.TTF ) then - echo Italic ${z} at ${x}pt - ./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -s o ${y}I.TTF | bdftopcf | compress >${DPI}dpi/${z}i${x}.pcf.Z - endif -# -# Bold Italic face - if( -e ${y}BI.TTF ) then - echo Bold Italic ${z} at ${x}pt - ./ttf2bdf -c m -m $LANG_ID -p $x -r $DPI -w bold -s o ${y}BI.TTF | bdftopcf | compress > ${DPI}dpi/${z}bi${x}.pcf.Z - endif -end -end - -#echo Creating fonts directory... -#cd ${DPI}dpi -#mkfontdir Index: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1 diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1:1.3 xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1 Wed Mar 16 20:59:28 2005 @@ -1,279 +0,0 @@ -# -# Id: iso8859.1,v 1.2 1999/06/16 16:13:11 mleisher Exp $ -# $XFree86: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.1,v 1.3 2003/10/21 18:10:07 tsi Exp $ -# -# SAMPLE TTF2BDF MAPPING TABLE -# -# Mapping table from Unicode to ISO8859-1. Names are from the Unicode -# Character Database on ftp.unicode.org. -# -# Two keywords are used to specify the character set registry and encoding: -# REGISTRY and ENCODING. These will be used when creating the XLFD name -# for the font. -# -# Column 1 is the ISO8859-1 value, and column 2 is the Unicode value. The -# columns can be separated by tabs or whitespace, and only the first two -# columns are used. -# -# Empty lines and lines starting with '#' are ignored. -# -# NOTE: made with material from "The ISO 8859 Alphabet Soup" --solofo -# -REGISTRY ISO8859 -ENCODING 1 -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 # LATIN CAPITAL LETTER ETH -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE # LATIN CAPITAL LETTER THORN -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 # LATIN SMALL LETTER ETH -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS Index: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2 diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2:1.3 xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2 Wed Mar 16 20:59:28 2005 @@ -1,277 +0,0 @@ -# -# Id: iso8859.2,v 1.2 1999/06/16 16:13:11 mleisher Exp $ -# $XFree86: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.2,v 1.3 2003/10/21 18:10:07 tsi Exp $ -# -# SAMPLE TTF2BDF MAPPING TABLE -# -# Mapping table from Unicode to ISO8859-2. Names are from the Unicode -# Character Database on ftp.unicode.org. -# -# Two keywords are used to specify the character set registry and encoding: -# REGISTRY and ENCODING. These will be used when creating the XLFD name -# for the font. -# -# Column 1 is the ISO8859-2 value, and column 2 is the Unicode value. The -# columns can be separated by tabs or whitespace, and only the first two -# columns are used. -# -# Empty lines and lines starting with '#' are ignored. -# -REGISTRY ISO8859 -ENCODING 2 -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK -0xA2 0x02D8 # BREVE -0xA3 0x0141 # LATIN CAPITAL LETTER L WITH STROKE -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x013D # LATIN CAPITAL LETTER L WITH CARON -0xA6 0x015A # LATIN CAPITAL LETTER S WITH ACUTE -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x0160 # LATIN CAPITAL LETTER S WITH CARON -0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA -0xAB 0x0164 # LATIN CAPITAL LETTER T WITH CARON -0xAC 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x017D # LATIN CAPITAL LETTER Z WITH CARON -0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0105 # LATIN SMALL LETTER A WITH OGONEK -0xB2 0x02DB # OGONEK -0xB3 0x0142 # LATIN SMALL LETTER L WITH STROKE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x013E # LATIN SMALL LETTER L WITH CARON -0xB6 0x015B # LATIN SMALL LETTER S WITH ACUTE -0xB7 0x02C7 # CARON -0xB8 0x00B8 # CEDILLA -0xB9 0x0161 # LATIN SMALL LETTER S WITH CARON -0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA -0xBB 0x0165 # LATIN SMALL LETTER T WITH CARON -0xBC 0x017A # LATIN SMALL LETTER Z WITH ACUTE -0xBD 0x02DD # DOUBLE ACUTE ACCENT -0xBE 0x017E # LATIN SMALL LETTER Z WITH CARON -0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x0154 # LATIN CAPITAL LETTER R WITH ACUTE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x0102 # LATIN CAPITAL LETTER A WITH BREVE -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x0139 # LATIN CAPITAL LETTER L WITH ACUTE -0xC6 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x011A # LATIN CAPITAL LETTER E WITH CARON -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x010E # LATIN CAPITAL LETTER D WITH CARON -0xD0 0x0110 # LATIN CAPITAL LETTER D WITH STROKE -0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE -0xD2 0x0147 # LATIN CAPITAL LETTER N WITH CARON -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x0158 # LATIN CAPITAL LETTER R WITH CARON -0xD9 0x016E # LATIN CAPITAL LETTER U WITH RING ABOVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x0162 # LATIN CAPITAL LETTER T WITH CEDILLA -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x0155 # LATIN SMALL LETTER R WITH ACUTE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x0103 # LATIN SMALL LETTER A WITH BREVE -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x013A # LATIN SMALL LETTER L WITH ACUTE -0xE6 0x0107 # LATIN SMALL LETTER C WITH ACUTE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x010D # LATIN SMALL LETTER C WITH CARON -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x0119 # LATIN SMALL LETTER E WITH OGONEK -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x011B # LATIN SMALL LETTER E WITH CARON -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x010F # LATIN SMALL LETTER D WITH CARON -0xF0 0x0111 # LATIN SMALL LETTER D WITH STROKE -0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE -0xF2 0x0148 # LATIN SMALL LETTER N WITH CARON -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x0159 # LATIN SMALL LETTER R WITH CARON -0xF9 0x016F # LATIN SMALL LETTER U WITH RING ABOVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x0163 # LATIN SMALL LETTER T WITH CEDILLA -0xFF 0x02D9 # DOT ABOVE Index: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3 diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3:1.3 xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3:1.3 Tue Oct 21 14:10:07 2003 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3 Wed Mar 16 20:59:28 2005 @@ -1,272 +0,0 @@ -# -# Id: iso8859.3,v 1.2 1999/06/16 16:13:11 mleisher Exp $ -# $XFree86: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.3,v 1.3 2003/10/21 18:10:07 tsi Exp $ -# -# SAMPLE TTF2BDF MAPPING TABLE -# -# Mapping table from Unicode to ISO8859-3. Names are from the Unicode -# Character Database on ftp.unicode.org. -# -# Two keywords are used to specify the character set registry and encoding: -# REGISTRY and ENCODING. These will be used when creating the XLFD name -# for the font. -# -# Column 1 is the ISO8859-3 value, and column 2 is the Unicode value. The -# columns can be separated by tabs or whitespace, and only the first two -# columns are used. -# -# Empty lines and lines starting with '#' are ignored. -# -# NOTE: prepared with material from "The ISO 8859 Alphabet Soup" -# -REGISTRY ISO8859 -ENCODING 3 -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0126 # LATIN CAPITAL LETTER H WITH STROKE -0xA2 0x02D8 # BREVE -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA6 0x0124 # LATIN CAPITAL LETTER H WITH CIRCUMFLEX -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE -0xAA 0x015E # LATIN CAPITAL LETTER S WITH CEDILLA -0xAB 0x011E # LATIN CAPITAL LETTER G WITH BREVE -0xAC 0x0134 # LATIN CAPITAL LETTER J WITH CIRCUMFLEX -0xAD 0x00AD # SOFT HYPHEN -0xAF 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x0127 # LATIN SMALL LETTER H WITH STROKE -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x0125 # LATIN SMALL LETTER H WITH CIRCUMFLEX -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x0131 # LATIN SMALL LETTER DOTLESS I -0xBA 0x015F # LATIN SMALL LETTER S WITH CEDILLA -0xBB 0x011F # LATIN SMALL LETTER G WITH BREVE -0xBC 0x0135 # LATIN SMALL LETTER J WITH CIRCUMFLEX -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBF 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS -0xC5 0x010A # LATIN CAPITAL LETTER C WITH DOT ABOVE -0xC6 0x0108 # LATIN CAPITAL LETTER C WITH CIRCUMFLEX -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE -0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE -0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX -0xD5 0x0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE -0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS -0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX -0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x016C # LATIN CAPITAL LETTER U WITH BREVE -0xDE 0x015C # LATIN CAPITAL LETTER S WITH CIRCUMFLEX -0xDF 0x00DF # LATIN SMALL LETTER SHARP S -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS -0xE5 0x010B # LATIN SMALL LETTER C WITH DOT ABOVE -0xE6 0x0109 # LATIN SMALL LETTER C WITH CIRCUMFLEX -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE -0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x0121 # LATIN SMALL LETTER G WITH DOT ABOVE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x011D # LATIN SMALL LETTER G WITH CIRCUMFLEX -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x016D # LATIN SMALL LETTER U WITH BREVE -0xFE 0x015D # LATIN SMALL LETTER S WITH CIRCUMFLEX -0xFF 0x02D9 # DOT ABOVE Index: xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.5 diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.5:1.1.1.2 xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.5:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.5:1.1.1.2 Sat Feb 12 23:54:55 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/iso8859.5 Wed Mar 16 20:59:28 2005 @@ -1,265 +0,0 @@ -#/* -# * Unicode 2.0 -> iso8859-5 -# * -# * 04 Jan 98 | Eugene Bobin, -# * -# * Modified 16 June 99 Mark Leisher -# */ -REGISTRY ISO8859 -ENCODING 5 -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0x7F 0x007F # -0x80 0x0080 # -0x81 0x0081 # -0x82 0x0082 # -0x83 0x0083 # -0x84 0x0084 # -0x85 0x0085 # -0x86 0x0086 # -0x87 0x0087 # -0x88 0x0088 # -0x89 0x0089 # -0x8A 0x008A # -0x8B 0x008B # -0x8C 0x008C # -0x8D 0x008D # -0x8E 0x008E # -0x8F 0x008F # -0x90 0x0090 # -0x91 0x0091 # -0x92 0x0092 # -0x93 0x0093 # -0x94 0x0094 # -0x95 0x0095 # -0x96 0x0096 # -0x97 0x0097 # -0x98 0x0098 # -0x99 0x0099 # -0x9A 0x009A # -0x9B 0x009B # -0x9C 0x009C # -0x9D 0x009D # -0x9E 0x009E # -0x9F 0x009F # -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x0401 # CYRILLIC CAPITAL LETTER IO /* ł */ -0xA2 0x00A2 # CENT SIGN -0xA3 0x00A3 # POUND SIGN -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x0410 # CYRILLIC CAPITAL LETTER A /* á */ -0xB1 0x0411 # CYRILLIC CAPITAL LETTER BE /* â */ -0xB2 0x0412 # CYRILLIC CAPITAL LETTER VE /* ÷ */ -0xB3 0x0413 # CYRILLIC CAPITAL LETTER GHE /* ç */ -0xB4 0x0414 # CYRILLIC CAPITAL LETTER DE /* ä */ -0xB5 0x0415 # CYRILLIC CAPITAL LETTER IE /* ĺ */ -0xB6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* ö */ -0xB7 0x0417 # CYRILLIC CAPITAL LETTER ZE /* ú */ -0xB8 0x0418 # CYRILLIC CAPITAL LETTER I /* é */ -0xB9 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* ę */ -0xBA 0x041A # CYRILLIC CAPITAL LETTER KA /* ë */ -0xBB 0x041B # CYRILLIC CAPITAL LETTER EL /* ě */ -0xBC 0x041C # CYRILLIC CAPITAL LETTER EM /* í */ -0xBD 0x041D # CYRILLIC CAPITAL LETTER EN /* î */ -0xBE 0x041E # CYRILLIC CAPITAL LETTER O /* ď */ -0xBF 0x041F # CYRILLIC CAPITAL LETTER PE /* đ */ -0xC0 0x0420 # CYRILLIC CAPITAL LETTER ER /* ň */ -0xC1 0x0421 # CYRILLIC CAPITAL LETTER ES /* ó */ -0xC2 0x0422 # CYRILLIC CAPITAL LETTER TE /* ô */ -0xC3 0x0423 # CYRILLIC CAPITAL LETTER U /* ő */ -0xC4 0x0424 # CYRILLIC CAPITAL LETTER EF /* ć */ -0xC5 0x0425 # CYRILLIC CAPITAL LETTER HA /* č */ -0xC6 0x0426 # CYRILLIC CAPITAL LETTER TSE /* ă */ -0xC7 0x0427 # CYRILLIC CAPITAL LETTER CHE /* ţ */ -0xC8 0x0428 # CYRILLIC CAPITAL LETTER SHA /* ű */ -0xC9 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* ý */ -0xCA 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* ˙ */ -0xCB 0x042B # CYRILLIC CAPITAL LETTER YERU /* ů */ -0xCC 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* ř */ -0xCD 0x042D # CYRILLIC CAPITAL LETTER E /* ü */ -0xCE 0x042E # CYRILLIC CAPITAL LETTER YU /* ŕ */ -0xCF 0x042F # CYRILLIC CAPITAL LETTER YA /* ń */ -0xD0 0x0430 # CYRILLIC SMALL LETTER A /* Á */ -0xD1 0x0431 # CYRILLIC SMALL LETTER BE /* Â */ -0xD2 0x0432 # CYRILLIC SMALL LETTER VE /* × */ -0xD3 0x0433 # CYRILLIC SMALL LETTER GHE /* Ç */ -0xD4 0x0434 # CYRILLIC SMALL LETTER DE /* Ä */ -0xD5 0x0435 # CYRILLIC SMALL LETTER IE /* Ĺ */ -0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* Ö */ -0xD7 0x0437 # CYRILLIC SMALL LETTER ZE /* Ú */ -0xD8 0x0438 # CYRILLIC SMALL LETTER I /* É */ -0xD9 0x0439 # CYRILLIC SMALL LETTER SHORT I /* Ę */ -0xDA 0x043A # CYRILLIC SMALL LETTER KA /* Ë */ -0xDB 0x043B # CYRILLIC SMALL LETTER EL /* Ě */ -0xDC 0x043C # CYRILLIC SMALL LETTER EM /* Í */ -0xDD 0x043D # CYRILLIC SMALL LETTER EN /* Î */ -0xDE 0x043E # CYRILLIC SMALL LETTER O /* Ď */ -0xDF 0x043F # CYRILLIC SMALL LETTER PE /* Đ */ -0xE0 0x0440 # CYRILLIC SMALL LETTER ER /* Ň */ -0xE1 0x0441 # CYRILLIC SMALL LETTER ES /* Ó */ -0xE2 0x0442 # CYRILLIC SMALL LETTER TE /* Ô */ -0xE3 0x0443 # CYRILLIC SMALL LETTER U /* Ő */ -0xE4 0x0444 # CYRILLIC SMALL LETTER EF /* Ć */ -0xE5 0x0445 # CYRILLIC SMALL LETTER HA /* Č */ -0xE6 0x0446 # CYRILLIC SMALL LETTER TSE /* Ă */ -0xE7 0x0447 # CYRILLIC SMALL LETTER CHE /* Ţ */ -0xE8 0x0448 # CYRILLIC SMALL LETTER SHA /* Ű */ -0xE9 0x0449 # CYRILLIC SMALL LETTER SHCHA /* Ý */ -0xEA 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* ß */ -0xEB 0x044B # CYRILLIC SMALL LETTER YERU /* Ů */ -0xEC 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* Ř */ -0xED 0x044D # CYRILLIC SMALL LETTER E /* Ü */ -0xEE 0x044E # CYRILLIC SMALL LETTER YU /* Ŕ */ -0xEF 0x044F # CYRILLIC SMALL LETTER YA /* Ń */ -0xF0 0x00F0 # LATIN SMALL LETTER ETH -0xF1 0x0451 # CYRILLIC SMALL LETTER IO /* Ł */ -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE -0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX -0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE -0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS -0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX -0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS Index: xc/extras/FreeType/contrib/ttf2bdf/maps/koi8.r diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/koi8.r:1.1.1.2 xc/extras/FreeType/contrib/ttf2bdf/maps/koi8.r:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/koi8.r:1.1.1.2 Sat Feb 12 23:54:55 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/koi8.r Wed Mar 16 20:59:29 2005 @@ -1,232 +0,0 @@ -#/* -# * Unicode 2.0 -> KOI8-R -# * -# * 11 Jan 97 | Eugene Bobin, -# * -# * Modified 16 June 99 Mark Leisher -# */ -REGISTRY KOI8 -ENCODING R -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x0451 # CYRILLIC SMALL LETTER IO /* Ł */ -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO /* ł */ -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x044E # CYRILLIC SMALL LETTER YU /* Ŕ */ -0xC1 0x0430 # CYRILLIC SMALL LETTER A /* Á */ -0xC2 0x0431 # CYRILLIC SMALL LETTER BE /* Â */ -0xC3 0x0446 # CYRILLIC SMALL LETTER TSE /* Ă */ -0xC4 0x0434 # CYRILLIC SMALL LETTER DE /* Ä */ -0xC5 0x0435 # CYRILLIC SMALL LETTER IE /* Ĺ */ -0xC6 0x0444 # CYRILLIC SMALL LETTER EF /* Ć */ -0xC7 0x0433 # CYRILLIC SMALL LETTER GHE /* Ç */ -0xC8 0x0445 # CYRILLIC SMALL LETTER HA /* Č */ -0xC9 0x0438 # CYRILLIC SMALL LETTER I /* É */ -0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I /* Ę */ -0xCB 0x043A # CYRILLIC SMALL LETTER KA /* Ë */ -0xCC 0x043B # CYRILLIC SMALL LETTER EL /* Ě */ -0xCD 0x043C # CYRILLIC SMALL LETTER EM /* Í */ -0xCE 0x043D # CYRILLIC SMALL LETTER EN /* Î */ -0xCF 0x043E # CYRILLIC SMALL LETTER O /* Ď */ -0xD0 0x043F # CYRILLIC SMALL LETTER PE /* Đ */ -0xD1 0x044F # CYRILLIC SMALL LETTER YA /* Ń */ -0xD2 0x0440 # CYRILLIC SMALL LETTER ER /* Ň */ -0xD3 0x0441 # CYRILLIC SMALL LETTER ES /* Ó */ -0xD4 0x0442 # CYRILLIC SMALL LETTER TE /* Ô */ -0xD5 0x0443 # CYRILLIC SMALL LETTER U /* Ő */ -0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* Ö */ -0xD7 0x0432 # CYRILLIC SMALL LETTER VE /* × */ -0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* Ř */ -0xD9 0x044B # CYRILLIC SMALL LETTER YERU /* Ů */ -0xDA 0x0437 # CYRILLIC SMALL LETTER ZE /* Ú */ -0xDB 0x0448 # CYRILLIC SMALL LETTER SHA /* Ű */ -0xDC 0x044D # CYRILLIC SMALL LETTER E /* Ü */ -0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA /* Ý */ -0xDE 0x0447 # CYRILLIC SMALL LETTER CHE /* Ţ */ -0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* ß */ -0xE0 0x042E # CYRILLIC CAPITAL LETTER YU /* ŕ */ -0xE1 0x0410 # CYRILLIC CAPITAL LETTER A /* á */ -0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE /* â */ -0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE /* ă */ -0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE /* ä */ -0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE /* ĺ */ -0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF /* ć */ -0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE /* ç */ -0xE8 0x0425 # CYRILLIC CAPITAL LETTER HA /* č */ -0xE9 0x0418 # CYRILLIC CAPITAL LETTER I /* é */ -0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* ę */ -0xEB 0x041A # CYRILLIC CAPITAL LETTER KA /* ë */ -0xEC 0x041B # CYRILLIC CAPITAL LETTER EL /* ě */ -0xED 0x041C # CYRILLIC CAPITAL LETTER EM /* í */ -0xEE 0x041D # CYRILLIC CAPITAL LETTER EN /* î */ -0xEF 0x041E # CYRILLIC CAPITAL LETTER O /* ď */ -0xF0 0x041F # CYRILLIC CAPITAL LETTER PE /* đ */ -0xF1 0x042F # CYRILLIC CAPITAL LETTER YA /* ń */ -0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER /* ň */ -0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES /* ó */ -0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE /* ô */ -0xF5 0x0423 # CYRILLIC CAPITAL LETTER U /* ő */ -0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* ö */ -0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE /* ÷ */ -0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* ř */ -0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU /* ů */ -0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE /* ú */ -0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA /* ű */ -0xFC 0x042D # CYRILLIC CAPITAL LETTER E /* ü */ -0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* ý */ -0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE /* ţ */ -0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* ˙ */ Index: xc/extras/FreeType/contrib/ttf2bdf/maps/windows.1251 diff -u xc/extras/FreeType/contrib/ttf2bdf/maps/windows.1251:1.1.1.2 xc/extras/FreeType/contrib/ttf2bdf/maps/windows.1251:removed --- xc/extras/FreeType/contrib/ttf2bdf/maps/windows.1251:1.1.1.2 Sat Feb 12 23:54:55 2000 +++ xc/extras/FreeType/contrib/ttf2bdf/maps/windows.1251 Wed Mar 16 20:59:29 2005 @@ -1,233 +0,0 @@ -#/* -# * Unicode 2.0 -> Windows CP_1251 (Must Die ;) -# * -# * 11 Jan 97 | Eugene Bobin, -# * -# * Modified 16 June 99 Mark Leisher -# */ -# -REGISTRY WINDOWS -ENCODING 1251 -0x00 0x0000 # -0x01 0x0001 # -0x02 0x0002 # -0x03 0x0003 # -0x04 0x0004 # -0x05 0x0005 # -0x06 0x0006 # -0x07 0x0007 # -0x08 0x0008 # -0x09 0x0009 # -0x0A 0x000A # -0x0B 0x000B # -0x0C 0x000C # -0x0D 0x000D # -0x0E 0x000E # -0x0F 0x000F # -0x10 0x0010 # -0x11 0x0011 # -0x12 0x0012 # -0x13 0x0013 # -0x14 0x0014 # -0x15 0x0015 # -0x16 0x0016 # -0x17 0x0017 # -0x18 0x0018 # -0x19 0x0019 # -0x1A 0x001A # -0x1B 0x001B # -0x1C 0x001C # -0x1D 0x001D # -0x1E 0x001E # -0x1F 0x001F # -0x20 0x0020 # SPACE -0x21 0x0021 # EXCLAMATION MARK -0x22 0x0022 # QUOTATION MARK -0x23 0x0023 # NUMBER SIGN -0x24 0x0024 # DOLLAR SIGN -0x25 0x0025 # PERCENT SIGN -0x26 0x0026 # AMPERSAND -0x27 0x0027 # APOSTROPHE -0x28 0x0028 # LEFT PARENTHESIS -0x29 0x0029 # RIGHT PARENTHESIS -0x2A 0x002A # ASTERISK -0x2B 0x002B # PLUS SIGN -0x2C 0x002C # COMMA -0x2D 0x002D # HYPHEN-MINUS -0x2E 0x002E # FULL STOP -0x2F 0x002F # SOLIDUS -0x30 0x0030 # DIGIT ZERO -0x31 0x0031 # DIGIT ONE -0x32 0x0032 # DIGIT TWO -0x33 0x0033 # DIGIT THREE -0x34 0x0034 # DIGIT FOUR -0x35 0x0035 # DIGIT FIVE -0x36 0x0036 # DIGIT SIX -0x37 0x0037 # DIGIT SEVEN -0x38 0x0038 # DIGIT EIGHT -0x39 0x0039 # DIGIT NINE -0x3A 0x003A # COLON -0x3B 0x003B # SEMICOLON -0x3C 0x003C # LESS-THAN SIGN -0x3D 0x003D # EQUALS SIGN -0x3E 0x003E # GREATER-THAN SIGN -0x3F 0x003F # QUESTION MARK -0x40 0x0040 # COMMERCIAL AT -0x41 0x0041 # LATIN CAPITAL LETTER A -0x42 0x0042 # LATIN CAPITAL LETTER B -0x43 0x0043 # LATIN CAPITAL LETTER C -0x44 0x0044 # LATIN CAPITAL LETTER D -0x45 0x0045 # LATIN CAPITAL LETTER E -0x46 0x0046 # LATIN CAPITAL LETTER F -0x47 0x0047 # LATIN CAPITAL LETTER G -0x48 0x0048 # LATIN CAPITAL LETTER H -0x49 0x0049 # LATIN CAPITAL LETTER I -0x4A 0x004A # LATIN CAPITAL LETTER J -0x4B 0x004B # LATIN CAPITAL LETTER K -0x4C 0x004C # LATIN CAPITAL LETTER L -0x4D 0x004D # LATIN CAPITAL LETTER M -0x4E 0x004E # LATIN CAPITAL LETTER N -0x4F 0x004F # LATIN CAPITAL LETTER O -0x50 0x0050 # LATIN CAPITAL LETTER P -0x51 0x0051 # LATIN CAPITAL LETTER Q -0x52 0x0052 # LATIN CAPITAL LETTER R -0x53 0x0053 # LATIN CAPITAL LETTER S -0x54 0x0054 # LATIN CAPITAL LETTER T -0x55 0x0055 # LATIN CAPITAL LETTER U -0x56 0x0056 # LATIN CAPITAL LETTER V -0x57 0x0057 # LATIN CAPITAL LETTER W -0x58 0x0058 # LATIN CAPITAL LETTER X -0x59 0x0059 # LATIN CAPITAL LETTER Y -0x5A 0x005A # LATIN CAPITAL LETTER Z -0x5B 0x005B # LEFT SQUARE BRACKET -0x5C 0x005C # REVERSE SOLIDUS -0x5D 0x005D # RIGHT SQUARE BRACKET -0x5E 0x005E # CIRCUMFLEX ACCENT -0x5F 0x005F # LOW LINE -0x60 0x0060 # GRAVE ACCENT -0x61 0x0061 # LATIN SMALL LETTER A -0x62 0x0062 # LATIN SMALL LETTER B -0x63 0x0063 # LATIN SMALL LETTER C -0x64 0x0064 # LATIN SMALL LETTER D -0x65 0x0065 # LATIN SMALL LETTER E -0x66 0x0066 # LATIN SMALL LETTER F -0x67 0x0067 # LATIN SMALL LETTER G -0x68 0x0068 # LATIN SMALL LETTER H -0x69 0x0069 # LATIN SMALL LETTER I -0x6A 0x006A # LATIN SMALL LETTER J -0x6B 0x006B # LATIN SMALL LETTER K -0x6C 0x006C # LATIN SMALL LETTER L -0x6D 0x006D # LATIN SMALL LETTER M -0x6E 0x006E # LATIN SMALL LETTER N -0x6F 0x006F # LATIN SMALL LETTER O -0x70 0x0070 # LATIN SMALL LETTER P -0x71 0x0071 # LATIN SMALL LETTER Q -0x72 0x0072 # LATIN SMALL LETTER R -0x73 0x0073 # LATIN SMALL LETTER S -0x74 0x0074 # LATIN SMALL LETTER T -0x75 0x0075 # LATIN SMALL LETTER U -0x76 0x0076 # LATIN SMALL LETTER V -0x77 0x0077 # LATIN SMALL LETTER W -0x78 0x0078 # LATIN SMALL LETTER X -0x79 0x0079 # LATIN SMALL LETTER Y -0x7A 0x007A # LATIN SMALL LETTER Z -0x7B 0x007B # LEFT CURLY BRACKET -0x7C 0x007C # VERTICAL LINE -0x7D 0x007D # RIGHT CURLY BRACKET -0x7E 0x007E # TILDE -0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK -0xA2 0x00A2 # CENT SIGN -0xA3 0x0451 # CYRILLIC SMALL LETTER IO /* Ł */ -0xA4 0x00A4 # CURRENCY SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x00A6 # BROKEN BAR -0xA7 0x00A7 # SECTION SIGN -0xA8 0x00A8 # DIAERESIS -0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR -0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -0xAC 0x00AC # NOT SIGN -0xAD 0x00AD # SOFT HYPHEN -0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON -0xB0 0x00B0 # DEGREE SIGN -0xB1 0x00B1 # PLUS-MINUS SIGN -0xB2 0x00B2 # SUPERSCRIPT TWO -0xB3 0x0401 # CYRILLIC CAPITAL LETTER IO /* ł */ -0xB4 0x00B4 # ACUTE ACCENT -0xB5 0x00B5 # MICRO SIGN -0xB6 0x00B6 # PILCROW SIGN -0xB7 0x00B7 # MIDDLE DOT -0xB8 0x00B8 # CEDILLA -0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR -0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x00BC # VULGAR FRACTION ONE QUARTER -0xBD 0x00BD # VULGAR FRACTION ONE HALF -0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x044E # CYRILLIC SMALL LETTER YU /* Ŕ */ -0xC1 0x0430 # CYRILLIC SMALL LETTER A /* Á */ -0xC2 0x0431 # CYRILLIC SMALL LETTER BE /* Â */ -0xC3 0x0446 # CYRILLIC SMALL LETTER TSE /* Ă */ -0xC4 0x0434 # CYRILLIC SMALL LETTER DE /* Ä */ -0xC5 0x0435 # CYRILLIC SMALL LETTER IE /* Ĺ */ -0xC6 0x0444 # CYRILLIC SMALL LETTER EF /* Ć */ -0xC7 0x0433 # CYRILLIC SMALL LETTER GHE /* Ç */ -0xC8 0x0445 # CYRILLIC SMALL LETTER HA /* Č */ -0xC9 0x0438 # CYRILLIC SMALL LETTER I /* É */ -0xCA 0x0439 # CYRILLIC SMALL LETTER SHORT I /* Ę */ -0xCB 0x043A # CYRILLIC SMALL LETTER KA /* Ë */ -0xCC 0x043B # CYRILLIC SMALL LETTER EL /* Ě */ -0xCD 0x043C # CYRILLIC SMALL LETTER EM /* Í */ -0xCE 0x043D # CYRILLIC SMALL LETTER EN /* Î */ -0xCF 0x043E # CYRILLIC SMALL LETTER O /* Ď */ -0xD0 0x043F # CYRILLIC SMALL LETTER PE /* Đ */ -0xD1 0x044F # CYRILLIC SMALL LETTER YA /* Ń */ -0xD2 0x0440 # CYRILLIC SMALL LETTER ER /* Ň */ -0xD3 0x0441 # CYRILLIC SMALL LETTER ES /* Ó */ -0xD4 0x0442 # CYRILLIC SMALL LETTER TE /* Ô */ -0xD5 0x0443 # CYRILLIC SMALL LETTER U /* Ő */ -0xD6 0x0436 # CYRILLIC SMALL LETTER ZHE /* Ö */ -0xD7 0x0432 # CYRILLIC SMALL LETTER VE /* × */ -0xD8 0x044C # CYRILLIC SMALL LETTER SOFT SIGN /* Ř */ -0xD9 0x044B # CYRILLIC SMALL LETTER YERU /* Ů */ -0xDA 0x0437 # CYRILLIC SMALL LETTER ZE /* Ú */ -0xDB 0x0448 # CYRILLIC SMALL LETTER SHA /* Ű */ -0xDC 0x044D # CYRILLIC SMALL LETTER E /* Ü */ -0xDD 0x0449 # CYRILLIC SMALL LETTER SHCHA /* Ý */ -0xDE 0x0447 # CYRILLIC SMALL LETTER CHE /* Ţ */ -0xDF 0x044A # CYRILLIC SMALL LETTER HARD SIGN /* ß */ -0xE0 0x042E # CYRILLIC CAPITAL LETTER YU /* ŕ */ -0xE1 0x0410 # CYRILLIC CAPITAL LETTER A /* á */ -0xE2 0x0411 # CYRILLIC CAPITAL LETTER BE /* â */ -0xE3 0x0426 # CYRILLIC CAPITAL LETTER TSE /* ă */ -0xE4 0x0414 # CYRILLIC CAPITAL LETTER DE /* ä */ -0xE5 0x0415 # CYRILLIC CAPITAL LETTER IE /* ĺ */ -0xE6 0x0424 # CYRILLIC CAPITAL LETTER EF /* ć */ -0xE7 0x0413 # CYRILLIC CAPITAL LETTER GHE /* ç */ -0xE8 0x0425 # CYRILLIC CAPITAL LETTER HA /* č */ -0xE9 0x0418 # CYRILLIC CAPITAL LETTER I /* é */ -0xEA 0x0419 # CYRILLIC CAPITAL LETTER SHORT I /* ę */ -0xEB 0x041A # CYRILLIC CAPITAL LETTER KA /* ë */ -0xEC 0x041B # CYRILLIC CAPITAL LETTER EL /* ě */ -0xED 0x041C # CYRILLIC CAPITAL LETTER EM /* í */ -0xEE 0x041D # CYRILLIC CAPITAL LETTER EN /* î */ -0xEF 0x041E # CYRILLIC CAPITAL LETTER O /* ď */ -0xF0 0x041F # CYRILLIC CAPITAL LETTER PE /* đ */ -0xF1 0x042F # CYRILLIC CAPITAL LETTER YA /* ń */ -0xF2 0x0420 # CYRILLIC CAPITAL LETTER ER /* ň */ -0xF3 0x0421 # CYRILLIC CAPITAL LETTER ES /* ó */ -0xF4 0x0422 # CYRILLIC CAPITAL LETTER TE /* ô */ -0xF5 0x0423 # CYRILLIC CAPITAL LETTER U /* ő */ -0xF6 0x0416 # CYRILLIC CAPITAL LETTER ZHE /* ö */ -0xF7 0x0412 # CYRILLIC CAPITAL LETTER VE /* ÷ */ -0xF8 0x042C # CYRILLIC CAPITAL LETTER SOFT SIGN /* ř */ -0xF9 0x042B # CYRILLIC CAPITAL LETTER YERU /* ů */ -0xFA 0x0417 # CYRILLIC CAPITAL LETTER ZE /* ú */ -0xFB 0x0428 # CYRILLIC CAPITAL LETTER SHA /* ű */ -0xFC 0x042D # CYRILLIC CAPITAL LETTER E /* ü */ -0xFD 0x0429 # CYRILLIC CAPITAL LETTER SHCHA /* ý */ -0xFE 0x0427 # CYRILLIC CAPITAL LETTER CHE /* ţ */ -0xFF 0x042A # CYRILLIC CAPITAL LETTER HARD SIGN /* ˙ */ Index: xc/extras/FreeType/contrib/ttf2pfb/.cvsignore diff -u xc/extras/FreeType/contrib/ttf2pfb/.cvsignore:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/.cvsignore:removed --- xc/extras/FreeType/contrib/ttf2pfb/.cvsignore:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/.cvsignore Wed Mar 16 20:59:29 2005 @@ -1,3 +0,0 @@ -t1asm -ttf2pfb -Makefile Index: xc/extras/FreeType/contrib/ttf2pfb/Makefile.emx diff -u xc/extras/FreeType/contrib/ttf2pfb/Makefile.emx:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/Makefile.emx:removed --- xc/extras/FreeType/contrib/ttf2pfb/Makefile.emx:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/Makefile.emx Wed Mar 16 20:59:29 2005 @@ -1,16 +0,0 @@ -# Makefile for ttf2pfb and t1asm - -all: ttf2pfb.exe t1asm.exe - - -ttf2pfb.exe: ttf2pfb.o - gcc -O -o ttf2pfb.exe ttf2pfb.o -lttf - -ttf2pfb.o: ttf2pfb.c - gcc -O -c ttf2pfb.c - -t1asm.exe: t1asm.o - gcc -O -o t1asm.exe t1asm.o -lttf - -t1asm.o: t1asm.c - gcc -O -c t1asm.c Index: xc/extras/FreeType/contrib/ttf2pfb/Makefile.in diff -u xc/extras/FreeType/contrib/ttf2pfb/Makefile.in:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/Makefile.in:removed --- xc/extras/FreeType/contrib/ttf2pfb/Makefile.in:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/Makefile.in Wed Mar 16 20:59:29 2005 @@ -1,74 +0,0 @@ -# Makefile for ttf2pfb -# -# This Makefile assumes that you've already built and installed -# the FreeType library. - -VPATH = @srcdir@ -srcdir = @srcdir@ - -RM = @RM@ -RMF = @RM@ -f - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ - -CC = @CC@ -CPP = @CPP@ - -LIBTOOL = ../../libtool -MKINSTALLDIRS = $(srcdir)/../../mkinstalldirs - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -mandir = @mandir@ - -CFLAGS = @CFLAGS@ @XX_CFLAGS@ -CPPFLAGS = @CPPFLAGS@ @DEFS@ -FT_CFLAGS = $(CFLAGS) $(CPPFLAGS) -LDFLAGS = @LDFLAGS@ @LIBS@ -LIBDIR = ../../lib - -SRC = t1asm.c ttf2pfb.c - -PROGRAMS = t1asm ttf2pfb - -default all: $(PROGRAMS) - -t1asm: t1asm.c - $(CC) $(CFLAGS) -o $@ $< - -ttf2pfb: ttf2pfb.o $(LIBDIR)/libttf.la - $(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o $@ $< \ - $(LIBDIR)/libttf.la $(LDFLAGS) - -clean: - $(RMF) *.o *BAK *CKP *~ a.out core - -realclean: clean - $(RMF) $(PROGRAMS) - $(RM) -rf .libs/ - -distclean: realclean - $(RMF) *~ *.orig core *.core - $(RMF) config.cache config.log config.status Makefile - -.c.o: - $(CC) -c $(FT_CFLAGS) $< - -install: $(PROGRAMS) - $(MKINSTALLDIRS) $(bindir) - for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$P $(bindir)/$$P ; \ - done - $(INSTALL_PROGRAM) $(srcdir)/getafm $(bindir)/getafm - -uninstall: - -for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=uninstall $(RM) $(bindir)/$$P ; \ - done - -.PHONY: all clean realclean distclean install uninstall - -# end of Makefile Index: xc/extras/FreeType/contrib/ttf2pfb/TODO diff -u xc/extras/FreeType/contrib/ttf2pfb/TODO:1.1.1.2 xc/extras/FreeType/contrib/ttf2pfb/TODO:removed --- xc/extras/FreeType/contrib/ttf2pfb/TODO:1.1.1.2 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/TODO Wed Mar 16 20:59:29 2005 @@ -1,40 +0,0 @@ -ttf2pfb is oriented towards support for CJK fonts containing several -thousand glyphs to be splitted into subfonts with 256 characters each usable -by TeX. Nevertheless, it is quite generic and works with normal ttf files -too. - -Some features are still missing or should be added for convenience: - -. Documentation. ttf2pbf explains itself; t1asm is a filter which converts - the (disassembled) pseudo font created by ttf2pfb into a real PFA font - (or PFB if you use the `-b' command line switch). - - Example for an ordinary font: - - ttf2pfb -v -m -enc Uni-T1.enc -f FooBar -o foobar.ps foobar.ttf - t1asm -b < foobar.ps > foobar.pfb - printafm foobar.pfb > foobar.afm - afm2tfm foobar.afm - - Example for a CJK font in Big 5 encoding to be used with the CJK package - for LaTeX (note that the call creates just the first subfont): - - ttf2pfb -c -pid 3 -eid 4 -plane 1 -f FooBar01 -o foobar01.ps foobar.ttf - t1asm -b < foobar01.ps > foobar01.pfb - printafm foobar01.pfb > foobar01.afm - afm2tfm foobar01.afm - -. Inclusion of t1asm and t1binary into ttf2pfb so that ttf2pfb can directly - produce PFA and PFB files. - -. Overlapping outlines produce incorrect shapes: The overlapping areas - appear white instead of black. - -. A more flexible encoding file format (maybe similar to ttf2tfm) which can - handle glyph names. - -. [t1asm has been slightly patched to allow partial font downloading with - dvips.] - -. Note that compiling ttf2pfb with `-O2' doesn't work, most probably due to - a compiler bug (we've tested with gcc 2.7.2.1 and 2.7.2.3). Index: xc/extras/FreeType/contrib/ttf2pfb/Uni-T1.enc diff -u xc/extras/FreeType/contrib/ttf2pfb/Uni-T1.enc:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/Uni-T1.enc:removed --- xc/extras/FreeType/contrib/ttf2pfb/Uni-T1.enc:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/Uni-T1.enc Wed Mar 16 20:59:29 2005 @@ -1,397 +0,0 @@ -# -# This file is a hack to provide some mapping for standard (non-CJK) -# TrueType fonts. It is intended as an intermediate step towards a -# `correct' implementation as in ttf2tfm. -# -# Here, we have Unicode to LaTeX's T1 encoding. An example call would be -# -# ttf2pfb -m -enc Uni-T1.enc ... -# -# Glyph names which can't be represented in Unicode have the character code -# 0xfffe. - - -# 0x00 - -0x00: - 0x60 # /grave - 0xb4 # /acute -0x02: - 0xc6 # /circumflex - 0xdc # /tilde - -0x00: - 0xa8 # /dieresis -0x02: - 0xdd # /hungarumlaut - 0xda # /ring - 0xc7 # /caron - - 0xd8 # /breve - 0xc9 # /macron - 0xd9 # /dotaccent -0x00: - 0xb8 # /cedilla - -0x02: - 0xdb # /ogonek -0x20: - 0x1a # /quotesinglbase - 0x39 # /guilsinglleft - 0x3a # /guilsinglright - -# 0x10 - - 0x1c # /quotedblleft - 0x1d # /quotedblright - 0x1e # /quotedblbase -0x00: - 0xab # /guillemotleft - - 0xbb # /guillemotright -0x20: - 0x13 # /endash - 0x14 # /emdash -0xff: - 0xfe # /compwordmark - - 0xfe # /perthousandzero -0x01: - 0x31 # /dotlessi -0xff: - 0xfe # /dotlessj - 0xfe # /ff - -0xf0: - 0x01 # /fi - 0x02 # /fl -0xff: - 0xfe # /ffi - 0xfe # /ffl - -# 0x20 - - 0xfe # /visualspace -0x00: - 0x21 # /exclam - 0x22 # /quotedbl - 0x23 # /numbersign - - 0x24 # /dollar - 0x25 # /percent - 0x26 # /ampersand -0x20: - 0x19 # /quoteright - -0x00: - 0x28 # /parenleft - 0x29 # /parenright - 0x2a # /asterisk - 0x2b # /plus - - 0x2c # /comma - 0x2d # /hyphen - 0x2e # /period - 0x2f # /slash - -# 0x30 - - 0x30 # /zero - 0x31 # /one - 0x32 # /two - 0x33 # /three - - 0x34 # /four - 0x35 # /five - 0x36 # /six - 0x37 # /seven - - 0x38 # /eight - 0x39 # /nine - 0x3a # /colon - 0x3b # /semicolon - - 0x3c # /less - 0x3d # /equal - 0x3e # /greater - 0x3f # /question - -# 0x40 - - 0x40 # /at - 0x41 # /A - 0x42 # /B - 0x43 # /C - - 0x44 # /D - 0x45 # /E - 0x46 # /F - 0x47 # /G - - 0x48 # /H - 0x49 # /I - 0x4a # /J - 0x4b # /K - - 0x4c # /L - 0x4d # /M - 0x4e # /N - 0x4f # /O - -# 0x50 - - 0x50 # /P - 0x51 # /Q - 0x52 # /R - 0x53 # /S - - 0x54 # /T - 0x55 # /U - 0x56 # /V - 0x57 # /W - - 0x58 # /X - 0x59 # /Y - 0x5a # /Z - 0x5b # /bracketleft - - 0x5c # /backslash - 0x5d # /bracketright - 0x5e # /asciicircum - 0x5f # /underscore - -# 0x60 - -0x20: - 0x18 # /quoteleft -0x00: - 0x61 # /a - 0x62 # /b - 0x63 # /c - - 0x64 # /d - 0x65 # /e - 0x66 # /f - 0x67 # /g - - 0x68 # /h - 0x69 # /i - 0x6a # /j - 0x6b # /k - - 0x6c # /l - 0x6d # /m - 0x6e # /n - 0x6f # /o - -# 0x70 - - 0x70 # /p - 0x71 # /q - 0x72 # /r - 0x73 # /s - - 0x74 # /t - 0x75 # /u - 0x76 # /v - 0x77 # /w - - 0x78 # /x - 0x79 # /y - 0x7a # /z - 0x7b # /braceleft - - 0x7c # /bar - 0x7d # /braceright - 0x7e # /asciitilde - 0x2d # /hyphen - -# 0x80 - -0x01: - 0x02 # /Abreve - 0x04 # /Aogonek - 0x06 # /Cacute - 0x0c # /Ccaron - - 0x0e # /Dcaron - 0x1a # /Ecaron - 0x18 # /Eogonek - 0x1e # /Gbreve - - 0x39 # /Lacute - 0x3d # /Lcaron - 0x41 # /Lslash - 0x43 # /Nacute - - 0x47 # /Ncaron - 0x4a # /Eng - 0x50 # /Odblacute - 0x54 # /Racute - -# 0x90 - - 0x58 # /Rcaron - 0x5a # /Sacute - 0x60 # /Scaron - 0x5e # /Scedilla - - 0x64 # /Tcaron - 0x62 # /Tcedilla - 0x70 # /Udblacute - 0x6e # /Uring - - 0x78 # /Ydieresis - 0x79 # /Zacute - 0x7d # /Zcaron - 0x7b # /Zdot - - 0x32 # /IJ - 0x30 # /Idot - 0x11 # /dmacron -0x00: - 0xa7 # /section - -# 0xA0 - -0x01: - 0x03 # /abreve - 0x05 # /aogonek - 0x07 # /cacute - 0x0d # /ccaron - - 0x0f # /dcaron - 0x1b # /ecaron - 0x19 # /eogonek - 0x1f # /gbreve - - 0x3a # /lacute - 0x3e # /lcaron - 0x42 # /lslash - 0x44 # /nacute - - 0x48 # /ncaron - 0x4b # /eng - 0x51 # /odblacute - 0x55 # /racute - -# 0xB0 - - 0x59 # /rcaron - 0x5b # /sacute - 0x61 # /scaron - 0x5f # /scedilla - - 0x65 # /tcaron - 0x63 # /tcedilla - 0x71 # /udblacute - 0x6f # /uring - -0x00: - 0xff # /ydieresis -0x01: - 0x7a # /zacute - 0x7e # /zcaron - 0x7c # /zdot - - 0x33 # /ij -0x00: - 0xa1 # /exclamdown - 0xbf # /questiondown - 0xa3 # /sterling - -# 0xC0 - - 0xc0 # /Agrave - 0xc1 # /Aacute - 0xc2 # /Acircumflex - 0xc3 # /Atilde - - 0xc4 # /Adieresis - 0xc5 # /Aring - 0xc6 # /AE - 0xc7 # /Ccedilla - - 0xc8 # /Egrave - 0xc9 # /Eacute - 0xca # /Ecircumflex - 0xcb # /Edieresis - - 0xcc # /Igrave - 0xcd # /Iacute - 0xce # /Icircumflex - 0xcf # /Idieresis - -# 0xD0 - - 0xd0 # /Eth - 0xd1 # /Ntilde - 0xd2 # /Ograve - 0xd3 # /Oacute - - 0xd4 # /Ocircumflex - 0xd5 # /Otilde - 0xd6 # /Odieresis -0x01: - 0x52 # /OE - -0x00: - 0xd8 # /Oslash - 0xd9 # /Ugrave - 0xda # /Uacute - 0xdb # /Ucircumflex - - 0xdc # /Udieresis - 0xdd # /Yacute - 0xde # /Thorn -0xff: - 0xfe # /Germandbls - -# 0xE0 - -0x00: - 0xe0 # /agrave - 0xe1 # /aacute - 0xe2 # /acircumflex - 0xe3 # /atilde - - 0xe4 # /adieresis - 0xe5 # /aring - 0xe6 # /ae - 0xe7 # /ccedilla - - 0xe8 # /egrave - 0xe9 # /eacute - 0xea # /ecircumflex - 0xeb # /edieresis - - 0xec # /igrave - 0xed # /iacute - 0xee # /icircumflex - 0xef # /idieresis - -# 0xF0 - - 0xf0 # /eth - 0xf1 # /ntilde - 0xf2 # /ograve - 0xf3 # /oacute - - 0xf4 # /ocircumflex - 0xf5 # /otilde - 0xf6 # /odieresis -0x01: - 0x53 # /oe - -0x00: - 0xf8 # /oslash - 0xf9 # /ugrave - 0xfa # /uacute - 0xfb # /ucircumflex - - 0xfc # /udieresis - 0xfd # /yacute - 0xfe # /thorn - 0xdf # /germandbls - -#eof Index: xc/extras/FreeType/contrib/ttf2pfb/configure diff -u xc/extras/FreeType/contrib/ttf2pfb/configure:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/configure:removed --- xc/extras/FreeType/contrib/ttf2pfb/configure:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/configure Wed Mar 16 20:59:29 2005 @@ -1,1553 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=../../lib/freetype.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:573: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:594: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:612: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:638: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:719: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 762 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:798: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:826: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:858: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - -CFLAGS="-g -O -DDEBUG" -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:943: checking for TT_Init_FreeType in -lttf" >&5 -ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lttf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lttf" -else - echo "$ac_t""no" 1>&6 - - { echo "configure: error: Can't find ttf library! Compile FreeType first." 1>&2; exit 1; } -fi - -LIBS=$OLDLIBS - - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -ansi -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi - - -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1004: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RM"; then - ac_cv_prog_RM="$RM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RM="rm" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RM="$ac_cv_prog_RM" -if test -n "$RM"; then - echo "$ac_t""$RM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1042: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1096: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:1109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 -if test $ac_cv_struct_tm = sys/time.h; then - cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF - -fi - - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1131: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1238: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@XX_CFLAGS@%$XX_CFLAGS%g -s%@RM@%$RM%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - Index: xc/extras/FreeType/contrib/ttf2pfb/configure.in diff -u xc/extras/FreeType/contrib/ttf2pfb/configure.in:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/configure.in:removed --- xc/extras/FreeType/contrib/ttf2pfb/configure.in:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/configure.in Wed Mar 16 20:59:29 2005 @@ -1,45 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(../../lib/freetype.h) - -AC_CANONICAL_SYSTEM - -AC_PROG_CC -AC_PROG_CPP - -CFLAGS="-g -O -DDEBUG" -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[ - AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])]) -LIBS=$OLDLIBS - -dnl get Compiler flags right. - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -ansi -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi -AC_SUBST(XX_CFLAGS) - -AC_CHECK_PROG(RM, rm, rm) -AC_PROG_INSTALL - -AC_STRUCT_TM - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) - -AC_OUTPUT(Makefile) - -dnl end of configure.in Index: xc/extras/FreeType/contrib/ttf2pfb/getafm diff -u xc/extras/FreeType/contrib/ttf2pfb/getafm:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/getafm:removed --- xc/extras/FreeType/contrib/ttf2pfb/getafm:1.1.1.1 Sat Feb 12 23:54:56 2000 +++ xc/extras/FreeType/contrib/ttf2pfb/getafm Wed Mar 16 20:59:29 2005 @@ -1,364 +0,0 @@ -#!/bin/sh - -if [ $# -ne 1 ]; then - echo "usage: $0 font-name | gsnd -q - >font-name.afm" >&2 - exit 1 -fi - -cat << EOF -%! -% produce .afm for $1 -% (c) 1993 by Robert Joop -% inspired by two other versions of this theme which are -% getafm 1.00 (c) AJCD -% and getafm.ps by an unknown author, -% modified by J. Daniel Smith -% -% modified by Joachim H. Kaiser : -% - suggest a quiet gs run in usage -% - get font version info (from 'version', not 'Version') -% - add copyright field to output - -% Metrics dictionary code added by AJCD, 7/6/93 - -/getafmdict 100 dict dup begin - - /buf 256 string def - /buf2 16 string def - - /prany % dict dictname printname -> dict - { - 2 index 2 index cvn known - { - print % printname - ( ) print - 1 index exch cvn get = - } - { - (Comment /FontInfo contains no /) print - 2 copy eq - { - = % printname - pop % dictname - } - { - exch - print % dictname - (, therefore no ) print - = % printname - } - ifelse - } - ifelse - } - bind def - - /printfontname - { - (FontName)dup prany - } - bind def - - /printfontinfo - { - dup /FontInfo known - { - dup /FontInfo get - (FullName)dup prany - (FamilyName)dup prany - (Weight)dup prany - (ItalicAngle)dup prany - (isFixedPitch)(IsFixedPitch) prany - (UnderlinePosition)dup prany - (UnderlineThickness)dup prany - (version)(Version) prany - (Notice)dup prany - (Copyright)dup prany - pop - } - { - (Comment Font lacks a /FontInfo!)= - } - ifelse - } - bind def - - /prbbox % llx lly urx ury -> - - { - 4 1 roll 3 1 roll exch % swap top 4 elements - 4 { ( ) print buf cvs print } repeat - } - bind def - - /getbbox % fontdict chardict character -> fontdict chardict llx lly urx ury - { - gsave - 2 index setfont 0 0 moveto - false charpath flattenpath pathbbox - grestore - } - bind def - - /printmiscinfo - { - dup /FontBBox known - { - (FontBBox) print - dup /FontBBox get aload pop prbbox ()= - } - { - (Comment missing required /FontBBox)= - quit - } - ifelse - 2 copy exch get - dup /H known - 1 index /x known and - 1 index /d known and - 1 index /p known and - dup /looksRoman exch def - { - (CapHeight ) print - (H) getbbox - ceiling cvi = pop pop pop - (XHeight ) print - (x) getbbox - ceiling cvi = pop pop pop - (Ascender ) print - (d) getbbox - ceiling cvi = pop pop pop - (Descender ) print - (p) getbbox - pop pop floor cvi = pop - } - { - (Comment font doesn't contain H, x, d and p; therefore no CapHeight, XHeight, Ascender and Descender)= - } - ifelse - pop - dup /Encoding get - [ - [ (ISOLatin1Encoding) /ISOLatin1Encoding ] - [ (AdobeStandardEncoding) /StandardEncoding ] - ] - { - aload pop dup where - { - exch get 2 index eq - { - (EncodingScheme ) print - buf cvs = - } - { - pop - } - ifelse - } - { - pop pop - } - ifelse - } - forall - pop - } - bind def - - /printcharmetric - { - % chardictname fontdict charnamedict encoding charindex charname - - 4 index dup length dict dup begin exch - { - 1 index /FID ne - 2 index /UniqueID ne - and - { - 1 index /Encoding eq { 256 array copy } if - def - } - { pop pop } - ifelse - } - forall - end - dup /Encoding get 32 3 index put - /f2 exch definefont - setfont - - (C ) print - 1 index buf cvs print - - ( ; WX ) print -% Metrics entries are: -% 1 number: which is the character width -% an array of 2 numbers: which are the left sidebearing and width -% an array of 4 numbers: x & y left sidebearing, width and height - dup 5 index % /charname fontdict - dup /Metrics known { - /Metrics get exch 2 copy known { - get dup type /arraytype eq { - dup length 2 eq - {1 get} {2 get} ifelse - } if - round cvi buf cvs print - } { - pop pop ( ) stringwidth pop round cvi buf cvs print - } ifelse - } { - pop pop ( ) stringwidth pop round cvi buf cvs print - } ifelse - - ( ; N ) print - dup buf cvs print - - ( ; B) print - gsave - newpath 0 0 moveto - ( ) true charpath flattenpath pathbbox - grestore - 2 { ceiling cvi 4 1 roll } repeat - 2 { floor cvi 4 1 roll } repeat - prbbox - - looksRoman - { - [ - [ /f [ /i /f /l ] ] - [ /ff [ /i /l ] ] - ] - { - aload pop 1 index 3 index eq - { - { - 1 index buf cvs - length - 1 index buf2 cvs dup length - 2 index add - buf - 4 2 roll putinterval - buf 0 - 3 -1 roll getinterval - dup cvn - 7 index - exch known - { - exch - ( ; L ) print - buf2 cvs print - ( ) print - print - } - { - pop pop - } - ifelse - } - forall - pop - } - { - pop pop - } - ifelse - } - forall - } - if - pop - - ( ;)= - } - bind def - - /printcharmetrics - { - (StartCharMetrics ) print - 2 copy exch get length 1 sub buf cvs = - - 256 dict dup begin - 1 index /Encoding get - { null def } - forall - end - % chardictname fontdict charnamedict - 1 index /Encoding get - 0 1 255 - { - % encoding index - 2 copy get - dup /.notdef eq { pop } { printcharmetric } ifelse - pop % index - } for - - -1 - 3 index 5 index get - { - pop - dup /.notdef eq - { pop } - { - % chardictname fontdict charnamedict encoding charindex charname - dup 4 index exch known - { pop } - { printcharmetric } - ifelse - } - ifelse - } - forall - % charnamedict encoding index - pop pop pop - - (EndCharMetrics)= - } - bind def - - /printfontmetrics - { - (StartFontMetrics 3.0)= - (Comment Produced by getafm 3.0 (which is by rj@rainbow.in-berlin.de))= - - printfontname - printfontinfo - printmiscinfo - printcharmetrics - - (EndFontMetrics)= - } - bind def - -end def - -/getafm -{ - getafmdict begin - save exch - findfont 1000 scalefont - - null - [ /CharDefs /CharData /CharProcs /CharStrings ] - { - 2 index 1 index known { exch } if - pop - } - forall - dup null eq - { - (can't find dictionary with character data!)= - quit - } - if - exch % dictname fontdict - - printfontmetrics - - pop pop - restore - end -} -bind def - -/$1 getafm - -EOF Index: xc/extras/FreeType/contrib/ttf2pfb/t1asm.c diff -u xc/extras/FreeType/contrib/ttf2pfb/t1asm.c:1.1.1.1 xc/extras/FreeType/contrib/ttf2pfb/t1asm.c:removed --- xc/extras/FreeType/contrib/ttf2pfb/t1asm.c:1.1.1.1 Sat Jan 23 22:21:52 1999 +++ xc/extras/FreeType/contrib/ttf2pfb/t1asm.c Wed Mar 16 20:59:29 2005 @@ -1,529 +0,0 @@ -/* t1asm -** -** This program `assembles' Adobe Type-1 font programs in pseudo-PostScript -** form into either PFB or PFA format. The human readable/editable input is -** charstring- and eexec-encrypted as specified in the `Adobe Type 1 Font -** Format' version 1.1 (the `black book'). There is a companion program, -** t1disasm, which `disassembles' PFB and PFA files into a pseudo-PostScript -** file. -** -** Copyright (c) 1992 by I. Lee Hetherington, all rights reserved. -** -** Permission is hereby granted to use, modify, and distribute this program -** for any purpose provided this copyright notice and the one below remain -** intact. -** -** author: I. Lee Hetherington (ilh@lcs.mit.edu) -*/ - -#ifndef lint -static char sccsid[] = - "@(#) t1asm.c 1.2 10:09:46 5/22/92"; -static char copyright[] = - "@(#) Copyright (c) 1992 by I. Lee Hetherington, all rights reserved."; -#endif - -/* Note: this is ANSI C. */ - -#include -#include -#include -#include - -#ifdef MSDOS -#define WB "wb" -#else -#define WB "w" -#endif - -#define BANNER "This is t1asm 1.2.\n" -#define LINESIZE 256 - -#define MAXBLOCKLEN ((1<<17)-6) -#define MINBLOCKLEN ((1<<8)-6) - -#define MARKER 128 -#define ASCII 1 -#define BINARY 2 -#define DONE 3 - -typedef unsigned char byte; - -static FILE *ifp = stdin; -static FILE *ofp = stdout; - -/* flags */ -static int pfb = 0; -static int active = 0; -static int start_charstring = 0; -static int in_eexec = 0; - -static char line[LINESIZE + 1]; - -/* lenIV and charstring start command */ -static int lenIV = 4; -static char cs_start[10]; - -/* for charstring buffering */ -static byte charstring_buf[65535]; -static byte *charstring_bp; - -/* for PFB block buffering */ -static byte blockbuf[MAXBLOCKLEN]; -static int blocklen = MAXBLOCKLEN; -static int blockpos = -1; -static int blocktyp = ASCII; - -/* decryption stuff */ -static unsigned short er, cr; -static unsigned short c1 = 52845, c2 = 22719; - -/* table of charstring commands */ -static struct command { - char *name; - int one, two; -} command_table[] = { - { "callothersubr", 12, 16 }, - { "callsubr", 10, -1 }, - { "closepath", 9, -1 }, - { "div", 12, 12 }, - { "dotsection", 12, 0 }, - { "endchar", 14, -1 }, - { "escape", 12, -1 }, - { "hlineto", 6, -1 }, - { "hmoveto", 22, -1 }, - { "hsbw", 13, -1 }, - { "hstem", 1, -1 }, - { "hstem3", 12, 2 }, - { "hvcurveto", 31, -1 }, - { "pop", 12, 17 }, - { "return", 11, -1 }, - { "rlineto", 5, -1 }, - { "rmoveto", 21, -1 }, - { "rrcurveto", 8, -1 }, - { "sbw", 12, 7 }, - { "seac", 12, 6 }, - { "setcurrentpoint", 12, 33 }, - { "vhcurveto", 30, -1 }, - { "vlineto", 7, -1 }, - { "vmoveto", 4, -1 }, - { "vstem", 3, -1 }, - { "vstem3", 12, 1 }, -}; /* alphabetical */ - -/* Two separate decryption functions because eexec and charstring decryption - must proceed in parallel. */ - -static byte eencrypt(byte plain) -{ - byte cipher; - - cipher = (plain ^ (er >> 8)); - er = (cipher + er) * c1 + c2; - return cipher; -} - -static byte cencrypt(byte plain) -{ - byte cipher; - - cipher = (plain ^ (cr >> 8)); - cr = (cipher + cr) * c1 + c2; - return cipher; -} - -/* This function flushes a buffered PFB block. */ - -static void output_block() -{ - int i; - - /* output four-byte block length */ - fputc(blockpos & 0xff, ofp); - fputc((blockpos >> 8) & 0xff, ofp); - fputc((blockpos >> 16) & 0xff, ofp); - fputc((blockpos >> 24) & 0xff, ofp); - - /* output block data */ - for (i = 0; i < blockpos; i++) - fputc(blockbuf[i], ofp); - - /* mark block buffer empty and uninitialized */ - blockpos = -1; -} - -/* This function outputs a single byte. If output is in PFB format then output - is buffered through blockbuf[]. If output is in PFA format, then output - will be hexadecimal if in_eexec is set, ASCII otherwise. */ - -static void output_byte(byte b) -{ - static char *hexchar = "0123456789ABCDEF"; - static int hexcol = 0; - - if (pfb) { - /* PFB */ - if (blockpos < 0) { - fputc(MARKER, ofp); - fputc(blocktyp, ofp); - blockpos = 0; - } - blockbuf[blockpos++] = b; - if (blockpos == blocklen) - output_block(); - } else { - /* PFA */ - if (in_eexec) { - /* trim hexadecimal lines to 64 columns */ - if (hexcol >= 64) { - fputc('\n', ofp); - hexcol = 0; - } - fputc(hexchar[(b >> 4) & 0xf], ofp); - fputc(hexchar[b & 0xf], ofp); - hexcol += 2; - } else { - fputc(b, ofp); - } - } -} - -/* This function outputs a byte through possible eexec encryption. */ - -static void eexec_byte(byte b) -{ - if (in_eexec) - output_byte(eencrypt(b)); - else - output_byte(b); -} - -/* This function outputs a null-terminated string through possible eexec - encryption. */ - -static void eexec_string(char *string) -{ - while (*string) - eexec_byte((byte) *string++); -} - -/* This function gets ready for the eexec-encrypted data. If output is in - PFB format then flush current ASCII block and get ready for binary block. - We start encryption with four random (zero) bytes. */ - -static void eexec_start() -{ - eexec_string(line); - if (pfb) { - output_block(); - blocktyp = BINARY; - } - - in_eexec = 1; - er = 55665; - eexec_byte(0); - eexec_byte(0); - eexec_byte(0); - eexec_byte(0); -} - -/* This function wraps-up the eexec-encrypted data and writes ASCII trailer. - If output is in PFB format then this entails flushing binary block and - starting an ASCII block. */ - -static void eexec_end() -{ - int i, j; - - if (pfb) { - output_block(); - blocktyp = ASCII; - } else { - fputc('\n', ofp); - } - in_eexec = 0; - for (i = 0; i < 7; i++) { - for (j = 0; j < 64; j++) - eexec_byte('0'); - eexec_byte('\n'); - } - eexec_string("cleartomark\n"); - if (pfb) { - output_block(); - fputc(MARKER, ofp); - fputc(DONE, ofp); - } -} - -/* This function returns an input line of characters. A line is terminated by - length (including terminating null) greater than LINESIZE, a newline \n, or - when active (looking for charstrings) by '{'. When terminated by a newline - the newline is put into line[]. When terminated by '{', the '{' is not put - into line[], and the flag start_charstring is set to 1. */ - -static void getline() -{ - int c; - char *p = line; - int comment = 0; - - start_charstring = 0; - while (p < line + LINESIZE) { - c = fgetc(ifp); - if (c == EOF) - break; - if (c == '%') - comment = 1; - if (active && !comment && c == '{') { - start_charstring = 1; - break; - } - *p++ = (char) c; - if (c == '\n') - break; - } - *p = '\0'; -} - -/* This function is used by the binary search, bsearch(), for command names in - the command table. */ - -static int command_compare(const void *key, const void *item) -{ - return strcmp((char *) key, ((struct command *) item)->name); -} - -/* This function returns 1 if the string is an integer and 0 otherwise. */ - -static int is_integer(char *string) -{ - if (isdigit(string[0]) || string[0] == '-' || string[0] == '+') { - while (*++string && isdigit(*string)) - ; /* deliberately empty */ - if (!*string) - return 1; - } - return 0; -} - -/* This function initializes charstring encryption. Note that this is called - at the beginning of every charstring. */ - -static void charstring_start() -{ - int i; - - charstring_bp = charstring_buf; - cr = 4330; - for (i = 0; i < lenIV; i++) - *charstring_bp++ = cencrypt((byte) 0); -} - -/* This function encrypts and buffers a single byte of charstring data. */ - -static void charstring_byte(v) - int v; -{ - byte b = ((unsigned int)v) & 0xff; - - if (charstring_bp - charstring_buf > sizeof(charstring_buf)) { - fprintf(stderr, "error: charstring_buf full (%d bytes)\n", - sizeof(charstring_buf)); - exit(1); - } - *charstring_bp++ = cencrypt(b); -} - -/* This function outputs buffered, encrypted charstring data through possible - eexec encryption. */ - -static void charstring_end() -{ - byte *bp; - - sprintf(line, "%d %s ", charstring_bp - charstring_buf, cs_start); - eexec_string(line); - for (bp = charstring_buf; bp < charstring_bp; bp++) - eexec_byte(*bp); -} - -/* This function generates the charstring representation of an integer. */ - -static void charstring_int(int num) -{ - int x; - - if (num >= -107 && num <= 107) { - charstring_byte(num + 139); - } else if (num >= 108 && num <= 1131) { - x = num - 108; - charstring_byte(x / 256 + 247); - charstring_byte(x % 256); - } else if (num >= -1131 && num <= -108) { - x = abs(num) - 108; - charstring_byte(x / 256 + 251); - charstring_byte(x % 256); - } else if (num >= (-2147483647-1) && num <= 2147483647) { - charstring_byte(255); - charstring_byte(num >> 24); - charstring_byte(num >> 16); - charstring_byte(num >> 8); - charstring_byte(num); - } else { - fprintf(stderr, - "error: cannot format the integer %d, too large\n", num); - exit(1); - } -} - -/* This function parses an entire charstring into integers and commands, - outputting bytes through the charstring buffer. */ - -static void parse_charstring() -{ - struct command *cp; - - charstring_start(); - while (fscanf(ifp, "%s", line) == 1) { - if (line[0] == '%') { - /* eat comment to end of line */ - while (fgetc(ifp) != '\n' && !feof(ifp)) - ; /* deliberately empty */ - continue; - } - if (line[0] == '}') - break; - if (is_integer(line)) { - charstring_int(atoi(line)); - } else { - cp = (struct command *) - bsearch((void *) line, (void *) command_table, - sizeof(command_table) / sizeof(struct command), - sizeof(struct command), - command_compare); - if (cp) { - charstring_byte(cp->one); - if (cp->two >= 0) - charstring_byte(cp->two); - } else { - fprintf(stderr, "error: cannot use `%s' in charstring\n", cp->name); - exit(1); - } - } - } - charstring_end(); -} - -static void usage() -{ - fprintf(stderr, - "usage: t1asm [-b] [-l block-length] [input [output]]\n"); - fprintf(stderr, - "\n-b means output in PFB format, otherwise PFA format.\n"); - fprintf(stderr, - "The block length applies to the length of blocks in the\n"); - fprintf(stderr, - "PFB output file; the default is to use the largest possible.\n"); - exit(1); -} - - -int main(int argc, char **argv) -{ - char *p, *q, *r; - int c; - - extern char *optarg; - extern int optind; - extern int getopt(int argc, char **argv, char *optstring); - - fprintf(stderr, "%s", BANNER); - - /* interpret command line arguments using getopt */ - while ((c = getopt(argc, argv, "bl:")) != -1) - switch (c) { - case 'b': - pfb = 1; - break; - case 'l': - blocklen = atoi(optarg); - if (blocklen < MINBLOCKLEN) { - blocklen = MINBLOCKLEN; - fprintf(stderr, - "warning: using minimum block length of %d\n", - blocklen); - } else if (blocklen > MAXBLOCKLEN) { - blocklen = MAXBLOCKLEN; - fprintf(stderr, - "warning: using maximum block length of %d\n", - blocklen); - } - break; - default: - usage(); - break; - } - if (argc - optind > 2) - usage(); - - /* possibly open input & output files */ - if (argc - optind >= 1) { - ifp = fopen(argv[optind], "r"); - if (!ifp) { - fprintf(stderr, "error: cannot open %s for reading\n", argv[1]); - exit(1); - } - } - if (argc - optind >= 2) { - ofp = fopen(argv[optind + 1], WB); - if (!ofp) { - fprintf(stderr, "error: cannot open %s for writing\n", argv[2]); - exit(1); - } - } - - /* Finally, we loop until no more input. Some special things to look for - are the `currentfile eexec' line, the beginning of the `/Subrs' - definition, the definition of `/lenIV', and the definition of the - charstring start command which has `...string currentfile...' in it. */ - - while (!feof(ifp) && !ferror(ifp)) { - getline(); - if (strcmp(line, "currentfile eexec\n") == 0) { - eexec_start(); - continue; - } else if (strstr(line, "/Subrs") && isspace(line[6])) { - active = 1; - } else if ((p = strstr(line, "/lenIV"))) { - sscanf(p, "%*s %d", &lenIV); - } else if ((p = strstr(line, "string currentfile"))) { - /* locate the name of the charstring start command */ - *p = '\0'; /* damage line[] */ - q = strrchr(line, '/'); - if (q) { - r = cs_start; - ++q; - while (!isspace(*q) && *q != '{') - *r++ = *q++; - *r = '\0'; - } - *p = 's'; /* repair line[] */ - } - /* output line data */ - eexec_string(line); - if (start_charstring) { - if (!cs_start[0]) { - fprintf(stderr, "error: couldn't find charstring start command\n"); - exit(1); - } - parse_charstring(); - } - } - eexec_end(); - - fclose(ifp); - fclose(ofp); - - return 0; -} - Index: xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c diff -u xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c:1.3 xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c:removed --- xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c:1.3 Tue Oct 21 14:10:08 2003 +++ xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c Wed Mar 16 20:59:29 2005 @@ -1,1726 +0,0 @@ -/* - * ttf2pfb.c -- TrueType to PostScript Type 1 Font converter. - * - * Author: Chun-Yu Lee - * Maintainer: Werner Lemberg - * - * The generated output is in a raw Type 1 Font format. An encoder - * (e.g. t1asm or t1binary) is needed to convert it into PFA or PFB format. - * - * This program was adapted from the ntu2cjk package (which was part of the - * LaTeX2e CJK package (by Werner Lemberg )). - * - * - * Modified by Joachim H. Kaiser to include real glyph - * names and other font infos (see PS_Head function). - * The test programs of the FreeType distribution have been heavily used as - * templates. - * - */ -/* $XFree86: xc/extras/FreeType/contrib/ttf2pfb/ttf2pfb.c,v 1.3 2003/10/21 18:10:08 tsi Exp $ */ - -/* - * Requirements: - * - the FreeType library. - * - t1asm or a similar converter if PFA or PFB format is required. - * - getafm or a similar program if AFM font metrics are required. - * - afm2tfm or a similar program if TFM font metrics are required. - * - for compact fonts: the CJK package for typesetting LaTeX documents. - * - dvips 5.66 or higher if self-contained PostScript document - * outputs with partially downloaded fonts are required. Note that - * the partial download code in dvips is still buggy, causing strange - * error messages during loading of the created PS fonts. - * - Ghostscript 3.33 or newer (this is optional). - */ - -#include -#include -#include -#include -#include -#include -#ifdef TM_IN_SYS_TIME -#include -#endif -#include - -#include "freetype.h" -#include "extend/ftxpost.h" /* we are in the FreeType package tree */ - -char rcsid[] = "Id: ttf2pfb.c,v 1.13 1999/08/20 13:14:26 werner Exp $"; - - -#define PID_UNICODE 3 -#define EID_UNICODE 1 -#define PID_SJIS 3 -#define EID_SJIS 2 -#define PID_GB 3 -#define EID_GB 3 -#define PID_BIG5 3 -#define EID_BIG5 4 -#define PID_KS 3 /* KS is also called Wansung */ -#define EID_KS 5 -#define PID_JOHAB 3 -#define EID_JOHAB 6 - -/* Set default values */ -#ifndef DEFAULT_PLATFORM_ID -#define DEFAULT_PLATFORM_ID PID_UNICODE /* MS platform */ -#endif - -#ifndef DEFAULT_ENCODING_ID -#define DEFAULT_ENCODING_ID EID_UNICODE -#endif - -/* The possible values for the `force_enc' variable. */ -typedef enum enc_type_ -{ - GB = 1, Big5, JIS, KS, Johab, SJIS, X -} enc_type; - -/* A variable to enforce a certain font encoding (if > 0). */ -enc_type force_enc = 0; - - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef FAILURE -#define FAILURE -1 -#endif - - -#define LINELEN 40 /* max # of columns of code range file */ -#define NAMELEN 80 /* max length of name used from LookUp */ - - -/* - * Flags and globals - */ - -int verbose = FALSE; /* messages should be printed or not. */ -int compact = FALSE; /* generate compact font? */ -int keep = FALSE; /* keep output font in case of error? */ -int mapping = FALSE; /* use encoding file as mapping? */ -float fontShift = 0; - -#ifndef UShort -typedef unsigned short UShort; -#endif -#ifndef UChar -typedef unsigned char UChar; -#endif - -#define TT_Flag_On_Curve 1 - -/* default platform and encoding ID's. */ -int pid = DEFAULT_PLATFORM_ID; -int eid = DEFAULT_ENCODING_ID; - - -char* prog; /* program name */ - - -/* for orthogonality with fprintf */ -#define Fputs(_string_) fprintf(out, "%s\n", _string_) - - -/* Postscript font related defines and functions */ -TT_F26Dot6 lastpsx, lastpsy; - -#define Coord(x) (int)(x) -#define PS_LastPt(x, y) lastpsx = x; lastpsy = y -#define PS_Moveto(x, y) \ - fprintf(out, "%d %d rmoveto\n", \ - Coord(x - lastpsx), Coord(y - lastpsy)); \ - PS_LastPt(x, y) -#define PS_Lineto(x, y) \ - fprintf(out, "%d %d rlineto\n", \ - Coord(x - lastpsx), Coord(y - lastpsy)); \ - PS_LastPt(x, y) - - -/* - * Freetype globals. - */ - -TT_Engine engine; -TT_Face face; -TT_Instance instance; -TT_Glyph glyph; -TT_CharMap cmap; -TT_Error error; -TT_Post post; - -TT_Outline outline; -TT_Glyph_Metrics metrics; -TT_Face_Properties properties; - - -/* - * Data structures defined for encoding vectors - */ - -/* - * A code range file for the encoding vector of a font contains code - * range pairs, each pair a line. The values for the begin and end of the - * ranges are separated by ` - '. Note that the spaces before and after the - * minus sign are significant. The possible syntax is as follows: - * - * (Note that code ranges must appear in ascending order.) - * - * 1. Absolute range, i.e., the code is at least a two-byte number, e.g.: - * - * 0xA140 - 0xA17E - * 41280 - 41342 - * 0xE00000 - 0xE000FF - * - * The first two lines represent the same range. - * - * 2. Relative range, i.e., the code is a one-byte number. If the line ends - * with a colon `:', it designates the high byte(s) range, otherwise the - * low byte range. If there is no high byte(s) range declared before the low - * byte range, the last defined high byte(s) range or `0x00 - 0x00:' will be - * used. e.g.: - * - * 0xA1 - 0xFE: - * 0x40 - 0x7E - * 0xA1 - 0xFE - * - * which is Big-5 Encoding. - * - * 3. Single code. Similar to absolute or relative range but the second - * number of the range is the same as the first number. E.g.: - * - * 0xA141 == 0xA141 - 0xA141 - * 0xA1: == 0xA1 - 0xA1: - * 0xA1 == 0xA1 - 0xA1 - * - * 4. If the high byte range is declared and there is no low byte range - * declared consecutively, the assumed low byte range is `0x00 - 0xFF'. - * - * 5. Comment line. A line starting with a hash mark `#' followed by any - * characters up to the end of the line is ignored. Blank lines are also - * discarded. - */ - -typedef struct _EVHigh -{ - UShort start, end; -} EVHigh; - -typedef struct _EVLow -{ - UChar start, end; -} EVLow; - -typedef struct _EVcRange -{ - EVHigh high; - UShort numLowRanges; - EVLow* low; -} EVcRange; - -typedef struct _EncVec -{ - UShort numCodeRanges; - EVcRange* codeRange; -} EncVec; - -/* Select encoding vector with respect to pid and eid */ -EncVec* eVecMap[5][10]; - -/* Select encoding vector with respect to force_enc */ -EncVec* eVecMap_force[10]; - - -/*************/ -/* Functions */ -/*************/ - - -void -mesg(const char *msg, ...) -{ - va_list ap; - - va_start(ap, msg); - vfprintf(stderr, msg, ap); - va_end(ap); -} - - -/* - * Usage. - */ - -void -Usage(int eval) -{ -#ifdef DEBUG - mesg("Usage: %s [-h][-v][-c][-k][-m][-d charcode][-l][-ng][-nc]\n", prog); -#else - mesg("Usage: %s [-h][-v][-c][-k][-m]\n", prog); -#endif - mesg("\t[-pid id] [-eid id] [-force enc] [-enc file]\n"); - mesg("\t[-plane pl] [-f fname] [-uid id] [-s shift]\n"); - mesg("\t[-o output] [-ttf font.ttf | font.ttf]\n"); - mesg("-h\t\tThis message.\n"); - mesg("-v\t\tPrint messages during conversion.\n"); - mesg("-c\t\tCompact font"); - mesg(" (256 chars per font; useful for the CJK package).\n"); - mesg("-k\t\tKeep output file in case of error.\n"); - mesg("-m\t\tUse encoding file as mapping file.\n"); -#ifdef DEBUG - mesg("-d charcode\tDebug CharString for the given character code.\n"); - mesg("-l\t\tDisplay point labels.\n"); - mesg("-ng\t\tDo not show glyph outline.\n"); - mesg("-nc\t\tDo not show control paths.\n"); -#endif - mesg("-pid id\t\tSet the platform ID [%d].\n", DEFAULT_PLATFORM_ID); - mesg("-eid id\t\tSet the encoding ID [%d].\n", DEFAULT_ENCODING_ID); - mesg("\t\t(Use a strange pid,eid pair to list all possible pid,eid)\n"); - mesg("-force enc\tForce a certain encoding [none].\n"); - mesg("\t\t(Possible values are `GB', `JIS', `KS', `SJIS', and `X').\n"); - mesg("-enc file\tFile contains code ranges [none].\n"); - mesg("-plane pl\tA single font plane [0x0].\n"); - mesg("-f fname\tFont name [UNKNOWN].\n"); - mesg("-uid id\t\tUnique font ID, for private fonts 4000000-4999999 [4999999].\n"); - mesg("-s shift\tY-offset factor [%5.3f].\n", fontShift); - mesg("-o outfile\tSet the output filename [stdout].\n"); - mesg("-ttf ttfpath\tThe TTF font pathname.\n"); - - exit(eval); -} - - -void -fatal(const char *msg, - ...) -{ - va_list ap; - - va_start(ap, msg); - fprintf(stderr, "%s: ", prog); - vfprintf(stderr, msg, ap); - fprintf(stderr, "\n"); - va_end(ap); - exit(FAILURE); -} - - -void -fatal_error(const char *msg, - ...) -{ - va_list ap; - - va_start(ap, msg); - fprintf(stderr, "%s: Error code 0x%04lx: ", prog, error); - vfprintf(stderr, msg, ap); - fprintf(stderr, "\n"); - va_end(ap); - exit(FAILURE); -} - - -/* - * Reallocate a pointer. - */ - -void * -re_alloc(void* ptr, - size_t size, - char* sub) -{ - register void* value = realloc(ptr, size); - - if (value == NULL) - fatal("%s: Virtual memory exhausted", sub); - return value; -} - - -/* - * We have to introduce the `dummy' integer to assure correct handling of - * the stack. Using `UShort' as the first parameter may fail in case - * this type is promoted to a different type (as happens e.g. under - * emx for DOS). - */ - -EncVec* -Alloc_EncVec(int dummy, - ...) -{ - va_list vp; - EncVec* encVec = NULL; - EVcRange* cRange = NULL; - EVLow* evLow = NULL; - UShort numCR, numLows; - int i, j; - - va_start(vp, dummy); - numCR = va_arg(vp, UShort); - - encVec = re_alloc(encVec, 1 * sizeof (EncVec), "Alloc_EncVec"); - encVec->numCodeRanges = numCR; - - cRange = re_alloc(cRange, numCR * sizeof (EVcRange), "Alloc_EncVec"); - for (i = 0; i < numCR; i++) - { - (cRange + i)->high.start = va_arg(vp, UShort); - (cRange + i)->high.end = va_arg(vp, UShort); - (cRange + i)->numLowRanges = numLows = va_arg(vp, UShort); - evLow = NULL; - evLow = re_alloc(evLow, numLows * sizeof (EVLow), "Alloc_EncVec"); - for (j = 0; j < numLows; j++) - { - (evLow + j)->start = va_arg(vp, UChar); - (evLow + j)->end = va_arg(vp, UChar); - } - (cRange + i)->low = evLow; - } - encVec->codeRange = cRange; - - va_end(vp); - return encVec; -} - - -void -Known_Encodings(void) -{ - EncVec* encVec; - - /* Big-5 encoding */ - encVec = Alloc_EncVec(1, - 1, 0xA1, 0xFE, - 2, 0x40, 0x7E, 0xA1, 0xFE); - eVecMap[PID_BIG5][EID_BIG5] = encVec; - eVecMap_force[Big5] = encVec; - - /* GB encoding */ - encVec = Alloc_EncVec(2, - 1, 0xA1, 0xF7, - 1, 0xA1, 0xFE); - eVecMap[PID_GB][EID_GB] = encVec; - eVecMap_force[GB] = encVec; - - /* KS encoding */ - encVec = Alloc_EncVec(3, - 1, 0xA1, 0xFE, - 1, 0xA1, 0xFE); - eVecMap[PID_KS][EID_KS] = encVec; - eVecMap_force[KS] = encVec; - - /* Johab encoding */ - encVec = Alloc_EncVec(4, - 3, 0x84, 0xD3, - 2, 0x41, 0x7E, - 0x81, 0xFE, - 0xD8, 0xDE, - 2, 0x31, 0x7E, - 0x91, 0xFE, - 0xE0, 0xF9, - 2, 0x31, 0x7E, - 0x91, 0xFE); - eVecMap[PID_JOHAB][EID_JOHAB] = encVec; - eVecMap_force[Johab] = encVec; - - /* JIS encoding */ - encVec = Alloc_EncVec(5, - 1, 0xA1, 0xF4, - 1, 0xA1, 0xFE); - eVecMap_force[JIS] = encVec; - eVecMap_force[X] = encVec; /* will be internally translated to SJIS */ - - /* Unicode encoding */ - encVec = Alloc_EncVec(6, - 1, 0x00, 0xFF, - 1, 0x00, 0xFF); - eVecMap[PID_UNICODE][EID_UNICODE] = encVec; - - /* SJIS encoding */ - encVec = Alloc_EncVec(7, - 3, 0x0, 0x0, - 1, 0xA1, 0xDF, - 0x81, 0x9F, - 2, 0x40, 0x7E, - 0x80, 0xFC, - 0xE0, 0xEF, - 2, 0x40, 0x7E, - 0x80, 0xFC); - eVecMap[PID_SJIS][EID_SJIS] = encVec; - eVecMap_force[SJIS] = encVec; -} - - -/* - * Convert JIS to SJIS encoding. - */ - -UShort -JIS_to_SJIS(UShort code) -{ - UShort index; - UShort cc0 = (code >> 8) & 0xFF; - UShort cc1 = code & 0xFF; - - index = (cc0 - 0xa1) * (0xfe - 0xa1 + 1) + (cc1 - 0xa1); - cc0 = index / ((0x7e - 0x40 + 1) + (0xfc - 0x80 + 1)); - cc1 = index % ((0x7e - 0x40 + 1) + (0xfc - 0x80 + 1)); - if (cc0 < (0x9f - 0x81 + 1)) - cc0 += 0x81; - else - cc0 += 0xe0 - (0x9f - 0x81 + 1); - if (cc1 < (0x7e - 0x40 + 1)) - cc1 += 0x40; - else - cc1 += 0x80 - (0x7E - 0x40 + 1); - - return (cc0 << 8) + cc1; -} - - -/* - * Open TTF file and select cmap. - */ - -int -Init_Font_Engine(char* infile) -{ - UShort cmapindex, platformID, encodingID, num_cmap; - - if (verbose) - printf("Initializing TrueType font engine...\n"); - - /* initialization of the FreeType engine */ - error = TT_Init_FreeType(&engine); - if (error) - fatal_error("Couldn't initialize FreeType engine"); - - /* initialization of the post extension */ - error = TT_Init_Post_Extension(engine); - if (error) - fatal_error("Couldn't initialize the post extension"); - - /* open the input file */ - error = TT_Open_Face(engine, infile, &face); - if (error) - fatal_error("Unable to open input file `%s'", infile); - - /* load full post table */ - error = TT_Load_PS_Names(face, &post); - if (error) - fatal_error("Unable to load post table"); - - /* get face properties */ - TT_Get_Face_Properties(face, &properties); - - /* Load the instance. */ - error = TT_New_Instance(face, &instance); - if (error) - fatal_error("Couldn't create instance"); - - error = TT_Set_Instance_Resolutions(instance, 600, 600); - if (error) - fatal_error("Error setting resolutions"); - - error = TT_Set_Instance_CharSize(instance, 120 * 64); - if (error) - fatal_error("Error setting character size"); - - error = TT_New_Glyph(face, &glyph); - if (error) - fatal_error("Couldn't create new glyph"); - - /* Get the requested cmap. */ - num_cmap = TT_Get_CharMap_Count(face); - for (cmapindex = 0; cmapindex < num_cmap; cmapindex++) - { - TT_Get_CharMap_ID(face, cmapindex, &platformID, &encodingID); - if (platformID == pid && encodingID == eid) - break; - } - if (cmapindex == num_cmap) - { - mesg("Possible platform and encoding ID pairs:"); - for (cmapindex = 0; cmapindex < num_cmap; cmapindex++) - { - TT_Get_CharMap_ID(face, cmapindex, &platformID, &encodingID); - mesg(" (%d, %d)", platformID, encodingID); - } - mesg ("\n"); - fatal("No character map for given platform %d, encoding %d", pid, eid); - } - - /* malloc for glyph data */ - error = TT_Get_CharMap(face, cmapindex, &cmap); - if (error) - fatal_error("Cannot load cmap"); - - return TRUE; -} - - -/* - * Get font infos: name, version, copyright. - */ - -char* -LookUp_Name(int index) -{ - UShort platform, encoding, language, id; - char* string; - UShort string_len; - UShort i, n; - - n = properties.num_Names; - - for (i = 0; i < n; i++) - { - TT_Get_Name_ID(face, i, &platform, &encoding, &language, &id); - TT_Get_Name_String(face, i, &string, &string_len); - - if (id == index) - break; - } - i = (string_len > NAMELEN) ? NAMELEN : string_len; - string[i] = '\0'; - return string; -} - - -/* - * Load a glyph's outline and metrics. - */ - -int -LoadTrueTypeChar(int idx) -{ - TT_Matrix scale = {(1 << 16) / 64, 0, 0, (1 << 16) / 64}; - - error = TT_Load_Glyph(instance, glyph, idx, TTLOAD_DEFAULT); - if (error) - fatal_error("Load glyph"); - - error = TT_Get_Glyph_Outline(glyph, &outline); - if (error) - fatal_error("Get glyph outlines"); - - TT_Transform_Outline(&outline, &scale); - - error = TT_Get_Glyph_Metrics(glyph, &metrics); - if (error) - fatal_error("Get glyph_metrics"); - - return TRUE; -} - - -/* - * Get PS name of a glyph. - */ - -char* -PS_GlyphName(UShort idx, - UShort code) -{ - char *glyphname = ".notdef"; - static char CJK_glyphname[8]; - - if (compact) - { - sprintf(CJK_glyphname, "cjk%04X", code); - glyphname = CJK_glyphname; - } - else - { - if (idx) - TT_Get_PS_Name(face, idx, &glyphname); - } - - return glyphname; -} - - -/* - * Header of Type 1 font. - */ - -void -PS_Head(FILE *out, - int plane, - EncVec* planeEV, - char* font, - int UID) -{ - EVcRange* cRange = planeEV->codeRange; - UShort numCR = planeEV->numCodeRanges; - int cjk = 0, nGlyph = 0, irange; - EVLow* pLow = cRange->low; - UShort nLow = cRange->numLowRanges; - int ipl, ilow, ich; - int idx; - UShort code; - time_t curtime; - struct tm *loctime; - char text[NAMELEN]; - char fam_name[NAMELEN]; - char* version; - char fullname[NAMELEN]; - char copyright[NAMELEN]; - - /* Get the current time with local representation */ - curtime = time(NULL); - loctime = localtime(&curtime); - - /* Get font infos: family name, version, notice */ - strcpy(fullname, LookUp_Name(6)); - strcpy(fam_name, LookUp_Name(1)); - strcpy(text, LookUp_Name(5)); - version = &text[strcspn(text, "1234567890.")]; - version[strspn(version, "1234567890.")] = '\0'; - strcpy(copyright, LookUp_Name(0)); - - fprintf(out, "%%!FontType1-1.0: %s %s\n", font, version); - fprintf(out, "%%%%Creator: %s, ", prog); - fprintf(out, "%s\n", rcsid); - fprintf(out, "%%%%CreationDate: %s", asctime(loctime)); - - Fputs("%%VMusage: 030000 030000"); - Fputs("11 dict begin"); - Fputs("/FontInfo 8 dict dup begin"); - fprintf(out, "/version (%s) readonly def\n", version); - fprintf(out, "/Copyright (%s) readonly def\n", copyright); - fprintf(out, "/Notice (Plane %d) readonly def\n", plane); - fprintf(out, "/FullName (%s) readonly def\n", fullname); - fprintf(out, "/FamilyName (%s) readonly def\n", fam_name); - Fputs("/Weight (Regular) readonly def"); - Fputs("/ItalicAngle 0 def"); - Fputs("/isFixedPitch false def"); - /* Fputs("/UnderlineThickness 50 def"); */ - Fputs("end readonly def"); - fprintf(out, "/FontName /%s def\n", font); - Fputs("/PaintType 0 def"); - Fputs("/FontType 1 def"); - - if (fontShift == 0) - Fputs("/FontMatrix [0.001 0 0 0.001 0 0] readonly def"); - else - fprintf(out, "/FontMatrix [0.001 0 0 0.001 0 %5.3f] readonly def\n", - fontShift); - - Fputs("/Encoding 256 array"); - Fputs("0 1 255 {1 index exch /.notdef put} for"); - /* encoding vector */ - for (irange = 0; irange < numCR; irange++, cRange++) - { - pLow = cRange->low; - nLow = cRange->numLowRanges; - for (ipl = cRange->high.start; ipl <= cRange->high.end; ipl++) - { - if (nLow == 0) - { - nGlyph = 0x100; - for (ich = 0; ich <= 0xff; ich++) - { - code = ipl<<8 | ich; - idx = TT_Char_Index(cmap, code); - fprintf(out, "dup %d /%s put\n", ich, PS_GlyphName(idx, code)); - } - } - else - { - for (ilow = 0; ilow < nLow; ilow++, pLow++) - { - if (!compact && !mapping) - cjk = pLow->start; - nGlyph += pLow->end - pLow->start + 1; - for (ich = pLow->start; ich <= pLow->end; ich++, cjk++) - { - code = ipl<<8 | ich; - idx = TT_Char_Index(cmap, code); - fprintf(out, "dup %d /%s put\n", cjk, PS_GlyphName(idx, code)); - if (mapping && cjk == 0xFF) - goto done; - } - } - } - } - } - -done: - - Fputs("readonly def"); - Fputs("/FontBBox [0 -300 1000 1000] readonly def"); - fprintf(out, "/UniqueID %d def\n",UID); - Fputs("currentdict end"); - Fputs("currentfile eexec"); - - Fputs("dup /Private 8 dict dup begin"); - Fputs("/-| { string currentfile exch readstring pop } executeonly def"); - Fputs("/|- { noaccess def } executeonly def"); - Fputs("/| { noaccess put } executeonly def"); - Fputs("/BlueValues [ ] |-"); - Fputs("/ForceBold true def"); - Fputs("/LanguageGroup 1 def"); - Fputs("/RndStemUp false def"); - Fputs("/MinFeature{16 16} |-"); - /* Fputs("/password 5839 def"); */ - fprintf(out, "/UniqueID %d def\n",UID); - - Fputs("/Subrs 4 array"); - Fputs("dup 0 { 3 0 callothersubr pop pop setcurrentpoint return } |"); - Fputs("dup 1 { 0 1 callothersubr return } |"); - Fputs("dup 2 { 0 2 callothersubr return } |"); - Fputs("dup 3 { return } |"); - Fputs("|-"); - - fprintf(out, "2 index /CharStrings %d dict dup begin\n", nGlyph + 1); -} - - -/* - * Tail of Type 1 font. - */ - -void -PS_Tail(FILE *out) -{ - Fputs("/.notdef { 0 250 hsbw endchar } |-"); - Fputs("end end readonly put noaccess put"); - Fputs("dup /FontName get exch definefont pop"); - Fputs("mark currentfile closefile"); -} - - -/* - * Use the `rrcurveto' command on more than one `off' points. - */ - -void -PS_Curveto(FILE *out, - TT_F26Dot6 x, - TT_F26Dot6 y, - int s, - int e) -{ - int N, i; - TT_F26Dot6 sx[3], sy[3], cx[4], cy[4]; - - N = e - s + 1; - cx[0] = lastpsx; cy[0] = lastpsy; - if (s == e) - { - cx[1] = (2 * outline.points[s].x + outline.points[s - 1].x) / 3; - cy[1] = (2 * outline.points[s].y + outline.points[s - 1].y) / 3; - cx[2] = (2 * outline.points[s].x + x) / 3; - cy[2] = (2 * outline.points[s].y + y) / 3; - cx[3] = x; - cy[3] = y; - - fprintf(out, "%d %d %d %d %d %d rrcurveto\n", - Coord(cx[1] - cx[0]), Coord(cy[1] - cy[0]), - Coord(cx[2] - cx[1]), Coord(cy[2] - cy[1]), - Coord(cx[3] - cx[2]), Coord(cy[3] - cy[2])); - } - else - { - for(i = 0; i < N; i++) - { - sx[0] = (i == 0) ? - outline.points[s - 1].x : - (outline.points[i + s].x + outline.points[i + s - 1].x) / 2; - sy[0] = (i == 0) ? - outline.points[s - 1].y : - (outline.points[i + s].y + outline.points[i + s - 1].y) / 2; - sx[1] = outline.points[s + i].x; - sy[1] = outline.points[s + i].y; - sx[2] = (i == N - 1) ? - x : - (outline.points[s + i].x + outline.points[s + i + 1].x) / 2; - sy[2] = (i == N - 1) ? - y : - (outline.points[s + i].y + outline.points[s + i + 1].y) / 2; - - cx[1] = (2 * sx[1] + sx[0]) / 3; - cy[1] = (2 * sy[1] + sy[0]) / 3; - cx[2] = (2 * sx[1] + sx[2]) / 3; - cy[2] = (2 * sy[1] + sy[2]) / 3; - cx[3] = sx[2]; - cy[3] = sy[2]; - - fprintf(out, "%d %d %d %d %d %d rrcurveto\n", - Coord(cx[1] - cx[0]), Coord(cy[1] - cy[0]), - Coord(cx[2] - cx[1]), Coord(cy[2] - cy[1]), - Coord(cx[3] - cx[2]), Coord(cy[3] - cy[2])); - - cx[0] = cx[3]; - cy[0] = cy[3]; - } - } - PS_LastPt(x, y); -} - - -#ifdef DEBUG -int debug_Char_Code = 0xFFFF; -FILE* tmpout; -int showlabel = FALSE; -int no_glyph = FALSE; -int no_control= FALSE; - -#define Fputps(_msg_) fprintf(tmpout, "%s\n", _msg_) - - -void -tmp_out(FILE* tmpout) -{ - int i, j; - - Fputps("%!PS"); - Fputps("%%% CharString debugging program."); - Fputps("%%% Generated by: ttf2pfb Revision: 1.13 $"); - Fputps("%%% plot char-string (pathes defined in /cjkxxxx)"); - Fputps(""); - Fputps("%%% user-defined parameter"); - Fputps("/scalefactor .6 def"); - Fputps("%% 0 black, 1 white"); - Fputps("/glyph-outline-gray 0 def"); - Fputps("/control-point-gray 0.7 def"); - Fputps(""); - Fputps("%%% calculate shifts and scale factor"); - Fputps("currentpagedevice /PageSize get dup"); - Fputps("0 get /pagewidth exch def"); - Fputps("1 get /pageheight exch def"); - Fputps(""); - fprintf(tmpout, - "/llx %d.0 def /lly %d.0 def /urx %d.0 def /ury %d.0 def\n", - Coord(metrics.bbox.xMin / 64), Coord(metrics.bbox.yMin / 64), - Coord(metrics.bbox.xMax / 64), Coord(metrics.bbox.yMax / 64)); - Fputps("/olwidth urx llx sub def"); - Fputps("/olheight ury lly sub def"); - Fputps(""); - Fputps("/scale scalefactor pagewidth mul olwidth div def"); - Fputps("/xshift pagewidth 1 scalefactor sub mul 2 div def"); - Fputps("/yshift pageheight olheight scale mul sub 2 div def"); - Fputps(""); - Fputps("%% save old gray-scale value"); - Fputps("/oldgray currentgray def"); - Fputps(""); - Fputps("%%% for point sequence label"); - Fputps("/TimesRoman 8 selectfont"); - Fputps("/i++ {i /i i 1 add def} def"); - Fputps("/itos {4 string cvs} def"); - Fputps("/point {2 copy i++ 3 1 roll 5 3 roll} def"); - Fputps("/drawlabel"); - Fputps(" {{moveto dup 0 eq {exit}"); - Fputps(" {itos show} ifelse} loop pop} def"); - Fputps("/nodrawlabel {clear} def"); - Fputps("/i 0 def"); - Fputps(""); - Fputps("%%% for drawing glyph paths, redefine commands used in CharString"); - Fputps("%% scaled to proper size"); - Fputps("/addr {scale mul 3 -1 roll add 3 1 roll"); - Fputps(" scale mul add exch 2 copy} def"); - if (no_glyph) - { - Fputps("/rmoveto {addr pop pop point} def"); - Fputps("/rlineto {addr pop pop point} def"); - Fputps("/rrcurveto {8 4 roll addr 8 -2 roll addr 8 -2 roll addr"); - Fputps(" 8 2 roll 6 {pop} repeat point} def"); - } - else - { - Fputps("/rmoveto {addr moveto point} def"); - Fputps("/rlineto {addr lineto point} def"); - Fputps("/rrcurveto {8 4 roll addr 8 -2 roll addr 8 -2 roll addr"); - Fputps(" 8 2 roll curveto point} def"); - } - Fputps("/hsbw {pop pop"); - Fputps(" xshift llx scale mul sub"); - Fputps(" yshift lly scale mul sub} def"); - Fputps("/endchar {stroke pop pop} def"); - Fputps(""); - Fputps("%%% for drawing control paths"); - Fputps("/T {pop lly sub scale mul yshift add exch"); - Fputps(" llx sub scale mul xshift add exch } def"); - Fputps("/mt {T 2 copy moveto} def"); - if (no_control) - Fputps("/lt {T} def"); - else - Fputps("/lt {T 2 copy lineto} def"); - Fputps(""); - Fputps("1 setlinecap 1 setlinejoin"); - Fputps("%%% draw control points and paths"); - Fputps("control-point-gray setgray"); - - for (i = 0, j = 0; i < outline.n_contours; i++) - { - Fputps(""); - fprintf(tmpout, - "%d %d %d %d mt\n", - j, - Coord(outline.points[j].x), Coord(outline.points[j].y), - outline.flags[j]); - j++; - for (; j <= outline.contours[i]; j++) - fprintf(tmpout, - "%d %d %d %d lt\n", - j, - Coord(outline.points[j].x), Coord(outline.points[j].y), - outline.flags[j]); - Fputps("closepath"); - } - Fputps("stroke"); - if (showlabel && !no_control) - Fputps("drawlabel"); - else - Fputps("nodrawlabel"); - Fputps(""); - Fputps("%%% draw glyph outlines"); - Fputps("glyph-outline-gray setgray"); - Fputps(""); -} -#endif - - -/* - * Construct CharString of a glyph. - */ - -short -PS_CharString(FILE *out, - UShort char_Code) -{ - int idx, i, j; - UShort start_offpt, end_offpt = 0, fst; -#if DEBUG - FILE* oldout = out; - int loop = 1; -#endif - - if (force_enc == X) - char_Code = JIS_to_SJIS(char_Code); - - idx = TT_Char_Index(cmap, char_Code); - if (idx == 0) - return FALSE; - - if (!LoadTrueTypeChar(idx)) - fatal("Couldn't load character with index %d (code %d)", idx, char_Code); - - if (verbose) - printf("0x%04x (%05d): %s\n", - char_Code, idx, PS_GlyphName(idx, char_Code)); - - /* Begin string */ - fprintf(out, "/%s {\n", PS_GlyphName(idx, char_Code)); - -#ifdef DEBUG - if (char_Code == debug_Char_Code) - { - tmp_out(tmpout); - out = tmpout; - loop = 0; - } - for (; loop < 2; loop++) - { -#endif - - /* coordinates are all relative to (0,0) in FreeType */ - fprintf(out, "0 %d hsbw\n", (int)(metrics.advance / 64)); - - /* Initialize ending contour point, relative coordinates */ - lastpsx = lastpsy = 0; - - for (i = 0, j = 0; i < outline.n_contours; i++) - { - fst = j; - PS_Moveto(outline.points[j].x, outline.points[j].y); - j++; - - start_offpt = 0; /* start at least 1 */ - - /* - * data pts for all contours stored in one array. - * each round j init at last j + 1 - */ - - /* - * start_offpt means start of off points. - * 0 means no off points in record. - * N means the position of the off point. - * end_offpt means the ending off point. - * lastx, lasty is the last ON point from which Curve and Line - * shall start. - */ - - /* - * start with j=0. into loop, j=1. - * if pt[1] off, if start_offpt == 0, toggle start_offpt - * next j=2. if on, now start_off != 0, run Curveto. - * if pt[1] on, start_off == 0, will run Lineto. - */ - - for (; j <= outline.contours[i]; j++) - { - if (!(outline.flags[j] & TT_Flag_On_Curve)) - { - if (!start_offpt) - start_offpt = end_offpt = j; - else - end_offpt++; - } - else - { /* On Curve */ - if (start_offpt) - { - /* - * start_offpt stuck at j, end_offpt++. - * end_offpt - start_offpt gives no of off pts. - * start_offpt gives start of sequence. - * why need outline.xCoord[j] outline.yCoord[j]? - */ - - PS_Curveto(out, - outline.points[j].x, outline.points[j].y, - start_offpt, end_offpt); - start_offpt = 0; - - /* - * also use start_offpt as indicator to save one variable!! - * after curveto, reset condition. - */ - } - else - PS_Lineto(outline.points[j].x, outline.points[j].y); - } - } - - /* - * looks like closepath fst = first, i.e. go back to first - */ - - if (start_offpt) - PS_Curveto(out, - outline.points[fst].x, outline.points[fst].y, - start_offpt, end_offpt); - else - Fputs("closepath"); - } - - Fputs("endchar"); - -#if DEBUG - out = oldout; - } - if (char_Code == debug_Char_Code) - { - if (showlabel && !no_glyph) - Fputps("drawlabel"); - else - Fputps("nodrawlabel"); - Fputps(""); - Fputps("%%% end of drawing"); - Fputps("oldgray setgray"); - Fputps("showpage"); - fclose(tmpout); - } -#endif - - Fputs(" } |-"); - return TRUE; -} - - -/* - * Get code ranges of an encoding scheme either from - * the eVecMap or a code range file. - */ - -EncVec* -Get_EncVec(FILE *enc) -{ - EncVec* encVec = NULL; - EVcRange* cRange = NULL; - EVLow* lByte = NULL; - UShort numCR = 0, numLow = 0; - int start, end; - int buflen = LINELEN, numAssigned; - char buf[LINELEN]; - - if (force_enc != 0) - return eVecMap_force[force_enc]; - - if (enc == NULL && eVecMap[pid][eid] != NULL) - return eVecMap[pid][eid]; - - /* parse each code range line */ - while (fgets(buf, buflen, enc) != NULL) - { - if (buf[0] != '#' && buf[0] != '\n') - { - if (strrchr(buf,':') != NULL) - { - /* if there is no high value declared before low value */ - if (lByte != NULL) - { - if (cRange == NULL) - { - /* default code range `0x00-0x00:' */ - cRange = re_alloc(cRange, ++numCR * sizeof (EVcRange), - "Get_EncVec"); - cRange->high.start = cRange->high.end = 0; - } - /* Assign the last low value */ - (cRange + numCR - 1)->low = lByte; - (cRange + numCR - 1)->numLowRanges = numLow; - } - - /* New high byte range */ - cRange = re_alloc(cRange, ++numCR * sizeof (EVcRange), "Get_EncVec"); - (cRange + numCR - 1)->numLowRanges = numLow = 0; - lByte = NULL; - - /* Parse code range */ - numAssigned = sscanf(buf, "%i %*40s %i", &start, &end); - if (numAssigned <= 0 || numAssigned > 2) - { - mesg("%s: Get_EncVec: Invalid high code range.\n", prog); - return NULL; - } - else - { - (cRange + numCR - 1)->high.start = start; - if (numAssigned == 1) - (cRange + numCR - 1)->high.end = start; - else - (cRange + numCR - 1)->high.end = end; - } - } - else - { - lByte = re_alloc(lByte, ++numLow * sizeof (EVLow), "Get_EncVec"); - numAssigned = sscanf(buf, "%i %*40s %i", &start, &end); - if (numAssigned <= 0 || numAssigned > 2) - { - mesg("%s: Get_EncVec: Invalid long code range.\n", prog); - return NULL; - } - else - { - (lByte + numLow - 1)->start = start; - if (numAssigned == 1) - (lByte + numLow - 1)->end = start; - else - (lByte + numLow - 1)->end = end; - } - } - } - } - - if (cRange == NULL) - { - cRange = re_alloc(cRange, ++numCR * sizeof (EVcRange), "Get_EncVec"); - cRange->high.start = cRange->high.end = 0; - cRange->numLowRanges = 0; - } - - if (lByte != NULL) - { - (cRange + numCR - 1)->low = lByte; - (cRange + numCR - 1)->numLowRanges = numLow; - } - - encVec = re_alloc(encVec, 1 * sizeof (EncVec), "Get_EncVec"); - encVec->numCodeRanges = numCR; - encVec->codeRange = cRange; - return encVec; -} - - -/* - * Match code ranges by a font plane. - */ - -EncVec* -Get_PlaneEV(EncVec* encVec, - int plane) -{ - UShort numCR = encVec->numCodeRanges; - EVcRange* cRange = encVec->codeRange; - - EncVec* encV = NULL; - EVcRange* planeCR = NULL; - EVLow* planeLow = NULL; - UShort nCR = 0, nLow = 0; - - int icr; - - if (compact) - { - int iChar = 0; /* summed # of chars */ - int nChar = (plane-1) * 256; /* the first char code ranges recorded */ - int recording = 0; - - /* if compact, plane starts from 1 to be */ - /* compatible with the CJK package */ - if (plane < 1 || plane > 99) - fatal("Get_PlaneEV: Given plane out of range"); - - for (icr = 0; icr < numCR; icr++, cRange++) - { - UShort numLow = cRange->numLowRanges; - int ipl; - - for (ipl = cRange->high.start; ipl <= cRange->high.end; ipl++) - { - EVLow* pLow = cRange->low; - int ilow; - - if (recording) - { /* if we have made a hit */ - if (planeLow != NULL) - { /* if low byte range has not been saved */ - (planeCR + nCR - 1)->low = planeLow; - (planeCR + nCR - 1)->numLowRanges = nLow; - planeLow = NULL; - } - - /* each new plane starts a EVcRange if */ - /* iChar is still less than nChar */ - if (iChar <= nChar) - { - planeCR = re_alloc(planeCR, ++nCR * sizeof (EVcRange), - "Get_PlaneEV"); - (planeCR + nCR - 1)->high.start = - (planeCR + nCR - 1)->high.end = ipl; - (planeCR + nCR - 1)->numLowRanges = nLow = 0; - } - } - - /* scan each low byte range */ - for (ilow = 0; ilow < (numLow == 0 ? 1 : numLow); ilow++, pLow++) - { - int start, end, nLowChar; - - if (numLow == 0) - { /* default range */ - start = 0x0; - end = 0xff; - } - else - { - start = pLow->start; - end = pLow->end; - } - nLowChar = end - start + 1; - if (iChar + nLowChar > nChar) - { /* a hit! */ - int bchar = start + nChar - iChar; - if (planeCR == NULL) - { - /* the first time code range is recorded */ - planeCR = re_alloc(planeCR, ++nCR * sizeof (EVcRange), - "Get_PlaneEV"); - (planeCR + nCR - 1)->high.start = ipl; - (planeCR + nCR - 1)->high.end = ipl; - } - - /* adjust range boundary */ - if (recording == 0) - start = bchar; - else - end = bchar; - nChar += 0xff; - - /* recording starts */ - recording++; - } - - iChar += nLowChar; /* next range */ - - if (recording) - { - /* a new low range */ - if (iChar <= nChar) - { - planeLow = re_alloc(planeLow, ++nLow * sizeof (EVLow), - "Get_PlaneEV"); - (planeLow + nLow - 1)->start = start; - (planeLow + nLow - 1)->end = end; - } - if (recording > 1 || iChar > nChar) - { - /* beyond recording range */ - (planeCR + nCR - 1)->numLowRanges = nLow; - (planeCR + nCR - 1)->low = planeLow; - encV = re_alloc(encV, 1 * sizeof (EncVec), "Get_PlaneEV"); - encV->numCodeRanges = nCR; - encV->codeRange = planeCR; - return encV; - } - } - } - } - } - /* we must finalize the ranges */ - if (recording) - { - (planeCR + nCR - 1)->numLowRanges = nLow; - (planeCR + nCR - 1)->low = planeLow; - encV = re_alloc(encV, 1 * sizeof (EncVec), "Get_PlaneEV"); - encV->numCodeRanges = nCR; - encV->codeRange = planeCR; - return encV; - } - } - else - { - for (icr = 0; icr < numCR; icr++, cRange++) - { - if (plane >= cRange->high.start && plane <= cRange->high.end) - { - encV = re_alloc(encV, 1 * sizeof (EncVec), "Get_PlaneEV"); - planeCR = re_alloc(planeCR, 1 * sizeof (EVcRange), "Get_PlaneEV"); - - planeCR->high.start = planeCR->high.end = plane; - planeCR->numLowRanges = cRange->numLowRanges; - planeCR->low = cRange->low; - encV->numCodeRanges = 1; - encV->codeRange = planeCR; - return encV; - } - } - } - return NULL; -} - - -/* - * The main subroutine for generating Type 1 fonts. - * One subfont per call. - */ - -short -Generate_Font(FILE *out, - int plane, - FILE *enc, - char *fname, - int UID) -{ - EncVec* encVec = Get_EncVec(enc); - EncVec* planeEncVec; - EVcRange* cRange; - UShort numCR; - UShort code; - int ilow, iplan, ichar, irange; - - if (verbose) - printf("Generating fonts...\n\n"); - - if (encVec == NULL) - return FALSE; - if (mapping) - planeEncVec = encVec; - else - if ((planeEncVec = Get_PlaneEV(encVec, plane)) == NULL) - { - mesg("%s: Can't find encoding vector for the font plane 0x%X.\n", - prog, plane); - return FALSE; - } - - /* Header of Type1 font */ - PS_Head(out, plane, planeEncVec, fname, UID); - - numCR = planeEncVec->numCodeRanges; - cRange = planeEncVec->codeRange; - - for (irange = 0; irange < numCR; irange++, cRange++) - { - EVLow* pLow = cRange->low; - UShort nLow = cRange->numLowRanges; - - for (iplan = cRange->high.start; iplan <= cRange->high.end; iplan++) - { - if (nLow == 0) - { - for (ichar = 0; ichar <= 0xff; ichar++) - { - code = iplan << 8 | ichar; - PS_CharString(out, code); - } - } - else - { - for (ilow = 0; ilow < nLow; ilow++, pLow++) - { - for (ichar = pLow->start; ichar <= pLow->end; ichar++) - { - code = iplan << 8 | ichar; - PS_CharString(out, code); - } - } - } - } - } - PS_Tail(out); - - return TRUE; -} - - -/* - * Main: process options, file I/O, etc. - */ - -int -main(int argc, - char *argv[]) -{ - char *infile, *outfile, *encFile, *fname = "UNKNOWN"; - FILE *out, *enc; - int result, plane = 0, UID = 4999999; - - if ((prog = strrchr(argv[0], '/'))) - prog++; - else - prog = argv[0]; - - /* set up known encoding vectors */ - Known_Encodings(); - - out = stdout; - enc = NULL; - infile = outfile = encFile = NULL; - - argc--; - argv++; - - while (argc > 0) - { - if (argv[0][0] == '-') - { - switch (argv[0][1]) - { - case 'v': - case 'V': - verbose = TRUE; - break; - case 'c': - case 'C': - compact = TRUE; - break; - case 'k': - case 'K': - keep = TRUE; - break; - case 'm': - case 'M': - mapping = TRUE; - break; - case 'p': - case 'P': - result = argv[0][2]; - argc--; - argv++; - if (result == 'i' || result == 'I') - { - /* Set the platform ID. Assumed upper bound is 64 */ - if ((pid = atoi(argv[0])) < 0 || pid > 64) - /* Check the platform and encoding IDs. */ - fatal("Invalid platform ID %d", pid); - } - else if (result == 'l' || result == 'L') - { - result = 0; - while (argv[0][result] == '0' && - toupper(argv[0][result + 1]) != 'X') - result++; /* no octal number */ - sscanf(&argv[0][result], "%i", &plane); - } - break; - case 'e': - case 'E': - result = argv[0][2]; - argc--; - argv++; - if (result == 'i' || result == 'I') - { - /* Set the encoding ID. */ - if ((eid = atoi(argv[0])) < 0 || eid > 64) - fatal("Invalid encoding ID %d", eid); - } - else if (result == 'n' || result == 'N') - encFile = argv[0]; - break; - case 'u': - case 'U': - argc--; - argv++; - UID = atoi(argv[0]); - break; - case 'f': - case 'F': - result = argv[0][2]; - argc--; - argv++; - if (result == '\0') - fname = argv[0]; - else if (result == 'o' || result == 'O') - { - switch (argv[0][0]) - { - case 'g': - case 'G': - force_enc = GB; - break; - case 'k': - case 'K': - force_enc = KS; - break; - case 'b': - case 'B': - force_enc = Big5; - break; - case 'j': - case 'J': - result = argv[0][1]; - if (result == 'o' || result == 'O') - force_enc = Johab; - else - force_enc = JIS; - break; - case 's': - case 'S': - force_enc = SJIS; - break; - case 'x': - case 'X': - force_enc = X; - } - } - break; - case 't': /* Get the TTF file name. */ - case 'T': - argc--; - argv++; - infile = argv[0]; - break; - case 'o': /* Set the output file name. */ - case 'O': - argc--; - argv++; - outfile = argv[0]; - break; - case 's': /* shift font bbox up or down */ - case 'S': - argc--; - argv++; - sscanf(argv[0], "%f", &fontShift); - break; -#ifdef DEBUG - case 'd': /* character code for debugging */ - case 'D': - argc--; - argv++; - sscanf(argv[0], "%i", &debug_Char_Code); - tmpout = fopen("ch-debug.ps", "wt"); - mesg("You have specified the character code 0x%04x for debugging.\n", - debug_Char_Code); - mesg("A PostScript program named `ch-debug.ps' will be created.\n"); - break; - case 'l': - case 'L': - showlabel = TRUE; - break; - case 'n': - case 'N': - result = argv[0][2]; - if (result == 'g' || result == 'G') - no_glyph = TRUE; - else if (result == 'c' || result == 'C') - no_control = TRUE; - break; -#endif - default: - Usage(1); - } - } - else - /* Set the input file name. */ - infile = argv[0]; - - argc--; - argv++; - } - - /* Open the output file if specified. */ - if (outfile != NULL) - /* Attempt to open the output file. */ - if ((out = fopen(outfile, "wt")) == 0) - { - fatal("Unable to open the output file `%s'", outfile); - exit(FAILURE); - } - - /* Validate the values passed on the command line. */ - if (infile == NULL) - { - mesg("%s: No input TTF file provided\n", prog); - Usage(1); - } - - if (encFile != NULL) - { - if ((enc = fopen(encFile, "rt")) == 0) - fatal("No input code range file"); - } - - /* Initialize font engine */ - if (!Init_Font_Engine(infile)) - { - if (out != stdout) - { - fclose(out); - if (!keep) - (void)unlink(outfile); - } - exit(FAILURE); - } - - /* Generate the disassembled PFB font from the TrueType font */ - if (Generate_Font(out, plane, enc, fname, UID)) - result = 0; - else - result = 2; - - if (out != stdout) - { - fclose(out); - if (result != 0) - { - mesg("%s: An error occurred while generating the font", prog); - if (!keep) - (void)unlink(outfile); - } - } - - TT_Close_Face(face); - TT_Done_FreeType(engine); - - exit(result); - - return 0; /* never reached */ -} - - -/* end of ttf2pfb.c */ Index: xc/extras/FreeType/contrib/ttf2pk/.cvsignore diff -u xc/extras/FreeType/contrib/ttf2pk/.cvsignore:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/.cvsignore:removed --- xc/extras/FreeType/contrib/ttf2pk/.cvsignore:1.1.1.1 Sat Feb 12 23:54:57 2000 +++ xc/extras/FreeType/contrib/ttf2pk/.cvsignore Wed Mar 16 20:59:30 2005 @@ -1,8 +0,0 @@ -ttf2tfm -ttf2pk -.libs -MakeSub -config.status -config.cache -config.log -Makefile Index: xc/extras/FreeType/contrib/ttf2pk/BUGS diff -u xc/extras/FreeType/contrib/ttf2pk/BUGS:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/BUGS:removed --- xc/extras/FreeType/contrib/ttf2pk/BUGS:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/BUGS Wed Mar 16 20:59:30 2005 @@ -1,3 +0,0 @@ - -Some characters (Arial A) have a bounding box that extends outside the -character width... such a character will get an italic correction. Index: xc/extras/FreeType/contrib/ttf2pk/MakeSub.in diff -u xc/extras/FreeType/contrib/ttf2pk/MakeSub.in:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/MakeSub.in:removed --- xc/extras/FreeType/contrib/ttf2pk/MakeSub.in:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/MakeSub.in Wed Mar 16 20:59:30 2005 @@ -1,6 +0,0 @@ -# This file is part of the ttf2pk package - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -mandir = @mandir@ Index: xc/extras/FreeType/contrib/ttf2pk/Makefile.dm diff -u xc/extras/FreeType/contrib/ttf2pk/Makefile.dm:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/Makefile.dm:removed --- xc/extras/FreeType/contrib/ttf2pk/Makefile.dm:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/Makefile.dm Wed Mar 16 20:59:30 2005 @@ -1,71 +0,0 @@ -# Makefile for ttf2pk -- loyer@enst.fr, wl@gnu.org -# -# This Makefile assumes that you've already built and installed -# the FreeType library. -# -# It builds the ttf2pk and ttf2tfm for emx-gcc. -# -# You will need dmake. -# -# Use this file while with the following statement: -# -# dmake -r -f Makefile.dm - - -.IMPORT: COMSPEC -SHELL := $(COMSPEC) -SHELLFLAGS := /c -GROUPSHELL := $(SHELL) -GROUPFLAGS := $(SHELLFLAGS) -GROUPSUFFIX := .bat -SHELLMETAS := *"?<>&| - -CC = gcc -LIBDIR = ../../lib -INCDIR = -I$(LIBDIR) -I. - -# CFLAGS = -Wall -O2 -g $(INCDIR) -fbounds-checking -DHAVE_EMTEXDIR -DMSDOS -CFLAGS = -Wall -O2 -s $(INCDIR) -DHAVE_EMTEXDIR -DMSDOS - -SRC = case.c emdir.c emtexdir.c errormsg.c filesrch.c ligkern.c newobj.c \ - parse.c pklib.c subfont.c texenc.c tfmaux.c ttf2pk.c ttf2tfm.c \ - ttfaux.c ttfenc.c ttflib.c vplaux.c - -ttf2pkobjs = emdir.o emtexdir.o errormsg.o filesrch.o ligkern.o newobj.o \ - parse.o pklib.o subfont.o texenc.o ttf2pk.o ttfenc.o ttflib.o -ttf2tfmobjs = case.o emdir.o emtexdir.o errormsg.o filesrch.o ligkern.o \ - newobj.o parse.o subfont.o texenc.o tfmaux.o ttf2tfm.o \ - ttfaux.o ttfenc.o vplaux.o - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -%.exe: - $(CC) $(CFLAGS) -o $@ @$(mktmp $(&:t"\n")\n) - - -PROGRAMS = ttf2pk.exe ttf2tfm.exe - -.PHONY: all clean distclean - - -all: $(PROGRAMS) - -ttf2pk.exe: $(ttf2pkobjs) $(LIBDIR)/libttf.a -ttf2tfm.exe: $(ttf2tfmobjs) $(LIBDIR)/libttf.a - - -clean: --[ - del *.o -] - -distclean: clean --[ - del dep.end - del *.exe - del core -] - -#end of Makefile.dm Index: xc/extras/FreeType/contrib/ttf2pk/Makefile.in diff -u xc/extras/FreeType/contrib/ttf2pk/Makefile.in:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/Makefile.in:removed --- xc/extras/FreeType/contrib/ttf2pk/Makefile.in:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/Makefile.in Wed Mar 16 20:59:30 2005 @@ -1,116 +0,0 @@ -# Makefile for ttf2pk -- loyer@enst.fr, wl@gnu.org -# -# This Makefile assumes that you've already built and installed -# the FreeType library. - -VPATH = @srcdir@ -srcdir = @srcdir@ - -RM = @RM@ -RMF = @RM@ -f -RMDIR = @RMDIR@ - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ - -CC = @CC@ -CPP = @CPP@ - -LIBTOOL = ../../libtool -MKINSTALLDIRS = $(srcdir)/../../mkinstalldirs - -include MakeSub - -CFLAGS = @CFLAGS@ @XX_CFLAGS@ -CPPFLAGS = @CPPFLAGS@ @DEFS@ -FT_CFLAGS = $(CFLAGS) $(CPPFLAGS) -LDFLAGS = @LDFLAGS@ @LIBS@ -LIBDIR = ../../lib - -SRC = $(srcdir)/case.c \ - $(srcdir)/errormsg.c \ - $(srcdir)/filesrch.c \ - $(srcdir)/ligkern.c \ - $(srcdir)/newobj.c \ - $(srcdir)/parse.c \ - $(srcdir)/pklib.c \ - $(srcdir)/subfont.c \ - $(srcdir)/texenc.c \ - $(srcdir)/tfmaux.c \ - $(srcdir)/ttf2pk.c \ - $(srcdir)/ttf2tfm.c \ - $(srcdir)/ttfaux.c \ - $(srcdir)/ttfenc.c \ - $(srcdir)/ttflib.c \ - $(srcdir)/vplaux.c - -ttf2pkobjs = errormsg.o filesrch.o ligkern.o newobj.o parse.o pklib.o \ - subfont.o texenc.o ttf2pk.o ttfenc.o ttflib.o -ttf2tfmobjs = case.o errormsg.o filesrch.o ligkern.o newobj.o parse.o \ - subfont.o texenc.o tfmaux.o ttf2tfm.o ttfaux.o ttfenc.o \ - vplaux.o - - -.c.o: - $(CC) -c $(FT_CFLAGS) $< - - -PROGRAMS = ttf2pk ttf2tfm - -default all: $(PROGRAMS) - -ttf2pk: $(ttf2pkobjs) $(LIBDIR)/libttf.la - $(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o ttf2pk $(ttf2pkobjs) \ - $(LIBDIR)/libttf.la $(LDFLAGS) - -ttf2tfm: $(ttf2tfmobjs) $(LIBDIR)/libttf.la - $(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o ttf2tfm $(ttf2tfmobjs) \ - $(LIBDIR)/libttf.la $(LDFLAGS) - -install: $(PROGRAMS) - $(MKINSTALLDIRS) $(bindir) $(mandir)/man1 - for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$P $(bindir)/$$P ; \ - $(INSTALL_DATA) $(srcdir)/$$P.1 $(mandir)/man1 ; \ - done - -uninstall: - -for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=uninstall $(RM) $(bindir)/$$P ; \ - $(RMF) $(mandir)/man1/$$P.1 ; \ - done - -clean: do_clean - -distclean: do_clean - -$(RMF) dep.end $(PROGRAMS) - -$(RMF) *~ *.orig core *.core - -$(RMF) config.cache config.log config.status Makefile MakeSub - -$(RMF) .libs/* - -$(RMDIR) .libs - -do_clean: - -$(RMF) *.o - - -depend: - (echo '/^#.* PUT NO STUFF BELOW/,$$d' ; echo w ; echo q) | \ - ed - Makefile - echo '# Dependencies generated by make depend: PUT NO STUFF BELOW' \ - >> Makefile - for file in $(SRC) ; do \ - $(CPP) $(CPPFLAGS) $$file | \ - sed -n -e 's|^# [1-9][0-9]* "\([^/].*\.h\)".*|\1|p' \ - -e 's|^# [1-9][0-9]* "\($(srcdir)/.*\.h\)".*|\1|p' | \ - sed -e 's|/\./|.|g' -e "s/^/`basename $$file .c`.o: /" ; \ - done | \ - sort -u | \ - awk '{ if (LINE == 1) \ - { line = last = $$1 } \ - else if ($$1 != last) \ - { print line ; line = last = $$1 } \ - line = line " " $$2 } \ - END { print line }' >> Makefile - -# Dependencies generated by make depend: PUT NO STUFF BELOW Index: xc/extras/FreeType/contrib/ttf2pk/README diff -u xc/extras/FreeType/contrib/ttf2pk/README:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/README:removed --- xc/extras/FreeType/contrib/ttf2pk/README:1.1.1.2 Sat Feb 12 23:54:58 2000 +++ xc/extras/FreeType/contrib/ttf2pk/README Wed Mar 16 20:59:30 2005 @@ -1,104 +0,0 @@ -This directory contains ttf2tfm and ttf2pk, two utilities based on - - afm2tfm (dvipsk distribution), - gsftopkk (dvipsk distribution), - and the FreeType rasterizer for TrueType fonts. - - -Compile the FreeType library first! It is recommended to use the kpathsea -library if you want to use the programs with web2c resp. teTeX. Source files -for emTeX-like search routines are included; similarly, support for MiKTeX -file searching routines is available if `MIKTEX' is defined during -compilation. Nevertheless, as a last resort, you can compile both programs -without a search library too. - -The kpathsea library is *not* part of the ttf2pk package (see notes below). - - - -Under UNIX-like systems say - - ./configure --prefix=/usr/local/TeX --with-kpathsea-dir= - make - make install - -for a normal compilation and installation. Replace `/usr/local/TeX' with a -path to your TeX distribution. - - -[Note 1: - Try to find `libkpathsea.*' on your system. Use the directory above this - one as the argument for --with-kpathsea-dir. This should work in most - cases. If you can't find the library, you probably have a web2c package - with statically linked binaries. This means that you have to get the web2c - sources from CTAN, configure it with something like - - ./configure --prefix=/usr/local/TeX --datadir=/usr/local/TeX \ - --enable-shared --disable-static - - according to your setup; then change to the kpathsea directory and say - `make' and `make install' (Do the latter with caution not to overwrite - binaries like kpsewhich). - - It even works with the source tree from the TeX Live CD 3! You just have - to add a proper --srcdir option to the configure script. - - Unfortunately, teTeX-0.4 uses a very old kpathsea library version without - automatical shared-library support, thus you have to install the static - libraries: - - .) unpack the sources (basically you need only the contents of kpse-2.6 - and the two subdirs `kpathsea' and `make'. - - .) say - - ./configure --prefix=... - make - - in the kpse-2.6 directory - - .) say - - make install-library - - in the kpathsea subdirectory. See Note 2 also. - - DON'T USE A NEWER KPATHSEA VERSION IF YOU USE teTeX 0.4 BINARIES! Newer - kpathsea versions are not compatible with version 2.6. - - Note 2: - It seems that c-auto.h created during the kpathsea library compiling - process won't be installed for some older web2c versions. You should add - it manually, i.e., copy /kpathsea/c-auto.h to the - location where the other kpathsea header files have been installed. - - Note 3: - If you want to use the --srcdir option of the configure script, you must - compile FreeType with --srcdir too. You have to use the same directory - structure to make it work (i.e., if you have said for FreeType - `./configure --srcdir=foo', and you are in the `bar' directory, FreeType's - configure script will generate all the needed subdirs for compiling - FreeType. You've then manually to add the directory `bar/contrib/ttf2pk'; - there you should start to say ./configure --srcdir=foo/contrib/ttf2pk').] - - - -Use Makefile.dm for emx + dmake and say - - dmake -r -f Makefile.dm - -[Note: It should work with djgpp too, but I haven't tested this.] - - -ttf2pk and ttf2tfm are already part of MiKTeX. - - - -Primary author of afm2tfm: T. Rokicki, -Primary author of gsftopk: P.Vojta -Primary author of the kpathsea library, - afm2tfm/gsftopk adaptation: K. Berry. - --- -Frederic Loyer -Werner Lemberg Index: xc/extras/FreeType/contrib/ttf2pk/TODO diff -u xc/extras/FreeType/contrib/ttf2pk/TODO:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/TODO:removed --- xc/extras/FreeType/contrib/ttf2pk/TODO:1.1.1.2 Sat Feb 12 23:54:58 2000 +++ xc/extras/FreeType/contrib/ttf2pk/TODO Wed Mar 16 20:59:30 2005 @@ -1,22 +0,0 @@ -. multiple configuration files similar to newer versions of gsftopk(k). - -. support for different horizontal and vertical resolutions. - -. character composition via the vpl file. - -. using GSUB for accessing small caps (if available). - -. enabling -v and -V at the same time. - -. Omega support - -. afm output - -. possibility to create `real' fonts, i.e., avoiding virtual fonts for small - caps etc. -- some dvi previewers still can't handle virtual fonts. Due to - the huge amount of work to support this it is rather unlikely that I'll do - it. - -. using hash tables to store glyph names for better performance - -. show replacement glyphs too in glyph listings Index: xc/extras/FreeType/contrib/ttf2pk/c-auto.h diff -u xc/extras/FreeType/contrib/ttf2pk/c-auto.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/c-auto.h:removed --- xc/extras/FreeType/contrib/ttf2pk/c-auto.h:1.1.1.2 Sat Feb 12 23:54:58 2000 +++ xc/extras/FreeType/contrib/ttf2pk/c-auto.h Wed Mar 16 20:59:30 2005 @@ -1,23 +0,0 @@ -/* - * c-auto.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef C_AUTO_H -#define C_AUTO_H - -/* - * We need to get kpathsea's configuration file. - */ - -#include "kpathsea/c-auto.h" - -#endif /* C_AUTO_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/case.c diff -u xc/extras/FreeType/contrib/ttf2pk/case.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/case.c:removed --- xc/extras/FreeType/contrib/ttf2pk/case.c:1.1.1.2 Sat Feb 12 23:54:59 2000 +++ xc/extras/FreeType/contrib/ttf2pk/case.c Wed Mar 16 20:59:30 2005 @@ -1,179 +0,0 @@ -/* - * case.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include /* for definition of NULL */ - -#include "case.h" - - -/* This is a table of uppercase/lowercase pairs which can't be deduced */ -/* by lowercasing the uppercase Adobe glyph name. */ -/* It has been extracted from the ucs2ps.um database compiled by */ -/* Bjorn Brox . */ - -Case casetable[] = -{ - {"afii10017", "afii10065"}, - {"afii10018", "afii10066"}, - {"afii10019", "afii10067"}, - {"afii10020", "afii10068"}, - {"afii10021", "afii10069"}, - {"afii10022", "afii10070"}, - {"afii10023", "afii10071"}, - {"afii10024", "afii10072"}, - {"afii10025", "afii10073"}, - {"afii10026", "afii10074"}, - {"afii10027", "afii10075"}, - {"afii10028", "afii10076"}, - {"afii10029", "afii10077"}, - {"afii10030", "afii10078"}, - {"afii10031", "afii10079"}, - {"afii10032", "afii10080"}, - {"afii10033", "afii10081"}, - {"afii10034", "afii10082"}, - {"afii10035", "afii10083"}, - {"afii10036", "afii10084"}, - {"afii10037", "afii10085"}, - {"afii10038", "afii10086"}, - {"afii10039", "afii10087"}, - {"afii10040", "afii10088"}, - {"afii10041", "afii10089"}, - {"afii10042", "afii10090"}, - {"afii10043", "afii10091"}, - {"afii10044", "afii10092"}, - {"afii10045", "afii10093"}, - {"afii10046", "afii10094"}, - {"afii10047", "afii10095"}, - {"afii10048", "afii10096"}, - {"afii10049", "afii10097"}, - {"afii10050", "afii10098"}, - {"afii10051", "afii10099"}, - {"afii10052", "afii10100"}, - {"afii10053", "afii10101"}, - {"afii10054", "afii10102"}, - {"afii10055", "afii10103"}, - {"afii10056", "afii10104"}, - {"afii10057", "afii10105"}, - {"afii10058", "afii10106"}, - {"afii10059", "afii10107"}, - {"afii10060", "afii10108"}, - {"afii10061", "afii10109"}, - {"afii10062", "afii10110"}, - {"afii10145", "afii10193"}, - {"afii10146", "afii10194"}, - {"afii10147", "afii10195"}, - {"afii10148", "afii10196"}, - {"afii10149", "afii10197"}, - {"afii10152", "afii10200"}, - {"afii10202", "afii10154"}, - {"afii10155", "afii10203"}, - {"afii10156", "afii10204"}, - {"afii10157", "afii10205"}, - {"afii10158", "afii10206"}, - {"afii10160", "afii10208"}, - {"afii10161", "afii10209"}, - {"afii10162", "afii10210"}, - {"afii10163", "afii10211"}, - {"afii10164", "afii10212"}, - {"afii10166", "afii10214"}, - {"afii10167", "afii10215"}, - {"afii10168", "afii10216"}, - {"afii10170", "afii10218"}, - {"afii10171", "afii10219"}, - {"afii10172", "afii10220"}, - {"afii10173", "afii10221"}, - {"afii10174", "afii10222"}, - {"afii10176", "afii10224"}, - {"afii10178", "afii10226"}, - {"afii10179", "afii10227"}, - {"afii10181", "afii10229"}, - {"afii10182", "afii10230"}, - {"afii10184", "afii10232"}, - {"afii10185", "afii10233"}, - {"afii10187", "afii10235"}, - {"afii10188", "afii10236"}, - {"afii10190", "afii10238"}, - {"afii10785", "afii10833"}, - {"afii10786", "afii10834"}, - {"afii10787", "afii10835"}, - {"afii10795", "afii10843"}, - {"afii10798", "afii10846"}, - {"afii10799", "afii10847"}, - {"afii10800", "afii10848"}, - {"afii10801", "afii10849"}, - {"afii64308", "afii64436"}, - {"afii10803", "afii10851"}, - {"afii10808", "afii10856"}, - {"afii10809", "afii10857"}, - {"afii10810", "afii10858"}, - {"afii10811", "afii10859"}, - {"afii10817", "afii10865"}, - {"afii10818", "afii10866"}, - {"afii10819", "afii10867"}, - {"afii10822", "afii10870"}, - {"afii10827", "afii10875"}, - {"afii10914", "afii10962"}, - {"afii10920", "afii10968"}, - {"afii10924", "afii10972"}, - {"afii10927", "afii10975"}, - {"afii10929", "afii10977"}, - {"afii10930", "afii10978"}, - {"afii10931", "afii10979"}, - {"afii10932", "afii10980"}, - {"afii10934", "afii10982"}, - {"afii10943", "afii10991"}, - {"afii10944", "afii10992"}, - {"afii10951", "afii10967"}, -/*{? "ash"} */ - {"Beta", "beta1"}, - {"Bhook", "bhooktop"}, - {"Chook", "chooktop"}, -/*{"Oopen" "cturn" ?} */ - {"Dbar1", "dbar"}, - {"Dhook", "dhooktop"}, - {"Dmacron", "dmacron3"}, - {"Dslash", "dmacron"}, - {"I", "dotlessi"}, - {"J", "dotlessj"}, -/*{"Dbar", "drighttail" ?} */ -/*{"Dbar" "drthook" ?} */ -/*{"Dslash", ?} */ - {"Fhook", "fscript"}, - {"Ghook", "ghooktop"}, - {"Ibar", "ibarred"}, - {"I", "iundotted"}, - {"Kappa", "kappa1"}, - {"Khook", "khooktop"}, - {"S", "longs"}, - {"mcapturn", "mturn"}, - {"mcapturn", "mturned"}, - {"Mu", "mu1"}, - {"Nhook", "nlefthookatleft"}, - {"Nhook", "nlftlfthook"}, - {"Obar", "obarred"}, - {"Pi", "omega1"}, - {"Phi", "phi1"}, - {"Phi", "philatin"}, - {"Pi", "pi1"}, - {"Rho", "rho1"}, - {"Sigma", "sigma1"}, - {"Sigma", "sigmafinal"}, - {"Sigma", "sigmalunate"}, - {"S", "slong"}, - {"Theta", "theta1"}, - {"Thook", "thooktop"}, - {"Trthook", "trighttail"}, - {"Upsilon2", "upsilon"}, - {"Vcursive", "vscript"}, - {NULL, NULL} -}; - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/case.h diff -u xc/extras/FreeType/contrib/ttf2pk/case.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/case.h:removed --- xc/extras/FreeType/contrib/ttf2pk/case.h:1.1.1.2 Sat Feb 12 23:55:00 2000 +++ xc/extras/FreeType/contrib/ttf2pk/case.h Wed Mar 16 20:59:30 2005 @@ -1,27 +0,0 @@ -/* - * case.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef CASE_H -#define CASE_H - -struct _Case -{ - char *upper; - char *lower; -}; -typedef struct _Case Case; - - -extern Case casetable[]; - -#endif /* CASE_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/configure diff -u xc/extras/FreeType/contrib/ttf2pk/configure:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/configure:removed --- xc/extras/FreeType/contrib/ttf2pk/configure:1.1.1.2 Sat Feb 12 23:55:02 2000 +++ xc/extras/FreeType/contrib/ttf2pk/configure Wed Mar 16 20:59:30 2005 @@ -1,1700 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-kpathsea-dir=DIR Location of the kpathsea base dir (/usr/local)" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=../../lib/freetype.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:575: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:596: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:614: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:640: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:670: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:721: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:753: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 764 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:800: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:828: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:860: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - -# Check whether --with-kpathsea-dir or --without-kpathsea-dir was given. -if test "${with_kpathsea_dir+set}" = set; then - withval="$with_kpathsea_dir" - - if test x$withval = xyes; then - echo "configure: warning: Usage is: --with-kpathsea-dir=basedir" 1>&2 - else - if test x$withval = xno; then - echo "configure: warning: Usage is: --with-kpathsea-dir=basedir" 1>&2 - else - kpathsea_dir=$withval - fi - fi - -fi - - -if test -n "$kpathsea_dir"; then - LIBS="$LIBS -L$kpathsea_dir/lib" - CPPFLAGS="$CPPFLAGS -I$kpathsea_dir/include -I$srcdir" - - echo $ac_n "checking for kpse_set_program_name in -lkpathsea""... $ac_c" 1>&6 -echo "configure:962: checking for kpse_set_program_name in -lkpathsea" >&5 -ac_lib_var=`echo kpathsea'_'kpse_set_program_name | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lkpathsea $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - -else - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define OLD_KPATHSEA 1 -EOF - -fi - - - echo $ac_n "checking for kpse_init_prog in -lkpathsea""... $ac_c" 1>&6 -echo "configure:1007: checking for kpse_init_prog in -lkpathsea" >&5 -ac_lib_var=`echo kpathsea'_'kpse_init_prog | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lkpathsea $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo kpathsea | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 - - { echo "configure: error: Can't find kpathsea library! Use --with-kpathsea-dir option." 1>&2; exit 1; } -fi - - - ac_safe=`echo "kpathsea/kpathsea.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for kpathsea/kpathsea.h""... $ac_c" 1>&6 -echo "configure:1058: checking for kpathsea/kpathsea.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - -else - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define VERY_OLD_KPATHSEA 1 -EOF - -fi - - - ac_safe=`echo "kpathsea/c-auto.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for kpathsea/c-auto.h""... $ac_c" 1>&6 -echo "configure:1096: checking for kpathsea/c-auto.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 - - { echo "configure: error: Can't find kpathsea include files! Use --with-kpathsea-dir option." 1>&2; exit 1; } -fi - -else - CPPFLAGS="$CPPFLAGS -I$srcdir" -fi - -echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6 -echo "configure:1134: checking for floor in -lm" >&5 -ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:1181: checking for gettext in -lintl" >&5 -ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:1232: checking for TT_Init_FreeType in -lttf" >&5 -ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lttf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lttf" -else - echo "$ac_t""no" 1>&6 - - { echo "configure: error: Can't find ttf library! Compile FreeType first." 1>&2; exit 1; } -fi - -LIBS=$OLDLIBS - - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi - - -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1293: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RM"; then - ac_cv_prog_RM="$RM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RM="rm" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RM="$ac_cv_prog_RM" -if test -n "$RM"; then - echo "$ac_t""$RM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "rmdir", so it can be a program name with args. -set dummy rmdir; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1322: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RMDIR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RMDIR"; then - ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RMDIR="rmdir" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RMDIR="$ac_cv_prog_RMDIR" -if test -n "$RMDIR"; then - echo "$ac_t""$RMDIR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1360: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -if test -z "$kpathsea_dir"; then - echo "configure: warning: - - The binaries will be compiled without file search library support! - For kpathsea support use the --with-kpathsea-dir option. - " 1>&2 -fi - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile MakeSub" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@XX_CFLAGS@%$XX_CFLAGS%g -s%@RM@%$RM%g -s%@RMDIR@%$RMDIR%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - Index: xc/extras/FreeType/contrib/ttf2pk/configure.in diff -u xc/extras/FreeType/contrib/ttf2pk/configure.in:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/configure.in:removed --- xc/extras/FreeType/contrib/ttf2pk/configure.in:1.1.1.2 Sat Feb 12 23:55:03 2000 +++ xc/extras/FreeType/contrib/ttf2pk/configure.in Wed Mar 16 20:59:30 2005 @@ -1,87 +0,0 @@ -dnl This file is part of the ttf2pk package - -dnl Process this file with autoconf to produce a configure script. - -dnl Some tests are omitted since we assume that you've built the -dnl FreeType library successfully. - -AC_INIT(../../lib/freetype.h) - -AC_CANONICAL_SYSTEM - -AC_PROG_CC -AC_PROG_CPP - -AC_ARG_WITH(kpathsea-dir, - [ --with-kpathsea-dir=DIR Location of the kpathsea base dir (/usr/local)],[ - if test x$withval = xyes; then - AC_MSG_WARN(Usage is: --with-kpathsea-dir=basedir) - else - if test x$withval = xno; then - AC_MSG_WARN(Usage is: --with-kpathsea-dir=basedir) - else - kpathsea_dir=$withval - fi - fi -]) - -if test -n "$kpathsea_dir"; then - LIBS="$LIBS -L$kpathsea_dir/lib" - CPPFLAGS="$CPPFLAGS -I$kpathsea_dir/include -I$srcdir" - - dnl the function kpse_set_program_name() is available since kpathsea 3.2 - AC_CHECK_LIB(kpathsea, kpse_set_program_name, [[]], AC_DEFINE(OLD_KPATHSEA)) - - AC_CHECK_LIB(kpathsea, kpse_init_prog, ,[ - AC_MSG_ERROR([Can't find kpathsea library! Use --with-kpathsea-dir option.])]) - - dnl the header file kpathsea.h doesn't exist in kpathsea 2.6 and before - AC_CHECK_HEADER(kpathsea/kpathsea.h, [[]], AC_DEFINE(VERY_OLD_KPATHSEA)) - - AC_CHECK_HEADER(kpathsea/c-auto.h, ,[ - AC_MSG_ERROR([Can't find kpathsea include files! Use --with-kpathsea-dir option.])]) -else - CPPFLAGS="$CPPFLAGS -I$srcdir" -fi - -AC_CHECK_LIB(m, floor) -AC_CHECK_LIB(intl, gettext) - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[ - AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])]) -LIBS=$OLDLIBS - -dnl get Compiler flags right. - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi -AC_SUBST(XX_CFLAGS) - -AC_CHECK_PROG(RM, rm, rm) -AC_CHECK_PROG(RMDIR, rmdir, rmdir) -AC_PROG_INSTALL - -if test -z "$kpathsea_dir"; then - AC_MSG_WARN([ - - The binaries will be compiled without file search library support! - For kpathsea support use the --with-kpathsea-dir option. - ]) -fi - -AC_OUTPUT(Makefile MakeSub) - -dnl end of configure.in Index: xc/extras/FreeType/contrib/ttf2pk/dvidrv.btm diff -u xc/extras/FreeType/contrib/ttf2pk/dvidrv.btm:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/dvidrv.btm:removed --- xc/extras/FreeType/contrib/ttf2pk/dvidrv.btm:1.1.1.2 Sat Feb 12 23:55:03 2000 +++ xc/extras/FreeType/contrib/ttf2pk/dvidrv.btm Wed Mar 16 20:59:30 2005 @@ -1,334 +0,0 @@ -:: -:: This is dvidrv.btm, a batch file for 4DOS/4OS2 written by -:: Werner Lemberg partially based on the -:: dvidrv.btm file of the 4allTeX package written by Phons Bloemen. -:: -:: It is a replacement for dvidrv.exe of the emTeX package. -:: -:: Additional features: support of ps2pk -:: support of ttf2pk -:: support of hbf2gf for HBFs (Hanzi bitmap fonts) -:: -:: Only quadratic printer modes are supported for ttf2pk! -:: -:: All needed binaries will be searched in the path. - -iff %# lt 2 then - echo `` - echo Usage: %0 dvi-driver dvi-file [parameters] - quit -endiff - -setlocal - :: we set a default value only if the corresponding environment variable - :: is empty. The `=' must follow the variable name immediately. - alias set_def `iff "%[%@word["=",0,%1]]" eq "" then %+ set %& %+ endiff` - - :: ========================================= - :: ======== User defined variables. ======== - :: ========================================= - :: - :: Can be overridden in the environment (except %ps2pk, %ttf2pk, %hbf2gf, - :: %pre_dpi, and %post_dpi). - - :: Set these values to `no' for the programs you don't want to use. - set ps2pk=yes - set ttf2pk=yes - set hbf2gf=yes - - :: where the PK files will be installed created by ps2pk, ttf2pk, and - :: hbf2gf. - :: dvidrv.btm adds `\modeless\XXXdpi' to this string (see below for the - :: exact string). - set_def pkdir=%emtexdir\pixel\tmp\pk - - :: where the TrueType fonts reside. Supports trailing `!' and `!!'. - set_def ttfonts=%emtexdir\fonts\truetype - :: where auxiliary files of ttf2pk are located. Supports trailing `!' - :: and `!!'. - set_def ttfcfg=%emtexdir\ttf2pk - - :: where the HBF files reside. Supports trailing `!' and `!!'. - set_def hbfonts=%emtexdir\fonts\hbf - :: where the hbf2gf config files are. Supports trailing `!' and `!!'. - set_def hbfcfg=%emtexdir\hbf2gf - - :: the dpi-subdirectory has various forms; the most common are XXXdpi and - :: dpiXXX, e.g. 300dpi and dpi300. Here we define two variables which - :: control this behaviour. - :: [dpiXXX is used for TDS compatible TeX trees.] - set pre_dpi=dpi - set post_dpi= - - :: ================================================ - :: ======== End of user defined variables. ======== - :: ================================================ - - :: the base name for log files etc. - set basename=%@name[%1] - - :: do we run dvips? - iff "%basename" ne "dvips" then - goto nodvips1 - endiff - - :: we delete dvips.mfj if it exists. - del dvips.mfj >& nul - - :: now we run dvips with all supplied parameters. - %& - - :: do we have to generate fonts? - iff exist dvips.mfj then - goto generate_fonts - endiff - - :: else all is done. - goto end - - -:nodvips1 - :: here we call the dvi driver with all supplied parameters. - %& -pj:%basename.mfj - - :: do we have to generate fonts? - iff errorlevel 8 then - goto generate_fonts - endiff - - :: else all is done. - goto end - - -:generate_fonts - gosub call_mfjob - - :: do we run dvips? - iff "%basename" ne "dvips" then - goto nodvips2 - endiff - - :: we now call dvips a second time - %& - - :: since no fonts will be generated in the second run we remove dvips.mfj - del dvips.mfj >& nul - - goto end - - -:nodvips2 - :: we call the dvi driver a second time (without font generation). - %& -pj -fm - - del %basename.mfj >& nul - - goto end - - -:: this is the main subroutine which calls mfjob and then parses the mfjob -:: file for fonts which can be handled by ps2pk, ttf2pk, or hbf2gf. -:call_mfjob - :: this alias prints a message on the screen and writes it into the logfile. - alias echolog=`echo %& | tee /a %basename.mlg` - - echo ======== DVIDRV.BTM logfile ======== > %basename.mlg - echo Commandline: dvidrv.btm %& >> %basename.mlg - echo `` >> %basename.mlg - echo basename=%basename >> %basename.mlg - echo emtexdir=%emtexdir >> %basename.mlg - echo dvidrvfonts=%dvidrvfonts >> %basename.mlg - echo mfinput=%mfinput >> %basename.mlg - echo mfjobopt=%mfjobopt >> %basename.mlg - echo textfm=%textfm >> %basename.mlg - echo psfonts=%psfonts >> %basename.mlg - echo ttfonts=%ttfonts >> %basename.mlg - echo ttfcfg=%ttfcfg >> %basename.mlg - echo hbfonts=%hbfonts >> %basename.mlg - echo hbfcfg=%hbfcfg >> %basename.mlg - echo `` >> %basename.mlg - - iff "%@search[mfjob]" eq "" then - echolog MFJOB not found in the path. - echolog Can't generate PK fonts from METAFONT automatically. - echo `` - quit - endiff - - :: now we call mfjob. - echolog mfjob %mfjobopt -g%basename.mfl %basename.mfj - mfjob %mfjobopt -g%basename.mfl %basename.mfj - iff %? gt 0 then - echolog `` - echolog Something went wrong while running METAFONT. - echolog Look into the log files... - echolog `` - endiff - - :: after running mfjob we scan the mfjob input file for fonts which can - :: be handled by ps2pk, ttf2pk, or hbf2gf. - set lnnr=0 - set totlines=%@lines[%basename.mfj] - - do while %lnnr le %totlines - :: input a line. - set scratch=%@line[%basename.mfj,%lnnr] - set lnnr=%@inc[%lnnr] - - :: get resolutions (METAFONT mode will be ignored). - :: example: - :: mode=lqlores[180 180]; - iff %@index[%scratch,mode] ge 0 then - set temp=%@word["[]",1,%scratch] - set xdpi=%@word[0,%temp] - set ydpi=%@word[1,%temp] - endiff - - :: get fontname and magnification; we then compute the font resolutions - :: (rounded to the nearest integer---there is no necessity to adjust - :: these values further because of possible rounding errors since both - :: emTeX's dvi drivers and dvips check neighbored values too). - :: example: - :: {font=cmr10; mag=0.5;} - iff %@index[%scratch,{font] ge 0 then - set testfont=%@word["=;",1,%scratch] - set temp=%@word["=;",3,%scratch] - :: we use highest arithmetic precision for these calculations. - :: Additionally we write 1/2 instead of 0.5 to avoid problems with - :: countries which use a comma instead of a colon as the decimal - :: separator. - set fontresx=%@int[%@eval[%xdpi*%temp+1/2=8]] - set fontresy=%@int[%@eval[%ydpi*%temp+1/2=8]] - set pksubdir=modeless\%[pre_dpi]%[fontresx]%post_dpi - - set success=0 - - :: check whether %testfont leads to a PS font (we call ps2pkmfj). - iff %success == 0 .and. "%ps2pk" eq "yes" then - gosub call_ps2pk - endiff - - :: check whether %testfont leads to a TrueType font. - iff %success == 0 .and. "%ttf2pk" eq "yes" then - gosub call_ttf2pk - endiff - - :: check whether %testfont leads to a HBF file. - iff %success == 0 .and. "%hbf2gf" eq "yes" then - gosub call_hbf2gf - endiff - endiff - enddo - - iff exist %basename.mfp then - echo `` >> %basename.mlg - echo `` >> %basename.mlg - echo ======== PS2PK logfile ======== >> %basename.mlg - echo `` >> %basename.mlg - type %basename.mfp >> %basename.mlg - echo `` >> %basename.mlg - del %basename.mfp >& nul - endiff - - iff exist %basename.mfl then - echo `` >> %basename.mlg - type %basename.mfl >> %basename.mlg - echo `` >> %basename.mlg - del %basename.mfl >& nul - endiff - - return - - -:call_ttf2pk - iff "%@search[ttf2pk]" eq "" then - echolog TTF2PK not found in the path. - echolog Can't generate PK fonts from TrueType fonts automatically. - echo `` - quit - endiff - - echolog ttf2pk -q -n %testfont %fontresx - ttf2pk -q -n %testfont %fontresx - - iff %? == 0 then - echolog Font %pkdir\%pksubdir\%testfont.pk generated. - mkdir /s %pkdir\%pksubdir >& nul - move %testfont.pk %pkdir\%pksubdir >& nul - set success=1 - elseiff %? == 2 then - echolog (%lnnr/%totlines): Font %testfont is no TrueType font. - set success=0 - else - echolog Error running TTF2PK for font %testfont! - endiff - - return - - -:call_hbf2gf - iff "%@search[hbf2gf]" eq "" then - echolog HBF2GF not found in the path. - echolog Can't generate PK fonts from HBF files automatically. - echo `` - quit - endiff - - echolog hbf2gf -q -p -n %testfont %fontresx %fontresy - hbf2gf -q -p -n %testfont %fontresx %fontresy - - iff %? == 0 then - echolog Font %pkdir\%pksubdir\%testfont.pk generated. - mkdir /s %pkdir\%pksubdir >& nul - gftopk %testfont.gf %testfont.pk - move %testfont.pk %pkdir\%pksubdir >& nul - del %testfont.gf >& nul - set success=1 - elseiff %? == 2 then - echolog (%lnnr/%totlines): Font %testfont is no HBF. - set success=0 - else - echolog Error running HBF2GF for font %testfont! - endiff - - return - - -:call_ps2pk - iff not exist %pkdir\%pksubdir\%testfont.pk then - iff "%@search[ps2pkmfj]" eq "" .or. "%@search[ps2pk]" eq "" then - echolog PS2PKMFJ and/or PS2PK not found in the path. - echolog Can't generate PK fonts from PostScript fonts automatically. - echo `` - quit - endiff - - echolog ps2pkmfj -X%fontresx -Y%fontresy %testfont %testfont.pk - ps2pkmfj -X%fontresx -Y%fontresy %testfont %testfont.pk | input %%pspkline - - iff errorlevel != 1 then - %pspkline >> %basename.mfp - iff %? == 0 then - echolog Font %pkdir\%pksubdir\%testfont.pk generated. - mkdir /s %pkdir\%pksubdir >& nul - move %testfont.pk %pkdir\%pksubdir >& nul - success=1 - else - echolog Error running PS2PK for font %testfont! - endiff - else - echolog (%lnnr/%totlines): Font %testfont is no PS font. - success=0 - endiff - else - echolog Font %pkdir\%pksubdir\%testfont.pk already exists. - endiff - - return - - -:end - -endlocal - -:: ==== end of dvidrv.btm ==== Index: xc/extras/FreeType/contrib/ttf2pk/dvidrv.doc diff -u xc/extras/FreeType/contrib/ttf2pk/dvidrv.doc:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/dvidrv.doc:removed --- xc/extras/FreeType/contrib/ttf2pk/dvidrv.doc:1.1.1.1 Sat Feb 12 23:55:04 2000 +++ xc/extras/FreeType/contrib/ttf2pk/dvidrv.doc Wed Mar 16 20:59:30 2005 @@ -1,56 +0,0 @@ -Using dvidrv.btm [emTeX for DOS and OS/2] -------------------------------------------- - -This batch file does the same as MakeTeXPK does; it is a replacement for -dvidrv.exe of emTeX which can handle ttf2pk, hbf2gf, and ps2pk additionally -(the ps2pk part is untested yet; it uses ps2pkmfj of the 4allTeX -distribution and was basically copied from a similar script, also part of -4allTeX). - -First of all, create and install a set of TFM files as described in the -previous section. - -Then configure the following variables in dvidrv.btm: - - ps2pk ... set it to `yes' if you want to use this program - ttf2pk ... ditto - hbf2gf ... ditto - - pkdir ... the place where PK files created by ps2pk, ttf2pk, - or hbf2gf should go to. dvidrv.btm adds - `\modeless\XXXdpi' resp. `\modeless\dpiXXX' to this - string (depending on the variables `pre_dpi' and - `post_dpi') - - ttfonts ... where the TrueType fonts files reside - ttfcfg ... where the auxiliary data files of ttf2pk reside - - hbfonts ... where the HBF files reside - hbfcfg ... the place where the hbf2gf configuration files are - -The last four variables in the above list support trailing `!' and `!!' for -recursive directory searching (see the dvidrv.doc of the emTeX package for -details). - -Alternatively, you can set these variables in the environment; please note -that no spaces are allowed before and after the equal sign, e.g. - - set foo=bar - -is OK, but - - set foo = bar - -will fail. - -Rename dvidrv.exe to dvidrv.ori or something similar and copy dvidrv.btm to -a directory in the path. - -Don't forget to update the DVIDRVFONTS and TEXTFM environment variables if -necessary. - -Under OS/2 dvips will call mfjob or hbf2gf itself; under DOS it will create -a batch file which must be called afterwards. - - ---- end of dvidrv.doc --- Index: xc/extras/FreeType/contrib/ttf2pk/emdir.c diff -u xc/extras/FreeType/contrib/ttf2pk/emdir.c:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/emdir.c:removed --- xc/extras/FreeType/contrib/ttf2pk/emdir.c:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/emdir.c Wed Mar 16 20:59:30 2005 @@ -1,109 +0,0 @@ -/* emdir.c -- Written by Eberhard Mattes, donated to the public domain */ - -#include "emdir.h" - -#ifdef OS2 - -#undef HPS -#define INCL_DOSFILEMGR -#include -#include - -#define FHDIR(b) (*(HDIR *)(b)->reserved) - -static void fconv (struct ll_findbuffer *dst, const FILEFINDBUF *src) -{ - dst->attr = src->attrFile; - dst->time = *(unsigned *)&src->ftimeLastWrite; - dst->date = *(unsigned *)&src->fdateLastWrite; - dst->size = src->cbFile; - strcpy (dst->name, src->achName); -} - - -int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer) -{ - USHORT rc; - ULONG count; - HDIR hdir; - FILEFINDBUF ffbuf; - - hdir = HDIR_CREATE; - count = 1; - rc = DosFindFirst ((PSZ)path, &hdir, attr, &ffbuf, sizeof (ffbuf), - &count, 0L); - if (rc != 0 || count != 1) - return 0; - FHDIR (buffer) = hdir; - fconv (buffer, &ffbuf); - return 1; -} - - -int ll_findnext (struct ll_findbuffer *buffer) -{ - USHORT rc; - ULONG count; - HDIR hdir; - FILEFINDBUF ffbuf; - - hdir = FHDIR (buffer); - count = 1; - rc = DosFindNext (hdir, &ffbuf, sizeof (ffbuf), &count); - if (rc != 0 || count != 1) - { - DosFindClose (hdir); - return 0; - } - fconv (buffer, &ffbuf); - return 1; -} - - -#elif defined(DJGPP) - -/* djgpp support by Hartmut Schirmer (hsc@techfak.uni-kiel.de), May 30, 1997 */ - -#include -#include - -static int ll_attr = 0; -int ll_findnext (struct ll_findbuffer *buffer) -{ - int res; - do { - res = _dos_findnext ((struct find_t *)buffer); - if (res != 0) return 0; - } while ( (buffer->attrib&ll_attr) == 0); - return 1; -} - -int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer) -{ - int res; - ll_attr = attr; - res = _dos_findfirst((char *)path, attr, (struct find_t *)buffer); - if (res != 0) return 0; - if ( (buffer->attrib&ll_attr) == 0) - return ll_findnext(buffer); - return 1; -} - -#elif !defined(__EMX__) /* if not OS2 nor DJGPP nor __EMX__ defined */ - -/* Not tested */ - -#include - -int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer) -{ - return _dos_findfirst (path, attr, (struct find_t *)buffer) == 0; -} - - -int ll_findnext (struct ll_findbuffer *buffer) -{ - return _dos_findnext ((struct find_t *)buffer) == 0; -} - -#endif Index: xc/extras/FreeType/contrib/ttf2pk/emdir.h diff -u xc/extras/FreeType/contrib/ttf2pk/emdir.h:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/emdir.h:removed --- xc/extras/FreeType/contrib/ttf2pk/emdir.h:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/emdir.h Wed Mar 16 20:59:30 2005 @@ -1,25 +0,0 @@ -/* emdir.h -- Written by Eberhard Mattes, donated to the public domain */ - -#if defined(DJGPP) - -/* djgpp support by Hartmut Schirmer (hsc@techfak.uni-kiel.de), May 30, 1997 */ -#include -#define ll_findbuffer find_t -#define attr attrib - -#else - -struct ll_findbuffer -{ - char reserved[21]; - unsigned char attr; - unsigned time; - unsigned date; - long size; - char name[257]; -}; - -#endif - -int ll_findfirst (const char *path, int attr, struct ll_findbuffer *buffer); -int ll_findnext (struct ll_findbuffer *buffer); Index: xc/extras/FreeType/contrib/ttf2pk/emtexdir.c diff -u xc/extras/FreeType/contrib/ttf2pk/emtexdir.c:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/emtexdir.c:removed --- xc/extras/FreeType/contrib/ttf2pk/emtexdir.c:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/emtexdir.c Wed Mar 16 20:59:30 2005 @@ -1,405 +0,0 @@ -/* emtexdir.c -- written by Eberhard Mattes, donated to the public domain */ - -#if defined (__EMX__) -#include -#else -#include "emdir.h" -#endif -#if defined(DJGPP) || defined(GO32) -#include -#endif -#include -#include -#include -#include -#include "emtexdir.h" - -#define FALSE 0 -#define TRUE 1 - -void (*emtex_dir_find_callback)(const char *name, int ok) = NULL; - -static int setup_add (struct emtex_dir *dst, const char *path) -{ - char *p; - - if (dst->used >= dst->alloc) - { - dst->alloc += 8; - dst->list = realloc (dst->list, dst->alloc * sizeof (*dst->list)); - if (dst->list == NULL) - return (FALSE); - } - p = strdup (path); - if (p == NULL) - return (FALSE); - dst->list[dst->used++] = p; - return (TRUE); -} - - -static int setup_subdir (struct emtex_dir *dst, char *path, size_t add, - unsigned flags, int recurse) -{ - int ok, i, end, len; -#if defined (__EMX__) - struct _find find; -#else - struct ll_findbuffer find; -#endif - - i = dst->used; - strcpy (path + add, "*.*"); -#if defined (__EMX__) - ok = __findfirst (path, 0x10, &find) == 0; -#else - ok = ll_findfirst (path, 0x10, &find); -#endif - while (ok) - { - if ((find.attr & 0x10) - && !(strcmp (find.name, ".") == 0 || strcmp (find.name, "..") == 0)) - { - len = strlen (find.name); - memcpy (path + add, find.name, len); - path[add+len] = '\\'; - path[add+len+1] = 0; - if (!setup_add (dst, path)) - return (FALSE); - } -#if defined (__EMX__) - ok = __findnext (&find) == 0; -#else - ok = ll_findnext (&find); -#endif - } - if (recurse) - { - end = dst->used; - while (i < end) - { - strcpy (path, dst->list[i]); - if (!setup_subdir (dst, path, strlen (path), flags, TRUE)) - return (FALSE); - ++i; - } - } - return (TRUE); -} - - -static int setup_dir (struct emtex_dir *dst, char *path, - const char *base_dir, size_t base_dir_len, - const char *sub_dir, - unsigned flags) -{ - size_t i, len; - - memcpy (path, base_dir, base_dir_len); - i = base_dir_len; - if ((flags & EDS_BANG) && sub_dir == NULL) - { - flags &= ~(EDS_ONESUBDIR|EDS_ALLSUBDIR); - if (i >= 2 && path[i-1] == '!' && path[i-2] == '!') - { - flags |= EDS_ALLSUBDIR; - i -= 2; - } - else if (i >= 1 && path[i-1] == '!') - { - flags |= EDS_ONESUBDIR; - --i; - } - } - if (sub_dir != NULL && *sub_dir != 0) - { - if (i != 0 && path[i-1] != ':' && path[i-1] != '/' && path[i-1] != '\\') - path[i++] = '\\'; - len = strlen (sub_dir); - memcpy (path+i, sub_dir, len); - i += len; - } - if (path[i-1] != ':' && path[i-1] != '/' && path[i-1] != '\\') - path[i++] = '\\'; - path[i] = 0; - if (!setup_add (dst, path)) - return (FALSE); - if (flags & EDS_ALLSUBDIR) - return (setup_subdir (dst, path, i, flags, TRUE)); - else if (flags & EDS_ONESUBDIR) - return (setup_subdir (dst, path, i, flags, FALSE)); - else - return (TRUE); -} - - -/*static */int setup_list (struct emtex_dir *dst, char *path, - const char *list, unsigned flags) -{ - const char *end; - size_t i; - - for (;;) - { - while (*list == ' ' || *list == '\t') - ++list; - if (*list == 0) - return (TRUE); - end = list; - while (*end != 0 && *end != ';') - ++end; - i = end - list; - while (i > 0 && (list[i-1] == ' ' || list[i-1] == '\t')) - --i; - if (i != 0 && !setup_dir (dst, path, list, i, NULL, flags)) - return (FALSE); - if (*end == 0) - return (TRUE); - list = end + 1; - } -} - - -int emtex_dir_setup (struct emtex_dir *ed, const char *env, const char *dir, - unsigned flags) -{ - const char *val; - char path[260]; - - ed->alloc = 0; - ed->used = 0; - ed->list = NULL; - if (env != NULL && (val = getenv (env)) != NULL) - return (setup_list (ed, path, val, flags)); - else if ((val = getenv ("EMTEXDIR")) != NULL) - return (setup_dir (ed, path, val, strlen (val), dir, flags)); - else - return (setup_dir (ed, path, "\\emtex", 6, dir, flags)); -} - - -static void pretty (char *path, unsigned flags) -{ - char *p; - - if (flags & EDF_FSLASH) - for (p = path; *p != 0; ++p) - if (*p == '\\') - *p = '/'; -} - - -#define ADDCHAR(C) \ - if (dst_size < 1) return (EDT_TOOLONG); \ - *dst++ = (C); --dst_size - -int emtex_dir_trunc (char *dst, size_t dst_size, const char *src, - unsigned flags, int method) -{ - int len, truncated, dot; - - if (src[0] != 0 && src[1] == ':') - { - ADDCHAR (src[0]); - ADDCHAR (src[1]); - src += 2; - } - - truncated = FALSE; dot = FALSE; len = 0; - for (;;) - { - switch (*src) - { - case 0: - ADDCHAR (0); - return (truncated ? EDT_CHANGED : EDT_UNCHANGED); - - case ':': - return (EDT_INVALID); - - case '/': - case '\\': - ADDCHAR (*src); - len = 0; dot = FALSE; - break; - - case '.': - if (dot) - return (EDT_INVALID); - ADDCHAR (*src); - - /* ".." is allowed -- don't return EDT_INVALID for the next - dot. */ - - if (!(len == 0 && src[1] == '.' - && (src[2] == 0 || src[2] == '/' || src[2] == '\\'))) - { - len = 0; dot = TRUE; - } - break; - - default: - if (dot && len == 3) - truncated = TRUE; - else if (!dot && len == 8) - { - truncated = TRUE; - if (method == 0) - { - dst[-3] = dst[-2]; - dst[-2] = dst[-1]; - dst[-1] = *src; - } - } - else - { - ADDCHAR (*src); - ++len; - } - break; - } - ++src; - } -} - - -static int find2 (const char *name, unsigned flags) -{ - int ok; - - ok = (access (name, 4) == 0); - if (flags & EDF_TRACE) - emtex_dir_find_callback (name, ok); - return (ok); -} - - -static int find1 (char *path, size_t path_size, const char *dir, - const char *fname, unsigned flags) -{ - char buf[260]; - int method, rc; - size_t len, tmp; - - len = 0; - if (dir != NULL) - { - tmp = strlen (dir); - if (tmp >= sizeof (buf)) - return (FALSE); - memcpy (buf, dir, tmp); - len = tmp; - } - tmp = strlen (fname); - if (len + tmp >= sizeof (buf)) - return (FALSE); - memcpy (buf + len, fname, tmp + 1); - len += tmp; -#if 0 /* wkim */ -/* disabled for Win95's long file name support */ -/* -- Wonkoo Kim (wkim+@pitt.edu), May 18, 1997 */ - if (_osmode == DOS_MODE) - { - rc = emtex_dir_trunc (path, path_size, buf, flags, EDT_5_PLUS_3); - if ((rc == EDT_UNCHANGED || rc == EDT_CHANGED) && find2 (path, flags)) - { - pretty (path, flags); - return (TRUE); - } - rc = emtex_dir_trunc (path, path_size, buf, flags, EDT_8); - if (rc == EDT_CHANGED && find2 (path, flags)) - { - pretty (path, flags); - return (TRUE); - } - return (FALSE); - } - else -#endif /* wkim */ - { - if (len < path_size && find2 (buf, flags)) - { - memcpy (path, buf, len + 1); - pretty (path, flags); - return (TRUE); - } - for (method = 0; method < 2; ++method) - { - rc = emtex_dir_trunc (path, path_size, buf, flags, method); - if (rc == EDT_CHANGED && find2 (path, flags)) - { - pretty (path, flags); - return (TRUE); - } - } - return (FALSE); - } -} - - -int emtex_dir_find (char *path, size_t path_size, - const struct emtex_dir *ed, - const char *fname, unsigned flags) -{ - int i, absp; - const char *p; - - absp = FALSE; - for (p = fname; *p != 0; ++p) - if (*p == ':' || *p == '/' || *p == '\\') - { - absp = TRUE; - break; - } - - if (absp) - return (find1 (path, path_size, NULL, fname, flags)); - - if ((flags & EDF_CWD) && find1 (path, path_size, NULL, fname, flags)) - return (TRUE); - - for (i = 0; i < ed->used; ++i) - if (find1 (path, path_size, ed->list[i], fname, flags)) - return (TRUE); - return (FALSE); -} - - -#if defined (TEST) - -#include - -int main (int argc, char *argv[]) -{ - struct emtex_dir ed; - int i; - unsigned flags1, flags2; - char path[260]; - - if (argc != 6) - { - puts ("Usage: emtexdir "); - return (1); - } - - flags1 = (unsigned)strtol (argv[1], NULL, 0); - flags2 = (unsigned)strtol (argv[2], NULL, 0); - - if (!emtex_dir_setup (&ed, argv[3], argv[4], flags1)) - { - fputs ("emtex_dir_setup failed\n", stderr); - return (2); - } - - printf ("Directories:\n"); - for (i = 0; i < ed.used; ++i) - printf (" %s\n", ed.list[i]); - - if (!emtex_dir_find (path, sizeof (path), &ed, argv[5], flags2)) - puts ("File not found"); - else - printf ("Path: %s\n", path); - return (0); -} - -#endif Index: xc/extras/FreeType/contrib/ttf2pk/emtexdir.h diff -u xc/extras/FreeType/contrib/ttf2pk/emtexdir.h:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/emtexdir.h:removed --- xc/extras/FreeType/contrib/ttf2pk/emtexdir.h:1.1.1.1 Sat Jan 23 22:21:53 1999 +++ xc/extras/FreeType/contrib/ttf2pk/emtexdir.h Wed Mar 16 20:59:30 2005 @@ -1,57 +0,0 @@ -/* emtexdir.h -- written by Eberhard Mattes, donated to the public domain */ - -#if !defined (_EMTEXDIR_H) -#define _EMTEXDIR_H - -#if defined (__cplusplus) -extern "C" { -#endif - - -/* Flags for emtex_dir_setup */ - -#define EDS_ONESUBDIR 0x0001 -#define EDS_ALLSUBDIR 0x0002 -#define EDS_BANG 0x0004 - -/* Flags for emtex_dir_find */ - -#define EDF_CWD 0x0001 -#define EDF_FSLASH 0x0002 -#define EDF_TRACE 0x8000 - -/* Methods for emtex_dir_trunc */ - -#define EDT_5_PLUS_3 0 /* 5+3.3 */ -#define EDT_8 1 /* 8.3 */ - -/* Return values for emtex_dir_trunc */ - -#define EDT_UNCHANGED 0 /* Path name not changed */ -#define EDT_CHANGED 1 /* Path name truncated */ -#define EDT_TOOLONG 2 /* Path name too long */ -#define EDT_INVALID 3 /* Path name invalid */ - -struct emtex_dir -{ - char **list; - int used; - int alloc; -}; - -extern void (*emtex_dir_find_callback)(const char *name, int ok); - -int emtex_dir_setup (struct emtex_dir *ed, const char *env, const char *dir, - unsigned flags); - -int emtex_dir_find (char *path, size_t path_size, const struct emtex_dir *ed, - const char *fname, unsigned flags); - -int emtex_dir_trunc (char *dst, size_t dst_size, const char *src, - unsigned flags, int method); - -#if defined (__cplusplus) -} -#endif - -#endif /* !defined (_EMTEXDIR_H) */ Index: xc/extras/FreeType/contrib/ttf2pk/errormsg.c diff -u xc/extras/FreeType/contrib/ttf2pk/errormsg.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/errormsg.c:removed --- xc/extras/FreeType/contrib/ttf2pk/errormsg.c:1.1.1.2 Sat Feb 12 23:55:04 2000 +++ xc/extras/FreeType/contrib/ttf2pk/errormsg.c Wed Mar 16 20:59:30 2005 @@ -1,96 +0,0 @@ -/* - * errormsg.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include /* for size_t */ -#include -#include - -#include "errormsg.h" - - -extern char progname[]; /* the origin of the error/warning message */ - - -/* - * Print error message and quit. - */ - -void -oops(const char *message, - ...) -{ - va_list args; - - - va_start(args, message); - fprintf(stderr, "%s: ERROR: ", progname); - vfprintf(stderr, message, args); - va_end(args); - putc('\n', stderr); - - exit(1); -} - - -/* - * Print error message, a buffer, a '^' at the buffer offset, and quit. - */ - -void -boops(const char *buffer, - size_t offset, - const char *message, - ...) -{ - va_list args; - - - va_start(args, message); - fprintf(stderr, "%s: ERROR: ", progname); - vfprintf(stderr, message, args); - va_end(args); - putc('\n', stderr); - - if (*buffer) - { - fprintf(stderr, "%s\n", buffer); - while (offset) - { - fprintf(stderr, " "); - offset--; - } - fprintf(stderr, "^\n"); - } - - exit(1); -} - - -/* - * Print warning message and continue. - */ - -void -warning(const char *message, - ...) -{ - va_list args; - - - va_start(args, message); - fprintf(stderr, "%s: WARNING: ", progname); - vfprintf(stderr, message, args); - va_end(args); - putc('\n', stderr); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/errormsg.h diff -u xc/extras/FreeType/contrib/ttf2pk/errormsg.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/errormsg.h:removed --- xc/extras/FreeType/contrib/ttf2pk/errormsg.h:1.1.1.2 Sat Feb 12 23:55:05 2000 +++ xc/extras/FreeType/contrib/ttf2pk/errormsg.h Wed Mar 16 20:59:31 2005 @@ -1,43 +0,0 @@ -/* - * errormsg.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef ERRORMSG_H -#define ERRORMSG_H - - -/* - Disable some annoying warnings when you compile with -W3. Namely the - warnings about missing __cdecl specifiers at some places where they are - not really needed because the compiler can generate them. - - This is relevant only if you compile with -Gr option, i.e., use fastcall - calling convention. - - This is needed for fpTeX. - */ - -#ifdef WIN32 -#pragma warning (disable : 4007 4096) -#endif - - -void oops(const char *message, - ...); -void boops(const char *buffer, - size_t offset, - const char *message, - ...); -void warning(const char *message, - ...); - -#endif /* ERRORMSG_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/filesrch.c diff -u xc/extras/FreeType/contrib/ttf2pk/filesrch.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/filesrch.c:removed --- xc/extras/FreeType/contrib/ttf2pk/filesrch.c:1.1.1.2 Sat Feb 12 23:55:05 2000 +++ xc/extras/FreeType/contrib/ttf2pk/filesrch.c Wed Mar 16 20:59:31 2005 @@ -1,602 +0,0 @@ -/* - * filesrch.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -/* - * Interface to the system specific TeX file search routines. - */ - -#include /* for size_t */ -#include -#include - -#include "filesrch.h" -#include "newobj.h" - - -/**************************** - * kpathsea library support * - ****************************/ - -#if defined(HAVE_LIBKPATHSEA) - -#ifdef VERY_OLD_KPATHSEA -#include "kpathsea/proginit.h" -#include "kpathsea/progname.h" -#include "kpathsea/tex-glyph.h" -#else -#include "kpathsea/kpathsea.h" -#endif - -#ifdef KPSEDLL -/* this is kpathsea 3.3 and newer */ -extern KPSEDLL char *kpathsea_version_string; -#else -extern DllImport char *kpathsea_version_string; -#endif - -/* - * Initialize kpathsea library; arguments are the full name of the - * executable (e.g. `/usr/bin/ttf2pk') and two identification strings; - * the former for the program itself (to have texmf.cnf constructs like - * `TFMFONTS.ttf2pk'), the latter for the environment (to have environment - * constructs like `TTF2PKMAKEPK'). - */ - -void -TeX_search_init(char *exec_name, - char *program_identifier, - char *env_identifier) -{ -#ifdef OLD_KPATHSEA - kpse_set_progname(exec_name); -#else - kpse_set_program_name(exec_name, program_identifier); -#endif - -#ifdef VERY_OLD_KPATHSEA - kpse_init_prog(env_identifier, 300, "cx", true, "cmr10"); -#else - kpse_init_prog(env_identifier, 300, "cx", "cmr10"); -#endif -} - - -char * -TeX_search_version(void) -{ - return kpathsea_version_string; -} - - -char * -TeX_search_tfm(char **name) -{ - /* no extra extension handling necessary */ - - return kpse_find_file(*name, kpse_tfm_format, True); -} - - -char * -TeX_search_encoding_file(char **name) -{ - handle_extension(name, ".enc"); - -#ifdef OLD_KPATHSEA -#ifdef VERY_OLD_KPATHSEA - return kpse_find_file(*name, kpse_dvips_header_format, True); -#else - return kpse_find_file(*name, kpse_tex_ps_header_format, True); -#endif -#else - return kpse_find_file(*name, kpse_program_text_format, True); -#endif -} - - -char * -TeX_search_replacement_file(char **name) -{ - handle_extension(name, ".rpl"); - -#ifdef OLD_KPATHSEA -#ifdef VERY_OLD_KPATHSEA - return kpse_find_file(*name, kpse_dvips_header_format, True); -#else - return kpse_find_file(*name, kpse_tex_ps_header_format, True); -#endif -#else - return kpse_find_file(*name, kpse_program_text_format, True); -#endif -} - - -char * -TeX_search_sfd_file(char **name) -{ - handle_extension(name, ".sfd"); - -#ifdef OLD_KPATHSEA -#ifdef VERY_OLD_KPATHSEA - return kpse_find_file(*name, kpse_dvips_header_format, True); -#else - return kpse_find_file(*name, kpse_tex_ps_header_format, True); -#endif -#else - return kpse_find_file(*name, kpse_program_text_format, True); -#endif -} - - -char * -TeX_search_config_file(char **name) -{ - /* no extra extension handling necessary */ - -#ifdef OLD_KPATHSEA - return kpse_find_file(*name, kpse_dvips_config_format, True); -#else - return kpse_find_file(*name, kpse_program_text_format, True); -#endif -} - - -char * -TeX_search_ttf_file(char **name) -{ -#ifdef OLD_KPATHSEA - - size_t l; - char* real_name; - - - l = strlen(*name); - handle_extension(name, ".ttf"); -#ifdef VERY_OLD_KPATHSEA - real_name = kpse_find_file(*name, kpse_dvips_header_format, True); -#else - real_name = kpse_find_file(*name, kpse_type1_format, True); -#endif - - /* test for .ttc, but only if no extension was given initially */ - if (!real_name && l != strlen(*name)) - { - (*name)[strlen(*name) - 1] = 'c'; -#ifdef VERY_OLD_KPATHSEA - real_name = kpse_find_file(*name, kpse_dvips_header_format, True); -#else - real_name = kpse_find_file(*name, kpse_type1_format, True); -#endif - } - - return real_name; - -#else /* OLD_KPATHSEA */ - - /* no extra extension handling necessary */ - - return kpse_find_file(*name, kpse_truetype_format, True); - -#endif -} - - -/**************************** - * emtexdir library support * - ****************************/ - -#elif defined(HAVE_EMTEXDIR) - -#include "emtexdir.h" -#include "errormsg.h" - -extern int setup_list(struct emtex_dir *dst, char *path, - const char *list, unsigned flags); - -char emtex_version_string[] = "emTeXdir"; - -struct emtex_dir tfm_path, - enc_path, - rpl_path, - sfd_path, - cfg_path, - ttf_path; - - -/* - * We slightly modify emtex_dir_setup() to output a warning in case - * the environment variable isn't set properly. - */ - -static int -dir_setup(struct emtex_dir *ed, - const char *env, - const char *dir, - unsigned flags) -{ - const char *val; - char path[260]; - - - ed->alloc = 0; - ed->used = 0; - ed->list = NULL; - - if (env != NULL && (val = getenv(env)) != NULL) - return setup_list(ed, path, val, flags); - else - warning("Environment variable %s not set; use current directory.", env); - - return True; -} - - -static char * -file_find(char *name, struct emtex_dir *list) -{ - char buffer[1024]; - - - if (emtex_dir_find(buffer, sizeof (buffer), list, name, EDF_CWD)) - return newstring(buffer); - - return NULL; -} - - -/* - * Initialize emtexdir library; arguments are the full name of the - * executable (e.g. `c:\bin\ttf2pk.exe') and two identification strings; - * the former for the program itself, the latter for the environment. - * We ignore all of them. - */ - -void -TeX_search_init(char *exec_name, - char *program_identifier, - char *env_identifier) -{ - if (!dir_setup(&tfm_path, "TEXTFM", NULL, EDS_BANG)) - oops("Cannot setup search path for tfm files"); - if (!dir_setup(&enc_path, "TTFCFG", NULL, EDS_BANG)) - oops("Cannot setup search path for encoding files"); -#if 0 - if (!dir_setup(&rpl_path, "TTFCFG", NULL, EDS_BANG)) - oops("Cannot setup search path for replacement files"); - if (!dir_setup(&sfd_path, "TTFCFG", NULL, EDS_BANG)) - oops("Cannot setup search path for subfont definition files"); - if (!dir_setup(&cfg_path, "TTFCFG", NULL, EDS_BANG)) - oops("Cannot setup search path for configuration file"); -#else - rpl_path = sfd_path = cfg_path = enc_path; -#endif - if (!dir_setup(&ttf_path, "TTFONTS", NULL, EDS_BANG)) - oops("Cannot setup search path for TrueType font files"); -} - - -char * -TeX_search_version(void) -{ - return emtex_version_string; -} - - -char * -TeX_search_tfm(char **name) -{ - handle_extension(name, ".tfm"); - return file_find(*name, &tfm_path); -} - - -char * -TeX_search_encoding_file(char **name) -{ - handle_extension(name, ".enc"); - return file_find(*name, &enc_path); -} - - -char * -TeX_search_replacement_file(char **name) -{ - handle_extension(name, ".rpl"); - return file_find(*name, &rpl_path); -} - - -char * -TeX_search_sfd_file(char **name) -{ - handle_extension(name, ".sfd"); - return file_find(*name, &sfd_path); -} - - -char * -TeX_search_config_file(char **name) -{ - /* no extra extension handling necessary */ - return file_find(*name, &cfg_path); -} - - -char * -TeX_search_ttf_file(char **name) -{ - size_t l; - char* real_name; - - - l = strlen(*name); - handle_extension(name, ".ttf"); - real_name = file_find(*name, &ttf_path); - - /* test for .ttc, but only if no extension was given initially */ - if (!real_name && l != strlen(*name)) - { - (*name)[strlen(*name) - 1] = 'c'; - real_name = file_find(*name, &ttf_path); - } - - return real_name; -} - - -/************************** - * MiKTeX library support * - **************************/ - -#elif defined(MIKTEX) - -#include "miktex.h" - -void -TeX_search_init(char *exec_name, - char *program_identifier, - char *env_identifier) -{ - /* empty */ -} - - -char * -TeX_search_version(void) -{ - char buf[200]; - - - strcpy(buf, "MiKTeX "); - miktex_get_miktex_version_string_ex(buf + 7, sizeof (buf) - 7); - - return buf; -} - - -char * -TeX_search_tfm(char **name) -{ - char result[_MAX_PATH]; - - - if (!miktex_find_tfm_file(*name, result)) - return 0; - - return strdup(result); -} - - -char * -TeX_search_encoding_file(char **name) -{ - char result[_MAX_PATH]; - - - if (!miktex_find_enc_file(*name, result)) - return 0; - - return strdup(result); -} - - -char * -TeX_search_replacement_file(char **name) -{ - char result[_MAX_PATH]; - - - handle_extension(name, ".rpl"); - if (!miktex_find_input_file("ttf2tfm", *name, result)) - return 0; - - return strdup(result); -} - - -char * -TeX_search_sfd_file(char **name) -{ - char result[_MAX_PATH]; - - - handle_extension(name, ".sfd"); - if (!miktex_find_input_file("ttf2tfm", *name, result)) - return 0; - return strdup(result); -} - - -char * -TeX_search_config_file(char **name) -{ - char result[_MAX_PATH]; - - - if (!miktex_find_input_file("ttf2tfm", *name, result)) - return 0; - return strdup(result); -} - - -char * -TeX_search_ttf_file(char **name) -{ - char result[_MAX_PATH]; - - - if (!miktex_find_ttf_file(*name, result)) - return 0; - return strdup(result); -} - - -/********************** - * no library support * - **********************/ - -#else - -#include - -char version_string[] = "no search library"; - -void -TeX_search_init(char *exec_name, - char *program_identifier, - char *env_identifier) -{ - /* empty */ -} - - -char * -TeX_search_version(void) -{ - return version_string; -} - - -char * -TeX_search_tfm(char **name) -{ - handle_extension(name, ".tfm"); - return *name; -} - - -char * -TeX_search_encoding_file(char **name) -{ - handle_extension(name, ".enc"); - return *name; -} - - -char * -TeX_search_replacement_file(char **name) -{ - handle_extension(name, ".rpl"); - return *name; -} - - -char * -TeX_search_sfd_file(char **name) -{ - handle_extension(name, ".sfd"); - return *name; -} - - -char * -TeX_search_config_file(char **name) -{ - /* no extra extension handling necessary */ - return *name; -} - - -/* we only handle .ttf extension */ - -char * -TeX_search_ttf_file(char **name) -{ - handle_extension(name, ".ttf"); - return *name; -} - -#endif - - - -void -get_tfm_fullname(Font *fnt) -{ - size_t len = 0; - - - if (fnt->fullname) - free(fnt->fullname); - - if (fnt->outname) - len += strlen(fnt->outname); - if (fnt->subfont_name) - len += strlen(fnt->subfont_name); - if (fnt->outname_postfix) - len += strlen(fnt->outname_postfix); - len++; - - fnt->fullname = (char *)mymalloc(len); - fnt->fullname[0] = '\0'; - - if (fnt->outname) - strcat(fnt->fullname, fnt->outname); - if (fnt->subfont_name) - strcat(fnt->fullname, fnt->subfont_name); - if (fnt->outname_postfix) - strcat(fnt->fullname, fnt->outname_postfix); -} - - -/* - * This function takes the address of a pointer to a string allocated - * with malloc() and checks whether it has an extension. If not, a default - * extension given as a second argument will be appended using first - * realloc() and then strcat(). - * - * '/', ':', and '\\' will be recognized as directory separators. - */ - -void -handle_extension(char **stringp, - char *extension) -{ - int i, lastext = -1; - - - for (i = 0; (*stringp)[i]; i++) - if ((*stringp)[i] == '.') - lastext = i; - else if ((*stringp)[i] == '/' || - (*stringp)[i] == ':' || - (*stringp)[i] == '\\') - lastext = -1; - - if (lastext == -1) - { - *stringp = (char *)myrealloc((void *)*stringp, - strlen(*stringp) + strlen(extension) + 1); - strcat(*stringp, extension); - } -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/filesrch.h diff -u xc/extras/FreeType/contrib/ttf2pk/filesrch.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/filesrch.h:removed --- xc/extras/FreeType/contrib/ttf2pk/filesrch.h:1.1.1.2 Sat Feb 12 23:55:06 2000 +++ xc/extras/FreeType/contrib/ttf2pk/filesrch.h Wed Mar 16 20:59:31 2005 @@ -1,51 +0,0 @@ -/* - * filesrch.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef FILESRCH_H -#define FILESRCH_H - -#include "ttf2tfm.h" - -/* - * Arguments are the full program name and two identification strings - * (for the program and the environment). - */ - -void TeX_search_init(char *exec_name, - char *program_identifier, - char *env_identifier); - -/* - * The next function returns a version string. - */ - -char *TeX_search_version(void); - -/* - * The following functions take a file name (either relative or absolute), - * probably append a default extension, and return the complete path to the - * file. - */ - -char *TeX_search_tfm(char **name); -char *TeX_search_encoding_file(char **name); -char *TeX_search_replacement_file(char **name); -char *TeX_search_sfd_file(char **name); -char *TeX_search_config_file(char **name); -char *TeX_search_ttf_file(char **name); - -void get_tfm_fullname(Font *fnt); -void handle_extension(char **stringp, - char *extension); - -#endif /* FILESRCH_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ligkern.c diff -u xc/extras/FreeType/contrib/ttf2pk/ligkern.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ligkern.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ligkern.c:1.1.1.2 Sat Feb 12 23:55:06 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ligkern.c Wed Mar 16 20:59:31 2005 @@ -1,275 +0,0 @@ -/* - * ligkern.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include /* for size_t */ -#include - -#include "ttf2tfm.h" -#include "ligkern.h" -#include "ttfenc.h" -#include "texenc.h" -#include "newobj.h" -#include "errormsg.h" - - -static char * -paramstring(char **curp) -{ - register char *p, *q; - - - p = *curp; - while (*p && !isspace(*p)) - p++; - q = *curp; - if (*p != '\0') - *p++ = '\0'; - while (isspace(*p)) - p++; - *curp = p; - return q; -} - - -/* - * Some routines to remove kerns that match certain patterns. - */ - -static kern * -rmkernmatch(kern *k, - char *s) -{ - kern *nk; - - - while (k && strcmp(k->succ, s) == 0) - k = k->next; - - if (k) - { - for (nk = k; nk; nk = nk->next) - while (nk->next && strcmp(nk->next->succ, s) == 0) - nk->next = nk->next->next; - } - return k; -} - - -/* - * Recursive to one level. - */ - -static void -rmkern(char *s1, char *s2, - ttfinfo *ti, - Font *fnt) -{ - if (ti == NULL) - { - if (strcmp(s1, "*") == 0) - { - for (ti = fnt->charlist; ti; ti = ti->next) - rmkern(s1, s2, ti, fnt); - return; - } - else - { - ti = findadobe(s1, fnt->charlist); - if (ti == NULL) - return; - } - } - - if (strcmp(s2, "*") == 0) - ti->kerns = NULL; /* drop them on the floor */ - else - ti->kerns = rmkernmatch(ti->kerns, s2); -} - - -/* - * Make the kerning for character S1 equivalent to that for S2. - * If either S1 or S2 do not exist, do nothing. - * If S1 already has kerning, do nothing. - */ - -static void -addkern(char *s1, char *s2, - Font *fnt) -{ - ttfinfo *ti1 = findadobe(s1, fnt->charlist); - ttfinfo *ti2 = findadobe(s2, fnt->charlist); - - - if (ti1 && ti2 && !ti1->kerns) - { - /* Put the new one at the head of the list, since order is immaterial. */ - ttfptr *ap = (ttfptr *)mymalloc(sizeof (ttfptr)); - - - ap->next = ti2->kern_equivs; - ap->ch = ti1; - ti2->kern_equivs = ap; - } -} - - -/* - * Reads a ligkern line, if this is one. Assumes the first character - * passed is `%'. - */ - -void -checkligkern(char *s, Font *fnt) -{ - char *mlist[5]; - char *os; - char *orig_s, *pos; - size_t offset[5]; - int n; - - - os = newstring(s); - orig_s = s; - - s++; - while (isspace(*s)) - s++; - if (strncmp(s, "LIGKERN", 7) == 0) - { - fnt->sawligkern = True; - s += 7; - while (isspace(*s)) - s++; - pos = s; - while (*pos) - { - for (n = 0; n < 5;) - { - if (*pos == '\0') - break; - offset[n] = pos - orig_s; - mlist[n] = paramstring(&pos); - if (strcmp(mlist[n], ";") == 0) - break; - n++; - } - - if (n > 4) - boops(os, pos - orig_s, "Too many parameters in lig kern data."); - if (n < 3) - boops(os, pos - orig_s, "Too few parameters in lig kern data."); - - if (n == 3 && strcmp(mlist[1], "{}") == 0) /* rmkern command */ - rmkern(mlist[0], mlist[2], (ttfinfo *)0, fnt); - else if (n == 3 && strcmp(mlist[1], "<>") == 0) /* addkern */ - addkern(mlist[0], mlist[2], fnt); - else if (n == 3 && strcmp(mlist[0], "||") == 0 && - strcmp(mlist[1], "=") == 0) /* bc command */ - { - ttfinfo *ti = findadobe("||", fnt->charlist); - - - if (fnt->boundarychar != -1) - boops(os, offset[0], "Multiple boundary character commands?"); - if (sscanf(mlist[2], "%d", &n) != 1) - boops(os, offset[2], - "Expected number assignment for boundary char."); - if (n < 0 || n > 0xFF) - boops(os, offset[2], "Boundary character number must be 0..0xFF."); - - fnt->boundarychar = n; - if (ti == NULL) - oops("Internal error: boundary char."); - ti->outcode = n; /* prime the pump, so to speak, for lig/kerns */ - } - else if (n == 4) - { - int op = -1; - ttfinfo *ti; - - - for (n = 0; encligops[n]; n++) - if (strcmp(mlist[2], encligops[n]) == 0) - { - op = n; - break; - } - if (op < 0) - boops(os, offset[2], "Bad ligature op specified."); - - if (NULL != (ti = findadobe(mlist[0], fnt->charlist))) - { - lig *lig; - - - if (findadobe(mlist[2], fnt->charlist)) - /* remove coincident kerns */ - rmkern(mlist[0], mlist[1], ti, fnt); - - if (strcmp(mlist[3], "||") == 0) - boops(os, offset[3], "You can't lig to the boundary character!"); - - if (!fnt->fixedpitch) /* fixed pitch fonts get *0* ligs */ - { - for (lig = ti->ligs; lig; lig = lig->next) - if (strcmp(lig->succ, mlist[1]) == 0) - break; /* we'll re-use this structure */ - - if (lig == NULL) - { - lig = newlig(); - lig->succ = newstring(mlist[1]); - lig->next = ti->ligs; - ti->ligs = lig; - } - lig->sub = newstring(mlist[3]); - lig->op = op; - - if (strcmp(mlist[1], "||") == 0) - { - lig->boundleft = 1; - if (strcmp(mlist[0], "||") == 0) - boops(os, offset[0], - "You can't lig boundarychar boundarychar!"); - } - else - lig->boundleft = 0; - } - } - } - else - boops(os, offset[0], "Bad form in LIGKERN command."); - } - } - - free(os); -} - - -void -getligkerndefaults(Font *fnt) -{ - int i; - char *buffer; - - - for (i = 0; staticligkern[i]; i++) - { - buffer = newstring(staticligkern[i]); - checkligkern(buffer, fnt); - free(buffer); - } -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ligkern.h diff -u xc/extras/FreeType/contrib/ttf2pk/ligkern.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ligkern.h:removed --- xc/extras/FreeType/contrib/ttf2pk/ligkern.h:1.1.1.2 Sat Feb 12 23:55:06 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ligkern.h Wed Mar 16 20:59:31 2005 @@ -1,23 +0,0 @@ -/* - * ligkern.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef LIGKERN_H -#define LIGKERN_H - -#include "ttf2tfm.h" - - -void checkligkern(char *s, Font *fnt); -void getligkerndefaults(Font *fnt); - -#endif /* LIGKERN_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/newobj.c diff -u xc/extras/FreeType/contrib/ttf2pk/newobj.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/newobj.c:removed --- xc/extras/FreeType/contrib/ttf2pk/newobj.c:1.1.1.2 Sat Feb 12 23:55:07 2000 +++ xc/extras/FreeType/contrib/ttf2pk/newobj.c Wed Mar 16 20:59:31 2005 @@ -1,352 +0,0 @@ -/* - * newobj.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include /* for size_t */ -#include - -#include "newobj.h" -#include "ttf2tfm.h" -#include "errormsg.h" -#include "texenc.h" - - -void * -mymalloc(size_t len) -{ - void *p; - - -#ifdef SMALLMALLOC - if (len > 65500L) - oops("Cannot allocate more than 64kByte."); -#endif - - if (len) - p = malloc(len); - else - p = malloc(1); - - if (p == NULL) - oops("Out of memory."); - - return p; -} - - -void * -myrealloc(void *oldp, size_t len) -{ - void *p; - - -#ifdef SMALLMALLOC - if (len > 65500L) - oops("Cannot allocate more than 64kByte."); -#endif - - if (len) - p = realloc(oldp, len); - else - p = realloc(oldp, 1); - - if (p == NULL) - oops("Out of memory."); - - return p; -} - - -/* - * This routine gets a line from a file, supporting continuation with - * '\' as the last character on the line. - * - * In case of error, NULL is returned. If EOF is reached a pointer to - * a null string is returned. The final newline will be retained. - */ - -char * -get_line(FILE *f) -{ - size_t linelen, len; - char *buffer; - int c; - - - linelen = 80; - len = 0; - - buffer = (char *)mymalloc(linelen); - - while (1) - { - c = fgetc(f); - buffer[len++] = c; - - if (len == linelen - 1) - { - linelen += 80; - buffer = (char *)myrealloc(buffer, linelen); - } - - again: - switch (c) - { - case '\\': - c = fgetc(f); - if (c == '\n') - { - len--; - break; - } - else - { - buffer[len++] = c; - goto again; - } - case '\n': - buffer[len] = '\0'; - return buffer; - case EOF: - buffer[len - 1] = '\0'; - if (feof(f)) - return buffer; - else - return NULL; - default: - break; - } - } -} - - -/* - * getline() is a wrapper function for get_line(). It returns `False' in - * case of error and expects a pointer to a buffer to store the current - * line. Additionally, the final newline character is stripped. - */ - -Boolean -getline(char **bufferp, FILE *f) -{ - size_t l; - - - *bufferp = get_line(f); - - if (!(*bufferp && **bufferp)) - return 0; - - l = strlen(*bufferp); - if (l > 0) - (*bufferp)[l - 1] = '\0'; - - return 1; -} - - -char * -newstring(char *s) -{ - char *q; - - if (s) - { - q = mymalloc(strlen(s) + 1); - (void)strcpy(q, s); - return q; - } - else - return NULL; -} - - -ttfinfo * -newchar(Font *fnt) -{ - register ttfinfo *ti; - - - ti = (ttfinfo *)mymalloc(sizeof (ttfinfo)); - - ti->next = fnt->charlist; - - ti->charcode = -1; - ti->glyphindex = -1; - ti->incode = -1; - ti->outcode = -1; - ti->adobename = NULL; - - ti->width = -1; - ti->llx = -1; - ti->lly = -1; - ti->urx = -1; - ti->ury = -1; - - ti->ligs = NULL; - ti->kerns = NULL; - ti->kern_equivs = NULL; - ti->pccs = NULL; - - ti->constructed = False; - - ti->wptr = 0; - ti->hptr = 0; - ti->dptr = 0; - ti->iptr = 0; - - fnt->charlist = ti; - - return ti; -} - - -kern * -newkern(void) -{ - register kern *nk; - - - nk = (kern *)mymalloc(sizeof (kern)); - nk->next = NULL; - nk->succ = NULL; - nk->delta = 0; - - return nk; -} - - -pcc * -newpcc(void) -{ - register pcc *np; - - - np = (pcc *)mymalloc(sizeof (pcc)); - np->next = NULL; - np->partname = NULL; - np->xoffset = 0; - np->yoffset = 0; - - return np; -} - - -lig * -newlig(void) -{ - register lig *nl; - - - nl = (lig *)mymalloc(sizeof (lig)); - nl->next = NULL; - nl->succ = NULL; - nl->sub = NULL; - nl->op = 0; /* the default =: op */ - nl->boundleft = 0; - - return nl; -} - - -stringlist * -newstringlist(void) -{ - register stringlist *sl; - - - sl = (stringlist *)mymalloc(sizeof (stringlist)); - sl->next = NULL; - sl->old_name = NULL; - sl->new_name = NULL; - sl->single_replacement = False; - - return sl; -} - - -void -init_font_structure(Font *fnt) -{ - int i; - - - fnt->ttfname = NULL; - - fnt->tfm_path = NULL; - fnt->tfm_ext = NULL; - - fnt->outname = NULL; - fnt->subfont_name = NULL; - fnt->outname_postfix = NULL; - fnt->fullname = NULL; - - fnt->vplout = NULL; - fnt->tfmout = NULL; - - fnt->inencname = NULL; - fnt->inencoding = NULL; - - fnt->replacements = NULL; - fnt->replacementname = NULL; - - fnt->outencname = NULL; - fnt->outencoding = NULL; - - fnt->sfdname = NULL; - - fnt->sawligkern = False; - fnt->subfont_ligs = False; - - fnt->charlist = NULL; - - fnt->boundarychar = -1; - fnt->codingscheme = default_codingscheme; - fnt->titlebuf = NULL; - - fnt->units_per_em = 0; - fnt->italicangle = 0.0; - fnt->fixedpitch = 0; - - fnt->fontindex = 0; - fnt->pid = 3; - fnt->eid = 1; - - fnt->xheight = 400; - fnt->fontspace = 0; - - fnt->y_offset = 0.25; - - fnt->efactor = 1.0; - fnt->slant = 0; - fnt->capheight = 0.8; - fnt->PSnames = No; - fnt->rotate = No; - - fnt->efactorparam = NULL; - fnt->slantparam = NULL; - fnt->fontindexparam = NULL; - fnt->pidparam = NULL; - fnt->eidparam = NULL; - fnt->y_offsetparam = NULL; - - for (i = 0; i < 256; i++) - { - fnt->inencptrs[i] = NULL; - fnt->outencptrs[i] = NULL; - fnt->uppercase[i] = NULL; - fnt->lowercase[i] = NULL; - fnt->sf_code[i] = -1; - fnt->nextout[i] = -1; /* encoding chains have length 0 */ - } -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/newobj.h diff -u xc/extras/FreeType/contrib/ttf2pk/newobj.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/newobj.h:removed --- xc/extras/FreeType/contrib/ttf2pk/newobj.h:1.1.1.2 Sat Feb 12 23:55:08 2000 +++ xc/extras/FreeType/contrib/ttf2pk/newobj.h Wed Mar 16 20:59:31 2005 @@ -1,43 +0,0 @@ -/* - * newobj.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef NEWOBJ_H -#define NEWOBJ_H - -#include -#include "ttf2tfm.h" - - -#if (defined(MSDOS) && defined(__TURBOC__)) || \ - (defined(OS2) && defined(_MSC_VER)) -#define SMALLMALLOC -#endif - - -void *mymalloc(size_t len); -void *mycalloc(size_t len); -void *myrealloc(void *oldp, size_t len); - -char *get_line(FILE *f); -Boolean getline(char **bufferp, FILE *f); -char *newstring(char *s); - -ttfinfo *newchar(Font *fnt); -kern *newkern(void); -pcc *newpcc(void); -lig *newlig(void); -stringlist *newstringlist(void); - -void init_font_structure(Font *fnt); - -#endif /* NEWOBJ_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/parse.c diff -u xc/extras/FreeType/contrib/ttf2pk/parse.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/parse.c:removed --- xc/extras/FreeType/contrib/ttf2pk/parse.c:1.1.1.2 Sat Feb 12 23:55:07 2000 +++ xc/extras/FreeType/contrib/ttf2pk/parse.c Wed Mar 16 20:59:31 2005 @@ -1,304 +0,0 @@ -/* - * parse.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include /* for size_t */ -#include -#include - -#include "ttf2tfm.h" -#include "errormsg.h" -#include "newobj.h" -#include "ligkern.h" -#include "texenc.h" -#include "parse.h" -#include "filesrch.h" - - -/* - * Here we get a token from the encoding file. We parse just as much - * PostScript as we expect to find in an encoding file. We allow - * commented lines and names like 0, .notdef, _foo_. We do not allow - * //abc. - * - * `bufferp' is a pointer to the current line; the offset of the beginning - * of the token to be parsed relative to `bufferp' will be returned in - * `offsetp'. On the first call of gettoken() `init' must be set to 1 and - * to 0 on the following calls. - * - * If `ignoreligkern' is `True', no LIGKERN data will be extracted from the - * encoding file. - * - * Don't modify `bufferp'! - * - * The memory management of `bufferp' will be done by gettoken() itself; - * nevertheless, it returns a pointer to the current token which should be - * freed after it has been used. - */ - -static char * -gettoken(char **bufferp, size_t *offsetp, FILE *f, Font *fnt, - Boolean ignoreligkern, Boolean init) -{ - char *p, *q; - char tempchar; - static char *curp; - - - if (init) - curp = NULL; - - while (1) - { - while (curp == NULL || *curp == '\0') - { - if (*bufferp) - free(*bufferp); - - if (getline(bufferp, f) == False) - oops("Premature end in encoding file."); - - curp = *bufferp; - - for (p = *bufferp; *p; p++) - if (*p == '%') - { - if (ignoreligkern == False) - checkligkern(p, fnt); - *p = '\0'; - break; - } - } - - while (isspace(*curp)) - curp++; - - *offsetp = curp - *bufferp; - - if (*curp) - { - if (*curp == '[' || *curp == ']' || - *curp == '{' || *curp == '}') - q = curp++; - else if (*curp == '/' || - *curp == '-' || *curp == '_' || *curp == '.' || - ('0' <= *curp && *curp <= '9') || - ('a' <= *curp && *curp <= 'z') || - ('A' <= *curp && *curp <= 'Z')) - { - q = curp++; - while (*curp == '-' || *curp == '_' || *curp == '.' || - ('0' <= *curp && *curp <= '9') || - ('a' <= *curp && *curp <= 'z') || - ('A' <= *curp && *curp <= 'Z')) - curp++; - } - else - q = curp; - - tempchar = *curp; - *curp = '\0'; - p = newstring(q); - *curp = tempchar; - return p; - } - } -} - - -/* - * This routine reads in an encoding file, given the name. It returns - * the final total structure. It performs a number of consistency checks. - */ - -encoding * -readencoding(char **enc, Font *fnt, Boolean ignoreligkern) -{ - char *real_encname; - FILE *enc_file; - char *p, *q, c; - char *buffer; - char numbuf[9]; - size_t offset; - int i; - long l; - encoding *e = (encoding *)mymalloc(sizeof (encoding)); - - - if (enc && *enc) - { - real_encname = TeX_search_encoding_file(enc); - if (!real_encname) - oops("Cannot find encoding file `%s'.", *enc); - - enc_file = fopen(real_encname, "rt"); - if (enc_file == NULL) - oops("Cannot open encoding file `%s'.", real_encname); - - buffer = NULL; - p = gettoken(&buffer, &offset, enc_file, fnt, ignoreligkern, True); - if (*p != '/' || p[1] == '\0') - boops(buffer, offset, - "First token in encoding must be literal encoding name."); - e->name = newstring(p + 1); - free(p); - - p = gettoken(&buffer, &offset, enc_file, fnt, ignoreligkern, False); - if (strcmp(p, "[")) - boops(buffer, offset, - "Second token in encoding must be mark ([) token."); - free(p); - - for (i = 0; i < 256; i++) - { - p = gettoken(&buffer, &offset, enc_file, fnt, ignoreligkern, False); - if (*p != '/' || p[1] == 0) - boops(buffer, offset, - "Tokens 3 to 257 in encoding must be literal names."); - - /* now we test for a generic code point resp. glyph index value */ - - c = p[2]; - if (p[1] == '.' && (c == 'c' || c == 'g') && '0' <= p[3] && p[3] <= '9') - { - l = strtol(p + 3, &q, 0); - if (*q != '\0' || l < 0 || l > 0xFFFF) - boops(buffer, offset, "Invalid encoding token."); - sprintf(numbuf, ".%c0x%x", c, (unsigned int)l); - e->vec[i] = newstring(numbuf); - } - else - e->vec[i] = newstring(p + 1); - - free(p); - } - - p = gettoken(&buffer, &offset, enc_file, fnt, ignoreligkern, False); - if (strcmp(p, "]")) - boops(buffer, offset, - "Token 258 in encoding must be make-array (])."); - free(p); - - while (getline(&buffer, enc_file)) - { - for (p = buffer; *p; p++) - if (*p == '%') - { - if (ignoreligkern == False) - checkligkern(p, fnt); - *p = '\0'; - break; - } - } - - fclose(enc_file); - - if (ignoreligkern == False && fnt->sawligkern == False) - getligkerndefaults(fnt); - } - else - { - if (ignoreligkern == False) - { - e = &staticencoding; - getligkerndefaults(fnt); - } - else - e = NULL; - } - - return e; -} - - -/* - * We scan a glyph replacement file. - * `%' is the comment character. - */ - -void -get_replacements(Font *fnt) -{ - char *real_replacement_name; - FILE *replacement_file; - char *buffer = NULL, *oldbuffer = NULL; - char *p; - char *old_name, *new_name; - stringlist *sl; - - - if (!fnt->replacementname) - return; - - real_replacement_name = TeX_search_replacement_file(&fnt->replacementname); - if (!real_replacement_name) - oops("Cannot find replacement file `%s'.", fnt->replacementname); - - replacement_file = fopen(real_replacement_name, "rt"); - if (replacement_file == NULL) - oops("Cannot open replacement file `%s'.", real_replacement_name); - - while (getline(&buffer, replacement_file)) - { - for (p = buffer; *p; p++) - if (*p == '%') - { - *p = '\0'; - break; - } - - if (oldbuffer) - free(oldbuffer); - oldbuffer = newstring(buffer); - - p = buffer; - - while (isspace(*p)) - p++; - if (!*p) - continue; - - old_name = p; - - while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; - - while (*p && isspace(*p)) - p++; - if (!*p) - boops(oldbuffer, old_name - oldbuffer, "Replacement glyph missing."); - - new_name = p; - - while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; - - while (*p && isspace(*p)) - p++; - if (*p) - boops(oldbuffer, p - oldbuffer, "Invalid replacement syntax."); - - sl = newstringlist(); - sl->new_name = newstring(new_name); - sl->old_name = newstring(old_name); - sl->next = fnt->replacements; - fnt->replacements = sl; - } - - fclose(replacement_file); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/parse.h diff -u xc/extras/FreeType/contrib/ttf2pk/parse.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/parse.h:removed --- xc/extras/FreeType/contrib/ttf2pk/parse.h:1.1.1.2 Sat Feb 12 23:55:08 2000 +++ xc/extras/FreeType/contrib/ttf2pk/parse.h Wed Mar 16 20:59:31 2005 @@ -1,22 +0,0 @@ -/* - * parse.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef PARSE_H -#define PARSE_H - -#include "ttf2tfm.h" - -encoding *readencoding(char **enc, Font *fnt, Boolean ignoreligkern); -void get_replacements(Font *fnt); - -#endif /* PARSE_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/pklib.c diff -u xc/extras/FreeType/contrib/ttf2pk/pklib.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/pklib.c:removed --- xc/extras/FreeType/contrib/ttf2pk/pklib.c:1.1.1.2 Sat Feb 12 23:55:08 2000 +++ xc/extras/FreeType/contrib/ttf2pk/pklib.c Wed Mar 16 20:59:31 2005 @@ -1,872 +0,0 @@ -/* - * pklib.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -/* - * This code has been derived from the program gsftopk. - * Here the original copyright. - */ - -/* - * Copyright (c) 1994 Paul Vojta. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include -#include -#include /* for size_t */ -#include -#include -#include - -#include "newobj.h" -#include "pklib.h" -#include "errormsg.h" -#include "filesrch.h" - -#ifndef MAXPATHLEN -#define MAXPATHLEN 256 -#endif - -#define PK_PRE (char)247 -#define PK_ID 89 -#define PK_POST (char)245 -#define PK_NOP (char)246 - -int dpi; - -FILE *pk_file; - - -/* - * Information from the .tfm file. - */ - -int tfm_lengths[12]; - -#define lh tfm_lengths[1] -#define bc tfm_lengths[2] -#define ec tfm_lengths[3] -#define nw tfm_lengths[4] - -long checksum; -long design; -byte width_index[256]; -long tfm_widths[256]; - -/* - * Information on the bitmap currently being worked on. - */ - -byte *bitmap; -int width; -int skip; -int height; -int hoff; -int voff; -int bytes_wide; -size_t bm_size; -byte *bitmap_end; -int pk_len; - -/* - * Here's the path searching stuff. First the typedefs and variables. - */ - -static char searchpath[MAXPATHLEN + 1]; - -#define HUNKSIZE (MAXPATHLEN + 2) - -struct spacenode /* used for storage of directory names */ -{ - struct spacenode *next; - char *sp_end; /* end of data for this chunk */ - char sp[HUNKSIZE]; -} firstnode; - - - -static FILE * -search_tfm(char **name) -{ - char *p; - FILE *f; - - - p = TeX_search_tfm(name); - if (p == NULL) - return NULL; - strcpy(searchpath, p); - f = fopen(searchpath, "rb"); - return f; -} - - -static long -getlong(FILE *f) -{ - unsigned long value; - - - value = (unsigned long)getc(f) << 24; - value |= (unsigned long)getc(f) << 16; - value |= (unsigned long)getc(f) << 8; - value |= (unsigned long)getc(f); - return value; -} - - -char line[82]; - - -static byte masks[] = {0, 1, 3, 7, 017, 037, 077, 0177, 0377}; - -byte flag; -int pk_dyn_f; -int pk_dyn_g; -int base; /* cost of this character if pk_dyn_f = 0 */ -int deltas[13]; /* cost of increasing pk_dyn_f from i to i+1 */ - - -/* - * Add up statistics for putting out the given shift count. - */ - -static void -tallyup(int n) -{ - int m; - - - if (n > 208) - { - ++base; - n -= 192; - for (m = 0x100; m != 0 && m < n; m <<= 4) - base += 2; - if (m != 0 && (m = (m - n) / 15) < 13) - deltas[m] += 2; - } - else if (n > 13) - ++deltas[(208 - n) / 15]; - else - --deltas[n - 1]; -} - - -/* - * Routines for storing the shift counts. - */ - -static Boolean odd = False; -static byte part; - - -static void -pk_put_nyb(int n) -{ - if (odd) - { - *bitmap_end++ = (part << 4) | n; - odd = False; - } - else - { - part = n; - odd = True; - } -} - - -static void -pk_put_long(int n) -{ - if (n >= 16) - { - pk_put_nyb(0); - pk_put_long(n / 16); - } - pk_put_nyb(n % 16); -} - - -static void -pk_put_count(int n) -{ - if (n > pk_dyn_f) - { - if (n > pk_dyn_g) - pk_put_long(n - pk_dyn_g + 15); - else - { - pk_put_nyb(pk_dyn_f + (n - pk_dyn_f + 15) / 16); - pk_put_nyb((n - pk_dyn_f - 1) % 16); - } - } - else - pk_put_nyb(n); -} - - -static void -trim_bitmap(void) -{ - byte *p; - byte mask; - - - /* clear out garbage bits in bitmap */ - - if (width % 8 != 0) - { - mask = ~masks[8 - width % 8]; - for (p = bitmap + bytes_wide - 1; p < bitmap_end; p += bytes_wide) - *p &= mask; - } - - /* Find the bounding box of the bitmap. */ - - /* trim top */ - - skip = 0; - mask = 0; - - for (;;) - { - if (bitmap >= bitmap_end) /* if bitmap is empty */ - { - width = height = hoff = voff = 0; - return; - } - - p = bitmap + bytes_wide; - while (p > bitmap) - mask |= *--p; - if (mask) - break; - ++skip; - bitmap += bytes_wide; - } - - height -= skip; - voff -= skip; - -#ifdef DEBUG - if (skip < 2 || skip > 3) - printf("Character has %d empty rows at top\n", skip); -#endif - - /* trim bottom */ - - skip = 0; - mask = 0; - - for (;;) - { - p = bitmap_end - bytes_wide; - while (p < bitmap_end) - mask |= *p++; - if (mask) - break; - ++skip; - bitmap_end -= bytes_wide; - } - - height -= skip; - -#ifdef DEBUG - if (skip < 2 || skip > 3) - printf("Character has %d empty rows at bottom\n", skip); -#endif - - /* trim right */ - - skip = 0; - --width; - - for (;;) - { - mask = 0; - for (p = bitmap + width / 8; p < bitmap_end; p += bytes_wide) - mask |= *p; - if (mask & (0x80 >> (width % 8))) - break; - - --width; - ++skip; - } - - ++width; - -#ifdef DEBUG - if (skip < 2 || skip > 3) - printf("Character has %d empty columns at right\n", skip); -#endif - - /* trim left */ - - skip = 0; - - for (;;) - { - mask = 0; - for (p = bitmap + skip / 8; p < bitmap_end; p += bytes_wide) - mask |= *p; - if (mask & (0x80 >> (skip % 8))) - break; - - ++skip; - } - - width -= skip; - hoff -= skip; - -#ifdef DEBUG - if (skip < 2 || skip > 3) - printf("Character has %d empty columns at left\n", skip); -#endif - - bitmap += skip / 8; - skip = skip % 8; -} - - -/* - * Pack the bitmap using the rll method. (Return false if it's better - * to just pack the bits.) - */ - -static Boolean -pk_rll_cvt(void) -{ - static int *counts = NULL; /* area for saving bit counts */ - static int maxcounts = 0; /* size of this area */ - unsigned int ncounts; /* max to allow this time */ - int *nextcount; /* next count value */ - - int *counts_end; /* pointer to end */ - byte *rowptr; - byte *p; - byte mask; - byte *rowdup; /* last row checked for dup */ - byte paint_switch; /* 0 or 0xff */ - int bits_left; /* bits left in row */ - int cost; - int i; - - - /* Allocate space for bit counts. */ - - ncounts = (width * height + 3) / 4; - if (ncounts > maxcounts) - { - if (counts != NULL) - free(counts); - counts = (int *)mymalloc((ncounts + 2) * sizeof (int)); - maxcounts = ncounts; - } - counts_end = counts + ncounts; - - /* Form bit counts and collect statistics */ - - base = 0; - memset(deltas, 0, sizeof (deltas)); - rowdup = NULL; /* last row checked for duplicates */ - p = rowptr = bitmap; - mask = 0x80 >> skip; - flag = 0; - paint_switch = 0; - - if (*p & mask) - { - flag = 8; - paint_switch = 0xff; - } - - bits_left = width; - nextcount = counts; - - while (rowptr < bitmap_end) /* loop over shift counts */ - { - int shift_count = bits_left; - - - for (;;) - { - if (bits_left == 0) - { - if ((p = rowptr += bytes_wide) >= bitmap_end) - break; - mask = 0x80 >> skip; - bits_left = width; - shift_count += width; - } - if (((*p ^ paint_switch) & mask) != 0) - break; - --bits_left; - mask >>= 1; - if (mask == 0) - { - ++p; - while (*p == paint_switch && bits_left >= 8) - { - ++p; - bits_left -= 8; - } - mask = 0x80; - } - } - - if (nextcount >= counts_end) - return False; - shift_count -= bits_left; - *nextcount++ = shift_count; - tallyup(shift_count); - - /* check for duplicate rows */ - if (rowptr != rowdup && bits_left != width) - { - byte *p1 = rowptr; - byte *q = rowptr + bytes_wide; - int repeat_count; - - - while (q < bitmap_end && *p1 == *q) - { - ++p1; - ++q; - } - repeat_count = (p1 - rowptr) / bytes_wide; - if (repeat_count > 0) - { - *nextcount++ = -repeat_count; - if (repeat_count == 1) - --base; - else - { - ++base; - tallyup(repeat_count); - } - rowptr += repeat_count * bytes_wide; - } - rowdup = rowptr; - } - paint_switch = ~paint_switch; - } - -#ifdef DEBUG - /* - * Dump the bitmap - */ - - for (p = bitmap; p < bitmap_end; p += bytes_wide) - { - byte *p1 = p; - int j; - - - mask = 0x80 >> skip; - for (j = 0; j < width; ++j) - { - putchar(*p1 & mask ? '@' : '.'); - if ((mask >>= 1) == 0) - { - mask = 0x80; - ++p1; - } - } - putchar('\n'); - } - putchar('\n'); -#endif - - /* Determine the best pk_dyn_f */ - - pk_dyn_f = 0; - cost = base += 2 * (nextcount - counts); - - for (i = 1; i < 14; ++i) - { - base += deltas[i - 1]; - if (base < cost) - { - pk_dyn_f = i; - cost = base; - } - } - - /* last chance to bail out */ - - if (cost * 4 > width * height) - return False; - - /* Pack the bit counts */ - - pk_dyn_g = 208 - 15 * pk_dyn_f; - flag |= pk_dyn_f << 4; - bitmap_end = bitmap; - *nextcount = 0; - nextcount = counts; - - while (*nextcount != 0) - { - if (*nextcount > 0) - pk_put_count(*nextcount); - else - if (*nextcount == -1) - pk_put_nyb(15); - else - { - pk_put_nyb(14); - pk_put_count(-*nextcount); - } - ++nextcount; - } - - if (odd) - { - pk_put_nyb(0); - ++cost; - } - - if (cost != 2 * (bitmap_end - bitmap)) - printf("Cost miscalculation: expected %d, got %ld\n", - cost, (long)(2 * (bitmap_end - bitmap))); - pk_len = bitmap_end - bitmap; - return True; -} - - -static void -pk_bm_cvt(void) -{ - byte *rowptr; - byte *p; - int blib1; /* bits left in byte */ - int bits_left; /* bits left in row */ - byte *q; - int blib2; - byte nextbyte; - - - flag = 14 << 4; - q = bitmap; - blib2 = 8; - nextbyte = 0; - - for (rowptr = bitmap; rowptr < bitmap_end; rowptr += bytes_wide) - { - p = rowptr; - blib1 = 8 - skip; - bits_left = width; - - if (blib2 != 8) - { - int n; - - - if (blib1 < blib2) - { - nextbyte |= *p << (blib2 - blib1); - n = blib1; - } - else - { - nextbyte |= *p >> (blib1 - blib2); - n = blib2; - } - blib2 -= n; - if ((bits_left -= n) < 0) - { - blib2 -= bits_left; - continue; - } - if ((blib1 -= n) == 0) - { - blib1 = 8; - ++p; - if (blib2 > 0) - { - nextbyte |= *p >> (8 - blib2); - blib1 -= blib2; - bits_left -= blib2; - if (bits_left < 0) - { - blib2 = -bits_left; - continue; - } - } - } - *q++ = nextbyte; - } - - /* fill up whole (destination) bytes */ - - while (bits_left >= 8) - { - nextbyte = *p++ << (8 - blib1); - *q++ = nextbyte | (*p >> blib1); - bits_left -= 8; - } - - /* now do the remainder */ - - nextbyte = *p << (8 - blib1); - if (bits_left > blib1) - nextbyte |= p[1] >> blib1; - blib2 = 8 - bits_left; - } - - if (blib2 != 8) - *q++ = nextbyte; - - pk_len = q - bitmap; -} - - -static void -putshort(short w) -{ - putc(w >> 8, pk_file); - putc(w, pk_file); -} - - -static void -putmed(long w) -{ - putc(w >> 16, pk_file); - putc(w >> 8, pk_file); - putc(w, pk_file); -} - - -static void -putlong(long w) -{ - putc(w >> 24, pk_file); - putc(w >> 16, pk_file); - putc(w >> 8, pk_file); - putc(w, pk_file); -} - - -char -xgetc(FILE *f) -{ - int c; - - - c = getc(f); - if (c == EOF) - oops("Premature end of file."); - return (byte)c; -} - - -/* - * Open and read the tfm file. - */ - -void -TFMopen(char **filename) -{ - FILE *tfm_file; - int i; - int cc; - - - tfm_file = search_tfm(filename); - if (tfm_file == NULL) - oops("Cannot find tfm file."); - - for (i = 0; i < 12; i++) - { - int j; - - - j = (int)((byte)getc(tfm_file)) << 8; - tfm_lengths[i] = j | (int)((byte)xgetc(tfm_file)); - } - - checksum = getlong(tfm_file); - design = getlong(tfm_file); - fseek(tfm_file, 4 * (lh + 6), 0); - - for (cc = bc; cc <= ec; ++cc) - { - width_index[cc] = (byte)xgetc(tfm_file); - - (void)xgetc(tfm_file); - (void)xgetc(tfm_file); - (void)xgetc(tfm_file); - } - - for (i = 0; i < nw; ++i) - tfm_widths[i] = getlong(tfm_file); - - fclose(tfm_file); -} - - -/* - * Create pk file and write preamble. - */ - -void -PKopen(char *filename, - char *ident, - int resolution) -{ - int ppp; - int i; - - - dpi = resolution; - - if ((pk_file = fopen(filename, "wb")) == NULL) - { - perror(filename); - exit(1); - } - - putc(PK_PRE, pk_file); - putc(PK_ID, pk_file); - - i = strlen(ident); - - putc(i, pk_file); - fwrite(ident, 1, i, pk_file); - putlong(design); - putlong(checksum); - ppp = dpi / 72.27 * 65536.0 + 0.5; - putlong(ppp); /* hppp */ - putlong(ppp); /* vppp */ -} - - -void -PKputglyph(int cc, - int llx, int lly, int urx, int ury, - int w, int h, - byte *b) -{ - float char_width; - - long dm; - long tfm_wid; - - - bitmap = b; - width = w; - height = h; - - hoff = -llx; - voff = ury - 2; /* Don't ask me why `-2' */ - /* Fred */ - - if (width != urx - llx || height != ury - lly) - oops("Dimensions do not match: (%d - %d) (%d - %d) <=> %d %d", - llx, lly, urx, ury, width, height); - - bytes_wide = (width + 7) / 8; - bm_size = bytes_wide * height; - bitmap_end = bitmap + bm_size; - - trim_bitmap(); - - if (height == 0 || !pk_rll_cvt()) - pk_bm_cvt(); - - if (!width_index[cc]) - return; - - tfm_wid = tfm_widths[width_index[cc]]; - char_width = tfm_wid / 1048576.0 * design / 1048576.0 * dpi / 72.27; - dm = (long)(char_width + 0.5) - (char_width < -0.5); - - if (pk_len + 8 < 4 * 256 && tfm_wid < (1<<24) && - dm >= 0 && dm < 256 && width < 256 && height < 256 && - hoff >= -128 && hoff < 128 && voff >= -128 && voff < 128) - { - putc(flag | ((pk_len + 8) >> 8), pk_file); - putc(pk_len + 8, pk_file); - putc(cc, pk_file); - putmed(tfm_wid); - putc(dm, pk_file); - putc(width, pk_file); - putc(height, pk_file); - putc(hoff, pk_file); - putc(voff, pk_file); - } - else if (pk_len + 13 < 3 * 65536L && tfm_wid < (1<<24) && - dm >= 0 && dm < 65536L && width < 65536L && height < 65536L && - hoff >= -65536L && hoff < 65536L && - voff >= -65536L && voff < 65536L) - { - putc(flag | 4 | ((pk_len + 13) >> 16), pk_file); - putshort(pk_len + 13); - putc(cc, pk_file); - putmed(tfm_wid); - putshort(dm); - putshort(width); - putshort(height); - putshort(hoff); - putshort(voff); - } - else - { - putc(flag | 7, pk_file); - putlong(pk_len + 28); - putlong(cc); - putlong(tfm_wid); - putlong((long)(char_width * 65536.0 + 0.5) - (char_width < -0.5)); - putlong(0); - putlong(width); - putlong(height); - putlong(hoff); - putlong(voff); - } - fwrite(bitmap, 1, pk_len, pk_file); -} - - -void -PKclose(void) -{ - putc(PK_POST, pk_file); - while (ftell(pk_file) % 4 != 0) - putc(PK_NOP, pk_file); - - fclose(pk_file); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/pklib.h diff -u xc/extras/FreeType/contrib/ttf2pk/pklib.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/pklib.h:removed --- xc/extras/FreeType/contrib/ttf2pk/pklib.h:1.1.1.2 Sat Feb 12 23:55:09 2000 +++ xc/extras/FreeType/contrib/ttf2pk/pklib.h Wed Mar 16 20:59:31 2005 @@ -1,29 +0,0 @@ -/* - * pklib.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef PKLIB_H -#define PKLIB_H - -typedef unsigned char byte; - - -void TFMopen(char **filename); - -void PKopen(char *filename, char *ident, int resolution); - -void PKputglyph(int cc, int llx, int lly, int urx, int ury, - int w, int h, byte *b); - -void PKclose(void); - -#endif /* PKLIB_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/subfont.c diff -u xc/extras/FreeType/contrib/ttf2pk/subfont.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/subfont.c:removed --- xc/extras/FreeType/contrib/ttf2pk/subfont.c:1.1.1.2 Sat Feb 12 23:55:09 2000 +++ xc/extras/FreeType/contrib/ttf2pk/subfont.c Wed Mar 16 20:59:31 2005 @@ -1,264 +0,0 @@ -/* - * subfont.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include /* for size_t */ -#include -#include - -#include "filesrch.h" -#include "subfont.h" -#include "newobj.h" -#include "errormsg.h" - - -static char *real_sfd_name; -static FILE *sfd; - - -/* - * Initialize subfont functionality. The argument is the subfont - * definition file name. If `fatal' is `True', the routine exits - * with an error. If `fatal' is `False', a warning message is emitted - * and `False' returned if an error occurs; in case of success `True' - * will be returned. - */ - -Boolean -init_sfd(Font *fnt, Boolean fatal) -{ - real_sfd_name = TeX_search_sfd_file(&(fnt->sfdname)); - if (!real_sfd_name) - { - if (fatal) - oops("Cannot find subfont definition file `%s'.", fnt->sfdname); - else - { - warning("Cannot find subfont definition file `%s'.", fnt->sfdname); - return False; - } - } - - sfd = fopen(real_sfd_name, "rt"); - if (sfd == NULL) - { - if (fatal) - oops("Cannot open subfont definition file `%s'.", fnt->sfdname); - else - { - warning("Cannot open subfont definition file `%s'.", fnt->sfdname); - return False; - } - } - - return True; -} - - -/* - * This function fills the font structure sequentially with subfont - * entries; it returns `False' if no more subfont entries are available, - * `True' otherwise. - * - * fnt->subfont_name must be set to NULL before the first call. - * - * The subset parser was inspired by ttf2bdf.c . - */ - -Boolean -get_sfd(Font *fnt) -{ - long i, offset; - long begin, end = -1; - char *buffer, *oldbuffer, *bufp, *bufp2, *bufp3; - - - for (i = 0; i < 256; i++) - fnt->sf_code[i] = -1; - -again: - - buffer = get_line(sfd); - if (!buffer) - oops("Error reading subfont definition file `%s'.", real_sfd_name); - if (!*buffer) - return False; - - oldbuffer = newstring(buffer); - bufp = buffer; - offset = 0; - - while (*bufp) /* remove comment */ - { - if (*bufp == '#') - { - bufp++; - break; - } - bufp++; - } - *(--bufp) = '\0'; /* remove final newline character */ - - bufp = buffer; - - while (isspace(*bufp)) - bufp++; - - if (*bufp == '\0') /* empty line? */ - { - free(buffer); - free(oldbuffer); - goto again; - } - - while (*bufp && !isspace(*bufp)) /* subfont name */ - bufp++; - *(bufp++) = '\0'; - - while (isspace(*bufp)) - bufp++; - - if (*bufp == '\0') - oops("Invalid subfont entry in `%s'.", real_sfd_name); - - if (fnt->subfont_name) - free(fnt->subfont_name); - fnt->subfont_name = newstring(buffer); - - while (1) - { - bufp3 = bufp; - - begin = strtol(bufp, &bufp2, 0); - - if (bufp == bufp2 || begin < 0 || begin > 0xFFFF) - boops(oldbuffer, bufp - buffer, - "Invalid subfont range or offset entry."); - - if (*bufp2 == ':') /* offset */ - { - offset = begin; - if (offset > 0xFF) - boops(oldbuffer, bufp - buffer, "Invalid subfont offset."); - - bufp = bufp2 + 1; - - while (isspace(*bufp)) - bufp++; - - continue; - } - else if (*bufp2 == '_') /* range */ - { - bufp = bufp2 + 1; - if (!isdigit(*bufp)) - boops(oldbuffer, bufp - buffer, "Invalid subfont range entry."); - - end = strtol(bufp, &bufp2, 0); - - if (bufp == bufp2 || end < 0 || end > 0xFFFFL) - boops(oldbuffer, bufp - buffer, "Invalid subfont range entry."); - if (*bufp2 && !isspace(*bufp2)) - boops(oldbuffer, bufp2 - buffer, "Invalid subfont range entry."); - if (end < begin) - boops(oldbuffer, bufp - buffer, "End of subfont range too small."); - if (offset + (end - begin) > 255) - boops(oldbuffer, bufp3 - buffer, - "Subfont range too large for current offset (%i).", offset); - } - else if (isspace(*bufp2) || !*bufp2) /* single value */ - end = begin; - else - boops(oldbuffer, bufp2 - buffer, "Invalid subfont range entry."); - - for (i = begin; i <= end; i++) - { - if (fnt->sf_code[offset] != -1) - boops(oldbuffer, bufp3 - buffer, "Overlapping subfont ranges."); - - fnt->sf_code[offset++] = i; - } - - bufp = bufp2; - - while (isspace(*bufp)) - bufp++; - - if (!*bufp) - break; - } - - free(buffer); - free(oldbuffer); - - return True; -} - - -void -close_sfd(void) -{ - if (sfd) - fclose(sfd); -} - - -/* - * We extract the subfont definition file name. The name must - * be embedded between two `@' characters. If there is no sfd file, - * `sfd_begin' is set to -1. - * - * The `@' characters will be replaced with null characters. - */ - -void -handle_sfd(char *s, int *sfd_begin, int *postfix_begin) -{ - size_t len; - int i; - Boolean have_atsign; - - - have_atsign = False; - len = strlen(s); - *sfd_begin = -1; - *postfix_begin = -1; - - for (i = 0; s[i]; i++) - { - if (s[i] == '@') - { - if (have_atsign) - { - *postfix_begin = i + 1; - - s[i] = '\0'; - break; - } - have_atsign = True; - *sfd_begin = i + 1; - - s[i] = '\0'; - } - } - - if (*sfd_begin != -1 && - (*postfix_begin == -1 || *postfix_begin < *sfd_begin + 2)) - oops("Invalid subfont definition file name."); - - if (*postfix_begin > -1) - for (i = *postfix_begin; s[i]; i++) - if (s[i] == '/' || s[i] == ':' || s[i] == '\\' || s[i] == '@') - oops("`/', `:', `\\', and `@' not allowed after second `@'."); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/subfont.h diff -u xc/extras/FreeType/contrib/ttf2pk/subfont.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/subfont.h:removed --- xc/extras/FreeType/contrib/ttf2pk/subfont.h:1.1.1.2 Sat Feb 12 23:55:10 2000 +++ xc/extras/FreeType/contrib/ttf2pk/subfont.h Wed Mar 16 20:59:31 2005 @@ -1,26 +0,0 @@ -/* - * subfont.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef SUBFONT_H -#define SUBFONT_H - -#include "ttf2tfm.h" - - -Boolean init_sfd(Font *fnt, Boolean fatal); -Boolean get_sfd(Font *fnt); -void close_sfd(void); - -void handle_sfd(char *s, int *sfd_begin, int *postfix_begin); - -#endif /* SUBFONT_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/texenc.c diff -u xc/extras/FreeType/contrib/ttf2pk/texenc.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/texenc.c:removed --- xc/extras/FreeType/contrib/ttf2pk/texenc.c:1.1.1.2 Sat Feb 12 23:55:10 2000 +++ xc/extras/FreeType/contrib/ttf2pk/texenc.c Wed Mar 16 20:59:31 2005 @@ -1,203 +0,0 @@ -/* - * texenc.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include /* for definition of NULL */ - -#include "ttf2tfm.h" -#include "texenc.h" - - -encoding staticencoding = -{ - "TeX text", - {"Gamma", "Delta", "Theta", "Lambda", - "Xi", "Pi", "Sigma", "Upsilon", - "Phi", "Psi", "Omega", "arrowup", - "arrowdown", "quotesingle", "exclamdown", "questiondown", - - "dotlessi", "dotlessj", "grave", "acute", - "caron", "breve", "macron", "ring", - "cedilla", "germandbls", "ae", "oe", - "oslash", "AE", "OE", "Oslash", - - "space", "exclam", "quotedbl", "numbersign", - "dollar", "percent", "ampersand", "quoteright", - "parenleft", "parenright", "asterisk", "plus", - "comma", "hyphen", "period", "slash", - - "zero", "one", "two", "three", - "four", "five", "six", "seven", - "eight", "nine", "colon", "semicolon", - "less", "equal", "greater", "question", - - "at", "A", "B", "C", - "D", "E", "F", "G", - "H", "I", "J", "K", - "L", "M", "N", "O", - - "P", "Q", "R", "S", - "T", "U", "V", "W", - "X", "Y", "Z", "bracketleft", - "backslash", "bracketright", "circumflex", "underscore", - - "quoteleft", "a", "b", "c", - "d", "e", "f", "g", - "h", "i", "j", "k", - "l", "m", "n", "o", - - "p", "q", "r", "s", - "t", "u", "v", "w", - "x", "y", "z", "braceleft", - "bar", "braceright", "tilde", "dieresis", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - ".notdef", ".notdef", ".notdef", ".notdef", - } -}; - - -/* - * It's easier to put this in static storage and parse it as we go - * than to build the structures ourselves. - * - * The semicolons in the LIGKERN lines must be left isolated. - */ - -char *staticligkern[] = -{ - "% LIGKERN space l =: lslash ; space L =: Lslash ;", - "% LIGKERN question quoteleft =: questiondown ;", - "% LIGKERN exclam quoteleft =: exclamdown ;", - "% LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ;", - "% LIGKERN quoteleft quoteleft =: quotedblleft ;", - "% LIGKERN quoteright quoteright =: quotedblright ;", - "% LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ;", - "% LIGKERN one {} * ; * {} one ; two {} * ; * {} two ;", - "% LIGKERN three {} * ; * {} three ; four {} * ; * {} four ;", - "% LIGKERN five {} * ; * {} five ; six {} * ; * {} six ;", - "% LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ;", - "% LIGKERN nine {} * ; * {} nine ;", - - /* - * Kern accented characters the same way as their base. - */ - - "% LIGKERN Aacute <> A ; aacute <> a ;", - "% LIGKERN Acircumflex <> A ; acircumflex <> a ;", - "% LIGKERN Adieresis <> A ; adieresis <> a ;", - "% LIGKERN Agrave <> A ; agrave <> a ;", - "% LIGKERN Aring <> A ; aring <> a ;", - "% LIGKERN Atilde <> A ; atilde <> a ;", - "% LIGKERN Ccedilla <> C ; ccedilla <> c ;", - "% LIGKERN Eacute <> E ; eacute <> e ;", - "% LIGKERN Ecircumflex <> E ; ecircumflex <> e ;", - "% LIGKERN Edieresis <> E ; edieresis <> e ;", - "% LIGKERN Egrave <> E ; egrave <> e ;", - "% LIGKERN Iacute <> I ; iacute <> i ;", - "% LIGKERN Icircumflex <> I ; icircumflex <> i ;", - "% LIGKERN Idieresis <> I ; idieresis <> i ;", - "% LIGKERN Igrave <> I ; igrave <> i ;", - "% LIGKERN Ntilde <> N ; ntilde <> n ;", - "% LIGKERN Oacute <> O ; oacute <> o ;", - "% LIGKERN Ocircumflex <> O ; ocircumflex <> o ;", - "% LIGKERN Odieresis <> O ; odieresis <> o ;", - "% LIGKERN Ograve <> O ; ograve <> o ;", - "% LIGKERN Oslash <> O ; oslash <> o ;", - "% LIGKERN Otilde <> O ; otilde <> o ;", - "% LIGKERN Scaron <> S ; scaron <> s ;", - "% LIGKERN Uacute <> U ; uacute <> u ;", - "% LIGKERN Ucircumflex <> U ; ucircumflex <> u ;", - "% LIGKERN Udieresis <> U ; udieresis <> u ;", - "% LIGKERN Ugrave <> U ; ugrave <> u ;", - "% LIGKERN Yacute <> Y ; yacute <> y ;", - "% LIGKERN Ydieresis <> Y ; ydieresis <> y ;", - "% LIGKERN Zcaron <> Z ; zcaron <> z ;", - - /* lig commands for default ligatures */ - - "% LIGKERN f i =: fi ; f l =: fl ; f f =: ff ; ff i =: ffi ;", - "% LIGKERN ff l =: ffl ;", - NULL -}; - -/* - * The above layout corresponds to TeX Typewriter Type and is compatible - * with TeX Text because the position of ligatures is immaterial. - */ - - -/* - * These are the eight ligature ops, in VPL terms and in METAFONT terms. - */ - -char *vplligops[] = -{ - "LIG", "/LIG", "/LIG>", "LIG/", "LIG/>", "/LIG/", "/LIG/>", "/LIG/>>", 0 -}; - -char *encligops[] = -{ - "=:", "|=:", "|=:>", "=:|", "=:|>", "|=:|", "|=:|>", "|=:|>>", 0 -}; - - -/* - * For TeX we want to compute a character height that works properly - * with accents. The following list of accents doesn't need to be - * complete. - */ - -/* - * We only do this if the xheight has a reasonable value (>50). - */ - -char *accents[] = {"acute", "tilde", "caron", "dieresis", NULL}; - -char default_codingscheme[] = "Unspecified"; - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/texenc.h diff -u xc/extras/FreeType/contrib/ttf2pk/texenc.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/texenc.h:removed --- xc/extras/FreeType/contrib/ttf2pk/texenc.h:1.1.1.2 Sat Feb 12 23:55:10 2000 +++ xc/extras/FreeType/contrib/ttf2pk/texenc.h Wed Mar 16 20:59:31 2005 @@ -1,28 +0,0 @@ -/* - * texenc.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TEXENC_H -#define TEXENC_H - -#include "ttf2tfm.h" - - -extern encoding staticencoding; -extern char *staticligkern[]; -extern char *vplligops[]; -extern char *encligops[]; -extern char *accents[]; - -extern char default_codingscheme[]; - -#endif /* TEXENC_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/tfmaux.c diff -u xc/extras/FreeType/contrib/ttf2pk/tfmaux.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/tfmaux.c:removed --- xc/extras/FreeType/contrib/ttf2pk/tfmaux.c:1.1.1.2 Sat Feb 12 23:55:11 2000 +++ xc/extras/FreeType/contrib/ttf2pk/tfmaux.c Wed Mar 16 20:59:31 2005 @@ -1,579 +0,0 @@ -/* - * tfmaux.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include -#include - -#include "ttf2tfm.h" -#include "newobj.h" -#include "tfmaux.h" -#include "errormsg.h" - - -#undef PI -#define PI 3.14159265358979323846264338327 - - -struct sf /* we need this for subfont ligatures */ -{ - long sf_code; - int position; -}; - - -static long nextd; /* smallest value that will give a different mincover */ - - -static int lf, lh, nw, nh, nd, ni, nl, nk, ne, np; -static int bc, ec; - -static long *header, *charinfo, - *width, *height, *depth, - *ligkern, *kerns, *tparam, - *italic; - - -static int source[257]; /* utility variables for sorting tfm arrays */ -static int unsort[257]; - - -/* - * A simple function for sorting sf_array (in inverse order) - */ - -static int -compare_sf(const void *a, const void *b) -{ - return (int)(((struct sf *)b)->sf_code - ((struct sf *)a)->sf_code); -} - - -/* - * The next routine simply scales something. - * Input is in TFM units per em. Output is in FIXFACTORths of units - * per em. We use 1 em = 1000 TFM units. - */ - -static long -scale(long what) -{ - return ((what / 1000) * FIXFACTOR) + - (((what % 1000) * FIXFACTOR) + 500) / 1000; -} - - -/* - * Next we need a routine to reduce the number of distinct dimensions - * in a TFM file. Given an array what[0]..what[oldn-1], we want to - * group its elements into newn clusters, in such a way that the maximum - * difference between elements of a cluster is as small as possible. - * Furthermore, what[0]=0, and this value must remain in a cluster by - * itself. Data such as `0 4 6 7 9' with newn=3 shows that an iterative - * scheme in which 6 is first clustered with 7 will not work. So we - * borrow a neat algorithm from METAFONT to find the true optimum. - * Memory location what[oldn] is set to 0x7FFFFFFFL for convenience. - */ - - -/* - * Tells how many clusters result, given max difference d. - */ - -static int -mincover(long *what, - register long d) -{ - register int m; - register long l; - register long *p; - - - nextd = 0x7FFFFFFFL; - p = what+1; - m = 1; - - while (*p < 0x7FFFFFFFL) - { - m++; - l = *p; - while (*++p <= l + d) - ; - if (*p - l < nextd) - nextd = *p - l; - } - return m; -} - - -static void -remap(long *what, - int oldn, - int newn, - int *source, - int *unsort) -{ - register int i, j; - register long d, l; - - what[oldn] = 0x7FFFFFFFL; - for (i = oldn-1; i > 0; i--) - { - d = what[i]; - for (j = i; what[j+1] < d; j++) - { - what[j] = what[j+1]; - source[j] = source[j+1]; - } - what[j] = d; - source[j] = i; - } - - i = mincover(what, 0L); - d = nextd; - while (mincover(what, d + d) > newn) - d += d; - while (mincover(what, d) > newn) - d = nextd; - - i = 1; - j = 0; - while (i < oldn) - { - j++; - l = what[i]; - unsort[source[i]] = j; - while (what[++i] <= l + d) - { - unsort[source[i]] = j; - if (i - j == oldn - newn) - d = 0; - } - what[j] = (l + what[i-1])/2; - } -} - - -void -write16(register short what, - register FILE *out) -{ - (void)fputc(what >> 8, out); - (void)fputc(what & 0xFF, out); -} - - -void -writearr(register long *p, - register int n, - register FILE *out) -{ - while (n) - { - write16((short)(*p >> 16), out); - write16((short)(*p & 65535), out); - p++; - n--; - } -} - - -void -writesarr(long *what, - int len, - FILE *out) -{ - register long *p; - int i; - - - p = what; - i = len; - while (i) - { - *p = scale(*p); - (void)scale(*p); /* need this kludge for some compilers */ - p++; - i--; - } - writearr(what, len, out); -} - - -static long * -makebcpl(register long *p, - register char *s, - register int n) -{ - register long t; - register long sc; - - - if (strlen(s) < n) - n = strlen(s); - t = ((long)n) << 24; - sc = 16; - - while (n > 0) - { - t |= ((long)(*(unsigned char *)s++)) << sc; - sc -= 8; - if (sc < 0) - { - *p++ = t; - t = 0; - sc = 24; - } - n--; - } - if (t) - *p++ = t; - - return p; -} - - -static long -checksum(ttfinfo **array) -{ - int i; - unsigned long s1 = 0, s2 = 0; - char *p; - ttfinfo *ti; - - - for (i = 0; i < 256; i++) - if (NULL != (ti = array[i])) - { - s1 = ((s1 << 1) ^ (s1 >> 31)) ^ ti->width; /* cyclic left shift */ - s1 &= 0xFFFFFFFF; /* in case we're on a 64-bit machine */ - - for (p = ti->adobename; *p; p++) - s2 = (s2 * 3) + *p; - } - - s1 = (s1 << 1) ^ s2; - return s1; -} - - -int -transform(register int x, register int y, - float ef, float sl) -{ - register double acc; - - - acc = ef * x + sl * y; - return (int)(acc >= 0 ? floor(acc + 0.5) : ceil(acc - 0.5)); -} - - -int -buildtfm(Font *fnt) -{ - register int i, j; - register ttfinfo *ti; - int byte1, old_byte1, byte2; - long cksum; - double Slant; - char buffer[256]; - struct sf sf_array[256]; - - - if (fnt->subfont_ligs) - { - for (i = 0; i < 256; i++) - { - ti = fnt->inencptrs[i]; - if (ti) - { - sf_array[i].sf_code = ti->charcode; - sf_array[i].position = i; - } - else - { - sf_array[i].sf_code = -1; - sf_array[i].position = -1; - } - } - /* we sort the subfont character codes before we build a ligkern list */ - qsort(sf_array, 256, sizeof (struct sf), compare_sf); - - /* we need to create dummy characters for the ligatures in case the - character slots of the affected codes are unused */ - i = 0; - while (i < 256 && sf_array[i].sf_code > -1) - { - byte1 = sf_array[i].sf_code >> 8; - byte2 = sf_array[i].sf_code & 0xFF; - if (!fnt->inencptrs[byte1]) - { - ti = newchar(fnt); - ti->llx = ti->lly = 0; - ti->urx = ti->ury = 0; - ti->width = 0; - fnt->inencptrs[byte1] = ti; - ti->incode = byte1; - ti->adobename = ".dummy"; - } - if (!fnt->inencptrs[byte2]) - { - ti = newchar(fnt); - ti->llx = ti->lly = 0; - ti->urx = ti->ury = 0; - ti->width = 0; - fnt->inencptrs[byte2] = ti; - ti->incode = byte2; - ti->adobename = ".dummy"; - } - i++; - } - } - - for (i = 0; i <= 0xFF && fnt->inencptrs[i] == NULL; i++) - ; - bc = i; - for (i = 0xFF; i >= 0 && fnt->inencptrs[i] == NULL; i--) - ; - ec = i; - - if (ec < bc) - { - if (fnt->sfdname) - return 0; - else - oops("No TTF characters."); - } - - header = (long *)mymalloc(40000L); - cksum = checksum(fnt->inencptrs); - header[0] = cksum; - header[1] = 0xA00000; /* 10pt design size */ - - (void)makebcpl(header + 2, fnt->codingscheme, 39); - (void)makebcpl(header + 12, fnt->fullname, 19); - - /* 4 bytes are left free for the unused FACE value */ - - buffer[0] = '\0'; - strncat(buffer, "Created by `", 12); - strncat(buffer, fnt->titlebuf, 255 - 12 - 1); - strncat(buffer, "'", 1); - charinfo = makebcpl(header + 18, buffer, 255); - lh = charinfo - header; - - width = charinfo + (ec - bc + 1); - width[0] = 0; - nw = 1; - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - { - width[nw] = ti->width; - for (j = 1; width[j] != ti->width; j++) - ; - ti->wptr = j; - if (j == nw) - nw++; - } - if (nw > 256) - oops("256 chars with different widths."); - - depth = width + nw; - depth[0] = 0; - nd = 1; - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - { - depth[nd] = -ti->lly; - for (j = 0; depth[j] != -ti->lly; j++) - ; - ti->dptr = j; - if (j == nd) - nd++; - } - - if (nd > 16) - { - remap(depth, nd, 16, source, unsort); - nd = 16; - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - ti->dptr = unsort[ti->dptr]; - } - - height = depth + nd; - height[0] = 0; - nh = 1; - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - { - height[nh] = ti->ury; - for (j = 0; height[j] != ti->ury; j++) - ; - ti->hptr = j; - if (j == nh) - nh++; - } - - if (nh > 16) - { - remap(height, nh, 16, source, unsort); - nh = 16; - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - ti->hptr = unsort[ti->hptr]; - } - - italic = height + nh; - italic[0] = 0; - ni = 1; - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - { - italic[ni] = ti->urx - ti->width; - if (italic[ni] < 0) - italic[ni] = 0; - for (j = 0; italic[j] != italic[ni]; j++) - ; - ti->iptr = j; - if (j == ni) - ni++; - } - - if (ni > 64) - { - remap(italic, ni, 64, source, unsort); - ni = 64; - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - ti->iptr = unsort[ti->iptr]; - } - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->inencptrs[i])) - charinfo[i - bc] = ((long)(ti->wptr) << 24) + - ((long)(ti->hptr) << 20) + - ((long)(ti->dptr) << 16) + - ((long)(ti->iptr) << 10); - else - charinfo[i - bc] = 0; - - ligkern = italic + ni; - nl = 0; - - if (fnt->subfont_ligs) - { - /* Now we build the ligature list. The ligature consisting of character - code byte1 + byte2 should yield the actual character. The fonts of - the HLaTeX package for Korean use this mechanism. */ - - old_byte1 = -1; - while (nl < 256 && sf_array[nl].sf_code > -1) - { - byte1 = sf_array[nl].sf_code >> 8; - byte2 = sf_array[nl].sf_code & 0xFF; - if (byte1 != old_byte1) - { - charinfo[byte1 - bc] += 0x100L + /* set the lig tag */ - nl; /* set the position in array */ - if (old_byte1 > -1) - ligkern[nl - 1] |= 0x80000000L; /* set the STOP byte in previous - ligkern command */ - } - - ligkern[nl] = ((long)byte2 << 16) + - (long)sf_array[nl].position; - old_byte1 = byte1; - nl++; - } - ligkern[nl - 1] |= 0x80000000L; - } - - kerns = ligkern + nl; - nk = 0; /* kerns are omitted from raw TeX font */ - - Slant = fnt->slant - fnt->efactor * tan(fnt->italicangle * (PI / 180.0)); - - tparam = kerns + nk; - tparam[0] = (long)(FIXFACTOR * Slant + 0.5); - tparam[1] = scale((long)fnt->fontspace); - tparam[2] = (fnt->fixedpitch ? 0 : scale((long)(300 * fnt->efactor + 0.5))); - tparam[3] = (fnt->fixedpitch ? 0 : scale((long)(100 * fnt->efactor + 0.5))); - tparam[4] = scale((long)fnt->xheight); - tparam[5] = scale((long)(1000 * fnt->efactor + 0.5)); - np = 6; - - return 1; -} - - -void -writetfm(Font *fnt) -{ - FILE *out; - char *tfm_name; - int len = 0; - - - if (fnt->tfm_path) - len += strlen(fnt->tfm_path); - len += strlen(fnt->fullname); - len += strlen(fnt->tfm_ext); - len++; - - tfm_name = (char *)mymalloc(len); - tfm_name[0] = '\0'; - if (fnt->tfm_path) - strcat(tfm_name, fnt->tfm_path); - strcat(tfm_name, fnt->fullname); - strcat(tfm_name, fnt->tfm_ext); - - if ((out = fopen(tfm_name, "wb")) == NULL) - oops("Cannot open tfm file `%s'.", tfm_name); - - free(tfm_name); - - - lf = 6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np; - - write16(lf, out); - write16(lh, out); - write16(bc, out); - write16(ec, out); - write16(nw, out); - write16(nh, out); - write16(nd, out); - write16(ni, out); - write16(nl, out); - write16(nk, out); - write16(ne, out); - write16(np, out); - writearr(header, lh, out); - writearr(charinfo, ec - bc + 1, out); - writesarr(width, nw, out); - writesarr(height, nh, out); - writesarr(depth, nd, out); - writesarr(italic, ni, out); - writearr(ligkern, nl, out); - writesarr(kerns, nk, out); - writearr(tparam, np, out); - - free(header); - fclose(out); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/tfmaux.h diff -u xc/extras/FreeType/contrib/ttf2pk/tfmaux.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/tfmaux.h:removed --- xc/extras/FreeType/contrib/ttf2pk/tfmaux.h:1.1.1.2 Sat Feb 12 23:55:11 2000 +++ xc/extras/FreeType/contrib/ttf2pk/tfmaux.h Wed Mar 16 20:59:31 2005 @@ -1,28 +0,0 @@ -/* - * tfmaux.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TFMAUX_H -#define TFMAUX_H - -#include "ttf2tfm.h" - - -#define FIXFACTOR (0x100000L) /* 2^{20}, the unit fixnum */ - - -int transform(int x, int y, float ef, float sl); - -int buildtfm(Font *fnt); -void writetfm(Font *fnt); - -#endif /* TFMAUX_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttf2pk.1 diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2pk.1:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2pk.1:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2pk.1:1.1.1.2 Sat Feb 12 23:55:12 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2pk.1 Wed Mar 16 20:59:31 2005 @@ -1,289 +0,0 @@ -.\" man page for ttf2pk -. -.TH TTF2PK 1 15-Aug-1999 "FreeType version 1.3" -.SH NAME -ttf2pk \- convert a TrueType font into TeX's PK format -.SH SYNOPSIS -.na -.nh -.B ttf2pk -.RB [ -q ] -.RB [ -n ] -.I "\%font-name \%resolution" -.br -.B ttf2pk -.B -t -.RB [ -q ] -.I \%font-name -.br -.B "ttf2pk --version" -| -.B --help -.ad -.hy -. -. -. -.\" ==== -.\" ==== macro definitions -.\" ==== -. -.\" here we define \TeX for troff and nroff -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP -.if n .ds TX TeX -. -.\" and here the same for \LaTeX -.if t \{\ -.ie '\*(.T'dvi' \ -.ds LX \fRL\h'-0.36m'\v'-0.15v'\s-3A\s0\h'-0.15m'\v'0.15v'\fP\*(TX -.el .ds LX \fRL\h'-0.36m'\v'-0.22v'\s-2A\s0\h'-0.15m'\v'0.22v'\fP\*(TX -.\} -.if n .ds LX LaTeX -. -.\" \LaTeXe -.\" note that we need \vareps for TeX instead of \eps which can only be -.\" accessed with the \N escape sequence (in the Math Italic font) -.if t \{\ -.ie '\*(.T'dvi' .ds LE \*(LX\h'0.15m'2\v'0.20v'\f(MI\N'34'\fP\v'-0.20v' -.el .ds LE \*(LX\h'0.15m'2\v'0.20v'\(*e\v'-0.20v' -.\} -.if n .ds LE LaTeX\ 2e -. -.\" a typewriter font -.if t \{\ -.de C -\fC\\$1\fP\\$2 -.. -.\} -.if n \{\ -.de C -\\$1\\$2 -.. -.\} -. -.\" ==== -.\" ==== end of macro definitions -.\" ==== -. -. -. -.SH DESCRIPTION -This program converts a TrueType font into a -.C PK -file; the created font can then be used with \*(TX -or \*(LX. -.PP -All TrueType fonts to be used must be registered in a configuration -file called -.C \%ttfonts.map ; -it specifies how to handle each font. -CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts as created by -.B ttf2tfm -are also supported. -.PP -.B ttf2pk -always assumes 10pt as the design size for the written \*(TX -font. -. -. -.SH PARAMETERS -.TP -.B -q -This optional switch makes -.B ttf2pk -quiet. -It suppresses any informational output except warning and error -messages. -.TP -.B -n -Use only `\c -.C \&.pk ' -as the extension instead of `\c -.C \&. \c -.RI < \%resolution >\c -.C pk '. -.TP -.B -t -Test for the existence of -.IR \%font-name . -Returns 0 on success and prints out the corresponding line in -.C \%ttfonts.map -(provided the -.B -q -switch isn't set). -.TP -.I font-name -The \*(TX -name of the font. -.B ttf2pk -looks this name up in a configuration file called -.C \%ttfonts.map -for further information how to process the font. -.TP -.I resolution -The resolution, given in dots per inch. -Currently the horizontal resolution is equal to the vertical -resolution. -The design size is always assumed to be 10pt. -.TP -.B --version -Shows the current version of -.B ttf2pk -and the used file search library (e.g.\ \c -.BR kpathsea ). -.TP -.B --help -Shows usage information. -.PP -Environment variables for file searching are described in the manual page -of -.BR ttf2tfm . -. -. -.SH "THE CONFIGURATION FILE" -.B ttf2pk -uses, similar to -.BR dvips , -a font definition file called -.C \%ttfonts.map . -The parameters specified to -.B ttf2tfm -are here preserved\(em\c -.B ttf2tfm -writes out to standard output, as the last line, a proper -configuration entry for -.C \%ttfonts.map . -.PP -As an example, a call to -.PP -.in +2m -.C "ttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials" -.PP -will produce the following line: -.PP -.in +2m -.C "arials arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc" -.PP -See -.BR ttf2tfm (1) -and -.BR afm2tfm (1) -of the -.B dvips -package for a detailed description of encoding files. -.PP -Here a table listing the various -.B ttf2tfm -parameters and the corresponding -.C \%ttfonts.map -entries: -.PP -.in +4m -.ta 2i --s Slant -.br --e Extend -.br --p Encoding -.br --f Fontindex -.br --P Pid -.br --E Eid -.br --n PS=Yes -.br --N PS=Only -.br --R Replacement -.br --x Rotate=Yes -.br --y Y-Offset -.PP -Single replacement glyph names given to -.B ttf2tfm -with `\c -.BI -r \ old-glyphname\ new-glyphname\c -\&' -are directly specified with `\c -.IR old-glyphname = new-glyphname '. -They will be ignored if in subfont mode or if no encoding file is given. -.PP -One additional parameter in -.C \%ttfonts.map -is unique to -.BR ttf2pk : -`Hinting', which can take the values `On' or `Off'. -Some fonts (e.g.\ the CJK part of -.C \%cyberbit.ttf ) -are rendered incorrectly if hinting is activated. -Default is `On' (you can also use `Yes', `No', `1', and `0'). -.PP -For a description of subfonts (i.e., entries of the form `\c -.I \c -.C @\c -.I \c -.C @ ') -please refer to -.BR ttf2tfm (1). -.PP -The format of -.C \%ttfonts.map -is simple. -Each line defines a font; first comes the \*(TX -font name, then its TrueType font file name, followed by the -parameters in any order. -Case is significant (even for parameter names); the parameters are -separated from its values by an equal sign, with whitespace possibly -surrounding it. -.B ttf2pk -reads in -.C \%ttfonts.map -line by line, continuing until the \*(TX -font specified on the command line is found, otherwise the programs -exits with error code\ 2. -Thus you can use any character invalid in a \*(TX -font name to start a comment line. -.PP -You can use `\\' as the final character of a line to indicate that the -input is continued on the next line. -The backslash and the following newline character will be removed. -.PP -.B ttf2pk -will abort if it can't find or read the \*(TX -font metrics file of the given \*(TX -font name. -. -. -.SH "RETURN VALUE" -If the call was successful, 0\ will be returned. -In case of error, the return value is\ 1. -Finally, if the font can't be found in -.C \%ttfonts.map , -2\ is returned. -This simplifies the inclusion of -.B ttf2pk -into scripts like -.B mktexpk -for automatic font generation. -. -. -.SH "SEE ALSO" -.BR ttf2tfm (1), -.BR afm2tfm (1) -. -. -.SH AVAILABILITY -.B ttf2pk -is part of the FreeType package, a high quality TrueType rendering -library. -. -. -.SH AUTHORS -Werner LEMBERG -.C -.br -Fr\('ed\('eric LOYER -.C Index: xc/extras/FreeType/contrib/ttf2pk/ttf2pk.c diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2pk.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2pk.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2pk.c:1.1.1.2 Sat Feb 12 23:55:12 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2pk.c Wed Mar 16 20:59:31 2005 @@ -1,592 +0,0 @@ -/* - * ttf2pk.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include /* for size_t */ -#include -#include -#include - - -#include "ttf2tfm.h" -#include "newobj.h" -#include "pklib.h" -#include "ttfenc.h" -#include "ttflib.h" -#include "errormsg.h" -#include "filesrch.h" -#include "parse.h" -#include "subfont.h" - - -char ident[] = "ttf2pk version 1.3"; -char progname[] = "ttf2pk"; /* for error/warning messages */ - - -Boolean have_sfd = False; -Boolean have_pid = False; -Boolean have_eid = False; - - -/* - * Checks for an equal sign surrounded by whitespace. - */ - -static char * -strip_equal(char *s, char *os, char *p) -{ - while (isspace(*p)) - p++; - if (*p != '=') - boops(os, p - s, "Missing `='."); - p++; - while (isspace(*p)) - p++; - return p; -} - - -#define USAGE "\ - Convert a TrueType font to TeX's PK format.\n\ -\n\ --q suppress informational output\n\ --n only use `.pk' as extension\n\ --t test for (returns 0 on success)\n\ ---help print this message and exit\n\ ---version print version number and exit\n\ -" - -static void -usage(void) -{ - fputs("Usage: ttf2pk [-q] [-n] \n", stdout); - fputs(" ttf2pk -t [-q] \n", stdout); - fputs(USAGE, stdout); - exit(0); -} - - -#define VERSION "\ -Copyright (C) 1997-1999 Frederic Loyer and Werner Lemberg.\n\ -There is NO warranty. You may redistribute this software\n\ -under the terms of the GNU General Public License\n\ -and the gsftopk copyright.\n\ -\n\ -For more information about these matters, see the files\n\ -named COPYING and pklib.c.\n\ -\n\ -Primary authors of ttf2pk: F. Loyer and W. Lemberg.\n\ -\n\ -ttf2pk is partially based on gsftopk from P. Vojta\n\ -and the FreeType project from\n\ -David Turner, Robert Wilhelm, and Werner Lemberg\n\ -" - -static void -version(void) -{ - fputs(ident, stdout); - fprintf(stdout, " (%s)\n", TeX_search_version()); - fputs(VERSION, stdout); - exit(0); -} - - -static int -compare(Font *fnt, char *s, char *key) -{ - char c; - char *p; - char *temp, *temp1; - int value; - int sfd_begin, postfix_begin; - - - /* - * We isolate the fontname. - */ - - while (isspace(*s)) - s++; - - p = s; - while (*p && !isspace(*p)) - p++; - - c = *p; - *p = '\0'; - temp = newstring(s); - *p = c; - - /* - * We search for a subfont definition file name. - */ - - handle_sfd(temp, &sfd_begin, &postfix_begin); - - if (sfd_begin == -1) - value = strcmp(temp, key); - else - { - size_t len, len1, len2; - - - /* - * The sfd file will be only searched if prefix and postfix match. - */ - - len = strlen(key); - len1 = strlen(temp); - len2 = strlen(temp + postfix_begin); - - if (len1 + len2 >= len) - value = -1; - else if (!strncmp(temp, key, len1) && - !strcmp(temp + postfix_begin, key + (len - len2))) - { - c = key[len - len2]; - key[len - len2] = '\0'; - temp1 = newstring(key + len1); - key[len - len2] = c; - - if (fnt->sfdname) - free(fnt->sfdname); - fnt->sfdname = newstring(temp + sfd_begin); - - /* - * If the sfd file can't be opened the search is continued. - */ - - value = !init_sfd(fnt, False); - - if (!value) - { - value = -1; - - while (get_sfd(fnt)) - { - if (!strcmp(fnt->subfont_name, temp1)) - { - value = 0; /* success */ - have_sfd = True; - break; - } - } - - close_sfd(); - } - - free(temp1); - } - else - value = -1; - } - - free(temp); - - return value; -} - - -int -main(int argc, char** argv) -{ - size_t l; - unsigned int i; - long index, code; - FILE *config_file; - char *configline, *oldconfigline, *p, *q; - Font font; - encoding *enc; - long inenc_array[256]; - char *fontname; - size_t fontname_len; - char *pk_filename, *tfm_filename, *enc_filename, *cfg_filename; - char *real_ttfname, *real_cfg_filename; - int dpi = 0, ptsize; - Boolean hinting = True; - Boolean quiet = False; - Boolean no_dpi = False; - Boolean testing = False; - - - TeX_search_init(argv[0], "ttf2pk", "TTF2PK"); - - if (argc == 1) - oops("Need at least two arguments.\n" - "Try `ttf2pk --help' for more information."); - - if (argc == 2) - { - if (strcmp(argv[1], "--help") == 0) - usage(); - else if (strcmp(argv[1], "--version") == 0) - version(); - } - - while (argv[1][0] == '-') - { - if (argv[1][1] == 'q') - quiet = True; - else if (argv[1][1] == 'n') - no_dpi = True; - else if (argv[1][1] == 't') - testing = True; - else - oops("Unknown option `%s'.\n" - "Try `ttf2pk --help' for more information.", argv[1]); - - argv++; - argc--; - } - - if (testing) - { - if (argc != 2) - oops("Need exactly one parameter for `-t' option.\n" - "Try `ttf2pk --help' for more information."); - } - else if (argc != 3) - oops("Need at most two arguments.\n" - "Try `ttf2pk --help' for more information."); - - if (!quiet) - printf("This is %s\n", ident); - - if (!testing) - if ((dpi = atoi(argv[2])) <= 50) - oops("dpi value must be larger than 50."); - - fontname = argv[1]; - fontname_len = strlen(fontname); - enc_filename = NULL; - - ptsize = 10; - - init_font_structure(&font); - - cfg_filename = newstring("ttfonts.map"); - real_cfg_filename = TeX_search_config_file(&cfg_filename); - if (!real_cfg_filename) - oops("Cannot find file ttfonts.map."); - - config_file = fopen(real_cfg_filename, "rt"); - if (config_file == NULL) - oops("Cannot open file ttfonts.map."); - - do - { - configline = get_line(config_file); - if (!configline) - oops("Error while reading ttfonts.map."); - if (!*configline) - { - /* - * This is the only error message we suppress if the -q flag - * is set, making it possible to call ttf2pk silently. - */ - if (!quiet) - fprintf(stdout, - "%s: ERROR: Cannot find font %s in ttfonts.map.\n", - progname, fontname); - exit(2); - } - } while (compare(&font, configline, fontname)); - - fclose(config_file); - - if (testing) - { - if (!quiet) - fprintf(stdout, "%s\n", configline); - exit(0); - } - - /* - * Parse the line from the config file. We split the config line buffer - * into substrings according to the given options. - */ - - l = strlen(configline); - if (configline[l - 1] == '\n') - configline[l - 1] = '\0'; /* strip newline */ - - oldconfigline = newstring(configline); - - p = configline; - while (isspace(*p)) - p++; - while (*p && !isspace(*p)) - p++; - - q = p; - - while (*p && isspace(*p)) - p++; - if (!*p) - boops(oldconfigline, q - configline, "TTF file missing."); - - font.ttfname = p; - - while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; - - for (; *p; p++) - { - if (isspace(*p)) - continue; - - if (!strncmp(p, "Slant", 5)) - { - p = strip_equal(configline, oldconfigline, p + 5); - if (sscanf(p, "%f", &(font.slant)) == 0) - boops(oldconfigline, p - configline, "Bad `Slant' parameter."); - } - else if (!strncmp(p, "Encoding", 8)) - { - if (have_sfd) - boops(oldconfigline, p - configline, - "No `Encoding' parameter allowed for subfonts."); - - p = strip_equal(configline, oldconfigline, p + 8); - if (!*p) - boops(oldconfigline, p - configline, "Bad `Encoding' parameter."); - enc_filename = p; - } - else if (!strncmp(p, "Extend", 6)) - { - p = strip_equal(configline, oldconfigline, p + 6); - if (sscanf(p, "%f", &(font.efactor)) == 0) - boops(oldconfigline, p - configline, "Bad `Extend' parameter."); - } - else if (!strncmp(p, "Fontindex", 9)) - { - p = strip_equal(configline, oldconfigline, p + 9); - if (sscanf(p, "%lu", &(font.fontindex)) < 0) - boops(oldconfigline, p - configline, "Bad `Fontindex' parameter."); - } - else if (!strncmp(p, "Pid", 3)) - { - p = strip_equal(configline, oldconfigline, p + 3); - if (sscanf(p, "%hu", &(font.pid)) < 0) - boops(oldconfigline, p - configline, "Bad `Pid' parameter."); - have_pid = True; - } - else if (!strncmp(p, "Eid", 3)) - { - p = strip_equal(configline, oldconfigline, p + 3); - if (sscanf(p, "%hu", &(font.eid)) < 0) - boops(oldconfigline, p - configline, "Bad `Eid' parameter."); - have_eid = True; - } - else if (!strncmp(p, "Hinting", 7)) - { - p = strip_equal(configline, oldconfigline, p + 7); - if (p[1] == 'N' || p[1] == 'n' || - p[0] == 'Y' || p[1] == 'y' || - p[0] == '1') - hinting = True; - else if (p[1] == 'F' || p[1] == 'f' || - p[0] == 'N' || p[1] == 'n' || - p[0] == '0') - hinting = False; - else - boops(oldconfigline, p - configline, "Bad `Hinting' parameter."); - } - else if (!strncmp(p, "PS", 2)) - { - p = strip_equal(configline, oldconfigline, p + 2); - if (p[1] != '\0' && - (p[2] == 'l' || p[2] == 'L')) - font.PSnames = Only; - else if (p[1] == 'N' || p[1] == 'n' || - p[0] == 'Y' || p[0] == 'y' || - p[0] == '1') - font.PSnames = Yes; - else if (p[1] == 'F' || p[1] == 'f' || - p[0] == 'N' || p[0] == 'n' || - p[0] == '0') - font.PSnames = No; - else - boops(oldconfigline, p - configline, "Bad `PS' parameter."); - - if (have_sfd) - boops(oldconfigline, p - configline, - "No `PS' parameter allowed for subfonts."); - } - else if (!strncmp(p, "Rotate", 6)) - { - p = strip_equal(configline, oldconfigline, p + 6); - if (p[1] == 'N' || p[1] == 'n' || - p[0] == 'Y' || p[1] == 'y' || - p[0] == '1') - font.rotate = True; - else if (p[1] == 'F' || p[1] == 'f' || - p[0] == 'N' || p[1] == 'n' || - p[0] == '0') - font.rotate = False; - else - boops(oldconfigline, p - configline, "Bad `Rotate' parameter."); - - if (!have_sfd) - boops(oldconfigline, p - configline, - "No `Rotate' parameter allowed for non-subfonts."); - } - else if (!strncmp(p, "Y-Offset", 8)) - { - p = strip_equal(configline, oldconfigline, p + 8); - if (sscanf(p, "%f", &(font.y_offset)) == 0) - boops(oldconfigline, p - configline, "Bad `Y-Offset' parameter."); - } - else if (!strncmp(p, "Replacement", 11)) - { - p = strip_equal(configline, oldconfigline, p + 11); - if (!*p) - boops(oldconfigline, p - configline, "Bad `Replacement' parameter."); - font.replacementname = p; - } - else - { - char *new_name, *old_name; - stringlist *sl; - - - old_name = p; - while (*p && !isspace(*p) && *p != '=') - p++; - - q = p; - p = strip_equal(configline, oldconfigline, p); - *q = '\0'; - - new_name = p; - while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; - - sl = newstringlist(); - sl->new_name = new_name; - sl->old_name = old_name; - sl->next = font.replacements; - font.replacements = sl; - - p--; /* to make the next while loop work */ - } - - while (*p && !isspace(*p)) - p++; - if (*p) - *p = '\0'; - } - - if (font.PSnames == Only) - if (have_pid || have_eid) - boops(oldconfigline, 0, - "No `Pid' or `Eid' parameters allowed if `PS=Only' is set."); - - font.replacementname = newstring(font.replacementname); - get_replacements(&font); - - tfm_filename = newstring(fontname); - TFMopen(&tfm_filename); - - pk_filename = mymalloc(fontname_len + 10); - if (no_dpi) - sprintf(pk_filename, "%s.pk", fontname); - else - sprintf(pk_filename, "%s.%dpk", fontname, dpi); - PKopen(pk_filename, fontname, dpi); - - font.ttfname = newstring(font.ttfname); - real_ttfname = TeX_search_ttf_file(&(font.ttfname)); - if (!real_ttfname) - oops("Cannot find `%s'.", font.ttfname); - TTFopen(real_ttfname, &font, dpi, ptsize, quiet); - - enc_filename = newstring(enc_filename); - enc = readencoding(&enc_filename, &font, True); - if (enc) - { - char *name; - - - restore_glyph(enc, &font); - - for (i = 0; i <= 0xFF; i++) - { - name = enc->vec[i]; - if (!font.PSnames) - { - code = adobename_to_code(name); - if (code < 0 && strcmp(name, ".notdef") != 0) - warning("Cannot map character `%s'.", name); - inenc_array[i] = code; - } - else - { - /* we search the glyph index */ - index = TTFsearch_PS_name(name); - if (index < 0) - warning("Cannot map character `%s'.", name); - inenc_array[i] = index | 0x10000; - } - } - } - else - { - if (font.replacements) - warning("Replacement glyphs will be ignored."); - - if (have_sfd) - TTFget_subfont(&font, inenc_array); - else - /* get the table of glyph names too */ - enc = TTFget_first_glyphs(&font, inenc_array); - } - - for (i = 0; i <= 0xFF; i++) - { - byte *bitmap; - int w, h, hoff, voff; - - - if ((code = inenc_array[i]) >= 0) - { - if (!quiet) - { - printf("Processing glyph %3ld %s index 0x%04x %s\n", - (long)i, (code >= 0x10000) ? "glyph" : "code", - (unsigned int)(code & 0xFFFF), enc ? enc->vec[i] : ""); - fflush(stdout); - } - - if (TTFprocess(&font, code, - &bitmap, &w, &h, &hoff, &voff, hinting, quiet)) - PKputglyph(i, - -hoff, -voff, w - hoff, h - voff, - w, h, bitmap); - else - warning("Cannot render glyph with %s index 0x%x.", - (code >= 0x10000) ? "glyph" : "code", - (unsigned int)(code & 0xFFFF)); - } - } - - PKclose(); - exit(0); /* for safety reasons */ - return 0; /* never reached */ -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttf2pk.doc diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2pk.doc:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2pk.doc:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2pk.doc:1.1.1.2 Sat Feb 12 23:55:13 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2pk.doc Wed Mar 16 20:59:31 2005 @@ -1,733 +0,0 @@ - -ttf2tfm -- TrueType to TFM converter -ttf2pk -- TrueType to PK converter -==================================== - -These two auxiliary programs make TrueType fonts usable with TeX. -ttf2tfm extracts the metric and kerning information of a TrueType font -and converts it into metric files usable by TeX (quite similar to -afm2tfm which is part of the dvips package). ttf2pk rasterizes the -glyph outlines of a TrueType font into a bitmap font in PK format. - -Since a TrueType font often contains more than 256 glyphs, some means -are necessary to map a subset of the TrueType glyphs into a TeX font. -To do this, two mapping tables are needed: the first maps from the -TrueType font to a raw TeX font (this mapping table is used both by -ttf2tfm and ttf2pk), and the second maps from the raw TeX font to -another (virtual) TeX font providing all kerning and ligature -information needed by TeX. - -We sometimes refer to this first map as the `input' or `raw' map, and -to the second as the `output' or `virtual' map. - -This two stage mapping has the advantage that one raw font can be -accessed with various TeX encodings (e.g. T1 and OT1) via the virtual -font mechanism, and just one PK file is necessary. - -For CJK fonts, a different mechanism is provided (see section `Subfont -definition files' below). Additionally, rotated glyphs for -pseudo-vertical writing are supported -- if possible, vertical glyph -presentation forms are used from the font's GSUB table. - - - -ttf2tfm -======= - -Usage: - - ttf2tfm FILE[.ttf|.ttc] [OPTION]... [FILE[.tfm]] - -Options (default values are given in brackets): - --c REAL use REAL for height of small caps made with -V [0.8] --e REAL widen (extend) characters by a factor of REAL [1.0] --E INT select INT as the TTF encoding ID [1] --f INT select INT as the font index in a TTC [0] --l create 1st/2nd byte ligatures in subfonts --n use PS names of TrueType font --N use only PS names and no cmap --O use octal for all character codes in the vpl file --p ENCFILE[.enc] read ENCFILE for the TTF->raw TeX mapping --P INT select INT as the TTF platform ID [3] --q suppress informational output --r OLDNAME NEWNAME replace glyph name OLDNAME with NEWNAME --R RPLFILE[.rpl] read RPLFILE containing glyph replacement names --s REAL oblique (slant) characters by REAL, usually <<1 [0.0] --t ENCFILE[.enc] read ENCFILE for the encoding of the vpl file --T ENCFILE[.enc] equivalent to -p ENCFILE -t ENCFILE --u output only characters from encodings, nothing extra --v FILE[.vpl] make a VPL file for conversion to VF --V SCFILE[.vpl] like -v, but synthesize smallcaps as lowercase --x rotate subfont glyphs by 90 degrees --y REAL move rotated glyphs down by a factor of REAL [0.25] ---help print this message and exit ---version print version number and exit - - -The usage is very similar to afm2tfm. Please consult the dvips info -file for more details on the various parameters. Here we will -concentrate on the differences between afm2tfm and ttf2tfm. - - -cmaps ------ - -Contrary to Type 1 PostScript fonts (but similar to the new CID-keyed -PostScript fonts), most TrueType fonts have more than one native -mapping table, also called `cmap', which maps the (internal) TTF glyph -indices to the (external) TTF character codes. Common examples are a -mapping table to Unicode encoded character positions and the standard -Macintosh mapping. To specify this TrueType mapping table, use the -options `-P' and `-E'. With `-P' you specify the platform ID; defined -values are: - - platform platform ID (pid) - ---------------------------------- - Apple Unicode 0 - Macintosh 1 - ISO 2 - Microsoft 3 - -The encoding ID depends on the platform. For pid=0, we ignore the -`-E' parameter (setting it to zero) since the mapping table is always -Unicode version 2.0. For pid=1, the following table lists the defined -values: - - platform ID = 1 - script encoding ID (eid) - --------------------------------- - Roman 0 - Japanese 1 - Chinese 2 - Korean 3 - Arabic 4 - Hebrew 5 - Greek 6 - Russian 7 - Roman Symbol 8 - Devanagari 9 - Gurmukhi 10 - Gujarati 11 - Oriya 12 - Bengali 13 - Tamil 14 - Telugu 15 - Kannada 16 - Malayalam 17 - Sinhalese 18 - Burmese 19 - Khmer 20 - Thai 21 - Laotian 22 - Georgian 23 - Armenian 24 - Maldivian 25 - Tibetan 26 - Mongolian 27 - Geez 28 - Slavic 29 - Vietnamese 30 - Sindhi 31 - Uninterpreted 32 - -Here are the ISO encoding IDs: - - platform ID = 2 - encoding encoding ID - ---------------------------- - ASCII 0 - ISO 10646 1 - ISO 8859-1 2 - -And finally, the Microsoft encoding IDs: - - platform ID = 3 - encoding encoding ID - --------------------------- - Symbol 0 - Unicode 2.0 1 - Shift JIS 2 - GB 2312 (1980) 3 - Big 5 4 - KSC 5601 (Wansung) 5 - KSC 5601 (Johab) 6 - -The program will abort if you specify an invalid platform/encoding ID -pair. Please note that most fonts have at most two or three cmaps, -usually corresponding to the pid/eid pairs (1,0), (3,0), or (3,1) in -case of Latin based fonts. Valid Microsoft fonts should have a (3,1) -mapping table, but some fonts exist (mostly Asian fonts) which have a -(3,1) cmap not encoded in Unicode. The reason for this strange -behavior is the fact that some MS Windows versions will reject fonts -having a non-Unicode cmap (since all non-Unicode Microsoft encoding -IDs are for Asian specific MS Windows versions). - -The `-P' and `-E' options to ttf2tfm must be equally specified for -ttf2pk; the corresponding parameters in ttfonts.map are `Pid' and -`Eid', respectively. - -The default pid/eid pair is (3,1). - -If you use the `-N' switch, all cmaps are ignored, using only the -PostScript names in the TrueType font. The corresponding option in -ttfonts.map is `PS=Only'. - -If you use the `-n' switch, the default glyph names built into ttf2tfm -are replaced with the PS glyph names found in the font. In many cases -this is not what you want because the glyph names in the font are -often incorrect or non-standard. The corresponding option in -ttfonts.map `PS=Yes'. - - -input and output encodings --------------------------- - -You must specify the encoding vectors from the TrueType font to the -raw TeX font and from the raw TeX font to the virtual TeX font exactly -as with afm2tfm, but you have more possibilities to address the -character codes. [With `encoding vector' a mapping table with 256 -entries in form of a PostScript vector is meant; see the file -`T1-WGL4.enc' of this package for an example.] With afm2tfm, you must -access each glyph with its Adobe glyph name, e.g. `/quotedsingle' or -`/Acircumflex'. This has been extended with ttf2tfm; now you can (and -sometimes must) access the code points and/or glyphs directly using -the following syntax for specifying the character position in decimal, -octal, or hexadecimal notation: `/.c', -`/.c0', or `/.c0x'. Examples: -`/.c72', `/.c0646', `/.c0x48'. To access a glyph index directly, use -the character `g' instead of `c' in the just introduced notation. -Example: `/.g0x32'. - -[Note: The `.cXXX' notation makes no sense if `-N' is used.] - -Another possibility is to use the `-r old-glyphname new-glyphname' -switch to rename a glyph. Example: - - ttf2tfm ... -r .g0xc7 dotlessi -r hungarumlaut dblacute ... - -Nevertheless, it is not allowed to use the `.gXXX' or `.cXXX' glyph -name construct for `new-glyphname'. - -Alternatively, you can collect such replacement pairs in a file which -should have `.rpl' as extension, using the `-R' option. The syntax is -simple: Each line contains a pair `old-glyphname new-glyphname' -separated by whitespace (without the quotation marks). The percent -sign starts a line comment; you can continue a line with a backslash -as the last character. An example for a replacement file is `VPS.rpl' -(to be used in conjunction with `ET5.enc' for Vietnamese) which is -part of this package. - -The `-r' and `-R' switches are ignored for subfonts or if no encoding -tables are specified. For ttf2pk, the corresponding option to `-R' is -`Replacement'. Single replacements are directly given as -old_glyphname=newglyphname in ttfonts.map. - -For pid/eid pairs (1,0) and (3,1), both ttf2tfm and ttf2pk recognize -built-in default Adobe glyph names; the former pair follows the names -given in Appendix E of the book `Inside Macintosh', volume 6, the -latter uses the names given in the TrueType Specification (WGL4, a -Unicode subset). Note that Adobe glyph names are not unique and do -sometimes differ: E.g., many PS fonts have the glyph `mu', whereas -this glyph is called `mu1' in the WGL4 character set to distinguish it -from the real Greek letter mu. You can find those mapping tables in -the source code file `ttfenc.c'. - -On the other hand, the switches `-n' and `-N' make ttf2tfm read in and -use the PostScript names in the TrueType font itself (stored in the -font's `post' table) instead of the default Adobe glyph names. - -If you don't select an input encoding, the first 256 glyphs of the -TrueType font with a valid entry in the selected cmap will be mapped -to the TeX raw font (without the `-q' option ttf2tfm prints this -mapping table to standard output), followed by all glyphs not yet -addressed in the selected cmap. However, some code points for the -(1,0) pid/eid pair are omitted since they do not represent glyphs -useful for TeX: 0x00 (null), 0x08 (backspace), 0x09 (horizontal -tabulation), 0x0d (carriage return), and 0x1d (group separator). The -`invalid character' with glyph index 0 will be omitted too. - -If you select the `-N' switch, the first 256 glyphs of the TrueType -font with a valid PostScript name will be used in case no input -encoding is specified. Again, some glyphs are omitted: `.notdef', -`.null', and `nonmarkingreturn'. - -If you don't select an output encoding, ttf2tfm uses the same mapping -table as afm2tfm would use (you can find it in the source code file -texenc.c); it corresponds to TeX typewriter text. Unused positions -(either caused by empty code points in the mapping table or missing -glyphs in the TrueType font) will be filled (rather arbitrarily) with -characters present in the input encoding but not specified in the -output encoding (without the `-q' option ttf2tfm prints the final -output encoding to standard output). Use the `-u' option if you want -only glyphs in the virtual font which are defined in the output -encoding file, and nothing more. - -One feature missing in afm2tfm has been added which is needed by the -LaTeX T1 encoding: ttf2tfm will construct the glyph `Germandbls' (by -simply concatenating to `S' glyphs) even for normal fonts if possible. -It appears in the glyph list (written to stdout) as the last item, -marked with an asterisk. Since this isn't a real glyph it will be -available only in the virtual font. - -For both input and output encoding, an empty code position is -represented by the glyph name `.notdef'. - -In encoding files, you can use `\' as the final character of a line to -indicate that the input is continued on the next line. The backslash -and the following newline character will be removed. - -ttf2tfm returns 0 on success and 1 on error; warning and error -messages are written to standard error. - - -other options -------------- - -You can select the font in a TrueType font collection (which usually -has the extension `.ttc') with `-f'; the default value, zero, -specifies the first font. For fonts not being a collection, this -parameter is ignored. - -The option `-l' makes ttf2tfm create ligatures in subfonts between -first and second bytes of all the original character codes. Example: -Character code 0xABCD maps to character position 123 in subfont 45. -Then a ligature in subfont 45 between position 0xAB and 0xCD pointing -to character 123 will be produced. The fonts of the Korean HLaTeX -package use this feature. - -To produce glyphs rotated by 90 degrees counter-clockwise, use `-x'. -If the font contains a GSUB table (with feature `vert') to specify -vertical glyph presentation forms, both ttf2pk and ttf2tfm will use -it. This will work only in subfont mode. The y-offset of rotated -glyphs can be specified with the `-y' option; its parameter gives the -fractional amount of shifting downwards (the unit is one EM). If not -specified, a value of 0.25 (em) is used. - - - -ttf2pk -====== - -Usage: - - ttf2pk [-q] [-n] FONT DPI - ttf2pk -t [-q] FONT - -Options: - --q suppresses informational output --n only use `.pk' as extension --t test for FONT (returns 0 on success) ---help print this message and exit ---version print version number and exit - - -The FONT parameter must correspond to an entry in the file ttfonts.map -(see below for details), otherwise error code 2 is returned -- this -can be used for scripts like mktexpk to test whether the given font -name is a (registered) TrueType font. - -Another possibility is to use the `-t' switch which will print the -line of ttfonts.map corresponding to FONT and return 0 on success -(`-q' suppresses any output). - -DPI specifies the intended resolution (we always assume a design size -of 10pt). - - -ttfonts.map ------------ - -ttf2pk uses, similar to dvips, a font definition file called -ttfonts.map. The parameters specified to ttf2tfm are here preserved --- ttf2tfm writes out to standard output, as the last line, a proper -configuration entry for ttfonts.map. - -As an example, a call to - - ttf2tfm arial -s 0.25 -P 1 -E 0 -r .g0xc7 caron \ - -p 8r.enc -t T1-WGL4.enc -v arialsx arials - -will produce the following line: - - arials arial Slant=0.25 Encoding=8r.enc Pid=1 Eid=0 .g0xc7=caron - -The output encoding given with `-t' for the virtual font `arialsx' is -immaterial to ttf2pk (nevertheless, input encoding files must have the -same format as with ttf2tfm, and all said above about encoding files -holds). - -Here a table listing the various ttf2tfm parameters and its -corresponding ttfonts.map entries: - - -s Slant - -e Extend - -p Encoding - -f Fontindex - -P Pid - -E Eid - -n PS=Yes - -N PS=Only - -R Replacement - -x Rotate=Yes - -y Y-Offset - -Single replacement glyph names given to ttf2tfm with the `-r' switch -are directly specified with old-glyphname=new-glyphname. For subfonts -or if no encoding file is given, replacement glyphs are ignored. - -One additional parameter in ttfonts.map is unique to ttf2pk: -`Hinting', which can take the values `On' or `Off'. Some fonts (e.g. -the CJK part of cyberbit.ttf) are rendered incorrectly if hinting is -activated. Default is `On' (you can also use `Yes', `No', `1', and -`0'). - -The format of ttfonts.map is simple. Each line defines a font; first -comes the TeX font name, then its TrueType font file name, followed by -the parameters in any order. Case is significant (even for parameter -names); the parameters are separated from its values by an equal sign, -with possible whitespace surrounding it. ttf2pk reads in ttfonts.map -line by line, continuing until the TeX font specified on the command -line is found, otherwise the programs exits with error code 2. Thus -you can use any character invalid in a TeX font name to start a -comment line. - -In both ttfonts.map and encoding files, use `\' as the final character -of a line to indicate that the input is continued on the next line. -The backslash and the following newline character will be removed. - -ttf2pk will abort if it can't find and read the TeX font metrics file -of the given TeX font name. - - -Subfont definition files -======================== - -CJK (Chinese/Japanese/Korean) fonts usually contain several thousand -glyphs; to use them with TeX it is necessary to split such large fonts -into subfonts. Subfont definition files (usually having the extension -`.sfd') are a simple means to do this smoothly. A subfont file name -usually consists of a prefix, a subfont infix, and a postfix (which is -empty in most cases), e.g. - - ntukai23 -> prefix: ntukai, infix: 23, postfix: (empty) - -Here the syntax of a line in an SFD file, describing one subfont: - - `\n' - - := anything except whitespace. It's best to use only - alphanumerical characters. - := space, formfeed, carriage return, horizontal and - vertical tabs -- no newline characters. - := | - | - - - := - := `_' - := `:' - - := hexadecimal (prefix `0x'), decimal, or octal - (prefix `0') - -A line can be continued on the next line with a backslash ending the -line. The ranges must not overlap; offsets have to be in the range -0-255. - -Example: - - The line - - 03 10: 0x2349 0x2345_0x2347 - - assigns to the code positions 10, 11, 12, and 13 of the subfont - having the infix `03' the character codes 0x2349, 0x2345, 0x2346, - and 0x2347, respectively. - -The SFD files in the distribution are customized for the CJK package -for LaTeX. - -You have to embed the SFD file into the TFM font name (at the place -where the infix will appear) surrounded by two `@' signs, on the -command line resp. the ttfonts.map file; both ttf2tfm and ttf2pk -switch then to subfont mode. - -Subfont mode disables the options `-n', `-N', `-p', `-r', `-R', `-t', -`-T', `-u', `-v', and `-V' for ttf2tfm; similarly, no `Encoding' and -`Replacement' parameter resp. single replacement glyph names are -allowed in ttfonts.map. - -ttf2tfm will create ALL subfont TFM files specified in the SFD files -(provided the subfont contains glyphs) in one run. - -Example: - - The call - - ttf2tfm ntukai.ttf ntukai@/usr/local/lib/ttf2tfm/Big5@ - - will use `/usr/local/lib/ttf2tfm/Big5.sfd', producing the subfont - files ntukai01.tfm, ntukai02.tfm etc. - - ttf2pk should be then called on the subfonts directly: - - ttf2pk ntukai01 600 - ttf2pk ntukai02 600 - ... - - -Some notes on file searching -============================ - -Both ttf2pk and ttf2tfm use either the kpathsea, emtexdir, or MiKTeX -library for searching files (emtexdir will work only on operating -systems which have an MS-DOSish background, i.e. MS-DOS, OS/2, -Windows; MiKTeX is specific to MS Windows). - -During compilation, you have to define HAVE_KPATHSEA, HAVE_EMTEXDIR, -or MIKTEX to activate the specific file search code. - -As a last resort, both programs can be compiled without a search -library; the searched files must be then in the current directory or -specified with a path. Default extensions will be appended also (with -the exception that only `.ttf' is appended and not `.ttc'). - - -kpathsea --------- - -Please note that older versions of kpathsea (<3.2) have no special -means to search for TrueType fonts and related files, thus we use the -paths for PostScript related stuff. The actual version of kpathsea is -displayed on screen if you call either ttf2pk or ttf2tfm with the -`--version' command line switch. - -Here is a table of the file type and the corresponding kpathsea -variables. TTF2PKINPUTS and TTF2TFMINPUTS are program specific -environment variables introduced in kpathsea version 3.2: - - .ttf and .ttc TTFONTS - ttfonts.map TTF2PKINPUTS - .enc TTF2PKINPUTS, TTF2TFMINPUTS - .rpl TTF2PKINPUTS, TTF2TFMINPUTS - .tfm TFMFONTS - .sfd TTF2PKINPUTS, TTF2TFMINPUTS - -And here the same for pre-3.2-versions of kpathsea: - - .ttf and .ttc T1FONTS - ttfonts.map TEXCONFIG - .enc TEXPSHEADERS - .rpl TEXPSHEADERS - .tfm TFMFONTS - .sfd TEXPSHEADERS - -Finally, the same for pre-3.0-versions: - - .ttf and .ttc DVIPSHEADERS - ttfonts.map TEXCONFIG - .enc DVIPSHEADERS - .rpl DVIPSHEADERS - .tfm TFMFONTS - .sfd DVIPSHEADERS - -Please consult the info files for kpathsea for details on these -variables. The decision whether to use the old or the new scheme will -be done during compilation. - -You should set the TEXMFCNF variable to the directory where your -texmf.cnf configuration file resides. - -The default TDS location for the files in the data subdirectory is - - $TEXMF/ttf2tfm - -(or $TEXMF/ttf2pk; you should either make a symbolic link - - % ln -s $TEXMF/ttf2tfm $TEXMF/ttf2pk - -or set the variable TTF2PKINPUTS to $TEXMF/ttf2tfm for newer kpathsea -versions) - -Here is the proper command to find out to which value a kpathsea -variable is set (we use `TTFONTS' as an example). This is especially -useful if a variable isn't set in texmf.cnf or in the environment, -thus pointing to the default value which is hard-coded into the -kpathsea library. - - % kpsewhich --progname=ttf2tfm --expand-var='$TTFONTS' - -We select the program name also since it is possible to specify -variables which are searched only for a certain program -- in our -example it would be `TTFONTS.ttf2tfm'. - -A similar but not identical method is to say - - % kpsewhich --progname=ttf2tfm --show-path='truetype fonts' - -[A full list of format types can be obtained by saying `kpsewhich ---help' on the command line prompt.] This is exactly the how ttf2tfm -(and ttf2pk) search for files; the disadvantage is that all variables -are expanded which can cause very long string. - - -emtexdir --------- - -Here the list of suffixes and its related environment variables to be -set in autoexec.bat (resp. in config.sys for OS/2): - - .ttf and .ttc TTFONTS - ttfonts.map TTFCFG - .enc TTFCFG - .rpl TTFCFG - .tfm TEXTFM - .sfd TTFCFG - -With other words, all files in the data subdirectory should be moved -to a place in your emtex tree with TTFCFG pointing to this directory. - -If one of the variables isn't set, a warning message is emitted. The -current directory will always be searched. As usual, one exclamation -mark appended to a directory path causes subdirectories one level deep -to be searched, two exclamation marks causes all subdirectories to be -searched. Example: - - TTFONTS=c:\fonts\truetype!!;d:\myfonts\truetype! - -Constructions like `c:\fonts!!\truetype' aren't possible. - - -MiKTeX ------- - -Both ttf2tfm and ttf2pk have been fully integrated into MiKTeX. -Please refer to the documentation of MiKTeX for more details on file -searching. - - - -A full example -============== - -Here an example how to handle the font `verdana.ttf' and its variants. - - -1. Construct the font name --------------------------- - - [This is the most complicated part -- in case you are too lazy to - construct font names compliant to TeX's `fontname' scheme, just use - your own names.] - - Using the `ftdump' utility (which is part of FreeType) you can find - out the PostScript name of the specific TTF which is probably the - best choice to adapt TrueType fonts to the PostScript-oriented - `fontname' scheme. - - In our example, the PostScript name is `Verdana'. - - `fontname' uses the scheme - - S TT W [V...] [N] [E] [DD] - - as documented in `fontname.texi' resp. `fontname.dvi'. Now you have - to check the various mapping files: - - S: supplier.map: `j' for `Microsoft' - TT: typeface.map: `vn' for `Verdana' - W: weight.map: `r' for `Regular Roman', - `b' for `bold' - V, - N: variant.map: `8r' for the raw base font - `8t' for the virtual font - (i.e., LaTeX's T1 encoding) - [additionally an inserted `c' for small caps, - `o' for slanted (`oblique'), or `i' for italic - fonts] - - Here the standard combinations: - - `jvnr8r' for the default base font. - `jvnr8t' for the virtual default font. - `jvnrc8t' for the virtual font with small caps. [As you can see, - no additional raw font is needed.] - `jvnro8r' for the slanted base font. - `jvnro8t' for the virtual slanted font. - - The corresponding variants are: - - bold: verdanab.ttf -> jvnb{8r,8t} - small caps: jvnbc8t - slanted: jvnbo{8r,8t} - italic: verdanai.ttf -> jvni{8r,8t} - bold and italic: verdanaz.ttf -> jvnbi{8r,8t} - - -2. Font definition files ------------------------- - - The FD file should be called `t1jvn.fd' (as you can see, this is T1 - encoding). It is very similar to `t1ptm.fd', part of the PSNFSS - package (which can be found in almost all TeX distributions). A - `verdana.sty' file can also be modeled after `times.sty'. - - -3. Calling ttf2tfm ------------------- - - To make the example simpler, we use `T1-WGL4.enc' for both the raw - and the virtual encoding. This should be sufficient for most - TrueType fonts mapped to T1 encoding. Other packages may define - other encodings (e.g. the `t2' package available from CTAN defines - mapping files for Cyrillic encodings) -- it may also be necessary to - use the `-n' or `-N' switch together with replacement glyph names to - access all glyph names in the TrueType font. - - To create `jvnr8r' and `jvnr8t', just call - - ttf2tfm verdana -T T1-WGL4 -v jvnr8t jvnr8r - vptovf jvnr8t - - For `jvnrc8t', do - - ttf2tfm verdana -T T1-WGL4 -V jvnrc8t jvnr8r - vptovf jvnrc8t - - Note that almost always some warnings will appear about missing - glyphs. - - The last line written to stdout by ttf2tfm is a suitable entry for - ttfonts.map -- since ttf2pk doesn't care about virtual fonts, both - calls below produce the same. - - Now just repeat this procedure. For slanted fonts you should - additionally use the switch `-s 0.176' (of course you can change the - slanting amount to make it fit your needs). - - - -Problems -======== - -Most vptovf implementations allow only 100 bytes for the TFM header -(the limit is 1024 in the TFM file itself): 8 bytes for checksum and -design size, 40 bytes for the family name, 20 bytes for the encoding, -and 4 bytes for a face byte. There remain only 28 bytes for some -additional information which is used by ttf2tfm for an identification -string (which is essentially a copy of the command line), and this -limit is always exceeded. - -The optimal solution is to increase the value of `max_header_bytes' in -the file vptovf.w (and probably pltotf.w) to, say, 400 and recompile -vptovf (and pltotf). Otherwise you'll get some (harmless) error -messages like - - This HEADER index is too big for my present table size - -which can be safely ignored. - - ---- end of ttf2pk.doc --- Index: xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.1 diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.1:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.1:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.1:1.1.1.2 Sat Feb 12 23:55:13 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.1 Wed Mar 16 20:59:31 2005 @@ -1,1095 +0,0 @@ -.\" man page for ttf2tfm -. -.TH TTF2TFM 1 15-Aug-1999 "FreeType version 1.3" -.SH NAME -ttf2tfm \- build TeX metric files from a TrueType font -.SH SYNOPSIS -.na -.nh -.B ttf2tfm -.in +\n(.ku -.sp -1 -.IR ttffile [ .ttf | .ttc ] -[\c -.BI -c \ \%caps-height-factor\c -] -[\c -.BI -e \ \%extension-factor\c -] -[\c -.BI -E \ \%encoding-id\^\c -] -[\c -.BI -f \ \%font-index\c -] -[\c -.B -l\c -] -[\c -.B -n\c -] -[\c -.B -N\c -] -[\c -.B -O\c -] -[\c -.B -p\ \c -.IR \%inencfile [ .enc ]\c -] -[\c -.BI -P \ \%platform-id\^\c -] -[\c -.B -q\c -] -[\c -.BI -r \ \%old-glyphname\ \%new-glyphname\c -] -[\c -.B -R\ \c -.IR \%replacement-file [ .rpl ]\c -] -[\c -.BI -s \ \%slant-factor\c -] -[\c -.B -t\ \c -.IR \%outencfile [ .enc ]\c -] -[\c -.B -T\ \c -.IR \%inoutencfile [ .enc ]\c -] -[\c -.B -u\c -] -[\c -.B -v\ \c -.IR \%vplfile [ .vpl ]\c -] -[\c -.B -V\ \c -.IR \%scvplfile [ .vpl ]\c -] -[\c -.B -x\c -] -[\c -.BI -y \ \%vertical-shift-factor\c -] -[\c -.IR \%tfmfile [ .tfm ]\c -] -.br -.in -.B "ttf2tfm --version" -| -.B --help -.ad -.hy -. -. -. -.\" ==== -.\" ==== macro definitions -.\" ==== -. -.\" here we define \TeX for troff and nroff -.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP -.if n .ds TX TeX -. -.\" and here the same for \LaTeX -.if t \{\ -.ie '\*(.T'dvi' \ -.ds LX \fRL\h'-0.36m'\v'-0.15v'\s-3A\s0\h'-0.15m'\v'0.15v'\fP\*(TX -.el .ds LX \fRL\h'-0.36m'\v'-0.22v'\s-2A\s0\h'-0.15m'\v'0.22v'\fP\*(TX -.\} -.if n .ds LX LaTeX -. -.\" \LaTeXe -.\" note that we need \vareps for TeX instead of \eps which can only be -.\" accessed with the \N escape sequence (in the Math Italic font) -.if t \{\ -.ie '\*(.T'dvi' .ds LE \*(LX\h'0.15m'2\v'0.20v'\f(MI\N'34'\fP\v'-0.20v' -.el .ds LE \*(LX\h'0.15m'2\v'0.20v'\(*e\v'-0.20v' -.\} -.if n .ds LE LaTeX\ 2e -. -.\" a typewriter font -.if t \{\ -.de C -\fC\\$1\fP\\$2\fC\\$3\fP\\$4 -.. -.\} -.if n \{\ -.de C -\\$1\\$2\\$3\\$4 -.. -.\} -. -.\" ==== -.\" ==== end of macro definitions -.\" ==== -. -. -. -.SH DESCRIPTION -This program extracts the metric and kerning information of a TrueType -font and converts it into metric files usable by \*(TX -(quite similar to -.B afm2tfm -which is part of the -.B dvips -package; please consult its info files for more details on the various -parameters (especially encoding files). -.PP -Since a TrueType font often contains more than 256\ glyphs, some means -are necessary to map a subset of the TrueType glyphs into a \*(TX -font. -To do this, two mapping tables are needed: the first (called `input' or -`raw' encoding) maps the TrueType font to a raw \*(TX font (this mapping -table is used by both -.B ttf2tfm -and -.BR ttf2pk ), -and the second (called `output' or `virtual' encoding) maps the raw \*(TX -font to another (virtual) \*(TX -font, providing all kerning and ligature information needed by \*(TX. -.PP -This two stage mapping has the advantage that one raw font can be -accessed with various \*(TX -encodings (e.g.\ T1 and OT1) via the virtual font mechanism, and just -one -.C PK -file is necessary. -.PP -For CJKV (Chinese/Japanese/Korean/old Vietnamese) fonts, a different -mechanism is provided (see -.B "SUBFONT DEFINITION FILES" -below). -. -. -.SH PARAMETERS -Most of the command line switch names are the same as in -.B afm2tfm -for convenience. -One or more space characters between an option and its value is mandatory; -options can't be concatenated. -For historical reasons, the first parameter can -.I not -be a switch but must be the font name. -.TP -.BI -c \ caps-height-factor -The height of small caps made with the -.B -V -switch. -Default value of this real number is\ 0.8 times the height of uppercase -glyphs. -Will be ignored in subfont mode. -.TP -.BI -e \ extension-factor -The extension factor to stretch the characters horizontally. -Default value of this real number is\ 1.0; if less than\ 1.0, you get a -condensed font. -.TP -.BI -E \ encoding-id -The TrueType encoding ID. -Default value of this non-negative integer is\ 1. -Will be ignored if -.B -N -is used. -.TP -.BI -f \ font-index -The font index in a TrueType Collection. -Default is the first font (index\ 0). -Will be ignored for ordinary TrueType fonts. -[TrueType collections are usually found in some CJK fonts; e.g.\ the first -font index specifies glyphs and metrics for horizontal writing, and the -second font index does the same for vertical writing. -TrueType collections usually have the extension `\c -.C \&.ttc '.] -.TP -.B -l -Create ligatures in subfonts between first and second bytes of all the -original character codes. -Example: Character code\ 0xABCD maps to character position\ 123 in -subfont\ 45. -Then a ligature in subfont\ 45 between position 0xAB and\ 0xCD pointing -to character\ 123 will be produced. -The fonts of the Korean H\*(LX -package use this feature. -Will be ignored if not in subfont mode. -.TP -.B -n -Use PS names (of glyphs) of the TrueType font. -Will be ignored in subfont mode. -Only glyphs with a valid entry in the selected cmap are used. -.TP -.B -N -Use only PS names of the TrueType font. -No cmap is used, thus the switches -.B -E -and -.B -P -have no effect, causing a warning message. -Will be ignored in subfont mode. -.TP -.B -O -Use octal values for all character codes in the -.C VPL -file rather than names; this is useful for symbol or CJK fonts where -character names such as `A' are meaningless. -.TP -.BI -p \ inencfile -The input encoding file name for the TTF\(->raw\ \*(TX -mapping. -This parameter has to be specified in -.C \%ttfonts.map -for successive -.B ttf2pk -calls. -Will be ignored in subfont mode. -.TP -.BI -P \ platform-id -The TrueType platform ID. -Default value of this non-negative integer is\ 3. -Will be ignored if -.B -N -is used. -.TP -.B -q -Make -.B ttf2tfm -quiet. -It suppresses any informational output except warning and error -messages. -For CJK fonts, the output can get quite large if you don't specify -this switch. -.TP -.BI -r \ old-glyphname\ new-glyphname -Replaces -.I \%old-glyphname -with -.IR \%new-glyphname . -This switch is useful if you want to give an unnamed glyph (i.e., a glyph -which can be represented with `.gXXX' or `.cXXX' only) a name or if you want -to rename an already existing glyph name. -You can't use the `.gXXX' or `.cXXX' glyph name constructs for -.IR \%new-glyphname ; -multiple occurrences of -.B -r -are possible. -If in subfont mode or if no encoding file is specified, this switch is -ignored. -.TP -.BI -R \ replacement-file -Use this switch if you have many replacement pairs; they can be collected -in a file which should have `\c -.C \&.rpl ' -as extension. -The syntax used in such replacement files is simple: Each non-empty -line must contain a pair `\c -.IR "\%old-glyphname \%new-glyphname" ' -separated by whitespace (without the quotation marks). -A percent sign starts a line comment; you can continue a line on the next -line with a backslash as the last character. -If in subfont mode or if no encoding file is specified, this switch is -ignored. -.TP -.BI -s \ slant-factor -The obliqueness factor to slant the font, usually much smaller than\ 1. -Default of this real number is\ 0.0; if the value is larger than zero, -the characters slope to the right, otherwise to the left. -.TP -.BI -t \ outencfile -The output encoding file name for the virtual font(s). -Only characters in the raw \*(TX -font are used. -Will be ignored in subfont mode. -.TP -.BI -T \ inoutencfile -This is equivalent to -.RB ` -p -.I inoutencfile -.B -t -.IR inoutencfile '. -Will be ignored in subfont mode. -.TP -.B -u -Use only those characters specified in the output encoding, and no -others. -By default, -.B ttf2tfm -tries to include all characters in the virtual font, even those not -present in the encoding for the virtual font (it puts them into -otherwise-unused positions, rather arbitrarily). -Will be ignored in subfont mode. -.TP -.BI -v \ vplfile -Output a -.C VPL -file in addition to the -.C TFM -file. -If no output encoding file is specified, -.B ttf2tfm -uses a default font encoding (cmtt10). -Will be ignored in subfont mode. -.TP -.BI -V \ scvplfile -Same as -.BR -v , -but the virtual font generated is a pseudo small caps font obtained by -scaling uppercase letters by\ 0.8 (resp. the value specified with -.BR -c ) -to typeset lowercase. -This font handles accented letters and retains proper kerning. -Will be ignored in subfont mode. -.TP -.B -x -Rotate all glyphs by 90 degrees counter-clockwise. -If no -.B -y -parameter is given, the rotated glyphs are shifted down vertically -by\ 0.25em. -Will be ignored if not in subfont mode. -.TP -.BI -y \ vertical-shift-factor -Shift down rotated glyphs by the given amount (the unit is -.IR em ). -Ignored if not in subfont mode or glyphs are not rotated. -.TP -.B --version -Shows the current version of -.B ttf2tfm -and the used file search library (e.g. -.BR kpathsea ). -.TP -.B --help -Shows usage information. -.PP -If no -.C TFM -file name is given, the name of the -.C TTF -file is used, including the full path and replacing the extension with `\c -.C \&.tfm '. -. -. -.SH CMAPS -Contrary to Type\ 1 PostScript fonts (but similar to the new CID -PostScript font format), most TrueType fonts have more than one native -mapping table, also called `cmap', which maps the (internal) TTF glyph -indices to the (external) TTF character codes. -Common examples are a mapping table to Unicode encoded character -positions, and the standard Macintosh mapping. - -To specify a TrueType mapping table, use the options -.B -P -and -.BR -E . -With -.B -P -you specify the platform ID; defined values are: -.PP -.in +4m -.ta 3iC -.I "platform platform ID (pid)" -.sp -.ta 3iR -Apple Unicode 0 -.br -Macintosh 1 -.br -ISO 2 -.br -Microsoft 3 -.PP -The encoding ID depends on the platform. -For pid=0, we ignore the -.B -E -parameter (setting it to zero) since the mapping table is always -Unicode version\ 2.0. -For pid=1, the following table lists the defined values: -.PP -.in +4m -.ta 3iC -.ti -2m -platform ID = 1 -.sp -.I "script encoding ID (eid)" -.sp -.ta 3iR -Roman 0 -.br -Japanese 1 -.br -Chinese 2 -.br -Korean 3 -.br -Arabic 4 -.br -Hebrew 5 -.br -Greek 6 -.br -Russian 7 -.br -Roman Symbol 8 -.br -Devanagari 9 -.br -Gurmukhi 10 -.br -Gujarati 11 -.br -Oriya 12 -.br -Bengali 13 -.br -Tamil 14 -.br -Telugu 15 -.br -Kannada 16 -.br -Malayalam 17 -.br -Sinhalese 18 -.br -Burmese 19 -.br -Khmer 20 -.br -Thai 21 -.br -Laotian 22 -.br -Georgian 23 -.br -Armenian 24 -.br -Maldivian 25 -.br -Tibetan 26 -.br -Mongolian 27 -.br -Geez 28 -.br -Slavic 29 -.br -Vietnamese 30 -.br -Sindhi 31 -.br -Uninterpreted 32 -.PP -Here are the ISO encoding IDs: -.PP -.in +4m -.ta 3iC -.ti -2m -platform ID = 2 -.sp -.I "encoding encoding ID (eid)" -.sp -.ta 3iR -ASCII 0 -.br -ISO 10646 1 -.br -ISO 8859-1 2 -.PP -And finally, the Microsoft encoding IDs: -.PP -.in +4m -.ta 3iC -.ti -2m -platform ID = 3 -.sp -.I "encoding encoding ID (eid)" -.sp -.ta 3iR -Symbol 0 -.br -Unicode 2.0 1 -.br -Shift JIS 2 -.br -GB 2312 (1980) 3 -.br -Big 5 4 -.br -KSC 5601 (Wansung) 5 -.br -KSC 5601 (Johab) 6 -.PP -The program will abort if you specify an invalid platform/encoding ID -pair. -It will then show the possible pid/eid pairs. -Please note that most fonts have at most two or three cmaps, usually -corresponding to the pid/eid pairs (1,0), (3,0), or (3,1) in case of -Latin based fonts. -Valid Microsoft fonts should have a (3,1) mapping table, but some -fonts exist (mostly Asian fonts) which have a (3,1) cmap not encoded -in Unicode. -The reason for this strange behavior is the fact that some MS\ Windows -versions will reject fonts having a non-(3,1) cmap (since all non-Unicode -Microsoft encoding IDs are for Asian MS\ Windows versions). -.PP -The -.B -P -and -.B -E -options of -.B ttf2tfm -must be equally specified for -.BR ttf2pk ; -the corresponding parameters in -.C \%ttfonts.map -are `Pid' and `Eid', respectively. -.PP -The default pid/eid pair is (3,1). -.PP -Similarly, an -.B -f -option must be specified as `Fontindex' parameter in -.C \%ttfonts.map . -.PP -If you use the -.B -N -switch, all cmaps are ignored, using only the PostScript names in the -TrueType font. -The corresponding option in -.C \%ttfonts.map -is \%`PS=Only'. -If you use the -.B -n -switch, the default glyph names built into -.B ttf2tfm -are replaced with the PS glyph names found in the font. -In many cases this is not what you want because the glyph names in the -font are often incorrect or non-standard. -The corresponding option in -.C \%ttfonts.map -is \%`PS=Yes'. -.PP -Single replacement glyph names specified with -.B -r -must be given directly as `\c -.IR old-glyphname = new-glyphname '; -.B -R -is equivalent to the `Replacement' option. -. -. -.SH INPUT AND OUTPUT ENCODINGS -You must specify the encoding vectors from the TrueType font to the -raw \*(TX -font and from the raw \*(TX -font to the virtual \*(TX -font exactly as with -.BR afm2tfm , -but you have more possibilities to address the character codes. -[With `encoding vector' a mapping table with 256\ entries in form of a -PostScript vector is meant; see the file -.C \%T1-WGL4.enc -of this package for an example.] -With -.BR afm2tfm , -you must access each glyph with its Adobe glyph name, e.g.\ \c -\%`/quotedsingle' or \%`/Acircumflex'. -This has been extended with -.BR ttf2tfm ; -now you can (and sometimes must) access the code points and/or glyphs -directly, using the following syntax for specifying the character position -in decimal, octal, or hexadecimal notation: -`/.c\c -.IR ', -`/.c0\c -.IR ', -or `/.c0x\c -.IR '. -Examples: \%`/.c72', \%`/.c0646', \%`/.c0x48'. -To access a glyph index directly, using the character `g' instead of -`c' in the just introduced notation. -Example: \%`/.g0x32'. -[Note: The `.cXXX' notation makes no sense if -.B -N -is used.] -.PP -For pid/eid pairs (1,0) and (3,1), both -.B ttf2tfm -and -.B ttf2pk -recognize built-in default Adobe glyph names; the former follows the names -given in Appendix\ E of the book `Inside Macintosh', volume\ 6, the latter -uses the names given in the TrueType Specification (WGL4, a Unicode subset). -Note that Adobe names for a given glyph are often not unique and do -sometimes differ, e.g., many PS fonts have the glyph `mu', whereas this -glyph is called `mu1' in the WGL4 character set to distinguish it from the -real Greek letter mu. -Be also aware that OpenType (i.e. TrueType\ 2.0) fonts use an updated WGL4 -table; we use the data from the latest published TrueType specification -(1.66). -You can find those mapping tables in the source code file -.C \%ttfenc.c . -.PP -On the other hand, the switches -.B -n -and -.B -N -makes -.B ttf2tfm -read in and use the PostScript names in the TrueType font itself (stored -in the `post' table) instead of the default Adobe glyph names. -.PP -Use the -.B -r -switch to remap single glyph names and -.B -R -to specify a file containing replacement glyph name pairs. -.PP -If you don't select an input encoding, the first 256\ glyphs of the -TrueType font with a valid entry in the selected cmap will be mapped -to the \*(TX -raw font (without the -.B -q -option, -.B ttf2tfm -prints this mapping table to standard output), followed by all glyphs -not yet addressed in the selected cmap. -However, some code points for the (1,0) pid/eid pair are omitted since -they do not represent glyphs useful for \*(TX: -0x00 (null), 0x08 (backspace), 0x09 (horizontal tabulation), 0x0d -(carriage return), and 0x1d (group separator). -The `invalid character' with glyph index\ 0 will be omitted too. -.PP -If you select the -.B -N -switch, the first 256\ glyphs of the TrueType font with a valid PostScript -name will be used in case no input encoding is specified. -Again, some glyphs are omitted: `.notdef', `.null', and -`nonmarkingreturn'. -.PP -If you don't select an output encoding, -.B ttf2tfm -uses the same mapping table as -.B afm2tfm -would use (you can find it in the source code file -.C \%texenc.c ); -it corresponds to \*(TX -typewriter text. -Unused positions (either caused by empty code points in the mapping -table or missing glyphs in the TrueType font) will be filled (rather -arbitrarily) with characters present in the input encoding but not -specified in the output encoding (without the -.B -q -option -.B ttf2tfm -prints the final output encoding to standard output). -Use the -.B -u -option if you want only glyphs in the virtual font which are defined -in the output encoding file, and nothing more. -.PP -One feature missing in -.B afm2tfm -has been added which is needed by the T1 encoding: -.B ttf2tfm -will construct the glyph `Germandbls' (by simply concatenating to `S' -glyphs) even for normal fonts if possible. -It appears in the glyph list as the last item, marked with an asterisk. -Since this isn't a real glyph it will be available only in the virtual -font. -.PP -For both input and output encoding, an empty code position is -represented by the glyph name \%`/.notdef'. -.PP -In encoding files, you can use `\\' as the final character of a line to -indicate that the input is continued on the next line. -The backslash and the following newline character will be removed. -.PP -. -. -.SH SUBFONT DEFINITION FILES -CJKV (Chinese/Japanese/Korean/old Vietnamese) fonts usually contain several -thousand glyphs; to use them with \*(TX -it is necessary to split such large fonts into subfonts. -Subfont definition files (usually having the extension `\c -.C \&.sfd ') -are a simple means to do this smoothly. -.PP -A subfont file name usually consists of a prefix, a subfont infix, and -a postfix (which is empty in most cases), e.g. -.PP -.in +2m -ntukai23 \(-> prefix: ntukai, infix: 23, postfix: (empty) -.PP -Here the syntax of a line in an -.C SFD -file, describing one subfont: -.in +2m -.TP -.I -.sp -.TP -.IR \ := -anything except whitespace. -It's best to use only alphanumerical characters. -.TP -.IR \ := -space, formfeed, carriage return, horizontal and vertical tabs -- no -newline characters. -.TP -.IR \ := -.IR " " \ | -.br -.IR " " \ | -.br -.I -.TP -.IR \ := -.I -.br -.TP -.IR \ := -.IR \ `_' \ -.br -.TP -.IR \ := -.IR \ `:' -.TP -.IR \ := -hexadecimal (prefix `0x'), decimal, or octal (prefix `0') -.PP -A line can be continued on the next line with a backslash ending the line. -The ranges must not overlap; offsets have to be in the range 0-255. -.PP -Example: -.PP -.in +2m -The line -.PP -.in +4m -.C "03 10: 0x2349 0x2345_0x2347" -.PP -.in +2m -assigns to the code positions 10, 11, 12, and\ 13 of the subfont -having the infix `03' the character codes 0x2349, 0x2345, 0x2346, and -0x2347 respectively. -.PP -The -.C SFD -files in the distribution are customized for the CJK package for -\*(LX. -.PP -You have to embed the -.C SFD -file name into the -.C TFM -font name (at the place where the infix will appear) surrounded by two -`@' signs, on the command line resp.\ the -.C \%ttfonts.map -file; both -.B ttf2tfm -and -.B ttf2pk -switch then to subfont mode. -.PP -Subfont mode disables the options -.BR -n , \ -N , \ -p , -.BR -r , \ -R , \ -t , -.BR -T , \ -u , \ -v , -and -.B -V -for -.BR ttf2tfm ; -similarly, no `Encoding' or `Replacement' parameter is allowed in -.C \%ttfonts.map . -Single replacement glyph names are ignored too. -.PP -.B ttf2tfm -will create all subfont -.C TFM -files specified in the -.C SFD -files (provided the subfont contains glyphs) in one run. -.PP -Example: -.PP -.in +2m -The call -.PP -.in +4m -.C "ttf2tfm ntukai.ttf ntukai@/usr/local/lib/ttf2tfm/Big5@" -.PP -.in +2m -will use -.C /usr/local/lib/ttf2tfm/Big5.sfd , -producing -.I all -subfont files -.C ntukai01.tfm , -.C ntukai02.tfm , -etc. -. -. -.SH "RETURN VALUE" -ttf2tfm returns 0 on success and 1 on error; warning and error -messages are written to standard error. -. -. -.SH "SOME NOTES ON FILE SEARCHING" -Both -.B ttf2pk -and -.B ttf2tfm -use either the -.BR kpathsea , -.BR emtexdir , -or -.B MiKTeX -library for searching files -.RB ( emtexdir -will work only on operating systems which have an MS-DOSish background, i.e. -MS-DOS, OS/2, Windows; -.B MiKTeX -is specific to MS Windows). -.PP -As a last resort, both programs can be compiled without a search library; -the searched files must be then in the current directory or specified with a -path. -Default extensions will be appended also (with the exception that only `\c -.C \&.ttf ' -is appended and not `\c -.C \&.ttc '). -.PP -KPATHSEA -.PP -Please note that older versions of -.B kpathsea -(<3.2) have no special means to seach for TrueType fonts and related -files, thus we use the paths for PostScript related stuff. -The actual version of kpathsea is displayed on screen if you call -either -.B ttf2pk -or -.B ttf2tfm -with the -.B --version -command line switch. -.PP -Here is a table of the file type and the corresponding -.B kpathsea -variables. -.C TTF2PKINPUTS -and -.C TTF2TFMINPUTS -are program specific environment variables introduced in -.B kpathsea -version\ 3.2: -.PP -.in +4m -.ta 2i -.C \&.ttf \ and "\ .ttc TTFONTS" -.br -.C "ttfonts.map TTF2PKINPUTS" -.br -.C "\&.enc TTF2PKINPUTS, TTF2TFMINPUTS" -.br -.C "\&.rpl TTF2PKINPUTS, TTF2TFMINPUTS" -.br -.C "\&.tfm TFMFONTS" -.br -.C "\&.sfd TTF2PKINPUTS, TTF2TFMINPUTS" -.PP -And here the same for pre-3.2-versions of -.B kpathsea: -.PP -.in +4m -.ta 2i -.C \&.ttf \ and "\ .ttc T1FONTS" -.br -.C "ttfonts.map TEXCONFIG" -.br -.C "\&.enc TEXPSHEADERS" -.br -.C "\&.rpl TEXPSHEADERS" -.br -.C "\&.tfm TFMFONTS" -.br -.C "\&.sfd TEXPSHEADERS" -.PP -Finally, the same for pre-3.0-versions (as used e.g. in te\*(TX\ 0.4): -.PP -.in +4m -.ta 2i -.C \&.ttf \ and "\ .ttc DVIPSHEADERS" -.br -.C "ttfonts.map TEXCONFIG" -.br -.C "\&.enc DVIPSHEADERS" -.br -.C "\&.rpl DVIPSHEADERS" -.br -.C "\&.tfm TFMFONTS" -.br -.C "\&.sfd DVIPSHEADERS" -.PP -Please consult the info files of -.B kpathsea -for details on these variables. -The decision whether to use the old or the new scheme will be done -during compilation. -.PP -You should set the -.C TEXMFCNF -variable to the directory where your -.C texmf.cnf -configuration file resides. -.PP -Here is the proper command to find out to which value a -.B kpathsea -variable is set (we use -.C TTFONTS -as an example). -This is especially useful if a variable isn't set in -.C texmf.cnf -or in the environment, thus pointing to the default value which is -hard-coded into the -.B kpathsea -library. -.PP -.in +2m -.C "kpsewhich -progname=ttf2tfm -expand-var='$TTFONTS'" -.PP -We select the program name also since it is possible to specify -variables which are searched only for a certain program -- in our -example it would be -.C TTFONTS.ttf2tfm . -.PP -A similar but not identical method is to say -.PP -.in +2m -.C "kpsewhich -progname=ttf2tfm -show-path='truetype fonts'" -.PP -[A full list of format types can be obtained by saying `\c -.C "kpsewhich --help" ' -on the command line prompt.] -This is exactly the how -.B ttf2tfm -(and -.BR ttf2pk ) -search for files; the disadvantage is that all variables are expanded -which can cause very long strings. -.PP -EMTEXDIR -.PP -Here the list of suffixes and its related environment variables to be -set in -.C autoexec.bat -(resp. in -.C config.sys -for OS/2): -.PP -.in +4m -.ta 2i -.C \&.ttf \ and "\ .ttc TTFONTS" -.br -.C "ttfonts.map TTFCFG" -.br -.C "\&.enc TTFCFG" -.br -.C "\&.rpl TTFCFG" -.br -.C "\&.tfm TEXTFM" -.br -.C "\&.sfd TTFCFG" -.PP -If one of the variables isn't set, a warning message is emitted. -The current directory will always be searched. -As usual, one exclamation mark appended to a directory path causes -subdirectories one level deep to be searched, two exclamation marks causes -all subdirectories to be searched. -Example: -.PP -.in +2m -.C TTFONTS=c:\\\\fonts\\\\truetype!!;d:\\\\myfonts\\\\truetype! -.PP -Constructions like `\c -.C c:\\\\fonts!!\\\\truetype ' -aren't possible. -.PP -MIKTEX -.PP -Both -.B ttf2tfm -and -.B ttf2pk -have been fully integrated into -.BR MiKTeX . -Please refer to the documentation of -.B MiKTeX -for more details on file searching. -. -. -.SH PROBLEMS -Most -.B vptovf -implementations allow only 100\ bytes for the -.C TFM -header (the limit is 1024 in the -.C TFM -file itself): 8\ bytes for checksum and design size, 40\ bytes for the -family name, 20\ bytes for the encoding, and 4\ bytes for a face byte. -There remain only 28\ bytes for some additional information which is used by -.B ttf2tfm -for an identification string (which is essentially a copy of the command -line), and this limit is always exceeded. - -The optimal solution is to increase the value of -.I \%max_header_bytes -in the file -.C vptovf.web -(and probably -.C pltotf.web -too) to, say,\ 400 -and recompile -.B vptovf -(and -.BR pltotf ). -Otherwise you'll get some (harmless) error messages like -.PP -.in +2m -.C "This HEADER index is too big for my present table size" -.PP -which can be safely ignored. -. -. -.SH "SEE ALSO" -.BR ttf2pk (1), -.BR afm2tfm (1), -.BR vptovf (1), -.br -the info pages for -.B dvips -and -.B kpathsea -. -. -.SH AVAILABILITY -.B ttf2tfm -is part of the FreeType package, a high quality TrueType rendering -library. -. -. -.SH AUTHORS -Werner LEMBERG -.C -.br -Fr\('ed\('eric LOYER -.C Index: xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.c diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.c:1.1.1.2 Sat Feb 12 23:55:13 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.c Wed Mar 16 20:59:31 2005 @@ -1,885 +0,0 @@ -/* - * ttf2tfm.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg . - */ - -/* - * This program converts TTF files to TeX TFM files, and optionally - * to TeX VPL files that retain all kerning and ligature information. - * Both files make the characters not normally encoded by TeX available - * by character codes greater than 0x7F. - */ - -/* - * Adapted from afm2tfm by F. Loyer . - */ - -#include -#include -#include /* for size_t */ -#include - -#include "ttf2tfm.h" -#include "newobj.h" -#include "ttfenc.h" -#include "ligkern.h" -#include "texenc.h" -#include "ttfaux.h" -#include "tfmaux.h" -#include "vplaux.h" -#include "errormsg.h" -#include "filesrch.h" -#include "parse.h" -#include "subfont.h" - - -char ident[] = "ttf2tfm version 1.3"; -char progname[] = "ttf2tfm"; /* for error/warning messages */ - -/* command line options */ - -static char makevpl; /* can be 1 or 2 */ -static Boolean pedantic; -static Boolean quiet; -static Boolean forceoctal; - - -/* - * Re-encode the TTF font. - */ - -static void -handlereencoding(Font *fnt) -{ - int i; - ttfinfo *ti; - char *p; - - - if (fnt->inencname) - { - fnt->inencoding = readencoding(&(fnt->inencname), fnt, True); - - /* reset all pointers in the mapping table */ - for (i = 0; i <= 0xFF; i++) - if (NULL != (ti = fnt->inencptrs[i])) - { - ti->incode = -1; - fnt->inencptrs[i] = NULL; - } - - /* - * Reencode TTF <--> raw TeX. Only these code points will be used - * for the output encoding. - */ - - for (i = 0; i <= 0xFF; i++) - { - p = fnt->inencoding->vec[i]; - if (p && *p) - { - if ((ti = findadobe(p, fnt->charlist))) - { - if (ti->incode >= 0) - { - warning("Character `%s' encoded twice in input encoding\n" - " (positions %x and %x; the latter is ignored).", - p, ti->incode, i); - fnt->inencoding->vec[i] = ".notdef"; - continue; - } - if (ti->charcode >= 0) - { - ti->incode = i; - fnt->inencptrs[i] = ti; - } - } - else - { - warning("Cannot find character `%s'\n" - " specified in input encoding.", p); - } - } - } - fnt->codingscheme = fnt->inencoding->name; - } - - if (!quiet) - { - if (fnt->inencname) - printf("\nUsing %s as input encoding.\n", fnt->inencname); - else - { - printf( - "\nUsing the first 256 glyphs in the following input encoding:\n\n"); - for (i = 0; i <= 0xFF; i++) - { - if ((ti = fnt->inencptrs[i])) - printf(" 0x%02x %s\n", i, ti->adobename); - } - printf("\n"); - } - } - - if (fnt->outencname) - fnt->outencoding = readencoding(&(fnt->outencname), fnt, False); - else - fnt->outencoding = readencoding(NULL, fnt, False); -} - - -static void -assignchars(Font *fnt) -{ - register char **p; - register int i, j, k; - register ttfinfo *ti; - int nextfree = 0x80; - - - /* - * First, we assign all those that match perfectly. - */ - - for (i = 0, p = fnt->outencoding->vec; i <= 0xFF; i++, p++) - if ((ti = findmappedadobe(*p, fnt->inencptrs))) - { - if (ti->outcode >= 0) - fnt->nextout[i] = ti->outcode; /* linked list */ - ti->outcode = i; - fnt->outencptrs[i] = ti; - } - else if (strcmp(*p, ".notdef") != 0) - warning("Cannot map character `%s'\n" - " specified in output encoding.", *p); - - if (pedantic) - goto end; - - /* - * Next, we assign all the others, retaining the TTF code positions, - * possibly multiplying assigned characters, unless the output encoding - * was precisely specified. - */ - - for (i = 0; i <= 0xFF; i++) - if ((ti = fnt->inencptrs[i]) && - ti->charcode >= 0 && ti->charcode <= 0xFF && - ti->outcode < 0 && fnt->outencptrs[ti->charcode] == NULL) - { - ti->outcode = ti->charcode; - fnt->outencptrs[ti->charcode] = ti; - } - - /* - * Finally, we map all remaining characters into free locations beginning - * with 0x80. - */ - - for (i = 0; i <= 0xFF; i++) - if ((ti = fnt->inencptrs[i]) && ti->outcode < 0) - { - while (fnt->outencptrs[nextfree]) - { - nextfree = (nextfree + 1) & 0xFF; - if (nextfree == 0x80) - goto finishup; /* all slots full */ - } - ti->outcode = nextfree; - fnt->outencptrs[nextfree] = ti; - } - -finishup: - - /* - * Now, if any of the characters are encoded multiple times, we want - * ti->outcode to be the first one assigned, since that is most likely - * to be the most important one. So we reverse the above lists. - */ - - for (i = 0; i <= 0xFF; i++) - if ((ti = fnt->inencptrs[i]) && ti->outcode >= 0) - { - k = -1; - while (fnt->nextout[ti->outcode] >= 0) - { - j = fnt->nextout[ti->outcode]; - fnt->nextout[ti->outcode] = k; - k = ti->outcode; - ti->outcode = j; - } - fnt->nextout[ti->outcode] = k; - } - -end: - - if (!quiet) - { - printf("\nUsing the following output encoding:\n\n"); - for (i = 0; i <= 0xFF; i++) - { - if ((ti = fnt->outencptrs[i])) - printf(" 0x%02x %s\n", i, ti->adobename); - } - printf("\n"); - } -} - - -#define VERSION "\ -Copyright (C) 1997-1999 Frederic Loyer and Werner Lemberg.\n\ -There is NO warranty. You may redistribute this software\n\ -under the terms of the GNU General Public License\n\ -and the Dvips copyright.\n\ -\n\ -For more information about these matters, see the files\n\ -named COPYING and ttf2tfm.c.\n\ -\n\ -Primary authors of ttf2tfm: F. Loyer and W. Lemberg.\n\ -\n\ -ttf2tfm is based on afm2tfm from T. Rokicki\n\ -and the FreeType project from\n\ -David Turner, Robert Wilhelm, and Werner Lemberg.\n\ -" - -static void -version(void) -{ - fputs(ident, stdout); - fprintf(stdout, " (%s)\n", TeX_search_version()); - fputs(VERSION, stdout); - exit(0); -} - - -#define USAGE "\ - Convert a TrueType font table to TeX's font metric format.\n\ -\n\ --c REAL use REAL for height of small caps made with -V [0.8]\n\ --e REAL widen (extend) characters by a factor of REAL [1.0]\n\ --E INT select INT as the TTF encoding ID [1]\n\ --f INT select INT as the font index in a TTC [0]\n\ --l create 1st/2nd byte ligatures in subfonts\n\ --n use PS names of TrueType font\n\ --N use only PS names and no cmap\n\ --O use octal for all character codes in the vpl file\n\ --p ENCFILE[.enc] read ENCFILE for the TTF->raw TeX mapping\n\ --P INT select INT as the TTF platform ID [3]\n\ --q suppress informational output\n\ --r OLDNAME NEWNAME replace glyph name OLDNAME with NEWNAME\n\ --R RPLFILE[.rpl] read RPLFILE containing glyph replacement names\n\ --s REAL oblique (slant) characters by REAL, usually <<1 [0.0]\n\ --t ENCFILE[.enc] read ENCFILE for the encoding of the vpl file\n\ --T ENCFILE[.enc] equivalent to -p ENCFILE -t ENCFILE\n\ --u output only characters from encodings, nothing extra\n\ --v FILE[.vpl] make a VPL file for conversion to VF\n\ --V SCFILE[.vpl] like -v, but synthesize smallcaps as lowercase\n\ --x rotate subfont glyphs by 90 degrees\n\ --y REAL move rotated glyphs down by a factor of REAL [0.25]\n\ ---help print this message and exit\n\ ---version print version number and exit\n\ -" - -static void -usage(void) -{ - fputs("Usage: ttf2tfm FILE[.ttf|.ttc] [OPTION]... [FILE[.tfm]]\n", stdout); - fputs(USAGE, stdout); - exit(0); -} - - -static void -handle_options(int argc, char *argv[], Font *fnt) -{ - register int lastext; - register int i; - size_t l; - int arginc; - char *temp; - char c; - char *vpl_name = NULL; - Boolean have_capheight = 0; - Boolean have_sfd = 0; - int sfd_begin, postfix_begin; - int base_name; - stringlist* sl; - - - /* scan first whether the -q switch is set */ - for (i = 1; i < argc; i++) - if (argv[i][0] == '-' && argv[i][1] == 'q') - quiet = True; - - if (!quiet) - printf("This is %s\n", ident); - -#if defined(MSDOS) || defined(OS2) || defined(ATARIST) - /* Make VPL file identical to that created under Unix */ - fnt->titlebuf = (char *)mymalloc(strlen(progname) + strlen(argv[1]) + - 1 + 1); - sprintf(fnt->titlebuf, "%s %s", progname, argv[1]); -#else - fnt->titlebuf = (char *)mymalloc(strlen(argv[0]) + strlen(argv[1]) + - 1 + 1); - sprintf(fnt->titlebuf, "%s %s", argv[0], argv[1]); -#endif - - - /* - * TrueType font name. - */ - - fnt->ttfname = newstring(argv[1]); - - /* - * The other arguments. We delay the final processing of some switches - * until the tfm font name has been scanned -- if it contains two `@'s, - * many switches are ignored. - */ - - while (argc > 2 && *argv[2] == '-') - { - arginc = 2; - i = argv[2][1]; - - switch (i) - { - case 'v': - makevpl = 1; - if (argc <= 3) - oops("Missing parameter for -v option."); - if (vpl_name) - free(vpl_name); - vpl_name = newstring(argv[3]); - handle_extension(&vpl_name, ".vpl"); - break; - - case 'V': - makevpl = 2; - if (argc <= 3) - oops("Missing parameter for -V option."); - if (vpl_name) - free(vpl_name); - vpl_name = newstring(argv[3]); - handle_extension(&vpl_name, ".vpl"); - break; - - case 'f': - if (argc <= 3) - oops("Missing parameter for -f option."); - if (sscanf(argv[3], "%lu", &(fnt->fontindex)) == 0) - oops("Invalid font index."); - fnt->fontindexparam = argv[3]; - break; - - case 'E': - if (argc <= 3) - oops("Missing parameter for -E option."); - if (sscanf(argv[3], "%hu", &(fnt->eid)) == 0) - oops("Invalid encoding ID."); - fnt->eidparam = argv[3]; - break; - - case 'P': - if (argc <= 3) - oops("Missing parameter for -P option."); - if (sscanf(argv[3], "%hu", &(fnt->pid)) == 0) - oops("Invalid platform ID."); - fnt->pidparam = argv[3]; - break; - - case 'e': - if (argc <= 3) - oops("Missing parameter for -e option."); - if (sscanf(argv[3], "%f", &(fnt->efactor)) == 0 || fnt->efactor < 0.01) - oops("Bad extension factor."); - fnt->efactorparam = argv[3]; - break; - - case 'c': - if (argc <= 3) - oops("Missing parameter for -c option."); - have_capheight = True; - if (sscanf(argv[3], "%f", &(fnt->capheight)) == 0) - fnt->capheight = 0; - break; - - case 's': - if (argc <= 3) - oops("Missing parameter for -s option."); - if (sscanf(argv[3], "%f", &(fnt->slant)) == 0) - oops("Bad slant parameter."); - fnt->slantparam = argv[3]; - break; - - case 'p': - if (argc <= 3) - oops("Missing parameter for -p option."); - if (fnt->inencname) - free(fnt->inencname); - fnt->inencname = newstring(argv[3]); - break; - - case 'T': - if (argc <= 3) - oops("Missing parameter for -T option."); - if (fnt->inencname) - free(fnt->inencname); - if (fnt->outencname) - free(fnt->outencname); - fnt->inencname = newstring(argv[3]); - fnt->outencname = newstring(argv[3]); - break; - - case 't': - if (argc <= 3) - oops("Missing parameter for -T option."); - if (fnt->outencname) - free(fnt->outencname); - fnt->outencname = newstring(argv[3]); - break; - - case 'r': - if (argc <= 4) - oops("Not enough parameters for -r option."); - sl = newstringlist(); - sl->old_name = newstring(argv[3]); - sl->new_name = newstring(argv[4]); - sl->single_replacement = True; - sl->next = fnt->replacements; - fnt->replacements = sl; - arginc = 3; - break; - - case 'R': - if (argc <= 3) - oops("Missing parameter for -R option."); - if (fnt->replacementname) - free(fnt->replacementname); - fnt->replacementname = newstring(argv[3]); - break; - - case 'y': - if (argc <= 3) - oops("Missing parameter for -y option."); - if (sscanf(argv[3], "%f", &(fnt->y_offset)) == 0) - oops("Invalid y-offset."); - fnt->y_offsetparam = argv[3]; - break; - - case 'O': - forceoctal = True; - arginc = 1; - break; - - case 'n': - fnt->PSnames = Yes; - arginc = 1; - break; - - case 'N': - fnt->PSnames = Only; - arginc = 1; - break; - - case 'u': - pedantic = True; - arginc = 1; - break; - - case 'q': - quiet = True; - arginc = 1; - break; - - case 'l': - fnt->subfont_ligs = True; - arginc = 1; - break; - - case 'x': - fnt->rotate = True; - arginc = 1; - break; - - default: - if (argc <= 3 || argv[3][0] == '-') - { - warning("Unknown option `%s' will be ignored.\n", argv[2]); - arginc = 1; - } - else - warning("Unknown option `%s %s' will be ignored.\n", - argv[2], argv[3]); - } - - for (i = 0; i < arginc; i++) - { - l = strlen(fnt->titlebuf); - fnt->titlebuf = (char *)myrealloc((void *)fnt->titlebuf, - l + strlen(argv[2]) + 1 + 1); - sprintf(fnt->titlebuf + strlen(fnt->titlebuf), " %s", argv[2]); - argv++; - argc--; - } - } - - /* Read replacement glyph name file */ - - get_replacements(fnt); - - if (argc > 3 || (argc == 3 && *argv[2] == '-')) - oops("Need at most two non-option arguments."); - - /* - * The tfm file name. - */ - - if (argc == 2) - temp = newstring(fnt->ttfname); - else - { - temp = newstring(argv[2]); - l = strlen(fnt->titlebuf); - fnt->titlebuf = (char *)myrealloc((void *)fnt->titlebuf, - l + strlen(argv[2]) + 1 + 1); - sprintf(fnt->titlebuf + strlen(fnt->titlebuf), " %s", argv[2]); - } - - handle_sfd(temp, &sfd_begin, &postfix_begin); - - if (sfd_begin > -1) - { - have_sfd = True; - i = sfd_begin - 2; - } - else - i = strlen(temp) - 1; - - /* - * Now we search the beginning of the name without directory. - */ - - for (; i >= 0; i--) - if (temp[i] == '/' || temp[i] == ':' || temp[i] == '\\') - break; - - base_name = i + 1; - - /* - * We store the path (with the final directory separator). - */ - - if (base_name > 0) - { - c = temp[base_name]; - temp[base_name] = '\0'; - fnt->tfm_path = newstring(temp); - temp[base_name] = c; - } - - if (have_sfd) - { - /* the prefix and the sfd file name */ - - if (temp[base_name]) - fnt->outname = newstring(temp + base_name); - - fnt->sfdname = newstring(temp + sfd_begin); - } - else - postfix_begin = base_name; - - /* - * Get the extension. - */ - - lastext = -1; - for (i = postfix_begin; temp[i]; i++) - if (temp[i] == '.') - lastext = i; - - if (argc == 2 && lastext >= 0) - { - temp[lastext] = '\0'; /* remove TTF file extension */ - lastext = -1; - } - - if (lastext == -1) - fnt->tfm_ext = newstring(".tfm"); - else - { - fnt->tfm_ext = newstring(temp + lastext); - temp[lastext] = '\0'; - } - - if (have_sfd) - { - if (temp[postfix_begin]) - fnt->outname_postfix = newstring(temp + postfix_begin); - } - else - { - if (temp[base_name]) - fnt->outname = newstring(temp + base_name); - else - oops("Invalid tfm file name."); - } - - - /* - * Now we can process the remaining parameters. - */ - - if (have_sfd) - { - if (makevpl) - { - warning("Ignoring `-v' and `-V' switches for subfonts."); - makevpl = 0; - } - if (have_capheight) - warning("Ignoring `-c' switch for subfonts."); - if (fnt->inencname || fnt->outencname) - { - warning("Ignoring `-p', `-t', and `-T' switches for subfonts."); - fnt->inencname = NULL; - fnt->outencname = NULL; - } - if (fnt->y_offsetparam && !fnt->rotate) - warning("Ignoring `-y' switch for non-rotated subfonts."); - if (fnt->PSnames) - { - warning("Ignoring `-n' or '-N' switch for subfonts."); - fnt->PSnames = No; - } - - init_sfd(fnt, True); - } - else - { - if (have_capheight && fnt->capheight < 0.01) - oops("Bad small caps height."); - - if (vpl_name) - if ((fnt->vplout = fopen(vpl_name, "wt")) == NULL) - oops("Cannot open vpl output file."); - - if (fnt->subfont_ligs) - { - warning("Ignoring `-l' switch for non-subfont."); - fnt->subfont_ligs = False; - } - - if (fnt->rotate) - { - warning("Ignoring `-x' switch for non-subfont."); - fnt->rotate = False; - } - - if (fnt->y_offsetparam) - warning("Ignoring `-y' switch for non-subfont."); - } - - if (fnt->PSnames == Only) - { - if (fnt->pidparam || fnt->eidparam) - { - warning("Ignoring `-P' and `-E' options if `-N' switch is selected."); - fnt->pidparam = NULL; - fnt->eidparam = NULL; - } - } - - if (vpl_name) - free(vpl_name); - free(temp); -} - - -/* - * This routine prints out the line that needs to be added to ttfonts.map. - */ - -static void -consttfonts(Font *fnt) -{ - if (!quiet) - printf("\n"); - if (fnt->outname) - printf("%s", fnt->outname); - if (fnt->sfdname) - printf("@%s@", fnt->sfdname); - if (fnt->outname_postfix) - printf("%s", fnt->outname_postfix); - - printf(" %s", fnt->ttfname); - - if (fnt->slantparam || fnt->efactorparam || - fnt->inencname || - fnt->pidparam || fnt->eidparam || - fnt->fontindexparam || - fnt->replacements || - fnt->replacementname || - fnt->PSnames || - fnt->rotate || fnt->y_offsetparam) - { - if (fnt->slantparam) - printf(" Slant=%s", fnt->slantparam); - if (fnt->efactorparam) - printf(" Extend=%s", fnt->efactorparam); - if (fnt->inencname) - printf(" Encoding=%s", fnt->inencname); - if (fnt->pidparam) - printf(" Pid=%s", fnt->pidparam); - if (fnt->eidparam) - printf(" Eid=%s", fnt->eidparam); - if (fnt->fontindexparam) - printf(" Fontindex=%s", fnt->fontindexparam); - if (fnt->PSnames) - printf(" PS=%s", fnt->PSnames == Yes ? "Yes" : "Only"); - if (fnt->rotate) - printf(" Rotate=Yes"); - if (fnt->y_offsetparam) - printf(" Y-Offset=%s", fnt->y_offsetparam); - if (fnt->replacementname && fnt->inencoding) - printf(" Replacement=%s", fnt->replacementname); - if (fnt->replacements && fnt->inencoding) - { - stringlist *sl; - - - for (sl = fnt->replacements; sl; sl = sl->next) - if (sl->single_replacement) - printf(" %s=%s", sl->old_name, sl->new_name); - } - } - printf("\n"); -} - - -int -main(int argc, char *argv[]) -{ - Font font; - ttfinfo *ti; - - - init_font_structure(&font); - - TeX_search_init(argv[0], "ttf2tfm", "TTF2TFM"); - - if (argc == 1) - { - fputs("ttf2tfm: Need at least one file argument.\n", stderr); - fputs("Try `ttf2tfm --help' for more information.\n", stderr); - exit(1); - } - if (argc == 2) - { - if (strcmp(argv[1], "--help") == 0) - usage(); - else if (strcmp(argv[1], "--version") == 0) - version(); - } - - handle_options(argc, argv, &font); - - if (font.sfdname) - { - while (get_sfd(&font)) - { - char *temp; - int i, start, end, len; - - - get_tfm_fullname(&font); - - /* - * Extract base name of sfd file. - */ - - temp = newstring(font.sfdname); - len = strlen(temp); - - start = 0; - for (i = len - 1; i >= 0; i--) - if (temp[i] == '/' || temp[i] == ':' || temp[i] == '\\') - { - start = i + 1; - break; - } - - end = len; - for (i = len - 1; i >= 0; i--) - if (temp[i] == '.') - { - end = i; - break; - } - temp[end] = '\0'; - - font.codingscheme = (char *)mymalloc(strlen(temp + start) + 4 + 1); - sprintf(font.codingscheme, "CJK-%s", temp + start); - free(temp); - - readttf(&font, quiet, True); - if (font.replacements) - warning("Replacement glyphs will be ignored."); - - if (NULL != (ti = findadobe("space", font.charlist))) - font.fontspace = ti->width; - else if (NULL != (ti = findadobe(".c0x20", font.charlist))) - font.fontspace = ti->width; - else - font.fontspace = transform(500, 0, font.efactor, font.slant); - - if (buildtfm(&font)) - writetfm(&font); - } - - close_sfd(); - } - else - { - get_tfm_fullname(&font); - - readttf(&font, quiet, False); - replace_glyphs(&font); - - if (NULL != (ti = findadobe("space", font.charlist))) - font.fontspace = ti->width; - else if (NULL != (ti = findadobe(".c0x20", font.charlist))) - font.fontspace = ti->width; - else - font.fontspace = transform(500, 0, font.efactor, font.slant); - - handlereencoding(&font); - - buildtfm(&font); - writetfm(&font); - } - - if (makevpl) - { - assignchars(&font); - if (makevpl > 1) - upmap(&font); - writevpl(&font, makevpl, forceoctal); - fclose(font.vplout); - } - - consttfonts(&font); - - exit(0); /* for safety reasons */ - return 0; /* never reached */ -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.h diff -u xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.h:removed --- xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.h:1.1.1.2 Sat Feb 12 23:55:14 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttf2tfm.h Wed Mar 16 20:59:31 2005 @@ -1,234 +0,0 @@ -/* - * ttf2tfm.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TTF2TFM_H -#define TTF2TFM_H - -#include - - -enum Boolean_ -{ - False = 0, - True = 1 -}; -typedef enum Boolean_ Boolean; - -enum PSstate_ -{ - No = 0, - Yes = 1, - Only = 2 -}; -typedef enum PSstate_ PSstate; - - -struct _encoding -{ - char *name; - char *vec[256]; -}; -typedef struct _encoding encoding; - - -/* - * This is what we store character data in. - */ - -struct _ttfinfo; -typedef struct _ttfinfo ttfinfo; -struct _lig; -typedef struct _lig lig; -struct _kern; -typedef struct _kern kern; -struct _ttfptr; -typedef struct _ttfptr ttfptr; -struct _pcc; -typedef struct _pcc pcc; -struct _stringlist; -typedef struct _stringlist stringlist; - - - -struct _ttfinfo -{ - ttfinfo *next; - long charcode; /* the TTF character code (or glyph index */ - /* if bit 17 is set) */ - unsigned short glyphindex; /* the TTF glyph number */ - short incode; /* the code position in the raw TeX font */ - short outcode; /* the code position in the virtual font */ - char *adobename; - - short width; - short llx, lly, urx, ury; - - lig *ligs; - kern *kerns; - ttfptr *kern_equivs; - Boolean constructed; - pcc *pccs; /* we use the composite feature for */ - /* `germandbls' <--> `SS' only */ - unsigned char wptr, hptr, dptr, iptr; -}; - - -struct _lig -{ - lig *next; - char *succ, *sub; - short op, boundleft; -}; - - -struct _kern -{ - kern *next; - char *succ; - short delta; -}; - - -struct _ttfptr -{ - ttfptr *next; - ttfinfo *ch; -}; - - -struct _pcc -{ - pcc *next; - char *partname; - short xoffset, yoffset; -}; - - -struct _stringlist -{ - stringlist* next; - char *old_name; - char *new_name; - Boolean single_replacement; -}; - - -struct _Font -{ - char *ttfname; - - /* - * Full path and extension of the tfm file - */ - - char *tfm_path; - char *tfm_ext; - - /* - * The final tfm name is composed of the following three parts. - */ - - char *outname; /* only namestem without extension */ - char *subfont_name; /* NULL if not used */ - char *outname_postfix; /* NULL if not used */ - char *fullname; /* outname + subfont_name + outname_postfix */ - - FILE *vplout; - FILE *tfmout; - - /* - * The input encoding maps from the TrueType font to the raw TeX font. - */ - - char *inencname; /* name of input encoding file */ - encoding *inencoding; /* the input encoding vector */ - ttfinfo *inencptrs[256]; /* the input mapping table. Will be - filled initially with the first - 256 characters in the selected - cmap of the TrueType font */ - stringlist *replacements; /* replacements for glyph names given - with the -r option on the command - line */ - char *replacementname; /* name of replacement file */ - - /* - * The output encoding maps from the raw TeX font to the virtual font. - */ - - char *outencname; /* name of output encoding file */ - encoding *outencoding; /* the output encoding vector */ - ttfinfo *outencptrs[256]; /* the output mapping table */ - - short nextout[256]; /* for characters encoded multiple times - in output */ - - Boolean sawligkern; /* there were LIGKERN lines in the - output encoding file */ - Boolean subfont_ligs; /* ligatures 1st byte/2nd byte in - subfonts wanted */ - - ttfinfo *charlist; /* a linked list of all valid chars */ - - ttfinfo *uppercase[256]; /* needed for small caps fonts */ - ttfinfo *lowercase[256]; /* ditto */ - - short boundarychar; /* the boundary character */ - char *codingscheme; /* coding scheme for TeX */ - char *titlebuf; - - /* - * The name of the subfont definition file. - */ - - char *sfdname; - long sf_code[256]; - - /* - * We get the following three values from the TTF's postscript table. - */ - - short units_per_em; - float italicangle; - char fixedpitch; - - short xheight; /* xheight for TeX */ - short fontspace; /* font space for TeX */ - - /* - * These values can be specified on the command line. - */ - - unsigned short pid; /* the TTF platform ID */ - unsigned short eid; /* the TTF encoding ID */ - float efactor; /* to extend the glyphs horizontally */ - float slant; /* to slant the font */ - unsigned long fontindex; /* font number in TTC */ - float capheight; /* the height of small caps glyphs */ - PSstate PSnames; /* we use the PS names in the TTF */ - Boolean rotate; /* we rotate the glyphs by 90 degrees */ - float y_offset; /* y offset for rotated glyphs */ - - /* - * The command line parameter strings needed for ttf2pk. - */ - - char *pidparam; - char *eidparam; - char *efactorparam; - char *slantparam; - char *fontindexparam; - char *y_offsetparam; -}; -typedef struct _Font Font; - -#endif /* TEX2TFM_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttfaux.c diff -u xc/extras/FreeType/contrib/ttf2pk/ttfaux.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttfaux.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ttfaux.c:1.1.1.2 Sat Feb 12 23:55:14 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttfaux.c Wed Mar 16 20:59:31 2005 @@ -1,714 +0,0 @@ -/* - * ttfaux.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include - -#include "freetype.h" -#include "extend/ftxkern.h" /* we are in the FreeType package tree */ -#include "extend/ftxpost.h" -#include "extend/ftxopen.h" - -#include "ttf2tfm.h" -#include "newobj.h" -#include "ligkern.h" -#include "ttfenc.h" -#include "tfmaux.h" -#include "errormsg.h" -#include "ttfaux.h" -#include "filesrch.h" - - -#define Macintosh_platform 1 -#define Macintosh_encoding 0 - -#define Microsoft_platform 3 -#define Microsoft_Unicode_encoding 1 - -#define SCRIPT_kana MAKE_TT_TAG('k', 'a', 'n', 'a') -#define SCRIPT_hani MAKE_TT_TAG('h', 'a', 'n', 'i') -#define SCRIPT_hang MAKE_TT_TAG('h', 'a', 'n', 'g') - -#define LANGUAGE_JAN MAKE_TT_TAG('J', 'A', 'N', ' ') -#define LANGUAGE_CHN MAKE_TT_TAG('C', 'H', 'N', ' ') -#define LANGUAGE_KOR MAKE_TT_TAG('K', 'O', 'R', ' ') - -#define FEATURE_vert MAKE_TT_TAG('v', 'e', 'r', 't') - - -extern char progname[]; - -char *real_ttfname; - -TT_Engine engine; -TT_Face face; -TT_Instance instance; -TT_Glyph glyph; -TT_Outline outline; -TT_CharMap char_map; -TT_Matrix matrix1, matrix2; - -TT_Big_Glyph_Metrics metrics; -TT_Face_Properties properties; -TT_BBox bbox; - -TT_Kerning directory; -TT_Post post; - -TTO_GSUBHeader gsub_; -TTO_GSUBHeader *gsub; - -Boolean has_gsub; - - - -static void -readttf_kern(Font *fnt) -{ - register kern *nk; - register ttfinfo *ti; - TT_Kern_0_Pair* pairs0; - TT_Error error; - unsigned int i, j; - - - if ((error = TT_Get_Kerning_Directory(face, &directory))) - oops("Cannot get kerning directory (error code = 0x%x).", error); - - if (directory.nTables == 0) - return; - - for (i = 0; i < directory.nTables; i++) - { - if ((error = TT_Load_Kerning_Table(face, i))) - oops("Cannot load kerning table (error code = 0x%x).", error); - - switch (directory.tables[i].format) - { - case 0: - pairs0 = directory.tables[i].t.kern0.pairs; - for (j = 0; j < directory.tables[i].t.kern0.nPairs; j++, pairs0++) - { - ti = findglyph(pairs0->left, fnt->charlist); - if (ti == NULL) - warning("kern char not found"); - else - { - nk = newkern(); - nk->succ = findglyph(pairs0->right, fnt->charlist)->adobename; - nk->delta = transform(pairs0->value * 1000 / fnt->units_per_em, 0, - fnt->efactor, fnt->slant); - nk->next = ti->kerns; - ti->kerns = nk; - } - } - return; /* we stop after the first format 0 kerning table */ - - default: - break; - } - } - return; -} - - -void -readttf(Font *fnt, Boolean quiet, Boolean only_range) -{ - TT_Error error; - ttfinfo *ti, *Ti; - long Num, index; - unsigned int i, j; - long k, max_k; - unsigned short num_cmap; - unsigned short cmap_plat, cmap_enc; - int index_array[257]; - - static Boolean initialized = False; - - TT_UShort in_string[2]; - TTO_GSUB_String in, out; - - TT_UShort script_index, language_index, feature_index; - TT_UShort req_feature_index = 0xFFFF; - - - /* - * We allocate a placeholder boundary and the `.notdef' character. - */ - - if (!only_range) - { - ti = newchar(fnt); - ti->charcode = -1; - ti->adobename = ".notdef"; - - ti = newchar(fnt); - ti->charcode = -1; - ti->adobename = "||"; /* boundary character name */ - } - - /* - * Initialize FreeType engine. - */ - - if (!initialized) - { - if ((error = TT_Init_FreeType(&engine))) - oops("Cannot initialize engine (error code = 0x%x).", error); - - if ((error = TT_Init_Kerning_Extension(engine))) - oops("Cannot initialize kerning (error code = 0x%x).", error); - - if (fnt->PSnames) - if ((error = TT_Init_Post_Extension(engine))) - oops("Cannot initialize PS name support (error code = 0x%x).", error); - - if (fnt->rotate) - if ((error = TT_Init_GSUB_Extension(engine))) - oops("Cannot initialize GSUB support (error code = 0x%x).", error); - - /* - * Load face. - */ - - real_ttfname = TeX_search_ttf_file(&(fnt->ttfname)); - if (!real_ttfname) - oops("Cannot find `%s'.", fnt->ttfname); - - if ((error = TT_Open_Face(engine, real_ttfname, &face))) - oops("Cannot open `%s'.", real_ttfname); - - /* - * Get face properties and allocate preload arrays. - */ - - TT_Get_Face_Properties(face, &properties); - - /* - * Now we try to open the proper font in a collection. - */ - - if (fnt->fontindex != 0) - { - if (properties.num_Faces == 1) - { - warning("This isn't a TrueType collection.\n" - "Parameter `-f' is ignored."); - fnt->fontindex = 0; - fnt->fontindexparam = NULL; - } - else - { - TT_Close_Face(face); - if ((error = TT_Open_Collection(engine, real_ttfname, - fnt->fontindex, &face))) - oops("Cannot open font %lu in TrueType Collection `%s'.", - fnt->fontindex, real_ttfname); - } - } - - /* - * Create instance. - */ - - if ((error = TT_New_Instance(face, &instance))) - oops("Cannot create instance for `%s' (error code = 0x%x).", - real_ttfname, error); - - /* - * We use a dummy glyph size of 10pt. - */ - - if ((error = TT_Set_Instance_CharSize(instance, 10 * 64))) - oops("Cannot set character size (error code = 0x%x).", error); - - matrix1.xx = (TT_Fixed)(floor(fnt->efactor * 1024) * (1L<<16)/1024); - matrix1.xy = (TT_Fixed)(floor(fnt->slant * 1024) * (1L<<16)/1024); - matrix1.yx = (TT_Fixed)0; - matrix1.yy = (TT_Fixed)(1L<<16); - - if (fnt->rotate) - { - matrix2.xx = 0; - matrix2.yx = 1L << 16; - matrix2.xy = -matrix2.yx; - matrix2.yy = matrix2.xx; - } - - if ((error = TT_Set_Instance_Transform_Flags( - instance, - fnt->rotate ? 1 : 0, - fnt->efactor != 1.0 ? 1 : 0))) - oops("Cannot set transform flags (error code = 0x%x).", error); - - /* - * Create glyph container. - */ - - if ((error = TT_New_Glyph(face, &glyph))) - oops("Cannot create glyph container (error code = 0x%x).", error); - - fnt->units_per_em = properties.header->Units_Per_EM; - fnt->fixedpitch = properties.postscript->isFixedPitch; - fnt->italicangle = properties.postscript->italicAngle / 65536.0; - - if (fnt->PSnames != Only) - { - num_cmap = properties.num_CharMaps; - for (i = 0; i < num_cmap; i++) - { - if ((error = TT_Get_CharMap_ID(face, i, &cmap_plat, &cmap_enc))) - oops("Cannot query cmap (error code = 0x%x).", error); - if (cmap_plat == fnt->pid && cmap_enc == fnt->eid) - break; - } - if (i == num_cmap) - { - fprintf(stderr, "%s: ERROR: Invalid platform and/or encoding ID.\n", - progname); - if (num_cmap == 1) - fprintf(stderr, " The only valid PID/EID pair is"); - else - fprintf(stderr, " Valid PID/EID pairs are:\n"); - for (i = 0; i < num_cmap; i++) - { - TT_Get_CharMap_ID(face, i, &cmap_plat, &cmap_enc); - fprintf(stderr, " (%i,%i)\n", cmap_plat, cmap_enc); - } - fprintf(stderr, "\n"); - exit(1); - } - - if ((error = TT_Get_CharMap(face, i, &char_map))) - oops("Cannot load cmap (error code = 0x%x).", error); - } - - if (fnt->PSnames) - { - if ((error = TT_Load_PS_Names(face, &post))) - oops("Cannot load TrueType PS names (error code = 0x%x).", error); - } - else if (cmap_plat == Microsoft_platform && - cmap_enc == Microsoft_Unicode_encoding) - set_encoding_scheme(encUnicode, fnt); - else if (cmap_plat == Macintosh_platform && - cmap_enc == Macintosh_encoding) - set_encoding_scheme(encMac, fnt); - else - set_encoding_scheme(encFontSpecific, fnt); - - if (fnt->rotate) - { - gsub = &gsub_; - - error = TT_Load_GSUB_Table(face, gsub, NULL); - if (!error) - has_gsub = True; - else if (error != TT_Err_Table_Missing) - warning("Cannot load GSUB table (error code = 0x%x).", error); - else - warning("No GSUB data available " - "for vertical glyph presentation forms."); - - /* we check for the `vert' feature in Chinese, Japanese, and Korean */ - - error = TT_GSUB_Select_Script(gsub, - SCRIPT_kana, - &script_index); - if (error) - goto check_hani; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_JAN, - script_index, - &language_index, - &req_feature_index); - if (error) - goto check_hani; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - if (error) - goto check_hani; - else - goto Done; - } - else - goto Done; - - check_hani: - error = TT_GSUB_Select_Script(gsub, - SCRIPT_hani, - &script_index); - if (error) - goto check_hang; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_CHN, - script_index, - &language_index, - &req_feature_index); - if (error) - goto check_hang; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - if (error) - goto check_hang; - else - goto Done; - } - else - goto Done; - - check_hang: - error = TT_GSUB_Select_Script(gsub, - SCRIPT_hang, - &script_index); - if (error) - goto Done; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_KOR, - script_index, - &language_index, - &req_feature_index); - if (error) - goto Done; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - } - - Done: - if (error) - { - warning("There is no data for vertical typesetting in GSUB table."); - has_gsub = False; - } - - if (req_feature_index != 0xFFFF) - TT_GSUB_Add_Feature(gsub, req_feature_index, ALL_GLYPHS); - TT_GSUB_Add_Feature(gsub, feature_index, ALL_GLYPHS); - - in.length = 1; - in.pos = 0; - in.string = in_string; - in.properties = NULL; - - out.pos = 0; - out.allocated = 0; - out.string = NULL; - out.properties = NULL; - } - - initialized = True; - } - - if (!quiet) - { - if (only_range) - printf("\n\n%s:\n", fnt->fullname); - printf("\n"); - printf("Glyph Code Glyph Name "); - printf("Width llx lly urx ury\n"); - printf("---------------------------------------"); - printf("---------------------------------\n"); - } - - /* - * We load only glyphs with a valid cmap entry. Nevertheless, for - * the default mapping, we use the first 256 glyphs addressed by - * ascending code points, followed by glyphs not in the cmap. - * - * If we compute a range, we take the character codes given in - * the fnt->sf_code array. - * - * If the -N flag is set, no cmap is used at all. Instead, the - * first 256 glyphs (with a valid PS name) are used for the default - * mapping. - */ - - if (!only_range) - for (i = 0; i < 257; i++) - index_array[i] = 0; - else - for (i = 0; i < 256; i++) - fnt->inencptrs[i] = 0; - - j = 0; - if (fnt->PSnames == Only) - max_k = properties.num_Glyphs - 1; - else - max_k = only_range ? 0xFF : 0xFFFF; - - for (k = 0; k <= max_k; k++) - { - char *an; - - - if (fnt->PSnames != Only) - { - if (only_range) - { - index = fnt->sf_code[k]; - if (index < 0) - continue; - j = k; - } - else - index = k; - - Num = TT_Char_Index(char_map, index); - - /* now we try to get a vertical glyph form */ - - if (has_gsub) - { - in_string[0] = Num; - error = TT_GSUB_Apply_String(gsub, &in, &out); - if (error && error != TTO_Err_Not_Covered) - warning("Cannot get the vertical glyph form for glyph index %d.", - Num); - else - Num = out.string[0]; - } - - if (Num < 0) - oops("Failure on cmap mapping from %s.", fnt->ttfname); - if (Num == 0) - continue; - if (!only_range) - if (Num <= 256) - index_array[Num] = 1; - } - else - { - Num = k; - index = 0; - } - - error = TT_Load_Glyph(instance, glyph, Num, 0); - if (!error) - error = TT_Get_Glyph_Big_Metrics(glyph, &metrics); - if (!error) - error = TT_Get_Glyph_Outline(glyph, &outline); - if (!error) - { - if (fnt->efactor != 1.0 || fnt->slant != 0.0 ) - TT_Transform_Outline(&outline, &matrix1); - if (fnt->rotate) - TT_Transform_Outline(&outline, &matrix2); - } - if (!error) - error = TT_Get_Outline_BBox(&outline, &bbox); /* we need the non- - grid-fitted bbox */ - if (!error) - { - if (fnt->PSnames) - (void)TT_Get_PS_Name(face, Num, &an); - else - an = code_to_adobename(index); - - /* ignore characters not usable for typesetting with TeX */ - - if (strcmp(an, ".notdef") == 0) - continue; - if (strcmp(an, ".null") == 0) - continue; - if (strcmp(an, "nonmarkingreturn") == 0) - continue; - - ti = newchar(fnt); - ti->charcode = index; - ti->glyphindex = Num; - ti->adobename = an; - ti->llx = bbox.xMin * 1000 / fnt->units_per_em; - ti->lly = bbox.yMin * 1000 / fnt->units_per_em; - ti->urx = bbox.xMax * 1000 / fnt->units_per_em; - ti->ury = bbox.yMax * 1000 / fnt->units_per_em; - - /* - * We must now shift the rotated character both horizontally - * and vertically. The vertical amount is 25% by default. - */ - - if (fnt->rotate) - { - ti->llx += (metrics.vertBearingY - bbox.xMin) * - 1000 / fnt->units_per_em; - ti->lly -= 1000 * fnt->y_offset; - ti->urx += (metrics.vertBearingY - bbox.xMin) * - 1000 / fnt->units_per_em; - ti->ury -= 1000 * fnt->y_offset; - } - - /* - * We need to avoid negative heights or depths. They break accents - * in math mode, among other things. - */ - - if (ti->lly > 0) - ti->lly = 0; - if (ti->ury < 0) - ti->ury = 0; - if (fnt->rotate) - ti->width = metrics.vertAdvance * 1000 / fnt->units_per_em; - else - ti->width = transform(metrics.horiAdvance * 1000 / fnt->units_per_em, - 0, fnt->efactor, fnt->slant); - - if (!quiet) - printf("%5ld %04lx %-25s %5d % 5d,% 5d -- % 5d,% 5d\n", - Num, index, ti->adobename, - ti->width, - ti->llx, ti->lly, ti->urx, ti->ury); - - if (j < 256) - { - fnt->inencptrs[j] = ti; - ti->incode = j; - } - j++; - } - } - - /* - * Now we load glyphs without a cmap entry, provided some slots are - * still free -- we skip this if we have to compute a range or use - * PS names. - */ - - if (!only_range && !fnt->PSnames) - { - for (i = 1; i <= properties.num_Glyphs; i++) - { - char *an; - - - if (index_array[i] == 0) - { - error = TT_Load_Glyph(instance, glyph, i, 0); - if (!error) - error = TT_Get_Glyph_Big_Metrics(glyph, &metrics); - if (!error) - error = TT_Get_Glyph_Outline(glyph, &outline); - if (!error) - error = TT_Get_Outline_BBox(&outline, &bbox); - if (!error) - { - an = code_to_adobename(i | 0x10000); - - ti = newchar(fnt); - ti->charcode = i | 0x10000; - ti->glyphindex = i; - ti->adobename = an; - ti->llx = bbox.xMin * 1000 / fnt->units_per_em; - ti->lly = bbox.yMin * 1000 / fnt->units_per_em; - ti->urx = bbox.xMax * 1000 / fnt->units_per_em; - ti->ury = bbox.yMax * 1000 / fnt->units_per_em; - - if (ti->lly > 0) - ti->lly = 0; - if (ti->ury < 0) - ti->ury = 0; - ti->width = transform(metrics.horiAdvance*1000 / fnt->units_per_em, - 0, fnt->efactor, fnt->slant); - - if (!quiet) - printf("%5d %-25s %5d % 5d,% 5d -- % 5d,% 5d\n", - i, ti->adobename, - ti->width, - ti->llx, ti->lly, ti->urx, ti->ury); - - if (j < 256) - { - fnt->inencptrs[j] = ti; - ti->incode = j; - } - else - break; - j++; - } - } - } - } - - /* Finally, we construct a `Germandbls' glyph if necessary */ - - if (!only_range) - { - if (NULL == findadobe("Germandbls", fnt->charlist) && - NULL != (Ti = findadobe("S", fnt->charlist))) - { - pcc *np, *nq; - - - ti = newchar(fnt); - ti->charcode = properties.num_Glyphs | 0x10000; - ti->glyphindex = properties.num_Glyphs; - ti->adobename = "Germandbls"; - ti->width = Ti->width << 1; - ti->llx = Ti->llx; - ti->lly = Ti->lly; - ti->urx = Ti->width + Ti->urx; - ti->ury = Ti->ury; - ti->kerns = Ti->kerns; - - np = newpcc(); - np->partname = "S"; - nq = newpcc(); - nq->partname = "S"; - nq->xoffset = Ti->width; - np->next = nq; - ti->pccs = np; - ti->constructed = True; - - if (!quiet) - printf("* %-25s %5d % 5d,% 5d -- % 5d,% 5d\n", - ti->adobename, - ti->width, - ti->llx, ti->lly, ti->urx, ti->ury); - } - } - - /* kerning between subfonts isn't available */ - if (!only_range) - readttf_kern(fnt); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttfaux.h diff -u xc/extras/FreeType/contrib/ttf2pk/ttfaux.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttfaux.h:removed --- xc/extras/FreeType/contrib/ttf2pk/ttfaux.h:1.1.1.2 Sat Feb 12 23:55:15 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttfaux.h Wed Mar 16 20:59:31 2005 @@ -1,21 +0,0 @@ -/* - * ttfaux.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TTFAUX_H -#define TTFAUX_H - -#include "ttf2tfm.h" - -void readttf(Font *fnt, Boolean quiet, Boolean only_range); - -#endif /* TTFAUX_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttfenc.c diff -u xc/extras/FreeType/contrib/ttf2pk/ttfenc.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttfenc.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ttfenc.c:1.1.1.2 Sat Feb 12 23:55:15 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttfenc.c Wed Mar 16 20:59:31 2005 @@ -1,1281 +0,0 @@ -/* - * ttfenc.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - - -#include -#include -#include - -#include "newobj.h" -#include "ttf2tfm.h" -#include "ttfenc.h" -#include "errormsg.h" - -EncodingScheme current_encoding_scheme; - -struct encoding_table -{ - long code; - char *adobename; -}; - -struct encoding_table unicode_table[] = -{ - {-1, ".notdef"}, - - {0x0020, "space"}, - {0x0021, "exclam"}, - {0x0022, "quotedbl"}, - {0x0023, "numbersign"}, - {0x0024, "dollar"}, - {0x0025, "percent"}, - {0x0026, "ampersand"}, - {0x0027, "quotesingle"}, - {0x0028, "parenleft"}, - {0x0029, "parenright"}, - {0x002a, "asterisk"}, - {0x002b, "plus"}, - {0x002c, "comma"}, - {0x002d, "hyphen"}, /* cf "minus" */ - {0x002e, "period"}, - {0x002f, "slash"}, - - {0x0030, "zero"}, - {0x0031, "one"}, - {0x0032, "two"}, - {0x0033, "three"}, - {0x0034, "four"}, - {0x0035, "five"}, - {0x0036, "six"}, - {0x0037, "seven"}, - {0x0038, "eight"}, - {0x0039, "nine"}, - {0x003a, "colon"}, - {0x003b, "semicolon"}, - {0x003c, "less"}, - {0x003d, "equal"}, - {0x003e, "greater"}, - {0x003f, "question"}, - - {0x0040, "at"}, - {0x0041, "A"}, - {0x0042, "B"}, - {0x0043, "C"}, - {0x0044, "D"}, - {0x0045, "E"}, - {0x0046, "F"}, - {0x0047, "G"}, - {0x0048, "H"}, - {0x0049, "I"}, - {0x004a, "J"}, - {0x004b, "K"}, - {0x004c, "L"}, - {0x004d, "M"}, - {0x004e, "N"}, - {0x004f, "O"}, - - {0x0050, "P"}, - {0x0051, "Q"}, - {0x0052, "R"}, - {0x0053, "S"}, - {0x0054, "T"}, - {0x0055, "U"}, - {0x0056, "V"}, - {0x0057, "W"}, - {0x0058, "X"}, - {0x0059, "Y"}, - {0x005a, "Z"}, - {0x005b, "bracketleft"}, - {0x005c, "backslash"}, - {0x005d, "bracketright"}, - {0x005e, "asciicircum"}, - {0x005f, "underscore"}, - - {0x0060, "grave"}, - {0x0061, "a"}, - {0x0062, "b"}, - {0x0063, "c"}, - {0x0064, "d"}, - {0x0065, "e"}, - {0x0066, "f"}, - {0x0067, "g"}, - {0x0068, "h"}, - {0x0069, "i"}, - {0x006a, "j"}, - {0x006b, "k"}, - {0x006c, "l"}, - {0x006d, "m"}, - {0x006e, "n"}, - {0x006f, "o"}, - - {0x0070, "p"}, - {0x0071, "q"}, - {0x0072, "r"}, - {0x0073, "s"}, - {0x0074, "t"}, - {0x0075, "u"}, - {0x0076, "v"}, - {0x0077, "w"}, - {0x0078, "x"}, - {0x0079, "y"}, - {0x007a, "z"}, - {0x007b, "braceleft"}, - {0x007c, "bar"}, - {0x007d, "braceright"}, - {0x007e, "asciitilde"}, - - {0x00a0, "nbspace"}, /* cf "space" */ - {0x00a1, "exclamdown"}, - {0x00a2, "cent"}, - {0x00a3, "sterling"}, - {0x00a4, "currency"}, - {0x00a5, "yen"}, - {0x00a6, "brokenbar"}, - {0x00a7, "section"}, - {0x00a8, "dieresis"}, - {0x00a9, "copyright"}, /* "copyrightserif" "copyrightsans" */ - {0x00aa, "ordfeminine"}, - {0x00ab, "guillemotleft"}, - {0x00ac, "logicalnot"}, - {0x00ad, "sfthyphen"}, /* cf "hyphen" */ - {0x00ae, "registered"}, /* "registeredserif" "registeredsans" */ - {0x00af, "overscore"}, - - {0x00b0, "degree"}, - {0x00b1, "plusminus"}, - {0x00b2, "twosuperior"}, - {0x00b3, "threesuperior"}, - {0x00b4, "acute"}, - {0x00b5, "mu1"}, /* "micro" */ - {0x00b6, "paragraph"}, - {0x00b7, "middot"}, /* cf "periodcentered" */ - {0x00b8, "cedilla"}, - {0x00b9, "onesuperior"}, - {0x00ba, "ordmasculine"}, - {0x00bb, "guillemotright"}, - {0x00bc, "onequarter"}, - {0x00bd, "onehalf"}, - {0x00be, "threequarters"}, - {0x00bf, "questiondown"}, - - {0x00c0, "Agrave"}, - {0x00c1, "Aacute"}, - {0x00c2, "Acircumflex"}, - {0x00c3, "Atilde"}, - {0x00c4, "Adieresis"}, - {0x00c5, "Aring"}, - {0x00c6, "AE"}, - {0x00c7, "Ccedilla"}, - {0x00c8, "Egrave"}, - {0x00c9, "Eacute"}, - {0x00ca, "Ecircumflex"}, - {0x00cb, "Edieresis"}, - {0x00cc, "Igrave"}, - {0x00cd, "Iacute"}, - {0x00ce, "Icircumflex"}, - {0x00cf, "Idieresis"}, - - {0x00d0, "Eth"}, - {0x00d1, "Ntilde"}, - {0x00d2, "Ograve"}, - {0x00d3, "Oacute"}, - {0x00d4, "Ocircumflex"}, - {0x00d5, "Otilde"}, - {0x00d6, "Odieresis"}, - {0x00d7, "multiply"}, - {0x00d8, "Oslash"}, - {0x00d9, "Ugrave"}, - {0x00da, "Uacute"}, - {0x00db, "Ucircumflex"}, - {0x00dc, "Udieresis"}, - {0x00dd, "Yacute"}, - {0x00de, "Thorn"}, - {0x00df, "germandbls"}, - - {0x00e0, "agrave"}, - {0x00e1, "aacute"}, - {0x00e2, "acircumflex"}, - {0x00e3, "atilde"}, - {0x00e4, "adieresis"}, - {0x00e5, "aring"}, - {0x00e6, "ae"}, - {0x00e7, "ccedilla"}, - {0x00e8, "egrave"}, - {0x00e9, "eacute"}, - {0x00ea, "ecircumflex"}, - {0x00eb, "edieresis"}, - {0x00ec, "igrave"}, - {0x00ed, "iacute"}, - {0x00ee, "icircumflex"}, - {0x00ef, "idieresis"}, - - {0x00f0, "eth"}, - {0x00f1, "ntilde"}, - {0x00f2, "ograve"}, - {0x00f3, "oacute"}, - {0x00f4, "ocircumflex"}, - {0x00f5, "otilde"}, - {0x00f6, "odieresis"}, - {0x00f7, "divide"}, - {0x00f8, "oslash"}, - {0x00f9, "ugrave"}, - {0x00fa, "uacute"}, - {0x00fb, "ucircumflex"}, - {0x00fc, "udieresis"}, - {0x00fd, "yacute"}, - {0x00fe, "thorn"}, - {0x00ff, "ydieresis"}, - - {0x0100, "Amacron"}, - {0x0101, "amacron"}, - {0x0102, "Abreve"}, - {0x0103, "abreve"}, - {0x0104, "Aogonek"}, - {0x0105, "aogonek"}, - {0x0106, "Cacute"}, - {0x0107, "cacute"}, - {0x0108, "Ccircumflex"}, - {0x0109, "ccircumflex"}, - {0x010a, "Cdot"}, - {0x010b, "cdot"}, - {0x010c, "Ccaron"}, - {0x010d, "ccaron"}, - {0x010e, "Dcaron"}, - {0x010f, "dcaron"}, - - {0x0110, "Dslash"}, - {0x0111, "dmacron"}, - {0x0112, "Emacron"}, - {0x0113, "emacron"}, - {0x0114, "Ebreve"}, - {0x0115, "ebreve"}, - {0x0116, "Edot"}, - {0x0117, "edot"}, - {0x0118, "Eogonek"}, - {0x0119, "eogonek"}, - {0x011a, "Ecaron"}, - {0x011b, "ecaron"}, - {0x011c, "Gcircumflex"}, - {0x011d, "gcircumflex"}, - {0x011e, "Gbreve"}, - {0x011f, "gbreve"}, - - {0x0120, "Gdot"}, - {0x0121, "gdot"}, - {0x0122, "Gcedilla"}, - {0x0123, "gcedilla"}, - {0x0124, "Hcircumflex"}, - {0x0125, "hcircumflex"}, - {0x0126, "Hbar"}, - {0x0127, "hbar"}, - {0x0128, "Itilde"}, - {0x0129, "itilde"}, - {0x012a, "Imacron"}, - {0x012b, "imacron"}, - {0x012c, "Ibreve"}, - {0x012d, "ibreve"}, - {0x012e, "Iogonek"}, - {0x012f, "iogonek"}, - - {0x0130, "Idot"}, - {0x0131, "dotlessi"}, - {0x0132, "IJ"}, - {0x0133, "ij"}, - {0x0134, "Jcircumflex"}, - {0x0135, "jcircumflex"}, - {0x0136, "Kcedilla"}, - {0x0137, "kcedilla"}, - {0x0138, "kgreenlandic"}, - {0x0139, "Lacute"}, - {0x013a, "lacute"}, - {0x013b, "Lcedilla"}, - {0x013c, "lcedilla"}, - {0x013d, "Lcaron"}, - {0x013e, "lcaron"}, - {0x013f, "Ldot"}, - - {0x0140, "ldot"}, - {0x0141, "Lslash"}, - {0x0142, "lslash"}, - {0x0143, "Nacute"}, - {0x0144, "nacute"}, - {0x0145, "Ncedilla"}, - {0x0146, "ncedilla"}, - {0x0147, "Ncaron"}, - {0x0148, "ncaron"}, - {0x0149, "napostrophe"}, - {0x014a, "Eng"}, - {0x014b, "eng"}, - {0x014c, "Omacron"}, - {0x014d, "omacron"}, - {0x014e, "Obreve"}, - {0x014f, "obreve"}, - - {0x0150, "Odblacute"}, - {0x0151, "odblacute"}, - {0x0152, "OE"}, - {0x0153, "oe"}, - {0x0154, "Racute"}, - {0x0155, "racute"}, - {0x0156, "Rcedilla"}, - {0x0157, "rcedilla"}, - {0x0158, "Rcaron"}, - {0x0159, "rcaron"}, - {0x015a, "Sacute"}, - {0x015b, "sacute"}, - {0x015c, "Scircumflex"}, - {0x015d, "scircumflex"}, - {0x015e, "Scedilla"}, - {0x015f, "scedilla"}, - - {0x0160, "Scaron"}, - {0x0161, "scaron"}, - {0x0162, "Tcedilla"}, - {0x0163, "tcedilla"}, - {0x0164, "Tcaron"}, - {0x0165, "tcaron"}, - {0x0166, "Tbar"}, - {0x0167, "tbar"}, - {0x0168, "Utilde"}, - {0x0169, "utilde"}, - {0x016a, "Umacron"}, - {0x016b, "umacron"}, - {0x016c, "Ubreve"}, - {0x016d, "ubreve"}, - {0x016e, "Uring"}, - {0x016f, "uring"}, - - {0x0170, "Udblacute"}, - {0x0171, "udblacute"}, - {0x0172, "Uogonek"}, - {0x0173, "uogonek"}, - {0x0174, "Wcircumflex"}, - {0x0175, "wcircumflex"}, - {0x0176, "Ycircumflex"}, - {0x0177, "ycircumflex"}, - {0x0178, "Ydieresis"}, - {0x0179, "Zacute"}, - {0x017a, "zacute"}, - {0x017b, "Zdot"}, - {0x017c, "zdot"}, - {0x017d, "Zcaron"}, - {0x017e, "zcaron"}, - {0x017f, "longs"}, - - {0x0192, "florin"}, - - {0x01fa, "Aringacute"}, - {0x01fb, "aringacute"}, - {0x01fc, "AEacute"}, - {0x01fd, "aeacute"}, - {0x01fe, "Oslashacute"}, - {0x01ff, "oslashacute"}, - - {0x02c6, "circumflex"}, - {0x02c7, "caron"}, - {0x02c9, "macron"}, /* cf "overscore" */ - - {0x02d8, "breve"}, - {0x02d9, "dotaccent"}, - {0x02da, "ring"}, - {0x02db, "ogonek"}, - {0x02dc, "tilde"}, - {0x02dd, "hungarumlaut"}, - - {0x037e, "semicolon"}, - - {0x0384, "tonos"}, - {0x0385, "dieresistonos"}, - {0x0386, "Alphatonos"}, - {0x0387, "anoteleia"}, - {0x0388, "Epsilontonos"}, - {0x0389, "Etatonos"}, - {0x038a, "Iotatonos"}, - {0x038c, "Omicrontonos"}, - {0x038e, "Upsilontonos"}, - {0x038f, "Omegatonos"}, - - {0x0390, "iotadieresistonos"}, - {0x0391, "Alpha"}, - {0x0392, "Beta"}, - {0x0393, "Gamma"}, - {0x0394, "Delta"}, - {0x0395, "Epsilon"}, - {0x0396, "Zeta"}, - {0x0397, "Eta"}, - {0x0398, "Theta"}, - {0x0399, "Iota"}, - {0x039a, "Kappa"}, - {0x039b, "Lambda"}, - {0x039c, "Mu"}, - {0x039d, "Nu"}, - {0x039e, "Xi"}, - {0x039f, "Omicron"}, - - {0x03a0, "Pi"}, - {0x03a1, "Rho"}, - {0x03a2, "Sigma"}, - {0x03a3, "Tau"}, - {0x03a4, "Upsilon"}, - {0x03a5, "Phi"}, - {0x03a6, "Chi"}, - {0x03a7, "Psi"}, - {0x03a8, "Omega"}, /* cf "Ohm" */ - {0x03aa, "Iotadieresis"}, - {0x03ab, "Upsilondieresis"}, - {0x03ac, "alphatonos"}, - {0x03ad, "epsilontonos"}, - {0x03ae, "etatonos"}, - {0x03af, "iotatonos"}, - - {0x03b0, "upsilondieresistonos"}, - {0x03b1, "alpha"}, - {0x03b2, "beta"}, - {0x03b3, "gamma"}, - {0x03b4, "delta"}, - {0x03b5, "epsilon"}, - {0x03b6, "zeta"}, - {0x03b7, "eta"}, - {0x03b8, "theta"}, - {0x03b9, "iota"}, - {0x03ba, "kappa"}, - {0x03bb, "lambda"}, - {0x03bc, "mu"}, - {0x03bd, "nu"}, - {0x03be, "xi"}, - {0x03bf, "omicron"}, - - {0x03c0, "pi"}, - {0x03c1, "rho"}, - {0x03c2, "sigma1"}, - {0x03c3, "sigma"}, - {0x03c4, "tau"}, - {0x03c5, "upsilon"}, - {0x03c6, "phi"}, - {0x03c7, "chi"}, - {0x03c8, "psi"}, - {0x03c9, "omega"}, - {0x03ca, "iotadieresis"}, - {0x03cb, "upsilondieresis"}, - {0x03cc, "omicrontonos"}, - {0x03cd, "upsilontonos"}, - {0x03ce, "omegatonos"}, - - {0x0401, "afii10023"}, - {0x0402, "afii10051"}, - {0x0403, "afii10052"}, - {0x0404, "afii10053"}, - {0x0405, "afii10054"}, - {0x0406, "afii10055"}, - {0x0407, "afii10056"}, - {0x0408, "afii10057"}, - {0x0409, "afii10058"}, - {0x040a, "afii10059"}, - {0x040b, "afii10060"}, - {0x040c, "afii10061"}, - {0x040e, "afii10062"}, - {0x040f, "afii10145"}, - - {0x0410, "afii10017"}, - {0x0411, "afii10018"}, - {0x0412, "afii10019"}, - {0x0413, "afii10020"}, - {0x0414, "afii10021"}, - {0x0415, "afii10022"}, - {0x0416, "afii10024"}, - {0x0417, "afii10025"}, - {0x0418, "afii10026"}, - {0x0419, "afii10027"}, - {0x041a, "afii10028"}, - {0x041b, "afii10029"}, - {0x041c, "afii10030"}, - {0x041d, "afii10031"}, - {0x041e, "afii10032"}, - {0x041f, "afii10033"}, - - {0x0420, "afii10034"}, - {0x0421, "afii10035"}, - {0x0422, "afii10036"}, - {0x0423, "afii10037"}, - {0x0424, "afii10038"}, - {0x0425, "afii10039"}, - {0x0426, "afii10040"}, - {0x0427, "afii10041"}, - {0x0428, "afii10042"}, - {0x0429, "afii10043"}, - {0x042a, "afii10044"}, - {0x042b, "afii10045"}, - {0x042c, "afii10046"}, - {0x042d, "afii10047"}, - {0x042e, "afii10048"}, - {0x042f, "afii10049"}, - - {0x0430, "afii10065"}, - {0x0431, "afii10066"}, - {0x0432, "afii10067"}, - {0x0433, "afii10068"}, - {0x0434, "afii10069"}, - {0x0435, "afii10070"}, - {0x0436, "afii10072"}, - {0x0437, "afii10073"}, - {0x0438, "afii10074"}, - {0x0439, "afii10075"}, - {0x043a, "afii10076"}, - {0x043b, "afii10077"}, - {0x043c, "afii10078"}, - {0x043d, "afii10079"}, - {0x043e, "afii10080"}, - {0x043f, "afii10081"}, - - {0x0440, "afii10082"}, - {0x0441, "afii10083"}, - {0x0442, "afii10084"}, - {0x0443, "afii10085"}, - {0x0444, "afii10086"}, - {0x0445, "afii10087"}, - {0x0446, "afii10088"}, - {0x0447, "afii10089"}, - {0x0448, "afii10090"}, - {0x0449, "afii10091"}, - {0x044a, "afii10092"}, - {0x044b, "afii10093"}, - {0x044c, "afii10094"}, - {0x044d, "afii10095"}, - {0x044e, "afii10096"}, - {0x044f, "afii10097"}, - - {0x0451, "afii10071"}, - {0x0452, "afii10099"}, - {0x0453, "afii10100"}, - {0x0454, "afii10101"}, - {0x0455, "afii10102"}, - {0x0456, "afii10103"}, - {0x0457, "afii10104"}, - {0x0458, "afii10105"}, - {0x0459, "afii10106"}, - {0x045a, "afii10107"}, - {0x045b, "afii10108"}, - {0x045c, "afii10109"}, - {0x045e, "afii10110"}, - {0x045f, "afii10193"}, - - {0x0490, "afii10050"}, - {0x0491, "afii10098"}, - - {0x1e80, "Wgrave"}, - {0x1e81, "wgrave"}, - {0x1e82, "Wacute"}, - {0x1e83, "wacute"}, - {0x1e84, "Wdieresis"}, - {0x1e85, "wdieresis"}, - - {0x1ef2, "Ygrave"}, - {0x1ef3, "ygrave"}, - - {0x2013, "endash"}, - {0x2014, "emdash"}, - {0x2015, "afii00208"}, /* horizontal bar */ - {0x2017, "underscoredbl"}, - {0x2018, "quoteleft"}, - {0x2019, "quoteright"}, - {0x201a, "quotesinglbase"}, - {0x201b, "quotereversed"}, - {0x201c, "quotedblleft"}, - {0x201d, "quotedblright"}, - {0x201e, "quotedblbase"}, - - {0x2020, "dagger"}, - {0x2021, "daggerdbl"}, - {0x2022, "bullet"}, - {0x2026, "ellipsis"}, - {0x2030, "perthousand"}, - {0x2032, "minute"}, - {0x2033, "second"}, - {0x2039, "guilsinglleft"}, - {0x203a, "guilsinglright"}, - {0x203c, "exclamdbl"}, - {0x203e, "radicalex"}, - - {0x2044, "fraction"}, /* cf U+2215 */ - - {0x207f, "nsuperior"}, - - {0x20a3, "franc"}, - {0x20a4, "afii08941"}, /* lira sign */ - {0x20a7, "peseta"}, - - {0x2105, "afii61248"}, /* care of */ - - {0x2113, "afii61289"}, /* script small l */ - {0x2116, "afii61352"}, /* numero sign */ - - {0x2122, "trademark"}, - {0x2126, "Ohm"}, - {0x212e, "estimated"}, - - {0x215b, "oneeighth"}, - {0x215c, "threeeighths"}, - {0x215d, "fiveeighths"}, - {0x215e, "seveneighths"}, - - {0x2190, "arrowleft"}, - {0x2191, "arrowup"}, - {0x2192, "arrowright"}, - {0x2193, "arrowdown"}, - {0x2194, "arrowboth"}, - {0x2195, "arrowupdn"}, - - {0x21a8, "arrowupdnbse"}, - - {0x2202, "partialdiff"}, - {0x2206, "increment"}, - {0x220f, "product"}, - - {0x2211, "summation"}, - {0x2212, "minus"}, - {0x2215, "fraction"}, /* cf U+2044 */ - {0x2219, "periodcentered"}, - {0x221a, "radical"}, - {0x221e, "infinity"}, - {0x221f, "orthogonal"}, - - {0x2229, "intersection"}, - {0x222b, "integral"}, - - {0x2248, "approxequal"}, - - {0x2260, "notequal"}, - {0x2261, "equivalence"}, - {0x2264, "lessequal"}, - {0x2265, "greaterequal"}, - - {0x2302, "house"}, - - {0x2310, "revlogicalnot"}, - - {0x2320, "integraltp"}, - {0x2321, "integralbt"}, - - {0x2500, "SF100000"}, - {0x2502, "SF110000"}, - {0x250c, "SF010000"}, - - {0x2510, "SF030000"}, - {0x2514, "SF020000"}, - {0x2518, "SF040000"}, - {0x251c, "SF080000"}, - - {0x2524, "SF090000"}, - {0x252c, "SF060000"}, - - {0x2534, "SF070000"}, - {0x253c, "SF050000"}, - - {0x2550, "SF430000"}, - {0x2551, "SF240000"}, - {0x2552, "SF510000"}, - {0x2553, "SF520000"}, - {0x2554, "SF390000"}, - {0x2555, "SF220000"}, - {0x2556, "SF210000"}, - {0x2557, "SF250000"}, - {0x2558, "SF500000"}, - {0x2559, "SF490000"}, - {0x255a, "SF380000"}, - {0x255b, "SF280000"}, - {0x255c, "SF270000"}, - {0x255d, "SF260000"}, - {0x255e, "SF360000"}, - {0x255f, "SF370000"}, - - {0x2560, "SF420000"}, - {0x2561, "SF190000"}, - {0x2562, "SF200000"}, - {0x2563, "SF230000"}, - {0x2564, "SF470000"}, - {0x2565, "SF480000"}, - {0x2566, "SF410000"}, - {0x2567, "SF450000"}, - {0x2568, "SF460000"}, - {0x2569, "SF400000"}, - {0x256a, "SF540000"}, - {0x256b, "SF530000"}, - {0x256c, "SF440000"}, - - {0x2580, "upblock"}, - {0x2584, "dnblock"}, - {0x2588, "block"}, - {0x258c, "lfblock"}, - - {0x2590, "rtblock"}, - {0x2591, "ltshade"}, - {0x2592, "shade"}, - {0x2593, "dkshade"}, - - {0x25a0, "filledbox"}, - {0x25a1, "H22073"}, - {0x25aa, "H18543"}, - {0x25ab, "H18551"}, - {0x25ac, "filledrect"}, - - {0x25b2, "triagup"}, - {0x25ba, "triagrt"}, - {0x25bc, "triagdn"}, - - {0x25c4, "triaglf"}, - {0x25ca, "lozenge"}, - {0x25cb, "circle"}, - {0x25cf, "H18533"}, - - {0x25d8, "invbullet"}, - {0x25d9, "invcircle"}, - - {0x25e6, "openbullet"}, - - {0x263a, "smileface"}, - {0x263b, "invsmileface"}, - {0x263c, "sun"}, - - {0x2640, "female"}, - {0x2642, "male"}, - - {0x2660, "spade"}, - {0x2663, "club"}, - {0x2665, "heart"}, - {0x2666, "diamond"}, - {0x266a, "musicalnote"}, - {0x266b, "musicalnotedbl"}, - - {0xf000, "applelogo"}, - {0xf001, "fi"}, - {0xf002, "fl"}, - {0xf004, "commaaccent"}, - {0xf005, "undercommaaccent"}, - {0xfb01, "fi"}, - {0xfb02, "fl"}, -}; - -struct encoding_table mac_table[] = -{ - {-1, ".notdef"}, - {0x0000, ".notdef"}, /* null */ - {0x0008, ".notdef"}, /* backspace */ - {0x0009, ".notdef"}, /* horizontal tabulation */ - {0x000d, ".notdef"}, /* carriage return */ - {0x001d, ".notdef"}, /* group separator */ - {0x0020, "space"}, - {0x0021, "exclam"}, - {0x0022, "quotedbl"}, - {0x0023, "numbersign"}, - {0x0024, "dollar"}, - {0x0025, "percent"}, - {0x0026, "ampersand"}, - {0x0027, "quotesingle"}, - {0x0028, "parenleft"}, - {0x0029, "parenright"}, - {0x002a, "asterisk"}, - {0x002b, "plus"}, - {0x002c, "comma"}, - {0x002d, "hyphen"}, - {0x002e, "period"}, - {0x002f, "slash"}, - - {0x0030, "zero"}, - {0x0031, "one"}, - {0x0032, "two"}, - {0x0033, "three"}, - {0x0034, "four"}, - {0x0035, "five"}, - {0x0036, "six"}, - {0x0037, "seven"}, - {0x0038, "eight"}, - {0x0039, "nine"}, - {0x003a, "colon"}, - {0x003b, "semicolon"}, - {0x003c, "less"}, - {0x003d, "equal"}, - {0x003e, "greater"}, - {0x003f, "question"}, - - {0x0040, "at"}, - {0x0041, "A"}, - {0x0042, "B"}, - {0x0043, "C"}, - {0x0044, "D"}, - {0x0045, "E"}, - {0x0046, "F"}, - {0x0047, "G"}, - {0x0048, "H"}, - {0x0049, "I"}, - {0x004a, "J"}, - {0x004b, "K"}, - {0x004c, "L"}, - {0x004d, "M"}, - {0x004e, "N"}, - {0x004f, "O"}, - - {0x0050, "P"}, - {0x0051, "Q"}, - {0x0052, "R"}, - {0x0053, "S"}, - {0x0054, "T"}, - {0x0055, "U"}, - {0x0056, "V"}, - {0x0057, "W"}, - {0x0058, "X"}, - {0x0059, "Y"}, - {0x005a, "Z"}, - {0x005b, "bracketleft"}, - {0x005c, "backslash"}, - {0x005d, "bracketright"}, - {0x005e, "asciicircum"}, - {0x005f, "underscore"}, - - {0x0060, "grave"}, - {0x0061, "a"}, - {0x0062, "b"}, - {0x0063, "c"}, - {0x0064, "d"}, - {0x0065, "e"}, - {0x0066, "f"}, - {0x0067, "g"}, - {0x0068, "h"}, - {0x0069, "i"}, - {0x006a, "j"}, - {0x006b, "k"}, - {0x006c, "l"}, - {0x006d, "m"}, - {0x006e, "n"}, - {0x006f, "o"}, - - {0x0070, "p"}, - {0x0071, "q"}, - {0x0072, "r"}, - {0x0073, "s"}, - {0x0074, "t"}, - {0x0075, "u"}, - {0x0076, "v"}, - {0x0077, "w"}, - {0x0078, "x"}, - {0x0079, "y"}, - {0x007a, "z"}, - {0x007b, "braceleft"}, - {0x007c, "bar"}, - {0x007d, "braceright"}, - {0x007e, "asciitilde"}, - - {0x0080, "Adieresis"}, - {0x0081, "Aring"}, - {0x0082, "Ccedilla"}, - {0x0083, "Eacute"}, - {0x0084, "Ntilde"}, - {0x0085, "Odieresis"}, - {0x0086, "Udieresis"}, - {0x0087, "aacute"}, - {0x0088, "agrave"}, - {0x0089, "acircumflex"}, - {0x008a, "adieresis"}, - {0x008b, "atilde"}, - {0x008c, "aring"}, - {0x008d, "ccedilla"}, - {0x008e, "eacute"}, - {0x008f, "egrave"}, - - {0x0090, "ecircumflex"}, - {0x0091, "edieresis"}, - {0x0092, "iacute"}, - {0x0093, "igrave"}, - {0x0094, "icircumflex"}, - {0x0095, "idieresis"}, - {0x0096, "ntilde"}, - {0x0097, "oacute"}, - {0x0098, "ograve"}, - {0x0099, "ocircumflex"}, - {0x009a, "odieresis"}, - {0x009b, "otilde"}, - {0x009c, "uacute"}, - {0x009d, "ugrave"}, - {0x009e, "ucircumflex"}, - {0x009f, "udieresis"}, - - {0x00a0, "dagger"}, - {0x00a1, "degree"}, - {0x00a2, "cent"}, - {0x00a3, "sterling"}, - {0x00a4, "section"}, - {0x00a5, "bullet"}, - {0x00a6, "paragraph"}, - {0x00a7, "germandbls"}, - {0x00a8, "registered"}, - {0x00a9, "copyright"}, - {0x00aa, "trademark"}, - {0x00ab, "acute"}, - {0x00ac, "dieresis"}, - {0x00ad, "notequal"}, - {0x00ae, "AE"}, - {0x00af, "Oslash"}, - - {0x00b0, "infinity"}, - {0x00b1, "plusminus"}, - {0x00b2, "lessequal"}, - {0x00b3, "greaterequal"}, - {0x00b4, "yen"}, - {0x00b5, "mu"}, - {0x00b6, "partialdiff"}, - {0x00b7, "summation"}, - {0x00b8, "product"}, - {0x00b9, "pi"}, - {0x00ba, "integral"}, - {0x00bb, "ordfeminine"}, - {0x00bc, "ordmasculine"}, - {0x00bd, "Omega"}, - {0x00be, "ae"}, - {0x00bf, "oslash"}, - - {0x00c0, "questiondown"}, - {0x00c1, "exclamdown"}, - {0x00c2, "logicalnot"}, - {0x00c3, "radical"}, - {0x00c4, "florin"}, - {0x00c5, "approxequal"}, - {0x00c6, "Delta"}, - {0x00c7, "guillemotleft"}, - {0x00c8, "guillemotright"}, - {0x00c9, "ellipsis"}, - {0x00ca, "nbspace"}, - {0x00cb, "Agrave"}, - {0x00cc, "Atilde"}, - {0x00cd, "Otilde"}, - {0x00ce, "OE"}, - {0x00cf, "oe"}, - - {0x00d0, "endash"}, - {0x00d1, "emdash"}, - {0x00d2, "quotedblleft"}, - {0x00d3, "quotedblright"}, - {0x00d4, "quoteleft"}, - {0x00d5, "quoteright"}, - {0x00d6, "divide"}, - {0x00d7, "lozenge"}, - {0x00d8, "ydieresis"}, - {0x00d9, "Ydieresis"}, - {0x00da, "fraction"}, - {0x00db, "currency"}, - {0x00dc, "guilsinglleft"}, - {0x00dd, "guilsinglright"}, - {0x00de, "fi"}, - {0x00df, "fl"}, - - {0x00e0, "daggerdbl"}, - {0x00e1, "periodcentered"}, - {0x00e2, "quotesinglbase"}, - {0x00e3, "quotedblbase"}, - {0x00e4, "perthousand"}, - {0x00e5, "Acircumflex"}, - {0x00e6, "Ecircumflex"}, - {0x00e7, "Aacute"}, - {0x00e8, "Edieresis"}, - {0x00e9, "Egrave"}, - {0x00ea, "Iacute"}, - {0x00eb, "Icircumflex"}, - {0x00ec, "Idieresis"}, - {0x00ed, "Igrave"}, - {0x00ee, "Oacute"}, - {0x00ef, "Ocircumflex"}, - - {0x00f0, "apple"}, - {0x00f1, "Ograve"}, - {0x00f2, "Uacute"}, - {0x00f3, "Ucircumflex"}, - {0x00f4, "Ugrave"}, - {0x00f5, "dotlessi"}, - {0x00f6, "circumflex"}, - {0x00f7, "tilde"}, - {0x00f8, "macron"}, - {0x00f9, "breve"}, - {0x00fa, "dotaccent"}, - {0x00fb, "ring"}, - {0x00fc, "cedilla"}, - {0x00fd, "hungarumlaut"}, - {0x00fe, "ogonek"}, - {0x00ff, "caron"}, -}; - - -struct encoding_table *current_table; -size_t current_table_len; - - -void -set_encoding_scheme(EncodingScheme e, Font *fnt) -{ - current_encoding_scheme = e; - - switch (e) - { - case encUnicode: - current_table = unicode_table; - current_table_len = sizeof (unicode_table) / sizeof (unicode_table[0]); - break; - - case encMac: - current_table = mac_table; - current_table_len = sizeof (mac_table) / sizeof (mac_table[0]); - break; - - case encFontSpecific: - break; - } -} - - -/* - * We return ".c0x" - * if no name is found. - * - * We return ".g0x" - * if it's a glyph index (code >= 0x10000). - */ - -char * -code_to_adobename(long code) -{ - unsigned int n, n1 = 0, n2 = current_table_len - 1; - char *p; - - - if (current_encoding_scheme == encFontSpecific) - { - p = (char *)mymalloc(9); - sprintf(p, ".%c0x%x", (code >= 0x10000) ? 'g' : 'c', - (unsigned int)(code & 0xFFFF)); - return p; - } - - while (n1 <= n2) - { - n = (n1 + n2) / 2; - if (code < current_table[n].code) - n2 = n - 1; - else if (code > current_table[n].code) - n1 = n + 1; - else - return current_table[n].adobename; - } - - p = (char *)mymalloc(9); - sprintf(p, ".%c0x%x", (code >= 0x10000) ? 'g' : 'c', - (unsigned int)(code & 0xFFFF)); - return p; -} - - -/* - * The first of two identical entries will win. - */ - -long -adobename_to_code(char *s) -{ - size_t i; - long j; - char p; - - - if (s == NULL) - return -1; - - if (current_encoding_scheme == encFontSpecific) - { - if (*(s++) != '.') - return -1; - - p = *(s++); - if (!(p == 'c' || p == 'g')) - return -1; - - j = strtol(s, &s, 0); - if (*s == '\0') - return (p == 'g') ? (j | 0x10000) : j; - else - return -1; - } - - for (i = 0; i < current_table_len; i++) - { - if (strcmp(current_table[i].adobename, s) == 0) - return current_table[i].code; - } - - if (*(s++) != '.') - return -1; - - p = *(s++); - if (!(p == 'c' || p == 'g')) - return -1; - - j = strtol(s, &s, 0); - if (*s == '\0') - return (p == 'g') ? (j | 0x10000) : j; - else - return -1; -} - - -ttfinfo * -findglyph(unsigned short g, ttfinfo *p) -{ - register ttfinfo *ti; - - - if (!p) - return NULL; - - for (ti = p; ti; ti = ti->next) - if (g == ti->glyphindex) - return ti; - - return NULL; -} - - -ttfinfo * -findadobe(char *p, ttfinfo *ap) -{ - register ttfinfo *ti; - register long l = -1; - register char c = '\0', d = '\0'; - - - if (!p) - return NULL; - - if (p[0] == '.' && - (c = p[1]) && (c == 'c' || c == 'g') && - (d = p[2]) && '0' <= d && d <= '9') - l = strtol(p + 2, NULL, 0); - - for (ti = ap; ti; ti = ti->next) - { - if (l >= 0) - { - if (c == 'c') - { - if (ti->charcode == l) - return ti; - } - else - { - if (ti->glyphindex == l) - return ti; - } - } - else if (strcmp(p, ti->adobename) == 0) - return ti; - } - - return NULL; -} - - -ttfinfo * -findmappedadobe(char *p, ttfinfo **array) -{ - register int i; - register ttfinfo *ti; - register long l = -1; - register char c = '\0', d = '\0'; - - - if (!p) - return NULL; - - if (p[0] == '.' && - (c = p[1]) && (c == 'c' || c == 'g') && - (d = p[2]) && '0' <= d && d <= '9') - l = strtol(p + 2, NULL, 0); - - for (i = 0; i <= 0xFF; i++) - if ((ti = array[i])) - { - if (l >= 0) - { - if (c == 'c') - { - if (ti->charcode == l) - return ti; - } - else - { - if (ti->glyphindex == l) - return ti; - } - } - else if (strcmp(p, ti->adobename) == 0) - return ti; - } - - return NULL; -} - - -void -replace_glyphs(Font *fnt) -{ - stringlist *sl, *sl_old; - ttfinfo *ti; - - - for (sl = fnt->replacements, sl_old = NULL; sl; sl_old = sl, sl = sl->next) - { - if ((ti = findadobe(sl->old_name, fnt->charlist))) - ti->adobename = sl->new_name; - else - { - warning("Glyph name `%s' not found.", sl->old_name); - warning("Replacement glyph name `%s' thus ignored.", sl->new_name); - if (sl_old == NULL) - fnt->replacements = sl->next; - else - sl_old->next = sl->next; - } - } -} - - -/* the opposite of replace_glyph() */ - -void -restore_glyph(encoding *enc, Font *fnt) -{ - stringlist *sl; - int i; - - - for (sl = fnt->replacements; sl; sl = sl->next) - { - for (i = 0; i <= 0xFF; i++) - { - if (strcmp(enc->vec[i], sl->new_name) == 0) - { - enc->vec[i] = sl->old_name; - goto success; - } - } - warning("Glyph name `%s' not found in encoding.", sl->new_name); - warning("Replacement for glyph name `%s' thus ignored.", sl->old_name); - -success: - ; - } -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttfenc.h diff -u xc/extras/FreeType/contrib/ttf2pk/ttfenc.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttfenc.h:removed --- xc/extras/FreeType/contrib/ttf2pk/ttfenc.h:1.1.1.2 Sat Feb 12 23:55:16 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttfenc.h Wed Mar 16 20:59:32 2005 @@ -1,41 +0,0 @@ -/* - * ttfenc.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TTFENC_H -#define TTFENC_H - -#include "ttf2tfm.h" - - -enum _EncodingScheme -{ - encUnicode, - encMac, - encFontSpecific -}; -typedef enum _EncodingScheme EncodingScheme; - - -void set_encoding_scheme(EncodingScheme e, Font *fnt); - -char *code_to_adobename(long code); -long adobename_to_code(char *s); - -ttfinfo *findglyph(unsigned short g, ttfinfo *p); -ttfinfo *findadobe(char *p, ttfinfo *ap); -ttfinfo *findmappedadobe(char *p, ttfinfo **array); - -void replace_glyphs(Font *fnt); -void restore_glyph(encoding *enc, Font *fnt); - -#endif /* TTFENC_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttflib.c diff -u xc/extras/FreeType/contrib/ttf2pk/ttflib.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttflib.c:removed --- xc/extras/FreeType/contrib/ttf2pk/ttflib.c:1.1.1.2 Sat Feb 12 23:55:16 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttflib.c Wed Mar 16 20:59:32 2005 @@ -1,703 +0,0 @@ -/* - * ttflib.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Loyer Frederic - * Werner Lemberg - */ - -#include -#include -#include -#include /* libc ANSI */ -#include - -#include "pklib.h" /* for the `byte' type */ -#include "freetype.h" -#include "ttfenc.h" -#include "ttflib.h" -#include "errormsg.h" -#include "newobj.h" -#include "ttf2tfm.h" - -#include "extend/ftxpost.h" -#include "extend/ftxopen.h" - - -#define Macintosh_platform 1 -#define Macintosh_encoding 0 - -#define Microsoft_platform 3 -#define Microsoft_Symbol_encoding 0 -#define Microsoft_Unicode_encoding 1 - -#define SCRIPT_kana MAKE_TT_TAG('k', 'a', 'n', 'a') -#define SCRIPT_hani MAKE_TT_TAG('h', 'a', 'n', 'i') -#define SCRIPT_hang MAKE_TT_TAG('h', 'a', 'n', 'g') - -#define LANGUAGE_JAN MAKE_TT_TAG('J', 'A', 'N', ' ') -#define LANGUAGE_CHN MAKE_TT_TAG('C', 'H', 'N', ' ') -#define LANGUAGE_KOR MAKE_TT_TAG('K', 'O', 'R', ' ') - -#define FEATURE_vert MAKE_TT_TAG('v', 'e', 'r', 't') - - -TT_Engine engine; -TT_Face face; -TT_Instance instance; -TT_Glyph glyph; -TT_CharMap char_map; - -TT_Outline outline; -TT_Face_Properties properties; -TT_BBox bbox; - -TT_Post post; - -TT_Raster_Map Bit, Bit2; -void *Bitp, *Bit2p; - -int dpi; -int ptsize; - -int x_offset, y_offset; -int ppem; - -TT_Big_Glyph_Metrics metrics; - -TT_Matrix matrix1, matrix2; - -TTO_GSUBHeader gsub_; -TTO_GSUBHeader *gsub; - -TT_UShort in_string[2]; -TTO_GSUB_String in, out; - -Boolean has_gsub; - - -static void -SetRasterArea(int quiet) -{ - int temp1_x, temp1_y, temp2_x, temp2_y; - - - temp1_x = bbox.xMin / 64; /* scaling F16.6 -> int */ - temp1_y = bbox.yMin / 64; - temp2_x = (bbox.xMax + 63) / 64; - temp2_y = (bbox.yMax + 63) / 64; - - x_offset = 5 - temp1_x; - y_offset = 5 - temp1_y; - - if (!quiet) - printf(" off = (%d, %d)", x_offset, y_offset); - -#if 0 - x_offset = y_offset = 0; -#endif - - if (!quiet) - printf(" bbox = (%d, %d) <-> (%d, %d)\n", - temp1_x, temp1_y, temp2_x, temp2_y); - - Bit.rows = temp2_y - temp1_y + 10; - Bit.width = temp2_x - temp1_x + 10; - - Bit.cols = (Bit.width + 7) / 8; /* convert to # of bytes */ - Bit.flow = TT_Flow_Up; - Bit.size = Bit.rows * Bit.cols; /* number of bytes in buffer */ - - /* - * We allocate one more row to have valid pointers for comparison - * purposes in pklib.c, making `gcc -fbounds-checking' happy. - */ - - if (Bitp) - free(Bitp); - Bitp = mymalloc(Bit.size + Bit.cols); - Bit.bitmap = Bitp; - - Bit2 = Bit; - - if (Bit2p) - free(Bit2p); - Bit2p = mymalloc(Bit.size + Bit.cols); - Bit2.bitmap = Bit2p; -} - - -static void -FlipBit(void) -{ - int y; - char *p1, *p2; - - p1 = (char *)Bit.bitmap; - p2 = (char *)Bit2.bitmap + Bit2.cols * (Bit2.rows - 1); - - for (y = 0; y < Bit.rows; y++) - { - memcpy(p2, p1, Bit.cols); - p1 += Bit.cols; - p2 -= Bit.cols; - } -} - - -#if 0 - -static void -Output(TT_Raster_Map Bit) -{ - int x; - int y; - int i; - - char *p, b; - - - p = Bit.bitmap; - printf("====\n"); - - for (y = 0; y < Bit.rows; y++) - { - printf("%3d:", y); - for (x = 0; x < Bit.cols; x++) - { - b = *p++; - for(i = 0x80; i; i >>= 1) - printf((b & i) ? "x" : "."); - } - printf("\n"); - } -} - -#endif /* 0 */ - - -void -TTFopen(char *filename, Font *fnt, int new_dpi, int new_ptsize, Boolean quiet) -{ - unsigned short i, num_cmap; - unsigned short cmap_plat; - unsigned short cmap_enc; - TT_Error error; - - TT_UShort script_index, language_index, feature_index; - TT_UShort req_feature_index = 0xFFFF; - - - dpi = new_dpi; - ptsize = new_ptsize; - - if ((error = TT_Init_FreeType(&engine))) - oops("Cannot initialize FreeType engine (error code = 0x%x).", error); - - if (fnt->PSnames) - if ((error = TT_Init_Post_Extension(engine))) - oops("Cannot initialize PS name support (error code = 0x%x).", error); - - if (fnt->rotate) - if ((error = TT_Init_GSUB_Extension(engine))) - oops("Cannot initialize GSUB support (error code = 0x%x).", error); - - /* - * Load face. - */ - - error = TT_Open_Face(engine, filename, &face); - if (error) - oops("Cannot open `%s'.", filename); - - /* - * Get face properties and allocate preloaded arrays. - */ - - TT_Get_Face_Properties(face, &properties); - - /* - * Now we try to open the proper font in a collection. - */ - - if (fnt->fontindex != 0) - { - if (properties.num_Faces == 1) - warning("This isn't a TrueType collection.\n" - "Parameter `Fontindex' is ignored."); - else - { - TT_Close_Face(face); - if ((error = TT_Open_Collection(engine, filename, - fnt->fontindex, &face))) - oops("Cannot open font %lu in TrueType Collection `%s'.", - fnt->fontindex, filename); - } - } - - /* - * Create instance. - */ - - if ((error = TT_New_Instance(face, &instance))) - oops("Cannot create instance for `%s' (error code = 0x%x).", - filename, error); - - if ((error = TT_Set_Instance_Resolutions(instance, dpi, dpi))) - oops("Cannot set device resolutions (error code = 0x%x)."); - - if ((error = TT_Set_Instance_CharSize(instance, ptsize * 64))) - oops("Cannot set character size (error code = 0x%x).", error); - - ppem = (dpi * ptsize + 36) / 72; - - if (!quiet) - printf("dpi = %d, ptsize = %d, ppem = %d\n\n", dpi, ptsize, ppem); - - matrix1.xx = (TT_Fixed)(floor(fnt->efactor * 1024) * (1<<16)/1024); - matrix1.xy = (TT_Fixed)(floor(fnt->slant * 1024) * (1<<16)/1024); - matrix1.yx = (TT_Fixed)0; - matrix1.yy = (TT_Fixed)(1<<16); - - if (fnt->rotate) - { - matrix2.xx = 0; - matrix2.yx = 1L << 16; - matrix2.xy = -matrix2.yx; - matrix2.yy = matrix2.xx; - } - - if ((error = TT_Set_Instance_Transform_Flags( - instance, - fnt->rotate ? 1 : 0, - fnt->efactor != 1.0 ? 1 : 0))) - oops("Cannot set transform flags (error code = 0x%x).", error); - - /* - * Create glyph container. - */ - - if ((error = TT_New_Glyph(face, &glyph))) - oops("Cannot create glyph container (error code = 0x%x)."); - - if (fnt->PSnames != Only) - { - num_cmap = properties.num_CharMaps; - for (i = 0; i < num_cmap; i++) - { - if ((error = TT_Get_CharMap_ID(face, i, &cmap_plat, &cmap_enc))) - oops("Cannot query cmap (error code = 0x%x).", error); - if (cmap_plat == fnt->pid && cmap_enc == fnt->eid) - break; - } - if (i == num_cmap) - oops("Invalid platform and/or encoding ID."); - - if ((error = TT_Get_CharMap(face, i, &char_map))) - oops("Cannot load cmap (error code = 0x%x).", error); - } - - if (fnt->PSnames) - { - if ((error = TT_Load_PS_Names(face, &post))) - oops("Cannot load TrueType PS names (error code = 0x%x).", error); - } - else if (cmap_plat == Microsoft_platform && - cmap_enc == Microsoft_Unicode_encoding) - set_encoding_scheme(encUnicode, fnt); - else if (cmap_plat == Macintosh_platform && - cmap_enc == Macintosh_encoding) - set_encoding_scheme(encMac, fnt); - else - set_encoding_scheme(encFontSpecific, fnt); - - if (fnt->rotate) - { - gsub = &gsub_; - - error = TT_Load_GSUB_Table(face, gsub, NULL); - if (!error) - has_gsub = True; - else if (error != TT_Err_Table_Missing) - warning("Cannot load GSUB table (error code = 0x%x).", error); - else - warning("No GSUB data available " - "for vertical glyph presentation forms."); - - /* we check for the `vert' feature in Chinese, Japanese, and Korean */ - - error = TT_GSUB_Select_Script(gsub, - SCRIPT_kana, - &script_index); - if (error) - goto check_hani; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_JAN, - script_index, - &language_index, - &req_feature_index); - if (error) - goto check_hani; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - if (error) - goto check_hani; - else - goto Done; - } - else - goto Done; - - check_hani: - error = TT_GSUB_Select_Script(gsub, - SCRIPT_hani, - &script_index); - if (error) - goto check_hang; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_CHN, - script_index, - &language_index, - &req_feature_index); - if (error) - goto check_hang; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - if (error) - goto check_hang; - else - goto Done; - } - else - goto Done; - - check_hang: - error = TT_GSUB_Select_Script(gsub, - SCRIPT_hang, - &script_index); - if (error) - goto Done; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - 0xFFFF, - &feature_index); - if (error) - { - error = TT_GSUB_Select_Language(gsub, - LANGUAGE_KOR, - script_index, - &language_index, - &req_feature_index); - if (error) - goto Done; - error = TT_GSUB_Select_Feature(gsub, - FEATURE_vert, - script_index, - language_index, - &feature_index); - } - - Done: - if (error) - { - warning("There is no data for vertical typesetting in GSUB table."); - has_gsub = False; - } - - if (req_feature_index != 0xFFFF) - TT_GSUB_Add_Feature(gsub, req_feature_index, ALL_GLYPHS); - TT_GSUB_Add_Feature(gsub, feature_index, ALL_GLYPHS); - - in.length = 1; - in.pos = 0; - in.string = in_string; - in.properties = NULL; - - out.pos = 0; - out.allocated = 0; - out.string = NULL; - out.properties = NULL; - } -} - - -static TT_Error -LoadTrueTypeChar(Font *fnt, - int idx, - Boolean hint, - Boolean quiet) -{ - TT_Error error; - int flags; - - - flags = TTLOAD_SCALE_GLYPH; - if (hint) - flags |= TTLOAD_HINT_GLYPH; - - error = TT_Load_Glyph(instance, glyph, idx, flags); - if (!error) - error = TT_Get_Glyph_Big_Metrics(glyph, &metrics); - if (!error) - error = TT_Get_Glyph_Outline(glyph, &outline); - if (!error) - { - if (fnt->efactor != 1.0 || fnt->slant != 0.0 ) - TT_Transform_Outline(&outline, &matrix1); - if (fnt->rotate) - TT_Transform_Outline(&outline, &matrix2); - } - if (!error) - error = TT_Get_Outline_BBox(&outline, &bbox); /* we need the non- - grid-fitted bbox */ - if (fnt->rotate) - TT_Translate_Outline(&outline, - metrics.vertBearingY - bbox.xMin, - -fnt->y_offset * ppem * 64); - if (!error) - error = TT_Get_Outline_BBox(&outline, &bbox); - if (!error) - SetRasterArea(quiet); - return error; -} - - -Boolean -TTFprocess(Font *fnt, - long Code, - byte **bitmap, - int *width, int *height, - int *hoff, int *voff, - Boolean hinting, - Boolean quiet) -{ - int Num; - TT_Error error; - - - if (!bitmap || !width || !height || !hoff || !voff) - oops("Invalid parameter in call to TTFprocess()"); - - if (Code >= 0x10000) - Num = Code & 0xFFFF; - else - { - Num = TT_Char_Index(char_map, Code); - if (has_gsub) - { - in_string[0] = Num; - error = TT_GSUB_Apply_String(gsub, &in, &out); - if (error && error != TTO_Err_Not_Covered) - warning("Cannot get the vertical glyph form for glyph index %d.", - Num); - else - Num = out.string[0]; - } - } - - if ((error = LoadTrueTypeChar(fnt, Num, hinting, quiet)) == TT_Err_Ok) - { - memset(Bit.bitmap, 0, Bit.size); - TT_Get_Glyph_Bitmap(glyph, &Bit, x_offset * 64, y_offset * 64); - - FlipBit(); - *bitmap = Bit2.bitmap; - *width = Bit2.width; - *height = Bit2.rows; - *hoff = x_offset; - *voff = y_offset; - /* *voff = Bit2.rows - y_offset; */ - /* printf("%D %d\n", *hoff, *voff); */ - /* Output(Bit2); */ - return True; - } - else - return False; -} - - -/* - * We collect first all glyphs addressed via the cmap. Then we fill the - * array up with glyphs not in the cmap. - * - * If PSnames is set to `Only', we get the first 256 glyphs which have - * names different from `.notdef', `.null', and `nonmarkingreturn'. - * - * For nicer output, we return the glyph names in an encoding array. - */ - -encoding * -TTFget_first_glyphs(Font *fnt, long *array) -{ - unsigned int i, j, Num; - unsigned int index_array[257]; /* we ignore glyph index 0 */ - char *n; - encoding *e = (encoding *)mymalloc(sizeof (encoding)); - - - if (!array) - oops("Invalid parameter in call to TTFget_first_glyphs()"); - - for (i = 0; i < 257; i++) - index_array[i] = 0; - - j = 0; - if (fnt->PSnames != Only) - { - for (i = 0; i <= 0xFFFF; i++) - { - Num = TT_Char_Index(char_map, i); - if (Num < 0) - oops("cmap mapping failure."); - if (Num == 0) - continue; - if (Num <= 256) - index_array[Num] = 1; - - if (fnt->PSnames) - (void)TT_Get_PS_Name(face, Num, &n); - else - n = code_to_adobename(i); - if (strcmp(n, ".notdef") == 0) - continue; - if (strcmp(n, ".null") == 0) - continue; - if (strcmp(n, "nonmarkingreturn") == 0) - continue; - - if (j < 256) - { - array[j] = i; - e->vec[j] = n; - } - else - return e; - j++; - } - - if (!fnt->PSnames) - { - for (i = 1; i < properties.num_Glyphs; i++) - { - if (index_array[i] == 0) - { - if (j < 256) - { - array[j] = i | 0x10000; - e->vec[j] = code_to_adobename(i | 0x10000); - } - else - return e; - j++; - } - } - } - } - else - { - for (i = 0; i < properties.num_Glyphs; i++) - { - char *n; - - - (void)TT_Get_PS_Name(face, i, &n); - - if (strcmp(n, ".notdef") == 0) - continue; - if (strcmp(n, ".null") == 0) - continue; - if (strcmp(n, "nonmarkingreturn") == 0) - continue; - - if (j < 256) - { - array[j] = i | 0x10000; - e->vec[j] = n; - } - else - return e; - j++; - } - } - - return NULL; /* never reached */ -} - - -/* - * This routine fills `array' with the subfont character codes; - * additionally, it tests for valid glyph indices. - */ - -void -TTFget_subfont(Font *fnt, long *array) -{ - int i, j, Num; - - - if (!fnt || !array) - oops("Invalid parameter in call to TTFget_subfont()"); - - for (i = 0; i <= 0xFF; i++) - { - j = fnt->sf_code[i]; - - if (j < 0) - array[i] = j; - else - { - Num = TT_Char_Index(char_map, j); - if (Num < 0) - oops("cmap mapping failure."); - else - array[i] = j; - } - } -} - - -long -TTFsearch_PS_name(char *name) -{ - unsigned int i; - char *n; - - - for (i = 0; i < properties.num_Glyphs; i++) - { - TT_Get_PS_Name(face, i, &n); - if (strcmp(name, n) == 0) - break; - } - - if (i == properties.num_Glyphs) - return -1L; - else - return (long)i; -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/ttflib.h diff -u xc/extras/FreeType/contrib/ttf2pk/ttflib.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/ttflib.h:removed --- xc/extras/FreeType/contrib/ttf2pk/ttflib.h:1.1.1.2 Sat Feb 12 23:55:16 2000 +++ xc/extras/FreeType/contrib/ttf2pk/ttflib.h Wed Mar 16 20:59:32 2005 @@ -1,31 +0,0 @@ -/* - * ttflib.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef TTFLIB_H -#define TTFLIB_H - -#include "pklib.h" /* for the `byte' type */ - -void TTFopen(char *filename, Font *fnt, int new_dpi, int new_ptsize, - Boolean quiet); - -Boolean TTFprocess(Font *fnt, long Code, byte **bitmap, - int *width, int *height, int *hoff, int *voff, - Boolean hinting, Boolean quiet); - -encoding *TTFget_first_glyphs(Font *fnt, long *array); -void TTFget_subfont(Font *fnt, long *array); - -long TTFsearch_PS_name(char *name); - -#endif /* TTFLIB_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/vplaux.c diff -u xc/extras/FreeType/contrib/ttf2pk/vplaux.c:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/vplaux.c:removed --- xc/extras/FreeType/contrib/ttf2pk/vplaux.c:1.1.1.2 Sat Feb 12 23:55:17 2000 +++ xc/extras/FreeType/contrib/ttf2pk/vplaux.c Wed Mar 16 20:59:32 2005 @@ -1,588 +0,0 @@ -/* - * vplaux.c - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#include -#include -#include -#include - -#include "ttf2tfm.h" -#include "newobj.h" -#include "ttfenc.h" -#include "texenc.h" -#include "tfmaux.h" -#include "vplaux.h" -#include "errormsg.h" -#include "case.h" - - -#undef PI -#define PI 3.14159265358979323846264338327 - - -#define vout(s) fprintf(out, s) - -#define voutln(str) {fprintf(out, "%s\n", str); vlevout(level);} -#define voutln2(f, s) {fprintf(out, f, s); vlevnlout(level);} -#define voutln3(f, a, b) {fprintf(out, f, a, b); vlevnlout(level);} -#define voutln4(f, a, b, c) {fprintf(out, f, a, b, c); vlevnlout(level);} - - -static char vcharbuf[6]; -static char vnamebuf[100]; - -/* the depth of parenthesis nesting in VPL file being written */ -static int level; - - -static FILE *out; - - -static void -vlevout(register int l) -{ - while (l--) - vout(" "); -} - - -static void -vlevnlout(int level) -{ - vout("\n"); - vlevout(level); -} - - -static void -vleft(int *levelp) -{ - (*levelp)++; - vout("("); -} - - -static void -vright(int *levelp) -{ - (*levelp)--; - voutln(")"); -} - - -static char * -vchar(int c, - char *buf, - Boolean forceoctal) -{ - if (forceoctal == 0 && isalnum(c)) - (void)sprintf(buf, "C %c", c); - else - (void)sprintf(buf, "O %o", (unsigned)c); - return buf; -} - - -static char * -vname(int c, - char *buf, - ttfinfo **array, - Boolean forceoctal) -{ - if (!forceoctal && isalnum(c)) - buf[0] = '\0'; - else - sprintf(buf, " (comment %s)", array[c]->adobename); - return buf; -} - - -static int -texheight(register ttfinfo *ti, - ttfinfo *ac, - int xh) -{ - register char **p; - register ttfinfo *aci, *acci; - char buffer[200]; - - - if (xh <= 50 || *(ti->adobename + 1)) - return ti->ury; /* that was the simple case */ - - for (p = accents; *p; p++) /* otherwise we look for accented letters. */ - /* We even check glyphs not in any encoding */ - if (NULL != (aci = findadobe(*p, ac))) - { - strcpy(buffer, ti->adobename); - strcat(buffer, *p); - if (NULL != (acci = findadobe(buffer, ac))) - return acci->ury - aci->ury + xh; - } - return ti->ury; -} - - -/* - * Compute uppercase mapping, when making a small caps font. - */ - -void -upmap(Font *fnt) -{ - register ttfinfo *ti, *Ti; - register char *p, *q; - register pcc *np, *nq; - int i, j; - char lwr[50]; - - - for (Ti = fnt->charlist; Ti; Ti = Ti->next) - { - p = Ti->adobename; - if (isupper(*p)) - { - q = lwr; - for (; *p; p++) - *q++ = tolower(*p); - *q = '\0'; - - if (NULL != (ti = findmappedadobe(lwr, fnt->inencptrs))) - { - for (i = ti->outcode; i >= 0; i = fnt->nextout[i]) - fnt->uppercase[i] = Ti; - for (i = Ti->outcode; i >= 0; i = fnt->nextout[i]) - fnt->lowercase[i] = ti; - } - } - } - - /* - * Note that, contrary to the normal true/false conventions, - * uppercase[i] is NULL and lowercase[i] is non-NULL when `i' is the - * ASCII code of an uppercase letter; and vice versa for lowercase - * letters. - */ - - if (NULL != (ti = findmappedadobe("germandbls", fnt->inencptrs))) - if (NULL != (Ti = findmappedadobe("S", fnt->inencptrs))) - /* we also construct SS */ - { - for (i = ti->outcode; i >= 0; i = fnt->nextout[i]) - fnt->uppercase[i] = ti; - ti->incode = -1; - ti->width = Ti->width << 1; - ti->llx = Ti->llx; - ti->lly = Ti->lly; - ti->urx = Ti->width + Ti->urx; - ti->ury = Ti->ury; - ti->kerns = Ti->kerns; - - np = newpcc(); - np->partname = "S"; - nq = newpcc(); - nq->partname = "S"; - nq->xoffset = Ti->width; - np->next = nq; - ti->pccs = np; - ti->constructed = True; - } - - for (i = 0; casetable[i].upper; i++) - { - if ((ti = findmappedadobe(casetable[i].lower, fnt->inencptrs))) - for (j = ti->outcode; j >= 0; j = fnt->nextout[j]) - fnt->uppercase[j] = findmappedadobe(casetable[i].upper, - fnt->inencptrs); - } -} - -/* - * The logic above seems to work well enough, but it leaves useless - * characters like `fi' and `fl' in the font if they were present - * initially, and it omits characters like `dotlessj' if they are - * absent initially. - */ - - -void -writevpl(Font *fnt, char makevpl, Boolean forceoctal) -{ - register int i, j, k; - register ttfinfo *ti; - register lig *nlig; - register kern *nkern; - register pcc *npcc; - ttfinfo *asucc, *asub, *api; - ttfptr *kern_eq; - int xoff, yoff, ht; - int bc, ec; - char buf[200]; - char header[256]; - Boolean unlabeled; - float Slant; - - - out = fnt->vplout; - - header[0] = '\0'; - strncat(header, "Created by `", 12); - strncat(header, fnt->titlebuf, 255 - 12 - 1); - strncat(header, "'", 1); - - voutln2("(VTITLE %s)", header); - voutln("(COMMENT Please change VTITLE if you edit this file)"); - (void)sprintf(buf, "TeX-%s%s%s%s", - fnt->fullname, - (fnt->efactor == 1.0 ? "" : "-E"), - (fnt->slant == 0.0 ? "" : "-S"), - (makevpl == 1 ? "" : "-CSC")); - - if (strlen(buf) > 19) /* too long, will retain first 9 and last 10 chars */ - { - register char *p, *q; - - - for (p = &buf[9], q = &buf[strlen(buf)-10]; p < &buf[19]; - p++, q++) - *p = *q; - buf[19] = '\0'; - } - voutln2("(FAMILY %s)", buf); - - { - char tbuf[300]; - char *base_encoding = fnt->codingscheme; - - - if (strcmp(fnt->outencoding->name, base_encoding) == 0) - sprintf(tbuf, "%s", fnt->outencoding->name); - else - sprintf(tbuf, "%s + %s", base_encoding, fnt->outencoding->name); - - if (strlen(tbuf) > 39) - { - warning("Coding scheme too long; shortening to 39 characters"); - tbuf[39] = '\0'; - } - voutln2("(CODINGSCHEME %s)", tbuf); - } - - { - long t, sc; - char *s; - int n, pos; - - - s = header; - n = strlen(s); - t = ((long)n) << 24; - sc = 16; - pos = 18; - - voutln( - "(COMMENT The following `HEADER' lines are equivalent to the string)"); - voutln2("(COMMENT \"%s\")", header); - - while (n > 0) - { - t |= ((long)(*(unsigned char *)s++)) << sc; - sc -= 8; - if (sc < 0) - { - voutln3("(HEADER D %d O %lo)", pos, t); - t = 0; - sc = 24; - pos++; - } - n--; - } - if (t) - voutln3("(HEADER D %d O %lo)", pos, t); - } - - voutln("(DESIGNSIZE R 10.0)"); - voutln("(DESIGNUNITS R 1000)"); - voutln("(COMMENT DESIGNSIZE (1 em) IS IN POINTS)"); - voutln("(COMMENT OTHER DIMENSIONS ARE MULTIPLES OF DESIGNSIZE/1000)"); - -#if 0 - /* Let vptovf compute the checksum. */ - voutln2("(CHECKSUM O %lo)", cksum ^ 0xFFFFFFFF); -#endif - - if (fnt->boundarychar >= 0) - voutln2("(BOUNDARYCHAR O %lo)", (unsigned long)fnt->boundarychar); - - vleft(&level); - voutln("FONTDIMEN"); - - Slant = fnt->slant - fnt->efactor * tan(fnt->italicangle * (PI / 180.0)); - - if (Slant) - voutln2("(SLANT R %f)", Slant); - voutln2("(SPACE D %d)", fnt->fontspace); - if (!fnt->fixedpitch) - { - voutln2("(STRETCH D %d)", transform(200, 0, fnt->efactor, fnt->slant)); - voutln2("(SHRINK D %d)", transform(100, 0, fnt->efactor, fnt->slant)); - } - voutln2("(XHEIGHT D %d)", fnt->xheight); - voutln2("(QUAD D %d)", transform(1000, 0, fnt->efactor, fnt->slant)); - voutln2("(EXTRASPACE D %d)", - fnt->fixedpitch ? fnt->fontspace : - transform(111, 0, fnt->efactor, fnt->slant)); - vright(&level); - - vleft(&level); - voutln("MAPFONT D 0"); - voutln2("(FONTNAME %s)", fnt->fullname); -#if 0 - voutln2("(FONTCHECKSUM O %lo)", (unsigned long)cksum); -#endif - vright(&level); - - if (makevpl > 1) - { - vleft(&level); - voutln("MAPFONT D 1"); - voutln2("(FONTNAME %s)", fnt->fullname); - voutln2("(FONTAT D %d)", (int)(1000.0 * fnt->capheight + 0.5)); -#if 0 - voutln2("(FONTCHECKSUM O %lo)", (unsigned long)cksum); -#endif - vright(&level); - } - - for (i = 0; i <= 0xFF && fnt->outencptrs[i] == NULL; i++) - ; - bc = i; - for (i = 0xFF; i >= 0 && fnt->outencptrs[i] == NULL; i--) - ; - ec = i; - - vleft(&level); - voutln("LIGTABLE"); - ti = findadobe("||", fnt->charlist); - unlabeled = True; - for (nlig = ti->ligs; nlig; nlig = nlig->next) - if (NULL != (asucc = findmappedadobe(nlig->succ, fnt->inencptrs))) - { - if (NULL != (asub = findmappedadobe(nlig->sub, fnt->inencptrs))) - if (asucc->outcode >= 0) - if (asub->outcode >= 0) - { - if (unlabeled) - { - voutln("(LABEL BOUNDARYCHAR)"); - unlabeled = False; - } - for (j = asucc->outcode; j >= 0; j = fnt->nextout[j]) - voutln4("(%s %s O %o)", vplligops[nlig->op], - vchar(j, vcharbuf, forceoctal), - (unsigned)asub->outcode); - } - } - if (!unlabeled) - voutln("(STOP)"); - - for (i = bc; i <= ec; i++) - if ((ti = fnt->outencptrs[i]) && ti->outcode == i) - { - unlabeled = True; - if (fnt->uppercase[i] == NULL) - /* omit ligatures from smallcap lowercase */ - for (nlig = ti->ligs; nlig; nlig = nlig->next) - if (NULL != (asucc = findmappedadobe(nlig->succ, fnt->inencptrs))) - if (NULL != (asub = findmappedadobe(nlig->sub, fnt->inencptrs))) - if (asucc->outcode >= 0) - if (asub->outcode >= 0) - { - if (unlabeled) - { - for (j = ti->outcode; j >= 0; j = fnt->nextout[j]) - voutln3("(LABEL %s)%s", - vchar(j, vcharbuf, forceoctal), - vname(j, vnamebuf, - fnt->outencptrs, forceoctal)); - unlabeled = False; - } - for (j = asucc->outcode; j >= 0; j = fnt->nextout[j]) - { - voutln4("(%s %s O %o)", vplligops[nlig->op], - vchar(j, vcharbuf, forceoctal), - (unsigned)asub->outcode); - if (nlig->boundleft) - break; - } - } - - for (nkern = (fnt->uppercase[i] ? fnt->uppercase[i]->kerns : ti->kerns); - nkern; nkern=nkern->next) - if (NULL != (asucc = findmappedadobe(nkern->succ, fnt->inencptrs))) - for (j = asucc->outcode; j >= 0; j = fnt->nextout[j]) - { - if (fnt->uppercase[j] == NULL) - { - if (unlabeled) - { - for (k = ti->outcode; k >= 0; k = fnt->nextout[k]) - voutln3("(LABEL %s)%s", - vchar(k, vcharbuf, forceoctal), - vname(k, vnamebuf, fnt->outencptrs, forceoctal)); - unlabeled = False; - } - - /* - * If other characters have the same kerns as this - * one, output the label here. This makes the TFM - * file much smaller than if we output all the - * kerns again under a different label. - */ - - for (kern_eq = ti->kern_equivs; kern_eq; - kern_eq = kern_eq->next) - { - k = kern_eq->ch->outcode; - if (k >= 0 && k <= 0xFF) - voutln3("(LABEL %s)%s", - vchar(k, vcharbuf, forceoctal), - vname(k, vnamebuf, fnt->outencptrs, forceoctal)); - } - ti->kern_equivs = NULL; /* Only output those labels once. */ - - if (fnt->uppercase[i]) - { - if (fnt->lowercase[j]) - { - for (k = fnt->lowercase[j]->outcode; k >= 0; - k = fnt->nextout[k]) - voutln4("(KRN %s R %.1f)%s", - vchar(k, vcharbuf, forceoctal), - fnt->capheight * nkern->delta, - vname(k, vnamebuf, fnt->outencptrs, forceoctal)); - } - else - voutln4("(KRN %s R %.1f)%s", - vchar(j, vcharbuf, forceoctal), - fnt->capheight * nkern->delta, - vname(j, vnamebuf, fnt->outencptrs, forceoctal)); - } - else - { - voutln4("(KRN %s R %d)%s", - vchar(j, vcharbuf, forceoctal), - nkern->delta, - vname(j, vnamebuf, fnt->outencptrs, forceoctal)); - if (fnt->lowercase[j]) - for (k = fnt->lowercase[j]->outcode; k >= 0; - k = fnt->nextout[k]) - voutln4("(KRN %s R %.1f)%s", - vchar(k, vcharbuf, forceoctal), - fnt->capheight * nkern->delta, - vname(k, vnamebuf, fnt->outencptrs, forceoctal)); - } - } - } - if (!unlabeled) - voutln("(STOP)"); - } - vright(&level); - - for (i = bc; i <= ec; i++) - if (NULL != (ti = fnt->outencptrs[i])) - { - vleft(&level); - fprintf(out, "CHARACTER %s%s\n ", - vchar(i, vcharbuf, forceoctal), - vname(i, vnamebuf, fnt->outencptrs, forceoctal)); - - if (fnt->uppercase[i]) - { - ti = fnt->uppercase[i]; - voutln2("(CHARWD R %.1f)", fnt->capheight * (ti->width)); - if (0 != (ht = texheight(ti, fnt->charlist, fnt->xheight))) - voutln2("(CHARHT R %.1f)", fnt->capheight * ht); - if (ti->lly) - voutln2("(CHARDP R %.1f)", -fnt->capheight * ti->lly); - if (ti->urx > ti->width) - voutln2("(CHARIC R %.1f)", fnt->capheight * (ti->urx - ti->width)); - } - else - { - voutln2("(CHARWD R %d)", ti->width); - if (0 != (ht = texheight(ti, fnt->charlist, fnt->xheight))) - voutln2("(CHARHT R %d)", ht); - if (ti->lly) - voutln2("(CHARDP R %d)", -ti->lly); - if (ti->urx > ti->width) - voutln2("(CHARIC R %d)", ti->urx - ti->width); - } - - if (ti->incode != i || fnt->uppercase[i] || ti->constructed) - { - vleft(&level); - voutln("MAP"); - if (fnt->uppercase[i]) - voutln("(SELECTFONT D 1)"); - - if (ti->pccs && (ti->incode < 0 || ti->constructed)) - { - xoff = 0; - yoff = 0; - - for (npcc = ti->pccs; npcc; npcc = npcc->next) - if (NULL != (api = findmappedadobe(npcc->partname, - fnt->inencptrs))) - if (api->outcode >= 0) - { - if (npcc->xoffset != xoff) - { - if (fnt->uppercase[i]) - { - voutln2("(MOVERIGHT R %.1f)", - fnt->capheight * (npcc->xoffset - xoff)); - } - else - voutln2("(MOVERIGHT R %d)", npcc->xoffset - xoff); - - xoff = npcc->xoffset; - } - - if (npcc->yoffset != yoff) - { - if (fnt->uppercase[i]) - { - voutln2("(MOVEUP R %.1f)", - fnt->capheight * (npcc->yoffset - yoff)); - } - else - voutln2("(MOVEUP R %d)", npcc->yoffset - yoff); - - yoff = npcc->yoffset; - } - - voutln2("(SETCHAR O %o)", (unsigned)api->incode); - xoff += fnt->outencptrs[api->outcode]->width; - } - } - else - voutln2("(SETCHAR O %o)", (unsigned)ti->incode); - vright(&level); - } - vright(&level); - } - - if (level) - oops("I forgot to match the parentheses."); -} - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/vplaux.h diff -u xc/extras/FreeType/contrib/ttf2pk/vplaux.h:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/vplaux.h:removed --- xc/extras/FreeType/contrib/ttf2pk/vplaux.h:1.1.1.2 Sat Feb 12 23:55:17 2000 +++ xc/extras/FreeType/contrib/ttf2pk/vplaux.h Wed Mar 16 20:59:32 2005 @@ -1,23 +0,0 @@ -/* - * vplaux.h - * - * This file is part of the ttf2pk package. - * - * Copyright 1997-1999 by - * Frederic Loyer - * Werner Lemberg - */ - -#ifndef VPLAUX_H -#define VPLAUX_H - -#include "ttf2tfm.h" - - -void writevpl(Font *fnt, char makevpl, Boolean forceoctal); -void upmap(Font *fnt); - -#endif /* VPLAUX_H */ - - -/* end */ Index: xc/extras/FreeType/contrib/ttf2pk/data/Big5.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/Big5.sfd:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/data/Big5.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/Big5.sfd:1.1.1.2 Sat Feb 12 23:55:18 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/Big5.sfd Wed Mar 16 20:59:32 2005 @@ -1,65 +0,0 @@ -# Big5.sfd -# -# subfont numbers for Big 5 encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. - -01 0xA140_0xA17E 0xA1A1_0xA1FE 0xA240_0xA27E 0xA2A1_0xA2C4 -02 0xA2C5_0xA2FE 0xA340_0xA37E 0xA3A1_0xA3FE 0xA440_0xA468 -03 0xA469_0xA47E 0xA4A1_0xA4FE 0xA540_0xA57E 0xA5A1_0xA5ED -04 0xA5EE_0xA5FE 0xA640_0xA67E 0xA6A1_0xA6FE 0xA740_0xA77E 0xA7A1_0xA7B3 -05 0xA7B4_0xA7FE 0xA840_0xA87E 0xA8A1_0xA8FE 0xA940_0xA957 -06 0xA958_0xA97E 0xA9A1_0xA9FE 0xAA40_0xAA7E 0xAAA1_0xAADC -07 0xAADD_0xAAFE 0xAB40_0xAB7E 0xABA1_0xABFE 0xAC40_0xAC7E 0xACA1_0xACA2 -08 0xACA3_0xACFE 0xAD40_0xAD7E 0xADA1_0xADFE 0xAE40_0xAE46 -09 0xAE47_0xAE7E 0xAEA1_0xAEFE 0xAF40_0xAF7E 0xAFA1_0xAFCB -10 0xAFCC_0xAFFE 0xB040_0xB07E 0xB0A1_0xB0FE 0xB140_0xB16F -11 0xB170_0xB17E 0xB1A1_0xB1FE 0xB240_0xB27E 0xB2A1_0xB2F4 -12 0xB2F5_0xB2FE 0xB340_0xB37E 0xB3A1_0xB3FE 0xB440_0xB47E 0xB4A1_0xB4BA -13 0xB4BB_0xB4FE 0xB540_0xB57E 0xB5A1_0xB5FE 0xB640_0xB65E -14 0xB65F_0xB67E 0xB6A1_0xB6FE 0xB740_0xB77E 0xB7A1_0xB7E3 -15 0xB7E4_0xB7FE 0xB840_0xB87E 0xB8A1_0xB8FE 0xB940_0xB97E 0xB9A1_0xB9A9 -16 0xB9AA_0xB9FE 0xBA40_0xBA7E 0xBAA1_0xBAFE 0xBB40_0xBB4D -17 0xBB4E_0xBB7E 0xBBA1_0xBBFE 0xBC40_0xBC7E 0xBCA1_0xBCD2 -18 0xBCD3_0xBCFE 0xBD40_0xBD7E 0xBDA1_0xBDFE 0xBE40_0xBE76 -19 0xBE77_0xBE7E 0xBEA1_0xBEFE 0xBF40_0xBF7E 0xBFA1_0xBFFB -20 0xBFFC_0xBFFE 0xC040_0xC07E 0xC0A1_0xC0FE 0xC140_0xC17E 0xC1A1_0xC1C1 -21 0xC1C2_0xC1FE 0xC240_0xC27E 0xC2A1_0xC2FE 0xC340_0xC365 -22 0xC366_0xC37E 0xC3A1_0xC3FE 0xC440_0xC47E 0xC4A1_0xC4EA -23 0xC4EB_0xC4FE 0xC540_0xC57E 0xC5A1_0xC5FE 0xC640_0xC67E 0xC6A1_0xC6B0 -24 0xC6B1_0xC6FE 0xC740_0xC77E 0xC7A1_0xC7FE 0xC840_0xC854 -25 0xC855_0xC87E 0xC8A1_0xC8FE 0xC940_0xC97E 0xC9A1_0xC9D9 -26 0xC9DA_0xC9FE 0xCA40_0xCA7E 0xCAA1_0xCAFE 0xCB40_0xCB7D -27 0xCB7E 0xCBA1_0xCBFE 0xCC40_0xCC7E 0xCCA1_0xCCFE 0xCD40_0xCD43 -28 0xCD44_0xCD7E 0xCDA1_0xCDFE 0xCE40_0xCE7E 0xCEA1_0xCEC8 -29 0xCEC9_0xCEFE 0xCF40_0xCF7E 0xCFA1_0xCFFE 0xD040_0xD06C -30 0xD06D_0xD07E 0xD0A1_0xD0FE 0xD140_0xD17E 0xD1A1_0xD1F1 -31 0xD1F2_0xD1FE 0xD240_0xD27E 0xD2A1_0xD2FE 0xD340_0xD37E 0xD3A1_0xD3B7 -32 0xD3B8_0xD3FE 0xD440_0xD47E 0xD4A1_0xD4FE 0xD540_0xD55B -33 0xD55C_0xD57E 0xD5A1_0xD5FE 0xD640_0xD67E 0xD6A1_0xD6E0 -34 0xD6E1_0xD6FE 0xD740_0xD77E 0xD7A1_0xD7FE 0xD840_0xD87E 0xD8A1_0xD8A6 -35 0xD8A7_0xD8FE 0xD940_0xD97E 0xD9A1_0xD9FE 0xDA40_0xDA4A -36 0xDA4B_0xDA7E 0xDAA1_0xDAFE 0xDB40_0xDB7E 0xDBA1_0xDBCF -37 0xDBD0_0xDBFE 0xDC40_0xDC7E 0xDCA1_0xDCFE 0xDD40_0xDD73 -38 0xDD74_0xDD7E 0xDDA1_0xDDFE 0xDE40_0xDE7E 0xDEA1_0xDEF8 -39 0xDEF9_0xDEFE 0xDF40_0xDF7E 0xDFA1_0xDFFE 0xE040_0xE07E 0xE0A1_0xE0BE -40 0xE0BF_0xE0FE 0xE140_0xE17E 0xE1A1_0xE1FE 0xE240_0xE262 -41 0xE263_0xE27E 0xE2A1_0xE2FE 0xE340_0xE37E 0xE3A1_0xE3E7 -42 0xE3E8_0xE3FE 0xE440_0xE47E 0xE4A1_0xE4FE 0xE540_0xE57E 0xE5A1_0xE5AD -43 0xE5AE_0xE5FE 0xE640_0xE67E 0xE6A1_0xE6FE 0xE740_0xE751 -44 0xE752_0xE77E 0xE7A1_0xE7FE 0xE840_0xE87E 0xE8A1_0xE8D6 -45 0xE8D7_0xE8FE 0xE940_0xE97E 0xE9A1_0xE9FE 0xEA40_0xEA7A -46 0xEA7B_0xEA7E 0xEAA1_0xEAFE 0xEB40_0xEB7E 0xEBA1_0xEBFE 0xEC40 -47 0xEC41_0xEC7E 0xECA1_0xECFE 0xED40_0xED7E 0xEDA1_0xEDC5 -48 0xEDC6_0xEDFE 0xEE40_0xEE7E 0xEEA1_0xEEFE 0xEF40_0xEF69 -49 0xEF6A_0xEF7E 0xEFA1_0xEFFE 0xF040_0xF07E 0xF0A1_0xF0EE -50 0xF0EF_0xF0FE 0xF140_0xF17E 0xF1A1_0xF1FE 0xF240_0xF27E 0xF2A1_0xF2B4 -51 0xF2B5_0xF2FE 0xF340_0xF37E 0xF3A1_0xF3FE 0xF440_0xF458 -52 0xF459_0xF47E 0xF4A1_0xF4FE 0xF540_0xF57E 0xF5A1_0xF5DD -53 0xF5DE_0xF5FE 0xF640_0xF67E 0xF6A1_0xF6FE 0xF740_0xF77E 0xF7A1_0xF7A3 -54 0xF7A4_0xF7FE 0xF840_0xF87E 0xF8A1_0xF8FE 0xF940_0xF947 -55 0xF948_0xF97E 0xF9A1_0xF9FE 0xFA40_0xFA7E 0xFAA1_0xFACC -56 0xFACD_0xFAFE 0xFB40_0xFB7E 0xFBA1_0xFBFE 0xFC40_0xFC70 -57 0xFC71_0xFC7E 0xFCA1_0xFCFE 0xFD40_0xFD7E 0xFDA1_0xFDF5 -58 0xFDF6_0xFDFE 0xFE40_0xFE7E 0xFEA1_0xFEFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/ET5.enc diff -u xc/extras/FreeType/contrib/ttf2pk/data/ET5.enc:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/ET5.enc:removed --- xc/extras/FreeType/contrib/ttf2pk/data/ET5.enc:1.1.1.1 Sat Jan 23 22:21:54 1999 +++ xc/extras/FreeType/contrib/ttf2pk/data/ET5.enc Wed Mar 16 20:59:32 2005 @@ -1,119 +0,0 @@ -% ET5.enc -% -% -% This is LaTeX ET5 encoding for Vietnamese. -% -% -% LIGKERN question quoteleft =: questiondown ; -% LIGKERN exclam quoteleft =: exclamdown ; -% LIGKERN hyphen hyphen =: endash ; -% LIGKERN endash hyphen =: emdash ; -% LIGKERN quoteleft quoteleft =: quotedblleft ; -% LIGKERN quoteright quoteright =: quotedblright ; -% LIGKERN comma comma =: quotedblbase ; -% -% LIGKERN f i =: fi ; -% LIGKERN f l =: fl ; -% LIGKERN f f =: ff ; -% LIGKERN ff i =: ffi ; -% LIGKERN ff l =: ffl ; -% -% We blow away kerns to and from spaces (TeX doesn't have a -% space) and also remove any kerns from the numbers. -% -% LIGKERN space {} * ; * {} space ; -% LIGKERN zero {} * ; * {} zero ; -% LIGKERN one {} * ; * {} one ; -% LIGKERN two {} * ; * {} two ; -% LIGKERN three {} * ; * {} three ; -% LIGKERN four {} * ; * {} four ; -% LIGKERN five {} * ; * {} five ; -% LIGKERN six {} * ; * {} six ; -% LIGKERN seven {} * ; * {} seven ; -% LIGKERN eight {} * ; * {} eight ; -% LIGKERN nine {} * ; * {} nine ; - -/ET5encoding [ -% 0x00 - /Abrevehookabove /Abrevetilde /Acircumflextilde /Yhookabove - /Ytilde /Ydotbelow /Sigma /Upsilon - /Phi /Psi /Omega /ff - /fi /fl /ffi /ffl -% 0x10 - /dotlessi /dotlessj /grave /acute - /caron /breve /macron /ring - /cedilla /germandbls /ae /oe - /oslash /AE /OE /Oslash -% 0x20 - /.notdef /exclam /quotedblright /numbersign - /dollar /percent /ampersand /quoteright - /parenleft /parenright /asterisk /plus - /comma /hyphen /period /slash -% 0x30 - /zero /one /two /three - /four /five /six /seven - /eight /nine /colon /semicolon - /exclamdown /equal /questiondown /question -% 0x40 - /at /A /B /C - /D /E /F /G - /H /I /J /K - /L /M /N /O -% 0x50 - /P /Q /R /S - /T /U /V /W - /X /Y /Z /bracketleft - /quotedblleft /bracketright /circumflex /dotaccent -% 0x60 - /quoteleft /a /b /c - /d /e /f /g - /h /i /j /k - /l /m /n /o -% 0x70 - /p /q /r /s - /t /u /v /w - /x /y /z /endash - /emdash /hungarumlaut /tilde /dieresis -% 0x80 - /Adotbelow /Abreveacute /Abrevegrave /Abrevedotbelow - /Acircumflexacute /Acircumflexgrave /Acircumflexhookabove /Acircumflexdotbelow - /Etilde /Edotbelow /Ecircumflexacute /Ecircumflexgrave - /Ecircumflexhookabove /Ecircumflextilde /Ecircumflexdotbelow /Ocircumflexacute -% 0x90 - /Ocircumflexgrave /Ocircumflexhookabove /Ocircumflextilde /Ocircumflexdotbelow - /Ohorndotbelow /Ohornacute /Ohorngrave /Ohornhookabove - /Idotbelow /Ohookabove /Odotbelow /Ihookabove - /Uhookabove /Utilde /Udotbelow /Ygrave -% 0xA0 - /Otilde /abreveacute /abrevegrave /abrevedotbelow - /acircumflexacute /acircumflexgrave /acircumflexhookabove /acircumflexdotbelow - /etilde /edotbelow /ecircumflexacute /ecircumflexgrave - /ecircumflexhookabove /ecircumflextilde /ecircumflexdotbelow /ocircumflexacute -% 0xB0 - /ocircumflexgrave /ocircumflexhookabove /ocircumflextilde /Ohorntilde - /Ohorn /ocircumflexdotbelow /ohorngrave /ohornhookabove - /idotbelow /Uhorndotbelow /Uhornacute /Uhorngrave - /Uhornhookabove /ohorn /ohornacute /Uhorn -% 0xC0 - /Agrave /Aacute /Acircumflex /Atilde - /Ahookabove /Abreve /abrevehookabove /abrevetilde - /Egrave /Eacute /Ecircumflex /Ehookabove - /Igrave /Iacute /Itilde /ygrave -% 0xD0 - /Dbar /uhornacute /Ograve /Oacute - /Ocircumflex /adotbelow /yhookabove /uhorngrave - /uhornhookabove /Ugrave /Uacute /ytilde - /ydotbelow /Yacute /ohorntilde /uhorn -% 0xE0 - /agrave /aacute /acircumflex /atilde - /ahookabove /abreve /uhorntilde /acircumflextilde - /egrave /eacute /ecircumflex /ehookabove - /igrave /iacute /itilde /ihookabove -% 0xF0 - /dbar /uhorndotbelow /ograve /oacute - /ocircumflex /otilde /ohookabove /odotbelow - /udotbelow /ugrave /uacute /utilde - /uhookabove /yacute /ohorndotbelow /Uhorntilde -] def - -% eof Index: xc/extras/FreeType/contrib/ttf2pk/data/EUC.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/EUC.sfd:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/data/EUC.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/EUC.sfd:1.1.1.2 Sat Feb 12 23:55:18 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/EUC.sfd Wed Mar 16 20:59:32 2005 @@ -1,49 +0,0 @@ -# EUC.sfd -# -# subfont numbers for character sets in EUC encoding and its corresponding -# code ranges to be used with the CJK package for LaTeX. -# -# Examples for such character sets: -# -# GB 2312-1980, -# KS X 1001:1992 (=KS C 5601-1992), -# JIS X 0208:1997, -# CNS 11643-1992 planes 1-7. - -01 0xA1A1_0xA1FE 0xA2A1_0xA2FE 0xA3A1_0xA3E4 -02 0xA3E5_0xA3FE 0xA4A1_0xA4FE 0xA5A1_0xA5FE 0xA6A1_0xA6CA -03 0xA6CB_0xA6FE 0xA7A1_0xA7FE 0xA8A1_0xA8FE 0xA9A1_0xA9B0 -04 0xA9B1_0xA9FE 0xAAA1_0xAAFE 0xABA1_0xABF4 -05 0xABF5_0xABFE 0xACA1_0xACFE 0xADA1_0xADFE 0xAEA1_0xAEDA -06 0xAEDB_0xAEFE 0xAFA1_0xAFFE 0xB0A1_0xB0FE 0xB1A1_0xB1C0 -07 0xB1C1_0xB1FE 0xB2A1_0xB2FE 0xB3A1_0xB3FE 0xB4A1_0xB4A6 -08 0xB4A7_0xB4FE 0xB5A1_0xB5FE 0xB6A1_0xB6EA -09 0xB6EB_0xB6FE 0xB7A1_0xB7FE 0xB8A1_0xB8FE 0xB9A1_0xB9D0 -10 0xB9D1_0xB9FE 0xBAA1_0xBAFE 0xBBA1_0xBBFE 0xBCA1_0xBCB6 -11 0xBCB7_0xBCFE 0xBDA1_0xBDFE 0xBEA1_0xBEFA -12 0xBEFB_0xBEFE 0xBFA1_0xBFFE 0xC0A1_0xC0FE 0xC1A1_0xC1E0 -13 0xC1E1_0xC1FE 0xC2A1_0xC2FE 0xC3A1_0xC3FE 0xC4A1_0xC4C6 -14 0xC4C7_0xC4FE 0xC5A1_0xC5FE 0xC6A1_0xC6FE 0xC7A1_0xC7AC -15 0xC7AD_0xC7FE 0xC8A1_0xC8FE 0xC9A1_0xC9F0 -16 0xC9F1_0xC9FE 0xCAA1_0xCAFE 0xCBA1_0xCBFE 0xCCA1_0xCCD6 -17 0xCCD7_0xCCFE 0xCDA1_0xCDFE 0xCEA1_0xCEFE 0xCFA1_0xCFBC -18 0xCFBD_0xCFFE 0xD0A1_0xD0FE 0xD1A1_0xD1FE 0xD2A1_0xD2A2 -19 0xD2A3_0xD2FE 0xD3A1_0xD3FE 0xD4A1_0xD4E6 -20 0xD4E7_0xD4FE 0xD5A1_0xD5FE 0xD6A1_0xD6FE 0xD7A1_0xD7CC -21 0xD7CD_0xD7FE 0xD8A1_0xD8FE 0xD9A1_0xD9FE 0xDAA1_0xDAB2 -22 0xDAB3_0xDAFE 0xDBA1_0xDBFE 0xDCA1_0xDCF6 -23 0xDCF7_0xDCFE 0xDDA1_0xDDFE 0xDEA1_0xDEFE 0xDFA1_0xDFDC -24 0xDFDD_0xDFFE 0xE0A1_0xE0FE 0xE1A1_0xE1FE 0xE2A1_0xE2C2 -25 0xE2C3_0xE2FE 0xE3A1_0xE3FE 0xE4A1_0xE4FE 0xE5A1_0xE5A8 -26 0xE5A9_0xE5FE 0xE6A1_0xE6FE 0xE7A1_0xE7EC -27 0xE7ED_0xE7FE 0xE8A1_0xE8FE 0xE9A1_0xE9FE 0xEAA1_0xEAD2 -28 0xEAD3_0xEAFE 0xEBA1_0xEBFE 0xECA1_0xECFE 0xEDA1_0xEDB8 -29 0xEDB9_0xEDFE 0xEEA1_0xEEFE 0xEFA1_0xEFFC -30 0xEFFD_0xEFFE 0xF0A1_0xF0FE 0xF1A1_0xF1FE 0xF2A1_0xF2E2 -31 0xF2E3_0xF2FE 0xF3A1_0xF3FE 0xF4A1_0xF4FE 0xF5A1_0xF5C8 -32 0xF5C9_0xF5FE 0xF6A1_0xF6FE 0xF7A1_0xF7FE 0xF8A1_0xF8AE -33 0xF8AF_0xF8FE 0xF9A1_0xF9FE 0xFAA1_0xFAF2 -34 0xFAF3_0xFAFE 0xFBA1_0xFBFE 0xFCA1_0xFCFE 0xFDA1_0xFDD8 -35 0xFDD9_0xFDFE 0xFEA1_0xFEFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/SJIS.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/SJIS.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/SJIS.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/SJIS.sfd:1.1.1.1 Sat Jan 23 22:21:54 1999 +++ xc/extras/FreeType/contrib/ttf2pk/data/SJIS.sfd Wed Mar 16 20:59:32 2005 @@ -1,52 +0,0 @@ -# SJIS.sfd -# -# subfont numbers for SJIS encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. - -01 0x8140_0x817E 0x8180_0x81FC 0x8240_0x827E 0x8280_0x8284 -02 0x8285_0x82FC 0x8340_0x837E 0x8380_0x83C8 -03 0x83C9_0x83FC 0x8440_0x847E 0x8480_0x84FC 0x8540_0x854F -04 0x8550_0x857E 0x8580_0x85FC 0x8640_0x867E 0x8680_0x8694 -05 0x8695_0x86FC 0x8740_0x877E 0x8780_0x87D8 -06 0x87D9_0x87FC 0x8840_0x887E 0x8880_0x88FC 0x8940_0x895F -07 0x8960_0x897E 0x8980_0x89FC 0x8A40_0x8A7E 0x8A80_0x8AA4 -08 0x8AA5_0x8AFC 0x8B40_0x8B7E 0x8B80_0x8BE8 -09 0x8BE9_0x8BFC 0x8C40_0x8C7E 0x8C80_0x8CFC 0x8D40_0x8D6F -10 0x8D70_0x8D7E 0x8D80_0x8DFC 0x8E40_0x8E7E 0x8E80_0x8EB4 -11 0x8EB5_0x8EFC 0x8F40_0x8F7E 0x8F80_0x8FF8 -12 0x8FF9_0x8FFC 0x9040_0x907E 0x9080_0x90FC 0x9140_0x917E 0x9180 -13 0x9181_0x91FC 0x9240_0x927E 0x9280_0x92C4 -14 0x92C5_0x92FC 0x9340_0x937E 0x9380_0x93FC 0x9440_0x944B -15 0x944C_0x947E 0x9480_0x94FC 0x9540_0x957E 0x9580_0x9590 -16 0x9591_0x95FC 0x9640_0x967E 0x9680_0x96D4 -17 0x96D5_0x96FC 0x9740_0x977E 0x9780_0x97FC 0x9840_0x985B -18 0x985C_0x987E 0x9880_0x98FC 0x9940_0x997E 0x9980_0x99A0 -19 0x99A1_0x99FC 0x9A40_0x9A7E 0x9A80_0x9AE4 -20 0x9AE5_0x9AFC 0x9B40_0x9B7E 0x9B80_0x9BFC 0x9C40_0x9C6B -21 0x9C6C_0x9C7E 0x9C80_0x9CFC 0x9D40_0x9D7E 0x9D80_0x9DB0 -22 0x9DB1_0x9DFC 0x9E40_0x9E7E 0x9E80_0x9EF4 -23 0x9EF5_0x9EFC 0x9F40_0x9F7E 0x9F80_0x9FFC 0xE040_0xE07B -24 0xE07C_0xE07E 0xE080_0xE0FC 0xE140_0xE17E 0xE180_0xE1C0 -25 0xE1C1_0xE1FC 0xE240_0xE27E 0xE280_0xE2FC 0xE340_0xE347 -26 0xE348_0xE37E 0xE380_0xE3FC 0xE440_0xE47E 0xE480_0xE48C -27 0xE48D_0xE4FC 0xE540_0xE57E 0xE580_0xE5D0 -28 0xE5D1_0xE5FC 0xE640_0xE67E 0xE680_0xE6FC 0xE740_0xE757 -29 0xE758_0xE77E 0xE780_0xE7FC 0xE840_0xE87E 0xE880_0xE89C -30 0xE89D_0xE8FC 0xE940_0xE97E 0xE980_0xE9E0 -31 0xE9E1_0xE9FC 0xEA40_0xEA7E 0xEA80_0xEAFC 0xEB40_0xEB67 -32 0xEB68_0xEB7E 0xEB80_0xEBFC 0xEC40_0xEC7E 0xEC80_0xECAC -33 0xECAD_0xECFC 0xED40_0xED7E 0xED80_0xEDF0 -34 0xEDF1_0xEDFC 0xEE40_0xEE7E 0xEE80_0xEEFC 0xEF40_0xEF77 -35 0xEF78_0xEF7E 0xEF80_0xEFFC 0xF040_0xF07E 0xF080_0xF0BC -36 0xF0BD_0xF0FC 0xF140_0xF17E 0xF180_0xF1FC 0xF240_0xF243 -37 0xF244_0xF27E 0xF280_0xF2FC 0xF340_0xF37E 0xF380_0xF388 -38 0xF389_0xF3FC 0xF440_0xF47E 0xF480_0xF4CC -39 0xF4CD_0xF4FC 0xF540_0xF57E 0xF580_0xF5FC 0xF640_0xF653 -40 0xF654_0xF67E 0xF680_0xF6FC 0xF740_0xF77E 0xF780_0xF798 -41 0xF799_0xF7FC 0xF840_0xF87E 0xF880_0xF8DC -42 0xF8DD_0xF8FC 0xF940_0xF97E 0xF980_0xF9FC 0xFA40_0xFA63 -43 0xFA64_0xFA7E 0xFA80_0xFAFC 0xFB40_0xFB7E 0xFB80_0xFBA8 -44 0xFBA9_0xFBFC 0xFC40_0xFC7E 0xFC80_0xFCEC -45 0xFCED_0xFCFC - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/T1-WGL4.enc diff -u xc/extras/FreeType/contrib/ttf2pk/data/T1-WGL4.enc:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/T1-WGL4.enc:removed --- xc/extras/FreeType/contrib/ttf2pk/data/T1-WGL4.enc:1.1.1.1 Sat Jan 23 22:21:54 1999 +++ xc/extras/FreeType/contrib/ttf2pk/data/T1-WGL4.enc Wed Mar 16 20:59:32 2005 @@ -1,128 +0,0 @@ -% T1-WGL4.enc -% -% -% This is LaTeX T1 encoding for WGL4 encoded TrueType fonts -% (e.g. from Windows 95) -% -% -% Note that /hyphen appears twice (for the T1 code points `hyphen' 0x2d -% and `hyphenchar' 0x7f). -% -% -% LIGKERN space l =: lslash ; -% LIGKERN space L =: Lslash ; -% LIGKERN question quoteleft =: questiondown ; -% LIGKERN exclam quoteleft =: exclamdown ; -% LIGKERN hyphen hyphen =: endash ; -% LIGKERN endash hyphen =: emdash ; -% LIGKERN quoteleft quoteleft =: quotedblleft ; -% LIGKERN quoteright quoteright =: quotedblright ; -% LIGKERN comma comma =: quotedblbase ; -% LIGKERN less less =: guillemotleft ; -% LIGKERN greater greater =: guillemotright ; -% -% LIGKERN f i =: fi ; -% LIGKERN f l =: fl ; -% LIGKERN f f =: ff ; -% LIGKERN ff i =: ffi ; -% LIGKERN ff l =: ffl ; -% -% We blow away kerns to and from spaces (TeX doesn't have a -% space) and also remove any kerns from the numbers. -% -% LIGKERN space {} * ; * {} space ; -% LIGKERN zero {} * ; * {} zero ; -% LIGKERN one {} * ; * {} one ; -% LIGKERN two {} * ; * {} two ; -% LIGKERN three {} * ; * {} three ; -% LIGKERN four {} * ; * {} four ; -% LIGKERN five {} * ; * {} five ; -% LIGKERN six {} * ; * {} six ; -% LIGKERN seven {} * ; * {} seven ; -% LIGKERN eight {} * ; * {} eight ; -% LIGKERN nine {} * ; * {} nine ; - -/T1Encoding [ % now 256 chars follow -% 0x00 - /grave /acute /circumflex /tilde - /dieresis /hungarumlaut /ring /caron - /breve /macron /dotaccent /cedilla - /ogonek /quotesinglbase /guilsinglleft /guilsinglright -% 0x10 - /quotedblleft /quotedblright /quotedblbase /guillemotleft - /guillemotright /endash /emdash /compwordmark - /perthousandzero /dotlessi /dotlessj /ff - /fi /fl /ffi /ffl -% 0x20 - /visualspace /exclam /quotedbl /numbersign - /dollar /percent /ampersand /quoteright - /parenleft /parenright /asterisk /plus - /comma /hyphen /period /slash -% 0x30 - /zero /one /two /three - /four /five /six /seven - /eight /nine /colon /semicolon - /less /equal /greater /question -% 0x40 - /at /A /B /C - /D /E /F /G - /H /I /J /K - /L /M /N /O -% 0x50 - /P /Q /R /S - /T /U /V /W - /X /Y /Z /bracketleft - /backslash /bracketright /asciicircum /underscore -% 0x60 - /quoteleft /a /b /c - /d /e /f /g - /h /i /j /k - /l /m /n /o -% 0x70 - /p /q /r /s - /t /u /v /w - /x /y /z /braceleft - /bar /braceright /asciitilde /hyphen -% 0x80 - /Abreve /Aogonek /Cacute /Ccaron - /Dcaron /Ecaron /Eogonek /Gbreve - /Lacute /Lcaron /Lslash /Nacute - /Ncaron /Eng /Odblacute /Racute -% 0x90 - /Rcaron /Sacute /Scaron /Scedilla - /Tcaron /Tcedilla /Udblacute /Uring - /Ydieresis /Zacute /Zcaron /Zdot - /IJ /Idot /dmacron /section -% 0xA0 - /abreve /aogonek /cacute /ccaron - /dcaron /ecaron /eogonek /gbreve - /lacute /lcaron /lslash /nacute - /ncaron /eng /odblacute /racute -% 0xB0 - /rcaron /sacute /scaron /scedilla - /tcaron /tcedilla /udblacute /uring - /ydieresis /zacute /zcaron /zdot - /ij /exclamdown /questiondown /sterling -% 0xC0 - /Agrave /Aacute /Acircumflex /Atilde - /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis - /Igrave /Iacute /Icircumflex /Idieresis -% 0xD0 - /Eth /Ntilde /Ograve /Oacute - /Ocircumflex /Otilde /Odieresis /OE - /Oslash /Ugrave /Uacute /Ucircumflex - /Udieresis /Yacute /Thorn /Germandbls -% 0xE0 - /agrave /aacute /acircumflex /atilde - /adieresis /aring /ae /ccedilla - /egrave /eacute /ecircumflex /edieresis - /igrave /iacute /icircumflex /idieresis -% 0xF0 - /eth /ntilde /ograve /oacute - /ocircumflex /otilde /odieresis /oe - /oslash /ugrave /uacute /ucircumflex - /udieresis /yacute /thorn /germandbls -] def - -% eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UBg5plus.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UBg5plus.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UBg5plus.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UBg5plus.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UBg5plus.sfd Wed Mar 16 20:59:32 2005 @@ -1,3002 +0,0 @@ -# UBg5plus.sfd -# -# subfont numbers for Big 5+ encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x8488 0x8710 0x871F 0x870F 0x88D3 0x8C87 0x8CC6 0x90CC \ - 0x916D 0x9258 0x9242 0x9268 0x9269 0x9243 0x9247 0x959D \ - 0x96CF 0x97F4 0x9809 0x98AB 0x98FB 0x9AAC 0x9AAE 0x9AAA \ - 0x9B5C 0x50DF 0x5619 0x560A 0x589A 0x5D85 0x5E56 0x5E51 \ - 0x5FB1 0x645A 0x6463 0x669B 0x66A3 0x669E 0x69B8 0x69BA \ - 0x69C7 0x69D7 0x6B70 0x6B9D 0x6F16 0x6F24 0x6F45 0x7179 \ - 0x717A 0x7254 0x757C 0x757B 0x7612 0x76B6 0x76E0 0x7773 \ - 0x7772 0x7770 0x789D 0x7A27 0x7A35 0x7BA2 0x7B89 0x4E28 \ - 0x4E05 0x4E04 0x4E2A 0x4E87 0x4E49 0x51E2 0x4E46 0x4E8F \ - 0x4EBC 0x4EBE 0x5166 0x51E3 0x5204 0x529C 0x5344 0x5F51 \ - 0x961D 0x4E63 0x4E62 0x4EA3 0x5185 0x4EC5 0x4ECF 0x4ECE \ - 0x4ECC 0x5184 0x5186 0x51E4 0x5205 0x529E 0x529D 0x52FD \ - 0x7BA5 0x7CB6 0x7DA5 0x7DC3 0x7FAB 0x8025 0x8059 0x8185 \ - 0x818E 0x84BE 0x84A6 0x872F 0x89A0 0x8A97 0x8C8B 0x8F0F \ - 0x9275 0x929F 0x95A6 0x969A 0x9757 0x97F7 0x98B0 0x99C6 \ - 0x50FA 0x5285 0x5643 0x563C 0x5BED 0x5C35 0x5F47 0x616D \ - 0x69F5 0x6A03 0x6A65 0x6B75 0x6F56 0x6F98 0x6F68 0x7234 \ - 0x7245 0x735C 0x7356 0x78BF 0x78BD 0x78E4 0x7A34 0x7A36 \ - 0x7BBA 0x7BBC 0x7BC8 0x7BC3 0x7BB6 0x7BC2 0x7BC5 0x7BBD \ - 0x7BB0 0x7BBB 0x7E04 0x81F1 0x8522 0x8538 0x8532 0x8510 \ - 0x854F 0x877C 0x890D 0x8908 0x8D9E 0x8F28 0x8F21 0x9066 \ - 0x906C 0x90F6 0x92EC 0x92BA 0x92E3 0x92BD 0x95B4 0x97D1 \ - 0x9823 0x990B 0x9AB2 0x9ADB 0x9B73 0x9B6E 0x9B65 0x9B6A \ - 0x9B6D 0x9D0B 0x9E76 0x9F11 0x5119 0x5675 0x596F 0x61A5 \ - 0x61A0 0x65B4 0x65D8 0x66C2 0x6BA8 0x6F83 0x6FC5 0x71CD \ - 0x729C 0x7499 0x7639 0x762E 0x769F 0x76A0 0x7794 0x77AE \ - 0x78E6 0x7ABC 0x7BD6 0x7CCF 0x7E18 0x806D 0x8190 0x8552 \ - 0x8550 0x87A0 0x8786 0x8795 0x8860 0x8928 0x8920 0x89A8 \ - 0x8E3A 0x9194 0x9311 0x9337 0x9343 0x96A6 0x9795 0x9796 \ - 0x9825 0x9926 0x9934 0x9B8A 0x9B7F 0x9D11 0x9ED9 0x9F3C \ - 0x5123 0x512C 0x5295 0x5688 0x568B 0x61E1 0x61D7 0x65A3 \ - 0x66D3 0x6A8B 0x6BAC 0x7374 0x7640 0x5300 0x533A 0x5346 -02 0x535D 0x5386 0x53B7 0x53CC 0x53CE 0x5721 0x5E00 0x5F0C \ - 0x6237 0x6238 0x6535 0x738D 0x4E97 0x4EE0 0x4EE7 0x4EE6 \ - 0x56D8 0x518B 0x518C 0x5199 0x51E5 0x520B 0x5304 0x5303 \ - 0x5307 0x531E 0x535F 0x536D 0x5389 0x53BA 0x7641 0x76E8 \ - 0x78F6 0x7900 0x7A59 0x7A55 0x7AF4 0x7C04 0x7C15 0x7BF5 \ - 0x81C1 0x857D 0x85A5 0x893A 0x8E51 0x9198 0x9381 0x936F \ - 0x9842 0x9937 0x9BA9 0x9BA7 0x9BAC 0x9B9C 0x9D3C 0x9D1C \ - 0x9D3A 0x9D32 0x9D34 0x9F3F 0x5EEB 0x61D5 0x6502 0x7012 \ - 0x7585 0x7654 0x7655 0x76A7 0x76A8 0x790F 0x7CE4 0x7CE5 \ - 0x7E65 0x7E4E 0x7F82 0x802D 0x85CA 0x85BC 0x8CFF 0x91A6 \ - 0x93B6 0x93AB 0x97A7 0x983E 0x9BBC 0x9BB7 0x9BBE 0x9D62 \ - 0x9E8F 0x9ECB 0x56A9 0x5913 0x5BF4 0x61EC 0x61EF 0x6AD6 \ - 0x7209 0x7379 0x74C6 0x77C3 0x791F 0x7A65 0x7AC6 0x7C3A \ - 0x7CEB 0x7F84 0x85E0 0x85F3 0x881E 0x89B4 0x89F9 0x8B44 \ - 0x8E71 0x8E6E 0x8E79 0x8EC4 0x908C 0x93C9 0x97B0 0x985A \ - 0x9946 0x9AC3 0x9B0F 0x9BF4 0x9BFA 0x9BDD 0x9BED 0x9BEF \ - 0x9E96 0x9EB3 0x9EE2 0x9F8F 0x56B1 0x5B41 0x6AF6 0x6AF2 \ - 0x7588 0x8267 0x860E 0x8D0E 0x91B6 0x942F 0x97E0 0x97DB \ - 0x9861 0x9A33 0x9C0F 0x9C11 0x9C03 0x9C01 0x9C16 0x9D93 \ - 0x535B 0x56BF 0x5DCE 0x76AC 0x77D2 0x7C52 0x8B76 0x8EC7 \ - 0x9434 0x943E 0x97BC 0x9B39 0x9C2A 0x9C26 0x9C27 0x9DC0 \ - 0x9DC9 0x9EEC 0x9F68 0x8032 0x8031 0x89FD 0x908E 0x97C2 \ - 0x9A4B 0x9B1C 0x9B1B 0x9C42 0x56D0 0x56CF 0x5DDA 0x66EA \ - 0x8B89 0x9458 0x9DE7 0x53D0 0x53F6 0x53F7 0x53F9 0x53F4 \ - 0x5724 0x5904 0x5918 0x5932 0x5930 0x5934 0x5975 0x5B82 \ - 0x5BF9 0x5C14 0x5E81 0x5E83 0x5F0D 0x5F52 0x5FCA 0x5FC7 \ - 0x6239 0x624F 0x65E7 0x672F 0x6B7A 0x6C39 0x6C37 0x6C44 \ - 0x6C45 0x738C 0x9093 0x9092 0x9DEA 0x9DF1 0x9F44 0x9F6D \ - 0x5DD9 0x883A 0x8975 0x9A5D 0x9C64 0x9E0A 0x9F73 0x77E1 \ - 0x9B2D 0x9E0C 0x9F1F 0x7C70 0x9479 0x974A 0x7E9D 0x9960 \ - 0x9F9E 0x9EF8 0x9F3A 0x9F7D 0x9F96 0x6729 0x5E07 0x5FCB \ - 0x52B7 0x52B8 0x52B6 0x52BA 0x6306 0x6B85 0x8C38 0x7309 -03 0x8A2F 0x52DC 0x5921 0x5E3F 0x7B3F 0x83D0 0x86E7 0x6117 \ - 0x8714 0x88D1 0x8CCB 0x8EED 0x52EC 0x52E8 0x7527 0x798C \ - 0x7991 0x8660 0x9904 0x999B 0x729F 0x8770 0x8E37 0x9703 \ - 0x52F6 0x64CC 0x764A 0x7AB9 0x7BD7 0x999F 0x9B8D 0x9E77 \ - 0x764B 0x76A2 0x87F1 0x9BBA 0x8804 0x9BD8 0x9D7C 0x7C46 \ - 0x9D8D 0x957E 0x9C20 0x9C22 0x9C1E 0x8970 0x9C43 0x9DE0 \ - 0x9459 0x9C72 0x6530 0x72DD 0x6804 0x82FF 0x8FEC 0x53DE \ - 0x5A30 0x5BB2 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0x4E21 0x4E20 0x4E22 0x4E68 0x4E89 0x4E98 0x4EF9 \ - 0x4EEF 0x4EF8 0x4F06 0x4F03 0x4EFC 0x4EEE 0x4F16 0x4F28 \ - 0x4F1C 0x4F07 0x4F1A 0x4EFA 0x4F17 0x514A 0x5172 0x51B4 \ - 0x51B3 0x51B2 0x51E8 0x5214 0x520F 0x5215 0x5218 0x52A8 \ - 0x534B 0x534F 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -04 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x5350 \ - 0x538B 0x53BE 0x53D2 0x5416 0x53FF 0x5400 0x5405 0x5413 \ - 0x5415 0x56E3 0x5735 0x5736 0x5731 0x5732 0x58EE 0x5905 \ - 0x4E54 0x5936 0x597A 0x5986 0x5B86 0x5F53 0x5C18 0x5C3D \ - 0x5C78 0x5C80 0x5E08 0x5EF5 0x5F0E 0x5FD3 0x5FDA 0x5FDB \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x620F 0x625D 0x625F \ - 0x6267 0x6257 0x9F50 0x65EB 0x65EA 0x6737 0x6732 0x6736 -05 0x6B22 0x6BCE 0x6C58 0x6C51 0x6C77 0x6C3C 0x6C5A 0x6C53 \ - 0x706F 0x7072 0x706E 0x7073 0x72B1 0x72B2 0x738F 0x793C \ - 0x808D 0x808E 0x827B 0x8D71 0x8FB9 0x9096 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x909A 0x4E24 0x4E71 0x4E9C 0x4F45 \ - 0x4F4A 0x4F39 0x4F37 0x4F32 0x4F42 0x4F44 0x4F4B 0x4F40 \ - 0x4F35 0x4F31 0x5151 0x5150 0x514E 0x519D 0x51B5 0x51B8 \ - 0x51EC 0x5223 0x5227 0x5226 0x521F 0x522B 0x5220 0x52B4 \ - 0x52B3 0x5325 0x533B 0x5374 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -06 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0x544D 0x543A 0x5444 0x544C 0x5423 0x541A 0x5432 \ - 0x544B 0x5421 0x5434 0x5449 0x5450 0x5422 0x543F 0x5451 \ - 0x545A 0x542F 0x56E9 0x56F2 0x56F3 0x56EF 0x56ED 0x56EC \ - 0x56E6 0x5748 0x5744 0x573F 0x573C 0x5753 0x5756 0x575F \ - 0x5743 0x5758 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -07 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x5757 \ - 0x5746 0x573D 0x5742 0x5754 0x5755 0x58F1 0x58F2 0x58F0 \ - 0x590B 0x9EA6 0x56F1 0x593D 0x5994 0x598C 0x599C 0x599F \ - 0x599B 0x5989 0x599A 0x6588 0x5B8D 0x5BFE 0x5BFF 0x5BFD \ - 0x5C2B 0x5C84 0x5C8E 0x5C9C 0x5C85 0x5DF5 0x5E09 0x5E0B \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x5E92 0x5E90 0x5F03 \ - 0x5F1E 0x5F63 0x5FE7 0x5FFE 0x5FE6 0x5FDC 0x5FCE 0x5FFC \ - 0x5FDF 0x5FEC 0x5FF6 0x5FF2 0x5FF0 0x5FF9 0x6213 0x623B -08 0x623C 0x6282 0x6278 0x628B 0x629E 0x62A5 0x629B 0x629C \ - 0x6299 0x628D 0x6285 0x629D 0x6275 0x65F6 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x66F5 0x675B 0x6754 0x6752 0x6758 \ - 0x6744 0x674A 0x6761 0x6C7F 0x6C91 0x6C9E 0x6C6E 0x6C7C \ - 0x6C9F 0x6C75 0x6C56 0x6CA2 0x6C79 0x6CA1 0x6CAA 0x6CA0 \ - 0x7079 0x7077 0x707E 0x7075 0x707B 0x7264 0x72BB 0x72BC \ - 0x72C7 0x72B9 0x72BE 0x72B6 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -09 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0x7398 0x7593 0x7680 0x7683 0x76C0 0x76C1 0x77F4 \ - 0x77F5 0x7ACC 0x7ACD 0x7CFA 0x809F 0x8091 0x8097 0x8094 \ - 0x8286 0x828C 0x8295 0x866C 0x8FBE 0x8FC7 0x8FC1 0x90A9 \ - 0x90A4 0x90A8 0x9627 0x9626 0x962B 0x9633 0x9634 0x9629 \ - 0x4E3D 0x4E9D 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -10 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x4F93 \ - 0x4F8A 0x4F6D 0x4F8E 0x4FA0 0x4FA2 0x4FA1 0x4F9F 0x4FA3 \ - 0x4F72 0x4F8C 0x5156 0x5190 0x51ED 0x51FE 0x522F 0x523C \ - 0x5234 0x5239 0x52B9 0x52B5 0x52BF 0x5355 0x5376 0x537A \ - 0x5393 0x53C1 0x53C2 0x53D5 0x5485 0x545F 0x5493 0x5489 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x8038 0x8081 \ - 0x8158 0x8A24 0x8DC3 0x51F2 0x55B6 0x5EC3 0x7861 0x7A01 \ - 0x8849 0x8999 0x921F 0x5313 0x55E0 0x6139 0x6ED7 0x733D \ - 0x9775 0x7FE4 0x8088 0x5655 0x617F 0x71D7 0x8666 0x8F3A \ - 0x933D 0x64F5 0x7F80 0x8D01 0x58E1 0x7CE9 0x81CB 0x95D9 \ - 0x6707 0x9A47 0x7674 0x5301 0x53FA 0x9F99 0x6C49 0x8FB7 \ - 0x4F29 0x534E 0x5C81 0x5F10 0x6268 0x6742 0x6740 0x51EA \ - 0x6C62 0x7391 0x8FBB 0x8FBC 0x56E8 0x575B 0x5C97 0x6762 \ - 0x62A4 0x6766 0x6CA3 0x707F 0x77F6 0x5479 0x9EFE 0x548F \ - 0x5469 0x546D 0x5494 0x546A 0x548A 0x56FD 0x56FB 0x56F8 \ - 0x56FC 0x56F6 0x5765 0x5781 0x5763 0x5767 0x576E 0x5778 \ - 0x577F 0x58F3 0x594B 0x594C 0x59AD 0x59C4 0x59C2 0x59B0 -11 0x59BF 0x59C9 0x59B8 0x59AC 0x59B7 0x59D7 0x8FC8 0x4FAB \ - 0x5C2D 0x549C 0x5788 0x62C3 0x6619 0x67A1 0x67A6 0x77FE \ - 0x7F57 0x82C5 0x8FDF 0x8FDC 0x4FE4 0x551B 0x57AA 0x57AB \ - 0x5BA9 0x6811 0x7551 0x7553 0x7818 0x7AD7 0x7C7E 0x867E \ - 0x5266 0x5520 0x5521 0x57D7 0x5BBE 0x6857 0x7F3C 0x8273 \ - 0x96BE 0x66FA 0x5A72 0x68BD 0x6E15 0x7413 0x74F8 0x7B3D \ - 0x76D8 0x79FC 0x7B39 0x7D4B 0x83B9 0x86CF 0x8EAE 0x96EB \ - 0x55B0 0x5840 0x5842 0x692B 0x6916 0x691B 0x6927 0x6BF5 \ - 0x6E82 0x6E7A 0x7129 0x7CAB 0x7CAC 0x83F7 0x9596 0x55F1 \ - 0x5F41 0x698A 0x698C 0x6980 0x697F 0x789C 0x7B7B 0x90D2 \ - 0x95A0 0x51A9 0x7195 0x7198 0x7478 0x78B9 0x7A33 0x7CC0 \ - 0x7CC1 0x8744 0x9064 0x9277 0x92AF 0x5E64 0x6A2B 0x6F46 \ - 0x6F9A 0x92F2 0x9B79 0x567A 0x5F5C 0x65D9 0x6A72 0x6A78 \ - 0x6B5A 0x8EBE 0x933B 0x9340 0x933A 0x9B96 0x71F5 0x7A50 \ - 0x9387 0x9385 0x9BB1 0x9D47 0x93B9 0x93BF 0x9BCF 0x9D64 \ - 0x9EBF 0x89B8 0x9BF3 0x7C4F 0x9425 0x95E6 0x9C2F 0x6B0C \ - 0x9C47 0x7936 0x6B15 0x53B5 0x4F66 0x4F68 0x4FE7 0x503F \ - 0x50A6 0x510F 0x523E 0x5324 0x5365 0x539B 0x517F 0x54CB \ - 0x5573 0x5571 0x556B 0x55F4 0x5622 0x5620 0x5692 0x56BA \ - 0x5691 0x56B0 0x5759 0x578A 0x580F 0x5812 0x5813 0x5847 \ - 0x589B 0x5900 0x594D 0x5B60 0x5B96 0x5B9E 0x5B94 0x5B9F \ - 0x5B9D 0x5C00 0x5C19 0x5C49 0x5C4A 0x5CBB 0x5CC1 0x5CB9 \ - 0x5C9E 0x5CB4 0x5CBA 0x5DF6 0x5E13 0x5E12 0x5E77 0x5E98 \ - 0x5E99 0x5E9D 0x5EF8 0x5EF9 0x5F06 0x5F21 0x5F25 0x5F55 \ - 0x5F84 0x5F83 0x6030 0x6007 0x5AD1 0x5AD3 0x5B67 0x5C57 \ - 0x5C77 0x5CD5 0x5D75 0x5D8E 0x5DA5 0x5DB6 0x5DBF 0x5E65 \ - 0x5ECD 0x5EED 0x5F94 0x5F9A 0x5FBA 0x6125 0x6150 0x62A3 \ - 0x6360 0x6364 0x63B6 0x6403 0x64B6 0x651A 0x7A25 0x5C21 \ - 0x66E2 0x6702 0x67A4 0x67AC 0x6810 0x6806 0x685E 0x685A \ - 0x692C 0x6929 0x6A2D 0x6A77 0x6A7A 0x6ACA 0x6AE6 0x6AF5 \ - 0x6B0D 0x6B0E 0x6BDC 0x6BDD 0x6BF6 0x6C1E 0x6C63 0x6DA5 \ - 0x6E0F 0x6E8A 0x6E84 0x6E8B 0x6E7C 0x6F4C 0x6F48 0x6F49 -12 0x6F9D 0x6F99 0x6FF8 0x702E 0x702D 0x705C 0x79CC 0x70BF \ - 0x70EA 0x70E5 0x7111 0x7112 0x713F 0x7139 0x713B 0x713D \ - 0x7177 0x7175 0x7176 0x7171 0x7196 0x7193 0x71B4 0x71DD \ - 0x71DE 0x720E 0x5911 0x7218 0x7347 0x7348 0x73EF 0x7412 \ - 0x743B 0x74A4 0x748D 0x74B4 0x7673 0x7677 0x76BC 0x7819 \ - 0x781B 0x783D 0x7853 0x7854 0x7858 0x78B7 0x78D8 0x78EE \ - 0x7922 0x794D 0x7986 0x7999 0x79A3 0x79BC 0x7AA7 0x7B37 \ - 0x7B59 0x7BD0 0x7C2F 0x7C32 0x7C42 0x7C4E 0x7C68 0x7CA9 \ - 0x7CED 0x7DD0 0x7E07 0x7DD3 0x7E64 0x7F40 0x8041 0x8063 \ - 0x80BB 0x6711 0x6725 0x8248 0x8310 0x8362 0x8312 0x8421 \ - 0x841E 0x84E2 0x84DE 0x84E1 0x8573 0x85D4 0x85F5 0x8637 \ - 0x8645 0x8672 0x874A 0x87A9 0x87A5 0x87F5 0x8834 0x8850 \ - 0x8887 0x6036 0x5FE9 0x603D 0x6008 0x62BA 0x62B2 0x62B7 \ - 0x62E4 0x62A7 0x62D5 0x62E1 0x62DD 0x62A6 0x62C1 0x62C5 \ - 0x62C0 0x62DF 0x62E0 0x62DE 0x6589 0x65A6 0x65BA 0x65FF \ - 0x6617 0x6618 0x6601 0x65FE 0x670C 0x676B 0x6796 0x6782 \ - 0x678A 0x67A3 0x8954 0x8984 0x8B03 0x8C52 0x8CD8 0x8D0C \ - 0x8D18 0x8DB0 0x8EBC 0x8ED5 0x8FAA 0x909C 0x915C 0x922B \ - 0x9221 0x9273 0x92F4 0x92F5 0x933F 0x9342 0x9386 0x93BE \ - 0x93BC 0x93BD 0x93F1 0x93F2 0x93EF 0x9422 0x9423 0x9424 \ - 0x9467 0x9466 0x9597 0x95CE 0x95E7 0x973B 0x974D 0x98E4 \ - 0x9942 0x9B1D 0x9B98 0x9D49 0x6449 0x5E71 0x5E85 0x61D3 \ - 0x990E 0x8002 0x781E 0x5528 0x5572 0x55BA 0x55F0 0x55EE \ - 0x56B8 0x56B9 0x56C4 0x8053 0x92B0 0x4E13 0x4E1A 0x4E1B \ - 0x4E1C 0x4E1D 0x4E25 0x4E27 0x4E2C 0x4E34 0x4E3A 0x4E3E \ - 0x4E4C 0x4E50 0x4E60 0x4E61 0x4E66 0x4E70 0x4E78 0x4E9A \ - 0x4EA7 0x4EA9 0x4EAA 0x4EB5 0x4EB8 0x4EBB 0x4EBF 0x4ED1 \ - 0x4ED3 0x4EEA 0x4EEB 0x4EEC 0x4F1E 0x4F1F 0x4F20 0x4F21 \ - 0x4F23 0x4F24 0x4F25 0x4F26 0x4F27 0x4F2A 0x4F2B 0x4F65 \ - 0x4FA5 0x4FA6 0x4FA7 0x4FA8 0x4FA9 0x4FAA 0x4FAC 0x4FE6 \ - 0x4FE8 0x4FEA 0x4FEB 0x4FED 0x503A 0x503D 0x503E 0x507E \ - 0x507F 0x50A4 0x50A5 0x50A7 0x50A8 0x50A9 0x5170 0x5174 -13 0x517B 0x517D 0x5181 0x519A 0x519B 0x519C 0x51A7 0x51AE \ - 0x51AF 0x51BB 0x51EB 0x51EF 0x51FB 0x51FC 0x51FF 0x520D \ - 0x5219 0x521A 0x521B 0x522C 0x522D 0x523F 0x5240 0x5242 \ - 0x5250 0x5251 0x528F 0x52A1 0x52A2 0x52B2 0x52CB 0x67A2 \ - 0x678F 0x67F9 0x6780 0x6B26 0x6B27 0x6B68 0x6B69 0x6B81 \ - 0x6BB4 0x6BD1 0x6C1C 0x6C97 0x6C6C 0x6CDF 0x6CEA 0x6CE4 \ - 0x6CD8 0x6CB2 0x6CCE 0x6CC8 0x708B 0x7088 0x7090 0x708F \ - 0x7087 0x7089 0x708D 0x7081 0x708C 0x7240 0x7265 0x7266 \ - 0x52DA 0x5326 0x532E 0x5356 0x5362 0x536B 0x5385 0x538C \ - 0x538D 0x5390 0x5395 0x53A2 0x53A3 0x53BF 0x53C6 0x53C7 \ - 0x53D1 0x53D8 0x53FE 0x5417 0x5452 0x5453 0x5456 0x5457 \ - 0x5458 0x5459 0x545B 0x545C 0x5497 0x5499 0x549B 0x549D \ - 0x54D1 0x54D2 0x54D3 0x54D4 0x54D5 0x54D7 0x54D9 0x54DC \ - 0x54DD 0x54DF 0x551D 0x551E 0x5522 0x5523 0x5524 0x5525 \ - 0x5567 0x556C 0x556D 0x556E 0x556F 0x5570 0x5574 0x5578 \ - 0x5579 0x55B7 0x55B9 0x55BC 0x55BE 0x55EB 0x55EC 0x55F3 \ - 0x55F5 0x5621 0x5623 0x5624 0x5625 0x565C 0x565D 0x567C \ - 0x56A1 0x56A3 0x56A4 0x56D6 0x56E2 0x56F4 0x56F5 0x56FE \ - 0x5706 0x5719 0x5739 0x573A 0x575A 0x575C 0x575D 0x575E \ - 0x5760 0x5784 0x5785 0x57AD 0x57AF 0x57B1 0x57B2 0x57D8 \ - 0x57D9 0x57DA 0x5811 0x5816 0x5846 0x5899 0x58B6 0x58CB \ - 0x58EA 0x58F6 0x58F8 0x5907 0x5939 0x593A 0x5941 0x5942 \ - 0x5956 0x5987 0x5988 0x59A9 0x59AA 0x59AB 0x5A05 0x5A06 \ - 0x5A07 0x5A08 0x5A32 0x5A34 0x5A74 0x5A76 0x5AAD 0x5AD2 \ - 0x5AD4 0x5AF1 0x5AF2 0x5B59 0x5B6D 0x5BA0 0x5BA1 0x5BAA \ - 0x5BBD 0x5BFB 0x5BFC 0x5C1C 0x5C1D 0x5C27 0x5C34 0x5C42 \ - 0x5C43 0x5C66 0x5C72 0x5C7F 0x5C82 0x5C83 0x5C96 0x5C98 \ - 0x5C99 0x5C9A 0x5C9B 0x5CBD 0x5CBF 0x7268 0x72CD 0x72D3 \ - 0x72DB 0x72CF 0x73A7 0x73A3 0x739E 0x73AF 0x73AA 0x739C \ - 0x7542 0x7544 0x753B 0x7541 0x759B 0x759E 0x79C4 0x79C3 \ - 0x79C6 0x79C7 0x79CA 0x7ACF 0x7C76 0x7C74 0x7CFF 0x7CFC \ - 0x7F59 0x80A8 0x80B0 0x80B3 0x80A4 0x80B6 0x5CC2 0x5CC3 -14 0x5CC4 0x5CE3 0x5CE4 0x5CE7 0x5D02 0x5D03 0x5D04 0x5D05 \ - 0x5D2D 0x5D58 0x5D5A 0x5D5D 0x5DC5 0x5DEF 0x5E05 0x5E0F \ - 0x5E10 0x5E1C 0x5E26 0x5E27 0x5E31 0x5E3B 0x5E3C 0x5E86 \ - 0x5E91 0x5E93 0x5E94 0x5E9E 0x5E9F 0x5EBC 0x5F20 0x5F2A \ - 0x5F5F 0x5F68 0x5F7B 0x5F95 0x6001 0x6002 0x6003 0x6004 \ - 0x6005 0x6006 0x603B 0x603C 0x603F 0x6076 0x6078 0x6079 \ - 0x607A 0x607B 0x607D 0x60AB 0x60AC 0x60AD 0x60AF 0x60EB \ - 0x60EC 0x60ED 0x60EF 0x6124 0x6126 0x6151 0x61D1 0x61D2 \ - 0x61D4 0x6206 0x620B 0x6217 0x6269 0x626A 0x626B 0x626C \ - 0x629F 0x62A0 0x62A1 0x62A2 0x62E2 0x62E3 0x62E6 0x62E7 \ - 0x62E8 0x62E9 0x631A 0x631C 0x631D 0x631E 0x6320 0x6322 \ - 0x6324 0x6325 0x6326 0x635E 0x635F 0x6361 0x6362 0x6363 \ - 0x63B3 0x63B7 0x63B8 0x63B9 0x63BC 0x63FB 0x63FC 0x63FD \ - 0x63FF 0x6400 0x6401 0x6402 0x6404 0x6405 0x6444 0x6445 \ - 0x6448 0x644A 0x6484 0x64B5 0x64B7 0x64B8 0x64BA 0x64DD \ - 0x64DE 0x6512 0x6569 0x6586 0x658F 0x6593 0x65A9 0x65F7 \ - 0x65F8 0x663D 0x663E 0x6653 0x6654 0x6655 0x6656 0x6682 \ - 0x66A7 0x6743 0x6767 0x6768 0x6769 0x67A5 0x67A7 0x67A8 \ - 0x67AA 0x67AB 0x67AD 0x67FD 0x6807 0x6808 0x6809 0x680A \ - 0x680B 0x680C 0x680E 0x80A7 0x80AC 0x80A6 0x5367 0x820E \ - 0x82C4 0x833E 0x829C 0x82AA 0x82C9 0x82A6 0x82B2 0x8FCC \ - 0x8FD9 0x8FCA 0x8FD8 0x8FCF 0x90B7 0x90AD 0x90B9 0x9637 \ - 0x9641 0x963E 0x9751 0x9763 0x4E57 0x4E79 0x4EB2 0x4EB0 \ - 0x4EAF 0x4EB1 0x4FD2 0x4FD5 0x680F 0x6860 0x6861 0x6862 \ - 0x6864 0x6865 0x6866 0x6868 0x6869 0x686A 0x68BE 0x68BF \ - 0x68C0 0x691D 0x691F 0x6920 0x6924 0x692D 0x6984 0x6987 \ - 0x6988 0x6989 0x69DA 0x69DB 0x69DC 0x69DF 0x69E0 0x6A2F \ - 0x6A31 0x6A79 0x6A7C 0x6AA9 0x6B7C 0x6B87 0x6B92 0x6B93 \ - 0x6B9A 0x6BC2 0x6BD5 0x6BD9 0x6C07 0x6C22 0x6C29 0x6C47 \ - 0x6C48 0x6C64 0x6CA4 0x6CA5 0x6CA6 0x6CA7 0x6CA8 0x6CA9 \ - 0x6CF6 0x6CF7 0x6CF8 0x6CFA 0x6CFB 0x6CFC 0x6CFD 0x6CFE \ - 0x6D46 0x6D47 0x6D48 0x6D49 0x6D4A 0x6D4B 0x6D4D 0x6D4E -15 0x6D4F 0x6D50 0x6D51 0x6D52 0x6D53 0x6D54 0x6D55 0x6D9D \ - 0x6D9F 0x6DA0 0x6DA1 0x6DA2 0x6DA3 0x6DA4 0x6DA6 0x6DA7 \ - 0x6DA8 0x6DA9 0x6E0D 0x6E0E 0x6E10 0x6E11 0x6E14 0x6E16 \ - 0x6E81 0x6E83 0x6E85 0x6E87 0x6EDF 0x6EE0 0x6EE1 0x6EE2 \ - 0x6EE4 0x6EE5 0x6EE7 0x6EEA 0x6F47 0x6F4B 0x6F4D 0x6F9B \ - 0x6F9C 0x6FD1 0x6FD2 0x704F 0x706D 0x7080 0x709C 0x709D \ - 0x709E 0x70BC 0x70BD 0x70C1 0x70C2 0x70C3 0x70E6 0x70E7 \ - 0x70E8 0x70E9 0x70EB 0x70EC 0x70ED 0x7115 0x7116 0x7118 \ - 0x7140 0x71F7 0x7231 0x7237 0x724D 0x7275 0x728A 0x72B7 \ - 0x72B8 0x72C8 0x72DE 0x72EE 0x72EF 0x72F0 0x72F1 0x72F2 \ - 0x7303 0x7321 0x736D 0x7399 0x739A 0x739B 0x73AE 0x73B0 \ - 0x73B1 0x4FBE 0x4FB8 0x4FB0 0x4FB1 0x4FC8 0x4FC6 0x4FCC \ - 0x4FE5 0x4FE3 0x4FB4 0x516A 0x519F 0x51C1 0x51C2 0x51C3 \ - 0x5245 0x5248 0x524F 0x52C5 0x52CA 0x52C4 0x5327 0x5358 \ - 0x537D 0x53DD 0x53DC 0x53DA 0x53D9 0x54B9 0x54D0 0x54B4 \ - 0x54CA 0x54A3 0x73D1 0x73F0 0x73F2 0x740E 0x740F 0x7410 \ - 0x7437 0x7477 0x748E 0x74D2 0x7519 0x7534 0x7535 0x7545 \ - 0x758D 0x7596 0x759F 0x75A0 0x75A1 0x75AC 0x75AD 0x75AE \ - 0x75AF 0x75C8 0x75C9 0x75D6 0x75E8 0x75EA 0x75EB 0x7605 \ - 0x7617 0x7618 0x762A 0x762B 0x763E 0x763F 0x765D 0x765E \ - 0x7663 0x7666 0x766B 0x7691 0x76B1 0x76B2 0x76CF 0x76D0 \ - 0x76D1 0x770D 0x772C 0x7750 0x7751 0x7786 0x7792 0x7793 \ - 0x77CB 0x77EB 0x77FF 0x7800 0x7801 0x7816 0x7817 0x781A \ - 0x781C 0x7839 0x783B 0x783E 0x7840 0x7841 0x7855 0x7856 \ - 0x7857 0x7859 0x785A 0x785B 0x7875 0x7877 0x789B 0x78D7 \ - 0x78D9 0x7903 0x7933 0x7943 0x794E 0x796F 0x7978 0x79EF \ - 0x79FE 0x7A06 0x7A23 0x7A51 0x7A52 0x7A5E 0x7A77 0x7A8D \ - 0x7A8E 0x7A9C 0x7A9D 0x7AA5 0x7AA6 0x7AAD 0x7AD6 0x7ADE \ - 0x7B03 0x7B15 0x7B3A 0x7B3C 0x7B3E 0x7B5A 0x7B5B 0x7B5C \ - 0x7B7C 0x7B7E 0x7B7F 0x7B80 0x7BA6 0x7BA7 0x7BA8 0x7BA9 \ - 0x7BAB 0x7BD1 0x7BD3 0x7BEE 0x7BEF 0x7C16 0x7C41 0x7CAA \ - 0x7CF9 0x7D27 0x7D77 0x7DD4 0x7E06 0x7E9F 0x7EA0 0x7EA1 -16 0x7EA2 0x7EA3 0x7EA4 0x7EA5 0x7EA6 0x7EA7 0x7EA8 0x7EA9 \ - 0x7EAA 0x7EAB 0x7EAC 0x7EAD 0x7EAE 0x7EAF 0x7EB0 0x7EB1 \ - 0x7EB2 0x7EB3 0x7EB4 0x7EB5 0x7EB6 0x7EB7 0x7EB8 0x54DA \ - 0x54A4 0x54B2 0x549E 0x549F 0x54B5 0x54CD 0x54CC 0x5700 \ - 0x57AC 0x5791 0x578E 0x578D 0x5792 0x57A1 0x5790 0x57A6 \ - 0x57A8 0x579C 0x5796 0x57A7 0x58F5 0x5909 0x5908 0x5952 \ - 0x59DF 0x59EB 0x59EF 0x59F0 0x59D5 0x5A0D 0x5A04 0x59F9 \ - 0x7EB9 0x7EBA 0x7EBB 0x7EBC 0x7EBD 0x7EBE 0x7EBF 0x7EC0 \ - 0x7EC1 0x7EC2 0x7EC3 0x7EC4 0x7EC5 0x7EC6 0x7EC7 0x7EC8 \ - 0x7EC9 0x7ECA 0x7ECB 0x7ECC 0x7ECD 0x7ECE 0x7ECF 0x7ED0 \ - 0x7ED1 0x7ED2 0x7ED3 0x7ED4 0x7ED5 0x7ED6 0x7ED7 0x7ED8 \ - 0x7ED9 0x7EDA 0x7EDB 0x7EDC 0x7EDD 0x7EDE 0x7EDF 0x7EE0 \ - 0x7EE1 0x7EE2 0x7EE3 0x7EE4 0x7EE5 0x7EE6 0x7EE7 0x7EE8 \ - 0x7EE9 0x7EEA 0x7EEB 0x7EEC 0x7EED 0x7EEE 0x7EEF 0x7EF0 \ - 0x7EF1 0x7EF2 0x7EF3 0x7EF4 0x7EF5 0x7EF6 0x7EF7 0x7EF8 \ - 0x7EF9 0x7EFA 0x7EFB 0x7EFC 0x7EFD 0x7EFE 0x7EFF 0x7F00 \ - 0x7F01 0x7F02 0x7F03 0x7F04 0x7F05 0x7F06 0x7F07 0x7F08 \ - 0x7F09 0x7F0A 0x7F0B 0x7F0C 0x7F0D 0x7F0E 0x7F0F 0x7F10 \ - 0x7F11 0x7F12 0x7F13 0x7F14 0x7F15 0x7F16 0x7F17 0x7F18 \ - 0x7F19 0x7F1A 0x7F1B 0x7F1C 0x7F1D 0x7F1E 0x7F1F 0x7F20 \ - 0x7F21 0x7F22 0x7F23 0x7F24 0x7F25 0x7F26 0x7F27 0x7F28 \ - 0x7F29 0x7F2A 0x7F2B 0x7F2C 0x7F2D 0x7F2E 0x7F2F 0x7F30 \ - 0x7F31 0x7F32 0x7F33 0x7F34 0x7F35 0x7F42 0x7F49 0x7F56 \ - 0x7F5A 0x7F74 0x7F81 0x7F9F 0x7FD8 0x7FD9 0x7FDA 0x8022 \ - 0x8027 0x8042 0x804B 0x804C 0x804D 0x8054 0x8069 0x8080 \ - 0x8083 0x80A0 0x80BC 0x80BD 0x80BE 0x80BF 0x80C0 0x80C1 \ - 0x80E7 0x80E8 0x80E9 0x80EA 0x80EB 0x5A02 0x59F8 0x59E2 \ - 0x59D9 0x59E7 0x5B6A 0x5BAB 0x5C1B 0x5C2F 0x663C 0x5CD1 \ - 0x5CDC 0x5CE6 0x5CE1 0x5CCD 0x5CE2 0x5CDD 0x5CE5 0x5DFB \ - 0x5DFA 0x5E1E 0x5EA1 0x5EFC 0x5EFB 0x5F2F 0x5F66 0x605C \ - 0x604E 0x6051 0x6023 0x6031 0x607C 0x6060 0x80EC 0x810C \ - 0x810D 0x810E 0x810F 0x8110 0x8111 0x8112 0x8113 0x8132 -17 0x8136 0x8137 0x8138 0x8156 0x8159 0x815A 0x817B 0x817C \ - 0x817E 0x8191 0x81A5 0x81B6 0x81DC 0x8206 0x8223 0x8230 \ - 0x8231 0x823B 0x823E 0x8254 0x8270 0x8282 0x8288 0x8297 \ - 0x82C7 0x82C8 0x82CB 0x82CC 0x82CD 0x82CE 0x82CF 0x830F \ - 0x8311 0x8313 0x8314 0x8315 0x8359 0x835A 0x835B 0x835C \ - 0x835D 0x835E 0x835F 0x8360 0x8361 0x8364 0x8365 0x8366 \ - 0x8367 0x8368 0x8369 0x836A 0x836B 0x836C 0x836D 0x836E \ - 0x836F 0x83B2 0x83B3 0x83B4 0x83B6 0x83B8 0x83BA 0x83BC \ - 0x841A 0x841C 0x841D 0x8424 0x8425 0x8426 0x8427 0x8428 \ - 0x8487 0x8489 0x848C 0x84DD 0x84DF 0x84E0 0x84E3 0x84E5 \ - 0x84E6 0x8537 0x8539 0x853A 0x853C 0x8572 0x8574 0x85D3 \ - 0x8614 0x864F 0x867F 0x8680 0x8681 0x8682 0x8683 0x86AC \ - 0x86F0 0x86F1 0x86F2 0x86F3 0x86F4 0x8717 0x8748 0x877E \ - 0x8780 0x87A8 0x87CF 0x8854 0x8865 0x886C 0x8885 0x8886 \ - 0x88AD 0x88AF 0x88C6 0x88C7 0x88C8 0x88E2 0x88E3 0x88E4 \ - 0x88E5 0x8934 0x8947 0x8955 0x8980 0x89C1 0x89C2 0x89C3 \ - 0x89C4 0x89C5 0x89C6 0x89C7 0x89C8 0x89C9 0x89CA 0x89CB \ - 0x89CC 0x89CD 0x89CE 0x89CF 0x89D0 0x89D1 0x89DE 0x89EF \ - 0x8A01 0x8A1A 0x8A5F 0x604A 0x6061 0x6218 0x631F 0x6317 \ - 0x62EA 0x6321 0x6304 0x6305 0x6531 0x6544 0x6540 0x6542 \ - 0x65BE 0x6629 0x661B 0x6623 0x662C 0x661A 0x6630 0x663B \ - 0x661E 0x6637 0x6638 0x670E 0x67E8 0x67D6 0x67C7 0x67BC \ - 0x6852 0x67BF 0x67D5 0x67FE 0x8A8A 0x8BA0 0x8BA1 0x8BA2 \ - 0x8BA3 0x8BA4 0x8BA5 0x8BA6 0x8BA7 0x8BA8 0x8BA9 0x8BAA \ - 0x8BAB 0x8BAC 0x8BAD 0x8BAE 0x8BAF 0x8BB0 0x8BB1 0x8BB2 \ - 0x8BB3 0x8BB4 0x8BB5 0x8BB6 0x8BB7 0x8BB8 0x8BB9 0x8BBA \ - 0x8BBB 0x8BBC 0x8BBD 0x8BBE 0x8BBF 0x8BC0 0x8BC1 0x8BC2 \ - 0x8BC3 0x8BC4 0x8BC5 0x8BC6 0x8BC7 0x8BC8 0x8BC9 0x8BCA \ - 0x8BCB 0x8BCC 0x8BCD 0x8BCE 0x8BCF 0x8BD0 0x8BD1 0x8BD2 \ - 0x8BD3 0x8BD4 0x8BD5 0x8BD6 0x8BD7 0x8BD8 0x8BD9 0x8BDA \ - 0x8BDB 0x8BDC 0x8BDD 0x8BDE 0x8BDF 0x8BE0 0x8BE1 0x8BE2 \ - 0x8BE3 0x8BE4 0x8BE5 0x8BE6 0x8BE7 0x8BE8 0x8BE9 0x8BEA -18 0x8BEB 0x8BEC 0x8BED 0x8BEE 0x8BEF 0x8BF0 0x8BF1 0x8BF2 \ - 0x8BF3 0x8BF4 0x8BF5 0x8BF6 0x8BF7 0x8BF8 0x8BF9 0x8BFA \ - 0x8BFB 0x8BFC 0x8BFD 0x8BFE 0x8BFF 0x8C00 0x8C01 0x8C02 \ - 0x8C03 0x8C04 0x8C05 0x8C06 0x8C07 0x8C08 0x8C09 0x8C0A \ - 0x8C0B 0x8C0C 0x8C0D 0x8C0E 0x8C0F 0x8C10 0x8C11 0x8C12 \ - 0x8C13 0x8C14 0x8C15 0x8C16 0x8C17 0x8C18 0x8C19 0x8C1A \ - 0x8C1B 0x8C1C 0x8C1D 0x8C1E 0x8C1F 0x8C20 0x8C21 0x8C22 \ - 0x8C23 0x8C24 0x8C25 0x8C26 0x8C27 0x8C28 0x8C29 0x8C2A \ - 0x8C2B 0x8C2C 0x8C2D 0x8C2E 0x8C2F 0x8C30 0x8C31 0x8C32 \ - 0x8C33 0x8C34 0x8C35 0x8C36 0x8C6E 0x8D1D 0x8D1E 0x8D1F \ - 0x8D20 0x8363 0x67FB 0x67B1 0x6801 0x6805 0x6800 0x67D7 \ - 0x6B2A 0x6B6B 0x6BE1 0x6D23 0x6CFF 0x6D14 0x6D05 0x6D13 \ - 0x6D06 0x6D21 0x6D15 0x6CAF 0x6CF4 0x6D02 0x6D45 0x6D26 \ - 0x6D44 0x6D24 0x70A5 0x70A3 0x70A2 0x70BB 0x70A0 0x70AA \ - 0x70A8 0x70B6 0x8D21 0x8D22 0x8D23 0x8D24 0x8D25 0x8D26 \ - 0x8D27 0x8D28 0x8D29 0x8D2A 0x8D2B 0x8D2C 0x8D2D 0x8D2E \ - 0x8D2F 0x8D30 0x8D31 0x8D32 0x8D33 0x8D34 0x8D35 0x8D36 \ - 0x8D37 0x8D38 0x8D39 0x8D3A 0x8D3B 0x8D3C 0x8D3D 0x8D3E \ - 0x8D3F 0x8D40 0x8D41 0x8D42 0x8D43 0x8D44 0x8D45 0x8D46 \ - 0x8D47 0x8D48 0x8D49 0x8D4A 0x8D4B 0x8D4C 0x8D4D 0x8D4E \ - 0x8D4F 0x8D50 0x8D51 0x8D52 0x8D53 0x8D54 0x8D55 0x8D56 \ - 0x8D57 0x8D58 0x8D59 0x8D5A 0x8D5B 0x8D5C 0x8D5D 0x8D5E \ - 0x8D5F 0x8D60 0x8D61 0x8D62 0x8D63 0x8D6A 0x8D75 0x8DB1 \ - 0x8DB8 0x8DC4 0x8DDE 0x8DF6 0x8DF7 0x8DF8 0x8DF9 0x8DFB \ - 0x8E0C 0x8E0E 0x8E2C 0x8E2D 0x8E2F 0x8E52 0x8E7E 0x8E7F \ - 0x8E80 0x8E8F 0x8E9C 0x8ECE 0x8F66 0x8F67 0x8F68 0x8F69 \ - 0x8F6A 0x8F6B 0x8F6C 0x8F6D 0x8F6E 0x8F6F 0x8F70 0x8F71 \ - 0x8F72 0x8F73 0x8F74 0x8F75 0x8F76 0x8F77 0x8F78 0x8F79 \ - 0x8F7A 0x8F7B 0x8F7C 0x8F7D 0x8F7E 0x8F7F 0x8F80 0x8F81 \ - 0x8F82 0x8F83 0x8F84 0x8F85 0x8F86 0x8F87 0x8F88 0x8F89 \ - 0x8F8A 0x8F8B 0x8F8C 0x8F8D 0x8F8E 0x8F8F 0x8F90 0x8F91 \ - 0x8F92 0x8F93 0x8F94 0x8F95 0x8F96 0x8F97 0x8F98 0x8F99 -19 0x8F9A 0x8FA9 0x8FAB 0x8FBD 0x8FDB 0x8FDD 0x8FDE 0x8FF3 \ - 0x900A 0x9026 0x9057 0x909D 0x90AC 0x90BA 0x90BB 0x70B2 \ - 0x70A7 0x70B9 0x722E 0x723C 0x726D 0x72E7 0x72ED 0x72EC \ - 0x72E5 0x72E2 0x73C4 0x73BD 0x73CF 0x73C9 0x73C1 0x73D0 \ - 0x73CE 0x74ED 0x74EB 0x74EF 0x7549 0x7550 0x7546 0x754A \ - 0x754D 0x75A6 0x75A8 0x76C7 0x76FF 0x76FD 0x77E6 0x780A \ - 0x90CF 0x90D0 0x90D1 0x90D3 0x90E6 0x90E7 0x90F8 0x9142 \ - 0x915D 0x915E 0x9166 0x9171 0x917D 0x917E 0x917F 0x91CA \ - 0x91D2 0x91FA 0x922A 0x9274 0x933E 0x9341 0x93F0 0x9426 \ - 0x9485 0x9486 0x9487 0x9488 0x9489 0x948A 0x948B 0x948C \ - 0x948D 0x948E 0x948F 0x9490 0x9491 0x9492 0x9493 0x9494 \ - 0x9495 0x9496 0x9497 0x9498 0x9499 0x949A 0x949B 0x949C \ - 0x949D 0x949E 0x949F 0x94A0 0x94A1 0x94A2 0x94A3 0x94A4 \ - 0x94A5 0x94A6 0x94A7 0x94A8 0x94A9 0x94AA 0x94AB 0x94AC \ - 0x94AD 0x94AE 0x94AF 0x94B0 0x94B1 0x94B2 0x94B3 0x94B4 \ - 0x94B5 0x94B6 0x94B7 0x94B8 0x94B9 0x94BA 0x94BB 0x94BC \ - 0x94BD 0x94BE 0x94BF 0x94C0 0x94C1 0x94C2 0x94C3 0x94C4 \ - 0x94C5 0x94C6 0x94C7 0x94C8 0x94C9 0x94CA 0x94CB 0x94CC \ - 0x94CD 0x94CE 0x94CF 0x94D0 0x94D1 0x94D2 0x94D3 0x94D4 \ - 0x94D5 0x94D6 0x94D7 0x94D8 0x94D9 0x94DA 0x94DB 0x94DC \ - 0x94DD 0x94DE 0x94DF 0x94E0 0x94E1 0x94E2 0x94E3 0x94E4 \ - 0x94E5 0x94E6 0x94E7 0x94E8 0x94E9 0x94EA 0x94EB 0x94EC \ - 0x94ED 0x94EE 0x94EF 0x94F0 0x94F1 0x94F2 0x94F3 0x94F4 \ - 0x94F5 0x94F6 0x94F7 0x94F8 0x94F9 0x94FA 0x94FB 0x94FC \ - 0x94FD 0x94FE 0x94FF 0x9500 0x9501 0x9502 0x9503 0x9504 \ - 0x9505 0x9506 0x9507 0x9508 0x9509 0x7804 0x780B 0x7807 \ - 0x7815 0x7808 0x79D3 0x79D4 0x79D0 0x79D7 0x7A7C 0x7A7D \ - 0x7A83 0x7A82 0x7AD4 0x7AD5 0x7AD3 0x7AD0 0x7AD2 0x7AFE \ - 0x7AFC 0x7C77 0x7C7C 0x7C7B 0x7F8F 0x80D3 0x80CB 0x80D2 \ - 0x8109 0x80E2 0x80DF 0x80C6 0x8224 0x82F7 0x950A 0x950B \ - 0x950C 0x950D 0x950E 0x950F 0x9510 0x9511 0x9512 0x9513 \ - 0x9514 0x9515 0x9516 0x9517 0x9518 0x9519 0x951A 0x951B -20 0x951C 0x951D 0x951E 0x951F 0x9520 0x9521 0x9522 0x9523 \ - 0x9524 0x9525 0x9526 0x9527 0x9528 0x9529 0x952A 0x952B \ - 0x952C 0x952D 0x952E 0x952F 0x9530 0x9531 0x9532 0x9533 \ - 0x9534 0x9535 0x9536 0x9537 0x9538 0x9539 0x953A 0x953B \ - 0x953C 0x953D 0x953E 0x953F 0x9540 0x9541 0x9542 0x9543 \ - 0x9544 0x9545 0x9546 0x9547 0x9548 0x9549 0x954A 0x954B \ - 0x954C 0x954D 0x954E 0x954F 0x9550 0x9551 0x9552 0x9553 \ - 0x9554 0x9555 0x9556 0x9557 0x9558 0x9559 0x955A 0x955B \ - 0x955C 0x955D 0x955E 0x955F 0x9560 0x9561 0x9562 0x9563 \ - 0x9564 0x9565 0x9566 0x9567 0x9568 0x9569 0x956A 0x956B \ - 0x956C 0x956D 0x956E 0x956F 0x9570 0x9571 0x9572 0x9573 \ - 0x9574 0x9575 0x9576 0x957F 0x95E8 0x95E9 0x95EA 0x95EB \ - 0x95EC 0x95ED 0x95EE 0x95EF 0x95F0 0x95F1 0x95F2 0x95F3 \ - 0x95F4 0x95F5 0x95F6 0x95F7 0x95F8 0x95F9 0x95FA 0x95FB \ - 0x95FC 0x95FD 0x95FE 0x95FF 0x9600 0x9601 0x9602 0x9603 \ - 0x9604 0x9605 0x9606 0x9607 0x9608 0x9609 0x960A 0x960B \ - 0x960C 0x960D 0x960E 0x960F 0x9610 0x9611 0x9612 0x9613 \ - 0x9614 0x9615 0x9616 0x82D8 0x82DD 0x82F8 0x82FC 0x82E9 \ - 0x82EE 0x82D0 0x830E 0x82E2 0x830B 0x82FD 0x5179 0x8676 \ - 0x8678 0x8675 0x867D 0x8842 0x8866 0x898C 0x8A05 0x8A06 \ - 0x8C9F 0x8FF1 0x8FE7 0x8FE9 0x8FEF 0x90C2 0x90BC 0x90C6 \ - 0x90C0 0x90CD 0x90C9 0x90C4 0x9617 0x9618 0x9619 0x961A \ - 0x961B 0x961F 0x9635 0x9636 0x9645 0x9646 0x9647 0x9648 \ - 0x9649 0x9667 0x9668 0x9669 0x9690 0x96E0 0x96F3 0x96FE \ - 0x9701 0x972D 0x9753 0x9754 0x9765 0x9791 0x9792 0x97AF \ - 0x97E6 0x97E7 0x97E8 0x97E9 0x97EA 0x97EB 0x97EC 0x9875 \ - 0x9876 0x9877 0x9878 0x9879 0x987A 0x987B 0x987C 0x987D \ - 0x987E 0x987F 0x9880 0x9881 0x9882 0x9883 0x9884 0x9885 \ - 0x9886 0x9887 0x9888 0x9889 0x988A 0x988B 0x988C 0x988D \ - 0x988E 0x988F 0x9890 0x9891 0x9892 0x9893 0x9894 0x9895 \ - 0x9896 0x9897 0x9898 0x9899 0x989A 0x989B 0x989C 0x989D \ - 0x989E 0x989F 0x98A0 0x98A1 0x98A2 0x98A3 0x98A4 0x98A5 -21 0x98A6 0x98A7 0x98CE 0x98CF 0x98D0 0x98D1 0x98D2 0x98D3 \ - 0x98D4 0x98D5 0x98D6 0x98D7 0x98D8 0x98D9 0x98DA 0x98DE \ - 0x98E0 0x98E8 0x990D 0x990F 0x9962 0x9963 0x9964 0x9965 \ - 0x9966 0x9967 0x9968 0x9969 0x996A 0x996B 0x996C 0x996D \ - 0x996E 0x996F 0x9970 0x9971 0x9972 0x9973 0x9974 0x9975 \ - 0x9976 0x9977 0x9978 0x9979 0x997A 0x997B 0x997C 0x997D \ - 0x997E 0x997F 0x9980 0x9981 0x9982 0x9983 0x9984 0x9985 \ - 0x9986 0x9987 0x9988 0x9989 0x998A 0x998B 0x998C 0x998D \ - 0x998E 0x998F 0x9990 0x9991 0x9992 0x9993 0x9994 0x9995 \ - 0x9A6C 0x9581 0x9CEC 0x5032 0x4FF9 0x501D 0x4FFF 0x5004 \ - 0x4FF0 0x5003 0x5002 0x4FFC 0x4FF2 0x5024 0x5008 0x5036 \ - 0x502E 0x5010 0x5038 0x5039 0x4FFD 0x5056 0x4FFB 0x51A3 \ - 0x51A6 0x51A1 0x51C7 0x51C9 0x5260 0x5264 0x5259 0x5265 \ - 0x5267 0x5257 0x9A6D 0x9A6E 0x9A6F 0x9A70 0x9A71 0x9A72 \ - 0x9A73 0x9A74 0x9A75 0x9A76 0x9A77 0x9A78 0x9A79 0x9A7A \ - 0x9A7B 0x9A7C 0x9A7D 0x9A7E 0x9A7F 0x9A80 0x9A81 0x9A82 \ - 0x9A83 0x9A84 0x9A85 0x9A86 0x9A87 0x9A88 0x9A89 0x9A8A \ - 0x9A8B 0x9A8C 0x9A8D 0x9A8E 0x9A8F 0x9A90 0x9A91 0x9A92 \ - 0x9A93 0x9A94 0x9A95 0x9A96 0x9A97 0x9A98 0x9A99 0x9A9A \ - 0x9A9B 0x9A9C 0x9A9D 0x9A9E 0x9A9F 0x9AA0 0x9AA1 0x9AA2 \ - 0x9AA3 0x9AA4 0x9AA5 0x9AA6 0x9AA7 0x9ACB 0x9ACC 0x9B13 \ - 0x9B47 0x9C7C 0x9C7D 0x9C7E 0x9C7F 0x9C80 0x9C81 0x9C82 \ - 0x9C83 0x9C84 0x9C85 0x9C86 0x9C87 0x9C88 0x9C89 0x9C8A \ - 0x9C8B 0x9C8C 0x9C8D 0x9C8E 0x9C8F 0x9C90 0x9C91 0x9C92 \ - 0x9C93 0x9C94 0x9C95 0x9C96 0x9C97 0x9C98 0x9C99 0x9C9A \ - 0x9C9B 0x9C9C 0x9C9D 0x9C9E 0x9C9F 0x9CA0 0x9CA1 0x9CA2 \ - 0x9CA3 0x9CA4 0x9CA5 0x9CA6 0x9CA7 0x9CA8 0x9CA9 0x9CAA \ - 0x9CAB 0x9CAC 0x9CAD 0x9CAE 0x9CAF 0x9CB0 0x9CB1 0x9CB2 \ - 0x9CB3 0x9CB4 0x9CB5 0x9CB6 0x9CB7 0x9CB8 0x9CB9 0x9CBA \ - 0x9CBB 0x9CBC 0x9CBD 0x9CBE 0x9CBF 0x9CC0 0x9CC1 0x9CC2 \ - 0x9CC3 0x9CC4 0x9CC5 0x9CC6 0x9CC7 0x9CC8 0x9CC9 0x9CCA \ - 0x9CCB 0x9CCC 0x9CCD 0x9CCE 0x9CCF 0x9CD0 0x9CD1 0x9CD2 -22 0x9CD3 0x9CD4 0x9CD5 0x9CD6 0x9CD7 0x9CD8 0x9CD9 0x5263 \ - 0x5253 0x52CF 0x52CE 0x52D0 0x52D1 0x52CC 0x550D 0x54F4 \ - 0x5513 0x54EF 0x54F5 0x54F9 0x5502 0x5500 0x5518 0x54F0 \ - 0x54F6 0x5519 0x5705 0x57C9 0x57B7 0x57CD 0x57BE 0x57BB \ - 0x57DB 0x57C8 0x57C4 0x57C5 0x57D1 0x57CA 0x57C0 0x5A21 \ - 0x9CDA 0x9CDB 0x9CDC 0x9CDD 0x9CDE 0x9CDF 0x9CE0 0x9CE1 \ - 0x9CE2 0x9CE3 0x9CE4 0x9E1F 0x9E20 0x9E21 0x9E22 0x9E23 \ - 0x9E24 0x9E25 0x9E26 0x9E27 0x9E28 0x9E29 0x9E2A 0x9E2B \ - 0x9E2C 0x9E2D 0x9E2E 0x9E2F 0x9E30 0x9E31 0x9E32 0x9E33 \ - 0x9E34 0x9E35 0x9E36 0x9E37 0x9E38 0x9E39 0x9E3A 0x9E3B \ - 0x9E3C 0x9E3D 0x9E3E 0x9E3F 0x9E40 0x9E41 0x9E42 0x9E43 \ - 0x9E44 0x9E45 0x9E46 0x9E47 0x9E48 0x9E49 0x9E4A 0x9E4B \ - 0x9E4C 0x9E4D 0x9E4E 0x9E4F 0x9E50 0x9E51 0x9E52 0x9E53 \ - 0x9E54 0x9E55 0x9E56 0x9E57 0x9E58 0x9E59 0x9E5A 0x9E5B \ - 0x9E5C 0x9E5D 0x9E5E 0x9E5F 0x9E60 0x9E61 0x9E62 0x9E63 \ - 0x9E64 0x9E65 0x9E66 0x9E67 0x9E68 0x9E69 0x9E6A 0x9E6B \ - 0x9E6C 0x9E6D 0x9E6E 0x9E6F 0x9E70 0x9E71 0x9E72 0x9E73 \ - 0x9E74 0x9E7E 0x9EC9 0x9EE1 0x9EE9 0x9EEA 0x9F0B 0x9F0C \ - 0x9F0D 0x9F51 0x9F7F 0x9F80 0x9F81 0x9F82 0x9F83 0x9F84 \ - 0x9F85 0x9F86 0x9F87 0x9F88 0x9F89 0x9F8A 0x9F8B 0x9F8C \ - 0x9F9A 0x9F9B 0x9F9F 0x4E06 0x4E37 0x4E44 0x4E4A 0x4E55 \ - 0x4E5B 0x4E64 0x4E65 0x4E67 0x4E6B 0x4E6C 0x4E6D 0x4E6E \ - 0x4E6F 0x4E72 0x4E76 0x4E77 0x4E7A 0x4E7B 0x4E7C 0x4E7D \ - 0x4E8A 0x4E90 0x4EBD 0x4ED2 0x4EED 0x4FA4 0x4FAD 0x503B \ - 0x50F2 0x516F 0x517A 0x51E6 0x51E7 0x5A2A 0x5A1D 0x5A0B \ - 0x5A22 0x5A24 0x5A14 0x5A31 0x5A2F 0x5A1A 0x5A12 0x5A26 \ - 0x5BBC 0x5BBB 0x5BB7 0x5C05 0x5C06 0x5C52 0x5C53 0x5CFA \ - 0x5CEB 0x5CF3 0x5CF5 0x5CE9 0x5CEF 0x5E2A 0x5E30 0x5E2E \ - 0x5E2C 0x5E2F 0x5EAF 0x5EA9 0x5EFD 0x5F32 0x51E9 0x5271 \ - 0x5302 0x5381 0x5391 0x53BC 0x5414 0x5455 0x54D8 0x54DB \ - 0x551C 0x551F 0x5569 0x55B8 0x55BD 0x55ED 0x561A 0x565B \ - 0x56A2 0x56CE 0x56D5 0x5726 0x5737 0x5738 0x5786 0x5789 -23 0x57B0 0x57B3 0x57D6 0x5815 0x5841 0x586E 0x5870 0x58B8 \ - 0x58B9 0x58CC 0x58D7 0x58E5 0x58ED 0x591E 0x593B 0x5B36 \ - 0x5B5E 0x5B91 0x5BC9 0x5C02 0x5C26 0x5C2E 0x5C32 0x5C76 \ - 0x5CBC 0x5CBE 0x5CC5 0x5CE0 0x5D2B 0x5D5C 0x5D76 0x5DEA \ - 0x5DEC 0x5DED 0x5DFC 0x5E49 0x5EE4 0x5F09 0x5F16 0x5F45 \ - 0x5FC6 0x603A 0x603E 0x6077 0x6184 0x61F4 0x6244 0x6255 \ - 0x6256 0x62E5 0x6318 0x6327 0x63B4 0x63B5 0x63BB 0x6442 \ - 0x655B 0x657D 0x657E 0x65C0 0x65D5 0x663F 0x6683 0x66FB \ - 0x66FD 0x6730 0x6741 0x6763 0x6764 0x67A0 0x67A9 0x6802 \ - 0x6803 0x680D 0x685B 0x685C 0x685D 0x685F 0x6863 0x6867 \ - 0x688D 0x68BA 0x68BB 0x68BC 0x68C2 0x6919 0x691A 0x6921 \ - 0x6922 0x6923 0x6926 0x6928 0x697E 0x6981 0x698B 0x69DD \ - 0x69DE 0x6A2E 0x6A30 0x6A73 0x6A74 0x6A75 0x6A7B 0x6AC9 \ - 0x6AE4 0x6AF7 0x6B05 0x6B1F 0x6BA9 0x6BB1 0x6BDF 0x6BEE \ - 0x6C0E 0x6C17 0x6C35 0x6C3A 0x6C3D 0x6D4C 0x6D9C 0x6D9E \ - 0x6E13 0x6E7F 0x6E8C 0x6EDE 0x6FF9 0x704E 0x7050 0x7114 \ - 0x713C 0x713E 0x7155 0x5F8E 0x5F93 0x5F8F 0x604F 0x6099 \ - 0x607E 0x6074 0x604B 0x6073 0x6075 0x6056 0x60A9 0x608B \ - 0x60A6 0x6093 0x60AE 0x609E 0x60A7 0x6245 0x632E 0x6352 \ - 0x6330 0x635B 0x6319 0x631B 0x6331 0x635D 0x6337 0x6335 \ - 0x6353 0x635C 0x633F 0x654B 0x7173 0x71F6 0x7233 0x725C \ - 0x72A0 0x731F 0x7320 0x7339 0x7363 0x7364 0x73F1 0x7411 \ - 0x748F 0x7491 0x74E7 0x74F0 0x74F1 0x74F2 0x74FC 0x7505 \ - 0x753C 0x7552 0x7560 0x7569 0x7573 0x7574 0x7582 0x7597 \ - 0x75E9 0x7604 0x7606 0x764D 0x767A 0x770C 0x77C8 0x783A \ - 0x783C 0x783F 0x7872 0x7873 0x7874 0x78B5 0x78B6 0x78F5 \ - 0x7916 0x7934 0x793B 0x7985 0x79F4 0x79FD 0x7A24 0x7A43 \ - 0x7A5D 0x7A63 0x7AC3 0x7B02 0x7B07 0x7B5D 0x7B7A 0x7B7D \ - 0x7B9A 0x7BAA 0x7BCF 0x7BD2 0x7C13 0x7C14 0x7C17 0x7C31 \ - 0x7C61 0x7C82 0x7C8F 0x7C90 0x7CAD 0x7CD8 0x7D26 0x7D9A \ - 0x7D9B 0x7DD5 0x7E05 0x7E28 0x7E4A 0x7E4B 0x7E67 0x7E83 \ - 0x7E90 0x7F53 0x7FAA 0x8062 0x810B 0x8133 0x8135 0x8157 -24 0x81A4 0x81D3 0x8217 0x822E 0x824D 0x825D 0x8260 0x827A \ - 0x82C6 0x83B1 0x83B5 0x83BB 0x8419 0x8420 0x8422 0x8485 \ - 0x848A 0x848B 0x84D9 0x84DC 0x8536 0x85AD 0x85AE 0x8612 \ - 0x8630 0x8644 0x86AB 0x86CD 0x86CE 0x86EF 0x8749 0x874B \ - 0x877F 0x87A6 0x87A7 0x87D0 0x8864 0x88AE 0x88B0 0x88C3 \ - 0x88C4 0x88C5 0x8904 0x891C 0x891D 0x8945 0x8968 0x8977 \ - 0x8A33 0x8A89 0x8AAD 0x8AAE 0x8ADA 0x8B21 0x8B5B 0x8B72 \ - 0x8B8F 0x8CCE 0x8DE5 0x8DF5 0x8E7D 0x8E9B 0x8EB5 0x8EBB \ - 0x8EC5 0x658B 0x659A 0x6650 0x6646 0x664E 0x6640 0x664B \ - 0x6648 0x6660 0x6644 0x664D 0x6837 0x6824 0x681B 0x6836 \ - 0x682C 0x6819 0x6856 0x6847 0x683E 0x681E 0x6815 0x6822 \ - 0x6827 0x6859 0x6858 0x6855 0x6830 0x6823 0x6B2E 0x6B2B \ - 0x6B30 0x6B6C 0x8EC8 0x8EE2 0x8EE3 0x8F0C 0x8F4C 0x8FBA \ - 0x8FDA 0x8FF2 0x9027 0x9039 0x9056 0x9065 0x915B 0x9197 \ - 0x91A4 0x91B8 0x91C8 0x91E1 0x91FB 0x91FC 0x9228 0x9229 \ - 0x922C 0x9271 0x9344 0x93BA 0x9421 0x9441 0x9453 0x958A \ - 0x95AA 0x95CF 0x9665 0x9666 0x967A 0x974C 0x974E 0x974F \ - 0x9771 0x9786 0x9790 0x982C 0x98AA 0x98B4 0x98C5 0x98EE \ - 0x99C5 0x99F2 0x9A12 0x9A13 0x9A28 0x9AC5 0x9B36 0x9B5E \ - 0x9B78 0x9B97 0x9BB2 0x9BB4 0x9BCE 0x9BD0 0x9BD1 0x9BF1 \ - 0x9BF2 0x9BF5 0x9C18 0x9C19 0x9C1A 0x9C30 0x9C5A 0x9C5B \ - 0x9C5C 0x9C69 0x9C6A 0x9C6B 0x9C70 0x9CF0 0x9D0E 0x9D2B \ - 0x9D2C 0x9D46 0x9D48 0x9D65 0x9D8E 0x9D8F 0x9DAB 0x9DC6 \ - 0x9E78 0x9EB8 0x9EB9 0x9EBA 0x9F21 0x9F62 0xFFFE 0xFFFE \ - 0x3000 0xFF0C 0x3001 0x3002 0xFF0E 0x2027 0xFF1B 0xFF1A \ - 0xFF1F 0xFF01 0xFE30 0x2026 0x2025 0xFE50 0xFE51 0xFE52 \ - 0x00B7 0xFE54 0xFE55 0xFE56 0xFE57 0xFF5C 0x2015 0xFE31 \ - 0x2014 0xFE33 0x2574 0xFE34 0xFE4F 0xFF08 0xFF09 0xFE35 \ - 0xFE36 0xFF5B 0xFF5D 0xFE37 0xFE38 0x3014 0x3015 0xFE39 \ - 0xFE3A 0x3010 0x3011 0xFE3B 0xFE3C 0x300A 0x300B 0xFE3D \ - 0xFE3E 0x3008 0x3009 0xFE3F 0xFE40 0x300C 0x300D 0xFE41 \ - 0xFE42 0x300E 0x300F 0xFE43 0xFE44 0xFE59 0xFE5A 0x6B8B -25 0x6BE9 0x6BEA 0x6BE5 0x6D6B 0x6D73 0x6D57 0x6D5D 0x6D56 \ - 0x6D8F 0x6D5B 0x6D1C 0x6D9A 0x6D9B 0x6D99 0x6D81 0x6D71 \ - 0x6D72 0x6D5C 0x6D96 0x70C4 0x70DB 0x70CC 0x70D0 0x70E3 \ - 0x70DF 0x70D6 0x70EE 0x70D5 0x727A 0x72F5 0x7302 0x73E2 \ - 0xFE5B 0xFE5C 0xFE5D 0xFE5E 0x2018 0x2019 0x201C 0x201D \ - 0x301D 0x301E 0x2035 0x2032 0xFF03 0xFF06 0xFF0A 0x203B \ - 0x00A7 0x3003 0x25CB 0x25CF 0x25B3 0x25B2 0x25CE 0x2606 \ - 0x2605 0x25C7 0x25C6 0x25A1 0x25A0 0x25BD 0x25BC 0x32A3 \ - 0x2105 0x203E 0xFFE3 0xFF3F 0x02CD 0xFE49 0xFE4A 0xFE4D \ - 0xFE4E 0xFE4B 0xFE4C 0xFE5F 0xFE60 0xFE61 0xFF0B 0xFF0D \ - 0x00D7 0x00F7 0x00B1 0x221A 0xFF1C 0xFF1E 0xFF1D 0x2266 \ - 0x2267 0x2260 0x221E 0x2252 0x2261 0xFE62 0xFE63 0xFE64 \ - 0xFE65 0xFE66 0xFF5E 0x2229 0x222A 0x22A5 0x2220 0x221F \ - 0x22BF 0x33D2 0x33D1 0x222B 0x222E 0x2235 0x2234 0x2640 \ - 0x2642 0x2295 0x2299 0x2191 0x2193 0x2190 0x2192 0x2196 \ - 0x2197 0x2199 0x2198 0x2225 0x2223 0xFF0F 0xFF3C 0x2215 \ - 0xFE68 0xFF04 0xFFE5 0x3012 0xFFE0 0xFFE1 0xFF05 0xFF20 \ - 0x2103 0x2109 0xFE69 0xFE6A 0xFE6B 0x33D5 0x339C 0x339D \ - 0x339E 0x33CE 0x33A1 0x338E 0x338F 0x33C4 0x00B0 0x5159 \ - 0x515B 0x515E 0x515D 0x5161 0x5163 0x55E7 0x74E9 0x7CCE \ - 0x2581 0x2582 0x2583 0x2584 0x2585 0x2586 0x2587 0x2588 \ - 0x258F 0x258E 0x258D 0x258C 0x258B 0x258A 0x2589 0x253C \ - 0x2534 0x252C 0x2524 0x251C 0x2594 0x2500 0x2502 0x2595 \ - 0x250C 0x2510 0x2514 0x2518 0x256D 0x73EC 0x73D5 0x73F9 \ - 0x73DF 0x73E6 0x73E4 0x73E1 0x74F3 0x7556 0x7555 0x7558 \ - 0x7557 0x755E 0x75C3 0x75B4 0x75B1 0x76CB 0x76CC 0x772A \ - 0x7716 0x770F 0x773F 0x772B 0x770E 0x7724 0x7721 0x7718 \ - 0x77DD 0x7824 0x7836 0x7958 0x7959 0x7962 0x256E 0x2570 \ - 0x256F 0x2501 0x251D 0x253F 0x2525 0x25E2 0x25E3 0x25E5 \ - 0x25E4 0x2571 0x2572 0x2573 0xFF10 0xFF11 0xFF12 0xFF13 \ - 0xFF14 0xFF15 0xFF16 0xFF17 0xFF18 0xFF19 0x2160 0x2161 \ - 0x2162 0x2163 0x2164 0x2165 0x2166 0x2167 0x2168 0x2169 -26 0x3021 0x3022 0x3023 0x3024 0x3025 0x3026 0x3027 0x3028 \ - 0x3029 0x5341 0x5344 0x5345 0xFF21 0xFF22 0xFF23 0xFF24 \ - 0xFF25 0xFF26 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C \ - 0xFF2D 0xFF2E 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 \ - 0xFF35 0xFF36 0xFF37 0xFF38 0xFF39 0xFF3A 0xFF41 0xFF42 \ - 0xFF43 0xFF44 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A \ - 0xFF4B 0xFF4C 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 \ - 0xFF53 0xFF54 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A \ - 0x0391 0x0392 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 \ - 0x0399 0x039A 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 \ - 0x03A1 0x03A3 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 \ - 0x03B1 0x03B2 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 \ - 0x03B9 0x03BA 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 \ - 0x03C1 0x03C3 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 \ - 0x3105 0x3106 0x3107 0x3108 0x3109 0x310A 0x310B 0x310C \ - 0x310D 0x310E 0x310F 0x79DA 0x79D9 0x79E1 0x79E5 0x79E8 \ - 0x79DB 0x79E2 0x79F0 0x7ADA 0x7ADD 0x7ADB 0x7ADC 0x7B0D \ - 0x7B0B 0x7B14 0x7C8E 0x7C86 0x7C87 0x7C83 0x7C8B 0x7D24 \ - 0x7D25 0x7F62 0x7F93 0x7F99 0x7F97 0x7FC4 0x7FC6 0x800A \ - 0x8040 0x803C 0x803B 0x80F6 0x3110 0x3111 0x3112 0x3113 \ - 0x3114 0x3115 0x3116 0x3117 0x3118 0x3119 0x311A 0x311B \ - 0x311C 0x311D 0x311E 0x311F 0x3120 0x3121 0x3122 0x3123 \ - 0x3124 0x3125 0x3126 0x3127 0x3128 0x3129 0x02D9 0x02C9 \ - 0x02CA 0x02C7 0x02CB 0x2400 0x2401 0x2402 0x2403 0x2404 \ - 0x2405 0x2406 0x2407 0x2408 0x2409 0x240A 0x240B 0x240C \ - 0x240D 0x240E 0x240F 0x2410 0x2411 0x2412 0x2413 0x2414 \ - 0x2415 0x2416 0x2417 0x2418 0x2419 0x241A 0x241B 0x241C \ - 0x241D 0x241E 0x241F 0x2421 0x532C 0x5359 0x5368 0x537E \ - 0x53A1 0x555B 0x5542 0x5547 0x553D 0x5560 0x57EB 0x595F \ - 0x5B6F 0x5C5A 0x5FA2 0x5F9D 0x5FA3 0x60C2 0x60A5 0x621C \ - 0x621D 0x6395 0x639A 0x63A6 0x6550 0x6552 0x65C8 0x6658 \ - 0x6888 0x6BB8 0x4E00 0x4E59 0x4E01 0x4E03 0x4E43 0x4E5D -27 0x4E86 0x4E8C 0x4EBA 0x513F 0x5165 0x516B 0x51E0 0x5200 \ - 0x5201 0x529B 0x5315 0x5341 0x535C 0x53C8 0x4E09 0x4E0B \ - 0x4E08 0x4E0A 0x4E2B 0x4E38 0x51E1 0x4E45 0x4E48 0x4E5F \ - 0x4E5E 0x4E8E 0x4EA1 0x5140 0x5203 0x52FA 0x5343 0x53C9 \ - 0x53E3 0x571F 0x58EB 0x5915 0x5927 0x5973 0x5B50 0x5B51 \ - 0x5B53 0x5BF8 0x5C0F 0x5C22 0x5C38 0x5C71 0x5DDD 0x5DE5 \ - 0x5DF1 0x5DF2 0x5DF3 0x5DFE 0x5E72 0x5EFE 0x5F0B 0x5F13 \ - 0x624D 0x80FF 0x80EE 0x8104 0x8103 0x8107 0x80F7 0x822D \ - 0x8227 0x8229 0x831F 0x8357 0x8321 0x8318 0x8358 0x8684 \ - 0x869F 0x869B 0x8689 0x86A6 0x8692 0x868F 0x86A0 0x884F \ - 0x8878 0x887A 0x886E 0x887B 0x8884 0x8873 0x8A0D 0x8A0B \ - 0x8A19 0x8ED0 0x4E11 0x4E10 0x4E0D 0x4E2D 0x4E30 0x4E39 \ - 0x4E4B 0x5C39 0x4E88 0x4E91 0x4E95 0x4E92 0x4E94 0x4EA2 \ - 0x4EC1 0x4EC0 0x4EC3 0x4EC6 0x4EC7 0x4ECD 0x4ECA 0x4ECB \ - 0x4EC4 0x5143 0x5141 0x5167 0x516D 0x516E 0x516C 0x5197 \ - 0x51F6 0x5206 0x5207 0x5208 0x52FB 0x52FE 0x52FF 0x5316 \ - 0x5339 0x5348 0x5347 0x5345 0x535E 0x5384 0x53CB 0x53CA \ - 0x53CD 0x58EC 0x5929 0x592B 0x592A 0x592D 0x5B54 0x5C11 \ - 0x5C24 0x5C3A 0x5C6F 0x5DF4 0x5E7B 0x5EFF 0x5F14 0x5F15 \ - 0x5FC3 0x6208 0x6236 0x624B 0x624E 0x652F 0x6587 0x6597 \ - 0x65A4 0x65B9 0x65E5 0x66F0 0x6708 0x6728 0x6B20 0x6B62 \ - 0x6B79 0x6BCB 0x6BD4 0x6BDB 0x6C0F 0x6C34 0x706B 0x722A \ - 0x7236 0x723B 0x7247 0x7259 0x725B 0x72AC 0x738B 0x4E19 \ - 0x4E16 0x4E15 0x4E14 0x4E18 0x4E3B 0x4E4D 0x4E4F 0x4E4E \ - 0x4EE5 0x4ED8 0x4ED4 0x4ED5 0x4ED6 0x4ED7 0x4EE3 0x4EE4 \ - 0x4ED9 0x4EDE 0x5145 0x5144 0x5189 0x518A 0x51AC 0x51F9 \ - 0x51FA 0x51F8 0x520A 0x52A0 0x529F 0x5305 0x5306 0x5317 \ - 0x531D 0x4EDF 0x534A 0x5349 0x5361 0x5360 0x536F 0x536E \ - 0x53BB 0x53EF 0x53E4 0x53F3 0x53EC 0x53EE 0x53E9 0x53E8 \ - 0x53FC 0x53F8 0x53F5 0x53EB 0x53E6 0x53EA 0x53F2 0x53F1 \ - 0x53F0 0x53E5 0x53ED 0x53FB 0x56DB 0x56DA 0x5916 0x8FF9 \ - 0x9009 0x9008 0x90DE 0x9151 0x91DB 0x91DF 0x91DE 0x91D6 -28 0x91E0 0x9585 0x9660 0x9659 0x9656 0x96BD 0x5042 0x5059 \ - 0x5044 0x5066 0x5052 0x5054 0x5071 0x5050 0x507B 0x507C \ - 0x5058 0x5079 0x506C 0x5078 0x51A8 0x51D1 0x51CF 0x5268 \ - 0x592E 0x5931 0x5974 0x5976 0x5B55 0x5B83 0x5C3C 0x5DE8 \ - 0x5DE7 0x5DE6 0x5E02 0x5E03 0x5E73 0x5E7C 0x5F01 0x5F18 \ - 0x5F17 0x5FC5 0x620A 0x6253 0x6254 0x6252 0x6251 0x65A5 \ - 0x65E6 0x672E 0x672C 0x672A 0x672B 0x672D 0x6B63 0x6BCD \ - 0x6C11 0x6C10 0x6C38 0x6C41 0x6C40 0x6C3E 0x72AF 0x7384 \ - 0x7389 0x74DC 0x74E6 0x7518 0x751F 0x7528 0x7529 0x7530 \ - 0x7531 0x7532 0x7533 0x758B 0x767D 0x76AE 0x76BF 0x76EE \ - 0x77DB 0x77E2 0x77F3 0x793A 0x79BE 0x7A74 0x7ACB 0x4E1E \ - 0x4E1F 0x4E52 0x4E53 0x4E69 0x4E99 0x4EA4 0x4EA6 0x4EA5 \ - 0x4EFF 0x4F09 0x4F19 0x4F0A 0x4F15 0x4F0D 0x4F10 0x4F11 \ - 0x4F0F 0x4EF2 0x4EF6 0x4EFB 0x4EF0 0x4EF3 0x4EFD 0x4F01 \ - 0x4F0B 0x5149 0x5147 0x5146 0x5148 0x5168 0x5171 0x518D \ - 0x51B0 0x5217 0x5211 0x5212 0x520E 0x5216 0x52A3 0x5308 \ - 0x5321 0x5320 0x5370 0x5371 0x5409 0x540F 0x540C 0x540A \ - 0x5410 0x5401 0x540B 0x5404 0x5411 0x540D 0x5408 0x5403 \ - 0x540E 0x5406 0x5412 0x56E0 0x56DE 0x56DD 0x5733 0x5730 \ - 0x5728 0x572D 0x572C 0x572F 0x5729 0x5919 0x591A 0x5937 \ - 0x5938 0x5984 0x5978 0x5983 0x597D 0x5979 0x5982 0x5981 \ - 0x5B57 0x5B58 0x5B87 0x5B88 0x5B85 0x5B89 0x5BFA 0x5C16 \ - 0x5C79 0x5DDE 0x5E06 0x5E76 0x5E74 0x5276 0x52D4 0x53A0 \ - 0x53C4 0x5558 0x554C 0x5568 0x5549 0x555D 0x5529 0x5554 \ - 0x5553 0x555A 0x553A 0x553F 0x552B 0x57EA 0x57EF 0x57DD \ - 0x57FE 0x57DE 0x57E6 0x57E8 0x57FF 0x5803 0x58F7 0x68A6 \ - 0x591F 0x595B 0x595D 0x595E 0x5A2B 0x5A3B 0x5F0F 0x5F1B \ - 0x5FD9 0x5FD6 0x620E 0x620C 0x620D 0x6210 0x6263 0x625B \ - 0x6258 0x6536 0x65E9 0x65E8 0x65EC 0x65ED 0x66F2 0x66F3 \ - 0x6709 0x673D 0x6734 0x6731 0x6735 0x6B21 0x6B64 0x6B7B \ - 0x6C16 0x6C5D 0x6C57 0x6C59 0x6C5F 0x6C60 0x6C50 0x6C55 \ - 0x6C61 0x6C5B 0x6C4D 0x6C4E 0x7070 0x725F 0x725D 0x767E -29 0x7AF9 0x7C73 0x7CF8 0x7F36 0x7F8A 0x7FBD 0x8001 0x8003 \ - 0x800C 0x8012 0x8033 0x807F 0x8089 0x808B 0x808C 0x81E3 \ - 0x81EA 0x81F3 0x81FC 0x820C 0x821B 0x821F 0x826E 0x8272 \ - 0x827E 0x866B 0x8840 0x884C 0x8863 0x897F 0x9621 0x4E32 \ - 0x4EA8 0x4F4D 0x4F4F 0x4F47 0x4F57 0x4F5E 0x4F34 0x4F5B \ - 0x4F55 0x4F30 0x4F50 0x4F51 0x4F3D 0x4F3A 0x4F38 0x4F43 \ - 0x4F54 0x4F3C 0x4F46 0x4F63 0x4F5C 0x4F60 0x4F2F 0x4F4E \ - 0x4F36 0x4F59 0x4F5D 0x4F48 0x4F5A 0x514C 0x514B 0x514D \ - 0x5175 0x51B6 0x51B7 0x5225 0x5224 0x5229 0x522A 0x5228 \ - 0x52AB 0x52A9 0x52AA 0x52AC 0x5323 0x5373 0x5375 0x541D \ - 0x542D 0x541E 0x543E 0x5426 0x544E 0x5427 0x5446 0x5443 \ - 0x5433 0x5448 0x5442 0x541B 0x5429 0x544A 0x5439 0x543B \ - 0x5438 0x542E 0x5435 0x5436 0x5420 0x543C 0x5440 0x5431 \ - 0x542B 0x541F 0x542C 0x56EA 0x56F0 0x56E4 0x56EB 0x574A \ - 0x5751 0x5740 0x574D 0x5A61 0x5A3A 0x5A6E 0x5A4B 0x5A6B \ - 0x5A45 0x5A4E 0x5A68 0x5A3D 0x5A71 0x5A3F 0x5A6F 0x5A75 \ - 0x5A73 0x5A2C 0x5A59 0x5A54 0x5A4F 0x5A63 0x5BC8 0x5BC3 \ - 0x5C5B 0x5C61 0x5D21 0x5D0A 0x5D09 0x5D2C 0x5D08 0x5D2A \ - 0x5D15 0x5D10 0x5D13 0x5D2F 0x5747 0x574E 0x573E 0x5750 \ - 0x574F 0x573B 0x58EF 0x593E 0x599D 0x5992 0x59A8 0x599E \ - 0x59A3 0x5999 0x5996 0x598D 0x59A4 0x5993 0x598A 0x59A5 \ - 0x5B5D 0x5B5C 0x5B5A 0x5B5B 0x5B8C 0x5B8B 0x5B8F 0x5C2C \ - 0x5C40 0x5C41 0x5C3F 0x5C3E 0x5C90 0x5C91 0x5C94 0x5C8C \ - 0x5DEB 0x5E0C 0x5E8F 0x5E87 0x5E8A 0x5EF7 0x5F04 0x5F1F \ - 0x5F64 0x5F62 0x5F77 0x5F79 0x5FD8 0x5FCC 0x5FD7 0x5FCD \ - 0x5FF1 0x5FEB 0x5FF8 0x5FEA 0x6212 0x6211 0x6284 0x6297 \ - 0x6296 0x6280 0x6276 0x6289 0x626D 0x628A 0x627C 0x627E \ - 0x6279 0x6273 0x6292 0x626F 0x6298 0x626E 0x6295 0x6293 \ - 0x6291 0x6286 0x6539 0x653B 0x6538 0x65F1 0x66F4 0x675F \ - 0x674E 0x674F 0x6750 0x6751 0x675C 0x6756 0x675E 0x6749 \ - 0x6746 0x6760 0x6753 0x6757 0x6B65 0x6BCF 0x6C42 0x6C5E \ - 0x6C99 0x6C81 0x6C88 0x6C89 0x6C85 0x6C9B 0x6C6A 0x6C7A -30 0x6C90 0x6C70 0x6C8C 0x6C68 0x6C96 0x6C92 0x6C7D 0x6C83 \ - 0x6C72 0x6C7E 0x6C74 0x6C86 0x6C76 0x6C8D 0x6C94 0x6C98 \ - 0x6C82 0x7076 0x707C 0x707D 0x7078 0x7262 0x7261 0x7260 \ - 0x72C4 0x72C2 0x7396 0x752C 0x752B 0x7537 0x7538 0x7682 \ - 0x76EF 0x77E3 0x79C1 0x79C0 0x79BF 0x7A76 0x7CFB 0x7F55 \ - 0x8096 0x8093 0x809D 0x8098 0x809B 0x809A 0x80B2 0x826F \ - 0x8292 0x5D18 0x5DE3 0x5E39 0x5E35 0x5E3A 0x5E32 0x5EBB \ - 0x5EBA 0x5F34 0x5F39 0x6098 0x60D0 0x60D7 0x60AA 0x60A1 \ - 0x60A4 0x60EE 0x60E7 0x60E8 0x60DE 0x637E 0x638B 0x6379 \ - 0x6386 0x6393 0x6373 0x636A 0x636C 0x637F 0x63B2 0x63BA \ - 0x6366 0x6374 0x828B 0x828D 0x898B 0x89D2 0x8A00 0x8C37 \ - 0x8C46 0x8C55 0x8C9D 0x8D64 0x8D70 0x8DB3 0x8EAB 0x8ECA \ - 0x8F9B 0x8FB0 0x8FC2 0x8FC6 0x8FC5 0x8FC4 0x5DE1 0x9091 \ - 0x90A2 0x90AA 0x90A6 0x90A3 0x9149 0x91C6 0x91CC 0x9632 \ - 0x962E 0x9631 0x962A 0x962C 0x4E26 0x4E56 0x4E73 0x4E8B \ - 0x4E9B 0x4E9E 0x4EAB 0x4EAC 0x4F6F 0x4F9D 0x4F8D 0x4F73 \ - 0x4F7F 0x4F6C 0x4F9B 0x4F8B 0x4F86 0x4F83 0x4F70 0x4F75 \ - 0x4F88 0x4F69 0x4F7B 0x4F96 0x4F7E 0x4F8F 0x4F91 0x4F7A \ - 0x5154 0x5152 0x5155 0x5169 0x5177 0x5176 0x5178 0x51BD \ - 0x51FD 0x523B 0x5238 0x5237 0x523A 0x5230 0x522E 0x5236 \ - 0x5241 0x52BE 0x52BB 0x5352 0x5354 0x5353 0x5351 0x5366 \ - 0x5377 0x5378 0x5379 0x53D6 0x53D4 0x53D7 0x5473 0x5475 \ - 0x5496 0x5478 0x5495 0x5480 0x547B 0x5477 0x5484 0x5492 \ - 0x5486 0x547C 0x5490 0x5471 0x5476 0x548C 0x549A 0x5462 \ - 0x5468 0x548B 0x547D 0x548E 0x56FA 0x5783 0x5777 0x576A \ - 0x5769 0x5761 0x5766 0x5764 0x577C 0x591C 0x5949 0x5947 \ - 0x5948 0x5944 0x5954 0x59BE 0x59BB 0x59D4 0x59B9 0x59AE \ - 0x59D1 0x59C6 0x59D0 0x59CD 0x59CB 0x59D3 0x59CA 0x59AF \ - 0x59B3 0x59D2 0x59C5 0x5B5F 0x5B64 0x5B63 0x5B97 0x5B9A \ - 0x5B98 0x5B9C 0x5B99 0x5B9B 0x5C1A 0x5C48 0x5C45 0x655A \ - 0x654E 0x654D 0x658D 0x658E 0x65AD 0x65C7 0x65CA 0x65C9 \ - 0x65E3 0x6657 0x6663 0x6667 0x671A 0x6719 0x6716 0x689E -31 0x68B6 0x6898 0x6873 0x689A 0x688E 0x68B7 0x68DB 0x68A5 \ - 0x686C 0x68C1 0x6884 0x6895 0x687A 0x6899 0x68B8 0x68B9 \ - 0x5C46 0x5CB7 0x5CA1 0x5CB8 0x5CA9 0x5CAB 0x5CB1 0x5CB3 \ - 0x5E18 0x5E1A 0x5E16 0x5E15 0x5E1B 0x5E11 0x5E78 0x5E9A \ - 0x5E97 0x5E9C 0x5E95 0x5E96 0x5EF6 0x5F26 0x5F27 0x5F29 \ - 0x5F80 0x5F81 0x5F7F 0x5F7C 0x5FDD 0x5FE0 0x5FFD 0x5FF5 \ - 0x5FFF 0x600F 0x6014 0x602F 0x6035 0x6016 0x602A 0x6015 \ - 0x6021 0x6027 0x6029 0x602B 0x601B 0x6216 0x6215 0x623F \ - 0x623E 0x6240 0x627F 0x62C9 0x62CC 0x62C4 0x62BF 0x62C2 \ - 0x62B9 0x62D2 0x62DB 0x62AB 0x62D3 0x62D4 0x62CB 0x62C8 \ - 0x62A8 0x62BD 0x62BC 0x62D0 0x62D9 0x62C7 0x62CD 0x62B5 \ - 0x62DA 0x62B1 0x62D8 0x62D6 0x62D7 0x62C6 0x62AC 0x62CE \ - 0x653E 0x65A7 0x65BC 0x65FA 0x6614 0x6613 0x660C 0x6606 \ - 0x6602 0x660E 0x6600 0x660F 0x6615 0x660A 0x6607 0x670D \ - 0x670B 0x676D 0x678B 0x6795 0x6771 0x679C 0x6773 0x6777 \ - 0x6787 0x679D 0x6797 0x676F 0x6770 0x677F 0x6789 0x677E \ - 0x6790 0x6775 0x679A 0x6793 0x677C 0x676A 0x6772 0x6B23 \ - 0x6B66 0x6B67 0x6B7F 0x6C13 0x6C1B 0x6CE3 0x6CE8 0x6CF3 \ - 0x6CB1 0x6CCC 0x6CE5 0x6CB3 0x6CBD 0x6CBE 0x6CBC 0x6CE2 \ - 0x6CAB 0x6CD5 0x6CD3 0x6CB8 0x6CC4 0x6CB9 0x6CC1 0x6CAE \ - 0x6CD7 0x6CC5 0x6CF1 0x6CBF 0x6CBB 0x6CE1 0x6CDB 0x6CCA \ - 0x6CAC 0x6CEF 0x6CDC 0x6CD6 0x6CE0 0x6870 0x6B35 0x6B90 \ - 0x6BBB 0x6BED 0x6DC1 0x6DC3 0x6DCE 0x6DAD 0x6E04 0x6DB9 \ - 0x6DE7 0x6E08 0x6E06 0x6E0A 0x6DB0 0x6DF8 0x6E0C 0x6DB1 \ - 0x6E02 0x6E07 0x6E09 0x6E01 0x6E17 0x6DFF 0x6E12 0x7103 \ - 0x7107 0x7101 0x70F5 0x70F1 0x7108 0x70F2 0x7095 0x708E \ - 0x7092 0x708A 0x7099 0x722C 0x722D 0x7238 0x7248 0x7267 \ - 0x7269 0x72C0 0x72CE 0x72D9 0x72D7 0x72D0 0x73A9 0x73A8 \ - 0x739F 0x73AB 0x73A5 0x753D 0x759D 0x7599 0x759A 0x7684 \ - 0x76C2 0x76F2 0x76F4 0x77E5 0x77FD 0x793E 0x7940 0x7941 \ - 0x79C9 0x79C8 0x7A7A 0x7A79 0x7AFA 0x7CFE 0x7F54 0x7F8C \ - 0x7F8B 0x8005 0x80BA 0x80A5 0x80A2 0x80B1 0x80A1 0x80AB -32 0x80A9 0x80B4 0x80AA 0x80AF 0x81E5 0x81FE 0x820D 0x82B3 \ - 0x829D 0x8299 0x82AD 0x82BD 0x829F 0x82B9 0x82B1 0x82AC \ - 0x82A5 0x82AF 0x82B8 0x82A3 0x82B0 0x82BE 0x82B7 0x864E \ - 0x8671 0x521D 0x8868 0x8ECB 0x8FCE 0x8FD4 0x8FD1 0x90B5 \ - 0x90B8 0x90B1 0x90B6 0x91C7 0x91D1 0x9577 0x9580 0x961C \ - 0x9640 0x963F 0x963B 0x9644 0x9642 0x96B9 0x96E8 0x9752 \ - 0x975E 0x4E9F 0x4EAD 0x4EAE 0x4FE1 0x4FB5 0x4FAF 0x4FBF \ - 0x4FE0 0x4FD1 0x4FCF 0x4FDD 0x4FC3 0x4FB6 0x4FD8 0x4FDF \ - 0x4FCA 0x4FD7 0x4FAE 0x4FD0 0x4FC4 0x4FC2 0x4FDA 0x4FCE \ - 0x4FDE 0x4FB7 0x5157 0x5192 0x5191 0x51A0 0x524E 0x5243 \ - 0x524A 0x524D 0x524C 0x524B 0x5247 0x52C7 0x52C9 0x52C3 \ - 0x52C1 0x530D 0x5357 0x537B 0x539A 0x53DB 0x54AC 0x54C0 \ - 0x54A8 0x54CE 0x54C9 0x54B8 0x54A6 0x54B3 0x54C7 0x54C2 \ - 0x54BD 0x54AA 0x54C1 0x710F 0x70FE 0x731A 0x7310 0x730E \ - 0x7402 0x73F3 0x73FB 0x751B 0x7523 0x7561 0x7568 0x7567 \ - 0x75D3 0x7690 0x76D5 0x76D7 0x76D6 0x7730 0x7726 0x7740 \ - 0x771E 0x7847 0x784B 0x7851 0x784F 0x7842 0x7846 0x796E \ - 0x796C 0x79F2 0x79F1 0x79F5 0x54C4 0x54C8 0x54AF 0x54AB \ - 0x54B1 0x54BB 0x54A9 0x54A7 0x54BF 0x56FF 0x5782 0x578B \ - 0x57A0 0x57A3 0x57A2 0x57CE 0x57AE 0x5793 0x5955 0x5951 \ - 0x594F 0x594E 0x5950 0x59DC 0x59D8 0x59FF 0x59E3 0x59E8 \ - 0x5A03 0x59E5 0x59EA 0x59DA 0x59E6 0x5A01 0x59FB 0x5B69 \ - 0x5BA3 0x5BA6 0x5BA4 0x5BA2 0x5BA5 0x5C01 0x5C4E 0x5C4F \ - 0x5C4D 0x5C4B 0x5CD9 0x5CD2 0x5DF7 0x5E1D 0x5E25 0x5E1F \ - 0x5E7D 0x5EA0 0x5EA6 0x5EFA 0x5F08 0x5F2D 0x5F65 0x5F88 \ - 0x5F85 0x5F8A 0x5F8B 0x5F87 0x5F8C 0x5F89 0x6012 0x601D \ - 0x6020 0x6025 0x600E 0x6028 0x604D 0x6070 0x6068 0x6062 \ - 0x6046 0x6043 0x606C 0x606B 0x606A 0x6064 0x6241 0x62DC \ - 0x6316 0x6309 0x62FC 0x62ED 0x6301 0x62EE 0x62FD 0x6307 \ - 0x62F1 0x62F7 0x62EF 0x62EC 0x62FE 0x62F4 0x6311 0x6302 \ - 0x653F 0x6545 0x65AB 0x65BD 0x65E2 0x6625 0x662D 0x6620 \ - 0x6627 0x662F 0x661F 0x6628 0x6631 0x6624 0x66F7 0x67FF -33 0x67D3 0x67F1 0x67D4 0x67D0 0x67EC 0x67B6 0x67AF 0x67F5 \ - 0x67E9 0x67EF 0x67C4 0x67D1 0x67B4 0x67DA 0x67E5 0x67B8 \ - 0x67CF 0x67DE 0x67F3 0x67B0 0x67D9 0x67E2 0x67DD 0x67D2 \ - 0x6B6A 0x6B83 0x6B86 0x6BB5 0x6BD2 0x6BD7 0x6C1F 0x6CC9 \ - 0x6D0B 0x6D32 0x6D2A 0x6D41 0x6D25 0x6D0C 0x6D31 0x6D1E \ - 0x6D17 0x79F3 0x79F9 0x7A9A 0x7A93 0x7A91 0x7AE1 0x7B21 \ - 0x7B1C 0x7B16 0x7B17 0x7B36 0x7B1F 0x7C93 0x7C99 0x7C9A \ - 0x7C9C 0x7D49 0x7D34 0x7D37 0x7D2D 0x7D4C 0x7D48 0x7F3B \ - 0x8008 0x801A 0x801D 0x8049 0x8045 0x8044 0x7C9B 0x812A \ - 0x812E 0x8131 0x6D3B 0x6D3D 0x6D3E 0x6D36 0x6D1B 0x6CF5 \ - 0x6D39 0x6D27 0x6D38 0x6D29 0x6D2E 0x6D35 0x6D0E 0x6D2B \ - 0x70AB 0x70BA 0x70B3 0x70AC 0x70AF 0x70AD 0x70B8 0x70AE \ - 0x70A4 0x7230 0x7272 0x726F 0x7274 0x72E9 0x72E0 0x72E1 \ - 0x73B7 0x73CA 0x73BB 0x73B2 0x73CD 0x73C0 0x73B3 0x751A \ - 0x752D 0x754F 0x754C 0x754E 0x754B 0x75AB 0x75A4 0x75A5 \ - 0x75A2 0x75A3 0x7678 0x7686 0x7687 0x7688 0x76C8 0x76C6 \ - 0x76C3 0x76C5 0x7701 0x76F9 0x76F8 0x7709 0x770B 0x76FE \ - 0x76FC 0x7707 0x77DC 0x7802 0x7814 0x780C 0x780D 0x7946 \ - 0x7949 0x7948 0x7947 0x79B9 0x79BA 0x79D1 0x79D2 0x79CB \ - 0x7A7F 0x7A81 0x7AFF 0x7AFD 0x7C7D 0x7D02 0x7D05 0x7D00 \ - 0x7D09 0x7D07 0x7D04 0x7D06 0x7F38 0x7F8E 0x7FBF 0x8004 \ - 0x8010 0x800D 0x8011 0x8036 0x80D6 0x80E5 0x80DA 0x80C3 \ - 0x80C4 0x80CC 0x80E1 0x80DB 0x80CE 0x80DE 0x80E4 0x80DD \ - 0x81F4 0x8222 0x82E7 0x8303 0x8305 0x82E3 0x82DB 0x82E6 \ - 0x8304 0x82E5 0x8302 0x8309 0x82D2 0x82D7 0x82F1 0x8301 \ - 0x82DC 0x82D4 0x82D1 0x82DE 0x82D3 0x82DF 0x82EF 0x8306 \ - 0x8650 0x8679 0x867B 0x867A 0x884D 0x886B 0x8981 0x89D4 \ - 0x8A08 0x8A02 0x8A03 0x8C9E 0x8CA0 0x8D74 0x8D73 0x8DB4 \ - 0x8ECD 0x8ECC 0x8FF0 0x8FE6 0x8FE2 0x8FEA 0x8FE5 0x811A \ - 0x8134 0x8117 0x831D 0x8371 0x8384 0x8380 0x8372 0x83A1 \ - 0x8379 0x8391 0x839F 0x83AD 0x8323 0x8385 0x839C 0x83B7 \ - 0x8658 0x865A 0x8657 0x86B2 0x86AE 0x8845 0x889C 0x8894 -34 0x88A3 0x888F 0x88A5 0x88A9 0x88A6 0x888A 0x88A0 0x8890 \ - 0x8FED 0x8FEB 0x8FE4 0x8FE8 0x90CA 0x90CE 0x90C1 0x90C3 \ - 0x914B 0x914A 0x91CD 0x9582 0x9650 0x964B 0x964C 0x964D \ - 0x9762 0x9769 0x97CB 0x97ED 0x97F3 0x9801 0x98A8 0x98DB \ - 0x98DF 0x9996 0x9999 0x4E58 0x4EB3 0x500C 0x500D 0x5023 \ - 0x4FEF 0x5026 0x5025 0x4FF8 0x5029 0x5016 0x5006 0x503C \ - 0x501F 0x501A 0x5012 0x5011 0x4FFA 0x5000 0x5014 0x5028 \ - 0x4FF1 0x5021 0x500B 0x5019 0x5018 0x4FF3 0x4FEE 0x502D \ - 0x502A 0x4FFE 0x502B 0x5009 0x517C 0x51A4 0x51A5 0x51A2 \ - 0x51CD 0x51CC 0x51C6 0x51CB 0x5256 0x525C 0x5254 0x525B \ - 0x525D 0x532A 0x537F 0x539F 0x539D 0x53DF 0x54E8 0x5510 \ - 0x5501 0x5537 0x54FC 0x54E5 0x54F2 0x5506 0x54FA 0x5514 \ - 0x54E9 0x54ED 0x54E1 0x5509 0x54EE 0x54EA 0x54E6 0x5527 \ - 0x5507 0x54FD 0x550F 0x5703 0x5704 0x57C2 0x57D4 0x57CB \ - 0x57C3 0x5809 0x590F 0x5957 0x5958 0x595A 0x5A11 0x5A18 \ - 0x5A1C 0x5A1F 0x5A1B 0x5A13 0x59EC 0x5A20 0x5A23 0x5A29 \ - 0x5A25 0x5A0C 0x5A09 0x5B6B 0x5C58 0x5BB0 0x5BB3 0x5BB6 \ - 0x5BB4 0x5BAE 0x5BB5 0x5BB9 0x5BB8 0x5C04 0x5C51 0x5C55 \ - 0x5C50 0x5CED 0x5CFD 0x5CFB 0x5CEA 0x5CE8 0x5CF0 0x5CF6 \ - 0x5D01 0x5CF4 0x5DEE 0x5E2D 0x5E2B 0x5EAB 0x5EAD 0x5EA7 \ - 0x5F31 0x5F92 0x5F91 0x5F90 0x6059 0x8992 0x8991 0x8994 \ - 0x8A26 0x8A32 0x8A28 0x8A1C 0x8A2B 0x8A20 0x8A29 0x8A21 \ - 0x8C3A 0x8C5B 0x8C58 0x8C7C 0x8CA6 0x8CAE 0x8CAD 0x8D65 \ - 0x8D7E 0x8D7C 0x8D7F 0x8D7A 0x8DBD 0x8DC0 0x8DBB 0x8EAD \ - 0x8EAF 0x8ED6 0x8ED9 0x9012 0x900E 0x9025 0x6063 0x6065 \ - 0x6050 0x6055 0x606D 0x6069 0x606F 0x6084 0x609F 0x609A \ - 0x608D 0x6094 0x608C 0x6085 0x6096 0x6247 0x62F3 0x6308 \ - 0x62FF 0x634E 0x633E 0x632F 0x6355 0x6342 0x6346 0x634F \ - 0x6349 0x633A 0x6350 0x633D 0x632A 0x632B 0x6328 0x634D \ - 0x634C 0x6548 0x6549 0x6599 0x65C1 0x65C5 0x6642 0x6649 \ - 0x664F 0x6643 0x6652 0x664C 0x6645 0x6641 0x66F8 0x6714 \ - 0x6715 0x6717 0x6821 0x6838 0x6848 0x6846 0x6853 0x6839 -35 0x6842 0x6854 0x6829 0x68B3 0x6817 0x684C 0x6851 0x683D \ - 0x67F4 0x6850 0x6840 0x683C 0x6843 0x682A 0x6845 0x6813 \ - 0x6818 0x6841 0x6B8A 0x6B89 0x6BB7 0x6C23 0x6C27 0x6C28 \ - 0x6C26 0x6C24 0x6CF0 0x6D6A 0x6D95 0x6D88 0x6D87 0x6D66 \ - 0x6D78 0x6D77 0x6D59 0x6D93 0x6D6C 0x6D89 0x6D6E 0x6D5A \ - 0x6D74 0x6D69 0x6D8C 0x6D8A 0x6D79 0x6D85 0x6D65 0x6D94 \ - 0x70CA 0x70D8 0x70E4 0x70D9 0x70C8 0x70CF 0x7239 0x7279 \ - 0x72FC 0x72F9 0x72FD 0x72F8 0x72F7 0x7386 0x73ED 0x7409 \ - 0x73EE 0x73E0 0x73EA 0x73DE 0x7554 0x755D 0x755C 0x755A \ - 0x7559 0x75BE 0x75C5 0x75C7 0x75B2 0x75B3 0x75BD 0x75BC \ - 0x75B9 0x75C2 0x75B8 0x768B 0x76B0 0x76CA 0x76CD 0x76CE \ - 0x7729 0x771F 0x7720 0x7728 0x77E9 0x7830 0x7827 0x7838 \ - 0x781D 0x7834 0x7837 0x9013 0x90EE 0x90AB 0x90F7 0x9159 \ - 0x9154 0x91F2 0x91F0 0x91E5 0x91F6 0x9587 0x965A 0x966E \ - 0x9679 0x98E1 0x98E6 0x9EC4 0x9ED2 0x4E80 0x4E81 0x508F \ - 0x5097 0x5088 0x5089 0x5081 0x5160 0x5E42 0x51D3 0x51D2 \ - 0x51D6 0x5273 0x5270 0x53A8 0x7825 0x782D 0x7820 0x781F \ - 0x7832 0x7955 0x7950 0x7960 0x795F 0x7956 0x795E 0x795D \ - 0x7957 0x795A 0x79E4 0x79E3 0x79E7 0x79DF 0x79E6 0x79E9 \ - 0x79D8 0x7A84 0x7A88 0x7AD9 0x7B06 0x7B11 0x7C89 0x7D21 \ - 0x7D17 0x7D0B 0x7D0A 0x7D20 0x7D22 0x7D14 0x7D10 0x7D15 \ - 0x7D1A 0x7D1C 0x7D0D 0x7D19 0x7D1B 0x7F3A 0x7F5F 0x7F94 \ - 0x7FC5 0x7FC1 0x8006 0x8018 0x8015 0x8019 0x8017 0x803D \ - 0x803F 0x80F1 0x8102 0x80F0 0x8105 0x80ED 0x80F4 0x8106 \ - 0x80F8 0x80F3 0x8108 0x80FD 0x810A 0x80FC 0x80EF 0x81ED \ - 0x81EC 0x8200 0x8210 0x822A 0x822B 0x8228 0x822C 0x82BB \ - 0x832B 0x8352 0x8354 0x834A 0x8338 0x8350 0x8349 0x8335 \ - 0x8334 0x834F 0x8332 0x8339 0x8336 0x8317 0x8340 0x8331 \ - 0x8328 0x8343 0x8654 0x868A 0x86AA 0x8693 0x86A4 0x86A9 \ - 0x868C 0x86A3 0x869C 0x8870 0x8877 0x8881 0x8882 0x887D \ - 0x8879 0x8A18 0x8A10 0x8A0E 0x8A0C 0x8A15 0x8A0A 0x8A17 \ - 0x8A13 0x8A16 0x8A0F 0x8A11 0x8C48 0x8C7A 0x8C79 0x8CA1 -36 0x8CA2 0x8D77 0x8EAC 0x8ED2 0x8ED4 0x8ECF 0x8FB1 0x9001 \ - 0x9006 0x8FF7 0x9000 0x8FFA 0x8FF4 0x9003 0x8FFD 0x9005 \ - 0x8FF8 0x9095 0x90E1 0x90DD 0x90E2 0x9152 0x914D 0x914C \ - 0x91D8 0x91DD 0x91D7 0x91DC 0x91D9 0x9583 0x9662 0x9663 \ - 0x9661 0x53A6 0x53C5 0x5597 0x55DE 0x5596 0x55B4 0x5585 \ - 0x559B 0x55A0 0x5559 0x5586 0x55AF 0x557A 0x559E 0x55A9 \ - 0x570F 0x570E 0x581A 0x581F 0x583C 0x5818 0x583E 0x5826 \ - 0x583A 0x5822 0x58FB 0x5963 0x5964 0x5AA8 0x5AA3 0x5A82 \ - 0x5A88 0x5AA1 0x965B 0x965D 0x9664 0x9658 0x965E 0x96BB \ - 0x98E2 0x99AC 0x9AA8 0x9AD8 0x9B25 0x9B32 0x9B3C 0x4E7E \ - 0x507A 0x507D 0x505C 0x5047 0x5043 0x504C 0x505A 0x5049 \ - 0x5065 0x5076 0x504E 0x5055 0x5075 0x5074 0x5077 0x504F \ - 0x500F 0x506F 0x506D 0x515C 0x5195 0x51F0 0x526A 0x526F \ - 0x52D2 0x52D9 0x52D8 0x52D5 0x5310 0x530F 0x5319 0x533F \ - 0x5340 0x533E 0x53C3 0x66FC 0x5546 0x556A 0x5566 0x5544 \ - 0x555E 0x5561 0x5543 0x554A 0x5531 0x5556 0x554F 0x5555 \ - 0x552F 0x5564 0x5538 0x552E 0x555C 0x552C 0x5563 0x5533 \ - 0x5541 0x5557 0x5708 0x570B 0x5709 0x57DF 0x5805 0x580A \ - 0x5806 0x57E0 0x57E4 0x57FA 0x5802 0x5835 0x57F7 0x57F9 \ - 0x5920 0x5962 0x5A36 0x5A41 0x5A49 0x5A66 0x5A6A 0x5A40 \ - 0x5A3C 0x5A62 0x5A5A 0x5A46 0x5A4A 0x5B70 0x5BC7 0x5BC5 \ - 0x5BC4 0x5BC2 0x5BBF 0x5BC6 0x5C09 0x5C08 0x5C07 0x5C60 \ - 0x5C5C 0x5C5D 0x5D07 0x5D06 0x5D0E 0x5D1B 0x5D16 0x5D22 \ - 0x5D11 0x5D29 0x5D14 0x5D19 0x5D24 0x5D27 0x5D17 0x5DE2 \ - 0x5E38 0x5E36 0x5E33 0x5E37 0x5EB7 0x5EB8 0x5EB6 0x5EB5 \ - 0x5EBE 0x5F35 0x5F37 0x5F57 0x5F6C 0x5F69 0x5F6B 0x5F97 \ - 0x5F99 0x5F9E 0x5F98 0x5FA1 0x5FA0 0x5F9C 0x607F 0x60A3 \ - 0x6089 0x60A0 0x60A8 0x60CB 0x60B4 0x60E6 0x60BD 0x5A85 \ - 0x5A98 0x5A99 0x5A89 0x5A81 0x5A96 0x5A80 0x5A91 0x5ACF \ - 0x5A87 0x5AA0 0x5A79 0x5A86 0x5AAB 0x5AAA 0x5AA4 0x5A8D \ - 0x5A7E 0x5BD5 0x5C1E 0x5C5F 0x5C5E 0x5D44 0x5D3E 0x5D48 \ - 0x5D1C 0x5D5B 0x5D4D 0x5D57 0x5D53 0x5D4F 0x5D3B 0x5D46 -37 0x60C5 0x60BB 0x60B5 0x60DC 0x60BC 0x60D8 0x60D5 0x60C6 \ - 0x60DF 0x60B8 0x60DA 0x60C7 0x621A 0x621B 0x6248 0x63A0 \ - 0x63A7 0x6372 0x6396 0x63A2 0x63A5 0x6377 0x6367 0x6398 \ - 0x63AA 0x6371 0x63A9 0x6389 0x6383 0x639B 0x636B 0x63A8 \ - 0x6384 0x6388 0x6399 0x63A1 0x63AC 0x6392 0x638F 0x6380 \ - 0x637B 0x6369 0x6368 0x637A 0x655D 0x6556 0x6551 0x6559 \ - 0x6557 0x555F 0x654F 0x6558 0x6555 0x6554 0x659C 0x659B \ - 0x65AC 0x65CF 0x65CB 0x65CC 0x65CE 0x665D 0x665A 0x6664 \ - 0x6668 0x6666 0x665E 0x66F9 0x52D7 0x671B 0x6881 0x68AF \ - 0x68A2 0x6893 0x68B5 0x687F 0x6876 0x68B1 0x68A7 0x6897 \ - 0x68B0 0x6883 0x68C4 0x68AD 0x6886 0x6885 0x6894 0x689D \ - 0x68A8 0x689F 0x68A1 0x6882 0x6B32 0x6BBA 0x6BEB 0x6BEC \ - 0x6C2B 0x6D8E 0x6DBC 0x6DF3 0x6DD9 0x6DB2 0x6DE1 0x6DCC \ - 0x6DE4 0x6DFB 0x6DFA 0x6E05 0x6DC7 0x6DCB 0x6DAF 0x6DD1 \ - 0x6DAE 0x6DDE 0x6DF9 0x6DB8 0x6DF7 0x6DF5 0x6DC5 0x6DD2 \ - 0x6E1A 0x6DB5 0x6DDA 0x6DEB 0x6DD8 0x6DEA 0x6DF1 0x6DEE \ - 0x6DE8 0x6DC6 0x6DC4 0x6DAA 0x6DEC 0x6DBF 0x6DE6 0x70F9 \ - 0x7109 0x710A 0x70FD 0x70EF 0x723D 0x727D 0x7281 0x731C \ - 0x731B 0x7316 0x7313 0x7319 0x7387 0x7405 0x740A 0x7403 \ - 0x7406 0x73FE 0x740D 0x74E0 0x74F6 0x5E46 0x5E47 0x5E48 \ - 0x5EC0 0x5EBD 0x5EBF 0x5F11 0x5F3E 0x5F3B 0x5F3A 0x5FA7 \ - 0x60EA 0x6107 0x6122 0x610C 0x60B3 0x60D6 0x60D2 0x60E3 \ - 0x60E5 0x60E9 0x6111 0x60FD 0x611E 0x6120 0x6121 0x621E \ - 0x63E2 0x63DE 0x63E6 0x63F8 0x63FE 0x63C1 0x74F7 0x751C \ - 0x7522 0x7565 0x7566 0x7562 0x7570 0x758F 0x75D4 0x75D5 \ - 0x75B5 0x75CA 0x75CD 0x768E 0x76D4 0x76D2 0x76DB 0x7737 \ - 0x773E 0x773C 0x7736 0x7738 0x773A 0x786B 0x7843 0x784E \ - 0x7965 0x7968 0x796D 0x79FB 0x7A92 0x7A95 0x7B20 0x7B28 \ - 0x7B1B 0x7B2C 0x7B26 0x7B19 0x7B1E 0x7B2E 0x7C92 0x7C97 \ - 0x7C95 0x7D46 0x7D43 0x7D71 0x7D2E 0x7D39 0x7D3C 0x7D40 \ - 0x7D30 0x7D33 0x7D44 0x7D2F 0x7D42 0x7D32 0x7D31 0x7F3D \ - 0x7F9E 0x7F9A 0x7FCC 0x7FCE 0x7FD2 0x801C 0x804A 0x8046 -38 0x812F 0x8116 0x8123 0x812B 0x8129 0x8130 0x8124 0x8202 \ - 0x8235 0x8237 0x8236 0x8239 0x838E 0x839E 0x8398 0x8378 \ - 0x83A2 0x8396 0x83BD 0x83AB 0x8392 0x838A 0x8393 0x8389 \ - 0x83A0 0x8377 0x837B 0x837C 0x8386 0x83A7 0x8655 0x5F6A \ - 0x86C7 0x86C0 0x86B6 0x86C4 0x86B5 0x86C6 0x86CB 0x86B1 \ - 0x86AF 0x86C9 0x8853 0x889E 0x8888 0x88AB 0x8892 0x8896 \ - 0x888D 0x888B 0x8993 0x898F 0x8A2A 0x8A1D 0x8A23 0x8A25 \ - 0x8A31 0x8A2D 0x8A1F 0x8A1B 0x8A22 0x8C49 0x8C5A 0x8CA9 \ - 0x8CAC 0x8CAB 0x8CA8 0x8CAA 0x8CA7 0x8D67 0x8D66 0x8DBE \ - 0x8DBA 0x8EDB 0x8EDF 0x9019 0x900D 0x901A 0x9017 0x9023 \ - 0x901F 0x901D 0x9010 0x9015 0x901E 0x9020 0x900F 0x9022 \ - 0x9016 0x901B 0x9014 0x63BF 0x63F7 0x63D1 0x655F 0x6560 \ - 0x6561 0x65D1 0x667D 0x666B 0x667F 0x6673 0x6681 0x666D \ - 0x6669 0x671E 0x68ED 0x6903 0x68FE 0x68E5 0x691E 0x6902 \ - 0x6909 0x68CA 0x6900 0x6901 0x6918 0x68E2 0x68CF 0x692E \ - 0x68C5 0x68FF 0x691C 0x68C3 0x90E8 0x90ED 0x90FD 0x9157 \ - 0x91CE 0x91F5 0x91E6 0x91E3 0x91E7 0x91ED 0x91E9 0x9589 \ - 0x966A 0x9675 0x9673 0x9678 0x9670 0x9674 0x9676 0x9677 \ - 0x966C 0x96C0 0x96EA 0x96E9 0x7AE0 0x7ADF 0x9802 0x9803 \ - 0x9B5A 0x9CE5 0x9E75 0x9E7F 0x9EA5 0x9EBB 0x50A2 0x508D \ - 0x5085 0x5099 0x5091 0x5080 0x5096 0x5098 0x509A 0x6700 \ - 0x51F1 0x5272 0x5274 0x5275 0x5269 0x52DE 0x52DD 0x52DB \ - 0x535A 0x53A5 0x557B 0x5580 0x55A7 0x557C 0x558A 0x559D \ - 0x5598 0x5582 0x559C 0x55AA 0x5594 0x5587 0x558B 0x5583 \ - 0x55B3 0x55AE 0x559F 0x553E 0x55B2 0x559A 0x55BB 0x55AC \ - 0x55B1 0x557E 0x5589 0x55AB 0x5599 0x570D 0x582F 0x582A \ - 0x5834 0x5824 0x5830 0x5831 0x5821 0x581D 0x5820 0x58F9 \ - 0x58FA 0x5960 0x5A77 0x5A9A 0x5A7F 0x5A92 0x5A9B 0x5AA7 \ - 0x5B73 0x5B71 0x5BD2 0x5BCC 0x5BD3 0x5BD0 0x5C0A 0x5C0B \ - 0x5C31 0x5D4C 0x5D50 0x5D34 0x5D47 0x5DFD 0x5E45 0x5E3D \ - 0x5E40 0x5E43 0x5E7E 0x5ECA 0x5EC1 0x5EC2 0x5EC4 0x5F3C \ - 0x5F6D 0x5FA9 0x5FAA 0x5FA8 0x60D1 0x60E1 0x60B2 0x60B6 -39 0x60E0 0x611C 0x6123 0x60FA 0x6115 0x60F0 0x60FB 0x60F4 \ - 0x6168 0x60F1 0x610E 0x60F6 0x6109 0x6100 0x6112 0x621F \ - 0x6249 0x63A3 0x638C 0x63CF 0x63C0 0x63E9 0x63C9 0x63C6 \ - 0x63CD 0x6B6F 0x6B6E 0x6BBE 0x6BF4 0x6C2D 0x6DB6 0x6E75 \ - 0x6E1E 0x6E18 0x6E48 0x6E4F 0x6E42 0x6E6A 0x6E70 0x6DFE \ - 0x6E6D 0x6E7B 0x6E7E 0x6E59 0x6E57 0x6E80 0x6E50 0x6E29 \ - 0x6E76 0x6E2A 0x6E4C 0x712A 0x7135 0x712C 0x7137 0x711D \ - 0x7138 0x7134 0x63D2 0x63E3 0x63D0 0x63E1 0x63D6 0x63ED \ - 0x63EE 0x6376 0x63F4 0x63EA 0x63DB 0x6452 0x63DA 0x63F9 \ - 0x655E 0x6566 0x6562 0x6563 0x6591 0x6590 0x65AF 0x666E \ - 0x6670 0x6674 0x6676 0x666F 0x6691 0x667A 0x667E 0x6677 \ - 0x66FE 0x66FF 0x671F 0x671D 0x68FA 0x68D5 0x68E0 0x68D8 \ - 0x68D7 0x6905 0x68DF 0x68F5 0x68EE 0x68E7 0x68F9 0x68D2 \ - 0x68F2 0x68E3 0x68CB 0x68CD 0x690D 0x6912 0x690E 0x68C9 \ - 0x68DA 0x696E 0x68FB 0x6B3E 0x6B3A 0x6B3D 0x6B98 0x6B96 \ - 0x6BBC 0x6BEF 0x6C2E 0x6C2F 0x6C2C 0x6E2F 0x6E38 0x6E54 \ - 0x6E21 0x6E32 0x6E67 0x6E4A 0x6E20 0x6E25 0x6E23 0x6E1B \ - 0x6E5B 0x6E58 0x6E24 0x6E56 0x6E6E 0x6E2D 0x6E26 0x6E6F \ - 0x6E34 0x6E4D 0x6E3A 0x6E2C 0x6E43 0x6E1D 0x6E3E 0x6ECB \ - 0x6E89 0x6E19 0x6E4E 0x6E63 0x6E44 0x6E72 0x6E69 0x6E5F \ - 0x7119 0x711A 0x7126 0x7130 0x7121 0x7136 0x716E 0x711C \ - 0x724C 0x7284 0x7280 0x7336 0x7325 0x7334 0x7329 0x743A \ - 0x742A 0x7433 0x7422 0x7425 0x7435 0x7436 0x7434 0x742F \ - 0x741B 0x7426 0x7428 0x7525 0x7526 0x756B 0x756A 0x75E2 \ - 0x75DB 0x75E3 0x75D9 0x75D8 0x75DE 0x75E0 0x767B 0x767C \ - 0x7696 0x7693 0x76B4 0x76DC 0x774F 0x77ED 0x785D 0x786C \ - 0x786F 0x7A0D 0x7A08 0x7A0B 0x7A05 0x7A00 0x7A98 0x712B \ - 0x7133 0x7127 0x7124 0x712D 0x7232 0x7283 0x7282 0x7287 \ - 0x7306 0x7324 0x7338 0x732A 0x732C 0x732B 0x732F 0x7328 \ - 0x7417 0x7419 0x7438 0x741F 0x7414 0x743C 0x73F7 0x741C \ - 0x7415 0x7418 0x7439 0x74F9 0x7524 0x756E 0x756D 0x7571 \ - 0x7A97 0x7A96 0x7AE5 0x7AE3 0x7B49 0x7B56 0x7B46 0x7B50 -40 0x7B52 0x7B54 0x7B4D 0x7B4B 0x7B4F 0x7B51 0x7C9F 0x7CA5 \ - 0x7D5E 0x7D50 0x7D68 0x7D55 0x7D2B 0x7D6E 0x7D72 0x7D61 \ - 0x7D66 0x7D62 0x7D70 0x7D73 0x5584 0x7FD4 0x7FD5 0x800B \ - 0x8052 0x8085 0x8155 0x8154 0x814B 0x8151 0x814E 0x8139 \ - 0x8146 0x813E 0x814C 0x8153 0x8174 0x8212 0x821C 0x83E9 \ - 0x8403 0x83F8 0x840D 0x83E0 0x83C5 0x840B 0x83C1 0x83EF \ - 0x83F1 0x83F4 0x8457 0x840A 0x83F0 0x840C 0x83CC 0x83FD \ - 0x83F2 0x83CA 0x8438 0x840E 0x8404 0x83DC 0x8407 0x83D4 \ - 0x83DF 0x865B 0x86DF 0x86D9 0x86ED 0x86D4 0x86DB 0x86E4 \ - 0x86D0 0x86DE 0x8857 0x88C1 0x88C2 0x88B1 0x8983 0x8996 \ - 0x8A3B 0x8A60 0x8A55 0x8A5E 0x8A3C 0x8A41 0x8A54 0x8A5B \ - 0x8A50 0x8A46 0x8A34 0x8A3A 0x8A36 0x8A56 0x8C61 0x8C82 \ - 0x8CAF 0x8CBC 0x8CB3 0x8CBD 0x8CC1 0x8CBB 0x8CC0 0x8CB4 \ - 0x8CB7 0x8CB6 0x8CBF 0x8CB8 0x8D8A 0x8D85 0x8D81 0x8DCE \ - 0x8DDD 0x8DCB 0x8DDA 0x8DD1 0x8DCC 0x8DDB 0x8DC6 0x8EFB \ - 0x8EF8 0x8EFC 0x8F9C 0x902E 0x9035 0x9031 0x9038 0x9032 \ - 0x9036 0x9102 0x90F5 0x9109 0x90FE 0x9163 0x9165 0x91CF \ - 0x9214 0x9215 0x9223 0x9209 0x921E 0x920D 0x9210 0x9207 \ - 0x9211 0x9594 0x958F 0x958B 0x9591 0x758E 0x75E5 0x7694 \ - 0x76B3 0x76D9 0x7748 0x7749 0x7743 0x7742 0x77DF 0x7863 \ - 0x7876 0x785F 0x7866 0x7966 0x7971 0x7976 0x7984 0x7975 \ - 0x79FF 0x7A07 0x7A0E 0x7A09 0x7AE7 0x7AE2 0x7B55 0x7B43 \ - 0x7B57 0x7B6C 0x7B42 0x7B53 0x7B41 0x7CA0 0x9593 0x9592 \ - 0x958E 0x968A 0x968E 0x968B 0x967D 0x9685 0x9686 0x968D \ - 0x9672 0x9684 0x96C1 0x96C5 0x96C4 0x96C6 0x96C7 0x96EF \ - 0x96F2 0x97CC 0x9805 0x9806 0x9808 0x98E7 0x98EA 0x98EF \ - 0x98E9 0x98F2 0x98ED 0x99AE 0x99AD 0x9EC3 0x9ECD 0x9ED1 \ - 0x4E82 0x50AD 0x50B5 0x50B2 0x50B3 0x50C5 0x50BE 0x50AC \ - 0x50B7 0x50BB 0x50AF 0x50C7 0x527F 0x5277 0x527D 0x52DF \ - 0x52E6 0x52E4 0x52E2 0x52E3 0x532F 0x55DF 0x55E8 0x55D3 \ - 0x55E6 0x55CE 0x55DC 0x55C7 0x55D1 0x55E3 0x55E4 0x55EF \ - 0x55DA 0x55E1 0x55C5 0x55C6 0x55E5 0x55C9 0x5712 0x5713 -41 0x585E 0x5851 0x5858 0x5857 0x585A 0x5854 0x586B 0x584C \ - 0x586D 0x584A 0x5862 0x5852 0x584B 0x5967 0x5AC1 0x5AC9 \ - 0x5ACC 0x5ABE 0x5ABD 0x5ABC 0x5AB3 0x5AC2 0x5AB2 0x5D69 \ - 0x5D6F 0x5E4C 0x5E79 0x5EC9 0x5EC8 0x5F12 0x5F59 0x5FAC \ - 0x5FAE 0x611A 0x610F 0x6148 0x611F 0x60F3 0x611B 0x60F9 \ - 0x6101 0x6108 0x614E 0x614C 0x6144 0x614D 0x613E 0x6134 \ - 0x6127 0x610D 0x6106 0x6137 0x6221 0x6222 0x6413 0x643E \ - 0x641E 0x642A 0x642D 0x643D 0x642C 0x640F 0x641C 0x6414 \ - 0x640D 0x6436 0x6416 0x6417 0x6406 0x656C 0x659F 0x65B0 \ - 0x6697 0x6689 0x6687 0x6688 0x6696 0x6684 0x6698 0x668D \ - 0x6703 0x6994 0x696D 0x7CA6 0x7CA4 0x7D74 0x7D59 0x7D60 \ - 0x7D57 0x7D6C 0x7D7E 0x7D64 0x7D5A 0x7D5D 0x7D76 0x7D4D \ - 0x7D75 0x7FD3 0x7FD6 0x8060 0x804E 0x8145 0x813B 0x8148 \ - 0x8142 0x8149 0x8140 0x8114 0x8141 0x81EF 0x81F6 0x8203 \ - 0x83ED 0x83DA 0x8418 0x83D2 0x695A 0x6977 0x6960 0x6954 \ - 0x6975 0x6930 0x6982 0x694A 0x6968 0x696B 0x695E 0x6953 \ - 0x6979 0x6986 0x695D 0x6963 0x695B 0x6B47 0x6B72 0x6BC0 \ - 0x6BBF 0x6BD3 0x6BFD 0x6EA2 0x6EAF 0x6ED3 0x6EB6 0x6EC2 \ - 0x6E90 0x6E9D 0x6EC7 0x6EC5 0x6EA5 0x6E98 0x6EBC 0x6EBA \ - 0x6EAB 0x6ED1 0x6E96 0x6E9C 0x6EC4 0x6ED4 0x6EAA 0x6EA7 \ - 0x6EB4 0x714E 0x7159 0x7169 0x7164 0x7149 0x7167 0x715C \ - 0x716C 0x7166 0x714C 0x7165 0x715E 0x7146 0x7168 0x7156 \ - 0x723A 0x7252 0x7337 0x7345 0x733F 0x733E 0x746F 0x745A \ - 0x7455 0x745F 0x745E 0x7441 0x743F 0x7459 0x745B 0x745C \ - 0x7576 0x7578 0x7600 0x75F0 0x7601 0x75F2 0x75F1 0x75FA \ - 0x75FF 0x75F4 0x75F3 0x76DE 0x76DF 0x775B 0x776B 0x7766 \ - 0x775E 0x7763 0x7779 0x776A 0x776C 0x775C 0x7765 0x7768 \ - 0x7762 0x77EE 0x788E 0x78B0 0x7897 0x7898 0x788C 0x7889 \ - 0x787C 0x7891 0x7893 0x787F 0x797A 0x797F 0x7981 0x842C \ - 0x79BD 0x7A1C 0x7A1A 0x7A20 0x7A14 0x7A1F 0x7A1E 0x7A9F \ - 0x7AA0 0x7B77 0x7BC0 0x7B60 0x7B6E 0x7B67 0x7CB1 0x7CB3 \ - 0x7CB5 0x7D93 0x7D79 0x7D91 0x7D81 0x7D8F 0x7D5B 0x7F6E -42 0x7F69 0x7F6A 0x7F72 0x7FA9 0x7FA8 0x7FA4 0x8056 0x8058 \ - 0x8086 0x8084 0x8171 0x8170 0x8178 0x8165 0x816E 0x8173 \ - 0x816B 0x8408 0x8400 0x8417 0x8346 0x8414 0x83D3 0x8405 \ - 0x841F 0x8402 0x8416 0x83CD 0x83E6 0x865D 0x86D5 0x86E1 \ - 0x86EE 0x8847 0x8846 0x88BB 0x88BF 0x88B4 0x88B5 0x899A \ - 0x8A43 0x8A5A 0x8A35 0x8A38 0x8A42 0x8A49 0x8A5D 0x8A4B \ - 0x8A3D 0x8C60 0x8179 0x817A 0x8166 0x8205 0x8247 0x8482 \ - 0x8477 0x843D 0x8431 0x8475 0x8466 0x846B 0x8449 0x846C \ - 0x845B 0x843C 0x8435 0x8461 0x8463 0x8469 0x846D 0x8446 \ - 0x865E 0x865C 0x865F 0x86F9 0x8713 0x8708 0x8707 0x8700 \ - 0x86FE 0x86FB 0x8702 0x8703 0x8706 0x870A 0x8859 0x88DF \ - 0x88D4 0x88D9 0x88DC 0x88D8 0x88DD 0x88E1 0x88CA 0x88D5 \ - 0x88D2 0x899C 0x89E3 0x8A6B 0x8A72 0x8A73 0x8A66 0x8A69 \ - 0x8A70 0x8A87 0x8A7C 0x8A63 0x8AA0 0x8A71 0x8A85 0x8A6D \ - 0x8A62 0x8A6E 0x8A6C 0x8A79 0x8A7B 0x8A3E 0x8A68 0x8C62 \ - 0x8C8A 0x8C89 0x8CCA 0x8CC7 0x8CC8 0x8CC4 0x8CB2 0x8CC3 \ - 0x8CC2 0x8CC5 0x8DE1 0x8DDF 0x8DE8 0x8DEF 0x8DF3 0x8DFA \ - 0x8DEA 0x8DE4 0x8DE6 0x8EB2 0x8F03 0x8F09 0x8EFE 0x8F0A \ - 0x8F9F 0x8FB2 0x904B 0x904A 0x9053 0x9042 0x9054 0x903C \ - 0x9055 0x9050 0x9047 0x904F 0x904E 0x904D 0x9051 0x903E \ - 0x9041 0x9112 0x9117 0x916C 0x916A 0x9169 0x91C9 0x9237 \ - 0x9257 0x9238 0x923D 0x9240 0x923E 0x925B 0x924B 0x9264 \ - 0x9251 0x9234 0x9249 0x924D 0x9245 0x9239 0x923F 0x925A \ - 0x9598 0x9698 0x9694 0x9695 0x96CD 0x96CB 0x96C9 0x96CA \ - 0x96F7 0x96FB 0x96F9 0x96F6 0x9756 0x9774 0x9776 0x9810 \ - 0x9811 0x9813 0x980A 0x9812 0x980C 0x98FC 0x98F4 0x8C5E \ - 0x8C7F 0x8C7E 0x8C83 0x8CB1 0x8D87 0x8D88 0x8D83 0x8D86 \ - 0x8D8B 0x8D82 0x8DCA 0x8DD2 0x8DD4 0x8DC9 0x8EB0 0x8EF2 \ - 0x8EE4 0x8EF3 0x8EEA 0x8EFD 0x8F9D 0x902B 0x902A 0x9028 \ - 0x9029 0x902C 0x903A 0x9030 0x9037 0x903B 0x910A 0x91FE \ - 0x98FD 0x98FE 0x99B3 0x99B1 0x99B4 0x9AE1 0x9CE9 0x9E82 \ - 0x9F0E 0x9F13 0x9F20 0x50E7 0x50EE 0x50E5 0x50D6 0x50ED -43 0x50DA 0x50D5 0x50CF 0x50D1 0x50F1 0x50CE 0x50E9 0x5162 \ - 0x51F3 0x5283 0x5282 0x5331 0x53AD 0x55FE 0x5600 0x561B \ - 0x5617 0x55FD 0x5614 0x5606 0x5609 0x560D 0x560E 0x55F7 \ - 0x5616 0x561F 0x5608 0x5610 0x55F6 0x5718 0x5716 0x5875 \ - 0x587E 0x5883 0x5893 0x588A 0x5879 0x5885 0x587D 0x58FD \ - 0x5925 0x5922 0x5924 0x596A 0x5969 0x5AE1 0x5AE6 0x5AE9 \ - 0x5AD7 0x5AD6 0x5AD8 0x5AE3 0x5B75 0x5BDE 0x5BE7 0x5BE1 \ - 0x5BE5 0x5BE6 0x5BE8 0x5BE2 0x5BE4 0x5BDF 0x5C0D 0x5C62 \ - 0x5D84 0x5D87 0x5E5B 0x5E63 0x5E55 0x5E57 0x5E54 0x5ED3 \ - 0x5ED6 0x5F0A 0x5F46 0x5F70 0x5FB9 0x6147 0x613F 0x614B \ - 0x6177 0x6162 0x6163 0x615F 0x615A 0x6158 0x6175 0x622A \ - 0x6487 0x6458 0x6454 0x64A4 0x6478 0x645F 0x647A 0x6451 \ - 0x6467 0x6434 0x646D 0x647B 0x6572 0x65A1 0x65D7 0x65D6 \ - 0x66A2 0x66A8 0x669D 0x699C 0x69A8 0x6995 0x69C1 0x69AE \ - 0x69D3 0x69CB 0x699B 0x69B7 0x69BB 0x69AB 0x69B4 0x69D0 \ - 0x69CD 0x69AD 0x69CC 0x69A6 0x69C3 0x69A3 0x6B49 0x6B4C \ - 0x6C33 0x6F33 0x6F14 0x6EFE 0x6F13 0x6EF4 0x6F29 0x6F3E \ - 0x6F20 0x6F2C 0x6F0F 0x6F02 0x6F22 0x9220 0x920B 0x9218 \ - 0x9222 0x921B 0x9208 0x920E 0x9213 0x9595 0x968C 0x967B \ - 0x967F 0x9681 0x9682 0x96EE 0x96ED 0x96EC 0x975F 0x976F \ - 0x976D 0x98F0 0x9AA9 0x9AE0 0x4EB7 0x50CC 0x50BC 0x50AA \ - 0x50B9 0x50AB 0x50C3 0x50CD 0x517E 0x527E 0x6EFF 0x6EEF \ - 0x6F06 0x6F31 0x6F38 0x6F32 0x6F23 0x6F15 0x6F2B 0x6F2F \ - 0x6F88 0x6F2A 0x6EEC 0x6F01 0x6EF2 0x6ECC 0x6EF7 0x7194 \ - 0x7199 0x717D 0x718A 0x7184 0x7192 0x723E 0x7292 0x7296 \ - 0x7344 0x7350 0x7464 0x7463 0x746A 0x7470 0x746D 0x7504 \ - 0x7591 0x7627 0x760D 0x760B 0x7609 0x7613 0x76E1 0x76E3 \ - 0x7784 0x777D 0x777F 0x7761 0x78C1 0x789F 0x78A7 0x78B3 \ - 0x78A9 0x78A3 0x798E 0x798F 0x798D 0x7A2E 0x7A31 0x7AAA \ - 0x7AA9 0x7AED 0x7AEF 0x7BA1 0x7B95 0x7B8B 0x7B75 0x7B97 \ - 0x7B9D 0x7B94 0x7B8F 0x7BB8 0x7B87 0x7B84 0x7CB9 0x7CBD \ - 0x7CBE 0x7DBB 0x7DB0 0x7D9C 0x7DBD 0x7DBE 0x7DA0 0x7DCA -44 0x7DB4 0x7DB2 0x7DB1 0x7DBA 0x7DA2 0x7DBF 0x7DB5 0x7DB8 \ - 0x7DAD 0x7DD2 0x7DC7 0x7DAC 0x7F70 0x7FE0 0x7FE1 0x7FDF \ - 0x805E 0x805A 0x8087 0x8150 0x8180 0x818F 0x8188 0x818A \ - 0x817F 0x8182 0x81E7 0x81FA 0x8207 0x8214 0x821E 0x824B \ - 0x84C9 0x84BF 0x84C6 0x84C4 0x8499 0x849E 0x84B2 0x849C \ - 0x84CB 0x84B8 0x84C0 0x84D3 0x8490 0x84BC 0x84D1 0x84CA \ - 0x873F 0x871C 0x873B 0x8722 0x8725 0x8734 0x8718 0x8755 \ - 0x8737 0x8729 0x88F3 0x8902 0x88F4 0x88F9 0x88F8 0x88FD \ - 0x88E8 0x891A 0x88EF 0x8AA6 0x8A8C 0x8A9E 0x8AA3 0x8A8D \ - 0x8AA1 0x8A93 0x8AA4 0x5279 0x52E1 0x52E0 0x52E7 0x5380 \ - 0x53AB 0x53AA 0x53A9 0x53E0 0x55EA 0x55D7 0x55C1 0x5715 \ - 0x586C 0x585C 0x5850 0x5861 0x586A 0x5869 0x5856 0x5860 \ - 0x5866 0x585F 0x5923 0x5966 0x5968 0x5ACE 0x5AC5 0x5AC3 \ - 0x5AD0 0x5B74 0x5B76 0x5BDC 0x8AAA 0x8AA5 0x8AA8 0x8A98 \ - 0x8A91 0x8A9A 0x8AA7 0x8C6A 0x8C8D 0x8C8C 0x8CD3 0x8CD1 \ - 0x8CD2 0x8D6B 0x8D99 0x8D95 0x8DFC 0x8F14 0x8F12 0x8F15 \ - 0x8F13 0x8FA3 0x9060 0x9058 0x905C 0x9063 0x9059 0x905E \ - 0x9062 0x905D 0x905B 0x9119 0x9118 0x911E 0x9175 0x9178 \ - 0x9177 0x9174 0x9278 0x9280 0x9285 0x9298 0x9296 0x927B \ - 0x9293 0x929C 0x92A8 0x927C 0x9291 0x95A1 0x95A8 0x95A9 \ - 0x95A3 0x95A5 0x95A4 0x9699 0x969C 0x969B 0x96CC 0x96D2 \ - 0x9700 0x977C 0x9785 0x97F6 0x9817 0x9818 0x98AF 0x98B1 \ - 0x9903 0x9905 0x990C 0x9909 0x99C1 0x9AAF 0x9AB0 0x9AE6 \ - 0x9B41 0x9B42 0x9CF4 0x9CF6 0x9CF3 0x9EBC 0x9F3B 0x9F4A \ - 0x5104 0x5100 0x50FB 0x50F5 0x50F9 0x5102 0x5108 0x5109 \ - 0x5105 0x51DC 0x5287 0x5288 0x5289 0x528D 0x528A 0x52F0 \ - 0x53B2 0x562E 0x563B 0x5639 0x5632 0x563F 0x5634 0x5629 \ - 0x5653 0x564E 0x5657 0x5674 0x5636 0x562F 0x5630 0x5880 \ - 0x589F 0x589E 0x58B3 0x589C 0x58AE 0x58A9 0x58A6 0x596D \ - 0x5B09 0x5AFB 0x5B0B 0x5AF5 0x5B0C 0x5B08 0x5BEE 0x5BEC \ - 0x5BE9 0x5BEB 0x5C64 0x5C65 0x5D9D 0x5D94 0x5E62 0x5E5F \ - 0x5E61 0x5EE2 0x5EDA 0x5EDF 0x5EDD 0x5EE3 0x5EE0 0x5F48 -45 0x5F71 0x5FB7 0x5FB5 0x6176 0x6167 0x616E 0x615D 0x6155 \ - 0x6182 0x5BD7 0x5BDA 0x5BDB 0x5C20 0x5D6D 0x5D66 0x5D64 \ - 0x5D6E 0x5D60 0x5F42 0x5F5A 0x5F6E 0x6130 0x613A 0x612A \ - 0x6143 0x6119 0x6131 0x613D 0x6408 0x6432 0x6438 0x6431 \ - 0x6419 0x6411 0x6429 0x641D 0x643C 0x6446 0x6447 0x643A \ - 0x6407 0x656B 0x617C 0x6170 0x616B 0x617E 0x61A7 0x6190 \ - 0x61AB 0x618E 0x61AC 0x619A 0x61A4 0x6194 0x61AE 0x622E \ - 0x6469 0x646F 0x6479 0x649E 0x64B2 0x6488 0x6490 0x64B0 \ - 0x64A5 0x6493 0x6495 0x64A9 0x6492 0x64AE 0x64AD 0x64AB \ - 0x649A 0x64AC 0x6499 0x64A2 0x64B3 0x6575 0x6577 0x6578 \ - 0x66AE 0x66AB 0x66B4 0x66B1 0x6A23 0x6A1F 0x69E8 0x6A01 \ - 0x6A1E 0x6A19 0x69FD 0x6A21 0x6A13 0x6A0A 0x69F3 0x6A02 \ - 0x6A05 0x69ED 0x6A11 0x6B50 0x6B4E 0x6BA4 0x6BC5 0x6BC6 \ - 0x6F3F 0x6F7C 0x6F84 0x6F51 0x6F66 0x6F54 0x6F86 0x6F6D \ - 0x6F5B 0x6F78 0x6F6E 0x6F8E 0x6F7A 0x6F70 0x6F64 0x6F97 \ - 0x6F58 0x6ED5 0x6F6F 0x6F60 0x6F5F 0x719F 0x71AC 0x71B1 \ - 0x71A8 0x7256 0x729B 0x734E 0x7357 0x7469 0x748B 0x7483 \ - 0x747E 0x7480 0x757F 0x7620 0x7629 0x761F 0x7624 0x7626 \ - 0x7621 0x7622 0x769A 0x76BA 0x76E4 0x778E 0x7787 0x778C \ - 0x7791 0x778B 0x78CB 0x78C5 0x78BA 0x78CA 0x78BE 0x78D5 \ - 0x78BC 0x78D0 0x7A3F 0x7A3C 0x7A40 0x7A3D 0x7A37 0x7A3B \ - 0x7AAF 0x7AAE 0x7BAD 0x7BB1 0x7BC4 0x7BB4 0x7BC6 0x7BC7 \ - 0x7BC1 0x7BA0 0x7BCC 0x7CCA 0x7DE0 0x7DF4 0x7DEF 0x7DFB \ - 0x7DD8 0x7DEC 0x7DDD 0x7DE8 0x7DE3 0x7DDA 0x7DDE 0x7DE9 \ - 0x7D9E 0x7DD9 0x7DF2 0x7DF9 0x7F75 0x7F77 0x7FAF 0x6570 \ - 0x656D 0x65E4 0x6693 0x668F 0x6692 0x668E 0x6946 0x6931 \ - 0x693E 0x697C 0x6943 0x6973 0x6955 0x6985 0x694D 0x6950 \ - 0x6947 0x6967 0x6936 0x6964 0x6961 0x697D 0x6B44 0x6B40 \ - 0x6B71 0x6B73 0x6B9C 0x6BC1 0x6BFA 0x6C31 0x6C32 0x6EB8 \ - 0x7FE9 0x8026 0x819B 0x819C 0x819D 0x81A0 0x819A 0x8198 \ - 0x8517 0x853D 0x851A 0x84EE 0x852C 0x852D 0x8513 0x8511 \ - 0x8523 0x8521 0x8514 0x84EC 0x8525 0x84FF 0x8506 0x8782 -46 0x8774 0x8776 0x8760 0x8766 0x8778 0x8768 0x8759 0x8757 \ - 0x874C 0x8753 0x885B 0x885D 0x8910 0x8907 0x8912 0x8913 \ - 0x8915 0x890A 0x8ABC 0x8AD2 0x8AC7 0x8AC4 0x8A95 0x8ACB \ - 0x8AF8 0x8AB2 0x8AC9 0x8AC2 0x8ABF 0x8AB0 0x8AD6 0x8ACD \ - 0x8AB6 0x8AB9 0x8ADB 0x8C4C 0x8C4E 0x8C6C 0x8CE0 0x8CDE \ - 0x8CE6 0x8CE4 0x8CEC 0x8CED 0x8CE2 0x8CE3 0x8CDC 0x8CEA \ - 0x8CE1 0x8D6D 0x8D9F 0x8DA3 0x8E2B 0x8E10 0x8E1D 0x8E22 \ - 0x8E0F 0x8E29 0x8E1F 0x8E21 0x8E1E 0x8EBA 0x8F1D 0x8F1B \ - 0x8F1F 0x8F29 0x8F26 0x8F2A 0x8F1C 0x8F1E 0x8F25 0x9069 \ - 0x906E 0x9068 0x906D 0x9077 0x9130 0x912D 0x9127 0x9131 \ - 0x9187 0x9189 0x918B 0x9183 0x92C5 0x92BB 0x92B7 0x92EA \ - 0x92AC 0x92E4 0x92C1 0x92B3 0x92BC 0x92D2 0x92C7 0x92F0 \ - 0x92B2 0x95AD 0x95B1 0x9704 0x9706 0x9707 0x9709 0x9760 \ - 0x978D 0x978B 0x978F 0x9821 0x982B 0x981C 0x98B3 0x990A \ - 0x9913 0x9912 0x9918 0x99DD 0x99D0 0x99DF 0x99DB 0x99D1 \ - 0x99D5 0x99D2 0x99D9 0x9AB7 0x9AEE 0x9AEF 0x9B27 0x9B45 \ - 0x9B44 0x9B77 0x9B6F 0x9D06 0x9D09 0x6EA8 0x6E91 0x6EBB \ - 0x6E9A 0x6EA9 0x6EB5 0x6E6C 0x6EE8 0x6EDD 0x6EDA 0x6EE6 \ - 0x6EAC 0x6ED9 0x6EE3 0x6EE9 0x6EDB 0x716F 0x7148 0x714A \ - 0x716B 0x714F 0x7157 0x7174 0x7145 0x7151 0x716D 0x7251 \ - 0x7250 0x724E 0x7341 0x732E 0x7346 0x7427 0x9D03 0x9EA9 \ - 0x9EBE 0x9ECE 0x58A8 0x9F52 0x5112 0x5118 0x5114 0x5110 \ - 0x5115 0x5180 0x51AA 0x51DD 0x5291 0x5293 0x52F3 0x5659 \ - 0x566B 0x5679 0x5669 0x5664 0x5678 0x566A 0x5668 0x5665 \ - 0x5671 0x566F 0x566C 0x5662 0x5676 0x58C1 0x58BE 0x58C7 \ - 0x58C5 0x596E 0x5B1D 0x5B34 0x5B78 0x5BF0 0x5C0E 0x5F4A \ - 0x61B2 0x6191 0x61A9 0x618A 0x61CD 0x61B6 0x61BE 0x61CA \ - 0x61C8 0x6230 0x64C5 0x64C1 0x64CB 0x64BB 0x64BC 0x64DA \ - 0x64C4 0x64C7 0x64C2 0x64CD 0x64BF 0x64D2 0x64D4 0x64BE \ - 0x6574 0x66C6 0x66C9 0x66B9 0x66C4 0x66C7 0x66B8 0x6A3D \ - 0x6A38 0x6A3A 0x6A59 0x6A6B 0x6A58 0x6A39 0x6A44 0x6A62 \ - 0x6A61 0x6A4B 0x6A47 0x6A35 0x6A5F 0x6A48 0x6B59 0x6B77 -47 0x6C05 0x6FC2 0x6FB1 0x6FA1 0x6FC3 0x6FA4 0x6FC1 0x6FA7 \ - 0x6FB3 0x6FC0 0x6FB9 0x6FB6 0x6FA6 0x6FA0 0x6FB4 0x71BE \ - 0x71C9 0x71D0 0x71D2 0x71C8 0x71D5 0x71B9 0x71CE 0x71D9 \ - 0x71DC 0x71C3 0x71C4 0x7368 0x749C 0x74A3 0x7498 0x749F \ - 0x749E 0x74E2 0x750C 0x750D 0x7634 0x7638 0x763A 0x76E7 \ - 0x76E5 0x77A0 0x779E 0x779F 0x77A5 0x78E8 0x78DA 0x78EC \ - 0x78E7 0x79A6 0x7A4D 0x7A4E 0x7A46 0x7A4C 0x7A4B 0x7ABA \ - 0x7BD9 0x7C11 0x7BC9 0x7BE4 0x7BDB 0x7BE1 0x7BE9 0x7BE6 \ - 0x7CD5 0x7CD6 0x7E0A 0x7448 0x7453 0x743D 0x745D 0x7456 \ - 0x741E 0x7447 0x7443 0x7458 0x7449 0x744C 0x7445 0x743E \ - 0x7501 0x751E 0x757A 0x75EE 0x7602 0x7697 0x7698 0x775D \ - 0x7764 0x7753 0x7758 0x7882 0x7890 0x788A 0x787A 0x787D \ - 0x788B 0x7878 0x788D 0x7888 0x7E11 0x7E08 0x7E1B 0x7E23 \ - 0x7E1E 0x7E1D 0x7E09 0x7E10 0x7F79 0x7FB2 0x7FF0 0x7FF1 \ - 0x7FEE 0x8028 0x81B3 0x81A9 0x81A8 0x81FB 0x8208 0x8258 \ - 0x8259 0x854A 0x8559 0x8548 0x8568 0x8569 0x8543 0x8549 \ - 0x856D 0x856A 0x855E 0x8783 0x879F 0x879E 0x87A2 0x878D \ - 0x8861 0x892A 0x8932 0x8925 0x892B 0x8921 0x89AA 0x89A6 \ - 0x8AE6 0x8AFA 0x8AEB 0x8AF1 0x8B00 0x8ADC 0x8AE7 0x8AEE \ - 0x8AFE 0x8B01 0x8B02 0x8AF7 0x8AED 0x8AF3 0x8AF6 0x8AFC \ - 0x8C6B 0x8C6D 0x8C93 0x8CF4 0x8E44 0x8E31 0x8E34 0x8E42 \ - 0x8E39 0x8E35 0x8F3B 0x8F2F 0x8F38 0x8F33 0x8FA8 0x8FA6 \ - 0x9075 0x9074 0x9078 0x9072 0x907C 0x907A 0x9134 0x9192 \ - 0x9320 0x9336 0x92F8 0x9333 0x932F 0x9322 0x92FC 0x932B \ - 0x9304 0x931A 0x9310 0x9326 0x9321 0x9315 0x932E 0x9319 \ - 0x95BB 0x96A7 0x96A8 0x96AA 0x96D5 0x970E 0x9711 0x9716 \ - 0x970D 0x9713 0x970F 0x975B 0x975C 0x9766 0x9798 0x9830 \ - 0x9838 0x983B 0x9837 0x982D 0x9839 0x9824 0x9910 0x9928 \ - 0x991E 0x991B 0x9921 0x991A 0x99ED 0x99E2 0x99F1 0x9AB8 \ - 0x9ABC 0x9AFB 0x9AED 0x9B28 0x9B91 0x9D15 0x9D23 0x9D26 \ - 0x9D28 0x9D12 0x9D1B 0x9ED8 0x9ED4 0x9F8D 0x9F9C 0x512A \ - 0x511F 0x5121 0x5132 0x52F5 0x568E 0x5680 0x5690 0x5685 -48 0x5687 0x7892 0x797E 0x7983 0x7980 0x7A0F 0x7A1D 0x7AA1 \ - 0x7AA4 0x7AE9 0x7AEA 0x7B62 0x7B6B 0x7B5E 0x7B79 0x7B6F \ - 0x7B68 0x7CAE 0x7CB0 0x7D90 0x7D8A 0x7D8B 0x7D99 0x7D95 \ - 0x7D87 0x7D78 0x7D97 0x7D89 0x7D98 0x7FA3 0x7FDD 0x8057 \ - 0x8163 0x816A 0x568F 0x58D5 0x58D3 0x58D1 0x58CE 0x5B30 \ - 0x5B2A 0x5B24 0x5B7A 0x5C37 0x5C68 0x5DBC 0x5DBA 0x5DBD \ - 0x5DB8 0x5E6B 0x5F4C 0x5FBD 0x61C9 0x61C2 0x61C7 0x61E6 \ - 0x61CB 0x6232 0x6234 0x64CE 0x64CA 0x64D8 0x64E0 0x64F0 \ - 0x64E6 0x64EC 0x64F1 0x64E2 0x64ED 0x6582 0x6583 0x66D9 \ - 0x66D6 0x6A80 0x6A94 0x6A84 0x6AA2 0x6A9C 0x6ADB 0x6AA3 \ - 0x6A7E 0x6A97 0x6A90 0x6AA0 0x6B5C 0x6BAE 0x6BDA 0x6C08 \ - 0x6FD8 0x6FF1 0x6FDF 0x6FE0 0x6FDB 0x6FE4 0x6FEB 0x6FEF \ - 0x6F80 0x6FEC 0x6FE1 0x6FE9 0x6FD5 0x6FEE 0x6FF0 0x71E7 \ - 0x71DF 0x71EE 0x71E6 0x71E5 0x71ED 0x71EC 0x71F4 0x71E0 \ - 0x7235 0x7246 0x7370 0x7372 0x74A9 0x74B0 0x74A6 0x74A8 \ - 0x7646 0x7642 0x764C 0x76EA 0x77B3 0x77AA 0x77B0 0x77AC \ - 0x77A7 0x77AD 0x77EF 0x78F7 0x78FA 0x78F4 0x78EF 0x7901 \ - 0x79A7 0x79AA 0x7A57 0x7ABF 0x7C07 0x7C0D 0x7BFE 0x7BF7 \ - 0x7C0C 0x7BE0 0x7CE0 0x7CDC 0x7CDE 0x7CE2 0x7CDF 0x7CD9 \ - 0x7CDD 0x7E2E 0x7E3E 0x7E46 0x7E37 0x7E32 0x7E43 0x7E2B \ - 0x7E3D 0x7E31 0x7E45 0x7E41 0x7E34 0x7E39 0x7E48 0x7E35 \ - 0x7E3F 0x7E2F 0x7F44 0x7FF3 0x7FFC 0x8071 0x8072 0x8070 \ - 0x806F 0x8073 0x81C6 0x81C3 0x81BA 0x81C2 0x81C0 0x81BF \ - 0x81BD 0x81C9 0x81BE 0x81E8 0x8209 0x8271 0x85AA 0x816C \ - 0x815D 0x8175 0x815F 0x817D 0x816D 0x8241 0x844F 0x8484 \ - 0x847F 0x8448 0x842A 0x847B 0x8472 0x8464 0x842E 0x845C \ - 0x8453 0x8441 0x84C8 0x8462 0x8480 0x843E 0x8483 0x8471 \ - 0x844A 0x8455 0x8458 0x86FC 0x86FD 0x8715 0x8716 0x86FF \ - 0x8584 0x857E 0x859C 0x8591 0x8594 0x85AF 0x859B 0x8587 \ - 0x85A8 0x858A 0x8667 0x87C0 0x87D1 0x87B3 0x87D2 0x87C6 \ - 0x87AB 0x87BB 0x87BA 0x87C8 0x87CB 0x893B 0x8936 0x8944 \ - 0x8938 0x893D 0x89AC 0x8B0E 0x8B17 0x8B19 0x8B1B 0x8B0A -49 0x8B20 0x8B1D 0x8B04 0x8B10 0x8C41 0x8C3F 0x8C73 0x8CFA \ - 0x8CFD 0x8CFC 0x8CF8 0x8CFB 0x8DA8 0x8E49 0x8E4B 0x8E48 \ - 0x8E4A 0x8F44 0x8F3E 0x8F42 0x8F45 0x8F3F 0x907F 0x907D \ - 0x9084 0x9081 0x9082 0x9080 0x9139 0x91A3 0x919E 0x919C \ - 0x934D 0x9382 0x9328 0x9375 0x934A 0x9365 0x934B 0x9318 \ - 0x937E 0x936C 0x935B 0x9370 0x935A 0x9354 0x95CA 0x95CB \ - 0x95CC 0x95C8 0x95C6 0x96B1 0x96B8 0x96D6 0x971C 0x971E \ - 0x97A0 0x97D3 0x9846 0x98B6 0x9935 0x9A01 0x99FF 0x9BAE \ - 0x9BAB 0x9BAA 0x9BAD 0x9D3B 0x9D3F 0x9E8B 0x9ECF 0x9EDE \ - 0x9EDC 0x9EDD 0x9EDB 0x9F3E 0x9F4B 0x53E2 0x5695 0x56AE \ - 0x58D9 0x58D8 0x5B38 0x5F5E 0x61E3 0x6233 0x64F4 0x64F2 \ - 0x64FE 0x6506 0x64FA 0x64FB 0x64F7 0x65B7 0x66DC 0x6726 \ - 0x6AB3 0x6AAC 0x6AC3 0x6ABB 0x6AB8 0x6AC2 0x6AAE 0x6AAF \ - 0x6B5F 0x6B78 0x6BAF 0x7009 0x700B 0x6FFE 0x7006 0x6FFA \ - 0x7011 0x700F 0x71FB 0x71FC 0x71FE 0x71F8 0x7377 0x7375 \ - 0x74A7 0x74BF 0x7515 0x7656 0x7658 0x8858 0x88E0 0x89E7 \ - 0x8A6A 0x8A80 0x8A6F 0x8A65 0x8A78 0x8A7D 0x8A88 0x8A64 \ - 0x8A7E 0x8A67 0x8C63 0x8C88 0x8CCD 0x8CC9 0x8DED 0x8EB1 \ - 0x8F04 0x8F9E 0x8FA0 0x9043 0x9046 0x9048 0x9045 0x9040 \ - 0x904C 0x910C 0x9113 0x9115 0x916B 0x9167 0x7652 0x77BD \ - 0x77BF 0x77BB 0x77BC 0x790E 0x79AE 0x7A61 0x7A62 0x7A60 \ - 0x7AC4 0x7AC5 0x7C2B 0x7C27 0x7C2A 0x7C1E 0x7C23 0x7C21 \ - 0x7CE7 0x7E54 0x7E55 0x7E5E 0x7E5A 0x7E61 0x7E52 0x7E59 \ - 0x7F48 0x7FF9 0x7FFB 0x8077 0x8076 0x81CD 0x81CF 0x820A \ - 0x85CF 0x85A9 0x85CD 0x85D0 0x85C9 0x85B0 0x85BA 0x85B9 \ - 0x85A6 0x87EF 0x87EC 0x87F2 0x87E0 0x8986 0x89B2 0x89F4 \ - 0x8B28 0x8B39 0x8B2C 0x8B2B 0x8C50 0x8D05 0x8E59 0x8E63 \ - 0x8E66 0x8E64 0x8E5F 0x8E55 0x8EC0 0x8F49 0x8F4D 0x9087 \ - 0x9083 0x9088 0x91AB 0x91AC 0x91D0 0x9394 0x938A 0x9396 \ - 0x93A2 0x93B3 0x93AE 0x93AC 0x93B0 0x9398 0x939A 0x9397 \ - 0x95D4 0x95D6 0x95D0 0x95D5 0x96E2 0x96DC 0x96D9 0x96DB \ - 0x96DE 0x9724 0x97A3 0x97A6 0x97AD 0x97F9 0x984D 0x984F -50 0x984C 0x984E 0x9853 0x98BA 0x993E 0x993F 0x993D 0x992E \ - 0x99A5 0x9A0E 0x9AC1 0x9B03 0x9B06 0x9B4F 0x9B4E 0x9B4D \ - 0x9BCA 0x9BC9 0x9BFD 0x9BC8 0x9BC0 0x9D51 0x9D5D 0x9D60 \ - 0x9EE0 0x9F15 0x9F2C 0x5133 0x56A5 0x58DE 0x58DF 0x58E2 \ - 0x5BF5 0x9F90 0x5EEC 0x61F2 0x61F7 0x61F6 0x61F5 0x6500 \ - 0x650F 0x66E0 0x66DD 0x6AE5 0x6ADD 0x6ADA 0x6AD3 0x701B \ - 0x701F 0x7028 0x701A 0x701D 0x7015 0x7018 0x7206 0x720D \ - 0x7258 0x72A2 0x7378 0x925D 0x9255 0x9235 0x9259 0x922F \ - 0x923C 0x928F 0x925C 0x926A 0x9262 0x925F 0x926B 0x926E \ - 0x923B 0x9244 0x9241 0x959A 0x9599 0x968F 0x9696 0x96F4 \ - 0x96FC 0x9755 0x9779 0x97EE 0x97F5 0x980B 0x98F3 0x98F7 \ - 0x98FF 0x98F5 0x98EC 0x98F1 0x737A 0x74BD 0x74CA 0x74E3 \ - 0x7587 0x7586 0x765F 0x7661 0x77C7 0x7919 0x79B1 0x7A6B \ - 0x7A69 0x7C3E 0x7C3F 0x7C38 0x7C3D 0x7C37 0x7C40 0x7E6B \ - 0x7E6D 0x7E79 0x7E69 0x7E6A 0x7F85 0x7E73 0x7FB6 0x7FB9 \ - 0x7FB8 0x81D8 0x85E9 0x85DD 0x85EA 0x85D5 0x85E4 0x85E5 \ - 0x85F7 0x87FB 0x8805 0x880D 0x87F9 0x87FE 0x8960 0x895F \ - 0x8956 0x895E 0x8B41 0x8B5C 0x8B58 0x8B49 0x8B5A 0x8B4E \ - 0x8B4F 0x8B46 0x8B59 0x8D08 0x8D0A 0x8E7C 0x8E72 0x8E87 \ - 0x8E76 0x8E6C 0x8E7A 0x8E74 0x8F54 0x8F4E 0x8FAD 0x908A \ - 0x908B 0x91B1 0x91AE 0x93E1 0x93D1 0x93DF 0x93C3 0x93C8 \ - 0x93DC 0x93DD 0x93D6 0x93E2 0x93CD 0x93D8 0x93E4 0x93D7 \ - 0x93E8 0x95DC 0x96B4 0x96E3 0x972A 0x9727 0x9761 0x97DC \ - 0x97FB 0x985E 0x9858 0x985B 0x98BC 0x9945 0x9949 0x9A16 \ - 0x9A19 0x9B0D 0x9BE8 0x9BE7 0x9BD6 0x9BDB 0x9D89 0x9D61 \ - 0x9D72 0x9D6A 0x9D6C 0x9E92 0x9E97 0x9E93 0x9EB4 0x52F8 \ - 0x56A8 0x56B7 0x56B6 0x56B4 0x56BC 0x58E4 0x5B40 0x5B43 \ - 0x5B7D 0x5BF6 0x5DC9 0x61F8 0x61FA 0x6518 0x6514 0x6519 \ - 0x66E6 0x6727 0x6AEC 0x703E 0x7030 0x7032 0x7210 0x737B \ - 0x74CF 0x7662 0x7665 0x7926 0x792A 0x792C 0x792B 0x7AC7 \ - 0x7AF6 0x7C4C 0x7C43 0x7C4D 0x7CEF 0x7CF0 0x8FAE 0x7E7D \ - 0x7E7C 0x999A 0x9AE2 0x9B3D 0x9B5D 0x9CE8 0x9CEB 0x9CEF -51 0x9CEE 0x9E81 0x9F14 0x50D0 0x50D9 0x50DC 0x50D8 0x50E1 \ - 0x50EB 0x50F4 0x50E2 0x50DE 0x51F4 0x52ED 0x52EA 0x5332 \ - 0x53AE 0x53B0 0x55FB 0x5603 0x560B 0x5607 0x55F8 0x5628 \ - 0x561E 0x5618 0x7E82 0x7F4C 0x8000 0x81DA 0x8266 0x85FB \ - 0x85F9 0x8611 0x85FA 0x8606 0x860B 0x8607 0x860A 0x8814 \ - 0x8815 0x8964 0x89BA 0x89F8 0x8B70 0x8B6C 0x8B66 0x8B6F \ - 0x8B5F 0x8B6B 0x8D0F 0x8D0D 0x8E89 0x8E81 0x8E85 0x8E82 \ - 0x91B4 0x91CB 0x9418 0x9403 0x93FD 0x95E1 0x9730 0x98C4 \ - 0x9952 0x9951 0x99A8 0x9A2B 0x9A30 0x9A37 0x9A35 0x9C13 \ - 0x9C0D 0x9E79 0x9EB5 0x9EE8 0x9F2F 0x9F5F 0x9F63 0x9F61 \ - 0x5137 0x5138 0x56C1 0x56C0 0x56C2 0x5914 0x5C6C 0x5DCD \ - 0x61FC 0x61FE 0x651D 0x651C 0x6595 0x66E9 0x6AFB 0x6B04 \ - 0x6AFA 0x6BB2 0x704C 0x721B 0x72A7 0x74D6 0x74D4 0x7669 \ - 0x77D3 0x7C50 0x7E8F 0x7E8C 0x7FBC 0x8617 0x862D 0x861A \ - 0x8823 0x8822 0x8821 0x881F 0x896A 0x896C 0x89BD 0x8B74 \ - 0x8B77 0x8B7D 0x8D13 0x8E8A 0x8E8D 0x8E8B 0x8F5F 0x8FAF \ - 0x91BA 0x942E 0x9433 0x9435 0x943A 0x9438 0x9432 0x942B \ - 0x95E2 0x9738 0x9739 0x9732 0x97FF 0x9867 0x9865 0x9957 \ - 0x9A45 0x9A43 0x9A40 0x9A3E 0x9ACF 0x9B54 0x9B51 0x9C2D \ - 0x9C25 0x9DAF 0x9DB4 0x9DC2 0x9DB8 0x9E9D 0x9EEF 0x9F19 \ - 0x9F5C 0x9F66 0x9F67 0x513C 0x513B 0x56C8 0x56CA 0x56C9 \ - 0x5B7F 0x5DD4 0x5DD2 0x5F4E 0x61FF 0x6524 0x6B0A 0x6B61 \ - 0x7051 0x7058 0x7380 0x74E4 0x758A 0x766E 0x766C 0x5611 \ - 0x5651 0x5605 0x5717 0x5892 0x588C 0x5878 0x5884 0x5873 \ - 0x58AD 0x5897 0x5895 0x5877 0x5872 0x5896 0x588D 0x5910 \ - 0x596C 0x5AE7 0x5AE4 0x5AEF 0x5626 0x5AF0 0x5D7B 0x5D83 \ - 0x5D8B 0x5D8C 0x5D78 0x5E52 0x5ED0 0x5ECF 0x5FB3 0x5FB4 \ - 0x79B3 0x7C60 0x7C5F 0x807E 0x807D 0x81DF 0x8972 0x896F \ - 0x89FC 0x8B80 0x8D16 0x8D17 0x8E91 0x8E93 0x8F61 0x9148 \ - 0x9444 0x9451 0x9452 0x973D 0x973E 0x97C3 0x97C1 0x986B \ - 0x9955 0x9A55 0x9A4D 0x9AD2 0x9B1A 0x9C49 0x9C31 0x9C3E \ - 0x9C3B 0x9DD3 0x9DD7 0x9F34 0x9F6C 0x9F6A 0x9F94 0x56CC -52 0x5DD6 0x6200 0x6523 0x652B 0x652A 0x66EC 0x6B10 0x74DA \ - 0x7ACA 0x7C64 0x7C63 0x7C65 0x7E93 0x7E96 0x7E94 0x81E2 \ - 0x8638 0x863F 0x8831 0x8B8A 0x9090 0x908F 0x9463 0x9460 \ - 0x9464 0x9768 0x986F 0x995C 0x9A5A 0x9A5B 0x9A57 0x9AD3 \ - 0x9AD4 0x9AD1 0x9C54 0x9C57 0x9C56 0x9DE5 0x9E9F 0x9EF4 \ - 0x56D1 0x58E9 0x652C 0x705E 0x7671 0x7672 0x77D7 0x7F50 \ - 0x7F88 0x8836 0x8839 0x8862 0x8B93 0x8B92 0x8B96 0x8277 \ - 0x8D1B 0x91C0 0x946A 0x9742 0x9748 0x9744 0x97C6 0x9870 \ - 0x9A5F 0x9B22 0x9B58 0x9C5F 0x9DF9 0x9DFA 0x9E7C 0x9E7D \ - 0x9F07 0x9F77 0x9F72 0x5EF3 0x6B16 0x7063 0x7C6C 0x7C6E \ - 0x883B 0x89C0 0x8EA1 0x91C1 0x9472 0x9470 0x9871 0x995E \ - 0x9AD6 0x9B23 0x9ECC 0x7064 0x77DA 0x8B9A 0x9477 0x97C9 \ - 0x9A62 0x9A65 0x7E9C 0x8B9C 0x8EAA 0x91C5 0x947D 0x947E \ - 0x947C 0x9C77 0x9C78 0x9EF7 0x8C54 0x947F 0x9E1A 0x7228 \ - 0x9A6A 0x9B31 0x9E1B 0x9E1E 0x7C72 0x617B 0x616F 0x6181 \ - 0x613C 0x6142 0x6138 0x6133 0x6160 0x6169 0x617D 0x6186 \ - 0x622C 0x6228 0x644C 0x6457 0x647C 0x6455 0x6462 0x6471 \ - 0x646A 0x6456 0x643B 0x6481 0x644F 0x647E 0x6464 0x6571 \ - 0x66A5 0x669A 0x669C 0x66A6 0x66A4 0x698F 0x2460 0x2461 \ - 0x2462 0x2463 0x2464 0x2465 0x2466 0x2467 0x2468 0x2469 \ - 0x2474 0x2475 0x2476 0x2477 0x2478 0x2479 0x247A 0x247B \ - 0x247C 0x247D 0x2170 0x2171 0x2172 0x2173 0x2174 0x2175 \ - 0x2176 0x2177 0x2178 0x2179 0x4E36 0x4E3F 0x4E85 0x4EA0 \ - 0x5182 0x5196 0x51AB 0x52F9 0x5338 0x5369 0x53B6 0x590A \ - 0x5B80 0x5DDB 0x5E7A 0x5E7F 0x5EF4 0x5F50 0x5F61 0x6534 \ - 0x65E0 0x7592 0x7676 0x8FB5 0x96B6 0x5902 0xFF3E 0x30FD \ - 0x30FE 0x309D 0x309E 0xFF02 0x309B 0x309C 0x30FB 0x3007 \ - 0x30FC 0xFF3B 0xFF3D 0x273D 0x3041 0x3042 0x3043 0x3044 \ - 0x3045 0x3046 0x3047 0x3048 0x3049 0x304A 0x304B 0x304C \ - 0x304D 0x304E 0x304F 0x3050 0x3051 0x3052 0x3053 0x3054 \ - 0x3055 0x3056 0x3057 0x3058 0x3059 0x305A 0x305B 0x305C \ - 0x305D 0x305E 0x305F 0x3060 0x3061 0x3062 0x3063 0x3064 -53 0x3065 0x3066 0x3067 0x3068 0x3069 0x306A 0x306B 0x306C \ - 0x306D 0x306E 0x306F 0x3070 0x3071 0x3072 0x3073 0x3074 \ - 0x3075 0x3076 0x3077 0x3078 0x3079 0x307A 0x307B 0x307C \ - 0x307D 0x307E 0x307F 0x3080 0x3081 0x3082 0x3083 0x3084 \ - 0x3085 0x3086 0x3087 0x3088 0x3089 0x308A 0x308B 0x308C \ - 0x308D 0x308E 0x308F 0x3090 0x3091 0x3092 0x3093 0x30A1 \ - 0x30A2 0x30A3 0x30A4 0x69C5 0x69C8 0x6992 0x69B2 0x69E3 \ - 0x69C0 0x69D6 0x69D1 0x699F 0x69A2 0x69D2 0x69E1 0x69D5 \ - 0x699D 0x6998 0x6B74 0x6BA1 0x6EF0 0x6EF3 0x6F1B 0x6F0C \ - 0x6F1D 0x6F34 0x6F28 0x6F17 0x6F44 0x6F42 0x6F04 0x6F11 \ - 0x6EFA 0x6F4A 0x7191 0x718E 0x30A5 0x30A6 0x30A7 0x30A8 \ - 0x30A9 0x30AA 0x30AB 0x30AC 0x30AD 0x30AE 0x30AF 0x30B0 \ - 0x30B1 0x30B2 0x30B3 0x30B4 0x30B5 0x30B6 0x30B7 0x30B8 \ - 0x30B9 0x30BA 0x30BB 0x30BC 0x30BD 0x30BE 0x30BF 0x30C0 \ - 0x30C1 0x30C2 0x30C3 0x30C4 0x30C5 0x30C6 0x30C7 0x30C8 \ - 0x30C9 0x30CA 0x30CB 0x30CC 0x30CD 0x30CE 0x30CF 0x30D0 \ - 0x30D1 0x30D2 0x30D3 0x30D4 0x30D5 0x30D6 0x30D7 0x30D8 \ - 0x30D9 0x30DA 0x30DB 0x30DC 0x30DD 0x30DE 0x30DF 0x30E0 \ - 0x30E1 0x30E2 0x30E3 0x30E4 0x30E5 0x30E6 0x30E7 0x30E8 \ - 0x30E9 0x30EA 0x30EB 0x30EC 0x30ED 0x30EE 0x30EF 0x30F0 \ - 0x30F1 0x30F2 0x30F3 0x30F4 0x30F5 0x30F6 0x6BB9 0x6E0B \ - 0x7105 0x7314 0x7304 0x7305 0x7315 0x730D 0x772E 0x7741 \ - 0x77EA 0x7844 0x7B29 0x7B27 0x7C9D 0x7FC8 0x8126 0x811C \ - 0x8128 0x8370 0x8382 0x83AC 0x86AD 0x86CA 0x8851 0x889D \ - 0x8990 0x89D8 0x89D7 0x8A2E 0x8C59 0x8EDA 0x9033 0x9018 \ - 0x91EF 0x9AD9 0x4EB4 0x50A0 0x5090 0x5086 0x5084 0x508A \ - 0x509F 0x50A1 0x5093 0x51D5 0x5590 0x5710 0x5817 0x5844 \ - 0x582B 0x5845 0x5965 0x5BCF 0x5D56 0x5D54 0x5F3D 0x5FA4 \ - 0x63EC 0x63FA 0x63D4 0x6675 0x671C 0x68D9 0x6BF1 0x6E37 \ - 0x6E7D 0x6E86 0x74FA 0x7572 0x75DC 0x7867 0x7977 0x7A9B \ - 0x7D2A 0x718B 0x718D 0x717F 0x718C 0x717E 0x717C 0x7183 \ - 0x7188 0x7294 0x7355 0x7353 0x734F 0x7354 0x746C 0x7465 -54 0x7466 0x7461 0x746B 0x7468 0x7476 0x7460 0x7474 0x7506 \ - 0x760E 0x7607 0x76B9 0x76B7 0x76E2 0x7774 0x7777 0x7776 \ - 0x7775 0x7778 0x7D65 0x7F64 0x8020 0x8120 0x813C 0x813F \ - 0x81F0 0x81F5 0x8415 0x83BE 0x86E5 0x86D2 0x86E0 0x88B3 \ - 0x8A53 0x8A37 0x8A47 0x8A5C 0x8EF0 0x921D 0x976B 0x50C0 \ - 0x52E5 0x53AF 0x55D8 0x5711 0x5867 0x5843 0x5BDD 0x5D70 \ - 0x5D6A 0x5D74 0x5D5F 0x5D61 0x5D73 0x5E50 0x5F3F 0x5FB0 \ - 0x6135 0x612D 0x6102 0x6226 0x656E 0x65B1 0x65D4 0x6685 \ - 0x6972 0x693A 0x6EAD 0x6E95 0x7243 0x728F 0x7575 0x75EC \ - 0x7757 0x797B 0x7A21 0x7A16 0x7AE8 0x7B6A 0x7B5F 0x7D82 \ - 0x8055 0x8168 0x8246 0x8243 0x8481 0x847C 0x846A 0x9170 \ - 0x50D2 0x9B62 0x6F8A 0x8772 0x9AF0 0x9EA8 0x5292 0x878C \ - 0x9ABA 0x9B81 0x9384 0x9AFF 0x9BB3 0x9BB0 0x9EC7 0x9721 \ - 0x7C36 0x8B5E 0x9401 0x941D 0x994A 0x8B73 0x9DD4 0x77D6 \ - 0x4E42 0x4E5C 0x51F5 0x531A 0x5382 0x4E07 0x4E0C 0x4E47 \ - 0x4E8D 0x56D7 0x5140 0x5C6E 0x5F73 0x4E0F 0x5187 0x4E0E \ - 0x4E2E 0x4E93 0x4EC2 0x4EC9 0x4EC8 0x5198 0x52FC 0x536C \ - 0x53B9 0x5720 0x5903 0x592C 0x5C10 0x5DFF 0x65E1 0x6BB3 \ - 0x6BCC 0x6C14 0x723F 0x4E31 0x4E3C 0x4EE8 0x4EDC 0x4EE9 \ - 0x4EE1 0x4EDD 0x4EDA 0x520C 0x531C 0x534C 0x5722 0x5723 \ - 0x5917 0x592F 0x5B81 0x5B84 0x5C12 0x5C3B 0x5C74 0x5C73 \ - 0x5E04 0x5E80 0x5E82 0x5FC9 0x6209 0x6250 0x6C15 0x7771 \ - 0x777A 0x715B 0x777B 0x78A6 0x78AE 0x78B8 0x78B1 0x78AF \ - 0x7989 0x7987 0x7A29 0x7A2A 0x7A2D 0x7A2C 0x7A32 0x7AEC \ - 0x7AF0 0x7B81 0x7B9E 0x7B83 0x7B92 0x7BA3 0x7B9F 0x7B93 \ - 0x7B86 0x7CB8 0x7CB7 0x7DC8 0x7DB6 0x7DD1 0x7DA8 0x7DAB \ - 0x6C36 0x6C43 0x6C3F 0x6C3B 0x72AE 0x72B0 0x738A 0x79B8 \ - 0x808A 0x961E 0x4F0E 0x4F18 0x4F2C 0x4EF5 0x4F14 0x4EF1 \ - 0x4F00 0x4EF7 0x4F08 0x4F1D 0x4F02 0x4F05 0x4F22 0x4F13 \ - 0x4F04 0x4EF4 0x4F12 0x51B1 0x5213 0x5209 0x5210 0x52A6 \ - 0x5322 0x531F 0x534D 0x538A 0x5407 0x56E1 0x56DF 0x572E \ - 0x572A 0x5734 0x593C 0x5980 0x597C 0x5985 0x597B 0x597E -55 0x5977 0x597F 0x5B56 0x5C15 0x5C25 0x5C7C 0x5C7A 0x5C7B \ - 0x5C7E 0x5DDF 0x5E75 0x5E84 0x5F02 0x5F1A 0x5F74 0x5FD5 \ - 0x5FD4 0x5FCF 0x625C 0x625E 0x6264 0x6261 0x6266 0x6262 \ - 0x6259 0x6260 0x625A 0x6265 0x65EF 0x65EE 0x673E 0x6739 \ - 0x6738 0x673B 0x673A 0x673F 0x673C 0x6733 0x6C18 0x6C46 \ - 0x6C52 0x6C5C 0x6C4F 0x6C4A 0x6C54 0x6C4B 0x6C4C 0x7071 \ - 0x725E 0x72B4 0x72B5 0x738E 0x752A 0x767F 0x7A75 0x7F51 \ - 0x8278 0x827C 0x8280 0x827D 0x827F 0x864D 0x897E 0x9099 \ - 0x9097 0x9098 0x909B 0x9094 0x9622 0x9624 0x9620 0x9623 \ - 0x4F56 0x4F3B 0x4F62 0x4F49 0x4F53 0x4F64 0x4F3E 0x4F67 \ - 0x4F52 0x4F5F 0x4F41 0x4F58 0x4F2D 0x4F33 0x4F3F 0x4F61 \ - 0x518F 0x51B9 0x521C 0x521E 0x5221 0x52AD 0x52AE 0x5309 \ - 0x5363 0x5372 0x538E 0x538F 0x5430 0x5437 0x542A 0x5454 \ - 0x5445 0x5419 0x541C 0x5425 0x5418 0x7DB3 0x7DCD 0x7DCF \ - 0x7DA4 0x7F41 0x7F6F 0x7F71 0x8023 0x805B 0x8061 0x805F \ - 0x8181 0x8184 0x8213 0x824A 0x824C 0x84BD 0x8495 0x8492 \ - 0x84C3 0x8496 0x84A5 0x84B5 0x84B3 0x84A3 0x84E4 0x84D8 \ - 0x84D5 0x84B7 0x84AD 0x84DA 0x8493 0x8736 0x543D 0x544F \ - 0x5441 0x5428 0x5424 0x5447 0x56EE 0x56E7 0x56E5 0x5741 \ - 0x5745 0x574C 0x5749 0x574B 0x5752 0x5906 0x5940 0x59A6 \ - 0x5998 0x59A0 0x5997 0x598E 0x59A2 0x5990 0x598F 0x59A7 \ - 0x59A1 0x5B8E 0x5B92 0x5C28 0x5C2A 0x5C8D 0x5C8F 0x5C88 \ - 0x5C8B 0x5C89 0x5C92 0x5C8A 0x5C86 0x5C93 0x5C95 0x5DE0 \ - 0x5E0A 0x5E0E 0x5E8B 0x5E89 0x5E8C 0x5E88 0x5E8D 0x5F05 \ - 0x5F1D 0x5F78 0x5F76 0x5FD2 0x5FD1 0x5FD0 0x5FED 0x5FE8 \ - 0x5FEE 0x5FF3 0x5FE1 0x5FE4 0x5FE3 0x5FFA 0x5FEF 0x5FF7 \ - 0x5FFB 0x6000 0x5FF4 0x623A 0x6283 0x628C 0x628E 0x628F \ - 0x6294 0x6287 0x6271 0x627B 0x627A 0x6270 0x6281 0x6288 \ - 0x6277 0x627D 0x6272 0x6274 0x6537 0x65F0 0x65F4 0x65F3 \ - 0x65F2 0x65F5 0x6745 0x6747 0x6759 0x6755 0x674C 0x6748 \ - 0x675D 0x674D 0x675A 0x674B 0x6BD0 0x6C19 0x6C1A 0x6C78 \ - 0x6C67 0x6C6B 0x6C84 0x6C8B 0x6C8F 0x6C71 0x6C6F 0x6C69 -56 0x6C9A 0x6C6D 0x6C87 0x6C95 0x6C9C 0x6C66 0x6C73 0x6C65 \ - 0x6C7B 0x6C8E 0x7074 0x707A 0x7263 0x72BF 0x72BD 0x72C3 \ - 0x72C6 0x72C1 0x72BA 0x72C5 0x7395 0x7397 0x7393 0x7394 \ - 0x7392 0x753A 0x7539 0x7594 0x7595 0x7681 0x793D 0x8034 \ - 0x8095 0x8099 0x8090 0x8092 0x809C 0x8290 0x828F 0x8285 \ - 0x828E 0x8291 0x8293 0x873D 0x872B 0x8747 0x8739 0x8745 \ - 0x871D 0x88FF 0x88EA 0x88F5 0x8900 0x88ED 0x8903 0x88E9 \ - 0x89EA 0x8A9B 0x8A8E 0x8AA2 0x8A9C 0x8A94 0x8A90 0x8AA9 \ - 0x8AAC 0x8A9F 0x8A9D 0x8C67 0x8CD0 0x8CD6 0x8CD4 0x8D98 \ - 0x8D9A 0x8D97 0x8E0B 0x8E08 0x828A 0x8283 0x8284 0x8C78 \ - 0x8FC9 0x8FBF 0x909F 0x90A1 0x90A5 0x909E 0x90A7 0x90A0 \ - 0x9630 0x9628 0x962F 0x962D 0x4E33 0x4F98 0x4F7C 0x4F85 \ - 0x4F7D 0x4F80 0x4F87 0x4F76 0x4F74 0x4F89 0x4F84 0x4F77 \ - 0x4F4C 0x4F97 0x4F6A 0x4F9A 0x4F79 0x4F81 0x4F78 0x4F90 \ - 0x4F9C 0x4F94 0x4F9E 0x4F92 0x4F82 0x4F95 0x4F6B 0x4F6E \ - 0x519E 0x51BC 0x51BE 0x5235 0x5232 0x5233 0x5246 0x5231 \ - 0x52BC 0x530A 0x530B 0x533C 0x5392 0x5394 0x5487 0x547F \ - 0x5481 0x5491 0x5482 0x5488 0x546B 0x547A 0x547E 0x5465 \ - 0x546C 0x5474 0x5466 0x548D 0x546F 0x5461 0x5460 0x5498 \ - 0x5463 0x5467 0x5464 0x56F7 0x56F9 0x576F 0x5772 0x576D \ - 0x576B 0x5771 0x5770 0x5776 0x5780 0x5775 0x577B 0x5773 \ - 0x5774 0x5762 0x5768 0x577D 0x590C 0x5945 0x59B5 0x59BA \ - 0x59CF 0x59CE 0x59B2 0x59CC 0x59C1 0x59B6 0x59BC 0x59C3 \ - 0x59D6 0x59B1 0x59BD 0x59C0 0x59C8 0x59B4 0x59C7 0x5B62 \ - 0x5B65 0x5B93 0x5B95 0x5C44 0x5C47 0x5CAE 0x5CA4 0x5CA0 \ - 0x5CB5 0x5CAF 0x5CA8 0x5CAC 0x5C9F 0x5CA3 0x5CAD 0x5CA2 \ - 0x5CAA 0x5CA7 0x5C9D 0x5CA5 0x5CB6 0x5CB0 0x5CA6 0x5E17 \ - 0x5E14 0x5E19 0x5F28 0x5F22 0x5F23 0x5F24 0x5F54 0x5F82 \ - 0x5F7E 0x5F7D 0x5FDE 0x5FE5 0x602D 0x6026 0x6019 0x6032 \ - 0x600B 0x8E01 0x8EB4 0x8EB3 0x8FA1 0x8FA2 0x905A 0x9061 \ - 0x905F 0x9125 0x917B 0x9176 0x917C 0x9289 0x92F6 0x92B1 \ - 0x92AD 0x9292 0x9281 0x9284 0x92AE 0x9290 0x929E 0x95A2 -57 0x95A7 0x96A0 0x969D 0x969F 0x96D0 0x96D1 0x9759 0x9764 \ - 0x9819 0x9814 0x6034 0x600A 0x6017 0x6033 0x601A 0x601E \ - 0x602C 0x6022 0x600D 0x6010 0x602E 0x6013 0x6011 0x600C \ - 0x6009 0x601C 0x6214 0x623D 0x62AD 0x62B4 0x62D1 0x62BE \ - 0x62AA 0x62B6 0x62CA 0x62AE 0x62B3 0x62AF 0x62BB 0x62A9 \ - 0x62B0 0x62B8 0x653D 0x65A8 0x65BB 0x6609 0x65FC 0x6604 \ - 0x6612 0x6608 0x65FB 0x6603 0x660B 0x660D 0x6605 0x65FD \ - 0x6611 0x6610 0x66F6 0x670A 0x6785 0x676C 0x678E 0x6792 \ - 0x6776 0x677B 0x6798 0x6786 0x6784 0x6774 0x678D 0x678C \ - 0x677A 0x679F 0x6791 0x6799 0x6783 0x677D 0x6781 0x6778 \ - 0x6779 0x6794 0x6B25 0x6B80 0x6B7E 0x6BDE 0x6C1D 0x6C93 \ - 0x6CEC 0x6CEB 0x6CEE 0x6CD9 0x6CB6 0x6CD4 0x6CAD 0x6CE7 \ - 0x6CB7 0x6CD0 0x6CC2 0x6CBA 0x6CC3 0x6CC6 0x6CED 0x6CF2 \ - 0x6CD2 0x6CDD 0x6CB4 0x6C8A 0x6C9D 0x6C80 0x6CDE 0x6CC0 \ - 0x6D30 0x6CCD 0x6CC7 0x6CB0 0x6CF9 0x6CCF 0x6CE9 0x6CD1 \ - 0x7094 0x7098 0x7085 0x7093 0x7086 0x7084 0x7091 0x7096 \ - 0x7082 0x709A 0x7083 0x726A 0x72D6 0x72CB 0x72D8 0x72C9 \ - 0x72DC 0x72D2 0x72D4 0x72DA 0x72CC 0x72D1 0x73A4 0x73A1 \ - 0x73AD 0x73A6 0x73A2 0x73A0 0x73AC 0x739D 0x74DD 0x74E8 \ - 0x753F 0x7540 0x753E 0x758C 0x7598 0x76AF 0x76F3 0x76F1 \ - 0x76F0 0x76F5 0x77F8 0x77FC 0x77F9 0x77FB 0x77FA 0x9815 \ - 0x981A 0x9906 0x98F8 0x9901 0x99BE 0x99BC 0x99B7 0x99B6 \ - 0x99C0 0x99B8 0x99C4 0x99BF 0x9ADA 0x9AE4 0x9AE9 0x9AE8 \ - 0x9AEA 0x9AE5 0x9B26 0x9B40 0x9EBD 0x510E 0x50F7 0x50FC \ - 0x510D 0x5101 0x51DA 0x51D9 0x51DB 0x5286 0x528E 0x52EE \ - 0x77F7 0x7942 0x793F 0x79C5 0x7A78 0x7A7B 0x7AFB 0x7C75 \ - 0x7CFD 0x8035 0x808F 0x80AE 0x80A3 0x80B8 0x80B5 0x80AD \ - 0x8220 0x82A0 0x82C0 0x82AB 0x829A 0x8298 0x829B 0x82B5 \ - 0x82A7 0x82AE 0x82BC 0x829E 0x82BA 0x82B4 0x82A8 0x82A1 \ - 0x82A9 0x82C2 0x82A4 0x82C3 0x82B6 0x82A2 0x8670 0x866F \ - 0x866D 0x866E 0x8C56 0x8FD2 0x8FCB 0x8FD3 0x8FCD 0x8FD6 \ - 0x8FD5 0x8FD7 0x90B2 0x90B4 0x90AF 0x90B3 0x90B0 0x9639 -58 0x963D 0x963C 0x963A 0x9643 0x4FCD 0x4FC5 0x4FD3 0x4FB2 \ - 0x4FC9 0x4FCB 0x4FC1 0x4FD4 0x4FDC 0x4FD9 0x4FBB 0x4FB3 \ - 0x4FDB 0x4FC7 0x4FD6 0x4FBA 0x4FC0 0x4FB9 0x4FEC 0x5244 \ - 0x5249 0x52C0 0x52C2 0x533D 0x537C 0x5397 0x5396 0x5399 \ - 0x5398 0x54BA 0x54A1 0x54AD 0x54A5 0x54CF 0x54C3 0x830D \ - 0x54B7 0x54AE 0x54D6 0x54B6 0x54C5 0x54C6 0x54A0 0x5470 \ - 0x54BC 0x54A2 0x54BE 0x5472 0x54DE 0x54B0 0x57B5 0x579E \ - 0x579F 0x57A4 0x578C 0x5797 0x579D 0x579B 0x5794 0x5798 \ - 0x578F 0x5799 0x57A5 0x579A 0x5795 0x58F4 0x590D 0x5953 \ - 0x59E1 0x59DE 0x59EE 0x5A00 0x59F1 0x59DD 0x59FA 0x59FD \ - 0x59FC 0x59F6 0x59E4 0x59F2 0x59F7 0x59DB 0x59E9 0x59F3 \ - 0x59F5 0x59E0 0x59FE 0x59F4 0x59ED 0x5BA8 0x5C4C 0x5CD0 \ - 0x5CD8 0x5CCC 0x5CD7 0x5CCB 0x5CDB 0x5333 0x53B1 0x5647 \ - 0x562D 0x5654 0x564B 0x5652 0x5631 0x5644 0x5656 0x5650 \ - 0x562B 0x564D 0x5637 0x564F 0x58A2 0x58B7 0x58B2 0x58AA \ - 0x58B5 0x58B0 0x58B4 0x58A4 0x58A7 0x5926 0x5AFE 0x5B04 \ - 0x5AFC 0x5B06 0x5B0A 0x5B0D 0x5B00 0x5B0E 0x5CDE 0x5CDA \ - 0x5CC9 0x5CC7 0x5CCA 0x5CD6 0x5CD3 0x5CD4 0x5CCF 0x5CC8 \ - 0x5CC6 0x5CCE 0x5CDF 0x5CF8 0x5DF9 0x5E21 0x5E22 0x5E23 \ - 0x5E20 0x5E24 0x5EB0 0x5EA4 0x5EA2 0x5E9B 0x5EA3 0x5EA5 \ - 0x5F07 0x5F2E 0x5F56 0x5F86 0x6037 0x6039 0x6054 0x6072 \ - 0x605E 0x6045 0x6053 0x6047 0x6049 0x605B 0x604C 0x6040 \ - 0x6042 0x605F 0x6024 0x6044 0x6058 0x6066 0x606E 0x6242 \ - 0x6243 0x62CF 0x630D 0x630B 0x62F5 0x630E 0x6303 0x62EB \ - 0x62F9 0x630F 0x630C 0x62F8 0x62F6 0x6300 0x6313 0x6314 \ - 0x62FA 0x6315 0x62FB 0x62F0 0x6541 0x6543 0x65AA 0x65BF \ - 0x6636 0x6621 0x6632 0x6635 0x661C 0x6626 0x6622 0x6633 \ - 0x662B 0x663A 0x661D 0x6634 0x6639 0x662E 0x670F 0x6710 \ - 0x67C1 0x67F2 0x67C8 0x67BA 0x67DC 0x67BB 0x67F8 0x67D8 \ - 0x67C0 0x67B7 0x67C5 0x67EB 0x67E4 0x67DF 0x67B5 0x67CD \ - 0x67B3 0x67F7 0x67F6 0x67EE 0x67E3 0x67C2 0x67B9 0x67CE \ - 0x67E7 0x67F0 0x67B2 0x67FC 0x67C6 0x67ED 0x67CC 0x67AE -59 0x67E6 0x67DB 0x67FA 0x67C9 0x67CA 0x67C3 0x67EA 0x67CB \ - 0x6B28 0x6B82 0x6B84 0x6BB6 0x6BD6 0x6BD8 0x6BE0 0x6C20 \ - 0x6C21 0x6D28 0x6D34 0x6D2D 0x6D1F 0x6D3C 0x6D3F 0x6D12 \ - 0x6D0A 0x6CDA 0x6D33 0x6D04 0x6D19 0x6D3A 0x6D1A 0x6D11 \ - 0x6D00 0x6D1D 0x6D42 0x5D91 0x5D8F 0x5D90 0x5D98 0x5DA4 \ - 0x5D9B 0x5DA3 0x5D96 0x5DE4 0x5E5A 0x5E5E 0x5FB8 0x6157 \ - 0x615C 0x61A6 0x6195 0x6188 0x61A3 0x618F 0x6164 0x6159 \ - 0x6178 0x6185 0x6187 0x619E 0x6198 0x619C 0x622F 0x6480 \ - 0x649B 0x648E 0x648D 0x6494 0x6D01 0x6D18 0x6D37 0x6D03 \ - 0x6D0F 0x6D40 0x6D07 0x6D20 0x6D2C 0x6D08 0x6D22 0x6D09 \ - 0x6D10 0x70B7 0x709F 0x70BE 0x70B1 0x70B0 0x70A1 0x70B4 \ - 0x70B5 0x70A9 0x7241 0x7249 0x724A 0x726C 0x7270 0x7273 \ - 0x726E 0x72CA 0x72E4 0x72E8 0x72EB 0x72DF 0x72EA 0x72E6 \ - 0x72E3 0x7385 0x73CC 0x73C2 0x73C8 0x73C5 0x73B9 0x73B6 \ - 0x73B5 0x73B4 0x73EB 0x73BF 0x73C7 0x73BE 0x73C3 0x73C6 \ - 0x73B8 0x73CB 0x74EC 0x74EE 0x752E 0x7547 0x7548 0x75A7 \ - 0x75AA 0x7679 0x76C4 0x7708 0x7703 0x7704 0x7705 0x770A \ - 0x76F7 0x76FB 0x76FA 0x77E7 0x77E8 0x7806 0x7811 0x7812 \ - 0x7805 0x7810 0x780F 0x780E 0x7809 0x7803 0x7813 0x794A \ - 0x794C 0x794B 0x7945 0x7944 0x79D5 0x79CD 0x79CF 0x79D6 \ - 0x79CE 0x7A80 0x7A7E 0x7AD1 0x7B00 0x7B01 0x7C7A 0x7C78 \ - 0x7C79 0x7C7F 0x7C80 0x7C81 0x7D03 0x7D08 0x7D01 0x7F58 \ - 0x7F91 0x7F8D 0x7FBE 0x8007 0x800E 0x800F 0x8014 0x8037 \ - 0x80D8 0x80C7 0x80E0 0x80D1 0x80C8 0x80C2 0x80D0 0x80C5 \ - 0x80E3 0x80D9 0x80DC 0x80CA 0x80D5 0x80C9 0x80CF 0x80D7 \ - 0x80E6 0x80CD 0x81FF 0x8221 0x8294 0x82D9 0x82FE 0x82F9 \ - 0x8307 0x82E8 0x8300 0x82D5 0x833A 0x82EB 0x82D6 0x82F4 \ - 0x82EC 0x82E1 0x82F2 0x82F5 0x830C 0x82FB 0x82F6 0x82F0 \ - 0x82EA 0x64C6 0x64A8 0x6483 0x64B9 0x6486 0x64B4 0x64AF \ - 0x6491 0x64AA 0x64A1 0x64A7 0x66B6 0x66B3 0x66BC 0x66AC \ - 0x66AD 0x6A0E 0x6A1C 0x6A1A 0x6A0B 0x69EF 0x6A0C 0x69F0 \ - 0x6A22 0x69D8 0x6A12 0x69FA 0x6A2A 0x6A10 0x6A29 0x69F9 -60 0x69EA 0x6A2C 0x82E4 0x82E0 0x82FA 0x82F3 0x82ED 0x8677 \ - 0x8674 0x867C 0x8673 0x8841 0x884E 0x8867 0x886A 0x8869 \ - 0x89D3 0x8A04 0x8A07 0x8D72 0x8FE3 0x8FE1 0x8FEE 0x8FE0 \ - 0x90F1 0x90BD 0x90BF 0x90D5 0x90C5 0x90BE 0x90C7 0x90CB \ - 0x90C8 0x91D4 0x91D3 0x9654 0x964F 0x9651 0x9653 0x964A \ - 0x964E 0x501E 0x5005 0x5007 0x5013 0x5022 0x5030 0x501B \ - 0x4FF5 0x4FF4 0x5033 0x5037 0x502C 0x4FF6 0x4FF7 0x5017 \ - 0x501C 0x5020 0x5027 0x5035 0x502F 0x5031 0x500E 0x515A \ - 0x5194 0x5193 0x51CA 0x51C4 0x51C5 0x51C8 0x51CE 0x5261 \ - 0x525A 0x5252 0x525E 0x525F 0x5255 0x5262 0x52CD 0x530E \ - 0x539E 0x5526 0x54E2 0x5517 0x5512 0x54E7 0x54F3 0x54E4 \ - 0x551A 0x54FF 0x5504 0x5508 0x54EB 0x5511 0x5505 0x54F1 \ - 0x550A 0x54FB 0x54F7 0x54F8 0x54E0 0x550E 0x5503 0x550B \ - 0x5701 0x5702 0x57CC 0x5832 0x57D5 0x57D2 0x57BA 0x57C6 \ - 0x57BD 0x57BC 0x57B8 0x57B6 0x57BF 0x57C7 0x57D0 0x57B9 \ - 0x57C1 0x590E 0x594A 0x5A19 0x5A16 0x5A2D 0x5A2E 0x5A15 \ - 0x5A0F 0x5A17 0x5A0A 0x5A1E 0x5A33 0x5B6C 0x5BA7 0x5BAD \ - 0x5BAC 0x5C03 0x5C56 0x5C54 0x5CEC 0x5CFF 0x5CEE 0x5CF1 \ - 0x5CF7 0x5D00 0x5CF9 0x5E29 0x5E28 0x5EA8 0x5EAE 0x5EAA \ - 0x5EAC 0x5F33 0x5F30 0x5F67 0x605D 0x605A 0x6067 0x6A24 \ - 0x69E9 0x6B52 0x6B4F 0x6B53 0x6F10 0x6F65 0x6F75 0x6FD0 \ - 0x6F5C 0x6F3D 0x6F71 0x6F91 0x6F0B 0x6F79 0x6F81 0x6F8F \ - 0x6F59 0x6F74 0x71AE 0x71A3 0x71AD 0x71AB 0x71A6 0x71A2 \ - 0x52F2 0x7257 0x7255 0x7299 0x734B 0x747A 0x748C 0x7484 \ - 0x6041 0x60A2 0x6088 0x6080 0x6092 0x6081 0x609D 0x6083 \ - 0x6095 0x609B 0x6097 0x6087 0x609C 0x608E 0x6219 0x6246 \ - 0x62F2 0x6310 0x6356 0x632C 0x6344 0x6345 0x6336 0x6343 \ - 0x63E4 0x6339 0x634B 0x634A 0x633C 0x6329 0x6341 0x6334 \ - 0x6358 0x6354 0x6359 0x632D 0x6347 0x6333 0x635A 0x6351 \ - 0x6338 0x6357 0x6340 0x6348 0x654A 0x6546 0x65C6 0x65C3 \ - 0x65C4 0x65C2 0x664A 0x665F 0x6647 0x6651 0x6712 0x6713 \ - 0x681F 0x681A 0x6849 0x6832 0x6833 0x683B 0x684B 0x684F -61 0x6816 0x6831 0x681C 0x6835 0x682B 0x682D 0x682F 0x684E \ - 0x6844 0x6834 0x681D 0x6812 0x6814 0x6826 0x6828 0x682E \ - 0x684D 0x683A 0x6825 0x6820 0x6B2C 0x6B2F 0x6B2D 0x6B31 \ - 0x6B34 0x6B6D 0x8082 0x6B88 0x6BE6 0x6BE4 0x6BE8 0x6BE3 \ - 0x6BE2 0x6BE7 0x6C25 0x6D7A 0x6D63 0x6D64 0x6D76 0x6D0D \ - 0x6D61 0x6D92 0x6D58 0x6D62 0x6D6D 0x6D6F 0x6D91 0x6D8D \ - 0x6DEF 0x6D7F 0x6D86 0x6D5E 0x6D67 0x6D60 0x6D97 0x6D70 \ - 0x6D7C 0x6D5F 0x6D82 0x6D98 0x6D2F 0x6D68 0x6D8B 0x6D7E \ - 0x6D80 0x6D84 0x6D16 0x6D83 0x6D7B 0x6D7D 0x6D75 0x6D90 \ - 0x70DC 0x70D3 0x70D1 0x70DD 0x70CB 0x7F39 0x70E2 0x70D7 \ - 0x70D2 0x70DE 0x70E0 0x70D4 0x70CD 0x70C5 0x70C6 0x70C7 \ - 0x70DA 0x70CE 0x70E1 0x7242 0x7278 0x7482 0x7493 0x747B \ - 0x7509 0x778A 0x7790 0x78C6 0x78D3 0x78C0 0x78D2 0x78C7 \ - 0x78C2 0x799F 0x799D 0x799E 0x7A41 0x7A38 0x7A3A 0x7A42 \ - 0x7A3E 0x7AB0 0x7BAE 0x7BB3 0x7BBF 0x7BCD 0x7BB2 0x7CC4 \ - 0x7CCD 0x7CC2 0x7CC6 0x7CC3 0x7CC9 0x7CC7 0x7277 0x7276 \ - 0x7300 0x72FA 0x72F4 0x72FE 0x72F6 0x72F3 0x72FB 0x7301 \ - 0x73D3 0x73D9 0x73E5 0x73D6 0x73BC 0x73E7 0x73E3 0x73E9 \ - 0x73DC 0x73D2 0x73DB 0x73D4 0x73DD 0x73DA 0x73D7 0x73D8 \ - 0x73E8 0x74DE 0x74DF 0x74F4 0x74F5 0x7521 0x755B 0x755F \ - 0x75B0 0x75C1 0x75BB 0x75C4 0x75C0 0x75BF 0x75B6 0x75BA \ - 0x768A 0x76C9 0x771D 0x771B 0x7710 0x7713 0x7712 0x7723 \ - 0x7711 0x7715 0x7719 0x771A 0x7722 0x7727 0x7823 0x782C \ - 0x7822 0x7835 0x782F 0x7828 0x782E 0x782B 0x7821 0x7829 \ - 0x7833 0x782A 0x7831 0x7954 0x795B 0x794F 0x795C 0x7953 \ - 0x7952 0x7951 0x79EB 0x79EC 0x79E0 0x79EE 0x79ED 0x79EA \ - 0x79DC 0x79DE 0x79DD 0x7A86 0x7A89 0x7A85 0x7A8B 0x7A8C \ - 0x7A8A 0x7A87 0x7AD8 0x7B10 0x7B04 0x7B13 0x7B05 0x7B0F \ - 0x7B08 0x7B0A 0x7B0E 0x7B09 0x7B12 0x7C84 0x7C91 0x7C8A \ - 0x7C8C 0x7C88 0x7C8D 0x7C85 0x7D1E 0x7D1D 0x7D11 0x7D0E \ - 0x7D18 0x7D16 0x7D13 0x7D1F 0x7D12 0x7D0F 0x7D0C 0x7F5C \ - 0x7F61 0x7F5E 0x7F60 0x7F5D 0x7F5B 0x7F96 0x7F92 0x7FC3 -62 0x7FC2 0x7FC0 0x8016 0x803E 0x8039 0x80FA 0x80F2 0x80F9 \ - 0x80F5 0x8101 0x80FB 0x8100 0x8201 0x822F 0x8225 0x8333 \ - 0x832D 0x8344 0x8319 0x8351 0x8325 0x8356 0x833F 0x8341 \ - 0x8326 0x831C 0x8322 0x7DF8 0x7DED 0x7DE2 0x7DDC 0x7E02 \ - 0x7E01 0x7DD6 0x7DE4 0x7DFE 0x7E00 0x7DFC 0x7DFD 0x7DF5 \ - 0x7DFF 0x7DEB 0x7DE5 0x7F78 0x7FAE 0x7FE7 0x8065 0x806A \ - 0x8066 0x8068 0x806B 0x8194 0x81A1 0x8192 0x8196 0x8193 \ - 0x8501 0x84F8 0x84F5 0x8504 0x8342 0x834E 0x831B 0x832A \ - 0x8308 0x833C 0x834D 0x8316 0x8324 0x8320 0x8337 0x832F \ - 0x8329 0x8347 0x8345 0x834C 0x8353 0x831E 0x832C 0x834B \ - 0x8327 0x8348 0x8653 0x8652 0x86A2 0x86A8 0x8696 0x868D \ - 0x8691 0x869E 0x8687 0x8697 0x8686 0x868B 0x869A 0x8685 \ - 0x86A5 0x8699 0x86A1 0x86A7 0x8695 0x8698 0x868E 0x869D \ - 0x8690 0x8694 0x8843 0x8844 0x886D 0x8875 0x8876 0x8872 \ - 0x8880 0x8871 0x887F 0x886F 0x8883 0x887E 0x8874 0x887C \ - 0x8A12 0x8C47 0x8C57 0x8C7B 0x8CA4 0x8CA3 0x8D76 0x8D78 \ - 0x8DB5 0x8DB7 0x8DB6 0x8ED1 0x8ED3 0x8FFE 0x8FF5 0x9002 \ - 0x8FFF 0x8FFB 0x9004 0x8FFC 0x8FF6 0x90D6 0x90E0 0x90D9 \ - 0x90DA 0x90E3 0x90DF 0x90E5 0x90D8 0x90DB 0x90D7 0x90DC \ - 0x90E4 0x9150 0x914E 0x914F 0x91D5 0x91E2 0x91DA 0x965C \ - 0x965F 0x96BC 0x98E3 0x9ADF 0x9B2F 0x4E7F 0x5070 0x506A \ - 0x5061 0x505E 0x5060 0x5053 0x504B 0x505D 0x5072 0x5048 \ - 0x504D 0x5041 0x505B 0x504A 0x5062 0x5015 0x5045 0x505F \ - 0x5069 0x506B 0x5063 0x5064 0x5046 0x5040 0x506E 0x5073 \ - 0x5057 0x5051 0x51D0 0x526B 0x526D 0x526C 0x526E 0x52D6 \ - 0x52D3 0x532D 0x539C 0x5575 0x5576 0x553C 0x554D 0x5550 \ - 0x5534 0x552A 0x5551 0x5562 0x5536 0x5535 0x5530 0x5552 \ - 0x5545 0x851B 0x8503 0x8533 0x8534 0x84ED 0x8535 0x8505 \ - 0x877D 0x8771 0x885C 0x88E6 0x890F 0x891B 0x89A9 0x89A5 \ - 0x89EE 0x8AB1 0x8ACC 0x8ACE 0x8AB7 0x8AB5 0x8AE9 0x8AB4 \ - 0x8AB3 0x8AC1 0x8AAF 0x8ACA 0x8AD0 0x8C8E 0x8CE9 0x8CDB \ - 0x8CEB 0x8DA4 0x550C 0x5532 0x5565 0x554E 0x5539 0x5548 -63 0x552D 0x553B 0x5540 0x554B 0x570A 0x5707 0x57FB 0x5814 \ - 0x57E2 0x57F6 0x57DC 0x57F4 0x5800 0x57ED 0x57FD 0x5808 \ - 0x57F8 0x580B 0x57F3 0x57CF 0x5807 0x57EE 0x57E3 0x57F2 \ - 0x57E5 0x57EC 0x57E1 0x580E 0x57FC 0x5810 0x57E7 0x5801 \ - 0x580C 0x57F1 0x57E9 0x57F0 0x580D 0x5804 0x595C 0x5A60 \ - 0x5A58 0x5A55 0x5A67 0x5A5E 0x5A38 0x5A35 0x5A6D 0x5A50 \ - 0x5A5F 0x5A65 0x5A6C 0x5A53 0x5A64 0x5A57 0x5A43 0x5A5D \ - 0x5A52 0x5A44 0x5A5B 0x5A48 0x5A8E 0x5A3E 0x5A4D 0x5A39 \ - 0x5A4C 0x5A70 0x5A69 0x5A47 0x5A51 0x5A56 0x5A42 0x5A5C \ - 0x5B72 0x5B6E 0x5BC1 0x5BC0 0x5C59 0x5D1E 0x5D0B 0x5D1D \ - 0x5D1A 0x5D20 0x5D0C 0x5D28 0x5D0D 0x5D26 0x5D25 0x5D0F \ - 0x5D30 0x5D12 0x5D23 0x5D1F 0x5D2E 0x5E3E 0x5E34 0x5EB1 \ - 0x5EB4 0x5EB9 0x5EB2 0x5EB3 0x5F36 0x5F38 0x5F9B 0x5F96 \ - 0x5F9F 0x608A 0x6090 0x6086 0x60BE 0x60B0 0x60BA 0x60D3 \ - 0x60D4 0x60CF 0x60E4 0x60D9 0x60DD 0x60C8 0x60B1 0x60DB \ - 0x60B7 0x60CA 0x60BF 0x60C3 0x60CD 0x60C0 0x6332 0x6365 \ - 0x638A 0x6382 0x637D 0x63BD 0x639E 0x63AD 0x639D 0x6397 \ - 0x63AB 0x638E 0x636F 0x6387 0x6390 0x636E 0x63AF 0x6375 \ - 0x639C 0x636D 0x63AE 0x637C 0x63A4 0x633B 0x639F 0x8DA2 \ - 0x8D9D 0x8E2A 0x8E28 0x8EB8 0x8EB6 0x8EB9 0x8EB7 0x8F22 \ - 0x8F2B 0x8F27 0x8F19 0x8FA4 0x8FB3 0x9071 0x906A 0x9188 \ - 0x918C 0x92BF 0x92B8 0x92BE 0x92DC 0x92E5 0x92D4 0x92D6 \ - 0x92DA 0x92ED 0x92F3 0x92DB 0x92E2 0x92EB 0x95AF 0x95B2 \ - 0x6378 0x6385 0x6381 0x6391 0x638D 0x6370 0x6553 0x65CD \ - 0x6665 0x6661 0x665B 0x6659 0x665C 0x6662 0x6718 0x6879 \ - 0x6887 0x6890 0x689C 0x686D 0x686E 0x68AE 0x68AB 0x6956 \ - 0x686F 0x68A3 0x68AC 0x68A9 0x6875 0x6874 0x68B2 0x688F \ - 0x6877 0x6892 0x687C 0x686B 0x6872 0x68AA 0x6880 0x6871 \ - 0x687E 0x689B 0x6896 0x688B 0x68A0 0x6889 0x68A4 0x6878 \ - 0x687B 0x6891 0x688C 0x688A 0x687D 0x6B36 0x6B33 0x6B37 \ - 0x6B38 0x6B91 0x6B8F 0x6B8D 0x6B8E 0x6B8C 0x6C2A 0x6DC0 \ - 0x6DAB 0x6DB4 0x6DB3 0x6E74 0x6DAC 0x6DE9 0x6DE2 0x6DB7 -64 0x6DF6 0x6DD4 0x6E00 0x6DC8 0x6DE0 0x6DDF 0x6DD6 0x6DBE \ - 0x6DE5 0x6DDC 0x6DDD 0x6DDB 0x6DF4 0x6DCA 0x6DBD 0x6DED \ - 0x6DF0 0x6DBA 0x6DD5 0x6DC2 0x6DCF 0x6DC9 0x6DD0 0x6DF2 \ - 0x6DD3 0x6DFD 0x6DD7 0x6DCD 0x6DE3 0x6DBB 0x70FA 0x710D \ - 0x70F7 0x7117 0x70F4 0x710C 0x70F0 0x7104 0x70F3 0x7110 \ - 0x70FC 0x70FF 0x7106 0x7113 0x7100 0x70F8 0x70F6 0x710B \ - 0x7102 0x710E 0x727E 0x727B 0x727C 0x727F 0x731D 0x7317 \ - 0x7307 0x7311 0x7318 0x730A 0x7308 0x72FF 0x730F 0x731E \ - 0x7388 0x73F6 0x73F8 0x73F5 0x7404 0x7401 0x73FD 0x7407 \ - 0x7400 0x73FA 0x73FC 0x73FF 0x740C 0x740B 0x73F4 0x7408 \ - 0x7564 0x7563 0x75CE 0x75D2 0x75CF 0x95B3 0x96A3 0x96A5 \ - 0x970A 0x9787 0x9789 0x978C 0x97EF 0x982A 0x9822 0x981F \ - 0x9919 0x99CA 0x99DA 0x99DE 0x99C8 0x99E0 0x9AB6 0x9AB5 \ - 0x9AF4 0x9B6B 0x9B69 0x9B72 0x9B63 0x9D0D 0x9D01 0x9D0C \ - 0x9CF8 0x9CFE 0x9D02 0x9E84 0x9EAB 0x9EAA 0x75CB 0x75CC \ - 0x75D1 0x75D0 0x768F 0x7689 0x76D3 0x7739 0x772F 0x772D \ - 0x7731 0x7732 0x7734 0x7733 0x773D 0x7725 0x773B 0x7735 \ - 0x7848 0x7852 0x7849 0x784D 0x784A 0x784C 0x7826 0x7845 \ - 0x7850 0x7964 0x7967 0x7969 0x796A 0x7963 0x796B 0x7961 \ - 0x79BB 0x79FA 0x79F8 0x79F6 0x79F7 0x7A8F 0x7A94 0x7A90 \ - 0x7B35 0x7B47 0x7B34 0x7B25 0x7B30 0x7B22 0x7B24 0x7B33 \ - 0x7B18 0x7B2A 0x7B1D 0x7B31 0x7B2B 0x7B2D 0x7B2F 0x7B32 \ - 0x7B38 0x7B1A 0x7B23 0x7C94 0x7C98 0x7C96 0x7CA3 0x7D35 \ - 0x7D3D 0x7D38 0x7D36 0x7D3A 0x7D45 0x7D2C 0x7D29 0x7D41 \ - 0x7D47 0x7D3E 0x7D3F 0x7D4A 0x7D3B 0x7D28 0x7F63 0x7F95 \ - 0x7F9C 0x7F9D 0x7F9B 0x7FCA 0x7FCB 0x7FCD 0x7FD0 0x7FD1 \ - 0x7FC7 0x7FCF 0x7FC9 0x801F 0x801E 0x801B 0x8047 0x8043 \ - 0x8048 0x8118 0x8125 0x8119 0x811B 0x812D 0x811F 0x812C \ - 0x811E 0x8121 0x8115 0x8127 0x811D 0x8122 0x8211 0x8238 \ - 0x8233 0x823A 0x8234 0x8232 0x8274 0x8390 0x83A3 0x83A8 \ - 0x838D 0x837A 0x8373 0x83A4 0x8374 0x838F 0x8381 0x8395 \ - 0x8399 0x8375 0x8394 0x83A9 0x837D 0x8383 0x838C 0x839D -65 0x839B 0x83AA 0x838B 0x837E 0x83A5 0x83AF 0x8388 0x8397 \ - 0x83B0 0x837F 0x83A6 0x8387 0x83AE 0x8376 0x839A 0x8659 \ - 0x8656 0x86BF 0x86B7 0x511D 0x5116 0x512B 0x511E 0x511B \ - 0x5290 0x5294 0x5314 0x5667 0x567B 0x565F 0x5661 0x58C3 \ - 0x58CA 0x58C0 0x58C4 0x5901 0x5B1F 0x5B18 0x5B11 0x5B15 \ - 0x5B12 0x5B1C 0x5B22 0x5B79 0x5DA6 0x5DB3 0x5DAB 0x5EEA \ - 0x5F5B 0x61B7 0x61CE 0x61B9 0x86C2 0x86C1 0x86C5 0x86BA \ - 0x86B0 0x86C8 0x86B9 0x86B3 0x86B8 0x86CC 0x86B4 0x86BB \ - 0x86BC 0x86C3 0x86BD 0x86BE 0x8852 0x8889 0x8895 0x88A8 \ - 0x88A2 0x88AA 0x889A 0x8891 0x88A1 0x889F 0x8898 0x88A7 \ - 0x8899 0x889B 0x8897 0x88A4 0x88AC 0x888C 0x8893 0x888E \ - 0x8982 0x89D6 0x89D9 0x89D5 0x8A30 0x8A27 0x8A2C 0x8A1E \ - 0x8C39 0x8C3B 0x8C5C 0x8C5D 0x8C7D 0x8CA5 0x8D7D 0x8D7B \ - 0x8D79 0x8DBC 0x8DC2 0x8DB9 0x8DBF 0x8DC1 0x8ED8 0x8EDE \ - 0x8EDD 0x8EDC 0x8ED7 0x8EE0 0x8EE1 0x9024 0x900B 0x9011 \ - 0x901C 0x900C 0x9021 0x90EF 0x90EA 0x90F0 0x90F4 0x90F2 \ - 0x90F3 0x90D4 0x90EB 0x90EC 0x90E9 0x9156 0x9158 0x915A \ - 0x9153 0x9155 0x91EC 0x91F4 0x91F1 0x91F3 0x91F8 0x91E4 \ - 0x91F9 0x91EA 0x91EB 0x91F7 0x91E8 0x91EE 0x957A 0x9586 \ - 0x9588 0x967C 0x966D 0x966B 0x9671 0x966F 0x96BF 0x976A \ - 0x9804 0x98E5 0x9997 0x509B 0x5095 0x5094 0x509E 0x508B \ - 0x50A3 0x5083 0x508C 0x508E 0x509D 0x5068 0x509C 0x5092 \ - 0x5082 0x5087 0x515F 0x51D4 0x5312 0x5311 0x53A4 0x53A7 \ - 0x5591 0x55A8 0x55A5 0x55AD 0x5577 0x5645 0x55A2 0x5593 \ - 0x5588 0x558F 0x55B5 0x5581 0x55A3 0x5592 0x55A4 0x557D \ - 0x558C 0x55A6 0x557F 0x5595 0x55A1 0x558E 0x570C 0x5829 \ - 0x5837 0x61BD 0x61CF 0x61C0 0x6199 0x6197 0x61BB 0x61D0 \ - 0x61C4 0x6231 0x64D3 0x64C0 0x64DC 0x64D1 0x64C8 0x64D5 \ - 0x66C3 0x66BF 0x66C5 0x66CD 0x66C1 0x6706 0x6724 0x6A63 \ - 0x6A42 0x6A52 0x6A43 0x6A33 0x6A6C 0x6A57 0x6A4C 0x6A6E \ - 0x6A37 0x6A71 0x5819 0x581E 0x5827 0x5823 0x5828 0x57F5 \ - 0x5848 0x5825 0x581C 0x581B 0x5833 0x583F 0x5836 0x582E -66 0x5839 0x5838 0x582D 0x582C 0x583B 0x5961 0x5AAF 0x5A94 \ - 0x5A9F 0x5A7A 0x5AA2 0x5A9E 0x5A78 0x5AA6 0x5A7C 0x5AA5 \ - 0x5AAC 0x5A95 0x5AAE 0x5A37 0x5A84 0x5A8A 0x5A97 0x5A83 \ - 0x5A8B 0x5AA9 0x5A7B 0x5A7D 0x5A8C 0x5A9C 0x5A8F 0x5A93 \ - 0x5A9D 0x5BEA 0x5BCD 0x5BCB 0x5BD4 0x5BD1 0x5BCA 0x5BCE \ - 0x5C0C 0x5C30 0x5D37 0x5D43 0x5D6B 0x5D41 0x5D4B 0x5D3F \ - 0x5D35 0x5D51 0x5D4E 0x5D55 0x5D33 0x5D3A 0x5D52 0x5D3D \ - 0x5D31 0x5D59 0x5D42 0x5D39 0x5D49 0x5D38 0x5D3C 0x5D32 \ - 0x5D36 0x5D40 0x5D45 0x5E44 0x5E41 0x5F58 0x5FA6 0x5FA5 \ - 0x5FAB 0x60C9 0x60B9 0x60CC 0x60E2 0x60CE 0x60C4 0x6114 \ - 0x60F2 0x610A 0x6116 0x6105 0x60F5 0x6113 0x60F8 0x60FC \ - 0x60FE 0x60C1 0x6103 0x6118 0x611D 0x6110 0x60FF 0x6104 \ - 0x610B 0x624A 0x6394 0x63B1 0x63B0 0x63CE 0x63E5 0x63E8 \ - 0x63EF 0x63C3 0x649D 0x63F3 0x63CA 0x63E0 0x63F6 0x63D5 \ - 0x63F2 0x63F5 0x6461 0x63DF 0x63BE 0x63DD 0x63DC 0x63C4 \ - 0x63D8 0x63D3 0x63C2 0x63C7 0x63CC 0x63CB 0x63C8 0x63F0 \ - 0x63D7 0x63D9 0x6532 0x6567 0x656A 0x6564 0x655C 0x6568 \ - 0x6565 0x658C 0x659D 0x659E 0x65AE 0x65D0 0x65D2 0x6A4A \ - 0x6A36 0x6A53 0x6A45 0x6A70 0x6A5C 0x6B58 0x6B57 0x6FBB \ - 0x6FBE 0x6FB5 0x6FD3 0x6F9F 0x6FB7 0x6FF5 0x71B7 0x71BB \ - 0x71D1 0x71BA 0x71B6 0x71CC 0x71D3 0x749B 0x7496 0x74A2 \ - 0x749D 0x750A 0x750E 0x7581 0x762C 0x7637 0x7636 0x763B \ - 0x667C 0x666C 0x667B 0x6680 0x6671 0x6679 0x666A 0x6672 \ - 0x6701 0x690C 0x68D3 0x6904 0x68DC 0x692A 0x68EC 0x68EA \ - 0x68F1 0x690F 0x68D6 0x68F7 0x68EB 0x68E4 0x68F6 0x6913 \ - 0x6910 0x68F3 0x68E1 0x6907 0x68CC 0x6908 0x6970 0x68B4 \ - 0x6911 0x68EF 0x68C6 0x6914 0x68F8 0x68D0 0x68FD 0x68FC \ - 0x68E8 0x690B 0x690A 0x6917 0x68CE 0x68C8 0x68DD 0x68DE \ - 0x68E6 0x68F4 0x68D1 0x6906 0x68D4 0x68E9 0x6915 0x6925 \ - 0x68C7 0x6B39 0x6B3B 0x6B3F 0x6B3C 0x6B94 0x6B97 0x6B99 \ - 0x6B95 0x6BBD 0x6BF0 0x6BF2 0x6BF3 0x6C30 0x6DFC 0x6E46 \ - 0x6E47 0x6E1F 0x6E49 0x6E88 0x6E3C 0x6E3D 0x6E45 0x6E62 -67 0x6E2B 0x6E3F 0x6E41 0x6E5D 0x6E73 0x6E1C 0x6E33 0x6E4B \ - 0x6E40 0x6E51 0x6E3B 0x6E03 0x6E2E 0x6E5E 0x6E68 0x6E5C \ - 0x6E61 0x6E31 0x6E28 0x6E60 0x6E71 0x6E6B 0x6E39 0x6E22 \ - 0x6E30 0x6E53 0x6E65 0x6E27 0x6E78 0x6E64 0x6E77 0x6E55 \ - 0x6E79 0x6E52 0x6E66 0x6E35 0x6E36 0x6E5A 0x7120 0x711E \ - 0x712F 0x70FB 0x712E 0x7131 0x7123 0x7125 0x7122 0x7132 \ - 0x711F 0x7128 0x713A 0x711B 0x724B 0x725A 0x7288 0x7289 \ - 0x7286 0x7285 0x728B 0x7312 0x730B 0x7330 0x7322 0x7331 \ - 0x7333 0x7327 0x7332 0x732D 0x7326 0x7323 0x7335 0x730C \ - 0x742E 0x742C 0x7430 0x742B 0x7416 0x76A1 0x7798 0x7796 \ - 0x78D6 0x78EB 0x78DC 0x79A5 0x79A9 0x9834 0x7A53 0x7A45 \ - 0x7A4F 0x7ABD 0x7ABB 0x7AF1 0x7BEC 0x7BED 0x7CD3 0x7CE1 \ - 0x7E19 0x7E27 0x7E26 0x806E 0x81AF 0x81AD 0x81AA 0x8218 \ - 0x856F 0x854C 0x8542 0x855C 0x8570 0x855F 0x741A 0x7421 \ - 0x742D 0x7431 0x7424 0x7423 0x741D 0x7429 0x7420 0x7432 \ - 0x74FB 0x752F 0x756F 0x756C 0x75E7 0x75DA 0x75E1 0x75E6 \ - 0x75DD 0x75DF 0x75E4 0x75D7 0x7695 0x7692 0x76DA 0x7746 \ - 0x7747 0x7744 0x774D 0x7745 0x774A 0x774E 0x774B 0x774C \ - 0x77DE 0x77EC 0x7860 0x7864 0x7865 0x785C 0x786D 0x7871 \ - 0x786A 0x786E 0x7870 0x7869 0x7868 0x785E 0x7862 0x7974 \ - 0x7973 0x7972 0x7970 0x7A02 0x7A0A 0x7A03 0x7A0C 0x7A04 \ - 0x7A99 0x7AE6 0x7AE4 0x7B4A 0x7B3B 0x7B44 0x7B48 0x7B4C \ - 0x7B4E 0x7B40 0x7B58 0x7B45 0x7CA2 0x7C9E 0x7CA8 0x7CA1 \ - 0x7D58 0x7D6F 0x7D63 0x7D53 0x7D56 0x7D67 0x7D6A 0x7D4F \ - 0x7D6D 0x7D5C 0x7D6B 0x7D52 0x7D54 0x7D69 0x7D51 0x7D5F \ - 0x7D4E 0x7F3E 0x7F3F 0x7F65 0x7F66 0x7FA2 0x7FA0 0x7FA1 \ - 0x7FD7 0x8051 0x804F 0x8050 0x80FE 0x80D4 0x8143 0x814A \ - 0x8152 0x814F 0x8147 0x813D 0x814D 0x813A 0x81E6 0x81EE \ - 0x81F7 0x81F8 0x81F9 0x8204 0x823C 0x823D 0x823F 0x8275 \ - 0x833B 0x83CF 0x83F9 0x8423 0x83C0 0x83E8 0x8412 0x83E7 \ - 0x83E4 0x83FC 0x83F6 0x8410 0x83C6 0x83C8 0x83EB 0x83E3 \ - 0x83BF 0x8401 0x83DD 0x83E5 0x83D8 0x83FF 0x83E1 0x83CB -68 0x83CE 0x83D6 0x83F5 0x83C9 0x8409 0x840F 0x83DE 0x8411 \ - 0x8406 0x83C2 0x83F3 0x855A 0x854B 0x853F 0x878A 0x878B \ - 0x87A1 0x878E 0x8799 0x885E 0x885F 0x8924 0x89A7 0x8AEA \ - 0x8AFD 0x8AF9 0x8AE3 0x8AE5 0x8AEC 0x8CF2 0x8CEF 0x8DA6 \ - 0x8E3B 0x8E43 0x8E32 0x8F31 0x8F30 0x8F2D 0x8F3C 0x8FA7 \ - 0x8FA5 0x9137 0x9195 0x918E 0x83D5 0x83FA 0x83C7 0x83D1 \ - 0x83EA 0x8413 0x83C3 0x83EC 0x83EE 0x83C4 0x83FB 0x83D7 \ - 0x83E2 0x841B 0x83DB 0x83FE 0x86D8 0x86E2 0x86E6 0x86D3 \ - 0x86E3 0x86DA 0x86EA 0x86DD 0x86EB 0x86DC 0x86EC 0x86E9 \ - 0x86D7 0x86E8 0x86D1 0x8848 0x8856 0x8855 0x88BA 0x88D7 \ - 0x88B9 0x88B8 0x88C0 0x88BE 0x88B6 0x88BC 0x88B7 0x88BD \ - 0x88B2 0x8901 0x88C9 0x8995 0x8998 0x8997 0x89DD 0x89DA \ - 0x89DB 0x8A4E 0x8A4D 0x8A39 0x8A59 0x8A40 0x8A57 0x8A58 \ - 0x8A44 0x8A45 0x8A52 0x8A48 0x8A51 0x8A4A 0x8A4C 0x8A4F \ - 0x8C5F 0x8C81 0x8C80 0x8CBA 0x8CBE 0x8CB0 0x8CB9 0x8CB5 \ - 0x8D84 0x8D80 0x8D89 0x8DD8 0x8DD3 0x8DCD 0x8DC7 0x8DD6 \ - 0x8DDC 0x8DCF 0x8DD5 0x8DD9 0x8DC8 0x8DD7 0x8DC5 0x8EEF \ - 0x8EF7 0x8EFA 0x8EF9 0x8EE6 0x8EEE 0x8EE5 0x8EF5 0x8EE7 \ - 0x8EE8 0x8EF6 0x8EEB 0x8EF1 0x8EEC 0x8EF4 0x8EE9 0x902D \ - 0x9034 0x902F 0x9106 0x912C 0x9104 0x90FF 0x90FC 0x9108 \ - 0x90F9 0x90FB 0x9101 0x9100 0x9107 0x9105 0x9103 0x9161 \ - 0x9164 0x915F 0x9162 0x9160 0x9201 0x920A 0x9225 0x9203 \ - 0x921A 0x9226 0x920F 0x920C 0x9200 0x9212 0x91FF 0x91FD \ - 0x9206 0x9204 0x9227 0x9202 0x921C 0x9224 0x9219 0x9217 \ - 0x9205 0x9216 0x957B 0x958D 0x958C 0x9590 0x9687 0x967E \ - 0x9688 0x9196 0x9345 0x930A 0x92FD 0x9317 0x931C 0x9307 \ - 0x9331 0x9332 0x932C 0x9330 0x9303 0x9305 0x95C2 0x95B8 \ - 0x95C1 0x96AB 0x96B7 0x9715 0x9714 0x970C 0x9717 0x9793 \ - 0x97D2 0x9836 0x9831 0x9833 0x983C 0x982E 0x983A 0x983D \ - 0x98B5 0x9922 0x9689 0x9683 0x9680 0x96C2 0x96C8 0x96C3 \ - 0x96F1 0x96F0 0x976C 0x9770 0x976E 0x9807 0x98A9 0x98EB \ - 0x9CE6 0x9EF9 0x4E83 0x4E84 0x4EB6 0x50BD 0x50BF 0x50C6 -69 0x50AE 0x50C4 0x50CA 0x50B4 0x50C8 0x50C2 0x50B0 0x50C1 \ - 0x50BA 0x50B1 0x50CB 0x50C9 0x50B6 0x50B8 0x51D7 0x527A \ - 0x5278 0x527B 0x527C 0x55C3 0x55DB 0x55CC 0x55D0 0x55CB \ - 0x55CA 0x55DD 0x55C0 0x55D4 0x55C4 0x55E9 0x55BF 0x55D2 \ - 0x558D 0x55CF 0x55D5 0x55E2 0x55D6 0x55C8 0x55F2 0x55CD \ - 0x55D9 0x55C2 0x5714 0x5853 0x5868 0x5864 0x584F 0x584D \ - 0x5849 0x586F 0x5855 0x584E 0x585D 0x5859 0x5865 0x585B \ - 0x583D 0x5863 0x5871 0x58FC 0x5AC7 0x5AC4 0x5ACB 0x5ABA \ - 0x5AB8 0x5AB1 0x5AB5 0x5AB0 0x5ABF 0x5AC8 0x5ABB 0x5AC6 \ - 0x5AB7 0x5AC0 0x5ACA 0x5AB4 0x5AB6 0x5ACD 0x5AB9 0x5A90 \ - 0x5BD6 0x5BD8 0x5BD9 0x5C1F 0x5C33 0x5D71 0x5D63 0x5D4A \ - 0x5D65 0x5D72 0x5D6C 0x5D5E 0x5D68 0x5D67 0x5D62 0x5DF0 \ - 0x5E4F 0x5E4E 0x5E4A 0x5E4D 0x5E4B 0x5EC5 0x5ECC 0x5EC6 \ - 0x5ECB 0x5EC7 0x5F40 0x5FAF 0x5FAD 0x60F7 0x6149 0x614A \ - 0x612B 0x6145 0x6136 0x6132 0x612E 0x6146 0x612F 0x614F \ - 0x6129 0x6140 0x6220 0x9168 0x6223 0x6225 0x6224 0x63C5 \ - 0x63F1 0x63EB 0x6410 0x6412 0x6409 0x6420 0x6424 0x9923 \ - 0x9920 0x991C 0x991D 0x99A0 0x99EF 0x99E8 0x99EB 0x99E1 \ - 0x99E6 0x9AF8 0x9AF5 0x9B83 0x9B94 0x9B84 0x9B8B 0x9B8F \ - 0x9B8C 0x9B89 0x9B8E 0x9D24 0x9D0F 0x9D13 0x9D0A 0x9D2A \ - 0x9D1A 0x9D27 0x9D16 0x9D21 0x9E85 0x9EAC 0x9EC6 0x9EC5 \ - 0x6433 0x6443 0x641F 0x6415 0x6418 0x6439 0x6437 0x6422 \ - 0x6423 0x640C 0x6426 0x6430 0x6428 0x6441 0x6435 0x642F \ - 0x640A 0x641A 0x6440 0x6425 0x6427 0x640B 0x63E7 0x641B \ - 0x642E 0x6421 0x640E 0x656F 0x6592 0x65D3 0x6686 0x668C \ - 0x6695 0x6690 0x668B 0x668A 0x6699 0x6694 0x6678 0x6720 \ - 0x6966 0x695F 0x6938 0x694E 0x6962 0x6971 0x693F 0x6945 \ - 0x696A 0x6939 0x6942 0x6957 0x6959 0x697A 0x6948 0x6949 \ - 0x6935 0x696C 0x6933 0x693D 0x6965 0x68F0 0x6978 0x6934 \ - 0x6969 0x6940 0x696F 0x6944 0x6976 0x6958 0x6941 0x6974 \ - 0x694C 0x693B 0x694B 0x6937 0x695C 0x694F 0x6951 0x6932 \ - 0x6952 0x692F 0x697B 0x693C 0x6B46 0x6B45 0x6B43 0x6B42 -70 0x6B48 0x6B41 0x6B9B 0x55C0 0x6BFB 0x6BFC 0x6BF9 0x6BF7 \ - 0x6BF8 0x6E9B 0x6ED6 0x6EC8 0x6E8F 0x6EC0 0x6E9F 0x6E93 \ - 0x6E94 0x6EA0 0x6EB1 0x6EB9 0x6EC6 0x6ED2 0x6EBD 0x6EC1 \ - 0x6E9E 0x6EC9 0x6EB7 0x6EB0 0x6ECD 0x6EA6 0x6ECF 0x6EB2 \ - 0x6EBE 0x6EC3 0x6EDC 0x6ED8 0x6E99 0x6E92 0x6E8E 0x6E8D \ - 0x6EA4 0x6EA1 0x6EBF 0x6EB3 0x6ED0 0x6ECA 0x6E97 0x6EAE \ - 0x6EA3 0x7147 0x7154 0x7152 0x7163 0x7160 0x7141 0x715D \ - 0x7162 0x7172 0x7178 0x716A 0x7161 0x7142 0x7158 0x7143 \ - 0x714B 0x7170 0x715F 0x7150 0x7153 0x9ED7 0x9F53 0x5128 \ - 0x5127 0x51DF 0x5335 0x53B3 0x568A 0x567D 0x5689 0x58CD \ - 0x58D0 0x5B2B 0x5B33 0x5B29 0x5B35 0x5B31 0x5B37 0x5C36 \ - 0x5DBE 0x5DB9 0x5DBB 0x61E2 0x61DB 0x61DD 0x61DC 0x61DA \ - 0x61D9 0x64DF 0x64E1 0x64EE 0x65B5 0x66D4 0x7144 0x714D \ - 0x715A 0x724F 0x728D 0x728C 0x7291 0x7290 0x728E 0x733C \ - 0x7342 0x733B 0x733A 0x7340 0x734A 0x7349 0x7444 0x744A \ - 0x744B 0x7452 0x7451 0x7457 0x7440 0x744F 0x7450 0x744E \ - 0x7442 0x7446 0x744D 0x7454 0x74E1 0x74FF 0x74FE 0x74FD \ - 0x751D 0x7579 0x7577 0x6983 0x75EF 0x760F 0x7603 0x75F7 \ - 0x75FE 0x75FC 0x75F9 0x75F8 0x7610 0x75FB 0x75F6 0x75ED \ - 0x75F5 0x75FD 0x7699 0x76B5 0x76DD 0x7755 0x775F 0x7760 \ - 0x7752 0x7756 0x775A 0x7769 0x7767 0x7754 0x7759 0x776D \ - 0x77E0 0x7887 0x789A 0x7894 0x788F 0x7884 0x7895 0x7885 \ - 0x7886 0x78A1 0x7883 0x7879 0x7899 0x7880 0x7896 0x787B \ - 0x797C 0x7982 0x797D 0x7979 0x7A11 0x7A18 0x7A19 0x7A12 \ - 0x7A17 0x7A15 0x7A22 0x7A13 0x7A1B 0x7A10 0x7AA3 0x7AA2 \ - 0x7A9E 0x7AEB 0x7B66 0x7B64 0x7B6D 0x7B74 0x7B69 0x7B72 \ - 0x7B65 0x7B73 0x7B71 0x7B70 0x7B61 0x7B78 0x7B76 0x7B63 \ - 0x7CB2 0x7CB4 0x7CAF 0x7D88 0x7D86 0x7D80 0x7D8D 0x7D7F \ - 0x7D85 0x7D7A 0x7D8E 0x7D7B 0x7D83 0x7D7C 0x7D8C 0x7D94 \ - 0x7D84 0x7D7D 0x7D92 0x7F6D 0x7F6B 0x7F67 0x7F68 0x7F6C \ - 0x7FA6 0x7FA5 0x7FA7 0x7FDB 0x7FDC 0x8021 0x8164 0x8160 \ - 0x8177 0x815C 0x8169 0x815B 0x8162 0x8172 0x6721 0x815E -71 0x8176 0x8167 0x816F 0x66D5 0x66D0 0x66D1 0x66CE 0x66D7 \ - 0x6A7D 0x6A8A 0x6AA7 0x6A99 0x6A82 0x6A88 0x6A86 0x6A98 \ - 0x6A9D 0x6A8F 0x6AAA 0x6B5D 0x6C0A 0x6FD7 0x6FD6 0x6FE5 \ - 0x6FD9 0x6FDA 0x6FEA 0x6FF6 0x71E3 0x71E9 0x71EB 0x71EF \ - 0x71F3 0x71EA 0x7371 0x74AE 0x8144 0x8161 0x821D 0x8249 \ - 0x8244 0x8240 0x8242 0x8245 0x84F1 0x843F 0x8456 0x8476 \ - 0x8479 0x848F 0x848D 0x8465 0x8451 0x8440 0x8486 0x8467 \ - 0x8430 0x844D 0x847D 0x845A 0x8459 0x8474 0x8473 0x845D \ - 0x8507 0x845E 0x8437 0x843A 0x8434 0x847A 0x8443 0x8478 \ - 0x8432 0x8445 0x8429 0x83D9 0x844B 0x842F 0x8442 0x842D \ - 0x845F 0x8470 0x8439 0x844E 0x844C 0x8452 0x846F 0x84C5 \ - 0x848E 0x843B 0x8447 0x8436 0x8433 0x8468 0x847E 0x8444 \ - 0x842B 0x8460 0x8454 0x846E 0x8450 0x870B 0x8704 0x86F7 \ - 0x870C 0x86FA 0x86D6 0x86F5 0x874D 0x86F8 0x870E 0x8709 \ - 0x8701 0x86F6 0x870D 0x8705 0x88D6 0x88CB 0x88CD 0x88CE \ - 0x88DE 0x88DB 0x88DA 0x88CC 0x88D0 0x8985 0x899B 0x89DF \ - 0x89E5 0x89E4 0x89E1 0x89E0 0x89E2 0x89DC 0x89E6 0x8A76 \ - 0x8A86 0x8A7F 0x8A61 0x8A3F 0x8A77 0x8A82 0x8A84 0x8A75 \ - 0x8A83 0x8A81 0x8A74 0x8A7A 0x8C3C 0x8C4B 0x8C4A 0x8C65 \ - 0x8C64 0x8C66 0x8C86 0x8C84 0x8C85 0x8CCC 0x8D68 0x8D69 \ - 0x8D91 0x8D8C 0x8D8E 0x8D8F 0x8D8D 0x8D93 0x8D94 0x8D90 \ - 0x8D92 0x8DF0 0x8DE0 0x8DEC 0x8DF1 0x8DEE 0x8DD0 0x8DE9 \ - 0x8DE3 0x8DE2 0x8DE7 0x8DF2 0x8DEB 0x8DF4 0x8F06 0x8EFF \ - 0x8F01 0x8F00 0x8F05 0x8F07 0x8F08 0x8F02 0x8F0B 0x9052 \ - 0x903F 0x74B3 0x74AC 0x7583 0x7645 0x764E 0x7644 0x76A3 \ - 0x76A5 0x77A6 0x77A4 0x77A9 0x77AF 0x78F0 0x78F8 0x78F1 \ - 0x7A49 0x7AC2 0x7AF2 0x7AF3 0x7BFA 0x7BF6 0x7BFC 0x7C18 \ - 0x7C08 0x7C12 0x7CDB 0x7CDA 0x7E2C 0x7E4D 0x7F46 0x7FF6 \ - 0x802B 0x8074 0x9044 0x9049 0x903D 0x9110 0x910D 0x910F \ - 0x9111 0x9116 0x9114 0x910B 0x910E 0x916E 0x916F 0x9248 \ - 0x9252 0x9230 0x923A 0x9266 0x9233 0x9265 0x925E 0x9283 \ - 0x922E 0x924A 0x9246 0x926D 0x926C 0x924F 0x9260 0x9267 -72 0x926F 0x9236 0x9261 0x9270 0x9231 0x9254 0x9263 0x9250 \ - 0x9272 0x924E 0x9253 0x924C 0x9256 0x9232 0x959F 0x959C \ - 0x959E 0x959B 0x9692 0x9693 0x9691 0x9697 0x96CE 0x96FA \ - 0x96FD 0x96F8 0x96F5 0x9773 0x9777 0x9778 0x9772 0x980F \ - 0x980D 0x980E 0x98AC 0x98F6 0x98F9 0x99AF 0x99B2 0x99B0 \ - 0x99B5 0x9AAD 0x9AAB 0x9B5B 0x9CEA 0x9CED 0x9CE7 0x9E80 \ - 0x9EFD 0x50E6 0x50D4 0x50D7 0x50E8 0x50F3 0x50DB 0x50EA \ - 0x50DD 0x50E4 0x50D3 0x50EC 0x50F0 0x50EF 0x50E3 0x50E0 \ - 0x51D8 0x5280 0x5281 0x52E9 0x52EB 0x5330 0x53AC 0x5627 \ - 0x5615 0x560C 0x5612 0x55FC 0x560F 0x561C 0x5601 0x5613 \ - 0x5602 0x55FA 0x561D 0x5604 0x55FF 0x55F9 0x5889 0x587C \ - 0x5890 0x5898 0x5886 0x5881 0x587F 0x5874 0x588B 0x587A \ - 0x5887 0x5891 0x588E 0x5876 0x5882 0x5888 0x587B 0x5894 \ - 0x588F 0x58FE 0x596B 0x5ADC 0x5AEE 0x5AE5 0x5AD5 0x5AEA \ - 0x5ADA 0x5AED 0x5AEB 0x5AF3 0x5AE2 0x5AE0 0x5ADB 0x5AEC \ - 0x5ADE 0x5ADD 0x5AD9 0x5AE8 0x5ADF 0x5B77 0x5BE0 0x81B8 \ - 0x81C8 0x8592 0x8593 0x857F 0x85AB 0x8597 0x85AC 0x87CE \ - 0x87CD 0x87C1 0x87B1 0x87C7 0x8940 0x893F 0x8939 0x8943 \ - 0x89AB 0x8B1F 0x8B09 0x8B0C 0x8C40 0x8C96 0x8CF6 0x8CF7 \ - 0x8E46 0x8E4F 0x8F3D 0x8F41 0x9366 0x9378 0x935D 0x9369 \ - 0x5BE3 0x5C63 0x5D82 0x5D80 0x5D7D 0x5D86 0x5D7A 0x5D81 \ - 0x5D77 0x5D8A 0x5D89 0x5D88 0x5D7E 0x5D7C 0x5D8D 0x5D79 \ - 0x5D7F 0x5E58 0x5E59 0x5E53 0x5ED8 0x5ED1 0x5ED7 0x5ECE \ - 0x5EDC 0x5ED5 0x5ED9 0x5ED2 0x5ED4 0x5F44 0x5F43 0x5F6F \ - 0x5FB6 0x612C 0x6128 0x6141 0x615E 0x6171 0x6173 0x6152 \ - 0x6153 0x6172 0x616C 0x6180 0x6174 0x6154 0x617A 0x615B \ - 0x6165 0x613B 0x616A 0x6161 0x6156 0x6229 0x6227 0x622B \ - 0x642B 0x644D 0x645B 0x645D 0x6474 0x6476 0x6472 0x6473 \ - 0x647D 0x6475 0x6466 0x64A6 0x644E 0x6482 0x645E 0x645C \ - 0x644B 0x6453 0x6460 0x6450 0x647F 0x643F 0x646C 0x646B \ - 0x6459 0x6465 0x6477 0x6573 0x65A0 0x66A1 0x66A0 0x669F \ - 0x6705 0x6704 0x6722 0x69B1 0x69B6 0x69C9 0x69A0 0x69CE -73 0x6996 0x69B0 0x69AC 0x69BC 0x6991 0x6999 0x698E 0x69A7 \ - 0x698D 0x69A9 0x69BE 0x69AF 0x69BF 0x69C4 0x69BD 0x69A4 \ - 0x69D4 0x69B9 0x69CA 0x699A 0x69CF 0x69B3 0x6993 0x69AA \ - 0x69A1 0x699E 0x69D9 0x6997 0x6990 0x69C2 0x69B5 0x69A5 \ - 0x69C6 0x6B4A 0x6B4D 0x6B4B 0x6B9E 0x6B9F 0x6BA0 0x6BC3 \ - 0x6BC4 0x6BFE 0x6ECE 0x6EF5 0x6EF1 0x6F03 0x6F25 0x6EF8 \ - 0x6F37 0x6EFB 0x6F2E 0x6F09 0x6F4E 0x6F19 0x6F1A 0x6F27 \ - 0x6F18 0x6F3B 0x6F12 0x6EED 0x6F0A 0x9374 0x937D 0x936E \ - 0x9372 0x9373 0x9362 0x9348 0x9353 0x935F 0x9368 0x937F \ - 0x936B 0x95C4 0x96AF 0x96AD 0x96B2 0x971A 0x971B 0x979B \ - 0x979F 0x9840 0x9847 0x98B7 0x99A2 0x9A00 0x99F3 0x99F5 \ - 0x9ABD 0x9B00 0x9B02 0x9B34 0x9B49 0x9B9F 0x6F36 0x6F73 \ - 0x6EF9 0x6EEE 0x6F2D 0x6F40 0x6F30 0x6F3C 0x6F35 0x6EEB \ - 0x6F07 0x6F0E 0x6F43 0x6F05 0x6EFD 0x6EF6 0x6F39 0x6F1C \ - 0x6EFC 0x6F3A 0x6F1F 0x6F0D 0x6F1E 0x6F08 0x6F21 0x7187 \ - 0x7190 0x7189 0x7180 0x7185 0x7182 0x718F 0x717B 0x7186 \ - 0x7181 0x7197 0x7244 0x7253 0x7297 0x7295 0x7293 0x7343 \ - 0x734D 0x7351 0x734C 0x7462 0x7473 0x7471 0x7475 0x7472 \ - 0x7467 0x746E 0x7500 0x7502 0x7503 0x757D 0x7590 0x7616 \ - 0x7608 0x760C 0x7615 0x7611 0x760A 0x7614 0x76B8 0x7781 \ - 0x777C 0x7785 0x7782 0x776E 0x7780 0x776F 0x777E 0x7783 \ - 0x78B2 0x78AA 0x78B4 0x78AD 0x78A8 0x787E 0x78AB 0x789E \ - 0x78A5 0x78A0 0x78AC 0x78A2 0x78A4 0x7998 0x798A 0x798B \ - 0x7996 0x7995 0x7994 0x7993 0x7997 0x7988 0x7992 0x7990 \ - 0x7A2B 0x7A4A 0x7A30 0x7A2F 0x7A28 0x7A26 0x7AA8 0x7AAB \ - 0x7AAC 0x7AEE 0x7B88 0x7B9C 0x7B8A 0x7B91 0x7B90 0x7B96 \ - 0x7B8D 0x7B8C 0x7B9B 0x7B8E 0x7B85 0x7B98 0x5284 0x7B99 \ - 0x7BA4 0x7B82 0x7CBB 0x7CBF 0x7CBC 0x7CBA 0x7DA7 0x7DB7 \ - 0x7DC2 0x7DA3 0x7DAA 0x7DC1 0x7DC0 0x7DC5 0x7D9D 0x7DCE \ - 0x7DC4 0x7DC6 0x7DCB 0x7DCC 0x7DAF 0x7DB9 0x7D96 0x7DBC \ - 0x7D9F 0x7DA6 0x7DAE 0x7DA9 0x7DA1 0x7DC9 0x7F73 0x7FE2 \ - 0x7FE3 0x7FE5 0x7FDE 0x9BA3 0x9BCD 0x9B99 0x9B9D 0x9D39 -74 0x9D44 0x9D35 0x9EAF 0x512F 0x9F8E 0x569F 0x569B 0x569E \ - 0x5696 0x5694 0x56A0 0x5B3B 0x5B3A 0x5DC1 0x5F4D 0x5F5D \ - 0x61F3 0x64F6 0x64E5 0x64EA 0x64E7 0x6505 0x64F9 0x6AAB \ - 0x6AED 0x6AB2 0x6AB0 0x6AB5 0x8024 0x805D 0x805C 0x8189 \ - 0x8186 0x8183 0x8187 0x818D 0x818C 0x818B 0x8215 0x8497 \ - 0x84A4 0x84A1 0x849F 0x84BA 0x84CE 0x84C2 0x84AC 0x84AE \ - 0x84AB 0x84B9 0x84B4 0x84C1 0x84CD 0x84AA 0x849A 0x84B1 \ - 0x84D0 0x849D 0x84A7 0x84BB 0x84A2 0x8494 0x84C7 0x84CC \ - 0x849B 0x84A9 0x84AF 0x84A8 0x84D6 0x8498 0x84B6 0x84CF \ - 0x84A0 0x84D7 0x84D4 0x84D2 0x84DB 0x84B0 0x8491 0x8661 \ - 0x8733 0x8723 0x8728 0x876B 0x8740 0x872E 0x871E 0x8721 \ - 0x8719 0x871B 0x8743 0x872C 0x8741 0x873E 0x8746 0x8720 \ - 0x8732 0x872A 0x872D 0x873C 0x8712 0x873A 0x8731 0x8735 \ - 0x8742 0x8726 0x8727 0x8738 0x8724 0x871A 0x8730 0x8711 \ - 0x88F7 0x88E7 0x88F1 0x88F2 0x88FA 0x88FE 0x88EE 0x88FC \ - 0x88F6 0x88FB 0x88F0 0x88EC 0x88EB 0x899D 0x89A1 0x899F \ - 0x899E 0x89E9 0x89EB 0x89E8 0x8AAB 0x8A99 0x8A8B 0x8A92 \ - 0x8A8F 0x8A96 0x8C3D 0x8C68 0x8C69 0x8CD5 0x8CCF 0x8CD7 \ - 0x8D96 0x8E09 0x8E02 0x8DFF 0x8E0D 0x8DFD 0x8E0A 0x8E03 \ - 0x8E07 0x8E06 0x8E05 0x8DFE 0x8E00 0x8E04 0x8F10 0x8F11 \ - 0x8F0E 0x8F0D 0x9123 0x911C 0x9120 0x9122 0x911F 0x911D \ - 0x911A 0x9124 0x9121 0x911B 0x917A 0x9172 0x9179 0x9173 \ - 0x92A5 0x92A4 0x9276 0x929B 0x927A 0x92A0 0x9294 0x92AA \ - 0x928D 0x6ABE 0x6AC1 0x6AC8 0x6AC0 0x6ABC 0x6AB1 0x6AC4 \ - 0x6ABF 0x7008 0x7003 0x6FFD 0x7010 0x7002 0x7013 0x71FA \ - 0x7200 0x74B9 0x74BC 0x765B 0x7651 0x764F 0x76EB 0x77B8 \ - 0x77B9 0x77C1 0x77C0 0x77BE 0x790B 0x7907 0x790A 0x7908 \ - 0x790D 0x7906 0x92A6 0x929A 0x92AB 0x9279 0x9297 0x927F \ - 0x92A3 0x92EE 0x928E 0x9282 0x9295 0x92A2 0x927D 0x9288 \ - 0x92A1 0x928A 0x9286 0x928C 0x9299 0x92A7 0x927E 0x9287 \ - 0x92A9 0x929D 0x928B 0x922D 0x969E 0x96A1 0x96FF 0x9758 \ - 0x977D 0x977A 0x977E 0x9783 0x9780 0x9782 0x977B 0x9784 -75 0x9781 0x977F 0x97CE 0x97CD 0x9816 0x98AD 0x98AE 0x9902 \ - 0x9900 0x9907 0x999D 0x999C 0x99C3 0x99B9 0x99BB 0x99BA \ - 0x99C2 0x99BD 0x99C7 0x9AB1 0x9AE3 0x9AE7 0x9B3E 0x9B3F \ - 0x9B60 0x9B61 0x9B5F 0x9CF1 0x9CF2 0x9CF5 0x9EA7 0x50FF \ - 0x5103 0x5130 0x50F8 0x5106 0x5107 0x50F6 0x50FE 0x510B \ - 0x510C 0x50FD 0x510A 0x528B 0x528C 0x52F1 0x52EF 0x5648 \ - 0x5642 0x564C 0x5635 0x5641 0x564A 0x5649 0x5646 0x5658 \ - 0x565A 0x5640 0x5633 0x563D 0x562C 0x563E 0x5638 0x562A \ - 0x563A 0x571A 0x58AB 0x589D 0x58B1 0x58A0 0x58A3 0x58AF \ - 0x58AC 0x58A5 0x58A1 0x58FF 0x5AFF 0x5AF4 0x5AFD 0x5AF7 \ - 0x5AF6 0x5B03 0x5AF8 0x5B02 0x5AF9 0x5B01 0x5B07 0x5B05 \ - 0x5B0F 0x5C67 0x5D99 0x5D97 0x5D9F 0x5D92 0x5DA2 0x5D93 \ - 0x5D95 0x5DA0 0x5D9C 0x5DA1 0x5D9A 0x5D9E 0x5E69 0x5E5D \ - 0x5E60 0x5E5C 0x7DF3 0x5EDB 0x5EDE 0x5EE1 0x5F49 0x5FB2 \ - 0x618B 0x6183 0x6179 0x61B1 0x61B0 0x61A2 0x6189 0x7915 \ - 0x79AF 0x7AF5 0x7C2E 0x7C1B 0x7C1A 0x7C24 0x7CE6 0x7CE3 \ - 0x7E5D 0x7E4F 0x7E66 0x7E5B 0x7F47 0x7FB4 0x7FFA 0x802E \ - 0x81CE 0x8219 0x85CC 0x85B2 0x85BB 0x85C1 0x87E9 0x87EE \ - 0x87F0 0x87D6 0x880E 0x87DA 0x8948 0x894A 0x894E 0x894D \ - 0x619B 0x6193 0x61AF 0x61AD 0x619F 0x6192 0x61AA 0x61A1 \ - 0x618D 0x6166 0x61B3 0x622D 0x646E 0x6470 0x6496 0x64A0 \ - 0x6485 0x6497 0x649C 0x648F 0x648B 0x648A 0x648C 0x64A3 \ - 0x649F 0x6468 0x64B1 0x6498 0x6576 0x657A 0x6579 0x657B \ - 0x65B2 0x65B3 0x66B5 0x66B0 0x66A9 0x66B2 0x66B7 0x66AA \ - 0x66AF 0x6A00 0x6A06 0x6A17 0x69E5 0x69F8 0x6A15 0x69F1 \ - 0x69E4 0x6A20 0x69FF 0x69EC 0x69E2 0x6A1B 0x6A1D 0x69FE \ - 0x6A27 0x69F2 0x69EE 0x6A14 0x69F7 0x69E7 0x6A40 0x6A08 \ - 0x69E6 0x69FB 0x6A0D 0x69FC 0x69EB 0x6A09 0x6A04 0x6A18 \ - 0x6A25 0x6A0F 0x69F6 0x6A26 0x6A07 0x69F4 0x6A16 0x6B51 \ - 0x6BA5 0x6BA3 0x6BA2 0x6BA6 0x6C01 0x6C00 0x6BFF 0x6C02 \ - 0x6F41 0x6F26 0x6F7E 0x6F87 0x6FC6 0x6F92 0x6F8D 0x6F89 \ - 0x6F8C 0x6F62 0x6F4F 0x6F85 0x6F5A 0x6F96 0x6F76 0x6F6C -76 0x6F82 0x6F55 0x6F72 0x6F52 0x6F50 0x6F57 0x6F94 0x6F93 \ - 0x6F5D 0x6F00 0x6F61 0x6F6B 0x6F7D 0x6F67 0x6F90 0x6F53 \ - 0x6F8B 0x6F69 0x6F7F 0x6F95 0x6F63 0x6F77 0x6F6A 0x6F7B \ - 0x71B2 0x71AF 0x719B 0x71B0 0x71A0 0x719A 0x71A9 0x71B5 \ - 0x719D 0x71A5 0x719E 0x71A4 0x71A1 0x71AA 0x719C 0x71A7 \ - 0x71B3 0x7298 0x729A 0x7358 0x7352 0x735E 0x735F 0x7360 \ - 0x735D 0x735B 0x7361 0x735A 0x7359 0x89B1 0x89B0 0x89B3 \ - 0x8B38 0x8B32 0x8B2D 0x8B34 0x8B29 0x8C74 0x8D03 0x8DA9 \ - 0x8E58 0x8EBF 0x8EC1 0x8F4A 0x8FAC 0x9089 0x913D 0x913C \ - 0x91A9 0x93A0 0x9390 0x9393 0x938B 0x93AD 0x93BB 0x93B8 \ - 0x939C 0x95D8 0x95D7 0x975D 0x97A9 0x97DA 0x7362 0x7487 \ - 0x7489 0x748A 0x7486 0x7481 0x747D 0x7485 0x7488 0x747C \ - 0x7479 0x7508 0x7507 0x757E 0x7625 0x761E 0x7619 0x761D \ - 0x761C 0x7623 0x761A 0x7628 0x761B 0x769C 0x769D 0x769E \ - 0x769B 0x778D 0x778F 0x7789 0x7788 0x78CD 0x78BB 0x78CF \ - 0x78CC 0x78D1 0x78CE 0x78D4 0x78C8 0x78C3 0x78C4 0x78C9 \ - 0x799A 0x79A1 0x79A0 0x799C 0x79A2 0x799B 0x6B76 0x7A39 \ - 0x7AB2 0x7AB4 0x7AB3 0x7BB7 0x7BCB 0x7BBE 0x7BAC 0x7BCE \ - 0x7BAF 0x7BB9 0x7BCA 0x7BB5 0x7CC5 0x7CC8 0x7CCC 0x7CCB \ - 0x7DF7 0x7DDB 0x7DEA 0x7DE7 0x7DD7 0x7DE1 0x7E03 0x7DFA \ - 0x7DE6 0x7DF6 0x7DF1 0x7DF0 0x7DEE 0x7DDF 0x7F76 0x7FAC \ - 0x7FB0 0x7FAD 0x7FED 0x7FEB 0x7FEA 0x7FEC 0x7FE6 0x7FE8 \ - 0x8064 0x8067 0x81A3 0x819F 0x819E 0x8195 0x81A2 0x8199 \ - 0x8197 0x8216 0x824F 0x8253 0x8252 0x8250 0x824E 0x8251 \ - 0x8524 0x853B 0x850F 0x8500 0x8529 0x850E 0x8509 0x850D \ - 0x851F 0x850A 0x8527 0x851C 0x84FB 0x852B 0x84FA 0x8508 \ - 0x850C 0x84F4 0x852A 0x84F2 0x8515 0x84F7 0x84EB 0x84F3 \ - 0x84FC 0x8512 0x84EA 0x84E9 0x8516 0x84FE 0x8528 0x851D \ - 0x852E 0x8502 0x84FD 0x851E 0x84F6 0x8531 0x8526 0x84E7 \ - 0x84E8 0x84F0 0x84EF 0x84F9 0x8518 0x8520 0x8530 0x850B \ - 0x8519 0x852F 0x8662 0x9854 0x9855 0x984B 0x983F 0x98B9 \ - 0x9938 0x9936 0x9940 0x993B 0x9939 0x99A4 0x9A08 0x9A0C -77 0x9A10 0x9B07 0x9BD2 0x9BC2 0x9BBB 0x9BCC 0x9BCB 0x9D4D \ - 0x9D63 0x9D4E 0x9D50 0x9D55 0x9D5E 0x9E90 0x9EB2 0x9EB1 \ - 0x9ECA 0x9F02 0x9F27 0x9F26 0x8756 0x8763 0x8764 0x8777 \ - 0x87E1 0x8773 0x8758 0x8754 0x875B 0x8752 0x8761 0x875A \ - 0x8751 0x875E 0x876D 0x876A 0x8750 0x874E 0x875F 0x875D \ - 0x876F 0x876C 0x877A 0x876E 0x875C 0x8765 0x874F 0x877B \ - 0x8775 0x8762 0x8767 0x8769 0x885A 0x8905 0x890C 0x8914 \ - 0x890B 0x8917 0x8918 0x8919 0x8906 0x8916 0x8911 0x890E \ - 0x8909 0x89A2 0x89A4 0x89A3 0x89ED 0x89F0 0x89EC 0x8ACF \ - 0x8AC6 0x8AB8 0x8AD3 0x8AD1 0x8AD4 0x8AD5 0x8ABB 0x8AD7 \ - 0x8ABE 0x8AC0 0x8AC5 0x8AD8 0x8AC3 0x8ABA 0x8ABD 0x8AD9 \ - 0x8C3E 0x8C4D 0x8C8F 0x8CE5 0x8CDF 0x8CD9 0x8CE8 0x8CDA \ - 0x8CDD 0x8CE7 0x8DA0 0x8D9C 0x8DA1 0x8D9B 0x8E20 0x8E23 \ - 0x8E25 0x8E24 0x8E2E 0x8E15 0x8E1B 0x8E16 0x8E11 0x8E19 \ - 0x8E26 0x8E27 0x8E14 0x8E12 0x8E18 0x8E13 0x8E1C 0x8E17 \ - 0x8E1A 0x8F2C 0x8F24 0x8F18 0x8F1A 0x8F20 0x8F23 0x8F16 \ - 0x8F17 0x9073 0x9070 0x906F 0x9067 0x906B 0x912F 0x912B \ - 0x9129 0x912A 0x9132 0x9126 0x912E 0x9185 0x9186 0x918A \ - 0x9181 0x9182 0x9184 0x9180 0x92D0 0x92C3 0x92C4 0x92C0 \ - 0x92D9 0x92B6 0x92CF 0x92F1 0x92DF 0x92D8 0x92E9 0x92D7 \ - 0x92DD 0x92CC 0x92EF 0x92C2 0x92E8 0x92CA 0x92C8 0x92CE \ - 0x92E6 0x92CD 0x92D5 0x92C9 0x92E0 0x92DE 0x92E7 0x92D1 \ - 0x92D3 0x56AF 0x58E0 0x58DC 0x5B39 0x5B7C 0x5BF3 0x5C6B \ - 0x5DC4 0x650B 0x6508 0x650A 0x65DC 0x66E1 0x66DF 0x6ACE \ - 0x6AD4 0x6AE3 0x6AD7 0x6AE2 0x6AD8 0x6AD5 0x6AD2 0x701E \ - 0x702C 0x7025 0x6FF3 0x7204 0x7208 0x7215 0x74C4 0x74C9 \ - 0x74C7 0x74C8 0x92B5 0x92E1 0x92C6 0x92B4 0x957C 0x95AC \ - 0x95AB 0x95AE 0x95B0 0x96A4 0x96A2 0x96D3 0x9705 0x9708 \ - 0x9702 0x975A 0x978A 0x978E 0x9788 0x97D0 0x97CF 0x981E \ - 0x981D 0x9826 0x9829 0x9828 0x9820 0x981B 0x9827 0x98B2 \ - 0x9908 0x98FA 0x9911 0x9914 0x9916 0x9917 0x9915 0x99DC \ - 0x99CD 0x99CF 0x99D3 0x99D4 0x99CE 0x99C9 0x99D6 0x99D8 -78 0x99CB 0x99D7 0x99CC 0x9AB3 0x9AEC 0x9AEB 0x9AF3 0x9AF2 \ - 0x9AF1 0x9B46 0x9B43 0x9B67 0x9B74 0x9B71 0x9B66 0x9B76 \ - 0x9B75 0x9B70 0x9B68 0x9B64 0x9B6C 0x9CFC 0x9CFA 0x9CFD \ - 0x9CFF 0x9CF7 0x9D07 0x9D00 0x9CF9 0x9CFB 0x9D08 0x9D05 \ - 0x9D04 0x9E83 0x9ED3 0x9F0F 0x9F10 0x511C 0x5113 0x5117 \ - 0x511A 0x5111 0x51DE 0x5334 0x53E1 0x5670 0x5660 0x566E \ - 0x5673 0x5666 0x5663 0x566D 0x5672 0x565E 0x5677 0x571C \ - 0x571B 0x58C8 0x58BD 0x58C9 0x58BF 0x58BA 0x58C2 0x58BC \ - 0x58C6 0x5B17 0x5B19 0x5B1B 0x5B21 0x5B14 0x5B13 0x5B10 \ - 0x5B16 0x5B28 0x5B1A 0x5B20 0x5B1E 0x5BEF 0x5DAC 0x5DB1 \ - 0x5DA9 0x5DA7 0x5DB5 0x5DB0 0x5DAE 0x5DAA 0x5DA8 0x5DB2 \ - 0x5DAD 0x5DAF 0x5DB4 0x5E67 0x5E68 0x5E66 0x5E6F 0x5EE9 \ - 0x5EE7 0x5EE6 0x5EE8 0x5EE5 0x5F4B 0x5FBC 0x619D 0x61A8 \ - 0x6196 0x61C5 0x61B4 0x61C6 0x61C1 0x61CC 0x61BA 0x76A9 \ - 0x77C6 0x77C5 0x7918 0x791A 0x7920 0x7A66 0x7A64 0x7A6A \ - 0x7C35 0x7C34 0x7E6C 0x7E6E 0x7E71 0x81D4 0x81D6 0x821A \ - 0x8262 0x8265 0x8276 0x85DB 0x85D6 0x85E7 0x85F4 0x87FD \ - 0x87D5 0x8807 0x880F 0x87F8 0x8987 0x89B5 0x89F5 0x8B3F \ - 0x61BF 0x61B8 0x618C 0x64D7 0x64D6 0x64D0 0x64CF 0x64C9 \ - 0x64BD 0x6489 0x64C3 0x64DB 0x64F3 0x64D9 0x6533 0x657F \ - 0x657C 0x65A2 0x66C8 0x66BE 0x66C0 0x66CA 0x66CB 0x66CF \ - 0x66BD 0x66BB 0x66BA 0x66CC 0x6723 0x6A34 0x6A66 0x6A49 \ - 0x6A67 0x6A32 0x6A68 0x6A3E 0x6A5D 0x6A6D 0x6A76 0x6A5B \ - 0x6A51 0x6A28 0x6A5A 0x6A3B 0x6A3F 0x6A41 0x6A6A 0x6A64 \ - 0x6A50 0x6A4F 0x6A54 0x6A6F 0x6A69 0x6A60 0x6A3C 0x6A5E \ - 0x6A56 0x6A55 0x6A4D 0x6A4E 0x6A46 0x6B55 0x6B54 0x6B56 \ - 0x6BA7 0x6BAA 0x6BAB 0x6BC8 0x6BC7 0x6C04 0x6C03 0x6C06 \ - 0x6FAD 0x6FCB 0x6FA3 0x6FC7 0x6FBC 0x6FCE 0x6FC8 0x6F5E \ - 0x6FC4 0x6FBD 0x6F9E 0x6FCA 0x6FA8 0x7004 0x6FA5 0x6FAE \ - 0x6FBA 0x6FAC 0x6FAA 0x6FCF 0x6FBF 0x6FB8 0x6FA2 0x6FC9 \ - 0x6FAB 0x6FCD 0x6FAF 0x6FB2 0x6FB0 0x71C5 0x71C2 0x71BF \ - 0x71B8 0x71D6 0x71C0 0x71C1 0x71CB 0x71D4 0x71CA 0x71C7 -79 0x71CF 0x71BD 0x71D8 0x71BC 0x71C6 0x71DA 0x71DB 0x729D \ - 0x729E 0x7369 0x7366 0x7367 0x736C 0x7365 0x736B 0x736A \ - 0x747F 0x749A 0x74A0 0x7494 0x7492 0x7495 0x74A1 0x750B \ - 0x7580 0x762F 0x762D 0x7631 0x763D 0x7633 0x763C 0x7635 \ - 0x7632 0x7630 0x76BB 0x76E6 0x779A 0x779D 0x77A1 0x779C \ - 0x779B 0x77A2 0x77A3 0x7795 0x7799 0x8B43 0x8B4C 0x8D0B \ - 0x8E6B 0x8E68 0x8E70 0x8E75 0x8E77 0x8EC3 0x93E9 0x93EA \ - 0x93CB 0x93C5 0x93C6 0x93ED 0x93D3 0x93E5 0x93DB 0x93EB \ - 0x93E0 0x93C1 0x95DD 0x97B2 0x97B4 0x97B1 0x97B5 0x97F2 \ - 0x9856 0x9944 0x9A26 0x9A1F 0x9A18 0x9A21 0x7797 0x78DD \ - 0x78E9 0x78E5 0x78EA 0x78DE 0x78E3 0x78DB 0x78E1 0x78E2 \ - 0x78ED 0x78DF 0x78E0 0x79A4 0x7A44 0x7A48 0x7A47 0x7AB6 \ - 0x7AB8 0x7AB5 0x7AB1 0x7AB7 0x7BDE 0x7BE3 0x7BE7 0x7BDD \ - 0x7BD5 0x7BE5 0x7BDA 0x7BE8 0x7BF9 0x7BD4 0x7BEA 0x7BE2 \ - 0x7BDC 0x7BEB 0x7BD8 0x7BDF 0x7CD2 0x7CD4 0x7CD7 0x7CD0 \ - 0x7CD1 0x7E12 0x7E21 0x7E17 0x7E0C 0x7E1F 0x7E20 0x7E13 \ - 0x7E0E 0x7E1C 0x7E15 0x7E1A 0x7E22 0x7E0B 0x7E0F 0x7E16 \ - 0x7E0D 0x7E14 0x7E25 0x7E24 0x7F43 0x7F7B 0x7F7C 0x7F7A \ - 0x7FB1 0x7FEF 0x802A 0x8029 0x806C 0x81B1 0x81A6 0x81AE \ - 0x81B9 0x81B5 0x81AB 0x81B0 0x81AC 0x81B4 0x81B2 0x81B7 \ - 0x81A7 0x81F2 0x8255 0x8256 0x8257 0x8556 0x8545 0x856B \ - 0x854D 0x8553 0x8561 0x8558 0x8540 0x8546 0x8564 0x8541 \ - 0x8562 0x8544 0x8551 0x8547 0x8563 0x853E 0x855B 0x8571 \ - 0x854E 0x856E 0x8575 0x8555 0x8567 0x8560 0x858C 0x8566 \ - 0x855D 0x8554 0x8565 0x856C 0x8663 0x8665 0x8664 0x879B \ - 0x878F 0x8797 0x8793 0x8792 0x8788 0x8781 0x8796 0x8798 \ - 0x8779 0x8787 0x87A3 0x8785 0x8790 0x8791 0x879D 0x8784 \ - 0x8794 0x879C 0x879A 0x8789 0x891E 0x8926 0x8930 0x892D \ - 0x892E 0x8927 0x8931 0x8922 0x8929 0x8923 0x892F 0x892C \ - 0x891F 0x89F1 0x8AE0 0x9A17 0x9B09 0x9BC5 0x9BDF 0x9BE3 \ - 0x9BE9 0x9BEE 0x9D66 0x9D7A 0x9D6E 0x9D91 0x9D83 0x9D76 \ - 0x9D7E 0x9D6D 0x9E95 0x9EE3 0x9F03 0x9F04 0x9F17 0x5136 -80 0x5336 0x5B42 0x5B44 0x5B46 0x5B7E 0x5DCA 0x5DC8 0x5DCC \ - 0x5EF0 0x6585 0x66E5 0x66E7 0x8AE2 0x8AF2 0x8AF4 0x8AF5 \ - 0x8ADD 0x8B14 0x8AE4 0x8ADF 0x8AF0 0x8AC8 0x8ADE 0x8AE1 \ - 0x8AE8 0x8AFF 0x8AEF 0x8AFB 0x8C91 0x8C92 0x8C90 0x8CF5 \ - 0x8CEE 0x8CF1 0x8CF0 0x8CF3 0x8D6C 0x8D6E 0x8DA5 0x8DA7 \ - 0x8E33 0x8E3E 0x8E38 0x8E40 0x8E45 0x8E36 0x8E3C 0x8E3D \ - 0x8E41 0x8E30 0x8E3F 0x8EBD 0x8F36 0x8F2E 0x8F35 0x8F32 \ - 0x8F39 0x8F37 0x8F34 0x9076 0x9079 0x907B 0x9086 0x90FA \ - 0x9133 0x9135 0x9136 0x9193 0x9190 0x9191 0x918D 0x918F \ - 0x9327 0x931E 0x9308 0x931F 0x9306 0x930F 0x937A 0x9338 \ - 0x933C 0x931B 0x9323 0x9312 0x9301 0x9346 0x932D 0x930E \ - 0x930D 0x92CB 0x931D 0x92FA 0x9325 0x9313 0x92F9 0x92F7 \ - 0x9334 0x9302 0x9324 0x92FF 0x9329 0x9339 0x9335 0x932A \ - 0x9314 0x930C 0x930B 0x92FE 0x9309 0x9300 0x92FB 0x9316 \ - 0x95BC 0x95CD 0x95BE 0x95B9 0x95BA 0x95B6 0x95BF 0x95B5 \ - 0x95BD 0x96A9 0x96D4 0x970B 0x9712 0x9710 0x9799 0x9797 \ - 0x9794 0x97F0 0x97F8 0x9835 0x982F 0x9832 0x9924 0x991F \ - 0x9927 0x9929 0x999E 0x99EE 0x99EC 0x99E5 0x99E4 0x99F0 \ - 0x99E3 0x99EA 0x99E9 0x99E7 0x9AB9 0x9ABF 0x9AB4 0x9ABB \ - 0x9AF6 0x9AFA 0x9AF9 0x9AF7 0x9B33 0x9B80 0x9B85 0x9B87 \ - 0x9B7C 0x9B7E 0x9B7B 0x9B82 0x9B93 0x9B92 0x9B90 0x9B7A \ - 0x9B95 0x6AF4 0x6AE9 0x703D 0x7036 0x7216 0x7212 0x720F \ - 0x7217 0x7211 0x720B 0x74CD 0x74D0 0x74CC 0x74CE 0x74D1 \ - 0x7589 0x7A6F 0x7C4B 0x7C44 0x7C55 0x7E7F 0x8B71 0x802F \ - 0x807A 0x807B 0x807C 0x85FC 0x8610 0x8602 0x85EE 0x8603 \ - 0x860D 0x8613 0x9B7D 0x9B88 0x9D25 0x9D17 0x9D20 0x9D1E \ - 0x9D14 0x9D29 0x9D1D 0x9D18 0x9D22 0x9D10 0x9D19 0x9D1F \ - 0x9E88 0x9E86 0x9E87 0x9EAE 0x9EAD 0x9ED5 0x9ED6 0x9EFA \ - 0x9F12 0x9F3D 0x5126 0x5125 0x5122 0x5124 0x5120 0x5129 \ - 0x52F4 0x5693 0x568C 0x568D 0x5686 0x5684 0x5683 0x567E \ - 0x5682 0x567F 0x5681 0x58D6 0x58D4 0x58CF 0x58D2 0x5B2D \ - 0x5B25 0x5B32 0x5B23 0x5B2C 0x5B27 0x5B26 0x5B2F 0x5B2E -81 0x5B7B 0x5BF1 0x5BF2 0x5DB7 0x5E6C 0x5E6A 0x5FBE 0x5FBB \ - 0x61C3 0x61B5 0x61BC 0x61E7 0x61E0 0x61E5 0x61E4 0x61E8 \ - 0x61DE 0x64EF 0x64E9 0x64E3 0x64EB 0x64E4 0x64E8 0x6581 \ - 0x6580 0x65B6 0x65DA 0x66D2 0x6A8D 0x6A96 0x6A81 0x6AA5 \ - 0x6A89 0x6A9F 0x6A9B 0x6AA1 0x6A9E 0x6A87 0x6A93 0x6A8E \ - 0x6A95 0x6A83 0x6AA8 0x6AA4 0x6A91 0x6A7F 0x6AA6 0x6A9A \ - 0x6A85 0x6A8C 0x6A92 0x6B5B 0x6BAD 0x6C09 0x6FCC 0x6FA9 \ - 0x6FF4 0x6FD4 0x6FE3 0x6FDC 0x6FED 0x6FE7 0x6FE6 0x6FDE \ - 0x6FF2 0x6FDD 0x6FE2 0x6FE8 0x71E1 0x71F1 0x71E8 0x71F2 \ - 0x71E4 0x71F0 0x71E2 0x7373 0x736E 0x736F 0x7497 0x74B2 \ - 0x74AB 0x7490 0x74AA 0x74AD 0x74B1 0x74A5 0x74AF 0x7510 \ - 0x7511 0x7512 0x750F 0x7584 0x7643 0x7648 0x7649 0x7647 \ - 0x76A4 0x76E9 0x77B5 0x77AB 0x77B2 0x77B7 0x77B6 0x8608 \ - 0x860F 0x8818 0x8812 0x8967 0x8965 0x89BB 0x8B69 0x8B62 \ - 0x8B6E 0x8B61 0x8B64 0x8B4D 0x8C51 0x8E83 0x8EC6 0x941F \ - 0x9404 0x9417 0x9408 0x9405 0x93F3 0x941E 0x9402 0x941A \ - 0x941B 0x9427 0x941C 0x96B5 0x9733 0x9734 0x9731 0x97B8 \ - 0x77B4 0x77B1 0x77A8 0x77F0 0x78F3 0x78FD 0x7902 0x78FB \ - 0x78FC 0x78F2 0x7905 0x78F9 0x78FE 0x7904 0x79AB 0x79A8 \ - 0x7A5C 0x7A5B 0x7A56 0x7A58 0x7A54 0x7A5A 0x7ABE 0x7AC0 \ - 0x7AC1 0x7C05 0x7C0F 0x7BF2 0x7C00 0x7BFF 0x7BFB 0x7C0E \ - 0x7BF4 0x7C0B 0x7BF3 0x7C02 0x7C09 0x7C03 0x7C01 0x7BF8 \ - 0x7BFD 0x7C06 0x7BF0 0x7BF1 0x7C10 0x7C0A 0x7CE8 0x7E2D \ - 0x7E3C 0x7E42 0x7E33 0x9848 0x7E38 0x7E2A 0x7E49 0x7E40 \ - 0x7E47 0x7E29 0x7E4C 0x7E30 0x7E3B 0x7E36 0x7E44 0x7E3A \ - 0x7F45 0x7F7F 0x7F7E 0x7F7D 0x7FF4 0x7FF2 0x802C 0x81BB \ - 0x81C4 0x81CC 0x81CA 0x81C5 0x81C7 0x81BC 0x81E9 0x825B \ - 0x825A 0x825C 0x8583 0x8580 0x858F 0x85A7 0x8595 0x85A0 \ - 0x858B 0x85A3 0x857B 0x85A4 0x859A 0x859E 0x8577 0x857C \ - 0x8589 0x85A1 0x857A 0x8578 0x8557 0x858E 0x8596 0x8586 \ - 0x858D 0x8599 0x859D 0x8581 0x85A2 0x8582 0x8588 0x8585 \ - 0x8579 0x8576 0x8598 0x8590 0x859F 0x8668 0x87BE 0x87AA -82 0x87AD 0x87C5 0x87B0 0x87AC 0x87B9 0x87B5 0x87BC 0x87AE \ - 0x87C9 0x87C3 0x87C2 0x87CC 0x87B7 0x87AF 0x87C4 0x87CA \ - 0x87B4 0x87B6 0x87BF 0x87B8 0x87BD 0x87DE 0x87B2 0x8935 \ - 0x8933 0x893C 0x893E 0x8941 0x8952 0x8937 0x8942 0x89AD \ - 0x89AF 0x89AE 0x89F2 0x89F3 0x8B1E 0x97BA 0x97FC 0x98C3 \ - 0x994D 0x9A2F 0x9AC9 0x9AC8 0x9AC4 0x9B2A 0x9B38 0x9B50 \ - 0x9C0A 0x9BFB 0x9C04 0x9BFC 0x9BFE 0x9C02 0x9BF6 0x9C1B \ - 0x9BF9 0x9C15 0x9C10 0x9BFF 0x9C00 0x9C0C 0x9D95 0x9DA5 \ - 0x9E98 0x9EC1 0x9F5A 0x5164 0x56BB 0x58E6 0x8B18 0x8B16 \ - 0x8B11 0x8B05 0x8B0B 0x8B22 0x8B0F 0x8B12 0x8B15 0x8B07 \ - 0x8B0D 0x8B08 0x8B06 0x8B1C 0x8B13 0x8B1A 0x8C4F 0x8C70 \ - 0x8C72 0x8C71 0x8C6F 0x8C95 0x8C94 0x8CF9 0x8D6F 0x8E4E \ - 0x8E4D 0x8E53 0x8E50 0x8E4C 0x8E47 0x8F43 0x8F40 0x9085 \ - 0x907E 0x9138 0x919A 0x91A2 0x919B 0x9199 0x919F 0x91A1 \ - 0x919D 0x91A0 0x93A1 0x9383 0x93AF 0x9364 0x9356 0x9347 \ - 0x937C 0x9358 0x935C 0x9376 0x9349 0x9350 0x9351 0x9360 \ - 0x936D 0x938F 0x934C 0x936A 0x9379 0x9357 0x9355 0x9352 \ - 0x934F 0x9371 0x9377 0x937B 0x9361 0x935E 0x9363 0x9367 \ - 0x9380 0x934E 0x9359 0x95C7 0x95C0 0x95C9 0x95C3 0x95C5 \ - 0x95B7 0x96AE 0x96B0 0x96AC 0x9720 0x971F 0x9718 0x971D \ - 0x9719 0x979A 0x97A1 0x979C 0x979E 0x979D 0x97D5 0x97D4 \ - 0x97F1 0x9841 0x9844 0x984A 0x9849 0x9845 0x9843 0x9925 \ - 0x992B 0x992C 0x992A 0x9933 0x9932 0x992F 0x992D 0x9931 \ - 0x9930 0x9998 0x99A3 0x99A1 0x9A02 0x99FA 0x99F4 0x99F7 \ - 0x99F9 0x99F8 0x99F6 0x99FB 0x99FD 0x99FE 0x99FC 0x9A03 \ - 0x9ABE 0x9AFE 0x9AFD 0x9B01 0x9AFC 0x9B48 0x9B9A 0x9BA8 \ - 0x9B9E 0x9B9B 0x9BA6 0x9BA1 0x9BA5 0x9BA4 0x9B86 0x9BA2 \ - 0x9BA0 0x9BAF 0x9D33 0x9D41 0x9D67 0x9D36 0x9D2E 0x9D2F \ - 0x9D31 0x9D38 0x9D30 0x5B49 0x5BF7 0x5DD0 0x5FC2 0x6511 \ - 0x6AFF 0x6AFE 0x6AFD 0x6B01 0x704B 0x704D 0x7047 0x74D3 \ - 0x7668 0x7667 0x77D1 0x7930 0x7932 0x792E 0x9F9D 0x7AC9 \ - 0x7AC8 0x7C56 0x7C51 0x7E85 0x7E89 0x7E8E 0x7E84 0x826A -83 0x862B 0x862F 0x8628 0x8616 0x9D45 0x9D42 0x9D43 0x9D3E \ - 0x9D37 0x9D40 0x9D3D 0x7FF5 0x9D2D 0x9E8A 0x9E89 0x9E8D \ - 0x9EB0 0x9EC8 0x9EDA 0x9EFB 0x9EFF 0x9F24 0x9F23 0x9F22 \ - 0x9F54 0x9FA0 0x5131 0x512D 0x512E 0x5698 0x569C 0x5697 \ - 0x569A 0x569D 0x5699 0x5970 0x5B3C 0x5C69 0x5C6A 0x5DC0 \ - 0x5E6D 0x5E6E 0x61D8 0x61DF 0x61ED 0x61EE 0x61F1 0x61EA \ - 0x61F0 0x61EB 0x61D6 0x61E9 0x64FF 0x6504 0x64FD 0x64F8 \ - 0x6501 0x6503 0x64FC 0x6594 0x65DB 0x66DA 0x66DB 0x66D8 \ - 0x6AC5 0x6AB9 0x6ABD 0x6AE1 0x6AC6 0x6ABA 0x6AB6 0x6AB7 \ - 0x6AC7 0x6AB4 0x6AAD 0x6B5E 0x6BC9 0x6C0B 0x7007 0x700C \ - 0x700D 0x7001 0x7005 0x7014 0x700E 0x6FFF 0x7000 0x6FFB \ - 0x7026 0x6FFC 0x6FF7 0x700A 0x7201 0x71FF 0x71F9 0x7203 \ - 0x71FD 0x7376 0x74B8 0x74C0 0x74B5 0x74C1 0x74BE 0x74B6 \ - 0x74BB 0x74C2 0x7514 0x7513 0x765C 0x7664 0x7659 0x7650 \ - 0x7653 0x7657 0x765A 0x76A6 0x76BD 0x76EC 0x77C2 0x77BA \ - 0x78FF 0x790C 0x7913 0x7914 0x7909 0x7910 0x7912 0x7911 \ - 0x79AD 0x79AC 0x7A5F 0x7C1C 0x7C29 0x7C19 0x7C20 0x7C1F \ - 0x7C2D 0x7C1D 0x7C26 0x7C28 0x7C22 0x7C25 0x7C30 0x7E5C \ - 0x7E50 0x7E56 0x7E63 0x7E58 0x7E62 0x7E5F 0x7E51 0x7E60 \ - 0x7E57 0x7E53 0x7FB5 0x7FB3 0x7FF7 0x7FF8 0x8075 0x81D1 \ - 0x81D2 0x8615 0x861D 0x881A 0x89BC 0x8B75 0x8B7C 0x8D11 \ - 0x8D12 0x8F5C 0x91BB 0x93F4 0x942D 0x96E4 0x9737 0x9736 \ - 0x9767 0x97BE 0x97BD 0x97E2 0x9868 0x9866 0x98C8 0x98CA \ - 0x98C7 0x98DC 0x994F 0x99A9 0x9A3C 0x9A3B 0x9ACE 0x9B14 \ - 0x9B53 0x9C2E 0x81D0 0x825F 0x825E 0x85B4 0x85C6 0x85C0 \ - 0x85C3 0x85C2 0x85B3 0x85B5 0x85BD 0x85C7 0x85C4 0x85BF \ - 0x85CB 0x85CE 0x85C8 0x85C5 0x85B1 0x85B6 0x85D2 0x8624 \ - 0x85B8 0x85B7 0x85BE 0x8669 0x87E7 0x87E6 0x87E2 0x87DB \ - 0x87EB 0x87EA 0x87E5 0x87DF 0x87F3 0x87E4 0x87D4 0x87DC \ - 0x87D3 0x87ED 0x87D8 0x87E3 0x87A4 0x87D7 0x87D9 0x8801 \ - 0x87F4 0x87E8 0x87DD 0x8953 0x894B 0x894F 0x894C 0x8946 \ - 0x8950 0x8951 0x8949 0x8B2A 0x8B27 0x8B23 0x8B33 0x8B30 -84 0x8B35 0x8B47 0x8B2F 0x8B3C 0x8B3E 0x8B31 0x8B25 0x8B37 \ - 0x8B26 0x8B36 0x8B2E 0x8B24 0x8B3B 0x8B3D 0x8B3A 0x8C42 \ - 0x8C75 0x8C99 0x8C98 0x8C97 0x8CFE 0x8D04 0x8D02 0x8D00 \ - 0x8E5C 0x8E62 0x8E60 0x8E57 0x8E56 0x8E5E 0x8E65 0x8E67 \ - 0x8E5B 0x8E5A 0x8E61 0x8E5D 0x8E69 0x8E54 0x8F46 0x8F47 \ - 0x8F48 0x8F4B 0x9128 0x913A 0x913B 0x913E 0x91A8 0x91A5 \ - 0x91A7 0x91AF 0x91AA 0x93B5 0x938C 0x9392 0x93B7 0x939B \ - 0x939D 0x9389 0x93A7 0x938E 0x93AA 0x939E 0x93A6 0x9395 \ - 0x9388 0x9399 0x939F 0x938D 0x93B1 0x9391 0x93B2 0x93A4 \ - 0x93A8 0x93B4 0x93A3 0x93A5 0x95D2 0x95D3 0x95D1 0x96B3 \ - 0x96D7 0x96DA 0x5DC2 0x96DF 0x96D8 0x96DD 0x9723 0x9722 \ - 0x9725 0x97AC 0x97AE 0x97A8 0x97AB 0x97A4 0x97AA 0x9C1F \ - 0x9DB0 0x9DBD 0x9DAE 0x9DC4 0x9E7B 0x9E9E 0x9F05 0x9F69 \ - 0x9FA1 0x56C7 0x571D 0x5B4A 0x5DD3 0x5F72 0x6202 0x6235 \ - 0x6527 0x651E 0x651F 0x6B07 0x6B06 0x7054 0x721C 0x7220 \ - 0x7AF8 0x7C5D 0x7C58 0x7E92 0x7F4E 0x8827 0x8B81 0x8B83 \ - 0x97A2 0x97A5 0x97D7 0x97D9 0x97D6 0x97D8 0x97FA 0x9850 \ - 0x9851 0x9852 0x98B8 0x9941 0x993C 0x993A 0x9A0F 0x9A0B \ - 0x9A09 0x9A0D 0x9A04 0x9A11 0x9A0A 0x9A05 0x9A07 0x9A06 \ - 0x9AC0 0x9ADC 0x9B08 0x9B04 0x9B05 0x9B29 0x9B35 0x9B4A \ - 0x9B4C 0x9B4B 0x9BC7 0x9BC6 0x9BC3 0x9BBF 0x9BC1 0x9BB5 \ - 0x9BB8 0x9BD3 0x9BB6 0x9BC4 0x9BB9 0x9BBD 0x9D5C 0x9D53 \ - 0x9D4F 0x9D4A 0x9D5B 0x9D4B 0x9D59 0x9D56 0x9D4C 0x9D57 \ - 0x9D52 0x9D54 0x9D5F 0x9D58 0x9D5A 0x9E8E 0x9E8C 0x9EDF \ - 0x9F01 0x9F00 0x9F16 0x9F25 0x9F2B 0x9F2A 0x9F29 0x9F28 \ - 0x9F4C 0x9F55 0x5134 0x5135 0x5296 0x52F7 0x53B4 0x56AB \ - 0x56AD 0x56A6 0x56A7 0x56AA 0x56AC 0x58DA 0x58DD 0x58DB \ - 0x5912 0x5B3D 0x5B3E 0x5B3F 0x5DC3 0x5E70 0x5FBF 0x61FB \ - 0x6507 0x6510 0x650D 0x6509 0x650C 0x650E 0x6584 0x65DE \ - 0x65DD 0x66DE 0x6AE7 0x6AE0 0x6ACC 0x6AD1 0x6AD9 0x6ACB \ - 0x6ADF 0x6ADC 0x6AD0 0x6AEB 0x6ACF 0x6ACD 0x6ADE 0x6B60 \ - 0x6BB0 0x6C0C 0x7019 0x7027 0x7020 0x7016 0x702B 0x7021 -85 0x7022 0x7023 0x7029 0x7017 0x7024 0x701C 0x702A 0x720C \ - 0x720A 0x7207 0x7202 0x7205 0x72A5 0x72A6 0x72A4 0x72A3 \ - 0x72A1 0x74CB 0x74C5 0x74B7 0x74C3 0x7516 0x7660 0x77C9 \ - 0x77CA 0x77C4 0x77F1 0x791D 0x791B 0x8C44 0x9442 0x944D \ - 0x9454 0x944E 0x9443 0x973C 0x9740 0x97C0 0x995A 0x9A51 \ - 0x9ADD 0x9C38 0x9C45 0x9C3A 0x9C35 0x9EF1 0x9F93 0x529A \ - 0x8641 0x5DD7 0x6528 0x7053 0x7059 0x7221 0x766F 0x7937 \ - 0x79B5 0x7C62 0x7C5E 0x7CF5 0x863D 0x882D 0x7921 0x791C \ - 0x7917 0x791E 0x79B0 0x7A67 0x7A68 0x7C33 0x7C3C 0x7C39 \ - 0x7C2C 0x7C3B 0x7CEC 0x7CEA 0x7E76 0x7E75 0x7E78 0x7E70 \ - 0x7E77 0x7E6F 0x7E7A 0x7E72 0x7E74 0x7E68 0x7F4B 0x7F4A \ - 0x7F83 0x7F86 0x7FB7 0x7FFD 0x7FFE 0x8078 0x81D7 0x81D5 \ - 0x8264 0x8261 0x8263 0x85EB 0x85F1 0x85ED 0x85D9 0x85E1 \ - 0x85E8 0x85DA 0x85D7 0x85EC 0x85F2 0x85F8 0x85D8 0x85DF \ - 0x85E3 0x85DC 0x85D1 0x85F0 0x85E6 0x85EF 0x85DE 0x85E2 \ - 0x8800 0x87FA 0x8803 0x87F6 0x87F7 0x8809 0x880C 0x880B \ - 0x8806 0x87FC 0x8808 0x87FF 0x880A 0x8802 0x8962 0x895A \ - 0x895B 0x8957 0x8961 0x895C 0x8958 0x895D 0x8959 0x8988 \ - 0x89B7 0x89B6 0x89F6 0x8B50 0x8B48 0x8B4A 0x8B40 0x8B53 \ - 0x8B56 0x8B54 0x8B4B 0x8B55 0x8B51 0x8B42 0x8B52 0x8B57 \ - 0x8C43 0x8C77 0x8C76 0x8C9A 0x8D06 0x8D07 0x8D09 0x8DAC \ - 0x8DAA 0x8DAD 0x8DAB 0x8E6D 0x8E78 0x8E73 0x8E6A 0x8E6F \ - 0x8E7B 0x8EC2 0x8F52 0x8F51 0x8F4F 0x8F50 0x8F53 0x8FB4 \ - 0x9140 0x913F 0x91B0 0x91AD 0x93DE 0x93C7 0x93CF 0x93C2 \ - 0x93DA 0x93D0 0x93F9 0x93EC 0x93CC 0x93D9 0x93A9 0x93E6 \ - 0x93CA 0x93D4 0x93EE 0x93E3 0x93D5 0x93C4 0x93CE 0x93C0 \ - 0x93D2 0x93E7 0x957D 0x95DA 0x95DB 0x96E1 0x9729 0x972B \ - 0x972C 0x9728 0x9726 0x8989 0x8B8D 0x8B87 0x8B90 0x8D1A \ - 0x8E99 0x945F 0x9456 0x9461 0x945B 0x945A 0x945C 0x9465 \ - 0x9741 0x986E 0x986C 0x986D 0x99AA 0x9A5C 0x9A58 0x9ADE \ - 0x9C4F 0x9C51 0x9C53 0x9DFC 0x9F39 0x513E 0x56D2 0x5B4F \ - 0x6B14 0x7A72 0x7A73 0x8B91 0x97B3 0x97B7 0x97B6 0x97DD -86 0x97DE 0x97DF 0x985C 0x9859 0x985D 0x9857 0x98BF 0x98BD \ - 0x98BB 0x98BE 0x9948 0x9947 0x9943 0x99A6 0x99A7 0x9A1A \ - 0x9A15 0x9A25 0x9A1D 0x9A24 0x9A1B 0x9A22 0x9A20 0x9A27 \ - 0x9A23 0x9A1E 0x9A1C 0x9A14 0x9AC2 0x9B0B 0x9B0A 0x9B0E \ - 0x9B0C 0x9B37 0x9BEA 0x9BEB 0x9BE0 0x9BDE 0x9BE4 0x9BE6 \ - 0x9BE2 0x9BF0 0x9BD4 0x9BD7 0x9BEC 0x9BDC 0x9BD9 0x9BE5 \ - 0x9BD5 0x9BE1 0x9BDA 0x9D77 0x9D81 0x9D8A 0x9D84 0x9D88 \ - 0x9D71 0x9D80 0x9D78 0x9D86 0x9D8B 0x9D8C 0x9D7D 0x9D6B \ - 0x9D74 0x9D75 0x9D70 0x9D69 0x9D85 0x9D73 0x9D7B 0x9D82 \ - 0x9D6F 0x9D79 0x9D7F 0x9D87 0x9D68 0x9E94 0x9E91 0x9EC0 \ - 0x9EFC 0x9F2D 0x9F40 0x9F41 0x9F4D 0x9F56 0x9F57 0x9F58 \ - 0x5337 0x56B2 0x56B5 0x56B3 0x58E3 0x5B45 0x5DC6 0x5DC7 \ - 0x5EEE 0x5EEF 0x5FC0 0x5FC1 0x61F9 0x6517 0x6516 0x6515 \ - 0x6513 0x65DF 0x66E8 0x66E3 0x66E4 0x6AF3 0x6AF0 0x6AEA \ - 0x6AE8 0x6AF9 0x6AF1 0x6AEE 0x6AEF 0x703C 0x7035 0x702F \ - 0x7037 0x7034 0x7031 0x7042 0x7038 0x703F 0x703A 0x7039 \ - 0x7040 0x703B 0x7033 0x7041 0x7213 0x7214 0x72A8 0x737D \ - 0x737C 0x74BA 0x76AB 0x76AA 0x76BE 0x76ED 0x77CC 0x77CE \ - 0x77CF 0x77CD 0x77F2 0x7925 0x7923 0x7927 0x7928 0x7924 \ - 0x7929 0x91BF 0x946C 0x96E6 0x9745 0x97C8 0x97E4 0x995D \ - 0x9B21 0x9B2C 0x9B57 0x9C5D 0x9C61 0x9C65 0x9E08 0x9F45 \ - 0x6205 0x66EF 0x6B1B 0x6B1D 0x7225 0x7224 0x7C6D 0x8642 \ - 0x8649 0x8978 0x898A 0x8B97 0x8C9B 0x8D1C 0x8EA2 0x9C6C \ - 0x9C6F 0x9E0E 0x79B2 0x7A6E 0x7A6C 0x7A6D 0x7AF7 0x7C49 \ - 0x7C48 0x7C4A 0x7C47 0x7C45 0x7CEE 0x7E7B 0x7E7E 0x7E81 \ - 0x7E80 0x7FBA 0x7FFF 0x8079 0x81DB 0x81D9 0x820B 0x8268 \ - 0x8269 0x8622 0x85FF 0x8601 0x85FE 0x861B 0x8600 0x85F6 \ - 0x8604 0x8609 0x8605 0x860C 0x85FD 0x8819 0x8810 0x8811 \ - 0x8817 0x8813 0x8816 0x8963 0x8966 0x89B9 0x89F7 0x8B60 \ - 0x8B6A 0x8B5D 0x8B68 0x8B63 0x8B65 0x8B67 0x8B6D 0x8DAE \ - 0x8E86 0x8E88 0x8E84 0x8F59 0x8F56 0x8F57 0x8F55 0x8F58 \ - 0x8F5A 0x908D 0x9143 0x9141 0x91B7 0x91B5 0x91B2 0x91B3 -87 0x940B 0x9413 0x93FB 0x9420 0x940F 0x9414 0x93FE 0x9415 \ - 0x9410 0x9428 0x9419 0x940D 0x93F5 0x9400 0x93F7 0x9407 \ - 0x940E 0x9416 0x9412 0x93FA 0x9409 0x93F8 0x940A 0x93FF \ - 0x93FC 0x940C 0x93F6 0x9411 0x9406 0x95DE 0x95E0 0x95DF \ - 0x972E 0x972F 0x97B9 0x97BB 0x97FD 0x97FE 0x9860 0x9862 \ - 0x9863 0x985F 0x98C1 0x98C2 0x9950 0x994E 0x9959 0x994C \ - 0x994B 0x9953 0x9A32 0x9A34 0x9A31 0x9A2C 0x9A2A 0x9A36 \ - 0x9A29 0x9A2E 0x9A38 0x9A2D 0x9AC7 0x9ACA 0x9AC6 0x9B10 \ - 0x9B12 0x9B11 0x9C0B 0x9C08 0x9BF7 0x9C05 0x9C12 0x9BF8 \ - 0x9C40 0x9C07 0x9C0E 0x9C06 0x9C17 0x9C14 0x9C09 0x9D9F \ - 0x9D99 0x9DA4 0x9D9D 0x9D92 0x9D98 0x9D90 0x9D9B 0x9F08 \ - 0x9F1D 0x9FA3 0x5F60 0x6B1C 0x7CF3 0x8B9B 0x8EA7 0x91C4 \ - 0x947A 0x9A61 0x9A63 0x9AD7 0x9C76 0x9FA5 0x7067 0x72AB \ - 0x864A 0x897D 0x8B9D 0x8C53 0x8F65 0x947B 0x98CD 0x98DD \ - 0x9B30 0x9E16 0x96E7 0x9E18 0x9EA2 0x9F7C 0x7E9E 0x9484 \ - 0x9DA0 0x9D94 0x9D9C 0x9DAA 0x9D97 0x9DA1 0x9D9A 0x9DA2 \ - 0x9DA8 0x9D9E 0x9DA3 0x9DBF 0x9DA9 0x9D96 0x9DA6 0x9DA7 \ - 0x9E99 0x9E9B 0x9E9A 0x9EE5 0x9EE4 0x9EE7 0x9EE6 0x9F30 \ - 0x9F2E 0x9F5B 0x9F60 0x9F5E 0x9F5D 0x9F59 0x9F91 0x513A \ - 0x5139 0x5298 0x5297 0x56C3 0x56BD 0x56BE 0x5B48 0x5B47 \ - 0x5DCB 0x5DCF 0x5EF1 0x61FD 0x651B 0x6B02 0x6AFC 0x6B03 \ - 0x6AF8 0x6B00 0x7043 0x7044 0x704A 0x7048 0x7049 0x7045 \ - 0x7046 0x721D 0x721A 0x7219 0x737E 0x7517 0x766A 0x77D0 \ - 0x792D 0x7931 0x792F 0x7C54 0x7C53 0x7CF2 0x7E8A 0x7E87 \ - 0x7E88 0x7E8B 0x7E86 0x7E8D 0x7F4D 0x7FBB 0x8030 0x81DD \ - 0x8618 0x862A 0x8626 0x861F 0x8623 0x861C 0x8619 0x8627 \ - 0x862E 0x8621 0x8620 0x8629 0x861E 0x8625 0x8829 0x881D \ - 0x881B 0x8820 0x8824 0x881C 0x882B 0x884A 0x896D 0x8969 \ - 0x896E 0x896B 0x89FA 0x8B79 0x8B78 0x8B45 0x8B7A 0x8B7B \ - 0x8D10 0x8D14 0x8DAF 0x8E8E 0x8E8C 0x8F5E 0x8F5B 0x8F5D \ - 0x9146 0x9144 0x9145 0x91B9 0x943F 0x943B 0x9436 0x9429 \ - 0x943D 0x943C 0x9430 0x9439 0x942A 0x9437 0x942C 0x9440 -88 0x9431 0x95E5 0x95E4 0x95E3 0x9735 0x973A 0x97BF 0x97E1 \ - 0x9864 0x98C9 0x98C6 0x98C0 0x9958 0x9956 0x9A39 0x9A3D \ - 0x9A46 0x9A44 0x9A42 0x9A41 0x9A3A 0x9E1C 0x7C71 0x97CA \ - 0x9EA3 0x9C7B 0x9F97 0x9750 0x4E40 0x4E41 0x4E5A 0x4E02 \ - 0x4E29 0x5202 0x5DDC 0x5342 0x536A 0x5B52 0x5FC4 0x624C \ - 0x72AD 0x4E12 0x4E2F 0x4E96 0x4ED0 0x5142 0x5183 0x5383 \ - 0x53B8 0x5928 0x5C23 0x5E01 0x5F00 0x706C 0x9A3F 0x9ACD \ - 0x9B15 0x9B17 0x9B18 0x9B16 0x9B3A 0x9B52 0x9C2B 0x9C1D \ - 0x9C1C 0x9C2C 0x9C23 0x9C28 0x9C29 0x9C24 0x9C21 0x9DB7 \ - 0x9DB6 0x9DBC 0x9DC1 0x9DC7 0x9DCA 0x9DCF 0x9DBE 0x9DC5 \ - 0x9DC3 0x9DBB 0x9DB5 0x9DCE 0x9DB9 0x9DBA 0x9DAC 0x9DC8 \ - 0x9DB1 0x9DAD 0x9DCC 0x9DB3 0x9DCD 0x9DB2 0x9E7A 0x9E9C \ - 0x9EEB 0x9EEE 0x9EED 0x9F1B 0x9F18 0x9F1A 0x9F31 0x9F4E \ - 0x9F65 0x9F64 0x9F92 0x4EB9 0x56C6 0x56C5 0x56CB 0x5971 \ - 0x5B4B 0x5B4C 0x5DD5 0x5DD1 0x5EF2 0x6521 0x6520 0x6526 \ - 0x6522 0x6B0B 0x6B08 0x6B09 0x6C0D 0x7055 0x7056 0x7057 \ - 0x7052 0x721E 0x721F 0x72A9 0x737F 0x74D8 0x74D5 0x74D9 \ - 0x74D7 0x766D 0x76AD 0x7935 0x79B4 0x7A70 0x7A71 0x7C57 \ - 0x7C5C 0x7C59 0x7C5B 0x7C5A 0x7CF4 0x7CF1 0x7E91 0x7F4F \ - 0x7F87 0x81DE 0x826B 0x8634 0x8635 0x8633 0x862C 0x8632 \ - 0x8636 0x882C 0x8828 0x8826 0x882A 0x8825 0x8971 0x89BF \ - 0x89BE 0x89FB 0x8B7E 0x8B84 0x8B82 0x8B86 0x8B85 0x8B7F \ - 0x8D15 0x8E95 0x8E94 0x8E9A 0x8E92 0x8E90 0x8E96 0x8E97 \ - 0x8F60 0x8F62 0x9147 0x944C 0x9450 0x944A 0x944B 0x944F \ - 0x9447 0x9445 0x9448 0x9449 0x9446 0x973F 0x97E3 0x986A \ - 0x9869 0x98CB 0x9954 0x995B 0x9A4E 0x9A53 0x9A54 0x9A4C \ - 0x9A4F 0x9A48 0x9A4A 0x722B 0x5188 0x8279 0x8FB6 0x4E17 \ - 0x4EE2 0x4EDB 0x51AD 0x51F7 0x531B 0x5388 0x5387 0x53CF \ - 0x53FD 0x53E7 0x56DC 0x56D9 0x5725 0x5727 0x5933 0x5C13 \ - 0x5C75 0x66F1 0x7F52 0x4E51 0x4E6A 0x4F0C 0x4EFE 0x4F1B \ - 0x5173 0x518E 0x52A5 0x52A7 0x9A49 0x9A52 0x9A50 0x9AD0 \ - 0x9B19 0x9B2B 0x9B3B 0x9B56 0x9B55 0x9C46 0x9C48 0x9C3F -89 0x9C44 0x9C39 0x9C33 0x9C41 0x9C3C 0x9C37 0x9C34 0x9C32 \ - 0x9C3D 0x9C36 0x9DDB 0x9DD2 0x9DDE 0x9DDA 0x9DCB 0x9DD0 \ - 0x9DDC 0x9DD1 0x9DDF 0x9DE9 0x9DD9 0x9DD8 0x9DD6 0x9DF5 \ - 0x9DD5 0x9DDD 0x9EB6 0x9EF0 0x9F35 0x9F33 0x9F32 0x9F42 \ - 0x9F6B 0x9F95 0x9FA2 0x513D 0x5299 0x58E8 0x58E7 0x5972 \ - 0x5B4D 0x5DD8 0x882F 0x5F4F 0x6201 0x6203 0x6204 0x6529 \ - 0x6525 0x6596 0x66EB 0x6B11 0x6B12 0x6B0F 0x6BCA 0x705B \ - 0x705A 0x7222 0x7382 0x7381 0x7383 0x7670 0x77D4 0x7C67 \ - 0x7C66 0x7E95 0x826C 0x863A 0x8640 0x8639 0x863C 0x8631 \ - 0x863B 0x863E 0x8830 0x8832 0x882E 0x8833 0x8976 0x8974 \ - 0x8973 0x89FE 0x8B8C 0x8B8E 0x8B8B 0x8B88 0x8C45 0x8D19 \ - 0x8E98 0x8F64 0x8F63 0x91BC 0x9462 0x9455 0x945D 0x9457 \ - 0x945E 0x97C4 0x97C5 0x9800 0x9A56 0x9A59 0x9B1E 0x9B1F \ - 0x9B20 0x9C52 0x9C58 0x9C50 0x9C4A 0x9C4D 0x9C4B 0x9C55 \ - 0x9C59 0x9C4C 0x9C4E 0x9DFB 0x9DF7 0x9DEF 0x9DE3 0x9DEB \ - 0x9DF8 0x9DE4 0x9DF6 0x9DE1 0x9DEE 0x9DE6 0x9DF2 0x9DF0 \ - 0x9DE2 0x9DEC 0x9DF4 0x9DF3 0x9DE8 0x9DED 0x9EC2 0x9ED0 \ - 0x9EF2 0x9EF3 0x9F06 0x9F1C 0x9F38 0x9F37 0x9F36 0x9F43 \ - 0x9F4F 0x52A4 0x53BD 0x5402 0x572B 0x591B 0x5935 0x5C17 \ - 0x5C70 0x5C7D 0x5DE9 0x5F19 0x5F1C 0x5F75 0x5FC8 0x6C12 \ - 0x72B3 0x7390 0x7536 0x8281 0x8FB8 0x4E23 0x4F2E 0x514F \ - 0x51BA 0x5222 0x52AF 0x52B0 0x52B1 0x5364 0x53D3 0x593F \ - 0x598B 0x5991 0x9F71 0x9F70 0x9F6E 0x9F6F 0x56D3 0x56CD \ - 0x5B4E 0x5C6D 0x652D 0x66ED 0x66EE 0x6B13 0x705F 0x7061 \ - 0x705D 0x7060 0x7223 0x74DB 0x74E5 0x77D5 0x7938 0x79B7 \ - 0x79B6 0x7C6A 0x7E97 0x7F89 0x826D 0x8643 0x8838 0x8837 \ - 0x8835 0x884B 0x8B94 0x8B95 0x8E9E 0x8E9F 0x8EA0 0x8E9D \ - 0x91BE 0x91BD 0x91C2 0x946B 0x9468 0x9469 0x96E5 0x9746 \ - 0x9743 0x9747 0x97C7 0x97E5 0x9A5E 0x9AD5 0x9B59 0x9C63 \ - 0x9C67 0x9C66 0x9C62 0x9C5E 0x9C60 0x9E02 0x9DFE 0x9E07 \ - 0x9E03 0x9E06 0x9E05 0x9E00 0x9E01 0x9E09 0x9DFF 0x9DFD \ - 0x9E04 0x9EA0 0x9F1E 0x9F46 0x9F74 0x9F75 0x9F76 0x56D4 -90 0x652E 0x65B8 0x6B18 0x6B19 0x6B17 0x6B1A 0x7062 0x7226 \ - 0x72AA 0x77D8 0x77D9 0x7939 0x7C69 0x7C6B 0x7CF6 0x7E9A \ - 0x7E98 0x7E9B 0x7E99 0x81E0 0x81E1 0x8646 0x8647 0x8648 \ - 0x8979 0x897A 0x897C 0x897B 0x89FF 0x8B98 0x8B99 0x8EA5 \ - 0x8EA4 0x8EA3 0x946E 0x946D 0x946F 0x9471 0x9473 0x9749 \ - 0x9872 0x995F 0x9C68 0x9C6E 0x9C6D 0x9E0B 0x9E0D 0x9E10 \ - 0x9E0F 0x9E12 0x9E11 0x9EA1 0x9EF5 0x9F09 0x9F47 0x9F78 \ - 0x9F7B 0x9F7A 0x9F79 0x571E 0x7066 0x7C6F 0x883C 0x8DB2 \ - 0x8EA6 0x91C3 0x9474 0x9478 0x9476 0x9475 0x9A60 0x9C74 \ - 0x9C73 0x9C71 0x9C75 0x9E14 0x9E13 0x9EF6 0x9F0A 0x5995 \ - 0x5B8A 0x5C87 0x5E0D 0x5E8E 0x5F7A 0x6290 0x629A 0x653C \ - 0x653A 0x6598 0x6765 0x79C2 0x809E 0x81EB 0x8289 0x8296 \ - 0x8287 0x8FC0 0x8FC3 0x9578 0x9625 0x4E75 0x4E74 0x4F99 \ - 0x4F71 0x5153 0x51BF 0x51C0 0x51EE 0x523D 0x52BD 0x530C \ - 0x9FA4 0x7068 0x7065 0x7CF7 0x866A 0x883E 0x883D 0x883F \ - 0x8B9E 0x8C9C 0x8EA9 0x8EC9 0x974B 0x9873 0x9874 0x98CC \ - 0x9961 0x99AB 0x9A64 0x9A66 0x9A67 0x9B24 0x9E15 0x9E17 \ - 0x9F48 0x6207 0x6B1E 0x7227 0x864C 0x8EA8 0x9482 0x9480 \ - 0x9481 0x9A69 0x9A68 0x9B2E 0x9E19 0x7229 0x864B 0x8B9F \ - 0x9483 0x9C79 0x9EB7 0x7675 0x9A6B 0x9C7A 0x9E1D 0x7069 \ - 0x706A 0x9EA4 0x9F7E 0x9F49 0x9F98 0x7881 0x92B9 0x88CF \ - 0x58BB 0x6052 0x7CA7 0x5AFA 0x2554 0x2566 0x2557 0x2560 \ - 0x256C 0x2563 0x255A 0x2569 0x255D 0x2552 0x2564 0x2555 \ - 0x255E 0x256A 0x2561 0x2558 0x2567 0x255B 0x2553 0x2565 \ - 0x2556 0x255F 0x256B 0x2562 0x2559 0x2568 0x255C 0x2551 \ - 0x2550 0x2554 0x2557 0x255A 0x255D 0x2588 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -91 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x7F37 0x53C0 0x546E \ - 0x5483 0x545E 0x545D 0x577E 0x5779 0x577A 0x576C 0x5787 \ - 0x591D 0x5946 0x5943 0x5B61 0x5B66 0x5B90 0x5C29 0x5CB2 \ - 0x5CC0 0x601F 0x5FE2 0x6616 0x65F9 0x6788 0x679B 0x676E \ - 0x679E 0x6B24 0x6B7D 0x6CE6 0x6CCB 0x6CB5 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x7097 0x709B 0x726B 0x72D5 0x7543 \ - 0x759C 0x77E4 0x7ACE 0x8013 0x80B7 0x80B9 0x81E4 0x81FD \ - 0x820F 0x82BF 0x82CA 0x82C1 0x8FD0 0x90AE 0x9638 0x4FBC \ - 0x4FE9 0x4FBD 0x4FE2 0x5158 0x52C6 0x52C8 0x5328 0x5329 \ - 0x57B4 0x57A9 0x5B68 0x5F2B 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -92 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0x5F8D 0x6018 0x6057 0x6048 0x6038 0x6071 0x6312 \ - 0x630A 0x6323 0x662A 0x67E0 0x67BE 0x6B29 0x6D43 0x70A6 \ - 0x70C0 0x722F 0x7271 0x74EA 0x7520 0x75A9 0x7685 0x7706 \ - 0x76F6 0x7700 0x7702 0x8009 0x82DA 0x830A 0x9655 0x9652 \ - 0x4E35 0x5034 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -93 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x5001 \ - 0x500A 0x5258 0x532B 0x54EC 0x5515 0x54FE 0x54E3 0x5516 \ - 0x57D3 0x5959 0x5A27 0x5A28 0x5A10 0x5A0E 0x5BAF 0x5BBA \ - 0x5BB1 0x5CFC 0x5CF2 0x5CFE 0x5DF8 0x5F2C 0x6082 0x6091 \ - 0x608F 0x6547 0x654C 0x658A 0x67E1 0x684A 0x683F 0x67BD \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -94 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x70C9 0x73BA 0x75C6 \ - 0x75B7 0x768C 0x768D 0x7717 0x771C 0x7714 0x7B0C 0x7D23 \ - 0x7F98 0x7F90 0x803A 0x8226 0x832E 0x8355 0x831A 0x833D \ - 0x8330 0x8651 0x8688 0x898E 0x898D 0x8A09 0x8A14 0x9007 \ - 0x9579 0x9584 0x9657 0x96BA 0x5067 0x5318 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UBig5.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UBig5.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UBig5.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UBig5.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UBig5.sfd Wed Mar 16 20:59:33 2005 @@ -1,1854 +0,0 @@ -# UBig5.sfd -# -# subfont numbers for Big 5 encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x3000 0xFF0C 0x3001 0x3002 0xFF0E 0x2022 0xFF1B 0xFF1A \ - 0xFF1F 0xFF01 0xFE30 0x2026 0x2025 0xFE50 0xFF64 0xFE52 \ - 0x00B7 0xFE54 0xFE55 0xFE56 0xFE57 0xFF5C 0x2013 0xFE31 \ - 0x2014 0xFE33 0xFFFD 0xFE34 0xFE4F 0xFF08 0xFF09 0xFE35 \ - 0xFE36 0xFF5B 0xFF5D 0xFE37 0xFE38 0x3014 0x3015 0xFE39 \ - 0xFE3A 0x3010 0x3011 0xFE3B 0xFE3C 0x300A 0x300B 0xFE3D \ - 0xFE3E 0x3008 0x3009 0xFE3F 0xFE40 0x300C 0x300D 0xFE41 \ - 0xFE42 0x300E 0x300F 0xFE43 0xFE44 0xFE59 0xFE5A 0xFE5B \ - 0xFE5C 0xFE5D 0xFE5E 0x2018 0x2019 0x201C 0x201D 0x301D \ - 0x301E 0x2035 0x2032 0xFF03 0xFF06 0xFF0A 0x203B 0x00A7 \ - 0x3003 0x25CB 0x25CF 0x25B3 0x25B2 0x25CE 0x2606 0x2605 \ - 0x25C7 0x25C6 0x25A1 0x25A0 0x25BD 0x25BC 0x32A3 0x2105 \ - 0x203E 0xFFFD 0xFF3F 0xFFFD 0xFE49 0xFE4A 0xFE4D 0xFE4E \ - 0xFE4B 0xFE4C 0xFE5F 0xFE60 0xFE61 0xFF0B 0xFF0D 0x00D7 \ - 0x00F7 0x00B1 0x221A 0xFF1C 0xFF1E 0xFF1D 0x2266 0x2267 \ - 0x2260 0x221E 0x2252 0x2261 0xFE62 0xFE63 0xFE64 0xFE65 \ - 0xFE66 0x223C 0x2229 0x222A 0x22A5 0x2220 0x221F 0x22BF \ - 0x33D2 0x33D1 0x222B 0x222E 0x2235 0x2234 0x2640 0x2642 \ - 0x2641 0x2609 0x2191 0x2193 0x2190 0x2192 0x2196 0x2197 \ - 0x2199 0x2198 0x2225 0x2223 0xFFFD 0xFFFD 0xFF0F 0xFF3C \ - 0xFF04 0x00A5 0x3012 0x00A2 0x00A3 0xFF05 0xFF20 0x2103 \ - 0x2109 0xFE69 0xFE6A 0xFE6B 0x33D5 0x339C 0x339D 0x339E \ - 0x33CE 0x33A1 0x338E 0x338F 0x33C4 0x00B0 0x5159 0x515B \ - 0x515E 0x515D 0x5161 0x5163 0x55E7 0x74E9 0x7CCE 0x2581 \ - 0x2582 0x2583 0x2584 0x2585 0x2586 0x2587 0x2588 0x258F \ - 0x258E 0x258D 0x258C 0x258B 0x258A 0x2589 0x253C 0x2534 \ - 0x252C 0x2524 0x251C 0x2594 0x2500 0x2502 0x2595 0x250C \ - 0x2510 0x2514 0x2518 0x256D 0x256E 0x2570 0x256F 0x2550 \ - 0x255E 0x256A 0x2561 0x25E2 0x25E3 0x25E5 0x25E4 0x2571 \ - 0x2572 0x2573 0xFF10 0xFF11 0xFF12 0xFF13 0xFF14 0xFF15 \ - 0xFF16 0xFF17 0xFF18 0xFF19 0x2160 0x2161 0x2162 0x2163 \ - 0x2164 0x2165 0x2166 0x2167 0x2168 0x2169 0x3021 0x3022 -02 0x3023 0x3024 0x3025 0x3026 0x3027 0x3028 0x3029 0xFFFD \ - 0x5344 0xFFFD 0xFF21 0xFF22 0xFF23 0xFF24 0xFF25 0xFF26 \ - 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C 0xFF2D 0xFF2E \ - 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 0xFF35 0xFF36 \ - 0xFF37 0xFF38 0xFF39 0xFF3A 0xFF41 0xFF42 0xFF43 0xFF44 \ - 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A 0xFF4B 0xFF4C \ - 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 0xFF53 0xFF54 \ - 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A 0x0391 0x0392 \ - 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 0x0399 0x039A \ - 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 0x03A1 0x03A3 \ - 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 0x03B1 0x03B2 \ - 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 0x03B9 0x03BA \ - 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 0x03C1 0x03C3 \ - 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 0x3105 0x3106 \ - 0x3107 0x3108 0x3109 0x310A 0x310B 0x310C 0x310D 0x310E \ - 0x310F 0x3110 0x3111 0x3112 0x3113 0x3114 0x3115 0x3116 \ - 0x3117 0x3118 0x3119 0x311A 0x311B 0x311C 0x311D 0x311E \ - 0x311F 0x3120 0x3121 0x3122 0x3123 0x3124 0x3125 0x3126 \ - 0x3127 0x3128 0x3129 0x02D9 0x02C9 0x02CA 0x02C7 0x02CB \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x4E00 \ - 0x4E59 0x4E01 0x4E03 0x4E43 0x4E5D 0x4E86 0x4E8C 0x4EBA \ - 0x513F 0x5165 0x516B 0x51E0 0x5200 0x5201 0x529B 0x5315 \ - 0x5341 0x535C 0x53C8 0x4E09 0x4E0B 0x4E08 0x4E0A 0x4E2B \ - 0x4E38 0x51E1 0x4E45 0x4E48 0x4E5F 0x4E5E 0x4E8E 0x4EA1 \ - 0x5140 0x5203 0x52FA 0x5343 0x53C9 0x53E3 0x571F 0x58EB -03 0x5915 0x5927 0x5973 0x5B50 0x5B51 0x5B53 0x5BF8 0x5C0F \ - 0x5C22 0x5C38 0x5C71 0x5DDD 0x5DE5 0x5DF1 0x5DF2 0x5DF3 \ - 0x5DFE 0x5E72 0x5EFE 0x5F0B 0x5F13 0x624D 0x4E11 0x4E10 \ - 0x4E0D 0x4E2D 0x4E30 0x4E39 0x4E4B 0x5C39 0x4E88 0x4E91 \ - 0x4E95 0x4E92 0x4E94 0x4EA2 0x4EC1 0x4EC0 0x4EC3 0x4EC6 \ - 0x4EC7 0x4ECD 0x4ECA 0x4ECB 0x4EC4 0x5143 0x5141 0x5167 \ - 0x516D 0x516E 0x516C 0x5197 0x51F6 0x5206 0x5207 0x5208 \ - 0x52FB 0x52FE 0x52FF 0x5316 0x5339 0x5348 0x5347 0x5345 \ - 0x535E 0x5384 0x53CB 0x53CA 0x53CD 0x58EC 0x5929 0x592B \ - 0x592A 0x592D 0x5B54 0x5C11 0x5C24 0x5C3A 0x5C6F 0x5DF4 \ - 0x5E7B 0x5EFF 0x5F14 0x5F15 0x5FC3 0x6208 0x6236 0x624B \ - 0x624E 0x652F 0x6587 0x6597 0x65A4 0x65B9 0x65E5 0x66F0 \ - 0x6708 0x6728 0x6B20 0x6B62 0x6B79 0x6BCB 0x6BD4 0x6BDB \ - 0x6C0F 0x6C34 0x706B 0x722A 0x7236 0x723B 0x7247 0x7259 \ - 0x725B 0x72AC 0x738B 0x4E19 0x4E16 0x4E15 0x4E14 0x4E18 \ - 0x4E3B 0x4E4D 0x4E4F 0x4E4E 0x4EE5 0x4ED8 0x4ED4 0x4ED5 \ - 0x4ED6 0x4ED7 0x4EE3 0x4EE4 0x4ED9 0x4EDE 0x5145 0x5144 \ - 0x5189 0x518A 0x51AC 0x51F9 0x51FA 0x51F8 0x520A 0x52A0 \ - 0x529F 0x5305 0x5306 0x5317 0x531D 0x4EDF 0x534A 0x5349 \ - 0x5361 0x5360 0x536F 0x536E 0x53BB 0x53EF 0x53E4 0x53F3 \ - 0x53EC 0x53EE 0x53E9 0x53E8 0x53FC 0x53F8 0x53F5 0x53EB \ - 0x53E6 0x53EA 0x53F2 0x53F1 0x53F0 0x53E5 0x53ED 0x53FB \ - 0x56DB 0x56DA 0x5916 0x592E 0x5931 0x5974 0x5976 0x5B55 \ - 0x5B83 0x5C3C 0x5DE8 0x5DE7 0x5DE6 0x5E02 0x5E03 0x5E73 \ - 0x5E7C 0x5F01 0x5F18 0x5F17 0x5FC5 0x620A 0x6253 0x6254 \ - 0x6252 0x6251 0x65A5 0x65E6 0x672E 0x672C 0x672A 0x672B \ - 0x672D 0x6B63 0x6BCD 0x6C11 0x6C10 0x6C38 0x6C41 0x6C40 \ - 0x6C3E 0x72AF 0x7384 0x7389 0x74DC 0x74E6 0x7518 0x751F \ - 0x7528 0x7529 0x7530 0x7531 0x7532 0x7533 0x758B 0x767D \ - 0x76AE 0x76BF 0x76EE 0x77DB 0x77E2 0x77F3 0x793A 0x79BE \ - 0x7A74 0x7ACB 0x4E1E 0x4E1F 0x4E52 0x4E53 0x4E69 0x4E99 \ - 0x4EA4 0x4EA6 0x4EA5 0x4EFF 0x4F09 0x4F19 0x4F0A 0x4F15 -04 0x4F0D 0x4F10 0x4F11 0x4F0F 0x4EF2 0x4EF6 0x4EFB 0x4EF0 \ - 0x4EF3 0x4EFD 0x4F01 0x4F0B 0x5149 0x5147 0x5146 0x5148 \ - 0x5168 0x5171 0x518D 0x51B0 0x5217 0x5211 0x5212 0x520E \ - 0x5216 0x52A3 0x5308 0x5321 0x5320 0x5370 0x5371 0x5409 \ - 0x540F 0x540C 0x540A 0x5410 0x5401 0x540B 0x5404 0x5411 \ - 0x540D 0x5408 0x5403 0x540E 0x5406 0x5412 0x56E0 0x56DE \ - 0x56DD 0x5733 0x5730 0x5728 0x572D 0x572C 0x572F 0x5729 \ - 0x5919 0x591A 0x5937 0x5938 0x5984 0x5978 0x5983 0x597D \ - 0x5979 0x5982 0x5981 0x5B57 0x5B58 0x5B87 0x5B88 0x5B85 \ - 0x5B89 0x5BFA 0x5C16 0x5C79 0x5DDE 0x5E06 0x5E76 0x5E74 \ - 0x5F0F 0x5F1B 0x5FD9 0x5FD6 0x620E 0x620C 0x620D 0x6210 \ - 0x6263 0x625B 0x6258 0x6536 0x65E9 0x65E8 0x65EC 0x65ED \ - 0x66F2 0x66F3 0x6709 0x673D 0x6734 0x6731 0x6735 0x6B21 \ - 0x6B64 0x6B7B 0x6C16 0x6C5D 0x6C57 0x6C59 0x6C5F 0x6C60 \ - 0x6C50 0x6C55 0x6C61 0x6C5B 0x6C4D 0x6C4E 0x7070 0x725F \ - 0x725D 0x767E 0x7AF9 0x7C73 0x7CF8 0x7F36 0x7F8A 0x7FBD \ - 0x8001 0x8003 0x800C 0x8012 0x8033 0x807F 0x8089 0x808B \ - 0x808C 0x81E3 0x81EA 0x81F3 0x81FC 0x820C 0x821B 0x821F \ - 0x826E 0x8272 0x827E 0x866B 0x8840 0x884C 0x8863 0x897F \ - 0x9621 0x4E32 0x4EA8 0x4F4D 0x4F4F 0x4F47 0x4F57 0x4F5E \ - 0x4F34 0x4F5B 0x4F55 0x4F30 0x4F50 0x4F51 0x4F3D 0x4F3A \ - 0x4F38 0x4F43 0x4F54 0x4F3C 0x4F46 0x4F63 0x4F5C 0x4F60 \ - 0x4F2F 0x4F4E 0x4F36 0x4F59 0x4F5D 0x4F48 0x4F5A 0x514C \ - 0x514B 0x514D 0x5175 0x51B6 0x51B7 0x5225 0x5224 0x5229 \ - 0x522A 0x5228 0x52AB 0x52A9 0x52AA 0x52AC 0x5323 0x5373 \ - 0x5375 0x541D 0x542D 0x541E 0x543E 0x5426 0x544E 0x5427 \ - 0x5446 0x5443 0x5433 0x5448 0x5442 0x541B 0x5429 0x544A \ - 0x5439 0x543B 0x5438 0x542E 0x5435 0x5436 0x5420 0x543C \ - 0x5440 0x5431 0x542B 0x541F 0x542C 0x56EA 0x56F0 0x56E4 \ - 0x56EB 0x574A 0x5751 0x5740 0x574D 0x5747 0x574E 0x573E \ - 0x5750 0x574F 0x573B 0x58EF 0x593E 0x599D 0x5992 0x59A8 \ - 0x599E 0x59A3 0x5999 0x5996 0x598D 0x59A4 0x5993 0x598A -05 0x59A5 0x5B5D 0x5B5C 0x5B5A 0x5B5B 0x5B8C 0x5B8B 0x5B8F \ - 0x5C2C 0x5C40 0x5C41 0x5C3F 0x5C3E 0x5C90 0x5C91 0x5C94 \ - 0x5C8C 0x5DEB 0x5E0C 0x5E8F 0x5E87 0x5E8A 0x5EF7 0x5F04 \ - 0x5F1F 0x5F64 0x5F62 0x5F77 0x5F79 0x5FD8 0x5FCC 0x5FD7 \ - 0x5FCD 0x5FF1 0x5FEB 0x5FF8 0x5FEA 0x6212 0x6211 0x6284 \ - 0x6297 0x6296 0x6280 0x6276 0x6289 0x626D 0x628A 0x627C \ - 0x627E 0x6279 0x6273 0x6292 0x626F 0x6298 0x626E 0x6295 \ - 0x6293 0x6291 0x6286 0x6539 0x653B 0x6538 0x65F1 0x66F4 \ - 0x675F 0x674E 0x674F 0x6750 0x6751 0x675C 0x6756 0x675E \ - 0x6749 0x6746 0x6760 0x6753 0x6757 0x6B65 0x6BCF 0x6C42 \ - 0x6C5E 0x6C99 0x6C81 0x6C88 0x6C89 0x6C85 0x6C9B 0x6C6A \ - 0x6C7A 0x6C90 0x6C70 0x6C8C 0x6C68 0x6C96 0x6C92 0x6C7D \ - 0x6C83 0x6C72 0x6C7E 0x6C74 0x6C86 0x6C76 0x6C8D 0x6C94 \ - 0x6C98 0x6C82 0x7076 0x707C 0x707D 0x7078 0x7262 0x7261 \ - 0x7260 0x72C4 0x72C2 0x7396 0x752C 0x752B 0x7537 0x7538 \ - 0x7682 0x76EF 0x77E3 0x79C1 0x79C0 0x79BF 0x7A76 0x7CFB \ - 0x7F55 0x8096 0x8093 0x809D 0x8098 0x809B 0x809A 0x80B2 \ - 0x826F 0x8292 0x828B 0x828D 0x898B 0x89D2 0x8A00 0x8C37 \ - 0x8C46 0x8C55 0x8C9D 0x8D64 0x8D70 0x8DB3 0x8EAB 0x8ECA \ - 0x8F9B 0x8FB0 0x8FC2 0x8FC6 0x8FC5 0x8FC4 0x5DE1 0x9091 \ - 0x90A2 0x90AA 0x90A6 0x90A3 0x9149 0x91C6 0x91CC 0x9632 \ - 0x962E 0x9631 0x962A 0x962C 0x4E26 0x4E56 0x4E73 0x4E8B \ - 0x4E9B 0x4E9E 0x4EAB 0x4EAC 0x4F6F 0x4F9D 0x4F8D 0x4F73 \ - 0x4F7F 0x4F6C 0x4F9B 0x4F8B 0x4F86 0x4F83 0x4F70 0x4F75 \ - 0x4F88 0x4F69 0x4F7B 0x4F96 0x4F7E 0x4F8F 0x4F91 0x4F7A \ - 0x5154 0x5152 0x5155 0x5169 0x5177 0x5176 0x5178 0x51BD \ - 0x51FD 0x523B 0x5238 0x5237 0x523A 0x5230 0x522E 0x5236 \ - 0x5241 0x52BE 0x52BB 0x5352 0x5354 0x5353 0x5351 0x5366 \ - 0x5377 0x5378 0x5379 0x53D6 0x53D4 0x53D7 0x5473 0x5475 \ - 0x5496 0x5478 0x5495 0x5480 0x547B 0x5477 0x5484 0x5492 \ - 0x5486 0x547C 0x5490 0x5471 0x5476 0x548C 0x549A 0x5462 \ - 0x5468 0x548B 0x547D 0x548E 0x56FA 0x5783 0x5777 0x576A -06 0x5769 0x5761 0x5766 0x5764 0x577C 0x591C 0x5949 0x5947 \ - 0x5948 0x5944 0x5954 0x59BE 0x59BB 0x59D4 0x59B9 0x59AE \ - 0x59D1 0x59C6 0x59D0 0x59CD 0x59CB 0x59D3 0x59CA 0x59AF \ - 0x59B3 0x59D2 0x59C5 0x5B5F 0x5B64 0x5B63 0x5B97 0x5B9A \ - 0x5B98 0x5B9C 0x5B99 0x5B9B 0x5C1A 0x5C48 0x5C45 0x5C46 \ - 0x5CB7 0x5CA1 0x5CB8 0x5CA9 0x5CAB 0x5CB1 0x5CB3 0x5E18 \ - 0x5E1A 0x5E16 0x5E15 0x5E1B 0x5E11 0x5E78 0x5E9A 0x5E97 \ - 0x5E9C 0x5E95 0x5E96 0x5EF6 0x5F26 0x5F27 0x5F29 0x5F80 \ - 0x5F81 0x5F7F 0x5F7C 0x5FDD 0x5FE0 0x5FFD 0x5FF5 0x5FFF \ - 0x600F 0x6014 0x602F 0x6035 0x6016 0x602A 0x6015 0x6021 \ - 0x6027 0x6029 0x602B 0x601B 0x6216 0x6215 0x623F 0x623E \ - 0x6240 0x627F 0x62C9 0x62CC 0x62C4 0x62BF 0x62C2 0x62B9 \ - 0x62D2 0x62DB 0x62AB 0x62D3 0x62D4 0x62CB 0x62C8 0x62A8 \ - 0x62BD 0x62BC 0x62D0 0x62D9 0x62C7 0x62CD 0x62B5 0x62DA \ - 0x62B1 0x62D8 0x62D6 0x62D7 0x62C6 0x62AC 0x62CE 0x653E \ - 0x65A7 0x65BC 0x65FA 0x6614 0x6613 0x660C 0x6606 0x6602 \ - 0x660E 0x6600 0x660F 0x6615 0x660A 0x6607 0x670D 0x670B \ - 0x676D 0x678B 0x6795 0x6771 0x679C 0x6773 0x6777 0x6787 \ - 0x679D 0x6797 0x676F 0x6770 0x677F 0x6789 0x677E 0x6790 \ - 0x6775 0x679A 0x6793 0x677C 0x676A 0x6772 0x6B23 0x6B66 \ - 0x6B67 0x6B7F 0x6C13 0x6C1B 0x6CE3 0x6CE8 0x6CF3 0x6CB1 \ - 0x6CCC 0x6CE5 0x6CB3 0x6CBD 0x6CBE 0x6CBC 0x6CE2 0x6CAB \ - 0x6CD5 0x6CD3 0x6CB8 0x6CC4 0x6CB9 0x6CC1 0x6CAE 0x6CD7 \ - 0x6CC5 0x6CF1 0x6CBF 0x6CBB 0x6CE1 0x6CDB 0x6CCA 0x6CAC \ - 0x6CEF 0x6CDC 0x6CD6 0x6CE0 0x7095 0x708E 0x7092 0x708A \ - 0x7099 0x722C 0x722D 0x7238 0x7248 0x7267 0x7269 0x72C0 \ - 0x72CE 0x72D9 0x72D7 0x72D0 0x73A9 0x73A8 0x739F 0x73AB \ - 0x73A5 0x753D 0x759D 0x7599 0x759A 0x7684 0x76C2 0x76F2 \ - 0x76F4 0x77E5 0x77FD 0x793E 0x7940 0x7941 0x79C9 0x79C8 \ - 0x7A7A 0x7A79 0x7AFA 0x7CFE 0x7F54 0x7F8C 0x7F8B 0x8005 \ - 0x80BA 0x80A5 0x80A2 0x80B1 0x80A1 0x80AB 0x80A9 0x80B4 \ - 0x80AA 0x80AF 0x81E5 0x81FE 0x820D 0x82B3 0x829D 0x8299 -07 0x82AD 0x82BD 0x829F 0x82B9 0x82B1 0x82AC 0x82A5 0x82AF \ - 0x82B8 0x82A3 0x82B0 0x82BE 0x82B7 0x864E 0x8671 0x521D \ - 0x8868 0x8ECB 0x8FCE 0x8FD4 0x8FD1 0x90B5 0x90B8 0x90B1 \ - 0x90B6 0x91C7 0x91D1 0x9577 0x9580 0x961C 0x9640 0x963F \ - 0x963B 0x9644 0x9642 0x96B9 0x96E8 0x9752 0x975E 0x4E9F \ - 0x4EAD 0x4EAE 0x4FE1 0x4FB5 0x4FAF 0x4FBF 0x4FE0 0x4FD1 \ - 0x4FCF 0x4FDD 0x4FC3 0x4FB6 0x4FD8 0x4FDF 0x4FCA 0x4FD7 \ - 0x4FAE 0x4FD0 0x4FC4 0x4FC2 0x4FDA 0x4FCE 0x4FDE 0x4FB7 \ - 0x5157 0x5192 0x5191 0x51A0 0x524E 0x5243 0x524A 0x524D \ - 0x524C 0x524B 0x5247 0x52C7 0x52C9 0x52C3 0x52C1 0x530D \ - 0x5357 0x537B 0x539A 0x53DB 0x54AC 0x54C0 0x54A8 0x54CE \ - 0x54C9 0x54B8 0x54A6 0x54B3 0x54C7 0x54C2 0x54BD 0x54AA \ - 0x54C1 0x54C4 0x54C8 0x54AF 0x54AB 0x54B1 0x54BB 0x54A9 \ - 0x54A7 0x54BF 0x56FF 0x5782 0x578B 0x57A0 0x57A3 0x57A2 \ - 0x57CE 0x57AE 0x5793 0x5955 0x5951 0x594F 0x594E 0x5950 \ - 0x59DC 0x59D8 0x59FF 0x59E3 0x59E8 0x5A03 0x59E5 0x59EA \ - 0x59DA 0x59E6 0x5A01 0x59FB 0x5B69 0x5BA3 0x5BA6 0x5BA4 \ - 0x5BA2 0x5BA5 0x5C01 0x5C4E 0x5C4F 0x5C4D 0x5C4B 0x5CD9 \ - 0x5CD2 0x5DF7 0x5E1D 0x5E25 0x5E1F 0x5E7D 0x5EA0 0x5EA6 \ - 0x5EFA 0x5F08 0x5F2D 0x5F65 0x5F88 0x5F85 0x5F8A 0x5F8B \ - 0x5F87 0x5F8C 0x5F89 0x6012 0x601D 0x6020 0x6025 0x600E \ - 0x6028 0x604D 0x6070 0x6068 0x6062 0x6046 0x6043 0x606C \ - 0x606B 0x606A 0x6064 0x6241 0x62DC 0x6316 0x6309 0x62FC \ - 0x62ED 0x6301 0x62EE 0x62FD 0x6307 0x62F1 0x62F7 0x62EF \ - 0x62EC 0x62FE 0x62F4 0x6311 0x6302 0x653F 0x6545 0x65AB \ - 0x65BD 0x65E2 0x6625 0x662D 0x6620 0x6627 0x662F 0x661F \ - 0x6628 0x6631 0x6624 0x66F7 0x67FF 0x67D3 0x67F1 0x67D4 \ - 0x67D0 0x67EC 0x67B6 0x67AF 0x67F5 0x67E9 0x67EF 0x67C4 \ - 0x67D1 0x67B4 0x67DA 0x67E5 0x67B8 0x67CF 0x67DE 0x67F3 \ - 0x67B0 0x67D9 0x67E2 0x67DD 0x67D2 0x6B6A 0x6B83 0x6B86 \ - 0x6BB5 0x6BD2 0x6BD7 0x6C1F 0x6CC9 0x6D0B 0x6D32 0x6D2A \ - 0x6D41 0x6D25 0x6D0C 0x6D31 0x6D1E 0x6D17 0x6D3B 0x6D3D -08 0x6D3E 0x6D36 0x6D1B 0x6CF5 0x6D39 0x6D27 0x6D38 0x6D29 \ - 0x6D2E 0x6D35 0x6D0E 0x6D2B 0x70AB 0x70BA 0x70B3 0x70AC \ - 0x70AF 0x70AD 0x70B8 0x70AE 0x70A4 0x7230 0x7272 0x726F \ - 0x7274 0x72E9 0x72E0 0x72E1 0x73B7 0x73CA 0x73BB 0x73B2 \ - 0x73CD 0x73C0 0x73B3 0x751A 0x752D 0x754F 0x754C 0x754E \ - 0x754B 0x75AB 0x75A4 0x75A5 0x75A2 0x75A3 0x7678 0x7686 \ - 0x7687 0x7688 0x76C8 0x76C6 0x76C3 0x76C5 0x7701 0x76F9 \ - 0x76F8 0x7709 0x770B 0x76FE 0x76FC 0x7707 0x77DC 0x7802 \ - 0x7814 0x780C 0x780D 0x7946 0x7949 0x7948 0x7947 0x79B9 \ - 0x79BA 0x79D1 0x79D2 0x79CB 0x7A7F 0x7A81 0x7AFF 0x7AFD \ - 0x7C7D 0x7D02 0x7D05 0x7D00 0x7D09 0x7D07 0x7D04 0x7D06 \ - 0x7F38 0x7F8E 0x7FBF 0x8004 0x8010 0x800D 0x8011 0x8036 \ - 0x80D6 0x80E5 0x80DA 0x80C3 0x80C4 0x80CC 0x80E1 0x80DB \ - 0x80CE 0x80DE 0x80E4 0x80DD 0x81F4 0x8222 0x82E7 0x8303 \ - 0x8305 0x82E3 0x82DB 0x82E6 0x8304 0x82E5 0x8302 0x8309 \ - 0x82D2 0x82D7 0x82F1 0x8301 0x82DC 0x82D4 0x82D1 0x82DE \ - 0x82D3 0x82DF 0x82EF 0x8306 0x8650 0x8679 0x867B 0x867A \ - 0x884D 0x886B 0x8981 0x89D4 0x8A08 0x8A02 0x8A03 0x8C9E \ - 0x8CA0 0x8D74 0x8D73 0x8DB4 0x8ECD 0x8ECC 0x8FF0 0x8FE6 \ - 0x8FE2 0x8FEA 0x8FE5 0x8FED 0x8FEB 0x8FE4 0x8FE8 0x90CA \ - 0x90CE 0x90C1 0x90C3 0x914B 0x914A 0x91CD 0x9582 0x9650 \ - 0x964B 0x964C 0x964D 0x9762 0x9769 0x97CB 0x97ED 0x97F3 \ - 0x9801 0x98A8 0x98DB 0x98DF 0x9996 0x9999 0x4E58 0x4EB3 \ - 0x500C 0x500D 0x5023 0x4FEF 0x5026 0x5025 0x4FF8 0x5029 \ - 0x5016 0x5006 0x503C 0x501F 0x501A 0x5012 0x5011 0x4FFA \ - 0x5000 0x5014 0x5028 0x4FF1 0x5021 0x500B 0x5019 0x5018 \ - 0x4FF3 0x4FEE 0x502D 0x502A 0x4FFE 0x502B 0x5009 0x517C \ - 0x51A4 0x51A5 0x51A2 0x51CD 0x51CC 0x51C6 0x51CB 0x5256 \ - 0x525C 0x5254 0x525B 0x525D 0x532A 0x537F 0x539F 0x539D \ - 0x53DF 0x54E8 0x5510 0x5501 0x5537 0x54FC 0x54E5 0x54F2 \ - 0x5506 0x54FA 0x5514 0x54E9 0x54ED 0x54E1 0x5509 0x54EE \ - 0x54EA 0x54E6 0x5527 0x5507 0x54FD 0x550F 0x5703 0x5704 -09 0x57C2 0x57D4 0x57CB 0x57C3 0x5809 0x590F 0x5957 0x5958 \ - 0x595A 0x5A11 0x5A18 0x5A1C 0x5A1F 0x5A1B 0x5A13 0x59EC \ - 0x5A20 0x5A23 0x5A29 0x5A25 0x5A0C 0x5A09 0x5B6B 0x5C58 \ - 0x5BB0 0x5BB3 0x5BB6 0x5BB4 0x5BAE 0x5BB5 0x5BB9 0x5BB8 \ - 0x5C04 0x5C51 0x5C55 0x5C50 0x5CED 0x5CFD 0x5CFB 0x5CEA \ - 0x5CE8 0x5CF0 0x5CF6 0x5D01 0x5CF4 0x5DEE 0x5E2D 0x5E2B \ - 0x5EAB 0x5EAD 0x5EA7 0x5F31 0x5F92 0x5F91 0x5F90 0x6059 \ - 0x6063 0x6065 0x6050 0x6055 0x606D 0x6069 0x606F 0x6084 \ - 0x609F 0x609A 0x608D 0x6094 0x608C 0x6085 0x6096 0x6247 \ - 0x62F3 0x6308 0x62FF 0x634E 0x633E 0x632F 0x6355 0x6342 \ - 0x6346 0x634F 0x6349 0x633A 0x6350 0x633D 0x632A 0x632B \ - 0x6328 0x634D 0x634C 0x6548 0x6549 0x6599 0x65C1 0x65C5 \ - 0x6642 0x6649 0x664F 0x6643 0x6652 0x664C 0x6645 0x6641 \ - 0x66F8 0x6714 0x6715 0x6717 0x6821 0x6838 0x6848 0x6846 \ - 0x6853 0x6839 0x6842 0x6854 0x6829 0x68B3 0x6817 0x684C \ - 0x6851 0x683D 0x67F4 0x6850 0x6840 0x683C 0x6843 0x682A \ - 0x6845 0x6813 0x6818 0x6841 0x6B8A 0x6B89 0x6BB7 0x6C23 \ - 0x6C27 0x6C28 0x6C26 0x6C24 0x6CF0 0x6D6A 0x6D95 0x6D88 \ - 0x6D87 0x6D66 0x6D78 0x6D77 0x6D59 0x6D93 0x6D6C 0x6D89 \ - 0x6D6E 0x6D5A 0x6D74 0x6D69 0x6D8C 0x6D8A 0x6D79 0x6D85 \ - 0x6D65 0x6D94 0x70CA 0x70D8 0x70E4 0x70D9 0x70C8 0x70CF \ - 0x7239 0x7279 0x72FC 0x72F9 0x72FD 0x72F8 0x72F7 0x7386 \ - 0x73ED 0x7409 0x73EE 0x73E0 0x73EA 0x73DE 0x7554 0x755D \ - 0x755C 0x755A 0x7559 0x75BE 0x75C5 0x75C7 0x75B2 0x75B3 \ - 0x75BD 0x75BC 0x75B9 0x75C2 0x75B8 0x768B 0x76B0 0x76CA \ - 0x76CD 0x76CE 0x7729 0x771F 0x7720 0x7728 0x77E9 0x7830 \ - 0x7827 0x7838 0x781D 0x7834 0x7837 0x7825 0x782D 0x7820 \ - 0x781F 0x7832 0x7955 0x7950 0x7960 0x795F 0x7956 0x795E \ - 0x795D 0x7957 0x795A 0x79E4 0x79E3 0x79E7 0x79DF 0x79E6 \ - 0x79E9 0x79D8 0x7A84 0x7A88 0x7AD9 0x7B06 0x7B11 0x7C89 \ - 0x7D21 0x7D17 0x7D0B 0x7D0A 0x7D20 0x7D22 0x7D14 0x7D10 \ - 0x7D15 0x7D1A 0x7D1C 0x7D0D 0x7D19 0x7D1B 0x7F3A 0x7F5F -10 0x7F94 0x7FC5 0x7FC1 0x8006 0x8018 0x8015 0x8019 0x8017 \ - 0x803D 0x803F 0x80F1 0x8102 0x80F0 0x8105 0x80ED 0x80F4 \ - 0x8106 0x80F8 0x80F3 0x8108 0x80FD 0x810A 0x80FC 0x80EF \ - 0x81ED 0x81EC 0x8200 0x8210 0x822A 0x822B 0x8228 0x822C \ - 0x82BB 0x832B 0x8352 0x8354 0x834A 0x8338 0x8350 0x8349 \ - 0x8335 0x8334 0x834F 0x8332 0x8339 0x8336 0x8317 0x8340 \ - 0x8331 0x8328 0x8343 0x8654 0x868A 0x86AA 0x8693 0x86A4 \ - 0x86A9 0x868C 0x86A3 0x869C 0x8870 0x8877 0x8881 0x8882 \ - 0x887D 0x8879 0x8A18 0x8A10 0x8A0E 0x8A0C 0x8A15 0x8A0A \ - 0x8A17 0x8A13 0x8A16 0x8A0F 0x8A11 0x8C48 0x8C7A 0x8C79 \ - 0x8CA1 0x8CA2 0x8D77 0x8EAC 0x8ED2 0x8ED4 0x8ECF 0x8FB1 \ - 0x9001 0x9006 0x8FF7 0x9000 0x8FFA 0x8FF4 0x9003 0x8FFD \ - 0x9005 0x8FF8 0x9095 0x90E1 0x90DD 0x90E2 0x9152 0x914D \ - 0x914C 0x91D8 0x91DD 0x91D7 0x91DC 0x91D9 0x9583 0x9662 \ - 0x9663 0x9661 0x965B 0x965D 0x9664 0x9658 0x965E 0x96BB \ - 0x98E2 0x99AC 0x9AA8 0x9AD8 0x9B25 0x9B32 0x9B3C 0x4E7E \ - 0x507A 0x507D 0x505C 0x5047 0x5043 0x504C 0x505A 0x5049 \ - 0x5065 0x5076 0x504E 0x5055 0x5075 0x5074 0x5077 0x504F \ - 0x500F 0x506F 0x506D 0x515C 0x5195 0x51F0 0x526A 0x526F \ - 0x52D2 0x52D9 0x52D8 0x52D5 0x5310 0x530F 0x5319 0x533F \ - 0x5340 0x533E 0x53C3 0x66FC 0x5546 0x556A 0x5566 0x5544 \ - 0x555E 0x5561 0x5543 0x554A 0x5531 0x5556 0x554F 0x5555 \ - 0x552F 0x5564 0x5538 0x552E 0x555C 0x552C 0x5563 0x5533 \ - 0x5541 0x5557 0x5708 0x570B 0x5709 0x57DF 0x5805 0x580A \ - 0x5806 0x57E0 0x57E4 0x57FA 0x5802 0x5835 0x57F7 0x57F9 \ - 0x5920 0x5962 0x5A36 0x5A41 0x5A49 0x5A66 0x5A6A 0x5A40 \ - 0x5A3C 0x5A62 0x5A5A 0x5A46 0x5A4A 0x5B70 0x5BC7 0x5BC5 \ - 0x5BC4 0x5BC2 0x5BBF 0x5BC6 0x5C09 0x5C08 0x5C07 0x5C60 \ - 0x5C5C 0x5C5D 0x5D07 0x5D06 0x5D0E 0x5D1B 0x5D16 0x5D22 \ - 0x5D11 0x5D29 0x5D14 0x5D19 0x5D24 0x5D27 0x5D17 0x5DE2 \ - 0x5E38 0x5E36 0x5E33 0x5E37 0x5EB7 0x5EB8 0x5EB6 0x5EB5 \ - 0x5EBE 0x5F35 0x5F37 0x5F57 0x5F6C 0x5F69 0x5F6B 0x5F97 -11 0x5F99 0x5F9E 0x5F98 0x5FA1 0x5FA0 0x5F9C 0x607F 0x60A3 \ - 0x6089 0x60A0 0x60A8 0x60CB 0x60B4 0x60E6 0x60BD 0x60C5 \ - 0x60BB 0x60B5 0x60DC 0x60BC 0x60D8 0x60D5 0x60C6 0x60DF \ - 0x60B8 0x60DA 0x60C7 0x621A 0x621B 0x6248 0x63A0 0x63A7 \ - 0x6372 0x6396 0x63A2 0x63A5 0x6377 0x6367 0x6398 0x63AA \ - 0x6371 0x63A9 0x6389 0x6383 0x639B 0x636B 0x63A8 0x6384 \ - 0x6388 0x6399 0x63A1 0x63AC 0x6392 0x638F 0x6380 0x637B \ - 0x6369 0x6368 0x637A 0x655D 0x6556 0x6551 0x6559 0x6557 \ - 0x555F 0x654F 0x6558 0x6555 0x6554 0x659C 0x659B 0x65AC \ - 0x65CF 0x65CB 0x65CC 0x65CE 0x665D 0x665A 0x6664 0x6668 \ - 0x6666 0x665E 0x66F9 0x52D7 0x671B 0x6881 0x68AF 0x68A2 \ - 0x6893 0x68B5 0x687F 0x6876 0x68B1 0x68A7 0x6897 0x68B0 \ - 0x6883 0x68C4 0x68AD 0x6886 0x6885 0x6894 0x689D 0x68A8 \ - 0x689F 0x68A1 0x6882 0x6B32 0x6BBA 0x6BEB 0x6BEC 0x6C2B \ - 0x6D8E 0x6DBC 0x6DF3 0x6DD9 0x6DB2 0x6DE1 0x6DCC 0x6DE4 \ - 0x6DFB 0x6DFA 0x6E05 0x6DC7 0x6DCB 0x6DAF 0x6DD1 0x6DAE \ - 0x6DDE 0x6DF9 0x6DB8 0x6DF7 0x6DF5 0x6DC5 0x6DD2 0x6E1A \ - 0x6DB5 0x6DDA 0x6DEB 0x6DD8 0x6DEA 0x6DF1 0x6DEE 0x6DE8 \ - 0x6DC6 0x6DC4 0x6DAA 0x6DEC 0x6DBF 0x6DE6 0x70F9 0x7109 \ - 0x710A 0x70FD 0x70EF 0x723D 0x727D 0x7281 0x731C 0x731B \ - 0x7316 0x7313 0x7319 0x7387 0x7405 0x740A 0x7403 0x7406 \ - 0x73FE 0x740D 0x74E0 0x74F6 0x74F7 0x751C 0x7522 0x7565 \ - 0x7566 0x7562 0x7570 0x758F 0x75D4 0x75D5 0x75B5 0x75CA \ - 0x75CD 0x768E 0x76D4 0x76D2 0x76DB 0x7737 0x773E 0x773C \ - 0x7736 0x7738 0x773A 0x786B 0x7843 0x784E 0x7965 0x7968 \ - 0x796D 0x79FB 0x7A92 0x7A95 0x7B20 0x7B28 0x7B1B 0x7B2C \ - 0x7B26 0x7B19 0x7B1E 0x7B2E 0x7C92 0x7C97 0x7C95 0x7D46 \ - 0x7D43 0x7D71 0x7D2E 0x7D39 0x7D3C 0x7D40 0x7D30 0x7D33 \ - 0x7D44 0x7D2F 0x7D42 0x7D32 0x7D31 0x7F3D 0x7F9E 0x7F9A \ - 0x7FCC 0x7FCE 0x7FD2 0x801C 0x804A 0x8046 0x812F 0x8116 \ - 0x8123 0x812B 0x8129 0x8130 0x8124 0x8202 0x8235 0x8237 \ - 0x8236 0x8239 0x838E 0x839E 0x8398 0x8378 0x83A2 0x8396 -12 0x83BD 0x83AB 0x8392 0x838A 0x8393 0x8389 0x83A0 0x8377 \ - 0x837B 0x837C 0x8386 0x83A7 0x8655 0x5F6A 0x86C7 0x86C0 \ - 0x86B6 0x86C4 0x86B5 0x86C6 0x86CB 0x86B1 0x86AF 0x86C9 \ - 0x8853 0x889E 0x8888 0x88AB 0x8892 0x8896 0x888D 0x888B \ - 0x8993 0x898F 0x8A2A 0x8A1D 0x8A23 0x8A25 0x8A31 0x8A2D \ - 0x8A1F 0x8A1B 0x8A22 0x8C49 0x8C5A 0x8CA9 0x8CAC 0x8CAB \ - 0x8CA8 0x8CAA 0x8CA7 0x8D67 0x8D66 0x8DBE 0x8DBA 0x8EDB \ - 0x8EDF 0x9019 0x900D 0x901A 0x9017 0x9023 0x901F 0x901D \ - 0x9010 0x9015 0x901E 0x9020 0x900F 0x9022 0x9016 0x901B \ - 0x9014 0x90E8 0x90ED 0x90FD 0x9157 0x91CE 0x91F5 0x91E6 \ - 0x91E3 0x91E7 0x91ED 0x91E9 0x9589 0x966A 0x9675 0x9673 \ - 0x9678 0x9670 0x9674 0x9676 0x9677 0x966C 0x96C0 0x96EA \ - 0x96E9 0x7AE0 0x7ADF 0x9802 0x9803 0x9B5A 0x9CE5 0x9E75 \ - 0x9E7F 0x9EA5 0x9EBB 0x50A2 0x508D 0x5085 0x5099 0x5091 \ - 0x5080 0x5096 0x5098 0x509A 0x6700 0x51F1 0x5272 0x5274 \ - 0x5275 0x5269 0x52DE 0x52DD 0x52DB 0x535A 0x53A5 0x557B \ - 0x5580 0x55A7 0x557C 0x558A 0x559D 0x5598 0x5582 0x559C \ - 0x55AA 0x5594 0x5587 0x558B 0x5583 0x55B3 0x55AE 0x559F \ - 0x553E 0x55B2 0x559A 0x55BB 0x55AC 0x55B1 0x557E 0x5589 \ - 0x55AB 0x5599 0x570D 0x582F 0x582A 0x5834 0x5824 0x5830 \ - 0x5831 0x5821 0x581D 0x5820 0x58F9 0x58FA 0x5960 0x5A77 \ - 0x5A9A 0x5A7F 0x5A92 0x5A9B 0x5AA7 0x5B73 0x5B71 0x5BD2 \ - 0x5BCC 0x5BD3 0x5BD0 0x5C0A 0x5C0B 0x5C31 0x5D4C 0x5D50 \ - 0x5D34 0x5D47 0x5DFD 0x5E45 0x5E3D 0x5E40 0x5E43 0x5E7E \ - 0x5ECA 0x5EC1 0x5EC2 0x5EC4 0x5F3C 0x5F6D 0x5FA9 0x5FAA \ - 0x5FA8 0x60D1 0x60E1 0x60B2 0x60B6 0x60E0 0x611C 0x6123 \ - 0x60FA 0x6115 0x60F0 0x60FB 0x60F4 0x6168 0x60F1 0x610E \ - 0x60F6 0x6109 0x6100 0x6112 0x621F 0x6249 0x63A3 0x638C \ - 0x63CF 0x63C0 0x63E9 0x63C9 0x63C6 0x63CD 0x63D2 0x63E3 \ - 0x63D0 0x63E1 0x63D6 0x63ED 0x63EE 0x6376 0x63F4 0x63EA \ - 0x63DB 0x6452 0x63DA 0x63F9 0x655E 0x6566 0x6562 0x6563 \ - 0x6591 0x6590 0x65AF 0x666E 0x6670 0x6674 0x6676 0x666F -13 0x6691 0x667A 0x667E 0x6677 0x66FE 0x66FF 0x671F 0x671D \ - 0x68FA 0x68D5 0x68E0 0x68D8 0x68D7 0x6905 0x68DF 0x68F5 \ - 0x68EE 0x68E7 0x68F9 0x68D2 0x68F2 0x68E3 0x68CB 0x68CD \ - 0x690D 0x6912 0x690E 0x68C9 0x68DA 0x696E 0x68FB 0x6B3E \ - 0x6B3A 0x6B3D 0x6B98 0x6B96 0x6BBC 0x6BEF 0x6C2E 0x6C2F \ - 0x6C2C 0x6E2F 0x6E38 0x6E54 0x6E21 0x6E32 0x6E67 0x6E4A \ - 0x6E20 0x6E25 0x6E23 0x6E1B 0x6E5B 0x6E58 0x6E24 0x6E56 \ - 0x6E6E 0x6E2D 0x6E26 0x6E6F 0x6E34 0x6E4D 0x6E3A 0x6E2C \ - 0x6E43 0x6E1D 0x6E3E 0x6ECB 0x6E89 0x6E19 0x6E4E 0x6E63 \ - 0x6E44 0x6E72 0x6E69 0x6E5F 0x7119 0x711A 0x7126 0x7130 \ - 0x7121 0x7136 0x716E 0x711C 0x724C 0x7284 0x7280 0x7336 \ - 0x7325 0x7334 0x7329 0x743A 0x742A 0x7433 0x7422 0x7425 \ - 0x7435 0x7436 0x7434 0x742F 0x741B 0x7426 0x7428 0x7525 \ - 0x7526 0x756B 0x756A 0x75E2 0x75DB 0x75E3 0x75D9 0x75D8 \ - 0x75DE 0x75E0 0x767B 0x767C 0x7696 0x7693 0x76B4 0x76DC \ - 0x774F 0x77ED 0x785D 0x786C 0x786F 0x7A0D 0x7A08 0x7A0B \ - 0x7A05 0x7A00 0x7A98 0x7A97 0x7A96 0x7AE5 0x7AE3 0x7B49 \ - 0x7B56 0x7B46 0x7B50 0x7B52 0x7B54 0x7B4D 0x7B4B 0x7B4F \ - 0x7B51 0x7C9F 0x7CA5 0x7D5E 0x7D50 0x7D68 0x7D55 0x7D2B \ - 0x7D6E 0x7D72 0x7D61 0x7D66 0x7D62 0x7D70 0x7D73 0x5584 \ - 0x7FD4 0x7FD5 0x800B 0x8052 0x8085 0x8155 0x8154 0x814B \ - 0x8151 0x814E 0x8139 0x8146 0x813E 0x814C 0x8153 0x8174 \ - 0x8212 0x821C 0x83E9 0x8403 0x83F8 0x840D 0x83E0 0x83C5 \ - 0x840B 0x83C1 0x83EF 0x83F1 0x83F4 0x8457 0x840A 0x83F0 \ - 0x840C 0x83CC 0x83FD 0x83F2 0x83CA 0x8438 0x840E 0x8404 \ - 0x83DC 0x8407 0x83D4 0x83DF 0x865B 0x86DF 0x86D9 0x86ED \ - 0x86D4 0x86DB 0x86E4 0x86D0 0x86DE 0x8857 0x88C1 0x88C2 \ - 0x88B1 0x8983 0x8996 0x8A3B 0x8A60 0x8A55 0x8A5E 0x8A3C \ - 0x8A41 0x8A54 0x8A5B 0x8A50 0x8A46 0x8A34 0x8A3A 0x8A36 \ - 0x8A56 0x8C61 0x8C82 0x8CAF 0x8CBC 0x8CB3 0x8CBD 0x8CC1 \ - 0x8CBB 0x8CC0 0x8CB4 0x8CB7 0x8CB6 0x8CBF 0x8CB8 0x8D8A \ - 0x8D85 0x8D81 0x8DCE 0x8DDD 0x8DCB 0x8DDA 0x8DD1 0x8DCC -14 0x8DDB 0x8DC6 0x8EFB 0x8EF8 0x8EFC 0x8F9C 0x902E 0x9035 \ - 0x9031 0x9038 0x9032 0x9036 0x9102 0x90F5 0x9109 0x90FE \ - 0x9163 0x9165 0x91CF 0x9214 0x9215 0x9223 0x9209 0x921E \ - 0x920D 0x9210 0x9207 0x9211 0x9594 0x958F 0x958B 0x9591 \ - 0x9593 0x9592 0x958E 0x968A 0x968E 0x968B 0x967D 0x9685 \ - 0x9686 0x968D 0x9672 0x9684 0x96C1 0x96C5 0x96C4 0x96C6 \ - 0x96C7 0x96EF 0x96F2 0x97CC 0x9805 0x9806 0x9808 0x98E7 \ - 0x98EA 0x98EF 0x98E9 0x98F2 0x98ED 0x99AE 0x99AD 0x9EC3 \ - 0x9ECD 0x9ED1 0x4E82 0x50AD 0x50B5 0x50B2 0x50B3 0x50C5 \ - 0x50BE 0x50AC 0x50B7 0x50BB 0x50AF 0x50C7 0x527F 0x5277 \ - 0x527D 0x52DF 0x52E6 0x52E4 0x52E2 0x52E3 0x532F 0x55DF \ - 0x55E8 0x55D3 0x55E6 0x55CE 0x55DC 0x55C7 0x55D1 0x55E3 \ - 0x55E4 0x55EF 0x55DA 0x55E1 0x55C5 0x55C6 0x55E5 0x55C9 \ - 0x5712 0x5713 0x585E 0x5851 0x5858 0x5857 0x585A 0x5854 \ - 0x586B 0x584C 0x586D 0x584A 0x5862 0x5852 0x584B 0x5967 \ - 0x5AC1 0x5AC9 0x5ACC 0x5ABE 0x5ABD 0x5ABC 0x5AB3 0x5AC2 \ - 0x5AB2 0x5D69 0x5D6F 0x5E4C 0x5E79 0x5EC9 0x5EC8 0x5F12 \ - 0x5F59 0x5FAC 0x5FAE 0x611A 0x610F 0x6148 0x611F 0x60F3 \ - 0x611B 0x60F9 0x6101 0x6108 0x614E 0x614C 0x6144 0x614D \ - 0x613E 0x6134 0x6127 0x610D 0x6106 0x6137 0x6221 0x6222 \ - 0x6413 0x643E 0x641E 0x642A 0x642D 0x643D 0x642C 0x640F \ - 0x641C 0x6414 0x640D 0x6436 0x6416 0x6417 0x6406 0x656C \ - 0x659F 0x65B0 0x6697 0x6689 0x6687 0x6688 0x6696 0x6684 \ - 0x6698 0x668D 0x6703 0x6994 0x696D 0x695A 0x6977 0x6960 \ - 0x6954 0x6975 0x6930 0x6982 0x694A 0x6968 0x696B 0x695E \ - 0x6953 0x6979 0x6986 0x695D 0x6963 0x695B 0x6B47 0x6B72 \ - 0x6BC0 0x6BBF 0x6BD3 0x6BFD 0x6EA2 0x6EAF 0x6ED3 0x6EB6 \ - 0x6EC2 0x6E90 0x6E9D 0x6EC7 0x6EC5 0x6EA5 0x6E98 0x6EBC \ - 0x6EBA 0x6EAB 0x6ED1 0x6E96 0x6E9C 0x6EC4 0x6ED4 0x6EAA \ - 0x6EA7 0x6EB4 0x714E 0x7159 0x7169 0x7164 0x7149 0x7167 \ - 0x715C 0x716C 0x7166 0x714C 0x7165 0x715E 0x7146 0x7168 \ - 0x7156 0x723A 0x7252 0x7337 0x7345 0x733F 0x733E 0x746F -15 0x745A 0x7455 0x745F 0x745E 0x7441 0x743F 0x7459 0x745B \ - 0x745C 0x7576 0x7578 0x7600 0x75F0 0x7601 0x75F2 0x75F1 \ - 0x75FA 0x75FF 0x75F4 0x75F3 0x76DE 0x76DF 0x775B 0x776B \ - 0x7766 0x775E 0x7763 0x7779 0x776A 0x776C 0x775C 0x7765 \ - 0x7768 0x7762 0x77EE 0x788E 0x78B0 0x7897 0x7898 0x788C \ - 0x7889 0x787C 0x7891 0x7893 0x787F 0x797A 0x797F 0x7981 \ - 0x842C 0x79BD 0x7A1C 0x7A1A 0x7A20 0x7A14 0x7A1F 0x7A1E \ - 0x7A9F 0x7AA0 0x7B77 0x7BC0 0x7B60 0x7B6E 0x7B67 0x7CB1 \ - 0x7CB3 0x7CB5 0x7D93 0x7D79 0x7D91 0x7D81 0x7D8F 0x7D5B \ - 0x7F6E 0x7F69 0x7F6A 0x7F72 0x7FA9 0x7FA8 0x7FA4 0x8056 \ - 0x8058 0x8086 0x8084 0x8171 0x8170 0x8178 0x8165 0x816E \ - 0x8173 0x816B 0x8179 0x817A 0x8166 0x8205 0x8247 0x8482 \ - 0x8477 0x843D 0x8431 0x8475 0x8466 0x846B 0x8449 0x846C \ - 0x845B 0x843C 0x8435 0x8461 0x8463 0x8469 0x846D 0x8446 \ - 0x865E 0x865C 0x865F 0x86F9 0x8713 0x8708 0x8707 0x8700 \ - 0x86FE 0x86FB 0x8702 0x8703 0x8706 0x870A 0x8859 0x88DF \ - 0x88D4 0x88D9 0x88DC 0x88D8 0x88DD 0x88E1 0x88CA 0x88D5 \ - 0x88D2 0x899C 0x89E3 0x8A6B 0x8A72 0x8A73 0x8A66 0x8A69 \ - 0x8A70 0x8A87 0x8A7C 0x8A63 0x8AA0 0x8A71 0x8A85 0x8A6D \ - 0x8A62 0x8A6E 0x8A6C 0x8A79 0x8A7B 0x8A3E 0x8A68 0x8C62 \ - 0x8C8A 0x8C89 0x8CCA 0x8CC7 0x8CC8 0x8CC4 0x8CB2 0x8CC3 \ - 0x8CC2 0x8CC5 0x8DE1 0x8DDF 0x8DE8 0x8DEF 0x8DF3 0x8DFA \ - 0x8DEA 0x8DE4 0x8DE6 0x8EB2 0x8F03 0x8F09 0x8EFE 0x8F0A \ - 0x8F9F 0x8FB2 0x904B 0x904A 0x9053 0x9042 0x9054 0x903C \ - 0x9055 0x9050 0x9047 0x904F 0x904E 0x904D 0x9051 0x903E \ - 0x9041 0x9112 0x9117 0x916C 0x916A 0x9169 0x91C9 0x9237 \ - 0x9257 0x9238 0x923D 0x9240 0x923E 0x925B 0x924B 0x9264 \ - 0x9251 0x9234 0x9249 0x924D 0x9245 0x9239 0x923F 0x925A \ - 0x9598 0x9698 0x9694 0x9695 0x96CD 0x96CB 0x96C9 0x96CA \ - 0x96F7 0x96FB 0x96F9 0x96F6 0x9756 0x9774 0x9776 0x9810 \ - 0x9811 0x9813 0x980A 0x9812 0x980C 0x98FC 0x98F4 0x98FD \ - 0x98FE 0x99B3 0x99B1 0x99B4 0x9AE1 0x9CE9 0x9E82 0x9F0E -16 0x9F13 0x9F20 0x50E7 0x50EE 0x50E5 0x50D6 0x50ED 0x50DA \ - 0x50D5 0x50CF 0x50D1 0x50F1 0x50CE 0x50E9 0x5162 0x51F3 \ - 0x5283 0x5282 0x5331 0x53AD 0x55FE 0x5600 0x561B 0x5617 \ - 0x55FD 0x5614 0x5606 0x5609 0x560D 0x560E 0x55F7 0x5616 \ - 0x561F 0x5608 0x5610 0x55F6 0x5718 0x5716 0x5875 0x587E \ - 0x5883 0x5893 0x588A 0x5879 0x5885 0x587D 0x58FD 0x5925 \ - 0x5922 0x5924 0x596A 0x5969 0x5AE1 0x5AE6 0x5AE9 0x5AD7 \ - 0x5AD6 0x5AD8 0x5AE3 0x5B75 0x5BDE 0x5BE7 0x5BE1 0x5BE5 \ - 0x5BE6 0x5BE8 0x5BE2 0x5BE4 0x5BDF 0x5C0D 0x5C62 0x5D84 \ - 0x5D87 0x5E5B 0x5E63 0x5E55 0x5E57 0x5E54 0x5ED3 0x5ED6 \ - 0x5F0A 0x5F46 0x5F70 0x5FB9 0x6147 0x613F 0x614B 0x6177 \ - 0x6162 0x6163 0x615F 0x615A 0x6158 0x6175 0x622A 0x6487 \ - 0x6458 0x6454 0x64A4 0x6478 0x645F 0x647A 0x6451 0x6467 \ - 0x6434 0x646D 0x647B 0x6572 0x65A1 0x65D7 0x65D6 0x66A2 \ - 0x66A8 0x669D 0x699C 0x69A8 0x6995 0x69C1 0x69AE 0x69D3 \ - 0x69CB 0x699B 0x69B7 0x69BB 0x69AB 0x69B4 0x69D0 0x69CD \ - 0x69AD 0x69CC 0x69A6 0x69C3 0x69A3 0x6B49 0x6B4C 0x6C33 \ - 0x6F33 0x6F14 0x6EFE 0x6F13 0x6EF4 0x6F29 0x6F3E 0x6F20 \ - 0x6F2C 0x6F0F 0x6F02 0x6F22 0x6EFF 0x6EEF 0x6F06 0x6F31 \ - 0x6F38 0x6F32 0x6F23 0x6F15 0x6F2B 0x6F2F 0x6F88 0x6F2A \ - 0x6EEC 0x6F01 0x6EF2 0x6ECC 0x6EF7 0x7194 0x7199 0x717D \ - 0x718A 0x7184 0x7192 0x723E 0x7292 0x7296 0x7344 0x7350 \ - 0x7464 0x7463 0x746A 0x7470 0x746D 0x7504 0x7591 0x7627 \ - 0x760D 0x760B 0x7609 0x7613 0x76E1 0x76E3 0x7784 0x777D \ - 0x777F 0x7761 0x78C1 0x789F 0x78A7 0x78B3 0x78A9 0x78A3 \ - 0x798E 0x798F 0x798D 0x7A2E 0x7A31 0x7AAA 0x7AA9 0x7AED \ - 0x7AEF 0x7BA1 0x7B95 0x7B8B 0x7B75 0x7B97 0x7B9D 0x7B94 \ - 0x7B8F 0x7BB8 0x7B87 0x7B84 0x7CB9 0x7CBD 0x7CBE 0x7DBB \ - 0x7DB0 0x7D9C 0x7DBD 0x7DBE 0x7DA0 0x7DCA 0x7DB4 0x7DB2 \ - 0x7DB1 0x7DBA 0x7DA2 0x7DBF 0x7DB5 0x7DB8 0x7DAD 0x7DD2 \ - 0x7DC7 0x7DAC 0x7F70 0x7FE0 0x7FE1 0x7FDF 0x805E 0x805A \ - 0x8087 0x8150 0x8180 0x818F 0x8188 0x818A 0x817F 0x8182 -17 0x81E7 0x81FA 0x8207 0x8214 0x821E 0x824B 0x84C9 0x84BF \ - 0x84C6 0x84C4 0x8499 0x849E 0x84B2 0x849C 0x84CB 0x84B8 \ - 0x84C0 0x84D3 0x8490 0x84BC 0x84D1 0x84CA 0x873F 0x871C \ - 0x873B 0x8722 0x8725 0x8734 0x8718 0x8755 0x8737 0x8729 \ - 0x88F3 0x8902 0x88F4 0x88F9 0x88F8 0x88FD 0x88E8 0x891A \ - 0x88EF 0x8AA6 0x8A8C 0x8A9E 0x8AA3 0x8A8D 0x8AA1 0x8A93 \ - 0x8AA4 0x8AAA 0x8AA5 0x8AA8 0x8A98 0x8A91 0x8A9A 0x8AA7 \ - 0x8C6A 0x8C8D 0x8C8C 0x8CD3 0x8CD1 0x8CD2 0x8D6B 0x8D99 \ - 0x8D95 0x8DFC 0x8F14 0x8F12 0x8F15 0x8F13 0x8FA3 0x9060 \ - 0x9058 0x905C 0x9063 0x9059 0x905E 0x9062 0x905D 0x905B \ - 0x9119 0x9118 0x911E 0x9175 0x9178 0x9177 0x9174 0x9278 \ - 0x9280 0x9285 0x9298 0x9296 0x927B 0x9293 0x929C 0x92A8 \ - 0x927C 0x9291 0x95A1 0x95A8 0x95A9 0x95A3 0x95A5 0x95A4 \ - 0x9699 0x969C 0x969B 0x96CC 0x96D2 0x9700 0x977C 0x9785 \ - 0x97F6 0x9817 0x9818 0x98AF 0x98B1 0x9903 0x9905 0x990C \ - 0x9909 0x99C1 0x9AAF 0x9AB0 0x9AE6 0x9B41 0x9B42 0x9CF4 \ - 0x9CF6 0x9CF3 0x9EBC 0x9F3B 0x9F4A 0x5104 0x5100 0x50FB \ - 0x50F5 0x50F9 0x5102 0x5108 0x5109 0x5105 0x51DC 0x5287 \ - 0x5288 0x5289 0x528D 0x528A 0x52F0 0x53B2 0x562E 0x563B \ - 0x5639 0x5632 0x563F 0x5634 0x5629 0x5653 0x564E 0x5657 \ - 0x5674 0x5636 0x562F 0x5630 0x5880 0x589F 0x589E 0x58B3 \ - 0x589C 0x58AE 0x58A9 0x58A6 0x596D 0x5B09 0x5AFB 0x5B0B \ - 0x5AF5 0x5B0C 0x5B08 0x5BEE 0x5BEC 0x5BE9 0x5BEB 0x5C64 \ - 0x5C65 0x5D9D 0x5D94 0x5E62 0x5E5F 0x5E61 0x5EE2 0x5EDA \ - 0x5EDF 0x5EDD 0x5EE3 0x5EE0 0x5F48 0x5F71 0x5FB7 0x5FB5 \ - 0x6176 0x6167 0x616E 0x615D 0x6155 0x6182 0x617C 0x6170 \ - 0x616B 0x617E 0x61A7 0x6190 0x61AB 0x618E 0x61AC 0x619A \ - 0x61A4 0x6194 0x61AE 0x622E 0x6469 0x646F 0x6479 0x649E \ - 0x64B2 0x6488 0x6490 0x64B0 0x64A5 0x6493 0x6495 0x64A9 \ - 0x6492 0x64AE 0x64AD 0x64AB 0x649A 0x64AC 0x6499 0x64A2 \ - 0x64B3 0x6575 0x6577 0x6578 0x66AE 0x66AB 0x66B4 0x66B1 \ - 0x6A23 0x6A1F 0x69E8 0x6A01 0x6A1E 0x6A19 0x69FD 0x6A21 -18 0x6A13 0x6A0A 0x69F3 0x6A02 0x6A05 0x69ED 0x6A11 0x6B50 \ - 0x6B4E 0x6BA4 0x6BC5 0x6BC6 0x6F3F 0x6F7C 0x6F84 0x6F51 \ - 0x6F66 0x6F54 0x6F86 0x6F6D 0x6F5B 0x6F78 0x6F6E 0x6F8E \ - 0x6F7A 0x6F70 0x6F64 0x6F97 0x6F58 0x6ED5 0x6F6F 0x6F60 \ - 0x6F5F 0x719F 0x71AC 0x71B1 0x71A8 0x7256 0x729B 0x734E \ - 0x7357 0x7469 0x748B 0x7483 0x747E 0x7480 0x757F 0x7620 \ - 0x7629 0x761F 0x7624 0x7626 0x7621 0x7622 0x769A 0x76BA \ - 0x76E4 0x778E 0x7787 0x778C 0x7791 0x778B 0x78CB 0x78C5 \ - 0x78BA 0x78CA 0x78BE 0x78D5 0x78BC 0x78D0 0x7A3F 0x7A3C \ - 0x7A40 0x7A3D 0x7A37 0x7A3B 0x7AAF 0x7AAE 0x7BAD 0x7BB1 \ - 0x7BC4 0x7BB4 0x7BC6 0x7BC7 0x7BC1 0x7BA0 0x7BCC 0x7CCA \ - 0x7DE0 0x7DF4 0x7DEF 0x7DFB 0x7DD8 0x7DEC 0x7DDD 0x7DE8 \ - 0x7DE3 0x7DDA 0x7DDE 0x7DE9 0x7D9E 0x7DD9 0x7DF2 0x7DF9 \ - 0x7F75 0x7F77 0x7FAF 0x7FE9 0x8026 0x819B 0x819C 0x819D \ - 0x81A0 0x819A 0x8198 0x8517 0x853D 0x851A 0x84EE 0x852C \ - 0x852D 0x8513 0x8511 0x8523 0x8521 0x8514 0x84EC 0x8525 \ - 0x84FF 0x8506 0x8782 0x8774 0x8776 0x8760 0x8766 0x8778 \ - 0x8768 0x8759 0x8757 0x874C 0x8753 0x885B 0x885D 0x8910 \ - 0x8907 0x8912 0x8913 0x8915 0x890A 0x8ABC 0x8AD2 0x8AC7 \ - 0x8AC4 0x8A95 0x8ACB 0x8AF8 0x8AB2 0x8AC9 0x8AC2 0x8ABF \ - 0x8AB0 0x8AD6 0x8ACD 0x8AB6 0x8AB9 0x8ADB 0x8C4C 0x8C4E \ - 0x8C6C 0x8CE0 0x8CDE 0x8CE6 0x8CE4 0x8CEC 0x8CED 0x8CE2 \ - 0x8CE3 0x8CDC 0x8CEA 0x8CE1 0x8D6D 0x8D9F 0x8DA3 0x8E2B \ - 0x8E10 0x8E1D 0x8E22 0x8E0F 0x8E29 0x8E1F 0x8E21 0x8E1E \ - 0x8EBA 0x8F1D 0x8F1B 0x8F1F 0x8F29 0x8F26 0x8F2A 0x8F1C \ - 0x8F1E 0x8F25 0x9069 0x906E 0x9068 0x906D 0x9077 0x9130 \ - 0x912D 0x9127 0x9131 0x9187 0x9189 0x918B 0x9183 0x92C5 \ - 0x92BB 0x92B7 0x92EA 0x92AC 0x92E4 0x92C1 0x92B3 0x92BC \ - 0x92D2 0x92C7 0x92F0 0x92B2 0x95AD 0x95B1 0x9704 0x9706 \ - 0x9707 0x9709 0x9760 0x978D 0x978B 0x978F 0x9821 0x982B \ - 0x981C 0x98B3 0x990A 0x9913 0x9912 0x9918 0x99DD 0x99D0 \ - 0x99DF 0x99DB 0x99D1 0x99D5 0x99D2 0x99D9 0x9AB7 0x9AEE -19 0x9AEF 0x9B27 0x9B45 0x9B44 0x9B77 0x9B6F 0x9D06 0x9D09 \ - 0x9D03 0x9EA9 0x9EBE 0x9ECE 0x58A8 0x9F52 0x5112 0x5118 \ - 0x5114 0x5110 0x5115 0x5180 0x51AA 0x51DD 0x5291 0x5293 \ - 0x52F3 0x5659 0x566B 0x5679 0x5669 0x5664 0x5678 0x566A \ - 0x5668 0x5665 0x5671 0x566F 0x566C 0x5662 0x5676 0x58C1 \ - 0x58BE 0x58C7 0x58C5 0x596E 0x5B1D 0x5B34 0x5B78 0x5BF0 \ - 0x5C0E 0x5F4A 0x61B2 0x6191 0x61A9 0x618A 0x61CD 0x61B6 \ - 0x61BE 0x61CA 0x61C8 0x6230 0x64C5 0x64C1 0x64CB 0x64BB \ - 0x64BC 0x64DA 0x64C4 0x64C7 0x64C2 0x64CD 0x64BF 0x64D2 \ - 0x64D4 0x64BE 0x6574 0x66C6 0x66C9 0x66B9 0x66C4 0x66C7 \ - 0x66B8 0x6A3D 0x6A38 0x6A3A 0x6A59 0x6A6B 0x6A58 0x6A39 \ - 0x6A44 0x6A62 0x6A61 0x6A4B 0x6A47 0x6A35 0x6A5F 0x6A48 \ - 0x6B59 0x6B77 0x6C05 0x6FC2 0x6FB1 0x6FA1 0x6FC3 0x6FA4 \ - 0x6FC1 0x6FA7 0x6FB3 0x6FC0 0x6FB9 0x6FB6 0x6FA6 0x6FA0 \ - 0x6FB4 0x71BE 0x71C9 0x71D0 0x71D2 0x71C8 0x71D5 0x71B9 \ - 0x71CE 0x71D9 0x71DC 0x71C3 0x71C4 0x7368 0x749C 0x74A3 \ - 0x7498 0x749F 0x749E 0x74E2 0x750C 0x750D 0x7634 0x7638 \ - 0x763A 0x76E7 0x76E5 0x77A0 0x779E 0x779F 0x77A5 0x78E8 \ - 0x78DA 0x78EC 0x78E7 0x79A6 0x7A4D 0x7A4E 0x7A46 0x7A4C \ - 0x7A4B 0x7ABA 0x7BD9 0x7C11 0x7BC9 0x7BE4 0x7BDB 0x7BE1 \ - 0x7BE9 0x7BE6 0x7CD5 0x7CD6 0x7E0A 0x7E11 0x7E08 0x7E1B \ - 0x7E23 0x7E1E 0x7E1D 0x7E09 0x7E10 0x7F79 0x7FB2 0x7FF0 \ - 0x7FF1 0x7FEE 0x8028 0x81B3 0x81A9 0x81A8 0x81FB 0x8208 \ - 0x8258 0x8259 0x854A 0x8559 0x8548 0x8568 0x8569 0x8543 \ - 0x8549 0x856D 0x856A 0x855E 0x8783 0x879F 0x879E 0x87A2 \ - 0x878D 0x8861 0x892A 0x8932 0x8925 0x892B 0x8921 0x89AA \ - 0x89A6 0x8AE6 0x8AFA 0x8AEB 0x8AF1 0x8B00 0x8ADC 0x8AE7 \ - 0x8AEE 0x8AFE 0x8B01 0x8B02 0x8AF7 0x8AED 0x8AF3 0x8AF6 \ - 0x8AFC 0x8C6B 0x8C6D 0x8C93 0x8CF4 0x8E44 0x8E31 0x8E34 \ - 0x8E42 0x8E39 0x8E35 0x8F3B 0x8F2F 0x8F38 0x8F33 0x8FA8 \ - 0x8FA6 0x9075 0x9074 0x9078 0x9072 0x907C 0x907A 0x9134 \ - 0x9192 0x9320 0x9336 0x92F8 0x9333 0x932F 0x9322 0x92FC -20 0x932B 0x9304 0x931A 0x9310 0x9326 0x9321 0x9315 0x932E \ - 0x9319 0x95BB 0x96A7 0x96A8 0x96AA 0x96D5 0x970E 0x9711 \ - 0x9716 0x970D 0x9713 0x970F 0x975B 0x975C 0x9766 0x9798 \ - 0x9830 0x9838 0x983B 0x9837 0x982D 0x9839 0x9824 0x9910 \ - 0x9928 0x991E 0x991B 0x9921 0x991A 0x99ED 0x99E2 0x99F1 \ - 0x9AB8 0x9ABC 0x9AFB 0x9AED 0x9B28 0x9B91 0x9D15 0x9D23 \ - 0x9D26 0x9D28 0x9D12 0x9D1B 0x9ED8 0x9ED4 0x9F8D 0x9F9C \ - 0x512A 0x511F 0x5121 0x5132 0x52F5 0x568E 0x5680 0x5690 \ - 0x5685 0x5687 0x568F 0x58D5 0x58D3 0x58D1 0x58CE 0x5B30 \ - 0x5B2A 0x5B24 0x5B7A 0x5C37 0x5C68 0x5DBC 0x5DBA 0x5DBD \ - 0x5DB8 0x5E6B 0x5F4C 0x5FBD 0x61C9 0x61C2 0x61C7 0x61E6 \ - 0x61CB 0x6232 0x6234 0x64CE 0x64CA 0x64D8 0x64E0 0x64F0 \ - 0x64E6 0x64EC 0x64F1 0x64E2 0x64ED 0x6582 0x6583 0x66D9 \ - 0x66D6 0x6A80 0x6A94 0x6A84 0x6AA2 0x6A9C 0x6ADB 0x6AA3 \ - 0x6A7E 0x6A97 0x6A90 0x6AA0 0x6B5C 0x6BAE 0x6BDA 0x6C08 \ - 0x6FD8 0x6FF1 0x6FDF 0x6FE0 0x6FDB 0x6FE4 0x6FEB 0x6FEF \ - 0x6F80 0x6FEC 0x6FE1 0x6FE9 0x6FD5 0x6FEE 0x6FF0 0x71E7 \ - 0x71DF 0x71EE 0x71E6 0x71E5 0x71ED 0x71EC 0x71F4 0x71E0 \ - 0x7235 0x7246 0x7370 0x7372 0x74A9 0x74B0 0x74A6 0x74A8 \ - 0x7646 0x7642 0x764C 0x76EA 0x77B3 0x77AA 0x77B0 0x77AC \ - 0x77A7 0x77AD 0x77EF 0x78F7 0x78FA 0x78F4 0x78EF 0x7901 \ - 0x79A7 0x79AA 0x7A57 0x7ABF 0x7C07 0x7C0D 0x7BFE 0x7BF7 \ - 0x7C0C 0x7BE0 0x7CE0 0x7CDC 0x7CDE 0x7CE2 0x7CDF 0x7CD9 \ - 0x7CDD 0x7E2E 0x7E3E 0x7E46 0x7E37 0x7E32 0x7E43 0x7E2B \ - 0x7E3D 0x7E31 0x7E45 0x7E41 0x7E34 0x7E39 0x7E48 0x7E35 \ - 0x7E3F 0x7E2F 0x7F44 0x7FF3 0x7FFC 0x8071 0x8072 0x8070 \ - 0x806F 0x8073 0x81C6 0x81C3 0x81BA 0x81C2 0x81C0 0x81BF \ - 0x81BD 0x81C9 0x81BE 0x81E8 0x8209 0x8271 0x85AA 0x8584 \ - 0x857E 0x859C 0x8591 0x8594 0x85AF 0x859B 0x8587 0x85A8 \ - 0x858A 0x8667 0x87C0 0x87D1 0x87B3 0x87D2 0x87C6 0x87AB \ - 0x87BB 0x87BA 0x87C8 0x87CB 0x893B 0x8936 0x8944 0x8938 \ - 0x893D 0x89AC 0x8B0E 0x8B17 0x8B19 0x8B1B 0x8B0A 0x8B20 -21 0x8B1D 0x8B04 0x8B10 0x8C41 0x8C3F 0x8C73 0x8CFA 0x8CFD \ - 0x8CFC 0x8CF8 0x8CFB 0x8DA8 0x8E49 0x8E4B 0x8E48 0x8E4A \ - 0x8F44 0x8F3E 0x8F42 0x8F45 0x8F3F 0x907F 0x907D 0x9084 \ - 0x9081 0x9082 0x9080 0x9139 0x91A3 0x919E 0x919C 0x934D \ - 0x9382 0x9328 0x9375 0x934A 0x9365 0x934B 0x9318 0x937E \ - 0x936C 0x935B 0x9370 0x935A 0x9354 0x95CA 0x95CB 0x95CC \ - 0x95C8 0x95C6 0x96B1 0x96B8 0x96D6 0x971C 0x971E 0x97A0 \ - 0x97D3 0x9846 0x98B6 0x9935 0x9A01 0x99FF 0x9BAE 0x9BAB \ - 0x9BAA 0x9BAD 0x9D3B 0x9D3F 0x9E8B 0x9ECF 0x9EDE 0x9EDC \ - 0x9EDD 0x9EDB 0x9F3E 0x9F4B 0x53E2 0x5695 0x56AE 0x58D9 \ - 0x58D8 0x5B38 0x5F5D 0x61E3 0x6233 0x64F4 0x64F2 0x64FE \ - 0x6506 0x64FA 0x64FB 0x64F7 0x65B7 0x66DC 0x6726 0x6AB3 \ - 0x6AAC 0x6AC3 0x6ABB 0x6AB8 0x6AC2 0x6AAE 0x6AAF 0x6B5F \ - 0x6B78 0x6BAF 0x7009 0x700B 0x6FFE 0x7006 0x6FFA 0x7011 \ - 0x700F 0x71FB 0x71FC 0x71FE 0x71F8 0x7377 0x7375 0x74A7 \ - 0x74BF 0x7515 0x7656 0x7658 0x7652 0x77BD 0x77BF 0x77BB \ - 0x77BC 0x790E 0x79AE 0x7A61 0x7A62 0x7A60 0x7AC4 0x7AC5 \ - 0x7C2B 0x7C27 0x7C2A 0x7C1E 0x7C23 0x7C21 0x7CE7 0x7E54 \ - 0x7E55 0x7E5E 0x7E5A 0x7E61 0x7E52 0x7E59 0x7F48 0x7FF9 \ - 0x7FFB 0x8077 0x8076 0x81CD 0x81CF 0x820A 0x85CF 0x85A9 \ - 0x85CD 0x85D0 0x85C9 0x85B0 0x85BA 0x85B9 0x85A6 0x87EF \ - 0x87EC 0x87F2 0x87E0 0x8986 0x89B2 0x89F4 0x8B28 0x8B39 \ - 0x8B2C 0x8B2B 0x8C50 0x8D05 0x8E59 0x8E63 0x8E66 0x8E64 \ - 0x8E5F 0x8E55 0x8EC0 0x8F49 0x8F4D 0x9087 0x9083 0x9088 \ - 0x91AB 0x91AC 0x91D0 0x9394 0x938A 0x9396 0x93A2 0x93B3 \ - 0x93AE 0x93AC 0x93B0 0x9398 0x939A 0x9397 0x95D4 0x95D6 \ - 0x95D0 0x95D5 0x96E2 0x96DC 0x96D9 0x96DB 0x96DE 0x9724 \ - 0x97A3 0x97A6 0x97AD 0x97F9 0x984D 0x984F 0x984C 0x984E \ - 0x9853 0x98BA 0x993E 0x993F 0x993D 0x992E 0x99A5 0x9A0E \ - 0x9AC1 0x9B03 0x9B06 0x9B4F 0x9B4E 0x9B4D 0x9BCA 0x9BC9 \ - 0x9BFD 0x9BC8 0x9BC0 0x9D51 0x9D5D 0x9D60 0x9EE0 0x9F15 \ - 0x9F2C 0x5133 0x56A5 0x58DE 0x58DF 0x58E2 0x5BF5 0x9F90 -22 0x5EEC 0x61F2 0x61F7 0x61F6 0x61F5 0x6500 0x650F 0x66E0 \ - 0x66DD 0x6AE5 0x6ADD 0x6ADA 0x6AD3 0x701B 0x701F 0x7028 \ - 0x701A 0x701D 0x7015 0x7018 0x7206 0x720D 0x7258 0x72A2 \ - 0x7378 0x737A 0x74BD 0x74CA 0x74E3 0x7587 0x7586 0x765F \ - 0x7661 0x77C7 0x7919 0x79B1 0x7A6B 0x7A69 0x7C3E 0x7C3F \ - 0x7C38 0x7C3D 0x7C37 0x7C40 0x7E6B 0x7E6D 0x7E79 0x7E69 \ - 0x7E6A 0x7F85 0x7E73 0x7FB6 0x7FB9 0x7FB8 0x81D8 0x85E9 \ - 0x85DD 0x85EA 0x85D5 0x85E4 0x85E5 0x85F7 0x87FB 0x8805 \ - 0x880D 0x87F9 0x87FE 0x8960 0x895F 0x8956 0x895E 0x8B41 \ - 0x8B5C 0x8B58 0x8B49 0x8B5A 0x8B4E 0x8B4F 0x8B46 0x8B59 \ - 0x8D08 0x8D0A 0x8E7C 0x8E72 0x8E87 0x8E76 0x8E6C 0x8E7A \ - 0x8E74 0x8F54 0x8F4E 0x8FAD 0x908A 0x908B 0x91B1 0x91AE \ - 0x93E1 0x93D1 0x93DF 0x93C3 0x93C8 0x93DC 0x93DD 0x93D6 \ - 0x93E2 0x93CD 0x93D8 0x93E4 0x93D7 0x93E8 0x95DC 0x96B4 \ - 0x96E3 0x972A 0x9727 0x9761 0x97DC 0x97FB 0x985E 0x9858 \ - 0x985B 0x98BC 0x9945 0x9949 0x9A16 0x9A19 0x9B0D 0x9BE8 \ - 0x9BE7 0x9BD6 0x9BDB 0x9D89 0x9D61 0x9D72 0x9D6A 0x9D6C \ - 0x9E92 0x9E97 0x9E93 0x9EB4 0x52F8 0x56A8 0x56B7 0x56B6 \ - 0x56B4 0x56BC 0x58E4 0x5B40 0x5B43 0x5B7D 0x5BF6 0x5DC9 \ - 0x61F8 0x61FA 0x6518 0x6514 0x6519 0x66E6 0x6727 0x6AEC \ - 0x703E 0x7030 0x7032 0x7210 0x737B 0x74CF 0x7662 0x7665 \ - 0x7926 0x792A 0x792C 0x792B 0x7AC7 0x7AF6 0x7C4C 0x7C43 \ - 0x7C4D 0x7CEF 0x7CF0 0x8FAE 0x7E7D 0x7E7C 0x7E82 0x7F4C \ - 0x8000 0x81DA 0x8266 0x85FB 0x85F9 0x8611 0x85FA 0x8606 \ - 0x860B 0x8607 0x860A 0x8814 0x8815 0x8964 0x89BA 0x89F8 \ - 0x8B70 0x8B6C 0x8B66 0x8B6F 0x8B5F 0x8B6B 0x8D0F 0x8D0D \ - 0x8E89 0x8E81 0x8E85 0x8E82 0x91B4 0x91CB 0x9418 0x9403 \ - 0x93FD 0x95E1 0x9730 0x98C4 0x9952 0x9951 0x99A8 0x9A2B \ - 0x9A30 0x9A37 0x9A35 0x9C13 0x9C0D 0x9E79 0x9EB5 0x9EE8 \ - 0x9F2F 0x9F5F 0x9F63 0x9F61 0x5137 0x5138 0x56C1 0x56C0 \ - 0x56C2 0x5914 0x5C6C 0x5DCD 0x61FC 0x61FE 0x651D 0x651C \ - 0x6595 0x66E9 0x6AFB 0x6B04 0x6AFA 0x6BB2 0x704C 0x721B -23 0x72A7 0x74D6 0x74D4 0x7669 0x77D3 0x7C50 0x7E8F 0x7E8C \ - 0x7FBC 0x8617 0x862D 0x861A 0x8823 0x8822 0x8821 0x881F \ - 0x896A 0x896C 0x89BD 0x8B74 0x8B77 0x8B7D 0x8D13 0x8E8A \ - 0x8E8D 0x8E8B 0x8F5F 0x8FAF 0x91BA 0x942E 0x9433 0x9435 \ - 0x943A 0x9438 0x9432 0x942B 0x95E2 0x9738 0x9739 0x9732 \ - 0x97FF 0x9867 0x9865 0x9957 0x9A45 0x9A43 0x9A40 0x9A3E \ - 0x9ACF 0x9B54 0x9B51 0x9C2D 0x9C25 0x9DAF 0x9DB4 0x9DC2 \ - 0x9DB8 0x9E9D 0x9EEF 0x9F19 0x9F5C 0x9F66 0x9F67 0x513C \ - 0x513B 0x56C8 0x56CA 0x56C9 0x5B7F 0x5DD4 0x5DD2 0x5F4E \ - 0x61FF 0x6524 0x6B0A 0x6B61 0x7051 0x7058 0x7380 0x74E4 \ - 0x758A 0x766E 0x766C 0x79B3 0x7C60 0x7C5F 0x807E 0x807D \ - 0x81DF 0x8972 0x896F 0x89FC 0x8B80 0x8D16 0x8D17 0x8E91 \ - 0x8E93 0x8F61 0x9148 0x9444 0x9451 0x9452 0x973D 0x973E \ - 0x97C3 0x97C1 0x986B 0x9955 0x9A55 0x9A4D 0x9AD2 0x9B1A \ - 0x9C49 0x9C31 0x9C3E 0x9C3B 0x9DD3 0x9DD7 0x9F34 0x9F6C \ - 0x9F6A 0x9F94 0x56CC 0x5DD6 0x6200 0x6523 0x652B 0x652A \ - 0x66EC 0x6B10 0x74DA 0x7ACA 0x7C64 0x7C63 0x7C65 0x7E93 \ - 0x7E96 0x7E94 0x81E2 0x8638 0x863F 0x8831 0x8B8A 0x9090 \ - 0x908F 0x9463 0x9460 0x9464 0x9768 0x986F 0x995C 0x9A5A \ - 0x9A5B 0x9A57 0x9AD3 0x9AD4 0x9AD1 0x9C54 0x9C57 0x9C56 \ - 0x9DE5 0x9E9F 0x9EF4 0x56D1 0x58E9 0x652C 0x705E 0x7671 \ - 0x7672 0x77D7 0x7F50 0x7F88 0x8836 0x8839 0x8862 0x8B93 \ - 0x8B92 0x8B96 0x8277 0x8D1B 0x91C0 0x946A 0x9742 0x9748 \ - 0x9744 0x97C6 0x9870 0x9A5F 0x9B22 0x9B58 0x9C5F 0x9DF9 \ - 0x9DFA 0x9E7C 0x9E7D 0x9F07 0x9F77 0x9F72 0x5EF3 0x6B16 \ - 0x7063 0x7C6C 0x7C6E 0x883B 0x89C0 0x8EA1 0x91C1 0x9472 \ - 0x9470 0x9871 0x995E 0x9AD6 0x9B23 0x9ECC 0x7064 0x77DA \ - 0x8B9A 0x9477 0x97C9 0x9A62 0x9A65 0x7E9C 0x8B9C 0x8EAA \ - 0x91C5 0x947D 0x947E 0x947C 0x9C77 0x9C78 0x9EF7 0x8C54 \ - 0x947F 0x9E1A 0x7228 0x9A6A 0x9B31 0x9E1B 0x9E1E 0x7C72 \ - 0x30FE 0x309D 0x309E 0x3005 0x3041 0x3042 0x3043 0x3044 \ - 0x3045 0x3046 0x3047 0x3048 0x3049 0x304A 0x304B 0x304C -24 0x304D 0x304E 0x304F 0x3050 0x3051 0x3052 0x3053 0x3054 \ - 0x3055 0x3056 0x3057 0x3058 0x3059 0x305A 0x305B 0x305C \ - 0x305D 0x305E 0x305F 0x3060 0x3061 0x3062 0x3063 0x3064 \ - 0x3065 0x3066 0x3067 0x3068 0x3069 0x306A 0x306B 0x306C \ - 0x306D 0x306E 0x306F 0x3070 0x3071 0x3072 0x3073 0x3074 \ - 0x3075 0x3076 0x3077 0x3078 0x3079 0x307A 0x307B 0x307C \ - 0x307D 0x307E 0x307F 0x3080 0x3081 0x3082 0x3083 0x3084 \ - 0x3085 0x3086 0x3087 0x3088 0x3089 0x308A 0x308B 0x308C \ - 0x308D 0x308E 0x308F 0x3090 0x3091 0x3092 0x3093 0x30A1 \ - 0x30A2 0x30A3 0x30A4 0x30A5 0x30A6 0x30A7 0x30A8 0x30A9 \ - 0x30AA 0x30AB 0x30AC 0x30AD 0x30AE 0x30AF 0x30B0 0x30B1 \ - 0x30B2 0x30B3 0x30B4 0x30B5 0x30B6 0x30B7 0x30B8 0x30B9 \ - 0x30BA 0x30BB 0x30BC 0x30BD 0x30BE 0x30BF 0x30C0 0x30C1 \ - 0x30C2 0x30C3 0x30C4 0x30C5 0x30C6 0x30C7 0x30C8 0x30C9 \ - 0x30CA 0x30CB 0x30CC 0x30CD 0x30CE 0x30CF 0x30D0 0x30D1 \ - 0x30D2 0x30D3 0x30D4 0x30D5 0x30D6 0x30D7 0x30D8 0x30D9 \ - 0x30DA 0x30DB 0x30DC 0x30DD 0x30DE 0x30DF 0x30E0 0x30E1 \ - 0x30E2 0x30E3 0x30E4 0x30E5 0x30E6 0x30E7 0x30E8 0x30E9 \ - 0x30EA 0x30EB 0x30EC 0x30ED 0x30EE 0x30EF 0x30F0 0x30F1 \ - 0x30F2 0x30F3 0x30F4 0x30F5 0x30F6 0x0414 0x0415 0x0401 \ - 0x0416 0x0417 0x0418 0x0419 0x041A 0x041B 0x041C 0x0423 \ - 0x0424 0x0425 0x0426 0x0427 0x0428 0x0429 0x042A 0x042B \ - 0x042C 0x042D 0x042E 0x042F 0x0430 0x0431 0x0432 0x0433 \ - 0x0434 0x0435 0x0451 0x0436 0x0437 0x0438 0x0439 0x043A \ - 0x043B 0x043C 0x043D 0x043E 0x043F 0x0440 0x0441 0x0442 \ - 0x0443 0x0444 0x0445 0x0446 0x0447 0x0448 0x0449 0x044A \ - 0x044B 0x044C 0x044D 0x044E 0x044F 0x2460 0x2461 0x2462 \ - 0x2463 0x2464 0x2465 0x2466 0x2467 0x2468 0x2469 0x2474 \ - 0x2475 0x2476 0x2477 0x2478 0x2479 0x247A 0x247B 0x247C \ - 0x247D 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -25 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x4E42 0x4E5C 0x51F5 0x531A 0x5382 0x4E07 0x4E0C 0x4E47 \ - 0x4E8D 0x56D7 0xFA0C 0x5C6E 0x5F73 0x4E0F 0x5187 0x4E0E \ - 0x4E2E 0x4E93 0x4EC2 0x4EC9 0x4EC8 0x5198 0x52FC 0x536C \ - 0x53B9 0x5720 0x5903 0x592C 0x5C10 0x5DFF 0x65E1 0x6BB3 \ - 0x6BCC 0x6C14 0x723F 0x4E31 0x4E3C 0x4EE8 0x4EDC 0x4EE9 \ - 0x4EE1 0x4EDD 0x4EDA 0x520C 0x531C 0x534C 0x5722 0x5723 \ - 0x5917 0x592F 0x5B81 0x5B84 0x5C12 0x5C3B 0x5C74 0x5C73 \ - 0x5E04 0x5E80 0x5E82 0x5FC9 0x6209 0x6250 0x6C15 0x6C36 \ - 0x6C43 0x6C3F 0x6C3B 0x72AE 0x72B0 0x738A 0x79B8 0x808A \ - 0x961E 0x4F0E 0x4F18 0x4F2C 0x4EF5 0x4F14 0x4EF1 0x4F00 \ - 0x4EF7 0x4F08 0x4F1D 0x4F02 0x4F05 0x4F22 0x4F13 0x4F04 \ - 0x4EF4 0x4F12 0x51B1 0x5213 0x5209 0x5210 0x52A6 0x5322 \ - 0x531F 0x534D 0x538A 0x5407 0x56E1 0x56DF 0x572E 0x572A \ - 0x5734 0x593C 0x5980 0x597C 0x5985 0x597B 0x597E 0x5977 \ - 0x597F 0x5B56 0x5C15 0x5C25 0x5C7C 0x5C7A 0x5C7B 0x5C7E -26 0x5DDF 0x5E75 0x5E84 0x5F02 0x5F1A 0x5F74 0x5FD5 0x5FD4 \ - 0x5FCF 0x625C 0x625E 0x6264 0x6261 0x6266 0x6262 0x6259 \ - 0x6260 0x625A 0x6265 0x65EF 0x65EE 0x673E 0x6739 0x6738 \ - 0x673B 0x673A 0x673F 0x673C 0x6733 0x6C18 0x6C46 0x6C52 \ - 0x6C5C 0x6C4F 0x6C4A 0x6C54 0x6C4B 0x6C4C 0x7071 0x725E \ - 0x72B4 0x72B5 0x738E 0x752A 0x767F 0x7A75 0x7F51 0x8278 \ - 0x827C 0x8280 0x827D 0x827F 0x864D 0x897E 0x9099 0x9097 \ - 0x9098 0x909B 0x9094 0x9622 0x9624 0x9620 0x9623 0x4F56 \ - 0x4F3B 0x4F62 0x4F49 0x4F53 0x4F64 0x4F3E 0x4F67 0x4F52 \ - 0x4F5F 0x4F41 0x4F58 0x4F2D 0x4F33 0x4F3F 0x4F61 0x518F \ - 0x51B9 0x521C 0x521E 0x5221 0x52AD 0x52AE 0x5309 0x5363 \ - 0x5372 0x538E 0x538F 0x5430 0x5437 0x542A 0x5454 0x5445 \ - 0x5419 0x541C 0x5425 0x5418 0x543D 0x544F 0x5441 0x5428 \ - 0x5424 0x5447 0x56EE 0x56E7 0x56E5 0x5741 0x5745 0x574C \ - 0x5749 0x574B 0x5752 0x5906 0x5940 0x59A6 0x5998 0x59A0 \ - 0x5997 0x598E 0x59A2 0x5990 0x598F 0x59A7 0x59A1 0x5B8E \ - 0x5B92 0x5C28 0x5C2A 0x5C8D 0x5C8F 0x5C88 0x5C8B 0x5C89 \ - 0x5C92 0x5C8A 0x5C86 0x5C93 0x5C95 0x5DE0 0x5E0A 0x5E0E \ - 0x5E8B 0x5E89 0x5E8C 0x5E88 0x5E8D 0x5F05 0x5F1D 0x5F78 \ - 0x5F76 0x5FD2 0x5FD1 0x5FD0 0x5FED 0x5FE8 0x5FEE 0x5FF3 \ - 0x5FE1 0x5FE4 0x5FE3 0x5FFA 0x5FEF 0x5FF7 0x5FFB 0x6000 \ - 0x5FF4 0x623A 0x6283 0x628C 0x628E 0x628F 0x6294 0x6287 \ - 0x6271 0x627B 0x627A 0x6270 0x6281 0x6288 0x6277 0x627D \ - 0x6272 0x6274 0x6537 0x65F0 0x65F4 0x65F3 0x65F2 0x65F5 \ - 0x6745 0x6747 0x6759 0x6755 0x674C 0x6748 0x675D 0x674D \ - 0x675A 0x674B 0x6BD0 0x6C19 0x6C1A 0x6C78 0x6C67 0x6C6B \ - 0x6C84 0x6C8B 0x6C8F 0x6C71 0x6C6F 0x6C69 0x6C9A 0x6C6D \ - 0x6C87 0x6C95 0x6C9C 0x6C66 0x6C73 0x6C65 0x6C7B 0x6C8E \ - 0x7074 0x707A 0x7263 0x72BF 0x72BD 0x72C3 0x72C6 0x72C1 \ - 0x72BA 0x72C5 0x7395 0x7397 0x7393 0x7394 0x7392 0x753A \ - 0x7539 0x7594 0x7595 0x7681 0x793D 0x8034 0x8095 0x8099 \ - 0x8090 0x8092 0x809C 0x8290 0x828F 0x8285 0x828E 0x8291 -27 0x8293 0x828A 0x8283 0x8284 0x8C78 0x8FC9 0x8FBF 0x909F \ - 0x90A1 0x90A5 0x909E 0x90A7 0x90A0 0x9630 0x9628 0x962F \ - 0x962D 0x4E33 0x4F98 0x4F7C 0x4F85 0x4F7D 0x4F80 0x4F87 \ - 0x4F76 0x4F74 0x4F89 0x4F84 0x4F77 0x4F4C 0x4F97 0x4F6A \ - 0x4F9A 0x4F79 0x4F81 0x4F78 0x4F90 0x4F9C 0x4F94 0x4F9E \ - 0x4F92 0x4F82 0x4F95 0x4F6B 0x4F6E 0x519E 0x51BC 0x51BE \ - 0x5235 0x5232 0x5233 0x5246 0x5231 0x52BC 0x530A 0x530B \ - 0x533C 0x5392 0x5394 0x5487 0x547F 0x5481 0x5491 0x5482 \ - 0x5488 0x546B 0x547A 0x547E 0x5465 0x546C 0x5474 0x5466 \ - 0x548D 0x546F 0x5461 0x5460 0x5498 0x5463 0x5467 0x5464 \ - 0x56F7 0x56F9 0x576F 0x5772 0x576D 0x576B 0x5771 0x5770 \ - 0x5776 0x5780 0x5775 0x577B 0x5773 0x5774 0x5762 0x5768 \ - 0x577D 0x590C 0x5945 0x59B5 0x59BA 0x59CF 0x59CE 0x59B2 \ - 0x59CC 0x59C1 0x59B6 0x59BC 0x59C3 0x59D6 0x59B1 0x59BD \ - 0x59C0 0x59C8 0x59B4 0x59C7 0x5B62 0x5B65 0x5B93 0x5B95 \ - 0x5C44 0x5C47 0x5CAE 0x5CA4 0x5CA0 0x5CB5 0x5CAF 0x5CA8 \ - 0x5CAC 0x5C9F 0x5CA3 0x5CAD 0x5CA2 0x5CAA 0x5CA7 0x5C9D \ - 0x5CA5 0x5CB6 0x5CB0 0x5CA6 0x5E17 0x5E14 0x5E19 0x5F28 \ - 0x5F22 0x5F23 0x5F24 0x5F54 0x5F82 0x5F7E 0x5F7D 0x5FDE \ - 0x5FE5 0x602D 0x6026 0x6019 0x6032 0x600B 0x6034 0x600A \ - 0x6017 0x6033 0x601A 0x601E 0x602C 0x6022 0x600D 0x6010 \ - 0x602E 0x6013 0x6011 0x600C 0x6009 0x601C 0x6214 0x623D \ - 0x62AD 0x62B4 0x62D1 0x62BE 0x62AA 0x62B6 0x62CA 0x62AE \ - 0x62B3 0x62AF 0x62BB 0x62A9 0x62B0 0x62B8 0x653D 0x65A8 \ - 0x65BB 0x6609 0x65FC 0x6604 0x6612 0x6608 0x65FB 0x6603 \ - 0x660B 0x660D 0x6605 0x65FD 0x6611 0x6610 0x66F6 0x670A \ - 0x6785 0x676C 0x678E 0x6792 0x6776 0x677B 0x6798 0x6786 \ - 0x6784 0x6774 0x678D 0x678C 0x677A 0x679F 0x6791 0x6799 \ - 0x6783 0x677D 0x6781 0x6778 0x6779 0x6794 0x6B25 0x6B80 \ - 0x6B7E 0x6BDE 0x6C1D 0x6C93 0x6CEC 0x6CEB 0x6CEE 0x6CD9 \ - 0x6CB6 0x6CD4 0x6CAD 0x6CE7 0x6CB7 0x6CD0 0x6CC2 0x6CBA \ - 0x6CC3 0x6CC6 0x6CED 0x6CF2 0x6CD2 0x6CDD 0x6CB4 0x6C8A -28 0x6C9D 0x6C80 0x6CDE 0x6CC0 0x6D30 0x6CCD 0x6CC7 0x6CB0 \ - 0x6CF9 0x6CCF 0x6CE9 0x6CD1 0x7094 0x7098 0x7085 0x7093 \ - 0x7086 0x7084 0x7091 0x7096 0x7082 0x709A 0x7083 0x726A \ - 0x72D6 0x72CB 0x72D8 0x72C9 0x72DC 0x72D2 0x72D4 0x72DA \ - 0x72CC 0x72D1 0x73A4 0x73A1 0x73AD 0x73A6 0x73A2 0x73A0 \ - 0x73AC 0x739D 0x74DD 0x74E8 0x753F 0x7540 0x753E 0x758C \ - 0x7598 0x76AF 0x76F3 0x76F1 0x76F0 0x76F5 0x77F8 0x77FC \ - 0x77F9 0x77FB 0x77FA 0x77F7 0x7942 0x793F 0x79C5 0x7A78 \ - 0x7A7B 0x7AFB 0x7C75 0x7CFD 0x8035 0x808F 0x80AE 0x80A3 \ - 0x80B8 0x80B5 0x80AD 0x8220 0x82A0 0x82C0 0x82AB 0x829A \ - 0x8298 0x829B 0x82B5 0x82A7 0x82AE 0x82BC 0x829E 0x82BA \ - 0x82B4 0x82A8 0x82A1 0x82A9 0x82C2 0x82A4 0x82C3 0x82B6 \ - 0x82A2 0x8670 0x866F 0x866D 0x866E 0x8C56 0x8FD2 0x8FCB \ - 0x8FD3 0x8FCD 0x8FD6 0x8FD5 0x8FD7 0x90B2 0x90B4 0x90AF \ - 0x90B3 0x90B0 0x9639 0x963D 0x963C 0x963A 0x9643 0x4FCD \ - 0x4FC5 0x4FD3 0x4FB2 0x4FC9 0x4FCB 0x4FC1 0x4FD4 0x4FDC \ - 0x4FD9 0x4FBB 0x4FB3 0x4FDB 0x4FC7 0x4FD6 0x4FBA 0x4FC0 \ - 0x4FB9 0x4FEC 0x5244 0x5249 0x52C0 0x52C2 0x533D 0x537C \ - 0x5397 0x5396 0x5399 0x5398 0x54BA 0x54A1 0x54AD 0x54A5 \ - 0x54CF 0x54C3 0x830D 0x54B7 0x54AE 0x54D6 0x54B6 0x54C5 \ - 0x54C6 0x54A0 0x5470 0x54BC 0x54A2 0x54BE 0x5472 0x54DE \ - 0x54B0 0x57B5 0x579E 0x579F 0x57A4 0x578C 0x5797 0x579D \ - 0x579B 0x5794 0x5798 0x578F 0x5799 0x57A5 0x579A 0x5795 \ - 0x58F4 0x590D 0x5953 0x59E1 0x59DE 0x59EE 0x5A00 0x59F1 \ - 0x59DD 0x59FA 0x59FD 0x59FC 0x59F6 0x59E4 0x59F2 0x59F7 \ - 0x59DB 0x59E9 0x59F3 0x59F5 0x59E0 0x59FE 0x59F4 0x59ED \ - 0x5BA8 0x5C4C 0x5CD0 0x5CD8 0x5CCC 0x5CD7 0x5CCB 0x5CDB \ - 0x5CDE 0x5CDA 0x5CC9 0x5CC7 0x5CCA 0x5CD6 0x5CD3 0x5CD4 \ - 0x5CCF 0x5CC8 0x5CC6 0x5CCE 0x5CDF 0x5CF8 0x5DF9 0x5E21 \ - 0x5E22 0x5E23 0x5E20 0x5E24 0x5EB0 0x5EA4 0x5EA2 0x5E9B \ - 0x5EA3 0x5EA5 0x5F07 0x5F2E 0x5F56 0x5F86 0x6037 0x6039 \ - 0x6054 0x6072 0x605E 0x6045 0x6053 0x6047 0x6049 0x605B -29 0x604C 0x6040 0x6042 0x605F 0x6024 0x6044 0x6058 0x6066 \ - 0x606E 0x6242 0x6243 0x62CF 0x630D 0x630B 0x62F5 0x630E \ - 0x6303 0x62EB 0x62F9 0x630F 0x630C 0x62F8 0x62F6 0x6300 \ - 0x6313 0x6314 0x62FA 0x6315 0x62FB 0x62F0 0x6541 0x6543 \ - 0x65AA 0x65BF 0x6636 0x6621 0x6632 0x6635 0x661C 0x6626 \ - 0x6622 0x6633 0x662B 0x663A 0x661D 0x6634 0x6639 0x662E \ - 0x670F 0x6710 0x67C1 0x67F2 0x67C8 0x67BA 0x67DC 0x67BB \ - 0x67F8 0x67D8 0x67C0 0x67B7 0x67C5 0x67EB 0x67E4 0x67DF \ - 0x67B5 0x67CD 0x67B3 0x67F7 0x67F6 0x67EE 0x67E3 0x67C2 \ - 0x67B9 0x67CE 0x67E7 0x67F0 0x67B2 0x67FC 0x67C6 0x67ED \ - 0x67CC 0x67AE 0x67E6 0x67DB 0x67FA 0x67C9 0x67CA 0x67C3 \ - 0x67EA 0x67CB 0x6B28 0x6B82 0x6B84 0x6BB6 0x6BD6 0x6BD8 \ - 0x6BE0 0x6C20 0x6C21 0x6D28 0x6D34 0x6D2D 0x6D1F 0x6D3C \ - 0x6D3F 0x6D12 0x6D0A 0x6CDA 0x6D33 0x6D04 0x6D19 0x6D3A \ - 0x6D1A 0x6D11 0x6D00 0x6D1D 0x6D42 0x6D01 0x6D18 0x6D37 \ - 0x6D03 0x6D0F 0x6D40 0x6D07 0x6D20 0x6D2C 0x6D08 0x6D22 \ - 0x6D09 0x6D10 0x70B7 0x709F 0x70BE 0x70B1 0x70B0 0x70A1 \ - 0x70B4 0x70B5 0x70A9 0x7241 0x7249 0x724A 0x726C 0x7270 \ - 0x7273 0x726E 0x72CA 0x72E4 0x72E8 0x72EB 0x72DF 0x72EA \ - 0x72E6 0x72E3 0x7385 0x73CC 0x73C2 0x73C8 0x73C5 0x73B9 \ - 0x73B6 0x73B5 0x73B4 0x73EB 0x73BF 0x73C7 0x73BE 0x73C3 \ - 0x73C6 0x73B8 0x73CB 0x74EC 0x74EE 0x752E 0x7547 0x7548 \ - 0x75A7 0x75AA 0x7679 0x76C4 0x7708 0x7703 0x7704 0x7705 \ - 0x770A 0x76F7 0x76FB 0x76FA 0x77E7 0x77E8 0x7806 0x7811 \ - 0x7812 0x7805 0x7810 0x780F 0x780E 0x7809 0x7803 0x7813 \ - 0x794A 0x794C 0x794B 0x7945 0x7944 0x79D5 0x79CD 0x79CF \ - 0x79D6 0x79CE 0x7A80 0x7A7E 0x7AD1 0x7B00 0x7B01 0x7C7A \ - 0x7C78 0x7C79 0x7C7F 0x7C80 0x7C81 0x7D03 0x7D08 0x7D01 \ - 0x7F58 0x7F91 0x7F8D 0x7FBE 0x8007 0x800E 0x800F 0x8014 \ - 0x8037 0x80D8 0x80C7 0x80E0 0x80D1 0x80C8 0x80C2 0x80D0 \ - 0x80C5 0x80E3 0x80D9 0x80DC 0x80CA 0x80D5 0x80C9 0x80CF \ - 0x80D7 0x80E6 0x80CD 0x81FF 0x8221 0x8294 0x82D9 0x82FE -30 0x82F9 0x8307 0x82E8 0x8300 0x82D5 0x833A 0x82EB 0x82D6 \ - 0x82F4 0x82EC 0x82E1 0x82F2 0x82F5 0x830C 0x82FB 0x82F6 \ - 0x82F0 0x82EA 0x82E4 0x82E0 0x82FA 0x82F3 0x82ED 0x8677 \ - 0x8674 0x867C 0x8673 0x8841 0x884E 0x8867 0x886A 0x8869 \ - 0x89D3 0x8A04 0x8A07 0x8D72 0x8FE3 0x8FE1 0x8FEE 0x8FE0 \ - 0x90F1 0x90BD 0x90BF 0x90D5 0x90C5 0x90BE 0x90C7 0x90CB \ - 0x90C8 0x91D4 0x91D3 0x9654 0x964F 0x9651 0x9653 0x964A \ - 0x964E 0x501E 0x5005 0x5007 0x5013 0x5022 0x5030 0x501B \ - 0x4FF5 0x4FF4 0x5033 0x5037 0x502C 0x4FF6 0x4FF7 0x5017 \ - 0x501C 0x5020 0x5027 0x5035 0x502F 0x5031 0x500E 0x515A \ - 0x5194 0x5193 0x51CA 0x51C4 0x51C5 0x51C8 0x51CE 0x5261 \ - 0x525A 0x5252 0x525E 0x525F 0x5255 0x5262 0x52CD 0x530E \ - 0x539E 0x5526 0x54E2 0x5517 0x5512 0x54E7 0x54F3 0x54E4 \ - 0x551A 0x54FF 0x5504 0x5508 0x54EB 0x5511 0x5505 0x54F1 \ - 0x550A 0x54FB 0x54F7 0x54F8 0x54E0 0x550E 0x5503 0x550B \ - 0x5701 0x5702 0x57CC 0x5832 0x57D5 0x57D2 0x57BA 0x57C6 \ - 0x57BD 0x57BC 0x57B8 0x57B6 0x57BF 0x57C7 0x57D0 0x57B9 \ - 0x57C1 0x590E 0x594A 0x5A19 0x5A16 0x5A2D 0x5A2E 0x5A15 \ - 0x5A0F 0x5A17 0x5A0A 0x5A1E 0x5A33 0x5B6C 0x5BA7 0x5BAD \ - 0x5BAC 0x5C03 0x5C56 0x5C54 0x5CEC 0x5CFF 0x5CEE 0x5CF1 \ - 0x5CF7 0x5D00 0x5CF9 0x5E29 0x5E28 0x5EA8 0x5EAE 0x5EAA \ - 0x5EAC 0x5F33 0x5F30 0x5F67 0x605D 0x605A 0x6067 0x6041 \ - 0x60A2 0x6088 0x6080 0x6092 0x6081 0x609D 0x6083 0x6095 \ - 0x609B 0x6097 0x6087 0x609C 0x608E 0x6219 0x6246 0x62F2 \ - 0x6310 0x6356 0x632C 0x6344 0x6345 0x6336 0x6343 0x63E4 \ - 0x6339 0x634B 0x634A 0x633C 0x6329 0x6341 0x6334 0x6358 \ - 0x6354 0x6359 0x632D 0x6347 0x6333 0x635A 0x6351 0x6338 \ - 0x6357 0x6340 0x6348 0x654A 0x6546 0x65C6 0x65C3 0x65C4 \ - 0x65C2 0x664A 0x665F 0x6647 0x6651 0x6712 0x6713 0x681F \ - 0x681A 0x6849 0x6832 0x6833 0x683B 0x684B 0x684F 0x6816 \ - 0x6831 0x681C 0x6835 0x682B 0x682D 0x682F 0x684E 0x6844 \ - 0x6834 0x681D 0x6812 0x6814 0x6826 0x6828 0x682E 0x684D -31 0x683A 0x6825 0x6820 0x6B2C 0x6B2F 0x6B2D 0x6B31 0x6B34 \ - 0x6B6D 0x8082 0x6B88 0x6BE6 0x6BE4 0x6BE8 0x6BE3 0x6BE2 \ - 0x6BE7 0x6C25 0x6D7A 0x6D63 0x6D64 0x6D76 0x6D0D 0x6D61 \ - 0x6D92 0x6D58 0x6D62 0x6D6D 0x6D6F 0x6D91 0x6D8D 0x6DEF \ - 0x6D7F 0x6D86 0x6D5E 0x6D67 0x6D60 0x6D97 0x6D70 0x6D7C \ - 0x6D5F 0x6D82 0x6D98 0x6D2F 0x6D68 0x6D8B 0x6D7E 0x6D80 \ - 0x6D84 0x6D16 0x6D83 0x6D7B 0x6D7D 0x6D75 0x6D90 0x70DC \ - 0x70D3 0x70D1 0x70DD 0x70CB 0x7F39 0x70E2 0x70D7 0x70D2 \ - 0x70DE 0x70E0 0x70D4 0x70CD 0x70C5 0x70C6 0x70C7 0x70DA \ - 0x70CE 0x70E1 0x7242 0x7278 0x7277 0x7276 0x7300 0x72FA \ - 0x72F4 0x72FE 0x72F6 0x72F3 0x72FB 0x7301 0x73D3 0x73D9 \ - 0x73E5 0x73D6 0x73BC 0x73E7 0x73E3 0x73E9 0x73DC 0x73D2 \ - 0x73DB 0x73D4 0x73DD 0x73DA 0x73D7 0x73D8 0x73E8 0x74DE \ - 0x74DF 0x74F4 0x74F5 0x7521 0x755B 0x755F 0x75B0 0x75C1 \ - 0x75BB 0x75C4 0x75C0 0x75BF 0x75B6 0x75BA 0x768A 0x76C9 \ - 0x771D 0x771B 0x7710 0x7713 0x7712 0x7723 0x7711 0x7715 \ - 0x7719 0x771A 0x7722 0x7727 0x7823 0x782C 0x7822 0x7835 \ - 0x782F 0x7828 0x782E 0x782B 0x7821 0x7829 0x7833 0x782A \ - 0x7831 0x7954 0x795B 0x794F 0x795C 0x7953 0x7952 0x7951 \ - 0x79EB 0x79EC 0x79E0 0x79EE 0x79ED 0x79EA 0x79DC 0x79DE \ - 0x79DD 0x7A86 0x7A89 0x7A85 0x7A8B 0x7A8C 0x7A8A 0x7A87 \ - 0x7AD8 0x7B10 0x7B04 0x7B13 0x7B05 0x7B0F 0x7B08 0x7B0A \ - 0x7B0E 0x7B09 0x7B12 0x7C84 0x7C91 0x7C8A 0x7C8C 0x7C88 \ - 0x7C8D 0x7C85 0x7D1E 0x7D1D 0x7D11 0x7D0E 0x7D18 0x7D16 \ - 0x7D13 0x7D1F 0x7D12 0x7D0F 0x7D0C 0x7F5C 0x7F61 0x7F5E \ - 0x7F60 0x7F5D 0x7F5B 0x7F96 0x7F92 0x7FC3 0x7FC2 0x7FC0 \ - 0x8016 0x803E 0x8039 0x80FA 0x80F2 0x80F9 0x80F5 0x8101 \ - 0x80FB 0x8100 0x8201 0x822F 0x8225 0x8333 0x832D 0x8344 \ - 0x8319 0x8351 0x8325 0x8356 0x833F 0x8341 0x8326 0x831C \ - 0x8322 0x8342 0x834E 0x831B 0x832A 0x8308 0x833C 0x834D \ - 0x8316 0x8324 0x8320 0x8337 0x832F 0x8329 0x8347 0x8345 \ - 0x834C 0x8353 0x831E 0x832C 0x834B 0x8327 0x8348 0x8653 -32 0x8652 0x86A2 0x86A8 0x8696 0x868D 0x8691 0x869E 0x8687 \ - 0x8697 0x8686 0x868B 0x869A 0x8685 0x86A5 0x8699 0x86A1 \ - 0x86A7 0x8695 0x8698 0x868E 0x869D 0x8690 0x8694 0x8843 \ - 0x8844 0x886D 0x8875 0x8876 0x8872 0x8880 0x8871 0x887F \ - 0x886F 0x8883 0x887E 0x8874 0x887C 0x8A12 0x8C47 0x8C57 \ - 0x8C7B 0x8CA4 0x8CA3 0x8D76 0x8D78 0x8DB5 0x8DB7 0x8DB6 \ - 0x8ED1 0x8ED3 0x8FFE 0x8FF5 0x9002 0x8FFF 0x8FFB 0x9004 \ - 0x8FFC 0x8FF6 0x90D6 0x90E0 0x90D9 0x90DA 0x90E3 0x90DF \ - 0x90E5 0x90D8 0x90DB 0x90D7 0x90DC 0x90E4 0x9150 0x914E \ - 0x914F 0x91D5 0x91E2 0x91DA 0x965C 0x965F 0x96BC 0x98E3 \ - 0x9ADF 0x9B2F 0x4E7F 0x5070 0x506A 0x5061 0x505E 0x5060 \ - 0x5053 0x504B 0x505D 0x5072 0x5048 0x504D 0x5041 0x505B \ - 0x504A 0x5062 0x5015 0x5045 0x505F 0x5069 0x506B 0x5063 \ - 0x5064 0x5046 0x5040 0x506E 0x5073 0x5057 0x5051 0x51D0 \ - 0x526B 0x526D 0x526C 0x526E 0x52D6 0x52D3 0x532D 0x539C \ - 0x5575 0x5576 0x553C 0x554D 0x5550 0x5534 0x552A 0x5551 \ - 0x5562 0x5536 0x5535 0x5530 0x5552 0x5545 0x550C 0x5532 \ - 0x5565 0x554E 0x5539 0x5548 0x552D 0x553B 0x5540 0x554B \ - 0x570A 0x5707 0x57FB 0x5814 0x57E2 0x57F6 0x57DC 0x57F4 \ - 0x5800 0x57ED 0x57FD 0x5808 0x57F8 0x580B 0x57F3 0x57CF \ - 0x5807 0x57EE 0x57E3 0x57F2 0x57E5 0x57EC 0x57E1 0x580E \ - 0x57FC 0x5810 0x57E7 0x5801 0x580C 0x57F1 0x57E9 0x57F0 \ - 0x580D 0x5804 0x595C 0x5A60 0x5A58 0x5A55 0x5A67 0x5A5E \ - 0x5A38 0x5A35 0x5A6D 0x5A50 0x5A5F 0x5A65 0x5A6C 0x5A53 \ - 0x5A64 0x5A57 0x5A43 0x5A5D 0x5A52 0x5A44 0x5A5B 0x5A48 \ - 0x5A8E 0x5A3E 0x5A4D 0x5A39 0x5A4C 0x5A70 0x5A69 0x5A47 \ - 0x5A51 0x5A56 0x5A42 0x5A5C 0x5B72 0x5B6E 0x5BC1 0x5BC0 \ - 0x5C59 0x5D1E 0x5D0B 0x5D1D 0x5D1A 0x5D20 0x5D0C 0x5D28 \ - 0x5D0D 0x5D26 0x5D25 0x5D0F 0x5D30 0x5D12 0x5D23 0x5D1F \ - 0x5D2E 0x5E3E 0x5E34 0x5EB1 0x5EB4 0x5EB9 0x5EB2 0x5EB3 \ - 0x5F36 0x5F38 0x5F9B 0x5F96 0x5F9F 0x608A 0x6090 0x6086 \ - 0x60BE 0x60B0 0x60BA 0x60D3 0x60D4 0x60CF 0x60E4 0x60D9 -33 0x60DD 0x60C8 0x60B1 0x60DB 0x60B7 0x60CA 0x60BF 0x60C3 \ - 0x60CD 0x60C0 0x6332 0x6365 0x638A 0x6382 0x637D 0x63BD \ - 0x639E 0x63AD 0x639D 0x6397 0x63AB 0x638E 0x636F 0x6387 \ - 0x6390 0x636E 0x63AF 0x6375 0x639C 0x636D 0x63AE 0x637C \ - 0x63A4 0x633B 0x639F 0x6378 0x6385 0x6381 0x6391 0x638D \ - 0x6370 0x6553 0x65CD 0x6665 0x6661 0x665B 0x6659 0x665C \ - 0x6662 0x6718 0x6879 0x6887 0x6890 0x689C 0x686D 0x686E \ - 0x68AE 0x68AB 0x6956 0x686F 0x68A3 0x68AC 0x68A9 0x6875 \ - 0x6874 0x68B2 0x688F 0x6877 0x6892 0x687C 0x686B 0x6872 \ - 0x68AA 0x6880 0x6871 0x687E 0x689B 0x6896 0x688B 0x68A0 \ - 0x6889 0x68A4 0x6878 0x687B 0x6891 0x688C 0x688A 0x687D \ - 0x6B36 0x6B33 0x6B37 0x6B38 0x6B91 0x6B8F 0x6B8D 0x6B8E \ - 0x6B8C 0x6C2A 0x6DC0 0x6DAB 0x6DB4 0x6DB3 0x6E74 0x6DAC \ - 0x6DE9 0x6DE2 0x6DB7 0x6DF6 0x6DD4 0x6E00 0x6DC8 0x6DE0 \ - 0x6DDF 0x6DD6 0x6DBE 0x6DE5 0x6DDC 0x6DDD 0x6DDB 0x6DF4 \ - 0x6DCA 0x6DBD 0x6DED 0x6DF0 0x6DBA 0x6DD5 0x6DC2 0x6DCF \ - 0x6DC9 0x6DD0 0x6DF2 0x6DD3 0x6DFD 0x6DD7 0x6DCD 0x6DE3 \ - 0x6DBB 0x70FA 0x710D 0x70F7 0x7117 0x70F4 0x710C 0x70F0 \ - 0x7104 0x70F3 0x7110 0x70FC 0x70FF 0x7106 0x7113 0x7100 \ - 0x70F8 0x70F6 0x710B 0x7102 0x710E 0x727E 0x727B 0x727C \ - 0x727F 0x731D 0x7317 0x7307 0x7311 0x7318 0x730A 0x7308 \ - 0x72FF 0x730F 0x731E 0x7388 0x73F6 0x73F8 0x73F5 0x7404 \ - 0x7401 0x73FD 0x7407 0x7400 0x73FA 0x73FC 0x73FF 0x740C \ - 0x740B 0x73F4 0x7408 0x7564 0x7563 0x75CE 0x75D2 0x75CF \ - 0x75CB 0x75CC 0x75D1 0x75D0 0x768F 0x7689 0x76D3 0x7739 \ - 0x772F 0x772D 0x7731 0x7732 0x7734 0x7733 0x773D 0x7725 \ - 0x773B 0x7735 0x7848 0x7852 0x7849 0x784D 0x784A 0x784C \ - 0x7826 0x7845 0x7850 0x7964 0x7967 0x7969 0x796A 0x7963 \ - 0x796B 0x7961 0x79BB 0x79FA 0x79F8 0x79F6 0x79F7 0x7A8F \ - 0x7A94 0x7A90 0x7B35 0x7B47 0x7B34 0x7B25 0x7B30 0x7B22 \ - 0x7B24 0x7B33 0x7B18 0x7B2A 0x7B1D 0x7B31 0x7B2B 0x7B2D \ - 0x7B2F 0x7B32 0x7B38 0x7B1A 0x7B23 0x7C94 0x7C98 0x7C96 -34 0x7CA3 0x7D35 0x7D3D 0x7D38 0x7D36 0x7D3A 0x7D45 0x7D2C \ - 0x7D29 0x7D41 0x7D47 0x7D3E 0x7D3F 0x7D4A 0x7D3B 0x7D28 \ - 0x7F63 0x7F95 0x7F9C 0x7F9D 0x7F9B 0x7FCA 0x7FCB 0x7FCD \ - 0x7FD0 0x7FD1 0x7FC7 0x7FCF 0x7FC9 0x801F 0x801E 0x801B \ - 0x8047 0x8043 0x8048 0x8118 0x8125 0x8119 0x811B 0x812D \ - 0x811F 0x812C 0x811E 0x8121 0x8115 0x8127 0x811D 0x8122 \ - 0x8211 0x8238 0x8233 0x823A 0x8234 0x8232 0x8274 0x8390 \ - 0x83A3 0x83A8 0x838D 0x837A 0x8373 0x83A4 0x8374 0x838F \ - 0x8381 0x8395 0x8399 0x8375 0x8394 0x83A9 0x837D 0x8383 \ - 0x838C 0x839D 0x839B 0x83AA 0x838B 0x837E 0x83A5 0x83AF \ - 0x8388 0x8397 0x83B0 0x837F 0x83A6 0x8387 0x83AE 0x8376 \ - 0x839A 0x8659 0x8656 0x86BF 0x86B7 0x86C2 0x86C1 0x86C5 \ - 0x86BA 0x86B0 0x86C8 0x86B9 0x86B3 0x86B8 0x86CC 0x86B4 \ - 0x86BB 0x86BC 0x86C3 0x86BD 0x86BE 0x8852 0x8889 0x8895 \ - 0x88A8 0x88A2 0x88AA 0x889A 0x8891 0x88A1 0x889F 0x8898 \ - 0x88A7 0x8899 0x889B 0x8897 0x88A4 0x88AC 0x888C 0x8893 \ - 0x888E 0x8982 0x89D6 0x89D9 0x89D5 0x8A30 0x8A27 0x8A2C \ - 0x8A1E 0x8C39 0x8C3B 0x8C5C 0x8C5D 0x8C7D 0x8CA5 0x8D7D \ - 0x8D7B 0x8D79 0x8DBC 0x8DC2 0x8DB9 0x8DBF 0x8DC1 0x8ED8 \ - 0x8EDE 0x8EDD 0x8EDC 0x8ED7 0x8EE0 0x8EE1 0x9024 0x900B \ - 0x9011 0x901C 0x900C 0x9021 0x90EF 0x90EA 0x90F0 0x90F4 \ - 0x90F2 0x90F3 0x90D4 0x90EB 0x90EC 0x90E9 0x9156 0x9158 \ - 0x915A 0x9153 0x9155 0x91EC 0x91F4 0x91F1 0x91F3 0x91F8 \ - 0x91E4 0x91F9 0x91EA 0x91EB 0x91F7 0x91E8 0x91EE 0x957A \ - 0x9586 0x9588 0x967C 0x966D 0x966B 0x9671 0x966F 0x96BF \ - 0x976A 0x9804 0x98E5 0x9997 0x509B 0x5095 0x5094 0x509E \ - 0x508B 0x50A3 0x5083 0x508C 0x508E 0x509D 0x5068 0x509C \ - 0x5092 0x5082 0x5087 0x515F 0x51D4 0x5312 0x5311 0x53A4 \ - 0x53A7 0x5591 0x55A8 0x55A5 0x55AD 0x5577 0x5645 0x55A2 \ - 0x5593 0x5588 0x558F 0x55B5 0x5581 0x55A3 0x5592 0x55A4 \ - 0x557D 0x558C 0x55A6 0x557F 0x5595 0x55A1 0x558E 0x570C \ - 0x5829 0x5837 0x5819 0x581E 0x5827 0x5823 0x5828 0x57F5 -35 0x5848 0x5825 0x581C 0x581B 0x5833 0x583F 0x5836 0x582E \ - 0x5839 0x5838 0x582D 0x582C 0x583B 0x5961 0x5AAF 0x5A94 \ - 0x5A9F 0x5A7A 0x5AA2 0x5A9E 0x5A78 0x5AA6 0x5A7C 0x5AA5 \ - 0x5AAC 0x5A95 0x5AAE 0x5A37 0x5A84 0x5A8A 0x5A97 0x5A83 \ - 0x5A8B 0x5AA9 0x5A7B 0x5A7D 0x5A8C 0x5A9C 0x5A8F 0x5A93 \ - 0x5A9D 0x5BEA 0x5BCD 0x5BCB 0x5BD4 0x5BD1 0x5BCA 0x5BCE \ - 0x5C0C 0x5C30 0x5D37 0x5D43 0x5D6B 0x5D41 0x5D4B 0x5D3F \ - 0x5D35 0x5D51 0x5D4E 0x5D55 0x5D33 0x5D3A 0x5D52 0x5D3D \ - 0x5D31 0x5D59 0x5D42 0x5D39 0x5D49 0x5D38 0x5D3C 0x5D32 \ - 0x5D36 0x5D40 0x5D45 0x5E44 0x5E41 0x5F58 0x5FA6 0x5FA5 \ - 0x5FAB 0x60C9 0x60B9 0x60CC 0x60E2 0x60CE 0x60C4 0x6114 \ - 0x60F2 0x610A 0x6116 0x6105 0x60F5 0x6113 0x60F8 0x60FC \ - 0x60FE 0x60C1 0x6103 0x6118 0x611D 0x6110 0x60FF 0x6104 \ - 0x610B 0x624A 0x6394 0x63B1 0x63B0 0x63CE 0x63E5 0x63E8 \ - 0x63EF 0x63C3 0x649D 0x63F3 0x63CA 0x63E0 0x63F6 0x63D5 \ - 0x63F2 0x63F5 0x6461 0x63DF 0x63BE 0x63DD 0x63DC 0x63C4 \ - 0x63D8 0x63D3 0x63C2 0x63C7 0x63CC 0x63CB 0x63C8 0x63F0 \ - 0x63D7 0x63D9 0x6532 0x6567 0x656A 0x6564 0x655C 0x6568 \ - 0x6565 0x658C 0x659D 0x659E 0x65AE 0x65D0 0x65D2 0x667C \ - 0x666C 0x667B 0x6680 0x6671 0x6679 0x666A 0x6672 0x6701 \ - 0x690C 0x68D3 0x6904 0x68DC 0x692A 0x68EC 0x68EA 0x68F1 \ - 0x690F 0x68D6 0x68F7 0x68EB 0x68E4 0x68F6 0x6913 0x6910 \ - 0x68F3 0x68E1 0x6907 0x68CC 0x6908 0x6970 0x68B4 0x6911 \ - 0x68EF 0x68C6 0x6914 0x68F8 0x68D0 0x68FD 0x68FC 0x68E8 \ - 0x690B 0x690A 0x6917 0x68CE 0x68C8 0x68DD 0x68DE 0x68E6 \ - 0x68F4 0x68D1 0x6906 0x68D4 0x68E9 0x6915 0x6925 0x68C7 \ - 0x6B39 0x6B3B 0x6B3F 0x6B3C 0x6B94 0x6B97 0x6B99 0x6B95 \ - 0x6BBD 0x6BF0 0x6BF2 0x6BF3 0x6C30 0x6DFC 0x6E46 0x6E47 \ - 0x6E1F 0x6E49 0x6E88 0x6E3C 0x6E3D 0x6E45 0x6E62 0x6E2B \ - 0x6E3F 0x6E41 0x6E5D 0x6E73 0x6E1C 0x6E33 0x6E4B 0x6E40 \ - 0x6E51 0x6E3B 0x6E03 0x6E2E 0x6E5E 0x6E68 0x6E5C 0x6E61 \ - 0x6E31 0x6E28 0x6E60 0x6E71 0x6E6B 0x6E39 0x6E22 0x6E30 -36 0x6E53 0x6E65 0x6E27 0x6E78 0x6E64 0x6E77 0x6E55 0x6E79 \ - 0x6E52 0x6E66 0x6E35 0x6E36 0x6E5A 0x7120 0x711E 0x712F \ - 0x70FB 0x712E 0x7131 0x7123 0x7125 0x7122 0x7132 0x711F \ - 0x7128 0x713A 0x711B 0x724B 0x725A 0x7288 0x7289 0x7286 \ - 0x7285 0x728B 0x7312 0x730B 0x7330 0x7322 0x7331 0x7333 \ - 0x7327 0x7332 0x732D 0x7326 0x7323 0x7335 0x730C 0x742E \ - 0x742C 0x7430 0x742B 0x7416 0x741A 0x7421 0x742D 0x7431 \ - 0x7424 0x7423 0x741D 0x7429 0x7420 0x7432 0x74FB 0x752F \ - 0x756F 0x756C 0x75E7 0x75DA 0x75E1 0x75E6 0x75DD 0x75DF \ - 0x75E4 0x75D7 0x7695 0x7692 0x76DA 0x7746 0x7747 0x7744 \ - 0x774D 0x7745 0x774A 0x774E 0x774B 0x774C 0x77DE 0x77EC \ - 0x7860 0x7864 0x7865 0x785C 0x786D 0x7871 0x786A 0x786E \ - 0x7870 0x7869 0x7868 0x785E 0x7862 0x7974 0x7973 0x7972 \ - 0x7970 0x7A02 0x7A0A 0x7A03 0x7A0C 0x7A04 0x7A99 0x7AE6 \ - 0x7AE4 0x7B4A 0x7B3B 0x7B44 0x7B48 0x7B4C 0x7B4E 0x7B40 \ - 0x7B58 0x7B45 0x7CA2 0x7C9E 0x7CA8 0x7CA1 0x7D58 0x7D6F \ - 0x7D63 0x7D53 0x7D56 0x7D67 0x7D6A 0x7D4F 0x7D6D 0x7D5C \ - 0x7D6B 0x7D52 0x7D54 0x7D69 0x7D51 0x7D5F 0x7D4E 0x7F3E \ - 0x7F3F 0x7F65 0x7F66 0x7FA2 0x7FA0 0x7FA1 0x7FD7 0x8051 \ - 0x804F 0x8050 0x80FE 0x80D4 0x8143 0x814A 0x8152 0x814F \ - 0x8147 0x813D 0x814D 0x813A 0x81E6 0x81EE 0x81F7 0x81F8 \ - 0x81F9 0x8204 0x823C 0x823D 0x823F 0x8275 0x833B 0x83CF \ - 0x83F9 0x8423 0x83C0 0x83E8 0x8412 0x83E7 0x83E4 0x83FC \ - 0x83F6 0x8410 0x83C6 0x83C8 0x83EB 0x83E3 0x83BF 0x8401 \ - 0x83DD 0x83E5 0x83D8 0x83FF 0x83E1 0x83CB 0x83CE 0x83D6 \ - 0x83F5 0x83C9 0x8409 0x840F 0x83DE 0x8411 0x8406 0x83C2 \ - 0x83F3 0x83D5 0x83FA 0x83C7 0x83D1 0x83EA 0x8413 0x83C3 \ - 0x83EC 0x83EE 0x83C4 0x83FB 0x83D7 0x83E2 0x841B 0x83DB \ - 0x83FE 0x86D8 0x86E2 0x86E6 0x86D3 0x86E3 0x86DA 0x86EA \ - 0x86DD 0x86EB 0x86DC 0x86EC 0x86E9 0x86D7 0x86E8 0x86D1 \ - 0x8848 0x8856 0x8855 0x88BA 0x88D7 0x88B9 0x88B8 0x88C0 \ - 0x88BE 0x88B6 0x88BC 0x88B7 0x88BD 0x88B2 0x8901 0x88C9 -37 0x8995 0x8998 0x8997 0x89DD 0x89DA 0x89DB 0x8A4E 0x8A4D \ - 0x8A39 0x8A59 0x8A40 0x8A57 0x8A58 0x8A44 0x8A45 0x8A52 \ - 0x8A48 0x8A51 0x8A4A 0x8A4C 0x8A4F 0x8C5F 0x8C81 0x8C80 \ - 0x8CBA 0x8CBE 0x8CB0 0x8CB9 0x8CB5 0x8D84 0x8D80 0x8D89 \ - 0x8DD8 0x8DD3 0x8DCD 0x8DC7 0x8DD6 0x8DDC 0x8DCF 0x8DD5 \ - 0x8DD9 0x8DC8 0x8DD7 0x8DC5 0x8EEF 0x8EF7 0x8EFA 0x8EF9 \ - 0x8EE6 0x8EEE 0x8EE5 0x8EF5 0x8EE7 0x8EE8 0x8EF6 0x8EEB \ - 0x8EF1 0x8EEC 0x8EF4 0x8EE9 0x902D 0x9034 0x902F 0x9106 \ - 0x912C 0x9104 0x90FF 0x90FC 0x9108 0x90F9 0x90FB 0x9101 \ - 0x9100 0x9107 0x9105 0x9103 0x9161 0x9164 0x915F 0x9162 \ - 0x9160 0x9201 0x920A 0x9225 0x9203 0x921A 0x9226 0x920F \ - 0x920C 0x9200 0x9212 0x91FF 0x91FD 0x9206 0x9204 0x9227 \ - 0x9202 0x921C 0x9224 0x9219 0x9217 0x9205 0x9216 0x957B \ - 0x958D 0x958C 0x9590 0x9687 0x967E 0x9688 0x9689 0x9683 \ - 0x9680 0x96C2 0x96C8 0x96C3 0x96F1 0x96F0 0x976C 0x9770 \ - 0x976E 0x9807 0x98A9 0x98EB 0x9CE6 0x9EF9 0x4E83 0x4E84 \ - 0x4EB6 0x50BD 0x50BF 0x50C6 0x50AE 0x50C4 0x50CA 0x50B4 \ - 0x50C8 0x50C2 0x50B0 0x50C1 0x50BA 0x50B1 0x50CB 0x50C9 \ - 0x50B6 0x50B8 0x51D7 0x527A 0x5278 0x527B 0x527C 0x55C3 \ - 0x55DB 0x55CC 0x55D0 0x55CB 0x55CA 0x55DD 0x55C0 0x55D4 \ - 0x55C4 0x55E9 0x55BF 0x55D2 0x558D 0x55CF 0x55D5 0x55E2 \ - 0x55D6 0x55C8 0x55F2 0x55CD 0x55D9 0x55C2 0x5714 0x5853 \ - 0x5868 0x5864 0x584F 0x584D 0x5849 0x586F 0x5855 0x584E \ - 0x585D 0x5859 0x5865 0x585B 0x583D 0x5863 0x5871 0x58FC \ - 0x5AC7 0x5AC4 0x5ACB 0x5ABA 0x5AB8 0x5AB1 0x5AB5 0x5AB0 \ - 0x5ABF 0x5AC8 0x5ABB 0x5AC6 0x5AB7 0x5AC0 0x5ACA 0x5AB4 \ - 0x5AB6 0x5ACD 0x5AB9 0x5A90 0x5BD6 0x5BD8 0x5BD9 0x5C1F \ - 0x5C33 0x5D71 0x5D63 0x5D4A 0x5D65 0x5D72 0x5D6C 0x5D5E \ - 0x5D68 0x5D67 0x5D62 0x5DF0 0x5E4F 0x5E4E 0x5E4A 0x5E4D \ - 0x5E4B 0x5EC5 0x5ECC 0x5EC6 0x5ECB 0x5EC7 0x5F40 0x5FAF \ - 0x5FAD 0x60F7 0x6149 0x614A 0x612B 0x6145 0x6136 0x6132 \ - 0x612E 0x6146 0x612F 0x614F 0x6129 0x6140 0x6220 0x9168 -38 0x6223 0x6225 0x6224 0x63C5 0x63F1 0x63EB 0x6410 0x6412 \ - 0x6409 0x6420 0x6424 0x6433 0x6443 0x641F 0x6415 0x6418 \ - 0x6439 0x6437 0x6422 0x6423 0x640C 0x6426 0x6430 0x6428 \ - 0x6441 0x6435 0x642F 0x640A 0x641A 0x6440 0x6425 0x6427 \ - 0x640B 0x63E7 0x641B 0x642E 0x6421 0x640E 0x656F 0x6592 \ - 0x65D3 0x6686 0x668C 0x6695 0x6690 0x668B 0x668A 0x6699 \ - 0x6694 0x6678 0x6720 0x6966 0x695F 0x6938 0x694E 0x6962 \ - 0x6971 0x693F 0x6945 0x696A 0x6939 0x6942 0x6957 0x6959 \ - 0x697A 0x6948 0x6949 0x6935 0x696C 0x6933 0x693D 0x6965 \ - 0x68F0 0x6978 0x6934 0x6969 0x6940 0x696F 0x6944 0x6976 \ - 0x6958 0x6941 0x6974 0x694C 0x693B 0x694B 0x6937 0x695C \ - 0x694F 0x6951 0x6932 0x6952 0x692F 0x697B 0x693C 0x6B46 \ - 0x6B45 0x6B43 0x6B42 0x6B48 0x6B41 0x6B9B 0xFA0D 0x6BFB \ - 0x6BFC 0x6BF9 0x6BF7 0x6BF8 0x6E9B 0x6ED6 0x6EC8 0x6E8F \ - 0x6EC0 0x6E9F 0x6E93 0x6E94 0x6EA0 0x6EB1 0x6EB9 0x6EC6 \ - 0x6ED2 0x6EBD 0x6EC1 0x6E9E 0x6EC9 0x6EB7 0x6EB0 0x6ECD \ - 0x6EA6 0x6ECF 0x6EB2 0x6EBE 0x6EC3 0x6EDC 0x6ED8 0x6E99 \ - 0x6E92 0x6E8E 0x6E8D 0x6EA4 0x6EA1 0x6EBF 0x6EB3 0x6ED0 \ - 0x6ECA 0x6E97 0x6EAE 0x6EA3 0x7147 0x7154 0x7152 0x7163 \ - 0x7160 0x7141 0x715D 0x7162 0x7172 0x7178 0x716A 0x7161 \ - 0x7142 0x7158 0x7143 0x714B 0x7170 0x715F 0x7150 0x7153 \ - 0x7144 0x714D 0x715A 0x724F 0x728D 0x728C 0x7291 0x7290 \ - 0x728E 0x733C 0x7342 0x733B 0x733A 0x7340 0x734A 0x7349 \ - 0x7444 0x744A 0x744B 0x7452 0x7451 0x7457 0x7440 0x744F \ - 0x7450 0x744E 0x7442 0x7446 0x744D 0x7454 0x74E1 0x74FF \ - 0x74FE 0x74FD 0x751D 0x7579 0x7577 0x6983 0x75EF 0x760F \ - 0x7603 0x75F7 0x75FE 0x75FC 0x75F9 0x75F8 0x7610 0x75FB \ - 0x75F6 0x75ED 0x75F5 0x75FD 0x7699 0x76B5 0x76DD 0x7755 \ - 0x775F 0x7760 0x7752 0x7756 0x775A 0x7769 0x7767 0x7754 \ - 0x7759 0x776D 0x77E0 0x7887 0x789A 0x7894 0x788F 0x7884 \ - 0x7895 0x7885 0x7886 0x78A1 0x7883 0x7879 0x7899 0x7880 \ - 0x7896 0x787B 0x797C 0x7982 0x797D 0x7979 0x7A11 0x7A18 -39 0x7A19 0x7A12 0x7A17 0x7A15 0x7A22 0x7A13 0x7A1B 0x7A10 \ - 0x7AA3 0x7AA2 0x7A9E 0x7AEB 0x7B66 0x7B64 0x7B6D 0x7B74 \ - 0x7B69 0x7B72 0x7B65 0x7B73 0x7B71 0x7B70 0x7B61 0x7B78 \ - 0x7B76 0x7B63 0x7CB2 0x7CB4 0x7CAF 0x7D88 0x7D86 0x7D80 \ - 0x7D8D 0x7D7F 0x7D85 0x7D7A 0x7D8E 0x7D7B 0x7D83 0x7D7C \ - 0x7D8C 0x7D94 0x7D84 0x7D7D 0x7D92 0x7F6D 0x7F6B 0x7F67 \ - 0x7F68 0x7F6C 0x7FA6 0x7FA5 0x7FA7 0x7FDB 0x7FDC 0x8021 \ - 0x8164 0x8160 0x8177 0x815C 0x8169 0x815B 0x8162 0x8172 \ - 0x6721 0x815E 0x8176 0x8167 0x816F 0x8144 0x8161 0x821D \ - 0x8249 0x8244 0x8240 0x8242 0x8245 0x84F1 0x843F 0x8456 \ - 0x8476 0x8479 0x848F 0x848D 0x8465 0x8451 0x8440 0x8486 \ - 0x8467 0x8430 0x844D 0x847D 0x845A 0x8459 0x8474 0x8473 \ - 0x845D 0x8507 0x845E 0x8437 0x843A 0x8434 0x847A 0x8443 \ - 0x8478 0x8432 0x8445 0x8429 0x83D9 0x844B 0x842F 0x8442 \ - 0x842D 0x845F 0x8470 0x8439 0x844E 0x844C 0x8452 0x846F \ - 0x84C5 0x848E 0x843B 0x8447 0x8436 0x8433 0x8468 0x847E \ - 0x8444 0x842B 0x8460 0x8454 0x846E 0x8450 0x870B 0x8704 \ - 0x86F7 0x870C 0x86FA 0x86D6 0x86F5 0x874D 0x86F8 0x870E \ - 0x8709 0x8701 0x86F6 0x870D 0x8705 0x88D6 0x88CB 0x88CD \ - 0x88CE 0x88DE 0x88DB 0x88DA 0x88CC 0x88D0 0x8985 0x899B \ - 0x89DF 0x89E5 0x89E4 0x89E1 0x89E0 0x89E2 0x89DC 0x89E6 \ - 0x8A76 0x8A86 0x8A7F 0x8A61 0x8A3F 0x8A77 0x8A82 0x8A84 \ - 0x8A75 0x8A83 0x8A81 0x8A74 0x8A7A 0x8C3C 0x8C4B 0x8C4A \ - 0x8C65 0x8C64 0x8C66 0x8C86 0x8C84 0x8C85 0x8CCC 0x8D68 \ - 0x8D69 0x8D91 0x8D8C 0x8D8E 0x8D8F 0x8D8D 0x8D93 0x8D94 \ - 0x8D90 0x8D92 0x8DF0 0x8DE0 0x8DEC 0x8DF1 0x8DEE 0x8DD0 \ - 0x8DE9 0x8DE3 0x8DE2 0x8DE7 0x8DF2 0x8DEB 0x8DF4 0x8F06 \ - 0x8EFF 0x8F01 0x8F00 0x8F05 0x8F07 0x8F08 0x8F02 0x8F0B \ - 0x9052 0x903F 0x9044 0x9049 0x903D 0x9110 0x910D 0x910F \ - 0x9111 0x9116 0x9114 0x910B 0x910E 0x916E 0x916F 0x9248 \ - 0x9252 0x9230 0x923A 0x9266 0x9233 0x9265 0x925E 0x9283 \ - 0x922E 0x924A 0x9246 0x926D 0x926C 0x924F 0x9260 0x9267 -40 0x926F 0x9236 0x9261 0x9270 0x9231 0x9254 0x9263 0x9250 \ - 0x9272 0x924E 0x9253 0x924C 0x9256 0x9232 0x959F 0x959C \ - 0x959E 0x959B 0x9692 0x9693 0x9691 0x9697 0x96CE 0x96FA \ - 0x96FD 0x96F8 0x96F5 0x9773 0x9777 0x9778 0x9772 0x980F \ - 0x980D 0x980E 0x98AC 0x98F6 0x98F9 0x99AF 0x99B2 0x99B0 \ - 0x99B5 0x9AAD 0x9AAB 0x9B5B 0x9CEA 0x9CED 0x9CE7 0x9E80 \ - 0x9EFD 0x50E6 0x50D4 0x50D7 0x50E8 0x50F3 0x50DB 0x50EA \ - 0x50DD 0x50E4 0x50D3 0x50EC 0x50F0 0x50EF 0x50E3 0x50E0 \ - 0x51D8 0x5280 0x5281 0x52E9 0x52EB 0x5330 0x53AC 0x5627 \ - 0x5615 0x560C 0x5612 0x55FC 0x560F 0x561C 0x5601 0x5613 \ - 0x5602 0x55FA 0x561D 0x5604 0x55FF 0x55F9 0x5889 0x587C \ - 0x5890 0x5898 0x5886 0x5881 0x587F 0x5874 0x588B 0x587A \ - 0x5887 0x5891 0x588E 0x5876 0x5882 0x5888 0x587B 0x5894 \ - 0x588F 0x58FE 0x596B 0x5ADC 0x5AEE 0x5AE5 0x5AD5 0x5AEA \ - 0x5ADA 0x5AED 0x5AEB 0x5AF3 0x5AE2 0x5AE0 0x5ADB 0x5AEC \ - 0x5ADE 0x5ADD 0x5AD9 0x5AE8 0x5ADF 0x5B77 0x5BE0 0x5BE3 \ - 0x5C63 0x5D82 0x5D80 0x5D7D 0x5D86 0x5D7A 0x5D81 0x5D77 \ - 0x5D8A 0x5D89 0x5D88 0x5D7E 0x5D7C 0x5D8D 0x5D79 0x5D7F \ - 0x5E58 0x5E59 0x5E53 0x5ED8 0x5ED1 0x5ED7 0x5ECE 0x5EDC \ - 0x5ED5 0x5ED9 0x5ED2 0x5ED4 0x5F44 0x5F43 0x5F6F 0x5FB6 \ - 0x612C 0x6128 0x6141 0x615E 0x6171 0x6173 0x6152 0x6153 \ - 0x6172 0x616C 0x6180 0x6174 0x6154 0x617A 0x615B 0x6165 \ - 0x613B 0x616A 0x6161 0x6156 0x6229 0x6227 0x622B 0x642B \ - 0x644D 0x645B 0x645D 0x6474 0x6476 0x6472 0x6473 0x647D \ - 0x6475 0x6466 0x64A6 0x644E 0x6482 0x645E 0x645C 0x644B \ - 0x6453 0x6460 0x6450 0x647F 0x643F 0x646C 0x646B 0x6459 \ - 0x6465 0x6477 0x6573 0x65A0 0x66A1 0x66A0 0x669F 0x6705 \ - 0x6704 0x6722 0x69B1 0x69B6 0x69C9 0x69A0 0x69CE 0x6996 \ - 0x69B0 0x69AC 0x69BC 0x6991 0x6999 0x698E 0x69A7 0x698D \ - 0x69A9 0x69BE 0x69AF 0x69BF 0x69C4 0x69BD 0x69A4 0x69D4 \ - 0x69B9 0x69CA 0x699A 0x69CF 0x69B3 0x6993 0x69AA 0x69A1 \ - 0x699E 0x69D9 0x6997 0x6990 0x69C2 0x69B5 0x69A5 0x69C6 -41 0x6B4A 0x6B4D 0x6B4B 0x6B9E 0x6B9F 0x6BA0 0x6BC3 0x6BC4 \ - 0x6BFE 0x6ECE 0x6EF5 0x6EF1 0x6F03 0x6F25 0x6EF8 0x6F37 \ - 0x6EFB 0x6F2E 0x6F09 0x6F4E 0x6F19 0x6F1A 0x6F27 0x6F18 \ - 0x6F3B 0x6F12 0x6EED 0x6F0A 0x6F36 0x6F73 0x6EF9 0x6EEE \ - 0x6F2D 0x6F40 0x6F30 0x6F3C 0x6F35 0x6EEB 0x6F07 0x6F0E \ - 0x6F43 0x6F05 0x6EFD 0x6EF6 0x6F39 0x6F1C 0x6EFC 0x6F3A \ - 0x6F1F 0x6F0D 0x6F1E 0x6F08 0x6F21 0x7187 0x7190 0x7189 \ - 0x7180 0x7185 0x7182 0x718F 0x717B 0x7186 0x7181 0x7197 \ - 0x7244 0x7253 0x7297 0x7295 0x7293 0x7343 0x734D 0x7351 \ - 0x734C 0x7462 0x7473 0x7471 0x7475 0x7472 0x7467 0x746E \ - 0x7500 0x7502 0x7503 0x757D 0x7590 0x7616 0x7608 0x760C \ - 0x7615 0x7611 0x760A 0x7614 0x76B8 0x7781 0x777C 0x7785 \ - 0x7782 0x776E 0x7780 0x776F 0x777E 0x7783 0x78B2 0x78AA \ - 0x78B4 0x78AD 0x78A8 0x787E 0x78AB 0x789E 0x78A5 0x78A0 \ - 0x78AC 0x78A2 0x78A4 0x7998 0x798A 0x798B 0x7996 0x7995 \ - 0x7994 0x7993 0x7997 0x7988 0x7992 0x7990 0x7A2B 0x7A4A \ - 0x7A30 0x7A2F 0x7A28 0x7A26 0x7AA8 0x7AAB 0x7AAC 0x7AEE \ - 0x7B88 0x7B9C 0x7B8A 0x7B91 0x7B90 0x7B96 0x7B8D 0x7B8C \ - 0x7B9B 0x7B8E 0x7B85 0x7B98 0x5284 0x7B99 0x7BA4 0x7B82 \ - 0x7CBB 0x7CBF 0x7CBC 0x7CBA 0x7DA7 0x7DB7 0x7DC2 0x7DA3 \ - 0x7DAA 0x7DC1 0x7DC0 0x7DC5 0x7D9D 0x7DCE 0x7DC4 0x7DC6 \ - 0x7DCB 0x7DCC 0x7DAF 0x7DB9 0x7D96 0x7DBC 0x7D9F 0x7DA6 \ - 0x7DAE 0x7DA9 0x7DA1 0x7DC9 0x7F73 0x7FE2 0x7FE3 0x7FE5 \ - 0x7FDE 0x8024 0x805D 0x805C 0x8189 0x8186 0x8183 0x8187 \ - 0x818D 0x818C 0x818B 0x8215 0x8497 0x84A4 0x84A1 0x849F \ - 0x84BA 0x84CE 0x84C2 0x84AC 0x84AE 0x84AB 0x84B9 0x84B4 \ - 0x84C1 0x84CD 0x84AA 0x849A 0x84B1 0x84D0 0x849D 0x84A7 \ - 0x84BB 0x84A2 0x8494 0x84C7 0x84CC 0x849B 0x84A9 0x84AF \ - 0x84A8 0x84D6 0x8498 0x84B6 0x84CF 0x84A0 0x84D7 0x84D4 \ - 0x84D2 0x84DB 0x84B0 0x8491 0x8661 0x8733 0x8723 0x8728 \ - 0x876B 0x8740 0x872E 0x871E 0x8721 0x8719 0x871B 0x8743 \ - 0x872C 0x8741 0x873E 0x8746 0x8720 0x8732 0x872A 0x872D -42 0x873C 0x8712 0x873A 0x8731 0x8735 0x8742 0x8726 0x8727 \ - 0x8738 0x8724 0x871A 0x8730 0x8711 0x88F7 0x88E7 0x88F1 \ - 0x88F2 0x88FA 0x88FE 0x88EE 0x88FC 0x88F6 0x88FB 0x88F0 \ - 0x88EC 0x88EB 0x899D 0x89A1 0x899F 0x899E 0x89E9 0x89EB \ - 0x89E8 0x8AAB 0x8A99 0x8A8B 0x8A92 0x8A8F 0x8A96 0x8C3D \ - 0x8C68 0x8C69 0x8CD5 0x8CCF 0x8CD7 0x8D96 0x8E09 0x8E02 \ - 0x8DFF 0x8E0D 0x8DFD 0x8E0A 0x8E03 0x8E07 0x8E06 0x8E05 \ - 0x8DFE 0x8E00 0x8E04 0x8F10 0x8F11 0x8F0E 0x8F0D 0x9123 \ - 0x911C 0x9120 0x9122 0x911F 0x911D 0x911A 0x9124 0x9121 \ - 0x911B 0x917A 0x9172 0x9179 0x9173 0x92A5 0x92A4 0x9276 \ - 0x929B 0x927A 0x92A0 0x9294 0x92AA 0x928D 0x92A6 0x929A \ - 0x92AB 0x9279 0x9297 0x927F 0x92A3 0x92EE 0x928E 0x9282 \ - 0x9295 0x92A2 0x927D 0x9288 0x92A1 0x928A 0x9286 0x928C \ - 0x9299 0x92A7 0x927E 0x9287 0x92A9 0x929D 0x928B 0x922D \ - 0x969E 0x96A1 0x96FF 0x9758 0x977D 0x977A 0x977E 0x9783 \ - 0x9780 0x9782 0x977B 0x9784 0x9781 0x977F 0x97CE 0x97CD \ - 0x9816 0x98AD 0x98AE 0x9902 0x9900 0x9907 0x999D 0x999C \ - 0x99C3 0x99B9 0x99BB 0x99BA 0x99C2 0x99BD 0x99C7 0x9AB1 \ - 0x9AE3 0x9AE7 0x9B3E 0x9B3F 0x9B60 0x9B61 0x9B5F 0x9CF1 \ - 0x9CF2 0x9CF5 0x9EA7 0x50FF 0x5103 0x5130 0x50F8 0x5106 \ - 0x5107 0x50F6 0x50FE 0x510B 0x510C 0x50FD 0x510A 0x528B \ - 0x528C 0x52F1 0x52EF 0x5648 0x5642 0x564C 0x5635 0x5641 \ - 0x564A 0x5649 0x5646 0x5658 0x565A 0x5640 0x5633 0x563D \ - 0x562C 0x563E 0x5638 0x562A 0x563A 0x571A 0x58AB 0x589D \ - 0x58B1 0x58A0 0x58A3 0x58AF 0x58AC 0x58A5 0x58A1 0x58FF \ - 0x5AFF 0x5AF4 0x5AFD 0x5AF7 0x5AF6 0x5B03 0x5AF8 0x5B02 \ - 0x5AF9 0x5B01 0x5B07 0x5B05 0x5B0F 0x5C67 0x5D99 0x5D97 \ - 0x5D9F 0x5D92 0x5DA2 0x5D93 0x5D95 0x5DA0 0x5D9C 0x5DA1 \ - 0x5D9A 0x5D9E 0x5E69 0x5E5D 0x5E60 0x5E5C 0x7DF3 0x5EDB \ - 0x5EDE 0x5EE1 0x5F49 0x5FB2 0x618B 0x6183 0x6179 0x61B1 \ - 0x61B0 0x61A2 0x6189 0x619B 0x6193 0x61AF 0x61AD 0x619F \ - 0x6192 0x61AA 0x61A1 0x618D 0x6166 0x61B3 0x622D 0x646E -43 0x6470 0x6496 0x64A0 0x6485 0x6497 0x649C 0x648F 0x648B \ - 0x648A 0x648C 0x64A3 0x649F 0x6468 0x64B1 0x6498 0x6576 \ - 0x657A 0x6579 0x657B 0x65B2 0x65B3 0x66B5 0x66B0 0x66A9 \ - 0x66B2 0x66B7 0x66AA 0x66AF 0x6A00 0x6A06 0x6A17 0x69E5 \ - 0x69F8 0x6A15 0x69F1 0x69E4 0x6A20 0x69FF 0x69EC 0x69E2 \ - 0x6A1B 0x6A1D 0x69FE 0x6A27 0x69F2 0x69EE 0x6A14 0x69F7 \ - 0x69E7 0x6A40 0x6A08 0x69E6 0x69FB 0x6A0D 0x69FC 0x69EB \ - 0x6A09 0x6A04 0x6A18 0x6A25 0x6A0F 0x69F6 0x6A26 0x6A07 \ - 0x69F4 0x6A16 0x6B51 0x6BA5 0x6BA3 0x6BA2 0x6BA6 0x6C01 \ - 0x6C00 0x6BFF 0x6C02 0x6F41 0x6F26 0x6F7E 0x6F87 0x6FC6 \ - 0x6F92 0x6F8D 0x6F89 0x6F8C 0x6F62 0x6F4F 0x6F85 0x6F5A \ - 0x6F96 0x6F76 0x6F6C 0x6F82 0x6F55 0x6F72 0x6F52 0x6F50 \ - 0x6F57 0x6F94 0x6F93 0x6F5D 0x6F00 0x6F61 0x6F6B 0x6F7D \ - 0x6F67 0x6F90 0x6F53 0x6F8B 0x6F69 0x6F7F 0x6F95 0x6F63 \ - 0x6F77 0x6F6A 0x6F7B 0x71B2 0x71AF 0x719B 0x71B0 0x71A0 \ - 0x719A 0x71A9 0x71B5 0x719D 0x71A5 0x719E 0x71A4 0x71A1 \ - 0x71AA 0x719C 0x71A7 0x71B3 0x7298 0x729A 0x7358 0x7352 \ - 0x735E 0x735F 0x7360 0x735D 0x735B 0x7361 0x735A 0x7359 \ - 0x7362 0x7487 0x7489 0x748A 0x7486 0x7481 0x747D 0x7485 \ - 0x7488 0x747C 0x7479 0x7508 0x7507 0x757E 0x7625 0x761E \ - 0x7619 0x761D 0x761C 0x7623 0x761A 0x7628 0x761B 0x769C \ - 0x769D 0x769E 0x769B 0x778D 0x778F 0x7789 0x7788 0x78CD \ - 0x78BB 0x78CF 0x78CC 0x78D1 0x78CE 0x78D4 0x78C8 0x78C3 \ - 0x78C4 0x78C9 0x799A 0x79A1 0x79A0 0x799C 0x79A2 0x799B \ - 0x6B76 0x7A39 0x7AB2 0x7AB4 0x7AB3 0x7BB7 0x7BCB 0x7BBE \ - 0x7BAC 0x7BCE 0x7BAF 0x7BB9 0x7BCA 0x7BB5 0x7CC5 0x7CC8 \ - 0x7CCC 0x7CCB 0x7DF7 0x7DDB 0x7DEA 0x7DE7 0x7DD7 0x7DE1 \ - 0x7E03 0x7DFA 0x7DE6 0x7DF6 0x7DF1 0x7DF0 0x7DEE 0x7DDF \ - 0x7F76 0x7FAC 0x7FB0 0x7FAD 0x7FED 0x7FEB 0x7FEA 0x7FEC \ - 0x7FE6 0x7FE8 0x8064 0x8067 0x81A3 0x819F 0x819E 0x8195 \ - 0x81A2 0x8199 0x8197 0x8216 0x824F 0x8253 0x8252 0x8250 \ - 0x824E 0x8251 0x8524 0x853B 0x850F 0x8500 0x8529 0x850E -44 0x8509 0x850D 0x851F 0x850A 0x8527 0x851C 0x84FB 0x852B \ - 0x84FA 0x8508 0x850C 0x84F4 0x852A 0x84F2 0x8515 0x84F7 \ - 0x84EB 0x84F3 0x84FC 0x8512 0x84EA 0x84E9 0x8516 0x84FE \ - 0x8528 0x851D 0x852E 0x8502 0x84FD 0x851E 0x84F6 0x8531 \ - 0x8526 0x84E7 0x84E8 0x84F0 0x84EF 0x84F9 0x8518 0x8520 \ - 0x8530 0x850B 0x8519 0x852F 0x8662 0x8756 0x8763 0x8764 \ - 0x8777 0x87E1 0x8773 0x8758 0x8754 0x875B 0x8752 0x8761 \ - 0x875A 0x8751 0x875E 0x876D 0x876A 0x8750 0x874E 0x875F \ - 0x875D 0x876F 0x876C 0x877A 0x876E 0x875C 0x8765 0x874F \ - 0x877B 0x8775 0x8762 0x8767 0x8769 0x885A 0x8905 0x890C \ - 0x8914 0x890B 0x8917 0x8918 0x8919 0x8906 0x8916 0x8911 \ - 0x890E 0x8909 0x89A2 0x89A4 0x89A3 0x89ED 0x89F0 0x89EC \ - 0x8ACF 0x8AC6 0x8AB8 0x8AD3 0x8AD1 0x8AD4 0x8AD5 0x8ABB \ - 0x8AD7 0x8ABE 0x8AC0 0x8AC5 0x8AD8 0x8AC3 0x8ABA 0x8ABD \ - 0x8AD9 0x8C3E 0x8C4D 0x8C8F 0x8CE5 0x8CDF 0x8CD9 0x8CE8 \ - 0x8CDA 0x8CDD 0x8CE7 0x8DA0 0x8D9C 0x8DA1 0x8D9B 0x8E20 \ - 0x8E23 0x8E25 0x8E24 0x8E2E 0x8E15 0x8E1B 0x8E16 0x8E11 \ - 0x8E19 0x8E26 0x8E27 0x8E14 0x8E12 0x8E18 0x8E13 0x8E1C \ - 0x8E17 0x8E1A 0x8F2C 0x8F24 0x8F18 0x8F1A 0x8F20 0x8F23 \ - 0x8F16 0x8F17 0x9073 0x9070 0x906F 0x9067 0x906B 0x912F \ - 0x912B 0x9129 0x912A 0x9132 0x9126 0x912E 0x9185 0x9186 \ - 0x918A 0x9181 0x9182 0x9184 0x9180 0x92D0 0x92C3 0x92C4 \ - 0x92C0 0x92D9 0x92B6 0x92CF 0x92F1 0x92DF 0x92D8 0x92E9 \ - 0x92D7 0x92DD 0x92CC 0x92EF 0x92C2 0x92E8 0x92CA 0x92C8 \ - 0x92CE 0x92E6 0x92CD 0x92D5 0x92C9 0x92E0 0x92DE 0x92E7 \ - 0x92D1 0x92D3 0x92B5 0x92E1 0x92C6 0x92B4 0x957C 0x95AC \ - 0x95AB 0x95AE 0x95B0 0x96A4 0x96A2 0x96D3 0x9705 0x9708 \ - 0x9702 0x975A 0x978A 0x978E 0x9788 0x97D0 0x97CF 0x981E \ - 0x981D 0x9826 0x9829 0x9828 0x9820 0x981B 0x9827 0x98B2 \ - 0x9908 0x98FA 0x9911 0x9914 0x9916 0x9917 0x9915 0x99DC \ - 0x99CD 0x99CF 0x99D3 0x99D4 0x99CE 0x99C9 0x99D6 0x99D8 \ - 0x99CB 0x99D7 0x99CC 0x9AB3 0x9AEC 0x9AEB 0x9AF3 0x9AF2 -45 0x9AF1 0x9B46 0x9B43 0x9B67 0x9B74 0x9B71 0x9B66 0x9B76 \ - 0x9B75 0x9B70 0x9B68 0x9B64 0x9B6C 0x9CFC 0x9CFA 0x9CFD \ - 0x9CFF 0x9CF7 0x9D07 0x9D00 0x9CF9 0x9CFB 0x9D08 0x9D05 \ - 0x9D04 0x9E83 0x9ED3 0x9F0F 0x9F10 0x511C 0x5113 0x5117 \ - 0x511A 0x5111 0x51DE 0x5334 0x53E1 0x5670 0x5660 0x566E \ - 0x5673 0x5666 0x5663 0x566D 0x5672 0x565E 0x5677 0x571C \ - 0x571B 0x58C8 0x58BD 0x58C9 0x58BF 0x58BA 0x58C2 0x58BC \ - 0x58C6 0x5B17 0x5B19 0x5B1B 0x5B21 0x5B14 0x5B13 0x5B10 \ - 0x5B16 0x5B28 0x5B1A 0x5B20 0x5B1E 0x5BEF 0x5DAC 0x5DB1 \ - 0x5DA9 0x5DA7 0x5DB5 0x5DB0 0x5DAE 0x5DAA 0x5DA8 0x5DB2 \ - 0x5DAD 0x5DAF 0x5DB4 0x5E67 0x5E68 0x5E66 0x5E6F 0x5EE9 \ - 0x5EE7 0x5EE6 0x5EE8 0x5EE5 0x5F4B 0x5FBC 0x619D 0x61A8 \ - 0x6196 0x61C5 0x61B4 0x61C6 0x61C1 0x61CC 0x61BA 0x61BF \ - 0x61B8 0x618C 0x64D7 0x64D6 0x64D0 0x64CF 0x64C9 0x64BD \ - 0x6489 0x64C3 0x64DB 0x64F3 0x64D9 0x6533 0x657F 0x657C \ - 0x65A2 0x66C8 0x66BE 0x66C0 0x66CA 0x66CB 0x66CF 0x66BD \ - 0x66BB 0x66BA 0x66CC 0x6723 0x6A34 0x6A66 0x6A49 0x6A67 \ - 0x6A32 0x6A68 0x6A3E 0x6A5D 0x6A6D 0x6A76 0x6A5B 0x6A51 \ - 0x6A28 0x6A5A 0x6A3B 0x6A3F 0x6A41 0x6A6A 0x6A64 0x6A50 \ - 0x6A4F 0x6A54 0x6A6F 0x6A69 0x6A60 0x6A3C 0x6A5E 0x6A56 \ - 0x6A55 0x6A4D 0x6A4E 0x6A46 0x6B55 0x6B54 0x6B56 0x6BA7 \ - 0x6BAA 0x6BAB 0x6BC8 0x6BC7 0x6C04 0x6C03 0x6C06 0x6FAD \ - 0x6FCB 0x6FA3 0x6FC7 0x6FBC 0x6FCE 0x6FC8 0x6F5E 0x6FC4 \ - 0x6FBD 0x6F9E 0x6FCA 0x6FA8 0x7004 0x6FA5 0x6FAE 0x6FBA \ - 0x6FAC 0x6FAA 0x6FCF 0x6FBF 0x6FB8 0x6FA2 0x6FC9 0x6FAB \ - 0x6FCD 0x6FAF 0x6FB2 0x6FB0 0x71C5 0x71C2 0x71BF 0x71B8 \ - 0x71D6 0x71C0 0x71C1 0x71CB 0x71D4 0x71CA 0x71C7 0x71CF \ - 0x71BD 0x71D8 0x71BC 0x71C6 0x71DA 0x71DB 0x729D 0x729E \ - 0x7369 0x7366 0x7367 0x736C 0x7365 0x736B 0x736A 0x747F \ - 0x749A 0x74A0 0x7494 0x7492 0x7495 0x74A1 0x750B 0x7580 \ - 0x762F 0x762D 0x7631 0x763D 0x7633 0x763C 0x7635 0x7632 \ - 0x7630 0x76BB 0x76E6 0x779A 0x779D 0x77A1 0x779C 0x779B -46 0x77A2 0x77A3 0x7795 0x7799 0x7797 0x78DD 0x78E9 0x78E5 \ - 0x78EA 0x78DE 0x78E3 0x78DB 0x78E1 0x78E2 0x78ED 0x78DF \ - 0x78E0 0x79A4 0x7A44 0x7A48 0x7A47 0x7AB6 0x7AB8 0x7AB5 \ - 0x7AB1 0x7AB7 0x7BDE 0x7BE3 0x7BE7 0x7BDD 0x7BD5 0x7BE5 \ - 0x7BDA 0x7BE8 0x7BF9 0x7BD4 0x7BEA 0x7BE2 0x7BDC 0x7BEB \ - 0x7BD8 0x7BDF 0x7CD2 0x7CD4 0x7CD7 0x7CD0 0x7CD1 0x7E12 \ - 0x7E21 0x7E17 0x7E0C 0x7E1F 0x7E20 0x7E13 0x7E0E 0x7E1C \ - 0x7E15 0x7E1A 0x7E22 0x7E0B 0x7E0F 0x7E16 0x7E0D 0x7E14 \ - 0x7E25 0x7E24 0x7F43 0x7F7B 0x7F7C 0x7F7A 0x7FB1 0x7FEF \ - 0x802A 0x8029 0x806C 0x81B1 0x81A6 0x81AE 0x81B9 0x81B5 \ - 0x81AB 0x81B0 0x81AC 0x81B4 0x81B2 0x81B7 0x81A7 0x81F2 \ - 0x8255 0x8256 0x8257 0x8556 0x8545 0x856B 0x854D 0x8553 \ - 0x8561 0x8558 0x8540 0x8546 0x8564 0x8541 0x8562 0x8544 \ - 0x8551 0x8547 0x8563 0x853E 0x855B 0x8571 0x854E 0x856E \ - 0x8575 0x8555 0x8567 0x8560 0x858C 0x8566 0x855D 0x8554 \ - 0x8565 0x856C 0x8663 0x8665 0x8664 0x879B 0x878F 0x8797 \ - 0x8793 0x8792 0x8788 0x8781 0x8796 0x8798 0x8779 0x8787 \ - 0x87A3 0x8785 0x8790 0x8791 0x879D 0x8784 0x8794 0x879C \ - 0x879A 0x8789 0x891E 0x8926 0x8930 0x892D 0x892E 0x8927 \ - 0x8931 0x8922 0x8929 0x8923 0x892F 0x892C 0x891F 0x89F1 \ - 0x8AE0 0x8AE2 0x8AF2 0x8AF4 0x8AF5 0x8ADD 0x8B14 0x8AE4 \ - 0x8ADF 0x8AF0 0x8AC8 0x8ADE 0x8AE1 0x8AE8 0x8AFF 0x8AEF \ - 0x8AFB 0x8C91 0x8C92 0x8C90 0x8CF5 0x8CEE 0x8CF1 0x8CF0 \ - 0x8CF3 0x8D6C 0x8D6E 0x8DA5 0x8DA7 0x8E33 0x8E3E 0x8E38 \ - 0x8E40 0x8E45 0x8E36 0x8E3C 0x8E3D 0x8E41 0x8E30 0x8E3F \ - 0x8EBD 0x8F36 0x8F2E 0x8F35 0x8F32 0x8F39 0x8F37 0x8F34 \ - 0x9076 0x9079 0x907B 0x9086 0x90FA 0x9133 0x9135 0x9136 \ - 0x9193 0x9190 0x9191 0x918D 0x918F 0x9327 0x931E 0x9308 \ - 0x931F 0x9306 0x930F 0x937A 0x9338 0x933C 0x931B 0x9323 \ - 0x9312 0x9301 0x9346 0x932D 0x930E 0x930D 0x92CB 0x931D \ - 0x92FA 0x9325 0x9313 0x92F9 0x92F7 0x9334 0x9302 0x9324 \ - 0x92FF 0x9329 0x9339 0x9335 0x932A 0x9314 0x930C 0x930B -47 0x92FE 0x9309 0x9300 0x92FB 0x9316 0x95BC 0x95CD 0x95BE \ - 0x95B9 0x95BA 0x95B6 0x95BF 0x95B5 0x95BD 0x96A9 0x96D4 \ - 0x970B 0x9712 0x9710 0x9799 0x9797 0x9794 0x97F0 0x97F8 \ - 0x9835 0x982F 0x9832 0x9924 0x991F 0x9927 0x9929 0x999E \ - 0x99EE 0x99EC 0x99E5 0x99E4 0x99F0 0x99E3 0x99EA 0x99E9 \ - 0x99E7 0x9AB9 0x9ABF 0x9AB4 0x9ABB 0x9AF6 0x9AFA 0x9AF9 \ - 0x9AF7 0x9B33 0x9B80 0x9B85 0x9B87 0x9B7C 0x9B7E 0x9B7B \ - 0x9B82 0x9B93 0x9B92 0x9B90 0x9B7A 0x9B95 0x9B7D 0x9B88 \ - 0x9D25 0x9D17 0x9D20 0x9D1E 0x9D14 0x9D29 0x9D1D 0x9D18 \ - 0x9D22 0x9D10 0x9D19 0x9D1F 0x9E88 0x9E86 0x9E87 0x9EAE \ - 0x9EAD 0x9ED5 0x9ED6 0x9EFA 0x9F12 0x9F3D 0x5126 0x5125 \ - 0x5122 0x5124 0x5120 0x5129 0x52F4 0x5693 0x568C 0x568D \ - 0x5686 0x5684 0x5683 0x567E 0x5682 0x567F 0x5681 0x58D6 \ - 0x58D4 0x58CF 0x58D2 0x5B2D 0x5B25 0x5B32 0x5B23 0x5B2C \ - 0x5B27 0x5B26 0x5B2F 0x5B2E 0x5B7B 0x5BF1 0x5BF2 0x5DB7 \ - 0x5E6C 0x5E6A 0x5FBE 0x5FBB 0x61C3 0x61B5 0x61BC 0x61E7 \ - 0x61E0 0x61E5 0x61E4 0x61E8 0x61DE 0x64EF 0x64E9 0x64E3 \ - 0x64EB 0x64E4 0x64E8 0x6581 0x6580 0x65B6 0x65DA 0x66D2 \ - 0x6A8D 0x6A96 0x6A81 0x6AA5 0x6A89 0x6A9F 0x6A9B 0x6AA1 \ - 0x6A9E 0x6A87 0x6A93 0x6A8E 0x6A95 0x6A83 0x6AA8 0x6AA4 \ - 0x6A91 0x6A7F 0x6AA6 0x6A9A 0x6A85 0x6A8C 0x6A92 0x6B5B \ - 0x6BAD 0x6C09 0x6FCC 0x6FA9 0x6FF4 0x6FD4 0x6FE3 0x6FDC \ - 0x6FED 0x6FE7 0x6FE6 0x6FDE 0x6FF2 0x6FDD 0x6FE2 0x6FE8 \ - 0x71E1 0x71F1 0x71E8 0x71F2 0x71E4 0x71F0 0x71E2 0x7373 \ - 0x736E 0x736F 0x7497 0x74B2 0x74AB 0x7490 0x74AA 0x74AD \ - 0x74B1 0x74A5 0x74AF 0x7510 0x7511 0x7512 0x750F 0x7584 \ - 0x7643 0x7648 0x7649 0x7647 0x76A4 0x76E9 0x77B5 0x77AB \ - 0x77B2 0x77B7 0x77B6 0x77B4 0x77B1 0x77A8 0x77F0 0x78F3 \ - 0x78FD 0x7902 0x78FB 0x78FC 0x78F2 0x7905 0x78F9 0x78FE \ - 0x7904 0x79AB 0x79A8 0x7A5C 0x7A5B 0x7A56 0x7A58 0x7A54 \ - 0x7A5A 0x7ABE 0x7AC0 0x7AC1 0x7C05 0x7C0F 0x7BF2 0x7C00 \ - 0x7BFF 0x7BFB 0x7C0E 0x7BF4 0x7C0B 0x7BF3 0x7C02 0x7C09 -48 0x7C03 0x7C01 0x7BF8 0x7BFD 0x7C06 0x7BF0 0x7BF1 0x7C10 \ - 0x7C0A 0x7CE8 0x7E2D 0x7E3C 0x7E42 0x7E33 0x9848 0x7E38 \ - 0x7E2A 0x7E49 0x7E40 0x7E47 0x7E29 0x7E4C 0x7E30 0x7E3B \ - 0x7E36 0x7E44 0x7E3A 0x7F45 0x7F7F 0x7F7E 0x7F7D 0x7FF4 \ - 0x7FF2 0x802C 0x81BB 0x81C4 0x81CC 0x81CA 0x81C5 0x81C7 \ - 0x81BC 0x81E9 0x825B 0x825A 0x825C 0x8583 0x8580 0x858F \ - 0x85A7 0x8595 0x85A0 0x858B 0x85A3 0x857B 0x85A4 0x859A \ - 0x859E 0x8577 0x857C 0x8589 0x85A1 0x857A 0x8578 0x8557 \ - 0x858E 0x8596 0x8586 0x858D 0x8599 0x859D 0x8581 0x85A2 \ - 0x8582 0x8588 0x8585 0x8579 0x8576 0x8598 0x8590 0x859F \ - 0x8668 0x87BE 0x87AA 0x87AD 0x87C5 0x87B0 0x87AC 0x87B9 \ - 0x87B5 0x87BC 0x87AE 0x87C9 0x87C3 0x87C2 0x87CC 0x87B7 \ - 0x87AF 0x87C4 0x87CA 0x87B4 0x87B6 0x87BF 0x87B8 0x87BD \ - 0x87DE 0x87B2 0x8935 0x8933 0x893C 0x893E 0x8941 0x8952 \ - 0x8937 0x8942 0x89AD 0x89AF 0x89AE 0x89F2 0x89F3 0x8B1E \ - 0x8B18 0x8B16 0x8B11 0x8B05 0x8B0B 0x8B22 0x8B0F 0x8B12 \ - 0x8B15 0x8B07 0x8B0D 0x8B08 0x8B06 0x8B1C 0x8B13 0x8B1A \ - 0x8C4F 0x8C70 0x8C72 0x8C71 0x8C6F 0x8C95 0x8C94 0x8CF9 \ - 0x8D6F 0x8E4E 0x8E4D 0x8E53 0x8E50 0x8E4C 0x8E47 0x8F43 \ - 0x8F40 0x9085 0x907E 0x9138 0x919A 0x91A2 0x919B 0x9199 \ - 0x919F 0x91A1 0x919D 0x91A0 0x93A1 0x9383 0x93AF 0x9364 \ - 0x9356 0x9347 0x937C 0x9358 0x935C 0x9376 0x9349 0x9350 \ - 0x9351 0x9360 0x936D 0x938F 0x934C 0x936A 0x9379 0x9357 \ - 0x9355 0x9352 0x934F 0x9371 0x9377 0x937B 0x9361 0x935E \ - 0x9363 0x9367 0x9380 0x934E 0x9359 0x95C7 0x95C0 0x95C9 \ - 0x95C3 0x95C5 0x95B7 0x96AE 0x96B0 0x96AC 0x9720 0x971F \ - 0x9718 0x971D 0x9719 0x979A 0x97A1 0x979C 0x979E 0x979D \ - 0x97D5 0x97D4 0x97F1 0x9841 0x9844 0x984A 0x9849 0x9845 \ - 0x9843 0x9925 0x992B 0x992C 0x992A 0x9933 0x9932 0x992F \ - 0x992D 0x9931 0x9930 0x9998 0x99A3 0x99A1 0x9A02 0x99FA \ - 0x99F4 0x99F7 0x99F9 0x99F8 0x99F6 0x99FB 0x99FD 0x99FE \ - 0x99FC 0x9A03 0x9ABE 0x9AFE 0x9AFD 0x9B01 0x9AFC 0x9B48 -49 0x9B9A 0x9BA8 0x9B9E 0x9B9B 0x9BA6 0x9BA1 0x9BA5 0x9BA4 \ - 0x9B86 0x9BA2 0x9BA0 0x9BAF 0x9D33 0x9D41 0x9D67 0x9D36 \ - 0x9D2E 0x9D2F 0x9D31 0x9D38 0x9D30 0x9D45 0x9D42 0x9D43 \ - 0x9D3E 0x9D37 0x9D40 0x9D3D 0x7FF5 0x9D2D 0x9E8A 0x9E89 \ - 0x9E8D 0x9EB0 0x9EC8 0x9EDA 0x9EFB 0x9EFF 0x9F24 0x9F23 \ - 0x9F22 0x9F54 0x9FA0 0x5131 0x512D 0x512E 0x5698 0x569C \ - 0x5697 0x569A 0x569D 0x5699 0x5970 0x5B3C 0x5C69 0x5C6A \ - 0x5DC0 0x5E6D 0x5E6E 0x61D8 0x61DF 0x61ED 0x61EE 0x61F1 \ - 0x61EA 0x61F0 0x61EB 0x61D6 0x61E9 0x64FF 0x6504 0x64FD \ - 0x64F8 0x6501 0x6503 0x64FC 0x6594 0x65DB 0x66DA 0x66DB \ - 0x66D8 0x6AC5 0x6AB9 0x6ABD 0x6AE1 0x6AC6 0x6ABA 0x6AB6 \ - 0x6AB7 0x6AC7 0x6AB4 0x6AAD 0x6B5E 0x6BC9 0x6C0B 0x7007 \ - 0x700C 0x700D 0x7001 0x7005 0x7014 0x700E 0x6FFF 0x7000 \ - 0x6FFB 0x7026 0x6FFC 0x6FF7 0x700A 0x7201 0x71FF 0x71F9 \ - 0x7203 0x71FD 0x7376 0x74B8 0x74C0 0x74B5 0x74C1 0x74BE \ - 0x74B6 0x74BB 0x74C2 0x7514 0x7513 0x765C 0x7664 0x7659 \ - 0x7650 0x7653 0x7657 0x765A 0x76A6 0x76BD 0x76EC 0x77C2 \ - 0x77BA 0x78FF 0x790C 0x7913 0x7914 0x7909 0x7910 0x7912 \ - 0x7911 0x79AD 0x79AC 0x7A5F 0x7C1C 0x7C29 0x7C19 0x7C20 \ - 0x7C1F 0x7C2D 0x7C1D 0x7C26 0x7C28 0x7C22 0x7C25 0x7C30 \ - 0x7E5C 0x7E50 0x7E56 0x7E63 0x7E58 0x7E62 0x7E5F 0x7E51 \ - 0x7E60 0x7E57 0x7E53 0x7FB5 0x7FB3 0x7FF7 0x7FF8 0x8075 \ - 0x81D1 0x81D2 0x81D0 0x825F 0x825E 0x85B4 0x85C6 0x85C0 \ - 0x85C3 0x85C2 0x85B3 0x85B5 0x85BD 0x85C7 0x85C4 0x85BF \ - 0x85CB 0x85CE 0x85C8 0x85C5 0x85B1 0x85B6 0x85D2 0x8624 \ - 0x85B8 0x85B7 0x85BE 0x8669 0x87E7 0x87E6 0x87E2 0x87DB \ - 0x87EB 0x87EA 0x87E5 0x87DF 0x87F3 0x87E4 0x87D4 0x87DC \ - 0x87D3 0x87ED 0x87D8 0x87E3 0x87A4 0x87D7 0x87D9 0x8801 \ - 0x87F4 0x87E8 0x87DD 0x8953 0x894B 0x894F 0x894C 0x8946 \ - 0x8950 0x8951 0x8949 0x8B2A 0x8B27 0x8B23 0x8B33 0x8B30 \ - 0x8B35 0x8B47 0x8B2F 0x8B3C 0x8B3E 0x8B31 0x8B25 0x8B37 \ - 0x8B26 0x8B36 0x8B2E 0x8B24 0x8B3B 0x8B3D 0x8B3A 0x8C42 -50 0x8C75 0x8C99 0x8C98 0x8C97 0x8CFE 0x8D04 0x8D02 0x8D00 \ - 0x8E5C 0x8E62 0x8E60 0x8E57 0x8E56 0x8E5E 0x8E65 0x8E67 \ - 0x8E5B 0x8E5A 0x8E61 0x8E5D 0x8E69 0x8E54 0x8F46 0x8F47 \ - 0x8F48 0x8F4B 0x9128 0x913A 0x913B 0x913E 0x91A8 0x91A5 \ - 0x91A7 0x91AF 0x91AA 0x93B5 0x938C 0x9392 0x93B7 0x939B \ - 0x939D 0x9389 0x93A7 0x938E 0x93AA 0x939E 0x93A6 0x9395 \ - 0x9388 0x9399 0x939F 0x938D 0x93B1 0x9391 0x93B2 0x93A4 \ - 0x93A8 0x93B4 0x93A3 0x93A5 0x95D2 0x95D3 0x95D1 0x96B3 \ - 0x96D7 0x96DA 0x5DC2 0x96DF 0x96D8 0x96DD 0x9723 0x9722 \ - 0x9725 0x97AC 0x97AE 0x97A8 0x97AB 0x97A4 0x97AA 0x97A2 \ - 0x97A5 0x97D7 0x97D9 0x97D6 0x97D8 0x97FA 0x9850 0x9851 \ - 0x9852 0x98B8 0x9941 0x993C 0x993A 0x9A0F 0x9A0B 0x9A09 \ - 0x9A0D 0x9A04 0x9A11 0x9A0A 0x9A05 0x9A07 0x9A06 0x9AC0 \ - 0x9ADC 0x9B08 0x9B04 0x9B05 0x9B29 0x9B35 0x9B4A 0x9B4C \ - 0x9B4B 0x9BC7 0x9BC6 0x9BC3 0x9BBF 0x9BC1 0x9BB5 0x9BB8 \ - 0x9BD3 0x9BB6 0x9BC4 0x9BB9 0x9BBD 0x9D5C 0x9D53 0x9D4F \ - 0x9D4A 0x9D5B 0x9D4B 0x9D59 0x9D56 0x9D4C 0x9D57 0x9D52 \ - 0x9D54 0x9D5F 0x9D58 0x9D5A 0x9E8E 0x9E8C 0x9EDF 0x9F01 \ - 0x9F00 0x9F16 0x9F25 0x9F2B 0x9F2A 0x9F29 0x9F28 0x9F4C \ - 0x9F55 0x5134 0x5135 0x5296 0x52F7 0x53B4 0x56AB 0x56AD \ - 0x56A6 0x56A7 0x56AA 0x56AC 0x58DA 0x58DD 0x58DB 0x5912 \ - 0x5B3D 0x5B3E 0x5B3F 0x5DC3 0x5E70 0x5FBF 0x61FB 0x6507 \ - 0x6510 0x650D 0x6509 0x650C 0x650E 0x6584 0x65DE 0x65DD \ - 0x66DE 0x6AE7 0x6AE0 0x6ACC 0x6AD1 0x6AD9 0x6ACB 0x6ADF \ - 0x6ADC 0x6AD0 0x6AEB 0x6ACF 0x6ACD 0x6ADE 0x6B60 0x6BB0 \ - 0x6C0C 0x7019 0x7027 0x7020 0x7016 0x702B 0x7021 0x7022 \ - 0x7023 0x7029 0x7017 0x7024 0x701C 0x702A 0x720C 0x720A \ - 0x7207 0x7202 0x7205 0x72A5 0x72A6 0x72A4 0x72A3 0x72A1 \ - 0x74CB 0x74C5 0x74B7 0x74C3 0x7516 0x7660 0x77C9 0x77CA \ - 0x77C4 0x77F1 0x791D 0x791B 0x7921 0x791C 0x7917 0x791E \ - 0x79B0 0x7A67 0x7A68 0x7C33 0x7C3C 0x7C39 0x7C2C 0x7C3B \ - 0x7CEC 0x7CEA 0x7E76 0x7E75 0x7E78 0x7E70 0x7E77 0x7E6F -51 0x7E7A 0x7E72 0x7E74 0x7E68 0x7F4B 0x7F4A 0x7F83 0x7F86 \ - 0x7FB7 0x7FFD 0x7FFE 0x8078 0x81D7 0x81D5 0x8264 0x8261 \ - 0x8263 0x85EB 0x85F1 0x85ED 0x85D9 0x85E1 0x85E8 0x85DA \ - 0x85D7 0x85EC 0x85F2 0x85F8 0x85D8 0x85DF 0x85E3 0x85DC \ - 0x85D1 0x85F0 0x85E6 0x85EF 0x85DE 0x85E2 0x8800 0x87FA \ - 0x8803 0x87F6 0x87F7 0x8809 0x880C 0x880B 0x8806 0x87FC \ - 0x8808 0x87FF 0x880A 0x8802 0x8962 0x895A 0x895B 0x8957 \ - 0x8961 0x895C 0x8958 0x895D 0x8959 0x8988 0x89B7 0x89B6 \ - 0x89F6 0x8B50 0x8B48 0x8B4A 0x8B40 0x8B53 0x8B56 0x8B54 \ - 0x8B4B 0x8B55 0x8B51 0x8B42 0x8B52 0x8B57 0x8C43 0x8C77 \ - 0x8C76 0x8C9A 0x8D06 0x8D07 0x8D09 0x8DAC 0x8DAA 0x8DAD \ - 0x8DAB 0x8E6D 0x8E78 0x8E73 0x8E6A 0x8E6F 0x8E7B 0x8EC2 \ - 0x8F52 0x8F51 0x8F4F 0x8F50 0x8F53 0x8FB4 0x9140 0x913F \ - 0x91B0 0x91AD 0x93DE 0x93C7 0x93CF 0x93C2 0x93DA 0x93D0 \ - 0x93F9 0x93EC 0x93CC 0x93D9 0x93A9 0x93E6 0x93CA 0x93D4 \ - 0x93EE 0x93E3 0x93D5 0x93C4 0x93CE 0x93C0 0x93D2 0x93E7 \ - 0x957D 0x95DA 0x95DB 0x96E1 0x9729 0x972B 0x972C 0x9728 \ - 0x9726 0x97B3 0x97B7 0x97B6 0x97DD 0x97DE 0x97DF 0x985C \ - 0x9859 0x985D 0x9857 0x98BF 0x98BD 0x98BB 0x98BE 0x9948 \ - 0x9947 0x9943 0x99A6 0x99A7 0x9A1A 0x9A15 0x9A25 0x9A1D \ - 0x9A24 0x9A1B 0x9A22 0x9A20 0x9A27 0x9A23 0x9A1E 0x9A1C \ - 0x9A14 0x9AC2 0x9B0B 0x9B0A 0x9B0E 0x9B0C 0x9B37 0x9BEA \ - 0x9BEB 0x9BE0 0x9BDE 0x9BE4 0x9BE6 0x9BE2 0x9BF0 0x9BD4 \ - 0x9BD7 0x9BEC 0x9BDC 0x9BD9 0x9BE5 0x9BD5 0x9BE1 0x9BDA \ - 0x9D77 0x9D81 0x9D8A 0x9D84 0x9D88 0x9D71 0x9D80 0x9D78 \ - 0x9D86 0x9D8B 0x9D8C 0x9D7D 0x9D6B 0x9D74 0x9D75 0x9D70 \ - 0x9D69 0x9D85 0x9D73 0x9D7B 0x9D82 0x9D6F 0x9D79 0x9D7F \ - 0x9D87 0x9D68 0x9E94 0x9E91 0x9EC0 0x9EFC 0x9F2D 0x9F40 \ - 0x9F41 0x9F4D 0x9F56 0x9F57 0x9F58 0x5337 0x56B2 0x56B5 \ - 0x56B3 0x58E3 0x5B45 0x5DC6 0x5DC7 0x5EEE 0x5EEF 0x5FC0 \ - 0x5FC1 0x61F9 0x6517 0x6516 0x6515 0x6513 0x65DF 0x66E8 \ - 0x66E3 0x66E4 0x6AF3 0x6AF0 0x6AEA 0x6AE8 0x6AF9 0x6AF1 -52 0x6AEE 0x6AEF 0x703C 0x7035 0x702F 0x7037 0x7034 0x7031 \ - 0x7042 0x7038 0x703F 0x703A 0x7039 0x7040 0x703B 0x7033 \ - 0x7041 0x7213 0x7214 0x72A8 0x737D 0x737C 0x74BA 0x76AB \ - 0x76AA 0x76BE 0x76ED 0x77CC 0x77CE 0x77CF 0x77CD 0x77F2 \ - 0x7925 0x7923 0x7927 0x7928 0x7924 0x7929 0x79B2 0x7A6E \ - 0x7A6C 0x7A6D 0x7AF7 0x7C49 0x7C48 0x7C4A 0x7C47 0x7C45 \ - 0x7CEE 0x7E7B 0x7E7E 0x7E81 0x7E80 0x7FBA 0x7FFF 0x8079 \ - 0x81DB 0x81D9 0x820B 0x8268 0x8269 0x8622 0x85FF 0x8601 \ - 0x85FE 0x861B 0x8600 0x85F6 0x8604 0x8609 0x8605 0x860C \ - 0x85FD 0x8819 0x8810 0x8811 0x8817 0x8813 0x8816 0x8963 \ - 0x8966 0x89B9 0x89F7 0x8B60 0x8B6A 0x8B5D 0x8B68 0x8B63 \ - 0x8B65 0x8B67 0x8B6D 0x8DAE 0x8E86 0x8E88 0x8E84 0x8F59 \ - 0x8F56 0x8F57 0x8F55 0x8F58 0x8F5A 0x908D 0x9143 0x9141 \ - 0x91B7 0x91B5 0x91B2 0x91B3 0x940B 0x9413 0x93FB 0x9420 \ - 0x940F 0x9414 0x93FE 0x9415 0x9410 0x9428 0x9419 0x940D \ - 0x93F5 0x9400 0x93F7 0x9407 0x940E 0x9416 0x9412 0x93FA \ - 0x9409 0x93F8 0x940A 0x93FF 0x93FC 0x940C 0x93F6 0x9411 \ - 0x9406 0x95DE 0x95E0 0x95DF 0x972E 0x972F 0x97B9 0x97BB \ - 0x97FD 0x97FE 0x9860 0x9862 0x9863 0x985F 0x98C1 0x98C2 \ - 0x9950 0x994E 0x9959 0x994C 0x994B 0x9953 0x9A32 0x9A34 \ - 0x9A31 0x9A2C 0x9A2A 0x9A36 0x9A29 0x9A2E 0x9A38 0x9A2D \ - 0x9AC7 0x9ACA 0x9AC6 0x9B10 0x9B12 0x9B11 0x9C0B 0x9C08 \ - 0x9BF7 0x9C05 0x9C12 0x9BF8 0x9C40 0x9C07 0x9C0E 0x9C06 \ - 0x9C17 0x9C14 0x9C09 0x9D9F 0x9D99 0x9DA4 0x9D9D 0x9D92 \ - 0x9D98 0x9D90 0x9D9B 0x9DA0 0x9D94 0x9D9C 0x9DAA 0x9D97 \ - 0x9DA1 0x9D9A 0x9DA2 0x9DA8 0x9D9E 0x9DA3 0x9DBF 0x9DA9 \ - 0x9D96 0x9DA6 0x9DA7 0x9E99 0x9E9B 0x9E9A 0x9EE5 0x9EE4 \ - 0x9EE7 0x9EE6 0x9F30 0x9F2E 0x9F5B 0x9F60 0x9F5E 0x9F5D \ - 0x9F59 0x9F91 0x513A 0x5139 0x5298 0x5297 0x56C3 0x56BD \ - 0x56BE 0x5B48 0x5B47 0x5DCB 0x5DCF 0x5EF1 0x61FD 0x651B \ - 0x6B02 0x6AFC 0x6B03 0x6AF8 0x6B00 0x7043 0x7044 0x704A \ - 0x7048 0x7049 0x7045 0x7046 0x721D 0x721A 0x7219 0x737E -53 0x7517 0x766A 0x77D0 0x792D 0x7931 0x792F 0x7C54 0x7C53 \ - 0x7CF2 0x7E8A 0x7E87 0x7E88 0x7E8B 0x7E86 0x7E8D 0x7F4D \ - 0x7FBB 0x8030 0x81DD 0x8618 0x862A 0x8626 0x861F 0x8623 \ - 0x861C 0x8619 0x8627 0x862E 0x8621 0x8620 0x8629 0x861E \ - 0x8625 0x8829 0x881D 0x881B 0x8820 0x8824 0x881C 0x882B \ - 0x884A 0x896D 0x8969 0x896E 0x896B 0x89FA 0x8B79 0x8B78 \ - 0x8B45 0x8B7A 0x8B7B 0x8D10 0x8D14 0x8DAF 0x8E8E 0x8E8C \ - 0x8F5E 0x8F5B 0x8F5D 0x9146 0x9144 0x9145 0x91B9 0x943F \ - 0x943B 0x9436 0x9429 0x943D 0x943C 0x9430 0x9439 0x942A \ - 0x9437 0x942C 0x9440 0x9431 0x95E5 0x95E4 0x95E3 0x9735 \ - 0x973A 0x97BF 0x97E1 0x9864 0x98C9 0x98C6 0x98C0 0x9958 \ - 0x9956 0x9A39 0x9A3D 0x9A46 0x9A44 0x9A42 0x9A41 0x9A3A \ - 0x9A3F 0x9ACD 0x9B15 0x9B17 0x9B18 0x9B16 0x9B3A 0x9B52 \ - 0x9C2B 0x9C1D 0x9C1C 0x9C2C 0x9C23 0x9C28 0x9C29 0x9C24 \ - 0x9C21 0x9DB7 0x9DB6 0x9DBC 0x9DC1 0x9DC7 0x9DCA 0x9DCF \ - 0x9DBE 0x9DC5 0x9DC3 0x9DBB 0x9DB5 0x9DCE 0x9DB9 0x9DBA \ - 0x9DAC 0x9DC8 0x9DB1 0x9DAD 0x9DCC 0x9DB3 0x9DCD 0x9DB2 \ - 0x9E7A 0x9E9C 0x9EEB 0x9EEE 0x9EED 0x9F1B 0x9F18 0x9F1A \ - 0x9F31 0x9F4E 0x9F65 0x9F64 0x9F92 0x4EB9 0x56C6 0x56C5 \ - 0x56CB 0x5971 0x5B4B 0x5B4C 0x5DD5 0x5DD1 0x5EF2 0x6521 \ - 0x6520 0x6526 0x6522 0x6B0B 0x6B08 0x6B09 0x6C0D 0x7055 \ - 0x7056 0x7057 0x7052 0x721E 0x721F 0x72A9 0x737F 0x74D8 \ - 0x74D5 0x74D9 0x74D7 0x766D 0x76AD 0x7935 0x79B4 0x7A70 \ - 0x7A71 0x7C57 0x7C5C 0x7C59 0x7C5B 0x7C5A 0x7CF4 0x7CF1 \ - 0x7E91 0x7F4F 0x7F87 0x81DE 0x826B 0x8634 0x8635 0x8633 \ - 0x862C 0x8632 0x8636 0x882C 0x8828 0x8826 0x882A 0x8825 \ - 0x8971 0x89BF 0x89BE 0x89FB 0x8B7E 0x8B84 0x8B82 0x8B86 \ - 0x8B85 0x8B7F 0x8D15 0x8E95 0x8E94 0x8E9A 0x8E92 0x8E90 \ - 0x8E96 0x8E97 0x8F60 0x8F62 0x9147 0x944C 0x9450 0x944A \ - 0x944B 0x944F 0x9447 0x9445 0x9448 0x9449 0x9446 0x973F \ - 0x97E3 0x986A 0x9869 0x98CB 0x9954 0x995B 0x9A4E 0x9A53 \ - 0x9A54 0x9A4C 0x9A4F 0x9A48 0x9A4A 0x9A49 0x9A52 0x9A50 -54 0x9AD0 0x9B19 0x9B2B 0x9B3B 0x9B56 0x9B55 0x9C46 0x9C48 \ - 0x9C3F 0x9C44 0x9C39 0x9C33 0x9C41 0x9C3C 0x9C37 0x9C34 \ - 0x9C32 0x9C3D 0x9C36 0x9DDB 0x9DD2 0x9DDE 0x9DDA 0x9DCB \ - 0x9DD0 0x9DDC 0x9DD1 0x9DDF 0x9DE9 0x9DD9 0x9DD8 0x9DD6 \ - 0x9DF5 0x9DD5 0x9DDD 0x9EB6 0x9EF0 0x9F35 0x9F33 0x9F32 \ - 0x9F42 0x9F6B 0x9F95 0x9FA2 0x513D 0x5299 0x58E8 0x58E7 \ - 0x5972 0x5B4D 0x5DD8 0x882F 0x5F4F 0x6201 0x6203 0x6204 \ - 0x6529 0x6525 0x6596 0x66EB 0x6B11 0x6B12 0x6B0F 0x6BCA \ - 0x705B 0x705A 0x7222 0x7382 0x7381 0x7383 0x7670 0x77D4 \ - 0x7C67 0x7C66 0x7E95 0x826C 0x863A 0x8640 0x8639 0x863C \ - 0x8631 0x863B 0x863E 0x8830 0x8832 0x882E 0x8833 0x8976 \ - 0x8974 0x8973 0x89FE 0x8B8C 0x8B8E 0x8B8B 0x8B88 0x8C45 \ - 0x8D19 0x8E98 0x8F64 0x8F63 0x91BC 0x9462 0x9455 0x945D \ - 0x9457 0x945E 0x97C4 0x97C5 0x9800 0x9A56 0x9A59 0x9B1E \ - 0x9B1F 0x9B20 0x9C52 0x9C58 0x9C50 0x9C4A 0x9C4D 0x9C4B \ - 0x9C55 0x9C59 0x9C4C 0x9C4E 0x9DFB 0x9DF7 0x9DEF 0x9DE3 \ - 0x9DEB 0x9DF8 0x9DE4 0x9DF6 0x9DE1 0x9DEE 0x9DE6 0x9DF2 \ - 0x9DF0 0x9DE2 0x9DEC 0x9DF4 0x9DF3 0x9DE8 0x9DED 0x9EC2 \ - 0x9ED0 0x9EF2 0x9EF3 0x9F06 0x9F1C 0x9F38 0x9F37 0x9F36 \ - 0x9F43 0x9F4F 0x9F71 0x9F70 0x9F6E 0x9F6F 0x56D3 0x56CD \ - 0x5B4E 0x5C6D 0x652D 0x66ED 0x66EE 0x6B13 0x705F 0x7061 \ - 0x705D 0x7060 0x7223 0x74DB 0x74E5 0x77D5 0x7938 0x79B7 \ - 0x79B6 0x7C6A 0x7E97 0x7F89 0x826D 0x8643 0x8838 0x8837 \ - 0x8835 0x884B 0x8B94 0x8B95 0x8E9E 0x8E9F 0x8EA0 0x8E9D \ - 0x91BE 0x91BD 0x91C2 0x946B 0x9468 0x9469 0x96E5 0x9746 \ - 0x9743 0x9747 0x97C7 0x97E5 0x9A5E 0x9AD5 0x9B59 0x9C63 \ - 0x9C67 0x9C66 0x9C62 0x9C5E 0x9C60 0x9E02 0x9DFE 0x9E07 \ - 0x9E03 0x9E06 0x9E05 0x9E00 0x9E01 0x9E09 0x9DFF 0x9DFD \ - 0x9E04 0x9EA0 0x9F1E 0x9F46 0x9F74 0x9F75 0x9F76 0x56D4 \ - 0x652E 0x65B8 0x6B18 0x6B19 0x6B17 0x6B1A 0x7062 0x7226 \ - 0x72AA 0x77D8 0x77D9 0x7939 0x7C69 0x7C6B 0x7CF6 0x7E9A \ - 0x7E98 0x7E9B 0x7E99 0x81E0 0x81E1 0x8646 0x8647 0x8648 -55 0x8979 0x897A 0x897C 0x897B 0x89FF 0x8B98 0x8B99 0x8EA5 \ - 0x8EA4 0x8EA3 0x946E 0x946D 0x946F 0x9471 0x9473 0x9749 \ - 0x9872 0x995F 0x9C68 0x9C6E 0x9C6D 0x9E0B 0x9E0D 0x9E10 \ - 0x9E0F 0x9E12 0x9E11 0x9EA1 0x9EF5 0x9F09 0x9F47 0x9F78 \ - 0x9F7B 0x9F7A 0x9F79 0x571E 0x7066 0x7C6F 0x883C 0x8DB2 \ - 0x8EA6 0x91C3 0x9474 0x9478 0x9476 0x9475 0x9A60 0x9C74 \ - 0x9C73 0x9C71 0x9C75 0x9E14 0x9E13 0x9EF6 0x9F0A 0x9FA4 \ - 0x7068 0x7065 0x7CF7 0x866A 0x883E 0x883D 0x883F 0x8B9E \ - 0x8C9C 0x8EA9 0x8EC9 0x974B 0x9873 0x9874 0x98CC 0x9961 \ - 0x99AB 0x9A64 0x9A66 0x9A67 0x9B24 0x9E15 0x9E17 0x9F48 \ - 0x6207 0x6B1E 0x7227 0x864C 0x8EA8 0x9482 0x9480 0x9481 \ - 0x9A69 0x9A68 0x9B2E 0x9E19 0x7229 0x864B 0x8B9F 0x9483 \ - 0x9C79 0x9EB7 0x7675 0x9A6B 0x9C7A 0x9E1D 0x7069 0x706A \ - 0x9EA4 0x9F7E 0x9F49 0x9F98 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -56 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -57 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -58 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UGB.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UGB.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UGB.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UGB.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UGB.sfd Wed Mar 16 20:59:33 2005 @@ -1,1114 +0,0 @@ -# UGB.sfd -# -# subfont numbers for GB 2312 encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x3000 0x3001 0x3002 0x30FB 0x02C9 0x02C7 0x00A8 0x3003 \ - 0x3005 0x2015 0xFF5E 0x2225 0x2026 0x2018 0x2019 0x201C \ - 0x201D 0x3014 0x3015 0x3008 0x3009 0x300A 0x300B 0x300C \ - 0x300D 0x300E 0x300F 0x3016 0x3017 0x3010 0x3011 0x00B1 \ - 0x00D7 0x00F7 0x2236 0x2227 0x2228 0x2211 0x220F 0x222A \ - 0x2229 0x2208 0x2237 0x221A 0x22A5 0x2225 0x2220 0x2312 \ - 0x2299 0x222B 0x222E 0x2261 0x224C 0x2248 0x223D 0x221D \ - 0x2260 0x226E 0x226F 0x2264 0x2265 0x221E 0x2235 0x2234 \ - 0x2642 0x2640 0x00B0 0x2032 0x2033 0x2103 0xFF04 0x00A4 \ - 0xFFE0 0xFFE1 0x2030 0x00A7 0x2116 0x2606 0x2605 0x25CB \ - 0x25CF 0x25CE 0x25C7 0x25C6 0x25A1 0x25A0 0x25B3 0x25B2 \ - 0x203B 0x2192 0x2190 0x2191 0x2193 0x3013 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2488 0x2489 \ - 0x248A 0x248B 0x248C 0x248D 0x248E 0x248F 0x2490 0x2491 \ - 0x2492 0x2493 0x2494 0x2495 0x2496 0x2497 0x2498 0x2499 \ - 0x249A 0x249B 0x2474 0x2475 0x2476 0x2477 0x2478 0x2479 \ - 0x247A 0x247B 0x247C 0x247D 0x247E 0x247F 0x2480 0x2481 \ - 0x2482 0x2483 0x2484 0x2485 0x2486 0x2487 0x2460 0x2461 \ - 0x2462 0x2463 0x2464 0x2465 0x2466 0x2467 0x2468 0x2469 \ - 0xFFFE 0xFFFE 0x3220 0x3221 0x3222 0x3223 0x3224 0x3225 \ - 0x3226 0x3227 0x3228 0x3229 0xFFFE 0xFFFE 0x2160 0x2161 \ - 0x2162 0x2163 0x2164 0x2165 0x2166 0x2167 0x2168 0x2169 \ - 0x216A 0x216B 0xFFFE 0xFFFE 0xFF01 0xFF02 0xFF03 0xFFE5 \ - 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFF0A 0xFF0B 0xFF0C \ - 0xFF0D 0xFF0E 0xFF0F 0xFF10 0xFF11 0xFF12 0xFF13 0xFF14 \ - 0xFF15 0xFF16 0xFF17 0xFF18 0xFF19 0xFF1A 0xFF1B 0xFF1C \ - 0xFF1D 0xFF1E 0xFF1F 0xFF20 0xFF21 0xFF22 0xFF23 0xFF24 \ - 0xFF25 0xFF26 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C \ - 0xFF2D 0xFF2E 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 \ - 0xFF35 0xFF36 0xFF37 0xFF38 0xFF39 0xFF3A 0xFF3B 0xFF3C \ - 0xFF3D 0xFF3E 0xFF3F 0xFF40 0xFF41 0xFF42 0xFF43 0xFF44 -02 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A 0xFF4B 0xFF4C \ - 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 0xFF53 0xFF54 \ - 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A 0xFF5B 0xFF5C \ - 0xFF5D 0xFFE3 0x3041 0x3042 0x3043 0x3044 0x3045 0x3046 \ - 0x3047 0x3048 0x3049 0x304A 0x304B 0x304C 0x304D 0x304E \ - 0x304F 0x3050 0x3051 0x3052 0x3053 0x3054 0x3055 0x3056 \ - 0x3057 0x3058 0x3059 0x305A 0x305B 0x305C 0x305D 0x305E \ - 0x305F 0x3060 0x3061 0x3062 0x3063 0x3064 0x3065 0x3066 \ - 0x3067 0x3068 0x3069 0x306A 0x306B 0x306C 0x306D 0x306E \ - 0x306F 0x3070 0x3071 0x3072 0x3073 0x3074 0x3075 0x3076 \ - 0x3077 0x3078 0x3079 0x307A 0x307B 0x307C 0x307D 0x307E \ - 0x307F 0x3080 0x3081 0x3082 0x3083 0x3084 0x3085 0x3086 \ - 0x3087 0x3088 0x3089 0x308A 0x308B 0x308C 0x308D 0x308E \ - 0x308F 0x3090 0x3091 0x3092 0x3093 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x30A1 0x30A2 0x30A3 0x30A4 0x30A5 0x30A6 0x30A7 0x30A8 \ - 0x30A9 0x30AA 0x30AB 0x30AC 0x30AD 0x30AE 0x30AF 0x30B0 \ - 0x30B1 0x30B2 0x30B3 0x30B4 0x30B5 0x30B6 0x30B7 0x30B8 \ - 0x30B9 0x30BA 0x30BB 0x30BC 0x30BD 0x30BE 0x30BF 0x30C0 \ - 0x30C1 0x30C2 0x30C3 0x30C4 0x30C5 0x30C6 0x30C7 0x30C8 \ - 0x30C9 0x30CA 0x30CB 0x30CC 0x30CD 0x30CE 0x30CF 0x30D0 \ - 0x30D1 0x30D2 0x30D3 0x30D4 0x30D5 0x30D6 0x30D7 0x30D8 \ - 0x30D9 0x30DA 0x30DB 0x30DC 0x30DD 0x30DE 0x30DF 0x30E0 \ - 0x30E1 0x30E2 0x30E3 0x30E4 0x30E5 0x30E6 0x30E7 0x30E8 \ - 0x30E9 0x30EA 0x30EB 0x30EC 0x30ED 0x30EE 0x30EF 0x30F0 \ - 0x30F1 0x30F2 0x30F3 0x30F4 0x30F5 0x30F6 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0391 0x0392 \ - 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 0x0399 0x039A \ - 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 0x03A1 0x03A3 \ - 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x03B1 0x03B2 \ - 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 0x03B9 0x03BA -03 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 0x03C1 0x03C3 \ - 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0410 0x0411 0x0412 0x0413 \ - 0x0414 0x0415 0x0401 0x0416 0x0417 0x0418 0x0419 0x041A \ - 0x041B 0x041C 0x041D 0x041E 0x041F 0x0420 0x0421 0x0422 \ - 0x0423 0x0424 0x0425 0x0426 0x0427 0x0428 0x0429 0x042A \ - 0x042B 0x042C 0x042D 0x042E 0x042F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0430 0x0431 0x0432 0x0433 \ - 0x0434 0x0435 0x0451 0x0436 0x0437 0x0438 0x0439 0x043A \ - 0x043B 0x043C 0x043D 0x043E 0x043F 0x0440 0x0441 0x0442 \ - 0x0443 0x0444 0x0445 0x0446 0x0447 0x0448 0x0449 0x044A \ - 0x044B 0x044C 0x044D 0x044E 0x044F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x0101 0x00E1 0x01CE 0x00E0 0x0113 0x00E9 \ - 0x011B 0x00E8 0x012B 0x00ED 0x01D0 0x00EC 0x014D 0x00F3 \ - 0x01D2 0x00F2 0x016B 0x00FA 0x01D4 0x00F9 0x01D6 0x01D8 \ - 0x01DA 0x01DC 0x00FC 0x00EA 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x3105 0x3106 \ - 0x3107 0x3108 0x3109 0x310A 0x310B 0x310C 0x310D 0x310E \ - 0x310F 0x3110 0x3111 0x3112 0x3113 0x3114 0x3115 0x3116 \ - 0x3117 0x3118 0x3119 0x311A 0x311B 0x311C 0x311D 0x311E \ - 0x311F 0x3120 0x3121 0x3122 0x3123 0x3124 0x3125 0x3126 \ - 0x3127 0x3128 0x3129 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x2500 0x2501 0x2502 0x2503 0x2504 \ - 0x2505 0x2506 0x2507 0x2508 0x2509 0x250A 0x250B 0x250C -04 0x250D 0x250E 0x250F 0x2510 0x2511 0x2512 0x2513 0x2514 \ - 0x2515 0x2516 0x2517 0x2518 0x2519 0x251A 0x251B 0x251C \ - 0x251D 0x251E 0x251F 0x2520 0x2521 0x2522 0x2523 0x2524 \ - 0x2525 0x2526 0x2527 0x2528 0x2529 0x252A 0x252B 0x252C \ - 0x252D 0x252E 0x252F 0x2530 0x2531 0x2532 0x2533 0x2534 \ - 0x2535 0x2536 0x2537 0x2538 0x2539 0x253A 0x253B 0x253C \ - 0x253D 0x253E 0x253F 0x2540 0x2541 0x2542 0x2543 0x2544 \ - 0x2545 0x2546 0x2547 0x2548 0x2549 0x254A 0x254B 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -05 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -06 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x554A 0x963F 0x57C3 0x6328 0x54CE 0x5509 \ - 0x54C0 0x7691 0x764C 0x853C 0x77EE 0x827E 0x788D 0x7231 \ - 0x9698 0x978D 0x6C28 0x5B89 0x4FFA 0x6309 0x6697 0x5CB8 \ - 0x80FA 0x6848 0x80AE 0x6602 0x76CE 0x51F9 0x6556 0x71AC \ - 0x7FF1 0x8884 0x50B2 0x5965 0x61CA 0x6FB3 0x82AD 0x634C \ - 0x6252 0x53ED 0x5427 0x7B06 0x516B 0x75A4 0x5DF4 0x62D4 \ - 0x8DCB 0x9776 0x628A 0x8019 0x575D 0x9738 0x7F62 0x7238 \ - 0x767D 0x67CF 0x767E 0x6446 0x4F70 0x8D25 0x62DC 0x7A17 \ - 0x6591 0x73ED 0x642C 0x6273 0x822C 0x9881 0x677F 0x7248 \ - 0x626E 0x62CC 0x4F34 0x74E3 0x534A 0x529E 0x7ECA 0x90A6 \ - 0x5E2E 0x6886 0x699C 0x8180 0x7ED1 0x68D2 0x78C5 0x868C \ - 0x9551 0x508D 0x8C24 0x82DE 0x80DE 0x5305 0x8912 0x5265 \ - 0x8584 0x96F9 0x4FDD 0x5821 0x9971 0x5B9D 0x62B1 0x62A5 \ - 0x66B4 0x8C79 0x9C8D 0x7206 0x676F 0x7891 0x60B2 0x5351 \ - 0x5317 0x8F88 0x80CC 0x8D1D 0x94A1 0x500D 0x72C8 0x5907 \ - 0x60EB 0x7119 0x88AB 0x5954 0x82EF 0x672C 0x7B28 0x5D29 -07 0x7EF7 0x752D 0x6CF5 0x8E66 0x8FF8 0x903C 0x9F3B 0x6BD4 \ - 0x9119 0x7B14 0x5F7C 0x78A7 0x84D6 0x853D 0x6BD5 0x6BD9 \ - 0x6BD6 0x5E01 0x5E87 0x75F9 0x95ED 0x655D 0x5F0A 0x5FC5 \ - 0x8F9F 0x58C1 0x81C2 0x907F 0x965B 0x97AD 0x8FB9 0x7F16 \ - 0x8D2C 0x6241 0x4FBF 0x53D8 0x535E 0x8FA8 0x8FA9 0x8FAB \ - 0x904D 0x6807 0x5F6A 0x8198 0x8868 0x9CD6 0x618B 0x522B \ - 0x762A 0x5F6C 0x658C 0x6FD2 0x6EE8 0x5BBE 0x6448 0x5175 \ - 0x51B0 0x67C4 0x4E19 0x79C9 0x997C 0x70B3 0x75C5 0x5E76 \ - 0x73BB 0x83E0 0x64AD 0x62E8 0x94B5 0x6CE2 0x535A 0x52C3 \ - 0x640F 0x94C2 0x7B94 0x4F2F 0x5E1B 0x8236 0x8116 0x818A \ - 0x6E24 0x6CCA 0x9A73 0x6355 0x535C 0x54FA 0x8865 0x57E0 \ - 0x4E0D 0x5E03 0x6B65 0x7C3F 0x90E8 0x6016 0x64E6 0x731C \ - 0x88C1 0x6750 0x624D 0x8D22 0x776C 0x8E29 0x91C7 0x5F69 \ - 0x83DC 0x8521 0x9910 0x53C2 0x8695 0x6B8B 0x60ED 0x60E8 \ - 0x707F 0x82CD 0x8231 0x4ED3 0x6CA7 0x85CF 0x64CD 0x7CD9 \ - 0x69FD 0x66F9 0x8349 0x5395 0x7B56 0x4FA7 0x518C 0x6D4B \ - 0x5C42 0x8E6D 0x63D2 0x53C9 0x832C 0x8336 0x67E5 0x78B4 \ - 0x643D 0x5BDF 0x5C94 0x5DEE 0x8BE7 0x62C6 0x67F4 0x8C7A \ - 0x6400 0x63BA 0x8749 0x998B 0x8C17 0x7F20 0x94F2 0x4EA7 \ - 0x9610 0x98A4 0x660C 0x7316 0x573A 0x5C1D 0x5E38 0x957F \ - 0x507F 0x80A0 0x5382 0x655E 0x7545 0x5531 0x5021 0x8D85 \ - 0x6284 0x949E 0x671D 0x5632 0x6F6E 0x5DE2 0x5435 0x7092 \ - 0x8F66 0x626F 0x64A4 0x63A3 0x5F7B 0x6F88 0x90F4 0x81E3 \ - 0x8FB0 0x5C18 0x6668 0x5FF1 0x6C89 0x9648 0x8D81 0x886C \ - 0x6491 0x79F0 0x57CE 0x6A59 0x6210 0x5448 0x4E58 0x7A0B \ - 0x60E9 0x6F84 0x8BDA 0x627F 0x901E 0x9A8B 0x79E4 0x5403 \ - 0x75F4 0x6301 0x5319 0x6C60 0x8FDF 0x5F1B 0x9A70 0x803B \ - 0x9F7F 0x4F88 0x5C3A 0x8D64 0x7FC5 0x65A5 0x70BD 0x5145 \ - 0x51B2 0x866B 0x5D07 0x5BA0 0x62BD 0x916C 0x7574 0x8E0C \ - 0x7A20 0x6101 0x7B79 0x4EC7 0x7EF8 0x7785 0x4E11 0x81ED \ - 0x521D 0x51FA 0x6A71 0x53A8 0x8E87 0x9504 0x96CF 0x6EC1 \ - 0x9664 0x695A 0x7840 0x50A8 0x77D7 0x6410 0x89E6 0x5904 -08 0x63E3 0x5DDD 0x7A7F 0x693D 0x4F20 0x8239 0x5598 0x4E32 \ - 0x75AE 0x7A97 0x5E62 0x5E8A 0x95EF 0x521B 0x5439 0x708A \ - 0x6376 0x9524 0x5782 0x6625 0x693F 0x9187 0x5507 0x6DF3 \ - 0x7EAF 0x8822 0x6233 0x7EF0 0x75B5 0x8328 0x78C1 0x96CC \ - 0x8F9E 0x6148 0x74F7 0x8BCD 0x6B64 0x523A 0x8D50 0x6B21 \ - 0x806A 0x8471 0x56F1 0x5306 0x4ECE 0x4E1B 0x51D1 0x7C97 \ - 0x918B 0x7C07 0x4FC3 0x8E7F 0x7BE1 0x7A9C 0x6467 0x5D14 \ - 0x50AC 0x8106 0x7601 0x7CB9 0x6DEC 0x7FE0 0x6751 0x5B58 \ - 0x5BF8 0x78CB 0x64AE 0x6413 0x63AA 0x632B 0x9519 0x642D \ - 0x8FBE 0x7B54 0x7629 0x6253 0x5927 0x5446 0x6B79 0x50A3 \ - 0x6234 0x5E26 0x6B86 0x4EE3 0x8D37 0x888B 0x5F85 0x902E \ - 0x6020 0x803D 0x62C5 0x4E39 0x5355 0x90F8 0x63B8 0x80C6 \ - 0x65E6 0x6C2E 0x4F46 0x60EE 0x6DE1 0x8BDE 0x5F39 0x86CB \ - 0x5F53 0x6321 0x515A 0x8361 0x6863 0x5200 0x6363 0x8E48 \ - 0x5012 0x5C9B 0x7977 0x5BFC 0x5230 0x7A3B 0x60BC 0x9053 \ - 0x76D7 0x5FB7 0x5F97 0x7684 0x8E6C 0x706F 0x767B 0x7B49 \ - 0x77AA 0x51F3 0x9093 0x5824 0x4F4E 0x6EF4 0x8FEA 0x654C \ - 0x7B1B 0x72C4 0x6DA4 0x7FDF 0x5AE1 0x62B5 0x5E95 0x5730 \ - 0x8482 0x7B2C 0x5E1D 0x5F1F 0x9012 0x7F14 0x98A0 0x6382 \ - 0x6EC7 0x7898 0x70B9 0x5178 0x975B 0x57AB 0x7535 0x4F43 \ - 0x7538 0x5E97 0x60E6 0x5960 0x6DC0 0x6BBF 0x7889 0x53FC \ - 0x96D5 0x51CB 0x5201 0x6389 0x540A 0x9493 0x8C03 0x8DCC \ - 0x7239 0x789F 0x8776 0x8FED 0x8C0D 0x53E0 0x4E01 0x76EF \ - 0x53EE 0x9489 0x9876 0x9F0E 0x952D 0x5B9A 0x8BA2 0x4E22 \ - 0x4E1C 0x51AC 0x8463 0x61C2 0x52A8 0x680B 0x4F97 0x606B \ - 0x51BB 0x6D1E 0x515C 0x6296 0x6597 0x9661 0x8C46 0x9017 \ - 0x75D8 0x90FD 0x7763 0x6BD2 0x728A 0x72EC 0x8BFB 0x5835 \ - 0x7779 0x8D4C 0x675C 0x9540 0x809A 0x5EA6 0x6E21 0x5992 \ - 0x7AEF 0x77ED 0x953B 0x6BB5 0x65AD 0x7F0E 0x5806 0x5151 \ - 0x961F 0x5BF9 0x58A9 0x5428 0x8E72 0x6566 0x987F 0x56E4 \ - 0x949D 0x76FE 0x9041 0x6387 0x54C6 0x591A 0x593A 0x579B \ - 0x8EB2 0x6735 0x8DFA 0x8235 0x5241 0x60F0 0x5815 0x86FE -09 0x5CE8 0x9E45 0x4FC4 0x989D 0x8BB9 0x5A25 0x6076 0x5384 \ - 0x627C 0x904F 0x9102 0x997F 0x6069 0x800C 0x513F 0x8033 \ - 0x5C14 0x9975 0x6D31 0x4E8C 0x8D30 0x53D1 0x7F5A 0x7B4F \ - 0x4F10 0x4E4F 0x9600 0x6CD5 0x73D0 0x85E9 0x5E06 0x756A \ - 0x7FFB 0x6A0A 0x77FE 0x9492 0x7E41 0x51E1 0x70E6 0x53CD \ - 0x8FD4 0x8303 0x8D29 0x72AF 0x996D 0x6CDB 0x574A 0x82B3 \ - 0x65B9 0x80AA 0x623F 0x9632 0x59A8 0x4EFF 0x8BBF 0x7EBA \ - 0x653E 0x83F2 0x975E 0x5561 0x98DE 0x80A5 0x532A 0x8BFD \ - 0x5420 0x80BA 0x5E9F 0x6CB8 0x8D39 0x82AC 0x915A 0x5429 \ - 0x6C1B 0x5206 0x7EB7 0x575F 0x711A 0x6C7E 0x7C89 0x594B \ - 0x4EFD 0x5FFF 0x6124 0x7CAA 0x4E30 0x5C01 0x67AB 0x8702 \ - 0x5CF0 0x950B 0x98CE 0x75AF 0x70FD 0x9022 0x51AF 0x7F1D \ - 0x8BBD 0x5949 0x51E4 0x4F5B 0x5426 0x592B 0x6577 0x80A4 \ - 0x5B75 0x6276 0x62C2 0x8F90 0x5E45 0x6C1F 0x7B26 0x4F0F \ - 0x4FD8 0x670D 0x6D6E 0x6DAA 0x798F 0x88B1 0x5F17 0x752B \ - 0x629A 0x8F85 0x4FEF 0x91DC 0x65A7 0x812F 0x8151 0x5E9C \ - 0x8150 0x8D74 0x526F 0x8986 0x8D4B 0x590D 0x5085 0x4ED8 \ - 0x961C 0x7236 0x8179 0x8D1F 0x5BCC 0x8BA3 0x9644 0x5987 \ - 0x7F1A 0x5490 0x5676 0x560E 0x8BE5 0x6539 0x6982 0x9499 \ - 0x76D6 0x6E89 0x5E72 0x7518 0x6746 0x67D1 0x7AFF 0x809D \ - 0x8D76 0x611F 0x79C6 0x6562 0x8D63 0x5188 0x521A 0x94A2 \ - 0x7F38 0x809B 0x7EB2 0x5C97 0x6E2F 0x6760 0x7BD9 0x768B \ - 0x9AD8 0x818F 0x7F94 0x7CD5 0x641E 0x9550 0x7A3F 0x544A \ - 0x54E5 0x6B4C 0x6401 0x6208 0x9E3D 0x80F3 0x7599 0x5272 \ - 0x9769 0x845B 0x683C 0x86E4 0x9601 0x9694 0x94EC 0x4E2A \ - 0x5404 0x7ED9 0x6839 0x8DDF 0x8015 0x66F4 0x5E9A 0x7FB9 \ - 0x57C2 0x803F 0x6897 0x5DE5 0x653B 0x529F 0x606D 0x9F9A \ - 0x4F9B 0x8EAC 0x516C 0x5BAB 0x5F13 0x5DE9 0x6C5E 0x62F1 \ - 0x8D21 0x5171 0x94A9 0x52FE 0x6C9F 0x82DF 0x72D7 0x57A2 \ - 0x6784 0x8D2D 0x591F 0x8F9C 0x83C7 0x5495 0x7B8D 0x4F30 \ - 0x6CBD 0x5B64 0x59D1 0x9F13 0x53E4 0x86CA 0x9AA8 0x8C37 \ - 0x80A1 0x6545 0x987E 0x56FA 0x96C7 0x522E 0x74DC 0x5250 -10 0x5BE1 0x6302 0x8902 0x4E56 0x62D0 0x602A 0x68FA 0x5173 \ - 0x5B98 0x51A0 0x89C2 0x7BA1 0x9986 0x7F50 0x60EF 0x704C \ - 0x8D2F 0x5149 0x5E7F 0x901B 0x7470 0x89C4 0x572D 0x7845 \ - 0x5F52 0x9F9F 0x95FA 0x8F68 0x9B3C 0x8BE1 0x7678 0x6842 \ - 0x67DC 0x8DEA 0x8D35 0x523D 0x8F8A 0x6EDA 0x68CD 0x9505 \ - 0x90ED 0x56FD 0x679C 0x88F9 0x8FC7 0x54C8 0x9AB8 0x5B69 \ - 0x6D77 0x6C26 0x4EA5 0x5BB3 0x9A87 0x9163 0x61A8 0x90AF \ - 0x97E9 0x542B 0x6DB5 0x5BD2 0x51FD 0x558A 0x7F55 0x7FF0 \ - 0x64BC 0x634D 0x65F1 0x61BE 0x608D 0x710A 0x6C57 0x6C49 \ - 0x592F 0x676D 0x822A 0x58D5 0x568E 0x8C6A 0x6BEB 0x90DD \ - 0x597D 0x8017 0x53F7 0x6D69 0x5475 0x559D 0x8377 0x83CF \ - 0x6838 0x79BE 0x548C 0x4F55 0x5408 0x76D2 0x8C89 0x9602 \ - 0x6CB3 0x6DB8 0x8D6B 0x8910 0x9E64 0x8D3A 0x563F 0x9ED1 \ - 0x75D5 0x5F88 0x72E0 0x6068 0x54FC 0x4EA8 0x6A2A 0x8861 \ - 0x6052 0x8F70 0x54C4 0x70D8 0x8679 0x9E3F 0x6D2A 0x5B8F \ - 0x5F18 0x7EA2 0x5589 0x4FAF 0x7334 0x543C 0x539A 0x5019 \ - 0x540E 0x547C 0x4E4E 0x5FFD 0x745A 0x58F6 0x846B 0x80E1 \ - 0x8774 0x72D0 0x7CCA 0x6E56 0x5F27 0x864E 0x552C 0x62A4 \ - 0x4E92 0x6CAA 0x6237 0x82B1 0x54D7 0x534E 0x733E 0x6ED1 \ - 0x753B 0x5212 0x5316 0x8BDD 0x69D0 0x5F8A 0x6000 0x6DEE \ - 0x574F 0x6B22 0x73AF 0x6853 0x8FD8 0x7F13 0x6362 0x60A3 \ - 0x5524 0x75EA 0x8C62 0x7115 0x6DA3 0x5BA6 0x5E7B 0x8352 \ - 0x614C 0x9EC4 0x78FA 0x8757 0x7C27 0x7687 0x51F0 0x60F6 \ - 0x714C 0x6643 0x5E4C 0x604D 0x8C0E 0x7070 0x6325 0x8F89 \ - 0x5FBD 0x6062 0x86D4 0x56DE 0x6BC1 0x6094 0x6167 0x5349 \ - 0x60E0 0x6666 0x8D3F 0x79FD 0x4F1A 0x70E9 0x6C47 0x8BB3 \ - 0x8BF2 0x7ED8 0x8364 0x660F 0x5A5A 0x9B42 0x6D51 0x6DF7 \ - 0x8C41 0x6D3B 0x4F19 0x706B 0x83B7 0x6216 0x60D1 0x970D \ - 0x8D27 0x7978 0x51FB 0x573E 0x57FA 0x673A 0x7578 0x7A3D \ - 0x79EF 0x7B95 0x808C 0x9965 0x8FF9 0x6FC0 0x8BA5 0x9E21 \ - 0x59EC 0x7EE9 0x7F09 0x5409 0x6781 0x68D8 0x8F91 0x7C4D \ - 0x96C6 0x53CA 0x6025 0x75BE 0x6C72 0x5373 0x5AC9 0x7EA7 -11 0x6324 0x51E0 0x810A 0x5DF1 0x84DF 0x6280 0x5180 0x5B63 \ - 0x4F0E 0x796D 0x5242 0x60B8 0x6D4E 0x5BC4 0x5BC2 0x8BA1 \ - 0x8BB0 0x65E2 0x5FCC 0x9645 0x5993 0x7EE7 0x7EAA 0x5609 \ - 0x67B7 0x5939 0x4F73 0x5BB6 0x52A0 0x835A 0x988A 0x8D3E \ - 0x7532 0x94BE 0x5047 0x7A3C 0x4EF7 0x67B6 0x9A7E 0x5AC1 \ - 0x6B7C 0x76D1 0x575A 0x5C16 0x7B3A 0x95F4 0x714E 0x517C \ - 0x80A9 0x8270 0x5978 0x7F04 0x8327 0x68C0 0x67EC 0x78B1 \ - 0x7877 0x62E3 0x6361 0x7B80 0x4FED 0x526A 0x51CF 0x8350 \ - 0x69DB 0x9274 0x8DF5 0x8D31 0x89C1 0x952E 0x7BAD 0x4EF6 \ - 0x5065 0x8230 0x5251 0x996F 0x6E10 0x6E85 0x6DA7 0x5EFA \ - 0x50F5 0x59DC 0x5C06 0x6D46 0x6C5F 0x7586 0x848B 0x6868 \ - 0x5956 0x8BB2 0x5320 0x9171 0x964D 0x8549 0x6912 0x7901 \ - 0x7126 0x80F6 0x4EA4 0x90CA 0x6D47 0x9A84 0x5A07 0x56BC \ - 0x6405 0x94F0 0x77EB 0x4FA5 0x811A 0x72E1 0x89D2 0x997A \ - 0x7F34 0x7EDE 0x527F 0x6559 0x9175 0x8F7F 0x8F83 0x53EB \ - 0x7A96 0x63ED 0x63A5 0x7686 0x79F8 0x8857 0x9636 0x622A \ - 0x52AB 0x8282 0x6854 0x6770 0x6377 0x776B 0x7AED 0x6D01 \ - 0x7ED3 0x89E3 0x59D0 0x6212 0x85C9 0x82A5 0x754C 0x501F \ - 0x4ECB 0x75A5 0x8BEB 0x5C4A 0x5DFE 0x7B4B 0x65A4 0x91D1 \ - 0x4ECA 0x6D25 0x895F 0x7D27 0x9526 0x4EC5 0x8C28 0x8FDB \ - 0x9773 0x664B 0x7981 0x8FD1 0x70EC 0x6D78 0x5C3D 0x52B2 \ - 0x8346 0x5162 0x830E 0x775B 0x6676 0x9CB8 0x4EAC 0x60CA \ - 0x7CBE 0x7CB3 0x7ECF 0x4E95 0x8B66 0x666F 0x9888 0x9759 \ - 0x5883 0x656C 0x955C 0x5F84 0x75C9 0x9756 0x7ADF 0x7ADE \ - 0x51C0 0x70AF 0x7A98 0x63EA 0x7A76 0x7EA0 0x7396 0x97ED \ - 0x4E45 0x7078 0x4E5D 0x9152 0x53A9 0x6551 0x65E7 0x81FC \ - 0x8205 0x548E 0x5C31 0x759A 0x97A0 0x62D8 0x72D9 0x75BD \ - 0x5C45 0x9A79 0x83CA 0x5C40 0x5480 0x77E9 0x4E3E 0x6CAE \ - 0x805A 0x62D2 0x636E 0x5DE8 0x5177 0x8DDD 0x8E1E 0x952F \ - 0x4FF1 0x53E5 0x60E7 0x70AC 0x5267 0x6350 0x9E43 0x5A1F \ - 0x5026 0x7737 0x5377 0x7EE2 0x6485 0x652B 0x6289 0x6398 \ - 0x5014 0x7235 0x89C9 0x51B3 0x8BC0 0x7EDD 0x5747 0x83CC -12 0x94A7 0x519B 0x541B 0x5CFB 0x4FCA 0x7AE3 0x6D5A 0x90E1 \ - 0x9A8F 0x5580 0x5496 0x5361 0x54AF 0x5F00 0x63E9 0x6977 \ - 0x51EF 0x6168 0x520A 0x582A 0x52D8 0x574E 0x780D 0x770B \ - 0x5EB7 0x6177 0x7CE0 0x625B 0x6297 0x4EA2 0x7095 0x8003 \ - 0x62F7 0x70E4 0x9760 0x5777 0x82DB 0x67EF 0x68F5 0x78D5 \ - 0x9897 0x79D1 0x58F3 0x54B3 0x53EF 0x6E34 0x514B 0x523B \ - 0x5BA2 0x8BFE 0x80AF 0x5543 0x57A6 0x6073 0x5751 0x542D \ - 0x7A7A 0x6050 0x5B54 0x63A7 0x62A0 0x53E3 0x6263 0x5BC7 \ - 0x67AF 0x54ED 0x7A9F 0x82E6 0x9177 0x5E93 0x88E4 0x5938 \ - 0x57AE 0x630E 0x8DE8 0x80EF 0x5757 0x7B77 0x4FA9 0x5FEB \ - 0x5BBD 0x6B3E 0x5321 0x7B50 0x72C2 0x6846 0x77FF 0x7736 \ - 0x65F7 0x51B5 0x4E8F 0x76D4 0x5CBF 0x7AA5 0x8475 0x594E \ - 0x9B41 0x5080 0x9988 0x6127 0x6E83 0x5764 0x6606 0x6346 \ - 0x56F0 0x62EC 0x6269 0x5ED3 0x9614 0x5783 0x62C9 0x5587 \ - 0x8721 0x814A 0x8FA3 0x5566 0x83B1 0x6765 0x8D56 0x84DD \ - 0x5A6A 0x680F 0x62E6 0x7BEE 0x9611 0x5170 0x6F9C 0x8C30 \ - 0x63FD 0x89C8 0x61D2 0x7F06 0x70C2 0x6EE5 0x7405 0x6994 \ - 0x72FC 0x5ECA 0x90CE 0x6717 0x6D6A 0x635E 0x52B3 0x7262 \ - 0x8001 0x4F6C 0x59E5 0x916A 0x70D9 0x6D9D 0x52D2 0x4E50 \ - 0x96F7 0x956D 0x857E 0x78CA 0x7D2F 0x5121 0x5792 0x64C2 \ - 0x808B 0x7C7B 0x6CEA 0x68F1 0x695E 0x51B7 0x5398 0x68A8 \ - 0x7281 0x9ECE 0x7BF1 0x72F8 0x79BB 0x6F13 0x7406 0x674E \ - 0x91CC 0x9CA4 0x793C 0x8389 0x8354 0x540F 0x6817 0x4E3D \ - 0x5389 0x52B1 0x783E 0x5386 0x5229 0x5088 0x4F8B 0x4FD0 \ - 0x75E2 0x7ACB 0x7C92 0x6CA5 0x96B6 0x529B 0x7483 0x54E9 \ - 0x4FE9 0x8054 0x83B2 0x8FDE 0x9570 0x5EC9 0x601C 0x6D9F \ - 0x5E18 0x655B 0x8138 0x94FE 0x604B 0x70BC 0x7EC3 0x7CAE \ - 0x51C9 0x6881 0x7CB1 0x826F 0x4E24 0x8F86 0x91CF 0x667E \ - 0x4EAE 0x8C05 0x64A9 0x804A 0x50DA 0x7597 0x71CE 0x5BE5 \ - 0x8FBD 0x6F66 0x4E86 0x6482 0x9563 0x5ED6 0x6599 0x5217 \ - 0x88C2 0x70C8 0x52A3 0x730E 0x7433 0x6797 0x78F7 0x9716 \ - 0x4E34 0x90BB 0x9CDE 0x6DCB 0x51DB 0x8D41 0x541D 0x62CE -13 0x73B2 0x83F1 0x96F6 0x9F84 0x94C3 0x4F36 0x7F9A 0x51CC \ - 0x7075 0x9675 0x5CAD 0x9886 0x53E6 0x4EE4 0x6E9C 0x7409 \ - 0x69B4 0x786B 0x998F 0x7559 0x5218 0x7624 0x6D41 0x67F3 \ - 0x516D 0x9F99 0x804B 0x5499 0x7B3C 0x7ABF 0x9686 0x5784 \ - 0x62E2 0x9647 0x697C 0x5A04 0x6402 0x7BD3 0x6F0F 0x964B \ - 0x82A6 0x5362 0x9885 0x5E90 0x7089 0x63B3 0x5364 0x864F \ - 0x9C81 0x9E93 0x788C 0x9732 0x8DEF 0x8D42 0x9E7F 0x6F5E \ - 0x7984 0x5F55 0x9646 0x622E 0x9A74 0x5415 0x94DD 0x4FA3 \ - 0x65C5 0x5C65 0x5C61 0x7F15 0x8651 0x6C2F 0x5F8B 0x7387 \ - 0x6EE4 0x7EFF 0x5CE6 0x631B 0x5B6A 0x6EE6 0x5375 0x4E71 \ - 0x63A0 0x7565 0x62A1 0x8F6E 0x4F26 0x4ED1 0x6CA6 0x7EB6 \ - 0x8BBA 0x841D 0x87BA 0x7F57 0x903B 0x9523 0x7BA9 0x9AA1 \ - 0x88F8 0x843D 0x6D1B 0x9A86 0x7EDC 0x5988 0x9EBB 0x739B \ - 0x7801 0x8682 0x9A6C 0x9A82 0x561B 0x5417 0x57CB 0x4E70 \ - 0x9EA6 0x5356 0x8FC8 0x8109 0x7792 0x9992 0x86EE 0x6EE1 \ - 0x8513 0x66FC 0x6162 0x6F2B 0x8C29 0x8292 0x832B 0x76F2 \ - 0x6C13 0x5FD9 0x83BD 0x732B 0x8305 0x951A 0x6BDB 0x77DB \ - 0x94C6 0x536F 0x8302 0x5192 0x5E3D 0x8C8C 0x8D38 0x4E48 \ - 0x73AB 0x679A 0x6885 0x9176 0x9709 0x7164 0x6CA1 0x7709 \ - 0x5A92 0x9541 0x6BCF 0x7F8E 0x6627 0x5BD0 0x59B9 0x5A9A \ - 0x95E8 0x95F7 0x4EEC 0x840C 0x8499 0x6AAC 0x76DF 0x9530 \ - 0x731B 0x68A6 0x5B5F 0x772F 0x919A 0x9761 0x7CDC 0x8FF7 \ - 0x8C1C 0x5F25 0x7C73 0x79D8 0x89C5 0x6CCC 0x871C 0x5BC6 \ - 0x5E42 0x68C9 0x7720 0x7EF5 0x5195 0x514D 0x52C9 0x5A29 \ - 0x7F05 0x9762 0x82D7 0x63CF 0x7784 0x85D0 0x79D2 0x6E3A \ - 0x5E99 0x5999 0x8511 0x706D 0x6C11 0x62BF 0x76BF 0x654F \ - 0x60AF 0x95FD 0x660E 0x879F 0x9E23 0x94ED 0x540D 0x547D \ - 0x8C2C 0x6478 0x6479 0x8611 0x6A21 0x819C 0x78E8 0x6469 \ - 0x9B54 0x62B9 0x672B 0x83AB 0x58A8 0x9ED8 0x6CAB 0x6F20 \ - 0x5BDE 0x964C 0x8C0B 0x725F 0x67D0 0x62C7 0x7261 0x4EA9 \ - 0x59C6 0x6BCD 0x5893 0x66AE 0x5E55 0x52DF 0x6155 0x6728 \ - 0x76EE 0x7766 0x7267 0x7A46 0x62FF 0x54EA 0x5450 0x94A0 -14 0x90A3 0x5A1C 0x7EB3 0x6C16 0x4E43 0x5976 0x8010 0x5948 \ - 0x5357 0x7537 0x96BE 0x56CA 0x6320 0x8111 0x607C 0x95F9 \ - 0x6DD6 0x5462 0x9981 0x5185 0x5AE9 0x80FD 0x59AE 0x9713 \ - 0x502A 0x6CE5 0x5C3C 0x62DF 0x4F60 0x533F 0x817B 0x9006 \ - 0x6EBA 0x852B 0x62C8 0x5E74 0x78BE 0x64B5 0x637B 0x5FF5 \ - 0x5A18 0x917F 0x9E1F 0x5C3F 0x634F 0x8042 0x5B7D 0x556E \ - 0x954A 0x954D 0x6D85 0x60A8 0x67E0 0x72DE 0x51DD 0x5B81 \ - 0x62E7 0x6CDE 0x725B 0x626D 0x94AE 0x7EBD 0x8113 0x6D53 \ - 0x519C 0x5F04 0x5974 0x52AA 0x6012 0x5973 0x6696 0x8650 \ - 0x759F 0x632A 0x61E6 0x7CEF 0x8BFA 0x54E6 0x6B27 0x9E25 \ - 0x6BB4 0x85D5 0x5455 0x5076 0x6CA4 0x556A 0x8DB4 0x722C \ - 0x5E15 0x6015 0x7436 0x62CD 0x6392 0x724C 0x5F98 0x6E43 \ - 0x6D3E 0x6500 0x6F58 0x76D8 0x78D0 0x76FC 0x7554 0x5224 \ - 0x53DB 0x4E53 0x5E9E 0x65C1 0x802A 0x80D6 0x629B 0x5486 \ - 0x5228 0x70AE 0x888D 0x8DD1 0x6CE1 0x5478 0x80DA 0x57F9 \ - 0x88F4 0x8D54 0x966A 0x914D 0x4F69 0x6C9B 0x55B7 0x76C6 \ - 0x7830 0x62A8 0x70F9 0x6F8E 0x5F6D 0x84EC 0x68DA 0x787C \ - 0x7BF7 0x81A8 0x670B 0x9E4F 0x6367 0x78B0 0x576F 0x7812 \ - 0x9739 0x6279 0x62AB 0x5288 0x7435 0x6BD7 0x5564 0x813E \ - 0x75B2 0x76AE 0x5339 0x75DE 0x50FB 0x5C41 0x8B6C 0x7BC7 \ - 0x504F 0x7247 0x9A97 0x98D8 0x6F02 0x74E2 0x7968 0x6487 \ - 0x77A5 0x62FC 0x9891 0x8D2B 0x54C1 0x8058 0x4E52 0x576A \ - 0x82F9 0x840D 0x5E73 0x51ED 0x74F6 0x8BC4 0x5C4F 0x5761 \ - 0x6CFC 0x9887 0x5A46 0x7834 0x9B44 0x8FEB 0x7C95 0x5256 \ - 0x6251 0x94FA 0x4EC6 0x8386 0x8461 0x83E9 0x84B2 0x57D4 \ - 0x6734 0x5703 0x666E 0x6D66 0x8C31 0x66DD 0x7011 0x671F \ - 0x6B3A 0x6816 0x621A 0x59BB 0x4E03 0x51C4 0x6F06 0x67D2 \ - 0x6C8F 0x5176 0x68CB 0x5947 0x6B67 0x7566 0x5D0E 0x8110 \ - 0x9F50 0x65D7 0x7948 0x7941 0x9A91 0x8D77 0x5C82 0x4E5E \ - 0x4F01 0x542F 0x5951 0x780C 0x5668 0x6C14 0x8FC4 0x5F03 \ - 0x6C7D 0x6CE3 0x8BAB 0x6390 0x6070 0x6D3D 0x7275 0x6266 \ - 0x948E 0x94C5 0x5343 0x8FC1 0x7B7E 0x4EDF 0x8C26 0x4E7E -15 0x9ED4 0x94B1 0x94B3 0x524D 0x6F5C 0x9063 0x6D45 0x8C34 \ - 0x5811 0x5D4C 0x6B20 0x6B49 0x67AA 0x545B 0x8154 0x7F8C \ - 0x5899 0x8537 0x5F3A 0x62A2 0x6A47 0x9539 0x6572 0x6084 \ - 0x6865 0x77A7 0x4E54 0x4FA8 0x5DE7 0x9798 0x64AC 0x7FD8 \ - 0x5CED 0x4FCF 0x7A8D 0x5207 0x8304 0x4E14 0x602F 0x7A83 \ - 0x94A6 0x4FB5 0x4EB2 0x79E6 0x7434 0x52E4 0x82B9 0x64D2 \ - 0x79BD 0x5BDD 0x6C81 0x9752 0x8F7B 0x6C22 0x503E 0x537F \ - 0x6E05 0x64CE 0x6674 0x6C30 0x60C5 0x9877 0x8BF7 0x5E86 \ - 0x743C 0x7A77 0x79CB 0x4E18 0x90B1 0x7403 0x6C42 0x56DA \ - 0x914B 0x6CC5 0x8D8B 0x533A 0x86C6 0x66F2 0x8EAF 0x5C48 \ - 0x9A71 0x6E20 0x53D6 0x5A36 0x9F8B 0x8DA3 0x53BB 0x5708 \ - 0x98A7 0x6743 0x919B 0x6CC9 0x5168 0x75CA 0x62F3 0x72AC \ - 0x5238 0x529D 0x7F3A 0x7094 0x7638 0x5374 0x9E4A 0x69B7 \ - 0x786E 0x96C0 0x88D9 0x7FA4 0x7136 0x71C3 0x5189 0x67D3 \ - 0x74E4 0x58E4 0x6518 0x56B7 0x8BA9 0x9976 0x6270 0x7ED5 \ - 0x60F9 0x70ED 0x58EC 0x4EC1 0x4EBA 0x5FCD 0x97E7 0x4EFB \ - 0x8BA4 0x5203 0x598A 0x7EAB 0x6254 0x4ECD 0x65E5 0x620E \ - 0x8338 0x84C9 0x8363 0x878D 0x7194 0x6EB6 0x5BB9 0x7ED2 \ - 0x5197 0x63C9 0x67D4 0x8089 0x8339 0x8815 0x5112 0x5B7A \ - 0x5982 0x8FB1 0x4E73 0x6C5D 0x5165 0x8925 0x8F6F 0x962E \ - 0x854A 0x745E 0x9510 0x95F0 0x6DA6 0x82E5 0x5F31 0x6492 \ - 0x6D12 0x8428 0x816E 0x9CC3 0x585E 0x8D5B 0x4E09 0x53C1 \ - 0x4F1E 0x6563 0x6851 0x55D3 0x4E27 0x6414 0x9A9A 0x626B \ - 0x5AC2 0x745F 0x8272 0x6DA9 0x68EE 0x50E7 0x838E 0x7802 \ - 0x6740 0x5239 0x6C99 0x7EB1 0x50BB 0x5565 0x715E 0x7B5B \ - 0x6652 0x73CA 0x82EB 0x6749 0x5C71 0x5220 0x717D 0x886B \ - 0x95EA 0x9655 0x64C5 0x8D61 0x81B3 0x5584 0x6C55 0x6247 \ - 0x7F2E 0x5892 0x4F24 0x5546 0x8D4F 0x664C 0x4E0A 0x5C1A \ - 0x88F3 0x68A2 0x634E 0x7A0D 0x70E7 0x828D 0x52FA 0x97F6 \ - 0x5C11 0x54E8 0x90B5 0x7ECD 0x5962 0x8D4A 0x86C7 0x820C \ - 0x820D 0x8D66 0x6444 0x5C04 0x6151 0x6D89 0x793E 0x8BBE \ - 0x7837 0x7533 0x547B 0x4F38 0x8EAB 0x6DF1 0x5A20 0x7EC5 -16 0x795E 0x6C88 0x5BA1 0x5A76 0x751A 0x80BE 0x614E 0x6E17 \ - 0x58F0 0x751F 0x7525 0x7272 0x5347 0x7EF3 0x7701 0x76DB \ - 0x5269 0x80DC 0x5723 0x5E08 0x5931 0x72EE 0x65BD 0x6E7F \ - 0x8BD7 0x5C38 0x8671 0x5341 0x77F3 0x62FE 0x65F6 0x4EC0 \ - 0x98DF 0x8680 0x5B9E 0x8BC6 0x53F2 0x77E2 0x4F7F 0x5C4E \ - 0x9A76 0x59CB 0x5F0F 0x793A 0x58EB 0x4E16 0x67FF 0x4E8B \ - 0x62ED 0x8A93 0x901D 0x52BF 0x662F 0x55DC 0x566C 0x9002 \ - 0x4ED5 0x4F8D 0x91CA 0x9970 0x6C0F 0x5E02 0x6043 0x5BA4 \ - 0x89C6 0x8BD5 0x6536 0x624B 0x9996 0x5B88 0x5BFF 0x6388 \ - 0x552E 0x53D7 0x7626 0x517D 0x852C 0x67A2 0x68B3 0x6B8A \ - 0x6292 0x8F93 0x53D4 0x8212 0x6DD1 0x758F 0x4E66 0x8D4E \ - 0x5B70 0x719F 0x85AF 0x6691 0x66D9 0x7F72 0x8700 0x9ECD \ - 0x9F20 0x5C5E 0x672F 0x8FF0 0x6811 0x675F 0x620D 0x7AD6 \ - 0x5885 0x5EB6 0x6570 0x6F31 0x6055 0x5237 0x800D 0x6454 \ - 0x8870 0x7529 0x5E05 0x6813 0x62F4 0x971C 0x53CC 0x723D \ - 0x8C01 0x6C34 0x7761 0x7A0E 0x542E 0x77AC 0x987A 0x821C \ - 0x8BF4 0x7855 0x6714 0x70C1 0x65AF 0x6495 0x5636 0x601D \ - 0x79C1 0x53F8 0x4E1D 0x6B7B 0x8086 0x5BFA 0x55E3 0x56DB \ - 0x4F3A 0x4F3C 0x9972 0x5DF3 0x677E 0x8038 0x6002 0x9882 \ - 0x9001 0x5B8B 0x8BBC 0x8BF5 0x641C 0x8258 0x64DE 0x55FD \ - 0x82CF 0x9165 0x4FD7 0x7D20 0x901F 0x7C9F 0x50F3 0x5851 \ - 0x6EAF 0x5BBF 0x8BC9 0x8083 0x9178 0x849C 0x7B97 0x867D \ - 0x968B 0x968F 0x7EE5 0x9AD3 0x788E 0x5C81 0x7A57 0x9042 \ - 0x96A7 0x795F 0x5B59 0x635F 0x7B0B 0x84D1 0x68AD 0x5506 \ - 0x7F29 0x7410 0x7D22 0x9501 0x6240 0x584C 0x4ED6 0x5B83 \ - 0x5979 0x5854 0x736D 0x631E 0x8E4B 0x8E0F 0x80CE 0x82D4 \ - 0x62AC 0x53F0 0x6CF0 0x915E 0x592A 0x6001 0x6C70 0x574D \ - 0x644A 0x8D2A 0x762B 0x6EE9 0x575B 0x6A80 0x75F0 0x6F6D \ - 0x8C2D 0x8C08 0x5766 0x6BEF 0x8892 0x78B3 0x63A2 0x53F9 \ - 0x70AD 0x6C64 0x5858 0x642A 0x5802 0x68E0 0x819B 0x5510 \ - 0x7CD6 0x5018 0x8EBA 0x6DCC 0x8D9F 0x70EB 0x638F 0x6D9B \ - 0x6ED4 0x7EE6 0x8404 0x6843 0x9003 0x6DD8 0x9676 0x8BA8 -17 0x5957 0x7279 0x85E4 0x817E 0x75BC 0x8A8A 0x68AF 0x5254 \ - 0x8E22 0x9511 0x63D0 0x9898 0x8E44 0x557C 0x4F53 0x66FF \ - 0x568F 0x60D5 0x6D95 0x5243 0x5C49 0x5929 0x6DFB 0x586B \ - 0x7530 0x751C 0x606C 0x8214 0x8146 0x6311 0x6761 0x8FE2 \ - 0x773A 0x8DF3 0x8D34 0x94C1 0x5E16 0x5385 0x542C 0x70C3 \ - 0x6C40 0x5EF7 0x505C 0x4EAD 0x5EAD 0x633A 0x8247 0x901A \ - 0x6850 0x916E 0x77B3 0x540C 0x94DC 0x5F64 0x7AE5 0x6876 \ - 0x6345 0x7B52 0x7EDF 0x75DB 0x5077 0x6295 0x5934 0x900F \ - 0x51F8 0x79C3 0x7A81 0x56FE 0x5F92 0x9014 0x6D82 0x5C60 \ - 0x571F 0x5410 0x5154 0x6E4D 0x56E2 0x63A8 0x9893 0x817F \ - 0x8715 0x892A 0x9000 0x541E 0x5C6F 0x81C0 0x62D6 0x6258 \ - 0x8131 0x9E35 0x9640 0x9A6E 0x9A7C 0x692D 0x59A5 0x62D3 \ - 0x553E 0x6316 0x54C7 0x86D9 0x6D3C 0x5A03 0x74E6 0x889C \ - 0x6B6A 0x5916 0x8C4C 0x5F2F 0x6E7E 0x73A9 0x987D 0x4E38 \ - 0x70F7 0x5B8C 0x7897 0x633D 0x665A 0x7696 0x60CB 0x5B9B \ - 0x5A49 0x4E07 0x8155 0x6C6A 0x738B 0x4EA1 0x6789 0x7F51 \ - 0x5F80 0x65FA 0x671B 0x5FD8 0x5984 0x5A01 0x5DCD 0x5FAE \ - 0x5371 0x97E6 0x8FDD 0x6845 0x56F4 0x552F 0x60DF 0x4E3A \ - 0x6F4D 0x7EF4 0x82C7 0x840E 0x59D4 0x4F1F 0x4F2A 0x5C3E \ - 0x7EAC 0x672A 0x851A 0x5473 0x754F 0x80C3 0x5582 0x9B4F \ - 0x4F4D 0x6E2D 0x8C13 0x5C09 0x6170 0x536B 0x761F 0x6E29 \ - 0x868A 0x6587 0x95FB 0x7EB9 0x543B 0x7A33 0x7D0A 0x95EE \ - 0x55E1 0x7FC1 0x74EE 0x631D 0x8717 0x6DA1 0x7A9D 0x6211 \ - 0x65A1 0x5367 0x63E1 0x6C83 0x5DEB 0x545C 0x94A8 0x4E4C \ - 0x6C61 0x8BEC 0x5C4B 0x65E0 0x829C 0x68A7 0x543E 0x5434 \ - 0x6BCB 0x6B66 0x4E94 0x6342 0x5348 0x821E 0x4F0D 0x4FAE \ - 0x575E 0x620A 0x96FE 0x6664 0x7269 0x52FF 0x52A1 0x609F \ - 0x8BEF 0x6614 0x7199 0x6790 0x897F 0x7852 0x77FD 0x6670 \ - 0x563B 0x5438 0x9521 0x727A 0x7A00 0x606F 0x5E0C 0x6089 \ - 0x819D 0x5915 0x60DC 0x7184 0x70EF 0x6EAA 0x6C50 0x7280 \ - 0x6A84 0x88AD 0x5E2D 0x4E60 0x5AB3 0x559C 0x94E3 0x6D17 \ - 0x7CFB 0x9699 0x620F 0x7EC6 0x778E 0x867E 0x5323 0x971E -18 0x8F96 0x6687 0x5CE1 0x4FA0 0x72ED 0x4E0B 0x53A6 0x590F \ - 0x5413 0x6380 0x9528 0x5148 0x4ED9 0x9C9C 0x7EA4 0x54B8 \ - 0x8D24 0x8854 0x8237 0x95F2 0x6D8E 0x5F26 0x5ACC 0x663E \ - 0x9669 0x73B0 0x732E 0x53BF 0x817A 0x9985 0x7FA1 0x5BAA \ - 0x9677 0x9650 0x7EBF 0x76F8 0x53A2 0x9576 0x9999 0x7BB1 \ - 0x8944 0x6E58 0x4E61 0x7FD4 0x7965 0x8BE6 0x60F3 0x54CD \ - 0x4EAB 0x9879 0x5DF7 0x6A61 0x50CF 0x5411 0x8C61 0x8427 \ - 0x785D 0x9704 0x524A 0x54EE 0x56A3 0x9500 0x6D88 0x5BB5 \ - 0x6DC6 0x6653 0x5C0F 0x5B5D 0x6821 0x8096 0x5578 0x7B11 \ - 0x6548 0x6954 0x4E9B 0x6B47 0x874E 0x978B 0x534F 0x631F \ - 0x643A 0x90AA 0x659C 0x80C1 0x8C10 0x5199 0x68B0 0x5378 \ - 0x87F9 0x61C8 0x6CC4 0x6CFB 0x8C22 0x5C51 0x85AA 0x82AF \ - 0x950C 0x6B23 0x8F9B 0x65B0 0x5FFB 0x5FC3 0x4FE1 0x8845 \ - 0x661F 0x8165 0x7329 0x60FA 0x5174 0x5211 0x578B 0x5F62 \ - 0x90A2 0x884C 0x9192 0x5E78 0x674F 0x6027 0x59D3 0x5144 \ - 0x51F6 0x80F8 0x5308 0x6C79 0x96C4 0x718A 0x4F11 0x4FEE \ - 0x7F9E 0x673D 0x55C5 0x9508 0x79C0 0x8896 0x7EE3 0x589F \ - 0x620C 0x9700 0x865A 0x5618 0x987B 0x5F90 0x8BB8 0x84C4 \ - 0x9157 0x53D9 0x65ED 0x5E8F 0x755C 0x6064 0x7D6E 0x5A7F \ - 0x7EEA 0x7EED 0x8F69 0x55A7 0x5BA3 0x60AC 0x65CB 0x7384 \ - 0x9009 0x7663 0x7729 0x7EDA 0x9774 0x859B 0x5B66 0x7A74 \ - 0x96EA 0x8840 0x52CB 0x718F 0x5FAA 0x65EC 0x8BE2 0x5BFB \ - 0x9A6F 0x5DE1 0x6B89 0x6C5B 0x8BAD 0x8BAF 0x900A 0x8FC5 \ - 0x538B 0x62BC 0x9E26 0x9E2D 0x5440 0x4E2B 0x82BD 0x7259 \ - 0x869C 0x5D16 0x8859 0x6DAF 0x96C5 0x54D1 0x4E9A 0x8BB6 \ - 0x7109 0x54BD 0x9609 0x70DF 0x6DF9 0x76D0 0x4E25 0x7814 \ - 0x8712 0x5CA9 0x5EF6 0x8A00 0x989C 0x960E 0x708E 0x6CBF \ - 0x5944 0x63A9 0x773C 0x884D 0x6F14 0x8273 0x5830 0x71D5 \ - 0x538C 0x781A 0x96C1 0x5501 0x5F66 0x7130 0x5BB4 0x8C1A \ - 0x9A8C 0x6B83 0x592E 0x9E2F 0x79E7 0x6768 0x626C 0x4F6F \ - 0x75A1 0x7F8A 0x6D0B 0x9633 0x6C27 0x4EF0 0x75D2 0x517B \ - 0x6837 0x6F3E 0x9080 0x8170 0x5996 0x7476 0x6447 0x5C27 -19 0x9065 0x7A91 0x8C23 0x59DA 0x54AC 0x8200 0x836F 0x8981 \ - 0x8000 0x6930 0x564E 0x8036 0x7237 0x91CE 0x51B6 0x4E5F \ - 0x9875 0x6396 0x4E1A 0x53F6 0x66F3 0x814B 0x591C 0x6DB2 \ - 0x4E00 0x58F9 0x533B 0x63D6 0x94F1 0x4F9D 0x4F0A 0x8863 \ - 0x9890 0x5937 0x9057 0x79FB 0x4EEA 0x80F0 0x7591 0x6C82 \ - 0x5B9C 0x59E8 0x5F5D 0x6905 0x8681 0x501A 0x5DF2 0x4E59 \ - 0x77E3 0x4EE5 0x827A 0x6291 0x6613 0x9091 0x5C79 0x4EBF \ - 0x5F79 0x81C6 0x9038 0x8084 0x75AB 0x4EA6 0x88D4 0x610F \ - 0x6BC5 0x5FC6 0x4E49 0x76CA 0x6EA2 0x8BE3 0x8BAE 0x8C0A \ - 0x8BD1 0x5F02 0x7FFC 0x7FCC 0x7ECE 0x8335 0x836B 0x56E0 \ - 0x6BB7 0x97F3 0x9634 0x59FB 0x541F 0x94F6 0x6DEB 0x5BC5 \ - 0x996E 0x5C39 0x5F15 0x9690 0x5370 0x82F1 0x6A31 0x5A74 \ - 0x9E70 0x5E94 0x7F28 0x83B9 0x8424 0x8425 0x8367 0x8747 \ - 0x8FCE 0x8D62 0x76C8 0x5F71 0x9896 0x786C 0x6620 0x54DF \ - 0x62E5 0x4F63 0x81C3 0x75C8 0x5EB8 0x96CD 0x8E0A 0x86F9 \ - 0x548F 0x6CF3 0x6D8C 0x6C38 0x607F 0x52C7 0x7528 0x5E7D \ - 0x4F18 0x60A0 0x5FE7 0x5C24 0x7531 0x90AE 0x94C0 0x72B9 \ - 0x6CB9 0x6E38 0x9149 0x6709 0x53CB 0x53F3 0x4F51 0x91C9 \ - 0x8BF1 0x53C8 0x5E7C 0x8FC2 0x6DE4 0x4E8E 0x76C2 0x6986 \ - 0x865E 0x611A 0x8206 0x4F59 0x4FDE 0x903E 0x9C7C 0x6109 \ - 0x6E1D 0x6E14 0x9685 0x4E88 0x5A31 0x96E8 0x4E0E 0x5C7F \ - 0x79B9 0x5B87 0x8BED 0x7FBD 0x7389 0x57DF 0x828B 0x90C1 \ - 0x5401 0x9047 0x55BB 0x5CEA 0x5FA1 0x6108 0x6B32 0x72F1 \ - 0x80B2 0x8A89 0x6D74 0x5BD3 0x88D5 0x9884 0x8C6B 0x9A6D \ - 0x9E33 0x6E0A 0x51A4 0x5143 0x57A3 0x8881 0x539F 0x63F4 \ - 0x8F95 0x56ED 0x5458 0x5706 0x733F 0x6E90 0x7F18 0x8FDC \ - 0x82D1 0x613F 0x6028 0x9662 0x66F0 0x7EA6 0x8D8A 0x8DC3 \ - 0x94A5 0x5CB3 0x7CA4 0x6708 0x60A6 0x9605 0x8018 0x4E91 \ - 0x90E7 0x5300 0x9668 0x5141 0x8FD0 0x8574 0x915D 0x6655 \ - 0x97F5 0x5B55 0x531D 0x7838 0x6742 0x683D 0x54C9 0x707E \ - 0x5BB0 0x8F7D 0x518D 0x5728 0x54B1 0x6512 0x6682 0x8D5E \ - 0x8D43 0x810F 0x846C 0x906D 0x7CDF 0x51FF 0x85FB 0x67A3 -20 0x65E9 0x6FA1 0x86A4 0x8E81 0x566A 0x9020 0x7682 0x7076 \ - 0x71E5 0x8D23 0x62E9 0x5219 0x6CFD 0x8D3C 0x600E 0x589E \ - 0x618E 0x66FE 0x8D60 0x624E 0x55B3 0x6E23 0x672D 0x8F67 \ - 0x94E1 0x95F8 0x7728 0x6805 0x69A8 0x548B 0x4E4D 0x70B8 \ - 0x8BC8 0x6458 0x658B 0x5B85 0x7A84 0x503A 0x5BE8 0x77BB \ - 0x6BE1 0x8A79 0x7C98 0x6CBE 0x76CF 0x65A9 0x8F97 0x5D2D \ - 0x5C55 0x8638 0x6808 0x5360 0x6218 0x7AD9 0x6E5B 0x7EFD \ - 0x6A1F 0x7AE0 0x5F70 0x6F33 0x5F20 0x638C 0x6DA8 0x6756 \ - 0x4E08 0x5E10 0x8D26 0x4ED7 0x80C0 0x7634 0x969C 0x62DB \ - 0x662D 0x627E 0x6CBC 0x8D75 0x7167 0x7F69 0x5146 0x8087 \ - 0x53EC 0x906E 0x6298 0x54F2 0x86F0 0x8F99 0x8005 0x9517 \ - 0x8517 0x8FD9 0x6D59 0x73CD 0x659F 0x771F 0x7504 0x7827 \ - 0x81FB 0x8D1E 0x9488 0x4FA6 0x6795 0x75B9 0x8BCA 0x9707 \ - 0x632F 0x9547 0x9635 0x84B8 0x6323 0x7741 0x5F81 0x72F0 \ - 0x4E89 0x6014 0x6574 0x62EF 0x6B63 0x653F 0x5E27 0x75C7 \ - 0x90D1 0x8BC1 0x829D 0x679D 0x652F 0x5431 0x8718 0x77E5 \ - 0x80A2 0x8102 0x6C41 0x4E4B 0x7EC7 0x804C 0x76F4 0x690D \ - 0x6B96 0x6267 0x503C 0x4F84 0x5740 0x6307 0x6B62 0x8DBE \ - 0x53EA 0x65E8 0x7EB8 0x5FD7 0x631A 0x63B7 0x81F3 0x81F4 \ - 0x7F6E 0x5E1C 0x5CD9 0x5236 0x667A 0x79E9 0x7A1A 0x8D28 \ - 0x7099 0x75D4 0x6EDE 0x6CBB 0x7A92 0x4E2D 0x76C5 0x5FE0 \ - 0x949F 0x8877 0x7EC8 0x79CD 0x80BF 0x91CD 0x4EF2 0x4F17 \ - 0x821F 0x5468 0x5DDE 0x6D32 0x8BCC 0x7CA5 0x8F74 0x8098 \ - 0x5E1A 0x5492 0x76B1 0x5B99 0x663C 0x9AA4 0x73E0 0x682A \ - 0x86DB 0x6731 0x732A 0x8BF8 0x8BDB 0x9010 0x7AF9 0x70DB \ - 0x716E 0x62C4 0x77A9 0x5631 0x4E3B 0x8457 0x67F1 0x52A9 \ - 0x86C0 0x8D2E 0x94F8 0x7B51 0x4F4F 0x6CE8 0x795D 0x9A7B \ - 0x6293 0x722A 0x62FD 0x4E13 0x7816 0x8F6C 0x64B0 0x8D5A \ - 0x7BC6 0x6869 0x5E84 0x88C5 0x5986 0x649E 0x58EE 0x72B6 \ - 0x690E 0x9525 0x8FFD 0x8D58 0x5760 0x7F00 0x8C06 0x51C6 \ - 0x6349 0x62D9 0x5353 0x684C 0x7422 0x8301 0x914C 0x5544 \ - 0x7740 0x707C 0x6D4A 0x5179 0x54A8 0x8D44 0x59FF 0x6ECB -21 0x6DC4 0x5B5C 0x7D2B 0x4ED4 0x7C7D 0x6ED3 0x5B50 0x81EA \ - 0x6E0D 0x5B57 0x9B03 0x68D5 0x8E2A 0x5B97 0x7EFC 0x603B \ - 0x7EB5 0x90B9 0x8D70 0x594F 0x63CD 0x79DF 0x8DB3 0x5352 \ - 0x65CF 0x7956 0x8BC5 0x963B 0x7EC4 0x94BB 0x7E82 0x5634 \ - 0x9189 0x6700 0x7F6A 0x5C0A 0x9075 0x6628 0x5DE6 0x4F50 \ - 0x67DE 0x505A 0x4F5C 0x5750 0x5EA7 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x4E8D 0x4E0C 0x5140 0x4E10 0x5EFF 0x5345 \ - 0x4E15 0x4E98 0x4E1E 0x9B32 0x5B6C 0x5669 0x4E28 0x79BA \ - 0x4E3F 0x5315 0x4E47 0x592D 0x723B 0x536E 0x6C10 0x56DF \ - 0x80E4 0x9997 0x6BD3 0x777E 0x9F17 0x4E36 0x4E9F 0x9F10 \ - 0x4E5C 0x4E69 0x4E93 0x8288 0x5B5B 0x556C 0x560F 0x4EC4 \ - 0x538D 0x539D 0x53A3 0x53A5 0x53AE 0x9765 0x8D5D 0x531A \ - 0x53F5 0x5326 0x532E 0x533E 0x8D5C 0x5366 0x5363 0x5202 \ - 0x5208 0x520E 0x522D 0x5233 0x523F 0x5240 0x524C 0x525E \ - 0x5261 0x525C 0x84AF 0x527D 0x5282 0x5281 0x5290 0x5293 \ - 0x5182 0x7F54 0x4EBB 0x4EC3 0x4EC9 0x4EC2 0x4EE8 0x4EE1 \ - 0x4EEB 0x4EDE 0x4F1B 0x4EF3 0x4F22 0x4F64 0x4EF5 0x4F25 \ - 0x4F27 0x4F09 0x4F2B 0x4F5E 0x4F67 0x6538 0x4F5A 0x4F5D \ - 0x4F5F 0x4F57 0x4F32 0x4F3D 0x4F76 0x4F74 0x4F91 0x4F89 \ - 0x4F83 0x4F8F 0x4F7E 0x4F7B 0x4FAA 0x4F7C 0x4FAC 0x4F94 \ - 0x4FE6 0x4FE8 0x4FEA 0x4FC5 0x4FDA 0x4FE3 0x4FDC 0x4FD1 \ - 0x4FDF 0x4FF8 0x5029 0x504C 0x4FF3 0x502C 0x500F 0x502E \ - 0x502D 0x4FFE 0x501C 0x500C 0x5025 0x5028 0x507E 0x5043 \ - 0x5055 0x5048 0x504E 0x506C 0x507B 0x50A5 0x50A7 0x50A9 \ - 0x50BA 0x50D6 0x5106 0x50ED 0x50EC 0x50E6 0x50EE 0x5107 \ - 0x510B 0x4EDD 0x6C3D 0x4F58 0x4F65 0x4FCE 0x9FA0 0x6C46 \ - 0x7C74 0x516E 0x5DFD 0x9EC9 0x9998 0x5181 0x5914 0x52F9 \ - 0x530D 0x8A07 0x5310 0x51EB 0x5919 0x5155 0x4EA0 0x5156 \ - 0x4EB3 0x886E 0x88A4 0x4EB5 0x8114 0x88D2 0x7980 0x5B34 \ - 0x8803 0x7FB8 0x51AB 0x51B1 0x51BD 0x51BC 0x51C7 0x5196 \ - 0x51A2 0x51A5 0x8BA0 0x8BA6 0x8BA7 0x8BAA 0x8BB4 0x8BB5 \ - 0x8BB7 0x8BC2 0x8BC3 0x8BCB 0x8BCF 0x8BCE 0x8BD2 0x8BD3 -22 0x8BD4 0x8BD6 0x8BD8 0x8BD9 0x8BDC 0x8BDF 0x8BE0 0x8BE4 \ - 0x8BE8 0x8BE9 0x8BEE 0x8BF0 0x8BF3 0x8BF6 0x8BF9 0x8BFC \ - 0x8BFF 0x8C00 0x8C02 0x8C04 0x8C07 0x8C0C 0x8C0F 0x8C11 \ - 0x8C12 0x8C14 0x8C15 0x8C16 0x8C19 0x8C1B 0x8C18 0x8C1D \ - 0x8C1F 0x8C20 0x8C21 0x8C25 0x8C27 0x8C2A 0x8C2B 0x8C2E \ - 0x8C2F 0x8C32 0x8C33 0x8C35 0x8C36 0x5369 0x537A 0x961D \ - 0x9622 0x9621 0x9631 0x962A 0x963D 0x963C 0x9642 0x9649 \ - 0x9654 0x965F 0x9667 0x966C 0x9672 0x9674 0x9688 0x968D \ - 0x9697 0x96B0 0x9097 0x909B 0x909D 0x9099 0x90AC 0x90A1 \ - 0x90B4 0x90B3 0x90B6 0x90BA 0x90B8 0x90B0 0x90CF 0x90C5 \ - 0x90BE 0x90D0 0x90C4 0x90C7 0x90D3 0x90E6 0x90E2 0x90DC \ - 0x90D7 0x90DB 0x90EB 0x90EF 0x90FE 0x9104 0x9122 0x911E \ - 0x9123 0x9131 0x912F 0x9139 0x9143 0x9146 0x520D 0x5942 \ - 0x52A2 0x52AC 0x52AD 0x52BE 0x54FF 0x52D0 0x52D6 0x52F0 \ - 0x53DF 0x71EE 0x77CD 0x5EF4 0x51F5 0x51FC 0x9B2F 0x53B6 \ - 0x5F01 0x755A 0x5DEF 0x574C 0x57A9 0x57A1 0x587E 0x58BC \ - 0x58C5 0x58D1 0x5729 0x572C 0x572A 0x5733 0x5739 0x572E \ - 0x572F 0x575C 0x573B 0x5742 0x5769 0x5785 0x576B 0x5786 \ - 0x577C 0x577B 0x5768 0x576D 0x5776 0x5773 0x57AD 0x57A4 \ - 0x578C 0x57B2 0x57CF 0x57A7 0x57B4 0x5793 0x57A0 0x57D5 \ - 0x57D8 0x57DA 0x57D9 0x57D2 0x57B8 0x57F4 0x57EF 0x57F8 \ - 0x57E4 0x57DD 0x580B 0x580D 0x57FD 0x57ED 0x5800 0x581E \ - 0x5819 0x5844 0x5820 0x5865 0x586C 0x5881 0x5889 0x589A \ - 0x5880 0x99A8 0x9F19 0x61FF 0x8279 0x827D 0x827F 0x828F \ - 0x828A 0x82A8 0x8284 0x828E 0x8291 0x8297 0x8299 0x82AB \ - 0x82B8 0x82BE 0x82B0 0x82C8 0x82CA 0x82E3 0x8298 0x82B7 \ - 0x82AE 0x82CB 0x82CC 0x82C1 0x82A9 0x82B4 0x82A1 0x82AA \ - 0x829F 0x82C4 0x82CE 0x82A4 0x82E1 0x8309 0x82F7 0x82E4 \ - 0x830F 0x8307 0x82DC 0x82F4 0x82D2 0x82D8 0x830C 0x82FB \ - 0x82D3 0x8311 0x831A 0x8306 0x8314 0x8315 0x82E0 0x82D5 \ - 0x831C 0x8351 0x835B 0x835C 0x8308 0x8392 0x833C 0x8334 \ - 0x8331 0x839B 0x835E 0x832F 0x834F 0x8347 0x8343 0x835F -23 0x8340 0x8317 0x8360 0x832D 0x833A 0x8333 0x8366 0x8365 \ - 0x8368 0x831B 0x8369 0x836C 0x836A 0x836D 0x836E 0x83B0 \ - 0x8378 0x83B3 0x83B4 0x83A0 0x83AA 0x8393 0x839C 0x8385 \ - 0x837C 0x83B6 0x83A9 0x837D 0x83B8 0x837B 0x8398 0x839E \ - 0x83A8 0x83BA 0x83BC 0x83C1 0x8401 0x83E5 0x83D8 0x5807 \ - 0x8418 0x840B 0x83DD 0x83FD 0x83D6 0x841C 0x8438 0x8411 \ - 0x8406 0x83D4 0x83DF 0x840F 0x8403 0x83F8 0x83F9 0x83EA \ - 0x83C5 0x83C0 0x8426 0x83F0 0x83E1 0x845C 0x8451 0x845A \ - 0x8459 0x8473 0x8487 0x8488 0x847A 0x8489 0x8478 0x843C \ - 0x8446 0x8469 0x8476 0x848C 0x848E 0x8431 0x846D 0x84C1 \ - 0x84CD 0x84D0 0x84E6 0x84BD 0x84D3 0x84CA 0x84BF 0x84BA \ - 0x84E0 0x84A1 0x84B9 0x84B4 0x8497 0x84E5 0x84E3 0x850C \ - 0x750D 0x8538 0x84F0 0x8539 0x851F 0x853A 0x8556 0x853B \ - 0x84FF 0x84FC 0x8559 0x8548 0x8568 0x8564 0x855E 0x857A \ - 0x77A2 0x8543 0x8572 0x857B 0x85A4 0x85A8 0x8587 0x858F \ - 0x8579 0x85AE 0x859C 0x8585 0x85B9 0x85B7 0x85B0 0x85D3 \ - 0x85C1 0x85DC 0x85FF 0x8627 0x8605 0x8629 0x8616 0x863C \ - 0x5EFE 0x5F08 0x593C 0x5941 0x8037 0x5955 0x595A 0x5958 \ - 0x530F 0x5C22 0x5C25 0x5C2C 0x5C34 0x624C 0x626A 0x629F \ - 0x62BB 0x62CA 0x62DA 0x62D7 0x62EE 0x6322 0x62F6 0x6339 \ - 0x634B 0x6343 0x63AD 0x63F6 0x6371 0x637A 0x638E 0x63B4 \ - 0x636D 0x63AC 0x638A 0x6369 0x63AE 0x63BC 0x63F2 0x63F8 \ - 0x63E0 0x63FF 0x63C4 0x63DE 0x63CE 0x6452 0x63C6 0x63BE \ - 0x6445 0x6441 0x640B 0x641B 0x6420 0x640C 0x6426 0x6421 \ - 0x645E 0x6484 0x646D 0x6496 0x647A 0x64B7 0x64B8 0x6499 \ - 0x64BA 0x64C0 0x64D0 0x64D7 0x64E4 0x64E2 0x6509 0x6525 \ - 0x652E 0x5F0B 0x5FD2 0x7519 0x5F11 0x535F 0x53F1 0x53FD \ - 0x53E9 0x53E8 0x53FB 0x5412 0x5416 0x5406 0x544B 0x5452 \ - 0x5453 0x5454 0x5456 0x5443 0x5421 0x5457 0x5459 0x5423 \ - 0x5432 0x5482 0x5494 0x5477 0x5471 0x5464 0x549A 0x549B \ - 0x5484 0x5476 0x5466 0x549D 0x54D0 0x54AD 0x54C2 0x54B4 \ - 0x54D2 0x54A7 0x54A6 0x54D3 0x54D4 0x5472 0x54A3 0x54D5 -24 0x54BB 0x54BF 0x54CC 0x54D9 0x54DA 0x54DC 0x54A9 0x54AA \ - 0x54A4 0x54DD 0x54CF 0x54DE 0x551B 0x54E7 0x5520 0x54FD \ - 0x5514 0x54F3 0x5522 0x5523 0x550F 0x5511 0x5527 0x552A \ - 0x5567 0x558F 0x55B5 0x5549 0x556D 0x5541 0x5555 0x553F \ - 0x5550 0x553C 0x5537 0x5556 0x5575 0x5576 0x5577 0x5533 \ - 0x5530 0x555C 0x558B 0x55D2 0x5583 0x55B1 0x55B9 0x5588 \ - 0x5581 0x559F 0x557E 0x55D6 0x5591 0x557B 0x55DF 0x55BD \ - 0x55BE 0x5594 0x5599 0x55EA 0x55F7 0x55C9 0x561F 0x55D1 \ - 0x55EB 0x55EC 0x55D4 0x55E6 0x55DD 0x55C4 0x55EF 0x55E5 \ - 0x55F2 0x55F3 0x55CC 0x55CD 0x55E8 0x55F5 0x55E4 0x8F94 \ - 0x561E 0x5608 0x560C 0x5601 0x5624 0x5623 0x55FE 0x5600 \ - 0x5627 0x562D 0x5658 0x5639 0x5657 0x562C 0x564D 0x5662 \ - 0x5659 0x565C 0x564C 0x5654 0x5686 0x5664 0x5671 0x566B \ - 0x567B 0x567C 0x5685 0x5693 0x56AF 0x56D4 0x56D7 0x56DD \ - 0x56E1 0x56F5 0x56EB 0x56F9 0x56FF 0x5704 0x570A 0x5709 \ - 0x571C 0x5E0F 0x5E19 0x5E14 0x5E11 0x5E31 0x5E3B 0x5E3C \ - 0x5E37 0x5E44 0x5E54 0x5E5B 0x5E5E 0x5E61 0x5C8C 0x5C7A \ - 0x5C8D 0x5C90 0x5C96 0x5C88 0x5C98 0x5C99 0x5C91 0x5C9A \ - 0x5C9C 0x5CB5 0x5CA2 0x5CBD 0x5CAC 0x5CAB 0x5CB1 0x5CA3 \ - 0x5CC1 0x5CB7 0x5CC4 0x5CD2 0x5CE4 0x5CCB 0x5CE5 0x5D02 \ - 0x5D03 0x5D27 0x5D26 0x5D2E 0x5D24 0x5D1E 0x5D06 0x5D1B \ - 0x5D58 0x5D3E 0x5D34 0x5D3D 0x5D6C 0x5D5B 0x5D6F 0x5D5D \ - 0x5D6B 0x5D4B 0x5D4A 0x5D69 0x5D74 0x5D82 0x5D99 0x5D9D \ - 0x8C73 0x5DB7 0x5DC5 0x5F73 0x5F77 0x5F82 0x5F87 0x5F89 \ - 0x5F8C 0x5F95 0x5F99 0x5F9C 0x5FA8 0x5FAD 0x5FB5 0x5FBC \ - 0x8862 0x5F61 0x72AD 0x72B0 0x72B4 0x72B7 0x72B8 0x72C3 \ - 0x72C1 0x72CE 0x72CD 0x72D2 0x72E8 0x72EF 0x72E9 0x72F2 \ - 0x72F4 0x72F7 0x7301 0x72F3 0x7303 0x72FA 0x72FB 0x7317 \ - 0x7313 0x7321 0x730A 0x731E 0x731D 0x7315 0x7322 0x7339 \ - 0x7325 0x732C 0x7338 0x7331 0x7350 0x734D 0x7357 0x7360 \ - 0x736C 0x736F 0x737E 0x821B 0x5925 0x98E7 0x5924 0x5902 \ - 0x9963 0x9967 0x9968 0x9969 0x996A 0x996B 0x996C 0x9974 -25 0x9977 0x997D 0x9980 0x9984 0x9987 0x998A 0x998D 0x9990 \ - 0x9991 0x9993 0x9994 0x9995 0x5E80 0x5E91 0x5E8B 0x5E96 \ - 0x5EA5 0x5EA0 0x5EB9 0x5EB5 0x5EBE 0x5EB3 0x8D53 0x5ED2 \ - 0x5ED1 0x5EDB 0x5EE8 0x5EEA 0x81BA 0x5FC4 0x5FC9 0x5FD6 \ - 0x5FCF 0x6003 0x5FEE 0x6004 0x5FE1 0x5FE4 0x5FFE 0x6005 \ - 0x6006 0x5FEA 0x5FED 0x5FF8 0x6019 0x6035 0x6026 0x601B \ - 0x600F 0x600D 0x6029 0x602B 0x600A 0x603F 0x6021 0x6078 \ - 0x6079 0x607B 0x607A 0x6042 0x606A 0x607D 0x6096 0x609A \ - 0x60AD 0x609D 0x6083 0x6092 0x608C 0x609B 0x60EC 0x60BB \ - 0x60B1 0x60DD 0x60D8 0x60C6 0x60DA 0x60B4 0x6120 0x6126 \ - 0x6115 0x6123 0x60F4 0x6100 0x610E 0x612B 0x614A 0x6175 \ - 0x61AC 0x6194 0x61A7 0x61B7 0x61D4 0x61F5 0x5FDD 0x96B3 \ - 0x95E9 0x95EB 0x95F1 0x95F3 0x95F5 0x95F6 0x95FC 0x95FE \ - 0x9603 0x9604 0x9606 0x9608 0x960A 0x960B 0x960C 0x960D \ - 0x960F 0x9612 0x9615 0x9616 0x9617 0x9619 0x961A 0x4E2C \ - 0x723F 0x6215 0x6C35 0x6C54 0x6C5C 0x6C4A 0x6CA3 0x6C85 \ - 0x6C90 0x6C94 0x6C8C 0x6C68 0x6C69 0x6C74 0x6C76 0x6C86 \ - 0x6CA9 0x6CD0 0x6CD4 0x6CAD 0x6CF7 0x6CF8 0x6CF1 0x6CD7 \ - 0x6CB2 0x6CE0 0x6CD6 0x6CFA 0x6CEB 0x6CEE 0x6CB1 0x6CD3 \ - 0x6CEF 0x6CFE 0x6D39 0x6D27 0x6D0C 0x6D43 0x6D48 0x6D07 \ - 0x6D04 0x6D19 0x6D0E 0x6D2B 0x6D4D 0x6D2E 0x6D35 0x6D1A \ - 0x6D4F 0x6D52 0x6D54 0x6D33 0x6D91 0x6D6F 0x6D9E 0x6DA0 \ - 0x6D5E 0x6D93 0x6D94 0x6D5C 0x6D60 0x6D7C 0x6D63 0x6E1A \ - 0x6DC7 0x6DC5 0x6DDE 0x6E0E 0x6DBF 0x6DE0 0x6E11 0x6DE6 \ - 0x6DDD 0x6DD9 0x6E16 0x6DAB 0x6E0C 0x6DAE 0x6E2B 0x6E6E \ - 0x6E4E 0x6E6B 0x6EB2 0x6E5F 0x6E86 0x6E53 0x6E54 0x6E32 \ - 0x6E25 0x6E44 0x6EDF 0x6EB1 0x6E98 0x6EE0 0x6F2D 0x6EE2 \ - 0x6EA5 0x6EA7 0x6EBD 0x6EBB 0x6EB7 0x6ED7 0x6EB4 0x6ECF \ - 0x6E8F 0x6EC2 0x6E9F 0x6F62 0x6F46 0x6F47 0x6F24 0x6F15 \ - 0x6EF9 0x6F2F 0x6F36 0x6F4B 0x6F74 0x6F2A 0x6F09 0x6F29 \ - 0x6F89 0x6F8D 0x6F8C 0x6F78 0x6F72 0x6F7C 0x6F7A 0x6FD1 \ - 0x6FC9 0x6FA7 0x6FB9 0x6FB6 0x6FC2 0x6FE1 0x6FEE 0x6FDE -26 0x6FE0 0x6FEF 0x701A 0x7023 0x701B 0x7039 0x7035 0x704F \ - 0x705E 0x5B80 0x5B84 0x5B95 0x5B93 0x5BA5 0x5BB8 0x752F \ - 0x9A9E 0x6434 0x5BE4 0x5BEE 0x8930 0x5BF0 0x8E47 0x8B07 \ - 0x8FB6 0x8FD3 0x8FD5 0x8FE5 0x8FEE 0x8FE4 0x8FE9 0x8FE6 \ - 0x8FF3 0x8FE8 0x9005 0x9004 0x900B 0x9026 0x9011 0x900D \ - 0x9016 0x9021 0x9035 0x9036 0x902D 0x902F 0x9044 0x9051 \ - 0x9052 0x9050 0x9068 0x9058 0x9062 0x905B 0x66B9 0x9074 \ - 0x907D 0x9082 0x9088 0x9083 0x908B 0x5F50 0x5F57 0x5F56 \ - 0x5F58 0x5C3B 0x54AB 0x5C50 0x5C59 0x5B71 0x5C63 0x5C66 \ - 0x7FBC 0x5F2A 0x5F29 0x5F2D 0x8274 0x5F3C 0x9B3B 0x5C6E \ - 0x5981 0x5983 0x598D 0x59A9 0x59AA 0x59A3 0x5997 0x59CA \ - 0x59AB 0x599E 0x59A4 0x59D2 0x59B2 0x59AF 0x59D7 0x59BE \ - 0x5A05 0x5A06 0x59DD 0x5A08 0x59E3 0x59D8 0x59F9 0x5A0C \ - 0x5A09 0x5A32 0x5A34 0x5A11 0x5A23 0x5A13 0x5A40 0x5A67 \ - 0x5A4A 0x5A55 0x5A3C 0x5A62 0x5A75 0x80EC 0x5AAA 0x5A9B \ - 0x5A77 0x5A7A 0x5ABE 0x5AEB 0x5AB2 0x5AD2 0x5AD4 0x5AB8 \ - 0x5AE0 0x5AE3 0x5AF1 0x5AD6 0x5AE6 0x5AD8 0x5ADC 0x5B09 \ - 0x5B17 0x5B16 0x5B32 0x5B37 0x5B40 0x5C15 0x5C1C 0x5B5A \ - 0x5B65 0x5B73 0x5B51 0x5B53 0x5B62 0x9A75 0x9A77 0x9A78 \ - 0x9A7A 0x9A7F 0x9A7D 0x9A80 0x9A81 0x9A85 0x9A88 0x9A8A \ - 0x9A90 0x9A92 0x9A93 0x9A96 0x9A98 0x9A9B 0x9A9C 0x9A9D \ - 0x9A9F 0x9AA0 0x9AA2 0x9AA3 0x9AA5 0x9AA7 0x7E9F 0x7EA1 \ - 0x7EA3 0x7EA5 0x7EA8 0x7EA9 0x7EAD 0x7EB0 0x7EBE 0x7EC0 \ - 0x7EC1 0x7EC2 0x7EC9 0x7ECB 0x7ECC 0x7ED0 0x7ED4 0x7ED7 \ - 0x7EDB 0x7EE0 0x7EE1 0x7EE8 0x7EEB 0x7EEE 0x7EEF 0x7EF1 \ - 0x7EF2 0x7F0D 0x7EF6 0x7EFA 0x7EFB 0x7EFE 0x7F01 0x7F02 \ - 0x7F03 0x7F07 0x7F08 0x7F0B 0x7F0C 0x7F0F 0x7F11 0x7F12 \ - 0x7F17 0x7F19 0x7F1C 0x7F1B 0x7F1F 0x7F21 0x7F22 0x7F23 \ - 0x7F24 0x7F25 0x7F26 0x7F27 0x7F2A 0x7F2B 0x7F2C 0x7F2D \ - 0x7F2F 0x7F30 0x7F31 0x7F32 0x7F33 0x7F35 0x5E7A 0x757F \ - 0x5DDB 0x753E 0x9095 0x738E 0x7391 0x73AE 0x73A2 0x739F \ - 0x73CF 0x73C2 0x73D1 0x73B7 0x73B3 0x73C0 0x73C9 0x73C8 -27 0x73E5 0x73D9 0x987C 0x740A 0x73E9 0x73E7 0x73DE 0x73BA \ - 0x73F2 0x740F 0x742A 0x745B 0x7426 0x7425 0x7428 0x7430 \ - 0x742E 0x742C 0x741B 0x741A 0x7441 0x745C 0x7457 0x7455 \ - 0x7459 0x7477 0x746D 0x747E 0x749C 0x748E 0x7480 0x7481 \ - 0x7487 0x748B 0x749E 0x74A8 0x74A9 0x7490 0x74A7 0x74D2 \ - 0x74BA 0x97EA 0x97EB 0x97EC 0x674C 0x6753 0x675E 0x6748 \ - 0x6769 0x67A5 0x6787 0x676A 0x6773 0x6798 0x67A7 0x6775 \ - 0x67A8 0x679E 0x67AD 0x678B 0x6777 0x677C 0x67F0 0x6809 \ - 0x67D8 0x680A 0x67E9 0x67B0 0x680C 0x67D9 0x67B5 0x67DA \ - 0x67B3 0x67DD 0x6800 0x67C3 0x67B8 0x67E2 0x680E 0x67C1 \ - 0x67FD 0x6832 0x6833 0x6860 0x6861 0x684E 0x6862 0x6844 \ - 0x6864 0x6883 0x681D 0x6855 0x6866 0x6841 0x6867 0x6840 \ - 0x683E 0x684A 0x6849 0x6829 0x68B5 0x688F 0x6874 0x6877 \ - 0x6893 0x686B 0x68C2 0x696E 0x68FC 0x691F 0x6920 0x68F9 \ - 0x6924 0x68F0 0x690B 0x6901 0x6957 0x68E3 0x6910 0x6971 \ - 0x6939 0x6960 0x6942 0x695D 0x6984 0x696B 0x6980 0x6998 \ - 0x6978 0x6934 0x69CC 0x6987 0x6988 0x69CE 0x6989 0x6966 \ - 0x6963 0x6979 0x699B 0x69A7 0x69BB 0x69AB 0x69AD 0x69D4 \ - 0x69B1 0x69C1 0x69CA 0x69DF 0x6995 0x69E0 0x698D 0x69FF \ - 0x6A2F 0x69ED 0x6A17 0x6A18 0x6A65 0x69F2 0x6A44 0x6A3E \ - 0x6AA0 0x6A50 0x6A5B 0x6A35 0x6A8E 0x6A79 0x6A3D 0x6A28 \ - 0x6A58 0x6A7C 0x6A91 0x6A90 0x6AA9 0x6A97 0x6AAB 0x7337 \ - 0x7352 0x6B81 0x6B82 0x6B87 0x6B84 0x6B92 0x6B93 0x6B8D \ - 0x6B9A 0x6B9B 0x6BA1 0x6BAA 0x8F6B 0x8F6D 0x8F71 0x8F72 \ - 0x8F73 0x8F75 0x8F76 0x8F78 0x8F77 0x8F79 0x8F7A 0x8F7C \ - 0x8F7E 0x8F81 0x8F82 0x8F84 0x8F87 0x8F8B 0x8F8D 0x8F8E \ - 0x8F8F 0x8F98 0x8F9A 0x8ECE 0x620B 0x6217 0x621B 0x621F \ - 0x6222 0x6221 0x6225 0x6224 0x622C 0x81E7 0x74EF 0x74F4 \ - 0x74FF 0x750F 0x7511 0x7513 0x6534 0x65EE 0x65EF 0x65F0 \ - 0x660A 0x6619 0x6772 0x6603 0x6615 0x6600 0x7085 0x66F7 \ - 0x661D 0x6634 0x6631 0x6636 0x6635 0x8006 0x665F 0x6654 \ - 0x6641 0x664F 0x6656 0x6661 0x6657 0x6677 0x6684 0x668C -28 0x66A7 0x669D 0x66BE 0x66DB 0x66DC 0x66E6 0x66E9 0x8D32 \ - 0x8D33 0x8D36 0x8D3B 0x8D3D 0x8D40 0x8D45 0x8D46 0x8D48 \ - 0x8D49 0x8D47 0x8D4D 0x8D55 0x8D59 0x89C7 0x89CA 0x89CB \ - 0x89CC 0x89CE 0x89CF 0x89D0 0x89D1 0x726E 0x729F 0x725D \ - 0x7266 0x726F 0x727E 0x727F 0x7284 0x728B 0x728D 0x728F \ - 0x7292 0x6308 0x6332 0x63B0 0x643F 0x64D8 0x8004 0x6BEA \ - 0x6BF3 0x6BFD 0x6BF5 0x6BF9 0x6C05 0x6C07 0x6C06 0x6C0D \ - 0x6C15 0x6C18 0x6C19 0x6C1A 0x6C21 0x6C29 0x6C24 0x6C2A \ - 0x6C32 0x6535 0x6555 0x656B 0x724D 0x7252 0x7256 0x7230 \ - 0x8662 0x5216 0x809F 0x809C 0x8093 0x80BC 0x670A 0x80BD \ - 0x80B1 0x80AB 0x80AD 0x80B4 0x80B7 0x80E7 0x80E8 0x80E9 \ - 0x80EA 0x80DB 0x80C2 0x80C4 0x80D9 0x80CD 0x80D7 0x6710 \ - 0x80DD 0x80EB 0x80F1 0x80F4 0x80ED 0x810D 0x810E 0x80F2 \ - 0x80FC 0x6715 0x8112 0x8C5A 0x8136 0x811E 0x812C 0x8118 \ - 0x8132 0x8148 0x814C 0x8153 0x8174 0x8159 0x815A 0x8171 \ - 0x8160 0x8169 0x817C 0x817D 0x816D 0x8167 0x584D 0x5AB5 \ - 0x8188 0x8182 0x8191 0x6ED5 0x81A3 0x81AA 0x81CC 0x6726 \ - 0x81CA 0x81BB 0x81C1 0x81A6 0x6B24 0x6B37 0x6B39 0x6B43 \ - 0x6B46 0x6B59 0x98D1 0x98D2 0x98D3 0x98D5 0x98D9 0x98DA \ - 0x6BB3 0x5F40 0x6BC2 0x89F3 0x6590 0x9F51 0x6593 0x65BC \ - 0x65C6 0x65C4 0x65C3 0x65CC 0x65CE 0x65D2 0x65D6 0x7080 \ - 0x709C 0x7096 0x709D 0x70BB 0x70C0 0x70B7 0x70AB 0x70B1 \ - 0x70E8 0x70CA 0x7110 0x7113 0x7116 0x712F 0x7131 0x7173 \ - 0x715C 0x7168 0x7145 0x7172 0x714A 0x7178 0x717A 0x7198 \ - 0x71B3 0x71B5 0x71A8 0x71A0 0x71E0 0x71D4 0x71E7 0x71F9 \ - 0x721D 0x7228 0x706C 0x7118 0x7166 0x71B9 0x623E 0x623D \ - 0x6243 0x6248 0x6249 0x793B 0x7940 0x7946 0x7949 0x795B \ - 0x795C 0x7953 0x795A 0x7962 0x7957 0x7960 0x796F 0x7967 \ - 0x797A 0x7985 0x798A 0x799A 0x79A7 0x79B3 0x5FD1 0x5FD0 \ - 0x603C 0x605D 0x605A 0x6067 0x6041 0x6059 0x6063 0x60AB \ - 0x6106 0x610D 0x615D 0x61A9 0x619D 0x61CB 0x61D1 0x6206 \ - 0x8080 0x807F 0x6C93 0x6CF6 0x6DFC 0x77F6 0x77F8 0x7800 -29 0x7809 0x7817 0x7818 0x7811 0x65AB 0x782D 0x781C 0x781D \ - 0x7839 0x783A 0x783B 0x781F 0x783C 0x7825 0x782C 0x7823 \ - 0x7829 0x784E 0x786D 0x7856 0x7857 0x7826 0x7850 0x7847 \ - 0x784C 0x786A 0x789B 0x7893 0x789A 0x7887 0x789C 0x78A1 \ - 0x78A3 0x78B2 0x78B9 0x78A5 0x78D4 0x78D9 0x78C9 0x78EC \ - 0x78F2 0x7905 0x78F4 0x7913 0x7924 0x791E 0x7934 0x9F9B \ - 0x9EF9 0x9EFB 0x9EFC 0x76F1 0x7704 0x770D 0x76F9 0x7707 \ - 0x7708 0x771A 0x7722 0x7719 0x772D 0x7726 0x7735 0x7738 \ - 0x7750 0x7751 0x7747 0x7743 0x775A 0x7768 0x7762 0x7765 \ - 0x777F 0x778D 0x777D 0x7780 0x778C 0x7791 0x779F 0x77A0 \ - 0x77B0 0x77B5 0x77BD 0x753A 0x7540 0x754E 0x754B 0x7548 \ - 0x755B 0x7572 0x7579 0x7583 0x7F58 0x7F61 0x7F5F 0x8A48 \ - 0x7F68 0x7F74 0x7F71 0x7F79 0x7F81 0x7F7E 0x76CD 0x76E5 \ - 0x8832 0x9485 0x9486 0x9487 0x948B 0x948A 0x948C 0x948D \ - 0x948F 0x9490 0x9494 0x9497 0x9495 0x949A 0x949B 0x949C \ - 0x94A3 0x94A4 0x94AB 0x94AA 0x94AD 0x94AC 0x94AF 0x94B0 \ - 0x94B2 0x94B4 0x94B6 0x94B7 0x94B8 0x94B9 0x94BA 0x94BC \ - 0x94BD 0x94BF 0x94C4 0x94C8 0x94C9 0x94CA 0x94CB 0x94CC \ - 0x94CD 0x94CE 0x94D0 0x94D1 0x94D2 0x94D5 0x94D6 0x94D7 \ - 0x94D9 0x94D8 0x94DB 0x94DE 0x94DF 0x94E0 0x94E2 0x94E4 \ - 0x94E5 0x94E7 0x94E8 0x94EA 0x94E9 0x94EB 0x94EE 0x94EF \ - 0x94F3 0x94F4 0x94F5 0x94F7 0x94F9 0x94FC 0x94FD 0x94FF \ - 0x9503 0x9502 0x9506 0x9507 0x9509 0x950A 0x950D 0x950E \ - 0x950F 0x9512 0x9513 0x9514 0x9515 0x9516 0x9518 0x951B \ - 0x951D 0x951E 0x951F 0x9522 0x952A 0x952B 0x9529 0x952C \ - 0x9531 0x9532 0x9534 0x9536 0x9537 0x9538 0x953C 0x953E \ - 0x953F 0x9542 0x9535 0x9544 0x9545 0x9546 0x9549 0x954C \ - 0x954E 0x954F 0x9552 0x9553 0x9554 0x9556 0x9557 0x9558 \ - 0x9559 0x955B 0x955E 0x955F 0x955D 0x9561 0x9562 0x9564 \ - 0x9565 0x9566 0x9567 0x9568 0x9569 0x956A 0x956B 0x956C \ - 0x956F 0x9571 0x9572 0x9573 0x953A 0x77E7 0x77EC 0x96C9 \ - 0x79D5 0x79ED 0x79E3 0x79EB 0x7A06 0x5D47 0x7A03 0x7A02 -30 0x7A1E 0x7A14 0x7A39 0x7A37 0x7A51 0x9ECF 0x99A5 0x7A70 \ - 0x7688 0x768E 0x7693 0x7699 0x76A4 0x74DE 0x74E0 0x752C \ - 0x9E20 0x9E22 0x9E28 0x9E29 0x9E2A 0x9E2B 0x9E2C 0x9E32 \ - 0x9E31 0x9E36 0x9E38 0x9E37 0x9E39 0x9E3A 0x9E3E 0x9E41 \ - 0x9E42 0x9E44 0x9E46 0x9E47 0x9E48 0x9E49 0x9E4B 0x9E4C \ - 0x9E4E 0x9E51 0x9E55 0x9E57 0x9E5A 0x9E5B 0x9E5C 0x9E5E \ - 0x9E63 0x9E66 0x9E67 0x9E68 0x9E69 0x9E6A 0x9E6B 0x9E6C \ - 0x9E71 0x9E6D 0x9E73 0x7592 0x7594 0x7596 0x75A0 0x759D \ - 0x75AC 0x75A3 0x75B3 0x75B4 0x75B8 0x75C4 0x75B1 0x75B0 \ - 0x75C3 0x75C2 0x75D6 0x75CD 0x75E3 0x75E8 0x75E6 0x75E4 \ - 0x75EB 0x75E7 0x7603 0x75F1 0x75FC 0x75FF 0x7610 0x7600 \ - 0x7605 0x760C 0x7617 0x760A 0x7625 0x7618 0x7615 0x7619 \ - 0x761B 0x763C 0x7622 0x7620 0x7640 0x762D 0x7630 0x763F \ - 0x7635 0x7643 0x763E 0x7633 0x764D 0x765E 0x7654 0x765C \ - 0x7656 0x766B 0x766F 0x7FCA 0x7AE6 0x7A78 0x7A79 0x7A80 \ - 0x7A86 0x7A88 0x7A95 0x7AA6 0x7AA0 0x7AAC 0x7AA8 0x7AAD \ - 0x7AB3 0x8864 0x8869 0x8872 0x887D 0x887F 0x8882 0x88A2 \ - 0x88C6 0x88B7 0x88BC 0x88C9 0x88E2 0x88CE 0x88E3 0x88E5 \ - 0x88F1 0x891A 0x88FC 0x88E8 0x88FE 0x88F0 0x8921 0x8919 \ - 0x8913 0x891B 0x890A 0x8934 0x892B 0x8936 0x8941 0x8966 \ - 0x897B 0x758B 0x80E5 0x76B2 0x76B4 0x77DC 0x8012 0x8014 \ - 0x8016 0x801C 0x8020 0x8022 0x8025 0x8026 0x8027 0x8029 \ - 0x8028 0x8031 0x800B 0x8035 0x8043 0x8046 0x804D 0x8052 \ - 0x8069 0x8071 0x8983 0x9878 0x9880 0x9883 0x9889 0x988C \ - 0x988D 0x988F 0x9894 0x989A 0x989B 0x989E 0x989F 0x98A1 \ - 0x98A2 0x98A5 0x98A6 0x864D 0x8654 0x866C 0x866E 0x867F \ - 0x867A 0x867C 0x867B 0x86A8 0x868D 0x868B 0x86AC 0x869D \ - 0x86A7 0x86A3 0x86AA 0x8693 0x86A9 0x86B6 0x86C4 0x86B5 \ - 0x86CE 0x86B0 0x86BA 0x86B1 0x86AF 0x86C9 0x86CF 0x86B4 \ - 0x86E9 0x86F1 0x86F2 0x86ED 0x86F3 0x86D0 0x8713 0x86DE \ - 0x86F4 0x86DF 0x86D8 0x86D1 0x8703 0x8707 0x86F8 0x8708 \ - 0x870A 0x870D 0x8709 0x8723 0x873B 0x871E 0x8725 0x872E -31 0x871A 0x873E 0x8748 0x8734 0x8731 0x8729 0x8737 0x873F \ - 0x8782 0x8722 0x877D 0x877E 0x877B 0x8760 0x8770 0x874C \ - 0x876E 0x878B 0x8753 0x8763 0x877C 0x8764 0x8759 0x8765 \ - 0x8793 0x87AF 0x87A8 0x87D2 0x87C6 0x8788 0x8785 0x87AD \ - 0x8797 0x8783 0x87AB 0x87E5 0x87AC 0x87B5 0x87B3 0x87CB \ - 0x87D3 0x87BD 0x87D1 0x87C0 0x87CA 0x87DB 0x87EA 0x87E0 \ - 0x87EE 0x8816 0x8813 0x87FE 0x880A 0x881B 0x8821 0x8839 \ - 0x883C 0x7F36 0x7F42 0x7F44 0x7F45 0x8210 0x7AFA 0x7AFD \ - 0x7B08 0x7B03 0x7B04 0x7B15 0x7B0A 0x7B2B 0x7B0F 0x7B47 \ - 0x7B38 0x7B2A 0x7B19 0x7B2E 0x7B31 0x7B20 0x7B25 0x7B24 \ - 0x7B33 0x7B3E 0x7B1E 0x7B58 0x7B5A 0x7B45 0x7B75 0x7B4C \ - 0x7B5D 0x7B60 0x7B6E 0x7B7B 0x7B62 0x7B72 0x7B71 0x7B90 \ - 0x7BA6 0x7BA7 0x7BB8 0x7BAC 0x7B9D 0x7BA8 0x7B85 0x7BAA \ - 0x7B9C 0x7BA2 0x7BAB 0x7BB4 0x7BD1 0x7BC1 0x7BCC 0x7BDD \ - 0x7BDA 0x7BE5 0x7BE6 0x7BEA 0x7C0C 0x7BFE 0x7BFC 0x7C0F \ - 0x7C16 0x7C0B 0x7C1F 0x7C2A 0x7C26 0x7C38 0x7C41 0x7C40 \ - 0x81FE 0x8201 0x8202 0x8204 0x81EC 0x8844 0x8221 0x8222 \ - 0x8223 0x822D 0x822F 0x8228 0x822B 0x8238 0x823B 0x8233 \ - 0x8234 0x823E 0x8244 0x8249 0x824B 0x824F 0x825A 0x825F \ - 0x8268 0x887E 0x8885 0x8888 0x88D8 0x88DF 0x895E 0x7F9D \ - 0x7F9F 0x7FA7 0x7FAF 0x7FB0 0x7FB2 0x7C7C 0x6549 0x7C91 \ - 0x7C9D 0x7C9C 0x7C9E 0x7CA2 0x7CB2 0x7CBC 0x7CBD 0x7CC1 \ - 0x7CC7 0x7CCC 0x7CCD 0x7CC8 0x7CC5 0x7CD7 0x7CE8 0x826E \ - 0x66A8 0x7FBF 0x7FCE 0x7FD5 0x7FE5 0x7FE1 0x7FE6 0x7FE9 \ - 0x7FEE 0x7FF3 0x7CF8 0x7D77 0x7DA6 0x7DAE 0x7E47 0x7E9B \ - 0x9EB8 0x9EB4 0x8D73 0x8D84 0x8D94 0x8D91 0x8DB1 0x8D67 \ - 0x8D6D 0x8C47 0x8C49 0x914A 0x9150 0x914E 0x914F 0x9164 \ - 0x9162 0x9161 0x9170 0x9169 0x916F 0x917D 0x917E 0x9172 \ - 0x9174 0x9179 0x918C 0x9185 0x9190 0x918D 0x9191 0x91A2 \ - 0x91A3 0x91AA 0x91AD 0x91AE 0x91AF 0x91B5 0x91B4 0x91BA \ - 0x8C55 0x9E7E 0x8DB8 0x8DEB 0x8E05 0x8E59 0x8E69 0x8DB5 \ - 0x8DBF 0x8DBC 0x8DBA 0x8DC4 0x8DD6 0x8DD7 0x8DDA 0x8DDE -32 0x8DCE 0x8DCF 0x8DDB 0x8DC6 0x8DEC 0x8DF7 0x8DF8 0x8DE3 \ - 0x8DF9 0x8DFB 0x8DE4 0x8E09 0x8DFD 0x8E14 0x8E1D 0x8E1F \ - 0x8E2C 0x8E2E 0x8E23 0x8E2F 0x8E3A 0x8E40 0x8E39 0x8E35 \ - 0x8E3D 0x8E31 0x8E49 0x8E41 0x8E42 0x8E51 0x8E52 0x8E4A \ - 0x8E70 0x8E76 0x8E7C 0x8E6F 0x8E74 0x8E85 0x8E8F 0x8E94 \ - 0x8E90 0x8E9C 0x8E9E 0x8C78 0x8C82 0x8C8A 0x8C85 0x8C98 \ - 0x8C94 0x659B 0x89D6 0x89DE 0x89DA 0x89DC 0x89E5 0x89EB \ - 0x89EF 0x8A3E 0x8B26 0x9753 0x96E9 0x96F3 0x96EF 0x9706 \ - 0x9701 0x9708 0x970F 0x970E 0x972A 0x972D 0x9730 0x973E \ - 0x9F80 0x9F83 0x9F85 0x9F86 0x9F87 0x9F88 0x9F89 0x9F8A \ - 0x9F8C 0x9EFE 0x9F0B 0x9F0D 0x96B9 0x96BC 0x96BD 0x96CE \ - 0x96D2 0x77BF 0x96E0 0x928E 0x92AE 0x92C8 0x933E 0x936A \ - 0x93CA 0x938F 0x943E 0x946B 0x9C7F 0x9C82 0x9C85 0x9C86 \ - 0x9C87 0x9C88 0x7A23 0x9C8B 0x9C8E 0x9C90 0x9C91 0x9C92 \ - 0x9C94 0x9C95 0x9C9A 0x9C9B 0x9C9E 0x9C9F 0x9CA0 0x9CA1 \ - 0x9CA2 0x9CA3 0x9CA5 0x9CA6 0x9CA7 0x9CA8 0x9CA9 0x9CAB \ - 0x9CAD 0x9CAE 0x9CB0 0x9CB1 0x9CB2 0x9CB3 0x9CB4 0x9CB5 \ - 0x9CB6 0x9CB7 0x9CBA 0x9CBB 0x9CBC 0x9CBD 0x9CC4 0x9CC5 \ - 0x9CC6 0x9CC7 0x9CCA 0x9CCB 0x9CCC 0x9CCD 0x9CCE 0x9CCF \ - 0x9CD0 0x9CD3 0x9CD4 0x9CD5 0x9CD7 0x9CD8 0x9CD9 0x9CDC \ - 0x9CDD 0x9CDF 0x9CE2 0x977C 0x9785 0x9791 0x9792 0x9794 \ - 0x97AF 0x97AB 0x97A3 0x97B2 0x97B4 0x9AB1 0x9AB0 0x9AB7 \ - 0x9E58 0x9AB6 0x9ABA 0x9ABC 0x9AC1 0x9AC0 0x9AC5 0x9AC2 \ - 0x9ACB 0x9ACC 0x9AD1 0x9B45 0x9B43 0x9B47 0x9B49 0x9B48 \ - 0x9B4D 0x9B51 0x98E8 0x990D 0x992E 0x9955 0x9954 0x9ADF \ - 0x9AE1 0x9AE6 0x9AEF 0x9AEB 0x9AFB 0x9AED 0x9AF9 0x9B08 \ - 0x9B0F 0x9B13 0x9B1F 0x9B23 0x9EBD 0x9EBE 0x7E3B 0x9E82 \ - 0x9E87 0x9E88 0x9E8B 0x9E92 0x93D6 0x9E9D 0x9E9F 0x9EDB \ - 0x9EDC 0x9EDD 0x9EE0 0x9EDF 0x9EE2 0x9EE9 0x9EE7 0x9EE5 \ - 0x9EEA 0x9EEF 0x9F22 0x9F2C 0x9F2F 0x9F39 0x9F37 0x9F3D \ - 0x9F3E 0x9F44 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -33 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -34 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -35 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UGBK.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UGBK.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UGBK.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UGBK.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UGBK.sfd Wed Mar 16 20:59:34 2005 @@ -1,3002 +0,0 @@ -# UGBK.sfd -# -# subfont numbers for GBK encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x4E02 0x4E04 0x4E05 0x4E06 0x4E0F 0x4E12 0x4E17 0x4E1F \ - 0x4E20 0x4E21 0x4E23 0x4E26 0x4E29 0x4E2E 0x4E2F 0x4E31 \ - 0x4E33 0x4E35 0x4E37 0x4E3C 0x4E40 0x4E41 0x4E42 0x4E44 \ - 0x4E46 0x4E4A 0x4E51 0x4E55 0x4E57 0x4E5A 0x4E5B 0x4E62 \ - 0x4E63 0x4E64 0x4E65 0x4E67 0x4E68 0x4E6A 0x4E6B 0x4E6C \ - 0x4E6D 0x4E6E 0x4E6F 0x4E72 0x4E74 0x4E75 0x4E76 0x4E77 \ - 0x4E78 0x4E79 0x4E7A 0x4E7B 0x4E7C 0x4E7D 0x4E7F 0x4E80 \ - 0x4E81 0x4E82 0x4E83 0x4E84 0x4E85 0x4E87 0x4E8A 0x4E90 \ - 0x4E96 0x4E97 0x4E99 0x4E9C 0x4E9D 0x4E9E 0x4EA3 0x4EAA \ - 0x4EAF 0x4EB0 0x4EB1 0x4EB4 0x4EB6 0x4EB7 0x4EB8 0x4EB9 \ - 0x4EBC 0x4EBD 0x4EBE 0x4EC8 0x4ECC 0x4ECF 0x4ED0 0x4ED2 \ - 0x4EDA 0x4EDB 0x4EDC 0x4EE0 0x4EE2 0x4EE6 0x4EE7 0x4EE9 \ - 0x4EED 0x4EEE 0x4EEF 0x4EF1 0x4EF4 0x4EF8 0x4EF9 0x4EFA \ - 0x4EFC 0x4EFE 0x4F00 0x4F02 0x4F03 0x4F04 0x4F05 0x4F06 \ - 0x4F07 0x4F08 0x4F0B 0x4F0C 0x4F12 0x4F13 0x4F14 0x4F15 \ - 0x4F16 0x4F1C 0x4F1D 0x4F21 0x4F23 0x4F28 0x4F29 0x4F2C \ - 0x4F2D 0x4F2E 0x4F31 0x4F33 0x4F35 0x4F37 0x4F39 0x4F3B \ - 0x4F3E 0x4F3F 0x4F40 0x4F41 0x4F42 0x4F44 0x4F45 0x4F47 \ - 0x4F48 0x4F49 0x4F4A 0x4F4B 0x4F4C 0x4F52 0x4F54 0x4F56 \ - 0x4F61 0x4F62 0x4F66 0x4F68 0x4F6A 0x4F6B 0x4F6D 0x4F6E \ - 0x4F71 0x4F72 0x4F75 0x4F77 0x4F78 0x4F79 0x4F7A 0x4F7D \ - 0x4F80 0x4F81 0x4F82 0x4F85 0x4F86 0x4F87 0x4F8A 0x4F8C \ - 0x4F8E 0x4F90 0x4F92 0x4F93 0x4F95 0x4F96 0x4F98 0x4F99 \ - 0x4F9A 0x4F9C 0x4F9E 0x4F9F 0x4FA1 0x4FA2 0x4FA4 0x4FAB \ - 0x4FAD 0x4FB0 0x4FB1 0x4FB2 0x4FB3 0x4FB4 0x4FB6 0x4FB7 \ - 0x4FB8 0x4FB9 0x4FBA 0x4FBB 0x4FBC 0x4FBD 0x4FBE 0x4FC0 \ - 0x4FC1 0x4FC2 0x4FC6 0x4FC7 0x4FC8 0x4FC9 0x4FCB 0x4FCC \ - 0x4FCD 0x4FD2 0x4FD3 0x4FD4 0x4FD5 0x4FD6 0x4FD9 0x4FDB \ - 0x4FE0 0x4FE2 0x4FE4 0x4FE5 0x4FE7 0x4FEB 0x4FEC 0x4FF0 \ - 0x4FF2 0x4FF4 0x4FF5 0x4FF6 0x4FF7 0x4FF9 0x4FFB 0x4FFC \ - 0x4FFD 0x4FFF 0x5000 0x5001 0x5002 0x5003 0x5004 0x5005 \ - 0x5006 0x5007 0x5008 0x5009 0x500A 0x500B 0x500E 0x5010 -02 0x5011 0x5013 0x5015 0x5016 0x5017 0x501B 0x501D 0x501E \ - 0x5020 0x5022 0x5023 0x5024 0x5027 0x502B 0x502F 0x5030 \ - 0x5031 0x5032 0x5033 0x5034 0x5035 0x5036 0x5037 0x5038 \ - 0x5039 0x503B 0x503D 0x503F 0x5040 0x5041 0x5042 0x5044 \ - 0x5045 0x5046 0x5049 0x504A 0x504B 0x504D 0x5050 0x5051 \ - 0x5052 0x5053 0x5054 0x5056 0x5057 0x5058 0x5059 0x505B \ - 0x505D 0x505E 0x505F 0x5060 0x5061 0x5062 0x5063 0x5064 \ - 0x5066 0x5067 0x5068 0x5069 0x506A 0x506B 0x506D 0x506E \ - 0x506F 0x5070 0x5071 0x5072 0x5073 0x5074 0x5075 0x5078 \ - 0x5079 0x507A 0x507C 0x507D 0x5081 0x5082 0x5083 0x5084 \ - 0x5086 0x5087 0x5089 0x508A 0x508B 0x508C 0x508E 0x508F \ - 0x5090 0x5091 0x5092 0x5093 0x5094 0x5095 0x5096 0x5097 \ - 0x5098 0x5099 0x509A 0x509B 0x509C 0x509D 0x509E 0x509F \ - 0x50A0 0x50A1 0x50A2 0x50A4 0x50A6 0x50AA 0x50AB 0x50AD \ - 0x50AE 0x50AF 0x50B0 0x50B1 0x50B3 0x50B4 0x50B5 0x50B6 \ - 0x50B7 0x50B8 0x50B9 0x50BC 0x50BD 0x50BE 0x50BF 0x50C0 \ - 0x50C1 0x50C2 0x50C3 0x50C4 0x50C5 0x50C6 0x50C7 0x50C8 \ - 0x50C9 0x50CA 0x50CB 0x50CC 0x50CD 0x50CE 0x50D0 0x50D1 \ - 0x50D2 0x50D3 0x50D4 0x50D5 0x50D7 0x50D8 0x50D9 0x50DB \ - 0x50DC 0x50DD 0x50DE 0x50DF 0x50E0 0x50E1 0x50E2 0x50E3 \ - 0x50E4 0x50E5 0x50E8 0x50E9 0x50EA 0x50EB 0x50EF 0x50F0 \ - 0x50F1 0x50F2 0x50F4 0x50F6 0x50F7 0x50F8 0x50F9 0x50FA \ - 0x50FC 0x50FD 0x50FE 0x50FF 0x5100 0x5101 0x5102 0x5103 \ - 0x5104 0x5105 0x5108 0x5109 0x510A 0x510C 0x510D 0x510E \ - 0x510F 0x5110 0x5111 0x5113 0x5114 0x5115 0x5116 0x5117 \ - 0x5118 0x5119 0x511A 0x511B 0x511C 0x511D 0x511E 0x511F \ - 0x5120 0x5122 0x5123 0x5124 0x5125 0x5126 0x5127 0x5128 \ - 0x5129 0x512A 0x512B 0x512C 0x512D 0x512E 0x512F 0x5130 \ - 0x5131 0x5132 0x5133 0x5134 0x5135 0x5136 0x5137 0x5138 \ - 0x5139 0x513A 0x513B 0x513C 0x513D 0x513E 0x5142 0x5147 \ - 0x514A 0x514C 0x514E 0x514F 0x5150 0x5152 0x5153 0x5157 \ - 0x5158 0x5159 0x515B 0x515D 0x515E 0x515F 0x5160 0x5161 -03 0x5163 0x5164 0x5166 0x5167 0x5169 0x516A 0x516F 0x5172 \ - 0x517A 0x517E 0x517F 0x5183 0x5184 0x5186 0x5187 0x518A \ - 0x518B 0x518E 0x518F 0x5190 0x5191 0x5193 0x5194 0x5198 \ - 0x519A 0x519D 0x519E 0x519F 0x51A1 0x51A3 0x51A6 0x51A7 \ - 0x51A8 0x51A9 0x51AA 0x51AD 0x51AE 0x51B4 0x51B8 0x51B9 \ - 0x51BA 0x51BE 0x51BF 0x51C1 0x51C2 0x51C3 0x51C5 0x51C8 \ - 0x51CA 0x51CD 0x51CE 0x51D0 0x51D2 0x51D3 0x51D4 0x51D5 \ - 0x51D6 0x51D7 0x51D8 0x51D9 0x51DA 0x51DC 0x51DE 0x51DF \ - 0x51E2 0x51E3 0x51E5 0x51E6 0x51E7 0x51E8 0x51E9 0x51EA \ - 0x51EC 0x51EE 0x51F1 0x51F2 0x51F4 0x51F7 0x51FE 0x5204 \ - 0x5205 0x5209 0x520B 0x520C 0x520F 0x5210 0x5213 0x5214 \ - 0x5215 0x521C 0x521E 0x521F 0x5221 0x5222 0x5223 0x5225 \ - 0x5226 0x5227 0x522A 0x522C 0x522F 0x5231 0x5232 0x5234 \ - 0x5235 0x523C 0x523E 0x5244 0x5245 0x5246 0x5247 0x5248 \ - 0x5249 0x524B 0x524E 0x524F 0x5252 0x5253 0x5255 0x5257 \ - 0x5258 0x5259 0x525A 0x525B 0x525D 0x525F 0x5260 0x5262 \ - 0x5263 0x5264 0x5266 0x5268 0x526B 0x526C 0x526D 0x526E \ - 0x5270 0x5271 0x5273 0x5274 0x5275 0x5276 0x5277 0x5278 \ - 0x5279 0x527A 0x527B 0x527C 0x527E 0x5280 0x5283 0x5284 \ - 0x5285 0x5286 0x5287 0x5289 0x528A 0x528B 0x528C 0x528D \ - 0x528E 0x528F 0x5291 0x5292 0x5294 0x5295 0x5296 0x5297 \ - 0x5298 0x5299 0x529A 0x529C 0x52A4 0x52A5 0x52A6 0x52A7 \ - 0x52AE 0x52AF 0x52B0 0x52B4 0x52B5 0x52B6 0x52B7 0x52B8 \ - 0x52B9 0x52BA 0x52BB 0x52BC 0x52BD 0x52C0 0x52C1 0x52C2 \ - 0x52C4 0x52C5 0x52C6 0x52C8 0x52CA 0x52CC 0x52CD 0x52CE \ - 0x52CF 0x52D1 0x52D3 0x52D4 0x52D5 0x52D7 0x52D9 0x52DA \ - 0x52DB 0x52DC 0x52DD 0x52DE 0x52E0 0x52E1 0x52E2 0x52E3 \ - 0x52E5 0x52E6 0x52E7 0x52E8 0x52E9 0x52EA 0x52EB 0x52EC \ - 0x52ED 0x52EE 0x52EF 0x52F1 0x52F2 0x52F3 0x52F4 0x52F5 \ - 0x52F6 0x52F7 0x52F8 0x52FB 0x52FC 0x52FD 0x5301 0x5302 \ - 0x5303 0x5304 0x5307 0x5309 0x530A 0x530B 0x530C 0x530E \ - 0x5311 0x5312 0x5313 0x5314 0x5318 0x531B 0x531C 0x531E -04 0x531F 0x5322 0x5324 0x5325 0x5327 0x5328 0x5329 0x532B \ - 0x532C 0x532D 0x532F 0x5330 0x5331 0x5332 0x5333 0x5334 \ - 0x5335 0x5336 0x5337 0x5338 0x533C 0x533D 0x5340 0x5342 \ - 0x5344 0x5346 0x534B 0x534C 0x534D 0x5350 0x5354 0x5358 \ - 0x5359 0x535B 0x535D 0x5365 0x5368 0x536A 0x536C 0x536D \ - 0x5372 0x5376 0x5379 0x537B 0x537C 0x537D 0x537E 0x5380 \ - 0x5381 0x5383 0x5387 0x5388 0x538A 0x538E 0x538F 0x5390 \ - 0x5391 0x5392 0x5393 0x5394 0x5396 0x5397 0x5399 0x539B \ - 0x539C 0x539E 0x53A0 0x53A1 0x53A4 0x53A7 0x53AA 0x53AB \ - 0x53AC 0x53AD 0x53AF 0x53B0 0x53B1 0x53B2 0x53B3 0x53B4 \ - 0x53B5 0x53B7 0x53B8 0x53B9 0x53BA 0x53BC 0x53BD 0x53BE \ - 0x53C0 0x53C3 0x53C4 0x53C5 0x53C6 0x53C7 0x53CE 0x53CF \ - 0x53D0 0x53D2 0x53D3 0x53D5 0x53DA 0x53DC 0x53DD 0x53DE \ - 0x53E1 0x53E2 0x53E7 0x53F4 0x53FA 0x53FE 0x53FF 0x5400 \ - 0x5402 0x5405 0x5407 0x540B 0x5414 0x5418 0x5419 0x541A \ - 0x541C 0x5422 0x5424 0x5425 0x542A 0x5430 0x5433 0x5436 \ - 0x5437 0x543A 0x543D 0x543F 0x5441 0x5442 0x5444 0x5445 \ - 0x5447 0x5449 0x544C 0x544D 0x544E 0x544F 0x5451 0x545A \ - 0x545D 0x545E 0x545F 0x5460 0x5461 0x5463 0x5465 0x5467 \ - 0x5469 0x546A 0x546B 0x546C 0x546D 0x546E 0x546F 0x5470 \ - 0x5474 0x5479 0x547A 0x547E 0x547F 0x5481 0x5483 0x5485 \ - 0x5487 0x5488 0x5489 0x548A 0x548D 0x5491 0x5493 0x5497 \ - 0x5498 0x549C 0x549E 0x549F 0x54A0 0x54A1 0x54A2 0x54A5 \ - 0x54AE 0x54B0 0x54B2 0x54B5 0x54B6 0x54B7 0x54B9 0x54BA \ - 0x54BC 0x54BE 0x54C3 0x54C5 0x54CA 0x54CB 0x54D6 0x54D8 \ - 0x54DB 0x54E0 0x54E1 0x54E2 0x54E3 0x54E4 0x54EB 0x54EC \ - 0x54EF 0x54F0 0x54F1 0x54F4 0x54F5 0x54F6 0x54F7 0x54F8 \ - 0x54F9 0x54FB 0x54FE 0x5500 0x5502 0x5503 0x5504 0x5505 \ - 0x5508 0x550A 0x550B 0x550C 0x550D 0x550E 0x5512 0x5513 \ - 0x5515 0x5516 0x5517 0x5518 0x5519 0x551A 0x551C 0x551D \ - 0x551E 0x551F 0x5521 0x5525 0x5526 0x5528 0x5529 0x552B \ - 0x552D 0x5532 0x5534 0x5535 0x5536 0x5538 0x5539 0x553A -05 0x553B 0x553D 0x5540 0x5542 0x5545 0x5547 0x5548 0x554B \ - 0x554C 0x554D 0x554E 0x554F 0x5551 0x5552 0x5553 0x5554 \ - 0x5557 0x5558 0x5559 0x555A 0x555B 0x555D 0x555E 0x555F \ - 0x5560 0x5562 0x5563 0x5568 0x5569 0x556B 0x556F 0x5570 \ - 0x5571 0x5572 0x5573 0x5574 0x5579 0x557A 0x557D 0x557F \ - 0x5585 0x5586 0x558C 0x558D 0x558E 0x5590 0x5592 0x5593 \ - 0x5595 0x5596 0x5597 0x559A 0x559B 0x559E 0x55A0 0x55A1 \ - 0x55A2 0x55A3 0x55A4 0x55A5 0x55A6 0x55A8 0x55A9 0x55AA \ - 0x55AB 0x55AC 0x55AD 0x55AE 0x55AF 0x55B0 0x55B2 0x55B4 \ - 0x55B6 0x55B8 0x55BA 0x55BC 0x55BF 0x55C0 0x55C1 0x55C2 \ - 0x55C3 0x55C6 0x55C7 0x55C8 0x55CA 0x55CB 0x55CE 0x55CF \ - 0x55D0 0x55D5 0x55D7 0x55D8 0x55D9 0x55DA 0x55DB 0x55DE \ - 0x55E0 0x55E2 0x55E7 0x55E9 0x55ED 0x55EE 0x55F0 0x55F1 \ - 0x55F4 0x55F6 0x55F8 0x55F9 0x55FA 0x55FB 0x55FC 0x55FF \ - 0x5602 0x5603 0x5604 0x5605 0x5606 0x5607 0x560A 0x560B \ - 0x560D 0x5610 0x5611 0x5612 0x5613 0x5614 0x5615 0x5616 \ - 0x5617 0x5619 0x561A 0x561C 0x561D 0x5620 0x5621 0x5622 \ - 0x5625 0x5626 0x5628 0x5629 0x562A 0x562B 0x562E 0x562F \ - 0x5630 0x5633 0x5635 0x5637 0x5638 0x563A 0x563C 0x563D \ - 0x563E 0x5640 0x5641 0x5642 0x5643 0x5644 0x5645 0x5646 \ - 0x5647 0x5648 0x5649 0x564A 0x564B 0x564F 0x5650 0x5651 \ - 0x5652 0x5653 0x5655 0x5656 0x565A 0x565B 0x565D 0x565E \ - 0x565F 0x5660 0x5661 0x5663 0x5665 0x5666 0x5667 0x566D \ - 0x566E 0x566F 0x5670 0x5672 0x5673 0x5674 0x5675 0x5677 \ - 0x5678 0x5679 0x567A 0x567D 0x567E 0x567F 0x5680 0x5681 \ - 0x5682 0x5683 0x5684 0x5687 0x5688 0x5689 0x568A 0x568B \ - 0x568C 0x568D 0x5690 0x5691 0x5692 0x5694 0x5695 0x5696 \ - 0x5697 0x5698 0x5699 0x569A 0x569B 0x569C 0x569D 0x569E \ - 0x569F 0x56A0 0x56A1 0x56A2 0x56A4 0x56A5 0x56A6 0x56A7 \ - 0x56A8 0x56A9 0x56AA 0x56AB 0x56AC 0x56AD 0x56AE 0x56B0 \ - 0x56B1 0x56B2 0x56B3 0x56B4 0x56B5 0x56B6 0x56B8 0x56B9 \ - 0x56BA 0x56BB 0x56BD 0x56BE 0x56BF 0x56C0 0x56C1 0x56C2 -06 0x56C3 0x56C4 0x56C5 0x56C6 0x56C7 0x56C8 0x56C9 0x56CB \ - 0x56CC 0x56CD 0x56CE 0x56CF 0x56D0 0x56D1 0x56D2 0x56D3 \ - 0x56D5 0x56D6 0x56D8 0x56D9 0x56DC 0x56E3 0x56E5 0x56E6 \ - 0x56E7 0x56E8 0x56E9 0x56EA 0x56EC 0x56EE 0x56EF 0x56F2 \ - 0x56F3 0x56F6 0x56F7 0x56F8 0x56FB 0x56FC 0x5700 0x5701 \ - 0x5702 0x5705 0x5707 0x570B 0x570C 0x570D 0x570E 0x570F \ - 0x5710 0x5711 0x5712 0x5713 0x5714 0x5715 0x5716 0x5717 \ - 0x5718 0x5719 0x571A 0x571B 0x571D 0x571E 0x5720 0x5721 \ - 0x5722 0x5724 0x5725 0x5726 0x5727 0x572B 0x5731 0x5732 \ - 0x5734 0x5735 0x5736 0x5737 0x5738 0x573C 0x573D 0x573F \ - 0x5741 0x5743 0x5744 0x5745 0x5746 0x5748 0x5749 0x574B \ - 0x5752 0x5753 0x5754 0x5755 0x5756 0x5758 0x5759 0x5762 \ - 0x5763 0x5765 0x5767 0x576C 0x576E 0x5770 0x5771 0x5772 \ - 0x5774 0x5775 0x5778 0x5779 0x577A 0x577D 0x577E 0x577F \ - 0x5780 0x5781 0x5787 0x5788 0x5789 0x578A 0x578D 0x578E \ - 0x578F 0x5790 0x5791 0x5794 0x5795 0x5796 0x5797 0x5798 \ - 0x5799 0x579A 0x579C 0x579D 0x579E 0x579F 0x57A5 0x57A8 \ - 0x57AA 0x57AC 0x57AF 0x57B0 0x57B1 0x57B3 0x57B5 0x57B6 \ - 0x57B7 0x57B9 0x57BA 0x57BB 0x57BC 0x57BD 0x57BE 0x57BF \ - 0x57C0 0x57C1 0x57C4 0x57C5 0x57C6 0x57C7 0x57C8 0x57C9 \ - 0x57CA 0x57CC 0x57CD 0x57D0 0x57D1 0x57D3 0x57D6 0x57D7 \ - 0x57DB 0x57DC 0x57DE 0x57E1 0x57E2 0x57E3 0x57E5 0x57E6 \ - 0x57E7 0x57E8 0x57E9 0x57EA 0x57EB 0x57EC 0x57EE 0x57F0 \ - 0x57F1 0x57F2 0x57F3 0x57F5 0x57F6 0x57F7 0x57FB 0x57FC \ - 0x57FE 0x57FF 0x5801 0x5803 0x5804 0x5805 0x5808 0x5809 \ - 0x580A 0x580C 0x580E 0x580F 0x5810 0x5812 0x5813 0x5814 \ - 0x5816 0x5817 0x5818 0x581A 0x581B 0x581C 0x581D 0x581F \ - 0x5822 0x5823 0x5825 0x5826 0x5827 0x5828 0x5829 0x582B \ - 0x582C 0x582D 0x582E 0x582F 0x5831 0x5832 0x5833 0x5834 \ - 0x5836 0x5837 0x5838 0x5839 0x583A 0x583B 0x583C 0x583D \ - 0x583E 0x583F 0x5840 0x5841 0x5842 0x5843 0x5845 0x5846 \ - 0x5847 0x5848 0x5849 0x584A 0x584B 0x584E 0x584F 0x5850 -07 0x5852 0x5853 0x5855 0x5856 0x5857 0x5859 0x585A 0x585B \ - 0x585C 0x585D 0x585F 0x5860 0x5861 0x5862 0x5863 0x5864 \ - 0x5866 0x5867 0x5868 0x5869 0x586A 0x586D 0x586E 0x586F \ - 0x5870 0x5871 0x5872 0x5873 0x5874 0x5875 0x5876 0x5877 \ - 0x5878 0x5879 0x587A 0x587B 0x587C 0x587D 0x587F 0x5882 \ - 0x5884 0x5886 0x5887 0x5888 0x588A 0x588B 0x588C 0x588D \ - 0x588E 0x588F 0x5890 0x5891 0x5894 0x5895 0x5896 0x5897 \ - 0x5898 0x589B 0x589C 0x589D 0x58A0 0x58A1 0x58A2 0x58A3 \ - 0x58A4 0x58A5 0x58A6 0x58A7 0x58AA 0x58AB 0x58AC 0x58AD \ - 0x58AE 0x58AF 0x58B0 0x58B1 0x58B2 0x58B3 0x58B4 0x58B5 \ - 0x58B6 0x58B7 0x58B8 0x58B9 0x58BA 0x58BB 0x58BD 0x58BE \ - 0x58BF 0x58C0 0x58C2 0x58C3 0x58C4 0x58C6 0x58C7 0x58C8 \ - 0x58C9 0x58CA 0x58CB 0x58CC 0x58CD 0x58CE 0x58CF 0x58D0 \ - 0x58D2 0x58D3 0x58D4 0x58D6 0x58D7 0x58D8 0x58D9 0x58DA \ - 0x58DB 0x58DC 0x58DD 0x58DE 0x58DF 0x58E0 0x58E1 0x58E2 \ - 0x58E3 0x58E5 0x58E6 0x58E7 0x58E8 0x58E9 0x58EA 0x58ED \ - 0x58EF 0x58F1 0x58F2 0x58F4 0x58F5 0x58F7 0x58F8 0x58FA \ - 0x58FB 0x58FC 0x58FD 0x58FE 0x58FF 0x5900 0x5901 0x5903 \ - 0x5905 0x5906 0x5908 0x5909 0x590A 0x590B 0x590C 0x590E \ - 0x5910 0x5911 0x5912 0x5913 0x5917 0x5918 0x591B 0x591D \ - 0x591E 0x5920 0x5921 0x5922 0x5923 0x5926 0x5928 0x592C \ - 0x5930 0x5932 0x5933 0x5935 0x5936 0x593B 0x593D 0x593E \ - 0x593F 0x5940 0x5943 0x5945 0x5946 0x594A 0x594C 0x594D \ - 0x5950 0x5952 0x5953 0x5959 0x595B 0x595C 0x595D 0x595E \ - 0x595F 0x5961 0x5963 0x5964 0x5966 0x5967 0x5968 0x5969 \ - 0x596A 0x596B 0x596C 0x596D 0x596E 0x596F 0x5970 0x5971 \ - 0x5972 0x5975 0x5977 0x597A 0x597B 0x597C 0x597E 0x597F \ - 0x5980 0x5985 0x5989 0x598B 0x598C 0x598E 0x598F 0x5990 \ - 0x5991 0x5994 0x5995 0x5998 0x599A 0x599B 0x599C 0x599D \ - 0x599F 0x59A0 0x59A1 0x59A2 0x59A6 0x59A7 0x59AC 0x59AD \ - 0x59B0 0x59B1 0x59B3 0x59B4 0x59B5 0x59B6 0x59B7 0x59B8 \ - 0x59BA 0x59BC 0x59BD 0x59BF 0x59C0 0x59C1 0x59C2 0x59C3 -08 0x59C4 0x59C5 0x59C7 0x59C8 0x59C9 0x59CC 0x59CD 0x59CE \ - 0x59CF 0x59D5 0x59D6 0x59D9 0x59DB 0x59DE 0x59DF 0x59E0 \ - 0x59E1 0x59E2 0x59E4 0x59E6 0x59E7 0x59E9 0x59EA 0x59EB \ - 0x59ED 0x59EE 0x59EF 0x59F0 0x59F1 0x59F2 0x59F3 0x59F4 \ - 0x59F5 0x59F6 0x59F7 0x59F8 0x59FA 0x59FC 0x59FD 0x59FE \ - 0x5A00 0x5A02 0x5A0A 0x5A0B 0x5A0D 0x5A0E 0x5A0F 0x5A10 \ - 0x5A12 0x5A14 0x5A15 0x5A16 0x5A17 0x5A19 0x5A1A 0x5A1B \ - 0x5A1D 0x5A1E 0x5A21 0x5A22 0x5A24 0x5A26 0x5A27 0x5A28 \ - 0x5A2A 0x5A2B 0x5A2C 0x5A2D 0x5A2E 0x5A2F 0x5A30 0x5A33 \ - 0x5A35 0x5A37 0x5A38 0x5A39 0x5A3A 0x5A3B 0x5A3D 0x5A3E \ - 0x5A3F 0x5A41 0x5A42 0x5A43 0x5A44 0x5A45 0x5A47 0x5A48 \ - 0x5A4B 0x5A4C 0x5A4D 0x5A4E 0x5A4F 0x5A50 0x5A51 0x5A52 \ - 0x5A53 0x5A54 0x5A56 0x5A57 0x5A58 0x5A59 0x5A5B 0x5A5C \ - 0x5A5D 0x5A5E 0x5A5F 0x5A60 0x5A61 0x5A63 0x5A64 0x5A65 \ - 0x5A66 0x5A68 0x5A69 0x5A6B 0x5A6C 0x5A6D 0x5A6E 0x5A6F \ - 0x5A70 0x5A71 0x5A72 0x5A73 0x5A78 0x5A79 0x5A7B 0x5A7C \ - 0x5A7D 0x5A7E 0x5A80 0x5A81 0x5A82 0x5A83 0x5A84 0x5A85 \ - 0x5A86 0x5A87 0x5A88 0x5A89 0x5A8A 0x5A8B 0x5A8C 0x5A8D \ - 0x5A8E 0x5A8F 0x5A90 0x5A91 0x5A93 0x5A94 0x5A95 0x5A96 \ - 0x5A97 0x5A98 0x5A99 0x5A9C 0x5A9D 0x5A9E 0x5A9F 0x5AA0 \ - 0x5AA1 0x5AA2 0x5AA3 0x5AA4 0x5AA5 0x5AA6 0x5AA7 0x5AA8 \ - 0x5AA9 0x5AAB 0x5AAC 0x5AAD 0x5AAE 0x5AAF 0x5AB0 0x5AB1 \ - 0x5AB4 0x5AB6 0x5AB7 0x5AB9 0x5ABA 0x5ABB 0x5ABC 0x5ABD \ - 0x5ABF 0x5AC0 0x5AC3 0x5AC4 0x5AC5 0x5AC6 0x5AC7 0x5AC8 \ - 0x5ACA 0x5ACB 0x5ACD 0x5ACE 0x5ACF 0x5AD0 0x5AD1 0x5AD3 \ - 0x5AD5 0x5AD7 0x5AD9 0x5ADA 0x5ADB 0x5ADD 0x5ADE 0x5ADF \ - 0x5AE2 0x5AE4 0x5AE5 0x5AE7 0x5AE8 0x5AEA 0x5AEC 0x5AED \ - 0x5AEE 0x5AEF 0x5AF0 0x5AF2 0x5AF3 0x5AF4 0x5AF5 0x5AF6 \ - 0x5AF7 0x5AF8 0x5AF9 0x5AFA 0x5AFB 0x5AFC 0x5AFD 0x5AFE \ - 0x5AFF 0x5B00 0x5B01 0x5B02 0x5B03 0x5B04 0x5B05 0x5B06 \ - 0x5B07 0x5B08 0x5B0A 0x5B0B 0x5B0C 0x5B0D 0x5B0E 0x5B0F \ - 0x5B10 0x5B11 0x5B12 0x5B13 0x5B14 0x5B15 0x5B18 0x5B19 -09 0x5B1A 0x5B1B 0x5B1C 0x5B1D 0x5B1E 0x5B1F 0x5B20 0x5B21 \ - 0x5B22 0x5B23 0x5B24 0x5B25 0x5B26 0x5B27 0x5B28 0x5B29 \ - 0x5B2A 0x5B2B 0x5B2C 0x5B2D 0x5B2E 0x5B2F 0x5B30 0x5B31 \ - 0x5B33 0x5B35 0x5B36 0x5B38 0x5B39 0x5B3A 0x5B3B 0x5B3C \ - 0x5B3D 0x5B3E 0x5B3F 0x5B41 0x5B42 0x5B43 0x5B44 0x5B45 \ - 0x5B46 0x5B47 0x5B48 0x5B49 0x5B4A 0x5B4B 0x5B4C 0x5B4D \ - 0x5B4E 0x5B4F 0x5B52 0x5B56 0x5B5E 0x5B60 0x5B61 0x5B67 \ - 0x5B68 0x5B6B 0x5B6D 0x5B6E 0x5B6F 0x5B72 0x5B74 0x5B76 \ - 0x5B77 0x5B78 0x5B79 0x5B7B 0x5B7C 0x5B7E 0x5B7F 0x5B82 \ - 0x5B86 0x5B8A 0x5B8D 0x5B8E 0x5B90 0x5B91 0x5B92 0x5B94 \ - 0x5B96 0x5B9F 0x5BA7 0x5BA8 0x5BA9 0x5BAC 0x5BAD 0x5BAE \ - 0x5BAF 0x5BB1 0x5BB2 0x5BB7 0x5BBA 0x5BBB 0x5BBC 0x5BC0 \ - 0x5BC1 0x5BC3 0x5BC8 0x5BC9 0x5BCA 0x5BCB 0x5BCD 0x5BCE \ - 0x5BCF 0x5BD1 0x5BD4 0x5BD5 0x5BD6 0x5BD7 0x5BD8 0x5BD9 \ - 0x5BDA 0x5BDB 0x5BDC 0x5BE0 0x5BE2 0x5BE3 0x5BE6 0x5BE7 \ - 0x5BE9 0x5BEA 0x5BEB 0x5BEC 0x5BED 0x5BEF 0x5BF1 0x5BF2 \ - 0x5BF3 0x5BF4 0x5BF5 0x5BF6 0x5BF7 0x5BFD 0x5BFE 0x5C00 \ - 0x5C02 0x5C03 0x5C05 0x5C07 0x5C08 0x5C0B 0x5C0C 0x5C0D \ - 0x5C0E 0x5C10 0x5C12 0x5C13 0x5C17 0x5C19 0x5C1B 0x5C1E \ - 0x5C1F 0x5C20 0x5C21 0x5C23 0x5C26 0x5C28 0x5C29 0x5C2A \ - 0x5C2B 0x5C2D 0x5C2E 0x5C2F 0x5C30 0x5C32 0x5C33 0x5C35 \ - 0x5C36 0x5C37 0x5C43 0x5C44 0x5C46 0x5C47 0x5C4C 0x5C4D \ - 0x5C52 0x5C53 0x5C54 0x5C56 0x5C57 0x5C58 0x5C5A 0x5C5B \ - 0x5C5C 0x5C5D 0x5C5F 0x5C62 0x5C64 0x5C67 0x5C68 0x5C69 \ - 0x5C6A 0x5C6B 0x5C6C 0x5C6D 0x5C70 0x5C72 0x5C73 0x5C74 \ - 0x5C75 0x5C76 0x5C77 0x5C78 0x5C7B 0x5C7C 0x5C7D 0x5C7E \ - 0x5C80 0x5C83 0x5C84 0x5C85 0x5C86 0x5C87 0x5C89 0x5C8A \ - 0x5C8B 0x5C8E 0x5C8F 0x5C92 0x5C93 0x5C95 0x5C9D 0x5C9E \ - 0x5C9F 0x5CA0 0x5CA1 0x5CA4 0x5CA5 0x5CA6 0x5CA7 0x5CA8 \ - 0x5CAA 0x5CAE 0x5CAF 0x5CB0 0x5CB2 0x5CB4 0x5CB6 0x5CB9 \ - 0x5CBA 0x5CBB 0x5CBC 0x5CBE 0x5CC0 0x5CC2 0x5CC3 0x5CC5 \ - 0x5CC6 0x5CC7 0x5CC8 0x5CC9 0x5CCA 0x5CCC 0x5CCD 0x5CCE -10 0x5CCF 0x5CD0 0x5CD1 0x5CD3 0x5CD4 0x5CD5 0x5CD6 0x5CD7 \ - 0x5CD8 0x5CDA 0x5CDB 0x5CDC 0x5CDD 0x5CDE 0x5CDF 0x5CE0 \ - 0x5CE2 0x5CE3 0x5CE7 0x5CE9 0x5CEB 0x5CEC 0x5CEE 0x5CEF \ - 0x5CF1 0x5CF2 0x5CF3 0x5CF4 0x5CF5 0x5CF6 0x5CF7 0x5CF8 \ - 0x5CF9 0x5CFA 0x5CFC 0x5CFD 0x5CFE 0x5CFF 0x5D00 0x5D01 \ - 0x5D04 0x5D05 0x5D08 0x5D09 0x5D0A 0x5D0B 0x5D0C 0x5D0D \ - 0x5D0F 0x5D10 0x5D11 0x5D12 0x5D13 0x5D15 0x5D17 0x5D18 \ - 0x5D19 0x5D1A 0x5D1C 0x5D1D 0x5D1F 0x5D20 0x5D21 0x5D22 \ - 0x5D23 0x5D25 0x5D28 0x5D2A 0x5D2B 0x5D2C 0x5D2F 0x5D30 \ - 0x5D31 0x5D32 0x5D33 0x5D35 0x5D36 0x5D37 0x5D38 0x5D39 \ - 0x5D3A 0x5D3B 0x5D3C 0x5D3F 0x5D40 0x5D41 0x5D42 0x5D43 \ - 0x5D44 0x5D45 0x5D46 0x5D48 0x5D49 0x5D4D 0x5D4E 0x5D4F \ - 0x5D50 0x5D51 0x5D52 0x5D53 0x5D54 0x5D55 0x5D56 0x5D57 \ - 0x5D59 0x5D5A 0x5D5C 0x5D5E 0x5D5F 0x5D60 0x5D61 0x5D62 \ - 0x5D63 0x5D64 0x5D65 0x5D66 0x5D67 0x5D68 0x5D6A 0x5D6D \ - 0x5D6E 0x5D70 0x5D71 0x5D72 0x5D73 0x5D75 0x5D76 0x5D77 \ - 0x5D78 0x5D79 0x5D7A 0x5D7B 0x5D7C 0x5D7D 0x5D7E 0x5D7F \ - 0x5D80 0x5D81 0x5D83 0x5D84 0x5D85 0x5D86 0x5D87 0x5D88 \ - 0x5D89 0x5D8A 0x5D8B 0x5D8C 0x5D8D 0x5D8E 0x5D8F 0x5D90 \ - 0x5D91 0x5D92 0x5D93 0x5D94 0x5D95 0x5D96 0x5D97 0x5D98 \ - 0x5D9A 0x5D9B 0x5D9C 0x5D9E 0x5D9F 0x5DA0 0x5DA1 0x5DA2 \ - 0x5DA3 0x5DA4 0x5DA5 0x5DA6 0x5DA7 0x5DA8 0x5DA9 0x5DAA \ - 0x5DAB 0x5DAC 0x5DAD 0x5DAE 0x5DAF 0x5DB0 0x5DB1 0x5DB2 \ - 0x5DB3 0x5DB4 0x5DB5 0x5DB6 0x5DB8 0x5DB9 0x5DBA 0x5DBB \ - 0x5DBC 0x5DBD 0x5DBE 0x5DBF 0x5DC0 0x5DC1 0x5DC2 0x5DC3 \ - 0x5DC4 0x5DC6 0x5DC7 0x5DC8 0x5DC9 0x5DCA 0x5DCB 0x5DCC \ - 0x5DCE 0x5DCF 0x5DD0 0x5DD1 0x5DD2 0x5DD3 0x5DD4 0x5DD5 \ - 0x5DD6 0x5DD7 0x5DD8 0x5DD9 0x5DDA 0x5DDC 0x5DDF 0x5DE0 \ - 0x5DE3 0x5DE4 0x5DEA 0x5DEC 0x5DED 0x5DF0 0x5DF5 0x5DF6 \ - 0x5DF8 0x5DF9 0x5DFA 0x5DFB 0x5DFC 0x5DFF 0x5E00 0x5E04 \ - 0x5E07 0x5E09 0x5E0A 0x5E0B 0x5E0D 0x5E0E 0x5E12 0x5E13 \ - 0x5E17 0x5E1E 0x5E1F 0x5E20 0x5E21 0x5E22 0x5E23 0x5E24 -11 0x5E25 0x5E28 0x5E29 0x5E2A 0x5E2B 0x5E2C 0x5E2F 0x5E30 \ - 0x5E32 0x5E33 0x5E34 0x5E35 0x5E36 0x5E39 0x5E3A 0x5E3E \ - 0x5E3F 0x5E40 0x5E41 0x5E43 0x5E46 0x5E47 0x5E48 0x5E49 \ - 0x5E4A 0x5E4B 0x5E4D 0x5E4E 0x5E4F 0x5E50 0x5E51 0x5E52 \ - 0x5E53 0x5E56 0x5E57 0x5E58 0x5E59 0x5E5A 0x5E5C 0x5E5D \ - 0x5E5F 0x5E60 0x5E63 0x5E64 0x5E65 0x5E66 0x5E67 0x5E68 \ - 0x5E69 0x5E6A 0x5E6B 0x5E6C 0x5E6D 0x5E6E 0x5E6F 0x5E70 \ - 0x5E71 0x5E75 0x5E77 0x5E79 0x5E7E 0x5E81 0x5E82 0x5E83 \ - 0x5E85 0x5E88 0x5E89 0x5E8C 0x5E8D 0x5E8E 0x5E92 0x5E98 \ - 0x5E9B 0x5E9D 0x5EA1 0x5EA2 0x5EA3 0x5EA4 0x5EA8 0x5EA9 \ - 0x5EAA 0x5EAB 0x5EAC 0x5EAE 0x5EAF 0x5EB0 0x5EB1 0x5EB2 \ - 0x5EB4 0x5EBA 0x5EBB 0x5EBC 0x5EBD 0x5EBF 0x5EC0 0x5EC1 \ - 0x5EC2 0x5EC3 0x5EC4 0x5EC5 0x5EC6 0x5EC7 0x5EC8 0x5ECB \ - 0x5ECC 0x5ECD 0x5ECE 0x5ECF 0x5ED0 0x5ED4 0x5ED5 0x5ED7 \ - 0x5ED8 0x5ED9 0x5EDA 0x5EDC 0x5EDD 0x5EDE 0x5EDF 0x5EE0 \ - 0x5EE1 0x5EE2 0x5EE3 0x5EE4 0x5EE5 0x5EE6 0x5EE7 0x5EE9 \ - 0x5EEB 0x5EEC 0x5EED 0x5EEE 0x5EEF 0x5EF0 0x5EF1 0x5EF2 \ - 0x5EF3 0x5EF5 0x5EF8 0x5EF9 0x5EFB 0x5EFC 0x5EFD 0x5F05 \ - 0x5F06 0x5F07 0x5F09 0x5F0C 0x5F0D 0x5F0E 0x5F10 0x5F12 \ - 0x5F14 0x5F16 0x5F19 0x5F1A 0x5F1C 0x5F1D 0x5F1E 0x5F21 \ - 0x5F22 0x5F23 0x5F24 0x5F28 0x5F2B 0x5F2C 0x5F2E 0x5F30 \ - 0x5F32 0x5F33 0x5F34 0x5F35 0x5F36 0x5F37 0x5F38 0x5F3B \ - 0x5F3D 0x5F3E 0x5F3F 0x5F41 0x5F42 0x5F43 0x5F44 0x5F45 \ - 0x5F46 0x5F47 0x5F48 0x5F49 0x5F4A 0x5F4B 0x5F4C 0x5F4D \ - 0x5F4E 0x5F4F 0x5F51 0x5F54 0x5F59 0x5F5A 0x5F5B 0x5F5C \ - 0x5F5E 0x5F5F 0x5F60 0x5F63 0x5F65 0x5F67 0x5F68 0x5F6B \ - 0x5F6E 0x5F6F 0x5F72 0x5F74 0x5F75 0x5F76 0x5F78 0x5F7A \ - 0x5F7D 0x5F7E 0x5F7F 0x5F83 0x5F86 0x5F8D 0x5F8E 0x5F8F \ - 0x5F91 0x5F93 0x5F94 0x5F96 0x5F9A 0x5F9B 0x5F9D 0x5F9E \ - 0x5F9F 0x5FA0 0x5FA2 0x5FA3 0x5FA4 0x5FA5 0x5FA6 0x5FA7 \ - 0x5FA9 0x5FAB 0x5FAC 0x5FAF 0x5FB0 0x5FB1 0x5FB2 0x5FB3 \ - 0x5FB4 0x5FB6 0x5FB8 0x5FB9 0x5FBA 0x5FBB 0x5FBE 0x5FBF -12 0x5FC0 0x5FC1 0x5FC2 0x5FC7 0x5FC8 0x5FCA 0x5FCB 0x5FCE \ - 0x5FD3 0x5FD4 0x5FD5 0x5FDA 0x5FDB 0x5FDC 0x5FDE 0x5FDF \ - 0x5FE2 0x5FE3 0x5FE5 0x5FE6 0x5FE8 0x5FE9 0x5FEC 0x5FEF \ - 0x5FF0 0x5FF2 0x5FF3 0x5FF4 0x5FF6 0x5FF7 0x5FF9 0x5FFA \ - 0x5FFC 0x6007 0x6008 0x6009 0x600B 0x600C 0x6010 0x6011 \ - 0x6013 0x6017 0x6018 0x601A 0x601E 0x601F 0x6022 0x6023 \ - 0x6024 0x602C 0x602D 0x602E 0x6030 0x6031 0x6032 0x6033 \ - 0x6034 0x6036 0x6037 0x6038 0x6039 0x603A 0x603D 0x603E \ - 0x6040 0x6044 0x6045 0x6046 0x6047 0x6048 0x6049 0x604A \ - 0x604C 0x604E 0x604F 0x6051 0x6053 0x6054 0x6056 0x6057 \ - 0x6058 0x605B 0x605C 0x605E 0x605F 0x6060 0x6061 0x6065 \ - 0x6066 0x606E 0x6071 0x6072 0x6074 0x6075 0x6077 0x607E \ - 0x6080 0x6081 0x6082 0x6085 0x6086 0x6087 0x6088 0x608A \ - 0x608B 0x608E 0x608F 0x6090 0x6091 0x6093 0x6095 0x6097 \ - 0x6098 0x6099 0x609C 0x609E 0x60A1 0x60A2 0x60A4 0x60A5 \ - 0x60A7 0x60A9 0x60AA 0x60AE 0x60B0 0x60B3 0x60B5 0x60B6 \ - 0x60B7 0x60B9 0x60BA 0x60BD 0x60BE 0x60BF 0x60C0 0x60C1 \ - 0x60C2 0x60C3 0x60C4 0x60C7 0x60C8 0x60C9 0x60CC 0x60CD \ - 0x60CE 0x60CF 0x60D0 0x60D2 0x60D3 0x60D4 0x60D6 0x60D7 \ - 0x60D9 0x60DB 0x60DE 0x60E1 0x60E2 0x60E3 0x60E4 0x60E5 \ - 0x60EA 0x60F1 0x60F2 0x60F5 0x60F7 0x60F8 0x60FB 0x60FC \ - 0x60FD 0x60FE 0x60FF 0x6102 0x6103 0x6104 0x6105 0x6107 \ - 0x610A 0x610B 0x610C 0x6110 0x6111 0x6112 0x6113 0x6114 \ - 0x6116 0x6117 0x6118 0x6119 0x611B 0x611C 0x611D 0x611E \ - 0x6121 0x6122 0x6125 0x6128 0x6129 0x612A 0x612C 0x612D \ - 0x612E 0x612F 0x6130 0x6131 0x6132 0x6133 0x6134 0x6135 \ - 0x6136 0x6137 0x6138 0x6139 0x613A 0x613B 0x613C 0x613D \ - 0x613E 0x6140 0x6141 0x6142 0x6143 0x6144 0x6145 0x6146 \ - 0x6147 0x6149 0x614B 0x614D 0x614F 0x6150 0x6152 0x6153 \ - 0x6154 0x6156 0x6157 0x6158 0x6159 0x615A 0x615B 0x615C \ - 0x615E 0x615F 0x6160 0x6161 0x6163 0x6164 0x6165 0x6166 \ - 0x6169 0x616A 0x616B 0x616C 0x616D 0x616E 0x616F 0x6171 -13 0x6172 0x6173 0x6174 0x6176 0x6178 0x6179 0x617A 0x617B \ - 0x617C 0x617D 0x617E 0x617F 0x6180 0x6181 0x6182 0x6183 \ - 0x6184 0x6185 0x6186 0x6187 0x6188 0x6189 0x618A 0x618C \ - 0x618D 0x618F 0x6190 0x6191 0x6192 0x6193 0x6195 0x6196 \ - 0x6197 0x6198 0x6199 0x619A 0x619B 0x619C 0x619E 0x619F \ - 0x61A0 0x61A1 0x61A2 0x61A3 0x61A4 0x61A5 0x61A6 0x61AA \ - 0x61AB 0x61AD 0x61AE 0x61AF 0x61B0 0x61B1 0x61B2 0x61B3 \ - 0x61B4 0x61B5 0x61B6 0x61B8 0x61B9 0x61BA 0x61BB 0x61BC \ - 0x61BD 0x61BF 0x61C0 0x61C1 0x61C3 0x61C4 0x61C5 0x61C6 \ - 0x61C7 0x61C9 0x61CC 0x61CD 0x61CE 0x61CF 0x61D0 0x61D3 \ - 0x61D5 0x61D6 0x61D7 0x61D8 0x61D9 0x61DA 0x61DB 0x61DC \ - 0x61DD 0x61DE 0x61DF 0x61E0 0x61E1 0x61E2 0x61E3 0x61E4 \ - 0x61E5 0x61E7 0x61E8 0x61E9 0x61EA 0x61EB 0x61EC 0x61ED \ - 0x61EE 0x61EF 0x61F0 0x61F1 0x61F2 0x61F3 0x61F4 0x61F6 \ - 0x61F7 0x61F8 0x61F9 0x61FA 0x61FB 0x61FC 0x61FD 0x61FE \ - 0x6200 0x6201 0x6202 0x6203 0x6204 0x6205 0x6207 0x6209 \ - 0x6213 0x6214 0x6219 0x621C 0x621D 0x621E 0x6220 0x6223 \ - 0x6226 0x6227 0x6228 0x6229 0x622B 0x622D 0x622F 0x6230 \ - 0x6231 0x6232 0x6235 0x6236 0x6238 0x6239 0x623A 0x623B \ - 0x623C 0x6242 0x6244 0x6245 0x6246 0x624A 0x624F 0x6250 \ - 0x6255 0x6256 0x6257 0x6259 0x625A 0x625C 0x625D 0x625E \ - 0x625F 0x6260 0x6261 0x6262 0x6264 0x6265 0x6268 0x6271 \ - 0x6272 0x6274 0x6275 0x6277 0x6278 0x627A 0x627B 0x627D \ - 0x6281 0x6282 0x6283 0x6285 0x6286 0x6287 0x6288 0x628B \ - 0x628C 0x628D 0x628E 0x628F 0x6290 0x6294 0x6299 0x629C \ - 0x629D 0x629E 0x62A3 0x62A6 0x62A7 0x62A9 0x62AA 0x62AD \ - 0x62AE 0x62AF 0x62B0 0x62B2 0x62B3 0x62B4 0x62B6 0x62B7 \ - 0x62B8 0x62BA 0x62BE 0x62C0 0x62C1 0x62C3 0x62CB 0x62CF \ - 0x62D1 0x62D5 0x62DD 0x62DE 0x62E0 0x62E1 0x62E4 0x62EA \ - 0x62EB 0x62F0 0x62F2 0x62F5 0x62F8 0x62F9 0x62FA 0x62FB \ - 0x6300 0x6303 0x6304 0x6305 0x6306 0x630A 0x630B 0x630C \ - 0x630D 0x630F 0x6310 0x6312 0x6313 0x6314 0x6315 0x6317 -14 0x6318 0x6319 0x631C 0x6326 0x6327 0x6329 0x632C 0x632D \ - 0x632E 0x6330 0x6331 0x6333 0x6334 0x6335 0x6336 0x6337 \ - 0x6338 0x633B 0x633C 0x633E 0x633F 0x6340 0x6341 0x6344 \ - 0x6347 0x6348 0x634A 0x6351 0x6352 0x6353 0x6354 0x6356 \ - 0x6357 0x6358 0x6359 0x635A 0x635B 0x635C 0x635D 0x6360 \ - 0x6364 0x6365 0x6366 0x6368 0x636A 0x636B 0x636C 0x636F \ - 0x6370 0x6372 0x6373 0x6374 0x6375 0x6378 0x6379 0x637C \ - 0x637D 0x637E 0x637F 0x6381 0x6383 0x6384 0x6385 0x6386 \ - 0x638B 0x638D 0x6391 0x6393 0x6394 0x6395 0x6397 0x6399 \ - 0x639A 0x639B 0x639C 0x639D 0x639E 0x639F 0x63A1 0x63A4 \ - 0x63A6 0x63AB 0x63AF 0x63B1 0x63B2 0x63B5 0x63B6 0x63B9 \ - 0x63BB 0x63BD 0x63BF 0x63C0 0x63C1 0x63C2 0x63C3 0x63C5 \ - 0x63C7 0x63C8 0x63CA 0x63CB 0x63CC 0x63D1 0x63D3 0x63D4 \ - 0x63D5 0x63D7 0x63D8 0x63D9 0x63DA 0x63DB 0x63DC 0x63DD \ - 0x63DF 0x63E2 0x63E4 0x63E5 0x63E6 0x63E7 0x63E8 0x63EB \ - 0x63EC 0x63EE 0x63EF 0x63F0 0x63F1 0x63F3 0x63F5 0x63F7 \ - 0x63F9 0x63FA 0x63FB 0x63FC 0x63FE 0x6403 0x6404 0x6406 \ - 0x6407 0x6408 0x6409 0x640A 0x640D 0x640E 0x6411 0x6412 \ - 0x6415 0x6416 0x6417 0x6418 0x6419 0x641A 0x641D 0x641F \ - 0x6422 0x6423 0x6424 0x6425 0x6427 0x6428 0x6429 0x642B \ - 0x642E 0x642F 0x6430 0x6431 0x6432 0x6433 0x6435 0x6436 \ - 0x6437 0x6438 0x6439 0x643B 0x643C 0x643E 0x6440 0x6442 \ - 0x6443 0x6449 0x644B 0x644C 0x644D 0x644E 0x644F 0x6450 \ - 0x6451 0x6453 0x6455 0x6456 0x6457 0x6459 0x645A 0x645B \ - 0x645C 0x645D 0x645F 0x6460 0x6461 0x6462 0x6463 0x6464 \ - 0x6465 0x6466 0x6468 0x646A 0x646B 0x646C 0x646E 0x646F \ - 0x6470 0x6471 0x6472 0x6473 0x6474 0x6475 0x6476 0x6477 \ - 0x647B 0x647C 0x647D 0x647E 0x647F 0x6480 0x6481 0x6483 \ - 0x6486 0x6488 0x6489 0x648A 0x648B 0x648C 0x648D 0x648E \ - 0x648F 0x6490 0x6493 0x6494 0x6497 0x6498 0x649A 0x649B \ - 0x649C 0x649D 0x649F 0x64A0 0x64A1 0x64A2 0x64A3 0x64A5 \ - 0x64A6 0x64A7 0x64A8 0x64AA 0x64AB 0x64AF 0x64B1 0x64B2 -15 0x64B3 0x64B4 0x64B6 0x64B9 0x64BB 0x64BD 0x64BE 0x64BF \ - 0x64C1 0x64C3 0x64C4 0x64C6 0x64C7 0x64C8 0x64C9 0x64CA \ - 0x64CB 0x64CC 0x64CF 0x64D1 0x64D3 0x64D4 0x64D5 0x64D6 \ - 0x64D9 0x64DA 0x64DB 0x64DC 0x64DD 0x64DF 0x64E0 0x64E1 \ - 0x64E3 0x64E5 0x64E7 0x64E8 0x64E9 0x64EA 0x64EB 0x64EC \ - 0x64ED 0x64EE 0x64EF 0x64F0 0x64F1 0x64F2 0x64F3 0x64F4 \ - 0x64F5 0x64F6 0x64F7 0x64F8 0x64F9 0x64FA 0x64FB 0x64FC \ - 0x64FD 0x64FE 0x64FF 0x6501 0x6502 0x6503 0x6504 0x6505 \ - 0x6506 0x6507 0x6508 0x650A 0x650B 0x650C 0x650D 0x650E \ - 0x650F 0x6510 0x6511 0x6513 0x6514 0x6515 0x6516 0x6517 \ - 0x6519 0x651A 0x651B 0x651C 0x651D 0x651E 0x651F 0x6520 \ - 0x6521 0x6522 0x6523 0x6524 0x6526 0x6527 0x6528 0x6529 \ - 0x652A 0x652C 0x652D 0x6530 0x6531 0x6532 0x6533 0x6537 \ - 0x653A 0x653C 0x653D 0x6540 0x6541 0x6542 0x6543 0x6544 \ - 0x6546 0x6547 0x654A 0x654B 0x654D 0x654E 0x6550 0x6552 \ - 0x6553 0x6554 0x6557 0x6558 0x655A 0x655C 0x655F 0x6560 \ - 0x6561 0x6564 0x6565 0x6567 0x6568 0x6569 0x656A 0x656D \ - 0x656E 0x656F 0x6571 0x6573 0x6575 0x6576 0x6578 0x6579 \ - 0x657A 0x657B 0x657C 0x657D 0x657E 0x657F 0x6580 0x6581 \ - 0x6582 0x6583 0x6584 0x6585 0x6586 0x6588 0x6589 0x658A \ - 0x658D 0x658E 0x658F 0x6592 0x6594 0x6595 0x6596 0x6598 \ - 0x659A 0x659D 0x659E 0x65A0 0x65A2 0x65A3 0x65A6 0x65A8 \ - 0x65AA 0x65AC 0x65AE 0x65B1 0x65B2 0x65B3 0x65B4 0x65B5 \ - 0x65B6 0x65B7 0x65B8 0x65BA 0x65BB 0x65BE 0x65BF 0x65C0 \ - 0x65C2 0x65C7 0x65C8 0x65C9 0x65CA 0x65CD 0x65D0 0x65D1 \ - 0x65D3 0x65D4 0x65D5 0x65D8 0x65D9 0x65DA 0x65DB 0x65DC \ - 0x65DD 0x65DE 0x65DF 0x65E1 0x65E3 0x65E4 0x65EA 0x65EB \ - 0x65F2 0x65F3 0x65F4 0x65F5 0x65F8 0x65F9 0x65FB 0x65FC \ - 0x65FD 0x65FE 0x65FF 0x6601 0x6604 0x6605 0x6607 0x6608 \ - 0x6609 0x660B 0x660D 0x6610 0x6611 0x6612 0x6616 0x6617 \ - 0x6618 0x661A 0x661B 0x661C 0x661E 0x6621 0x6622 0x6623 \ - 0x6624 0x6626 0x6629 0x662A 0x662B 0x662C 0x662E 0x6630 -16 0x6632 0x6633 0x6637 0x6638 0x6639 0x663A 0x663B 0x663D \ - 0x663F 0x6640 0x6642 0x6644 0x6645 0x6646 0x6647 0x6648 \ - 0x6649 0x664A 0x664D 0x664E 0x6650 0x6651 0x6658 0x6659 \ - 0x665B 0x665C 0x665D 0x665E 0x6660 0x6662 0x6663 0x6665 \ - 0x6667 0x6669 0x666A 0x666B 0x666C 0x666D 0x6671 0x6672 \ - 0x6673 0x6675 0x6678 0x6679 0x667B 0x667C 0x667D 0x667F \ - 0x6680 0x6681 0x6683 0x6685 0x6686 0x6688 0x6689 0x668A \ - 0x668B 0x668D 0x668E 0x668F 0x6690 0x6692 0x6693 0x6694 \ - 0x6695 0x6698 0x6699 0x669A 0x669B 0x669C 0x669E 0x669F \ - 0x66A0 0x66A1 0x66A2 0x66A3 0x66A4 0x66A5 0x66A6 0x66A9 \ - 0x66AA 0x66AB 0x66AC 0x66AD 0x66AF 0x66B0 0x66B1 0x66B2 \ - 0x66B3 0x66B5 0x66B6 0x66B7 0x66B8 0x66BA 0x66BB 0x66BC \ - 0x66BD 0x66BF 0x66C0 0x66C1 0x66C2 0x66C3 0x66C4 0x66C5 \ - 0x66C6 0x66C7 0x66C8 0x66C9 0x66CA 0x66CB 0x66CC 0x66CD \ - 0x66CE 0x66CF 0x66D0 0x66D1 0x66D2 0x66D3 0x66D4 0x66D5 \ - 0x66D6 0x66D7 0x66D8 0x66DA 0x66DE 0x66DF 0x66E0 0x66E1 \ - 0x66E2 0x66E3 0x66E4 0x66E5 0x66E7 0x66E8 0x66EA 0x66EB \ - 0x66EC 0x66ED 0x66EE 0x66EF 0x66F1 0x66F5 0x66F6 0x66F8 \ - 0x66FA 0x66FB 0x66FD 0x6701 0x6702 0x6703 0x6704 0x6705 \ - 0x6706 0x6707 0x670C 0x670E 0x670F 0x6711 0x6712 0x6713 \ - 0x6716 0x6718 0x6719 0x671A 0x671C 0x671E 0x6720 0x6721 \ - 0x6722 0x6723 0x6724 0x6725 0x6727 0x6729 0x672E 0x6730 \ - 0x6732 0x6733 0x6736 0x6737 0x6738 0x6739 0x673B 0x673C \ - 0x673E 0x673F 0x6741 0x6744 0x6745 0x6747 0x674A 0x674B \ - 0x674D 0x6752 0x6754 0x6755 0x6757 0x6758 0x6759 0x675A \ - 0x675B 0x675D 0x6762 0x6763 0x6764 0x6766 0x6767 0x676B \ - 0x676C 0x676E 0x6771 0x6774 0x6776 0x6778 0x6779 0x677A \ - 0x677B 0x677D 0x6780 0x6782 0x6783 0x6785 0x6786 0x6788 \ - 0x678A 0x678C 0x678D 0x678E 0x678F 0x6791 0x6792 0x6793 \ - 0x6794 0x6796 0x6799 0x679B 0x679F 0x67A0 0x67A1 0x67A4 \ - 0x67A6 0x67A9 0x67AC 0x67AE 0x67B1 0x67B2 0x67B4 0x67B9 \ - 0x67BA 0x67BB 0x67BC 0x67BD 0x67BE 0x67BF 0x67C0 0x67C2 -17 0x67C5 0x67C6 0x67C7 0x67C8 0x67C9 0x67CA 0x67CB 0x67CC \ - 0x67CD 0x67CE 0x67D5 0x67D6 0x67D7 0x67DB 0x67DF 0x67E1 \ - 0x67E3 0x67E4 0x67E6 0x67E7 0x67E8 0x67EA 0x67EB 0x67ED \ - 0x67EE 0x67F2 0x67F5 0x67F6 0x67F7 0x67F8 0x67F9 0x67FA \ - 0x67FB 0x67FC 0x67FE 0x6801 0x6802 0x6803 0x6804 0x6806 \ - 0x680D 0x6810 0x6812 0x6814 0x6815 0x6818 0x6819 0x681A \ - 0x681B 0x681C 0x681E 0x681F 0x6820 0x6822 0x6823 0x6824 \ - 0x6825 0x6826 0x6827 0x6828 0x682B 0x682C 0x682D 0x682E \ - 0x682F 0x6830 0x6831 0x6834 0x6835 0x6836 0x683A 0x683B \ - 0x683F 0x6847 0x684B 0x684D 0x684F 0x6852 0x6856 0x6857 \ - 0x6858 0x6859 0x685A 0x685B 0x685C 0x685D 0x685E 0x685F \ - 0x686A 0x686C 0x686D 0x686E 0x686F 0x6870 0x6871 0x6872 \ - 0x6873 0x6875 0x6878 0x6879 0x687A 0x687B 0x687C 0x687D \ - 0x687E 0x687F 0x6880 0x6882 0x6884 0x6887 0x6888 0x6889 \ - 0x688A 0x688B 0x688C 0x688D 0x688E 0x6890 0x6891 0x6892 \ - 0x6894 0x6895 0x6896 0x6898 0x6899 0x689A 0x689B 0x689C \ - 0x689D 0x689E 0x689F 0x68A0 0x68A1 0x68A3 0x68A4 0x68A5 \ - 0x68A9 0x68AA 0x68AB 0x68AC 0x68AE 0x68B1 0x68B2 0x68B4 \ - 0x68B6 0x68B7 0x68B8 0x68B9 0x68BA 0x68BB 0x68BC 0x68BD \ - 0x68BE 0x68BF 0x68C1 0x68C3 0x68C4 0x68C5 0x68C6 0x68C7 \ - 0x68C8 0x68CA 0x68CC 0x68CE 0x68CF 0x68D0 0x68D1 0x68D3 \ - 0x68D4 0x68D6 0x68D7 0x68D9 0x68DB 0x68DC 0x68DD 0x68DE \ - 0x68DF 0x68E1 0x68E2 0x68E4 0x68E5 0x68E6 0x68E7 0x68E8 \ - 0x68E9 0x68EA 0x68EB 0x68EC 0x68ED 0x68EF 0x68F2 0x68F3 \ - 0x68F4 0x68F6 0x68F7 0x68F8 0x68FB 0x68FD 0x68FE 0x68FF \ - 0x6900 0x6902 0x6903 0x6904 0x6906 0x6907 0x6908 0x6909 \ - 0x690A 0x690C 0x690F 0x6911 0x6913 0x6914 0x6915 0x6916 \ - 0x6917 0x6918 0x6919 0x691A 0x691B 0x691C 0x691D 0x691E \ - 0x6921 0x6922 0x6923 0x6925 0x6926 0x6927 0x6928 0x6929 \ - 0x692A 0x692B 0x692C 0x692E 0x692F 0x6931 0x6932 0x6933 \ - 0x6935 0x6936 0x6937 0x6938 0x693A 0x693B 0x693C 0x693E \ - 0x6940 0x6941 0x6943 0x6944 0x6945 0x6946 0x6947 0x6948 -18 0x6949 0x694A 0x694B 0x694C 0x694D 0x694E 0x694F 0x6950 \ - 0x6951 0x6952 0x6953 0x6955 0x6956 0x6958 0x6959 0x695B \ - 0x695C 0x695F 0x6961 0x6962 0x6964 0x6965 0x6967 0x6968 \ - 0x6969 0x696A 0x696C 0x696D 0x696F 0x6970 0x6972 0x6973 \ - 0x6974 0x6975 0x6976 0x697A 0x697B 0x697D 0x697E 0x697F \ - 0x6981 0x6983 0x6985 0x698A 0x698B 0x698C 0x698E 0x698F \ - 0x6990 0x6991 0x6992 0x6993 0x6996 0x6997 0x6999 0x699A \ - 0x699D 0x699E 0x699F 0x69A0 0x69A1 0x69A2 0x69A3 0x69A4 \ - 0x69A5 0x69A6 0x69A9 0x69AA 0x69AC 0x69AE 0x69AF 0x69B0 \ - 0x69B2 0x69B3 0x69B5 0x69B6 0x69B8 0x69B9 0x69BA 0x69BC \ - 0x69BD 0x69BE 0x69BF 0x69C0 0x69C2 0x69C3 0x69C4 0x69C5 \ - 0x69C6 0x69C7 0x69C8 0x69C9 0x69CB 0x69CD 0x69CF 0x69D1 \ - 0x69D2 0x69D3 0x69D5 0x69D6 0x69D7 0x69D8 0x69D9 0x69DA \ - 0x69DC 0x69DD 0x69DE 0x69E1 0x69E2 0x69E3 0x69E4 0x69E5 \ - 0x69E6 0x69E7 0x69E8 0x69E9 0x69EA 0x69EB 0x69EC 0x69EE \ - 0x69EF 0x69F0 0x69F1 0x69F3 0x69F4 0x69F5 0x69F6 0x69F7 \ - 0x69F8 0x69F9 0x69FA 0x69FB 0x69FC 0x69FE 0x6A00 0x6A01 \ - 0x6A02 0x6A03 0x6A04 0x6A05 0x6A06 0x6A07 0x6A08 0x6A09 \ - 0x6A0B 0x6A0C 0x6A0D 0x6A0E 0x6A0F 0x6A10 0x6A11 0x6A12 \ - 0x6A13 0x6A14 0x6A15 0x6A16 0x6A19 0x6A1A 0x6A1B 0x6A1C \ - 0x6A1D 0x6A1E 0x6A20 0x6A22 0x6A23 0x6A24 0x6A25 0x6A26 \ - 0x6A27 0x6A29 0x6A2B 0x6A2C 0x6A2D 0x6A2E 0x6A30 0x6A32 \ - 0x6A33 0x6A34 0x6A36 0x6A37 0x6A38 0x6A39 0x6A3A 0x6A3B \ - 0x6A3C 0x6A3F 0x6A40 0x6A41 0x6A42 0x6A43 0x6A45 0x6A46 \ - 0x6A48 0x6A49 0x6A4A 0x6A4B 0x6A4C 0x6A4D 0x6A4E 0x6A4F \ - 0x6A51 0x6A52 0x6A53 0x6A54 0x6A55 0x6A56 0x6A57 0x6A5A \ - 0x6A5C 0x6A5D 0x6A5E 0x6A5F 0x6A60 0x6A62 0x6A63 0x6A64 \ - 0x6A66 0x6A67 0x6A68 0x6A69 0x6A6A 0x6A6B 0x6A6C 0x6A6D \ - 0x6A6E 0x6A6F 0x6A70 0x6A72 0x6A73 0x6A74 0x6A75 0x6A76 \ - 0x6A77 0x6A78 0x6A7A 0x6A7B 0x6A7D 0x6A7E 0x6A7F 0x6A81 \ - 0x6A82 0x6A83 0x6A85 0x6A86 0x6A87 0x6A88 0x6A89 0x6A8A \ - 0x6A8B 0x6A8C 0x6A8D 0x6A8F 0x6A92 0x6A93 0x6A94 0x6A95 -19 0x6A96 0x6A98 0x6A99 0x6A9A 0x6A9B 0x6A9C 0x6A9D 0x6A9E \ - 0x6A9F 0x6AA1 0x6AA2 0x6AA3 0x6AA4 0x6AA5 0x6AA6 0x6AA7 \ - 0x6AA8 0x6AAA 0x6AAD 0x6AAE 0x6AAF 0x6AB0 0x6AB1 0x6AB2 \ - 0x6AB3 0x6AB4 0x6AB5 0x6AB6 0x6AB7 0x6AB8 0x6AB9 0x6ABA \ - 0x6ABB 0x6ABC 0x6ABD 0x6ABE 0x6ABF 0x6AC0 0x6AC1 0x6AC2 \ - 0x6AC3 0x6AC4 0x6AC5 0x6AC6 0x6AC7 0x6AC8 0x6AC9 0x6ACA \ - 0x6ACB 0x6ACC 0x6ACD 0x6ACE 0x6ACF 0x6AD0 0x6AD1 0x6AD2 \ - 0x6AD3 0x6AD4 0x6AD5 0x6AD6 0x6AD7 0x6AD8 0x6AD9 0x6ADA \ - 0x6ADB 0x6ADC 0x6ADD 0x6ADE 0x6ADF 0x6AE0 0x6AE1 0x6AE2 \ - 0x6AE3 0x6AE4 0x6AE5 0x6AE6 0x6AE7 0x6AE8 0x6AE9 0x6AEA \ - 0x6AEB 0x6AEC 0x6AED 0x6AEE 0x6AEF 0x6AF0 0x6AF1 0x6AF2 \ - 0x6AF3 0x6AF4 0x6AF5 0x6AF6 0x6AF7 0x6AF8 0x6AF9 0x6AFA \ - 0x6AFB 0x6AFC 0x6AFD 0x6AFE 0x6AFF 0x6B00 0x6B01 0x6B02 \ - 0x6B03 0x6B04 0x6B05 0x6B06 0x6B07 0x6B08 0x6B09 0x6B0A \ - 0x6B0B 0x6B0C 0x6B0D 0x6B0E 0x6B0F 0x6B10 0x6B11 0x6B12 \ - 0x6B13 0x6B14 0x6B15 0x6B16 0x6B17 0x6B18 0x6B19 0x6B1A \ - 0x6B1B 0x6B1C 0x6B1D 0x6B1E 0x6B1F 0x6B25 0x6B26 0x6B28 \ - 0x6B29 0x6B2A 0x6B2B 0x6B2C 0x6B2D 0x6B2E 0x6B2F 0x6B30 \ - 0x6B31 0x6B33 0x6B34 0x6B35 0x6B36 0x6B38 0x6B3B 0x6B3C \ - 0x6B3D 0x6B3F 0x6B40 0x6B41 0x6B42 0x6B44 0x6B45 0x6B48 \ - 0x6B4A 0x6B4B 0x6B4D 0x6B4E 0x6B4F 0x6B50 0x6B51 0x6B52 \ - 0x6B53 0x6B54 0x6B55 0x6B56 0x6B57 0x6B58 0x6B5A 0x6B5B \ - 0x6B5C 0x6B5D 0x6B5E 0x6B5F 0x6B60 0x6B61 0x6B68 0x6B69 \ - 0x6B6B 0x6B6C 0x6B6D 0x6B6E 0x6B6F 0x6B70 0x6B71 0x6B72 \ - 0x6B73 0x6B74 0x6B75 0x6B76 0x6B77 0x6B78 0x6B7A 0x6B7D \ - 0x6B7E 0x6B7F 0x6B80 0x6B85 0x6B88 0x6B8C 0x6B8E 0x6B8F \ - 0x6B90 0x6B91 0x6B94 0x6B95 0x6B97 0x6B98 0x6B99 0x6B9C \ - 0x6B9D 0x6B9E 0x6B9F 0x6BA0 0x6BA2 0x6BA3 0x6BA4 0x6BA5 \ - 0x6BA6 0x6BA7 0x6BA8 0x6BA9 0x6BAB 0x6BAC 0x6BAD 0x6BAE \ - 0x6BAF 0x6BB0 0x6BB1 0x6BB2 0x6BB6 0x6BB8 0x6BB9 0x6BBA \ - 0x6BBB 0x6BBC 0x6BBD 0x6BBE 0x6BC0 0x6BC3 0x6BC4 0x6BC6 \ - 0x6BC7 0x6BC8 0x6BC9 0x6BCA 0x6BCC 0x6BCE 0x6BD0 0x6BD1 -20 0x6BD8 0x6BDA 0x6BDC 0x6BDD 0x6BDE 0x6BDF 0x6BE0 0x6BE2 \ - 0x6BE3 0x6BE4 0x6BE5 0x6BE6 0x6BE7 0x6BE8 0x6BE9 0x6BEC \ - 0x6BED 0x6BEE 0x6BF0 0x6BF1 0x6BF2 0x6BF4 0x6BF6 0x6BF7 \ - 0x6BF8 0x6BFA 0x6BFB 0x6BFC 0x6BFE 0x6BFF 0x6C00 0x6C01 \ - 0x6C02 0x6C03 0x6C04 0x6C08 0x6C09 0x6C0A 0x6C0B 0x6C0C \ - 0x6C0E 0x6C12 0x6C17 0x6C1C 0x6C1D 0x6C1E 0x6C20 0x6C23 \ - 0x6C25 0x6C2B 0x6C2C 0x6C2D 0x6C31 0x6C33 0x6C36 0x6C37 \ - 0x6C39 0x6C3A 0x6C3B 0x6C3C 0x6C3E 0x6C3F 0x6C43 0x6C44 \ - 0x6C45 0x6C48 0x6C4B 0x6C4C 0x6C4D 0x6C4E 0x6C4F 0x6C51 \ - 0x6C52 0x6C53 0x6C56 0x6C58 0x6C59 0x6C5A 0x6C62 0x6C63 \ - 0x6C65 0x6C66 0x6C67 0x6C6B 0x6C6C 0x6C6D 0x6C6E 0x6C6F \ - 0x6C71 0x6C73 0x6C75 0x6C77 0x6C78 0x6C7A 0x6C7B 0x6C7C \ - 0x6C7F 0x6C80 0x6C84 0x6C87 0x6C8A 0x6C8B 0x6C8D 0x6C8E \ - 0x6C91 0x6C92 0x6C95 0x6C96 0x6C97 0x6C98 0x6C9A 0x6C9C \ - 0x6C9D 0x6C9E 0x6CA0 0x6CA2 0x6CA8 0x6CAC 0x6CAF 0x6CB0 \ - 0x6CB4 0x6CB5 0x6CB6 0x6CB7 0x6CBA 0x6CC0 0x6CC1 0x6CC2 \ - 0x6CC3 0x6CC6 0x6CC7 0x6CC8 0x6CCB 0x6CCD 0x6CCE 0x6CCF \ - 0x6CD1 0x6CD2 0x6CD8 0x6CD9 0x6CDA 0x6CDC 0x6CDD 0x6CDF \ - 0x6CE4 0x6CE6 0x6CE7 0x6CE9 0x6CEC 0x6CED 0x6CF2 0x6CF4 \ - 0x6CF9 0x6CFF 0x6D00 0x6D02 0x6D03 0x6D05 0x6D06 0x6D08 \ - 0x6D09 0x6D0A 0x6D0D 0x6D0F 0x6D10 0x6D11 0x6D13 0x6D14 \ - 0x6D15 0x6D16 0x6D18 0x6D1C 0x6D1D 0x6D1F 0x6D20 0x6D21 \ - 0x6D22 0x6D23 0x6D24 0x6D26 0x6D28 0x6D29 0x6D2C 0x6D2D \ - 0x6D2F 0x6D30 0x6D34 0x6D36 0x6D37 0x6D38 0x6D3A 0x6D3F \ - 0x6D40 0x6D42 0x6D44 0x6D49 0x6D4C 0x6D50 0x6D55 0x6D56 \ - 0x6D57 0x6D58 0x6D5B 0x6D5D 0x6D5F 0x6D61 0x6D62 0x6D64 \ - 0x6D65 0x6D67 0x6D68 0x6D6B 0x6D6C 0x6D6D 0x6D70 0x6D71 \ - 0x6D72 0x6D73 0x6D75 0x6D76 0x6D79 0x6D7A 0x6D7B 0x6D7D \ - 0x6D7E 0x6D7F 0x6D80 0x6D81 0x6D83 0x6D84 0x6D86 0x6D87 \ - 0x6D8A 0x6D8B 0x6D8D 0x6D8F 0x6D90 0x6D92 0x6D96 0x6D97 \ - 0x6D98 0x6D99 0x6D9A 0x6D9C 0x6DA2 0x6DA5 0x6DAC 0x6DAD \ - 0x6DB0 0x6DB1 0x6DB3 0x6DB4 0x6DB6 0x6DB7 0x6DB9 0x6DBA -21 0x6DBB 0x6DBC 0x6DBD 0x6DBE 0x6DC1 0x6DC2 0x6DC3 0x6DC8 \ - 0x6DC9 0x6DCA 0x6DCD 0x6DCE 0x6DCF 0x6DD0 0x6DD2 0x6DD3 \ - 0x6DD4 0x6DD5 0x6DD7 0x6DDA 0x6DDB 0x6DDC 0x6DDF 0x6DE2 \ - 0x6DE3 0x6DE5 0x6DE7 0x6DE8 0x6DE9 0x6DEA 0x6DED 0x6DEF \ - 0x6DF0 0x6DF2 0x6DF4 0x6DF5 0x6DF6 0x6DF8 0x6DFA 0x6DFD \ - 0x6DFE 0x6DFF 0x6E00 0x6E01 0x6E02 0x6E03 0x6E04 0x6E06 \ - 0x6E07 0x6E08 0x6E09 0x6E0B 0x6E0F 0x6E12 0x6E13 0x6E15 \ - 0x6E18 0x6E19 0x6E1B 0x6E1C 0x6E1E 0x6E1F 0x6E22 0x6E26 \ - 0x6E27 0x6E28 0x6E2A 0x6E2C 0x6E2E 0x6E30 0x6E31 0x6E33 \ - 0x6E35 0x6E36 0x6E37 0x6E39 0x6E3B 0x6E3C 0x6E3D 0x6E3E \ - 0x6E3F 0x6E40 0x6E41 0x6E42 0x6E45 0x6E46 0x6E47 0x6E48 \ - 0x6E49 0x6E4A 0x6E4B 0x6E4C 0x6E4F 0x6E50 0x6E51 0x6E52 \ - 0x6E55 0x6E57 0x6E59 0x6E5A 0x6E5C 0x6E5D 0x6E5E 0x6E60 \ - 0x6E61 0x6E62 0x6E63 0x6E64 0x6E65 0x6E66 0x6E67 0x6E68 \ - 0x6E69 0x6E6A 0x6E6C 0x6E6D 0x6E6F 0x6E70 0x6E71 0x6E72 \ - 0x6E73 0x6E74 0x6E75 0x6E76 0x6E77 0x6E78 0x6E79 0x6E7A \ - 0x6E7B 0x6E7C 0x6E7D 0x6E80 0x6E81 0x6E82 0x6E84 0x6E87 \ - 0x6E88 0x6E8A 0x6E8B 0x6E8C 0x6E8D 0x6E8E 0x6E91 0x6E92 \ - 0x6E93 0x6E94 0x6E95 0x6E96 0x6E97 0x6E99 0x6E9A 0x6E9B \ - 0x6E9D 0x6E9E 0x6EA0 0x6EA1 0x6EA3 0x6EA4 0x6EA6 0x6EA8 \ - 0x6EA9 0x6EAB 0x6EAC 0x6EAD 0x6EAE 0x6EB0 0x6EB3 0x6EB5 \ - 0x6EB8 0x6EB9 0x6EBC 0x6EBE 0x6EBF 0x6EC0 0x6EC3 0x6EC4 \ - 0x6EC5 0x6EC6 0x6EC8 0x6EC9 0x6ECA 0x6ECC 0x6ECD 0x6ECE \ - 0x6ED0 0x6ED2 0x6ED6 0x6ED8 0x6ED9 0x6EDB 0x6EDC 0x6EDD \ - 0x6EE3 0x6EE7 0x6EEA 0x6EEB 0x6EEC 0x6EED 0x6EEE 0x6EEF \ - 0x6EF0 0x6EF1 0x6EF2 0x6EF3 0x6EF5 0x6EF6 0x6EF7 0x6EF8 \ - 0x6EFA 0x6EFB 0x6EFC 0x6EFD 0x6EFE 0x6EFF 0x6F00 0x6F01 \ - 0x6F03 0x6F04 0x6F05 0x6F07 0x6F08 0x6F0A 0x6F0B 0x6F0C \ - 0x6F0D 0x6F0E 0x6F10 0x6F11 0x6F12 0x6F16 0x6F17 0x6F18 \ - 0x6F19 0x6F1A 0x6F1B 0x6F1C 0x6F1D 0x6F1E 0x6F1F 0x6F21 \ - 0x6F22 0x6F23 0x6F25 0x6F26 0x6F27 0x6F28 0x6F2C 0x6F2E \ - 0x6F30 0x6F32 0x6F34 0x6F35 0x6F37 0x6F38 0x6F39 0x6F3A -22 0x6F3B 0x6F3C 0x6F3D 0x6F3F 0x6F40 0x6F41 0x6F42 0x6F43 \ - 0x6F44 0x6F45 0x6F48 0x6F49 0x6F4A 0x6F4C 0x6F4E 0x6F4F \ - 0x6F50 0x6F51 0x6F52 0x6F53 0x6F54 0x6F55 0x6F56 0x6F57 \ - 0x6F59 0x6F5A 0x6F5B 0x6F5D 0x6F5F 0x6F60 0x6F61 0x6F63 \ - 0x6F64 0x6F65 0x6F67 0x6F68 0x6F69 0x6F6A 0x6F6B 0x6F6C \ - 0x6F6F 0x6F70 0x6F71 0x6F73 0x6F75 0x6F76 0x6F77 0x6F79 \ - 0x6F7B 0x6F7D 0x6F7E 0x6F7F 0x6F80 0x6F81 0x6F82 0x6F83 \ - 0x6F85 0x6F86 0x6F87 0x6F8A 0x6F8B 0x6F8F 0x6F90 0x6F91 \ - 0x6F92 0x6F93 0x6F94 0x6F95 0x6F96 0x6F97 0x6F98 0x6F99 \ - 0x6F9A 0x6F9B 0x6F9D 0x6F9E 0x6F9F 0x6FA0 0x6FA2 0x6FA3 \ - 0x6FA4 0x6FA5 0x6FA6 0x6FA8 0x6FA9 0x6FAA 0x6FAB 0x6FAC \ - 0x6FAD 0x6FAE 0x6FAF 0x6FB0 0x6FB1 0x6FB2 0x6FB4 0x6FB5 \ - 0x6FB7 0x6FB8 0x6FBA 0x6FBB 0x6FBC 0x6FBD 0x6FBE 0x6FBF \ - 0x6FC1 0x6FC3 0x6FC4 0x6FC5 0x6FC6 0x6FC7 0x6FC8 0x6FCA \ - 0x6FCB 0x6FCC 0x6FCD 0x6FCE 0x6FCF 0x6FD0 0x6FD3 0x6FD4 \ - 0x6FD5 0x6FD6 0x6FD7 0x6FD8 0x6FD9 0x6FDA 0x6FDB 0x6FDC \ - 0x6FDD 0x6FDF 0x6FE2 0x6FE3 0x6FE4 0x6FE5 0x6FE6 0x6FE7 \ - 0x6FE8 0x6FE9 0x6FEA 0x6FEB 0x6FEC 0x6FED 0x6FF0 0x6FF1 \ - 0x6FF2 0x6FF3 0x6FF4 0x6FF5 0x6FF6 0x6FF7 0x6FF8 0x6FF9 \ - 0x6FFA 0x6FFB 0x6FFC 0x6FFD 0x6FFE 0x6FFF 0x7000 0x7001 \ - 0x7002 0x7003 0x7004 0x7005 0x7006 0x7007 0x7008 0x7009 \ - 0x700A 0x700B 0x700C 0x700D 0x700E 0x700F 0x7010 0x7012 \ - 0x7013 0x7014 0x7015 0x7016 0x7017 0x7018 0x7019 0x701C \ - 0x701D 0x701E 0x701F 0x7020 0x7021 0x7022 0x7024 0x7025 \ - 0x7026 0x7027 0x7028 0x7029 0x702A 0x702B 0x702C 0x702D \ - 0x702E 0x702F 0x7030 0x7031 0x7032 0x7033 0x7034 0x7036 \ - 0x7037 0x7038 0x703A 0x703B 0x703C 0x703D 0x703E 0x703F \ - 0x7040 0x7041 0x7042 0x7043 0x7044 0x7045 0x7046 0x7047 \ - 0x7048 0x7049 0x704A 0x704B 0x704D 0x704E 0x7050 0x7051 \ - 0x7052 0x7053 0x7054 0x7055 0x7056 0x7057 0x7058 0x7059 \ - 0x705A 0x705B 0x705C 0x705D 0x705F 0x7060 0x7061 0x7062 \ - 0x7063 0x7064 0x7065 0x7066 0x7067 0x7068 0x7069 0x706A -23 0x706E 0x7071 0x7072 0x7073 0x7074 0x7077 0x7079 0x707A \ - 0x707B 0x707D 0x7081 0x7082 0x7083 0x7084 0x7086 0x7087 \ - 0x7088 0x708B 0x708C 0x708D 0x708F 0x7090 0x7091 0x7093 \ - 0x7097 0x7098 0x709A 0x709B 0x709E 0x709F 0x70A0 0x70A1 \ - 0x70A2 0x70A3 0x70A4 0x70A5 0x70A6 0x70A7 0x70A8 0x70A9 \ - 0x70AA 0x70B0 0x70B2 0x70B4 0x70B5 0x70B6 0x70BA 0x70BE \ - 0x70BF 0x70C4 0x70C5 0x70C6 0x70C7 0x70C9 0x70CB 0x70CC \ - 0x70CD 0x70CE 0x70CF 0x70D0 0x70D1 0x70D2 0x70D3 0x70D4 \ - 0x70D5 0x70D6 0x70D7 0x70DA 0x70DC 0x70DD 0x70DE 0x70E0 \ - 0x70E1 0x70E2 0x70E3 0x70E5 0x70EA 0x70EE 0x70F0 0x70F1 \ - 0x70F2 0x70F3 0x70F4 0x70F5 0x70F6 0x70F8 0x70FA 0x70FB \ - 0x70FC 0x70FE 0x70FF 0x7100 0x7101 0x7102 0x7103 0x7104 \ - 0x7105 0x7106 0x7107 0x7108 0x710B 0x710C 0x710D 0x710E \ - 0x710F 0x7111 0x7112 0x7114 0x7117 0x711B 0x711C 0x711D \ - 0x711E 0x711F 0x7120 0x7121 0x7122 0x7123 0x7124 0x7125 \ - 0x7127 0x7128 0x7129 0x712A 0x712B 0x712C 0x712D 0x712E \ - 0x7132 0x7133 0x7134 0x7135 0x7137 0x7138 0x7139 0x713A \ - 0x713B 0x713C 0x713D 0x713E 0x713F 0x7140 0x7141 0x7142 \ - 0x7143 0x7144 0x7146 0x7147 0x7148 0x7149 0x714B 0x714D \ - 0x714F 0x7150 0x7151 0x7152 0x7153 0x7154 0x7155 0x7156 \ - 0x7157 0x7158 0x7159 0x715A 0x715B 0x715D 0x715F 0x7160 \ - 0x7161 0x7162 0x7163 0x7165 0x7169 0x716A 0x716B 0x716C \ - 0x716D 0x716F 0x7170 0x7171 0x7174 0x7175 0x7176 0x7177 \ - 0x7179 0x717B 0x717C 0x717E 0x717F 0x7180 0x7181 0x7182 \ - 0x7183 0x7185 0x7186 0x7187 0x7188 0x7189 0x718B 0x718C \ - 0x718D 0x718E 0x7190 0x7191 0x7192 0x7193 0x7195 0x7196 \ - 0x7197 0x719A 0x719B 0x719C 0x719D 0x719E 0x71A1 0x71A2 \ - 0x71A3 0x71A4 0x71A5 0x71A6 0x71A7 0x71A9 0x71AA 0x71AB \ - 0x71AD 0x71AE 0x71AF 0x71B0 0x71B1 0x71B2 0x71B4 0x71B6 \ - 0x71B7 0x71B8 0x71BA 0x71BB 0x71BC 0x71BD 0x71BE 0x71BF \ - 0x71C0 0x71C1 0x71C2 0x71C4 0x71C5 0x71C6 0x71C7 0x71C8 \ - 0x71C9 0x71CA 0x71CB 0x71CC 0x71CD 0x71CF 0x71D0 0x71D1 -24 0x71D2 0x71D3 0x71D6 0x71D7 0x71D8 0x71D9 0x71DA 0x71DB \ - 0x71DC 0x71DD 0x71DE 0x71DF 0x71E1 0x71E2 0x71E3 0x71E4 \ - 0x71E6 0x71E8 0x71E9 0x71EA 0x71EB 0x71EC 0x71ED 0x71EF \ - 0x71F0 0x71F1 0x71F2 0x71F3 0x71F4 0x71F5 0x71F6 0x71F7 \ - 0x71F8 0x71FA 0x71FB 0x71FC 0x71FD 0x71FE 0x71FF 0x7200 \ - 0x7201 0x7202 0x7203 0x7204 0x7205 0x7207 0x7208 0x7209 \ - 0x720A 0x720B 0x720C 0x720D 0x720E 0x720F 0x7210 0x7211 \ - 0x7212 0x7213 0x7214 0x7215 0x7216 0x7217 0x7218 0x7219 \ - 0x721A 0x721B 0x721C 0x721E 0x721F 0x7220 0x7221 0x7222 \ - 0x7223 0x7224 0x7225 0x7226 0x7227 0x7229 0x722B 0x722D \ - 0x722E 0x722F 0x7232 0x7233 0x7234 0x723A 0x723C 0x723E \ - 0x7240 0x7241 0x7242 0x7243 0x7244 0x7245 0x7246 0x7249 \ - 0x724A 0x724B 0x724E 0x724F 0x7250 0x7251 0x7253 0x7254 \ - 0x7255 0x7257 0x7258 0x725A 0x725C 0x725E 0x7260 0x7263 \ - 0x7264 0x7265 0x7268 0x726A 0x726B 0x726C 0x726D 0x7270 \ - 0x7271 0x7273 0x7274 0x7276 0x7277 0x7278 0x727B 0x727C \ - 0x727D 0x7282 0x7283 0x7285 0x7286 0x7287 0x7288 0x7289 \ - 0x728C 0x728E 0x7290 0x7291 0x7293 0x7294 0x7295 0x7296 \ - 0x7297 0x7298 0x7299 0x729A 0x729B 0x729C 0x729D 0x729E \ - 0x72A0 0x72A1 0x72A2 0x72A3 0x72A4 0x72A5 0x72A6 0x72A7 \ - 0x72A8 0x72A9 0x72AA 0x72AB 0x72AE 0x72B1 0x72B2 0x72B3 \ - 0x72B5 0x72BA 0x72BB 0x72BC 0x72BD 0x72BE 0x72BF 0x72C0 \ - 0x72C5 0x72C6 0x72C7 0x72C9 0x72CA 0x72CB 0x72CC 0x72CF \ - 0x72D1 0x72D3 0x72D4 0x72D5 0x72D6 0x72D8 0x72DA 0x72DB \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -25 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x3000 0x3001 0x3002 0x00B7 0x02C9 0x02C7 0x00A8 0x3003 \ - 0x3005 0x2015 0xFF5E 0x2016 0x2026 0x2018 0x2019 0x201C \ - 0x201D 0x3014 0x3015 0x3008 0x3009 0x300A 0x300B 0x300C \ - 0x300D 0x300E 0x300F 0x3016 0x3017 0x3010 0x3011 0x00B1 \ - 0x00D7 0x00F7 0x2236 0x2227 0x2228 0x2211 0x220F 0x222A \ - 0x2229 0x2208 0x2237 0x221A 0x22A5 0x2225 0x2220 0x2312 \ - 0x2299 0x222B 0x222E 0x2261 0x224C 0x2248 0x223D 0x221D \ - 0x2260 0x226E 0x226F 0x2264 0x2265 0x221E 0x2235 0x2234 \ - 0x2642 0x2640 0x00B0 0x2032 0x2033 0x2103 0xFF04 0x00A4 \ - 0xFFE0 0xFFE1 0x2030 0x00A7 0x2116 0x2606 0x2605 0x25CB \ - 0x25CF 0x25CE 0x25C7 0x25C6 0x25A1 0x25A0 0x25B3 0x25B2 \ - 0x203B 0x2192 0x2190 0x2191 0x2193 0x3013 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2170 0x2171 \ - 0x2172 0x2173 0x2174 0x2175 0x2176 0x2177 0x2178 0x2179 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2488 0x2489 \ - 0x248A 0x248B 0x248C 0x248D 0x248E 0x248F 0x2490 0x2491 \ - 0x2492 0x2493 0x2494 0x2495 0x2496 0x2497 0x2498 0x2499 -26 0x249A 0x249B 0x2474 0x2475 0x2476 0x2477 0x2478 0x2479 \ - 0x247A 0x247B 0x247C 0x247D 0x247E 0x247F 0x2480 0x2481 \ - 0x2482 0x2483 0x2484 0x2485 0x2486 0x2487 0x2460 0x2461 \ - 0x2462 0x2463 0x2464 0x2465 0x2466 0x2467 0x2468 0x2469 \ - 0xFFFE 0xFFFE 0x3220 0x3221 0x3222 0x3223 0x3224 0x3225 \ - 0x3226 0x3227 0x3228 0x3229 0xFFFE 0xFFFE 0x2160 0x2161 \ - 0x2162 0x2163 0x2164 0x2165 0x2166 0x2167 0x2168 0x2169 \ - 0x216A 0x216B 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFF01 0xFF02 0xFF03 0xFFE5 \ - 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFF0A 0xFF0B 0xFF0C \ - 0xFF0D 0xFF0E 0xFF0F 0xFF10 0xFF11 0xFF12 0xFF13 0xFF14 \ - 0xFF15 0xFF16 0xFF17 0xFF18 0xFF19 0xFF1A 0xFF1B 0xFF1C \ - 0xFF1D 0xFF1E 0xFF1F 0xFF20 0xFF21 0xFF22 0xFF23 0xFF24 \ - 0xFF25 0xFF26 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C \ - 0xFF2D 0xFF2E 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 \ - 0xFF35 0xFF36 0xFF37 0xFF38 0xFF39 0xFF3A 0xFF3B 0xFF3C \ - 0xFF3D 0xFF3E 0xFF3F 0xFF40 0xFF41 0xFF42 0xFF43 0xFF44 \ - 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A 0xFF4B 0xFF4C \ - 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 0xFF53 0xFF54 \ - 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A 0xFF5B 0xFF5C \ - 0xFF5D 0xFFE3 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -27 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x3041 0x3042 0x3043 0x3044 0x3045 0x3046 \ - 0x3047 0x3048 0x3049 0x304A 0x304B 0x304C 0x304D 0x304E \ - 0x304F 0x3050 0x3051 0x3052 0x3053 0x3054 0x3055 0x3056 \ - 0x3057 0x3058 0x3059 0x305A 0x305B 0x305C 0x305D 0x305E \ - 0x305F 0x3060 0x3061 0x3062 0x3063 0x3064 0x3065 0x3066 \ - 0x3067 0x3068 0x3069 0x306A 0x306B 0x306C 0x306D 0x306E \ - 0x306F 0x3070 0x3071 0x3072 0x3073 0x3074 0x3075 0x3076 \ - 0x3077 0x3078 0x3079 0x307A 0x307B 0x307C 0x307D 0x307E \ - 0x307F 0x3080 0x3081 0x3082 0x3083 0x3084 0x3085 0x3086 \ - 0x3087 0x3088 0x3089 0x308A 0x308B 0x308C 0x308D 0x308E \ - 0x308F 0x3090 0x3091 0x3092 0x3093 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -28 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x30A1 0x30A2 0x30A3 0x30A4 0x30A5 0x30A6 0x30A7 0x30A8 \ - 0x30A9 0x30AA 0x30AB 0x30AC 0x30AD 0x30AE 0x30AF 0x30B0 \ - 0x30B1 0x30B2 0x30B3 0x30B4 0x30B5 0x30B6 0x30B7 0x30B8 \ - 0x30B9 0x30BA 0x30BB 0x30BC 0x30BD 0x30BE 0x30BF 0x30C0 \ - 0x30C1 0x30C2 0x30C3 0x30C4 0x30C5 0x30C6 0x30C7 0x30C8 \ - 0x30C9 0x30CA 0x30CB 0x30CC 0x30CD 0x30CE 0x30CF 0x30D0 \ - 0x30D1 0x30D2 0x30D3 0x30D4 0x30D5 0x30D6 0x30D7 0x30D8 \ - 0x30D9 0x30DA 0x30DB 0x30DC 0x30DD 0x30DE 0x30DF 0x30E0 \ - 0x30E1 0x30E2 0x30E3 0x30E4 0x30E5 0x30E6 0x30E7 0x30E8 \ - 0x30E9 0x30EA 0x30EB 0x30EC 0x30ED 0x30EE 0x30EF 0x30F0 \ - 0x30F1 0x30F2 0x30F3 0x30F4 0x30F5 0x30F6 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0391 0x0392 \ - 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 0x0399 0x039A \ - 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 0x03A1 0x03A3 \ - 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x03B1 0x03B2 \ - 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 0x03B9 0x03BA -29 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 0x03C1 0x03C3 \ - 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFE35 0xFE36 0xFE39 \ - 0xFE3A 0xFE3F 0xFE40 0xFE3D 0xFE3E 0xFE41 0xFE42 0xFE43 \ - 0xFE44 0xFFFE 0xFFFE 0xFE3B 0xFE3C 0xFE37 0xFE38 0xFE31 \ - 0xFFFE 0xFE33 0xFE34 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0410 0x0411 0x0412 0x0413 \ - 0x0414 0x0415 0x0401 0x0416 0x0417 0x0418 0x0419 0x041A \ - 0x041B 0x041C 0x041D 0x041E 0x041F 0x0420 0x0421 0x0422 \ - 0x0423 0x0424 0x0425 0x0426 0x0427 0x0428 0x0429 0x042A \ - 0x042B 0x042C 0x042D 0x042E 0x042F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0430 0x0431 0x0432 0x0433 \ - 0x0434 0x0435 0x0451 0x0436 0x0437 0x0438 0x0439 0x043A \ - 0x043B 0x043C 0x043D 0x043E 0x043F 0x0440 0x0441 0x0442 \ - 0x0443 0x0444 0x0445 0x0446 0x0447 0x0448 0x0449 0x044A \ - 0x044B 0x044C 0x044D 0x044E 0x044F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x02CA 0x02CB 0x02D9 0x2013 0x2014 0x2025 \ - 0x2035 0x2105 0x2109 0x2196 0x2197 0x2198 0x2199 0x2215 -30 0x221F 0x2223 0x2252 0x2266 0x2267 0x22BF 0x2550 0x2551 \ - 0x2552 0x2553 0x2554 0x2555 0x2556 0x2557 0x2558 0x2559 \ - 0x255A 0x255B 0x255C 0x255D 0x255E 0x255F 0x2560 0x2561 \ - 0x2562 0x2563 0x2564 0x2565 0x2566 0x2567 0x2568 0x2569 \ - 0x256A 0x256B 0x256C 0x256D 0x256E 0x256F 0x2570 0x2571 \ - 0x2572 0x2573 0x2581 0x2582 0x2583 0x2584 0x2585 0x2586 \ - 0x2587 0x2588 0x2589 0x258A 0x258B 0x258C 0x258D 0x258E \ - 0x258F 0x2593 0x2594 0x2595 0x25BC 0x25BD 0x25E2 0x25E3 \ - 0x25E4 0x25E5 0x2609 0x2295 0x3012 0x301D 0x301E 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x0101 0x00E1 0x01CE 0x00E0 0x0113 0x00E9 \ - 0x011B 0x00E8 0x012B 0x00ED 0x01D0 0x00EC 0x014D 0x00F3 \ - 0x01D2 0x00F2 0x016B 0x00FA 0x01D4 0x00F9 0x01D6 0x01D8 \ - 0x01DA 0x01DC 0x00FC 0x00EA 0x0251 0xE7C7 0x0144 0x0148 \ - 0xE7C8 0x0261 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x3105 0x3106 \ - 0x3107 0x3108 0x3109 0x310A 0x310B 0x310C 0x310D 0x310E \ - 0x310F 0x3110 0x3111 0x3112 0x3113 0x3114 0x3115 0x3116 \ - 0x3117 0x3118 0x3119 0x311A 0x311B 0x311C 0x311D 0x311E \ - 0x311F 0x3120 0x3121 0x3122 0x3123 0x3124 0x3125 0x3126 \ - 0x3127 0x3128 0x3129 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x3021 0x3022 0x3023 0x3024 0x3025 0x3026 0x3027 0x3028 \ - 0x3029 0x32A3 0x338E 0x338F 0x339C 0x339D 0x339E 0x33A1 \ - 0x33C4 0x33CE 0x33D1 0x33D2 0x33D5 0xFE30 0xFFE2 0xFFE4 \ - 0xFFFE 0x2121 0x3231 0xFFFE 0x2010 0xFFFE 0xFFFE 0xFFFE \ - 0x30FC 0x309B 0x309C 0x30FD 0x30FE 0x3006 0x309D 0x309E \ - 0xFE49 0xFE4A 0xFE4B 0xFE4C 0xFE4D 0xFE4E 0xFE4F 0xFE50 \ - 0xFE51 0xFE52 0xFE54 0xFE55 0xFE56 0xFE57 0xFE59 0xFE5A \ - 0xFE5B 0xFE5C 0xFE5D 0xFE5E 0xFE5F 0xFE60 0xFE61 0xFE62 \ - 0xFE63 0xFE64 0xFE65 0xFE66 0xFE68 0xFE69 0xFE6A 0xFE6B \ - 0xE7E7 0xE7E8 0xE7E9 0xE7EA 0xE7EB 0xE7EC 0xE7ED 0xE7EE -31 0xE7EF 0xE7F0 0xE7F1 0xE7F2 0xE7F3 0x3007 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x2500 0x2501 0x2502 0x2503 0x2504 \ - 0x2505 0x2506 0x2507 0x2508 0x2509 0x250A 0x250B 0x250C \ - 0x250D 0x250E 0x250F 0x2510 0x2511 0x2512 0x2513 0x2514 \ - 0x2515 0x2516 0x2517 0x2518 0x2519 0x251A 0x251B 0x251C \ - 0x251D 0x251E 0x251F 0x2520 0x2521 0x2522 0x2523 0x2524 \ - 0x2525 0x2526 0x2527 0x2528 0x2529 0x252A 0x252B 0x252C \ - 0x252D 0x252E 0x252F 0x2530 0x2531 0x2532 0x2533 0x2534 \ - 0x2535 0x2536 0x2537 0x2538 0x2539 0x253A 0x253B 0x253C \ - 0x253D 0x253E 0x253F 0x2540 0x2541 0x2542 0x2543 0x2544 \ - 0x2545 0x2546 0x2547 0x2548 0x2549 0x254A 0x254B 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x72DC 0x72DD \ - 0x72DF 0x72E2 0x72E3 0x72E4 0x72E5 0x72E6 0x72E7 0x72EA \ - 0x72EB 0x72F5 0x72F6 0x72F9 0x72FD 0x72FE 0x72FF 0x7300 \ - 0x7302 0x7304 0x7305 0x7306 0x7307 0x7308 0x7309 0x730B \ - 0x730C 0x730D 0x730F 0x7310 0x7311 0x7312 0x7314 0x7318 \ - 0x7319 0x731A 0x731F 0x7320 0x7323 0x7324 0x7326 0x7327 \ - 0x7328 0x732D 0x732F 0x7330 0x7332 0x7333 0x7335 0x7336 \ - 0x733A 0x733B 0x733C 0x733D 0x7340 0x7341 0x7342 0x7343 \ - 0x7344 0x7345 0x7346 0x7347 0x7348 0x7349 0x734A 0x734B \ - 0x734C 0x734E 0x734F 0x7351 0x7353 0x7354 0x7355 0x7356 \ - 0x7358 0x7359 0x735A 0x735B 0x735C 0x735D 0x735E 0x735F \ - 0x7361 0x7362 0x7363 0x7364 0x7365 0x7366 0x7367 0x7368 \ - 0x7369 0x736A 0x736B 0x736E 0x7370 0x7371 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -32 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x7372 0x7373 0x7374 0x7375 \ - 0x7376 0x7377 0x7378 0x7379 0x737A 0x737B 0x737C 0x737D \ - 0x737F 0x7380 0x7381 0x7382 0x7383 0x7385 0x7386 0x7388 \ - 0x738A 0x738C 0x738D 0x738F 0x7390 0x7392 0x7393 0x7394 \ - 0x7395 0x7397 0x7398 0x7399 0x739A 0x739C 0x739D 0x739E \ - 0x73A0 0x73A1 0x73A3 0x73A4 0x73A5 0x73A6 0x73A7 0x73A8 \ - 0x73AA 0x73AC 0x73AD 0x73B1 0x73B4 0x73B5 0x73B6 0x73B8 \ - 0x73B9 0x73BC 0x73BD 0x73BE 0x73BF 0x73C1 0x73C3 0x73C4 \ - 0x73C5 0x73C6 0x73C7 0x73CB 0x73CC 0x73CE 0x73D2 0x73D3 \ - 0x73D4 0x73D5 0x73D6 0x73D7 0x73D8 0x73DA 0x73DB 0x73DC \ - 0x73DD 0x73DF 0x73E1 0x73E2 0x73E3 0x73E4 0x73E6 0x73E8 \ - 0x73EA 0x73EB 0x73EC 0x73EE 0x73EF 0x73F0 0x73F1 0x73F3 \ - 0x73F4 0x73F5 0x73F6 0x73F7 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x73F8 0x73F9 0x73FA 0x73FB 0x73FC 0x73FD \ - 0x73FE 0x73FF 0x7400 0x7401 0x7402 0x7404 0x7407 0x7408 \ - 0x740B 0x740C 0x740D 0x740E 0x7411 0x7412 0x7413 0x7414 -33 0x7415 0x7416 0x7417 0x7418 0x7419 0x741C 0x741D 0x741E \ - 0x741F 0x7420 0x7421 0x7423 0x7424 0x7427 0x7429 0x742B \ - 0x742D 0x742F 0x7431 0x7432 0x7437 0x7438 0x7439 0x743A \ - 0x743B 0x743D 0x743E 0x743F 0x7440 0x7442 0x7443 0x7444 \ - 0x7445 0x7446 0x7447 0x7448 0x7449 0x744A 0x744B 0x744C \ - 0x744D 0x744E 0x744F 0x7450 0x7451 0x7452 0x7453 0x7454 \ - 0x7456 0x7458 0x745D 0x7460 0x7461 0x7462 0x7463 0x7464 \ - 0x7465 0x7466 0x7467 0x7468 0x7469 0x746A 0x746B 0x746C \ - 0x746E 0x746F 0x7471 0x7472 0x7473 0x7474 0x7475 0x7478 \ - 0x7479 0x747A 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x747B 0x747C 0x747D 0x747F 0x7482 0x7484 0x7485 0x7486 \ - 0x7488 0x7489 0x748A 0x748C 0x748D 0x748F 0x7491 0x7492 \ - 0x7493 0x7494 0x7495 0x7496 0x7497 0x7498 0x7499 0x749A \ - 0x749B 0x749D 0x749F 0x74A0 0x74A1 0x74A2 0x74A3 0x74A4 \ - 0x74A5 0x74A6 0x74AA 0x74AB 0x74AC 0x74AD 0x74AE 0x74AF \ - 0x74B0 0x74B1 0x74B2 0x74B3 0x74B4 0x74B5 0x74B6 0x74B7 \ - 0x74B8 0x74B9 0x74BB 0x74BC 0x74BD 0x74BE 0x74BF 0x74C0 \ - 0x74C1 0x74C2 0x74C3 0x74C4 0x74C5 0x74C6 0x74C7 0x74C8 \ - 0x74C9 0x74CA 0x74CB 0x74CC 0x74CD 0x74CE 0x74CF 0x74D0 \ - 0x74D1 0x74D3 0x74D4 0x74D5 0x74D6 0x74D7 0x74D8 0x74D9 \ - 0x74DA 0x74DB 0x74DD 0x74DF 0x74E1 0x74E5 0x74E7 0x74E8 -34 0x74E9 0x74EA 0x74EB 0x74EC 0x74ED 0x74F0 0x74F1 0x74F2 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x74F3 0x74F5 \ - 0x74F8 0x74F9 0x74FA 0x74FB 0x74FC 0x74FD 0x74FE 0x7500 \ - 0x7501 0x7502 0x7503 0x7505 0x7506 0x7507 0x7508 0x7509 \ - 0x750A 0x750B 0x750C 0x750E 0x7510 0x7512 0x7514 0x7515 \ - 0x7516 0x7517 0x751B 0x751D 0x751E 0x7520 0x7521 0x7522 \ - 0x7523 0x7524 0x7526 0x7527 0x752A 0x752E 0x7534 0x7536 \ - 0x7539 0x753C 0x753D 0x753F 0x7541 0x7542 0x7543 0x7544 \ - 0x7546 0x7547 0x7549 0x754A 0x754D 0x7550 0x7551 0x7552 \ - 0x7553 0x7555 0x7556 0x7557 0x7558 0x755D 0x755E 0x755F \ - 0x7560 0x7561 0x7562 0x7563 0x7564 0x7567 0x7568 0x7569 \ - 0x756B 0x756C 0x756D 0x756E 0x756F 0x7570 0x7571 0x7573 \ - 0x7575 0x7576 0x7577 0x757A 0x757B 0x757C 0x757D 0x757E \ - 0x7580 0x7581 0x7582 0x7584 0x7585 0x7587 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -35 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x7588 0x7589 0x758A 0x758C \ - 0x758D 0x758E 0x7590 0x7593 0x7595 0x7598 0x759B 0x759C \ - 0x759E 0x75A2 0x75A6 0x75A7 0x75A8 0x75A9 0x75AA 0x75AD \ - 0x75B6 0x75B7 0x75BA 0x75BB 0x75BF 0x75C0 0x75C1 0x75C6 \ - 0x75CB 0x75CC 0x75CE 0x75CF 0x75D0 0x75D1 0x75D3 0x75D7 \ - 0x75D9 0x75DA 0x75DC 0x75DD 0x75DF 0x75E0 0x75E1 0x75E5 \ - 0x75E9 0x75EC 0x75ED 0x75EE 0x75EF 0x75F2 0x75F3 0x75F5 \ - 0x75F6 0x75F7 0x75F8 0x75FA 0x75FB 0x75FD 0x75FE 0x7602 \ - 0x7604 0x7606 0x7607 0x7608 0x7609 0x760B 0x760D 0x760E \ - 0x760F 0x7611 0x7612 0x7613 0x7614 0x7616 0x761A 0x761C \ - 0x761D 0x761E 0x7621 0x7623 0x7627 0x7628 0x762C 0x762E \ - 0x762F 0x7631 0x7632 0x7636 0x7637 0x7639 0x763A 0x763B \ - 0x763D 0x7641 0x7642 0x7644 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x7645 0x7646 0x7647 0x7648 0x7649 0x764A \ - 0x764B 0x764E 0x764F 0x7650 0x7651 0x7652 0x7653 0x7655 \ - 0x7657 0x7658 0x7659 0x765A 0x765B 0x765D 0x765F 0x7660 \ - 0x7661 0x7662 0x7664 0x7665 0x7666 0x7667 0x7668 0x7669 -36 0x766A 0x766C 0x766D 0x766E 0x7670 0x7671 0x7672 0x7673 \ - 0x7674 0x7675 0x7676 0x7677 0x7679 0x767A 0x767C 0x767F \ - 0x7680 0x7681 0x7683 0x7685 0x7689 0x768A 0x768C 0x768D \ - 0x768F 0x7690 0x7692 0x7694 0x7695 0x7697 0x7698 0x769A \ - 0x769B 0x769C 0x769D 0x769E 0x769F 0x76A0 0x76A1 0x76A2 \ - 0x76A3 0x76A5 0x76A6 0x76A7 0x76A8 0x76A9 0x76AA 0x76AB \ - 0x76AC 0x76AD 0x76AF 0x76B0 0x76B3 0x76B5 0x76B6 0x76B7 \ - 0x76B8 0x76B9 0x76BA 0x76BB 0x76BC 0x76BD 0x76BE 0x76C0 \ - 0x76C1 0x76C3 0x554A 0x963F 0x57C3 0x6328 0x54CE 0x5509 \ - 0x54C0 0x7691 0x764C 0x853C 0x77EE 0x827E 0x788D 0x7231 \ - 0x9698 0x978D 0x6C28 0x5B89 0x4FFA 0x6309 0x6697 0x5CB8 \ - 0x80FA 0x6848 0x80AE 0x6602 0x76CE 0x51F9 0x6556 0x71AC \ - 0x7FF1 0x8884 0x50B2 0x5965 0x61CA 0x6FB3 0x82AD 0x634C \ - 0x6252 0x53ED 0x5427 0x7B06 0x516B 0x75A4 0x5DF4 0x62D4 \ - 0x8DCB 0x9776 0x628A 0x8019 0x575D 0x9738 0x7F62 0x7238 \ - 0x767D 0x67CF 0x767E 0x6446 0x4F70 0x8D25 0x62DC 0x7A17 \ - 0x6591 0x73ED 0x642C 0x6273 0x822C 0x9881 0x677F 0x7248 \ - 0x626E 0x62CC 0x4F34 0x74E3 0x534A 0x529E 0x7ECA 0x90A6 \ - 0x5E2E 0x6886 0x699C 0x8180 0x7ED1 0x68D2 0x78C5 0x868C \ - 0x9551 0x508D 0x8C24 0x82DE 0x80DE 0x5305 0x8912 0x5265 \ - 0x76C4 0x76C7 0x76C9 0x76CB 0x76CC 0x76D3 0x76D5 0x76D9 \ - 0x76DA 0x76DC 0x76DD 0x76DE 0x76E0 0x76E1 0x76E2 0x76E3 \ - 0x76E4 0x76E6 0x76E7 0x76E8 0x76E9 0x76EA 0x76EB 0x76EC \ - 0x76ED 0x76F0 0x76F3 0x76F5 0x76F6 0x76F7 0x76FA 0x76FB \ - 0x76FD 0x76FF 0x7700 0x7702 0x7703 0x7705 0x7706 0x770A \ - 0x770C 0x770E 0x770F 0x7710 0x7711 0x7712 0x7713 0x7714 \ - 0x7715 0x7716 0x7717 0x7718 0x771B 0x771C 0x771D 0x771E \ - 0x7721 0x7723 0x7724 0x7725 0x7727 0x772A 0x772B 0x772C \ - 0x772E 0x7730 0x7731 0x7732 0x7733 0x7734 0x7739 0x773B \ - 0x773D 0x773E 0x773F 0x7742 0x7744 0x7745 0x7746 0x7748 \ - 0x7749 0x774A 0x774B 0x774C 0x774D 0x774E 0x774F 0x7752 \ - 0x7753 0x7754 0x7755 0x7756 0x7757 0x7758 0x7759 0x775C -37 0x8584 0x96F9 0x4FDD 0x5821 0x9971 0x5B9D 0x62B1 0x62A5 \ - 0x66B4 0x8C79 0x9C8D 0x7206 0x676F 0x7891 0x60B2 0x5351 \ - 0x5317 0x8F88 0x80CC 0x8D1D 0x94A1 0x500D 0x72C8 0x5907 \ - 0x60EB 0x7119 0x88AB 0x5954 0x82EF 0x672C 0x7B28 0x5D29 \ - 0x7EF7 0x752D 0x6CF5 0x8E66 0x8FF8 0x903C 0x9F3B 0x6BD4 \ - 0x9119 0x7B14 0x5F7C 0x78A7 0x84D6 0x853D 0x6BD5 0x6BD9 \ - 0x6BD6 0x5E01 0x5E87 0x75F9 0x95ED 0x655D 0x5F0A 0x5FC5 \ - 0x8F9F 0x58C1 0x81C2 0x907F 0x965B 0x97AD 0x8FB9 0x7F16 \ - 0x8D2C 0x6241 0x4FBF 0x53D8 0x535E 0x8FA8 0x8FA9 0x8FAB \ - 0x904D 0x6807 0x5F6A 0x8198 0x8868 0x9CD6 0x618B 0x522B \ - 0x762A 0x5F6C 0x658C 0x6FD2 0x6EE8 0x5BBE 0x6448 0x5175 \ - 0x51B0 0x67C4 0x4E19 0x79C9 0x997C 0x70B3 0x775D 0x775E \ - 0x775F 0x7760 0x7764 0x7767 0x7769 0x776A 0x776D 0x776E \ - 0x776F 0x7770 0x7771 0x7772 0x7773 0x7774 0x7775 0x7776 \ - 0x7777 0x7778 0x777A 0x777B 0x777C 0x7781 0x7782 0x7783 \ - 0x7786 0x7787 0x7788 0x7789 0x778A 0x778B 0x778F 0x7790 \ - 0x7793 0x7794 0x7795 0x7796 0x7797 0x7798 0x7799 0x779A \ - 0x779B 0x779C 0x779D 0x779E 0x77A1 0x77A3 0x77A4 0x77A6 \ - 0x77A8 0x77AB 0x77AD 0x77AE 0x77AF 0x77B1 0x77B2 0x77B4 \ - 0x77B6 0x77B7 0x77B8 0x77B9 0x77BA 0x77BC 0x77BE 0x77C0 \ - 0x77C1 0x77C2 0x77C3 0x77C4 0x77C5 0x77C6 0x77C7 0x77C8 \ - 0x77C9 0x77CA 0x77CB 0x77CC 0x77CE 0x77CF 0x77D0 0x77D1 \ - 0x77D2 0x77D3 0x77D4 0x77D5 0x77D6 0x77D8 0x77D9 0x77DA \ - 0x77DD 0x77DE 0x77DF 0x77E0 0x77E1 0x77E4 0x75C5 0x5E76 \ - 0x73BB 0x83E0 0x64AD 0x62E8 0x94B5 0x6CE2 0x535A 0x52C3 \ - 0x640F 0x94C2 0x7B94 0x4F2F 0x5E1B 0x8236 0x8116 0x818A \ - 0x6E24 0x6CCA 0x9A73 0x6355 0x535C 0x54FA 0x8865 0x57E0 \ - 0x4E0D 0x5E03 0x6B65 0x7C3F 0x90E8 0x6016 0x64E6 0x731C \ - 0x88C1 0x6750 0x624D 0x8D22 0x776C 0x8E29 0x91C7 0x5F69 \ - 0x83DC 0x8521 0x9910 0x53C2 0x8695 0x6B8B 0x60ED 0x60E8 \ - 0x707F 0x82CD 0x8231 0x4ED3 0x6CA7 0x85CF 0x64CD 0x7CD9 \ - 0x69FD 0x66F9 0x8349 0x5395 0x7B56 0x4FA7 0x518C 0x6D4B -38 0x5C42 0x8E6D 0x63D2 0x53C9 0x832C 0x8336 0x67E5 0x78B4 \ - 0x643D 0x5BDF 0x5C94 0x5DEE 0x8BE7 0x62C6 0x67F4 0x8C7A \ - 0x6400 0x63BA 0x8749 0x998B 0x8C17 0x7F20 0x94F2 0x4EA7 \ - 0x9610 0x98A4 0x660C 0x7316 0x77E6 0x77E8 0x77EA 0x77EF \ - 0x77F0 0x77F1 0x77F2 0x77F4 0x77F5 0x77F7 0x77F9 0x77FA \ - 0x77FB 0x77FC 0x7803 0x7804 0x7805 0x7806 0x7807 0x7808 \ - 0x780A 0x780B 0x780E 0x780F 0x7810 0x7813 0x7815 0x7819 \ - 0x781B 0x781E 0x7820 0x7821 0x7822 0x7824 0x7828 0x782A \ - 0x782B 0x782E 0x782F 0x7831 0x7832 0x7833 0x7835 0x7836 \ - 0x783D 0x783F 0x7841 0x7842 0x7843 0x7844 0x7846 0x7848 \ - 0x7849 0x784A 0x784B 0x784D 0x784F 0x7851 0x7853 0x7854 \ - 0x7858 0x7859 0x785A 0x785B 0x785C 0x785E 0x785F 0x7860 \ - 0x7861 0x7862 0x7863 0x7864 0x7865 0x7866 0x7867 0x7868 \ - 0x7869 0x786F 0x7870 0x7871 0x7872 0x7873 0x7874 0x7875 \ - 0x7876 0x7878 0x7879 0x787A 0x787B 0x787D 0x787E 0x787F \ - 0x7880 0x7881 0x7882 0x7883 0x573A 0x5C1D 0x5E38 0x957F \ - 0x507F 0x80A0 0x5382 0x655E 0x7545 0x5531 0x5021 0x8D85 \ - 0x6284 0x949E 0x671D 0x5632 0x6F6E 0x5DE2 0x5435 0x7092 \ - 0x8F66 0x626F 0x64A4 0x63A3 0x5F7B 0x6F88 0x90F4 0x81E3 \ - 0x8FB0 0x5C18 0x6668 0x5FF1 0x6C89 0x9648 0x8D81 0x886C \ - 0x6491 0x79F0 0x57CE 0x6A59 0x6210 0x5448 0x4E58 0x7A0B \ - 0x60E9 0x6F84 0x8BDA 0x627F 0x901E 0x9A8B 0x79E4 0x5403 \ - 0x75F4 0x6301 0x5319 0x6C60 0x8FDF 0x5F1B 0x9A70 0x803B \ - 0x9F7F 0x4F88 0x5C3A 0x8D64 0x7FC5 0x65A5 0x70BD 0x5145 \ - 0x51B2 0x866B 0x5D07 0x5BA0 0x62BD 0x916C 0x7574 0x8E0C \ - 0x7A20 0x6101 0x7B79 0x4EC7 0x7EF8 0x7785 0x4E11 0x81ED \ - 0x521D 0x51FA 0x6A71 0x53A8 0x8E87 0x9504 0x96CF 0x6EC1 \ - 0x9664 0x695A 0x7884 0x7885 0x7886 0x7888 0x788A 0x788B \ - 0x788F 0x7890 0x7892 0x7894 0x7895 0x7896 0x7899 0x789D \ - 0x789E 0x78A0 0x78A2 0x78A4 0x78A6 0x78A8 0x78A9 0x78AA \ - 0x78AB 0x78AC 0x78AD 0x78AE 0x78AF 0x78B5 0x78B6 0x78B7 \ - 0x78B8 0x78BA 0x78BB 0x78BC 0x78BD 0x78BF 0x78C0 0x78C2 -39 0x78C3 0x78C4 0x78C6 0x78C7 0x78C8 0x78CC 0x78CD 0x78CE \ - 0x78CF 0x78D1 0x78D2 0x78D3 0x78D6 0x78D7 0x78D8 0x78DA \ - 0x78DB 0x78DC 0x78DD 0x78DE 0x78DF 0x78E0 0x78E1 0x78E2 \ - 0x78E3 0x78E4 0x78E5 0x78E6 0x78E7 0x78E9 0x78EA 0x78EB \ - 0x78ED 0x78EE 0x78EF 0x78F0 0x78F1 0x78F3 0x78F5 0x78F6 \ - 0x78F8 0x78F9 0x78FB 0x78FC 0x78FD 0x78FE 0x78FF 0x7900 \ - 0x7902 0x7903 0x7904 0x7906 0x7907 0x7908 0x7909 0x790A \ - 0x790B 0x790C 0x7840 0x50A8 0x77D7 0x6410 0x89E6 0x5904 \ - 0x63E3 0x5DDD 0x7A7F 0x693D 0x4F20 0x8239 0x5598 0x4E32 \ - 0x75AE 0x7A97 0x5E62 0x5E8A 0x95EF 0x521B 0x5439 0x708A \ - 0x6376 0x9524 0x5782 0x6625 0x693F 0x9187 0x5507 0x6DF3 \ - 0x7EAF 0x8822 0x6233 0x7EF0 0x75B5 0x8328 0x78C1 0x96CC \ - 0x8F9E 0x6148 0x74F7 0x8BCD 0x6B64 0x523A 0x8D50 0x6B21 \ - 0x806A 0x8471 0x56F1 0x5306 0x4ECE 0x4E1B 0x51D1 0x7C97 \ - 0x918B 0x7C07 0x4FC3 0x8E7F 0x7BE1 0x7A9C 0x6467 0x5D14 \ - 0x50AC 0x8106 0x7601 0x7CB9 0x6DEC 0x7FE0 0x6751 0x5B58 \ - 0x5BF8 0x78CB 0x64AE 0x6413 0x63AA 0x632B 0x9519 0x642D \ - 0x8FBE 0x7B54 0x7629 0x6253 0x5927 0x5446 0x6B79 0x50A3 \ - 0x6234 0x5E26 0x6B86 0x4EE3 0x8D37 0x888B 0x5F85 0x902E \ - 0x790D 0x790E 0x790F 0x7910 0x7911 0x7912 0x7914 0x7915 \ - 0x7916 0x7917 0x7918 0x7919 0x791A 0x791B 0x791C 0x791D \ - 0x791F 0x7920 0x7921 0x7922 0x7923 0x7925 0x7926 0x7927 \ - 0x7928 0x7929 0x792A 0x792B 0x792C 0x792D 0x792E 0x792F \ - 0x7930 0x7931 0x7932 0x7933 0x7935 0x7936 0x7937 0x7938 \ - 0x7939 0x793D 0x793F 0x7942 0x7943 0x7944 0x7945 0x7947 \ - 0x794A 0x794B 0x794C 0x794D 0x794E 0x794F 0x7950 0x7951 \ - 0x7952 0x7954 0x7955 0x7958 0x7959 0x7961 0x7963 0x7964 \ - 0x7966 0x7969 0x796A 0x796B 0x796C 0x796E 0x7970 0x7971 \ - 0x7972 0x7973 0x7974 0x7975 0x7976 0x7979 0x797B 0x797C \ - 0x797D 0x797E 0x797F 0x7982 0x7983 0x7986 0x7987 0x7988 \ - 0x7989 0x798B 0x798C 0x798D 0x798E 0x7990 0x7991 0x7992 \ - 0x6020 0x803D 0x62C5 0x4E39 0x5355 0x90F8 0x63B8 0x80C6 -40 0x65E6 0x6C2E 0x4F46 0x60EE 0x6DE1 0x8BDE 0x5F39 0x86CB \ - 0x5F53 0x6321 0x515A 0x8361 0x6863 0x5200 0x6363 0x8E48 \ - 0x5012 0x5C9B 0x7977 0x5BFC 0x5230 0x7A3B 0x60BC 0x9053 \ - 0x76D7 0x5FB7 0x5F97 0x7684 0x8E6C 0x706F 0x767B 0x7B49 \ - 0x77AA 0x51F3 0x9093 0x5824 0x4F4E 0x6EF4 0x8FEA 0x654C \ - 0x7B1B 0x72C4 0x6DA4 0x7FDF 0x5AE1 0x62B5 0x5E95 0x5730 \ - 0x8482 0x7B2C 0x5E1D 0x5F1F 0x9012 0x7F14 0x98A0 0x6382 \ - 0x6EC7 0x7898 0x70B9 0x5178 0x975B 0x57AB 0x7535 0x4F43 \ - 0x7538 0x5E97 0x60E6 0x5960 0x6DC0 0x6BBF 0x7889 0x53FC \ - 0x96D5 0x51CB 0x5201 0x6389 0x540A 0x9493 0x8C03 0x8DCC \ - 0x7239 0x789F 0x8776 0x8FED 0x8C0D 0x53E0 0x7993 0x7994 \ - 0x7995 0x7996 0x7997 0x7998 0x7999 0x799B 0x799C 0x799D \ - 0x799E 0x799F 0x79A0 0x79A1 0x79A2 0x79A3 0x79A4 0x79A5 \ - 0x79A6 0x79A8 0x79A9 0x79AA 0x79AB 0x79AC 0x79AD 0x79AE \ - 0x79AF 0x79B0 0x79B1 0x79B2 0x79B4 0x79B5 0x79B6 0x79B7 \ - 0x79B8 0x79BC 0x79BF 0x79C2 0x79C4 0x79C5 0x79C7 0x79C8 \ - 0x79CA 0x79CC 0x79CE 0x79CF 0x79D0 0x79D3 0x79D4 0x79D6 \ - 0x79D7 0x79D9 0x79DA 0x79DB 0x79DC 0x79DD 0x79DE 0x79E0 \ - 0x79E1 0x79E2 0x79E5 0x79E8 0x79EA 0x79EC 0x79EE 0x79F1 \ - 0x79F2 0x79F3 0x79F4 0x79F5 0x79F6 0x79F7 0x79F9 0x79FA \ - 0x79FC 0x79FE 0x79FF 0x7A01 0x7A04 0x7A05 0x7A07 0x7A08 \ - 0x7A09 0x7A0A 0x7A0C 0x7A0F 0x7A10 0x7A11 0x7A12 0x7A13 \ - 0x7A15 0x7A16 0x7A18 0x7A19 0x7A1B 0x7A1C 0x4E01 0x76EF \ - 0x53EE 0x9489 0x9876 0x9F0E 0x952D 0x5B9A 0x8BA2 0x4E22 \ - 0x4E1C 0x51AC 0x8463 0x61C2 0x52A8 0x680B 0x4F97 0x606B \ - 0x51BB 0x6D1E 0x515C 0x6296 0x6597 0x9661 0x8C46 0x9017 \ - 0x75D8 0x90FD 0x7763 0x6BD2 0x728A 0x72EC 0x8BFB 0x5835 \ - 0x7779 0x8D4C 0x675C 0x9540 0x809A 0x5EA6 0x6E21 0x5992 \ - 0x7AEF 0x77ED 0x953B 0x6BB5 0x65AD 0x7F0E 0x5806 0x5151 \ - 0x961F 0x5BF9 0x58A9 0x5428 0x8E72 0x6566 0x987F 0x56E4 \ - 0x949D 0x76FE 0x9041 0x6387 0x54C6 0x591A 0x593A 0x579B \ - 0x8EB2 0x6735 0x8DFA 0x8235 0x5241 0x60F0 0x5815 0x86FE -41 0x5CE8 0x9E45 0x4FC4 0x989D 0x8BB9 0x5A25 0x6076 0x5384 \ - 0x627C 0x904F 0x9102 0x997F 0x6069 0x800C 0x513F 0x8033 \ - 0x5C14 0x9975 0x6D31 0x4E8C 0x7A1D 0x7A1F 0x7A21 0x7A22 \ - 0x7A24 0x7A25 0x7A26 0x7A27 0x7A28 0x7A29 0x7A2A 0x7A2B \ - 0x7A2C 0x7A2D 0x7A2E 0x7A2F 0x7A30 0x7A31 0x7A32 0x7A34 \ - 0x7A35 0x7A36 0x7A38 0x7A3A 0x7A3E 0x7A40 0x7A41 0x7A42 \ - 0x7A43 0x7A44 0x7A45 0x7A47 0x7A48 0x7A49 0x7A4A 0x7A4B \ - 0x7A4C 0x7A4D 0x7A4E 0x7A4F 0x7A50 0x7A52 0x7A53 0x7A54 \ - 0x7A55 0x7A56 0x7A58 0x7A59 0x7A5A 0x7A5B 0x7A5C 0x7A5D \ - 0x7A5E 0x7A5F 0x7A60 0x7A61 0x7A62 0x7A63 0x7A64 0x7A65 \ - 0x7A66 0x7A67 0x7A68 0x7A69 0x7A6A 0x7A6B 0x7A6C 0x7A6D \ - 0x7A6E 0x7A6F 0x7A71 0x7A72 0x7A73 0x7A75 0x7A7B 0x7A7C \ - 0x7A7D 0x7A7E 0x7A82 0x7A85 0x7A87 0x7A89 0x7A8A 0x7A8B \ - 0x7A8C 0x7A8E 0x7A8F 0x7A90 0x7A93 0x7A94 0x7A99 0x7A9A \ - 0x7A9B 0x7A9E 0x7AA1 0x7AA2 0x8D30 0x53D1 0x7F5A 0x7B4F \ - 0x4F10 0x4E4F 0x9600 0x6CD5 0x73D0 0x85E9 0x5E06 0x756A \ - 0x7FFB 0x6A0A 0x77FE 0x9492 0x7E41 0x51E1 0x70E6 0x53CD \ - 0x8FD4 0x8303 0x8D29 0x72AF 0x996D 0x6CDB 0x574A 0x82B3 \ - 0x65B9 0x80AA 0x623F 0x9632 0x59A8 0x4EFF 0x8BBF 0x7EBA \ - 0x653E 0x83F2 0x975E 0x5561 0x98DE 0x80A5 0x532A 0x8BFD \ - 0x5420 0x80BA 0x5E9F 0x6CB8 0x8D39 0x82AC 0x915A 0x5429 \ - 0x6C1B 0x5206 0x7EB7 0x575F 0x711A 0x6C7E 0x7C89 0x594B \ - 0x4EFD 0x5FFF 0x6124 0x7CAA 0x4E30 0x5C01 0x67AB 0x8702 \ - 0x5CF0 0x950B 0x98CE 0x75AF 0x70FD 0x9022 0x51AF 0x7F1D \ - 0x8BBD 0x5949 0x51E4 0x4F5B 0x5426 0x592B 0x6577 0x80A4 \ - 0x5B75 0x6276 0x62C2 0x8F90 0x5E45 0x6C1F 0x7B26 0x4F0F \ - 0x4FD8 0x670D 0x7AA3 0x7AA4 0x7AA7 0x7AA9 0x7AAA 0x7AAB \ - 0x7AAE 0x7AAF 0x7AB0 0x7AB1 0x7AB2 0x7AB4 0x7AB5 0x7AB6 \ - 0x7AB7 0x7AB8 0x7AB9 0x7ABA 0x7ABB 0x7ABC 0x7ABD 0x7ABE \ - 0x7AC0 0x7AC1 0x7AC2 0x7AC3 0x7AC4 0x7AC5 0x7AC6 0x7AC7 \ - 0x7AC8 0x7AC9 0x7ACA 0x7ACC 0x7ACD 0x7ACE 0x7ACF 0x7AD0 \ - 0x7AD1 0x7AD2 0x7AD3 0x7AD4 0x7AD5 0x7AD7 0x7AD8 0x7ADA -42 0x7ADB 0x7ADC 0x7ADD 0x7AE1 0x7AE2 0x7AE4 0x7AE7 0x7AE8 \ - 0x7AE9 0x7AEA 0x7AEB 0x7AEC 0x7AEE 0x7AF0 0x7AF1 0x7AF2 \ - 0x7AF3 0x7AF4 0x7AF5 0x7AF6 0x7AF7 0x7AF8 0x7AFB 0x7AFC \ - 0x7AFE 0x7B00 0x7B01 0x7B02 0x7B05 0x7B07 0x7B09 0x7B0C \ - 0x7B0D 0x7B0E 0x7B10 0x7B12 0x7B13 0x7B16 0x7B17 0x7B18 \ - 0x7B1A 0x7B1C 0x7B1D 0x7B1F 0x7B21 0x7B22 0x7B23 0x7B27 \ - 0x7B29 0x7B2D 0x6D6E 0x6DAA 0x798F 0x88B1 0x5F17 0x752B \ - 0x629A 0x8F85 0x4FEF 0x91DC 0x65A7 0x812F 0x8151 0x5E9C \ - 0x8150 0x8D74 0x526F 0x8986 0x8D4B 0x590D 0x5085 0x4ED8 \ - 0x961C 0x7236 0x8179 0x8D1F 0x5BCC 0x8BA3 0x9644 0x5987 \ - 0x7F1A 0x5490 0x5676 0x560E 0x8BE5 0x6539 0x6982 0x9499 \ - 0x76D6 0x6E89 0x5E72 0x7518 0x6746 0x67D1 0x7AFF 0x809D \ - 0x8D76 0x611F 0x79C6 0x6562 0x8D63 0x5188 0x521A 0x94A2 \ - 0x7F38 0x809B 0x7EB2 0x5C97 0x6E2F 0x6760 0x7BD9 0x768B \ - 0x9AD8 0x818F 0x7F94 0x7CD5 0x641E 0x9550 0x7A3F 0x544A \ - 0x54E5 0x6B4C 0x6401 0x6208 0x9E3D 0x80F3 0x7599 0x5272 \ - 0x9769 0x845B 0x683C 0x86E4 0x9601 0x9694 0x94EC 0x4E2A \ - 0x5404 0x7ED9 0x6839 0x8DDF 0x8015 0x66F4 0x5E9A 0x7FB9 \ - 0x7B2F 0x7B30 0x7B32 0x7B34 0x7B35 0x7B36 0x7B37 0x7B39 \ - 0x7B3B 0x7B3D 0x7B3F 0x7B40 0x7B41 0x7B42 0x7B43 0x7B44 \ - 0x7B46 0x7B48 0x7B4A 0x7B4D 0x7B4E 0x7B53 0x7B55 0x7B57 \ - 0x7B59 0x7B5C 0x7B5E 0x7B5F 0x7B61 0x7B63 0x7B64 0x7B65 \ - 0x7B66 0x7B67 0x7B68 0x7B69 0x7B6A 0x7B6B 0x7B6C 0x7B6D \ - 0x7B6F 0x7B70 0x7B73 0x7B74 0x7B76 0x7B78 0x7B7A 0x7B7C \ - 0x7B7D 0x7B7F 0x7B81 0x7B82 0x7B83 0x7B84 0x7B86 0x7B87 \ - 0x7B88 0x7B89 0x7B8A 0x7B8B 0x7B8C 0x7B8E 0x7B8F 0x7B91 \ - 0x7B92 0x7B93 0x7B96 0x7B98 0x7B99 0x7B9A 0x7B9B 0x7B9E \ - 0x7B9F 0x7BA0 0x7BA3 0x7BA4 0x7BA5 0x7BAE 0x7BAF 0x7BB0 \ - 0x7BB2 0x7BB3 0x7BB5 0x7BB6 0x7BB7 0x7BB9 0x7BBA 0x7BBB \ - 0x7BBC 0x7BBD 0x7BBE 0x7BBF 0x7BC0 0x7BC2 0x7BC3 0x7BC4 \ - 0x57C2 0x803F 0x6897 0x5DE5 0x653B 0x529F 0x606D 0x9F9A \ - 0x4F9B 0x8EAC 0x516C 0x5BAB 0x5F13 0x5DE9 0x6C5E 0x62F1 -43 0x8D21 0x5171 0x94A9 0x52FE 0x6C9F 0x82DF 0x72D7 0x57A2 \ - 0x6784 0x8D2D 0x591F 0x8F9C 0x83C7 0x5495 0x7B8D 0x4F30 \ - 0x6CBD 0x5B64 0x59D1 0x9F13 0x53E4 0x86CA 0x9AA8 0x8C37 \ - 0x80A1 0x6545 0x987E 0x56FA 0x96C7 0x522E 0x74DC 0x5250 \ - 0x5BE1 0x6302 0x8902 0x4E56 0x62D0 0x602A 0x68FA 0x5173 \ - 0x5B98 0x51A0 0x89C2 0x7BA1 0x9986 0x7F50 0x60EF 0x704C \ - 0x8D2F 0x5149 0x5E7F 0x901B 0x7470 0x89C4 0x572D 0x7845 \ - 0x5F52 0x9F9F 0x95FA 0x8F68 0x9B3C 0x8BE1 0x7678 0x6842 \ - 0x67DC 0x8DEA 0x8D35 0x523D 0x8F8A 0x6EDA 0x68CD 0x9505 \ - 0x90ED 0x56FD 0x679C 0x88F9 0x8FC7 0x54C8 0x7BC5 0x7BC8 \ - 0x7BC9 0x7BCA 0x7BCB 0x7BCD 0x7BCE 0x7BCF 0x7BD0 0x7BD2 \ - 0x7BD4 0x7BD5 0x7BD6 0x7BD7 0x7BD8 0x7BDB 0x7BDC 0x7BDE \ - 0x7BDF 0x7BE0 0x7BE2 0x7BE3 0x7BE4 0x7BE7 0x7BE8 0x7BE9 \ - 0x7BEB 0x7BEC 0x7BED 0x7BEF 0x7BF0 0x7BF2 0x7BF3 0x7BF4 \ - 0x7BF5 0x7BF6 0x7BF8 0x7BF9 0x7BFA 0x7BFB 0x7BFD 0x7BFF \ - 0x7C00 0x7C01 0x7C02 0x7C03 0x7C04 0x7C05 0x7C06 0x7C08 \ - 0x7C09 0x7C0A 0x7C0D 0x7C0E 0x7C10 0x7C11 0x7C12 0x7C13 \ - 0x7C14 0x7C15 0x7C17 0x7C18 0x7C19 0x7C1A 0x7C1B 0x7C1C \ - 0x7C1D 0x7C1E 0x7C20 0x7C21 0x7C22 0x7C23 0x7C24 0x7C25 \ - 0x7C28 0x7C29 0x7C2B 0x7C2C 0x7C2D 0x7C2E 0x7C2F 0x7C30 \ - 0x7C31 0x7C32 0x7C33 0x7C34 0x7C35 0x7C36 0x7C37 0x7C39 \ - 0x7C3A 0x7C3B 0x7C3C 0x7C3D 0x7C3E 0x7C42 0x9AB8 0x5B69 \ - 0x6D77 0x6C26 0x4EA5 0x5BB3 0x9A87 0x9163 0x61A8 0x90AF \ - 0x97E9 0x542B 0x6DB5 0x5BD2 0x51FD 0x558A 0x7F55 0x7FF0 \ - 0x64BC 0x634D 0x65F1 0x61BE 0x608D 0x710A 0x6C57 0x6C49 \ - 0x592F 0x676D 0x822A 0x58D5 0x568E 0x8C6A 0x6BEB 0x90DD \ - 0x597D 0x8017 0x53F7 0x6D69 0x5475 0x559D 0x8377 0x83CF \ - 0x6838 0x79BE 0x548C 0x4F55 0x5408 0x76D2 0x8C89 0x9602 \ - 0x6CB3 0x6DB8 0x8D6B 0x8910 0x9E64 0x8D3A 0x563F 0x9ED1 \ - 0x75D5 0x5F88 0x72E0 0x6068 0x54FC 0x4EA8 0x6A2A 0x8861 \ - 0x6052 0x8F70 0x54C4 0x70D8 0x8679 0x9E3F 0x6D2A 0x5B8F \ - 0x5F18 0x7EA2 0x5589 0x4FAF 0x7334 0x543C 0x539A 0x5019 -44 0x540E 0x547C 0x4E4E 0x5FFD 0x745A 0x58F6 0x846B 0x80E1 \ - 0x8774 0x72D0 0x7CCA 0x6E56 0x7C43 0x7C44 0x7C45 0x7C46 \ - 0x7C47 0x7C48 0x7C49 0x7C4A 0x7C4B 0x7C4C 0x7C4E 0x7C4F \ - 0x7C50 0x7C51 0x7C52 0x7C53 0x7C54 0x7C55 0x7C56 0x7C57 \ - 0x7C58 0x7C59 0x7C5A 0x7C5B 0x7C5C 0x7C5D 0x7C5E 0x7C5F \ - 0x7C60 0x7C61 0x7C62 0x7C63 0x7C64 0x7C65 0x7C66 0x7C67 \ - 0x7C68 0x7C69 0x7C6A 0x7C6B 0x7C6C 0x7C6D 0x7C6E 0x7C6F \ - 0x7C70 0x7C71 0x7C72 0x7C75 0x7C76 0x7C77 0x7C78 0x7C79 \ - 0x7C7A 0x7C7E 0x7C7F 0x7C80 0x7C81 0x7C82 0x7C83 0x7C84 \ - 0x7C85 0x7C86 0x7C87 0x7C88 0x7C8A 0x7C8B 0x7C8C 0x7C8D \ - 0x7C8E 0x7C8F 0x7C90 0x7C93 0x7C94 0x7C96 0x7C99 0x7C9A \ - 0x7C9B 0x7CA0 0x7CA1 0x7CA3 0x7CA6 0x7CA7 0x7CA8 0x7CA9 \ - 0x7CAB 0x7CAC 0x7CAD 0x7CAF 0x7CB0 0x7CB4 0x7CB5 0x7CB6 \ - 0x7CB7 0x7CB8 0x7CBA 0x7CBB 0x5F27 0x864E 0x552C 0x62A4 \ - 0x4E92 0x6CAA 0x6237 0x82B1 0x54D7 0x534E 0x733E 0x6ED1 \ - 0x753B 0x5212 0x5316 0x8BDD 0x69D0 0x5F8A 0x6000 0x6DEE \ - 0x574F 0x6B22 0x73AF 0x6853 0x8FD8 0x7F13 0x6362 0x60A3 \ - 0x5524 0x75EA 0x8C62 0x7115 0x6DA3 0x5BA6 0x5E7B 0x8352 \ - 0x614C 0x9EC4 0x78FA 0x8757 0x7C27 0x7687 0x51F0 0x60F6 \ - 0x714C 0x6643 0x5E4C 0x604D 0x8C0E 0x7070 0x6325 0x8F89 \ - 0x5FBD 0x6062 0x86D4 0x56DE 0x6BC1 0x6094 0x6167 0x5349 \ - 0x60E0 0x6666 0x8D3F 0x79FD 0x4F1A 0x70E9 0x6C47 0x8BB3 \ - 0x8BF2 0x7ED8 0x8364 0x660F 0x5A5A 0x9B42 0x6D51 0x6DF7 \ - 0x8C41 0x6D3B 0x4F19 0x706B 0x83B7 0x6216 0x60D1 0x970D \ - 0x8D27 0x7978 0x51FB 0x573E 0x57FA 0x673A 0x7578 0x7A3D \ - 0x79EF 0x7B95 0x7CBF 0x7CC0 0x7CC2 0x7CC3 0x7CC4 0x7CC6 \ - 0x7CC9 0x7CCB 0x7CCE 0x7CCF 0x7CD0 0x7CD1 0x7CD2 0x7CD3 \ - 0x7CD4 0x7CD8 0x7CDA 0x7CDB 0x7CDD 0x7CDE 0x7CE1 0x7CE2 \ - 0x7CE3 0x7CE4 0x7CE5 0x7CE6 0x7CE7 0x7CE9 0x7CEA 0x7CEB \ - 0x7CEC 0x7CED 0x7CEE 0x7CF0 0x7CF1 0x7CF2 0x7CF3 0x7CF4 \ - 0x7CF5 0x7CF6 0x7CF7 0x7CF9 0x7CFA 0x7CFC 0x7CFD 0x7CFE \ - 0x7CFF 0x7D00 0x7D01 0x7D02 0x7D03 0x7D04 0x7D05 0x7D06 -45 0x7D07 0x7D08 0x7D09 0x7D0B 0x7D0C 0x7D0D 0x7D0E 0x7D0F \ - 0x7D10 0x7D11 0x7D12 0x7D13 0x7D14 0x7D15 0x7D16 0x7D17 \ - 0x7D18 0x7D19 0x7D1A 0x7D1B 0x7D1C 0x7D1D 0x7D1E 0x7D1F \ - 0x7D21 0x7D23 0x7D24 0x7D25 0x7D26 0x7D28 0x7D29 0x7D2A \ - 0x7D2C 0x7D2D 0x7D2E 0x7D30 0x7D31 0x7D32 0x7D33 0x7D34 \ - 0x7D35 0x7D36 0x808C 0x9965 0x8FF9 0x6FC0 0x8BA5 0x9E21 \ - 0x59EC 0x7EE9 0x7F09 0x5409 0x6781 0x68D8 0x8F91 0x7C4D \ - 0x96C6 0x53CA 0x6025 0x75BE 0x6C72 0x5373 0x5AC9 0x7EA7 \ - 0x6324 0x51E0 0x810A 0x5DF1 0x84DF 0x6280 0x5180 0x5B63 \ - 0x4F0E 0x796D 0x5242 0x60B8 0x6D4E 0x5BC4 0x5BC2 0x8BA1 \ - 0x8BB0 0x65E2 0x5FCC 0x9645 0x5993 0x7EE7 0x7EAA 0x5609 \ - 0x67B7 0x5939 0x4F73 0x5BB6 0x52A0 0x835A 0x988A 0x8D3E \ - 0x7532 0x94BE 0x5047 0x7A3C 0x4EF7 0x67B6 0x9A7E 0x5AC1 \ - 0x6B7C 0x76D1 0x575A 0x5C16 0x7B3A 0x95F4 0x714E 0x517C \ - 0x80A9 0x8270 0x5978 0x7F04 0x8327 0x68C0 0x67EC 0x78B1 \ - 0x7877 0x62E3 0x6361 0x7B80 0x4FED 0x526A 0x51CF 0x8350 \ - 0x69DB 0x9274 0x8DF5 0x8D31 0x89C1 0x952E 0x7BAD 0x4EF6 \ - 0x7D37 0x7D38 0x7D39 0x7D3A 0x7D3B 0x7D3C 0x7D3D 0x7D3E \ - 0x7D3F 0x7D40 0x7D41 0x7D42 0x7D43 0x7D44 0x7D45 0x7D46 \ - 0x7D47 0x7D48 0x7D49 0x7D4A 0x7D4B 0x7D4C 0x7D4D 0x7D4E \ - 0x7D4F 0x7D50 0x7D51 0x7D52 0x7D53 0x7D54 0x7D55 0x7D56 \ - 0x7D57 0x7D58 0x7D59 0x7D5A 0x7D5B 0x7D5C 0x7D5D 0x7D5E \ - 0x7D5F 0x7D60 0x7D61 0x7D62 0x7D63 0x7D64 0x7D65 0x7D66 \ - 0x7D67 0x7D68 0x7D69 0x7D6A 0x7D6B 0x7D6C 0x7D6D 0x7D6F \ - 0x7D70 0x7D71 0x7D72 0x7D73 0x7D74 0x7D75 0x7D76 0x7D78 \ - 0x7D79 0x7D7A 0x7D7B 0x7D7C 0x7D7D 0x7D7E 0x7D7F 0x7D80 \ - 0x7D81 0x7D82 0x7D83 0x7D84 0x7D85 0x7D86 0x7D87 0x7D88 \ - 0x7D89 0x7D8A 0x7D8B 0x7D8C 0x7D8D 0x7D8E 0x7D8F 0x7D90 \ - 0x7D91 0x7D92 0x7D93 0x7D94 0x7D95 0x7D96 0x7D97 0x7D98 \ - 0x5065 0x8230 0x5251 0x996F 0x6E10 0x6E85 0x6DA7 0x5EFA \ - 0x50F5 0x59DC 0x5C06 0x6D46 0x6C5F 0x7586 0x848B 0x6868 \ - 0x5956 0x8BB2 0x5320 0x9171 0x964D 0x8549 0x6912 0x7901 -46 0x7126 0x80F6 0x4EA4 0x90CA 0x6D47 0x9A84 0x5A07 0x56BC \ - 0x6405 0x94F0 0x77EB 0x4FA5 0x811A 0x72E1 0x89D2 0x997A \ - 0x7F34 0x7EDE 0x527F 0x6559 0x9175 0x8F7F 0x8F83 0x53EB \ - 0x7A96 0x63ED 0x63A5 0x7686 0x79F8 0x8857 0x9636 0x622A \ - 0x52AB 0x8282 0x6854 0x6770 0x6377 0x776B 0x7AED 0x6D01 \ - 0x7ED3 0x89E3 0x59D0 0x6212 0x85C9 0x82A5 0x754C 0x501F \ - 0x4ECB 0x75A5 0x8BEB 0x5C4A 0x5DFE 0x7B4B 0x65A4 0x91D1 \ - 0x4ECA 0x6D25 0x895F 0x7D27 0x9526 0x4EC5 0x8C28 0x8FDB \ - 0x9773 0x664B 0x7981 0x8FD1 0x70EC 0x6D78 0x7D99 0x7D9A \ - 0x7D9B 0x7D9C 0x7D9D 0x7D9E 0x7D9F 0x7DA0 0x7DA1 0x7DA2 \ - 0x7DA3 0x7DA4 0x7DA5 0x7DA7 0x7DA8 0x7DA9 0x7DAA 0x7DAB \ - 0x7DAC 0x7DAD 0x7DAF 0x7DB0 0x7DB1 0x7DB2 0x7DB3 0x7DB4 \ - 0x7DB5 0x7DB6 0x7DB7 0x7DB8 0x7DB9 0x7DBA 0x7DBB 0x7DBC \ - 0x7DBD 0x7DBE 0x7DBF 0x7DC0 0x7DC1 0x7DC2 0x7DC3 0x7DC4 \ - 0x7DC5 0x7DC6 0x7DC7 0x7DC8 0x7DC9 0x7DCA 0x7DCB 0x7DCC \ - 0x7DCD 0x7DCE 0x7DCF 0x7DD0 0x7DD1 0x7DD2 0x7DD3 0x7DD4 \ - 0x7DD5 0x7DD6 0x7DD7 0x7DD8 0x7DD9 0x7DDA 0x7DDB 0x7DDC \ - 0x7DDD 0x7DDE 0x7DDF 0x7DE0 0x7DE1 0x7DE2 0x7DE3 0x7DE4 \ - 0x7DE5 0x7DE6 0x7DE7 0x7DE8 0x7DE9 0x7DEA 0x7DEB 0x7DEC \ - 0x7DED 0x7DEE 0x7DEF 0x7DF0 0x7DF1 0x7DF2 0x7DF3 0x7DF4 \ - 0x7DF5 0x7DF6 0x7DF7 0x7DF8 0x7DF9 0x7DFA 0x5C3D 0x52B2 \ - 0x8346 0x5162 0x830E 0x775B 0x6676 0x9CB8 0x4EAC 0x60CA \ - 0x7CBE 0x7CB3 0x7ECF 0x4E95 0x8B66 0x666F 0x9888 0x9759 \ - 0x5883 0x656C 0x955C 0x5F84 0x75C9 0x9756 0x7ADF 0x7ADE \ - 0x51C0 0x70AF 0x7A98 0x63EA 0x7A76 0x7EA0 0x7396 0x97ED \ - 0x4E45 0x7078 0x4E5D 0x9152 0x53A9 0x6551 0x65E7 0x81FC \ - 0x8205 0x548E 0x5C31 0x759A 0x97A0 0x62D8 0x72D9 0x75BD \ - 0x5C45 0x9A79 0x83CA 0x5C40 0x5480 0x77E9 0x4E3E 0x6CAE \ - 0x805A 0x62D2 0x636E 0x5DE8 0x5177 0x8DDD 0x8E1E 0x952F \ - 0x4FF1 0x53E5 0x60E7 0x70AC 0x5267 0x6350 0x9E43 0x5A1F \ - 0x5026 0x7737 0x5377 0x7EE2 0x6485 0x652B 0x6289 0x6398 \ - 0x5014 0x7235 0x89C9 0x51B3 0x8BC0 0x7EDD 0x5747 0x83CC -47 0x94A7 0x519B 0x541B 0x5CFB 0x7DFB 0x7DFC 0x7DFD 0x7DFE \ - 0x7DFF 0x7E00 0x7E01 0x7E02 0x7E03 0x7E04 0x7E05 0x7E06 \ - 0x7E07 0x7E08 0x7E09 0x7E0A 0x7E0B 0x7E0C 0x7E0D 0x7E0E \ - 0x7E0F 0x7E10 0x7E11 0x7E12 0x7E13 0x7E14 0x7E15 0x7E16 \ - 0x7E17 0x7E18 0x7E19 0x7E1A 0x7E1B 0x7E1C 0x7E1D 0x7E1E \ - 0x7E1F 0x7E20 0x7E21 0x7E22 0x7E23 0x7E24 0x7E25 0x7E26 \ - 0x7E27 0x7E28 0x7E29 0x7E2A 0x7E2B 0x7E2C 0x7E2D 0x7E2E \ - 0x7E2F 0x7E30 0x7E31 0x7E32 0x7E33 0x7E34 0x7E35 0x7E36 \ - 0x7E37 0x7E38 0x7E39 0x7E3A 0x7E3C 0x7E3D 0x7E3E 0x7E3F \ - 0x7E40 0x7E42 0x7E43 0x7E44 0x7E45 0x7E46 0x7E48 0x7E49 \ - 0x7E4A 0x7E4B 0x7E4C 0x7E4D 0x7E4E 0x7E4F 0x7E50 0x7E51 \ - 0x7E52 0x7E53 0x7E54 0x7E55 0x7E56 0x7E57 0x7E58 0x7E59 \ - 0x7E5A 0x7E5B 0x7E5C 0x7E5D 0x4FCA 0x7AE3 0x6D5A 0x90E1 \ - 0x9A8F 0x5580 0x5496 0x5361 0x54AF 0x5F00 0x63E9 0x6977 \ - 0x51EF 0x6168 0x520A 0x582A 0x52D8 0x574E 0x780D 0x770B \ - 0x5EB7 0x6177 0x7CE0 0x625B 0x6297 0x4EA2 0x7095 0x8003 \ - 0x62F7 0x70E4 0x9760 0x5777 0x82DB 0x67EF 0x68F5 0x78D5 \ - 0x9897 0x79D1 0x58F3 0x54B3 0x53EF 0x6E34 0x514B 0x523B \ - 0x5BA2 0x8BFE 0x80AF 0x5543 0x57A6 0x6073 0x5751 0x542D \ - 0x7A7A 0x6050 0x5B54 0x63A7 0x62A0 0x53E3 0x6263 0x5BC7 \ - 0x67AF 0x54ED 0x7A9F 0x82E6 0x9177 0x5E93 0x88E4 0x5938 \ - 0x57AE 0x630E 0x8DE8 0x80EF 0x5757 0x7B77 0x4FA9 0x5FEB \ - 0x5BBD 0x6B3E 0x5321 0x7B50 0x72C2 0x6846 0x77FF 0x7736 \ - 0x65F7 0x51B5 0x4E8F 0x76D4 0x5CBF 0x7AA5 0x8475 0x594E \ - 0x9B41 0x5080 0x7E5E 0x7E5F 0x7E60 0x7E61 0x7E62 0x7E63 \ - 0x7E64 0x7E65 0x7E66 0x7E67 0x7E68 0x7E69 0x7E6A 0x7E6B \ - 0x7E6C 0x7E6D 0x7E6E 0x7E6F 0x7E70 0x7E71 0x7E72 0x7E73 \ - 0x7E74 0x7E75 0x7E76 0x7E77 0x7E78 0x7E79 0x7E7A 0x7E7B \ - 0x7E7C 0x7E7D 0x7E7E 0x7E7F 0x7E80 0x7E81 0x7E83 0x7E84 \ - 0x7E85 0x7E86 0x7E87 0x7E88 0x7E89 0x7E8A 0x7E8B 0x7E8C \ - 0x7E8D 0x7E8E 0x7E8F 0x7E90 0x7E91 0x7E92 0x7E93 0x7E94 \ - 0x7E95 0x7E96 0x7E97 0x7E98 0x7E99 0x7E9A 0x7E9C 0x7E9D -48 0x7E9E 0x7EAE 0x7EB4 0x7EBB 0x7EBC 0x7ED6 0x7EE4 0x7EEC \ - 0x7EF9 0x7F0A 0x7F10 0x7F1E 0x7F37 0x7F39 0x7F3B 0x7F3C \ - 0x7F3D 0x7F3E 0x7F3F 0x7F40 0x7F41 0x7F43 0x7F46 0x7F47 \ - 0x7F48 0x7F49 0x7F4A 0x7F4B 0x7F4C 0x7F4D 0x7F4E 0x7F4F \ - 0x7F52 0x7F53 0x9988 0x6127 0x6E83 0x5764 0x6606 0x6346 \ - 0x56F0 0x62EC 0x6269 0x5ED3 0x9614 0x5783 0x62C9 0x5587 \ - 0x8721 0x814A 0x8FA3 0x5566 0x83B1 0x6765 0x8D56 0x84DD \ - 0x5A6A 0x680F 0x62E6 0x7BEE 0x9611 0x5170 0x6F9C 0x8C30 \ - 0x63FD 0x89C8 0x61D2 0x7F06 0x70C2 0x6EE5 0x7405 0x6994 \ - 0x72FC 0x5ECA 0x90CE 0x6717 0x6D6A 0x635E 0x52B3 0x7262 \ - 0x8001 0x4F6C 0x59E5 0x916A 0x70D9 0x6D9D 0x52D2 0x4E50 \ - 0x96F7 0x956D 0x857E 0x78CA 0x7D2F 0x5121 0x5792 0x64C2 \ - 0x808B 0x7C7B 0x6CEA 0x68F1 0x695E 0x51B7 0x5398 0x68A8 \ - 0x7281 0x9ECE 0x7BF1 0x72F8 0x79BB 0x6F13 0x7406 0x674E \ - 0x91CC 0x9CA4 0x793C 0x8389 0x8354 0x540F 0x6817 0x4E3D \ - 0x5389 0x52B1 0x783E 0x5386 0x5229 0x5088 0x4F8B 0x4FD0 \ - 0x7F56 0x7F59 0x7F5B 0x7F5C 0x7F5D 0x7F5E 0x7F60 0x7F63 \ - 0x7F64 0x7F65 0x7F66 0x7F67 0x7F6B 0x7F6C 0x7F6D 0x7F6F \ - 0x7F70 0x7F73 0x7F75 0x7F76 0x7F77 0x7F78 0x7F7A 0x7F7B \ - 0x7F7C 0x7F7D 0x7F7F 0x7F80 0x7F82 0x7F83 0x7F84 0x7F85 \ - 0x7F86 0x7F87 0x7F88 0x7F89 0x7F8B 0x7F8D 0x7F8F 0x7F90 \ - 0x7F91 0x7F92 0x7F93 0x7F95 0x7F96 0x7F97 0x7F98 0x7F99 \ - 0x7F9B 0x7F9C 0x7FA0 0x7FA2 0x7FA3 0x7FA5 0x7FA6 0x7FA8 \ - 0x7FA9 0x7FAA 0x7FAB 0x7FAC 0x7FAD 0x7FAE 0x7FB1 0x7FB3 \ - 0x7FB4 0x7FB5 0x7FB6 0x7FB7 0x7FBA 0x7FBB 0x7FBE 0x7FC0 \ - 0x7FC2 0x7FC3 0x7FC4 0x7FC6 0x7FC7 0x7FC8 0x7FC9 0x7FCB \ - 0x7FCD 0x7FCF 0x7FD0 0x7FD1 0x7FD2 0x7FD3 0x7FD6 0x7FD7 \ - 0x7FD9 0x7FDA 0x7FDB 0x7FDC 0x7FDD 0x7FDE 0x7FE2 0x7FE3 \ - 0x75E2 0x7ACB 0x7C92 0x6CA5 0x96B6 0x529B 0x7483 0x54E9 \ - 0x4FE9 0x8054 0x83B2 0x8FDE 0x9570 0x5EC9 0x601C 0x6D9F \ - 0x5E18 0x655B 0x8138 0x94FE 0x604B 0x70BC 0x7EC3 0x7CAE \ - 0x51C9 0x6881 0x7CB1 0x826F 0x4E24 0x8F86 0x91CF 0x667E -49 0x4EAE 0x8C05 0x64A9 0x804A 0x50DA 0x7597 0x71CE 0x5BE5 \ - 0x8FBD 0x6F66 0x4E86 0x6482 0x9563 0x5ED6 0x6599 0x5217 \ - 0x88C2 0x70C8 0x52A3 0x730E 0x7433 0x6797 0x78F7 0x9716 \ - 0x4E34 0x90BB 0x9CDE 0x6DCB 0x51DB 0x8D41 0x541D 0x62CE \ - 0x73B2 0x83F1 0x96F6 0x9F84 0x94C3 0x4F36 0x7F9A 0x51CC \ - 0x7075 0x9675 0x5CAD 0x9886 0x53E6 0x4EE4 0x6E9C 0x7409 \ - 0x69B4 0x786B 0x998F 0x7559 0x5218 0x7624 0x6D41 0x67F3 \ - 0x516D 0x9F99 0x804B 0x5499 0x7B3C 0x7ABF 0x7FE4 0x7FE7 \ - 0x7FE8 0x7FEA 0x7FEB 0x7FEC 0x7FED 0x7FEF 0x7FF2 0x7FF4 \ - 0x7FF5 0x7FF6 0x7FF7 0x7FF8 0x7FF9 0x7FFA 0x7FFD 0x7FFE \ - 0x7FFF 0x8002 0x8007 0x8008 0x8009 0x800A 0x800E 0x800F \ - 0x8011 0x8013 0x801A 0x801B 0x801D 0x801E 0x801F 0x8021 \ - 0x8023 0x8024 0x802B 0x802C 0x802D 0x802E 0x802F 0x8030 \ - 0x8032 0x8034 0x8039 0x803A 0x803C 0x803E 0x8040 0x8041 \ - 0x8044 0x8045 0x8047 0x8048 0x8049 0x804E 0x804F 0x8050 \ - 0x8051 0x8053 0x8055 0x8056 0x8057 0x8059 0x805B 0x805C \ - 0x805D 0x805E 0x805F 0x8060 0x8061 0x8062 0x8063 0x8064 \ - 0x8065 0x8066 0x8067 0x8068 0x806B 0x806C 0x806D 0x806E \ - 0x806F 0x8070 0x8072 0x8073 0x8074 0x8075 0x8076 0x8077 \ - 0x8078 0x8079 0x807A 0x807B 0x807C 0x807D 0x9686 0x5784 \ - 0x62E2 0x9647 0x697C 0x5A04 0x6402 0x7BD3 0x6F0F 0x964B \ - 0x82A6 0x5362 0x9885 0x5E90 0x7089 0x63B3 0x5364 0x864F \ - 0x9C81 0x9E93 0x788C 0x9732 0x8DEF 0x8D42 0x9E7F 0x6F5E \ - 0x7984 0x5F55 0x9646 0x622E 0x9A74 0x5415 0x94DD 0x4FA3 \ - 0x65C5 0x5C65 0x5C61 0x7F15 0x8651 0x6C2F 0x5F8B 0x7387 \ - 0x6EE4 0x7EFF 0x5CE6 0x631B 0x5B6A 0x6EE6 0x5375 0x4E71 \ - 0x63A0 0x7565 0x62A1 0x8F6E 0x4F26 0x4ED1 0x6CA6 0x7EB6 \ - 0x8BBA 0x841D 0x87BA 0x7F57 0x903B 0x9523 0x7BA9 0x9AA1 \ - 0x88F8 0x843D 0x6D1B 0x9A86 0x7EDC 0x5988 0x9EBB 0x739B \ - 0x7801 0x8682 0x9A6C 0x9A82 0x561B 0x5417 0x57CB 0x4E70 \ - 0x9EA6 0x5356 0x8FC8 0x8109 0x7792 0x9992 0x86EE 0x6EE1 \ - 0x8513 0x66FC 0x6162 0x6F2B 0x807E 0x8081 0x8082 0x8085 -50 0x8088 0x808A 0x808D 0x808E 0x808F 0x8090 0x8091 0x8092 \ - 0x8094 0x8095 0x8097 0x8099 0x809E 0x80A3 0x80A6 0x80A7 \ - 0x80A8 0x80AC 0x80B0 0x80B3 0x80B5 0x80B6 0x80B8 0x80B9 \ - 0x80BB 0x80C5 0x80C7 0x80C8 0x80C9 0x80CA 0x80CB 0x80CF \ - 0x80D0 0x80D1 0x80D2 0x80D3 0x80D4 0x80D5 0x80D8 0x80DF \ - 0x80E0 0x80E2 0x80E3 0x80E6 0x80EE 0x80F5 0x80F7 0x80F9 \ - 0x80FB 0x80FE 0x80FF 0x8100 0x8101 0x8103 0x8104 0x8105 \ - 0x8107 0x8108 0x810B 0x810C 0x8115 0x8117 0x8119 0x811B \ - 0x811C 0x811D 0x811F 0x8120 0x8121 0x8122 0x8123 0x8124 \ - 0x8125 0x8126 0x8127 0x8128 0x8129 0x812A 0x812B 0x812D \ - 0x812E 0x8130 0x8133 0x8134 0x8135 0x8137 0x8139 0x813A \ - 0x813B 0x813C 0x813D 0x813F 0x8C29 0x8292 0x832B 0x76F2 \ - 0x6C13 0x5FD9 0x83BD 0x732B 0x8305 0x951A 0x6BDB 0x77DB \ - 0x94C6 0x536F 0x8302 0x5192 0x5E3D 0x8C8C 0x8D38 0x4E48 \ - 0x73AB 0x679A 0x6885 0x9176 0x9709 0x7164 0x6CA1 0x7709 \ - 0x5A92 0x9541 0x6BCF 0x7F8E 0x6627 0x5BD0 0x59B9 0x5A9A \ - 0x95E8 0x95F7 0x4EEC 0x840C 0x8499 0x6AAC 0x76DF 0x9530 \ - 0x731B 0x68A6 0x5B5F 0x772F 0x919A 0x9761 0x7CDC 0x8FF7 \ - 0x8C1C 0x5F25 0x7C73 0x79D8 0x89C5 0x6CCC 0x871C 0x5BC6 \ - 0x5E42 0x68C9 0x7720 0x7EF5 0x5195 0x514D 0x52C9 0x5A29 \ - 0x7F05 0x9762 0x82D7 0x63CF 0x7784 0x85D0 0x79D2 0x6E3A \ - 0x5E99 0x5999 0x8511 0x706D 0x6C11 0x62BF 0x76BF 0x654F \ - 0x60AF 0x95FD 0x660E 0x879F 0x9E23 0x94ED 0x540D 0x547D \ - 0x8C2C 0x6478 0x8140 0x8141 0x8142 0x8143 0x8144 0x8145 \ - 0x8147 0x8149 0x814D 0x814E 0x814F 0x8152 0x8156 0x8157 \ - 0x8158 0x815B 0x815C 0x815D 0x815E 0x815F 0x8161 0x8162 \ - 0x8163 0x8164 0x8166 0x8168 0x816A 0x816B 0x816C 0x816F \ - 0x8172 0x8173 0x8175 0x8176 0x8177 0x8178 0x8181 0x8183 \ - 0x8184 0x8185 0x8186 0x8187 0x8189 0x818B 0x818C 0x818D \ - 0x818E 0x8190 0x8192 0x8193 0x8194 0x8195 0x8196 0x8197 \ - 0x8199 0x819A 0x819E 0x819F 0x81A0 0x81A1 0x81A2 0x81A4 \ - 0x81A5 0x81A7 0x81A9 0x81AB 0x81AC 0x81AD 0x81AE 0x81AF -51 0x81B0 0x81B1 0x81B2 0x81B4 0x81B5 0x81B6 0x81B7 0x81B8 \ - 0x81B9 0x81BC 0x81BD 0x81BE 0x81BF 0x81C4 0x81C5 0x81C7 \ - 0x81C8 0x81C9 0x81CB 0x81CD 0x81CE 0x81CF 0x81D0 0x81D1 \ - 0x81D2 0x81D3 0x6479 0x8611 0x6A21 0x819C 0x78E8 0x6469 \ - 0x9B54 0x62B9 0x672B 0x83AB 0x58A8 0x9ED8 0x6CAB 0x6F20 \ - 0x5BDE 0x964C 0x8C0B 0x725F 0x67D0 0x62C7 0x7261 0x4EA9 \ - 0x59C6 0x6BCD 0x5893 0x66AE 0x5E55 0x52DF 0x6155 0x6728 \ - 0x76EE 0x7766 0x7267 0x7A46 0x62FF 0x54EA 0x5450 0x94A0 \ - 0x90A3 0x5A1C 0x7EB3 0x6C16 0x4E43 0x5976 0x8010 0x5948 \ - 0x5357 0x7537 0x96BE 0x56CA 0x6320 0x8111 0x607C 0x95F9 \ - 0x6DD6 0x5462 0x9981 0x5185 0x5AE9 0x80FD 0x59AE 0x9713 \ - 0x502A 0x6CE5 0x5C3C 0x62DF 0x4F60 0x533F 0x817B 0x9006 \ - 0x6EBA 0x852B 0x62C8 0x5E74 0x78BE 0x64B5 0x637B 0x5FF5 \ - 0x5A18 0x917F 0x9E1F 0x5C3F 0x634F 0x8042 0x5B7D 0x556E \ - 0x954A 0x954D 0x6D85 0x60A8 0x67E0 0x72DE 0x51DD 0x5B81 \ - 0x81D4 0x81D5 0x81D6 0x81D7 0x81D8 0x81D9 0x81DA 0x81DB \ - 0x81DC 0x81DD 0x81DE 0x81DF 0x81E0 0x81E1 0x81E2 0x81E4 \ - 0x81E5 0x81E6 0x81E8 0x81E9 0x81EB 0x81EE 0x81EF 0x81F0 \ - 0x81F1 0x81F2 0x81F5 0x81F6 0x81F7 0x81F8 0x81F9 0x81FA \ - 0x81FD 0x81FF 0x8203 0x8207 0x8208 0x8209 0x820A 0x820B \ - 0x820E 0x820F 0x8211 0x8213 0x8215 0x8216 0x8217 0x8218 \ - 0x8219 0x821A 0x821D 0x8220 0x8224 0x8225 0x8226 0x8227 \ - 0x8229 0x822E 0x8232 0x823A 0x823C 0x823D 0x823F 0x8240 \ - 0x8241 0x8242 0x8243 0x8245 0x8246 0x8248 0x824A 0x824C \ - 0x824D 0x824E 0x8250 0x8251 0x8252 0x8253 0x8254 0x8255 \ - 0x8256 0x8257 0x8259 0x825B 0x825C 0x825D 0x825E 0x8260 \ - 0x8261 0x8262 0x8263 0x8264 0x8265 0x8266 0x8267 0x8269 \ - 0x62E7 0x6CDE 0x725B 0x626D 0x94AE 0x7EBD 0x8113 0x6D53 \ - 0x519C 0x5F04 0x5974 0x52AA 0x6012 0x5973 0x6696 0x8650 \ - 0x759F 0x632A 0x61E6 0x7CEF 0x8BFA 0x54E6 0x6B27 0x9E25 \ - 0x6BB4 0x85D5 0x5455 0x5076 0x6CA4 0x556A 0x8DB4 0x722C \ - 0x5E15 0x6015 0x7436 0x62CD 0x6392 0x724C 0x5F98 0x6E43 -52 0x6D3E 0x6500 0x6F58 0x76D8 0x78D0 0x76FC 0x7554 0x5224 \ - 0x53DB 0x4E53 0x5E9E 0x65C1 0x802A 0x80D6 0x629B 0x5486 \ - 0x5228 0x70AE 0x888D 0x8DD1 0x6CE1 0x5478 0x80DA 0x57F9 \ - 0x88F4 0x8D54 0x966A 0x914D 0x4F69 0x6C9B 0x55B7 0x76C6 \ - 0x7830 0x62A8 0x70F9 0x6F8E 0x5F6D 0x84EC 0x68DA 0x787C \ - 0x7BF7 0x81A8 0x670B 0x9E4F 0x6367 0x78B0 0x576F 0x7812 \ - 0x9739 0x6279 0x62AB 0x5288 0x7435 0x6BD7 0x826A 0x826B \ - 0x826C 0x826D 0x8271 0x8275 0x8276 0x8277 0x8278 0x827B \ - 0x827C 0x8280 0x8281 0x8283 0x8285 0x8286 0x8287 0x8289 \ - 0x828C 0x8290 0x8293 0x8294 0x8295 0x8296 0x829A 0x829B \ - 0x829E 0x82A0 0x82A2 0x82A3 0x82A7 0x82B2 0x82B5 0x82B6 \ - 0x82BA 0x82BB 0x82BC 0x82BF 0x82C0 0x82C2 0x82C3 0x82C5 \ - 0x82C6 0x82C9 0x82D0 0x82D6 0x82D9 0x82DA 0x82DD 0x82E2 \ - 0x82E7 0x82E8 0x82E9 0x82EA 0x82EC 0x82ED 0x82EE 0x82F0 \ - 0x82F2 0x82F3 0x82F5 0x82F6 0x82F8 0x82FA 0x82FC 0x82FD \ - 0x82FE 0x82FF 0x8300 0x830A 0x830B 0x830D 0x8310 0x8312 \ - 0x8313 0x8316 0x8318 0x8319 0x831D 0x831E 0x831F 0x8320 \ - 0x8321 0x8322 0x8323 0x8324 0x8325 0x8326 0x8329 0x832A \ - 0x832E 0x8330 0x8332 0x8337 0x833B 0x833D 0x5564 0x813E \ - 0x75B2 0x76AE 0x5339 0x75DE 0x50FB 0x5C41 0x8B6C 0x7BC7 \ - 0x504F 0x7247 0x9A97 0x98D8 0x6F02 0x74E2 0x7968 0x6487 \ - 0x77A5 0x62FC 0x9891 0x8D2B 0x54C1 0x8058 0x4E52 0x576A \ - 0x82F9 0x840D 0x5E73 0x51ED 0x74F6 0x8BC4 0x5C4F 0x5761 \ - 0x6CFC 0x9887 0x5A46 0x7834 0x9B44 0x8FEB 0x7C95 0x5256 \ - 0x6251 0x94FA 0x4EC6 0x8386 0x8461 0x83E9 0x84B2 0x57D4 \ - 0x6734 0x5703 0x666E 0x6D66 0x8C31 0x66DD 0x7011 0x671F \ - 0x6B3A 0x6816 0x621A 0x59BB 0x4E03 0x51C4 0x6F06 0x67D2 \ - 0x6C8F 0x5176 0x68CB 0x5947 0x6B67 0x7566 0x5D0E 0x8110 \ - 0x9F50 0x65D7 0x7948 0x7941 0x9A91 0x8D77 0x5C82 0x4E5E \ - 0x4F01 0x542F 0x5951 0x780C 0x5668 0x6C14 0x8FC4 0x5F03 \ - 0x6C7D 0x6CE3 0x8BAB 0x6390 0x833E 0x833F 0x8341 0x8342 \ - 0x8344 0x8345 0x8348 0x834A 0x834B 0x834C 0x834D 0x834E -53 0x8353 0x8355 0x8356 0x8357 0x8358 0x8359 0x835D 0x8362 \ - 0x8370 0x8371 0x8372 0x8373 0x8374 0x8375 0x8376 0x8379 \ - 0x837A 0x837E 0x837F 0x8380 0x8381 0x8382 0x8383 0x8384 \ - 0x8387 0x8388 0x838A 0x838B 0x838C 0x838D 0x838F 0x8390 \ - 0x8391 0x8394 0x8395 0x8396 0x8397 0x8399 0x839A 0x839D \ - 0x839F 0x83A1 0x83A2 0x83A3 0x83A4 0x83A5 0x83A6 0x83A7 \ - 0x83AC 0x83AD 0x83AE 0x83AF 0x83B5 0x83BB 0x83BE 0x83BF \ - 0x83C2 0x83C3 0x83C4 0x83C6 0x83C8 0x83C9 0x83CB 0x83CD \ - 0x83CE 0x83D0 0x83D1 0x83D2 0x83D3 0x83D5 0x83D7 0x83D9 \ - 0x83DA 0x83DB 0x83DE 0x83E2 0x83E3 0x83E4 0x83E6 0x83E7 \ - 0x83E8 0x83EB 0x83EC 0x83ED 0x6070 0x6D3D 0x7275 0x6266 \ - 0x948E 0x94C5 0x5343 0x8FC1 0x7B7E 0x4EDF 0x8C26 0x4E7E \ - 0x9ED4 0x94B1 0x94B3 0x524D 0x6F5C 0x9063 0x6D45 0x8C34 \ - 0x5811 0x5D4C 0x6B20 0x6B49 0x67AA 0x545B 0x8154 0x7F8C \ - 0x5899 0x8537 0x5F3A 0x62A2 0x6A47 0x9539 0x6572 0x6084 \ - 0x6865 0x77A7 0x4E54 0x4FA8 0x5DE7 0x9798 0x64AC 0x7FD8 \ - 0x5CED 0x4FCF 0x7A8D 0x5207 0x8304 0x4E14 0x602F 0x7A83 \ - 0x94A6 0x4FB5 0x4EB2 0x79E6 0x7434 0x52E4 0x82B9 0x64D2 \ - 0x79BD 0x5BDD 0x6C81 0x9752 0x8F7B 0x6C22 0x503E 0x537F \ - 0x6E05 0x64CE 0x6674 0x6C30 0x60C5 0x9877 0x8BF7 0x5E86 \ - 0x743C 0x7A77 0x79CB 0x4E18 0x90B1 0x7403 0x6C42 0x56DA \ - 0x914B 0x6CC5 0x8D8B 0x533A 0x86C6 0x66F2 0x8EAF 0x5C48 \ - 0x9A71 0x6E20 0x83EE 0x83EF 0x83F3 0x83F4 0x83F5 0x83F6 \ - 0x83F7 0x83FA 0x83FB 0x83FC 0x83FE 0x83FF 0x8400 0x8402 \ - 0x8405 0x8407 0x8408 0x8409 0x840A 0x8410 0x8412 0x8413 \ - 0x8414 0x8415 0x8416 0x8417 0x8419 0x841A 0x841B 0x841E \ - 0x841F 0x8420 0x8421 0x8422 0x8423 0x8429 0x842A 0x842B \ - 0x842C 0x842D 0x842E 0x842F 0x8430 0x8432 0x8433 0x8434 \ - 0x8435 0x8436 0x8437 0x8439 0x843A 0x843B 0x843E 0x843F \ - 0x8440 0x8441 0x8442 0x8443 0x8444 0x8445 0x8447 0x8448 \ - 0x8449 0x844A 0x844B 0x844C 0x844D 0x844E 0x844F 0x8450 \ - 0x8452 0x8453 0x8454 0x8455 0x8456 0x8458 0x845D 0x845E -54 0x845F 0x8460 0x8462 0x8464 0x8465 0x8466 0x8467 0x8468 \ - 0x846A 0x846E 0x846F 0x8470 0x8472 0x8474 0x8477 0x8479 \ - 0x847B 0x847C 0x53D6 0x5A36 0x9F8B 0x8DA3 0x53BB 0x5708 \ - 0x98A7 0x6743 0x919B 0x6CC9 0x5168 0x75CA 0x62F3 0x72AC \ - 0x5238 0x529D 0x7F3A 0x7094 0x7638 0x5374 0x9E4A 0x69B7 \ - 0x786E 0x96C0 0x88D9 0x7FA4 0x7136 0x71C3 0x5189 0x67D3 \ - 0x74E4 0x58E4 0x6518 0x56B7 0x8BA9 0x9976 0x6270 0x7ED5 \ - 0x60F9 0x70ED 0x58EC 0x4EC1 0x4EBA 0x5FCD 0x97E7 0x4EFB \ - 0x8BA4 0x5203 0x598A 0x7EAB 0x6254 0x4ECD 0x65E5 0x620E \ - 0x8338 0x84C9 0x8363 0x878D 0x7194 0x6EB6 0x5BB9 0x7ED2 \ - 0x5197 0x63C9 0x67D4 0x8089 0x8339 0x8815 0x5112 0x5B7A \ - 0x5982 0x8FB1 0x4E73 0x6C5D 0x5165 0x8925 0x8F6F 0x962E \ - 0x854A 0x745E 0x9510 0x95F0 0x6DA6 0x82E5 0x5F31 0x6492 \ - 0x6D12 0x8428 0x816E 0x9CC3 0x585E 0x8D5B 0x4E09 0x53C1 \ - 0x847D 0x847E 0x847F 0x8480 0x8481 0x8483 0x8484 0x8485 \ - 0x8486 0x848A 0x848D 0x848F 0x8490 0x8491 0x8492 0x8493 \ - 0x8494 0x8495 0x8496 0x8498 0x849A 0x849B 0x849D 0x849E \ - 0x849F 0x84A0 0x84A2 0x84A3 0x84A4 0x84A5 0x84A6 0x84A7 \ - 0x84A8 0x84A9 0x84AA 0x84AB 0x84AC 0x84AD 0x84AE 0x84B0 \ - 0x84B1 0x84B3 0x84B5 0x84B6 0x84B7 0x84BB 0x84BC 0x84BE \ - 0x84C0 0x84C2 0x84C3 0x84C5 0x84C6 0x84C7 0x84C8 0x84CB \ - 0x84CC 0x84CE 0x84CF 0x84D2 0x84D4 0x84D5 0x84D7 0x84D8 \ - 0x84D9 0x84DA 0x84DB 0x84DC 0x84DE 0x84E1 0x84E2 0x84E4 \ - 0x84E7 0x84E8 0x84E9 0x84EA 0x84EB 0x84ED 0x84EE 0x84EF \ - 0x84F1 0x84F2 0x84F3 0x84F4 0x84F5 0x84F6 0x84F7 0x84F8 \ - 0x84F9 0x84FA 0x84FB 0x84FD 0x84FE 0x8500 0x8501 0x8502 \ - 0x4F1E 0x6563 0x6851 0x55D3 0x4E27 0x6414 0x9A9A 0x626B \ - 0x5AC2 0x745F 0x8272 0x6DA9 0x68EE 0x50E7 0x838E 0x7802 \ - 0x6740 0x5239 0x6C99 0x7EB1 0x50BB 0x5565 0x715E 0x7B5B \ - 0x6652 0x73CA 0x82EB 0x6749 0x5C71 0x5220 0x717D 0x886B \ - 0x95EA 0x9655 0x64C5 0x8D61 0x81B3 0x5584 0x6C55 0x6247 \ - 0x7F2E 0x5892 0x4F24 0x5546 0x8D4F 0x664C 0x4E0A 0x5C1A -55 0x88F3 0x68A2 0x634E 0x7A0D 0x70E7 0x828D 0x52FA 0x97F6 \ - 0x5C11 0x54E8 0x90B5 0x7ECD 0x5962 0x8D4A 0x86C7 0x820C \ - 0x820D 0x8D66 0x6444 0x5C04 0x6151 0x6D89 0x793E 0x8BBE \ - 0x7837 0x7533 0x547B 0x4F38 0x8EAB 0x6DF1 0x5A20 0x7EC5 \ - 0x795E 0x6C88 0x5BA1 0x5A76 0x751A 0x80BE 0x614E 0x6E17 \ - 0x58F0 0x751F 0x7525 0x7272 0x5347 0x7EF3 0x8503 0x8504 \ - 0x8505 0x8506 0x8507 0x8508 0x8509 0x850A 0x850B 0x850D \ - 0x850E 0x850F 0x8510 0x8512 0x8514 0x8515 0x8516 0x8518 \ - 0x8519 0x851B 0x851C 0x851D 0x851E 0x8520 0x8522 0x8523 \ - 0x8524 0x8525 0x8526 0x8527 0x8528 0x8529 0x852A 0x852D \ - 0x852E 0x852F 0x8530 0x8531 0x8532 0x8533 0x8534 0x8535 \ - 0x8536 0x853E 0x853F 0x8540 0x8541 0x8542 0x8544 0x8545 \ - 0x8546 0x8547 0x854B 0x854C 0x854D 0x854E 0x854F 0x8550 \ - 0x8551 0x8552 0x8553 0x8554 0x8555 0x8557 0x8558 0x855A \ - 0x855B 0x855C 0x855D 0x855F 0x8560 0x8561 0x8562 0x8563 \ - 0x8565 0x8566 0x8567 0x8569 0x856A 0x856B 0x856C 0x856D \ - 0x856E 0x856F 0x8570 0x8571 0x8573 0x8575 0x8576 0x8577 \ - 0x8578 0x857C 0x857D 0x857F 0x8580 0x8581 0x7701 0x76DB \ - 0x5269 0x80DC 0x5723 0x5E08 0x5931 0x72EE 0x65BD 0x6E7F \ - 0x8BD7 0x5C38 0x8671 0x5341 0x77F3 0x62FE 0x65F6 0x4EC0 \ - 0x98DF 0x8680 0x5B9E 0x8BC6 0x53F2 0x77E2 0x4F7F 0x5C4E \ - 0x9A76 0x59CB 0x5F0F 0x793A 0x58EB 0x4E16 0x67FF 0x4E8B \ - 0x62ED 0x8A93 0x901D 0x52BF 0x662F 0x55DC 0x566C 0x9002 \ - 0x4ED5 0x4F8D 0x91CA 0x9970 0x6C0F 0x5E02 0x6043 0x5BA4 \ - 0x89C6 0x8BD5 0x6536 0x624B 0x9996 0x5B88 0x5BFF 0x6388 \ - 0x552E 0x53D7 0x7626 0x517D 0x852C 0x67A2 0x68B3 0x6B8A \ - 0x6292 0x8F93 0x53D4 0x8212 0x6DD1 0x758F 0x4E66 0x8D4E \ - 0x5B70 0x719F 0x85AF 0x6691 0x66D9 0x7F72 0x8700 0x9ECD \ - 0x9F20 0x5C5E 0x672F 0x8FF0 0x6811 0x675F 0x620D 0x7AD6 \ - 0x5885 0x5EB6 0x6570 0x6F31 0x8582 0x8583 0x8586 0x8588 \ - 0x8589 0x858A 0x858B 0x858C 0x858D 0x858E 0x8590 0x8591 \ - 0x8592 0x8593 0x8594 0x8595 0x8596 0x8597 0x8598 0x8599 -56 0x859A 0x859D 0x859E 0x859F 0x85A0 0x85A1 0x85A2 0x85A3 \ - 0x85A5 0x85A6 0x85A7 0x85A9 0x85AB 0x85AC 0x85AD 0x85B1 \ - 0x85B2 0x85B3 0x85B4 0x85B5 0x85B6 0x85B8 0x85BA 0x85BB \ - 0x85BC 0x85BD 0x85BE 0x85BF 0x85C0 0x85C2 0x85C3 0x85C4 \ - 0x85C5 0x85C6 0x85C7 0x85C8 0x85CA 0x85CB 0x85CC 0x85CD \ - 0x85CE 0x85D1 0x85D2 0x85D4 0x85D6 0x85D7 0x85D8 0x85D9 \ - 0x85DA 0x85DB 0x85DD 0x85DE 0x85DF 0x85E0 0x85E1 0x85E2 \ - 0x85E3 0x85E5 0x85E6 0x85E7 0x85E8 0x85EA 0x85EB 0x85EC \ - 0x85ED 0x85EE 0x85EF 0x85F0 0x85F1 0x85F2 0x85F3 0x85F4 \ - 0x85F5 0x85F6 0x85F7 0x85F8 0x6055 0x5237 0x800D 0x6454 \ - 0x8870 0x7529 0x5E05 0x6813 0x62F4 0x971C 0x53CC 0x723D \ - 0x8C01 0x6C34 0x7761 0x7A0E 0x542E 0x77AC 0x987A 0x821C \ - 0x8BF4 0x7855 0x6714 0x70C1 0x65AF 0x6495 0x5636 0x601D \ - 0x79C1 0x53F8 0x4E1D 0x6B7B 0x8086 0x5BFA 0x55E3 0x56DB \ - 0x4F3A 0x4F3C 0x9972 0x5DF3 0x677E 0x8038 0x6002 0x9882 \ - 0x9001 0x5B8B 0x8BBC 0x8BF5 0x641C 0x8258 0x64DE 0x55FD \ - 0x82CF 0x9165 0x4FD7 0x7D20 0x901F 0x7C9F 0x50F3 0x5851 \ - 0x6EAF 0x5BBF 0x8BC9 0x8083 0x9178 0x849C 0x7B97 0x867D \ - 0x968B 0x968F 0x7EE5 0x9AD3 0x788E 0x5C81 0x7A57 0x9042 \ - 0x96A7 0x795F 0x5B59 0x635F 0x7B0B 0x84D1 0x68AD 0x5506 \ - 0x7F29 0x7410 0x7D22 0x9501 0x6240 0x584C 0x4ED6 0x5B83 \ - 0x5979 0x5854 0x85F9 0x85FA 0x85FC 0x85FD 0x85FE 0x8600 \ - 0x8601 0x8602 0x8603 0x8604 0x8606 0x8607 0x8608 0x8609 \ - 0x860A 0x860B 0x860C 0x860D 0x860E 0x860F 0x8610 0x8612 \ - 0x8613 0x8614 0x8615 0x8617 0x8618 0x8619 0x861A 0x861B \ - 0x861C 0x861D 0x861E 0x861F 0x8620 0x8621 0x8622 0x8623 \ - 0x8624 0x8625 0x8626 0x8628 0x862A 0x862B 0x862C 0x862D \ - 0x862E 0x862F 0x8630 0x8631 0x8632 0x8633 0x8634 0x8635 \ - 0x8636 0x8637 0x8639 0x863A 0x863B 0x863D 0x863E 0x863F \ - 0x8640 0x8641 0x8642 0x8643 0x8644 0x8645 0x8646 0x8647 \ - 0x8648 0x8649 0x864A 0x864B 0x864C 0x8652 0x8653 0x8655 \ - 0x8656 0x8657 0x8658 0x8659 0x865B 0x865C 0x865D 0x865F -57 0x8660 0x8661 0x8663 0x8664 0x8665 0x8666 0x8667 0x8668 \ - 0x8669 0x866A 0x736D 0x631E 0x8E4B 0x8E0F 0x80CE 0x82D4 \ - 0x62AC 0x53F0 0x6CF0 0x915E 0x592A 0x6001 0x6C70 0x574D \ - 0x644A 0x8D2A 0x762B 0x6EE9 0x575B 0x6A80 0x75F0 0x6F6D \ - 0x8C2D 0x8C08 0x5766 0x6BEF 0x8892 0x78B3 0x63A2 0x53F9 \ - 0x70AD 0x6C64 0x5858 0x642A 0x5802 0x68E0 0x819B 0x5510 \ - 0x7CD6 0x5018 0x8EBA 0x6DCC 0x8D9F 0x70EB 0x638F 0x6D9B \ - 0x6ED4 0x7EE6 0x8404 0x6843 0x9003 0x6DD8 0x9676 0x8BA8 \ - 0x5957 0x7279 0x85E4 0x817E 0x75BC 0x8A8A 0x68AF 0x5254 \ - 0x8E22 0x9511 0x63D0 0x9898 0x8E44 0x557C 0x4F53 0x66FF \ - 0x568F 0x60D5 0x6D95 0x5243 0x5C49 0x5929 0x6DFB 0x586B \ - 0x7530 0x751C 0x606C 0x8214 0x8146 0x6311 0x6761 0x8FE2 \ - 0x773A 0x8DF3 0x8D34 0x94C1 0x5E16 0x5385 0x542C 0x70C3 \ - 0x866D 0x866F 0x8670 0x8672 0x8673 0x8674 0x8675 0x8676 \ - 0x8677 0x8678 0x8683 0x8684 0x8685 0x8686 0x8687 0x8688 \ - 0x8689 0x868E 0x868F 0x8690 0x8691 0x8692 0x8694 0x8696 \ - 0x8697 0x8698 0x8699 0x869A 0x869B 0x869E 0x869F 0x86A0 \ - 0x86A1 0x86A2 0x86A5 0x86A6 0x86AB 0x86AD 0x86AE 0x86B2 \ - 0x86B3 0x86B7 0x86B8 0x86B9 0x86BB 0x86BC 0x86BD 0x86BE \ - 0x86BF 0x86C1 0x86C2 0x86C3 0x86C5 0x86C8 0x86CC 0x86CD \ - 0x86D2 0x86D3 0x86D5 0x86D6 0x86D7 0x86DA 0x86DC 0x86DD \ - 0x86E0 0x86E1 0x86E2 0x86E3 0x86E5 0x86E6 0x86E7 0x86E8 \ - 0x86EA 0x86EB 0x86EC 0x86EF 0x86F5 0x86F6 0x86F7 0x86FA \ - 0x86FB 0x86FC 0x86FD 0x86FF 0x8701 0x8704 0x8705 0x8706 \ - 0x870B 0x870C 0x870E 0x870F 0x8710 0x8711 0x8714 0x8716 \ - 0x6C40 0x5EF7 0x505C 0x4EAD 0x5EAD 0x633A 0x8247 0x901A \ - 0x6850 0x916E 0x77B3 0x540C 0x94DC 0x5F64 0x7AE5 0x6876 \ - 0x6345 0x7B52 0x7EDF 0x75DB 0x5077 0x6295 0x5934 0x900F \ - 0x51F8 0x79C3 0x7A81 0x56FE 0x5F92 0x9014 0x6D82 0x5C60 \ - 0x571F 0x5410 0x5154 0x6E4D 0x56E2 0x63A8 0x9893 0x817F \ - 0x8715 0x892A 0x9000 0x541E 0x5C6F 0x81C0 0x62D6 0x6258 \ - 0x8131 0x9E35 0x9640 0x9A6E 0x9A7C 0x692D 0x59A5 0x62D3 -58 0x553E 0x6316 0x54C7 0x86D9 0x6D3C 0x5A03 0x74E6 0x889C \ - 0x6B6A 0x5916 0x8C4C 0x5F2F 0x6E7E 0x73A9 0x987D 0x4E38 \ - 0x70F7 0x5B8C 0x7897 0x633D 0x665A 0x7696 0x60CB 0x5B9B \ - 0x5A49 0x4E07 0x8155 0x6C6A 0x738B 0x4EA1 0x6789 0x7F51 \ - 0x5F80 0x65FA 0x671B 0x5FD8 0x5984 0x5A01 0x8719 0x871B \ - 0x871D 0x871F 0x8720 0x8724 0x8726 0x8727 0x8728 0x872A \ - 0x872B 0x872C 0x872D 0x872F 0x8730 0x8732 0x8733 0x8735 \ - 0x8736 0x8738 0x8739 0x873A 0x873C 0x873D 0x8740 0x8741 \ - 0x8742 0x8743 0x8744 0x8745 0x8746 0x874A 0x874B 0x874D \ - 0x874F 0x8750 0x8751 0x8752 0x8754 0x8755 0x8756 0x8758 \ - 0x875A 0x875B 0x875C 0x875D 0x875E 0x875F 0x8761 0x8762 \ - 0x8766 0x8767 0x8768 0x8769 0x876A 0x876B 0x876C 0x876D \ - 0x876F 0x8771 0x8772 0x8773 0x8775 0x8777 0x8778 0x8779 \ - 0x877A 0x877F 0x8780 0x8781 0x8784 0x8786 0x8787 0x8789 \ - 0x878A 0x878C 0x878E 0x878F 0x8790 0x8791 0x8792 0x8794 \ - 0x8795 0x8796 0x8798 0x8799 0x879A 0x879B 0x879C 0x879D \ - 0x879E 0x87A0 0x87A1 0x87A2 0x87A3 0x87A4 0x5DCD 0x5FAE \ - 0x5371 0x97E6 0x8FDD 0x6845 0x56F4 0x552F 0x60DF 0x4E3A \ - 0x6F4D 0x7EF4 0x82C7 0x840E 0x59D4 0x4F1F 0x4F2A 0x5C3E \ - 0x7EAC 0x672A 0x851A 0x5473 0x754F 0x80C3 0x5582 0x9B4F \ - 0x4F4D 0x6E2D 0x8C13 0x5C09 0x6170 0x536B 0x761F 0x6E29 \ - 0x868A 0x6587 0x95FB 0x7EB9 0x543B 0x7A33 0x7D0A 0x95EE \ - 0x55E1 0x7FC1 0x74EE 0x631D 0x8717 0x6DA1 0x7A9D 0x6211 \ - 0x65A1 0x5367 0x63E1 0x6C83 0x5DEB 0x545C 0x94A8 0x4E4C \ - 0x6C61 0x8BEC 0x5C4B 0x65E0 0x829C 0x68A7 0x543E 0x5434 \ - 0x6BCB 0x6B66 0x4E94 0x6342 0x5348 0x821E 0x4F0D 0x4FAE \ - 0x575E 0x620A 0x96FE 0x6664 0x7269 0x52FF 0x52A1 0x609F \ - 0x8BEF 0x6614 0x7199 0x6790 0x897F 0x7852 0x77FD 0x6670 \ - 0x563B 0x5438 0x9521 0x727A 0x87A5 0x87A6 0x87A7 0x87A9 \ - 0x87AA 0x87AE 0x87B0 0x87B1 0x87B2 0x87B4 0x87B6 0x87B7 \ - 0x87B8 0x87B9 0x87BB 0x87BC 0x87BE 0x87BF 0x87C1 0x87C2 \ - 0x87C3 0x87C4 0x87C5 0x87C7 0x87C8 0x87C9 0x87CC 0x87CD -59 0x87CE 0x87CF 0x87D0 0x87D4 0x87D5 0x87D6 0x87D7 0x87D8 \ - 0x87D9 0x87DA 0x87DC 0x87DD 0x87DE 0x87DF 0x87E1 0x87E2 \ - 0x87E3 0x87E4 0x87E6 0x87E7 0x87E8 0x87E9 0x87EB 0x87EC \ - 0x87ED 0x87EF 0x87F0 0x87F1 0x87F2 0x87F3 0x87F4 0x87F5 \ - 0x87F6 0x87F7 0x87F8 0x87FA 0x87FB 0x87FC 0x87FD 0x87FF \ - 0x8800 0x8801 0x8802 0x8804 0x8805 0x8806 0x8807 0x8808 \ - 0x8809 0x880B 0x880C 0x880D 0x880E 0x880F 0x8810 0x8811 \ - 0x8812 0x8814 0x8817 0x8818 0x8819 0x881A 0x881C 0x881D \ - 0x881E 0x881F 0x8820 0x8823 0x7A00 0x606F 0x5E0C 0x6089 \ - 0x819D 0x5915 0x60DC 0x7184 0x70EF 0x6EAA 0x6C50 0x7280 \ - 0x6A84 0x88AD 0x5E2D 0x4E60 0x5AB3 0x559C 0x94E3 0x6D17 \ - 0x7CFB 0x9699 0x620F 0x7EC6 0x778E 0x867E 0x5323 0x971E \ - 0x8F96 0x6687 0x5CE1 0x4FA0 0x72ED 0x4E0B 0x53A6 0x590F \ - 0x5413 0x6380 0x9528 0x5148 0x4ED9 0x9C9C 0x7EA4 0x54B8 \ - 0x8D24 0x8854 0x8237 0x95F2 0x6D8E 0x5F26 0x5ACC 0x663E \ - 0x9669 0x73B0 0x732E 0x53BF 0x817A 0x9985 0x7FA1 0x5BAA \ - 0x9677 0x9650 0x7EBF 0x76F8 0x53A2 0x9576 0x9999 0x7BB1 \ - 0x8944 0x6E58 0x4E61 0x7FD4 0x7965 0x8BE6 0x60F3 0x54CD \ - 0x4EAB 0x9879 0x5DF7 0x6A61 0x50CF 0x5411 0x8C61 0x8427 \ - 0x785D 0x9704 0x524A 0x54EE 0x56A3 0x9500 0x6D88 0x5BB5 \ - 0x6DC6 0x6653 0x8824 0x8825 0x8826 0x8827 0x8828 0x8829 \ - 0x882A 0x882B 0x882C 0x882D 0x882E 0x882F 0x8830 0x8831 \ - 0x8833 0x8834 0x8835 0x8836 0x8837 0x8838 0x883A 0x883B \ - 0x883D 0x883E 0x883F 0x8841 0x8842 0x8843 0x8846 0x8847 \ - 0x8848 0x8849 0x884A 0x884B 0x884E 0x884F 0x8850 0x8851 \ - 0x8852 0x8853 0x8855 0x8856 0x8858 0x885A 0x885B 0x885C \ - 0x885D 0x885E 0x885F 0x8860 0x8866 0x8867 0x886A 0x886D \ - 0x886F 0x8871 0x8873 0x8874 0x8875 0x8876 0x8878 0x8879 \ - 0x887A 0x887B 0x887C 0x8880 0x8883 0x8886 0x8887 0x8889 \ - 0x888A 0x888C 0x888E 0x888F 0x8890 0x8891 0x8893 0x8894 \ - 0x8895 0x8897 0x8898 0x8899 0x889A 0x889B 0x889D 0x889E \ - 0x889F 0x88A0 0x88A1 0x88A3 0x88A5 0x88A6 0x88A7 0x88A8 -60 0x88A9 0x88AA 0x5C0F 0x5B5D 0x6821 0x8096 0x5578 0x7B11 \ - 0x6548 0x6954 0x4E9B 0x6B47 0x874E 0x978B 0x534F 0x631F \ - 0x643A 0x90AA 0x659C 0x80C1 0x8C10 0x5199 0x68B0 0x5378 \ - 0x87F9 0x61C8 0x6CC4 0x6CFB 0x8C22 0x5C51 0x85AA 0x82AF \ - 0x950C 0x6B23 0x8F9B 0x65B0 0x5FFB 0x5FC3 0x4FE1 0x8845 \ - 0x661F 0x8165 0x7329 0x60FA 0x5174 0x5211 0x578B 0x5F62 \ - 0x90A2 0x884C 0x9192 0x5E78 0x674F 0x6027 0x59D3 0x5144 \ - 0x51F6 0x80F8 0x5308 0x6C79 0x96C4 0x718A 0x4F11 0x4FEE \ - 0x7F9E 0x673D 0x55C5 0x9508 0x79C0 0x8896 0x7EE3 0x589F \ - 0x620C 0x9700 0x865A 0x5618 0x987B 0x5F90 0x8BB8 0x84C4 \ - 0x9157 0x53D9 0x65ED 0x5E8F 0x755C 0x6064 0x7D6E 0x5A7F \ - 0x7EEA 0x7EED 0x8F69 0x55A7 0x5BA3 0x60AC 0x65CB 0x7384 \ - 0x88AC 0x88AE 0x88AF 0x88B0 0x88B2 0x88B3 0x88B4 0x88B5 \ - 0x88B6 0x88B8 0x88B9 0x88BA 0x88BB 0x88BD 0x88BE 0x88BF \ - 0x88C0 0x88C3 0x88C4 0x88C7 0x88C8 0x88CA 0x88CB 0x88CC \ - 0x88CD 0x88CF 0x88D0 0x88D1 0x88D3 0x88D6 0x88D7 0x88DA \ - 0x88DB 0x88DC 0x88DD 0x88DE 0x88E0 0x88E1 0x88E6 0x88E7 \ - 0x88E9 0x88EA 0x88EB 0x88EC 0x88ED 0x88EE 0x88EF 0x88F2 \ - 0x88F5 0x88F6 0x88F7 0x88FA 0x88FB 0x88FD 0x88FF 0x8900 \ - 0x8901 0x8903 0x8904 0x8905 0x8906 0x8907 0x8908 0x8909 \ - 0x890B 0x890C 0x890D 0x890E 0x890F 0x8911 0x8914 0x8915 \ - 0x8916 0x8917 0x8918 0x891C 0x891D 0x891E 0x891F 0x8920 \ - 0x8922 0x8923 0x8924 0x8926 0x8927 0x8928 0x8929 0x892C \ - 0x892D 0x892E 0x892F 0x8931 0x8932 0x8933 0x8935 0x8937 \ - 0x9009 0x7663 0x7729 0x7EDA 0x9774 0x859B 0x5B66 0x7A74 \ - 0x96EA 0x8840 0x52CB 0x718F 0x5FAA 0x65EC 0x8BE2 0x5BFB \ - 0x9A6F 0x5DE1 0x6B89 0x6C5B 0x8BAD 0x8BAF 0x900A 0x8FC5 \ - 0x538B 0x62BC 0x9E26 0x9E2D 0x5440 0x4E2B 0x82BD 0x7259 \ - 0x869C 0x5D16 0x8859 0x6DAF 0x96C5 0x54D1 0x4E9A 0x8BB6 \ - 0x7109 0x54BD 0x9609 0x70DF 0x6DF9 0x76D0 0x4E25 0x7814 \ - 0x8712 0x5CA9 0x5EF6 0x8A00 0x989C 0x960E 0x708E 0x6CBF \ - 0x5944 0x63A9 0x773C 0x884D 0x6F14 0x8273 0x5830 0x71D5 -61 0x538C 0x781A 0x96C1 0x5501 0x5F66 0x7130 0x5BB4 0x8C1A \ - 0x9A8C 0x6B83 0x592E 0x9E2F 0x79E7 0x6768 0x626C 0x4F6F \ - 0x75A1 0x7F8A 0x6D0B 0x9633 0x6C27 0x4EF0 0x75D2 0x517B \ - 0x6837 0x6F3E 0x9080 0x8170 0x5996 0x7476 0x8938 0x8939 \ - 0x893A 0x893B 0x893C 0x893D 0x893E 0x893F 0x8940 0x8942 \ - 0x8943 0x8945 0x8946 0x8947 0x8948 0x8949 0x894A 0x894B \ - 0x894C 0x894D 0x894E 0x894F 0x8950 0x8951 0x8952 0x8953 \ - 0x8954 0x8955 0x8956 0x8957 0x8958 0x8959 0x895A 0x895B \ - 0x895C 0x895D 0x8960 0x8961 0x8962 0x8963 0x8964 0x8965 \ - 0x8967 0x8968 0x8969 0x896A 0x896B 0x896C 0x896D 0x896E \ - 0x896F 0x8970 0x8971 0x8972 0x8973 0x8974 0x8975 0x8976 \ - 0x8977 0x8978 0x8979 0x897A 0x897C 0x897D 0x897E 0x8980 \ - 0x8982 0x8984 0x8985 0x8987 0x8988 0x8989 0x898A 0x898B \ - 0x898C 0x898D 0x898E 0x898F 0x8990 0x8991 0x8992 0x8993 \ - 0x8994 0x8995 0x8996 0x8997 0x8998 0x8999 0x899A 0x899B \ - 0x899C 0x899D 0x899E 0x899F 0x89A0 0x89A1 0x6447 0x5C27 \ - 0x9065 0x7A91 0x8C23 0x59DA 0x54AC 0x8200 0x836F 0x8981 \ - 0x8000 0x6930 0x564E 0x8036 0x7237 0x91CE 0x51B6 0x4E5F \ - 0x9875 0x6396 0x4E1A 0x53F6 0x66F3 0x814B 0x591C 0x6DB2 \ - 0x4E00 0x58F9 0x533B 0x63D6 0x94F1 0x4F9D 0x4F0A 0x8863 \ - 0x9890 0x5937 0x9057 0x79FB 0x4EEA 0x80F0 0x7591 0x6C82 \ - 0x5B9C 0x59E8 0x5F5D 0x6905 0x8681 0x501A 0x5DF2 0x4E59 \ - 0x77E3 0x4EE5 0x827A 0x6291 0x6613 0x9091 0x5C79 0x4EBF \ - 0x5F79 0x81C6 0x9038 0x8084 0x75AB 0x4EA6 0x88D4 0x610F \ - 0x6BC5 0x5FC6 0x4E49 0x76CA 0x6EA2 0x8BE3 0x8BAE 0x8C0A \ - 0x8BD1 0x5F02 0x7FFC 0x7FCC 0x7ECE 0x8335 0x836B 0x56E0 \ - 0x6BB7 0x97F3 0x9634 0x59FB 0x541F 0x94F6 0x6DEB 0x5BC5 \ - 0x996E 0x5C39 0x5F15 0x9690 0x89A2 0x89A3 0x89A4 0x89A5 \ - 0x89A6 0x89A7 0x89A8 0x89A9 0x89AA 0x89AB 0x89AC 0x89AD \ - 0x89AE 0x89AF 0x89B0 0x89B1 0x89B2 0x89B3 0x89B4 0x89B5 \ - 0x89B6 0x89B7 0x89B8 0x89B9 0x89BA 0x89BB 0x89BC 0x89BD \ - 0x89BE 0x89BF 0x89C0 0x89C3 0x89CD 0x89D3 0x89D4 0x89D5 -62 0x89D7 0x89D8 0x89D9 0x89DB 0x89DD 0x89DF 0x89E0 0x89E1 \ - 0x89E2 0x89E4 0x89E7 0x89E8 0x89E9 0x89EA 0x89EC 0x89ED \ - 0x89EE 0x89F0 0x89F1 0x89F2 0x89F4 0x89F5 0x89F6 0x89F7 \ - 0x89F8 0x89F9 0x89FA 0x89FB 0x89FC 0x89FD 0x89FE 0x89FF \ - 0x8A01 0x8A02 0x8A03 0x8A04 0x8A05 0x8A06 0x8A08 0x8A09 \ - 0x8A0A 0x8A0B 0x8A0C 0x8A0D 0x8A0E 0x8A0F 0x8A10 0x8A11 \ - 0x8A12 0x8A13 0x8A14 0x8A15 0x8A16 0x8A17 0x8A18 0x8A19 \ - 0x8A1A 0x8A1B 0x8A1C 0x8A1D 0x5370 0x82F1 0x6A31 0x5A74 \ - 0x9E70 0x5E94 0x7F28 0x83B9 0x8424 0x8425 0x8367 0x8747 \ - 0x8FCE 0x8D62 0x76C8 0x5F71 0x9896 0x786C 0x6620 0x54DF \ - 0x62E5 0x4F63 0x81C3 0x75C8 0x5EB8 0x96CD 0x8E0A 0x86F9 \ - 0x548F 0x6CF3 0x6D8C 0x6C38 0x607F 0x52C7 0x7528 0x5E7D \ - 0x4F18 0x60A0 0x5FE7 0x5C24 0x7531 0x90AE 0x94C0 0x72B9 \ - 0x6CB9 0x6E38 0x9149 0x6709 0x53CB 0x53F3 0x4F51 0x91C9 \ - 0x8BF1 0x53C8 0x5E7C 0x8FC2 0x6DE4 0x4E8E 0x76C2 0x6986 \ - 0x865E 0x611A 0x8206 0x4F59 0x4FDE 0x903E 0x9C7C 0x6109 \ - 0x6E1D 0x6E14 0x9685 0x4E88 0x5A31 0x96E8 0x4E0E 0x5C7F \ - 0x79B9 0x5B87 0x8BED 0x7FBD 0x7389 0x57DF 0x828B 0x90C1 \ - 0x5401 0x9047 0x55BB 0x5CEA 0x5FA1 0x6108 0x6B32 0x72F1 \ - 0x80B2 0x8A89 0x8A1E 0x8A1F 0x8A20 0x8A21 0x8A22 0x8A23 \ - 0x8A24 0x8A25 0x8A26 0x8A27 0x8A28 0x8A29 0x8A2A 0x8A2B \ - 0x8A2C 0x8A2D 0x8A2E 0x8A2F 0x8A30 0x8A31 0x8A32 0x8A33 \ - 0x8A34 0x8A35 0x8A36 0x8A37 0x8A38 0x8A39 0x8A3A 0x8A3B \ - 0x8A3C 0x8A3D 0x8A3F 0x8A40 0x8A41 0x8A42 0x8A43 0x8A44 \ - 0x8A45 0x8A46 0x8A47 0x8A49 0x8A4A 0x8A4B 0x8A4C 0x8A4D \ - 0x8A4E 0x8A4F 0x8A50 0x8A51 0x8A52 0x8A53 0x8A54 0x8A55 \ - 0x8A56 0x8A57 0x8A58 0x8A59 0x8A5A 0x8A5B 0x8A5C 0x8A5D \ - 0x8A5E 0x8A5F 0x8A60 0x8A61 0x8A62 0x8A63 0x8A64 0x8A65 \ - 0x8A66 0x8A67 0x8A68 0x8A69 0x8A6A 0x8A6B 0x8A6C 0x8A6D \ - 0x8A6E 0x8A6F 0x8A70 0x8A71 0x8A72 0x8A73 0x8A74 0x8A75 \ - 0x8A76 0x8A77 0x8A78 0x8A7A 0x8A7B 0x8A7C 0x8A7D 0x8A7E \ - 0x8A7F 0x8A80 0x6D74 0x5BD3 0x88D5 0x9884 0x8C6B 0x9A6D -63 0x9E33 0x6E0A 0x51A4 0x5143 0x57A3 0x8881 0x539F 0x63F4 \ - 0x8F95 0x56ED 0x5458 0x5706 0x733F 0x6E90 0x7F18 0x8FDC \ - 0x82D1 0x613F 0x6028 0x9662 0x66F0 0x7EA6 0x8D8A 0x8DC3 \ - 0x94A5 0x5CB3 0x7CA4 0x6708 0x60A6 0x9605 0x8018 0x4E91 \ - 0x90E7 0x5300 0x9668 0x5141 0x8FD0 0x8574 0x915D 0x6655 \ - 0x97F5 0x5B55 0x531D 0x7838 0x6742 0x683D 0x54C9 0x707E \ - 0x5BB0 0x8F7D 0x518D 0x5728 0x54B1 0x6512 0x6682 0x8D5E \ - 0x8D43 0x810F 0x846C 0x906D 0x7CDF 0x51FF 0x85FB 0x67A3 \ - 0x65E9 0x6FA1 0x86A4 0x8E81 0x566A 0x9020 0x7682 0x7076 \ - 0x71E5 0x8D23 0x62E9 0x5219 0x6CFD 0x8D3C 0x600E 0x589E \ - 0x618E 0x66FE 0x8D60 0x624E 0x55B3 0x6E23 0x672D 0x8F67 \ - 0x8A81 0x8A82 0x8A83 0x8A84 0x8A85 0x8A86 0x8A87 0x8A88 \ - 0x8A8B 0x8A8C 0x8A8D 0x8A8E 0x8A8F 0x8A90 0x8A91 0x8A92 \ - 0x8A94 0x8A95 0x8A96 0x8A97 0x8A98 0x8A99 0x8A9A 0x8A9B \ - 0x8A9C 0x8A9D 0x8A9E 0x8A9F 0x8AA0 0x8AA1 0x8AA2 0x8AA3 \ - 0x8AA4 0x8AA5 0x8AA6 0x8AA7 0x8AA8 0x8AA9 0x8AAA 0x8AAB \ - 0x8AAC 0x8AAD 0x8AAE 0x8AAF 0x8AB0 0x8AB1 0x8AB2 0x8AB3 \ - 0x8AB4 0x8AB5 0x8AB6 0x8AB7 0x8AB8 0x8AB9 0x8ABA 0x8ABB \ - 0x8ABC 0x8ABD 0x8ABE 0x8ABF 0x8AC0 0x8AC1 0x8AC2 0x8AC3 \ - 0x8AC4 0x8AC5 0x8AC6 0x8AC7 0x8AC8 0x8AC9 0x8ACA 0x8ACB \ - 0x8ACC 0x8ACD 0x8ACE 0x8ACF 0x8AD0 0x8AD1 0x8AD2 0x8AD3 \ - 0x8AD4 0x8AD5 0x8AD6 0x8AD7 0x8AD8 0x8AD9 0x8ADA 0x8ADB \ - 0x8ADC 0x8ADD 0x8ADE 0x8ADF 0x8AE0 0x8AE1 0x8AE2 0x8AE3 \ - 0x94E1 0x95F8 0x7728 0x6805 0x69A8 0x548B 0x4E4D 0x70B8 \ - 0x8BC8 0x6458 0x658B 0x5B85 0x7A84 0x503A 0x5BE8 0x77BB \ - 0x6BE1 0x8A79 0x7C98 0x6CBE 0x76CF 0x65A9 0x8F97 0x5D2D \ - 0x5C55 0x8638 0x6808 0x5360 0x6218 0x7AD9 0x6E5B 0x7EFD \ - 0x6A1F 0x7AE0 0x5F70 0x6F33 0x5F20 0x638C 0x6DA8 0x6756 \ - 0x4E08 0x5E10 0x8D26 0x4ED7 0x80C0 0x7634 0x969C 0x62DB \ - 0x662D 0x627E 0x6CBC 0x8D75 0x7167 0x7F69 0x5146 0x8087 \ - 0x53EC 0x906E 0x6298 0x54F2 0x86F0 0x8F99 0x8005 0x9517 \ - 0x8517 0x8FD9 0x6D59 0x73CD 0x659F 0x771F 0x7504 0x7827 -64 0x81FB 0x8D1E 0x9488 0x4FA6 0x6795 0x75B9 0x8BCA 0x9707 \ - 0x632F 0x9547 0x9635 0x84B8 0x6323 0x7741 0x5F81 0x72F0 \ - 0x4E89 0x6014 0x6574 0x62EF 0x6B63 0x653F 0x8AE4 0x8AE5 \ - 0x8AE6 0x8AE7 0x8AE8 0x8AE9 0x8AEA 0x8AEB 0x8AEC 0x8AED \ - 0x8AEE 0x8AEF 0x8AF0 0x8AF1 0x8AF2 0x8AF3 0x8AF4 0x8AF5 \ - 0x8AF6 0x8AF7 0x8AF8 0x8AF9 0x8AFA 0x8AFB 0x8AFC 0x8AFD \ - 0x8AFE 0x8AFF 0x8B00 0x8B01 0x8B02 0x8B03 0x8B04 0x8B05 \ - 0x8B06 0x8B08 0x8B09 0x8B0A 0x8B0B 0x8B0C 0x8B0D 0x8B0E \ - 0x8B0F 0x8B10 0x8B11 0x8B12 0x8B13 0x8B14 0x8B15 0x8B16 \ - 0x8B17 0x8B18 0x8B19 0x8B1A 0x8B1B 0x8B1C 0x8B1D 0x8B1E \ - 0x8B1F 0x8B20 0x8B21 0x8B22 0x8B23 0x8B24 0x8B25 0x8B27 \ - 0x8B28 0x8B29 0x8B2A 0x8B2B 0x8B2C 0x8B2D 0x8B2E 0x8B2F \ - 0x8B30 0x8B31 0x8B32 0x8B33 0x8B34 0x8B35 0x8B36 0x8B37 \ - 0x8B38 0x8B39 0x8B3A 0x8B3B 0x8B3C 0x8B3D 0x8B3E 0x8B3F \ - 0x8B40 0x8B41 0x8B42 0x8B43 0x8B44 0x8B45 0x5E27 0x75C7 \ - 0x90D1 0x8BC1 0x829D 0x679D 0x652F 0x5431 0x8718 0x77E5 \ - 0x80A2 0x8102 0x6C41 0x4E4B 0x7EC7 0x804C 0x76F4 0x690D \ - 0x6B96 0x6267 0x503C 0x4F84 0x5740 0x6307 0x6B62 0x8DBE \ - 0x53EA 0x65E8 0x7EB8 0x5FD7 0x631A 0x63B7 0x81F3 0x81F4 \ - 0x7F6E 0x5E1C 0x5CD9 0x5236 0x667A 0x79E9 0x7A1A 0x8D28 \ - 0x7099 0x75D4 0x6EDE 0x6CBB 0x7A92 0x4E2D 0x76C5 0x5FE0 \ - 0x949F 0x8877 0x7EC8 0x79CD 0x80BF 0x91CD 0x4EF2 0x4F17 \ - 0x821F 0x5468 0x5DDE 0x6D32 0x8BCC 0x7CA5 0x8F74 0x8098 \ - 0x5E1A 0x5492 0x76B1 0x5B99 0x663C 0x9AA4 0x73E0 0x682A \ - 0x86DB 0x6731 0x732A 0x8BF8 0x8BDB 0x9010 0x7AF9 0x70DB \ - 0x716E 0x62C4 0x77A9 0x5631 0x4E3B 0x8457 0x67F1 0x52A9 \ - 0x86C0 0x8D2E 0x94F8 0x7B51 0x8B46 0x8B47 0x8B48 0x8B49 \ - 0x8B4A 0x8B4B 0x8B4C 0x8B4D 0x8B4E 0x8B4F 0x8B50 0x8B51 \ - 0x8B52 0x8B53 0x8B54 0x8B55 0x8B56 0x8B57 0x8B58 0x8B59 \ - 0x8B5A 0x8B5B 0x8B5C 0x8B5D 0x8B5E 0x8B5F 0x8B60 0x8B61 \ - 0x8B62 0x8B63 0x8B64 0x8B65 0x8B67 0x8B68 0x8B69 0x8B6A \ - 0x8B6B 0x8B6D 0x8B6E 0x8B6F 0x8B70 0x8B71 0x8B72 0x8B73 -65 0x8B74 0x8B75 0x8B76 0x8B77 0x8B78 0x8B79 0x8B7A 0x8B7B \ - 0x8B7C 0x8B7D 0x8B7E 0x8B7F 0x8B80 0x8B81 0x8B82 0x8B83 \ - 0x8B84 0x8B85 0x8B86 0x8B87 0x8B88 0x8B89 0x8B8A 0x8B8B \ - 0x8B8C 0x8B8D 0x8B8E 0x8B8F 0x8B90 0x8B91 0x8B92 0x8B93 \ - 0x8B94 0x8B95 0x8B96 0x8B97 0x8B98 0x8B99 0x8B9A 0x8B9B \ - 0x8B9C 0x8B9D 0x8B9E 0x8B9F 0x8BAC 0x8BB1 0x8BBB 0x8BC7 \ - 0x8BD0 0x8BEA 0x8C09 0x8C1E 0x4F4F 0x6CE8 0x795D 0x9A7B \ - 0x6293 0x722A 0x62FD 0x4E13 0x7816 0x8F6C 0x64B0 0x8D5A \ - 0x7BC6 0x6869 0x5E84 0x88C5 0x5986 0x649E 0x58EE 0x72B6 \ - 0x690E 0x9525 0x8FFD 0x8D58 0x5760 0x7F00 0x8C06 0x51C6 \ - 0x6349 0x62D9 0x5353 0x684C 0x7422 0x8301 0x914C 0x5544 \ - 0x7740 0x707C 0x6D4A 0x5179 0x54A8 0x8D44 0x59FF 0x6ECB \ - 0x6DC4 0x5B5C 0x7D2B 0x4ED4 0x7C7D 0x6ED3 0x5B50 0x81EA \ - 0x6E0D 0x5B57 0x9B03 0x68D5 0x8E2A 0x5B97 0x7EFC 0x603B \ - 0x7EB5 0x90B9 0x8D70 0x594F 0x63CD 0x79DF 0x8DB3 0x5352 \ - 0x65CF 0x7956 0x8BC5 0x963B 0x7EC4 0x94BB 0x7E82 0x5634 \ - 0x9189 0x6700 0x7F6A 0x5C0A 0x9075 0x6628 0x5DE6 0x4F50 \ - 0x67DE 0x505A 0x4F5C 0x5750 0x5EA7 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x8C38 0x8C39 0x8C3A 0x8C3B 0x8C3C 0x8C3D \ - 0x8C3E 0x8C3F 0x8C40 0x8C42 0x8C43 0x8C44 0x8C45 0x8C48 \ - 0x8C4A 0x8C4B 0x8C4D 0x8C4E 0x8C4F 0x8C50 0x8C51 0x8C52 \ - 0x8C53 0x8C54 0x8C56 0x8C57 0x8C58 0x8C59 0x8C5B 0x8C5C \ - 0x8C5D 0x8C5E 0x8C5F 0x8C60 0x8C63 0x8C64 0x8C65 0x8C66 \ - 0x8C67 0x8C68 0x8C69 0x8C6C 0x8C6D 0x8C6E 0x8C6F 0x8C70 \ - 0x8C71 0x8C72 0x8C74 0x8C75 0x8C76 0x8C77 0x8C7B 0x8C7C \ - 0x8C7D 0x8C7E 0x8C7F 0x8C80 0x8C81 0x8C83 0x8C84 0x8C86 \ - 0x8C87 0x8C88 0x8C8B 0x8C8D 0x8C8E 0x8C8F 0x8C90 0x8C91 \ - 0x8C92 0x8C93 0x8C95 0x8C96 0x8C97 0x8C99 0x8C9A 0x8C9B \ - 0x8C9C 0x8C9D 0x8C9E 0x8C9F 0x8CA0 0x8CA1 0x8CA2 0x8CA3 \ - 0x8CA4 0x8CA5 0x8CA6 0x8CA7 0x8CA8 0x8CA9 0x8CAA 0x8CAB \ - 0x8CAC 0x8CAD 0x4E8D 0x4E0C 0x5140 0x4E10 0x5EFF 0x5345 \ - 0x4E15 0x4E98 0x4E1E 0x9B32 0x5B6C 0x5669 0x4E28 0x79BA -66 0x4E3F 0x5315 0x4E47 0x592D 0x723B 0x536E 0x6C10 0x56DF \ - 0x80E4 0x9997 0x6BD3 0x777E 0x9F17 0x4E36 0x4E9F 0x9F10 \ - 0x4E5C 0x4E69 0x4E93 0x8288 0x5B5B 0x556C 0x560F 0x4EC4 \ - 0x538D 0x539D 0x53A3 0x53A5 0x53AE 0x9765 0x8D5D 0x531A \ - 0x53F5 0x5326 0x532E 0x533E 0x8D5C 0x5366 0x5363 0x5202 \ - 0x5208 0x520E 0x522D 0x5233 0x523F 0x5240 0x524C 0x525E \ - 0x5261 0x525C 0x84AF 0x527D 0x5282 0x5281 0x5290 0x5293 \ - 0x5182 0x7F54 0x4EBB 0x4EC3 0x4EC9 0x4EC2 0x4EE8 0x4EE1 \ - 0x4EEB 0x4EDE 0x4F1B 0x4EF3 0x4F22 0x4F64 0x4EF5 0x4F25 \ - 0x4F27 0x4F09 0x4F2B 0x4F5E 0x4F67 0x6538 0x4F5A 0x4F5D \ - 0x8CAE 0x8CAF 0x8CB0 0x8CB1 0x8CB2 0x8CB3 0x8CB4 0x8CB5 \ - 0x8CB6 0x8CB7 0x8CB8 0x8CB9 0x8CBA 0x8CBB 0x8CBC 0x8CBD \ - 0x8CBE 0x8CBF 0x8CC0 0x8CC1 0x8CC2 0x8CC3 0x8CC4 0x8CC5 \ - 0x8CC6 0x8CC7 0x8CC8 0x8CC9 0x8CCA 0x8CCB 0x8CCC 0x8CCD \ - 0x8CCE 0x8CCF 0x8CD0 0x8CD1 0x8CD2 0x8CD3 0x8CD4 0x8CD5 \ - 0x8CD6 0x8CD7 0x8CD8 0x8CD9 0x8CDA 0x8CDB 0x8CDC 0x8CDD \ - 0x8CDE 0x8CDF 0x8CE0 0x8CE1 0x8CE2 0x8CE3 0x8CE4 0x8CE5 \ - 0x8CE6 0x8CE7 0x8CE8 0x8CE9 0x8CEA 0x8CEB 0x8CEC 0x8CED \ - 0x8CEE 0x8CEF 0x8CF0 0x8CF1 0x8CF2 0x8CF3 0x8CF4 0x8CF5 \ - 0x8CF6 0x8CF7 0x8CF8 0x8CF9 0x8CFA 0x8CFB 0x8CFC 0x8CFD \ - 0x8CFE 0x8CFF 0x8D00 0x8D01 0x8D02 0x8D03 0x8D04 0x8D05 \ - 0x8D06 0x8D07 0x8D08 0x8D09 0x8D0A 0x8D0B 0x8D0C 0x8D0D \ - 0x4F5F 0x4F57 0x4F32 0x4F3D 0x4F76 0x4F74 0x4F91 0x4F89 \ - 0x4F83 0x4F8F 0x4F7E 0x4F7B 0x4FAA 0x4F7C 0x4FAC 0x4F94 \ - 0x4FE6 0x4FE8 0x4FEA 0x4FC5 0x4FDA 0x4FE3 0x4FDC 0x4FD1 \ - 0x4FDF 0x4FF8 0x5029 0x504C 0x4FF3 0x502C 0x500F 0x502E \ - 0x502D 0x4FFE 0x501C 0x500C 0x5025 0x5028 0x507E 0x5043 \ - 0x5055 0x5048 0x504E 0x506C 0x507B 0x50A5 0x50A7 0x50A9 \ - 0x50BA 0x50D6 0x5106 0x50ED 0x50EC 0x50E6 0x50EE 0x5107 \ - 0x510B 0x4EDD 0x6C3D 0x4F58 0x4F65 0x4FCE 0x9FA0 0x6C46 \ - 0x7C74 0x516E 0x5DFD 0x9EC9 0x9998 0x5181 0x5914 0x52F9 \ - 0x530D 0x8A07 0x5310 0x51EB 0x5919 0x5155 0x4EA0 0x5156 -67 0x4EB3 0x886E 0x88A4 0x4EB5 0x8114 0x88D2 0x7980 0x5B34 \ - 0x8803 0x7FB8 0x51AB 0x51B1 0x51BD 0x51BC 0x8D0E 0x8D0F \ - 0x8D10 0x8D11 0x8D12 0x8D13 0x8D14 0x8D15 0x8D16 0x8D17 \ - 0x8D18 0x8D19 0x8D1A 0x8D1B 0x8D1C 0x8D20 0x8D51 0x8D52 \ - 0x8D57 0x8D5F 0x8D65 0x8D68 0x8D69 0x8D6A 0x8D6C 0x8D6E \ - 0x8D6F 0x8D71 0x8D72 0x8D78 0x8D79 0x8D7A 0x8D7B 0x8D7C \ - 0x8D7D 0x8D7E 0x8D7F 0x8D80 0x8D82 0x8D83 0x8D86 0x8D87 \ - 0x8D88 0x8D89 0x8D8C 0x8D8D 0x8D8E 0x8D8F 0x8D90 0x8D92 \ - 0x8D93 0x8D95 0x8D96 0x8D97 0x8D98 0x8D99 0x8D9A 0x8D9B \ - 0x8D9C 0x8D9D 0x8D9E 0x8DA0 0x8DA1 0x8DA2 0x8DA4 0x8DA5 \ - 0x8DA6 0x8DA7 0x8DA8 0x8DA9 0x8DAA 0x8DAB 0x8DAC 0x8DAD \ - 0x8DAE 0x8DAF 0x8DB0 0x8DB2 0x8DB6 0x8DB7 0x8DB9 0x8DBB \ - 0x8DBD 0x8DC0 0x8DC1 0x8DC2 0x8DC5 0x8DC7 0x8DC8 0x8DC9 \ - 0x8DCA 0x8DCD 0x8DD0 0x8DD2 0x8DD3 0x8DD4 0x51C7 0x5196 \ - 0x51A2 0x51A5 0x8BA0 0x8BA6 0x8BA7 0x8BAA 0x8BB4 0x8BB5 \ - 0x8BB7 0x8BC2 0x8BC3 0x8BCB 0x8BCF 0x8BCE 0x8BD2 0x8BD3 \ - 0x8BD4 0x8BD6 0x8BD8 0x8BD9 0x8BDC 0x8BDF 0x8BE0 0x8BE4 \ - 0x8BE8 0x8BE9 0x8BEE 0x8BF0 0x8BF3 0x8BF6 0x8BF9 0x8BFC \ - 0x8BFF 0x8C00 0x8C02 0x8C04 0x8C07 0x8C0C 0x8C0F 0x8C11 \ - 0x8C12 0x8C14 0x8C15 0x8C16 0x8C19 0x8C1B 0x8C18 0x8C1D \ - 0x8C1F 0x8C20 0x8C21 0x8C25 0x8C27 0x8C2A 0x8C2B 0x8C2E \ - 0x8C2F 0x8C32 0x8C33 0x8C35 0x8C36 0x5369 0x537A 0x961D \ - 0x9622 0x9621 0x9631 0x962A 0x963D 0x963C 0x9642 0x9649 \ - 0x9654 0x965F 0x9667 0x966C 0x9672 0x9674 0x9688 0x968D \ - 0x9697 0x96B0 0x9097 0x909B 0x909D 0x9099 0x90AC 0x90A1 \ - 0x90B4 0x90B3 0x90B6 0x90BA 0x8DD5 0x8DD8 0x8DD9 0x8DDC \ - 0x8DE0 0x8DE1 0x8DE2 0x8DE5 0x8DE6 0x8DE7 0x8DE9 0x8DED \ - 0x8DEE 0x8DF0 0x8DF1 0x8DF2 0x8DF4 0x8DF6 0x8DFC 0x8DFE \ - 0x8DFF 0x8E00 0x8E01 0x8E02 0x8E03 0x8E04 0x8E06 0x8E07 \ - 0x8E08 0x8E0B 0x8E0D 0x8E0E 0x8E10 0x8E11 0x8E12 0x8E13 \ - 0x8E15 0x8E16 0x8E17 0x8E18 0x8E19 0x8E1A 0x8E1B 0x8E1C \ - 0x8E20 0x8E21 0x8E24 0x8E25 0x8E26 0x8E27 0x8E28 0x8E2B -68 0x8E2D 0x8E30 0x8E32 0x8E33 0x8E34 0x8E36 0x8E37 0x8E38 \ - 0x8E3B 0x8E3C 0x8E3E 0x8E3F 0x8E43 0x8E45 0x8E46 0x8E4C \ - 0x8E4D 0x8E4E 0x8E4F 0x8E50 0x8E53 0x8E54 0x8E55 0x8E56 \ - 0x8E57 0x8E58 0x8E5A 0x8E5B 0x8E5C 0x8E5D 0x8E5E 0x8E5F \ - 0x8E60 0x8E61 0x8E62 0x8E63 0x8E64 0x8E65 0x8E67 0x8E68 \ - 0x8E6A 0x8E6B 0x8E6E 0x8E71 0x90B8 0x90B0 0x90CF 0x90C5 \ - 0x90BE 0x90D0 0x90C4 0x90C7 0x90D3 0x90E6 0x90E2 0x90DC \ - 0x90D7 0x90DB 0x90EB 0x90EF 0x90FE 0x9104 0x9122 0x911E \ - 0x9123 0x9131 0x912F 0x9139 0x9143 0x9146 0x520D 0x5942 \ - 0x52A2 0x52AC 0x52AD 0x52BE 0x54FF 0x52D0 0x52D6 0x52F0 \ - 0x53DF 0x71EE 0x77CD 0x5EF4 0x51F5 0x51FC 0x9B2F 0x53B6 \ - 0x5F01 0x755A 0x5DEF 0x574C 0x57A9 0x57A1 0x587E 0x58BC \ - 0x58C5 0x58D1 0x5729 0x572C 0x572A 0x5733 0x5739 0x572E \ - 0x572F 0x575C 0x573B 0x5742 0x5769 0x5785 0x576B 0x5786 \ - 0x577C 0x577B 0x5768 0x576D 0x5776 0x5773 0x57AD 0x57A4 \ - 0x578C 0x57B2 0x57CF 0x57A7 0x57B4 0x5793 0x57A0 0x57D5 \ - 0x57D8 0x57DA 0x57D9 0x57D2 0x57B8 0x57F4 0x57EF 0x57F8 \ - 0x57E4 0x57DD 0x8E73 0x8E75 0x8E77 0x8E78 0x8E79 0x8E7A \ - 0x8E7B 0x8E7D 0x8E7E 0x8E80 0x8E82 0x8E83 0x8E84 0x8E86 \ - 0x8E88 0x8E89 0x8E8A 0x8E8B 0x8E8C 0x8E8D 0x8E8E 0x8E91 \ - 0x8E92 0x8E93 0x8E95 0x8E96 0x8E97 0x8E98 0x8E99 0x8E9A \ - 0x8E9B 0x8E9D 0x8E9F 0x8EA0 0x8EA1 0x8EA2 0x8EA3 0x8EA4 \ - 0x8EA5 0x8EA6 0x8EA7 0x8EA8 0x8EA9 0x8EAA 0x8EAD 0x8EAE \ - 0x8EB0 0x8EB1 0x8EB3 0x8EB4 0x8EB5 0x8EB6 0x8EB7 0x8EB8 \ - 0x8EB9 0x8EBB 0x8EBC 0x8EBD 0x8EBE 0x8EBF 0x8EC0 0x8EC1 \ - 0x8EC2 0x8EC3 0x8EC4 0x8EC5 0x8EC6 0x8EC7 0x8EC8 0x8EC9 \ - 0x8ECA 0x8ECB 0x8ECC 0x8ECD 0x8ECF 0x8ED0 0x8ED1 0x8ED2 \ - 0x8ED3 0x8ED4 0x8ED5 0x8ED6 0x8ED7 0x8ED8 0x8ED9 0x8EDA \ - 0x8EDB 0x8EDC 0x8EDD 0x8EDE 0x8EDF 0x8EE0 0x8EE1 0x8EE2 \ - 0x8EE3 0x8EE4 0x580B 0x580D 0x57FD 0x57ED 0x5800 0x581E \ - 0x5819 0x5844 0x5820 0x5865 0x586C 0x5881 0x5889 0x589A \ - 0x5880 0x99A8 0x9F19 0x61FF 0x8279 0x827D 0x827F 0x828F -69 0x828A 0x82A8 0x8284 0x828E 0x8291 0x8297 0x8299 0x82AB \ - 0x82B8 0x82BE 0x82B0 0x82C8 0x82CA 0x82E3 0x8298 0x82B7 \ - 0x82AE 0x82CB 0x82CC 0x82C1 0x82A9 0x82B4 0x82A1 0x82AA \ - 0x829F 0x82C4 0x82CE 0x82A4 0x82E1 0x8309 0x82F7 0x82E4 \ - 0x830F 0x8307 0x82DC 0x82F4 0x82D2 0x82D8 0x830C 0x82FB \ - 0x82D3 0x8311 0x831A 0x8306 0x8314 0x8315 0x82E0 0x82D5 \ - 0x831C 0x8351 0x835B 0x835C 0x8308 0x8392 0x833C 0x8334 \ - 0x8331 0x839B 0x835E 0x832F 0x834F 0x8347 0x8343 0x835F \ - 0x8340 0x8317 0x8360 0x832D 0x833A 0x8333 0x8366 0x8365 \ - 0x8EE5 0x8EE6 0x8EE7 0x8EE8 0x8EE9 0x8EEA 0x8EEB 0x8EEC \ - 0x8EED 0x8EEE 0x8EEF 0x8EF0 0x8EF1 0x8EF2 0x8EF3 0x8EF4 \ - 0x8EF5 0x8EF6 0x8EF7 0x8EF8 0x8EF9 0x8EFA 0x8EFB 0x8EFC \ - 0x8EFD 0x8EFE 0x8EFF 0x8F00 0x8F01 0x8F02 0x8F03 0x8F04 \ - 0x8F05 0x8F06 0x8F07 0x8F08 0x8F09 0x8F0A 0x8F0B 0x8F0C \ - 0x8F0D 0x8F0E 0x8F0F 0x8F10 0x8F11 0x8F12 0x8F13 0x8F14 \ - 0x8F15 0x8F16 0x8F17 0x8F18 0x8F19 0x8F1A 0x8F1B 0x8F1C \ - 0x8F1D 0x8F1E 0x8F1F 0x8F20 0x8F21 0x8F22 0x8F23 0x8F24 \ - 0x8F25 0x8F26 0x8F27 0x8F28 0x8F29 0x8F2A 0x8F2B 0x8F2C \ - 0x8F2D 0x8F2E 0x8F2F 0x8F30 0x8F31 0x8F32 0x8F33 0x8F34 \ - 0x8F35 0x8F36 0x8F37 0x8F38 0x8F39 0x8F3A 0x8F3B 0x8F3C \ - 0x8F3D 0x8F3E 0x8F3F 0x8F40 0x8F41 0x8F42 0x8F43 0x8F44 \ - 0x8368 0x831B 0x8369 0x836C 0x836A 0x836D 0x836E 0x83B0 \ - 0x8378 0x83B3 0x83B4 0x83A0 0x83AA 0x8393 0x839C 0x8385 \ - 0x837C 0x83B6 0x83A9 0x837D 0x83B8 0x837B 0x8398 0x839E \ - 0x83A8 0x83BA 0x83BC 0x83C1 0x8401 0x83E5 0x83D8 0x5807 \ - 0x8418 0x840B 0x83DD 0x83FD 0x83D6 0x841C 0x8438 0x8411 \ - 0x8406 0x83D4 0x83DF 0x840F 0x8403 0x83F8 0x83F9 0x83EA \ - 0x83C5 0x83C0 0x8426 0x83F0 0x83E1 0x845C 0x8451 0x845A \ - 0x8459 0x8473 0x8487 0x8488 0x847A 0x8489 0x8478 0x843C \ - 0x8446 0x8469 0x8476 0x848C 0x848E 0x8431 0x846D 0x84C1 \ - 0x84CD 0x84D0 0x84E6 0x84BD 0x84D3 0x84CA 0x84BF 0x84BA \ - 0x84E0 0x84A1 0x84B9 0x84B4 0x8497 0x84E5 0x84E3 0x850C -70 0x750D 0x8538 0x84F0 0x8539 0x851F 0x853A 0x8F45 0x8F46 \ - 0x8F47 0x8F48 0x8F49 0x8F4A 0x8F4B 0x8F4C 0x8F4D 0x8F4E \ - 0x8F4F 0x8F50 0x8F51 0x8F52 0x8F53 0x8F54 0x8F55 0x8F56 \ - 0x8F57 0x8F58 0x8F59 0x8F5A 0x8F5B 0x8F5C 0x8F5D 0x8F5E \ - 0x8F5F 0x8F60 0x8F61 0x8F62 0x8F63 0x8F64 0x8F65 0x8F6A \ - 0x8F80 0x8F8C 0x8F92 0x8F9D 0x8FA0 0x8FA1 0x8FA2 0x8FA4 \ - 0x8FA5 0x8FA6 0x8FA7 0x8FAA 0x8FAC 0x8FAD 0x8FAE 0x8FAF \ - 0x8FB2 0x8FB3 0x8FB4 0x8FB5 0x8FB7 0x8FB8 0x8FBA 0x8FBB \ - 0x8FBC 0x8FBF 0x8FC0 0x8FC3 0x8FC6 0x8FC9 0x8FCA 0x8FCB \ - 0x8FCC 0x8FCD 0x8FCF 0x8FD2 0x8FD6 0x8FD7 0x8FDA 0x8FE0 \ - 0x8FE1 0x8FE3 0x8FE7 0x8FEC 0x8FEF 0x8FF1 0x8FF2 0x8FF4 \ - 0x8FF5 0x8FF6 0x8FFA 0x8FFB 0x8FFC 0x8FFE 0x8FFF 0x9007 \ - 0x9008 0x900C 0x900E 0x9013 0x9015 0x9018 0x8556 0x853B \ - 0x84FF 0x84FC 0x8559 0x8548 0x8568 0x8564 0x855E 0x857A \ - 0x77A2 0x8543 0x8572 0x857B 0x85A4 0x85A8 0x8587 0x858F \ - 0x8579 0x85AE 0x859C 0x8585 0x85B9 0x85B7 0x85B0 0x85D3 \ - 0x85C1 0x85DC 0x85FF 0x8627 0x8605 0x8629 0x8616 0x863C \ - 0x5EFE 0x5F08 0x593C 0x5941 0x8037 0x5955 0x595A 0x5958 \ - 0x530F 0x5C22 0x5C25 0x5C2C 0x5C34 0x624C 0x626A 0x629F \ - 0x62BB 0x62CA 0x62DA 0x62D7 0x62EE 0x6322 0x62F6 0x6339 \ - 0x634B 0x6343 0x63AD 0x63F6 0x6371 0x637A 0x638E 0x63B4 \ - 0x636D 0x63AC 0x638A 0x6369 0x63AE 0x63BC 0x63F2 0x63F8 \ - 0x63E0 0x63FF 0x63C4 0x63DE 0x63CE 0x6452 0x63C6 0x63BE \ - 0x6445 0x6441 0x640B 0x641B 0x6420 0x640C 0x6426 0x6421 \ - 0x645E 0x6484 0x646D 0x6496 0x9019 0x901C 0x9023 0x9024 \ - 0x9025 0x9027 0x9028 0x9029 0x902A 0x902B 0x902C 0x9030 \ - 0x9031 0x9032 0x9033 0x9034 0x9037 0x9039 0x903A 0x903D \ - 0x903F 0x9040 0x9043 0x9045 0x9046 0x9048 0x9049 0x904A \ - 0x904B 0x904C 0x904E 0x9054 0x9055 0x9056 0x9059 0x905A \ - 0x905C 0x905D 0x905E 0x905F 0x9060 0x9061 0x9064 0x9066 \ - 0x9067 0x9069 0x906A 0x906B 0x906C 0x906F 0x9070 0x9071 \ - 0x9072 0x9073 0x9076 0x9077 0x9078 0x9079 0x907A 0x907B -71 0x907C 0x907E 0x9081 0x9084 0x9085 0x9086 0x9087 0x9089 \ - 0x908A 0x908C 0x908D 0x908E 0x908F 0x9090 0x9092 0x9094 \ - 0x9096 0x9098 0x909A 0x909C 0x909E 0x909F 0x90A0 0x90A4 \ - 0x90A5 0x90A7 0x90A8 0x90A9 0x90AB 0x90AD 0x90B2 0x90B7 \ - 0x90BC 0x90BD 0x90BF 0x90C0 0x647A 0x64B7 0x64B8 0x6499 \ - 0x64BA 0x64C0 0x64D0 0x64D7 0x64E4 0x64E2 0x6509 0x6525 \ - 0x652E 0x5F0B 0x5FD2 0x7519 0x5F11 0x535F 0x53F1 0x53FD \ - 0x53E9 0x53E8 0x53FB 0x5412 0x5416 0x5406 0x544B 0x5452 \ - 0x5453 0x5454 0x5456 0x5443 0x5421 0x5457 0x5459 0x5423 \ - 0x5432 0x5482 0x5494 0x5477 0x5471 0x5464 0x549A 0x549B \ - 0x5484 0x5476 0x5466 0x549D 0x54D0 0x54AD 0x54C2 0x54B4 \ - 0x54D2 0x54A7 0x54A6 0x54D3 0x54D4 0x5472 0x54A3 0x54D5 \ - 0x54BB 0x54BF 0x54CC 0x54D9 0x54DA 0x54DC 0x54A9 0x54AA \ - 0x54A4 0x54DD 0x54CF 0x54DE 0x551B 0x54E7 0x5520 0x54FD \ - 0x5514 0x54F3 0x5522 0x5523 0x550F 0x5511 0x5527 0x552A \ - 0x5567 0x558F 0x55B5 0x5549 0x556D 0x5541 0x5555 0x553F \ - 0x5550 0x553C 0x90C2 0x90C3 0x90C6 0x90C8 0x90C9 0x90CB \ - 0x90CC 0x90CD 0x90D2 0x90D4 0x90D5 0x90D6 0x90D8 0x90D9 \ - 0x90DA 0x90DE 0x90DF 0x90E0 0x90E3 0x90E4 0x90E5 0x90E9 \ - 0x90EA 0x90EC 0x90EE 0x90F0 0x90F1 0x90F2 0x90F3 0x90F5 \ - 0x90F6 0x90F7 0x90F9 0x90FA 0x90FB 0x90FC 0x90FF 0x9100 \ - 0x9101 0x9103 0x9105 0x9106 0x9107 0x9108 0x9109 0x910A \ - 0x910B 0x910C 0x910D 0x910E 0x910F 0x9110 0x9111 0x9112 \ - 0x9113 0x9114 0x9115 0x9116 0x9117 0x9118 0x911A 0x911B \ - 0x911C 0x911D 0x911F 0x9120 0x9121 0x9124 0x9125 0x9126 \ - 0x9127 0x9128 0x9129 0x912A 0x912B 0x912C 0x912D 0x912E \ - 0x9130 0x9132 0x9133 0x9134 0x9135 0x9136 0x9137 0x9138 \ - 0x913A 0x913B 0x913C 0x913D 0x913E 0x913F 0x9140 0x9141 \ - 0x9142 0x9144 0x5537 0x5556 0x5575 0x5576 0x5577 0x5533 \ - 0x5530 0x555C 0x558B 0x55D2 0x5583 0x55B1 0x55B9 0x5588 \ - 0x5581 0x559F 0x557E 0x55D6 0x5591 0x557B 0x55DF 0x55BD \ - 0x55BE 0x5594 0x5599 0x55EA 0x55F7 0x55C9 0x561F 0x55D1 -72 0x55EB 0x55EC 0x55D4 0x55E6 0x55DD 0x55C4 0x55EF 0x55E5 \ - 0x55F2 0x55F3 0x55CC 0x55CD 0x55E8 0x55F5 0x55E4 0x8F94 \ - 0x561E 0x5608 0x560C 0x5601 0x5624 0x5623 0x55FE 0x5600 \ - 0x5627 0x562D 0x5658 0x5639 0x5657 0x562C 0x564D 0x5662 \ - 0x5659 0x565C 0x564C 0x5654 0x5686 0x5664 0x5671 0x566B \ - 0x567B 0x567C 0x5685 0x5693 0x56AF 0x56D4 0x56D7 0x56DD \ - 0x56E1 0x56F5 0x56EB 0x56F9 0x56FF 0x5704 0x570A 0x5709 \ - 0x571C 0x5E0F 0x5E19 0x5E14 0x5E11 0x5E31 0x5E3B 0x5E3C \ - 0x9145 0x9147 0x9148 0x9151 0x9153 0x9154 0x9155 0x9156 \ - 0x9158 0x9159 0x915B 0x915C 0x915F 0x9160 0x9166 0x9167 \ - 0x9168 0x916B 0x916D 0x9173 0x917A 0x917B 0x917C 0x9180 \ - 0x9181 0x9182 0x9183 0x9184 0x9186 0x9188 0x918A 0x918E \ - 0x918F 0x9193 0x9194 0x9195 0x9196 0x9197 0x9198 0x9199 \ - 0x919C 0x919D 0x919E 0x919F 0x91A0 0x91A1 0x91A4 0x91A5 \ - 0x91A6 0x91A7 0x91A8 0x91A9 0x91AB 0x91AC 0x91B0 0x91B1 \ - 0x91B2 0x91B3 0x91B6 0x91B7 0x91B8 0x91B9 0x91BB 0x91BC \ - 0x91BD 0x91BE 0x91BF 0x91C0 0x91C1 0x91C2 0x91C3 0x91C4 \ - 0x91C5 0x91C6 0x91C8 0x91CB 0x91D0 0x91D2 0x91D3 0x91D4 \ - 0x91D5 0x91D6 0x91D7 0x91D8 0x91D9 0x91DA 0x91DB 0x91DD \ - 0x91DE 0x91DF 0x91E0 0x91E1 0x91E2 0x91E3 0x91E4 0x91E5 \ - 0x5E37 0x5E44 0x5E54 0x5E5B 0x5E5E 0x5E61 0x5C8C 0x5C7A \ - 0x5C8D 0x5C90 0x5C96 0x5C88 0x5C98 0x5C99 0x5C91 0x5C9A \ - 0x5C9C 0x5CB5 0x5CA2 0x5CBD 0x5CAC 0x5CAB 0x5CB1 0x5CA3 \ - 0x5CC1 0x5CB7 0x5CC4 0x5CD2 0x5CE4 0x5CCB 0x5CE5 0x5D02 \ - 0x5D03 0x5D27 0x5D26 0x5D2E 0x5D24 0x5D1E 0x5D06 0x5D1B \ - 0x5D58 0x5D3E 0x5D34 0x5D3D 0x5D6C 0x5D5B 0x5D6F 0x5D5D \ - 0x5D6B 0x5D4B 0x5D4A 0x5D69 0x5D74 0x5D82 0x5D99 0x5D9D \ - 0x8C73 0x5DB7 0x5DC5 0x5F73 0x5F77 0x5F82 0x5F87 0x5F89 \ - 0x5F8C 0x5F95 0x5F99 0x5F9C 0x5FA8 0x5FAD 0x5FB5 0x5FBC \ - 0x8862 0x5F61 0x72AD 0x72B0 0x72B4 0x72B7 0x72B8 0x72C3 \ - 0x72C1 0x72CE 0x72CD 0x72D2 0x72E8 0x72EF 0x72E9 0x72F2 \ - 0x72F4 0x72F7 0x7301 0x72F3 0x7303 0x72FA 0x91E6 0x91E7 -73 0x91E8 0x91E9 0x91EA 0x91EB 0x91EC 0x91ED 0x91EE 0x91EF \ - 0x91F0 0x91F1 0x91F2 0x91F3 0x91F4 0x91F5 0x91F6 0x91F7 \ - 0x91F8 0x91F9 0x91FA 0x91FB 0x91FC 0x91FD 0x91FE 0x91FF \ - 0x9200 0x9201 0x9202 0x9203 0x9204 0x9205 0x9206 0x9207 \ - 0x9208 0x9209 0x920A 0x920B 0x920C 0x920D 0x920E 0x920F \ - 0x9210 0x9211 0x9212 0x9213 0x9214 0x9215 0x9216 0x9217 \ - 0x9218 0x9219 0x921A 0x921B 0x921C 0x921D 0x921E 0x921F \ - 0x9220 0x9221 0x9222 0x9223 0x9224 0x9225 0x9226 0x9227 \ - 0x9228 0x9229 0x922A 0x922B 0x922C 0x922D 0x922E 0x922F \ - 0x9230 0x9231 0x9232 0x9233 0x9234 0x9235 0x9236 0x9237 \ - 0x9238 0x9239 0x923A 0x923B 0x923C 0x923D 0x923E 0x923F \ - 0x9240 0x9241 0x9242 0x9243 0x9244 0x9245 0x72FB 0x7317 \ - 0x7313 0x7321 0x730A 0x731E 0x731D 0x7315 0x7322 0x7339 \ - 0x7325 0x732C 0x7338 0x7331 0x7350 0x734D 0x7357 0x7360 \ - 0x736C 0x736F 0x737E 0x821B 0x5925 0x98E7 0x5924 0x5902 \ - 0x9963 0x9967 0x9968 0x9969 0x996A 0x996B 0x996C 0x9974 \ - 0x9977 0x997D 0x9980 0x9984 0x9987 0x998A 0x998D 0x9990 \ - 0x9991 0x9993 0x9994 0x9995 0x5E80 0x5E91 0x5E8B 0x5E96 \ - 0x5EA5 0x5EA0 0x5EB9 0x5EB5 0x5EBE 0x5EB3 0x8D53 0x5ED2 \ - 0x5ED1 0x5EDB 0x5EE8 0x5EEA 0x81BA 0x5FC4 0x5FC9 0x5FD6 \ - 0x5FCF 0x6003 0x5FEE 0x6004 0x5FE1 0x5FE4 0x5FFE 0x6005 \ - 0x6006 0x5FEA 0x5FED 0x5FF8 0x6019 0x6035 0x6026 0x601B \ - 0x600F 0x600D 0x6029 0x602B 0x600A 0x603F 0x6021 0x6078 \ - 0x6079 0x607B 0x607A 0x6042 0x9246 0x9247 0x9248 0x9249 \ - 0x924A 0x924B 0x924C 0x924D 0x924E 0x924F 0x9250 0x9251 \ - 0x9252 0x9253 0x9254 0x9255 0x9256 0x9257 0x9258 0x9259 \ - 0x925A 0x925B 0x925C 0x925D 0x925E 0x925F 0x9260 0x9261 \ - 0x9262 0x9263 0x9264 0x9265 0x9266 0x9267 0x9268 0x9269 \ - 0x926A 0x926B 0x926C 0x926D 0x926E 0x926F 0x9270 0x9271 \ - 0x9272 0x9273 0x9275 0x9276 0x9277 0x9278 0x9279 0x927A \ - 0x927B 0x927C 0x927D 0x927E 0x927F 0x9280 0x9281 0x9282 \ - 0x9283 0x9284 0x9285 0x9286 0x9287 0x9288 0x9289 0x928A -74 0x928B 0x928C 0x928D 0x928F 0x9290 0x9291 0x9292 0x9293 \ - 0x9294 0x9295 0x9296 0x9297 0x9298 0x9299 0x929A 0x929B \ - 0x929C 0x929D 0x929E 0x929F 0x92A0 0x92A1 0x92A2 0x92A3 \ - 0x92A4 0x92A5 0x92A6 0x92A7 0x606A 0x607D 0x6096 0x609A \ - 0x60AD 0x609D 0x6083 0x6092 0x608C 0x609B 0x60EC 0x60BB \ - 0x60B1 0x60DD 0x60D8 0x60C6 0x60DA 0x60B4 0x6120 0x6126 \ - 0x6115 0x6123 0x60F4 0x6100 0x610E 0x612B 0x614A 0x6175 \ - 0x61AC 0x6194 0x61A7 0x61B7 0x61D4 0x61F5 0x5FDD 0x96B3 \ - 0x95E9 0x95EB 0x95F1 0x95F3 0x95F5 0x95F6 0x95FC 0x95FE \ - 0x9603 0x9604 0x9606 0x9608 0x960A 0x960B 0x960C 0x960D \ - 0x960F 0x9612 0x9615 0x9616 0x9617 0x9619 0x961A 0x4E2C \ - 0x723F 0x6215 0x6C35 0x6C54 0x6C5C 0x6C4A 0x6CA3 0x6C85 \ - 0x6C90 0x6C94 0x6C8C 0x6C68 0x6C69 0x6C74 0x6C76 0x6C86 \ - 0x6CA9 0x6CD0 0x6CD4 0x6CAD 0x6CF7 0x6CF8 0x6CF1 0x6CD7 \ - 0x6CB2 0x6CE0 0x6CD6 0x6CFA 0x6CEB 0x6CEE 0x6CB1 0x6CD3 \ - 0x6CEF 0x6CFE 0x92A8 0x92A9 0x92AA 0x92AB 0x92AC 0x92AD \ - 0x92AF 0x92B0 0x92B1 0x92B2 0x92B3 0x92B4 0x92B5 0x92B6 \ - 0x92B7 0x92B8 0x92B9 0x92BA 0x92BB 0x92BC 0x92BD 0x92BE \ - 0x92BF 0x92C0 0x92C1 0x92C2 0x92C3 0x92C4 0x92C5 0x92C6 \ - 0x92C7 0x92C9 0x92CA 0x92CB 0x92CC 0x92CD 0x92CE 0x92CF \ - 0x92D0 0x92D1 0x92D2 0x92D3 0x92D4 0x92D5 0x92D6 0x92D7 \ - 0x92D8 0x92D9 0x92DA 0x92DB 0x92DC 0x92DD 0x92DE 0x92DF \ - 0x92E0 0x92E1 0x92E2 0x92E3 0x92E4 0x92E5 0x92E6 0x92E7 \ - 0x92E8 0x92E9 0x92EA 0x92EB 0x92EC 0x92ED 0x92EE 0x92EF \ - 0x92F0 0x92F1 0x92F2 0x92F3 0x92F4 0x92F5 0x92F6 0x92F7 \ - 0x92F8 0x92F9 0x92FA 0x92FB 0x92FC 0x92FD 0x92FE 0x92FF \ - 0x9300 0x9301 0x9302 0x9303 0x9304 0x9305 0x9306 0x9307 \ - 0x9308 0x9309 0x6D39 0x6D27 0x6D0C 0x6D43 0x6D48 0x6D07 \ - 0x6D04 0x6D19 0x6D0E 0x6D2B 0x6D4D 0x6D2E 0x6D35 0x6D1A \ - 0x6D4F 0x6D52 0x6D54 0x6D33 0x6D91 0x6D6F 0x6D9E 0x6DA0 \ - 0x6D5E 0x6D93 0x6D94 0x6D5C 0x6D60 0x6D7C 0x6D63 0x6E1A \ - 0x6DC7 0x6DC5 0x6DDE 0x6E0E 0x6DBF 0x6DE0 0x6E11 0x6DE6 -75 0x6DDD 0x6DD9 0x6E16 0x6DAB 0x6E0C 0x6DAE 0x6E2B 0x6E6E \ - 0x6E4E 0x6E6B 0x6EB2 0x6E5F 0x6E86 0x6E53 0x6E54 0x6E32 \ - 0x6E25 0x6E44 0x6EDF 0x6EB1 0x6E98 0x6EE0 0x6F2D 0x6EE2 \ - 0x6EA5 0x6EA7 0x6EBD 0x6EBB 0x6EB7 0x6ED7 0x6EB4 0x6ECF \ - 0x6E8F 0x6EC2 0x6E9F 0x6F62 0x6F46 0x6F47 0x6F24 0x6F15 \ - 0x6EF9 0x6F2F 0x6F36 0x6F4B 0x6F74 0x6F2A 0x6F09 0x6F29 \ - 0x6F89 0x6F8D 0x6F8C 0x6F78 0x6F72 0x6F7C 0x6F7A 0x6FD1 \ - 0x930A 0x930B 0x930C 0x930D 0x930E 0x930F 0x9310 0x9311 \ - 0x9312 0x9313 0x9314 0x9315 0x9316 0x9317 0x9318 0x9319 \ - 0x931A 0x931B 0x931C 0x931D 0x931E 0x931F 0x9320 0x9321 \ - 0x9322 0x9323 0x9324 0x9325 0x9326 0x9327 0x9328 0x9329 \ - 0x932A 0x932B 0x932C 0x932D 0x932E 0x932F 0x9330 0x9331 \ - 0x9332 0x9333 0x9334 0x9335 0x9336 0x9337 0x9338 0x9339 \ - 0x933A 0x933B 0x933C 0x933D 0x933F 0x9340 0x9341 0x9342 \ - 0x9343 0x9344 0x9345 0x9346 0x9347 0x9348 0x9349 0x934A \ - 0x934B 0x934C 0x934D 0x934E 0x934F 0x9350 0x9351 0x9352 \ - 0x9353 0x9354 0x9355 0x9356 0x9357 0x9358 0x9359 0x935A \ - 0x935B 0x935C 0x935D 0x935E 0x935F 0x9360 0x9361 0x9362 \ - 0x9363 0x9364 0x9365 0x9366 0x9367 0x9368 0x9369 0x936B \ - 0x6FC9 0x6FA7 0x6FB9 0x6FB6 0x6FC2 0x6FE1 0x6FEE 0x6FDE \ - 0x6FE0 0x6FEF 0x701A 0x7023 0x701B 0x7039 0x7035 0x704F \ - 0x705E 0x5B80 0x5B84 0x5B95 0x5B93 0x5BA5 0x5BB8 0x752F \ - 0x9A9E 0x6434 0x5BE4 0x5BEE 0x8930 0x5BF0 0x8E47 0x8B07 \ - 0x8FB6 0x8FD3 0x8FD5 0x8FE5 0x8FEE 0x8FE4 0x8FE9 0x8FE6 \ - 0x8FF3 0x8FE8 0x9005 0x9004 0x900B 0x9026 0x9011 0x900D \ - 0x9016 0x9021 0x9035 0x9036 0x902D 0x902F 0x9044 0x9051 \ - 0x9052 0x9050 0x9068 0x9058 0x9062 0x905B 0x66B9 0x9074 \ - 0x907D 0x9082 0x9088 0x9083 0x908B 0x5F50 0x5F57 0x5F56 \ - 0x5F58 0x5C3B 0x54AB 0x5C50 0x5C59 0x5B71 0x5C63 0x5C66 \ - 0x7FBC 0x5F2A 0x5F29 0x5F2D 0x8274 0x5F3C 0x9B3B 0x5C6E \ - 0x5981 0x5983 0x598D 0x59A9 0x59AA 0x59A3 0x936C 0x936D \ - 0x936E 0x936F 0x9370 0x9371 0x9372 0x9373 0x9374 0x9375 -76 0x9376 0x9377 0x9378 0x9379 0x937A 0x937B 0x937C 0x937D \ - 0x937E 0x937F 0x9380 0x9381 0x9382 0x9383 0x9384 0x9385 \ - 0x9386 0x9387 0x9388 0x9389 0x938A 0x938B 0x938C 0x938D \ - 0x938E 0x9390 0x9391 0x9392 0x9393 0x9394 0x9395 0x9396 \ - 0x9397 0x9398 0x9399 0x939A 0x939B 0x939C 0x939D 0x939E \ - 0x939F 0x93A0 0x93A1 0x93A2 0x93A3 0x93A4 0x93A5 0x93A6 \ - 0x93A7 0x93A8 0x93A9 0x93AA 0x93AB 0x93AC 0x93AD 0x93AE \ - 0x93AF 0x93B0 0x93B1 0x93B2 0x93B3 0x93B4 0x93B5 0x93B6 \ - 0x93B7 0x93B8 0x93B9 0x93BA 0x93BB 0x93BC 0x93BD 0x93BE \ - 0x93BF 0x93C0 0x93C1 0x93C2 0x93C3 0x93C4 0x93C5 0x93C6 \ - 0x93C7 0x93C8 0x93C9 0x93CB 0x93CC 0x93CD 0x5997 0x59CA \ - 0x59AB 0x599E 0x59A4 0x59D2 0x59B2 0x59AF 0x59D7 0x59BE \ - 0x5A05 0x5A06 0x59DD 0x5A08 0x59E3 0x59D8 0x59F9 0x5A0C \ - 0x5A09 0x5A32 0x5A34 0x5A11 0x5A23 0x5A13 0x5A40 0x5A67 \ - 0x5A4A 0x5A55 0x5A3C 0x5A62 0x5A75 0x80EC 0x5AAA 0x5A9B \ - 0x5A77 0x5A7A 0x5ABE 0x5AEB 0x5AB2 0x5AD2 0x5AD4 0x5AB8 \ - 0x5AE0 0x5AE3 0x5AF1 0x5AD6 0x5AE6 0x5AD8 0x5ADC 0x5B09 \ - 0x5B17 0x5B16 0x5B32 0x5B37 0x5B40 0x5C15 0x5C1C 0x5B5A \ - 0x5B65 0x5B73 0x5B51 0x5B53 0x5B62 0x9A75 0x9A77 0x9A78 \ - 0x9A7A 0x9A7F 0x9A7D 0x9A80 0x9A81 0x9A85 0x9A88 0x9A8A \ - 0x9A90 0x9A92 0x9A93 0x9A96 0x9A98 0x9A9B 0x9A9C 0x9A9D \ - 0x9A9F 0x9AA0 0x9AA2 0x9AA3 0x9AA5 0x9AA7 0x7E9F 0x7EA1 \ - 0x7EA3 0x7EA5 0x7EA8 0x7EA9 0x93CE 0x93CF 0x93D0 0x93D1 \ - 0x93D2 0x93D3 0x93D4 0x93D5 0x93D7 0x93D8 0x93D9 0x93DA \ - 0x93DB 0x93DC 0x93DD 0x93DE 0x93DF 0x93E0 0x93E1 0x93E2 \ - 0x93E3 0x93E4 0x93E5 0x93E6 0x93E7 0x93E8 0x93E9 0x93EA \ - 0x93EB 0x93EC 0x93ED 0x93EE 0x93EF 0x93F0 0x93F1 0x93F2 \ - 0x93F3 0x93F4 0x93F5 0x93F6 0x93F7 0x93F8 0x93F9 0x93FA \ - 0x93FB 0x93FC 0x93FD 0x93FE 0x93FF 0x9400 0x9401 0x9402 \ - 0x9403 0x9404 0x9405 0x9406 0x9407 0x9408 0x9409 0x940A \ - 0x940B 0x940C 0x940D 0x940E 0x940F 0x9410 0x9411 0x9412 \ - 0x9413 0x9414 0x9415 0x9416 0x9417 0x9418 0x9419 0x941A -77 0x941B 0x941C 0x941D 0x941E 0x941F 0x9420 0x9421 0x9422 \ - 0x9423 0x9424 0x9425 0x9426 0x9427 0x9428 0x9429 0x942A \ - 0x942B 0x942C 0x942D 0x942E 0x7EAD 0x7EB0 0x7EBE 0x7EC0 \ - 0x7EC1 0x7EC2 0x7EC9 0x7ECB 0x7ECC 0x7ED0 0x7ED4 0x7ED7 \ - 0x7EDB 0x7EE0 0x7EE1 0x7EE8 0x7EEB 0x7EEE 0x7EEF 0x7EF1 \ - 0x7EF2 0x7F0D 0x7EF6 0x7EFA 0x7EFB 0x7EFE 0x7F01 0x7F02 \ - 0x7F03 0x7F07 0x7F08 0x7F0B 0x7F0C 0x7F0F 0x7F11 0x7F12 \ - 0x7F17 0x7F19 0x7F1C 0x7F1B 0x7F1F 0x7F21 0x7F22 0x7F23 \ - 0x7F24 0x7F25 0x7F26 0x7F27 0x7F2A 0x7F2B 0x7F2C 0x7F2D \ - 0x7F2F 0x7F30 0x7F31 0x7F32 0x7F33 0x7F35 0x5E7A 0x757F \ - 0x5DDB 0x753E 0x9095 0x738E 0x7391 0x73AE 0x73A2 0x739F \ - 0x73CF 0x73C2 0x73D1 0x73B7 0x73B3 0x73C0 0x73C9 0x73C8 \ - 0x73E5 0x73D9 0x987C 0x740A 0x73E9 0x73E7 0x73DE 0x73BA \ - 0x73F2 0x740F 0x742A 0x745B 0x7426 0x7425 0x7428 0x7430 \ - 0x742E 0x742C 0x942F 0x9430 0x9431 0x9432 0x9433 0x9434 \ - 0x9435 0x9436 0x9437 0x9438 0x9439 0x943A 0x943B 0x943C \ - 0x943D 0x943F 0x9440 0x9441 0x9442 0x9443 0x9444 0x9445 \ - 0x9446 0x9447 0x9448 0x9449 0x944A 0x944B 0x944C 0x944D \ - 0x944E 0x944F 0x9450 0x9451 0x9452 0x9453 0x9454 0x9455 \ - 0x9456 0x9457 0x9458 0x9459 0x945A 0x945B 0x945C 0x945D \ - 0x945E 0x945F 0x9460 0x9461 0x9462 0x9463 0x9464 0x9465 \ - 0x9466 0x9467 0x9468 0x9469 0x946A 0x946C 0x946D 0x946E \ - 0x946F 0x9470 0x9471 0x9472 0x9473 0x9474 0x9475 0x9476 \ - 0x9477 0x9478 0x9479 0x947A 0x947B 0x947C 0x947D 0x947E \ - 0x947F 0x9480 0x9481 0x9482 0x9483 0x9484 0x9491 0x9496 \ - 0x9498 0x94C7 0x94CF 0x94D3 0x94D4 0x94DA 0x94E6 0x94FB \ - 0x951C 0x9520 0x741B 0x741A 0x7441 0x745C 0x7457 0x7455 \ - 0x7459 0x7477 0x746D 0x747E 0x749C 0x748E 0x7480 0x7481 \ - 0x7487 0x748B 0x749E 0x74A8 0x74A9 0x7490 0x74A7 0x74D2 \ - 0x74BA 0x97EA 0x97EB 0x97EC 0x674C 0x6753 0x675E 0x6748 \ - 0x6769 0x67A5 0x6787 0x676A 0x6773 0x6798 0x67A7 0x6775 \ - 0x67A8 0x679E 0x67AD 0x678B 0x6777 0x677C 0x67F0 0x6809 -78 0x67D8 0x680A 0x67E9 0x67B0 0x680C 0x67D9 0x67B5 0x67DA \ - 0x67B3 0x67DD 0x6800 0x67C3 0x67B8 0x67E2 0x680E 0x67C1 \ - 0x67FD 0x6832 0x6833 0x6860 0x6861 0x684E 0x6862 0x6844 \ - 0x6864 0x6883 0x681D 0x6855 0x6866 0x6841 0x6867 0x6840 \ - 0x683E 0x684A 0x6849 0x6829 0x68B5 0x688F 0x6874 0x6877 \ - 0x6893 0x686B 0x68C2 0x696E 0x68FC 0x691F 0x6920 0x68F9 \ - 0x9527 0x9533 0x953D 0x9543 0x9548 0x954B 0x9555 0x955A \ - 0x9560 0x956E 0x9574 0x9575 0x9577 0x9578 0x9579 0x957A \ - 0x957B 0x957C 0x957D 0x957E 0x9580 0x9581 0x9582 0x9583 \ - 0x9584 0x9585 0x9586 0x9587 0x9588 0x9589 0x958A 0x958B \ - 0x958C 0x958D 0x958E 0x958F 0x9590 0x9591 0x9592 0x9593 \ - 0x9594 0x9595 0x9596 0x9597 0x9598 0x9599 0x959A 0x959B \ - 0x959C 0x959D 0x959E 0x959F 0x95A0 0x95A1 0x95A2 0x95A3 \ - 0x95A4 0x95A5 0x95A6 0x95A7 0x95A8 0x95A9 0x95AA 0x95AB \ - 0x95AC 0x95AD 0x95AE 0x95AF 0x95B0 0x95B1 0x95B2 0x95B3 \ - 0x95B4 0x95B5 0x95B6 0x95B7 0x95B8 0x95B9 0x95BA 0x95BB \ - 0x95BC 0x95BD 0x95BE 0x95BF 0x95C0 0x95C1 0x95C2 0x95C3 \ - 0x95C4 0x95C5 0x95C6 0x95C7 0x95C8 0x95C9 0x95CA 0x95CB \ - 0x6924 0x68F0 0x690B 0x6901 0x6957 0x68E3 0x6910 0x6971 \ - 0x6939 0x6960 0x6942 0x695D 0x6984 0x696B 0x6980 0x6998 \ - 0x6978 0x6934 0x69CC 0x6987 0x6988 0x69CE 0x6989 0x6966 \ - 0x6963 0x6979 0x699B 0x69A7 0x69BB 0x69AB 0x69AD 0x69D4 \ - 0x69B1 0x69C1 0x69CA 0x69DF 0x6995 0x69E0 0x698D 0x69FF \ - 0x6A2F 0x69ED 0x6A17 0x6A18 0x6A65 0x69F2 0x6A44 0x6A3E \ - 0x6AA0 0x6A50 0x6A5B 0x6A35 0x6A8E 0x6A79 0x6A3D 0x6A28 \ - 0x6A58 0x6A7C 0x6A91 0x6A90 0x6AA9 0x6A97 0x6AAB 0x7337 \ - 0x7352 0x6B81 0x6B82 0x6B87 0x6B84 0x6B92 0x6B93 0x6B8D \ - 0x6B9A 0x6B9B 0x6BA1 0x6BAA 0x8F6B 0x8F6D 0x8F71 0x8F72 \ - 0x8F73 0x8F75 0x8F76 0x8F78 0x8F77 0x8F79 0x8F7A 0x8F7C \ - 0x8F7E 0x8F81 0x8F82 0x8F84 0x8F87 0x8F8B 0x95CC 0x95CD \ - 0x95CE 0x95CF 0x95D0 0x95D1 0x95D2 0x95D3 0x95D4 0x95D5 \ - 0x95D6 0x95D7 0x95D8 0x95D9 0x95DA 0x95DB 0x95DC 0x95DD -79 0x95DE 0x95DF 0x95E0 0x95E1 0x95E2 0x95E3 0x95E4 0x95E5 \ - 0x95E6 0x95E7 0x95EC 0x95FF 0x9607 0x9613 0x9618 0x961B \ - 0x961E 0x9620 0x9623 0x9624 0x9625 0x9626 0x9627 0x9628 \ - 0x9629 0x962B 0x962C 0x962D 0x962F 0x9630 0x9637 0x9638 \ - 0x9639 0x963A 0x963E 0x9641 0x9643 0x964A 0x964E 0x964F \ - 0x9651 0x9652 0x9653 0x9656 0x9657 0x9658 0x9659 0x965A \ - 0x965C 0x965D 0x965E 0x9660 0x9663 0x9665 0x9666 0x966B \ - 0x966D 0x966E 0x966F 0x9670 0x9671 0x9673 0x9678 0x9679 \ - 0x967A 0x967B 0x967C 0x967D 0x967E 0x967F 0x9680 0x9681 \ - 0x9682 0x9683 0x9684 0x9687 0x9689 0x968A 0x8F8D 0x8F8E \ - 0x8F8F 0x8F98 0x8F9A 0x8ECE 0x620B 0x6217 0x621B 0x621F \ - 0x6222 0x6221 0x6225 0x6224 0x622C 0x81E7 0x74EF 0x74F4 \ - 0x74FF 0x750F 0x7511 0x7513 0x6534 0x65EE 0x65EF 0x65F0 \ - 0x660A 0x6619 0x6772 0x6603 0x6615 0x6600 0x7085 0x66F7 \ - 0x661D 0x6634 0x6631 0x6636 0x6635 0x8006 0x665F 0x6654 \ - 0x6641 0x664F 0x6656 0x6661 0x6657 0x6677 0x6684 0x668C \ - 0x66A7 0x669D 0x66BE 0x66DB 0x66DC 0x66E6 0x66E9 0x8D32 \ - 0x8D33 0x8D36 0x8D3B 0x8D3D 0x8D40 0x8D45 0x8D46 0x8D48 \ - 0x8D49 0x8D47 0x8D4D 0x8D55 0x8D59 0x89C7 0x89CA 0x89CB \ - 0x89CC 0x89CE 0x89CF 0x89D0 0x89D1 0x726E 0x729F 0x725D \ - 0x7266 0x726F 0x727E 0x727F 0x7284 0x728B 0x728D 0x728F \ - 0x7292 0x6308 0x6332 0x63B0 0x968C 0x968E 0x9691 0x9692 \ - 0x9693 0x9695 0x9696 0x969A 0x969B 0x969D 0x969E 0x969F \ - 0x96A0 0x96A1 0x96A2 0x96A3 0x96A4 0x96A5 0x96A6 0x96A8 \ - 0x96A9 0x96AA 0x96AB 0x96AC 0x96AD 0x96AE 0x96AF 0x96B1 \ - 0x96B2 0x96B4 0x96B5 0x96B7 0x96B8 0x96BA 0x96BB 0x96BF \ - 0x96C2 0x96C3 0x96C8 0x96CA 0x96CB 0x96D0 0x96D1 0x96D3 \ - 0x96D4 0x96D6 0x96D7 0x96D8 0x96D9 0x96DA 0x96DB 0x96DC \ - 0x96DD 0x96DE 0x96DF 0x96E1 0x96E2 0x96E3 0x96E4 0x96E5 \ - 0x96E6 0x96E7 0x96EB 0x96EC 0x96ED 0x96EE 0x96F0 0x96F1 \ - 0x96F2 0x96F4 0x96F5 0x96F8 0x96FA 0x96FB 0x96FC 0x96FD \ - 0x96FF 0x9702 0x9703 0x9705 0x970A 0x970B 0x970C 0x9710 -80 0x9711 0x9712 0x9714 0x9715 0x9717 0x9718 0x9719 0x971A \ - 0x971B 0x971D 0x971F 0x9720 0x643F 0x64D8 0x8004 0x6BEA \ - 0x6BF3 0x6BFD 0x6BF5 0x6BF9 0x6C05 0x6C07 0x6C06 0x6C0D \ - 0x6C15 0x6C18 0x6C19 0x6C1A 0x6C21 0x6C29 0x6C24 0x6C2A \ - 0x6C32 0x6535 0x6555 0x656B 0x724D 0x7252 0x7256 0x7230 \ - 0x8662 0x5216 0x809F 0x809C 0x8093 0x80BC 0x670A 0x80BD \ - 0x80B1 0x80AB 0x80AD 0x80B4 0x80B7 0x80E7 0x80E8 0x80E9 \ - 0x80EA 0x80DB 0x80C2 0x80C4 0x80D9 0x80CD 0x80D7 0x6710 \ - 0x80DD 0x80EB 0x80F1 0x80F4 0x80ED 0x810D 0x810E 0x80F2 \ - 0x80FC 0x6715 0x8112 0x8C5A 0x8136 0x811E 0x812C 0x8118 \ - 0x8132 0x8148 0x814C 0x8153 0x8174 0x8159 0x815A 0x8171 \ - 0x8160 0x8169 0x817C 0x817D 0x816D 0x8167 0x584D 0x5AB5 \ - 0x8188 0x8182 0x8191 0x6ED5 0x81A3 0x81AA 0x81CC 0x6726 \ - 0x81CA 0x81BB 0x9721 0x9722 0x9723 0x9724 0x9725 0x9726 \ - 0x9727 0x9728 0x9729 0x972B 0x972C 0x972E 0x972F 0x9731 \ - 0x9733 0x9734 0x9735 0x9736 0x9737 0x973A 0x973B 0x973C \ - 0x973D 0x973F 0x9740 0x9741 0x9742 0x9743 0x9744 0x9745 \ - 0x9746 0x9747 0x9748 0x9749 0x974A 0x974B 0x974C 0x974D \ - 0x974E 0x974F 0x9750 0x9751 0x9754 0x9755 0x9757 0x9758 \ - 0x975A 0x975C 0x975D 0x975F 0x9763 0x9764 0x9766 0x9767 \ - 0x9768 0x976A 0x976B 0x976C 0x976D 0x976E 0x976F 0x9770 \ - 0x9771 0x9772 0x9775 0x9777 0x9778 0x9779 0x977A 0x977B \ - 0x977D 0x977E 0x977F 0x9780 0x9781 0x9782 0x9783 0x9784 \ - 0x9786 0x9787 0x9788 0x9789 0x978A 0x978C 0x978E 0x978F \ - 0x9790 0x9793 0x9795 0x9796 0x9797 0x9799 0x979A 0x979B \ - 0x979C 0x979D 0x81C1 0x81A6 0x6B24 0x6B37 0x6B39 0x6B43 \ - 0x6B46 0x6B59 0x98D1 0x98D2 0x98D3 0x98D5 0x98D9 0x98DA \ - 0x6BB3 0x5F40 0x6BC2 0x89F3 0x6590 0x9F51 0x6593 0x65BC \ - 0x65C6 0x65C4 0x65C3 0x65CC 0x65CE 0x65D2 0x65D6 0x7080 \ - 0x709C 0x7096 0x709D 0x70BB 0x70C0 0x70B7 0x70AB 0x70B1 \ - 0x70E8 0x70CA 0x7110 0x7113 0x7116 0x712F 0x7131 0x7173 \ - 0x715C 0x7168 0x7145 0x7172 0x714A 0x7178 0x717A 0x7198 -81 0x71B3 0x71B5 0x71A8 0x71A0 0x71E0 0x71D4 0x71E7 0x71F9 \ - 0x721D 0x7228 0x706C 0x7118 0x7166 0x71B9 0x623E 0x623D \ - 0x6243 0x6248 0x6249 0x793B 0x7940 0x7946 0x7949 0x795B \ - 0x795C 0x7953 0x795A 0x7962 0x7957 0x7960 0x796F 0x7967 \ - 0x797A 0x7985 0x798A 0x799A 0x79A7 0x79B3 0x5FD1 0x5FD0 \ - 0x979E 0x979F 0x97A1 0x97A2 0x97A4 0x97A5 0x97A6 0x97A7 \ - 0x97A8 0x97A9 0x97AA 0x97AC 0x97AE 0x97B0 0x97B1 0x97B3 \ - 0x97B5 0x97B6 0x97B7 0x97B8 0x97B9 0x97BA 0x97BB 0x97BC \ - 0x97BD 0x97BE 0x97BF 0x97C0 0x97C1 0x97C2 0x97C3 0x97C4 \ - 0x97C5 0x97C6 0x97C7 0x97C8 0x97C9 0x97CA 0x97CB 0x97CC \ - 0x97CD 0x97CE 0x97CF 0x97D0 0x97D1 0x97D2 0x97D3 0x97D4 \ - 0x97D5 0x97D6 0x97D7 0x97D8 0x97D9 0x97DA 0x97DB 0x97DC \ - 0x97DD 0x97DE 0x97DF 0x97E0 0x97E1 0x97E2 0x97E3 0x97E4 \ - 0x97E5 0x97E8 0x97EE 0x97EF 0x97F0 0x97F1 0x97F2 0x97F4 \ - 0x97F7 0x97F8 0x97F9 0x97FA 0x97FB 0x97FC 0x97FD 0x97FE \ - 0x97FF 0x9800 0x9801 0x9802 0x9803 0x9804 0x9805 0x9806 \ - 0x9807 0x9808 0x9809 0x980A 0x980B 0x980C 0x980D 0x980E \ - 0x603C 0x605D 0x605A 0x6067 0x6041 0x6059 0x6063 0x60AB \ - 0x6106 0x610D 0x615D 0x61A9 0x619D 0x61CB 0x61D1 0x6206 \ - 0x8080 0x807F 0x6C93 0x6CF6 0x6DFC 0x77F6 0x77F8 0x7800 \ - 0x7809 0x7817 0x7818 0x7811 0x65AB 0x782D 0x781C 0x781D \ - 0x7839 0x783A 0x783B 0x781F 0x783C 0x7825 0x782C 0x7823 \ - 0x7829 0x784E 0x786D 0x7856 0x7857 0x7826 0x7850 0x7847 \ - 0x784C 0x786A 0x789B 0x7893 0x789A 0x7887 0x789C 0x78A1 \ - 0x78A3 0x78B2 0x78B9 0x78A5 0x78D4 0x78D9 0x78C9 0x78EC \ - 0x78F2 0x7905 0x78F4 0x7913 0x7924 0x791E 0x7934 0x9F9B \ - 0x9EF9 0x9EFB 0x9EFC 0x76F1 0x7704 0x770D 0x76F9 0x7707 \ - 0x7708 0x771A 0x7722 0x7719 0x772D 0x7726 0x7735 0x7738 \ - 0x7750 0x7751 0x7747 0x7743 0x775A 0x7768 0x980F 0x9810 \ - 0x9811 0x9812 0x9813 0x9814 0x9815 0x9816 0x9817 0x9818 \ - 0x9819 0x981A 0x981B 0x981C 0x981D 0x981E 0x981F 0x9820 \ - 0x9821 0x9822 0x9823 0x9824 0x9825 0x9826 0x9827 0x9828 -82 0x9829 0x982A 0x982B 0x982C 0x982D 0x982E 0x982F 0x9830 \ - 0x9831 0x9832 0x9833 0x9834 0x9835 0x9836 0x9837 0x9838 \ - 0x9839 0x983A 0x983B 0x983C 0x983D 0x983E 0x983F 0x9840 \ - 0x9841 0x9842 0x9843 0x9844 0x9845 0x9846 0x9847 0x9848 \ - 0x9849 0x984A 0x984B 0x984C 0x984D 0x984E 0x984F 0x9850 \ - 0x9851 0x9852 0x9853 0x9854 0x9855 0x9856 0x9857 0x9858 \ - 0x9859 0x985A 0x985B 0x985C 0x985D 0x985E 0x985F 0x9860 \ - 0x9861 0x9862 0x9863 0x9864 0x9865 0x9866 0x9867 0x9868 \ - 0x9869 0x986A 0x986B 0x986C 0x986D 0x986E 0x7762 0x7765 \ - 0x777F 0x778D 0x777D 0x7780 0x778C 0x7791 0x779F 0x77A0 \ - 0x77B0 0x77B5 0x77BD 0x753A 0x7540 0x754E 0x754B 0x7548 \ - 0x755B 0x7572 0x7579 0x7583 0x7F58 0x7F61 0x7F5F 0x8A48 \ - 0x7F68 0x7F74 0x7F71 0x7F79 0x7F81 0x7F7E 0x76CD 0x76E5 \ - 0x8832 0x9485 0x9486 0x9487 0x948B 0x948A 0x948C 0x948D \ - 0x948F 0x9490 0x9494 0x9497 0x9495 0x949A 0x949B 0x949C \ - 0x94A3 0x94A4 0x94AB 0x94AA 0x94AD 0x94AC 0x94AF 0x94B0 \ - 0x94B2 0x94B4 0x94B6 0x94B7 0x94B8 0x94B9 0x94BA 0x94BC \ - 0x94BD 0x94BF 0x94C4 0x94C8 0x94C9 0x94CA 0x94CB 0x94CC \ - 0x94CD 0x94CE 0x94D0 0x94D1 0x94D2 0x94D5 0x94D6 0x94D7 \ - 0x94D9 0x94D8 0x94DB 0x94DE 0x94DF 0x94E0 0x94E2 0x94E4 \ - 0x94E5 0x94E7 0x94E8 0x94EA 0x986F 0x9870 0x9871 0x9872 \ - 0x9873 0x9874 0x988B 0x988E 0x9892 0x9895 0x9899 0x98A3 \ - 0x98A8 0x98A9 0x98AA 0x98AB 0x98AC 0x98AD 0x98AE 0x98AF \ - 0x98B0 0x98B1 0x98B2 0x98B3 0x98B4 0x98B5 0x98B6 0x98B7 \ - 0x98B8 0x98B9 0x98BA 0x98BB 0x98BC 0x98BD 0x98BE 0x98BF \ - 0x98C0 0x98C1 0x98C2 0x98C3 0x98C4 0x98C5 0x98C6 0x98C7 \ - 0x98C8 0x98C9 0x98CA 0x98CB 0x98CC 0x98CD 0x98CF 0x98D0 \ - 0x98D4 0x98D6 0x98D7 0x98DB 0x98DC 0x98DD 0x98E0 0x98E1 \ - 0x98E2 0x98E3 0x98E4 0x98E5 0x98E6 0x98E9 0x98EA 0x98EB \ - 0x98EC 0x98ED 0x98EE 0x98EF 0x98F0 0x98F1 0x98F2 0x98F3 \ - 0x98F4 0x98F5 0x98F6 0x98F7 0x98F8 0x98F9 0x98FA 0x98FB \ - 0x98FC 0x98FD 0x98FE 0x98FF 0x9900 0x9901 0x9902 0x9903 -83 0x9904 0x9905 0x9906 0x9907 0x94E9 0x94EB 0x94EE 0x94EF \ - 0x94F3 0x94F4 0x94F5 0x94F7 0x94F9 0x94FC 0x94FD 0x94FF \ - 0x9503 0x9502 0x9506 0x9507 0x9509 0x950A 0x950D 0x950E \ - 0x950F 0x9512 0x9513 0x9514 0x9515 0x9516 0x9518 0x951B \ - 0x951D 0x951E 0x951F 0x9522 0x952A 0x952B 0x9529 0x952C \ - 0x9531 0x9532 0x9534 0x9536 0x9537 0x9538 0x953C 0x953E \ - 0x953F 0x9542 0x9535 0x9544 0x9545 0x9546 0x9549 0x954C \ - 0x954E 0x954F 0x9552 0x9553 0x9554 0x9556 0x9557 0x9558 \ - 0x9559 0x955B 0x955E 0x955F 0x955D 0x9561 0x9562 0x9564 \ - 0x9565 0x9566 0x9567 0x9568 0x9569 0x956A 0x956B 0x956C \ - 0x956F 0x9571 0x9572 0x9573 0x953A 0x77E7 0x77EC 0x96C9 \ - 0x79D5 0x79ED 0x79E3 0x79EB 0x7A06 0x5D47 0x7A03 0x7A02 \ - 0x7A1E 0x7A14 0x9908 0x9909 0x990A 0x990B 0x990C 0x990E \ - 0x990F 0x9911 0x9912 0x9913 0x9914 0x9915 0x9916 0x9917 \ - 0x9918 0x9919 0x991A 0x991B 0x991C 0x991D 0x991E 0x991F \ - 0x9920 0x9921 0x9922 0x9923 0x9924 0x9925 0x9926 0x9927 \ - 0x9928 0x9929 0x992A 0x992B 0x992C 0x992D 0x992F 0x9930 \ - 0x9931 0x9932 0x9933 0x9934 0x9935 0x9936 0x9937 0x9938 \ - 0x9939 0x993A 0x993B 0x993C 0x993D 0x993E 0x993F 0x9940 \ - 0x9941 0x9942 0x9943 0x9944 0x9945 0x9946 0x9947 0x9948 \ - 0x9949 0x994A 0x994B 0x994C 0x994D 0x994E 0x994F 0x9950 \ - 0x9951 0x9952 0x9953 0x9956 0x9957 0x9958 0x9959 0x995A \ - 0x995B 0x995C 0x995D 0x995E 0x995F 0x9960 0x9961 0x9962 \ - 0x9964 0x9966 0x9973 0x9978 0x9979 0x997B 0x997E 0x9982 \ - 0x9983 0x9989 0x7A39 0x7A37 0x7A51 0x9ECF 0x99A5 0x7A70 \ - 0x7688 0x768E 0x7693 0x7699 0x76A4 0x74DE 0x74E0 0x752C \ - 0x9E20 0x9E22 0x9E28 0x9E29 0x9E2A 0x9E2B 0x9E2C 0x9E32 \ - 0x9E31 0x9E36 0x9E38 0x9E37 0x9E39 0x9E3A 0x9E3E 0x9E41 \ - 0x9E42 0x9E44 0x9E46 0x9E47 0x9E48 0x9E49 0x9E4B 0x9E4C \ - 0x9E4E 0x9E51 0x9E55 0x9E57 0x9E5A 0x9E5B 0x9E5C 0x9E5E \ - 0x9E63 0x9E66 0x9E67 0x9E68 0x9E69 0x9E6A 0x9E6B 0x9E6C \ - 0x9E71 0x9E6D 0x9E73 0x7592 0x7594 0x7596 0x75A0 0x759D -84 0x75AC 0x75A3 0x75B3 0x75B4 0x75B8 0x75C4 0x75B1 0x75B0 \ - 0x75C3 0x75C2 0x75D6 0x75CD 0x75E3 0x75E8 0x75E6 0x75E4 \ - 0x75EB 0x75E7 0x7603 0x75F1 0x75FC 0x75FF 0x7610 0x7600 \ - 0x7605 0x760C 0x7617 0x760A 0x7625 0x7618 0x7615 0x7619 \ - 0x998C 0x998E 0x999A 0x999B 0x999C 0x999D 0x999E 0x999F \ - 0x99A0 0x99A1 0x99A2 0x99A3 0x99A4 0x99A6 0x99A7 0x99A9 \ - 0x99AA 0x99AB 0x99AC 0x99AD 0x99AE 0x99AF 0x99B0 0x99B1 \ - 0x99B2 0x99B3 0x99B4 0x99B5 0x99B6 0x99B7 0x99B8 0x99B9 \ - 0x99BA 0x99BB 0x99BC 0x99BD 0x99BE 0x99BF 0x99C0 0x99C1 \ - 0x99C2 0x99C3 0x99C4 0x99C5 0x99C6 0x99C7 0x99C8 0x99C9 \ - 0x99CA 0x99CB 0x99CC 0x99CD 0x99CE 0x99CF 0x99D0 0x99D1 \ - 0x99D2 0x99D3 0x99D4 0x99D5 0x99D6 0x99D7 0x99D8 0x99D9 \ - 0x99DA 0x99DB 0x99DC 0x99DD 0x99DE 0x99DF 0x99E0 0x99E1 \ - 0x99E2 0x99E3 0x99E4 0x99E5 0x99E6 0x99E7 0x99E8 0x99E9 \ - 0x99EA 0x99EB 0x99EC 0x99ED 0x99EE 0x99EF 0x99F0 0x99F1 \ - 0x99F2 0x99F3 0x99F4 0x99F5 0x99F6 0x99F7 0x99F8 0x99F9 \ - 0x761B 0x763C 0x7622 0x7620 0x7640 0x762D 0x7630 0x763F \ - 0x7635 0x7643 0x763E 0x7633 0x764D 0x765E 0x7654 0x765C \ - 0x7656 0x766B 0x766F 0x7FCA 0x7AE6 0x7A78 0x7A79 0x7A80 \ - 0x7A86 0x7A88 0x7A95 0x7AA6 0x7AA0 0x7AAC 0x7AA8 0x7AAD \ - 0x7AB3 0x8864 0x8869 0x8872 0x887D 0x887F 0x8882 0x88A2 \ - 0x88C6 0x88B7 0x88BC 0x88C9 0x88E2 0x88CE 0x88E3 0x88E5 \ - 0x88F1 0x891A 0x88FC 0x88E8 0x88FE 0x88F0 0x8921 0x8919 \ - 0x8913 0x891B 0x890A 0x8934 0x892B 0x8936 0x8941 0x8966 \ - 0x897B 0x758B 0x80E5 0x76B2 0x76B4 0x77DC 0x8012 0x8014 \ - 0x8016 0x801C 0x8020 0x8022 0x8025 0x8026 0x8027 0x8029 \ - 0x8028 0x8031 0x800B 0x8035 0x8043 0x8046 0x804D 0x8052 \ - 0x8069 0x8071 0x8983 0x9878 0x9880 0x9883 0x99FA 0x99FB \ - 0x99FC 0x99FD 0x99FE 0x99FF 0x9A00 0x9A01 0x9A02 0x9A03 \ - 0x9A04 0x9A05 0x9A06 0x9A07 0x9A08 0x9A09 0x9A0A 0x9A0B \ - 0x9A0C 0x9A0D 0x9A0E 0x9A0F 0x9A10 0x9A11 0x9A12 0x9A13 \ - 0x9A14 0x9A15 0x9A16 0x9A17 0x9A18 0x9A19 0x9A1A 0x9A1B -85 0x9A1C 0x9A1D 0x9A1E 0x9A1F 0x9A20 0x9A21 0x9A22 0x9A23 \ - 0x9A24 0x9A25 0x9A26 0x9A27 0x9A28 0x9A29 0x9A2A 0x9A2B \ - 0x9A2C 0x9A2D 0x9A2E 0x9A2F 0x9A30 0x9A31 0x9A32 0x9A33 \ - 0x9A34 0x9A35 0x9A36 0x9A37 0x9A38 0x9A39 0x9A3A 0x9A3B \ - 0x9A3C 0x9A3D 0x9A3E 0x9A3F 0x9A40 0x9A41 0x9A42 0x9A43 \ - 0x9A44 0x9A45 0x9A46 0x9A47 0x9A48 0x9A49 0x9A4A 0x9A4B \ - 0x9A4C 0x9A4D 0x9A4E 0x9A4F 0x9A50 0x9A51 0x9A52 0x9A53 \ - 0x9A54 0x9A55 0x9A56 0x9A57 0x9A58 0x9A59 0x9889 0x988C \ - 0x988D 0x988F 0x9894 0x989A 0x989B 0x989E 0x989F 0x98A1 \ - 0x98A2 0x98A5 0x98A6 0x864D 0x8654 0x866C 0x866E 0x867F \ - 0x867A 0x867C 0x867B 0x86A8 0x868D 0x868B 0x86AC 0x869D \ - 0x86A7 0x86A3 0x86AA 0x8693 0x86A9 0x86B6 0x86C4 0x86B5 \ - 0x86CE 0x86B0 0x86BA 0x86B1 0x86AF 0x86C9 0x86CF 0x86B4 \ - 0x86E9 0x86F1 0x86F2 0x86ED 0x86F3 0x86D0 0x8713 0x86DE \ - 0x86F4 0x86DF 0x86D8 0x86D1 0x8703 0x8707 0x86F8 0x8708 \ - 0x870A 0x870D 0x8709 0x8723 0x873B 0x871E 0x8725 0x872E \ - 0x871A 0x873E 0x8748 0x8734 0x8731 0x8729 0x8737 0x873F \ - 0x8782 0x8722 0x877D 0x877E 0x877B 0x8760 0x8770 0x874C \ - 0x876E 0x878B 0x8753 0x8763 0x877C 0x8764 0x8759 0x8765 \ - 0x8793 0x87AF 0x87A8 0x87D2 0x9A5A 0x9A5B 0x9A5C 0x9A5D \ - 0x9A5E 0x9A5F 0x9A60 0x9A61 0x9A62 0x9A63 0x9A64 0x9A65 \ - 0x9A66 0x9A67 0x9A68 0x9A69 0x9A6A 0x9A6B 0x9A72 0x9A83 \ - 0x9A89 0x9A8D 0x9A8E 0x9A94 0x9A95 0x9A99 0x9AA6 0x9AA9 \ - 0x9AAA 0x9AAB 0x9AAC 0x9AAD 0x9AAE 0x9AAF 0x9AB2 0x9AB3 \ - 0x9AB4 0x9AB5 0x9AB9 0x9ABB 0x9ABD 0x9ABE 0x9ABF 0x9AC3 \ - 0x9AC4 0x9AC6 0x9AC7 0x9AC8 0x9AC9 0x9ACA 0x9ACD 0x9ACE \ - 0x9ACF 0x9AD0 0x9AD2 0x9AD4 0x9AD5 0x9AD6 0x9AD7 0x9AD9 \ - 0x9ADA 0x9ADB 0x9ADC 0x9ADD 0x9ADE 0x9AE0 0x9AE2 0x9AE3 \ - 0x9AE4 0x9AE5 0x9AE7 0x9AE8 0x9AE9 0x9AEA 0x9AEC 0x9AEE \ - 0x9AF0 0x9AF1 0x9AF2 0x9AF3 0x9AF4 0x9AF5 0x9AF6 0x9AF7 \ - 0x9AF8 0x9AFA 0x9AFC 0x9AFD 0x9AFE 0x9AFF 0x9B00 0x9B01 \ - 0x9B02 0x9B04 0x9B05 0x9B06 0x87C6 0x8788 0x8785 0x87AD -86 0x8797 0x8783 0x87AB 0x87E5 0x87AC 0x87B5 0x87B3 0x87CB \ - 0x87D3 0x87BD 0x87D1 0x87C0 0x87CA 0x87DB 0x87EA 0x87E0 \ - 0x87EE 0x8816 0x8813 0x87FE 0x880A 0x881B 0x8821 0x8839 \ - 0x883C 0x7F36 0x7F42 0x7F44 0x7F45 0x8210 0x7AFA 0x7AFD \ - 0x7B08 0x7B03 0x7B04 0x7B15 0x7B0A 0x7B2B 0x7B0F 0x7B47 \ - 0x7B38 0x7B2A 0x7B19 0x7B2E 0x7B31 0x7B20 0x7B25 0x7B24 \ - 0x7B33 0x7B3E 0x7B1E 0x7B58 0x7B5A 0x7B45 0x7B75 0x7B4C \ - 0x7B5D 0x7B60 0x7B6E 0x7B7B 0x7B62 0x7B72 0x7B71 0x7B90 \ - 0x7BA6 0x7BA7 0x7BB8 0x7BAC 0x7B9D 0x7BA8 0x7B85 0x7BAA \ - 0x7B9C 0x7BA2 0x7BAB 0x7BB4 0x7BD1 0x7BC1 0x7BCC 0x7BDD \ - 0x7BDA 0x7BE5 0x7BE6 0x7BEA 0x7C0C 0x7BFE 0x7BFC 0x7C0F \ - 0x7C16 0x7C0B 0x9B07 0x9B09 0x9B0A 0x9B0B 0x9B0C 0x9B0D \ - 0x9B0E 0x9B10 0x9B11 0x9B12 0x9B14 0x9B15 0x9B16 0x9B17 \ - 0x9B18 0x9B19 0x9B1A 0x9B1B 0x9B1C 0x9B1D 0x9B1E 0x9B20 \ - 0x9B21 0x9B22 0x9B24 0x9B25 0x9B26 0x9B27 0x9B28 0x9B29 \ - 0x9B2A 0x9B2B 0x9B2C 0x9B2D 0x9B2E 0x9B30 0x9B31 0x9B33 \ - 0x9B34 0x9B35 0x9B36 0x9B37 0x9B38 0x9B39 0x9B3A 0x9B3D \ - 0x9B3E 0x9B3F 0x9B40 0x9B46 0x9B4A 0x9B4B 0x9B4C 0x9B4E \ - 0x9B50 0x9B52 0x9B53 0x9B55 0x9B56 0x9B57 0x9B58 0x9B59 \ - 0x9B5A 0x9B5B 0x9B5C 0x9B5D 0x9B5E 0x9B5F 0x9B60 0x9B61 \ - 0x9B62 0x9B63 0x9B64 0x9B65 0x9B66 0x9B67 0x9B68 0x9B69 \ - 0x9B6A 0x9B6B 0x9B6C 0x9B6D 0x9B6E 0x9B6F 0x9B70 0x9B71 \ - 0x9B72 0x9B73 0x9B74 0x9B75 0x9B76 0x9B77 0x9B78 0x9B79 \ - 0x9B7A 0x9B7B 0x7C1F 0x7C2A 0x7C26 0x7C38 0x7C41 0x7C40 \ - 0x81FE 0x8201 0x8202 0x8204 0x81EC 0x8844 0x8221 0x8222 \ - 0x8223 0x822D 0x822F 0x8228 0x822B 0x8238 0x823B 0x8233 \ - 0x8234 0x823E 0x8244 0x8249 0x824B 0x824F 0x825A 0x825F \ - 0x8268 0x887E 0x8885 0x8888 0x88D8 0x88DF 0x895E 0x7F9D \ - 0x7F9F 0x7FA7 0x7FAF 0x7FB0 0x7FB2 0x7C7C 0x6549 0x7C91 \ - 0x7C9D 0x7C9C 0x7C9E 0x7CA2 0x7CB2 0x7CBC 0x7CBD 0x7CC1 \ - 0x7CC7 0x7CCC 0x7CCD 0x7CC8 0x7CC5 0x7CD7 0x7CE8 0x826E \ - 0x66A8 0x7FBF 0x7FCE 0x7FD5 0x7FE5 0x7FE1 0x7FE6 0x7FE9 -87 0x7FEE 0x7FF3 0x7CF8 0x7D77 0x7DA6 0x7DAE 0x7E47 0x7E9B \ - 0x9EB8 0x9EB4 0x8D73 0x8D84 0x8D94 0x8D91 0x8DB1 0x8D67 \ - 0x8D6D 0x8C47 0x8C49 0x914A 0x9150 0x914E 0x914F 0x9164 \ - 0x9B7C 0x9B7D 0x9B7E 0x9B7F 0x9B80 0x9B81 0x9B82 0x9B83 \ - 0x9B84 0x9B85 0x9B86 0x9B87 0x9B88 0x9B89 0x9B8A 0x9B8B \ - 0x9B8C 0x9B8D 0x9B8E 0x9B8F 0x9B90 0x9B91 0x9B92 0x9B93 \ - 0x9B94 0x9B95 0x9B96 0x9B97 0x9B98 0x9B99 0x9B9A 0x9B9B \ - 0x9B9C 0x9B9D 0x9B9E 0x9B9F 0x9BA0 0x9BA1 0x9BA2 0x9BA3 \ - 0x9BA4 0x9BA5 0x9BA6 0x9BA7 0x9BA8 0x9BA9 0x9BAA 0x9BAB \ - 0x9BAC 0x9BAD 0x9BAE 0x9BAF 0x9BB0 0x9BB1 0x9BB2 0x9BB3 \ - 0x9BB4 0x9BB5 0x9BB6 0x9BB7 0x9BB8 0x9BB9 0x9BBA 0x9BBB \ - 0x9BBC 0x9BBD 0x9BBE 0x9BBF 0x9BC0 0x9BC1 0x9BC2 0x9BC3 \ - 0x9BC4 0x9BC5 0x9BC6 0x9BC7 0x9BC8 0x9BC9 0x9BCA 0x9BCB \ - 0x9BCC 0x9BCD 0x9BCE 0x9BCF 0x9BD0 0x9BD1 0x9BD2 0x9BD3 \ - 0x9BD4 0x9BD5 0x9BD6 0x9BD7 0x9BD8 0x9BD9 0x9BDA 0x9BDB \ - 0x9162 0x9161 0x9170 0x9169 0x916F 0x917D 0x917E 0x9172 \ - 0x9174 0x9179 0x918C 0x9185 0x9190 0x918D 0x9191 0x91A2 \ - 0x91A3 0x91AA 0x91AD 0x91AE 0x91AF 0x91B5 0x91B4 0x91BA \ - 0x8C55 0x9E7E 0x8DB8 0x8DEB 0x8E05 0x8E59 0x8E69 0x8DB5 \ - 0x8DBF 0x8DBC 0x8DBA 0x8DC4 0x8DD6 0x8DD7 0x8DDA 0x8DDE \ - 0x8DCE 0x8DCF 0x8DDB 0x8DC6 0x8DEC 0x8DF7 0x8DF8 0x8DE3 \ - 0x8DF9 0x8DFB 0x8DE4 0x8E09 0x8DFD 0x8E14 0x8E1D 0x8E1F \ - 0x8E2C 0x8E2E 0x8E23 0x8E2F 0x8E3A 0x8E40 0x8E39 0x8E35 \ - 0x8E3D 0x8E31 0x8E49 0x8E41 0x8E42 0x8E51 0x8E52 0x8E4A \ - 0x8E70 0x8E76 0x8E7C 0x8E6F 0x8E74 0x8E85 0x8E8F 0x8E94 \ - 0x8E90 0x8E9C 0x8E9E 0x8C78 0x8C82 0x8C8A 0x8C85 0x8C98 \ - 0x8C94 0x659B 0x89D6 0x89DE 0x89DA 0x89DC 0x9BDC 0x9BDD \ - 0x9BDE 0x9BDF 0x9BE0 0x9BE1 0x9BE2 0x9BE3 0x9BE4 0x9BE5 \ - 0x9BE6 0x9BE7 0x9BE8 0x9BE9 0x9BEA 0x9BEB 0x9BEC 0x9BED \ - 0x9BEE 0x9BEF 0x9BF0 0x9BF1 0x9BF2 0x9BF3 0x9BF4 0x9BF5 \ - 0x9BF6 0x9BF7 0x9BF8 0x9BF9 0x9BFA 0x9BFB 0x9BFC 0x9BFD \ - 0x9BFE 0x9BFF 0x9C00 0x9C01 0x9C02 0x9C03 0x9C04 0x9C05 -88 0x9C06 0x9C07 0x9C08 0x9C09 0x9C0A 0x9C0B 0x9C0C 0x9C0D \ - 0x9C0E 0x9C0F 0x9C10 0x9C11 0x9C12 0x9C13 0x9C14 0x9C15 \ - 0x9C16 0x9C17 0x9C18 0x9C19 0x9C1A 0x9C1B 0x9C1C 0x9C1D \ - 0x9C1E 0x9C1F 0x9C20 0x9C21 0x9C22 0x9C23 0x9C24 0x9C25 \ - 0x9C26 0x9C27 0x9C28 0x9C29 0x9C2A 0x9C2B 0x9C2C 0x9C2D \ - 0x9C2E 0x9C2F 0x9C30 0x9C31 0x9C32 0x9C33 0x9C34 0x9C35 \ - 0x9C36 0x9C37 0x9C38 0x9C39 0x9C3A 0x9C3B 0x89E5 0x89EB \ - 0x89EF 0x8A3E 0x8B26 0x9753 0x96E9 0x96F3 0x96EF 0x9706 \ - 0x9701 0x9708 0x970F 0x970E 0x972A 0x972D 0x9730 0x973E \ - 0x9F80 0x9F83 0x9F85 0x9F86 0x9F87 0x9F88 0x9F89 0x9F8A \ - 0x9F8C 0x9EFE 0x9F0B 0x9F0D 0x96B9 0x96BC 0x96BD 0x96CE \ - 0x96D2 0x77BF 0x96E0 0x928E 0x92AE 0x92C8 0x933E 0x936A \ - 0x93CA 0x938F 0x943E 0x946B 0x9C7F 0x9C82 0x9C85 0x9C86 \ - 0x9C87 0x9C88 0x7A23 0x9C8B 0x9C8E 0x9C90 0x9C91 0x9C92 \ - 0x9C94 0x9C95 0x9C9A 0x9C9B 0x9C9E 0x9C9F 0x9CA0 0x9CA1 \ - 0x9CA2 0x9CA3 0x9CA5 0x9CA6 0x9CA7 0x9CA8 0x9CA9 0x9CAB \ - 0x9CAD 0x9CAE 0x9CB0 0x9CB1 0x9CB2 0x9CB3 0x9CB4 0x9CB5 \ - 0x9CB6 0x9CB7 0x9CBA 0x9CBB 0x9CBC 0x9CBD 0x9CC4 0x9CC5 \ - 0x9CC6 0x9CC7 0x9CCA 0x9CCB 0x9C3C 0x9C3D 0x9C3E 0x9C3F \ - 0x9C40 0x9C41 0x9C42 0x9C43 0x9C44 0x9C45 0x9C46 0x9C47 \ - 0x9C48 0x9C49 0x9C4A 0x9C4B 0x9C4C 0x9C4D 0x9C4E 0x9C4F \ - 0x9C50 0x9C51 0x9C52 0x9C53 0x9C54 0x9C55 0x9C56 0x9C57 \ - 0x9C58 0x9C59 0x9C5A 0x9C5B 0x9C5C 0x9C5D 0x9C5E 0x9C5F \ - 0x9C60 0x9C61 0x9C62 0x9C63 0x9C64 0x9C65 0x9C66 0x9C67 \ - 0x9C68 0x9C69 0x9C6A 0x9C6B 0x9C6C 0x9C6D 0x9C6E 0x9C6F \ - 0x9C70 0x9C71 0x9C72 0x9C73 0x9C74 0x9C75 0x9C76 0x9C77 \ - 0x9C78 0x9C79 0x9C7A 0x9C7B 0x9C7D 0x9C7E 0x9C80 0x9C83 \ - 0x9C84 0x9C89 0x9C8A 0x9C8C 0x9C8F 0x9C93 0x9C96 0x9C97 \ - 0x9C98 0x9C99 0x9C9D 0x9CAA 0x9CAC 0x9CAF 0x9CB9 0x9CBE \ - 0x9CBF 0x9CC0 0x9CC1 0x9CC2 0x9CC8 0x9CC9 0x9CD1 0x9CD2 \ - 0x9CDA 0x9CDB 0x9CE0 0x9CE1 0x9CCC 0x9CCD 0x9CCE 0x9CCF \ - 0x9CD0 0x9CD3 0x9CD4 0x9CD5 0x9CD7 0x9CD8 0x9CD9 0x9CDC -89 0x9CDD 0x9CDF 0x9CE2 0x977C 0x9785 0x9791 0x9792 0x9794 \ - 0x97AF 0x97AB 0x97A3 0x97B2 0x97B4 0x9AB1 0x9AB0 0x9AB7 \ - 0x9E58 0x9AB6 0x9ABA 0x9ABC 0x9AC1 0x9AC0 0x9AC5 0x9AC2 \ - 0x9ACB 0x9ACC 0x9AD1 0x9B45 0x9B43 0x9B47 0x9B49 0x9B48 \ - 0x9B4D 0x9B51 0x98E8 0x990D 0x992E 0x9955 0x9954 0x9ADF \ - 0x9AE1 0x9AE6 0x9AEF 0x9AEB 0x9AFB 0x9AED 0x9AF9 0x9B08 \ - 0x9B0F 0x9B13 0x9B1F 0x9B23 0x9EBD 0x9EBE 0x7E3B 0x9E82 \ - 0x9E87 0x9E88 0x9E8B 0x9E92 0x93D6 0x9E9D 0x9E9F 0x9EDB \ - 0x9EDC 0x9EDD 0x9EE0 0x9EDF 0x9EE2 0x9EE9 0x9EE7 0x9EE5 \ - 0x9EEA 0x9EEF 0x9F22 0x9F2C 0x9F2F 0x9F39 0x9F37 0x9F3D \ - 0x9F3E 0x9F44 0x9CE3 0x9CE4 0x9CE5 0x9CE6 0x9CE7 0x9CE8 \ - 0x9CE9 0x9CEA 0x9CEB 0x9CEC 0x9CED 0x9CEE 0x9CEF 0x9CF0 \ - 0x9CF1 0x9CF2 0x9CF3 0x9CF4 0x9CF5 0x9CF6 0x9CF7 0x9CF8 \ - 0x9CF9 0x9CFA 0x9CFB 0x9CFC 0x9CFD 0x9CFE 0x9CFF 0x9D00 \ - 0x9D01 0x9D02 0x9D03 0x9D04 0x9D05 0x9D06 0x9D07 0x9D08 \ - 0x9D09 0x9D0A 0x9D0B 0x9D0C 0x9D0D 0x9D0E 0x9D0F 0x9D10 \ - 0x9D11 0x9D12 0x9D13 0x9D14 0x9D15 0x9D16 0x9D17 0x9D18 \ - 0x9D19 0x9D1A 0x9D1B 0x9D1C 0x9D1D 0x9D1E 0x9D1F 0x9D20 \ - 0x9D21 0x9D22 0x9D23 0x9D24 0x9D25 0x9D26 0x9D27 0x9D28 \ - 0x9D29 0x9D2A 0x9D2B 0x9D2C 0x9D2D 0x9D2E 0x9D2F 0x9D30 \ - 0x9D31 0x9D32 0x9D33 0x9D34 0x9D35 0x9D36 0x9D37 0x9D38 \ - 0x9D39 0x9D3A 0x9D3B 0x9D3C 0x9D3D 0x9D3E 0x9D3F 0x9D40 \ - 0x9D41 0x9D42 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -90 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x9D43 0x9D44 0x9D45 0x9D46 0x9D47 0x9D48 0x9D49 0x9D4A \ - 0x9D4B 0x9D4C 0x9D4D 0x9D4E 0x9D4F 0x9D50 0x9D51 0x9D52 \ - 0x9D53 0x9D54 0x9D55 0x9D56 0x9D57 0x9D58 0x9D59 0x9D5A \ - 0x9D5B 0x9D5C 0x9D5D 0x9D5E 0x9D5F 0x9D60 0x9D61 0x9D62 \ - 0x9D63 0x9D64 0x9D65 0x9D66 0x9D67 0x9D68 0x9D69 0x9D6A \ - 0x9D6B 0x9D6C 0x9D6D 0x9D6E 0x9D6F 0x9D70 0x9D71 0x9D72 \ - 0x9D73 0x9D74 0x9D75 0x9D76 0x9D77 0x9D78 0x9D79 0x9D7A \ - 0x9D7B 0x9D7C 0x9D7D 0x9D7E 0x9D7F 0x9D80 0x9D81 0x9D82 \ - 0x9D83 0x9D84 0x9D85 0x9D86 0x9D87 0x9D88 0x9D89 0x9D8A \ - 0x9D8B 0x9D8C 0x9D8D 0x9D8E 0x9D8F 0x9D90 0x9D91 0x9D92 \ - 0x9D93 0x9D94 0x9D95 0x9D96 0x9D97 0x9D98 0x9D99 0x9D9A \ - 0x9D9B 0x9D9C 0x9D9D 0x9D9E 0x9D9F 0x9DA0 0x9DA1 0x9DA2 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x9DA3 0x9DA4 \ - 0x9DA5 0x9DA6 0x9DA7 0x9DA8 0x9DA9 0x9DAA 0x9DAB 0x9DAC \ - 0x9DAD 0x9DAE 0x9DAF 0x9DB0 0x9DB1 0x9DB2 0x9DB3 0x9DB4 \ - 0x9DB5 0x9DB6 0x9DB7 0x9DB8 0x9DB9 0x9DBA 0x9DBB 0x9DBC \ - 0x9DBD 0x9DBE 0x9DBF 0x9DC0 0x9DC1 0x9DC2 0x9DC3 0x9DC4 \ - 0x9DC5 0x9DC6 0x9DC7 0x9DC8 0x9DC9 0x9DCA 0x9DCB 0x9DCC \ - 0x9DCD 0x9DCE 0x9DCF 0x9DD0 0x9DD1 0x9DD2 0x9DD3 0x9DD4 -91 0x9DD5 0x9DD6 0x9DD7 0x9DD8 0x9DD9 0x9DDA 0x9DDB 0x9DDC \ - 0x9DDD 0x9DDE 0x9DDF 0x9DE0 0x9DE1 0x9DE2 0x9DE3 0x9DE4 \ - 0x9DE5 0x9DE6 0x9DE7 0x9DE8 0x9DE9 0x9DEA 0x9DEB 0x9DEC \ - 0x9DED 0x9DEE 0x9DEF 0x9DF0 0x9DF1 0x9DF2 0x9DF3 0x9DF4 \ - 0x9DF5 0x9DF6 0x9DF7 0x9DF8 0x9DF9 0x9DFA 0x9DFB 0x9DFC \ - 0x9DFD 0x9DFE 0x9DFF 0x9E00 0x9E01 0x9E02 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x9E03 0x9E04 0x9E05 0x9E06 \ - 0x9E07 0x9E08 0x9E09 0x9E0A 0x9E0B 0x9E0C 0x9E0D 0x9E0E \ - 0x9E0F 0x9E10 0x9E11 0x9E12 0x9E13 0x9E14 0x9E15 0x9E16 \ - 0x9E17 0x9E18 0x9E19 0x9E1A 0x9E1B 0x9E1C 0x9E1D 0x9E1E \ - 0x9E24 0x9E27 0x9E2E 0x9E30 0x9E34 0x9E3B 0x9E3C 0x9E40 \ - 0x9E4D 0x9E50 0x9E52 0x9E53 0x9E54 0x9E56 0x9E59 0x9E5D \ - 0x9E5F 0x9E60 0x9E61 0x9E62 0x9E65 0x9E6E 0x9E6F 0x9E72 \ - 0x9E74 0x9E75 0x9E76 0x9E77 0x9E78 0x9E79 0x9E7A 0x9E7B \ - 0x9E7C 0x9E7D 0x9E80 0x9E81 0x9E83 0x9E84 0x9E85 0x9E86 \ - 0x9E89 0x9E8A 0x9E8C 0x9E8D 0x9E8E 0x9E8F 0x9E90 0x9E91 \ - 0x9E94 0x9E95 0x9E96 0x9E97 0x9E98 0x9E99 0x9E9A 0x9E9B \ - 0x9E9C 0x9E9E 0x9EA0 0x9EA1 0x9EA2 0x9EA3 0x9EA4 0x9EA5 \ - 0x9EA7 0x9EA8 0x9EA9 0x9EAA 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -92 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x9EAB 0x9EAC 0x9EAD 0x9EAE 0x9EAF 0x9EB0 \ - 0x9EB1 0x9EB2 0x9EB3 0x9EB5 0x9EB6 0x9EB7 0x9EB9 0x9EBA \ - 0x9EBC 0x9EBF 0x9EC0 0x9EC1 0x9EC2 0x9EC3 0x9EC5 0x9EC6 \ - 0x9EC7 0x9EC8 0x9ECA 0x9ECB 0x9ECC 0x9ED0 0x9ED2 0x9ED3 \ - 0x9ED5 0x9ED6 0x9ED7 0x9ED9 0x9EDA 0x9EDE 0x9EE1 0x9EE3 \ - 0x9EE4 0x9EE6 0x9EE8 0x9EEB 0x9EEC 0x9EED 0x9EEE 0x9EF0 \ - 0x9EF1 0x9EF2 0x9EF3 0x9EF4 0x9EF5 0x9EF6 0x9EF7 0x9EF8 \ - 0x9EFA 0x9EFD 0x9EFF 0x9F00 0x9F01 0x9F02 0x9F03 0x9F04 \ - 0x9F05 0x9F06 0x9F07 0x9F08 0x9F09 0x9F0A 0x9F0C 0x9F0F \ - 0x9F11 0x9F12 0x9F14 0x9F15 0x9F16 0x9F18 0x9F1A 0x9F1B \ - 0x9F1C 0x9F1D 0x9F1E 0x9F1F 0x9F21 0x9F23 0x9F24 0x9F25 \ - 0x9F26 0x9F27 0x9F28 0x9F29 0x9F2A 0x9F2B 0x9F2D 0x9F2E \ - 0x9F30 0x9F31 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -93 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x9F32 0x9F33 0x9F34 0x9F35 0x9F36 0x9F38 0x9F3A 0x9F3C \ - 0x9F3F 0x9F40 0x9F41 0x9F42 0x9F43 0x9F45 0x9F46 0x9F47 \ - 0x9F48 0x9F49 0x9F4A 0x9F4B 0x9F4C 0x9F4D 0x9F4E 0x9F4F \ - 0x9F52 0x9F53 0x9F54 0x9F55 0x9F56 0x9F57 0x9F58 0x9F59 \ - 0x9F5A 0x9F5B 0x9F5C 0x9F5D 0x9F5E 0x9F5F 0x9F60 0x9F61 \ - 0x9F62 0x9F63 0x9F64 0x9F65 0x9F66 0x9F67 0x9F68 0x9F69 \ - 0x9F6A 0x9F6B 0x9F6C 0x9F6D 0x9F6E 0x9F6F 0x9F70 0x9F71 \ - 0x9F72 0x9F73 0x9F74 0x9F75 0x9F76 0x9F77 0x9F78 0x9F79 \ - 0x9F7A 0x9F7B 0x9F7C 0x9F7D 0x9F7E 0x9F81 0x9F82 0x9F8D \ - 0x9F8E 0x9F8F 0x9F90 0x9F91 0x9F92 0x9F93 0x9F94 0x9F95 \ - 0x9F96 0x9F97 0x9F98 0x9F9C 0x9F9D 0x9F9E 0x9FA1 0x9FA2 \ - 0x9FA3 0x9FA4 0x9FA5 0xF92C 0xF979 0xF995 0xF9E7 0xF9F1 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFA0C 0xFA0D \ - 0xFA0E 0xFA0F 0xFA11 0xFA13 0xFA14 0xFA18 0xFA1F 0xFA20 \ - 0xFA21 0xFA23 0xFA24 0xFA27 0xFA28 0xFA29 0xE815 0xE816 \ - 0xE817 0xE818 0xE819 0xE81A 0xE81B 0xE81C 0xE81D 0xE81E \ - 0xE81F 0xE820 0xE821 0xE822 0xE823 0xE824 0xE825 0xE826 \ - 0xE827 0xE828 0xE829 0xE82A 0xE82B 0xE82C 0xE82D 0xE82E \ - 0xE82F 0xE830 0xE831 0xE832 0xE833 0xE834 0xE835 0xE836 \ - 0xE837 0xE838 0xE839 0xE83A 0xE83B 0xE83C 0xE83D 0xE83E -94 0xE83F 0xE840 0xE841 0xE842 0xE843 0xE844 0xE845 0xE846 \ - 0xE847 0xE848 0xE849 0xE84A 0xE84B 0xE84C 0xE84D 0xE84E \ - 0xE84F 0xE850 0xE851 0xE852 0xE853 0xE854 0xE855 0xE856 \ - 0xE857 0xE858 0xE859 0xE85A 0xE85B 0xE85C 0xE85D 0xE85E \ - 0xE85F 0xE860 0xE861 0xE862 0xE863 0xE864 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UJIS.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UJIS.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UJIS.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UJIS.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UJIS.sfd Wed Mar 16 20:59:34 2005 @@ -1,1114 +0,0 @@ -# UJIS.sfd -# -# subfont numbers for JIS X 0208 encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x3000 0x3001 0x3002 0xFF0C 0xFF0E 0x30FB 0xFF1A 0xFF1B \ - 0xFF1F 0xFF01 0x309B 0x309C 0x00B4 0xFF40 0x00A8 0xFF3E \ - 0xFFE3 0xFF3F 0x30FD 0x30FE 0x309D 0x309E 0x3003 0x4EDD \ - 0x3005 0x3006 0x3007 0x30FC 0x2015 0x2010 0xFF0F 0x005C \ - 0x301C 0x2016 0xFF5C 0x2026 0x2025 0x2018 0x2019 0x201C \ - 0x201D 0xFF08 0xFF09 0x3014 0x3015 0xFF3B 0xFF3D 0xFF5B \ - 0xFF5D 0x3008 0x3009 0x300A 0x300B 0x300C 0x300D 0x300E \ - 0x300F 0x3010 0x3011 0xFF0B 0x2212 0x00B1 0x00D7 0x00F7 \ - 0xFF1D 0x2260 0xFF1C 0xFF1E 0x2266 0x2267 0x221E 0x2234 \ - 0x2642 0x2640 0x00B0 0x2032 0x2033 0x2103 0xFFE5 0xFF04 \ - 0x00A2 0x00A3 0xFF05 0xFF03 0xFF06 0xFF0A 0xFF20 0x00A7 \ - 0x2606 0x2605 0x25CB 0x25CF 0x25CE 0x25C7 0x25C6 0x25A1 \ - 0x25A0 0x25B3 0x25B2 0x25BD 0x25BC 0x203B 0x3012 0x2192 \ - 0x2190 0x2191 0x2193 0x3013 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2208 \ - 0x220B 0x2286 0x2287 0x2282 0x2283 0x222A 0x2229 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2227 \ - 0x2228 0x00AC 0x21D2 0x21D4 0x2200 0x2203 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0x2220 0x22A5 0x2312 0x2202 0x2207 0x2261 0x2252 \ - 0x226A 0x226B 0x221A 0x223D 0x221D 0x2235 0x222B 0x222C \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x212B \ - 0x2030 0x266F 0x266D 0x266A 0x2020 0x2021 0x00B6 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0x25EF 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFF10 0xFF11 0xFF12 0xFF13 0xFF14 \ - 0xFF15 0xFF16 0xFF17 0xFF18 0xFF19 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFF21 0xFF22 0xFF23 0xFF24 \ - 0xFF25 0xFF26 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C \ - 0xFF2D 0xFF2E 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 \ - 0xFF35 0xFF36 0xFF37 0xFF38 0xFF39 0xFF3A 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFF41 0xFF42 0xFF43 0xFF44 -02 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A 0xFF4B 0xFF4C \ - 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 0xFF53 0xFF54 \ - 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x3041 0x3042 0x3043 0x3044 0x3045 0x3046 \ - 0x3047 0x3048 0x3049 0x304A 0x304B 0x304C 0x304D 0x304E \ - 0x304F 0x3050 0x3051 0x3052 0x3053 0x3054 0x3055 0x3056 \ - 0x3057 0x3058 0x3059 0x305A 0x305B 0x305C 0x305D 0x305E \ - 0x305F 0x3060 0x3061 0x3062 0x3063 0x3064 0x3065 0x3066 \ - 0x3067 0x3068 0x3069 0x306A 0x306B 0x306C 0x306D 0x306E \ - 0x306F 0x3070 0x3071 0x3072 0x3073 0x3074 0x3075 0x3076 \ - 0x3077 0x3078 0x3079 0x307A 0x307B 0x307C 0x307D 0x307E \ - 0x307F 0x3080 0x3081 0x3082 0x3083 0x3084 0x3085 0x3086 \ - 0x3087 0x3088 0x3089 0x308A 0x308B 0x308C 0x308D 0x308E \ - 0x308F 0x3090 0x3091 0x3092 0x3093 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x30A1 0x30A2 0x30A3 0x30A4 0x30A5 0x30A6 0x30A7 0x30A8 \ - 0x30A9 0x30AA 0x30AB 0x30AC 0x30AD 0x30AE 0x30AF 0x30B0 \ - 0x30B1 0x30B2 0x30B3 0x30B4 0x30B5 0x30B6 0x30B7 0x30B8 \ - 0x30B9 0x30BA 0x30BB 0x30BC 0x30BD 0x30BE 0x30BF 0x30C0 \ - 0x30C1 0x30C2 0x30C3 0x30C4 0x30C5 0x30C6 0x30C7 0x30C8 \ - 0x30C9 0x30CA 0x30CB 0x30CC 0x30CD 0x30CE 0x30CF 0x30D0 \ - 0x30D1 0x30D2 0x30D3 0x30D4 0x30D5 0x30D6 0x30D7 0x30D8 \ - 0x30D9 0x30DA 0x30DB 0x30DC 0x30DD 0x30DE 0x30DF 0x30E0 \ - 0x30E1 0x30E2 0x30E3 0x30E4 0x30E5 0x30E6 0x30E7 0x30E8 \ - 0x30E9 0x30EA 0x30EB 0x30EC 0x30ED 0x30EE 0x30EF 0x30F0 \ - 0x30F1 0x30F2 0x30F3 0x30F4 0x30F5 0x30F6 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0391 0x0392 \ - 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 0x0399 0x039A \ - 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 0x03A1 0x03A3 \ - 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x03B1 0x03B2 \ - 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 0x03B9 0x03BA -03 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 0x03C1 0x03C3 \ - 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0410 0x0411 0x0412 0x0413 \ - 0x0414 0x0415 0x0401 0x0416 0x0417 0x0418 0x0419 0x041A \ - 0x041B 0x041C 0x041D 0x041E 0x041F 0x0420 0x0421 0x0422 \ - 0x0423 0x0424 0x0425 0x0426 0x0427 0x0428 0x0429 0x042A \ - 0x042B 0x042C 0x042D 0x042E 0x042F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x0430 0x0431 0x0432 0x0433 \ - 0x0434 0x0435 0x0451 0x0436 0x0437 0x0438 0x0439 0x043A \ - 0x043B 0x043C 0x043D 0x043E 0x043F 0x0440 0x0441 0x0442 \ - 0x0443 0x0444 0x0445 0x0446 0x0447 0x0448 0x0449 0x044A \ - 0x044B 0x044C 0x044D 0x044E 0x044F 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x2500 0x2502 0x250C 0x2510 0x2518 0x2514 \ - 0x251C 0x252C 0x2524 0x2534 0x253C 0x2501 0x2503 0x250F \ - 0x2513 0x251B 0x2517 0x2523 0x2533 0x252B 0x253B 0x254B \ - 0x2520 0x252F 0x2528 0x2537 0x253F 0x251D 0x2530 0x2525 \ - 0x2538 0x2542 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -04 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -05 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -06 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x4E9C 0x5516 0x5A03 0x963F 0x54C0 0x611B \ - 0x6328 0x59F6 0x9022 0x8475 0x831C 0x7A50 0x60AA 0x63E1 \ - 0x6E25 0x65ED 0x8466 0x82A6 0x9BF5 0x6893 0x5727 0x65A1 \ - 0x6271 0x5B9B 0x59D0 0x867B 0x98F4 0x7D62 0x7DBE 0x9B8E \ - 0x6216 0x7C9F 0x88B7 0x5B89 0x5EB5 0x6309 0x6697 0x6848 \ - 0x95C7 0x978D 0x674F 0x4EE5 0x4F0A 0x4F4D 0x4F9D 0x5049 \ - 0x56F2 0x5937 0x59D4 0x5A01 0x5C09 0x60DF 0x610F 0x6170 \ - 0x6613 0x6905 0x70BA 0x754F 0x7570 0x79FB 0x7DAD 0x7DEF \ - 0x80C3 0x840E 0x8863 0x8B02 0x9055 0x907A 0x533B 0x4E95 \ - 0x4EA5 0x57DF 0x80B2 0x90C1 0x78EF 0x4E00 0x58F1 0x6EA2 \ - 0x9038 0x7A32 0x8328 0x828B 0x9C2F 0x5141 0x5370 0x54BD \ - 0x54E1 0x56E0 0x59FB 0x5F15 0x98F2 0x6DEB 0x80E4 0x852D \ - 0x9662 0x9670 0x96A0 0x97FB 0x540B 0x53F3 0x5B87 0x70CF \ - 0x7FBD 0x8FC2 0x96E8 0x536F 0x9D5C 0x7ABA 0x4E11 0x7893 \ - 0x81FC 0x6E26 0x5618 0x5504 0x6B1D 0x851A 0x9C3B 0x59E5 \ - 0x53A9 0x6D66 0x74DC 0x958F 0x5642 0x4E91 0x904B 0x96F2 -07 0x834F 0x990C 0x53E1 0x55B6 0x5B30 0x5F71 0x6620 0x66F3 \ - 0x6804 0x6C38 0x6CF3 0x6D29 0x745B 0x76C8 0x7A4E 0x9834 \ - 0x82F1 0x885B 0x8A60 0x92ED 0x6DB2 0x75AB 0x76CA 0x99C5 \ - 0x60A6 0x8B01 0x8D8A 0x95B2 0x698E 0x53AD 0x5186 0x5712 \ - 0x5830 0x5944 0x5BB4 0x5EF6 0x6028 0x63A9 0x63F4 0x6CBF \ - 0x6F14 0x708E 0x7114 0x7159 0x71D5 0x733F 0x7E01 0x8276 \ - 0x82D1 0x8597 0x9060 0x925B 0x9D1B 0x5869 0x65BC 0x6C5A \ - 0x7525 0x51F9 0x592E 0x5965 0x5F80 0x5FDC 0x62BC 0x65FA \ - 0x6A2A 0x6B27 0x6BB4 0x738B 0x7FC1 0x8956 0x9D2C 0x9D0E \ - 0x9EC4 0x5CA1 0x6C96 0x837B 0x5104 0x5C4B 0x61B6 0x81C6 \ - 0x6876 0x7261 0x4E59 0x4FFA 0x5378 0x6069 0x6E29 0x7A4F \ - 0x97F3 0x4E0B 0x5316 0x4EEE 0x4F55 0x4F3D 0x4FA1 0x4F73 \ - 0x52A0 0x53EF 0x5609 0x590F 0x5AC1 0x5BB6 0x5BE1 0x79D1 \ - 0x6687 0x679C 0x67B6 0x6B4C 0x6CB3 0x706B 0x73C2 0x798D \ - 0x79BE 0x7A3C 0x7B87 0x82B1 0x82DB 0x8304 0x8377 0x83EF \ - 0x83D3 0x8766 0x8AB2 0x5629 0x8CA8 0x8FE6 0x904E 0x971E \ - 0x868A 0x4FC4 0x5CE8 0x6211 0x7259 0x753B 0x81E5 0x82BD \ - 0x86FE 0x8CC0 0x96C5 0x9913 0x99D5 0x4ECB 0x4F1A 0x89E3 \ - 0x56DE 0x584A 0x58CA 0x5EFB 0x5FEB 0x602A 0x6094 0x6062 \ - 0x61D0 0x6212 0x62D0 0x6539 0x9B41 0x6666 0x68B0 0x6D77 \ - 0x7070 0x754C 0x7686 0x7D75 0x82A5 0x87F9 0x958B 0x968E \ - 0x8C9D 0x51F1 0x52BE 0x5916 0x54B3 0x5BB3 0x5D16 0x6168 \ - 0x6982 0x6DAF 0x788D 0x84CB 0x8857 0x8A72 0x93A7 0x9AB8 \ - 0x6D6C 0x99A8 0x86D9 0x57A3 0x67FF 0x86CE 0x920E 0x5283 \ - 0x5687 0x5404 0x5ED3 0x62E1 0x64B9 0x683C 0x6838 0x6BBB \ - 0x7372 0x78BA 0x7A6B 0x899A 0x89D2 0x8D6B 0x8F03 0x90ED \ - 0x95A3 0x9694 0x9769 0x5B66 0x5CB3 0x697D 0x984D 0x984E \ - 0x639B 0x7B20 0x6A2B 0x6A7F 0x68B6 0x9C0D 0x6F5F 0x5272 \ - 0x559D 0x6070 0x62EC 0x6D3B 0x6E07 0x6ED1 0x845B 0x8910 \ - 0x8F44 0x4E14 0x9C39 0x53F6 0x691B 0x6A3A 0x9784 0x682A \ - 0x515C 0x7AC3 0x84B2 0x91DC 0x938C 0x565B 0x9D28 0x6822 \ - 0x8305 0x8431 0x7CA5 0x5208 0x82C5 0x74E6 0x4E7E 0x4F83 -08 0x51A0 0x5BD2 0x520A 0x52D8 0x52E7 0x5DFB 0x559A 0x582A \ - 0x59E6 0x5B8C 0x5B98 0x5BDB 0x5E72 0x5E79 0x60A3 0x611F \ - 0x6163 0x61BE 0x63DB 0x6562 0x67D1 0x6853 0x68FA 0x6B3E \ - 0x6B53 0x6C57 0x6F22 0x6F97 0x6F45 0x74B0 0x7518 0x76E3 \ - 0x770B 0x7AFF 0x7BA1 0x7C21 0x7DE9 0x7F36 0x7FF0 0x809D \ - 0x8266 0x839E 0x89B3 0x8ACC 0x8CAB 0x9084 0x9451 0x9593 \ - 0x9591 0x95A2 0x9665 0x97D3 0x9928 0x8218 0x4E38 0x542B \ - 0x5CB8 0x5DCC 0x73A9 0x764C 0x773C 0x5CA9 0x7FEB 0x8D0B \ - 0x96C1 0x9811 0x9854 0x9858 0x4F01 0x4F0E 0x5371 0x559C \ - 0x5668 0x57FA 0x5947 0x5B09 0x5BC4 0x5C90 0x5E0C 0x5E7E \ - 0x5FCC 0x63EE 0x673A 0x65D7 0x65E2 0x671F 0x68CB 0x68C4 \ - 0x6A5F 0x5E30 0x6BC5 0x6C17 0x6C7D 0x757F 0x7948 0x5B63 \ - 0x7A00 0x7D00 0x5FBD 0x898F 0x8A18 0x8CB4 0x8D77 0x8ECC \ - 0x8F1D 0x98E2 0x9A0E 0x9B3C 0x4E80 0x507D 0x5100 0x5993 \ - 0x5B9C 0x622F 0x6280 0x64EC 0x6B3A 0x72A0 0x7591 0x7947 \ - 0x7FA9 0x87FB 0x8ABC 0x8B70 0x63AC 0x83CA 0x97A0 0x5409 \ - 0x5403 0x55AB 0x6854 0x6A58 0x8A70 0x7827 0x6775 0x9ECD \ - 0x5374 0x5BA2 0x811A 0x8650 0x9006 0x4E18 0x4E45 0x4EC7 \ - 0x4F11 0x53CA 0x5438 0x5BAE 0x5F13 0x6025 0x6551 0x673D \ - 0x6C42 0x6C72 0x6CE3 0x7078 0x7403 0x7A76 0x7AAE 0x7B08 \ - 0x7D1A 0x7CFE 0x7D66 0x65E7 0x725B 0x53BB 0x5C45 0x5DE8 \ - 0x62D2 0x62E0 0x6319 0x6E20 0x865A 0x8A31 0x8DDD 0x92F8 \ - 0x6F01 0x79A6 0x9B5A 0x4EA8 0x4EAB 0x4EAC 0x4F9B 0x4FA0 \ - 0x50D1 0x5147 0x7AF6 0x5171 0x51F6 0x5354 0x5321 0x537F \ - 0x53EB 0x55AC 0x5883 0x5CE1 0x5F37 0x5F4A 0x602F 0x6050 \ - 0x606D 0x631F 0x6559 0x6A4B 0x6CC1 0x72C2 0x72ED 0x77EF \ - 0x80F8 0x8105 0x8208 0x854E 0x90F7 0x93E1 0x97FF 0x9957 \ - 0x9A5A 0x4EF0 0x51DD 0x5C2D 0x6681 0x696D 0x5C40 0x66F2 \ - 0x6975 0x7389 0x6850 0x7C81 0x50C5 0x52E4 0x5747 0x5DFE \ - 0x9326 0x65A4 0x6B23 0x6B3D 0x7434 0x7981 0x79BD 0x7B4B \ - 0x7DCA 0x82B9 0x83CC 0x887F 0x895F 0x8B39 0x8FD1 0x91D1 \ - 0x541F 0x9280 0x4E5D 0x5036 0x53E5 0x533A 0x72D7 0x7396 -09 0x77E9 0x82E6 0x8EAF 0x99C6 0x99C8 0x99D2 0x5177 0x611A \ - 0x865E 0x55B0 0x7A7A 0x5076 0x5BD3 0x9047 0x9685 0x4E32 \ - 0x6ADB 0x91E7 0x5C51 0x5C48 0x6398 0x7A9F 0x6C93 0x9774 \ - 0x8F61 0x7AAA 0x718A 0x9688 0x7C82 0x6817 0x7E70 0x6851 \ - 0x936C 0x52F2 0x541B 0x85AB 0x8A13 0x7FA4 0x8ECD 0x90E1 \ - 0x5366 0x8888 0x7941 0x4FC2 0x50BE 0x5211 0x5144 0x5553 \ - 0x572D 0x73EA 0x578B 0x5951 0x5F62 0x5F84 0x6075 0x6176 \ - 0x6167 0x61A9 0x63B2 0x643A 0x656C 0x666F 0x6842 0x6E13 \ - 0x7566 0x7A3D 0x7CFB 0x7D4C 0x7D99 0x7E4B 0x7F6B 0x830E \ - 0x834A 0x86CD 0x8A08 0x8A63 0x8B66 0x8EFD 0x981A 0x9D8F \ - 0x82B8 0x8FCE 0x9BE8 0x5287 0x621F 0x6483 0x6FC0 0x9699 \ - 0x6841 0x5091 0x6B20 0x6C7A 0x6F54 0x7A74 0x7D50 0x8840 \ - 0x8A23 0x6708 0x4EF6 0x5039 0x5026 0x5065 0x517C 0x5238 \ - 0x5263 0x55A7 0x570F 0x5805 0x5ACC 0x5EFA 0x61B2 0x61F8 \ - 0x62F3 0x6372 0x691C 0x6A29 0x727D 0x72AC 0x732E 0x7814 \ - 0x786F 0x7D79 0x770C 0x80A9 0x898B 0x8B19 0x8CE2 0x8ED2 \ - 0x9063 0x9375 0x967A 0x9855 0x9A13 0x9E78 0x5143 0x539F \ - 0x53B3 0x5E7B 0x5F26 0x6E1B 0x6E90 0x7384 0x73FE 0x7D43 \ - 0x8237 0x8A00 0x8AFA 0x9650 0x4E4E 0x500B 0x53E4 0x547C \ - 0x56FA 0x59D1 0x5B64 0x5DF1 0x5EAB 0x5F27 0x6238 0x6545 \ - 0x67AF 0x6E56 0x72D0 0x7CCA 0x88B4 0x80A1 0x80E1 0x83F0 \ - 0x864E 0x8A87 0x8DE8 0x9237 0x96C7 0x9867 0x9F13 0x4E94 \ - 0x4E92 0x4F0D 0x5348 0x5449 0x543E 0x5A2F 0x5F8C 0x5FA1 \ - 0x609F 0x68A7 0x6A8E 0x745A 0x7881 0x8A9E 0x8AA4 0x8B77 \ - 0x9190 0x4E5E 0x9BC9 0x4EA4 0x4F7C 0x4FAF 0x5019 0x5016 \ - 0x5149 0x516C 0x529F 0x52B9 0x52FE 0x539A 0x53E3 0x5411 \ - 0x540E 0x5589 0x5751 0x57A2 0x597D 0x5B54 0x5B5D 0x5B8F \ - 0x5DE5 0x5DE7 0x5DF7 0x5E78 0x5E83 0x5E9A 0x5EB7 0x5F18 \ - 0x6052 0x614C 0x6297 0x62D8 0x63A7 0x653B 0x6602 0x6643 \ - 0x66F4 0x676D 0x6821 0x6897 0x69CB 0x6C5F 0x6D2A 0x6D69 \ - 0x6E2F 0x6E9D 0x7532 0x7687 0x786C 0x7A3F 0x7CE0 0x7D05 \ - 0x7D18 0x7D5E 0x7DB1 0x8015 0x8003 0x80AF 0x80B1 0x8154 -10 0x818F 0x822A 0x8352 0x884C 0x8861 0x8B1B 0x8CA2 0x8CFC \ - 0x90CA 0x9175 0x9271 0x783F 0x92FC 0x95A4 0x964D 0x9805 \ - 0x9999 0x9AD8 0x9D3B 0x525B 0x52AB 0x53F7 0x5408 0x58D5 \ - 0x62F7 0x6FE0 0x8C6A 0x8F5F 0x9EB9 0x514B 0x523B 0x544A \ - 0x56FD 0x7A40 0x9177 0x9D60 0x9ED2 0x7344 0x6F09 0x8170 \ - 0x7511 0x5FFD 0x60DA 0x9AA8 0x72DB 0x8FBC 0x6B64 0x9803 \ - 0x4ECA 0x56F0 0x5764 0x58BE 0x5A5A 0x6068 0x61C7 0x660F \ - 0x6606 0x6839 0x68B1 0x6DF7 0x75D5 0x7D3A 0x826E 0x9B42 \ - 0x4E9B 0x4F50 0x53C9 0x5506 0x5D6F 0x5DE6 0x5DEE 0x67FB \ - 0x6C99 0x7473 0x7802 0x8A50 0x9396 0x88DF 0x5750 0x5EA7 \ - 0x632B 0x50B5 0x50AC 0x518D 0x6700 0x54C9 0x585E 0x59BB \ - 0x5BB0 0x5F69 0x624D 0x63A1 0x683D 0x6B73 0x6E08 0x707D \ - 0x91C7 0x7280 0x7815 0x7826 0x796D 0x658E 0x7D30 0x83DC \ - 0x88C1 0x8F09 0x969B 0x5264 0x5728 0x6750 0x7F6A 0x8CA1 \ - 0x51B4 0x5742 0x962A 0x583A 0x698A 0x80B4 0x54B2 0x5D0E \ - 0x57FC 0x7895 0x9DFA 0x4F5C 0x524A 0x548B 0x643E 0x6628 \ - 0x6714 0x67F5 0x7A84 0x7B56 0x7D22 0x932F 0x685C 0x9BAD \ - 0x7B39 0x5319 0x518A 0x5237 0x5BDF 0x62F6 0x64AE 0x64E6 \ - 0x672D 0x6BBA 0x85A9 0x96D1 0x7690 0x9BD6 0x634C 0x9306 \ - 0x9BAB 0x76BF 0x6652 0x4E09 0x5098 0x53C2 0x5C71 0x60E8 \ - 0x6492 0x6563 0x685F 0x71E6 0x73CA 0x7523 0x7B97 0x7E82 \ - 0x8695 0x8B83 0x8CDB 0x9178 0x9910 0x65AC 0x66AB 0x6B8B \ - 0x4ED5 0x4ED4 0x4F3A 0x4F7F 0x523A 0x53F8 0x53F2 0x55E3 \ - 0x56DB 0x58EB 0x59CB 0x59C9 0x59FF 0x5B50 0x5C4D 0x5E02 \ - 0x5E2B 0x5FD7 0x601D 0x6307 0x652F 0x5B5C 0x65AF 0x65BD \ - 0x65E8 0x679D 0x6B62 0x6B7B 0x6C0F 0x7345 0x7949 0x79C1 \ - 0x7CF8 0x7D19 0x7D2B 0x80A2 0x8102 0x81F3 0x8996 0x8A5E \ - 0x8A69 0x8A66 0x8A8C 0x8AEE 0x8CC7 0x8CDC 0x96CC 0x98FC \ - 0x6B6F 0x4E8B 0x4F3C 0x4F8D 0x5150 0x5B57 0x5BFA 0x6148 \ - 0x6301 0x6642 0x6B21 0x6ECB 0x6CBB 0x723E 0x74BD 0x75D4 \ - 0x78C1 0x793A 0x800C 0x8033 0x81EA 0x8494 0x8F9E 0x6C50 \ - 0x9E7F 0x5F0F 0x8B58 0x9D2B 0x7AFA 0x8EF8 0x5B8D 0x96EB -11 0x4E03 0x53F1 0x57F7 0x5931 0x5AC9 0x5BA4 0x6089 0x6E7F \ - 0x6F06 0x75BE 0x8CEA 0x5B9F 0x8500 0x7BE0 0x5072 0x67F4 \ - 0x829D 0x5C61 0x854A 0x7E1E 0x820E 0x5199 0x5C04 0x6368 \ - 0x8D66 0x659C 0x716E 0x793E 0x7D17 0x8005 0x8B1D 0x8ECA \ - 0x906E 0x86C7 0x90AA 0x501F 0x52FA 0x5C3A 0x6753 0x707C \ - 0x7235 0x914C 0x91C8 0x932B 0x82E5 0x5BC2 0x5F31 0x60F9 \ - 0x4E3B 0x53D6 0x5B88 0x624B 0x6731 0x6B8A 0x72E9 0x73E0 \ - 0x7A2E 0x816B 0x8DA3 0x9152 0x9996 0x5112 0x53D7 0x546A \ - 0x5BFF 0x6388 0x6A39 0x7DAC 0x9700 0x56DA 0x53CE 0x5468 \ - 0x5B97 0x5C31 0x5DDE 0x4FEE 0x6101 0x62FE 0x6D32 0x79C0 \ - 0x79CB 0x7D42 0x7E4D 0x7FD2 0x81ED 0x821F 0x8490 0x8846 \ - 0x8972 0x8B90 0x8E74 0x8F2F 0x9031 0x914B 0x916C 0x96C6 \ - 0x919C 0x4EC0 0x4F4F 0x5145 0x5341 0x5F93 0x620E 0x67D4 \ - 0x6C41 0x6E0B 0x7363 0x7E26 0x91CD 0x9283 0x53D4 0x5919 \ - 0x5BBF 0x6DD1 0x795D 0x7E2E 0x7C9B 0x587E 0x719F 0x51FA \ - 0x8853 0x8FF0 0x4FCA 0x5CFB 0x6625 0x77AC 0x7AE3 0x821C \ - 0x99FF 0x51C6 0x5FAA 0x65EC 0x696F 0x6B89 0x6DF3 0x6E96 \ - 0x6F64 0x76FE 0x7D14 0x5DE1 0x9075 0x9187 0x9806 0x51E6 \ - 0x521D 0x6240 0x6691 0x66D9 0x6E1A 0x5EB6 0x7DD2 0x7F72 \ - 0x66F8 0x85AF 0x85F7 0x8AF8 0x52A9 0x53D9 0x5973 0x5E8F \ - 0x5F90 0x6055 0x92E4 0x9664 0x50B7 0x511F 0x52DD 0x5320 \ - 0x5347 0x53EC 0x54E8 0x5546 0x5531 0x5617 0x5968 0x59BE \ - 0x5A3C 0x5BB5 0x5C06 0x5C0F 0x5C11 0x5C1A 0x5E84 0x5E8A \ - 0x5EE0 0x5F70 0x627F 0x6284 0x62DB 0x638C 0x6377 0x6607 \ - 0x660C 0x662D 0x6676 0x677E 0x68A2 0x6A1F 0x6A35 0x6CBC \ - 0x6D88 0x6E09 0x6E58 0x713C 0x7126 0x7167 0x75C7 0x7701 \ - 0x785D 0x7901 0x7965 0x79F0 0x7AE0 0x7B11 0x7CA7 0x7D39 \ - 0x8096 0x83D6 0x848B 0x8549 0x885D 0x88F3 0x8A1F 0x8A3C \ - 0x8A54 0x8A73 0x8C61 0x8CDE 0x91A4 0x9266 0x937E 0x9418 \ - 0x969C 0x9798 0x4E0A 0x4E08 0x4E1E 0x4E57 0x5197 0x5270 \ - 0x57CE 0x5834 0x58CC 0x5B22 0x5E38 0x60C5 0x64FE 0x6761 \ - 0x6756 0x6D44 0x72B6 0x7573 0x7A63 0x84B8 0x8B72 0x91B8 -12 0x9320 0x5631 0x57F4 0x98FE 0x62ED 0x690D 0x6B96 0x71ED \ - 0x7E54 0x8077 0x8272 0x89E6 0x98DF 0x8755 0x8FB1 0x5C3B \ - 0x4F38 0x4FE1 0x4FB5 0x5507 0x5A20 0x5BDD 0x5BE9 0x5FC3 \ - 0x614E 0x632F 0x65B0 0x664B 0x68EE 0x699B 0x6D78 0x6DF1 \ - 0x7533 0x75B9 0x771F 0x795E 0x79E6 0x7D33 0x81E3 0x82AF \ - 0x85AA 0x89AA 0x8A3A 0x8EAB 0x8F9B 0x9032 0x91DD 0x9707 \ - 0x4EBA 0x4EC1 0x5203 0x5875 0x58EC 0x5C0B 0x751A 0x5C3D \ - 0x814E 0x8A0A 0x8FC5 0x9663 0x976D 0x7B25 0x8ACF 0x9808 \ - 0x9162 0x56F3 0x53A8 0x9017 0x5439 0x5782 0x5E25 0x63A8 \ - 0x6C34 0x708A 0x7761 0x7C8B 0x7FE0 0x8870 0x9042 0x9154 \ - 0x9310 0x9318 0x968F 0x745E 0x9AC4 0x5D07 0x5D69 0x6570 \ - 0x67A2 0x8DA8 0x96DB 0x636E 0x6749 0x6919 0x83C5 0x9817 \ - 0x96C0 0x88FE 0x6F84 0x647A 0x5BF8 0x4E16 0x702C 0x755D \ - 0x662F 0x51C4 0x5236 0x52E2 0x59D3 0x5F81 0x6027 0x6210 \ - 0x653F 0x6574 0x661F 0x6674 0x68F2 0x6816 0x6B63 0x6E05 \ - 0x7272 0x751F 0x76DB 0x7CBE 0x8056 0x58F0 0x88FD 0x897F \ - 0x8AA0 0x8A93 0x8ACB 0x901D 0x9192 0x9752 0x9759 0x6589 \ - 0x7A0E 0x8106 0x96BB 0x5E2D 0x60DC 0x621A 0x65A5 0x6614 \ - 0x6790 0x77F3 0x7A4D 0x7C4D 0x7E3E 0x810A 0x8CAC 0x8D64 \ - 0x8DE1 0x8E5F 0x78A9 0x5207 0x62D9 0x63A5 0x6442 0x6298 \ - 0x8A2D 0x7A83 0x7BC0 0x8AAC 0x96EA 0x7D76 0x820C 0x8749 \ - 0x4ED9 0x5148 0x5343 0x5360 0x5BA3 0x5C02 0x5C16 0x5DDD \ - 0x6226 0x6247 0x64B0 0x6813 0x6834 0x6CC9 0x6D45 0x6D17 \ - 0x67D3 0x6F5C 0x714E 0x717D 0x65CB 0x7A7F 0x7BAD 0x7DDA \ - 0x7E4A 0x7FA8 0x817A 0x821B 0x8239 0x85A6 0x8A6E 0x8CCE \ - 0x8DF5 0x9078 0x9077 0x92AD 0x9291 0x9583 0x9BAE 0x524D \ - 0x5584 0x6F38 0x7136 0x5168 0x7985 0x7E55 0x81B3 0x7CCE \ - 0x564C 0x5851 0x5CA8 0x63AA 0x66FE 0x66FD 0x695A 0x72D9 \ - 0x758F 0x758E 0x790E 0x7956 0x79DF 0x7C97 0x7D20 0x7D44 \ - 0x8607 0x8A34 0x963B 0x9061 0x9F20 0x50E7 0x5275 0x53CC \ - 0x53E2 0x5009 0x55AA 0x58EE 0x594F 0x723D 0x5B8B 0x5C64 \ - 0x531D 0x60E3 0x60F3 0x635C 0x6383 0x633F 0x63BB 0x64CD -13 0x65E9 0x66F9 0x5DE3 0x69CD 0x69FD 0x6F15 0x71E5 0x4E89 \ - 0x75E9 0x76F8 0x7A93 0x7CDF 0x7DCF 0x7D9C 0x8061 0x8349 \ - 0x8358 0x846C 0x84BC 0x85FB 0x88C5 0x8D70 0x9001 0x906D \ - 0x9397 0x971C 0x9A12 0x50CF 0x5897 0x618E 0x81D3 0x8535 \ - 0x8D08 0x9020 0x4FC3 0x5074 0x5247 0x5373 0x606F 0x6349 \ - 0x675F 0x6E2C 0x8DB3 0x901F 0x4FD7 0x5C5E 0x8CCA 0x65CF \ - 0x7D9A 0x5352 0x8896 0x5176 0x63C3 0x5B58 0x5B6B 0x5C0A \ - 0x640D 0x6751 0x905C 0x4ED6 0x591A 0x592A 0x6C70 0x8A51 \ - 0x553E 0x5815 0x59A5 0x60F0 0x6253 0x67C1 0x8235 0x6955 \ - 0x9640 0x99C4 0x9A28 0x4F53 0x5806 0x5BFE 0x8010 0x5CB1 \ - 0x5E2F 0x5F85 0x6020 0x614B 0x6234 0x66FF 0x6CF0 0x6EDE \ - 0x80CE 0x817F 0x82D4 0x888B 0x8CB8 0x9000 0x902E 0x968A \ - 0x9EDB 0x9BDB 0x4EE3 0x53F0 0x5927 0x7B2C 0x918D 0x984C \ - 0x9DF9 0x6EDD 0x7027 0x5353 0x5544 0x5B85 0x6258 0x629E \ - 0x62D3 0x6CA2 0x6FEF 0x7422 0x8A17 0x9438 0x6FC1 0x8AFE \ - 0x8338 0x51E7 0x86F8 0x53EA 0x53E9 0x4F46 0x9054 0x8FB0 \ - 0x596A 0x8131 0x5DFD 0x7AEA 0x8FBF 0x68DA 0x8C37 0x72F8 \ - 0x9C48 0x6A3D 0x8AB0 0x4E39 0x5358 0x5606 0x5766 0x62C5 \ - 0x63A2 0x65E6 0x6B4E 0x6DE1 0x6E5B 0x70AD 0x77ED 0x7AEF \ - 0x7BAA 0x7DBB 0x803D 0x80C6 0x86CB 0x8A95 0x935B 0x56E3 \ - 0x58C7 0x5F3E 0x65AD 0x6696 0x6A80 0x6BB5 0x7537 0x8AC7 \ - 0x5024 0x77E5 0x5730 0x5F1B 0x6065 0x667A 0x6C60 0x75F4 \ - 0x7A1A 0x7F6E 0x81F4 0x8718 0x9045 0x99B3 0x7BC9 0x755C \ - 0x7AF9 0x7B51 0x84C4 0x9010 0x79E9 0x7A92 0x8336 0x5AE1 \ - 0x7740 0x4E2D 0x4EF2 0x5B99 0x5FE0 0x62BD 0x663C 0x67F1 \ - 0x6CE8 0x866B 0x8877 0x8A3B 0x914E 0x92F3 0x99D0 0x6A17 \ - 0x7026 0x732A 0x82E7 0x8457 0x8CAF 0x4E01 0x5146 0x51CB \ - 0x558B 0x5BF5 0x5E16 0x5E33 0x5E81 0x5F14 0x5F35 0x5F6B \ - 0x5FB4 0x61F2 0x6311 0x66A2 0x671D 0x6F6E 0x7252 0x753A \ - 0x773A 0x8074 0x8139 0x8178 0x8776 0x8ABF 0x8ADC 0x8D85 \ - 0x8DF3 0x929A 0x9577 0x9802 0x9CE5 0x52C5 0x6357 0x76F4 \ - 0x6715 0x6C88 0x73CD 0x8CC3 0x93AE 0x9673 0x6D25 0x589C -14 0x690E 0x69CC 0x8FFD 0x939A 0x75DB 0x901A 0x585A 0x6802 \ - 0x63B4 0x69FB 0x4F43 0x6F2C 0x67D8 0x8FBB 0x8526 0x7DB4 \ - 0x9354 0x693F 0x6F70 0x576A 0x58F7 0x5B2C 0x7D2C 0x722A \ - 0x540A 0x91E3 0x9DB4 0x4EAD 0x4F4E 0x505C 0x5075 0x5243 \ - 0x8C9E 0x5448 0x5824 0x5B9A 0x5E1D 0x5E95 0x5EAD 0x5EF7 \ - 0x5F1F 0x608C 0x62B5 0x633A 0x63D0 0x68AF 0x6C40 0x7887 \ - 0x798E 0x7A0B 0x7DE0 0x8247 0x8A02 0x8AE6 0x8E44 0x9013 \ - 0x90B8 0x912D 0x91D8 0x9F0E 0x6CE5 0x6458 0x64E2 0x6575 \ - 0x6EF4 0x7684 0x7B1B 0x9069 0x93D1 0x6EBA 0x54F2 0x5FB9 \ - 0x64A4 0x8F4D 0x8FED 0x9244 0x5178 0x586B 0x5929 0x5C55 \ - 0x5E97 0x6DFB 0x7E8F 0x751C 0x8CBC 0x8EE2 0x985B 0x70B9 \ - 0x4F1D 0x6BBF 0x6FB1 0x7530 0x96FB 0x514E 0x5410 0x5835 \ - 0x5857 0x59AC 0x5C60 0x5F92 0x6597 0x675C 0x6E21 0x767B \ - 0x83DF 0x8CED 0x9014 0x90FD 0x934D 0x7825 0x783A 0x52AA \ - 0x5EA6 0x571F 0x5974 0x6012 0x5012 0x515A 0x51AC 0x51CD \ - 0x5200 0x5510 0x5854 0x5858 0x5957 0x5B95 0x5CF6 0x5D8B \ - 0x60BC 0x6295 0x642D 0x6771 0x6843 0x68BC 0x68DF 0x76D7 \ - 0x6DD8 0x6E6F 0x6D9B 0x706F 0x71C8 0x5F53 0x75D8 0x7977 \ - 0x7B49 0x7B54 0x7B52 0x7CD6 0x7D71 0x5230 0x8463 0x8569 \ - 0x85E4 0x8A0E 0x8B04 0x8C46 0x8E0F 0x9003 0x900F 0x9419 \ - 0x9676 0x982D 0x9A30 0x95D8 0x50CD 0x52D5 0x540C 0x5802 \ - 0x5C0E 0x61A7 0x649E 0x6D1E 0x77B3 0x7AE5 0x80F4 0x8404 \ - 0x9053 0x9285 0x5CE0 0x9D07 0x533F 0x5F97 0x5FB3 0x6D9C \ - 0x7279 0x7763 0x79BF 0x7BE4 0x6BD2 0x72EC 0x8AAD 0x6803 \ - 0x6A61 0x51F8 0x7A81 0x6934 0x5C4A 0x9CF6 0x82EB 0x5BC5 \ - 0x9149 0x701E 0x5678 0x5C6F 0x60C7 0x6566 0x6C8C 0x8C5A \ - 0x9041 0x9813 0x5451 0x66C7 0x920D 0x5948 0x90A3 0x5185 \ - 0x4E4D 0x51EA 0x8599 0x8B0E 0x7058 0x637A 0x934B 0x6962 \ - 0x99B4 0x7E04 0x7577 0x5357 0x6960 0x8EDF 0x96E3 0x6C5D \ - 0x4E8C 0x5C3C 0x5F10 0x8FE9 0x5302 0x8CD1 0x8089 0x8679 \ - 0x5EFF 0x65E5 0x4E73 0x5165 0x5982 0x5C3F 0x97EE 0x4EFB \ - 0x598A 0x5FCD 0x8A8D 0x6FE1 0x79B0 0x7962 0x5BE7 0x8471 -15 0x732B 0x71B1 0x5E74 0x5FF5 0x637B 0x649A 0x71C3 0x7C98 \ - 0x4E43 0x5EFC 0x4E4B 0x57DC 0x56A2 0x60A9 0x6FC3 0x7D0D \ - 0x80FD 0x8133 0x81BF 0x8FB2 0x8997 0x86A4 0x5DF4 0x628A \ - 0x64AD 0x8987 0x6777 0x6CE2 0x6D3E 0x7436 0x7834 0x5A46 \ - 0x7F75 0x82AD 0x99AC 0x4FF3 0x5EC3 0x62DD 0x6392 0x6557 \ - 0x676F 0x76C3 0x724C 0x80CC 0x80BA 0x8F29 0x914D 0x500D \ - 0x57F9 0x5A92 0x6885 0x6973 0x7164 0x72FD 0x8CB7 0x58F2 \ - 0x8CE0 0x966A 0x9019 0x877F 0x79E4 0x77E7 0x8429 0x4F2F \ - 0x5265 0x535A 0x62CD 0x67CF 0x6CCA 0x767D 0x7B94 0x7C95 \ - 0x8236 0x8584 0x8FEB 0x66DD 0x6F20 0x7206 0x7E1B 0x83AB \ - 0x99C1 0x9EA6 0x51FD 0x7BB1 0x7872 0x7BB8 0x8087 0x7B48 \ - 0x6AE8 0x5E61 0x808C 0x7551 0x7560 0x516B 0x9262 0x6E8C \ - 0x767A 0x9197 0x9AEA 0x4F10 0x7F70 0x629C 0x7B4F 0x95A5 \ - 0x9CE9 0x567A 0x5859 0x86E4 0x96BC 0x4F34 0x5224 0x534A \ - 0x53CD 0x53DB 0x5E06 0x642C 0x6591 0x677F 0x6C3E 0x6C4E \ - 0x7248 0x72AF 0x73ED 0x7554 0x7E41 0x822C 0x85E9 0x8CA9 \ - 0x7BC4 0x91C6 0x7169 0x9812 0x98EF 0x633D 0x6669 0x756A \ - 0x76E4 0x78D0 0x8543 0x86EE 0x532A 0x5351 0x5426 0x5983 \ - 0x5E87 0x5F7C 0x60B2 0x6249 0x6279 0x62AB 0x6590 0x6BD4 \ - 0x6CCC 0x75B2 0x76AE 0x7891 0x79D8 0x7DCB 0x7F77 0x80A5 \ - 0x88AB 0x8AB9 0x8CBB 0x907F 0x975E 0x98DB 0x6A0B 0x7C38 \ - 0x5099 0x5C3E 0x5FAE 0x6787 0x6BD8 0x7435 0x7709 0x7F8E \ - 0x9F3B 0x67CA 0x7A17 0x5339 0x758B 0x9AED 0x5F66 0x819D \ - 0x83F1 0x8098 0x5F3C 0x5FC5 0x7562 0x7B46 0x903C 0x6867 \ - 0x59EB 0x5A9B 0x7D10 0x767E 0x8B2C 0x4FF5 0x5F6A 0x6A19 \ - 0x6C37 0x6F02 0x74E2 0x7968 0x8868 0x8A55 0x8C79 0x5EDF \ - 0x63CF 0x75C5 0x79D2 0x82D7 0x9328 0x92F2 0x849C 0x86ED \ - 0x9C2D 0x54C1 0x5F6C 0x658C 0x6D5C 0x7015 0x8CA7 0x8CD3 \ - 0x983B 0x654F 0x74F6 0x4E0D 0x4ED8 0x57E0 0x592B 0x5A66 \ - 0x5BCC 0x51A8 0x5E03 0x5E9C 0x6016 0x6276 0x6577 0x65A7 \ - 0x666E 0x6D6E 0x7236 0x7B26 0x8150 0x819A 0x8299 0x8B5C \ - 0x8CA0 0x8CE6 0x8D74 0x961C 0x9644 0x4FAE 0x64AB 0x6B66 -16 0x821E 0x8461 0x856A 0x90E8 0x5C01 0x6953 0x98A8 0x847A \ - 0x8557 0x4F0F 0x526F 0x5FA9 0x5E45 0x670D 0x798F 0x8179 \ - 0x8907 0x8986 0x6DF5 0x5F17 0x6255 0x6CB8 0x4ECF 0x7269 \ - 0x9B92 0x5206 0x543B 0x5674 0x58B3 0x61A4 0x626E 0x711A \ - 0x596E 0x7C89 0x7CDE 0x7D1B 0x96F0 0x6587 0x805E 0x4E19 \ - 0x4F75 0x5175 0x5840 0x5E63 0x5E73 0x5F0A 0x67C4 0x4E26 \ - 0x853D 0x9589 0x965B 0x7C73 0x9801 0x50FB 0x58C1 0x7656 \ - 0x78A7 0x5225 0x77A5 0x8511 0x7B86 0x504F 0x5909 0x7247 \ - 0x7BC7 0x7DE8 0x8FBA 0x8FD4 0x904D 0x4FBF 0x52C9 0x5A29 \ - 0x5F01 0x97AD 0x4FDD 0x8217 0x92EA 0x5703 0x6355 0x6B69 \ - 0x752B 0x88DC 0x8F14 0x7A42 0x52DF 0x5893 0x6155 0x620A \ - 0x66AE 0x6BCD 0x7C3F 0x83E9 0x5023 0x4FF8 0x5305 0x5446 \ - 0x5831 0x5949 0x5B9D 0x5CF0 0x5CEF 0x5D29 0x5E96 0x62B1 \ - 0x6367 0x653E 0x65B9 0x670B 0x6CD5 0x6CE1 0x70F9 0x7832 \ - 0x7E2B 0x80DE 0x82B3 0x840C 0x84EC 0x8702 0x8912 0x8A2A \ - 0x8C4A 0x90A6 0x92D2 0x98FD 0x9CF3 0x9D6C 0x4E4F 0x4EA1 \ - 0x508D 0x5256 0x574A 0x59A8 0x5E3D 0x5FD8 0x5FD9 0x623F \ - 0x66B4 0x671B 0x67D0 0x68D2 0x5192 0x7D21 0x80AA 0x81A8 \ - 0x8B00 0x8C8C 0x8CBF 0x927E 0x9632 0x5420 0x982C 0x5317 \ - 0x50D5 0x535C 0x58A8 0x64B2 0x6734 0x7267 0x7766 0x7A46 \ - 0x91E6 0x52C3 0x6CA1 0x6B86 0x5800 0x5E4C 0x5954 0x672C \ - 0x7FFB 0x51E1 0x76C6 0x6469 0x78E8 0x9B54 0x9EBB 0x57CB \ - 0x59B9 0x6627 0x679A 0x6BCE 0x54E9 0x69D9 0x5E55 0x819C \ - 0x6795 0x9BAA 0x67FE 0x9C52 0x685D 0x4EA6 0x4FE3 0x53C8 \ - 0x62B9 0x672B 0x6CAB 0x8FC4 0x4FAD 0x7E6D 0x9EBF 0x4E07 \ - 0x6162 0x6E80 0x6F2B 0x8513 0x5473 0x672A 0x9B45 0x5DF3 \ - 0x7B95 0x5CAC 0x5BC6 0x871C 0x6E4A 0x84D1 0x7A14 0x8108 \ - 0x5999 0x7C8D 0x6C11 0x7720 0x52D9 0x5922 0x7121 0x725F \ - 0x77DB 0x9727 0x9D61 0x690B 0x5A7F 0x5A18 0x51A5 0x540D \ - 0x547D 0x660E 0x76DF 0x8FF7 0x9298 0x9CF4 0x59EA 0x725D \ - 0x6EC5 0x514D 0x68C9 0x7DBF 0x7DEC 0x9762 0x9EBA 0x6478 \ - 0x6A21 0x8302 0x5984 0x5B5F 0x6BDB 0x731B 0x76F2 0x7DB2 -17 0x8017 0x8499 0x5132 0x6728 0x9ED9 0x76EE 0x6762 0x52FF \ - 0x9905 0x5C24 0x623B 0x7C7E 0x8CB0 0x554F 0x60B6 0x7D0B \ - 0x9580 0x5301 0x4E5F 0x51B6 0x591C 0x723A 0x8036 0x91CE \ - 0x5F25 0x77E2 0x5384 0x5F79 0x7D04 0x85AC 0x8A33 0x8E8D \ - 0x9756 0x67F3 0x85AE 0x9453 0x6109 0x6108 0x6CB9 0x7652 \ - 0x8AED 0x8F38 0x552F 0x4F51 0x512A 0x52C7 0x53CB 0x5BA5 \ - 0x5E7D 0x60A0 0x6182 0x63D6 0x6709 0x67DA 0x6E67 0x6D8C \ - 0x7336 0x7337 0x7531 0x7950 0x88D5 0x8A98 0x904A 0x9091 \ - 0x90F5 0x96C4 0x878D 0x5915 0x4E88 0x4F59 0x4E0E 0x8A89 \ - 0x8F3F 0x9810 0x50AD 0x5E7C 0x5996 0x5BB9 0x5EB8 0x63DA \ - 0x63FA 0x64C1 0x66DC 0x694A 0x69D8 0x6D0B 0x6EB6 0x7194 \ - 0x7528 0x7AAF 0x7F8A 0x8000 0x8449 0x84C9 0x8981 0x8B21 \ - 0x8E0A 0x9065 0x967D 0x990A 0x617E 0x6291 0x6B32 0x6C83 \ - 0x6D74 0x7FCC 0x7FFC 0x6DC0 0x7F85 0x87BA 0x88F8 0x6765 \ - 0x83B1 0x983C 0x96F7 0x6D1B 0x7D61 0x843D 0x916A 0x4E71 \ - 0x5375 0x5D50 0x6B04 0x6FEB 0x85CD 0x862D 0x89A7 0x5229 \ - 0x540F 0x5C65 0x674E 0x68A8 0x7406 0x7483 0x75E2 0x88CF \ - 0x88E1 0x91CC 0x96E2 0x9678 0x5F8B 0x7387 0x7ACB 0x844E \ - 0x63A0 0x7565 0x5289 0x6D41 0x6E9C 0x7409 0x7559 0x786B \ - 0x7C92 0x9686 0x7ADC 0x9F8D 0x4FB6 0x616E 0x65C5 0x865C \ - 0x4E86 0x4EAE 0x50DA 0x4E21 0x51CC 0x5BEE 0x6599 0x6881 \ - 0x6DBC 0x731F 0x7642 0x77AD 0x7A1C 0x7CE7 0x826F 0x8AD2 \ - 0x907C 0x91CF 0x9675 0x9818 0x529B 0x7DD1 0x502B 0x5398 \ - 0x6797 0x6DCB 0x71D0 0x7433 0x81E8 0x8F2A 0x96A3 0x9C57 \ - 0x9E9F 0x7460 0x5841 0x6D99 0x7D2F 0x985E 0x4EE4 0x4F36 \ - 0x4F8B 0x51B7 0x52B1 0x5DBA 0x601C 0x73B2 0x793C 0x82D3 \ - 0x9234 0x96B7 0x96F6 0x970A 0x9E97 0x9F62 0x66A6 0x6B74 \ - 0x5217 0x52A3 0x70C8 0x88C2 0x5EC9 0x604B 0x6190 0x6F23 \ - 0x7149 0x7C3E 0x7DF4 0x806F 0x84EE 0x9023 0x932C 0x5442 \ - 0x9B6F 0x6AD3 0x7089 0x8CC2 0x8DEF 0x9732 0x52B4 0x5A41 \ - 0x5ECA 0x5F04 0x6717 0x697C 0x6994 0x6D6A 0x6F0F 0x7262 \ - 0x72FC 0x7BED 0x8001 0x807E 0x874B 0x90CE 0x516D 0x9E93 -18 0x7984 0x808B 0x9332 0x8AD6 0x502D 0x548C 0x8A71 0x6B6A \ - 0x8CC4 0x8107 0x60D1 0x67A0 0x9DF2 0x4E99 0x4E98 0x9C10 \ - 0x8A6B 0x85C1 0x8568 0x6900 0x6E7E 0x7897 0x8155 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x5F0C 0x4E10 0x4E15 0x4E2A 0x4E31 0x4E36 \ - 0x4E3C 0x4E3F 0x4E42 0x4E56 0x4E58 0x4E82 0x4E85 0x8C6B \ - 0x4E8A 0x8212 0x5F0D 0x4E8E 0x4E9E 0x4E9F 0x4EA0 0x4EA2 \ - 0x4EB0 0x4EB3 0x4EB6 0x4ECE 0x4ECD 0x4EC4 0x4EC6 0x4EC2 \ - 0x4ED7 0x4EDE 0x4EED 0x4EDF 0x4EF7 0x4F09 0x4F5A 0x4F30 \ - 0x4F5B 0x4F5D 0x4F57 0x4F47 0x4F76 0x4F88 0x4F8F 0x4F98 \ - 0x4F7B 0x4F69 0x4F70 0x4F91 0x4F6F 0x4F86 0x4F96 0x5118 \ - 0x4FD4 0x4FDF 0x4FCE 0x4FD8 0x4FDB 0x4FD1 0x4FDA 0x4FD0 \ - 0x4FE4 0x4FE5 0x501A 0x5028 0x5014 0x502A 0x5025 0x5005 \ - 0x4F1C 0x4FF6 0x5021 0x5029 0x502C 0x4FFE 0x4FEF 0x5011 \ - 0x5006 0x5043 0x5047 0x6703 0x5055 0x5050 0x5048 0x505A \ - 0x5056 0x506C 0x5078 0x5080 0x509A 0x5085 0x50B4 0x50B2 \ - 0x50C9 0x50CA 0x50B3 0x50C2 0x50D6 0x50DE 0x50E5 0x50ED \ - 0x50E3 0x50EE 0x50F9 0x50F5 0x5109 0x5101 0x5102 0x5116 \ - 0x5115 0x5114 0x511A 0x5121 0x513A 0x5137 0x513C 0x513B \ - 0x513F 0x5140 0x5152 0x514C 0x5154 0x5162 0x7AF8 0x5169 \ - 0x516A 0x516E 0x5180 0x5182 0x56D8 0x518C 0x5189 0x518F \ - 0x5191 0x5193 0x5195 0x5196 0x51A4 0x51A6 0x51A2 0x51A9 \ - 0x51AA 0x51AB 0x51B3 0x51B1 0x51B2 0x51B0 0x51B5 0x51BD \ - 0x51C5 0x51C9 0x51DB 0x51E0 0x8655 0x51E9 0x51ED 0x51F0 \ - 0x51F5 0x51FE 0x5204 0x520B 0x5214 0x520E 0x5227 0x522A \ - 0x522E 0x5233 0x5239 0x524F 0x5244 0x524B 0x524C 0x525E \ - 0x5254 0x526A 0x5274 0x5269 0x5273 0x527F 0x527D 0x528D \ - 0x5294 0x5292 0x5271 0x5288 0x5291 0x8FA8 0x8FA7 0x52AC -19 0x52AD 0x52BC 0x52B5 0x52C1 0x52CD 0x52D7 0x52DE 0x52E3 \ - 0x52E6 0x98ED 0x52E0 0x52F3 0x52F5 0x52F8 0x52F9 0x5306 \ - 0x5308 0x7538 0x530D 0x5310 0x530F 0x5315 0x531A 0x5323 \ - 0x532F 0x5331 0x5333 0x5338 0x5340 0x5346 0x5345 0x4E17 \ - 0x5349 0x534D 0x51D6 0x535E 0x5369 0x536E 0x5918 0x537B \ - 0x5377 0x5382 0x5396 0x53A0 0x53A6 0x53A5 0x53AE 0x53B0 \ - 0x53B6 0x53C3 0x7C12 0x96D9 0x53DF 0x66FC 0x71EE 0x53EE \ - 0x53E8 0x53ED 0x53FA 0x5401 0x543D 0x5440 0x542C 0x542D \ - 0x543C 0x542E 0x5436 0x5429 0x541D 0x544E 0x548F 0x5475 \ - 0x548E 0x545F 0x5471 0x5477 0x5470 0x5492 0x547B 0x5480 \ - 0x5476 0x5484 0x5490 0x5486 0x54C7 0x54A2 0x54B8 0x54A5 \ - 0x54AC 0x54C4 0x54C8 0x54A8 0x54AB 0x54C2 0x54A4 0x54BE \ - 0x54BC 0x54D8 0x54E5 0x54E6 0x550F 0x5514 0x54FD 0x54EE \ - 0x54ED 0x54FA 0x54E2 0x5539 0x5540 0x5563 0x554C 0x552E \ - 0x555C 0x5545 0x5556 0x5557 0x5538 0x5533 0x555D 0x5599 \ - 0x5580 0x54AF 0x558A 0x559F 0x557B 0x557E 0x5598 0x559E \ - 0x55AE 0x557C 0x5583 0x55A9 0x5587 0x55A8 0x55DA 0x55C5 \ - 0x55DF 0x55C4 0x55DC 0x55E4 0x55D4 0x5614 0x55F7 0x5616 \ - 0x55FE 0x55FD 0x561B 0x55F9 0x564E 0x5650 0x71DF 0x5634 \ - 0x5636 0x5632 0x5638 0x566B 0x5664 0x562F 0x566C 0x566A \ - 0x5686 0x5680 0x568A 0x56A0 0x5694 0x568F 0x56A5 0x56AE \ - 0x56B6 0x56B4 0x56C2 0x56BC 0x56C1 0x56C3 0x56C0 0x56C8 \ - 0x56CE 0x56D1 0x56D3 0x56D7 0x56EE 0x56F9 0x5700 0x56FF \ - 0x5704 0x5709 0x5708 0x570B 0x570D 0x5713 0x5718 0x5716 \ - 0x55C7 0x571C 0x5726 0x5737 0x5738 0x574E 0x573B 0x5740 \ - 0x574F 0x5769 0x57C0 0x5788 0x5761 0x577F 0x5789 0x5793 \ - 0x57A0 0x57B3 0x57A4 0x57AA 0x57B0 0x57C3 0x57C6 0x57D4 \ - 0x57D2 0x57D3 0x580A 0x57D6 0x57E3 0x580B 0x5819 0x581D \ - 0x5872 0x5821 0x5862 0x584B 0x5870 0x6BC0 0x5852 0x583D \ - 0x5879 0x5885 0x58B9 0x589F 0x58AB 0x58BA 0x58DE 0x58BB \ - 0x58B8 0x58AE 0x58C5 0x58D3 0x58D1 0x58D7 0x58D9 0x58D8 \ - 0x58E5 0x58DC 0x58E4 0x58DF 0x58EF 0x58FA 0x58F9 0x58FB -20 0x58FC 0x58FD 0x5902 0x590A 0x5910 0x591B 0x68A6 0x5925 \ - 0x592C 0x592D 0x5932 0x5938 0x593E 0x7AD2 0x5955 0x5950 \ - 0x594E 0x595A 0x5958 0x5962 0x5960 0x5967 0x596C 0x5969 \ - 0x5978 0x5981 0x599D 0x4F5E 0x4FAB 0x59A3 0x59B2 0x59C6 \ - 0x59E8 0x59DC 0x598D 0x59D9 0x59DA 0x5A25 0x5A1F 0x5A11 \ - 0x5A1C 0x5A09 0x5A1A 0x5A40 0x5A6C 0x5A49 0x5A35 0x5A36 \ - 0x5A62 0x5A6A 0x5A9A 0x5ABC 0x5ABE 0x5ACB 0x5AC2 0x5ABD \ - 0x5AE3 0x5AD7 0x5AE6 0x5AE9 0x5AD6 0x5AFA 0x5AFB 0x5B0C \ - 0x5B0B 0x5B16 0x5B32 0x5AD0 0x5B2A 0x5B36 0x5B3E 0x5B43 \ - 0x5B45 0x5B40 0x5B51 0x5B55 0x5B5A 0x5B5B 0x5B65 0x5B69 \ - 0x5B70 0x5B73 0x5B75 0x5B78 0x6588 0x5B7A 0x5B80 0x5B83 \ - 0x5BA6 0x5BB8 0x5BC3 0x5BC7 0x5BC9 0x5BD4 0x5BD0 0x5BE4 \ - 0x5BE6 0x5BE2 0x5BDE 0x5BE5 0x5BEB 0x5BF0 0x5BF6 0x5BF3 \ - 0x5C05 0x5C07 0x5C08 0x5C0D 0x5C13 0x5C20 0x5C22 0x5C28 \ - 0x5C38 0x5C39 0x5C41 0x5C46 0x5C4E 0x5C53 0x5C50 0x5C4F \ - 0x5B71 0x5C6C 0x5C6E 0x4E62 0x5C76 0x5C79 0x5C8C 0x5C91 \ - 0x5C94 0x599B 0x5CAB 0x5CBB 0x5CB6 0x5CBC 0x5CB7 0x5CC5 \ - 0x5CBE 0x5CC7 0x5CD9 0x5CE9 0x5CFD 0x5CFA 0x5CED 0x5D8C \ - 0x5CEA 0x5D0B 0x5D15 0x5D17 0x5D5C 0x5D1F 0x5D1B 0x5D11 \ - 0x5D14 0x5D22 0x5D1A 0x5D19 0x5D18 0x5D4C 0x5D52 0x5D4E \ - 0x5D4B 0x5D6C 0x5D73 0x5D76 0x5D87 0x5D84 0x5D82 0x5DA2 \ - 0x5D9D 0x5DAC 0x5DAE 0x5DBD 0x5D90 0x5DB7 0x5DBC 0x5DC9 \ - 0x5DCD 0x5DD3 0x5DD2 0x5DD6 0x5DDB 0x5DEB 0x5DF2 0x5DF5 \ - 0x5E0B 0x5E1A 0x5E19 0x5E11 0x5E1B 0x5E36 0x5E37 0x5E44 \ - 0x5E43 0x5E40 0x5E4E 0x5E57 0x5E54 0x5E5F 0x5E62 0x5E64 \ - 0x5E47 0x5E75 0x5E76 0x5E7A 0x9EBC 0x5E7F 0x5EA0 0x5EC1 \ - 0x5EC2 0x5EC8 0x5ED0 0x5ECF 0x5ED6 0x5EE3 0x5EDD 0x5EDA \ - 0x5EDB 0x5EE2 0x5EE1 0x5EE8 0x5EE9 0x5EEC 0x5EF1 0x5EF3 \ - 0x5EF0 0x5EF4 0x5EF8 0x5EFE 0x5F03 0x5F09 0x5F5D 0x5F5C \ - 0x5F0B 0x5F11 0x5F16 0x5F29 0x5F2D 0x5F38 0x5F41 0x5F48 \ - 0x5F4C 0x5F4E 0x5F2F 0x5F51 0x5F56 0x5F57 0x5F59 0x5F61 \ - 0x5F6D 0x5F73 0x5F77 0x5F83 0x5F82 0x5F7F 0x5F8A 0x5F88 -21 0x5F91 0x5F87 0x5F9E 0x5F99 0x5F98 0x5FA0 0x5FA8 0x5FAD \ - 0x5FBC 0x5FD6 0x5FFB 0x5FE4 0x5FF8 0x5FF1 0x5FDD 0x60B3 \ - 0x5FFF 0x6021 0x6060 0x6019 0x6010 0x6029 0x600E 0x6031 \ - 0x601B 0x6015 0x602B 0x6026 0x600F 0x603A 0x605A 0x6041 \ - 0x606A 0x6077 0x605F 0x604A 0x6046 0x604D 0x6063 0x6043 \ - 0x6064 0x6042 0x606C 0x606B 0x6059 0x6081 0x608D 0x60E7 \ - 0x6083 0x609A 0x6084 0x609B 0x6096 0x6097 0x6092 0x60A7 \ - 0x608B 0x60E1 0x60B8 0x60E0 0x60D3 0x60B4 0x5FF0 0x60BD \ - 0x60C6 0x60B5 0x60D8 0x614D 0x6115 0x6106 0x60F6 0x60F7 \ - 0x6100 0x60F4 0x60FA 0x6103 0x6121 0x60FB 0x60F1 0x610D \ - 0x610E 0x6147 0x613E 0x6128 0x6127 0x614A 0x613F 0x613C \ - 0x612C 0x6134 0x613D 0x6142 0x6144 0x6173 0x6177 0x6158 \ - 0x6159 0x615A 0x616B 0x6174 0x616F 0x6165 0x6171 0x615F \ - 0x615D 0x6153 0x6175 0x6199 0x6196 0x6187 0x61AC 0x6194 \ - 0x619A 0x618A 0x6191 0x61AB 0x61AE 0x61CC 0x61CA 0x61C9 \ - 0x61F7 0x61C8 0x61C3 0x61C6 0x61BA 0x61CB 0x7F79 0x61CD \ - 0x61E6 0x61E3 0x61F6 0x61FA 0x61F4 0x61FF 0x61FD 0x61FC \ - 0x61FE 0x6200 0x6208 0x6209 0x620D 0x620C 0x6214 0x621B \ - 0x621E 0x6221 0x622A 0x622E 0x6230 0x6232 0x6233 0x6241 \ - 0x624E 0x625E 0x6263 0x625B 0x6260 0x6268 0x627C 0x6282 \ - 0x6289 0x627E 0x6292 0x6293 0x6296 0x62D4 0x6283 0x6294 \ - 0x62D7 0x62D1 0x62BB 0x62CF 0x62FF 0x62C6 0x64D4 0x62C8 \ - 0x62DC 0x62CC 0x62CA 0x62C2 0x62C7 0x629B 0x62C9 0x630C \ - 0x62EE 0x62F1 0x6327 0x6302 0x6308 0x62EF 0x62F5 0x6350 \ - 0x633E 0x634D 0x641C 0x634F 0x6396 0x638E 0x6380 0x63AB \ - 0x6376 0x63A3 0x638F 0x6389 0x639F 0x63B5 0x636B 0x6369 \ - 0x63BE 0x63E9 0x63C0 0x63C6 0x63E3 0x63C9 0x63D2 0x63F6 \ - 0x63C4 0x6416 0x6434 0x6406 0x6413 0x6426 0x6436 0x651D \ - 0x6417 0x6428 0x640F 0x6467 0x646F 0x6476 0x644E 0x652A \ - 0x6495 0x6493 0x64A5 0x64A9 0x6488 0x64BC 0x64DA 0x64D2 \ - 0x64C5 0x64C7 0x64BB 0x64D8 0x64C2 0x64F1 0x64E7 0x8209 \ - 0x64E0 0x64E1 0x62AC 0x64E3 0x64EF 0x652C 0x64F6 0x64F4 -22 0x64F2 0x64FA 0x6500 0x64FD 0x6518 0x651C 0x6505 0x6524 \ - 0x6523 0x652B 0x6534 0x6535 0x6537 0x6536 0x6538 0x754B \ - 0x6548 0x6556 0x6555 0x654D 0x6558 0x655E 0x655D 0x6572 \ - 0x6578 0x6582 0x6583 0x8B8A 0x659B 0x659F 0x65AB 0x65B7 \ - 0x65C3 0x65C6 0x65C1 0x65C4 0x65CC 0x65D2 0x65DB 0x65D9 \ - 0x65E0 0x65E1 0x65F1 0x6772 0x660A 0x6603 0x65FB 0x6773 \ - 0x6635 0x6636 0x6634 0x661C 0x664F 0x6644 0x6649 0x6641 \ - 0x665E 0x665D 0x6664 0x6667 0x6668 0x665F 0x6662 0x6670 \ - 0x6683 0x6688 0x668E 0x6689 0x6684 0x6698 0x669D 0x66C1 \ - 0x66B9 0x66C9 0x66BE 0x66BC 0x66C4 0x66B8 0x66D6 0x66DA \ - 0x66E0 0x663F 0x66E6 0x66E9 0x66F0 0x66F5 0x66F7 0x670F \ - 0x6716 0x671E 0x6726 0x6727 0x9738 0x672E 0x673F 0x6736 \ - 0x6741 0x6738 0x6737 0x6746 0x675E 0x6760 0x6759 0x6763 \ - 0x6764 0x6789 0x6770 0x67A9 0x677C 0x676A 0x678C 0x678B \ - 0x67A6 0x67A1 0x6785 0x67B7 0x67EF 0x67B4 0x67EC 0x67B3 \ - 0x67E9 0x67B8 0x67E4 0x67DE 0x67DD 0x67E2 0x67EE 0x67B9 \ - 0x67CE 0x67C6 0x67E7 0x6A9C 0x681E 0x6846 0x6829 0x6840 \ - 0x684D 0x6832 0x684E 0x68B3 0x682B 0x6859 0x6863 0x6877 \ - 0x687F 0x689F 0x688F 0x68AD 0x6894 0x689D 0x689B 0x6883 \ - 0x6AAE 0x68B9 0x6874 0x68B5 0x68A0 0x68BA 0x690F 0x688D \ - 0x687E 0x6901 0x68CA 0x6908 0x68D8 0x6922 0x6926 0x68E1 \ - 0x690C 0x68CD 0x68D4 0x68E7 0x68D5 0x6936 0x6912 0x6904 \ - 0x68D7 0x68E3 0x6925 0x68F9 0x68E0 0x68EF 0x6928 0x692A \ - 0x691A 0x6923 0x6921 0x68C6 0x6979 0x6977 0x695C 0x6978 \ - 0x696B 0x6954 0x697E 0x696E 0x6939 0x6974 0x693D 0x6959 \ - 0x6930 0x6961 0x695E 0x695D 0x6981 0x696A 0x69B2 0x69AE \ - 0x69D0 0x69BF 0x69C1 0x69D3 0x69BE 0x69CE 0x5BE8 0x69CA \ - 0x69DD 0x69BB 0x69C3 0x69A7 0x6A2E 0x6991 0x69A0 0x699C \ - 0x6995 0x69B4 0x69DE 0x69E8 0x6A02 0x6A1B 0x69FF 0x6B0A \ - 0x69F9 0x69F2 0x69E7 0x6A05 0x69B1 0x6A1E 0x69ED 0x6A14 \ - 0x69EB 0x6A0A 0x6A12 0x6AC1 0x6A23 0x6A13 0x6A44 0x6A0C \ - 0x6A72 0x6A36 0x6A78 0x6A47 0x6A62 0x6A59 0x6A66 0x6A48 -23 0x6A38 0x6A22 0x6A90 0x6A8D 0x6AA0 0x6A84 0x6AA2 0x6AA3 \ - 0x6A97 0x8617 0x6ABB 0x6AC3 0x6AC2 0x6AB8 0x6AB3 0x6AAC \ - 0x6ADE 0x6AD1 0x6ADF 0x6AAA 0x6ADA 0x6AEA 0x6AFB 0x6B05 \ - 0x8616 0x6AFA 0x6B12 0x6B16 0x9B31 0x6B1F 0x6B38 0x6B37 \ - 0x76DC 0x6B39 0x98EE 0x6B47 0x6B43 0x6B49 0x6B50 0x6B59 \ - 0x6B54 0x6B5B 0x6B5F 0x6B61 0x6B78 0x6B79 0x6B7F 0x6B80 \ - 0x6B84 0x6B83 0x6B8D 0x6B98 0x6B95 0x6B9E 0x6BA4 0x6BAA \ - 0x6BAB 0x6BAF 0x6BB2 0x6BB1 0x6BB3 0x6BB7 0x6BBC 0x6BC6 \ - 0x6BCB 0x6BD3 0x6BDF 0x6BEC 0x6BEB 0x6BF3 0x6BEF 0x9EBE \ - 0x6C08 0x6C13 0x6C14 0x6C1B 0x6C24 0x6C23 0x6C5E 0x6C55 \ - 0x6C62 0x6C6A 0x6C82 0x6C8D 0x6C9A 0x6C81 0x6C9B 0x6C7E \ - 0x6C68 0x6C73 0x6C92 0x6C90 0x6CC4 0x6CF1 0x6CD3 0x6CBD \ - 0x6CD7 0x6CC5 0x6CDD 0x6CAE 0x6CB1 0x6CBE 0x6CBA 0x6CDB \ - 0x6CEF 0x6CD9 0x6CEA 0x6D1F 0x884D 0x6D36 0x6D2B 0x6D3D \ - 0x6D38 0x6D19 0x6D35 0x6D33 0x6D12 0x6D0C 0x6D63 0x6D93 \ - 0x6D64 0x6D5A 0x6D79 0x6D59 0x6D8E 0x6D95 0x6FE4 0x6D85 \ - 0x6DF9 0x6E15 0x6E0A 0x6DB5 0x6DC7 0x6DE6 0x6DB8 0x6DC6 \ - 0x6DEC 0x6DDE 0x6DCC 0x6DE8 0x6DD2 0x6DC5 0x6DFA 0x6DD9 \ - 0x6DE4 0x6DD5 0x6DEA 0x6DEE 0x6E2D 0x6E6E 0x6E2E 0x6E19 \ - 0x6E72 0x6E5F 0x6E3E 0x6E23 0x6E6B 0x6E2B 0x6E76 0x6E4D \ - 0x6E1F 0x6E43 0x6E3A 0x6E4E 0x6E24 0x6EFF 0x6E1D 0x6E38 \ - 0x6E82 0x6EAA 0x6E98 0x6EC9 0x6EB7 0x6ED3 0x6EBD 0x6EAF \ - 0x6EC4 0x6EB2 0x6ED4 0x6ED5 0x6E8F 0x6EA5 0x6EC2 0x6E9F \ - 0x6F41 0x6F11 0x704C 0x6EEC 0x6EF8 0x6EFE 0x6F3F 0x6EF2 \ - 0x6F31 0x6EEF 0x6F32 0x6ECC 0x6F3E 0x6F13 0x6EF7 0x6F86 \ - 0x6F7A 0x6F78 0x6F81 0x6F80 0x6F6F 0x6F5B 0x6FF3 0x6F6D \ - 0x6F82 0x6F7C 0x6F58 0x6F8E 0x6F91 0x6FC2 0x6F66 0x6FB3 \ - 0x6FA3 0x6FA1 0x6FA4 0x6FB9 0x6FC6 0x6FAA 0x6FDF 0x6FD5 \ - 0x6FEC 0x6FD4 0x6FD8 0x6FF1 0x6FEE 0x6FDB 0x7009 0x700B \ - 0x6FFA 0x7011 0x7001 0x700F 0x6FFE 0x701B 0x701A 0x6F74 \ - 0x701D 0x7018 0x701F 0x7030 0x703E 0x7032 0x7051 0x7063 \ - 0x7099 0x7092 0x70AF 0x70F1 0x70AC 0x70B8 0x70B3 0x70AE -24 0x70DF 0x70CB 0x70DD 0x70D9 0x7109 0x70FD 0x711C 0x7119 \ - 0x7165 0x7155 0x7188 0x7166 0x7162 0x714C 0x7156 0x716C \ - 0x718F 0x71FB 0x7184 0x7195 0x71A8 0x71AC 0x71D7 0x71B9 \ - 0x71BE 0x71D2 0x71C9 0x71D4 0x71CE 0x71E0 0x71EC 0x71E7 \ - 0x71F5 0x71FC 0x71F9 0x71FF 0x720D 0x7210 0x721B 0x7228 \ - 0x722D 0x722C 0x7230 0x7232 0x723B 0x723C 0x723F 0x7240 \ - 0x7246 0x724B 0x7258 0x7274 0x727E 0x7282 0x7281 0x7287 \ - 0x7292 0x7296 0x72A2 0x72A7 0x72B9 0x72B2 0x72C3 0x72C6 \ - 0x72C4 0x72CE 0x72D2 0x72E2 0x72E0 0x72E1 0x72F9 0x72F7 \ - 0x500F 0x7317 0x730A 0x731C 0x7316 0x731D 0x7334 0x732F \ - 0x7329 0x7325 0x733E 0x734E 0x734F 0x9ED8 0x7357 0x736A \ - 0x7368 0x7370 0x7378 0x7375 0x737B 0x737A 0x73C8 0x73B3 \ - 0x73CE 0x73BB 0x73C0 0x73E5 0x73EE 0x73DE 0x74A2 0x7405 \ - 0x746F 0x7425 0x73F8 0x7432 0x743A 0x7455 0x743F 0x745F \ - 0x7459 0x7441 0x745C 0x7469 0x7470 0x7463 0x746A 0x7476 \ - 0x747E 0x748B 0x749E 0x74A7 0x74CA 0x74CF 0x74D4 0x73F1 \ - 0x74E0 0x74E3 0x74E7 0x74E9 0x74EE 0x74F2 0x74F0 0x74F1 \ - 0x74F8 0x74F7 0x7504 0x7503 0x7505 0x750C 0x750E 0x750D \ - 0x7515 0x7513 0x751E 0x7526 0x752C 0x753C 0x7544 0x754D \ - 0x754A 0x7549 0x755B 0x7546 0x755A 0x7569 0x7564 0x7567 \ - 0x756B 0x756D 0x7578 0x7576 0x7586 0x7587 0x7574 0x758A \ - 0x7589 0x7582 0x7594 0x759A 0x759D 0x75A5 0x75A3 0x75C2 \ - 0x75B3 0x75C3 0x75B5 0x75BD 0x75B8 0x75BC 0x75B1 0x75CD \ - 0x75CA 0x75D2 0x75D9 0x75E3 0x75DE 0x75FE 0x75FF 0x75FC \ - 0x7601 0x75F0 0x75FA 0x75F2 0x75F3 0x760B 0x760D 0x7609 \ - 0x761F 0x7627 0x7620 0x7621 0x7622 0x7624 0x7634 0x7630 \ - 0x763B 0x7647 0x7648 0x7646 0x765C 0x7658 0x7661 0x7662 \ - 0x7668 0x7669 0x766A 0x7667 0x766C 0x7670 0x7672 0x7676 \ - 0x7678 0x767C 0x7680 0x7683 0x7688 0x768B 0x768E 0x7696 \ - 0x7693 0x7699 0x769A 0x76B0 0x76B4 0x76B8 0x76B9 0x76BA \ - 0x76C2 0x76CD 0x76D6 0x76D2 0x76DE 0x76E1 0x76E5 0x76E7 \ - 0x76EA 0x862F 0x76FB 0x7708 0x7707 0x7704 0x7729 0x7724 -25 0x771E 0x7725 0x7726 0x771B 0x7737 0x7738 0x7747 0x775A \ - 0x7768 0x776B 0x775B 0x7765 0x777F 0x777E 0x7779 0x778E \ - 0x778B 0x7791 0x77A0 0x779E 0x77B0 0x77B6 0x77B9 0x77BF \ - 0x77BC 0x77BD 0x77BB 0x77C7 0x77CD 0x77D7 0x77DA 0x77DC \ - 0x77E3 0x77EE 0x77FC 0x780C 0x7812 0x7926 0x7820 0x792A \ - 0x7845 0x788E 0x7874 0x7886 0x787C 0x789A 0x788C 0x78A3 \ - 0x78B5 0x78AA 0x78AF 0x78D1 0x78C6 0x78CB 0x78D4 0x78BE \ - 0x78BC 0x78C5 0x78CA 0x78EC 0x78E7 0x78DA 0x78FD 0x78F4 \ - 0x7907 0x7912 0x7911 0x7919 0x792C 0x792B 0x7940 0x7960 \ - 0x7957 0x795F 0x795A 0x7955 0x7953 0x797A 0x797F 0x798A \ - 0x799D 0x79A7 0x9F4B 0x79AA 0x79AE 0x79B3 0x79B9 0x79BA \ - 0x79C9 0x79D5 0x79E7 0x79EC 0x79E1 0x79E3 0x7A08 0x7A0D \ - 0x7A18 0x7A19 0x7A20 0x7A1F 0x7980 0x7A31 0x7A3B 0x7A3E \ - 0x7A37 0x7A43 0x7A57 0x7A49 0x7A61 0x7A62 0x7A69 0x9F9D \ - 0x7A70 0x7A79 0x7A7D 0x7A88 0x7A97 0x7A95 0x7A98 0x7A96 \ - 0x7AA9 0x7AC8 0x7AB0 0x7AB6 0x7AC5 0x7AC4 0x7ABF 0x9083 \ - 0x7AC7 0x7ACA 0x7ACD 0x7ACF 0x7AD5 0x7AD3 0x7AD9 0x7ADA \ - 0x7ADD 0x7AE1 0x7AE2 0x7AE6 0x7AED 0x7AF0 0x7B02 0x7B0F \ - 0x7B0A 0x7B06 0x7B33 0x7B18 0x7B19 0x7B1E 0x7B35 0x7B28 \ - 0x7B36 0x7B50 0x7B7A 0x7B04 0x7B4D 0x7B0B 0x7B4C 0x7B45 \ - 0x7B75 0x7B65 0x7B74 0x7B67 0x7B70 0x7B71 0x7B6C 0x7B6E \ - 0x7B9D 0x7B98 0x7B9F 0x7B8D 0x7B9C 0x7B9A 0x7B8B 0x7B92 \ - 0x7B8F 0x7B5D 0x7B99 0x7BCB 0x7BC1 0x7BCC 0x7BCF 0x7BB4 \ - 0x7BC6 0x7BDD 0x7BE9 0x7C11 0x7C14 0x7BE6 0x7BE5 0x7C60 \ - 0x7C00 0x7C07 0x7C13 0x7BF3 0x7BF7 0x7C17 0x7C0D 0x7BF6 \ - 0x7C23 0x7C27 0x7C2A 0x7C1F 0x7C37 0x7C2B 0x7C3D 0x7C4C \ - 0x7C43 0x7C54 0x7C4F 0x7C40 0x7C50 0x7C58 0x7C5F 0x7C64 \ - 0x7C56 0x7C65 0x7C6C 0x7C75 0x7C83 0x7C90 0x7CA4 0x7CAD \ - 0x7CA2 0x7CAB 0x7CA1 0x7CA8 0x7CB3 0x7CB2 0x7CB1 0x7CAE \ - 0x7CB9 0x7CBD 0x7CC0 0x7CC5 0x7CC2 0x7CD8 0x7CD2 0x7CDC \ - 0x7CE2 0x9B3B 0x7CEF 0x7CF2 0x7CF4 0x7CF6 0x7CFA 0x7D06 \ - 0x7D02 0x7D1C 0x7D15 0x7D0A 0x7D45 0x7D4B 0x7D2E 0x7D32 -26 0x7D3F 0x7D35 0x7D46 0x7D73 0x7D56 0x7D4E 0x7D72 0x7D68 \ - 0x7D6E 0x7D4F 0x7D63 0x7D93 0x7D89 0x7D5B 0x7D8F 0x7D7D \ - 0x7D9B 0x7DBA 0x7DAE 0x7DA3 0x7DB5 0x7DC7 0x7DBD 0x7DAB \ - 0x7E3D 0x7DA2 0x7DAF 0x7DDC 0x7DB8 0x7D9F 0x7DB0 0x7DD8 \ - 0x7DDD 0x7DE4 0x7DDE 0x7DFB 0x7DF2 0x7DE1 0x7E05 0x7E0A \ - 0x7E23 0x7E21 0x7E12 0x7E31 0x7E1F 0x7E09 0x7E0B 0x7E22 \ - 0x7E46 0x7E66 0x7E3B 0x7E35 0x7E39 0x7E43 0x7E37 0x7E32 \ - 0x7E3A 0x7E67 0x7E5D 0x7E56 0x7E5E 0x7E59 0x7E5A 0x7E79 \ - 0x7E6A 0x7E69 0x7E7C 0x7E7B 0x7E83 0x7DD5 0x7E7D 0x8FAE \ - 0x7E7F 0x7E88 0x7E89 0x7E8C 0x7E92 0x7E90 0x7E93 0x7E94 \ - 0x7E96 0x7E8E 0x7E9B 0x7E9C 0x7F38 0x7F3A 0x7F45 0x7F4C \ - 0x7F4D 0x7F4E 0x7F50 0x7F51 0x7F55 0x7F54 0x7F58 0x7F5F \ - 0x7F60 0x7F68 0x7F69 0x7F67 0x7F78 0x7F82 0x7F86 0x7F83 \ - 0x7F88 0x7F87 0x7F8C 0x7F94 0x7F9E 0x7F9D 0x7F9A 0x7FA3 \ - 0x7FAF 0x7FB2 0x7FB9 0x7FAE 0x7FB6 0x7FB8 0x8B71 0x7FC5 \ - 0x7FC6 0x7FCA 0x7FD5 0x7FD4 0x7FE1 0x7FE6 0x7FE9 0x7FF3 \ - 0x7FF9 0x98DC 0x8006 0x8004 0x800B 0x8012 0x8018 0x8019 \ - 0x801C 0x8021 0x8028 0x803F 0x803B 0x804A 0x8046 0x8052 \ - 0x8058 0x805A 0x805F 0x8062 0x8068 0x8073 0x8072 0x8070 \ - 0x8076 0x8079 0x807D 0x807F 0x8084 0x8086 0x8085 0x809B \ - 0x8093 0x809A 0x80AD 0x5190 0x80AC 0x80DB 0x80E5 0x80D9 \ - 0x80DD 0x80C4 0x80DA 0x80D6 0x8109 0x80EF 0x80F1 0x811B \ - 0x8129 0x8123 0x812F 0x814B 0x968B 0x8146 0x813E 0x8153 \ - 0x8151 0x80FC 0x8171 0x816E 0x8165 0x8166 0x8174 0x8183 \ - 0x8188 0x818A 0x8180 0x8182 0x81A0 0x8195 0x81A4 0x81A3 \ - 0x815F 0x8193 0x81A9 0x81B0 0x81B5 0x81BE 0x81B8 0x81BD \ - 0x81C0 0x81C2 0x81BA 0x81C9 0x81CD 0x81D1 0x81D9 0x81D8 \ - 0x81C8 0x81DA 0x81DF 0x81E0 0x81E7 0x81FA 0x81FB 0x81FE \ - 0x8201 0x8202 0x8205 0x8207 0x820A 0x820D 0x8210 0x8216 \ - 0x8229 0x822B 0x8238 0x8233 0x8240 0x8259 0x8258 0x825D \ - 0x825A 0x825F 0x8264 0x8262 0x8268 0x826A 0x826B 0x822E \ - 0x8271 0x8277 0x8278 0x827E 0x828D 0x8292 0x82AB 0x829F -27 0x82BB 0x82AC 0x82E1 0x82E3 0x82DF 0x82D2 0x82F4 0x82F3 \ - 0x82FA 0x8393 0x8303 0x82FB 0x82F9 0x82DE 0x8306 0x82DC \ - 0x8309 0x82D9 0x8335 0x8334 0x8316 0x8332 0x8331 0x8340 \ - 0x8339 0x8350 0x8345 0x832F 0x832B 0x8317 0x8318 0x8385 \ - 0x839A 0x83AA 0x839F 0x83A2 0x8396 0x8323 0x838E 0x8387 \ - 0x838A 0x837C 0x83B5 0x8373 0x8375 0x83A0 0x8389 0x83A8 \ - 0x83F4 0x8413 0x83EB 0x83CE 0x83FD 0x8403 0x83D8 0x840B \ - 0x83C1 0x83F7 0x8407 0x83E0 0x83F2 0x840D 0x8422 0x8420 \ - 0x83BD 0x8438 0x8506 0x83FB 0x846D 0x842A 0x843C 0x855A \ - 0x8484 0x8477 0x846B 0x84AD 0x846E 0x8482 0x8469 0x8446 \ - 0x842C 0x846F 0x8479 0x8435 0x84CA 0x8462 0x84B9 0x84BF \ - 0x849F 0x84D9 0x84CD 0x84BB 0x84DA 0x84D0 0x84C1 0x84C6 \ - 0x84D6 0x84A1 0x8521 0x84FF 0x84F4 0x8517 0x8518 0x852C \ - 0x851F 0x8515 0x8514 0x84FC 0x8540 0x8563 0x8558 0x8548 \ - 0x8541 0x8602 0x854B 0x8555 0x8580 0x85A4 0x8588 0x8591 \ - 0x858A 0x85A8 0x856D 0x8594 0x859B 0x85EA 0x8587 0x859C \ - 0x8577 0x857E 0x8590 0x85C9 0x85BA 0x85CF 0x85B9 0x85D0 \ - 0x85D5 0x85DD 0x85E5 0x85DC 0x85F9 0x860A 0x8613 0x860B \ - 0x85FE 0x85FA 0x8606 0x8622 0x861A 0x8630 0x863F 0x864D \ - 0x4E55 0x8654 0x865F 0x8667 0x8671 0x8693 0x86A3 0x86A9 \ - 0x86AA 0x868B 0x868C 0x86B6 0x86AF 0x86C4 0x86C6 0x86B0 \ - 0x86C9 0x8823 0x86AB 0x86D4 0x86DE 0x86E9 0x86EC 0x86DF \ - 0x86DB 0x86EF 0x8712 0x8706 0x8708 0x8700 0x8703 0x86FB \ - 0x8711 0x8709 0x870D 0x86F9 0x870A 0x8734 0x873F 0x8737 \ - 0x873B 0x8725 0x8729 0x871A 0x8760 0x875F 0x8778 0x874C \ - 0x874E 0x8774 0x8757 0x8768 0x876E 0x8759 0x8753 0x8763 \ - 0x876A 0x8805 0x87A2 0x879F 0x8782 0x87AF 0x87CB 0x87BD \ - 0x87C0 0x87D0 0x96D6 0x87AB 0x87C4 0x87B3 0x87C7 0x87C6 \ - 0x87BB 0x87EF 0x87F2 0x87E0 0x880F 0x880D 0x87FE 0x87F6 \ - 0x87F7 0x880E 0x87D2 0x8811 0x8816 0x8815 0x8822 0x8821 \ - 0x8831 0x8836 0x8839 0x8827 0x883B 0x8844 0x8842 0x8852 \ - 0x8859 0x885E 0x8862 0x886B 0x8881 0x887E 0x889E 0x8875 -28 0x887D 0x88B5 0x8872 0x8882 0x8897 0x8892 0x88AE 0x8899 \ - 0x88A2 0x888D 0x88A4 0x88B0 0x88BF 0x88B1 0x88C3 0x88C4 \ - 0x88D4 0x88D8 0x88D9 0x88DD 0x88F9 0x8902 0x88FC 0x88F4 \ - 0x88E8 0x88F2 0x8904 0x890C 0x890A 0x8913 0x8943 0x891E \ - 0x8925 0x892A 0x892B 0x8941 0x8944 0x893B 0x8936 0x8938 \ - 0x894C 0x891D 0x8960 0x895E 0x8966 0x8964 0x896D 0x896A \ - 0x896F 0x8974 0x8977 0x897E 0x8983 0x8988 0x898A 0x8993 \ - 0x8998 0x89A1 0x89A9 0x89A6 0x89AC 0x89AF 0x89B2 0x89BA \ - 0x89BD 0x89BF 0x89C0 0x89DA 0x89DC 0x89DD 0x89E7 0x89F4 \ - 0x89F8 0x8A03 0x8A16 0x8A10 0x8A0C 0x8A1B 0x8A1D 0x8A25 \ - 0x8A36 0x8A41 0x8A5B 0x8A52 0x8A46 0x8A48 0x8A7C 0x8A6D \ - 0x8A6C 0x8A62 0x8A85 0x8A82 0x8A84 0x8AA8 0x8AA1 0x8A91 \ - 0x8AA5 0x8AA6 0x8A9A 0x8AA3 0x8AC4 0x8ACD 0x8AC2 0x8ADA \ - 0x8AEB 0x8AF3 0x8AE7 0x8AE4 0x8AF1 0x8B14 0x8AE0 0x8AE2 \ - 0x8AF7 0x8ADE 0x8ADB 0x8B0C 0x8B07 0x8B1A 0x8AE1 0x8B16 \ - 0x8B10 0x8B17 0x8B20 0x8B33 0x97AB 0x8B26 0x8B2B 0x8B3E \ - 0x8B28 0x8B41 0x8B4C 0x8B4F 0x8B4E 0x8B49 0x8B56 0x8B5B \ - 0x8B5A 0x8B6B 0x8B5F 0x8B6C 0x8B6F 0x8B74 0x8B7D 0x8B80 \ - 0x8B8C 0x8B8E 0x8B92 0x8B93 0x8B96 0x8B99 0x8B9A 0x8C3A \ - 0x8C41 0x8C3F 0x8C48 0x8C4C 0x8C4E 0x8C50 0x8C55 0x8C62 \ - 0x8C6C 0x8C78 0x8C7A 0x8C82 0x8C89 0x8C85 0x8C8A 0x8C8D \ - 0x8C8E 0x8C94 0x8C7C 0x8C98 0x621D 0x8CAD 0x8CAA 0x8CBD \ - 0x8CB2 0x8CB3 0x8CAE 0x8CB6 0x8CC8 0x8CC1 0x8CE4 0x8CE3 \ - 0x8CDA 0x8CFD 0x8CFA 0x8CFB 0x8D04 0x8D05 0x8D0A 0x8D07 \ - 0x8D0F 0x8D0D 0x8D10 0x9F4E 0x8D13 0x8CCD 0x8D14 0x8D16 \ - 0x8D67 0x8D6D 0x8D71 0x8D73 0x8D81 0x8D99 0x8DC2 0x8DBE \ - 0x8DBA 0x8DCF 0x8DDA 0x8DD6 0x8DCC 0x8DDB 0x8DCB 0x8DEA \ - 0x8DEB 0x8DDF 0x8DE3 0x8DFC 0x8E08 0x8E09 0x8DFF 0x8E1D \ - 0x8E1E 0x8E10 0x8E1F 0x8E42 0x8E35 0x8E30 0x8E34 0x8E4A \ - 0x8E47 0x8E49 0x8E4C 0x8E50 0x8E48 0x8E59 0x8E64 0x8E60 \ - 0x8E2A 0x8E63 0x8E55 0x8E76 0x8E72 0x8E7C 0x8E81 0x8E87 \ - 0x8E85 0x8E84 0x8E8B 0x8E8A 0x8E93 0x8E91 0x8E94 0x8E99 -29 0x8EAA 0x8EA1 0x8EAC 0x8EB0 0x8EC6 0x8EB1 0x8EBE 0x8EC5 \ - 0x8EC8 0x8ECB 0x8EDB 0x8EE3 0x8EFC 0x8EFB 0x8EEB 0x8EFE \ - 0x8F0A 0x8F05 0x8F15 0x8F12 0x8F19 0x8F13 0x8F1C 0x8F1F \ - 0x8F1B 0x8F0C 0x8F26 0x8F33 0x8F3B 0x8F39 0x8F45 0x8F42 \ - 0x8F3E 0x8F4C 0x8F49 0x8F46 0x8F4E 0x8F57 0x8F5C 0x8F62 \ - 0x8F63 0x8F64 0x8F9C 0x8F9F 0x8FA3 0x8FAD 0x8FAF 0x8FB7 \ - 0x8FDA 0x8FE5 0x8FE2 0x8FEA 0x8FEF 0x9087 0x8FF4 0x9005 \ - 0x8FF9 0x8FFA 0x9011 0x9015 0x9021 0x900D 0x901E 0x9016 \ - 0x900B 0x9027 0x9036 0x9035 0x9039 0x8FF8 0x904F 0x9050 \ - 0x9051 0x9052 0x900E 0x9049 0x903E 0x9056 0x9058 0x905E \ - 0x9068 0x906F 0x9076 0x96A8 0x9072 0x9082 0x907D 0x9081 \ - 0x9080 0x908A 0x9089 0x908F 0x90A8 0x90AF 0x90B1 0x90B5 \ - 0x90E2 0x90E4 0x6248 0x90DB 0x9102 0x9112 0x9119 0x9132 \ - 0x9130 0x914A 0x9156 0x9158 0x9163 0x9165 0x9169 0x9173 \ - 0x9172 0x918B 0x9189 0x9182 0x91A2 0x91AB 0x91AF 0x91AA \ - 0x91B5 0x91B4 0x91BA 0x91C0 0x91C1 0x91C9 0x91CB 0x91D0 \ - 0x91D6 0x91DF 0x91E1 0x91DB 0x91FC 0x91F5 0x91F6 0x921E \ - 0x91FF 0x9214 0x922C 0x9215 0x9211 0x925E 0x9257 0x9245 \ - 0x9249 0x9264 0x9248 0x9295 0x923F 0x924B 0x9250 0x929C \ - 0x9296 0x9293 0x929B 0x925A 0x92CF 0x92B9 0x92B7 0x92E9 \ - 0x930F 0x92FA 0x9344 0x932E 0x9319 0x9322 0x931A 0x9323 \ - 0x933A 0x9335 0x933B 0x935C 0x9360 0x937C 0x936E 0x9356 \ - 0x93B0 0x93AC 0x93AD 0x9394 0x93B9 0x93D6 0x93D7 0x93E8 \ - 0x93E5 0x93D8 0x93C3 0x93DD 0x93D0 0x93C8 0x93E4 0x941A \ - 0x9414 0x9413 0x9403 0x9407 0x9410 0x9436 0x942B 0x9435 \ - 0x9421 0x943A 0x9441 0x9452 0x9444 0x945B 0x9460 0x9462 \ - 0x945E 0x946A 0x9229 0x9470 0x9475 0x9477 0x947D 0x945A \ - 0x947C 0x947E 0x9481 0x947F 0x9582 0x9587 0x958A 0x9594 \ - 0x9596 0x9598 0x9599 0x95A0 0x95A8 0x95A7 0x95AD 0x95BC \ - 0x95BB 0x95B9 0x95BE 0x95CA 0x6FF6 0x95C3 0x95CD 0x95CC \ - 0x95D5 0x95D4 0x95D6 0x95DC 0x95E1 0x95E5 0x95E2 0x9621 \ - 0x9628 0x962E 0x962F 0x9642 0x964C 0x964F 0x964B 0x9677 -30 0x965C 0x965E 0x965D 0x965F 0x9666 0x9672 0x966C 0x968D \ - 0x9698 0x9695 0x9697 0x96AA 0x96A7 0x96B1 0x96B2 0x96B0 \ - 0x96B4 0x96B6 0x96B8 0x96B9 0x96CE 0x96CB 0x96C9 0x96CD \ - 0x894D 0x96DC 0x970D 0x96D5 0x96F9 0x9704 0x9706 0x9708 \ - 0x9713 0x970E 0x9711 0x970F 0x9716 0x9719 0x9724 0x972A \ - 0x9730 0x9739 0x973D 0x973E 0x9744 0x9746 0x9748 0x9742 \ - 0x9749 0x975C 0x9760 0x9764 0x9766 0x9768 0x52D2 0x976B \ - 0x9771 0x9779 0x9785 0x977C 0x9781 0x977A 0x9786 0x978B \ - 0x978F 0x9790 0x979C 0x97A8 0x97A6 0x97A3 0x97B3 0x97B4 \ - 0x97C3 0x97C6 0x97C8 0x97CB 0x97DC 0x97ED 0x9F4F 0x97F2 \ - 0x7ADF 0x97F6 0x97F5 0x980F 0x980C 0x9838 0x9824 0x9821 \ - 0x9837 0x983D 0x9846 0x984F 0x984B 0x986B 0x986F 0x9870 \ - 0x9871 0x9874 0x9873 0x98AA 0x98AF 0x98B1 0x98B6 0x98C4 \ - 0x98C3 0x98C6 0x98E9 0x98EB 0x9903 0x9909 0x9912 0x9914 \ - 0x9918 0x9921 0x991D 0x991E 0x9924 0x9920 0x992C 0x992E \ - 0x993D 0x993E 0x9942 0x9949 0x9945 0x9950 0x994B 0x9951 \ - 0x9952 0x994C 0x9955 0x9997 0x9998 0x99A5 0x99AD 0x99AE \ - 0x99BC 0x99DF 0x99DB 0x99DD 0x99D8 0x99D1 0x99ED 0x99EE \ - 0x99F1 0x99F2 0x99FB 0x99F8 0x9A01 0x9A0F 0x9A05 0x99E2 \ - 0x9A19 0x9A2B 0x9A37 0x9A45 0x9A42 0x9A40 0x9A43 0x9A3E \ - 0x9A55 0x9A4D 0x9A5B 0x9A57 0x9A5F 0x9A62 0x9A65 0x9A64 \ - 0x9A69 0x9A6B 0x9A6A 0x9AAD 0x9AB0 0x9ABC 0x9AC0 0x9ACF \ - 0x9AD1 0x9AD3 0x9AD4 0x9ADE 0x9ADF 0x9AE2 0x9AE3 0x9AE6 \ - 0x9AEF 0x9AEB 0x9AEE 0x9AF4 0x9AF1 0x9AF7 0x9AFB 0x9B06 \ - 0x9B18 0x9B1A 0x9B1F 0x9B22 0x9B23 0x9B25 0x9B27 0x9B28 \ - 0x9B29 0x9B2A 0x9B2E 0x9B2F 0x9B32 0x9B44 0x9B43 0x9B4F \ - 0x9B4D 0x9B4E 0x9B51 0x9B58 0x9B74 0x9B93 0x9B83 0x9B91 \ - 0x9B96 0x9B97 0x9B9F 0x9BA0 0x9BA8 0x9BB4 0x9BC0 0x9BCA \ - 0x9BB9 0x9BC6 0x9BCF 0x9BD1 0x9BD2 0x9BE3 0x9BE2 0x9BE4 \ - 0x9BD4 0x9BE1 0x9C3A 0x9BF2 0x9BF1 0x9BF0 0x9C15 0x9C14 \ - 0x9C09 0x9C13 0x9C0C 0x9C06 0x9C08 0x9C12 0x9C0A 0x9C04 \ - 0x9C2E 0x9C1B 0x9C25 0x9C24 0x9C21 0x9C30 0x9C47 0x9C32 -31 0x9C46 0x9C3E 0x9C5A 0x9C60 0x9C67 0x9C76 0x9C78 0x9CE7 \ - 0x9CEC 0x9CF0 0x9D09 0x9D08 0x9CEB 0x9D03 0x9D06 0x9D2A \ - 0x9D26 0x9DAF 0x9D23 0x9D1F 0x9D44 0x9D15 0x9D12 0x9D41 \ - 0x9D3F 0x9D3E 0x9D46 0x9D48 0x9D5D 0x9D5E 0x9D64 0x9D51 \ - 0x9D50 0x9D59 0x9D72 0x9D89 0x9D87 0x9DAB 0x9D6F 0x9D7A \ - 0x9D9A 0x9DA4 0x9DA9 0x9DB2 0x9DC4 0x9DC1 0x9DBB 0x9DB8 \ - 0x9DBA 0x9DC6 0x9DCF 0x9DC2 0x9DD9 0x9DD3 0x9DF8 0x9DE6 \ - 0x9DED 0x9DEF 0x9DFD 0x9E1A 0x9E1B 0x9E1E 0x9E75 0x9E79 \ - 0x9E7D 0x9E81 0x9E88 0x9E8B 0x9E8C 0x9E92 0x9E95 0x9E91 \ - 0x9E9D 0x9EA5 0x9EA9 0x9EB8 0x9EAA 0x9EAD 0x9761 0x9ECC \ - 0x9ECE 0x9ECF 0x9ED0 0x9ED4 0x9EDC 0x9EDE 0x9EDD 0x9EE0 \ - 0x9EE5 0x9EE8 0x9EEF 0x9EF4 0x9EF6 0x9EF7 0x9EF9 0x9EFB \ - 0x9EFC 0x9EFD 0x9F07 0x9F08 0x76B7 0x9F15 0x9F21 0x9F2C \ - 0x9F3E 0x9F4A 0x9F52 0x9F54 0x9F63 0x9F5F 0x9F60 0x9F61 \ - 0x9F66 0x9F67 0x9F6C 0x9F6A 0x9F77 0x9F72 0x9F76 0x9F95 \ - 0x9F9C 0x9FA0 0x582F 0x69C7 0x9059 0x7464 0x51DC 0x7199 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -32 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -33 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -34 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -35 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/UKS.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/UKS.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/UKS.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/UKS.sfd:1.1.1.1 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/UKS.sfd Wed Mar 16 20:59:34 2005 @@ -1,1114 +0,0 @@ -# UKS.sfd -# -# subfont numbers for KSC 5601 encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. -# -# The input encoding is Unicode. - -01 0x3000 0x3001 0x3002 0x00B7 0x2025 0x2026 0x00A8 0x3003 \ - 0x00AD 0x2015 0x2225 0xFF3C 0x223C 0x2018 0x2019 0x201C \ - 0x201D 0x3014 0x3015 0x3008 0x3009 0x300A 0x300B 0x300C \ - 0x300D 0x300E 0x300F 0x3010 0x3011 0x00B1 0x00D7 0x00F7 \ - 0x2260 0x2264 0x2265 0x221E 0x2234 0x00B0 0x2032 0x2033 \ - 0x2103 0x212B 0xFFE0 0xFFE1 0xFFE5 0x2642 0x2640 0x2220 \ - 0x22A5 0x2312 0x2202 0x2207 0x2261 0x2252 0x00A7 0x203B \ - 0x2606 0x2605 0x25CB 0x25CF 0x25CE 0x25C7 0x25C6 0x25A1 \ - 0x25A0 0x25B3 0x25B2 0x25BD 0x25BC 0x2192 0x2190 0x2191 \ - 0x2193 0x2194 0x3013 0x226A 0x226B 0x221A 0x223D 0x221D \ - 0x2235 0x222B 0x222C 0x2208 0x220B 0x2286 0x2287 0x2282 \ - 0x2283 0x222A 0x2229 0x2227 0x2228 0xFFE2 0x21D2 0x21D4 \ - 0x2200 0x2203 0x00B4 0xFF5E 0x02C7 0x02D8 0x02DD 0x02DA \ - 0x02D9 0x00B8 0x02DB 0x00A1 0x00BF 0x02D0 0x222E 0x2211 \ - 0x220F 0x00A4 0x2109 0x2030 0x25C1 0x25C0 0x25B7 0x25B6 \ - 0x2664 0x2660 0x2661 0x2665 0x2667 0x2663 0x2299 0x25C8 \ - 0x25A3 0x25D0 0x25D1 0x2592 0x25A4 0x25A5 0x25A8 0x25A7 \ - 0x25A6 0x25A9 0x2668 0x260F 0x260E 0x261C 0x261E 0x00B6 \ - 0x2020 0x2021 0x2195 0x2197 0x2199 0x2196 0x2198 0x266D \ - 0x2669 0x266A 0x266C 0x327F 0x321C 0x2116 0x33C7 0x2122 \ - 0x33C2 0x33D8 0x2121 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFF01 0xFF02 0xFF03 0xFF04 \ - 0xFF05 0xFF06 0xFF07 0xFF08 0xFF09 0xFF0A 0xFF0B 0xFF0C \ - 0xFF0D 0xFF0E 0xFF0F 0xFF10 0xFF11 0xFF12 0xFF13 0xFF14 \ - 0xFF15 0xFF16 0xFF17 0xFF18 0xFF19 0xFF1A 0xFF1B 0xFF1C \ - 0xFF1D 0xFF1E 0xFF1F 0xFF20 0xFF21 0xFF22 0xFF23 0xFF24 \ - 0xFF25 0xFF26 0xFF27 0xFF28 0xFF29 0xFF2A 0xFF2B 0xFF2C \ - 0xFF2D 0xFF2E 0xFF2F 0xFF30 0xFF31 0xFF32 0xFF33 0xFF34 \ - 0xFF35 0xFF36 0xFF37 0xFF38 0xFF39 0xFF3A 0xFF3B 0xFFE6 \ - 0xFF3D 0xFF3E 0xFF3F 0xFF40 0xFF41 0xFF42 0xFF43 0xFF44 -02 0xFF45 0xFF46 0xFF47 0xFF48 0xFF49 0xFF4A 0xFF4B 0xFF4C \ - 0xFF4D 0xFF4E 0xFF4F 0xFF50 0xFF51 0xFF52 0xFF53 0xFF54 \ - 0xFF55 0xFF56 0xFF57 0xFF58 0xFF59 0xFF5A 0xFF5B 0xFF5C \ - 0xFF5D 0xFFE3 0x3131 0x3132 0x3133 0x3134 0x3135 0x3136 \ - 0x3137 0x3138 0x3139 0x313A 0x313B 0x313C 0x313D 0x313E \ - 0x313F 0x3140 0x3141 0x3142 0x3143 0x3144 0x3145 0x3146 \ - 0x3147 0x3148 0x3149 0x314A 0x314B 0x314C 0x314D 0x314E \ - 0x314F 0x3150 0x3151 0x3152 0x3153 0x3154 0x3155 0x3156 \ - 0x3157 0x3158 0x3159 0x315A 0x315B 0x315C 0x315D 0x315E \ - 0x315F 0x3160 0x3161 0x3162 0x3163 0x3164 0x3165 0x3166 \ - 0x3167 0x3168 0x3169 0x316A 0x316B 0x316C 0x316D 0x316E \ - 0x316F 0x3170 0x3171 0x3172 0x3173 0x3174 0x3175 0x3176 \ - 0x3177 0x3178 0x3179 0x317A 0x317B 0x317C 0x317D 0x317E \ - 0x317F 0x3180 0x3181 0x3182 0x3183 0x3184 0x3185 0x3186 \ - 0x3187 0x3188 0x3189 0x318A 0x318B 0x318C 0x318D 0x318E \ - 0x2170 0x2171 0x2172 0x2173 0x2174 0x2175 0x2176 0x2177 \ - 0x2178 0x2179 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2160 \ - 0x2161 0x2162 0x2163 0x2164 0x2165 0x2166 0x2167 0x2168 \ - 0x2169 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x0391 0x0392 0x0393 0x0394 0x0395 0x0396 0x0397 0x0398 \ - 0x0399 0x039A 0x039B 0x039C 0x039D 0x039E 0x039F 0x03A0 \ - 0x03A1 0x03A3 0x03A4 0x03A5 0x03A6 0x03A7 0x03A8 0x03A9 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0x03B1 0x03B2 0x03B3 0x03B4 0x03B5 0x03B6 0x03B7 0x03B8 \ - 0x03B9 0x03BA 0x03BB 0x03BC 0x03BD 0x03BE 0x03BF 0x03C0 \ - 0x03C1 0x03C3 0x03C4 0x03C5 0x03C6 0x03C7 0x03C8 0x03C9 \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x2500 0x2502 \ - 0x250C 0x2510 0x2518 0x2514 0x251C 0x252C 0x2524 0x2534 \ - 0x253C 0x2501 0x2503 0x250F 0x2513 0x251B 0x2517 0x2523 \ - 0x2533 0x252B 0x253B 0x254B 0x2520 0x252F 0x2528 0x2537 \ - 0x253F 0x251D 0x2530 0x2525 0x2538 0x2542 0x2512 0x2511 \ - 0x251A 0x2519 0x2516 0x2515 0x250E 0x250D 0x251E 0x251F -03 0x2521 0x2522 0x2526 0x2527 0x2529 0x252A 0x252D 0x252E \ - 0x2531 0x2532 0x2535 0x2536 0x2539 0x253A 0x253D 0x253E \ - 0x2540 0x2541 0x2543 0x2544 0x2545 0x2546 0x2547 0x2548 \ - 0x2549 0x254A 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x3395 0x3396 0x3397 0x2113 \ - 0x3398 0x33C4 0x33A3 0x33A4 0x33A5 0x33A6 0x3399 0x339A \ - 0x339B 0x339C 0x339D 0x339E 0x339F 0x33A0 0x33A1 0x33A2 \ - 0x33CA 0x338D 0x338E 0x338F 0x33CF 0x3388 0x3389 0x33C8 \ - 0x33A7 0x33A8 0x33B0 0x33B1 0x33B2 0x33B3 0x33B4 0x33B5 \ - 0x33B6 0x33B7 0x33B8 0x33B9 0x3380 0x3381 0x3382 0x3383 \ - 0x3384 0x33BA 0x33BB 0x33BC 0x33BD 0x33BE 0x33BF 0x3390 \ - 0x3391 0x3392 0x3393 0x3394 0x2126 0x33C0 0x33C1 0x338A \ - 0x338B 0x338C 0x33D6 0x33C5 0x33AD 0x33AE 0x33AF 0x33DB \ - 0x33A9 0x33AA 0x33AB 0x33AC 0x33DD 0x33D0 0x33D3 0x33C3 \ - 0x33C9 0x33DC 0x33C6 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x00C6 0x00D0 0x00AA 0x0126 0xFFFE 0x0132 \ - 0xFFFE 0x013F 0x0141 0x00D8 0x0152 0x00BA 0x00DE 0x0166 \ - 0x014A 0xFFFE 0x3260 0x3261 0x3262 0x3263 0x3264 0x3265 \ - 0x3266 0x3267 0x3268 0x3269 0x326A 0x326B 0x326C 0x326D \ - 0x326E 0x326F 0x3270 0x3271 0x3272 0x3273 0x3274 0x3275 \ - 0x3276 0x3277 0x3278 0x3279 0x327A 0x327B 0x24D0 0x24D1 \ - 0x24D2 0x24D3 0x24D4 0x24D5 0x24D6 0x24D7 0x24D8 0x24D9 \ - 0x24DA 0x24DB 0x24DC 0x24DD 0x24DE 0x24DF 0x24E0 0x24E1 \ - 0x24E2 0x24E3 0x24E4 0x24E5 0x24E6 0x24E7 0x24E8 0x24E9 \ - 0x2460 0x2461 0x2462 0x2463 0x2464 0x2465 0x2466 0x2467 \ - 0x2468 0x2469 0x246A 0x246B 0x246C 0x246D 0x246E 0x00BD \ - 0x2153 0x2154 0x00BC 0x00BE 0x215B 0x215C 0x215D 0x215E \ - 0x00E6 0x0111 0x00F0 0x0127 0x0131 0x0133 0x0138 0x0140 \ - 0x0142 0x00F8 0x0153 0x00DF 0x00FE 0x0167 0x014B 0x0149 -04 0x3200 0x3201 0x3202 0x3203 0x3204 0x3205 0x3206 0x3207 \ - 0x3208 0x3209 0x320A 0x320B 0x320C 0x320D 0x320E 0x320F \ - 0x3210 0x3211 0x3212 0x3213 0x3214 0x3215 0x3216 0x3217 \ - 0x3218 0x3219 0x321A 0x321B 0x249C 0x249D 0x249E 0x249F \ - 0x24A0 0x24A1 0x24A2 0x24A3 0x24A4 0x24A5 0x24A6 0x24A7 \ - 0x24A8 0x24A9 0x24AA 0x24AB 0x24AC 0x24AD 0x24AE 0x24AF \ - 0x24B0 0x24B1 0x24B2 0x24B3 0x24B4 0x24B5 0x2474 0x2475 \ - 0x2476 0x2477 0x2478 0x2479 0x247A 0x247B 0x247C 0x247D \ - 0x247E 0x247F 0x2480 0x2481 0x2482 0x00B9 0x00B2 0x00B3 \ - 0x2074 0x207F 0x2081 0x2082 0x2083 0x2084 0x3041 0x3042 \ - 0x3043 0x3044 0x3045 0x3046 0x3047 0x3048 0x3049 0x304A \ - 0x304B 0x304C 0x304D 0x304E 0x304F 0x3050 0x3051 0x3052 \ - 0x3053 0x3054 0x3055 0x3056 0x3057 0x3058 0x3059 0x305A \ - 0x305B 0x305C 0x305D 0x305E 0x305F 0x3060 0x3061 0x3062 \ - 0x3063 0x3064 0x3065 0x3066 0x3067 0x3068 0x3069 0x306A \ - 0x306B 0x306C 0x306D 0x306E 0x306F 0x3070 0x3071 0x3072 \ - 0x3073 0x3074 0x3075 0x3076 0x3077 0x3078 0x3079 0x307A \ - 0x307B 0x307C 0x307D 0x307E 0x307F 0x3080 0x3081 0x3082 \ - 0x3083 0x3084 0x3085 0x3086 0x3087 0x3088 0x3089 0x308A \ - 0x308B 0x308C 0x308D 0x308E 0x308F 0x3090 0x3091 0x3092 \ - 0x3093 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x30A1 0x30A2 0x30A3 0x30A4 \ - 0x30A5 0x30A6 0x30A7 0x30A8 0x30A9 0x30AA 0x30AB 0x30AC \ - 0x30AD 0x30AE 0x30AF 0x30B0 0x30B1 0x30B2 0x30B3 0x30B4 \ - 0x30B5 0x30B6 0x30B7 0x30B8 0x30B9 0x30BA 0x30BB 0x30BC \ - 0x30BD 0x30BE 0x30BF 0x30C0 0x30C1 0x30C2 0x30C3 0x30C4 \ - 0x30C5 0x30C6 0x30C7 0x30C8 0x30C9 0x30CA 0x30CB 0x30CC \ - 0x30CD 0x30CE 0x30CF 0x30D0 0x30D1 0x30D2 0x30D3 0x30D4 \ - 0x30D5 0x30D6 0x30D7 0x30D8 0x30D9 0x30DA 0x30DB 0x30DC \ - 0x30DD 0x30DE 0x30DF 0x30E0 0x30E1 0x30E2 0x30E3 0x30E4 \ - 0x30E5 0x30E6 0x30E7 0x30E8 0x30E9 0x30EA 0x30EB 0x30EC \ - 0x30ED 0x30EE 0x30EF 0x30F0 0x30F1 0x30F2 0x30F3 0x30F4 -05 0x30F5 0x30F6 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x0410 0x0411 0x0412 0x0413 0x0414 0x0415 \ - 0x0401 0x0416 0x0417 0x0418 0x0419 0x041A 0x041B 0x041C \ - 0x041D 0x041E 0x041F 0x0420 0x0421 0x0422 0x0423 0x0424 \ - 0x0425 0x0426 0x0427 0x0428 0x0429 0x042A 0x042B 0x042C \ - 0x042D 0x042E 0x042F 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0x0430 0x0431 0x0432 0x0433 0x0434 0x0435 \ - 0x0451 0x0436 0x0437 0x0438 0x0439 0x043A 0x043B 0x043C \ - 0x043D 0x043E 0x043F 0x0440 0x0441 0x0442 0x0443 0x0444 \ - 0x0445 0x0446 0x0447 0x0448 0x0449 0x044A 0x044B 0x044C \ - 0x044D 0x044E 0x044F 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -06 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xAC00 0xAC01 0xAC04 0xAC07 0xAC08 0xAC09 \ - 0xAC0A 0xAC10 0xAC11 0xAC12 0xAC13 0xAC14 0xAC15 0xAC16 \ - 0xAC17 0xAC19 0xAC1A 0xAC1B 0xAC1C 0xAC1D 0xAC20 0xAC24 \ - 0xAC2C 0xAC2D 0xAC2F 0xAC30 0xAC31 0xAC38 0xAC39 0xAC3C \ - 0xAC40 0xAC4B 0xAC4D 0xAC54 0xAC58 0xAC5C 0xAC70 0xAC71 \ - 0xAC74 0xAC77 0xAC78 0xAC7A 0xAC80 0xAC81 0xAC83 0xAC84 \ - 0xAC85 0xAC86 0xAC89 0xAC8A 0xAC8B 0xAC8C 0xAC90 0xAC94 \ - 0xAC9C 0xAC9D 0xAC9F 0xACA0 0xACA1 0xACA8 0xACA9 0xACAA \ - 0xACAC 0xACAF 0xACB0 0xACB8 0xACB9 0xACBB 0xACBC 0xACBD \ - 0xACC1 0xACC4 0xACC8 0xACCC 0xACD5 0xACD7 0xACE0 0xACE1 \ - 0xACE4 0xACE7 0xACE8 0xACEA 0xACEC 0xACEF 0xACF0 0xACF1 \ - 0xACF3 0xACF5 0xACF6 0xACFC 0xACFD 0xAD00 0xAD04 0xAD06 \ - 0xAD0C 0xAD0D 0xAD0F 0xAD11 0xAD18 0xAD1C 0xAD20 0xAD29 \ - 0xAD2C 0xAD2D 0xAD34 0xAD35 0xAD38 0xAD3C 0xAD44 0xAD45 \ - 0xAD47 0xAD49 0xAD50 0xAD54 0xAD58 0xAD61 0xAD63 0xAD6C \ - 0xAD6D 0xAD70 0xAD73 0xAD74 0xAD75 0xAD76 0xAD7B 0xAD7C -07 0xAD7D 0xAD7F 0xAD81 0xAD82 0xAD88 0xAD89 0xAD8C 0xAD90 \ - 0xAD9C 0xAD9D 0xADA4 0xADB7 0xADC0 0xADC1 0xADC4 0xADC8 \ - 0xADD0 0xADD1 0xADD3 0xADDC 0xADE0 0xADE4 0xADF8 0xADF9 \ - 0xADFC 0xADFF 0xAE00 0xAE01 0xAE08 0xAE09 0xAE0B 0xAE0D \ - 0xAE14 0xAE30 0xAE31 0xAE34 0xAE37 0xAE38 0xAE3A 0xAE40 \ - 0xAE41 0xAE43 0xAE45 0xAE46 0xAE4A 0xAE4C 0xAE4D 0xAE4E \ - 0xAE50 0xAE54 0xAE56 0xAE5C 0xAE5D 0xAE5F 0xAE60 0xAE61 \ - 0xAE65 0xAE68 0xAE69 0xAE6C 0xAE70 0xAE78 0xAE79 0xAE7B \ - 0xAE7C 0xAE7D 0xAE84 0xAE85 0xAE8C 0xAEBC 0xAEBD 0xAEBE \ - 0xAEC0 0xAEC4 0xAECC 0xAECD 0xAECF 0xAED0 0xAED1 0xAED8 \ - 0xAED9 0xAEDC 0xAEE8 0xAEEB 0xAEED 0xAEF4 0xAEF8 0xAEFC \ - 0xAF07 0xAF08 0xAF0D 0xAF10 0xAF2C 0xAF2D 0xAF30 0xAF32 \ - 0xAF34 0xAF3C 0xAF3D 0xAF3F 0xAF41 0xAF42 0xAF43 0xAF48 \ - 0xAF49 0xAF50 0xAF5C 0xAF5D 0xAF64 0xAF65 0xAF79 0xAF80 \ - 0xAF84 0xAF88 0xAF90 0xAF91 0xAF95 0xAF9C 0xAFB8 0xAFB9 \ - 0xAFBC 0xAFC0 0xAFC7 0xAFC8 0xAFC9 0xAFCB 0xAFCD 0xAFCE \ - 0xAFD4 0xAFDC 0xAFE8 0xAFE9 0xAFF0 0xAFF1 0xAFF4 0xAFF8 \ - 0xB000 0xB001 0xB004 0xB00C 0xB010 0xB014 0xB01C 0xB01D \ - 0xB028 0xB044 0xB045 0xB048 0xB04A 0xB04C 0xB04E 0xB053 \ - 0xB054 0xB055 0xB057 0xB059 0xB05D 0xB07C 0xB07D 0xB080 \ - 0xB084 0xB08C 0xB08D 0xB08F 0xB091 0xB098 0xB099 0xB09A \ - 0xB09C 0xB09F 0xB0A0 0xB0A1 0xB0A2 0xB0A8 0xB0A9 0xB0AB \ - 0xB0AC 0xB0AD 0xB0AE 0xB0AF 0xB0B1 0xB0B3 0xB0B4 0xB0B5 \ - 0xB0B8 0xB0BC 0xB0C4 0xB0C5 0xB0C7 0xB0C8 0xB0C9 0xB0D0 \ - 0xB0D1 0xB0D4 0xB0D8 0xB0E0 0xB0E5 0xB108 0xB109 0xB10B \ - 0xB10C 0xB110 0xB112 0xB113 0xB118 0xB119 0xB11B 0xB11C \ - 0xB11D 0xB123 0xB124 0xB125 0xB128 0xB12C 0xB134 0xB135 \ - 0xB137 0xB138 0xB139 0xB140 0xB141 0xB144 0xB148 0xB150 \ - 0xB151 0xB154 0xB155 0xB158 0xB15C 0xB160 0xB178 0xB179 \ - 0xB17C 0xB180 0xB182 0xB188 0xB189 0xB18B 0xB18D 0xB192 \ - 0xB193 0xB194 0xB198 0xB19C 0xB1A8 0xB1CC 0xB1D0 0xB1D4 \ - 0xB1DC 0xB1DD 0xB1DF 0xB1E8 0xB1E9 0xB1EC 0xB1F0 0xB1F9 -08 0xB1FB 0xB1FD 0xB204 0xB205 0xB208 0xB20B 0xB20C 0xB214 \ - 0xB215 0xB217 0xB219 0xB220 0xB234 0xB23C 0xB258 0xB25C \ - 0xB260 0xB268 0xB269 0xB274 0xB275 0xB27C 0xB284 0xB285 \ - 0xB289 0xB290 0xB291 0xB294 0xB298 0xB299 0xB29A 0xB2A0 \ - 0xB2A1 0xB2A3 0xB2A5 0xB2A6 0xB2AA 0xB2AC 0xB2B0 0xB2B4 \ - 0xB2C8 0xB2C9 0xB2CC 0xB2D0 0xB2D2 0xB2D8 0xB2D9 0xB2DB \ - 0xB2DD 0xB2E2 0xB2E4 0xB2E5 0xB2E6 0xB2E8 0xB2EB 0xB2EC \ - 0xB2ED 0xB2EE 0xB2EF 0xB2F3 0xB2F4 0xB2F5 0xB2F7 0xB2F8 \ - 0xB2F9 0xB2FA 0xB2FB 0xB2FF 0xB300 0xB301 0xB304 0xB308 \ - 0xB310 0xB311 0xB313 0xB314 0xB315 0xB31C 0xB354 0xB355 \ - 0xB356 0xB358 0xB35B 0xB35C 0xB35E 0xB35F 0xB364 0xB365 \ - 0xB367 0xB369 0xB36B 0xB36E 0xB370 0xB371 0xB374 0xB378 \ - 0xB380 0xB381 0xB383 0xB384 0xB385 0xB38C 0xB390 0xB394 \ - 0xB3A0 0xB3A1 0xB3A8 0xB3AC 0xB3C4 0xB3C5 0xB3C8 0xB3CB \ - 0xB3CC 0xB3CE 0xB3D0 0xB3D4 0xB3D5 0xB3D7 0xB3D9 0xB3DB \ - 0xB3DD 0xB3E0 0xB3E4 0xB3E8 0xB3FC 0xB410 0xB418 0xB41C \ - 0xB420 0xB428 0xB429 0xB42B 0xB434 0xB450 0xB451 0xB454 \ - 0xB458 0xB460 0xB461 0xB463 0xB465 0xB46C 0xB480 0xB488 \ - 0xB49D 0xB4A4 0xB4A8 0xB4AC 0xB4B5 0xB4B7 0xB4B9 0xB4C0 \ - 0xB4C4 0xB4C8 0xB4D0 0xB4D5 0xB4DC 0xB4DD 0xB4E0 0xB4E3 \ - 0xB4E4 0xB4E6 0xB4EC 0xB4ED 0xB4EF 0xB4F1 0xB4F8 0xB514 \ - 0xB515 0xB518 0xB51B 0xB51C 0xB524 0xB525 0xB527 0xB528 \ - 0xB529 0xB52A 0xB530 0xB531 0xB534 0xB538 0xB540 0xB541 \ - 0xB543 0xB544 0xB545 0xB54B 0xB54C 0xB54D 0xB550 0xB554 \ - 0xB55C 0xB55D 0xB55F 0xB560 0xB561 0xB5A0 0xB5A1 0xB5A4 \ - 0xB5A8 0xB5AA 0xB5AB 0xB5B0 0xB5B1 0xB5B3 0xB5B4 0xB5B5 \ - 0xB5BB 0xB5BC 0xB5BD 0xB5C0 0xB5C4 0xB5CC 0xB5CD 0xB5CF \ - 0xB5D0 0xB5D1 0xB5D8 0xB5EC 0xB610 0xB611 0xB614 0xB618 \ - 0xB625 0xB62C 0xB634 0xB648 0xB664 0xB668 0xB69C 0xB69D \ - 0xB6A0 0xB6A4 0xB6AB 0xB6AC 0xB6B1 0xB6D4 0xB6F0 0xB6F4 \ - 0xB6F8 0xB700 0xB701 0xB705 0xB728 0xB729 0xB72C 0xB72F \ - 0xB730 0xB738 0xB739 0xB73B 0xB744 0xB748 0xB74C 0xB754 -09 0xB755 0xB760 0xB764 0xB768 0xB770 0xB771 0xB773 0xB775 \ - 0xB77C 0xB77D 0xB780 0xB784 0xB78C 0xB78D 0xB78F 0xB790 \ - 0xB791 0xB792 0xB796 0xB797 0xB798 0xB799 0xB79C 0xB7A0 \ - 0xB7A8 0xB7A9 0xB7AB 0xB7AC 0xB7AD 0xB7B4 0xB7B5 0xB7B8 \ - 0xB7C7 0xB7C9 0xB7EC 0xB7ED 0xB7F0 0xB7F4 0xB7FC 0xB7FD \ - 0xB7FF 0xB800 0xB801 0xB807 0xB808 0xB809 0xB80C 0xB810 \ - 0xB818 0xB819 0xB81B 0xB81D 0xB824 0xB825 0xB828 0xB82C \ - 0xB834 0xB835 0xB837 0xB838 0xB839 0xB840 0xB844 0xB851 \ - 0xB853 0xB85C 0xB85D 0xB860 0xB864 0xB86C 0xB86D 0xB86F \ - 0xB871 0xB878 0xB87C 0xB88D 0xB8A8 0xB8B0 0xB8B4 0xB8B8 \ - 0xB8C0 0xB8C1 0xB8C3 0xB8C5 0xB8CC 0xB8D0 0xB8D4 0xB8DD \ - 0xB8DF 0xB8E1 0xB8E8 0xB8E9 0xB8EC 0xB8F0 0xB8F8 0xB8F9 \ - 0xB8FB 0xB8FD 0xB904 0xB918 0xB920 0xB93C 0xB93D 0xB940 \ - 0xB944 0xB94C 0xB94F 0xB951 0xB958 0xB959 0xB95C 0xB960 \ - 0xB968 0xB969 0xB96B 0xB96D 0xB974 0xB975 0xB978 0xB97C \ - 0xB984 0xB985 0xB987 0xB989 0xB98A 0xB98D 0xB98E 0xB9AC \ - 0xB9AD 0xB9B0 0xB9B4 0xB9BC 0xB9BD 0xB9BF 0xB9C1 0xB9C8 \ - 0xB9C9 0xB9CC 0xB9CE 0xB9CF 0xB9D0 0xB9D1 0xB9D2 0xB9D8 \ - 0xB9D9 0xB9DB 0xB9DD 0xB9DE 0xB9E1 0xB9E3 0xB9E4 0xB9E5 \ - 0xB9E8 0xB9EC 0xB9F4 0xB9F5 0xB9F7 0xB9F8 0xB9F9 0xB9FA \ - 0xBA00 0xBA01 0xBA08 0xBA15 0xBA38 0xBA39 0xBA3C 0xBA40 \ - 0xBA42 0xBA48 0xBA49 0xBA4B 0xBA4D 0xBA4E 0xBA53 0xBA54 \ - 0xBA55 0xBA58 0xBA5C 0xBA64 0xBA65 0xBA67 0xBA68 0xBA69 \ - 0xBA70 0xBA71 0xBA74 0xBA78 0xBA83 0xBA84 0xBA85 0xBA87 \ - 0xBA8C 0xBAA8 0xBAA9 0xBAAB 0xBAAC 0xBAB0 0xBAB2 0xBAB8 \ - 0xBAB9 0xBABB 0xBABD 0xBAC4 0xBAC8 0xBAD8 0xBAD9 0xBAFC \ - 0xBB00 0xBB04 0xBB0D 0xBB0F 0xBB11 0xBB18 0xBB1C 0xBB20 \ - 0xBB29 0xBB2B 0xBB34 0xBB35 0xBB36 0xBB38 0xBB3B 0xBB3C \ - 0xBB3D 0xBB3E 0xBB44 0xBB45 0xBB47 0xBB49 0xBB4D 0xBB4F \ - 0xBB50 0xBB54 0xBB58 0xBB61 0xBB63 0xBB6C 0xBB88 0xBB8C \ - 0xBB90 0xBBA4 0xBBA8 0xBBAC 0xBBB4 0xBBB7 0xBBC0 0xBBC4 \ - 0xBBC8 0xBBD0 0xBBD3 0xBBF8 0xBBF9 0xBBFC 0xBBFF 0xBC00 -10 0xBC02 0xBC08 0xBC09 0xBC0B 0xBC0C 0xBC0D 0xBC0F 0xBC11 \ - 0xBC14 0xBC15 0xBC16 0xBC17 0xBC18 0xBC1B 0xBC1C 0xBC1D \ - 0xBC1E 0xBC1F 0xBC24 0xBC25 0xBC27 0xBC29 0xBC2D 0xBC30 \ - 0xBC31 0xBC34 0xBC38 0xBC40 0xBC41 0xBC43 0xBC44 0xBC45 \ - 0xBC49 0xBC4C 0xBC4D 0xBC50 0xBC5D 0xBC84 0xBC85 0xBC88 \ - 0xBC8B 0xBC8C 0xBC8E 0xBC94 0xBC95 0xBC97 0xBC99 0xBC9A \ - 0xBCA0 0xBCA1 0xBCA4 0xBCA7 0xBCA8 0xBCB0 0xBCB1 0xBCB3 \ - 0xBCB4 0xBCB5 0xBCBC 0xBCBD 0xBCC0 0xBCC4 0xBCCD 0xBCCF \ - 0xBCD0 0xBCD1 0xBCD5 0xBCD8 0xBCDC 0xBCF4 0xBCF5 0xBCF6 \ - 0xBCF8 0xBCFC 0xBD04 0xBD05 0xBD07 0xBD09 0xBD10 0xBD14 \ - 0xBD24 0xBD2C 0xBD40 0xBD48 0xBD49 0xBD4C 0xBD50 0xBD58 \ - 0xBD59 0xBD64 0xBD68 0xBD80 0xBD81 0xBD84 0xBD87 0xBD88 \ - 0xBD89 0xBD8A 0xBD90 0xBD91 0xBD93 0xBD95 0xBD99 0xBD9A \ - 0xBD9C 0xBDA4 0xBDB0 0xBDB8 0xBDD4 0xBDD5 0xBDD8 0xBDDC \ - 0xBDE9 0xBDF0 0xBDF4 0xBDF8 0xBE00 0xBE03 0xBE05 0xBE0C \ - 0xBE0D 0xBE10 0xBE14 0xBE1C 0xBE1D 0xBE1F 0xBE44 0xBE45 \ - 0xBE48 0xBE4C 0xBE4E 0xBE54 0xBE55 0xBE57 0xBE59 0xBE5A \ - 0xBE5B 0xBE60 0xBE61 0xBE64 0xBE68 0xBE6A 0xBE70 0xBE71 \ - 0xBE73 0xBE74 0xBE75 0xBE7B 0xBE7C 0xBE7D 0xBE80 0xBE84 \ - 0xBE8C 0xBE8D 0xBE8F 0xBE90 0xBE91 0xBE98 0xBE99 0xBEA8 \ - 0xBED0 0xBED1 0xBED4 0xBED7 0xBED8 0xBEE0 0xBEE3 0xBEE4 \ - 0xBEE5 0xBEEC 0xBF01 0xBF08 0xBF09 0xBF18 0xBF19 0xBF1B \ - 0xBF1C 0xBF1D 0xBF40 0xBF41 0xBF44 0xBF48 0xBF50 0xBF51 \ - 0xBF55 0xBF94 0xBFB0 0xBFC5 0xBFCC 0xBFCD 0xBFD0 0xBFD4 \ - 0xBFDC 0xBFDF 0xBFE1 0xC03C 0xC051 0xC058 0xC05C 0xC060 \ - 0xC068 0xC069 0xC090 0xC091 0xC094 0xC098 0xC0A0 0xC0A1 \ - 0xC0A3 0xC0A5 0xC0AC 0xC0AD 0xC0AF 0xC0B0 0xC0B3 0xC0B4 \ - 0xC0B5 0xC0B6 0xC0BC 0xC0BD 0xC0BF 0xC0C0 0xC0C1 0xC0C5 \ - 0xC0C8 0xC0C9 0xC0CC 0xC0D0 0xC0D8 0xC0D9 0xC0DB 0xC0DC \ - 0xC0DD 0xC0E4 0xC0E5 0xC0E8 0xC0EC 0xC0F4 0xC0F5 0xC0F7 \ - 0xC0F9 0xC100 0xC104 0xC108 0xC110 0xC115 0xC11C 0xC11D \ - 0xC11E 0xC11F 0xC120 0xC123 0xC124 0xC126 0xC127 0xC12C -11 0xC12D 0xC12F 0xC130 0xC131 0xC136 0xC138 0xC139 0xC13C \ - 0xC140 0xC148 0xC149 0xC14B 0xC14C 0xC14D 0xC154 0xC155 \ - 0xC158 0xC15C 0xC164 0xC165 0xC167 0xC168 0xC169 0xC170 \ - 0xC174 0xC178 0xC185 0xC18C 0xC18D 0xC18E 0xC190 0xC194 \ - 0xC196 0xC19C 0xC19D 0xC19F 0xC1A1 0xC1A5 0xC1A8 0xC1A9 \ - 0xC1AC 0xC1B0 0xC1BD 0xC1C4 0xC1C8 0xC1CC 0xC1D4 0xC1D7 \ - 0xC1D8 0xC1E0 0xC1E4 0xC1E8 0xC1F0 0xC1F1 0xC1F3 0xC1FC \ - 0xC1FD 0xC200 0xC204 0xC20C 0xC20D 0xC20F 0xC211 0xC218 \ - 0xC219 0xC21C 0xC21F 0xC220 0xC228 0xC229 0xC22B 0xC22D \ - 0xC22F 0xC231 0xC232 0xC234 0xC248 0xC250 0xC251 0xC254 \ - 0xC258 0xC260 0xC265 0xC26C 0xC26D 0xC270 0xC274 0xC27C \ - 0xC27D 0xC27F 0xC281 0xC288 0xC289 0xC290 0xC298 0xC29B \ - 0xC29D 0xC2A4 0xC2A5 0xC2A8 0xC2AC 0xC2AD 0xC2B4 0xC2B5 \ - 0xC2B7 0xC2B9 0xC2DC 0xC2DD 0xC2E0 0xC2E3 0xC2E4 0xC2EB \ - 0xC2EC 0xC2ED 0xC2EF 0xC2F1 0xC2F6 0xC2F8 0xC2F9 0xC2FB \ - 0xC2FC 0xC300 0xC308 0xC309 0xC30C 0xC30D 0xC313 0xC314 \ - 0xC315 0xC318 0xC31C 0xC324 0xC325 0xC328 0xC329 0xC345 \ - 0xC368 0xC369 0xC36C 0xC370 0xC372 0xC378 0xC379 0xC37C \ - 0xC37D 0xC384 0xC388 0xC38C 0xC3C0 0xC3D8 0xC3D9 0xC3DC \ - 0xC3DF 0xC3E0 0xC3E2 0xC3E8 0xC3E9 0xC3ED 0xC3F4 0xC3F5 \ - 0xC3F8 0xC408 0xC410 0xC424 0xC42C 0xC430 0xC434 0xC43C \ - 0xC43D 0xC448 0xC464 0xC465 0xC468 0xC46C 0xC474 0xC475 \ - 0xC479 0xC480 0xC494 0xC49C 0xC4B8 0xC4BC 0xC4E9 0xC4F0 \ - 0xC4F1 0xC4F4 0xC4F8 0xC4FA 0xC4FF 0xC500 0xC501 0xC50C \ - 0xC510 0xC514 0xC51C 0xC528 0xC529 0xC52C 0xC530 0xC538 \ - 0xC539 0xC53B 0xC53D 0xC544 0xC545 0xC548 0xC549 0xC54A \ - 0xC54C 0xC54D 0xC54E 0xC553 0xC554 0xC555 0xC557 0xC558 \ - 0xC559 0xC55D 0xC55E 0xC560 0xC561 0xC564 0xC568 0xC570 \ - 0xC571 0xC573 0xC574 0xC575 0xC57C 0xC57D 0xC580 0xC584 \ - 0xC587 0xC58C 0xC58D 0xC58F 0xC591 0xC595 0xC597 0xC598 \ - 0xC59C 0xC5A0 0xC5A9 0xC5B4 0xC5B5 0xC5B8 0xC5B9 0xC5BB \ - 0xC5BC 0xC5BD 0xC5BE 0xC5C4 0xC5C5 0xC5C6 0xC5C7 0xC5C8 -12 0xC5C9 0xC5CA 0xC5CC 0xC5CE 0xC5D0 0xC5D1 0xC5D4 0xC5D8 \ - 0xC5E0 0xC5E1 0xC5E3 0xC5E5 0xC5EC 0xC5ED 0xC5EE 0xC5F0 \ - 0xC5F4 0xC5F6 0xC5F7 0xC5FC 0xC5FD 0xC5FE 0xC5FF 0xC600 \ - 0xC601 0xC605 0xC606 0xC607 0xC608 0xC60C 0xC610 0xC618 \ - 0xC619 0xC61B 0xC61C 0xC624 0xC625 0xC628 0xC62C 0xC62D \ - 0xC62E 0xC630 0xC633 0xC634 0xC635 0xC637 0xC639 0xC63B \ - 0xC640 0xC641 0xC644 0xC648 0xC650 0xC651 0xC653 0xC654 \ - 0xC655 0xC65C 0xC65D 0xC660 0xC66C 0xC66F 0xC671 0xC678 \ - 0xC679 0xC67C 0xC680 0xC688 0xC689 0xC68B 0xC68D 0xC694 \ - 0xC695 0xC698 0xC69C 0xC6A4 0xC6A5 0xC6A7 0xC6A9 0xC6B0 \ - 0xC6B1 0xC6B4 0xC6B8 0xC6B9 0xC6BA 0xC6C0 0xC6C1 0xC6C3 \ - 0xC6C5 0xC6CC 0xC6CD 0xC6D0 0xC6D4 0xC6DC 0xC6DD 0xC6E0 \ - 0xC6E1 0xC6E8 0xC6E9 0xC6EC 0xC6F0 0xC6F8 0xC6F9 0xC6FD \ - 0xC704 0xC705 0xC708 0xC70C 0xC714 0xC715 0xC717 0xC719 \ - 0xC720 0xC721 0xC724 0xC728 0xC730 0xC731 0xC733 0xC735 \ - 0xC737 0xC73C 0xC73D 0xC740 0xC744 0xC74A 0xC74C 0xC74D \ - 0xC74F 0xC751 0xC752 0xC753 0xC754 0xC755 0xC756 0xC757 \ - 0xC758 0xC75C 0xC760 0xC768 0xC76B 0xC774 0xC775 0xC778 \ - 0xC77C 0xC77D 0xC77E 0xC783 0xC784 0xC785 0xC787 0xC788 \ - 0xC789 0xC78A 0xC78E 0xC790 0xC791 0xC794 0xC796 0xC797 \ - 0xC798 0xC79A 0xC7A0 0xC7A1 0xC7A3 0xC7A4 0xC7A5 0xC7A6 \ - 0xC7AC 0xC7AD 0xC7B0 0xC7B4 0xC7BC 0xC7BD 0xC7BF 0xC7C0 \ - 0xC7C1 0xC7C8 0xC7C9 0xC7CC 0xC7CE 0xC7D0 0xC7D8 0xC7DD \ - 0xC7E4 0xC7E8 0xC7EC 0xC800 0xC801 0xC804 0xC808 0xC80A \ - 0xC810 0xC811 0xC813 0xC815 0xC816 0xC81C 0xC81D 0xC820 \ - 0xC824 0xC82C 0xC82D 0xC82F 0xC831 0xC838 0xC83C 0xC840 \ - 0xC848 0xC849 0xC84C 0xC84D 0xC854 0xC870 0xC871 0xC874 \ - 0xC878 0xC87A 0xC880 0xC881 0xC883 0xC885 0xC886 0xC887 \ - 0xC88B 0xC88C 0xC88D 0xC894 0xC89D 0xC89F 0xC8A1 0xC8A8 \ - 0xC8BC 0xC8BD 0xC8C4 0xC8C8 0xC8CC 0xC8D4 0xC8D5 0xC8D7 \ - 0xC8D9 0xC8E0 0xC8E1 0xC8E4 0xC8F5 0xC8FC 0xC8FD 0xC900 \ - 0xC904 0xC905 0xC906 0xC90C 0xC90D 0xC90F 0xC911 0xC918 -13 0xC92C 0xC934 0xC950 0xC951 0xC954 0xC958 0xC960 0xC961 \ - 0xC963 0xC96C 0xC970 0xC974 0xC97C 0xC988 0xC989 0xC98C \ - 0xC990 0xC998 0xC999 0xC99B 0xC99D 0xC9C0 0xC9C1 0xC9C4 \ - 0xC9C7 0xC9C8 0xC9CA 0xC9D0 0xC9D1 0xC9D3 0xC9D5 0xC9D6 \ - 0xC9D9 0xC9DA 0xC9DC 0xC9DD 0xC9E0 0xC9E2 0xC9E4 0xC9E7 \ - 0xC9EC 0xC9ED 0xC9EF 0xC9F0 0xC9F1 0xC9F8 0xC9F9 0xC9FC \ - 0xCA00 0xCA08 0xCA09 0xCA0B 0xCA0C 0xCA0D 0xCA14 0xCA18 \ - 0xCA29 0xCA4C 0xCA4D 0xCA50 0xCA54 0xCA5C 0xCA5D 0xCA5F \ - 0xCA60 0xCA61 0xCA68 0xCA7D 0xCA84 0xCA98 0xCABC 0xCABD \ - 0xCAC0 0xCAC4 0xCACC 0xCACD 0xCACF 0xCAD1 0xCAD3 0xCAD8 \ - 0xCAD9 0xCAE0 0xCAEC 0xCAF4 0xCB08 0xCB10 0xCB14 0xCB18 \ - 0xCB20 0xCB21 0xCB41 0xCB48 0xCB49 0xCB4C 0xCB50 0xCB58 \ - 0xCB59 0xCB5D 0xCB64 0xCB78 0xCB79 0xCB9C 0xCBB8 0xCBD4 \ - 0xCBE4 0xCBE7 0xCBE9 0xCC0C 0xCC0D 0xCC10 0xCC14 0xCC1C \ - 0xCC1D 0xCC21 0xCC22 0xCC27 0xCC28 0xCC29 0xCC2C 0xCC2E \ - 0xCC30 0xCC38 0xCC39 0xCC3B 0xCC3C 0xCC3D 0xCC3E 0xCC44 \ - 0xCC45 0xCC48 0xCC4C 0xCC54 0xCC55 0xCC57 0xCC58 0xCC59 \ - 0xCC60 0xCC64 0xCC66 0xCC68 0xCC70 0xCC75 0xCC98 0xCC99 \ - 0xCC9C 0xCCA0 0xCCA8 0xCCA9 0xCCAB 0xCCAC 0xCCAD 0xCCB4 \ - 0xCCB5 0xCCB8 0xCCBC 0xCCC4 0xCCC5 0xCCC7 0xCCC9 0xCCD0 \ - 0xCCD4 0xCCE4 0xCCEC 0xCCF0 0xCD01 0xCD08 0xCD09 0xCD0C \ - 0xCD10 0xCD18 0xCD19 0xCD1B 0xCD1D 0xCD24 0xCD28 0xCD2C \ - 0xCD39 0xCD5C 0xCD60 0xCD64 0xCD6C 0xCD6D 0xCD6F 0xCD71 \ - 0xCD78 0xCD88 0xCD94 0xCD95 0xCD98 0xCD9C 0xCDA4 0xCDA5 \ - 0xCDA7 0xCDA9 0xCDB0 0xCDC4 0xCDCC 0xCDD0 0xCDE8 0xCDEC \ - 0xCDF0 0xCDF8 0xCDF9 0xCDFB 0xCDFD 0xCE04 0xCE08 0xCE0C \ - 0xCE14 0xCE19 0xCE20 0xCE21 0xCE24 0xCE28 0xCE30 0xCE31 \ - 0xCE33 0xCE35 0xCE58 0xCE59 0xCE5C 0xCE5F 0xCE60 0xCE61 \ - 0xCE68 0xCE69 0xCE6B 0xCE6D 0xCE74 0xCE75 0xCE78 0xCE7C \ - 0xCE84 0xCE85 0xCE87 0xCE89 0xCE90 0xCE91 0xCE94 0xCE98 \ - 0xCEA0 0xCEA1 0xCEA3 0xCEA4 0xCEA5 0xCEAC 0xCEAD 0xCEC1 \ - 0xCEE4 0xCEE5 0xCEE8 0xCEEB 0xCEEC 0xCEF4 0xCEF5 0xCEF7 -14 0xCEF8 0xCEF9 0xCF00 0xCF01 0xCF04 0xCF08 0xCF10 0xCF11 \ - 0xCF13 0xCF15 0xCF1C 0xCF20 0xCF24 0xCF2C 0xCF2D 0xCF2F \ - 0xCF30 0xCF31 0xCF38 0xCF54 0xCF55 0xCF58 0xCF5C 0xCF64 \ - 0xCF65 0xCF67 0xCF69 0xCF70 0xCF71 0xCF74 0xCF78 0xCF80 \ - 0xCF85 0xCF8C 0xCFA1 0xCFA8 0xCFB0 0xCFC4 0xCFE0 0xCFE1 \ - 0xCFE4 0xCFE8 0xCFF0 0xCFF1 0xCFF3 0xCFF5 0xCFFC 0xD000 \ - 0xD004 0xD011 0xD018 0xD02D 0xD034 0xD035 0xD038 0xD03C \ - 0xD044 0xD045 0xD047 0xD049 0xD050 0xD054 0xD058 0xD060 \ - 0xD06C 0xD06D 0xD070 0xD074 0xD07C 0xD07D 0xD081 0xD0A4 \ - 0xD0A5 0xD0A8 0xD0AC 0xD0B4 0xD0B5 0xD0B7 0xD0B9 0xD0C0 \ - 0xD0C1 0xD0C4 0xD0C8 0xD0C9 0xD0D0 0xD0D1 0xD0D3 0xD0D4 \ - 0xD0D5 0xD0DC 0xD0DD 0xD0E0 0xD0E4 0xD0EC 0xD0ED 0xD0EF \ - 0xD0F0 0xD0F1 0xD0F8 0xD10D 0xD130 0xD131 0xD134 0xD138 \ - 0xD13A 0xD140 0xD141 0xD143 0xD144 0xD145 0xD14C 0xD14D \ - 0xD150 0xD154 0xD15C 0xD15D 0xD15F 0xD161 0xD168 0xD16C \ - 0xD17C 0xD184 0xD188 0xD1A0 0xD1A1 0xD1A4 0xD1A8 0xD1B0 \ - 0xD1B1 0xD1B3 0xD1B5 0xD1BA 0xD1BC 0xD1C0 0xD1D8 0xD1F4 \ - 0xD1F8 0xD207 0xD209 0xD210 0xD22C 0xD22D 0xD230 0xD234 \ - 0xD23C 0xD23D 0xD23F 0xD241 0xD248 0xD25C 0xD264 0xD280 \ - 0xD281 0xD284 0xD288 0xD290 0xD291 0xD295 0xD29C 0xD2A0 \ - 0xD2A4 0xD2AC 0xD2B1 0xD2B8 0xD2B9 0xD2BC 0xD2BF 0xD2C0 \ - 0xD2C2 0xD2C8 0xD2C9 0xD2CB 0xD2D4 0xD2D8 0xD2DC 0xD2E4 \ - 0xD2E5 0xD2F0 0xD2F1 0xD2F4 0xD2F8 0xD300 0xD301 0xD303 \ - 0xD305 0xD30C 0xD30D 0xD30E 0xD310 0xD314 0xD316 0xD31C \ - 0xD31D 0xD31F 0xD320 0xD321 0xD325 0xD328 0xD329 0xD32C \ - 0xD330 0xD338 0xD339 0xD33B 0xD33C 0xD33D 0xD344 0xD345 \ - 0xD37C 0xD37D 0xD380 0xD384 0xD38C 0xD38D 0xD38F 0xD390 \ - 0xD391 0xD398 0xD399 0xD39C 0xD3A0 0xD3A8 0xD3A9 0xD3AB \ - 0xD3AD 0xD3B4 0xD3B8 0xD3BC 0xD3C4 0xD3C5 0xD3C8 0xD3C9 \ - 0xD3D0 0xD3D8 0xD3E1 0xD3E3 0xD3EC 0xD3ED 0xD3F0 0xD3F4 \ - 0xD3FC 0xD3FD 0xD3FF 0xD401 0xD408 0xD41D 0xD440 0xD444 \ - 0xD45C 0xD460 0xD464 0xD46D 0xD46F 0xD478 0xD479 0xD47C -15 0xD47F 0xD480 0xD482 0xD488 0xD489 0xD48B 0xD48D 0xD494 \ - 0xD4A9 0xD4CC 0xD4D0 0xD4D4 0xD4DC 0xD4DF 0xD4E8 0xD4EC \ - 0xD4F0 0xD4F8 0xD4FB 0xD4FD 0xD504 0xD508 0xD50C 0xD514 \ - 0xD515 0xD517 0xD53C 0xD53D 0xD540 0xD544 0xD54C 0xD54D \ - 0xD54F 0xD551 0xD558 0xD559 0xD55C 0xD560 0xD565 0xD568 \ - 0xD569 0xD56B 0xD56D 0xD574 0xD575 0xD578 0xD57C 0xD584 \ - 0xD585 0xD587 0xD588 0xD589 0xD590 0xD5A5 0xD5C8 0xD5C9 \ - 0xD5CC 0xD5D0 0xD5D2 0xD5D8 0xD5D9 0xD5DB 0xD5DD 0xD5E4 \ - 0xD5E5 0xD5E8 0xD5EC 0xD5F4 0xD5F5 0xD5F7 0xD5F9 0xD600 \ - 0xD601 0xD604 0xD608 0xD610 0xD611 0xD613 0xD614 0xD615 \ - 0xD61C 0xD620 0xD624 0xD62D 0xD638 0xD639 0xD63C 0xD640 \ - 0xD645 0xD648 0xD649 0xD64B 0xD64D 0xD651 0xD654 0xD655 \ - 0xD658 0xD65C 0xD667 0xD669 0xD670 0xD671 0xD674 0xD683 \ - 0xD685 0xD68C 0xD68D 0xD690 0xD694 0xD69D 0xD69F 0xD6A1 \ - 0xD6A8 0xD6AC 0xD6B0 0xD6B9 0xD6BB 0xD6C4 0xD6C5 0xD6C8 \ - 0xD6CC 0xD6D1 0xD6D4 0xD6D7 0xD6D9 0xD6E0 0xD6E4 0xD6E8 \ - 0xD6F0 0xD6F5 0xD6FC 0xD6FD 0xD700 0xD704 0xD711 0xD718 \ - 0xD719 0xD71C 0xD720 0xD728 0xD729 0xD72B 0xD72D 0xD734 \ - 0xD735 0xD738 0xD73C 0xD744 0xD747 0xD749 0xD750 0xD751 \ - 0xD754 0xD756 0xD757 0xD758 0xD759 0xD760 0xD761 0xD763 \ - 0xD765 0xD769 0xD76C 0xD770 0xD774 0xD77C 0xD77D 0xD781 \ - 0xD788 0xD789 0xD78C 0xD790 0xD798 0xD799 0xD79B 0xD79D \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE -16 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0x4F3D 0x4F73 \ - 0x5047 0x50F9 0x52A0 0x53EF 0x5475 0x54E5 0x5609 0x5AC1 \ - 0x5BB6 0x6687 0x67B6 0x67B7 0x67EF 0x6B4C 0x73C2 0x75C2 \ - 0x7A3C 0x82DB 0x8304 0x8857 0x8888 0x8A36 0x8CC8 0x8DCF \ - 0x8EFB 0x8FE6 0x99D5 0x523B 0x5374 0x5404 0x606A 0x6164 \ - 0x6BBC 0x73CF 0x811A 0x89BA 0x89D2 0x95A3 0x4F83 0x520A \ - 0x58BE 0x5978 0x59E6 0x5E72 0x5E79 0x61C7 0x63C0 0x6746 \ - 0x67EC 0x687F 0x6F97 0x764E 0x770B 0x78F5 0x7A08 0x7AFF \ - 0x7C21 0x809D 0x826E 0x8271 0x8AEB 0x9593 0x4E6B 0x559D \ - 0x66F7 0x6E34 0x78A3 0x7AED 0x845B 0x8910 0x874E 0x97A8 \ - 0x52D8 0x574E 0x582A 0x5D4C 0x611F 0x61BE 0x6221 0x6562 \ - 0x67D1 0x6A44 0x6E1B 0x7518 0x75B3 0x76E3 0x77B0 0x7D3A \ - 0x90AF 0x9451 0x9452 0x9F95 0x5323 0x5CAC 0x7532 0x80DB \ - 0x9240 0x9598 0x525B 0x5808 0x59DC 0x5CA1 0x5D17 0x5EB7 \ - 0x5F3A 0x5F4A 0x6177 0x6C5F 0x757A 0x7586 0x7CE0 0x7D73 \ - 0x7DB1 0x7F8C 0x8154 0x8221 0x8591 0x8941 0x8B1B 0x92FC \ - 0x964D 0x9C47 0x4ECB 0x4EF7 0x500B 0x51F1 0x584F 0x6137 \ - 0x613E 0x6168 0x6539 0x69EA 0x6F11 0x75A5 0x7686 0x76D6 \ - 0x7B87 0x82A5 0x84CB 0xF900 0x93A7 0x958B 0x5580 0x5BA2 \ - 0x5751 0xF901 0x7CB3 0x7FB9 0x91B5 0x5028 0x53BB 0x5C45 \ - 0x5DE8 0x62D2 0x636E 0x64DA 0x64E7 0x6E20 0x70AC 0x795B \ - 0x8DDD 0x8E1E 0xF902 0x907D 0x9245 0x92F8 0x4E7E 0x4EF6 \ - 0x5065 0x5DFE 0x5EFA 0x6106 0x6957 0x8171 0x8654 0x8E47 \ - 0x9375 0x9A2B 0x4E5E 0x5091 0x6770 0x6840 0x5109 0x528D \ - 0x5292 0x6AA2 0x77BC 0x9210 0x9ED4 0x52AB 0x602F 0x8FF2 \ - 0x5048 0x61A9 0x63ED 0x64CA 0x683C 0x6A84 0x6FC0 0x8188 \ - 0x89A1 0x9694 0x5805 0x727D 0x72AC 0x7504 0x7D79 0x7E6D \ - 0x80A9 0x898B 0x8B74 0x9063 0x9D51 0x6289 0x6C7A 0x6F54 \ - 0x7D50 0x7F3A 0x8A23 0x517C 0x614A 0x7B9D 0x8B19 0x9257 \ - 0x938C 0x4EAC 0x4FD3 0x501E 0x50BE 0x5106 0x52C1 0x52CD \ - 0x537F 0x5770 0x5883 0x5E9A 0x5F91 0x6176 0x61AC 0x64CE -17 0x656C 0x666F 0x66BB 0x66F4 0x6897 0x6D87 0x7085 0x70F1 \ - 0x749F 0x74A5 0x74CA 0x75D9 0x786C 0x78EC 0x7ADF 0x7AF6 \ - 0x7D45 0x7D93 0x8015 0x803F 0x811B 0x8396 0x8B66 0x8F15 \ - 0x9015 0x93E1 0x9803 0x9838 0x9A5A 0x9BE8 0x4FC2 0x5553 \ - 0x583A 0x5951 0x5B63 0x5C46 0x60B8 0x6212 0x6842 0x68B0 \ - 0x68E8 0x6EAA 0x754C 0x7678 0x78CE 0x7A3D 0x7CFB 0x7E6B \ - 0x7E7C 0x8A08 0x8AA1 0x8C3F 0x968E 0x9DC4 0x53E4 0x53E9 \ - 0x544A 0x5471 0x56FA 0x59D1 0x5B64 0x5C3B 0x5EAB 0x62F7 \ - 0x6537 0x6545 0x6572 0x66A0 0x67AF 0x69C1 0x6CBD 0x75FC \ - 0x7690 0x777E 0x7A3F 0x7F94 0x8003 0x80A1 0x818F 0x82E6 \ - 0x82FD 0x83F0 0x85C1 0x8831 0x88B4 0x8AA5 0xF903 0x8F9C \ - 0x932E 0x96C7 0x9867 0x9AD8 0x9F13 0x54ED 0x659B 0x66F2 \ - 0x688F 0x7A40 0x8C37 0x9D60 0x56F0 0x5764 0x5D11 0x6606 \ - 0x68B1 0x68CD 0x6EFE 0x7428 0x889E 0x9BE4 0x6C68 0xF904 \ - 0x9AA8 0x4F9B 0x516C 0x5171 0x529F 0x5B54 0x5DE5 0x6050 \ - 0x606D 0x62F1 0x63A7 0x653B 0x73D9 0x7A7A 0x86A3 0x8CA2 \ - 0x978F 0x4E32 0x5BE1 0x6208 0x679C 0x74DC 0x79D1 0x83D3 \ - 0x8A87 0x8AB2 0x8DE8 0x904E 0x934B 0x9846 0x5ED3 0x69E8 \ - 0x85FF 0x90ED 0xF905 0x51A0 0x5B98 0x5BEC 0x6163 0x68FA \ - 0x6B3E 0x704C 0x742F 0x74D8 0x7BA1 0x7F50 0x83C5 0x89C0 \ - 0x8CAB 0x95DC 0x9928 0x522E 0x605D 0x62EC 0x9002 0x4F8A \ - 0x5149 0x5321 0x58D9 0x5EE3 0x66E0 0x6D38 0x709A 0x72C2 \ - 0x73D6 0x7B50 0x80F1 0x945B 0x5366 0x639B 0x7F6B 0x4E56 \ - 0x5080 0x584A 0x58DE 0x602A 0x6127 0x62D0 0x69D0 0x9B41 \ - 0x5B8F 0x7D18 0x80B1 0x8F5F 0x4EA4 0x50D1 0x54AC 0x55AC \ - 0x5B0C 0x5DA0 0x5DE7 0x652A 0x654E 0x6821 0x6A4B 0x72E1 \ - 0x768E 0x77EF 0x7D5E 0x7FF9 0x81A0 0x854E 0x86DF 0x8F03 \ - 0x8F4E 0x90CA 0x9903 0x9A55 0x9BAB 0x4E18 0x4E45 0x4E5D \ - 0x4EC7 0x4FF1 0x5177 0x52FE 0x5340 0x53E3 0x53E5 0x548E \ - 0x5614 0x5775 0x57A2 0x5BC7 0x5D87 0x5ED0 0x61FC 0x62D8 \ - 0x6551 0x67B8 0x67E9 0x69CB 0x6B50 0x6BC6 0x6BEC 0x6C42 \ - 0x6E9D 0x7078 0x72D7 0x7396 0x7403 0x77BF 0x77E9 0x7A76 -18 0x7D7F 0x8009 0x81FC 0x8205 0x820A 0x82DF 0x8862 0x8B33 \ - 0x8CFC 0x8EC0 0x9011 0x90B1 0x9264 0x92B6 0x99D2 0x9A45 \ - 0x9CE9 0x9DD7 0x9F9C 0x570B 0x5C40 0x83CA 0x97A0 0x97AB \ - 0x9EB4 0x541B 0x7A98 0x7FA4 0x88D9 0x8ECD 0x90E1 0x5800 \ - 0x5C48 0x6398 0x7A9F 0x5BAE 0x5F13 0x7A79 0x7AAE 0x828E \ - 0x8EAC 0x5026 0x5238 0x52F8 0x5377 0x5708 0x62F3 0x6372 \ - 0x6B0A 0x6DC3 0x7737 0x53A5 0x7357 0x8568 0x8E76 0x95D5 \ - 0x673A 0x6AC3 0x6F70 0x8A6D 0x8ECC 0x994B 0xF906 0x6677 \ - 0x6B78 0x8CB4 0x9B3C 0xF907 0x53EB 0x572D 0x594E 0x63C6 \ - 0x69FB 0x73EA 0x7845 0x7ABA 0x7AC5 0x7CFE 0x8475 0x898F \ - 0x8D73 0x9035 0x95A8 0x52FB 0x5747 0x7547 0x7B60 0x83CC \ - 0x921E 0xF908 0x6A58 0x514B 0x524B 0x5287 0x621F 0x68D8 \ - 0x6975 0x9699 0x50C5 0x52A4 0x52E4 0x61C3 0x65A4 0x6839 \ - 0x69FF 0x747E 0x7B4B 0x82B9 0x83EB 0x89B2 0x8B39 0x8FD1 \ - 0x9949 0xF909 0x4ECA 0x5997 0x64D2 0x6611 0x6A8E 0x7434 \ - 0x7981 0x79BD 0x82A9 0x887E 0x887F 0x895F 0xF90A 0x9326 \ - 0x4F0B 0x53CA 0x6025 0x6271 0x6C72 0x7D1A 0x7D66 0x4E98 \ - 0x5162 0x77DC 0x80AF 0x4F01 0x4F0E 0x5176 0x5180 0x55DC \ - 0x5668 0x573B 0x57FA 0x57FC 0x5914 0x5947 0x5993 0x5BC4 \ - 0x5C90 0x5D0E 0x5DF1 0x5E7E 0x5FCC 0x6280 0x65D7 0x65E3 \ - 0x671E 0x671F 0x675E 0x68CB 0x68C4 0x6A5F 0x6B3A 0x6C23 \ - 0x6C7D 0x6C82 0x6DC7 0x7398 0x7426 0x742A 0x7482 0x74A3 \ - 0x7578 0x757F 0x7881 0x78EF 0x7941 0x7947 0x7948 0x797A \ - 0x7B95 0x7D00 0x7DBA 0x7F88 0x8006 0x802D 0x808C 0x8A18 \ - 0x8B4F 0x8C48 0x8D77 0x9321 0x9324 0x98E2 0x9951 0x9A0E \ - 0x9A0F 0x9A65 0x9E92 0x7DCA 0x4F76 0x5409 0x62EE 0x6854 \ - 0x91D1 0x55AB 0x513A 0xF90B 0xF90C 0x5A1C 0x61E6 0xF90D \ - 0x62CF 0x62FF 0xF90E 0xF90F 0xF910 0xF911 0xF912 0xF913 \ - 0x90A3 0xF914 0xF915 0xF916 0xF917 0xF918 0x8AFE 0xF919 \ - 0xF91A 0xF91B 0xF91C 0x6696 0xF91D 0x7156 0xF91E 0xF91F \ - 0x96E3 0xF920 0x634F 0x637A 0x5357 0xF921 0x678F 0x6960 \ - 0x6E73 0xF922 0x7537 0xF923 0xF924 0xF925 0x7D0D 0xF926 -19 0xF927 0x8872 0x56CA 0x5A18 0xF928 0xF929 0xF92A 0xF92B \ - 0xF92C 0x4E43 0xF92D 0x5167 0x5948 0x67F0 0x8010 0xF92E \ - 0x5973 0x5E74 0x649A 0x79CA 0x5FF5 0x606C 0x62C8 0x637B \ - 0x5BE7 0x5BD7 0x52AA 0xF92F 0x5974 0x5F29 0x6012 0xF930 \ - 0xF931 0xF932 0x7459 0xF933 0xF934 0xF935 0xF936 0xF937 \ - 0xF938 0x99D1 0xF939 0xF93A 0xF93B 0xF93C 0xF93D 0xF93E \ - 0xF93F 0xF940 0xF941 0xF942 0xF943 0x6FC3 0xF944 0xF945 \ - 0x81BF 0x8FB2 0x60F1 0xF946 0xF947 0x8166 0xF948 0xF949 \ - 0x5C3F 0xF94A 0xF94B 0xF94C 0xF94D 0xF94E 0xF94F 0xF950 \ - 0xF951 0x5AE9 0x8A25 0x677B 0x7D10 0xF952 0xF953 0xF954 \ - 0xF955 0xF956 0xF957 0x80FD 0xF958 0xF959 0x5C3C 0x6CE5 \ - 0x533F 0x6EBA 0x591A 0x8336 0x4E39 0x4EB6 0x4F46 0x55AE \ - 0x5718 0x58C7 0x5F56 0x65B7 0x65E6 0x6A80 0x6BB5 0x6E4D \ - 0x77ED 0x7AEF 0x7C1E 0x7DDE 0x86CB 0x8892 0x9132 0x935B \ - 0x64BB 0x6FBE 0x737A 0x75B8 0x9054 0x5556 0x574D 0x61BA \ - 0x64D4 0x66C7 0x6DE1 0x6E5B 0x6F6D 0x6FB9 0x75F0 0x8043 \ - 0x81BD 0x8541 0x8983 0x8AC7 0x8B5A 0x931F 0x6C93 0x7553 \ - 0x7B54 0x8E0F 0x905D 0x5510 0x5802 0x5858 0x5E62 0x6207 \ - 0x649E 0x68E0 0x7576 0x7CD6 0x87B3 0x9EE8 0x4EE3 0x5788 \ - 0x576E 0x5927 0x5C0D 0x5CB1 0x5E36 0x5F85 0x6234 0x64E1 \ - 0x73B3 0x81FA 0x888B 0x8CB8 0x968A 0x9EDB 0x5B85 0x5FB7 \ - 0x60B3 0x5012 0x5200 0x5230 0x5716 0x5835 0x5857 0x5C0E \ - 0x5C60 0x5CF6 0x5D8B 0x5EA6 0x5F92 0x60BC 0x6311 0x6389 \ - 0x6417 0x6843 0x68F9 0x6AC2 0x6DD8 0x6E21 0x6ED4 0x6FE4 \ - 0x71FE 0x76DC 0x7779 0x79B1 0x7A3B 0x8404 0x89A9 0x8CED \ - 0x8DF3 0x8E48 0x9003 0x9014 0x9053 0x90FD 0x934D 0x9676 \ - 0x97DC 0x6BD2 0x7006 0x7258 0x72A2 0x7368 0x7763 0x79BF \ - 0x7BE4 0x7E9B 0x8B80 0x58A9 0x60C7 0x6566 0x65FD 0x66BE \ - 0x6C8C 0x711E 0x71C9 0x8C5A 0x9813 0x4E6D 0x7A81 0x4EDD \ - 0x51AC 0x51CD 0x52D5 0x540C 0x61A7 0x6771 0x6850 0x68DF \ - 0x6D1E 0x6F7C 0x75BC 0x77B3 0x7AE5 0x80F4 0x8463 0x9285 \ - 0x515C 0x6597 0x675C 0x6793 0x75D8 0x7AC7 0x8373 0xF95A -20 0x8C46 0x9017 0x982D 0x5C6F 0x81C0 0x829A 0x9041 0x906F \ - 0x920D 0x5F97 0x5D9D 0x6A59 0x71C8 0x767B 0x7B49 0x85E4 \ - 0x8B04 0x9127 0x9A30 0x5587 0x61F6 0xF95B 0x7669 0x7F85 \ - 0x863F 0x87BA 0x88F8 0x908F 0xF95C 0x6D1B 0x70D9 0x73DE \ - 0x7D61 0x843D 0xF95D 0x916A 0x99F1 0xF95E 0x4E82 0x5375 \ - 0x6B04 0x6B12 0x703E 0x721B 0x862D 0x9E1E 0x524C 0x8FA3 \ - 0x5D50 0x64E5 0x652C 0x6B16 0x6FEB 0x7C43 0x7E9C 0x85CD \ - 0x8964 0x89BD 0x62C9 0x81D8 0x881F 0x5ECA 0x6717 0x6D6A \ - 0x72FC 0x7405 0x746F 0x8782 0x90DE 0x4F86 0x5D0D 0x5FA0 \ - 0x840A 0x51B7 0x63A0 0x7565 0x4EAE 0x5006 0x5169 0x51C9 \ - 0x6881 0x6A11 0x7CAE 0x7CB1 0x7CE7 0x826F 0x8AD2 0x8F1B \ - 0x91CF 0x4FB6 0x5137 0x52F5 0x5442 0x5EEC 0x616E 0x623E \ - 0x65C5 0x6ADA 0x6FFE 0x792A 0x85DC 0x8823 0x95AD 0x9A62 \ - 0x9A6A 0x9E97 0x9ECE 0x529B 0x66C6 0x6B77 0x701D 0x792B \ - 0x8F62 0x9742 0x6190 0x6200 0x6523 0x6F23 0x7149 0x7489 \ - 0x7DF4 0x806F 0x84EE 0x8F26 0x9023 0x934A 0x51BD 0x5217 \ - 0x52A3 0x6D0C 0x70C8 0x88C2 0x5EC9 0x6582 0x6BAE 0x6FC2 \ - 0x7C3E 0x7375 0x4EE4 0x4F36 0x56F9 0xF95F 0x5CBA 0x5DBA \ - 0x601C 0x73B2 0x7B2D 0x7F9A 0x7FCE 0x8046 0x901E 0x9234 \ - 0x96F6 0x9748 0x9818 0x9F61 0x4F8B 0x6FA7 0x79AE 0x91B4 \ - 0x96B7 0x52DE 0xF960 0x6488 0x64C4 0x6AD3 0x6F5E 0x7018 \ - 0x7210 0x76E7 0x8001 0x8606 0x865C 0x8DEF 0x8F05 0x9732 \ - 0x9B6F 0x9DFA 0x9E75 0x788C 0x797F 0x7DA0 0x83C9 0x9304 \ - 0x9E7F 0x9E93 0x8AD6 0x58DF 0x5F04 0x6727 0x7027 0x74CF \ - 0x7C60 0x807E 0x5121 0x7028 0x7262 0x78CA 0x8CC2 0x8CDA \ - 0x8CF4 0x96F7 0x4E86 0x50DA 0x5BEE 0x5ED6 0x6599 0x71CE \ - 0x7642 0x77AD 0x804A 0x84FC 0x907C 0x9B27 0x9F8D 0x58D8 \ - 0x5A41 0x5C62 0x6A13 0x6DDA 0x6F0F 0x763B 0x7D2F 0x7E37 \ - 0x851E 0x8938 0x93E4 0x964B 0x5289 0x65D2 0x67F3 0x69B4 \ - 0x6D41 0x6E9C 0x700F 0x7409 0x7460 0x7559 0x7624 0x786B \ - 0x8B2C 0x985E 0x516D 0x622E 0x9678 0x4F96 0x502B 0x5D19 \ - 0x6DEA 0x7DB8 0x8F2A 0x5F8B 0x6144 0x6817 0xF961 0x9686 -21 0x52D2 0x808B 0x51DC 0x51CC 0x695E 0x7A1C 0x7DBE 0x83F1 \ - 0x9675 0x4FDA 0x5229 0x5398 0x540F 0x550E 0x5C65 0x60A7 \ - 0x674E 0x68A8 0x6D6C 0x7281 0x72F8 0x7406 0x7483 0xF962 \ - 0x75E2 0x7C6C 0x7F79 0x7FB8 0x8389 0x88CF 0x88E1 0x91CC \ - 0x91D0 0x96E2 0x9BC9 0x541D 0x6F7E 0x71D0 0x7498 0x85FA \ - 0x8EAA 0x96A3 0x9C57 0x9E9F 0x6797 0x6DCB 0x7433 0x81E8 \ - 0x9716 0x782C 0x7ACB 0x7B20 0x7C92 0x6469 0x746A 0x75F2 \ - 0x78BC 0x78E8 0x99AC 0x9B54 0x9EBB 0x5BDE 0x5E55 0x6F20 \ - 0x819C 0x83AB 0x9088 0x4E07 0x534D 0x5A29 0x5DD2 0x5F4E \ - 0x6162 0x633D 0x6669 0x66FC 0x6EFF 0x6F2B 0x7063 0x779E \ - 0x842C 0x8513 0x883B 0x8F13 0x9945 0x9C3B 0x551C 0x62B9 \ - 0x672B 0x6CAB 0x8309 0x896A 0x977A 0x4EA1 0x5984 0x5FD8 \ - 0x5FD9 0x671B 0x7DB2 0x7F54 0x8292 0x832B 0x83BD 0x8F1E \ - 0x9099 0x57CB 0x59B9 0x5A92 0x5BD0 0x6627 0x679A 0x6885 \ - 0x6BCF 0x7164 0x7F75 0x8CB7 0x8CE3 0x9081 0x9B45 0x8108 \ - 0x8C8A 0x964C 0x9A40 0x9EA5 0x5B5F 0x6C13 0x731B 0x76F2 \ - 0x76DF 0x840C 0x51AA 0x8993 0x514D 0x5195 0x52C9 0x68C9 \ - 0x6C94 0x7704 0x7720 0x7DBF 0x7DEC 0x9762 0x9EB5 0x6EC5 \ - 0x8511 0x51A5 0x540D 0x547D 0x660E 0x669D 0x6927 0x6E9F \ - 0x76BF 0x7791 0x8317 0x84C2 0x879F 0x9169 0x9298 0x9CF4 \ - 0x8882 0x4FAE 0x5192 0x52DF 0x59C6 0x5E3D 0x6155 0x6478 \ - 0x6479 0x66AE 0x67D0 0x6A21 0x6BCD 0x6BDB 0x725F 0x7261 \ - 0x7441 0x7738 0x77DB 0x8017 0x82BC 0x8305 0x8B00 0x8B28 \ - 0x8C8C 0x6728 0x6C90 0x7267 0x76EE 0x7766 0x7A46 0x9DA9 \ - 0x6B7F 0x6C92 0x5922 0x6726 0x8499 0x536F 0x5893 0x5999 \ - 0x5EDF 0x63CF 0x6634 0x6773 0x6E3A 0x732B 0x7AD7 0x82D7 \ - 0x9328 0x52D9 0x5DEB 0x61AE 0x61CB 0x620A 0x62C7 0x64AB \ - 0x65E0 0x6959 0x6B66 0x6BCB 0x7121 0x73F7 0x755D 0x7E46 \ - 0x821E 0x8302 0x856A 0x8AA3 0x8CBF 0x9727 0x9D61 0x58A8 \ - 0x9ED8 0x5011 0x520E 0x543B 0x554F 0x6587 0x6C76 0x7D0A \ - 0x7D0B 0x805E 0x868A 0x9580 0x96EF 0x52FF 0x6C95 0x7269 \ - 0x5473 0x5A9A 0x5C3E 0x5D4B 0x5F4C 0x5FAE 0x672A 0x68B6 -22 0x6963 0x6E3C 0x6E44 0x7709 0x7C73 0x7F8E 0x8587 0x8B0E \ - 0x8FF7 0x9761 0x9EF4 0x5CB7 0x60B6 0x610D 0x61AB 0x654F \ - 0x65FB 0x65FC 0x6C11 0x6CEF 0x739F 0x73C9 0x7DE1 0x9594 \ - 0x5BC6 0x871C 0x8B10 0x525D 0x535A 0x62CD 0x640F 0x64B2 \ - 0x6734 0x6A38 0x6CCA 0x73C0 0x749E 0x7B94 0x7C95 0x7E1B \ - 0x818A 0x8236 0x8584 0x8FEB 0x96F9 0x99C1 0x4F34 0x534A \ - 0x53CD 0x53DB 0x62CC 0x642C 0x6500 0x6591 0x69C3 0x6CEE \ - 0x6F58 0x73ED 0x7554 0x7622 0x76E4 0x76FC 0x78D0 0x78FB \ - 0x792C 0x7D46 0x822C 0x87E0 0x8FD4 0x9812 0x98EF 0x52C3 \ - 0x62D4 0x64A5 0x6E24 0x6F51 0x767C 0x8DCB 0x91B1 0x9262 \ - 0x9AEE 0x9B43 0x5023 0x508D 0x574A 0x59A8 0x5C28 0x5E47 \ - 0x5F77 0x623F 0x653E 0x65B9 0x65C1 0x6609 0x678B 0x699C \ - 0x6EC2 0x78C5 0x7D21 0x80AA 0x8180 0x822B 0x82B3 0x84A1 \ - 0x868C 0x8A2A 0x8B17 0x90A6 0x9632 0x9F90 0x500D 0x4FF3 \ - 0xF963 0x57F9 0x5F98 0x62DC 0x6392 0x676F 0x6E43 0x7119 \ - 0x76C3 0x80CC 0x80DA 0x88F4 0x88F5 0x8919 0x8CE0 0x8F29 \ - 0x914D 0x966A 0x4F2F 0x4F70 0x5E1B 0x67CF 0x6822 0x767D \ - 0x767E 0x9B44 0x5E61 0x6A0A 0x7169 0x71D4 0x756A 0xF964 \ - 0x7E41 0x8543 0x85E9 0x98DC 0x4F10 0x7B4F 0x7F70 0x95A5 \ - 0x51E1 0x5E06 0x68B5 0x6C3E 0x6C4E 0x6CDB 0x72AF 0x7BC4 \ - 0x8303 0x6CD5 0x743A 0x50FB 0x5288 0x58C1 0x64D8 0x6A97 \ - 0x74A7 0x7656 0x78A7 0x8617 0x95E2 0x9739 0xF965 0x535E \ - 0x5F01 0x8B8A 0x8FA8 0x8FAF 0x908A 0x5225 0x77A5 0x9C49 \ - 0x9F08 0x4E19 0x5002 0x5175 0x5C5B 0x5E77 0x661E 0x663A \ - 0x67C4 0x68C5 0x70B3 0x7501 0x75C5 0x79C9 0x7ADD 0x8F27 \ - 0x9920 0x9A08 0x4FDD 0x5821 0x5831 0x5BF6 0x666E 0x6B65 \ - 0x6D11 0x6E7A 0x6F7D 0x73E4 0x752B 0x83E9 0x88DC 0x8913 \ - 0x8B5C 0x8F14 0x4F0F 0x50D5 0x5310 0x535C 0x5B93 0x5FA9 \ - 0x670D 0x798F 0x8179 0x832F 0x8514 0x8907 0x8986 0x8F39 \ - 0x8F3B 0x99A5 0x9C12 0x672C 0x4E76 0x4FF8 0x5949 0x5C01 \ - 0x5CEF 0x5CF0 0x6367 0x68D2 0x70FD 0x71A2 0x742B 0x7E2B \ - 0x84EC 0x8702 0x9022 0x92D2 0x9CF3 0x4E0D 0x4ED8 0x4FEF -23 0x5085 0x5256 0x526F 0x5426 0x5490 0x57E0 0x592B 0x5A66 \ - 0x5B5A 0x5B75 0x5BCC 0x5E9C 0xF966 0x6276 0x6577 0x65A7 \ - 0x6D6E 0x6EA5 0x7236 0x7B26 0x7C3F 0x7F36 0x8150 0x8151 \ - 0x819A 0x8240 0x8299 0x83A9 0x8A03 0x8CA0 0x8CE6 0x8CFB \ - 0x8D74 0x8DBA 0x90E8 0x91DC 0x961C 0x9644 0x99D9 0x9CE7 \ - 0x5317 0x5206 0x5429 0x5674 0x58B3 0x5954 0x596E 0x5FFF \ - 0x61A4 0x626E 0x6610 0x6C7E 0x711A 0x76C6 0x7C89 0x7CDE \ - 0x7D1B 0x82AC 0x8CC1 0x96F0 0xF967 0x4F5B 0x5F17 0x5F7F \ - 0x62C2 0x5D29 0x670B 0x68DA 0x787C 0x7E43 0x9D6C 0x4E15 \ - 0x5099 0x5315 0x532A 0x5351 0x5983 0x5A62 0x5E87 0x60B2 \ - 0x618A 0x6249 0x6279 0x6590 0x6787 0x69A7 0x6BD4 0x6BD6 \ - 0x6BD7 0x6BD8 0x6CB8 0xF968 0x7435 0x75FA 0x7812 0x7891 \ - 0x79D5 0x79D8 0x7C83 0x7DCB 0x7FE1 0x80A5 0x813E 0x81C2 \ - 0x83F2 0x871A 0x88E8 0x8AB9 0x8B6C 0x8CBB 0x9119 0x975E \ - 0x98DB 0x9F3B 0x56AC 0x5B2A 0x5F6C 0x658C 0x6AB3 0x6BAF \ - 0x6D5C 0x6FF1 0x7015 0x725D 0x73AD 0x8CA7 0x8CD3 0x983B \ - 0x6191 0x6C37 0x8058 0x9A01 0x4E4D 0x4E8B 0x4E9B 0x4ED5 \ - 0x4F3A 0x4F3C 0x4F7F 0x4FDF 0x50FF 0x53F2 0x53F8 0x5506 \ - 0x55E3 0x56DB 0x58EB 0x5962 0x5A11 0x5BEB 0x5BFA 0x5C04 \ - 0x5DF3 0x5E2B 0x5F99 0x601D 0x6368 0x659C 0x65AF 0x67F6 \ - 0x67FB 0x68AD 0x6B7B 0x6C99 0x6CD7 0x6E23 0x7009 0x7345 \ - 0x7802 0x793E 0x7940 0x7960 0x79C1 0x7BE9 0x7D17 0x7D72 \ - 0x8086 0x820D 0x838E 0x84D1 0x86C7 0x88DF 0x8A50 0x8A5E \ - 0x8B1D 0x8CDC 0x8D66 0x8FAD 0x90AA 0x98FC 0x99DF 0x9E9D \ - 0x524A 0xF969 0x6714 0xF96A 0x5098 0x522A 0x5C71 0x6563 \ - 0x6C55 0x73CA 0x7523 0x759D 0x7B97 0x849C 0x9178 0x9730 \ - 0x4E77 0x6492 0x6BBA 0x715E 0x85A9 0x4E09 0xF96B 0x6749 \ - 0x68EE 0x6E17 0x829F 0x8518 0x886B 0x63F7 0x6F81 0x9212 \ - 0x98AF 0x4E0A 0x50B7 0x50CF 0x511F 0x5546 0x55AA 0x5617 \ - 0x5B40 0x5C19 0x5CE0 0x5E38 0x5E8A 0x5EA0 0x5EC2 0x60F3 \ - 0x6851 0x6A61 0x6E58 0x723D 0x7240 0x72C0 0x76F8 0x7965 \ - 0x7BB1 0x7FD4 0x88F3 0x89F4 0x8A73 0x8C61 0x8CDE 0x971C -24 0x585E 0x74BD 0x8CFD 0x55C7 0xF96C 0x7A61 0x7D22 0x8272 \ - 0x7272 0x751F 0x7525 0xF96D 0x7B19 0x5885 0x58FB 0x5DBC \ - 0x5E8F 0x5EB6 0x5F90 0x6055 0x6292 0x637F 0x654D 0x6691 \ - 0x66D9 0x66F8 0x6816 0x68F2 0x7280 0x745E 0x7B6E 0x7D6E \ - 0x7DD6 0x7F72 0x80E5 0x8212 0x85AF 0x897F 0x8A93 0x901D \ - 0x92E4 0x9ECD 0x9F20 0x5915 0x596D 0x5E2D 0x60DC 0x6614 \ - 0x6673 0x6790 0x6C50 0x6DC5 0x6F5F 0x77F3 0x78A9 0x84C6 \ - 0x91CB 0x932B 0x4ED9 0x50CA 0x5148 0x5584 0x5B0B 0x5BA3 \ - 0x6247 0x657E 0x65CB 0x6E32 0x717D 0x7401 0x7444 0x7487 \ - 0x74BF 0x766C 0x79AA 0x7DDA 0x7E55 0x7FA8 0x817A 0x81B3 \ - 0x8239 0x861A 0x87EC 0x8A75 0x8DE3 0x9078 0x9291 0x9425 \ - 0x994D 0x9BAE 0x5368 0x5C51 0x6954 0x6CC4 0x6D29 0x6E2B \ - 0x820C 0x859B 0x893B 0x8A2D 0x8AAA 0x96EA 0x9F67 0x5261 \ - 0x66B9 0x6BB2 0x7E96 0x87FE 0x8D0D 0x9583 0x965D 0x651D \ - 0x6D89 0x71EE 0xF96E 0x57CE 0x59D3 0x5BAC 0x6027 0x60FA \ - 0x6210 0x661F 0x665F 0x7329 0x73F9 0x76DB 0x7701 0x7B6C \ - 0x8056 0x8072 0x8165 0x8AA0 0x9192 0x4E16 0x52E2 0x6B72 \ - 0x6D17 0x7A05 0x7B39 0x7D30 0xF96F 0x8CB0 0x53EC 0x562F \ - 0x5851 0x5BB5 0x5C0F 0x5C11 0x5DE2 0x6240 0x6383 0x6414 \ - 0x662D 0x68B3 0x6CBC 0x6D88 0x6EAF 0x701F 0x70A4 0x71D2 \ - 0x7526 0x758F 0x758E 0x7619 0x7B11 0x7BE0 0x7C2B 0x7D20 \ - 0x7D39 0x852C 0x856D 0x8607 0x8A34 0x900D 0x9061 0x90B5 \ - 0x92B7 0x97F6 0x9A37 0x4FD7 0x5C6C 0x675F 0x6D91 0x7C9F \ - 0x7E8C 0x8B16 0x8D16 0x901F 0x5B6B 0x5DFD 0x640D 0x84C0 \ - 0x905C 0x98E1 0x7387 0x5B8B 0x609A 0x677E 0x6DDE 0x8A1F \ - 0x8AA6 0x9001 0x980C 0x5237 0xF970 0x7051 0x788E 0x9396 \ - 0x8870 0x91D7 0x4FEE 0x53D7 0x55FD 0x56DA 0x5782 0x58FD \ - 0x5AC2 0x5B88 0x5CAB 0x5CC0 0x5E25 0x6101 0x620D 0x624B \ - 0x6388 0x641C 0x6536 0x6578 0x6A39 0x6B8A 0x6C34 0x6D19 \ - 0x6F31 0x71E7 0x72E9 0x7378 0x7407 0x74B2 0x7626 0x7761 \ - 0x79C0 0x7A57 0x7AEA 0x7CB9 0x7D8F 0x7DAC 0x7E61 0x7F9E \ - 0x8129 0x8331 0x8490 0x84DA 0x85EA 0x8896 0x8AB0 0x8B90 -25 0x8F38 0x9042 0x9083 0x916C 0x9296 0x92B9 0x968B 0x96A7 \ - 0x96A8 0x96D6 0x9700 0x9808 0x9996 0x9AD3 0x9B1A 0x53D4 \ - 0x587E 0x5919 0x5B70 0x5BBF 0x6DD1 0x6F5A 0x719F 0x7421 \ - 0x74B9 0x8085 0x83FD 0x5DE1 0x5F87 0x5FAA 0x6042 0x65EC \ - 0x6812 0x696F 0x6A53 0x6B89 0x6D35 0x6DF3 0x73E3 0x76FE \ - 0x77AC 0x7B4D 0x7D14 0x8123 0x821C 0x8340 0x84F4 0x8563 \ - 0x8A62 0x8AC4 0x9187 0x931E 0x9806 0x99B4 0x620C 0x8853 \ - 0x8FF0 0x9265 0x5D07 0x5D27 0x5D69 0x745F 0x819D 0x8768 \ - 0x6FD5 0x62FE 0x7FD2 0x8936 0x8972 0x4E1E 0x4E58 0x50E7 \ - 0x52DD 0x5347 0x627F 0x6607 0x7E69 0x8805 0x965E 0x4F8D \ - 0x5319 0x5636 0x59CB 0x5AA4 0x5C38 0x5C4E 0x5C4D 0x5E02 \ - 0x5F11 0x6043 0x65BD 0x662F 0x6642 0x67BE 0x67F4 0x731C \ - 0x77E2 0x793A 0x7FC5 0x8494 0x84CD 0x8996 0x8A66 0x8A69 \ - 0x8AE1 0x8C55 0x8C7A 0x57F4 0x5BD4 0x5F0F 0x606F 0x62ED \ - 0x690D 0x6B96 0x6E5C 0x7184 0x7BD2 0x8755 0x8B58 0x8EFE \ - 0x98DF 0x98FE 0x4F38 0x4F81 0x4FE1 0x547B 0x5A20 0x5BB8 \ - 0x613C 0x65B0 0x6668 0x71FC 0x7533 0x795E 0x7D33 0x814E \ - 0x81E3 0x8398 0x85AA 0x85CE 0x8703 0x8A0A 0x8EAB 0x8F9B \ - 0xF971 0x8FC5 0x5931 0x5BA4 0x5BE6 0x6089 0x5BE9 0x5C0B \ - 0x5FC3 0x6C81 0xF972 0x6DF1 0x700B 0x751A 0x82AF 0x8AF6 \ - 0x4EC0 0x5341 0xF973 0x96D9 0x6C0F 0x4E9E 0x4FC4 0x5152 \ - 0x555E 0x5A25 0x5CE8 0x6211 0x7259 0x82BD 0x83AA 0x86FE \ - 0x8859 0x8A1D 0x963F 0x96C5 0x9913 0x9D09 0x9D5D 0x580A \ - 0x5CB3 0x5DBD 0x5E44 0x60E1 0x6115 0x63E1 0x6A02 0x6E25 \ - 0x9102 0x9354 0x984E 0x9C10 0x9F77 0x5B89 0x5CB8 0x6309 \ - 0x664F 0x6848 0x773C 0x96C1 0x978D 0x9854 0x9B9F 0x65A1 \ - 0x8B01 0x8ECB 0x95BC 0x5535 0x5CA9 0x5DD6 0x5EB5 0x6697 \ - 0x764C 0x83F4 0x95C7 0x58D3 0x62BC 0x72CE 0x9D28 0x4EF0 \ - 0x592E 0x600F 0x663B 0x6B83 0x79E7 0x9D26 0x5393 0x54C0 \ - 0x57C3 0x5D16 0x611B 0x66D6 0x6DAF 0x788D 0x827E 0x9698 \ - 0x9744 0x5384 0x627C 0x6396 0x6DB2 0x7E0A 0x814B 0x984D \ - 0x6AFB 0x7F4C 0x9DAF 0x9E1A 0x4E5F 0x503B 0x51B6 0x591C -26 0x60F9 0x63F6 0x6930 0x723A 0x8036 0xF974 0x91CE 0x5F31 \ - 0xF975 0xF976 0x7D04 0x82E5 0x846F 0x84BB 0x85E5 0x8E8D \ - 0xF977 0x4F6F 0xF978 0xF979 0x58E4 0x5B43 0x6059 0x63DA \ - 0x6518 0x656D 0x6698 0xF97A 0x694A 0x6A23 0x6D0B 0x7001 \ - 0x716C 0x75D2 0x760D 0x79B3 0x7A70 0xF97B 0x7F8A 0xF97C \ - 0x8944 0xF97D 0x8B93 0x91C0 0x967D 0xF97E 0x990A 0x5704 \ - 0x5FA1 0x65BC 0x6F01 0x7600 0x79A6 0x8A9E 0x99AD 0x9B5A \ - 0x9F6C 0x5104 0x61B6 0x6291 0x6A8D 0x81C6 0x5043 0x5830 \ - 0x5F66 0x7109 0x8A00 0x8AFA 0x5B7C 0x8616 0x4FFA 0x513C \ - 0x56B4 0x5944 0x63A9 0x6DF9 0x5DAA 0x696D 0x5186 0x4E88 \ - 0x4F59 0xF97F 0xF980 0xF981 0x5982 0xF982 0xF983 0x6B5F \ - 0x6C5D 0xF984 0x74B5 0x7916 0xF985 0x8207 0x8245 0x8339 \ - 0x8F3F 0x8F5D 0xF986 0x9918 0xF987 0xF988 0xF989 0x4EA6 \ - 0xF98A 0x57DF 0x5F79 0x6613 0xF98B 0xF98C 0x75AB 0x7E79 \ - 0x8B6F 0xF98D 0x9006 0x9A5B 0x56A5 0x5827 0x59F8 0x5A1F \ - 0x5BB4 0xF98E 0x5EF6 0xF98F 0xF990 0x6350 0x633B 0xF991 \ - 0x693D 0x6C87 0x6CBF 0x6D8E 0x6D93 0x6DF5 0x6F14 0xF992 \ - 0x70DF 0x7136 0x7159 0xF993 0x71C3 0x71D5 0xF994 0x784F \ - 0x786F 0xF995 0x7B75 0x7DE3 0xF996 0x7E2F 0xF997 0x884D \ - 0x8EDF 0xF998 0xF999 0xF99A 0x925B 0xF99B 0x9CF6 0xF99C \ - 0xF99D 0xF99E 0x6085 0x6D85 0xF99F 0x71B1 0xF9A0 0xF9A1 \ - 0x95B1 0x53AD 0xF9A2 0xF9A3 0xF9A4 0x67D3 0xF9A5 0x708E \ - 0x7130 0x7430 0x8276 0x82D2 0xF9A6 0x95BB 0x9AE5 0x9E7D \ - 0x66C4 0xF9A7 0x71C1 0x8449 0xF9A8 0xF9A9 0x584B 0xF9AA \ - 0xF9AB 0x5DB8 0x5F71 0xF9AC 0x6620 0x668E 0x6979 0x69AE \ - 0x6C38 0x6CF3 0x6E36 0x6F41 0x6FDA 0x701B 0x702F 0x7150 \ - 0x71DF 0x7370 0xF9AD 0x745B 0xF9AE 0x74D4 0x76C8 0x7A4E \ - 0x7E93 0xF9AF 0xF9B0 0x82F1 0x8A60 0x8FCE 0xF9B1 0x9348 \ - 0xF9B2 0x9719 0xF9B3 0xF9B4 0x4E42 0x502A 0xF9B5 0x5208 \ - 0x53E1 0x66F3 0x6C6D 0x6FCA 0x730A 0x777F 0x7A62 0x82AE \ - 0x85DD 0x8602 0xF9B6 0x88D4 0x8A63 0x8B7D 0x8C6B 0xF9B7 \ - 0x92B3 0xF9B8 0x9713 0x9810 0x4E94 0x4F0D 0x4FC9 0x50B2 -27 0x5348 0x543E 0x5433 0x55DA 0x5862 0x58BA 0x5967 0x5A1B \ - 0x5BE4 0x609F 0xF9B9 0x61CA 0x6556 0x65FF 0x6664 0x68A7 \ - 0x6C5A 0x6FB3 0x70CF 0x71AC 0x7352 0x7B7D 0x8708 0x8AA4 \ - 0x9C32 0x9F07 0x5C4B 0x6C83 0x7344 0x7389 0x923A 0x6EAB \ - 0x7465 0x761F 0x7A69 0x7E15 0x860A 0x5140 0x58C5 0x64C1 \ - 0x74EE 0x7515 0x7670 0x7FC1 0x9095 0x96CD 0x9954 0x6E26 \ - 0x74E6 0x7AA9 0x7AAA 0x81E5 0x86D9 0x8778 0x8A1B 0x5A49 \ - 0x5B8C 0x5B9B 0x68A1 0x6900 0x6D63 0x73A9 0x7413 0x742C \ - 0x7897 0x7DE9 0x7FEB 0x8118 0x8155 0x839E 0x8C4C 0x962E \ - 0x9811 0x66F0 0x5F80 0x65FA 0x6789 0x6C6A 0x738B 0x502D \ - 0x5A03 0x6B6A 0x77EE 0x5916 0x5D6C 0x5DCD 0x7325 0x754F \ - 0xF9BA 0xF9BB 0x50E5 0x51F9 0x582F 0x592D 0x5996 0x59DA \ - 0x5BE5 0xF9BC 0xF9BD 0x5DA2 0x62D7 0x6416 0x6493 0x64FE \ - 0xF9BE 0x66DC 0xF9BF 0x6A48 0xF9C0 0x71FF 0x7464 0xF9C1 \ - 0x7A88 0x7AAF 0x7E47 0x7E5E 0x8000 0x8170 0xF9C2 0x87EF \ - 0x8981 0x8B20 0x9059 0xF9C3 0x9080 0x9952 0x617E 0x6B32 \ - 0x6D74 0x7E1F 0x8925 0x8FB1 0x4FD1 0x50AD 0x5197 0x52C7 \ - 0x57C7 0x5889 0x5BB9 0x5EB8 0x6142 0x6995 0x6D8C 0x6E67 \ - 0x6EB6 0x7194 0x7462 0x7528 0x752C 0x8073 0x8338 0x84C9 \ - 0x8E0A 0x9394 0x93DE 0xF9C4 0x4E8E 0x4F51 0x5076 0x512A \ - 0x53C8 0x53CB 0x53F3 0x5B87 0x5BD3 0x5C24 0x611A 0x6182 \ - 0x65F4 0x725B 0x7397 0x7440 0x76C2 0x7950 0x7991 0x79B9 \ - 0x7D06 0x7FBD 0x828B 0x85D5 0x865E 0x8FC2 0x9047 0x90F5 \ - 0x91EA 0x9685 0x96E8 0x96E9 0x52D6 0x5F67 0x65ED 0x6631 \ - 0x682F 0x715C 0x7A36 0x90C1 0x980A 0x4E91 0xF9C5 0x6A52 \ - 0x6B9E 0x6F90 0x7189 0x8018 0x82B8 0x8553 0x904B 0x9695 \ - 0x96F2 0x97FB 0x851A 0x9B31 0x4E90 0x718A 0x96C4 0x5143 \ - 0x539F 0x54E1 0x5713 0x5712 0x57A3 0x5A9B 0x5AC4 0x5BC3 \ - 0x6028 0x613F 0x63F4 0x6C85 0x6D39 0x6E72 0x6E90 0x7230 \ - 0x733F 0x7457 0x82D1 0x8881 0x8F45 0x9060 0xF9C6 0x9662 \ - 0x9858 0x9D1B 0x6708 0x8D8A 0x925E 0x4F4D 0x5049 0x50DE \ - 0x5371 0x570D 0x59D4 0x5A01 0x5C09 0x6170 0x6690 0x6E2D -28 0x7232 0x744B 0x7DEF 0x80C3 0x840E 0x8466 0x853F 0x875F \ - 0x885B 0x8918 0x8B02 0x9055 0x97CB 0x9B4F 0x4E73 0x4F91 \ - 0x5112 0x516A 0xF9C7 0x552F 0x55A9 0x5B7A 0x5BA5 0x5E7C \ - 0x5E7D 0x5EBE 0x60A0 0x60DF 0x6108 0x6109 0x63C4 0x6538 \ - 0x6709 0xF9C8 0x67D4 0x67DA 0xF9C9 0x6961 0x6962 0x6CB9 \ - 0x6D27 0xF9CA 0x6E38 0xF9CB 0x6FE1 0x7336 0x7337 0xF9CC \ - 0x745C 0x7531 0xF9CD 0x7652 0xF9CE 0xF9CF 0x7DAD 0x81FE \ - 0x8438 0x88D5 0x8A98 0x8ADB 0x8AED 0x8E30 0x8E42 0x904A \ - 0x903E 0x907A 0x9149 0x91C9 0x936E 0xF9D0 0xF9D1 0x5809 \ - 0xF9D2 0x6BD3 0x8089 0x80B2 0xF9D3 0xF9D4 0x5141 0x596B \ - 0x5C39 0xF9D5 0xF9D6 0x6F64 0x73A7 0x80E4 0x8D07 0xF9D7 \ - 0x9217 0x958F 0xF9D8 0xF9D9 0xF9DA 0xF9DB 0x807F 0x620E \ - 0x701C 0x7D68 0x878D 0xF9DC 0x57A0 0x6069 0x6147 0x6BB7 \ - 0x8ABE 0x9280 0x96B1 0x4E59 0x541F 0x6DEB 0x852D 0x9670 \ - 0x97F3 0x98EE 0x63D6 0x6CE3 0x9091 0x51DD 0x61C9 0x81BA \ - 0x9DF9 0x4F9D 0x501A 0x5100 0x5B9C 0x610F 0x61FF 0x64EC \ - 0x6905 0x6BC5 0x7591 0x77E3 0x7FA9 0x8264 0x858F 0x87FB \ - 0x8863 0x8ABC 0x8B70 0x91AB 0x4E8C 0x4EE5 0x4F0A 0xF9DD \ - 0xF9DE 0x5937 0x59E8 0xF9DF 0x5DF2 0x5F1B 0x5F5B 0x6021 \ - 0xF9E0 0xF9E1 0xF9E2 0xF9E3 0x723E 0x73E5 0xF9E4 0x7570 \ - 0x75CD 0xF9E5 0x79FB 0xF9E6 0x800C 0x8033 0x8084 0x82E1 \ - 0x8351 0xF9E7 0xF9E8 0x8CBD 0x8CB3 0x9087 0xF9E9 0xF9EA \ - 0x98F4 0x990C 0xF9EB 0xF9EC 0x7037 0x76CA 0x7FCA 0x7FCC \ - 0x7FFC 0x8B1A 0x4EBA 0x4EC1 0x5203 0x5370 0xF9ED 0x54BD \ - 0x56E0 0x59FB 0x5BC5 0x5F15 0x5FCD 0x6E6E 0xF9EE 0xF9EF \ - 0x7D6A 0x8335 0xF9F0 0x8693 0x8A8D 0xF9F1 0x976D 0x9777 \ - 0xF9F2 0xF9F3 0x4E00 0x4F5A 0x4F7E 0x58F9 0x65E5 0x6EA2 \ - 0x9038 0x93B0 0x99B9 0x4EFB 0x58EC 0x598A 0x59D9 0x6041 \ - 0xF9F4 0xF9F5 0x7A14 0xF9F6 0x834F 0x8CC3 0x5165 0x5344 \ - 0xF9F7 0xF9F8 0xF9F9 0x4ECD 0x5269 0x5B55 0x82BF 0x4ED4 \ - 0x523A 0x54A8 0x59C9 0x59FF 0x5B50 0x5B57 0x5B5C 0x6063 \ - 0x6148 0x6ECB 0x7099 0x716E 0x7386 0x74F7 0x75B5 0x78C1 -29 0x7D2B 0x8005 0x81EA 0x8328 0x8517 0x85C9 0x8AEE 0x8CC7 \ - 0x96CC 0x4F5C 0x52FA 0x56BC 0x65AB 0x6628 0x707C 0x70B8 \ - 0x7235 0x7DBD 0x828D 0x914C 0x96C0 0x9D72 0x5B71 0x68E7 \ - 0x6B98 0x6F7A 0x76DE 0x5C91 0x66AB 0x6F5B 0x7BB4 0x7C2A \ - 0x8836 0x96DC 0x4E08 0x4ED7 0x5320 0x5834 0x58BB 0x58EF \ - 0x596C 0x5C07 0x5E33 0x5E84 0x5F35 0x638C 0x66B2 0x6756 \ - 0x6A1F 0x6AA3 0x6B0C 0x6F3F 0x7246 0xF9FA 0x7350 0x748B \ - 0x7AE0 0x7CA7 0x8178 0x81DF 0x81E7 0x838A 0x846C 0x8523 \ - 0x8594 0x85CF 0x88DD 0x8D13 0x91AC 0x9577 0x969C 0x518D \ - 0x54C9 0x5728 0x5BB0 0x624D 0x6750 0x683D 0x6893 0x6E3D \ - 0x6ED3 0x707D 0x7E21 0x88C1 0x8CA1 0x8F09 0x9F4B 0x9F4E \ - 0x722D 0x7B8F 0x8ACD 0x931A 0x4F47 0x4F4E 0x5132 0x5480 \ - 0x59D0 0x5E95 0x62B5 0x6775 0x696E 0x6A17 0x6CAE 0x6E1A \ - 0x72D9 0x732A 0x75BD 0x7BB8 0x7D35 0x82E7 0x83F9 0x8457 \ - 0x85F7 0x8A5B 0x8CAF 0x8E87 0x9019 0x90B8 0x96CE 0x9F5F \ - 0x52E3 0x540A 0x5AE1 0x5BC2 0x6458 0x6575 0x6EF4 0x72C4 \ - 0xF9FB 0x7684 0x7A4D 0x7B1B 0x7C4D 0x7E3E 0x7FDF 0x837B \ - 0x8B2B 0x8CCA 0x8D64 0x8DE1 0x8E5F 0x8FEA 0x8FF9 0x9069 \ - 0x93D1 0x4F43 0x4F7A 0x50B3 0x5168 0x5178 0x524D 0x526A \ - 0x5861 0x587C 0x5960 0x5C08 0x5C55 0x5EDB 0x609B 0x6230 \ - 0x6813 0x6BBF 0x6C08 0x6FB1 0x714E 0x7420 0x7530 0x7538 \ - 0x7551 0x7672 0x7B4C 0x7B8B 0x7BAD 0x7BC6 0x7E8F 0x8A6E \ - 0x8F3E 0x8F49 0x923F 0x9293 0x9322 0x942B 0x96FB 0x985A \ - 0x986B 0x991E 0x5207 0x622A 0x6298 0x6D59 0x7664 0x7ACA \ - 0x7BC0 0x7D76 0x5360 0x5CBE 0x5E97 0x6F38 0x70B9 0x7C98 \ - 0x9711 0x9B8E 0x9EDE 0x63A5 0x647A 0x8776 0x4E01 0x4E95 \ - 0x4EAD 0x505C 0x5075 0x5448 0x59C3 0x5B9A 0x5E40 0x5EAD \ - 0x5EF7 0x5F81 0x60C5 0x633A 0x653F 0x6574 0x65CC 0x6676 \ - 0x6678 0x67FE 0x6968 0x6A89 0x6B63 0x6C40 0x6DC0 0x6DE8 \ - 0x6E1F 0x6E5E 0x701E 0x70A1 0x738E 0x73FD 0x753A 0x775B \ - 0x7887 0x798E 0x7A0B 0x7A7D 0x7CBE 0x7D8E 0x8247 0x8A02 \ - 0x8AEA 0x8C9E 0x912D 0x914A 0x91D8 0x9266 0x92CC 0x9320 -30 0x9706 0x9756 0x975C 0x9802 0x9F0E 0x5236 0x5291 0x557C \ - 0x5824 0x5E1D 0x5F1F 0x608C 0x63D0 0x68AF 0x6FDF 0x796D \ - 0x7B2C 0x81CD 0x85BA 0x88FD 0x8AF8 0x8E44 0x918D 0x9664 \ - 0x969B 0x973D 0x984C 0x9F4A 0x4FCE 0x5146 0x51CB 0x52A9 \ - 0x5632 0x5F14 0x5F6B 0x63AA 0x64CD 0x65E9 0x6641 0x66FA \ - 0x66F9 0x671D 0x689D 0x68D7 0x69FD 0x6F15 0x6F6E 0x7167 \ - 0x71E5 0x722A 0x74AA 0x773A 0x7956 0x795A 0x79DF 0x7A20 \ - 0x7A95 0x7C97 0x7CDF 0x7D44 0x7E70 0x8087 0x85FB 0x86A4 \ - 0x8A54 0x8ABF 0x8D99 0x8E81 0x9020 0x906D 0x91E3 0x963B \ - 0x96D5 0x9CE5 0x65CF 0x7C07 0x8DB3 0x93C3 0x5B58 0x5C0A \ - 0x5352 0x62D9 0x731D 0x5027 0x5B97 0x5F9E 0x60B0 0x616B \ - 0x68D5 0x6DD9 0x742E 0x7A2E 0x7D42 0x7D9C 0x7E31 0x816B \ - 0x8E2A 0x8E35 0x937E 0x9418 0x4F50 0x5750 0x5DE6 0x5EA7 \ - 0x632B 0x7F6A 0x4E3B 0x4F4F 0x4F8F 0x505A 0x59DD 0x80C4 \ - 0x546A 0x5468 0x55FE 0x594F 0x5B99 0x5DDE 0x5EDA 0x665D \ - 0x6731 0x67F1 0x682A 0x6CE8 0x6D32 0x6E4A 0x6F8D 0x70B7 \ - 0x73E0 0x7587 0x7C4C 0x7D02 0x7D2C 0x7DA2 0x821F 0x86DB \ - 0x8A3B 0x8A85 0x8D70 0x8E8A 0x8F33 0x9031 0x914E 0x9152 \ - 0x9444 0x99D0 0x7AF9 0x7CA5 0x4FCA 0x5101 0x51C6 0x57C8 \ - 0x5BEF 0x5CFB 0x6659 0x6A3D 0x6D5A 0x6E96 0x6FEC 0x710C \ - 0x756F 0x7AE3 0x8822 0x9021 0x9075 0x96CB 0x99FF 0x8301 \ - 0x4E2D 0x4EF2 0x8846 0x91CD 0x537D 0x6ADB 0x696B 0x6C41 \ - 0x847A 0x589E 0x618E 0x66FE 0x62EF 0x70DD 0x7511 0x75C7 \ - 0x7E52 0x84B8 0x8B49 0x8D08 0x4E4B 0x53EA 0x54AB 0x5730 \ - 0x5740 0x5FD7 0x6301 0x6307 0x646F 0x652F 0x65E8 0x667A \ - 0x679D 0x67B3 0x6B62 0x6C60 0x6C9A 0x6F2C 0x77E5 0x7825 \ - 0x7949 0x7957 0x7D19 0x80A2 0x8102 0x81F3 0x829D 0x82B7 \ - 0x8718 0x8A8C 0xF9FC 0x8D04 0x8DBE 0x9072 0x76F4 0x7A19 \ - 0x7A37 0x7E54 0x8077 0x5507 0x55D4 0x5875 0x632F 0x6422 \ - 0x6649 0x664B 0x686D 0x699B 0x6B84 0x6D25 0x6EB1 0x73CD \ - 0x7468 0x74A1 0x755B 0x75B9 0x76E1 0x771E 0x778B 0x79E6 \ - 0x7E09 0x7E1D 0x81FB 0x852F 0x8897 0x8A3A 0x8CD1 0x8EEB -31 0x8FB0 0x9032 0x93AD 0x9663 0x9673 0x9707 0x4F84 0x53F1 \ - 0x59EA 0x5AC9 0x5E19 0x684E 0x74C6 0x75BE 0x79E9 0x7A92 \ - 0x81A3 0x86ED 0x8CEA 0x8DCC 0x8FED 0x659F 0x6715 0xF9FD \ - 0x57F7 0x6F57 0x7DDD 0x8F2F 0x93F6 0x96C6 0x5FB5 0x61F2 \ - 0x6F84 0x4E14 0x4F98 0x501F 0x53C9 0x55DF 0x5D6F 0x5DEE \ - 0x6B21 0x6B64 0x78CB 0x7B9A 0xF9FE 0x8E49 0x8ECA 0x906E \ - 0x6349 0x643E 0x7740 0x7A84 0x932F 0x947F 0x9F6A 0x64B0 \ - 0x6FAF 0x71E6 0x74A8 0x74DA 0x7AC4 0x7C12 0x7E82 0x7CB2 \ - 0x7E98 0x8B9A 0x8D0A 0x947D 0x9910 0x994C 0x5239 0x5BDF \ - 0x64E6 0x672D 0x7D2E 0x50ED 0x53C3 0x5879 0x6158 0x6159 \ - 0x61FA 0x65AC 0x7AD9 0x8B92 0x8B96 0x5009 0x5021 0x5275 \ - 0x5531 0x5A3C 0x5EE0 0x5F70 0x6134 0x655E 0x660C 0x6636 \ - 0x66A2 0x69CD 0x6EC4 0x6F32 0x7316 0x7621 0x7A93 0x8139 \ - 0x8259 0x83D6 0x84BC 0x50B5 0x57F0 0x5BC0 0x5BE8 0x5F69 \ - 0x63A1 0x7826 0x7DB5 0x83DC 0x8521 0x91C7 0x91F5 0x518A \ - 0x67F5 0x7B56 0x8CAC 0x51C4 0x59BB 0x60BD 0x8655 0x501C \ - 0xF9FF 0x5254 0x5C3A 0x617D 0x621A 0x62D3 0x64F2 0x65A5 \ - 0x6ECC 0x7620 0x810A 0x8E60 0x965F 0x96BB 0x4EDF 0x5343 \ - 0x5598 0x5929 0x5DDD 0x64C5 0x6CC9 0x6DFA 0x7394 0x7A7F \ - 0x821B 0x85A6 0x8CE4 0x8E10 0x9077 0x91E7 0x95E1 0x9621 \ - 0x97C6 0x51F8 0x54F2 0x5586 0x5FB9 0x64A4 0x6F88 0x7DB4 \ - 0x8F1F 0x8F4D 0x9435 0x50C9 0x5C16 0x6CBE 0x6DFB 0x751B \ - 0x77BB 0x7C3D 0x7C64 0x8A79 0x8AC2 0x581E 0x59BE 0x5E16 \ - 0x6377 0x7252 0x758A 0x776B 0x8ADC 0x8CBC 0x8F12 0x5EF3 \ - 0x6674 0x6DF8 0x807D 0x83C1 0x8ACB 0x9751 0x9BD6 0xFA00 \ - 0x5243 0x66FF 0x6D95 0x6EEF 0x7DE0 0x8AE6 0x902E 0x905E \ - 0x9AD4 0x521D 0x527F 0x54E8 0x6194 0x6284 0x62DB 0x68A2 \ - 0x6912 0x695A 0x6A35 0x7092 0x7126 0x785D 0x7901 0x790E \ - 0x79D2 0x7A0D 0x8096 0x8278 0x82D5 0x8349 0x8549 0x8C82 \ - 0x8D85 0x9162 0x918B 0x91AE 0x4FC3 0x56D1 0x71ED 0x77D7 \ - 0x8700 0x89F8 0x5BF8 0x5FD6 0x6751 0x90A8 0x53E2 0x585A \ - 0x5BF5 0x60A4 0x6181 0x6460 0x7E3D 0x8070 0x8525 0x9283 -32 0x64AE 0x50AC 0x5D14 0x6700 0x589C 0x62BD 0x63A8 0x690E \ - 0x6978 0x6A1E 0x6E6B 0x76BA 0x79CB 0x82BB 0x8429 0x8ACF \ - 0x8DA8 0x8FFD 0x9112 0x914B 0x919C 0x9310 0x9318 0x939A \ - 0x96DB 0x9A36 0x9C0D 0x4E11 0x755C 0x795D 0x7AFA 0x7B51 \ - 0x7BC9 0x7E2E 0x84C4 0x8E59 0x8E74 0x8EF8 0x9010 0x6625 \ - 0x693F 0x7443 0x51FA 0x672E 0x9EDC 0x5145 0x5FE0 0x6C96 \ - 0x87F2 0x885D 0x8877 0x60B4 0x81B5 0x8403 0x8D05 0x53D6 \ - 0x5439 0x5634 0x5A36 0x5C31 0x708A 0x7FE0 0x805A 0x8106 \ - 0x81ED 0x8DA3 0x9189 0x9A5F 0x9DF2 0x5074 0x4EC4 0x53A0 \ - 0x60FB 0x6E2C 0x5C64 0x4F88 0x5024 0x55E4 0x5CD9 0x5E5F \ - 0x6065 0x6894 0x6CBB 0x6DC4 0x71BE 0x75D4 0x75F4 0x7661 \ - 0x7A1A 0x7A49 0x7DC7 0x7DFB 0x7F6E 0x81F4 0x86A9 0x8F1C \ - 0x96C9 0x99B3 0x9F52 0x5247 0x52C5 0x98ED 0x89AA 0x4E03 \ - 0x67D2 0x6F06 0x4FB5 0x5BE2 0x6795 0x6C88 0x6D78 0x741B \ - 0x7827 0x91DD 0x937C 0x87C4 0x79E4 0x7A31 0x5FEB 0x4ED6 \ - 0x54A4 0x553E 0x58AE 0x59A5 0x60F0 0x6253 0x62D6 0x6736 \ - 0x6955 0x8235 0x9640 0x99B1 0x99DD 0x502C 0x5353 0x5544 \ - 0x577C 0xFA01 0x6258 0xFA02 0x64E2 0x666B 0x67DD 0x6FC1 \ - 0x6FEF 0x7422 0x7438 0x8A17 0x9438 0x5451 0x5606 0x5766 \ - 0x5F48 0x619A 0x6B4E 0x7058 0x70AD 0x7DBB 0x8A95 0x596A \ - 0x812B 0x63A2 0x7708 0x803D 0x8CAA 0x5854 0x642D 0x69BB \ - 0x5B95 0x5E11 0x6E6F 0xFA03 0x8569 0x514C 0x53F0 0x592A \ - 0x6020 0x614B 0x6B86 0x6C70 0x6CF0 0x7B1E 0x80CE 0x82D4 \ - 0x8DC6 0x90B0 0x98B1 0xFA04 0x64C7 0x6FA4 0x6491 0x6504 \ - 0x514E 0x5410 0x571F 0x8A0E 0x615F 0x6876 0xFA05 0x75DB \ - 0x7B52 0x7D71 0x901A 0x5806 0x69CC 0x817F 0x892A 0x9000 \ - 0x9839 0x5078 0x5957 0x59AC 0x6295 0x900F 0x9B2A 0x615D \ - 0x7279 0x95D6 0x5761 0x5A46 0x5DF4 0x628A 0x64AD 0x64FA \ - 0x6777 0x6CE2 0x6D3E 0x722C 0x7436 0x7834 0x7F77 0x82AD \ - 0x8DDB 0x9817 0x5224 0x5742 0x677F 0x7248 0x74E3 0x8CA9 \ - 0x8FA6 0x9211 0x962A 0x516B 0x53ED 0x634C 0x4F69 0x5504 \ - 0x6096 0x6557 0x6C9B 0x6D7F 0x724C 0x72FD 0x7A17 0x8987 -33 0x8C9D 0x5F6D 0x6F8E 0x70F9 0x81A8 0x610E 0x4FBF 0x504F \ - 0x6241 0x7247 0x7BC7 0x7DE8 0x7FE9 0x904D 0x97AD 0x9A19 \ - 0x8CB6 0x576A 0x5E73 0x67B0 0x840D 0x8A55 0x5420 0x5B16 \ - 0x5E63 0x5EE2 0x5F0A 0x6583 0x80BA 0x853D 0x9589 0x965B \ - 0x4F48 0x5305 0x530D 0x530F 0x5486 0x54FA 0x5703 0x5E03 \ - 0x6016 0x629B 0x62B1 0x6355 0xFA06 0x6CE1 0x6D66 0x75B1 \ - 0x7832 0x80DE 0x812F 0x82DE 0x8461 0x84B2 0x888D 0x8912 \ - 0x900B 0x92EA 0x98FD 0x9B91 0x5E45 0x66B4 0x66DD 0x7011 \ - 0x7206 0xFA07 0x4FF5 0x527D 0x5F6A 0x6153 0x6753 0x6A19 \ - 0x6F02 0x74E2 0x7968 0x8868 0x8C79 0x98C7 0x98C4 0x9A43 \ - 0x54C1 0x7A1F 0x6953 0x8AF7 0x8C4A 0x98A8 0x99AE 0x5F7C \ - 0x62AB 0x75B2 0x76AE 0x88AB 0x907F 0x9642 0x5339 0x5F3C \ - 0x5FC5 0x6CCC 0x73CC 0x7562 0x758B 0x7B46 0x82FE 0x999D \ - 0x4E4F 0x903C 0x4E0B 0x4F55 0x53A6 0x590F 0x5EC8 0x6630 \ - 0x6CB3 0x7455 0x8377 0x8766 0x8CC0 0x9050 0x971E 0x9C15 \ - 0x58D1 0x5B78 0x8650 0x8B14 0x9DB4 0x5BD2 0x6068 0x608D \ - 0x65F1 0x6C57 0x6F22 0x6FA3 0x701A 0x7F55 0x7FF0 0x9591 \ - 0x9592 0x9650 0x97D3 0x5272 0x8F44 0x51FD 0x542B 0x54B8 \ - 0x5563 0x558A 0x6ABB 0x6DB5 0x7DD8 0x8266 0x929C 0x9677 \ - 0x9E79 0x5408 0x54C8 0x76D2 0x86E4 0x95A4 0x95D4 0x965C \ - 0x4EA2 0x4F09 0x59EE 0x5AE6 0x5DF7 0x6052 0x6297 0x676D \ - 0x6841 0x6C86 0x6E2F 0x7F38 0x809B 0x822A 0xFA08 0xFA09 \ - 0x9805 0x4EA5 0x5055 0x54B3 0x5793 0x595A 0x5B69 0x5BB3 \ - 0x61C8 0x6977 0x6D77 0x7023 0x87F9 0x89E3 0x8A72 0x8AE7 \ - 0x9082 0x99ED 0x9AB8 0x52BE 0x6838 0x5016 0x5E78 0x674F \ - 0x8347 0x884C 0x4EAB 0x5411 0x56AE 0x73E6 0x9115 0x97FF \ - 0x9909 0x9957 0x9999 0x5653 0x589F 0x865B 0x8A31 0x61B2 \ - 0x6AF6 0x737B 0x8ED2 0x6B47 0x96AA 0x9A57 0x5955 0x7200 \ - 0x8D6B 0x9769 0x4FD4 0x5CF4 0x5F26 0x61F8 0x665B 0x6CEB \ - 0x70AB 0x7384 0x73B9 0x73FE 0x7729 0x774D 0x7D43 0x7D62 \ - 0x7E23 0x8237 0x8852 0xFA0A 0x8CE2 0x9249 0x986F 0x5B51 \ - 0x7A74 0x8840 0x9801 0x5ACC 0x4FE0 0x5354 0x593E 0x5CFD -34 0x633E 0x6D79 0x72F9 0x8105 0x8107 0x83A2 0x92CF 0x9830 \ - 0x4EA8 0x5144 0x5211 0x578B 0x5F62 0x6CC2 0x6ECE 0x7005 \ - 0x7050 0x70AF 0x7192 0x73E9 0x7469 0x834A 0x87A2 0x8861 \ - 0x9008 0x90A2 0x93A3 0x99A8 0x516E 0x5F57 0x60E0 0x6167 \ - 0x66B3 0x8559 0x8E4A 0x91AF 0x978B 0x4E4E 0x4E92 0x547C \ - 0x58D5 0x58FA 0x597D 0x5CB5 0x5F27 0x6236 0x6248 0x660A \ - 0x6667 0x6BEB 0x6D69 0x6DCF 0x6E56 0x6EF8 0x6F94 0x6FE0 \ - 0x6FE9 0x705D 0x72D0 0x7425 0x745A 0x74E0 0x7693 0x795C \ - 0x7CCA 0x7E1E 0x80E1 0x82A6 0x846B 0x84BF 0x864E 0x865F \ - 0x8774 0x8B77 0x8C6A 0x93AC 0x9800 0x9865 0x60D1 0x6216 \ - 0x9177 0x5A5A 0x660F 0x6DF7 0x6E3E 0x743F 0x9B42 0x5FFD \ - 0x60DA 0x7B0F 0x54C4 0x5F18 0x6C5E 0x6CD3 0x6D2A 0x70D8 \ - 0x7D05 0x8679 0x8A0C 0x9D3B 0x5316 0x548C 0x5B05 0x6A3A \ - 0x706B 0x7575 0x798D 0x79BE 0x82B1 0x83EF 0x8A71 0x8B41 \ - 0x8CA8 0x9774 0xFA0B 0x64F4 0x652B 0x78BA 0x78BB 0x7A6B \ - 0x4E38 0x559A 0x5950 0x5BA6 0x5E7B 0x60A3 0x63DB 0x6B61 \ - 0x6665 0x6853 0x6E19 0x7165 0x74B0 0x7D08 0x9084 0x9A69 \ - 0x9C25 0x6D3B 0x6ED1 0x733E 0x8C41 0x95CA 0x51F0 0x5E4C \ - 0x5FA8 0x604D 0x60F6 0x6130 0x614C 0x6643 0x6644 0x69A5 \ - 0x6CC1 0x6E5F 0x6EC9 0x6F62 0x714C 0x749C 0x7687 0x7BC1 \ - 0x7C27 0x8352 0x8757 0x9051 0x968D 0x9EC3 0x532F 0x56DE \ - 0x5EFB 0x5F8A 0x6062 0x6094 0x61F7 0x6666 0x6703 0x6A9C \ - 0x6DEE 0x6FAE 0x7070 0x736A 0x7E6A 0x81BE 0x8334 0x86D4 \ - 0x8AA8 0x8CC4 0x5283 0x7372 0x5B96 0x6A6B 0x9404 0x54EE \ - 0x5686 0x5B5D 0x6548 0x6585 0x66C9 0x689F 0x6D8D 0x6DC6 \ - 0x723B 0x80B4 0x9175 0x9A4D 0x4FAF 0x5019 0x539A 0x540E \ - 0x543C 0x5589 0x55C5 0x5E3F 0x5F8C 0x673D 0x7166 0x73DD \ - 0x9005 0x52DB 0x52F3 0x5864 0x58CE 0x7104 0x718F 0x71FB \ - 0x85B0 0x8A13 0x6688 0x85A8 0x55A7 0x6684 0x714A 0x8431 \ - 0x5349 0x5599 0x6BC1 0x5F59 0x5FBD 0x63EE 0x6689 0x7147 \ - 0x8AF1 0x8F1D 0x9EBE 0x4F11 0x643A 0x70CB 0x7566 0x8667 \ - 0x6064 0x8B4E 0x9DF8 0x5147 0x51F6 0x5308 0x6D36 0x80F8 -35 0x9ED1 0x6615 0x6B23 0x7098 0x75D5 0x5403 0x5C79 0x7D07 \ - 0x8A16 0x6B20 0x6B3D 0x6B46 0x5438 0x6070 0x6D3D 0x7FD5 \ - 0x8208 0x50D6 0x51DE 0x559C 0x566B 0x56CD 0x59EC 0x5B09 \ - 0x5E0C 0x6199 0x6198 0x6231 0x665E 0x66E6 0x7199 0x71B9 \ - 0x71BA 0x72A7 0x79A7 0x7A00 0x7FB2 0x8A70 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE 0xFFFE \ - 0xFFFE 0xFFFE 0xFFFE 0xFFFE - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/Unicode.sfd diff -u xc/extras/FreeType/contrib/ttf2pk/data/Unicode.sfd:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/data/Unicode.sfd:removed --- xc/extras/FreeType/contrib/ttf2pk/data/Unicode.sfd:1.1.1.1 Sat Jan 23 22:21:54 1999 +++ xc/extras/FreeType/contrib/ttf2pk/data/Unicode.sfd Wed Mar 16 20:59:34 2005 @@ -1,265 +0,0 @@ -# Unicode.sfd -# -# subfont numbers for Unicode encoding and its corresponding code ranges -# to be used with the CJK package for LaTeX. - -00 0x0_0xFF -01 0x100_0x1FF -02 0x200_0x2FF -03 0x300_0x3FF -04 0x400_0x4FF -05 0x500_0x5FF -06 0x600_0x6FF -07 0x700_0x7FF -08 0x800_0x8FF -09 0x900_0x9FF -0a 0xA00_0xAFF -0b 0xB00_0xBFF -0c 0xC00_0xCFF -0d 0xD00_0xDFF -0e 0xE00_0xEFF -0f 0xF00_0xFFF -10 0x1000_0x10FF -11 0x1100_0x11FF -12 0x1200_0x12FF -13 0x1300_0x13FF -14 0x1400_0x14FF -15 0x1500_0x15FF -16 0x1600_0x16FF -17 0x1700_0x17FF -18 0x1800_0x18FF -19 0x1900_0x19FF -1a 0x1A00_0x1AFF -1b 0x1B00_0x1BFF -1c 0x1C00_0x1CFF -1d 0x1D00_0x1DFF -1e 0x1E00_0x1EFF -1f 0x1F00_0x1FFF -20 0x2000_0x20FF -21 0x2100_0x21FF -22 0x2200_0x22FF -23 0x2300_0x23FF -24 0x2400_0x24FF -25 0x2500_0x25FF -26 0x2600_0x26FF -27 0x2700_0x27FF -28 0x2800_0x28FF -29 0x2900_0x29FF -2a 0x2A00_0x2AFF -2b 0x2B00_0x2BFF -2c 0x2C00_0x2CFF -2d 0x2D00_0x2DFF -2e 0x2E00_0x2EFF -2f 0x2F00_0x2FFF -30 0x3000_0x30FF -31 0x3100_0x31FF -32 0x3200_0x32FF -33 0x3300_0x33FF -34 0x3400_0x34FF -35 0x3500_0x35FF -36 0x3600_0x36FF -37 0x3700_0x37FF -38 0x3800_0x38FF -39 0x3900_0x39FF -3a 0x3A00_0x3AFF -3b 0x3B00_0x3BFF -3c 0x3C00_0x3CFF -3d 0x3D00_0x3DFF -3e 0x3E00_0x3EFF -3f 0x3F00_0x3FFF -40 0x4000_0x40FF -41 0x4100_0x41FF -42 0x4200_0x42FF -43 0x4300_0x43FF -44 0x4400_0x44FF -45 0x4500_0x45FF -46 0x4600_0x46FF -47 0x4700_0x47FF -48 0x4800_0x48FF -49 0x4900_0x49FF -4a 0x4A00_0x4AFF -4b 0x4B00_0x4BFF -4c 0x4C00_0x4CFF -4d 0x4D00_0x4DFF -4e 0x4E00_0x4EFF -4f 0x4F00_0x4FFF -50 0x5000_0x50FF -51 0x5100_0x51FF -52 0x5200_0x52FF -53 0x5300_0x53FF -54 0x5400_0x54FF -55 0x5500_0x55FF -56 0x5600_0x56FF -57 0x5700_0x57FF -58 0x5800_0x58FF -59 0x5900_0x59FF -5a 0x5A00_0x5AFF -5b 0x5B00_0x5BFF -5c 0x5C00_0x5CFF -5d 0x5D00_0x5DFF -5e 0x5E00_0x5EFF -5f 0x5F00_0x5FFF -60 0x6000_0x60FF -61 0x6100_0x61FF -62 0x6200_0x62FF -63 0x6300_0x63FF -64 0x6400_0x64FF -65 0x6500_0x65FF -66 0x6600_0x66FF -67 0x6700_0x67FF -68 0x6800_0x68FF -69 0x6900_0x69FF -6a 0x6A00_0x6AFF -6b 0x6B00_0x6BFF -6c 0x6C00_0x6CFF -6d 0x6D00_0x6DFF -6e 0x6E00_0x6EFF -6f 0x6F00_0x6FFF -70 0x7000_0x70FF -71 0x7100_0x71FF -72 0x7200_0x72FF -73 0x7300_0x73FF -74 0x7400_0x74FF -75 0x7500_0x75FF -76 0x7600_0x76FF -77 0x7700_0x77FF -78 0x7800_0x78FF -79 0x7900_0x79FF -7a 0x7A00_0x7AFF -7b 0x7B00_0x7BFF -7c 0x7C00_0x7CFF -7d 0x7D00_0x7DFF -7e 0x7E00_0x7EFF -7f 0x7F00_0x7FFF -80 0x8000_0x80FF -81 0x8100_0x81FF -82 0x8200_0x82FF -83 0x8300_0x83FF -84 0x8400_0x84FF -85 0x8500_0x85FF -86 0x8600_0x86FF -87 0x8700_0x87FF -88 0x8800_0x88FF -89 0x8900_0x89FF -8a 0x8A00_0x8AFF -8b 0x8B00_0x8BFF -8c 0x8C00_0x8CFF -8d 0x8D00_0x8DFF -8e 0x8E00_0x8EFF -8f 0x8F00_0x8FFF -90 0x9000_0x90FF -91 0x9100_0x91FF -92 0x9200_0x92FF -93 0x9300_0x93FF -94 0x9400_0x94FF -95 0x9500_0x95FF -96 0x9600_0x96FF -97 0x9700_0x97FF -98 0x9800_0x98FF -99 0x9900_0x99FF -9a 0x9A00_0x9AFF -9b 0x9B00_0x9BFF -9c 0x9C00_0x9CFF -9d 0x9D00_0x9DFF -9e 0x9E00_0x9EFF -9f 0x9F00_0x9FFF -a0 0xA000_0xA0FF -a1 0xA100_0xA1FF -a2 0xA200_0xA2FF -a3 0xA300_0xA3FF -a4 0xA400_0xA4FF -a5 0xA500_0xA5FF -a6 0xA600_0xA6FF -a7 0xA700_0xA7FF -a8 0xA800_0xA8FF -a9 0xA900_0xA9FF -aa 0xAA00_0xAAFF -ab 0xAB00_0xABFF -ac 0xAC00_0xACFF -ad 0xAD00_0xADFF -ae 0xAE00_0xAEFF -af 0xAF00_0xAFFF -b0 0xB000_0xB0FF -b1 0xB100_0xB1FF -b2 0xB200_0xB2FF -b3 0xB300_0xB3FF -b4 0xB400_0xB4FF -b5 0xB500_0xB5FF -b6 0xB600_0xB6FF -b7 0xB700_0xB7FF -b8 0xB800_0xB8FF -b9 0xB900_0xB9FF -ba 0xBA00_0xBAFF -bb 0xBB00_0xBBFF -bc 0xBC00_0xBCFF -bd 0xBD00_0xBDFF -be 0xBE00_0xBEFF -bf 0xBF00_0xBFFF -c0 0xC000_0xC0FF -c1 0xC100_0xC1FF -c2 0xC200_0xC2FF -c3 0xC300_0xC3FF -c4 0xC400_0xC4FF -c5 0xC500_0xC5FF -c6 0xC600_0xC6FF -c7 0xC700_0xC7FF -c8 0xC800_0xC8FF -c9 0xC900_0xC9FF -ca 0xCA00_0xCAFF -cb 0xCB00_0xCBFF -cc 0xCC00_0xCCFF -cd 0xCD00_0xCDFF -ce 0xCE00_0xCEFF -cf 0xCF00_0xCFFF -d0 0xD000_0xD0FF -d1 0xD100_0xD1FF -d2 0xD200_0xD2FF -d3 0xD300_0xD3FF -d4 0xD400_0xD4FF -d5 0xD500_0xD5FF -d6 0xD600_0xD6FF -d7 0xD700_0xD7FF -# Surrogates -# -# d8 0xD800_0xD8FF -# d9 0xD900_0xD9FF -# da 0xDA00_0xDAFF -# db 0xDB00_0xDBFF -dc 0xDC00_0xDCFF -dd 0xDD00_0xDDFF -de 0xDE00_0xDEFF -df 0xDF00_0xDFFF -e0 0xE000_0xE0FF -e1 0xE100_0xE1FF -e2 0xE200_0xE2FF -e3 0xE300_0xE3FF -e4 0xE400_0xE4FF -e5 0xE500_0xE5FF -e6 0xE600_0xE6FF -e7 0xE700_0xE7FF -e8 0xE800_0xE8FF -e9 0xE900_0xE9FF -ea 0xEA00_0xEAFF -eb 0xEB00_0xEBFF -ec 0xEC00_0xECFF -ed 0xED00_0xEDFF -ee 0xEE00_0xEEFF -ef 0xEF00_0xEFFF -f0 0xF000_0xF0FF -f1 0xF100_0xF1FF -f2 0xF200_0xF2FF -f3 0xF300_0xF3FF -f4 0xF400_0xF4FF -f5 0xF500_0xF5FF -f6 0xF600_0xF6FF -f7 0xF700_0xF7FF -f8 0xF800_0xF8FF -f9 0xF900_0xF9FF -fa 0xFA00_0xFAFF -fb 0xFB00_0xFBFF -fc 0xFC00_0xFCFF -fd 0xFD00_0xFDFF -fe 0xFE00_0xFEFF -ff 0xFF00_0xFFFF - -# eof Index: xc/extras/FreeType/contrib/ttf2pk/data/VPS.rpl diff -u xc/extras/FreeType/contrib/ttf2pk/data/VPS.rpl:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/data/VPS.rpl:removed --- xc/extras/FreeType/contrib/ttf2pk/data/VPS.rpl:1.1.1.2 Sat Feb 12 23:55:19 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/VPS.rpl Wed Mar 16 20:59:34 2005 @@ -1,244 +0,0 @@ -% VPS.rpl -% -% -% This file maps VPS encoding for Vietnamese to Adobe glyph names used -% in the file ET5.enc. -% -% VPS is a commonly used program to write Vietnamese. -% -% This file has been tested with the font vpsdlac.ttf using cmap (3,0) - -.c0x0002 Adotbelow -.c0x0003 Acircumflexdotbelow -.c0x0004 Abrevedotbelow -.c0x0005 Edotbelow -.c0x0006 Ecircumflexdotbelow -.c0x0015 Uhorndotbelow -.c0x0019 Ydotbelow -.c0x001c Acircumflextilde -.c0x001d Uhorntilde -.c0x0020 space -.c0x0021 exclam -.c0x0022 quotedbl -.c0x0023 numbersign -.c0x0024 dollar -.c0x0025 percent -.c0x0026 ampersand -.c0x0027 quotesingle -.c0x0028 parenleft -.c0x0029 parenright -.c0x002a asterisk -.c0x002b plus -.c0x002c comma -.c0x002d hyphen -.c0x002e period -.c0x002f slash -.c0x0030 zero -.c0x0031 one -.c0x0032 two -.c0x0033 three -.c0x0034 four -.c0x0035 five -.c0x0036 six -.c0x0037 seven -.c0x0038 eight -.c0x0039 nine -.c0x003a colon -.c0x003b semicolon -.c0x003c less -.c0x003d equal -.c0x003e greater -.c0x003f question -.c0x0040 at -.c0x0041 A -.c0x0042 B -.c0x0043 C -.c0x0044 D -.c0x0045 E -.c0x0046 F -.c0x0047 G -.c0x0048 H -.c0x0049 I -.c0x004a J -.c0x004b K -.c0x004c L -.c0x004d M -.c0x004e N -.c0x004f O -.c0x0050 P -.c0x0051 Q -.c0x0052 R -.c0x0053 S -.c0x0054 T -.c0x0055 U -.c0x0056 V -.c0x0057 W -.c0x0058 X -.c0x0059 Y -.c0x005a Z -.c0x005b bracketleft -.c0x005c backslash -.c0x005d bracketright -.c0x005e asciicircum -.c0x005f underscore -.c0x0060 grave -.c0x0061 a -.c0x0062 b -.c0x0063 c -.c0x0064 d -.c0x0065 e -.c0x0066 f -.c0x0067 g -.c0x0068 h -.c0x0069 i -.c0x006a j -.c0x006b k -.c0x006c l -.c0x006d m -.c0x006e n -.c0x006f o -.c0x0070 p -.c0x0071 q -.c0x0072 r -.c0x0073 s -.c0x0074 t -.c0x0075 u -.c0x0076 v -.c0x0077 w -.c0x0078 x -.c0x0079 y -.c0x007a z -.c0x007b braceleft -.c0x007c bar -.c0x007d braceright -.c0x007e asciitilde -.c0x0080 Agrave -.c0x0081 Ahookabove -.c0x008d Abreveacute -.c0x008e Abrevegrave -.c0x008f Abrevehookabove -.c0x0090 Ecircumflexacute -.c0x009d Ohornacute -.c0x009e Ohorngrave -.c0x00a0 nbspace -.c0x00a1 abreveacute -.c0x00a2 abrevegrave -.c0x00a3 abrevehookabove -.c0x00a4 abrevetilde -.c0x00a5 abrevedotbelow -.c0x00a6 Ohorntilde -.c0x00a7 ohornacute -.c0x00a8 Ugrave -.c0x00a9 ohorngrave -.c0x00aa ohornhookabove -.c0x00ab ohorntilde -.c0x00ac Utilde -.c0x00ad Uhornacute -.c0x00ae ohorndotbelow -.c0x00af Uhorngrave -.c0x00b0 ocircumflexhookabove -.c0x00b1 Uhornhookabove -.c0x00b2 Ygrave -.c0x00b3 Ytilde -.c0x00b4 Iacute -.c0x00b5 Igrave -.c0x00b6 ocircumflexdotbelow -.c0x00b8 Itilde -.c0x00b9 Oacute -.c0x00ba uhornhookabove -.c0x00bb uhorntilde -.c0x00bc Ograve -.c0x00bd Ohookabove -.c0x00be Otilde -.c0x00bf uhorndotbelow -.c0x00c0 acircumflexgrave -.c0x00c1 Aacute -.c0x00c2 Acircumflex -.c0x00c3 acircumflexacute -.c0x00c4 acircumflexhookabove -.c0x00c5 acircumflextilde -.c0x00c6 acircumflexdotbelow -.c0x00c7 dbar -.c0x00c8 ehookabove -.c0x00c9 Eacute -.c0x00ca Ecircumflex -.c0x00cb edotbelow -.c0x00cc ihookabove -.c0x00cd ecircumflextilde -.c0x00ce idotbelow -.c0x00cf ytilde -.c0x00d0 Uhorn -.c0x00d1 Uhookabove -.c0x00d2 ocircumflexgrave -.c0x00d3 ocircumflexacute -.c0x00d4 Ocircumflex -.c0x00d5 ohookabove -.c0x00d6 ohorn -.c0x00d7 Egrave -.c0x00d8 uhorngrave -.c0x00d9 uhornacute -.c0x00da Uacute -.c0x00db utilde -.c0x00dc uhorn -.c0x00dd Yacute -.c0x00de Ehookabove -.c0x00df germandbls -.c0x00e0 agrave -.c0x00e1 aacute -.c0x00e2 acircumflex -.c0x00e3 atilde -.c0x00e4 ahookabove -.c0x00e5 adotbelow -.c0x00e6 abreve -.c0x00e7 ccedilla -.c0x00e8 egrave -.c0x00e9 eacute -.c0x00ea ecircumflex -.c0x00eb etilde -.c0x00ec igrave -.c0x00ed iacute -.c0x00ee icircumflex -.c0x00ef itilde -.c0x00f0 Abrevetilde -.c0x00f1 Dbar -.c0x00f2 ograve -.c0x00f3 oacute -.c0x00f4 ocircumflex -.c0x00f5 otilde -.c0x00f6 odieresis -.c0x00f7 Ohorn -.c0x00f8 udotbelow -.c0x00f9 ugrave -.c0x00fa uacute -.c0x00fb uhookabove -.c0x00fc udieresis -.c0x00fd Yhookabove -.c0x00fe Etilde -.c0x00ff ygrave -.c0x0152 ecircumflexdotbelow -.c0x0153 ydotbelow -.c0x0160 ecircumflexgrave -.c0x0161 yacute -.c0x0178 Ohornhookabove -.c0x0192 Acircumflexacute -.c0x02c6 Abreve -.c0x02dc Ocircumflexhookabove -.c0x2013 Ocircumflexacute -.c0x2014 Ocircumflexgrave -.c0x2018 quoteleft -.c0x2019 quoteright -.c0x201a Atilde -.c0x201c Ecircumflexgrave -.c0x201d Ecircumflexhookabove -.c0x201e Acircumflexgrave -.c0x2020 odotbelow -.c0x2021 ocircumflextilde -.c0x2022 Ecircumflextilde -.c0x2026 Acircumflexhookabove -.c0x2030 ecircumflexacute -.c0x2039 ecircumflexhookabove -.c0x203a yhookabove -.c0x2122 Ocircumflextilde -.c0x2219 Ihookabove - -% eof Index: xc/extras/FreeType/contrib/ttf2pk/data/ttfonts.map diff -u xc/extras/FreeType/contrib/ttf2pk/data/ttfonts.map:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/data/ttfonts.map:removed --- xc/extras/FreeType/contrib/ttf2pk/data/ttfonts.map:1.1.1.2 Sat Feb 12 23:55:20 2000 +++ xc/extras/FreeType/contrib/ttf2pk/data/ttfonts.map Wed Mar 16 20:59:34 2005 @@ -1,18 +0,0 @@ -% These entries are just examples! - -arials arial.ttf Slant=0.25 -arial arial.ttf Slant=0 Extend=1 Pid = 1 Eid = 0 -arialx arial.ttf Slant=0 Extend=1.5 - -times times.ttf Encoding=T1-WGL4.enc \ - .g0xc7=ring .g0xc9=caron .g0xc4=dotlessi -times95 times95.ttf Encoding=T1-WGL4.enc - -ntukai@Big5@ ntu_kai.ttf Pid = 3 Eid = 4 -cyberb@Unicode@ cyberbit.ttf - -% the next entry maps the Unicode encoded font to Big 5 encoding; thus you -% can say \begin{CJK}{Big5}{...} (this is an environment from the CJK -% package for LaTeX). - -mingli@UBig5@ mingliu.ttc Fontindex = 0 Index: xc/extras/FreeType/contrib/ttf2pk/scripts/README diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/README:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/scripts/README:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/README:1.1.1.2 Sat Feb 12 23:55:20 2000 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/README Wed Mar 16 20:59:34 2005 @@ -1,8 +0,0 @@ -In these subdirectories you can find diff files for various TeX -implementations which add support for on-the-fly pk-generation using ttf2pk -and hbf2gf (which is part of the CJK package for LaTeX 2e). - -In case you don't have/want hbf2gf, simply comment out the relevant if-Block -in the script. - -For web2c 7.3 resp. teTeX 1.0 or newer, no patches are needed. Index: xc/extras/FreeType/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK.diff diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK.diff:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK.diff:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK.diff:1.1.1.1 Sat Jan 23 22:21:55 1999 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK.diff Wed Mar 16 20:59:34 2005 @@ -1,63 +0,0 @@ ---- /root/scripts/teTeX-0.4/MakeTeXPK Sun Feb 23 22:12:05 1997 -+++ /home/ft/freetype/contrib/ttf2pk/scripts/teTeX-0.4/MakeTeXPK Sat Sep 5 07:57:34 1998 -@@ -80,6 +80,9 @@ - : ${MAKETEXDIR=$TEXMF/maketex} - export TEXMF MAKETEXDIR - -+unset cmd -+unset psline -+ - # grep for the font in $PSMAPFILE, if some ps-to-pk is claimed to be supported. - # We have to figure out the name of the base font -- $NAME is probably - # something like pplr, but it's rpplr or pplr0 or pplr8r that's in psfonts.map. -@@ -91,7 +94,40 @@ - # some installations have set up gs in such a way that creating files - # is only allowed if the parameter -DNOSAFER is used: - GS_OPTIONS=-DNOSAFER; export GS_OPTIONS --else -+fi -+ -+# test for TTF fonts -+if test -z "$cmd"; then -+ ttf2pk -q $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "ttf2pk failed" >&2 -+ exit 1 -+ fi -+ MODE=ttf2pk # preferred mode for TDS would be `modeless' -+ cmd=true -+ psline=ttf2pk # suppress gftopk call -+ fi -+fi -+ -+# test for HBF fonts -+if test -z "$cmd"; then -+ hbf2gf -q -p $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "hbf2gf failed" >&2 -+ exit 1 -+ fi -+ MODE=hbf2gf # preferred mode for TDS would be `modeless' -+ cmd=true -+ fi -+fi -+ -+if test -z "$cmd"; then - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp.cs.umb.edu:pub/tex/modes.mf. - if test -z "$MODE" || test "$MODE" = default; then -@@ -141,7 +177,7 @@ - { echo "$progname: could not mkdir $PKDESTDIR."; exit 1; }' - eval "$mdir" - --echo "$progname: Running $cmd" -+test "$cmd" = true || echo "$progname: Running $cmd" - $cmd &2; exit 1; } - if test -z "$psline"; then - test -r $GFNAME || Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/MakeTeXPK.diff diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/MakeTeXPK.diff:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/MakeTeXPK.diff:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/MakeTeXPK.diff:1.1.1.1 Sat Jan 23 22:21:55 1999 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/MakeTeXPK.diff Wed Mar 16 20:59:34 2005 @@ -1,75 +0,0 @@ ---- MakeTeXPK.orig Sun Aug 16 08:05:07 1998 -+++ MakeTeXPK Tue Aug 18 07:53:57 1998 -@@ -1,5 +1,5 @@ - #!/bin/sh --# original MakeTeXPK -- make a new PK font, because one wasn't found. -+# MakeTeXPK -- make a new PK font, because one wasn't found. - # Version of 12dec94. - # - # (If you change or delete the word `original' on the previous line, -@@ -142,11 +142,52 @@ - test -d $TEMPDIR || mkdir $TEMPDIR - cd $TEMPDIR || exit 1 - -+unset cmd -+ -+# test for TTF fonts -+if test -z "$cmd"; then -+ ttf2pk -q $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "ttf2pk failed" >&2 -+ exit 1 -+ fi -+ test -z "$6" && DESTDIR="$DESTROOT/ttf2pk" # preferred mode for TDS -+ # would be `modeless' -+ echo "Successful call to ttf2pk" >&2 -+ cmd=ttf2pk -+ fi -+fi -+ -+# test for HBF fonts -+if test -z "$cmd"; then -+ hbf2gf -q -p $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "hbf2gf failed" >&2 -+ exit 1 -+ fi -+ test -z "$6" && DESTDIR="$DESTROOT/hbf2gf" # preferred mode for TDS -+ # would be `modeless' -+ echo "Successful call to hbf2gf" >&2 -+ cmd=hbf2gf -+ -+ gftopk ./$GFNAME $PKNAME || exit 1 -+ fi -+fi -+ - # grep for the font in $PSMAPFILE, if some ps-to-pk is claimed to be supported. - # We have to figure out the name of the base font -- $NAME is probably - # something like pplr, but it's rpplr or pplr0 or pplr8r that's in psfonts.map. --pattern="^r?$NAME"'(0|8r)?([ ]|$)' --test -n "$ps_to_pk" && egrep "$pattern" $PSMAPFILE >psline -+if test -z "$cmd"; then -+ pattern="^r?$NAME"'(0|8r)?([ ]|$)' -+ test -n "$ps_to_pk" && egrep "$pattern" $PSMAPFILE > psline -+fi -+ - if test -s psline; then - # This is a PostScript font. - MODE=$ps_to_pk -@@ -173,8 +214,9 @@ - export DVIPSHEADERS - echo "$0: Running $cmd" >&2 - $cmd >&2 || { echo "$0: $ps_to_pk failed." >&2; exit 1; } -+fi - --else -+if test -z "$cmd"; then - # Try Metafont. - MFINPUTS="$MFINPUTS:$SAVEPWD" - export MFINPUTS Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/README diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/README:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/README:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/README:1.1.1.1 Sat Jan 23 22:21:55 1999 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-6.1/README Wed Mar 16 20:59:34 2005 @@ -1 +0,0 @@ -This is for web2c-6.1 with the patch for kpathsea 2.6 Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.0/MakeTeXPK.diff diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.0/MakeTeXPK.diff:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.0/MakeTeXPK.diff:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.0/MakeTeXPK.diff:1.1.1.1 Sat Jan 23 22:21:55 1999 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.0/MakeTeXPK.diff Wed Mar 16 20:59:34 2005 @@ -1,67 +0,0 @@ ---- MakeTeXPK.orig Sat Feb 8 15:52:00 1997 -+++ MakeTeXPK Tue Aug 18 07:58:22 1998 -@@ -1,5 +1,5 @@ - #!/bin/sh --# original MakeTeXPK -- make a new PK font, because one wasn't found. -+# MakeTeXPK -- make a new PK font, because one wasn't found. - # - # (If you change or delete the word `original' on the previous line, - # installation won't write this script over yours.) -@@ -44,15 +44,54 @@ - MODE=$5 - DEST=$6 - -+unset cmd -+ -+# test for TTF fonts -+if test -z "$cmd"; then -+ ttf2pk -q $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "ttf2pk failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+# test for HBF fonts -+if test -z "$cmd"; then -+ hbf2gf -q -p $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "hbf2gf failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+unset psline -+ - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). --pattern="^r?$NAME"'(0|8r)?([ ]|$)' --psline=`egrep "$pattern" $PSMAPFILE` -+if test -z "$cmd"; then -+ pattern="^r?$NAME"'(0|8r)?([ ]|$)' -+ psline=`egrep "$pattern" $PSMAPFILE` -+fi -+ - if test -n "$psline"; then - MODE=modeless - # ps_to_pk set in MakeTeXcommon and/or MakeTeX.site. - cmd="$ps_to_pk $NAME $DPI" --else -+fi -+ -+if test -z "$cmd"; then - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/MakeTeXPK.diff diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/MakeTeXPK.diff:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/MakeTeXPK.diff:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/MakeTeXPK.diff:1.1.1.2 Sat Feb 12 23:55:21 2000 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/MakeTeXPK.diff Wed Mar 16 20:59:34 2005 @@ -1,72 +0,0 @@ ---- MakeTeXPK.orig Fri Oct 31 09:30:54 1997 -+++ MakeTeXPK Tue Aug 18 08:01:33 1998 -@@ -1,5 +1,5 @@ - #!/bin/sh --# original MakeTeXPK -- make a new PK font, because one wasn't found. -+# MakeTeXPK -- make a new PK font, because one wasn't found. - # - # (If you change or delete the word `original' on the previous line, - # installation won't write this script over yours.) -@@ -57,11 +57,48 @@ - MODE=$5 - DEST=$6 - -+unset cmd -+ -+# test for TTF fonts -+if test -z "$cmd"; then -+ ttf2pk -q $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "ttf2pk failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+# test for HBF fonts -+if test -z "$cmd"; then -+ hbf2gf -q -p $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "hbf2gf failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+unset psline -+ - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). --: ${PSMAPFILE=`kpsewhich psfonts.map`} --pattern="^$NAME"'([ ]|$)' --psline=`egrep "$pattern" $PSMAPFILE` -+if test -z "$cmd"; then -+ : ${PSMAPFILE=`kpsewhich psfonts.map`} -+ pattern="^$NAME"'([ ]|$)' -+ psline=`egrep "$pattern" $PSMAPFILE` -+fi -+ - if test -n "$psline"; then - MODE=modeless - # ps_to_pk is set in MakeTeX.cnf -@@ -100,7 +137,9 @@ - cmd="$ps_to_pk $NAME $DPI" - ;; - esac --else -+fi -+ -+if test -z "$cmd"; then - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/README diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/README:1.1.1.1 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/README:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/README:1.1.1.1 Sat Jan 23 22:21:55 1999 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.1/README Wed Mar 16 20:59:34 2005 @@ -1 +0,0 @@ -The patch works with web2c-7.0 too (expect a fuzz offset). Index: xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.2/mktexpk.diff diff -u xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.2/mktexpk.diff:1.1.1.2 xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.2/mktexpk.diff:removed --- xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.2/mktexpk.diff:1.1.1.2 Sat Feb 12 23:55:21 2000 +++ xc/extras/FreeType/contrib/ttf2pk/scripts/web2c-7.2/mktexpk.diff Wed Mar 16 20:59:35 2005 @@ -1,72 +0,0 @@ ---- mktexpk.orig Fri Feb 20 16:23:22 1998 -+++ mktexpk Tue Aug 18 08:04:40 1998 -@@ -1,5 +1,5 @@ - #!/bin/sh --# original mktexpk -- make a new PK font, because one wasn't found. -+# mktexpk -- make a new PK font, because one wasn't found. - # - # (If you change or delete the word `original' on the previous line, - # installation won't write this script over yours.) -@@ -73,11 +73,48 @@ - - NAME=$1 - -+unset cmd -+ -+# test for TTF fonts -+if test -z "$cmd"; then -+ ttf2pk -q $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "ttf2pk failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+# test for HBF fonts -+if test -z "$cmd"; then -+ hbf2gf -q -p $NAME $DPI -+ errstatus=$? -+ -+ if test $errstatus -ne 2; then -+ if test $errstatus -ne 0; then -+ echo "hbf2gf failed" >&2 -+ exit 1 -+ fi -+ MODE=modeless -+ cmd=true -+ fi -+fi -+ -+unset psline -+ - # grep for the font in $PSMAPFILE. These are base font names, such as - # rpplr (the original) or pplr0 (an interim step) or pplr8r (current). --: ${PSMAPFILE=`kpsewhich psfonts.map`} --pattern="^$NAME"'([ ]|$)' --psline=`egrep "$pattern" $PSMAPFILE` -+if test -z "$cmd"; then -+ : ${PSMAPFILE=`kpsewhich psfonts.map`} -+ pattern="^$NAME"'([ ]|$)' -+ psline=`egrep "$pattern" $PSMAPFILE` -+fi -+ - if test -n "$psline"; then - MODE=modeless - # ps_to_pk is set in mktex.opt -@@ -116,7 +153,9 @@ - cmd="$ps_to_pk $NAME $DPI" - ;; - esac --else -+fi -+ -+if test -z "$cmd"; then - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) Index: xc/extras/FreeType/contrib/ttfbanner/.cvsignore diff -u xc/extras/FreeType/contrib/ttfbanner/.cvsignore:1.1.1.1 xc/extras/FreeType/contrib/ttfbanner/.cvsignore:removed --- xc/extras/FreeType/contrib/ttfbanner/.cvsignore:1.1.1.1 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/.cvsignore Wed Mar 16 20:59:35 2005 @@ -1,2 +0,0 @@ -ttfbanner -Makefile Index: xc/extras/FreeType/contrib/ttfbanner/Makefile.emx diff -u xc/extras/FreeType/contrib/ttfbanner/Makefile.emx:1.1.1.1 xc/extras/FreeType/contrib/ttfbanner/Makefile.emx:removed --- xc/extras/FreeType/contrib/ttfbanner/Makefile.emx:1.1.1.1 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/Makefile.emx Wed Mar 16 20:59:35 2005 @@ -1,9 +0,0 @@ -# Makefile for ttfbanner - -all: ttfbanner.exe - -ttfbanner.exe: ttfbanner.o - gcc -O -o ttfbanner.exe ttfbanner.o -lttf - -ttfbanner.o: ttfbanner.c - gcc -O -c ttfbanner.c Index: xc/extras/FreeType/contrib/ttfbanner/Makefile.in diff -u xc/extras/FreeType/contrib/ttfbanner/Makefile.in:1.1.1.1 xc/extras/FreeType/contrib/ttfbanner/Makefile.in:removed --- xc/extras/FreeType/contrib/ttfbanner/Makefile.in:1.1.1.1 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/Makefile.in Wed Mar 16 20:59:35 2005 @@ -1,64 +0,0 @@ -# Makefile for ttfbanner -# -# This Makefile assumes that you've already built and installed -# the FreeType library. - -VPATH = @srcdir@ -srcdir = @srcdir@ - -RM = @RM@ -RMF = @RM@ -f - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ - -CC = @CC@ -CPP = @CPP@ - -LIBTOOL = ../../libtool -MKINSTALLDIRS = $(srcdir)/../../mkinstalldirs - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -mandir = @mandir@ - -CFLAGS = @CFLAGS@ @XX_CFLAGS@ -CPPFLAGS = @CPPFLAGS@ @DEFS@ -FT_CFLAGS = $(CFLAGS) $(CPPFLAGS) -LDFLAGS = @LDFLAGS@ @LIBS@ -LIBDIR = ../../lib - -SRC = ttfbanner.c - -default all: ttfbanner - -ttfbanner: ttfbanner.o $(LIBDIR)/libttf.la - $(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -o $@ $< \ - $(LIBDIR)/libttf.la $(LDFLAGS) - -clean: - $(RMF) *.o *BAK *CKP *~ a.out core - -realclean: clean - $(RMF) ttfbanner - $(RM) -rf .libs/ - -distclean: realclean - $(RMF) *~ *.orig core *.core - $(RMF) config.cache config.log config.status Makefile - -.c.o: - $(CC) -c $(FT_CFLAGS) $< - -install: ttfbanner - $(MKINSTALLDIRS) $(bindir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ttfbanner $(bindir)/ - -uninstall: - $(LIBTOOL) --mode=uninstall $(RM) $(bindir)/ttfbanner - -.PHONY: all clean realclean distclean install uninstall - -# end of Makefile Index: xc/extras/FreeType/contrib/ttfbanner/README diff -u xc/extras/FreeType/contrib/ttfbanner/README:1.1.1.2 xc/extras/FreeType/contrib/ttfbanner/README:removed --- xc/extras/FreeType/contrib/ttfbanner/README:1.1.1.2 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/README Wed Mar 16 20:59:35 2005 @@ -1,38 +0,0 @@ -ttfbanner -- make posters using a TrueType font - -Installation -************ - -Say - - ./configure - make - make install - -It is assumed that you've built the FreeType library before. - -Usage -***** - -Just typing `ttfbanner' will provide you with some summary usage -instructions. - - -Limitations -*********** - -The program will not do any kerning. Incorrect UTF8 strings will not -always be detected. - - -Copying -******* - -This software is provided with no warranty whatsoever. You may do -whatever you wish with it as long as you don't ask me to maintain it. - - -Author -****** - -Juliusz Chroboczek Index: xc/extras/FreeType/contrib/ttfbanner/configure diff -u xc/extras/FreeType/contrib/ttfbanner/configure:1.1.1.1 xc/extras/FreeType/contrib/ttfbanner/configure:removed --- xc/extras/FreeType/contrib/ttfbanner/configure:1.1.1.1 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/configure Wed Mar 16 20:59:35 2005 @@ -1,1372 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=../../lib/freetype.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:573: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:594: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:612: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:638: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:719: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 762 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:798: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:826: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:858: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:942: checking for TT_Init_FreeType in -lttf" >&5 -ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lttf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lttf" -else - echo "$ac_t""no" 1>&6 - - { echo "configure: error: Can't find ttf library! Compile FreeType first." 1>&2; exit 1; } -fi - -LIBS=$OLDLIBS - - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -ansi -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi - - -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1003: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RM"; then - ac_cv_prog_RM="$RM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RM="rm" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RM="$ac_cv_prog_RM" -if test -n "$RM"; then - echo "$ac_t""$RM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1041: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@XX_CFLAGS@%$XX_CFLAGS%g -s%@RM@%$RM%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - Index: xc/extras/FreeType/contrib/ttfbanner/configure.in diff -u xc/extras/FreeType/contrib/ttfbanner/configure.in:1.1.1.1 xc/extras/FreeType/contrib/ttfbanner/configure.in:removed --- xc/extras/FreeType/contrib/ttfbanner/configure.in:1.1.1.1 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/configure.in Wed Mar 16 20:59:35 2005 @@ -1,38 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(../../lib/freetype.h) - -AC_CANONICAL_SYSTEM - -AC_PROG_CC -AC_PROG_CPP - -OLDLIBS=$LIBS -LIBS="$LIBS -L../../lib/.libs" -CPPFLAGS="-I$srcdir/../../lib $CPPFLAGS" -AC_CHECK_LIB(ttf, TT_Init_FreeType, LIBS="$LIBS -lttf",[ - AC_MSG_ERROR([Can't find ttf library! Compile FreeType first.])]) -LIBS=$OLDLIBS - -dnl get Compiler flags right. - -if test "x$CC" = xgcc; then - XX_CFLAGS="-Wall -ansi -pedantic" -else - case "$host" in - alpha-dec-osf*) - XX_CFLAGS="-std1 -O2 -g3" - ;; - *) - XX_CFLAGS= - ;; - esac -fi -AC_SUBST(XX_CFLAGS) - -AC_CHECK_PROG(RM, rm, rm) -AC_PROG_INSTALL - -AC_OUTPUT(Makefile) - -dnl end of configure.in Index: xc/extras/FreeType/contrib/ttfbanner/ttfbanner.c diff -u xc/extras/FreeType/contrib/ttfbanner/ttfbanner.c:1.1.1.2 xc/extras/FreeType/contrib/ttfbanner/ttfbanner.c:removed --- xc/extras/FreeType/contrib/ttfbanner/ttfbanner.c:1.1.1.2 Sat Feb 12 23:55:22 2000 +++ xc/extras/FreeType/contrib/ttfbanner/ttfbanner.c Wed Mar 16 20:59:35 2005 @@ -1,320 +0,0 @@ -/* This code was written by Juliusz Chroboczek . */ -/* It comes with no warranty whatsoever. */ -/* Feel free to use it as long as you don't ask me to maintain it. */ - -#include -#include -#include -#include -#include "freetype.h" -#include "ttfbanner.h" - -#define MAXIMIZE(x,xval) if((x)<(xval)) {x=(xval);} -#define MINIMIZE(x,xval) if((x)>(xval)) {x=(xval);} - -void -usage() -{ - fprintf(stderr, "Usage: ttfbanner [options] font.ttf string\n"); - fprintf(stderr, " where options include:\n"); - fprintf(stderr, " -e encoding: specify the encoding of the string (L1, L2 or UTF8, default L1)\n"); - fprintf(stderr, " -p pointsize: specify the point size to use (default 14)\n"); - fprintf(stderr, " -r resolution: specify x and y resolutions (default 72dpi)\n"); - fprintf(stderr, " -x resolution: specify x resolution\n"); - fprintf(stderr, " -y resolution: specify y resolution\n"); - exit(2); -} - -int -main(int argc, char **argv) -{ - int getopt(int argc, char * const argv[], const char *optstring); - extern char *optarg; - extern int optind; - int c; - - unsigned short *unicodeString=NULL; - enum {L1, L2, UTF8} encoding=L1; - double pointsize=14.0; - int xr=72, yr=72; - - TT_Raster_Map *raster; - - while((c=getopt(argc, argv, "s:e:p:r:x:y:"))!=EOF) { - switch(c) { - case 'e': - if(!strcmp(optarg,"L1")) - encoding=L1; - else if(!strcmp(optarg, "L2")) - encoding=L2; - else if(!strcmp(optarg, "UTF8")) - encoding=UTF8; - else { - fprintf(stderr, "Unknown encoding %s; defaulting to L1\n", optarg); - encoding=L1; - } - break; - case 'p': - pointsize=atof(optarg); - break; - case 'r': - xr=yr=atoi(optarg); - break; - case 'x': - xr=atoi(optarg); - break; - case 'y': - yr=atoi(optarg); - break; - default: - usage(); - } - } - - if(argc-optind!=2) - usage(); - - switch (encoding) - { - case L1: unicodeString=l1toUnicode(argv[optind+1]); - break; - case L2: unicodeString=l2toUnicode(argv[optind+1]); - break; - case UTF8: unicodeString=UTF8toUnicode(argv[optind+1]); - break; - default: Error("This cannot happen"); - } - - raster=makeBitmap(unicodeString, argv[optind], - pointsize, xr, yr); - writeBanner(raster); - - return 0; -} - -TT_Raster_Map * -makeBitmap(unsigned short *unicodeString, - char *ttf, double charsize, int xr, int yr) -{ - TT_Error error; - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_Glyph_Metrics metrics; - TT_Raster_Map *raster; - TT_CharMap cmap; - - long xMin, xMax, yMin, yMax; - int xpos, xoffset, yoffset; - unsigned short *p; - int first; - short index; - - if((error=TT_Init_FreeType(&engine))) - FTError("Coudn't initialise FreeType engine", error); - if((error=TT_Open_Face(engine, ttf, &face))) - FTError("Coudn't open font file", error); - if((error=TT_New_Instance(face, &instance))) - FTError("Couldn't create new instance", error); - if((error=TT_Set_Instance_Resolutions(instance, xr, yr))) - FTError("Couldn't set resolutions", error); - if((error=TT_Set_Instance_CharSize(instance, (TT_F26Dot6)(charsize*64.0)))) - FTError("Coudn't set point size", error); - if((error=TT_New_Glyph(face, &glyph))) - FTError("Coudn't create glyph", error); - - if((error=find_unicode_cmap(face, &cmap))) - Error("Couldn't find suitable Cmap"); - - /* Compute size */ - xMin=yMin= 100000l; - xMax=yMax= -100000l; - for(p=unicodeString, first=1, xpos=0; (*p)!=0xFFFF; p++, first=0) { - index=TT_Char_Index(cmap, *p); - if((error=TT_Load_Glyph(instance, glyph, index, TTLOAD_DEFAULT))) - FTError("Couldn't load glyph", error); - if((error=TT_Get_Glyph_Metrics(glyph, &metrics))) - FTError("Couldn't get glyph metrics", error); - - if(first) - xMin=metrics.bbox.xMin; - xMax=xpos*64+metrics.bbox.xMax; - xpos+=(metrics.advance+32)/64; - - MAXIMIZE(yMax, metrics.bbox.yMax); - MINIMIZE(yMin, metrics.bbox.yMin); - } - - xoffset=-(xMin-63)/64; - yoffset=-(yMin-63)/64; - - if((raster=malloc(sizeof(TT_Raster_Map)))==NULL) - Error("Couldn't allocate raster structure"); - raster->rows=(yMax+63)/64+yoffset; - raster->width=(xMax+63)/64+xoffset; - raster->cols=(raster->width+7)/8; - raster->flow=TT_Flow_Down; - if((raster->bitmap=calloc(raster->cols, raster->rows))==NULL) - Error("Couldn't allocate bitmap"); - raster->size=((long)raster->rows*raster->cols); - - - for(p=unicodeString, xpos=xoffset; *p!=0xFFFF; p++) { - index=TT_Char_Index(cmap, *p); - if((error=TT_Load_Glyph(instance, glyph, index, TTLOAD_DEFAULT))) - FTError("Couldn't load glyph", error); - if((error=TT_Get_Glyph_Metrics(glyph, &metrics))) - FTError("Couldn't get glyph metrics", error); - - if((error=TT_Get_Glyph_Bitmap(glyph, raster, xpos*64, yoffset*64))) - FTError("Couldn't typeset glyph", error); - xpos+=(metrics.advance+32)/64; - } - - return raster; -} - -int -find_unicode_cmap(TT_Face face, TT_CharMap *cmap) -{ - int i,n; - unsigned short p,e; - - n=TT_Get_CharMap_Count(face); - for(i=0; irows; i++) { - int j; - for(j=0; jwidth; j++) { - if(((((unsigned char*)raster->bitmap)+i*raster->cols)[j/8]&(1<<(7-j%8))) - != 0) - putchar('*'); - else - putchar(' '); - } - putchar('\n'); - } -} - -unsigned short * -l1toUnicode(char *string) -{ - unsigned short *r; - int n,i; - - n=strlen(string); - if((r=malloc(sizeof(unsigned short)*(n+1)))==NULL) - Error("Couldn't allocate string"); - - for(i=0; i -#include -#include -#include - -#include - -#include "freetype.h" -#include "gdriver.h" - -HANDLE evgetevent,evdriverdisplaybitmap,this_wnd,main_thread,listbox,bitmap; -TEvent evevent; -char message_32[256]; -char *ev_buffer; -jmp_buf Env; -long TTMemory_Allocated = 0; // just to have a clean link with ftdump -// save last rendered image Data -int save_lines,save_cols,exit_code; -char *save_buffer; -extern int vio_Width,vio_Height,vio_ScanLineWidth; -extern TT_Raster_Map Bit; -HDC hdc,memdc; -HBITMAP hbm,hbm1; - -//________________________________________________________________________________ -void Get_Event(TEvent *event) -{ - WaitForSingleObject(evgetevent,INFINITE); // wait for completion - *event=evevent; //set by message handler before posting waited upon event - return; -} - -int Driver_Set_Graphics( int mode ) -{ RECT rect; - GetClientRect(bitmap,&rect); - vio_Width=rect.right-rect.left; - vio_Height = rect.bottom-rect.top; - vio_ScanLineWidth=vio_Width; - return 1; - - } -int Driver_Restore_Mode() -{return 1;} - -int Driver_Display_Bitmap( char* buffer, int lines, int cols ) - { - long rc; - int i; - char *top,*bottom; - HANDLE rgdi; - RECT rect; - char *w_buffer; -// bitmap=listbox; - hdc=GetDC(bitmap); - memdc=CreateCompatibleDC(hdc); - GetClientRect(bitmap,&rect); - //hbm=CreateCompatibleBitmap(hdc,lines,cols); - // need to set upside down bitmap . - if (buffer != save_buffer) //new buffer - { - if (save_buffer!=NULL) - free(save_buffer); - save_buffer=(char *)malloc(Bit.size); - memcpy(save_buffer,buffer,Bit.size); - } - w_buffer=malloc(Bit.size); // hope it succeeds - top=buffer; - bottom=w_buffer+Bit.size-cols; - for(i=0;i Index: xc/extras/FreeType/contrib/win32/hack_ftdump.c diff -u xc/extras/FreeType/contrib/win32/hack_ftdump.c:1.1.1.1 xc/extras/FreeType/contrib/win32/hack_ftdump.c:removed --- xc/extras/FreeType/contrib/win32/hack_ftdump.c:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/hack_ftdump.c Wed Mar 16 20:59:35 2005 @@ -1,9 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -#define exit(code) force_exit(code) -#define main(A,B) ftdump(A,B) -#include Index: xc/extras/FreeType/contrib/win32/hack_ftlint.c diff -u xc/extras/FreeType/contrib/win32/hack_ftlint.c:1.1.1.1 xc/extras/FreeType/contrib/win32/hack_ftlint.c:removed --- xc/extras/FreeType/contrib/win32/hack_ftlint.c:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/hack_ftlint.c Wed Mar 16 20:59:35 2005 @@ -1,9 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -#define exit(code) force_exit(code) -#define main(A,B) ftlint(A,B) -#include Index: xc/extras/FreeType/contrib/win32/hack_ftstring.c diff -u xc/extras/FreeType/contrib/win32/hack_ftstring.c:1.1.1.1 xc/extras/FreeType/contrib/win32/hack_ftstring.c:removed --- xc/extras/FreeType/contrib/win32/hack_ftstring.c:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/hack_ftstring.c Wed Mar 16 20:59:35 2005 @@ -1,9 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -#define exit(code) force_exit(code) -#define main(A,B) ftstring(A,B) -#include Index: xc/extras/FreeType/contrib/win32/hack_fttimer.c diff -u xc/extras/FreeType/contrib/win32/hack_fttimer.c:1.1.1.1 xc/extras/FreeType/contrib/win32/hack_fttimer.c:removed --- xc/extras/FreeType/contrib/win32/hack_fttimer.c:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/hack_fttimer.c Wed Mar 16 20:59:35 2005 @@ -1,9 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -#define exit(code) force_exit(code) -#define main(A,B) fttimer(A,B) -#include Index: xc/extras/FreeType/contrib/win32/hack_ftview.c diff -u xc/extras/FreeType/contrib/win32/hack_ftview.c:1.1.1.1 xc/extras/FreeType/contrib/win32/hack_ftview.c:removed --- xc/extras/FreeType/contrib/win32/hack_ftview.c:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/hack_ftview.c Wed Mar 16 20:59:36 2005 @@ -1,9 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -#define exit(code) force_exit(code) -#define main(A,B) ftview(A,B) -#include Index: xc/extras/FreeType/contrib/win32/readme.txt diff -u xc/extras/FreeType/contrib/win32/readme.txt:1.1.1.1 xc/extras/FreeType/contrib/win32/readme.txt:removed --- xc/extras/FreeType/contrib/win32/readme.txt:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/readme.txt Wed Mar 16 20:59:36 2005 @@ -1,19 +0,0 @@ -The purpose of this application is to serve as a running environment for -some of the freetype project test programs: -currently available programa aree ftdump,ftlint,,ftstring,ftview; -others may be convinced to run but you may need to change the source -code to avoid duplicate problems with the linker. -This work has been based on a large amount of guesswork -and a small amount of my (little) spare time; -however it seems to be working pretty well as far as I can tell -( -g -r options are not working but I don't care 'bout them). -It can be compiled both under MS VC++ Version 4.X and Version 5. -and has been tested under Windows 95 & NT 4.0 . - -Have Fun . - Giancarlo Ramat - (gcramat@radiostudio.it) - -[Please note that all files are archived in Unix LF format (except -testw32.mdp which is a binary file). If necessary, use e.g. unzip's `-a' -flag to convert to MSDOS CR/LF convention.] Index: xc/extras/FreeType/contrib/win32/resource.h diff -u xc/extras/FreeType/contrib/win32/resource.h:1.1.1.1 xc/extras/FreeType/contrib/win32/resource.h:removed --- xc/extras/FreeType/contrib/win32/resource.h:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/resource.h Wed Mar 16 20:59:36 2005 @@ -1,24 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by testw32.rc -// -#define IDD_TESTW32_DIALOG 102 -#define IDR_MAINFRAME 128 -#define IDC_FONT_NAME 1000 -#define IDC_BITMAP 1001 -#define IDC_LIST_BOX 1002 -#define IDC_SELECT_ACTION 1003 -#define IDC_ACTION 1004 -#define IDC_TEST_PROGRAM 1005 -#define IDC_OPTIONS 1007 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 130 -#define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1008 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif Index: xc/extras/FreeType/contrib/win32/stdafx.cpp diff -u xc/extras/FreeType/contrib/win32/stdafx.cpp:1.1.1.1 xc/extras/FreeType/contrib/win32/stdafx.cpp:removed --- xc/extras/FreeType/contrib/win32/stdafx.cpp:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/stdafx.cpp Wed Mar 16 20:59:36 2005 @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// testw32.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - Index: xc/extras/FreeType/contrib/win32/stdafx.h diff -u xc/extras/FreeType/contrib/win32/stdafx.h:1.1.1.1 xc/extras/FreeType/contrib/win32/stdafx.h:removed --- xc/extras/FreeType/contrib/win32/stdafx.h:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/stdafx.h Wed Mar 16 20:59:36 2005 @@ -1,25 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_) -#define AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_) Index: xc/extras/FreeType/contrib/win32/testw32.cpp diff -u xc/extras/FreeType/contrib/win32/testw32.cpp:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32.cpp:removed --- xc/extras/FreeType/contrib/win32/testw32.cpp:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32.cpp Wed Mar 16 20:59:36 2005 @@ -1,79 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -// testw32.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "testw32.h" -#include "testw32dlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CTestw32App - -BEGIN_MESSAGE_MAP(CTestw32App, CWinApp) - //{{AFX_MSG_MAP(CTestw32App) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - ON_COMMAND(ID_HELP, CWinApp::OnHelp) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTestw32App construction - -CTestw32App::CTestw32App() -{ - // TODO: add construction code here, - // Place all significant initialization in InitInstance -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CTestw32App object - -CTestw32App theApp; - -///////////////////////////////////////////////////////////////////////////// -// CTestw32App initialization - -BOOL CTestw32App::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - CTestw32Dlg dlg; - m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); - if (nResponse == IDOK) - { - // TODO: Place code here to handle when the dialog is - // dismissed with OK - } - else if (nResponse == IDCANCEL) - { - // TODO: Place code here to handle when the dialog is - // dismissed with Cancel - } - - // Since the dialog has been closed, return FALSE so that we exit the - // application, rather than start the application's message pump. - return FALSE; -} - -BOOL CTestw32App::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) -{ - // TODO: Add your specialized code here and/or call the base class - - return CWinApp::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo); -} Index: xc/extras/FreeType/contrib/win32/testw32.dsp diff -u xc/extras/FreeType/contrib/win32/testw32.dsp:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32.dsp:removed --- xc/extras/FreeType/contrib/win32/testw32.dsp:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32.dsp Wed Mar 16 20:59:36 2005 @@ -1,190 +0,0 @@ -# Microsoft Developer Studio Project File - Name="testw32" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=testw32 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "testw32.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "testw32.mak" CFG="testw32 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "testw32 - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "testw32 - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "testw32 - Win32 Release" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 -# ADD BASE RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 /nologo /subsystem:windows /machine:I386 - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /G5 /MDd /W3 /Gm /Zi /Od /I "../../../LIB" /I "../" /I "../../../lib/arch/win32" /I "../../" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "WIN32_GR_TEST" /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 -# ADD BASE RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 freetype.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\arch\win32\release" /libpath:"..\..\..\lib\arch\win32\debug" /FORCE:MULTIPLE /FORCE:UNRESOLVED -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "testw32 - Win32 Release" -# Name "testw32 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\display.c -# End Source File -# Begin Source File - -SOURCE=.\driver32.c -# End Source File -# Begin Source File - -SOURCE=..\..\gmain.c -# End Source File -# Begin Source File - -SOURCE=.\hack_common.c -# End Source File -# Begin Source File - -SOURCE=.\hack_ftdump.c -# End Source File -# Begin Source File - -SOURCE=.\hack_ftlint.c -# End Source File -# Begin Source File - -SOURCE=.\hack_ftstring.c -# End Source File -# Begin Source File - -SOURCE=.\hack_fttimer.c -# End Source File -# Begin Source File - -SOURCE=.\hack_ftview.c -# End Source File -# Begin Source File - -SOURCE=.\stdafx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# Begin Source File - -SOURCE=.\testw32.cpp -# End Source File -# Begin Source File - -SOURCE=.\testw32.rc - -!IF "$(CFG)" == "testw32 - Win32 Release" - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\testw32dlg.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\Resource.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# Begin Source File - -SOURCE=.\testw32.h -# End Source File -# Begin Source File - -SOURCE=.\testw32Dlg.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\res\testw32.ico -# End Source File -# Begin Source File - -SOURCE=.\res\testw32.rc2 -# End Source File -# End Group -# Begin Source File - -SOURCE=.\ReadMe.txt -# End Source File -# End Target -# End Project Index: xc/extras/FreeType/contrib/win32/testw32.dsw diff -u xc/extras/FreeType/contrib/win32/testw32.dsw:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32.dsw:removed --- xc/extras/FreeType/contrib/win32/testw32.dsw:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32.dsw Wed Mar 16 20:59:36 2005 @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 5.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "testw32"=.\testw32.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Index: xc/extras/FreeType/contrib/win32/testw32.h diff -u xc/extras/FreeType/contrib/win32/testw32.h:1.2 xc/extras/FreeType/contrib/win32/testw32.h:removed --- xc/extras/FreeType/contrib/win32/testw32.h:1.2 Sat Jan 11 22:55:44 2003 +++ xc/extras/FreeType/contrib/win32/testw32.h Wed Mar 16 20:59:36 2005 @@ -1,51 +0,0 @@ -// testw32.h : main header file for the TESTW32 application -// -// $XFree86: xc/extras/FreeType/contrib/win32/testw32.h,v 1.2 2003/01/12 03:55:44 tsi Exp $ - -#if !defined(AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_) -#define AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#ifndef __AFXWIN_H__ -# error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -///////////////////////////////////////////////////////////////////////////// -// CTestw32App: -// See testw32.cpp for the implementation of this class -// - -class CTestw32App : public CWinApp -{ -public: - CTestw32App(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTestw32App) - public: - virtual BOOL InitInstance(); - virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); - //}}AFX_VIRTUAL - -// Implementation - - //{{AFX_MSG(CTestw32App) - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_) Index: xc/extras/FreeType/contrib/win32/testw32.mak diff -u xc/extras/FreeType/contrib/win32/testw32.mak:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32.mak:removed --- xc/extras/FreeType/contrib/win32/testw32.mak:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32.mak Wed Mar 16 20:59:36 2005 @@ -1,533 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -!IF "$(CFG)" == "" -CFG=testw32 - Win32 Debug -!MESSAGE No configuration specified. Defaulting to testw32 - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "testw32 - Win32 Release" && "$(CFG)" !=\ - "testw32 - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "testw32.mak" CFG="testw32 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "testw32 - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "testw32 - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "testw32 - Win32 Debug" -MTL=mktyplib.exe -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "testw32 - Win32 Release" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\testw32.exe" "$(OUTDIR)\testw32.pch" - -CLEAN : - -@erase ".\Release\testw32.pch" - -@erase ".\Release\testw32.exe" - -@erase ".\Release\hack_ftview.obj" - -@erase ".\Release\testw32.obj" - -@erase ".\Release\hack_fttimer.obj" - -@erase ".\Release\hack_common.obj" - -@erase ".\Release\driver32.obj" - -@erase ".\Release\stdafx.obj" - -@erase ".\Release\hack_ftlint.obj" - -@erase ".\Release\testw32dlg.obj" - -@erase ".\Release\gmain.obj" - -@erase ".\Release\hack_ftdump.obj" - -@erase ".\Release\hack_ftstring.obj" - -@erase ".\Release\display.obj" - -@erase ".\Release\testw32.res" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /c -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\"\ - /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS"\ - /Fp"$(INTDIR)/testw32.pch" /YX"stdafx.h" /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS= -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL" -RSC_PROJ=/l 0x410 /fo"$(INTDIR)/testw32.res" /d "NDEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/testw32.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 freetype.lib /nologo /subsystem:windows /machine:I386 -LINK32_FLAGS=freetype.lib /nologo /subsystem:windows /incremental:no\ - /pdb:"$(OUTDIR)/testw32.pdb" /machine:I386 /out:"$(OUTDIR)/testw32.exe" -LINK32_OBJS= \ - "$(INTDIR)/hack_ftview.obj" \ - "$(INTDIR)/testw32.obj" \ - "$(INTDIR)/hack_fttimer.obj" \ - "$(INTDIR)/hack_common.obj" \ - "$(INTDIR)/driver32.obj" \ - "$(INTDIR)/stdafx.obj" \ - "$(INTDIR)/hack_ftlint.obj" \ - "$(INTDIR)/testw32dlg.obj" \ - "$(INTDIR)/gmain.obj" \ - "$(INTDIR)/hack_ftdump.obj" \ - "$(INTDIR)/hack_ftstring.obj" \ - "$(INTDIR)/display.obj" \ - "$(INTDIR)/testw32.res" - -"$(OUTDIR)\testw32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -# PROP BASE Use_MFC 6 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 6 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\testw32.exe" "$(OUTDIR)\testw32.pch" - -CLEAN : - -@erase ".\Debug\vc40.pdb" - -@erase ".\Debug\vc40.idb" - -@erase ".\Debug\testw32.pch" - -@erase ".\Debug\testw32.exe" - -@erase ".\Debug\stdafx.obj" - -@erase ".\Debug\display.obj" - -@erase ".\Debug\hack_ftlint.obj" - -@erase ".\Debug\hack_fttimer.obj" - -@erase ".\Debug\hack_ftdump.obj" - -@erase ".\Debug\driver32.obj" - -@erase ".\Debug\hack_ftview.obj" - -@erase ".\Debug\testw32dlg.obj" - -@erase ".\Debug\testw32.obj" - -@erase ".\Debug\gmain.obj" - -@erase ".\Debug\hack_ftstring.obj" - -@erase ".\Debug\hack_common.obj" - -@erase ".\Debug\testw32.res" - -@erase ".\Debug\testw32.ilk" - -@erase ".\Debug\testw32.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I "..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I\ - "..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D\ - "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/testw32.pch" /YX"stdafx.h"\ - /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS= -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL" -RSC_PROJ=/l 0x410 /fo"$(INTDIR)/testw32.res" /d "_DEBUG" /d "_AFXDLL" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/testw32.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 -# ADD LINK32 ..\..\..\lib\arch\win32\debug\freetype.lib /nologo /subsystem:windows /debug /machine:I386 -LINK32_FLAGS=..\..\..\lib\arch\win32\debug\freetype.lib /nologo\ - /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)/testw32.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/testw32.exe" -LINK32_OBJS= \ - "$(INTDIR)/stdafx.obj" \ - "$(INTDIR)/display.obj" \ - "$(INTDIR)/hack_ftlint.obj" \ - "$(INTDIR)/hack_fttimer.obj" \ - "$(INTDIR)/hack_ftdump.obj" \ - "$(INTDIR)/driver32.obj" \ - "$(INTDIR)/hack_ftview.obj" \ - "$(INTDIR)/testw32dlg.obj" \ - "$(INTDIR)/testw32.obj" \ - "$(INTDIR)/gmain.obj" \ - "$(INTDIR)/hack_ftstring.obj" \ - "$(INTDIR)/hack_common.obj" \ - "$(INTDIR)/testw32.res" - -"$(OUTDIR)\testw32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "testw32 - Win32 Release" -# Name "testw32 - Win32 Debug" - -!IF "$(CFG)" == "testw32 - Win32 Release" - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\ReadMe.txt - -!IF "$(CFG)" == "testw32 - Win32 Release" - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\testw32.cpp -DEP_CPP_TESTW=\ - ".\stdafx.h"\ - ".\testw32.h"\ - ".\testw32dlg.h"\ - - -"$(INTDIR)\testw32.obj" : $(SOURCE) $(DEP_CPP_TESTW) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\testw32dlg.cpp -DEP_CPP_TESTW3=\ - ".\stdafx.h"\ - ".\testw32.h"\ - ".\testw32dlg.h"\ - ".\..\..\gdriver.h"\ - ".\..\..\gevents.h"\ - - -"$(INTDIR)\testw32dlg.obj" : $(SOURCE) $(DEP_CPP_TESTW3) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\stdafx.cpp -DEP_CPP_STDAF=\ - ".\stdafx.h"\ - - -!IF "$(CFG)" == "testw32 - Win32 Release" - -# ADD CPP /Yc"stdafx.h" - -BuildCmds= \ - $(CPP) /nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\" /D\ - "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS"\ - /Fp"$(INTDIR)/testw32.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/" /c $(SOURCE) \ - - -"$(INTDIR)\stdafx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\testw32.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -# ADD CPP /Yc"stdafx.h" - -BuildCmds= \ - $(CPP) /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I\ - "..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D\ - "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/testw32.pch" /Yc"stdafx.h"\ - /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \ - - -"$(INTDIR)\stdafx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\testw32.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\testw32.rc -DEP_RSC_TESTW32=\ - ".\res\testw32.ico"\ - ".\res\testw32.rc2"\ - - -"$(INTDIR)\testw32.res" : $(SOURCE) $(DEP_RSC_TESTW32) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_ftview.c -DEP_CPP_HACK_=\ - ".\..\..\ftview.c"\ - ".\..\..\..\lib\freetype.h"\ - ".\..\..\common.h"\ - ".\..\..\gmain.h"\ - ".\..\..\gevents.h"\ - ".\..\..\gdriver.h"\ - ".\..\..\display.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - -NODEP_CPP_HACK_=\ - ".\..\..\std.h"\ - ".\..\..\graflink.h"\ - ".\..\..\armsup.c"\ - - -"$(INTDIR)\hack_ftview.obj" : $(SOURCE) $(DEP_CPP_HACK_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_common.c -DEP_CPP_HACK_C=\ - ".\..\..\common.c"\ - ".\..\..\common.h"\ - - -"$(INTDIR)\hack_common.obj" : $(SOURCE) $(DEP_CPP_HACK_C) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_ftdump.c - -!IF "$(CFG)" == "testw32 - Win32 Release" - -DEP_CPP_HACK_F=\ - ".\..\..\ftdump.c"\ - ".\..\..\..\lib\freetype.h"\ - ".\..\..\common.h"\ - ".\..\..\..\lib\ttobjs.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - ".\..\..\..\lib\ttconfig.h"\ - ".\..\..\..\lib\ttengine.h"\ - ".\..\..\..\lib\ttmutex.h"\ - ".\..\..\..\lib\ttcache.h"\ - ".\..\..\..\lib\tttables.h"\ - ".\..\..\..\lib\ttcmap.h"\ - ".\..\..\..\lib\tttypes.h"\ - -NODEP_CPP_HACK_F=\ - ".\..\..\std.h"\ - ".\..\..\graflink.h"\ - ".\..\..\armsup.c"\ - ".\..\..\ftxerr18.h"\ - ".\..\..\..\lib\ft_conf.h"\ - - -"$(INTDIR)\hack_ftdump.obj" : $(SOURCE) $(DEP_CPP_HACK_F) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "testw32 - Win32 Debug" - -DEP_CPP_HACK_F=\ - ".\..\..\ftdump.c"\ - - -"$(INTDIR)\hack_ftdump.obj" : $(SOURCE) $(DEP_CPP_HACK_F) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_ftlint.c -DEP_CPP_HACK_FT=\ - ".\..\..\ftlint.c"\ - ".\..\..\..\lib\freetype.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - -NODEP_CPP_HACK_FT=\ - ".\..\..\std.h"\ - ".\..\..\graflink.h"\ - ".\..\..\armsup.c"\ - ".\..\..\ftxerr18.h"\ - - -"$(INTDIR)\hack_ftlint.obj" : $(SOURCE) $(DEP_CPP_HACK_FT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_ftstring.c -DEP_CPP_HACK_FTS=\ - ".\..\..\ftstring.c"\ - ".\..\..\..\lib\freetype.h"\ - ".\..\..\common.h"\ - ".\..\..\gmain.h"\ - ".\..\..\gevents.h"\ - ".\..\..\gdriver.h"\ - ".\..\..\display.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - -NODEP_CPP_HACK_FTS=\ - ".\..\..\std.h"\ - ".\..\..\graflink.h"\ - ".\..\..\armsup.c"\ - - -"$(INTDIR)\hack_ftstring.obj" : $(SOURCE) $(DEP_CPP_HACK_FTS) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hack_fttimer.c -DEP_CPP_HACK_FTT=\ - ".\..\..\fttimer.c"\ - ".\..\..\..\lib\freetype.h"\ - ".\..\..\common.h"\ - ".\..\..\gmain.h"\ - ".\..\..\gdriver.h"\ - ".\..\..\gevents.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - - -"$(INTDIR)\hack_fttimer.obj" : $(SOURCE) $(DEP_CPP_HACK_FTT) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\driver32.c -DEP_CPP_DRIVE=\ - ".\..\..\gdriver.h"\ - ".\..\..\..\lib\freetype.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - - -"$(INTDIR)\driver32.obj" : $(SOURCE) $(DEP_CPP_DRIVE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\winlib\freetype.orig\test\gmain.c -DEP_CPP_GMAIN=\ - ".\..\..\gmain.h"\ - ".\..\..\gdriver.h"\ - - -"$(INTDIR)\gmain.obj" : $(SOURCE) $(DEP_CPP_GMAIN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\winlib\freetype.orig\test\display.c -DEP_CPP_DISPL=\ - ".\..\..\..\lib\freetype.h"\ - ".\..\..\gmain.h"\ - ".\..\..\display.h"\ - "..\..\..\lib\fterrid.h"\ - "..\..\..\lib\ftnameid.h"\ - - -"$(INTDIR)\display.obj" : $(SOURCE) $(DEP_CPP_DISPL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -# End Project -################################################################################ Index: xc/extras/FreeType/contrib/win32/testw32.rc diff -u xc/extras/FreeType/contrib/win32/testw32.rc:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32.rc:removed --- xc/extras/FreeType/contrib/win32/testw32.rc:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32.rc Wed Mar 16 20:59:36 2005 @@ -1,202 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Italian (Italy) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA) -#ifdef _WIN32 -LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 16, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""res\\testw32.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""l.ita\\afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\testw32.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_TESTW32_DIALOG DIALOGEX 0, 0, 331, 274 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW -CAPTION "testw32" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Run",IDOK,105,100,28,14 - PUSHBUTTON "Exit",IDCANCEL,105,116,28,14 - CONTROL "",IDC_BITMAP,"Static",SS_BLACKRECT,146,47,178,120 - LISTBOX IDC_LIST_BOX,7,171,317,97,LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_HSCROLL | WS_TABSTOP - PUSHBUTTON "<-Select Action (q to quit test pgm)",IDC_SELECT_ACTION, - 34,56,110,15 - EDITTEXT IDC_ACTION,23,56,9,12,ES_AUTOHSCROLL - COMBOBOX IDC_TEST_PROGRAM,13,12,90,64,CBS_DROPDOWN | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - LTEXT "Test Program",IDC_STATIC,13,1,60,8 - EDITTEXT IDC_OPTIONS,111,12,204,12,ES_AUTOHSCROLL - LTEXT "Options/Arguments",IDC_STATIC,109,2,73,8 - LTEXT "Show Window",IDC_STATIC,146,37,70,8 -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "041004B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "testw32 Applicazione MFC\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "testw32\0" - VALUE "LegalCopyright", "Copyright (C) 1998\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "testw32.EXE\0" - VALUE "ProductName", "testw32 Applicazione\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x410, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_TESTW32_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 324 - BOTTOMMARGIN, 268 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog Info -// - -IDD_TESTW32_DIALOG DLGINIT -BEGIN - IDC_TEST_PROGRAM, 0x403, 7, 0 -0x5446, 0x4956, 0x5745, "\000" - IDC_TEST_PROGRAM, 0x403, 7, 0 -0x5446, 0x5544, 0x504d, "\000" - IDC_TEST_PROGRAM, 0x403, 9, 0 -0x5446, 0x5453, 0x4952, 0x474e, "\000" - IDC_TEST_PROGRAM, 0x403, 7, 0 -0x5446, 0x494c, 0x544e, "\000" - 0 -END - -#endif // Italian (Italy) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA) -#ifdef _WIN32 -LANGUAGE 16, 1 -#pragma code_page(1252) -#endif -#include "res\testw32.rc2" // non-Microsoft Visual C++ edited resources -#include "l.ita\afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Index: xc/extras/FreeType/contrib/win32/testw32dlg.cpp diff -u xc/extras/FreeType/contrib/win32/testw32dlg.cpp:1.1.1.1 xc/extras/FreeType/contrib/win32/testw32dlg.cpp:removed --- xc/extras/FreeType/contrib/win32/testw32dlg.cpp:1.1.1.1 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/contrib/win32/testw32dlg.cpp Wed Mar 16 20:59:36 2005 @@ -1,358 +0,0 @@ -/*********************************************************/ -/* Test program driver for freetype on Win32 Platform */ -/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/ -/* */ -/*********************************************************/ - -// testw32Dlg.cpp : implementation file -// - -#include "stdafx.h" -#include "testw32.h" -#include "testw32dlg.h" -#include "gdriver.h" -#include "gevents.h" -#include -#include -#include -CWnd *button_OK,*button_Cancel; -DWORD thrd_spool; // output spooler -HANDLE spool_thread; - -//Sync data: -extern "C" { - HANDLE evgetevent,evdriverdisplaybitmap,this_cwnd,main_thread,listbox,bitmap; - TEvent evevent; - char *ev_buffer; - int ev_lines,ev_columns; - char *save_buffer; - int save_lines,save_cols,exit_code; - int ftview(int,char**); - int ftdump(int,char**); - int ftlint(int,char**); - int ftstring(int,char**); - int ftstrpnm(int,char**); - int ftzoom(int,char**); - int call_test_program(int (*)(int,char**),int,char **); - -} -//pipe handling variables -int pipe_std[2]={2*0},pipe_err[2]={2*0},error; -int old_std,old_err; -//end of pipe handling variables - - -#define TEST_PROG_N 4 -//Sync data end -char ProgramName[16]; -char fontname[16]; -char fullfont[MAX_PATH]; -char *argv[255]; -int argc; -DWORD WINAPI ThreadHead(LPVOID ); -DWORD WINAPI ThreadSpool(LPVOID ); -void readpipe(int); - - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif -extern main(int,char **); -extern int X_Link; - -///////////////////////////////////////////////////////////////////////////// -// CTestw32Dlg dialog - -CTestw32Dlg::CTestw32Dlg(CWnd* pParent /*=NULL*/) - : CDialog(CTestw32Dlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CTestw32Dlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 - m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); -} - -void CTestw32Dlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTestw32Dlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CTestw32Dlg, CDialog) - //{{AFX_MSG_MAP(CTestw32Dlg) - ON_WM_PAINT() - ON_WM_QUERYDRAGICON() - ON_BN_CLICKED(IDC_SELECT_ACTION, OnSelectAction) - ON_WM_DESTROY() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTestw32Dlg message handlers - -BOOL CTestw32Dlg::OnInitDialog() -{ int error; - FILE *retf; - CDialog::OnInitDialog(); - - // Set the icon for this dialog. The framework does this automatically - // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon - - // TODO: Add extra initialization here - //save CWnd objects for utility fns; - evgetevent=CreateEvent(NULL,FALSE,FALSE,"Get_Event"); - evdriverdisplaybitmap=CreateEvent(NULL,FALSE,FALSE,"Driver_Display_Bitmap"); - listbox=(GetDlgItem(IDC_LIST_BOX))->m_hWnd; - bitmap=(GetDlgItem(IDC_BITMAP))->m_hWnd; - button_OK=GetDlgItem(IDOK); - button_Cancel=GetDlgItem(IDCANCEL); - error=_pipe(pipe_std,1024,_O_TEXT); -// error=_pipe(pipe_err,1024,_O_TEXT); - // enable piping - if(-1==_fileno(stdout)) - {retf=freopen("throwaway_stdout.tmp","wt",stdout); - } - if(-1==_fileno(stderr)) - {retf=freopen("throwaway_stderr.tmp","wt",stderr); - } - old_std=dup(_fileno(stdout)); - old_err=dup(_fileno(stderr)); - error=dup2(pipe_std[1],_fileno(stdout)); - error=dup2(pipe_std[1],_fileno(stderr)); //error=dup2(pipe_err[1],_fileno(stderr)); - save_buffer=NULL; -// error=write(pipe_std[1],"Pipe_test:Write\n",16); -// error=fprintf(stdout,"Pipe_test:fprintf"); -// error=fflush(stdout); -// activate spooler - spool_thread=CreateThread(NULL,0,ThreadSpool,NULL,0,&thrd_spool); - - - return TRUE; // return TRUE unless you set the focus to a control -} - -// If you add a minimize button to your dialog, you will need the code below -// to draw the icon. For MFC applications using the document/view model, -// this is automatically done for you by the framework. - -void CTestw32Dlg::OnPaint() -{ - if (IsIconic()) - { - CPaintDC dc(this); // device context for painting - - SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); - - // Center icon in client rectangle - int cxIcon = GetSystemMetrics(SM_CXICON); - int cyIcon = GetSystemMetrics(SM_CYICON); - CRect rect; - GetClientRect(&rect); - int x = (rect.Width() - cxIcon + 1) / 2; - int y = (rect.Height() - cyIcon + 1) / 2; - - // Draw the icon - dc.DrawIcon(x, y, m_hIcon); - } - else - { - CDialog::OnPaint(); - } -} - -// The system calls this to obtain the cursor to display while the user drags -// the minimized window. -HCURSOR CTestw32Dlg::OnQueryDragIcon() -{ - return (HCURSOR) m_hIcon; -} - -void CTestw32Dlg::OnOK() -{ - DWORD thrd_id; - char Options[256]; - char *p,*pb,*pe; - int i; - // TODO: Add extra validation here - GetDlgItemText(IDC_TEST_PROGRAM,ProgramName,sizeof(ProgramName)-1); - GetDlgItemText(IDC_OPTIONS,Options,sizeof(Options)-1); - argv[0]=ProgramName; - p=Options; - i=1; - while (*p!=0) - { - while (*p==' ') p++; - pb=p; - while (*p>' ') p++; - pe=p; - if (pe>pb) - { - argv[i]=new char[1+pe-pb]; - strncpy(argv[i],pb,pe-pb); - argv[i][pe-pb]=0; - i++; - } - } - argv[0]=ProgramName; - argc=i; - main_thread=CreateThread(NULL,0,ThreadHead,NULL,0,&thrd_id); - -// CDialog::OnOK(); -} - -DWORD WINAPI ThreadHead(LPVOID Parm) -{ int i,rc; - -struct { - char pname[16]; - int (*program)(int,char**); -} tab[TEST_PROG_N]= -{ - {"FTVIEW",&ftview}, - {"FTDUMP",&ftdump}, - {"FTLINT",&ftlint}, - {"FTSTRING",&ftstring} -// {"FTSTRPNM",&ftstrpnm}, -// {"FTZOOM",&ftzoom} -}; -//disable Ok button - rc=button_OK->EnableWindow(FALSE); - rc=button_Cancel->EnableWindow(FALSE); - - for (i=0;(i< TEST_PROG_N) &&strcmp(tab[i].pname,ProgramName);i++); - if (i>= TEST_PROG_N) - { - MessageBox(NULL,"Please select a valid Test Program Name","FreeType Test ",MB_ICONQUESTION); - } - else - call_test_program(tab[i].program,argc,(char **)&argv); - //enable buttons again - rc=button_OK->EnableWindow(TRUE); - rc=button_Cancel->EnableWindow(TRUE); - rc=fflush(stdout); - rc=fflush(stderr); - ExitThread(1); - return 1; -} - - - -void translate_command(char nChar) -{ int rc,i; - // TODO: Add your message handler code here and/or call default - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[ NUM_Translators] = - { - { 'q', event_Quit, 0 }, - { (char)27, event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( nChar == trans[i].key ) - { - evevent.what = trans[i].event_class; - evevent.info = trans[i].event_info; - break; - } - } - if (i>= NUM_Translators) - { - evevent.what=event_Keyboard; - evevent.what=nChar; - } - rc=SetEvent(evgetevent); -} - -void CTestw32Dlg::OnSelectAction() -{ - char c[2]; - GetDlgItemText(IDC_ACTION,c,2); - translate_command(c[0]); -} - - -DWORD WINAPI ThreadSpool(LPVOID Parm) -{ - while(1) - { - if (pipe_std[0]) readpipe(pipe_std[0]); // will never get out of there !!!! -// if (pipe_err[0]) readpipe(pipe_err[0]); - Sleep(1000); - } - return 1; -} - -void readpipe(int h) - { int i,j,rc; - - char buffer[1024],line[1024]; - rc=1; - while(rc) - { - rc=read(h,buffer,sizeof(buffer)); - if (rc) - { j=0; - for(i=0;i= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -///////////////////////////////////////////////////////////////////////////// -// CTestw32Dlg dialog - -class CTestw32Dlg : public CDialog -{ -// Construction -public: - CTestw32Dlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CTestw32Dlg) - enum { IDD = IDD_TESTW32_DIALOG }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTestw32Dlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - HICON m_hIcon; - - // Generated message map functions - //{{AFX_MSG(CTestw32Dlg) - virtual BOOL OnInitDialog(); - afx_msg void OnPaint(); - afx_msg HCURSOR OnQueryDragIcon(); - virtual void OnOK(); - afx_msg void OnSelectAction(); - afx_msg void OnDestroy(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TESTW32DLG_H__70F52CAB_06A4_11D2_9AC4_0060978849F3__INCLUDED_) Index: xc/extras/FreeType/contrib/win32/res/testw32.rc2 diff -u xc/extras/FreeType/contrib/win32/res/testw32.rc2:1.2 xc/extras/FreeType/contrib/win32/res/testw32.rc2:removed --- xc/extras/FreeType/contrib/win32/res/testw32.rc2:1.2 Sat Jan 11 22:55:44 2003 +++ xc/extras/FreeType/contrib/win32/res/testw32.rc2 Wed Mar 16 20:59:36 2005 @@ -1,14 +0,0 @@ -// -// TESTW32.RC2 - resources Microsoft Visual C++ does not edit directly -// -// $XFree86: xc/extras/FreeType/contrib/win32/res/testw32.rc2,v 1.2 2003/01/12 03:55:44 tsi Exp $ - -#ifdef APSTUDIO_INVOKED -# error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// Index: xc/extras/FreeType/docs/FAQ diff -u xc/extras/FreeType/docs/FAQ:1.1.1.2 xc/extras/FreeType/docs/FAQ:removed --- xc/extras/FreeType/docs/FAQ:1.1.1.2 Sat Feb 12 23:55:24 2000 +++ xc/extras/FreeType/docs/FAQ Wed Mar 16 20:59:36 2005 @@ -1,799 +0,0 @@ - FreeType User FAQ - --------------------------------------------------------------------- - - - Table of contents - - -1. How do I compile the test programs? - -2. What are the test programs? - -3. How do I use them? - -4. How do I only compile the FreeType library? - -5. The library compiles fine on my system, unfortunately it seems - the test programs won't. What can I do? - -6. What is FreeType, and what is it not? - -7. Can FreeType be ported to other platforms? - -8. My TrueType font only works on a Mac/in Windows. Will I be able - to use it with FreeType? - -9. What are the most common character mappings? - -10. How do I render text with FreeType? - -11. How do I render rotated/slanted text with FreeType? - -12. How do I compute a glyph bitmap's dimensions? - -13. Why is text rendering so slow? Does FreeType cache glyphs? - -14. Do you always render the same glyphs as Windows or the Mac? - -15. The program `ftlint' reports errors with one of my fonts, though - it works perfectly under Windows. What does this mean? - -16. What does the `fttimer' test program benchmarks? - -17. Is it possible to perform styling (like oblique, italic, bold, - underline, etc.) with FreeType? - -18. When does glyph hinting takes place? Is it when the glyph is - loaded, or when it is converted to a bitmap/pixmap? - -19. Which is the best, caching outlines or bitmaps? - -20. Can I open OpenType and/or TrueType GX fonts with FreeType? - -21. How can I access additional TrueType tables that FreeType - doesn't support? - -22. When will I be able to use FreeType to display TrueType fonts in - X11, Wine, or OS/2, or even other systems? - -23. What does the `free' in FreeType really means? - -24. Does FreeType support threads? Is it re-entrant? - -25. Does FreeType support `foreign languages'? - -26. I'm using fractional char sizes, but the glyphs stay at the same - integer size. Why? - -27. Hinting doesn't work at very small sizes. Why? - --------------------------------------------------------------------- - -1. How do I compile the test programs? - - Detailed compilation steps are given in the `freetype/HOWTO.txt' - file, as well as system and compiler specific hints in the - `freetype/howto' directory. What follows is a _very_ simple - guide: - - For Unix: - - Do the following on the prompt while in the base directory of - the FreeType package: - - % ./configure - % make - % make install - - This will build and install the library (shared, if supported) - together with the test programs. Say `./configure --help' to - see the available configuring options. - - This should work with any ANSI C compiler. - - For other platforms: - - Go to the `test' directory. Look at one of the makefiles - located in the `arch/' directory, and use the - appropriate makefile from there. - - For example: - - make -f arch/msdos/makefile.gcc (DJGPP or emx) - wmake -f=arch\msdos\makefile.wat (Watcom DOS) - nmake -f arch\os2\makefile.icc (Visual Age OS/2) - make -f arch/amigaos/makefile.gcc (GCC Amiga) - - This will compile both the library and the test programs. - - --------------------------------------------------------------------- - -2. What are the test programs? - - The test programs are simple sources that `show off' the FreeType - library. They are located in the `test' directory. They make use - of a small graphics sub-system which is able to display bitmaps - and pixmaps on a variety of platforms through the use of - system-specific `drivers'. - - The test programs are: - - ftdump: A simple TTF information dumper. Also prints the - memory used by each opened font file with FreeType. - Doesn't use the graphics sub-system. - - ftlint: A simple TrueType bytecode verifier. It simply hints - all glyphs of one or more font files at a given size - and reports errors. Doesn't use the graphics - sub-system. - - ftview: A simple font viewer. Displays all glyphs in a font - file in a window. - - ftstring: Renders a simple string to the screen. Demonstrates - how to produce text with FreeType. - - fttimer: A simple benchmark, used to profile the scan-line - conversion routines (and only them). Supports also - display. - - ftstrpnm: A version of `ftstring' which saves a bit/pixmap to a - PNM file rather than to the screen. No graphics - sub-system needed. - - ftzoom: A simple glyph viewer, useful to view, zoom and rotate - individual glyphs in a font file. - - fterror: This program demonstrates how to use the ftxerr18 - extension. Note that internationalized strings will - be available on some platforms only (e.g. Linux). - - ftmetric: A simple metric/glyph dumper. No graphics sub-system - needed. - - ftsbit: Displays data about embedded bitmaps in a TrueType - font. - - ftstrtto: Renders a string to screen, using TrueType Open - features. - - NOTE: The file `ftdebug.c' isn't part of the test suite. It is - used only by the developers team to debug the engine at a - higher level. It won't work with a standard library - compile. - - - The tiny graphics subsystem is defined in the following files: - - gmain.h/gmain.c: The subsystem's main body/interface. - - gevents.h: The definition of events defined for the - subsystem - - gdriver.h: The generic interface of all system-specific - drivers. - - System-specific drivers are in the `test/arch/' - directories, like: - - test/arch/msdos/gfs_dos.c Full-Screen DOS driver - test/arch/os2/gpm_os2.c PM (Windowed) OS/2 driver - test/arch/unix/gwin_x11.c X11 Windowed driver - - etc. - - --------------------------------------------------------------------- - -3. How do I use them? - - Please read the file freetype/README for a full description. - - --------------------------------------------------------------------- - -4. How do I only compile the FreeType library? - - For Unix: - - Do a `configure' run as described in section 1. Then change to - the lib subdirectory and say `make' and `make install'. - - For other platforms: - - Go to the `lib' directory. Look at one of the makefiles located - in the `arch/' directory, and use it from `lib'. - - For example: - - make -f arch/msdos/makefile.gcc (DJGPP or emx) - wmake -f=arch\msdos\makefile.wat (Watcom DOS) - nmake -f arch\os2\makefile.icc (Visual Age OS/2) - make -f arch/amigaos/makefile.gcc (GCC Amiga) - - The library is pure ANSI C and doesn't depend on any - system-specific package. You need not gcc to compile it. - - --------------------------------------------------------------------- - -5. The library compiles fine on my system, unfortunately it seems - the test programs won't. What can I do? - - As said before, the test programs rely on a small graphics - sub-system to display the bitmaps and pixmaps produced by the - library. The following systems are currently supported: - - DOS Full-Screen - Amiga Full-Screen Note that the windowed graphics - Amiga Windowed driver are very 'basic', they do - OS/2 Full-Screen not provide menus, dialog boxes, - OS/2 Windowed etc. Rather, they provide one - X11 Windowed windowed bitmap/pixmap and translate - Win32 Windowed events to the ones defined in - `test/gevents'. - - If you want to add support to your system, you should write a new - graphics driver. To do that, read the file `test/gdriver.h' which - contains the driver generic interface, then browse the drivers - that are already provided. - - The graphics drivers are located in the `test/arch/' - directories. They're not part of the library proper. - - IMPORTANT NOTE: - - You can also directly link the library to your own application - and render glyphs directly into your own bitmaps with very few - efforts. - - --------------------------------------------------------------------- - -6. What is FreeType, and what is it not? - - FreeType is a rather low-level font engine. It has been designed - primarily to be the basis of several font servers, for very - different systems which all have their own metrics and graphics - models. This means that it focuses on the following points: - - - Opening and loading font files in memory. - - - Giving access to most important font properties and TrueType - tables. - - - Providing a simple way to translate system-specific character - codes into glyph indexes, according to the TrueType `cmap' - specification. - - - Loading and rendering _individual_ glyphs as nicely as possible - (either in outlines, bitmaps, or pixmaps), and performing - excellent hinting. - - It isn't a high-level text rendering library, and many tasks will - have to be performed by higher level layers like: - - - glyph caching (outlines and/or maps) - - text rendering - - justification, kerning - - font mapping - - rotated/slanted text - - However, its API provides many functions that ease these - operations considerably: - - - Glyph outlines can be copied and transformed easily with the API - functions, then rendered to bitmaps or pixmaps with FreeType's - scan-line converter, which is very fast. - - - The glyph loader places the outlines in order to ease the - process of text rendering. See the documentation file named - `glyphs.htm' (resp. `glyphs.txt') or `ftstring's source for more - details. - - - The engine gives you access to several TrueType tables that can - be processed by your application to provide more powerful - rendering (e.g. kerning). - - - It is possible, and rather simple, to write separately - compilable extensions to the engine to access other TrueType - tables that are not supported by the engine in this release. - This can be handy if one wants to access data in TrueType GX or - OpenType fonts (as these formats comply to the TrueType `sfnt' - file storage format, they can be opened by the FreeType engine - as a normal TrueType file). - - --------------------------------------------------------------------- - -7. Can FreeType be ported to other platforms? - - FreeType is written in pure ANSI C and should compile well on all - 16, 32, and 64 bits processors. Note, however, that the 16-bit - port requires a large memory model, as some tables found in - TrueType programs could exceed 64kByte (this is really true for - CJK and Unicode fonts. Nearly all others should work fine with - it). - - It doesn't support some very exotic platforms though, like a - 32-bit only processor (where the only word size is 32-bit, even - for chars and shorts). However, nothing prevents you to test it - by yourself... - - The memory management and file access routines have been gathered - in two components, namely `ttmemory' and `ttfile', which can be - specialized for a specific system. Their standard version, found - in the `lib' directory, uses simply the ANSI libc. However, - examples are given of alternative file components for OS/2 and - Unix in: - - lib/arch/os2/ttfile.c - (accessing the low-level OS/2 file API directly) - - lib/arch/unix/ttmmap.c - (using memory-mapped files for improved access) - - You would certainly need to rewrite these components if you intend - to use FreeType in an embedded system. - - --------------------------------------------------------------------- - -8. My TrueType font only works on a Mac/in Windows. Will I be able - to use it with FreeType? - - Short Answer: YES, but be cautious! - - If you have read section 9 or 25, you know that a font file might - have different charMaps entries, used to translate character codes - to glyph indexes. The problem of most `system-specific' TrueType - fonts (sigh) is that they only contain one single mapping, like - Apple Roman, or Windows Glyph List, making it usable only on the - platform it was `designed' for. - - The test program `ftdump' can be used to display the character - encodings supported in a font file. Most fonts come with Apple - Roman and Windows Unicode. - - FreeType can use every charmap found in a font file, so it is up - to your application to choose the one that fits its task best. If - you use a font which only provides an Apple Roman charcode, you'll - probably have a hard time rendering Unicode strings without an - additional translation. - - Note that the tool `ttf_edit' can actually add missing cmaps to a - TrueType font file. More info on this can be found at: - - http://www.truetex.com - - Another possibility is to use Just van Rossum's TTX compiler - (still beta) which can convert a TrueType font into an XML - description and vice versa; it can be found at - - http://www.letterror.com/ttx/ - --------------------------------------------------------------------- - -9. What are the most common character mappings? - - If you don't want to read the TrueType specification, here is some - information about the most used char maps. Each map is designed - by a `platform ID', followed by a platform-specific `encoding ID': - - Examples: - - 0, 0 : Apple Unicode - 1, 0 : Apple Roman - 3, 0 : Windows Symbol - 3, 1 : Windows Unicode - - Windows and Apple Unicode charmaps differ only in internal storage - layout. Both can be used transparently with FreeType. - - Many fonts come also with both Apple Roman and Windows Unicode. - - --------------------------------------------------------------------- - -10. How do I render text with FreeType? - - This is explained with great detail in the glyphs documentation - file available in both text (glyphs.txt) and HTML (glyphs.htm, - including schematics). - - Text rendering isn't difficult. One can also look at the code for - `ftstring' or `ftstrtto' to see how it is done. - - --------------------------------------------------------------------- - -11. How do I render rotated/slanted text with FreeType? - - It is possible to transform the outlines returned by the glyph - loader, hence producing rotated or slanted text. Please read the - `glyphs' documentation file, which explains this in great detail, - as well as some other important things. - - --------------------------------------------------------------------- - -12. How do I compute a glyph bitmap's dimensions? - - You should grid-fit its bounding box, then compute its width and - height. This is explained in the `bitmaps.txt' documentation - file. - - --------------------------------------------------------------------- - -13. Why is text rendering so slow? - Does FreeType cache glyphs? - - The FreeType engine doesn't cache anything, be it outlines or - bitmaps. Hence, a program that renders text by calling the glyph - loader on each letter is slow. - - Because caching cannot be performed in both an _easy_ and - _portable_ way it is left to the application. Moreover, some - graphics systems already provide some sort of caching, and it is - better to take advantage of it rather than re-implementing it. - - The `how's and `when's of caching are explained in the `glyphs' - documentation file. The `bitmaps' documentation file is also a - good source of information if you intend to render individual - glyph bitmaps. - - --------------------------------------------------------------------- - -14. Do you always render the same glyphs as Windows or the Mac? - - Short answer: No for rare cases. - - There are a lot of technical details, too numerous and lengthy to - be put here, that prevents the FreeType library from matching 100% - the glyphs produced by the Windows or Macintosh rasterizers. - - This engine is a clean-room implementation, and most of the - reasons why its development took so much time is the largely - deficient TrueType specification published by Apple and Microsoft. - A number of key technical aspects are missing, and we found many - `undocumented' features in the TrueType bytecode, after several - months of testing and trying. We are now very satisfied with the - current quality, though still try to improve it. - - The glyph metrics (bearings and advances) also match significantly - those computed by Windows, or found in the TrueType pre-calc - tables. - - As hinting glyphs also makes use of several rounding operations, - we will be unable to provide a perfect clone unless we implement - the exact same computations _and_ rounding errors -- this is - very unlikely... - - --------------------------------------------------------------------- - -15. The program `ftlint' reports errors with one of my fonts, though - it works perfectly under Windows. What does this mean? - - Associated to each glyph is a small `program', written in a - specific bytecode language, which is in charge of hinting the - glyph's outline to make it perfect on screen as on paper. Some of - these programs can be broken (e.g., accessing invalid areas of - memory, performing a divide by zero, etc.), and these are the - errors that are reported by `ftlint'. - - They can also mean a bug in the TrueType bytecode interpreter (or - more likely an `undocumented' feature we haven't discovered yet), - but should now be extremely rare. - - Surprisingly, even largely distributed fonts can contain broken - glyph programs. For example: - - - antqua.ttf, glyph 163 (MS Office 4.2): - - The program tries to access point number 0x127, which is too - much. - - - timesbs, arialbs, courbs (MS Office International): - - The back-slanted versions of the MS core fonts produce stack - overflows in many glyphs, and other oddities. It seems their - `maximum profile' table is invalid. - - - a ton of `free' fonts, apparently designed with mediocre tools. - - It seems the Windows TrueType engine doesn't check its arguments - often, and let all overflows run, possibly writing to critical - portions of memory. Please, don't ask us what this could do to - NT 4 :-) - - The FreeType engine performs checks on every opcode. We cannot - guarantee that it is bullet proof, of course, but it seems to work - well and catch font bugs accordingly. - - We also have artificially `enlarged' some allocated tables to make - the engine work with the back-slanted fonts without compromising - security, but it's clearly a hack we would have preferred to - avoid! - - --------------------------------------------------------------------- - -16. What does the `fttimer' test program benchmarks? - - This test program is only dedicated to profiling FreeType's - scan-line converter, a component also called `rasterizer', which - is in charge of converting a vectorial outline into a bitmap, or a - pixmap. - - It simply loads all glyphs of a font file (by slices of 512 at - once), then converts them. Only the conversion is actually - benchmarked. - - The glyphs are rendered at size 400pt at a resolution of 96dpi - (this is about 500 pixels high!). As you'll see by running - `fttimer', the rasterizer is very fast. - - --------------------------------------------------------------------- - -17. Is it possible to perform styling (like oblique, italic, bold, - underline, etc.) with FreeType? - - Actually, these refer to very different things: - - - Italic and Bold styles usually mean many variations from the - `Regular' font. This is why you normally need a proper font - file for each of these. For example, the MS core font Times - comes in the following TrueType files: - - TIMES.TTF Times New Roman Regular - TIMESI.TTF Times New Roman Italic - TIMESB.TTF Times New Roman Bold - TIMESBI.TTF Times New Roman Bold Italic - (sometimes named TIMESZ.TTF) - - With FreeType, you simply need the required font file to use it. - - - Oblique style refers to a transformation that is applied to a - regular font in order to make it `slanted', likes italics do. - However, an italic font very frequently contains small but - important variations that cannot be produced by this method and - make the font more appealing. - - Slanting can easily be done with a transformation under - FreeType, with the exact same process as rendering rotated text. - Please read the `glyphs' documentation file where it is - explained in details. - - Usually, Windows or the Macintosh produce oblique versions of a - regular font if the corresponding italic TrueType file isn't - available. They also stretch regular fonts horizontally if the - bold one isn't available. All of this can be done with trivial - transformations. - - - Underlining and stroking are not really part of the glyphs. - They're simply lines that are printed on the glyph after it has - been rendered. Each TrueType file provides, in its OS/2 table - (which is accessible through the face object properties in - FreeType), several values that define the position and width of - those lines, in notional font units. - - If you want to use them, you'll have to scale these values to - your current instance/point size, then draw the lines yourself. - - --------------------------------------------------------------------- - -18. When does glyph hinting takes place? Is it when the glyph is - loaded, or when it is converted to a bitmap/pixmap? - - The glyph loader returns fitted outlines by default (it can be - asked to return a non-fitted one, or simply the original outline - in notional coordinates too). - - This is important to have a glyph's correct metrics, even if it is - not to be rendered immediately, like when caching outlines for - rotated text. - - --------------------------------------------------------------------- - -19. Which is the best, caching outlines or bitmaps? - - It depends on your application, and what it does with text. - - Usually, if all you need is render some simple text at specific - point sizes, then simply cache the bitmaps or pixmaps. - - However, if you want to do more advanced things, like rotated - text, which require sub-pixel placement to look good, you should - then only cache the outlines, and transform/place them as needed - before sending them to the scan-line converter. - - It's always possible to produce a bitmap from an outline, and the - scan-converter is very fast. It's up to you then... - - --------------------------------------------------------------------- - -20. Can I open OpenType and/or TrueType GX fonts with FreeType? - - TrueType GX fonts are normal TrueType fonts with enhanced tables - and capabilities. They can always be opened by a normal TrueType - engine (like Windows, the Mac, or FreeType), but their improved - features won't be available. - - On the contrary, OpenType fonts may vary. While some may contain - legal TrueType glyphs, an `otf' file may only contain glyphs - encoded in the Type 2 format. You won't be able to produce any - glyphs from such a font file without a dedicated font engine (like - the ones promised in NT 5 and Java 2D). - - FreeType is a TrueType glyph engine and doesn't support Type 2 - fonts. Supporting them would require a very different philosophy - and a different core engine (even though they could share an API). - - Note that you can write extensions to the engine to access - supplemental tables defined in these formats (see next question). - - Note that FreeType version 2 (which is in alpha stage currently) - already includes a PostScript Type 1 interpreter... - - --------------------------------------------------------------------- - -21. How can I access additional TrueType tables that FreeType - doesn't support? - - You can write an `engine extension'. This is a separately - compilable component which can enhance the base library's - functionalities, without recompiling it. Some important - extensions are provided in the `lib/extend' directory. - - You'll need of course to know the TrueType specification - precisely, as well as some of the conventions used to access - tables and to manage memory. Read the documentation files for - more details, or contact the developers at: - - devel@freetype.org - - --------------------------------------------------------------------- - -22. When will I be able to use FreeType to display TrueType fonts in - X11, Wine or OS/2, or even other systems? - - Actually, an OS/2 replacement for TRUETYPE.DLL based on FreeType - is part of this package (to be found in contrib/ftos2). Thanks go - to Michal Mecasek (mike@mendelu.cz) for his excellent work! - - At least three X11 TrueType font servers are available; two of - them (xfsft and xtt) are based on FreeType, whereas the third - (xfstt) uses a separately developed TrueType engine. - - More information about these servers is available at the FreeType - homepage (http://www.freetype.org). - - Don't hesitate to contact us if you plan to use or port the engine - to exotic platforms, we're always interested in helping out. - - --------------------------------------------------------------------- - -23. What does the `free' in FreeType really means? - - The previous releases of FreeType (alphas and beta) were placed - under the LGPL. FreeType 1.0, and later releases, come with an an - alternate license, inspired from the BSD, Artistic, and IJG's - (Independent JPEG Group) ones. In short: - - - You are encouraged to use and distribute this program in all - kinds of products, including commercial ones. - - - You don't have to pay us anything for it (royalty-free). - - - You may not pretend you wrote it, or part of it that you may use - in one of your product, and you have to state clearly that you - use the FreeType code if you distribute products based on it, or - parts of it (credits clause). - - - This source code is provided AS IS, with no warranty whatsoever, - and we cannot promise support for it. - - The exact and legal terms are in the file `license.txt'. - - Enjoy ;-) - - --------------------------------------------------------------------- - -24. Does FreeType support threads? Is it re-entrant? - - Short answer: Basically yes, but not fully tested. - - We have changed some code since FreeType 1.0 in order to support - multi-threaded environments. However, these have not been tested - yet. Apparently, the thread-safe and reentrant builds now work - well perfectly once compiled; however, no serious concurrency - testing has been performed (of course, a serious lock analysis was - done in order to modify the source). - - Right now, the mutex management functions are all gathered in the - component `ttmutex', which has to be specialized for your own - system if a thread build will be necessary. - - --------------------------------------------------------------------- - -25. Does FreeType support `foreign languages'? - - Short Answer: YES, it does! - - From a TrueType font file point of view, there are several parts - to the file, one of them being the `glyphs', i.e., picture - representations of the symbols. - - Another part is the mapping table, also called `charMap'. - - For example, glyph #1 could be letter `A', and glyph #2 could be - letter `Z'. Glyphs can be stored in any order in a font file. - - The mapping tables contain at least one char-map entry. For - example, you could have an ASCII-map that maps character code 0x41 - to glyph #1, and code 0x5A to glyph #2, etc. FreeType provides a - `charMap' object class to access and use this information easily. - - There are several character encodings recognized and defined by - the TrueType specification, like Latin-1, Unicode, Apple Scripts, - WGL, etc., but a font file might only contain one or two of them. - - When using a more `exotic' character encoding like EBCDIC (this is - IBM mainframe stuff!), you would need to translate it to one of - the available formats (or to add a charmap table to the font). - Cf. section 8. - - --------------------------------------------------------------------- - -26. I'm using fractional char sizes, but the glyphs stay at the same - integer size. Why? - - Because hinting only works well with integer pixel sizes. There - is a flag that can be set in a TrueType font file to force integer - pixel size scaling, even if you ask for fractional sizes with an - API function like TT_Set_Instance_CharSize(). Needless to say, - nearly all fonts have the flag set. So this is normal. - - Also, notice that when giving a charsize in fractional points, - this will be converted to integer pixels with the formula: - - pixel_size = char_size * y_resolution / 72 - - For example, using a resolution of 96 dpi, we would have: - - 9.5 pts => 12.666 pixels => 13 pixels - 10.0 pts => 13.333 pixels => 13 pixels, i.e. same size - 10.5 pts => 14 pixels => 14 pixels - 11.0 pts => 14.666 pixels => 15 pixels - 11.5 pts => 15.333 pixels => 15 pixels, i.e. same size - - If you want to control the exact size in pixels of your glyphs, - simply use a resolution of 72dpi, where char_size = pixel_size. - - --------------------------------------------------------------------- - -27. Hinting doesn't work at very small sizes. Why? - - This is normal. There are very good technical reasons why hinting - doesn't work well at sizes under 7 ppem, usually meaning the - appearance of ugly spikes and glyph distortions. This is why the - engine disables hinting by default at such low sizes. - - ---- end of FAQ --- Index: xc/extras/FreeType/docs/TODO diff -u xc/extras/FreeType/docs/TODO:1.1.1.3 xc/extras/FreeType/docs/TODO:removed --- xc/extras/FreeType/docs/TODO:1.1.1.3 Sat Feb 12 23:55:23 2000 +++ xc/extras/FreeType/docs/TODO Wed Mar 16 20:59:37 2005 @@ -1,23 +0,0 @@ -FreeType TODO list - -. Handle various PostScript glyph names in ftxpost.c: - - Omega vs. Ohm - Delta vs. increment - macron vs. overscore - my vs. mu1 - periodcentered vs. middot - - with a new flag. - - -. Adaption of FreeType for non-ANSI compilers (wow, I'm heretic :-) - - -. More 16bit stuff to support _cdecl etc. Maybe something like this - may be used in place of the current EXPORT_DEF/EXPORT_FUNC: - - NEW_EXPORT_DEF( TT_Error ) - Cache_Create( PEngine_Instance engine, ... ) - ---- end of TODO --- Index: xc/extras/FreeType/docs/apiref.txt diff -u xc/extras/FreeType/docs/apiref.txt:1.1.1.3 xc/extras/FreeType/docs/apiref.txt:removed --- xc/extras/FreeType/docs/apiref.txt:1.1.1.3 Sat Feb 12 23:55:24 2000 +++ xc/extras/FreeType/docs/apiref.txt Wed Mar 16 20:59:37 2005 @@ -1,1867 +0,0 @@ - The FreeType Engine - - Core Library Reference - - - ----------------------------------- - - - Table of Contents: - - Introduction - - I. Types - - II. Functions - - III. Error codes - - - -------------------- - - -Introduction -============ - - This reference presents the types, functions, and error codes - defined in the high-level API header file `freetype.h'. Note that - all symbols defined in this file are prefixed by `TT_', to avoid - name conflicts with other packages at link time. - - The reference for extensions of the FreeType library can be found - in the file apirefx.txt. - - - --------------------------------------------------------------------- --------------------------------------------------------------------- - - - -I. Types -======== - - Here is the list of all the types defined in the core FreeType - API. Their exact definition can be found in the file `freetype.h' - which should be included by every client application. - - - TT_Bool - - Can be either non-zero (true) or zero (false). - - .................................................................. - - TT_Fixed - - A signed 16.16 fixed float integer type used to specify - transform coefficients and other important data. - - .................................................................. - - TT_FWord - - A signed 16-bit type used to express a distance measured in the - font's original EM units. These are also called `FUnits' in the - TrueType specification. - - .................................................................. - - TT_UFWord - - An unsigned 16-bit type. - - .................................................................. - - TT_String - TT_Char - TT_Byte - - These types represent various 8-bit integer values (for strings, - signed, and unsigned values, respectively). - - .................................................................. - - TT_Short - TT_UShort - TT_Long - TT_ULong - - These four types are aliases for 16-bit integer (signed and - unsigned) and 32-bit integer types (signed and unsigned). - - .................................................................. - - TT_F2Dot14 - - A 2.14 fixed float integer type used for unary vectors and some - scaling coefficients. Its layout is: - - s : 1 -- sign bit - m : 1 -- mantissa bit - f : 14 -- unsigned fractional value - - where `s:m' is the 2-bit signed integer value to which the - always positive fractional part `f' should be added. - - .................................................................. - - TT_F26Dot6 - - A 26.6 fixed float integer format used to define fractional - pixel coordinates. Here, 1 unit = 1/64 pixel. - - .................................................................. - - TT_Pos - - This type is used to store point coordinates, either in - fractional pixels (26.6 fixed floats) or in EM units (simple - integers). - - The meaning of the value depends on the context. For example, - all distances relative to a scaled glyph are expressed in - fractional pixels (including bearings, advances, etc). However, - the same distances are in notional font units when the glyph was - loaded unscaled. - - .................................................................. - - TT_UnitVector - - A simple structure used to store a unit vector. The vector's - coordinates are expressed in fixed float format (2.14). - - struct - { - TT_F2Dot14 x; - TT_F2Dot14 y; - } - - .................................................................. - - TT_Vector - - A simple structure used to store a single vector. Its - coordinates are expressed in fixed float format (26.6). - - struct - { - TT_F26Dot6 x; - TT_F26Dot6 y; - } - - .................................................................. - - TT_Matrix - - A simple structure used to store a single 2x2 matrix. Its - coefficients are expressed in 16.16 fixed float format. This - matrix is used to perform linear transformations on the glyph - outline, such as slanting or rotation. - - struct - { - TT_Fixed xx, xy; - TT_Fixed yx, yy; - }; - - The computation performed is: - - x' = xx * x + xy * y - y' = yx * x + yy * y - - .................................................................. - - TT_BBox - - A simple type to hold a glyph's bounding box. Used by the - TT_Get_Outline_BBox() API. - - struct - { - TT_Pos xMin, yMin; - TT_Pos xMax, yMax; - } - - .................................................................. - - TT_Outline - - Outlines are now full-class citizens, with their own API. - - This structure is used to describe a vectorial glyph - representation to the rasterizer. It is made of several fields - described below. Note however that: - - ***** THIS STRUCTURE MAY CHANGE IN THE FUTURE. We thus - ***** encourage you to use the outlines APIs described below to - ***** process your outlines, i.e., create/copy/translate/ - ***** transform them as well as rendering bitmaps and pixmaps. - - ***** THE STRUCTURE CHANGED BETWEEN 1.0 and 1.1! - - Now that you have been warned, the fields are: - - - An array of points: - - The `n_points' field gives the number of points in the - outline, while their coordinates are found in the single - vector array `points'. The `flag' array holds for each point - a flag indicating its type. - - Currently, only the first bit (bit 0, the least significant - bit) of each byte is meaningful to the rasterizer. If set, it - indicates that the point is _on_ the curve. If not set, the - point is said to be _off_ the curve. It is then a Bezier - control point. - - For more information about point states, read the TrueType - specification or the scan-line documentation `raster.txt'. - - - An array of contours' end-point indexes: - - The `n_contours' field gives the number of contours, while the - `contours' array holds the indexes of each contour's last - point. Note that the first contour always begin at point 0. - - Hence, contours[0] holds the index of the last point of the - first contour. The second contour starting at point number - `contours[0]+1' and ending a point number `contours[1]'. - - ** IMPORTANT NOTE: ** - ********************* - - The last table entry _must_ always give the total number of - points used to draw the contours, i.e.: - - contours[n_contours - 1] == n_points - - If this value is bigger than `n_points' when calling the - scan-line converter, the component will immediately return - an error (TT_Err_Too_Many_Points). If the value is smaller, - only the points contained in the described contours will be - used in the conversion process. - - - An owner field: - - This flag should **NEVER** be changed by the user. It - indicates whether the pointer fields own the arrays they refer - to (when the flag is set), or if they simply alias them (flag - unset). - - - A high precision flag: - - If this boolean is set (i.e. not zero), the scan-line - converter uses a higher precision to compute segment and - Bezier coordinates (more precisely, it uses 1/1024 precision, - instead of the normal 1/64). This is of course slower but can - be important for glyphs rendered at small sizes. - - - A second pass flag: - - If this boolean is set, the scan-line converter performs a - second sweep on the bitmap/pixmap to detect vertical drop-out. - Only horizontal drop-outs are detected in the first pass. - This is slower, but important for glyphs rendered at small - sizes. - - - A dropout mode: - - Used to specify the method to apply for drop-out control (also - called `continuity testing' in other environments). The mode - value must be one of the values defined by the TrueType - specification. - - The recent modes 4 and 5 introduced in the newest TrueType - specification (Version 1.66) are fully supported. - - An invalid value (i.e., not 0, 1, 2, 4, or 5) is taken as no - dropout control (equivalent to mode 0). - - NOTE 1: - - The outline returned by TT_Get_Glyph_Outline() only alias the - data that is part of a glyph container (see below). However, - it is possible to create and process your own outlines with - the new API functions TT_New_Outline(), TT_Done_Outline(), - TT_Copy_Outline(), TT_Translate_Outline(), etc. - - TT_Done_Outline() will only discard an outline's array if it - owns them. - - NOTE 2: - - The outlines created by TT_New_Outline() are _not_ released by - the engine on TT_Done_FreeType(), they must be discarded - explicitly by the user who has created them! - - NOTE 3: - - The glyph loader sets the fields `high_precision', - `dropout_mode' and `second_pass' automatically. - - NOTE 4: - - This structure was called TT_Glyph_Outline in beta versions of - FreeType. - - .................................................................. - - TT_Glyph_Metrics - - A structure used to return simple glyph metrics, usable for - either horizontal or vertical layout. The values are expressed - in fractional pixels (26.6 format) if scaling was active, and in - FUnits otherwise. - - The main idea was to accomodate vertical text layouts by getting - rid of the two explicit `leftSideBearing' and `advanceWidth' - names. - - The meaning of the fields varies with the text layout: - - bearingX: Also known as the `left side bearing'. For - horizontal metrics, this value gives the horizontal - distance from the pen position to the glyph's bbox - xmin, otherwise it specifies the vertical distance. - - bearingY: Also known as the `top side bearing', this is the - vertical distance from the baseline to the glyph's - bbox ymax for horizontal metrics, the horizontal - distance otherwise. - - struct - { - TT_BBox bbox; /* the glyph's bbox */ - - TT_Pos bearingX; /* left-side bearing */ - TT_Pos bearingY; /* top-side bearing */ - - TT_Pos advance; /* advance width or height */ - }; - - ** IMPORTANT NOTE ** - - Because of the convention used by the TrueType engine, the - outlines generated at glyph-load time are all placed so that - the pen is at position (0,0). This means that you don't need - to increase the pen position by `bearingX' and/or `bearingY' - before writing a glyph. Text output can be performed with - simple lines like: - - for (glyphs in text) - { - TT_Load_Glyph( ... ); - TT_Get_Glyph_Outline( glyph, &outline ); - TT_Translate_Outline( outline, - cur_pos_x * 64, cur_pos_y * 64 ); - - TT_Get_Outline_Bitmap( outline, bitmap ); - /* blit bitmap to surface */ - - cur_pos_x += (metrics.advance + 32) / 64 - } - - See the file `test/ftstring.c' for an example. - - NOTE 2: - - This structure has changed from the beta version of FreeType. - - NOTE 3: - - FreeType implements only TT_Get_Glyph_Metrics() to return - horizontal metrics. For extracting vertical metrics you - should use TT_Get_Glyph_Big_Metrics(). - - .................................................................. - - TT_Big_Glyph_Metrics - - This structure is used to return the metrics of a glyph for both - horizontal and vertical layout. - - The `linearXXX' fields represent unhinted scaled metrics values. - They can be useful for applications which need to compute device - independent placement of glyphs. Applying these metrics to - hinted glyphs will in most cases ruin the grid fitting performed - by the bytecode interpreter. - - struct - { - TT_BBox bbox; /* the glyph's bounding box */ - - TT_Pos horiBearingX; /* horizontal left-side bearing */ - TT_Pos horiBearingY; /* horizontal top-side bearing */ - - TT_Pos vertBearingX; /* vertical left-side bearing */ - TT_Pos vertBearingY; /* vertical top-side bearing */ - - TT_Pos horiAdvance; /* horizontal advance */ - TT_Pos vertAdvance; /* vertical advance */ - - TT_Pos linearHoriBearingX; /* lin. scaled hor. lsb. */ - TT_Pos linearHoriAdvance; /* lin. scaled hor. adv. */ - - TT_Pos linearVertBearingY; /* lin. scaled vert. tsb. */ - TT_Pos linearVertAdvance; /* lin. scaled vert. adv. */ - } - - .................................................................. - - TT_Instance_Metrics - - A structure used to return instance (point size) metrics. - - struct - { - int pointSize; - /* point size in points (1 point = 1/72 inch) */ - - TT_UShort x_ppem; /* horizontal pixels per EM square */ - TT_UShort y_ppem; /* vertical pixels per EM square */ - - TT_Fixed x_scale; /* 16.16 scale for EM -> frac pixels */ - TT_Fixed y_scale; /* 16.16 scale for EM -> frac pixels */ - - TT_UShort x_resolution; /* device hor. res. in dpi */ - TT_UShort y_resolution; /* device vert. res. in dpi */ - }; - - The fields `x_scale' and `y_scale' can be used by clients to - convert from notional units (in funits) to fractional - pixels (in 26.6 fixed float format), e.g.: - - TT_FUnit em_distance; - TT_F26Dot6 frac_distance; - TT_Fixed x_scale; - - frac_distance = (em_distance * x_scale) / 0x10000; - - .................................................................. - - TT_Raster_Map - - This structure is used to describe a target bitmap (or pixmap) - to the scan-line converter. It _must_ be set up by the client - application. - - - The `rows' field contains the total number of rows in the - bitmap. - - - The `width' field gives the number of pixels per row (a bit or - a byte, depending on the map's nature). - - - The `cols' field gives the number of columns, i.e. bytes, - taken by each row in the map buffer. - - ** IMPORTANT: ** The `cols' field must be a multiple of 4 for - pixmaps! - - Typically, its value should be `(width+7)/8' for bitmaps, and - `(width+3) & -4' for pixmaps. - - - The `flow' field gives the map's vertical orientation. - - If the first bytes of the bitmap buffer pertain to its upper - row, the flow is said to be going `down', and the field should - take the value `TT_Flow_Down'. If these bytes pertain to its - lowest row, the flow is going `up', and the value is - `TT_Flow_Up'. - - As an example, the PC video modes use a `down' flow, where the - first VRAM byte corresponds to the upper and leftmost corner - of the screen. - - - The `bitmap' field is a typeless pointer to the map's buffer. - - - The `size' field contains the buffer's size in bytes. It is - usually computed as follows: - - size = rows * cols; - - NOTE 1: - - For bitmaps, the leftmost-pixel is related to the highest - (i.e. most significant) bit of its byte. There is currently - no support for the opposite convention found in some systems. - - (It can be easily added if you really need it, just ask the - development team.) - - struct - { - int rows; /* number of rows */ - int cols; /* number of columns (bytes) per row */ - int width; /* number of pixels per line */ - int flow; /* bitmap orientation */ - - void* bitmap; /* bit/pixmap buffer */ - long size; /* bit/pixmap size in bytes */ - } TT_Raster_Map; - - NOTE 2: - - TT_Get_Outline_Bitmap() resp. TT_Get_Glyph_Bitmap() are used - to render bitmaps into a TT_Raster_Map. The convention used - is 0 for the background, and 1 for the foreground. The glyph - is simply `or-ed' to the bitmap buffer. - - NOTE 3: - - TT_Get_Outline_Pixmap() and TT_Get_Glyph_Pixmap() are used to - render pixmaps into a TT_Raster_Map. Note that pixels are - drawn in spans of 4 successive bytes, only if needed. This - means that you must ALWAYS pass a clean pixmap buffer to these - functions. Otherwise, garbage could accumulate! - - .................................................................. - - TT_Header - - This structure is used to hold the font's header. Its layout - and meaning are defined in the TrueType specification, in the - `head' section. - - .................................................................. - - TT_Horizontal_Header - - This structure is used to hold the font's horizontal header. - Its layout and meaning are defined in the TrueType - specification, in the `hhead' section. - - .................................................................. - - TT_OS2 - - This structure is used to hold the font's OS/2 table. Its - layout and meaning are defined in the TrueType specification, in - the `OS/2' section. - - Note that since FreeType 1.3, we support fonts without an OS/2 - table (mainly old but popular Mac fonts). In this case, the - table's `version' field will be set to 0xFFFF by the loader, and - all other fields will be zeroed. - - .................................................................. - - TT_Postscript - - This structure is used to hold the font's PostScript table. Its - layout and meaning are defined in the TrueType specification, in - the `post' section. - - .................................................................. - - TT_Face_Properties - - This structure is used to return an opened face's properties. - These are: - - - The total number of glyphs in the font, given by the field - `num_Glyphs'. - - - The maximum number of points for the font's glyphs. This - value is used to allocate the points tables of a glyph - container's outline. It can be fairly large (like 256 points - for Roman fonts). - - - The maximum number of contours for the font's glyphs. This - value is used to allocate the contours tables of a glyph - container's outline. It can be fairly large (over 16, even in - Roman fonts). - - - The number of character mappings and name records within the - font. These values can still be retrieved through the APIs - TT_Get_CharMapCount() and TT_Get_Num_Names(), though these - have been _seriously_ deprecated. - - - The number of associated faces. This number is always 1 for a - normal TrueType font file. However, when the face object was - opened from a TrueType collection, it contains the total - number of embedded fonts. - - - Pointers to the face's header, horizontal header, OS/2, and - PostScript tables. - - struct - { - TT_UShort num_Glyphs; /* number of glyphs in face */ - TT_UShort max_Points; /* max. numb. of points in a glyph */ - TT_Short max_Contours; - /* maximum number of contours in a glyph */ - - TT_ULong num_Faces; - /* 1 for normal TrueType files resp. */ - /* the number of embedded faces for TT */ - /* collections */ - - TT_Header* header; /* TrueType header table */ - TT_Horizontal_Header* horizontal; - /* TrueType horizontal header */ - TT_Vertical_Header* vertical; - /* TrueType vertical header */ - TT_OS2* os2; /* TrueType OS/2 table */ - TT_Postscript* postscript; - /* TrueType PostScript table */ - } TT_Face_Properties; - - - Note that the `vertical' field is set to NULL if the font file - does not contain any vertical metrics. - - - Note also that since version 1.3 we support font files without - an OS/2 table. See the definition of TT_OS2 for more details. - - .................................................................. - - TT_Stream - - This handle type defines a stream used to access a font file's - data. A client application should never deal with streams - directly, but some engine extensions need it to support more - advanced features like sbit support. - - .................................................................. - - TT_Face - - This type defines a handle used to reference a face object. The - objects are never accessed directly by a client application; it - can only obtain handles to new objects, and use them to query - specific information or processes. - - See also: - - TT_Open_Face(), TT_Open_Collection(), TT_Close_Face(), - TT_Get_Face_Properties(), etc. - - .................................................................. - - TT_Instance - - This type defines a handle used to reference an instance object - (also called a `pointsize' in other type engines). An instance - is always created from a valid face object, and is destroyed - with it by the engine. - - See also: - - TT_New_Instance(), TT_Close_Instance(), - TT_Set_Instance_Pointsize(), TT_Set_Instance_Resolutions(), - etc. - - .................................................................. - - TT_Glyph - - This type defines a handle used to reference a glyph container - object. A glyph container is an object owning tables sized to - the font's maximum profile to hold any glyph of a given font - file. - - It contains an outline, some metrics, as well as some data - related to the way it should be processed by the scan-line - converter. - - Note that a glyph container doesn't contain any bitmap or - pixmap! - - See also: - - TT_New_Glyph(), TT_Close_Glyph(), TT_Get_Glyph_Metrics(), - TT_Get_Glyph_Big_Metrics(), TT_New_Outline(), - TT_Get_Glyph_Outline(), TT_Get_Glyph_Bitmap(), - TT_Get_Glyph_Pixmap() - - .................................................................. - - TT_Error - - This is the type of all error codes returned by the API. Nearly - all functions return an error code, set to 0 in case of success. - - A list of all error codes is given in section III. - - .................................................................. - - TT_Engine - - For the sake of re-entrancy it is possible to distinguish - `engines' to separate several running instances of the library. - For example, it could be used as a DLL shared by several client - applications. - - Each client program must begin by creating its own engine, - through a call to TT_Init_FreeType(). The engine must also be - passed as the first argument of the following functions: - - TT_Open_Face() - TT_Open_Collection() - TT_Set_Raster_Gray_Palette() - TT_Get_Outline_Bitmap() - TT_Get_Outline_Pixmap() - TT_Done_FreeType() - - Note that any FreeType object pertains to one single engine - (there is no sharing). Closing an engine with - TT_Done_FreeType() will delete all the objects that have been - allocated within its instance. - - - --------------------------------------------------------------------- --------------------------------------------------------------------- - - - -II. Functions -============= - - Here is a list of the core library's API. - - NOTE: - - A function's default result is an error code of type TT_Error; a - list of error codes is given in section III below. - - Some functions return other types, in which case the result type - is documented with its description. - - .................................................................. - - TT_FreeType_Version( int* major, int* minor ); - - Queries the major and minor version of the library. - - .................................................................. - - TT_Init_FreeType( TT_Engine* engine ); - - Creates and initializes a new engine. Returns a handle to the - engine in the `*engine' variable. - - This call must be performed before any other function of - FreeType is invoked. The engine handle must be passed to the - following functions: - - TT_Open_Face() - TT_Open_Collection() - TT_Set_Raster_Gray_Palette() - TT_Done_FreeType() - - .................................................................. - - TT_Done_FreeType( TT_Engine engine ); - - Finalizes and destroys an engine. This call destroys _all_ - objects that were previously created and used with the engine. - - .................................................................. - - TT_Open_Face( TT_Engine engine, - TT_Text* fontPathName, - TT_face* face ); - - This call opens a font file, located by `fontPathName', and - returns a handle to the newly corresponding face object in the - handle `*face'. The object is part of the `engine' instance. - - Example: - - error = TT_Open_Face( engine, "c:\ttf\wingding.ttf", &face ); - if ( error ) - fprintf( stderr, "Could not open face.\n" ); - - NOTE 1: - - The font file can be a TrueType collection; in this case, the - engine will always open the first embedded font found in the - file. - - NOTE 2: - - `TT_Text' is usually defined as `char' by a typedef - declaration. It may be a 16-bit quantity (or even wider) for - some operating systems; see ttconfig.h for details. - - .................................................................. - - TT_Open_Collection( TT_Engine engine, - TT_Text* collectionPathName, - TT_ULong fontIndex, - TT_Face* face ); - - This call opens one of the fonts found in a TrueType collection. - The font is selected through the `fontIndex' argument. The - first font has index 0. - - Note that to know a collection's number of embedded fonts, - you will have to: - - 1 - open the first collection font with TT_Open_Face(). - - 2 - query the face's properties through - TT_Get_Face_Properties(). - - The number of embedded faces is then `properties->num_Faces'. - - Example: - - TT_Face face; - TT_Face_Properties properties; - - - /* Open first embedded collection font */ - error = TT_Open_Face( engine, "c:\ttf\sample.ttc", &face ); - if ( error ) { ...error... } - - /* Get face properties */ - error = TT_Get_Face_Properties( face, &properties ); - if ( error ) { ...error... } - - printf( "There are %d fonts in this collection.\n", - properties->num_Faces ); - - TT_Close_Face( face ); - - /* Open second font in collection */ - error = TT_Open_Collection( engine, "c:\ttf\sample.ttc", 1, - &face ); - if ( error ) { ...error... } - - NOTE 1: - - If the file isn't a collection, `fontIndex' must be zero. - Otherwise, an error will be returned. - - NOTE 2: - - `TT_Text' is usually defined as `char' by a typedef - declaration. It may be a 16-bit quantity (or even wider) for - some operating systems; see ttconfig.h for details. - - .................................................................. - - TT_Set_Raster_Gray_Palette( TT_Engine engine, - TT_Byte* palette ); - - Sets the gray-level palette for an engine. The palette is used - to create pixmaps through the TT_Get_Glyph_Pixmap() function. - It is an array of five bytes, following the convention: - - palette[0] = background (white) - palette[1] = light - palette[2] = medium - palette[3] = dark - palette[4] = foreground (black) - - .................................................................. - - TT_Get_Face_Properties( TT_Face face, - TT_Face_Properties* properties ); - - Returns the `face' object's `*properties'. This structure - contains various data like the total number of glyphs and - pointers to some mandatory TrueType tables. - - See the definition of TT_Face_Properties in section I for more - details. - - Note that since version 1.3, FreeType supports fonts with no - OS/2 table, like many old Mac fonts. See the definition of - TT_OS2 for more details. - - .................................................................. - - TT_Get_Face_Metrics( TT_Face face, - TT_UShort firstGlyph, - TT_UShort lastGlyph, - TT_Short* leftBearings, - TT_UShort* widths, - TT_Short* topBearings, - TT_UShort* heights ); - - This function returns the original horizontal AND vertical - metrics for a given face `face' and a given glyph range specified - by `firstGlyph' and `lastGlyph' as found in the `hmtx' and `vmtx' - tables. These are the glyphs' left-side bearings (in - `leftBearings') and horizontal advance widths (in `widths'), as - well as top-side bearings (in `topBearings') and vertical advance - heights (in `heights'). If you aren't interested in any of the - metrics fields, simply set its value to NULL. - - All are expressed in font units, a.k.a. EM units. - - The metrics arrays must be allocated by the client program. - - IMPORTANT NOTE: - - As vertical metrics are optional in a TrueType font, this - function will return an error (TT_Err_No_Vertical_Data) if this - function is called on such a face with non-NULL `topBearings' - or `heights' arguments. - - If a font has no vertical data, the `vertical' field in its - properties structure is set to NULL. - - .................................................................. - - TT_Set_Face_Pointer( TT_Face face, - void* data ); - - For convenience purposes, each face object has a `generic' - pointer which value is unused by the engine, but that can be set - freely by client applications through this function. - - Do what you want with it; it is here to give you a chance to - link a face object to your own structures and data. - - .................................................................. - - void* TT_Get_Face_Pointer( TT_Face face ); - ^^^^ - Returns a face object's generic pointer. See - TT_Set_Face_Pointer() above. - - .................................................................. - - TT_Flush_Face( TT_Face face ); - - Closes a given face object's file handler or descriptor. This - is useful to save system resources if your application opens - dozens or even hundreds of fonts. The face object is still - valid, and its file will be re-opened automatically on the next - request which requires disk access. - - .................................................................. - - TT_Close_Face( TT_Face face ); - - Closes a given `face' object. This function will also destroy - all the face's child instances. The face's glyphs will not be - destroyed, however. - - .................................................................. - - TT_New_Instance( TT_Face face, - TT_Instance* instance ); - - Creates a new instance object related to the `face' object. A - handle to the newly created instance is returned in `instance'. - - The default instance resolution is 96dpi in both vertical and - horizontal direction; the default point size is 10pt. - - .................................................................. - - TT_Set_Instance_Resolutions( TT_Instance instance, - TT_UShort xResolution, - TT_UShort yResolution ); - - Sets the target device resolutions for a given instance. The - values are expressed in dots per inch (dpi). A value of 96dpi - is typical for an SVGA display, 72dpi for a Macintosh one, and - 300 to 6000dpi for printers. Default value (before a call to - this function) is 96dpi. - - .................................................................. - - TT_Set_Instance_CharSize( TT_Instance instance, - TT_F26Dot6 charsize ); - - Sets the point size for a given instance. The size is expressed - in fractional (26.6) `points', where 1 point = 1/72 inch. The - default value is 10pt (before a call to this function). - - For example, to use a char size of 12pt, call the function with: - - TT_Set_Instance_CharSize( instance, 12 * 64 ); - - Fractional point sizes are thus possible. - - .................................................................. - - TT_Set_Instance_CharSizes( TT_Instance instance, - TT_F26Dot6 charWidth, - TT_F26Dot6 charHeight ); - - Sets an instance's glyph width and height independently in - fractional (26.6) points. Similar to Set_Instance_CharSize() - with the exception that the horizontal and vertical glyph - dimensions can differ. - - .................................................................. - - TT_Set_Instance_PixelSizes( TT_Instance instance, - TT_UShort pixelWidth, - TT_UShort pixelHeight, - TT_F26Dot6 pointSize ); - - This function can be used to specify directly the pixel sizes - and point size of a given instance, independently of device - resolutions. This is not the recommended way to do it, but can - be used for debugging or simplicity in some special cases. - - Note that you _must_ provide a point size! - - .................................................................. - - TT_Set_Instance_Transform_Flags( TT_Instance instance, - TT_Bool rotated, - TT_Bool stretched ); - - Sets the transform flags for a given instance. These flags are - passed to the interpreter each time a glyph is loaded within the - instance. Their role is to notify the glyph hinting mechanism - that the resulting glyph will be transformed in a special way. - Setting one of these flags to true usually disables hinting, - though this behaviour varies with each font file. - - NOTE: - - The glyph loader doesn't perform the rotation or the - stretching automatically; this must be done explicitly by the - client application. Use the function TT_Transform_Outline() - for that purpose. - - .................................................................. - - TT_Get_Instance_Metrics( TT_Instance instance, - TT_Instance_Metrics* imetrics ); - - This call returns a given instance's current metrics. They are - returned in the `imetrics' structure, which contains, among - other things, the current point size, ppem, and device - resolution (horizontal and vertical). - - .................................................................. - - TT_Set_Instance_Pointer( TT_Instance instance, - void* data ); - - For convenience purposes, each instance object has a `generic' - pointer which value is unused by the engine, but that can be set - freely by client applications through this function. - - Do what you want with it, it is here to give you a chance to - link a face object to your own structures and data. - - .................................................................. - - void* TT_Get_Instance_Pointer( TT_Instance instance ) - ^^^^ - - This function returns an instance object's generic pointer set - through TT_Set_Instance_Pointer(). - - .................................................................. - - TT_Done_Instance( TT_Instance instance ); - - Closes a given instance object, destroying its associated data. - Note that this is performed automatically when a face is closed - on all its child instances. However, explicit deallocation can - help in freeing the memory used by the application earlier. - - .................................................................. - - TT_New_Glyph( TT_Face face, - TT_Glyph* glyph ); - - Creates a new glyph container for the glyphs of the font - described by the `face' handle. A pointer to the container is - returned in `glyph'. The face is said to be the glyph's parent. - - NOTE: - - A glyph is destroyed with its parent face object. However, it - is possible to delete it explicitly with TT_Done_Glyph(). - - .................................................................. - - TT_Done_Glyph( TT_Glyph glyph ); - - Discards a glyph container. This is also done automatically for - all glyphs when closing its parent face object. - - .................................................................. - - TT_Load_Glyph( TT_Instance instance, - TT_Glyph glyph, - TT_UShort glyphIndex, - TT_UShort loadFlags ); - - Loads and processes (scales and/or hints) a glyph at a given - `instance' into the `glyph' container. - - Note that `glyph' and `instance' must have the _same_ parent - face object, otherwise an error message will be returned. - - `glyph_index' is the glyph's index as found in the TrueType - font. It is _not_ a character code (see the charmap functions - below). - - `load_flags' is an integer that specifies which operations are - to be performed on the loaded glyph. The following values/bits - are used: - - TTLOAD_SCALE_GLYPH - - Indicates that the glyph must be scaled to the instance's - resolution. The pixel coordinates returned in the glyph - outline structure (see below) are then expressed in - fractional pixels represented in the 26.6 fixed point - floating format (F26Dot6). - - If scaling is disabled, the coordinates returned in the - outline structure are integer font units, also called - `FUnits' by the TrueType specification. - - TTLOAD_HINT_GLYPH - - This flag is only valid when scaling is on. It informs the - loader that the glyph must be hinted (i.e., grid-fitted for - optimal display). Note that hinting will occur only if the - instance's transformations and metrics allow it (for - example, most font programs disable hinting automatically in - case of rotation or stretching). - - When loading a hinted glyph, the metrics computed by the - loader, including the bounding box, will also be - grid-fitted. - - TTLOAD_PEDANTIC - - Starting with FreeType version 1.3, the bytecode interpreter - can ignore even more errors (like out-of-bound array - accesses). Using this flag it is possible to force TrueType - compliant interpretation of font programs. - - TTLOAD_IGNORE_GLOBAL_ADVANCE_WIDTH - - A flag to handle monospaced fonts with an incorrect global - advance width in the `hhea' table. If set, the actual - advance width value of a particular glyph will be used; if - unset, the advance widths for all glyphs are forced to be - equal to the global value. - - - NOTE: - - You can also use the constant TTLOAD_DEFAULT, which is simply - the union of TTLOAD_SCALE_GLYPH and TTLOAD_HINT_GLYPH for most - `typical' loads. - - .................................................................. - - TT_Get_Glyph_Outline( TT_Glyph glyph, - TT_Outline* outline ); - - This call returns the glyph's `outline'. This is a simple - structure which contains pointers to the data used to describe - an outline to the rasterizer. See the definition of - TT_Outline in section I. - - .................................................................. - - TT_Get_Glyph_Metrics( TT_Glyph glyph, - TT_Glyph_Metrics* metrics ); - - Extracts the glyph's metrics and copies them to the `*metrics' - structure. Its format is described in section I. - - If the glyph has been loaded without scaling, the values are - expressed in FUnits (integers relative to the original font grid - called the EM Square). - - If the glyph has been loaded _with_ scaling, which is the - default, the values are expressed in fractional pixels in 26.6 - fixed point float format (F26Dot6; 1 unit = 1/64th of a pixel). - - If the glyph has been loaded with hinting, the metrics are also - grid-fitted, including the bounding box. To get the un-fitted - bbox, call TT_Get_Outline_BBox() on the glyph's outline. - - NOTE: - - BBox fitting occurs according to the following scheme: - - #define FLOOR( x ) ( (x) & -64 ) - #define CEILING( x ) ( ( (x) + 63 ) & -64 ) - - xMin = FLOOR( xMin ); - yMin = FLOOR( yMin ); - xMax = CEILING( xMax ); - yMax = CEILING( yMax ); - - This means that the outline's width and height in pixels can be - computed simply from the fitted bbox, namely - - (xMax-xMin)/64 and (yMax-yMin)/64 - - .................................................................. - - TT_Get_Glyph_Big_Metrics( TT_Glyph glyph, - TT_Big_Glyph_Metrics* metrics ); - - Extracts the glyph's big metrics and copies them to the - `*metrics' structure. Its format is described in section I. - - If the glyph has been loaded without scaling, the values are - expressed in FUnits (integers relative to the original font grid - called the EM Square). - - If the glyph has been loaded _with_ scaling, which is the - default, the values are expressed in fractional pixels in 26.6 - fixed point float format (F26Dot6; 1 unit = 1/64th of a pixel). - - If the glyph has been loaded with hinting, the metrics are also - grid-fitted, including the bounding box. To get the un-fitted - bbox, just call TT_Get_Outline_BBox() on the glyph's outline. - - NOTE 1: - - BBox fitting occurs according to the following scheme: - - #define FLOOR( x ) ( (x) & -64 ) - #define CEILING( x ) ( ( (x) + 63 ) & -64 ) - - xMin = FLOOR( xMin ); - yMin = FLOOR( yMin ); - xMax = CEILING( xMax ); - yMax = CEILING( yMax ); - - This means that the outline's width and height in pixels can be - computed simply from the fitted bounding box, namely - - (xMax-xMin)/64 and (yMax-yMin)/64 - - NOTE 2: - - The vertBearingX value in `metrics' cannot be extracted for - outline glyphs -- it is defined for embedded bitmaps only. - Instead, it is set to (xMin-xMax)/2; this will center the - bounding box on the vertical `baseline'. - - .................................................................. - - TT_Get_Glyph_Bitmap( TT_Glyph glyph, - TT_Raster_Map* bitmap, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ); - - This call converts the vectorial glyph representation contained - in the object handled by `glyph' into a bitmap. - - The target bitmap is described by the `bitmap' pointer. - Clipping will be done if necessary. You can also specify an - offset to be applied before the scan-line conversion; `xOffset' - and `yOffset' must be expressed in fractional pixels (where - 1 unit = 1/64th pixel). - - NOTE 1: - - Choosing non integer pixel offsets, i.e., values of `xOffset' - and `yOffset' that are not multiples of 64, will ruin the - hinting performed by the interpreter, and result in bad - rendering at small sizes. - - NOTE 2: - - The glyph's point coordinates must be scaled before calling - this function. Never call this function with a glyph that - were loaded with no scaling! - - NOTE 3: - - FreeType always shifts the glyph horizontally so that the left - side bearing is equal to the left side of the bounding box. - - .................................................................. - - TT_Get_Glyph_Pixmap( TT_Glyph glyph, - TT_Raster_Map* pixmap, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ); - - This call converts the vectorial glyph representation contained - in the object handled by `glyph' into a pixmap (i.e., an - 8-bit/pixel map). The result is an anti-aliased version of the - glyph (`anti-aliasing' is also known as `font-smoothing'). - - The target pixmap is described by the `pixmap' pointer. Note - that its width _must_ be a multiple of 4. For the definition - and description of a pixmap see Section I. - - As with TT_Get_Glyph_Bitmap(), you can specify offsets to be - applied before the rendering (`xOffset' and `yOffset' must be - expressed in fractional pixel coordinates). - - NOTE 1: - - You don't need to supply a temporary bitmap for the - anti-aliaser. The rasterizer uses its own scheme to optimize - memory usage. - - NOTE 2: - - The glyph's point coordinates must be scaled before calling - this function. This means that you should never call it with - a glyph which has been loaded without scaling! - - NOTE 3: - - The pixmap passed to this function should always be EMPTY - (i.e., filled with zero bytes) before the call. If not, - garbage will accumulate! - - NOTE 4: - - FreeType always shifts the glyph horizontally so that the left - side bearing is equal to the left side of the bounding box. - - .................................................................. - - TT_New_Outline( TT_UShort numPoints, - TT_UShort numContours, - TT_Outline* outline ); - - Creates a new outline object. This function creates the arrays - necessary to hold `numPoints' points and `numContours' contours, - and set `outline's pointers to them. - - The new outline owns the arrays, and they will be destroyed with - it through TT_Done_Outline(). - - NOTE 1: - - Outlines created with this function are called `user' - outlines, in contrast with the outlines returned by - TT_Get_Glyph_Outline(), which fields refer to the data - contained within a glyph object (i.e., these outlines do not - own the arrays they refer to). - - NOTE 2: - - User outlines aren't tracked by the engine, which means they - are not destroyed by a TT_Done_FreeType(). You have to - explicitly discard them through TT_Done_Outline() to avoid - memory leaks. - - .................................................................. - - TT_Done_Outline( TT_Outline* outline ); - - Deletes an outline's data. Note that you need not destroy the - outlines returned by TT_Get_Glyph_Outline(), only those created - by TT_New_Outline(). - - .................................................................. - - TT_Copy_Outline( TT_Outline* source, - TT_Outline* target ); - - Copies the content of the `source' outline into the content of - the `target' outline. The two outlines must have been created - with the same dimensions (num_points and num_contours), - otherwise this function will return an error code. - - .................................................................. - - void TT_Transform_Outline( TT_Glyph_Outline* outline, - ^^^^ TT_Matrix* matrix ); - - Applies a simple transformation matrix on a given outline. This - will multiply each point coordinate vector by a 2x2 matrix, - which coefficients are given in the 16.16 fixed float format. - - Rotation can be performed with this function. - - NOTE: - - This function takes an outline, and not a glyph handle, as a - parameter. This `feature' lets you apply transformations on - your own copies of glyphs. - - .................................................................. - - void TT_Translate_Outline( TT_Glyph_Outline* outline, - ^^^^ TT_Pos xOffset, - TT_Pos yOffset ); - - Applies a simple translation on a given outline. - - NOTE: - - This function takes an outline, and not a glyph handle, as a - parameter. This `feature' lets you apply translation to your - own copies of glyphs. - - .................................................................. - - TT_Get_Outline_Bitmap( TT_Outline* outline, - TT_Raster_Map* bitmap ); - - Renders an outline into a bitmap. The latter must be setup by - the user before the call (i.e., it is not created by this - function, instead it must be provided by the user). - - .................................................................. - - TT_Get_Outline_Pixmap( TT_Outline* outline, - TT_Raster_Map* pixmap ); - - Renders an outline into a pixmap. The latter must be setup by - the user before the call (i.e., it is not created by this - function, instead it must be provided by the user). - - NOTE: - - The pixmap passed to this function must always be EMPTY (i.e., - filled with zero bytes) before the call. Otherwise, garbage may - accumulate! - - .................................................................. - - TT_Get_Outline_BBox( TT_Outline* outline, - TT_BBox* bbox ); - - Returns an outline's bounding box in the `bbox' structure. Note - that the returned coordinates are not grid fitted! - - NOTE: - - The current release of FreeType (1.x) does compute the bounding - box for the outline's control points, and not the `exact' box - based on Bezier arcs extrema. Hence, the bbox returned by this - function may be slightly larger than necessary if the glyph - doesn't have control points at its extrema, or if it has been - rotated. - - .................................................................. - - void TT_Transform_Vector( TT_Pos* x, - ^^^^ TT_Pos* y, - TT_Matrix* matrix ); - - Applies a 2x2 matrix to a vector. - - .................................................................. - - int TT_Get_CharMapCount( TT_Face face ); - ^^^ - - Gets the number of character mappings present in the TrueType - file described by the `face' handle. Returns -1 if the handle - is invalid. - - IMPORTANT NOTE: ******** - - This function is deprecated. Get the number of character maps - from the `num_CharMaps' field in the structure returned by - TT_Get_Face_Property() instead. - - .................................................................. - - TT_Get_CharMap_ID( TT_Face face, - TT_UShort charmapIndex, - TT_UShort* platformID, - TT_UShort* encodingID ); - - Returns the platform ID and platform-specific encoding ID for - the charmap numbered `charmapIndex' in the `face' object. The - total number of character mapping tables can be found in the - `num_CharMaps' field in the structure returned by - TT_Get_Face_Property(). - - .................................................................. - - TT_Get_CharMap( TT_Face face, - TT_UShort charmapIndex, - TT_CharMap* charMap ); - - Returns a handle for the character map number `charmapIndex' of - `face'. The handle is placed in `*charMap' and can be used - later for fast lookup with the TT_Char_Index() API function. - - Charmap objects are automatically destroyed when their face - object is destroyed. - - .................................................................. - - TT_UShort TT_Char_Index( TT_CharMap charMap, - ^^^^^^^^^ TT_UShort charCode ); - - Applies a charMap to translate `charCode' into a glyph index - that can be used to load and address a glyph in the TrueType - file. In case of error, the undefined glyph (index 0) is - returned. - - The charmap handle can be obtained with TT_Get_CharMap(). - - .................................................................. - - int TT_Get_Name_Count( TT_Face face ); - ^^^ - - Gets the number of name strings found in a face's name table. - This function will return -1 if the face handle is invalid. - - IMPORTANT NOTE: ******** - - This function is deprecated. Get the number of name strings - from the `num_Names' field in the structure returned by - TT_Get_Face_Property() instead. - - .................................................................. - - TT_Get_Name_ID( TT_Face face, - TT_UShort nameIndex, - TT_UShort* platformID, - TT_UShort* encodingID, - TT_UShort* languageID, - TT_UShort* nameID ); - - Returns the ID of a given name string, indexed by the number - `nameIndex' in a given face. The name index ranges from 0 to - `num_names' minus one; this value can be found in the structure - returned by TT_Get_Face_Property(). - - Each string has a `platformID', `encodingID', `languageID' and - `nameID', as defined by the TrueType specification. - - The platformID is typically in the range [0,3]. Some font files - have unusual name table entries; these can be detected from - their platformID which is larger than 3. - - .................................................................. - - TT_Get_Name_String( TT_Face face, - TT_UShort nameIndex, - TT_String** stringPtr, - TT_UShort* length ); - - Returns a name string's address and length. Note that an - invalid name table entry always returns NULL for `stringPtr' and - zero for `length'. - - NOTE 1: - - The string belongs to the face object and should not be - written to or freed by the client application. - - NOTE 2: - - The library does not care about endianess here! If you are - using a little-endian machine and you have to interpret the - string bytes as 16-bit-wide characters (e.g. Unicode encoded), - you must byte-swap the data because 16-bit data is stored as - big-endian in TrueType fonts, and FreeType reads in the whole - name table bytewise. - - .................................................................. - - TT_Get_Font_Data( TT_face face, - TT_Long tag, - TT_Long offset, - void* buffer, - TT_Long* length ); - - Gets font or table data. Similar to the GetFontData() API of - the Windows world. You can use the macro MAKE_TT_TAG() to - generate TrueType table tags from character descriptions, like - - MAKE_TT_TAG( 'e', 'b', 'l', 'c' ) - - Use the value 0 instead for `tag' if you want to access the - whole font file. `offset' specifies the starting offset in the - table (or the offset in the file if tag == 0), `buffer' the - address of target buffer. - - Depending on the value of length, various actions are performed. - If `length' is NULL, the whole table will be loaded. An error - will be returned if `offset' is not 0. If `*length' is zero, - TT_Get_Font_Data() exits immediately, returning only the length - of the given table (in the variable `length'), or of the font - file, depending on the value of `tag'. Finally, if `*length' is - not zero, the next `length' bytes of the table (resp. the font) - are loaded into an array pointed to by `buffer', starting at - offset `offset'. Note that the `buffer' array must be large - enough to hold `length' bytes. - - --------------------------------------------------------------------- --------------------------------------------------------------------- - - - -III. Error Messages -=================== - - Most functions return an error code, typed to TT_Error. A return - value of zero indicates no error. The error values are defined in - the file `freetype.h'. In the following table, the prefix - `TT_Err_' is omitted, e.g. `Ok' -> `TT_Err_Ok'. - - - Error Unprefixed Error - Code Macro Name Description - ------------------------------------------------------------------ - - 0x0000 Ok Successful function call. - Always 0! - - ----------------- high-level API error codes --------------------- - - The following error codes are returned by the high-level API to - indicate an invalid client request. - - 0x0001 Invalid_Face_Handle An invalid face object handle was - passed to an API function. - - 0x0002 Invalid_Instance_Handle An invalid instance object handle - was passed to an API function. - - 0x0003 Invalid_Glyph_Handle An invalid glyph container handle - was passed to an API function. - - 0x0004 Invalid_CharMap_Handle An invalid charmap handle was - passed to an API function. - - 0x0005 Invalid_Result_Address An output parameter (a result) - was given a NULL address in an - API call. - - 0x0006 Invalid_Glyph_Index An invalid glyph index was passed - to an API function. - - 0x0007 Invalid_Argument An invalid argument was passed to - an API function. Usually, this - means a simple out-of-bounds - error. - - 0x0008 Could_Not_Open_File The pathname passed doesn't point - to an existing or accessible - file. - - 0x0009 File_Is_Not_Collection Returned by TT_Open_Collection - while trying to open a file which - isn't a collection. - - 0x000A Table_Missing The requested TrueType table is - missing in the font file. - - 0x000B Invalid_Horiz_Metrics The font's HMTX table is invalid. - Denotes a broken font. - - 0x000C Invalid_CharMap_Format A font's charmap entry has an - invalid format. Some other - entries may be valid though. - - 0x000D Invalid_PPem Invalid PPem values specified, - i.e., you are accessing a scaled - glyph without having called - TT_Set_Instance_CharSize() or - TT_Set_Instance_PixelSizes(). - - 0x0010 Invalid_File_Format The file isn't a TrueType font or - collection. - - 0x0020 Invalid_Engine An invalid engine handle was - passed to one of the API - functions. - - 0x0021 Too_Many_Extensions The client application is trying - to initialize too many - extensions. The default max - extensions number is 8 (this - value can be changed at compile - time). - - 0x0022 Extensions_Unsupported This build of the engine doesn't - support extensions. - - 0x0023 Invalid_Extension_Id This error indicates that the - client application is trying to - use an extension that has not - been initialized yet. - - 0x0080 Max_Profile_Missing The max profile table is missing. - => broken font file - - 0x0081 Header_Table_Missing The font header table is missing. - => broken font file - - 0x0082 Horiz_Header_Missing The horizontal header is missing. - => broken font file - - 0x0083 Locations_Missing The locations table is missing. - => broken font file - - 0x0084 Name_Table_Missing The name table is missing. - => broken font file - - 0x0085 CMap_Table_Missing The character encoding tables are - missing. - => broken font file - - 0x0086 Hmtx_Table_Missing The hmtx table is missing. - => broken font file - - 0x0087 OS2_Table_Missing The OS/2 table is missing. - Mac fonts doesn't have it. - - 0x0088 Post_Table_Missing The PostScript table is missing. - => broken font file - - 0x0089 Glyf_Table_Missing The glyph table is missing. - => broken font file - - ----------------- memory component error codes ------------------- - - 0x0100 Out_Of_Memory An operation couldn't be - performed due to memory - exhaustion. - - ----------------- file component error codes --------------------- - - 0x0200 Invalid_File_Offset Trying to seek to an invalid - portion of the font file. - Denotes a broken file. - - 0x0201 Invalid_File_Read Trying to read an invalid portion - of the font file. Denotes a - broken file. - - 0x0202 Invalid_Frame_Access Trying to frame an invalid - portion of the font file. - Denotes a broken file. - - ----------------- glyph loader error codes ----------------------- - - These errors are produced by the glyph loader. They denote an - invalid glyph record within the font file. - - 0x0300 Too_Many_Points The glyph has too many points to - be valid for its font file. - - 0x0301 Too_Many_Contours The glyph has too many contours - to be valid for its font file. - - 0x0302 Invalid_Composite_Glyph A composite glyph's description - is broken. - - 0x0303 Too_Many_Ins The glyph has too many - instructions to be valid for its - font file. - - ----------------- byte-code interpreter error codes -------------- - - These error codes are produced by the TrueType byte-code - interpreter. They usually indicate a broken font file or a broken - glyph within a font. - - 0x0400 Invalid_Opcode Found an invalid opcode in a - TrueType byte-code stream. - - 0x0401 Too_Few_Arguments An opcode was invoked with too - few arguments on the stack. - - 0x0402 Stack_Overflow The interpreter's stack has been - filled up and operations can't - continue. - - 0x0403 Code_Overflow The byte-code stream runs out of - its valid bounds. - - 0x0404 Bad_Argument A function received an invalid - argument. - - 0x0405 Divide_By_Zero A division by 0 operation was - queried by the interpreter - program. - - 0x0406 Storage_Overflow The program tried to access data - outside of its storage area. - - 0x0407 Cvt_Overflow The program tried to access data - outside of its control value - table. - - 0x0408 Invalid_Reference The program tried to reference an - invalid point, zone, or contour. - - 0x0409 Invalid_Distance The program tried to use an - invalid distance. - - 0x040A Interpolate_Twilight The program tried to interpolate - twilight points. - - 0x040B Debug_Opcode The now invalid `debug' opcode - was found in the byte-code - stream. - - 0x040C ENDF_In_Exec_Stream A misplaced ENDF was encountered - in the byte-code stream. - - 0x040D Out_Of_CodeRanges The program tried to allocate too - much code ranges (this is really - an engine internal error that - should never happen). - - 0x040E Nested_DEFS Nested function definitions - encountered. - - 0x040F Invalid_CodeRange The program tried to access an - invalid code range. - - 0x0410 Invalid_Displacement The program tried to use an - invalid displacement. - - 0x0411 Execution_Too_Long In order to get rid of `poison' - fonts, the interpreter produces - this error if more than one - million opcodes have been - interpreted in a single glyph - program. This detects infinite - loops softly. - - ----------------- internal failure error codes ------------------- - - These error codes are produced if an incoherent library state has - been detected. All of these reflect a severe bug in the engine - (or a severe memory corruption due to massive overwrites by your - application into the library's data)! - - If you do encounter a font that makes one of the test programs - produce such an error, please report it! - - 0x0500 Nested_Frame_Access - 0x0501 Invalid_Cache_List - 0x0502 Could_Not_Find_Context - 0x0503 Unlisted_Object - - ----------------- scan-line converter error codes ---------------- - - These error codes are produced by the raster component. They - indicate that an outline structure was incoherently set up, or - that you are trying to render a horribly complex glyph. - - They should be _extremely_ rare, however. - - 0x0600 Raster_Pool_Overflow Render pool overflow. This should - never happen in this release. - - 0x0601 Raster_Negative_Height A negative height was produced. - - 0x0602 Raster_Invalid_Value The outline data wasn't set - properly. Check that: - points >= endContours[contours] - - 0x0603 Raster_Not_Initialized You did not call - TT_Init_FreeType()! - - ---- end of apiref.txt --- Index: xc/extras/FreeType/docs/apirefx.txt diff -u xc/extras/FreeType/docs/apirefx.txt:1.1.1.1 xc/extras/FreeType/docs/apirefx.txt:removed --- xc/extras/FreeType/docs/apirefx.txt:1.1.1.1 Sat Feb 12 23:55:25 2000 +++ xc/extras/FreeType/docs/apirefx.txt Wed Mar 16 20:59:37 2005 @@ -1,864 +0,0 @@ - The FreeType Engine - - Extension Library Reference - - - ----------------------------------- - - - Table of Contents: - - I. Engine extensions - 1. kerning (ftxkern) - 2. PostScript names (ftxpost) - 3. TrueType Open (ftxopen) - a. The `BASE' table (baseline data) - b. The `GDEF' table (glyph definitions) - c. The `GPOS' table (glyph positions) - d. The `GSUB' table (glyph substitions) - e. The `JSTF' table (justification data) - f. auxiliary functions - 4. embedded bitmaps (ftxsbit) - - II. API extensions - 1. cmap iteration (ftxcmap) - 2. internationalized error messages (ftxerr18) - 3. access to the `gasp' table (ftxgasp) - 4. fast retrieval of glyph widths and heights (ftxwidth) - - III. Error codes - - - -------------------- - - -Please read the file `user.txt' for an introduction into FreeType's -extension mechanism and the difference between engine and API -extensions. - - -I. Engine extensions -==================== - -To use engine extensions you have to compile the library with the -macro TT_CONFIG_OPTION_EXTEND_ENGINE. By default, this macro is set -and all engine extensions are linked to the FreeType library. - - - 1. kerning (ftxkern) - -------------------- - - TT_Init_Kerning_Extension( TT_Engine engine ) - - Initializes the kerning extension for a given engine. This must - be called just after the engine creation, and before any face - object allocation. Example: - - TT_Init_FreeType( &engine ); - TT_Init_Kerning_Extension( engine ); - - .................................................................. - - TT_Get_Kerning_Directory( TT_Face face, - TT_Kerning* directory ) - - Queries the kerning directory found in a face object. If no - kerning table is found in the TrueType file, the error - TT_Err_Table_Is_Missing will be returned. - - You can access the subtables through the pointers of the - directory. However, by default, the directory is only loaded if - a face object is created. You must load the subtables that - interest you with a call to TT_Load_Kerning_Table(). - - The layout of all kerning structures is defined in the file - `lib/extend/ftxkern.h'. Formats 0 and 2 (as defined in the - Microsoft TrueType specification) are exposed by this API. - - NOTE: - - This function must be called after the kerning extension has - been initialized. - - .................................................................. - - TT_Load_Kerning_Table( TT_Face face, - TT_UShort kernIndex ) - - Loads the kerning subtable number `kern_index' into memory. The - subtable can be accessed through the pointers provided by the - kerning directory, obtained from a call to the function - TT_Get_Kerning_Directory(). - - Note that the interpretation of the kerning data is left to the - client application. Read the TrueType specification for more - information on kerning encoding. - - NOTE 1: - - This function must be called after the kerning extension were - initialized. - - NOTE 2: - - An example can be found in the file `test/ftstrtto.c'. - - -==================================================================== - - - 2. PostScript names (ftxpost) - ----------------------------- - - TT_Init_Post_Extension( TT_Engine engine ) - - Initializes the PostScript name extension to load the PostScript - glyph names given in the `post' table. This must be called just - after creation of the engine, and before any face object - allocation. See description of TT_Get_PS_Name() for an example. - - .................................................................. - - TT_Load_PS_Names( TT_Face face, - TT_Post* post ) - - Loads the PostScript glyph names into memory. This must be done - before TT_Get_PS_Name() is called. In case of error, either - TT_Err_Invalid_Post_Table or TT_Err_Invalid_Post_Table_Format is - returned. See description of TT_Get_PS_Name() for an example. - - .................................................................. - - TT_Get_PS_Name( TT_Face face, - TT_UShort index, - TT_String** PSname ) - - Get the PostScript glyph name for a given glyph index. A - pointer to the name is returned in `PSname'. Example: - - ... - TT_Post post; - char* PSname; - - ... - TT_Init_Post_Extension( engine ); - TT_Load_PS_Names( face, &post ); - - ... - TT_Get_PS_Name( face, index, &PSname ); - - - NOTE: - - You must not alter the PostScript glyph name string returned - in `PSname'. - - -==================================================================== - - - 3. TrueType Open (ftxopen) - -------------------------- - - Please note that TrueType Open specific error codes have the - prefix `TTO_Err_' instead of `TT_Err_'. - - a. The `BASE' table (baseline data) - - Not yet supported. - - b. The `GDEF' table (glyph definitions) - - TT_Init_GDEF_Extension( TT_Engine engine ) - - Initializes the GDEF extension to load the glyph definition - data given in the `GDEF' table. This must be called just - after creation of the engine, and before any face object - allocation. See the file `ftstrtto.c' for an example. - - ................................................................ - - TT_Load_GDEF_Table( TT_Face face, - TTO_GDEFHeader* gdef ) - - Loads the GDEF table into `gdef' for a given face `face'. - This must be done before any queries about glyph properties - with TT_GSUB_Get_Property(). Returns TT_Err_Table_Missing if - there is no GDEF table in the font. - - ................................................................ - - TT_GDEF_Get_Glyph_Property( TTO_GDEFHeader* gdef, - TT_UShort glyphID, - TT_UShort* property ) - - Use this function to get glyph properties in the variable - `property' for the glyph with index `glyphID' stored in the - `gdef' table. This data is essential for many fonts to - correctly apply contextual substitution (both GSUB and GPOS). - As a special case, zero is assigned to `property' if `gdef' is - NULL or the glyph has no special glyph property assigned to - it. The other return values of `property' are TTO_BASE, - TTO_LIGATURE, TTO_MARK, and TTO_COMPONENT; you can directly - apply the `LookupFlag' mask to check for certain properties: - - TTO_GDEFHeader* gdef; - TTO_Lookup* lo; - TT_UShort glyph_ID; - TT_UShort p; - - - TT_GDEF_Get_Property( gdef, glyph_ID, &p ); - - if ( p & lo->LookupFlag ) - return TTO_Err_Not_Covered; - - Usually, you don't need to take care of glyph properties by - yourself since TT_GSUB_Apply_String() will do this for you by - calling TT_GDEF_Get_Property(). - - Some fonts need GDEF-like data even if no GDEF table is - provided (for example, the Arabic script needs information - which glyphs are base glyphs and which are mark glyphs). In - such cases, you should use TT_GDEF_Build_ClassDefinition() to - build the necessary structures so that TT_GDEF_Get_Property() - returns meaningful values. - - See also TT_Load_GSUB_Table() and TT_Load_GPOS_Table(). - - ................................................................ - - TT_GDEF_Build_ClassDefinition( TTO_GDEFHeader* gdef, - TT_UShort num_glyphs, - TT_UShort glyph_count, - TT_UShort* glyph_array, - TT_UShort* class_array ) - - Fills a `gdef' structure with data to make - TT_GDEF_Get_Property() work in case no GDEF table is - available. `num_glyphs' is the number of glyphs in the font. - - `glyph_count' is the number of glyphs resp. class values (as - specified in the GDEF specification) given in the arrays - `glyph_array' and `class_array', respectively. The glyph - indices in `glyph_array' must be all different and sorted in - ascending order; the function expects that glyph index - `glyph_array[n]' has its class value in `class_array[n]'. - - Note that mark attach classes as defined in OpenType 1.2 are - not supported for constructed GDEF tables. - - See `arabic.c' for an example. - - - c. The `GPOS' table (glyph positions) - - Not yet supported. - - - d. The `GSUB' table (glyph substitions) - - For glyph substitution, a string object of type TTO_GSUB_String - is used. The field `length' holds the length of the string, - `pos' points to the actual position in the glyph string `string' - (for input strings) resp. the position where the substituted - glyphs should be placed at (for output strings). - - Within the `properties' array (which must always have the same - length as `string' if set), you can define properties for glyphs - -- `string[n]' is associated with `properties[n]'. The idea is - that some features apply to specific glyphs only. As an - example, the `fina' feature for Arabic applies only to glyphs - which appear at the end of a word (strictly speaking, this - feature is used only for glyphs which have a `final' property; - such glyphs can occur in the middle of a word also under certain - circumstances which is dependent on Arabic script rules). The - relationship between properties and features can be set up with - the function TT_GSUB_Add_Feature(). If `properties' is set to - NULL, all selected features apply to all glyphs in the given - string object. If `properties' is non-NULL, the elements of the - array are treated as bit fields. A set flag means that the - corresponding feature (as set with the TT_GSUB_Add_Feature() - function) should not be applied to the particular glyph. As a - consequence, a zero value for these 16 bits means that all - features should be applied, and a value of 0xFFFF implies that - no feature at all should be used for the glyph. - - The field `allocated' is for internal use only and must not be - modified. If its value is larger than zero, you should use - free() to deallocate the memory used by `string' (and - `properties' if set) in case you want to destroy a - TTO_GSUB_String object (memory for `string' and `properties' is - allocated automatically e.g. by TT_GSUB_Apply_String() for - output string objects). - - struct TTO_GSUB_String_ - { - TT_ULong length; - TT_ULong pos; - TT_ULong allocated; - TT_UShort* string; - TT_UShort* properties; - }; - - typedef struct TTO_GSUB_String_ TTO_GSUB_String; - - Note that the `string' field must contain glyph indices, not - character codes. - - For initializing an input string object, you should set the - `length', `string', and `properties' fields (the last one only - if necessary) to appropriate values. `pos' has to be set to the - position where the substitution lookups should start (usually - zero). The `allocated' field will be ignored. - - For initializing an output string object, all fields (except - `length' which will be ignored) must be set to zero. If you - want to reuse the object, set `pos' to the position where the - substituted glyphs should be placed at (usually zero), but don't - touch the `allocated', `string', and `properties' fields. - - ................................................................ - - TT_Init_GSUB_Extension( TT_Engine engine ) - - Initializes the GSUB extension to load the glyph substitution - data given in the `GSUB' table. This must be called just - after creation of the engine, and before any face object - allocation. See the files `ftstrtto.c' and `ftdump.c' for - detailed examples. - - ................................................................ - - TT_Load_GSUB_Table( TT_Face face, - TTO_GSUBHeader* gsub, - TTO_GDEFHeader* gdef ) - - Loads the GSUB table into `gsub' for a given face `face'. - This must be done before any queries about or selection of - scripts, languages, and features. Returns - TT_Err_Table_Missing if there is no GSUB table in the font. - - `gdef' should contain a pointer to an associated GDEF table, - either a native one loaded with TT_Load_GDEF_Table() or - emulated with TT_GDEF_Build_ClassDefinition(). If `gdef' is - set to NULL, no GDEF data will be used. - - ................................................................ - - TT_GSUB_Select_Script( TTO_GSUBHeader* gsub, - TT_ULong script_tag, - TT_UShort* script_index ) - - This function sets the script index of a given script tag - `script_tag' in the variable `script_index' for the GSUB table - `gsub'. Returns TTO_Err_Not_Covered if the script tag cannot - be found. The available script tags can be queried with the - function TT_GSUB_Query_Scripts(). - - ................................................................ - - TT_GSUB_Select_Language( TTO_GSUBHeader* gsub, - TT_ULong language_tag, - TT_UShort script_index, - TT_UShort* language_index, - TT_UShort* req_feature_index ) - - This function sets the language index of a given language tag - `language_tag' and script index `script_index' in the variable - `language_index' for the GSUB table `gsub'. Returns - TTO_Err_Not_Covered if the language tag cannot be found. The - available language tags can be queried with the function - TT_GSUB_Query_Languages(). - - Additionally, the index of the required feature for this - language system is returned in `req_feature_index'; it must be - later registered for use with TT_GSUB_Add_Feature(). - - ................................................................ - - TT_GSUB_Select_Feature( TTO_GSUBHeader* gsub, - TT_ULong feature_tag, - TT_UShort script_index, - TT_UShort language_index, - TT_UShort* feature_index ) - - This function sets the feature index of a feature tag - `feature_tag', script index `script_index', and language index - `language_index' in the variable `feature_index' for the GSUB - table `gsub'. Returns TTO_Err_Not_Covered if the feature tag - cannot be found. The available feature tags can be queried - with the function TT_GSUB_Query_Features(). Setting - language_index to 0xFFFF selects the default language system. - - ................................................................ - - TT_GSUB_Query_Scripts( TTO_GSUBHeader* gsub, - TT_ULong** script_tag_list ) - - Returns the available script tags for a given GSUB table - `gsub' in the array `script_tag_list'. The array can be later - deallocated with free(). - - ................................................................ - - TT_GSUB_Query_Languages( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_ULong** language_tag_list ) - - Returns the available language tags for a given GSUB table - `gsub' and script index `script_index' in the array - `language_tag_list'. The array can be later deallocated with - free(). - - ................................................................ - - TT_GSUB_Query_Features( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_UShort language_index, - TT_ULong** feature_tag_list ) - - Returns the available feature tags for a given GSUB table - `gsub', script index `script_index', and language index - `language_index' in the array `feature_tag_list'. If language - index is set to 0xFFFF, the values for the default language - system are returned. The array can be later deallocated with - free(). - - ................................................................ - - TT_GSUB_Add_Feature( TTO_GSUBHeader* gsub, - TT_UShort feature_index, - TT_UShort property ) - - To prepare a call to TT_GSUB_Apply_String() which should - process a given feature with index `feature_index' and the - property `property', you must use this function. Its task is - to mark the lookup tables used by the feature for further - processing. - - `property' defines a relationship between the input string - object and the specific feature. The client must handle this - variable as a bit field, i.e., up to 16 user properties can be - defined. If `property' is set to ALL_GLYPHS (0xFFFF, the only - predefined value), or if the input string object has no set - bits in the `properties' field, the feature applies to all - glyphs. If bit `x' is set in `property', the feature applies - only to glyphs which have bit `x' not set in glyph's - `properties' field in the input string object. See - TT_GSUB_Apply_String() for an example. - - Returns TT_Err_Invalid_Argument in case of error. - - ................................................................ - - TT_GSUB_Clear_Features( TTO_GSUBHeader* gsub ) - - Clears the list of used features and properties. No lookup - tables will be processed. - - ................................................................ - - TT_GSUB_Register_Alternate_Function( TTO_GSUBHeader* gsub, - TTO_AltFunction alt, - void* data ) - - Installs a callback function to handle alternate - substitutions. `data' is a generic pointer to a user-defined - structure which will be completely ignored by the ftxopen - extension. `alt' is a function pointer defined as - - typedef TT_UShort - (*TTO_AltFunction)(TT_ULong pos, - TT_UShort glyphID, - TT_UShort num_alternates, - TT_UShort* alternates, - void* data ); - - If TT_GSUB_Apply_String() encounters an alternate lookup while - processing the input string, it will call the function `alt' - to find out which alternate glyph it should use. `pos' gives - the position in the string, `glyphID' the glyph ID of the - glyph to be replaced with an alternate glyph, and - `num_alternates' the number of alternate glyphs in the - `alternates' array. A pointer to the user-defined `data' - structure is also available. `alt' must return an index into - `alternates'. - - If `alt' is NULL or if this function isn't called at all, - TT_GSUB_Apply_String() will always use the first alternate - glyph. - - Please note that theoretically an alternate lookup can happen - during any other lookup! For example, a lookup chain like - - single subst -> alternate subst -> ligature subst - - *is* possible (albeit rather unlikely). Thus be warned that - `pos' does not necessarily reflect the position of a glyph to - be displayed at all, nor does `glyphID' specifies a glyph - which will be in the final output string. - - ................................................................ - - TT_GSUB_Apply_String( TTO_GSUBHeader* gsub, - TTO_GSUB_String* in, - TTO_GSUB_String* out ) - - This is the very function which handles glyph substitution - according to the features set up with TT_GSUB_Add_Feature(), - using both GSUB and GDEF data (if defined). Two - TTO_GSUB_String objects `in' and `out' (as described above) - are taken for input and output; after successful excecution, - the converted glyph string can been found in `out', and - `out.length' gives the actual length of the output string - (counted from the begin of the array). - - Example: - - /* We assume that the feature `xxxx' has index 5, and */ - /* feature `yyyy' has index 8, applying only to glyphs */ - /* with the property `FINAL_GLYPHS' set (0x1000 is an */ - /* ad-hoc value just for this example). */ - - /* The order of calls to TT_GSUB_Add_Feature() is not */ - /* significant. */ - - #define FINAL_GLYPHS 0x1000 - - TT_GSUB_Clear_Features( &gsub ); - TT_GSUB_Add_Feature( &gsub, 8, FINAL_GLYPHS ); - TT_GSUB_Add_Feature( &gsub, 5, ALL_GLYPHS ); - - TT_GSUB_Apply_String( &gsub, &in, &out ); - - You must initialize both `in' and `out' structures; allocation - necessary for the `out' object will be handled automatically. - - In case you don't register a function to handle alternate - substitutions (GSUB lookup 3), always the first alternate - glyph will be used. See TT_GSUB_Register_Alternate_Function() - above for more details. - - - e. The `JSTF' table (justification data) - - Not yet supported. - - - f. auxiliary functions - - TT_GSUB_Add_String( TTO_GSUB_String* in, - TT_UShort num_in, - TTO_GSUB_String* out, - TT_UShort num_out, - TT_UShort* data ) - - This function copies `num_out' elements from `data' to `out', - advancing the array pointer `in.pos' by `num_in' elements and - `out.pos' by `num_out' elements. If the string (resp. the - properties) array in `out' is empty or too small, it allocates - resp. reallocates the string (and properties) array. - Finally, it sets `out.length' equal to `out.pos'. - - The properties for all replaced glyphs are taken from the - glyph at position `in->pos'. - - TT_GSUB_Add_String() is normally used in - TT_GSUB_Apply_String(); you will need it for the special case - to skip some glyphs (i.e., copy glyphs directly from the `in' - to the `out' object), bypassing a possible GSUB substitution. - - Here an example which copies one glyph: - - TT_GSUB_Add_String( in, 1, - out, 1, - &in->string[in->pos] ); - - -==================================================================== - - - 4. embedded bitmaps (ftxsbit) - ----------------------------- - - TT_Init_SBit_Extension( TT_Engine engine ) - - Initializes the embedded bitmap extension to load the bitmap - glyphs given in the various sbit tables: `EBLC', `bloc', `EBDT', - and `bdat' (`bloc' and `bdat' tables are only in Apple fonts; - the former is equivalent to `EBLC', the latter equivalent to - `EBDT'). This must be called just after creation of the engine, - and before any face object allocation. See description of - TT_Load_Glyph_Bitmap() for an example. - - .................................................................. - - TT_Get_Face_Bitmaps( TT_Face face, - TT_EBLC* eblc_table ) - - Loads the `EBLC' (resp. `bloc') table from a font file into the - `eblc_table' structure. Use this function for testing whether - embedded bitmaps are available or not. - - This function returns TT_Err_Table_Missing if the font contains - no embedded bitmaps. All fields in `eblc_table' will then be - set to 0. - - .................................................................. - - TT_New_SBit_Image( TT_SBit_Image** image ) - - Allocates a new embedded bitmap container, pointed to by - `image'. - - .................................................................. - - void TT_Done_SBit_Image( TT_SBit_Image* image ) - ^^^^ - - Releases the embedded bitmap container `image'. - - .................................................................. - - TT_Get_SBit_Strike( TT_Face face, - TT_Instance instance, - TT_SBit_Strike* strike ) - - Loads a suitable strike (i.e. bitmap sizetable) for the given - instance. Will return TT_Err_Invalid_PPem if there is no strike - for the current x_ppem and y_ppem values. - - .................................................................. - - TT_Load_Glyph_Bitmap( TT_Face face, - TT_Instance instance, - TT_UShort glyph_index, - TT_SBit_Image* bitmap ); - - Loads a glyph bitmap for a given glyph index `glyph_index' (in - face `face' and instance `instance') into `bitmap'. It calls - TT_Get_SBit_Strike() internally for checking the current x_ppem - and y_ppem values. - - This function returns an error if there is no embedded bitmap - for the glyph at the given instance. - - Example (omitting the error handling): - - ... - TT_SBit_Image* bitmap; - - ... - TT_Init_SBit_Extension( engine ); - TT_New_SBit_Image( &bitmap ); - ... - TT_Load_Glyph_Bitmap( face, instance, glyph_index, bitmap ); - - - --------------------------------------------------------------------- --------------------------------------------------------------------- - - - -II. API extensions -================== - -To use API extensions, simply compile the specific extension file -and link it to the library or your program. By default, all -extensions described below are linked to the library. - - - 1. cmap iteration (ftxcmap) - --------------------------- - - TT_Long TT_CharMap_First( TT_CharMap charMap, - ^^^^^^^ TT_UShort* glyph_index ) - - - Returns the first valid character code in a given character map - `charMap'. Also returns the corresponding glyph index (in the - parameter `*glyph_index'). In case of failure, -1 is returned, - and `*glyph_index' is undefined. - - .................................................................. - - TT_Long TT_CharMap_Next( TT_CharMap charMap, - ^^^^^^^ TT_UShort last_char, - TT_UShort* glyph_index ) - - Returns the next valid character code in a given character map - `charMap' which follows `last_char'. Also returns the - corresponding glyph index (in the parameter `*glyph_index'). In - case of failure, -1 is returned, and `glyph_index' is undefined. - - .................................................................. - - TT_Long TT_CharMap_Last( TT_CharMap charMap, - ^^^^^^^ TT_UShort* glyph_index ) - - - Returns the last valid character code in a given character map - `charMap'. Also returns the corresponding glyph index (in the - parameter `*glyph_index'). In case of failure, -1 is returned, - and `*glyph_index' is undefined. - - -==================================================================== - - - 2. internationalized error messages (ftxerr18) - ---------------------------------------------- - - This extension provides internationalized error strings from the - various error messages. It uses the `gettext' package if - available or returns English/American message strings if not. - Currently, the gettext package is only available on UNIX-like - systems like Linux; this means that for other platforms only - English error strings are returned. - - If the gettext package is found on your system, the configure - script automatically includes it by default. In case you don't - want to use it, or if you encounter some problems compiling this - file, try to disable nls support by configuring FreeType with - `./configure --disable-nls'. - - Please read the gettext info files for more information how to set - up your system for internationalized messages. A short - introduction is also given in the file `i18n.txt'. - - - TT_String* TT_ErrToString18( TT_Error i ) - ^^^^^^^^^^ - - This function returns an error string for a given error code - `i'. The type `TT_String' usually defaults to `char'; see - apiref.txt for more details. - - An example how to use this function (in connection with the - gettext interface) is given e.g. in test/ftdump.c. - - -==================================================================== - - - 3. access to the `gasp' table (ftxgasp) - --------------------------------------- - - The `gasp' table is currently loaded by the core engine, but the - standard API doesn't give access to it. - - - TT_Get_Face_Gasp_Flags( TT_Face face, - TT_UShort point_size, - TT_Bool* grid_fit, - TT_Bool* smooth_font ) - - This function returns for a given `point_size' the values of the - gasp flags `grid_fit' and `smooth_font'. The returned values - are booleans (where 0 = NO, and 1 = YES). - - Note that this function will return TT_Err_Table_Missing if the - font file doesn't contain any gasp table. - - -==================================================================== - - - 4. fast retrieval of glyph widths and heights (ftxwidth) - -------------------------------------------------------- - - This extension is used to parse the `glyf' table of a TrueType - file in order to extract the bounding box of a given range of - glyphs. - - The bounding box is then used to build font unit widths and - heights that are returned in two parallel arrays. - - This extension is needed by the FreeType/2 OS/2 Font Driver. - - - TT_Get_Face_Widths( TT_Face face, - TT_UShort first_glyph, - TT_UShort last_glyph, - TT_UShort* widths, - TT_UShort* heights ) - - Returns the widths (in array `widths') and heights (in array - `heights') of a glyph range which starts at `first_glyph' and - ends at `last_glyph'. All returned values are returned in font - units. If either `widths' or `heights' is set to a NULL - pointer, no data will be returned for that particular array. - - Note: TT_Get_Face_Widths() does *not* allocate the two arrays! - - - --------------------------------------------------------------------- --------------------------------------------------------------------- - - - -III. Error Messages -=================== - - Most functions return an error code, typed to TT_Error. A return - value of zero indicates no error. The error values are defined in - the various extension header files (e.g. ftxkern.h). In the - following table, the prefix `TT_Err_' is omitted, e.g. `Ok' -> - `TT_Err_Ok'. - - - Error Unprefixed Error - Code Macro Name Description - ------------------------------------------------------------------ - - 0x0A00 Invalid_Kerning_Table_Format - An invalid kerning subtable - format was found in this font. - - 0x0A01 Invalid_Kerning_Table A kerning table contains illegal - glyph indices. - - 0x0B00 Invalid_Post_Table_Format - The post table format specified - in the font is invalid. - - 0x0B01 Invalid_Post_Table The post table contains illegal - entries. - - - Here the TrueType Open error codes. In the following table, the - prefix `TTO_Err_' is omitted. - - - Error Unprefixed Error - Code Macro Name Description - ------------------------------------------------------------------ - 0x1000 Invalid_SubTable_Format The TrueType Open subtable format - specified in the font is invalid. - - 0x1001 Invalid_SubTable A TrueType Open subtable contains - illegal entries. - - 0x1002 Not_Covered The requested feature, glyph, - etc. isn't covered by the actual - function. - - 0x1010 Invalid_GSUB_SubTable_Format - The GSUB subtable format - specified in the font is invalid. - - 0x1011 Invalid_GSUB_SubTable The GSUB subtable contains - illegal entries. - - 0x1020 Invalid_GPOS_SubTable_Format - The GPOS subtable format - specified in the font is invalid. - - 0x1021 Invalid_GPOS_SubTable The GPOS subtable contains - illegal entries. - - ---- end of apirefx.txt --- Index: xc/extras/FreeType/docs/bitmaps.txt diff -u xc/extras/FreeType/docs/bitmaps.txt:1.1.1.2 xc/extras/FreeType/docs/bitmaps.txt:removed --- xc/extras/FreeType/docs/bitmaps.txt:1.1.1.2 Sat Feb 12 23:55:25 2000 +++ xc/extras/FreeType/docs/bitmaps.txt Wed Mar 16 20:59:37 2005 @@ -1,771 +0,0 @@ - - Bitmap and Pixmap generation with FreeType - ------------------------------------------ - - Table of Contents - - - Introduction - - I. The rasterizer component - - II. Bitmap & pixmap descriptors - - III. Rendering an outline - - IV. Anti-aliasing palette and other concerns - - Conclusion - - - -Introduction ------------- - - This document describes the steps that are needed to render a - glyph outline into a bitmap or a pixmap with the FreeType library. - It contains several important details needed to generate bitmaps - correctly in all situations, including if an outline has been - transformed or translated. - - --------------------------------------------------------------------- - - -I. The rasterizer component ---------------------------- - - In FreeType, the component in charge of performing bitmap and - pixmap rendering is called the `rasterizer'. Generation is - performed through a traditional process called `scan-line - conversion', but exhibits certain properties: - - - The rasterizer doesn't allocate bitmaps: - - In fact, it is only able to render an outline into an existing - bitmap or pixmap, which is passed to one of its rendering - functions. This means that the target bitmap/pixmap must be set - up correctly by the caller to achieve desired results. Setting - up bitmap and pixmap descriptors is explained in section II. - - - It is able to render anti-aliased pixmaps directly: - - This is unlike other graphics packages, which render to a - `large' bitmap which is then filtered down. Putting the - anti-aliasing logic within the rasterizer improves performance - and reduces memory usage, as well as lets us use better - algorithms which couldn't work in a `two-phase' process. - - The rasterizer is located in the files `ttraster.h' and - `ttraster.c' (or `ttraster.pas' for the Pascal version -- - unfortunately, this is severely out of date). - - The format of outlines isn't important for most developers and - won't be discussed here. However, a few conventions must be - explained regarding the vector outlines: - - - 1. Units - - All point coordinates within an outline are stored in 32-bit - fractional pixel values, using the 26.6 fixed float format - (which uses 26 bits for the integer part, and 6 bits for the - fractional part). The following table gives some examples of - real versus 26.6 coordinates: - - ----------------------------------------- - real real coord 26.6 coord - coord. * 2^6 - ----------------------------------------- - 0 0*64 = 0.0 0 - 2.4 2.4*64 = 153.6 154 - 3 3*64 = 192.0 192 - -1.7 -1.7*64 = -108.8 -109 - - As you can see, conversion is relatively simple -- basically a - multiplication by 64. - - In order to differentiate coordinates expressed in real or 26.6 - systems, we'll use in the following lines brackets (`[' and `]') - for real coordinates, and simple parentheses (`(' and `)') for - fractional coordinates so that - - [1.0,2.5] equals (64,160) - - [0,0] equals (0,0) - - [-2,3] equals (-128,192) - - - 2. Orientation - - The rasterizer uses the traditional convention of an X axis - oriented from left to right, and of a Y axis oriented from - bottom to top. - - ^ Y - | - | - | - -*-----> X - | - - You've probably already used it at school when doing math :-) - - Though the orientation of bitmap lines has the opposite - direction on nearly all graphics systems, the former convention - is the _right_ one when it comes to vector graphics. The reason - is simply that for managing angles and vector cross-products - resp. orientations in complex algorithms, a single convention, - used in math as well as computing alike solves many headaches. - - And due to education, most people expect a 45 degrees angle to - be in the top right quadrant, at coordinate (1,1). - - - 3. Pixels and the grid - - In a vector outline, a point is immaterial and has no size or - width, just like in usual geometry. A `pixel' is an element of - a computer image called a `map' (like a bitmap or a pixmap). - - The FreeType rasterizer follows the convention defined by the - TrueType specification regarding pixel placement: - - - The map can be seen as a `grid' placed in the vector plane. - The grid lines are set on integer real coordinates (i.e., on - multiples of 64 in 26.6 fractional notation). - - Each pixel is one `cell' of the grid, and can be `lit' with - any color. Hence, each pixel has a width and a height of - [1.0] units, (i.e., 64 fixed float units). - - ^ Y - | - | The pixel grid with two - | points (not pixels!) - +-----+-----+-----+-----+-----+ at coordinates [0,0] - | | | | | | and [2,2]. - | | | | | | - | | | | |[2,2]| - +-----+-----+-----+-----@-----+ The pixels are the - | | |11111|22222| | grid's cells, and this - | | |11111|22222| | example show the four - | | |11111|22222| | pixels enclosed within - +-----+-----+-----+-----+-----+ the rectangle delimited - | | |33333|44444| | by these two points. - | | |33333|44444| | - | | |33333|44444| | - --+-----+-----@-----+-----+-----+----> X - | | |[0,0]| | | - | | | | | | Note that the numbering - | | | | | | of pixels isn't - +-----+-----+-----+-----+-----+ meaningful here, it's - | | | | | | only used to distinguish - | | | | | | them. - | | | | | | - +-----+-----+-----+-----+-----+ - | - | - - - The `center' of each pixel is always located on a - `half-integer' coordinate, i.e., at -1.5, -0.5, 0.5, 1.5, etc. - - - When drawing a shape, the rasterizer only `lits' a pixel when - its center is placed _within_ the shape. This is important - because an outline point may not be necessarily be on a grid - line. - - - When a pixel center falls on the shape, the pixel is lit too. - - For example, the following graphics show the `lit' pixels - corresponding to the rectangle enclosed by the points: - - [-0.2, 0] and [2.4, 2.7] - - - ^ Y As one can see, the - | newest pixels `1' - | and `2' are now lit, - | because its centers - +-----+-----+-----+-----+--[2.4,2.7] are located at - | | |11111|22222| @ | coordinates - | . | . |11.11|22.22| . | [0.5,2.5] and - | | |11111|22222| | [1.5,2.5], - +-----+-----+-----+-----+-----+ respectively. - | | |33333|44444| | - | . | . |33.33|44.44| . | Note that pixel - | | |33333|44444| | centers are - +-----+-----+-----+-----+-----+ represented with a - | | |55555|66666| | dot in the graphics. - | . | . |55.55|66.66| . | - | | |55555|66666| | - --+-----+----@+-----+-----+-----+----> X - | | [-0.2,0] | | | - | . | . | . | . | . | - | | | | | | Note also that pixel - +-----+-----+-----+-----+-----+ numbering is still - | | | | | | meaningless there. - | . | . | . | . | . | - | | | | | | - +-----+-----+-----+-----+-----+ - | - | - - - 4. Drop-out control - - Sometimes, a stroke is too thin to even contain a single pixel - center. This results in `lost continuity' in the resulting - bitmap, i.e., some unpleasant `holes' or `breaks' in the - rendered shape, which are called a `drop-out'. - - Because a glyph representation uses curves (Bezier arcs), this - case is not easily controllable during the `hinting' of glyph - outlines by the font driver, which means that the rasterizer - must be able to correct these `artefacts'. - - This processing is called `drop-out control', and can be - performed in several modes, defined by the TrueType - specification, and which details do not belong to this document. - However, the important idea is that, in _some_ cases, a pixel - may be lit even if its center isn't part of the shape. - - This case is relatively rare, but is mentioned because it has - consequences of the rendering of maps. More precisely, in the - way an outline's extent is computed (see below). - - --------------------------------------------------------------------- - - -II. Bitmap and pixmap descriptors ---------------------------------- - - The Freetype rasterizer only supports bitmaps and 8-bit pixmaps. - In order to render an outline, a map descriptor must be sent to - its rendering functions, along with a vectorial outline. - - - 1. Bitmap properties - - This section explains how to set up a bitmap descriptor, and how - vector coordinates in the outline plane relate to pixel - positions within the bitmap buffer. - - A bitmap's `raw data' is made of a simple bit buffer where each - bit corresponds to a monochrome pixel. For the sake of - simplicity, the FreeType rasterizer uses the following - conventions to store bitmaps in a buffer: - - - The value 0 is used for `unlit' pixels, usually the - `background' when rendering text. Hence 1 is used for `lit'. - - - Lines are padded to 8 bits, i.e. bytes. A bitmap row thus - takes an integral number of bytes in its buffer. No further - alignment is required. - - (Some systems compress bitmaps by _not_ padding bit rows to - byte boundaries. It is not possible to render into such a - bitmap buffer with FreeType.) - - - In a bitmap buffer byte, the left-most pixel is represented by - the most significant bit (i.e., 0x80). - - The opposite convention is not supported by the FreeType - rasterizer, though it may possibly be implemented too if this - ever comes useful (ask the developers -- for now, nobody did). - - - Increasing offsets within a row correspond to right-most - positions in the bitmap (i.e., byte 1 contains the - 8 bits/pixels that are located on the right of the - 8 bits/pixels of byte 0). - - - A bitmap can be oriented in two ways: - - o If increasing row addresses within the buffer correspond to - lower vertical lines, the bitmap is said to go `down'. This - is, for example, the case of nearly all video RAMs. - - o If increasing row addresses within the buffer correspond to - higher vertical lines, the bitmap is said to go `up'. This - is the case, for example, for OS/2 bitmaps. - - The `direction' of a bitmap is called `flow' to avoid any - confusion. In both cases, the rasterizer ALWAYS matches the - vector coordinate (0,0) with the lower-left corner of the - *lower-left* pixel in the bitmap. - - The following graphics illustrate these ideas: - - - - Y ^ - | A `down-flow' bitmap. - +--+--+--+--+--+--+--+--+ On the left is each - | | | | | | | | | row's number and its - 0: 0 | | | | | | | | | offset in the bitmap - +--+--+--+--+--+--+--+--+ buffer (where `w' is - | | | | | | | | | the width, in bytes, - 1: w | | | | | | | | | of a single bitmap - +--+--+--+--+--+--+--+--+ row). Note that the - | | | | | | | | | origin is located at - 2: 2*w | | | | | | | | | the lower left, i.e., - +--+--+--+--+--+--+--+--+ near the leftmost bit - | | | | | | | | | of the last bitmap - 3: 3*w | | | | | | | | | row. - -@--+--+--+--+--+--+--+-----> X - |[0,0] - - - - Y ^ - | An `up-flow' bitmap. - +--+--+--+--+--+--+--+--+ On the left is each - | | | | | | | | | row's number and its - 3: 3*w | | | | | | | | | offset in the bitmap - +--+--+--+--+--+--+--+--+ buffer (where `w' is - | | | | | | | | | the width, in bytes, - 2: 2*w | | | | | | | | | of a single bitmap - +--+--+--+--+--+--+--+--+ row). Note that the - | | | | | | | | | origin is located at - 1: w | | | | | | | | | the lower left, i.e., - +--+--+--+--+--+--+--+--+ near the first bit in - | | | | | | | | | the buffer. - 0: 0 | | | | | | | | | The first buffer bit - -@--+--+--+--+--+--+--+-----> X corresponds to the - |[0,0] rectangle [0,0]-[1,1] - in the vector plane. - - - 2. Bitmap descriptors - - Now that you understand all these details, a bitmap can be - described to the rasterizer engine through a map, which - structure must be set up by client application: - - struct TT_Raster_Map_ - { - int rows; /* number of rows */ - int cols; /* number of columns (bytes) per row */ - int width; /* number of pixels per line */ - int flow; /* bitmap orientation */ - - void* bitmap; /* bit/pixmap buffer */ - long size; /* bit/pixmap size in bytes */ - }; - typedef struct TT_Raster_Map_ TT_Raster_Map; - - where the fields stand for: - - rows: - The number of rows within the bitmap buffer. - - cols: - The number of columns, i.e. bytes per row within the - buffer. It corresponds to the `w' value used in the above - graphics. - - width: - The number of pixels (i.e. bits) per row in the buffer. The - rasterizer always clips its rendering to the bit width - specified in this field, even if the `cols' fields - corresponds to a larger width. - - flow: - The bitmap flow. Use the constants TT_Flow_Up and - TT_Flow_Down exclusively for this field. - - bitmap: - A typeless pointer to the bit buffer. - - size: - The total size of the bit buffer in bytes. This is not used - directly by the rasterizer, so applications can use it. - - Note that the `cols' field should always be bigger than the - value of `width' multiplied by 8. The rasterizer clips the - generated bitmap to the `width' first bits in a row. - - Note also that it is of course allowed to create, for example, a - Windows or X11 bitmap through a normal system-specific API call, - using a TT_Raster_Map that describes it to the rasterizer. It - is thus possible to draw directly into such OS specific - structures. - - - IMPORTANT: ***************************************************** - - When rendering a bitmap, the rasterizer always OR-es the shape - on the target bitmap. It is thus possible to draw several - shapes into a single surface which successive calls to the - render functions. - - **************************************************************** - - - 3. Pixmap properties - - The rasterizer only supports 8-bit pixmaps, where one pixel is - represented by a single byte. They must conform to the - following rules: - - - A 5-entries palette is used to generate an outline's pixmap in - the buffer. They correspond to: - - palette[0] -> background - palette[1] -> `light' - palette[2] -> `medium' - palette[3] -> `dark' - palette[4] -> foreground - - where the terms `light', `medium', and `dark' correspond to - intermediate values between the first (background) and last - (foreground) entry. - - The upcoming FreeType 2.0 will feature an additional - anti-aliasing logic with a 17-entries palette. - - - Lines are padded to 32 bits, i.e. 4 bytes. A pixmap row thus - takes a multiple of 4 bytes in its buffer. - - - Increasing offsets within a row correspond to right-most - positions in the bitmap (i.e., byte/pixel 1 is to the right of - byte/pixel 0). - - - A pixmap can be oriented in two ways, following the same rules - as a bitmap regarding its flow. - - - IMPORTANT: ***************************************************** - - In order to improve performance when rendering large outlines - with anti-aliasing, the rasterizer draws pixels in runs of - 4-bytes ONLY when at least one of their `colour' isn't 0 - (background). - - This means that you should ALWAYS CLEAR the pixmap buffer before - calling the rendering function, you may otherwise experience - ugly artefacts, which are possibly left from a previous - rendering! - - In general, it is not possible to do colour compositing with the - FreeType rasterizer (compositing is if you want to superpose a - transparent coloured layer on top of an image). This is mainly - due to the fact that: - - - There are too many pixel formats to support. - - - There is not a single portable way to do it anyway. - - - It really is a graphics processing question, not one that - should be solved by a text rendering engine. - - **************************************************************** - - - 4. Pixmap descriptors - - Pixmaps use the same descriptor structure as bitmaps, with a few - differences in interpretation: - - - The `cols' field is used to indicate the number of _bytes_ in - a pixmap row. It must thus be a multiple of 4! - - - The rasterizer clips the outline to the first `width' - pixels/width within each buffer row. - - As usual, it should be possible to use a system-specific pixmap - and render directly into it, as long as you set up a descriptor - for it. - - -------------------------------------------------------------------------- - - -III. Rendering an outline -------------------------- - - Now that you understand how the rasterizer sees the target bitmaps - and pixmaps it renders to, this section will explain how the - rendering eventually happen. - - - 1. Outline coordinates and extents - - Let's first consider the case where we're rendering text - directly into a huge single bitmap. To do that, we simply - translate each glyph outline before calling the rasterizer. - Here the roadmap: - - - Vectorial coordinates [0,0] are mapped to the lower left - `corner' (in the grid) of the lower left pixel in the bitmap - (whatever its flow is). - - - When the glyph loader returns an outline, the latter is placed - so that the coordinate [0,0] corresponds to the current cursor - position. - - This means that: - - - If we use our own cursor (cx,cy) within the bitmap during text - rendering, we must translate the outline to its position - before rendering it, e.g. with - - TT_Translate_Outline( outline, cx, cy ) - - (and the cursor position must be incremented after rendering - each glyph). - - - Before translation (i.e., when it is returned by the glyph - loader), the glyph outline doesn't necessarily lie on any of - the coordinate axes, nor is it limited to the first quadrant - (i.e., x>0 and y>0 is not true in general). - - Its extent can be computed with the function - TT_Get_Outline_BBox(), which returns the minimum and maximum - values of its X and Y point coordinates (in 26.6 format, of - course). - - - 2. Computing an outline's dimensions in pixels - - In many cases, however, it is much better to render individual - glyph bitmaps, then cache them with appropriate metrics in order - to render text much more quickly at a given point size. - - To be able to render the smallest possible bitmap, the exact - outline's extent dimensions in pixel are required. Again a - roadmap: - - - Get the outline's bounding box in vector coordinates: - - Simply call the TT_Get_Outline_BBox() function which will - return the values of xMin, yMin, xMax, and yMax in vector - (i.e. fractional) coordinates. - - - Grid-fit the bounding box: - - Because of the way pixels are lit in the bitmaps relative to - the position of their `centers' within the shape (see - section I), it is necessary to align the values of xMin, xMax, - yMin, and yMax to the pixel grid in order to compute the width - and height of the resulting bitmap. This can be done with: - - xMin = FLOOR ( xMin ); with FLOOR(x) == (x & -64) - xMax = CEILING( xMax ); CEILING(x) == ((x+63) & -64) - yMin = FLOOR ( yMin ); - yMax = CEILING( yMax ); - - The extents in pixels can then be simply computed as: - - pixel_width = (xMax - xMin) / 64; - pixel_height = (yMax - yMin) / 64; - - Note that because of drop-out control, and because the - bounding box computed currently includes all Bezier control - points from the outline, the bitmap may be slightly larger - than necessary in some cases. - - Some improvements are planned for FreeType 2.0; for now, you - should consider that finding the `exact' bitmap bounding box - requires to scan all `borders' to detect null columns or rows. - However, the values are right in most cases. - - NOTE: It seems that in some *rare* cases, which relate to - weird drop-out control situations, the above dimensions - are not enough to store all bits from the outline (there - are one or more bits `cut' on the edge). - - This being hard to study (it only appears in very poorly - hinted fonts), we leave this problem to FreeType 2.0. - - - Create/setup a bitmap with the computed dimensions. DON'T - FORGET TO CLEAR ITS BUFFER TOO! - - - Translate the outline to stick within the bitmap space. This - is done easily by translating it by (-xMin,-yMin), where you - should ALWAYS USE THE GRID-FITTED VALUES computed above for - xMin and yMin: - - TT_Translate_Outline( outline, -xMin, -yMin ); - - - IMPORTANT: *************************************************** - - For technical reasons, you should never translate a HINTED - outline by a non-integer vector (i.e., a vector which - coordinates aren't multiples of 64)! This would CERTAINLY - completely RUIN the delicate HINTING of the glyph, and will - result probably in pure GARBAGE at small point sizes. - - Of course, if you're not interested in hinting, like when - displaying rotated text, you can ignore this rule and - translate to any position freely. - - ************************************************************** - - - Render the bitmap (or pixmap). - - DON'T FORGET TO STORE THE GRID-FITTED xMin and yMin WITH THE - BITMAP! This will allow you later to place it correctly - relative to your cursor position. - - - Here's some example pseudo code: - - { - ... load the glyph ... - - TT_Outline outline; - TT_BBox bbox; - TT_Raster_Map bitmap; - - - /* get the outline */ - TT_Get_Glyph_Outline( glyph, &outline ); - - /* compute its extent */ - TT_Get_Outline_BBox( &outline, &bbox ); - - /* Grid-fit it */ - bbox.xMin &= -64; - bbox.xMax = ( bbox.xMax + 63 ) & -64; - bbox.yMin &= -64; - bbox.yMax = ( bbox.yMax + 63 ) & -64; - - /* compute pixel dimensions */ - width = (bbox.xMax - bbox.xMin) / 64; - height = (bbox.yMax - bbox.yMin) / 64; - - /* set up bitmap */ - bitmap.rows = height; - bitmap.width = width; - bitmap.cols = (width + 7) / 8; - bitmap.size = bitmap.rows * bitmap.cols; - bitmap.bitmap = malloc( bitmap.size ); - if ( !bitmap.bitmap ) - return error_memory... - - /* clear the bitmap buffer! */ - memset( bitmap.bitmap, 0, bitmap.size ); - - /* translate outline */ - TT_Translate_Outline( &outline, -bbox.xMin, -bbox.yMin ); - - /* render it within the bitmap */ - TT_Get_Outline_Bitmap( engine, &outline, &bitmap ); - - /* We're done; don't forget to save bbox.xMin and */ - /* bbox.yMin to adjust the bitmap position when */ - /* rendering text with it */ - - ... - } - - - 3. The case of transformed/rotated glyphs: - - You may want to apply a transformation other than a translation - to your glyph outlines before rendering them. For example, a - simple slant to synthesize italics, or a slight rotation. - - In all cases, it is possible to render individual glyph bitmaps. - Just make sure to follow the same process AFTER you have - transformed you outline! - - DON'T FORGET THAT YOU NEED TO RE-COMPUTE THE BBOX TO GET THE - CORRECT PIXEL DIMENSIONS AFTER A TRANSFORMATION. - - --------------------------------------------------------------------- - - -IV. Anti-aliasing palette and other concerns - - When rendering pixmaps, using the TT_Get_Outline_Pixmap() or - TT_Get_Glyph_Pixmap() functions, the rasterizer uses a 5-entries - palette of 8-bit deep `colors'. - - By default, this palette is set to ( 0, 1, 2, 3, 4 ), but one can - change it to suit your needs with TT_Set_Raster_Palette(). - - While in bitmap mode, it simply OR-es the pixel values to the - target bitmap that has been passed to TT_Get_Outline_Bitmap(). - - For pixmaps it simply writes directly the palette entries - corresponding to the `color' of the `lit' pixels it has computed. - This means that it is NOT POSSIBLE to render text in a single - pixmap with multiple calls to TT_Get_Outline_Pixmaps() within the - same target! - - The reason is that `gray' pixels of two distinct outlines are not - `added' when they overlap (the operation called 'compositing'), as - it could be expected by applications. - - The following graphic shows this effect when rendering two - overlapping anti-aliased shapes: - - - *** *** - .** .** - ** **. **. ** - .*. .*.. .*..*. - .*. + .*. = ---> ..*. - .*. ** | .*. ** - ** | ** - **. | **. - *** | *** - | - - missing black pixel after second - rendering... - - - There is no simple way to perform a composition within the - rasterizer. This would not be portable; moreover, it would be - extremely slow if it is too general. This operation is thus left - to client applications which can use their own system-specific API - for transparently blitting the glyph pixmaps into a surface to - form text. - - NOTE: - - If your system doesn't support transparent/alpha blits, you can - still have a look at the source file `freetype/test/display.c'. - It uses a large pixmap, with a special palette trick to render all - text quickly, then convert everything to `real' colors for - display. - - --------------------------------------------------------------------- - - -Conclusion ----------- - - We've seen how the FreeType rasterizer sees bitmaps through - descriptors, as well as the mapping which exists between the - vector coordinate space and the pixel position space. - - You should now be able to render outlines into bitmaps and pixmaps - while applying transformations like translation, slanting, or - rotation. Don't forget a few rules, however: - - - Always clear the bitmap/pixmap buffer before rendering (unless - you want to render several glyphs in a single _bitmap_; it won't - work on a pixmap). - - - A pixmap `cols' field, i.e. the size in bytes of each rows, must - be a multiple of 4. - - - Never translate a hinted outline by a non-integer vector if you - want to preserve the hints (i.e., the vector's coordinates must - be multiples of 64). - - - Finally, don't expect the rasterizer to composite transparent - `grays' for you in a single target pixmap through multiple - calls. - - ---- end of bitmaps.txt --- Index: xc/extras/FreeType/docs/changes.txt diff -u xc/extras/FreeType/docs/changes.txt:1.1.1.3 xc/extras/FreeType/docs/changes.txt:removed --- xc/extras/FreeType/docs/changes.txt:1.1.1.3 Sat Feb 12 23:55:25 2000 +++ xc/extras/FreeType/docs/changes.txt Wed Mar 16 20:59:37 2005 @@ -1,851 +0,0 @@ -Changes between FreeType version 1.3 and version 1.3.1 -====================================================== - - Bug fixes. - -Changes between FreeType version 1.2 and version 1.3 -==================================================== - - -Documentation -------------- - - Improved installation instructions. - - - Complete revision of almost all documentation files. - -** -** Added the file apirefx.txt to document all extensions to the -** FreeType library. Consequently, errstr.txt has been removed. -** - - Added the file optimize.txt, explaining how to improve FreeType - on a given architecture. - -** -** Documentation about possible patent restrictions added. -** - - Added howto/mac.txt (stating basically that the FreeType team - can't support the Macintosh platform because of lack of - knowledge). - - - Added howto/msdos.txt, documenting compilation for various 16bit - and 32bit compilers. - - -API functions -------------- - - TT_Load_Kerning_Table() now returns TT_Err_Invalid_Argument - instead of TT_Err_Bad_Argument (which is used for an internal - error only) for an invalid argument. The same holds for - TT_Get_Face_Widths() and TT_Get_Glyph_Big_Metrics(). - - - If the glyf table is missing, the new error code - TT_Err_Glyf_Table_Missing is returned instead of - TT_Err_Table_Missing. This affects TT_Get_Face_Widths(), - TT_Load_Glyph(), and TT_Open_Face(). - -** -** New function TT_FreeType_Version() to get the major and minor -** version dynamically. -** - - TT_Load_Glyph() has now two additional flags. TTLOAD_PEDANTIC - will force pedantic handling of the glyph instructions, and - TTLOAD_IGNORE_GLOBAL_ADVANCE_WIDTH is needed for some fonts - which have correct advance width values for the glyphs but an - incorrect global advance width value. - - - TT_Get_Glyph_Big_Metrics() now returns correct vertical bearing - values (both linear and pixel values). - - - New error code TT_Err_Glyf_Table_Missing (0x89) used to indicate - a missing `glyf' table. - - - The following macros have been shortened to stay within the - limit of 32 characters (the longer macro names are still - available if HAVE_LIMITS_ON_IDENTS is not defined). - - TT_UCR_ARABIC_PRESENTATION_FORMS_A -> - TT_UCR_ARABIC_PRESENTATIONS_A - TT_UCR_ARABIC_PRESENTATION_FORMS_B -> - TT_UCR_ARABIC_PRESENTATIONS_B - - TT_UCR_COMBINING_DIACRITICAL_MARKS -> - TT_UCR_COMBINING_DIACRITICS - TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB -> - TT_UCR_COMBINING_DIACRITICS_SYMB - - - freetype.h: - - TT_Bool is now typedef'ed as `typedef int'. - - New typedefs: TT_Int and TT_UInt. - - Declarations of TT_Matrix_Multiply() and TT_Matrix_Invert() - have been removed since these functions were never - implemented. - - -Architectures -------------- - - Added `ansi' directory to the supported architectures -- any - ANSI C compiler should compile FreeType with these files. - - - Added `debugger' directory to the architectures. Use this to - build a special version of FreeType for bytecode debugging - (tested with OS/2 and Unix). - - - Added more files to the `mac' architecture directory to make - basic support complete. - - - Support for VMS added (to compile the library only). - Contributed by Jouk Jansen . - - - Added `win16' architecture directory for older Windows versions. - A graphics driver (gw_win16.c) for the example programs is - available also. - -** -** Antoine Leca contributed support for many MS-DOS and Windows -** compilers (including library fixes to make it 16bit compliant): -** - Borland C++ for MS-DOS (tested with v. 3.1, 4.02, 5.0), - Microsoft C for MS-DOS, - Turbo C (versions 1.5 and 2.0 -- version 1.0 is too old), - Borland C++ 4.0 and 5.0 for Windows (both 16bit and 32bit - versions), - gcc under Win32 (Cygwin32 or MinGW32), - Microsoft Visual C++ 2.x, 4.x, 5.0, and 6.0 for Windows - - - Support for the gettext package with DJGPP compiler has been - added. - - - Since many older compilers on both MS-DOS and Windows platforms - have problems to build dependency files automatically, scripts - for gcc under Unix have been added to do this. Similarly, a - script to produce a DLL definition file is now included in the - distribution. - - - Moved old win32 support to contrib/win32, replacing all CR/LF - with LF, and using only lowercase file names for consistency. - Additionally, some missing files in the FreeType 1.2 - distribution have been added. Antoine Leca has written a new, - light-weight graphics driver (gw_win32.c) which fits better into - the current scheme. - - - Small additions have been made to the Amiga graphics driver. - - - The use of the ARM macro (intended for this architecture) has - been completely removed due to lack of support. - - - Checks for endianness have been removed completely since - FreeType isn't dependent on it. - - -Global compilation macros -------------------------- - - The TT_HUGE_PTR macro has been added to support fonts with more - than 16000 characters or so with 16bit MS-DOS compilers. - Consequently, the files hugefile.c and hugemem.c have been added - which provide special versions for these compilers. - - - HAVE_LIMITS_ON_IDENTS has been introduced to overcome - restrictions with old compilers which can't digest identifiers - longer than 32 characters. - -** -** Added option TT_CONFIG_OPTION_NO_INTERPRETER to desactivate the -** bytecode interpreter completely. This option is off by default. -** - - Added options TT_CONFIG_OPTION_STATIC_RASTER and - TT_CONFIG_OPTION_STATIC_INTERPRETER to build static versions of - the respective components. Off by default. (It was formerly - called TT_STATIC_RASTER.) - - Better debugging support (see ttconfig.h for details): - DEBUG_LEVEL_TRACE, DEBUG_LEVEL_ERROR, DEBUG_INTERPRETER, - DEBUG_MEMORY, DEBUG_FILE. - - Added TT_MAX_EXTENSIONS to define the maximal number of - extensions (currently set to 8 -- this macro was previously in - ttextend.c). - - -Extensions ----------- -** -** Full support for TrueType Open resp. OpenType GSUB tables has -** been implemented. It uses a GDEF table if available; otherwise, -** a method to construct an artificial GDEF table has been added -** (note that GDEF parts not related to GSUB are loaded but not -** further handled). An example how to use it can be found in the -** new test program ftstrtto. -** - - Rudimentary GPOS support -- currently, you can load the GPOS - subtables but nothing more. - -** -** Documentation for all extensions can be found in the file -** apirefx.txt. -** - - Fixed a bug in TT_Load_PS_Names() which returned a local, thus - invalid pointer. - -** -** Support for embedded bitmaps has been added (thanks to -** YAMANO'UCHI Hidetoshi who has contributed -** a lot of the code). It can handle `bloc', `bdat', `EBLC', and -** `EBDT' tables. [TrueType embedded bitmaps are also called -** `sbits' (for `scaler bitmaps').] -** - -Test programs -------------- -** -** A new test program called ftstrtto has been added to test -** TrueType Open features. Almost all available FreeType -** extensions are used in this program -- it displays a UTF 8 -** encoded string on screen, allowing to toggle kerning, embedded -** bitmaps, GSUB support, and hinting. Additionally, it has a -** special module to handle the Arabic script properly (in -** arabic.c), i.e., it treats initial, medial, final, and isolated -** glyphs correctly. -** - - The new module `blitter.c' provides the blitting function - Blit_Bitmap() for bitmaps of various depth. - - - The debugging program `fdebug' has been rewritten to provide a - better user interface. - - - ftdump has been extended to show information about embedded - bitmaps and GSUB data. It will now also show the PostScript - name of the font. - - - The new test program ftmetric can dump metrics and glyphs -- it - uses the gettext package for i18n support. - - - Another new test program is ftsbit to dump embedded bitmaps - contained in a font. - - - A small bug has been fixed in ftstring to compute the right - bounding box of the string. - - - ftview has been extended to display embedded bitmaps also - (switch `-B'). - - - The maximal point size of glyphs in ftview has been increased to - 5000pt -- this has shown some clipping bugs in the engine which - has been fixed meanwhile. As a demonstration, it also activates - tracing of the raster and gload component if DEBUG_LEVEL_TRACE - (see above) is defined. - - -Miscellaneous -------------- - - The library has been updated to use autoconf 2.13 and libtool - 1.3.3 throughout. - -** -** FreeType will now install its header files in -** /freetype/... since the number of files has grown again. -** - - Added a lot of EXPORT_FUNC/EXPORT_DEF macros to functions for - correct exporting in DLLs. - -** -** FreeType can now successfully load Mac fonts which don't have an -** `OS/2' table. -** - - Fixed a bug in handling composite glyphs where the composite - elements use attached points. - - - Better debugging support for instructions. - - - Various workarounds have been implemented to support slightly - broken fonts (or rather, fonts not following exactly the - TrueType specifications). - - -Contributed programs --------------------- - - ttf2bdf: -** -** Swapped all the columns in the mapping files. -** - - Changed the mapping table loader to index on the second column - instead of the first. - - - Changed the includes to deal with compilation on Windows. - - - Added some new mapping tables. - - - Fixed an incorrect parameter for Traditional C compilers. - - - Added generation of the _XFREE86_GLYPH_RANGES properties. - - - Change all CRLF's, CR's, or LF's in copyright strings to - double spaces. - - - Changed it so gcc 2.8.1 likes the return type of main() again. - - - Changed Makefile.in a bit to make installation more - consistent. - - - Changed the lower limit for the vertical and horizontal - resolutions to be 10dpi instead of 50dpi. - - - ttf2pfb: - - Has now rudimentary support for mapping tables (switch `-m') - and better PostScript name support for ordinary Type 1 fonts - -- nevertheless, it is far from finished, and there are some - plans to merge it with ttf2pt1. - - configure script added. - - Option `-k' added to keep output file in case of error. - - `-v' is now really verbose. - - ttf2pk: -** -** Support for MiKTeX's file searching mechanism added (ttf2pk -** and ttf2tfm are now part of the MiKTeX). -** -** -** Support for rotated glyphs added (only for subfonts; switches -** `-x' and `-y' to activate rotation resp. controlling the y -** offset). If a GSUB table with the `vert' feature is available -** in the font, vertical glyph presentation forms are used. -** - - Added warning message to the configure script in case the - kpathsea library isn't used. - - - Fixed an omission in Bg5.sfd. - -** -** Added UBg5plus.sfd for mapping Unicode to Bg5+ encoding. -** Similar SFD files now available: UBg5.sfd, UGB.sfd, UGBK.sfd, -** UJIS.sfd, UKS.sfd. -** - - Added documentation for dvidrv.btm. - - - Will now compile with kpathsea version 3.3 or newer also. - - - Subfont ligature support added as needed in the HLaTeX package - for Korean (switch `-l'). - -** -** Since ttf2pk support has been added to teTeX version 1.0 and -** newer, no patch are necessary. -** - - Fixed a string initialization bug in buildtfm() (file - tfmaux.c). - - - Added more documentation about file searching and a full - example how to use ttf2tfm. - - - Fixed a small bug in ttf2tfm.c which printed `(null)' instead - of nothing for the ttfonts.map entry if the font name prefix - string was empty. - - - ttf2tfm will now use the first type 0 kerning table only - (instead of the first kerning table only). - - - Both ttf2pk and ttf2tfm will now apply stretching and slanting - directly to the outline. This usually yields smaller bounding - boxes. - - - ttf2tfm will now output a comment string to the VPL file to - illustrate the meaning of the `HEADER' lines. - - - ttfbanner: - - Added Makefile for emx+gcc compiler. - - - Added autoconf support. - - - Fixed a lot of compilation warnings. - - -Pascal source code ------------------- - - The Pascal source code has been seriously updated since 1.2. - Here are the most important changes. - -** -** A. Support for charmaps and the name table -** -** -** The Charmap functions were not correctly implemented before -** 1.3. They are now available in the Pascal API. -** -** -** Similarly, the `name' table was not loaded, and the -** TT_Get_Name function wasn't implemented before 1.3. It is now -** done. -** -** -** The Pascal engine is now feature-complete, except that it -** provides no extensions like the C source code. -** - - B. Improvements in the glyph loader and the interpreter - - - Several changes were made in order to be able to load more - broken fonts, as well as old Apple fonts which happened to use - some very rarely-used aspects of the specification. - - - Note that the Pascal bytecode interpreter, contrary to the C - version, is not able to silently accept broken glyphs yet, or - even use the flag TTLOAD_PEDANTIC. Implementing this in - Pascal would require some serious work (unlike to C, where - this feature was introduced easily with the use of a few - macros to minimize source changes). So TT_Load_Glyph might - return an error with the Pascal engine while the C one accept - the same request successfully. - - - C. Ports to Delphi and Free Pascal - - This release has been compiled on the following compilers: - - - Free Pascal 0.9 (Dos,Linux,Win32,OS/2) - - Virtual Pascal 1.1 and 2.0 (Win32 and OS/2) - - Turbo Pascal 6.0 and Borland Pascal 7.0 (Dos) - - Delphi 1, 2, and 3. It should work with D4 and D5 also. - (Windows) - - Note that most of the test programs will not compile on - anything except MS-DOS or OS/2. The debugger also needs the - Turbo Vision library. The library, however, should compile - fine with all tools cited above. - - - -Changes between FreeType 1.1 and 1.2 -==================================== - -Mostly bug fixes and build fixes. - - - -Changes between FreeType 1.0 and 1.1 -==================================== - -There were various changes since the 1.0 release. Here they are -summarized: - -- Added vertical layout support - - The engine now loads the vertical header and metrics if available - and makes them visible through the new `vertical' field of the - face properties (it is set to NULL if no vertical data was found - in the font file). - - The glyph loader now loads all metrics (horizontal and vertical), - but still returns the horizontal ones only with the API - TT_Get_Glyph_Metrics(). However, TT_Get_Glyph_Bit_Metrics() has - been added to extract them from a glyph container. - - -- Serialization of coordinates arrays in TT_Outline() - - As announced in the previous API reference, the structure of - TT_Outline changed slightly, as well as the naming of its fields. - The points are now stored in a single array of TT_Vector, instead - of two parallel arrays (one for the Xs, the other for the Ys). - - -- New API function TT_Get_Face_Metrics() - - Useful to access unscaled metrics like left side bearings, advance - widths, top side bearings, and advance height, for a given range - of glyphs. - - -- New extension: ftxcmap.c - - Used by some applications to enumerate and parse the charmap - tables in an easier way. - - -- New extension: ftxpost.c - - With this extension you can access the PostScript glyph names - given in the `post' table. - - -- New extension: ftxwidth.c - - This extension is used to parse the `glyf' table to extract the - bounding boxes of a given range of glyphs. This is much faster - than loading individual glyphs. - - -- The FreeType engine is now THREAD-SAFE and REENTRANT - - However, the implementation of ttmutex must be refined for your - system -- the default one is a dummy and doesn't do anything! - Beware! THIS IS STILL IN BETA. - - The thread-safe and reentrant builds now compile and seem to run - well when used with a single thread. Some efforts have been spent - to check the coherency of the lock contentions within the engine, - but we haven't tested multi-threading heavily. - - -- Large internal re-organization - - Too technical to explain shortly, but results in a much better - memory footprint and smaller code, especially when opening - multiple faces. - - -- Fixes/enhancements to the interpreter - - The infamous Monotype.com bug (a new free font released by - Microsoft Typography a few days after the FreeType 1.0 release!) - is fixed, of course, as well as few other little and unpleasant - artifacts... - - The interpreter was also seriously re-organized to allow the use - of a very large `switch' statement, instead of a jump table, which - results in smaller and faster code on some systems (depending of - the compiler too). Users of the library can experiment with the - TT_CONFIG_OPTION_INTERPRETER_SWITCH configuration macro to test - this. - - -- Single object compilation mode - - The core engine can now be compiled into a single object file. - This allows optimizing compilers to do more global optimizations, - and get rid of many of the `intermediate' internal symbols used to - link internal engine components together. - - The engine now takes only 48kByte of stripped Intel object code! - - -- DLL compilation mode - - In order to allow the compilation of the library as a DLL, the - keyword EXPORT has been added as a prefix to all high-level API - functions found in `freetype.h'. Define it to the value you need - before `#include "freetype.h"' when building the DLL (if undefined - it will default to nothing within this header file). - - (Apparently, this is only useful on Win32, maybe on OS/2.) - - -- Renamed configuration macros - - These were renamed to forms of TT_CONFIG_OPTION_XXXXX_YYYYY. - They're located in ttconfig.h and can be defined/undefined - manually by developers who want to tune the compilation of the - engine: - - TT_CONFIG_OPTION_EXTEND_ENGINE - - Allows extensions to be linked with the single object engine. - If you don't need any of them, you may save one or more - kilobytes by undefining it. - - - TT_CONFIG_OPTION_GRAY_SCALING - - Allows the compilation of the gray-scaling (font smoothing) - code in ttraster. If undefined, some APIs won't be available: - - TT_Set_Raster_Palette(), - TT_Get_Glyph_Pixmap(), - TT_Get_Outline_Pixmap() - - - TT_CONFIG_OPTION_INTERPRETER_SWITCH - - Uses a large `switch' statement in the bytecode interpreter - instead of a constant call-table. Depending on your processor - and compiler, this can lead to significant reduction of code - size and/or increase of performance. - - - TT_CONFIG_OPTION_THREAD_SAFE - - When defined, a thread-safe version of the engine is built. A - thread-safe version is a bit bigger, probably not slower, than - a non-threaded build. ATTENTION: You must redefine the file - `lib/ttmutex.c' for your own platform to get it to work - correctly. - - - Some more options may come in the future... - - -- New API functions TT_MulDiv() and TT_MulFix()" - - To help you compute `a*b/c' with 64-bit intermediate precision, or - `a*b/0x10000' with the same one... - - These are not necessarily the fastest functions but they are - clearly portable and overflow-safe. Your runtime/compiler may - provide better replacements, though... - - - -Changes between FreeType Beta and 1.0 -===================================== - -There were a number of changes since the public beta: - - -I. Bug fixes ------------- - - The following bugs have been fixed in this release: - - - - Incorrect advance width and left side bearings - - The glyph loader has been re-designed to match the values found - in the pre-calc tables... - - - - Problems when opening multiple fonts - - Fixed. A stupid bug in the i/o component. - - - - Problems with some Georgian fonts - - Fixed. Discovered some new undocumented opcodes behaviour... - - - - Buglets in the test programs which made them return invalid - error codes - - Fixed. - - - - Memory leaks when trying to open broken some font files - - Fixed. Waiting for more broken fonts to test... - - - - Non-square resolutions don't work or display correctly - - They now work very well! - - - - The scan-line converter, while in font-smoothing mode, doesn't - perform horizontal drop-out control - - This wasn't really bug, but the feature has been correctly - added. - - -The remaining `features' persist, as they're not essential yet: - - - The `rotated' and `stretched' flags do not work (glyph loading - will then return errors). However, it is still possible to - rotate or transform any outline without setting these flags. - - - We always use drop-out mode number 2, as some of the values - returned by some `cvt programs' seem invalid for now... - - -Note also that an `event hook/callback' has been introduced in this -release, but is still under alpha (not even beta; it is commented -out currently). You should not rely on this... - - -II. Code changes ----------------- - - 1. API Changes - - A few API changes were necessary in order to support important - features, or future improvements which will come in later - releases. - - - - TT_Set_Instance_Resolution() was renamed to - TT_Set_Instance_Resolutions(). - - - - TT_Set_Instance_PointSize() has disappeared. Instead, the - following APIs have been defined: - - TT_Set_Instance_CharSize() - TT_Set_Instance_CharSizes() - TT_Set_Instance_PixelSizes() - - - - The TT_Engine class has been introduced. It models one - instance of the library, and is used to allow re-entrance and - shared library code. The functions which now depend on a - TT_Engine parameter are: - - TT_Init_FreeType() - TT_Done_FreeType() - TT_Open_Face() - TT_Open_Collection() - TT_Set_Raster_Palette() - TT_Get_Outline_Bitmap() - TT_Get_Outline_Pixmap() - - Note that there is _no_ sharing of objects between distinct - engines. - - - - Each face and instance object have an inside pointer which use - is reserved to client application. Several functions are - defined to set and read it: - - TT_Set_Face_Pointer() / TT_Get_Face_Pointer() - TT_Set_Instance_Pointer() / TT_Get_Instance_Pointer() - - - - TT_Apply_Outline_Matrix() has been renamed to - TT_Transform_Outline(). - TT_Apply_Outline_Translation() has been renamed to - TT_Translate_Outline() - TT_Apply_Vector_Matrix() has been renamed to - TT_Transform_Vector() - - all for the sake of clarity. - - - 2. Structural changes - - Some structures have evolved. - - - - The instance metrics have now two new fields which are - `x_scale' and `y_scale'. Each one is a scaling factor, - expressed in the 16.16 fixed float format (TT_Fixed), used to - convert one distance expressed in font units into the same - distance in fractional (26.6) pixels. - - - - A new structure TT_BBox has been defined to describe an - outline's bounding box. - - - - The outlines are now full-class citizen. It is possible to - create new outlines, copy, clone, transform, translate and - render them through specific methods of the TT_Outline class - (previously called TT_Glyph_Outline). Read the API reference - for a complete listing. - - - - The glyph metrics have a new structure: they contain a TT_BBox - field, a TT_Outline field, as well as three metrics values, - which are `bearingX', `bearingY', and `advance'. Read the - file `glyphs.txt' for more information about their definitions - and uses. - - - 3. Small but IMPORTANT changes - - - - The `max_Faces' field of a face's properties has disappeared. - It is replaced by `num_Faces' which gives the total number of - fonts embedded in a collection (the previous field gave the - total minus one). - - - - TT_Load_Glyph() now returns correctly placed outlines, and - computes advance widths which match the pre-calc values in the - "hdmx" table in nearly all cases. - - - - TT_Get_Glyph_Metrics() returns grid-fitted metrics for hinted - glyphs (i.e., loaded with the TTLOAD_HINT_GLYPH, or - TTLOAD_DEFAULT, flags). This includes the bounding box. To - get the exact bounding box of a hinted glyph, you should - extract its outline, then call TT_Get_Outline_BBox(). - - - - Some improvements in the glyph loader, which improves - drastically the placement of glyphs (especially composite - ones) which previously caused trouble for some fonts - (e.g. goudy.ttf). - - - - Several minor improvements in the interpreter to improve - rendering and bounds checking... - - - - Up-to-date Pascal source code, with output equivalent to the C - tree... - - ---- END --- Index: xc/extras/FreeType/docs/convntns.txt diff -u xc/extras/FreeType/docs/convntns.txt:1.1.1.2 xc/extras/FreeType/docs/convntns.txt:removed --- xc/extras/FreeType/docs/convntns.txt:1.1.1.2 Sat Feb 12 23:55:26 2000 +++ xc/extras/FreeType/docs/convntns.txt Wed Mar 16 20:59:37 2005 @@ -1,970 +0,0 @@ - - Conventions and Design in the FreeType library - ---------------------------------------------- - - -Table of Contents - -Introduction - -I. Style and Formatting - - 1. Naming - 2. Declarations & Statements - 3. Blocks - 4. Macros - -II. Design conventions - - 1. Modularity and Components Layout - 2. Configuration and Debugging - -III. Usage conventions - - 1. Error handling - 2. Font File I/O - 3. Memory management (due to change soon) - 4. Support for threaded environments - 5. Object Management - - -Introduction -============ - -This text introduces the many conventions used within the FreeType -library code. Please read it before trying any modifications or -extensions of the source code. - - - -I. Style and Formatting -======================= - -The following coding rules are extremely important to keep the -library's source code homogeneously. Keep in mind the following -points: - - - `Humans read source code, not machines' (Donald Knuth) - - The library source code should be as readable as possible, even - by non-C experts. With `readable', two things are meant: First, - the source code should be pleasant to the eye, with sufficient - whitespace and newlines, to not look like a boring stack of - characters stuck to each other. Second, the source should be - _expressive_ enough about its goals. This convention contains - rules that can help the source focus on its purpose, not on a - particular implementation. - - - `Paper is the _ultimate_ debugger' (David Turner :-) - - There is nothing like sheets of paper (and a large floor) to - help you understand the design of a library you're new to, or to - debug it. The formatting style presented here is targeted at - printing. For example, it is more than highly recommended to - never produce a source line that is wider than 78 columns. More - on this below. - - -1. Naming ---------- - - a. Components - - A unit of the library is called a `component'. Each component - has at least an interface, and often a body. The library comes - in two language flavors, C and Pascal (the latter severely out - of date unfortunately). A component in C is defined by two - files, one `.h' header and one `.c' body, while a Pascal - component is contained in a single `.pas' file. - - All component source file names begin with the `tt' prefix, with - the exception of the `FreeType' component. For example, the - file component is implemented by the files `ttfile.h', - `ttfile.c', and `ttfile.pas'. Only lowercase letters should be - used, following the 8+3 naming convention to allow compilation - under DOS. - - In the C version, a single component can have multiple bodies. - For example, `ttfile.c' provides stream i/o through standard - ANSI libc calls, while `ttfile2.c' implements the same thing - using a Unix memory-mapping API. - - The FreeType component is an interface-only component. - - b. Long and expressive labels - - Never hesitate to use long labels for your types, variables, - etc.! Except maybe for things like very trivial types, the - longest is the best, as it increases the source's - _expressiveness_. Never forget that the role of a label is to - express the `function' of the entity it represents, not its - implementation! - - NOTE: Hungarian notation is NOT expressive, as it sticks the - `type' of a variable to its name. A label like `usFoo' - rarely tells the use of the variable it represents. - - And the state of a variable (global, static, dynamic) - isn't helpful anymore. - - Avoid Hungarian Notation like the *plague*! - - - When forging a name with several nouns - (e.g. `number-of-points'), use an uppercase letter for the first - letter of each word (except the first), like: - - numberOfPoints - - You are also welcomed to introduce underscores `_' in your - labels, especially when sticking large nouns together, as it - `airs' the code greatly. E.g.: - - `numberOfPoints' or `number_Of_Points' - - `IncredibleFunction' or `Incredible_Function' - - And finally, always put a capital letter after an underscore, - except in variable labels that are all lowercase: - - `number_of_points' is OK for a variable (_all_ lowercase label) - - `incredible_function' is NOT for a function! - ^ ^ - - `Microsoft_windows' is a *shame*! - ^ ^ - - `Microsoft_Windows' isn't really better, but at least its a - ^ ^ correct function label within this - convention ;-) - - c. Types - - All types that are defined for use by FreeType client - applications are defined in the FreeType component. All types - defined there have a label beginning with `TT_'. Examples: - - TT_Face, TT_F26Dot6, etc. - - However, the library uses a lot more of internal types that are - defined in the Types, Tables, and Objs components (`tttypes' & - `tttables' files). - - By convention, all internal types, except the simplest ones like - integers, have their name beginning with a capital `T', like in - 'TFoo'. Note that the first letter of `foo' is also - capitalized. The corresponding pointer type uses a capital `P' - instead, i.e. (TFoo*) is simply named 'PFoo'. Examples: - - typedef struct _TTableDir - { - TT_Fixed version; /* should be 0x10000 */ - UShort numTables; /* Tables number */ - - UShort searchRange; /* These parameters are only used */ - UShort entrySelector;/* for a dichotomy search in the */ - UShort rangeShift; /* directory. We ignore them. */ - } TTableDir; - - typedef TTableDir* PTableDir; - - Note that we _always_ define a typedef for structures. The - original struct label starts with `_T'. - - This convention is a famous one from the Pascal world. - - Try to use C or Pascal types to the very least! Rely on - internally defined equivalent types instead. For example, not - all compilers agree on the sign of `char'; the size of `int' is - platform-specific, etc. - - There are equivalents to the most common types in the `Types' - components, like `Short', `UShort', etc. Using the internal - types will guarantee that you won't need to replace every - occurence of `short' or wathever when compiling on a weird - platform or with a weird compiler, and there are many more than - you could think of... - - d. Functions - - The name of a function should always begin with a capital - letter, as lowercase first letters are reserved for variables. - The name of a function should be, again, _expressive_! Never - hesitate to put long function names in your code: It will make - the code much more readable. - - Expressiveness doesn't necessarily imply lengthiness though; for - instance, reading shorts from a file stream is performed using - the following functions defined in the `File' component: - - Get_Byte, Get_Short, Get_UShort, Get_Long, etc. - - Which is somewhat more readable than: - - cget, sget, usget, lget, etc. - - e. Variables - - Variable names should always begin with a lowercase letter. - Lowercase first letters are reserved for variables in this - convention, as it has been already explained above. You're - still welcome to use long and expressive variable names. - - Something like `numP' can express a number of pixels, porks, - pancakes, and much more... Something like `num_points' won't. - - Today, we are still using short variable labels in some parts of - the library. We're working on removing them however... - - As a side note, a field name of a structure counts as a variable - name too. There are exceptions to the first-lowercase-letter - rule, but these are only related to fields within the structure - defined by the TrueType specification (well, at least it - _should_ be that way). - - -2. Declarations & Statements ----------------------------- - - a. Columning - - Try to align declarations and assignments in columns, if it - proves logical. For example (taken from `ttraster.c'): - - struct _TProfile - { - Int flow; /* Profile orientation : Asc/Descending */ - Int height; /* profile's height in scanlines */ - Int start; /* profile's start scanline */ - ULong offset; /* offset of profile's data in render pool */ - PProfile link; /* link to next profile */ - Int index; /* index of profile's entry in trace table */ - Int count_lines; /* count of lines having to be drawn */ - Int start_line; /* lines to be rendered before this profile */ - PTraceRec trace; /* pointer to profile's current trace table */ - }; - - instead of - - struct _TProfile { - Int flow; /* Profile orientation : Asc/Descending */ - Int height; /* profile's height in scanlines */ - Int start; /* profile's start scanline */ - ULong offset; /* offset of profile's data in render pool */ - PProfile link; /* link to next profile */ - Int index; /* index of profile's entry in trace table */ - Int count_lines; /* count of lines having to be drawn */ - Int start_line; /* lines to be rendered before this profile */ - PTraceRec trace; /* pointer to profile's current trace table */ - }; - - This comes from the fact that you're more interested by the - field and its function than by its type. - - Or: - - x = i + 1; - y += j; - min = 100; - - instead of - - x=i+1; - y+=j; - min=100; - - And don't hesitate to separate blocks of declarations with - newlines to `distinguish' logical sections. - - E.g., taken from an old source file, in the declarations of the CMap - loader: - - long n, num_SH; - unsigned short u; - long off; - unsigned short l; - long num_Seg; - unsigned short* glArray; - long table_start; - int limit, i; - - TCMapDir cmap_dir; - TCMapDirEntry entry_; - PCMapTable Plcmt; - PCMap2SubHeader Plcmsub; - PCMap4 Plcm4; - PCMap4Segment segments; - - instead of - - long n, num_SH; - unsigned short u; - long off; - unsigned short l; - long num_Seg; - unsigned short *glArray; - long table_start; - int limit, i; - TCMapDir cmap_dir; - TCMapDirEntry entry_; - PCMapTable Plcmt; - PCMap2SubHeader Plcmsub; - PCMap4 Plcm4; - PCMap4Segment segments; - - b. Aliases and the `with' clause - - The Pascal language comes with a very handy `with' clause that - is often used when dealing with the fields of a same record. - The following Pascal source extract - - with table[incredibly_long_index] do - begin - x := some_x; - y := some_y; - z := wathever_the_hell; - end; - - is usually translated to: - - table[incredibly_long_index].x = some_x; - table[incredibly_long_index].y = some_y; - table[incredibly_long_index].z = wathever_the_hell; - - When a lot of fields are involved, it is usually helpful to - define an `alias' for the record, like in: - - alias = table + incredibly_long_index; - - alias->x = some_x; - alias->y = some_y; - alias->z = wathever_the_hell; - - which gives cleaner source code, and eases the compiler's - optimization work. - - Though the use of aliases is currently not fixed in the current - library source, it is useful to follow one of these rules: - - - Avoid an alias with a stupid, or cryptic name, something like: - - TFooRecord tfr; - .... - [lots of lines snipped] - .... - - tfr = weird_table + weird_index; - - ... - - tfr->num = n; - - It doesn't really help to guess what 'tfr' stands for several - lines after its declaration, even if it's an extreme - contraction of one particular type. - - Something like `cur_record' or `alias_cmap' is better. The - current source also uses a prefix of `Pl' for such aliases - (like Pointer to Local alias), but this use is _not_ - encouraged. If you want to use prefixes, use `loc_', `cur_', - or `al_' at the very least, with a descriptive name following. - - - Or simply use a local variable with a semi-expressive name: - - { - THorizontalHeader hheader; - TVerticalHeader vheader; - - - hheader = instance->fontRes->horizontalHeader; - vheader = instance->fontRes->verticalHeader; - - hheader->foo = bar; - vheader->foo = bar2; - ... - } - - which is much better than - - { - THorizontalHeader Plhhead; - TVerticalHeader Plvhead; - - Plhhead = instance->fontRes->horizontalHeader; - Plvhead = instance->fontRes->verticalHeader; - - Plhhead->foo = bar; - Plvhead->foo = bar2; - ... - } - - -3. Blocks ---------- - - Block separation is done with `{' and `}'. We do not use the K&R - convention which becomes only useful with an extensive use of - tabs. The `{' and its corresponding `}' should always be on the - same column. It makes it easier to separate a block from the rest - of the source, and it helps your _brain_ associates the accolades - easily (ask any Lisp programmer on the topic!). - - Use two spaces for the next indentation level. - - Never use tabs in your code, their widths may vary with editors - and systems. - - Example: - - if (condition_test) { - waow mamma; - I'm doing K&R format; - just like the Linux kernel; - } else { - This test failed poorly; - } - - is _OUT_! - - if ( condition_test ) - { - This code isn't stuck to the condition; - read it on paper, you'll find it more; - pleasant to the eye; - } - else - { - Of course, this is a matter of taste; - That's just the way it is in this convention; - and you should follow it to be homogenous with; - the rest of the FreeType code; - } - - is _IN_! - - -4. Macros ---------- - - Macros should be made of uppercase letters. When a macro label is - forged from several words, it is possible to only uppercasify the - first word, using an underscore to separate the nouns. This is - used in ttload.c, ttgload.c and ttfile.c with macros like - - ACCESS_Frame, GET_UShort, CUR_Stream - - The role of the macros used throughout the engine is explained - later in this document. - - - -II. Design Conventions -====================== - - -1. Modularity and Components Layout ------------------------------------ - - The FreeType engine has been designed with portability in mind. - This implies the ability to compile and run it on a great variety - of systems and weird environments, unlike many packages where the - word strictly means `runs on a bunch of Unix-like systems'. We - have thus decided to stick to the following restrictions: - - - The C version is written in ANSI C. The Pascal version compiles - and run under Turbo Pascal 5.0 and compatible compilers. - - - The library, if compiled with gcc, doesn't produce any warning - with the `-ansi -pedantic' flags. Other compilers with better - checks may produce ANSI warnings that we'd be happy to now - about. - - (NOTE: It can of course be compiled by an `average' C compiler, - and even by a C++ one.) - - - It only requires in its simplest form an ANSI libc to compile, - and no utilities other than a C pre-processor, compiler, and - linker. - - - It is written in a modular fashion. Each module is called a - `component' and is made of two files in the C version (an - interface with suffix `.h' and body with suffix `.c' ) and one - file in the Pascal one. - - - The very low-level components can be easily replaced by - system-specific ones that do not rely on the standard libc. - These components deal mainly with i/o, memory, and mutex - operations. - - - A client application must only include one interface file named - `freetype.h' resp. `freetype.pas' to use the engine. All other - components should never be used or accessed by client - applications, and their name always begin with a `tt' prefix: - - ttmemory, ttobjs, ttinterp, ttapi, etc. - - - All configuration options are gathered in two files. One - contains the processor and OS specific configuration options, - while the other treats options that may be enabled or disabled - by the developer to test specific features (like assertions, - debugging, etc). - - IMPORTANT NOTES: - - These restrictions only apply to the core engine. The package - that comes with it contains several test programs sources that - are much less portable, even if they present a modular model - inspired from the engine's layout. - - The components currently found in the `lib' directory are: - - -------- high-level interface ---------------------------------- - - freetype.h High-level API, to be used by client applications. - - ttapi.c Implementation of the api found in `freetype.h'. - - -------- configuration ----------------------------------------- - - ttconfig.h Engine configuration options. These are commented - and switched by hand by the developer. See - section 2 below for more info. - - ft-conf.h Included by ttconfig.h, this file isn't part of - the `lib' directory, but depends on the target - environment. See section 2 blow for more info. - - -------- definitions ------------------------------------------- - - tttypes.h The engine's internal types definitions. - tttables.h The TrueType tables definitions, per se the Specs. - tttags.h The TrueType table tags definitions. - tterror.[ch] The error and debugging component. - - ttdebug.[ch] Only used by the debugger, should not be linked - into a release build. - - ttcalc.[ch] Math component used to perform some computations - with an intermediate 64-bit precision. - - -------- replaceable components -------------------------------- - - ttmemory.[ch] Memory component. This version uses the ANSI libc - but can be replaced easily by your own version. - - ttfile.[ch] Stream i/o component. This version uses the ANSI - libc but can be replaced easily by your own - version. Compiled only if file memory mapping - isn't available on your system. - - ttfile2.[ch] Unix-specific file memory mapping version of the - file component. It won't compile on other - systems. Usually results in much faster file - access (about 2x on a SCSI P166 system) - - ttmutex.[ch] Generic mutex component. This version is a dummy - and should only be used for a single-thread build. - You _need_ to replace this component's body with - your own implementation to be able to build a - threaded version of the engine. - - -------- data management --------------------------------------- - - ttengine.h The engine instance record definition, root of all - engine data. - - ttlists.[ch] Generic lists manager. - ttcache.[ch] Generic cache manager. - - ttobjs.[ch] The engine's object definitions and - implementations module contains structures, - constructors, destructors and methods for the - following objects: - - face, instance, glyph, execution_context - - ttload.[c] The TrueType tables loader. - - ttgload.[ch] The glyph loader. A component in itself, due to - the task's complexity. - - ttindex.[ch] The character mapping to glyph index conversion - routines. Implements functions defined in - `freetype.h'. - - ttinterp.[ch] The TrueType instructions interpreter. Probably - the nicest source in this engine. Apparently, - many have failed to produce a comparable one due - to the very poorly written specification! It took - David Turner three months of his spare time to get - it working correctly! :-) - - ttraster.[ch] The engine's second best piece. This is the - scan-line converter. Performs gray-level - rendering (also known as font-smoothing) as well - as dropout-control. - - -2. Configuration and Debugging ------------------------------- - - As stated above, configuration depends on two files: - - The environment configuration file `ft-conf.h': - - This file contains the definitions of many configuration options - that are processor and OS-dependent. On Unix systems, this file - is generated automatically by the `configure' script that comes - with the released package. - - On other environments, it is located in one of the architecture - directories found in `arch' (e.g. `arch/os2/ft-conf.h'). - - The path to this file should be passed to the compiler when - compiling _each_ component. (typically with an -I option). - - The engine configuration file `ttconfig.h': - - This file contains many configuration options that the developer - can turn on or off to experiment with some `features' of the - engine that are not part of its `simplest' form. The options - are commented. - - Note that the makefiles are compiler-specific. - - It is possible to enable the dumping of debugging information by - compiling the components with the various debug macros. Please - consult the file `ttconfig.h' for details. - - If you want to port the engine to another environment, you will - need to - - - Write a new `ft-conf.h' file for it. Just copy one of those - available and change the flags accordingly (they're all - commented). - - - Replace the memory, file, and mutex components with yours, - presenting the same interface and behaviour. - - - Eventually add some code in ttapi.c to initialize - system-specific data with the engine. - - - -III. Usage conventions -====================== - - -1. Error Handling ------------------ - - Error handling has been refined to allow reentrant builds of the - library, available only in the C version. We thus have now two - different conventions. - - In Pascal: - - A global error variable is used to report errors when they are - detected. All functions return a boolean that indicates success - or failure of the call. If an error occurs within a given - function, the latter must set the error variable and return - `false' (which means failure). - - It is then possible to make several calls in a single `if' - statement like: - - if not Perform_Action_1( parms_of_1 ) or - not Perform_Action_2( parms_of_2 ) or - not Perform_Action_3( parms_of_3 ) then goto Fail; - - where execution will jump to the `Fail' label whenever an error - occurs in the sequence of actions invoked in the condition. - - In C: - - Global errors are forbidden in re-entrant builds. Each function - thus returns directly an error code. A return value of 0 means - that no error occured, while a non-zero other value indicates a - failure of any kind. - - This convention is more constraining than the one used in the - Pascal source. The above Pascal statement should be translated - into the following C fragment: - - rc = Perform_Action_1( parms_of_1 ); - if ( rc ) - goto Fail; - - rc = Perform_Action_2( parms_of_2 ); - if ( rc ) - goto Fail; - - rc = Perform_Action_3( parms_of_3 ); - if ( rc ) - goto Fail; - - which, while being equivalent, isn't as pleasantly readable. - - One `simple' way to match the original fragment would be to - write: - - if ( (rc = Perform_Action_1( parms_of_1 )) || - (rc = Perform_Action_2( parms_of_2 )) || - (rc = Perform_Action_3( parms_of_3 )) ) - goto Fail; - - which is better but uses assignments within expressions, which - are always delicate to manipulate in C (the risk of writing `==' - exists, and would go unnoticed by a compiler). Moreover, the - assignments are a bit redundant and don't express much things - about the actions performed (they only speak of the error - management issue). - - That is why some macros have been defined for the most - frequently used functions. They relate to low-level routines - that are called very often (mainly i/o, mutex, and memory - handling functions). Each macro produces an implicit assignment - to a variable called `error' and can be used instead as a simple - function call. Example: - - if ( PERFORM_Action_1( parms_of_1 ) || - PERFORM_Action_2( parms_of_2 ) || - PERFORM_Action_3( parms_of_3 ) ) - goto Fail; - - with - - #define PERFORM_Action_1( parms_1 ) \ - ( error = Perform_Action_1( parms_1 ) ) - #define PERFORM_Action_2( parms_1 ) \ - ( error = Perform_Action_2( parms_1 ) ) - #define PERFORM_Action_3( parms_1 ) \ - ( error = Perform_Action_3( parms_1 ) ) - - defined at the beginning of the file. - - There, the developer only needs to define a local `error' - variable and use the macros directly in the code, without caring - about the actual error handling performed. Examples of such a - usage can be found in `ttload.c' and `ttgload.c'. Moreover, the - structure of the source files remain very similar, even though - the error handling is very different. - - This convention is very close to the use of exceptions in - languages like C++, Pascal, Java, etc. where the developer - focuses on the actions to perform, and not on every little error - checking. - - -2. Font File I/O ----------------- - - a. Streams - - The engine uses `streams' to access the font files. A stream is - a structure defined in the `File' component containing - information used to access files through a system-specific i/o - library. - - The current implementation of the File component uses the ANSI - libc i/o functions. However, for the sake of embedding in light - systems and independence of a complete libc, it is possible to - re-implement the component for a specific system or OS, letting - it use system calls. - - A stream is of type `TStream' defined in the `TTObjs' interface. - The type is `(void*)' but actually points to a structure defined - within the File component. - - A stream is created, managed and closed through the interface of - the `File' component. Several implementations of the same - component can co-exist, each taking advantage of specific system - features (the file `ttfile2.c' uses memory-mapped files for - instance) as long as it respects the interface. - - b. Frames - - TrueType is tied to the big-endian format, which implies that - reading shorts or longs from the font file may need conversions - depending on the target processor. To be able to easily detect - read errors and allow simple conversion calls or macros, the - engine is able to access a font file using `frames'. - - A frame is simply a sequence of successive bytes taken from the - input file at the current position. A frame is pre-loaded into - memory by a `TT_Access_Frame()' call of the `File' component. - - It is then possible to read all sizes of data through the - `Get_xxx()' functions, like Get_Byte(), Get_Short(), - Get_UShort(), etc. - - When all important data is read, the frame can be released by a - call to `TT_Forget_Frame()'. - - The benefits of frames are various. Consider these two - approaches at extracting values: - - if ( (error = Read_Short( &var1 )) || - (error = Read_Long ( &var2 )) || - (error = Read_Long ( &var3 )) || - (error = Read_Short( &var4 )) ) - - return FAILURE; - - and - - /* Read the next 16 bytes */ - if ( (error = TT_Access_Frame( 16L )) ) - return error; /* The Frame could not be read */ - - var1 = Get_Short(); /* extract values from the frame */ - var2 = Get_Long(); - var3 = Get_Long(); - var4 = Get_Short(); - - TT_Forget_Frame(); /* release the frame */ - - In the first case, there are four error assignments with four - checks of the file read. This unnecessarily increases the size - of the generated code. Moreover, you must be sure that `var1' - and `var4' are short variables, `var2' and `var3' long ones, if - you want to avoid bugs and/or compiler warnings. - - In the second case, you perform only one check for the read, and - exit immediately on failure. Then the values are extracted from - the frame, as the result of function calls. This means that you - can use automatic type conversion; there is no problem if - e.g. `var1' and `var4' are longs, unlike previously. - - On big-endian machines, the `Get_xxx()' functions could also be - simple macros that merely peek the values directly from the - frame, which speeds up and simplifies the generated code! - - And finally, frames are ideal when you are using memory-mapped - files, as the frame is not really `pre-loaded' and never uses - any `heap' space. - - IMPORTANT: You CANNOT nest several frame accesses. There is - only one frame available at a time for a specific - instance. - - It is also the programmer's responsibility to never - extract more data than was pre-loaded in the frame! - (But you usually know how many values you want to - extract from the file before doing so). - - -3. Memory Management --------------------- - - The library now uses a component which interface is similar to - malloc()/free(). It defines only two functions. - - * Alloc() - - To be used like malloc(), except that it returns an error code, - not an address. Its arguments are the size of the requested - block and the address of the target pointer to the `fresh' - block. An error code is returned in case of failure (and this - will also set the target pointer to NULL), 0 in case of success. - - Alloc() should always respect the following rules: - - - Requesting a block of size 0 should set the target pointer to - NULL and return no error code (i.e., return 0). - - - The returned block is always zeroed. This is an important - assumption of other parts of the library. - - If you wish to replace the memory component with your own, - please respect this behaviour, or your engine won't work - correctly. - - * Free() - - As you may have already guessed, Free() is Alloc()'s - counterpart. It takes as argument the _target pointer's - address_! You should _never_ pass the block's address directly, - i.e. the pointer, to Free(). - - Free should always respect the following rules: - - - Calling it with a NULL argument, or the address of a NULL - pointer is valid, and should return success. - - - The pointer is always set to NULL after the block's - deallocation. This is also an important assumption of many - other parts of the library. - - If you wish to replace the memory component with your own, - please respect this behaviour, or your engine won't work - correctly. - - As the pointers addresses needed as arguments are typed `void**', - the component's interface also provides in the C version some - macros to help use them more easily, these are: - - MEM_Alloc A version of Alloc that casts the argument pointer - to (void**). - - ALLOC Same as MEM_Alloc, but with an assignment to a - variable called `error'. See the section `error - handling' above for more info on this. - - FREE A version of Free() that casts the argument - pointer to (void**). There is currently no error - handling by with this macro. - - MEM_Set An alias for `memset()', which can be easily - changed to anything else if you wish to use a - different memory manager than the functions - provided by the ANSI libc. - - MEM_Copy An alias of `memcpy()' or `bcopy()' used to move - blocks of memory. You may change it to something - different if you wish to use something else that - your standard libc. - - -4. Support for threaded environments ------------------------------------- - - Support for threaded environments have been added to the C - sources, and only to these. It is now theorically possible to - build three distinct versions of the library: - - single-thread build: - - The default build. This one doesn't known about different - threads. Hence, no code is generated to perform coherent data - sharing and locking. - - thread-safe build: - - With this build, several threads can use the library at the - same time. However, some key components can only be used by - one single thread at a time, and use a mutex to synchronize - access to their functions. These are mainly the file, raster - and interpreter components. - - re-entrant build: - - A re-entrant version is able to perform certain actions in - parallel that a thread-safe one cannot. This includes - accessing file(s) in parallel, interpreting different - instruction streams in parallel, or even scan-line converting - distinct glyphs at the same time. - - Note that most of the latest changes in the engine are making the - distinction between the thread-safe and re-entrant builds thinner - than ever. - - There is a `ttmutex' component that presents a generic interface - to mutex operations. It should be re-implemented for each - platform. - - - - ---- end of convntns.txt --- Index: xc/extras/FreeType/docs/credits diff -u xc/extras/FreeType/docs/credits:1.1.1.2 xc/extras/FreeType/docs/credits:removed --- xc/extras/FreeType/docs/credits:1.1.1.2 Sat Feb 12 23:55:26 2000 +++ xc/extras/FreeType/docs/credits Wed Mar 16 20:59:37 2005 @@ -1,94 +0,0 @@ - -NOTE: This list is far from being complete. Please send a mail if - you want to be included. - - -David TURNER (david.turner@freetype.org) - - Main engine design and coding. Pascal source maintainer. - - -Robert WILHELM (robert.wilhelm@freetype.org) - - Web, FTP and CVS wizard & administrator. C source maintainer. - Incredible bug and spell fixer! - - -Werner LEMBERG (werner.lemberg@freetype.org) - - Internationalization and CJK guru. ttf2pk author. - - -Antoine LECA (antoine.leca@renault.fr) - - 16bit support for various compilersamd platforms. - - -Mark LEISHER (mleisher@crl.nmsu.edu) - - Internationalization. X11 font server prototype author. ttf2bdf - author. - - -Pavel KANKOVSKY (peak@argo.troja.mff.cuni.cz) - - Old logo, internationalization, on-line demo, humor, and - remarkable bug hunter! - - -Erwin DIETERICH (erwin.dieterich.ed@bayer-ag.de) - - *Real* internationalization :-) Author of the ftxerr18 and gettext - support. - - -Michal NECASEK (mike@mendelu.cz) - - Author and maintainer of the OS/2 font driver based on FreeType. - - -Munagala V. S. RAMANATH, CurveSoft, Inc. (ram@curvesoft.com) - - Contributor of many bug fixes and code improvements. - - -Williss, Dave (dwilliss@tnt.microimages.com) - - GSUB support. Author of the Mac port. - - -Yamano-uchi, Hidetoshi - - embedded bitmap support - - - -The following people have also contributed to the development of -FreeType: - - Beebe, Nelson H. F.: Tested FreeType on many platforms. - Benett, Kendall - Choi, Junho - Chong, Chin Soon - Chroboczek, Juliusz: Author of the xfsft Truetype font server. - Cohen, Marc L. - Davis, Jack - Demaille, Akim - Ellis, Duane - Feinberg, Matthew - Furr, Anthony - Hoo, Dave: 16bit support - Jamme, Thibault - Lewis, Kevin - Long, Jeff - Marukawa, Kazushi - Nijtmans, Jan - Olson, Eric - Paterson-Jones, Roland - Pommnitz, Joerg - Quigley, Ian - Steger, Helmut - Taggart, Scott - - ---- end of credits --- Index: xc/extras/FreeType/docs/freetype.lsm diff -u xc/extras/FreeType/docs/freetype.lsm:1.1.1.2 xc/extras/FreeType/docs/freetype.lsm:removed --- xc/extras/FreeType/docs/freetype.lsm:1.1.1.2 Sat Feb 12 23:55:27 2000 +++ xc/extras/FreeType/docs/freetype.lsm Wed Mar 16 20:59:37 2005 @@ -1,16 +0,0 @@ -Begin3 -Title: freetype -Version: 1.3 -Entered-date: 01SEP99 -Description: truetype font rasterizer -Keywords: font truetype rasterizer -Author: David Turner , - Werner Lemberg - Robert Wilhelm -Maintained-by: Robert Wilhelm -Primary-site: ftp://sunsite.unc.edu/pub/Linux/X11/fonts/ -Alternate-site: -Original-site: ftp://ftp.freetype.org/pub/freetype -Platforms: Linux, OS/2, MSDOS, Amiga OS, Unix, Mac, Windows -Copying-policy: BSD-like -End Index: xc/extras/FreeType/docs/glyphs.htm diff -u xc/extras/FreeType/docs/glyphs.htm:1.1.1.2 xc/extras/FreeType/docs/glyphs.htm:removed --- xc/extras/FreeType/docs/glyphs.htm:1.1.1.2 Sat Feb 12 23:55:27 2000 +++ xc/extras/FreeType/docs/glyphs.htm Wed Mar 16 20:59:37 2005 @@ -1,1257 +0,0 @@ - - -An introduction to glyphs - - - - - - - - -http://www.freetype.org

    - -

    - Glyph Hell

    - - An introduction to glyphs, as used and defined in - the FreeType engine

    -

    - -

    - -Introduction

    - -This article discusses in great detail the definition -of glyph metrics, per se the TrueType specification, and the way they -are managed and used by the FreeType engine. This information is -crucial when it comes to rendering text strings, either in a -conventional (i.e. Roman) layout, or with vertical or right-to-left -ones. Some aspects like glyph rotation and transformation are -explained too.

    - -Comments and corrections are highly welcome, and can be sent to the -FreeType developers list.

    - -


    - - -I. An overview of font files

    - -In TrueType, a single font file is used to contain -information related to classification, modeling and rendering of text -using a given typeface. This data is located in various independent -`tables', which can be sorted in four simple classes, as described -below:

    - -

      - -
    • Face Data

      - - We call face data the amount of information related to a - given typeface, independently of any particular scaling, - transformation, and/or glyph index. This usually means some - typeface-global metrics and attributes, like family and styles, - PANOSE number, typographic ascenders and descenders, as well as - some very TrueType specific items like the font `programs' found - in the fpgm and prep tables, the gasp table, - character mappings, etc.

      - - In FreeType, a face object is used to model a font file's - face data.

      - -

    • Instance Data

      - - We call instance a given pointsize/transformation, at a - given device resolution (e.g. 8pt at 96x96dpi, or 12pt at - 300x600dpi, etc). Some tables found in the font files are used to - produce instance-specific data, like the cvt table, or the - prep program. Though they are often part of the face data, - their processing results in information called instance - data.

      - - In FreeType, it is modeled through an instance object, - which is always created from an existing face object.

      - -

    • Glyph Data

      - - We call glyph data the piece of information related to - specific glyphs. This includes the following things that are - described in more details in the next sections:

      - -

        - -
      • The glyph's vectorial representation, also called its - outline.

        - -

      • Various metrics, like the glyph's bounding box, its - bearings and advance values.

        - -

      • TrueType specifies a specific instruction bytecode, - used to associate each glyph with a small program, - called the glyph code. Its purpose is to grid-fit the - outline to any target instance, in order to produce excellent - output at small pixel sizes. - -

      - - The FreeType engine doesn't map each glyph to a single structure, - as this would waste memory for no good reason. Rather, a glyph - object is a container, created from any active face, - which can be used to load and/or process any font glyph at any - instance (or even no instance at all). Of course, the glyph - properties (outline, metrics, bitmaps, etc.) can be extracted - independently from an object once it has been loaded or - processed.

      - -

    • Text and Layout Data

      - - Finally, there is a last class of data that doesn't really fit in - all others, and that can be called text data. It comprises - information related to the grouping of glyphs together to form - text. Simple examples are the kerning table, which - controls the spacing between adjacent glyphs, as well as some of - the extensions introduced in TrueType Open, - OpenType, and TrueType GX like glyph substitution - (ligatures, vertical representations), baseline management, - justification, etc.

      - - This article focuses on the basic TrueType tables, and hence, will - only talk about kerning, as FreeType doesn't support OpenType nor - GX (yet). [Support for TrueType Open is already partially - available.] - -

    - -


    - - -II. Glyph Outlines

    - -TrueType is a scalable font format; it is thus -possible to render glyphs at any scale, and under any affine -transform, from a single source representation. However, simply -scaling vectorial shapes exhibits at small sizes (where `small' refers -here to anything smaller than at least 150 pixels) a collection -of un-harmonious artifacts, like widths and/or heights -degradations.

    - -Because of this, the format also provides a complete programming -language used to design small programs associated to each glyph. Its -role is to align the point positions on the pixel grid after the -scaling. This operation is hence called grid-fitting, or even -hinting.

    - -

      - -
    1. Vectorial representation

      - - The source format of outlines is a collection of closed paths - called contours. Each contour delimits an outer or inner - region of the glyph, and can be made of either line segments - and/or second-order beziers (also called conic beziers or - quadratics).

      - - It is described internally as a series of successive points, with - each point having an associated flag indicating whether it is `on' - or `off' the curve. These rules are applied to decompose the - contour:

      - -

        - -
      • Two successive `on' points indicate a line segment joining - them.

        - -

      • One `off' point amidst two `on' points indicates a conic - bezier, the `off' point being the control point, and the `on' - ones the start and end points.

        - -

      • Finally, two successive `off' points forces the rasterizer - to create (only during bitmap rendering) a virtual `on' point - amidst them, at their exact middle. This greatly facilitates - the definition of successive Bezier arcs. - -

      - -

      -                                  *              # on
      -                                                 * off
      -                               __---__
      -  #-__                      _--       -_
      -      --__                _-            -
      -          --__           #               \
      -              --__                        #
      -                  -#
      -                           Two `on' points
      -   Two `on' points       and one `off' point
      -                            between them
      -
      -
      -
      -                *
      -  #            __      Two `on' points with two `off'
      -   \          -  -     points between them.  The point
      -    \        /    \    marked `0' is the middle of the
      -     -      0      \   `off' points, and is a `virtual
      -      -_  _-       #   on' point where the curve passes.
      -        --             It does not appear in the point
      -                       list.
      -        *
      -
      - - - - Each glyph's original outline points are located on a grid of - indivisible units. The points are stored in the font file as - 16-bit integer grid coordinates, with the grid origin's being at - (0,0); they thus range from -16384 to 16383.

      - - In creating the glyph outlines, a type designer uses an imaginary - square called the EM square. Typically, the EM square - encloses the capital letter `M' and most other letters of a - typical roman alphabet. The square's size, i.e., the number of - grid units on its sides, is very important for two reasons:

      - -

        - -
      • It is the reference used to scale the outlines to a given - instance. For example, a size of 12pt at 300x300dpi - corresponds to 12*300/72 = 50 pixels. This is the - size the EM square would appear on the output device if it was - rendered directly. In other words, scaling from grid units to - pixels uses the formula

        - -

        - pixel_size = point_size * - resolution / 72 -

        - -

        - pixel_coordinate = grid_coordinate * - pixel_size / EM_size -

        - -

      • The greater the EM size is, the larger resolution the - designer can use when digitizing outlines. For example, in - the extreme example of an EM size of 4 units, there are - only 25 point positions available within the EM square - which is clearly not enough. Typical TrueType fonts use an EM - size of 2048 units (note: with Type 1 PostScript - fonts, the EM size is fixed to 1000 grid units. However, - point coordinates can be expressed in floating values). - -

      - - Note that glyphs can freely extend beyond the EM square if the - font designer wants this. The EM is used as a convenience, and is - a valuable convenience from traditional typography.

      - -

      - - Grid units are very often called font units or EM - units. - -

      - -


      - IMPORTANT NOTE:

      - - Under FreeType, scaled pixel positions are all expressed in the - 26.6 fixed float format (made of a 26-bit integer mantissa, and a - 6-bit fractional part). In other words, all coordinates are - multiplied by 64. The grid lines along the integer pixel - positions, are multiples of 64, like (0,0), (64,0), (0,64), - (128,128), etc., while the pixel centers lie at middle coordinates - (32 modulo 64) like (32,32), (96,32), etc. -


      - -

    2. Hinting and Bitmap rendering

      - - As said before, simply scaling outlines to a specific instance - always creates undesirable artifacts, like stems of different - widths or heights in letters like `E' or `H'. Proper glyph - rendering needs that the scaled points are aligned along the pixel - grid (hence the name grid-fitting), and that important - widths and heights are respected throughout the whole font (for - example, it is very often desirable that the letters `I' and `T' - have their central vertical line of the same pixel width).

      - - Type 1 PostScript font files include with each glyph a small - series of distances called hints, which are later used by - the type manager to try grid-fitting the outlines as cleverly as - possible. On one hand, it has the consequence that upgrading your - font engine can enhance the visual aspects of all fonts of your - system; on the other hand, the quality of even the best version of - Adobe's Type Manager isn't always very pleasing at small sizes - (notwithstanding font smoothing).

      - - TrueType takes a radically different approach: Each glyph has an - associated `program', designed in a specific geometrical language, - which is used to align explicitly each outline point to the pixel - grid, preserving important distances and metrics. A stack-based - low-level bytecode is used to store it in the font file, and is - interpreted later when rendering the scaled glyphs.

      - - This means that even very complex glyphs can be rendered perfectly - at very small sizes, as long as the corresponding glyph code is - designed correctly. Moreover, a glyph can loose some of its - details, like serifs, at small sizes to become more readable, - because the bytecode provides interesting features.

      - - However, this also have the sad implication that an ill-designed - glyph code will always render junk, whatever the font engine's - version, and that it's very difficult to produce quality glyph - code. There are about 200 TrueType opcodes, and no known - `high-level language' for it. Most type artists aren't - programmers at all and the only tools able to produce quality code - from vectorial representation have been distributed to only a few - font foundries, while tools available to the public, e.g. - Fontographer, are usually expensive though generating average to - mediocre glyph code.

      - - All this explains why an enormous number of broken or ugly `free' - fonts have appeared on the TrueType scene, and that this format is - now mistakenly thought as `crap' by many people. Funnily, these - are often the same who stare at the `beauty' of the classic `Times - New Roman' and `Arial/Helvetica' at 8 points.

      - - Once a glyph's code has been executed, the scan-line converter - converts the fitted outline into a bitmap (or a pixmap with - font-smoothing). - -

    - - -


    - -III. Glyph metrics

    - -

      - -
    1. Baseline, Pens and Layouts

      - - The baseline is an imaginary line that is used to `guide' glyphs - when rendering text. It can be horizontal (e.g. Roman, Cyrillic, - Arabic, etc.) or vertical (e.g. Chinese, Japanese, etc). - Moreover, to render text, a virtual point, located on the - baseline, called the pen position, is used to locate - glyphs.

      - - Each layout uses a different convention for glyph placement:

      - -

        - -
      • With horizontal layout, glyphs simply `rest' on the - baseline. Text is rendered by incrementing the pen position, - either to the right or to the left.

        - -

        -

        -

        - - The distance between two successive pen positions is - glyph-specific and is called the advance width. Note - that its value is always positive, even for - right-to-left oriented alphabets, like Arabic. This - introduces some differences in the way text is rendered.

        - -


        - IMPORTANT NOTE:

        - - The pen position is always placed on the baseline in - TrueType, unlike the convention used by some graphics - systems, like Windows, to always put the pen above the line, - at the ascender's position. -


        - -

      • With vertical layout, glyphs are centered around the - baseline:

        - -

        - -
        - -

      - -

    2. Typographic metrics and bounding - boxes

      - - A various number of face metrics are defined for all glyphs in - a given font. Three of them have a rather curious status in - the TrueType specification; they only apply to horizontal - layouts:

      - -

        - -
      • The ascent

        - - This is the distance from the baseline to the highest/upper - grid coordinate used to place an outline point. It is a - positive value, due to the grid's orientation with the - y axis upwards.

        - -

      • The descent

        - - The distance from the baseline to the lowest grid coordinate - used to place an outline point. This is a negative value, - due to the grid's orientation.

        - -

      • The linegap

        - - The distance that must be placed between two lines of text. - The baseline-to-baseline distance should be computed as

        - -

        - ascent - descent + linegap -

        - - if you use the typographic values. - -

      - - The problem with these metrics is that they appear three times - in a single font file, each version having a slightly different - meaning:

      - -

        - -
      1. The font's horizontal header provides the ascent, descent - and linegap fields, which are used to express the designer's - intents, rather than the real values that may be computed - from all glyphs in the outline. These are used by the - Macintosh font engine to perform font mapping (i.e. font - substitution).

        - -

      2. The OS/2 table provides the usWinAscent and - usWinDescent fields. These values are computed for - glyphs of the Windows ANSI charset only, which means that - they are wrong for any other glyph. Note that - usWinDescent is always positive (i.e. looks like - `-descent').

        - -

      3. The OS/2 table provides the typoAscender, - typoDescender and typoLinegap values, which - hopefully concern the whole font file. These are the - correct system-independent values! - -

      - - All metrics are expressed in font units. If you want to use any - of the two first versions of these metrics, the TrueType - specification contains some considerations and computing tips - that might help you.

      - - Other, simpler metrics are:

      - -

        - -
      • The glyph's bounding box, also called bbox

        - - This is an imaginary box that encloses any glyph (usually as - tightly as possible). It is represented by four fields, - namely xMin, yMin, xMax, and - yMax, that can be computed for any outline. In - FreeType, their values can be in font units (if measured in - the original outline) or in 26.6 pixel units (if - measured on scaled outlines).

        - - Note that if it wasn't for grid-fitting, you wouldn't need - to know a box's complete values, but only its dimensions to - know how big is a glyph outline/bitmapa. However, correct - rendering of hinted glyphs needs the preservation of - important grid alignment on each glyph translation/placement - on the baseline, which is why FreeType always returns the - complete glyph outline.

        - - Note also that the font's header contains a global font - bounding box in font units which should enclose all glyphs - in a font. This can be used to pre-compute the maximum - dimensions of any glyph at a given instance.

        - -

      • The internal leading

        - - This concept comes directly from the world of traditional - typography. It represents the amount of space within the - `leading' which is reserved for glyph features that lay - outside of the EM square (like accentuation). It usually - can be computed as

        - -

        - internal_leading = ascent - descent - - EM_size -

        - -

      • The external leading

        - - This is another name for the linegap. - -

      - -

    3. Bearings and Advances

      - - Each glyph has also distances called bearings and - advances. Their definition is constant, but their values - depend on the layout, as the same glyph can be used to render - text either horizontally or vertically.

      - -

        -
      1. The left side bearing: a.k.a. bearingX

        - - This is the horizontal distance from the current pen - position to the glyph's left bounding box edge. It is - positive for horizontal layouts, and most generally negative - for vertical one.

        - -

      2. The top side bearing: a.k.a. bearingY

        - - This is the vertical distance from the baseline to the top - of the glyph's bounding box. It is usually positive for - horizontal layouts, and negative for vertical ones

        - -

      3. The advance width: a.k.a. advanceX

        - - This is the horizontal distance the pen position must be - incremented (for left-to-right writing) or decremented (for - right-to-left writing) by after each glyph is rendered when - processing text. It is always positive for horizontal - layouts, and null for vertical ones.

        - -

      4. The advance height: a.k.a. advanceY

        - - This is the vertical distance the pen position must be - decremented by after each glyph is rendered. It is always - null for horizontal layouts, and positive for vertical - layouts.

        - -

      5. The glyph width

        - - The glyph's horizontal extent. More simply, it is - (bbox.xMax - bbox.xMin) for unscaled font coordinates. - For scaled glyphs, its computation requests specific care, - described in the grid-fitting chapter below.

        - -

      6. The glyph height

        - - The glyph's vertical extent. More simply, it is - (bbox.yMax - bbox.yMin) for unscaled font coordinates. - For scaled glyphs, its computation requests specific care, - described in the grid-fitting chapter below.

        - -

      7. The right side bearing

        - - Only used for horizontal layouts to describe the distance - from the bbox's right edge to the advance width. It is in - most cases a non-negative number. The FreeType library - doesn't provide this metric directly, as it isn't really - part of the TrueType specification. It can be computed - simply as

        - -

        - advance_width - left_side_bearing - (xMax-xMin) -
        - -

      - -

      -

      - - -

      - - Finally, if you use `ABC widths' under Windows and OS/2, the - following relations apply: - -

      -  A = left side bearing
      -  B = width
      -  C = right side bearing
      -
      -  A+B+C = advance width
      -
      - -
    4. The effects of grid-fitting

      - - All these metrics are stored in font units in the font file. - They must be scaled and grid-fitted properly to be used at a - specific instance. This implies several things:

      - -

        - -
      • First, a glyph program not only aligns the outline along - the grid pixel, it also processes the left side bearing and - the advance width. Other grid-fitted metrics are usually - available in optional TrueType tables if you need them.

        - -

      • A glyph program may decide to extend or stretch any of - these two metrics if it has a need for it. This means that - you cannot assume that the fitted metrics are simply equal - to the scaled one plus or minus a liberal distance - < 1 pixel (i.e., less than 64 fractional - pixel units). For example, it is often necessary to stretch - the letter `m' horizontally at small pixel sizes to make all - vertical stems visible, while the same glyph can be - perfectly `square' at larger sizes.

        - -

      • Querying the fitted metrics of all glyphs at a given - instance is very slow, as it needs to load and process each - glyph independently. For this reason, some optional - TrueType tables are defined in the specification, containing - pre-computed metrics for specific instances (the most - commonly used, like 8, 9, 10, 11, 12, and 14 points at - 96dpi, for example). These tables aren't always present in - a TrueType font.

        - - If you don't need the exact fitted value, it's much faster - to query the metrics in font units, then scale them to the - instance's dimensions. - -

      - -


      - IMPORTANT NOTE:

      - - Another very important consequence of grid-fitting is the fact - that moving a fitted outline by a non-integer pixel distance - will simply ruin the hinter's work, as alignments won't be - preserved. The translated glyph will then look `ugly' when - converted to a bitmap!

      - - In other words, each time you want to translate a fitted glyph - outline, you must take care of only using integer pixel - distances (the x and y offsets must be multiples - of 64, which equals to 1.0 in the 26.6 fixed float - format). - - If you don't care about grid-fitting (typically when rendering - rotated text), you can use any offset you want and use sub-pixel - glyph placement. -


      - -

    - -

    - - -IV. Text processing

    - -This section demonstrates how to use the concepts previously defined -to render text, whatever the layout you use.

    - -

      - -
    1. Writing simple text strings

      - - We will start by generating a simple string with a Roman alphabet. - The layout is thus horizontal, left to right.

      - - For now, we will assume all glyphs are rendered in a single target - bitmap. The case of generating individual glyph bitmaps, then - placing them on demand on a device is presented in a later chapter - of this section.

      - - Rendering the string needs to place each glyph on the baseline; - this process looks like the following:

      - -

        - -
      1. Place the pen to the cursor position. The pen is always - located on the baseline. Its coordinates must be grid-fitted - (i.e. multiples of 64)!

        - -

        -  pen_x = cursor_x;
        -  pen_y = cursor_y;
        -
        - -
      2. Load the glyph outline and its metrics. Using the flag - TTLOAD_DEFAULT will scale and hint the glyph: - -
        -  TT_Load_Glyph( instance,
        -                 glyph,
        -                 glyph_index,
        -                 TTLOAD_DEFAULT );
        -
        -  TT_Get_Glyph_Metrics( glyph, &metrics );
        -  TT_Get_Glyph_Outline( glyph, &outline );
        -
        - -
      3. The loader always places the glyph outline relative to the - imaginary pen position (0,0). You thus simply need to - translate the outline by the vector: - -
        -  ( pen_x, pen_y )
        -
        - - To place it on its correct position, you can use the call - -
        -  TT_Translate_Outline( outline, pen_x, pen_y );
        -
        - -
      4. Render the outline in the target bitmap, the glyph will be - surimposed on it with a binary `or' operation (FreeType never - creates glyph bitmaps by itself, it simply renders glyphs in - the arrays you pass to it. See the API reference for a - complete description of bitmaps and pixmaps). - -
        -  TT_Get_Outline_Bitmap( outline, &target_bitmap );
        -
        - -
        - IMPORTANT NOTE:

        - - If you don't want to access the outline in your code, you can - also use the API function TT_Get_Glyph_Bitmap() which does the - same as the previous lines: - -

        -  TT_Get_Glyph_Outline( glyph, &outline );
        -  TT_Translate_Outline( outline, x_offset, y_offset );
        -  TT_Get_Outline_Bitmap( outline, &target_bitmap );
        -  TT_Translate_Outline( outline, -x_offset, -y_offset );
        -
        - - is equivalent to: - -
        -  TT_Get_Glyph_Bitmap( glyph,
        -                       x_offset,
        -                       y_offset,
        -                       &target_bitmap );
        -
        -

        - -

      5. Now advance the pen to its next position. The advance is - always grid-fitted when the glyph was hinted:

        - -

        -  pen_x += metrics.advance;
        -
        - - The advance being grid-fitted, the pen position remains - aligned on the grid.

        - -

      6. Start over on item 2 until string completion. That's - it! - -

      - -

    2. Writing right-to-left and vertical text

      - - Generating strings for different layouts is very similar. Here - are the most important differences.

      - -

        - -
      • For right-to-left text (like Arabic)

        - - The main difference here is that, as the advance width and - left side bearings are oriented against the flow of text, the - pen position must be decremented by the advance width, - before placing and rendering the glyph. Other than - that, the rest is strictly similar.

        - -

      • For vertical text (like Chinese or Japanese)

        - - In this case, the baseline is vertical, which means that the - pen position must be shifted in the vertical direction. You - need the vertical glyph metrics to do that (using the - TT_Get_Big_Glyph_Metrics() function).

        - - Once you get these, the rest of the process is very similar. - The glyph outline is placed relative to an imaginary origin of - (0,0), and you should translate it to the pen position before - rendering it.

        - - The big difference is that you must decrement pen_y, rather - than increment pen_x (this is for the TrueType convention of y - oriented upwards). - -

        -  pen_y -= metrics.advance;
        -
        - -

      - -

    3. Generating individual glyph bitmaps and using - them to render text

      - - Loading each glyph when rendering text is slow, and it's much - more efficient to render each one in a standalone bitmap to place - it in a cache. Text can then be rendered fast by applying simple - blit operations on the target device.

      - - To be able to render text correctly with the bitmaps, you must - record and associate with them its fitted bearings and advances. - Hence the following process:

      - -

        - -
      1. Generate the bitmaps.

        - -

          - -
        • Load the glyph and get its metrics. - -
          -  TT_Load_Glyph( instance,
          -                 glyph,
          -                 glyph_index,
          -                 TTLOAD_DEFAULT );
          -
          -  TT_Get_Glyph_Metrics( glyph, &metrics );
          -
          - - The bbox is always fitted when calling - TT_Get_Glyph_Metrics() on a hinted glyph. You can then - easily compute the glyph's dimension in pixels as: - -
          -  width  = (bbox.xMax - bbox.xMin) / 64;
          -  height = (bbox.yMax - bbox.yMin) / 64;
          -
          - - NOTE 1:
          - The fitted bounding box always contains all the dropouts - that may be produced by the scan-line converter. This - width and height are thus valid for all kinds of - glyphs).

          - - NOTE 2:
          - If you want to compute the dimensions of a rotated - outline's bitmap, compute its bounding box with - TT_Get_Outline_BBox(), then grid-fit the bbox manually: - -

          -  #define  FLOOR(x)    ((x) & -64)
          -  #define  CEILING(x)  (((x)+63) & -64)
          -
          -  xMin = FLOOR(xMin);
          -  yMin = FLOOR(yMin);
          -  yMin = CEILING(xMax);
          -  yMax = CEILING(yMax);
          -
          - - then compute width and height as above.

          - -

        • Create a bitmap of the given dimension, e.g.: - -
          -  bitmap.width  = width;
          -  bitmap.cols   = (width+7) & -8;
          -  bitmap.rows   = height;
          -  bitmap.flow   = TT_Flow_Up;
          -  bitmap.size   = bitmap.cols * bitmap.rows;
          -  bitmap.buffer = malloc( bitmap.size );
          -
          - -
        • Render the glyph into the bitmap.

          - - Don't forget to shift it by (-xMin, -yMin) to fit it in - the bitmap: - -

          -  /* Note that the offsets must be grid-fitted to */
          -  /* preserve hinting!                            */
          -  TT_Get_Glyph_Bitmap( glyph,
          -                       &bitmap,
          -                       -bbox.xMin,
          -                       -bbox.yMin );
          -
          - -
        - -
      2. Store the bitmap with the following values: - -
        -  bearingX / 64 = left side bearing in pixels
        -  advance / 64  = advance width/height in pixels
        -
        - - When your cache is set up, you can then render text using a - scheme similar to the ones describe in 1. and 2., - with the exception that now pen positions and metrics are - expressed in pixel values. We are done! - -
        -  pen_x = cursor_x;
        -  pen_y = cursor_y;
        -
        -  while ( glyph_to_render )
        -  {
        -    access_cache( glyph_index, metrics, bitmap );
        -
        -    blit_bitmap_to_position
        -     ( pen_x + bearingX,
        -       pen_y (+ bearingY depending on orientation ) );
        -
        -    pen_x += advance;
        -  }
        -
        - -
      - -
    4. Device-independent text rendering

      - - The previously described rendering processes all align glyphs on - the baseline according to metrics fitted for the display's - distance. In some cases, the display isn't the final output, and - placing the glyphs in a device-independent way is more important - than anything.

      - - A typical case is a word processor which displays text as it - should appear on paper when printed. As you've probably noticed, - the glyphs aren't always spaced uniformly on the screen as you - type them, sometimes the space between an `m' and a `t' is too - small, some other it is too large, etc.

      - - These differences are simply due to the fact that the word - processor aligns glyphs in an device-independent way, using - original metrics in font units to do it, then scale them as it - can to display text on screen, usually at a very smaller - resolution than your printer's one.

      - - Device-independence is a crucial part of document portability, - and it is very saddening to see that most professional word - processors don't do it correctly. For example, MS Word uses - the fitted metrics of the printer's resolution, rather than the - originals in font units.

      - - This is great to get sure that your text prints very well on your - printer, but it also implies that someone printing the exact same - document on a device with different output resolutions (e.g. - bubble-jet vs. laser printers) may encounter trouble.

      - - As the differences in advances accumulate on one line, they can - sum to the width of one or more glyphs in extreme cases, which is - enough to `overflow' the automatic justification algorithm. This - may add additional lines of printed text, or even remove some. - Moreover, supplemental lines can produce unexpected page breaks - and `blank' pages. This can be extremely painful when working - with large documents, as this `feature' may require you to - redesign completely your formatting to re-print it.

      - - In conclusion, if you want portable document rendering, never - hesitate to use and apply device-independent terms! For example, - a simple way to produce text would be:

      - -

        - -
      1. Get a scale to convert from your device-independent units - to 26.6 pixels.

        - -

      2. Get another scale to convert from original font units to - device-independent units.

        - -

      3. Perform pen placement and advances in device-independent - units.

        - -

      4. To render each glyph, compute the pen's rounded position, - as well as the rounded glyph left side bearing, both - expressed in 26.6 pixels (don't use the fitted metrics). You - will then be able to place the glyph and/or blit its bitmap. - -

      - -

    5. Kerning glyphs

      - - An interesting effect that most people appreciate is - kerning. It consists of modifying the spacing between two - successive glyphs according to their outlines. For example, the - letters `T' and a `y' can be easily moved closer, as the top of - the `y' fits nicely under the `T's upper right bar.

      - - To perform kerning, the TrueType specification provides a - specific table (its tag being `kern'), with several storage - formats. This section doesn't explain how to access this - information; however, you can have a look at the standard - extension called `ttkern.h' which comes with FreeType.

      - - The kerning distance between two glyphs is a value - expressed in font units which indicates whether their outline can - be moved together or apart when one follows the other. The - distance isn't reflexive, which means that the kerning for the - glyph pair (`T',`y') isn't the same as the one for (`y',`T').

      - - The value is positive when the glyphs must be moved apart, and - negative when they must be moved closer. You can implement - kerning simply by adding its scaled and rounded value to the - advance width when moving the pen position. Here an example for - horizontal kerning: - -

      -  #define ROUND( x )  ( (x + 32) & -64 )
      -
      -  scaled_kerning = kerning * imetrics.x_scale / 0x10000;
      -
      -  pen_x += metrics.advance + ROUND( scaled_kerning );
      -
      - -
    6. Rotated and stretched/slanted text

      - - In order to produce rotated glyphs with FreeType, one must - understand a few things:

      - -

        - -
      • The engine doesn't apply specific transformations to the - glyphs it loads and processes (other than the simpler - resolution-base scaling and grid-fitting). If you want to - rotate glyphs, you will have to load their outline, then apply - the geometric transformations that please you (a number of - APIs are there to help you to do it easily).

        - -

      • Even if the glyph loader hints `straight' glyphs, it is - possible to inform the font and glyph programs that you're - going to later transform the resulting outlines. Two flags - can be passed to the bytecode interpreter:

        - -

          - -
        • The `rotated' flag indicates that you are going to - rotate the glyphs in a non-trivial direction (i.e., on - neither of the two coordinate axis). You are advised not - to set it when writing 90 degrees-rotated text for - example.

          - -

        • The `stretched' flag indicates that you are going to - apply a transformation that will distort distances. While - rotations and symmetries keep distances constant, slanting - and stretching do modify them. - -
        - -

      - - These flags can be interpreted by the glyph code to toggle certain - processings which vary from one font to the other. However, most - of the TrueType fonts that were tested with FreeType, if not all - of them, simply change the dropout-mode when any of these flags is - set, and/or disable hinting when rotation is detected. We advise - you to never set these flags, even when rotating text. For what - it's worth, hinted rotated text is no uglier than un-hinted - one.

      - - You can use the function TT_Set_Instance_Transform_Flags() to set - them. Then, rendering can be done with the following calls: - -

      -  /* set the flags */
      -  TT_Set_Instance_Transforms( instance, 
      -                              rotated,
      -                              stretched );
      -
      -  /* load a given glyph */
      -  TT_Get_Glyph_Outline( instance,
      -                        glyph,
      -                        index,
      -                        TTLOAD_DEFAULT );
      -
      -  /* access its outline */
      -  TT_Get_Glyph_Outline( instance, &outline );
      -
      -  /* in order to transform it */
      -  TT_Transform_Outline( outline, &matrix );
      -  /* and/or */
      -  TT_Translate_Outline( outline,
      -                        x_offset, y_offset );
      -
      -  /* to render it */
      -  TT_Get_Outline_Bitmap( outline, &bitmap );
      -
      - - Here is an example, assuming that the following variables - -
      -  TT_Matrix  matrix;        /* 2x2 matrix */
      -  TT_Pos     x_off, y_off;  /* corrective offsets */
      -
      - - define a transformation that can be correctly applied to a glyph - outline which have been previously placed relative to the - imaginary point position (0,0) with bearings preserved. Rendering - text can now be done as follows:

      - -

        - -
      1. Initialize the pen position; when rotating, it is extremely - well advised to use sub-pixel placement as you don't care - about hinting. - -
        -  pen_x = cursor_x;
        -  pen_y = cursor_y;
        -
        - -
      2. Transform the glyph as needed, then translate it to the - current pen position: - -
        -  TT_Transform_Outline( outline, &matrix );
        -  TT_Translate_Outline( outline,
        -                        pen_x + x_off,
        -                        pen_y + y_off );
        -
        - - (Note that the transformation offsets have been included in - the translation.)

        - -

      3. Render the bitmap, as it has now been placed correctly.

        - -

      4. To change the pen position, transform the vector (0,advance) - with your matrix, and add it: - -
        -  vec_x = metrics.advance;
        -  vec_y = 0;
        -  TT_Transform_Vector( &vec_x, &vec_y, &matrix );
        -  pen_x += vec_x;
        -  pen_y += vec_y;
        -
        - -
      5. Start over at 2. until completion. - -

      - -


      - IMPORTANT NOTE:

      - - Do not grid-fit the pen position before rendering your glyph when - rendering rotated text. If you do, your transformed baseline - won't be preserved on each glyph, and the text will look like it's - `hopping' randomly. This is particularly visible at small - sizes.

      - - Sub-pixel precision placement is very important for clean - rotated text. -


      - -

    7. Font-smoothing, a.k.a. gray-levels - rendering

      - - The FreeType engine's scan-line converter (the component also - called the rasterizer) is able to convert a vectorial glyph - outline into either a normal bitmap, or an 8-bit pixmap (a.k.a. - colored bitmaps on some systems). This last feature is - called gray-level rendering or font-smoothing, - because it uses a user-supplied palette to produce anti-aliased - versions of the glyphs.

      - - Its principle is to render a bitmap which is twice as large than - the target pixmap, then simply filtering it using a 2x2 - summation.

      - -


      - NOTE:

      - - FreeType's scan-line converter doesn't use or need an intermediate - second bitmap. Rather, filtering is performed in a single pass - during the sweep (see the file `raster.txt' for more information - about it). -


      - - You'll notice that, as with Windows 95, FreeType's rasterizer - only grays those parts of the glyph which need it, i.e., diagonals - and curves, while keeping horizontal and vertical stems straight - `black'. This greatly improves the legibility of text, while - avoiding the `blurry' look anti-aliased fonts typically found with - Adobe's Type Manager or Acrobat.

      - - There are thus five available gray-levels, ranging from 0 - to 4, where level 0 and level 4 are the background - and foreground colors, respectively, and where levels 1, - 2, 3 are intermediate. For example, to render black text on - a white background, one can use a palette like:

      - -

        - - palette[0] = white (background)
        - palette[1] = light gray
        - palette[2] = medium gray
        - palette[3] = dark gray
        - palette[4] = black (foreground)
        - -

      - - To set the engine's gray-level palette, simply use the API - function TT_Set_Raster_Palette() after initialization. It expects - an array of 5 chars which will be used to render the - pixmaps.

      - - Note that the rasterizer doesn't create bitmaps or pixmaps. - Rather, it simply renders glyphs in the arrays you pass to it. - The generated glyph bitmaps are simply `or'-ed to the target (with - 0 being the background as a convention); in the case of pixmaps, - pixels are simply written to the buffer, in spans of four aligned - bytes.

      - -


      - NOTE:

      - - The raster isn't able to superpose `transparent' glyphs on the - target pixmap. This means that you should always call the API - functions TT_Get_Glyph_Pixmap() and TT_Get_Outline_Pixmap() with - an empty map, and perform the superposition yourself.

      - - This can be more or less tricky, depending on the palette you are - using and your target graphics resolution. One of the components - found in the test directory, called `display.c', has large - comments on the way it implements it for the test programs. You - are encouraged to read the test program sources to understand how - one can take advantage of font smoothing.

      - - Pixmap surimposition is too system-specific a feature to be part - of the FreeType engine. Moreover, not everybody needs it! -


      - - Finally, the question of sur-imposing anti-aliased colored text on - any texture, since being even more tricky, is left as an exercise - to the reader ;-) If this topic really interests you, the - FreeType mailing list may host some helpful enthusiasts ready to - answer your questions. Who knows :-)

      - -

    8. Other interesting text processes

      - -

        - -
      • Glyph substitution

        - - Substitution is used to replace one glyph by another when some - specific condition is met in the text string. Its most common - examples are ligatures (like replacing the `f' followed by `i' - by the single glyph `fi' if available in the font), as well as - positional selection as performed in the Arabic script (for - those not aware of this, each letter of the Arabic alphabet - can be written differently according to its position on words: - starting, ending, intermediate, or isolated).

        - - The base TrueType format doesn't define any table for glyph - substitution. However, GX, TrueType Open, and OpenType - provide (incompatible) extensions to perform it. Of course, - it isn't supported by the engine, but an extension could be - easily written to access the required tables.

        - - [Support for TrueType Open is already partially available.]

        - -

      • Justification

        - - ... - -

      - -
    - -To be continued... - - - Index: xc/extras/FreeType/docs/glyphs.txt diff -u xc/extras/FreeType/docs/glyphs.txt:1.1.1.2 xc/extras/FreeType/docs/glyphs.txt:removed --- xc/extras/FreeType/docs/glyphs.txt:1.1.1.2 Sat Feb 12 23:55:28 2000 +++ xc/extras/FreeType/docs/glyphs.txt Wed Mar 16 20:59:37 2005 @@ -1,999 +0,0 @@ -http://www.freetype.org - - Glyph Hell - - An introduction to glyphs, as used and defined in the FreeType engine - - ------------------------------------------------------------------------ - -Introduction - -This article discusses in great detail the definition of glyph metrics, per -se the TrueType specification, and the way they are managed and used by the -FreeType engine. This information is crucial when it comes to rendering text -strings, either in a conventional (i.e. Roman) layout, or with vertical or -right-to-left ones. Some aspects like glyph rotation and transformation are -explained too. - -Comments and corrections are highly welcome, and can be sent to the FreeType -developers list. - - ------------------------------------------------------------------------ - -I. An overview of font files - -In TrueType, a single font file is used to contain information related to -classification, modeling and rendering of text using a given typeface. This -data is located in various independent `tables', which can be sorted in four -simple classes, as described below: - - * Face Data - - We call face data the amount of information related to a given - typeface, independently of any particular scaling, transformation, - and/or glyph index. This usually means some typeface-global metrics and - attributes, like family and styles, PANOSE number, typographic - ascenders and descenders, as well as some very TrueType specific items - like the font `programs' found in the fpgm and prep tables, the gasp - table, character mappings, etc. - - In FreeType, a face object is used to model a font file's face data. - - * Instance Data - - We call instance a given pointsize/transformation, at a given device - resolution (e.g. 8pt at 96x96dpi, or 12pt at 300x600dpi, etc). Some - tables found in the font files are used to produce instance-specific - data, like the cvt table, or the prep program. Though they are often - part of the face data, their processing results in information called - instance data. - - In FreeType, it is modeled through an instance object, which is always - created from an existing face object. - - * Glyph Data - - We call glyph data the piece of information related to specific glyphs. - This includes the following things that are described in more details - in the next sections: - - o The glyph's vectorial representation, also called its outline. - - o Various metrics, like the glyph's bounding box, its bearings and - advance values. - - o TrueType specifies a specific instruction bytecode, used to - associate each glyph with a small program, called the glyph code. - Its purpose is to grid-fit the outline to any target instance, in - order to produce excellent output at small pixel sizes. - - The FreeType engine doesn't map each glyph to a single structure, as - this would waste memory for no good reason. Rather, a glyph object is a - container, created from any active face, which can be used to load - and/or process any font glyph at any instance (or even no instance at - all). Of course, the glyph properties (outline, metrics, bitmaps, etc.) - can be extracted independently from an object once it has been loaded - or processed. - - * Text and Layout Data - - Finally, there is a last class of data that doesn't really fit in all - others, and that can be called text data. It comprises information - related to the grouping of glyphs together to form text. Simple - examples are the kerning table, which controls the spacing between - adjacent glyphs, as well as some of the extensions introduced in - TrueType Open, OpenType, and TrueType GX like glyph substitution - (ligatures, vertical representations), baseline management, - justification, etc. - - This article focuses on the basic TrueType tables, and hence, will only - talk about kerning, as FreeType doesn't support OpenType nor GX (yet). - [Support for TrueType Open is already partially available.] - - ------------------------------------------------------------------------ - -II. Glyph Outlines - -TrueType is a scalable font format; it is thus possible to render glyphs at -any scale, and under any affine transform, from a single source -representation. However, simply scaling vectorial shapes exhibits at small -sizes (where `small' refers here to anything smaller than at least -150 pixels) a collection of un-harmonious artifacts, like widths and/or -heights degradations. - -Because of this, the format also provides a complete programming language -used to design small programs associated to each glyph. Its role is to align -the point positions on the pixel grid after the scaling. This operation is -hence called grid-fitting, or even hinting. - - 1. Vectorial representation - - The source format of outlines is a collection of closed paths called - contours. Each contour delimits an outer or inner region of the glyph, - and can be made of either line segments and/or second-order beziers - (also called conic beziers or quadratics). - - It is described internally as a series of successive points, with each - point having an associated flag indicating whether it is `on' or `off' - the curve. These rules are applied to decompose the contour: - - o Two successive `on' points indicate a line segment joining them. - - o One `off' point amidst two `on' points indicates a conic bezier, - the `off' point being the control point, and the `on' ones the - start and end points. - - o Finally, two successive `off' points forces the rasterizer to - create (only during bitmap rendering) a virtual `on' point amidst - them, at their exact middle. This greatly facilitates the - definition of successive Bezier arcs. - - * # on - * off - __---__ - #-__ _-- -_ - --__ _- - - --__ # \ - --__ # - -# - Two `on' points - Two `on' points and one `off' point - between them - - * - # __ Two `on' points with two `off' - \ - - points between them. The point - \ / \ marked `0' is the middle of the - - 0 \ `off' points, and is a `virtual - -_ _- # on' point where the curve passes. - -- It does not appear in the point - list. - * - - Each glyph's original outline points are located on a grid of - indivisible units. The points are stored in the font file as - 16-bit integer grid coordinates, with the grid origin's being at (0,0); - they thus range from -16384 to 16383. - - In creating the glyph outlines, a type designer uses an imaginary - square called the EM square. Typically, the EM square encloses the - capital letter `M' and most other letters of a typical roman alphabet. - The square's size, i.e., the number of grid units on its sides, is very - important for two reasons: - - o It is the reference used to scale the outlines to a given - instance. For example, a size of 12pt at 300x300dpi corresponds to - 12*300/72 = 50 pixels. This is the size the EM square would appear - on the output device if it was rendered directly. In other words, - scaling from grid units to pixels uses the formula - - pixel_size = point_size * resolution / 72 - - pixel_coordinate = grid_coordinate * pixel_size / EM_size - - o The greater the EM size is, the larger resolution the designer can - use when digitizing outlines. For example, in the extreme example - of an EM size of 4 units, there are only 25 point positions - available within the EM square which is clearly not enough. - Typical TrueType fonts use an EM size of 2048 units (note: with - Type 1 PostScript fonts, the EM size is fixed to 1000 grid units. - However, point coordinates can be expressed in floating values). - - Note that glyphs can freely extend beyond the EM square if the font - designer wants this. The EM is used as a convenience, and is a valuable - convenience from traditional typography. - - Grid units are very often called font units or EM units. - - ----------------------------------------------------------------------- - IMPORTANT NOTE: - - Under FreeType, scaled pixel positions are all expressed in the 26.6 - fixed float format (made of a 26-bit integer mantissa, and a 6-bit - fractional part). In other words, all coordinates are multiplied by 64. - The grid lines along the integer pixel positions, are multiples of 64, - like (0,0), (64,0), (0,64), (128,128), etc., while the pixel centers - lie at middle coordinates (32 modulo 64) like (32,32), (96,32), etc. - ----------------------------------------------------------------------- - - 2. Hinting and Bitmap rendering - - As said before, simply scaling outlines to a specific instance always - creates undesirable artifacts, like stems of different widths or - heights in letters like `E' or `H'. Proper glyph rendering needs that - the scaled points are aligned along the pixel grid (hence the name - grid-fitting), and that important widths and heights are respected - throughout the whole font (for example, it is very often desirable that - the letters `I' and `T' have their central vertical line of the same - pixel width). - - Type 1 PostScript font files include with each glyph a small series of - distances called hints, which are later used by the type manager to try - grid-fitting the outlines as cleverly as possible. On one hand, it has - the consequence that upgrading your font engine can enhance the visual - aspects of all fonts of your system; on the other hand, the quality of - even the best version of Adobe's Type Manager isn't always very - pleasing at small sizes (notwithstanding font smoothing). - - TrueType takes a radically different approach: Each glyph has an - associated `program', designed in a specific geometrical language, - which is used to align explicitly each outline point to the pixel grid, - preserving important distances and metrics. A stack-based low-level - bytecode is used to store it in the font file, and is interpreted later - when rendering the scaled glyphs. - - This means that even very complex glyphs can be rendered perfectly at - very small sizes, as long as the corresponding glyph code is designed - correctly. Moreover, a glyph can loose some of its details, like - serifs, at small sizes to become more readable, because the bytecode - provides interesting features. - - However, this also have the sad implication that an ill-designed glyph - code will always render junk, whatever the font engine's version, and - that it's very difficult to produce quality glyph code. There are about - 200 TrueType opcodes, and no known `high-level language' for it. Most - type artists aren't programmers at all and the only tools able to - produce quality code from vectorial representation have been - distributed to only a few font foundries, while tools available to the - public, e.g. Fontographer, are usually expensive though generating - average to mediocre glyph code. - - All this explains why an enormous number of broken or ugly `free' fonts - have appeared on the TrueType scene, and that this format is now - mistakenly thought as `crap' by many people. Funnily, these are often - the same who stare at the `beauty' of the classic `Times New Roman' and - `Arial/Helvetica' at 8 points. - - Once a glyph's code has been executed, the scan-line converter converts - the fitted outline into a bitmap (or a pixmap with font-smoothing). - - ------------------------------------------------------------------------ - -III. Glyph metrics - - 1. Baseline, Pens and Layouts - - The baseline is an imaginary line that is used to `guide' glyphs when - rendering text. It can be horizontal (e.g. Roman, Cyrillic, Arabic, - etc.) or vertical (e.g. Chinese, Japanese, etc). Moreover, to render - text, a virtual point, located on the baseline, called the pen - position, is used to locate glyphs. - - Each layout uses a different convention for glyph placement: - - o With horizontal layout, glyphs simply `rest' on the baseline. Text - is rendered by incrementing the pen position, either to the right - or to the left. - - [Image] - - The distance between two successive pen positions is - glyph-specific and is called the advance width. Note that its - value is always positive, even for right-to-left oriented - alphabets, like Arabic. This introduces some differences in the - way text is rendered. - - ------------------------------------------------------------------ - IMPORTANT NOTE: - - The pen position is always placed on the baseline in TrueType, - unlike the convention used by some graphics systems, like Windows, - to always put the pen above the line, at the ascender's position. - ------------------------------------------------------------------ - - o With vertical layout, glyphs are centered around the baseline: - - [Image] - - 2. Typographic metrics and bounding boxes - - A various number of face metrics are defined for all glyphs in a given - font. Three of them have a rather curious status in the TrueType - specification; they only apply to horizontal layouts: - - o The ascent - - This is the distance from the baseline to the highest/upper grid - coordinate used to place an outline point. It is a positive value, - due to the grid's orientation with the y axis upwards. - - o The descent - - The distance from the baseline to the lowest grid coordinate used - to place an outline point. This is a negative value, due to the - grid's orientation. - - o The linegap - - The distance that must be placed between two lines of text. The - baseline-to-baseline distance should be computed as - - ascent - descent + linegap - - if you use the typographic values. - - The problem with these metrics is that they appear three times in a - single font file, each version having a slightly different meaning: - - 1. The font's horizontal header provides the ascent, descent and - linegap fields, which are used to express the designer's intents, - rather than the real values that may be computed from all glyphs - in the outline. These are used by the Macintosh font engine to - perform font mapping (i.e. font substitution). - - 2. The OS/2 table provides the usWinAscent and usWinDescent fields. - These values are computed for glyphs of the Windows ANSI charset - only, which means that they are wrong for any other glyph. Note - that usWinDescent is always positive (i.e. looks like `-descent'). - - 3. The OS/2 table provides the typoAscender, typoDescender and - typoLinegap values, which hopefully concern the whole font file. - These are the correct system-independent values! - - All metrics are expressed in font units. If you want to use any of the - two first versions of these metrics, the TrueType specification - contains some considerations and computing tips that might help you. - - Other, simpler metrics are: - - o The glyph's bounding box, also called bbox - - This is an imaginary box that encloses any glyph (usually as - tightly as possible). It is represented by four fields, namely - xMin, yMin, xMax, and yMax, that can be computed for any outline. - In FreeType, their values can be in font units (if measured in the - original outline) or in 26.6 pixel units (if measured on scaled - outlines). - - Note that if it wasn't for grid-fitting, you wouldn't need to know - a box's complete values, but only its dimensions to know how big - is a glyph outline/bitmapa. However, correct rendering of hinted - glyphs needs the preservation of important grid alignment on each - glyph translation/placement on the baseline, which is why FreeType - always returns the complete glyph outline. - - Note also that the font's header contains a global font bounding - box in font units which should enclose all glyphs in a font. This - can be used to pre-compute the maximum dimensions of any glyph at - a given instance. - - o The internal leading - - This concept comes directly from the world of traditional - typography. It represents the amount of space within the `leading' - which is reserved for glyph features that lay outside of the EM - square (like accentuation). It usually can be computed as - - internal_leading = ascent - descent - EM_size - - o The external leading - - This is another name for the linegap. - - 3. Bearings and Advances - - Each glyph has also distances called bearings and advances. Their - definition is constant, but their values depend on the layout, as the - same glyph can be used to render text either horizontally or - vertically. - - 1. The left side bearing: a.k.a. bearingX - - This is the horizontal distance from the current pen position to - the glyph's left bounding box edge. It is positive for horizontal - layouts, and most generally negative for vertical one. - - 2. The top side bearing: a.k.a. bearingY - - This is the vertical distance from the baseline to the top of the - glyph's bounding box. It is usually positive for horizontal - layouts, and negative for vertical ones - - 3. The advance width: a.k.a. advanceX - - This is the horizontal distance the pen position must be - incremented (for left-to-right writing) or decremented (for - right-to-left writing) by after each glyph is rendered when - processing text. It is always positive for horizontal layouts, and - null for vertical ones. - - 4. The advance height: a.k.a. advanceY - - This is the vertical distance the pen position must be decremented - by after each glyph is rendered. It is always null for horizontal - layouts, and positive for vertical layouts. - - 5. The glyph width - - The glyph's horizontal extent. More simply, it is (bbox.xMax - - bbox.xMin) for unscaled font coordinates. For scaled glyphs, its - computation requests specific care, described in the grid-fitting - chapter below. - - 6. The glyph height - - The glyph's vertical extent. More simply, it is (bbox.yMax - - bbox.yMin) for unscaled font coordinates. For scaled glyphs, its - computation requests specific care, described in the grid-fitting - chapter below. - - 7. The right side bearing - - Only used for horizontal layouts to describe the distance from the - bbox's right edge to the advance width. It is in most cases a - non-negative number. The FreeType library doesn't provide this - metric directly, as it isn't really part of the TrueType - specification. It can be computed simply as - - advance_width - left_side_bearing - (xMax-xMin) - - [Image] - - [Image] - - Finally, if you use `ABC widths' under Windows and OS/2, the following - relations apply: - - A = left side bearing - B = width - C = right side bearing - - A+B+C = advance width - - 4. The effects of grid-fitting - - All these metrics are stored in font units in the font file. They must - be scaled and grid-fitted properly to be used at a specific instance. - This implies several things: - - o First, a glyph program not only aligns the outline along the grid - pixel, it also processes the left side bearing and the advance - width. Other grid-fitted metrics are usually available in optional - TrueType tables if you need them. - - o A glyph program may decide to extend or stretch any of these two - metrics if it has a need for it. This means that you cannot assume - that the fitted metrics are simply equal to the scaled one plus or - minus a liberal distance < 1 pixel (i.e., less than 64 fractional - pixel units). For example, it is often necessary to stretch the - letter `m' horizontally at small pixel sizes to make all vertical - stems visible, while the same glyph can be perfectly `square' at - larger sizes. - - o Querying the fitted metrics of all glyphs at a given instance is - very slow, as it needs to load and process each glyph - independently. For this reason, some optional TrueType tables are - defined in the specification, containing pre-computed metrics for - specific instances (the most commonly used, like 8, 9, 10, 11, 12, - and 14 points at 96dpi, for example). These tables aren't always - present in a TrueType font. - - If you don't need the exact fitted value, it's much faster to - query the metrics in font units, then scale them to the instance's - dimensions. - - ----------------------------------------------------------------------- - IMPORTANT NOTE: - - Another very important consequence of grid-fitting is the fact that - moving a fitted outline by a non-integer pixel distance will simply - ruin the hinter's work, as alignments won't be preserved. The - translated glyph will then look `ugly' when converted to a bitmap! - - In other words, each time you want to translate a fitted glyph outline, - you must take care of only using integer pixel distances (the x and - y offsets must be multiples of 64, which equals to 1.0 in the 26.6 - fixed float format). If you don't care about grid-fitting (typically - when rendering rotated text), you can use any offset you want and use - sub-pixel glyph placement. - ----------------------------------------------------------------------- - - ------------------------------------------------------------------------ - -IV. Text processing - -This section demonstrates how to use the concepts previously defined to -render text, whatever the layout you use. - - 1. Writing simple text strings - - We will start by generating a simple string with a Roman alphabet. The - layout is thus horizontal, left to right. - - For now, we will assume all glyphs are rendered in a single target - bitmap. The case of generating individual glyph bitmaps, then placing - them on demand on a device is presented in a later chapter of this - section. - - Rendering the string needs to place each glyph on the baseline; this - process looks like the following: - - 1. Place the pen to the cursor position. The pen is always located on - the baseline. Its coordinates must be grid-fitted (i.e. multiples - of 64)! - - pen_x = cursor_x; - pen_y = cursor_y; - - 2. Load the glyph outline and its metrics. Using the flag - TTLOAD_DEFAULT will scale and hint the glyph: - - TT_Load_Glyph( instance, - glyph, - glyph_index, - TTLOAD_DEFAULT ); - - TT_Get_Glyph_Metrics( glyph, &metrics ); - TT_Get_Glyph_Outline( glyph, &outline ); - - 3. The loader always places the glyph outline relative to the - imaginary pen position (0,0). You thus simply need to translate - the outline by the vector: - - ( pen_x, pen_y ) - - To place it on its correct position, you can use the call - - TT_Translate_Outline( outline, pen_x, pen_y ); - - 4. Render the outline in the target bitmap, the glyph will be - surimposed on it with a binary `or' operation (FreeType never - creates glyph bitmaps by itself, it simply renders glyphs in the - arrays you pass to it. See the API reference for a complete - description of bitmaps and pixmaps). - - TT_Get_Outline_Bitmap( outline, &target_bitmap ); - - ------------------------------------------------------------------ - IMPORTANT NOTE: - - If you don't want to access the outline in your code, you can also - use the API function TT_Get_Glyph_Bitmap() which does the same as - the previous lines: - - TT_Get_Glyph_Outline( glyph, &outline ); - TT_Translate_Outline( outline, x_offset, y_offset ); - TT_Get_Outline_Bitmap( outline, &target_bitmap ); - TT_Translate_Outline( outline, -x_offset, -y_offset ); - - is equivalent to: - - TT_Get_Glyph_Bitmap( glyph, - x_offset, - y_offset, - &target_bitmap ); - - ------------------------------------------------------------------ - - 5. Now advance the pen to its next position. The advance is always - grid-fitted when the glyph was hinted: - - pen_x += metrics.advance; - - The advance being grid-fitted, the pen position remains aligned on - the grid. - - 6. Start over on item 2 until string completion. That's it! - - 2. Writing right-to-left and vertical text - - Generating strings for different layouts is very similar. Here are the - most important differences. - - o For right-to-left text (like Arabic) - - The main difference here is that, as the advance width and left - side bearings are oriented against the flow of text, the pen - position must be decremented by the advance width, before placing - and rendering the glyph. Other than that, the rest is strictly - similar. - - o For vertical text (like Chinese or Japanese) - - In this case, the baseline is vertical, which means that the pen - position must be shifted in the vertical direction. You need the - vertical glyph metrics to do that (using the - TT_Get_Big_Glyph_Metrics() function). - - Once you get these, the rest of the process is very similar. The - glyph outline is placed relative to an imaginary origin of (0,0), - and you should translate it to the pen position before rendering - it. - - The big difference is that you must decrement pen_y, rather than - increment pen_x (this is for the TrueType convention of y oriented - upwards). - - pen_y -= metrics.advance; - - 3. Generating individual glyph bitmaps and using them to render text - - Loading each glyph when rendering text is slow, and it's much more - efficient to render each one in a standalone bitmap to place it in a - cache. Text can then be rendered fast by applying simple blit - operations on the target device. - - To be able to render text correctly with the bitmaps, you must record - and associate with them its fitted bearings and advances. Hence the - following process: - - 1. Generate the bitmaps. - - + Load the glyph and get its metrics. - - TT_Load_Glyph( instance, - glyph, - glyph_index, - TTLOAD_DEFAULT ); - - TT_Get_Glyph_Metrics( glyph, &metrics ); - - The bbox is always fitted when calling TT_Get_Glyph_Metrics() - on a hinted glyph. You can then easily compute the glyph's - dimension in pixels as: - - width = (bbox.xMax - bbox.xMin) / 64; - height = (bbox.yMax - bbox.yMin) / 64; - - NOTE 1: - The fitted bounding box always contains all the dropouts that - may be produced by the scan-line converter. This width and - height are thus valid for all kinds of glyphs). - - NOTE 2: - If you want to compute the dimensions of a rotated outline's - bitmap, compute its bounding box with TT_Get_Outline_BBox(), - then grid-fit the bbox manually: - - #define FLOOR(x) ((x) & -64) - #define CEILING(x) (((x)+63) & -64) - - xMin = FLOOR(xMin); - yMin = FLOOR(yMin); - yMin = CEILING(xMax); - yMax = CEILING(yMax); - - then compute width and height as above. - - + Create a bitmap of the given dimension, e.g.: - - bitmap.width = width; - bitmap.cols = (width+7) & -8; - bitmap.rows = height; - bitmap.flow = TT_Flow_Up; - bitmap.size = bitmap.cols * bitmap.rows; - bitmap.buffer = malloc( bitmap.size ); - - + Render the glyph into the bitmap. - - Don't forget to shift it by (-xMin, -yMin) to fit it in the - bitmap: - - /* Note that the offsets must be grid-fitted to */ - /* preserve hinting! */ - TT_Get_Glyph_Bitmap( glyph, - &bitmap, - -bbox.xMin, - -bbox.yMin ); - - 2. Store the bitmap with the following values: - - bearingX / 64 = left side bearing in pixels - advance / 64 = advance width/height in pixels - - When your cache is set up, you can then render text using a scheme - similar to the ones describe in 1. and 2., with the exception that - now pen positions and metrics are expressed in pixel values. We - are done! - - pen_x = cursor_x; - pen_y = cursor_y; - - while ( glyph_to_render ) - { - access_cache( glyph_index, metrics, bitmap ); - - blit_bitmap_to_position - ( pen_x + bearingX, - pen_y (+ bearingY depending on orientation ) ); - - pen_x += advance; - } - - 4. Device-independent text rendering - - The previously described rendering processes all align glyphs on the - baseline according to metrics fitted for the display's distance. In - some cases, the display isn't the final output, and placing the glyphs - in a device-independent way is more important than anything. - - A typical case is a word processor which displays text as it should - appear on paper when printed. As you've probably noticed, the glyphs - aren't always spaced uniformly on the screen as you type them, - sometimes the space between an `m' and a `t' is too small, some other - it is too large, etc. - - These differences are simply due to the fact that the word processor - aligns glyphs in an device-independent way, using original metrics in - font units to do it, then scale them as it can to display text on - screen, usually at a very smaller resolution than your printer's one. - - Device-independence is a crucial part of document portability, and it - is very saddening to see that most professional word processors don't - do it correctly. For example, MS Word uses the fitted metrics of the - printer's resolution, rather than the originals in font units. - - This is great to get sure that your text prints very well on your - printer, but it also implies that someone printing the exact same - document on a device with different output resolutions (e.g. bubble-jet - vs. laser printers) may encounter trouble. - - As the differences in advances accumulate on one line, they can sum to - the width of one or more glyphs in extreme cases, which is enough to - `overflow' the automatic justification algorithm. This may add - additional lines of printed text, or even remove some. Moreover, - supplemental lines can produce unexpected page breaks and `blank' - pages. This can be extremely painful when working with large documents, - as this `feature' may require you to redesign completely your - formatting to re-print it. - - In conclusion, if you want portable document rendering, never hesitate - to use and apply device-independent terms! For example, a simple way to - produce text would be: - - 1. Get a scale to convert from your device-independent units to 26.6 - pixels. - - 2. Get another scale to convert from original font units to - device-independent units. - - 3. Perform pen placement and advances in device-independent units. - - 4. To render each glyph, compute the pen's rounded position, as well - as the rounded glyph left side bearing, both expressed in 26.6 - pixels (don't use the fitted metrics). You will then be able to - place the glyph and/or blit its bitmap. - - 5. Kerning glyphs - - An interesting effect that most people appreciate is kerning. It - consists of modifying the spacing between two successive glyphs - according to their outlines. For example, the letters `T' and a `y' can - be easily moved closer, as the top of the `y' fits nicely under the - `T's upper right bar. - - To perform kerning, the TrueType specification provides a specific - table (its tag being `kern'), with several storage formats. This - section doesn't explain how to access this information; however, you - can have a look at the standard extension called `ttkern.h' which comes - with FreeType. - - The kerning distance between two glyphs is a value expressed in font - units which indicates whether their outline can be moved together or - apart when one follows the other. The distance isn't reflexive, which - means that the kerning for the glyph pair (`T',`y') isn't the same as - the one for (`y',`T'). - - The value is positive when the glyphs must be moved apart, and negative - when they must be moved closer. You can implement kerning simply by - adding its scaled and rounded value to the advance width when moving - the pen position. Here an example for horizontal kerning: - - #define ROUND( x ) ( (x + 32) & -64 ) - - scaled_kerning = kerning * imetrics.x_scale / 0x10000; - - pen_x += metrics.advance + ROUND( scaled_kerning ); - - 6. Rotated and stretched/slanted text - - In order to produce rotated glyphs with FreeType, one must understand a - few things: - - o The engine doesn't apply specific transformations to the glyphs it - loads and processes (other than the simpler resolution-base - scaling and grid-fitting). If you want to rotate glyphs, you will - have to load their outline, then apply the geometric - transformations that please you (a number of APIs are there to - help you to do it easily). - - o Even if the glyph loader hints `straight' glyphs, it is possible - to inform the font and glyph programs that you're going to later - transform the resulting outlines. Two flags can be passed to the - bytecode interpreter: - - + The `rotated' flag indicates that you are going to rotate the - glyphs in a non-trivial direction (i.e., on neither of the - two coordinate axis). You are advised not to set it when - writing 90 degrees-rotated text for example. - - + The `stretched' flag indicates that you are going to apply a - transformation that will distort distances. While rotations - and symmetries keep distances constant, slanting and - stretching do modify them. - - These flags can be interpreted by the glyph code to toggle certain - processings which vary from one font to the other. However, most of the - TrueType fonts that were tested with FreeType, if not all of them, - simply change the dropout-mode when any of these flags is set, and/or - disable hinting when rotation is detected. We advise you to never set - these flags, even when rotating text. For what it's worth, hinted - rotated text is no uglier than un-hinted one. - - You can use the function TT_Set_Instance_Transform_Flags() to set them. - Then, rendering can be done with the following calls: - - /* set the flags */ - TT_Set_Instance_Transforms( instance, - rotated, - stretched ); - - /* load a given glyph */ - TT_Get_Glyph_Outline( instance, - glyph, - index, - TTLOAD_DEFAULT ); - - /* access its outline */ - TT_Get_Glyph_Outline( instance, &outline ); - - /* in order to transform it */ - TT_Transform_Outline( outline, &matrix ); - /* and/or */ - TT_Translate_Outline( outline, - x_offset, y_offset ); - - /* to render it */ - TT_Get_Outline_Bitmap( outline, &bitmap ); - - Here is an example, assuming that the following variables - - TT_Matrix matrix; /* 2x2 matrix */ - TT_Pos x_off, y_off; /* corrective offsets */ - - define a transformation that can be correctly applied to a glyph - outline which have been previously placed relative to the imaginary - point position (0,0) with bearings preserved. Rendering text can now be - done as follows: - - 1. Initialize the pen position; when rotating, it is extremely well - advised to use sub-pixel placement as you don't care about - hinting. - - pen_x = cursor_x; - pen_y = cursor_y; - - 2. Transform the glyph as needed, then translate it to the current - pen position: - - TT_Transform_Outline( outline, &matrix ); - TT_Translate_Outline( outline, - pen_x + x_off, - pen_y + y_off ); - - (Note that the transformation offsets have been included in the - translation.) - - 3. Render the bitmap, as it has now been placed correctly. - - 4. To change the pen position, transform the vector (0,advance) with - your matrix, and add it: - - vec_x = metrics.advance; - vec_y = 0; - TT_Transform_Vector( &vec_x, &vec_y, &matrix ); - pen_x += vec_x; - pen_y += vec_y; - - 5. Start over at 2. until completion. - - ----------------------------------------------------------------------- - IMPORTANT NOTE: - - Do not grid-fit the pen position before rendering your glyph when - rendering rotated text. If you do, your transformed baseline won't be - preserved on each glyph, and the text will look like it's `hopping' - randomly. This is particularly visible at small sizes. - - Sub-pixel precision placement is very important for clean rotated text. - ----------------------------------------------------------------------- - - 7. Font-smoothing, a.k.a. gray-levels rendering - - The FreeType engine's scan-line converter (the component also called - the rasterizer) is able to convert a vectorial glyph outline into - either a normal bitmap, or an 8-bit pixmap (a.k.a. colored bitmaps on - some systems). This last feature is called gray-level rendering or - font-smoothing, because it uses a user-supplied palette to produce - anti-aliased versions of the glyphs. - - Its principle is to render a bitmap which is twice as large than the - target pixmap, then simply filtering it using a 2x2 summation. - - ----------------------------------------------------------------------- - NOTE: - - FreeType's scan-line converter doesn't use or need an intermediate - second bitmap. Rather, filtering is performed in a single pass during - the sweep (see the file `raster.txt' for more information about it). - ----------------------------------------------------------------------- - - You'll notice that, as with Windows 95, FreeType's rasterizer only - grays those parts of the glyph which need it, i.e., diagonals and - curves, while keeping horizontal and vertical stems straight `black'. - This greatly improves the legibility of text, while avoiding the - `blurry' look anti-aliased fonts typically found with Adobe's Type - Manager or Acrobat. - - There are thus five available gray-levels, ranging from 0 to 4, where - level 0 and level 4 are the background and foreground colors, - respectively, and where levels 1, 2, 3 are intermediate. For example, - to render black text on a white background, one can use a palette like: - - palette[0] = white (background) - palette[1] = light gray - palette[2] = medium gray - palette[3] = dark gray - palette[4] = black (foreground) - - To set the engine's gray-level palette, simply use the API function - TT_Set_Raster_Palette() after initialization. It expects an array of - 5 chars which will be used to render the pixmaps. - - Note that the rasterizer doesn't create bitmaps or pixmaps. Rather, it - simply renders glyphs in the arrays you pass to it. The generated glyph - bitmaps are simply `or'-ed to the target (with 0 being the background - as a convention); in the case of pixmaps, pixels are simply written to - the buffer, in spans of four aligned bytes. - - ----------------------------------------------------------------------- - NOTE: - - The raster isn't able to superpose `transparent' glyphs on the target - pixmap. This means that you should always call the API functions - TT_Get_Glyph_Pixmap() and TT_Get_Outline_Pixmap() with an empty map, - and perform the superposition yourself. - - This can be more or less tricky, depending on the palette you are using - and your target graphics resolution. One of the components found in the - test directory, called `display.c', has large comments on the way it - implements it for the test programs. You are encouraged to read the - test program sources to understand how one can take advantage of font - smoothing. - - Pixmap surimposition is too system-specific a feature to be part of the - FreeType engine. Moreover, not everybody needs it! - ----------------------------------------------------------------------- - - Finally, the question of sur-imposing anti-aliased colored text on any - texture, since being even more tricky, is left as an exercise to the - reader ;-) If this topic really interests you, the FreeType mailing - list may host some helpful enthusiasts ready to answer your questions. - Who knows :-) - - 8. Other interesting text processes - - o Glyph substitution - - Substitution is used to replace one glyph by another when some - specific condition is met in the text string. Its most common - examples are ligatures (like replacing the `f' followed by `i' by - the single glyph `fi' if available in the font), as well as - positional selection as performed in the Arabic script (for those - not aware of this, each letter of the Arabic alphabet can be - written differently according to its position on words: starting, - ending, intermediate, or isolated). - - The base TrueType format doesn't define any table for glyph - substitution. However, GX, TrueType Open, and OpenType provide - (incompatible) extensions to perform it. Of course, it isn't - supported by the engine, but an extension could be easily written - to access the required tables. - - [Support for TrueType Open is already partially available.] - - o Justification - - ... - -To be continued... Index: xc/extras/FreeType/docs/i18n.txt diff -u xc/extras/FreeType/docs/i18n.txt:1.1.1.2 xc/extras/FreeType/docs/i18n.txt:removed --- xc/extras/FreeType/docs/i18n.txt:1.1.1.2 Sat Feb 12 23:55:28 2000 +++ xc/extras/FreeType/docs/i18n.txt Wed Mar 16 20:59:37 2005 @@ -1,161 +0,0 @@ - -Using national language support (NLS) in FreeType -================================================= - -21. 1. 1998 -Erwin Dieterich - - -1) Introduction -2) Using gettext (user's view) -3) Using gettext (programmer's view) -4) Using gettext (maintainer's view) -5) How can I switch off NLS? I don't need/want it. - - -Only Unix NLS using gettext() is covered here. If you are able to -help with internationalization (i18n) for different operating -systems, please e-mail me at Erwin.Dieterich.ED@Bayer-AG.de. - - - -1) Introduction - -If a program is to be used by people who are not fluent speakers of -English, the first thing they will ask for is communication in their -native language. If someone tries to implement NLS in a program -using only #ifdefs and other such programming strategies, it's -likely that this someone will get nowhere. - -Gettext() is a possible way to help. Only minimal extra programming -effort is needed; the translations are implemented separately from -the program, and it is not necessary to recompile a program if you -want to switch the messages to a different language. If you wouldd -like to know more about gettext(), I recommend reading the GNU -gettext tools manual, written by Ulrich Drepper, Jim Meyering, and -Francois Pinard. - -Currently supported languages are: - - Czech (cz) translator: Pavel Kankovsky - - Dutch (nl) translator: Gertjan de Back - French (fr) translator: David Turner - German (de) translator: Erwin Dieterich - - Spain (es) translator: Miguel A. Perez Valdenebro - - -Currently supported programs in the `test' directory are: - - ftlint - ftdump - fterror - ftmetric - ftsbit - - -2) Using gettext (user's view) - -Using gettext as an end user is very simple. If FreeType is -correctly installed on your computer, you can simply issue an -`export LANG=' in your Bourne shell or `setenv -LANG=' if you are using csh. That's all. In order to -switch back to English, just use `export LANG=' or `setenv LANG='. - - is a two character code describing your language: -de=German, fr=French etc. Every supported language has its own -.po file in the `po' directory of FreeType. If your -language is not there you should consider contributing a -translation. Just e-mail me. Here is a transcript of what `export -LANG=' does: - - test> ftlint 24 furiosot.ttf - Could not find or open furiosot.ttf. - FreeType error message: OS/2 table missing. - - test> export LANG=de - test> ftlint 24 furiosot.ttf - Datei `furiosot.ttf' konnte nicht gefunden oder geöffnet werden. - FreeType Fehlermeldung: `OS/2'-Tabelle fehlt. - - test> export LANG= - test> ftlint 24 furiosot.ttf - Could not find or open file furioso.ttf. - FreeType error message: OS/2 table missing. - -Doesn't this look good? But what if nothing happens if you set -LANG? Here are some hints: - -First: Is your language really supported? If it is, you need to be -sure that you have gettext() installed (if you are sitting at a -Linux box, chances are very good that you have). If you compiled -FreeType yourself and nothing strange happened, then your version of -FreeType has NLS compiled in, as this is the default, unless you -forgot to install the translation files in the right places (`make -install' in the po/ directory should be enough, but you need root -permissions as these files are installed somewhere in /usr/local) -- -good luck :-) - - -3) Using gettext (programmer's view) - -If you intend to use NLS in your program, you just need to make a -few simple changes. Here I only describe how NLS is enabled in the -programs that come with FreeType in test/. If you would like to add -NLS to other programs using FreeType as well, take a look at -FreeType's installation files; you can probably use these files as a -model. - -Every string that should be translated needs gettext() around it. -So - - Message( "Usage: %s fontname[.ttf|.ttc]\n\n", - execname ); - -becomes - - Message( gettext( "Usage: %s fontname[.ttf|.ttc]\n\n" ), - execname ); - - -Yes, it's that simple. Next you need to initialize gettext. Put -the following in the header section of your file: - - #include "ft_conf.h" - #ifdef HAVE_LIBINTL_H - #include - #endif - - #ifndef HAVE_LIBINTL_H - #define gettext( x ) ( x ) - #endif - -and this at the very beginning of your main program: - - #ifdef HAVE_LIBINTL_H - setlocale(LC_ALL, ""); - bindtextdomain( "freetype", LOCALEDIR ); - textdomain( "freetype" ); - #endif - - -That's all. Just have a look at fterror.c in test/. - - -4) Using gettext (maintainer's view) - -I am too lazy today :-) If something isn't clear, just ask me. - - -5) How can I switch off NLS? I don't need/want it. - -Just say `configure --disable-nls' and recompile FreeType. - - -If you have any questions or comments regarding this short -introduction to NLS & FreeType, feel free to email me at -Erwin.Dieterich.ED@Bayer-AG.de. - - ---- end of i18n.txt --- Index: xc/extras/FreeType/docs/optimize.txt diff -u xc/extras/FreeType/docs/optimize.txt:1.1.1.1 xc/extras/FreeType/docs/optimize.txt:removed --- xc/extras/FreeType/docs/optimize.txt:1.1.1.1 Sat Feb 12 23:55:29 2000 +++ xc/extras/FreeType/docs/optimize.txt Wed Mar 16 20:59:37 2005 @@ -1,158 +0,0 @@ - - FreeType Optimization HOWTO - - - -Introduction -============ - - This file describes several ways to improve the performance of the - FreeType engine on specific builds. Each `trick' has some - drawbacks, be it on code size or portability. - - The performance improvement cannot be quantified here simply - because id depends significantly on platforms _and_ compilers. - - - -I. Tweaking the configuration file -================================== - - The FreeType configuration file is named `ft_conf.h' and contains - the definition of various macros that are used to configure the - engine at build time. - - Apart from the Unix configuration file, which is generated when - calling the `configure' script from the template called - - freetype/ft_conf.h.in , - - all configuration files are located in - - freetype/lib/arch//ft_conf.h , - - where stands for your platform. This release also - provides an `ansi' build, i.e., the directory `lib/arch/ansi' used - to compile with any ANSI-compliant compiler. - - The configuration macros that relate to performance are described - next. - - - 1. TT_CONFIG_OPTION_INTERPRETER_SWITCH - -------------------------------------- - - If set, this macro builds a bytecode interpreter which uses a - huge `switch' statement to parse the bytecode stream during - glyph hinting. - - If unset, the interpreter uses a big jump table to call each - bytecode's routine. - - This macro is *set* by default. However, it may be worthwile on - some platforms to unset it. - - Note that this macro is ignored if - TT_CONFIG_OPTION_NO_INTERPRETER is set. - - - 2. TT_CONFIG_OPTION_STATIC_INTERPRETER - -------------------------------------- - - If set, this macro builds a bytecode interpreter which uses a - static variable to store its state. On some processors, this - will produce code which is bigger but slightly faster. - - Note that you should NOT DEFINE this macro when building a - thread-safe version of the engine. - - This macro is *unset* by default. - - - 3. TT_CONFIG_OPTION_STATIC_RASTER - --------------------------------- - - If set, this macro builds a scan-line converter which uses a - static variable to store its state. On some processors, though - depending on the compiler used, this will produce code which is - bigger but moderately faster. - - Note that you should NOT DEFINE this macro when building a - thread-safe version of the engine. - - This macro is *unset* by default. We do not recommend using it - except for extreme cases where a performance `edge' is needed. - - - -II. Replacing some components with optimized versions -===================================================== - - You can also, in order to improve performance, replace one or more - components from the original source files. Here are our - suggestions. - - - 1. Use memory-mapped files whenever available - --------------------------------------------- - - Loading a glyph from a TrueType file needs many random seeks, - which take a lot of time when using disk-based files. - - Whenever possible, use memory-mappings to improve load - performance dramatically. For an example, see the source file - - freetype/lib/arch/unix/ttmmap.c - - which uses Unix memory-mapped files. - - - 2. Replace the computation routines in `ttcalc.c' - --------------------------------------------------- - - This file contains many computation routines that can easily be - replaced by inline-assembly, tailored for a specific processor - and/or compiler. - - After heavy testing, we have found that these functions, - especially TT_MulDiv(), are the ones that are most extensively - used and called when loading glyphs from a font file. - - We do not provide inline-assembly with this release, as we want - to emphasize the portability of our library. However, when - working on a specific project where the hardware is known to be - fixed (like on an embedded system), great performance gains - could be achieved by replacing these routines. - - (By the way, the square root function is not optimal, but it is - very seldom called. However, its accuracy is _critical_. - Replacing it with a fast but inaccurate algorithm will ruin the - rendering of glyphs at small sizes.) - - - -III. Measuring performance improvements -======================================= - - Once you have chosen some improvements and rebuilt the library, - some quick ways to measure the `new' speed are: - - - Run the test program `ftlint' on a directory containing many - TrueType fonts, and measure the time it takes. On Unix, you can - use the shell command `time' to do it like in - - % time test/ftlint 10 /ttfonts/*.ttf - - This will measure the performance improvement of the TrueType - interpreter. - - - Run the test program `fttimer' on a font containing many complex - glyphs (the latest available versions of Times or Arial should - do it), probaby using anti-aliasing, as in: - - % time test/fttimer -g /ttfonts/arial.ttf - - Compare the results of several of these runs for each build. - - ---- end of OPTIMIZE --- Index: xc/extras/FreeType/docs/porting.txt diff -u xc/extras/FreeType/docs/porting.txt:1.1.1.2 xc/extras/FreeType/docs/porting.txt:removed --- xc/extras/FreeType/docs/porting.txt:1.1.1.2 Sat Feb 12 23:55:29 2000 +++ xc/extras/FreeType/docs/porting.txt Wed Mar 16 20:59:37 2005 @@ -1,1078 +0,0 @@ - - - The FreeType Porting Guide - - or - - Everything you need to know to make FreeType - run on the weirdest system - - --------------------------------------------------------------------- - - Table of Contents - - - Introduction - - I. General design and system modules - - II. Memory component API - - 1. The alloction function: TT_Alloc() - 2. The release function: TT_Free() - 3. The ALLOC() and ALLOC_ARRAY() macros - 4. The MEM_xxxx() macros - - III. File component API - - 1. Streams and their functions - 2. Frames and file access - 3. Differences in thread support levels - - IV. Mutex component API - - V. Summary & Advanced concepts - - 1. Porting summary - 2. Exotic filesystems - - VI. Troubleshooting - - Conclusion - - --------------------------------------------------------------------- - -Introduction -============ - -The FreeType engine is portable in many ways: - -- First, it can be compiled by any ANSI C compliant compiler, which - guarantees the widest possible uses. - -- Its default build uses a tiny fraction of the ANSI libc, mainly - for memory management and I/O access, which should be available on - most systems (i.e., malloc(), free(), fopen(), fread(), etc). - -- Its design is modular, and allows an implementer to remove all - dependencies on a particular runtime environment, to adapt the - engine to its specific needs. For example, it is possible to use - memory-mapped files on systems which support them. - -This document explains the engine's design, presenting the `system' -modules that need to be changed by porters of the library, as well -as how to do it. - -Note that this documentation is _very_ detailed, and you may -DIRECTLY JUMP to SECTION V (Summary and advanced concepts) which -gives you a QUICK STEP-BY-STEP GUIDE TO PORTING each component, -without the need to understand all the guts of the TrueType engine. - -Several issues are discussed, including the use of exotic font -storage conventions. - - --------------------------------------------------------------------- - - -I. General design, and system modules -===================================== - - The engine's design is intentionally highly modular. It is made - of several `components', each with its own specific goals. Three - of these play an important role with regards to portability. They - are: - - - the memory component: - - Found in the files `ttmemory.h' and `ttmemory.c'. It defines - several macros and a few functions used by _all_ other modules - to allocate, release, copy, and move memory blocks. - - - the file component: - - Found in the files `ttfile.h' and `ttfile.c'. It defines - several types and abstractions (streams, frames), that are used - by _all_ other modules to access font files. - - - the mutex component: - - This component compiles to a null object if the engine is built - in single-thread mode. Otherwise, for thread-safe and reentrant - builds, the macros and functions it defines are used by the rest - of the engine to protect shared variables. - - NOTE: - - Because the ANSI libc doesn't provide synchronisation - primitives (synchronisation isn't portable accross platforms), - the default implementation, found in `ttmutex.c', is made of - dummy functions which always return a successful error - condition. - - You _need_ to re-define this component for your system if you - decide to make a thread-safe or reentrant build, even if you - use the ANSI libc. - - - When specializing a component, i.e., rewriting it for your - platform, you should respect a few conventions which are explained - in the following sections. Note also that the system-specific - implementations are usually placed in the - `freetype/lib/arch/' directory. For example: - - freetype/lib/arch/unix/ttmmap.c - - A Unix-only implementation of ttfile which uses the - memory-mapped file API (this greatly improves the engine's - performance, due to the random access pattern typicals of - glyph data retrieval). - - freetype/lib/arch/os2/os2file.c - - This is an implementation of ttfile specific to OS/2, which - directly calls the system functions DosOpen(), DosRead(), etc. - - The FreeType/2 DLL (a free TrueType font driver for OS/2) also - uses its own memory component which calls a special allocation - routine required in its runtime environment, and also provides - additional statistics that can be displayed by an auxiliary - tool while the driver is running in the system. - -We ask you to respect this directory convention. This really needs -a minor Makefile change, and still having the ability to compile the -`default' ttfile and ttmemory will help you debug your specific -ports by easy comparisons. - - --------------------------------------------------------------------- - - -II. Memory component API -======================== - - This section presents the macros and functions defined in - ttmemory.h, and how they should be implemented, if you decide to - rewrite the source file ttmemory.c from scratch. An easier - solution would be to replace the calls to malloc() and free() with - your own functions, though. - - -1. Allocation routine : TT_Alloc() ----------------------------------- - - This function is used to allocate blocks of memory, just like - malloc(), but defines a very different interface. Its prototype - is: - - TT_Error TT_Alloc( long size, void** p ); - - [The FreeType source files use abstract data types like `Long' for - all internal functions and `TT_Long' for externally visible - structures. See tttypes.h and freetype.h, respectively.] - - We can see that: - - - The function returns an error code, and _not_ a pointer. The - reason for this is that your own implementation may perfectly - fail for more than one good reason. For example, it could - detect a corrupted heap, a memory exhaustion or an unusually - large block, and have a different error code for each of these - cases. - - If a memory allocation error occurs in a FreeType function, it - is always taken into account (of course, for safety reasons), - but its code is directly sent to the caller. This means that - your own applications and font servers will be able to interpret - these errors and let you handle them appropriately. - - - Its second argument is the _address_ of a typeless pointer. - This means the need to typecast it before calling this function. - - The macro MEM_Alloc() is defined in ttmemory.h to do it for you, - as well as the `memory extraction' performed by the `&' - operator, so that you can write: - - char* buffer; - - - MEM_Alloc( size, buffer ); - - instead of - - TT_Alloc( size, (void**)&buffer ); - - Note that the engine _never_ uses this macro directly, but - ALLOC() instead (see below) in order to _always_ test the error - code. - - ***************** - *** IMPORTANT *** - ***************** - - - A newly allocated block should _always_ be filled with zeroes! - This is a _very_ strong convention used within all the engine. - It helps greatly to reduce code size, in general. If your - implementation of TT_Alloc() doesn't respect it, you're pretty - certain to build an unrunnable (at best) or (worse) instable - engine! Beware. - - -2. Release routine: TT_Free() ------------------------------ - - This routine is naturally used to release any block created - through TT_Alloc(). Its prototype is: - - TT_Error TT_Free( void** P ); - - We can see that: - - - It also returns an error code. Note, however, that the error is - ignored in most, if not all, parts of the engine. This is - because freeing memory usually happens when all necessary work - has been finished, or when something already wrong happened. - - - It takes the address of a typeless-pointer, and _not_ the - pointer's value itself. This is used to set the pointer's value - to NULL just after the block was released, which avoids dangling - references in objects. Of course, there is a macro defined to - simplify source writing. One can use FREE() like: - - char* buffer; - - - MEM_Alloc( size, buffer ); - - .... work .... - - FREE( buffer ); - - /* now `buffer' is set to NULL; the following line will */ - /* seg-fault */ - - a = buffer[0]; - - - ***************** - *** IMPORTANT *** - ***************** - - - The function TT_Free() (and thus the macro FREE()) will accept a - NULL pointer successfully! This means more precisely that the - address of a pointer may have the value NULL; in this case it - will return with a successful error code (TT_Err_Ok == 0). - - This convention is also _very_ strong in the engine, and - simplifies both code size and style. One of its primary origin - is the engine's object management which requires the ability to - release an object, be it normal or `partial', with the same - code. - - -3. The ALLOC() and ALLOC_ARRAY() macros ---------------------------------------- - - Two macros are also defined to make the FreeType source code - easier to read and understand. Their role is to perform an - allocation, while saving the error condition in an _implicit_ - local variable called `error', and returning a boolean which is - set to true in case of error. Their definition is - - #define ALLOC( pointer, size ) \ - ( ( error = MEM_Alloc( pointer, size ) ) != TT_Err_Ok ) - - and - - #define ALLOC_ARRAY( pointer, count, type ) \ - ( ( error = MEM_Alloc( pointer, \ - (count) * sizeof ( type ) ) ) \ - != TT_Err_Ok ) - - They are always used in `if' statements, and can be chained - together. Here is some example code: - - char* buffer1 = 0; /* temporary buffer 1 */ - char* buffer2 = 0; /* temporary buffer 2 */ - TT_Error error; - - - ... - - if ( ALLOC_ARRAY( buffer1, n, TT_F26Dot6 ) || - ALLOC_ARRAY( buffer2, n, short ) ) - goto Fail; - - ... work ... - - Fail: - FREE( buffer2 ); - FREE( buffer1 ); - return error; - - - Notes: - - - If an error occurs during the first allocation, execution will - jump immediately to the `Fail' label. - - - The failure code, which releases the buffers, doesn't need to - differentiate whether the first allocation succeeded or not - (simply because FREE() accepts null pointers with no - problems). - - The equivalent code, without macros, would be: - - char* buffer1; - char* buffer2; - TT_Error error; - - - error = TT_Alloc( n * sizeof ( TT_F26Dot6 ), - (void**)&buffer1 ); - if ( error ) goto Fail_Buffer1; - - error = TT_Alloc( n * sizeof ( short ), - (void**)&buffer2 ); - if ( error ) goto Fail_Buffer2; - - .... work .... - - Fail_Buffer2: - TT_Free( (void**)&buffer2 ); - - Fail_Buffer1: - TT_Free( (void**)&buffer1 ); - - - Which is a lot less clear about its intents, and uses more special - cases. - - -4. The MEM_xxxx() macros ------------------------- - - Finally, three macros are defined to perform some common memory - block operations. Their names are rather explicative: - - - MEM_Copy() - - Used by the engine to copy one block of data in memory to - another one. - - - MEM_Set() - - Used to set all bytes of a block of memory to a given value. - - - MEM_Move() - - Well, guess what ;-) - - - These operations could have been embedded in functions like - TT_Mem_Copy(), TT_Mem_Set(), and TT_Mem_Move(), but a lot of - compilers are able to inline directly calls to such `intrinsic' - functions as memcpy() and memmove(). Hence, macros make sense - here. - - --------------------------------------------------------------------- - - -III. File Component API -======================= - - This section describes the file component's API, and the things - that are needed to port it to a specific system. Note that only a - fraction of the source code in `ttfile.c' needs to be rewritten - during a port. - - -1. Streams and their functions ------------------------------- - - A stream in FreeType (version 1.x) encapsulates both the - location/naming of a file, and its access. This is due to the - fact that they were originally designed to embed a simple ANSI - `FILE*' file pointer. - - This means several things: - - - A stream is created and opened via the TT_Open_Stream() - function. It takes, in the default build, a font pathname of - type `char*' that it uses when calling fopen(). - - - It can be released/closed via the function TT_Close_Stream(). - - - It embeds a `current file position', just like an ordinary file - descriptor. It is thus seekable, through the function - TT_Seek_File(). - - - Raw data can be extracted from a stream through TT_Read_File() - and TT_Read_At_File(). - - However, it has certain properties that differ from a libc `FILE*' - data type: - - - Because each face object has its own stream, and because most - operating systems limit the number of opened system resources in - each process, it is more than helpful to be able to `flush' a - stream. - - A stream is said to be flushed if the system resource it - contains (like a file descriptor) has been closed. However, - this resource is re-opened automatically when needed. - - The function TT_Flush_Stream() is used to flush a stream. If a - stream has been flushed, it is also said to be `asleep'. - - - The engine calls TT_Use_Stream() before each new stream access. - With it, the file component is able to awake (or `activate') - streams that are flushed, if needed. - - - Consequently, the engine calls TT_Done_Stream() when it has - performed all I/O access. These two APIs (TT_Use_Stream() and - TT_Done_Stream()) let the file component track and manage the - engine's access patterns, and allows it to cache opened streams - more cleverly. - - For example, one could implement an LRU list used to track the - `oldest' streams, and only activate the 10 `freshest' ones, thus - limiting the total number of system stream resources used by the - library, independently of the total number of opened faces in - the engine. - - -2. Frames and file access -------------------------- - - In order to resolve endianess and alignment issues, the engine - uses the concept of `frames' to extract data from a TrueType - table. - - - A frame is simply a sequence of successive bytes, taken from a - stream from its current position. A frame can only exist within - a stream. - - - The function TT_Access_Frame() (ideally) reads its data and - places it into an intermediate buffer, which is later used for - parsing. This function also checks that the whole frame fits - into the original file. For example, it will return an error if - detecting `over-reads' in the file (which can happen if the font - file is broken). - - Note that the intermediate buffer disappears in the case of - memory-mapped files. - - - Each frame has an internal cursor, which is set to its buffer's - base by the previous function. Note, however, that it differs - from the stream's current position, which has been advanced once - TT_Acess_Frame() is completed. - - - Data is extracted from the frame through calls to functions of - the form: - - TT_Get_(); - - where can be any of: Byte (unsigned char), Char - (signed char), Short, UShort, Long, or ULong. - - Each function returns the integer below the current frame - cursor, and advances the latter in the buffer. - - - Finally, when the frame access ends, the engine calls the - TT_Forget_Frame() function, which will release the intermediate - buffer and set the cursor to NULL. - - Here is a typical frame read sequence: - - /* first - read the next 12-bytes frame in memory */ - error = TT_Access_Frame( 12 ); - if ( error ) - return error; - - /* now, extract all data */ - object->field1 = TT_Get_Short(); - object->field2 = TT_Get_Long(); - object->field3 = TT_Get_Char(); - object->filed4 = TT_Get_Long(); - object->field5 = TT_Get_Byte(); - - /* done - now release the frame */ - TT_Forget_Frame(); - - /* now perform some checks */ - if ( object->field1 == -1 ) - return Error_1; - - if ( object->field2 > object->field4 ) - return Error_2; - - - ***************** - *** IMPORTANT *** - ***************** - - A few things need to be noticed by porters when they implement - frame loading (i.e. the TT_Access_Frame() function): - - - The functions that need to be ported are TT_Access_Frame() and - TT_Forget_Frame(). The TT_Get_XXXX() functions should be left - as is. - - - A frame has a state, and must _always_ be released through - TT_Forget_Frame() in case of an error. This means that the - engine will _never_ use code like the following: - - error = TT_Access_Frame( 12 ); - if ( error ) - goto Fail; - - object->field1 = TT_Get_Short(); - - /* now check error and return immediately -- */ - /* WITHOUT RELEASING FRAME! ERROR! */ - if ( object->field1 == -1 ) - goto Fail; - - object->field2 = TT_Get_Long(); - object->field3 = TT_Get_Char(); - object->field4 = TT_Get_Long(); - - /* check for error, return immediately -- */ - /* WITHOUT RELEASING FRAME! ERROR! */ - if ( object->field2 > object->field4 ) - goto Fail; - - /* now release frame */ - TT_Forget_Frame(); - - This means more simply that EACH successful call to - TT_Access_Frame() will ALWAYS be followed by a call to - TT_Forget_Frame()! - - - As a consequence of the first rule, and also in order to keep - things simple, NESTING FRAME ACCESSES aren't allowed. For - example, the following code will produce an error: - - /* First frame access */ - error = TT_Access_Frame( 8 ); - if ( error ) - goto Fail; - - /* read a file offset */ - offset = TT_Get_Long(); - - /* seek and load another frame */ - error = TT_File_Seek( stream, offset ); - if ( error ) - goto Fail; - - error = TT_Access_Frame( 4 ); - /* The function TT_Access_Frame detects nested calls */ - /* and ALWAYS returns TT_Err_Nested_Frame_Access! */ - if ( error ) - goto Fail; - - data1 = TT_Get_Long(); - - /* release second frame */ - TT_Forget_Frame(); - - /* read next integer from the first frame */ - data2 = TT_Get_Long(); - - /* release first frame */ - TT_Forget_Frame(); - - This simplifies the work that needs to be done wen porting the - TT_Access_Frame() and TT_Forget_Frame() functions. - - -3. Differences in thread support levels ---------------------------------------- - - The FreeType library can be built to three distinct thread-support - levels. This section will present each other, and show how this - translates within the ttfile.c source code. - - a. Levels - - The three levels are - - - single thread - - No synchronization primitive is used to protect the data in - the file component. Hence, there is only one `current' stream - at any one time. Note, however, that in some cases, more than - one stream may be `active' (or `awakened'); e.g., when using - memory-mapped files, each opened face needs a valid mapping - before it can be used/parsed by the engine. - - - thread-safe - - The thread safe mode synchronizes concurrent accesses to the - renderer's component through mutexes. For the file component, - this means a single mutex which is `locked' by a call to - TT_Use_Stream(), and `released' by TT_Done_Stream(). - - As a consequence, there is only one possible `current' stream - when the engine reads files, like in the single thread case. - - - re-entrant - - In this mode, concurrent accesses are possible on many - components, including ttfile. This means that each - TT_Use_Stream() must _really_ create its own system/ANSI - stream for a single file, and that the file component _cannot_ - have any state (only stream objects have!), like a `current - stream' and `current frame'. - - This mode must use mutexes to protect all shared variables and - lists from concurrent changes/reads. The only component which - is still serialized in this mode is the scan-line converter - (a.k.a. ttraster). - - b. Implementation differences - - Because the TrueType engine serves more as a `font format - driver' than a general and high-level text-rendering library, it - has been decided to keep its code as simple and compact as - possible. - - This implies some implementation differences between the three - thread modes, which are briefly explained below: - - - Single-thread and thread-safe mode can have a state, which - means for ttfile.c, a `current stream' and `current frame'. - - - In the reentrant mode, the `state' must be stored in a - thread-local place, which means the stack (or more simply - local function variables). - - What follows is that some ttfile functions won't take the same - number of arguments depending on the thread-support mode. Let - uss take the example of frame access and parsing: - - In single-thread and thread-safe mode, the current frame is - automatically set by the TT_Access_Frame() function, which only - takes a `size' argument to determine the run of bytes to extract - from the _current_stream_ within ttfile's state. - - Moreover, the TT_Get_XXXX() functions extract data from the - current frame, and need no arguments. A simple frame access - then looks like this: - - /* read the next 12-bytes frame from the _current_stream_ */ - error = TT_Access_Frame( 12 ); - if ( error ) - return error; - - /* now, extract all data from the _current_frame_ */ - object->field1 = TT_Get_Short(); - object->field2 = TT_Get_Long(); - object->field3 = TT_Get_Char(); - object->filed4 = TT_Get_Long(); - object->field5 = TT_Get_Byte(); - - /* done - now release the current frame */ - TT_Forget_Frame(); - - In reentrant mode, things are a bit different. The current - stream and current frame must be passed as parameters, and the - code looks like this (notice the new function parameters!): - - - TT_Frame frame; /* define a local variable to handle */ - /* the current frame */ - - .... /* we suppose we already have a stream variable */ - .... /* named `stream' (how surprising ;-) */ - - /* read the next 12-bytes frame from a given stream */ - error = TT_Access_Frame( stream, 12, &frame ); - if ( error ) - return error; - - /* now, extract all data from the given frame */ - object->field1 = TT_Get_Short( frame ); - object->field2 = TT_Get_Long ( frame ); - object->field3 = TT_Get_Char ( frame ); - object->filed4 = TT_Get_Long ( frame ); - object->field5 = TT_Get_Byte ( frame ); - - /* done - now release the current frame */ - TT_Forget_Frame( frame ); - - - The differences between these two schemes are striking. Though - an `easy' solution would have been to only write the engine in - reentrant-mode, it would have resulted in larger and slightly - slower code, as well as the source a bit more obscure about its - intents and thus harder to maintain. Also, the reentrant - version is only needed in rare cases and environments, and it - wasn't thought as a good idea to complexify _source_ code in - order to comply with rare uses. - - The problem is solved within the engine by the use of a set of - carefully selected macros, which help generate both versions - from a _single_ source file. - - Moreover, as the macros imitate the non-reentrant syntax (i.e., - the use of the `stream' and `frame' parameters is implicit to - the macros), the source is kept clear and easy to understand, - even if compiled in re-entrant mode. - - The code looks then like the following in the engine: - - /* read the next 12-bytes frame from the current stream */ - /* assignment of the error code in the local `error' */ - /* variable is also implicit to the ACCESS_Frame macro, */ - /* and its result is always a boolean (no ANSI warnings) */ - - if ( ACCESS_Frame( 12 ) ) - goto Fail; - - /* Now, extract all data from the current frame. */ - /* The macros GET_xxxxx use an implicit local `frame' */ - /* variable in reentrant mode. */ - - object->field1 = GET_Short(); - object->field2 = GET_Long(); - object->field3 = GET_Char(); - object->filed4 = GET_Long(); - object->field5 = GET_Byte(); - - /* done - now release the current frame */ - - FORGET_Frame(); - - Another advantage of the above code is its `expressiveness' in - the sense that it really describes what is happening during the - frame load, hiding the boring but necessary details required by - error checking and reentrancy. And if the error checks are - within the macros, we are sure we won't forget them because they - are `too boring to code' (one of the reason why `exceptions' - caught so quickly in C++ and Java). - - c. Consequences on ttfile - - Of course, the macros only hide real differences in - implementation which must be reflected in ttfile.h and ttfile.c. - In order to ease this task, some other macros are used, which - use is reserved for these two files. There are: - - STREAM_ARG - STREAM_ARGS - FRAME_ARG - FRAME_ARGS in ttfile.h - - CUR_Stream - STREAM_VAR - STREAM_VARS - FRAME_VAR - FRAME_VARS in ttfile.c - - All of these macros (with the exception of CUR_Stream) default - to nothing (i.e. a void macro) in single-thread and re-entrant - mode, which only differ from the use of a mutex lock and release - in the functions TT_Use_Stream() and TT_Done_Stream(). - CUR_Stream defaults to the file component's current stream, - found in its internal state (as you can guess, it designates the - `current stream'). - - On the opposite, the macros are used to define additional - function parameters (if a function is called) and arguments (if - calling in a function). For example, the following (fictional) - code: - - /* return the size of a given stream */ - long Stream_Size( STREAM_ARG ) - { - return CUR_Stream.size; - } - - expands to: - - long Stream_Size() - { - return file_component.current_stream.size; - } - - in non-reentrant mode, and to: - - long Stream_Size( TT_Stream stream ) - { - return (*stream).size; - } - - otherwise. - - Thus, we can see the following reentrant expansions: - - STREAM_ARG --> TT_Stream stream - STREAM_ARGS --> TT_Stream stream, (note the comma) - - FRAME_ARG --> TT_Frame frame - FRAME_ARGS --> TT_Frame frame, (note the comma) - - STREAM_VAR --> stream - STREAM_VARS --> stream, - - FRAME_VAR --> frame - FRAME_VARS --> frame, - - They follow these simple rules: - - - An XXXX_ARG is used to define a single optional parameter in - a function _prototype_. The parameter is said to be single - if it is not followed by anything, e.g. - - long Stream_Size( STREAM_ARG ) - - - An XXXX_ARGS is the same, followed by a comma, in order to - place other (non-optional) parameters behind, e.g. - - TT_Error Stream_Seek( STREAM_ARGS long pos ) - - - An XXXX_VAR is used, _only_ within ttfile.c, to _call_ a - function having an XXXX_ARG or XXXX_ARGS in its prototype - resp. declaration. - - long Stream_Left( STREAM_ARG ) - { - return ( Stream_Size( STREAM_VAR ) - - Stream_Pos( STREAM_VAR ) ); - } - - - An XXXX_VARS is the same, but can be followed by non-optional - parameters. - - The macros allow you to write some code independently of the - thread level within ttfile.c. - - ***************** - *** IMPORTANT *** - ***************** - - In general, porters should not be concerned about the use of - these macros. One easy way to port is to take the ANSI code in - ttfile.c and modify only the parts that really access the system - (like fopen(), fread(), fseek(), etc). - - These details are explained here to make you understand how the - code works, in case you are interested in more elaborate ports. - - --------------------------------------------------------------------- - - -IV. Mutex Component API -======================= - - As said before, the default library source code uses the ANSI libc - only, and the source code in ttmutex.c only contains dummy - functions which return a successful error condition in all cases. - - You thus NEED to specialize it in order to successfully use a - thread-safe or reentrant build. Here is explained what is really - important: - - -1. The TMutex type ------------------- - - The engine uses the `TMutex' type defined in ttmutex.h to handle - mutexes. It is only a typedef of a `void*' and should be kept - that way for the fastest porting. - - Your job will most probably be to store a system mutex/semaphore - handle or pointer in it. - - -2. The mutex macros and functions ---------------------------------- - - The interface file ttmutex.h defines several macros that are used - within the engine to protect all shared variables (like lists) - from concurrent accesses. All macros default to `void' (nothing) - in single thread mode, and to calls to the TT_Mutex_XXXX() - functions in multi-threaded modes. - - These functions are: - - o TT_Mutex_Create() - - Takes a TMutex address as an argument. It should place a NULL - pointer in this output variable in case of failure. - - o TT_Mutex_Lock() - - It also takes the address of a TMutex as an argument. Used to - lock the mutex/semaphore, of course. - - o TT_Mutex_Release() - - Guess what ;-) Same interface. - - o TT_Mutex_Delete() - - Destroys a mutex/semaphore. - - -3. Redefining the TMutex type ------------------------------ - - You can also get rid of the TT_Mutex_xxxx() functions if you want - to use your system's synchronization API. This can be done in two - simple steps: - - a. Redefine the TMutex type to suit your system's handle types. - - b. Redefine the MUTEX_xxxx() macros in order to call directly your - API in the case of multi-threaded builds. - - Both methods (specializing the TT_Mutex_xxx() functions or - redefining the macros) are possible. - - --------------------------------------------------------------------------- - - -V. Summary and Advanced Concepts -================================ - -1. Quick step-by-step guide to porting the system components ------------------------------------------------------------- - - a. Port the memory component - - o Look at the `ttmemory.h' file and change the macros - MEM_Copy(), MEM_Move(), and MEM_Set() to reflect your system's - API providing the equivalent functionality. The reason that - macros instead of functions are used there is that many - compilers are able to inline directly these functions within - your code. - - o Look at the `ttmemory.c' file. Replace the single malloc() - call with your own allocation routine, and the single free() - with your own release routine. If your allocator uses more - sophisticated functions, you will probably have to rewrite - more parts of this file. See section I above. - - b. Port the mutex component - - o Look at the file `ttmutex.c' and specialize each routine to - have it use your system's synchronization API. - - o For a more advanced port, you can also directly redefine the - definition of the TMutex type in ttmutex.h, as well as the - macro definitions (like MUTEX_Create(), MUTEX_Lock(), etc.) to - use directly your system's API. The TT_Mutex_xxxx() won't be - necessary then. - - c. Port the file component - - o For a quick port, look at the following functions and replace - the ANSI libc calls (like fopen(), fclose(), fread(), etc.): - - Stream_Activate(), Stream_Deactivate(), TT_Open_Stream(), - TT_Done_Stream(), TT_Seek_File(), TT_Skip_File(), - TT_Read_File(), TT_File_Pos() - - o If you plan to use memory-mapped files, you can have a look at - the Unix file component found in - `freetype/lib/arch/unix/ttmmap.c'. It should give you an - indication of what to do. - - -2. Exotic file systems and font resources ------------------------------------------ - - a. Other file naming conventions - - The high-level library uses the `TT_Text*' type to define the - type of characters used for a font file's pathname. By default, - it equals to the `char*' type, which allow you to open a face - object with the following call: - - error = TT_Open_Face( engine, "c:\fonts\times.ttf", &face ); - - The implementation of TT_Open_Face() passes directly the - pathname pointer to the internal TT_Open_Stream() function, - located in the file component, which really opens the file. - - Some filesystems use different naming conventions, like UTF-16 - code, where each character is coded in 16 bits. In order to - help them to use FreeType, all you need to do is the following: - - - Define the macro TT_HAVE_TT_TEXT. - - - Define the type `TT_Text' to the character type you need, like - 'wchar_t' for Unicode. - - Note that this should apply when compiling the FreeType library, - as well as WHEN INCLUDING THE FILE `freetype.h' IN YOUR - APPLICATIONS. - - If the configuration macro TT_HAVE_TT_TEXT is not defined, the - file `freetype.h' defines TT_Text as `char*'. You can read its - source code to see it more explicitly (look at the very first - lines of the code). - - You can also use TT_Text as a pointer to more specific files, - like a simple memory address when the font is located in ROM, - etc. - - Just synchronize the definition of TT_Text with the - implementation in ttfile.c! - - b. Font Resources - - FreeType 2.0 will feature many architectural changes that will - help make porting easier, especially with regards of the file - component. - - To do this, it will separate the concepts of a `font resource', - i.e. a file seen as a storage, from a `font stream', i.e. a - file seen as a stream of data. Only the resource related code - will be visible to porters, and it will be much easier to port - (for example, nearly all thread-support levels issues will be - treated internally in the rest of the engine, and will be - invisible to the resource component). - - We're sorry for the current design and state, but TT_Stream - started as a simple encapsulation of an ANSI FILE* variable, - before font-specific access patterns made them become what they - now are. - - FreeType 2.0 will be a good reason to re-design I/O access more - clearly, and fortunately with more power and flexibility (like - using easily files of different type, ROM-based, memory-mapped, - disk-based, in a single engine). - - However, all of this doesn't mean than the current design - doesn't work. It does, so don't hesitate to use it :-) - - --------------------------------------------------------------------- - - -VI. Troubleshooting -=================== - - To be written. - - --------------------------------------------------------------------- - - -Conclusion -========== - - To be written. - - ---- end of porting.txt --- Index: xc/extras/FreeType/docs/raster.txt diff -u xc/extras/FreeType/docs/raster.txt:1.1.1.1 xc/extras/FreeType/docs/raster.txt:removed --- xc/extras/FreeType/docs/raster.txt:1.1.1.1 Sat Feb 12 23:55:29 2000 +++ xc/extras/FreeType/docs/raster.txt Wed Mar 16 20:59:37 2005 @@ -1,577 +0,0 @@ -This file is an attempt at explaining the internals of the FreeType -rasterizer. This component is quite general purpose and could -easily be integrated into other programs (but still under the -current license). - --------------------------------------------------------------------- - - The HOWs and WHYs of the FreeType rasterizer - - by David Turner - - - I. Introduction - - II. Rendering Technology - -III. Implementation Details - - IV. Gray-Level Support - - - -I. Introduction -=============== - - A rasterizer is a library in charge of converting a vectorial - representation of a shape into a bitmap. The FreeType rasterizer - has been developed to render the glyphs found in TrueType files, - made up of segments and second-order Beziers. This document is an - explanation of its design and implementation. - - Though these explanations start from the basics, a knowledge of - common rasterization techniques is assumed. - - --------------------------------------------------------------------- - - -II. Rendering Technology -======================== - -1. Requirements ---------------- - - We will assume that all scaling/rotating/hinting/whatever has been - already done. The glyph is thus described, as in the TrueType - specification, by a list of points. Each point has an x and y - coordinate, as well as a flag that indicates whether the point is - _on_ or _off_ the curve. - - More precisely: - - - All point coordinates are in the 26.6 fixed float format as - defined by the specification. The orientation used is: - - ^ y - | reference orientation - | - *----> x - 0 - - This means that the `distance' between two neighbouring pixels - is 64 `units' (1 unit = 1/64th of a pixel). - - Note that, for the rasterizer, pixel centers are located at - integer coordinates, i.e., (0.0, 0.0) is the coordinate of the - origin's center (unlike what happens within the TrueType - bytecode interpreter where this point's center lies at (0.5, - 0.5)). - - A pixel line in the target bitmap is called a `scanline'. - - - A glyph is usually made of several contours, also called - outlines. A contour is simply a closed curve that delimits an - outer or inner region of the glyph. It is described by a series - of successive points of the points table. - - Each point of the glyph has an associated flag that indicates - whether it is `on' or `off' the curve. Two successive `on' - points indicate a line segment joining the two points. - - One `off' point amidst two `on' points indicates a second degree - Bezier parametric arc, defined by these three points (the `off' - point being the control point, and the `on' ones the start and - end points). - - Finally, two successive `off' points forces the rasterizer to - create, during rendering, an `on' point amidst them, at their - exact middle. This greatly facilitates the definition of - successive Bezier arcs. - - * # on curve - * off curve - __---__ - #-__ _-- -_ - --__ _- - - --__ # \ - --__ # - -# - Two `on' points - Two `on' points and one `off' point - between them - - * - # __ Two `on' points with two `off' - \ - - points between them. The point - \ / \ marked `0' is the middle of the - - 0 \ `off' points, and is a `virtual - -_ _- # on' point where the curve passes. - -- It does not appear in the point - * list. - - - The FreeType rasterizer, as intended to render TrueType glyphs, - does not support third order Beziers, usually found in Type 1 - fonts. Type 1 support may lead to further development of the - engine (it is already part of FreeType 2.0). - - The parametric form of a second-order Bezier is: - - P(t) = (1-t)^2*P1 + 2*t*(1-t)*P2 + t^2*P3 - - with t a real number in the range [0..1] - - P1 and P3 are the endpoints, P2 the control point. - - Note that the rasterizer does not use this formula. It exhibits, - however, one very useful property of Bezier arcs: Each point of - the curve is a weighted average of the control points. - - As all weights are positive and always sum up to 1, whatever the - value of t, each arc point lies within the triangle defined by the - arc's three control points. - - -2. Profiles and Spans ---------------------- - - The following is a basic explanation of the _kind_ of computations - made by the rasterizer to build a bitmap from a vector - representation. Note that the actual implementation is slightly - different, due to performance tuning and other factors. - - However, the following ideas remain in the same category, and are - more convenient to understand. - - a. Sweeping the shape - - The best way to fill a shape is to decompose it into a number of - simple horizontal segments, then turn them on in the target - bitmap. These segments are called `spans'. - - __---__ - _-- -_ - _- - - - \ - / \ - / \ - | \ - - __---__ Example: filling a shape - _----------_ with spans. - _-------------- - ----------------\ - /-----------------\ This is typically done from the top - / \ to the bottom of the shape, in a - | | \ movement called a `sweep". - V - - __---__ - _----------_ - _-------------- - ----------------\ - /-----------------\ - /-------------------\ - |---------------------\ - - - In order to draw a span, the rasterizer must compute its - coordinates, which are simply the shape's contours' - x-coordinates taken on the y-scanlines. - - - /---/ |---| Note that there are usually - /---/ |---| several spans per scanline. - | /---/ |---| - | /---/_______|---| When rendering this shape to the - V /----------------| current scanline y, we must - /-----------------| compute the x values of the - a /----| |---| points a, b, c, and d. - - - - * * - - - - * * - - y - - / / b c| |d - - - /---/ |---| - /---/ |---| And then turn on the spans a-b - /---/ |---| and c-d. - /---/_______|---| - /----------------| - /-----------------| - a /----| |---| - - - - ####### - - - - ##### - - y - - / / b c| |d - - b. Decomposing outlines into profiles - - For each scanline during the sweep, we need the following - information: - - o The number of spans on the current scanline, given by the - number of shape points intersecting the scanline (these are - the points a, b, c, and d in the above example). - - o The x coordinates of these points. - - These are computed before the sweep, in a phase called - `decomposition' which converts the glyph into *profiles*. - - Put it simply, a `profile' is a contour's portion that can only - be either ascending or descending, i.e., it is monotonic in the - vertical direction (we will also say y-monotonic). There is no - such thing as a horizontal profile, as we shall see. - - Here are a few examples: - - - this square - 1 2 - ---->---- is made of two - | | | | - | | profiles | | - ^ v ^ + v - | | | | - | | | | - ----<---- - - up down - - - this triangle - - P2 1 2 - - |\ is made of two | \ - ^ | \ \ | \ - | | \ \ profiles | \ | - | | \ v ^ | \ | - | \ | | + \ v - | \ | | \ - P1 ---___ \ ---___ \ - ---_\ ---_ \ - <--__ P3 up down - - - - A more general contour can be made of more than two profiles: - - __ ^ - / | / ___ / | - / | / | / | / | - | | / / => | v / / - | | | | | | ^ | - ^ | |___| | | ^ + | + | + v - | | | v | | - | | | up | - |___________| | down | - - <-- up down - - - Successive profiles are always joined by horizontal segments - that are not part of the profiles themselves. - - Note that for the rasterizer, a profile is simply an *array* - that associates one horizontal *pixel* coordinate to each bitmap - *scanline* crossed by the contour's section containing the - profile. Note also that profiles are *oriented* up or down - along the glyph's original flow orientation. - - In other graphics libraries, profiles are also called `edges' or - `edgelists'. - - c. The Render Pool - - FreeType has been designed to be able to run well on _very_ - light systems, including embedded systems with very few memory. - - A render pool will be allocated once; the rasterizer uses this - pool for all its needs by managing this memory directly in it. - The algorithms that are used for profile computation make it - possible to use the pool as a simple growing heap. This means - that this memory management is actually easy, and faster than - any kind of malloc()/free() combination. - - Moreover, we'll see later that the rasterizer is able, when - dealing with profiles too large and numerous to lie all at once - in the render pool, to immediately decompose recursively the - rendering process into independent sub-tasks, each taking less - memory to be performed (see `sub-banding' below). - - The render pool doesn't need to be large. A 4kByte pool is - enough for nearly all renditions, though nearly 100% slower than - a more confortable 16 or 32kByte pool (that was tested with - complex glyphs at sizes over 500 pixels). - - d. Computing Profiles Extents - - Remember that a profile is an array, associating a _scanline_ to - the x pixel coordinate of its intersection with a contour. - - Though it's not exactly how the FreeType rasterizer works, it is - convenient to think that we need a profile's height before - allocating it in the pool and computing its coordinates. - - The profile's height is the number of scanlines crossed by the - y-monotonic section of a contour. We thus need to compute these - sections from the vectorial description. In order to do that, - we are obliged to compute all (local and global) y-extrema of - the glyph (minima and maxima). - - - P2 For instance, this triangle has only - two y-extrema, which are simply - |\ - | \ P2.y as an y-maximum - | \ P3.y as an y-minimum - | \ - | \ P1.y is not an y-extremum (though it is - | \ a x-minimum, which we don't need). - P1 ---___ \ - ---_\ - P3 - - Note that the extrema are expressed in pixel units, not in - scanlines. The triangle's height is certainly (P3.y-P2.y+1) - pixel units, but its profiles' heights are computed in - scanlines. The exact conversion is simply: - - - min scanline = FLOOR ( min y ) - - max scanline = CEILING( max y ) - - A problem arises with Bezier Arcs. While a segment is always - necessarily y-monotonic (i.e., flat, ascending, or descending), - which makes extrema computations easy, the ascent of an arc can - vary between its control points. - - P2 - * - # on curve - * off curve - __-x--_ - _-- -_ - P1 _- - A non y-monotonic Bezier arc. - # \ - - The arc goes from P1 to P3. - \ - \ P3 - # - - We first need to be able to easily detect non-monotonic arcs, - according to their control points. I will state here, without - proof, that the monotony condition can be expressed as: - - P1.y <= P2.y <= P3.y for an ever-ascending arc - - P1.y >= P2.y >= P3.y for an ever-descending arc - - with the special case of - - P1.y = P2.y = P3.y where the arc is said to be `flat'. - - As you can see, these conditions can be very easily tested. - They are, however, extremely important, as any arc that does not - satisfy them necessarily contains an extremum. - - Note also that a monotonic arc can contain an extremum too, - which is then one of its `on' points: - - P1 P2 - #---__ * P1P2P3 is ever-descending, but P1 - -_ is an y-extremum. - - - ---_ \ - -> \ - \ P3 - # - - Let's go back to our previous example: - - P2 - * - # on curve - * off curve - __-x--_ - _-- -_ - P1 _- - A non-y-monotonic Bezier arc. - # \ - - Here we have - \ P2.y >= P1.y && - \ P3 P2.y >= P3.y (!) - # - - We need to compute the y-maximum of this arc to be able to - compute a profile's height (the point marked by an `x'). The - arc's equation indicates that a direct computation is possible, - but we'll rely on a different technique, which use will become - apparent a bit later. - - Bezier arcs have the special property of being very easily - decomposed into two other sub-arcs, which are themselves Beziers - arcs. Moreover, it is easy to prove that there is at most one - y-extremum on each Bezier arc (for second degree ones). - - For instance, the following arc P1P2P3 can be decomposed into - two sub-arcs Q1Q2Q3 and R1R2R3 that look like: - - P2 - * - # on curve - * off curve - - - Original Bezier Arc P1P2P3. - __---__ - _-- --_ - _- -_ - - - - / \ - / \ - # # - P1 P3 - - - - - P2 - * - - - - Q3 Decomposed into two subarcs - Q2 R2 Q1Q2Q3 and R1R2R3 - * __-#-__ * - _-- --_ - _- R1 -_ Q1 = P1 R3 = P3 - - - Q2 = (P1+P2)/2 R2 = (P2+P3)/2 - / \ - / \ Q3 = R1 = (Q2+R2)/2 - # # - Q1 R3 Note that Q2, R2, and Q3=R1 - are on a single line which is - tangent to the curve. - - We have then decomposed a non-y-monotonic bezier into two - smaller sub-arcs. Note that in the above drawing, both sub-arcs - are monotonic, and that the extremum is then Q3=R1. However, in - a more general case, only one sub-arc is guaranteed to be - monotonic. Getting back to our former example: - - Q2 - * - - __-x--_ R1 - _-- #_ - Q1 _- Q3 - R2 - # \ * - - - \ - \ R3 - # - - Here, we see that, though Q1Q2Q3 is still non-monotonic, R1R2R3 - is ever descending: we thus know that it doesn't contain the - extremum. We can then re-subdivide Q1Q2Q3 into two sub-arcs and - go on recursively, stopping when we encounter two monotonic - subarcs, or when the subarcs become simply too small. - - We will finally find the y-extremum. Note that the iterative - process of finding an extremum is called `flattening'. - - e. Computing Profiles coordinates - - Once we have the height of each profile, we are able to allocate - it in the render pool. We now have to compute its coordinate - for each scanline. - - In the case of segments, the computation is straightforward, and - uses good old Euclide (also known as Bresenham ;-). However, - for Bezier arcs, things get a little more complicated. - - We assume that all Beziers that are part of a profile are the - result of `flattening' the curve, which means that they are all - y-monotonic (ascending or descending, and never flat). We now - have to compute the arcs' intersections with the profile's - scanlines. One way is to use a similar scheme to `flattening', - called `stepping'. - - Consider this arc, going from P1 to - --------------------- P3. Suppose that we need to - compute its intersections with the - drawn scanlines. Again, this is - --------------------- feasible directly, if we dare - to compute one square root per - * P2 _---# P3 scanline (how great!). - ------------- _-- -- - _- - _/ Rather, it is still possible to use - ---------/----------- the decomposition property in the - / same recursive way, i.e. subdivide - | the arc into subarcs until these - ------|-------------- get too small to cross more than - | one scanline! - | - -----|--------------- This is very easily done using a - | rasterizer-managed stack of - | subarcs. - # P1 - - f. Sweeping and Sorting the spans - - Once all our profiles have been computed, we begin the sweep to - build (and fill) the spans. - - As the TrueType specification uses the winding fill rule, we - place on each scanline the profiles present in two separate - lists. - - One list, called the `left' one, only contains ascending - profiles, while the other `right' list contains the descending - profiles. - - As each glyph is made of closed curves, a simple geometric - property is that the two lists necessarily contain the same - number of elements. - - Creating spans is there straightforward: - - 1. We sort each list in increasing x order. - - 2. We pair each value of the left list, with its corresponding - value in the right one. - - - / / | | For example, we have here - / / | | four profiles. Two of - >/ / | | | them are ascending (1 & - 1// / ^ | | | 2 3), while the two others - // // 3| | | v are descending (2 & 4). - / //4 | | | On the given scanline, - a / /< | | the left list is (1,3), - - - - *-----* - - - - *---* - - y - and the right one is - / / b c| |d (4,2) (sorted). - - There are then two spans, joining - 1 to 4 (i.e. a-b) and 3 to 2 - (i.e. c-d)! - - Sorting doesn't necessarily take much time, as in 99 cases out - of 100, the lists' order is kept from one scanline to the next. - We can thus implement it with two simple singly-linked lists, - sorted by a classic bubble-sort, which takes a minimum amount of - time when the lists are already sorted. - - A previous version of the rasterizer used more elaborate - structures, like arrays to perform `faster' sorting. It turned - out that this old scheme is not faster than the one described - above. - - Once the spans have been `created', we can simply draw them in - the target bitmap. - - g. Drop-out control - - To be continued. - - ---- end of raster.txt --- Index: xc/extras/FreeType/docs/readme.txt diff -u xc/extras/FreeType/docs/readme.txt:1.1.1.2 xc/extras/FreeType/docs/readme.txt:removed --- xc/extras/FreeType/docs/readme.txt:1.1.1.2 Sat Feb 12 23:55:29 2000 +++ xc/extras/FreeType/docs/readme.txt Wed Mar 16 20:59:37 2005 @@ -1,106 +0,0 @@ -Welcome to the documentation directory of FreeType. - -Here are short overview where you can find which information. - - - apiref.txt FreeType high-level API reference. All the types, - functions, and error codes of FreeType. - - .................................................................. - - apirefx.txt The API reference of FreeType extensions which come - with the library itself. - - .................................................................. - - bitmaps.txt How to render a glyph outline into a bitmap. - - .................................................................. - - changes.txt Guess what :-) - - .................................................................. - - convntns.txt The FreeType developer's conventions guide. Lists - the design and coding conventions used in the - engine's source code. This file is incomplete but - contains information that should be read by any - person willing to hack the FreeType code. - - .................................................................. - - credits A list of persons who have contributed to FreeType. - - .................................................................. - - glyphs.htm An introduction to glyphs in general, its usage in - glyphs.txt TrueType, and how FreeType handles them. The file - `glyphs.txt' is a simple text dump (done with - Netscape) of glyphs.htm. - - .................................................................. - - i18n.txt A short introduction to the GNU gettext package. - - .................................................................. - - porting.txt The FreeType porting guide. All you need to - configure and adapt very easily FreeType's source - code to tailor it to your own platform. - - Learn how to provide your own memory, i/o, and mutex - components, optimally fitted to your system. See - how you can build a singly-threaded, thread-safe, or - re-entrant version of the engine from the same - source code! - - .................................................................. - - raster.txt The scan-line converter's internals explained. The - document is still incomplete but presents many key - concepts. - - .................................................................. - - threads.txt How to use threads with FreeType. - - .................................................................. - - user.txt FreeType's user guide. A guide to FreeType's - concepts, a step by step example, and a note about - future works and projects. - - .................................................................. - - FAQ The new up-to-date FreeType FAQ. Look here first if - you have problems with the library. - - .................................................................. - - TODO Things which probably will come, which would be nice - to have, problems still here, etc. - - - -These documents will probably come later. - - develop.txt The FreeType developer's guide. All you need to know - in order to be able to understand and even hack the - engine's core source code. - - extend.txt The FreeType extension writer's how-to. All you need - to be able to provide new extensions to the engine. - - undoc.txt Undocumented TrueType! - - Yes, ladies and gentlemen, the TrueType - specification is fuzzy and misleading enough to - disband some serious commercial developers, but that - wasn't enough for us. Even though it took some time - (aaargh...), we finally discovered through hard work - the real meanings of the specs, fixed some errors - and even found surprising undocumented behaviour or - features! - - ---- end of readme.txt --- Index: xc/extras/FreeType/docs/threads.txt diff -u xc/extras/FreeType/docs/threads.txt:1.1.1.2 xc/extras/FreeType/docs/threads.txt:removed --- xc/extras/FreeType/docs/threads.txt:1.1.1.2 Sat Feb 12 23:55:30 2000 +++ xc/extras/FreeType/docs/threads.txt Wed Mar 16 20:59:37 2005 @@ -1,117 +0,0 @@ -Threads with FreeType -===================== - - -The FreeType engine can now be compiled in thread-safe mode. -Because we want to keep the engine small and fast, the thread -protection is simple. This file gives an overview of what you can -do, and what you should strictly never do. - - -How to enable thread-safe support? - -A. You must have a valid replacement for the file `lib/ttmutex.c' - which calls your system's API to create, lock, and release - mutexes or semaphores. The current implementation is a dummy and - doesn't do anything. - -B. You must re-define the configuration macro - TT_CONFIG_OPTION_THREAD_SAFE located in `ttconfig.h'. Then - recompile. - - -IMPORTANT NOTE: - - If two threads create and use their own TT_Engine structure, they - can freely call the library concurrently on each of them (as well - as all their related objects), even in the non-threaded build. - The following remarks only apply to concurrent requests performed - on a single TT_Engine shared by multiple threads. - - --------------------------------------------------------------------- - -- What you can do: - - With the exceptions listed below (in `What you can't do'), you can - call all API functions concurrently with two different threads. - This includes: - - Creating two or more faces from the same engine (i.e. concurrent - calls to TT_Open_Face()/TT_Open_Collection()). - - Creating two or more instances from the same face object - (i.e. concurrent calls to TT_New_Instance()). - - Creating two or more glyph containers from the same face object - (i.e. concurrent calls to TT_New_Glyph()). - - The same holds for destruction of objects. - - Load two or more glyphs concurrently for the same face or - instance (i.e. concurrent TT_Load_Glyph() calls). - - Render two or more glyphs at the same time, in the same engine - (i.e. calling TT_Get_Glyph_Bitmap()/TT_Get_Glyph_Pixmap() or - TT_Get_Outline_Bitmap()/TT_GetOutline_Pixmap() concurrently). - - NOTE: The scan-line converter can only render one glyph at a - time, for a given TT_Engine. Concurrent calls are - synchronized through a mutex, though. - - If you really, _really_, need to generate bitmaps or - pixmaps concurrently, create an additional engine and use - it with TT_Get_Outline_Bitmap()/TT_Get_Outline_Pixmap() - (you don't need to create any object in it, the outline - can come from any source too). - - This is, however, not recommended (it works perfectly, but - this could change in the future for various technical - reasons). - - ---------------------------------------------------------------------------- - -- What you cannot do: - - - You shouldn't try to delete an object while still using it with - another thread. The engine doesn't protect you from stupidity! - For example, these concurrent calls: - - TT_Close_Face( face ); - TT_Get_Glyph_Bitmap( glyph, &bitmap ); - - will act unexpectedly if the glyph is a child of the face (i.e., - was created with TT_New_Glyph( face, &glyph )) - ^^^^ - same face - - Here are some other examples: - - TT_Get_Glyph_Outline( glyph1, ... ); - TT_Load_Glyph( instance, glyph1, ... ); - - or - - TT_Get_Outline_BBox( outline, &bbox ); - TT_Transform_Outline( outline ); - - etc. - - You get the idea: Only the face and instances are protected -- - glyph containers and outlines should be thread-specific. - - - - You shouldn't initialize extensions in an engine concurrently - (which is what every mere mortal will do anyway :-). - - - -That's about it. Now enjoy the lib ;-) - - -PS: See the `MT-Note' and `MT-Safe' remarks in ttapi.c for more - detailed information on each specific function. - - ---- end of threads.txt --- Index: xc/extras/FreeType/docs/user.txt diff -u xc/extras/FreeType/docs/user.txt:1.1.1.2 xc/extras/FreeType/docs/user.txt:removed --- xc/extras/FreeType/docs/user.txt:1.1.1.2 Sat Feb 12 23:55:33 2000 +++ xc/extras/FreeType/docs/user.txt Wed Mar 16 20:59:37 2005 @@ -1,916 +0,0 @@ - - The FreeType Engine - - Core Library User Guide - - or - - How to use the engine in your applications and font servers - - --------------------------------------------------- - - Introduction - - - I. Basic Concepts - - 1. Concepts - 2. Handles - 3. Conventions of use - 4. Object classes - - II. Extensions - - 1. What is an extension? - 2. Where to find them - 3. Writing your own extension - - Conclusion - --------------------------------------------------------------------- - -Introduction -============ - - This file has been written to present the FreeType core library to - would-be writers of applications and font servers. It first - describes the concepts on which the engine is based, then how to - use it to obtain glyph metrics, outlines and bitmaps. - - The last part discusses the ability to add and use extensions to - the core library to get access to supplemental TrueType tables - which are not currently provided by the core engine. If you would - like to write your own extensions, read also the FreeType - developer's guide. - - -I. Basic Concepts -================= - - - 1. Concepts - ----------- - - FreeType defines several kinds of structures called `objects', - that are used to manage the various abstractions required to - access and display fonts. - - In care of good encapsulation, these objects are not directly - accessible from a client application. Rather, the user receives - a `handle' for each object he or she queries and wants to use. - This handle is a stand-alone reference; it cannot be used like a - pointer to access directly the object's data. - - 2. Properties - ------------- - - It is however possible to obtain and set object properties - through several functions of the API. For example, you can - query a face object's properties with only a handle for it, - using the function TT_Get_Face_Properties(). - - Note that the data will be returned in a user-allocated - structure, but will also contain pointers addressing directly - some data found within the object. - - A client application should never modify the data through these - pointers! In order to set new properties' values, the user must - always call a specific API function to do so, as a certain - number of other related data might not appear in the returned - structure and imply various non-visible coherency and coercion - rules. - - 3. Conventions of use - --------------------- - - o All API functions have their label prefixed by `TT_', as well - as all external (i.e. client-side) types. - - o To allow the use of FreeType's core engine in threaded - environments, nearly all API functions return an error code, - which is always set to 0 in case of success. - - The error codes' type is `TT_Error', and a listing of them is - given in the API references (see `apiref.txt' and - `apirefx.txt'). - - Some functions do not return an error code. Their result is - usually a value that becomes negative in case of error (this - is used for functions where only one kind of error can be - reported, like an invalid glyph index). - - An important note is that the engine should not leak memory - when returning an error, e.g., querying the creation of an - object will allocate several internal tables that will be - freed if a disk error occurs during a load. - - o A handle is acquired through API functions labeled along the - names: - - TT_Open_xxxx(), TT_New_xxxx() - - where `xxxx' is the object's class (Face, Instance, etc). - - Examples: - - TT_Open_Face(), TT_Open_Collection(), - TT_New_Instance(), TT_New_Glyph() - - o A handle is closed through an API labeled - - TT_Close_xxxx() or TT_Done_xxxx() - - where `xxxx' is the object's class (Face, Instance, etc). - - Examples: - - TT_Close_Face(), TT_Done_Instance(), TT_Done_Glyph() - - o Properties are obtained through an API labeled - - TT_Get_xxxx_yyyy() - - where `xxxx' is the object's class, and `yyyy' its property. - - Examples: - - TT_Get_Face_Properties(), TT_Get_Instance_Metrics() - TT_Get_Glyph_Outline(), TT_Get_Glyph_Bitmap() - - o Properties are set through an API labeled - - TT_Set_xxxx_yyyy() - - where `xxxx' is the object's class, and `yyyy' its property. - - Examples: - - TT_Set_Instance_Resolutions(), - TT_Set_Instance_CharSize() - - 4. Object Classes - ----------------- - - The following object classes are defined in this release of the - engine: - - o The Engine objects - - The FreeType library can be built to be completely re-entrant, - even though its default build doesn't support threads (more on - this in the `threads.txt'). - - As a consequence, it is possible to open several instances of - the library, called `engines'. Each engine has its own set of - current objects (faces, instances, etc.), and there is no - sharing between them. - - The idea is that the library could be compiled as a shared - library or DLL, and then be able to provide several distinct - engines to independent client applications. In this case, - each client program must create its own engine with - TT_Init_FreeType() to hold its data. - - Closing an engine will destroy _all_ objects that were - allocated since its opening, releasing all resources, etc., - with the exception of user-allocated outline objects. - - o The Face objects - - A face contains the data that is specific to a single TrueType - font file. It presents information common to all glyphs and - all point sizes like font-specific metrics and properties. - - You can open a face object by simply giving a pathname to the - TrueType file. You can later close (i.e. discard) the face - object. - - You can also open a single face embedded in a TrueType - collection. - - See also: - - TT_Open_Face(), TT_Open_Collection(), TT_Close_Face(), - TT_Get_face_Properties() - - o The Instance objects - - An instance is also called a `pointsize' or a `fontsize' in - some windowing systems. An instance holds the information - used to render glyphs on a specific device at a given point - size; it is always related to an opened face object. - - For instance, if you want to generate glyphs for text from the - same typeface at `sizes' of 10 and 12 points, all you need is - one face object, from which you will create two distinct - instances. - - A device is defined by its horizontal and vertical resolution, - usually specified in dots per inch (dpi). A point size is a - scaling number, given as _absolute_ values in points, where 1 - point = 1/72 inch. - - The `pixel' size, also known as the `ppem' value (for Points - Per EM square) is computed from both the device resolution and - the point size. It determines the size of the resulting glyph - bitmaps on your screen or sheet of paper. - - The default device resolution for any new instance is 96dpi in - both directions, which corresponds to VGA screens. The - default point size is 10pt. The high-level API allows you to - change this whenever you want for any given instance object. - - Note that closing a face object will automatically destroy all - its child instances (even though you can release them yourself - to free memory). - - See also: - - TT_New_Instance(), TT_Done_Instance(), - TT_Get_Instance_Metrics(), TT_Set_Instance_Resolutions(), - TT_Set_Instance_Pointsize() - - o The Glyph objects - - A Glyph object is a _container_ for the data that describes - any glyph of a given font. This means that it typically - holds: - - - Glyph metrics information, like bounding box or advance - width. - - - Outline arrays sized large enough to hold any glyph from the - face. This size is extracted from the face's internal - `maxProfile' table to optimize memory costs. - - - Other important parameters related to the `fine' rendering - of the glyphs. This includes things like the - dropout-control mode used at low sizes. - - - And it doesn't contain a bitmap or a pixmap! - - A glyph object is used to load, hint, and rasterize a single - glyph, as taken from the font file. - - See also: - - TT_New_Glyph(), TT_Done_Glyph(), TT_Get_Glyph_Metrics(), - TT_Get_Glyph_Outline(), TT_Get_Glyph_Bitmap(), - TT_Get_Glyph_Pixmap() - - o The Character Map (CharMap) handle - - Glyphs can be indexed in a TrueType file in any order, - independently of any standard character encoding, like ASCII - or Unicode. For this reason, each file comes with one or more - character mapping tables, used to translate from one specific - encoding's character codes to font glyph indices. - - There are many encoding formats, and each one can be - distinguished by two values: - - - its platform ID - - its platform-specific encoding ID - - Their values are defined in the TrueType specification and - won't be commented there. The FAQ lists the most commonly - used (platform,encoding) pairs. - - It is possible to enumerate the charmaps provided by a - TrueType font and to use any of these to perform translations. - - The charmaps are loaded into memory only on demand to save the - space taken by the maps that are not needed on your system. - They are part of the face object, however. - - This means that even though a charmap can be accessed through - a handle (obtained through the TT_Get_CharMap() function), it - isn't a stand-alone object. For example, you never need to - de-allocate it; this is automatically done by the engine when - its face object expires. - - See also: - - TT_Get_CharMap_Count(), TT_Get_CharMap_ID(), - TT_Get_CharMap(), TT_Char_Index(). - - o The Outline Objects - - An outline is a vector representation of a glyph. It is made - of several control points joined by line segments and Bezier - arcs, themselves gathered in closed paths called `contours'. - The outline have also several flags, or attributes, which are - used by the scan-line converter to select the best rendering - algorithms to convert the glyph's bitmap. - - Unlike other objects in FreeType, outlines aren't managed - through handles, but directly with the structure `TT_Outline', - defined for client applications. Each glyph container - contains an outline sized large enough to hold any glyph from - its parent face. Client applications can access it with - TT_Get_Glyph_Outline(). However, one can also create its own - outlines if needed with TT_New_Outline() and - TT_Clone_Outline(). - - Note that user-created outlines are NOT tracked by the - library. Hence, the client must release them himself with one - or more calls to TT_Done_Outline(). - - A various number of methods/operations are defined for the - outline class to simplify its management. - - - IMPORTANT NOTE: ********************************************** - - The definition of TT_Outline may change in the future. - Developers are thus advised to always use the outline - methods provided by the API rather than reading or setting - data themselves. - - ************************************************************** - - See also: - - TT_New_Outline(), TT_Clone_Outline(), TT_Copy_Outline(), - TT_Done_Outline(), TT_Get_Outline_BBox(), - TT_Get_Outline_Bitmap(), TT_Get_Outline_Pixmap(), - TT_Translate_Outline(), TT_Transform_Outline() - - o Bitmaps and Pixmaps - - One very important aspect of FreeType is that it is unable to - create bitmaps on its own. Rather, it is up to the client - application to do it, and pass a reference, in the form of a - TT_Raster_Map, to the scan-line converter (the component in - charge of generating bitmaps from outlines). - - Hence the importance of the TT_Raster_Map structure, which - layout is: - - struct - { - int rows; /* number of rows */ - int cols; /* number of columns (bytes) per row */ - int width; /* number of pixels per line */ - int flow; /* bitmap orientation */ - - void* bitmap; /* bit/pixmap buffer */ - long size; /* bit/pixmap size in bytes */ - } TT_Raster_Map; - - - The `rows' field contains the total number of rows in the - bitmap. - - - The `width' field gives the number of pixels per row (a bit - or a byte, depending on the map's nature). - - - The `cols' field gives the number of columns, i.e. bytes, - taken by each row in the map buffer. - - IMPORTANT: The `cols' field must be a multiple of 4 for - pixmaps! - - Typically, its value should be `(width+7)/8' for bitmaps, - and `(width+3) & -4' for pixmaps. - - - The `flow' field gives the map's vertical orientation. - - For example, if the first bytes of the bitmap buffer pertain - to its upper row, the flow is said to be going `down', and - the field should take the value `TT_Flow_Down'. If these - bytes pertain to its lowest row, the flow is going `up', and - the value is `TT_Flow_Up'. - - As an example, the PC video modes use a `down' flow, where - the first VRAM byte corresponds to the upper and leftmost - corner of the screen. - - - The `bitmap' field is a typeless pointer to the map's - buffer. - - - The `size' field contains the buffer's size in bytes. It is - usually computed as follows: - - size = rows * cols; - - NOTE: For bitmaps, the leftmost-pixel is related to the - highest (i.e. most significant) bit of its byte. - There is currently no support for the opposite - convention found in some systems. - - (It can be easily added if you really need it, just - ask the development team.) - - -II. Step-by-step Example -======================== - - Here is an example to show, step by step, how a client application - can open a font file, set one or several instances, load any - glyph, then render it to a bitmap. - - 1. Initialize the engine - ------------------------ - - This is the first thing to do. You need to initialize an engine - through a call to TT_Init_FreeType(). This function will set up - a various number of structures needed by the library. - - This allocates about 68kByte, of which 64kByte are dedicated to - the scan-line converter's `render pool', a workspace used for - bitmap generation. Note that even though this space is bounded, - the raster is able to render a glyph to any size or bitmap, even - horribly huge ones. - - NOTE: You can reduce the size of this pool by modifying the - constant RASTER_RENDER_POOL in the file `ttraster.c'. A - smaller pool will result in slower rendering at large - sizes. Take care of never assigning a value smaller than - 4kByte however, as bugs may start to lurk in! - - Example: - - TT_Engine engine; - - - error = TT_Init_FreeType( &engine ); - if ( error ) - { - printf( "could not create engine instance\n"); - ... - } - - 2. Initialize the extensions you need - ------------------------------------- - - FreeType provides several extensions which are optional, - separately compilable components to add some rare features to - the engine and its API. - - You need to explicitly initialize the extensions you want to - use. Each extension must provide an initialization function, - following the naming convention: - - TT_Init_xxx_Extension( engine ); - - where `xxx' is the extension's `kind'. - - Example: - - error = TT_Init_Kerning_Extension( engine ); - if ( error ) - ... - - 3. Open the font file - --------------------- - - There are two ways to open a font face, depending on its file - format: - - - If it is a TrueType file (ttf), you can simply use the API - named TT_Open_Face(), which takes the file's pathname as - argument, as well as the address of the returned face handle. - - Check the returned error code to see if the file could be - opened and accessed successfully. - - TT_Face face; /* face handle */ - - - error = TT_Open_Face( engine, "/fonts/arial.ttf", &face ); - if ( error ) - { - printf( "could not open the file\n" ); - ... - } - - - If the font is embedded in a TrueType collection (ttc), you - can use the API named TT_Open_Collection(), which takes also - the font's index within the collection's directory. - - TT_Face face; /* face handle */ - - - /* Load the collection's second face (index=1) */ - error = TT_Open_Collection( engine, "/fonts/mingli.ttc", - 1, &face ); - if ( error ) - { - printf( "could not open the file\n" ); - ... - } - - - Finally, when you do not know the number of faces embedded in - a TrueType collection, the following technique can be used: - - o Call TT_Open_Face() with the collection file's pathname. - This API recognizes collections automatically and always - return a handle for its first embedded font. - - o Get the face's properties through TT_Get_Face_Properties(). - These contain, among other things, the total number of fonts - embedded in the collection, in its field `num_Faces'. - - TT_Face face; /* face handle */ - TT_Face_Properties props; /* face properties */ - - - /* open the first collection font */ - error = TT_Open_Face( engine, "/fonts/mingli.ttc", - &face ); - if ( error ) - { - printf( "could not open the file\n" ); - ... - } - - /* Get the face properties */ - TT_Get_Face_Properties( face, &props ); - - /* Now print the number of faces */ - printf( "there are %d faces in this collection file\n", - props->num_Faces ); - - 4. Create an instance from the face object - ------------------------------------------ - - You must create an instance (also known as a `pointsize') which - contains information relative to the target output device's - resolutions and a given point size. - - o The instance object is created through TT_New_Instance(): - - TT_Instance instance; - - - error = TT_New_Instance( face, &instance ); - if ( error ) - { - printf( "could not create instance\n" ); - ... - } - - TECHNICAL NOTE: Creating a new instance executes its font - program. This can fail if the font is broken. - Never assume that the error code returned here - is always 0. - - o You must set the instance's properties to suit your needs. - These are simply its device resolutions, set through - TT_Set_Instance_Resolutions(), and its point size, set through - TT_Set_Instance_CharSize(): - - /* Set the target horizontal and vertical resolution to */ - /* 300dpi in each direction (typically for a printer). */ - /* A fresh instance's default resolutions are 96dpi in */ - /* both directions. */ - error = TT_Set_Instance_Resolutions( instance, 300, 300 ); - if ( error ) - { - printf( "could not set resolution\n" ); - ... - } - - /* Now set the point size to 12pt. Default is 10pt. */ - /* Don't forget that the size is expressed in 26.6 fixed */ - /* float format, so multiply by 64. */ - error = TT_Set_Instance_CharSize( instance, 12 * 64 ); - if ( error ) - { - printf( "could not set point size\n" ); - ... - } - - TECHNICAL NOTE: These calls may execute the font's `prep' - program, which can fail if the font is broken. - Never assume that the error code returned is - are always 0. - - o You can also set the instance's transformation flags to tell - the glyph loading function that you are going to perform a - transformation (like rotation or slanting) on the glyph. Note - that the glyph loader doesn't perform the transformation. It - only informs the glyphs' hinting instruction streams about - these flags which may use it to disable or enable various - features (grid-fitting, drop-out control, etc). - - Use e.g. - - TT_Set_Instance_Transforms( FALSE, TRUE ); - - to indicate that you're going to stretch, but not rotate, this - instance's glyphs. Default is, of course, both FALSE. - - 5. Create a glyph container - --------------------------- - - You need a glyph object to serve as a container for the glyphs - you want to load from the face. This is done simply by - - TT_Glyph glyph; /* glyph object handle */ - - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - { - printf( "could not create glyph\n" ); - ... - } - - 6. Find your platform's character mappings - ------------------------------------------ - - Each font file can come with one or more character mapping - tables, used to convert character codes to glyph indices. You - must know the values of the `platformID' and `encodingID' as - defined in the TrueType specification for your platform. For - example, Windows Unicode encoding is (platform:3,encoding:1), - while Apple Unicode is (platform:0,encoding:0). Both formats - differ in internal storage layout and can be used transparently - with the same inputs with FreeType. - - The function TT_Get_CharMap_Count() returns the number of - character mappings present in a face. You can then enumerate - these with the function TT_Get_CharMap_ID(). Once you've found - a mapping usable for your platform, use TT_Get_CharMap() to - return a TT_CharMap handle that will be used later to get glyph - indices. - - 7. Load the glyph - ----------------- - - The glyph loader is easily queried through TT_Load_Glyph(). - This API function takes several arguments: - - o An instance handle to specify at which point size and - resolution the loaded glyph should be scaled and grid-fitted. - - o A glyph container, used to hold the glyph's data in memory. - Note that the instance and the glyph must relate to the _same_ - font file. An error would be produced immediately otherwise. - - o A glyph index, used to reference the glyph within the font - file. This index is not a platform specific character code, - and a character's glyph index may vary from one font to - another. To compute glyph indices from character codes, use - the TT_CharMap handle created in section 6 with - TT_Char_Index(). - - We strongly recommend using the Unicode charmap whenever - possible. - - o A load mode, indicating what kind of operations you need. - There are only two defined for the moment: - - TTLOAD_SCALE_GLYPH: - - If set, this flag indicates that the loaded glyph will be - scaled (according to the instance specified as an - argument) to fractional pixel coordinates (26.6). If not, - the coordinates will remain integer FUnits. Please refer - to the TrueType specification and the FreeType header - files for more details on the 26.6 format and other data - types. - - TTLOAD_HINT_GLYPH: - - This flag is only in effect if the TTLOAD_SCALE_GLYPH flag - is set. It indicates that the glyph must also be `hinted' - resp. `grid-fitted' for better display results. Note that - this also means that the glyph metrics will be - grid-fitted, including the bounding box. - - You can simply `or' the flags. As most applications will - require both flags to be set, the constant TTLOAD_DEFAULT is - defined as: - - #define TTLOAD_DEFAULT (TTLOAD_SCALE_GLYPH | \ - TTLOAD_HINT_GLYPH ) - - Example: - - error = TT_Load_Glyph( instance, glyph, 36, - TTLOAD_DEFAULT ); - if ( error ) - { - printf("could not load the glyph\n"); - ... - } - - 8. Query glyph properties - ------------------------- - - You're then able to query various glyph properties: - - o The glyph metrics can be obtained through - TT_Get_Glyph_Metrics(). The data returned in the metrics - structure is: - - - the glyph's left side bearing (bearingX) - - the glyph's top side bearing (bearingY) - - the glyph's advance width (advance) - - the glyph's bounding box (bbox) - - These values are expressed in 26.6 pixel units when the glyph - was loaded with scaling, or in FUnits if not. To obtain - vertical metrics you should use the function - TT_Get_Glyph_Big_Metrics(). - - o The glyph outline can be queried through - TT_Get_Glyph_Outline(). This can be useful to process the - point coordinates (e.g. applying stretching or rotation) with - functions like TT_Apply_Outline_Matrix() or - TT_Apply_Outline_Translation(). Note that these functions do - not recompute a glyph's metrics after the transformation! - - The outline's structure is described in the reference - `apiref.txt'. - - A bitmap or pixmap for the glyph can be queried with the API - functions TT_Get_Glyph_Bitmap() and TT_Get_Glyph_Pixmap(). - These functions take a glyph handle as an argument, as well as - a bitmap/pixmap description block and two offsets. - - The target map is described through a TT_Raster_Map object, - which structure is defined in the reference (see - `apiref.txt'). The offsets are given in the same units as the - points coordinates and glyph metrics: 26.6 pixel units for a - scaled glyph, and FUnits for an unscaled one. - - IMPORTANT TECHNICAL NOTE: If the glyph has been scaled and - hinted, the offsets _must_ be - multiples of 64 (i.e. integer pixel - offsets). Otherwise, you would ruin - the grid fitting (which usually - results in ugly glyphs). - - Example: - - TT_Glyph_Metrics metrics; - TT_Outline outline; - TT_Raster_Map bitmap; - - - TT_Get_Glyph_Metrics( glyph, &metrics ); - TT_Get_Glyph_Outline( glyph, &outline ); - - /* set up the bitmap */ - ... - TT_Get_Glyph_Bitmap( glyph, &bitmap, 0, 0 ); - - 9. When you are done - -------------------- - - o You can close any font face object with TT_Close_Face(). This - call will automatically discard its child instances, glyphs - and charmaps. - - o You can also close the engine with a single call to - TT_Done_FreeType(). This will release _all_ objects that were - previously allocated (with the exception of user-created - outlines), and close all font files, as well as extensions - that were inited for it. - - -III. Extensions -=============== - - 1. What is an extension? - ------------------------ - - FreeType allows you to access a various number of TrueType - tables, as well as to render individual glyphs. However: - - 1. It doesn't perform some high-level operations, like - generating a string text from many individual glyphs. - - 2. It doesn't perform kerning (which can be needed by operations - mentioned in item 1). - - 3. It doesn't give access to all the defined TrueType tables, - especially the optional ones. - - While item 1 is a feature that will never go into FreeType's - core engine, which goal is to provide easy access to font data - and rendering _individual_ glyphs, point 2 and 3 can be added to - the engine's features through extensions. - - An extension is simply a small piece of code that extends the - engine's abilities and APIs. It is possible to extend the - engine without touching the core's source code, this is - described in chapter 3 below. - - 2. The two kinds of extensions - ------------------------------ - - There are basically two kinds of extensions, which require - different implementations. - - a. API extensions - - An API extension is a set of functions that extend the - FreeType core API to give access to tables that are already - loaded by the engine, but not provided for now. An example of - such data can be: - - - the horizontal metrics table (hmtx) - - the `gasp' table - - This kind of extension is made of: - - o an API extension header file, following the usage convention - introduced here (all labels prefixed with `TT_'), and which - will be included by the clients which want to use the - extension. By convention, such header names begin with - `ftx' (for FreeType eXtension). - - Examples: ftxgasp.h, ftxhmtx.h - - o One or more functions used to give access to the tables that - are already loaded and managed by the engine. They usually - only copy pointers to the target structure given by the - client application since these structures are not accessible - through the 'normal' API. An API extension doesn't need to - be initialized before being used. - - b. Engine extensions - - It can sometimes be useful to load and manage several tables - that are not considered by the core engine. These extensions - need to provide additional functions to fit into FreeType's - internal object management model, and are more sophisticated - than API extensions. - - An example is given in this distribution to provide kerning - support (or more technically spoken, access to the kerning - tables found within the TrueType files). It is made of: - - o An API extension providing new interfaces to the client - applications that need it. See the file `ftxkern.h' - resp. `apirefx.txt'. - - o A specific implementation, providing services to create, - load, and manage kerning tables as additional parts of a - face object. In the case of kerning, the directory of - tables is loaded when the face is opened, and tables - themselves are fetched from the file on demand. This - implies several `hooks' in the core engine. See the files - `ttkern.h' and `ttkern.c'. These are called `engine - extensions'. - - o A specific extension initialization function, namely - TT_Init_Kerning_Extension(), that must be called after an - engine's creation, and before any face object allocation. - This function will `register' the extension within the - engine and make its API workable. - - 3. Writing your own extensions - ------------------------------ - - As it was suggested earlier, writing an engine extension is a - delicate process, as the additional code must follow a certain - number of design rules, presented in the FreeType developer's - guide. Unfortunately, there is currently no extension writer's - guide. - - By writing your own extensions, it will be possible to support - more advanced TrueType formats like TrueType GX or OpenType in a - near future, without having to torture the engine core source at - each iteration. - - If you encounter some difficulties when trying to create your - own extension, please read the core source file carefully, and - in the event that you may need changes that are not fitted to - the current extension mechanism, do not hesitate to contact the - authors at `devel@freetype.org'. - - -Conclusion -========== - - The engine source code has become rather stable since now, and - its quality compares very favorably to Windows and the Macintosh - rasterizers. Its internals will continue to change, though very - slowly, even if the API isn't expected to grow much in a near - future. - - FreeType is really a glyph-oriented TrueType driver. Its - purpose is to open and manage font files in order to load single - glyphs and render them as cleanly as possible. A number of - features, important to developers, like text string rendering, - font mapping and underlining/stroking, to name a few, aren't - provided there even though they'd be highly appreciated. - - We hope you have success and fun using this engine. Much time - has been taken to make it one of the best in its genre. - Remember that it is not intended to be a complete font server or - text rendering library, but a pretty solid base for these kinds - of applications, as well as others. - - We thank you for your time and consideration. - - David Turner, Robert Wilhelm, Werner Lemberg, - and all the FreeType enthusiasts... - - ---- End of user.txt --- Index: xc/extras/FreeType/howto/mac.txt diff -u xc/extras/FreeType/howto/mac.txt:1.1.1.1 xc/extras/FreeType/howto/mac.txt:removed --- xc/extras/FreeType/howto/mac.txt:1.1.1.1 Sat Feb 12 23:55:35 2000 +++ xc/extras/FreeType/howto/mac.txt Wed Mar 16 20:59:38 2005 @@ -1,19 +0,0 @@ - The FreeType Mac Compilation HowTo - - - Please note that the FreeType team does *not* support the - Macintosh platform due to lack of knowledge. - - However, we provide the basic files to compile the library in - the lib/arch/mac directory (OK, `folders'). Also the project - files for PowerPC with CodeWarrior have been contributed (in - contrib/mac). - - A noteworthy point is that the precompiled standard MacOS - headers should be turned off to compile the library, to avoid - errors caused by conflicting definitions of `Fixed' and `Byte'. - - -Good luck! - ---- end of mac.txt --- Index: xc/extras/FreeType/howto/msdos.txt diff -u xc/extras/FreeType/howto/msdos.txt:1.1.1.1 xc/extras/FreeType/howto/msdos.txt:removed --- xc/extras/FreeType/howto/msdos.txt:1.1.1.1 Sat Feb 12 23:55:35 2000 +++ xc/extras/FreeType/howto/msdos.txt Wed Mar 16 20:59:38 2005 @@ -1,250 +0,0 @@ - The FreeType MS-DOS Compilation HowTo - -Contents - -Introduction -I. Building the library - 1. Quick Compilation - 2. Manual compilation - 3. Notes -II. Building other parts of the package - 1. Test programs - 2. Other contribs -III. Special issues of 16-bit MS-DOS - - - -Introduction -============ - -This file describes the compilation of the FreeType package on a -MS-DOS system. It comes with Makefiles for the following compilers: - - - gcc/emx and gcc/djgpp with GNU make (32 bit) - - - wcc386 with wmake (Watcom -- tried with 10.6) - - - gcc/emx with dmake (32 bit) - - - cl with nmake (16-bit Microsoft C -- tried with 7 and VC++ 1.5x) - - - bcc/tcc with make (16-bit Borland C++ and Turbo C) - -NOTE: - - You are advised to jump to section II.1 if you want to run the - FreeType test/demo programs as quick as possible. - - - -I. Building the library -======================= - - -1. Quick Compilation --------------------- - - The easiest way to compile the library on MS-DOS is to go to the - directory `freetype/lib'. Then type, depending on your compiler: - - gcc/emx, - gcc/djgpp: make -f arch/msdos/Makefile.gcc - gcc/dmake: dmake -r -f arch/msdos/Makefile.dm - - wcc386: wmake -f=arch\msdos\Makefile.wat - - cl: nmake /f arch\msdos\Makefile.MS (for version 7) - cl: nmake /f arch\msdos\Makefile.VC (for Visual C++ 1.x) - - tcc: make -farch/msdos/Makefile.TC - bcc: make -farch/msdos/Makefile.BC - - This should build the `libttf.a' or `libttf.lib' library files. - - You can also use the following targets: - - clean - Cleans all intermediate object files created during - compilation. Keeps all library and executables in - place. - - distclean - Cleans everything, leaving the directories as they - were before the compilation. - - debug - Makes a development version of the library. Only - useful for FreeType developers and hackers. - - Note that you can also select to use the `debugging' flags for - your compiler (instead of the `optimizing' ones), by defining - the `DEBUG' symbol, like in - - nmake /f arch\msdos\Makefile.MS DEBUG=1 - make -farch/msdos/Makefile.BC /DDEBUG - etc. - - Doing so will automatically select the debug target instead of - the normal mode. - - For 16-bit compilers, you can also try defining the `BIGFONTS' - symbol, to enable the use of the `huge pointers' needed to - handle some big fonts. More on this at the end of this file. - - -2. Manual compilation ---------------------- - - Here are explained the steps that are required to compile the - FreeType _library_ (and only this one) by hand. - - Unlike previous versions, FreeType 1.1 and above can be compiled - in two modes, called `debug mode' and `single object mode'. - - Debug mode is simply the normal way of compiling C programs, i.e., - each `*.c' file is compiled into an individual `*.obj' object - file, and all of them are linked together into an archive (i.e., - `*.lib' library). - - Single object mode is slightly different: All C files are included - in a single source during compilation, resulting in a single final - object file for the core library. This has the advantage of - letting optimizing compilers do more global work, as well as - getting rid of all external which are used solely for the purpose - of components interfacing. - - In both modes, you need to include the following paths to your - makefile/command line: - - the location of all `tt*.[hc]' files - the location of system-specific files - - For example, if you are compiling from the `freetype/lib' - directory, you can type for debug mode something like - - gcc -c -I. -Iarch/msdos tt*.c - - to compile all required files into object ones. Then assemble - them in a library with `ar', `lib', or `tlib'. - - In single object mode, you only need to compile the file named - `freetype.c' which is located in `freetype/lib/arch/msdos'. From - the same directory as before, one would type - - gcc -c -I. -Iarch/msdos arch/msdos/freetype.c - - You can also compile the extensions located in - `freetype/lib/extend' separately from the base engine. You will - need to include the same paths as before, though; be sure to add - the path to the `extend' directory, like in - - gcc -c -I. -Iarch/msdos -Iextend extend/*.c - - -3. Notes --------- - - `char' is always `signed char' in the sources! - - `ttconfig.h' relies heavily on a file called `ft_conf.h' that - contains information related to the target platform, located in - the `freetype/lib/arch/msdos/' directory. Depending on your - compiler, you may need to slightly edit it. - - We use gcc as our reference compiler for warnings. This means - that we use the `-ansi -pedantic -Wall' flags and try to get rid - of warnings in this situation. If you're compiling with another - compiler, you may encounter warnings, not errors. Note that the - Borland compilers seem to produce lots of irrelevant warnings - (like `potential loss of precision'). - - - -II. Building other parts of the package -======================================= - - -1. Test programs ----------------- - - These are located in `freetype/test'. Most of them use a tiny - graphics sub-system which is simply used to display bitmaps and - pixmaps on a variety of platforms. The MS-DOS version is a very - basic one that only works in full-screen using standard VGA mode. - - To compile them, you must be in the `freetype/test' directory and - invoke the makefile in arch/msdos. For example: - - nmake /f arch\msdos\Makefile.VC - - - NOTE 1: - - This will automatically invoke the library makefile for you! - - NOTE 2: - - For now, the graphical test programs only run on the following - platforms: Unix, OS/2, Dos, Amiga, and Windows. - - The library, being pure ANSI-C, can be used on any system to - generate bitmaps and pixmaps. - - -2. Other contribs ------------------ - - You may find some other contributions to the FreeType project in - the `freetype/contrib' directory. Each of these programs should - have its own Makefiles and documentations. Also check their - licenses, as the programs are not necessarily distributed under - the FreeType one. - - Most of these contributions are targeted to Unix. You are invited - to port them to MS-DOS, and then contribute your improvements. - - - -III. Special issues of 16-bit MS-DOS -==================================== - - As usual, 16-bit MS-DOS have some limitations. - - First, and mainly, only the large model is usable. The small and - medium models are not usable, because the library uses more than - 64kByte of data; and the compact model is unusable as well, since - the code of the library itself is slightly less than 64kByte, thus - leaving very small place for the real work. The net effect of - that limitation is that performances are not very impressive, to - say the least (32-bit DOS extenders perform usually three-time - faster). - - Even with the large model, the rasterizer is still limited in - size, particularly with pixmaps (that is, with anti-aliasing gray - levels). - - Another annoying limitation exists with some East Asian fonts that - have 16,383 glyphs or more, since an internal table then - overflows. We tried to overcome this using the so-called `huge - pointers', but then good support for these in the run-time library - is needed. To enable this support, try defining the `BIGFONTS' - symbol with the makefile, like using - - nmake /f arch\msdos\makefile.MS BIGFONTS=1 - make -farch/msdos/makefile.BC /DBIGFONTS - etc. - - The Makefiles for both Microsoft and Borland compilers depend on a - special file, `arch/msdos/depend.dos', which is built by a Unix - script named `makedep'. You may consider editing it if you - heavily modify the source files; or better yet, re-run the script, - using any clone of the Bourne shell and gcc, the GNU compiler, - with - - arch/msdos/makedep - - in both the `lib' and the `test' directories. - - - -Good luck! - - ---- end of msdos.txt --- Index: xc/extras/FreeType/howto/os2.txt diff -u xc/extras/FreeType/howto/os2.txt:1.1.1.2 xc/extras/FreeType/howto/os2.txt:removed --- xc/extras/FreeType/howto/os2.txt:1.1.1.2 Sat Feb 12 23:55:36 2000 +++ xc/extras/FreeType/howto/os2.txt Wed Mar 16 20:59:38 2005 @@ -1,200 +0,0 @@ - The FreeType OS/2 Compilation HowTo - -Contents - -Introduction -I. Building the library - 1. Quick Compilation - 2. Manual compilation - 3. Notes -II. Building other parts of the package - 1. Test programs - 2. Other contribs -III. Troubleshooting - - - -Introduction -============ - -This file describes the compilation of the FreeType package on an -OS/2 system. It comes with makefiles for the following compilers: - - - gcc/emx with GNU make - - - icc with nmake (Visual Age C++) - - - wcc386 with wmake (Watcom -- tried with 10.6) - - - gcc/emx with dmake - - -NOTE: - - You're advised to jump to section II.1 if you want to run the - FreeType test/demo programs as quick as possible. - - - -I. Building the library -======================= - - -1. Quick Compilation --------------------- - - The easiest way to compile the library on OS/2 is to go to the - directory `freetype/lib'. Then type, depending on your compiler, - - gcc/emx: make -f arch/os2/makefile.emx - gcc/dmake: dmake -f arch/os2/makefile.dm - - icc: nmake -f arch\os2\makefile.icc - wcc386: wmake -f=arch\os2\makefile.wat - - This should build the `libttf.a' or `libttf.lib' library files. - - You can also use the following targets: - - debug - Makes a development version of the library. Only - useful for FreeType developers and hackers. - - clean - Cleans all intermediate object files created during - compilation. Keeps all library and executables in - place. - - distclean - Cleans everything, leaving the directories as they - were before the compilation. - - -2. Manual compilation ---------------------- - - Here are explained the steps that are required to compile the - FreeType _library_ (and only this one) by hand. - - Unlike previous versions, FreeType 1.1 and above can be compiled - in two modes, called `debug mode' and `single object mode'. - - Debug mode is simply the normal way of compiling C programs, i.e., - each `*.c' file is compiled into an individual `*.obj' object - file, and all of them are linked together into an archive (i.e., - `*.lib' library). - - Single object mode is slightly different: all C files are included - in a single source during compilation, resulting in a single final - object file for the core library. This has the advantage of - letting optimizing compilers do more global work, as well as - getting rid of all external symbols which are used solely for the - purpose of components interfacing. - - In both modes, you need to include the following paths to your - makefile/command line: - - the location of all `tt*.[hc]' files - the location of system-specific files - - For example, if you are compiling from the `freetype/lib' - directory, you can type for debug mode something like - - gcc -c -I. -Iarch/os2 tt*.c arch/os2/os2file.c - - to compile all required files into object ones. Then assemble - them in a library with `ar' or `implib'. - - In single object mode, you only need to compile the file named - `freetype.c' which is located in `freetype/lib/arch/os2'. From - the same directory as before, one would type: - - gcc -c -I. -Iarch/os2 arch/os2/freetype.c - - You can also compile the extensions located in - `freetype/lib/extend' separately from the base engine. You will - need to include the same paths as before, though; be sure to add - the path to the `extend' directory, like in - - gcc -c -I. -Iarch/os2 -Iextend extend/*.c - - - -II. Building other parts of the package -======================================= - - -1. Test programs ----------------- - - The test programs are located in `freetype/test'. Most of them - use a tiny graphics sub-system which is simply used to display - bitmaps and pixmaps in a windows on a variety of platforms. The - OS/2 version comes in two flavors: PM and full-screen. - - To compile them, you must be in the `freetype/test' directory, and - invoke the makefile in arch/os2. For example: - - nmake -f arch\os2\makefile.os2 - - - NOTE 1: - - This will automatically invoke the library makefile for you! - - NOTE 2: - - The test programs come in two flavors, distinguished by the `fs' - suffix appended to their name. For example: - - ftview (PM version) - ftviewfs (Full Screen version) - - The full-screen version is there mainly for debugging purposes. - - NOTE 3: - - For now, the graphical test programs only run on the following - platforms: Unix, OS/2, Dos, Amiga, and Windows. - - The library, being pure ANSI-C, can be used on any system to - generate bitmaps and pixmaps. - - -2. Other contributions ----------------------- - - You may find some other contributions to the FreeType project in - the `freetype/contrib' directory. Each of these programs should - have its own Makefiles and documentations. Also check their - licenses, as the programs not necessarily distributed under the - FreeType one. You are invited to port the non-OS/2 applications - to OS/2. - - For OS/2, you will find the source code for the FreeType/2 font - driver in `freetype/contrib/os2'. Read its documentation - carefully before trying to compile it, as it certainly won't be - easy. - - - -III. Troubleshooting -==================== - - There is only one important point on OS/2: - - `The test program crashes with anti-aliasing on!' - - It has been discovered that some versions of Visual Age C++ - contain a bug which miscompiles the anti-aliasing source in - ttraster.c, hence resulting in a page fault when trying to render - a pixmap in the engine. Apparently, not all levels/versions of - the compiler contain the bug. You'll notice the problem - immediately (page fault :-). - - Please apply the most recent fixpack to your Visual Age C++ copy - in order to get rid of it (newer fixpacks seem to solve the - issue). - - -Good luck! - - ---- end of os2.txt --- Index: xc/extras/FreeType/howto/unix.txt diff -u xc/extras/FreeType/howto/unix.txt:1.1.1.3 xc/extras/FreeType/howto/unix.txt:removed --- xc/extras/FreeType/howto/unix.txt:1.1.1.3 Sat Feb 12 23:55:36 2000 +++ xc/extras/FreeType/howto/unix.txt Wed Mar 16 20:59:38 2005 @@ -1,255 +0,0 @@ - The FreeType Unix Compilation HOWTO - -Contents - -Introduction -I. Building the library - 1. Quick Compilation - 2. Manual compilation - 3. Notes -II. Building other parts of the package - 1. Test programs - 2. Other contribs -III. Successful Build Reports - - - -Introduction -============ - -This file describes the compilation of the FreeType package on a -Unix system. Using the `configure' script it should be rather easy -to build the library. However, detailed instructions on how to -compile the library manually are given later in this document. - - - -I. Building the library -======================= - - -1. Quick Compilation --------------------- - - The easiest way to compile the library on a Unix system is by - using the `configure' script that comes with it. Simply go to the - root directory of the FreeType package, then type - - ./configure - - to run a script that will probe your system and detect various - configuration issues, which are explained later in this document. - - From there, you can simply type - - make - - to invoke compilation of the whole package. You can also use the - following commands: - - make debug - Make a development version of the library. - Only useful for FreeType developers and - hackers. The default build should come with - `-g' (i.e., debug info in the object file) - already. - - make clean - Clean all intermediate object files created - during compilation. Keeps all library and - executables in place. - - make distclean - Clean everything, leaving the directories as - they were before the compilation. You'll need - to run `./configure' again to be able to - re-build it. - - make install - Install the library files libttf.a, libttf.la - or libttf.so to your system library path - (`/usr/local/lib' by default). The path can be - set manually with ./configure. - - make uninstall - Undo a `make install'. - - -2. Trouble-shooting and simple customization --------------------------------------------- - - The make build seems to fail on some Solaris systems. This is - mainly due to the fact that the test programs (not the font - library itself) try to use certain libraries and/or utilities if - they find them on your system. In some cases, the Sun versions - are incompatible to the GNU ones. If you encounter such problems, - please report them to us so we can try to fix it. - - The configure script and makefiles that it generates can/make use - of the following things: - - - gettext - In order to compile the internationalized error - message string extension, which isn't part of the - core library. You can disable this and get a - clean compile with - - ./configure --disable-nls - - - - libtool - Used to generate shared libraries. You can - disable it by typing - - ./configure --disable-shared - - which will generate and link the FreeType engine - as a static library. - - By default, static compilation is disabled if the - configure script detects that your compiler - and/or operating system supports shared - libraries. You can ask for static libraries with - - ./configure --enable-static - - For more configuration options, type `./configure --help' to see a - summary of what is possible. The option to change the library - installation path for `make install' is, as usual, - `--prefix='. Example: - - ./configure --prefix=${HOME}/local/lib --disable-shared - - to install a static library (libttf.a) in `~/local/lib' (after a - `make install') - - -3. Manual compilation ---------------------- - - Here are explained the steps that are required to compile the - FreeType _library_ (and only this one) by hand. - - a. Generate a configuration file named `ft_conf.h' - - This file contains a certain number of configuration macro - declarations which must fit your system. The configure script - generates it automatically for you, but you can also take the - template file `freetype/ft_conf.h.in' and change it by hand, - then save it as `freetype/ft_conf.h'. - - b. Choose your compilation mode - - Unlike previous versions, FreeType 1.1 and above can be compiled - in two modes, called `debug mode' and `single object mode'. - - Debug mode is simply the normal way of compiling C programs, - i.e., each *.c file is compiled into an individual *.o object - file, and all of them are linked together into an archive (i.e., - a *.a library). - - Single object mode is slightly different: All C files are - included in a single source file during compilation, resulting - in a single final object file for the core library. This has - the advantage of letting optimizing compilers do more global - work, as well as getting rid of all external symbols which are - used solely for the purpose of components interfacing. - - In both modes, you need to include the following paths to your - makefile/command line: - - . the location of the `ft_conf.h' file - . the location of all `tt*.[hc]' files - . the location of system-specific files, i.e., `ttmmap.c' on - Unix. - - For example, if you are compiling from the `freetype/lib' - directory, you can type for debug mode something like - - gcc -c -I.. -I. -Iarch/unix tt*.c arch/unix/ttmmap.c - - to compile all required files. Then assemble them in a library - with `ar' (and run `runlib' if necessary). - - In single object mode, you only need to compile the file named - `freetype.c' which is located in `freetype/lib/arch/unix'. From - the same directory as before, one would type: - - gcc -c -I.. -I. -Iarch/unix arch/unix/freetype.c - - You can also compile the extensions located in - `freetype/lib/extend' separately from the base engine. You'll - need to include the same paths as before, though. - - - -II. Building other parts of the package -======================================= - - -1. Test programs ----------------- - - All test programs are located in `freetype/test'. Most of them - use a tiny graphics sub-system which simply display bitmaps and - pixmaps in a windows on a variety of platforms. Of course, the - Unix version uses X11. - - The default `make' builds all tests programs automatically. Just - go the `freetype/test' and launch the programs when you are there. - Documentation on the test programs can be found in the file - `freetype/README'. - - NOTE: - - For now, the graphical test programs only run on the following - platforms: Unix, OS/2, Dos, Amiga, and Windows. - - The library, being pure ANSI-C, can be used on any system to - generate bitmaps and pixmaps. - - -2. Other contributions ----------------------- - - You may find some other contributions to the FreeType project in - the `freetype/contrib' directory. Each of these programs should - have their own makefiles and documentations. Also check their - licenses, as they are not necessarily distributed under the - FreeType one. - - - -III. Successful Build Reports -============================= - -Nelson H. F. Beebe and others report the -following successfully builds (with gcc 2.8.1) of freetype-1.1 on - - DEC Alpha 2100-5/250: OSF/1 3.2 - HP 9000/735: HP-UX 10.01 - Intel Pentium (200MHz MMX): Linux 2.0.30 - SGI Challenge L: IRIX 5.3 - Sun SPARC 20/512: Solaris 2.6 - Sun SPARC Ultra-2: SunOS 5.5.1 - IBM RS/6000: AIX 4.1 - -Chances are good the the current release will build on the same -machines and platforms. - -There are build problems reported on SunOs 4.x which have the form - - ld: /usr/tmp/cca07291.o: assert pure-text failed: - reference to [offset] at f754 in /usr/tmp/cca07291.o - -This may be a compiler bug in gcc 2.8.1. - -You can work around by just building a static library with - - ./configure --disable-shared --enable-static --disable-nls - -Maybe `make debug' will help here too (untested). - -Other successful builds: - - Sun SPARC Solaris 2.5 with Sun C compiler+linker - -For updated build reports, please consult our web site: - - http://www.freetype.org - - ---- end of unix.txt --- Index: xc/extras/FreeType/howto/windows.txt diff -u xc/extras/FreeType/howto/windows.txt:1.1.1.1 xc/extras/FreeType/howto/windows.txt:removed --- xc/extras/FreeType/howto/windows.txt:1.1.1.1 Sat Feb 12 23:55:36 2000 +++ xc/extras/FreeType/howto/windows.txt Wed Mar 16 20:59:38 2005 @@ -1,344 +0,0 @@ - The FreeType Windows Compilation HowTo - -Contents - -Introduction -I. Building the library - 1. Quick Compilation - 2. Manual compilation - 3. Notes -II. Building other parts of the package - 1. Test programs - 2. Other contributions -III. Special issues of 16-bit Windows - - - -Introduction -============ - -This file describes the compilation of the FreeType package on a -Windows system. It comes with Makefiles for the following -compilers: - - - gcc/CygWin32 and gcc/MinGW32 with GNU make (32 bit) - - - cl with nmake (16-bit and 32-bit Microsoft C and Visual C++) - - - bcc with make (16-bit and 32-bit Borland C++ and also Borland - C++ builder) - -Throughout this file, we use `winXX' if it applies indifferently to -both 16-bit and 32-bit versions. You should replace it with win16 -resp. win32, as applicable. - -NOTE: - - You are advised to jump to section II.1 if you want to run the - FreeType test/demo programs as quick as possible. - - - -I. Building the library -======================= - - -1. Quick Compilation --------------------- - - The easiest way to compile the library on Windows is to go to the - directory `freetype/lib'. Then type, depending on your compiler: - - gcc: make -f arch/win32/Makefile.gcc - - cl: nmake /f arch\win16\Makefile.MS (for C/C++ 7) - cl: nmake /f arch\win16\Makefile.VC (for VC++ 16bit) - cl: nmake /f arch\win32\Makefile.CL (for VC++ 32bit) - - bcc: make -farch/win16/Makefile.BC - bcc32: make -farch/win32/Makefile.BC - - This should build the `libttf.a' or `libttf.lib' library files. - Of course, this assumes that your compiler is regularly installed. - - You can also use the following targets: - - clean - Cleans all intermediate object files created during - compilation. Keeps all library and executables in - place. - - distclean - Cleans everything, leaving the directories as they - were before the compilation. - - debug - Makes a development version of the library. Only - useful for FreeType developers and hackers. - - Note that you can also select to use the `debugging' flags for - your compiler (instead of the `optimizing' ones), by defining - the `DEBUG' symbol, like in - - nmake /f arch\win32\Makefile.CL DEBUG=1 - make -farch/winXX/Makefile.BC /DDEBUG - etc. - - Doing so will automatically select the debug target instead of - the normal mode. - - For 16-bit compilers, you can also try to define the `BIGFONTS' - symbol, enabling the use of the `huge pointers' needed to handle - some big fonts. More on this at the end of this file. - - Another way to compile the library is to use the IDE provided with - the following compilers: Borland C++ 5.0, Visual C++ 4.0, and - Visual C++ 5.0. The project/workspace files can be found in the - `freetype/lib/arch/win32' directory: - - freetype.ide for Borland C++ 4.0 and 5.0 (and perhaps 4.5) - - freetype.dsp project and workspace files for - freetype.dsw Visual C++ 5.0 - - freetype.mdp project and makefile files for - freetype.mak Visual C++ 4.0 - - They generate a static library, which contain the core engine as a - single object file, as well as all standard extensions. - - Notes: - - - You may need to update the include paths in the Borland C++ - workspace settings. The current one looks in the directory - "c:\Program Files\Borland\BC 5.0\Include" for include files. - - - Take care that some compilers may overwrite these files when - generating the library (e.g. Borland C++ creates its own - `freetype.mdp' file, which isn't a Visual C++ project during - compilation). - - This is only important if you try to compile the lib with - several compilers. - - We gladly accept project files for other compilers. - - -2. Manual compilation ---------------------- - - Here are explained the steps that are required to compile the - FreeType _library_ (and only this one) by hand. - - Unlike previous versions, FreeType 1.1 and above can be compiled - in two modes, called `debug mode' and `single object mode'. - - Debug mode is simply the normal way of compiling C programs, i.e., - each `*.c' file is compiled into an individual `*.obj' object - file, and all of them are linked together into an archive (i.e., - `*.lib' library). - - Single object mode is slightly different: All C files are included - in a single source during compilation, resulting in a single final - object file for the core library. This has the advantage of - letting optimizing compilers do more global work, as well as - getting rid of all external which are used solely for the purpose - of components interfacing. - - In both modes, you need to include the following paths to your - makefile/command line: - - the location of all `tt*.[hc]' files - the location of system-specific files - - For example, if you are compiling from the `freetype/lib' - directory, you can type for debug mode something like - - gcc -c -I. -Iarch/win32 tt*.c - - to compile all required files into object ones. Then assemble - them in a library with `ar', `lib', or `tlib'. - - In single object mode, you only need to compile the file named - `freetype.c' which is located in `freetype/lib/arch/winXX'. From - the same directory as before, one would type - - gcc -c -I. -Iarch/win32 arch/win32/freetype.c - - You can also compile the extensions located in - `freetype/lib/extend' separately from the base engine. You will - need to include the same paths as before, though; be sure to add - the path to the `extend' directory, like in - - gcc -c -I. -Iarch/win32 -Iextend extend/*.c - - -3. Building a DLL ------------------ - - The easiest way to build the library as a DLL is also to use the - Makefiles we provide! Go to the directory `freetype/lib', then - type, depending on your compiler: - - gcc: (not yet supported) - - cl: nmake /f arch\win16\Makefile.VC DLL=1 dll (16bit) - cl: nmake /f arch\win32\Makefile.CL DLL=1 dll (32bit) - - bcc: make -farch/win16/Makefile.BC -DDLL dll - bcc32: make -farch/win32/Makefile.BC -DDLL dll - - This should build `ft13_XX.dll' (`13' for version 1.3, `XX' is - either 16 or 32), and the `libttf.lib' library file. - - You can also use the following target: - - install - Install the DLL `ft13_XX.dll' to your system directory - (`C:\WINDOWS' by default). You can override the - directory by specifying the name of the directory: - - make -farch/winXX/Makefile.BC /DINSTALL_DIR=C:\TESTDLL install - nmake /f arch\win32\Makefile.CL INSTALL_DIR=D:\WINNT install - - Note that you can also select to use the `debugging' flags for - your compiler (instead of the `optimizing' ones), by defining - the `DEBUG' symbol, like in - - nmake /f arch\win16\Makefile.VC DEBUG=1 DLL=1 dll - make -farch/winXX/Makefile.BC /DDEBUG /DDLL dll - etc. - - Another way to build to DLL with Visual C++ is to use a special - Makefile that does exactly that, without relying on any settings. - - With VC++ 6.0, just type while in the `freetype/lib/arch/win32' - directory: - - nmake /f makefile.vc - - on the command line. - - For other versions, modify the $(TOOLS32) variable to point to the - directory where the build tools are. No need to set any - environment variables. - - -4. Notes --------- - - `char' is always `signed char' in the sources! - - `ttconfig.h' relies heavily on a file called `ft_conf.h' that - contains information related to the target platform, located in - the `freetype/lib/arch/winXX/' directory. Depending on your - compiler, you may need to slightly edit it. - - We use gcc as our reference compiler for warnings. This means - that we use the `-ansi -pedantic -Wall' flags and try to get rid - of warnings in this situation. If you are compiling with another - compiler, you may encounter warnings, not errors. Note that the - Borland compilers seem to produce lots of irrelevant warnings - (like `potential loss of precision'). - - - -II. Building other parts of the package -======================================= - - -1. Test programs ----------------- - - All test programs are located in `freetype/test'. Most of them - use a tiny graphics sub-system which is simply used to display - bitmaps and pixmaps on a variety of platforms. The Windows - version is a very basic one that only displays a small graphic - windows in addition to the console where the flow of messages - still goes. - - To compile them, you must be in the `freetype/test' directory and - invoke the makefile in arch/winXX. For example: - - nmake -f arch\os2\Makefile.VC - - NOTE 1: - - This will automatically invoke the library makefile for you! - - NOTE 2: - - For now, the graphical test programs only run on the following - platforms: Unix, OS/2, Dos, Amiga, and Windows. - - The library, being pure ANSI-C, can be used on any system to - generate bitmaps and pixmaps. - - -2. Other contributions ----------------------- - - You may find some other contributions to the FreeType project in - the `freetype/contrib' directory. Each of these programs should - have its own Makefiles and documentations. Also check their - licenses, as the programs are not necessarily distributed under - the FreeType one. - - Most of these contributions are targeted to Unix. You are invited - to port them to Windows, and then contribute your improvements. - - - -III. Special issues of 16-bit Windows -===================================== - - As usual, 16-bit Windows have some limitations. - - First, and mainly, only the large model is usable. The small and - medium models are not usable, because the library uses more than - 64kByte of data; and the compact model is unusable as well, since - the code of the library itself is slightly less than 64kByte, thus - leaving very small place for the real work. The net effect of - that limitation is that performances are not very impressive, to - say the least (32-bit DOS extenders perform usually three-time - faster). - - Even with the large model, the rasterizer is still limited in - size, particularly with pixmaps (that is, with anti-aliasing gray - levels). - - The test programs rely on a tiny graphical driver that mimics the - ones available on other platforms. It has some peculiarities. - First, as the test programs need a `console', the programs should - linked with some emulation of that concept. We used successfully - Borland EasyWin and Microsoft QuickWin for this purpose. Then, - the graphics window that displays the bitmaps incur the usual - 64kByte limit: The size of the window is quite tiny, particularly - when displaying `gray-level' bitmaps (the size is then 320x200, - but contrary to full-screen MS-DOS the pixels are not magnified). - Ultimately, no efforts have been done to accomodate the colors of - the screen: As a result, displaying gray bitmaps in 256-color mode - uses only 4 levels of gray (instead of 5 rendered by the library). - - Another annoying limitation exists with some East Asian fonts that - have 16,383 glyphs or more, since an internal table then - overflows. We tried to overcome this using so-called `huge - pointers', but then good support for these in the run-time library - is needed. To enable huge pointers, try defining the `BIGFONTS' - symbol with the makefile, like - - nmake /f arch\win16\makefile.VC BIGFONTS=1 - make -farch/win16/makefile.BC /DBIGFONTS - etc. - - The makefiles for both Microsoft and Borland compilers depend on a - special file, arch/winXX/depend.win, which is built by a Unix - script named `makedep'. You may consider editing it if you - heavily modify the source files; or better yet, re-run the script, - using any clone of the Bourne shell and gcc, the GNU compiler, - with - - arch/winXX/makedep - - in both the `lib' and the `test' directories. - - -Good luck! - ---- end of windows.txt --- Index: xc/extras/FreeType/lib/.cvsignore diff -u xc/extras/FreeType/lib/.cvsignore:1.1.1.1 xc/extras/FreeType/lib/.cvsignore:removed --- xc/extras/FreeType/lib/.cvsignore:1.1.1.1 Sat Feb 12 23:55:36 2000 +++ xc/extras/FreeType/lib/.cvsignore Wed Mar 16 20:59:38 2005 @@ -1,3 +0,0 @@ -.libs -*.lo -libttf.la Index: xc/extras/FreeType/lib/freetype.h diff -u xc/extras/FreeType/lib/freetype.h:1.1.1.3 xc/extras/FreeType/lib/freetype.h:removed --- xc/extras/FreeType/lib/freetype.h:1.1.1.3 Sat Feb 12 23:55:36 2000 +++ xc/extras/FreeType/lib/freetype.h Wed Mar 16 20:59:38 2005 @@ -1,1147 +0,0 @@ -/******************************************************************* - * - * freetype.h - * - * High-level interface specification. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Note: - * - * This is the only file that should be included by client - * application sources. All other types and functions defined - * in the `tt*.h' files are library internals and should not be - * included. - * - ******************************************************************/ - -#ifndef FREETYPE_H -#define FREETYPE_H - - -#define TT_FREETYPE_MAJOR 1 -#define TT_FREETYPE_MINOR 3 - - -#include "fterrid.h" -#include "ftnameid.h" - -/* To make freetype.h independent from configuration files we check */ -/* whether EXPORT_DEF has been defined already. */ - -#ifndef EXPORT_DEF -#define EXPORT_DEF extern -#endif - -/* The same for TT_Text. If you define the HAVE_TT_TEXT macro, you */ -/* have to provide a typedef declaration for TT_Text before */ -/* including this file. */ - -#ifndef HAVE_TT_TEXT -#define HAVE_TT_TEXT - typedef char TT_Text; /* The data type to represent */ - /* file name string elements. */ -#endif - -#ifdef __cplusplus - extern "C" { -#endif - - - /*******************************************************************/ - /* */ - /* FreeType types definitions. */ - /* */ - /* All these begin with a 'TT_' prefix. */ - /* */ - /*******************************************************************/ - - typedef int TT_Bool; - - typedef signed long TT_Fixed; /* signed fixed 16.16 float */ - - typedef signed short TT_FWord; /* distance in FUnits */ - typedef unsigned short TT_UFWord; /* unsigned distance */ - - typedef char TT_String; - typedef signed char TT_Char; - typedef unsigned char TT_Byte; - typedef signed short TT_Short; - typedef unsigned short TT_UShort; - typedef int TT_Int; - typedef unsigned int TT_UInt; - typedef signed long TT_Long; - typedef unsigned long TT_ULong; - - typedef signed short TT_F2Dot14; /* Signed fixed float 2.14 used for */ - /* unit vectors, with layout */ - /* */ - /* s : 1 -- sign bit */ - /* m : 1 -- integer bit */ - /* f : 14 -- unsigned fractional */ - /* */ - /* `s:m' is the 2-bit signed int */ - /* value to which the positive */ - /* fractional part should be added. */ - - typedef signed long TT_F26Dot6; /* 26.6 fixed float, used for */ - /* glyph points pixel coordinates. */ - - typedef signed long TT_Pos; /* Point position, expressed either */ - /* in fractional pixels or notional */ - /* units, depending on context. */ - /* For example, glyph coordinates */ - /* returned by TT_Load_Glyph() are */ - /* expressed in font units if */ - /* scaling wasn't requested, and */ - /* in 26.6 fractional pixels if it */ - /* was. */ - - - struct TT_UnitVector_ /* guess what... */ - { - TT_F2Dot14 x; - TT_F2Dot14 y; - }; - - typedef struct TT_UnitVector_ TT_UnitVector; - - - struct TT_Vector_ /* simple vector type */ - { - TT_F26Dot6 x; - TT_F26Dot6 y; - }; - - typedef struct TT_Vector_ TT_Vector; - - - /* A simple 2x2 matrix used for transformations. */ - /* You should use 16.16 fixed floats. */ - /* */ - /* x' = xx*x + xy*y */ - /* y' = yx*x + yy*y */ - /* */ - - struct TT_Matrix_ - { - TT_Fixed xx, xy; - TT_Fixed yx, yy; - }; - - typedef struct TT_Matrix_ TT_Matrix; - - - /* A structure used to describe the source glyph to the renderer. */ - - struct TT_Outline_ - { - TT_Short n_contours; /* number of contours in glyph */ - TT_UShort n_points; /* number of points in the glyph */ - - TT_Vector* points; /* the outline's points */ - TT_Byte* flags; /* the points flags */ - TT_UShort* contours; /* the contour end points */ - - /* The following flag indicates that the outline owns the arrays it */ - /* refers to. Typically, this is true of outlines created from the */ - /* TT_New_Outline() API, while it isn't for those returned by */ - /* TT_Get_Glyph_Outline(). */ - - TT_Bool owner; /* The outline owns the coordinates, */ - /* flags and contours array it uses. */ - - /* The following flags are set automatically by */ - /* TT_Get_Glyph_Outline(). Their meaning is the following: */ - /* */ - /* high_precision If true, the scan-line converter will use a */ - /* higher precision to render bitmaps (i.e., a */ - /* 1/1024 pixel precision). This is important for */ - /* small ppem sizes. */ - /* */ - /* second_pass If true, the scan-line converter performs a */ - /* second sweep phase dedicated to find vertical */ - /* drop-outs. If false, only horizontal drop-outs */ - /* will be checked during the first vertical */ - /* sweep (yes, this is a bit confusing but it is */ - /* really the way it should work). This is */ - /* important for small ppems too. */ - /* */ - /* dropout_mode Specifies the TrueType drop-out mode to use for */ - /* continuity checking. Valid values are 0 (no */ - /* check), 1, 2, 4, and 5. */ - /* */ - /* Most of the engine's users will safely ignore these fields... */ - - TT_Bool high_precision; /* high precision rendering */ - TT_Bool second_pass; /* two sweeps rendering */ - TT_Char dropout_mode; /* dropout mode */ - }; - - typedef struct TT_Outline_ TT_Outline; - - - /* A structure used to describe a simple bounding box. */ - - struct TT_BBox_ - { - TT_Pos xMin; - TT_Pos yMin; - TT_Pos xMax; - TT_Pos yMax; - }; - - typedef struct TT_BBox_ TT_BBox; - - - /* A structure used to return glyph metrics. */ - /* */ - /* The `bearingX' isn't called `left-side bearing' anymore because */ - /* it has different meanings depending on the glyph's orientation. */ - /* */ - /* The same is true for `bearingY', which is the top-side bearing */ - /* defined by the TT_Spec, i.e., the distance from the baseline to */ - /* the top of the glyph's bbox. According to our current convention, */ - /* this is always the same as `bbox.yMax' but we make it appear for */ - /* consistency in its proper field. */ - /* */ - /* The `advance' field is the advance width for horizontal layout, */ - /* and advance height for vertical layouts. */ - - struct TT_Glyph_Metrics_ - { - TT_BBox bbox; /* glyph bounding box */ - - TT_Pos bearingX; /* left-side bearing */ - TT_Pos bearingY; /* top-side bearing, per se the TT spec */ - - TT_Pos advance; /* advance width (or height) */ - }; - - typedef struct TT_Glyph_Metrics_ TT_Glyph_Metrics; - - - /* A structure used to return horizontal _and_ vertical glyph */ - /* metrics. */ - /* */ - /* A glyph can be used either in a horizontal or vertical layout. */ - /* Its glyph metrics vary with orientation. The TT_Big_Glyph_Metrics */ - /* structure is used to return _all_ metrics in one call. */ - - struct TT_Big_Glyph_Metrics_ - { - TT_BBox bbox; /* glyph bounding box */ - - TT_Pos horiBearingX; /* left side bearing in horizontal layouts */ - TT_Pos horiBearingY; /* top side bearing in horizontal layouts */ - - TT_Pos vertBearingX; /* left side bearing in vertical layouts */ - TT_Pos vertBearingY; /* top side bearing in vertical layouts */ - - TT_Pos horiAdvance; /* advance width for horizontal layout */ - TT_Pos vertAdvance; /* advance height for vertical layout */ - - /* The following fields represent unhinted scaled metrics values. */ - /* They can be useful for applications needing to do some device */ - /* independent placement of glyphs. */ - /* */ - /* Applying these metrics to hinted glyphs will most surely ruin */ - /* the grid fitting performed by the bytecode interpreter. These */ - /* values are better used to compute accumulated positioning */ - /* distances. */ - - TT_Pos linearHoriBearingX; /* linearly scaled horizontal lsb */ - TT_Pos linearHoriAdvance; /* linearly scaled horizontal advance */ - - TT_Pos linearVertBearingY; /* linearly scaled vertical tsb */ - TT_Pos linearVertAdvance; /* linearly scaled vertical advance */ - }; - - typedef struct TT_Big_Glyph_Metrics_ TT_Big_Glyph_Metrics; - - - /* A structure used to return instance metrics. */ - - struct TT_Instance_Metrics_ - { - TT_F26Dot6 pointSize; /* char. size in points (1pt = 1/72 inch) */ - - TT_UShort x_ppem; /* horizontal pixels per EM square */ - TT_UShort y_ppem; /* vertical pixels per EM square */ - - TT_Fixed x_scale; /* 16.16 to convert from EM units to 26.6 pix */ - TT_Fixed y_scale; /* 16.16 to convert from EM units to 26.6 pix */ - - TT_UShort x_resolution; /* device horizontal resolution in dpi */ - TT_UShort y_resolution; /* device vertical resolution in dpi */ - }; - - typedef struct TT_Instance_Metrics_ TT_Instance_Metrics; - - - /* Flow constants: */ - /* */ - /* The flow of a bitmap refers to the way lines are oriented */ - /* within the bitmap data, i.e., the orientation of the Y */ - /* coordinate axis. */ - /* */ - /* For example, if the first bytes of the bitmap pertain to */ - /* its top-most line, then the flow is `down'. If these bytes */ - /* pertain to its lowest line, the the flow is `up'. */ - -#define TT_Flow_Down -1 /* bitmap is oriented from top to bottom */ -#define TT_Flow_Up 1 /* bitmap is oriented from bottom to top */ -#define TT_Flow_Error 0 /* an error occurred during rendering */ - - - /* A structure used to describe the target bitmap or pixmap to the */ - /* renderer. Note that there is nothing in this structure that */ - /* gives the nature of the buffer. */ - /* */ - /* IMPORTANT NOTE: */ - /* */ - /* In the case of a pixmap, the `width' and `cols' fields must */ - /* have the _same_ values, and _must_ be padded to 32-bits, i.e., */ - /* be a multiple of 4. Clipping problems will arise otherwise, */ - /* if not even page faults! */ - /* */ - /* The typical settings are: */ - /* */ - /* - for a WxH bitmap: */ - /* */ - /* rows = H */ - /* cols = (W+7) / 8 */ - /* width = W */ - /* flow = your_choice */ - /* */ - /* - for a WxH pixmap: */ - /* */ - /* rows = H */ - /* cols = (W+3) & ~3 */ - /* width = cols */ - /* flow = your_choice */ - - struct TT_Raster_Map_ - { - int rows; /* number of rows */ - int cols; /* number of columns (bytes) per row */ - int width; /* number of pixels per line */ - int flow; /* bitmap orientation */ - - void* bitmap; /* bit/pixmap buffer */ - long size; /* bit/pixmap size in bytes */ - }; - - typedef struct TT_Raster_Map_ TT_Raster_Map; - - - /* ------ The font header TrueType table structure ------ */ - - struct TT_Header_ - { - TT_Fixed Table_Version; - TT_Fixed Font_Revision; - - TT_Long CheckSum_Adjust; - TT_Long Magic_Number; - - TT_UShort Flags; - TT_UShort Units_Per_EM; - - TT_Long Created [2]; - TT_Long Modified[2]; - - TT_FWord xMin; - TT_FWord yMin; - TT_FWord xMax; - TT_FWord yMax; - - TT_UShort Mac_Style; - TT_UShort Lowest_Rec_PPEM; - - TT_Short Font_Direction; - TT_Short Index_To_Loc_Format; - TT_Short Glyph_Data_Format; - }; - - typedef struct TT_Header_ TT_Header; - - - /* ------ The horizontal header TrueType table structure ------ */ - - /*******************************************************/ - /* This structure is the one defined by the TrueType */ - /* specification, plus two fields used to link the */ - /* font-units metrics to the header. */ - - struct TT_Horizontal_Header_ - { - TT_Fixed Version; - TT_FWord Ascender; - TT_FWord Descender; - TT_FWord Line_Gap; - - TT_UFWord advance_Width_Max; /* advance width maximum */ - - TT_FWord min_Left_Side_Bearing; /* minimum left-sb */ - TT_FWord min_Right_Side_Bearing; /* minimum right-sb */ - TT_FWord xMax_Extent; /* xmax extents */ - TT_FWord caret_Slope_Rise; - TT_FWord caret_Slope_Run; - - TT_Short Reserved0, - Reserved1, - Reserved2, - Reserved3, - Reserved4; - - TT_Short metric_Data_Format; - TT_UShort number_Of_HMetrics; - - /* The following fields are not defined by the TrueType specification */ - /* but they're used to connect the metrics header to the relevant */ - /* `HMTX' or `VMTX' table. */ - - void* long_metrics; - void* short_metrics; - }; - - typedef struct TT_Horizontal_Header_ TT_Horizontal_Header; - - - /*******************************************************/ - /* This structure is the one defined by the TrueType */ - /* specification. Note that it has exactly the same */ - /* layout as the horizontal header (both are loaded */ - /* by the same function). */ - - struct TT_Vertical_Header_ - { - TT_Fixed Version; - TT_FWord Ascender; - TT_FWord Descender; - TT_FWord Line_Gap; - - TT_UFWord advance_Height_Max; /* advance height maximum */ - - TT_FWord min_Top_Side_Bearing; /* minimum left-sb or top-sb */ - TT_FWord min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ - TT_FWord yMax_Extent; /* xmax or ymax extents */ - TT_FWord caret_Slope_Rise; - TT_FWord caret_Slope_Run; - TT_FWord caret_Offset; - - TT_Short Reserved1, - Reserved2, - Reserved3, - Reserved4; - - TT_Short metric_Data_Format; - TT_UShort number_Of_VMetrics; - - /* The following fields are not defined by the TrueType specification */ - /* but they're used to connect the metrics header to the relevant */ - /* `HMTX' or `VMTX' table. */ - - void* long_metrics; - void* short_metrics; - }; - - typedef struct TT_Vertical_Header_ TT_Vertical_Header; - - - /* ------ The OS/2 table ------ */ - - /************************************************************************/ - /* Note that since FreeType 1.3, we support Mac fonts which do not have */ - /* an OS/2 table. In this case the `version' field will be set to */ - /* 0xFFFF by the table loader; all other fields should be 0. */ - - struct TT_OS2_ - { - TT_UShort version; /* 0x0001 */ - TT_FWord xAvgCharWidth; - TT_UShort usWeightClass; - TT_UShort usWidthClass; - TT_Short fsType; - TT_FWord ySubscriptXSize; - TT_FWord ySubscriptYSize; - TT_FWord ySubscriptXOffset; - TT_FWord ySubscriptYOffset; - TT_FWord ySuperscriptXSize; - TT_FWord ySuperscriptYSize; - TT_FWord ySuperscriptXOffset; - TT_FWord ySuperscriptYOffset; - TT_FWord yStrikeoutSize; - TT_FWord yStrikeoutPosition; - TT_Short sFamilyClass; - - TT_Byte panose[10]; - - TT_ULong ulUnicodeRange1; /* Bits 0-31 */ - TT_ULong ulUnicodeRange2; /* Bits 32-63 */ - TT_ULong ulUnicodeRange3; /* Bits 64-95 */ - TT_ULong ulUnicodeRange4; /* Bits 96-127 */ - - TT_Char achVendID[4]; - - TT_UShort fsSelection; - TT_UShort usFirstCharIndex; - TT_UShort usLastCharIndex; - TT_Short sTypoAscender; - TT_Short sTypoDescender; - TT_Short sTypoLineGap; - TT_UShort usWinAscent; - TT_UShort usWinDescent; - - /* only version 1 tables: */ - - TT_ULong ulCodePageRange1; /* Bits 0-31 */ - TT_ULong ulCodePageRange2; /* Bits 32-63 */ - }; - - typedef struct TT_OS2_ TT_OS2; - - - /* ------ The PostScript table ------ */ - - struct TT_Postscript_ - { - TT_Fixed FormatType; - TT_Fixed italicAngle; - TT_FWord underlinePosition; - TT_FWord underlineThickness; - TT_ULong isFixedPitch; - TT_ULong minMemType42; - TT_ULong maxMemType42; - TT_ULong minMemType1; - TT_ULong maxMemType1; - - /* Glyph names follow in the file, but we don't */ - /* load them by default. See the ftxpost.c extension. */ - }; - - typedef struct TT_Postscript_ TT_Postscript; - - - /* ------ The horizontal device metrics table (`hdmx') ------ */ - - struct TT_Hdmx_Record_ - { - TT_Byte ppem; - TT_Byte max_width; - TT_Byte* widths; - }; - - typedef struct TT_Hdmx_Record_ TT_Hdmx_Record; - - - struct TT_Hdmx_ - { - TT_UShort version; - TT_Short num_records; - TT_Hdmx_Record* records; - }; - - typedef struct TT_Hdmx_ TT_Hdmx; - - - /* A structure used to describe face properties. */ - - struct TT_Face_Properties_ - { - TT_UShort num_Glyphs; /* number of glyphs in face */ - TT_UShort max_Points; /* maximum number of points in a glyph */ - TT_UShort max_Contours; /* maximum number of contours in a glyph */ - - TT_UShort num_CharMaps; /* number of charmaps in the face */ - TT_UShort num_Names; /* number of name records in the face */ - - TT_ULong num_Faces; /* 1 for normal TrueType files, and the */ - /* number of embedded faces for TrueType */ - /* collections */ - - TT_Header* header; /* TrueType header table */ - TT_Horizontal_Header* horizontal; /* TrueType horizontal header */ - TT_OS2* os2; /* TrueType OS/2 table */ - TT_Postscript* postscript; /* TrueType Postscript table */ - TT_Hdmx* hdmx; /* TrueType hor. dev. metr. table */ - TT_Vertical_Header* vertical; /* TT Vertical header, if present */ - }; - - typedef struct TT_Face_Properties_ TT_Face_Properties; - - - /* Here are the definitions of the handle types used for FreeType's */ - /* most common objects accessed by the client application. We use */ - /* a simple trick: */ - /* */ - /* Each handle type is a structure that only contains one */ - /* pointer. The advantage of structures is that they are */ - /* mutually exclusive types. We could have defined the */ - /* following types: */ - /* */ - /* typedef void* TT_Stream; */ - /* typedef void* TT_Face; */ - /* typedef void* TT_Instance; */ - /* typedef void* TT_Glyph; */ - /* typedef void* TT_CharMap; */ - /* */ - /* but these would have allowed lines like: */ - /* */ - /* stream = instance; */ - /* */ - /* in the client code this would be a severe bug, unnoticed */ - /* by the compiler! */ - /* */ - /* Thus, we enforce type checking with a simple language */ - /* trick... */ - /* */ - /* NOTE: Some macros are defined in tttypes.h to perform */ - /* automatic type conversions for library hackers... */ - - struct TT_Engine_ { void* z; }; - struct TT_Stream_ { void* z; }; - struct TT_Face_ { void* z; }; - struct TT_Instance_ { void* z; }; - struct TT_Glyph_ { void* z; }; - struct TT_CharMap_ { void* z; }; - - typedef struct TT_Engine_ TT_Engine; /* engine instance */ - typedef struct TT_Stream_ TT_Stream; /* stream handle type */ - typedef struct TT_Face_ TT_Face; /* face handle type */ - typedef struct TT_Instance_ TT_Instance; /* instance handle type */ - typedef struct TT_Glyph_ TT_Glyph; /* glyph handle type */ - typedef struct TT_CharMap_ TT_CharMap; /* character map handle type */ - - - /* Almost all functions return an error code of this type. */ - - typedef long TT_Error; - - - /*******************************************************************/ - /* */ - /* FreeType API */ - /* */ - /* All these begin with a `TT_' prefix. */ - /* */ - /* Most of them are implemented in the `ttapi.c' source file. */ - /* */ - /*******************************************************************/ - - /* Get version information. */ - - EXPORT_DEF - TT_Error TT_FreeType_Version( int *major, - int *minor ); - - - /* Initialize the engine. */ - - EXPORT_DEF - TT_Error TT_Init_FreeType( TT_Engine* engine ); - - - /* Finalize the engine, and release all allocated objects. */ - - EXPORT_DEF - TT_Error TT_Done_FreeType( TT_Engine engine ); - - - /* Set the gray level palette. This is an array of 5 bytes used */ - /* to produce the font smoothed pixmaps. By convention: */ - /* */ - /* palette[0] = background (white) */ - /* palette[1] = light */ - /* palette[2] = medium */ - /* palette[3] = dark */ - /* palette[4] = foreground (black) */ - /* */ - - EXPORT_DEF - TT_Error TT_Set_Raster_Gray_Palette( TT_Engine engine, - TT_Byte* palette ); - - - /* ----------------------- face management ----------------------- */ - - /* Open a new TrueType font file, and returns a handle for */ - /* it in variable '*face'. */ - /* */ - /* Note: The file can be either a TrueType file (*.ttf) or */ - /* a TrueType collection (*.ttc, in this case, only */ - /* the first face is opened). The number of faces in */ - /* the same collection can be obtained in the face's */ - /* properties, using TT_Get_Face_Properties() and the */ - /* `max_Faces' field. */ - - EXPORT_DEF - TT_Error TT_Open_Face( TT_Engine engine, - const TT_Text* fontPathName, - TT_Face* face ); - - - /* Open a TrueType font file located inside a collection. */ - /* The font is assigned by its index in `fontIndex'. */ - - EXPORT_DEF - TT_Error TT_Open_Collection( TT_Engine engine, - const TT_Text* collectionPathName, - TT_ULong fontIndex, - TT_Face* face ); - - - /* Return face properties in the `properties' structure. */ - /* */ - /* Note that since version 1.3, we support font files with no */ - /* OS/2 table (mainly old Mac fonts). In this case, the OS/2 */ - /* `version' field will be set to 0xFFFF, and all other fields */ - /* will be zeroed. */ - - EXPORT_DEF - TT_Error TT_Get_Face_Properties( TT_Face face, - TT_Face_Properties* properties ); - - - /* Set a face object's generic pointer */ - - EXPORT_DEF - TT_Error TT_Set_Face_Pointer( TT_Face face, - void* data ); - - - /* Get a face object's generic pointer */ - - EXPORT_DEF - void* TT_Get_Face_Pointer( TT_Face face ); - - - /* Close a face's file handle to save system resources. The file */ - /* will be re-opened automatically on the next disk access. */ - - EXPORT_DEF - TT_Error TT_Flush_Face( TT_Face face ); - - /* Get a face's glyph metrics expressed in font units. Returns any */ - /* number of arrays. Set the fields to NULL if you are not interested */ - /* by a given array. */ - - EXPORT_DEF - TT_Error TT_Get_Face_Metrics( TT_Face face, - TT_UShort firstGlyph, - TT_UShort lastGlyph, - TT_Short* leftBearings, - TT_UShort* widths, - TT_Short* topBearings, - TT_UShort* heights ); - - - /* Close a given font object, destroying all associated */ - /* instances. */ - - EXPORT_DEF - TT_Error TT_Close_Face( TT_Face face ); - - - /* Get font or table data. */ - - EXPORT_DEF - TT_Error TT_Get_Font_Data( TT_Face face, - TT_ULong tag, - TT_Long offset, - void* buffer, - TT_Long* length ); - - -/* A simple macro to build table tags from ASCII chars */ - -#define MAKE_TT_TAG( _x1, _x2, _x3, _x4 ) \ - (((TT_ULong)_x1 << 24) | \ - ((TT_ULong)_x2 << 16) | \ - ((TT_ULong)_x3 << 8) | \ - (TT_ULong)_x4) - - - - /* ----------------------- instance management -------------------- */ - - /* Open a new font instance and returns an instance handle */ - /* for it in `*instance'. */ - - EXPORT_DEF - TT_Error TT_New_Instance( TT_Face face, - TT_Instance* instance ); - - - /* Set device resolution for a given instance. The values are */ - /* given in dpi (Dots Per Inch). Default is 96 in both directions. */ - - EXPORT_DEF - TT_Error TT_Set_Instance_Resolutions( TT_Instance instance, - TT_UShort xResolution, - TT_UShort yResolution ); - - - /* Set the pointsize for a given instance. Default is 10pt. */ - - EXPORT_DEF - TT_Error TT_Set_Instance_CharSize( TT_Instance instance, - TT_F26Dot6 charSize ); - - EXPORT_DEF - TT_Error TT_Set_Instance_CharSizes( TT_Instance instance, - TT_F26Dot6 charWidth, - TT_F26Dot6 charHeight ); - -#define TT_Set_Instance_PointSize( ins, ptsize ) \ - TT_Set_Instance_CharSize( ins, ptsize*64L ) - - EXPORT_DEF - TT_Error TT_Set_Instance_PixelSizes( TT_Instance instance, - TT_UShort pixelWidth, - TT_UShort pixelHeight, - TT_F26Dot6 pointSize ); - - - /* This function has been deprecated! Do not use it, as it */ - /* doesn't work reliably. You can perfectly control hinting */ - /* yourself when loading glyphs, then apply transforms as usual. */ - - EXPORT_DEF - TT_Error TT_Set_Instance_Transform_Flags( TT_Instance instance, - TT_Bool rotated, - TT_Bool stretched ); - - - /* Return instance metrics in `metrics'. */ - - EXPORT_DEF - TT_Error TT_Get_Instance_Metrics( TT_Instance instance, - TT_Instance_Metrics* metrics ); - - - /* Set an instance's generic pointer. */ - - EXPORT_DEF - TT_Error TT_Set_Instance_Pointer( TT_Instance instance, - void* data ); - - - /* Get an instance's generic pointer. */ - - EXPORT_DEF - void* TT_Get_Instance_Pointer( TT_Instance instance ); - - - /* Close a given instance object, destroying all associated data. */ - - EXPORT_DEF - TT_Error TT_Done_Instance( TT_Instance instance ); - - - - /* ----------------------- glyph management ----------------------- */ - - /* Create a new glyph object related to the given `face'. */ - - EXPORT_DEF - TT_Error TT_New_Glyph( TT_Face face, - TT_Glyph* glyph ); - - - /* Discard (and destroy) a given glyph object. */ - - EXPORT_DEF - TT_Error TT_Done_Glyph( TT_Glyph glyph ); - - -#define TTLOAD_SCALE_GLYPH 1 -#define TTLOAD_HINT_GLYPH 2 -#define TTLOAD_PEDANTIC 128 -#define TTLOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 256 - -#define TTLOAD_DEFAULT (TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH) - - - /* Load and process (scale/transform and hint) a glyph from the */ - /* given `instance'. The glyph and instance handles must be */ - /* related to the same face object. The glyph index can be */ - /* computed with a call to TT_Char_Index(). */ - /* */ - /* The 'load_flags' argument is a combination of the macros */ - /* TTLOAD_SCALE_GLYPH and TTLOAD_HINT_GLYPH. Hinting will be */ - /* applied only if the scaling is selected. */ - /* */ - /* If scaling is off (i.e., load_flags = 0), the returned */ - /* outlines are in EM square coordinates (also called FUnits), */ - /* extracted directly from the font with no hinting. Other */ - /* glyph metrics are also in FUnits. */ - /* */ - /* If scaling is on, the returned outlines are in fractional */ - /* pixel units (i.e. TT_F26Dot6 = 26.6 fixed floats). */ - /* */ - /* NOTE: The glyph index must be in the range 0..num_glyphs-1, */ - /* where `num_glyphs' is the total number of glyphs in */ - /* the font file (given in the face properties). */ - - EXPORT_DEF - TT_Error TT_Load_Glyph( TT_Instance instance, - TT_Glyph glyph, - TT_UShort glyphIndex, - TT_UShort loadFlags ); - - - /* Return glyph outline pointers in `outline'. Note that the returned */ - /* pointers are owned by the glyph object, and will be destroyed with */ - /* it. The client application should _not_ change the pointers. */ - - EXPORT_DEF - TT_Error TT_Get_Glyph_Outline( TT_Glyph glyph, - TT_Outline* outline ); - - - /* Copy the glyph metrics into `metrics'. */ - - EXPORT_DEF - TT_Error TT_Get_Glyph_Metrics( TT_Glyph glyph, - TT_Glyph_Metrics* metrics ); - - - /* Copy the glyph's big metrics into `metrics'. */ - /* Necessary to obtain vertical metrics. */ - - EXPORT_DEF - TT_Error TT_Get_Glyph_Big_Metrics( TT_Glyph glyph, - TT_Big_Glyph_Metrics* metrics ); - - - /* Render the glyph into a bitmap, with given position offsets. */ - /* */ - /* Note: Only use integer pixel offsets to preserve the fine */ - /* hinting of the glyph and the `correct' anti-aliasing */ - /* (where vertical and horizontal stems aren't grayed). This */ - /* means that `xOffset' and `yOffset' must be multiples */ - /* of 64! */ - - EXPORT_DEF - TT_Error TT_Get_Glyph_Bitmap( TT_Glyph glyph, - TT_Raster_Map* map, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ); - - - /* Render the glyph into a pixmap, with given position offsets. */ - /* */ - /* Note: Only use integer pixel offsets to preserve the fine */ - /* hinting of the glyph and the `correct' anti-aliasing */ - /* (where vertical and horizontal stems aren't grayed). This */ - /* means that `xOffset' and `yOffset' must be multiples */ - /* of 64! */ - - EXPORT_DEF - TT_Error TT_Get_Glyph_Pixmap( TT_Glyph glyph, - TT_Raster_Map* map, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ); - - - - /* ----------------------- outline support ------------------------ */ - - /* Allocate a new outline. Reserve space for `numPoints' and */ - /* `numContours'. */ - - EXPORT_DEF - TT_Error TT_New_Outline( TT_UShort numPoints, - TT_Short numContours, - TT_Outline* outline ); - - - /* Release an outline. */ - - EXPORT_DEF - TT_Error TT_Done_Outline( TT_Outline* outline ); - - - /* Copy an outline into another one. */ - - EXPORT_DEF - TT_Error TT_Copy_Outline( TT_Outline* source, - TT_Outline* target ); - - - /* Render an outline into a bitmap. */ - - EXPORT_DEF - TT_Error TT_Get_Outline_Bitmap( TT_Engine engine, - TT_Outline* outline, - TT_Raster_Map* map ); - - - /* Render an outline into a pixmap. */ - - EXPORT_DEF - TT_Error TT_Get_Outline_Pixmap( TT_Engine engine, - TT_Outline* outline, - TT_Raster_Map* map ); - - - /* Return an outline's bounding box -- this function is slow as it */ - /* performs a complete scan-line process, without drawing, to get */ - /* the most accurate values. */ - - EXPORT_DEF - TT_Error TT_Get_Outline_BBox( TT_Outline* outline, - TT_BBox* bbox ); - - - /* Apply a transformation to a glyph outline. */ - - EXPORT_DEF - void TT_Transform_Outline( TT_Outline* outline, - TT_Matrix* matrix ); - - - /* Apply a translation to a glyph outline. */ - - EXPORT_DEF - void TT_Translate_Outline( TT_Outline* outline, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ); - - - /* Apply a transformation to a vector. */ - - EXPORT_DEF - void TT_Transform_Vector( TT_F26Dot6* x, - TT_F26Dot6* y, - TT_Matrix* matrix ); - - - /* Compute A*B/C with 64 bits intermediate precision. */ - - EXPORT_DEF - TT_Long TT_MulDiv( TT_Long A, - TT_Long B, - TT_Long C ); - - - /* Compute A*B/0x10000 with 64 bits intermediate precision. */ - /* Useful to multiply by a 16.16 fixed float value. */ - - EXPORT_DEF - TT_Long TT_MulFix( TT_Long A, - TT_Long B ); - - - /* ----------------- character mapping support --------------- */ - - /* Return the number of character mappings found in this file. */ - /* Returns -1 in case of failure (invalid face handle). */ - /* */ - /* DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! */ - /* */ - /* It is retained for backwards compatibility only and will */ - /* fail on 16bit systems. */ - /* */ - /* You can now get the charmap count in the `num_CharMaps' */ - /* field of a face's properties. */ - /* */ - - EXPORT_DEF - int TT_Get_CharMap_Count( TT_Face face ); - - - /* Return the ID of charmap number `charmapIndex' of a given face */ - /* used to enumerate the charmaps present in a TrueType file. */ - - EXPORT_DEF - TT_Error TT_Get_CharMap_ID( TT_Face face, - TT_UShort charmapIndex, - TT_UShort* platformID, - TT_UShort* encodingID ); - - - /* Look up the character maps found in `face' and return a handle */ - /* for the one matching `platformID' and `platformEncodingID' */ - /* (see the TrueType specs relating to the `cmap' table for */ - /* information on these ID numbers). Returns an error code. */ - /* In case of failure, the handle is set to NULL and is invalid. */ - - EXPORT_DEF - TT_Error TT_Get_CharMap( TT_Face face, - TT_UShort charmapIndex, - TT_CharMap* charMap ); - - - /* Translate a character code through a given character map */ - /* and return the corresponding glyph index to be used in */ - /* a TT_Load_Glyph() call. This function returns 0 in case */ - /* of failure. */ - - EXPORT_DEF - TT_UShort TT_Char_Index( TT_CharMap charMap, - TT_UShort charCode ); - - - - /* --------------------- names table support ------------------- */ - - /* Return the number of name strings found in the name table. */ - /* Returns -1 in case of failure (invalid face handle). */ - /* */ - /* DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! */ - /* */ - /* It is retained for backwards compatibility only and will */ - /* fail on 16bit systems. */ - /* */ - /* You can now get the number of name strings in a face with */ - /* the `num_Names' field of its properties. */ - - EXPORT_DEF - int TT_Get_Name_Count( TT_Face face ); - - - /* Return the ID of the name number `nameIndex' of a given face */ - /* used to enumerate the charmaps present in a TrueType file. */ - - EXPORT_DEF - TT_Error TT_Get_Name_ID( TT_Face face, - TT_UShort nameIndex, - TT_UShort* platformID, - TT_UShort* encodingID, - TT_UShort* languageID, - TT_UShort* nameID ); - - - /* Return the address and length of the name number `nameIndex' */ - /* of a given face in the variables `stringPtr' resp. `length'. */ - /* The string is part of the face object and shouldn't be */ - /* written to or released. */ - /* */ - /* Note that for an invalid platform ID a null pointer will be */ - /* returned. */ - - EXPORT_DEF - TT_Error TT_Get_Name_String( TT_Face face, - TT_UShort nameIndex, - TT_String** stringPtr, - TT_UShort* length ); - - -#ifdef __cplusplus - } -#endif - -#endif /* FREETYPE_H */ - - -/* END */ Index: xc/extras/FreeType/lib/fterrid.h diff -u xc/extras/FreeType/lib/fterrid.h:1.1.1.2 xc/extras/FreeType/lib/fterrid.h:removed --- xc/extras/FreeType/lib/fterrid.h:1.1.1.2 Sat Feb 12 23:55:37 2000 +++ xc/extras/FreeType/lib/fterrid.h Wed Mar 16 20:59:38 2005 @@ -1,161 +0,0 @@ -/******************************************************************* - * - * fterrid.h - * - * TrueType Error ID definitions - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FREETYPE_H -#error "Don't include this file! Use freetype.h instead." -#endif - -#ifndef FTERRID_H -#define FTERRID_H - - /************************ error codes declaration **************/ - - /* The error codes are grouped in 'classes' used to indicate the */ - /* 'level' at which the error happened. */ - /* The class is given by an error code's high byte. */ - - - /* ------------- Success is always 0 -------- */ - -#define TT_Err_Ok 0 - - - /* -------- High-level API error codes ------ */ - -#define TT_Err_Invalid_Face_Handle 0x001 -#define TT_Err_Invalid_Instance_Handle 0x002 -#define TT_Err_Invalid_Glyph_Handle 0x003 -#define TT_Err_Invalid_CharMap_Handle 0x004 -#define TT_Err_Invalid_Result_Address 0x005 -#define TT_Err_Invalid_Glyph_Index 0x006 -#define TT_Err_Invalid_Argument 0x007 -#define TT_Err_Could_Not_Open_File 0x008 -#define TT_Err_File_Is_Not_Collection 0x009 - -#define TT_Err_Table_Missing 0x00A -#define TT_Err_Invalid_Horiz_Metrics 0x00B -#define TT_Err_Invalid_CharMap_Format 0x00C -#define TT_Err_Invalid_PPem 0x00D -#define TT_Err_Invalid_Vert_Metrics 0x00E - -#define TT_Err_Invalid_File_Format 0x010 - -#define TT_Err_Invalid_Engine 0x020 -#define TT_Err_Too_Many_Extensions 0x021 -#define TT_Err_Extensions_Unsupported 0x022 -#define TT_Err_Invalid_Extension_Id 0x023 - -#define TT_Err_No_Vertical_Data 0x030 - -#define TT_Err_Max_Profile_Missing 0x080 -#define TT_Err_Header_Table_Missing 0x081 -#define TT_Err_Horiz_Header_Missing 0x082 -#define TT_Err_Locations_Missing 0x083 -#define TT_Err_Name_Table_Missing 0x084 -#define TT_Err_CMap_Table_Missing 0x085 -#define TT_Err_Hmtx_Table_Missing 0x086 -#define TT_Err_OS2_Table_Missing 0x087 -#define TT_Err_Post_Table_Missing 0x088 -#define TT_Err_Glyf_Table_Missing 0x089 - - - /* -------- Memory component error codes ---- */ - - /* this error indicates that an operation cannot */ - /* be performed due to memory exhaustion. */ - -#define TT_Err_Out_Of_Memory 0x100 - - - /* -------- File component error codes ------ */ - - /* these error codes indicate that the file could */ - /* not be accessed properly. Usually, this means */ - /* a broken font file! */ - -#define TT_Err_Invalid_File_Offset 0x200 -#define TT_Err_Invalid_File_Read 0x201 -#define TT_Err_Invalid_Frame_Access 0x202 - - - /* -------- Glyph loader error codes -------- */ - - /* Produced only by the glyph loader, these error */ - /* codes indicate a broken glyph in a font file. */ - -#define TT_Err_Too_Many_Points 0x300 -#define TT_Err_Too_Many_Contours 0x301 -#define TT_Err_Invalid_Composite 0x302 -#define TT_Err_Too_Many_Ins 0x303 - - - /* --- bytecode interpreter error codes ----- */ - - /* These error codes are produced by the TrueType */ - /* bytecode interpreter. They usually indicate a */ - /* broken font file, a broken glyph within a font */ - /* file, or a bug in the interpreter! */ - -#define TT_Err_Invalid_Opcode 0x400 -#define TT_Err_Too_Few_Arguments 0x401 -#define TT_Err_Stack_Overflow 0x402 -#define TT_Err_Code_Overflow 0x403 -#define TT_Err_Bad_Argument 0x404 -#define TT_Err_Divide_By_Zero 0x405 -#define TT_Err_Storage_Overflow 0x406 -#define TT_Err_Cvt_Overflow 0x407 -#define TT_Err_Invalid_Reference 0x408 -#define TT_Err_Invalid_Distance 0x409 -#define TT_Err_Interpolate_Twilight 0x40A -#define TT_Err_Debug_OpCode 0x40B -#define TT_Err_ENDF_In_Exec_Stream 0x40C -#define TT_Err_Out_Of_CodeRanges 0x40D -#define TT_Err_Nested_DEFS 0x40E -#define TT_Err_Invalid_CodeRange 0x40F -#define TT_Err_Invalid_Displacement 0x410 -#define TT_Err_Execution_Too_Long 0x411 - - - /* ------ internal failure error codes ----- */ - - /* These error codes are produced when an incoherent */ - /* library state has been detected. These reflect a */ - /* severe bug in the engine! (Or a major overwrite */ - /* of your application into the library's data.) */ - -#define TT_Err_Nested_Frame_Access 0x500 -#define TT_Err_Invalid_Cache_List 0x501 -#define TT_Err_Could_Not_Find_Context 0x502 -#define TT_Err_Unlisted_Object 0x503 - - - /* ---- scan-line converter error codes ----- */ - - /* These error codes are produced by the raster component. */ - /* They indicate that an outline structure was incoherently */ - /* setup, or that you're trying to render an horribly */ - /* complex glyph! */ - -#define TT_Err_Raster_Pool_Overflow 0x600 -#define TT_Err_Raster_Negative_Height 0x601 -#define TT_Err_Raster_Invalid_Value 0x602 -#define TT_Err_Raster_Not_Initialized 0x603 - -#endif /* FTERRID_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ftnameid.h diff -u xc/extras/FreeType/lib/ftnameid.h:1.1.1.2 xc/extras/FreeType/lib/ftnameid.h:removed --- xc/extras/FreeType/lib/ftnameid.h:1.1.1.2 Sat Feb 12 23:55:37 2000 +++ xc/extras/FreeType/lib/ftnameid.h Wed Mar 16 20:59:38 2005 @@ -1,628 +0,0 @@ -/******************************************************************* - * - * ftnameid.h - * - * TrueType Name ID definitions - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FREETYPE_H -#error "Don't include this file! Use freetype.h instead." -#endif - -#ifndef FTNAMEID_H -#define FTNAMEID_H - -/* - * possible values for the 'Platform' identifier code in the name - * records of the TTF "name" table - */ - -#define TT_PLATFORM_APPLE_UNICODE 0 -#define TT_PLATFORM_MACINTOSH 1 -#define TT_PLATFORM_ISO 2 -#define TT_PLATFORM_MICROSOFT 3 - - -/* - * possible values of the platform specific encoding identifier field in - * the name records of the TTF "name" table when the 'Platform' identifier - * code is TT_PLATFORM_APPLE_UNICODE - */ - -#define TT_APPLE_ID_DEFAULT 0 -#define TT_APPLE_ID_UNICODE_1_1 1 -#define TT_APPLE_ID_ISO_10646 2 -#define TT_APPLE_ID_UNICODE_2_0 3 - - -/* - * possible values of the platform specific encoding identifier field in - * the name records of the TTF "name" table when the 'Platform' identifier - * code is TT_PLATFORM_MACINTOSH - */ - -#define TT_MAC_ID_ROMAN 0 -#define TT_MAC_ID_JAPANESE 1 -#define TT_MAC_ID_TRADITIONAL_CHINESE 2 -#define TT_MAC_ID_KOREAN 3 -#define TT_MAC_ID_ARABIC 4 -#define TT_MAC_ID_HEBREW 5 -#define TT_MAC_ID_GREEK 6 -#define TT_MAC_ID_RUSSIAN 7 -#define TT_MAC_ID_RSYMBOL 8 -#define TT_MAC_ID_DEVANAGARI 9 -#define TT_MAC_ID_GURMUKHI 10 -#define TT_MAC_ID_GUJARATI 11 -#define TT_MAC_ID_ORIYA 12 -#define TT_MAC_ID_BENGALI 13 -#define TT_MAC_ID_TAMIL 14 -#define TT_MAC_ID_TELUGU 15 -#define TT_MAC_ID_KANNADA 16 -#define TT_MAC_ID_MALAYALAM 17 -#define TT_MAC_ID_SINHALESE 18 -#define TT_MAC_ID_BURMESE 19 -#define TT_MAC_ID_KHMER 20 -#define TT_MAC_ID_THAI 21 -#define TT_MAC_ID_LAOTIAN 22 -#define TT_MAC_ID_GEORGIAN 23 -#define TT_MAC_ID_ARMENIAN 24 -#define TT_MAC_ID_MALDIVIAN 25 -#define TT_MAC_ID_SIMPLIFIED_CHINESE 25 -#define TT_MAC_ID_TIBETAN 26 -#define TT_MAC_ID_MONGOLIAN 27 -#define TT_MAC_ID_GEEZ 28 -#define TT_MAC_ID_SLAVIC 29 -#define TT_MAC_ID_VIETNAMESE 30 -#define TT_MAC_ID_SINDHI 31 -#define TT_MAC_ID_UNINTERP 32 - - -/* - * possible values of the platform specific encoding identifier field in - * the name records of the TTF "name" table when the 'Platform' identifier - * code is TT_PLATFORM_ISO - */ - -#define TT_ISO_ID_7BIT_ASCII 0 -#define TT_ISO_ID_10646 1 -#define TT_ISO_ID_8859_1 2 - - -/* - * possible values of the platform specific encoding identifier field in - * the name records of the TTF "name" table when the 'Platform' identifier - * code is TT_PLATFORM_MICROSOFT - */ - -#define TT_MS_ID_SYMBOL_CS 0 -#define TT_MS_ID_UNICODE_CS 1 -#define TT_MS_ID_SJIS 2 -#define TT_MS_ID_GB2312 3 -#define TT_MS_ID_BIG_5 4 -#define TT_MS_ID_WANSUNG 5 -#define TT_MS_ID_JOHAB 6 - - - -/* - * possible values of the language identifier field in the name records of - * the TTF "name" table when the 'Platform' identifier code is - * TT_PLATFORM_MACINTOSH - * - * the canonical source for the Apple assigned Language ID's is at - * http://fonts.apple.com/TTRefMan/RM06/Chap6name.html - */ - -#define TT_MAC_LANGID_ENGLISH 0 -#define TT_MAC_LANGID_FRENCH 1 -#define TT_MAC_LANGID_GERMAN 2 -#define TT_MAC_LANGID_ITALIAN 3 -#define TT_MAC_LANGID_DUTCH 4 -#define TT_MAC_LANGID_SWEDISH 5 -#define TT_MAC_LANGID_SPANISH 6 -#define TT_MAC_LANGID_DANISH 7 -#define TT_MAC_LANGID_PORTUGUESE 8 -#define TT_MAC_LANGID_NORWEGIAN 9 -#define TT_MAC_LANGID_HEBREW 10 -#define TT_MAC_LANGID_JAPANESE 11 -#define TT_MAC_LANGID_ARABIC 12 -#define TT_MAC_LANGID_FINNISH 13 -#define TT_MAC_LANGID_GREEK 14 -#define TT_MAC_LANGID_ICELANDIC 15 -#define TT_MAC_LANGID_MALTESE 16 -#define TT_MAC_LANGID_TURKISH 17 -#define TT_MAC_LANGID_CROATIAN 18 -#define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 -#define TT_MAC_LANGID_URDU 20 -#define TT_MAC_LANGID_HINDI 21 -#define TT_MAC_LANGID_THAI 22 -#define TT_MAC_LANGID_KOREAN 23 -#define TT_MAC_LANGID_LITHUANIAN 24 -#define TT_MAC_LANGID_POLISH 25 -#define TT_MAC_LANGID_HUNGARIAN 26 -#define TT_MAC_LANGID_ESTONIAN 27 -#define TT_MAC_LANGID_LETTISH 28 -#define TT_MAC_LANGID_SAAMISK 29 -#define TT_MAC_LANGID_FAEROESE 30 -#define TT_MAC_LANGID_FARSI 31 -#define TT_MAC_LANGID_RUSSIAN 32 -#define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 -#define TT_MAC_LANGID_FLEMISH 34 -#define TT_MAC_LANGID_IRISH 35 -#define TT_MAC_LANGID_ALBANIAN 36 -#define TT_MAC_LANGID_ROMANIAN 37 -#define TT_MAC_LANGID_CZECH 38 -#define TT_MAC_LANGID_SLOVAK 39 -#define TT_MAC_LANGID_SLOVENIAN 40 -#define TT_MAC_LANGID_YIDDISH 41 -#define TT_MAC_LANGID_SERBIAN 42 -#define TT_MAC_LANGID_MACEDONIAN 43 -#define TT_MAC_LANGID_BULGARIAN 44 -#define TT_MAC_LANGID_UKRAINIAN 45 -#define TT_MAC_LANGID_BYELORUSSIAN 46 -#define TT_MAC_LANGID_UZBEK 47 -#define TT_MAC_LANGID_KAZAKH 48 -#define TT_MAC_LANGID_AZERBAIJANI 49 -#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 -#define TT_MAC_LANGID_ARMENIAN 51 -#define TT_MAC_LANGID_GEORGIAN 52 -#define TT_MAC_LANGID_MOLDAVIAN 53 -#define TT_MAC_LANGID_KIRGHIZ 54 -#define TT_MAC_LANGID_TAJIKI 55 -#define TT_MAC_LANGID_TURKMEN 56 -#define TT_MAC_LANGID_MONGOLIAN 57 -#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 -#define TT_MAC_LANGID_PASHTO 59 -#define TT_MAC_LANGID_KURDISH 60 -#define TT_MAC_LANGID_KASHMIRI 61 -#define TT_MAC_LANGID_SINDHI 62 -#define TT_MAC_LANGID_TIBETAN 63 -#define TT_MAC_LANGID_NEPALI 64 -#define TT_MAC_LANGID_SANSKRIT 65 -#define TT_MAC_LANGID_MARATHI 66 -#define TT_MAC_LANGID_BENGALI 67 -#define TT_MAC_LANGID_ASSAMESE 68 -#define TT_MAC_LANGID_GUJARATI 69 -#define TT_MAC_LANGID_PUNJABI 70 -#define TT_MAC_LANGID_ORIYA 71 -#define TT_MAC_LANGID_MALAYALAM 72 -#define TT_MAC_LANGID_KANNADA 73 -#define TT_MAC_LANGID_TAMIL 74 -#define TT_MAC_LANGID_TELUGU 75 -#define TT_MAC_LANGID_SINHALESE 76 -#define TT_MAC_LANGID_BURMESE 77 -#define TT_MAC_LANGID_KHMER 78 -#define TT_MAC_LANGID_LAO 79 -#define TT_MAC_LANGID_VIETNAMESE 80 -#define TT_MAC_LANGID_INDONESIAN 81 -#define TT_MAC_LANGID_TAGALOG 82 -#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 -#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 -#define TT_MAC_LANGID_AMHARIC 85 -#define TT_MAC_LANGID_TIGRINYA 86 -#define TT_MAC_LANGID_GALLA 87 -#define TT_MAC_LANGID_SOMALI 88 -#define TT_MAC_LANGID_SWAHILI 89 -#define TT_MAC_LANGID_RUANDA 90 -#define TT_MAC_LANGID_RUNDI 91 -#define TT_MAC_LANGID_CHEWA 92 -#define TT_MAC_LANGID_MALAGASY 93 -#define TT_MAC_LANGID_ESPERANTO 94 -#define TT_MAC_LANGID_WELSH 128 -#define TT_MAC_LANGID_BASQUE 129 -#define TT_MAC_LANGID_CATALAN 130 -#define TT_MAC_LANGID_LATIN 131 -#define TT_MAC_LANGID_QUECHUA 132 -#define TT_MAC_LANGID_GUARANI 133 -#define TT_MAC_LANGID_AYMARA 134 -#define TT_MAC_LANGID_TATAR 135 -#define TT_MAC_LANGID_UIGHUR 136 -#define TT_MAC_LANGID_DZONGKHA 137 -#define TT_MAC_LANGID_JAVANESE 138 -#define TT_MAC_LANGID_SUNDANESE 139 -#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 -#define TT_MAC_LANGID_IRISH_GAELIC 141 -#define TT_MAC_LANGID_BRETON 142 -#define TT_MAC_LANGID_INUKTITUT 143 - - -/* - * possible values of the language identifier field in the name records of - * the TTF "name" table when the 'Platform' identifier code is - * TT_PLATFORM_MICROSOFT - * - * the canonical source for the MS assigned LCID's is at - * http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt - */ - -#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 -#define TT_MS_LANGID_ARABIC_IRAQ 0x0801 -#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 -#define TT_MS_LANGID_ARABIC_LIBYA 0x1001 -#define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 -#define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 -#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 -#define TT_MS_LANGID_ARABIC_OMAN 0x2001 -#define TT_MS_LANGID_ARABIC_YEMEN 0x2401 -#define TT_MS_LANGID_ARABIC_SYRIA 0x2801 -#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 -#define TT_MS_LANGID_ARABIC_LEBANON 0x3001 -#define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 -#define TT_MS_LANGID_ARABIC_UAE 0x3801 -#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 -#define TT_MS_LANGID_ARABIC_QATAR 0x4001 -#define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 -#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 -#define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 -#define TT_MS_LANGID_CHINESE_PRC 0x0804 -#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 -#define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 -#define TT_MS_LANGID_CHINESE_MACAU 0x1404 -#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 -#define TT_MS_LANGID_DANISH_DENMARK 0x0406 -#define TT_MS_LANGID_GERMAN_GERMANY 0x0407 -#define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 -#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 -#define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 -#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 -#define TT_MS_LANGID_GREEK_GREECE 0x0408 -#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 -#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 -#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 -#define TT_MS_LANGID_ENGLISH_CANADA 0x1009 -#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 -#define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 -#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 -#define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 -#define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 -#define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 -#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 -#define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 -#define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 -#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a -#define TT_MS_LANGID_SPANISH_MEXICO 0x080a -#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a -#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a -#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a -#define TT_MS_LANGID_SPANISH_PANAMA 0x180a -#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a -#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a -#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a -#define TT_MS_LANGID_SPANISH_PERU 0x280a -#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a -#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a -#define TT_MS_LANGID_SPANISH_CHILE 0x340a -#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a -#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a -#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a -#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a -#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a -#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a -#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a -#define TT_MS_LANGID_FINNISH_FINLAND 0x040b -#define TT_MS_LANGID_FRENCH_FRANCE 0x040c -#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c -#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c -#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c -#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c -#define TT_MS_LANGID_FRENCH_MONACO 0x180c -#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d -#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e -#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f -#define TT_MS_LANGID_ITALIAN_ITALY 0x0410 -#define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 -#define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 -#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 -#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 -#define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 -#define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 -#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 -#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 -#define TT_MS_LANGID_POLISH_POLAND 0x0415 -#define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 -#define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 -#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 -#define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 -#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 -#define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 -#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 -#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a -#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a -#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a -#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b -#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c -#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d -#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d -#define TT_MS_LANGID_THAI_THAILAND 0x041e -#define TT_MS_LANGID_TURKISH_TURKEY 0x041f -#define TT_MS_LANGID_URDU_PAKISTAN 0x0420 -#define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 -#define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 -#define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 -#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 -#define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 -#define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 -#define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 -#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 -#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0428 -#define TT_MS_LANGID_FARSI_IRAN 0x0429 -#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a -#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b -#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c -#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c -#define TT_MS_LANGID_BASQUE_SPAIN 0x042d -#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e -#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f -#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 -#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 -#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 -#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 -#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 -#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 -#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 -#define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 -#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 -#define TT_MS_LANGID_HINDI_INDIA 0x0439 -#define TT_MS_LANGID_MALTESE_MALTA 0x043a -#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c -#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e -#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e -#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f -#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 -#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 -#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 -#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 -#define TT_MS_LANGID_BENGALI_INDIA 0x0445 -#define TT_MS_LANGID_PUNJABI_INDIA 0x0446 -#define TT_MS_LANGID_GUJARATI_INDIA 0x0447 -#define TT_MS_LANGID_ORIYA_INDIA 0x0448 -#define TT_MS_LANGID_TAMIL_INDIA 0x0449 -#define TT_MS_LANGID_TELUGU_INDIA 0x044a -#define TT_MS_LANGID_KANNADA_INDIA 0x044b -#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c -#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d -#define TT_MS_LANGID_MARATHI_INDIA 0x044e -#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f -#define TT_MS_LANGID_KONKANI_INDIA 0x0457 - - -/* - * possible values of the 'Name' identifier field in the name records of - * the TTF "name" table. These values are platform independent. - */ - -#define TT_NAME_ID_COPYRIGHT 0 -#define TT_NAME_ID_FONT_FAMILY 1 -#define TT_NAME_ID_FONT_SUBFAMILY 2 -#define TT_NAME_ID_UNIQUE_ID 3 -#define TT_NAME_ID_FULL_NAME 4 -#define TT_NAME_ID_VERSION_STRING 5 -#define TT_NAME_ID_PS_NAME 6 -#define TT_NAME_ID_TRADEMARK 7 -/* the following values are from the OpenType spec */ -#define TT_NAME_ID_MANUFACTURER 8 -#define TT_NAME_ID_DESIGNER 9 -#define TT_NAME_ID_DESCRIPTION 10 -#define TT_NAME_ID_VENDOR_URL 11 -#define TT_NAME_ID_DESIGNER_URL 12 -#define TT_NAME_ID_LICENSE 13 -#define TT_NAME_ID_LICENSE_URL 14 -/* number 15 is reserved */ -#define TT_NAME_ID_PREFERRED_FAMILY 16 -#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 -#define TT_NAME_ID_MAC_FULL_NAME 18 - - -/* - * Bit Mask values for the Unicode Ranges from the TTF "OS2 " table. - */ - -/* General Scripts Area */ - -/* Bit 0 C0 Controls and Basic Latin */ -#define TT_UCR_BASIC_LATIN (1L << 0) /* U+0000-U+007F */ -/* Bit 1 C1 Controls and Latin-1 Supplement */ -#define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ -/* Bit 2 Latin Extended-A */ -#define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ -/* Bit 3 Latin Extended-B */ -#define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ -/* Bit 4 IPA Extensions */ -#define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ -/* Bit 5 Spacing Modifier Letters */ -#define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ -/* Bit 6 Combining Diacritical Marks */ -#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ -/* Bit 7 Greek */ -#define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ -/* Bit 8 is reserved (was: Greek Symbols and Coptic) */ -/* Bit 9 Cyrillic */ -#define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ -/* Bit 10 Armenian */ -#define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ -/* Bit 11 Hebrew */ -#define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ -/* Bit 12 is reserved (was: Hebrew Extended) */ -/* Bit 13 Arabic */ -#define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ -/* Bit 14 is reserved (was: Arabic Extended) */ -/* Bit 15 Devanagari */ -#define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ -/* Bit 16 Bengali */ -#define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ -/* Bit 17 Gurmukhi */ -#define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ -/* Bit 18 Gujarati */ -#define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ -/* Bit 19 Oriya */ -#define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ -/* Bit 20 Tamil */ -#define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ -/* Bit 21 Telugu */ -#define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ -/* Bit 22 Kannada */ -#define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ -/* Bit 23 Malayalam */ -#define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ -/* Bit 24 Thai */ -#define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ -/* Bit 25 Lao */ -#define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ -/* Bit 26 Georgian */ -#define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ -/* Bit 27 is reserved (was Georgian Extended) */ -/* Bit 28 Hangul Jamo */ -#define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ -/* Bit 29 Latin Extended Additional */ -#define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ -/* Bit 30 Greek Extended */ -#define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ - -/* Symbols Area */ - -/* Bit 31 General Punctuation */ -#define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ -/* Bit 32 Superscripts And Subscripts */ -#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ -/* Bit 33 Currency Symbols */ -#define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ -/* Bit 34 Combining Diacritical Marks For Symbols */ -#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ -/* Bit 35 Letterlike Symbols */ -#define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ -/* Bit 36 Number Forms */ -#define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ -/* Bit 37 Arrows */ -#define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ -/* Bit 38 Mathematical Operators */ -#define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ -/* Bit 39 Miscellaneous Technical */ -#define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ -/* Bit 40 Control Pictures */ -#define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ -/* Bit 41 Optical Character Recognition */ -#define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ -/* Bit 42 Enclosed Alphanumerics */ -#define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ -/* Bit 43 Box Drawing */ -#define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ -/* Bit 44 Block Elements */ -#define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ -/* Bit 45 Geometric Shapes */ -#define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ -/* Bit 46 Miscellaneous Symbols */ -#define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ -/* Bit 47 Dingbats */ -#define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ - -/* CJK Phonetics and Symbols Area */ - -/* Bit 48 CJK Symbols And Punctuation */ -#define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ -/* Bit 49 Hiragana */ -#define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ -/* Bit 50 Katakana */ -#define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ -/* Bit 51 Bopomofo */ -#define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ -/* Bit 52 Hangul Compatibility Jamo */ -#define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ -/* Bit 53 CJK Miscellaneous */ -#define TT_UCR_CJK_MISC (1L << 21) /* U+3190-U+319F */ -/* Bit 54 Enclosed CJK Letters And Months */ -#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ -/* Bit 55 CJK Compatibility */ -#define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ - -/* Hangul Syllables Area */ - -/* Bit 56 Hangul */ -#define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ - -/* Surrogates Area */ - -/* Bit 57 Surrogates */ -#define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DFFF */ -/* Bit 58 is reserved for Unicode SubRanges */ - -/* CJK Ideographs Area */ - -/* Bit 59 CJK Unified Ideographs */ -#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ - -/* Private Use Area */ - -/* Bit 60 Private Use */ -#define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ - -/* Compatibility Area and Specials */ - -/* Bit 61 CJK Compatibility Ideographs */ -#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */ -/* Bit 62 Alphabetic Presentation Forms */ -#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ -/* Bit 63 Arabic Presentation Forms-A */ -#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FSFF */ -/* Bit 64 Combining Half Marks */ -#define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ -/* Bit 65 CJK Compatibility Forms */ -#define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE30-U+FE4F */ -/* Bit 66 Small Form Variants */ -#define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ -/* Bit 67 Arabic Presentation Forms-B */ -#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFF */ -/* Bit 68 Halfwidth And Fullwidth Forms */ -#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ -/* Bit 69 Specials */ -#define TT_UCR_SPECIALS (1L << 5) /* U+FEFF, - U+FFF0-U+FFFF */ -/* Bit 70 Tibetan */ -#define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FBF */ - - -/* Some compilers have a very limited length of identifiers. */ -#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) -#define HAVE_LIMIT_ON_IDENTS -#endif - -#ifndef HAVE_LIMIT_ON_IDENTS - -/* - * Here some alias #defines in order to be clearer. - * - * These are not always #defined to stay within the 31 character limit - * which some compilers have. - * - * Credits go to Dave Hoo for pointing out that modern - * Borland compilers (read: from BC++ 3.1 on) can increase this limit. - * If you get a warning with such a compiler, use the -i40 switch. - */ - -#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ - TT_UCR_ARABIC_PRESENTATIONS_A -#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ - TT_UCR_ARABIC_PRESENTATIONS_B - -#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ - TT_UCR_COMBINING_DIACRITICS -#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ - TT_UCR_COMBINING_DIACRITICS_SYMB - -#endif /* ndef HAVE_LIMIT_ON_IDENTS */ - -#endif /* FTNAMEID_H */ - - -/* END */ Index: xc/extras/FreeType/lib/header.h diff -u xc/extras/FreeType/lib/header.h:1.1.1.1 xc/extras/FreeType/lib/header.h:removed --- xc/extras/FreeType/lib/header.h:1.1.1.1 Sat Sep 5 23:00:48 1998 +++ xc/extras/FreeType/lib/header.h Wed Mar 16 20:59:38 2005 @@ -1,49 +0,0 @@ -/******************************************************************* - * - * Function : - * - * Description : - * - * Input : - * - * Output : - * - * Notes : - * - ******************************************************************/ - -/******************************************************************* - * - * Function : - * - * Description : - * - * Input : None - * - * Output : Error code. - * - ******************************************************************/ - -/******************************************************************* - * - * Function : - * - * Description : - * - ******************************************************************/ - -/******************************************************************* - * - * Component Name (e.g. TTRaster.C) + eventually a version number. - * - * Component Short Description (e.g. Rasterizer). - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ Index: xc/extras/FreeType/lib/ttapi.c diff -u xc/extras/FreeType/lib/ttapi.c:1.1.1.3 xc/extras/FreeType/lib/ttapi.c:removed --- xc/extras/FreeType/lib/ttapi.c:1.1.1.3 Sat Feb 12 23:55:38 2000 +++ xc/extras/FreeType/lib/ttapi.c Wed Mar 16 20:59:38 2005 @@ -1,2219 +0,0 @@ -/******************************************************************* - * - * ttapi.c - * - * High-level interface implementation - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Notes: - * - * This file is used to implement most of the functions that are - * defined in the file "freetype.h". However, two functions are - * implemented elsewhere : - * - * TT_MulDiv and TT_MulFix are in ttcalc.h/ttcalc.c - * - ******************************************************************/ - -#include "ttconfig.h" - -#include "freetype.h" -#include "ttengine.h" -#include "ttcalc.h" -#include "ttmemory.h" -#include "ttcache.h" -#include "ttfile.h" -#include "ttobjs.h" -#include "ttload.h" -#include "ttgload.h" -#include "ttraster.h" -#include "ttextend.h" - - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_api - - -#ifdef TT_STATIC_RASTER -#define RAS_OPS /* void */ -#define RAS_OP /* void */ -#else -#define RAS_OPS ((TRaster_Instance*)_engine->raster_component), -#define RAS_OP ((TRaster_Instance*)_engine->raster_component) -#endif /* TT_STATIC_RASTER */ - - -#define RENDER_Glyph( glyph, target ) \ - Render_Glyph( RAS_OPS glyph, target ) - -#define RENDER_Gray_Glyph( glyph, target, palette ) \ - Render_Gray_Glyph( RAS_OPS glyph, target, palette ) - - - -/******************************************************************* - * - * Function : TT_FreeType_Version - * - * Description : Returns the major and minor version of the library. - * - * Input : major, minor addresses - * - * Output : Error code. - * - * MT-Note : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_FreeType_Version( int *major, int *minor ) - { - if ( !major || !minor ) - return TT_Err_Invalid_Argument; - - *major = TT_FREETYPE_MAJOR; - *minor = TT_FREETYPE_MINOR; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Init_FreeType - * - * Description : The library's engine initializer. This function - * must be called prior to any call. - * - * Input : engine pointer to a FreeType engine instance - * - * Output : Error code. - * - * MT-Note : This function should be called each time you want - * to create a TT_Engine. It is not necessarily thread - * safe depending on the implementations of ttmemory, - * ttfile and ttmutex, so take care. Their default - * implementations are safe, however. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Init_FreeType( TT_Engine* engine ) - { - PEngine_Instance _engine; - - TT_Error error; - int n; - - - /* first of all, initialize memory sub-system */ - error = TTMemory_Init(); - if ( error ) - return error; - - /* Allocate engine instance */ - if ( ALLOC( _engine, sizeof ( TEngine_Instance ) ) ) - return error; - -#undef TT_FAIL -#define TT_FAIL( x ) ( error = x (_engine) ) != TT_Err_Ok - - /* Initalize components */ - if ( TT_FAIL( TTFile_Init ) || - TT_FAIL( TTCache_Init ) || -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - TT_FAIL( TTExtend_Init ) || -#endif - TT_FAIL( TTObjs_Init ) || - TT_FAIL( TTRaster_Init ) ) - goto Fail; - -#undef TT_FAIL - - /* set the gray palette defaults: 0 to 4 */ - for ( n = 0; n < 5; n++ ) - _engine->raster_palette[n] = (Byte)n; /* Conversion ok, some warn */ - - /* create the engine lock */ - MUTEX_Create( _engine->lock ); - - HANDLE_Set( *engine, _engine ); - return TT_Err_Ok; - - Fail: - TT_Done_FreeType( *engine ); - HANDLE_Set( *engine, NULL ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Done_FreeType - * - * Description : The library's engine finalizer. This function - * will discard all active face and glyph objects - * from the heap. - * - * Input : engine FreeType engine instance - * - * Output : Error code. - * - * MT-Note : Destroys an engine. Not necessarily thread-safe - * depending on the implementations of ttmemory, - * ttfile and ttmutex. The default implementations - * are safe, however. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_FreeType( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - - if ( !_engine ) - return TT_Err_Ok; - - MUTEX_Destroy( _engine->lock ); - - TTRaster_Done( _engine ); - TTObjs_Done ( _engine ); -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - TTExtend_Done( _engine ); -#endif - TTCache_Done ( _engine ); - TTFile_Done ( _engine ); - FREE( _engine ); - - TTMemory_Done(); - - return TT_Err_Ok; - } - - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - -/******************************************************************* - * - * Function : TT_Set_Raster_Gray_Palette - * - * Description : Sets the gray-levels palette used for font - * smoothing. - * - * Input : engine FreeType engine instance - * palette address of palette (a 5 byte array) - * - * Output : Invalid argument if 'palette' is NULL. - * - * MT-Note: NO! Unprotected modification of an engine's palette. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Raster_Gray_Palette( TT_Engine engine, - Byte* palette ) - { - int i; - - - if ( !palette ) - return TT_Err_Invalid_Argument; - - for ( i = 0; i < 5; i++ ) - HANDLE_Engine( engine )->raster_palette[i] = (Byte)palette[i]; - - return TT_Err_Ok; - } - -#endif /* TT_CONFIG_OPTION_GRAY_SCALING */ - - -/******************************************************************* - * - * Function : TT_Open_Face - * - * Description : Creates a new face object from a given font file. - * - * Input : engine FreeType engine instance - * fontPathName the font file's pathname - * face adress of returned face handle - * - * Output : Error code. - * - * Note : The face handle is set to NULL in case of failure. - * - * MT-Note : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Open_Face( TT_Engine engine, - const TT_Text* fontPathName, - TT_Face* face ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - TFont_Input input; - TT_Error error; - TT_Stream stream; - PFace _face; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - /* open the file */ - error = TT_Open_Stream( fontPathName, &stream ); - if ( error ) - return error; - - input.stream = stream; - input.fontIndex = 0; - input.engine = _engine; - - /* Create and load the new face object - this is thread-safe */ - error = CACHE_New( _engine->objs_face_cache, - _face, - &input ); - - /* Set the handle */ - HANDLE_Set( *face, _face ); - - if ( error ) - goto Fail; - - return TT_Err_Ok; - - Fail: - TT_Close_Stream( &stream ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Open_Collection - * - * Description : Creates a new face object from a given font file. - * - * Input : engine FreeType engine instance - * collectionPathName the font file's pathname - * fontIndex index of font in TrueType collection - * face adress of returned face handle - * - * Output : Error code. - * - * Note : The face handle is set to NULL in case of failure. - * - * MT-Note : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Open_Collection( TT_Engine engine, - const TT_Text* collectionPathName, - TT_ULong fontIndex, - TT_Face* face ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - TFont_Input input; - TT_Error error; - TT_Stream stream; - PFace _face; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - /* open the file */ - error = TT_Open_Stream( collectionPathName, &stream ); - if ( error ) - return error; - - input.stream = stream; - input.fontIndex = fontIndex; - input.engine = _engine; - - /* Create and load the new face object - this is thread-safe */ - error = CACHE_New( _engine->objs_face_cache, - _face, - &input ); - - /* Set the handle */ - HANDLE_Set( *face, _face ); - - if ( error ) - goto Fail; - - return TT_Err_Ok; - - Fail: - TT_Close_Stream( &stream ); - - return error; - } - - -/******************************************************************* - * - * Function : TT_Get_Face_Properties - * - * Description : Returns face properties. - * - * Input : face the face handle - * properties address of target properties record - * - * Output : Error code. - * - * Note : Currently, max_Faces is always set to 0. - * - * MT-Note : YES! Reads only permanent data. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Face_Properties( TT_Face face, - TT_Face_Properties* properties ) - { - PFace _face = HANDLE_Face( face ); - - - if ( !_face ) - return TT_Err_Invalid_Face_Handle; - - properties->num_Glyphs = _face->numGlyphs; - properties->max_Points = _face->maxPoints; - properties->max_Contours = _face->maxContours; - properties->num_CharMaps = _face->numCMaps; - properties->num_Names = _face->nameTable.numNameRecords; - - if ( _face->ttcHeader.DirCount == 0 ) - properties->num_Faces = 1; - else - properties->num_Faces = _face->ttcHeader.DirCount; - - properties->header = &_face->fontHeader; - properties->horizontal = &_face->horizontalHeader; - - if ( _face->verticalInfo ) - properties->vertical = &_face->verticalHeader; - else - properties->vertical = NULL; - - properties->os2 = &_face->os2; - properties->postscript = &_face->postscript; - properties->hdmx = &_face->hdmx; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Set_Face_Pointer - * - * Description : Each face object has one pointer, which use is - * reserved to client applications. The TrueType - * engine never accesses or uses this field. - * - * This function is used to set the pointer. - * - * Input : face the given face handle - * data the generic pointer value - * - * Output : Error code. - * - * MT-Note : NO! But this function is reserved to "enlightened" - * developers, so it shouldn't be a problem. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Face_Pointer( TT_Face face, - void* data ) - { - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - else - faze->generic = data; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Face_Pointer - * - * Description : Each face object has one pointer, which use is - * reserved to client applications. The TrueType - * engine never access or use this field. - * - * This function is used to read the pointer. - * - * Input : face the given face handle - * data the generic pointer value - * - * Output : Error code. - * - * MT-Note : NO! But this function is reserved to "enlightened" - * developers, so it shouldn't be a problem. - * - ******************************************************************/ - - EXPORT_FUNC - void* TT_Get_Face_Pointer( TT_Face face ) - { - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return NULL; - else - return faze->generic; - } - - -/******************************************************************* - * - * Function : TT_Get_Face_Metrics - * - * Description : This function returns the original horizontal AND - * vertical metrics as found in the "hmtx" and "vmtx" - * tables. These are the glyphs' left-side-bearings - * and advance widths (horizontal), as well as top - * side bearings and advance heights (vertical). - * - * All are expressed in FONT UNITS, a.k.a. EM - * units. - * - * Input : face The given face handle. - * first Index of first glyph in table. - * last Index of last glyph in table. - * - * leftBearings A pointer to an array of TT_Shorts where the - * left side bearings for the glyphs 'first' - * to 'last' will be returned. If these metrics - * don't interest you, simply set it to NULL. - * - * widths A pointer to an array of TT_UShorts - * where the advance widths for the glyphs - * 'first' to 'last' will be returned. If these - * metrics don't interest you, simply set it - * to NULL. - * - * topBearings A pointer to an array of TT_Shorts where the - * top side bearings for the glyphs 'first' - * to 'last' will be returned. If these metrics - * don't interest you, simply set it to NULL. - * - * heights A pointer to an array of TT_UShorts - * where the advance heights for the glyphs - * 'first' to 'last' will be returned. If these - * metrics don't interest you, simply set it - * to NULL. - * - * Output : Error code. - * - * IMPORTANT NOTE : - * - * As vertical metrics are optional in a TrueType font, this - * function will return an error ( TT_Err_No_Vertical_Data ) - * whenever this function is called on such a face with non-NULL - * 'topBearings' or 'heights' arguments. - * - * When a font has no vertical data, the 'vertical' field in its - * properties structure is set to NULL. - * - * MT-Note : YES! Reads only permanent data. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Face_Metrics( TT_Face face, - TT_UShort firstGlyph, - TT_UShort lastGlyph, - TT_Short* leftBearings, - TT_UShort* widths, - TT_Short* topBearings, - TT_UShort* heights ) - { - PFace _face = HANDLE_Face( face ); - UShort num; - - - if ( !_face ) - return TT_Err_Invalid_Face_Handle; - - /* Check the glyph range */ - if ( lastGlyph >= _face->numGlyphs || firstGlyph > lastGlyph ) - return TT_Err_Invalid_Argument; - - num = lastGlyph - firstGlyph; /* number of elements-1 in each array */ - - /* store the left side bearings and advance widths first */ - { - UShort n; - Short left_bearing; - UShort advance_width; - - - for ( n = 0; n <= num; n++ ) - { - TT_Get_Metrics( &_face->horizontalHeader, - firstGlyph + n, &left_bearing, &advance_width ); - - if ( leftBearings ) leftBearings[n] = left_bearing; - if ( widths ) widths[n] = advance_width; - } - } - - /* check for vertical data if topBearings or heights is non-NULL */ - if ( !topBearings && !heights ) - return TT_Err_Ok; - - if ( !_face->verticalInfo ) - return TT_Err_No_Vertical_Data; - - /* store the top side bearings */ - { - UShort n; - Short top_bearing; - UShort advance_height; - - for ( n = 0; n <= num; n++ ) - { - TT_Get_Metrics( (TT_Horizontal_Header*)&_face->verticalHeader, - firstGlyph + n, &top_bearing, &advance_height ); - - if ( topBearings ) topBearings[n] = top_bearing; - if ( heights ) heights[n] = advance_height; - } - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Flush_Face - * - * Description : This function is used to close an active face's - * file handle or descriptor. This is useful to save - * system resources, if your application uses tons - * of fonts. - * - * Input : face the given face handle - * - * Output : Error code. - * - * MT-Note : YES! (If ttfile is.) - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Flush_Face( TT_Face face ) - { - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - else - return TT_Flush_Stream( &faze->stream ); - } - - -/******************************************************************* - * - * Function : TT_Close_Face - * - * Description : Closes an opened face object. This function - * will destroy all objects associated to the - * face, except the glyphs. - * - * Input : face the given face handle - * - * Output : Error code. - * - * NOTE : The handle is set to NULL on exit. - * - * MT-Note : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Close_Face( TT_Face face ) - { - PFace _face = HANDLE_Face( face ); - - - if ( !_face ) - return TT_Err_Invalid_Face_Handle; - - TT_Close_Stream( &_face->stream ); - - /* delete the face object -- this is thread-safe */ - return CACHE_Done( _face->engine->objs_face_cache, _face ); - } - - -/******************************************************************* - * - * Function : TT_New_Instance - * - * Description : Creates a new instance from a given face. - * - * Input : face parent face handle - * instance address of instance handle - * - * Output : Error code. - * - * Note : The handle is set to NULL in case of failure. - * - * MT-Note : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_New_Instance( TT_Face face, - TT_Instance* instance ) - { - TT_Error error; - PFace _face = HANDLE_Face( face ); - PInstance _ins; - - - if ( !_face ) - return TT_Err_Invalid_Face_Handle; - - /* get a new instance from the face's cache -- this is thread-safe */ - error = CACHE_New( &_face->instances, _ins, _face ); - - HANDLE_Set( *instance, _ins ); - - if ( !error ) - { - error = Instance_Init( _ins ); - if ( error ) - { - HANDLE_Set( *instance, NULL ); - CACHE_Done( &_face->instances, _ins ); - } - } - - return error; - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_Resolutions - * - * Description : Resets an instance to a new device resolution. - * - * Input : instance the instance handle - * xResolution new horizontal device resolution in dpi - * yResolution new vertical device resolution in dpi - * - * Output : Error code. - * - * Note : There is no check for overflow; with other words, - * the product of glyph dimensions times the device - * resolutions must have reasonable values. - * - * MT-Note : You should set the charsize or pixel size immediately - * after this call in multi-threaded programs. This will - * force the instance data to be resetted. Otherwise, you - * may encounter corruption when loading two glyphs from - * the same instance concurrently! - * - * Happily, 99.99% will do just that :-) - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_Resolutions( TT_Instance instance, - TT_UShort xResolution, - TT_UShort yResolution ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - ins->metrics.x_resolution = xResolution; - ins->metrics.y_resolution = yResolution; - ins->valid = FALSE; - - /* In the case of a thread-safe implementation, we immediately */ - /* call Instance_Reset in order to change the instance's variable */ - - /* In the case of a non-threaded build, we simply set the 'valid' */ - /* flag to FALSE, which will force the instance's resetting at */ - /* the next glyph loading */ - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_CharSizes - * - * Description : Resets an instance to new point size. - * - * Input : instance the instance handle - * charWidth the new width in 26.6 char points - * charHeight the new height in 26.6 char points - * - * Output : Error code. - * - * Note : There is no check for overflow; with other words, - * the product of glyph dimensions times the device - * resolution must have reasonable values. - * - * MT-Note : NO! This should be called only when setting/resetting - * instances, so there is no need to protect. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_CharSizes( TT_Instance instance, - TT_F26Dot6 charWidth, - TT_F26Dot6 charHeight ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - if ( charWidth < 1 * 64 ) - charWidth = 1 * 64; - - if ( charHeight < 1 * 64 ) - charHeight = 1 * 64; - - ins->metrics.x_scale1 = ( charWidth * ins->metrics.x_resolution ) / 72; - ins->metrics.x_scale2 = ins->owner->fontHeader.Units_Per_EM; - - ins->metrics.y_scale1 = ( charHeight * ins->metrics.y_resolution ) / 72; - ins->metrics.y_scale2 = ins->owner->fontHeader.Units_Per_EM; - - if ( ins->owner->fontHeader.Flags & 8 ) - { - ins->metrics.x_scale1 = (ins->metrics.x_scale1+32) & -64; - ins->metrics.y_scale1 = (ins->metrics.y_scale1+32) & -64; - } - - ins->metrics.x_ppem = ins->metrics.x_scale1 / 64; - ins->metrics.y_ppem = ins->metrics.y_scale1 / 64; - - if ( charWidth > charHeight ) - ins->metrics.pointSize = charWidth; - else - ins->metrics.pointSize = charHeight; - - ins->valid = FALSE; - - return Instance_Reset( ins ); - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_CharSize - * - * Description : Resets an instance to new point size. - * - * Input : instance the instance handle - * charSize the new character size in 26.6 char points - * - * Output : Error code. - * - * Note : There is no check for overflow; with other words, - * the product of glyph dimensions times the device - * resolution must have reasonable values. - * - * MT-Note : NO! This should be called only when setting/resetting - * instances, so there is no need to protect. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_CharSize( TT_Instance instance, - TT_F26Dot6 charSize ) - { - return TT_Set_Instance_CharSizes( instance, charSize, charSize ); - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_PixelSizes - * - * Description : Resets an instance to new pixel sizes - * - * Input : instance the instance handle - * pixelWidth the new width in pixels - * pixelHeight the new height in pixels - * - * Output : Error code. - * - * Note : There is no check for overflow; with other words, - * the product of glyph dimensions times the device - * resolution must have reasonable values. - * - * MT-Note : NO! This should be called only when setting/resetting - * instances, so there is no need to protect. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_PixelSizes( TT_Instance instance, - TT_UShort pixelWidth, - TT_UShort pixelHeight, - TT_F26Dot6 pointSize ) - { - PInstance ins = HANDLE_Instance( instance ); - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - if ( pixelWidth < 1 ) pixelWidth = 1; - if ( pixelHeight < 1 ) pixelHeight = 1; - - ins->metrics.x_ppem = pixelWidth; - ins->metrics.y_ppem = pixelHeight; - ins->metrics.pointSize = pointSize; - - ins->metrics.x_scale1 = ins->metrics.x_ppem * 64L; - ins->metrics.x_scale2 = ins->owner->fontHeader.Units_Per_EM; - ins->metrics.y_scale1 = ins->metrics.y_ppem * 64L; - ins->metrics.y_scale2 = ins->owner->fontHeader.Units_Per_EM; - - ins->valid = FALSE; - - return Instance_Reset( ins ); - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_Transform_Flags - * - * Description : Informs the interpreter about the transformations - * that will be applied to the rendered glyphs. - * - * Input : instance the instance handle - * rotated set to TRUE if the glyph are rotated - * stretched set to TRUE if the glyph are stretched - * - * Output : Error code. - * - * Note : This function is deprecated! It's much better to - * control hinting manually when calling TT_Load_Glyph - * than relying on the font programs... - * - * Never use it, unless calling for trouble ;-) - * - * MT-Note : NO! This should be called only when setting/resetting - * instances, so there is no need to protect. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_Transform_Flags( TT_Instance instance, - TT_Bool rotated, - TT_Bool stretched ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - ins->metrics.rotated = rotated; - ins->metrics.stretched = stretched; - ins->valid = FALSE; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Instance_Metrics - * - * Description : Returns instance metrics. - * - * Input : instance the instance handle - * metrics address of target instance metrics record - * - * Output : Error code. - * - * MT-Note : YES! Reads only semi-permanent data. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Instance_Metrics( TT_Instance instance, - TT_Instance_Metrics* metrics ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - if ( !ins->valid ) - Instance_Reset( ins ); - - metrics->pointSize = ins->metrics.pointSize; - - metrics->x_scale = TT_MulDiv( 0x10000, - ins->metrics.x_scale1, - ins->metrics.x_scale2 ); - - metrics->y_scale = TT_MulDiv( 0x10000, - ins->metrics.y_scale1, - ins->metrics.y_scale2 ); - - metrics->x_resolution = ins->metrics.x_resolution; - metrics->y_resolution = ins->metrics.y_resolution; - metrics->x_ppem = ins->metrics.x_ppem; - metrics->y_ppem = ins->metrics.y_ppem; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Set_Instance_Pointer - * - * Description : Each instance has one pointer, which use is - * reserved to client applications. The TrueType - * engine never accesses or uses this field. - * - * This function is used to set the pointer. - * - * Input : face the given face handle - * data the generic pointer value - * - * Output : Error code. - * - * MT-Note : NO! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Set_Instance_Pointer( TT_Instance instance, - void* data ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - else - ins->generic = data; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Instance_Pointer - * - * Description : Each instance has one pointer, which use is - * reserved to client applications. The TrueType - * engine never accesses or uses this field. - * - * This function is used to read the pointer. - * - * Input : face the given face handle - * data the generic pointer value - * - * Output : Error code. - * - * MT-Safe : NO! - * - ******************************************************************/ - - EXPORT_FUNC - void* TT_Get_Instance_Pointer( TT_Instance instance ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return NULL; - else - return ins->generic; - } - - -/******************************************************************* - * - * Function : TT_Done_Instance - * - * Description : Closes a given instance. - * - * Input : instance address of instance handle - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Instance( TT_Instance instance ) - { - PInstance ins = HANDLE_Instance( instance ); - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - /* delete the instance -- this is thread-safe */ - return CACHE_Done( &ins->owner->instances, ins ); - } - - -/******************************************************************* - * - * Function : TT_New_Glyph - * - * Description : Creates a new glyph object related to a given - * face. - * - * Input : face the face handle - * glyph address of target glyph handle - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_New_Glyph( TT_Face face, - TT_Glyph* glyph ) - { - TT_Error error; - PFace _face = HANDLE_Face( face ); - PGlyph _glyph; - - - if ( !_face ) - return TT_Err_Invalid_Face_Handle; - - /* get a new glyph from the face's cache -- this is thread-safe */ - error = CACHE_New( &_face->glyphs, _glyph, _face ); - - HANDLE_Set( *glyph, _glyph ); - - return error; - } - - -/******************************************************************* - * - * Function : TT_Done_Glyph - * - * Description : Destroys a given glyph object. - * - * Input : glyph the glyph handle - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Glyph( TT_Glyph glyph ) - { - PGlyph _glyph = HANDLE_Glyph( glyph ); - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - /* delete the engine -- this is thread-safe */ - return CACHE_Done( &_glyph->face->glyphs, _glyph ); - } - - -/******************************************************************* - * - * Function : TT_Load_Glyph - * - * Description : Loads a glyph. - * - * Input : instance the instance handle - * glyph the glyph handle - * glyphIndex the glyph index - * loadFlags flags controlling how to load the glyph - * (none, scaled, hinted, both) - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Load_Glyph( TT_Instance instance, - TT_Glyph glyph, - TT_UShort glyphIndex, - TT_UShort loadFlags ) - { - PInstance _ins; - PGlyph _glyph; - TT_Error error; - - - _ins = HANDLE_Instance( instance ); - - if ( !_ins ) - loadFlags &= ~(TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH); - - if ( (loadFlags & TTLOAD_SCALE_GLYPH) == 0 ) - _ins = 0; - - _glyph = HANDLE_Glyph( glyph ); - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - if ( _ins ) - { - if ( _ins->owner != _glyph->face ) - return TT_Err_Invalid_Face_Handle; - - if ( !_ins->valid ) - { - /* This code can only be called in non thread-safe builds */ - error = Instance_Reset( _ins ); - if ( error ) - return error; - } - } - - return Load_TrueType_Glyph( _ins, _glyph, glyphIndex, loadFlags ); - } - - -/******************************************************************* - * - * Function : TT_Get_Glyph_Outline - * - * Description : Returns the glyph's outline data. - * - * Input : glyph the glyph handle - * outline address where the glyph outline will be returned - * - * Output : Error code. - * - * MT-Safe : YES! Reads only semi-permanent data. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Glyph_Outline( TT_Glyph glyph, - TT_Outline* outline ) - { - PGlyph _glyph = HANDLE_Glyph( glyph ); - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - *outline = _glyph->outline; - outline->owner = FALSE; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Glyph_Metrics - * - * Description : Extracts the glyph's horizontal metrics information. - * - * Input : glyph glyph object handle - * metrics address where metrics will be returned - * - * Output : Error code. - * - * MT-Safe : NO! Glyph containers can't be shared. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Glyph_Metrics( TT_Glyph glyph, - TT_Glyph_Metrics* metrics ) - { - PGlyph _glyph = HANDLE_Glyph( glyph ); - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - metrics->bbox = _glyph->metrics.bbox; - metrics->bearingX = _glyph->metrics.horiBearingX; - metrics->bearingY = _glyph->metrics.horiBearingY; - metrics->advance = _glyph->metrics.horiAdvance; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Glyph_Big_Metrics - * - * Description : Extracts the glyph's big metrics information. - * - * Input : glyph glyph object handle - * metrics address where big metrics will be returned - * - * Output : Error code. - * - * MT-Safe : NO! Glyph containers can't be shared. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Glyph_Big_Metrics( TT_Glyph glyph, - TT_Big_Glyph_Metrics* metrics ) - { - PGlyph _glyph = HANDLE_Glyph( glyph ); - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - *metrics = _glyph->metrics; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Glyph_Bitmap - * - * Description : Produces a bitmap from a glyph outline. - * - * Input : glyph the glyph container's handle - * map target pixmap description block - * xOffset x offset in fractional pixels (26.6 format) - * yOffset y offset in fractional pixels (26.6 format) - * - * Output : Error code. - * - * Note : Only use integer pixel offsets if you want to preserve - * the fine hints applied to the outline. This means that - * xOffset and yOffset must be multiples of 64! - * - * MT-Safe : NO! Glyph containers can't be shared. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Glyph_Bitmap( TT_Glyph glyph, - TT_Raster_Map* map, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ) - { - PEngine_Instance _engine; - TT_Engine engine; - TT_Error error; - PGlyph _glyph = HANDLE_Glyph( glyph ); - - TT_Outline outline; - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - _engine = _glyph->face->engine; - HANDLE_Set( engine, _engine ); - - outline = _glyph->outline; - /* XXX : For now, use only dropout mode 2 */ - /* outline.dropout_mode = _glyph->scan_type; */ - outline.dropout_mode = 2; - - TT_Translate_Outline( &outline, xOffset, yOffset ); - error = TT_Get_Outline_Bitmap( engine, &outline, map ); - TT_Translate_Outline( &outline, -xOffset, -yOffset ); - - return error; - } - - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - -/******************************************************************* - * - * Function : TT_Get_Glyph_Pixmap - * - * Description : Produces a grayscaled pixmap from a glyph - * outline. - * - * Input : glyph the glyph container's handle - * map target pixmap description block - * xOffset x offset in fractional pixels (26.6 format) - * yOffset y offset in fractional pixels (26.6 format) - * - * Output : Error code. - * - * Note : Only use integer pixel offsets to preserve the fine - * hinting of the glyph and the 'correct' anti-aliasing - * (where vertical and horizontal stems aren't grayed). - * This means that xOffset and yOffset must be multiples - * of 64! - * - * You can experiment with offsets of +32 to get 'blurred' - * versions of the glyphs (a nice effect at large sizes that - * some graphic designers may appreciate :) - * - * MT-Safe : NO! Glyph containers can't be shared. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Glyph_Pixmap( TT_Glyph glyph, - TT_Raster_Map* map, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ) - { - PEngine_Instance _engine; - TT_Engine engine; - TT_Error error; - PGlyph _glyph = HANDLE_Glyph( glyph ); - - TT_Outline outline; - - - if ( !_glyph ) - return TT_Err_Invalid_Glyph_Handle; - - _engine = _glyph->face->engine; - HANDLE_Set(engine,_engine); - - outline = _glyph->outline; - /* XXX : For now, use only dropout mode 2 */ - /* outline.dropout_mode = _glyph->scan_type; */ - outline.dropout_mode = 2; - - TT_Translate_Outline( &outline, xOffset, yOffset ); - error = TT_Get_Outline_Pixmap( engine, &outline, map ); - TT_Translate_Outline( &outline, -xOffset, -yOffset ); - - return error; - } - -#endif /* TT_CONFIG_OPTION_GRAY_SCALING */ - - - static const TT_Outline null_outline - = { 0, 0, NULL, NULL, NULL, 0, 0, 0, 0 }; - - -/******************************************************************* - * - * Function : TT_New_Outline - * - * Description : Creates a new TrueType outline, reserving - * array space for a given number of points and - * contours. - * - * Input : numPoints number of points - * numContours number of contours - * outline address of target outline structure - * - * Output : Error code - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_New_Outline( TT_UShort numPoints, - TT_Short numContours, - TT_Outline* outline ) - { - TT_Error error; - - - if ( !outline ) - return TT_Err_Invalid_Argument; - - *outline = null_outline; - - if ( ALLOC( outline->points, numPoints*2*sizeof ( TT_F26Dot6 ) ) || - ALLOC( outline->flags, numPoints *sizeof ( Byte ) ) || - ALLOC( outline->contours, numContours*sizeof ( UShort ) ) ) - goto Fail; - - outline->n_points = numPoints; - outline->n_contours = numContours; - outline->owner = TRUE; - return TT_Err_Ok; - - Fail: - outline->owner = TRUE; - TT_Done_Outline( outline ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Done_Outline - * - * Description : Deletes an outline created through TT_New_Outline(). - * Calling this function for outlines returned - * by TT_Get_Glyph_Outline() yields an error. - * - * Input : outline address of outline - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Outline( TT_Outline* outline ) - { - if ( outline ) - { - if ( outline->owner ) - { - FREE( outline->points ); - FREE( outline->flags ); - FREE( outline->contours ); - } - *outline = null_outline; - return TT_Err_Ok; - } - else - return TT_Err_Invalid_Argument; - } - - -/******************************************************************* - * - * Function : TT_Get_Outline_Bitmap - * - * Description : Render a TrueType outline into a bitmap. - * Note that the bitmap must be created by the caller. - * - * Input : outline the outline to render - * map the target bitmap - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Outline_Bitmap( TT_Engine engine, - TT_Outline* outline, - TT_Raster_Map* map ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - TT_Error error; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - if ( !outline || !map ) - return TT_Err_Invalid_Argument; - - MUTEX_Lock( _engine->raster_lock ); - error = RENDER_Glyph( outline, map ); - MUTEX_Release( _engine->raster_lock ); - - return error; - } - - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - -/******************************************************************* - * - * Function : TT_Get_Outline_Pixmap - * - * Description : Render a TrueType outline into a pixmap. - * Note that the pixmap must be created by the caller. - * - * Input : outline the outline to render - * map the target bitmap - * - * Output : Error code - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Outline_Pixmap( TT_Engine engine, - TT_Outline* outline, - TT_Raster_Map* map ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - TT_Error error; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - if ( !outline || !map ) - return TT_Err_Invalid_Argument; - - MUTEX_Lock( _engine->raster_lock ); - error = RENDER_Gray_Glyph( outline, map, _engine->raster_palette ); - MUTEX_Release( _engine->raster_lock ); - return error; - } - -#endif /* TT_CONFIG_OPTION_GRAY_SCALING */ - - -/******************************************************************* - * - * Function : TT_Copy_Outline - * - * Description : Copy an outline into another. The source and - * target outlines must have the same points and - * contours numbers. - * - * Input : source address of source outline - * target address of target outline - * - * Output : Error code - * - * Note : This function doesn't touch the target outline's 'owner' - * field. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Copy_Outline( TT_Outline* source, - TT_Outline* target ) - { - if ( !source || !target || - source->n_points != target->n_points || - source->n_contours != target->n_contours ) - return TT_Err_Invalid_Argument; - - MEM_Copy( target->points, source->points, - source->n_points * 2 * sizeof ( TT_F26Dot6 ) ); - - MEM_Copy( target->flags, source->flags, - source->n_points * sizeof ( Byte ) ); - - MEM_Copy( target->contours, source->contours, - source->n_contours * sizeof ( Short ) ); - - target->high_precision = source->high_precision; - target->second_pass = target->second_pass; - target->dropout_mode = source->dropout_mode; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Transform_Outline - * - * Description : Applies a simple transformation to an outline. - * - * Input : outline the glyph's outline. Can be extracted - * from a glyph container through - * TT_Get_Glyph_Outline(). - * - * matrix simple matrix with 16.16 fixed floats - * - * Output : Error code (always TT_Err_Ok). - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - void TT_Transform_Outline( TT_Outline* outline, - TT_Matrix* matrix ) - { - UShort n; - TT_F26Dot6 x, y; - TT_Vector* vec; - - - vec = outline->points; - for ( n = 0; n < outline->n_points; n++ ) - { - x = TT_MulFix( vec->x, matrix->xx ) + - TT_MulFix( vec->y, matrix->xy ); - - y = TT_MulFix( vec->x, matrix->yx ) + - TT_MulFix( vec->y, matrix->yy ); - - vec->x = x; - vec->y = y; - vec++; - } - } - - -/******************************************************************* - * - * Function : TT_Transform_Vector - * - * Description : Apply a simple transform to a vector - * - * Input : x, y the vector. - * - * matrix simple matrix with 16.16 fixed floats - * - * Output : None. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - void TT_Transform_Vector( TT_F26Dot6* x, - TT_F26Dot6* y, - TT_Matrix* matrix ) - { - TT_F26Dot6 xz, yz; - - - xz = TT_MulFix( *x, matrix->xx ) + - TT_MulFix( *y, matrix->xy ); - - yz = TT_MulFix( *x, matrix->yx ) + - TT_MulFix( *y, matrix->yy ); - - *x = xz; - *y = yz; - } - - -/******************************************************************* - * - * Function : TT_Translate_Outline - * - * Description : Applies a simple translation. - * - * Input : outline no comment :) - * xOffset - * yOffset - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - void TT_Translate_Outline( TT_Outline* outline, - TT_F26Dot6 xOffset, - TT_F26Dot6 yOffset ) - { - UShort n; - TT_Vector* vec = outline->points; - - - for ( n = 0; n < outline->n_points; n++ ) - { - vec->x += xOffset; - vec->y += yOffset; - vec++; - } - } - - -/******************************************************************* - * - * Function : TT_Get_Outline_BBox - * - * Description : Returns an outline's bounding box. - * - * Input : outline no comment :) - * bbox address where the bounding box is returned - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Outline_BBox( TT_Outline* outline, - TT_BBox* bbox ) - { - TT_F26Dot6 x, y; - UShort k; - - - if ( outline && bbox ) - { - if ( outline->n_points == 0 ) - { - bbox->xMin = 0; - bbox->yMin = 0; - bbox->xMax = 0; - bbox->yMax = 0; - } - else - { - TT_Vector* vec = outline->points; - - bbox->xMin = bbox->xMax = vec->x; - bbox->yMin = bbox->yMax = vec->y; - vec++; - - for ( k = 1; k < outline->n_points; k++ ) - { - x = vec->x; - if ( x < bbox->xMin ) bbox->xMin = x; - if ( x > bbox->xMax ) bbox->xMax = x; - y = vec->y; - if ( y < bbox->yMin ) bbox->yMin = y; - if ( y > bbox->yMax ) bbox->yMax = y; - vec++; - } - } - return TT_Err_Ok; - } - else - return TT_Err_Invalid_Argument; - } - - - - /* ----------------- character mappings support ------------- */ - -/******************************************************************* - * - * Function : TT_Get_CharMap_Count - * - * Description : Returns the number of charmaps in a given face. - * - * Input : face face object handle - * - * Output : Number of tables. -1 in case of error (bad handle). - * - * Note : DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! - * - * It is retained for backwards compatibility only and will - * fail on 16bit systems. - * - * MT-Safe : YES ! - * - ******************************************************************/ - - EXPORT_FUNC - int TT_Get_CharMap_Count( TT_Face face ) - { - PFace faze = HANDLE_Face( face ); - - return ( faze ? faze->numCMaps : -1 ); - } - - -/******************************************************************* - * - * Function : TT_Get_CharMap_ID - * - * Description : Returns the ID of a given charmap. - * - * Input : face face object handle - * charmapIndex index of charmap in directory - * platformID address of returned platform ID - * encodingID address of returned encoding ID - * - * Output : error code - * - * MT-Safe : YES ! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_CharMap_ID( TT_Face face, - TT_UShort charmapIndex, - TT_UShort* platformID, - TT_UShort* encodingID ) - { - PCMapTable cmap; - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( charmapIndex >= faze->numCMaps ) - return TT_Err_Invalid_Argument; - - cmap = faze->cMaps + charmapIndex; - - *platformID = cmap->platformID; - *encodingID = cmap->platformEncodingID; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_CharMap - * - * Description : Looks up a charmap. - * - * Input : face face object handle - * charmapIndex index of charmap in directory - * charMap address of returned charmap handle - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_CharMap( TT_Face face, - TT_UShort charmapIndex, - TT_CharMap* charMap ) - { - TT_Error error; - TT_Stream stream; - PCMapTable cmap; - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( charmapIndex >= faze->numCMaps ) - return TT_Err_Invalid_Argument; - - cmap = faze->cMaps + charmapIndex; - - /* Load table if needed */ - error = TT_Err_Ok; - - /* MT-NOTE: We're modifying the face object, so protect it. */ - MUTEX_Lock( faze->lock ); - - if ( !cmap->loaded ) - { - (void)USE_Stream( faze->stream, stream ); - if ( !error ) - { - error = CharMap_Load( cmap, stream ); - DONE_Stream( stream ); - } - - if ( error ) - cmap = NULL; - else - cmap->loaded = TRUE; - } - MUTEX_Release( faze->lock ); - - HANDLE_Set( *charMap, cmap ); - - return error; - } - - -/******************************************************************* - * - * Function : TT_Char_Index - * - * Description : Returns the glyph index corresponding to - * a given character code defined for the 'charmap'. - * - * Input : charMap charmap handle - * charcode character code - * - * Output : glyph index. - * - * Notes : Character code 0 is the unknown glyph, which should never - * be displayed. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_UShort TT_Char_Index( TT_CharMap charMap, - TT_UShort charCode ) - { - PCMapTable cmap = HANDLE_CharMap( charMap ); - - - if ( !cmap ) - return 0; /* we return 0 in case of invalid char map */ - - return CharMap_Index( cmap, charCode ); - } - - -/******************************************************************* - * - * Function : TT_Get_Name_Count - * - * Description : Returns the number of strings found in the - * name table. - * - * Input : face face handle - * - * Output : number of strings. - * - * Notes : Returns -1 on error (invalid handle). - * - * DON'T USE THIS FUNCTION! IT HAS BEEN DEPRECATED! - * - * It is retained for backwards compatibility only and will - * fail on 16bit systems. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - int TT_Get_Name_Count( TT_Face face ) - { - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return -1; - - return faze->nameTable.numNameRecords; - } - - -/******************************************************************* - * - * Function : TT_Get_Name_ID - * - * Description : Returns the IDs of the string number 'nameIndex' - * in the name table of a given face. - * - * Input : face face handle - * nameIndex index of string. First is 0 - * platformID addresses of returned IDs - * encodingID - * languageID - * nameID - * - * Output : Error code. - * - * Notes : Some files have a corrupt or unusual name table, with some - * entries having a platformID > 3. These can usually - * be ignored by a client application. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Name_ID( TT_Face face, - TT_UShort nameIndex, - TT_UShort* platformID, - TT_UShort* encodingID, - TT_UShort* languageID, - TT_UShort* nameID ) - { - TNameRec* namerec; - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( nameIndex >= faze->nameTable.numNameRecords ) - return TT_Err_Invalid_Argument; - - namerec = faze->nameTable.names + nameIndex; - - *platformID = namerec->platformID; - *encodingID = namerec->encodingID; - *languageID = namerec->languageID; - *nameID = namerec->nameID; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Name_String - * - * Description : Returns the address and length of a given - * string found in the name table. - * - * Input : face face handle - * nameIndex string index - * stringPtr address of returned pointer to string - * length address of returned string length - * - * Output : Error code. - * - * Notes : If the string's platformID is invalid, - * stringPtr is NULL, and length is 0. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Name_String( TT_Face face, - TT_UShort nameIndex, - TT_String** stringPtr, - TT_UShort* length ) - { - TNameRec* namerec; - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( nameIndex >= faze->nameTable.numNameRecords ) - return TT_Err_Invalid_Argument; - - namerec = faze->nameTable.names + nameIndex; - - *stringPtr = (String*)namerec->string; - *length = namerec->stringLength; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Font_Data - * - * Description : Loads any font table into client memory. - * - * Input : face Face object to look for. - * - * tag Tag of table to load. Use the value 0 if you - * want to access the whole font file, else set - * this parameter to a valid TrueType table tag - * that you can forge with the MAKE_TT_TAG - * macro. - * - * offset Starting offset in the table (or the file - * if tag == 0). - * - * buffer Address of target buffer - * - * length Address of decision variable: - * - * if length == NULL: - * Load the whole table. Returns an - * error if 'offset' != 0. - * - * if *length == 0 : - * Exit immediately, returning the - * length of the given table, or of - * the font file, depending on the - * value of 'tag'. - * - * if *length != 0 : - * Load the next 'length' bytes of - * table or font, starting at offset - * 'offset' (in table or font too). - * - * Output : Error code. - * - * MT-Safe : YES! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Font_Data( TT_Face face, - TT_ULong tag, - TT_Long offset, - void* buffer, - TT_Long* length ) - { - PFace faze = HANDLE_Face( face ); - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - return Load_TrueType_Any( faze, tag, offset, buffer, length ); - } - - - /************************ callback definition ******************/ - - /* Register a new callback to the TrueType engine -- this should */ - /* only be used by higher-level libraries, not typical clients */ - /* */ - /* This is not part of the current FreeType release, thus */ - /* undefined... */ - -#if 0 - EXPORT_FUNC - TT_Error TT_Register_Callback( TT_Engine engine, - int callback_id, - void* callback_ptr ) - { - PEngine_Instance eng = HANDLE_Engine( engine ); - - - if ( !eng ) - return TT_Err_Invalid_Argument; - - /* currently, we only support one callback */ - if (callback_id != TT_Callback_Glyph_Outline_Load) - return TT_Err_Invalid_Argument; - - eng->glCallback = (TT_Glyph_Loader_Callback)callback_ptr; - return TT_Err_Ok; - } -#endif /* 0 */ - - -/* END */ Index: xc/extras/FreeType/lib/ttcache.c diff -u xc/extras/FreeType/lib/ttcache.c:1.1.1.2 xc/extras/FreeType/lib/ttcache.c:removed --- xc/extras/FreeType/lib/ttcache.c:1.1.1.2 Sat Feb 12 23:55:38 2000 +++ xc/extras/FreeType/lib/ttcache.c Wed Mar 16 20:59:38 2005 @@ -1,463 +0,0 @@ -/******************************************************************* - * - * ttcache.c 1.1 - * - * Generic object cache - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Changes between 1.1 and 1.0: - * - * - introduced the refresher and finalizer in the cache class - * definition/implementation. - * - ******************************************************************/ - -#include "ttengine.h" -#include "ttmemory.h" -#include "ttcache.h" -#include "ttobjs.h" -#include "ttdebug.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_cache - -#define ZERO_List( list ) list = NULL - -/* The macro FREE_Elements aliases the current engine instance's */ -/* free list_elements recycle list. */ -#define FREE_Elements ( engine->list_free_elements ) - -/* Redefinition of LOCK and UNLOCK macros for New_Element and Done_Element */ -/* Note: The macros are redefined below for the cache functions */ - -#undef LOCK -#define LOCK() MUTEX_Lock ( engine->lock ) - -#undef UNLOCK -#define UNLOCK() MUTEX_Release( engine->lock ) - -/******************************************************************* - * - * Function : Element_New - * - * Description : Gets a new (either fresh or recycled) list - * element. The element is unlisted. - * - * Input : None - * - * Output : List element address. NULL if out of memory. - * - ******************************************************************/ - - static - PList_Element Element_New( PEngine_Instance engine ) - { - PList_Element element; - - - LOCK(); - if ( FREE_Elements ) - { - element = (PList_Element)FREE_Elements; - FREE_Elements = element->next; - } - else - { - if ( !MEM_Alloc( element, sizeof ( TList_Element ) ) ) - { - element->next = NULL; - element->data = NULL; - } - } - - /* Note: in case of failure, Alloc sets the pointer to NULL */ - UNLOCK(); - - return element; - } - - -/******************************************************************* - * - * Function : Element_Done - * - * Description : Recycles an unlinked list element. - * - * Input : The list element to recycle. It _must_ be unlisted. - * - * Output : none. - * - * Note : This function doesn't check the element. - * - ******************************************************************/ - - static - void Element_Done( PEngine_Instance engine, - PList_Element element ) - { - LOCK(); - /* Simply add the list element to the recycle list */ - element->next = (PList_Element)FREE_Elements; - FREE_Elements = element; - UNLOCK(); - } - - -/* Redefinition of LOCK and UNLOCK macros for the cache functions */ -/* Note: The macros are defined above for the list element functions */ - -#undef LOCK -#define LOCK() MUTEX_Lock( *cache->lock ) - -#undef UNLOCK -#define UNLOCK() MUTEX_Release( *cache->lock ) - - -/******************************************************************* - * - * Function : Cache_Create - * - * Description : Creates a new cache that will be used to list - * and recycle several objects of the same class. - * - * Input : clazz a pointer to the cache's class. This is - * a simple structure that describes the - * the cache's object types and recycling - * limits. - * - * cache address of cache to create - * - * lock address of the mutex to use for this - * cache. The mutex will be used to protect - * the cache's lists. Use NULL for unprotected - * cache. - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Cache_Create( PEngine_Instance engine, - PCache_Class clazz, - TCache* cache, - TMutex* lock ) - { - cache->engine = engine; - cache->clazz = clazz; - cache->lock = lock; - cache->idle_count = 0; - - ZERO_List( cache->active ); - ZERO_List( cache->idle ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Cache_Destroy - * - * Description : Destroys a cache and all its idle and active - * objects. This will call each object's destructor - * before freeing it. - * - * Input : cache address of cache to destroy - * - * Output : error code. - * - * Note: This function is not MT-Safe, as we assume that a client - * isn't stupid enough to use an object while destroying it. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Cache_Destroy( TCache* cache ) - { - PDestructor destroy; - PList_Element current; - PList_Element next; - - - /* now destroy all active and idle listed objects */ - - /* get the destructor function */ - destroy = cache->clazz->done; - - /* destroy all elements in active list */ - current = cache->active; - while ( current ) - { - next = current->next; - destroy( current->data ); - FREE( current->data ); - - Element_Done( cache->engine, current ); - current = next; - } - ZERO_List(cache->active); - - /* destroy all elements in idle list */ - current = cache->idle; - while ( current ) - { - next = current->next; - destroy( current->data ); - FREE( current->data ); - - Element_Done( cache->engine, current ); - current = next; - } - ZERO_List(cache->idle); - - cache->clazz = NULL; - cache->idle_count = 0; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Cache_New - * - * Description : Extracts a new object from a cache. This will - * try to recycle an idle object, if any is found. - * Otherwise, a new object will be allocated and - * built (by calling its constructor). - * - * Input : cache address of cache to use - * new_object address of target pointer to the 'new' - * object - * parent_object this pointer is passed to a new object - * constructor (unused if object is - * recycled) - * - * Output : Error code. - * - * Notes: This function is thread-safe, each cache list is protected - * through the cache's mutex, if there is one... - * - * *new_object will be set to NULL in case of failure. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Cache_New( TCache* cache, - void** new_object, - void* parent_object ) - { - TT_Error error; - PList_Element current; - PConstructor build; - PRefresher reset; - void* object; - - - LOCK(); - current = cache->idle; - if ( current ) - { - cache->idle = current->next; - cache->idle_count--; - } - UNLOCK(); - - if ( current ) - { - object = current->data; - reset = cache->clazz->reset; - if ( reset ) - { - error = reset( object, parent_object ); - if ( error ) - { - LOCK(); - current->next = cache->idle; - cache->idle = current; - cache->idle_count++; - UNLOCK(); - goto Exit; - } - } - } - else - { - /* if no object was found in the cache, create a new one */ - build = cache->clazz->init; - - if ( MEM_Alloc( object, cache->clazz->object_size ) ) - goto Memory_Fail; - - current = Element_New( cache->engine ); - if ( !current ) - goto Memory_Fail; - - current->data = object; - - error = build( object, parent_object ); - if ( error ) - { - Element_Done( cache->engine, current ); - goto Fail; - } - } - - LOCK(); - current->next = cache->active; - cache->active = current; - UNLOCK(); - - *new_object = current->data; - return TT_Err_Ok; - - Exit: - *new_object = NULL; - return error; - - Memory_Fail: - error = TT_Err_Out_Of_Memory; - - Fail: - FREE( object ); - goto Exit; - } - - -/******************************************************************* - * - * Function : Cache_Done - * - * Description : Releases an object to the cache. This will either - * recycle or destroy the object, based on the cache's - * class and state. - * - * Input : cache the cache to use - * data the object to recycle/discard - * - * Output : error code. - * - * Notes : The object's destructor is called only when - * the objectwill be effectively destroyed by this - * function. This will not happen during recycling. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Cache_Done( TCache* cache, void* data ) - { - TT_Error error; - PList_Element element; - PList_Element prev; - PFinalizer finalize; - Long limit; - Bool destroy; - - - /* Look for object in active list */ - LOCK(); - - element = cache->active; - prev = NULL; - while ( element ) - { - if ( element->data == data ) - { - if ( prev ) - prev->next = element->next; - else - cache->active = element->next; - goto Suite; - } - prev = element; - element = element->next; - } - - UNLOCK(); - return TT_Err_Unlisted_Object; - - Suite: - - limit = cache->clazz->idle_limit; - destroy = (cache->idle_count >= limit); - UNLOCK(); - - if ( destroy ) - { - /* destroy the object when the cache is full */ - cache->clazz->done( element->data ); - FREE( element->data ); - Element_Done( cache->engine, element ); - } - else - { - /* Finalize the object before adding it to the */ - /* idle list. Return the error if any is found. */ - - finalize = cache->clazz->finalize; - if ( finalize ) - { - error = finalize( element->data ); - if ( error ) - goto Exit; - - /* Note: a failure at finalize time is a severe bug in */ - /* the engine, which is why we allow ourselves to */ - /* lose the object in this case. A finalizer should */ - /* have its own error codes to spot this kind of */ - /* problems easily. */ - } - - LOCK(); - element->next = cache->idle; - cache->idle = element; - cache->idle_count++; - UNLOCK(); - } - - error = TT_Err_Ok; - - Exit: - return error; - } - - - LOCAL_FUNC - TT_Error TTCache_Init( PEngine_Instance engine ) - { - /* Create list elements mutex */ - FREE_Elements = NULL; - return TT_Err_Ok; - } - - - LOCAL_FUNC - TT_Error TTCache_Done( PEngine_Instance engine ) - { - /* We don't protect this function, as this is the end of the engine's */ - /* execution.. */ - PList_Element element, next; - - - /* frees the recycled list elements */ - element = FREE_Elements; - while ( element ) - { - next = element->next; - FREE( element ); - element = next; - } - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttcache.h diff -u xc/extras/FreeType/lib/ttcache.h:1.2 xc/extras/FreeType/lib/ttcache.h:removed --- xc/extras/FreeType/lib/ttcache.h:1.2 Sat Oct 27 23:32:04 2001 +++ xc/extras/FreeType/lib/ttcache.h Wed Mar 16 20:59:38 2005 @@ -1,220 +0,0 @@ -/******************************************************************* - * - * ttcache.h 1.1 - * - * Generic object cache - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This component defines and implements object caches. - * - * An object class is a structure layout that encapsulate one - * given type of data used by the FreeType engine. Each object - * class is completely described by: - * - * - a 'root' or 'leading' structure containing the first - * important fields of the class. The root structure is - * always of fixed size. - * - * It is implemented as a simple C structure, and may - * contain several pointers to sub-tables that can be - * sized and allocated dynamically. - * - * Examples: TFace, TInstance, TGlyph & TExecution_Context - * (defined in 'ttobjs.h') - * - * - we make a difference between 'child' pointers and 'peer' - * pointers. A 'child' pointer points to a sub-table that is - * owned by the object, while a 'peer' pointer points to any - * other kind of data the object isn't responsible for. - * - * An object class is thus usually a 'tree' of 'child' tables. - * - * - each object class needs a constructor and a destructor. - * - * A constructor is a function which receives the address of - * freshly allocated and zeroed object root structure and - * 'builds' all the valid child data that must be associated - * to the object before it becomes 'valid'. - * - * A destructor does the inverse job: given the address of - * a valid object, it must discard all its child data and - * zero its main fields (essentially the pointers and array - * sizes found in the root fields). - * - * - * Important notes: - * - * When the constructor fails to allocate an object, it must - * return immediately with an error code, and not try to release - * what it has previously allocated before the error. The cache - * manager detects the error and calls the destructor on the - * partial object, before returning the error to the caller (along - * with a NULL pointer for the "new" object). - * - * The destructor must thus be able to deal with "partial objects", - * i.e., objects where only part of the child tables are allocated, - * and only release these ones. As the TT_Free() function accepts - * a NULL parameter (and returns successfuly in this case), no check - * is really necessary when using the macro 'FREE()'. - * - * Currently, there is no check in the cache manager to see if a - * destructor fails (double error state!). - * - * This scheme is more compact and more maintanable than the one - * where de-allocation code is duplicated in the constructor - * _and_ the destructor. - * - * - * - * Changes between 1.1 and 1.0: - * - * - introduced the refreshed and finalizer class definition/implementation - * - inserted an engine instance pointer in the cache structure - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttcache.h,v 1.2 2001/10/28 03:32:04 tsi Exp $ */ - -#ifndef TTCACHE_H -#define TTCACHE_H - -#include "tttypes.h" -#include "ttconfig.h" -#include "ttmutex.h" - -#ifdef __cplusplus - extern "C" { -#endif - - typedef TT_Error TConstructor( void* object, - void* parent ); - - typedef TT_Error TDestructor ( void* object ); - - typedef TConstructor TRefresher; - typedef TDestructor TFinalizer; - - typedef TConstructor* PConstructor; - typedef TDestructor* PDestructor; - typedef TRefresher* PRefresher; - typedef TFinalizer* PFinalizer; - - - /* A Cache class record holds the data necessary to define */ - /* a cache kind. */ - struct TCache_Class_ - { - ULong object_size; - Long idle_limit; - PConstructor init; - PDestructor done; - PRefresher reset; - PFinalizer finalize; - }; - - typedef struct TCache_Class_ TCache_Class; - typedef TCache_Class* PCache_Class; - - - - /* Simple list node record. A list element is said to be 'unlinked' */ - /* when it doesn't belong to any list. */ - struct TList_Element_; - - typedef struct TList_Element_ TList_Element; - typedef TList_Element* PList_Element; - - struct TList_Element_ - { - PList_Element next; - void* data; - }; - - - /* Simple singly-linked list record - LIFO style, no tail field */ - typedef PList_Element TSingle_List; - - struct TCache_ - { - PEngine_Instance engine; - PCache_Class clazz; /* 'class' is a reserved word in C++ */ - TMutex* lock; - TSingle_List active; - TSingle_List idle; - Long idle_count; - }; - - typedef struct TCache_ TCache; - typedef TCache* PCache; - -#if !defined(FTXCMAP_H) && !defined(FTXSBIT_H) - - /* Returns a new list element, either fresh or recycled. */ - /* Note: the returned element is unlinked. */ - - /* An object cache holds two lists tracking the active and */ - /* idle objects that are currently created and used by the */ - /* engine. It can also be 'protected' by a mutex. */ - - /* Initializes a new cache, of class 'clazz', pointed by 'cache', */ - /* protected by the 'lock' mutex. Set 'lock' to NULL if the cache */ - /* doesn't need protection */ - - LOCAL_DEF - TT_Error Cache_Create( PEngine_Instance engine, - PCache_Class clazz, - TCache* cache, - TMutex* lock ); - - /* Destroys a cache and all its listed objects */ - - LOCAL_DEF - TT_Error Cache_Destroy( TCache* cache ); - - - /* Extracts a new object from the cache */ - - LOCAL_DEF - TT_Error Cache_New( TCache* cache, - void** new_object, - void* parent_object ); - - - /* Returns an object to the cache, or discards it depending */ - /* on the cache class' 'idle_limit' field */ - - LOCAL_DEF - TT_Error Cache_Done( TCache* cache, void* data ); - -#define CACHE_New( _cache, _newobj, _parent ) \ - Cache_New( (TCache*)_cache, (void**)&_newobj, (void*)_parent ) - -#define CACHE_Done( _cache, _obj ) \ - Cache_Done( (TCache*)_cache, (void*)_obj ) - - - - LOCAL_DEF - TT_Error TTCache_Init( PEngine_Instance engine ); - - LOCAL_DEF - TT_Error TTCache_Done( PEngine_Instance engine ); - -#endif /* !FTXCMAP_H && !FTXSBIT_H */ - -#ifdef __cplusplus - } -#endif - -#endif /* TTCACHE_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttcalc.c diff -u xc/extras/FreeType/lib/ttcalc.c:1.8 xc/extras/FreeType/lib/ttcalc.c:removed --- xc/extras/FreeType/lib/ttcalc.c:1.8 Mon Dec 22 12:48:00 2003 +++ xc/extras/FreeType/lib/ttcalc.c Wed Mar 16 20:59:38 2005 @@ -1,414 +0,0 @@ -/******************************************************************* - * - * ttcalc.c - * - * Arithmetic Computations (body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttcalc.c,v 1.8 2003/12/22 17:48:00 tsi Exp $ */ - -#include "ttcalc.h" -#include "ttdebug.h" -#include "tttables.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_calc - - -/* Support for 1-complement arithmetic has been totally dropped in this */ -/* release. You can still write your own code if you need it... */ - - static const Long Roots[63] = - { - 1, 1, 2, 3, 4, 5, 8, 11, - 16, 22, 32, 45, 64, 90, 128, 181, - 256, 362, 512, 724, 1024, 1448, 2048, 2896, - 4096, 5892, 8192, 11585, 16384, 23170, 32768, 46340, - - 65536, 92681, 131072, 185363, 262144, 370727, - 524288, 741455, 1048576, 1482910, 2097152, 2965820, - 4194304, 5931641, 8388608, 11863283, 16777216, 23726566, - - 33554432, 47453132, 67108864, 94906265, - 134217728, 189812531, 268435456, 379625062, - 536870912, 759250125, 1073741824, 1518500250, - 2147483647 - }; - - -#ifdef LONG64 - - EXPORT_FUNC - TT_Long TT_MulDiv( TT_Long a, TT_Long b, TT_Long c ) - { - Long s; - - - s = a; a = ABS( a ); - s ^= b; b = ABS( b ); - s ^= c; c = ABS( c ); - - a = ((TT_Int64)a * b + c/2) / c; - return ( s < 0 ) ? -a : a; - } - - - EXPORT_FUNC - TT_Long TT_MulFix( TT_Long a, TT_Long b ) - { - Long s; - - - s = a; a = ABS( a ); - s ^= b; b = ABS( b ); - - a = ((TT_Int64)a * b + 0x8000) / 0x10000; - return ( s < 0 ) ? -a : a; - } - - -#if !defined(TT_MAKE_OPTION_SINGLE_OBJECT) || \ - !defined(TT_CONFIG_OPTION_NO_INTERPRETER) - - LOCAL_FUNC - Int Order64( TT_Int64 z ) - { - Int j = 0; - - - while ( z ) - { - z = (CARD64)z >> 1; - j++; - } - return j - 1; - } - - - LOCAL_FUNC - TT_Int32 Sqrt64( TT_Int64 l ) - { - TT_Int64 r, s; - - - if ( l <= 0 ) return 0; - if ( l == 1 ) return 1; - - r = Roots[Order64( l )]; - - do - { - s = r; - r = ( r + l/r ) >> 1; - } - while ( r > s || r*r > l ); - - return r; - } - -#endif - -#else /* LONG64 */ - - - /* The TT_MulDiv function has been optimized thanks to ideas from */ - /* Graham Asher. The trick is to optimize computation when everything */ - /* fits within 32-bits (a rather common case). */ - /* */ - /* we compute 'a*b+c/2', then divide it by 'c'. (positive values) */ - /* */ - /* 46340 is FLOOR(SQRT(2^31-1)). */ - /* */ - /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */ - /* */ - /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */ - /* */ - /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */ - /* */ - /* and 2*0x157F0 = 176096 */ - /* */ - - EXPORT_FUNC - TT_Long TT_MulDiv( TT_Long a, TT_Long b, TT_Long c ) - { - long s; - - - if ( a == 0 || b == c ) - return a; - - s = a; a = ABS( a ); - s ^= b; b = ABS( b ); - s ^= c; c = ABS( c ); - - if ( a <= 46340 && b <= 46340 && c <= 176095 ) - { - a = ( a*b + c/2 )/c; - } - else - { - TT_Int64 temp, temp2; - - MulTo64( a, b, &temp ); - temp2.hi = (TT_Int32)(c >> 31); - temp2.lo = (TT_Word32)(c / 2); - Add64( &temp, &temp2, &temp ); - a = Div64by32( &temp, c ); - } - - return ( s < 0 ) ? -a : a; - } - - /* The optimization for TT_MulFix is different. We could simply be */ - /* happy by applying the same principles than with TT_MulDiv, because */ - /* */ - /* c = 0x10000 < 176096 */ - /* */ - /* however, in most cases, we have a 'b' with a value around 0x10000 */ - /* which is greater than 46340. */ - /* */ - /* According to Graham's testing, most cases have 'a' < 100, so a good */ - /* idea is to use bounds like 1024 and 2097151 (= floor(2^31-1)/1024 ) */ - /* for 'a' and 'b' respectively.. */ - /* */ - - EXPORT_FUNC - TT_Long TT_MulFix( TT_Long a, TT_Long b ) - { - long s; - - if ( a == 0 || b == 0x10000 ) - return a; - - s = a; a = ABS( a ); - s ^= b; b = ABS( b ); - - if ( a <= 1024 && b <= 2097151 ) - { - a = ( a*b + 0x8000 ) >> 16; - } - else - { - TT_Int64 temp, temp2; - - MulTo64( a, b, &temp ); - temp2.hi = 0; - temp2.lo = 0x8000; - Add64( &temp, &temp2, &temp ); - a = Div64by32( &temp, 0x10000 ); - } - - return ( s < 0 ) ? -a : a; - } - - - LOCAL_FUNC - void Neg64( TT_Int64* x ) - { - /* Remember that -(0x80000000) == 0x80000000 with 2-complement! */ - /* We take care of that here. */ - - x->hi ^= 0xFFFFFFFFUL; - x->lo ^= 0xFFFFFFFFUL; - x->lo++; - - if ( !x->lo ) - { - x->hi++; - if ( x->hi == 0x80000000UL ) /* Check -MaxInt32 - 1 */ - { - x->lo--; - x->hi--; /* We return 0x7FFFFFFF! */ - } - } - } - - - LOCAL_FUNC - void Add64( TT_Int64* x, TT_Int64* y, TT_Int64* z ) - { - register TT_Word32 lo, hi; - - - lo = x->lo + y->lo; - hi = x->hi + y->hi + ( lo < x->lo ); - - z->lo = lo; - z->hi = hi; - } - - - LOCAL_FUNC - void Sub64( TT_Int64* x, TT_Int64* y, TT_Int64* z ) - { - register TT_Word32 lo, hi; - - - lo = x->lo - y->lo; - hi = x->hi - y->hi - ( (TT_Int32)lo < 0 ); - - z->lo = lo; - z->hi = hi; - } - - - LOCAL_FUNC - void MulTo64( TT_Int32 x, TT_Int32 y, TT_Int64* z ) - { - TT_Int32 s; - TT_Word32 lo1, hi1, lo2, hi2, lo, hi, i1, i2; - - - s = x; x = ABS( x ); - s ^= y; y = ABS( y ); - - lo1 = x & 0x0000FFFF; hi1 = x >> 16; - lo2 = y & 0x0000FFFF; hi2 = y >> 16; - - lo = lo1*lo2; - i1 = lo1*hi2; - i2 = lo2*hi1; - hi = hi1*hi2; - - /* Check carry overflow of i1 + i2 */ - - if ( i2 ) - { - if ( i1 >= (TT_Word32)-(TT_Int32)i2 ) hi += 1L << 16; - i1 += i2; - } - - i2 = i1 >> 16; - i1 = i1 << 16; - - /* Check carry overflow of i1 + lo */ - if ( i1 ) - { - if ( lo >= (TT_Word32)-(TT_Int32)i1 ) hi++; - lo += i1; - } - - hi += i2; - - z->lo = lo; - z->hi = hi; - - if ( s < 0 ) Neg64( z ); - } - - - LOCAL_FUNC - TT_Int32 Div64by32( TT_Int64* x, TT_Int32 y ) - { - TT_Int32 s; - TT_Word32 q, r, i, lo; - - - s = x->hi; if ( s < 0 ) Neg64( x ); - s ^= y; y = ABS( y ); - - /* Shortcut */ - if ( x->hi == 0 ) - { - q = x->lo / y; - return ( s < 0 ) ? -(TT_Int32)q : (TT_Int32)q; - } - - r = x->hi; - lo = x->lo; - - if ( r >= (TT_Word32)y ) /* we know y is to be treated as unsigned here */ - return ( s < 0 ) ? 0x80000001UL : 0x7FFFFFFFUL; - /* Return Max/Min Int32 if divide overflow */ - /* This includes division by zero! */ - q = 0; - for ( i = 0; i < 32; i++ ) - { - r <<= 1; - q <<= 1; - r |= lo >> 31; - - if ( r >= (TT_Word32)y ) - { - r -= y; - q |= 1; - } - lo <<= 1; - } - - return ( s < 0 ) ? -(TT_Int32)q : (TT_Int32)q; - } - - -#if !defined(TT_MAKE_OPTION_SINGLE_OBJECT) || \ - !defined(TT_CONFIG_OPTION_NO_INTERPRETER) - - LOCAL_FUNC - Int Order64( TT_Int64* z ) - { - TT_Word32 i; - Int j; - - - if ( z->hi ) - { - i = z->hi; - j = 32; - } - else - { - i = z->lo; - j = 0; - } - - while ( i > 0 ) - { - i >>= 1; - j++; - } - return j-1; - } - - - LOCAL_FUNC - TT_Int32 Sqrt64( TT_Int64* l ) - { - TT_Int64 l2; - TT_Int32 r, s; - - - if ( (TT_Int32)l->hi < 0 || - (l->hi == 0 && l->lo == 0) ) return 0; - - s = Order64( l ); - if ( s == 0 ) return 1; - - r = Roots[s]; - do - { - s = r; - r = ( r + Div64by32(l,r) ) >> 1; - MulTo64( r, r, &l2 ); - Sub64 ( l, &l2, &l2 ); - } - while ( r > s || (TT_Int32)l2.hi < 0 ); - - return r; - } - -#endif - -#endif /* LONG64 */ - - -/* END */ Index: xc/extras/FreeType/lib/ttcalc.h diff -u xc/extras/FreeType/lib/ttcalc.h:1.3 xc/extras/FreeType/lib/ttcalc.h:removed --- xc/extras/FreeType/lib/ttcalc.h:1.3 Tue Dec 30 13:55:11 2003 +++ xc/extras/FreeType/lib/ttcalc.h Wed Mar 16 20:59:38 2005 @@ -1,107 +0,0 @@ -/******************************************************************* - * - * ttcalc.h - * - * Arithmetic Computations (specification). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttcalc.h,v 1.3 2003/12/30 18:55:11 tsi Exp $ */ - -#ifndef TTCALC_H -#define TTCALC_H - -#include "ttconfig.h" -#include "freetype.h" - - -#ifdef __cplusplus - extern "C" { -#endif - -#ifdef LONG64 - - typedef INT64 TT_Int64; - -#define ADD_64( x, y, z ) z = x + y -#define SUB_64( x, y, z ) z = x - y -#define MUL_64( x, y, z ) z = (TT_Int64)(x) * (y) - -#define DIV_64( x, y ) ( (x) / (y) ) - -#define SQRT_64( x ) Sqrt64( x ) -#define SQRT_32( x ) Sqrt32( x ) - -#if !defined(TT_MAKE_OPTION_SINGLE_OBJECT) || \ - !defined(TT_CONFIG_OPTION_NO_INTERPRETER) - - LOCAL_DEF TT_Int32 Sqrt64( TT_Int64 l ); - -#endif - -#else /* LONG64 */ - - struct TT_Int64_ - { - TT_Word32 lo; - TT_Word32 hi; - }; - - typedef struct TT_Int64_ TT_Int64; - -#define ADD_64( x, y, z ) Add64( &x, &y, &z ) -#define SUB_64( x, y, z ) Sub64( &x, &y, &z ) -#define MUL_64( x, y, z ) MulTo64( x, y, &z ) - -#define DIV_64( x, y ) Div64by32( &x, y ) - -#define SQRT_64( x ) Sqrt64( &x ) -#define SQRT_32( x ) Sqrt32( x ) - - LOCAL_DEF void Add64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); - LOCAL_DEF void Sub64( TT_Int64* x, TT_Int64* y, TT_Int64* z ); - - LOCAL_DEF void MulTo64( TT_Int32 x, TT_Int32 y, TT_Int64* z ); - - LOCAL_DEF TT_Int32 Div64by32( TT_Int64* x, TT_Int32 y ); - -#if !defined(TT_MAKE_OPTION_SINGLE_OBJECT) || \ - !defined(TT_CONFIG_OPTION_NO_INTERPRETER) - - LOCAL_DEF int Order64( TT_Int64* z ); - LOCAL_DEF TT_Int32 Sqrt64( TT_Int64* l ); - -#endif - -#endif /* LONG64 */ - - /* The two following functions are now part of the API! */ - - /* TT_Long TT_MulDiv( TT_Long a, TT_Long b, TT_Long c ); */ - /* TT_Long TT_MulFix( TT_Long a, TT_Long b ); */ - - -#define INT_TO_F26DOT6( x ) ( (Long)(x) << 6 ) -#define INT_TO_F2DOT14( x ) ( (Long)(x) << 14 ) -#define INT_TO_FIXED( x ) ( (Long)(x) << 16 ) -#define F2DOT14_TO_FIXED( x ) ( (Long)(x) << 2 ) -#define FLOAT_TO_FIXED( x ) ( (Long)(x * 65536.0) ) - -#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ((x) + 32) & -64) \ - : ( -((32 - (x)) & -64) ) ) - -#ifdef __cplusplus - } -#endif - -#endif /* TTCALC_H */ - -/* END */ Index: xc/extras/FreeType/lib/ttcmap.c diff -u xc/extras/FreeType/lib/ttcmap.c:1.5 xc/extras/FreeType/lib/ttcmap.c:removed --- xc/extras/FreeType/lib/ttcmap.c:1.5 Sun Feb 13 00:03:52 2000 +++ xc/extras/FreeType/lib/ttcmap.c Wed Mar 16 20:59:39 2005 @@ -1,503 +0,0 @@ -/******************************************************************* - * - * ttcmap.c 1.0 - * - * TrueType Character Mappings - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "ttobjs.h" -#include "ttdebug.h" -#include "ttfile.h" -#include "ttmemory.h" -#include "ttload.h" -#include "ttcmap.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_cmap - - -/******************************************************************* - * - * Function : CharMap_Load - * - * Description : Loads a given charmap into memory. - * - * Input : cmap pointer to cmap table - * - * Output : Error code. - * - * Notes : - Assumes the the stream is already used (opened). - * - * - In case of error, releases all partially allocated - * tables. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error CharMap_Load( PCMapTable cmap, - TT_Stream input ) - { - DEFINE_LOAD_LOCALS( input ); - - UShort num_SH, num_Seg, i; - - UShort u, l; - - PCMap0 cmap0; - PCMap2 cmap2; - PCMap4 cmap4; - PCMap6 cmap6; - - PCMap2SubHeader cmap2sub; - PCMap4Segment segments; - - - if ( cmap->loaded ) - return TT_Err_Ok; - - if ( FILE_Seek( cmap->offset ) ) - return error; - - switch ( cmap->format ) - { - case 0: - cmap0 = &cmap->c.cmap0; - - if ( ALLOC( cmap0->glyphIdArray, 256L ) || - FILE_Read( (void*)cmap0->glyphIdArray, 256L ) ) - goto Fail; - - break; - - case 2: - num_SH = 0; - cmap2 = &cmap->c.cmap2; - - /* allocate subheader keys */ - - if ( ALLOC_ARRAY( cmap2->subHeaderKeys, 256, UShort ) || - ACCESS_Frame( 512L ) ) - goto Fail; - - for ( i = 0; i < 256; i++ ) - { - u = GET_UShort() / 8; - cmap2->subHeaderKeys[i] = u; - - if ( num_SH < u ) - num_SH = u; - } - - FORGET_Frame(); - - /* load subheaders */ - - cmap2->numGlyphId = l = - ( ( cmap->length - 2L * (256 + 3) - num_SH * 8L ) & 0xffff) / 2; - - if ( ALLOC_ARRAY( cmap2->subHeaders, - num_SH + 1, - TCMap2SubHeader ) || - ACCESS_Frame( ( num_SH + 1 ) * 8L ) ) - goto Fail; - - cmap2sub = cmap2->subHeaders; - - for ( i = 0; i <= num_SH; i++ ) - { - cmap2sub->firstCode = GET_UShort(); - cmap2sub->entryCount = GET_UShort(); - cmap2sub->idDelta = GET_Short(); - /* we apply the location offset immediately */ - cmap2sub->idRangeOffset = GET_UShort() - ( num_SH - i ) * 8 - 2; - - cmap2sub++; - } - - FORGET_Frame(); - - /* load glyph ids */ - - if ( ALLOC_ARRAY( cmap2->glyphIdArray, l, UShort ) || - ACCESS_Frame( l * 2L ) ) - goto Fail; - - for ( i = 0; i < l; i++ ) - cmap2->glyphIdArray[i] = GET_UShort(); - - FORGET_Frame(); - break; - - case 4: - cmap4 = &cmap->c.cmap4; - - /* load header */ - - if ( ACCESS_Frame( 8L ) ) - goto Fail; - - cmap4->segCountX2 = GET_UShort(); - cmap4->searchRange = GET_UShort(); - cmap4->entrySelector = GET_UShort(); - cmap4->rangeShift = GET_UShort(); - - num_Seg = cmap4->segCountX2 / 2; - - FORGET_Frame(); - - /* load segments */ - - if ( ALLOC_ARRAY( cmap4->segments, - num_Seg, - TCMap4Segment ) || - ACCESS_Frame( (num_Seg * 4 + 1) * 2L ) ) - goto Fail; - - segments = cmap4->segments; - - for ( i = 0; i < num_Seg; i++ ) - segments[i].endCount = GET_UShort(); - - (void)GET_UShort(); - - for ( i = 0; i < num_Seg; i++ ) - segments[i].startCount = GET_UShort(); - - for ( i = 0; i < num_Seg; i++ ) - segments[i].idDelta = GET_Short(); - - for ( i = 0; i < num_Seg; i++ ) - segments[i].idRangeOffset = GET_UShort(); - - FORGET_Frame(); - - cmap4->numGlyphId = l = - ( ( cmap->length - ( 16L + 8L * num_Seg ) ) & 0xffff ) / 2; - - /* load ids */ - - if ( ALLOC_ARRAY( cmap4->glyphIdArray, l , UShort ) || - ACCESS_Frame( l * 2L ) ) - goto Fail; - - for ( i = 0; i < l; i++ ) - cmap4->glyphIdArray[i] = GET_UShort(); - - FORGET_Frame(); - break; - - case 6: - cmap6 = &cmap->c.cmap6; - - if ( ACCESS_Frame( 4L ) ) - goto Fail; - - cmap6->firstCode = GET_UShort(); - cmap6->entryCount = GET_UShort(); - - FORGET_Frame(); - - l = cmap6->entryCount; - - if ( ALLOC_ARRAY( cmap6->glyphIdArray, - cmap6->entryCount, - Short ) || - ACCESS_Frame( l * 2L ) ) - goto Fail; - - for ( i = 0; i < l; i++ ) - cmap6->glyphIdArray[i] = GET_UShort(); - - FORGET_Frame(); - break; - - default: /* corrupt character mapping table */ - return TT_Err_Invalid_CharMap_Format; - - } - return TT_Err_Ok; - - Fail: - CharMap_Free( cmap ); - return error; - } - - -/******************************************************************* - * - * Function : CharMap_Free - * - * Description : Releases a given charmap table. - * - * Input : cmap pointer to cmap table - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error CharMap_Free( PCMapTable cmap ) - { - if ( !cmap ) - return TT_Err_Ok; - - switch ( cmap->format ) - { - case 0: - FREE( cmap->c.cmap0.glyphIdArray ); - break; - - case 2: - FREE( cmap->c.cmap2.subHeaderKeys ); - FREE( cmap->c.cmap2.subHeaders ); - FREE( cmap->c.cmap2.glyphIdArray ); - break; - - case 4: - FREE( cmap->c.cmap4.segments ); - FREE( cmap->c.cmap4.glyphIdArray ); - cmap->c.cmap4.segCountX2 = 0; - break; - - case 6: - FREE( cmap->c.cmap6.glyphIdArray ); - cmap->c.cmap6.entryCount = 0; - break; - - default: - /* invalid table format, do nothing */ - ; - } - - cmap->loaded = FALSE; - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : CharMap_Index - * - * Description : Performs charcode->glyph index translation. - * - * Input : cmap pointer to cmap table - * - * Output : Glyph index, 0 in case of failure. - * - ******************************************************************/ - - static UShort code_to_index0( UShort charCode, PCMap0 cmap0 ); - static UShort code_to_index2( UShort charCode, PCMap2 cmap2 ); - static UShort code_to_index4( UShort charCode, PCMap4 cmap4 ); - static UShort code_to_index6( UShort charCode, PCMap6 cmap6 ); - - - LOCAL_FUNC - UShort CharMap_Index( PCMapTable cmap, - UShort charcode ) - { - switch ( cmap->format ) - { - case 0: - return code_to_index0( charcode, &cmap->c.cmap0 ); - case 2: - return code_to_index2( charcode, &cmap->c.cmap2 ); - case 4: - return code_to_index4( charcode, &cmap->c.cmap4 ); - case 6: - return code_to_index6( charcode, &cmap->c.cmap6 ); - default: - return 0; - } - } - - -/******************************************************************* - * - * Function : code_to_index0 - * - * Description : Converts the character code into a glyph index. - * Uses format 0. - * charCode will be masked to get a value in the range - * 0x00-0xFF. - * - * Input : charCode the wanted character code - * cmap0 a pointer to a cmap table in format 0 - * - * Output : Glyph index into the glyphs array. - * 0 if the glyph does not exist. - * - ******************************************************************/ - - static UShort code_to_index0( UShort charCode, - PCMap0 cmap0 ) - { - if ( charCode <= 0xFF ) - return cmap0->glyphIdArray[charCode]; - else - return 0; - } - - -/******************************************************************* - * - * Function : code_to_index2 - * - * Description : Converts the character code into a glyph index. - * Uses format 2. - * - * Input : charCode the wanted character code - * cmap2 a pointer to a cmap table in format 2 - * - * Output : Glyph index into the glyphs array. - * 0 if the glyph does not exist. - * - ******************************************************************/ - - static UShort code_to_index2( UShort charCode, - PCMap2 cmap2 ) - { - UShort index1, idx, offset; - TCMap2SubHeader sh2; - - - index1 = cmap2->subHeaderKeys[charCode <= 0xFF ? - charCode : (charCode >> 8)]; - - if ( index1 == 0 ) - { - if ( charCode <= 0xFF ) - return cmap2->glyphIdArray[charCode]; /* 8bit character code */ - else - return 0; - } - else /* 16bit character code */ - { - if ( charCode <= 0xFF ) - return 0; - - sh2 = cmap2->subHeaders[index1]; - - if ( (charCode & 0xFF) < sh2.firstCode ) - return 0; - - if ( (charCode & 0xFF) >= (sh2.firstCode + sh2.entryCount) ) - return 0; - - offset = sh2.idRangeOffset / 2 + (charCode & 0xFF) - sh2.firstCode; - if ( offset < cmap2->numGlyphId ) - idx = cmap2->glyphIdArray[offset]; - else - return 0; - - if ( idx ) - return (idx + sh2.idDelta) & 0xFFFF; - else - return 0; - } - } - - -/******************************************************************* - * - * Function : code_to_index4 - * - * Description : Converts the character code into a glyph index. - * Uses format 4. - * - * Input : charCode the wanted character code - * cmap4 a pointer to a cmap table in format 4 - * - * Output : Glyph index into the glyphs array. - * 0 if the glyph does not exist. - * - ******************************************************************/ - - static UShort code_to_index4( UShort charCode, - PCMap4 cmap4 ) - { - UShort index1, segCount; - UShort i; - TCMap4Segment seg4; - - - segCount = cmap4->segCountX2 / 2; - - for ( i = 0; i < segCount; i++ ) - if ( charCode <= cmap4->segments[i].endCount ) - break; - - /* Safety check - even though the last endCount should be 0xFFFF */ - if ( i >= segCount ) - return 0; - - seg4 = cmap4->segments[i]; - - if ( charCode < seg4.startCount ) - return 0; - - if ( seg4.idRangeOffset == 0 ) - return ( charCode + seg4.idDelta ) & 0xFFFF; - else - { - index1 = seg4.idRangeOffset / 2 + (charCode - seg4.startCount) - - (segCount - i); - - if ( index1 < cmap4->numGlyphId ) - { - if ( cmap4->glyphIdArray[index1] == 0 ) - return 0; - else - return ( cmap4->glyphIdArray[index1] + seg4.idDelta ) & 0xFFFF; - } - else - return 0; - } - } - - -/******************************************************************* - * - * Function : code_to_index6 - * - * Description : Converts the character code into a glyph index. - * Uses format 6. - * - * Input : charCode the wanted character code - * cmap6 a pointer to a cmap table in format 6 - * - * Output : Glyph index into the glyphs array. - * 0 if the glyph does not exist (`missing character glyph'). - * - ******************************************************************/ - - static UShort code_to_index6( UShort charCode, - PCMap6 cmap6 ) - { - UShort firstCode; - - - firstCode = cmap6->firstCode; - - if ( charCode < firstCode ) - return 0; - - if ( charCode >= (firstCode + cmap6->entryCount) ) - return 0; - - return cmap6->glyphIdArray[charCode - firstCode]; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttcmap.h diff -u xc/extras/FreeType/lib/ttcmap.h:1.2 xc/extras/FreeType/lib/ttcmap.h:removed --- xc/extras/FreeType/lib/ttcmap.h:1.2 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttcmap.h Wed Mar 16 20:59:39 2005 @@ -1,172 +0,0 @@ -/******************************************************************* - * - * ttcmap.h 1.0 - * - * TrueType Character Mappings - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttcmap.h,v 1.2 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTCMAP_H -#define TTCMAP_H - -#include "ttconfig.h" -#include "tttypes.h" - - -#ifdef __cplusplus - extern "C" { -#endif - - /* format 0 */ - - struct TCMap0_ - { - PByte glyphIdArray; - }; - - typedef struct TCMap0_ TCMap0; - typedef TCMap0* PCMap0; - - - /* format 2 */ - - struct TCMap2SubHeader_ - { - UShort firstCode; /* first valid low byte */ - UShort entryCount; /* number of valid low bytes */ - Short idDelta; /* delta value to glyphIndex */ - UShort idRangeOffset; /* offset from here to 1st code */ - }; - - typedef struct TCMap2SubHeader_ TCMap2SubHeader; - typedef TCMap2SubHeader* PCMap2SubHeader; - - struct TCMap2_ - { - PUShort subHeaderKeys; - /* high byte mapping table */ - /* value = subHeader index * 8 */ - - PCMap2SubHeader subHeaders; - PUShort glyphIdArray; - UShort numGlyphId; /* control value */ - }; - - typedef struct TCMap2_ TCMap2; - typedef TCMap2* PCMap2; - - - /* format 4 */ - - struct TCMap4Segment_ - { - UShort endCount; - UShort startCount; - Short idDelta; /* in the specs defined as UShort but the - example there gives negative values... */ - UShort idRangeOffset; - }; - - typedef struct TCMap4Segment_ TCMap4Segment; - typedef TCMap4Segment* PCMap4Segment; - - struct TCMap4_ - { - UShort segCountX2; /* number of segments * 2 */ - UShort searchRange; /* these parameters can be used */ - UShort entrySelector; /* for a binary search */ - UShort rangeShift; - - PCMap4Segment segments; - PUShort glyphIdArray; - UShort numGlyphId; /* control value */ - }; - - typedef struct TCMap4_ TCMap4; - typedef TCMap4* PCMap4; - - - /* format 6 */ - - struct TCMap6_ - { - UShort firstCode; /* first character code of subrange */ - UShort entryCount; /* number of character codes in subrange */ - - PUShort glyphIdArray; - }; - - typedef struct TCMap6_ TCMap6; - typedef TCMap6* PCMap6; - - - /* charmap table */ - - struct TCMapTable_ - { - UShort platformID; - UShort platformEncodingID; - UShort format; - UShort length; - UShort version; - - Bool loaded; - ULong offset; - - union - { - TCMap0 cmap0; - TCMap2 cmap2; - TCMap4 cmap4; - TCMap6 cmap6; - } c; - }; - - typedef struct TCMapTable_ TCMapTable; - typedef TCMapTable* PCMapTable; - -#if !defined(FTXCMAP_H) && !defined(FTXSBIT_H) - - /* Load character mappings directory when face is loaded. */ - /* The mappings themselves are only loaded on demand. */ - - LOCAL_DEF - TT_Error CharMap_Load( PCMapTable table, - TT_Stream input ); - - - /* Destroy one character mapping table */ - - LOCAL_DEF - TT_Error CharMap_Free( PCMapTable table ); - - - /* Use character mapping table to perform mapping */ - - LOCAL_DEF - UShort CharMap_Index( PCMapTable cmap, - UShort charCode ); - -#endif /* !FTXCMAP_H && !FTXSBIT_H */ - - /* NOTE: The PFace type isn't defined at this point */ - -#ifdef __cplusplus - } -#endif - -#endif /* TTCMAP_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttconfig.h diff -u xc/extras/FreeType/lib/ttconfig.h:1.5 xc/extras/FreeType/lib/ttconfig.h:removed --- xc/extras/FreeType/lib/ttconfig.h:1.5 Sun Feb 13 00:03:52 2000 +++ xc/extras/FreeType/lib/ttconfig.h Wed Mar 16 20:59:39 2005 @@ -1,279 +0,0 @@ -/******************************************************************* - * - * ttconfig.h 1.0 - * - * Configuration settings header file (spec only). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Notes: - * - * All the configuration #define statements have been gathered in - * this file to allow easy check and modification. - * - ******************************************************************/ - -#ifndef TTCONFIG_H -#define TTCONFIG_H - - - -/* ------------ auto configuration ------------------------------------- */ - - -/*************************************************************************/ -/* Here we include the file ft_conf.h for system dependent stuff. */ -/* The specific makefile is responsible for providing the right path to */ -/* this file. */ - -#include "ft_conf.h" - - -/**************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -/* #define TT_CONFIG_OPTION_THREAD_SAFE */ - - - -/* ------------ general debugging -------------------------------------- */ - - -/************************************************************************* - * - * There are now three debugging modes: - * - * - trace mode: - * - * Error and trace messages are sent to the log file - * (which can be the standard error output). Define - * DEBUG_LEVEL_TRACE to enable this mode. - * - * - error mode: - * - * Only error messages are generated. Define - * DEBUG_LEVEL_ERROR to enable this mode. - * - * - release mode: - * - * Error messages are neither sent nor generated. The code is - * free from any debugging parts. - * - * - * Note that you should link the engine with the 'ttdebug' component. - * in case either DEBUG_LEVEL_TRACE or DEBUG_LEVEL_ERROR is defined. - * - * Please consult ttdebug.h for more details. */ - -/* #define DEBUG_LEVEL_TRACE */ -/* #define DEBUG_LEVEL_ERROR */ - - - -/* ------------ special debugging -------------------------------------- */ - - -/*************************************************************************/ -/* Define this if you want to generate a special debug version of the */ -/* rasterizer. This will progressively draw the glyphs while the */ -/* computations are done directly on the graphics screen... (with */ -/* inverted glyphs). */ -/* */ -/* Use it at your own risk! It is not maintained currently. */ -/* */ -/* IMPORTANT: This is reserved to developers willing to debug the */ -/* rasterizer, which seems working very well in its */ -/* current state... */ - -/* #define DEBUG_RASTER */ - - -/*************************************************************************/ -/* Define this to have a simple debugger version of RunIns(). */ -/* */ -/* Use it at your own risk! It is not maintained currently. */ - -/* #define DEBUG_INTERPRETER */ - - -/*************************************************************************/ -/* Define this to have some housekeeping of allocation and deallocation. */ -/* */ -/* Please note that probably not all OS-specific versions of ttmemory.c */ -/* provide this functionality. */ - -/* #define DEBUG_MEMORY */ - - -/*************************************************************************/ -/* Define this to have bounds checking for file buffer frames. */ -/* */ -/* Please note that probably not all OS-specific versions of ttfile.c */ -/* provide this functionality. */ - -/* #define DEBUG_FILE */ - - - -/* ------------ arithmetic and processor support ----------------------- */ - - -/*************************************************************************/ -/* Define TT_USE_LONG_LONG if you want to enable the use of the */ -/* 'long long' 64-bit type provided by gcc and other compilers. Note */ -/* that : */ -/* */ -/* 1. The type isn't ANSI, and thus will produce many warnings */ -/* during library compilation. */ -/* */ -/* 2. Though the generated object files are slightly smaller, the */ -/* resulting executables are bigger of about 4Kb! gcc must be */ -/* linking some extra code in there! */ -/* */ -/* 3. There is really no speed gain in doing so (but it may help */ -/* debug the ttcalc component). */ -/* */ -/* IMPORTANT NOTE: You don't need to define it on 64-bits machines! */ -/* */ -/* NOTE 2 : This flag used to be _GNUC_LONG64_ */ - -/* #define TT_USE_LONG_LONG */ - - -/*************************************************************************/ -/* define ALIGNMENT to your processor/environment preferred alignment */ -/* size. A value of 8 should work on all current processors, even */ -/* 64-bits ones. */ - -#define ALIGNMENT 8 - - - -/* --------------- miscellaneous ----------------------------------- */ - - -/*********************************************************************/ -/* The number of extensions available. Don't change this value */ -/* except if you add new extensions to the engine. */ - -#define TT_MAX_EXTENSIONS 8 - - - -/* --------------- automatic setup -- don't touch ------------------ */ - - -/*********************************************************************/ -/* If HAVE_TT_TEXT is defined we don't provide a default typedef for */ -/* defining TT_Text. */ - -#ifndef HAVE_TT_TEXT -#define HAVE_TT_TEXT - typedef char TT_Text; -#endif - - -/*********************************************************************/ -/* We define NULL in case it's not defined yet. The default */ -/* location is stdlib.h. */ - -#ifdef HAVE_STDLIB_H -#include -#endif - - -/*********************************************************************/ -/* Some systems can't use vfprintf for error messages on stderr; if */ -/* HAVE_PRINT_FUNCTION is defined, the Print macro must be supplied */ -/* externally (having the same parameters). */ -/* */ -/* This is only used by the "ttdebug" component, which should be */ -/* linked to the engine only in debug mode. */ - -#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) -#ifndef HAVE_PRINT_FUNCTION -#define Print( format, ap ) vfprintf( stderr, (format), (ap) ) -#endif -#endif - - -/********************************************************************/ -/* */ -/* I have added the ability to compile the library into a single */ -/* object file. This gets rids of all the external symbols defined */ -/* in each component interface, and de-pollutes the name-space. */ -/* */ -/* I use two macros, namely LOCAL_FUNC and LOCAL_DEF, which only */ -/* apply to functions that are internal to the engine, and */ -/* should never be seen or linked by a client application. */ -/* */ -/* LOCAL_DEF used in header (.h) files, to define a function */ -/* that will be seen by other components. This */ -/* translates to "extern" in normal mode, and to */ -/* "static" in single-object mode. */ -/* */ -/* LOCAL_FUNC used in implementation (.c) files, just before */ -/* the function body. This translates to nothing */ -/* in normal mode, and to "static" in single-object */ -/* mode. */ -/* */ -/* Getting rid of un-necessary symbols makes the "ttcommon" */ -/* renaming macros hack unnecessary. Moreover, the stripped */ -/* single object file (freetype.o) is 52 Kb, instead of the */ -/* previous 57 Kb (size of all combined .o files), and gives */ -/* a better idea of the engine's real code size. */ -/* */ -/* It is called a "MAKE_OPTION" because the macro must be */ -/* defined in the Makefile, rather than this one. It allows */ -/* any developer to quickly switch from one mode to the other */ -/* without messing with "ttconfig.h" each time. */ -/* */ -#ifndef TT_MAKE_OPTION_SINGLE_OBJECT -#define LOCAL_FUNC /* void */ -#define LOCAL_DEF extern -#else -#define LOCAL_FUNC static -#define LOCAL_DEF static -#endif - - -/*************************************************************************/ -/* Define EXPORT_DEF and EXPORT_FUNC as needed to build e.g. a DLL. All */ -/* variables and functions visible from outside have these prefixes. */ - -#ifndef EXPORT_DEF -#define EXPORT_DEF extern -#endif - -#ifndef EXPORT_FUNC -#define EXPORT_FUNC /* void */ -#endif - - - -/* -------------- internal (developer) configuration toggles ------------ */ - - -#undef TT_STATIC_INTERPRETER -/* Do not undefine this configuration macro. It is now a default that */ -/* must be kept in all release builds. */ - - -#undef TT_STATIC_RASTER -/* Define this if you want to generate a static raster. This makes */ -/* a non re-entrant version of the scan-line converter, which is */ -/* about 10% faster and 50% bigger than an indirect one! */ - - -#endif /* TTCONFIG_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttdebug.c diff -u xc/extras/FreeType/lib/ttdebug.c:1.1.1.2 xc/extras/FreeType/lib/ttdebug.c:removed --- xc/extras/FreeType/lib/ttdebug.c:1.1.1.2 Sat Feb 12 23:55:40 2000 +++ xc/extras/FreeType/lib/ttdebug.c Wed Mar 16 20:59:39 2005 @@ -1,404 +0,0 @@ -/* Simple debugging component. Temporary */ - -#include "ttdebug.h" -#include "tttables.h" -#include "ttobjs.h" - - -#ifdef DEBUG_LEVEL_TRACE - char tt_trace_levels[trace_max]; -#endif - -#if defined( DEBUG_LEVEL_ERROR ) || defined( DEBUG_LEVEL_TRACE ) - -#include -#include -#include - - - static String tempStr[128]; - - static const String* OpStr[256] = - { - "SVTCA y", /* Set vectors to coordinate axis y */ - "SVTCA x", /* Set vectors to coordinate axis x */ - "SPvTCA y", /* Set Proj. vec. to coord. axis y */ - "SPvTCA x", /* Set Proj. vec. to coord. axis x */ - "SFvTCA y", /* Set Free. vec. to coord. axis y */ - "SFvTCA x", /* Set Free. vec. to coord. axis x */ - "SPvTL //", /* Set Proj. vec. parallel to segment */ - "SPvTL +", /* Set Proj. vec. normal to segment */ - "SFvTL //", /* Set Free. vec. parallel to segment */ - "SFvTL +", /* Set Free. vec. normal to segment */ - "SPvFS", /* Set Proj. vec. from stack */ - "SFvFS", /* Set Free. vec. from stack */ - "GPV", /* Get projection vector */ - "GFV", /* Get freedom vector */ - "SFvTPv", /* Set free. vec. to proj. vec. */ - "ISECT", /* compute intersection */ - - "SRP0", /* Set reference point 0 */ - "SRP1", /* Set reference point 1 */ - "SRP2", /* Set reference point 2 */ - "SZP0", /* Set Zone Pointer 0 */ - "SZP1", /* Set Zone Pointer 1 */ - "SZP2", /* Set Zone Pointer 2 */ - "SZPS", /* Set all zone pointers */ - "SLOOP", /* Set loop counter */ - "RTG", /* Round to Grid */ - "RTHG", /* Round to Half-Grid */ - "SMD", /* Set Minimum Distance */ - "ELSE", /* Else */ - "JMPR", /* Jump Relative */ - "SCvTCi", /* Set CVT */ - "SSwCi", /* */ - "SSW", /* */ - - "DUP", - "POP", - "CLEAR", - "SWAP", - "DEPTH", - "CINDEX", - "MINDEX", - "AlignPTS", - "INS_$28", - "UTP", - "LOOPCALL", - "CALL", - "FDEF", - "ENDF", - "MDAP[-]", - "MDAP[r]", - - "IUP[y]", - "IUP[x]", - "SHP[0]", - "SHP[1]", - "SHC[0]", - "SHC[1]", - "SHZ[0]", - "SHZ[1]", - "SHPIX", - "IP", - "MSIRP[0]", - "MSIRP[1]", - "AlignRP", - "RTDG", - "MIAP[-]", - "MIAP[r]", - - "NPushB", - "NPushW", - "WS", - "RS", - "WCvtP", - "RCvt", - "GC[0]", - "GC[1]", - "SCFS", - "MD[0]", - "MD[1]", - "MPPEM", - "MPS", - "FlipON", - "FlipOFF", - "DEBUG", - - "LT", - "LTEQ", - "GT", - "GTEQ", - "EQ", - "NEQ", - "ODD", - "EVEN", - "IF", - "EIF", - "AND", - "OR", - "NOT", - "DeltaP1", - "SDB", - "SDS", - - "ADD", - "SUB", - "DIV", - "MUL", - "ABS", - "NEG", - "FLOOR", - "CEILING", - "ROUND[G]", - "ROUND[B]", - "ROUND[W]", - "ROUND[?]", - "NROUND[G]", - "NROUND[B]", - "NROUND[W]", - "NROUND[?]", - - "WCvtF", - "DeltaP2", - "DeltaP3", - "DeltaC1", - "DeltaC2", - "DeltaC3", - "SROUND", - "S45Round", - "JROT", - "JROF", - "ROFF", - "INS_$7B", - "RUTG", - "RDTG", - "SANGW", - "AA", - - "FlipPT", - "FlipRgON", - "FlipRgOFF", - "INS_$83", - "INS_$84", - "ScanCTRL", - "SDPVTL[0]", - "SDPVTL[1]", - "GetINFO", - "IDEF", - "ROLL", - "MAX", - "MIN", - "ScanTYPE", - "IntCTRL", - "INS_$8F", - - "INS_$90", - "INS_$91", - "INS_$92", - "INS_$93", - "INS_$94", - "INS_$95", - "INS_$96", - "INS_$97", - "INS_$98", - "INS_$99", - "INS_$9A", - "INS_$9B", - "INS_$9C", - "INS_$9D", - "INS_$9E", - "INS_$9F", - - "INS_$A0", - "INS_$A1", - "INS_$A2", - "INS_$A3", - "INS_$A4", - "INS_$A5", - "INS_$A6", - "INS_$A7", - "INS_$A8", - "INS_$A9", - "INS_$AA", - "INS_$AB", - "INS_$AC", - "INS_$AD", - "INS_$AE", - "INS_$AF", - - "PushB[0]", - "PushB[1]", - "PushB[2]", - "PushB[3]", - "PushB[4]", - "PushB[5]", - "PushB[6]", - "PushB[7]", - "PushW[0]", - "PushW[1]", - "PushW[2]", - "PushW[3]", - "PushW[4]", - "PushW[5]", - "PushW[6]", - "PushW[7]", - - "MDRP[G]", - "MDRP[B]", - "MDRP[W]", - "MDRP[?]", - "MDRP[rG]", - "MDRP[rB]", - "MDRP[rW]", - "MDRP[r?]", - "MDRP[mG]", - "MDRP[mB]", - "MDRP[mW]", - "MDRP[m?]", - "MDRP[mrG]", - "MDRP[mrB]", - "MDRP[mrW]", - "MDRP[mr?]", - "MDRP[pG]", - "MDRP[pB]", - - "MDRP[pW]", - "MDRP[p?]", - "MDRP[prG]", - "MDRP[prB]", - "MDRP[prW]", - "MDRP[pr?]", - "MDRP[pmG]", - "MDRP[pmB]", - "MDRP[pmW]", - "MDRP[pm?]", - "MDRP[pmrG]", - "MDRP[pmrB]", - "MDRP[pmrW]", - "MDRP[pmr?]", - - "MIRP[G]", - "MIRP[B]", - "MIRP[W]", - "MIRP[?]", - "MIRP[rG]", - "MIRP[rB]", - "MIRP[rW]", - "MIRP[r?]", - "MIRP[mG]", - "MIRP[mB]", - "MIRP[mW]", - "MIRP[m?]", - "MIRP[mrG]", - "MIRP[mrB]", - "MIRP[mrW]", - "MIRP[mr?]", - "MIRP[pG]", - "MIRP[pB]", - - "MIRP[pW]", - "MIRP[p?]", - "MIRP[prG]", - "MIRP[prB]", - "MIRP[prW]", - "MIRP[pr?]", - "MIRP[pmG]", - "MIRP[pmB]", - "MIRP[pmW]", - "MIRP[pm?]", - "MIRP[pmrG]", - "MIRP[pmrB]", - "MIRP[pmrW]", - "MIRP[pmr?]" - }; - - - const String* Cur_U_Line( void* _exec ) - { - String s[32]; - - Int op, i, n; - - PExecution_Context exec; - - - exec = _exec; - - op = exec->code[exec->IP]; - - sprintf( tempStr, "%s", OpStr[op] ); - - if ( op == 0x40 ) - { - n = exec->code[exec->IP + 1]; - sprintf( s, "(%d)", n ); - strncat( tempStr, s, 8 ); - - if ( n > 20 ) n = 20; /* limit output */ - - for ( i = 0; i < n; i++ ) - { - sprintf( s, " $%02hx", exec->code[exec->IP + i + 2] ); - strncat( tempStr, s, 8 ); - } - } - else if ( op == 0x41 ) - { - n = exec->code[exec->IP + 1]; - sprintf( s, "(%d)", n ); - strncat( tempStr, s, 8 ); - - if ( n > 20 ) n = 20; /* limit output */ - - for ( i = 0; i < n; i++ ) - { - sprintf( s, " $%02hx%02hx", exec->code[exec->IP + i*2 + 2], - exec->code[exec->IP + i*2 + 3] ); - strncat( tempStr, s, 8 ); - } - } - else if ( (op & 0xF8) == 0xB0 ) - { - n = op - 0xB0; - - for ( i = 0; i <= n; i++ ) - { - sprintf( s, " $%02hx", exec->code[exec->IP + i + 1] ); - strncat( tempStr, s, 8 ); - } - } - else if ( (op & 0xF8) == 0xB8 ) - { - n = op-0xB8; - - for ( i = 0; i <= n; i++ ) - { - sprintf( s, " $%02hx%02hx", exec->code[exec->IP + i*2 + 1], - exec->code[exec->IP + i*2 + 2] ); - strncat( tempStr, s, 8 ); - } - } - - return (String*)tempStr; - } - - - /* the Print() function is defined in ttconfig.h; */ - /* it defaults to vprintf on systems which have it */ - - void TT_Message( const String* fmt, ... ) - { - va_list ap; - - va_start( ap, fmt ); - Print( fmt, ap ); - va_end( ap ); - } - - - void TT_Panic( const String* fmt, ... ) - { - va_list ap; - - va_start( ap, fmt ); - Print( fmt, ap ); - va_end( ap ); - - exit( EXIT_FAILURE ); - } - -#endif /* defined( DEBUG_LEVEL_ERROR ) || defined( DEBUG_LEVEL_TRACE ) */ - -#if defined( DEBUG_LEVEL_TRACE ) - - /* use this function to set the values of tt_trace_levels */ - - void set_tt_trace_levels( int index, char value ) - { - tt_trace_levels[index] = value; - } - -#endif - -/* END */ Index: xc/extras/FreeType/lib/ttdebug.h diff -u xc/extras/FreeType/lib/ttdebug.h:1.1.1.3 xc/extras/FreeType/lib/ttdebug.h:removed --- xc/extras/FreeType/lib/ttdebug.h:1.1.1.3 Sat Feb 12 23:55:41 2000 +++ xc/extras/FreeType/lib/ttdebug.h Wed Mar 16 20:59:39 2005 @@ -1,170 +0,0 @@ -/******************************************************************* - * - * ttdebug.h - * - * Debugging and Logging component (specification) - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This component contains various macros and functions used to - * ease the debugging of the FreeType engine. Its main purpose - * is in assertion checking, tracing, and error detection. - * - * There are now three debugging modes: - * - * - trace mode: - * - * Error and trace messages are sent to the log file - * (which can be the standard error output). Define - * DEBUG_LEVEL_TRACE to enable this mode. - * - * - error mode: - * - * Only error messages are generated. Define - * DEBUG_LEVEL_ERROR to enable this mode. - * - * - release mode: - * - * Error messages are neither sent nor generated. The code is - * free from any debugging parts. - * - ******************************************************************/ - -#ifndef TTDEBUG_H -#define TTDEBUG_H - -#include "ttconfig.h" -#include "tttypes.h" - - -#ifdef __cplusplus - extern "C" { -#endif - - -#if defined( DEBUG_LEVEL_TRACE ) - - typedef enum Trace_Component_ - { - trace_any = 0, - trace_api, - trace_interp, - trace_load, - trace_gload, - trace_memory, - trace_file, - trace_mutex, - trace_cache, - trace_calc, - trace_cmap, - trace_extend, - trace_objs, - trace_raster, - - trace_bitmap, - trace_max - - } Trace_Component; - - - /* Here we define an array to hold the trace levels per component. */ - /* Since it is globally defined, all array members are set to 0. */ - /* You should set the values in this array either in your program */ - /* or with your debugger. */ - /* */ - /* Currently, up to eight levels (PTRACE0-PTRACE7, see below) are */ - /* used in some parts of the engine. */ - /* */ - /* For example, to have all tracing messages in the raster */ - /* component, say */ - /* */ - /* #define DEBUG_LEVEL_TRACE */ - /* #include "ttdebug.h" */ - /* */ - /* ... */ - /* set_tt_trace_levels( trace_raster, 7 ) */ - /* */ - /* in your code before initializing the FreeType engine. */ - /* */ - /* Maybe it is better to define DEBUG_LEVEL_TRACE in ttconfig.h... */ - - extern char tt_trace_levels[trace_max]; - - /* IMPORTANT: */ - /* */ - /* Each component must define the macro TT_COMPONENT */ - /* to a valid Trace_Component value before using any */ - /* PTRACEx macro. */ - /* */ - -#define PTRACE( level, varformat ) \ - if ( tt_trace_levels[TT_COMPONENT] >= level ) TT_Message##varformat - -#elif defined( DEBUG_LEVEL_ERROR ) - -#define PTRACE( level, varformat ) /* nothing */ - -#else /* RELEASE MODE */ - -#define TT_Assert( condition, action ) /* nothing */ - -#define PTRACE( level, varformat ) /* nothing */ -#define PERROR( varformat ) /* nothing */ -#define PANIC( varformat ) /* nothing */ - -#endif - - -/************************************************************************/ -/* */ -/* Define macros and fuctions that are common to the debug and trace */ -/* modes. */ -/* */ - -#if defined( DEBUG_LEVEL_TRACE ) || defined( DEBUG_LEVEL_ERROR ) - - -#define TT_Assert( condition, action ) if ( !(condition) ) ( action ) - - void TT_Message( const String* fmt, ... ); - void TT_Panic ( const String* fmt, ... ); - /* print a message and exit */ - - const String* Cur_U_Line( void* exec ); - -#define PERROR( varformat ) TT_Message##varformat -#define PANIC( varformat ) TT_Panic##varformat - -#endif - -#if defined( DEBUG_LEVEL_TRACE ) - - void set_tt_trace_levels( int index, char value ); - -#endif - - -#define PTRACE0( varformat ) PTRACE( 0, varformat ) -#define PTRACE1( varformat ) PTRACE( 1, varformat ) -#define PTRACE2( varformat ) PTRACE( 2, varformat ) -#define PTRACE3( varformat ) PTRACE( 3, varformat ) -#define PTRACE4( varformat ) PTRACE( 4, varformat ) -#define PTRACE5( varformat ) PTRACE( 5, varformat ) -#define PTRACE6( varformat ) PTRACE( 6, varformat ) -#define PTRACE7( varformat ) PTRACE( 7, varformat ) - - -#ifdef __cplusplus - } -#endif - - -#endif /* TTDEBUG_H */ Index: xc/extras/FreeType/lib/ttengine.h diff -u xc/extras/FreeType/lib/ttengine.h:1.1.1.2 xc/extras/FreeType/lib/ttengine.h:removed --- xc/extras/FreeType/lib/ttengine.h:1.1.1.2 Sat Feb 12 23:55:41 2000 +++ xc/extras/FreeType/lib/ttengine.h Wed Mar 16 20:59:39 2005 @@ -1,115 +0,0 @@ -/******************************************************************* - * - * ttengine.h 1.1 - * - * Engine instance structure definition. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * New in 1.1 : - * - * - added the 'raster_lock' mutex field to synchronize - * scan-line conversion in thread-safe and re-entrant builds. - * - ******************************************************************/ - -#ifndef TTENGINE_H -#define TTENGINE_H - -#include "tttypes.h" -#include "ttconfig.h" -#include "freetype.h" -#include "ttmutex.h" - -#ifdef __cplusplus - extern "C" { -#endif - - /********************************************************************/ - /* */ - /* The freetype engine instance structure. */ - /* */ - /* This structure holds all the data that is necessary to run */ - /* one instance of the freetype engine. It is needed to get a */ - /* completely re-entrant version of the library. */ - /* */ - /* The goal is to move _all_ component-specific variables, either */ - /* static or global in the structure; the component initializers */ - /* and finalizers will all be called with the address of a valid */ - /* TEngine_Instance. */ - /* */ - /********************************************************************/ - - struct TEngine_Instance_ - { - TMutex lock; /* engine lock */ - - void* list_free_elements; - - void* objs_face_class; /* the face cache class */ - void* objs_instance_class; /* the instance cache class */ - void* objs_execution_class; /* the context cache class */ - void* objs_glyph_class; /* the glyph cache class */ - - void* objs_face_cache; /* these caches are used to track */ - void* objs_exec_cache; /* the current face and execution */ - /* context objects */ - - void* file_component; /* ttfile implementation dependent */ - - TMutex raster_lock; /* mutex for this engine's render pool */ - void* raster_component; /* ttraster implementation depedent */ - Byte raster_palette[5]; /* gray-levels palette for anti-aliasing */ - - void* extension_component; /* extensions dependent */ - -#if 0 - TT_Glyph_Loader_Callback glCallback; /* glyph loader callback, if any */ -#endif - }; - - /* NOTE : The raster's lock is only acquired by the Render_Glyph and */ - /* Render_Gray_Glyph functions, which always release it on exit */ - /* They do not lock the engine mutex. This means you shouldn't */ - /* be concerned about deadlocks between the two mutexes, as these */ - /* should never appear.. */ - - typedef struct TEngine_Instance_ TEngine_Instance; - typedef TEngine_Instance* PEngine_Instance; - - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* for re-entrant builds */ - -#define ENGINE_ARG TEngine_Instance* _engine -#define ENGINE_ARGS TEngine_Instance* _engine, - -#define ENGINE_VAR _engine -#define ENGINE_VARS _engine, - -#define ENGINE _engine - -#else /* for thread-safe builds */ - -#define ENGINE_ARG /* void */ -#define ENGINE_ARGS - -#define ENGINE_VAR -#define ENGINE_VARS - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - -#ifdef __cplusplus - } -#endif - -#endif /* TTENGINE_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttextend.c diff -u xc/extras/FreeType/lib/ttextend.c:1.1.1.2 xc/extras/FreeType/lib/ttextend.c:removed --- xc/extras/FreeType/lib/ttextend.c:1.1.1.2 Sat Feb 12 23:55:41 2000 +++ xc/extras/FreeType/lib/ttextend.c Wed Mar 16 20:59:39 2005 @@ -1,212 +0,0 @@ -/******************************************************************* - * - * ttextend.h 2.0 - * - * Extensions Interface - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * This is an updated version of the extension component, now - * located in the main library's source directory. It allows - * the dynamic registration/use of various face object extensions - * through a simple API. - * - ******************************************************************/ - -#include "ttextend.h" -#include "ttengine.h" -#include "ttmemory.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_extend - - - struct TExtension_Registry_ - { - Int num_extensions; - Long cur_offset; - TExtension_Class classes[TT_MAX_EXTENSIONS]; - }; - - typedef struct TExtension_Registry_ TExtension_Registry; - typedef TExtension_Registry* PExtension_Registry; - - - - /* Initialize the extension component */ - - LOCAL_FUNC - TT_Error TTExtend_Init( PEngine_Instance engine ) - { - TT_Error error; - PExtension_Registry exts; - - - if ( ALLOC( exts, sizeof ( TExtension_Registry ) ) ) - return error; - - exts->num_extensions = 0; - exts->cur_offset = 0; - engine->extension_component = (void*)exts; - - return TT_Err_Ok; - } - - - /* Finalize the extension component */ - - LOCAL_FUNC - TT_Error TTExtend_Done( PEngine_Instance engine ) - { - FREE( engine->extension_component ); - return TT_Err_Ok; - } - - - /* Register a new extension */ - - EXPORT_FUNC - TT_Error TT_Register_Extension( PEngine_Instance engine, - Long id, - Long size, - PExt_Constructor create, - PExt_Destructor destroy ) - { - PExtension_Registry exts; - PExtension_Class clazz; - Int p; - - - exts = (PExtension_Registry)engine->extension_component; - if ( !exts ) - return TT_Err_Ok; - - p = exts->num_extensions; - - if ( p >= TT_MAX_EXTENSIONS ) - return TT_Err_Too_Many_Extensions; - - clazz = exts->classes + p; - clazz->id = id; - clazz->size = size; - clazz->build = create; - clazz->destroy = destroy; - - clazz->offset = exts->cur_offset; - - exts->num_extensions++; - exts->cur_offset += ( size + ALIGNMENT-1 ) & -ALIGNMENT; - - return TT_Err_Ok; - } - - - /* Query an extension block by extension_ID */ - - EXPORT_FUNC - TT_Error TT_Extension_Get( PFace face, - Long extension_id, - void** extension_block ) - { - PExtension_Registry registry; - PExtension_Class clazz; - Int n; - - - if ( !face->extension ) - return TT_Err_Extensions_Unsupported; - - registry = (PExtension_Registry)face->engine->extension_component; - - for ( n = 0; n < face->n_extensions; n++ ) - { - clazz = registry->classes + n; - if ( clazz->id == extension_id ) - { - *extension_block = (PByte)face->extension + clazz->offset; - return TT_Err_Ok; - } - } - - return TT_Err_Invalid_Extension_Id; - } - - - /* Destroy all extensions within a face object. Called by the */ - /* face object destructor. */ - - LOCAL_FUNC - TT_Error Extension_Destroy( PFace face ) - { - PEngine_Instance engine = face->engine; - PExtension_Registry registry; - PExtension_Class clazz; - Int n; - PByte ext; - - - registry = (PExtension_Registry)engine->extension_component; - - for ( n = 0; n < face->n_extensions; n++ ) - { - clazz = registry->classes + n; - ext = (PByte)face->extension + clazz->offset; - - /* the destructor is optional */ - if ( clazz->destroy ) - clazz->destroy( (void*)ext, face ); - } - - /* destroy the face's extension block too */ - FREE( face->extension ); - face->n_extensions = 0; - - return TT_Err_Ok; - } - - - /* Create an extension within a face object. Called by the */ - /* face object constructor. */ - - LOCAL_FUNC - TT_Error Extension_Create( PFace face ) - { - PEngine_Instance engine = face->engine; - PExtension_Registry registry; - PExtension_Class clazz; - TT_Error error; - Int n; - PByte ext; - - - registry = (PExtension_Registry)engine->extension_component; - - face->n_extensions = registry->num_extensions; - if ( ALLOC( face->extension, registry->cur_offset ) ) - return error; - - for ( n = 0; n < face->n_extensions; n++ ) - { - clazz = registry->classes + n; - ext = (PByte)face->extension + clazz->offset; - error = clazz->build( (void*)ext, face ); - if ( error ) - goto Fail; - } - return TT_Err_Ok; - - Fail: - Extension_Destroy( face ); - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttextend.h diff -u xc/extras/FreeType/lib/ttextend.h:1.2 xc/extras/FreeType/lib/ttextend.h:removed --- xc/extras/FreeType/lib/ttextend.h:1.2 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttextend.h Wed Mar 16 20:59:39 2005 @@ -1,169 +0,0 @@ -/******************************************************************* - * - * ttextend.h 2.0 - * - * Extensions Interface. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * This is an updated version of the extension component, now - * located in the main library's source directory. It allows - * the dynamic registration/use of various face object extensions - * through a simple API. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttextend.h,v 1.2 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTEXTEND_H -#define TTEXTEND_H - -#include "ttconfig.h" -#include "tttypes.h" -#include "ttobjs.h" - - -#ifdef __cplusplus - extern "C" { -#endif - - /* The extensions don't need to be integrated at compile time into */ - /* the engine, only at link time. */ - - - /* When a new face object is created, the face constructor calls */ - /* the extension constructor with the following arguments: */ - /* */ - /* ext : typeless pointer to the face's extension block. */ - /* Its size is the one given at registration time */ - /* in the extension class's 'size' field. */ - /* */ - /* face : the parent face object. Note that the extension */ - /* constructor is called when the face object is */ - /* built. */ - - typedef TT_Error TExt_Constructor( void* ext, PFace face ); - - - /* When a face object is destroyed, the face destructor calls */ - /* the extension destructor with the following arguments. */ - /* */ - /* ext : typeless pointer to the face's extension block. */ - /* Its size is the one given at registration time */ - /* in the extension class's 'size' field. */ - /* */ - /* face : the parent face object. Note that the extension */ - /* destructor is called before the actual face object */ - /* is destroyed. */ - - typedef TT_Error TExt_Destructor ( void* ext, PFace face ); - - typedef TExt_Constructor* PExt_Constructor; - typedef TExt_Destructor* PExt_Destructor; - - - struct TExtension_Class_ - { - Long id; /* extension id */ - Long size; /* size in bytes of extension record */ - PExt_Constructor build; /* the extension's class constructor */ - PExt_Destructor destroy; /* the extension's class destructor */ - - Long offset; /* offset of ext. record in face obj */ - /* (set by the engine) */ - }; - - typedef struct TExtension_Class_ TExtension_Class; - typedef TExtension_Class* PExtension_Class; - - -#define Build_Extension_ID( a, b, c, d ) \ - ( ((ULong)(a) << 24) | \ - ((ULong)(b) << 16) | \ - ((ULong)(c) << 8 ) | \ - (ULong)(d) ) - - /* A note regarding extensions and the single-object compilation */ - /* mode : */ - /* */ - /* When the engine is compiled as a single object file, extensions */ - /* must remain linkable *after* compile time. In order to do this, */ - /* we need to export the functions that an extension may need. */ - /* Fortunately, we can limit ourselves to : */ - /* */ - /* o TT_Register_Extension (previously called Extension_Register) */ - /* which is to be called by each extension on within */ - /* it TT_Init_XXXX_Extension initializer. */ - /* */ - /* o File and frame access functions. Fortunately, these already */ - /* have their names prefixed by "TT_", so no change was needed */ - /* except replacing the LOCAL_DEF keyword with EXPORT_DEF */ - /* */ - /* o Memory access functions, i.e. TT_Alloc and TT_Free. Again, */ - /* the change is minimal */ - /* */ - /* o the table-lookup function : TT_LookUp_Table, formerly known */ - /* as Load_TrueType_Table in ttload.c. */ - /* */ - /* */ - /* Other than that, an extension should be able to #include all */ - /* relevant header files to get access to internal types, but */ - /* should not call engine internal functions.. */ - /* */ - /* If there is a need for a specific internal function call, let */ - /* me known to see if we need to export it by default.. */ - /* - DavidT */ - /* */ - - /* Register a new extension. Called by extension */ - /* service initializers. */ - EXPORT_DEF - TT_Error TT_Register_Extension( PEngine_Instance engine, - Long id, - Long size, - PExt_Constructor create, - PExt_Destructor destroy ); - - -#if defined(TT_CONFIG_OPTION_EXTEND_ENGINE) && !defined(FTXSBIT_H) - /* Initialize the extension component */ - LOCAL_DEF - TT_Error TTExtend_Init( PEngine_Instance engine ); - - /* Finalize the extension component */ - LOCAL_DEF - TT_Error TTExtend_Done( PEngine_Instance engine ); - - /* Create an extension within a face object. Called by the */ - /* face object constructor. */ - LOCAL_DEF - TT_Error Extension_Create( PFace face ); - - /* Destroy all extensions within a face object. Called by the */ - /* face object destructor. */ - LOCAL_DEF - TT_Error Extension_Destroy( PFace face ); -#endif - - /* Query an extension block by extension_ID. Called by extension */ - /* service routines. */ - EXPORT_DEF - TT_Error TT_Extension_Get( PFace face, - Long extension_id, - void** extension_block ); - -#ifdef __cplusplus - } -#endif - - -#endif /* TTEXTEND_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttfile.c diff -u xc/extras/FreeType/lib/ttfile.c:1.4 xc/extras/FreeType/lib/ttfile.c:removed --- xc/extras/FreeType/lib/ttfile.c:1.4 Fri Feb 18 07:18:43 2000 +++ xc/extras/FreeType/lib/ttfile.c Wed Mar 16 20:59:39 2005 @@ -1,1179 +0,0 @@ -/******************************************************************* - * - * ttfile.c (extended version) 2.1 - * - * File I/O Component (body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES: - * - * This implementation relies on the ANSI libc. You may wish to - * modify it to get rid of libc and go straight to the your - * platform's stream routines. - * - * The same source code can be used for thread-safe and re-entrant - * builds of the library. - * - * Changes between 2.0 and 2.1 : - * - * - it is now possible to close a stream's file handle explicitely - * through the new API "TT_Flush_Stream". This will simply close - * a stream's file handle (useful to save system resources when - * dealing with lots of opened fonts). Of course, the function - * "TT_Use_Stream" will automatically re-open a stream's handle if - * necessary. - * - * - added "TT_Stream_Size" to replace "TT_File_Size" which wasn't - * used anyway. This one returns the size of any stream, even - * flushed one (when the previous TT_File_Size could only return - * the size of the current working stream). This is used by the - * new "Load_TrueType_Any" function in the tables loader. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttfile.c,v 1.4 2000/02/18 12:18:43 tsi Exp $ */ - -#include "ttconfig.h" - -/* Removed for XFree86 Module support */ -#if 0 -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif -#endif - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttengine.h" -#include "ttmutex.h" -#include "ttmemory.h" -#include "ttfile.h" /* our prototypes */ - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_file - - -/* For now, we don't define additional error messages in the core library */ -/* to report open-on demand errors. Define these error as standard ones */ - -#define TT_Err_Could_Not_ReOpen_File TT_Err_Could_Not_Open_File -#define TT_Err_Could_Not_ReSeek_File TT_Err_Could_Not_Open_File - - /* This definition is mandatory for each file component! */ - EXPORT_FUNC - const TFileFrame TT_Null_FileFrame = { NULL, 0, 0 }; - -/* It has proven useful to do some bounds checks during development phase. */ -/* They should probably be undefined for speed reasons in a later release. */ - -#ifdef DEBUG_FILE -#define CHECK_FRAME( frame, n ) \ - do { \ - if ( frame.cursor + n > frame.address + frame.size ) \ - Panic( "Frame boundary error!\n" ); \ - } while ( 0 ) -#else -#define CHECK_FRAME( frame, n ) /* nothing */ -#endif - - /* Because a stream can be flushed, i.e. its file handle can be */ - /* closed to save system resources, we must keep the stream's file */ - /* pathname to be able to re-open it on demand when it is flushed */ - - struct TStream_Rec_; - typedef struct TStream_Rec_ TStream_Rec; - typedef TStream_Rec* PStream_Rec; - - struct TStream_Rec_ - { - Bool opened; /* is the stream handle opened ? */ - TT_Text* name; /* the file's pathname */ - Long position; /* current position within the file */ - - FILE* file; /* file handle */ - Long base; /* stream base in file */ - Long size; /* stream size in file */ - }; - - /* We support embedded TrueType files by allowing them to be */ - /* inside any file, at any location, hence the 'base' argument. */ - /* Note however that the current implementation does not allow you */ - /* to specify a 'base' index when opening a file. */ - /* (will come later) */ - /* I still don't know if this will turn out useful ?? - DavidT */ - -#define STREAM2REC( x ) ( (TStream_Rec*)HANDLE_Val( x ) ) - - static TT_Error Stream_Activate ( PStream_Rec stream ); - static TT_Error Stream_Deactivate( PStream_Rec stream ); - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /**** ****/ - /**** N O N R E E N T R A N T I M P L E M E N T A T I O N ****/ - /**** ****/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - - /* in non-rentrant builds, we allocate a single block where we'll */ - /* place all the frames smaller than FRAME_CACHE_SIZE, rather than */ - /* allocating a new block on each access. Bigger frames will be */ - /* malloced normally in the heap. */ - /* */ - /* See TT_Access_Frame() and TT_Forget_Frame() for details. */ - -#define FRAME_CACHE_SIZE 2048 - - /* The TFile_Component structure holds all the data that was */ - /* previously declared static or global in this component. */ - /* */ - /* It is accessible through the 'engine.file_component' */ - /* variable in re-entrant builds, or directly through the */ - /* static 'files' variable in other builds. */ - - struct TFile_Component_ - { - TMutex lock; /* used by the thread-safe build only */ - Byte* frame_cache; /* frame cache */ - PStream_Rec stream; /* current stream */ - TFileFrame frame; /* current frame */ - }; - - typedef struct TFile_Component_ TFile_Component; - - static TFile_Component files; - -#define CUR_Stream files.stream -#define CUR_Frame files.frame - -#define STREAM_VARS /* void */ -#define STREAM_VAR /* void */ - -/* The macro CUR_Stream denotes the current input stream. */ -/* Note that for the re-entrant version, the 'stream' name has been */ -/* chosen according to the macro STREAM_ARGS. */ - -/* The macro CUR_Frame denotes the current file frame. */ -/* Note that for the re-entrant version, the 'frame' name has been */ -/* chosen according to the macro FRAME_ARGS. */ - -/* The macro STREAM_VAR is used when calling public functions */ -/* that need an 'optional' stream argument. */ - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - TT_Error error; - - - MUTEX_Create( files.lock ); - files.stream = NULL; - ZERO_Frame( files.frame ); - - if ( ALLOC( files.frame_cache, FRAME_CACHE_SIZE ) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - FREE( files.frame_cache ); - MUTEX_Destroy( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream org_stream, - TT_Stream* stream ) - { - MUTEX_Lock( files.lock ); /* lock file mutex */ - - *stream = org_stream; /* copy the stream */ - files.stream = STREAM2REC(org_stream); /* set current stream */ - - Stream_Activate( files.stream ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream target stream - * - * Output : Error code. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - HANDLE_Set( *stream, NULL ); - MUTEX_Release( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( size <= FRAME_CACHE_SIZE ) - { - /* use the cache */ - CUR_Frame.address = files.frame_cache; - CUR_Frame.size = FRAME_CACHE_SIZE; - } - else - { - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - } - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if (error) - { - if ( size > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - CUR_Frame.address = NULL; - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * `size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function truncates `size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - Long readBytes, requested; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( size <= FRAME_CACHE_SIZE ) - { - /* use the cache */ - CUR_Frame.address = files.frame_cache; - CUR_Frame.size = FRAME_CACHE_SIZE; - } - else - { - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - } - - requested = size; - readBytes = CUR_Stream->size - TT_File_Pos( STREAM_VAR ); - if ( size > readBytes ) - size = readBytes; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if (error) - { - if ( requested > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - CUR_Frame.address = NULL; - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - if ( CUR_Frame.size > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - - ZERO_Frame( CUR_Frame ); - - return TT_Err_Ok; - } - - -#else /* TT_CONFIG_OPTION_THREAD_SAFE */ - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /******** ********/ - /******** R E E N T R A N T I M P L E M E N T A T I O N ********/ - /******** ********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/* a simple macro to access the file component's data */ -#define files ( *((TFile_Component*)engine.file_component) ) - -#define CUR_Stream STREAM2REC( stream ) /* re-entrant macros */ -#define CUR_Frame (*frame) - -#define STREAM_VARS stream, -#define STREAM_VAR stream - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Duplicates a stream for a new usage. - * - * Input : input_stream source stream to duplicate - * copy address of target duplicate stream - * - * Output : error code. - * The target stream is set to NULL in case of failure. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream input_stream, - TT_Stream* copy ) - { - PStream_Rec rec = STREAM2REC( input_stream ); - - return TT_Open_Stream( rec->name, copy ); - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream target stream - * - * Output : - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - return TT_Close_Stream( stream ); - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - FREE( CUR_Frame.address ); - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * `size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function truncates `size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - Long readBytes; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - - readBytes = CUR_Stream->size - TT_File_Pos( STREAM_VAR ); - if ( size > readBytes ) - size = readBytes; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - FREE( CUR_Frame.address ); - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - FREE( CUR_Frame.address ); - ZERO_Frame( CUR_Frame ); - - return TT_Err_Ok; - } - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /*********** ***********/ - /*********** C O M M O N I M P L E M E N T A T I O N ***********/ - /*********** ***********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/******************************************************************* - * - * Function : Stream_Activate - * - * Description : activates a stream, this will either: - * - open a new file handle if the stream is closed - * - move the stream to the head of the linked list - * - * Input : stream the stream to activate - * - * Output : error condition. - * - * Note : This function is also called with fresh new streams - * created by TT_Open_Stream(). They have their 'size' - * field set to -1. - * - ******************************************************************/ - - static TT_Error Stream_Activate( PStream_Rec stream ) - { - if ( !stream->opened ) - { - if ( (stream->file = fopen( (TT_Text*)stream->name, "rb" )) == 0 ) - return TT_Err_Could_Not_ReOpen_File; - - stream->opened = TRUE; - - /* A newly created stream has a size field of -1 */ - if ( stream->size < 0 ) - { - fseek( stream->file, 0, SEEK_END ); - stream->size = ftell( stream->file ); - fseek( stream->file, 0, SEEK_SET ); - } - - /* Reset cursor in file */ - if ( stream->position ) - { - if ( fseek( stream->file, stream->position, SEEK_SET ) != 0 ) - { - /* error during seek */ - fclose( stream->file ); - stream->opened = FALSE; - return TT_Err_Could_Not_ReSeek_File; - } - } - } - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Stream_DeActivate - * - * Description : deactivates a stream, this will : - * - close its file handle if it was opened - * - remove it from the opened list if necessary - * - * Input : stream the stream to deactivate - * - * Output : Error condition - * - * Note : the function is called whenever a stream is deleted - * (_not_ when a stream handle's is closed due to an - * activation). However, the stream record isn't - * destroyed by it.. - * - ******************************************************************/ - - static TT_Error Stream_Deactivate( PStream_Rec stream ) - { - if ( stream->opened ) - { - /* Save its current position within the file */ - stream->position = ftell( stream->file ); - fclose( stream->file ); - stream->file = 0; - stream->opened = FALSE; - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Stream_Size - * - * Description : Returns the length of a given stream, even if it - * is flushed. - * - * Input : stream the stream - * - * Output : Length of stream in bytes. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Stream_Size( TT_Stream stream ) - { - PStream_Rec rec = STREAM2REC( stream ); - - - if ( rec ) - return rec->size; - else - return 0; /* invalid stream - return 0 */ - } - - -/******************************************************************* - * - * Function : TT_Open_Stream - * - * Description : Opens the font file and saves the total file size. - * - * Input : error address of stream's error variable - * (re-entrant build only) - * filepathname pathname of the file to open - * stream address of target TT_Stream structure - * - * Output : SUCCESS on sucess, FAILURE on error. - * The target stream is set to -1 in case of failure. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Open_Stream( const TT_Text* filepathname, - TT_Stream* stream ) - { - Int len; - TT_Error error; - PStream_Rec stream_rec; - - if ( ALLOC( *stream, sizeof ( TStream_Rec ) ) ) - return error; - - stream_rec = STREAM2REC( *stream ); - - stream_rec->file = NULL; - stream_rec->size = -1L; - stream_rec->base = 0; - stream_rec->opened = FALSE; - stream_rec->position = 0; - - len = strlen( filepathname ) + 1; - if ( ALLOC( stream_rec->name, len ) ) - goto Fail; - - strncpy( stream_rec->name, filepathname, len ); - - error = Stream_Activate( stream_rec ); - if ( error ) - goto Fail_Activate; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - CUR_Stream = stream_rec; -#endif - - return TT_Err_Ok; - - Fail_Activate: - FREE( stream_rec->name ); - Fail: - FREE( stream_rec ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Close_Stream - * - * Description : Closes a stream. - * - * Input : stream address of target TT_Stream structure - * - * Output : SUCCESS (always). - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Close_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - Stream_Deactivate( rec ); - FREE( rec->name ); - FREE( rec ); - - HANDLE_Set( *stream, NULL ); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Flush_Stream - * - * Description : Flushes a stream, i.e., closes its file handle. - * - * Input : stream address of target TT_Stream structure - * - * Output : Error code - * - * NOTE : Never flush the current opened stream. This means that - * you should _never_ call this function between a - * TT_Use_Stream() and a TT_Done_Stream()! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Flush_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - if ( rec ) - { - Stream_Deactivate( rec ); - return TT_Err_Ok; - } - else - return TT_Err_Invalid_Argument; - } - - -/******************************************************************* - * - * Function : TT_Seek_File - * - * Description : Seeks the file cursor to a different position. - * - * Input : position new position in file - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Seek_File( STREAM_ARGS Long position ) - { - position += CUR_Stream->base; - - if ( fseek( CUR_Stream->file, position, SEEK_SET ) ) - return TT_Err_Invalid_File_Offset; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Skip_File - * - * Description : Skips forward the file cursor. - * - * Input : distance number of bytes to skip - * - * Output : see TT_Seek_File() - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Skip_File( STREAM_ARGS Long distance ) - { - return TT_Seek_File( STREAM_VARS ftell( CUR_Stream->file ) - - CUR_Stream->base + distance ); - } - - -/******************************************************************* - * - * Function : TT_Read_File - * - * Description : Reads a chunk of the file and copies it to memory. - * - * Input : buffer target buffer - * count length in bytes to read - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_File( STREAM_ARGS void* buffer, Long count ) - { - if ( fread( buffer, 1, count, CUR_Stream->file ) != (ULong)count ) - return TT_Err_Invalid_File_Read; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Read_At_File - * - * Description : Reads file at a specified position. - * - * Input : position position to seek to before read - * buffer target buffer - * count number of bytes to read - * - * Output : SUCCESS on success. FAILURE if error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_At_File( STREAM_ARGS Long position, - void* buffer, - Long count ) - { - TT_Error error; - - - if ( (error = TT_Seek_File( STREAM_VARS position )) != TT_Err_Ok || - (error = TT_Read_File( STREAM_VARS buffer, count )) != TT_Err_Ok ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_File_Pos - * - * Description : Returns current file seek pointer. - * - * Input : none - * - * Output : Current file position. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_File_Pos( STREAM_ARG ) - { - return ftell( CUR_Stream->file ) - CUR_Stream->base; - } - - -/******************************************************************* - * - * Function : GET_Byte - * - * Description : Extracts a byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted Byte. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - Byte TT_Get_Byte( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Byte)(*CUR_Frame.cursor++); - } -#endif - - -/******************************************************************* - * - * Function : GET_Char - * - * Description : Extracts a signed byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted char. - * - ******************************************************************/ - EXPORT_FUNC - Char TT_Get_Char( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Char)(*CUR_Frame.cursor++); - } - - -/******************************************************************* - * - * Function : GET_Short - * - * Description : Extracts a short from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted short. - * - ******************************************************************/ - - EXPORT_FUNC - Short TT_Get_Short( FRAME_ARG ) - { - Short getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = (Short)((CUR_Frame.cursor[0] << 8) | - CUR_Frame.cursor[1]); - - CUR_Frame.cursor += 2; - - return getshort; - } - - -/******************************************************************* - * - * Function : GET_UShort - * - * Description : Extracts an unsigned short from the frame. - * - * Input : None or current frame - * - * Output : Extracted ushort. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - UShort TT_Get_UShort( FRAME_ARG ) - { - UShort getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = (UShort)((CUR_Frame.cursor[0] << 8) | - CUR_Frame.cursor[1]); - - CUR_Frame.cursor += 2; - - return getshort; - } -#endif - - -/******************************************************************* - * - * Function : GET_Long - * - * Description : Extracts a long from the frame. - * - * Input : None or current frame - * - * Output : Extracted long. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Get_Long( FRAME_ARG ) - { - Long getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ((Long)CUR_Frame.cursor[0] << 24) | - ((Long)CUR_Frame.cursor[1] << 16) | - ((Long)CUR_Frame.cursor[2] << 8 ) | - (Long)CUR_Frame.cursor[3]; - - CUR_Frame.cursor += 4; - - return getlong; - } - - -/******************************************************************* - * - * Function : GET_ULong - * - * Description : Extracts an unsigned long from the frame. - * - * Input : None or current frame - * - * Output : Extracted ulong. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - ULong TT_Get_ULong( FRAME_ARG ) - { - ULong getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ( ((ULong)CUR_Frame.cursor[0] << 24) | - ((ULong)CUR_Frame.cursor[1] << 16) | - ((ULong)CUR_Frame.cursor[2] << 8 ) | - (ULong)CUR_Frame.cursor[3] ); - - CUR_Frame.cursor += 4; - - return getlong; - } -#endif - - -/* END */ Index: xc/extras/FreeType/lib/ttfile.h diff -u xc/extras/FreeType/lib/ttfile.h:1.2 xc/extras/FreeType/lib/ttfile.h:removed --- xc/extras/FreeType/lib/ttfile.h:1.2 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttfile.h Wed Mar 16 20:59:39 2005 @@ -1,276 +0,0 @@ -/******************************************************************* - * - * ttfile.h 1.3 - * - * File I/O Component (specification). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Changes between 1.3 and 1.2: - * - * - all functions report error values now - * - * - the stream semantics have also changed - * - * Changes between 1.2 and 1.1: - * - * - added macros to support re-entrant builds - * - * - added the TT_Duplicate_File function to duplicate streams - * (re-entrant builds only) - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttfile.h,v 1.2 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTFILE_H -#define TTFILE_H - -#include "ttconfig.h" -#include "freetype.h" -#include "ttengine.h" -#include "ttdebug.h" - -#ifdef __cplusplus - extern "C" { -#endif - -#if !defined(FTXSBIT_H) - - /* Initialize file component */ - LOCAL_DEF - TT_Error TTFile_Init( PEngine_Instance engine ); - - /* Done with file component */ - LOCAL_DEF - TT_Error TTFile_Done( PEngine_Instance engine ); - - - /**********************************************************************/ - /* */ - /* Stream functions. */ - /* */ - /**********************************************************************/ - - /* Open a file and return a stream handle for it. */ - /* Should only be used for a new face object's main stream. */ - - LOCAL_DEF - TT_Error TT_Open_Stream( const TT_Text* name, - TT_Stream* stream ); - - - /* Closes, then discards, a stream when it's no longer needed. */ - /* Should only be used for a stream opend with TT_Open_Stream(). */ - - LOCAL_DEF - TT_Error TT_Close_Stream( TT_Stream* stream ); - -#endif /* !FTXSBIT */ - - - /* Informs the component that we're going to use the file */ - /* opened in 'org_stream', and report errors to the 'error' */ - /* variable. */ - - /* in non re-entrant builds, 'org_stream' is simply copied */ - /* to 'stream'. Otherwise, the latter is a duplicate handle */ - /* for the file opened with 'org_stream' */ - - EXPORT_DEF - TT_Error TT_Use_Stream( TT_Stream org_stream, - TT_Stream* stream ); - - /* Informs the component that we don't need to perform file */ - /* operations on the stream 'stream' anymore. This must be */ - /* used with streams "opened" with TT_Use_Stream() only! */ - - /* in re-entrant builds, this will really discard the stream */ - - EXPORT_DEF - TT_Error TT_Done_Stream( TT_Stream* stream ); - - /* Closes the stream's file handle to release system resources */ - /* The function TT_Use_Stream automatically re-activates a */ - /* flushed stream when it uses one */ - - EXPORT_DEF - TT_Error TT_Flush_Stream( TT_Stream* stream ); - -/* The macros STREAM_ARGS and STREAM_ARG let us build a thread-safe */ -/* or re-entrant implementation depending on a single configuration */ -/*define. */ - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE - -#define STREAM_ARGS TT_Stream stream, -#define STREAM_ARG TT_Stream stream - -#else - -#define STREAM_ARGS /* void */ -#define STREAM_ARG void - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /****************************************************************/ - /* */ - /* File Functions. */ - /* */ - /* The following functions perform file operations on the */ - /* currently 'used' stream. In thread-safe builds, only one */ - /* stream can be used at a time. Synchronisation is performed */ - /* through the Use_Stream()/Done_Stream() functions. */ - /* */ - /****************************************************************/ - - /* Read 'count' bytes from file into 'buffer' */ - - EXPORT_DEF - TT_Error TT_Read_File( STREAM_ARGS void* buffer, - Long count ); - - - /* Seek file cursor to a given position */ - - EXPORT_DEF - TT_Error TT_Seek_File( STREAM_ARGS Long position ); - - - /* Skip the next 'distance' bytes in file */ - - EXPORT_DEF - TT_Error TT_Skip_File( STREAM_ARGS Long distance ); - - - /* Read the 'count' bytes at 'position' into 'buffer' */ - - EXPORT_DEF - TT_Error TT_Read_At_File( STREAM_ARGS Long position, - void* buffer, - Long count ); - - /* Return current file position */ - - EXPORT_DEF - Long TT_File_Pos( STREAM_ARG ); - - /* Return length of a given stream, even if it is flushed */ - - EXPORT_DEF - Long TT_Stream_Size( TT_Stream stream ); - - - /********************************************************************/ - /* */ - /* Frame operations. */ - /* */ - /* For a comprehensive explanation of frames, please refer to the */ - /* documentation files. */ - /* */ - /********************************************************************/ - - /* Frame type declaration.*/ - - struct TFileFrame_ - { - Byte* address; /* frame buffer */ - Byte* cursor; /* current cursor position in frame */ - Long size; /* frame size */ - }; - - typedef struct TFileFrame_ TFileFrame; - - EXPORT_DEF - const TFileFrame TT_Null_FileFrame; - - -/* The macro ZERO_Frame is used to define and init a frame. */ -/* It is important to have a default frame of { NULL, NULL, 0 } */ -/* before a call to TT_Access_Frame(). Otherwise, the call will */ -/* fail with a TT_Err_Nested_Frame_Accesses error. */ - -#define ZERO_Frame( frame ) \ - { \ - (frame).address = NULL; \ - (frame).cursor = NULL; \ - (frame).size = 0; \ - } - - -/* The macros FRAME_ARGS and FRAME_ARG let us build a thread-safe */ -/* or re-entrant implementation depending on a single configuration */ -/* define */ - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE - -#define FRAME_ARGS TFileFrame* frame, -#define FRAME_ARG TFileFrame* frame - -#else - -#define FRAME_ARGS /* void */ -#define FRAME_ARG void - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /* Access the next 'size' bytes from current position. */ - /* Fails if all bytes cannot be read/accessed. */ - - EXPORT_DEF - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); - - - /* Access the bytes located in the next 'size' bytes of the file. */ - /* Doesn't fail if less than 'size' bytes are accessible (like */ - /* at the end of the file). */ - - EXPORT_DEF - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ); - - /* Forget frame */ - - EXPORT_DEF - TT_Error TT_Forget_Frame( FRAME_ARG ); - - - /* primitive routines for data accessing */ - - EXPORT_DEF - Char TT_Get_Char ( FRAME_ARG ); - EXPORT_DEF - Short TT_Get_Short( FRAME_ARG ); - EXPORT_DEF - Long TT_Get_Long ( FRAME_ARG ); - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE - -#define TT_Get_Byte( frame ) ( (Byte )TT_Get_Char ( frame ) ) -#define TT_Get_UShort( frame ) ( (UShort)TT_Get_Short( frame ) ) -#define TT_Get_ULong( frame ) ( (ULong )TT_Get_Long ( frame ) ) - -#else - -#define TT_Get_Byte() ( (Byte )TT_Get_Char () ) -#define TT_Get_UShort() ( (UShort)TT_Get_Short() ) -#define TT_Get_ULong() ( (ULong )TT_Get_Long () ) - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - -#ifdef __cplusplus - } -#endif - -#endif /* TTFILE_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttgload.c diff -u xc/extras/FreeType/lib/ttgload.c:1.1.1.3 xc/extras/FreeType/lib/ttgload.c:removed --- xc/extras/FreeType/lib/ttgload.c:1.1.1.3 Sat Feb 12 23:55:43 2000 +++ xc/extras/FreeType/lib/ttgload.c Wed Mar 16 20:59:39 2005 @@ -1,1351 +0,0 @@ -/******************************************************************* - * - * ttgload.c 1.0 - * - * TrueType Glyph Loader. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "tttypes.h" -#include "ttdebug.h" -#include "ttcalc.h" -#include "ttfile.h" - -#include "tttables.h" -#include "ttobjs.h" -#include "ttgload.h" - -#include "ttmemory.h" -#include "tttags.h" -#include "ttload.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_gload - - -/* composite font flags */ - -#define ARGS_ARE_WORDS 0x001 -#define ARGS_ARE_XY_VALUES 0x002 -#define ROUND_XY_TO_GRID 0x004 -#define WE_HAVE_A_SCALE 0x008 -/* reserved 0x010 */ -#define MORE_COMPONENTS 0x020 -#define WE_HAVE_AN_XY_SCALE 0x040 -#define WE_HAVE_A_2X2 0x080 -#define WE_HAVE_INSTR 0x100 -#define USE_MY_METRICS 0x200 - - -/********************************************************/ -/* Return horizontal or vertical metrics in font units */ -/* for a given glyph. The metrics are the left side */ -/* bearing (resp. top side bearing) and advance width */ -/* (resp. advance height). */ -/* */ -/* This function will much probably move to another */ -/* component in the short future, but I haven't decided */ -/* which yet... */ - - LOCAL_FUNC - void TT_Get_Metrics( TT_Horizontal_Header* header, - UShort index, - Short* bearing, - UShort* advance ) - { - PLongMetrics longs_m; - - UShort k = header->number_Of_HMetrics; - - - if ( index < k ) - { - longs_m = (PLongMetrics)header->long_metrics + index; - *bearing = longs_m->bearing; - *advance = longs_m->advance; - } - else - { - *bearing = ((PShortMetrics)header->short_metrics)[index - k]; - *advance = ((PLongMetrics)header->long_metrics)[k - 1].advance; - } - } - - -/********************************************************/ -/* Return horizontal metrics in font units for a given */ -/* glyph. If `check' is true, take care of mono-spaced */ -/* fonts by returning the advance width max. */ - - static void Get_HMetrics( PFace face, - UShort index, - Bool check, - Short* lsb, - UShort* aw ) - { - TT_Get_Metrics( &face->horizontalHeader, index, lsb, aw ); - - if ( check && face->postscript.isFixedPitch ) - *aw = face->horizontalHeader.advance_Width_Max; - } - - -/********************************************************/ -/* Return advance width table for a given pixel size */ -/* if it is found in the font's `hdmx' table (if any). */ - - static PByte Get_Advance_Widths( PFace face, - UShort ppem ) - { - UShort n; - - - for ( n = 0; n < face->hdmx.num_records; n++ ) - if ( face->hdmx.records[n].ppem == ppem ) - return face->hdmx.records[n].widths; - - return NULL; - } - - -/********************************************************/ -/* Copy current glyph into original one. */ - -#define cur_to_org( n, zone ) \ - MEM_Copy( (zone)->org, (zone)->cur, (n) * sizeof ( TT_Vector ) ) - -/********************************************************/ -/* copy original glyph into current one */ - -#define org_to_cur( n, zone ) \ - MEM_Copy( (zone)->cur, (zone)->org, (n) * sizeof ( TT_Vector ) ) - -/********************************************************/ -/* translate an array of coordinates */ - - static void translate_array( UShort n, - TT_Vector* coords, - TT_Pos delta_x, - TT_Pos delta_y ) - { - UShort k; - - - if ( delta_x ) - for ( k = 0; k < n; k++ ) - coords[k].x += delta_x; - - if ( delta_y ) - for ( k = 0; k < n; k++ ) - coords[k].y += delta_y; - } - - -/********************************************************/ -/* mount one zone on top of another */ - - static void mount_zone( PGlyph_Zone source, - PGlyph_Zone target ) - { - UShort np; - Short nc; - - np = source->n_points; - nc = source->n_contours; - - target->org = source->org + np; - target->cur = source->cur + np; - target->touch = source->touch + np; - - target->contours = source->contours + nc; - - target->n_points = 0; - target->n_contours = 0; - } - - -/******************************************************************* - * - * Function: Load_Simple_Glyph - * - ******************************************************************/ - - static TT_Error Load_Simple_Glyph( PExecution_Context exec, - TT_Stream input, - Short n_contours, - Short left_contours, - UShort left_points, - UShort load_flags, - PSubglyph_Record subg ) - { - DEFINE_LOAD_LOCALS( input ); - - PGlyph_Zone pts; - Short k; - UShort j; - UShort n_points, n_ins; - PFace face; - Byte* flag; - TT_Vector* vec; - TT_F26Dot6 x, y; - - - face = exec->face; - - /* simple check */ - if ( n_contours > left_contours ) - { - PTRACE0(( "ERROR: Glyph index %ld has %d contours > left %d\n", - subg->index, n_contours, left_contours )); - return TT_Err_Too_Many_Contours; - } - - - /* preparing the execution context */ - mount_zone( &subg->zone, &exec->pts ); - - /* reading the contours endpoints */ - if ( ACCESS_Frame( (n_contours + 1) * 2L ) ) - return error; - - PTRACE4(( " Contour endpoints:" )); - - for ( k = 0; k < n_contours; k++ ) - { - exec->pts.contours[k] = GET_UShort(); - PTRACE4(( " %d", exec->pts.contours[k] )); - } - PTRACE4(( "\n" )); - - if ( n_contours > 0 ) - n_points = exec->pts.contours[n_contours - 1] + 1; - else - n_points = 0; - - n_ins = GET_UShort(); - - FORGET_Frame(); - - if ( n_points > left_points ) - { - PTRACE0(( "ERROR: Too many points in glyph %ld\n", subg->index )); - return TT_Err_Too_Many_Points; - } - - /* loading instructions */ - - PTRACE4(( " Instructions size: %d\n", n_ins )); - - if ( n_ins > face->maxProfile.maxSizeOfInstructions ) - { - PTRACE0(( "ERROR: Too many instructions!\n" )); - return TT_Err_Too_Many_Ins; - } - - if ( FILE_Read( exec->glyphIns, n_ins ) ) - return error; - - if ( (error = Set_CodeRange( exec, - TT_CodeRange_Glyph, - exec->glyphIns, - n_ins )) != TT_Err_Ok ) - return error; - - - /* read the flags */ - - if ( CHECK_ACCESS_Frame( n_points * 5L ) ) - return error; - - j = 0; - flag = exec->pts.touch; - - while ( j < n_points ) - { - Byte c, cnt; - - flag[j] = c = GET_Byte(); - j++; - - if ( c & 8 ) - { - cnt = GET_Byte(); - while( cnt > 0 ) - { - flag[j++] = c; - cnt--; - } - } - } - - /* read the X */ - - x = 0; - vec = exec->pts.org; - - for ( j = 0; j < n_points; j++ ) - { - if ( flag[j] & 2 ) - { - if ( flag[j] & 16 ) - x += GET_Byte(); - else - x -= GET_Byte(); - } - else - { - if ( (flag[j] & 16) == 0 ) - x += GET_Short(); - } - - vec[j].x = x; - } - - - /* read the Y */ - - y = 0; - - for ( j = 0; j < n_points; j++ ) - { - if ( flag[j] & 4 ) - { - if ( flag[j] & 32 ) - y += GET_Byte(); - else - y -= GET_Byte(); - } - else - { - if ( (flag[j] & 32) == 0 ) - y += GET_Short(); - } - - vec[j].y = y; - } - - FORGET_Frame(); - - /* Now add the two shadow points at n and n + 1. */ - /* We need the left side bearing and advance width. */ - - /* pp1 = xMin - lsb */ - vec[n_points].x = subg->metrics.bbox.xMin - subg->metrics.horiBearingX; - vec[n_points].y = 0; - - /* pp2 = pp1 + aw */ - vec[n_points+1].x = vec[n_points].x + subg->metrics.horiAdvance; - vec[n_points+1].y = 0; - - /* clear the touch flags */ - - for ( j = 0; j < n_points; j++ ) - exec->pts.touch[j] &= TT_Flag_On_Curve; - - exec->pts.touch[n_points ] = 0; - exec->pts.touch[n_points + 1] = 0; - - /* Note that we return two more points that are not */ - /* part of the glyph outline. */ - - n_points += 2; - - /* now eventually scale and hint the glyph */ - - pts = &exec->pts; - pts->n_points = n_points; - pts->n_contours = n_contours; - - if ( (load_flags & TTLOAD_SCALE_GLYPH) == 0 ) - { - /* no scaling, just copy the orig arrays into the cur ones */ - org_to_cur( n_points, pts ); - } - else - { - /* first scale the glyph points */ - - for ( j = 0; j < n_points; j++ ) - { - pts->org[j].x = Scale_X( &exec->metrics, pts->org[j].x ); - pts->org[j].y = Scale_Y( &exec->metrics, pts->org[j].y ); - } - - /* if hinting, round pp1, and shift the glyph accordingly */ - if ( subg->is_hinted ) - { - x = pts->org[n_points - 2].x; - x = ((x+32) & -64) - x; - translate_array( n_points, pts->org, x, 0 ); - - org_to_cur( n_points, pts ); - - pts->cur[n_points - 1].x = (pts->cur[n_points - 1].x + 32) & -64; - - /* now consider hinting */ - if ( n_ins > 0 ) - { - exec->is_composite = FALSE; - exec->pedantic_hinting = load_flags & TTLOAD_PEDANTIC; - - error = Context_Run( exec, FALSE ); - if (error && exec->pedantic_hinting) - return error; - } - } - else - org_to_cur( n_points, pts ); - } - - /* save glyph phantom points */ - if (!subg->preserve_pps) - { - subg->pp1 = pts->cur[n_points - 2]; - subg->pp2 = pts->cur[n_points - 1]; - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_Composite_End - * - ******************************************************************/ - - static - TT_Error Load_Composite_End( UShort n_points, - Short n_contours, - PExecution_Context exec, - PSubglyph_Record subg, - UShort load_flags, - TT_Stream input ) - { - DEFINE_LOAD_LOCALS( input ); - - UShort k, n_ins; - PGlyph_Zone pts; - - - if ( subg->is_hinted && - subg->element_flag & WE_HAVE_INSTR ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - n_ins = GET_UShort(); /* read size of instructions */ - FORGET_Frame(); - - PTRACE4(( " Instructions size: %d\n", n_ins )); - - if ( n_ins > exec->face->maxProfile.maxSizeOfInstructions ) - { - PTRACE0(( "ERROR: Too many instructions in composite glyph %ld\n", - subg->index )); - return TT_Err_Too_Many_Ins; - } - - if ( FILE_Read( exec->glyphIns, n_ins ) ) - return error; - - error = Set_CodeRange( exec, - TT_CodeRange_Glyph, - exec->glyphIns, - n_ins ); - - if ( error ) - return error; - } - else - n_ins = 0; - - - /* prepare the execution context */ - n_points += 2; - exec->pts = subg->zone; - pts = &exec->pts; - - pts->n_points = n_points; - pts->n_contours = n_contours; - - /* add phantom points */ - pts->cur[n_points - 2] = subg->pp1; - pts->cur[n_points - 1] = subg->pp2; - - pts->touch[n_points - 1] = 0; - pts->touch[n_points - 2] = 0; - - /* if hinting, round the phantom points */ - if ( subg->is_hinted ) - { - pts->cur[n_points - 2].x = (subg->pp1.x + 32) & -64; - pts->cur[n_points - 1].x = (subg->pp2.x + 32) & -64; - } - - for ( k = 0; k < n_points; k++ ) - pts->touch[k] &= TT_Flag_On_Curve; - - cur_to_org( n_points, pts ); - - /* now consider hinting */ - if ( subg->is_hinted && n_ins > 0 ) - { - exec->is_composite = TRUE; - exec->pedantic_hinting = load_flags & TTLOAD_PEDANTIC; - - error = Context_Run( exec, FALSE ); - if (error && exec->pedantic_hinting) - return error; - } - - /* save glyph origin and advance points */ - subg->pp1 = pts->cur[n_points - 2]; - subg->pp2 = pts->cur[n_points - 1]; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Init_Glyph_Component - * - ******************************************************************/ - - static - void Init_Glyph_Component( PSubglyph_Record element, - PSubglyph_Record original, - PExecution_Context exec ) - { - element->index = -1; - element->is_scaled = FALSE; - element->is_hinted = FALSE; - - if ( original ) - mount_zone( &original->zone, &element->zone ); - else - element->zone = exec->pts; - - element->zone.n_contours = 0; - element->zone.n_points = 0; - - element->arg1 = 0; - element->arg2 = 0; - - element->element_flag = 0; - element->preserve_pps = FALSE; - - element->transform.xx = 1L << 16; - element->transform.xy = 0; - element->transform.yx = 0; - element->transform.yy = 1L << 16; - - element->transform.ox = 0; - element->transform.oy = 0; - - element->metrics.horiBearingX = 0; - element->metrics.horiAdvance = 0; - } - - - - LOCAL_FUNC - TT_Error Load_TrueType_Glyph( PInstance instance, - PGlyph glyph, - UShort glyph_index, - UShort load_flags ) - { - enum TPhases_ - { - Load_Exit, - Load_Glyph, - Load_Header, - Load_Simple, - Load_Composite, - Load_End - }; - - typedef enum TPhases_ TPhases; - - DEFINE_ALL_LOCALS; - - PFace face; - - UShort num_points; - Short num_contours; - UShort left_points; - Short left_contours; - UShort num_elem_points; - - Long table; - UShort load_top; - Long k, l; - UShort new_flags; - Long index; - UShort u, v; - - Long glyph_offset, offset; - - TT_F26Dot6 x, y, nx, ny; - - Fixed xx, xy, yx, yy; - - PExecution_Context exec; - - PSubglyph_Record subglyph, subglyph2; - - TGlyph_Zone base_pts; - - TPhases phase; - PByte widths; - -/* TT_Glyph_Loader_Callback cacheCb; */ -/* TT_Outline cached_outline; */ - - - /* first of all, check arguments */ - if ( !glyph ) - return TT_Err_Invalid_Glyph_Handle; - - face = glyph->face; - if ( !face ) - return TT_Err_Invalid_Glyph_Handle; - - if ( glyph_index >= face->numGlyphs ) - return TT_Err_Invalid_Glyph_Index; - - if ( instance && (load_flags & TTLOAD_SCALE_GLYPH) == 0 ) - { - instance = 0; - load_flags &= ~( TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH ); - } - - table = TT_LookUp_Table( face, TTAG_glyf ); - if ( table < 0 ) - { - PTRACE0(( "ERROR: There is no glyph table in this font file!\n" )); - return TT_Err_Glyf_Table_Missing; - } - - glyph_offset = face->dirTables[table].Offset; - - /* query new execution context */ - - if ( instance && instance->debug ) - exec = instance->context; - else - exec = New_Context( face ); - - if ( !exec ) - return TT_Err_Could_Not_Find_Context; - - Context_Load( exec, face, instance ); - - if ( instance ) - { - if ( instance->GS.instruct_control & 2 ) - exec->GS = Default_GraphicsState; - else - exec->GS = instance->GS; - /* load default graphics state */ - - glyph->outline.high_precision = ( instance->metrics.y_ppem < 24 ); - } - - /* save its critical pointers, as they'll be modified during load */ - base_pts = exec->pts; - - /* init variables */ - left_points = face->maxPoints; - left_contours = face->maxContours; - - num_points = 0; - num_contours = 0; - - load_top = 0; - subglyph = exec->loadStack; - - Init_Glyph_Component( subglyph, NULL, exec ); - - subglyph->index = glyph_index; - subglyph->is_hinted = load_flags & TTLOAD_HINT_GLYPH; - - /* when the cvt program has disabled hinting, the argument */ - /* is ignored. */ - if ( instance && instance->GS.instruct_control & 1 ) - subglyph->is_hinted = FALSE; - - - /* now access stream */ - - if ( USE_Stream( face->stream, stream ) ) - goto Fin; - - /* Main loading loop */ - - phase = Load_Glyph; - index = 0; - - while ( phase != Load_Exit ) - { - subglyph = exec->loadStack + load_top; - - switch ( phase ) - { - /************************************************************/ - /* */ - /* Load_Glyph state */ - /* */ - /* reading a glyph's generic header to determine */ - /* whether it's simple or composite */ - /* */ - /* exit states: Load_Header and Load_End */ - - case Load_Glyph: - /* check glyph index and table */ - - index = subglyph->index; - if ( index < 0 || index >= face->numGlyphs ) - { - error = TT_Err_Invalid_Glyph_Index; - goto Fail; - } - - /* get horizontal metrics */ - - { - Short left_bearing; - UShort advance_width; - - - Get_HMetrics( face, (UShort)index, - !(load_flags & TTLOAD_IGNORE_GLOBAL_ADVANCE_WIDTH), - &left_bearing, - &advance_width ); - - subglyph->metrics.horiBearingX = left_bearing; - subglyph->metrics.horiAdvance = advance_width; - } - - phase = Load_Header; - - - /* The cache callback isn't part of the FreeType release yet */ - /* It is discarded for the moment.. */ - /* */ -#if 0 - if ( instance ) - { - /* is the glyph in an outline cache ? */ - cacheCb = instance->owner->engine->glCallback; - if ( cacheCb && 0 ) /* disabled */ - { - /* we have a callback */ - error = cacheCb( instance->generic, - index, &cached_outline, &x, &y ); - if ( !error ) - { - /* no error, then append the outline to the current subglyph */ - /* error = Append_Outline( subglyph, - &left_points, - &left_contours, - &cached_outline ); */ - phase = Load_End; - } - } - } -#endif - break; - - - /************************************************************/ - /* */ - /* Load_Header state */ - /* */ - /* reading a glyph's generic header to determine */ - /* wether it's simple or composite */ - /* */ - /* exit states: Load_Simple and Load_Composite */ - /* */ - - case Load_Header: /* load glyph */ - - if ( index + 1 < face->numLocations && - face->glyphLocations[index] == face->glyphLocations[index + 1] ) - { - /* as described by Frederic Loyer, these are spaces, and */ - /* not the unknown glyph. */ - - num_contours = 0; - num_points = 0; - - subglyph->metrics.bbox.xMin = 0; - subglyph->metrics.bbox.xMax = 0; - subglyph->metrics.bbox.yMin = 0; - subglyph->metrics.bbox.yMax = 0; - - subglyph->pp1.x = 0; - subglyph->pp2.x = subglyph->metrics.horiAdvance; - if (load_flags & TTLOAD_SCALE_GLYPH) - subglyph->pp2.x = Scale_X( &exec->metrics, subglyph->pp2.x ); - - exec->glyphSize = 0; - phase = Load_End; - break; - } - - offset = glyph_offset + face->glyphLocations[index]; - - /* read first glyph header */ - if ( FILE_Seek( offset ) || - ACCESS_Frame( 10L ) ) - goto Fail_File; - - num_contours = GET_Short(); - - subglyph->metrics.bbox.xMin = GET_Short(); - subglyph->metrics.bbox.yMin = GET_Short(); - subglyph->metrics.bbox.xMax = GET_Short(); - subglyph->metrics.bbox.yMax = GET_Short(); - - FORGET_Frame(); - - PTRACE6(( "Glyph %ld:\n", index )); - PTRACE6(( " # of contours: %d\n", num_contours )); - PTRACE6(( " xMin: %4d xMax: %4d\n", - subglyph->metrics.bbox.xMin, - subglyph->metrics.bbox.xMax )); - PTRACE6(( " yMin: %4d yMax: %4d\n", - subglyph->metrics.bbox.yMin, - subglyph->metrics.bbox.yMax )); - - if ( num_contours > left_contours ) - { - PTRACE0(( "ERROR: Too many contours for glyph %ld\n", index )); - error = TT_Err_Too_Many_Contours; - goto Fail; - } - - subglyph->pp1.x = subglyph->metrics.bbox.xMin - - subglyph->metrics.horiBearingX; - subglyph->pp1.y = 0; - subglyph->pp2.x = subglyph->pp1.x + subglyph->metrics.horiAdvance; - if (load_flags & TTLOAD_SCALE_GLYPH) - { - subglyph->pp1.x = Scale_X( &exec->metrics, subglyph->pp1.x ); - subglyph->pp2.x = Scale_X( &exec->metrics, subglyph->pp2.x ); - } - - /* is it a simple glyph ? */ - if ( num_contours > 0 ) - phase = Load_Simple; - else - phase = Load_Composite; - - break; - - - /************************************************************/ - /* */ - /* Load_Simple state */ - /* */ - /* reading a simple glyph (num_contours must be set to */ - /* the glyph's number of contours.) */ - /* */ - /* exit states : Load_End */ - /* */ - - case Load_Simple: - new_flags = load_flags; - - /* disable hinting when scaling */ - if ( !subglyph->is_hinted ) - new_flags &= ~TTLOAD_HINT_GLYPH; - - error = Load_Simple_Glyph( exec, - stream, - num_contours, - left_contours, - left_points, - new_flags, - subglyph ); - if ( error ) - goto Fail; - - /* Note: We could have put the simple loader source there */ - /* but the code is fat enough already :-) */ - - num_points = exec->pts.n_points - 2; - - phase = Load_End; - - break; - - - /************************************************************/ - /* */ - /* Load_Composite state */ - /* */ - /* reading a composite glyph header a pushing a new */ - /* load element on the stack. */ - /* */ - /* exit states: Load_Glyph */ - /* */ - - case Load_Composite: - - /* create a new element on the stack */ - load_top++; - - if ( load_top > face->maxComponents ) - { - error = TT_Err_Invalid_Composite; - goto Fail; - } - - subglyph2 = exec->loadStack + load_top; - - Init_Glyph_Component( subglyph2, subglyph, NULL ); - subglyph2->is_hinted = subglyph->is_hinted; - - /* now read composite header */ - - if ( ACCESS_Frame( 4L ) ) - goto Fail_File; - - subglyph->element_flag = new_flags = GET_UShort(); - - subglyph2->index = GET_UShort(); - - FORGET_Frame(); - - k = 1 + 1; - - if ( new_flags & ARGS_ARE_WORDS ) - k *= 2; - - if ( new_flags & WE_HAVE_A_SCALE ) - k += 2; - - else if ( new_flags & WE_HAVE_AN_XY_SCALE ) - k += 4; - - else if ( new_flags & WE_HAVE_A_2X2 ) - k += 8; - - if ( ACCESS_Frame( k ) ) - goto Fail_File; - - if ( new_flags & ARGS_ARE_WORDS ) - { - k = GET_Short(); - l = GET_Short(); - } - else - { - k = GET_Char(); - l = GET_Char(); - } - - subglyph->arg1 = k; - subglyph->arg2 = l; - - if ( new_flags & ARGS_ARE_XY_VALUES ) - { - subglyph->transform.ox = k; - subglyph->transform.oy = l; - } - - xx = 1L << 16; - xy = 0; - yx = 0; - yy = 1L << 16; - - if ( new_flags & WE_HAVE_A_SCALE ) - { - xx = (Fixed)GET_Short() << 2; - yy = xx; - subglyph2->is_scaled = TRUE; - } - else if ( new_flags & WE_HAVE_AN_XY_SCALE ) - { - xx = (Fixed)GET_Short() << 2; - yy = (Fixed)GET_Short() << 2; - subglyph2->is_scaled = TRUE; - } - else if ( new_flags & WE_HAVE_A_2X2 ) - { - xx = (Fixed)GET_Short() << 2; - xy = (Fixed)GET_Short() << 2; - yx = (Fixed)GET_Short() << 2; - yy = (Fixed)GET_Short() << 2; - subglyph2->is_scaled = TRUE; - } - - FORGET_Frame(); - - subglyph->transform.xx = xx; - subglyph->transform.xy = xy; - subglyph->transform.yx = yx; - subglyph->transform.yy = yy; - - k = TT_MulFix( xx, yy ) - TT_MulFix( xy, yx ); - - /* disable hinting in case of scaling/slanting */ - if ( ABS( k ) != (1L << 16) ) - subglyph2->is_hinted = FALSE; - - subglyph->file_offset = FILE_Pos(); - - phase = Load_Glyph; - - break; - - - /************************************************************/ - /* */ - /* Load_End state */ - /* */ - /* after loading a glyph, apply transformation and offset */ - /* where necessary, pops element and continue or */ - /* stop process. */ - /* */ - /* exit states : Load_Composite and Load_Exit */ - /* */ - - case Load_End: - if ( load_top > 0 ) - { - subglyph2 = subglyph; - - load_top--; - subglyph = exec->loadStack + load_top; - - /* check advance width and left side bearing */ - - if ( !subglyph->preserve_pps && - subglyph->element_flag & USE_MY_METRICS ) - { - subglyph->metrics.horiBearingX = subglyph2->metrics.horiBearingX; - subglyph->metrics.horiAdvance = subglyph2->metrics.horiAdvance; - - subglyph->pp1 = subglyph2->pp1; - subglyph->pp2 = subglyph2->pp2; - - subglyph->preserve_pps = TRUE; - } - - /* apply scale */ - - if ( subglyph2->is_scaled ) - { - TT_Vector* cur = subglyph2->zone.cur; - TT_Vector* org = subglyph2->zone.org; - - for ( u = 0; u < num_points; u++ ) - { - nx = TT_MulFix( cur->x, subglyph->transform.xx ) + - TT_MulFix( cur->y, subglyph->transform.yx ); - - ny = TT_MulFix( cur->x, subglyph->transform.xy ) + - TT_MulFix( cur->y, subglyph->transform.yy ); - - cur->x = nx; - cur->y = ny; - - nx = TT_MulFix( org->x, subglyph->transform.xx ) + - TT_MulFix( org->y, subglyph->transform.yx ); - - ny = TT_MulFix( org->x, subglyph->transform.xy ) + - TT_MulFix( org->y, subglyph->transform.yy ); - - org->x = nx; - org->y = ny; - - cur++; - org++; - } - } - - /* adjust counts */ - - num_elem_points = subglyph->zone.n_points; - - for ( k = 0; k < num_contours; k++ ) - subglyph2->zone.contours[k] += num_elem_points; - - subglyph->zone.n_points += num_points; - subglyph->zone.n_contours += num_contours; - - left_points -= num_points; - left_contours -= num_contours; - - if ( !(subglyph->element_flag & ARGS_ARE_XY_VALUES) ) - { - /* move second glyph according to control points */ - /* the attach points are relative to the specific component */ - - u = (UShort)subglyph->arg1; - v = (UShort)subglyph->arg2; - - if ( u >= num_elem_points || - v >= num_points ) - { - error = TT_Err_Invalid_Composite; - goto Fail; - } - - /* adjust count */ - v += num_elem_points; - - x = subglyph->zone.cur[u].x - subglyph->zone.cur[v].x; - y = subglyph->zone.cur[u].y - subglyph->zone.cur[v].y; - } - else - { - /* apply offset */ - - x = subglyph->transform.ox; - y = subglyph->transform.oy; - - if ( load_flags & TTLOAD_SCALE_GLYPH ) - { - x = Scale_X( &exec->metrics, x ); - y = Scale_Y( &exec->metrics, y ); - - if ( subglyph->element_flag & ROUND_XY_TO_GRID ) - { - x = (x+32) & -64; - y = (y+32) & -64; - } - } - } - - translate_array( num_points, subglyph2->zone.cur, x, y ); - - cur_to_org( num_points, &subglyph2->zone ); - - num_points = subglyph->zone.n_points; - num_contours = subglyph->zone.n_contours; - - /* check for last component */ - - if ( FILE_Seek( subglyph->file_offset ) ) - goto Fail_File; - - if ( subglyph->element_flag & MORE_COMPONENTS ) - phase = Load_Composite; - else - { - error = Load_Composite_End( num_points, - num_contours, - exec, - subglyph, - load_flags, - stream ); - if ( error ) - goto Fail; - - phase = Load_End; - } - } - else - phase = Load_Exit; - - break; - - - case Load_Exit: - break; - } - } - - /* finally, copy the points arrays to the glyph object */ - - exec->pts = base_pts; - - for ( u = 0; u < num_points + 2; u++ ) - { - glyph->outline.points[u] = exec->pts.cur[u]; - glyph->outline.flags [u] = exec->pts.touch[u]; - } - - for ( k = 0; k < num_contours; k++ ) - glyph->outline.contours[k] = exec->pts.contours[k]; - - glyph->outline.n_points = num_points; - glyph->outline.n_contours = num_contours; - glyph->outline.second_pass = TRUE; - - /* translate array so that (0,0) is the glyph's origin */ - translate_array( num_points + 2, - glyph->outline.points, - -subglyph->pp1.x, - 0 ); - - TT_Get_Outline_BBox( &glyph->outline, &glyph->metrics.bbox ); - - if ( subglyph->is_hinted ) - { - /* grid-fit the bounding box */ - glyph->metrics.bbox.xMin &= -64; - glyph->metrics.bbox.yMin &= -64; - glyph->metrics.bbox.xMax = (glyph->metrics.bbox.xMax+63) & -64; - glyph->metrics.bbox.yMax = (glyph->metrics.bbox.yMax+63) & -64; - } - - /* get the device-independent scaled horizontal metrics */ - /* take care of fixed-pitch fonts... */ - { - TT_Pos left_bearing; - TT_Pos advance; - - - left_bearing = subglyph->metrics.horiBearingX; - advance = subglyph->metrics.horiAdvance; - - if ( face->postscript.isFixedPitch ) - advance = face->horizontalHeader.advance_Width_Max; - - if ( load_flags & TTLOAD_SCALE_GLYPH ) - { - left_bearing = Scale_X( &exec->metrics, left_bearing ); - advance = Scale_X( &exec->metrics, advance ); - } - - glyph->metrics.linearHoriBearingX = left_bearing; - glyph->metrics.linearHoriAdvance = advance; - } - - glyph->metrics.horiBearingX = glyph->metrics.bbox.xMin; - glyph->metrics.horiBearingY = glyph->metrics.bbox.yMax; - glyph->metrics.horiAdvance = subglyph->pp2.x - subglyph->pp1.x; - - /* Now take care of vertical metrics. In the case where there is */ - /* no vertical information within the font (relatively common), make */ - /* up some metrics `by hand' ... */ - - { - Short top_bearing; /* vertical top side bearing (EM units) */ - UShort advance_height; /* vertical advance height (EM units) */ - - TT_Pos left; /* scaled vertical left side bearing */ - TT_Pos Top; /* scaled original vertical top side bearing */ - TT_Pos top; /* scaled vertical top side bearing */ - TT_Pos advance; /* scaled vertical advance height */ - - - /* Get the unscaled `tsb' and `ah' values */ - if ( face->verticalInfo && - face->verticalHeader.number_Of_VMetrics > 0 ) - { - /* Don't assume that both the vertical header and vertical */ - /* metrics are present in the same font :-) */ - - TT_Get_Metrics( (TT_Horizontal_Header*)&face->verticalHeader, - glyph_index, - &top_bearing, - &advance_height ); - } - else - { - /* Make up the distances from the horizontal header.. */ - - /* NOTE: The OS/2 values are the only `portable' ones, */ - /* which is why we use them... */ - /* */ - /* NOTE2: The sTypoDescender is negative, which is why */ - /* we compute the baseline-to-baseline distance */ - /* here with : */ - /* ascender - descender + linegap */ - /* */ - top_bearing = (Short) (face->os2.sTypoLineGap / 2); - advance_height = (UShort)(face->os2.sTypoAscender - - face->os2.sTypoDescender + - face->os2.sTypoLineGap); - } - - /* We must adjust the top_bearing value from the bounding box given - in the glyph header to te bounding box calculated with - TT_Get_Outline_BBox() */ - - /* scale the metrics */ - if ( load_flags & TTLOAD_SCALE_GLYPH ) - { - Top = Scale_Y( &exec->metrics, top_bearing ); - top = Scale_Y( &exec->metrics, - top_bearing + subglyph->metrics.bbox.yMax ) - - glyph->metrics.bbox.yMax; - advance = Scale_Y( &exec->metrics, advance_height ); - } - else - { - Top = top_bearing; - top = top_bearing + subglyph->metrics.bbox.yMax - - glyph->metrics.bbox.yMax; - advance = advance_height; - } - - glyph->metrics.linearVertBearingY = Top; - glyph->metrics.linearVertAdvance = advance; - - /* XXX : for now, we have no better algo for the lsb, but it should */ - /* work ok.. */ - /* */ - left = ( glyph->metrics.bbox.xMin - glyph->metrics.bbox.xMax ) / 2; - - /* grid-fit them if necessary */ - if ( subglyph->is_hinted ) - { - left &= -64; - top = (top + 63) & -64; - advance = (advance + 32) & -64; - } - - glyph->metrics.vertBearingX = left; - glyph->metrics.vertBearingY = top; - glyph->metrics.vertAdvance = advance; - } - - /* Adjust advance width to the value contained in the hdmx table. */ - if ( !exec->face->postscript.isFixedPitch && instance && - subglyph->is_hinted ) - { - widths = Get_Advance_Widths( exec->face, - exec->instance->metrics.x_ppem ); - if ( widths ) - glyph->metrics.horiAdvance = widths[glyph_index] << 6; - } - - glyph->outline.dropout_mode = (Char)exec->GS.scan_type; - - error = TT_Err_Ok; - - Fail_File: - Fail: - DONE_Stream( stream ); - - Fin: - - /* reset the execution context */ - exec->pts = base_pts; - - if ( !instance || !instance->debug ) - Done_Context( exec ); - - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttgload.h diff -u xc/extras/FreeType/lib/ttgload.h:1.1.1.2 xc/extras/FreeType/lib/ttgload.h:removed --- xc/extras/FreeType/lib/ttgload.h:1.1.1.2 Sat Feb 12 23:55:43 2000 +++ xc/extras/FreeType/lib/ttgload.h Wed Mar 16 20:59:39 2005 @@ -1,51 +0,0 @@ -/******************************************************************* - * - * ttgload.h 1.0 - * - * TrueType Glyph Loader. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef TTGLOAD_H -#define TTGLOAD_H - -#include "ttconfig.h" -#include "tttypes.h" -#include "ttobjs.h" - -#ifdef __cplusplus - extern "C" { -#endif - - - LOCAL_DEF - void TT_Get_Metrics( TT_Horizontal_Header* header, - UShort index, - Short* bearing, - UShort* advance ); - - - LOCAL_DEF - TT_Error Load_TrueType_Glyph( PInstance instance, - PGlyph glyph, - UShort glyph_index, - UShort load_flags ); - -#ifdef __cplusplus - } -#endif - - -#endif /* TTGLOAD_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttinterp.c diff -u xc/extras/FreeType/lib/ttinterp.c:1.1.1.3 xc/extras/FreeType/lib/ttinterp.c:removed --- xc/extras/FreeType/lib/ttinterp.c:1.1.1.3 Sat Feb 12 23:55:44 2000 +++ xc/extras/FreeType/lib/ttinterp.c Wed Mar 16 20:59:39 2005 @@ -1,6654 +0,0 @@ -/******************************************************************* - * - * ttinterp.c 3.1 - * - * TrueType bytecode intepreter. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 3.1 and 3.0: - * - * - A more relaxed version of the interpreter. It is now able to - * ignore errors like out-of-bound array access and writes in order - * to silently support broken glyphs (even if the results are not - * always pretty). - * - * Note that one can use the flag TTLOAD_PEDANTIC to force - * TrueType-compliant interpretation. - * - * - A big #if used to completely disable the interpreter, which - * is due to the Apple patents issues which emerged recently. - * - ******************************************************************/ - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttcalc.h" -#include "ttmemory.h" -#include "ttinterp.h" - - -#ifdef TT_CONFIG_OPTION_NO_INTERPRETER - - LOCAL_FUNC - TT_Error RunIns( PExecution_Context exc ) - { - /* do nothing - always successful */ - (void)exc; - return TT_Err_Ok; - } - -#else - - -#ifdef DEBUG_INTERPRETER -#include -#include "ttdebug.h" - -/* Define the `getch()' function. On Unix systems, it is an alias */ -/* for `getchar()', and the debugger front end must ensure that the */ -/* `stdin' file descriptor is not in line-by-line input mode. */ -#ifdef OS2 -#include -#else -#define getch getchar -#endif - -#endif /* DEBUG_INTEPRETER */ - - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_interp - - -/* In order to detect infinite loops in the code, we set-up */ -/* a counter within the run loop. a singly stroke of interpretation */ -/* is now limited to a maximum number of opcodes defined below.. */ -/* */ -#define MAX_RUNNABLE_OPCODES 1000000 - - -/* There are two kinds of implementations there: */ -/* */ -/* a. static implementation: */ -/* */ -/* The current execution context is a static variable, */ -/* which fields are accessed directly by the interpreter */ -/* during execution. The context is named 'cur'. */ -/* */ -/* This version is non-reentrant, of course. */ -/* */ -/* */ -/* b. indirect implementation: */ -/* */ -/* The current execution context is passed to _each_ */ -/* function as its first argument, and each field is */ -/* thus accessed indirectly. */ -/* */ -/* This version is, however, fully re-entrant. */ -/* */ -/* */ -/* The idea is that an indirect implementation may be */ -/* slower to execute on the low-end processors that are */ -/* used in some systems (like 386s or even 486s). */ -/* */ -/* When the interpreter started, we had no idea of the */ -/* time that glyph hinting (i.e. executing instructions) */ -/* could take in the whole process of rendering a glyph, */ -/* and a 10 to 30% performance penalty on low-end systems */ -/* didn't seem much of a good idea. This question led us */ -/* to provide two distinct builds of the C version from */ -/* a single source, with the use of macros (again). */ -/* */ -/* Now that the engine is working (and working really */ -/* well!), it seems that the greatest time-consuming */ -/* factors are: file i/o, glyph loading, rasterizing and */ -/* _then_ glyph hinting! */ -/* */ -/* Tests performed with two versions of the 'fttimer' */ -/* program seem to indicate that hinting takes less than 5% */ -/* of the rendering process, which is dominated by glyph */ -/* loading and scan-line conversion by an high order of */ -/* magnitude. */ -/* */ -/* As a consequence, the indirect implementation is now the */ -/* default, as its performance costs can be considered */ -/* negligible in our context. Note, however, that we */ -/* kept the same source with macros because: */ -/* */ -/* - the code is kept very close in design to the */ -/* Pascal one used for development. */ -/* */ -/* - it's much more readable that way! */ -/* */ -/* - it's still open to later experimentation and tuning */ - - - -#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */ - -#define CUR (*exc) /* see ttobjs.h */ - -#else /* static implementation */ - -#define CUR cur - - static TExecution_Context cur; /* static exec. context variable */ - - /* apparently, we have a _lot_ of direct indexing when accessing */ - /* the static 'cur', which makes the code bigger (due to all the */ - /* four bytes addresses). */ - -#endif /* !TT_CONFIG_OPTION_STATIC_INTERPRETER */ - - -#define INS_ARG EXEC_OPS PStorage args /* see ttobjs.h */ - -#define SKIP_Code() SkipCode( EXEC_ARG ) - -#define GET_ShortIns() GetShortIns( EXEC_ARG ) - -#define COMPUTE_Funcs() Compute_Funcs( EXEC_ARG ) - -#define NORMalize( x, y, v ) Normalize( EXEC_ARGS x, y, v ) - -#define SET_SuperRound( scale, flags ) \ - SetSuperRound( EXEC_ARGS scale, flags ) - -#define INS_Goto_CodeRange( range, ip ) \ - Ins_Goto_CodeRange( EXEC_ARGS range, ip ) - -#define CUR_Func_project( x, y ) CUR.func_project( EXEC_ARGS x, y ) -#define CUR_Func_move( z, p, d ) CUR.func_move( EXEC_ARGS z, p, d ) -#define CUR_Func_dualproj( x, y ) CUR.func_dualproj( EXEC_ARGS x, y ) -#define CUR_Func_freeProj( x, y ) CUR.func_freeProj( EXEC_ARGS x, y ) -#define CUR_Func_round( d, c ) CUR.func_round( EXEC_ARGS d, c ) - -#define CUR_Func_read_cvt( index ) \ - CUR.func_read_cvt( EXEC_ARGS index ) - -#define CUR_Func_write_cvt( index, val ) \ - CUR.func_write_cvt( EXEC_ARGS index, val ) - -#define CUR_Func_move_cvt( index, val ) \ - CUR.func_move_cvt( EXEC_ARGS index, val ) - -#define CURRENT_Ratio() Current_Ratio( EXEC_ARG ) -#define CURRENT_Ppem() Current_Ppem( EXEC_ARG ) - -#define CALC_Length() Calc_Length( EXEC_ARG ) - -#define INS_SxVTL( a, b, c, d ) Ins_SxVTL( EXEC_ARGS a, b, c, d ) - -#define COMPUTE_Point_Displacement( a, b, c, d ) \ - Compute_Point_Displacement( EXEC_ARGS a, b, c, d ) - -#define MOVE_Zp2_Point( a, b, c, t ) Move_Zp2_Point( EXEC_ARGS a, b, c, t ) - -#define CUR_Ppem() Cur_PPEM( EXEC_ARG ) - - /* Instruction dispatch function, as used by the interpreter */ - typedef void (*TInstruction_Function)( INS_ARG ); - -#define BOUNDS( x, n ) ( (x) >= (n) ) - - - -/*********************************************************************/ -/* */ -/* Before an opcode is executed, the interpreter verifies that */ -/* there are enough arguments on the stack, with the help of */ -/* the Pop_Push_Count table. */ -/* */ -/* For each opcode, the first column gives the number of arguments */ -/* that are popped from the stack; the second one gives the number */ -/* of those that are pushed in result. */ -/* */ -/* Note that for opcodes with a varying number of parameters, */ -/* either 0 or 1 arg is verified before execution, depending */ -/* on the nature of the instruction: */ -/* */ -/* - if the number of arguments is given by the bytecode */ -/* stream or the loop variable, 0 is chosen. */ -/* */ -/* - if the first argument is a count n that is followed */ -/* by arguments a1..an, then 1 is chosen. */ -/* */ -/*********************************************************************/ - -#undef PACK -#define PACK( x, y ) ((x << 4) | y) - - static const Byte Pop_Push_Count[256] = - { - /* opcodes are gathered in groups of 16 */ - /* please keep the spaces as they are */ - - /* SVTCA y */ PACK( 0, 0 ), - /* SVTCA x */ PACK( 0, 0 ), - /* SPvTCA y */ PACK( 0, 0 ), - /* SPvTCA x */ PACK( 0, 0 ), - /* SFvTCA y */ PACK( 0, 0 ), - /* SFvTCA x */ PACK( 0, 0 ), - /* SPvTL // */ PACK( 2, 0 ), - /* SPvTL + */ PACK( 2, 0 ), - /* SFvTL // */ PACK( 2, 0 ), - /* SFvTL + */ PACK( 2, 0 ), - /* SPvFS */ PACK( 2, 0 ), - /* SFvFS */ PACK( 2, 0 ), - /* GPV */ PACK( 0, 2 ), - /* GFV */ PACK( 0, 2 ), - /* SFvTPv */ PACK( 0, 0 ), - /* ISECT */ PACK( 5, 0 ), - - /* SRP0 */ PACK( 1, 0 ), - /* SRP1 */ PACK( 1, 0 ), - /* SRP2 */ PACK( 1, 0 ), - /* SZP0 */ PACK( 1, 0 ), - /* SZP1 */ PACK( 1, 0 ), - /* SZP2 */ PACK( 1, 0 ), - /* SZPS */ PACK( 1, 0 ), - /* SLOOP */ PACK( 1, 0 ), - /* RTG */ PACK( 0, 0 ), - /* RTHG */ PACK( 0, 0 ), - /* SMD */ PACK( 1, 0 ), - /* ELSE */ PACK( 0, 0 ), - /* JMPR */ PACK( 1, 0 ), - /* SCvTCi */ PACK( 1, 0 ), - /* SSwCi */ PACK( 1, 0 ), - /* SSW */ PACK( 1, 0 ), - - /* DUP */ PACK( 1, 2 ), - /* POP */ PACK( 1, 0 ), - /* CLEAR */ PACK( 0, 0 ), - /* SWAP */ PACK( 2, 2 ), - /* DEPTH */ PACK( 0, 1 ), - /* CINDEX */ PACK( 1, 1 ), - /* MINDEX */ PACK( 1, 0 ), - /* AlignPTS */ PACK( 2, 0 ), - /* INS_$28 */ PACK( 0, 0 ), - /* UTP */ PACK( 1, 0 ), - /* LOOPCALL */ PACK( 2, 0 ), - /* CALL */ PACK( 1, 0 ), - /* FDEF */ PACK( 1, 0 ), - /* ENDF */ PACK( 0, 0 ), - /* MDAP[0] */ PACK( 1, 0 ), - /* MDAP[1] */ PACK( 1, 0 ), - - /* IUP[0] */ PACK( 0, 0 ), - /* IUP[1] */ PACK( 0, 0 ), - /* SHP[0] */ PACK( 0, 0 ), - /* SHP[1] */ PACK( 0, 0 ), - /* SHC[0] */ PACK( 1, 0 ), - /* SHC[1] */ PACK( 1, 0 ), - /* SHZ[0] */ PACK( 1, 0 ), - /* SHZ[1] */ PACK( 1, 0 ), - /* SHPIX */ PACK( 1, 0 ), - /* IP */ PACK( 0, 0 ), - /* MSIRP[0] */ PACK( 2, 0 ), - /* MSIRP[1] */ PACK( 2, 0 ), - /* AlignRP */ PACK( 0, 0 ), - /* RTDG */ PACK( 0, 0 ), - /* MIAP[0] */ PACK( 2, 0 ), - /* MIAP[1] */ PACK( 2, 0 ), - - /* NPushB */ PACK( 0, 0 ), - /* NPushW */ PACK( 0, 0 ), - /* WS */ PACK( 2, 0 ), - /* RS */ PACK( 1, 1 ), - /* WCvtP */ PACK( 2, 0 ), - /* RCvt */ PACK( 1, 1 ), - /* GC[0] */ PACK( 1, 1 ), - /* GC[1] */ PACK( 1, 1 ), - /* SCFS */ PACK( 2, 0 ), - /* MD[0] */ PACK( 2, 1 ), - /* MD[1] */ PACK( 2, 1 ), - /* MPPEM */ PACK( 0, 1 ), - /* MPS */ PACK( 0, 1 ), - /* FlipON */ PACK( 0, 0 ), - /* FlipOFF */ PACK( 0, 0 ), - /* DEBUG */ PACK( 1, 0 ), - - /* LT */ PACK( 2, 1 ), - /* LTEQ */ PACK( 2, 1 ), - /* GT */ PACK( 2, 1 ), - /* GTEQ */ PACK( 2, 1 ), - /* EQ */ PACK( 2, 1 ), - /* NEQ */ PACK( 2, 1 ), - /* ODD */ PACK( 1, 1 ), - /* EVEN */ PACK( 1, 1 ), - /* IF */ PACK( 1, 0 ), - /* EIF */ PACK( 0, 0 ), - /* AND */ PACK( 2, 1 ), - /* OR */ PACK( 2, 1 ), - /* NOT */ PACK( 1, 1 ), - /* DeltaP1 */ PACK( 1, 0 ), - /* SDB */ PACK( 1, 0 ), - /* SDS */ PACK( 1, 0 ), - - /* ADD */ PACK( 2, 1 ), - /* SUB */ PACK( 2, 1 ), - /* DIV */ PACK( 2, 1 ), - /* MUL */ PACK( 2, 1 ), - /* ABS */ PACK( 1, 1 ), - /* NEG */ PACK( 1, 1 ), - /* FLOOR */ PACK( 1, 1 ), - /* CEILING */ PACK( 1, 1 ), - /* ROUND[0] */ PACK( 1, 1 ), - /* ROUND[1] */ PACK( 1, 1 ), - /* ROUND[2] */ PACK( 1, 1 ), - /* ROUND[3] */ PACK( 1, 1 ), - /* NROUND[0] */ PACK( 1, 1 ), - /* NROUND[1] */ PACK( 1, 1 ), - /* NROUND[2] */ PACK( 1, 1 ), - /* NROUND[3] */ PACK( 1, 1 ), - - /* WCvtF */ PACK( 2, 0 ), - /* DeltaP2 */ PACK( 1, 0 ), - /* DeltaP3 */ PACK( 1, 0 ), - /* DeltaCn[0] */ PACK( 1, 0 ), - /* DeltaCn[1] */ PACK( 1, 0 ), - /* DeltaCn[2] */ PACK( 1, 0 ), - /* SROUND */ PACK( 1, 0 ), - /* S45Round */ PACK( 1, 0 ), - /* JROT */ PACK( 2, 0 ), - /* JROF */ PACK( 2, 0 ), - /* ROFF */ PACK( 0, 0 ), - /* INS_$7B */ PACK( 0, 0 ), - /* RUTG */ PACK( 0, 0 ), - /* RDTG */ PACK( 0, 0 ), - /* SANGW */ PACK( 1, 0 ), - /* AA */ PACK( 1, 0 ), - - /* FlipPT */ PACK( 0, 0 ), - /* FlipRgON */ PACK( 2, 0 ), - /* FlipRgOFF */ PACK( 2, 0 ), - /* INS_$83 */ PACK( 0, 0 ), - /* INS_$84 */ PACK( 0, 0 ), - /* ScanCTRL */ PACK( 1, 0 ), - /* SDVPTL[0] */ PACK( 2, 0 ), - /* SDVPTL[1] */ PACK( 2, 0 ), - /* GetINFO */ PACK( 1, 1 ), - /* IDEF */ PACK( 1, 0 ), - /* ROLL */ PACK( 3, 3 ), - /* MAX */ PACK( 2, 1 ), - /* MIN */ PACK( 2, 1 ), - /* ScanTYPE */ PACK( 1, 0 ), - /* InstCTRL */ PACK( 2, 0 ), - /* INS_$8F */ PACK( 0, 0 ), - - /* INS_$90 */ PACK( 0, 0 ), - /* INS_$91 */ PACK( 0, 0 ), - /* INS_$92 */ PACK( 0, 0 ), - /* INS_$93 */ PACK( 0, 0 ), - /* INS_$94 */ PACK( 0, 0 ), - /* INS_$95 */ PACK( 0, 0 ), - /* INS_$96 */ PACK( 0, 0 ), - /* INS_$97 */ PACK( 0, 0 ), - /* INS_$98 */ PACK( 0, 0 ), - /* INS_$99 */ PACK( 0, 0 ), - /* INS_$9A */ PACK( 0, 0 ), - /* INS_$9B */ PACK( 0, 0 ), - /* INS_$9C */ PACK( 0, 0 ), - /* INS_$9D */ PACK( 0, 0 ), - /* INS_$9E */ PACK( 0, 0 ), - /* INS_$9F */ PACK( 0, 0 ), - - /* INS_$A0 */ PACK( 0, 0 ), - /* INS_$A1 */ PACK( 0, 0 ), - /* INS_$A2 */ PACK( 0, 0 ), - /* INS_$A3 */ PACK( 0, 0 ), - /* INS_$A4 */ PACK( 0, 0 ), - /* INS_$A5 */ PACK( 0, 0 ), - /* INS_$A6 */ PACK( 0, 0 ), - /* INS_$A7 */ PACK( 0, 0 ), - /* INS_$A8 */ PACK( 0, 0 ), - /* INS_$A9 */ PACK( 0, 0 ), - /* INS_$AA */ PACK( 0, 0 ), - /* INS_$AB */ PACK( 0, 0 ), - /* INS_$AC */ PACK( 0, 0 ), - /* INS_$AD */ PACK( 0, 0 ), - /* INS_$AE */ PACK( 0, 0 ), - /* INS_$AF */ PACK( 0, 0 ), - - /* PushB[0] */ PACK( 0, 1 ), - /* PushB[1] */ PACK( 0, 2 ), - /* PushB[2] */ PACK( 0, 3 ), - /* PushB[3] */ PACK( 0, 4 ), - /* PushB[4] */ PACK( 0, 5 ), - /* PushB[5] */ PACK( 0, 6 ), - /* PushB[6] */ PACK( 0, 7 ), - /* PushB[7] */ PACK( 0, 8 ), - /* PushW[0] */ PACK( 0, 1 ), - /* PushW[1] */ PACK( 0, 2 ), - /* PushW[2] */ PACK( 0, 3 ), - /* PushW[3] */ PACK( 0, 4 ), - /* PushW[4] */ PACK( 0, 5 ), - /* PushW[5] */ PACK( 0, 6 ), - /* PushW[6] */ PACK( 0, 7 ), - /* PushW[7] */ PACK( 0, 8 ), - - /* MDRP[00] */ PACK( 1, 0 ), - /* MDRP[01] */ PACK( 1, 0 ), - /* MDRP[02] */ PACK( 1, 0 ), - /* MDRP[03] */ PACK( 1, 0 ), - /* MDRP[04] */ PACK( 1, 0 ), - /* MDRP[05] */ PACK( 1, 0 ), - /* MDRP[06] */ PACK( 1, 0 ), - /* MDRP[07] */ PACK( 1, 0 ), - /* MDRP[08] */ PACK( 1, 0 ), - /* MDRP[09] */ PACK( 1, 0 ), - /* MDRP[10] */ PACK( 1, 0 ), - /* MDRP[11] */ PACK( 1, 0 ), - /* MDRP[12] */ PACK( 1, 0 ), - /* MDRP[13] */ PACK( 1, 0 ), - /* MDRP[14] */ PACK( 1, 0 ), - /* MDRP[15] */ PACK( 1, 0 ), - - /* MDRP[16] */ PACK( 1, 0 ), - /* MDRP[17] */ PACK( 1, 0 ), - /* MDRP[18] */ PACK( 1, 0 ), - /* MDRP[19] */ PACK( 1, 0 ), - /* MDRP[20] */ PACK( 1, 0 ), - /* MDRP[21] */ PACK( 1, 0 ), - /* MDRP[22] */ PACK( 1, 0 ), - /* MDRP[23] */ PACK( 1, 0 ), - /* MDRP[24] */ PACK( 1, 0 ), - /* MDRP[25] */ PACK( 1, 0 ), - /* MDRP[26] */ PACK( 1, 0 ), - /* MDRP[27] */ PACK( 1, 0 ), - /* MDRP[28] */ PACK( 1, 0 ), - /* MDRP[29] */ PACK( 1, 0 ), - /* MDRP[30] */ PACK( 1, 0 ), - /* MDRP[31] */ PACK( 1, 0 ), - - /* MIRP[00] */ PACK( 2, 0 ), - /* MIRP[01] */ PACK( 2, 0 ), - /* MIRP[02] */ PACK( 2, 0 ), - /* MIRP[03] */ PACK( 2, 0 ), - /* MIRP[04] */ PACK( 2, 0 ), - /* MIRP[05] */ PACK( 2, 0 ), - /* MIRP[06] */ PACK( 2, 0 ), - /* MIRP[07] */ PACK( 2, 0 ), - /* MIRP[08] */ PACK( 2, 0 ), - /* MIRP[09] */ PACK( 2, 0 ), - /* MIRP[10] */ PACK( 2, 0 ), - /* MIRP[11] */ PACK( 2, 0 ), - /* MIRP[12] */ PACK( 2, 0 ), - /* MIRP[13] */ PACK( 2, 0 ), - /* MIRP[14] */ PACK( 2, 0 ), - /* MIRP[15] */ PACK( 2, 0 ), - - /* MIRP[16] */ PACK( 2, 0 ), - /* MIRP[17] */ PACK( 2, 0 ), - /* MIRP[18] */ PACK( 2, 0 ), - /* MIRP[19] */ PACK( 2, 0 ), - /* MIRP[20] */ PACK( 2, 0 ), - /* MIRP[21] */ PACK( 2, 0 ), - /* MIRP[22] */ PACK( 2, 0 ), - /* MIRP[23] */ PACK( 2, 0 ), - /* MIRP[24] */ PACK( 2, 0 ), - /* MIRP[25] */ PACK( 2, 0 ), - /* MIRP[26] */ PACK( 2, 0 ), - /* MIRP[27] */ PACK( 2, 0 ), - /* MIRP[28] */ PACK( 2, 0 ), - /* MIRP[29] */ PACK( 2, 0 ), - /* MIRP[30] */ PACK( 2, 0 ), - /* MIRP[31] */ PACK( 2, 0 ) - }; - - static const TT_Vector Null_Vector = {0,0}; - -#undef NULL_Vector -#define NULL_Vector (TT_Vector*)&Null_Vector - -/******************************************************************* - * - * Function : Norm - * - * Description : Returns the norm (length) of a vector. - * - * Input : X, Y vector - * - * Output : Returns length in F26dot6. - * - *****************************************************************/ - - static TT_F26Dot6 Norm( TT_F26Dot6 X, TT_F26Dot6 Y ) - { - TT_Int64 T1, T2; - - - MUL_64( X, X, T1 ); - MUL_64( Y, Y, T2 ); - - ADD_64( T1, T2, T1 ); - - return (TT_F26Dot6)SQRT_64( T1 ); - } - - -/******************************************************************* - * - * Function : FUnits_To_Pixels - * - * Description : Scale a distance in FUnits to pixel coordinates. - * - * Input : Distance in FUnits - * - * Output : Distance in 26.6 format. - * - *****************************************************************/ - - static TT_F26Dot6 FUnits_To_Pixels( EXEC_OPS Short distance ) - { - return TT_MulDiv( distance, - CUR.metrics.scale1, - CUR.metrics.scale2 ); - } - - -/******************************************************************* - * - * Function : Current_Ratio - * - * Description : Return the current aspect ratio scaling factor - * depending on the projection vector's state and - * device resolutions. - * - * Input : None - * - * Output : Aspect ratio in 16.16 format, always <= 1.0 . - * - *****************************************************************/ - - static Long Current_Ratio( EXEC_OP ) - { - if ( CUR.metrics.ratio ) - return CUR.metrics.ratio; - - if ( CUR.GS.projVector.y == 0 ) - CUR.metrics.ratio = CUR.metrics.x_ratio; - - else if ( CUR.GS.projVector.x == 0 ) - CUR.metrics.ratio = CUR.metrics.y_ratio; - - else - { - Long x, y; - - - x = TT_MulDiv( CUR.GS.projVector.x, CUR.metrics.x_ratio, 0x4000 ); - y = TT_MulDiv( CUR.GS.projVector.y, CUR.metrics.y_ratio, 0x4000 ); - CUR.metrics.ratio = Norm( x, y ); - } - - return CUR.metrics.ratio; - } - - - static Long Current_Ppem( EXEC_OP ) - { - return TT_MulFix( CUR.metrics.ppem, CURRENT_Ratio() ); - } - - - static TT_F26Dot6 Read_CVT( EXEC_OPS ULong index ) - { - return CUR.cvt[index]; - } - - - static TT_F26Dot6 Read_CVT_Stretched( EXEC_OPS ULong index ) - { - return TT_MulFix( CUR.cvt[index], CURRENT_Ratio() ); - } - - - static void Write_CVT( EXEC_OPS ULong index, TT_F26Dot6 value ) - { - CUR.cvt[index] = value; - } - - static void Write_CVT_Stretched( EXEC_OPS ULong index, TT_F26Dot6 value ) - { - CUR.cvt[index] = TT_MulDiv( value, 0x10000, CURRENT_Ratio() ); - } - - - static void Move_CVT( EXEC_OPS ULong index, TT_F26Dot6 value ) - { - CUR.cvt[index] += value; - } - - static void Move_CVT_Stretched( EXEC_OPS ULong index, TT_F26Dot6 value ) - { - CUR.cvt[index] += TT_MulDiv( value, 0x10000, CURRENT_Ratio() ); - } - - -/****************************************************************** - * - * Function : Calc_Length - * - * Description : Computes the length in bytes of current opcode. - * - *****************************************************************/ - - static Bool Calc_Length( EXEC_OP ) - { - CUR.opcode = CUR.code[CUR.IP]; - - switch ( CUR.opcode ) - { - case 0x40: - if ( CUR.IP + 1 >= CUR.codeSize ) - return FAILURE; - - CUR.length = CUR.code[CUR.IP + 1] + 2; - break; - - case 0x41: - if ( CUR.IP + 1 >= CUR.codeSize ) - return FAILURE; - - CUR.length = CUR.code[CUR.IP + 1] * 2 + 2; - break; - - case 0xB0: - case 0xB1: - case 0xB2: - case 0xB3: - case 0xB4: - case 0xB5: - case 0xB6: - case 0xB7: - CUR.length = CUR.opcode - 0xB0 + 2; - break; - - case 0xB8: - case 0xB9: - case 0xBA: - case 0xBB: - case 0xBC: - case 0xBD: - case 0xBE: - case 0xBF: - CUR.length = (CUR.opcode - 0xB8) * 2 + 3; - break; - - default: - CUR.length = 1; - break; - } - - /* make sure result is in range */ - - if ( CUR.IP + CUR.length > CUR.codeSize ) - return FAILURE; - - return SUCCESS; - } - - -/******************************************************************* - * - * Function : GetShortIns - * - * Description : Returns a short integer taken from the instruction - * stream at address IP. - * - * Input : None - * - * Output : Short read at Code^[IP..IP+1] - * - * Notes : This one could become a Macro in the C version. - * - *****************************************************************/ - - static Short GetShortIns( EXEC_OP ) - { - /* Reading a byte stream so there is no endianess (DaveP) */ - CUR.IP += 2; - return (Short)((CUR.code[CUR.IP - 2] << 8) + CUR.code[CUR.IP - 1]); - } - - -/******************************************************************* - * - * Function : Ins_Goto_CodeRange - * - * Description : Goes to a certain code range in the instruction - * stream. - * - * - * Input : aRange - * aIP - * - * Output : SUCCESS or FAILURE. - * - *****************************************************************/ - - static Bool Ins_Goto_CodeRange( EXEC_OPS Int aRange, ULong aIP ) - { - TCodeRange* WITH; - - - if ( aRange < 1 || aRange > 3 ) - { - CUR.error = TT_Err_Bad_Argument; - return FAILURE; - } - - WITH = &CUR.codeRangeTable[aRange - 1]; - - if ( WITH->Base == NULL ) /* invalid coderange */ - { - CUR.error = TT_Err_Invalid_CodeRange; - return FAILURE; - } - - /* NOTE: Because the last instruction of a program may be a CALL */ - /* which will return to the first byte *after* the code */ - /* range, we test for aIP <= Size, instead of aIP < Size. */ - - if ( aIP > WITH->Size ) - { - CUR.error = TT_Err_Code_Overflow; - return FAILURE; - } - - CUR.code = WITH->Base; - CUR.codeSize = WITH->Size; - CUR.IP = aIP; - CUR.curRange = aRange; - - return SUCCESS; - } - - -/******************************************************************* - * - * Function : Direct_Move - * - * Description : Moves a point by a given distance along the - * freedom vector. The point will be touched. - * - * Input : point index of point to move - * distance distance to apply - * zone affected glyph zone - * - * Output : None - * - *****************************************************************/ - - static void Direct_Move( EXEC_OPS PGlyph_Zone zone, - UShort point, - TT_F26Dot6 distance ) - { - TT_F26Dot6 v; - - - v = CUR.GS.freeVector.x; - - if ( v != 0 ) - { - zone->cur[point].x += TT_MulDiv( distance, - v * 0x10000L, - CUR.F_dot_P ); - - zone->touch[point] |= TT_Flag_Touched_X; - } - - v = CUR.GS.freeVector.y; - - if ( v != 0 ) - { - zone->cur[point].y += TT_MulDiv( distance, - v * 0x10000L, - CUR.F_dot_P ); - - zone->touch[point] |= TT_Flag_Touched_Y; - } - } - - -/******************************************************************/ -/* */ -/* The following versions are used whenever both vectors are both */ -/* along one of the coordinate unit vectors, i.e. in 90% cases. */ -/* */ -/******************************************************************/ - -/******************************************************************* - * Direct_Move_X - * - *******************************************************************/ - - static void Direct_Move_X( EXEC_OPS PGlyph_Zone zone, - UShort point, - TT_F26Dot6 distance ) - { - zone->cur[point].x += distance; - zone->touch[point] |= TT_Flag_Touched_X; - } - - -/******************************************************************* - * Direct_Move_Y - * - *******************************************************************/ - - static void Direct_Move_Y( EXEC_OPS PGlyph_Zone zone, - UShort point, - TT_F26Dot6 distance ) - { - zone->cur[point].y += distance; - zone->touch[point] |= TT_Flag_Touched_Y; - } - - -/******************************************************************* - * - * Function : Round_None - * - * Description : Does not round, but adds engine compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance. - * - * NOTE : The spec says very few about the relationship between - * rounding and engine compensation. However, it seems - * from the description of super round that we should - * should add the compensation before rounding. - * - ******************************************************************/ - - static TT_F26Dot6 Round_None( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = distance + compensation; - if ( val < 0 ) - val = 0; - } - else { - val = distance - compensation; - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_To_Grid - * - * Description : Rounds value to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - *****************************************************************/ - - static TT_F26Dot6 Round_To_Grid( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = distance + compensation + 32; - if ( val > 0 ) - val &= ~63; - else - val = 0; - } - else - { - val = -( (compensation - distance + 32) & (-64) ); - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_To_Half_Grid - * - * Description : Rounds value to half grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - *****************************************************************/ - - static TT_F26Dot6 Round_To_Half_Grid( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = ((distance + compensation) & (-64)) + 32; - if ( val < 0 ) - val = 0; - } - else - { - val = -( ((compensation - distance) & (-64)) + 32 ); - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_Down_To_Grid - * - * Description : Rounds value down to grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - *****************************************************************/ - - static TT_F26Dot6 Round_Down_To_Grid( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = distance + compensation; - if ( val > 0 ) - val &= ~63; - else - val = 0; - } - else - { - val = -( (compensation - distance) & (-64) ); - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_Up_To_Grid - * - * Description : Rounds value up to grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - *****************************************************************/ - - static TT_F26Dot6 Round_Up_To_Grid( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = distance + compensation + 63; - if ( val > 0 ) - val &= ~63; - else - val = 0; - } - else - { - val = -( (compensation - distance + 63) & (-64) ); - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_To_Double_Grid - * - * Description : Rounds value to double grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - *****************************************************************/ - - static TT_F26Dot6 Round_To_Double_Grid( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = distance + compensation + 16; - if ( val > 0 ) - val &= ~31; - else - val = 0; - } - else - { - val = -( (compensation - distance + 16) & (-32) ); - if ( val > 0 ) - val = 0; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_Super - * - * Description : Super-rounds value to grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - * NOTE : The spec says very few about the relationship between - * rounding and engine compensation. However, it seems - * from the description of super round that we should - * should add the compensation before rounding. - * - *****************************************************************/ - - static TT_F26Dot6 Round_Super( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = (distance - CUR.phase + CUR.threshold + compensation) & - (-CUR.period); - if ( val < 0 ) - val = 0; - val += CUR.phase; - } - else - { - val = -( (CUR.threshold - CUR.phase - distance + compensation) & - (-CUR.period) ); - if ( val > 0 ) - val = 0; - val -= CUR.phase; - } - - return val; - } - - -/******************************************************************* - * - * Function : Round_Super_45 - * - * Description : Super-rounds value to grid after adding engine - * compensation. - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : Rounded distance. - * - * NOTE : There is a separate function for Round_Super_45 as we - * may need a greater precision. - * - *****************************************************************/ - - static TT_F26Dot6 Round_Super_45( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ) - { - TT_F26Dot6 val; - - - if ( distance >= 0 ) - { - val = ( (distance - CUR.phase + CUR.threshold + compensation) / - CUR.period ) * CUR.period; - if ( val < 0 ) - val = 0; - val += CUR.phase; - } - else - { - val = -( ( (CUR.threshold - CUR.phase - distance + compensation) / - CUR.period ) * CUR.period ); - if ( val > 0 ) - val = 0; - val -= CUR.phase; - } - - return val; - } - - -/******************************************************************* - * Compute_Round - * - *****************************************************************/ - - static void Compute_Round( EXEC_OPS Byte round_mode ) - { - switch ( round_mode ) - { - case TT_Round_Off: - CUR.func_round = (TRound_Function)Round_None; - break; - - case TT_Round_To_Grid: - CUR.func_round = (TRound_Function)Round_To_Grid; - break; - - case TT_Round_Up_To_Grid: - CUR.func_round = (TRound_Function)Round_Up_To_Grid; - break; - - case TT_Round_Down_To_Grid: - CUR.func_round = (TRound_Function)Round_Down_To_Grid; - break; - - case TT_Round_To_Half_Grid: - CUR.func_round = (TRound_Function)Round_To_Half_Grid; - break; - - case TT_Round_To_Double_Grid: - CUR.func_round = (TRound_Function)Round_To_Double_Grid; - break; - - case TT_Round_Super: - CUR.func_round = (TRound_Function)Round_Super; - break; - - case TT_Round_Super_45: - CUR.func_round = (TRound_Function)Round_Super_45; - break; - } - } - - -/******************************************************************* - * - * Function : SetSuperRound - * - * Description : Sets Super Round parameters. - * - * Input : GridPeriod Grid period - * selector SROUND opcode - * - * Output : None. - * - *****************************************************************/ - - static void SetSuperRound( EXEC_OPS TT_F26Dot6 GridPeriod, - Long selector ) - { - switch ( (Int)(selector & 0xC0) ) - { - case 0: - CUR.period = GridPeriod / 2; - break; - - case 0x40: - CUR.period = GridPeriod; - break; - - case 0x80: - CUR.period = GridPeriod * 2; - break; - - /* This opcode is reserved, but... */ - - case 0xC0: - CUR.period = GridPeriod; - break; - } - - switch ( (Int)(selector & 0x30) ) - { - case 0: - CUR.phase = 0; - break; - - case 0x10: - CUR.phase = CUR.period / 4; - break; - - case 0x20: - CUR.phase = CUR.period / 2; - break; - - case 0x30: - CUR.phase = GridPeriod * 3 / 4; - break; - } - - if ( (selector & 0x0F) == 0 ) - CUR.threshold = CUR.period - 1; - else - CUR.threshold = ( (Int)(selector & 0x0F) - 4 ) * CUR.period / 8; - - CUR.period /= 256; - CUR.phase /= 256; - CUR.threshold /= 256; - } - - -/******************************************************************* - * - * Function : Project - * - * Description : Computes the projection of vector given by (v2-v1) - * along the current projection vector. - * - * Input : v1, v2 input vector - * - * Output : Returns distance in F26dot6 format. - * - *****************************************************************/ - - static TT_F26Dot6 Project( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ) - { - TT_Int64 T1, T2; - - - MUL_64( v1->x - v2->x, CUR.GS.projVector.x, T1 ); - MUL_64( v1->y - v2->y, CUR.GS.projVector.y, T2 ); - - ADD_64( T1, T2, T1 ); - - return (TT_F26Dot6)DIV_64( T1, 0x4000L ); - } - - -/******************************************************************* - * - * Function : Dual_Project - * - * Description : Computes the projection of the vector given by - * (v2-v1) along the current dual vector. - * - * Input : v1, v2 input vector - * - * Output : Returns distance in F26dot6 format. - * - *****************************************************************/ - - static TT_F26Dot6 Dual_Project( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ) - { - TT_Int64 T1, T2; - - - MUL_64( v1->x - v2->x, CUR.GS.dualVector.x, T1 ); - MUL_64( v1->y - v2->y, CUR.GS.dualVector.y, T2 ); - - ADD_64( T1, T2, T1 ); - - return (TT_F26Dot6)DIV_64( T1, 0x4000L ); - } - - -/******************************************************************* - * - * Function : Free_Project - * - * Description : Computes the projection of the vector given by - * (v2-v1) along the current freedom vector. - * - * Input : v1, v2 input vector - * - * Output : Returns distance in F26dot6 format. - * - *****************************************************************/ - - static TT_F26Dot6 Free_Project( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ) - { - TT_Int64 T1, T2; - - - MUL_64( v1->x - v2->x, CUR.GS.freeVector.x, T1 ); - MUL_64( v1->y - v2->y, CUR.GS.freeVector.y, T2 ); - - ADD_64( T1, T2, T1 ); - - return (TT_F26Dot6)DIV_64( T1, 0x4000L ); - } - - -/******************************************************************* - * - * Function : Project_x - * - * Input : Vx, Vy input vector - * - * Output : Returns Vx. - * - * Note : Used as a dummy function. - * - *****************************************************************/ - - static TT_F26Dot6 Project_x( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ) - { - return (v1->x - v2->x); - } - - -/******************************************************************* - * - * Function : Project_y - * - * Input : Vx, Vy input vector - * - * Output : Returns Vy. - * - * Note : Used as a dummy function. - * - *****************************************************************/ - - static TT_F26Dot6 Project_y( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ) - { - return (v1->y - v2->y); - } - - -/******************************************************************* - * - * Function : Compute_Funcs - * - * Description : Computes the projections and movement function - * pointers according to the current graphics state. - * - * Input : None - * - *****************************************************************/ - - static void Compute_Funcs( EXEC_OP ) - { - if ( CUR.GS.freeVector.x == 0x4000 ) - { - CUR.func_freeProj = (TProject_Function)Project_x; - CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L; - } - else - { - if ( CUR.GS.freeVector.y == 0x4000 ) - { - CUR.func_freeProj = (TProject_Function)Project_y; - CUR.F_dot_P = CUR.GS.projVector.y * 0x10000L; - } - else - { - CUR.func_freeProj = (TProject_Function)Free_Project; - CUR.F_dot_P = (Long)CUR.GS.projVector.x * CUR.GS.freeVector.x * 4 + - (Long)CUR.GS.projVector.y * CUR.GS.freeVector.y * 4; - } - } - - CUR.cached_metrics = FALSE; - - if ( CUR.GS.projVector.x == 0x4000 ) - CUR.func_project = (TProject_Function)Project_x; - else - { - if ( CUR.GS.projVector.y == 0x4000 ) - CUR.func_project = (TProject_Function)Project_y; - else - CUR.func_project = (TProject_Function)Project; - } - - if ( CUR.GS.dualVector.x == 0x4000 ) - CUR.func_dualproj = (TProject_Function)Project_x; - else - { - if ( CUR.GS.dualVector.y == 0x4000 ) - CUR.func_dualproj = (TProject_Function)Project_y; - else - CUR.func_dualproj = (TProject_Function)Dual_Project; - } - - CUR.func_move = (TMove_Function)Direct_Move; - - if ( CUR.F_dot_P == 0x40000000L ) - { - if ( CUR.GS.freeVector.x == 0x4000 ) - CUR.func_move = (TMove_Function)Direct_Move_X; - else - { - if ( CUR.GS.freeVector.y == 0x4000 ) - CUR.func_move = (TMove_Function)Direct_Move_Y; - } - } - - /* at small sizes, F_dot_P can become too small, resulting */ - /* in overflows and 'spikes' in a number of glyphs like 'w'. */ - - if ( ABS( CUR.F_dot_P ) < 0x4000000L ) - CUR.F_dot_P = 0x40000000L; - - /* Disable cached aspect ratio */ - CUR.metrics.ratio = 0; - } - - -/******************************************************************* - * - * Function : Normalize - * - * Description : Norms a vector - * - * Input : Vx, Vy input vector - * R normed unit vector - * - * Output : Returns FAILURE if a vector parameter is zero. - * - *****************************************************************/ - - static Bool Normalize( EXEC_OPS TT_F26Dot6 Vx, - TT_F26Dot6 Vy, - TT_UnitVector* R ) - { - TT_F26Dot6 W; - Bool S1, S2; - - - if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L ) - { - Vx *= 0x100; - Vy *= 0x100; - - W = Norm( Vx, Vy ); - - if ( W == 0 ) - { - /* XXX : UNDOCUMENTED! It seems that it's possible to try */ - /* to normalize the vector (0,0). Return immediately */ - return SUCCESS; - } - - R->x = (TT_F2Dot14)TT_MulDiv( Vx, 0x4000L, W ); - R->y = (TT_F2Dot14)TT_MulDiv( Vy, 0x4000L, W ); - - return SUCCESS; - } - - W = Norm( Vx, Vy ); - - Vx = TT_MulDiv( Vx, 0x4000L, W ); - Vy = TT_MulDiv( Vy, 0x4000L, W ); - - W = Vx * Vx + Vy * Vy; - - /* Now, we want that Sqrt( W ) = 0x4000 */ - /* Or 0x1000000 <= W < 0x1004000 */ - - if ( Vx < 0 ) - { - Vx = -Vx; - S1 = TRUE; - } - else - S1 = FALSE; - - if ( Vy < 0 ) - { - Vy = -Vy; - S2 = TRUE; - } - else - S2 = FALSE; - - while ( W < 0x1000000L ) - { - /* We need to increase W, by a minimal amount */ - if ( Vx < Vy ) - Vx++; - else - Vy++; - - W = Vx * Vx + Vy * Vy; - } - - while ( W >= 0x1004000L ) - { - /* We need to decrease W, by a minimal amount */ - if ( Vx < Vy ) - Vx--; - else - Vy--; - - W = Vx * Vx + Vy * Vy; - } - - /* Note that in various cases, we can only */ - /* compute a Sqrt(W) of 0x3FFF, eg. Vx = Vy */ - - if ( S1 ) - Vx = -Vx; - - if ( S2 ) - Vy = -Vy; - - R->x = (TT_F2Dot14)Vx; /* Type conversion */ - R->y = (TT_F2Dot14)Vy; /* Type conversion */ - - return SUCCESS; - } - - -/**************************************************************** - * - * Opcodes - * - ****************************************************************/ - - - static Bool Ins_SxVTL( EXEC_OPS UShort aIdx1, - UShort aIdx2, - Int aOpc, - TT_UnitVector* Vec ) - { - Long A, B, C; - TT_Vector* p1; - TT_Vector* p2; - - - if ( BOUNDS( aIdx1, CUR.zp2.n_points ) || - BOUNDS( aIdx2, CUR.zp1.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return FAILURE; - } - - p1 = CUR.zp1.cur + aIdx2; - p2 = CUR.zp2.cur + aIdx1; - - A = p1->x - p2->x; - B = p1->y - p2->y; - - if ( (aOpc & 1) != 0 ) - { - C = B; /* CounterClockwise rotation */ - B = A; - A = -C; - } - - NORMalize( A, B, Vec ); - return SUCCESS; - } - - -/* When not using the big switch statements, the interpreter uses a */ -/* call table defined later below in this source. Each opcode must */ -/* thus have a corresponding function, even trivial ones. */ -/* */ -/* They're all defined there. */ - -#define DO_SVTCA \ - { \ - Short A, B; \ - \ - \ - A = (Short)(CUR.opcode & 1) << 14; \ - B = A ^ (Short)0x4000; \ - \ - CUR.GS.freeVector.x = A; \ - CUR.GS.projVector.x = A; \ - CUR.GS.dualVector.x = A; \ - \ - CUR.GS.freeVector.y = B; \ - CUR.GS.projVector.y = B; \ - CUR.GS.dualVector.y = B; \ - \ - COMPUTE_Funcs(); \ - } - - -#define DO_SPVTCA \ - { \ - Short A, B; \ - \ - \ - A = (Short)(CUR.opcode & 1) << 14; \ - B = A ^ (Short)0x4000; \ - \ - CUR.GS.projVector.x = A; \ - CUR.GS.dualVector.x = A; \ - \ - CUR.GS.projVector.y = B; \ - CUR.GS.dualVector.y = B; \ - \ - COMPUTE_Funcs(); \ - } - - -#define DO_SFVTCA \ - { \ - Short A, B; \ - \ - \ - A = (Short)(CUR.opcode & 1) << 14; \ - B = A ^ (Short)0x4000; \ - \ - CUR.GS.freeVector.x = A; \ - CUR.GS.freeVector.y = B; \ - \ - COMPUTE_Funcs(); \ - } - - -#define DO_SPVTL \ - if ( INS_SxVTL( (UShort)args[1], \ - (UShort)args[0], \ - CUR.opcode, \ - &CUR.GS.projVector) == SUCCESS ) \ - { \ - CUR.GS.dualVector = CUR.GS.projVector; \ - COMPUTE_Funcs(); \ - } - - -#define DO_SFVTL \ - if ( INS_SxVTL( (UShort)args[1], \ - (UShort)args[0], \ - CUR.opcode, \ - &CUR.GS.freeVector) == SUCCESS ) \ - COMPUTE_Funcs(); - - -#define DO_SFVTPV \ - CUR.GS.freeVector = CUR.GS.projVector; \ - COMPUTE_Funcs(); - - -#define DO_SPVFS \ - { \ - Short S; \ - Long X, Y; \ - \ - \ - /* Only use low 16bits, then sign extend */ \ - S = (Short)args[1]; \ - Y = (Long)S; \ - S = (Short)args[0]; \ - X = (Long)S; \ - \ - NORMalize( X, Y, &CUR.GS.projVector ); \ - \ - CUR.GS.dualVector = CUR.GS.projVector; \ - COMPUTE_Funcs(); \ - } - - -#define DO_SFVFS \ - { \ - Short S; \ - Long X, Y; \ - \ - \ - /* Only use low 16bits, then sign extend */ \ - S = (Short)args[1]; \ - Y = (Long)S; \ - S = (Short)args[0]; \ - X = S; \ - \ - NORMalize( X, Y, &CUR.GS.freeVector ); \ - COMPUTE_Funcs(); \ - } - - -#define DO_GPV \ - args[0] = CUR.GS.projVector.x; \ - args[1] = CUR.GS.projVector.y; - - -#define DO_GFV \ - args[0] = CUR.GS.freeVector.x; \ - args[1] = CUR.GS.freeVector.y; - - -#define DO_SRP0 \ - CUR.GS.rp0 = (UShort)args[0]; - - -#define DO_SRP1 \ - CUR.GS.rp1 = (UShort)args[0]; - - -#define DO_SRP2 \ - CUR.GS.rp2 = (UShort)args[0]; - - -#define DO_RTHG \ - CUR.GS.round_state = TT_Round_To_Half_Grid; \ - CUR.func_round = (TRound_Function)Round_To_Half_Grid; - - -#define DO_RTG \ - CUR.GS.round_state = TT_Round_To_Grid; \ - CUR.func_round = (TRound_Function)Round_To_Grid; - - -#define DO_RTDG \ - CUR.GS.round_state = TT_Round_To_Double_Grid; \ - CUR.func_round = (TRound_Function)Round_To_Double_Grid; - - -#define DO_RUTG \ - CUR.GS.round_state = TT_Round_Up_To_Grid; \ - CUR.func_round = (TRound_Function)Round_Up_To_Grid; - - -#define DO_RDTG \ - CUR.GS.round_state = TT_Round_Down_To_Grid; \ - CUR.func_round = (TRound_Function)Round_Down_To_Grid; - - -#define DO_ROFF \ - CUR.GS.round_state = TT_Round_Off; \ - CUR.func_round = (TRound_Function)Round_None; - - -#define DO_SROUND \ - SET_SuperRound( 0x4000L, args[0] ); \ - CUR.GS.round_state = TT_Round_Super; \ - CUR.func_round = (TRound_Function)Round_Super; - - -#define DO_S45ROUND \ - SET_SuperRound( 0x2D41L, args[0] ); \ - CUR.GS.round_state = TT_Round_Super_45; \ - CUR.func_round = (TRound_Function)Round_Super_45; - - -#define DO_SLOOP \ - if ( args[0] < 0 ) \ - CUR.error = TT_Err_Bad_Argument; \ - else \ - CUR.GS.loop = args[0]; - - -#define DO_SMD \ - CUR.GS.minimum_distance = (TT_F26Dot6)args[0]; - - -#define DO_SCVTCI \ - CUR.GS.control_value_cutin = (TT_F26Dot6)args[0]; - - -#define DO_SSWCI \ - CUR.GS.single_width_cutin = (TT_F26Dot6)args[0]; - - - /* XXX : UNDOCUMENTED! or bug in the Windows engine? */ - /* */ - /* It seems that the value that is read here is */ - /* expressed in 16.16 format, rather than in */ - /* font units.. */ - /* */ -#define DO_SSW \ - CUR.GS.single_width_value = (TT_F26Dot6)(args[0] >> 10); - - -#define DO_FLIPON \ - CUR.GS.auto_flip = TRUE; - - -#define DO_FLIPOFF \ - CUR.GS.auto_flip = FALSE; - - -#define DO_SDB \ - CUR.GS.delta_base = (Short)args[0]; - - -#define DO_SDS \ - CUR.GS.delta_shift = (Short)args[0]; - - -#define DO_MD /* nothing */ - - -#define DO_MPPEM \ - args[0] = CURRENT_Ppem(); - - -#define DO_MPS \ - args[0] = CUR.metrics.pointSize; - - -#define DO_DUP \ - args[1] = args[0]; - - -#define DO_CLEAR \ - CUR.new_top = 0; - - -#define DO_SWAP \ - { \ - Long L; \ - \ - L = args[0]; \ - args[0] = args[1]; \ - args[1] = L; \ - } - - -#define DO_DEPTH \ - args[0] = CUR.top; - - -#define DO_CINDEX \ - { \ - Long L; \ - \ - \ - L = args[0]; \ - \ - if ( L <= 0 || L > CUR.args ) \ - CUR.error = TT_Err_Invalid_Reference; \ - else \ - args[0] = CUR.stack[CUR.args - L]; \ - } - - -#define DO_JROT \ - if ( args[1] != 0 ) \ - { \ - CUR.IP += args[0]; \ - CUR.step_ins = FALSE; \ - } - - -#define DO_JMPR \ - CUR.IP += args[0]; \ - CUR.step_ins = FALSE; - - -#define DO_JROF \ - if ( args[1] == 0 ) \ - { \ - CUR.IP += args[0]; \ - CUR.step_ins = FALSE; \ - } - - -#define DO_LT \ - args[0] = (args[0] < args[1]); - - -#define DO_LTEQ \ - args[0] = (args[0] <= args[1]); - - -#define DO_GT \ - args[0] = (args[0] > args[1]); - - -#define DO_GTEQ \ - args[0] = (args[0] >= args[1]); - - -#define DO_EQ \ - args[0] = (args[0] == args[1]); - - -#define DO_NEQ \ - args[0] = (args[0] != args[1]); - - -#define DO_ODD \ - args[0] = ( (CUR_Func_round( args[0], 0 ) & 127) == 64 ); - - -#define DO_EVEN \ - args[0] = ( (CUR_Func_round( args[0], 0 ) & 127) == 0 ); - - -#define DO_AND \ - args[0] = ( args[0] && args[1] ); - - -#define DO_OR \ - args[0] = ( args[0] || args[1] ); - - -#define DO_NOT \ - args[0] = !args[0]; - - -#define DO_ADD \ - args[0] += args[1]; - - -#define DO_SUB \ - args[0] -= args[1]; - - -#define DO_DIV \ - if ( args[1] == 0 ) \ - CUR.error = TT_Err_Divide_By_Zero; \ - else \ - args[0] = TT_MulDiv( args[0], 64L, args[1] ); - - -#define DO_MUL \ - args[0] = TT_MulDiv( args[0], args[1], 64L ); - - -#define DO_ABS \ - args[0] = ABS( args[0] ); - - -#define DO_NEG \ - args[0] = -args[0]; - - -#define DO_FLOOR \ - args[0] &= -64; - - -#define DO_CEILING \ - args[0] = (args[0] + 63) & (-64); - - -#define DO_RS \ - { \ - ULong I = (ULong)args[0]; \ - if ( BOUNDS( I, CUR.storeSize ) ) \ - { \ - if ( CUR.pedantic_hinting ) \ - { \ - ARRAY_BOUND_ERROR; \ - } \ - else \ - args[0] = 0; \ - } \ - else \ - args[0] = CUR.storage[I]; \ - } - - -#define DO_WS \ - { \ - ULong I = (ULong)args[0]; \ - if ( BOUNDS( I, CUR.storeSize ) ) \ - { \ - if ( CUR.pedantic_hinting ) \ - { \ - ARRAY_BOUND_ERROR; \ - } \ - } \ - else \ - CUR.storage[I] = args[1]; \ - } - - - -#define DO_RCVT \ - { \ - ULong I = (ULong)args[0]; \ - if ( BOUNDS( I, CUR.cvtSize ) ) \ - { \ - if ( CUR.pedantic_hinting ) \ - { \ - ARRAY_BOUND_ERROR; \ - } \ - else \ - args[0] = 0; \ - } \ - else \ - args[0] = CUR_Func_read_cvt(I); \ - } - - -#define DO_WCVTP \ - { \ - ULong I = (ULong)args[0]; \ - if ( BOUNDS( I, CUR.cvtSize ) ) \ - { \ - if ( CUR.pedantic_hinting ) \ - { \ - ARRAY_BOUND_ERROR; \ - } \ - } \ - else \ - CUR_Func_write_cvt( I, args[1] ); \ - } - - -#define DO_WCVTF \ - { \ - ULong I = (ULong)args[0]; \ - if ( BOUNDS( I, CUR.cvtSize ) ) \ - { \ - if ( CUR.pedantic_hinting ) \ - { \ - ARRAY_BOUND_ERROR; \ - } \ - } \ - else \ - CUR.cvt[I] = FUnits_To_Pixels( EXEC_ARGS (Short)args[1] ); \ - } - - -#define DO_DEBUG \ - CUR.error = TT_Err_Debug_OpCode; - - -#define DO_ROUND \ - args[0] = CUR_Func_round( args[0], \ - CUR.metrics.compensations[CUR.opcode-0x68] ); - - -#define DO_NROUND \ - args[0] = Round_None( EXEC_ARGS \ - args[0], \ - CUR.metrics.compensations[CUR.opcode - 0x6C] ); - - -#define DO_MAX \ - if ( args[1] > args[0] ) \ - args[0] = args[1]; - - -#define DO_MIN \ - if ( args[1] < args[0] ) \ - args[0] = args[1]; - - -#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -#undef ARRAY_BOUND_ERROR -#define ARRAY_BOUND_ERROR \ - { \ - CUR.error = TT_Err_Invalid_Reference; \ - return; \ - } - - -/*******************************************/ -/* SVTCA[a] : Set F and P vectors to axis */ -/* CodeRange : $00-$01 */ -/* Stack : --> */ - - static void Ins_SVTCA( INS_ARG ) - { - DO_SVTCA - } - - -/*******************************************/ -/* SPVTCA[a] : Set PVector to Axis */ -/* CodeRange : $02-$03 */ -/* Stack : --> */ - - static void Ins_SPVTCA( INS_ARG ) - { - DO_SPVTCA - } - - -/*******************************************/ -/* SFVTCA[a] : Set FVector to Axis */ -/* CodeRange : $04-$05 */ -/* Stack : --> */ - - static void Ins_SFVTCA( INS_ARG ) - { - DO_SFVTCA - } - -/*******************************************/ -/* SPVTL[a] : Set PVector to Line */ -/* CodeRange : $06-$07 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_SPVTL( INS_ARG ) - { - DO_SPVTL - } - - -/*******************************************/ -/* SFVTL[a] : Set FVector to Line */ -/* CodeRange : $08-$09 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_SFVTL( INS_ARG ) - { - DO_SFVTL - } - - -/*******************************************/ -/* SFVTPV[] : Set FVector to PVector */ -/* CodeRange : $0E */ -/* Stack : --> */ - - static void Ins_SFVTPV( INS_ARG ) - { - DO_SFVTPV - } - - -/*******************************************/ -/* SPVFS[] : Set PVector From Stack */ -/* CodeRange : $0A */ -/* Stack : f2.14 f2.14 --> */ - - static void Ins_SPVFS( INS_ARG ) - { - DO_SPVFS - } - - -/*******************************************/ -/* SFVFS[] : Set FVector From Stack */ -/* CodeRange : $0B */ -/* Stack : f2.14 f2.14 --> */ - - static void Ins_SFVFS( INS_ARG ) - { - DO_SFVFS - } - - -/*******************************************/ -/* GPV[] : Get Projection Vector */ -/* CodeRange : $0C */ -/* Stack : ef2.14 --> ef2.14 */ - - static void Ins_GPV( INS_ARG ) - { - DO_GPV - } - - -/*******************************************/ -/* GFV[] : Get Freedom Vector */ -/* CodeRange : $0D */ -/* Stack : ef2.14 --> ef2.14 */ - - static void Ins_GFV( INS_ARG ) - { - DO_GFV - } - - -/*******************************************/ -/* SRP0[] : Set Reference Point 0 */ -/* CodeRange : $10 */ -/* Stack : uint32 --> */ - - static void Ins_SRP0( INS_ARG ) - { - DO_SRP0 - } - - -/*******************************************/ -/* SRP1[] : Set Reference Point 1 */ -/* CodeRange : $11 */ -/* Stack : uint32 --> */ - - static void Ins_SRP1( INS_ARG ) - { - DO_SRP1 - } - - -/*******************************************/ -/* SRP2[] : Set Reference Point 2 */ -/* CodeRange : $12 */ -/* Stack : uint32 --> */ - - static void Ins_SRP2( INS_ARG ) - { - DO_SRP2 - } - - -/*******************************************/ -/* RTHG[] : Round To Half Grid */ -/* CodeRange : $19 */ -/* Stack : --> */ - - static void Ins_RTHG( INS_ARG ) - { - DO_RTHG - } - - -/*******************************************/ -/* RTG[] : Round To Grid */ -/* CodeRange : $18 */ -/* Stack : --> */ - - static void Ins_RTG( INS_ARG ) - { - DO_RTG - } - - -/*******************************************/ -/* RTDG[] : Round To Double Grid */ -/* CodeRange : $3D */ -/* Stack : --> */ - - static void Ins_RTDG( INS_ARG ) - { - DO_RTDG - } - - -/*******************************************/ -/* RUTG[] : Round Up To Grid */ -/* CodeRange : $7C */ -/* Stack : --> */ - - static void Ins_RUTG( INS_ARG ) - { - DO_RUTG - } - - -/*******************************************/ -/* RDTG[] : Round Down To Grid */ -/* CodeRange : $7D */ -/* Stack : --> */ - - static void Ins_RDTG( INS_ARG ) - { - DO_RDTG - } - - -/*******************************************/ -/* ROFF[] : Round OFF */ -/* CodeRange : $7A */ -/* Stack : --> */ - - static void Ins_ROFF( INS_ARG ) - { - DO_ROFF - } - - -/*******************************************/ -/* SROUND[] : Super ROUND */ -/* CodeRange : $76 */ -/* Stack : Eint8 --> */ - - static void Ins_SROUND( INS_ARG ) - { - DO_SROUND - } - - -/*******************************************/ -/* S45ROUND[]: Super ROUND 45 degrees */ -/* CodeRange : $77 */ -/* Stack : uint32 --> */ - - static void Ins_S45ROUND( INS_ARG ) - { - DO_S45ROUND - } - - -/*******************************************/ -/* SLOOP[] : Set LOOP variable */ -/* CodeRange : $17 */ -/* Stack : int32? --> */ - - static void Ins_SLOOP( INS_ARG ) - { - DO_SLOOP - } - - -/*******************************************/ -/* SMD[] : Set Minimum Distance */ -/* CodeRange : $1A */ -/* Stack : f26.6 --> */ - - static void Ins_SMD( INS_ARG ) - { - DO_SMD - } - - -/**********************************************/ -/* SCVTCI[] : Set Control Value Table Cut In */ -/* CodeRange : $1D */ -/* Stack : f26.6 --> */ - - static void Ins_SCVTCI( INS_ARG ) - { - DO_SCVTCI - } - - -/**********************************************/ -/* SSWCI[] : Set Single Width Cut In */ -/* CodeRange : $1E */ -/* Stack : f26.6 --> */ - - static void Ins_SSWCI( INS_ARG ) - { - DO_SSWCI - } - - -/**********************************************/ -/* SSW[] : Set Single Width */ -/* CodeRange : $1F */ -/* Stack : int32? --> */ - - static void Ins_SSW( INS_ARG ) - { - DO_SSW - } - - -/**********************************************/ -/* FLIPON[] : Set Auto_flip to On */ -/* CodeRange : $4D */ -/* Stack : --> */ - - static void Ins_FLIPON( INS_ARG ) - { - DO_FLIPON - } - - -/**********************************************/ -/* FLIPOFF[] : Set Auto_flip to Off */ -/* CodeRange : $4E */ -/* Stack : --> */ - - static void Ins_FLIPOFF( INS_ARG ) - { - DO_FLIPOFF - } - - -/**********************************************/ -/* SANGW[] : Set Angle Weight */ -/* CodeRange : $7E */ -/* Stack : uint32 --> */ - - static void Ins_SANGW( INS_ARG ) - { - /* instruction not supported anymore */ - } - - -/**********************************************/ -/* SDB[] : Set Delta Base */ -/* CodeRange : $5E */ -/* Stack : uint32 --> */ - - static void Ins_SDB( INS_ARG ) - { - DO_SDB - } - - -/**********************************************/ -/* SDS[] : Set Delta Shift */ -/* CodeRange : $5F */ -/* Stack : uint32 --> */ - - static void Ins_SDS( INS_ARG ) - { - DO_SDS - } - - -/**********************************************/ -/* MPPEM[] : Measure Pixel Per EM */ -/* CodeRange : $4B */ -/* Stack : --> Euint16 */ - - static void Ins_MPPEM( INS_ARG ) - { - DO_MPPEM - } - - -/**********************************************/ -/* MPS[] : Measure PointSize */ -/* CodeRange : $4C */ -/* Stack : --> Euint16 */ - - static void Ins_MPS( INS_ARG ) - { - DO_MPS - } - -/*******************************************/ -/* DUP[] : Duplicate top stack element */ -/* CodeRange : $20 */ -/* Stack : StkElt --> StkElt StkElt */ - - static void Ins_DUP( INS_ARG ) - { - DO_DUP - } - - -/*******************************************/ -/* POP[] : POPs the stack's top elt. */ -/* CodeRange : $21 */ -/* Stack : StkElt --> */ - - static void Ins_POP( INS_ARG ) - { - /* nothing to do */ - } - - -/*******************************************/ -/* CLEAR[] : Clear the entire stack */ -/* CodeRange : $22 */ -/* Stack : StkElt... --> */ - - static void Ins_CLEAR( INS_ARG ) - { - DO_CLEAR - } - - -/*******************************************/ -/* SWAP[] : Swap the top two elements */ -/* CodeRange : $23 */ -/* Stack : 2 * StkElt --> 2 * StkElt */ - - static void Ins_SWAP( INS_ARG ) - { - DO_SWAP - } - - -/*******************************************/ -/* DEPTH[] : return the stack depth */ -/* CodeRange : $24 */ -/* Stack : --> uint32 */ - - static void Ins_DEPTH( INS_ARG ) - { - DO_DEPTH - } - - -/*******************************************/ -/* CINDEX[] : copy indexed element */ -/* CodeRange : $25 */ -/* Stack : int32 --> StkElt */ - - static void Ins_CINDEX( INS_ARG ) - { - DO_CINDEX - } - - -/*******************************************/ -/* EIF[] : End IF */ -/* CodeRange : $59 */ -/* Stack : --> */ - - static void Ins_EIF( INS_ARG ) - { - /* nothing to do */ - } - - -/*******************************************/ -/* JROT[] : Jump Relative On True */ -/* CodeRange : $78 */ -/* Stack : StkElt int32 --> */ - - static void Ins_JROT( INS_ARG ) - { - DO_JROT - } - - -/*******************************************/ -/* JMPR[] : JuMP Relative */ -/* CodeRange : $1C */ -/* Stack : int32 --> */ - - static void Ins_JMPR( INS_ARG ) - { - DO_JMPR - } - - -/*******************************************/ -/* JROF[] : Jump Relative On False */ -/* CodeRange : $79 */ -/* Stack : StkElt int32 --> */ - - static void Ins_JROF( INS_ARG ) - { - DO_JROF - } - - -/*******************************************/ -/* LT[] : Less Than */ -/* CodeRange : $50 */ -/* Stack : int32? int32? --> bool */ - - static void Ins_LT( INS_ARG ) - { - DO_LT - } - - -/*******************************************/ -/* LTEQ[] : Less Than or EQual */ -/* CodeRange : $51 */ -/* Stack : int32? int32? --> bool */ - - static void Ins_LTEQ( INS_ARG ) - { - DO_LTEQ - } - - -/*******************************************/ -/* GT[] : Greater Than */ -/* CodeRange : $52 */ -/* Stack : int32? int32? --> bool */ - - static void Ins_GT( INS_ARG ) - { - DO_GT - } - - -/*******************************************/ -/* GTEQ[] : Greater Than or EQual */ -/* CodeRange : $53 */ -/* Stack : int32? int32? --> bool */ - - static void Ins_GTEQ( INS_ARG ) - { - DO_GTEQ - } - - -/*******************************************/ -/* EQ[] : EQual */ -/* CodeRange : $54 */ -/* Stack : StkElt StkElt --> bool */ - - static void Ins_EQ( INS_ARG ) - { - DO_EQ - } - - -/*******************************************/ -/* NEQ[] : Not EQual */ -/* CodeRange : $55 */ -/* Stack : StkElt StkElt --> bool */ - - static void Ins_NEQ( INS_ARG ) - { - DO_NEQ - } - - -/*******************************************/ -/* ODD[] : Odd */ -/* CodeRange : $56 */ -/* Stack : f26.6 --> bool */ - - static void Ins_ODD( INS_ARG ) - { - DO_ODD - } - - -/*******************************************/ -/* EVEN[] : Even */ -/* CodeRange : $57 */ -/* Stack : f26.6 --> bool */ - - static void Ins_EVEN( INS_ARG ) - { - DO_EVEN - } - - -/*******************************************/ -/* AND[] : logical AND */ -/* CodeRange : $5A */ -/* Stack : uint32 uint32 --> uint32 */ - - static void Ins_AND( INS_ARG ) - { - DO_AND - } - - -/*******************************************/ -/* OR[] : logical OR */ -/* CodeRange : $5B */ -/* Stack : uint32 uint32 --> uint32 */ - - static void Ins_OR( INS_ARG ) - { - DO_OR - } - - -/*******************************************/ -/* NOT[] : logical NOT */ -/* CodeRange : $5C */ -/* Stack : StkElt --> uint32 */ - - static void Ins_NOT( INS_ARG ) - { - DO_NOT - } - - -/*******************************************/ -/* ADD[] : ADD */ -/* CodeRange : $60 */ -/* Stack : f26.6 f26.6 --> f26.6 */ - - static void Ins_ADD( INS_ARG ) - { - DO_ADD - } - - -/*******************************************/ -/* SUB[] : SUBstract */ -/* CodeRange : $61 */ -/* Stack : f26.6 f26.6 --> f26.6 */ - - static void Ins_SUB( INS_ARG ) - { - DO_SUB - } - - -/*******************************************/ -/* DIV[] : DIVide */ -/* CodeRange : $62 */ -/* Stack : f26.6 f26.6 --> f26.6 */ - - static void Ins_DIV( INS_ARG ) - { - DO_DIV - } - - -/*******************************************/ -/* MUL[] : MULtiply */ -/* CodeRange : $63 */ -/* Stack : f26.6 f26.6 --> f26.6 */ - - static void Ins_MUL( INS_ARG ) - { - DO_MUL - } - - -/*******************************************/ -/* ABS[] : ABSolute value */ -/* CodeRange : $64 */ -/* Stack : f26.6 --> f26.6 */ - - static void Ins_ABS( INS_ARG ) - { - DO_ABS - } - - -/*******************************************/ -/* NEG[] : NEGate */ -/* CodeRange : $65 */ -/* Stack : f26.6 --> f26.6 */ - - static void Ins_NEG( INS_ARG ) - { - DO_NEG - } - - -/*******************************************/ -/* FLOOR[] : FLOOR */ -/* CodeRange : $66 */ -/* Stack : f26.6 --> f26.6 */ - - static void Ins_FLOOR( INS_ARG ) - { - DO_FLOOR - } - - -/*******************************************/ -/* CEILING[] : CEILING */ -/* CodeRange : $67 */ -/* f26.6 --> f26.6 */ - - static void Ins_CEILING( INS_ARG ) - { - DO_CEILING - } - -/*******************************************/ -/* RS[] : Read Store */ -/* CodeRange : $43 */ -/* Stack : uint32 --> uint32 */ - - static void Ins_RS( INS_ARG ) - { - DO_RS - } - - -/*******************************************/ -/* WS[] : Write Store */ -/* CodeRange : $42 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_WS( INS_ARG ) - { - DO_WS - } - - -/*******************************************/ -/* WCVTP[] : Write CVT in Pixel units */ -/* CodeRange : $44 */ -/* Stack : f26.6 uint32 --> */ - - static void Ins_WCVTP( INS_ARG ) - { - DO_WCVTP - } - - -/*******************************************/ -/* WCVTF[] : Write CVT in FUnits */ -/* CodeRange : $70 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_WCVTF( INS_ARG ) - { - DO_WCVTF - } - - -/*******************************************/ -/* RCVT[] : Read CVT */ -/* CodeRange : $45 */ -/* Stack : uint32 --> f26.6 */ - - static void Ins_RCVT( INS_ARG ) - { - DO_RCVT - } - - -/********************************************/ -/* AA[] : Adjust Angle */ -/* CodeRange : $7F */ -/* Stack : uint32 --> */ - - static void Ins_AA( INS_ARG ) - { - /* Intentional - no longer supported */ - } - - -/********************************************/ -/* DEBUG[] : DEBUG. Unsupported */ -/* CodeRange : $4F */ -/* Stack : uint32 --> */ - -/* NOTE : The original instruction pops a value from the stack */ - - static void Ins_DEBUG( INS_ARG ) - { - DO_DEBUG - } - -/*******************************************/ -/* ROUND[ab] : ROUND value */ -/* CodeRange : $68-$6B */ -/* Stack : f26.6 --> f26.6 */ - - static void Ins_ROUND( INS_ARG ) - { - DO_ROUND - } - -/*******************************************/ -/* NROUND[ab]: No ROUNDing of value */ -/* CodeRange : $6C-$6F */ -/* Stack : f26.6 --> f26.6 */ - - static void Ins_NROUND( INS_ARG ) - { - DO_NROUND - } - - - -/*******************************************/ -/* MAX[] : MAXimum */ -/* CodeRange : $68 */ -/* Stack : int32? int32? --> int32 */ - - static void Ins_MAX( INS_ARG ) - { - DO_MAX - } - - -/*******************************************/ -/* MIN[] : MINimum */ -/* CodeRange : $69 */ -/* Stack : int32? int32? --> int32 */ - - static void Ins_MIN( INS_ARG ) - { - DO_MIN - } - - -#endif /* !TT_CONFIG_OPTION_INTERPRETER_SWITCH */ - - -/* The following functions are called as is within the switch statement */ - -/*******************************************/ -/* MINDEX[] : move indexed element */ -/* CodeRange : $26 */ -/* Stack : int32? --> StkElt */ - - static void Ins_MINDEX( INS_ARG ) - { - Long L, K; - - - L = args[0]; - - if ( L <= 0 || L > CUR.args ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - K = CUR.stack[CUR.args - L]; - - MEM_Move( (&CUR.stack[CUR.args - L ]), - (&CUR.stack[CUR.args - L + 1]), - (L - 1) * sizeof ( Long ) ); - - CUR.stack[CUR.args - 1] = K; - } - - -/*******************************************/ -/* ROLL[] : roll top three elements */ -/* CodeRange : $8A */ -/* Stack : 3 * StkElt --> 3 * StkElt */ - - static void Ins_ROLL( INS_ARG ) - { - Long A, B, C; - - - A = args[2]; - B = args[1]; - C = args[0]; - - args[2] = C; - args[1] = A; - args[0] = B; - } - - - -/****************************************************************/ -/* */ -/* MANAGING THE FLOW OF CONTROL */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - - static Bool SkipCode( EXEC_OP ) - { - CUR.IP += CUR.length; - - if ( CUR.IP < CUR.codeSize ) - if ( CALC_Length() == SUCCESS ) - return SUCCESS; - - CUR.error = TT_Err_Code_Overflow; - return FAILURE; - } - - -/*******************************************/ -/* IF[] : IF test */ -/* CodeRange : $58 */ -/* Stack : StkElt --> */ - - static void Ins_IF( INS_ARG ) - { - Int nIfs; - Bool Out; - - - if ( args[0] != 0 ) - return; - - nIfs = 1; - Out = 0; - - do - { - if ( SKIP_Code() == FAILURE ) - return; - - switch ( CUR.opcode ) - { - case 0x58: /* IF */ - nIfs++; - break; - - case 0x1b: /* ELSE */ - Out = (nIfs == 1); - break; - - case 0x59: /* EIF */ - nIfs--; - Out = (nIfs == 0); - break; - } - } while ( Out == 0 ); - } - - -/*******************************************/ -/* ELSE[] : ELSE */ -/* CodeRange : $1B */ -/* Stack : --> */ - - static void Ins_ELSE( INS_ARG ) - { - Int nIfs; - - - nIfs = 1; - - do - { - if ( SKIP_Code() == FAILURE ) - return; - - switch ( CUR.opcode ) - { - case 0x58: /* IF */ - nIfs++; - break; - - case 0x59: /* EIF */ - nIfs--; - break; - } - } while ( nIfs != 0 ); - } - - -/****************************************************************/ -/* */ -/* DEFINING AND USING FUNCTIONS AND INSTRUCTIONS */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - - static PDefRecord Locate_FDef( EXEC_OPS Int n, Bool new_def ) - { - PDefRecord def; - UShort hash; - UShort cnt; - - /* The function table is interpreted as a simple hash table */ - /* with indexes computed modulo maxFDefs and the linear search */ - /* of free cells in the case of a collision. */ - /* Except for some old Apple fonts, all functions in a TrueType */ - /* font fit into 0..maxFDefs - 1 range and the lookup is */ - /* reduced to a single step. */ - - /* Minor optimization. */ - if ( !new_def && ( n < 0 || n > CUR.maxFunc ) ) - return NULL; - - for ( cnt = 0; cnt < CUR.maxFDefs; ++cnt ) - { - hash = ( (UShort)n + cnt ) % CUR.maxFDefs; - def = &CUR.FDefs[ hash ]; - if ( !def->Active ) - return new_def ? def : NULL; - if ( def->Opc == n ) - return def; - } - - /* The table is full and the entry has not been found. */ - return NULL; - } - - -/*******************************************/ -/* FDEF[] : Function DEFinition */ -/* CodeRange : $2C */ -/* Stack : uint32 --> */ - - static void Ins_FDEF( INS_ARG ) - { - Int n; - PDefRecord def; - - - /* check that there is enough room */ - if ( CUR.numFDefs >= CUR.maxFDefs ) - { - /* We could introduce a new error message, but we're too close */ - /* from the release to change all the 'po' files again.. */ - CUR.error = TT_Err_Too_Many_Ins; - return; - } - - n = (Int)args[0]; - if ( n < 0 || (ULong)n != args[0] ) - { - /* Gotcha. Function index is uint32 according to the specs */ - /* but TDefRecord.Opc is defined as Int. We cannot store */ - /* the definition of this function. */ - CUR.error = TT_Err_Bad_Argument; - return; - } - - def = Locate_FDef( EXEC_ARGS n, TRUE ); - if ( !def ) - { - /* Oh, oh. Something is wrong. Locate_FDef should never fail here. */ - CUR.error = TT_Err_Too_Many_Ins; - return; - } - - /* Some font programs are broken enough to redefine functions! */ - if ( !def->Active ) - CUR.numFDefs++; - - def->Range = CUR.curRange; - def->Opc = n; - def->Start = CUR.IP + 1; - def->Active = TRUE; - - if ( n > CUR.maxFunc ) - CUR.maxFunc = n; - - /* Now skip the whole function definition. */ - /* We don't allow nested IDEFS & FDEFs. */ - - while ( SKIP_Code() == SUCCESS ) - { - switch ( CUR.opcode ) - { - case 0x89: /* IDEF */ - case 0x2c: /* FDEF */ - CUR.error = TT_Err_Nested_DEFS; - return; - case 0x2d: /* ENDF */ - return; - } - } - } - - -/*******************************************/ -/* ENDF[] : END Function definition */ -/* CodeRange : $2D */ -/* Stack : --> */ - - static void Ins_ENDF( INS_ARG ) - { - PCallRecord pRec; - - - if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */ - { - CUR.error = TT_Err_ENDF_In_Exec_Stream; - return; - } - - CUR.callTop--; - - pRec = &CUR.callStack[CUR.callTop]; - - pRec->Cur_Count--; - - CUR.step_ins = FALSE; - - if ( pRec->Cur_Count > 0 ) - { - CUR.callTop++; - CUR.IP = pRec->Cur_Restart; - } - else - /* Loop through the current function */ - INS_Goto_CodeRange( pRec->Caller_Range, - pRec->Caller_IP ); - - /* Exit the current call frame. */ - - /* NOTE: When the last intruction of a program */ - /* is a CALL or LOOPCALL, the return address */ - /* is always out of the code range. This is */ - /* a valid address, and it's why we do not test */ - /* the result of Ins_Goto_CodeRange() here! */ - } - - -/*******************************************/ -/* CALL[] : CALL function */ -/* CodeRange : $2B */ -/* Stack : uint32? --> */ - - static void Ins_CALL( INS_ARG ) - { - Int n; - PDefRecord def; - PCallRecord pCrec; - - - n = (Int)args[0]; - def = Locate_FDef( EXEC_ARGS n, FALSE ); - if ( !def ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* check call stack */ - if ( CUR.callTop >= CUR.callSize ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - pCrec = CUR.callStack + CUR.callTop; - - pCrec->Caller_Range = CUR.curRange; - pCrec->Caller_IP = CUR.IP + 1; - pCrec->Cur_Count = 1; - pCrec->Cur_Restart = def->Start; - - CUR.callTop++; - - INS_Goto_CodeRange( def->Range, - def->Start ); - - CUR.step_ins = FALSE; - } - - -/*******************************************/ -/* LOOPCALL[]: LOOP and CALL function */ -/* CodeRange : $2A */ -/* Stack : uint32? Eint16? --> */ - - static void Ins_LOOPCALL( INS_ARG ) - { - Int n; - Long count; - PDefRecord def; - PCallRecord pTCR; - - - n = (Int)args[1]; - def = Locate_FDef( EXEC_ARGS n, FALSE ); - if ( !def ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( CUR.callTop >= CUR.callSize ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - count = (Long)args[0]; - if ( count <= 0 ) - return; - - pTCR = &CUR.callStack[CUR.callTop]; - - pTCR->Caller_Range = CUR.curRange; - pTCR->Caller_IP = CUR.IP + 1; - pTCR->Cur_Count = count; - pTCR->Cur_Restart = def->Start; - - CUR.callTop++; - - INS_Goto_CodeRange( def->Range, - def->Start ); - - CUR.step_ins = FALSE; - } - - -/*******************************************/ -/* IDEF[] : Instruction DEFinition */ -/* CodeRange : $89 */ -/* Stack : Eint8 --> */ - - static void Ins_IDEF( INS_ARG ) - { - Byte opcode; - PDefRecord def; - PDefRecord limit; - - - opcode = (Byte)args[0]; - - /* First of all, look for the same instruction in our table */ - def = CUR.IDefs; - limit = def + CUR.numIDefs; - for ( ; def < limit; def++ ) - if ( def->Opc == opcode ) - break; - - if ( def == limit ) - { - /* check that there is enough room for a new instruction */ - if ( CUR.numIDefs >= CUR.maxIDefs ) - { - /* XXX Bad error code. See FDEF[]. */ - CUR.error = TT_Err_Too_Many_Ins; - return; - } - CUR.numIDefs++; - } - - def->Opc = opcode; - def->Start = CUR.IP + 1; - def->Range = CUR.curRange; - def->Active = TRUE; - - if ( opcode > CUR.maxIns ) - CUR.maxIns = opcode; - - /* Now skip the whole function definition */ - /* We don't allow nested IDEFs & FDEFs. */ - - while ( SKIP_Code() == SUCCESS ) - { - switch ( CUR.opcode ) - { - case 0x89: /* IDEF */ - case 0x2c: /* FDEF */ - CUR.error = TT_Err_Nested_DEFS; - return; - case 0x2d: /* ENDF */ - return; - } - } - } - - -/****************************************************************/ -/* */ -/* PUSHING DATA ONTO THE INTERPRETER STACK */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - -/*******************************************/ -/* NPUSHB[] : PUSH N Bytes */ -/* CodeRange : $40 */ -/* Stack : --> uint32... */ - - static void Ins_NPUSHB( INS_ARG ) - { - UShort L, K; - - - L = (UShort)CUR.code[CUR.IP + 1]; - - if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - for ( K = 1; K <= L; K++ ) - args[K - 1] = CUR.code[CUR.IP + K + 1]; - - CUR.new_top += L; - } - - -/*******************************************/ -/* NPUSHW[] : PUSH N Words */ -/* CodeRange : $41 */ -/* Stack : --> int32... */ - - static void Ins_NPUSHW( INS_ARG ) - { - UShort L, K; - - - L = (UShort)CUR.code[CUR.IP + 1]; - - if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - CUR.IP += 2; - - for ( K = 0; K < L; K++ ) - args[K] = GET_ShortIns(); - - CUR.step_ins = FALSE; - CUR.new_top += L; - } - - -/*******************************************/ -/* PUSHB[abc]: PUSH Bytes */ -/* CodeRange : $B0-$B7 */ -/* Stack : --> uint32... */ - - static void Ins_PUSHB( INS_ARG ) - { - UShort L, K; - - - L = (UShort)CUR.opcode - 0xB0 + 1; - - if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - for ( K = 1; K <= L; K++ ) - args[K - 1] = CUR.code[CUR.IP + K]; - } - - -/*******************************************/ -/* PUSHW[abc]: PUSH Words */ -/* CodeRange : $B8-$BF */ -/* Stack : --> int32... */ - - static void Ins_PUSHW( INS_ARG ) - { - UShort L, K; - - - L = (UShort)CUR.opcode - 0xB8 + 1; - - if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - CUR.IP++; - - for ( K = 0; K < L; K++ ) - args[K] = GET_ShortIns(); - - CUR.step_ins = FALSE; - } - - - -/****************************************************************/ -/* */ -/* MANAGING THE GRAPHICS STATE */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - -/**********************************************/ -/* GC[a] : Get Coordinate projected onto */ -/* CodeRange : $46-$47 */ -/* Stack : uint32 --> f26.6 */ - -/* BULLSHIT: Measures from the original glyph must be taken */ -/* along the dual projection vector! */ - - static void Ins_GC( INS_ARG ) - { - ULong L; - TT_F26Dot6 R; - - - L = (ULong)args[0]; - - if ( BOUNDS( L, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - else - R = 0; - } - else - { - if ( CUR.opcode & 1 ) - R = CUR_Func_dualproj( CUR.zp2.org + L, NULL_Vector ); - else - R = CUR_Func_project( CUR.zp2.cur + L, NULL_Vector ); - } - - args[0] = R; - } - - -/**********************************************/ -/* SCFS[] : Set Coordinate From Stack */ -/* CodeRange : $48 */ -/* Stack : f26.6 uint32 --> */ -/* */ -/* Formula: */ -/* */ -/* OA := OA + ( value - OA.p )/( f.p ) * f */ -/* */ - - static void Ins_SCFS( INS_ARG ) - { - Long K; - UShort L; - - - L = (UShort)args[0]; - - if ( BOUNDS( L, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - K = CUR_Func_project( CUR.zp2.cur + L, NULL_Vector ); - - CUR_Func_move( &CUR.zp2, L, args[1] - K ); - - /* not part of the specs, but here for safety */ - - if ( CUR.GS.gep2 == 0 ) - CUR.zp2.org[L] = CUR.zp2.cur[L]; - } - - -/**********************************************/ -/* MD[a] : Measure Distance */ -/* CodeRange : $49-$4A */ -/* Stack : uint32 uint32 --> f26.6 */ - -/* BULLSHIT: Measure taken in the original glyph must be along */ -/* the dual projection vector. */ - -/* Second BULLSHIT: Flag attributes are inverted! */ -/* 0 => measure distance in original outline */ -/* 1 => measure distance in grid-fitted outline */ - -/* Third one !! : zp0 - zp1, and not "zp2 - zp1" !!! */ -/* */ - - static void Ins_MD( INS_ARG ) - { - UShort K, L; - TT_F26Dot6 D; - - - K = (UShort)args[1]; - L = (UShort)args[0]; - - if( BOUNDS( L, CUR.zp0.n_points ) || - BOUNDS( K, CUR.zp1.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - else - D = 0; - } - else - { - if ( CUR.opcode & 1 ) - D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K ); - else - D = CUR_Func_dualproj( CUR.zp0.org + L, CUR.zp1.org + K ); - } - - args[0] = D; - } - - -/*******************************************/ -/* SDPVTL[a] : Set Dual PVector to Line */ -/* CodeRange : $86-$87 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_SDPVTL( INS_ARG ) - { - Long A, B, C; - UShort p1, p2; /* was Int in pas type ERROR */ - - - p1 = (UShort)args[1]; - p2 = (UShort)args[0]; - - if ( BOUNDS( p2, CUR.zp1.n_points ) || - BOUNDS( p1, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - { - TT_Vector* v1 = CUR.zp1.org + p2; - TT_Vector* v2 = CUR.zp2.org + p1; - - - A = v1->x - v2->x; - B = v1->y - v2->y; - } - - if ( (CUR.opcode & 1) != 0 ) - { - C = B; /* CounterClockwise rotation */ - B = A; - A = -C; - } - - NORMalize( A, B, &CUR.GS.dualVector ); - - { - TT_Vector* v1 = CUR.zp1.cur + p2; - TT_Vector* v2 = CUR.zp2.cur + p1; - - - A = v1->x - v2->x; - B = v1->y - v2->y; - } - - if ( (CUR.opcode & 1) != 0 ) - { - C = B; /* CounterClockwise rotation */ - B = A; - A = -C; - } - - NORMalize( A, B, &CUR.GS.projVector ); - - COMPUTE_Funcs(); - } - - -/*******************************************/ -/* SZP0[] : Set Zone Pointer 0 */ -/* CodeRange : $13 */ -/* Stack : uint32 --> */ - - static void Ins_SZP0( INS_ARG ) - { - switch ( (Int)args[0] ) - { - case 0: - CUR.zp0 = CUR.twilight; - break; - - case 1: - CUR.zp0 = CUR.pts; - break; - - default: - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - CUR.GS.gep0 = (UShort)args[0]; - } - - -/*******************************************/ -/* SZP1[] : Set Zone Pointer 1 */ -/* CodeRange : $14 */ -/* Stack : uint32 --> */ - - static void Ins_SZP1( INS_ARG ) - { - switch ( (Int)args[0] ) - { - case 0: - CUR.zp1 = CUR.twilight; - break; - - case 1: - CUR.zp1 = CUR.pts; - break; - - default: - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - CUR.GS.gep1 = (UShort)args[0]; - } - - -/*******************************************/ -/* SZP2[] : Set Zone Pointer 2 */ -/* CodeRange : $15 */ -/* Stack : uint32 --> */ - - static void Ins_SZP2( INS_ARG ) - { - switch ( (Int)args[0] ) - { - case 0: - CUR.zp2 = CUR.twilight; - break; - - case 1: - CUR.zp2 = CUR.pts; - break; - - default: - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - CUR.GS.gep2 = (UShort)args[0]; - } - - -/*******************************************/ -/* SZPS[] : Set Zone Pointers */ -/* CodeRange : $16 */ -/* Stack : uint32 --> */ - - static void Ins_SZPS( INS_ARG ) - { - switch ( (Int)args[0] ) - { - case 0: - CUR.zp0 = CUR.twilight; - break; - - case 1: - CUR.zp0 = CUR.pts; - break; - - default: - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - CUR.zp1 = CUR.zp0; - CUR.zp2 = CUR.zp0; - - CUR.GS.gep0 = (UShort)args[0]; - CUR.GS.gep1 = (UShort)args[0]; - CUR.GS.gep2 = (UShort)args[0]; - } - - -/*******************************************/ -/* INSTCTRL[]: INSTruction ConTRol */ -/* CodeRange : $8e */ -/* Stack : int32 int32 --> */ - - static void Ins_INSTCTRL( INS_ARG ) - { - Long K, L; - - - K = args[1]; - L = args[0]; - - if ( K < 1 || K > 2 ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( L != 0 ) - L = K; - - CUR.GS.instruct_control = - (Byte)( CUR.GS.instruct_control & ~(Byte)K ) | (Byte)L; - } - - -/*******************************************/ -/* SCANCTRL[]: SCAN ConTRol */ -/* CodeRange : $85 */ -/* Stack : uint32? --> */ - - static void Ins_SCANCTRL( INS_ARG ) - { - Int A; - - - /* Get Threshold */ - A = (Int)(args[0] & 0xFF); - - if ( A == 0xFF ) - { - CUR.GS.scan_control = TRUE; - return; - } - else if ( A == 0 ) - { - CUR.GS.scan_control = FALSE; - return; - } - - A *= 64; - - if ( (args[0] & 0x100) != 0 && CUR.metrics.pointSize <= A ) - CUR.GS.scan_control = TRUE; - - if ( (args[0] & 0x200) != 0 && CUR.metrics.rotated ) - CUR.GS.scan_control = TRUE; - - if ( (args[0] & 0x400) != 0 && CUR.metrics.stretched ) - CUR.GS.scan_control = TRUE; - - if ( (args[0] & 0x800) != 0 && CUR.metrics.pointSize > A ) - CUR.GS.scan_control = FALSE; - - if ( (args[0] & 0x1000) != 0 && CUR.metrics.rotated ) - CUR.GS.scan_control = FALSE; - - if ( (args[0] & 0x2000) != 0 && CUR.metrics.stretched ) - CUR.GS.scan_control = FALSE; -} - - -/*******************************************/ -/* SCANTYPE[]: SCAN TYPE */ -/* CodeRange : $8D */ -/* Stack : uint32? --> */ - - static void Ins_SCANTYPE( INS_ARG ) - { - /* For compatibility with future enhancements, */ - /* we must ignore new modes */ - - if ( args[0] >= 0 && args[0] <= 5 ) - { - if ( args[0] == 3 ) - args[0] = 2; - - CUR.GS.scan_type = (Int)args[0]; - } - } - - - -/****************************************************************/ -/* */ -/* MANAGING OUTLINES */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - -/**********************************************/ -/* FLIPPT[] : FLIP PoinT */ -/* CodeRange : $80 */ -/* Stack : uint32... --> */ - - static void Ins_FLIPPT( INS_ARG ) - { - UShort point; - - - if ( CUR.top < CUR.GS.loop ) - { - CUR.error = TT_Err_Too_Few_Arguments; - return; - } - - while ( CUR.GS.loop > 0 ) - { - CUR.args--; - - point = (UShort)CUR.stack[CUR.args]; - - if ( BOUNDS( point, CUR.pts.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - CUR.pts.touch[point] ^= TT_Flag_On_Curve; - - CUR.GS.loop--; - } - - CUR.GS.loop = 1; - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* FLIPRGON[]: FLIP RanGe ON */ -/* CodeRange : $81 */ -/* Stack : uint32 uint32 --> */ -/* (but UShorts are sufficient) */ - - static void Ins_FLIPRGON( INS_ARG ) - { - UShort I, K, L; - - - K = (UShort)args[1]; - L = (UShort)args[0]; - - if ( BOUNDS( K, CUR.pts.n_points ) || - BOUNDS( L, CUR.pts.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - for ( I = L; I <= K; I++ ) - CUR.pts.touch[I] |= TT_Flag_On_Curve; - } - - -/**********************************************/ -/* FLIPRGOFF : FLIP RanGe OFF */ -/* CodeRange : $82 */ -/* Stack : uint32 uint32 --> */ -/* (but UShorts are sufficient) */ - - static void Ins_FLIPRGOFF( INS_ARG ) - { - UShort I, K, L; - - - K = (UShort)args[1]; - L = (UShort)args[0]; - - if ( BOUNDS( K, CUR.pts.n_points ) || - BOUNDS( L, CUR.pts.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - for ( I = L; I <= K; I++ ) - CUR.pts.touch[I] &= ~TT_Flag_On_Curve; - } - - - static Bool Compute_Point_Displacement( EXEC_OPS - PCoordinates x, - PCoordinates y, - PGlyph_Zone zone, - UShort* refp ) - { - TGlyph_Zone zp; - UShort p; - TT_F26Dot6 d; - - - if ( CUR.opcode & 1 ) - { - zp = CUR.zp0; - p = CUR.GS.rp1; - } - else - { - zp = CUR.zp1; - p = CUR.GS.rp2; - } - - if ( BOUNDS( p, zp.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Displacement; - return FAILURE; - } - - *zone = zp; - *refp = p; - - d = CUR_Func_project( zp.cur + p, zp.org + p ); - - *x = TT_MulDiv(d, (Long)CUR.GS.freeVector.x * 0x10000L, CUR.F_dot_P ); - *y = TT_MulDiv(d, (Long)CUR.GS.freeVector.y * 0x10000L, CUR.F_dot_P ); - - return SUCCESS; - } - - - static void Move_Zp2_Point( EXEC_OPS - UShort point, - TT_F26Dot6 dx, - TT_F26Dot6 dy, - Bool touch ) - { - if ( CUR.GS.freeVector.x != 0 ) - { - CUR.zp2.cur[point].x += dx; - if ( touch ) - CUR.zp2.touch[point] |= TT_Flag_Touched_X; - } - - if ( CUR.GS.freeVector.y != 0 ) - { - CUR.zp2.cur[point].y += dy; - if ( touch ) - CUR.zp2.touch[point] |= TT_Flag_Touched_Y; - } - } - - -/**********************************************/ -/* SHP[a] : SHift Point by the last point */ -/* CodeRange : $32-33 */ -/* Stack : uint32... --> */ - - static void Ins_SHP( INS_ARG ) - { - TGlyph_Zone zp; - UShort refp; - - TT_F26Dot6 dx, - dy; - UShort point; - - - if ( CUR.top < CUR.GS.loop ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) - return; - - while ( CUR.GS.loop > 0 ) - { - CUR.args--; - point = (UShort)CUR.stack[CUR.args]; - - if ( BOUNDS( point, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - /* UNDOCUMENTED! SHP touches the points */ - MOVE_Zp2_Point( point, dx, dy, TRUE ); - - CUR.GS.loop--; - } - - CUR.GS.loop = 1; - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* SHC[a] : SHift Contour */ -/* CodeRange : $34-35 */ -/* Stack : uint32 --> */ - - static void Ins_SHC( INS_ARG ) - { - TGlyph_Zone zp; - UShort refp; - TT_F26Dot6 dx, - dy; - - Short contour; - UShort first_point, last_point, i; - - - contour = (UShort)args[0]; - - if ( BOUNDS( contour, CUR.pts.n_contours ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) - return; - - if ( contour == 0 ) - first_point = 0; - else - first_point = CUR.pts.contours[contour - 1] + 1; - - last_point = CUR.pts.contours[contour]; - - /* XXX: this is probably wrong... at least it prevents memory */ - /* corruption when zp2 is the twilight zone */ - if ( last_point > CUR.zp2.n_points ) - { - if ( CUR.zp2.n_points > 0 ) - last_point = CUR.zp2.n_points - 1; - else - last_point = 0; - } - - /* UNDOCUMENTED! SHC doesn't touch the points */ - for ( i = first_point; i <= last_point; i++ ) - { - if ( zp.cur != CUR.zp2.cur || refp != i ) - MOVE_Zp2_Point( i, dx, dy, FALSE ); - } - } - - -/**********************************************/ -/* SHZ[a] : SHift Zone */ -/* CodeRange : $36-37 */ -/* Stack : uint32 --> */ - - static void Ins_SHZ( INS_ARG ) - { - TGlyph_Zone zp; - UShort refp; - TT_F26Dot6 dx, - dy; - - UShort last_point, i; - - - if ( BOUNDS( args[0], 2 ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) - return; - - if ( CUR.zp2.n_points > 0 ) - last_point = CUR.zp2.n_points - 1; - else - last_point = 0; - - /* UNDOCUMENTED! SHZ doesn't touch the points */ - for ( i = 0; i <= last_point; i++ ) - { - if ( zp.cur != CUR.zp2.cur || refp != i ) - MOVE_Zp2_Point( i, dx, dy, FALSE ); - } - } - - -/**********************************************/ -/* SHPIX[] : SHift points by a PIXel amount */ -/* CodeRange : $38 */ -/* Stack : f26.6 uint32... --> */ - - static void Ins_SHPIX( INS_ARG ) - { - TT_F26Dot6 dx, dy; - UShort point; - - - if ( CUR.top < CUR.GS.loop + 1 ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - dx = TT_MulDiv( args[0], - (Long)CUR.GS.freeVector.x, - 0x4000 ); - dy = TT_MulDiv( args[0], - (Long)CUR.GS.freeVector.y, - 0x4000 ); - - while ( CUR.GS.loop > 0 ) - { - CUR.args--; - - point = (UShort)CUR.stack[CUR.args]; - - if ( BOUNDS( point, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - MOVE_Zp2_Point( point, dx, dy, TRUE ); - - CUR.GS.loop--; - } - - CUR.GS.loop = 1; - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* MSIRP[a] : Move Stack Indirect Relative */ -/* CodeRange : $3A-$3B */ -/* Stack : f26.6 uint32 --> */ - - static void Ins_MSIRP( INS_ARG ) - { - UShort point; - TT_F26Dot6 distance; - - - point = (UShort)args[0]; - - if ( BOUNDS( point, CUR.zp1.n_points ) || - BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* XXX: UNDOCUMENTED! behaviour */ - if ( CUR.GS.gep0 == 0 ) /* if in twilight zone */ - { - CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0]; - CUR.zp1.cur[point] = CUR.zp1.org[point]; - } - - distance = CUR_Func_project( CUR.zp1.cur + point, - CUR.zp0.cur + CUR.GS.rp0 ); - - CUR_Func_move( &CUR.zp1, point, args[1] - distance ); - - CUR.GS.rp1 = CUR.GS.rp0; - CUR.GS.rp2 = point; - - if ( (CUR.opcode & 1) != 0 ) - CUR.GS.rp0 = point; - } - - -/**********************************************/ -/* MDAP[a] : Move Direct Absolute Point */ -/* CodeRange : $2E-$2F */ -/* Stack : uint32 --> */ - - static void Ins_MDAP( INS_ARG ) - { - UShort point; - TT_F26Dot6 cur_dist, - distance; - - - point = (UShort)args[0]; - - if ( BOUNDS( point, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* XXX: Is there some undocumented feature while in the */ - /* twilight zone? ? */ - if ( (CUR.opcode & 1) != 0 ) - { - cur_dist = CUR_Func_project( CUR.zp0.cur + point, NULL_Vector ); - distance = CUR_Func_round( cur_dist, - CUR.metrics.compensations[0] ) - cur_dist; - } - else - distance = 0; - - CUR_Func_move( &CUR.zp0, point, distance ); - - CUR.GS.rp0 = point; - CUR.GS.rp1 = point; - } - - -/**********************************************/ -/* MIAP[a] : Move Indirect Absolute Point */ -/* CodeRange : $3E-$3F */ -/* Stack : uint32 uint32 --> */ - - static void Ins_MIAP( INS_ARG ) - { - ULong cvtEntry; - UShort point; - TT_F26Dot6 distance, - org_dist; - - - cvtEntry = (ULong)args[1]; - point = (UShort)args[0]; - - if ( BOUNDS( point, CUR.zp0.n_points ) || - BOUNDS( cvtEntry, CUR.cvtSize ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* UNDOCUMENTED! */ - /* */ - /* The behaviour of an MIAP instruction is quite */ - /* different when used in the twilight zone. */ - /* */ - /* First, no control value cutin test is performed */ - /* as it would fail anyway. Second, the original */ - /* point, i.e. (org_x,org_y) of zp0.point, is set */ - /* to the absolute, unrounded distance found in */ - /* the CVT. */ - /* */ - /* This is used in the CVT programs of the Microsoft */ - /* fonts Arial, Times, etc., in order to re-adjust */ - /* some key font heights. It allows the use of the */ - /* IP instruction in the twilight zone, which */ - /* otherwise would be "illegal" according to the */ - /* specs :) */ - /* */ - /* We implement it with a special sequence for the */ - /* twilight zone. This is a bad hack, but it seems */ - /* to work. */ - - distance = CUR_Func_read_cvt( cvtEntry ); - - if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */ - { - CUR.zp0.org[point].x = TT_MulDiv( CUR.GS.freeVector.x, - distance, 0x4000L ); - CUR.zp0.org[point].y = TT_MulDiv( CUR.GS.freeVector.y, - distance, 0x4000L ); - CUR.zp0.cur[point] = CUR.zp0.org[point]; - } - - org_dist = CUR_Func_project( CUR.zp0.cur + point, NULL_Vector ); - - if ( (CUR.opcode & 1) != 0 ) /* rounding and control cutin flag */ - { - if ( ABS( distance - org_dist ) > CUR.GS.control_value_cutin ) - distance = org_dist; - - distance = CUR_Func_round( distance, CUR.metrics.compensations[0] ); - } - - CUR_Func_move( &CUR.zp0, point, distance - org_dist ); - - CUR.GS.rp0 = point; - CUR.GS.rp1 = point; - } - - -/**********************************************/ -/* MDRP[abcde] : Move Direct Relative Point */ -/* CodeRange : $C0-$DF */ -/* Stack : uint32 --> */ - - static void Ins_MDRP( INS_ARG ) - { - UShort point; - TT_F26Dot6 org_dist, distance; - - - point = (UShort)args[0]; - - if ( BOUNDS( point, CUR.zp1.n_points ) || - BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* XXX: Is there some undocumented feature while in the */ - /* twilight zone? */ - - org_dist = CUR_Func_dualproj( CUR.zp1.org + point, - CUR.zp0.org + CUR.GS.rp0 ); - - /* single width cutin test */ - - if ( ABS( org_dist ) < CUR.GS.single_width_cutin ) - { - if ( org_dist >= 0 ) - org_dist = CUR.GS.single_width_value; - else - org_dist = -CUR.GS.single_width_value; - } - - /* round flag */ - - if ( (CUR.opcode & 4) != 0 ) - distance = CUR_Func_round( org_dist, - CUR.metrics.compensations[CUR.opcode & 3] ); - else - distance = Round_None( EXEC_ARGS - org_dist, - CUR.metrics.compensations[CUR.opcode & 3] ); - - /* minimum distance flag */ - - if ( (CUR.opcode & 8) != 0 ) - { - if ( org_dist >= 0 ) - { - if ( distance < CUR.GS.minimum_distance ) - distance = CUR.GS.minimum_distance; - } - else - { - if ( distance > -CUR.GS.minimum_distance ) - distance = -CUR.GS.minimum_distance; - } - } - - /* now move the point */ - - org_dist = CUR_Func_project( CUR.zp1.cur + point, - CUR.zp0.cur + CUR.GS.rp0 ); - - CUR_Func_move( &CUR.zp1, point, distance - org_dist ); - - CUR.GS.rp1 = CUR.GS.rp0; - CUR.GS.rp2 = point; - - if ( (CUR.opcode & 16) != 0 ) - CUR.GS.rp0 = point; - } - - -/**********************************************/ -/* MIRP[abcde] : Move Indirect Relative Point */ -/* CodeRange : $E0-$FF */ -/* Stack : int32? uint32 --> */ - - static void Ins_MIRP( INS_ARG ) - { - UShort point; - ULong cvtEntry; - - TT_F26Dot6 cvt_dist, - distance, - cur_dist, - org_dist; - - - point = (UShort)args[0]; - cvtEntry = (ULong)(args[1] + 1); - - /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ - - if ( BOUNDS( point, CUR.zp1.n_points ) || - BOUNDS( cvtEntry, CUR.cvtSize + 1 ) || - BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - if ( !cvtEntry ) - cvt_dist = 0; - else - cvt_dist = CUR_Func_read_cvt( cvtEntry - 1 ); - - /* single width test */ - - if ( ABS( cvt_dist ) < CUR.GS.single_width_cutin ) - { - if ( cvt_dist >= 0 ) - cvt_dist = CUR.GS.single_width_value; - else - cvt_dist = -CUR.GS.single_width_value; - } - - /* XXX : UNDOCUMENTED! -- twilight zone */ - - if ( CUR.GS.gep1 == 0 ) - { - CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x + - TT_MulDiv( cvt_dist, - CUR.GS.freeVector.x, - 0x4000 ); - - CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y + - TT_MulDiv( cvt_dist, - CUR.GS.freeVector.y, - 0x4000 ); - - CUR.zp1.cur[point] = CUR.zp1.org[point]; - } - - org_dist = CUR_Func_dualproj( CUR.zp1.org + point, - CUR.zp0.org + CUR.GS.rp0 ); - - cur_dist = CUR_Func_project( CUR.zp1.cur + point, - CUR.zp0.cur + CUR.GS.rp0 ); - - /* auto-flip test */ - - if ( CUR.GS.auto_flip ) - { - if ( (org_dist ^ cvt_dist) < 0 ) - cvt_dist = -cvt_dist; - } - - /* control value cutin and round */ - - if ( (CUR.opcode & 4) != 0 ) - { - /* XXX: UNDOCUMENTED! Only perform cut-in test when both points */ - /* refer to the same zone. */ - - if ( CUR.GS.gep0 == CUR.GS.gep1 ) - if ( ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin ) - cvt_dist = org_dist; - - distance = CUR_Func_round( cvt_dist, - CUR.metrics.compensations[CUR.opcode & 3] ); - } - else - distance = Round_None( EXEC_ARGS - cvt_dist, - CUR.metrics.compensations[CUR.opcode & 3] ); - - /* minimum distance test */ - - if ( (CUR.opcode & 8) != 0 ) - { - if ( org_dist >= 0 ) - { - if ( distance < CUR.GS.minimum_distance ) - distance = CUR.GS.minimum_distance; - } - else - { - if ( distance > -CUR.GS.minimum_distance ) - distance = -CUR.GS.minimum_distance; - } - } - - CUR_Func_move( &CUR.zp1, point, distance - cur_dist ); - - CUR.GS.rp1 = CUR.GS.rp0; - - if ( (CUR.opcode & 16) != 0 ) - CUR.GS.rp0 = point; - - /* UNDOCUMENTED! */ - - CUR.GS.rp2 = point; - } - - -/**********************************************/ -/* ALIGNRP[] : ALIGN Relative Point */ -/* CodeRange : $3C */ -/* Stack : uint32 uint32... --> */ - - static void Ins_ALIGNRP( INS_ARG ) - { - UShort point; - TT_F26Dot6 distance; - - - if ( CUR.top < CUR.GS.loop || - BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - while ( CUR.GS.loop > 0 ) - { - CUR.args--; - - point = (UShort)CUR.stack[CUR.args]; - - if ( BOUNDS( point, CUR.zp1.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - { - distance = CUR_Func_project( CUR.zp1.cur + point, - CUR.zp0.cur + CUR.GS.rp0 ); - - CUR_Func_move( &CUR.zp1, point, -distance ); - } - - CUR.GS.loop--; - } - - CUR.GS.loop = 1; - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* ISECT[] : moves point to InterSECTion */ -/* CodeRange : $0F */ -/* Stack : 5 * uint32 --> */ - - static void Ins_ISECT( INS_ARG ) - { - UShort point, - a0, a1, - b0, b1; - - TT_F26Dot6 discriminant; - - TT_F26Dot6 dx, dy, - dax, day, - dbx, dby; - - TT_F26Dot6 val; - - TT_Vector R; - - - point = (UShort)args[0]; - - a0 = (UShort)args[1]; - a1 = (UShort)args[2]; - b0 = (UShort)args[3]; - b1 = (UShort)args[4]; - - if ( BOUNDS( b0, CUR.zp0.n_points ) || - BOUNDS( b1, CUR.zp0.n_points ) || - BOUNDS( a0, CUR.zp1.n_points ) || - BOUNDS( a1, CUR.zp1.n_points ) || - BOUNDS( point, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - dbx = CUR.zp0.cur[b1].x - CUR.zp0.cur[b0].x; - dby = CUR.zp0.cur[b1].y - CUR.zp0.cur[b0].y; - - dax = CUR.zp1.cur[a1].x - CUR.zp1.cur[a0].x; - day = CUR.zp1.cur[a1].y - CUR.zp1.cur[a0].y; - - dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x; - dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y; - - CUR.zp2.touch[point] |= TT_Flag_Touched_Both; - - discriminant = TT_MulDiv( dax, -dby, 0x40L ) + - TT_MulDiv( day, dbx, 0x40L ); - - if ( ABS( discriminant ) >= 0x40 ) - { - val = TT_MulDiv( dx, -dby, 0x40L ) + TT_MulDiv( dy, dbx, 0x40L ); - - R.x = TT_MulDiv( val, dax, discriminant ); - R.y = TT_MulDiv( val, day, discriminant ); - - CUR.zp2.cur[point].x = CUR.zp1.cur[a0].x + R.x; - CUR.zp2.cur[point].y = CUR.zp1.cur[a0].y + R.y; - } - else - { - /* else, take the middle of the middles of A and B */ - - CUR.zp2.cur[point].x = ( CUR.zp1.cur[a0].x + - CUR.zp1.cur[a1].x + - CUR.zp0.cur[b0].x + - CUR.zp0.cur[b1].x ) / 4; - CUR.zp2.cur[point].y = ( CUR.zp1.cur[a0].y + - CUR.zp1.cur[a1].y + - CUR.zp0.cur[b0].y + - CUR.zp0.cur[b1].y ) / 4; - } - } - - -/**********************************************/ -/* ALIGNPTS[] : ALIGN PoinTS */ -/* CodeRange : $27 */ -/* Stack : uint32 uint32 --> */ - - static void Ins_ALIGNPTS( INS_ARG ) - { - UShort p1, p2; - TT_F26Dot6 distance; - - - p1 = (UShort)args[0]; - p2 = (UShort)args[1]; - - if ( BOUNDS( args[0], CUR.zp1.n_points ) || - BOUNDS( args[1], CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - distance = CUR_Func_project( CUR.zp0.cur + p2, - CUR.zp1.cur + p1 ) / 2; - - CUR_Func_move( &CUR.zp1, p1, distance ); - CUR_Func_move( &CUR.zp0, p2, -distance ); - } - - -/**********************************************/ -/* IP[] : Interpolate Point */ -/* CodeRange : $39 */ -/* Stack : uint32... --> */ - - static void Ins_IP( INS_ARG ) - { - TT_F26Dot6 org_a, org_b, org_x, - cur_a, cur_b, cur_x, - distance; - UShort point; - - - if ( CUR.top < CUR.GS.loop ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - - /* XXX: there are some glyphs in some braindead but popular */ - /* fonts out there (e.g. [aeu]grave in monotype.ttf) */ - /* calling IP[] with bad values of rp[12] */ - /* do something sane when this odd thing happens */ - - if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) || - BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) ) - { - org_a = cur_a = 0; - org_b = cur_b = 0; - } - else - { - org_a = CUR_Func_dualproj( CUR.zp0.org + CUR.GS.rp1, NULL_Vector ); - org_b = CUR_Func_dualproj( CUR.zp1.org + CUR.GS.rp2, NULL_Vector ); - - cur_a = CUR_Func_project( CUR.zp0.cur + CUR.GS.rp1, NULL_Vector ); - cur_b = CUR_Func_project( CUR.zp1.cur + CUR.GS.rp2, NULL_Vector ); - } - - while ( CUR.GS.loop > 0 ) - { - CUR.args--; - - point = (UShort)CUR.stack[CUR.args]; - if ( BOUNDS( point, CUR.zp2.n_points ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - { - org_x = CUR_Func_dualproj( CUR.zp2.org + point, NULL_Vector ); - cur_x = CUR_Func_project ( CUR.zp2.cur + point, NULL_Vector ); - - if ( ( org_a <= org_b && org_x <= org_a ) || - ( org_a > org_b && org_x >= org_a ) ) - - distance = ( cur_a - org_a ) + ( org_x - cur_x ); - - else if ( ( org_a <= org_b && org_x >= org_b ) || - ( org_a > org_b && org_x < org_b ) ) - - distance = ( cur_b - org_b ) + ( org_x - cur_x ); - - else - /* note: it seems that rounding this value isn't a good */ - /* idea (cf. width of capital 'S' in Times) */ - - distance = TT_MulDiv( cur_b - cur_a, - org_x - org_a, - org_b - org_a ) + ( cur_a - cur_x ); - - CUR_Func_move( &CUR.zp2, point, distance ); - } - - CUR.GS.loop--; - } - - CUR.GS.loop = 1; - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* UTP[a] : UnTouch Point */ -/* CodeRange : $29 */ -/* Stack : uint32 --> */ - - static void Ins_UTP( INS_ARG ) - { - UShort point; - Byte mask; - - - point = (UShort)args[0]; - - if ( BOUNDS( point, CUR.zp0.n_points ) ) - { - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - return; - } - - mask = 0xFF; - - if ( CUR.GS.freeVector.x != 0 ) - mask &= ~TT_Flag_Touched_X; - - if ( CUR.GS.freeVector.y != 0 ) - mask &= ~TT_Flag_Touched_Y; - - CUR.zp0.touch[point] &= mask; - } - - - /* Local variables for Ins_IUP: */ - struct LOC_Ins_IUP - { - TT_Vector* orgs; /* original and current coordinate */ - TT_Vector* curs; /* arrays */ - }; - - - static void Shift( UShort p1, - UShort p2, - UShort p, - struct LOC_Ins_IUP* LINK ) - { - UShort i; - TT_F26Dot6 x; - - - x = LINK->curs[p].x - LINK->orgs[p].x; - - for ( i = p1; i < p; i++ ) - LINK->curs[i].x += x; - - for ( i = p + 1; i <= p2; i++ ) - LINK->curs[i].x += x; - } - - - static void Interp( UShort p1, - UShort p2, - UShort ref1, - UShort ref2, - struct LOC_Ins_IUP* LINK ) - { - UShort i; - TT_F26Dot6 x, x1, x2, d1, d2; - - - if ( p1 > p2 ) - return; - - x1 = LINK->orgs[ref1].x; - d1 = LINK->curs[ref1].x - LINK->orgs[ref1].x; - x2 = LINK->orgs[ref2].x; - d2 = LINK->curs[ref2].x - LINK->orgs[ref2].x; - - if ( x1 == x2 ) - { - for ( i = p1; i <= p2; i++ ) - { - x = LINK->orgs[i].x; - - if ( x <= x1 ) - x += d1; - else - x += d2; - - LINK->curs[i].x = x; - } - return; - } - - if ( x1 < x2 ) - { - for ( i = p1; i <= p2; i++ ) - { - x = LINK->orgs[i].x; - - if ( x <= x1 ) - x += d1; - else - { - if ( x >= x2 ) - x += d2; - else - x = LINK->curs[ref1].x + - TT_MulDiv( x - x1, - LINK->curs[ref2].x - LINK->curs[ref1].x, - x2 - x1 ); - } - LINK->curs[i].x = x; - } - return; - } - - /* x2 < x1 */ - - for ( i = p1; i <= p2; i++ ) - { - x = LINK->orgs[i].x; - if ( x <= x2 ) - x += d2; - else - { - if ( x >= x1 ) - x += d1; - else - x = LINK->curs[ref1].x + - TT_MulDiv( x - x1, - LINK->curs[ref2].x - LINK->curs[ref1].x, - x2 - x1 ); - } - LINK->curs[i].x = x; - } - } - - -/**********************************************/ -/* IUP[a] : Interpolate Untouched Points */ -/* CodeRange : $30-$31 */ -/* Stack : --> */ - - static void Ins_IUP( INS_ARG ) - { - struct LOC_Ins_IUP V; - Byte mask; - - UShort first_point; /* first point of contour */ - UShort end_point; /* end point (last+1) of contour */ - - UShort first_touched; /* first touched point in contour */ - UShort cur_touched; /* current touched point in contour */ - - UShort point; /* current point */ - Short contour; /* current contour */ - - - if ( CUR.opcode & 1 ) - { - mask = TT_Flag_Touched_X; - V.orgs = CUR.pts.org; - V.curs = CUR.pts.cur; - } - else - { - mask = TT_Flag_Touched_Y; - V.orgs = (TT_Vector*)( ((TT_F26Dot6*)CUR.pts.org) + 1 ); - V.curs = (TT_Vector*)( ((TT_F26Dot6*)CUR.pts.cur) + 1 ); - } - - contour = 0; - point = 0; - - do - { - end_point = CUR.pts.contours[contour]; - first_point = point; - - while ( point <= end_point && (CUR.pts.touch[point] & mask) == 0 ) - point++; - - if ( point <= end_point ) - { - first_touched = point; - cur_touched = point; - - point++; - - while ( point <= end_point ) - { - if ( (CUR.pts.touch[point] & mask) != 0 ) - { - if ( point > 0 ) - Interp( cur_touched + 1, - point - 1, - cur_touched, - point, - &V ); - cur_touched = point; - } - - point++; - } - - if ( cur_touched == first_touched ) - Shift( first_point, end_point, cur_touched, &V ); - else - { - Interp( cur_touched + 1, - end_point, - cur_touched, - first_touched, - &V ); - - if ( first_touched > 0 ) - Interp( first_point, - first_touched - 1, - cur_touched, - first_touched, - &V ); - } - } - contour++; - } while ( contour < CUR.pts.n_contours ); - } - - -/**********************************************/ -/* DELTAPn[] : DELTA Exceptions P1, P2, P3 */ -/* CodeRange : $5D,$71,$72 */ -/* Stack : uint32 (2 * uint32)... --> */ - - static void Ins_DELTAP( INS_ARG ) - { - ULong nump, k; - UShort A; - ULong C; - Long B; - - - nump = (ULong)args[0]; /* some points theoretically may occur more - than once, thus UShort isn't enough */ - - for ( k = 1; k <= nump; k++ ) - { - if ( CUR.args < 2 ) - { - CUR.error = TT_Err_Too_Few_Arguments; - return; - } - - CUR.args -= 2; - - A = (UShort)CUR.stack[CUR.args + 1]; - B = CUR.stack[CUR.args]; - - /* XXX : because some popular fonts contain some invalid DeltaP */ - /* instructions, we simply ignore them when the stacked */ - /* point reference is off limit, rather than returning an */ - /* error. As a delta instruction doesn't change a glyph */ - /* in great ways, this shouldn't be a problem.. */ - - if ( !BOUNDS( A, CUR.zp0.n_points ) ) - { - C = ((ULong)B & 0xF0) >> 4; - - switch ( CUR.opcode ) - { - case 0x5d: - break; - - case 0x71: - C += 16; - break; - - case 0x72: - C += 32; - break; - } - - C += CUR.GS.delta_base; - - if ( CURRENT_Ppem() == (Long)C ) - { - B = ((ULong)B & 0xF) - 8; - if ( B >= 0 ) - B++; - B = B * 64L / (1L << CUR.GS.delta_shift); - - CUR_Func_move( &CUR.zp0, A, B ); - } - } - else - if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; - } - - CUR.new_top = CUR.args; - } - - -/**********************************************/ -/* DELTACn[] : DELTA Exceptions C1, C2, C3 */ -/* CodeRange : $73,$74,$75 */ -/* Stack : uint32 (2 * uint32)... --> */ - - static void Ins_DELTAC( INS_ARG ) - { - ULong nump, k; - ULong A, C; - Long B; - - - nump = (ULong)args[0]; - - for ( k = 1; k <= nump; k++ ) - { - if ( CUR.args < 2 ) - { - CUR.error = TT_Err_Too_Few_Arguments; - return; - } - - CUR.args -= 2; - - A = (ULong)CUR.stack[CUR.args + 1]; - B = CUR.stack[CUR.args]; - - if ( BOUNDS( A, CUR.cvtSize ) ) - { - if ( CUR.pedantic_hinting ) - { - CUR.error = TT_Err_Invalid_Reference; - return; - } - } - else - { - C = ((ULong)B & 0xF0) >> 4; - - switch ( CUR.opcode ) - { - case 0x73: - break; - - case 0x74: - C += 16; - break; - - case 0x75: - C += 32; - break; - } - - C += CUR.GS.delta_base; - - if ( CURRENT_Ppem() == (Long)C ) - { - B = ((ULong)B & 0xF) - 8; - if ( B >= 0 ) - B++; - B = B * 64L / (1L << CUR.GS.delta_shift); - - CUR_Func_move_cvt( A, B ); - } - } - } - - CUR.new_top = CUR.args; - } - - - -/****************************************************************/ -/* */ -/* MISC. INSTRUCTIONS */ -/* */ -/****************************************************************/ - - -/**********************************************/ -/* GETINFO[] : GET INFOrmation */ -/* CodeRange : $88 */ -/* Stack : uint32 --> uint32 */ - -/* XXX According to Apple specs, bits 1 & 2 of the argument ought to be */ -/* consulted before rotated / stretched info is returned */ - - static void Ins_GETINFO( INS_ARG ) - { - Long K; - - - K = 0; - - /* We return then Windows 3.1 version number */ - /* for the font scaler */ - if ( (args[0] & 1) != 0 ) - K = 3; - - /* Has the glyph been rotated ? */ - if ( CUR.metrics.rotated ) - K |= 0x80; - - /* Has the glyph been stretched ? */ - if ( CUR.metrics.stretched ) - K |= 0x100; - - args[0] = K; - } - - - static void Ins_UNKNOWN( INS_ARG ) - { - /* look up the current instruction in our table */ - PDefRecord def, limit; - - def = CUR.IDefs; - limit = def + CUR.numIDefs; - for ( ; def < limit; def++ ) - { - if ( def->Opc == CUR.opcode && def->Active ) - { - PCallRecord pCrec; - - /* implement instruction as a function call */ - - /* check call stack */ - if ( CUR.callTop >= CUR.callSize ) - { - CUR.error = TT_Err_Stack_Overflow; - return; - } - - pCrec = CUR.callStack + CUR.callTop; - - pCrec->Caller_Range = CUR.curRange; - pCrec->Caller_IP = CUR.IP + 1; - pCrec->Cur_Count = 1; - pCrec->Cur_Restart = def->Start; - - CUR.callTop++; - - INS_Goto_CodeRange( def->Range, - def->Start ); - - CUR.step_ins = FALSE; - return; - } - } - - CUR.error = TT_Err_Invalid_Opcode; - } - - -#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH - static TInstruction_Function Instruct_Dispatch[256] = - { - /* Opcodes are gathered in groups of 16. */ - /* Please keep the spaces as they are. */ - - /* SVTCA y */ Ins_SVTCA, - /* SVTCA x */ Ins_SVTCA, - /* SPvTCA y */ Ins_SPVTCA, - /* SPvTCA x */ Ins_SPVTCA, - /* SFvTCA y */ Ins_SFVTCA, - /* SFvTCA x */ Ins_SFVTCA, - /* SPvTL // */ Ins_SPVTL, - /* SPvTL + */ Ins_SPVTL, - /* SFvTL // */ Ins_SFVTL, - /* SFvTL + */ Ins_SFVTL, - /* SPvFS */ Ins_SPVFS, - /* SFvFS */ Ins_SFVFS, - /* GPV */ Ins_GPV, - /* GFV */ Ins_GFV, - /* SFvTPv */ Ins_SFVTPV, - /* ISECT */ Ins_ISECT, - - /* SRP0 */ Ins_SRP0, - /* SRP1 */ Ins_SRP1, - /* SRP2 */ Ins_SRP2, - /* SZP0 */ Ins_SZP0, - /* SZP1 */ Ins_SZP1, - /* SZP2 */ Ins_SZP2, - /* SZPS */ Ins_SZPS, - /* SLOOP */ Ins_SLOOP, - /* RTG */ Ins_RTG, - /* RTHG */ Ins_RTHG, - /* SMD */ Ins_SMD, - /* ELSE */ Ins_ELSE, - /* JMPR */ Ins_JMPR, - /* SCvTCi */ Ins_SCVTCI, - /* SSwCi */ Ins_SSWCI, - /* SSW */ Ins_SSW, - - /* DUP */ Ins_DUP, - /* POP */ Ins_POP, - /* CLEAR */ Ins_CLEAR, - /* SWAP */ Ins_SWAP, - /* DEPTH */ Ins_DEPTH, - /* CINDEX */ Ins_CINDEX, - /* MINDEX */ Ins_MINDEX, - /* AlignPTS */ Ins_ALIGNPTS, - /* INS_$28 */ Ins_UNKNOWN, - /* UTP */ Ins_UTP, - /* LOOPCALL */ Ins_LOOPCALL, - /* CALL */ Ins_CALL, - /* FDEF */ Ins_FDEF, - /* ENDF */ Ins_ENDF, - /* MDAP[0] */ Ins_MDAP, - /* MDAP[1] */ Ins_MDAP, - - /* IUP[0] */ Ins_IUP, - /* IUP[1] */ Ins_IUP, - /* SHP[0] */ Ins_SHP, - /* SHP[1] */ Ins_SHP, - /* SHC[0] */ Ins_SHC, - /* SHC[1] */ Ins_SHC, - /* SHZ[0] */ Ins_SHZ, - /* SHZ[1] */ Ins_SHZ, - /* SHPIX */ Ins_SHPIX, - /* IP */ Ins_IP, - /* MSIRP[0] */ Ins_MSIRP, - /* MSIRP[1] */ Ins_MSIRP, - /* AlignRP */ Ins_ALIGNRP, - /* RTDG */ Ins_RTDG, - /* MIAP[0] */ Ins_MIAP, - /* MIAP[1] */ Ins_MIAP, - - /* NPushB */ Ins_NPUSHB, - /* NPushW */ Ins_NPUSHW, - /* WS */ Ins_WS, - /* RS */ Ins_RS, - /* WCvtP */ Ins_WCVTP, - /* RCvt */ Ins_RCVT, - /* GC[0] */ Ins_GC, - /* GC[1] */ Ins_GC, - /* SCFS */ Ins_SCFS, - /* MD[0] */ Ins_MD, - /* MD[1] */ Ins_MD, - /* MPPEM */ Ins_MPPEM, - /* MPS */ Ins_MPS, - /* FlipON */ Ins_FLIPON, - /* FlipOFF */ Ins_FLIPOFF, - /* DEBUG */ Ins_DEBUG, - - /* LT */ Ins_LT, - /* LTEQ */ Ins_LTEQ, - /* GT */ Ins_GT, - /* GTEQ */ Ins_GTEQ, - /* EQ */ Ins_EQ, - /* NEQ */ Ins_NEQ, - /* ODD */ Ins_ODD, - /* EVEN */ Ins_EVEN, - /* IF */ Ins_IF, - /* EIF */ Ins_EIF, - /* AND */ Ins_AND, - /* OR */ Ins_OR, - /* NOT */ Ins_NOT, - /* DeltaP1 */ Ins_DELTAP, - /* SDB */ Ins_SDB, - /* SDS */ Ins_SDS, - - /* ADD */ Ins_ADD, - /* SUB */ Ins_SUB, - /* DIV */ Ins_DIV, - /* MUL */ Ins_MUL, - /* ABS */ Ins_ABS, - /* NEG */ Ins_NEG, - /* FLOOR */ Ins_FLOOR, - /* CEILING */ Ins_CEILING, - /* ROUND[0] */ Ins_ROUND, - /* ROUND[1] */ Ins_ROUND, - /* ROUND[2] */ Ins_ROUND, - /* ROUND[3] */ Ins_ROUND, - /* NROUND[0] */ Ins_NROUND, - /* NROUND[1] */ Ins_NROUND, - /* NROUND[2] */ Ins_NROUND, - /* NROUND[3] */ Ins_NROUND, - - /* WCvtF */ Ins_WCVTF, - /* DeltaP2 */ Ins_DELTAP, - /* DeltaP3 */ Ins_DELTAP, - /* DeltaCn[0] */ Ins_DELTAC, - /* DeltaCn[1] */ Ins_DELTAC, - /* DeltaCn[2] */ Ins_DELTAC, - /* SROUND */ Ins_SROUND, - /* S45Round */ Ins_S45ROUND, - /* JROT */ Ins_JROT, - /* JROF */ Ins_JROF, - /* ROFF */ Ins_ROFF, - /* INS_$7B */ Ins_UNKNOWN, - /* RUTG */ Ins_RUTG, - /* RDTG */ Ins_RDTG, - /* SANGW */ Ins_SANGW, - /* AA */ Ins_AA, - - /* FlipPT */ Ins_FLIPPT, - /* FlipRgON */ Ins_FLIPRGON, - /* FlipRgOFF */ Ins_FLIPRGOFF, - /* INS_$83 */ Ins_UNKNOWN, - /* INS_$84 */ Ins_UNKNOWN, - /* ScanCTRL */ Ins_SCANCTRL, - /* SDPVTL[0] */ Ins_SDPVTL, - /* SDPVTL[1] */ Ins_SDPVTL, - /* GetINFO */ Ins_GETINFO, - /* IDEF */ Ins_IDEF, - /* ROLL */ Ins_ROLL, - /* MAX */ Ins_MAX, - /* MIN */ Ins_MIN, - /* ScanTYPE */ Ins_SCANTYPE, - /* InstCTRL */ Ins_INSTCTRL, - /* INS_$8F */ Ins_UNKNOWN, - - /* INS_$90 */ Ins_UNKNOWN, - /* INS_$91 */ Ins_UNKNOWN, - /* INS_$92 */ Ins_UNKNOWN, - /* INS_$93 */ Ins_UNKNOWN, - /* INS_$94 */ Ins_UNKNOWN, - /* INS_$95 */ Ins_UNKNOWN, - /* INS_$96 */ Ins_UNKNOWN, - /* INS_$97 */ Ins_UNKNOWN, - /* INS_$98 */ Ins_UNKNOWN, - /* INS_$99 */ Ins_UNKNOWN, - /* INS_$9A */ Ins_UNKNOWN, - /* INS_$9B */ Ins_UNKNOWN, - /* INS_$9C */ Ins_UNKNOWN, - /* INS_$9D */ Ins_UNKNOWN, - /* INS_$9E */ Ins_UNKNOWN, - /* INS_$9F */ Ins_UNKNOWN, - - /* INS_$A0 */ Ins_UNKNOWN, - /* INS_$A1 */ Ins_UNKNOWN, - /* INS_$A2 */ Ins_UNKNOWN, - /* INS_$A3 */ Ins_UNKNOWN, - /* INS_$A4 */ Ins_UNKNOWN, - /* INS_$A5 */ Ins_UNKNOWN, - /* INS_$A6 */ Ins_UNKNOWN, - /* INS_$A7 */ Ins_UNKNOWN, - /* INS_$A8 */ Ins_UNKNOWN, - /* INS_$A9 */ Ins_UNKNOWN, - /* INS_$AA */ Ins_UNKNOWN, - /* INS_$AB */ Ins_UNKNOWN, - /* INS_$AC */ Ins_UNKNOWN, - /* INS_$AD */ Ins_UNKNOWN, - /* INS_$AE */ Ins_UNKNOWN, - /* INS_$AF */ Ins_UNKNOWN, - - /* PushB[0] */ Ins_PUSHB, - /* PushB[1] */ Ins_PUSHB, - /* PushB[2] */ Ins_PUSHB, - /* PushB[3] */ Ins_PUSHB, - /* PushB[4] */ Ins_PUSHB, - /* PushB[5] */ Ins_PUSHB, - /* PushB[6] */ Ins_PUSHB, - /* PushB[7] */ Ins_PUSHB, - /* PushW[0] */ Ins_PUSHW, - /* PushW[1] */ Ins_PUSHW, - /* PushW[2] */ Ins_PUSHW, - /* PushW[3] */ Ins_PUSHW, - /* PushW[4] */ Ins_PUSHW, - /* PushW[5] */ Ins_PUSHW, - /* PushW[6] */ Ins_PUSHW, - /* PushW[7] */ Ins_PUSHW, - - /* MDRP[00] */ Ins_MDRP, - /* MDRP[01] */ Ins_MDRP, - /* MDRP[02] */ Ins_MDRP, - /* MDRP[03] */ Ins_MDRP, - /* MDRP[04] */ Ins_MDRP, - /* MDRP[05] */ Ins_MDRP, - /* MDRP[06] */ Ins_MDRP, - /* MDRP[07] */ Ins_MDRP, - /* MDRP[08] */ Ins_MDRP, - /* MDRP[09] */ Ins_MDRP, - /* MDRP[10] */ Ins_MDRP, - /* MDRP[11] */ Ins_MDRP, - /* MDRP[12] */ Ins_MDRP, - /* MDRP[13] */ Ins_MDRP, - /* MDRP[14] */ Ins_MDRP, - /* MDRP[15] */ Ins_MDRP, - - /* MDRP[16] */ Ins_MDRP, - /* MDRP[17] */ Ins_MDRP, - /* MDRP[18] */ Ins_MDRP, - /* MDRP[19] */ Ins_MDRP, - /* MDRP[20] */ Ins_MDRP, - /* MDRP[21] */ Ins_MDRP, - /* MDRP[22] */ Ins_MDRP, - /* MDRP[23] */ Ins_MDRP, - /* MDRP[24] */ Ins_MDRP, - /* MDRP[25] */ Ins_MDRP, - /* MDRP[26] */ Ins_MDRP, - /* MDRP[27] */ Ins_MDRP, - /* MDRP[28] */ Ins_MDRP, - /* MDRP[29] */ Ins_MDRP, - /* MDRP[30] */ Ins_MDRP, - /* MDRP[31] */ Ins_MDRP, - - /* MIRP[00] */ Ins_MIRP, - /* MIRP[01] */ Ins_MIRP, - /* MIRP[02] */ Ins_MIRP, - /* MIRP[03] */ Ins_MIRP, - /* MIRP[04] */ Ins_MIRP, - /* MIRP[05] */ Ins_MIRP, - /* MIRP[06] */ Ins_MIRP, - /* MIRP[07] */ Ins_MIRP, - /* MIRP[08] */ Ins_MIRP, - /* MIRP[09] */ Ins_MIRP, - /* MIRP[10] */ Ins_MIRP, - /* MIRP[11] */ Ins_MIRP, - /* MIRP[12] */ Ins_MIRP, - /* MIRP[13] */ Ins_MIRP, - /* MIRP[14] */ Ins_MIRP, - /* MIRP[15] */ Ins_MIRP, - - /* MIRP[16] */ Ins_MIRP, - /* MIRP[17] */ Ins_MIRP, - /* MIRP[18] */ Ins_MIRP, - /* MIRP[19] */ Ins_MIRP, - /* MIRP[20] */ Ins_MIRP, - /* MIRP[21] */ Ins_MIRP, - /* MIRP[22] */ Ins_MIRP, - /* MIRP[23] */ Ins_MIRP, - /* MIRP[24] */ Ins_MIRP, - /* MIRP[25] */ Ins_MIRP, - /* MIRP[26] */ Ins_MIRP, - /* MIRP[27] */ Ins_MIRP, - /* MIRP[28] */ Ins_MIRP, - /* MIRP[29] */ Ins_MIRP, - /* MIRP[30] */ Ins_MIRP, - /* MIRP[31] */ Ins_MIRP - }; -#endif - - -/****************************************************************/ -/* */ -/* RUN */ -/* */ -/* This function executes a run of opcodes. It will exit */ -/* in the following cases: */ -/* */ -/* - Errors (in which case it returns FALSE) */ -/* */ -/* - Reaching the end of the main code range (returns TRUE). */ -/* Reaching the end of a code range within a function */ -/* call is an error. */ -/* */ -/* - After executing one single opcode, if the flag */ -/* 'Instruction_Trap' is set to TRUE (returns TRUE). */ -/* */ -/* On exit whith TRUE, test IP < CodeSize to know wether it */ -/* comes from a instruction trap or a normal termination. */ -/* */ -/* */ -/* Note: The documented DEBUG opcode pops a value from */ -/* the stack. This behaviour is unsupported, here */ -/* a DEBUG opcode is always an error. */ -/* */ -/* */ -/* THIS IS THE INTERPRETER'S MAIN LOOP */ -/* */ -/* Instructions appear in the specs' order. */ -/* */ -/****************************************************************/ - - LOCAL_FUNC -#ifndef DEBUG_INTERPRETER - TT_Error RunIns( PExecution_Context exc ) -#else - TT_Error RunIns2( PExecution_Context exc ) -#endif - { - UShort A; - PDefRecord WITH; - PCallRecord WITH1; - - Long ins_counter = 0; /* executed instructions counter */ - -#ifdef TT_CONFIG_OPTION_STATIC_INTERPRETER - cur = *exc; -#endif - - /* set CVT functions */ - CUR.metrics.ratio = 0; - if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem ) - { - /* non-square pixels, use the stretched routines */ - CUR.func_read_cvt = Read_CVT_Stretched; - CUR.func_write_cvt = Write_CVT_Stretched; - CUR.func_move_cvt = Move_CVT_Stretched; - } - else - { - /* square pixels, use normal routines */ - CUR.func_read_cvt = Read_CVT; - CUR.func_write_cvt = Write_CVT; - CUR.func_move_cvt = Move_CVT; - } - - COMPUTE_Funcs(); - Compute_Round( EXEC_ARGS (Byte)exc->GS.round_state ); - - do - { - if ( CALC_Length() != SUCCESS ) - { - CUR.error = TT_Err_Code_Overflow; - goto LErrorLabel_; - } - - /* First, let's check for empty stack and overflow */ - - CUR.args = CUR.top - (Pop_Push_Count[CUR.opcode] >> 4); - - /* `args' is the top of the stack once arguments have been popped. */ - /* One can also interpret it as the index of the last argument. */ - - if ( CUR.args < 0 ) - { - CUR.error = TT_Err_Too_Few_Arguments; - goto LErrorLabel_; - } - - CUR.new_top = CUR.args + (Pop_Push_Count[CUR.opcode] & 15); - - /* `new_top' is the new top of the stack, after the instruction's */ - /* execution. `top' will be set to `new_top' after the 'switch' */ - /* statement. */ - - if ( CUR.new_top > CUR.stackSize ) - { - CUR.error = TT_Err_Stack_Overflow; - goto LErrorLabel_; - } - - CUR.step_ins = TRUE; - CUR.error = TT_Err_Ok; - -#ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH - { - PStorage args = CUR.stack + CUR.args; - Byte opcode = CUR.opcode; - - -#undef ARRAY_BOUND_ERROR -#define ARRAY_BOUND_ERROR goto Set_Invalid_Ref - - switch ( opcode ) - { - case 0x00: /* SVTCA y */ - case 0x01: /* SVTCA x */ - case 0x02: /* SPvTCA y */ - case 0x03: /* SPvTCA x */ - case 0x04: /* SFvTCA y */ - case 0x05: /* SFvTCA x */ - { - Short AA, BB; - - - AA = (Short)(opcode & 1) << 14; - BB = AA ^ (Short)0x4000; - - if ( opcode < 4 ) - { - CUR.GS.projVector.x = AA; - CUR.GS.projVector.y = BB; - - CUR.GS.dualVector.x = AA; - CUR.GS.dualVector.y = BB; - } - - if ( (opcode & 2) == 0 ) - { - CUR.GS.freeVector.x = AA; - CUR.GS.freeVector.y = BB; - } - - COMPUTE_Funcs(); - } - break; - - case 0x06: /* SPvTL // */ - case 0x07: /* SPvTL + */ - DO_SPVTL - break; - - case 0x08: /* SFvTL // */ - case 0x09: /* SFvTL + */ - DO_SFVTL - break; - - case 0x0A: /* SPvFS */ - DO_SPVFS - break; - - case 0x0B: /* SFvFS */ - DO_SFVFS - break; - - case 0x0C: /* GPV */ - DO_GPV - break; - - case 0x0D: /* GFV */ - DO_GFV - break; - - case 0x0E: /* SFvTPv */ - DO_SFVTPV - break; - - case 0x0F: /* ISECT */ - Ins_ISECT( EXEC_ARGS args ); - break; - - case 0x10: /* SRP0 */ - DO_SRP0 - break; - - case 0x11: /* SRP1 */ - DO_SRP1 - break; - - case 0x12: /* SRP2 */ - DO_SRP2 - break; - - case 0x13: /* SZP0 */ - Ins_SZP0( EXEC_ARGS args ); - break; - - case 0x14: /* SZP1 */ - Ins_SZP1( EXEC_ARGS args ); - break; - - case 0x15: /* SZP2 */ - Ins_SZP2( EXEC_ARGS args ); - break; - - case 0x16: /* SZPS */ - Ins_SZPS( EXEC_ARGS args ); - break; - - case 0x17: /* SLOOP */ - DO_SLOOP - break; - - case 0x18: /* RTG */ - DO_RTG - break; - - case 0x19: /* RTHG */ - DO_RTHG - break; - - case 0x1A: /* SMD */ - DO_SMD - break; - - case 0x1B: /* ELSE */ - Ins_ELSE( EXEC_ARGS args ); - break; - - case 0x1C: /* JMPR */ - DO_JMPR - break; - - case 0x1D: /* SCVTCI */ - DO_SCVTCI - break; - - case 0x1E: /* SSWCI */ - DO_SSWCI - break; - - case 0x1F: /* SSW */ - DO_SSW - break; - - case 0x20: /* DUP */ - DO_DUP - break; - - case 0x21: /* POP */ - /* nothing :-) !! */ - break; - - case 0x22: /* CLEAR */ - DO_CLEAR - break; - - case 0x23: /* SWAP */ - DO_SWAP - break; - - case 0x24: /* DEPTH */ - DO_DEPTH - break; - - case 0x25: /* CINDEX */ - DO_CINDEX - break; - - case 0x26: /* MINDEX */ - Ins_MINDEX( EXEC_ARGS args ); - break; - - case 0x27: /* ALIGNPTS */ - Ins_ALIGNPTS( EXEC_ARGS args ); - break; - - case 0x28: /* ???? */ - Ins_UNKNOWN( EXEC_ARGS args ); - break; - - case 0x29: /* UTP */ - Ins_UTP( EXEC_ARGS args ); - break; - - case 0x2A: /* LOOPCALL */ - Ins_LOOPCALL( EXEC_ARGS args ); - break; - - case 0x2B: /* CALL */ - Ins_CALL( EXEC_ARGS args ); - break; - - case 0x2C: /* FDEF */ - Ins_FDEF( EXEC_ARGS args ); - break; - - case 0x2D: /* ENDF */ - Ins_ENDF( EXEC_ARGS args ); - break; - - case 0x2E: /* MDAP */ - case 0x2F: /* MDAP */ - Ins_MDAP( EXEC_ARGS args ); - break; - - - case 0x30: /* IUP */ - case 0x31: /* IUP */ - Ins_IUP( EXEC_ARGS args ); - break; - - case 0x32: /* SHP */ - case 0x33: /* SHP */ - Ins_SHP( EXEC_ARGS args ); - break; - - case 0x34: /* SHC */ - case 0x35: /* SHC */ - Ins_SHC( EXEC_ARGS args ); - break; - - case 0x36: /* SHZ */ - case 0x37: /* SHZ */ - Ins_SHZ( EXEC_ARGS args ); - break; - - case 0x38: /* SHPIX */ - Ins_SHPIX( EXEC_ARGS args ); - break; - - case 0x39: /* IP */ - Ins_IP( EXEC_ARGS args ); - break; - - case 0x3A: /* MSIRP */ - case 0x3B: /* MSIRP */ - Ins_MSIRP( EXEC_ARGS args ); - break; - - case 0x3C: /* AlignRP */ - Ins_ALIGNRP( EXEC_ARGS args ); - break; - - case 0x3D: /* RTDG */ - DO_RTDG - break; - - case 0x3E: /* MIAP */ - case 0x3F: /* MIAP */ - Ins_MIAP( EXEC_ARGS args ); - break; - - case 0x40: /* NPUSHB */ - Ins_NPUSHB( EXEC_ARGS args ); - break; - - case 0x41: /* NPUSHW */ - Ins_NPUSHW( EXEC_ARGS args ); - break; - - case 0x42: /* WS */ - DO_WS - break; - - Set_Invalid_Ref: - CUR.error = TT_Err_Invalid_Reference; - break; - - case 0x43: /* RS */ - DO_RS - break; - - case 0x44: /* WCVTP */ - DO_WCVTP - break; - - case 0x45: /* RCVT */ - DO_RCVT - break; - - case 0x46: /* GC */ - case 0x47: /* GC */ - Ins_GC( EXEC_ARGS args ); - break; - - case 0x48: /* SCFS */ - Ins_SCFS( EXEC_ARGS args ); - break; - - case 0x49: /* MD */ - case 0x4A: /* MD */ - Ins_MD( EXEC_ARGS args ); - break; - - case 0x4B: /* MPPEM */ - DO_MPPEM - break; - - case 0x4C: /* MPS */ - DO_MPS - break; - - case 0x4D: /* FLIPON */ - DO_FLIPON - break; - - case 0x4E: /* FLIPOFF */ - DO_FLIPOFF - break; - - case 0x4F: /* DEBUG */ - DO_DEBUG - break; - - case 0x50: /* LT */ - DO_LT - break; - - case 0x51: /* LTEQ */ - DO_LTEQ - break; - - case 0x52: /* GT */ - DO_GT - break; - - case 0x53: /* GTEQ */ - DO_GTEQ - break; - - case 0x54: /* EQ */ - DO_EQ - break; - - case 0x55: /* NEQ */ - DO_NEQ - break; - - case 0x56: /* ODD */ - DO_ODD - break; - - case 0x57: /* EVEN */ - DO_EVEN - break; - - case 0x58: /* IF */ - Ins_IF( EXEC_ARGS args ); - break; - - case 0x59: /* EIF */ - /* do nothing */ - break; - - case 0x5A: /* AND */ - DO_AND - break; - - case 0x5B: /* OR */ - DO_OR - break; - - case 0x5C: /* NOT */ - DO_NOT - break; - - case 0x5D: /* DELTAP1 */ - Ins_DELTAP( EXEC_ARGS args ); - break; - - case 0x5E: /* SDB */ - DO_SDB - break; - - case 0x5F: /* SDS */ - DO_SDS - break; - - case 0x60: /* ADD */ - DO_ADD - break; - - case 0x61: /* SUB */ - DO_SUB - break; - - case 0x62: /* DIV */ - DO_DIV - break; - - case 0x63: /* MUL */ - DO_MUL - break; - - case 0x64: /* ABS */ - DO_ABS - break; - - case 0x65: /* NEG */ - DO_NEG - break; - - case 0x66: /* FLOOR */ - DO_FLOOR - break; - - case 0x67: /* CEILING */ - DO_CEILING - break; - - case 0x68: /* ROUND */ - case 0x69: /* ROUND */ - case 0x6A: /* ROUND */ - case 0x6B: /* ROUND */ - DO_ROUND - break; - - case 0x6C: /* NROUND */ - case 0x6D: /* NROUND */ - case 0x6E: /* NRRUND */ - case 0x6F: /* NROUND */ - DO_NROUND - break; - - case 0x70: /* WCVTF */ - DO_WCVTF - break; - - case 0x71: /* DELTAP2 */ - case 0x72: /* DELTAP3 */ - Ins_DELTAP( EXEC_ARGS args ); - break; - - case 0x73: /* DELTAC0 */ - case 0x74: /* DELTAC1 */ - case 0x75: /* DELTAC2 */ - Ins_DELTAC( EXEC_ARGS args ); - break; - - case 0x76: /* SROUND */ - DO_SROUND - break; - - case 0x77: /* S45Round */ - DO_S45ROUND - break; - - case 0x78: /* JROT */ - DO_JROT - break; - - case 0x79: /* JROF */ - DO_JROF - break; - - case 0x7A: /* ROFF */ - DO_ROFF - break; - - case 0x7B: /* ???? */ - Ins_UNKNOWN( EXEC_ARGS args ); - break; - - case 0x7C: /* RUTG */ - DO_RUTG - break; - - case 0x7D: /* RDTG */ - DO_RDTG - break; - - case 0x7E: /* SANGW */ - case 0x7F: /* AA */ - /* nothing - obsolete */ - break; - - case 0x80: /* FLIPPT */ - Ins_FLIPPT( EXEC_ARGS args ); - break; - - case 0x81: /* FLIPRGON */ - Ins_FLIPRGON( EXEC_ARGS args ); - break; - - case 0x82: /* FLIPRGOFF */ - Ins_FLIPRGOFF( EXEC_ARGS args ); - break; - - case 0x83: /* UNKNOWN */ - case 0x84: /* UNKNOWN */ - Ins_UNKNOWN( EXEC_ARGS args ); - break; - - case 0x85: /* SCANCTRL */ - Ins_SCANCTRL( EXEC_ARGS args ); - break; - - case 0x86: /* SDPVTL */ - case 0x87: /* SDPVTL */ - Ins_SDPVTL( EXEC_ARGS args ); - break; - - case 0x88: /* GETINFO */ - Ins_GETINFO( EXEC_ARGS args ); - break; - - case 0x89: /* IDEF */ - Ins_IDEF( EXEC_ARGS args ); - break; - - case 0x8A: /* ROLL */ - Ins_ROLL( EXEC_ARGS args ); - break; - - case 0x8B: /* MAX */ - DO_MAX - break; - - case 0x8C: /* MIN */ - DO_MIN - break; - - case 0x8D: /* SCANTYPE */ - Ins_SCANTYPE( EXEC_ARGS args ); - break; - - case 0x8E: /* INSTCTRL */ - Ins_INSTCTRL( EXEC_ARGS args ); - break; - - case 0x8F: - Ins_UNKNOWN( EXEC_ARGS args ); - break; - - default: - if ( opcode >= 0xE0 ) - Ins_MIRP( EXEC_ARGS args ); - else if ( opcode >= 0xC0 ) - Ins_MDRP( EXEC_ARGS args ); - else if ( opcode >= 0xB8 ) - Ins_PUSHW( EXEC_ARGS args ); - else if ( opcode >= 0xB0 ) - Ins_PUSHB( EXEC_ARGS args ); - else - Ins_UNKNOWN( EXEC_ARGS args ); - } - - } -#else - Instruct_Dispatch[CUR.opcode]( EXEC_ARGS &CUR.stack[CUR.args] ); -#endif - if ( CUR.error != TT_Err_Ok ) - { - switch ( (Int)(CUR.error) ) - { - case TT_Err_Invalid_Opcode: /* looking for redefined instructions */ - A = 0; - - while ( A < CUR.numIDefs ) - { - WITH = &CUR.IDefs[A]; - - if ( WITH->Active && CUR.opcode == WITH->Opc ) - { - if ( CUR.callTop >= CUR.callSize ) - { - CUR.error = TT_Err_Invalid_Reference; - goto LErrorLabel_; - } - - WITH1 = &CUR.callStack[CUR.callTop]; - - WITH1->Caller_Range = CUR.curRange; - WITH1->Caller_IP = CUR.IP + 1; - WITH1->Cur_Count = 1; - WITH1->Cur_Restart = WITH->Start; - - if ( INS_Goto_CodeRange( WITH->Range, WITH->Start ) == FAILURE ) - goto LErrorLabel_; - - goto LSuiteLabel_; - } - else - { - A++; - continue; - } - } - - CUR.error = TT_Err_Invalid_Opcode; - goto LErrorLabel_; -/* break; Unreachable code warning suppress. Leave in case a later - change to remind the editor to consider break; */ - - default: - goto LErrorLabel_; -/* break; */ - } - } - - CUR.top = CUR.new_top; - - if ( CUR.step_ins ) - CUR.IP += CUR.length; - - /* increment instruction counter and check if we didn't */ - /* run this program for too long ?? (e.g. infinite loops) */ - if ( ++ins_counter > MAX_RUNNABLE_OPCODES ) - { - CUR.error = TT_Err_Execution_Too_Long; - goto LErrorLabel_; - } - - LSuiteLabel_: - - if ( CUR.IP >= CUR.codeSize ) - { - if ( CUR.callTop > 0 ) - { - CUR.error = TT_Err_Code_Overflow; - goto LErrorLabel_; - } - else - goto LNo_Error_; - } - } while ( !CUR.instruction_trap ); - - LNo_Error_: - CUR.error = TT_Err_Ok; - - LErrorLabel_: - -#ifdef TT_CONFIG_OPTION_STATIC_INTERPRETER - *exc = cur; -#endif - - return CUR.error; - - - } - - -#ifdef DEBUG_INTERPRETER - - /* This function must be declared by the debugger front end */ - /* in order to specify which code range to debug. */ - - int debug_coderange = TT_CodeRange_Glyph; - - - LOCAL_FUNC - TT_Error RunIns( PExecution_Context exc ) - { - Int A, diff; - ULong next_IP; - Char ch, oldch; - char *temp; - int key; - - TT_Error error = 0; - - TGlyph_Zone save; - TGlyph_Zone pts; - -#define TT_Round_Off 5 -#define TT_Round_To_Half_Grid 0 -#define TT_Round_To_Grid 1 -#define TT_Round_To_Double_Grid 2 -#define TT_Round_Up_To_Grid 4 -#define TT_Round_Down_To_Grid 3 -#define TT_Round_Super 6 -#define TT_Round_Super_45 7 - - const String* round_str[8] = - { - "to half-grid", - "to grid", - "to double grid", - "down to grid", - "up to grid", - "off", - "super", - "super 45" - }; - - /* Check that we're running the code range that is effectively */ - /* asked by the debugger front end. */ - if ( exc->curRange != debug_coderange ) - return RunIns2( exc ); - - pts = exc->pts; - - save.n_points = pts.n_points; - save.n_contours = pts.n_contours; - - MEM_Alloc( save.org, sizeof ( TT_Vector ) * save.n_points ); - MEM_Alloc( save.cur, sizeof ( TT_Vector ) * save.n_points ); - MEM_Alloc( save.touch, sizeof ( Byte ) * save.n_points ); - - exc->instruction_trap = 1; - - oldch = '\0'; - - do - { - if ( exc->IP < exc->codeSize ) - { -#ifdef TT_CONFIG_OPTION_STATIC_INTERPRETER - cur = *exc; -#endif - CALC_Length(); - - exc->args = exc->top - (Pop_Push_Count[exc->opcode] >> 4); - - /* `args' is the top of the stack once arguments have been popped. */ - /* One can also interpret it as the index of the last argument. */ - - /* Print the current line. We use a 80-columns console with the */ - /* following formatting: */ - /* */ - /* [loc]:[addr] [opcode] [disassemby] [a][b]|[c][d] */ - /* */ - - { - char temp[80]; - int n, col, pop; - int args = CUR.args; - - - sprintf( temp, "%78c\n", ' ' ); - - /* first letter of location */ - switch ( CUR.curRange ) - { - case TT_CodeRange_Glyph: - temp[0] = 'g'; - break; - case TT_CodeRange_Cvt: - temp[0] = 'c'; - break; - default: - temp[0] = 'f'; - } - - /* current IP */ - sprintf( temp+1, "%04lx: %02x %-36.36s", - CUR.IP, - CUR.opcode, - Cur_U_Line(&CUR) ); - - strncpy( temp+46, " (", 2 ); - - args = CUR.top - 1; - pop = Pop_Push_Count[CUR.opcode] >> 4; - col = 48; - for ( n = 6; n > 0; n-- ) - { - if ( pop == 0 ) - temp[col-1] = (temp[col-1] == '(' ? ' ' : ')' ); - - if ( args < CUR.top && args >= 0 ) - sprintf( temp+col, "%04lx", CUR.stack[args] ); - else - sprintf( temp+col, " " ); - - temp[col+4] = ' '; - col += 5; - pop--; - args--; - } - temp[78] = '\n'; - temp[79] = '\0'; - PTRACE0(( temp )); - } - - /* First, check for empty stack and overflow */ - if ( CUR.args < 0 ) - { - PTRACE0(( "ERROR : Too few arguments\n" )); - exc->error = TT_Err_Too_Few_Arguments; - goto LErrorLabel_; - } - - CUR.new_top = CUR.args + (Pop_Push_Count[CUR.opcode] & 15); - - /* new_top is the new top of the stack, after the instruction's */ - /* execution. top will be set to new_top after the 'case' */ - - if ( CUR.new_top > CUR.stackSize ) - { - PTRACE0(( "ERROR : Stack overflow\n" )); - exc->error = TT_Err_Stack_Overflow; - goto LErrorLabel_; - } - } - else - PTRACE0(( "End of program reached.\n" )); - - key = 0; - do - { - /* read keyboard */ - - ch = getch(); - - switch ( ch ) - { - /* Help - show keybindings */ - case '?': - PTRACE0(( "FDebug Help\n\n" )); - PTRACE0(( "? Show this page\n" )); - PTRACE0(( "q Quit debugger\n" )); - PTRACE0(( "n Skip to next instruction\n" )); - PTRACE0(( "s Step into\n" )); - PTRACE0(( "v Show vector info\n" )); - PTRACE0(( "g Show graphics state\n" )); - PTRACE0(( "p Show points zone\n\n" )); - break; - - /* Show vectors */ - case 'v': - PTRACE0(( "freedom (%04hx,%04hx)\n", exc->GS.freeVector.x, - exc->GS.freeVector.y )); - PTRACE0(( "projection (%04hx,%04hx)\n", exc->GS.projVector.x, - exc->GS.projVector.y )); - PTRACE0(( "dual (%04hx,%04hx)\n\n", exc->GS.dualVector.x, - exc->GS.dualVector.y )); - break; - - /* Show graphics state */ - case 'g': - PTRACE0(( "rounding %s\n", round_str[exc->GS.round_state] )); - PTRACE0(( "min dist %04lx\n", exc->GS.minimum_distance )); - PTRACE0(( "cvt_cutin %04lx\n", exc->GS.control_value_cutin )); - break; - - /* Show points table */ - case 'p': - for ( A = 0; A < exc->pts.n_points; A++ ) - { - PTRACE0(( "%02hx ", A )); - PTRACE0(( "%08lx,%08lx - ", pts.org[A].x, pts.org[A].y )); - PTRACE0(( "%08lx,%08lx\n", pts.cur[A].x, pts.cur[A].y )); - } - PTRACE0(( "\n" )); - break; - - default: - key = 1; - } - } while ( !key ); - - MEM_Copy( save.org, pts.org, pts.n_points * sizeof ( TT_Vector ) ); - MEM_Copy( save.cur, pts.cur, pts.n_points * sizeof ( TT_Vector ) ); - MEM_Copy( save.touch, pts.touch, pts.n_points ); - - /* a return indicate the last command */ - if (ch == '\r') - ch = oldch; - - switch ( ch ) - { - /* Quit debugger */ - case 'q': - goto LErrorLabel_; - - /* Step over */ - case 'n': - if ( exc->IP < exc->codeSize ) - { - /* `step over' is equivalent to `step into' except if */ - /* the current opcode is a CALL or LOOPCALL */ - if ( CUR.opcode != 0x2a && CUR.opcode != 0x2b ) - goto Step_into; - - /* otherwise, loop execution until we reach the next opcode */ - next_IP = CUR.IP + CUR.length; - while ( exc->IP != next_IP ) - { - if ( ( error = RunIns2( exc ) ) ) - goto LErrorLabel_; - } - } - oldch = ch; - break; - - /* Step into */ - case 's': - if ( exc->IP < exc->codeSize ) - - Step_into: - if ( ( error = RunIns2( exc ) ) ) - goto LErrorLabel_; - oldch = ch; - break; - - default: - PTRACE0(( "unknown command. Press ? for help\n" )); - oldch = '\0'; - } - - for ( A = 0; A < pts.n_points; A++ ) - { - diff = 0; - if ( save.org[A].x != pts.org[A].x ) diff |= 1; - if ( save.org[A].y != pts.org[A].y ) diff |= 2; - if ( save.cur[A].x != pts.cur[A].x ) diff |= 4; - if ( save.cur[A].y != pts.cur[A].y ) diff |= 8; - if ( save.touch[A] != pts.touch[A] ) diff |= 16; - - if ( diff ) - { - PTRACE0(( "%02hx ", A )); - - if ( diff & 16 ) temp = "(%01hx)"; else temp = " %01hx "; - PTRACE0(( temp, save.touch[A] & 7 )); - - if ( diff & 1 ) temp = "(%08lx)"; else temp = " %08lx "; - PTRACE0(( temp, save.org[A].x )); - - if ( diff & 2 ) temp = "(%08lx)"; else temp = " %08lx "; - PTRACE0(( temp, save.org[A].y )); - - if ( diff & 4 ) temp = "(%08lx)"; else temp = " %08lx "; - PTRACE0(( temp, save.cur[A].x )); - - if ( diff & 8 ) temp = "(%08lx)"; else temp = " %08lx "; - PTRACE0(( temp, save.cur[A].y )); - - PTRACE0(( "\n" )); - - PTRACE0(( "%02hx ", A )); - - if ( diff & 16 ) temp = "[%01hx]"; else temp = " %01hx "; - PTRACE0(( temp, pts.touch[A] & 7 )); - - if ( diff & 1 ) temp = "[%08lx]"; else temp = " %08lx "; - PTRACE0(( temp, pts.org[A].x )); - - if ( diff & 2 ) temp = "[%08lx]"; else temp = " %08lx "; - PTRACE0(( temp, pts.org[A].y )); - - if ( diff & 4 ) temp = "[%08lx]"; else temp = " %08lx "; - PTRACE0(( temp, pts.cur[A].x )); - - if ( diff & 8 ) temp = "[%08lx]"; else temp = " %08lx "; - PTRACE0(( temp, pts.cur[A].y )); - - PTRACE0(( "\n\n" )); - } - } - } while ( TRUE ); - - LErrorLabel_: - - return error; - } - -#endif /* DEBUG_INTERPRETER */ - - -#endif /* TT_CONFIG_OPTION_NO_INTERPRETER */ - -/* END */ Index: xc/extras/FreeType/lib/ttinterp.h diff -u xc/extras/FreeType/lib/ttinterp.h:1.1.1.2 xc/extras/FreeType/lib/ttinterp.h:removed --- xc/extras/FreeType/lib/ttinterp.h:1.1.1.2 Sat Feb 12 23:55:45 2000 +++ xc/extras/FreeType/lib/ttinterp.h Wed Mar 16 20:59:40 2005 @@ -1,54 +0,0 @@ -/******************************************************************* - * - * ttinterp.h 2.2 - * - * TrueType bytecode intepreter. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 2.2 and 2.1: - * - * - a small bugfix in the Push opcodes - * - * Changes between 2.1 and 2.0: - * - * - created the TTExec component to take care of all execution - * context management. The interpreter has now one single - * function. - * - * - made some changes to support re-entrancy. The re-entrant - * interpreter is smaller! - * - ******************************************************************/ - -#ifndef TTINTERP_H -#define TTINTERP_H - -#include "ttconfig.h" -#include "ttobjs.h" - - -#ifdef __cplusplus - extern "C" { -#endif - - /* Run instructions in current execution context */ - - LOCAL_DEF TT_Error RunIns( PExecution_Context exc ); - -#ifdef __cplusplus - } -#endif - -#endif /* TTINTERP_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttload.c diff -u xc/extras/FreeType/lib/ttload.c:1.1.1.3 xc/extras/FreeType/lib/ttload.c:removed --- xc/extras/FreeType/lib/ttload.c:1.1.1.3 Sat Feb 12 23:55:45 2000 +++ xc/extras/FreeType/lib/ttload.c Wed Mar 16 20:59:40 2005 @@ -1,1574 +0,0 @@ - -/******************************************************************* - * - * ttload.c 1.0 - * - * TrueType Tables Loader. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "tttypes.h" -#include "ttdebug.h" -#include "ttcalc.h" -#include "ttfile.h" - -#include "tttables.h" -#include "ttobjs.h" - -#include "ttmemory.h" -#include "tttags.h" -#include "ttload.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_load - -/* In all functions, the stream is taken from the 'face' object */ -#define DEFINE_LOCALS DEFINE_LOAD_LOCALS( face->stream ) -#define DEFINE_LOCALS_WO_FRAME DEFINE_LOAD_LOCALS_WO_FRAME( face->stream ) - - -/******************************************************************* - * - * Function : LookUp_TrueType_Table - * - * Description : Looks for a TrueType table by name. - * - * Input : face face table to look for - * tag searched tag - * - * Output : Index of table if found, -1 otherwise. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_LookUp_Table( PFace face, - ULong tag ) - { - UShort i; - - - PTRACE4(( "TT_LookUp_Table( %08lx, %c%c%c%c )\n", - (Long)face, - (Char)(tag >> 24), - (Char)(tag >> 16), - (Char)(tag >> 8), - (Char)(tag) )); - - for ( i = 0; i < face->numTables; i++ ) - if ( face->dirTables[i].Tag == tag ) - return i; - - PTRACE4(( " Could not find table!\n" )); - return -1; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Collection - * - * Description : Loads the TTC table directory into face table. - * - * Input : face face record to look for - * - * Output : Error code. - * - ******************************************************************/ - - static TT_Error Load_TrueType_Collection( PFace face ) - { - DEFINE_LOCALS; - - ULong n; - - - PTRACE3(( "Load_TrueType_Collection( %08lx )\n", (long)face )); - - if ( FILE_Seek ( 0L ) || - ACCESS_Frame( 12L ) ) - return error; - - face->ttcHeader.Tag = GET_Tag4(); - face->ttcHeader.version = GET_Long(); - face->ttcHeader.DirCount = GET_Long(); - - FORGET_Frame(); - - if ( face->ttcHeader.Tag != TTAG_ttcf ) - { - face->ttcHeader.Tag = 0; - face->ttcHeader.version = 0; - face->ttcHeader.DirCount = 0; - - face->ttcHeader.TableDirectory = NULL; - - PTRACE3(("skipped.\n")); - - return TT_Err_File_Is_Not_Collection; - } - - if ( ALLOC_ARRAY( face->ttcHeader.TableDirectory, - face->ttcHeader.DirCount, - ULong ) || - ACCESS_Frame( face->ttcHeader.DirCount * 4L ) ) - return error; - - for ( n = 0; n < face->ttcHeader.DirCount; n++ ) - face->ttcHeader.TableDirectory[n] = GET_ULong(); - - FORGET_Frame(); - - PTRACE3(( "collections directory loaded.\n" )); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Directory - * - * Description : Loads the table directory into face table. - * - * Input : face face record to look for - * - * faceIndex the index of the TrueType font, when - * we're opening a collection. - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Directory( PFace face, ULong faceIndex ) - { - DEFINE_LOCALS; - - UShort n, limit; - TTableDir tableDir; - - PTableDirEntry entry; - - - PTRACE2(("Load_TT_Directory( %08lx, %ld )\n", (long)face, faceIndex)); - - error = Load_TrueType_Collection( face ); - - if ( error ) - { - if ( error != TT_Err_File_Is_Not_Collection ) - return error; - - /* the file isn't a collection, exit if we're asking */ - /* for a collected font */ - if ( faceIndex != 0 ) - return error; - - /* Now skip to the beginning of the file */ - if ( FILE_Seek( 0L ) ) - return error; - } - else - { - /* The file is a collection. Check the font index */ - if ( faceIndex >= face->ttcHeader.DirCount ) - return TT_Err_Invalid_Argument; - - /* select a TrueType font in the ttc file */ - if ( FILE_Seek( face->ttcHeader.TableDirectory[faceIndex] ) ) - return error; - } - - if ( ACCESS_Frame( 12L ) ) - return error; - - tableDir.version = GET_Long(); - tableDir.numTables = GET_UShort(); - - tableDir.searchRange = GET_UShort(); - tableDir.entrySelector = GET_UShort(); - tableDir.rangeShift = GET_UShort(); - - FORGET_Frame(); - - PTRACE2(( "-- Tables count : %12u\n", tableDir.numTables )); - PTRACE2(( "-- Format version : %08lx\n", tableDir.version )); - - /* Check that we have a 'sfnt' format there */ - - if ( tableDir.version != 0x00010000 && /* MS fonts */ - tableDir.version != 0x74727565 && /* Mac fonts */ - tableDir.version != 0x00000000 ) /* some Korean fonts */ - { - PERROR(( "!! invalid file format" )); - return TT_Err_Invalid_File_Format; - } - - face->numTables = tableDir.numTables; - - if ( ALLOC_ARRAY( face->dirTables, - face->numTables, - TTableDirEntry ) ) - return error; - - if ( ACCESS_Frame( face->numTables * 16L ) ) - return error; - - limit = face->numTables; - entry = face->dirTables; - - for ( n = 0; n < limit; n++ ) - { /* loop through the tables and get all entries */ - entry->Tag = GET_Tag4(); - entry->CheckSum = GET_ULong(); - entry->Offset = GET_Long(); - entry->Length = GET_Long(); - - PTRACE2(( " %c%c%c%c - %08lx - %08lx\n", - (Char)(entry->Tag >> 24), - (Char)(entry->Tag >> 16), - (Char)(entry->Tag >> 8 ), - (Char)(entry->Tag), - entry->Offset, - entry->Length )); - entry++; - } - - FORGET_Frame(); - - PTRACE2(( "Directory loaded\n\n" )); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_MaxProfile - * - * Description : Loads the maxp table into face table. - * - * Input : face face table to look for - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_MaxProfile( PFace face ) - { - DEFINE_LOCALS; - - Long i; - PMaxProfile maxProfile = &face->maxProfile; - - - PTRACE2(( "Load_TT_MaxProfile( %08lx )\n", (long)face )); - - if ( ( i = TT_LookUp_Table( face, TTAG_maxp ) ) < 0 ) - return TT_Err_Max_Profile_Missing; - - if ( FILE_Seek( face->dirTables[i].Offset ) ) /* seek to maxprofile */ - return error; - - if ( ACCESS_Frame( 32L ) ) /* read into frame */ - return error; - - /* read frame data into face table */ - maxProfile->version = GET_ULong(); - - maxProfile->numGlyphs = GET_UShort(); - - maxProfile->maxPoints = GET_UShort(); - maxProfile->maxContours = GET_UShort(); - maxProfile->maxCompositePoints = GET_UShort(); - maxProfile->maxCompositeContours = GET_UShort(); - - maxProfile->maxZones = GET_UShort(); - maxProfile->maxTwilightPoints = GET_UShort(); - - maxProfile->maxStorage = GET_UShort(); - maxProfile->maxFunctionDefs = GET_UShort(); - maxProfile->maxInstructionDefs = GET_UShort(); - maxProfile->maxStackElements = GET_UShort(); - maxProfile->maxSizeOfInstructions = GET_UShort(); - maxProfile->maxComponentElements = GET_UShort(); - maxProfile->maxComponentDepth = GET_UShort(); - - FORGET_Frame(); - - /* XXX : an adjustement that is necessary to load certain */ - /* broken fonts like "Keystrokes MT" :-( */ - /* */ - /* We allocate 64 function entries by default when */ - /* the maxFunctionDefs field is null. */ - - if (maxProfile->maxFunctionDefs == 0) - maxProfile->maxFunctionDefs = 64; - - face->numGlyphs = maxProfile->numGlyphs; - - face->maxPoints = MAX( maxProfile->maxCompositePoints, - maxProfile->maxPoints ); - face->maxContours = MAX( maxProfile->maxCompositeContours, - maxProfile->maxContours ); - face->maxComponents = maxProfile->maxComponentElements + - maxProfile->maxComponentDepth; - - /* XXX: Some fonts have maxComponents set to 0; we will */ - /* then use 16 of them by default. */ - if ( face->maxComponents == 0 ) - face->maxComponents = 16; - - /* We also increase maxPoints and maxContours in order to support */ - /* some broken fonts. */ - face->maxPoints += 8; - face->maxContours += 4; - - PTRACE2(( "GASP loaded.\n" )); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Gasp - * - * Description : Loads the TrueType Gasp table into the face - * table. - * - * Input : face face table to look for - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Gasp( PFace face ) - { - DEFINE_LOCALS; - - Long i; - UShort j; - TGasp* gas; - GaspRange* gaspranges; - - - PTRACE2(( "Load_TT_Gasp( %08lx )\n", (long)face )); - - if ( ( i = TT_LookUp_Table( face, TTAG_gasp ) ) < 0 ) - return TT_Err_Ok; /* gasp table is not required */ - - if ( FILE_Seek( face->dirTables[i].Offset ) || - ACCESS_Frame( 4L ) ) - return error; - - gas = &face->gasp; - - gas->version = GET_UShort(); - gas->numRanges = GET_UShort(); - - FORGET_Frame(); - - PTRACE3(( "number of ranges = %d\n", gas->numRanges )); - - if ( ALLOC_ARRAY( gaspranges, gas->numRanges, GaspRange ) || - ACCESS_Frame( gas->numRanges * 4L ) ) - goto Fail; - - face->gasp.gaspRanges = gaspranges; - - for ( j = 0; j < gas->numRanges; j++ ) - { - gaspranges[j].maxPPEM = GET_UShort(); - gaspranges[j].gaspFlag = GET_UShort(); - - PTRACE3(( " [max:%d flag:%d]", - gaspranges[j].maxPPEM, - gaspranges[j].gaspFlag )); - } - PTRACE3(("\n")); - - FORGET_Frame(); - - PTRACE2(( "GASP loaded\n" )); - return TT_Err_Ok; - - Fail: - FREE( gaspranges ); - gas->numRanges = 0; - return error; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Header - * - * Description : Loads the TrueType header table into the face - * table. - * - * Input : face face table to look for - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Header( PFace face ) - { - DEFINE_LOCALS; - - Long i; - TT_Header* header; - - - PTRACE2(( "Load_TT_Header( %08lx )\n", (long)face )); - - if ( ( i = TT_LookUp_Table( face, TTAG_head ) ) < 0 ) - { - PTRACE0(( "Font Header is missing !!\n" )); - return TT_Err_Header_Table_Missing; - } - - if ( FILE_Seek( face->dirTables[i].Offset ) || - ACCESS_Frame( 54L ) ) - return error; - - header = &face->fontHeader; - - header->Table_Version = GET_ULong(); - header->Font_Revision = GET_ULong(); - - header->CheckSum_Adjust = GET_Long(); - header->Magic_Number = GET_Long(); - - header->Flags = GET_UShort(); - header->Units_Per_EM = GET_UShort(); - - header->Created [0] = GET_Long(); - header->Created [1] = GET_Long(); - header->Modified[0] = GET_Long(); - header->Modified[1] = GET_Long(); - - header->xMin = GET_Short(); - header->yMin = GET_Short(); - header->xMax = GET_Short(); - header->yMax = GET_Short(); - - header->Mac_Style = GET_UShort(); - header->Lowest_Rec_PPEM = GET_UShort(); - - header->Font_Direction = GET_Short(); - header->Index_To_Loc_Format = GET_Short(); - header->Glyph_Data_Format = GET_Short(); - - FORGET_Frame(); - - PTRACE2(( " Units per EM : %8u\n", header->Units_Per_EM )); - PTRACE2(( " IndexToLoc : %8d\n", header->Index_To_Loc_Format )); - PTRACE2(( "Font Header Loaded.\n" )); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Metrics - * - * Description : Loads the horizontal or vertical metrics table - * into face object. - * - * Input : face - * vertical set to true when loading the vmtx table, - * or false for hmtx - * - * Output : Error code. - * - ******************************************************************/ - - static - TT_Error Load_TrueType_Metrics( PFace face, - Bool vertical ) - { - DEFINE_LOCALS; - - Long n, num_shorts, num_shorts_checked, num_longs; - - PLongMetrics* longs; - PShortMetrics* shorts; - - PLongMetrics long_metric; - - - PTRACE2(( "Load_TT_%s_Metrics( %08lx )\n", - vertical ? "Vertical" : "Horizontal", - (long)face )); - - if ( vertical ) - { - /* The table is optional, quit silently if it wasn't found */ - /* XXX : Some fonts have a valid vertical header with a non-null */ - /* "number_of_VMetrics" fields, but no corresponding */ - /* 'vmtx' table to get the metrics from (e.g. mingliu) */ - /* */ - /* For safety, we set the field to 0 ! */ - /* */ - n = TT_LookUp_Table( face, TTAG_vmtx ); - if ( n < 0 ) - { - /* Set the number_Of_VMetrics to 0! */ - PTRACE2(( " no vertical header in file.\n" )); - face->verticalHeader.number_Of_VMetrics = 0; - return TT_Err_Ok; - } - - num_longs = face->verticalHeader.number_Of_VMetrics; - longs = (PLongMetrics*)&face->verticalHeader.long_metrics; - shorts = (PShortMetrics*)&face->verticalHeader.short_metrics; - } - else - { - if ( ( n = TT_LookUp_Table( face, TTAG_hmtx ) ) < 0 ) - { - PERROR(( "!! No Horizontal metrics in file !!\n" )); - return TT_Err_Hmtx_Table_Missing; - } - - num_longs = face->horizontalHeader.number_Of_HMetrics; - longs = (PLongMetrics*)&face->horizontalHeader.long_metrics; - shorts = (PShortMetrics*)&face->horizontalHeader.short_metrics; - } - - /* never trust derived values! */ - - num_shorts = face->maxProfile.numGlyphs - num_longs; - num_shorts_checked = ( face->dirTables[n].Length - num_longs * 4 ) / 2; - - if ( num_shorts < 0 ) /* sanity check */ - { - PERROR(( "!! more metrics than glyphs!\n" )); - if ( vertical ) - return TT_Err_Invalid_Vert_Metrics; - else - return TT_Err_Invalid_Horiz_Metrics; - } - - if ( ALLOC_ARRAY( *longs, num_longs, TLongMetrics ) || - ALLOC_ARRAY( *shorts, num_shorts, TShortMetrics ) ) - return error; - - if ( FILE_Seek( face->dirTables[n].Offset ) || - ACCESS_Frame( face->dirTables[n].Length ) ) - return error; - - long_metric = *longs; - for ( n = 0; n < num_longs; n++ ) - { - long_metric->advance = GET_UShort(); - long_metric->bearing = GET_Short(); - long_metric++; - } - - /* do we have an inconsistent number of metric values? */ - - if ( num_shorts > num_shorts_checked ) - { - for ( n = 0; n < num_shorts_checked; n++ ) - (*shorts)[n] = GET_Short(); - - /* we fill up the missing left side bearings with the */ - /* last valid value. Since this will occur for buggy CJK */ - /* fonts usually, nothing serious will happen. */ - - for ( n = num_shorts_checked; n < num_shorts; n++ ) - (*shorts)[n] = (*shorts)[num_shorts_checked - 1]; - } - else - { - for ( n = 0; n < num_shorts; n++ ) - (*shorts)[n] = GET_Short(); - } - - FORGET_Frame(); - - PTRACE2(( "loaded\n" )); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Metrics_Header - * - * Description : Loads either the "hhea" or "vhea" table in memory - * - * Input : face face table to look for - * vertical a boolean. When set, queries the optional - * "vhea" table. Otherwise, load the mandatory - * "hhea" horizontal header. - * - * Output : Error code. - * - * Note : This function now loads the corresponding metrics table - * (either hmtx or vmtx) and attaches it to the header. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Metrics_Header( PFace face, - Bool vertical ) - { - DEFINE_LOCALS; - - Long i; - - TT_Horizontal_Header* header; - - - PTRACE2(( vertical ? "Vertical header" : "Horizontal header " )); - - if ( vertical ) - { - face->verticalInfo = 0; - - /* The vertical header table is optional, so return quietly if */ - /* we don't find it.. */ - if ( ( i = TT_LookUp_Table( face, TTAG_vhea ) ) < 0 ) - return TT_Err_Ok; - - face->verticalInfo = 1; - header = (TT_Horizontal_Header*)&face->verticalHeader; - } - else - { - /* The orizontal header is mandatory, return an error if we */ - /* don't find it. */ - if ( ( i = TT_LookUp_Table( face, TTAG_hhea ) ) < 0 ) - return TT_Err_Horiz_Header_Missing; - - header = &face->horizontalHeader; - } - - if ( FILE_Seek( face->dirTables[i].Offset ) || - ACCESS_Frame( 36L ) ) - return error; - - header->Version = GET_ULong(); - header->Ascender = GET_Short(); - header->Descender = GET_Short(); - header->Line_Gap = GET_Short(); - - header->advance_Width_Max = GET_UShort(); - - header->min_Left_Side_Bearing = GET_Short(); - header->min_Right_Side_Bearing = GET_Short(); - header->xMax_Extent = GET_Short(); - header->caret_Slope_Rise = GET_Short(); - header->caret_Slope_Run = GET_Short(); - - header->Reserved0 = GET_Short(); /* this is caret_Offset for - vertical headers */ - header->Reserved1 = GET_Short(); - header->Reserved2 = GET_Short(); - header->Reserved3 = GET_Short(); - header->Reserved4 = GET_Short(); - - header->metric_Data_Format = GET_Short(); - header->number_Of_HMetrics = GET_UShort(); - - FORGET_Frame(); - - header->long_metrics = NULL; - header->short_metrics = NULL; - - PTRACE2(( "loaded\n" )); - - /* Now try to load the corresponding metrics */ - - return Load_TrueType_Metrics( face, vertical ); - } - - -/******************************************************************* - * - * Function : Load_TrueType_Locations - * - * Description : Loads the location table into face table. - * - * Input : face face table to look for - * - * Output : Error code. - * - * NOTE: - * The Font Header *must* be loaded in the leading segment - * calling this function. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Locations( PFace face ) - { - DEFINE_LOCALS; - - Long n, limit; - Short LongOffsets; - - - PTRACE2(( "Locations " )); - - LongOffsets = face->fontHeader.Index_To_Loc_Format; - - if ( ( n = TT_LookUp_Table( face, TTAG_loca ) ) < 0 ) - return TT_Err_Locations_Missing; - - if ( FILE_Seek( face->dirTables[n].Offset ) ) - return error; - - if ( LongOffsets != 0 ) - { - face->numLocations = face->dirTables[n].Length >> 2; - - PTRACE2(( "(32 bit offsets): %12lu ", - face->numLocations )); - - if ( ALLOC_ARRAY( face->glyphLocations, - face->numLocations, - Long ) ) - return error; - - if ( ACCESS_Frame( face->numLocations * 4L ) ) - return error; - - limit = face->numLocations; - - for ( n = 0; n < limit; n++ ) - face->glyphLocations[n] = GET_Long(); - - FORGET_Frame(); - } - else - { - face->numLocations = face->dirTables[n].Length >> 1; - - PTRACE2(( "(16 bit offsets): %12lu ", - face->numLocations )); - - if ( ALLOC_ARRAY( face->glyphLocations, - face->numLocations, - Long ) ) - return error; - - if ( ACCESS_Frame( face->numLocations * 2L ) ) - return error; - - limit = face->numLocations; - - for ( n = 0; n < limit; n++ ) - face->glyphLocations[n] = - (Long)((ULong)GET_UShort() * 2); - - FORGET_Frame(); - } - - PTRACE2(( "loaded\n" )); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Names - * - * Description : Loads the name table into face table. - * - * Input : face face table to look for - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Names( PFace face ) - { - DEFINE_LOCALS; - - UShort i, bytes; - Long n; - PByte storage; - - TName_Table* names; - TNameRec* namerec; - - - PTRACE2(( "Names " )); - - if ( ( n = TT_LookUp_Table( face, TTAG_name ) ) < 0 ) - { - /* The name table is required so indicate failure. */ - PTRACE2(( "is missing!\n" )); - - return TT_Err_Name_Table_Missing; - } - - /* Seek to the beginning of the table and check the frame access. */ - /* The names table has a 6 byte header. */ - if ( FILE_Seek( face->dirTables[n].Offset ) || - ACCESS_Frame( 6L ) ) - return error; - - names = &face->nameTable; - - /* Load the initial names data. */ - names->format = GET_UShort(); - names->numNameRecords = GET_UShort(); - names->storageOffset = GET_UShort(); - - FORGET_Frame(); - - /* Allocate the array of name records. */ - if ( ALLOC_ARRAY( names->names, - names->numNameRecords, - TNameRec ) || - ACCESS_Frame( names->numNameRecords * 12L ) ) - { - names->numNameRecords = 0; - goto Fail; - } - - /* Load the name records and determine how much storage is needed */ - /* to hold the strings themselves. */ - - for ( i = bytes = 0; i < names->numNameRecords; i++ ) - { - namerec = names->names + i; - namerec->platformID = GET_UShort(); - namerec->encodingID = GET_UShort(); - namerec->languageID = GET_UShort(); - namerec->nameID = GET_UShort(); - namerec->stringLength = GET_UShort(); - namerec->stringOffset = GET_UShort(); - -#if 0 - /* check the ids */ - if ( namerec->platformID <= 3 ) - { -#endif - /* this test takes care of 'holes' in the names tables, as */ - /* reported by Erwin */ - if ( (namerec->stringOffset + namerec->stringLength) > bytes ) - bytes = namerec->stringOffset + namerec->stringLength; -#if 0 - } -#endif - } - - FORGET_Frame(); - - /* Allocate storage for the strings if they exist. */ - - names->storage = NULL; - - if ( bytes > 0 ) - { - if ( ALLOC( storage, bytes ) || - FILE_Read_At( face->dirTables[n].Offset + names->storageOffset, - (void*)storage, - bytes ) ) - goto Fail_Storage; - - names->storage = storage; - - /* Go through and assign the string pointers to the name records. */ - - for ( i = 0; i < names->numNameRecords; i++ ) - { - namerec = names->names + i; - namerec->string = storage + names->names[i].stringOffset; - -/* It is possible (but rather unlikely) that a new platform ID will be */ -/* added by Apple, so we can't rule out IDs > 3. */ - -#if 0 - if ( namerec->platformID <= 3 ) - namerec->string = storage + names->names[i].stringOffset; - else - { - namerec->string = NULL; - namerec->stringLength = 0; - } -#endif - } - } - -#ifdef DEBUG_LEVEL_TRACE - - for ( i = 0; i < names->numNameRecords; i++ ) - { - int j; - - - PTRACE2(( "%d %d %x %d ", - names->names[i].platformID, - names->names[i].encodingID, - names->names[i].languageID, - names->names[i].nameID )); - - /* I know that M$ encoded strings are Unicode, */ - /* but this works reasonable well for debugging purposes. */ - for ( j = 0; j < names->names[i].stringLength; j++ ) - { - if (names->names[i].string) - { - Char c = *(names->names[i].string + j); - - - if ( (Byte)c < 128 ) - PTRACE2(( "%c", c )); - } - } - - PTRACE2(( "\n" )); - } - -#endif /* DEBUG_LEVEL_TRACE */ - - PTRACE2(( "loaded\n" )); - return TT_Err_Ok; - - Fail_Storage: - FREE( storage ); - - Fail: - Free_TrueType_Names( face ); - return error; - } - - -/******************************************************************* - * - * Function : Free_TrueType_Names - * - * Description : Frees a name table. - * - * Input : face face table to look for - * - * Output : TT_Err_Ok. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Free_TrueType_Names( PFace face ) - { - TName_Table* names = &face->nameTable; - - - /* free strings table */ - FREE( names->names ); - - /* free strings storage */ - FREE( names->storage ); - - names->numNameRecords = 0; - names->format = 0; - names->storageOffset = 0; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_CVT - * - * Description : Loads cvt table into resident table. - * - * Input : face face table to look for - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_CVT( PFace face ) - { - DEFINE_LOCALS; - - Long n, limit; - - - PTRACE2(( "CVT " )); - - if ( ( n = TT_LookUp_Table( face, TTAG_cvt ) ) < 0 ) - { - PTRACE2(( "is missing!\n" )); - - face->cvtSize = 0; - face->cvt = NULL; - return TT_Err_Ok; - } - - face->cvtSize = face->dirTables[n].Length / 2; - - if ( ALLOC_ARRAY( face->cvt, - face->cvtSize, - Short ) ) - return error; - - if ( FILE_Seek( face->dirTables[n].Offset ) || - ACCESS_Frame( face->cvtSize * 2L ) ) - return error; - - limit = face->cvtSize; - - for ( n = 0; n < limit; n++ ) - face->cvt[n] = GET_Short(); - - FORGET_Frame(); - - PTRACE2(( "loaded\n" )); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_CMap - * - * Description : Loads the cmap directory in memory. - * The cmaps themselves are loaded in ttcmap.c . - * - * Input : face - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_CMap( PFace face ) - { - DEFINE_LOCALS; - - Long off, table_start; - Long n, limit; - - TCMapDir cmap_dir; - TCMapDirEntry entry_; - PCMapTable cmap; - - - PTRACE2(( "CMaps " )); - - if ( ( n = TT_LookUp_Table( face, TTAG_cmap ) ) < 0 ) - return TT_Err_CMap_Table_Missing; - - table_start = face->dirTables[n].Offset; - - if ( ( FILE_Seek( table_start ) ) || - ( ACCESS_Frame( 4L ) ) ) /* 4 bytes cmap header */ - return error; - - cmap_dir.tableVersionNumber = GET_UShort(); - cmap_dir.numCMaps = GET_UShort(); - - FORGET_Frame(); - - off = FILE_Pos(); /* save offset to cmapdir[] which follows */ - - /* save space in face table for cmap tables */ - if ( ALLOC_ARRAY( face->cMaps, - cmap_dir.numCMaps, - TCMapTable ) ) - return error; - - face->numCMaps = cmap_dir.numCMaps; - - limit = face->numCMaps; - cmap = face->cMaps; - - for ( n = 0; n < limit; n++ ) - { - if ( FILE_Seek( off ) || - ACCESS_Frame( 8L ) ) - return error; - - /* extra code using entry_ for platxxx could be cleaned up later */ - cmap->loaded = FALSE; - cmap->platformID = entry_.platformID = GET_UShort(); - cmap->platformEncodingID = entry_.platformEncodingID = GET_UShort(); - - entry_.offset = GET_Long(); - - FORGET_Frame(); - - off = FILE_Pos(); - - if ( FILE_Seek( table_start + entry_.offset ) || - ACCESS_Frame( 6L ) ) - return error; - - cmap->format = GET_UShort(); - cmap->length = GET_UShort(); - cmap->version = GET_UShort(); - - FORGET_Frame(); - - cmap->offset = FILE_Pos(); - - cmap++; - } - - PTRACE2(( "loaded\n" )); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Programs - * - * Description : Loads the font (fpgm) and cvt programs into the - * face table. - * - * Input : face - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Programs( PFace face ) - { - DEFINE_LOCALS_WO_FRAME; - - Long n; - - - PTRACE2(( "Font program " )); - - /* The font program is optional */ - if ( ( n = TT_LookUp_Table( face, TTAG_fpgm ) ) < 0 ) - { - face->fontProgram = NULL; - face->fontPgmSize = 0; - - PTRACE2(( "is missing!\n" )); - } - else - { - face->fontPgmSize = face->dirTables[n].Length; - - if ( ALLOC( face->fontProgram, - face->fontPgmSize ) || - FILE_Read_At( face->dirTables[n].Offset, - (void*)face->fontProgram, - face->fontPgmSize ) ) - return error; - - PTRACE2(( "loaded, %12d bytes\n", face->fontPgmSize )); - } - - PTRACE2(( "Prep program " )); - - if ( ( n = TT_LookUp_Table( face, TTAG_prep ) ) < 0 ) - { - face->cvtProgram = NULL; - face->cvtPgmSize = 0; - - PTRACE2(( "is missing!\n" )); - } - else - { - face->cvtPgmSize = face->dirTables[n].Length; - - if ( ALLOC( face->cvtProgram, - face->cvtPgmSize ) || - FILE_Read_At( face->dirTables[n].Offset, - (void*)face->cvtProgram, - face->cvtPgmSize ) ) - return error; - - PTRACE2(( "loaded, %12d bytes\n", face->cvtPgmSize )); - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_OS2 - * - * Description : Loads the OS2 Table. - * - * Input : face - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_OS2( PFace face ) - { - DEFINE_LOCALS; - - Long i; - TT_OS2* os2; - - - PTRACE2(( "OS/2 Table " )); - - /* We now support old Mac fonts where the OS/2 table doesn't */ - /* exist. Simply put, we set the `version' field to 0xFFFF */ - /* and test this value each time we need to access the table. */ - if ( ( i = TT_LookUp_Table( face, TTAG_OS2 ) ) < 0 ) - { - PTRACE2(( "is missing\n!" )); - face->os2.version = 0xFFFF; - error = TT_Err_Ok; - return TT_Err_Ok; - } - - if ( FILE_Seek( face->dirTables[i].Offset ) || - ACCESS_Frame( 78L ) ) - return error; - - os2 = &face->os2; - - os2->version = GET_UShort(); - os2->xAvgCharWidth = GET_Short(); - os2->usWeightClass = GET_UShort(); - os2->usWidthClass = GET_UShort(); - os2->fsType = GET_Short(); - os2->ySubscriptXSize = GET_Short(); - os2->ySubscriptYSize = GET_Short(); - os2->ySubscriptXOffset = GET_Short(); - os2->ySubscriptYOffset = GET_Short(); - os2->ySuperscriptXSize = GET_Short(); - os2->ySuperscriptYSize = GET_Short(); - os2->ySuperscriptXOffset = GET_Short(); - os2->ySuperscriptYOffset = GET_Short(); - os2->yStrikeoutSize = GET_Short(); - os2->yStrikeoutPosition = GET_Short(); - os2->sFamilyClass = GET_Short(); - - for ( i = 0; i < 10; i++ ) - os2->panose[i] = GET_Byte(); - - os2->ulUnicodeRange1 = GET_ULong(); - os2->ulUnicodeRange2 = GET_ULong(); - os2->ulUnicodeRange3 = GET_ULong(); - os2->ulUnicodeRange4 = GET_ULong(); - - for ( i = 0; i < 4; i++ ) - os2->achVendID[i] = GET_Byte(); - - os2->fsSelection = GET_UShort(); - os2->usFirstCharIndex = GET_UShort(); - os2->usLastCharIndex = GET_UShort(); - os2->sTypoAscender = GET_Short(); - os2->sTypoDescender = GET_Short(); - os2->sTypoLineGap = GET_Short(); - os2->usWinAscent = GET_UShort(); - os2->usWinDescent = GET_UShort(); - - FORGET_Frame(); - - if ( os2->version >= 0x0001 ) - { - /* only version 1 tables */ - - if ( ACCESS_Frame( 8L ) ) /* read into frame */ - return error; - - os2->ulCodePageRange1 = GET_ULong(); - os2->ulCodePageRange2 = GET_ULong(); - - FORGET_Frame(); - } - else - { - os2->ulCodePageRange1 = 0; - os2->ulCodePageRange2 = 0; - } - - PTRACE2(( "loaded\n" )); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_PostScript - * - * Description : Loads the post table into face table. - * - * Input : face face table to look for - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_PostScript( PFace face ) - { - DEFINE_LOCALS; - - Long i; - - TT_Postscript* post = &face->postscript; - - - PTRACE2(( "PostScript " )); - - if ( ( i = TT_LookUp_Table( face, TTAG_post ) ) < 0 ) - return TT_Err_Post_Table_Missing; - - if ( FILE_Seek( face->dirTables[i].Offset ) || - ACCESS_Frame( 32L ) ) - return error; - - /* read frame data into face table */ - - post->FormatType = GET_ULong(); - post->italicAngle = GET_ULong(); - post->underlinePosition = GET_Short(); - post->underlineThickness = GET_Short(); - post->isFixedPitch = GET_ULong(); - post->minMemType42 = GET_ULong(); - post->maxMemType42 = GET_ULong(); - post->minMemType1 = GET_ULong(); - post->maxMemType1 = GET_ULong(); - - FORGET_Frame(); - - /* we don't load the glyph names, we do that in a */ - /* library extension (ftxpost). */ - - PTRACE2(( "loaded\n" )); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Hdmx - * - * Description : Loads the horizontal device metrics table. - * - * Input : face face object to look for - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Hdmx( PFace face ) - { - DEFINE_LOCALS; - - TT_Hdmx_Record* rec; - TT_Hdmx hdmx; - Long table; - UShort n, num_glyphs; - Long record_size; - - - hdmx.version = 0; - hdmx.num_records = 0; - hdmx.records = 0; - - face->hdmx = hdmx; - - if ( ( table = TT_LookUp_Table( face, TTAG_hdmx ) ) < 0 ) - return TT_Err_Ok; - - if ( FILE_Seek( face->dirTables[table].Offset ) || - ACCESS_Frame( 8L ) ) - return error; - - hdmx.version = GET_UShort(); - hdmx.num_records = GET_Short(); - record_size = GET_Long(); - - FORGET_Frame(); - - /* Only recognize format 0 */ - - if ( hdmx.version != 0 ) - return TT_Err_Ok; - - if ( ALLOC( hdmx.records, sizeof ( TT_Hdmx_Record ) * hdmx.num_records ) ) - return error; - - num_glyphs = face->numGlyphs; - record_size -= num_glyphs+2; - rec = hdmx.records; - - for ( n = 0; n < hdmx.num_records; n++ ) - { - /* read record */ - - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - rec->ppem = GET_Byte(); - rec->max_width = GET_Byte(); - - FORGET_Frame(); - - if ( ALLOC( rec->widths, num_glyphs ) || - FILE_Read( rec->widths, num_glyphs ) ) - goto Fail; - - /* skip padding bytes */ - if ( record_size > 0 ) - if ( FILE_Skip( record_size ) ) - goto Fail; - - rec++; - } - - face->hdmx = hdmx; - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < hdmx.num_records; n++ ) - FREE( hdmx.records[n].widths ); - - FREE( hdmx.records ); - return error; - } - - -/******************************************************************* - * - * Function : Free_TrueType_Hdmx - * - * Description : Frees the horizontal device metrics table. - * - * Input : face face object to look for - * - * Output : TT_Err_Ok. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Free_TrueType_Hdmx( PFace face ) - { - UShort n; - - - if ( !face ) - return TT_Err_Ok; - - for ( n = 0; n < face->hdmx.num_records; n++ ) - FREE( face->hdmx.records[n].widths ); - - FREE( face->hdmx.records ); - face->hdmx.num_records = 0; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Any - * - * Description : Loads any font table into client memory. Used by - * the TT_Get_Font_Data() API function. - * - * Input : face face object to look for - * - * tag tag of table to load. Use the value 0 if you - * want to access the whole font file, else set - * this parameter to a valid TrueType table tag - * that you can forge with the MAKE_TT_TAG - * macro. - * - * offset starting offset in the table (or the file - * if tag == 0 ) - * - * buffer address of target buffer - * - * length address of decision variable : - * - * if length == NULL : - * load the whole table. returns an - * an error if 'offset' == 0 !! - * - * if *length == 0 : - * exit immediately, returning the - * length of the given table, or of - * the font file, depending on the - * value of 'tag' - * - * if *length != 0 : - * load the next 'length' bytes of - * table or font, starting at offset - * 'offset' (in table or font too). - * - * Output : Error condition - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Load_TrueType_Any( PFace face, - ULong tag, - Long offset, - void* buffer, - Long* length ) - { - TT_Stream stream; - TT_Error error; - Long table; - ULong size; - - - if ( tag != 0 ) - { - /* look for tag in font directory */ - table = TT_LookUp_Table( face, tag ); - if ( table < 0 ) - return TT_Err_Table_Missing; - - offset += face->dirTables[table].Offset; - size = face->dirTables[table].Length; - } - else - /* tag = 0 -- the use want to access the font file directly */ - size = TT_Stream_Size( face->stream ); - - if ( length && *length == 0 ) - { - *length = size; - return TT_Err_Ok; - } - - if ( length ) - size = *length; - - if ( !USE_Stream( face->stream, stream ) ) - (void)FILE_Read_At( offset, buffer, size ); - DONE_Stream( stream ); - - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttload.h diff -u xc/extras/FreeType/lib/ttload.h:1.2 xc/extras/FreeType/lib/ttload.h:removed --- xc/extras/FreeType/lib/ttload.h:1.2 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttload.h Wed Mar 16 20:59:40 2005 @@ -1,222 +0,0 @@ -/******************************************************************* - * - * ttload.h 1.1 - * - * TrueType Tables Loader. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 1.1 and 1.0 : - * - * - add function Load_TrueType_Any used by TT_Get_Font_Data - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttload.h,v 1.2 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTLOAD_H -#define TTLOAD_H - -#include "ttconfig.h" -#include "tttypes.h" -#include "ttobjs.h" - -#ifdef __cplusplus - extern "C" { -#endif - - EXPORT_DEF - Long TT_LookUp_Table( PFace face, ULong tag ); - -#if !defined(FTXSBIT_H) - - LOCAL_DEF TT_Error Load_TrueType_Directory ( PFace face, - ULong faceIndex ); - - LOCAL_DEF TT_Error Load_TrueType_MaxProfile ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Gasp ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Header ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Locations ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Names ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_CVT ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_CMap ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Programs ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_OS2 ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_PostScript ( PFace face ); - LOCAL_DEF TT_Error Load_TrueType_Hdmx ( PFace face ); - - LOCAL_DEF TT_Error Load_TrueType_Metrics_Header( PFace face, - Bool vertical ); - - LOCAL_DEF TT_Error Load_TrueType_Any( PFace face, - ULong tag, - Long offset, - void* buffer, - Long* length ); - - LOCAL_DEF TT_Error Free_TrueType_Names( PFace face ); - LOCAL_DEF TT_Error Free_TrueType_Hdmx ( PFace face ); - -#endif /* !FTXSBIT_H */ - - -/* The following macros are defined to simplify the writing of */ -/* the various table and glyph loaders. */ - -/* For examples see the code in ttload.c, ttgload.c etc. */ - -#define USE_Stream( original, duplicate ) \ - ( (error = TT_Use_Stream( original, &duplicate )) != TT_Err_Ok ) - -#define DONE_Stream( _stream ) \ - TT_Done_Stream( &_stream ) - -/* Define a file frame -- use it only when needed */ -#define DEFINE_A_FRAME TFileFrame frame = TT_Null_FileFrame - -/* Define a stream -- use it only when needed */ -#define DEFINE_A_STREAM TT_Stream stream - - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* re-entrant implementation */ - -/* The following macros define the necessary local */ -/* variables used to access streams and frames. */ - -/* Define stream locals with frame */ -#define DEFINE_STREAM_LOCALS \ - TT_Error error; \ - DEFINE_A_STREAM; \ - DEFINE_A_FRAME - -/* Define stream locals without frame */ -#define DEFINE_STREAM_LOCALS_WO_FRAME \ - TT_Error error; \ - DEFINE_A_STREAM - -/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ -#define DEFINE_LOAD_LOCALS( STREAM ) \ - TT_Error error; \ - DEFINE_A_STREAM = (STREAM); \ - DEFINE_A_FRAME - -/* Define locals without frame with a predefined stream - see ttload.c */ -#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ - TT_Error error; \ - DEFINE_A_STREAM = (STREAM) - -/* Define all locals necessary to access a font file */ -#define DEFINE_ALL_LOCALS \ - TT_Error error; \ - DEFINE_A_STREAM; \ - DEFINE_A_FRAME - - -#define ACCESS_Frame( _size_ ) \ - ( (error = TT_Access_Frame( stream, \ - &frame, \ - (Long)(_size_) )) != TT_Err_Ok ) -#define CHECK_ACCESS_Frame( _size_ ) \ - ( (error = TT_Check_And_Access_Frame( stream, \ - &frame, \ - (Long)(_size_) )) != TT_Err_Ok ) -#define FORGET_Frame() \ - ( (void)TT_Forget_Frame( &frame ) ) - -#define GET_Byte() TT_Get_Byte ( &frame ) -#define GET_Char() TT_Get_Char ( &frame ) -#define GET_UShort() TT_Get_UShort( &frame ) -#define GET_Short() TT_Get_Short ( &frame ) -#define GET_Long() TT_Get_Long ( &frame ) -#define GET_ULong() TT_Get_ULong ( &frame ) -#define GET_Tag4() TT_Get_ULong ( &frame ) - -#define FILE_Pos() TT_File_Pos ( stream ) - -#define FILE_Seek( _position_ ) \ - ( (error = TT_Seek_File( stream, \ - (Long)(_position_) )) != TT_Err_Ok ) -#define FILE_Skip( _distance_ ) \ - ( (error = TT_Skip_File( stream, \ - (Long)(_distance_) )) != TT_Err_Ok ) -#define FILE_Read( buffer, count ) \ - ( (error = TT_Read_File ( stream, \ - buffer, \ - (Long)(count) )) != TT_Err_Ok ) -#define FILE_Read_At( pos, buffer, count ) \ - ( (error = TT_Read_At_File( stream, \ - (Long)(pos), \ - buffer, \ - (Long)(count) )) != TT_Err_Ok ) - -#else /* thread-safe implementation */ - -/* Define stream locals with frame -- nothing in thread-safe mode */ -#define DEFINE_STREAM_LOCALS \ - TT_Error error - -/* Define stream locals without frame -- nothing in thread-safe mode */ -#define DEFINE_STREAM_LOCALS_WO_FRAME \ - TT_Error error - -/* Define locals with a predefined stream in reentrant mode -- see ttload.c */ -#define DEFINE_LOAD_LOCALS( STREAM ) \ - TT_Error error - - -/* Define locals without frame with a predefined stream - see ttload.c */ -#define DEFINE_LOAD_LOCALS_WO_FRAME( STREAM ) \ - TT_Error error - -/* Define all locals necessary to access a font file */ -#define DEFINE_ALL_LOCALS \ - TT_Error error; \ - DEFINE_A_STREAM - - -#define ACCESS_Frame( _size_ ) \ - ( (error = TT_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) -#define CHECK_ACCESS_Frame( _size_ ) \ - ( (error = TT_Check_And_Access_Frame( (Long)(_size_) )) != TT_Err_Ok ) -#define FORGET_Frame() \ - ( (void)TT_Forget_Frame() ) - -#define GET_Byte() TT_Get_Byte () -#define GET_Char() TT_Get_Char () -#define GET_UShort() TT_Get_UShort() -#define GET_Short() TT_Get_Short () -#define GET_Long() TT_Get_Long () -#define GET_ULong() TT_Get_ULong () -#define GET_Tag4() TT_Get_ULong () - -#define FILE_Pos() TT_File_Pos() - -#define FILE_Seek( _position_ ) \ - ( (error = TT_Seek_File( (Long)(_position_) )) != TT_Err_Ok ) -#define FILE_Skip( _distance_ ) \ - ( (error = TT_Skip_File( (Long)(_distance_) )) != TT_Err_Ok ) -#define FILE_Read( buffer, count ) \ - ( (error = TT_Read_File ( buffer, \ - (Long)(count) )) != TT_Err_Ok ) -#define FILE_Read_At( pos, buffer, count ) \ - ( (error = TT_Read_At_File( (Long)(pos), \ - buffer, \ - (Long)(count) )) != TT_Err_Ok ) - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - -#ifdef __cplusplus - } -#endif - -#endif /* TTLOAD_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttmemory.c diff -u xc/extras/FreeType/lib/ttmemory.c:1.1.1.3 xc/extras/FreeType/lib/ttmemory.c:removed --- xc/extras/FreeType/lib/ttmemory.c:1.1.1.3 Sat Feb 12 23:55:46 2000 +++ xc/extras/FreeType/lib/ttmemory.c Wed Mar 16 20:59:40 2005 @@ -1,397 +0,0 @@ -/******************************************************************* - * - * ttmemory.c 1.2 - * - * Memory management component (body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 1.1 and 1.2: - * - * - the font pool is gone. - * - * - introduced the FREE macro and the Free function for - * future use in destructors. - * - * - Init_FontPool() is now a macro to allow the compilation of - * 'legacy' applications (all four test programs have been updated). - * - ******************************************************************/ - -#include "ttdebug.h" -#include "ttmemory.h" -#include "ttengine.h" - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_memory - - -#ifdef DEBUG_MEMORY - -#include - -#define MAX_TRACKED_BLOCKS 1024 - - struct TMemRec_ - { - void* base; - Long size; - }; - - typedef struct TMemRec_ TMemRec; - - static TMemRec pointers[MAX_TRACKED_BLOCKS + 1]; - - static Int num_alloc; - static Int num_free; - static Int num_realloc; /* counts only `real' reallocations - (i.e., an existing buffer will be resized - to a value larger than zero */ - - static Int fail_alloc; - static Int fail_realloc; - static Int fail_free; - -#endif /* DEBUG_MEMORY */ - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - Long TTMemory_Allocated; - Long TTMemory_MaxAllocated; -#endif - - -/******************************************************************* - * - * Function : TT_Alloc - * - * Description : Allocates memory from the heap buffer. - * - * Input : Size size of the memory to be allocated - * P pointer to a buffer pointer - * - * Output : Error code. - * - * NOTE : The newly allocated block should _always_ be zeroed - * on return. Many parts of the engine rely on this to - * work properly. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Alloc( ULong Size, void** P ) - { -#ifdef DEBUG_MEMORY - Int i; -#endif - - - if ( !P ) - return TT_Err_Invalid_Argument; - - if ( Size > (size_t)-1 ) - return TT_Err_Out_Of_Memory; - if ( Size > 0 ) - { - *P = (void*)malloc( Size ); - if ( !*P ) - return TT_Err_Out_Of_Memory; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated += Size; - TTMemory_MaxAllocated += Size; -#endif - -#ifdef DEBUG_MEMORY - - num_alloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_alloc++; - else - { - pointers[i].base = *P; - pointers[i].size = Size; - } - -#endif /* DEBUG_MEMORY */ - - MEM_Set( *P, 0, Size ); - } - else - *P = NULL; - - return TT_Err_Ok; - } - - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - - -/******************************************************************* - * - * Function : TT_Realloc - * - * Description : Reallocates memory from the heap buffer. - * - * Input : Size new size of the memory to be allocated; - * if zero, TT_Free() will be called - * P pointer to a buffer pointer; if *P == NULL, - * TT_Alloc() will be called - * - * Output : Error code. - * - * NOTES : It's not necessary to zero the memory in case the - * reallocated buffer is larger than before -- the - * application has to take care of this. - * - * If the memory request fails, TT_Free() will be - * called on *P, and TT_Err_Out_Of_Memory returned. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Realloc( ULong Size, void** P ) - { - void* Q; - -#ifdef DEBUG_MEMORY - Int i; -#endif - - - if ( !P ) - return TT_Err_Invalid_Argument; - - if ( !*P ) - return TT_Alloc( Size, P ); - - if ( Size == 0 ) - return TT_Free( P ); - - if ( Size > (size_t)-1 ) - { - TT_Free( *P ); - return TT_Err_Out_Of_Memory; - } - - Q = (void*)realloc( *P, Size ); - if ( !Q ) - { - TT_Free( *P ); - return TT_Err_Out_Of_Memory; - } - -#ifdef DEBUG_MEMORY - - num_realloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_realloc++; - else - { -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated += Size - pointers[i].size; - if ( Size > pointers[i].size ) - TTMemory_MaxAllocated += Size - pointers[i].size; -#endif - - pointers[i].base = Q; - pointers[i].size = size; - } -#endif /* DEBUG_MEMORY */ - - *P = Q; - - return TT_Err_Ok; - } - - -#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ - - -/******************************************************************* - * - * Function : TT_Free - * - * Description : Releases a previously allocated block of memory. - * - * Input : P pointer to memory block - * - * Output : Always SUCCESS. - * - * Note : The pointer must _always_ be set to NULL by this function. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Free( void** P ) - { -#ifdef DEBUG_MEMORY - Int i; -#endif /* DEBUG_MEMORY */ - - - if ( !P || !*P ) - return TT_Err_Ok; - -#ifdef DEBUG_MEMORY - - num_free++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_free++; - else - { -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated -= pointers[i].size; -#endif - - pointers[i].base = NULL; - pointers[i].size = 0; - } -#endif /* DEBUG_MEMORY */ - - free( *P ); - - *P = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Init - * - * Description : Initializes the memory. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Init( void ) - { -#ifdef DEBUG_MEMORY - Int i; - - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - pointers[i].base = NULL; - pointers[i].size = 0; - } - - num_alloc = 0; - num_realloc = 0; - num_free = 0; - - fail_alloc = 0; - fail_realloc = 0; - fail_free = 0; -#endif - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated = 0; - TTMemory_MaxAllocated = 0; -#endif - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Done - * - * Description : Finalizes memory usage. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Done( void ) - { -#ifdef DEBUG_MEMORY - Int i, num_leaked, tot_leaked; - - - num_leaked = 0; - tot_leaked = 0; - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - num_leaked ++; - tot_leaked += pointers[i].size; - } - } - - fprintf( stderr, - "%d memory allocations, of which %d failed\n", - num_alloc, - fail_alloc ); - - fprintf( stderr, - "%d memory reallocations, of which %d failed\n", - num_realloc, - fail_realloc ); - - fprintf( stderr, - "%d memory frees, of which %d failed\n", - num_free, - fail_free ); - - if ( num_leaked > 0 ) - { - fprintf( stderr, - "There are %d leaked memory blocks, totalizing %d bytes\n", - num_leaked, tot_leaked ); - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - fprintf( stderr, - "index: %4d (base: $%08lx, size: %08ld)\n", - i, - (long)pointers[i].base, - pointers[i].size ); - } - } - } - else - fprintf( stderr, "No memory leaks !\n" ); - -#endif /* DEBUG_MEMORY */ - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttmemory.h diff -u xc/extras/FreeType/lib/ttmemory.h:1.5 xc/extras/FreeType/lib/ttmemory.h:removed --- xc/extras/FreeType/lib/ttmemory.h:1.5 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttmemory.h Wed Mar 16 20:59:40 2005 @@ -1,132 +0,0 @@ -/******************************************************************* - * - * ttmemory.h 1.2 - * - * Memory management component (specification). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Changes between 1.2 and 1.1: - * - * - the font pool is gone! All allocations are now performed - * with malloc() and free(). - * - * - introduced the FREE() macro and the Free() function for - * future use in destructors. - * - * - Init_FontPool() is now a macro to allow the compilation of - * 'legacy' applications (all four test programs have been updated). - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttmemory.h,v 1.5 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTMEMORY_H -#define TTMEMORY_H - -#include "ttconfig.h" -#include "tttypes.h" -/* Removed for XFree86 module support */ -#if 0 -#include -#endif - - -#ifdef __cplusplus - extern "C" { -#endif - -#define MEM_Set( dest, byte, count ) memset( dest, byte, count ) - -#ifdef HAVE_MEMCPY -#define MEM_Copy( dest, source, count ) memcpy( dest, source, count ) -#else -#define MEM_Copy( dest, source, count ) bcopy( source, dest, count ) -#endif - -#ifdef HAVE_MEMMOVE -#define MEM_Move( dest, source, count ) memmove( dest, source, count ) -#else -#define MEM_Move( dest, source, count ) bcopy( source, dest, count ) -#endif - - -#define MEM_Alloc( _pointer_, _size_ ) \ - TT_Alloc( _size_, (void**)&(_pointer_) ) - -#define MEM_Realloc( _pointer_, _size_ ) \ - TT_Realloc( _size_, (void**)&(_pointer_) ) - -#define ALLOC( _pointer_, _size_ ) \ - ( ( error = MEM_Alloc( _pointer_, _size_ ) ) != TT_Err_Ok ) - -#define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \ - ( ( error = MEM_Alloc( _pointer_, \ - (_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) - -#define REALLOC( _pointer_, _size_ ) \ - ( ( error = MEM_Realloc( _pointer_, _size_ ) ) != TT_Err_Ok ) - -#define REALLOC_ARRAY( _pointer_, _count_, _type_ ) \ - ( (error = MEM_Realloc( _pointer_, \ - (_count_) * sizeof ( _type_ ) ) ) != TT_Err_Ok ) - -#define FREE( _pointer_ ) \ - TT_Free( (void**)&(_pointer_) ) - - - /* Allocate a block of memory of 'Size' bytes from the heap, and */ - /* sets the pointer '*P' to its address. If 'Size' is 0, or in */ - /* case of error, the pointer is always set to NULL. */ - - EXPORT_DEF - TT_Error TT_Alloc( ULong Size, void** P ); - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - - /* Reallocates a block of memory pointed to by '*P' to 'Size' */ - /* bytes from the heap, possibly changing '*P'. If 'Size' is 0, */ - /* TT_Free() is called, if '*P' is NULL, TT_Alloc() is called. */ - /* '*P' is freed (if it's non-NULL) in case of error. */ - - EXPORT_DEF - TT_Error TT_Realloc( ULong Size, void** P ); - -#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ - - /* Releases a block that was previously allocated through Alloc. */ - /* Note that the function returns successfully when P or *P are */ - /* already NULL. The pointer '*P' is set to NULL on exit in */ - /* case of success. */ - - EXPORT_DEF - TT_Error TT_Free( void** P ); - - - /* For "legacy" applications, that should be re-coded. */ - /* Note that this won't release the previously allocated font pool. */ - -#define Init_FontPool( x, y ) while( 0 ) { } - -#if !defined(FTXSBIT_H) - - LOCAL_DEF TT_Error TTMemory_Init( void ); - LOCAL_DEF TT_Error TTMemory_Done( void ); - -#endif /* FTXSBIT_H */ - - -#ifdef __cplusplus - } -#endif - -#endif /* TTMEMORY_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttmutex.c diff -u xc/extras/FreeType/lib/ttmutex.c:1.1.1.2 xc/extras/FreeType/lib/ttmutex.c:removed --- xc/extras/FreeType/lib/ttmutex.c:1.1.1.2 Sat Feb 12 23:55:46 2000 +++ xc/extras/FreeType/lib/ttmutex.c Wed Mar 16 20:59:40 2005 @@ -1,85 +0,0 @@ -/******************************************************************* - * - * ttmutex.c 1.0 - * - * Mutual exclusion object, single-threaded implementation - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTE: This is a generic non-functional implementation - * that you are welcome to refine for your own system. - * - * Please name your system-specific source with a - * different name (like ttmutex-os2.c or ttmutex-linux.c) - * and change your makefile accordingly. - * - ******************************************************************/ - -#include "ttmutex.h" - - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_mutex - - -/* ANSI C prevents the compilation of empty units. We thus introduce */ -/* a dummy typedef to get rid of compiler warnings/errors. */ -/* Note that gcc's -ansi -pedantic does not report any error here. */ -/* Watcom, VC++ or Borland C++ do however. */ - - typedef void _ttmutex_to_satisfy_ANSI_C_; - - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE - - LOCAL_FUNC - void TT_Mutex_Create ( TMutex* mutex ) - { - *mutex = (void*)-1; - /* Replace this line with your own mutex creation code */ - } - - - LOCAL_FUNC - void TT_Mutex_Delete ( TMutex* mutex ) - { - *mutex = (void*)0; - /* Replace this line with your own mutex destruction code */ - } - - - LOCAL_FUNC - void TT_Mutex_Lock ( TMutex* mutex ) - { - /* NOTE: It is legal to call this function with a NULL argument */ - /* in which case an immediate return is appropriate. */ - if ( !mutex ) - return; - - ; /* Insert your own mutex locking code here */ - } - - - LOCAL_FUNC - void TT_Mutex_Release( TMutex* mutex ) - { - /* NOTE: It is legal to call this function with a NULL argument */ - /* in which case an immediate return is appropriate */ - if ( !mutex ) - return; - - ; /* Insert your own mutex release code here */ - } - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - -/* END */ Index: xc/extras/FreeType/lib/ttmutex.h diff -u xc/extras/FreeType/lib/ttmutex.h:1.1.1.2 xc/extras/FreeType/lib/ttmutex.h:removed --- xc/extras/FreeType/lib/ttmutex.h:1.1.1.2 Sat Feb 12 23:55:47 2000 +++ xc/extras/FreeType/lib/ttmutex.h Wed Mar 16 20:59:40 2005 @@ -1,59 +0,0 @@ -/******************************************************************* - * - * ttmutex.h 1.0 - * - * Mutual exclusion object / dummy generic interface. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Note: This file provides a generic interface. The implementation - * to compile depends on your system and the type of - * library you want to build (either singly-threaded, - * thread-safe or re-entrant). - * - * Please read the technical documentation for more details. - * - ******************************************************************/ - -#ifndef TTMUTEX_H -#define TTMUTEX_H - -#include "ttconfig.h" - - - typedef void* TMutex; /* typeless reference to a mutex */ - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE /* thread-safe and re-entrant builds */ - -#define MUTEX_Create( mutex ) TT_Mutex_Create ( &(mutex) ) -#define MUTEX_Destroy( mutex ) TT_Mutex_Delete ( &(mutex) ) -#define MUTEX_Lock( mutex ) TT_Mutex_Lock ( &(mutex) ) -#define MUTEX_Release( mutex ) TT_Mutex_Release( &(mutex) ) - - LOCAL_DEF void TT_Mutex_Create ( TMutex* mutex ); /* Create a new mutex */ - LOCAL_DEF void TT_Mutex_Delete ( TMutex* mutex ); /* Delete a mutex */ - LOCAL_DEF void TT_Mutex_Lock ( TMutex* mutex ); /* Lock a mutex. */ - LOCAL_DEF void TT_Mutex_Release( TMutex* mutex ); /* Release a mutex */ - -#else /* for the single-thread build */ - -#define MUTEX_Create( mutex ) /* nothing */ -#define MUTEX_Destroy( mutex ) /* nothing */ -#define MUTEX_Lock( mutex ) /* nothing */ -#define MUTEX_Release( mutex ) /* nothing */ - - /* No code will be generated for mutex operations */ - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - -#endif /* TTMUTEX_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttobjs.c diff -u xc/extras/FreeType/lib/ttobjs.c:1.1.1.2 xc/extras/FreeType/lib/ttobjs.c:removed --- xc/extras/FreeType/lib/ttobjs.c:1.1.1.2 Sat Feb 12 23:55:47 2000 +++ xc/extras/FreeType/lib/ttobjs.c Wed Mar 16 20:59:40 2005 @@ -1,1495 +0,0 @@ -/******************************************************************* - * - * ttobjs.c 1.0 - * - * Objects manager. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "ttobjs.h" -#include "ttfile.h" -#include "ttcalc.h" -#include "ttmemory.h" -#include "ttload.h" -#include "ttinterp.h" -#include "ttdebug.h" - - -/* Add extensions definition */ -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.h" -#endif - -/* Required by tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_objs - -/******************************************************************* - * - * Function : New_Context - * - * Description : Creates a new execution context for a given - * face object. - * - ******************************************************************/ - - LOCAL_FUNC - PExecution_Context New_Context( PFace face ) - { - PEngine_Instance engine; - PExecution_Context exec; - - - if ( !face ) - return NULL; - - engine = face->engine; - CACHE_New( engine->objs_exec_cache, exec, face ); - return exec; - } - - -/******************************************************************* - * - * Function : Done_Context - * - * Description : Discards an execution context. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Done_Context( PExecution_Context exec ) - { - PEngine_Instance engine; - - - if ( !exec ) - return TT_Err_Ok; - - engine = exec->face->engine; - return CACHE_Done( engine->objs_exec_cache, exec ); - } - - -#if 0 - -/******************************************************************* - * - * Function : New_Instance - * - * Description : Creates a new instance for a given face object. - * - ******************************************************************/ - - LOCAL_FUNC - PInstance New_Instance( PFace face ) - { - PInstance ins; - - - if ( !face ) - return NULL; - - CACHE_New( &face->instances, ins, face ); - - return ins; - } - - -/******************************************************************* - * - * Function : Done_Instance - * - * Description : Discards an instance. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Done_Instance( PInstance instance ) - { - return CACHE_Done( &instance->owner->instances, instance ); - } - -#endif - - -/******************************************************************* - * * - * GLYPH ZONE FUNCTIONS * - * * - * * - *******************************************************************/ - -/******************************************************************* - * - * Function : New_Glyph_Zone - * - * Description : Allocates a new glyph zone - * - * Input : pts pointer to the target glyph zone record - * maxPoints capacity of glyph zone in points - * maxContours capacity of glyph zone in contours - * - * Return : Error code. - * - *****************************************************************/ - - static - TT_Error New_Glyph_Zone( PGlyph_Zone pts, - UShort maxPoints, - UShort maxContours ) - { - TT_Error error; - - - if ( ALLOC( pts->org, maxPoints * 2 * sizeof ( TT_F26Dot6 ) ) || - ALLOC( pts->cur, maxPoints * 2 * sizeof ( TT_F26Dot6 ) ) || - ALLOC( pts->touch, maxPoints * sizeof ( Byte ) ) || - ALLOC( pts->contours, maxContours * sizeof ( Short ) ) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Done_Glyph_Zone - * - * Description : Deallocates a glyph zone - * - * Input : pts pointer to the target glyph zone record - * - * Return : Error code. - * - *****************************************************************/ - - static - TT_Error Done_Glyph_Zone( PGlyph_Zone pts ) - { - FREE( pts->contours ); - FREE( pts->touch ); - FREE( pts->cur ); - FREE( pts->org ); - - return TT_Err_Ok; - } - - - -/******************************************************************* - * * - * CODERANGE FUNCTIONS * - * * - *******************************************************************/ - -/******************************************************************* - * - * Function : Goto_CodeRange - * - * Description : Switch to a new code range (updates Code and IP). - * - * Input : exec target execution context - * range new execution code range - * IP new IP in new code range - * - * Output : SUCCESS on success. FAILURE on error (no code range). - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Goto_CodeRange( PExecution_Context exec, - Int range, - ULong IP ) - { - PCodeRange cr; - - - if ( range < 1 || range > 3 ) - return TT_Err_Bad_Argument; - - cr = &exec->codeRangeTable[range - 1]; - - if ( cr->Base == NULL ) - return TT_Err_Invalid_CodeRange; - - /* NOTE: Because the last instruction of a program may be a CALL */ - /* which will return to the first byte *after* the code */ - /* range, we test for IP <= Size, instead of IP < Size. */ - - if ( IP > cr->Size ) - return TT_Err_Code_Overflow; - - exec->code = cr->Base; - exec->codeSize = cr->Size; - exec->IP = IP; - exec->curRange = range; - - return TT_Err_Ok; - } - - -#if 0 - -/******************************************************************* - * - * Function : Get_CodeRange - * - * Description : Returns a pointer to a given code range. Should - * be used only by the debugger. Returns NULL if - * 'range' is out of current bounds. - * - * Input : exec target execution context - * range new execution code range - * - * Output : Pointer to the code range record. NULL on failure. - * - *****************************************************************/ - - LOCAL_FUNC - PCodeRange Get_CodeRange( PExecution_Context exec, Int range ) - { - if ( range < 1 || range > 3 ) - return NULL; - else /* arrays start with 1 in Pascal, and with 0 in C */ - return &exec->codeRangeTable[range - 1]; - } - -#endif - - -/******************************************************************* - * - * Function : Set_CodeRange - * - * Description : Sets a code range. - * - * Input : exec target execution context - * range code range index - * base new code base - * length range size in bytes - * - * Output : SUCCESS on success. FAILURE on error. - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Set_CodeRange( PExecution_Context exec, - Int range, - void* base, - ULong length ) - { - if ( range < 1 || range > 3 ) - return TT_Err_Bad_Argument; - - exec->codeRangeTable[range - 1].Base = (Byte*)base; - exec->codeRangeTable[range - 1].Size = length; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Clear_CodeRange - * - * Description : Clears a code range. - * - * Input : exec target execution context - * range code range index - * - * Output : SUCCESS on success. FAILURE on error. - * - * Note : Does not set the Error variable. - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Clear_CodeRange( PExecution_Context exec, Int range ) - { - if ( range < 1 || range > 3 ) - return TT_Err_Bad_Argument; - - exec->codeRangeTable[range - 1].Base = NULL; - exec->codeRangeTable[range - 1].Size = 0; - - return TT_Err_Ok; - } - - - -/******************************************************************* - * * - * EXECUTION CONTEXT ROUTINES * - * * - *******************************************************************/ - -/******************************************************************* - * - * Function : Context_Destroy - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Context_Destroy( void* _context ) - { - PExecution_Context exec = (PExecution_Context)_context; - - if ( !exec ) - return TT_Err_Ok; - - /* free composite load stack */ - FREE( exec->loadStack ); - exec->loadSize = 0; - - /* points zone */ - Done_Glyph_Zone( &exec->pts ); - exec->maxPoints = 0; - exec->maxContours = 0; - - /* free stack */ - FREE( exec->stack ); - exec->stackSize = 0; - - /* free call stack */ - FREE( exec->callStack ); - exec->callSize = 0; - exec->callTop = 0; - - /* free glyph code range */ - FREE( exec->glyphIns ); - exec->glyphSize = 0; - - exec->instance = NULL; - exec->face = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Context_Create - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Context_Create( void* _context, void* _face ) - { - PExecution_Context exec = (PExecution_Context)_context; - - PFace face = (PFace)_face; - TT_Error error; - - - /* XXX : We don't reserve arrays anymore, this is done automatically */ - /* during a "Context_Load".. */ - - exec->callSize = 32; - if ( ALLOC_ARRAY( exec->callStack, exec->callSize, TCallRecord ) ) - goto Fail_Memory; - - /* all values in the context are set to 0 already, but this is */ - /* here as a remainder */ - exec->maxPoints = 0; - exec->maxContours = 0; - - exec->stackSize = 0; - exec->loadSize = 0; - exec->glyphSize = 0; - - exec->stack = NULL; - exec->loadStack = NULL; - exec->glyphIns = NULL; - - exec->face = face; - exec->instance = NULL; - - return TT_Err_Ok; - - Fail_Memory: - Context_Destroy( exec ); - return error; - } - - -/******************************************************************* - * - * Function : Context_Load - * - *****************************************************************/ - -/****************************************************************/ -/* */ -/* Update_Max : Reallocate a buffer if it needs to */ -/* */ -/* input: size address of buffer's current size */ -/* expressed in elements */ -/* */ -/* multiplier size in bytes of each element in the */ -/* buffer */ -/* */ -/* buff address of the buffer base pointer */ -/* */ -/* new_max new capacity (size) of the buffer */ - - static - TT_Error Update_Max( ULong* size, - ULong multiplier, - void** buff, - ULong new_max ) - { - TT_Error error; - - if ( *size < new_max ) - { - FREE( *buff ); - if ( ALLOC( *buff, new_max * multiplier ) ) - return error; - *size = new_max; - } - return TT_Err_Ok; - } - - -/****************************************************************/ -/* */ -/* Update_Zone: Reallocate a zone if it needs to */ -/* */ -/* input: zone address of the target zone */ -/* */ -/* maxPoints address of the zone's current capacity */ -/* in points */ -/* */ -/* maxContours address of the zone's current capacity */ -/* in contours */ -/* */ -/* newPoints new capacity in points */ -/* */ -/* newContours new capacity in contours */ -/* */ - - static - TT_Error Update_Zone( PGlyph_Zone zone, - UShort* maxPoints, - UShort* maxContours, - UShort newPoints, - UShort newContours ) - { - if ( *maxPoints < newPoints || *maxContours < newContours ) - { - TT_Error error; - - - Done_Glyph_Zone( zone ); - - error = New_Glyph_Zone( zone, newPoints, newContours ); - if ( error ) - return error; - - *maxPoints = newPoints; - *maxContours = newContours; - } - return TT_Err_Ok; - } - - - LOCAL_FUNC - TT_Error Context_Load( PExecution_Context exec, - PFace face, - PInstance ins ) - { - Int i; - TMaxProfile* maxp; - TT_Error error; - - exec->face = face; - maxp = &face->maxProfile; - - exec->instance = ins; - - if ( ins ) - { - exec->numFDefs = ins->numFDefs; - exec->numIDefs = ins->numIDefs; - exec->maxFDefs = ins->maxFDefs; - exec->maxIDefs = ins->maxIDefs; - exec->FDefs = ins->FDefs; - exec->IDefs = ins->IDefs; - exec->metrics = ins->metrics; - - exec->maxFunc = ins->maxFunc; - exec->maxIns = ins->maxIns; - - for ( i = 0; i < MAX_CODE_RANGES; i++ ) - exec->codeRangeTable[i] = ins->codeRangeTable[i]; - - /* set graphics state */ - exec->GS = ins->GS; - - exec->cvtSize = ins->cvtSize; - exec->cvt = ins->cvt; - - exec->storeSize = ins->storeSize; - exec->storage = ins->storage; - - exec->twilight = ins->twilight; - } - - error = Update_Max( &exec->loadSize, - sizeof ( TSubglyph_Record ), - (void**)&exec->loadStack, - face->maxComponents + 1 ); - if ( error ) - return error; - - error = Update_Max( &exec->stackSize, - sizeof ( TT_F26Dot6 ), - (void**)&exec->stack, - maxp->maxStackElements + 32 ); - /* XXX : We reserve a little more elements on the stack to deal safely */ - /* with broken fonts like arialbs, courbs, timesbs... */ - if ( error ) - return error; - - error = Update_Max( &exec->glyphSize, - sizeof ( Byte ), - (void**)&exec->glyphIns, - maxp->maxSizeOfInstructions ); - if ( error ) - return error; - - error = Update_Zone( &exec->pts, - &exec->maxPoints, - &exec->maxContours, - exec->face->maxPoints + 2, - exec->face->maxContours ); - /* XXX : We reserve two positions for the phantom points! */ - if ( error ) - return error; - - exec->pts.n_points = 0; - exec->pts.n_contours = 0; - - exec->instruction_trap = FALSE; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Context_Save - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Context_Save( PExecution_Context exec, - PInstance ins ) - { - Int i; - - /* XXXX : Will probably disappear soon with all the coderange */ - /* management, which is now rather obsolete. */ - - ins->numFDefs = exec->numFDefs; - ins->numIDefs = exec->numIDefs; - ins->maxFunc = exec->maxFunc; - ins->maxIns = exec->maxIns; - - for ( i = 0; i < MAX_CODE_RANGES; i++ ) - ins->codeRangeTable[i] = exec->codeRangeTable[i]; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Context_Run - * - *****************************************************************/ - - LOCAL_FUNC - TT_Error Context_Run( PExecution_Context exec, - Bool debug ) - { - TT_Error error; - - - if ( (error = Goto_CodeRange( exec, - TT_CodeRange_Glyph, 0 )) != TT_Err_Ok ) - return error; - - exec->zp0 = exec->pts; - exec->zp1 = exec->pts; - exec->zp2 = exec->pts; - - exec->GS.gep0 = 1; - exec->GS.gep1 = 1; - exec->GS.gep2 = 1; - - exec->GS.projVector.x = 0x4000; - exec->GS.projVector.y = 0x0000; - - exec->GS.freeVector = exec->GS.projVector; - exec->GS.dualVector = exec->GS.projVector; - - exec->GS.round_state = 1; - exec->GS.loop = 1; - - /* some glyphs leave something on the stack. so we clean it */ - /* before a new execution. */ - exec->top = 0; - exec->callTop = 0; - - if ( !debug ) - return RunIns( exec ); - else - return TT_Err_Ok; - } - - - LOCAL_FUNC - const TGraphicsState Default_GraphicsState = - { - 0, 0, 0, - { 0x4000, 0 }, - { 0x4000, 0 }, - { 0x4000, 0 }, - 1, 64, 1, - TRUE, 68, 0, 0, 9, 3, - 0, FALSE, 2, 1, 1, 1 - }; - - - -/******************************************************************* - * * - * INSTANCE FUNCTIONS * - * * - * * - *******************************************************************/ - -/******************************************************************* - * - * Function : Instance_Destroy - * - * Description : - * - * Input : _instance the instance object to destroy - * - * Output : error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Instance_Destroy( void* _instance ) - { - PInstance ins = (PInstance)_instance; - - - if ( !_instance ) - return TT_Err_Ok; - - if ( ins->debug ) - { - /* the debug context must be deleted by the debugger itself */ - ins->context = NULL; - ins->debug = FALSE; - } - - FREE( ins->cvt ); - ins->cvtSize = 0; - - /* free storage area */ - FREE( ins->storage ); - ins->storeSize = 0; - - /* twilight zone */ - Done_Glyph_Zone( &ins->twilight ); - - FREE( ins->FDefs ); - FREE( ins->IDefs ); - ins->numFDefs = 0; - ins->numIDefs = 0; - ins->maxFDefs = 0; - ins->maxIDefs = 0; - ins->maxFunc = -1; - ins->maxIns = -1; - - ins->owner = NULL; - ins->valid = FALSE; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Instance_Create - * - * Description : - * - * Input : _instance instance record to initialize - * _face parent face object - * - * Output : Error code. All partially built subtables are - * released on error. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Instance_Create( void* _instance, - void* _face ) - { - PInstance ins = (PInstance)_instance; - PFace face = (PFace)_face; - TT_Error error; - Int i; - UShort n_twilight; - - PMaxProfile maxp = &face->maxProfile; - - - ins->owner = face; - ins->valid = FALSE; - - ins->maxFDefs = maxp->maxFunctionDefs; - ins->maxIDefs = maxp->maxInstructionDefs; - ins->cvtSize = face->cvtSize; - ins->storeSize = maxp->maxStorage; - - /* Set default metrics */ - { - PIns_Metrics metrics = &ins->metrics; - - - metrics->pointSize = 10 * 64; /* default pointsize = 10pts */ - - metrics->x_resolution = 96; /* default resolution = 96dpi */ - metrics->y_resolution = 96; - - metrics->x_ppem = 0; - metrics->y_ppem = 0; - - metrics->rotated = FALSE; - metrics->stretched = FALSE; - - /* set default compensation ( all 0 ) */ - for ( i = 0; i < 4; i++ ) - metrics->compensations[i] = 0; - } - - /* allocate function defs, instruction defs, cvt and storage area */ - if ( ALLOC_ARRAY( ins->FDefs, ins->maxFDefs, TDefRecord ) || - ALLOC_ARRAY( ins->IDefs, ins->maxIDefs, TDefRecord ) || - ALLOC_ARRAY( ins->cvt, ins->cvtSize, Long ) || - ALLOC_ARRAY( ins->storage, ins->storeSize, Long ) ) - goto Fail_Memory; - - /* reserve twilight zone */ - n_twilight = maxp->maxTwilightPoints; - error = New_Glyph_Zone( &ins->twilight, n_twilight, 0 ); - if (error) - goto Fail_Memory; - - ins->twilight.n_points = n_twilight; - - return TT_Err_Ok; - - Fail_Memory: - Instance_Destroy( ins ); - return error; - } - - -/******************************************************************* - * - * Function : Instance_Init - * - * Description : Initialize a fresh new instance. - * Executes the font program if any is found. - * - * Input : _instance the instance object to destroy - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Instance_Init( PInstance ins ) - { - PExecution_Context exec; - - TT_Error error; - PFace face = ins->owner; - - - if ( ins->debug ) - exec = ins->context; - else - exec = New_Context( face ); - /* debugging instances have their own context */ - - if ( !exec ) - return TT_Err_Could_Not_Find_Context; - - ins->GS = Default_GraphicsState; - - ins->numFDefs = 0; - ins->numIDefs = 0; - ins->maxFunc = -1; - ins->maxIns = -1; - - Context_Load( exec, face, ins ); - - exec->callTop = 0; - exec->top = 0; - - exec->period = 64; - exec->phase = 0; - exec->threshold = 0; - - { - PIns_Metrics metrics = &exec->metrics; - - - metrics->x_ppem = 0; - metrics->y_ppem = 0; - metrics->pointSize = 0; - metrics->x_scale1 = 0; - metrics->x_scale2 = 1; - metrics->y_scale1 = 0; - metrics->y_scale2 = 1; - - metrics->ppem = 0; - metrics->scale1 = 0; - metrics->scale2 = 1; - metrics->ratio = 1L << 16; - } - - exec->instruction_trap = FALSE; - - exec->cvtSize = ins->cvtSize; - exec->cvt = ins->cvt; - - exec->F_dot_P = 0x10000; - - /* allow font program execution */ - Set_CodeRange( exec, - TT_CodeRange_Font, - face->fontProgram, - face->fontPgmSize ); - - /* disable CVT and glyph programs coderange */ - Clear_CodeRange( exec, TT_CodeRange_Cvt ); - Clear_CodeRange( exec, TT_CodeRange_Glyph ); - - if ( face->fontPgmSize > 0 ) - { - error = Goto_CodeRange( exec, TT_CodeRange_Font, 0 ); - if ( error ) - goto Fin; - - error = RunIns( exec ); - } - else - error = TT_Err_Ok; - - Fin: - Context_Save( exec, ins ); - - if ( !ins->debug ) - Done_Context( exec ); - /* debugging instances keep their context */ - - ins->valid = FALSE; - - return error; - } - - -/******************************************************************* - * - * Function : Instance_Reset - * - * Description : Resets an instance to a new pointsize/transform. - * Executes the cvt program if any is found. - * - * Input : _instance the instance object to destroy - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Instance_Reset( PInstance ins ) - { - PExecution_Context exec; - - TT_Error error; - ULong i; - UShort j; - PFace face; - - - if ( !ins ) - return TT_Err_Invalid_Instance_Handle; - - if ( ins->valid ) - return TT_Err_Ok; - - face = ins->owner; - - if ( ins->metrics.x_ppem < 1 || - ins->metrics.y_ppem < 1 ) - return TT_Err_Invalid_PPem; - - /* compute new transformation */ - if ( ins->metrics.x_ppem >= ins->metrics.y_ppem ) - { - ins->metrics.scale1 = ins->metrics.x_scale1; - ins->metrics.scale2 = ins->metrics.x_scale2; - ins->metrics.ppem = ins->metrics.x_ppem; - ins->metrics.x_ratio = 1L << 16; - ins->metrics.y_ratio = TT_MulDiv( ins->metrics.y_ppem, - 0x10000, - ins->metrics.x_ppem ); - } - else - { - ins->metrics.scale1 = ins->metrics.y_scale1; - ins->metrics.scale2 = ins->metrics.y_scale2; - ins->metrics.ppem = ins->metrics.y_ppem; - ins->metrics.x_ratio = TT_MulDiv( ins->metrics.x_ppem, - 0x10000, - ins->metrics.y_ppem ); - ins->metrics.y_ratio = 1L << 16; - } - - /* Scale the cvt values to the new ppem. */ - /* We use by default the y ppem to scale the CVT. */ - - for ( i = 0; i < ins->cvtSize; i++ ) - ins->cvt[i] = TT_MulDiv( face->cvt[i], - ins->metrics.scale1, - ins->metrics.scale2 ); - - /* All twilight points are originally zero */ - for ( j = 0; j < ins->twilight.n_points; j++ ) - { - ins->twilight.org[j].x = 0; - ins->twilight.org[j].y = 0; - ins->twilight.cur[j].x = 0; - ins->twilight.cur[j].y = 0; - } - - /* clear storage area */ - for ( i = 0; i < ins->storeSize; i++ ) - ins->storage[i] = 0; - - ins->GS = Default_GraphicsState; - - /* get execution context and run prep program */ - - if ( ins->debug ) - exec = ins->context; - else - exec = New_Context(face); - /* debugging instances have their own context */ - - if ( !exec ) - return TT_Err_Could_Not_Find_Context; - - Context_Load( exec, face, ins ); - - Set_CodeRange( exec, - TT_CodeRange_Cvt, - face->cvtProgram, - face->cvtPgmSize ); - - Clear_CodeRange( exec, TT_CodeRange_Glyph ); - - exec->instruction_trap = FALSE; - - exec->top = 0; - exec->callTop = 0; - - if ( face->cvtPgmSize > 0 ) - { - error = Goto_CodeRange( exec, TT_CodeRange_Cvt, 0 ); - if ( error ) - goto Fin; - - if ( !ins->debug ) - error = RunIns( exec ); - } - else - error = TT_Err_Ok; - - ins->GS = exec->GS; - /* save default graphics state */ - - Fin: - Context_Save( exec, ins ); - - if ( !ins->debug ) - Done_Context( exec ); - /* debugging instances keep their context */ - - if ( !error ) - ins->valid = TRUE; - - return error; - } - - - -/******************************************************************* - * * - * FACE FUNCTIONS * - * * - * * - *******************************************************************/ - -/******************************************************************* - * - * Function : Face_Destroy - * - * Description : The face object destructor. - * - * Input : _face typeless pointer to the face object to destroy - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Face_Destroy( void* _face ) - { - PFace face = (PFace)_face; - UShort n; - - - if ( !face ) - return TT_Err_Ok; - - /* well, we assume that no other thread is using the face */ - /* at this moment, but one is never sure enough. */ - MUTEX_Lock( face->lock ); - - /* first of all, destroys the cached sub-objects */ - Cache_Destroy( &face->instances ); - Cache_Destroy( &face->glyphs ); - - /* destroy the extensions */ -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - Extension_Destroy( face ); -#endif - - /* freeing the collection table */ - FREE( face->ttcHeader.TableDirectory ); - face->ttcHeader.DirCount = 0; - - /* freeing table directory */ - FREE( face->dirTables ); - face->numTables = 0; - - /* freeing the locations table */ - FREE( face->glyphLocations ); - face->numLocations = 0; - - /* freeing the character mapping tables */ - for ( n = 0; n < face->numCMaps; n++ ) - CharMap_Free( face->cMaps + n ); - - FREE( face->cMaps ); - face->numCMaps = 0; - - /* freeing the CVT */ - FREE( face->cvt ); - face->cvtSize = 0; - - /* freeing the horizontal metrics */ - FREE( face->horizontalHeader.long_metrics ); - FREE( face->horizontalHeader.short_metrics ); - - /* freeing the vertical ones, if any */ - if (face->verticalInfo) - { - FREE( face->verticalHeader.long_metrics ); - FREE( face->verticalHeader.short_metrics ); - face->verticalInfo = 0; - } - - /* freeing the programs */ - FREE( face->fontProgram ); - FREE( face->cvtProgram ); - face->fontPgmSize = 0; - face->cvtPgmSize = 0; - - /* freeing the gasp table */ - FREE( face->gasp.gaspRanges ); - face->gasp.numRanges = 0; - - /* freeing the name table */ - Free_TrueType_Names( face ); - - /* freeing the hdmx table */ - Free_TrueType_Hdmx( face ); - - /* TT_Close_Stream( &face->stream ); -- this is performed by the API */ - - /* destroy the mutex */ - MUTEX_Destroy(face->lock); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Face_Create - * - * Description : The face object constructor. - * - * Input : _face face record to build - * _input input stream where to load font data - * - * Output : Error code. - * - * NOTE : The input stream is kept in the face object. The - * caller shouldn't destroy it after calling Face_Create(). - * - ******************************************************************/ - -#undef LOAD_ -#define LOAD_( table ) \ - (error = Load_TrueType_##table (face)) != TT_Err_Ok - - - LOCAL_FUNC - TT_Error Face_Create( void* _face, - void* _input ) - { - PEngine_Instance engine; - - TFont_Input* input = (TFont_Input*)_input; - PFace face = (PFace)_face; - TT_Error error; - - - face->stream = input->stream; - face->engine = input->engine; - - engine = face->engine; - - MUTEX_Create( face->lock ); - - Cache_Create( engine, - engine->objs_instance_class, - &face->instances, - &face->lock ); - - Cache_Create( engine, - engine->objs_glyph_class, - &face->glyphs, - &face->lock ); - - /* Load collection directory if present, then font directory */ - - error = Load_TrueType_Directory( face, input->fontIndex ); - if ( error ) - goto Fail; - - /* Load tables */ - - if ( LOAD_( Header ) || - LOAD_( MaxProfile ) || - LOAD_( Locations ) || - - (error = Load_TrueType_Metrics_Header( face, 0 )) != TT_Err_Ok || - /* load the 'hhea' & 'hmtx' tables at once */ - - LOAD_( CMap ) || - LOAD_( CVT ) || - LOAD_( Programs ) || - LOAD_( Gasp ) || - LOAD_( Names ) || - LOAD_( OS2 ) || - LOAD_( PostScript ) || - - (error = Load_TrueType_Metrics_Header( face, 1 )) != TT_Err_Ok || - /* try to load the 'vhea' & 'vmtx' at once if present */ - - LOAD_( Hdmx ) ) - - goto Fail; - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - if ( ( error = Extension_Create( face ) ) != TT_Err_Ok ) - return error; -#endif - - return TT_Err_Ok; - - Fail : - Face_Destroy( face ); - return error; - } - -#undef LOAD_ - - -/******************************************************************* - * - * Function : Glyph_Destroy - * - * Description : The glyph object destructor. - * - * Input : _glyph typeless pointer to the glyph record to destroy - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Glyph_Destroy( void* _glyph ) - { - PGlyph glyph = (PGlyph)_glyph; - - - if ( !glyph ) - return TT_Err_Ok; - - glyph->outline.owner = TRUE; - return TT_Done_Outline( &glyph->outline ); - } - - -/******************************************************************* - * - * Function : Glyph_Create - * - * Description : The glyph object constructor. - * - * Input : _glyph glyph record to build. - * _face the glyph's parent face. - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error Glyph_Create( void* _glyph, - void* _face ) - { - PFace face = (PFace)_face; - PGlyph glyph = (PGlyph)_glyph; - - - if ( !face ) - return TT_Err_Invalid_Face_Handle; - - if ( !glyph ) - return TT_Err_Invalid_Glyph_Handle; - - glyph->face = face; - - /* XXX: Don't forget the space for the 2 phantom points */ - return TT_New_Outline( glyph->face->maxPoints + 2, - glyph->face->maxContours, - &glyph->outline ); - } - - -/******************************************************************* - * - * Function : Scale_X - * - * Description : scale an horizontal distance from font - * units to 26.6 pixels - * - * Input : metrics pointer to metrics - * x value to scale - * - * Output : scaled value - * - ******************************************************************/ - - LOCAL_FUNC - TT_Pos Scale_X( PIns_Metrics metrics, TT_Pos x ) - { - return TT_MulDiv( x, metrics->x_scale1, metrics->x_scale2 ); - } - - -/******************************************************************* - * - * Function : Scale_Y - * - * Description : scale a vertical distance from font - * units to 26.6 pixels - * - * Input : metrics pointer to metrics - * y value to scale - * - * Output : scaled value - * - ******************************************************************/ - - LOCAL_FUNC - TT_Pos Scale_Y( PIns_Metrics metrics, TT_Pos y ) - { - return TT_MulDiv( y, metrics->y_scale1, metrics->y_scale2 ); - } - - -/******************************************************************* - * - * Function : TTObjs_Init - * - * Description : The TTObjs component initializer. Creates the - * object cache classes, as well as the face record - * cache. - * - * Input : engine engine instance - * - * Output : Error code. - * - ******************************************************************/ - - static - const TCache_Class objs_face_class = - { - sizeof ( TFace ), - -1, - Face_Create, - Face_Destroy, - NULL, - NULL - }; - - static - const TCache_Class objs_instance_class = - { - sizeof ( TInstance ), - -1, - Instance_Create, - Instance_Destroy, - NULL, - NULL - }; - - /* Note that we use a cache size of 1 for the execution context. */ - /* This is to avoid re-creating a new context each time we */ - /* change one instance's attribute (resolution and/or char sizes) */ - /* or when we load a glyph. */ - - static - const TCache_Class objs_exec_class = - { - sizeof ( TExecution_Context ), - 1, - Context_Create, - Context_Destroy, - NULL, - NULL - }; - - static - const TCache_Class objs_glyph_class = - { - sizeof ( TGlyph ), - -1, - Glyph_Create, - Glyph_Destroy, - NULL, - NULL - }; - - - LOCAL_FUNC - TT_Error TTObjs_Init( PEngine_Instance engine ) - { - PCache face_cache, exec_cache; - TT_Error error; - - - face_cache = 0; - exec_cache = 0; - - if ( ALLOC( face_cache, sizeof ( TCache ) ) || - ALLOC( exec_cache, sizeof ( TCache ) ) ) - goto Fail; - - /* create face cache */ - error = Cache_Create( engine, (PCache_Class)&objs_face_class, - face_cache, &engine->lock ); - if ( error ) - goto Fail; - - engine->objs_face_cache = face_cache; - - error = Cache_Create( engine, (PCache_Class)&objs_exec_class, - exec_cache, &engine->lock ); - if ( error ) - goto Fail; - - engine->objs_exec_cache = exec_cache; - - engine->objs_face_class = (PCache_Class)&objs_face_class; - engine->objs_instance_class = (PCache_Class)&objs_instance_class; - engine->objs_execution_class = (PCache_Class)&objs_exec_class; - engine->objs_glyph_class = (PCache_Class)&objs_glyph_class; - - goto Exit; - - Fail: - FREE( face_cache ); - FREE( exec_cache ); - - Exit: - return error; - } - - -/******************************************************************* - * - * Function : TTObjs_Done - * - * Description : The TTObjs component finalizer. - * - * Input : engine engine instance - * - * Output : Error code. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTObjs_Done( PEngine_Instance engine ) - { - /* destroy all active faces and contexts before releasing the */ - /* caches */ - Cache_Destroy( (TCache*)engine->objs_exec_cache ); - Cache_Destroy( (TCache*)engine->objs_face_cache ); - - /* Now frees caches and cache classes */ - FREE( engine->objs_exec_cache ); - FREE( engine->objs_face_cache ); - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttobjs.h diff -u xc/extras/FreeType/lib/ttobjs.h:1.2 xc/extras/FreeType/lib/ttobjs.h:removed --- xc/extras/FreeType/lib/ttobjs.h:1.2 Sat Oct 27 23:32:05 2001 +++ xc/extras/FreeType/lib/ttobjs.h Wed Mar 16 20:59:40 2005 @@ -1,877 +0,0 @@ -/******************************************************************* - * - * ttobjs.h 1.0 - * - * Objects definition unit. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/ttobjs.h,v 1.2 2001/10/28 03:32:05 tsi Exp $ */ - -#ifndef TTOBJS_H -#define TTOBJS_H - -#include "ttconfig.h" -#include "ttengine.h" -#include "ttmutex.h" -#include "ttcache.h" -#include "tttables.h" -#include "ttcmap.h" - -#ifdef __cplusplus - extern "C" { -#endif - -/* */ -/* This file contains the definitions and methods of the four */ -/* kinds of objects managed by the FreeType engine. These are: */ -/* */ -/* */ -/* Face objects: */ -/* */ -/* There is always one face object per opened TrueType font */ -/* file, and only one. The face object contains data that is */ -/* independent of current transform/scaling/rotation and */ -/* pointsize, or glyph index. This data is made of several */ -/* critical tables that are loaded on face object creation. */ -/* */ -/* A face object tracks all active and recycled objects of */ -/* the instance and execution context classes. Destroying a face */ -/* object will automatically destroy all associated instances. */ -/* */ -/* */ -/* Instance objects: */ -/* */ -/* An instance object always relates to a given face object, */ -/* known as its 'parent' or 'owner', and contains only the */ -/* data that is specific to one given pointsize/transform of */ -/* the face. You can only create an instance from a face object. */ -/* */ -/* An instance's current transform/pointsize can be changed */ -/* at any time using a single high-level API call, */ -/* TT_Reset_Instance(). */ -/* */ -/* Execution Context objects: */ -/* */ -/* An execution context (or context in short) relates to a face. */ -/* It contains the data and tables that are necessary to load */ -/* and hint (i.e. execute the glyph instructions of) one glyph. */ -/* A context is a transient object that is queried/created on */ -/* the fly: client applications never deal with them directly. */ -/* */ -/* */ -/* Glyph objects: */ -/* */ -/* A glyph object contains only the minimal glyph information */ -/* needed to render one glyph correctly. This means that a glyph */ -/* object really contains tables that are sized to hold the */ -/* contents of _any_ glyph of a given face. A client application */ -/* can usually create one glyph object for a given face, then use */ -/* it for all subsequent loads. */ -/* */ -/* Here is an example of a client application : */ -/* (NOTE: No error checking performed here!) */ -/* */ -/* */ -/* TT_Face face; -- face handle */ -/* TT_Instance ins1, ins2; -- two instance handles */ -/* TT_Glyph glyph; -- glyph handle */ -/* */ -/* TT_Init_FreeType(); */ -/* */ -/* -- Initialize the engine. This must be done prior to _any_ */ -/* operation. */ -/* */ -/* TT_Open_Face( "/some/face/name.ttf", &face ); */ -/* */ -/* -- create the face object. This call opens the font file */ -/* */ -/* TT_New_Instance( face, &ins1 ); */ -/* TT_New_Instance( face, &ins2 ); */ -/* */ -/* TT_Set_Instance_PointSize( ins1, 8 ); */ -/* TT_Set_Instance_PointSize( ins2, 12 ); */ -/* */ -/* -- create two distinct instances of the same face */ -/* -- ins1 is pointsize 8 at resolution 96 dpi */ -/* -- ins2 is pointsize 12 at resolution 96 dpi */ -/* */ -/* TT_New_Glyph( face, &glyph ); */ -/* */ -/* -- create a new glyph object which will receive the contents */ -/* of any glyph of 'face' */ -/* */ -/* TT_Load_Glyph( ins1, glyph, 64, DEFAULT_GLYPH_LOAD ); */ -/* */ -/* -- load glyph indexed 64 at pointsize 8 in the 'glyph' object */ -/* -- NOTE: This call will fail if the instance and the glyph */ -/* do not relate to the same face object. */ -/* */ -/* TT_Get_Outline( glyph, &outline ); */ -/* */ -/* -- extract the glyph outline from the object and copies it */ -/* to the 'outline' record */ -/* */ -/* TT_Get_Metrics( glyph, &metrics ); */ -/* */ -/* -- extract the glyph metrics and put them into the 'metrics' */ -/* record */ -/* */ -/* TT_Load_Glyph( ins2, glyph, 64, DEFAULT_GLYPH_LOAD ); */ -/* */ -/* -- load the same glyph at pointsize 12 in the 'glyph' object */ -/* */ -/* */ -/* TT_Close_Face( &face ); */ -/* */ -/* -- destroy the face object. This will destroy 'ins1' and */ -/* 'ins2'. However, the glyph object will still be available */ -/* */ -/* TT_Done_FreeType(); */ -/* */ -/* -- Finalize the engine. This will also destroy all pending */ -/* glyph objects (here 'glyph'). */ - - struct TFace_; - struct TInstance_; - struct TExecution_Context_; - struct TGlyph_; - - typedef struct TFace_ TFace; - typedef TFace* PFace; - - typedef struct TInstance_ TInstance; - typedef TInstance* PInstance; - - typedef struct TExecution_Context_ TExecution_Context; - typedef TExecution_Context* PExecution_Context; - - typedef struct TGlyph_ TGlyph; - typedef TGlyph* PGlyph; - - - /*************************************************************/ - /* */ - /* ADDITIONAL SUBTABLES */ - /* */ - /* These tables are not precisely defined by the specs */ - /* but their structures is implied by the TrueType font */ - /* file layout. */ - /* */ - /*************************************************************/ - - /* Graphics State */ - /* */ - /* The Graphics State (GS) is managed by the */ - /* instruction field, but does not come from */ - /* the font file. Thus, we can use 'int's */ - /* where needed. */ - - struct TGraphicsState_ - { - UShort rp0; - UShort rp1; - UShort rp2; - - TT_UnitVector dualVector; - TT_UnitVector projVector; - TT_UnitVector freeVector; - - Long loop; - TT_F26Dot6 minimum_distance; - Int round_state; - - Bool auto_flip; - TT_F26Dot6 control_value_cutin; - TT_F26Dot6 single_width_cutin; - TT_F26Dot6 single_width_value; - Short delta_base; - Short delta_shift; - - Byte instruct_control; - Bool scan_control; - Int scan_type; - - UShort gep0; - UShort gep1; - UShort gep2; - }; - - typedef struct TGraphicsState_ TGraphicsState; - - - LOCAL_DEF - const TGraphicsState Default_GraphicsState; - - - /*************************************************************/ - /* */ - /* EXECUTION SUBTABLES */ - /* */ - /* These sub-tables relate to instruction execution. */ - /* */ - /*************************************************************/ - -#define MAX_CODE_RANGES 3 - -/* There can only be 3 active code ranges at once: */ -/* - the Font Program */ -/* - the CVT Program */ -/* - a glyph's instructions set */ - -#define TT_CodeRange_Font 1 -#define TT_CodeRange_Cvt 2 -#define TT_CodeRange_Glyph 3 - - - struct TCodeRange_ - { - PByte Base; - ULong Size; - }; - - typedef struct TCodeRange_ TCodeRange; - typedef TCodeRange* PCodeRange; - - - /* Defintion of a code range */ - /* */ - /* Code ranges can be resident to a glyph (i.e. the Font Program) */ - /* while some others are volatile (Glyph instructions). */ - /* Tracking the state and presence of code ranges allows function */ - /* and instruction definitions within a code range to be forgotten */ - /* when the range is discarded. */ - - typedef TCodeRange TCodeRangeTable[MAX_CODE_RANGES]; - - /* defines a function/instruction definition record */ - - struct TDefRecord_ - { - Int Range; /* in which code range is it located ? */ - ULong Start; /* where does it start ? */ - Int Opc; /* function #, or instruction code */ - Bool Active; /* is it active ? */ - }; - - typedef struct TDefRecord_ TDefRecord; - typedef TDefRecord* PDefRecord; - typedef TDefRecord* PDefArray; - - /* defines a call record, used to manage function calls. */ - - struct TCallRecord_ - { - Int Caller_Range; - ULong Caller_IP; - Long Cur_Count; - ULong Cur_Restart; - }; - - typedef struct TCallRecord_ TCallRecord; - typedef TCallRecord* PCallRecord; - typedef TCallRecord* PCallStack; /* defines a simple call stack */ - - - /* This type defining a set of glyph points will be used to represent */ - /* each zone (regular and twilight) during instructions decoding. */ - struct TGlyph_Zone_ - { - UShort n_points; /* number of points in zone */ - Short n_contours; /* number of contours */ - - TT_Vector* org; /* original points coordinates */ - TT_Vector* cur; /* current points coordinates */ - - Byte* touch; /* current touch flags */ - UShort* contours; /* contour end points */ - }; - - typedef struct TGlyph_Zone_ TGlyph_Zone; - typedef TGlyph_Zone* PGlyph_Zone; - - - -#ifndef TT_STATIC_INTEPRETER /* indirect implementation */ - -#define EXEC_OPS PExecution_Context exc, -#define EXEC_OP PExecution_Context exc -#define EXEC_ARGS exc, -#define EXEC_ARG exc - -#else /* static implementation */ - -#define EXEC_OPS /* void */ -#define EXEC_OP /* void */ -#define EXEC_ARGS /* void */ -#define EXEC_ARG /* void */ - -#endif - - /* Rounding function, as used by the interpreter */ - typedef TT_F26Dot6 (*TRound_Function)( EXEC_OPS TT_F26Dot6 distance, - TT_F26Dot6 compensation ); - - /* Point displacement along the freedom vector routine, as */ - /* used by the interpreter */ - typedef void (*TMove_Function)( EXEC_OPS PGlyph_Zone zone, - UShort point, - TT_F26Dot6 distance ); - - /* Distance projection along one of the proj. vectors, as used */ - /* by the interpreter */ - typedef TT_F26Dot6 (*TProject_Function)( EXEC_OPS TT_Vector* v1, - TT_Vector* v2 ); - - /* reading a cvt value. Take care of non-square pixels when needed */ - typedef TT_F26Dot6 (*TGet_CVT_Function)( EXEC_OPS ULong index ); - - /* setting or moving a cvt value. Take care of non-square pixels */ - /* when needed */ - typedef void (*TSet_CVT_Function)( EXEC_OPS ULong index, - TT_F26Dot6 value ); - - /* subglyph transformation record */ - struct TTransform_ - { - TT_Fixed xx, xy; /* transformation */ - TT_Fixed yx, yy; /* matrix */ - TT_F26Dot6 ox, oy; /* offsets */ - }; - - typedef struct TTransform_ TTransform; - typedef TTransform* PTransform; - - /* subglyph loading record. Used to load composite components */ - struct TSubglyph_Record_ - { - Long index; /* subglyph index; initialized with -1 */ - Bool is_scaled; /* is the subglyph scaled? */ - Bool is_hinted; /* should it be hinted? */ - Bool preserve_pps; /* preserve phantom points? */ - - Long file_offset; - - TT_Big_Glyph_Metrics metrics; - - TGlyph_Zone zone; - - Long arg1; /* first argument */ - Long arg2; /* second argument */ - - UShort element_flag; /* current load element flag */ - - TTransform transform; /* transform */ - - TT_Vector pp1, pp2; /* phantom points */ - - }; - - typedef struct TSubglyph_Record_ TSubglyph_Record; - typedef TSubglyph_Record* PSubglyph_Record; - typedef TSubglyph_Record* PSubglyph_Stack; - - /* A note regarding non-squared pixels: */ - /* */ - /* (This text will probably go into some docs at some time, for */ - /* now, it is kept there to explain some definitions in the */ - /* TIns_Metrics record). */ - /* */ - /* The CVT is a one-dimensional array containing values that */ - /* control certain important characteristics in a font, like */ - /* the height of all capitals, all lowercase letter, default */ - /* spacing or stem width/height. */ - /* */ - /* These values are found in FUnits in the font file, and must be */ - /* scaled to pixel coordinates before being used by the CVT and */ - /* glyph programs. Unfortunately, when using distinct x and y */ - /* resolutions (or distinct x and y pointsizes), there are two */ - /* possible scalings. */ - /* */ - /* A first try was to implement a 'lazy' scheme where all values */ - /* were scaled when first used. However, while some values are always */ - /* used in the same direction, and some other are used in many */ - /* different circumstances and orientations. */ - /* */ - /* I have found a simpler way to do the same, and it even seems to */ - /* work in most of the cases: */ - /* */ - /* - all CVT values are scaled to the maximum ppem size */ - /* */ - /* - when performing a read or write in the CVT, a ratio factor */ - /* is used to perform adequate scaling. Example: */ - /* */ - /* x_ppem = 14 */ - /* y_ppem = 10 */ - /* */ - /* we choose ppem = x_ppem = 14 as the CVT scaling size. All cvt */ - /* entries are scaled to it. */ - /* */ - /* x_ratio = 1.0 */ - /* y_ratio = y_ppem/ppem (< 1.0) */ - /* */ - /* we compute the current ratio like: */ - /* */ - /* - if projVector is horizontal, */ - /* ratio = x_ratio = 1.0 */ - /* - if projVector is vertical, */ - /* ratop = y_ratio */ - /* - else, */ - /* ratio = sqrt((proj.x*x_ratio)^2 + (proj.y*y_ratio)^2) */ - /* */ - /* reading a cvt value returns ratio * cvt[index] */ - /* writing a cvt value in pixels cvt[index] / ratio */ - /* */ - /* the current ppem is simply ratio * ppem */ - /* */ - - /* metrics used by the instance and execution context objects */ - struct TIns_Metrics_ - { - TT_F26Dot6 pointSize; /* point size. 1 point = 1/72 inch. */ - - UShort x_resolution; /* device horizontal resolution in dpi. */ - UShort y_resolution; /* device vertical resolution in dpi. */ - - UShort x_ppem; /* horizontal pixels per EM */ - UShort y_ppem; /* vertical pixels per EM */ - - Long x_scale1; - Long x_scale2; /* used to scale FUnits to fractional pixels */ - - Long y_scale1; - Long y_scale2; /* used to scale FUnits to fractional pixels */ - - /* for non-square pixels */ - Long x_ratio; - Long y_ratio; - - UShort ppem; /* maximum ppem size */ - Long ratio; /* current ratio */ - Long scale1; - Long scale2; /* scale for ppem */ - - TT_F26Dot6 compensations[4]; /* device-specific compensations */ - - Bool rotated; /* `is the glyph rotated?'-flag */ - Bool stretched; /* `is the glyph stretched?'-flag */ - }; - - typedef struct TIns_Metrics_ TIns_Metrics; - typedef TIns_Metrics* PIns_Metrics; - - - - /***********************************************************************/ - /* */ - /* FreeType Face Type */ - /* */ - /***********************************************************************/ - - struct TFace_ - { - /* parent engine instance for the face object */ - PEngine_Instance engine; - - /* i/o stream */ - TT_Stream stream; - - /* used only by the threaded builds of the library */ - TMutex lock; - - /* TrueType collection header, if any was found */ - TTTCHeader ttcHeader; - - /* maximum profile table, as found in the TrueType file */ - TMaxProfile maxProfile; - - /* Note: */ - /* it seems that some maximum values cannot be */ - /* taken directly from this table, but rather by */ - /* combining some of its fields; e.g. the max. */ - /* number of points seems to be given by */ - /* MAX( maxPoints, maxCompositePoints ) */ - /* */ - /* For this reason, we define later our own */ - /* max values that are used to load and allocate */ - /* further tables. */ - - TT_Header fontHeader; /* the font header, as */ - /* found in the TTF file */ - TT_Horizontal_Header horizontalHeader; /* the horizontal header */ - - Bool verticalInfo; /* True when vertical table */ - TT_Vertical_Header verticalHeader; /* is present in the font */ - - TT_OS2 os2; /* 'OS/2' table */ - - TT_Postscript postscript; /* 'Post' table */ - - TT_Hdmx hdmx; /* 'Hdmx' table */ - - TName_Table nameTable; /* name table */ - - TGasp gasp; /* the 'gasp' table */ - - /* The directory of TrueType tables for this typeface */ - UShort numTables; - PTableDirEntry dirTables; - - /* The directory of character mappings table for */ - /* this typeface */ - UShort numCMaps; - PCMapTable cMaps; - - /* The glyph locations table */ - ULong numLocations; /* UShort is not enough */ -#ifndef TT_HUGE_PTR - PStorage glyphLocations; -#else - Storage TT_HUGE_PTR * glyphLocations; -#endif - - /* NOTE : The "hmtx" is now part of the horizontal header */ - - /* the font program, if any */ - ULong fontPgmSize; - PByte fontProgram; - - /* the cvt program, if any */ - ULong cvtPgmSize; - PByte cvtProgram; - - /* the original, unscaled, control value table */ - ULong cvtSize; - PShort cvt; - - /* The following values _must_ be set by the */ - /* maximum profile loader */ - - UShort numGlyphs; /* the face's total number of glyphs */ - UShort maxPoints; /* max glyph points number, simple and composite */ - UShort maxContours; /* max glyph contours numb, simple and composite */ - UShort maxComponents; /* max components in a composite glyph */ - - /* the following are object caches to track active */ - /* and recycled instances and execution contexts */ - /* objects. See 'ttcache.h' */ - - TCache instances; /* current instances for this face */ - TCache glyphs; /* current glyph containers for this face */ - - - /* A typeless pointer to the face object extensions defined */ - /* in the 'ttextend.*' files. */ - void* extension; - Int n_extensions; /* number of extensions */ - - /* Use extensions to provide additional capabilities to the */ - /* engine. Read the developer's guide in the documentation */ - /* directory to know how to do that. */ - - /* a generic pointer for client use - see TT_Set/Get_Face_Pointer */ - void* generic; - }; - - - - /***********************************************************************/ - /* */ - /* FreeType Instance Type */ - /* */ - /***********************************************************************/ - - struct TInstance_ - { - PFace owner; /* face object */ - - Bool valid; - - TIns_Metrics metrics; - - UShort numFDefs; /* number of function definitions */ - UShort maxFDefs; - PDefArray FDefs; /* table of FDefs entries */ - - UShort numIDefs; /* number of instruction definitions */ - UShort maxIDefs; - PDefArray IDefs; /* table of IDefs entries */ - - Int maxFunc; /* maximum function definition id */ - Int maxIns; /* maximum instruction definition id */ - - TCodeRangeTable codeRangeTable; - - TGraphicsState GS; - TGraphicsState default_GS; - - ULong cvtSize; /* the scaled control value table */ - PLong cvt; - - ULong storeSize; /* The storage area is now part of the */ - PLong storage; /* instance */ - - TGlyph_Zone twilight; /* The instance's twilight zone */ - - /* debugging variables */ - - /* When using the debugger, we must keep the */ - /* execution context tied to the instance */ - /* object rather than asking it on demand */ - - Bool debug; - PExecution_Context context; - - /* a generic pointer for client use - see TT_Set/Get_Instance_Pointer */ - void* generic; - }; - - - /***********************************************************************/ - /* */ - /* FreeType Execution Context Type */ - /* */ - /***********************************************************************/ - - struct TExecution_Context_ - { - PFace face; - PInstance instance; - - /* instructions state */ - - TT_Error error; /* last execution error */ - - Long top; /* top of exec. stack */ - - ULong stackSize; /* size of exec. stack */ - PStorage stack; /* current exec. stack */ - - Long args; - ULong new_top; /* new top after exec. */ - - TGlyph_Zone zp0, /* zone records */ - zp1, - zp2, - pts, - twilight; - - TIns_Metrics metrics; /* instance metrics */ - - TGraphicsState GS; /* current graphics state */ - - Int curRange; /* current code range number */ - PByte code; /* current code range */ - ULong IP; /* current instruction pointer */ - ULong codeSize; /* size of current range */ - - Byte opcode; /* current opcode */ - Int length; /* length of current opcode */ - - Bool step_ins; /* true if the interpreter must */ - /* increment IP after ins. exec */ - ULong cvtSize; - PLong cvt; - - ULong glyphSize; /* glyph instructions buffer size */ - PByte glyphIns; /* glyph instructions buffer */ - - UShort numFDefs; /* number of function defs */ - UShort maxFDefs; /* maximum number of function defs */ - PDefRecord FDefs; /* table of FDefs entries */ - - UShort numIDefs; /* number of instruction defs */ - UShort maxIDefs; /* maximum number of instruction defs */ - PDefRecord IDefs; /* table of IDefs entries */ - - Int maxFunc; - Int maxIns; - - Int callTop, /* top of call stack during execution */ - callSize; /* size of call stack */ - PCallStack callStack; /* call stack */ - - UShort maxPoints; /* capacity of this context's "pts" */ - UShort maxContours; /* record, expressed in points and */ - /* contours.. */ - - TCodeRangeTable codeRangeTable; /* table of valid coderanges */ - /* useful for the debugger */ - - ULong storeSize; /* size of current storage */ - PLong storage; /* storage area */ - - TT_F26Dot6 period; /* values used for the */ - TT_F26Dot6 phase; /* 'SuperRounding' */ - TT_F26Dot6 threshold; - - /* this seems to be unused */ -#if 0 - Int cur_ppem; /* ppem along the current proj vector */ -#endif - Long scale1; /* scaling values along the current */ - Long scale2; /* projection vector too.. */ - Bool cached_metrics; /* the ppem is computed lazily. used */ - /* to trigger computation when needed */ - - Bool instruction_trap; /* If True, the interpreter will */ - /* exit after each instruction */ - - TGraphicsState default_GS; /* graphics state resulting from */ - /* the prep program */ - Bool is_composite; /* ture if the glyph is composite */ - - Bool pedantic_hinting; /* if true, read and write array */ - /* bounds faults halt the hinting */ - - /* latest interpreter additions */ - - Long F_dot_P; /* dot product of freedom and projection */ - /* vectors */ - TRound_Function func_round; /* current rounding function */ - - TProject_Function func_project, /* current projection function */ - func_dualproj, /* current dual proj. function */ - func_freeProj; /* current freedom proj. func */ - - TMove_Function func_move; /* current point move function */ - - TGet_CVT_Function func_read_cvt; /* read a cvt entry */ - TSet_CVT_Function func_write_cvt; /* write a cvt entry (in pixels) */ - TSet_CVT_Function func_move_cvt; /* incr a cvt entry (in pixels) */ - - ULong loadSize; - PSubglyph_Stack loadStack; /* loading subglyph stack */ - - }; - - - /***********************************************************************/ - /* */ - /* FreeType Glyph Object Type */ - /* */ - /***********************************************************************/ - - struct TGlyph_ - { - PFace face; - TT_Big_Glyph_Metrics metrics; - TT_Outline outline; - }; - - - /* The following type is used to load a font from a collection. */ - /* See Face_Create in ttobjs.c */ - - struct TFont_Input_ - { - TT_Stream stream; /* input stream */ - ULong fontIndex; /* index of font in collection */ - PEngine_Instance engine; /* parent engine instance */ - - }; - - typedef struct TFont_Input_ TFont_Input; - -#if !defined(FTXCMAP_H) && !defined(FTXSBIT_H) - - /********************************************************************/ - /* */ - /* Code Range Functions */ - /* */ - /********************************************************************/ - - /* Goto a specified coderange */ - LOCAL_DEF - TT_Error Goto_CodeRange( PExecution_Context exec, - Int range, - ULong IP ); - -#if 0 - /* Return a pointer to a given coderange record. */ - /* Used only by the debugger. */ - LOCAL_DEF - PCodeRange Get_CodeRange( PExecution_Context exec, - Int range ); -#endif - - /* Set a given code range properties */ - LOCAL_DEF - TT_Error Set_CodeRange( PExecution_Context exec, - Int range, - void* base, - ULong length ); - - /* Clear a given coderange */ - LOCAL_DEF - TT_Error Clear_CodeRange( PExecution_Context exec, Int range ); - - - LOCAL_DEF - PExecution_Context New_Context( PFace face ); - - LOCAL_DEF - TT_Error Done_Context( PExecution_Context exec ); - - - LOCAL_DEF - TT_Error Context_Load( PExecution_Context exec, - PFace face, - PInstance ins ); - - LOCAL_DEF - TT_Error Context_Save( PExecution_Context exec, - PInstance ins ); - - LOCAL_DEF - TT_Error Context_Run( PExecution_Context exec, - Bool debug ); - - LOCAL_DEF - TT_Error Instance_Init( PInstance ins ); - - LOCAL_DEF - TT_Error Instance_Reset( PInstance ins ); - - - /********************************************************************/ - /* */ - /* Handy scaling functions */ - /* */ - /********************************************************************/ - - LOCAL_DEF TT_Pos Scale_X( PIns_Metrics metrics, TT_Pos x ); - LOCAL_DEF TT_Pos Scale_Y( PIns_Metrics metrics, TT_Pos y ); - - /********************************************************************/ - /* */ - /* Component Initializer/Finalizer */ - /* */ - /* Called from 'freetype.c' */ - /* The component must create and register the face, instance and */ - /* execution context cache classes before any object can be */ - /* managed. */ - /* */ - /********************************************************************/ - - LOCAL_DEF TT_Error TTObjs_Init( PEngine_Instance engine ); - LOCAL_DEF TT_Error TTObjs_Done( PEngine_Instance engine ); - -#endif /* !FTXCMAP_H && !FTXSBIT */ - -#ifdef __cplusplus - } -#endif - -#endif /* TTOBJS_H */ - - -/* END */ Index: xc/extras/FreeType/lib/ttraster.c diff -u xc/extras/FreeType/lib/ttraster.c:1.1.1.3 xc/extras/FreeType/lib/ttraster.c:removed --- xc/extras/FreeType/lib/ttraster.c:1.1.1.3 Sat Feb 12 23:55:48 2000 +++ xc/extras/FreeType/lib/ttraster.c Wed Mar 16 20:59:40 2005 @@ -1,2727 +0,0 @@ -/******************************************************************* - * - * ttraster.c 1.5 - * - * The FreeType glyph rasterizer (body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES: - * - * This version supports the following: - * - * - direct grayscaling - * - sub-banding - * - drop-out modes 4 and 5 - * - second pass for complete drop-out control (bitmap only) - * - variable precision - * - * Changes between 1.5 and 1.4: - * - * Performance tuning. - * - * Changes between 1.4 and 1.3: - * - * Mainly performance tunings: - * - * - Line_Down() and Bezier_Down() now use the functions Line_Up() - * and Bezier_Up() to do their work. - * - optimized Split_Bezier() - * - optimized linked lists used during sweeps - * - ******************************************************************/ - -#include "ttraster.h" -#include "ttdebug.h" -#include "tttypes.h" -#include "ttengine.h" -#include "ttcalc.h" /* for TT_MulDiv only */ - -#include "ttmemory.h" /* only used to allocate memory on engine init */ - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_raster - - -/* The default render pool size */ -#define RASTER_RENDER_POOL 64000 - -/* The size of the two-lines intermediate bitmap used */ -/* for anti-aliasing */ -#define RASTER_GRAY_LINES 2048 - - -#define Raster_Err_None TT_Err_Ok -#define Raster_Err_Not_Ini TT_Err_Raster_Not_Initialized -#define Raster_Err_Overflow TT_Err_Raster_Pool_Overflow -#define Raster_Err_Neg_Height TT_Err_Raster_Negative_Height -#define Raster_Err_Invalid TT_Err_Raster_Invalid_Value -#define Raster_Err_Gray_Unsupported TT_Err_Raster_Gray_Unsupported - - -/* FMulDiv means "Fast MulDiv", it is uses in case where 'b' is typically */ -/* a small value and the result of (a*b) is known to fit in 32 bits. */ -#define FMulDiv( a, b, c ) ( (a) * (b) / (c) ) - -/* On the other hand, SMulDiv is for "Slow MulDiv", and is used typically */ -/* for clipping computations. It simply uses the TT_MulDiv() function */ -/* defined in "ttcalc.h" */ -/* */ -/* So, the following definition fits the bill nicely, and we don't need */ -/* to use the one in 'ttcalc' anymore, even for 16-bit systems... */ -#define SMulDiv TT_MulDiv - - -/* Define DEBUG_RASTER if you want to generate a debug version of the */ -/* rasterizer. This will progressively draw the glyphs while all the */ -/* computation are done directly on the graphics screen (the glyphs */ -/* will be inverted). */ - -/* Note that DEBUG_RASTER should only be used for debugging with b/w */ -/* rendering, not with gray levels. */ - -/* The definition of DEBUG_RASTER should appear in the file */ -/* "ttconfig.h". */ - -#ifdef DEBUG_RASTER - extern Char* Vio; /* A pointer to VRAM or display buffer */ -#endif - - -/* The rasterizer is a very general purpose component, please leave */ -/* the following redefinitions there (you never know your target */ -/* environment). */ - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef NULL -#define NULL (void*)0 -#endif - -#define MaxBezier 32 /* The maximum number of stacked Bezier curves. */ - /* Setting this constant to more than 32 is a */ - /* pure waste of space. */ - -#define Pixel_Bits 6 /* fractional bits of *input* coordinates */ - - /* States of each line, arc and profile */ - enum TStates_ - { - Unknown, - Ascending, - Descending, - Flat - }; - - typedef enum TStates_ TStates; - - struct TProfile_; - typedef struct TProfile_ TProfile; - typedef TProfile* PProfile; - - struct TProfile_ - { - TT_F26Dot6 X; /* current coordinate during sweep */ - PProfile link; /* link to next profile - various purpose */ - PStorage offset; /* start of profile's data in render pool */ - Int flow; /* Profile orientation: Asc/Descending */ - Long height; /* profile's height in scanlines */ - Long start; /* profile's starting scanline */ - - UShort countL; /* number of lines to step before this */ - /* profile becomes drawable */ - - PProfile next; /* next profile in same contour, used */ - /* during drop-out control */ - }; - - typedef PProfile TProfileList; - typedef PProfile* PProfileList; - - - /* I use the classic trick of two dummy records for the head and tail */ - /* of a linked list; this reduces tests in insertion/deletion/sorting. */ - /* NOTE: used during sweeps only. */ - - /* Simple record used to implement a stack of bands, required */ - /* by the sub-banding mechanism */ - - struct TBand_ - { - Short y_min; /* band's minimum */ - Short y_max; /* band's maximum */ - }; - - typedef struct TBand_ TBand; - - -#define AlignProfileSize \ - (( sizeof(TProfile)+sizeof(long)-1 ) / sizeof(long)) - - - /* Left fill bitmask */ - static const Byte LMask[8] = - { 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 }; - - /* Right fill bitmask */ - static const Byte RMask[8] = - { 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF }; - - /* prototypes used for sweep function dispatch */ - typedef void Function_Sweep_Init( RAS_ARGS Short* min, - Short* max ); - - typedef void Function_Sweep_Span( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ); - - typedef void Function_Sweep_Step( RAS_ARG ); - - -/* NOTE: These operations are only valid on 2's complement processors */ - -#define FLOOR( x ) ( (x) & -ras.precision ) -#define CEILING( x ) ( ((x) + ras.precision - 1) & -ras.precision ) -#define TRUNC( x ) ( (signed long)(x) >> ras.precision_bits ) -#define FRAC( x ) ( (x) & (ras.precision - 1) ) -#define SCALED( x ) ( ((x) << ras.scale_shift) - ras.precision_half ) - -#ifdef DEBUG_RASTER -#define DEBUG_PSET Pset() -#else -#define DEBUG_PSET -#endif - - struct TPoint_ - { - Long x, y; - }; - - typedef struct TPoint_ TPoint; - - - /* Note that I have moved the location of some fields in the */ - /* structure to ensure that the most used variables are used */ - /* at the top. Thus, their offset can be coded with less */ - /* opcodes, and it results in a smaller executable. */ - - struct TRaster_Instance_ - { - Int precision_bits; /* precision related variables */ - Int precision; - Int precision_half; - Long precision_mask; - Int precision_shift; - Int precision_step; - Int precision_jitter; - - Int scale_shift; /* == precision_shift for bitmaps */ - /* == precision_shift+1 for pixmaps */ - - PStorage buff; /* The profiles buffer */ - PStorage sizeBuff; /* Render pool size */ - PStorage maxBuff; /* Profiles buffer size */ - PStorage top; /* Current cursor in buffer */ - - TT_Error error; - - PByte flags; /* current flags table */ - PUShort outs; /* current outlines table */ - - UShort nPoints; /* number of points in current glyph */ - Short nContours; /* number of contours in current glyph */ - Int numTurns; /* number of Y-turns in outline */ - - TPoint* arc; /* current Bezier arc pointer */ - - UShort bWidth; /* target bitmap width */ - PByte bTarget; /* target bitmap buffer */ - PByte gTarget; /* target pixmap buffer */ - - Long lastX, lastY, minY, maxY; - - UShort num_Profs; /* current number of profiles */ - - Bool fresh; /* signals a fresh new profile which */ - /* 'start' field must be completed */ - Bool joint; /* signals that the last arc ended */ - /* exactly on a scanline. Allows */ - /* removal of doublets */ - PProfile cProfile; /* current profile */ - PProfile fProfile; /* head of linked list of profiles */ - PProfile gProfile; /* contour's first profile in case */ - /* of impact */ - TStates state; /* rendering state */ - - TT_Raster_Map target; /* description of target bit/pixmap */ - - Long traceOfs; /* current offset in target bitmap */ - Long traceG; /* current offset in target pixmap */ - - Short traceIncr; /* sweep's increment in target bitmap */ - - Short gray_min_x; /* current min x during gray rendering */ - Short gray_max_x; /* current max x during gray rendering */ - - /* dispatch variables */ - - Function_Sweep_Init* Proc_Sweep_Init; - Function_Sweep_Span* Proc_Sweep_Span; - Function_Sweep_Span* Proc_Sweep_Drop; - Function_Sweep_Step* Proc_Sweep_Step; - - TT_Vector* coords; - - Byte dropOutControl; /* current drop_out control method */ - - Byte grays[5]; /* Palette of gray levels used for render */ - - Byte* gray_lines; /* Intermediate table used to render the */ - /* graylevels pixmaps. */ - /* gray_lines is a buffer holding two */ - /* monochrome scanlines */ - Short gray_width; /* width in bytes of one monochrome */ - /* intermediate scanline of gray_lines. */ - /* Each gray pixel takes 2 bits long there */ - - /* The gray_lines must hold 2 lines, thus with size */ - /* in bytes of at least 'gray_width*2' */ - - Bool second_pass; /* indicates wether a horizontal pass */ - /* should be performed to control drop-out */ - /* accurately when calling Render_Glyph. */ - /* Note that there is no horizontal pass */ - /* during gray rendering. */ - TPoint arcs[2 * MaxBezier + 1]; /* The Bezier stack */ - - TBand band_stack[16]; /* band stack used for sub-banding */ - Int band_top; /* band stack top */ - - Int count_table[256]; /* Look-up table used to quickly count */ - /* set bits in a gray 2x2 cell */ - }; - - -#ifdef TT_CONFIG_OPTION_STATIC_RASTER - - static TRaster_Instance cur_ras; -#define ras cur_ras - -#else - -#define ras (*raster) - -#endif /* TT_STATIC_RASTER */ - - -#ifdef DEBUG_RASTER - - /************************************************/ - /* */ - /* Pset: */ - /* */ - /* Used for debugging only. Plots a point */ - /* in VRAM during rendering (not afterwards). */ - /* */ - /* NOTE: This procedure relies on the value */ - /* of cProfile->start, which may not */ - /* be set when Pset is called sometimes. */ - /* This will usually result in a dot */ - /* plotted on the first screen scanline */ - /* (far away its original position). */ - /* */ - /* This "bug" reflects nothing wrong */ - /* in the current implementation, and */ - /* the bitmap is rendered correctly, */ - /* so don't panic if you see 'flying' */ - /* dots in debugging mode. */ - /* */ - /* - David */ - /* */ - /************************************************/ - - static void Pset( RAS_ARG ) - { - Long o; - Long x; - - - x = ras.top[-1]; - - switch ( ras.cProfile->flow ) - { - case TT_Flow_Up: - o = Vio_ScanLineWidth * - ( ras.top-ras.cProfile->offset + ras.cProfile->start ) + - ( x / (ras.precision*8) ); - break; - - case TT_Flow_Down: - o = Vio_ScanLineWidth * - ( ras.cProfile->start-ras.top + ras.cProfile->offset ) + - ( x / (ras.precision*8) ); - break; - } - - if ( o > 0 ) - Vio[o] |= (unsigned)0x80 >> ( (x/ras.precision) & 7 ); - } - - - static void Clear_Band( RAS_ARGS Int y1, Int y2 ) - { - MEM_Set( Vio + y1*Vio_ScanLineWidth, (y2-y1+1)*Vio_ScanLineWidth, 0 ); - } - -#endif /* DEBUG_RASTER */ - - -/************************************************************************/ -/* */ -/* Function: Set_High_Precision */ -/* */ -/* Description: Sets precision variables according to param flag. */ -/* */ -/* Input: High set to True for high precision (typically for */ -/* ppem < 18), false otherwise. */ -/* */ -/************************************************************************/ - - static void Set_High_Precision( RAS_ARGS Bool High ) - { - if ( High ) - { - ras.precision_bits = 10; - ras.precision_step = 128; - ras.precision_jitter = 24; - } - else - { - ras.precision_bits = 6; - ras.precision_step = 32; - ras.precision_jitter = 2; - } - - PTRACE7(( "Set_High_Precision(%s)\n", High ? "true" : "false" )); - - ras.precision = 1 << ras.precision_bits; - ras.precision_half = ras.precision / 2; - ras.precision_shift = ras.precision_bits - Pixel_Bits; - ras.precision_mask = -ras.precision; - } - - -/****************************************************************************/ -/* */ -/* Function: New_Profile */ -/* */ -/* Description: Creates a new Profile in the render pool. */ -/* */ -/* Input: aState state/orientation of the new Profile */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE in case of overflow or of incoherent Profile. */ -/* */ -/****************************************************************************/ - - static Bool New_Profile( RAS_ARGS TStates aState ) - { - if ( !ras.fProfile ) - { - ras.cProfile = (PProfile)ras.top; - ras.fProfile = ras.cProfile; - ras.top += AlignProfileSize; - } - - if ( ras.top >= ras.maxBuff ) - { - ras.error = Raster_Err_Overflow; - return FAILURE; - } - - switch ( aState ) - { - case Ascending: - ras.cProfile->flow = TT_Flow_Up; - PTRACE7(( "New ascending profile = %lx\n", (long)ras.cProfile )); - break; - - case Descending: - ras.cProfile->flow = TT_Flow_Down; - PTRACE7(( "New descending profile = %lx\n", (long)ras.cProfile )); - break; - - default: - PTRACE0(( "Invalid profile direction in Raster:New_Profile !!\n" )); - ras.error = Raster_Err_Invalid; - return FAILURE; - } - - ras.cProfile->start = 0; - ras.cProfile->height = 0; - ras.cProfile->offset = ras.top; - ras.cProfile->link = (PProfile)0; - ras.cProfile->next = (PProfile)0; - - if ( !ras.gProfile ) - ras.gProfile = ras.cProfile; - - ras.state = aState; - ras.fresh = TRUE; - ras.joint = FALSE; - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: End_Profile */ -/* */ -/* Description: Finalizes the current Profile. */ -/* */ -/* Input: None */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE in case of overflow or incoherency. */ -/* */ -/****************************************************************************/ - - static Bool End_Profile( RAS_ARG ) - { - Long h; - PProfile oldProfile; - - - h = ras.top - ras.cProfile->offset; - - if ( h < 0 ) - { - PTRACE0(( "Negative height encountered in End_Profile!\n" )); - ras.error = Raster_Err_Neg_Height; - return FAILURE; - } - - if ( h > 0 ) - { - PTRACE1(( "Ending profile %lx, start = %ld, height = %ld\n", - (long)ras.cProfile, ras.cProfile->start, h )); - - oldProfile = ras.cProfile; - ras.cProfile->height = h; - ras.cProfile = (PProfile)ras.top; - - ras.top += AlignProfileSize; - - ras.cProfile->height = 0; - ras.cProfile->offset = ras.top; - oldProfile->next = ras.cProfile; - ras.num_Profs++; - } - - if ( ras.top >= ras.maxBuff ) - { - PTRACE1(( "overflow in End_Profile\n" )); - ras.error = Raster_Err_Overflow; - return FAILURE; - } - - ras.joint = FALSE; - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Insert_Y_Turn */ -/* */ -/* Description: Insert a salient into the sorted list placed on top */ -/* of the render pool */ -/* */ -/* Input: New y scanline position */ -/* */ -/****************************************************************************/ - - static - Bool Insert_Y_Turn( RAS_ARGS Int y ) - { - PStorage y_turns; - Int y2, n; - - n = ras.numTurns-1; - y_turns = ras.sizeBuff - ras.numTurns; - - /* look for first y value that is <= */ - while ( n >= 0 && y < y_turns[n] ) - n--; - - /* if it is <, simply insert it, ignore if == */ - if ( n >= 0 && y > y_turns[n] ) - while ( n >= 0 ) - { - y2 = y_turns[n]; - y_turns[n] = y; - y = y2; - n--; - } - - if ( n < 0 ) - { - if (ras.maxBuff <= ras.top) - { - ras.error = Raster_Err_Overflow; - return FAILURE; - } - ras.maxBuff--; - ras.numTurns++; - ras.sizeBuff[-ras.numTurns] = y; - } - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Finalize_Profile_Table */ -/* */ -/* Description: Adjusts all links in the Profiles list. */ -/* */ -/* Input: None */ -/* */ -/* Returns: None. */ -/* */ -/****************************************************************************/ - - static - Bool Finalize_Profile_Table( RAS_ARG ) - { - Int bottom, top; - UShort n; - PProfile p; - - - n = ras.num_Profs; - - if ( n > 1 ) - { - p = ras.fProfile; - while ( n > 0 ) - { - if ( n > 1 ) - p->link = (PProfile)( p->offset + p->height ); - else - p->link = NULL; - - switch ( p->flow ) - { - case TT_Flow_Down: - bottom = p->start - p->height+1; - top = p->start; - p->start = bottom; - p->offset += p->height-1; - break; - - case TT_Flow_Up: - default: - bottom = p->start; - top = p->start + p->height-1; - } - - if ( Insert_Y_Turn( RAS_VARS bottom ) || - Insert_Y_Turn( RAS_VARS top+1 ) ) - return FAILURE; - - p = p->link; - n--; - } - } - else - ras.fProfile = NULL; - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Split_Bezier */ -/* */ -/* Description: Subdivides one Bezier arc into two joint */ -/* sub-arcs in the Bezier stack. */ -/* */ -/* Input: None (subdivided bezier is taken from the top of the */ -/* stack). */ -/* */ -/* Returns: None. */ -/* */ -/* */ -/* Note: This routine is the 'beef' of this component. It is _the_ */ -/* inner loop that should be optimized to hell to get the */ -/* best performance. */ -/* */ -/****************************************************************************/ - - static void Split_Bezier( TPoint* base ) - { - Long a, b; - - - base[4].x = base[2].x; - b = base[1].x; - a = base[3].x = ( base[2].x + b ) / 2; - b = base[1].x = ( base[0].x + b ) / 2; - base[2].x = ( a + b ) / 2; - - base[4].y = base[2].y; - b = base[1].y; - a = base[3].y = ( base[2].y + b ) / 2; - b = base[1].y = ( base[0].y + b ) / 2; - base[2].y = ( a + b ) / 2; - - /* hand optimized. gcc doesn't seem too good at common expression */ - /* substitution and instruction scheduling ;-) */ - } - - -/****************************************************************************/ -/* */ -/* Function: Push_Bezier */ -/* */ -/* Description: Clears the Bezier stack and pushes a new arc on top of it. */ -/* */ -/* Input: x1,y1 x2,y2 x3,y3 new Bezier arc */ -/* */ -/* Returns: None. */ -/* */ -/****************************************************************************/ - - static void Push_Bezier( RAS_ARGS Long x1, Long y1, - Long x2, Long y2, - Long x3, Long y3 ) - { - ras.arc = ras.arcs; - ras.arc[2].x = x1; ras.arc[2].y = y1; - ras.arc[1].x = x2; ras.arc[1].y = y2; - ras.arc[0].x = x3; ras.arc[0].y = y3; - } - - -/****************************************************************************/ -/* */ -/* Function: Line_Up */ -/* */ -/* Description: Computes the x-coordinates of an ascending line segment */ -/* and stores them in the render pool. */ -/* */ -/* Input: x1,y1,x2,y2 Segment start (x1,y1) and end (x2,y2) points */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on Render Pool overflow. */ -/* */ -/****************************************************************************/ - - static Bool Line_Up( RAS_ARGS Long x1, Long y1, - Long x2, Long y2, - Long miny, Long maxy ) - { - Long Dx, Dy; - Int e1, e2, f1, f2, size; /* XXX: is `Short' sufficient? */ - Long Ix, Rx, Ax; - - PStorage top; - - - Dx = x2 - x1; - Dy = y2 - y1; - - if ( Dy <= 0 || y2 < miny || y1 > maxy ) - return SUCCESS; - - if ( y1 < miny ) - { - /* Take care : miny-y1 can be a very large value, we use */ - /* a slow MulDiv function to avoid clipping bugs */ - x1 += SMulDiv( Dx, miny - y1, Dy ); - e1 = TRUNC( miny ); - f1 = 0; - } - else - { - e1 = TRUNC( y1 ); - f1 = FRAC( y1 ); - } - - if ( y2 > maxy ) - { - /* x2 += FMulDiv( Dx, maxy - y2, Dy ); UNNECESSARY */ - e2 = TRUNC( maxy ); - f2 = 0; - } - else - { - e2 = TRUNC( y2 ); - f2 = FRAC( y2 ); - } - - if ( f1 > 0 ) - { - if ( e1 == e2 ) return SUCCESS; - else - { - x1 += FMulDiv( Dx, ras.precision - f1, Dy ); - e1 += 1; - } - } - else - if ( ras.joint ) - { - ras.top--; - ras.joint = FALSE; - } - - ras.joint = ( f2 == 0 ); - - if ( ras.fresh ) - { - ras.cProfile->start = e1; - ras.fresh = FALSE; - } - - size = e2 - e1 + 1; - if ( ras.top + size >= ras.maxBuff ) - { - ras.error = Raster_Err_Overflow; - return FAILURE; - } - - if ( Dx > 0 ) - { - Ix = (ras.precision*Dx) / Dy; - Rx = (ras.precision*Dx) % Dy; - Dx = 1; - } - else - { - Ix = -( (ras.precision*-Dx) / Dy ); - Rx = (ras.precision*-Dx) % Dy; - Dx = -1; - } - - Ax = -Dy; - top = ras.top; - - while ( size > 0 ) - { - *top++ = x1; - - DEBUG_PSET; - - x1 += Ix; - Ax += Rx; - if ( Ax >= 0 ) - { - Ax -= Dy; - x1 += Dx; - } - size--; - } - - ras.top = top; - return SUCCESS; - } - - - static Bool Line_Down( RAS_ARGS Long x1, Long y1, - Long x2, Long y2, - Long miny, Long maxy ) - { - Bool result, fresh; - - - fresh = ras.fresh; - - result = Line_Up( RAS_VARS x1, -y1, x2, -y2, -maxy, -miny ); - - if ( fresh && !ras.fresh ) - ras.cProfile->start = -ras.cProfile->start; - - return result; - } - - -/****************************************************************************/ -/* */ -/* Function: Bezier_Up */ -/* */ -/* Description: Computes thes x-coordinates of an ascending bezier arc */ -/* and stores them in the render pool. */ -/* */ -/* Input: None. The arc is taken from the top of the Bezier stack. */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on Render Pool overflow. */ -/* */ -/****************************************************************************/ - - static Bool Bezier_Up( RAS_ARGS Long miny, Long maxy ) - { - Long y1, y2, e, e2, e0; - Short f1; - - TPoint* arc; - TPoint* start_arc; - - PStorage top; - - - arc = ras.arc; - y1 = arc[2].y; - y2 = arc[0].y; - top = ras.top; - - if ( y2 < miny || y1 > maxy ) - goto Fin; - - e2 = FLOOR( y2 ); - - if ( e2 > maxy ) - e2 = maxy; - - e0 = miny; - - if ( y1 < miny ) - e = miny; - else - { - e = CEILING( y1 ); - f1 = FRAC( y1 ); - e0 = e; - - if ( f1 == 0 ) - { - if ( ras.joint ) - { - top--; - ras.joint = FALSE; - } - - *top++ = arc[2].x; - - DEBUG_PSET; - - e += ras.precision; - } - } - - if ( ras.fresh ) - { - ras.cProfile->start = TRUNC( e0 ); - ras.fresh = FALSE; - } - - if ( e2 < e ) - goto Fin; - - if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) - { - ras.top = top; - ras.error = Raster_Err_Overflow; - return FAILURE; - } - - start_arc = arc; - - while ( arc >= start_arc && e <= e2 ) - { - ras.joint = FALSE; - - y2 = arc[0].y; - - if ( y2 > e ) - { - y1 = arc[2].y; - if ( y2 - y1 >= ras.precision_step ) - { - Split_Bezier( arc ); - arc += 2; - } - else - { - *top++ = arc[2].x + FMulDiv( arc[0].x - arc[2].x, - e - y1, - y2 - y1 ); - DEBUG_PSET; - - arc -= 2; - e += ras.precision; - } - } - else - { - if ( y2 == e ) - { - ras.joint = TRUE; - *top++ = arc[0].x; - - DEBUG_PSET; - - e += ras.precision; - } - arc -= 2; - } - } - - Fin: - ras.top = top; - ras.arc -= 2; - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Bezier_Down */ -/* */ -/* Description: Computes the x-coordinates of a descending bezier arc */ -/* and stores them in the render pool. */ -/* */ -/* Input: None. Arc is taken from the top of the Bezier stack. */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on Render Pool overflow. */ -/* */ -/****************************************************************************/ - - static Bool Bezier_Down( RAS_ARGS Long miny, Long maxy ) - { - TPoint* arc = ras.arc; - Bool result, fresh; - - - arc[0].y = -arc[0].y; - arc[1].y = -arc[1].y; - arc[2].y = -arc[2].y; - - fresh = ras.fresh; - - result = Bezier_Up( RAS_VARS -maxy, -miny ); - - if ( fresh && !ras.fresh ) - ras.cProfile->start = -ras.cProfile->start; - - arc[0].y = -arc[0].y; - return result; - } - - -/****************************************************************************/ -/* */ -/* Function: Line_To */ -/* */ -/* Description: Injects a new line segment and adjusts Profiles list. */ -/* */ -/* Input: x, y : segment endpoint (start point in LastX,LastY) */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on Render Pool overflow or Incorrect Profile. */ -/* */ -/****************************************************************************/ - - static Bool Line_To( RAS_ARGS Long x, Long y ) - { - /* First, detect a change of direction */ - - switch ( ras.state ) - { - case Unknown: - if ( y > ras.lastY ) - { - if ( New_Profile( RAS_VARS Ascending ) ) return FAILURE; - } - else - { - if ( y < ras.lastY ) - if ( New_Profile( RAS_VARS Descending ) ) return FAILURE; - } - break; - - case Ascending: - if ( y < ras.lastY ) - { - if ( End_Profile( RAS_VAR ) || - New_Profile( RAS_VARS Descending ) ) return FAILURE; - } - break; - - case Descending: - if ( y > ras.lastY ) - { - if ( End_Profile( RAS_VAR ) || - New_Profile( RAS_VARS Ascending ) ) return FAILURE; - } - break; - - default: - ; - } - - /* Then compute the lines */ - - switch ( ras.state ) - { - case Ascending: - if ( Line_Up ( RAS_VARS ras.lastX, ras.lastY, - x, y, ras.minY, ras.maxY ) ) - return FAILURE; - break; - - case Descending: - if ( Line_Down( RAS_VARS ras.lastX, ras.lastY, - x, y, ras.minY, ras.maxY ) ) - return FAILURE; - break; - - default: - ; - } - - ras.lastX = x; - ras.lastY = y; - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Bezier_To */ -/* */ -/* Description: Injects a new bezier arc and adjusts the profile list. */ -/* */ -/* Input: x, y : arc endpoint (start point in LastX, LastY) */ -/* Cx, Cy : control point */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on Render Pool overflow or Incorrect Profile. */ -/* */ -/****************************************************************************/ - - static Bool Bezier_To( RAS_ARGS Long x, - Long y, - Long cx, - Long cy ) - { - Long y1, y2, y3, x3; - TStates state_bez; - - - Push_Bezier( RAS_VARS ras.lastX, ras.lastY, cx, cy, x, y ); - - do - { - y1 = ras.arc[2].y; - y2 = ras.arc[1].y; - y3 = ras.arc[0].y; - x3 = ras.arc[0].x; - - /* first, categorize the bezier arc */ - - if ( y1 == y2 ) - { - if ( y2 == y3 ) - state_bez = Flat; - else if ( y2 > y3 ) - state_bez = Descending; - else - state_bez = Ascending; - } - else if ( y1 > y2 ) - { - if ( y2 >= y3 ) - state_bez = Descending; - else - state_bez = Unknown; - } - else if ( y2 <= y3 ) - state_bez = Ascending; - else - state_bez = Unknown; - - /* split non-monotonic arcs, ignore flat ones, or */ - /* computes the up and down ones */ - - switch ( state_bez ) - { - case Flat: - ras.arc -= 2; - break; - - case Unknown: - Split_Bezier( ras.arc ); - ras.arc += 2; - break; - - default: - /* detect a change of direction */ - - if ( ras.state != state_bez ) - { - if ( ras.state != Unknown ) - if ( End_Profile( RAS_VAR ) ) return FAILURE; - - if ( New_Profile( RAS_VARS state_bez ) ) return FAILURE; - } - - /* compute */ - - switch ( ras.state ) - { - case Ascending: - if ( Bezier_Up ( RAS_VARS ras.minY, ras.maxY ) ) - return FAILURE; - break; - - case Descending: - if ( Bezier_Down( RAS_VARS ras.minY, ras.maxY ) ) - return FAILURE; - break; - - default: - ; - } - } - } while ( ras.arc >= ras.arcs ); - - ras.lastX = x3; - ras.lastY = y3; - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Decompose_Curve */ -/* */ -/* Description: Scans the outline arays in order to emit individual */ -/* segments and beziers by calling Line_To() and Bezier_To(). */ -/* It handles all weird cases, like when the first point */ -/* is off the curve, or when there are simply no 'on' */ -/* points in the contour! */ -/* */ -/* Input: first, last : indexes of first and last point in */ -/* contour. */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE on error. */ -/* */ -/****************************************************************************/ - -#undef SWAP_ -#define SWAP_(x,y) { Long swap = x; x = y; y = swap; } - - static Bool Decompose_Curve( RAS_ARGS UShort first, - UShort last, - Bool flipped ) - { - Long x, y; /* current point */ - Long cx, cy; /* current Bezier control point */ - Long mx, my; /* current middle point */ - - Long x_first, y_first; /* first point's coordinates */ - Long x_last, y_last; /* last point's coordinates */ - - UShort index; /* current point's index */ - Bool on_curve; /* current point's state */ - - x_first = SCALED( ras.coords[first].x ); - y_first = SCALED( ras.coords[first].y ); - - if ( flipped ) SWAP_( x_first,y_first ); - - x_last = SCALED( ras.coords[last].x ); - y_last = SCALED( ras.coords[last].y ); - - if ( flipped ) SWAP_( x_last,y_last ); - - ras.lastX = cx = x_first; - ras.lastY = cy = y_first; - - on_curve = (ras.flags[first] & 1); - index = first; - - /* check first point to determine origin */ - if ( !on_curve ) - { - /* first point is off the curve. Yes, this happens... */ - if ( ras.flags[last] & 1 ) - { - ras.lastX = x_last; /* start at last point if it */ - ras.lastY = y_last; /* is on the curve */ - } - else - { - /* if both first and last points are off the curve, */ - /* start at their middle and record its position */ - /* for closure */ - ras.lastX = (ras.lastX + x_last)/2; - ras.lastY = (ras.lastY + y_last)/2; - - x_last = ras.lastX; - y_last = ras.lastY; - } - } - - /* now process each contour point individually */ - while ( index < last ) - { - index++; - x = SCALED( ras.coords[index].x ); - y = SCALED( ras.coords[index].y ); - - if ( flipped ) SWAP_( x, y ); - - if ( on_curve ) - { - /* the previous point was on the curve */ - on_curve = ( ras.flags[index] & 1 ); - if ( on_curve ) - { - /* two successive on points => emit segment */ - if ( Line_To( RAS_VARS x, y ) ) return FAILURE; - } - else - { - /* else, keep current control point for next bezier */ - cx = x; - cy = y; - } - } - else - { - /* the previous point was off the curve */ - on_curve = ( ras.flags[index] & 1 ); - if ( on_curve ) - { - /* reaching an `on' point */ - if ( Bezier_To( RAS_VARS x, y, cx, cy ) ) return FAILURE; - } - else - { - /* two successive `off' points => create middle point */ - mx = ( cx + x ) / 2; - my = ( cy + y ) / 2; - - if ( Bezier_To( RAS_VARS mx, my, cx, cy ) ) return FAILURE; - - cx = x; - cy = y; - } - } - } - - /* end of contour, close curve cleanly */ - if ( ras.flags[first] & 1 ) - { - if ( on_curve ) - return Line_To( RAS_VARS x_first, y_first ); - else - return Bezier_To( RAS_VARS x_first, y_first, cx, cy ); - } - else - if ( !on_curve ) - return Bezier_To( RAS_VARS x_last, y_last, cx, cy ); - - return SUCCESS; - } - - -/****************************************************************************/ -/* */ -/* Function: Convert_Glyph */ -/* */ -/* Description: Converts a glyph into a series of segments and arcs */ -/* and makes a Profiles list with them. */ -/* */ -/* Input: _xCoord, _yCoord : coordinates tables. */ -/* */ -/* Uses the 'Flag' table too. */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE if any error was encountered during rendering. */ -/* */ -/****************************************************************************/ - - static Bool Convert_Glyph( RAS_ARGS int flipped ) - { - Short i; - UShort start; - - PProfile lastProfile; - - - ras.fProfile = NULL; - ras.joint = FALSE; - ras.fresh = FALSE; - - ras.maxBuff = ras.sizeBuff - AlignProfileSize; - - ras.numTurns = 0; - - ras.cProfile = (PProfile)ras.top; - ras.cProfile->offset = ras.top; - ras.num_Profs = 0; - - start = 0; - - for ( i = 0; i < ras.nContours; i++ ) - { - ras.state = Unknown; - ras.gProfile = NULL; - - if ( Decompose_Curve( RAS_VARS start, ras.outs[i], flipped ) ) - return FAILURE; - - start = ras.outs[i] + 1; - - /* We must now see if the extreme arcs join or not */ - if ( ( FRAC( ras.lastY ) == 0 && - ras.lastY >= ras.minY && - ras.lastY <= ras.maxY ) ) - if ( ras.gProfile && ras.gProfile->flow == ras.cProfile->flow ) - ras.top--; - /* Note that ras.gProfile can be nil if the contour was too small */ - /* to be drawn. */ - - lastProfile = ras.cProfile; - if ( End_Profile( RAS_VAR ) ) return FAILURE; - - /* close the 'next profile in contour' linked list */ - if ( ras.gProfile ) - lastProfile->next = ras.gProfile; - } - - if (Finalize_Profile_Table( RAS_VAR )) - return FAILURE; - - return (ras.top < ras.maxBuff ? SUCCESS : FAILURE ); - } - - -/************************************************/ -/* */ -/* Init_Linked */ -/* */ -/* Inits an empty linked list. */ -/* */ -/************************************************/ - - static void Init_Linked( TProfileList* l ) - { - *l = NULL; - } - - -/************************************************/ -/* */ -/* InsNew : */ -/* */ -/* Inserts a new Profile in a linked list. */ -/* */ -/************************************************/ - - static void InsNew( PProfileList list, - PProfile profile ) - { - PProfile *old, current; - Long x; - - - old = list; - current = *old; - x = profile->X; - - while ( current ) - { - if ( x < current->X ) - break; - old = ¤t->link; - current = *old; - } - - profile->link = current; - *old = profile; - } - - -/*************************************************/ -/* */ -/* DelOld : */ -/* */ -/* Removes an old Profile from a linked list. */ -/* */ -/*************************************************/ - - static void DelOld( PProfileList list, - PProfile profile ) - { - PProfile *old, current; - - - old = list; - current = *old; - - while ( current ) - { - if ( current == profile ) - { - *old = current->link; - return; - } - - old = ¤t->link; - current = *old; - } - - /* we should never get there, unless the Profile was not part of */ - /* the list. */ - } - - -/************************************************/ -/* */ -/* Update : */ -/* */ -/* Update all X offsets of a drawing list */ -/* */ -/************************************************/ - - static void Update( PProfile first ) - { - PProfile current = first; - - - while ( current ) - { - current->X = *current->offset; - current->offset += current->flow; - current->height--; - current = current->link; - } - } - - -/************************************************/ -/* */ -/* Sort : */ -/* */ -/* Sorts a trace list. In 95%, the list */ -/* is already sorted. We need an algorithm */ -/* which is fast in this case. Bubble sort */ -/* is enough and simple. */ -/* */ -/************************************************/ - - static void Sort( PProfileList list ) - { - PProfile *old, current, next; - - - /* First, set the new X coordinate of each profile */ - Update( *list ); - - /* Then sort them */ - old = list; - current = *old; - - if ( !current ) - return; - - next = current->link; - - while ( next ) - { - if ( current->X <= next->X ) - { - old = ¤t->link; - current = *old; - - if ( !current ) - return; - } - else - { - *old = next; - current->link = next->link; - next->link = current; - - old = list; - current = *old; - } - - next = current->link; - } - } - - -/***********************************************************************/ -/* */ -/* Vertical Sweep Procedure Set : */ -/* */ -/* These three routines are used during the vertical black/white */ -/* sweep phase by the generic Draw_Sweep() function. */ -/* */ -/***********************************************************************/ - - static void Vertical_Sweep_Init( RAS_ARGS Short* min, Short* max ) - { - switch ( ras.target.flow ) - { - case TT_Flow_Up: - ras.traceOfs = *min * ras.target.cols; - ras.traceIncr = ras.target.cols; - break; - - default: - ras.traceOfs = ( ras.target.rows - 1 - *min ) * ras.target.cols; - ras.traceIncr = -ras.target.cols; - } - - ras.gray_min_x = 0; - ras.gray_max_x = 0; - } - - - static void Vertical_Sweep_Span( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - Long e1, e2; - Short c1, c2; - Short f1, f2; - Byte* target; - - - /* Drop-out control */ - - e1 = TRUNC( CEILING( x1 ) ); - - if ( x2-x1-ras.precision <= ras.precision_jitter ) - e2 = e1; - else - e2 = TRUNC( FLOOR( x2 ) ); - - if ( e2 >= 0 && e1 < ras.bWidth ) - { - if ( e1 < 0 ) e1 = 0; - if ( e2 >= ras.bWidth ) e2 = ras.bWidth-1; - - c1 = (Short)(e1 >> 3); - c2 = (Short)(e2 >> 3); - - f1 = e1 & 7; - f2 = e2 & 7; - - if ( ras.gray_min_x > c1 ) ras.gray_min_x = c1; - if ( ras.gray_max_x < c2 ) ras.gray_max_x = c2; - - target = ras.bTarget + ras.traceOfs + c1; - - if ( c1 != c2 ) - { - *target |= LMask[f1]; - - if ( c2 > c1 + 1 ) - MEM_Set( target + 1, 0xFF, c2 - c1 - 1 ); - - target[c2 - c1] |= RMask[f2]; - } - else - *target |= ( LMask[f1] & RMask[f2] ); - } - } - - - static void Vertical_Sweep_Drop( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - Long e1, e2; - Short c1, f1; - - - /* Drop-out control */ - - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - - if ( e1 > e2 ) - { - if ( e1 == e2 + ras.precision ) - { - switch ( ras.dropOutControl ) - { - case 1: - e1 = e2; - break; - - case 4: - e1 = CEILING( (x1 + x2 + 1) / 2 ); - break; - - case 2: - case 5: - /* Drop-out Control Rule #4 */ - - /* The spec is not very clear regarding rule #4. It */ - /* presents a method that is way too costly to implement */ - /* while the general idea seems to get rid of 'stubs'. */ - /* */ - /* Here, we only get rid of stubs recognized when: */ - /* */ - /* upper stub: */ - /* */ - /* - P_Left and P_Right are in the same contour */ - /* - P_Right is the successor of P_Left in that contour */ - /* - y is the top of P_Left and P_Right */ - /* */ - /* lower stub: */ - /* */ - /* - P_Left and P_Right are in the same contour */ - /* - P_Left is the successor of P_Right in that contour */ - /* - y is the bottom of P_Left */ - /* */ - - /* FIXXXME : uncommenting this line solves the disappearing */ - /* bit problem in the '7' of verdana 10pts, but */ - /* makes a new one in the 'C' of arial 14pts */ - - /* if ( x2-x1 < ras.precision_half ) */ - { - /* upper stub test */ - - if ( left->next == right && left->height <= 0 ) return; - - /* lower stub test */ - - if ( right->next == left && left->start == y ) return; - } - - /* check that the rightmost pixel isn't set */ - - e1 = TRUNC( e1 ); - - c1 = (Short)(e1 >> 3); - f1 = e1 & 7; - - if ( e1 >= 0 && e1 < ras.bWidth && - ras.bTarget[ras.traceOfs + c1] & (0x80 >> f1) ) - return; - - if ( ras.dropOutControl == 2 ) - e1 = e2; - else - e1 = CEILING( (x1 + x2 + 1) / 2 ); - - break; - - default: - return; /* unsupported mode */ - } - } - else - return; - } - - e1 = TRUNC( e1 ); - - if ( e1 >= 0 && e1 < ras.bWidth ) - { - c1 = (Short)(e1 >> 3); - f1 = e1 & 7; - - if ( ras.gray_min_x > c1 ) ras.gray_min_x = c1; - if ( ras.gray_max_x < c1 ) ras.gray_max_x = c1; - - ras.bTarget[ras.traceOfs + c1] |= (Char)(0x80 >> f1); - } - } - - - static void Vertical_Sweep_Step( RAS_ARG ) - { - ras.traceOfs += ras.traceIncr; - } - - -/***********************************************************************/ -/* */ -/* Horizontal Sweep Procedure Set : */ -/* */ -/* These three routines are used during the horizontal black/white */ -/* sweep phase by the generic Draw_Sweep() function. */ -/* */ -/***********************************************************************/ - - static void Horizontal_Sweep_Init( RAS_ARGS Short* min, Short* max ) - { - /* nothing, really */ - } - - - static void Horizontal_Sweep_Span( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - Long e1, e2; - PByte bits; - Byte f1; - - - if ( x2-x1 < ras.precision ) - { - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - - if ( e1 == e2 ) - { - bits = ras.bTarget + (y >> 3); - f1 = (Byte)(0x80 >> (y & 7)); - - e1 = TRUNC( e1 ); - - if ( e1 >= 0 && e1 < ras.target.rows ) - { - if ( ras.target.flow == TT_Flow_Down ) - bits[(ras.target.rows-1 - e1) * ras.target.cols] |= f1; - else - bits[e1 * ras.target.cols] |= f1; - } - } - } -#if 0 - e2 = TRUNC( e2 ); - - if ( e2 >= 0 && e2 < ras.target.rows ) - if ( ras.target.flow == TT_Flow_Down ) - bits[(ras.target.rows-1-e2) * ras.target.cols] |= f1; - else - bits[e2 * ras.target.cols] |= f1; -#endif - } - - - static void Horizontal_Sweep_Drop( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - Long e1, e2; - PByte bits; - Byte f1; - - - /* During the horizontal sweep, we only take care of drop-outs */ - - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - - if ( e1 > e2 ) - { - if ( e1 == e2 + ras.precision ) - { - switch ( ras.dropOutControl ) - { - case 1: - e1 = e2; - break; - - case 4: - e1 = CEILING( (x1 + x2 + 1) / 2 ); - break; - - case 2: - case 5: - - /* Drop-out Control Rule #4 */ - - /* The spec is not very clear regarding rule #4. It */ - /* presents a method that is way too costly to implement */ - /* while the general idea seems to get rid of 'stubs'. */ - /* */ - - /* rightmost stub test */ - - if ( left->next == right && left->height <= 0 ) return; - - /* leftmost stub test */ - - if ( right->next == left && left->start == y ) return; - - /* check that the rightmost pixel isn't set */ - - e1 = TRUNC( e1 ); - - bits = ras.bTarget + (y >> 3); - f1 = (Byte)(0x80 >> (y & 7)); - - if ( ras.target.flow == TT_Flow_Down ) - bits += (ras.target.rows-1-e1) * ras.target.cols; - else - bits += e1 * ras.target.cols; - - if ( e1 >= 0 && - e1 < ras.target.rows && - *bits & f1 ) - return; - - if ( ras.dropOutControl == 2 ) - e1 = e2; - else - e1 = CEILING( (x1 + x2 + 1) / 2 ); - - break; - - default: - return; /* unsupported mode */ - } - } - else - return; - } - - bits = ras.bTarget + (y >> 3); - f1 = (Byte)(0x80 >> (y & 7)); - - e1 = TRUNC( e1 ); - - if ( e1 >= 0 && e1 < ras.target.rows ) - { - if (ras.target.flow==TT_Flow_Down) - bits[(ras.target.rows-1-e1) * ras.target.cols] |= f1; - else - bits[e1 * ras.target.cols] |= f1; - } - } - - - static void Horizontal_Sweep_Step( RAS_ARG ) - { - /* Nothing, really */ - } - - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - -/***********************************************************************/ -/* */ -/* Vertical Gray Sweep Procedure Set: */ -/* */ -/* These two routines are used during the vertical gray-levels */ -/* sweep phase by the generic Draw_Sweep() function. */ -/* */ -/* */ -/* NOTES: */ -/* */ -/* - The target pixmap's width *must* be a multiple of 4. */ -/* */ -/* - you have to use the function Vertical_Sweep_Span() for */ -/* the gray span call. */ -/* */ -/***********************************************************************/ - - static void Vertical_Gray_Sweep_Init( RAS_ARGS Short* min, Short* max ) - { - *min = *min & -2; - *max = ( *max + 3 ) & -2; - - ras.traceOfs = 0; - - switch ( ras.target.flow ) - { - case TT_Flow_Up: - ras.traceG = (*min / 2) * ras.target.cols; - ras.traceIncr = ras.target.cols; - break; - - default: - ras.traceG = (ras.target.rows-1 - *min/2) * ras.target.cols; - ras.traceIncr = -ras.target.cols; - } - - ras.gray_min_x = ras.target.cols; - ras.gray_max_x = -ras.target.cols; - } - - - static void Vertical_Gray_Sweep_Step( RAS_ARG ) - { - Int c1, c2; - PByte pix, bit, bit2; - Int* count = ras.count_table; - Byte* grays; - - - ras.traceOfs += ras.gray_width; - - if ( ras.traceOfs > ras.gray_width ) - { - pix = ras.gTarget + ras.traceG + ras.gray_min_x * 4; - grays = ras.grays; - - if ( ras.gray_max_x >= 0 ) - { - if ( ras.gray_max_x >= ras.target.width ) - ras.gray_max_x = ras.target.width-1; - - if ( ras.gray_min_x < 0 ) - ras.gray_min_x = 0; - - bit = ras.bTarget + ras.gray_min_x; - bit2 = bit + ras.gray_width; - - c1 = ras.gray_max_x - ras.gray_min_x; - - while ( c1 >= 0 ) - { - c2 = count[*bit] + count[*bit2]; - - if ( c2 ) - { - pix[0] = grays[(c2 & 0xF000) >> 12]; - pix[1] = grays[(c2 & 0x0F00) >> 8]; - pix[2] = grays[(c2 & 0x00F0) >> 4]; - pix[3] = grays[(c2 & 0x000F) ]; - - *bit = 0; - *bit2 = 0; - } - - bit ++; - bit2++; - pix += 4; - c1 --; - } - } - - ras.traceOfs = 0; - ras.traceG += ras.traceIncr; - - ras.gray_min_x = ras.target.cols; - ras.gray_max_x = -ras.target.cols; - } - } - - - static void Horizontal_Gray_Sweep_Span( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - /* nothing, really */ - } - - static void Horizontal_Gray_Sweep_Drop( RAS_ARGS Short y, - TT_F26Dot6 x1, - TT_F26Dot6 x2, - PProfile left, - PProfile right ) - { - Long e1, e2; - PByte pixel; - Byte color; - - - /* During the horizontal sweep, we only take care of drop-outs */ - e1 = CEILING( x1 ); - e2 = FLOOR ( x2 ); - - if ( e1 > e2 ) - { - if ( e1 == e2 + ras.precision ) - { - switch ( ras.dropOutControl ) - { - case 1: - e1 = e2; - break; - - case 4: - e1 = CEILING( (x1 + x2 + 1) / 2 ); - break; - - case 2: - case 5: - - /* Drop-out Control Rule #4 */ - - /* The spec is not very clear regarding rule #4. It */ - /* presents a method that is way too costly to implement */ - /* while the general idea seems to get rid of 'stubs'. */ - /* */ - - /* rightmost stub test */ - if ( left->next == right && left->height <= 0 ) return; - - /* leftmost stub test */ - if ( right->next == left && left->start == y ) return; - - if ( ras.dropOutControl == 2 ) - e1 = e2; - else - e1 = CEILING( (x1 + x2 + 1) / 2 ); - - break; - - default: - return; /* unsupported mode */ - } - } - else - return; - } - - if ( e1 >= 0 ) - { - if ( x2 - x1 >= ras.precision_half ) - color = ras.grays[2]; - else - color = ras.grays[1]; - - e1 = TRUNC( e1 ) / 2; - if ( e1 < ras.target.rows ) - { - if ( ras.target.flow == TT_Flow_Down ) - pixel = ras.gTarget + - (ras.target.rows - 1 - e1) * ras.target.cols + y / 2; - else - pixel = ras.gTarget + - e1 * ras.target.cols + y / 2; - - if (pixel[0] == ras.grays[0]) - pixel[0] = color; - } - } - } - -#endif /* TT_CONFIG_OPTION_GRAY_SCALING */ - - -/********************************************************************/ -/* */ -/* Generic Sweep Drawing routine */ -/* */ -/********************************************************************/ - - static Bool Draw_Sweep( RAS_ARG ) - { - Short y, y_change, y_height; - - PProfile P, Q, P_Left, P_Right; - - Short min_Y, max_Y, top, bottom, dropouts; - - Long x1, x2, xs, e1, e2; - - TProfileList wait; - TProfileList draw_left, draw_right; - - - /* Init empty linked lists */ - - Init_Linked( &wait ); - - Init_Linked( &draw_left ); - Init_Linked( &draw_right ); - - /* first, compute min and max Y */ - - P = ras.fProfile; - max_Y = (short)TRUNC( ras.minY ); - min_Y = (short)TRUNC( ras.maxY ); - - while ( P ) - { - Q = P->link; - - bottom = P->start; - top = P->start + P->height-1; - - if ( min_Y > bottom ) min_Y = bottom; - if ( max_Y < top ) max_Y = top; - - P->X = 0; - InsNew( &wait, P ); - - P = Q; - } - - /* Check the Y-turns */ - if ( ras.numTurns == 0 ) - { - ras.error = Raster_Err_Invalid; - return FAILURE; - } - - /* Now inits the sweep */ - - ras.Proc_Sweep_Init( RAS_VARS &min_Y, &max_Y ); - - /* Then compute the distance of each profile from min_Y */ - - P = wait; - - while ( P ) - { - P->countL = P->start - min_Y; - P = P->link; - } - - /* Let's go */ - - y = min_Y; - y_height = 0; - - if ( ras.numTurns > 0 && - ras.sizeBuff[-ras.numTurns] == min_Y ) - ras.numTurns--; - - while ( ras.numTurns > 0 ) - { - /* look in the wait list for new activations */ - - P = wait; - - while ( P ) - { - Q = P->link; - P->countL -= y_height; - if ( P->countL == 0 ) - { - DelOld( &wait, P ); - - switch ( P->flow ) - { - case TT_Flow_Up: InsNew( &draw_left, P ); break; - case TT_Flow_Down: InsNew( &draw_right, P ); break; - } - } - - P = Q; - } - - /* Sort the drawing lists */ - - Sort( &draw_left ); - Sort( &draw_right ); - - y_change = (Short)ras.sizeBuff[-ras.numTurns--]; - y_height = y_change - y; - - while ( y < y_change ) - { - - /* Let's trace */ - - dropouts = 0; - - P_Left = draw_left; - P_Right = draw_right; - - while ( P_Left ) - { - x1 = P_Left ->X; - x2 = P_Right->X; - - if ( x1 > x2 ) - { - xs = x1; - x1 = x2; - x2 = xs; - } - - if ( x2-x1 <= ras.precision ) - { - e1 = FLOOR( x1 ); - e2 = CEILING( x2 ); - - if ( ras.dropOutControl != 0 && - (e1 > e2 || e2 == e1 + ras.precision) ) - { - /* a drop out was detected */ - - P_Left ->X = x1; - P_Right->X = x2; - - /* mark profile for drop-out processing */ - P_Left->countL = 1; - dropouts++; - - goto Skip_To_Next; - } - } - - ras.Proc_Sweep_Span( RAS_VARS y, x1, x2, P_Left, P_Right ); - - Skip_To_Next: - - P_Left = P_Left->link; - P_Right = P_Right->link; - } - - /* now perform the dropouts _after_ the span drawing */ - /* drop-outs processing has been moved out of the loop */ - /* for performance tuning */ - if (dropouts > 0) - goto Scan_DropOuts; - - Next_Line: - - ras.Proc_Sweep_Step( RAS_VAR ); - - y++; - - if ( y < y_change ) - { - Sort( &draw_left ); - Sort( &draw_right ); - } - - } - - /* Now finalize the profiles that needs it */ - - { - PProfile Q, P; - P = draw_left; - while ( P ) - { - Q = P->link; - if ( P->height == 0 ) - DelOld( &draw_left, P ); - P = Q; - } - } - - { - PProfile Q, P = draw_right; - while ( P ) - { - Q = P->link; - if ( P->height == 0 ) - DelOld( &draw_right, P ); - P = Q; - } - } - } - - /* for gray-scaling, flushes the bitmap scanline cache */ - while ( y <= max_Y ) - { - ras.Proc_Sweep_Step( RAS_VAR ); - y++; - } - - return SUCCESS; - -Scan_DropOuts : - - P_Left = draw_left; - P_Right = draw_right; - - while ( P_Left ) - { - if ( P_Left->countL ) - { - P_Left->countL = 0; - /* dropouts--; -- this is useful when debugging only */ - ras.Proc_Sweep_Drop( RAS_VARS y, - P_Left->X, - P_Right->X, - P_Left, - P_Right ); - } - - P_Left = P_Left->link; - P_Right = P_Right->link; - } - - goto Next_Line; - } - - -/****************************************************************************/ -/* */ -/* Function: Render_Single_Pass */ -/* */ -/* Description: Performs one sweep with sub-banding. */ -/* */ -/* Input: _XCoord, _YCoord : x and y coordinates arrays */ -/* */ -/* Returns: SUCCESS on success */ -/* FAILURE if any error was encountered during render. */ -/* */ -/****************************************************************************/ - - static TT_Error Render_Single_Pass( RAS_ARGS Bool flipped ) - { - Short i, j, k; - - - while ( ras.band_top >= 0 ) - { - ras.maxY = (Long)ras.band_stack[ras.band_top].y_max * ras.precision; - ras.minY = (Long)ras.band_stack[ras.band_top].y_min * ras.precision; - - ras.top = ras.buff; - - ras.error = Raster_Err_None; - - if ( Convert_Glyph( RAS_VARS flipped ) ) - { - if ( ras.error != Raster_Err_Overflow ) return FAILURE; - - ras.error = Raster_Err_None; - - /* sub-banding */ - -#ifdef DEBUG_RASTER - ClearBand( RAS_VARS TRUNC( ras.minY ), TRUNC( ras.maxY ) ); -#endif - - i = ras.band_stack[ras.band_top].y_min; - j = ras.band_stack[ras.band_top].y_max; - - k = ( i + j ) / 2; - - if ( ras.band_top >= 7 || k < i ) - { - ras.band_top = 0; - ras.error = Raster_Err_Invalid; - return ras.error; - } - - ras.band_stack[ras.band_top+1].y_min = k; - ras.band_stack[ras.band_top+1].y_max = j; - - ras.band_stack[ras.band_top].y_max = k - 1; - - ras.band_top++; - } - else - { - if ( ras.fProfile ) - if ( Draw_Sweep( RAS_VAR ) ) return ras.error; - ras.band_top--; - } - } - - return TT_Err_Ok; - } - - -/****************************************************************************/ -/* */ -/* Function: Render_Glyph */ -/* */ -/* Description: Renders a glyph in a bitmap. Sub-banding if needed. */ -/* */ -/* Input: AGlyph Glyph record */ -/* */ -/* Returns: SUCCESS on success. */ -/* FAILURE if any error was encountered during rendering. */ -/* */ -/****************************************************************************/ - - LOCAL_FUNC - TT_Error Render_Glyph( RAS_ARGS TT_Outline* glyph, - TT_Raster_Map* target_map ) - { - TT_Error error; - - - if ( glyph->n_points == 0 || glyph->n_contours <= 0 ) - return TT_Err_Ok; - - if ( !ras.buff ) - { - ras.error = Raster_Err_Not_Ini; - return ras.error; - } - - if ( glyph->n_points < glyph->contours[glyph->n_contours - 1] ) - { - ras.error = TT_Err_Too_Many_Points; - return ras.error; - } - - if ( target_map ) - ras.target = *target_map; - - ras.outs = glyph->contours; - ras.flags = glyph->flags; - ras.nPoints = glyph->n_points; - ras.nContours = glyph->n_contours; - ras.coords = glyph->points; - - Set_High_Precision( RAS_VARS glyph->high_precision ); - ras.scale_shift = ras.precision_shift; - ras.dropOutControl = glyph->dropout_mode; - ras.second_pass = glyph->second_pass; - - - /* Vertical Sweep */ - ras.Proc_Sweep_Init = Vertical_Sweep_Init; - ras.Proc_Sweep_Span = Vertical_Sweep_Span; - ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; - ras.Proc_Sweep_Step = Vertical_Sweep_Step; - - ras.band_top = 0; - ras.band_stack[0].y_min = 0; - ras.band_stack[0].y_max = ras.target.rows - 1; - - ras.bWidth = ras.target.width; - ras.bTarget = (Byte*)ras.target.bitmap; - - if ( (error = Render_Single_Pass( RAS_VARS 0 )) != 0 ) - return error; - - /* Horizontal Sweep */ - - if ( ras.second_pass && ras.dropOutControl != 0 ) - { - ras.Proc_Sweep_Init = Horizontal_Sweep_Init; - ras.Proc_Sweep_Span = Horizontal_Sweep_Span; - ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop; - ras.Proc_Sweep_Step = Horizontal_Sweep_Step; - - ras.band_top = 0; - ras.band_stack[0].y_min = 0; - ras.band_stack[0].y_max = ras.target.width - 1; - - if ( (error = Render_Single_Pass( RAS_VARS 1 )) != 0 ) - return error; - } - - return TT_Err_Ok; - } - - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - -/****************************************************************************/ -/* */ -/* Function: Render_Gray_Glyph */ -/* */ -/* Description: Renders a glyph with grayscaling. Sub-banding if needed. */ -/* */ -/* Input: AGlyph Glyph record */ -/* */ -/* Returns: SUCCESS on success */ -/* FAILURE if any error was encountered during rendering. */ -/* */ -/****************************************************************************/ - - LOCAL_FUNC - TT_Error Render_Gray_Glyph( RAS_ARGS TT_Outline* glyph, - TT_Raster_Map* target_map, - Byte* palette ) - { - Int i; - TT_Error error; - - if ( !ras.buff ) - { - ras.error = Raster_Err_Not_Ini; - return ras.error; - } - - if ( glyph->n_points == 0 || glyph->n_contours <= 0 ) - return TT_Err_Ok; - - if ( glyph->n_points < glyph->contours[glyph->n_contours - 1] ) - { - ras.error = TT_Err_Too_Many_Points; - return ras.error; - } - - if ( palette ) - { - for ( i = 0; i < 5; i++ ) - ras.grays[i] = palette[i]; - } - - if ( target_map ) - ras.target = *target_map; - - ras.outs = glyph->contours; - ras.flags = glyph->flags; - ras.nPoints = glyph->n_points; - ras.nContours = glyph->n_contours; - ras.coords = glyph->points; - - Set_High_Precision( RAS_VARS glyph->high_precision ); - ras.scale_shift = ras.precision_shift+1; - ras.dropOutControl = glyph->dropout_mode; - ras.second_pass = glyph->second_pass; - - - /* Vertical Sweep */ - - ras.band_top = 0; - ras.band_stack[0].y_min = 0; - ras.band_stack[0].y_max = 2 * ras.target.rows - 1; - - ras.bWidth = ras.gray_width; - if ( ras.bWidth > ras.target.cols/4 ) - ras.bWidth = ras.target.cols/4; - - ras.bWidth = ras.bWidth * 8; - ras.bTarget = (Byte*)ras.gray_lines; - ras.gTarget = (Byte*)ras.target.bitmap; - - ras.Proc_Sweep_Init = Vertical_Gray_Sweep_Init; - ras.Proc_Sweep_Span = Vertical_Sweep_Span; - ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; - ras.Proc_Sweep_Step = Vertical_Gray_Sweep_Step; - - error = Render_Single_Pass( RAS_VARS 0 ); - if (error) - return error; - - /* Horizontal Sweep */ - - if ( ras.second_pass && ras.dropOutControl != 0 ) - { - ras.Proc_Sweep_Init = Horizontal_Sweep_Init; - ras.Proc_Sweep_Span = Horizontal_Gray_Sweep_Span; - ras.Proc_Sweep_Drop = Horizontal_Gray_Sweep_Drop; - ras.Proc_Sweep_Step = Horizontal_Sweep_Step; - - ras.band_top = 0; - ras.band_stack[0].y_min = 0; - ras.band_stack[0].y_max = ras.target.width * 2 - 1; - - error = Render_Single_Pass( RAS_VARS 1 ); - if (error) - return error; - } - - return TT_Err_Ok; - } - -#endif /* TT_CONFIG_OPTION_GRAY_SCALING */ - - -/************************************************/ -/* */ -/* InitRasterizer */ -/* */ -/* Raster Initialization. */ -/* Gets the bitmap description and render pool */ -/* addresses. */ -/* */ -/************************************************/ - -#undef ras - - LOCAL_FUNC - TT_Error TTRaster_Done( PEngine_Instance engine ) - { - TRaster_Instance* ras = (TRaster_Instance*)engine->raster_component; - - - if ( !ras ) - return TT_Err_Ok; - - FREE( ras->buff ); - FREE( ras->gray_lines ); - -#ifndef TT_CONFIG_OPTION_STATIC_RASTER - FREE( engine->raster_component ); -#endif - - return TT_Err_Ok; - } - - - LOCAL_FUNC - TT_Error TTRaster_Init( PEngine_Instance engine ) - { - TT_Error error; - - Int i, l, j, c; - - TRaster_Instance* ras; - - -#ifdef TT_CONFIG_OPTION_STATIC_RASTER - ras = engine->raster_component = &cur_ras; -#else - if ( ALLOC( engine->raster_component, sizeof ( TRaster_Instance ) ) ) - return error; - - ras = (TRaster_Instance*)engine->raster_component; -#endif - - if ( ALLOC( ras->buff, RASTER_RENDER_POOL ) || - ALLOC( ras->gray_lines, RASTER_GRAY_LINES ) ) - return error; - - ras->sizeBuff = ras->buff + ( RASTER_RENDER_POOL/sizeof(long) ); - ras->gray_width = RASTER_GRAY_LINES/2; - - /* Initialization of Count_Table */ - - for ( i = 0; i < 256; i++ ) - { - l = 0; - j = i; - - for ( c = 0; c < 4; c++ ) - { - l <<= 4; - - if ( j & 0x80 ) l++; - if ( j & 0x40 ) l++; - - j = ( j << 2 ) & 0xFF; - } - - ras->count_table[i] = l; - } - - ras->dropOutControl = 2; - ras->error = Raster_Err_None; - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/ttraster.h diff -u xc/extras/FreeType/lib/ttraster.h:1.1.1.2 xc/extras/FreeType/lib/ttraster.h:removed --- xc/extras/FreeType/lib/ttraster.h:1.1.1.2 Sat Feb 12 23:55:49 2000 +++ xc/extras/FreeType/lib/ttraster.h Wed Mar 16 20:59:40 2005 @@ -1,127 +0,0 @@ -/******************************************************************* - * - * ttraster.h v 1.4 - * - * The FreeType glyph rasterizer. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES: - * - * This version supports the following: - * - * - direct grayscaling - * - sub-banding - * - drop-out modes 4 and 5 - * - second pass for complete drop-out control (bitmap only) - * - variable precision - * - * - * Changes between 1.4 and 1.3: - * - * Mainly performance tunings: - * - * - Line_Down() and Bezier_Down() now use the functions Line_Up() - * and Bezier_Up() to do their work. - * - optimized Split_Bezier() - * - optimized linked lists used during sweeps - * - * Changes between 1.2 and 1.3: - * - * - made the engine optionaly re-entrant. Saves a lot - * of code for a moderate performance hit. - * - ******************************************************************/ - -#ifndef TTRASTER_H -#define TTRASTER_H - -#include "ttconfig.h" -#include "freetype.h" /* for TT_Outline */ -#include "ttengine.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /* We provide two different builds of the scan-line converter */ - /* The static build uses global variables and isn't */ - /* re-entrant. */ - /* The indirect build is re-entrant but accesses all variables */ - /* indirectly. */ - /* */ - /* As a consequence, the indirect build is about 10% slower */ - /* than the static one on a _Pentium_ (this could get worse */ - /* on older processors), but the code size is reduced by */ - /* more than 30% ! */ - /* */ - /* The indirect build is now the default, defined in */ - /* ttconfig.h. Be careful if you experiment with this. */ - - /* Note also that, though its code can be re-entrant, the */ - /* component is always used in thread-safe mode. This is */ - /* simply due to the fact that we want to use a single */ - /* render pool (of 64 Kb), and not to waste memory. */ - -#ifdef TT_STATIC_RASTER - -#define RAS_ARGS /* void */ -#define RAS_ARG /* void */ - -#define RAS_VARS /* void */ -#define RAS_VAR /* void */ - -#else - -#define RAS_ARGS TRaster_Instance* raster, -#define RAS_ARG TRaster_Instance* raster - -#define RAS_VARS raster, -#define RAS_VAR raster - -#endif - - - struct TRaster_Instance_; - typedef struct TRaster_Instance_ TRaster_Instance; - - /* Render one glyph in the target bitmap, using drop-out control */ - /* mode 'scan'. */ - LOCAL_DEF - TT_Error Render_Glyph( RAS_ARGS TT_Outline* glyph, - TT_Raster_Map* target ); - -#ifdef TT_CONFIG_OPTION_GRAY_SCALING - /* Render one gray-level glyph in the target pixmap. */ - /* Palette points to an array of 5 colors used for the rendering. */ - /* Use NULL to reuse the last palette. Default is VGA graylevels. */ - LOCAL_DEF - TT_Error Render_Gray_Glyph( RAS_ARGS TT_Outline* glyph, - TT_Raster_Map* target, - Byte* palette ); -#endif - - /* Initialize rasterizer */ - LOCAL_DEF - TT_Error TTRaster_Init( PEngine_Instance engine ); - - /* Finalize it */ - LOCAL_DEF - TT_Error TTRaster_Done( PEngine_Instance engine ); - - -#ifdef __cplusplus -} -#endif - -#endif /* TTRASTER_H */ - - -/* END */ Index: xc/extras/FreeType/lib/tttables.h diff -u xc/extras/FreeType/lib/tttables.h:1.1.1.3 xc/extras/FreeType/lib/tttables.h:removed --- xc/extras/FreeType/lib/tttables.h:1.1.1.3 Sat Feb 12 23:55:49 2000 +++ xc/extras/FreeType/lib/tttables.h Wed Mar 16 20:59:40 2005 @@ -1,215 +0,0 @@ -/******************************************************************* - * - * tttables.h 1.1 - * - * TrueType Tables structures and handling (specification). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef TTTABLES_H -#define TTTABLES_H - -#include "ttconfig.h" -#include "tttypes.h" - -#ifdef __cplusplus - extern "C" { -#endif - - /***********************************************************************/ - /* */ - /* TrueType Table Types */ - /* */ - /***********************************************************************/ - - /* TrueType Collection Header */ - - struct TTTCHeader_ - { - ULong Tag; - TT_Fixed version; - ULong DirCount; - PULong TableDirectory; - }; - - typedef struct TTTCHeader_ TTTCHeader; - typedef TTTCHeader* PTTCHeader; - - - /* TrueType Table Directory type */ - - struct TTableDir_ - { - TT_Fixed version; /* should be 0x10000 */ - UShort numTables; /* number of tables */ - - UShort searchRange; /* These parameters are only used */ - UShort entrySelector; /* for a dichotomy search in the */ - UShort rangeShift; /* directory. We ignore them. */ - }; - - typedef struct TTableDir_ TTableDir; - typedef TTableDir* PTableDir; - - - /* The 'TableDir' is followed by 'numTables' TableDirEntries */ - - struct TTableDirEntry_ - { - ULong Tag; /* table type */ - ULong CheckSum; /* table checksum */ - ULong Offset; /* table file offset */ - ULong Length; /* table length */ - }; - - typedef struct TTableDirEntry_ TTableDirEntry; - typedef TTableDirEntry* PTableDirEntry; - - - /* 'cmap' tables */ - - struct TCMapDir_ - { - UShort tableVersionNumber; - UShort numCMaps; - }; - - typedef struct TCMapDir_ TCMapDir; - typedef TCMapDir* PCMapDir; - - struct TCMapDirEntry_ - { - UShort platformID; - UShort platformEncodingID; - Long offset; - }; - - typedef struct TCMapDirEntry_ TCMapDirEntry; - typedef TCMapDirEntry* PCMapDirEntries; - - - /* 'maxp' Maximum Profiles table */ - - struct TMaxProfile_ - { - TT_Fixed version; - UShort numGlyphs, - maxPoints, - maxContours, - maxCompositePoints, - maxCompositeContours, - maxZones, - maxTwilightPoints, - maxStorage, - maxFunctionDefs, - maxInstructionDefs, - maxStackElements, - maxSizeOfInstructions, - maxComponentElements, - maxComponentDepth; - }; - - typedef struct TMaxProfile_ TMaxProfile; - typedef TMaxProfile* PMaxProfile; - - - /* table "gasp" */ - -#define GASP_GRIDFIT 0x01 -#define GASP_DOGRAY 0x02 - - struct GaspRange_ - { - UShort maxPPEM; - UShort gaspFlag; - }; - - typedef struct GaspRange_ GaspRange; - - - struct TGasp_ - { - UShort version; - UShort numRanges; - GaspRange* gaspRanges; - }; - - typedef struct TGasp_ TGasp; - - - /* table "head" - now defined in freetype.h */ - /* table "hhea" - now defined in freetype.h */ - - - /* tables "HMTX" and "VMTX" */ - - struct TLongMetrics_ - { - UShort advance; - Short bearing; - }; - - typedef struct TLongMetrics_ TLongMetrics, *PLongMetrics; - - typedef Short TShortMetrics, *PShortMetrics; - - /* 'loca' location table type */ - - struct TLoca_ - { - UShort Size; - PStorage Table; - }; - - typedef struct TLoca_ TLoca; - - - /* table "name" */ - - struct TNameRec_ - { - UShort platformID; - UShort encodingID; - UShort languageID; - UShort nameID; - UShort stringLength; - UShort stringOffset; - - /* this last field is not defined in the spec */ - /* but used by the FreeType engine */ - - PByte string; - }; - - typedef struct TNameRec_ TNameRec; - - - struct TName_Table_ - { - UShort format; - UShort numNameRecords; - UShort storageOffset; - TNameRec* names; - PByte storage; - }; - - typedef struct TName_Table_ TName_Table; - - -#ifdef __cplusplus - } -#endif - -#endif /* TTTABLES_H */ - - -/* END */ Index: xc/extras/FreeType/lib/tttags.h diff -u xc/extras/FreeType/lib/tttags.h:1.1.1.2 xc/extras/FreeType/lib/tttags.h:removed --- xc/extras/FreeType/lib/tttags.h:1.1.1.2 Sat Feb 12 23:55:49 2000 +++ xc/extras/FreeType/lib/tttags.h Wed Mar 16 20:59:40 2005 @@ -1,61 +0,0 @@ -/******************************************************************* - * - * tttags.h - * - * tags for TrueType tables (specification only). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef TTAGS_H -#define TTAGS_H - -#include "ttconfig.h" -#include "freetype.h" /* for MAKE_TT_TAG() */ - -#define TTAG_BASE MAKE_TT_TAG( 'B', 'A', 'S', 'E' ) -#define TTAG_bloc MAKE_TT_TAG( 'b', 'l', 'o', 'c' ) -#define TTAG_bdat MAKE_TT_TAG( 'b', 'd', 'a', 't' ) -#define TTAG_cmap MAKE_TT_TAG( 'c', 'm', 'a', 'p' ) -#define TTAG_cvt MAKE_TT_TAG( 'c', 'v', 't', ' ' ) -#define TTAG_EBDT MAKE_TT_TAG( 'E', 'B', 'D', 'T' ) -#define TTAG_EBLC MAKE_TT_TAG( 'E', 'B', 'L', 'C' ) -#define TTAG_EBSC MAKE_TT_TAG( 'E', 'B', 'S', 'C' ) -#define TTAG_fpgm MAKE_TT_TAG( 'f', 'p', 'g', 'm' ) -#define TTAG_gasp MAKE_TT_TAG( 'g', 'a', 's', 'p' ) -#define TTAG_glyf MAKE_TT_TAG( 'g', 'l', 'y', 'f' ) -#define TTAG_GDEF MAKE_TT_TAG( 'G', 'D', 'E', 'F' ) -#define TTAG_GPOS MAKE_TT_TAG( 'G', 'P', 'O', 'S' ) -#define TTAG_GSUB MAKE_TT_TAG( 'G', 'S', 'U', 'B' ) -#define TTAG_hdmx MAKE_TT_TAG( 'h', 'd', 'm', 'x' ) -#define TTAG_head MAKE_TT_TAG( 'h', 'e', 'a', 'd' ) -#define TTAG_hhea MAKE_TT_TAG( 'h', 'h', 'e', 'a' ) -#define TTAG_hmtx MAKE_TT_TAG( 'h', 'm', 't', 'x' ) -#define TTAG_JSTF MAKE_TT_TAG( 'J', 'S', 'T', 'F' ) -#define TTAG_kern MAKE_TT_TAG( 'k', 'e', 'r', 'n' ) -#define TTAG_loca MAKE_TT_TAG( 'l', 'o', 'c', 'a' ) -#define TTAG_LTSH MAKE_TT_TAG( 'L', 'T', 'S', 'H' ) -#define TTAG_maxp MAKE_TT_TAG( 'm', 'a', 'x', 'p' ) -#define TTAG_name MAKE_TT_TAG( 'n', 'a', 'm', 'e' ) -#define TTAG_OS2 MAKE_TT_TAG( 'O', 'S', '/', '2' ) -#define TTAG_PCLT MAKE_TT_TAG( 'P', 'C', 'L', 'T' ) -#define TTAG_post MAKE_TT_TAG( 'p', 'o', 's', 't' ) -#define TTAG_prep MAKE_TT_TAG( 'p', 'r', 'e', 'p' ) -#define TTAG_ttc MAKE_TT_TAG( 't', 't', 'c', ' ' ) -#define TTAG_ttcf MAKE_TT_TAG( 't', 't', 'c', 'f' ) -#define TTAG_VDMX MAKE_TT_TAG( 'V', 'D', 'M', 'X' ) -#define TTAG_vhea MAKE_TT_TAG( 'v', 'h', 'e', 'a' ) -#define TTAG_vmtx MAKE_TT_TAG( 'v', 'm', 't', 'x' ) - -#endif /* TTAGS_H */ - - -/* END */ Index: xc/extras/FreeType/lib/tttypes.h diff -u xc/extras/FreeType/lib/tttypes.h:1.5 xc/extras/FreeType/lib/tttypes.h:removed --- xc/extras/FreeType/lib/tttypes.h:1.5 Sun Feb 13 00:03:53 2000 +++ xc/extras/FreeType/lib/tttypes.h Wed Mar 16 20:59:40 2005 @@ -1,154 +0,0 @@ -/******************************************************************* - * - * tttypes.h - * - * Freetype engine's common types specification - * (this spec has no associated body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTE: - * - * All these declarations are library internals, and *not* part - * of the high-level interface. See also 'freetype.h'. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/tttypes.h,v 1.5 2000/02/13 05:03:53 dawes Exp $ */ - -#ifndef TTTYPES_H -#define TTTYPES_H - -#include "ttconfig.h" -#include "freetype.h" - -#ifdef __MACTYPES__ -#error " have been included, and this prevents the proper\ - compilation of this library. Please remove the precompiled headers." -#endif - - typedef char String; - typedef signed char Char; - typedef unsigned char Byte; - - typedef unsigned short UShort; - typedef signed short Short; - - typedef unsigned long ULong; - typedef signed long Long; - - typedef TT_Int32 Fixed; - - typedef int Int; - - /* Simple access types: pointers and tables */ - - typedef Byte* PByte; - typedef UShort* PUShort; - typedef Short* PShort; - typedef ULong* PULong; - typedef Long* PLong; - - typedef Fixed* PFixed; - - typedef Int* PInt; - - typedef void* Pointer; - - typedef TT_F26Dot6* PCoordinates; - typedef unsigned char* PTouchTable; - - -/* Xserver-specific change */ -#if 0 -#ifndef Bool - typedef int Bool; /* No boolean type in C */ -#endif -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef NULL -#define NULL (void*)0 -#endif - - typedef Long Storage; - typedef Storage* PStorage; - - -/* Rounding mode constants */ - -#define TT_Round_Off 5 -#define TT_Round_To_Half_Grid 0 -#define TT_Round_To_Grid 1 -#define TT_Round_To_Double_Grid 2 -#define TT_Round_Up_To_Grid 4 -#define TT_Round_Down_To_Grid 3 -#define TT_Round_Super 6 -#define TT_Round_Super_45 7 - - -/* Touch flag masks */ - -#define TT_Flag_On_Curve 1 -#define TT_Flag_Touched_X 2 -#define TT_Flag_Touched_Y 4 -#define TT_Flag_Touched_Both 6 - - -/* Error management constants :) */ - -#define SUCCESS 0 -#define FAILURE -1 - - -/* The min and max functions missing in C. As usual, be careful not to */ -/* write things like MIN( a++, b++ ) to avoid side effects. */ - -#ifndef MIN -#define MIN( a, b ) ( (a) < (b) ? (a) : (b) ) -#endif - -#ifndef MAX -#define MAX( a, b ) ( (a) > (b) ? (a) : (b) ) -#endif - -#ifndef ABS -#define ABS( a ) ( (a) < 0 ? -(a) : (a) ) -#endif - -/* conversion macros for the handles defined in freetype.h */ - -#define HANDLE_Val( handle ) ((handle).z) - -#define HANDLE_Engine( handle ) ((PEngine_Instance)HANDLE_Val( handle )) - -#define HANDLE_Face( handle ) ((PFace)HANDLE_Val( handle )) - -#define HANDLE_Instance( handle ) ((PInstance)HANDLE_Val( handle )) - -/* HANDLE_Stream( handle ) must be defined in ttfile.c */ - -#define HANDLE_Glyph( handle ) ((PGlyph)HANDLE_Val( handle )) - -#define HANDLE_CharMap( handle ) ((PCMapTable)HANDLE_Val( handle )) - -#define HANDLE_Set( handle, val ) ((handle).z = (void*)(val)) - - -#endif /* TTTYPES_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/amigaos/Makefile.gcc diff -u xc/extras/FreeType/lib/arch/amigaos/Makefile.gcc:1.1.1.3 xc/extras/FreeType/lib/arch/amigaos/Makefile.gcc:removed --- xc/extras/FreeType/lib/arch/amigaos/Makefile.gcc:1.1.1.3 Sat Feb 12 23:55:50 2000 +++ xc/extras/FreeType/lib/arch/amigaos/Makefile.gcc Wed Mar 16 20:59:40 2005 @@ -1,69 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for amiga using ADE Enviroment. -# -# You will need GNU make. -# -# Use this file while in the lib directory with the following statement: -# -# make -f arch/amigaos/Makefile.gcc - -ARCH = arch/amigaos -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -AR = ar -RM = rm - -CC = gcc - -CFLAGS = -Wall -pedantic -ansi -O2 -g -noixemul -I$(ARCH) -I. -Iextend - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxgdef.c \ - extend/ftxopen.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttextend.c ttfile.c ttgload.c ttinterp.c ttload.c \ - ttmemory.c ttmutex.c ttobjs.c ttraster.c -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean - - -all: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M libttf.a - - -$(OBJ_S): $(SRC_S) $(SRC_M) - - -libttf.a: $($(LIB_FILES)) - $(AR) src $@ $^ - -clean: - $(RM) $($(LIB_FILES)) - -distclean: clean - $(RM) dep.end libttf.a - -depend: $(SRC_S) $(SRC_M) $(SRC_X) - $(CC) -E -M $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/lib/arch/amigaos/freetype.c diff -u xc/extras/FreeType/lib/arch/amigaos/freetype.c:1.1.1.2 xc/extras/FreeType/lib/arch/amigaos/freetype.c:removed --- xc/extras/FreeType/lib/arch/amigaos/freetype.c:1.1.1.2 Sat Feb 12 23:55:50 2000 +++ xc/extras/FreeType/lib/arch/amigaos/freetype.c Wed Mar 16 20:59:40 2005 @@ -1,25 +0,0 @@ -/* This file is part of the FreeType project */ - -/* Single object library component for AmigaOS */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttfile.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttmemory.c" -#include "ttmutex.c" -#include "ttobjs.c" -#include "ttraster.c" - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/amigaos/ft_conf.h diff -u xc/extras/FreeType/lib/arch/amigaos/ft_conf.h:1.1.1.3 xc/extras/FreeType/lib/arch/amigaos/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/amigaos/ft_conf.h:1.1.1.3 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/amigaos/ft_conf.h Wed Mar 16 20:59:40 2005 @@ -1,220 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for AmigaOS using ADE enviroment */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ - -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ - -/* #undef HAVE_MMAP */ - -/* Define if you have the header file. */ - -#define HAVE_STDLIB_H - -/* Define if the X Window System is missing or not being used. */ - -#define X_DISPLAY_MISSING - -/* The number of bytes in a int. */ - -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ - -#define SIZEOF_LONG 4 - -/* Define if you have the getpagesize function. */ - -#define HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ - -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ - -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ - -#define HAVE_VALLOC - -/* Define if you have the header file. */ - -#define HAVE_FCNTL_H - -/* Define if you have the header file. */ - -#define HAVE_UNISTD_H - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/ansi/freetype.c diff -u xc/extras/FreeType/lib/arch/ansi/freetype.c:1.1.1.1 xc/extras/FreeType/lib/arch/ansi/freetype.c:removed --- xc/extras/FreeType/lib/arch/ansi/freetype.c:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/ansi/freetype.c Wed Mar 16 20:59:40 2005 @@ -1,32 +0,0 @@ -/* This file is part of the FreeType project */ - -/* Single file library component for the ANSI target */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* first include common core components */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#include "ttfile.c" -#include "ttmemory.c" -#include "ttmutex.c" - -/* the extensions are compiled separately, but we need to */ -/* include the file ttextend.c if we want to support them */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - -/* END */ Index: xc/extras/FreeType/lib/arch/ansi/ft_conf.h diff -u xc/extras/FreeType/lib/arch/ansi/ft_conf.h:1.1.1.1 xc/extras/FreeType/lib/arch/ansi/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/ansi/ft_conf.h:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/ansi/ft_conf.h Wed Mar 16 20:59:40 2005 @@ -1,227 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for the ANSI Build */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. Unix-specific */ -#undef HAVE_FCNTL_H - -/* command.com can't pipe stderr into a file; any message would be */ -/* written into the graphics screen. */ -#define HAVE_PRINT_FUNCTION 1 - -#define Print( format, ap ) vfprintf( stdout, (format), (ap) ) - - -/* The number of bytes in a int. We use the ANSI header file limits.h */ -/* for determining it since there is no easy way to guess. */ -/* */ -#include -#if UINT_MAX == 0xFFFF -#define SIZEOF_INT 2 -#elif UINT_MAX == 0xFFFFFFFF -#define SIZEOF_INT 4 -#else -#error "Unsupported number of bytes in `int' type!" -#endif - -/* We now try to guess the size of longs in the same way */ -/* */ -#if ULONG_MAX == 0xFFFFFFFF -#define SIZEOF_LONG 4 -#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF -#define SIZEOF_LONG 8 -#else -#error "Unsupported number of bytes in `long' type!" -#endif - - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#define TT_CONFIG_OPTION_STATIC_RASTER - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/debugger/Makefile diff -u xc/extras/FreeType/lib/arch/debugger/Makefile:1.1.1.1 xc/extras/FreeType/lib/arch/debugger/Makefile:removed --- xc/extras/FreeType/lib/arch/debugger/Makefile:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/debugger/Makefile Wed Mar 16 20:59:40 2005 @@ -1,96 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc under OS/2 or under -# Unix with extra debugging capabilities. -# -# You will need GNU make. -# -# Use this file while in the lib directory with the following statement: -# -# make -f arch/debugger/Makefile - -ARCH = arch/debugger -FT_MAKEFILE = $(ARCH)/Makefile - -CC = gcc - -#CFLAGS = -W -Wall -O0 -g -ansi -pedantic -I$(ARCH) -I. -Iextend - -CFLAGS = -Wall -O0 -g -ansi -I$(ARCH) -I. -Iextend - -#CFLAGS = -Wall -ansi -pedantic -O2 -s -I$(ARCH) -I. -Iextend - -# Detect OS/2 to add the flag -DOS2 when compiling ttinterp.c -# -ifdef OS2_SHELL -OS := OS2 -RM := del -else -OS := UNIX # Unix build otherwise -RM := rm -f -endif - -TTFILE = ./ttfile.c -TTMEMORY = ./ttmemory.c -TTMUTEX = ./ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxopen.c \ - extend/ftxgdef.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c \ - ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - -# We place the library file in the ARCH directory, so that it doesn't -# interfere with the normal build. -# -LIBTTF_A = $(ARCH)/libttf.a - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< -D$(OS) - -.PHONY: all debug clean distclean depend - - -all: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S $(LIBTTF_A) - -debug: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M $(LIBTTF_A) - -$(OBJ_S): $(SRC_S) $(SRC_M) - -$(LIBTTF_A): $($(LIB_FILES)) - -$(RM) $@ - ar src $@ $^ - -clean: -ifdef OS2_SHELL - -$(RM) $(subst /,\,$(LIBTTF_A)) - -$(RM) $(subst /,\,$(OBJS_S)) -else - -$(RM) $(LIBTTF_A) - -$(RM) $(OBJS_S) -endif - -distclean: clean - -$(RM) dep.end - -depend: $(SRC_S) $(SRC_M) $(SRC_X) - $(CC) $(CFLAGS) -E -M $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile Index: xc/extras/FreeType/lib/arch/debugger/freetype.c diff -u xc/extras/FreeType/lib/arch/debugger/freetype.c:1.1.1.1 xc/extras/FreeType/lib/arch/debugger/freetype.c:removed --- xc/extras/FreeType/lib/arch/debugger/freetype.c:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/debugger/freetype.c Wed Mar 16 20:59:40 2005 @@ -1,32 +0,0 @@ -/* This file is part of the FreeType project */ - -/* Single file library component for the debugging target */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* first include common core components */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#include "ttfile.c" -#include "ttmemory.c" -#include "ttmutex.c" - -/* the extensions are compiled separately, but we need to */ -/* include the file ttextend.c if we want to support them */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - -/* END */ Index: xc/extras/FreeType/lib/arch/debugger/ft_conf.h diff -u xc/extras/FreeType/lib/arch/debugger/ft_conf.h:1.1.1.1 xc/extras/FreeType/lib/arch/debugger/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/debugger/ft_conf.h:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/debugger/ft_conf.h Wed Mar 16 20:59:40 2005 @@ -1,236 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for a debugging build */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. Unix-specific */ -#undef HAVE_FCNTL_H - -/* command.com can't pipe stderr into a file; any message would be */ -/* written into the graphics screen. */ -#define HAVE_PRINT_FUNCTION 1 - -#define Print( format, ap ) vfprintf( stdout, (format), (ap) ) - - -/* The number of bytes in a int. We use the ANSI header file limits.h */ -/* for determining it since there is no easy way to guess. */ -/* */ -#include -#if UINT_MAX == 0xFFFF -#define SIZEOF_INT 2 -#elif UINT_MAX == 0xFFFFFFFF -#define SIZEOF_INT 4 -#else -#error "Unsupported number of bytes in `int' type!" -#endif - -/* We now try to guess the size of longs in the same way */ -/* */ -#if ULONG_MAX == 0xFFFFFFFF -#define SIZEOF_LONG 4 -#elif ULONG_MAX == 0xFFFFFFFFFFFFFFFF -#define SIZEOF_LONG 8 -#else -#error "Unsupported number of bytes in `long' type!" -#endif - - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ -/* */ -/* For debugging, we use a jump table; this allows some interesting */ -/* things during development. */ - -#undef TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a `static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine. */ -/* */ -/* We use a static interpreter in the debugger; this helps in setting */ -/* data breakpoints to fixed memory addresses. */ - -#define TT_CONFIG_OPTION_STATIC_INTERPRETER - -/* an extra for the debugger */ -#define DEBUG_INTERPRETER - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ - -#define TT_CONFIG_OPTION_STATIC_RASTER - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode. */ -/* Set to DEBUG_LEVEL_TRACE for the debugger. */ -#define DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/mac/README diff -u xc/extras/FreeType/lib/arch/mac/README:1.1.1.1 xc/extras/FreeType/lib/arch/mac/README:removed --- xc/extras/FreeType/lib/arch/mac/README:1.1.1.1 Sat Jan 23 22:22:13 1999 +++ xc/extras/FreeType/lib/arch/mac/README Wed Mar 16 20:59:41 2005 @@ -1,47 +0,0 @@ - -This is the readme of the freetype.hqx archive in the contrib/mac -subdirectory. Please note that the FreeType team does *not* support the -Macintosh platform due to lack of knowledge. All questions regarding the -code should be sent to both David Williss and the freetype-devel list. - - ----------------------------------------------------------------------------- - - -These are CodeWarrior projects for building the FreeType library on a Macintosh -I've only provided PPC projects here, but building for 68K shouldn't be hard. -There are two directories here (OK, "folders"). One contains a project for -building freetype.ppc.lib and the other is for freetype.ppc.dll. (I havn't -actually tested the DLL yet.) - -The Macintosh stores TrueType fonts in a "Fonts" folder under the "System" -folder. There is a standard MacOS API for finding this folder, so I use it. -However, the fonts aren't normal flat files. They have all the data in -resources in the resource fork. Each font is an 'sfnt' resource, and each -file can have more than one 'sfnt' resource. - -To get at them, I made a copy of ttmmap.c from the Unix implementation and -modified it to load/release the resource and lock/unlock the handle as needed. -This only required a change to the open and close functions. After that, it -works just as if it was using Unix memory mapping. - -One thing however. Because of the bizarre scheme for storing the fonts, I -made up a way of specifying the font filename. - - fonts:/fontfile/fontname - -Where fonts:/ is a literal string that means "the fonts folder", fontfile is -the name of the actual file and fontname is the name of the 'sfnt' resource. -Currently, this is the only thing it understands. It might be nice if some -day (2.0 maybe?) ttfile.c and ttmmap.c wern't mutialy exclusive and it could -decide which method to use based on the filename or something. - -Another thing that I had to change to make this work. It seems that Macintosh -TrueType fonts have no OS/2 table, so ttload.c needs to be modified to make -that nonfatal, at least on a Macintosh. - ---- - -David Williss -MicroImages, Inc. -dwilliss@microimages.com Index: xc/extras/FreeType/lib/arch/mac/freetype.c diff -u xc/extras/FreeType/lib/arch/mac/freetype.c:1.1.1.1 xc/extras/FreeType/lib/arch/mac/freetype.c:removed --- xc/extras/FreeType/lib/arch/mac/freetype.c:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/mac/freetype.c Wed Mar 16 20:59:41 2005 @@ -1,48 +0,0 @@ -/* This file is *not* part of the FreeType project, because the team */ -/* lacks the necessary expertise to support it. */ - -/* freetype.c for MacOS */ -/* single object library component for MacOS */ - -/* Written by Dave Willis on 1998-07-30. */ -/* Modified by Antoine Leca for the 1.3 release, but untested. */ - -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* Note, you should define the EXPORT_DEF and EXPORT_FUNC macros here */ -/* if you want to build a DLL. If undefined, the macros are defined */ -/* as "export" and "" (i.e. nothing), which is the normal behaviour. */ -/* The macros are placed before each high-level API function */ -/* declaration. You can then use them to take any compiler-specific */ -/* pragma for DLL-exported symbols. See 'ttconfig.h' for details. */ - - -/* first include common core components */ - -#define MAC_MAIN_OBJECT -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#include "ttmmap.c" /* Was "ttfile.c" */ -#include "ttmemory.c" -#include "ttmutex.c" - -/* finally, add some extensions */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/mac/ft_conf.h diff -u xc/extras/FreeType/lib/arch/mac/ft_conf.h:1.1.1.1 xc/extras/FreeType/lib/arch/mac/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/mac/ft_conf.h:1.1.1.1 Sat Feb 12 23:55:51 2000 +++ xc/extras/FreeType/lib/arch/mac/ft_conf.h Wed Mar 16 20:59:41 2005 @@ -1,211 +0,0 @@ -/* This file is *not* part of the FreeType project, because the team */ -/* lacks the necessary expertise to support it. */ - -/* ft_conf.h for MacOS */ - -/* Written by Dave Willis on 1998-07-30. */ -/* Modified by Antoine Leca for the 1.3 release, but untested. */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the 'const' keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/mac/ttmmap.c diff -u xc/extras/FreeType/lib/arch/mac/ttmmap.c:1.1.1.1 xc/extras/FreeType/lib/arch/mac/ttmmap.c:removed --- xc/extras/FreeType/lib/arch/mac/ttmmap.c:1.1.1.1 Sat Jan 23 22:22:13 1999 +++ xc/extras/FreeType/lib/arch/mac/ttmmap.c Wed Mar 16 20:59:41 2005 @@ -1,1069 +0,0 @@ -/******************************************************************* - * - * ttmmap.c 2.0 - * - * Memory-Mapped file component ( replaces ttfile.c ). - * - * Copyright 1996-1998 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Changes between 2.0 and 1.3 : - * - * - adopted new design/separation introduced in ttfile.c 2.0 - * - ******************************************************************/ - -#include "ttconfig.h" - -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - - -#ifdef HAVE_FCNTL_H -#include -#endif - -#include -#include - - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttengine.h" -#include "ttmutex.h" -#include "ttmemory.h" -#include "ttfile.h" /* our prototypes */ - - /* This definition is mandatory for each file component! */ - EXPORT_FUNC - const TFileFrame TT_Null_FileFrame = { NULL, 0, 0 }; - - /* It has proven useful to do some bounds checks during */ - /* development phase. Define DEBUG_FILE when compiling */ - /* this component to enable them. */ - -#ifdef DEBUG_FILE -#define CHECK_FRAME( frame, n ) \ - do { \ - if ( frame.cursor+n > frame.address + frame.size ) \ - Panic( "Frame boundary error!\n" ); \ - } while ( 0 ) -#else -#define CHECK_FRAME( frame, n ) \ - do { \ - } while( 0 ) -#endif - - struct _TFileMap - { - String* base; /* base address of mapped file */ - Int refcount; /* reference count for handle region */ - Long size; /* stream size in file */ - Long offset; /* offset in file */ - Handle handle; /* Macintosh style handle to lock/unlock */ - short resid; /* Id of resource file to close when done */ - }; - - typedef struct _TFileMap TFileMap; - -#define MAP_Address( map ) (Byte*)( (map)->base + (map)->offset ) - - /* The stream record structure */ - typedef struct _TStream_Rec - { - TFileMap* map; /* mapped file description */ - Long pos ; /* cursor in mapped file */ - } TStream_Rec; - - typedef TStream_Rec* PStream_Rec; - -#define STREAM2REC( x ) ( (TStream_Rec*)HANDLE_Val( x ) ) - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /**** ****/ - /**** N O N R E E N T R A N T I M P L E M E N T A T I O N ****/ - /**** ****/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - - /* The TFile_Component structure holds all the data that was */ - /* previously declared static or global in this component. */ - /* */ - /* It is accessible through the 'engine.file_component' */ - /* variable in re-entrant builds, or directly through the */ - /* static 'files' variable in other builds. */ - - struct _TFile_Component - { - TMutex lock; /* used by the thread-safe build only */ - PStream_Rec stream; /* current stream */ - TFileFrame frame; /* current frame */ - }; - - typedef struct _TFile_Component TFile_Component; - -/* The macro CUR_Stream denotes the current input stream */ -/* Note that for the re-entrant version, the 'stream' name has been */ -/* chosen according to the macro STREAM_ARGS. */ - -/* The macro CUR_Frame denotes the current file frame */ -/* Note that for the re-entrant version, the 'frame' name has been */ -/* chosen according to the macro FRAME_ARGS. */ - -/* The macro STREAM_VAR is used when calling public functions */ -/* that need an 'optional' stream argument. */ - -#define CUR_Stream files.stream /* thread-safe macros */ -#define CUR_Frame files.frame - -#define STREAM_VARS /* void */ -#define STREAM_VAR /* void */ - - /* the 'files' variable is only defined in non-reentrant builds */ - - static TFile_Component files; - - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - MUTEX_Create( files.lock ); - files.stream = NULL; - ZERO_Frame( files.frame ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - MUTEX_Destroy( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream org_stream, - TT_Stream* stream ) - { - MUTEX_Lock( files.lock ); - *stream = org_stream; - files.stream = STREAM2REC( org_stream ); /* set current stream */ - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream - * - * Output : Error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - HANDLE_Set( *stream, NULL ); - MUTEX_Release( files.lock ); - - return TT_Err_Ok; - } - -#else /* TT_CONFIG_OPTION_THREAD_SAFE */ - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /******** ********/ - /******** R E E N T R A N T I M P L E M E N T A T I O N ********/ - /******** ********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -#define CUR_Stream STREAM2REC( stream ) /* re-entrant macros */ -#define CUR_Frame (*frame) - -#define STREAM_VARS stream, -#define STREAM_VAR stream - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - engine.file_component = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code. The output stream is set to NULL in - * case of Failure. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream input_stream, - TT_Stream* copy ) - { - TT_Error error; - PStream_Rec stream_rec; - PStream_Rec copy_rec; - - - stream_rec = STREAM2REC( input_stream ); - - if ( ALLOC( copy_rec, sizeof ( TStream_Rec ) ) ) - goto Fail; - - HANDLE_Set( *copy, copy_rec ); - - copy_rec->map->refcount++; - copy_rec->pos = 0; - - return TT_Err_Ok; - - Fail: - HANDLE_Set( *copy, NULL ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream - * - * Output : error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - return TT_Close_Stream( stream ); - } - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /*********** ***********/ - /*********** C O M M O N I M P L E M E N T A T I O N ***********/ - /*********** ***********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/******************************************************************* - * - * Function : AllocateMap - * - * Description : Allocates a new map from the table. - * - * Output : Pointer to new stream rec. NULL in case of failure. - * - ******************************************************************/ - - static - TFileMap* Allocate_Map( void ) - { - TFileMap* result; - - - if ( MEM_Alloc( result, sizeof ( TFileMap ) ) ) - return NULL; - - result->refcount = 1; - return result; - } - - -/******************************************************************* - * - * Function : ReleaseMap - * - * Description : Releases a used map to the table if reference i - * counter reaches zero. - * - * Input : map - * - * Output : None. - * - * Note : Called by TT_Close_File() - * - ******************************************************************/ - - static - void Release_Map ( TFileMap* map ) - { - map->refcount--; - if ( map->refcount <= 0 ) - { - /* MacOS System calls */ - HUnlock(map->handle); - ReleaseResource(map->handle); - CloseResFile(map->resid); - - FREE( map ); - } - } - - -/* Whadda ya mean "strdup undefined"? Fine, I'll define my own! */ -static char *mystrdup(const char *str) { - char *ret; - - if ( TT_Alloc(strlen(str) + 1, (void**)&ret) != 0 ) return(NULL); - strcpy(ret, str); - return(ret); - } - -/******************************************************************* - * - * Function : TT_Open_Stream - * - * Description : Opens the font file and saves the total file size. - * - * Input : error address of stream's error variable - * (re-entrant build only). - * filepathname pathname of the file to open - * stream address of target TT_Stream structure - * - * Output : SUCCESS on success, FAILURE on error. - * The target stream is set to -1 in case of failure. - * - ******************************************************************/ -/* -** This is not a totally generic implementation. It currently assumes the filename -** starts with "fonts:" and uses slashes instead of colons like Mac code normally -** would. Given a filename of the form "fonts:/filename/resname", Load the resource -** and lock the handle -** -** The "fonts:" at the beginning is just a convention I came up with to -** indicate the Fonts folder inside the current System folder (find via FindFolder()) -*/ - - LOCAL_FUNC - TT_Error TT_Open_Stream( const String* filepathname, - TT_Stream* stream ) - { - TT_Error error; - Int file; - PStream_Rec stream_rec; - TFileMap* map; - - int size, err = 0; - short vRefNum, res = -1; - Str255 FontName; - char *cp, *p, *fname, *sep; - Str63 myName; - long dirID; - - - if ( ALLOC( *stream, sizeof ( TStream_Rec ) ) ) - return error; - - map = Allocate_Map(); - if ( !map ) - { - error = TT_Err_Out_Of_Memory; - goto Memory_Fail; - } - - stream_rec = STREAM2REC( *stream ); - - /* Find the dirID of the Fonts folder in the current System folder */ - if (FindFolder(kOnSystemDisk, kFontsFolderType, kDontCreateFolder, &vRefNum, &dirID)) - goto File_Fail; - - /* Break the name apart */ - fname = mystrdup(filepathname); /* Make a copy so we can muck with it */ - sep = ":/"; /* Things that can seperate file path componants */ - - strtok(fname, sep); /* Skip over "fonts:" */ - - if ((p = strtok(NULL, sep)) == NULL) /* Get filename */ - goto File_Fail; - strcpy(myName + 1, p); /* Make this a Pascal string (Yuck!) */ - myName[0] = strlen(p); - - if ((p = strtok(NULL, sep)) == NULL) /* Get res name */ - goto File_Fail; - strcpy(FontName+1, p); /* Make this a Pascal string (Yuck!) */ - FontName[0] = strlen(p); - - FREE( fname ); - - if ((cp = strchr(FontName, '.')) != NULL) /* Strip off ".ttf" , if any */ - *cp = 0; - - /* Read the font into a buffer */ - if ((map->resid = HOpenResFile(vRefNum, dirID, myName, fsRdPerm)) == -1) - goto File_Fail; - - if ((map->handle = Get1NamedResource('sfnt', FontName)) == NULL) - goto Map_Fail; - - HLock(map->handle); - map->base = *map->handle; - map->offset = 0; - map->size = GetResourceSizeOnDisk(map->handle); - - if ( map->base == NULL ) - goto Lock_Fail; - - stream_rec->map = map; - stream_rec->pos = 0; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - CUR_Stream = stream_rec; -#endif - - return TT_Err_Ok; - - Lock_Fail: - ReleaseResource(map->handle); - - Map_Fail: - CloseResFile(map->resid); - - File_Fail: - error = TT_Err_Could_Not_Open_File; - FREE( map ); - - Memory_Fail: - FREE( *stream ); - FREE( fname ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Close_Stream - * - * Description : Closes a stream. - * - * Input : stream - * - * Output : SUCCESS (always) - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Close_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - Release_Map( rec->map ); - FREE( rec ); - - HANDLE_Set( *stream, NULL ); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Flush_Stream - * - * Description : Flushes a stream, i.e., closes its file handle. - * - * Input : stream address of target TT_Stream structure - * - * Output : Error code - * - * NOTE : Never flush the current opened stream. This means that - * you should _never_ call this function between a - * TT_Use_Stream() and a TT_Done_Stream()! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Flush_Stream( TT_Stream* stream ) - { - /* XXX - DUMMY IMPLEMENTATION */ - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Stream_Size - * - * Description : Returns the length of a given stream, even if it - * is flushed. - * - * Input : stream the stream - * - * Output : Length of stream in bytes. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Stream_Size( TT_Stream stream ) - { - PStream_Rec rec = STREAM2REC( stream ); - - - if ( rec ) - return rec->map->size; - else - return 0; /* invalid stream - return 0 */ - } - - -/******************************************************************* - * - * Function : TT_Seek_File - * - * Description : Seeks the file cursor to a different position. - * - * Input : position new position in file - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Seek_File( STREAM_ARGS Long position ) - { - if ( position > CUR_Stream->map->size ) - return TT_Err_Invalid_File_Offset; - - CUR_Stream->pos = position; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Skip_File - * - * Description : Skips forward the file cursor. - * - * Input : distance number of bytes to skip - * - * Output : see TT_Seek_File - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Skip_File( STREAM_ARGS Long distance ) - { - return TT_Seek_File( STREAM_VARS CUR_Stream->pos + distance ); - } - - -/******************************************************************* - * - * Function : TT_Read_File - * - * Description : Reads a chunk of the file and copies it to memory. - * - * Input : buffer target buffer - * count length in bytes to read - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_File( STREAM_ARGS void* buffer, Long count ) - { - if ( CUR_Stream->pos + count > CUR_Stream->map->size ) - return TT_Err_Invalid_File_Read; - - MEM_Copy( buffer, - MAP_Address( CUR_Stream->map ) + CUR_Stream->pos, count ); - CUR_Stream->pos += count; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Read_At_File - * - * Description : Reads file at a specified position. - * - * Input : position position to seek to before read - * buffer target buffer - * count number of bytes to read - * - * Output : SUCCESS on success. FAILURE if error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_At_File( STREAM_ARGS Long position, - void* buffer, - Long count ) - { - TT_Error error; - - - if ( (error = TT_Seek_File( STREAM_VARS position )) || - (error = TT_Read_File( STREAM_VARS buffer, count )) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_File_Pos - * - * Description : Returns current file seek pointer. - * - * Input : none - * - * Output : current file position - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_File_Pos( STREAM_ARG ) - { - return CUR_Stream->pos; - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : Error code - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that aSize is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( CUR_Stream->pos + size > CUR_Stream->map->size ) - return TT_Err_Invalid_Frame_Access; - - CUR_Frame.size = size; - CUR_Frame.address = MAP_Address( CUR_Stream->map ) + CUR_Stream->pos; - CUR_Frame.cursor = CUR_Frame.address; - - CUR_Stream->pos += size; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : Error code - * - * Notes: The function truncates 'size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that aSize is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. The 'overflow' is set to zero. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - Long readBytes; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - readBytes = CUR_Stream->map->size - CUR_Stream->pos; - if ( size > readBytes ) - { - /* There is overflow, we allocate a new block then */ - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - - CUR_Frame.size = size; - - /* copy the valid part */ - MEM_Copy( CUR_Frame.address, - MAP_Address( CUR_Stream->map ) + CUR_Stream->pos, - readBytes ); - } - else - { - CUR_Frame.size = size; - CUR_Frame.address = MAP_Address( CUR_Stream->map ) + CUR_Stream->pos; - } - - CUR_Frame.cursor = CUR_Frame.address; - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - /* If we were using a duplicate in case of overflow, free it now */ - if ( CUR_Frame.address < (Byte*)CUR_Stream->map->base || - CUR_Frame.address >= (Byte*)CUR_Stream->map->base + - CUR_Stream->map->size ) - FREE( CUR_Frame.address ); - - ZERO_Frame( files.frame ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : GET_Byte - * - * Description : Extracts a byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted Byte - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - Byte TT_Get_Byte( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Byte)(*CUR_Frame.cursor++); - } - -#endif - - -/******************************************************************* - * - * Function : GET_Char - * - * Description : Extracts a signed byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted char - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Char TT_Get_Char( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Char)(*CUR_Frame.cursor++); - } - - -/******************************************************************* - * - * Function : GET_Short - * - * Description : Extracts a short from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted short - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Short TT_Get_Short( FRAME_ARG ) - { - Short getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((Short)CUR_Frame.cursor[0] << 8) | - (Short)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } - - -/******************************************************************* - * - * Function : GET_UShort - * - * Description : Extracts an unsigned short from the frame. - * - * Input : None or current frame - * - * Output : Extracted ushort - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - UShort TT_Get_UShort( FRAME_ARG ) - { - UShort getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((UShort)CUR_Frame.cursor[0] << 8) | - (UShort)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } - -#endif - - -/******************************************************************* - * - * Function : GET_Long - * - * Description : Extracts a long from the frame. - * - * Input : None or current frame - * - * Output : Extracted long - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Get_Long( FRAME_ARG ) - { - Long getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ((Long)CUR_Frame.cursor[0] << 24) | - ((Long)CUR_Frame.cursor[1] << 16) | - ((Long)CUR_Frame.cursor[2] << 8 ) | - (Long)CUR_Frame.cursor[3]; - - CUR_Frame.cursor += 4; - - return getlong; - } - - -/******************************************************************* - * - * Function : GET_ULong - * - * Description : Extracts an unsigned long from the frame. - * - * Input : None - * - * Output : Extracted ulong - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - ULong TT_Get_ULong( FRAME_ARG ) - { - ULong getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ( ((ULong)CUR_Frame.cursor[0] << 24) | - ((ULong)CUR_Frame.cursor[1] << 16) | - ((ULong)CUR_Frame.cursor[2] << 8 ) | - (ULong)CUR_Frame.cursor[3] ); - - CUR_Frame.cursor += 4; - - return getlong; - } - -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/msdos/Makefile.BC diff -u xc/extras/FreeType/lib/arch/msdos/Makefile.BC:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/Makefile.BC:removed --- xc/extras/FreeType/lib/arch/msdos/Makefile.BC:1.1.1.1 Sat Feb 12 23:55:52 2000 +++ xc/extras/FreeType/lib/arch/msdos/Makefile.BC Wed Mar 16 20:59:41 2005 @@ -1,132 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Borland C++ for MS-DOS, large model. -# Due to size constraints, it does not try to pack all modules into one -# (`single-object mode'). -# -# You will need Borland MAKE. -# Tested with Borland C++ v.3.1, 4.02, 5.0. -# -# Use this file while in the lib directory with the following statement: -# -# make -farch/msdos/Makefile.BC -# -# -# A debug version can be obtained with -# -# make -DDEBUG -farch/msdos/Makefile.BC -# -# A special version enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# make -DBIGFONTS -farch/msdos/Makefile.BC - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.BC - -CC = bcc -LIB = tlib /c /e - -# Credits go to Dave Hoo for pointing out that modern -# Borland compilers (from BC++ 3.1 on) can increase the limit on -# the length of identifiers. -!if ! $d(DEBUG) -CFLAGS = -ml -A -O2 -3 -i40 -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -I$(ARCH);.;extend -!else -CFLAGS = -v -N -ml -A -i40 -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -I$(ARCH);.;extend -!endif - - -!if $d(BIGFONTS) -CFLAGS = $(CFLAGS) -DTT_HUGE_PTR=__huge - -TTFILE = $(ARCH)\.\hugefile.c -TTMEMORY = $(ARCH)\.\hugemem.c -!else -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -!endif -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces before the \ at end of line, -# otherwise the substitution for TLIB command line will fail. -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ - extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c\ - extend\ftxsbit.c extend\ftxgsub.c extend\ftxgpos.c\ - extend\ftxopen.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c\ - ttgload.c ttinterp.c ttload.c ttobjs.c\ - ttraster.c ttextend.c ttdebug.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\.\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Borland's make does not handle $($(LIB_FILES)), and using -# -DLIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing TLIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# It is commented out below. See Makefile.TC for an application. -.c.obj: - $(CC) -c -o$* @&&| - $(CFLAGS) $< -| -# $(LIB) libttf +-$*.obj - - -!if !$d(DEBUG) -# Skipped if DEBUG build -# (but it changes nothing, since we always build in multiple parts). -all: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_M: = + ) -| - -!endif - - -debug: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_M: = + ) -| - -$(OBJ_S): $(SRC_S) $(SRC_M) - -# Not used here because it excesses the capacity of COMMAND.COM... -libttf.lib: $(LIB_FILES) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(**: = + ) -| - -!if $d(BIGFONTS) -$(TTMEMORY:.c=.obj): $(TTMEMORY) - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| -!endif - - -clean: - -del *.obj - -del extend\*.obj - -del $(ARCH)\*.obj - -del libttf.bak - -del response - -distclean: clean - -del libttf.lib - -!include "$(ARCH)\depend.dos" - -# end of Makefile Index: xc/extras/FreeType/lib/arch/msdos/Makefile.MS diff -u xc/extras/FreeType/lib/arch/msdos/Makefile.MS:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/Makefile.MS:removed --- xc/extras/FreeType/lib/arch/msdos/Makefile.MS:1.1.1.1 Sat Feb 12 23:55:52 2000 +++ xc/extras/FreeType/lib/arch/msdos/Makefile.MS Wed Mar 16 20:59:41 2005 @@ -1,117 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Microsoft C for MS-DOS, large model. -# It also works for Visual C++ 1.x 16-bits compiler, but you should -# instead use the Makefile customized for it, Makefile.VC. -# Due to size constraints, it does not try to pack all modules into one. -# -# You will need NMAKE. -# -# Use this file while in the lib directory with the following statement: -# -# nmake /f arch\msdos\Makefile.MS -# -# -# A debug version can be obtained with -# -# nmake DEBUG=1 /f arch\msdos\Makefile.MS -# -# A special version enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# nmake BIGFONTS=1 /f arch\msdos\Makefile.MS - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.MS - -CC = cl /nologo -LIB = lib /noignorecase /nologo - -!ifndef DEBUG -CFLAGS = /Ox /AL /W2 /G2 /I$(ARCH) /I. /Iextend -!else -CFLAGS = /Zi /AL /W2 /G2 /I$(ARCH) /I. /Iextend -!endif - - -!ifndef BIGFONTS -CFLAGS = $(CFLAGS) /Za - -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -!else -CFLAGS = $(CFLAGS) /DTT_HUGE_PTR=__huge /Ze - -TTFILE = $(ARCH)\hugefile.c -TTMEMORY = $(ARCH)\hugemem.c -!endif - -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces between the file names or at end of line, otherwise -# the substitution for LIB command line will fail. Thank you. -# -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ -extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\ -extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\ -ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using -# LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing LIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# It is commented out below. See Makefile.TC for an application. -.c.obj: - @$(CC) /c /Fo$@ @<< - $(CFLAGS) $*.c -<< -# $(LIB) libttf +-$*.obj - - -!ifndef DEBUG -# Skipped if DEBUG build -# (but it changes nothing, since we always build in multiple parts). -all: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @<&| - -CC = gcc - -CFLAGS = -Wall -O2 -g -ansi -pedantic -I$(ARCH) -I. -Iextend -# CFLAGS = -Wall -ansi -O2 -s -I$(ARCH) -I. -Iextend - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxopen.c \ - extend/ftxgdef.c extend/ftxerr18.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttfile.c ttgload.c ttinterp.c ttload.c \ - ttmemory.c ttmutex.c ttobjs.c ttraster.c ttextend.c -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean depend - - -all: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M libttf.a - - -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) $(CFLAGS) -c -o $@ $(SRC_S) - -libttf.a: $($(LIB_FILES)) - +-del $@ - ar src $@ @$(mktmp $(<:t"\n")\n) - -clean: --[ - del *.o - del extend\*.o - del $(ARCH)\*.o -] - -distclean: clean --[ - del dep.end - del libttf.a -] - -# depend: $(SRC_S) $(SRC_M) $(SRC_X) -# $(CC) -E -M @$(mktmp $(<:t"\n")\n) > dep.end - -# ifeq (dep.end,$(wildcard dep.end)) -# include dep.end -# endif - -# end of Makefile.dm Index: xc/extras/FreeType/lib/arch/msdos/Makefile.gcc diff -u xc/extras/FreeType/lib/arch/msdos/Makefile.gcc:1.1.1.3 xc/extras/FreeType/lib/arch/msdos/Makefile.gcc:removed --- xc/extras/FreeType/lib/arch/msdos/Makefile.gcc:1.1.1.3 Sat Feb 12 23:55:52 2000 +++ xc/extras/FreeType/lib/arch/msdos/Makefile.gcc Wed Mar 16 20:59:41 2005 @@ -1,92 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for emx-gcc or djgpp under MSDOS. -# -# You will need GNU make. -# -# Use this file while in the lib directory with the following statement: -# -# make -f arch/msdos/Makefile.gcc -# -# If you have the GNU gettext package installed with DJGPP, you can also try -# -# make -f arch/msdos/Makefile.gcc HAVE_GETTEXT - -ARCH = arch/msdos -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -CC = gcc - -ifndef GETTEXT -GETTEXT=NO_GETTEXT -endif - -ifdef DEBUG -CFLAGS = -Wall -O2 -g -ansi -pedantic -I$(ARCH) -I. -Iextend -D$(GETTEXT) -else -CFLAGS = -Wall -ansi -pedantic -O2 -s -I$(ARCH) -I. -Iextend -D$(GETTEXT) -endif - - -TTFILE = ./ttfile.c -TTMEMORY = ./ttmemory.c -TTMUTEX = ./ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxgdef.c \ - extend/ftxopen.c extend/ftxerr18.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c \ - ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean depend - - -all: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M DEBUG=1 libttf.a - -HAVE_GETTEXT: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S GETTEXT=HAVE_GETTEXT \ - libttf.a - -$(OBJ_S): $(SRC_S) $(SRC_M) - -libttf.a: $($(LIB_FILES)) - -del $@ - ar src $@ $^ - -clean: - -del *.o - -del extend\*.o - -del $(ARCH)\*.o - -del response - -distclean: clean - -del dep.end - -del libttf.a - -depend: $(SRS_S) $(SRC_M) $(SRC_X) - $(CC) -E -M $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/lib/arch/msdos/Makefile.wat diff -u xc/extras/FreeType/lib/arch/msdos/Makefile.wat:1.1.1.2 xc/extras/FreeType/lib/arch/msdos/Makefile.wat:removed --- xc/extras/FreeType/lib/arch/msdos/Makefile.wat:1.1.1.2 Sat Feb 12 23:55:52 2000 +++ xc/extras/FreeType/lib/arch/msdos/Makefile.wat Wed Mar 16 20:59:41 2005 @@ -1,88 +0,0 @@ -# This file is part of the FreeType project -# -# This builds the Watcom library with Watcom's wcc386 under DOS -# -# You'll need Watcom's wmake -# -# -# Invoke by "wmake -f arch\msdos\Makefile.wat" while in the "lib" directory -# -# This will build "freetype\lib\libttf.lib" -# - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.wat -FT_MAKE = wmake -h - - -.EXTENSIONS: -.EXTENSIONS: .lib .obj .c .h -.obj:.;.\extend;.\$(ARCH) -.c:.;.\extend;.\$(ARCH) -.h:.;.\extend;.\$(ARCH) - -CC = wcc386 - -CCFLAGS = /otexanl+ /s /w4 /zq /d3 -I$(ARCH) -I. -Iextend - - -# FIXME: should use something like OBJ = $(SRC:.c=.obj) - -SRC_X = ftxgasp.c ftxkern.c ftxpost.c & - ftxcmap.c ftxwidth.c ftxsbit.c ftxerr18.c & - ftxgsub.c ftxgpos.c ftxopen.c ftxgdef.c -OBJS_X = ftxgasp.obj ftxkern.obj ftxpost.obj & - ftxcmap.obj ftxwidth.obj ftxsbit.obj ftxerr18.obj & - ftxgsub.obj ftxgpos.obj ftxopen.obj ftxgdef.obj - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c & - ttfile.c ttgload.c ttinterp.c & - ttload.c ttmemory.c ttmutex.c ttobjs.c ttraster.c & - ttextend.c -OBJS_M = ttapi.obj ttcache.obj ttcalc.obj ttcmap.obj ttdebug.obj & - ttfile.obj ttgload.obj ttinterp.obj & - ttload.obj ttmemory.obj ttmutex.obj ttobjs.obj ttraster.obj & - ttextend.obj $(OBJS_X) - -SRC_S = freetype.c -OBJ_S = freetype.obj -OBJS_S = $(OBJ_S) $(OBJ_X) - - -.c.obj: - $(CC) $(CCFLAGS) $[* /fo=$[*.obj - -libname = libttf -libfile = $(libname).lib -cmdfile = $(libname).lst - - -all: .symbolic - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S $(libfile) - -debug: .symbolic - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M $(libfile) - - -$(libfile): $($(LIB_FILES)) - wlib -q -n $(libfile) @$(cmdfile) - -# is this correct? Know nothing about wmake and the Watcom compiler... -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) $(CCFLAGS) $(SRC_S) /fo=$(OBJ_S) - -$(cmdfile): $($(LIB_FILES)) - @for %i in ($($(LIB_FILES))) do @%append $(cmdfile) +-%i - -clean: .symbolic - @-erase $(OBJ_S) - @-erase $(OBJS_M) - @-erase $(cmdfile) - -distclean: .symbolic clean - @-erase $(libfile) - -new: .symbolic - @-wtouch *.c - -# end of Makefile.wat Index: xc/extras/FreeType/lib/arch/msdos/depend.dos diff -u xc/extras/FreeType/lib/arch/msdos/depend.dos:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/depend.dos:removed --- xc/extras/FreeType/lib/arch/msdos/depend.dos:1.1.1.1 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/depend.dos Wed Mar 16 20:59:41 2005 @@ -1,107 +0,0 @@ -# This dependency file to be used with various MS-DOS compilers -# has been generated automatically with the script `makedep' on -# 03-Sep-1999. - -ttapi.obj: ttapi.c ttconfig.h arch\msdos\ft_conf.h freetype.h fterrid.h \ - ftnameid.h ttengine.h tttypes.h ttmutex.h ttcalc.h ttmemory.h \ - ttcache.h ttfile.h ttdebug.h ttobjs.h tttables.h ttcmap.h ttload.h \ - ttgload.h ttraster.h ttextend.h -ttcache.obj: ttcache.c ttengine.h tttypes.h ttconfig.h \ - arch\msdos\ft_conf.h freetype.h fterrid.h ftnameid.h ttmutex.h \ - ttmemory.h ttcache.h ttobjs.h tttables.h ttcmap.h ttdebug.h -ttcalc.obj: ttcalc.c ttcalc.h ttconfig.h arch\msdos\ft_conf.h freetype.h \ - fterrid.h ftnameid.h ttdebug.h tttypes.h tttables.h -ttcmap.obj: ttcmap.c ttobjs.h ttconfig.h arch\msdos\ft_conf.h ttengine.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmutex.h ttcache.h \ - tttables.h ttcmap.h ttdebug.h ttfile.h ttmemory.h ttload.h -ttdebug.obj: ttdebug.c ttdebug.h ttconfig.h arch\msdos\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h tttables.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h ttcmap.h -ttextend.obj: ttextend.c ttextend.h ttconfig.h arch\msdos\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttmemory.h -ttfile.obj: ttfile.c ttconfig.h arch\msdos\ft_conf.h freetype.h \ - fterrid.h ftnameid.h tttypes.h ttdebug.h ttengine.h ttmutex.h \ - ttmemory.h ttfile.h -ttgload.obj: ttgload.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttdebug.h ttcalc.h ttfile.h \ - ttengine.h ttmutex.h tttables.h ttobjs.h ttcache.h ttcmap.h ttgload.h \ - ttmemory.h tttags.h ttload.h -ttinterp.obj: ttinterp.c freetype.h fterrid.h ftnameid.h tttypes.h \ - ttconfig.h arch\msdos\ft_conf.h ttdebug.h ttcalc.h ttmemory.h \ - ttinterp.h ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h \ - ttcmap.h -ttload.obj: ttload.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttdebug.h ttcalc.h ttfile.h \ - ttengine.h ttmutex.h tttables.h ttobjs.h ttcache.h ttcmap.h \ - ttmemory.h tttags.h ttload.h -ttmemory.obj: ttmemory.c ttdebug.h ttconfig.h arch\msdos\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmemory.h ttengine.h \ - ttmutex.h -ttmutex.obj: ttmutex.c ttmutex.h ttconfig.h arch\msdos\ft_conf.h -ttobjs.obj: ttobjs.c ttobjs.h ttconfig.h arch\msdos\ft_conf.h ttengine.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmutex.h ttcache.h \ - tttables.h ttcmap.h ttfile.h ttdebug.h ttcalc.h ttmemory.h ttload.h \ - ttinterp.h ttextend.h -ttraster.obj: ttraster.c ttraster.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttengine.h tttypes.h ttmutex.h \ - ttdebug.h ttcalc.h ttmemory.h -extend\ftxcmap.obj: extend\ftxcmap.c extend\ftxcmap.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\msdos\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h -extend\ftxerr18.obj: extend\ftxerr18.c ttconfig.h arch\msdos\ft_conf.h \ - extend\ftxerr18.h freetype.h fterrid.h ftnameid.h extend\ftxkern.h \ - extend\ftxpost.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h -extend\ftxgasp.obj: extend\ftxgasp.c extend\ftxgasp.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\msdos\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h -extend\ftxgdef.obj: extend\ftxgdef.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxgpos.obj: extend\ftxgpos.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxgsub.obj: extend\ftxgsub.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxkern.obj: extend\ftxkern.c extend\ftxkern.h freetype.h fterrid.h \ - ftnameid.h ttextend.h ttconfig.h arch\msdos\ft_conf.h tttypes.h \ - ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttdebug.h \ - ttmemory.h ttfile.h ttload.h tttags.h -extend\ftxopen.obj: extend\ftxopen.c tttypes.h ttconfig.h arch\msdos\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxpost.obj: extend\ftxpost.c extend\ftxpost.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\msdos\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttload.h ttfile.h \ - ttdebug.h tttags.h ttmemory.h ttextend.h -extend\ftxsbit.obj: extend\ftxsbit.c extend\ftxsbit.h freetype.h fterrid.h \ - ftnameid.h ttobjs.h ttconfig.h arch\msdos\ft_conf.h ttengine.h \ - tttypes.h ttmutex.h ttcache.h tttables.h ttcmap.h ttfile.h ttdebug.h \ - ttload.h ttmemory.h tttags.h ttextend.h -extend\ftxwidth.obj: extend\ftxwidth.c extend\ftxwidth.h freetype.h fterrid.h \ - ftnameid.h ttdebug.h ttconfig.h arch\msdos\ft_conf.h tttypes.h \ - ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttfile.h \ - tttags.h ttload.h -arch\msdos\freetype.obj: arch\msdos\freetype.c ttapi.c ttconfig.h \ - arch\msdos\ft_conf.h freetype.h fterrid.h ftnameid.h ttengine.h \ - tttypes.h ttmutex.h ttcalc.h ttmemory.h ttcache.h ttfile.h ttdebug.h \ - ttobjs.h tttables.h ttcmap.h ttload.h ttgload.h ttraster.h ttextend.h \ - ttcache.c ttcalc.c ttcmap.c ttdebug.c ttgload.c tttags.h ttinterp.c \ - ttinterp.h ttload.c ttobjs.c ttraster.c arch\msdos\hugefile.c \ - ttfile.c arch\msdos\hugemem.c ttmutex.c ttextend.c -arch\msdos\hugefile.obj: arch\msdos\hugefile.c ttconfig.h arch\msdos\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttfile.c ttdebug.h \ - ttengine.h ttmutex.h ttmemory.h ttfile.h -arch\msdos\hugemem.obj: arch\msdos\hugemem.c ttdebug.h ttconfig.h \ - arch\msdos\ft_conf.h tttypes.h freetype.h fterrid.h ftnameid.h \ - ttmemory.h ttengine.h ttmutex.h Index: xc/extras/FreeType/lib/arch/msdos/freetype.c diff -u xc/extras/FreeType/lib/arch/msdos/freetype.c:1.1.1.2 xc/extras/FreeType/lib/arch/msdos/freetype.c:removed --- xc/extras/FreeType/lib/arch/msdos/freetype.c:1.1.1.2 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/freetype.c Wed Mar 16 20:59:41 2005 @@ -1,39 +0,0 @@ -/* This file is part of the FreeType project */ - -/* Single object library component for MSDOS. */ -/* Note that low-optimizing 16-bit compilers (such as Borland ones) can't */ -/* successfully compile this file, because it exceeds 64K of code size. */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* first include common core components */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#ifdef TT_HUGE_PTR -#include "arch/msdos/hugefile.c" -#include "arch/msdos/hugemem.c" -#else -#include "ttfile.c" -#include "ttmemory.c" -#endif -#include "ttmutex.c" - -/* finally, add some extensions */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/msdos/ft_conf.h diff -u xc/extras/FreeType/lib/arch/msdos/ft_conf.h:1.1.1.3 xc/extras/FreeType/lib/arch/msdos/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/msdos/ft_conf.h:1.1.1.3 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/ft_conf.h Wed Mar 16 20:59:41 2005 @@ -1,253 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for MSDOS */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the header file. */ -#if defined( __EMX__ ) || defined( __DJGPP__ ) || defined( __GO32__ ) -/* some compilers are known to have ; */ -/* add yours if needed, and report to us the update. */ -#define HAVE_UNISTD_H -#else -/* most MS-DOS compilers lack */ -#undef HAVE_UNISTD_H -#endif - -/* Define if you need for console I/O functions. */ -#ifdef __EMX__ -#define HAVE_CONIO_H -#endif - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define if you have the libintl library. */ -#undef HAVE_LIBINTL - -/* DJGPP v.2 may feature the GNU gettext package, with some subtleties. */ -/* The macro HAVE_GETTEXT has to be set in the makefile. */ -#ifdef HAVE_GETTEXT -#define HAVE_LOCALE_H -#define HAVE_LIBINTL_H -#define HAVE_LIBINTL -#define LOCALEDIR "/usr/djgpp/share/locale" -/* Due to a name conflict, gettext is renamed gettext__ in DJGPP */ -#define gettext( str ) gettext__( str ) -#endif - -/* command.com can't pipe stderr into a file; any message would be */ -/* written into the graphics screen. */ -#define HAVE_PRINT_FUNCTION 1 - -#define Print( format, ap ) vfprintf( stdout, (format), (ap) ) - -/* The number of bytes in a int. We use the ANSI header file limits.h */ -/* for determining it since there is no easy way to guess. */ -#include -#if UINT_MAX == 0xFFFF -#define SIZEOF_INT 2 -#elif UINT_MAX == 0xFFFFFFFF -#define SIZEOF_INT 4 -#else -#error "Unsupported number of bytes in `int' type!" -#endif - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/msdos/hugefile.c diff -u xc/extras/FreeType/lib/arch/msdos/hugefile.c:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/hugefile.c:removed --- xc/extras/FreeType/lib/arch/msdos/hugefile.c:1.1.1.1 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/hugefile.c Wed Mar 16 20:59:41 2005 @@ -1,84 +0,0 @@ -/******************************************************************* - * - * hugefile.c - * - * File I/O Component (body) for dealing with "huge" objects under - * MS-DOS. Relies on the "default" version, with a small hook. - * - * Written by Antoine Leca based on ideas from Dave Hoo. - * Copyright 1999 by Dave Hoo, Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTE - * - * This file #includes the normal version, to avoid discrepancies - * between versions. It uses only ANSI-mandated "tricks", so - * any ANSI-compliant compiler should be able to compile this file. - * - ******************************************************************/ - -#include "ttconfig.h" -#include "tttypes.h" - -/* Here we include , to have the proper definition of fread */ -#include - -/* Then, we divert the use of fread to our version */ -#undef fread -#define fread(ptr, size, n, stream) huge_fread(ptr, size, n, stream) - - LOCAL_FUNC - Long huge_fread ( void *ptr, size_t size, Long n, FILE *stream ); - -/* Now, we include the "normal" version of ttfile.c */ -/* The ANSI/ISO standard mandates that the include of */ -/* there have no bad effects. */ -#include "ttfile.c" - -/* Then, we define our implementation of fread that makes use of */ -/* "huge"-allocated memory. */ - -/******************************************************************* - * - * Function : huge_fread - * - * Description : replacement version of fread that handles - * "huge"-allocated memory. - * - * Input : See the reference for the runtime library function fread - * - * Output : See the reference for the runtime library function fread - * - * Notes : - * - ******************************************************************/ - - LOCAL_DEF - Long huge_fread ( void *ptr, size_t size, Long n, FILE *stream ) - { - char TT_HUGE_PTR * p = (char TT_HUGE_PTR *) ptr; - ULong left = (ULong)n * size; - size_t toRead; - - while ( left ) - { - toRead = (left > 0x8000) ? 0x8000 : left; - if ( (fread)( p, 1, toRead, stream ) != toRead) - return -1; - else - { - left -= (ULong) toRead; - p += toRead; - } - } - return n * size; - } - - -/* END */ Index: xc/extras/FreeType/lib/arch/msdos/hugemem.c diff -u xc/extras/FreeType/lib/arch/msdos/hugemem.c:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/hugemem.c:removed --- xc/extras/FreeType/lib/arch/msdos/hugemem.c:1.1.1.1 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/hugemem.c Wed Mar 16 20:59:41 2005 @@ -1,496 +0,0 @@ -/******************************************************************* - * - * hugemem.c - * - * Memory management component (body) - * for dealing with "huge" objects with 16-bit MS-DOS. - * - * Written by Dave Hoo and Antoine Leca. - * Copyright 1999 by Dave Hoo, Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include - -#include "ttdebug.h" -#include "ttmemory.h" -#include "ttengine.h" - -#ifndef TT_HUGE_PTR -#error "This component needs TT_HUGE_PTR to be #defined." -#endif - -/* ---- Microsoft C compilers support ------------------------------------ */ - -#if defined( M_I86 ) || defined( _M_I86 ) - -#include -#define huge_alloc( size ) _halloc ( size, 1 ) -#define huge_free( block ) _hfree ( block ) - -#endif /* Microsoft compilers */ - -/* ---- Borland C compiler support --------------------------------------- */ - -#ifdef __TURBOC__ - -#include -#define huge_alloc( size ) farmalloc ( size ) -#define huge_free( block ) farfree ( block ) - -#endif - -#if !defined( huge_alloc ) || !defined( huge_free ) -#error "Your compiler is not (yet) supported. Check the source file!" -#endif - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE -#error "This component needs static allocation and is not re-entrant." -#endif - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_memory - - -#ifdef DEBUG_MEMORY - -#include - -#define MAX_TRACKED_BLOCKS 1024 - - struct TMemRec_ - { - void* base; - Long size; - }; - - typedef struct TMemRec_ TMemRec; - - static TMemRec pointers[MAX_TRACKED_BLOCKS + 1]; - - static Int num_alloc; - static Int num_free; - static Int num_realloc; /* counts only `real' reallocations - (i.e., an existing buffer will be resized - to a value larger than zero */ - - static Int fail_alloc; - static Int fail_realloc; - static Int fail_free; - -#else - - /* We need a tracing stack of the calls to big chunks of memory, */ - /* in order to call the matching version of free(). */ - -#define MAX_TRACKED_BIGCHUNKS 16 - - struct TMemRec_ - { - void* base; - Long size; - }; - - typedef struct TMemRec_ TMemRec; - - static TMemRec pointers[MAX_TRACKED_BIGCHUNKS + 1]; - -#endif /* DEBUG_MEMORY */ - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - Long TTMemory_Allocated; - Long TTMemory_MaxAllocated; -#endif - - -/******************************************************************* - * - * Function : TT_Alloc - * - * Description : Allocates memory from the heap buffer. - * - * Input : Size size of the memory to be allocated - * P pointer to a buffer pointer - * - * Output : Error code. - * - * NOTE : The newly allocated block should _always_ be zeroed - * on return. Many parts of the engine rely on this to - * work properly. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Alloc( ULong Size, void** P ) - { - Int i; - - - if ( !P ) - return TT_Err_Invalid_Argument; - /* Also see below for another case of "invalid argument". */ - - if ( Size > 0 ) - { - if ( Size > ( UINT_MAX & ~0xFu ) ) - *P = (void*)huge_alloc( Size ); - else - *P = (void*)malloc( Size ); - if ( !*P ) - return TT_Err_Out_Of_Memory; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated += Size; - TTMemory_MaxAllocated += Size; -#endif - -#ifdef DEBUG_MEMORY - - num_alloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_alloc++; - else - { - pointers[i].base = *P; - pointers[i].size = Size; - } - -#else - - if ( Size > ( UINT_MAX & ~0xFu ) ) - { - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BIGCHUNKS ) - /* We fail badly here. Increase MAX_TRACKED_BIGCHUNKS if needed. */ - return TT_Err_Invalid_Argument; - else - { - pointers[i].base = *P; - pointers[i].size = Size; - } - } - -#endif /* DEBUG_MEMORY */ - - if ( Size > ( UINT_MAX & ~0xFu ) ) - { - char TT_HUGE_PTR * p = (char TT_HUGE_PTR *) *P; - ULong left = (ULong)Size; - size_t toClear; - - while ( left ) - { - toClear = (left > 0xFF00) ? 0xFF00 : left; - MEM_Set( p, 0, toClear ); - left -= (ULong) toClear; - p += toClear; - } - } - else - MEM_Set( *P, 0, Size ); - } - else - *P = NULL; - - return TT_Err_Ok; - } - - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - - -/******************************************************************* - * - * Function : TT_Realloc - * - * Description : Reallocates memory from the heap buffer. - * - * Input : Size new size of the memory to be allocated; - * if zero, TT_Free() will be called - * P pointer to a buffer pointer; if *P == NULL, - * TT_Alloc() will be called - * - * Output : Error code. - * - * NOTES : It's not necessary to zero the memory in case the - * reallocated buffer is larger than before -- the - * application has to take care of this. - * - * If the memory request fails, TT_Free() will be - * called on *P, and TT_Err_Out_Of_Memory returned. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Realloc( ULong Size, void** P ) - { - void* Q; - -#ifdef DEBUG_MEMORY - Int i; -#endif - - - if ( !P ) - return TT_Err_Invalid_Argument; - - if ( !*P ) - return TT_Alloc( Size, P ); - - if ( Size == 0 ) - return TT_Free( P ); - - if ( Size > ( UINT_MAX & ~0xFu ) ) - Q = NULL; /* Do not even try to deal with big chunks of memory. */ - else - Q = (void*)realloc( *P, Size ); - if ( !Q ) - { - TT_Free( *P ); - return TT_Err_Out_Of_Memory; - } - -#ifdef DEBUG_MEMORY - - num_realloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_realloc++; - else - { -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated += Size - pointers[i].size; - if ( Size > pointers[i].size ) - TTMemory_MaxAllocated += Size - pointers[i].size; -#endif - - pointers[i].base = Q; - pointers[i].size = Size; - } -#endif /* DEBUG_MEMORY */ - - *P = Q; - - return TT_Err_Ok; - } - - -#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ - - -/******************************************************************* - * - * Function : TT_Free - * - * Description : Releases a previously allocated block of memory. - * - * Input : P pointer to memory block - * - * Output : Always SUCCESS. - * - * Note : The pointer must _always_ be set to NULL by this function. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Free( void** P ) - { - Int i; - Long Size = 0; - - - if ( !P || !*P ) - return TT_Err_Ok; - -#ifdef DEBUG_MEMORY - - num_free++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_free++; - else - { -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated -= pointers[i].size; -#endif - - Size = pointers[i].size; - pointers[i].base = NULL; - pointers[i].size = 0; - } - -#else - - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != *P ) - i++; - - /* If we did not found the pointer, then this is a "small" chunk. */ - - if ( i < MAX_TRACKED_BIGCHUNKS ) - { - Size = pointers[i].size; - pointers[i].base = NULL; - pointers[i].base = NULL; - } - -#endif /* DEBUG_MEMORY */ - - if ( Size > ( UINT_MAX & ~0xFu ) ) - huge_free( *P ); - else - free( *P ); - - *P = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Init - * - * Description : Initializes the memory. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Init( void ) - { -#ifdef DEBUG_MEMORY - Int i; - - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - pointers[i].base = NULL; - pointers[i].size = 0; - } - - num_alloc = 0; - num_realloc = 0; - num_free = 0; - - fail_alloc = 0; - fail_realloc = 0; - fail_free = 0; -#else - Int i; - - for ( i = 0; i < MAX_TRACKED_BIGCHUNKS; i++ ) - { - pointers[i].base = NULL; - pointers[i].size = 0; - } -#endif - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - TTMemory_Allocated = 0; - TTMemory_MaxAllocated = 0; -#endif - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Done - * - * Description : Finalizes memory usage. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Done( void ) - { -#ifdef DEBUG_MEMORY - Int i, num_leaked, tot_leaked; - - - num_leaked = 0; - tot_leaked = 0; - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - num_leaked ++; - tot_leaked += pointers[i].size; - } - } - - fprintf( stderr, - "%d memory allocations, of which %d failed\n", - num_alloc, - fail_alloc ); - - fprintf( stderr, - "%d memory reallocations, of which %d failed\n", - num_realloc, - fail_realloc ); - - fprintf( stderr, - "%d memory frees, of which %d failed\n", - num_free, - fail_free ); - - if ( num_leaked > 0 ) - { - fprintf( stderr, - "There are %d leaked memory blocks, totalizing %d bytes\n", - num_leaked, tot_leaked ); - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - fprintf( stderr, - "index: %4d (base: $%08lx, size: %08ld)\n", - i, - (long)pointers[i].base, - pointers[i].size ); - } - } - } - else - fprintf( stderr, "No memory leaks !\n" ); - -#endif /* DEBUG_MEMORY */ - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/arch/msdos/makedep diff -u xc/extras/FreeType/lib/arch/msdos/makedep:1.1.1.1 xc/extras/FreeType/lib/arch/msdos/makedep:removed --- xc/extras/FreeType/lib/arch/msdos/makedep:1.1.1.1 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/msdos/makedep Wed Mar 16 20:59:41 2005 @@ -1,26 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for older compilers -# on the MS-DOS platform. - -echo "\ -# This dependency file to be used with various MS-DOS compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.dos - -(cd ../.. - gcc -MM -Iarch/msdos -I. *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.dos - -(cd ../.. - gcc -MM -Iarch/msdos -I. -Iextend extend/*.c | \ - sed -e "s/^\(.*\)\.o:/extend\\\\\1.obj:/" -e "s:/:\\\\:g") >> depend.dos - -(cd ../.. - gcc -MM -Iarch/msdos -I. -Iextend \ - -DTT_HUGE_PTR -Dhuge_alloc -Dhuge_free arch/msdos/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\msdos\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.dos - -# eof Index: xc/extras/FreeType/lib/arch/os2/Makefile.dm diff -u xc/extras/FreeType/lib/arch/os2/Makefile.dm:1.1.1.2 xc/extras/FreeType/lib/arch/os2/Makefile.dm:removed --- xc/extras/FreeType/lib/arch/os2/Makefile.dm:1.1.1.2 Sat Feb 12 23:55:53 2000 +++ xc/extras/FreeType/lib/arch/os2/Makefile.dm Wed Mar 16 20:59:41 2005 @@ -1,84 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc under OS/2 -# -# You will need dmake. -# -# Use this file while in the lib directory with the following statement: -# -# dmake -r -f arch/os2/Makefile.dm - -ARCH = arch/os2 -FT_MAKEFILE = $(ARCH)/Makefile.dm -FT_MAKE = dmake -r - -.IMPORT: COMSPEC -SHELL := $(COMSPEC) -SHELLFLAGS := /c -GROUPSHELL := $(SHELL) -GROUPFLAGS := $(SHELLFLAGS) -GROUPSUFFIX := .cmd -SHELLMETAS := *"?<>&| - -CC = gcc - -CFLAGS = -Wall -O2 -g -ansi -pedantic -I$(ARCH) -I. -Iextend -# CFLAGS = -Wall -ansi -O2 -s -I$(ARCH) -I. -Iextend - -TTFILE = $(ARCH)/os2file.c -TTMEMORY = ./ttmemory.c -TTMUTEX = ./ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxopen.c \ - extend/ftxgdef.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c \ - ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean depend - - -all: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M libttf.a - - -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) $(CFLAGS) -c -o $@ $(SRC_S) - - -libttf.a: $($(LIB_FILES)) - +-del $@ - ar src $@ @$(mktmp $(<:t"\n")\n) - -clean: - -+del $(subst,/,\ $($(LIB_FILES))) - -distclean: clean - -+del dep.end libttf.a - -# depend: $(SRC_S) $(SRC_M) $(SRC_X) -# $(CC) -E -M @$(mktmp $(<:t"\n")\n) > dep.end - -# ifeq (dep.end,$(wildcard dep.end)) -# include dep.end -# endif - -# end of Makefile.dm Index: xc/extras/FreeType/lib/arch/os2/Makefile.emx diff -u xc/extras/FreeType/lib/arch/os2/Makefile.emx:1.1.1.2 xc/extras/FreeType/lib/arch/os2/Makefile.emx:removed --- xc/extras/FreeType/lib/arch/os2/Makefile.emx:1.1.1.2 Sat Feb 12 23:55:54 2000 +++ xc/extras/FreeType/lib/arch/os2/Makefile.emx Wed Mar 16 20:59:41 2005 @@ -1,91 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc under OS/2. -# -# You will need GNU make. -# -# Use this file while in the lib directory with the following statement: -# -# make -f arch/os2/Makefile.emx - -ARCH = arch/os2 -FT_MAKEFILE = $(ARCH)/Makefile.emx - -CC = gcc - -#CFLAGS = -W -Wall -O0 -g -ansi -pedantic -I$(ARCH) -I. -Iextend - -CFLAGS = -Wall -O3 -fno-inline -fomit-frame-pointer \ - -g -ansi -pedantic -I$(ARCH) -I. -Iextend - -#CFLAGS = -Wall -ansi -pedantic -O2 -s -I$(ARCH) -I. -Iextend - -TTFILE = $(ARCH)/os2file.c -TTMEMORY = ./ttmemory.c -TTMUTEX = ./ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxopen.c \ - extend/ftxgdef.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c \ - ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - -SRCD_S = $(ARCH)/freetypd.c -OBJD_S = $(SRCD_S:.c=.o) -OBJDS_S = $(OBJD_S) $(OBJS_X) - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean depend - - -all: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M libttf.a - -debugger: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJDS_S libttfd.a - -$(OBJ_S): $(SRC_S) $(SRC_M) -$(OBJD_S): $(SRCD_S) $(SRC_M) - -libttf.a: $($(LIB_FILES)) - -del $@ - ar src $@ $^ - -libttfd.a: $(OBJDS) - -libttfd.a: $(OBJDS) - -del $@ - ar src $@ $^ - -clean: - -del $(subst /,\,$(OBJS_S)) - -del $(subst /,\,$(OBJS_M)) - -distclean: clean - -del dep.end - -del libttf.a - -depend: $(SRC_S) $(SRC_M) $(SRC_X) - $(CC) -E -M $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.emx Index: xc/extras/FreeType/lib/arch/os2/Makefile.icc diff -u xc/extras/FreeType/lib/arch/os2/Makefile.icc:1.1.1.2 xc/extras/FreeType/lib/arch/os2/Makefile.icc:removed --- xc/extras/FreeType/lib/arch/os2/Makefile.icc:1.1.1.2 Sat Feb 12 23:55:54 2000 +++ xc/extras/FreeType/lib/arch/os2/Makefile.icc Wed Mar 16 20:59:42 2005 @@ -1,73 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for IBM VisualAge C++ under OS/2. -# -# You will need nmake. -# -# Use this file while in the lib directory with the following statement: -# -# nmake -f arch\os2\Makefile.icc -# - -ARCH = arch\os2 -FT_MAKEFILE = $(ARCH)\Makefile.icc -FT_MAKE = $(MAKE) -nologo - -CC = icc -CFLAGS = -O+ -Ti- -Tm- -Sa -W3 -Wpro- -Wcnd- -Q+ -Iarch\os2 -I. -Iextend - -# NOTE: Optimizations are discarded, as it seems that Visual Age -# is buggy when producing ttraster.obj. The resulting code -# crashes under some circumstances (performing vertical dropout -# control when rendering smoothed outlines)! - -TTFILE = $(ARCH)\os2file.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c \ - extend\ftxcmap.c extend\ftxwidth.c extend\ftxsbit.c \ - extend\ftxgsub.c extend\ftxgpos.c extend\ftxopen.c \ - extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c \ - ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -all: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_S)" libttf.lib - -debug: - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_M)" libttf.lib - - -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -$(OBJS_X): - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -$(ARCH)\os2file.obj: - $(CC) -C $(CFLAGS) /Fo$@ $*.c - -libttf.lib: $(LIB_FILES) - !ilib /nologo /noignorecase /nobackup $@ +$?,, - -clean: - -del *.obj - -del extend\*.obj - -del arch\os2\*.obj - -distclean: clean - -del libttf.lib - -# end of Makefile.icc Index: xc/extras/FreeType/lib/arch/os2/Makefile.wat diff -u xc/extras/FreeType/lib/arch/os2/Makefile.wat:1.1.1.2 xc/extras/FreeType/lib/arch/os2/Makefile.wat:removed --- xc/extras/FreeType/lib/arch/os2/Makefile.wat:1.1.1.2 Sat Feb 12 23:55:54 2000 +++ xc/extras/FreeType/lib/arch/os2/Makefile.wat Wed Mar 16 20:59:42 2005 @@ -1,88 +0,0 @@ -# This file is part of the FreeType project. -# -# This builds the Watcom library with Watcom's wcc386 under OS/2. -# -# You'll need Watcom's wmake. -# -# -# Invoke by "wmake -f arch\os2\Makefile.wat" when in the "lib" directory -# -# This will build "freetype\lib\libttf.lib" - -ARCH = arch\os2 -FT_MAKEFILE = $(ARCH)\Makefile.wat -FT_MAKE = wmake -h - - -.EXTENSIONS: -.EXTENSIONS: .lib .obj .c .h -.obj:.;.\extend;.\$(ARCH) -.c:.;.\extend;.\$(ARCH) -.h:.;.\extend;.\$(ARCH) - -CC = wcc386 - -CCFLAGS = /otexanl+ /s /w5 /zq -Iarch\os2 -I. -Iextend - -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -TTFILE_OBJ = ttfile.obj -TTMEMORY_OBJ = ttmemory.obj -TTMUTEX_OBJ = ttmutex.obj - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) -PORT_OBJS = $(TTFILE_OBJ) $(TTMEMORY_OBJ) $(TTMUTEX_OBJ) - -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c & - extend\ftxcmap.c extend\ftxwidth.c extend\ftxsbit.c & - extend\ftxgsub.c extend\ftxgpos.c extend\ftxopen.c & - extend\ftxgdef.c - -OBJS_X = extend\ftxgasp.obj extend\ftxkern.obj extend\ftxpost.obj & - extend\ftxcmap.obj extend\ftxwidth.obj extend\ftxsbit.obj & - extend\ftxgsub.obj extend\ftxgpos.obj extend\ftxopen.obj & - extend\ftxgdef.obj - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c & - ttgload.c ttinterp.c ttload.c ttobjs.c & - ttraster.c ttextend.c $(PORT) - -OBJS_M = ttapi.obj ttcache.obj ttcalc.obj ttcmap.obj & - ttgload.obj ttinterp.obj ttload.obj ttobjs.obj & - ttraster.obj ttextend.obj $(PORT_OBJS) $(OBJS_X) - -SRC_S = freetype.c -OBJ_S = freetype.obj -OBJS_S = $(OBJ_S) $(OBJS_X) - - -.c.obj: - $(CC) $(CCFLAGS) $[* /fo=$[*.obj - -all: .symbolic - $(FT_MAKE) -f $(FT_MAKEFILE) libttf.lib - -debug: .symbolic - $(FT_MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJS_M)" libttf.lib - - -libttf.lib: $(OBJS_M) - wlib -q -n libttf.lib $(OBJS_M) - -# is this correct? Know nothing about wmake and the Watcom compiler... -$(OBJ_S): $(SRC_S) $(SRC_M) - $(CC) $(CCFLAGS) $(SRC_S) /fo=$(OBJ_S) - -clean: .symbolic - @-erase $(OBJS_M) - @-erase *.err - -distclean: .symbolic clean - @-erase libttf.lib - -new: .symbolic - @-wtouch *.c - -# end of Makefile.wat Index: xc/extras/FreeType/lib/arch/os2/freetype.c diff -u xc/extras/FreeType/lib/arch/os2/freetype.c:1.1.1.2 xc/extras/FreeType/lib/arch/os2/freetype.c:removed --- xc/extras/FreeType/lib/arch/os2/freetype.c:1.1.1.2 Sat Feb 12 23:55:55 2000 +++ xc/extras/FreeType/lib/arch/os2/freetype.c Wed Mar 16 20:59:42 2005 @@ -1,32 +0,0 @@ -/* This file is part of the FreeType project */ - -/* Single file library component for OS/2 */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* first include common core components */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#include "os2file.c" -#include "ttmemory.c" -#include "ttmutex.c" - -/* the extensions are compiled separately, but we need to */ -/* include the file ttextend.c if we want to support them */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - -/* END */ Index: xc/extras/FreeType/lib/arch/os2/ft_conf.h diff -u xc/extras/FreeType/lib/arch/os2/ft_conf.h:1.1.1.3 xc/extras/FreeType/lib/arch/os2/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/os2/ft_conf.h:1.1.1.3 Sat Feb 12 23:55:55 2000 +++ xc/extras/FreeType/lib/arch/os2/ft_conf.h Wed Mar 16 20:59:42 2005 @@ -1,239 +0,0 @@ -/******************************************************************* - * - * ft_conf.h (OS/2 version) - * - * High-level interface specification. - * - * Copyright 1996-1998 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This file is used to contain the definition of several - * configuration-specific macros. - * - ******************************************************************/ - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - - -/**********************************************************************/ -/* */ -/* We begin by a series of macros that are automatically set by the */ -/* 'configure' script on Unix. They must be set manually on OS/2, */ -/* so here they are : */ -/* */ -/**********************************************************************/ - -#define OS2 - -/* Define to empty if the keyword "const" does not work. */ -/* #undef const */ - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you need for console I/O functions. */ -#if defined(__EMX__) || defined(__IBMC__) -#define HAVE_CONIO_H -#endif - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/os2/os2file.c diff -u xc/extras/FreeType/lib/arch/os2/os2file.c:1.1.1.2 xc/extras/FreeType/lib/arch/os2/os2file.c:removed --- xc/extras/FreeType/lib/arch/os2/os2file.c:1.1.1.2 Sat Feb 12 23:55:55 2000 +++ xc/extras/FreeType/lib/arch/os2/os2file.c Wed Mar 16 20:59:42 2005 @@ -1,1237 +0,0 @@ -/******************************************************************* - * - * os2file.c (OS2 version) 2.1 - * - * File I/O Component (body). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES: - * - * This implementation relies on the OS/2 file API. It was provided - * by the PM FreeType DLL author, Michal Necasek. - * - ******************************************************************/ - -#include "ttconfig.h" - -#include /* !Mike! */ - -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttengine.h" -#include "ttmutex.h" -#include "ttmemory.h" -#include "ttfile.h" /* our prototypes */ - - -/* For now, we don't define additional error messages in the core library */ -/* to report open-on demand errors. Define these errors as standard ones. */ - -#define TT_Err_Could_Not_ReOpen_File TT_Err_Could_Not_Open_File -#define TT_Err_Could_Not_ReSeek_File TT_Err_Could_Not_Open_File - - - /* This definition is mandatory for each file component! */ - EXPORT_FUNC - const TFileFrame TT_Null_FileFrame = { NULL, 0, 0 }; - - -/* It has proven useful to do some bounds checks during development phase. */ -/* They should probably be undefined for speed reasons in a later release. */ - -#if 0 -#define CHECK_FRAME( frame, n ) \ - do { \ - if ( frame.cursor + n > frame.address + frame.size ) \ - Panic( "Frame boundary error!\n" ); \ - } while ( 0 ) -#else -#define CHECK_FRAME( frame, n ) \ - do { \ - } while ( 0 ) -#endif - - - /* Because a stream can be flushed, i.e., its file handle can be */ - /* closed to save system resources, we must keep the stream's file */ - /* pathname to be able to re-open it on demand when it is flushed. */ - - struct _TStream_Rec - { - Bool opened; /* is the stream handle opened ? */ - String* name; /* the file's pathname */ - Long position; /* current pos. within the file */ - - HFILE file; /* file handle !Mike! */ - Long base; /* stream base in file */ - Long size; /* stream size in file */ - }; - - typedef struct _TStream_Rec TStream_Rec; - typedef TStream_Rec* PStream_Rec; - - - /* We support embedded TrueType files by allowing them to be */ - /* inside any file, at any location, hence the 'base' argument. */ - /* Note, however, that the current implementation does not allow you */ - /* to specify a 'base' index when opening a file. */ - /* (will come later) */ - /* I still don't know if this will turn out useful... - DavidT */ - -#define STREAM2REC( x ) ( (TStream_Rec*)HANDLE_Val( x ) ) - - static TT_Error Stream_Activate ( PStream_Rec stream ); - static TT_Error Stream_Deactivate( PStream_Rec stream ); - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /**** ****/ - /**** N O N R E E N T R A N T I M P L E M E N T A T I O N ****/ - /**** ****/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - - /* In non-reentrant builds, we allocate a single block where we'll */ - /* place all the frames smaller than FRAME_CACHE_SIZE, rather than */ - /* allocating a new block on each access. Bigger frames will be */ - /* malloced normally in the heap. */ - /* */ - /* See TT_Access_Frame() and TT_Forget_Frame() for details. */ - -#define FRAME_CACHE_SIZE 2048 - - /* The TFile_Component structure holds all the data that was */ - /* previously declared static or global in this component. */ - /* */ - /* It is accessible through the 'engine.file_component' */ - /* variable in re-entrant builds, or directly through the */ - /* static 'files' variable in other builds. */ - - struct _TFile_Component - { - TMutex lock; /* used by the thread-safe build only */ - Byte* frame_cache; /* frame cache */ - PStream_Rec stream; /* current stream */ - TFileFrame frame; /* current frame */ - }; - - typedef struct _TFile_Component TFile_Component; - - static TFile_Component files; - -#define CUR_Stream files.stream -#define CUR_Frame files.frame - -#define STREAM_VARS /* void */ -#define STREAM_VAR /* void */ - -/* The macro CUR_Stream denotes the current input stream. */ -/* Note that for the re-entrant version, the 'stream' name has been */ -/* chosen according to the macro STREAM_ARGS. */ - -/* The macro CUR_Frame denotes the current file frame. */ -/* Note that for the re-entrant version, the 'frame' name has been */ -/* chosen according to the macro FRAME_ARGS. */ - -/* The macro STREAM_VAR is used when calling public functions */ -/* that need an 'optional' stream argument. */ - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - TT_Error error; - - MUTEX_Create( files.lock ); - files.stream = NULL; - ZERO_Frame( files.frame ); - - if ( ALLOC( files.frame_cache, FRAME_CACHE_SIZE ) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - FREE( files.frame_cache ); - MUTEX_Destroy( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream org_stream, - TT_Stream* stream ) - { - MUTEX_Lock( files.lock ); /* lock file mutex */ - - *stream = org_stream; /* copy the stream */ - files.stream = STREAM2REC( org_stream ); /* set current stream */ - - Stream_Activate( files.stream ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream target stream - * - * Output : Error code. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - HANDLE_Set( *stream, NULL ); - MUTEX_Release( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( size <= FRAME_CACHE_SIZE ) - { - /* use the cache */ - CUR_Frame.address = files.frame_cache; - CUR_Frame.size = FRAME_CACHE_SIZE; - } - else - { - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - } - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - if ( size > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - CUR_Frame.address = NULL; - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * `size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function truncates `size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - Long readBytes, requested; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( size <= FRAME_CACHE_SIZE ) - { - /* use the cache */ - CUR_Frame.address = files.frame_cache; - CUR_Frame.size = FRAME_CACHE_SIZE; - } - else - { - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - } - - requested = size; - readBytes = CUR_Stream->size - TT_File_Pos( STREAM_VAR ); - if ( size > readBytes ) - size = readBytes; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - if ( requested > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - CUR_Frame.address = NULL; - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - if ( CUR_Frame.size > FRAME_CACHE_SIZE ) - FREE( CUR_Frame.address ); - - ZERO_Frame( CUR_Frame ); - - return TT_Err_Ok; - } - - -#else /* TT_CONFIG_OPTION_THREAD_SAFE */ - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /******** ********/ - /******** R E E N T R A N T I M P L E M E N T A T I O N ********/ - /******** ********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/* a simple macro to access the file component's data */ -#define files ( *((TFile_Component*)engine.file_component) ) - -#define CUR_Stream STREAM2REC( stream ) /* re-entrant macros */ -#define CUR_Frame (*frame) - -#define STREAM_VARS stream, -#define STREAM_VAR stream - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Duplicates a stream for a new usage. - * - * Input : input_stream source stream to duplicate - * copy address of target duplicate stream - * - * Output : error code. - * The target stream is set to NULL in case of failure. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream input_stream, - TT_Stream* copy ) - { - PStream_Rec rec = STREAM2REC( input_stream ); - - return TT_Open_Stream( rec->name, copy ); - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream target stream - * - * Output : - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - return TT_Close_Stream( stream ); - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS int size ) - { - TT_Error error; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - FREE( CUR_Frame.address ); - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * `size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes: The function truncates `size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that `size' is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS int size ) - { - TT_Error error; - Long readBytes; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - CUR_Frame.size = size; - - readBytes = CUR_Stream->size - TT_File_Pos( STREAM_VAR ); - if ( size > readBytes ) - size = readBytes; - - error = TT_Read_File( STREAM_VARS (void*)CUR_Frame.address, size ); - if ( error ) - { - FREE( CUR_Frame.address ); - CUR_Frame.size = 0; - } - - CUR_Frame.cursor = CUR_Frame.address; - return error; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - FREE( CUR_Frame.address ); - ZERO_Frame( CUR_Frame ); - - return TT_Err_Ok; - } - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /*********** ***********/ - /*********** C O M M O N I M P L E M E N T A T I O N ***********/ - /*********** ***********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/******************************************************************* - * - * Function : Stream_Activate - * - * Description : activates a stream, this will either: - * - open a new file handle if the stream is closed - * - move the stream to the head of the linked list - * - * Input : stream the stream to activate - * - * Output : error condition. - * - * Note : this function is also called with fresh new streams - * created by TT_Open_Stream(). They have their 'size' - * field set to -1. - * - ******************************************************************/ - - static TT_Error Stream_Activate( PStream_Rec stream ) - { - ULONG ulAction; /* !Mike! */ - - if ( !stream->opened ) - { -#if 0 - if ( !(stream->file = fopen( stream->name, "rb" )) ) /* !Mike! */ -#endif - -/* XXX : Strange. GCC/EMX wants an (Byte*) for the file name? */ -#ifdef __EMX__ - - if ( DosOpen( (Byte*)stream->name, &(stream->file), - &ulAction, 0, - 0, OPEN_ACTION_OPEN_IF_EXISTS, - OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL ) ) - return TT_Err_Could_Not_ReOpen_File; - -#else - - if ( DosOpen( stream->name, &(stream->file), - &ulAction, 0, - 0, OPEN_ACTION_OPEN_IF_EXISTS, - OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL ) ) - return TT_Err_Could_Not_ReOpen_File; - -#endif /* __EMX__ */ - - stream->opened = TRUE; - - /* A newly created stream has a size field of -1 */ - if ( stream->size < 0 ) - { -#if 0 - fseek( stream->file, 0, SEEK_END ); /* !Mike! */ - stream->size = ftell( stream->file ); -#endif - - DosSetFilePtr( stream->file, 0, FILE_END, (ULONG *)&(stream->size) ); -#if 0 - fseek( stream->file, 0, SEEK_SET ); -#endif - - DosSetFilePtr( stream->file, 0, FILE_BEGIN, &ulAction ); - } - - /* Reset cursor in file */ - if ( stream->position ) - { -#if 0 /* !Mike! */ - if ( fseek( stream->file, stream->position, SEEK_SET ) != 0 ) -#endif - - if ( DosSetFilePtr( stream->file, stream->position, - FILE_BEGIN, &ulAction ) ) - { - /* error during seek */ -#if 0 - fclose( stream->file ); /* !Mike! */ -#endif - - DosClose( stream->file ); - stream->opened = FALSE; - return TT_Err_Could_Not_ReSeek_File; - } - } - } - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Stream_DeActivate - * - * Description : deactivates a stream, this will: - * - close its file handle if it was opened - * - remove it from the opened list if necessary - * - * Input : stream the stream to deactivate - * - * Output : Error condition - * - * Note : the function is called whenever a stream is deleted - * (_not_ when a stream handle's is closed due to an - * activation). However, the stream record isn't - * destroyed by it... - * - ******************************************************************/ - - static TT_Error Stream_Deactivate( PStream_Rec stream ) - { - if ( stream->opened ) - { - /* Save its current position within the file */ -#if 0 - stream->position = ftell( stream->file ); /* !Mike! */ -#endif - - DosSetFilePtr( stream->file, 0, FILE_CURRENT, - (ULONG *)&(stream->position) ); -#if 0 - fclose( stream->file ); /* !Mike! */ -#endif - - DosClose( stream->file ); - stream->file = 0; - stream->opened = FALSE; - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Stream_Size - * - * Description : Returns the length of a given stream, even if it - * is flushed. - * - * Input : stream the stream - * - * Output : length of stream in bytes. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Stream_Size( TT_Stream stream ) - { - PStream_Rec rec = STREAM2REC( stream ); - - - if ( rec ) - return rec->size; - else - return 0; /* invalid stream - return 0 */ - } - - -/******************************************************************* - * - * Function : TT_Open_Stream - * - * Description : Opens the font file and saves the total file size. - * - * Input : error address of stream's error variable - * (re-entrant build only) - * filepathname pathname of the file to open - * stream address of target TT_Stream structure - * - * Output : SUCCESS on sucess, FAILURE on error. - * The target stream is set to -1 in case of failure. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Open_Stream( const String* filepathname, - TT_Stream* stream ) - { - int len; - TT_Error error; - PStream_Rec stream_rec; - - - if ( ALLOC( *stream, sizeof ( TStream_Rec ) ) ) - return error; - - stream_rec = STREAM2REC( *stream ); - - stream_rec->file = NULLHANDLE; /* !Mike! */ - stream_rec->size = -1; - stream_rec->base = 0; - stream_rec->opened = FALSE; - stream_rec->position = 0; - - len = strlen( filepathname ) + 1; - if ( ALLOC( stream_rec->name, len ) ) - goto Fail; - - strncpy( (String*)stream_rec->name, filepathname, len ); - - error = Stream_Activate( stream_rec ); - if ( error ) - goto Fail_Activate; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - CUR_Stream = stream_rec; -#endif - - return TT_Err_Ok; - - Fail_Activate: - FREE( stream_rec->name ); - Fail: - FREE( stream_rec ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Close_Stream - * - * Description : Closes a stream. - * - * Input : stream address of target TT_Stream structure - * - * Output : SUCCESS (always). - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Close_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - Stream_Deactivate( rec ); - FREE( rec->name ); - FREE( rec ); - - HANDLE_Set( *stream, NULL ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Flush_Stream - * - * Description : Flushes a stream, i.e., closes its file handle. - * - * Input : stream address of target TT_Stream structure - * - * Output : Error code - * - * NOTE : Never flush the current opened stream. This means that - * you should _never_ call this function between a - * TT_Use_Stream() and a TT_Done_Stream()! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Flush_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - if ( rec ) - { - Stream_Deactivate( rec ); - return TT_Err_Ok; - } - else - return TT_Err_Invalid_Argument; - } - - -/******************************************************************* - * - * Function : TT_Seek_File - * - * Description : Seeks the file cursor to a different position. - * - * Input : position new position in file - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Seek_File( STREAM_ARGS long position ) - { - ULONG ibActual; /* !Mike! */ - - - position += CUR_Stream->base; - -#if 0 - if ( fseek( CUR_Stream->file, position, SEEK_SET ) ) /* !Mike! */ -#endif - - if ( DosSetFilePtr( CUR_Stream->file, position, FILE_BEGIN , &ibActual ) ) - return TT_Err_Invalid_File_Offset; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Skip_File - * - * Description : Skips forward the file cursor. - * - * Input : distance number of bytes to skip - * - * Output : see TT_Seek_File() - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Skip_File( STREAM_ARGS long distance ) - { - ULONG ibActual; /* !Mike! */ - - -#if 0 - return TT_Seek_File( STREAM_VARS ftell( CUR_Stream->file ) - - CUR_Stream->base + distance ); /* !Mike! */ -#endif - - DosSetFilePtr( CUR_Stream->file, 0, FILE_CURRENT, &ibActual ); - return TT_Seek_File( STREAM_VARS ibActual - CUR_Stream->base + distance ); - } - - -/******************************************************************* - * - * Function : TT_Read_File - * - * Description : Reads a chunk of the file and copies it to memory. - * - * Input : buffer target buffer - * count length in bytes to read - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_File( STREAM_ARGS void* buffer, long count ) - { - ULONG cbActual; /* !Mike! */ - -#if 0 /* !Mike! */ - if ( fread( buffer, 1, count, CUR_Stream->file ) != (unsigned long)count ) -#endif - - DosRead( CUR_Stream->file, buffer, count, &cbActual ); - if ( cbActual != (unsigned long)count ) - return TT_Err_Invalid_File_Read; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Read_At_File - * - * Description : Reads file at a specified position. - * - * Input : position position to seek to before read - * buffer target buffer - * count number of bytes to read - * - * Output : SUCCESS on success. FAILURE if error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_At_File( STREAM_ARGS long position, - void* buffer, - long count ) - { - TT_Error error; - - - if ( ( error = TT_Seek_File( STREAM_VARS position ) ) || - ( error = TT_Read_File( STREAM_VARS buffer, count ) ) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_File_Pos - * - * Description : Returns current file seek pointer. - * - * Input : none - * - * Output : current file position - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_File_Pos( STREAM_ARG ) - { - ULONG ibActual; /* !Mike! */ - - -#if 0 - return ftell( CUR_Stream->file ) - CUR_Stream->base; /* !Mike! */ -#endif - - DosSetFilePtr( CUR_Stream->file, 0, FILE_CURRENT, &ibActual ); - return ibActual - CUR_Stream->base; - } - - -/******************************************************************* - * - * Function : GET_Byte - * - * Description : Extracts a byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted Byte. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - Byte TT_Get_Byte( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Byte)(*CUR_Frame.cursor++); - } -#endif - -/******************************************************************* - * - * Function : GET_Char - * - * Description : Extracts a signed byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted char. - * - ******************************************************************/ - - EXPORT_FUNC - Char TT_Get_Char( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Char)(*CUR_Frame.cursor++); - } - - -/******************************************************************* - * - * Function : GET_Short - * - * Description : Extracts a short from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted short. - * - ******************************************************************/ - - EXPORT_FUNC - short TT_Get_Short( FRAME_ARG ) - { - short getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((short)CUR_Frame.cursor[0] << 8) | - (short)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } - - -/******************************************************************* - * - * Function : GET_UShort - * - * Description : Extracts an unsigned short from the frame. - * - * Input : None or current frame - * - * Output : Extracted ushort. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - unsigned short TT_Get_UShort( FRAME_ARG ) - { - unsigned short getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((unsigned short)CUR_Frame.cursor[0] << 8) | - (unsigned short)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } -#endif - -/******************************************************************* - * - * Function : GET_Long - * - * Description : Extracts a long from the frame. - * - * Input : None or current frame - * - * Output : Extracted long. - * - ******************************************************************/ - - EXPORT_FUNC - long TT_Get_Long( FRAME_ARG ) - { - long getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ((long)CUR_Frame.cursor[0] << 24) | - ((long)CUR_Frame.cursor[1] << 16) | - ((long)CUR_Frame.cursor[2] << 8 ) | - (long)CUR_Frame.cursor[3]; - - CUR_Frame.cursor += 4; - - return getlong; - } - - -/******************************************************************* - * - * Function : GET_ULong - * - * Description : Extracts an unsigned long from the frame. - * - * Input : None - * - * Output : Extracted ulong. - * - ******************************************************************/ -#if 0 - EXPORT_FUNC - unsigned long TT_Get_ULong( FRAME_ARG ) - { - unsigned long getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ( ((unsigned long)CUR_Frame.cursor[0] << 24) | - ((unsigned long)CUR_Frame.cursor[1] << 16) | - ((unsigned long)CUR_Frame.cursor[2] << 8 ) | - (unsigned long)CUR_Frame.cursor[3] ); - - CUR_Frame.cursor += 4; - - return getlong; - } -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/unix/.cvsignore diff -u xc/extras/FreeType/lib/arch/unix/.cvsignore:1.1.1.1 xc/extras/FreeType/lib/arch/unix/.cvsignore:removed --- xc/extras/FreeType/lib/arch/unix/.cvsignore:1.1.1.1 Sat Feb 12 23:55:56 2000 +++ xc/extras/FreeType/lib/arch/unix/.cvsignore Wed Mar 16 20:59:42 2005 @@ -1 +0,0 @@ -Makefile Index: xc/extras/FreeType/lib/arch/unix/Makefile.in diff -u xc/extras/FreeType/lib/arch/unix/Makefile.in:1.1.1.3 xc/extras/FreeType/lib/arch/unix/Makefile.in:removed --- xc/extras/FreeType/lib/arch/unix/Makefile.in:1.1.1.3 Sat Feb 12 23:55:56 2000 +++ xc/extras/FreeType/lib/arch/unix/Makefile.in Wed Mar 16 20:59:42 2005 @@ -1,244 +0,0 @@ -# This file is part of the FreeType project. -# -# lib/arch/unix/Makefile.in - -ARCH = arch/unix -FT_MAKEFILE = $(ARCH)/Makefile - -RM = @RM@ -RMF = @RM@ -f -RMDIR = @RMDIR@ -LN_S = @LN_S@ - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -VPATH = @srcdir@/../.. -srcdir = @srcdir@/../.. - -top_builddir=.. - -CC = @CC@ -CPP = @CPP@ - -LIBTOOL = $(top_builddir)/libtool -MKINSTALLDIRS = $(srcdir)/../mkinstalldirs - -version_info = @version_info@ - -include $(top_builddir)/MakeSub - -############### PORTABILITY COMPONENTS ######################## - -# location of memory component -MEMSRC = ttmemory.c - -# location of file component -FILESRC = @TT_FILE_COMPONENT@ - -# location of mutex component -MUTEXSRC = ttmutex.c - -# location of default extensions -FTEXTDIR = $(srcdir)/extend - - -# default extensions sources -EXTSRC = $(FTEXTDIR)/ftxkern.c \ - $(FTEXTDIR)/ftxgasp.c \ - $(FTEXTDIR)/ftxpost.c \ - $(FTEXTDIR)/ftxcmap.c \ - $(FTEXTDIR)/ftxsbit.c \ - $(FTEXTDIR)/ftxwidth.c \ - $(FTEXTDIR)/ftxerr18.c \ - $(FTEXTDIR)/ftxgsub.c \ - $(FTEXTDIR)/ftxgpos.c \ - $(FTEXTDIR)/ftxgdef.c \ - $(FTEXTDIR)/ftxopen.c - -EXTOBJ = ftxkern.lo \ - ftxgasp.lo \ - ftxpost.lo \ - ftxcmap.lo \ - ftxsbit.lo \ - ftxwidth.lo \ - ftxerr18.lo \ - ftxgsub.lo \ - ftxgpos.lo \ - ftxgdef.lo \ - ftxopen.lo - -# all engine sources -SRC_M = $(srcdir)/ttapi.c \ - $(srcdir)/ttcache.c \ - $(srcdir)/ttcalc.c \ - $(srcdir)/ttcmap.c \ - $(srcdir)/ttdebug.c \ - $(srcdir)/ttextend.c \ - $(srcdir)/ttgload.c \ - $(srcdir)/ttinterp.c \ - $(srcdir)/ttload.c \ - $(srcdir)/ttobjs.c \ - $(srcdir)/ttraster.c \ - $(srcdir)/$(FILESRC) \ - $(srcdir)/$(MEMSRC) \ - $(srcdir)/$(MUTEXSRC) -SRC_S = $(srcdir)/$(ARCH)/freetype.c - -# all header files -HEADERS = $(srcdir)/freetype.h \ - $(srcdir)/fterrid.h \ - $(srcdir)/ftnameid.h \ - $(FTEXTDIR)/ftxkern.h \ - $(FTEXTDIR)/ftxgasp.h \ - $(FTEXTDIR)/ftxcmap.h \ - $(FTEXTDIR)/ftxsbit.h \ - $(FTEXTDIR)/ftxpost.h \ - $(FTEXTDIR)/ftxwidth.h \ - $(FTEXTDIR)/ftxerr18.h \ - $(FTEXTDIR)/ftxgsub.h \ - $(FTEXTDIR)/ftxgpos.h \ - $(FTEXTDIR)/ftxgdef.h \ - $(FTEXTDIR)/ftxopen.h - -# all engine objects -OBJ_M = ttapi.lo \ - ttcache.lo \ - ttcalc.lo \ - ttcmap.lo \ - ttdebug.lo \ - ttextend.lo \ - ttgload.lo \ - ttinterp.lo \ - ttload.lo \ - ttobjs.lo \ - ttraster.lo \ - file.lo \ - memory.lo \ - mutex.lo \ - $(EXTOBJ) -OBJ_S = freetype.lo $(EXTOBJ) - - -# include paths -INCLUDES = -I. -I$(top_builddir) -I$(srcdir) -I$(FTEXTDIR) - -# C flags -CFLAGS = @CFLAGS@ @XX_CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -FT_CFLAGS = $(CFLAGS) $(INCLUDES) - -# linker flags -FT_LIBS = @LIBS@ - -# i18n stuff -LOCALEDIR = @LOCALEDIR@ - - -all: do_link - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJ_S)" libttf.la - -debug: do_link - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES="$(OBJ_M)" libttf.la - - -do_link: - -$(RMF) memory.c file.c mutex.c - $(LN_S) $(srcdir)/$(MEMSRC) memory.c - $(LN_S) $(srcdir)/$(FILESRC) file.c - $(LN_S) $(srcdir)/$(MUTEXSRC) mutex.c - - -.SUFFIXES: .lo -.c.lo: - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $< - -ftxkern.lo: $(FTEXTDIR)/ftxkern.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxkern.c - -ftxgasp.lo: $(FTEXTDIR)/ftxgasp.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxgasp.c - -ftxpost.lo: $(FTEXTDIR)/ftxpost.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxpost.c - -ftxcmap.lo: $(FTEXTDIR)/ftxcmap.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxcmap.c - -ftxsbit.lo: $(FTEXTDIR)/ftxsbit.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxsbit.c - -ftxwidth.lo: $(FTEXTDIR)/ftxwidth.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxwidth.c - -ftxerr18.lo: $(FTEXTDIR)/ftxerr18.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) \ - -DLOCALEDIR='"$(LOCALEDIR)"' \ - $(FTEXTDIR)/ftxerr18.c - -ftxgsub.lo: $(FTEXTDIR)/ftxgsub.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxgsub.c - -ftxgpos.lo: $(FTEXTDIR)/ftxgpos.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxgpos.c - -ftxgdef.lo: $(FTEXTDIR)/ftxgdef.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxgdef.c - -ftxopen.lo: $(FTEXTDIR)/ftxopen.c - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) $(FTEXTDIR)/ftxopen.c - -freetype.lo: $(SRC_S) $(SRC_M) - $(LIBTOOL) --mode=compile $(CC) -c $(FT_CFLAGS) \ - -DLOCALEDIR='"$(LOCALEDIR)"' \ - -DTT_MAKE_OPTION_SINGLE_OBJECT \ - $(SRC_S) - -libttf.la: $(LIB_FILES) - $(LIBTOOL) --mode=link $(CC) -o libttf.la $(LIB_FILES) \ - -rpath $(libdir) \ - -version-info $(version_info) $(FT_LIBS) - -install: libttf.la - $(MKINSTALLDIRS) $(libdir) $(includedir)/freetype - $(LIBTOOL) --mode=install $(INSTALL) libttf.la $(libdir) - -for P in $(HEADERS) ; do \ - $(INSTALL_DATA) $$P $(includedir)/freetype ; \ - done - -uninstall: - -$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/libttf.la - -$(RMF) $(includedir)/freetype/* - -$(RMDIR) $(includedir)/freetype - -clean: - -$(RMF) $(OBJ_S) $(OBJ_M) *.o - -distclean: clean - -$(RMF) file.c memory.c mutex.c - -$(RMF) libttf.la - -$(RMF) *.orig *~ core *.core - -$(RMF) $(ARCH)/Makefile - -$(RMF) .libs/* - -$(RMDIR) .libs - -depend: do_link - (echo '/^#.* PUT NO STUFF BELOW/,$$d' ; echo w ; echo q) | \ - ed - $(ARCH)/Makefile - echo '# Dependencies generated by make depend: PUT NO STUFF BELOW' \ - >> $(ARCH)/Makefile - for file in $(SRC_S) $(SRC_M) $(EXTSRC) ; do \ - $(CPP) $(CPPFLAGS) $(INCLUDES) $$file | \ - sed -n -e 's|^# [1-9][0-9]* "\([^/].*\.h\)".*|\1|p' \ - -e 's|^# [1-9][0-9]* "\($(srcdir)/.*\.h\)".*|\1|p' | \ - sed -e 's|/\./|.|g' -e "s/^/`basename $$file .c`.lo: /" ; \ - done | \ - sort -u | \ - awk '{ if (LINE == 1) \ - { line = last = $$1 } \ - else if ($$1 != last) \ - { print line ; line = last = $$1 } \ - line = line " " $$2 } \ - END { print line }' >> $(ARCH)/Makefile - -# Dependencies generated by make depend: PUT NO STUFF BELOW Index: xc/extras/FreeType/lib/arch/unix/freetype.c diff -u xc/extras/FreeType/lib/arch/unix/freetype.c:1.3 xc/extras/FreeType/lib/arch/unix/freetype.c:removed --- xc/extras/FreeType/lib/arch/unix/freetype.c:1.3 Sun Feb 13 00:03:56 2000 +++ xc/extras/FreeType/lib/arch/unix/freetype.c Wed Mar 16 20:59:42 2005 @@ -1,31 +0,0 @@ -/* This file is an Xserver-specific version */ - -/* $XFree86: xc/extras/FreeType/lib/arch/unix/freetype.c,v 1.3 2000/02/13 05:03:56 dawes Exp $ */ - -/* Single object library component for Unix */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -#ifdef HAVE_MMAP -#include "ttmmap.c" -#else -#include "ttfile.c" -#endif -#include "ttmemory.c" -#include "ttmutex.c" - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/unix/ttmmap.c diff -u xc/extras/FreeType/lib/arch/unix/ttmmap.c:1.1.1.2 xc/extras/FreeType/lib/arch/unix/ttmmap.c:removed --- xc/extras/FreeType/lib/arch/unix/ttmmap.c:1.1.1.2 Sat Feb 12 23:55:56 2000 +++ xc/extras/FreeType/lib/arch/unix/ttmmap.c Wed Mar 16 20:59:42 2005 @@ -1,1027 +0,0 @@ -/******************************************************************* - * - * ttmmap.c 2.0 - * - * Memory-Mapped file component ( replaces ttfile.c ). - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Changes between 2.0 and 1.3 : - * - * - adopted new design/separation introduced in ttfile.c 2.0 - * - ******************************************************************/ - -#include "ttconfig.h" - -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include -#ifndef MAP_FILE -#define MAP_FILE 0x00 -#endif - -/* - * The prototype for munmap() is not provided on SunOS. This needs to - * have a check added later to see if the GNU C library is being used. - * If so, then this prototype is not needed. - */ -#if defined(__sun__) && !defined(SVR4) && !defined(__SVR4) - extern int munmap( caddr_t addr, int len ); -#endif - -#include -#ifdef HAVE_FCNTL_H -#include -#endif - - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttengine.h" -#include "ttmutex.h" -#include "ttmemory.h" -#include "ttfile.h" /* our prototypes */ - - /* This definition is mandatory for each file component! */ - EXPORT_FUNC - const TFileFrame TT_Null_FileFrame = { NULL, 0, 0 }; - - /* It has proven useful to do some bounds checks during */ - /* development phase. Define DEBUG_FILE when compiling */ - /* this component to enable them. */ - -#ifdef DEBUG_FILE -#define CHECK_FRAME( frame, n ) \ - do { \ - if ( frame.cursor + n > frame.address + frame.size ) \ - Panic( "Frame boundary error!\n" ); \ - } while ( 0 ) -#else -#define CHECK_FRAME( frame, n ) \ - do { \ - } while( 0 ) -#endif - - struct _TFileMap - { - String* base; /* base address of mapped file */ - Int refcount; /* reference count for mmaped region */ - Long size; /* stream size in file */ - Long offset; /* offset in file */ - }; - - typedef struct _TFileMap TFileMap; - -#define MAP_Address( map ) (Byte*)( (map)->base + (map)->offset ) - - /* The stream record structure */ - typedef struct _TStream_Rec - { - TFileMap* map; /* mapped file description */ - Long pos ; /* cursor in mapped file */ - } TStream_Rec; - - typedef TStream_Rec* PStream_Rec; - -#define STREAM2REC( x ) ( (TStream_Rec*)HANDLE_Val( x ) ) - - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /**** ****/ - /**** N O N R E E N T R A N T I M P L E M E N T A T I O N ****/ - /**** ****/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - - /* The TFile_Component structure holds all the data that was */ - /* previously declared static or global in this component. */ - /* */ - /* It is accessible through the 'engine.file_component' */ - /* variable in re-entrant builds, or directly through the */ - /* static 'files' variable in other builds. */ - - struct _TFile_Component - { - TMutex lock; /* used by the thread-safe build only */ - PStream_Rec stream; /* current stream */ - TFileFrame frame; /* current frame */ - }; - - typedef struct _TFile_Component TFile_Component; - -/* The macro CUR_Stream denotes the current input stream */ -/* Note that for the re-entrant version, the 'stream' name has been */ -/* chosen according to the macro STREAM_ARGS. */ - -/* The macro CUR_Frame denotes the current file frame */ -/* Note that for the re-entrant version, the 'frame' name has been */ -/* chosen according to the macro FRAME_ARGS. */ - -/* The macro STREAM_VAR is used when calling public functions */ -/* that need an 'optional' stream argument. */ - -#define CUR_Stream files.stream /* thread-safe macros */ -#define CUR_Frame files.frame - -#define STREAM_VARS /* void */ -#define STREAM_VAR /* void */ - - /* the 'files' variable is only defined in non-reentrant builds */ - - static TFile_Component files; - - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - MUTEX_Create( files.lock ); - files.stream = NULL; - ZERO_Frame( files.frame ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - MUTEX_Destroy( files.lock ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream org_stream, - TT_Stream* stream ) - { - MUTEX_Lock( files.lock ); - *stream = org_stream; - files.stream = STREAM2REC( org_stream ); /* set current stream */ - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream - * - * Output : Error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - HANDLE_Set( *stream, NULL ); - MUTEX_Release( files.lock ); - - return TT_Err_Ok; - } - -#else /* TT_CONFIG_OPTION_THREAD_SAFE */ - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /******** ********/ - /******** R E E N T R A N T I M P L E M E N T A T I O N ********/ - /******** ********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -#define CUR_Stream STREAM2REC( stream ) /* re-entrant macros */ -#define CUR_Frame (*frame) - -#define STREAM_VARS stream, -#define STREAM_VAR stream - - -/******************************************************************* - * - * Function : TTFile_Init - * - * Description : Initializes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Init( PEngine_Instance engine ) - { - engine.file_component = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalizes the File component. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTFile_Done( PEngine_Instance engine ) - { - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Copies or duplicates a given stream. - * - * Input : org_stream original stream - * stream target stream (copy or duplicate) - * - * Output : Error code. The output stream is set to NULL in - * case of Failure. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Use_Stream( TT_Stream input_stream, - TT_Stream* copy ) - { - TT_Error error; - PStream_Rec stream_rec; - PStream_Rec copy_rec; - - - stream_rec = STREAM2REC( input_stream ); - - if ( ALLOC( copy_rec, sizeof ( TStream_Rec ) ) ) - goto Fail; - - HANDLE_Set( *copy, copy_rec ); - - copy_rec->map->refcount++; - copy_rec->pos = 0; - - return TT_Err_Ok; - - Fail: - HANDLE_Set( *copy, NULL ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Releases a given stream. - * - * Input : stream - * - * Output : error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Done_Stream( TT_Stream* stream ) - { - return TT_Close_Stream( stream ); - } - -#endif /* TT_CONFIG_OPTION_THREAD_SAFE */ - - - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - /*********** ***********/ - /*********** C O M M O N I M P L E M E N T A T I O N ***********/ - /*********** ***********/ - /*******************************************************************/ - /*******************************************************************/ - /*******************************************************************/ - -/******************************************************************* - * - * Function : AllocateMap - * - * Description : Allocates a new map from the table. - * - * Output : Pointer to new stream rec. NULL in case of failure. - * - ******************************************************************/ - - static - TFileMap* Allocate_Map( void ) - { - TFileMap* result; - - - if ( MEM_Alloc( result, sizeof ( TFileMap ) ) ) - return NULL; - - result->refcount = 1; - return result; - } - - -/******************************************************************* - * - * Function : ReleaseMap - * - * Description : Releases a used map to the table if reference i - * counter reaches zero. - * - * Input : map - * - * Output : None. - * - * Note : Called by TT_Close_File() - * - ******************************************************************/ - - static - void Release_Map ( TFileMap* map ) - { - map->refcount--; - if ( map->refcount <= 0 ) - { - munmap ( (void*)map->base, map->size ); - FREE( map ); - } - } - - -/******************************************************************* - * - * Function : TT_Open_Stream - * - * Description : Opens the font file and saves the total file size. - * - * Input : error address of stream's error variable - * (re-entrant build only). - * filepathname pathname of the file to open - * stream address of target TT_Stream structure - * - * Output : SUCCESS on success, FAILURE on error. - * The target stream is set to -1 in case of failure. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Open_Stream( const String* filepathname, - TT_Stream* stream ) - { - TT_Error error; - Int file; - PStream_Rec stream_rec; - TFileMap* map; - struct stat stat_buf; - - - if ( ALLOC( *stream, sizeof ( TStream_Rec ) ) ) - return error; - - map = Allocate_Map(); - if ( !map ) - { - error = TT_Err_Out_Of_Memory; - goto Memory_Fail; - } - - stream_rec = STREAM2REC( *stream ); - - file = open( (String*)filepathname, O_RDONLY ); - if ( file < 0 ) - goto File_Fail; - - if ( fstat( file, &stat_buf ) < 0 ) - goto Map_Fail; - - map->offset = 0; - map->size = stat_buf.st_size + map->offset; - map->base = mmap( NULL, - map->size, - PROT_READ, - MAP_FILE | MAP_PRIVATE, - file, - 0 ); - - if ( (long)map->base == -1 ) - goto Map_Fail; - - close( file ); - - stream_rec->map = map; - stream_rec->pos = 0; - -#ifndef TT_CONFIG_OPTION_THREAD_SAFE - CUR_Stream = stream_rec; -#endif - - return TT_Err_Ok; - - Map_Fail: - close( file ); - - File_Fail: - error = TT_Err_Could_Not_Open_File; - FREE( map ); - - Memory_Fail: - FREE( *stream ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Close_Stream - * - * Description : Closes a stream. - * - * Input : stream - * - * Output : SUCCESS (always) - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TT_Close_Stream( TT_Stream* stream ) - { - PStream_Rec rec = STREAM2REC( *stream ); - - - Release_Map( rec->map ); - FREE( rec ); - - HANDLE_Set( *stream, NULL ); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Flush_Stream - * - * Description : Flushes a stream, i.e., closes its file handle. - * - * Input : stream address of target TT_Stream structure - * - * Output : Error code - * - * NOTE : Never flush the current opened stream. This means that - * you should _never_ call this function between a - * TT_Use_Stream() and a TT_Done_Stream()! - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Flush_Stream( TT_Stream* stream ) - { - /* XXX - DUMMY IMPLEMENTATION */ - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Stream_Size - * - * Description : Returns the length of a given stream, even if it - * is flushed. - * - * Input : stream the stream - * - * Output : Length of stream in bytes. - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Stream_Size( TT_Stream stream ) - { - PStream_Rec rec = STREAM2REC( stream ); - - - if ( rec ) - return rec->map->size; - else - return 0; /* invalid stream - return 0 */ - } - - -/******************************************************************* - * - * Function : TT_Seek_File - * - * Description : Seeks the file cursor to a different position. - * - * Input : position new position in file - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Seek_File( STREAM_ARGS Long position ) - { - if ( position > CUR_Stream->map->size ) - return TT_Err_Invalid_File_Offset; - - CUR_Stream->pos = position; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Skip_File - * - * Description : Skips forward the file cursor. - * - * Input : distance number of bytes to skip - * - * Output : see TT_Seek_File - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Skip_File( STREAM_ARGS Long distance ) - { - return TT_Seek_File( STREAM_VARS CUR_Stream->pos + distance ); - } - - -/******************************************************************* - * - * Function : TT_Read_File - * - * Description : Reads a chunk of the file and copies it to memory. - * - * Input : buffer target buffer - * count length in bytes to read - * - * Output : SUCCESS on success. FAILURE if out of range. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_File( STREAM_ARGS void* buffer, Long count ) - { - if ( CUR_Stream->pos + count > CUR_Stream->map->size ) - return TT_Err_Invalid_File_Read; - - MEM_Copy( buffer, - MAP_Address( CUR_Stream->map ) + CUR_Stream->pos, count ); - CUR_Stream->pos += count; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Read_At_File - * - * Description : Reads file at a specified position. - * - * Input : position position to seek to before read - * buffer target buffer - * count number of bytes to read - * - * Output : SUCCESS on success. FAILURE if error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Read_At_File( STREAM_ARGS Long position, - void* buffer, - Long count ) - { - TT_Error error; - - - if ( (error = TT_Seek_File( STREAM_VARS position )) || - (error = TT_Read_File( STREAM_VARS buffer, count )) ) - return error; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_File_Pos - * - * Description : Returns current file seek pointer. - * - * Input : none - * - * Output : current file position - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_File_Pos( STREAM_ARG ) - { - return CUR_Stream->pos; - } - - -/******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : Error code - * - * Notes: The function fails if the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly (which usually means that aSize is - * too big in both cases). - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - if ( CUR_Stream->pos + size > CUR_Stream->map->size ) - return TT_Err_Invalid_Frame_Access; - - CUR_Frame.size = size; - CUR_Frame.address = MAP_Address( CUR_Stream->map ) + CUR_Stream->pos; - CUR_Frame.cursor = CUR_Frame.address; - - CUR_Stream->pos += size; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * 'size' bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx() - * functions easily. - * - * Input : size number of bytes to access. - * - * Output : Error code - * - * Notes: The function truncates 'size' if the byte range is not - * within the file. - * - * It will fail if there is not enough memory to cache - * the bytes properly (which usually means that aSize is - * too big). - * - * It will fail if you make two consecutive calls - * to TT_Access_Frame(), without a TT_Forget_Frame() between - * them. - * - * The only difference with TT_Access_Frame() is that we - * check that the frame is within the current file. We - * otherwise truncate it. The 'overflow' is set to zero. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Check_And_Access_Frame( STREAM_ARGS FRAME_ARGS Long size ) - { - TT_Error error; - Long readBytes; - - - if ( CUR_Frame.address != NULL ) - return TT_Err_Nested_Frame_Access; - - readBytes = CUR_Stream->map->size - CUR_Stream->pos; - if ( size > readBytes ) - { - /* There is overflow, we allocate a new block then */ - if ( ALLOC( CUR_Frame.address, size ) ) - return error; - - CUR_Frame.size = size; - - /* copy the valid part */ - MEM_Copy( CUR_Frame.address, - MAP_Address( CUR_Stream->map ) + CUR_Stream->pos, - readBytes ); - } - else - { - CUR_Frame.size = size; - CUR_Frame.address = MAP_Address( CUR_Stream->map ) + CUR_Stream->pos; - } - - CUR_Frame.cursor = CUR_Frame.address; - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading. - * - * Input : None - * - * Output : SUCCESS on success. FAILURE on error. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Forget_Frame( FRAME_ARG ) - { - if ( CUR_Frame.address == NULL ) - return TT_Err_Nested_Frame_Access; - - /* If we were using a duplicate in case of overflow, free it now */ - if ( CUR_Frame.address < (Byte*)CUR_Stream->map->base || - CUR_Frame.address >= (Byte*)CUR_Stream->map->base + - CUR_Stream->map->size ) - FREE( CUR_Frame.address ); - - ZERO_Frame( files.frame ); - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : GET_Byte - * - * Description : Extracts a byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted Byte - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - Byte TT_Get_Byte( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Byte)(*CUR_Frame.cursor++); - } - -#endif - - -/******************************************************************* - * - * Function : GET_Char - * - * Description : Extracts a signed byte from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted char - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Char TT_Get_Char( FRAME_ARG ) - { - CHECK_FRAME( CUR_Frame, 1 ); - - return (Char)(*CUR_Frame.cursor++); - } - - -/******************************************************************* - * - * Function : GET_Short - * - * Description : Extracts a short from the current file frame. - * - * Input : None or current frame - * - * Output : Extracted short - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Short TT_Get_Short( FRAME_ARG ) - { - Short getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((Short)CUR_Frame.cursor[0] << 8) | - (Short)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } - - -/******************************************************************* - * - * Function : GET_UShort - * - * Description : Extracts an unsigned short from the frame. - * - * Input : None or current frame - * - * Output : Extracted ushort - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - UShort TT_Get_UShort( FRAME_ARG ) - { - UShort getshort; - - - CHECK_FRAME( CUR_Frame, 2 ); - - getshort = ((UShort)CUR_Frame.cursor[0] << 8) | - (UShort)CUR_Frame.cursor[1]; - - CUR_Frame.cursor += 2; - - return getshort; - } - -#endif - - -/******************************************************************* - * - * Function : GET_Long - * - * Description : Extracts a long from the frame. - * - * Input : None or current frame - * - * Output : Extracted long - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - - EXPORT_FUNC - Long TT_Get_Long( FRAME_ARG ) - { - Long getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ((Long)CUR_Frame.cursor[0] << 24) | - ((Long)CUR_Frame.cursor[1] << 16) | - ((Long)CUR_Frame.cursor[2] << 8 ) | - (Long)CUR_Frame.cursor[3]; - - CUR_Frame.cursor += 4; - - return getlong; - } - - -/******************************************************************* - * - * Function : GET_ULong - * - * Description : Extracts an unsigned long from the frame. - * - * Input : None - * - * Output : Extracted ulong - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call.) - * - ******************************************************************/ - -#if 0 - - EXPORT_FUNC - ULong TT_Get_ULong( FRAME_ARG ) - { - ULong getlong; - - - CHECK_FRAME( CUR_Frame, 4 ); - - getlong = ( ((ULong)CUR_Frame.cursor[0] << 24) | - ((ULong)CUR_Frame.cursor[1] << 16) | - ((ULong)CUR_Frame.cursor[2] << 8 ) | - (ULong)CUR_Frame.cursor[3] ); - - CUR_Frame.cursor += 4; - - return getlong; - } - -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/vms/README diff -u xc/extras/FreeType/lib/arch/vms/README:1.1.1.1 xc/extras/FreeType/lib/arch/vms/README:removed --- xc/extras/FreeType/lib/arch/vms/README:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/vms/README Wed Mar 16 20:59:42 2005 @@ -1,20 +0,0 @@ -This directory contains two files for compiling the FreeType library under -VMS: - - ft_conf.h the configuration file for the FreeType library - descrip.mms a makefile to be used with either MMS or MMK - -The files are such designed that after unpacking of freetype-1.2 one can -give the command - - MMS/DESCR=[.LIB.ARCH.VMS] - -to build the libraries. (Of course, for MMK use `MMK' on the command line -instead of `MMS'.) The makefile contains a `clean' target, but no `install' -target since I'm note sure where to install the library and the include -files. - -I did NOT do the test programs but I tested it with my own programs. - - - Jouk Jansen Index: xc/extras/FreeType/lib/arch/vms/descrip.mms diff -u xc/extras/FreeType/lib/arch/vms/descrip.mms:1.1.1.1 xc/extras/FreeType/lib/arch/vms/descrip.mms:removed --- xc/extras/FreeType/lib/arch/vms/descrip.mms:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/vms/descrip.mms Wed Mar 16 20:59:42 2005 @@ -1,155 +0,0 @@ -# This file is part of the FreeType project. -# -# DESCRIP.MMS: Make file for VMS using MMS or MMK -# Created by Jouk Jansen (joukj@hrem.stm.tudelft.nl) - -ARCH = arch.unix - -CC = cc - -############### PORTABILITY COMPONENTS ######################## - -# location of memory component -MEMSRC = ttmemory.c - -# location of file component -FILESRC = ttfile.c - -# location of mutex component -MUTEXSRC = ttmutex.c - -# location of default extensions -FTEXTDIR = [.lib.extend] - -# default extensions sources -EXTSRC = $(FTEXTDIR)ftxkern.c \ - $(FTEXTDIR)ftxgasp.c \ - $(FTEXTDIR)ftxpost.c \ - $(FTEXTDIR)ftxcmap.c \ - $(FTEXTDIR)ftxsbit.c \ - $(FTEXTDIR)ftxwidth.c \ - $(FTEXTDIR)ftxerr18.c \ - $(FTEXTDIR)ftxgsub.c \ - $(FTEXTDIR)ftxgpos.c \ - $(FTEXTDIR)ftxopen.c \ - $(FTEXTDIR)ftxgdef.c - -EXTOBJ = [.lib]ftxkern.obj, \ - [.lib]ftxgasp.obj, \ - [.lib]ftxpost.obj, \ - [.lib]ftxcmap.obj, \ - [.lib]ftxsbit.obj, \ - [.lib]ftxwidth.obj, \ - [.lib]ftxerr18.obj, \ - [.lib]ftxgsub.obj, \ - [.lib]ftxgpos.obj, \ - [.lib]ftxopen.obj, \ - [.lib]ftxgdef.obj - -# all engine sources -SRC_M = [.lib]ttapi.c \ - [.lib]ttcache.c \ - [.lib]ttcalc.c \ - [.lib]ttcmap.c \ - [.lib]ttdebug.c \ - [.lib]ttextend.c \ - [.lib]ttgload.c \ - [.lib]ttinterp.c \ - [.lib]ttload.c \ - [.lib]ttobjs.c \ - [.lib]ttraster.c \ - [.lib]$(FILESRC) \ - [.lib]$(MEMSRC) \ - [.lib]$(MUTEXSRC) -SRC_S = [.lib.$(ARCH)]freetype.c - -# all header files with path -HEADERS = [.lib]freetype.h \ - [.lib]fterrid.h \ - [.lib]ftnameid.h \ - $(FTEXTDIR)ftxkern.h \ - $(FTEXTDIR)ftxgasp.h \ - $(FTEXTDIR)ftxcmap.h \ - $(FTEXTDIR)ftxsbit.h \ - $(FTEXTDIR)ftxpost.h \ - $(FTEXTDIR)ftxwidth.h \ - $(FTEXTDIR)ftxerr18.h \ - $(FTEXTDIR)ftxgsub.h \ - $(FTEXTDIR)ftxgpos.h \ - $(FTEXTDIR)ftxgdef.h \ - $(FTEXTDIR)ftxopen.h - -# all engine objects -OBJ_M = [.lib]ttapi.obj, \ - [.lib]ttcache.obj, \ - [.lib]ttcalc.obj, \ - [.lib]ttcmap.obj, \ - [.lib]ttdebug.obj, \ - [.lib]ttextend.obj, \ - [.lib]ttgload.obj, \ - [.lib]ttinterp.obj, \ - [.lib]ttload.obj, \ - [.lib]ttobjs.obj, \ - [.lib]ttraster.obj, \ - [.lib]file.obj, \ - [.lib]memory.obj, \ - [.lib]mutex.obj, \ - $(EXTOBJ) -OBJ_S = [.lib]freetype.obj - - -# include paths -INCLUDES = /include=([.lib],[],$(FTEXTDIR)) - -# C flags -CFLAGS = $(INCLUDES)/obj=[.lib] - -all : do_link [.lib]libttf.olb - library/compress [.lib]libttf.olb - -do_link : - if f$search( "[.lib]memory.c" ) .nes. "" then set file/remove [.lib]memory.c; - if f$search( "[.lib]file.c" ) .nes. "" then set file/remove [.lib]file.c; - if f$search( "[.lib]mutex.c" ) .nes. "" then set file/remove [.lib]mutex.c; - if f$search( "[.lib]ft_conf.h" ) .nes. "" then set file/remove [.lib]ft_conf.h; - set file/enter=[.lib]memory.c [.lib]$(MEMSRC) - set file/enter=[.lib]file.c [.lib]$(FILESRC) - set file/enter=[.lib]mutex.c [.lib]$(MUTEXSRC) - set file/enter=[.lib]ft_conf.h [.lib.arch.vms]ft_conf.h - -[.lib]ftxkern.obj : $(FTEXTDIR)ftxkern.c - -[.lib]ftxgasp.obj : $(FTEXTDIR)ftxgasp.c - -[.lib]ftxpost.obj : $(FTEXTDIR)ftxpost.c - -[.lib]ftxcmap.obj : $(FTEXTDIR)ftxcmap.c - -[.lib]ftxsbit.obj : $(FTEXTDIR)ftxsbit.c - -[.lib]ftxwidth.obj : $(FTEXTDIR)ftxwidth.c - -[.lib]ftxerr18.obj : $(FTEXTDIR)ftxerr18.c - -[.lib]ftxgsub.obj : $(FTEXTDIR)ftxgsub.c - -[.lib]ftxgpos.obj : $(FTEXTDIR)ftxgpos.c - -[.lib]ftxgdef.obj : $(FTEXTDIR)ftxgdef.c - -[.lib]ftxopen.obj : $(FTEXTDIR)ftxopen.c - -[.lib]freetype.obj : $(SRC_S) $(SRC_M) - - -[.lib]libttf.olb : $(OBJ_M) - library/create [.lib]libttf.olb $(OBJ_M) - - -clean : - delete [.lib]*.obj;* - delete [.lib]*.olb;* - if f$search( "[.lib]memory.c" ) .nes. "" then set file/remove [.lib]memory.c; - if f$search( "[.lib]file.c" ) .nes. "" then set file/remove [.lib]file.c; - if f$search( "[.lib]mutex.c" ) .nes. "" then set file/remove [.lib]mutex.c; - if f$search( "[.lib]ft_conf.h" ) .nes. "" then set file/remove [.lib]ft_conf.h; Index: xc/extras/FreeType/lib/arch/vms/ft_conf.h diff -u xc/extras/FreeType/lib/arch/vms/ft_conf.h:1.1.1.1 xc/extras/FreeType/lib/arch/vms/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/vms/ft_conf.h:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/vms/ft_conf.h Wed Mar 16 20:59:42 2005 @@ -1,215 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for VMS using MMS or MMK */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if the X Window System is missing or not being used. */ -/* #undef X_DISPLAY_MISSING */ - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_LIBINTL_H */ - -/* Define if you have the libintl library. */ -/* #undef HAVE_LIBINTL */ - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #undef HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -/* #undef TT_CONFIG_OPTION_THREAD_SAFE */ - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -/* #undef DEBUG_LEVEL_TRACE */ - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -/* #undef DEBUG_LEVEL_ERROR */ - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/win16/Makefile.BC diff -u xc/extras/FreeType/lib/arch/win16/Makefile.BC:1.1.1.1 xc/extras/FreeType/lib/arch/win16/Makefile.BC:removed --- xc/extras/FreeType/lib/arch/win16/Makefile.BC:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/Makefile.BC Wed Mar 16 20:59:43 2005 @@ -1,180 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Borland C++ for 16-bit Windows, large model. -# Due to size constraints, it does not try to pack all modules into one. -# -# You will need Borland MAKE. -# Tested with Borland C++ v.4.0 and 5.0. -# -# Use this file while in the lib directory with the following statement: -# -# make -farch/win16/Makefile.BC -# -# -# A DLL version of the library can be built with -# -# make -DDLL -farch/win16/Makefile.BC dll -# -# Debug versions can be obtained with -# -# make -DDEBUG -farch\win16\Makefile.BC -# -# Special versions enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# make -DBIGFONTS -farch/win16/Makefile.BC - -ARCH = arch\win16 -FT_MAKEFILE = $(ARCH)\Makefile.BC -FT_DLL = ft13_16.dll - -CC = bcc -LIB = tlib /c /e -IMPLIB = implib -c -o - -SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig - -# Credits go to Dave Hoo for pointing out that modern -# Borland compilers (from BC++ 3.1 on) can increase the limit on -# the length of identifiers. -!if ! $d(DEBUG) -CFLAGS = -O2 -3 -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS) -DLLFLAGS = -ml -WD -lC -!else -CFLAGS = -v -N -ml -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS) -DLLFLAGS = -v -ml -WD -lC -!endif - -CFLAGS = $(CFLAGS) -W - -FT_DEF = $(FT_DLL:.dll=.def) -!if $d(DLL) -CFLAGS = $(CFLAGS) -WD -!endif - - -!if $d(BIGFONTS) -CFLAGS = $(CFLAGS) -DTT_HUGE_PTR=__huge - -TTFILE = $(ARCH)\hugefile.c -TTMEMORY = $(ARCH)\hugemem.c -!else -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -!endif -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces before the \ at end of line, -# otherwise the substitution for TLIB command line will fail. -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ - extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c\ - extend\ftxsbit.c extend\ftxgsub.c extend\ftxgpos.c\ - extend\ftxopen.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c\ - ttgload.c ttinterp.c ttload.c ttobjs.c\ - ttraster.c ttextend.c ttdebug.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Borland make does not handle $($(LIB_FILES)), and using -# -DLIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing TLIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# See ../msdos/Makefile.TC for an application. -.c.obj: - @$(CC) -c -o$* @&&| - $(CFLAGS) $< -| - - -!if ! $d(DEBUG) -# Skipped if DEBUG build -# (but it changes nothing, since we always build in multiple parts). -all: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_M: = + ) -| -!endif - -debug: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_M: = + ) -| - -$(FT_DEF): $(ARCH)\ttf.def - -copy $(ARCH)\ttf.def $(FT_DEF) - -dll $(FT_DLL): $(OBJS_M) $(FT_DEF) -!if $d(DLL) - $(CC) -e$(FT_DLL) @&&| - $(DLLFLAGS) $(OBJS_M) -| - $(IMPLIB) libttf $(FT_DEF) -!else -# Re-invoke with flag set. Unfortunately, this discards the other flags. - make -DDLL -f$(ARCH)/Makefile.BC dll -!endif - -install: $(FT_DLL) -!if $d(INSTALL_DIR) - copy $(FT_DLL) $(INSTALL_DIR) -!else - copy $(FT_DLL) C:\WINDOWS -!endif - - -$(OBJ_S): $(SRC_S) $(SRC_M) - -# Not used here because it excesses the capacity of COMMAND.COM... -libttf.lib: $(LIB_FILES) - -del libttf.lib - echo -+$(**: =-+)> response - $(LIB) libttf.lib @&&| -+ $(**: = + ) -| - -!if $d(BIGFONTS) -$(TTMEMORY:.c=.obj): $(TTMEMORY) - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| - -$(TTFILE:.c=.obj): $(TTFILE) - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| -!endif - - -clean: - -del *.obj - -del extend\*.obj - -del $(ARCH)\*.obj - -del libttf.bak - -del response - -del *.def - -distclean: clean - -del libttf.lib - -del *.dll - -del $(FT_DEF) - -del C:\WINDOWS\$(FT_DLL) -!if $d(INSTALL_DIR) - -del $(INSTALL_DIR)\$(FT_DLL) -!endif - -!include "$(ARCH)\depend.win" - -# end of Makefile Index: xc/extras/FreeType/lib/arch/win16/Makefile.MS diff -u xc/extras/FreeType/lib/arch/win16/Makefile.MS:1.1.1.1 xc/extras/FreeType/lib/arch/win16/Makefile.MS:removed --- xc/extras/FreeType/lib/arch/win16/Makefile.MS:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/Makefile.MS Wed Mar 16 20:59:43 2005 @@ -1,106 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Microsoft C for Windows, large model. -# It also works for Visual C++ 1.x 16-bit compilers, but you should -# instead use the Makefile customized for it, Makefile.VC. -# Due to size constraints, it does not try to pack all modules into one. -# -# You will need NMAKE. -# -# Use this file while in the lib directory with the following statement: -# -# nmake /f arch\win16\Makefile.MS -# -# -# A debug version can be obtained with -# -# nmake DEBUG=1 /f arch\win16\Makefile.MS - -ARCH = arch\win16 -FT_MAKEFILE = $(ARCH)\Makefile.MS - -CC = cl /nologo -LIB = lib /noignorecase /nologo - -!ifndef DEBUG -CFLAGS = /Ox /AL /Za /W2 /G2 -I$(ARCH) -I. -Iextend -!else -CFLAGS = /Zi /AL /Za /W2 /G2 -I$(ARCH) -I. -Iextend -!endif - -# Use /Gw instead with Microsoft C version 6 -CFLAGS = $(CFLAGS) /GA - - -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces between the file names or at end of line, otherwise -# the substitution for LIB command line will fail. Thank you. -# -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ -extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\ -extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\ -ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using -# LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing LIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# See ..\msdos\Makefile.TC for an application. -.c.obj: - $(CC) /c /Fo$@ @<< - $(CFLAGS) $*.c -<< - - -!ifndef DEBUG -# Skipped if DEBUG build -# (but it changes nothing, since we always build in multiple parts). -all: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @< header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you need for console I/O functions. */ -#undef HAVE_CONIO_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define if you have the libintl library. */ -#undef HAVE_LIBINTL - -/* command.com can't pipe stderr into a file; any message would be */ -/* written into the graphics screen. */ -#define HAVE_PRINT_FUNCTION 1 - -#define Print( format, ap ) vfprintf( stdout, (format), (ap) ) - -/* The number of bytes in a int. */ -#define SIZEOF_INT 2 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#undef LONG64 -#undef INT64 - -#endif /* FT_CONF_H */ - -/* End of ft_conf.h */ Index: xc/extras/FreeType/lib/arch/win16/hugefile.c diff -u xc/extras/FreeType/lib/arch/win16/hugefile.c:1.1.1.1 xc/extras/FreeType/lib/arch/win16/hugefile.c:removed --- xc/extras/FreeType/lib/arch/win16/hugefile.c:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/hugefile.c Wed Mar 16 20:59:43 2005 @@ -1,51 +0,0 @@ -/******************************************************************* - * - * hugefile.c - * - * File I/O Component (body) for dealing with "huge" objects - * under 16-bit Windows. Relies on the "default" version, with - * a small hook. Requires Windows 3.1+. - * - * Written by Antoine Leca based on ideas from Dave Hoo. - * Copyright 1999 by Dave Hoo, Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTE - * - * This file #includes the normal version, to avoid discrepancies - * between versions. It uses only ANSI-mandated "tricks", so - * any ANSI-compliant compiler should be able to compile this file. - * - ******************************************************************/ - -#include "ttconfig.h" -#include "tttypes.h" - -#include - - /* Here we include , to have the proper definition of fread */ -#include - - /* Some compilers define fileno(), some define _fileno()... */ -#ifndef _fileno -#define _fileno(stream) fileno(stream) -#endif - - /* Then, we divert the use of fread to the Windows version */ -#undef fread -#define fread(ptr, size, n, stream) \ - _hread( _fileno(stream), (char TT_HUGE_PTR *) ptr, (ULong)n * size ) - - - /* Now, we include the "normal" version of `ttfile.c' */ - /* The ANSI/ISO standard mandates that the include of */ - /* there have no bad effects. */ -#include "ttfile.c" - -/* END */ Index: xc/extras/FreeType/lib/arch/win16/hugemem.c diff -u xc/extras/FreeType/lib/arch/win16/hugemem.c:1.1.1.1 xc/extras/FreeType/lib/arch/win16/hugemem.c:removed --- xc/extras/FreeType/lib/arch/win16/hugemem.c:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/hugemem.c Wed Mar 16 20:59:43 2005 @@ -1,539 +0,0 @@ -/******************************************************************* - * - * hugemem.c - * - * Memory management component (body) - * for dealing with "huge" objects with 16-bit Windows. - * - * Written by Antoine Leca based on ideas from Dave Hoo. - * Copyright 1999 by Dave Hoo, Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include - -#include "ttdebug.h" -#include "ttmemory.h" -#include "ttengine.h" - -#ifndef TT_HUGE_PTR -#error "This component needs TT_HUGE_PTR to be #defined." -#endif - -#ifdef TT_CONFIG_OPTION_THREAD_SAFE -#error "This component needs static allocation and is not re-entrant." -#endif - - /* If the memory reclaimed is abobve this limit, alloc directly from */ - /* global heap. Else, alloc using malloc (using suballocation). */ -#ifndef MEMORY_MIN_GLOBAL -#define MEMORY_MIN_GLOBAL 4096 -#endif - -/* required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_memory - - -#ifdef DEBUG_MEMORY - -#include - -#define MAX_TRACKED_BLOCKS 1024 - - struct TMemRec_ - { - void* base; - Long size; - }; - - typedef struct TMemRec_ TMemRec; - - static TMemRec pointers[MAX_TRACKED_BLOCKS + 1]; - - static Int num_alloc; - static Int num_free; - static Int num_realloc; /* counts only `real' reallocations - (i.e., an existing buffer will be resized - to a value larger than zero */ - - static Int fail_alloc; - static Int fail_realloc; - static Int fail_free; - -#else - - /* We need a tracing stack of the calls to big chunks of memory, */ - /* in order to call the matching version of free(). */ - -#define MAX_TRACKED_BIGCHUNKS 64 - - struct TMemRec_ - { - void* base; - }; - - typedef struct TMemRec_ TMemRec; - - static TMemRec pointers[MAX_TRACKED_BIGCHUNKS + 1]; - -#endif /* DEBUG_MEMORY */ - - -#ifndef TT_CONFIG_REENTRANT - Long TTMemory_Allocated; - Long TTMemory_MaxAllocated; -#endif - - -/******************************************************************* - * - * Function : TT_Alloc - * - * Description : Allocates memory from the heap buffer. - * - * Input : Size size of the memory to be allocated - * P pointer to a buffer pointer - * - * Output : Error code. - * - * NOTE : The newly allocated block should _always_ be zeroed - * on return. Many parts of the engine rely on this to - * work properly. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Alloc( ULong Size, void** P ) - { - Int i; - - - if ( !P ) - return TT_Err_Invalid_Argument; - /* Also see below for another case of "invalid argument". */ - - if ( Size > 0 ) - { - if ( Size >= MEMORY_MIN_GLOBAL ) - { - HANDLE hMem; - - hMem = GlobalAlloc( GMEM_ZEROINIT, Size ); - if ( !hMem ) - return TT_Err_Out_Of_Memory; - - *P = (void*)GlobalLock( hMem ); - } - else - *P = (void*)malloc( Size ); - - if ( !*P ) - return TT_Err_Out_Of_Memory; - -#ifndef TT_CONFIG_REENTRANT - TTMemory_MaxAllocated += Size; - TTMemory_Allocated += Size; -#endif - -#ifdef DEBUG_MEMORY - - num_alloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_alloc++; - else - { - pointers[i].base = *P; - pointers[i].size = Size; - } - -#else - - if ( Size >= MEMORY_MIN_GLOBAL ) - { - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BIGCHUNKS ) - /* We fail badly here. Increase MAX_TRACKED_BIGCHUNKS if needed. */ - return TT_Err_Invalid_Argument; - else - pointers[i].base = *P; - } - -#endif /* DEBUG_MEMORY */ - - /* The nice thing about GlobalAlloc is that it zeroes the memory. */ - - if ( Size < MEMORY_MIN_GLOBAL ) - MEM_Set( *P, 0, Size ); - - } - else - *P = NULL; - - return TT_Err_Ok; - } - - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE - - -/******************************************************************* - * - * Function : TT_Realloc - * - * Description : Reallocates memory from the heap buffer. - * - * Input : Size new size of the memory to be allocated; - * if zero, TT_Free() will be called - * P pointer to a buffer pointer; if *P == NULL, - * TT_Alloc() will be called - * - * Output : Error code. - * - * NOTES : It's not necessary to zero the memory in case the - * reallocated buffer is larger than before -- the - * application has to take care of this. - * - * If the memory request fails, TT_Free() will be - * called on *P, and TT_Err_Out_Of_Memory returned. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Realloc( ULong Size, void** P ) - { - ULong oldSize; - void* Q; - Int i; - - - if ( !P ) - return TT_Err_Invalid_Argument; - - if ( !*P ) - return TT_Alloc( Size, P ); - - if ( Size == 0 ) - return TT_Free( P ); - -#ifdef DEBUG_MEMORY - - num_realloc++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_realloc++; - else - oldSize = pointers[i].size; - -#else - - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != *P ) - i++; - - /* If we did not found the pointer, then this is a "small" chunk. */ - - if ( i < MAX_TRACKED_BIGCHUNKS ) - { - /* Signal we found a big one. Real size does not matter. */ - oldSize = MEMORY_MIN_GLOBAL; - } - -#endif /* DEBUG_MEMORY */ - - if ( oldSize >= MEMORY_MIN_GLOBAL ) - { - /* Deal with a big chunk. */ - HANDLE hMem, hNewMem; - - hMem = GlobalHandle ( (ULong)*P >> 16 ) & 0xFFFF; - if ( !hMem ) /* Bad call... */ - return TT_Err_Invalid_Argument; - - GlobalUnlock( hMem ); - hNewMem = GlobalReAlloc( hMem, Size, 0 ); - if ( hNewMem ) - *P = (void*)GlobalLock( hNewMem ); - } - if ( Size >= MEMORY_MIN_GLOBAL ) - { - /* A small chunk crosses the limit... */ - - if( TT_Alloc( Size, &Q ) != TT_Err_Ok ) - Q = NULL; /* Failed to create the new block. */ - else - MEM_Copy( Q, *P, oldSize ); - - /* We need to register the new entry. */ -#ifndef DEBUG_MEMORY - - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != NULL ) - i++; - - if ( i >= MAX_TRACKED_BIGCHUNKS ) - /* We fail badly here. Increase MAX_TRACKED_BIGCHUNKS if needed. */ - return TT_Err_Invalid_Argument; -#endif /* DEBUG_MEMORY */ - } - else - Q = (void*)realloc( *P, Size ); - - if ( !Q ) - { - TT_Free( *P ); - return TT_Err_Out_Of_Memory; - } - -#ifdef DEBUG_MEMORY - - if ( i < MAX_TRACKED_BLOCKS ) - { -#ifndef TT_CONFIG_REENTRANT - TTMemory_Allocated += Size - pointers[i].size; - if ( Size > pointers[i].size ) - TTMemory_MaxAllocated += Size - pointers[i].size; -#endif - - pointers[i].base = Q; - pointers[i].size = Size; - } -#else - if ( i < MAX_TRACKED_BIGCHUNKS ) - { - pointers[i].base = Q; - } -#endif /* DEBUG_MEMORY */ - - *P = Q; - - return TT_Err_Ok; - } - - -#endif /* TT_CONFIG_OPTION_EXTEND_ENGINE */ - - -/******************************************************************* - * - * Function : TT_Free - * - * Description : Releases a previously allocated block of memory. - * - * Input : P pointer to memory block - * - * Output : Always SUCCESS. - * - * Note : The pointer must _always_ be set to NULL by this function. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Free( void** P ) - { - Int i; - Long Size = 0; - - - if ( !P || !*P ) - return TT_Err_Ok; - -#ifdef DEBUG_MEMORY - - num_free++; - - i = 0; - while ( i < MAX_TRACKED_BLOCKS && pointers[i].base != *P ) - i++; - - if ( i >= MAX_TRACKED_BLOCKS ) - fail_free++; - else - { -#ifndef TT_CONFIG_REENTRANT - TTMemory_Allocated -= pointers[i].size; -#endif - - Size = pointers[i].size; - pointers[i].base = NULL; - pointers[i].size = 0; - } - -#else - - i = 0; - while ( i < MAX_TRACKED_BIGCHUNKS && pointers[i].base != *P ) - i++; - - /* If we did not found the pointer, then this is a "small" chunk. */ - - if ( i < MAX_TRACKED_BIGCHUNKS ) - { - pointers[i].base = NULL; - /* Signal we found a big one. Real size does not matter. */ - Size = MEMORY_MIN_GLOBAL; - } - -#endif /* DEBUG_MEMORY */ - - if ( Size >= MEMORY_MIN_GLOBAL ) - { - HANDLE hMem; - - hMem = GlobalHandle ( (ULong)*P >> 16 ) & 0xFFFF; - if ( !hMem ) /* Bad call... */ - return TT_Err_Invalid_Argument; - - GlobalUnlock( hMem ); - GlobalFree ( hMem ); - } - else - free( *P ); - - *P = NULL; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Init - * - * Description : Initializes the memory. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Init( void ) - { -#ifdef DEBUG_MEMORY - Int i; - - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - pointers[i].base = NULL; - pointers[i].size = 0; - } - - num_alloc = 0; - num_realloc = 0; - num_free = 0; - - fail_alloc = 0; - fail_realloc = 0; - fail_free = 0; -#else - Int i; - - for ( i = 0; i < MAX_TRACKED_BIGCHUNKS; i++ ) - { - pointers[i].base = NULL; - } -#endif - - -#ifndef TT_CONFIG_REENTRANT - TTMemory_Allocated = 0; - TTMemory_MaxAllocated = 0; -#endif - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TTMemory_Done - * - * Description : Finalizes memory usage. - * - * Output : Always SUCCESS. - * - ******************************************************************/ - - LOCAL_FUNC - TT_Error TTMemory_Done( void ) - { -#ifdef DEBUG_MEMORY - Int i, num_leaked, tot_leaked; - - - num_leaked = 0; - tot_leaked = 0; - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - num_leaked ++; - tot_leaked += pointers[i].size; - } - } - - fprintf( stderr, - "%d memory allocations, of which %d failed\n", - num_alloc, - fail_alloc ); - - fprintf( stderr, - "%d memory reallocations, of which %d failed\n", - num_realloc, - fail_realloc ); - - fprintf( stderr, - "%d memory frees, of which %d failed\n", - num_free, - fail_free ); - - if ( num_leaked > 0 ) - { - fprintf( stderr, - "There are %d leaked memory blocks, totalizing %d bytes\n", - num_leaked, tot_leaked ); - - for ( i = 0; i < MAX_TRACKED_BLOCKS; i++ ) - { - if ( pointers[i].base ) - { - fprintf( stderr, - "index: %4d (base: $%08lx, size: %08ld)\n", - i, - (long)pointers[i].base, - pointers[i].size ); - } - } - } - else - fprintf( stderr, "No memory leaks !\n" ); - -#endif /* DEBUG_MEMORY */ - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/arch/win16/makedef diff -u xc/extras/FreeType/lib/arch/win16/makedef:1.1.1.1 xc/extras/FreeType/lib/arch/win16/makedef:removed --- xc/extras/FreeType/lib/arch/win16/makedef:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/makedef Wed Mar 16 20:59:43 2005 @@ -1,24 +0,0 @@ -# makedef -# -# This shell script creates a .DEF file necessary for building as DLL -# on the Windows 16-bit platform. - -echo "\ -; This definition file to be used to built the library as DLL -; has been generated automatically with the script \`makedef' on -; `date +%d-%b-%Y`. - -LIBRARY ft13_16 -DESCRIPTION 'FreeType 1.3 16-bit DLL © 1996-1999 Turner, Wilhelm, Lemberg' -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE SINGLE -EXPORTS -" > ttf.def - -(cd ../.. - sed -n -e "/^ *EXPORT_DEF/!d ; n ; s/(.*$//" \ - -e "s/;$//" -e "s/ const / /" -e "s/ *[a-zA-Z][a-zA-Z_\*]* //" \ - -e "s/ *//g" -e "s/^\(.*\)/ _\1/" -e "p" *.h extend/*.h) >> ttf.def - -# eof Index: xc/extras/FreeType/lib/arch/win16/makedep diff -u xc/extras/FreeType/lib/arch/win16/makedep:1.1.1.1 xc/extras/FreeType/lib/arch/win16/makedep:removed --- xc/extras/FreeType/lib/arch/win16/makedep:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/makedep Wed Mar 16 20:59:43 2005 @@ -1,32 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for older compilers -# on the Windows 16-bit platform. - -echo "\ -# This dependency file to be used with various Windows compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.win - -(cd ../.. - gcc -MM -Iarch/win16 -I. \ - *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.win - -(cd ../.. - gcc -MM -Iarch/win16 -I. -Iextend \ - extend/*.c | \ - sed -e "s/^\(.*\)\.o:/extend\\\\\1.obj:/" -e "s:/:\\\\:g") >> depend.win - -echo "!ifndef __MAKE__" >> depend.win - -(cd ../.. - gcc -MM -Iarch/win16 -I. -Iextend -DTT_HUGE_PTR \ - arch/win16/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\win16\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.win - -echo "!endif" >> depend.win - -# eof Index: xc/extras/FreeType/lib/arch/win16/ttf.def diff -u xc/extras/FreeType/lib/arch/win16/ttf.def:1.1.1.1 xc/extras/FreeType/lib/arch/win16/ttf.def:removed --- xc/extras/FreeType/lib/arch/win16/ttf.def:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win16/ttf.def Wed Mar 16 20:59:43 2005 @@ -1,127 +0,0 @@ -; This definition file to be used to built the library as DLL -; has been generated automatically with the script `makedef' on -; 02-Sep-1999. - -LIBRARY ft13_16 -DESCRIPTION 'FreeType 1.3 16-bit DLL © 1996-1999 Turner, Wilhelm, Lemberg' -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE SINGLE -EXPORTS - - _TT_FreeType_Version - _TT_Init_FreeType - _TT_Done_FreeType - _TT_Set_Raster_Gray_Palette - _TT_Open_Face - _TT_Open_Collection - _TT_Get_Face_Properties - _TT_Set_Face_Pointer - _TT_Get_Face_Pointer - _TT_Flush_Face - _TT_Get_Face_Metrics - _TT_Close_Face - _TT_Get_Font_Data - _TT_New_Instance - _TT_Set_Instance_Resolutions - _TT_Set_Instance_CharSize - _TT_Set_Instance_CharSizes - _TT_Set_Instance_PixelSizes - _TT_Set_Instance_Transform_Flags - _TT_Get_Instance_Metrics - _TT_Set_Instance_Pointer - _TT_Get_Instance_Pointer - _TT_Done_Instance - _TT_New_Glyph - _TT_Done_Glyph - _TT_Load_Glyph - _TT_Get_Glyph_Outline - _TT_Get_Glyph_Metrics - _TT_Get_Glyph_Big_Metrics - _TT_Get_Glyph_Bitmap - _TT_Get_Glyph_Pixmap - _TT_New_Outline - _TT_Done_Outline - _TT_Copy_Outline - _TT_Get_Outline_Bitmap - _TT_Get_Outline_Pixmap - _TT_Get_Outline_BBox - _TT_Transform_Outline - _TT_Translate_Outline - _TT_Transform_Vector - _TT_MulDiv - _TT_MulFix - _TT_Get_CharMap_Count - _TT_Get_CharMap_ID - _TT_Get_CharMap - _TT_Char_Index - _TT_Get_Name_Count - _TT_Get_Name_ID - _TT_Get_Name_String - _TT_Register_Extension - _TT_Extension_Get - _TT_Use_Stream - _TT_Done_Stream - _TT_Flush_Stream - _TT_Read_File - _TT_Seek_File - _TT_Skip_File - _TT_Read_At_File - _TT_File_Pos - _TT_Stream_Size - _TT_Null_FileFrame - _TT_Access_Frame - _TT_Check_And_Access_Frame - _TT_Forget_Frame - _TT_Get_Char - _TT_Get_Short - _TT_Get_Long - _TT_LookUp_Table - _TT_Alloc - _TT_Realloc - _TT_Free - _TT_CharMap_First - _TT_CharMap_Next - _TT_CharMap_Last - _TT_ErrToString18 - _TT_Get_Face_Gasp_Flags - _TT_Init_GDEF_Extension - _TT_Load_GDEF_Table - _TT_GDEF_Get_Glyph_Property - _TT_GDEF_Build_ClassDefinition - _TT_Init_GPOS_Extension - _TT_Load_GPOS_Table - _TT_GPOS_Select_Script - _TT_GPOS_Select_Language - _TT_GPOS_Select_Feature - _TT_GPOS_Query_Scripts - _TT_GPOS_Query_Languages - _TT_GPOS_Query_Features - _TT_GPOS_Add_Feature - _TT_GPOS_Clear_Features - _TT_Init_GSUB_Extension - _TT_Load_GSUB_Table - _TT_GSUB_Select_Script - _TT_GSUB_Select_Language - _TT_GSUB_Select_Feature - _TT_GSUB_Query_Scripts - _TT_GSUB_Query_Languages - _TT_GSUB_Query_Features - _TT_GSUB_Add_Feature - _TT_GSUB_Clear_Features - _TT_GSUB_Register_Alternate_Function - _TT_GSUB_Apply_String - _TT_GSUB_Add_String - _TT_Init_Kerning_Extension - _TT_Get_Kerning_Directory - _TT_Load_Kerning_Table - _TT_Init_Post_Extension - _TT_Load_PS_Names - _TT_Get_PS_Name - _TT_Init_SBit_Extension - _TT_Get_Face_Bitmaps - _TT_New_SBit_Image - _TT_Done_SBit_Image - _TT_Get_SBit_Strike - _TT_Load_Glyph_Bitmap - _TT_Get_Face_Widths Index: xc/extras/FreeType/lib/arch/win32/Makefile.BC diff -u xc/extras/FreeType/lib/arch/win32/Makefile.BC:1.1.1.1 xc/extras/FreeType/lib/arch/win32/Makefile.BC:removed --- xc/extras/FreeType/lib/arch/win32/Makefile.BC:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/Makefile.BC Wed Mar 16 20:59:43 2005 @@ -1,161 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Borland C++ for Win32. -# -# You will need Borland MAKE. -# Tested with Borland C++ v.5.0 and Borland C++ builder 4.0. -# Does not work with Borland C++ 4.0, since it needs __declspec. -# -# Use this file while in the lib directory with the following statement: -# -# make -farch/win32/Makefile.BC -# -# -# A DLL version of the library can be built with -# -# make -DDLL -farch/win32/Makefile.BC dll -# -# A debug version can be obtained with -# -# make -DDEBUG -farch/win32/Makefile.BC - -ARCH = arch\win32 -FT_MAKEFILE = $(ARCH)\Makefile.BC -FT_DLL = ft13_32.dll - -CC = bcc32 -LIB = tlib /c /e -IMPLIB = implib -c - -SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig - -!if ! $d(DEBUG) -CFLAGS = -O2 -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS) -DLLFLAGS = -WD -!else -CFLAGS = -v -A -i40 -I$(ARCH);.;extend $(SPURIOUS_WARNINGS) -DLLFLAGS = -v -WD -!endif - -FT_DEF = $(FT_DLL:.dll=.def) -!if $d(DLL) -CFLAGS = $(CFLAGS) \ - -DEXPORT_DEF=__declspec(dllexport) -DEXPORT_FUNC=__declspec(dllexport) -!endif - - -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces before the \ at end of line, -# otherwise the substitution for TLIB command line will fail. -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ - extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c\ - extend\ftxsbit.c extend\ftxgsub.c extend\ftxgpos.c\ - extend\ftxopen.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c\ - ttgload.c ttinterp.c ttload.c ttobjs.c\ - ttraster.c ttextend.c ttdebug.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Borland make does not handle $($(LIB_FILES)), and using -# -DLIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing TLIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# See ../msdos/Makefile.TC for an application. -.c.obj: - $(CC) -c -o$* @&&| - $(CFLAGS) $< -| - - -!if ! $d(DEBUG) -# Skipped if DEBUG build -all: $(OBJS_S) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_S: = + ) -| - -dll $(FT_DLL): $(OBJS_S) $(FT_DEF) -!if $d(DLL) - $(CC) @&&| - $(DLLFLAGS) -e$(FT_DLL) $(OBJS_S) -| - $(IMPLIB) libttf $(FT_DLL) -!else - $(MAKE) -DDLL -f$(FT_MAKEFILE) dll # Re-invoke with flag set. -!endif -!endif - -debug: $(OBJS_M) - -del libttf.lib - $(LIB) libttf.lib @&&| -+ $(OBJS_M: = + ) -| - -!ifdef DEBUG -dll $(FT_DLL): $(OBJS_M) $(FT_DEF) -!if $d(DLL) - $(CC) @&&| - $(DLLFLAGS) -e$(FT_DLL) $(OBJS_M) -| - $(IMPLIB) libttf $(FT_DLL) -!else - $(MAKE) -DDEBUG -DDLL -f$(FT_MAKEFILE) dll -!endif -!endif - -install: $(FT_DLL) -!ifdef INSTALL_DIR - copy $(FT_DLL) $(INSTALL_DIR) -!else - copy $(FT_DLL) C:\WINDOWS -!endif - -$(OBJ_S): $(SRC_S) $(SRC_M) - -# Not used here because it excesses the capacity of COMMAND.COM... -libttf.lib: $(LIB_FILES) - -del libttf.lib - echo -+$(**: =-+)> response - $(LIB) libttf.lib @&&| -+ $(**: = + ) -| - -$(FT_DEF): $(ARCH)\ttf.def - -copy $(ARCH)\ttf.def $(FT_DEF) - -clean: - -del *.obj - -del extend\*.obj - -del $(ARCH)\*.obj - -del libttf.bak - -del response - -del *.def - -del *.tds - -distclean: clean - -del libttf.lib - -del *.dll - -del $(FT_DEF) - -del C:\WINDOWS\$(FT_DLL) -!if $d(INSTALL_DIR) - -del $(INSTALL_DIR)\$(FT_DLL) -!endif - -!include "$(ARCH)\depend.win" - -# end of Makefile Index: xc/extras/FreeType/lib/arch/win32/Makefile.CL diff -u xc/extras/FreeType/lib/arch/win32/Makefile.CL:1.1.1.1 xc/extras/FreeType/lib/arch/win32/Makefile.CL:removed --- xc/extras/FreeType/lib/arch/win32/Makefile.CL:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/Makefile.CL Wed Mar 16 20:59:43 2005 @@ -1,165 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for Microsoft Visual C++ for 32-bit Windows. -# -# You will need NMAKE. -# -# Use this file while in the lib directory with the following statement: -# -# nmake /f arch\win32\Makefile.CL -# -# -# A DLL version of the library can be built with -# -# nmake DLL=1 /f arch\win32\Makefile.CL dll -# -# Debug versions can be obtained with -# -# nmake DEBUG=1 /f arch\win32\Makefile.CL - -ARCH = arch\win32 -FT_MAKEFILE = $(ARCH)\Makefile.CL -FT_DLL = ft13_32.dll - -CC = cl /nologo -LIB = lib /nologo -LINK = link /nologo - -CFLAGS = /Za /W2 -I$(ARCH) -I. -Iextend - -!ifndef DEBUG -CFLAGS = $(CFLAGS) /Ox -DLLFLAGS = /RELEASE -!else -CFLAGS = $(CFLAGS) /Zi /Ge -DLLFLAGS = /DEBUG -!endif - -!ifdef DLL -CFLAGS = $(CFLAGS) /GD \ - /DEXPORT_DEF=__declspec(dllexport) /DEXPORT_FUNC=__declspec(dllexport) -!else -CFLAGS = $(CFLAGS) /GA -!endif - - -TTFILE = .\ttfile.c -TTMEMORY = .\ttmemory.c -TTMUTEX = .\ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -# Do not insert spaces between the file names or at end of line, otherwise -# the substitution for LIB command line will fail. Thank you. -# -SRC_X = extend\ftxgasp.c extend\ftxkern.c extend\ftxpost.c\ -extend\ftxcmap.c extend\ftxwidth.c extend\ftxerr18.c extend\ftxsbit.c\ -extend\ftxopen.c extend\ftxgsub.c extend\ftxgpos.c extend\ftxgdef.c -OBJS_X = $(SRC_X:.c=.obj) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c\ -ttgload.c ttinterp.c ttload.c ttobjs.c ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.obj) $(OBJS_X) - -SRC_S = $(ARCH)\freetype.c -OBJ_S = $(SRC_S:.c=.obj) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -# Since Microsoft's NMAKE does not handle $($(LIB_FILES)), and using -# LIB_FILES="$(OBJS_S)" will excess the capacity of COMMAND.COM, we cheat -# by constructing LIB's response file directly in the `all' target. -# -# Another solution, useful during debugging of part of the library, -# would be to include each .obj in the library as soon as it is compiled. -# See ..\msdos\Makefile.TC for an application. -.c.obj: - @$(CC) /c /Fo$@ @<< - $(CFLAGS) $*.c -<< - - -!ifndef DEBUG -# Skipped if DEBUG build -all: $(OBJS_S) - -del libttf.lib - $(LIB) /OUT:libttf.lib @< dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.Min Index: xc/extras/FreeType/lib/arch/win32/Makefile.VC diff -u xc/extras/FreeType/lib/arch/win32/Makefile.VC:1.1.1.1 xc/extras/FreeType/lib/arch/win32/Makefile.VC:removed --- xc/extras/FreeType/lib/arch/win32/Makefile.VC:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/Makefile.VC Wed Mar 16 20:59:44 2005 @@ -1,195 +0,0 @@ -# Visual C++ 2.x, 4.x, 5.0 and 6.0 makefile for freetype -# adapted from suns example makefile (related to the TCL script language) - -# Does not depend on the presence of any environment variables in -# order to compile freetype; all needed information is derived from -# location of the compiler directories. - -# -# Project directories -# -# ROOT = top of source tree -# -# TMPDIR = location where .obj files should be stored during build -# -# TOOLS32 = location of VC++ 32-bit development tools. Note that the -# VC++ 2.0 header files are broken, so you need to use the -# ones that come with the developer network CD's, or later -# versions of VC++. -# - -ROOT = ..\.. -TMPDIR = . -#TOOLS32 = c:\msdev # VC++ 2.x,4.x -#TOOLS32 = c:\Program Files\devstudio\vc # VC++ 5.x -TOOLS32 = c:\Program Files\Microsoft Visual Studio\Vc98 # VC++ 6.x -INSTALLDIR = c:\WINNT\SYSTEM32 - -# Set this to the appropriate value of /MACHINE: for your platform -MACHINE = IX86 - -# Comment the following line to compile with symbols -NODEBUG=1 - - -###################################################################### -# Do not modify below this line -###################################################################### - -TTF = ttf -TTFLIB = $(TTF).lib -TTFDLL = $(TTF).dll - -TTFOBJS = \ - $(TMPDIR)\ttapi.obj \ - $(TMPDIR)\ttcache.obj \ - $(TMPDIR)\ttcalc.obj \ - $(TMPDIR)\ttcmap.obj \ - $(TMPDIR)\ttdebug.obj \ - $(TMPDIR)\ttfile.obj \ - $(TMPDIR)\ttgload.obj \ - $(TMPDIR)\ttinterp.obj \ - $(TMPDIR)\ttload.obj \ - $(TMPDIR)\ttmemory.obj \ - $(TMPDIR)\ttmutex.obj \ - $(TMPDIR)\ttobjs.obj \ - $(TMPDIR)\ttraster.obj \ - $(TMPDIR)\ttextend.obj \ - $(TMPDIR)\ftxcmap.obj \ - $(TMPDIR)\ftxgasp.obj \ - $(TMPDIR)\ftxkern.obj \ - $(TMPDIR)\ftxpost.obj \ - $(TMPDIR)\ftxwidth.obj \ - $(TMPDIR)\ftxerr18.obj - - -PATH=$(TOOLS32)\bin;$(PATH) - -cc32 = "$(TOOLS32)\bin\cl.exe" -link32 = "$(TOOLS32)\bin\link.exe" -include32 = "-I$(TOOLS32)\include" -I$(ROOT)\arch\win32 -CP = copy -RM = del - -TTF_INCLUDES = -I$(ROOT) -TTF_DEFINES = -nologo -D__WIN32__ -D__WIN32DLL__ - -TTF_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ - $(TTF_INCLUDES) $(TTF_DEFINES) -CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE -DOS_CFLAGS = $(cdebug) $(cflags) $(include16) -AL - -###################################################################### -# Link flags -###################################################################### - -!IFDEF NODEBUG -ldebug = /RELEASE -!ELSE -ldebug = -debug:full -debugtype:cv -!ENDIF - -# declarations common to all linker options -lcommon = /NODEFAULTLIB /RELEASE /NOLOGO - -# declarations for use on Intel i386, i486, and Pentium systems -!IF "$(MACHINE)" == "IX86" -DLLENTRY = @12 -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ELSE -lflags = $(lcommon) /MACHINE:$(MACHINE) -!ENDIF - -conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup -guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - -!IF "$(MACHINE)" == "PPC" -libc = libc.lib -libcdll = crtdll.lib -!ELSE -libc = libc.lib oldnames.lib -libcdll = msvcrt.lib oldnames.lib -!ENDIF - -baselibs = kernel32.lib $(optlibs) advapi32.lib -winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib - -guilibs = $(libc) $(winlibs) -conlibs = $(libc) $(baselibs) -guilibsdll = $(libcdll) $(winlibs) -conlibsdll = $(libcdll) $(baselibs) - -###################################################################### -# Compile flags -###################################################################### - -!IFDEF NODEBUG -cdebug = -O2 -Gs -GD -!ELSE -cdebug = -Z7 -Od -WX -!ENDIF - -# declarations common to all compiler options -ccommon = -c -W3 -nologo -YX -Dtry=__try -Dexcept=__except - -# NEED BYTEORDER INFORMATION HERE !! -!IF "$(MACHINE)" == "IX86" -cflags = $(ccommon) -D_X86_=1 -!ELSE -!IF "$(MACHINE)" == "MIPS" -cflags = $(ccommon) -D_MIPS_=1 -!ELSE -!IF "$(MACHINE)" == "PPC" -cflags = $(ccommon) -D_PPC_=1 -!ELSE -!IF "$(MACHINE)" == "ALPHA" -cflags = $(ccommon) -D_ALPHA_=1 -!ENDIF -!ENDIF -!ENDIF -!ENDIF - -cvars = -DWIN32 -D_WIN32 -cvarsmt = $(cvars) -D_MT -cvarsdll = $(cvarsmt) -D_DLL - -###################################################################### -# Project specific targets -###################################################################### - -release: $(TTFDLL) -all: $(TTFDLL) - -install: $(TTFDLL) - -@md $(INSTALLDIR) - -@$(CP) $(TTFDLL) $(INSTALLDIR) - - - -$(TTFDLL): $(TTFOBJS) ttf.def - $(link32) $(ldebug) $(dlllflags) \ - $(guilibsdll) -out:$(TTFDLL) -def:ttf.def $(TTFOBJS) - -#ttf.def: $(TTFOBJS) -# ..\..\tcl8.0.4\win\release\dumpexts -o $@ ttf.dll $(TTFOBJS) - - -# -# Implicit rules -# - -{$(ROOT)\extend}.c{$(TMPDIR)}.obj: - $(cc32) $(TTF_CFLAGS) -Fo$(TMPDIR)\ $< - -{$(ROOT)}.c{$(TMPDIR)}.obj: - $(cc32) $(TTF_CFLAGS) -Fo$(TMPDIR)\ $< - - -clean: - -@del *.exp - -@del *.lib - -@del *.dll - -@del $(TMPDIR)\*.obj - -@del *.pch - -@del *.pdb Index: xc/extras/FreeType/lib/arch/win32/Makefile.gcc diff -u xc/extras/FreeType/lib/arch/win32/Makefile.gcc:1.1.1.1 xc/extras/FreeType/lib/arch/win32/Makefile.gcc:removed --- xc/extras/FreeType/lib/arch/win32/Makefile.gcc:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/Makefile.gcc Wed Mar 16 20:59:44 2005 @@ -1,96 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library for gcc under Win32. -# This Makefile will fail with MinGW32 ports of gcc and make under -# bare-bones Windows 9X, because of the limitations of command.com. -# Use Makefile.min instead. -# -# You will need GNU make. -# -# Use this file while in the lib directory with the following statement: -# -# make -f arch/win32/Makefile.gcc -# -# -# If you have the GNU gettext package installed, you can also try -# -# make -f arch/win32/Makefile.gcc HAVE_GETTEXT - -ARCH = arch/win32 -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -CC = gcc - -ifndef GETTEXT -GETTEXT=NO_GETTEXT -endif - -ifdef DEBUG -CFLAGS = -Wall -O2 -g -ansi -pedantic -I$(ARCH) -I. -Iextend -D$(GETTEXT) -else -CFLAGS = -Wall -ansi -pedantic -O2 -s -I$(ARCH) -I. -Iextend -D$(GETTEXT) -endif - - -TTFILE = ./ttfile.c -TTMEMORY = ./ttmemory.c -TTMUTEX = ./ttmutex.c - -PORT = $(TTFILE) $(TTMEMORY) $(TTMUTEX) - -SRC_X = extend/ftxgasp.c extend/ftxkern.c extend/ftxpost.c \ - extend/ftxcmap.c extend/ftxwidth.c extend/ftxsbit.c \ - extend/ftxgsub.c extend/ftxgpos.c extend/ftxgdef.c \ - extend/ftxopen.c extend/ftxerr18.c -OBJS_X = $(SRC_X:.c=.o) - -SRC_M = ttapi.c ttcache.c ttcalc.c ttcmap.c ttdebug.c \ - ttgload.c ttinterp.c ttload.c ttobjs.c \ - ttraster.c ttextend.c $(PORT) -OBJS_M = $(SRC_M:.c=.o) $(OBJS_X) - -SRC_S = $(ARCH)/freetype.c -OBJ_S = $(SRC_S:.c=.o) -OBJS_S = $(OBJ_S) $(OBJS_X) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -.PHONY: all debug clean distclean depend - - -all: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S libttf.a - -debug: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_M DEBUG=1 libttf.a - -HAVE_GETTEXT: - $(MAKE) -f $(FT_MAKEFILE) LIB_FILES=OBJS_S GETTEXT=HAVE_GETTEXT \ - libttf.a - -$(OBJ_S): $(SRC_S) $(SRC_M) - -libttf.a: $($(LIB_FILES)) - -del $@ - ar src $@ $^ - -clean: - -del *.o - -del extend\*.o - -del $(subst /,\,$(ARCH)/*.o) - -del response - -distclean: clean - -del dep.end - -del libttf.a - -depend: $(SRS_S) $(SRC_M) $(SRC_X) - $(CC) -E -M $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/lib/arch/win32/depend.win diff -u xc/extras/FreeType/lib/arch/win32/depend.win:1.1.1.1 xc/extras/FreeType/lib/arch/win32/depend.win:removed --- xc/extras/FreeType/lib/arch/win32/depend.win:1.1.1.1 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/depend.win Wed Mar 16 20:59:44 2005 @@ -1,103 +0,0 @@ -# This dependency file to be used with various Win32 compilers -# has been generated automatically with the script `makedep' on -# 03-Sep-1999. - -ttapi.obj: ttapi.c ttconfig.h arch\win32\ft_conf.h freetype.h fterrid.h \ - ftnameid.h ttengine.h tttypes.h ttmutex.h ttcalc.h ttmemory.h \ - ttcache.h ttfile.h ttdebug.h ttobjs.h tttables.h ttcmap.h ttload.h \ - ttgload.h ttraster.h ttextend.h -ttcache.obj: ttcache.c ttengine.h tttypes.h ttconfig.h \ - arch\win32\ft_conf.h freetype.h fterrid.h ftnameid.h ttmutex.h \ - ttmemory.h ttcache.h ttobjs.h tttables.h ttcmap.h ttdebug.h -ttcalc.obj: ttcalc.c ttcalc.h ttconfig.h arch\win32\ft_conf.h freetype.h \ - fterrid.h ftnameid.h ttdebug.h tttypes.h tttables.h -ttcmap.obj: ttcmap.c ttobjs.h ttconfig.h arch\win32\ft_conf.h ttengine.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmutex.h ttcache.h \ - tttables.h ttcmap.h ttdebug.h ttfile.h ttmemory.h ttload.h -ttdebug.obj: ttdebug.c ttdebug.h ttconfig.h arch\win32\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h tttables.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h ttcmap.h -ttextend.obj: ttextend.c ttextend.h ttconfig.h arch\win32\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttmemory.h -ttfile.obj: ttfile.c ttconfig.h arch\win32\ft_conf.h freetype.h \ - fterrid.h ftnameid.h tttypes.h ttdebug.h ttengine.h ttmutex.h \ - ttmemory.h ttfile.h -ttgload.obj: ttgload.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttdebug.h ttcalc.h ttfile.h \ - ttengine.h ttmutex.h tttables.h ttobjs.h ttcache.h ttcmap.h ttgload.h \ - ttmemory.h tttags.h ttload.h -ttinterp.obj: ttinterp.c freetype.h fterrid.h ftnameid.h tttypes.h \ - ttconfig.h arch\win32\ft_conf.h ttdebug.h ttcalc.h ttmemory.h \ - ttinterp.h ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h \ - ttcmap.h -ttload.obj: ttload.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttdebug.h ttcalc.h ttfile.h \ - ttengine.h ttmutex.h tttables.h ttobjs.h ttcache.h ttcmap.h \ - ttmemory.h tttags.h ttload.h -ttmemory.obj: ttmemory.c ttdebug.h ttconfig.h arch\win32\ft_conf.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmemory.h ttengine.h \ - ttmutex.h -ttmutex.obj: ttmutex.c ttmutex.h ttconfig.h arch\win32\ft_conf.h -ttobjs.obj: ttobjs.c ttobjs.h ttconfig.h arch\win32\ft_conf.h ttengine.h \ - tttypes.h freetype.h fterrid.h ftnameid.h ttmutex.h ttcache.h \ - tttables.h ttcmap.h ttfile.h ttdebug.h ttcalc.h ttmemory.h ttload.h \ - ttinterp.h ttextend.h -ttraster.obj: ttraster.c ttraster.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttengine.h tttypes.h ttmutex.h \ - ttdebug.h ttcalc.h ttmemory.h -extend\ftxcmap.obj: extend\ftxcmap.c extend\ftxcmap.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\win32\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h -extend\ftxerr18.obj: extend\ftxerr18.c ttconfig.h arch\win32\ft_conf.h \ - extend\ftxerr18.h freetype.h fterrid.h ftnameid.h extend\ftxkern.h \ - extend\ftxpost.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h -extend\ftxgasp.obj: extend\ftxgasp.c extend\ftxgasp.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\win32\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h -extend\ftxgdef.obj: extend\ftxgdef.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxgpos.obj: extend\ftxgpos.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxgsub.obj: extend\ftxgsub.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h tttags.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxkern.obj: extend\ftxkern.c extend\ftxkern.h freetype.h fterrid.h \ - ftnameid.h ttextend.h ttconfig.h arch\win32\ft_conf.h tttypes.h \ - ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttdebug.h \ - ttmemory.h ttfile.h ttload.h tttags.h -extend\ftxopen.obj: extend\ftxopen.c tttypes.h ttconfig.h arch\win32\ft_conf.h \ - freetype.h fterrid.h ftnameid.h ttload.h ttobjs.h ttengine.h \ - ttmutex.h ttcache.h tttables.h ttcmap.h ttextend.h ttmemory.h \ - ttfile.h ttdebug.h extend\ftxopen.h extend\ftxgdef.h extend\ftxgsub.h \ - extend\ftxgpos.h extend\ftxopenf.h -extend\ftxpost.obj: extend\ftxpost.c extend\ftxpost.h freetype.h fterrid.h \ - ftnameid.h tttypes.h ttconfig.h arch\win32\ft_conf.h ttobjs.h \ - ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttload.h ttfile.h \ - ttdebug.h tttags.h ttmemory.h ttextend.h -extend\ftxsbit.obj: extend\ftxsbit.c extend\ftxsbit.h freetype.h fterrid.h \ - ftnameid.h ttobjs.h ttconfig.h arch\win32\ft_conf.h ttengine.h \ - tttypes.h ttmutex.h ttcache.h tttables.h ttcmap.h ttfile.h ttdebug.h \ - ttload.h ttmemory.h tttags.h ttextend.h -extend\ftxwidth.obj: extend\ftxwidth.c extend\ftxwidth.h freetype.h fterrid.h \ - ftnameid.h ttdebug.h ttconfig.h arch\win32\ft_conf.h tttypes.h \ - ttobjs.h ttengine.h ttmutex.h ttcache.h tttables.h ttcmap.h ttfile.h \ - tttags.h ttload.h -!ifndef __MAKE__ -arch\win32\freetype.obj: arch\win32\freetype.c ttapi.c ttconfig.h \ - arch\win32\ft_conf.h freetype.h fterrid.h ftnameid.h ttengine.h \ - tttypes.h ttmutex.h ttcalc.h ttmemory.h ttcache.h ttfile.h ttdebug.h \ - ttobjs.h tttables.h ttcmap.h ttload.h ttgload.h ttraster.h ttextend.h \ - ttcache.c ttcalc.c ttcmap.c ttdebug.c ttgload.c tttags.h ttinterp.c \ - ttinterp.h ttload.c ttobjs.c ttraster.c ttfile.c ttmemory.c ttmutex.c \ - ttextend.c -!endif Index: xc/extras/FreeType/lib/arch/win32/freetype.c diff -u xc/extras/FreeType/lib/arch/win32/freetype.c:1.1.1.2 xc/extras/FreeType/lib/arch/win32/freetype.c:removed --- xc/extras/FreeType/lib/arch/win32/freetype.c:1.1.1.2 Sat Feb 12 23:55:57 2000 +++ xc/extras/FreeType/lib/arch/win32/freetype.c Wed Mar 16 20:59:44 2005 @@ -1,42 +0,0 @@ -/* This file is part of the FreeType project */ - -/* single object library component for Win32 */ -#define TT_MAKE_OPTION_SINGLE_OBJECT - -/* Note, you should define the EXPORT_DEF and EXPORT_FUNC macros */ -/* here if you want to build a Win32 DLL. If undefined, the */ -/* macros default to "extern"/"" (nothing), which is suitable */ -/* for static libraries. See `ttconfig.h' for details. */ - -/* The macro EXPORT_DEF is placed before each high-level API */ -/* function declaration, and EXPORT_FUNC before each definition */ -/* (body). You can then use it to take any compiler-specific */ -/* pragma for DLL-exported symbols */ - -/* first include common core components */ - -#include "ttapi.c" -#include "ttcache.c" -#include "ttcalc.c" -#include "ttcmap.c" -#include "ttdebug.c" -#include "ttgload.c" -#include "ttinterp.c" -#include "ttload.c" -#include "ttobjs.c" -#include "ttraster.c" - -/* then system-specific (or ANSI) components */ - -#include "ttfile.c" -#include "ttmemory.c" -#include "ttmutex.c" - -/* finally, add some extensions */ - -#ifdef TT_CONFIG_OPTION_EXTEND_ENGINE -#include "ttextend.c" -#endif - - -/* END */ Index: xc/extras/FreeType/lib/arch/win32/freetype.dsp diff -u xc/extras/FreeType/lib/arch/win32/freetype.dsp:1.1.1.1 xc/extras/FreeType/lib/arch/win32/freetype.dsp:removed --- xc/extras/FreeType/lib/arch/win32/freetype.dsp:1.1.1.1 Sat Sep 5 23:00:49 1998 +++ xc/extras/FreeType/lib/arch/win32/freetype.dsp Wed Mar 16 20:59:44 2005 @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="freetype" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=freetype - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "freetype.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe - -!IF "$(CFG)" == "freetype - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O1 /I "." /I "..\.." /I "..\..\extend" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c -# SUBTRACT CPP /YX -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "freetype - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /Zi /O1 /I "." /I "..\.." /I "..\..\extend" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c -# SUBTRACT CPP /YX -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "freetype - Win32 Release" -# Name "freetype - Win32 Debug" -# Begin Source File - -SOURCE=.\freetype.c -# End Source File -# Begin Source File - -SOURCE=..\..\Extend\Ftxcmap.c -# End Source File -# Begin Source File - -SOURCE=..\..\Extend\ftxerr18.c -# End Source File -# Begin Source File - -SOURCE=..\..\Extend\Ftxgasp.c -# End Source File -# Begin Source File - -SOURCE=..\..\Extend\Ftxkern.c -# End Source File -# Begin Source File - -SOURCE=..\..\Extend\ftxpost.c -# End Source File -# End Target -# End Project Index: xc/extras/FreeType/lib/arch/win32/freetype.dsw diff -u xc/extras/FreeType/lib/arch/win32/freetype.dsw:1.1.1.1 xc/extras/FreeType/lib/arch/win32/freetype.dsw:removed --- xc/extras/FreeType/lib/arch/win32/freetype.dsw:1.1.1.1 Sat Sep 5 23:00:49 1998 +++ xc/extras/FreeType/lib/arch/win32/freetype.dsw Wed Mar 16 20:59:44 2005 @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 5.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "freetype"=.\freetype.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Index: xc/extras/FreeType/lib/arch/win32/freetype.mak diff -u xc/extras/FreeType/lib/arch/win32/freetype.mak:1.1.1.1 xc/extras/FreeType/lib/arch/win32/freetype.mak:removed --- xc/extras/FreeType/lib/arch/win32/freetype.mak:1.1.1.1 Sat Sep 5 23:00:49 1998 +++ xc/extras/FreeType/lib/arch/win32/freetype.mak Wed Mar 16 20:59:44 2005 @@ -1,353 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -!IF "$(CFG)" == "" -CFG=freetype - Win32 Debug -!MESSAGE No configuration specified. Defaulting to freetype - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "freetype - Win32 Release" && "$(CFG)" !=\ - "freetype - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "freetype - Win32 Debug" -CPP=cl.exe - -!IF "$(CFG)" == "freetype - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\freetype.lib" - -CLEAN : - -@erase ".\Release\freetype.lib" - -@erase ".\Release\Ftxkern.obj" - -@erase ".\Release\ftxpost.obj" - -@erase ".\Release\ftxerr18.obj" - -@erase ".\Release\Ftxcmap.obj" - -@erase ".\Release\Freetype.obj" - -@erase ".\Release\Ftxgasp.obj" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /I "." /I "..\.." /I "..\..\extend" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "." /I "..\.." /I "..\..\extend" /D "WIN32"\ - /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/freetype.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS= -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/freetype.bsc" -BSC32_SBRS= -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -LIB32_FLAGS=/nologo /out:"$(OUTDIR)/freetype.lib" -LIB32_OBJS= \ - "$(INTDIR)/Ftxkern.obj" \ - "$(INTDIR)/ftxpost.obj" \ - "$(INTDIR)/ftxerr18.obj" \ - "$(INTDIR)/Ftxcmap.obj" \ - "$(INTDIR)/Freetype.obj" \ - "$(INTDIR)/Ftxgasp.obj" - -"$(OUTDIR)\freetype.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -!ELSEIF "$(CFG)" == "freetype - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\freetype.lib" - -CLEAN : - -@erase ".\Debug\freetype.lib" - -@erase ".\Debug\Freetype.obj" - -@erase ".\Debug\Ftxkern.obj" - -@erase ".\Debug\ftxpost.obj" - -@erase ".\Debug\Ftxcmap.obj" - -@erase ".\Debug\Ftxgasp.obj" - -@erase ".\Debug\ftxerr18.obj" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "." /I "..\.." /I "..\..\extend" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -CPP_PROJ=/nologo /MLd /W3 /GX /Z7 /Od /I "." /I "..\.." /I "..\..\extend" /D\ - "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/freetype.pch" /YX\ - /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS= -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/freetype.bsc" -BSC32_SBRS= -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -LIB32_FLAGS=/nologo /out:"$(OUTDIR)/freetype.lib" -LIB32_OBJS= \ - "$(INTDIR)/Freetype.obj" \ - "$(INTDIR)/Ftxkern.obj" \ - "$(INTDIR)/ftxpost.obj" \ - "$(INTDIR)/Ftxcmap.obj" \ - "$(INTDIR)/Ftxgasp.obj" \ - "$(INTDIR)/ftxerr18.obj" - -"$(OUTDIR)\freetype.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "freetype - Win32 Release" -# Name "freetype - Win32 Debug" - -!IF "$(CFG)" == "freetype - Win32 Release" - -!ELSEIF "$(CFG)" == "freetype - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=\Freetype\Lib\Extend\ftxpost.c -DEP_CPP_FTXPO=\ - ".\..\..\Extend\ftxpost.h"\ - ".\..\..\tttypes.h"\ - ".\..\..\ttobjs.h"\ - ".\..\..\tttables.h"\ - ".\..\..\ttload.h"\ - ".\..\..\ttfile.h"\ - ".\..\..\tttags.h"\ - ".\..\..\ttmemory.h"\ - ".\..\..\ttextend.h"\ - ".\..\..\freetype.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - "..\..\ttengine.h"\ - "..\..\ttmutex.h"\ - "..\..\ttcache.h"\ - "..\..\ttcmap.h"\ - ".\..\..\ttdebug.h"\ - - -"$(INTDIR)\ftxpost.obj" : $(SOURCE) $(DEP_CPP_FTXPO) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\Freetype\Lib\Extend\ftxerr18.c -DEP_CPP_FTXER=\ - ".\..\..\Extend\ftxerr18.h"\ - ".\..\..\Extend\ftxkern.h"\ - ".\..\..\Extend\ftxpost.h"\ - ".\..\..\freetype.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - - -"$(INTDIR)\ftxerr18.obj" : $(SOURCE) $(DEP_CPP_FTXER) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\Freetype\Lib\Extend\Ftxgasp.c -DEP_CPP_FTXGA=\ - ".\..\..\Extend\ftxgasp.h"\ - ".\..\..\tttypes.h"\ - ".\..\..\ttobjs.h"\ - ".\..\..\tttables.h"\ - ".\..\..\freetype.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - "..\..\ttengine.h"\ - "..\..\ttmutex.h"\ - "..\..\ttcache.h"\ - "..\..\ttcmap.h"\ - - -"$(INTDIR)\Ftxgasp.obj" : $(SOURCE) $(DEP_CPP_FTXGA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\Freetype\Lib\Extend\Ftxkern.c -DEP_CPP_FTXKE=\ - ".\..\..\Extend\ftxkern.h"\ - ".\..\..\ttextend.h"\ - ".\..\..\tttypes.h"\ - ".\..\..\ttdebug.h"\ - ".\..\..\ttmemory.h"\ - ".\..\..\ttfile.h"\ - ".\..\..\ttobjs.h"\ - ".\..\..\ttload.h"\ - ".\..\..\tttags.h"\ - ".\..\..\freetype.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - "..\..\ttengine.h"\ - "..\..\ttmutex.h"\ - "..\..\ttcache.h"\ - ".\..\..\tttables.h"\ - "..\..\ttcmap.h"\ - - -"$(INTDIR)\Ftxkern.obj" : $(SOURCE) $(DEP_CPP_FTXKE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\Freetype\Lib\Extend\Ftxcmap.c -DEP_CPP_FTXCM=\ - ".\..\..\Extend\ftxcmap.h"\ - ".\..\..\tttypes.h"\ - ".\..\..\ttobjs.h"\ - ".\..\..\tttables.h"\ - ".\..\..\freetype.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - "..\..\ttengine.h"\ - "..\..\ttmutex.h"\ - "..\..\ttcache.h"\ - "..\..\ttcmap.h"\ - - -"$(INTDIR)\Ftxcmap.obj" : $(SOURCE) $(DEP_CPP_FTXCM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\Freetype.c -DEP_CPP_FREET=\ - ".\..\..\ttapi.c"\ - ".\..\..\ttcache.c"\ - ".\..\..\ttcalc.c"\ - ".\..\..\ttcmap.c"\ - ".\..\..\ttgload.c"\ - ".\..\..\ttinterp.c"\ - ".\..\..\ttload.c"\ - ".\..\..\ttobjs.c"\ - ".\..\..\ttraster.c"\ - ".\..\..\ttfile.c"\ - ".\..\..\ttmemory.c"\ - ".\..\..\ttmutex.c"\ - ".\..\..\ttextend.c"\ - ".\..\..\freetype.h"\ - "..\..\ttengine.h"\ - "..\..\ttcalc.h"\ - ".\..\..\ttmemory.h"\ - "..\..\ttcache.h"\ - ".\..\..\ttfile.h"\ - ".\..\..\ttobjs.h"\ - ".\..\..\ttload.h"\ - "..\..\ttgload.h"\ - "..\..\ttraster.h"\ - ".\..\..\ttextend.h"\ - "..\..\ttconfig.h"\ - ".\ft_conf.h"\ - "..\..\ttmutex.h"\ - ".\..\..\tttypes.h"\ - ".\..\..\ttdebug.h"\ - ".\..\..\tttables.h"\ - "..\..\ttcmap.h"\ - ".\..\..\tttags.h"\ - "..\..\ttinterp.h"\ - {$(INCLUDE)}"\unistd.h"\ - - -"$(INTDIR)\Freetype.obj" : $(SOURCE) $(DEP_CPP_FREET) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ Index: xc/extras/FreeType/lib/arch/win32/ft_conf.h diff -u xc/extras/FreeType/lib/arch/win32/ft_conf.h:1.1.1.3 xc/extras/FreeType/lib/arch/win32/ft_conf.h:removed --- xc/extras/FreeType/lib/arch/win32/ft_conf.h:1.1.1.3 Sat Feb 12 23:55:59 2000 +++ xc/extras/FreeType/lib/arch/win32/ft_conf.h Wed Mar 16 20:59:44 2005 @@ -1,210 +0,0 @@ -/* This file is part of the FreeType project */ - -/* ft_conf.h for Win32 */ - - -/* we need the following because there are some typedefs in this file */ - -#ifndef FT_CONF_H -#define FT_CONF_H - -#ifndef WIN32 -#define WIN32 -#endif - -/* Define to empty if the 'const' keyword does not work. */ -/* #undef const */ - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H - -/* Define if you have the getpagesize function. */ -#undef HAVE_GETPAGESIZE - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE - -/* Define if you have the valloc function. */ -#undef HAVE_VALLOC - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - -/**********************************************************************/ -/* */ -/* The following configuration macros can be tweaked manually by */ -/* a developer to turn on or off certain features or options in the */ -/* TrueType engine. This may be useful to tune it for specific */ -/* purposes.. */ -/* */ -/**********************************************************************/ - - -/*************************************************************************/ -/* Define this if the underlying operating system uses a different */ -/* character width than 8bit for file names. You must then also supply */ -/* a typedef declaration for defining 'TT_Text'. Default is off. */ - -/* #define HAVE_TT_TEXT */ - - -/*************************************************************************/ -/* Define this if you want to generate code to support engine extensions */ -/* Default is on, but if you're satisfied by the basic services provided */ -/* by the engine and need no extensions, undefine this configuration */ -/* macro to save a few more bytes. */ - -#define TT_CONFIG_OPTION_EXTEND_ENGINE - - -/*************************************************************************/ -/* Define this if you want to generate code to support gray-scaling, */ -/* a.k.a. font-smoothing or anti-aliasing. Default is on, but you can */ -/* disable it if you don't need it. */ - -#define TT_CONFIG_OPTION_GRAY_SCALING - - -/*************************************************************************/ -/* Define this if you want to completely disable the use of the bytecode */ -/* interpreter. Doing so will produce a much smaller library, but the */ -/* quality of the rendered glyphs will enormously suffer from this. */ -/* */ -/* This switch was introduced due to the Apple patents issue which */ -/* emerged recently on the FreeType lists. We still do not have Apple's */ -/* opinion on the subject and will change this as soon as we have. */ - -#undef TT_CONFIG_OPTION_NO_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to use a big 'switch' statement within the */ -/* bytecode interpreter. Because some non-optimizing compilers are not */ -/* able to produce jump tables from such statements, undefining this */ -/* configuration macro will generate the appropriate C jump table in */ -/* ttinterp.c. If you use an optimizing compiler, you should leave it */ -/* defined for better performance and code compactness.. */ - -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the TrueType */ -/* bytecode interpreter. This will produce much bigger code, which */ -/* _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_INTERPRETER - - -/*************************************************************************/ -/* Define this if you want to build a 'static' version of the scan-line */ -/* converter (the component which in charge of converting outlines into */ -/* bitmaps). This will produce a bigger object file for "ttraster.c", */ -/* which _may_ be faster on some architectures.. */ -/* */ -/* Do NOT DEFINE THIS is you build a thread-safe version of the engine */ -/* */ -#undef TT_CONFIG_OPTION_STATIC_RASTER - - -/*************************************************************************/ -/* Define TT_CONFIG_THREAD_SAFE if you want to build a thread-safe */ -/* version of the library. */ - -#undef TT_CONFIG_OPTION_THREAD_SAFE - - -/**********************************************************************/ -/* */ -/* The following macros are used to define the debug level, as well */ -/* as individual tracing levels for each component. There are */ -/* currently three modes of operation : */ -/* */ -/* - trace mode (define DEBUG_LEVEL_TRACE) */ -/* */ -/* The engine prints all error messages, as well as tracing */ -/* ones, filtered by each component's level */ -/* */ -/* - debug mode (define DEBUG_LEVEL_ERROR) */ -/* */ -/* Disable tracing, but keeps error output and assertion */ -/* checks. */ -/* */ -/* - release mode (don't define anything) */ -/* */ -/* Don't include error-checking or tracing code in the */ -/* engine's code. Ideal for releases. */ -/* */ -/* NOTE : */ -/* */ -/* Each component's tracing level is defined in its own source. */ -/* */ -/**********************************************************************/ - -/* Define if you want to use the tracing debug mode */ -#undef DEBUG_LEVEL_TRACE - -/* Define if you want to use the error debug mode - ignored if */ -/* DEBUG_LEVEL_TRACE is defined */ -#undef DEBUG_LEVEL_ERROR - - -/**************************************************************************/ -/* Definition of various integer sizes. These types are used by ttcalc */ -/* and ttinterp (for the 64-bit integers) only.. */ - -#if SIZEOF_INT == 4 - - typedef signed int TT_Int32; - typedef unsigned int TT_Word32; - -#elif SIZEOF_LONG == 4 - - typedef signed long TT_Int32; - typedef unsigned long TT_Word32; - -#else -#error "no 32bit type found" -#endif - -#if SIZEOF_LONG == 8 - -/* LONG64 must be defined when a 64-bit type is available */ -/* INT64 must then be defined to this type.. */ -#define LONG64 -#define INT64 long - -#else - -/* GCC provides the non-ANSI 'long long' 64-bit type. You can activate */ -/* by defining the TT_USE_LONG_LONG macro in 'ft_conf.h'. Note that this */ -/* will produce many -ansi warnings during library compilation. */ -#ifdef TT_USE_LONG_LONG - -#define LONG64 -#define INT64 long long - -#endif /* TT_USE_LONG_LONG */ -#endif - -#endif /* FT_CONF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/arch/win32/makedef diff -u xc/extras/FreeType/lib/arch/win32/makedef:1.1.1.1 xc/extras/FreeType/lib/arch/win32/makedef:removed --- xc/extras/FreeType/lib/arch/win32/makedef:1.1.1.1 Sat Feb 12 23:55:59 2000 +++ xc/extras/FreeType/lib/arch/win32/makedef Wed Mar 16 20:59:44 2005 @@ -1,24 +0,0 @@ -# makedef -# -# This shell script creates a .DEF file necessary for building as DLL -# on the Windows 32-bit platform. - -echo "\ -; This definition file to be used to built the library as DLL -; has been generated automatically with the script \`makedef' on -; `date +%d-%b-%Y`. - -LIBRARY ft13_32 -DESCRIPTION 'FreeType 1.3 32-bit DLL © 1996-1999 Turner, Wilhelm, Lemberg' -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -EXPORTS -" > ttf.def - -(cd ../.. - sed -n -e "/^ *EXPORT_DEF/!d ; n ; s/(.*$//" \ - -e "s/;$//" -e "s/ const / /" -e "s/ *[a-zA-Z][a-zA-Z_\*]* //" \ - -e "s/ *//g" -e "s/^/ /" -e "p" *.h extend/*.h) >> ttf.def - -# eof Index: xc/extras/FreeType/lib/arch/win32/makedep diff -u xc/extras/FreeType/lib/arch/win32/makedep:1.1.1.1 xc/extras/FreeType/lib/arch/win32/makedep:removed --- xc/extras/FreeType/lib/arch/win32/makedep:1.1.1.1 Sat Feb 12 23:55:59 2000 +++ xc/extras/FreeType/lib/arch/win32/makedep Wed Mar 16 20:59:44 2005 @@ -1,29 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for some compilers -# on the Win32 platform. - -echo "\ -# This dependency file to be used with various Win32 compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.win - -(cd ../.. - gcc -MM -Iarch/win32 -I. *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.win - -(cd ../.. - gcc -MM -Iarch/win32 -I. -Iextend extend/*.c | \ - sed -e "s/^\(.*\)\.o:/extend\\\\\1.obj:/" -e "s:/:\\\\:g") >> depend.win - -echo "!ifndef __MAKE__" >> depend.win - -(cd ../.. - gcc -MM -Iarch/win32 -I. -Iextend arch/win32/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\win32\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.win - -echo "!endif" >> depend.win - -# eof Index: xc/extras/FreeType/lib/arch/win32/ttf.def diff -u xc/extras/FreeType/lib/arch/win32/ttf.def:1.1.1.1 xc/extras/FreeType/lib/arch/win32/ttf.def:removed --- xc/extras/FreeType/lib/arch/win32/ttf.def:1.1.1.1 Sat Feb 12 23:55:59 2000 +++ xc/extras/FreeType/lib/arch/win32/ttf.def Wed Mar 16 20:59:44 2005 @@ -1,127 +0,0 @@ -; This definition file to be used to built the library as DLL -; has been generated automatically with the script `makedef' on -; 03-Sep-1999. - -LIBRARY ft13_32 -DESCRIPTION 'FreeType 1.3 32-bit DLL © 1996-1999 Turner, Wilhelm, Lemberg' -EXETYPE WINDOWS -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE -EXPORTS - - TT_FreeType_Version - TT_Init_FreeType - TT_Done_FreeType - TT_Set_Raster_Gray_Palette - TT_Open_Face - TT_Open_Collection - TT_Get_Face_Properties - TT_Set_Face_Pointer - TT_Get_Face_Pointer - TT_Flush_Face - TT_Get_Face_Metrics - TT_Close_Face - TT_Get_Font_Data - TT_New_Instance - TT_Set_Instance_Resolutions - TT_Set_Instance_CharSize - TT_Set_Instance_CharSizes - TT_Set_Instance_PixelSizes - TT_Set_Instance_Transform_Flags - TT_Get_Instance_Metrics - TT_Set_Instance_Pointer - TT_Get_Instance_Pointer - TT_Done_Instance - TT_New_Glyph - TT_Done_Glyph - TT_Load_Glyph - TT_Get_Glyph_Outline - TT_Get_Glyph_Metrics - TT_Get_Glyph_Big_Metrics - TT_Get_Glyph_Bitmap - TT_Get_Glyph_Pixmap - TT_New_Outline - TT_Done_Outline - TT_Copy_Outline - TT_Get_Outline_Bitmap - TT_Get_Outline_Pixmap - TT_Get_Outline_BBox - TT_Transform_Outline - TT_Translate_Outline - TT_Transform_Vector - TT_MulDiv - TT_MulFix - TT_Get_CharMap_Count - TT_Get_CharMap_ID - TT_Get_CharMap - TT_Char_Index - TT_Get_Name_Count - TT_Get_Name_ID - TT_Get_Name_String - TT_Register_Extension - TT_Extension_Get - TT_Use_Stream - TT_Done_Stream - TT_Flush_Stream - TT_Read_File - TT_Seek_File - TT_Skip_File - TT_Read_At_File - TT_File_Pos - TT_Stream_Size - TT_Null_FileFrame - TT_Access_Frame - TT_Check_And_Access_Frame - TT_Forget_Frame - TT_Get_Char - TT_Get_Short - TT_Get_Long - TT_LookUp_Table - TT_Alloc - TT_Realloc - TT_Free - TT_CharMap_First - TT_CharMap_Next - TT_CharMap_Last - TT_ErrToString18 - TT_Get_Face_Gasp_Flags - TT_Init_GDEF_Extension - TT_Load_GDEF_Table - TT_GDEF_Get_Glyph_Property - TT_GDEF_Build_ClassDefinition - TT_Init_GPOS_Extension - TT_Load_GPOS_Table - TT_GPOS_Select_Script - TT_GPOS_Select_Language - TT_GPOS_Select_Feature - TT_GPOS_Query_Scripts - TT_GPOS_Query_Languages - TT_GPOS_Query_Features - TT_GPOS_Add_Feature - TT_GPOS_Clear_Features - TT_Init_GSUB_Extension - TT_Load_GSUB_Table - TT_GSUB_Select_Script - TT_GSUB_Select_Language - TT_GSUB_Select_Feature - TT_GSUB_Query_Scripts - TT_GSUB_Query_Languages - TT_GSUB_Query_Features - TT_GSUB_Add_Feature - TT_GSUB_Clear_Features - TT_GSUB_Register_Alternate_Function - TT_GSUB_Apply_String - TT_GSUB_Add_String - TT_Init_Kerning_Extension - TT_Get_Kerning_Directory - TT_Load_Kerning_Table - TT_Init_Post_Extension - TT_Load_PS_Names - TT_Get_PS_Name - TT_Init_SBit_Extension - TT_Get_Face_Bitmaps - TT_New_SBit_Image - TT_Done_SBit_Image - TT_Get_SBit_Strike - TT_Load_Glyph_Bitmap - TT_Get_Face_Widths Index: xc/extras/FreeType/lib/extend/ftxcmap.c diff -u xc/extras/FreeType/lib/extend/ftxcmap.c:1.5 xc/extras/FreeType/lib/extend/ftxcmap.c:removed --- xc/extras/FreeType/lib/extend/ftxcmap.c:1.5 Sun Feb 13 00:03:59 2000 +++ xc/extras/FreeType/lib/extend/ftxcmap.c Wed Mar 16 20:59:44 2005 @@ -1,347 +0,0 @@ -/******************************************************************* - * - * ftxcmap.h 1.0 - * - * API extension for iterating over Cmaps - * - * Copyright 1996-1999 by Juliusz Chroboczek, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - ******************************************************************/ - -#include "ftxcmap.h" - -#include "tttypes.h" -#include "ttobjs.h" -#include "tttables.h" - -static Long charmap_first4 ( PCMap4, UShort* ); -static Long charmap_next4 ( PCMap4, UShort, UShort* ); -static Long charmap_last4 ( PCMap4, UShort* ); -static UShort charmap_find_id4( PCMap4, UShort, TCMap4Segment*, UShort ); - - -/******************************************************************* - * - * Function : TT_CharMap_First - * - * Description : Returns the first valid character code in a - * given character map. Also returns the corresponding - * glyph index. - * - * Input : charMap handle to the target character map - * id address where the glyph index will be - * be returned in case of success - * - * Output : First valid character code. -1 in case of failure. - * - * Notes : - * - ******************************************************************/ - -EXPORT_FUNC -TT_Long TT_CharMap_First( TT_CharMap charMap, - TT_UShort* id ) -{ - PCMapTable cmap; - UShort i, c; - - - if ( !( cmap = HANDLE_CharMap( charMap ) ) ) - return -1; - - switch ( cmap->format ) - { - case 0: - if ( id ) - *id = cmap->c.cmap0.glyphIdArray[0]; - return 0; - - case 4: - return charmap_first4( &cmap->c.cmap4, id ); - - case 6: - if ( cmap->c.cmap6.entryCount < 1 ) - return -1; - - if ( id ) - *id = cmap->c.cmap6.glyphIdArray[0]; - return cmap->c.cmap6.firstCode; - - default: - /* Now loop from 0 to 65535. We can't use a simple "for' on */ - /* 16-bits systems, hence the "strange" loop here.. */ - i = 0; - do - { - c = TT_Char_Index( charMap, i ); - if ( c > 0 ) - { - if ( id ) - *id = c; - return i; - } - i++; - } while ( i != 0 ); /* because i is UShort! */ - - return -1; - } -} - - -static Long charmap_first4( PCMap4 cmap4, - UShort* id ) -{ - UShort firstCode; - - - if ( cmap4->segCountX2 / 2 < 1 ) - return -1; - - firstCode = cmap4->segments[0].startCount; - - if ( id ) - *id = charmap_find_id4( cmap4, firstCode, &(cmap4->segments[0]), 0 ); - - return firstCode; -} - - -/******************************************************************* - * - * Function : TT_CharMap_Next - * - * Description : Returns the next valid character code in a given - * charMap. - * - * Input : charMap handle to the target char. map - * index starting character code - * id address where the glyph index of the next - * character will be returned - * - * Output : Next valid character code after 'index'. -1 in case - * of failure. - * - * Notes : - * - ******************************************************************/ - -EXPORT_FUNC -TT_Long TT_CharMap_Next( TT_CharMap charMap, - TT_UShort index, - TT_UShort* id ) -{ - PCMapTable cmap; - UShort i, c; - - - cmap = HANDLE_CharMap( charMap ); - if ( !cmap ) - return -1; - - switch ( cmap->format ) - { - case 0: - if ( index < 255 ) - { - if ( id ) - *id = cmap->c.cmap0.glyphIdArray[index + 1]; - return index + 1; - } - else - return -1; - - case 4: - return charmap_next4( &cmap->c.cmap4, index, id ); - - case 6: - { - UShort firstCode = cmap->c.cmap6.firstCode; - - - if ( index + 1 < firstCode + cmap->c.cmap6.entryCount ) - { - if ( id ) - *id = cmap->c.cmap6.glyphIdArray[index + 1 - firstCode]; - return index + 1; - } - else - return -1; - } - - default: - /* Now loop from 0 to 65535. We can't use a simple "for" on */ - /* 16-bits systems, hence the "strange" loop here.. */ - i = 0; - do - { - c = TT_Char_Index( charMap, i ); - if ( c > 0 ) - { - if ( id ) - *id = c; - return i; - } - i++; - } while ( i != 0 ); /* because i is UShort! */ - - return -1; - } -} - - -static Long charmap_next4( PCMap4 cmap4, - UShort charCode, - UShort* id) -{ - UShort segCount, nextCode; - UShort i; - TCMap4Segment seg4; - - - if ( charCode == 0xFFFF ) - return -1; /* get it out of the way now */ - - segCount = cmap4->segCountX2 / 2; - - for ( i = 0; i < segCount; i++ ) - if ( charCode < cmap4->segments[i].endCount ) - break; - - /* Safety check - even though the last endCount should be 0xFFFF */ - if ( i >= segCount ) - return -1; - - seg4 = cmap4->segments[i]; - - if ( charCode < seg4.startCount ) - nextCode = seg4.startCount; - else - nextCode = charCode + 1; - - if ( id ) - *id = charmap_find_id4( cmap4, nextCode, &seg4, i ); - - return nextCode; -} - - -static UShort -charmap_find_id4( PCMap4 cmap4, - UShort charCode, - TCMap4Segment* seg4, - UShort i ) -{ - UShort index1; - - - if ( seg4->idRangeOffset == 0 ) - return (charCode + seg4->idDelta) & 0xFFFF; - else - { - index1 = seg4->idRangeOffset / 2 + charCode-seg4->startCount - - ( cmap4->segCountX2 / 2 - i ); - - if ( index1 >= cmap4->numGlyphId || cmap4->glyphIdArray[index1] == 0 ) - return 0; - else - return (cmap4->glyphIdArray[index1] + seg4->idDelta) & 0xFFFF; - } -} - - -/******************************************************************* - * - * Function : TT_CharMap_Last - * - * Description : Returns the last valid character code in a - * given character map. Also returns the corresponding - * glyph index. - * - * Input : charMap handle to the target character map - * id address where the glyph index will be - * be returned in case of success - * - * Output : Last valid character code. -1 in case of failure. - * - * Notes : - * - ******************************************************************/ - -EXPORT_FUNC -TT_Long TT_CharMap_Last( TT_CharMap charMap, - TT_UShort* id ) -{ - PCMapTable cmap; - UShort i, c; - - - if ( !( cmap = HANDLE_CharMap( charMap ) ) ) - return -1; - - switch ( cmap->format ) - { - case 0: - if ( id ) - *id = cmap->c.cmap0.glyphIdArray[255]; - return 255; - - case 4: - return charmap_last4( &cmap->c.cmap4, id ); - - case 6: - if ( cmap->c.cmap6.entryCount < 1 ) - return -1; - - if ( id ) - *id = cmap->c.cmap6.glyphIdArray[cmap->c.cmap6.entryCount - 1]; - return cmap->c.cmap6.firstCode + cmap->c.cmap6.entryCount - 1; - - default: - i = 65535; - do - { - c = TT_Char_Index( charMap, i ); - if ( c > 0 ) - { - if ( id ) - *id = c; - return i; - } - i--; - } while ( i != 0 ); - - return -1; - } -} - - -static Long charmap_last4( PCMap4 cmap4, - UShort* id ) -{ - UShort lastCode; - - - if ( cmap4->segCountX2 / 2 < 1 ) - return -1; - - lastCode = cmap4->segments[cmap4->segCountX2 / 2 - 1].endCount; - - if ( id ) - *id = charmap_find_id4( cmap4, - lastCode, - &(cmap4->segments[cmap4->segCountX2 / 2 - 1]), - 0 ); - - return lastCode; -} - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxcmap.h diff -u xc/extras/FreeType/lib/extend/ftxcmap.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxcmap.h:removed --- xc/extras/FreeType/lib/extend/ftxcmap.h:1.1.1.3 Sat Feb 12 23:56:00 2000 +++ xc/extras/FreeType/lib/extend/ftxcmap.h Wed Mar 16 20:59:44 2005 @@ -1,60 +0,0 @@ -/******************************************************************* - * - * ftxcmap.h 1.0 - * - * API extension for iterating over Cmaps - * - * Copyright 1996-1999 by Juliusz Chroboczek, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - ******************************************************************/ - -#ifndef FTXCMAP_H -#define FTXCMAP_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /* Find the first entry of a Cmap. Its glyph index is returned */ - /* in the "id" field, while the function returns the first valid */ - /* character code in the Cmap. It returns -1 in case of failure. */ - - EXPORT_DEF - TT_Long TT_CharMap_First( TT_CharMap charMap, - TT_UShort* id ); - - - /* Find the next entry of Cmap. Same return conventions. */ - - EXPORT_DEF - TT_Long TT_CharMap_Next( TT_CharMap charMap, - TT_UShort startId, - TT_UShort* id ); - - /* Find the last entry of a Cmap. Its glyph index is returned */ - /* in the "id" field, while the function returns the last valid */ - /* character code in the Cmap. It returns -1 in case of failure. */ - - EXPORT_DEF - TT_Long TT_CharMap_Last( TT_CharMap charMap, - TT_UShort* id ); - - -#ifdef __cplusplus -} -#endif - -#endif /* FTXCMAP_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxerr18.c diff -u xc/extras/FreeType/lib/extend/ftxerr18.c:1.1.1.3 xc/extras/FreeType/lib/extend/ftxerr18.c:removed --- xc/extras/FreeType/lib/extend/ftxerr18.c:1.1.1.3 Sat Feb 12 23:56:00 2000 +++ xc/extras/FreeType/lib/extend/ftxerr18.c Wed Mar 16 20:59:44 2005 @@ -1,241 +0,0 @@ -/****************************************************************************/ -/* */ -/* Erwin Dieterich, 15. 10. 1997 */ -/* - 15. 08. 1999 */ -/* */ -/* TT_ErrToString: translate error codes to character strings */ -/* */ -/* This extension provides internationalized error strings from the */ -/* various error messages. It uses the "gettext" package if available */ -/* or returns English/American message strings if not. */ -/* */ -/* If you do not want to use it, or if you encounter some problems */ -/* compiling this file, try to disable nls support when invoking */ -/* ./configure (on Unix). */ -/* */ -/* */ -/****************************************************************************/ - -#include "ttconfig.h" - -#include "ftxerr18.h" -#include "ftxkern.h" -#include "ftxpost.h" -#include "ftxopen.h" - -#ifdef HAVE_LOCALE_H -#include -#endif - -#ifdef HAVE_LIBINTL_H -#include -#undef _ -#define _( String ) dgettext( "freetype", String ) -#else -#define _( String ) ( String ) -#endif - - -EXPORT_FUNC -TT_String* TT_ErrToString18( TT_Error error ) -{ - - switch ( error ) - { - /* ----- high-level API error codes ----- */ - case TT_Err_Ok: - return _( "Successful function call, no error." ); - - case TT_Err_Invalid_Face_Handle: - return _( "Invalid face handle." ); - case TT_Err_Invalid_Instance_Handle: - return _( "Invalid instance handle." ); - case TT_Err_Invalid_Glyph_Handle: - return _( "Invalid glyph handle." ); - case TT_Err_Invalid_CharMap_Handle: - return _( "Invalid charmap handle." ); - case TT_Err_Invalid_Result_Address: - return _( "Invalid result address." ); - case TT_Err_Invalid_Glyph_Index: - return _( "Invalid glyph index." ); - case TT_Err_Invalid_Argument: - return _( "Invalid argument." ); - case TT_Err_Could_Not_Open_File: - return _( "Could not open file." ); - case TT_Err_File_Is_Not_Collection: - return _( "File is not a TrueType collection." ); - - case TT_Err_Table_Missing: - return _( "Mandatory table missing." ); - case TT_Err_Invalid_Horiz_Metrics: - return _( "Invalid horizontal metrics (hmtx table broken)." ); - case TT_Err_Invalid_CharMap_Format: - return _( "Invalid charmap format." ); - case TT_Err_Invalid_PPem: - return _( "Invalid ppem value." ); - case TT_Err_Invalid_Vert_Metrics: - return _( "Invalid vertical metrics (vmtx table broken)." ); - - case TT_Err_Invalid_File_Format: - return _( "Invalid file format." ); - - case TT_Err_Invalid_Engine: - return _( "Invalid engine." ); - case TT_Err_Too_Many_Extensions: - return _( "Too many extensions." ); - case TT_Err_Extensions_Unsupported: - return _( "Extensions unsupported." ); - case TT_Err_Invalid_Extension_Id: - return _( "Invalid extension id." ); - - case TT_Err_No_Vertical_Data: - return _( "No vertical data in font." ); - - case TT_Err_Max_Profile_Missing: - return _( "Maximum Profile (maxp) table missing." ); - case TT_Err_Header_Table_Missing: - return _( "Font Header (head) table missing." ); - case TT_Err_Horiz_Header_Missing: - return _( "Horizontal Header (hhea) table missing." ); - case TT_Err_Locations_Missing: - return _( "Index to Location (loca) table missing." ); - case TT_Err_Name_Table_Missing: - return _( "Naming (name) table missing." ); - case TT_Err_CMap_Table_Missing: - return _( "Character to Glyph Index Mapping (cmap) tables missing." ); - case TT_Err_Hmtx_Table_Missing: - return _( "Horizontal Metrics (hmtx) table missing." ); - case TT_Err_OS2_Table_Missing: - return _( "OS/2 table missing." ); - case TT_Err_Post_Table_Missing: - return _( "PostScript (post) table missing." ); - case TT_Err_Glyf_Table_Missing: - return _( "Glyph (glyf) table missing." ); - - - /* ----- memory component error codes ----- */ - case TT_Err_Out_Of_Memory: - return _( "Out of memory." ); - - - /* ----- file component error codes ----- */ - case TT_Err_Invalid_File_Offset: - return _( "Invalid file offset." ); - case TT_Err_Invalid_File_Read: - return _( "Invalid file read." ); - case TT_Err_Invalid_Frame_Access: - return _( "Invalid frame access." ); - - - /* ----- glyph loader error codes ----- */ - case TT_Err_Too_Many_Points: - return _( "Too many points." ); - case TT_Err_Too_Many_Contours: - return _( "Too many contours." ); - case TT_Err_Invalid_Composite: - return _( "Invalid composite glyph." ); - case TT_Err_Too_Many_Ins: - return _( "Too many instructions." ); - - - /* ----- byte-code interpreter error codes ----- */ - case TT_Err_Invalid_Opcode: - return _( "Invalid opcode." ); - case TT_Err_Too_Few_Arguments: - return _( "Too few arguments." ); - case TT_Err_Stack_Overflow: - return _( "Stack overflow." ); - case TT_Err_Code_Overflow: - return _( "Code overflow." ); - case TT_Err_Bad_Argument: - return _( "Bad argument." ); - case TT_Err_Divide_By_Zero: - return _( "Divide by zero." ); - case TT_Err_Storage_Overflow: - return _( "Storage overflow." ); - case TT_Err_Cvt_Overflow: - return _( "Control Value (cvt) table overflow." ); - case TT_Err_Invalid_Reference: - return _( "Invalid reference." ); - case TT_Err_Invalid_Distance: - return _( "Invalid distance." ); - case TT_Err_Interpolate_Twilight: - return _( "Interpolate twilight points." ); - case TT_Err_Debug_OpCode: - return _( "`DEBUG' opcode found." ); - case TT_Err_ENDF_In_Exec_Stream: - return _( "`ENDF' in byte-code stream." ); - case TT_Err_Out_Of_CodeRanges: - return _( "Out of code ranges." ); - case TT_Err_Nested_DEFS: - return _( "Nested function definitions." ); - case TT_Err_Invalid_CodeRange: - return _( "Invalid code range." ); - case TT_Err_Invalid_Displacement: - return _( "Invalid displacement." ); - case TT_Err_Execution_Too_Long: - return _( "Endless loop encountered while executing instructions." ); - - - /* ----- internal failure error codes ----- */ - case TT_Err_Nested_Frame_Access: - return _( "Nested frame access." ); - case TT_Err_Invalid_Cache_List: - return _( "Invalid cache list." ); - case TT_Err_Could_Not_Find_Context: - return _( "Could not find context." ); - case TT_Err_Unlisted_Object: - return _( "Unlisted object." ); - - - /* ----- scan-line converter error codes ----- */ - case TT_Err_Raster_Pool_Overflow: - return _( "Raster pool overflow." ); - case TT_Err_Raster_Negative_Height: - return _( "Raster: negative height encountered." ); - case TT_Err_Raster_Invalid_Value: - return _( "Raster: invalid value." ); - case TT_Err_Raster_Not_Initialized: - return _( "Raster not initialized." ); - - - /* ----- engine extensions error codes ----- */ - case TT_Err_Invalid_Kerning_Table_Format: - return _( "Invalid kerning (kern) table format." ); - case TT_Err_Invalid_Kerning_Table: - return _( "Invalid kerning (kern) table." ); - case TT_Err_Invalid_Post_Table_Format: - return _( "Invalid PostScript (post) table format." ); - case TT_Err_Invalid_Post_Table: - return _( "Invalid PostScript (post) table." ); - - - /* ----- TrueType Open extension error codes ----- */ - - case TTO_Err_Invalid_SubTable_Format: - return _( "Invalid TrueType Open subtable format." ); - case TTO_Err_Invalid_SubTable: - return _( "Invalid TrueType Open subtable." ); - case TTO_Err_Not_Covered: - return _( "Glyph(s) not covered by lookup." ); - case TTO_Err_Too_Many_Nested_Contexts: - return _( "Too many nested context substitutions." ); - case TTO_Err_Invalid_GSUB_SubTable_Format: - return _( "Invalid glyph substitution (GSUB) table format." ); - case TTO_Err_Invalid_GSUB_SubTable: - return _( "Invalid glyph substitution (GSUB) table." ); - case TTO_Err_Invalid_GPOS_SubTable_Format: - return _( "Invalid glyph positioning (GPOS) table format." ); - case TTO_Err_Invalid_GPOS_SubTable: - return _( "Invalid glyph positioning (GPOS) table." ); - - - default: - ; - } - - return _( "Invalid Error Number." ); -} - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxerr18.h diff -u xc/extras/FreeType/lib/extend/ftxerr18.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxerr18.h:removed --- xc/extras/FreeType/lib/extend/ftxerr18.h:1.1.1.3 Sat Feb 12 23:56:04 2000 +++ xc/extras/FreeType/lib/extend/ftxerr18.h Wed Mar 16 20:59:44 2005 @@ -1,38 +0,0 @@ -/****************************************************************************/ -/* */ -/* Erwin Dieterich, 15. 10. 1997 */ -/* - 15. 08. 1999 */ -/* */ -/* TT_ErrToString: translate error codes to character strings */ -/* */ -/* This extension provides internationalized error strings from the */ -/* various error messages. It uses the "gettext" package where available */ -/* or returns english/american message strings if not. */ -/* */ -/* If you do not want to use it, or if you encounter some problems */ -/* compiling this file, try to disable nls support by configuring */ -/* FreeType with ./configure --disable-nls */ -/* */ -/* */ -/****************************************************************************/ - -#ifndef FTXERR18_H -#define FTXERR18_H - -#include "freetype.h" - -#ifdef __cplusplus - extern "C" { -#endif - - EXPORT_DEF - TT_String* TT_ErrToString18( TT_Error i ); - -#ifdef __cplusplus - } -#endif - -#endif /* FTXERR18_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgasp.c diff -u xc/extras/FreeType/lib/extend/ftxgasp.c:1.1.1.2 xc/extras/FreeType/lib/extend/ftxgasp.c:removed --- xc/extras/FreeType/lib/extend/ftxgasp.c:1.1.1.2 Sat Feb 12 23:56:04 2000 +++ xc/extras/FreeType/lib/extend/ftxgasp.c Wed Mar 16 20:59:44 2005 @@ -1,69 +0,0 @@ -/******************************************************************* - * - * ftxgasp.c 1.0 - * - * Gasp table support API extension body - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The gasp table is currently loaded by the core engine, but the - * standard API doesn't give access to it. This file is used to - * demonstrate the use of a simple API extension. - * - ******************************************************************/ - -#include "ftxgasp.h" - -#include "tttypes.h" -#include "ttobjs.h" -#include "tttables.h" - - - EXPORT_FUNC - TT_Error TT_Get_Face_Gasp_Flags( TT_Face face, - TT_UShort point_size, - TT_Bool* grid_fit, - TT_Bool* smooth_font ) - { - PFace faze = HANDLE_Face( face ); - UShort i, flag; - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( faze->gasp.numRanges == 0 || !faze->gasp.gaspRanges ) - return TT_Err_Table_Missing; - - for ( i = 0; i < faze->gasp.numRanges; i++ ) - { - if ( point_size <= faze->gasp.gaspRanges[i].maxPPEM ) - { - flag = faze->gasp.gaspRanges[i].gaspFlag; - - *grid_fit = ( (flag & GASP_GRIDFIT) != 0 ); - *smooth_font = ( (flag & GASP_DOGRAY ) != 0 ); - - return TT_Err_Ok; - } - } - - /* for very large fonts we enable font smoothing and discard */ - /* grid fitting */ - - *grid_fit = 0; - *smooth_font = 1; - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgasp.h diff -u xc/extras/FreeType/lib/extend/ftxgasp.h:1.1.1.2 xc/extras/FreeType/lib/extend/ftxgasp.h:removed --- xc/extras/FreeType/lib/extend/ftxgasp.h:1.1.1.2 Sat Feb 12 23:56:04 2000 +++ xc/extras/FreeType/lib/extend/ftxgasp.h Wed Mar 16 20:59:44 2005 @@ -1,53 +0,0 @@ -/******************************************************************* - * - * ftxgasp.h 1.0 - * - * Gasp table support API extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The gasp table is currently loaded by the core engine, but the - * standard API doesn't give access to it. This file is used to - * demonstrate the use of a simple API extension. - * - ******************************************************************/ - -#ifndef FTXGASP_H -#define FTXGASP_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - - - /* This function returns for a given 'point_size' the values of the */ - /* gasp flags 'grid_fit' and 'smooth_font'. The returned values */ - /* are booleans (where 0 = NO, and 1 = YES). */ - - /* Note that this function will return TT_Err_Table_Missing if */ - /* the font file doesn't contain any gasp table. */ - - EXPORT_DEF - TT_Error TT_Get_Face_Gasp_Flags( TT_Face face, - TT_UShort point_size, - TT_Bool* grid_fit, - TT_Bool* smooth_font ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXGASP_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgdef.c diff -u xc/extras/FreeType/lib/extend/ftxgdef.c:1.1.1.1 xc/extras/FreeType/lib/extend/ftxgdef.c:removed --- xc/extras/FreeType/lib/extend/ftxgdef.c:1.1.1.1 Sat Feb 12 23:56:05 2000 +++ xc/extras/FreeType/lib/extend/ftxgdef.c Wed Mar 16 20:59:44 2005 @@ -1,1099 +0,0 @@ -/******************************************************************* - * - * ftxgdef.c - * - * TrueType Open GDEF table support. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "tttypes.h" -#include "tttags.h" -#include "ttload.h" -#include "ttextend.h" -#include "ttmemory.h" -#include "ttfile.h" - -#include "ftxopen.h" -#include "ftxopenf.h" - - -#define GDEF_ID Build_Extension_ID( 'G', 'D', 'E', 'F' ) - - - static TT_Error Load_AttachList( TTO_AttachList* al, - PFace input ); - static TT_Error Load_LigCaretList( TTO_LigCaretList* lcl, - PFace input ); - - static void Free_AttachList( TTO_AttachList* al ); - static void Free_LigCaretList( TTO_LigCaretList* lcl ); - - static void Free_NewGlyphClasses( TTO_GDEFHeader* gdef ); - - - - /********************** - * Extension Functions - **********************/ - - - static TT_Error GDEF_Create( void* ext, - PFace face ) - { - DEFINE_LOAD_LOCALS( face->stream ); - - TTO_GDEFHeader* gdef = (TTO_GDEFHeader*)ext; - Long table; - - - /* by convention */ - - if ( !gdef ) - return TT_Err_Ok; - - /* a null offset indicates that there is no GDEF table */ - - gdef->offset = 0; - - /* we store the start offset and the size of the subtable */ - - table = TT_LookUp_Table( face, TTAG_GDEF ); - if ( table < 0 ) - return TT_Err_Ok; /* The table is optional */ - - if ( FILE_Seek( face->dirTables[table].Offset ) || - ACCESS_Frame( 4L ) ) - return error; - - gdef->offset = FILE_Pos() - 4L; /* undo ACCESS_Frame() */ - gdef->Version = GET_ULong(); - - FORGET_Frame(); - - gdef->loaded = FALSE; - - return TT_Err_Ok; - } - - - static TT_Error GDEF_Destroy( void* ext, - PFace face ) - { - TTO_GDEFHeader* gdef = (TTO_GDEFHeader*)ext; - - - /* by convention */ - - if ( !gdef ) - return TT_Err_Ok; - - if ( gdef->loaded ) - { - Free_LigCaretList( &gdef->LigCaretList ); - Free_AttachList( &gdef->AttachList ); - Free_ClassDefinition( &gdef->GlyphClassDef ); - Free_ClassDefinition( &gdef->MarkAttachClassDef ); - - Free_NewGlyphClasses( gdef ); - } - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_Init_GDEF_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - return TT_Register_Extension( _engine, - GDEF_ID, - sizeof ( TTO_GDEFHeader ), - GDEF_Create, - GDEF_Destroy ); - } - - - EXPORT_FUNC - TT_Error TT_Load_GDEF_Table( TT_Face face, - TTO_GDEFHeader* retptr ) - { - ULong cur_offset, new_offset, base_offset; - - TT_Error error; - TT_Stream stream; - TTO_GDEFHeader* gdef; - - PFace faze = HANDLE_Face( face ); - - - if ( !retptr ) - return TT_Err_Invalid_Argument; - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - error = TT_Extension_Get( faze, GDEF_ID, (void**)&gdef ); - if ( error ) - return error; - - if ( gdef->offset == 0 ) - return TT_Err_Table_Missing; /* no GDEF table; nothing to do */ - - /* now access stream */ - - if ( USE_Stream( faze->stream, stream ) ) - return error; - - base_offset = gdef->offset; - - /* skip version */ - - if ( FILE_Seek( base_offset + 4L ) || - ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - /* all GDEF subtables are optional */ - - if ( new_offset ) - { - new_offset += base_offset; - - /* only classes 1-4 are allowed here */ - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ClassDefinition( &gdef->GlyphClassDef, 5, - faze ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - } - else - gdef->GlyphClassDef.loaded = FALSE; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_AttachList( &gdef->AttachList, - faze ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - gdef->AttachList.loaded = FALSE; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LigCaretList( &gdef->LigCaretList, - faze ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - else - gdef->LigCaretList.loaded = FALSE; - - /* OpenType 1.2 has introduced the `MarkAttachClassDef' field. We - first have to scan the LookupFlag values to find out whether we - must load it or not. Here we only store the current file offset. */ - - gdef->MarkAttachClassDef_offset = FILE_Pos(); - gdef->MarkAttachClassDef.loaded = FALSE; - - gdef->LastGlyph = 0; - gdef->NewGlyphClasses = NULL; - gdef->loaded = TRUE; - - *retptr = *gdef; - DONE_Stream( stream ); - - return TT_Err_Ok; - - Fail2: - Free_AttachList( &gdef->AttachList ); - - Fail1: - Free_ClassDefinition( &gdef->GlyphClassDef ); - - /* release stream */ - - DONE_Stream( stream ); - - return error; - } - - - - /******************************* - * AttachList related functions - *******************************/ - - - /* AttachPoint */ - - static TT_Error Load_AttachPoint( TTO_AttachPoint* ap, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* pi; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ap->PointCount = GET_UShort(); - - FORGET_Frame(); - - ap->PointIndex = NULL; - - if ( count ) - { - if ( ALLOC_ARRAY( ap->PointIndex, count, UShort ) ) - return error; - - pi = ap->PointIndex; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( pi ); - return error; - } - - for ( n = 0; n < count; n++ ) - pi[n] = GET_UShort(); - - FORGET_Frame(); - } - - return TT_Err_Ok; - } - - - static void Free_AttachPoint( TTO_AttachPoint* ap ) - { - FREE( ap->PointIndex ); - } - - - /* AttachList */ - - static TT_Error Load_AttachList( TTO_AttachList* al, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_AttachPoint* ap; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &al->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = al->GlyphCount = GET_UShort(); - - FORGET_Frame(); - - al->AttachPoint = NULL; - - if ( ALLOC_ARRAY( al->AttachPoint, count, TTO_AttachPoint ) ) - goto Fail2; - - ap = al->AttachPoint; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_AttachPoint( &ap[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - al->loaded = TRUE; - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_AttachPoint( &ap[n] ); - - FREE( ap ); - - Fail2: - Free_Coverage( &al->Coverage ); - return error; - } - - - static void Free_AttachList( TTO_AttachList* al ) - { - UShort n, count; - - TTO_AttachPoint* ap; - - - if ( !al->loaded ) - return; - - if ( al->AttachPoint ) - { - count = al->GlyphCount; - ap = al->AttachPoint; - - for ( n = 0; n < count; n++ ) - Free_AttachPoint( &ap[n] ); - - FREE( ap ); - } - - Free_Coverage( &al->Coverage ); - } - - - - /********************************* - * LigCaretList related functions - *********************************/ - - - /* CaretValueFormat1 */ - /* CaretValueFormat2 */ - /* CaretValueFormat3 */ - /* CaretValueFormat4 */ - - static TT_Error Load_CaretValue( TTO_CaretValue* cv, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - cv->CaretValueFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( cv->CaretValueFormat ) - { - case 1: - if ( ACCESS_Frame( 2L ) ) - return error; - - cv->cvf.cvf1.Coordinate = GET_Short(); - - FORGET_Frame(); - - break; - - case 2: - if ( ACCESS_Frame( 2L ) ) - return error; - - cv->cvf.cvf2.CaretValuePoint = GET_UShort(); - - FORGET_Frame(); - - break; - - case 3: - if ( ACCESS_Frame( 4L ) ) - return error; - - cv->cvf.cvf3.Coordinate = GET_Short(); - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &cv->cvf.cvf3.Device, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - break; - - case 4: - if ( ACCESS_Frame( 2L ) ) - return error; - - cv->cvf.cvf4.IdCaretValue = GET_UShort(); - - FORGET_Frame(); - break; - - default: - return TTO_Err_Invalid_GDEF_SubTable_Format; - } - - return TT_Err_Ok; - } - - - static void Free_CaretValue( TTO_CaretValue* cv ) - { - if ( cv->CaretValueFormat == 3 ) - Free_Device( &cv->cvf.cvf3.Device ); - } - - - /* LigGlyph */ - - static TT_Error Load_LigGlyph( TTO_LigGlyph* lg, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_CaretValue* cv; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = lg->CaretCount = GET_UShort(); - - FORGET_Frame(); - - lg->CaretValue = NULL; - - if ( ALLOC_ARRAY( lg->CaretValue, count, TTO_CaretValue ) ) - return error; - - cv = lg->CaretValue; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_CaretValue( &cv[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_CaretValue( &cv[n] ); - - FREE( cv ); - return error; - } - - - static void Free_LigGlyph( TTO_LigGlyph* lg ) - { - UShort n, count; - - TTO_CaretValue* cv; - - - if ( lg->CaretValue ) - { - count = lg->CaretCount; - cv = lg->CaretValue; - - for ( n = 0; n < count; n++ ) - Free_CaretValue( &cv[n] ); - - FREE( cv ); - } - } - - - /* LigCaretList */ - - static TT_Error Load_LigCaretList( TTO_LigCaretList* lcl, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_LigGlyph* lg; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &lcl->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = lcl->LigGlyphCount = GET_UShort(); - - FORGET_Frame(); - - lcl->LigGlyph = NULL; - - if ( ALLOC_ARRAY( lcl->LigGlyph, count, TTO_LigGlyph ) ) - goto Fail2; - - lg = lcl->LigGlyph; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LigGlyph( &lg[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - lcl->loaded = TRUE; - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_LigGlyph( &lg[n] ); - - FREE( lg ); - - Fail2: - Free_Coverage( &lcl->Coverage ); - return error; - } - - - static void Free_LigCaretList( TTO_LigCaretList* lcl ) - { - UShort n, count; - - TTO_LigGlyph* lg; - - - if ( !lcl->loaded ) - return; - - if ( lcl->LigGlyph ) - { - count = lcl->LigGlyphCount; - lg = lcl->LigGlyph; - - for ( n = 0; n < count; n++ ) - Free_LigGlyph( &lg[n] ); - - FREE( lg ); - } - - Free_Coverage( &lcl->Coverage ); - } - - - - /*********** - * GDEF API - ***********/ - - - static UShort Get_New_Class( TTO_GDEFHeader* gdef, - UShort glyphID, - UShort index ) - { - UShort glyph_index, array_index; - UShort byte, bits; - - TTO_ClassRangeRecord* gcrr; - UShort** ngc; - - - if ( glyphID >= gdef->LastGlyph ) - return 0; - - gcrr = gdef->GlyphClassDef.cd.cd2.ClassRangeRecord; - ngc = gdef->NewGlyphClasses; - - if ( glyphID < gcrr[index].Start ) - { - array_index = 0; - if ( index == 0 ) - glyph_index = glyphID; - else - glyph_index = glyphID - gcrr[index - 1].End - 1; - } - else - { - array_index = index + 1; - glyph_index = glyphID - gcrr[index].End - 1; - } - - byte = ngc[array_index][glyph_index / 4 + 1]; - bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 ); - - return bits & 0x000F; - } - - - EXPORT_FUNC - TT_Error TT_GDEF_Get_Glyph_Property( TTO_GDEFHeader* gdef, - TT_UShort glyphID, - TT_UShort* property ) - { - UShort class, index; - - TT_Error error; - - - if ( !gdef || !property ) - return TT_Err_Invalid_Argument; - - /* first, we check for mark attach classes */ - - if ( gdef->MarkAttachClassDef.loaded ) - { - error = Get_Class( &gdef->MarkAttachClassDef, glyphID, &class, &index ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - if ( !error ) - { - *property = class << 8; - return TT_Err_Ok; - } - } - - error = Get_Class( &gdef->GlyphClassDef, glyphID, &class, &index ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - - /* if we have a constructed class table, check whether additional - values have been assigned */ - - if ( error == TTO_Err_Not_Covered && gdef->NewGlyphClasses ) - class = Get_New_Class( gdef, glyphID, index ); - - switch ( class ) - { - case UNCLASSIFIED_GLYPH: - *property = 0; - break; - - case SIMPLE_GLYPH: - *property = TTO_BASE_GLYPH; - break; - - case LIGATURE_GLYPH: - *property = TTO_LIGATURE; - break; - - case MARK_GLYPH: - *property = TTO_MARK; - break; - - case COMPONENT_GLYPH: - *property = TTO_COMPONENT; - break; - } - - return TT_Err_Ok; - } - - - static TT_Error Make_ClassRange( TTO_ClassDefinition* cd, - UShort start, - UShort end, - UShort class ) - { - TT_Error error; - UShort index; - - TTO_ClassDefFormat2* cdf2; - TTO_ClassRangeRecord* crr; - - - cdf2 = &cd->cd.cd2; - - cdf2->ClassRangeCount++; - - if ( REALLOC_ARRAY( cdf2->ClassRangeRecord, cdf2->ClassRangeCount, - TTO_ClassRangeRecord ) ) - return error; - - crr = cdf2->ClassRangeRecord; - index = cdf2->ClassRangeCount - 1; - - crr[index].Start = start; - crr[index].End = end; - crr[index].Class = class; - - cd->Defined[class] = TRUE; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GDEF_Build_ClassDefinition( TTO_GDEFHeader* gdef, - TT_UShort num_glyphs, - TT_UShort glyph_count, - TT_UShort* glyph_array, - TT_UShort* class_array ) - { - UShort start, curr_glyph, curr_class; - UShort n, count; - TT_Error error; - - TTO_ClassDefinition* gcd; - TTO_ClassRangeRecord* gcrr; - UShort** ngc; - - - if ( !gdef || !glyph_array || !class_array ) - return TT_Err_Invalid_Argument; - - gcd = &gdef->GlyphClassDef; - - /* We build a format 2 table */ - - gcd->ClassFormat = 2; - - /* A GlyphClassDef table contains at most 5 different class values */ - - if ( ALLOC_ARRAY( gcd->Defined, 5, Bool ) ) - return error; - - gcd->cd.cd2.ClassRangeCount = 0; - gcd->cd.cd2.ClassRangeRecord = NULL; - - start = glyph_array[0]; - curr_class = class_array[0]; - curr_glyph = start; - - if ( curr_class >= 5 ) - { - error = TT_Err_Invalid_Argument; - goto Fail4; - } - - glyph_count--; - - for ( n = 0; n <= glyph_count; n++ ) - { - if ( curr_glyph == glyph_array[n] && curr_class == class_array[n] ) - { - if ( n == glyph_count ) - { - if ( ( error = Make_ClassRange( gcd, start, - curr_glyph, - curr_class ) ) != TT_Err_Ok ) - goto Fail3; - } - else - { - if ( curr_glyph == 0xFFFF ) - { - error = TT_Err_Invalid_Argument; - goto Fail3; - } - else - curr_glyph++; - } - } - else - { - if ( ( error = Make_ClassRange( gcd, start, - curr_glyph - 1, - curr_class ) ) != TT_Err_Ok ) - goto Fail3; - - if ( curr_glyph > glyph_array[n] ) - { - error = TT_Err_Invalid_Argument; - goto Fail3; - } - - start = glyph_array[n]; - curr_class = class_array[n]; - curr_glyph = start; - - if ( curr_class >= 5 ) - { - error = TT_Err_Invalid_Argument; - goto Fail3; - } - - if ( n == glyph_count ) - { - if ( ( error = Make_ClassRange( gcd, start, - curr_glyph, - curr_class ) ) != TT_Err_Ok ) - goto Fail3; - } - else - { - if ( curr_glyph == 0xFFFF ) - { - error = TT_Err_Invalid_Argument; - goto Fail3; - } - else - curr_glyph++; - } - } - } - - /* now prepare the arrays for class values assigned during the lookup - process */ - - if ( ALLOC_ARRAY( gdef->NewGlyphClasses, - gcd->cd.cd2.ClassRangeCount + 1, UShort* ) ) - goto Fail2; - - count = gcd->cd.cd2.ClassRangeCount; - gcrr = gcd->cd.cd2.ClassRangeRecord; - ngc = gdef->NewGlyphClasses; - - /* We allocate arrays for all glyphs not covered by the class range - records. Each element holds four class values. */ - - if ( gcrr[0].Start ) - { - if ( ALLOC_ARRAY( ngc[0], gcrr[0].Start / 4 + 1, UShort ) ) - goto Fail1; - } - - for ( n = 1; n < count; n++ ) - { - if ( gcrr[n].Start - gcrr[n - 1].End > 1 ) - if ( ALLOC_ARRAY( ngc[n], - ( gcrr[n].Start - gcrr[n - 1].End - 1 ) / 4 + 1, - UShort ) ) - goto Fail1; - } - - if ( gcrr[count - 1].End != num_glyphs - 1 ) - { - if ( ALLOC_ARRAY( ngc[count], - ( num_glyphs - gcrr[count - 1].End - 1 ) / 4 + 1, - UShort ) ) - goto Fail1; - } - - gdef->LastGlyph = num_glyphs - 1; - - gdef->MarkAttachClassDef_offset = 0L; - gdef->MarkAttachClassDef.loaded = FALSE; - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - FREE( ngc[n] ); - - Fail2: - FREE( gdef->NewGlyphClasses ); - - Fail3: - FREE( gcd->cd.cd2.ClassRangeRecord ); - - Fail4: - FREE( gcd->Defined ); - return error; - } - - - static void Free_NewGlyphClasses( TTO_GDEFHeader* gdef ) - { - UShort** ngc; - UShort n, count; - - - if ( gdef->NewGlyphClasses ) - { - count = gdef->GlyphClassDef.cd.cd2.ClassRangeCount + 1; - ngc = gdef->NewGlyphClasses; - - for ( n = 0; n < count; n++ ) - FREE( ngc[n] ); - - FREE( ngc ); - } - } - - - TT_Error Add_Glyph_Property( TTO_GDEFHeader* gdef, - UShort glyphID, - UShort property ) - { - TT_Error error; - UShort class, new_class, index; - UShort byte, bits, mask; - UShort array_index, glyph_index; - - TTO_ClassRangeRecord* gcrr; - UShort** ngc; - - - error = Get_Class( &gdef->GlyphClassDef, glyphID, &class, &index ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - - /* we don't accept glyphs covered in `GlyphClassDef' */ - - if ( !error ) - return TTO_Err_Not_Covered; - - switch ( property ) - { - case 0: - new_class = UNCLASSIFIED_GLYPH; - break; - - case TTO_BASE_GLYPH: - new_class = SIMPLE_GLYPH; - break; - - case TTO_LIGATURE: - new_class = LIGATURE_GLYPH; - break; - - case TTO_MARK: - new_class = MARK_GLYPH; - break; - - case TTO_COMPONENT: - new_class = COMPONENT_GLYPH; - break; - - default: - return TT_Err_Invalid_Argument; - } - - gcrr = gdef->GlyphClassDef.cd.cd2.ClassRangeRecord; - ngc = gdef->NewGlyphClasses; - - if ( glyphID < gcrr[index].Start ) - { - array_index = 0; - if ( index == 0 ) - glyph_index = glyphID; - else - glyph_index = glyphID - gcrr[index - 1].End - 1; - } - else - { - array_index = index + 1; - glyph_index = glyphID - gcrr[index].End - 1; - } - - byte = ngc[array_index][glyph_index / 4 + 1]; - bits = byte >> ( 16 - ( glyph_index % 4 + 1 ) * 4 ); - class = bits & 0x000F; - - /* we don't overwrite existing entries */ - - if ( !class ) - { - bits = new_class << ( 16 - ( glyph_index % 4 + 1 ) * 4 ); - mask = ~( 0x000F << ( 16 - ( glyph_index % 4 + 1 ) * 4 ) ); - - ngc[array_index][glyph_index / 4 + 1] &= mask; - ngc[array_index][glyph_index / 4 + 1] |= bits; - } - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgdef.h diff -u xc/extras/FreeType/lib/extend/ftxgdef.h:1.1.1.1 xc/extras/FreeType/lib/extend/ftxgdef.h:removed --- xc/extras/FreeType/lib/extend/ftxgdef.h:1.1.1.1 Sat Feb 12 23:56:05 2000 +++ xc/extras/FreeType/lib/extend/ftxgdef.h Wed Mar 16 20:59:45 2005 @@ -1,216 +0,0 @@ -/******************************************************************* - * - * ftxgdef.h - * - * TrueType Open GDEF table support - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FTXOPEN_H -#error "Don't include this file! Use ftxopen.h instead." -#endif - -#ifndef FTXGDEF_H -#define FTXGDEF_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define TTO_Err_Invalid_GDEF_SubTable_Format 0x1030 -#define TTO_Err_Invalid_GDEF_SubTable 0x1031 - - -/* GDEF glyph classes */ - -#define UNCLASSIFIED_GLYPH 0 -#define SIMPLE_GLYPH 1 -#define LIGATURE_GLYPH 2 -#define MARK_GLYPH 3 -#define COMPONENT_GLYPH 4 - -/* GDEF glyph properties, corresponding to class values 1-4. Note that - TTO_COMPONENT has no corresponding flag in the LookupFlag field. */ - -#define TTO_BASE_GLYPH 0x0002 -#define TTO_LIGATURE 0x0004 -#define TTO_MARK 0x0008 -#define TTO_COMPONENT 0x0010 - - - /* Attachment related structures */ - - struct TTO_AttachPoint_ - { - TT_UShort PointCount; /* size of the PointIndex array */ - TT_UShort* PointIndex; /* array of contour points */ - }; - - typedef struct TTO_AttachPoint_ TTO_AttachPoint; - - - struct TTO_AttachList_ - { - TT_Bool loaded; - - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort GlyphCount; /* number of glyphs with - attachments */ - TTO_AttachPoint* AttachPoint; /* array of AttachPoint tables */ - }; - - typedef struct TTO_AttachList_ TTO_AttachList; - - - /* Ligature Caret related structures */ - - struct TTO_CaretValueFormat1_ - { - TT_Short Coordinate; /* x or y value (in design units) */ - }; - - typedef struct TTO_CaretValueFormat1_ TTO_CaretValueFormat1; - - - struct TTO_CaretValueFormat2_ - { - TT_UShort CaretValuePoint; /* contour point index on glyph */ - }; - - typedef struct TTO_CaretValueFormat2_ TTO_CaretValueFormat2; - - - struct TTO_CaretValueFormat3_ - { - TT_Short Coordinate; /* x or y value (in design units) */ - TTO_Device Device; /* Device table for x or y value */ - }; - - typedef struct TTO_CaretValueFormat3_ TTO_CaretValueFormat3; - - - struct TTO_CaretValueFormat4_ - { - TT_UShort IdCaretValue; /* metric ID */ - }; - - typedef struct TTO_CaretValueFormat4_ TTO_CaretValueFormat4; - - - struct TTO_CaretValue_ - { - TT_UShort CaretValueFormat; /* 1, 2, 3, or 4 */ - - union - { - TTO_CaretValueFormat1 cvf1; - TTO_CaretValueFormat2 cvf2; - TTO_CaretValueFormat3 cvf3; - TTO_CaretValueFormat4 cvf4; - } cvf; - }; - - typedef struct TTO_CaretValue_ TTO_CaretValue; - - - struct TTO_LigGlyph_ - { - TT_Bool loaded; - - TT_UShort CaretCount; /* number of caret values */ - TTO_CaretValue* CaretValue; /* array of caret values */ - }; - - typedef struct TTO_LigGlyph_ TTO_LigGlyph; - - - struct TTO_LigCaretList_ - { - TT_Bool loaded; - - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort LigGlyphCount; /* number of ligature glyphs */ - TTO_LigGlyph* LigGlyph; /* array of LigGlyph tables */ - }; - - typedef struct TTO_LigCaretList_ TTO_LigCaretList; - - - /* The `NewGlyphClasses' field is not defined in the TTO specification. - We use it for fonts with a constructed `GlyphClassDef' structure - (i.e., which don't have a GDEF table) to collect glyph classes - assigned during the lookup process. The number of arrays in this - pointer array is GlyphClassDef->cd.cd2.ClassRangeCount+1; the nth - array then contains the glyph class values of the glyphs not covered - by the ClassRangeRecords structures with index n-1 and n. We store - glyph class values for four glyphs in a single array element. - - `LastGlyph' is identical to the number of glyphs minus one in the - font; we need it only if `NewGlyphClasses' is not NULL (to have an - upper bound for the last array). - - Note that we first store the file offset to the `MarkAttachClassDef' - field (which has been introduced in OpenType 1.2) -- since the - `Version' field value hasn't been increased to indicate that we have - one more field for some obscure reason, we must parse the GSUB table - to find out whether class values refer to this table. Only then we - can finally load the MarkAttachClassDef structure if necessary. */ - - struct TTO_GDEFHeader_ - { - TT_Bool loaded; - TT_ULong offset; - - TT_Fixed Version; - - TTO_ClassDefinition GlyphClassDef; - TTO_AttachList AttachList; - TTO_LigCaretList LigCaretList; - TT_ULong MarkAttachClassDef_offset; - TTO_ClassDefinition MarkAttachClassDef; /* new in OT 1.2 */ - - TT_UShort LastGlyph; - TT_UShort** NewGlyphClasses; - }; - - typedef struct TTO_GDEFHeader_ TTO_GDEFHeader; - - - /* finally, the GDEF API */ - - EXPORT_DEF - TT_Error TT_Init_GDEF_Extension( TT_Engine engine ); - - EXPORT_DEF - TT_Error TT_Load_GDEF_Table( TT_Face face, - TTO_GDEFHeader* gdef ); - - EXPORT_DEF - TT_Error TT_GDEF_Get_Glyph_Property( TTO_GDEFHeader* gdef, - TT_UShort glyphID, - TT_UShort* property ); - EXPORT_DEF - TT_Error TT_GDEF_Build_ClassDefinition( TTO_GDEFHeader* gdef, - TT_UShort num_glyphs, - TT_UShort glyph_count, - TT_UShort* glyph_array, - TT_UShort* class_array ); - - -#ifdef __cplusplus -} -#endif - -#endif /* FTXGDEF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgpos.c diff -u xc/extras/FreeType/lib/extend/ftxgpos.c:1.1.1.1 xc/extras/FreeType/lib/extend/ftxgpos.c:removed --- xc/extras/FreeType/lib/extend/ftxgpos.c:1.1.1.1 Sat Feb 12 23:56:05 2000 +++ xc/extras/FreeType/lib/extend/ftxgpos.c Wed Mar 16 20:59:45 2005 @@ -1,4045 +0,0 @@ -/******************************************************************* - * - * ftxgpos.c - * - * TrueType Open GPOS table support. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -/* XXX There is *a lot* of duplicated code (cf. formats 7 and 8), but - I don't care currently. I believe that it would be possible to - save about 50% of TTO code by carefully designing the structures, - sharing as much as possible with extensive use of macros. This - is something for a volunteer :-) */ - -#include "tttypes.h" -#include "tttags.h" -#include "ttload.h" -#include "ttextend.h" -#include "ttmemory.h" -#include "ttfile.h" - -#include "ftxopen.h" -#include "ftxopenf.h" - - -#define GPOS_ID Build_Extension_ID( 'G', 'P', 'O', 'S' ) - - - - /********************** - * Extension Functions - **********************/ - - - static TT_Error GPOS_Create( void* ext, - PFace face ) - { - DEFINE_LOAD_LOCALS( face->stream ); - - TTO_GPOSHeader* gpos = (TTO_GPOSHeader*)ext; - Long table; - - - /* by convention */ - - if ( !gpos ) - return TT_Err_Ok; - - /* a null offset indicates that there is no GPOS table */ - - gpos->offset = 0; - - /* we store the start offset and the size of the subtable */ - - table = TT_LookUp_Table( face, TTAG_GPOS ); - if ( table < 0 ) - return TT_Err_Ok; /* The table is optional */ - - if ( FILE_Seek( face->dirTables[table].Offset ) || - ACCESS_Frame( 4L ) ) - return error; - - gpos->offset = FILE_Pos() - 4L; /* undo ACCESS_Frame() */ - gpos->Version = GET_ULong(); - - FORGET_Frame(); - - gpos->loaded = FALSE; - - return TT_Err_Ok; - } - - - static TT_Error GPOS_Destroy( void* ext, - PFace face ) - { - TTO_GPOSHeader* gpos = (TTO_GPOSHeader*)ext; - - - /* by convention */ - - if ( !gpos ) - return TT_Err_Ok; - - if ( gpos->loaded ) - { - Free_LookupList( &gpos->LookupList, GPOS ); - Free_FeatureList( &gpos->FeatureList ); - Free_ScriptList( &gpos->ScriptList ); - } - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_Init_GPOS_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - return TT_Register_Extension( _engine, - GPOS_ID, - sizeof ( TTO_GPOSHeader ), - GPOS_Create, - GPOS_Destroy ); - } - - - EXPORT_FUNC - TT_Error TT_Load_GPOS_Table( TT_Face face, - TTO_GPOSHeader* retptr, - TTO_GDEFHeader* gdef ) - { - ULong cur_offset, new_offset, base_offset; - - TT_UShort i, num_lookups; - TT_Error error; - TT_Stream stream; - TTO_GPOSHeader* gpos; - TTO_Lookup* lo; - - PFace faze = HANDLE_Face( face ); - - - if ( !retptr ) - return TT_Err_Invalid_Argument; - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - error = TT_Extension_Get( faze, GPOS_ID, (void**)&gpos ); - if ( error ) - return error; - - if ( gpos->offset == 0 ) - return TT_Err_Table_Missing; /* no GPOS table; nothing to do */ - - /* now access stream */ - - if ( USE_Stream( faze->stream, stream ) ) - return error; - - base_offset = gpos->offset; - - /* skip version */ - - if ( FILE_Seek( base_offset + 4L ) || - ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ScriptList( &gpos->ScriptList, - faze ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_FeatureList( &gpos->FeatureList, - faze ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LookupList( &gpos->LookupList, - faze, GPOS ) ) != TT_Err_Ok ) - goto Fail2; - - gpos->gdef = gdef; /* can be NULL */ - - /* We now check the LookupFlags for values larger than 0xFF to find - out whether we need to load the `MarkAttachClassDef' field of the - GDEF table -- this hack is necessary for OpenType 1.2 tables since - the version field of the GDEF table hasn't been incremented. - - For constructed GDEF tables, we only load it if - `MarkAttachClassDef_offset' is not zero (nevertheless, a build of - a constructed mark attach table is not supported currently). */ - - if ( gdef && - gdef->MarkAttachClassDef_offset && !gdef->MarkAttachClassDef.loaded ) - { - lo = gpos->LookupList.Lookup; - num_lookups = gpos->LookupList.LookupCount; - - for ( i = 0; i < num_lookups; i++ ) - { - if ( lo[i].LookupFlag & IGNORE_SPECIAL_MARKS ) - { - if ( FILE_Seek( gdef->MarkAttachClassDef_offset ) || - ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( !new_offset ) - return TTO_Err_Invalid_GDEF_SubTable; - - new_offset += base_offset; - - if ( FILE_Seek( new_offset ) || - ( error = Load_ClassDefinition( &gdef->MarkAttachClassDef, - 256, faze ) ) != TT_Err_Ok ) - goto Fail1; - - break; - } - } - } - - gpos->loaded = TRUE; - *retptr = *gpos; - DONE_Stream( stream ); - - return TT_Err_Ok; - - Fail1: - Free_LookupList( &gpos->LookupList, GPOS ); - - Fail2: - Free_FeatureList( &gpos->FeatureList ); - - Fail3: - Free_ScriptList( &gpos->ScriptList ); - - /* release stream */ - - DONE_Stream( stream ); - - return error; - } - - - - /***************************** - * SubTable related functions - *****************************/ - - /* shared tables */ - - /* ValueRecord */ - - static TT_Error Load_ValueRecord( TTO_ValueRecord* vr, - TT_UShort format, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( format & HAVE_X_PLACEMENT ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - vr->XPlacement = GET_Short(); - - FORGET_Frame(); - } - else - vr->XPlacement = 0; - - if ( format & HAVE_Y_PLACEMENT ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - vr->YPlacement = GET_Short(); - - FORGET_Frame(); - } - else - vr->YPlacement = 0; - - if ( format & HAVE_X_ADVANCE ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - vr->XAdvance = GET_Short(); - - FORGET_Frame(); - } - else - vr->XAdvance = 0; - - if ( format & HAVE_Y_ADVANCE ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - vr->YAdvance = GET_Short(); - - FORGET_Frame(); - } - else - vr->YAdvance = 0; - - if ( format & HAVE_X_PLACEMENT_DEVICE ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &vr->XPlacementDevice, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - } - else - { - vr->XPlacementDevice.StartSize = 0; - vr->XPlacementDevice.EndSize = 0; - vr->XPlacementDevice.DeltaValue = NULL; - } - - if ( format & HAVE_Y_PLACEMENT_DEVICE ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &vr->YPlacementDevice, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - } - else - { - vr->YPlacementDevice.StartSize = 0; - vr->YPlacementDevice.EndSize = 0; - vr->YPlacementDevice.DeltaValue = NULL; - } - - if ( format & HAVE_X_ADVANCE_DEVICE ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &vr->XAdvanceDevice, - input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - else - { - vr->XAdvanceDevice.StartSize = 0; - vr->XAdvanceDevice.EndSize = 0; - vr->XAdvanceDevice.DeltaValue = NULL; - } - - if ( format & HAVE_Y_ADVANCE_DEVICE ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &vr->YAdvanceDevice, - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - { - vr->YAdvanceDevice.StartSize = 0; - vr->YAdvanceDevice.EndSize = 0; - vr->YAdvanceDevice.DeltaValue = NULL; - } - - if ( format & HAVE_X_ID_PLACEMENT ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - vr->XIdPlacement = GET_UShort(); - - FORGET_Frame(); - } - else - vr->XIdPlacement = 0; - - if ( format & HAVE_Y_ID_PLACEMENT ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - vr->YIdPlacement = GET_UShort(); - - FORGET_Frame(); - } - else - vr->YIdPlacement = 0; - - if ( format & HAVE_X_ID_ADVANCE ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - vr->XIdAdvance = GET_UShort(); - - FORGET_Frame(); - } - else - vr->XIdAdvance = 0; - - if ( format & HAVE_Y_ID_ADVANCE ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - vr->YIdAdvance = GET_UShort(); - - FORGET_Frame(); - } - else - vr->YIdAdvance = 0; - - return TT_Err_Ok; - - Fail1: - Free_Device( &vr->YAdvanceDevice ); - - Fail2: - Free_Device( &vr->XAdvanceDevice ); - - Fail3: - Free_Device( &vr->YPlacementDevice ); - return error; - } - - - static void Free_ValueRecord( TTO_ValueRecord* vr, - UShort format ) - { - if ( format & HAVE_Y_ADVANCE_DEVICE ) - Free_Device( &vr->YAdvanceDevice ); - if ( format & HAVE_X_ADVANCE_DEVICE ) - Free_Device( &vr->XAdvanceDevice ); - if ( format & HAVE_Y_PLACEMENT_DEVICE ) - Free_Device( &vr->YPlacementDevice ); - if ( format & HAVE_X_PLACEMENT_DEVICE ) - Free_Device( &vr->XPlacementDevice ); - } - - - /* AnchorFormat1 */ - /* AnchorFormat2 */ - /* AnchorFormat3 */ - /* AnchorFormat4 */ - - static TT_Error Load_Anchor( TTO_Anchor* an, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - an->PosFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( an->PosFormat ) - { - case 1: - if ( ACCESS_Frame( 4L ) ) - return error; - - an->af.af1.XCoordinate = GET_Short(); - an->af.af1.YCoordinate = GET_Short(); - - FORGET_Frame(); - break; - - case 2: - if ( ACCESS_Frame( 6L ) ) - return error; - - an->af.af2.XCoordinate = GET_Short(); - an->af.af2.YCoordinate = GET_Short(); - an->af.af2.AnchorPoint = GET_UShort(); - - FORGET_Frame(); - break; - - case 3: - if ( ACCESS_Frame( 6L ) ) - return error; - - an->af.af3.XCoordinate = GET_Short(); - an->af.af3.YCoordinate = GET_Short(); - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &an->af.af3.XDeviceTable, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - } - else - { - an->af.af3.XDeviceTable.StartSize = 0; - an->af.af3.XDeviceTable.EndSize = 0; - an->af.af3.XDeviceTable.DeltaValue = 0; - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Device( &an->af.af3.YDeviceTable, - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - else - { - an->af.af3.YDeviceTable.StartSize = 0; - an->af.af3.YDeviceTable.EndSize = 0; - an->af.af3.YDeviceTable.DeltaValue = 0; - } - break; - - case 4: - if ( ACCESS_Frame( 4L ) ) - return error; - - an->af.af4.XIdAnchor = GET_UShort(); - an->af.af4.YIdAnchor = GET_UShort(); - - FORGET_Frame(); - break; - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; - - Fail: - Free_Device( &an->af.af3.XDeviceTable ); - return error; - } - - - static void Free_Anchor( TTO_Anchor* an ) - { - if ( an->PosFormat == 3 ) - { - Free_Device( &an->af.af3.YDeviceTable ); - Free_Device( &an->af.af3.XDeviceTable ); - } - } - - - /* MarkArray */ - - static TT_Error Load_MarkArray ( TTO_MarkArray* ma, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_MarkRecord* mr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ma->MarkCount = GET_UShort(); - - FORGET_Frame(); - - ma->MarkRecord = NULL; - - if ( ALLOC_ARRAY( ma->MarkRecord, count, TTO_MarkRecord ) ) - return error; - - mr = ma->MarkRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 4L ) ) - goto Fail; - - mr[n].Class = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &mr[n].MarkAnchor, input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_Anchor( &mr[n].MarkAnchor ); - - FREE( mr ); - return error; - } - - - static void Free_MarkArray( TTO_MarkArray* ma ) - { - UShort n, count; - - TTO_MarkRecord* mr; - - - if ( ma->MarkRecord ) - { - count = ma->MarkCount; - mr = ma->MarkRecord; - - for ( n = 0; n < count; n++ ) - Free_Anchor( &mr[n].MarkAnchor ); - - FREE( mr ); - } - } - - - /* LookupType 1 */ - - /* SinglePosFormat1 */ - /* SinglePosFormat2 */ - - TT_Error Load_SinglePos( TTO_SinglePos* sp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count, format; - ULong cur_offset, new_offset, base_offset; - - TTO_ValueRecord* v; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 6L ) ) - return error; - - sp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - format = sp->ValueFormat = GET_UShort(); - - FORGET_Frame(); - - if ( !format ) - return TTO_Err_Invalid_GPOS_SubTable; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &sp->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - switch ( sp->PosFormat ) - { - case 1: - error = Load_ValueRecord( &sp->spf.spf1.Value, format, input ); - if ( error ) - goto Fail2; - break; - - case 2: - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = sp->spf.spf2.ValueCount = GET_UShort(); - - FORGET_Frame(); - - sp->spf.spf2.Value = NULL; - - if ( ALLOC_ARRAY( sp->spf.spf2.Value, count, TTO_ValueRecord ) ) - goto Fail2; - - v = sp->spf.spf2.Value; - - for ( n = 0; n < count; n++ ) - { - error = Load_ValueRecord( &v[n], format, input ); - if ( error ) - goto Fail1; - } - break; - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_ValueRecord( &v[n], format ); - - FREE( v ); - - Fail2: - Free_Coverage( &sp->Coverage ); - return error; - } - - - void Free_SinglePos( TTO_SinglePos* sp ) - { - UShort n, count, format; - - TTO_ValueRecord* v; - - - format = sp->ValueFormat; - - switch ( sp->PosFormat ) - { - case 1: - Free_ValueRecord( &sp->spf.spf1.Value, format ); - break; - - case 2: - if ( sp->spf.spf2.Value ) - { - count = sp->spf.spf2.ValueCount; - v = sp->spf.spf2.Value; - - for ( n = 0; n < count; n++ ) - Free_ValueRecord( &v[n], format ); - - FREE( v ); - } - break; - } - - Free_Coverage( &sp->Coverage ); - } - - - /* LookupType 2 */ - - /* PairSet */ - - static TT_Error Load_PairSet ( TTO_PairSet* ps, - UShort format1, - UShort format2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - TTO_PairValueRecord* pvr; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ps->PairValueCount = GET_UShort(); - - FORGET_Frame(); - - ps->PairValueRecord = NULL; - - if ( ALLOC_ARRAY( ps->PairValueRecord, count, TTO_PairValueRecord ) ) - return error; - - pvr = ps->PairValueRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - pvr[n].SecondGlyph = GET_UShort(); - - FORGET_Frame(); - - if ( format1 ) - { - error = Load_ValueRecord( &pvr[n].Value1, format1, input ); - if ( error ) - goto Fail; - } - if ( format2 ) - { - error = Load_ValueRecord( &pvr[n].Value2, format2, input ); - if ( error ) - goto Fail; - } - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - { - if ( format1 ) - Free_ValueRecord( &pvr[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &pvr[n].Value2, format2 ); - } - - FREE( pvr ); - return error; - } - - - static void Free_PairSet( TTO_PairSet* ps, - UShort format1, - UShort format2 ) - { - UShort n, count; - - TTO_PairValueRecord* pvr; - - - if ( ps->PairValueRecord ) - { - count = ps->PairValueCount; - pvr = ps->PairValueRecord; - - for ( n = 0; n < count; n++ ) - { - if ( format1 ) - Free_ValueRecord( &pvr[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &pvr[n].Value2, format2 ); - } - - FREE( pvr ); - } - } - - - /* PairPosFormat1 */ - - static TT_Error Load_PairPosFormat1( TTO_PairPosFormat1* ppf1, - UShort format1, - UShort format2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_PairSet* ps; - - - base_offset = FILE_Pos() - 8L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ppf1->PairSetCount = GET_UShort(); - - FORGET_Frame(); - - ppf1->PairSet = NULL; - - if ( ALLOC_ARRAY( ppf1->PairSet, count, TTO_PairSet ) ) - goto Fail; - - ps = ppf1->PairSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_PairSet( &ps[n], format1, - format2, input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_PairSet( &ps[n], format1, format2 ); - - FREE( ps ); - return error; - } - - - static void Free_PairPosFormat1( TTO_PairPosFormat1* ppf1, - UShort format1, - UShort format2 ) - { - UShort n, count; - - TTO_PairSet* ps; - - - if ( ppf1->PairSet ) - { - count = ppf1->PairSetCount; - ps = ppf1->PairSet; - - for ( n = 0; n < count; n++ ) - Free_PairSet( &ps[n], format1, format2 ); - - FREE( ps ); - } - } - - - /* PairPosFormat2 */ - - static TT_Error Load_PairPosFormat2( TTO_PairPosFormat2* ppf2, - UShort format1, - UShort format2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort m, n, count1, count2; - ULong cur_offset, new_offset1, new_offset2, base_offset; - - TTO_Class1Record* c1r; - TTO_Class2Record* c2r; - - - base_offset = FILE_Pos() - 8L; - - if ( ACCESS_Frame( 8L ) ) - return error; - - new_offset1 = GET_UShort() + base_offset; - new_offset2 = GET_UShort() + base_offset; - - /* `Class1Count' and `Class2Count' are the upper limits for class - values, thus we read it now to make additional safety checks. */ - - count1 = ppf2->Class1Count = GET_UShort(); - count2 = ppf2->Class2Count = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset1 ) || - ( error = Load_ClassDefinition( &ppf2->ClassDef1, count1, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset2 ) || - ( error = Load_ClassDefinition( &ppf2->ClassDef2, count2, - input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - - ppf2->Class1Record = NULL; - - if ( ALLOC_ARRAY( ppf2->Class1Record, count1, TTO_Class1Record ) ) - goto Fail1; - - c1r = ppf2->Class1Record; - - for ( m = 0; m < count1; m++ ) - { - c1r[m].Class2Record = NULL; - - if ( ALLOC_ARRAY( c1r[m].Class2Record, count2, TTO_Class2Record ) ) - goto Fail1; - - c2r = c1r[m].Class2Record; - - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - { - Load_ValueRecord( &c2r[n].Value1, format1, input ); - if ( error ) - goto Fail1; - } - if ( format2 ) - { - Load_ValueRecord( &c2r[n].Value2, format2, input ); - if ( error ) - goto Fail1; - } - } - } - - return TT_Err_Ok; - - Fail1: - for ( m = 0; m < count1; m++ ) - { - c2r = c1r[m].Class2Record; - - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - Free_ValueRecord( &c2r[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &c2r[n].Value2, format2 ); - } - - FREE( c2r ); - } - - FREE( c1r ); - - Free_ClassDefinition( &ppf2->ClassDef2 ); - - Fail2: - Free_ClassDefinition( &ppf2->ClassDef1 ); - return error; - } - - - static void Free_PairPosFormat2( TTO_PairPosFormat2* ppf2, - UShort format1, - UShort format2 ) - { - UShort m, n, count1, count2; - - TTO_Class1Record* c1r; - TTO_Class2Record* c2r; - - - if ( ppf2->Class1Record ) - { - c1r = ppf2->Class1Record; - count1 = ppf2->Class1Count; - count2 = ppf2->Class2Count; - - for ( m = 0; m < count1; m++ ) - { - c2r = c1r[m].Class2Record; - - for ( n = 0; n < count2; n++ ) - { - if ( format1 ) - Free_ValueRecord( &c2r[n].Value1, format1 ); - if ( format2 ) - Free_ValueRecord( &c2r[n].Value2, format2 ); - } - - FREE( c2r ); - } - - FREE( c1r ); - - Free_ClassDefinition( &ppf2->ClassDef2 ); - Free_ClassDefinition( &ppf2->ClassDef1 ); - } - } - - - TT_Error Load_PairPos( TTO_PairPos* pp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort format1, format2; - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 8L ) ) - return error; - - pp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - format1 = pp->ValueFormat1 = GET_UShort(); - format2 = pp->ValueFormat2 = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &pp->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - switch ( pp->PosFormat ) - { - case 1: - error = Load_PairPosFormat1( &pp->ppf.ppf1, format1, format2, input ); - if ( error ) - goto Fail; - break; - - case 2: - error = Load_PairPosFormat2( &pp->ppf.ppf2, format1, format2, input ); - if ( error ) - goto Fail; - break; - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; - - Fail: - Free_Coverage( &pp->Coverage ); - return error; - } - - - void Free_PairPos( TTO_PairPos* pp ) - { - UShort format1, format2; - - - format1 = pp->ValueFormat1; - format2 = pp->ValueFormat2; - - switch ( pp->PosFormat ) - { - case 1: - Free_PairPosFormat1( &pp->ppf.ppf1, format1, format2 ); - break; - - case 2: - Free_PairPosFormat2( &pp->ppf.ppf2, format1, format2 ); - break; - } - - Free_Coverage( &pp->Coverage ); - } - - - /* LookupType 3 */ - - /* CursivePosFormat1 */ - - TT_Error Load_CursivePos( TTO_CursivePos* cp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_EntryExitRecord* eer; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - cp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &cp->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = cp->EntryExitCount = GET_UShort(); - - FORGET_Frame(); - - cp->EntryExitRecord = NULL; - - if ( ALLOC_ARRAY( cp->EntryExitRecord, count, TTO_EntryExitRecord ) ) - goto Fail2; - - eer = cp->EntryExitRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &eer[n].EntryAnchor, - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - eer[n].EntryAnchor.PosFormat = 0; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &eer[n].ExitAnchor, - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - eer[n].ExitAnchor.PosFormat = 0; - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - { - Free_Anchor( &eer[n].EntryAnchor ); - Free_Anchor( &eer[n].ExitAnchor ); - } - - FREE( eer ); - - Fail2: - Free_Coverage( &cp->Coverage ); - return error; - } - - - void Free_CursivePos( TTO_CursivePos* cp ) - { - UShort n, count; - - TTO_EntryExitRecord* eer; - - - if ( cp->EntryExitRecord ) - { - count = cp->EntryExitCount; - eer = cp->EntryExitRecord; - - for ( n = 0; n < count; n++ ) - { - Free_Anchor( &eer[n].EntryAnchor ); - Free_Anchor( &eer[n].ExitAnchor ); - } - - FREE( eer ); - } - - Free_Coverage( &cp->Coverage ); - } - - - /* LookupType 4 */ - - /* BaseArray */ - - static TT_Error Load_BaseArray( TTO_BaseArray* ba, - UShort num_classes, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort m, n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_BaseRecord* br; - TTO_Anchor* ban; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ba->BaseCount = GET_UShort(); - - FORGET_Frame(); - - ba->BaseRecord = NULL; - - if ( ALLOC_ARRAY( ba->BaseRecord, count, TTO_BaseRecord ) ) - return error; - - br = ba->BaseRecord; - - for ( m = 0; m < count; m++ ) - { - br[m].BaseAnchor = NULL; - - if ( ALLOC_ARRAY( br[m].BaseAnchor, num_classes, TTO_Anchor ) ) - goto Fail; - - ban = br[m].BaseAnchor; - - for ( n = 0; n < num_classes; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &ban[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - } - - return TT_Err_Ok; - - Fail: - for ( m = 0; m < count; m++ ) - { - ban = br[m].BaseAnchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &ban[n] ); - - FREE( ban ); - } - - FREE( br ); - return error; - } - - - static void Free_BaseArray( TTO_BaseArray* ba, - UShort num_classes ) - { - UShort m, n, count; - - TTO_BaseRecord* br; - TTO_Anchor* ban; - - - if ( ba->BaseRecord ) - { - count = ba->BaseCount; - br = ba->BaseRecord; - - for ( m = 0; m < count; m++ ) - { - ban = br[m].BaseAnchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &ban[n] ); - - FREE( ban ); - } - - FREE( br ); - } - } - - - /* MarkBasePosFormat1 */ - - TT_Error Load_MarkBasePos( TTO_MarkBasePos* mbp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - mbp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mbp->MarkCoverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mbp->BaseCoverage, input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 4L ) ) - goto Fail2; - - mbp->ClassCount = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_MarkArray( &mbp->MarkArray, input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_BaseArray( &mbp->BaseArray, mbp->ClassCount, - input ) ) != TT_Err_Ok ) - goto Fail1; - - return TT_Err_Ok; - - Fail1: - Free_MarkArray( &mbp->MarkArray ); - - Fail2: - Free_Coverage( &mbp->BaseCoverage ); - - Fail3: - Free_Coverage( &mbp->MarkCoverage ); - return error; - } - - - void Free_MarkBasePos( TTO_MarkBasePos* mbp ) - { - Free_BaseArray( &mbp->BaseArray, mbp->ClassCount ); - Free_MarkArray( &mbp->MarkArray ); - Free_Coverage( &mbp->BaseCoverage ); - Free_Coverage( &mbp->MarkCoverage ); - } - - - /* LookupType 5 */ - - /* LigatureAttach */ - - static TT_Error Load_LigatureAttach( TTO_LigatureAttach* lat, - UShort num_classes, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort m, n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ComponentRecord* cr; - TTO_Anchor* lan; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = lat->ComponentCount = GET_UShort(); - - FORGET_Frame(); - - lat->ComponentRecord = NULL; - - if ( ALLOC_ARRAY( lat->ComponentRecord, count, TTO_ComponentRecord ) ) - return error; - - cr = lat->ComponentRecord; - - for ( m = 0; m < count; m++ ) - { - cr[m].LigatureAnchor = NULL; - - if ( ALLOC_ARRAY( cr[m].LigatureAnchor, num_classes, TTO_Anchor ) ) - goto Fail; - - lan = cr[m].LigatureAnchor; - - for ( n = 0; n < num_classes; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( new_offset ) - { - new_offset += base_offset; - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &lan[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - else - lan[n].PosFormat = 0; - } - } - - return TT_Err_Ok; - - Fail: - for ( m = 0; m < count; m++ ) - { - lan = cr[m].LigatureAnchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &lan[n] ); - - FREE( lan ); - } - - FREE( cr ); - return error; - } - - - static void Free_LigatureAttach( TTO_LigatureAttach* lat, - UShort num_classes ) - { - UShort m, n, count; - - TTO_ComponentRecord* cr; - TTO_Anchor* lan; - - - if ( lat->ComponentRecord ) - { - count = lat->ComponentCount; - cr = lat->ComponentRecord; - - for ( m = 0; m < count; m++ ) - { - lan = cr[m].LigatureAnchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &lan[n] ); - - FREE( lan ); - } - - FREE( cr ); - } - } - - - /* LigatureArray */ - - static TT_Error Load_LigatureArray( TTO_LigatureArray* la, - UShort num_classes, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_LigatureAttach* lat; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = la->LigatureCount = GET_UShort(); - - FORGET_Frame(); - - la->LigatureAttach = NULL; - - if ( ALLOC_ARRAY( la->LigatureAttach, count, TTO_LigatureAttach ) ) - return error; - - lat = la->LigatureAttach; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LigatureAttach( &lat[n], num_classes, - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_LigatureAttach( &lat[n], num_classes ); - - FREE( lat ); - return error; - } - - - static void Free_LigatureArray( TTO_LigatureArray* la, - UShort num_classes ) - { - UShort n, count; - - TTO_LigatureAttach* lat; - - - if ( la->LigatureAttach ) - { - count = la->LigatureCount; - lat = la->LigatureAttach; - - for ( n = 0; n < count; n++ ) - Free_LigatureAttach( &lat[n], num_classes ); - - FREE( lat ); - } - } - - - /* MarkLigPosFormat1 */ - - TT_Error Load_MarkLigPos( TTO_MarkLigPos* mlp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - mlp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mlp->MarkCoverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mlp->LigatureCoverage, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 4L ) ) - goto Fail2; - - mlp->ClassCount = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_MarkArray( &mlp->MarkArray, input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LigatureArray( &mlp->LigatureArray, mlp->ClassCount, - input ) ) != TT_Err_Ok ) - goto Fail1; - - return TT_Err_Ok; - - Fail1: - Free_MarkArray( &mlp->MarkArray ); - - Fail2: - Free_Coverage( &mlp->LigatureCoverage ); - - Fail3: - Free_Coverage( &mlp->MarkCoverage ); - return error; - } - - - void Free_MarkLigPos( TTO_MarkLigPos* mlp ) - { - Free_LigatureArray( &mlp->LigatureArray, mlp->ClassCount ); - Free_MarkArray( &mlp->MarkArray ); - Free_Coverage( &mlp->LigatureCoverage ); - Free_Coverage( &mlp->MarkCoverage ); - } - - - /* LookupType 6 */ - - /* Mark2Array */ - - static TT_Error Load_Mark2Array( TTO_Mark2Array* m2a, - UShort num_classes, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort m, n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Mark2Record* m2r; - TTO_Anchor* m2an; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = m2a->Mark2Count = GET_UShort(); - - FORGET_Frame(); - - m2a->Mark2Record = NULL; - - if ( ALLOC_ARRAY( m2a->Mark2Record, count, TTO_Mark2Record ) ) - return error; - - m2r = m2a->Mark2Record; - - for ( m = 0; m < count; m++ ) - { - m2r[m].Mark2Anchor = NULL; - - if ( ALLOC_ARRAY( m2r[m].Mark2Anchor, num_classes, TTO_Anchor ) ) - goto Fail; - - m2an = m2r[m].Mark2Anchor; - - for ( n = 0; n < num_classes; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Anchor( &m2an[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - } - - return TT_Err_Ok; - - Fail: - for ( m = 0; m < count; m++ ) - { - m2an = m2r[m].Mark2Anchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &m2an[n] ); - - FREE( m2an ); - } - - FREE( m2r ); - return error; - } - - - static void Free_Mark2Array( TTO_Mark2Array* m2a, - UShort num_classes ) - { - UShort m, n, count; - - TTO_Mark2Record* m2r; - TTO_Anchor* m2an; - - - if ( m2a->Mark2Record ) - { - count = m2a->Mark2Count; - m2r = m2a->Mark2Record; - - for ( m = 0; m < count; m++ ) - { - m2an = m2r[m].Mark2Anchor; - - for ( n = 0; n < num_classes; n++ ) - Free_Anchor( &m2an[n] ); - - FREE( m2an ); - } - - FREE( m2r ); - } - } - - - /* MarkMarkPosFormat1 */ - - TT_Error Load_MarkMarkPos( TTO_MarkMarkPos* mmp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - ULong cur_offset, new_offset, base_offset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - mmp->PosFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mmp->Mark1Coverage, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &mmp->Mark2Coverage, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 4L ) ) - goto Fail2; - - mmp->ClassCount = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_MarkArray( &mmp->Mark1Array, input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Mark2Array( &mmp->Mark2Array, mmp->ClassCount, - input ) ) != TT_Err_Ok ) - goto Fail1; - - return TT_Err_Ok; - - Fail1: - Free_MarkArray( &mmp->Mark1Array ); - - Fail2: - Free_Coverage( &mmp->Mark2Coverage ); - - Fail3: - Free_Coverage( &mmp->Mark1Coverage ); - return error; - } - - - void Free_MarkMarkPos( TTO_MarkMarkPos* mmp ) - { - Free_Mark2Array( &mmp->Mark2Array, mmp->ClassCount ); - Free_MarkArray( &mmp->Mark1Array ); - Free_Coverage( &mmp->Mark2Coverage ); - Free_Coverage( &mmp->Mark1Coverage ); - } - - - /* LookupType 7 */ - - /* PosRule */ - - static TT_Error Load_PosRule( TTO_PosRule* pr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* i; - - TTO_PosLookupRecord* plr; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - pr->GlyphCount = GET_UShort(); - pr->PosCount = GET_UShort(); - - FORGET_Frame(); - - pr->Input = NULL; - - count = pr->GlyphCount - 1; /* only GlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( pr->Input, count, UShort ) ) - return error; - - i = pr->Input; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - i[n] = GET_UShort(); - - FORGET_Frame(); - - pr->PosLookupRecord = NULL; - - count = pr->PosCount; - - if ( ALLOC_ARRAY( pr->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = pr->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - FREE( i ); - return error; - } - - - static void Free_PosRule( TTO_PosRule* pr ) - { - FREE( pr->PosLookupRecord ); - FREE( pr->Input ); - } - - - /* PosRuleSet */ - - static TT_Error Load_PosRuleSet( TTO_PosRuleSet* prs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_PosRule* pr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = prs->PosRuleCount = GET_UShort(); - - FORGET_Frame(); - - prs->PosRule = NULL; - - if ( ALLOC_ARRAY( prs->PosRule, count, TTO_PosRule ) ) - return error; - - pr = prs->PosRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_PosRule( &pr[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_PosRule( &pr[n] ); - - FREE( pr ); - return error; - } - - - static void Free_PosRuleSet( TTO_PosRuleSet* prs ) - { - UShort n, count; - - TTO_PosRule* pr; - - - if ( prs->PosRule ) - { - count = prs->PosRuleCount; - pr = prs->PosRule; - - for ( n = 0; n < count; n++ ) - Free_PosRule( &pr[n] ); - - FREE( pr ); - } - } - - - /* ContextPosFormat1 */ - - static TT_Error Load_ContextPos1( TTO_ContextPosFormat1* cpf1, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_PosRuleSet* prs; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &cpf1->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = cpf1->PosRuleSetCount = GET_UShort(); - - FORGET_Frame(); - - cpf1->PosRuleSet = NULL; - - if ( ALLOC_ARRAY( cpf1->PosRuleSet, count, TTO_PosRuleSet ) ) - goto Fail2; - - prs = cpf1->PosRuleSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_PosRuleSet( &prs[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_PosRuleSet( &prs[n] ); - - FREE( prs ); - - Fail2: - Free_Coverage( &cpf1->Coverage ); - return error; - } - - - static void Free_Context1( TTO_ContextPosFormat1* cpf1 ) - { - UShort n, count; - - TTO_PosRuleSet* prs; - - - if ( cpf1->PosRuleSet ) - { - count = cpf1->PosRuleSetCount; - prs = cpf1->PosRuleSet; - - for ( n = 0; n < count; n++ ) - Free_PosRuleSet( &prs[n] ); - - FREE( prs ); - } - - Free_Coverage( &cpf1->Coverage ); - } - - - /* PosClassRule */ - - static TT_Error Load_PosClassRule( TTO_ContextPosFormat2* cpf2, - TTO_PosClassRule* pcr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* c; - TTO_PosLookupRecord* plr; - Bool* d; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - pcr->GlyphCount = GET_UShort(); - pcr->PosCount = GET_UShort(); - - FORGET_Frame(); - - if ( pcr->GlyphCount > cpf2->MaxContextLength ) - cpf2->MaxContextLength = pcr->GlyphCount; - - pcr->Class = NULL; - - count = pcr->GlyphCount - 1; /* only GlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( pcr->Class, count, UShort ) ) - return error; - - c = pcr->Class; - d = cpf2->ClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - { - c[n] = GET_UShort(); - - /* We check whether the specific class is used at all. If not, - class 0 is used instead. */ - - if ( !d[c[n]] ) - c[n] = 0; - } - - FORGET_Frame(); - - pcr->PosLookupRecord = NULL; - - count = pcr->PosCount; - - if ( ALLOC_ARRAY( pcr->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = pcr->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - FREE( c ); - return error; - } - - - static void Free_PosClassRule( TTO_PosClassRule* pcr ) - { - FREE( pcr->PosLookupRecord ); - FREE( pcr->Class ); - } - - - /* PosClassSet */ - - static TT_Error Load_PosClassSet( TTO_ContextPosFormat2* cpf2, - TTO_PosClassSet* pcs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_PosClassRule* pcr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = pcs->PosClassRuleCount = GET_UShort(); - - FORGET_Frame(); - - pcs->PosClassRule = NULL; - - if ( ALLOC_ARRAY( pcs->PosClassRule, count, TTO_PosClassRule ) ) - return error; - - pcr = pcs->PosClassRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_PosClassRule( cpf2, &pcr[n], - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_PosClassRule( &pcr[n] ); - - FREE( pcr ); - return error; - } - - - static void Free_PosClassSet( TTO_PosClassSet* pcs ) - { - UShort n, count; - - TTO_PosClassRule* pcr; - - - if ( pcs->PosClassRule ) - { - count = pcs->PosClassRuleCount; - pcr = pcs->PosClassRule; - - for ( n = 0; n < count; n++ ) - Free_PosClassRule( &pcr[n] ); - - FREE( pcr ); - } - } - - - /* ContextPosFormat2 */ - - static TT_Error Load_ContextPos2( TTO_ContextPosFormat2* cpf2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_PosClassSet* pcs; - - - base_offset = FILE_Pos() - 2; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &cpf2->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 4L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - /* `PosClassSetCount' is the upper limit for class values, thus we - read it now to make an additional safety check. */ - - count = cpf2->PosClassSetCount = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ClassDefinition( &cpf2->ClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - cpf2->PosClassSet = NULL; - cpf2->MaxContextLength = 0; - - if ( ALLOC_ARRAY( cpf2->PosClassSet, count, TTO_PosClassSet ) ) - goto Fail2; - - pcs = cpf2->PosClassSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - if ( new_offset != base_offset ) /* not a NULL offset */ - { - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_PosClassSet( cpf2, &pcs[n], - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - { - /* we create a PosClassSet table with no entries */ - - cpf2->PosClassSet[n].PosClassRuleCount = 0; - cpf2->PosClassSet[n].PosClassRule = NULL; - } - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_PosClassSet( &pcs[n] ); - - FREE( pcs ); - - Fail2: - Free_ClassDefinition( &cpf2->ClassDef ); - - Fail3: - Free_Coverage( &cpf2->Coverage ); - return error; - } - - - static void Free_Context2( TTO_ContextPosFormat2* cpf2 ) - { - UShort n, count; - - TTO_PosClassSet* pcs; - - - if ( cpf2->PosClassSet ) - { - count = cpf2->PosClassSetCount; - pcs = cpf2->PosClassSet; - - for ( n = 0; n < count; n++ ) - Free_PosClassSet( &pcs[n] ); - - FREE( pcs ); - } - - Free_ClassDefinition( &cpf2->ClassDef ); - Free_Coverage( &cpf2->Coverage ); - } - - - /* ContextPosFormat3 */ - - static TT_Error Load_ContextPos3( TTO_ContextPosFormat3* cpf3, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Coverage* c; - TTO_PosLookupRecord* plr; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 4L ) ) - return error; - - cpf3->GlyphCount = GET_UShort(); - cpf3->PosCount = GET_UShort(); - - FORGET_Frame(); - - cpf3->Coverage = NULL; - - count = cpf3->GlyphCount; - - if ( ALLOC_ARRAY( cpf3->Coverage, count, TTO_Coverage ) ) - return error; - - c = cpf3->Coverage; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &c[n], input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - - cpf3->PosLookupRecord = NULL; - - count = cpf3->PosCount; - - if ( ALLOC_ARRAY( cpf3->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = cpf3->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - return error; - } - - - static void Free_Context3( TTO_ContextPosFormat3* cpf3 ) - { - UShort n, count; - - TTO_Coverage* c; - - - FREE( cpf3->PosLookupRecord ); - - if ( cpf3->Coverage ) - { - count = cpf3->GlyphCount; - c = cpf3->Coverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - } - - - /* ContextPos */ - - TT_Error Load_ContextPos( TTO_ContextPos* cp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ACCESS_Frame( 2L ) ) - return error; - - cp->PosFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( cp->PosFormat ) - { - case 1: - return Load_ContextPos1( &cp->cpf.cpf1, input ); - - case 2: - return Load_ContextPos2( &cp->cpf.cpf2, input ); - - case 3: - return Load_ContextPos3( &cp->cpf.cpf3, input ); - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - void Free_ContextPos( TTO_ContextPos* cp ) - { - switch ( cp->PosFormat ) - { - case 1: - Free_Context1( &cp->cpf.cpf1 ); - break; - - case 2: - Free_Context2( &cp->cpf.cpf2 ); - break; - - case 3: - Free_Context3( &cp->cpf.cpf3 ); - break; - } - } - - - /* LookupType 8 */ - - /* ChainPosRule */ - - static TT_Error Load_ChainPosRule( TTO_ChainPosRule* cpr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* b; - UShort* i; - UShort* l; - - TTO_PosLookupRecord* plr; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - cpr->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - cpr->Backtrack = NULL; - - count = cpr->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( cpr->Backtrack, count, UShort ) ) - return error; - - b = cpr->Backtrack; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail4; - - for ( n = 0; n < count; n++ ) - b[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - cpr->InputGlyphCount = GET_UShort(); - - FORGET_Frame(); - - cpr->Input = NULL; - - count = cpr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( cpr->Input, count, UShort ) ) - goto Fail4; - - i = cpr->Input; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail3; - - for ( n = 0; n < count; n++ ) - i[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - cpr->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - cpr->Lookahead = NULL; - - count = cpr->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( cpr->Lookahead, count, UShort ) ) - goto Fail3; - - l = cpr->Lookahead; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - l[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - cpr->PosCount = GET_UShort(); - - FORGET_Frame(); - - cpr->PosLookupRecord = NULL; - - count = cpr->PosCount; - - if ( ALLOC_ARRAY( cpr->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = cpr->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - FREE( l ); - - Fail3: - FREE( i ); - - Fail4: - FREE( b ); - return error; - } - - - static void Free_ChainPosRule( TTO_ChainPosRule* cpr ) - { - FREE( cpr->PosLookupRecord ); - FREE( cpr->Lookahead ); - FREE( cpr->Input ); - FREE( cpr->Backtrack ); - } - - - /* ChainPosRuleSet */ - - static TT_Error Load_ChainPosRuleSet( TTO_ChainPosRuleSet* cprs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainPosRule* cpr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cprs->ChainPosRuleCount = GET_UShort(); - - FORGET_Frame(); - - cprs->ChainPosRule = NULL; - - if ( ALLOC_ARRAY( cprs->ChainPosRule, count, TTO_ChainPosRule ) ) - return error; - - cpr = cprs->ChainPosRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainPosRule( &cpr[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_ChainPosRule( &cpr[n] ); - - FREE( cpr ); - return error; - } - - - static void Free_ChainPosRuleSet( TTO_ChainPosRuleSet* cprs ) - { - UShort n, count; - - TTO_ChainPosRule* cpr; - - - if ( cprs->ChainPosRule ) - { - count = cprs->ChainPosRuleCount; - cpr = cprs->ChainPosRule; - - for ( n = 0; n < count; n++ ) - Free_ChainPosRule( &cpr[n] ); - - FREE( cpr ); - } - } - - - /* ChainContextPosFormat1 */ - - static TT_Error Load_ChainContextPos1( TTO_ChainContextPosFormat1* ccpf1, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainPosRuleSet* cprs; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ccpf1->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = ccpf1->ChainPosRuleSetCount = GET_UShort(); - - FORGET_Frame(); - - ccpf1->ChainPosRuleSet = NULL; - - if ( ALLOC_ARRAY( ccpf1->ChainPosRuleSet, count, TTO_ChainPosRuleSet ) ) - goto Fail2; - - cprs = ccpf1->ChainPosRuleSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainPosRuleSet( &cprs[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_ChainPosRuleSet( &cprs[n] ); - - FREE( cprs ); - - Fail2: - Free_Coverage( &ccpf1->Coverage ); - return error; - } - - - static void Free_ChainContext1( TTO_ChainContextPosFormat1* ccpf1 ) - { - UShort n, count; - - TTO_ChainPosRuleSet* cprs; - - - if ( ccpf1->ChainPosRuleSet ) - { - count = ccpf1->ChainPosRuleSetCount; - cprs = ccpf1->ChainPosRuleSet; - - for ( n = 0; n < count; n++ ) - Free_ChainPosRuleSet( &cprs[n] ); - - FREE( cprs ); - } - - Free_Coverage( &ccpf1->Coverage ); - } - - - /* ChainPosClassRule */ - - static TT_Error Load_ChainPosClassRule( - TTO_ChainContextPosFormat2* ccpf2, - TTO_ChainPosClassRule* cpcr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* b; - UShort* i; - UShort* l; - TTO_PosLookupRecord* plr; - Bool* d; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - cpcr->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - if ( cpcr->BacktrackGlyphCount > ccpf2->MaxBacktrackLength ) - ccpf2->MaxBacktrackLength = cpcr->BacktrackGlyphCount; - - cpcr->Backtrack = NULL; - - count = cpcr->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( cpcr->Backtrack, count, UShort ) ) - return error; - - b = cpcr->Backtrack; - d = ccpf2->BacktrackClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail4; - - for ( n = 0; n < count; n++ ) - { - b[n] = GET_UShort(); - - /* We check whether the specific class is used at all. If not, - class 0 is used instead. */ - - if ( !d[b[n]] ) - b[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - cpcr->InputGlyphCount = GET_UShort(); - - if ( cpcr->InputGlyphCount > ccpf2->MaxInputLength ) - ccpf2->MaxInputLength = cpcr->InputGlyphCount; - - FORGET_Frame(); - - cpcr->Input = NULL; - - count = cpcr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( cpcr->Input, count, UShort ) ) - goto Fail4; - - i = cpcr->Input; - d = ccpf2->InputClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail3; - - for ( n = 0; n < count; n++ ) - { - i[n] = GET_UShort(); - - if ( !d[i[n]] ) - i[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - cpcr->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - if ( cpcr->LookaheadGlyphCount > ccpf2->MaxLookaheadLength ) - ccpf2->MaxLookaheadLength = cpcr->LookaheadGlyphCount; - - cpcr->Lookahead = NULL; - - count = cpcr->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( cpcr->Lookahead, count, UShort ) ) - goto Fail3; - - l = cpcr->Lookahead; - d = ccpf2->LookaheadClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - { - l[n] = GET_UShort(); - - if ( !d[l[n]] ) - l[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - cpcr->PosCount = GET_UShort(); - - FORGET_Frame(); - - cpcr->PosLookupRecord = NULL; - - count = cpcr->PosCount; - - if ( ALLOC_ARRAY( cpcr->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = cpcr->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - FREE( l ); - - Fail3: - FREE( i ); - - Fail4: - FREE( b ); - return error; - } - - - static void Free_ChainPosClassRule( TTO_ChainPosClassRule* cpcr ) - { - FREE( cpcr->PosLookupRecord ); - FREE( cpcr->Lookahead ); - FREE( cpcr->Input ); - FREE( cpcr->Backtrack ); - } - - - /* PosClassSet */ - - static TT_Error Load_ChainPosClassSet( - TTO_ChainContextPosFormat2* ccpf2, - TTO_ChainPosClassSet* cpcs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainPosClassRule* cpcr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cpcs->ChainPosClassRuleCount = GET_UShort(); - - FORGET_Frame(); - - cpcs->ChainPosClassRule = NULL; - - if ( ALLOC_ARRAY( cpcs->ChainPosClassRule, count, - TTO_ChainPosClassRule ) ) - return error; - - cpcr = cpcs->ChainPosClassRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainPosClassRule( ccpf2, &cpcr[n], - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_ChainPosClassRule( &cpcr[n] ); - - FREE( cpcr ); - return error; - } - - - static void Free_ChainPosClassSet( TTO_ChainPosClassSet* cpcs ) - { - UShort n, count; - - TTO_ChainPosClassRule* cpcr; - - - if ( cpcs->ChainPosClassRule ) - { - count = cpcs->ChainPosClassRuleCount; - cpcr = cpcs->ChainPosClassRule; - - for ( n = 0; n < count; n++ ) - Free_ChainPosClassRule( &cpcr[n] ); - - FREE( cpcr ); - } - } - - - /* ChainContextPosFormat2 */ - - static TT_Error Load_ChainContextPos2( TTO_ChainContextPosFormat2* ccpf2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - ULong backtrack_offset, input_offset, lookahead_offset; - - TTO_ChainPosClassSet* cpcs; - - - base_offset = FILE_Pos() - 2; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ccpf2->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 8L ) ) - goto Fail5; - - backtrack_offset = GET_UShort() + base_offset; - input_offset = GET_UShort() + base_offset; - lookahead_offset = GET_UShort() + base_offset; - - /* `ChainPosClassSetCount' is the upper limit for input class values, - thus we read it now to make an additional safety check. */ - - count = ccpf2->ChainPosClassSetCount = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( backtrack_offset ) || - ( error = Load_ClassDefinition( &ccpf2->BacktrackClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail5; - if ( FILE_Seek( input_offset ) || - ( error = Load_ClassDefinition( &ccpf2->InputClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail4; - if ( FILE_Seek( lookahead_offset ) || - ( error = Load_ClassDefinition( &ccpf2->LookaheadClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - ccpf2->ChainPosClassSet = NULL; - ccpf2->MaxBacktrackLength = 0; - ccpf2->MaxInputLength = 0; - ccpf2->MaxLookaheadLength = 0; - - if ( ALLOC_ARRAY( ccpf2->ChainPosClassSet, count, TTO_ChainPosClassSet ) ) - goto Fail2; - - cpcs = ccpf2->ChainPosClassSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - if ( new_offset != base_offset ) /* not a NULL offset */ - { - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainPosClassSet( ccpf2, &cpcs[n], - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - { - /* we create a ChainPosClassSet table with no entries */ - - ccpf2->ChainPosClassSet[n].ChainPosClassRuleCount = 0; - ccpf2->ChainPosClassSet[n].ChainPosClassRule = NULL; - } - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_ChainPosClassSet( &cpcs[n] ); - - FREE( cpcs ); - - Fail2: - Free_ClassDefinition( &ccpf2->LookaheadClassDef ); - - Fail3: - Free_ClassDefinition( &ccpf2->InputClassDef ); - - Fail4: - Free_ClassDefinition( &ccpf2->BacktrackClassDef ); - - Fail5: - Free_Coverage( &ccpf2->Coverage ); - return error; - } - - - static void Free_ChainContext2( TTO_ChainContextPosFormat2* ccpf2 ) - { - UShort n, count; - - TTO_ChainPosClassSet* cpcs; - - - if ( ccpf2->ChainPosClassSet ) - { - count = ccpf2->ChainPosClassSetCount; - cpcs = ccpf2->ChainPosClassSet; - - for ( n = 0; n < count; n++ ) - Free_ChainPosClassSet( &cpcs[n] ); - - FREE( cpcs ); - } - - Free_ClassDefinition( &ccpf2->LookaheadClassDef ); - Free_ClassDefinition( &ccpf2->InputClassDef ); - Free_ClassDefinition( &ccpf2->BacktrackClassDef ); - - Free_Coverage( &ccpf2->Coverage ); - } - - - /* ChainContextPosFormat3 */ - - static TT_Error Load_ChainContextPos3( TTO_ChainContextPosFormat3* ccpf3, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort backtrack_count, input_count, lookahead_count; - ULong cur_offset, new_offset, base_offset; - - TTO_Coverage* b; - TTO_Coverage* i; - TTO_Coverage* l; - TTO_PosLookupRecord* plr; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - ccpf3->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccpf3->BacktrackCoverage = NULL; - - backtrack_count = ccpf3->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( ccpf3->BacktrackCoverage, backtrack_count, - TTO_Coverage ) ) - return error; - - b = ccpf3->BacktrackCoverage; - - for ( n = 0; n < backtrack_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &b[n], input ) ) != TT_Err_Ok ) - goto Fail4; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - ccpf3->InputGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccpf3->InputCoverage = NULL; - - input_count = ccpf3->InputGlyphCount; - - if ( ALLOC_ARRAY( ccpf3->InputCoverage, input_count, TTO_Coverage ) ) - goto Fail4; - - i = ccpf3->InputCoverage; - - for ( n = 0; n < input_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &i[n], input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - ccpf3->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccpf3->LookaheadCoverage = NULL; - - lookahead_count = ccpf3->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( ccpf3->LookaheadCoverage, lookahead_count, - TTO_Coverage ) ) - goto Fail3; - - l = ccpf3->LookaheadCoverage; - - for ( n = 0; n < lookahead_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &l[n], input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - ccpf3->PosCount = GET_UShort(); - - FORGET_Frame(); - - ccpf3->PosLookupRecord = NULL; - - count = ccpf3->PosCount; - - if ( ALLOC_ARRAY( ccpf3->PosLookupRecord, count, TTO_PosLookupRecord ) ) - goto Fail2; - - plr = ccpf3->PosLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - plr[n].SequenceIndex = GET_UShort(); - plr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( plr ); - - Fail2: - for ( n = 0; n < lookahead_count; n++ ) - Free_Coverage( &l[n] ); - - FREE( l ); - - Fail3: - for ( n = 0; n < input_count; n++ ) - Free_Coverage( &i[n] ); - - FREE( i ); - - Fail4: - for ( n = 0; n < backtrack_count; n++ ) - Free_Coverage( &b[n] ); - - FREE( b ); - return error; - } - - - static void Free_ChainContext3( TTO_ChainContextPosFormat3* ccpf3 ) - { - UShort n, count; - - TTO_Coverage* c; - - - FREE( ccpf3->PosLookupRecord ); - - if ( ccpf3->LookaheadCoverage ) - { - count = ccpf3->LookaheadGlyphCount; - c = ccpf3->LookaheadCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - - if ( ccpf3->InputCoverage ) - { - count = ccpf3->InputGlyphCount; - c = ccpf3->InputCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - - if ( ccpf3->BacktrackCoverage ) - { - count = ccpf3->BacktrackGlyphCount; - c = ccpf3->BacktrackCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - } - - - /* ChainContextPos */ - - TT_Error Load_ChainContextPos( TTO_ChainContextPos* ccp, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ACCESS_Frame( 2L ) ) - return error; - - ccp->PosFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( ccp->PosFormat ) - { - case 1: - return Load_ChainContextPos1( &ccp->ccpf.ccpf1, input ); - - case 2: - return Load_ChainContextPos2( &ccp->ccpf.ccpf2, input ); - - case 3: - return Load_ChainContextPos3( &ccp->ccpf.ccpf3, input ); - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - void Free_ChainContextPos( TTO_ChainContextPos* ccp ) - { - switch ( ccp->PosFormat ) - { - case 1: - Free_ChainContext1( &ccp->ccpf.ccpf1 ); - break; - - case 2: - Free_ChainContext2( &ccp->ccpf.ccpf2 ); - break; - - case 3: - Free_ChainContext3( &ccp->ccpf.ccpf3 ); - break; - } - } - - - - /*********** - * GPOS API - ***********/ - - - EXPORT_FUNC - TT_Error TT_GPOS_Select_Script( TTO_GPOSHeader* gpos, - TT_ULong script_tag, - TT_UShort* script_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - - - if ( !gpos || !script_index ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - for ( n = 0; n < sl->ScriptCount; n++ ) - if ( script_tag == sr[n].ScriptTag ) - { - *script_index = n; - - return TT_Err_Ok; - } - - return TTO_Err_Not_Covered; - } - - - EXPORT_FUNC - TT_Error TT_GPOS_Select_Language( TTO_GPOSHeader* gpos, - TT_ULong language_tag, - TT_UShort script_index, - TT_UShort* language_index, - TT_UShort* req_feature_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - - - if ( !gpos || !language_index || !req_feature_index ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - for ( n = 0; n < s->LangSysCount; n++ ) - if ( language_tag == lsr[n].LangSysTag ) - { - *language_index = n; - *req_feature_index = lsr[n].LangSys.ReqFeatureIndex; - - return TT_Err_Ok; - } - - return TTO_Err_Not_Covered; - } - - - /* selecting 0xFFFF for language_index asks for the values of the - default language (DefaultLangSys) */ - - EXPORT_FUNC - TT_Error TT_GPOS_Select_Feature( TTO_GPOSHeader* gpos, - TT_ULong feature_tag, - TT_UShort script_index, - TT_UShort language_index, - TT_UShort* feature_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - TTO_LangSys* ls; - UShort* fi; - - TTO_FeatureList* fl; - TTO_FeatureRecord* fr; - - - if ( !gpos || !feature_index ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - fl = &gpos->FeatureList; - fr = fl->FeatureRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( language_index == 0xFFFF ) - ls = &s->DefaultLangSys; - else - { - if ( language_index >= s->LangSysCount ) - return TT_Err_Invalid_Argument; - - ls = &lsr[language_index].LangSys; - } - - fi = ls->FeatureIndex; - - for ( n = 0; n < ls->FeatureCount; n++ ) - { - if ( fi[n] >= fl->FeatureCount ) - return TTO_Err_Invalid_GPOS_SubTable_Format; - - if ( feature_tag == fr[fi[n]].FeatureTag ) - { - *feature_index = fi[n]; - - return TT_Err_Ok; - } - } - - return TTO_Err_Not_Covered; - } - - - /* The next three functions return a null-terminated list */ - - EXPORT_FUNC - TT_Error TT_GPOS_Query_Scripts( TTO_GPOSHeader* gpos, - TT_ULong** script_tag_list ) - { - UShort n; - TT_Error error; - ULong* stl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - - - if ( !gpos || !script_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - if ( ALLOC_ARRAY( stl, sl->ScriptCount + 1, ULong ) ) - return error; - - for ( n = 0; n < sl->ScriptCount; n++ ) - stl[n] = sr[n].ScriptTag; - stl[n] = 0; - - *script_tag_list = stl; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GPOS_Query_Languages( TTO_GPOSHeader* gpos, - TT_UShort script_index, - TT_ULong** language_tag_list ) - { - UShort n; - TT_Error error; - ULong* ltl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - - - if ( !gpos || !language_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, ULong ) ) - return error; - - for ( n = 0; n < s->LangSysCount; n++ ) - ltl[n] = lsr[n].LangSysTag; - ltl[n] = 0; - - *language_tag_list = ltl; - - return TT_Err_Ok; - } - - - /* selecting 0xFFFF for language_index asks for the values of the - default language (DefaultLangSys) */ - - EXPORT_FUNC - TT_Error TT_GPOS_Query_Features( TTO_GPOSHeader* gpos, - TT_UShort script_index, - TT_UShort language_index, - TT_ULong** feature_tag_list ) - { - UShort n; - TT_Error error; - ULong* ftl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - TTO_LangSys* ls; - UShort* fi; - - TTO_FeatureList* fl; - TTO_FeatureRecord* fr; - - - if ( !gpos || !feature_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gpos->ScriptList; - sr = sl->ScriptRecord; - - fl = &gpos->FeatureList; - fr = fl->FeatureRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( language_index == 0xFFFF ) - ls = &s->DefaultLangSys; - else - { - if ( language_index >= s->LangSysCount ) - return TT_Err_Invalid_Argument; - - ls = &lsr[language_index].LangSys; - } - - fi = ls->FeatureIndex; - - if ( ALLOC_ARRAY( ftl, ls->FeatureCount + 1, ULong ) ) - return error; - - for ( n = 0; n < ls->FeatureCount; n++ ) - { - if ( fi[n] >= fl->FeatureCount ) - { - FREE( ftl ); - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - ftl[n] = fr[fi[n]].FeatureTag; - } - ftl[n] = 0; - - *feature_tag_list = ftl; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GPOS_Add_Feature( TTO_GPOSHeader* gpos, - TT_UShort feature_index, - TT_UShort property ) - { - UShort i; - - TTO_Feature feature; - UShort* properties; - UShort* index; - - - if ( !gpos || - feature_index >= gpos->FeatureList.FeatureCount ) - return TT_Err_Invalid_Argument; - - properties = gpos->LookupList.Properties; - - feature = gpos->FeatureList.FeatureRecord[feature_index].Feature; - index = feature.LookupListIndex; - - for ( i = 0; i < feature.LookupListCount; i++ ) - properties[index[i]] |= property; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GPOS_Clear_Features( TTO_GPOSHeader* gpos ) - { - UShort i; - - UShort* properties; - - - if ( !gpos ) - return TT_Err_Invalid_Argument; - - properties = gpos->LookupList.Properties; - - for ( i = 0; i < gpos->LookupList.LookupCount; i++ ) - properties[i] = 0; - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgpos.h diff -u xc/extras/FreeType/lib/extend/ftxgpos.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxgpos.h:removed --- xc/extras/FreeType/lib/extend/ftxgpos.h:1.1.1.3 Sat Feb 12 23:56:05 2000 +++ xc/extras/FreeType/lib/extend/ftxgpos.h Wed Mar 16 20:59:45 2005 @@ -1,767 +0,0 @@ -/******************************************************************* - * - * ftxgpos.h - * - * TrueType Open GPOS table support - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FTXOPEN_H -#error "Don't include this file! Use ftxopen.h instead." -#endif - -#ifndef FTXGPOS_H -#define FTXGPOS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define TTO_Err_Invalid_GPOS_SubTable_Format 0x1020 -#define TTO_Err_Invalid_GPOS_SubTable 0x1021 - - -/* Lookup types for glyph positioning */ - -#define GPOS_LOOKUP_SINGLE 1 -#define GPOS_LOOKUP_PAIR 2 -#define GPOS_LOOKUP_CURSIVE 3 -#define GPOS_LOOKUP_MARKBASE 4 -#define GPOS_LOOKUP_MARKLIG 5 -#define GPOS_LOOKUP_MARKMARK 6 -#define GPOS_LOOKUP_CONTEXT 7 -#define GPOS_LOOKUP_CHAIN 8 - - - struct TTO_GPOSHeader_ - { - TT_Bool loaded; - TT_ULong offset; - - TT_Fixed Version; - - TTO_ScriptList ScriptList; - TTO_FeatureList FeatureList; - TTO_LookupList LookupList; - - TTO_GDEFHeader* gdef; - }; - - typedef struct TTO_GPOSHeader_ TTO_GPOSHeader; - - - /* shared tables */ - - struct TTO_ValueRecord_ - { - TT_Short XPlacement; /* horizontal adjustment for - placement */ - TT_Short YPlacement; /* vertical adjustment for - placement */ - TT_Short XAdvance; /* horizontal adjustment for - advance */ - TT_Short YAdvance; /* vertical adjustment for - advance */ - TTO_Device XPlacementDevice; /* device table for horizontal - placement */ - TTO_Device YPlacementDevice; /* device table for vertical - placement */ - TTO_Device XAdvanceDevice; /* device table for horizontal - advance */ - TTO_Device YAdvanceDevice; /* device table for vertical - advance */ - TT_UShort XIdPlacement; /* horizontal placement metric ID */ - TT_UShort YIdPlacement; /* vertical placement metric ID */ - TT_UShort XIdAdvance; /* horizontal advance metric ID */ - TT_UShort YIdAdvance; /* vertical advance metric ID */ - }; - - typedef struct TTO_ValueRecord_ TTO_ValueRecord; - - -/* Mask values to scan the value format of the ValueRecord structure. - We always expand compressed ValueRecords of the font. */ - -#define HAVE_X_PLACEMENT 0x0001 -#define HAVE_Y_PLACEMENT 0x0002 -#define HAVE_X_ADVANCE 0x0004 -#define HAVE_Y_ADVANCE 0x0008 -#define HAVE_X_PLACEMENT_DEVICE 0x0010 -#define HAVE_Y_PLACEMENT_DEVICE 0x0020 -#define HAVE_X_ADVANCE_DEVICE 0x0040 -#define HAVE_Y_ADVANCE_DEVICE 0x0080 -#define HAVE_X_ID_PLACEMENT 0x0100 -#define HAVE_Y_ID_PLACEMENT 0x0200 -#define HAVE_X_ID_ADVANCE 0x0400 -#define HAVE_Y_ID_ADVANCE 0x0800 - - - struct TTO_AnchorFormat1_ - { - TT_Short XCoordinate; /* horizontal value */ - TT_Short YCoordinate; /* vertical value */ - }; - - typedef struct TTO_AnchorFormat1_ TTO_AnchorFormat1; - - - struct TTO_AnchorFormat2_ - { - TT_Short XCoordinate; /* horizontal value */ - TT_Short YCoordinate; /* vertical value */ - TT_UShort AnchorPoint; /* index to glyph contour point */ - }; - - typedef struct TTO_AnchorFormat2_ TTO_AnchorFormat2; - - - struct TTO_AnchorFormat3_ - { - TT_Short XCoordinate; /* horizontal value */ - TT_Short YCoordinate; /* vertical value */ - TTO_Device XDeviceTable; /* device table for X coordinate */ - TTO_Device YDeviceTable; /* device table for Y coordinate */ - }; - - typedef struct TTO_AnchorFormat3_ TTO_AnchorFormat3; - - - struct TTO_AnchorFormat4_ - { - TT_UShort XIdAnchor; /* horizontal metric ID */ - TT_UShort YIdAnchor; /* vertical metric ID */ - }; - - typedef struct TTO_AnchorFormat4_ TTO_AnchorFormat4; - - - struct TTO_Anchor_ - { - TT_UShort PosFormat; /* 1, 2, 3, or 4 -- 0 indicates - that there is no Anchor table */ - - union - { - TTO_AnchorFormat1 af1; - TTO_AnchorFormat2 af2; - TTO_AnchorFormat3 af3; - TTO_AnchorFormat4 af4; - } af; - }; - - typedef struct TTO_Anchor_ TTO_Anchor; - - - struct TTO_MarkRecord_ - { - TT_UShort Class; /* mark class */ - TTO_Anchor MarkAnchor; /* anchor table */ - }; - - typedef struct TTO_MarkRecord_ TTO_MarkRecord; - - - struct TTO_MarkArray_ - { - TT_UShort MarkCount; /* number of MarkRecord tables */ - TTO_MarkRecord* MarkRecord; /* array of MarkRecord tables */ - }; - - typedef struct TTO_MarkArray_ TTO_MarkArray; - - - /* LookupType 1 */ - - struct TTO_SinglePosFormat1_ - { - TTO_ValueRecord Value; /* ValueRecord for all covered - glyphs */ - }; - - typedef struct TTO_SinglePosFormat1_ TTO_SinglePosFormat1; - - - struct TTO_SinglePosFormat2_ - { - TT_UShort ValueCount; /* number of ValueRecord tables */ - TTO_ValueRecord* Value; /* array of ValueRecord tables */ - }; - - typedef struct TTO_SinglePosFormat2_ TTO_SinglePosFormat2; - - - struct TTO_SinglePos_ - { - TT_UShort PosFormat; /* 1 or 2 */ - TTO_Coverage Coverage; /* Coverage table */ - - TT_UShort ValueFormat; /* format of ValueRecord table */ - - union - { - TTO_SinglePosFormat1 spf1; - TTO_SinglePosFormat2 spf2; - } spf; - }; - - typedef struct TTO_SinglePos_ TTO_SinglePos; - - - /* LookupType 2 */ - - struct TTO_PairValueRecord_ - { - TT_UShort SecondGlyph; /* glyph ID for second glyph */ - TTO_ValueRecord Value1; /* pos. data for first glyph */ - TTO_ValueRecord Value2; /* pos. data for second glyph */ - }; - - typedef struct TTO_PairValueRecord_ TTO_PairValueRecord; - - - struct TTO_PairSet_ - { - TT_UShort PairValueCount; - /* number of PairValueRecord tables */ - TTO_PairValueRecord* PairValueRecord; - /* array of PairValueRecord tables */ - }; - - typedef struct TTO_PairSet_ TTO_PairSet; - - - struct TTO_PairPosFormat1_ - { - TT_UShort PairSetCount; /* number of PairSet tables */ - TTO_PairSet* PairSet; /* array of PairSet tables */ - }; - - typedef struct TTO_PairPosFormat1_ TTO_PairPosFormat1; - - - struct TTO_Class2Record_ - { - TTO_ValueRecord Value1; /* pos. data for first glyph */ - TTO_ValueRecord Value2; /* pos. data for second glyph */ - }; - - typedef struct TTO_Class2Record_ TTO_Class2Record; - - - struct TTO_Class1Record_ - { - TTO_Class2Record* Class2Record; /* array of Class2Record tables */ - }; - - typedef struct TTO_Class1Record_ TTO_Class1Record; - - - struct TTO_PairPosFormat2_ - { - TTO_ClassDefinition ClassDef1; /* class def. for first glyph */ - TTO_ClassDefinition ClassDef2; /* class def. for second glyph */ - TT_UShort Class1Count; /* number of classes in ClassDef1 - table */ - TT_UShort Class2Count; /* number of classes in ClassDef2 - table */ - TTO_Class1Record* Class1Record; /* array of Class1Record tables */ - }; - - typedef struct TTO_PairPosFormat2_ TTO_PairPosFormat2; - - - struct TTO_PairPos_ - { - TT_UShort PosFormat; /* 1 or 2 */ - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort ValueFormat1; /* format of ValueRecord table - for first glyph */ - TT_UShort ValueFormat2; /* format of ValueRecord table - for second glyph */ - - union - { - TTO_PairPosFormat1 ppf1; - TTO_PairPosFormat2 ppf2; - } ppf; - }; - - typedef struct TTO_PairPos_ TTO_PairPos; - - - /* LookupType 3 */ - - struct TTO_EntryExitRecord_ - { - TTO_Anchor EntryAnchor; /* entry Anchor table */ - TTO_Anchor ExitAnchor; /* exit Anchor table */ - }; - - - typedef struct TTO_EntryExitRecord_ TTO_EntryExitRecord; - - struct TTO_CursivePos_ - { - TT_UShort PosFormat; /* always 1 */ - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort EntryExitCount; - /* number of EntryExitRecord tables */ - TTO_EntryExitRecord* EntryExitRecord; - /* array of EntryExitRecord tables */ - }; - - typedef struct TTO_CursivePos_ TTO_CursivePos; - - - /* LookupType 4 */ - - struct TTO_BaseRecord_ - { - TTO_Anchor* BaseAnchor; /* array of base glyph anchor - tables */ - }; - - typedef struct TTO_BaseRecord_ TTO_BaseRecord; - - - struct TTO_BaseArray_ - { - TT_UShort BaseCount; /* number of BaseRecord tables */ - TTO_BaseRecord* BaseRecord; /* array of BaseRecord tables */ - }; - - typedef struct TTO_BaseArray_ TTO_BaseArray; - - - struct TTO_MarkBasePos_ - { - TT_UShort PosFormat; /* always 1 */ - TTO_Coverage MarkCoverage; /* mark glyph coverage table */ - TTO_Coverage BaseCoverage; /* base glyph coverage table */ - TT_UShort ClassCount; /* number of mark classes */ - TTO_MarkArray MarkArray; /* mark array table */ - TTO_BaseArray BaseArray; /* base array table */ - }; - - typedef struct TTO_MarkBasePos_ TTO_MarkBasePos; - - - /* LookupType 5 */ - - struct TTO_ComponentRecord_ - { - TTO_Anchor* LigatureAnchor; /* array of ligature glyph anchor - tables */ - }; - - typedef struct TTO_ComponentRecord_ TTO_ComponentRecord; - - - struct TTO_LigatureAttach_ - { - TT_UShort ComponentCount; - /* number of ComponentRecord tables */ - TTO_ComponentRecord* ComponentRecord; - /* array of ComponentRecord tables */ - }; - - typedef struct TTO_LigatureAttach_ TTO_LigatureAttach; - - - struct TTO_LigatureArray_ - { - TT_UShort LigatureCount; /* number of LigatureAttach tables */ - TTO_LigatureAttach* LigatureAttach; - /* array of LigatureAttach tables */ - }; - - typedef struct TTO_LigatureArray_ TTO_LigatureArray; - - - struct TTO_MarkLigPos_ - { - TT_UShort PosFormat; /* always 1 */ - TTO_Coverage MarkCoverage; /* mark glyph coverage table */ - TTO_Coverage LigatureCoverage; - /* ligature glyph coverage table */ - TT_UShort ClassCount; /* number of mark classes */ - TTO_MarkArray MarkArray; /* mark array table */ - TTO_LigatureArray LigatureArray; /* ligature array table */ - }; - - typedef struct TTO_MarkLigPos_ TTO_MarkLigPos; - - - /* LookupType 6 */ - - struct TTO_Mark2Record_ - { - TTO_Anchor* Mark2Anchor; /* array of mark glyph anchor - tables */ - }; - - typedef struct TTO_Mark2Record_ TTO_Mark2Record; - - - struct TTO_Mark2Array_ - { - TT_UShort Mark2Count; /* number of Mark2Record tables */ - TTO_Mark2Record* Mark2Record; /* array of Mark2Record tables */ - }; - - typedef struct TTO_Mark2Array_ TTO_Mark2Array; - - - struct TTO_MarkMarkPos_ - { - TT_UShort PosFormat; /* always 1 */ - TTO_Coverage Mark1Coverage; /* first mark glyph coverage table */ - TTO_Coverage Mark2Coverage; /* second mark glyph coverave table */ - TT_UShort ClassCount; /* number of combining mark classes */ - TTO_MarkArray Mark1Array; /* MarkArray table for first mark */ - TTO_Mark2Array Mark2Array; /* MarkArray table for second mark */ - }; - - typedef struct TTO_MarkMarkPos_ TTO_MarkMarkPos; - - - /* needed by both lookup type 7 and 8 */ - - struct TTO_PosLookupRecord_ - { - TT_UShort SequenceIndex; /* index into current - glyph sequence */ - TT_UShort LookupListIndex; /* Lookup to apply to that pos. */ - }; - - typedef struct TTO_PosLookupRecord_ TTO_PosLookupRecord; - - - /* LookupType 7 */ - - struct TTO_PosRule_ - { - TT_UShort GlyphCount; /* total number of input glyphs */ - TT_UShort PosCount; /* number of PosLookupRecord tables */ - TT_UShort* Input; /* array of input glyph IDs */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of PosLookupRecord tables */ - }; - - typedef struct TTO_PosRule_ TTO_PosRule; - - - struct TTO_PosRuleSet_ - { - TT_UShort PosRuleCount; /* number of PosRule tables */ - TTO_PosRule* PosRule; /* array of PosRule tables */ - }; - - typedef struct TTO_PosRuleSet_ TTO_PosRuleSet; - - - struct TTO_ContextPosFormat1_ - { - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort PosRuleSetCount; /* number of PosRuleSet tables */ - TTO_PosRuleSet* PosRuleSet; /* array of PosRuleSet tables */ - }; - - typedef struct TTO_ContextPosFormat1_ TTO_ContextPosFormat1; - - - struct TTO_PosClassRule_ - { - TT_UShort GlyphCount; /* total number of context classes */ - TT_UShort PosCount; /* number of PosLookupRecord tables */ - TT_UShort* Class; /* array of classes */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of PosLookupRecord tables */ - }; - - typedef struct TTO_PosClassRule_ TTO_PosClassRule; - - - struct TTO_PosClassSet_ - { - TT_UShort PosClassRuleCount; - /* number of PosClassRule tables */ - TTO_PosClassRule* PosClassRule; /* array of PosClassRule tables */ - }; - - typedef struct TTO_PosClassSet_ TTO_PosClassSet; - - - /* The `MaxContextLength' field is not defined in the TTO specification - but simplifies the implementation of this format. It holds the - maximal context length used in the context rules. */ - - struct TTO_ContextPosFormat2_ - { - TT_UShort MaxContextLength; - /* maximal context length */ - TTO_Coverage Coverage; /* Coverage table */ - TTO_ClassDefinition ClassDef; /* ClassDef table */ - TT_UShort PosClassSetCount; - /* number of PosClassSet tables */ - TTO_PosClassSet* PosClassSet; /* array of PosClassSet tables */ - }; - - typedef struct TTO_ContextPosFormat2_ TTO_ContextPosFormat2; - - - struct TTO_ContextPosFormat3_ - { - TT_UShort GlyphCount; /* number of input glyphs */ - TT_UShort PosCount; /* number of PosLookupRecord tables */ - TTO_Coverage* Coverage; /* array of Coverage tables */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of PosLookupRecord tables */ - }; - - typedef struct TTO_ContextPosFormat3_ TTO_ContextPosFormat3; - - - struct TTO_ContextPos_ - { - TT_UShort PosFormat; /* 1, 2, or 3 */ - - union - { - TTO_ContextPosFormat1 cpf1; - TTO_ContextPosFormat2 cpf2; - TTO_ContextPosFormat3 cpf3; - } cpf; - }; - - typedef struct TTO_ContextPos_ TTO_ContextPos; - - - /* LookupType 8 */ - - struct TTO_ChainPosRule_ - { - TT_UShort BacktrackGlyphCount; - /* total number of backtrack glyphs */ - TT_UShort* Backtrack; /* array of backtrack glyph IDs */ - TT_UShort InputGlyphCount; - /* total number of input glyphs */ - TT_UShort* Input; /* array of input glyph IDs */ - TT_UShort LookaheadGlyphCount; - /* total number of lookahead glyphs */ - TT_UShort* Lookahead; /* array of lookahead glyph IDs */ - TT_UShort PosCount; /* number of PosLookupRecords */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of PosLookupRecords */ - }; - - typedef struct TTO_ChainPosRule_ TTO_ChainPosRule; - - - struct TTO_ChainPosRuleSet_ - { - TT_UShort ChainPosRuleCount; - /* number of ChainPosRule tables */ - TTO_ChainPosRule* ChainPosRule; /* array of ChainPosRule tables */ - }; - - typedef struct TTO_ChainPosRuleSet_ TTO_ChainPosRuleSet; - - - struct TTO_ChainContextPosFormat1_ - { - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort ChainPosRuleSetCount; - /* number of ChainPosRuleSet tables */ - TTO_ChainPosRuleSet* ChainPosRuleSet; - /* array of ChainPosRuleSet tables */ - }; - - typedef struct TTO_ChainContextPosFormat1_ TTO_ChainContextPosFormat1; - - - struct TTO_ChainPosClassRule_ - { - TT_UShort BacktrackGlyphCount; - /* total number of backtrack - classes */ - TT_UShort* Backtrack; /* array of backtrack classes */ - TT_UShort InputGlyphCount; - /* total number of context classes */ - TT_UShort* Input; /* array of context classes */ - TT_UShort LookaheadGlyphCount; - /* total number of lookahead - classes */ - TT_UShort* Lookahead; /* array of lookahead classes */ - TT_UShort PosCount; /* number of PosLookupRecords */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of substitution lookups */ - }; - - typedef struct TTO_ChainPosClassRule_ TTO_ChainPosClassRule; - - - struct TTO_ChainPosClassSet_ - { - TT_UShort ChainPosClassRuleCount; - /* number of ChainPosClassRule - tables */ - TTO_ChainPosClassRule* ChainPosClassRule; - /* array of ChainPosClassRule - tables */ - }; - - typedef struct TTO_ChainPosClassSet_ TTO_ChainPosClassSet; - - - /* The `MaxXXXLength' fields are not defined in the TTO specification - but simplifies the implementation of this format. It holds the - maximal context length used in the specific context rules. */ - - struct TTO_ChainContextPosFormat2_ - { - TTO_Coverage Coverage; /* Coverage table */ - - TT_UShort MaxBacktrackLength; - /* maximal backtrack length */ - TTO_ClassDefinition BacktrackClassDef; - /* BacktrackClassDef table */ - TT_UShort MaxInputLength; - /* maximal input length */ - TTO_ClassDefinition InputClassDef; - /* InputClassDef table */ - TT_UShort MaxLookaheadLength; - /* maximal lookahead length */ - TTO_ClassDefinition LookaheadClassDef; - /* LookaheadClassDef table */ - - TT_UShort ChainPosClassSetCount; - /* number of ChainPosClassSet - tables */ - TTO_ChainPosClassSet* ChainPosClassSet; - /* array of ChainPosClassSet - tables */ - }; - - typedef struct TTO_ChainContextPosFormat2_ TTO_ChainContextPosFormat2; - - - struct TTO_ChainContextPosFormat3_ - { - TT_UShort BacktrackGlyphCount; - /* number of backtrack glyphs */ - TTO_Coverage* BacktrackCoverage; - /* array of backtrack Coverage - tables */ - TT_UShort InputGlyphCount; - /* number of input glyphs */ - TTO_Coverage* InputCoverage; - /* array of input coverage - tables */ - TT_UShort LookaheadGlyphCount; - /* number of lookahead glyphs */ - TTO_Coverage* LookaheadCoverage; - /* array of lookahead coverage - tables */ - TT_UShort PosCount; /* number of PosLookupRecords */ - TTO_PosLookupRecord* PosLookupRecord; - /* array of substitution lookups */ - }; - - typedef struct TTO_ChainContextPosFormat3_ TTO_ChainContextPosFormat3; - - - struct TTO_ChainContextPos_ - { - TT_UShort PosFormat; /* 1, 2, or 3 */ - - union - { - TTO_ChainContextPosFormat1 ccpf1; - TTO_ChainContextPosFormat2 ccpf2; - TTO_ChainContextPosFormat3 ccpf3; - } ccpf; - }; - - typedef struct TTO_ChainContextPos_ TTO_ChainContextPos; - - - union TTO_GPOS_SubTable_ - { - TTO_SinglePos single; - TTO_PairPos pair; - TTO_CursivePos cursive; - TTO_MarkBasePos markbase; - TTO_MarkLigPos marklig; - TTO_MarkMarkPos markmark; - TTO_ContextPos context; - TTO_ChainContextPos chain; - }; - - typedef union TTO_GPOS_SubTable_ TTO_GPOS_SubTable; - - - /* finally, the GPOS API */ - - EXPORT_DEF - TT_Error TT_Init_GPOS_Extension( TT_Engine engine ); - - EXPORT_DEF - TT_Error TT_Load_GPOS_Table( TT_Face face, - TTO_GPOSHeader* gpos, - TTO_GDEFHeader* gdef ); - - EXPORT_DEF - TT_Error TT_GPOS_Select_Script( TTO_GPOSHeader* gpos, - TT_ULong script_tag, - TT_UShort* script_index ); - EXPORT_DEF - TT_Error TT_GPOS_Select_Language( TTO_GPOSHeader* gpos, - TT_ULong language_tag, - TT_UShort script_index, - TT_UShort* language_index, - TT_UShort* req_feature_index ); - EXPORT_DEF - TT_Error TT_GPOS_Select_Feature( TTO_GPOSHeader* gpos, - TT_ULong feature_tag, - TT_UShort script_index, - TT_UShort language_index, - TT_UShort* feature_index ); - - EXPORT_DEF - TT_Error TT_GPOS_Query_Scripts( TTO_GPOSHeader* gpos, - TT_ULong** script_tag_list ); - EXPORT_DEF - TT_Error TT_GPOS_Query_Languages( TTO_GPOSHeader* gpos, - TT_UShort script_index, - TT_ULong** language_tag_list ); - EXPORT_DEF - TT_Error TT_GPOS_Query_Features( TTO_GPOSHeader* gpos, - TT_UShort script_index, - TT_UShort language_index, - TT_ULong** feature_tag_list ); - - EXPORT_DEF - TT_Error TT_GPOS_Add_Feature( TTO_GPOSHeader* gpos, - TT_UShort feature_index, - TT_UShort property ); - EXPORT_DEF - TT_Error TT_GPOS_Clear_Features( TTO_GPOSHeader* gpos ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXGPOS_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgsub.c diff -u xc/extras/FreeType/lib/extend/ftxgsub.c:1.1.1.3 xc/extras/FreeType/lib/extend/ftxgsub.c:removed --- xc/extras/FreeType/lib/extend/ftxgsub.c:1.1.1.3 Sat Feb 12 23:56:05 2000 +++ xc/extras/FreeType/lib/extend/ftxgsub.c Wed Mar 16 20:59:45 2005 @@ -1,4307 +0,0 @@ -/******************************************************************* - * - * ftxgsub.c - * - * TrueType Open GSUB table support. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -/* XXX There is *a lot* of duplicated code (cf. formats 5 and 6), but - I don't care currently. I believe that it would be possible to - save about 50% of TTO code by carefully designing the structures, - sharing as much as possible with extensive use of macros. This - is something for a volunteer :-) */ - -#include "tttypes.h" -#include "tttags.h" -#include "ttload.h" -#include "ttextend.h" -#include "ttmemory.h" -#include "ttfile.h" - -#include "ftxopen.h" -#include "ftxopenf.h" - - -#define GSUB_ID Build_Extension_ID( 'G', 'S', 'U', 'B' ) - - -#define ADD_String( in, num_in, out, num_out, data ) \ - ( ( error = TT_GSUB_Add_String( (in), (num_in), \ - (out), (num_out), \ - (data) ) ) != TT_Err_Ok ) - -#define CHECK_Property( gdef, index, flags, property ) \ - ( ( error = Check_Property( (gdef), (index), (flags), \ - (property) ) ) != TT_Err_Ok ) - - - static TT_Error Do_Glyph_Lookup( TTO_GSUBHeader* gsub, - UShort lookup_index, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort context_length, - int nesting_level ); - - - - /********************** - * Auxiliary functions - **********************/ - - - /* The following function copies `num_out' elements from `data' to - `out', advancing the array pointer in the `in' structure by `num_in' - elements and in `out' by `num_out' elements. If the string (resp. - the properties) array in `out' is empty or too small, it allocates - resp. reallocates the string (and properties) array. Finally, it - sets the `length' field of `out' equal to `pos' of the `out' - structure. - - The properties (if defined) for all replaced glyphs are taken from - the glyph at position `in->pos'. */ - - EXPORT_FUNC - TT_Error TT_GSUB_Add_String( TTO_GSUB_String* in, - UShort num_in, - TTO_GSUB_String* out, - UShort num_out, - UShort* data ) - { - TT_Error error; - UShort i; - UShort p_in; - UShort* p_out; - - - /* sanity check */ - - if ( !in || !out || - in->length == 0 || in->pos >= in->length || - in->length < in->pos + num_in ) - return TT_Err_Invalid_Argument; - - if ( out->pos + num_out >= out->allocated ) - { - ULong size = out->pos + num_out + 256L; - - - /* The following works because all fields in `out' must be - initialized to zero (including the `string' field) for the - first use. */ - - if ( REALLOC( out->string, size * sizeof ( UShort ) ) ) - return error; - if ( in->properties ) - if ( REALLOC( out->properties, size * sizeof ( UShort ) ) ) - return error; - out->allocated = size; - } - - if ( num_out ) - { - MEM_Copy( &out->string[out->pos], data, num_out * sizeof ( UShort ) ); - if ( in->properties ) - { - p_in = in->properties[in->pos]; - p_out = out->properties; - - for ( i = out->pos; i < out->pos + num_out; i++ ) - p_out[i] = p_in; - } - } - - in->pos += num_in; - out->pos += num_out; - - out->length = out->pos; - - return TT_Err_Ok; - } - - - static TT_Error Check_Property( TTO_GDEFHeader* gdef, - UShort index, - UShort flags, - UShort* property ) - { - TT_Error error; - - - if ( gdef ) - { - error = TT_GDEF_Get_Glyph_Property( gdef, index, property ); - if ( error ) - return error; - - /* This is OpenType 1.2 */ - - if ( flags & IGNORE_SPECIAL_MARKS ) - if ( (flags & 0xFF00) != *property ) - return TTO_Err_Not_Covered; - - if ( flags & *property ) - return TTO_Err_Not_Covered; - } - - return TT_Err_Ok; - } - - - - /********************** - * Extension Functions - **********************/ - - - static TT_Error GSUB_Create( void* ext, - PFace face ) - { - DEFINE_LOAD_LOCALS( face->stream ); - - TTO_GSUBHeader* gsub = (TTO_GSUBHeader*)ext; - Long table; - - - /* by convention */ - - if ( !gsub ) - return TT_Err_Ok; - - /* a null offset indicates that there is no GSUB table */ - - gsub->offset = 0; - - /* we store the start offset and the size of the subtable */ - - table = TT_LookUp_Table( face, TTAG_GSUB ); - if ( table < 0 ) - return TT_Err_Ok; /* The table is optional */ - - if ( FILE_Seek( face->dirTables[table].Offset ) || - ACCESS_Frame( 4L ) ) - return error; - - gsub->offset = FILE_Pos() - 4L; /* undo ACCESS_Frame() */ - gsub->Version = GET_ULong(); - - FORGET_Frame(); - - gsub->loaded = FALSE; - - return TT_Err_Ok; - } - - - static TT_Error GSUB_Destroy( void* ext, - PFace face ) - { - TTO_GSUBHeader* gsub = (TTO_GSUBHeader*)ext; - - - /* by convention */ - - if ( !gsub ) - return TT_Err_Ok; - - if ( gsub->loaded ) - { - Free_LookupList( &gsub->LookupList, GSUB ); - Free_FeatureList( &gsub->FeatureList ); - Free_ScriptList( &gsub->ScriptList ); - } - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_Init_GSUB_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - return TT_Register_Extension( _engine, - GSUB_ID, - sizeof ( TTO_GSUBHeader ), - GSUB_Create, - GSUB_Destroy ); - } - - - EXPORT_FUNC - TT_Error TT_Load_GSUB_Table( TT_Face face, - TTO_GSUBHeader* retptr, - TTO_GDEFHeader* gdef ) - { - ULong cur_offset, new_offset, base_offset; - - TT_UShort i, num_lookups; - TT_Error error; - TT_Stream stream; - TTO_GSUBHeader* gsub; - TTO_Lookup* lo; - - PFace faze = HANDLE_Face( face ); - - - if ( !retptr ) - return TT_Err_Invalid_Argument; - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - error = TT_Extension_Get( faze, GSUB_ID, (void**)&gsub ); - if ( error ) - return error; - - if ( gsub->offset == 0 ) - return TT_Err_Table_Missing; /* no GSUB table; nothing to do */ - - /* now access stream */ - - if ( USE_Stream( faze->stream, stream ) ) - return error; - - base_offset = gsub->offset; - - /* skip version */ - - if ( FILE_Seek( base_offset + 4L ) || - ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ScriptList( &gsub->ScriptList, - faze ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_FeatureList( &gsub->FeatureList, - faze ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LookupList( &gsub->LookupList, - faze, GSUB ) ) != TT_Err_Ok ) - goto Fail2; - - gsub->gdef = gdef; /* can be NULL */ - - /* We now check the LookupFlags for values larger than 0xFF to find - out whether we need to load the `MarkAttachClassDef' field of the - GDEF table -- this hack is necessary for OpenType 1.2 tables since - the version field of the GDEF table hasn't been incremented. - - For constructed GDEF tables, we only load it if - `MarkAttachClassDef_offset' is not zero (nevertheless, a build of - a constructed mark attach table is not supported currently). */ - - if ( gdef && - gdef->MarkAttachClassDef_offset && !gdef->MarkAttachClassDef.loaded ) - { - lo = gsub->LookupList.Lookup; - num_lookups = gsub->LookupList.LookupCount; - - for ( i = 0; i < num_lookups; i++ ) - { - if ( lo[i].LookupFlag & IGNORE_SPECIAL_MARKS ) - { - if ( FILE_Seek( gdef->MarkAttachClassDef_offset ) || - ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort(); - - FORGET_Frame(); - - if ( !new_offset ) - return TTO_Err_Invalid_GDEF_SubTable; - - new_offset += base_offset; - - if ( FILE_Seek( new_offset ) || - ( error = Load_ClassDefinition( &gdef->MarkAttachClassDef, - 256, faze ) ) != TT_Err_Ok ) - goto Fail1; - - break; - } - } - } - - gsub->loaded = TRUE; - *retptr = *gsub; - DONE_Stream( stream ); - - return TT_Err_Ok; - - Fail1: - Free_LookupList( &gsub->LookupList, GSUB ); - - Fail2: - Free_FeatureList( &gsub->FeatureList ); - - Fail3: - Free_ScriptList( &gsub->ScriptList ); - - /* release stream */ - - DONE_Stream( stream ); - - return error; - } - - - - /***************************** - * SubTable related functions - *****************************/ - - - /* LookupType 1 */ - - /* SingleSubstFormat1 */ - /* SingleSubstFormat2 */ - - TT_Error Load_SingleSubst( TTO_SingleSubst* ss, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - UShort* s; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - ss->SubstFormat = GET_UShort(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ss->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - switch ( ss->SubstFormat ) - { - case 1: - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - ss->ssf.ssf1.DeltaGlyphID = GET_UShort(); - - FORGET_Frame(); - - break; - - case 2: - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = ss->ssf.ssf2.GlyphCount = GET_UShort(); - - FORGET_Frame(); - - ss->ssf.ssf2.Substitute = NULL; - - if ( ALLOC_ARRAY( ss->ssf.ssf2.Substitute, count, UShort ) ) - goto Fail2; - - s = ss->ssf.ssf2.Substitute; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - s[n] = GET_UShort(); - - FORGET_Frame(); - - break; - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - - return TT_Err_Ok; - - Fail1: - FREE( s ); - - Fail2: - Free_Coverage( &ss->Coverage ); - return error; - } - - - void Free_SingleSubst( TTO_SingleSubst* ss ) - { - switch ( ss->SubstFormat ) - { - case 1: - break; - - case 2: - FREE( ss->ssf.ssf2.Substitute ); - break; - } - - Free_Coverage( &ss->Coverage ); - } - - - static TT_Error Lookup_SingleSubst( TTO_SingleSubst* ss, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - TTO_GDEFHeader* gdef ) - { - UShort index, value[1], property; - TT_Error error; - - - if ( context_length != 0xFFFF && context_length < 1 ) - return TTO_Err_Not_Covered; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &ss->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - switch ( ss->SubstFormat ) - { - case 1: - value[0] = ( in->string[in->pos] + ss->ssf.ssf1.DeltaGlyphID ) & 0xFFFF; - if ( ADD_String( in, 1, out, 1, value ) ) - return error; - break; - - case 2: - if ( index >= ss->ssf.ssf2.GlyphCount ) - return TTO_Err_Invalid_GSUB_SubTable; - value[0] = ss->ssf.ssf2.Substitute[index]; - if ( ADD_String( in, 1, out, 1, value ) ) - return error; - break; - - default: - return TTO_Err_Invalid_GSUB_SubTable; - } - - if ( gdef && gdef->NewGlyphClasses ) - { - /* we inherit the old glyph class to the substituted glyph */ - - error = Add_Glyph_Property( gdef, value[0], property ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - } - - return TT_Err_Ok; - } - - - /* LookupType 2 */ - - /* Sequence */ - - static TT_Error Load_Sequence( TTO_Sequence* s, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* sub; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = s->GlyphCount = GET_UShort(); - - FORGET_Frame(); - - s->Substitute = NULL; - - if ( count ) - { - if ( ALLOC_ARRAY( s->Substitute, count, UShort ) ) - return error; - - sub = s->Substitute; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( sub ); - return error; - } - - for ( n = 0; n < count; n++ ) - sub[n] = GET_UShort(); - - FORGET_Frame(); - } - - return TT_Err_Ok; - } - - - static void Free_Sequence( TTO_Sequence* s ) - { - FREE( s->Substitute ); - } - - - /* MultipleSubstFormat1 */ - - TT_Error Load_MultipleSubst( TTO_MultipleSubst* ms, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Sequence* s; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - ms->SubstFormat = GET_UShort(); /* should be 1 */ - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ms->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = ms->SequenceCount = GET_UShort(); - - FORGET_Frame(); - - ms->Sequence = NULL; - - if ( ALLOC_ARRAY( ms->Sequence, count, TTO_Sequence ) ) - goto Fail2; - - s = ms->Sequence; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Sequence( &s[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_Sequence( &s[n] ); - - FREE( s ); - - Fail2: - Free_Coverage( &ms->Coverage ); - return error; - } - - - void Free_MultipleSubst( TTO_MultipleSubst* ms ) - { - UShort n, count; - - TTO_Sequence* s; - - - if ( ms->Sequence ) - { - count = ms->SequenceCount; - s = ms->Sequence; - - for ( n = 0; n < count; n++ ) - Free_Sequence( &s[n] ); - - FREE( s ); - } - - Free_Coverage( &ms->Coverage ); - } - - - static TT_Error Lookup_MultipleSubst( TTO_MultipleSubst* ms, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - TTO_GDEFHeader* gdef ) - { - TT_Error error; - UShort index, property, n, count; - UShort* s; - - - if ( context_length != 0xFFFF && context_length < 1 ) - return TTO_Err_Not_Covered; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &ms->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - if ( index >= ms->SequenceCount ) - return TTO_Err_Invalid_GSUB_SubTable; - - count = ms->Sequence[index].GlyphCount; - s = ms->Sequence[index].Substitute; - - if ( ADD_String( in, 1, out, count, s ) ) - return error; - - if ( gdef && gdef->NewGlyphClasses ) - { - /* this is a guess only ... */ - - if ( property == TTO_LIGATURE ) - property = TTO_BASE_GLYPH; - - for ( n = 0; n < count; n++ ) - { - error = Add_Glyph_Property( gdef, s[n], property ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - } - } - - return TT_Err_Ok; - } - - - /* LookupType 3 */ - - /* AlternateSet */ - - static TT_Error Load_AlternateSet( TTO_AlternateSet* as, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* a; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = as->GlyphCount = GET_UShort(); - - FORGET_Frame(); - - as->Alternate = NULL; - - if ( ALLOC_ARRAY( as->Alternate, count, UShort ) ) - return error; - - a = as->Alternate; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( a ); - return error; - } - - for ( n = 0; n < count; n++ ) - a[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - static void Free_AlternateSet( TTO_AlternateSet* as ) - { - FREE( as->Alternate ); - } - - - /* AlternateSubstFormat1 */ - - TT_Error Load_AlternateSubst( TTO_AlternateSubst* as, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_AlternateSet* aset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - as->SubstFormat = GET_UShort(); /* should be 1 */ - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &as->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = as->AlternateSetCount = GET_UShort(); - - FORGET_Frame(); - - as->AlternateSet = NULL; - - if ( ALLOC_ARRAY( as->AlternateSet, count, TTO_AlternateSet ) ) - goto Fail2; - - aset = as->AlternateSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_AlternateSet( &aset[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_AlternateSet( &aset[n] ); - - FREE( aset ); - - Fail2: - Free_Coverage( &as->Coverage ); - return error; - } - - - void Free_AlternateSubst( TTO_AlternateSubst* as ) - { - UShort n, count; - - TTO_AlternateSet* aset; - - - if ( as->AlternateSet ) - { - count = as->AlternateSetCount; - aset = as->AlternateSet; - - for ( n = 0; n < count; n++ ) - Free_AlternateSet( &aset[n] ); - - FREE( aset ); - } - - Free_Coverage( &as->Coverage ); - } - - - static TT_Error Lookup_AlternateSubst( TTO_GSUBHeader* gsub, - TTO_AlternateSubst* as, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - TTO_GDEFHeader* gdef ) - { - TT_Error error; - UShort index, alt_index, property; - - TTO_AlternateSet aset; - - - if ( context_length != 0xFFFF && context_length < 1 ) - return TTO_Err_Not_Covered; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &as->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - aset = as->AlternateSet[index]; - - /* we use a user-defined callback function to get the alternate index */ - - if ( gsub->alt ) - alt_index = (gsub->alt)( out->pos, in->string[in->pos], - aset.GlyphCount, aset.Alternate, - gsub->data ); - else - alt_index = 0; - - if ( ADD_String( in, 1, out, 1, &aset.Alternate[alt_index] ) ) - return error; - - if ( gdef && gdef->NewGlyphClasses ) - { - /* we inherit the old glyph class to the substituted glyph */ - - error = Add_Glyph_Property( gdef, aset.Alternate[alt_index], - property ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - } - - return TT_Err_Ok; - } - - - /* LookupType 4 */ - - /* Ligature */ - - static TT_Error Load_Ligature( TTO_Ligature* l, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* c; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - l->LigGlyph = GET_UShort(); - l->ComponentCount = GET_UShort(); - - FORGET_Frame(); - - l->Component = NULL; - - count = l->ComponentCount - 1; /* only ComponentCount - 1 elements */ - - if ( ALLOC_ARRAY( l->Component, count, UShort ) ) - return error; - - c = l->Component; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( c ); - return error; - } - - for ( n = 0; n < count; n++ ) - c[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - static void Free_Ligature( TTO_Ligature* l ) - { - FREE( l->Component ); - } - - - /* LigatureSet */ - - static TT_Error Load_LigatureSet( TTO_LigatureSet* ls, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Ligature* l; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ls->LigatureCount = GET_UShort(); - - FORGET_Frame(); - - ls->Ligature = NULL; - - if ( ALLOC_ARRAY( ls->Ligature, count, TTO_Ligature ) ) - return error; - - l = ls->Ligature; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Ligature( &l[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_Ligature( &l[n] ); - - FREE( l ); - return error; - } - - - static void Free_LigatureSet( TTO_LigatureSet* ls ) - { - UShort n, count; - - TTO_Ligature* l; - - - if ( ls->Ligature ) - { - count = ls->LigatureCount; - l = ls->Ligature; - - for ( n = 0; n < count; n++ ) - Free_Ligature( &l[n] ); - - FREE( l ); - } - } - - - /* LigatureSubstFormat1 */ - - TT_Error Load_LigatureSubst( TTO_LigatureSubst* ls, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_LigatureSet* lset; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 4L ) ) - return error; - - ls->SubstFormat = GET_UShort(); /* should be 1 */ - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ls->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = ls->LigatureSetCount = GET_UShort(); - - FORGET_Frame(); - - ls->LigatureSet = NULL; - - if ( ALLOC_ARRAY( ls->LigatureSet, count, TTO_LigatureSet ) ) - goto Fail2; - - lset = ls->LigatureSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LigatureSet( &lset[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_LigatureSet( &lset[n] ); - - FREE( lset ); - - Fail2: - Free_Coverage( &ls->Coverage ); - return error; - } - - - void Free_LigatureSubst( TTO_LigatureSubst* ls ) - { - UShort n, count; - - TTO_LigatureSet* lset; - - - if ( ls->LigatureSet ) - { - count = ls->LigatureSetCount; - lset = ls->LigatureSet; - - for ( n = 0; n < count; n++ ) - Free_LigatureSet( &lset[n] ); - - FREE( lset ); - } - - Free_Coverage( &ls->Coverage ); - } - - - static TT_Error Lookup_LigatureSubst( TTO_LigatureSubst* ls, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - TTO_GDEFHeader* gdef ) - { - UShort index, property; - TT_Error error; - UShort numlig, i, j; - UShort* s_in; - UShort* c; - - TTO_Ligature* lig; - - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &ls->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - if ( index >= ls->LigatureSetCount ) - return TTO_Err_Invalid_GSUB_SubTable; - - lig = ls->LigatureSet[index].Ligature; - - for ( numlig = ls->LigatureSet[index].LigatureCount; - numlig; - numlig--, lig++ ) - { - if ( in->pos + lig->ComponentCount > in->length ) - continue; /* Not enough glyphs in input */ - - s_in = &in->string[in->pos]; - c = lig->Component; - - if ( context_length != 0xFFFF && context_length < lig->ComponentCount ) - break; - - for ( i = 1, j = 1; i < lig->ComponentCount; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( in->pos + j < in->length ) - j++; - else - break; - } - - if ( s_in[j] != c[i - 1] ) - break; - } - - if ( i == lig->ComponentCount ) - { - if ( ADD_String( in, lig->ComponentCount, out, 1, &lig->LigGlyph ) ) - return error; - - if ( gdef && gdef->NewGlyphClasses ) - { - /* this is just a guess ... */ - - error = Add_Glyph_Property( gdef, lig->LigGlyph, TTO_LIGATURE ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - } - - return TT_Err_Ok; - } - } - - return TTO_Err_Not_Covered; - } - - - /* Do the actual substitution for a context substitution (either format - 5 or 6). This is only called after we've determined that the input - matches the subrule. */ - - static TT_Error Do_ContextSubst( TTO_GSUBHeader* gsub, - UShort GlyphCount, - UShort SubstCount, - TTO_SubstLookupRecord* subst, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - int nesting_level ) - { - TT_Error error; - UShort i, old_pos; - - - i = 0; - - while ( i < GlyphCount ) - { - if ( SubstCount && i == subst->SequenceIndex ) - { - old_pos = in->pos; - - /* Do a substitution */ - - error = Do_Glyph_Lookup( gsub, subst->LookupListIndex, in, out, - GlyphCount, nesting_level ); - - subst++; - SubstCount--; - i += in->pos - old_pos; - - if ( error == TTO_Err_Not_Covered ) - { - /* XXX "can't happen" -- but don't count on it */ - - if ( ADD_String( in, 1, out, 1, &in->string[in->pos] ) ) - return error; - i++; - } - else if ( error ) - return error; - } - else - { - /* No substitution for this index */ - - if ( ADD_String( in, 1, out, 1, &in->string[in->pos] ) ) - return error; - i++; - } - } - - return TT_Err_Ok; - } - - - /* LookupType 5 */ - - /* SubRule */ - - static TT_Error Load_SubRule( TTO_SubRule* sr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* i; - - TTO_SubstLookupRecord* slr; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - sr->GlyphCount = GET_UShort(); - sr->SubstCount = GET_UShort(); - - FORGET_Frame(); - - sr->Input = NULL; - - count = sr->GlyphCount - 1; /* only GlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( sr->Input, count, UShort ) ) - return error; - - i = sr->Input; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - i[n] = GET_UShort(); - - FORGET_Frame(); - - sr->SubstLookupRecord = NULL; - - count = sr->SubstCount; - - if ( ALLOC_ARRAY( sr->SubstLookupRecord, count, TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = sr->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - FREE( i ); - return error; - } - - - static void Free_SubRule( TTO_SubRule* sr ) - { - FREE( sr->SubstLookupRecord ); - FREE( sr->Input ); - } - - - /* SubRuleSet */ - - static TT_Error Load_SubRuleSet( TTO_SubRuleSet* srs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_SubRule* sr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = srs->SubRuleCount = GET_UShort(); - - FORGET_Frame(); - - srs->SubRule = NULL; - - if ( ALLOC_ARRAY( srs->SubRule, count, TTO_SubRule ) ) - return error; - - sr = srs->SubRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_SubRule( &sr[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_SubRule( &sr[n] ); - - FREE( sr ); - return error; - } - - - static void Free_SubRuleSet( TTO_SubRuleSet* srs ) - { - UShort n, count; - - TTO_SubRule* sr; - - - if ( srs->SubRule ) - { - count = srs->SubRuleCount; - sr = srs->SubRule; - - for ( n = 0; n < count; n++ ) - Free_SubRule( &sr[n] ); - - FREE( sr ); - } - } - - - /* ContextSubstFormat1 */ - - static TT_Error Load_ContextSubst1( TTO_ContextSubstFormat1* csf1, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_SubRuleSet* srs; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &csf1->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = csf1->SubRuleSetCount = GET_UShort(); - - FORGET_Frame(); - - csf1->SubRuleSet = NULL; - - if ( ALLOC_ARRAY( csf1->SubRuleSet, count, TTO_SubRuleSet ) ) - goto Fail2; - - srs = csf1->SubRuleSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_SubRuleSet( &srs[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_SubRuleSet( &srs[n] ); - - FREE( srs ); - - Fail2: - Free_Coverage( &csf1->Coverage ); - return error; - } - - - static void Free_Context1( TTO_ContextSubstFormat1* csf1 ) - { - UShort n, count; - - TTO_SubRuleSet* srs; - - - if ( csf1->SubRuleSet ) - { - count = csf1->SubRuleSetCount; - srs = csf1->SubRuleSet; - - for ( n = 0; n < count; n++ ) - Free_SubRuleSet( &srs[n] ); - - FREE( srs ); - } - - Free_Coverage( &csf1->Coverage ); - } - - - /* SubClassRule */ - - static TT_Error Load_SubClassRule( TTO_ContextSubstFormat2* csf2, - TTO_SubClassRule* scr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* c; - TTO_SubstLookupRecord* slr; - Bool* d; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - scr->GlyphCount = GET_UShort(); - scr->SubstCount = GET_UShort(); - - if ( scr->GlyphCount > csf2->MaxContextLength ) - csf2->MaxContextLength = scr->GlyphCount; - - FORGET_Frame(); - - scr->Class = NULL; - - count = scr->GlyphCount - 1; /* only GlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( scr->Class, count, UShort ) ) - return error; - - c = scr->Class; - d = csf2->ClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - { - c[n] = GET_UShort(); - - /* We check whether the specific class is used at all. If not, - class 0 is used instead. */ - - if ( !d[c[n]] ) - c[n] = 0; - } - - FORGET_Frame(); - - scr->SubstLookupRecord = NULL; - - count = scr->SubstCount; - - if ( ALLOC_ARRAY( scr->SubstLookupRecord, count, TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = scr->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - FREE( c ); - return error; - } - - - static void Free_SubClassRule( TTO_SubClassRule* scr ) - { - FREE( scr->SubstLookupRecord ); - FREE( scr->Class ); - } - - - /* SubClassSet */ - - static TT_Error Load_SubClassSet( TTO_ContextSubstFormat2* csf2, - TTO_SubClassSet* scs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_SubClassRule* scr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = scs->SubClassRuleCount = GET_UShort(); - - FORGET_Frame(); - - scs->SubClassRule = NULL; - - if ( ALLOC_ARRAY( scs->SubClassRule, count, TTO_SubClassRule ) ) - return error; - - scr = scs->SubClassRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_SubClassRule( csf2, &scr[n], - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_SubClassRule( &scr[n] ); - - FREE( scr ); - return error; - } - - - static void Free_SubClassSet( TTO_SubClassSet* scs ) - { - UShort n, count; - - TTO_SubClassRule* scr; - - - if ( scs->SubClassRule ) - { - count = scs->SubClassRuleCount; - scr = scs->SubClassRule; - - for ( n = 0; n < count; n++ ) - Free_SubClassRule( &scr[n] ); - - FREE( scr ); - } - } - - - /* ContextSubstFormat2 */ - - static TT_Error Load_ContextSubst2( TTO_ContextSubstFormat2* csf2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_SubClassSet* scs; - - - base_offset = FILE_Pos() - 2; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &csf2->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 4L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - /* `SubClassSetCount' is the upper limit for class values, thus we - read it now to make an additional safety check. */ - - count = csf2->SubClassSetCount = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ClassDefinition( &csf2->ClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - csf2->SubClassSet = NULL; - csf2->MaxContextLength = 0; - - if ( ALLOC_ARRAY( csf2->SubClassSet, count, TTO_SubClassSet ) ) - goto Fail2; - - scs = csf2->SubClassSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - if ( new_offset != base_offset ) /* not a NULL offset */ - { - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_SubClassSet( csf2, &scs[n], - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - { - /* we create a SubClassSet table with no entries */ - - csf2->SubClassSet[n].SubClassRuleCount = 0; - csf2->SubClassSet[n].SubClassRule = NULL; - } - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_SubClassSet( &scs[n] ); - - FREE( scs ); - - Fail2: - Free_ClassDefinition( &csf2->ClassDef ); - - Fail3: - Free_Coverage( &csf2->Coverage ); - return error; - } - - - static void Free_Context2( TTO_ContextSubstFormat2* csf2 ) - { - UShort n, count; - - TTO_SubClassSet* scs; - - - if ( csf2->SubClassSet ) - { - count = csf2->SubClassSetCount; - scs = csf2->SubClassSet; - - for ( n = 0; n < count; n++ ) - Free_SubClassSet( &scs[n] ); - - FREE( scs ); - } - - Free_ClassDefinition( &csf2->ClassDef ); - Free_Coverage( &csf2->Coverage ); - } - - - /* ContextSubstFormat3 */ - - static TT_Error Load_ContextSubst3( TTO_ContextSubstFormat3* csf3, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Coverage* c; - TTO_SubstLookupRecord* slr; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 4L ) ) - return error; - - csf3->GlyphCount = GET_UShort(); - csf3->SubstCount = GET_UShort(); - - FORGET_Frame(); - - csf3->Coverage = NULL; - - count = csf3->GlyphCount; - - if ( ALLOC_ARRAY( csf3->Coverage, count, TTO_Coverage ) ) - return error; - - c = csf3->Coverage; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &c[n], input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - - csf3->SubstLookupRecord = NULL; - - count = csf3->SubstCount; - - if ( ALLOC_ARRAY( csf3->SubstLookupRecord, count, - TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = csf3->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - return error; - } - - - static void Free_Context3( TTO_ContextSubstFormat3* csf3 ) - { - UShort n, count; - - TTO_Coverage* c; - - - FREE( csf3->SubstLookupRecord ); - - if ( csf3->Coverage ) - { - count = csf3->GlyphCount; - c = csf3->Coverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - } - - - /* ContextSubst */ - - TT_Error Load_ContextSubst( TTO_ContextSubst* cs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ACCESS_Frame( 2L ) ) - return error; - - cs->SubstFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( cs->SubstFormat ) - { - case 1: - return Load_ContextSubst1( &cs->csf.csf1, input ); - - case 2: - return Load_ContextSubst2( &cs->csf.csf2, input ); - - case 3: - return Load_ContextSubst3( &cs->csf.csf3, input ); - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - void Free_ContextSubst( TTO_ContextSubst* cs ) - { - switch ( cs->SubstFormat ) - { - case 1: - Free_Context1( &cs->csf.csf1 ); - break; - - case 2: - Free_Context2( &cs->csf.csf2 ); - break; - - case 3: - Free_Context3( &cs->csf.csf3 ); - break; - } - } - - - static TT_Error Lookup_ContextSubst1( - TTO_GSUBHeader* gsub, - TTO_ContextSubstFormat1* csf1, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - UShort index, property; - UShort i, j, k, numsr; - TT_Error error; - UShort* s_in; - - TTO_SubRule* sr; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &csf1->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - sr = csf1->SubRuleSet[index].SubRule; - numsr = csf1->SubRuleSet[index].SubRuleCount; - - for ( k = 0; k < numsr; k++ ) - { - if ( context_length != 0xFFFF && context_length < sr[k].GlyphCount ) - continue; - - if ( in->pos + sr[k].GlyphCount > in->length ) - continue; /* context is too long */ - - s_in = &in->string[in->pos]; - - for ( i = 1, j = 1; i < sr[k].GlyphCount; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( in->pos + j < in->length ) - j++; - else - break; - } - - if ( s_in[j] != sr[k].Input[i - 1] ) - break; - } - - if ( i == sr[k].GlyphCount ) - return Do_ContextSubst( gsub, sr[k].GlyphCount, - sr[k].SubstCount, sr[k].SubstLookupRecord, - in, out, - nesting_level ); - } - - return TTO_Err_Not_Covered; - } - - - static TT_Error Lookup_ContextSubst2( - TTO_GSUBHeader* gsub, - TTO_ContextSubstFormat2* csf2, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - UShort index, property; - TT_Error error; - UShort i, j, k, known_classes; - - UShort* classes; - UShort* s_in; - UShort* cl; - - TTO_SubClassSet* scs; - TTO_SubClassRule* sr; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( ALLOC_ARRAY( classes, csf2->MaxContextLength, UShort ) ) - return error; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - /* Note: The coverage table in format 2 doesn't give an index into - anything. It just lets us know whether or not we need to - do any lookup at all. */ - - error = Coverage_Index( &csf2->Coverage, in->string[in->pos], &index ); - if ( error ) - goto End; - - error = Get_Class( &csf2->ClassDef, in->string[in->pos], - &classes[0], NULL ); - if ( error ) - goto End; - known_classes = 0; - - scs = &csf2->SubClassSet[classes[0]]; - if ( !scs ) - { - error = TTO_Err_Invalid_GSUB_SubTable; - goto End; - } - - for ( k = 0; k < scs->SubClassRuleCount; k++ ) - { - sr = &scs->SubClassRule[k]; - - if ( context_length != 0xFFFF && context_length < sr->GlyphCount ) - continue; - - if ( in->pos + sr->GlyphCount > in->length ) - continue; /* context is too long */ - - s_in = &in->string[in->pos]; - cl = sr->Class; - - /* Start at 1 because [0] is implied */ - - for ( i = 1, j = 1; i < sr->GlyphCount; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( in->pos + j < in->length ) - j++; - else - break; - } - - if ( i > known_classes ) - { - /* Keeps us from having to do this for each rule */ - - error = Get_Class( &csf2->ClassDef, s_in[j], &classes[i], NULL ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - known_classes = i; - } - - if ( cl[i - 1] != classes[i] ) - break; - } - - if ( i == sr->GlyphCount ) - { - error = Do_ContextSubst( gsub, sr->GlyphCount, - sr->SubstCount, sr->SubstLookupRecord, - in, out, - nesting_level ); - goto End; - } - } - - error = TTO_Err_Not_Covered; - - End: - FREE( classes ); - return error; - } - - - static TT_Error Lookup_ContextSubst3( - TTO_GSUBHeader* gsub, - TTO_ContextSubstFormat3* csf3, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - TT_Error error; - UShort index, i, j, property; - UShort* s_in; - - TTO_Coverage* c; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - if ( context_length != 0xFFFF && context_length < csf3->GlyphCount ) - return TTO_Err_Not_Covered; - - if ( in->pos + csf3->GlyphCount > in->length ) - return TTO_Err_Not_Covered; /* context is too long */ - - s_in = &in->string[in->pos]; - c = csf3->Coverage; - - for ( i = 1, j = 1; i < csf3->GlyphCount; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( in->pos + j < in->length ) - j++; - else - return TTO_Err_Not_Covered; - } - - error = Coverage_Index( &c[i], s_in[j], &index ); - if ( error ) - return error; - } - - return Do_ContextSubst( gsub, csf3->GlyphCount, - csf3->SubstCount, csf3->SubstLookupRecord, - in, out, - nesting_level ); - } - - - static TT_Error Lookup_ContextSubst( TTO_GSUBHeader* gsub, - TTO_ContextSubst* cs, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - switch ( cs->SubstFormat ) - { - case 1: - return Lookup_ContextSubst1( gsub, &cs->csf.csf1, in, out, - flags, context_length, nesting_level ); - - case 2: - return Lookup_ContextSubst2( gsub, &cs->csf.csf2, in, out, - flags, context_length, nesting_level ); - - case 3: - return Lookup_ContextSubst3( gsub, &cs->csf.csf3, in, out, - flags, context_length, nesting_level ); - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - /* LookupType 6 */ - - /* ChainSubRule */ - - static TT_Error Load_ChainSubRule( TTO_ChainSubRule* csr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort* b; - UShort* i; - UShort* l; - - TTO_SubstLookupRecord* slr; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - csr->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - csr->Backtrack = NULL; - - count = csr->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( csr->Backtrack, count, UShort ) ) - return error; - - b = csr->Backtrack; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail4; - - for ( n = 0; n < count; n++ ) - b[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - csr->InputGlyphCount = GET_UShort(); - - FORGET_Frame(); - - csr->Input = NULL; - - count = csr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( csr->Input, count, UShort ) ) - goto Fail4; - - i = csr->Input; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail3; - - for ( n = 0; n < count; n++ ) - i[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - csr->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - csr->Lookahead = NULL; - - count = csr->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( csr->Lookahead, count, UShort ) ) - goto Fail3; - - l = csr->Lookahead; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - l[n] = GET_UShort(); - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - csr->SubstCount = GET_UShort(); - - FORGET_Frame(); - - csr->SubstLookupRecord = NULL; - - count = csr->SubstCount; - - if ( ALLOC_ARRAY( csr->SubstLookupRecord, count, TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = csr->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - FREE( l ); - - Fail3: - FREE( i ); - - Fail4: - FREE( b ); - return error; - } - - - static void Free_ChainSubRule( TTO_ChainSubRule* csr ) - { - FREE( csr->SubstLookupRecord ); - FREE( csr->Lookahead ); - FREE( csr->Input ); - FREE( csr->Backtrack ); - } - - - /* ChainSubRuleSet */ - - static TT_Error Load_ChainSubRuleSet( TTO_ChainSubRuleSet* csrs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainSubRule* csr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = csrs->ChainSubRuleCount = GET_UShort(); - - FORGET_Frame(); - - csrs->ChainSubRule = NULL; - - if ( ALLOC_ARRAY( csrs->ChainSubRule, count, TTO_ChainSubRule ) ) - return error; - - csr = csrs->ChainSubRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainSubRule( &csr[n], input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_ChainSubRule( &csr[n] ); - - FREE( csr ); - return error; - } - - - static void Free_ChainSubRuleSet( TTO_ChainSubRuleSet* csrs ) - { - UShort n, count; - - TTO_ChainSubRule* csr; - - - if ( csrs->ChainSubRule ) - { - count = csrs->ChainSubRuleCount; - csr = csrs->ChainSubRule; - - for ( n = 0; n < count; n++ ) - Free_ChainSubRule( &csr[n] ); - - FREE( csr ); - } - } - - - /* ChainContextSubstFormat1 */ - - static TT_Error Load_ChainContextSubst1( - TTO_ChainContextSubstFormat1* ccsf1, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainSubRuleSet* csrs; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ccsf1->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = ccsf1->ChainSubRuleSetCount = GET_UShort(); - - FORGET_Frame(); - - ccsf1->ChainSubRuleSet = NULL; - - if ( ALLOC_ARRAY( ccsf1->ChainSubRuleSet, count, TTO_ChainSubRuleSet ) ) - goto Fail2; - - csrs = ccsf1->ChainSubRuleSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainSubRuleSet( &csrs[n], input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_ChainSubRuleSet( &csrs[n] ); - - FREE( csrs ); - - Fail2: - Free_Coverage( &ccsf1->Coverage ); - return error; - } - - - static void Free_ChainContext1( TTO_ChainContextSubstFormat1* ccsf1 ) - { - UShort n, count; - - TTO_ChainSubRuleSet* csrs; - - - if ( ccsf1->ChainSubRuleSet ) - { - count = ccsf1->ChainSubRuleSetCount; - csrs = ccsf1->ChainSubRuleSet; - - for ( n = 0; n < count; n++ ) - Free_ChainSubRuleSet( &csrs[n] ); - - FREE( csrs ); - } - - Free_Coverage( &ccsf1->Coverage ); - } - - - /* ChainSubClassRule */ - - static TT_Error Load_ChainSubClassRule( - TTO_ChainContextSubstFormat2* ccsf2, - TTO_ChainSubClassRule* cscr, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* b; - UShort* i; - UShort* l; - TTO_SubstLookupRecord* slr; - Bool* d; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - cscr->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - if ( cscr->BacktrackGlyphCount > ccsf2->MaxBacktrackLength ) - ccsf2->MaxBacktrackLength = cscr->BacktrackGlyphCount; - - cscr->Backtrack = NULL; - - count = cscr->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( cscr->Backtrack, count, UShort ) ) - return error; - - b = cscr->Backtrack; - d = ccsf2->BacktrackClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail4; - - for ( n = 0; n < count; n++ ) - { - b[n] = GET_UShort(); - - /* We check whether the specific class is used at all. If not, - class 0 is used instead. */ - - if ( !d[b[n]] ) - b[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - cscr->InputGlyphCount = GET_UShort(); - - FORGET_Frame(); - - if ( cscr->InputGlyphCount > ccsf2->MaxInputLength ) - ccsf2->MaxInputLength = cscr->InputGlyphCount; - - cscr->Input = NULL; - - count = cscr->InputGlyphCount - 1; /* only InputGlyphCount - 1 elements */ - - if ( ALLOC_ARRAY( cscr->Input, count, UShort ) ) - goto Fail4; - - i = cscr->Input; - d = ccsf2->InputClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail3; - - for ( n = 0; n < count; n++ ) - { - i[n] = GET_UShort(); - - if ( !d[i[n]] ) - i[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - cscr->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - if ( cscr->LookaheadGlyphCount > ccsf2->MaxLookaheadLength ) - ccsf2->MaxLookaheadLength = cscr->LookaheadGlyphCount; - - cscr->Lookahead = NULL; - - count = cscr->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( cscr->Lookahead, count, UShort ) ) - goto Fail3; - - l = cscr->Lookahead; - d = ccsf2->LookaheadClassDef.Defined; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail2; - - for ( n = 0; n < count; n++ ) - { - l[n] = GET_UShort(); - - if ( !d[l[n]] ) - l[n] = 0; - } - - FORGET_Frame(); - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - cscr->SubstCount = GET_UShort(); - - FORGET_Frame(); - - cscr->SubstLookupRecord = NULL; - - count = cscr->SubstCount; - - if ( ALLOC_ARRAY( cscr->SubstLookupRecord, count, - TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = cscr->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - FREE( l ); - - Fail3: - FREE( i ); - - Fail4: - FREE( b ); - return error; - } - - - static void Free_ChainSubClassRule( TTO_ChainSubClassRule* cscr ) - { - FREE( cscr->SubstLookupRecord ); - FREE( cscr->Lookahead ); - FREE( cscr->Input ); - FREE( cscr->Backtrack ); - } - - - /* SubClassSet */ - - static TT_Error Load_ChainSubClassSet( - TTO_ChainContextSubstFormat2* ccsf2, - TTO_ChainSubClassSet* cscs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ChainSubClassRule* cscr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cscs->ChainSubClassRuleCount = GET_UShort(); - - FORGET_Frame(); - - cscs->ChainSubClassRule = NULL; - - if ( ALLOC_ARRAY( cscs->ChainSubClassRule, count, - TTO_ChainSubClassRule ) ) - return error; - - cscr = cscs->ChainSubClassRule; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainSubClassRule( ccsf2, &cscr[n], - input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_ChainSubClassRule( &cscr[n] ); - - FREE( cscr ); - return error; - } - - - static void Free_ChainSubClassSet( TTO_ChainSubClassSet* cscs ) - { - UShort n, count; - - TTO_ChainSubClassRule* cscr; - - - if ( cscs->ChainSubClassRule ) - { - count = cscs->ChainSubClassRuleCount; - cscr = cscs->ChainSubClassRule; - - for ( n = 0; n < count; n++ ) - Free_ChainSubClassRule( &cscr[n] ); - - FREE( cscr ); - } - } - - - /* ChainContextSubstFormat2 */ - - static TT_Error Load_ChainContextSubst2( - TTO_ChainContextSubstFormat2* ccsf2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - ULong backtrack_offset, input_offset, lookahead_offset; - - TTO_ChainSubClassSet* cscs; - - - base_offset = FILE_Pos() - 2; - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &ccsf2->Coverage, input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - - if ( ACCESS_Frame( 8L ) ) - goto Fail5; - - backtrack_offset = GET_UShort() + base_offset; - input_offset = GET_UShort() + base_offset; - lookahead_offset = GET_UShort() + base_offset; - - /* `ChainSubClassSetCount' is the upper limit for input class values, - thus we read it now to make an additional safety check. */ - - count = ccsf2->ChainSubClassSetCount = GET_UShort(); - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( backtrack_offset ) || - ( error = Load_ClassDefinition( &ccsf2->BacktrackClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail5; - if ( FILE_Seek( input_offset ) || - ( error = Load_ClassDefinition( &ccsf2->InputClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail4; - if ( FILE_Seek( lookahead_offset ) || - ( error = Load_ClassDefinition( &ccsf2->LookaheadClassDef, count, - input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - - ccsf2->ChainSubClassSet = NULL; - ccsf2->MaxBacktrackLength = 0; - ccsf2->MaxInputLength = 0; - ccsf2->MaxLookaheadLength = 0; - - if ( ALLOC_ARRAY( ccsf2->ChainSubClassSet, count, TTO_ChainSubClassSet ) ) - goto Fail2; - - cscs = ccsf2->ChainSubClassSet; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - if ( new_offset != base_offset ) /* not a NULL offset */ - { - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_ChainSubClassSet( ccsf2, &cscs[n], - input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - else - { - /* we create a ChainSubClassSet table with no entries */ - - ccsf2->ChainSubClassSet[n].ChainSubClassRuleCount = 0; - ccsf2->ChainSubClassSet[n].ChainSubClassRule = NULL; - } - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_ChainSubClassSet( &cscs[n] ); - - FREE( cscs ); - - Fail2: - Free_ClassDefinition( &ccsf2->LookaheadClassDef ); - - Fail3: - Free_ClassDefinition( &ccsf2->InputClassDef ); - - Fail4: - Free_ClassDefinition( &ccsf2->BacktrackClassDef ); - - Fail5: - Free_Coverage( &ccsf2->Coverage ); - return error; - } - - - static void Free_ChainContext2( TTO_ChainContextSubstFormat2* ccsf2 ) - { - UShort n, count; - - TTO_ChainSubClassSet* cscs; - - - if ( ccsf2->ChainSubClassSet ) - { - count = ccsf2->ChainSubClassSetCount; - cscs = ccsf2->ChainSubClassSet; - - for ( n = 0; n < count; n++ ) - Free_ChainSubClassSet( &cscs[n] ); - - FREE( cscs ); - } - - Free_ClassDefinition( &ccsf2->LookaheadClassDef ); - Free_ClassDefinition( &ccsf2->InputClassDef ); - Free_ClassDefinition( &ccsf2->BacktrackClassDef ); - - Free_Coverage( &ccsf2->Coverage ); - } - - - /* ChainContextSubstFormat3 */ - - static TT_Error Load_ChainContextSubst3( - TTO_ChainContextSubstFormat3* ccsf3, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - UShort backtrack_count, input_count, lookahead_count; - ULong cur_offset, new_offset, base_offset; - - TTO_Coverage* b; - TTO_Coverage* i; - TTO_Coverage* l; - TTO_SubstLookupRecord* slr; - - - base_offset = FILE_Pos() - 2L; - - if ( ACCESS_Frame( 2L ) ) - return error; - - ccsf3->BacktrackGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccsf3->BacktrackCoverage = NULL; - - backtrack_count = ccsf3->BacktrackGlyphCount; - - if ( ALLOC_ARRAY( ccsf3->BacktrackCoverage, backtrack_count, - TTO_Coverage ) ) - return error; - - b = ccsf3->BacktrackCoverage; - - for ( n = 0; n < backtrack_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &b[n], input ) ) != TT_Err_Ok ) - goto Fail4; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail4; - - ccsf3->InputGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccsf3->InputCoverage = NULL; - - input_count = ccsf3->InputGlyphCount; - - if ( ALLOC_ARRAY( ccsf3->InputCoverage, input_count, TTO_Coverage ) ) - goto Fail4; - - i = ccsf3->InputCoverage; - - for ( n = 0; n < input_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &i[n], input ) ) != TT_Err_Ok ) - goto Fail3; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail3; - - ccsf3->LookaheadGlyphCount = GET_UShort(); - - FORGET_Frame(); - - ccsf3->LookaheadCoverage = NULL; - - lookahead_count = ccsf3->LookaheadGlyphCount; - - if ( ALLOC_ARRAY( ccsf3->LookaheadCoverage, lookahead_count, - TTO_Coverage ) ) - goto Fail3; - - l = ccsf3->LookaheadCoverage; - - for ( n = 0; n < lookahead_count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Coverage( &l[n], input ) ) != TT_Err_Ok ) - goto Fail2; - (void)FILE_Seek( cur_offset ); - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - ccsf3->SubstCount = GET_UShort(); - - FORGET_Frame(); - - ccsf3->SubstLookupRecord = NULL; - - count = ccsf3->SubstCount; - - if ( ALLOC_ARRAY( ccsf3->SubstLookupRecord, count, - TTO_SubstLookupRecord ) ) - goto Fail2; - - slr = ccsf3->SubstLookupRecord; - - if ( ACCESS_Frame( count * 4L ) ) - goto Fail1; - - for ( n = 0; n < count; n++ ) - { - slr[n].SequenceIndex = GET_UShort(); - slr[n].LookupListIndex = GET_UShort(); - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail1: - FREE( slr ); - - Fail2: - for ( n = 0; n < lookahead_count; n++ ) - Free_Coverage( &l[n] ); - - FREE( l ); - - Fail3: - for ( n = 0; n < input_count; n++ ) - Free_Coverage( &i[n] ); - - FREE( i ); - - Fail4: - for ( n = 0; n < backtrack_count; n++ ) - Free_Coverage( &b[n] ); - - FREE( b ); - return error; - } - - - static void Free_ChainContext3( TTO_ChainContextSubstFormat3* ccsf3 ) - { - UShort n, count; - - TTO_Coverage* c; - - - FREE( ccsf3->SubstLookupRecord ); - - if ( ccsf3->LookaheadCoverage ) - { - count = ccsf3->LookaheadGlyphCount; - c = ccsf3->LookaheadCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - - if ( ccsf3->InputCoverage ) - { - count = ccsf3->InputGlyphCount; - c = ccsf3->InputCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - - if ( ccsf3->BacktrackCoverage ) - { - count = ccsf3->BacktrackGlyphCount; - c = ccsf3->BacktrackCoverage; - - for ( n = 0; n < count; n++ ) - Free_Coverage( &c[n] ); - - FREE( c ); - } - } - - - /* ChainContextSubst */ - - TT_Error Load_ChainContextSubst( TTO_ChainContextSubst* ccs, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ACCESS_Frame( 2L ) ) - return error; - - ccs->SubstFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( ccs->SubstFormat ) - { - case 1: - return Load_ChainContextSubst1( &ccs->ccsf.ccsf1, input ); - - case 2: - return Load_ChainContextSubst2( &ccs->ccsf.ccsf2, input ); - - case 3: - return Load_ChainContextSubst3( &ccs->ccsf.ccsf3, input ); - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - void Free_ChainContextSubst( TTO_ChainContextSubst* ccs ) - { - switch ( ccs->SubstFormat ) - { - case 1: - Free_ChainContext1( &ccs->ccsf.ccsf1 ); - break; - - case 2: - Free_ChainContext2( &ccs->ccsf.ccsf2 ); - break; - - case 3: - Free_ChainContext3( &ccs->ccsf.ccsf3 ); - break; - } - } - - - static TT_Error Lookup_ChainContextSubst1( - TTO_GSUBHeader* gsub, - TTO_ChainContextSubstFormat1* ccsf1, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - UShort index, property; - UShort i, j, k, num_csr, curr_pos; - UShort bgc, igc, lgc; - TT_Error error; - UShort* s_in; - - TTO_ChainSubRule* csr; - TTO_ChainSubRule curr_csr; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - error = Coverage_Index( &ccsf1->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - csr = ccsf1->ChainSubRuleSet[index].ChainSubRule; - num_csr = ccsf1->ChainSubRuleSet[index].ChainSubRuleCount; - - for ( k = 0; k < num_csr; k++ ) - { - curr_csr = csr[k]; - bgc = curr_csr.BacktrackGlyphCount; - igc = curr_csr.InputGlyphCount; - lgc = curr_csr.LookaheadGlyphCount; - - if ( context_length != 0xFFFF && context_length < igc ) - continue; - - /* check whether context is too long; it is a first guess only */ - - if ( bgc > in->pos || in->pos + igc + lgc > in->length ) - continue; - - if ( bgc ) - { - /* Since we don't know in advance the number of glyphs to inspect, - we search backwards for matches in the backtrack glyph array */ - - curr_pos = 0; - s_in = &in->string[curr_pos]; - - for ( i = bgc, j = in->pos - 1; i > 0; i--, j-- ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( j > curr_pos ) - j--; - else - break; - } - - if ( s_in[j] != curr_csr.Backtrack[i - 1] ) - break; - } - - if ( i != 0 ) - continue; - } - - curr_pos = in->pos; - s_in = &in->string[curr_pos]; - - /* Start at 1 because [0] is implied */ - - for ( i = 1, j = 1; i < igc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( curr_pos + j < in->length ) - j++; - else - break; - } - - if ( s_in[j] != curr_csr.Input[i - 1] ) - break; - } - - if ( i != igc ) - continue; - - /* we are starting to check for lookahead glyphs right after the - last context glyph */ - - curr_pos = j; - s_in = &in->string[curr_pos]; - - for ( i = 0, j = 0; i < lgc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( curr_pos + j < in->length ) - j++; - else - break; - } - - if ( s_in[j] != curr_csr.Lookahead[i] ) - break; - } - - if ( i == lgc ) - return Do_ContextSubst( gsub, igc, - curr_csr.SubstCount, - curr_csr.SubstLookupRecord, - in, out, - nesting_level ); - } - - return TTO_Err_Not_Covered; - } - - - static TT_Error Lookup_ChainContextSubst2( - TTO_GSUBHeader* gsub, - TTO_ChainContextSubstFormat2* ccsf2, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - UShort index, property; - TT_Error error; - UShort i, j, k, curr_pos; - UShort bgc, igc, lgc; - UShort known_backtrack_classes, - known_input_classes, - known_lookahead_classes; - - UShort* backtrack_classes; - UShort* input_classes; - UShort* lookahead_classes; - - UShort* s_in; - - UShort* bc; - UShort* ic; - UShort* lc; - - TTO_ChainSubClassSet* cscs; - TTO_ChainSubClassRule ccsr; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - /* Note: The coverage table in format 2 doesn't give an index into - anything. It just lets us know whether or not we need to - do any lookup at all. */ - - error = Coverage_Index( &ccsf2->Coverage, in->string[in->pos], &index ); - if ( error ) - return error; - - if ( ALLOC_ARRAY( backtrack_classes, ccsf2->MaxBacktrackLength, UShort ) ) - return error; - known_backtrack_classes = 0; - - if ( ALLOC_ARRAY( input_classes, ccsf2->MaxInputLength, UShort ) ) - goto End3; - known_input_classes = 1; - - if ( ALLOC_ARRAY( lookahead_classes, ccsf2->MaxLookaheadLength, UShort ) ) - goto End2; - known_lookahead_classes = 0; - - error = Get_Class( &ccsf2->InputClassDef, in->string[in->pos], - &input_classes[0], NULL ); - if ( error ) - goto End1; - - cscs = &ccsf2->ChainSubClassSet[input_classes[0]]; - if ( !cscs ) - { - error = TTO_Err_Invalid_GSUB_SubTable; - goto End1; - } - - for ( k = 0; k < cscs->ChainSubClassRuleCount; k++ ) - { - ccsr = cscs->ChainSubClassRule[k]; - bgc = ccsr.BacktrackGlyphCount; - igc = ccsr.InputGlyphCount; - lgc = ccsr.LookaheadGlyphCount; - - if ( context_length != 0xFFFF && context_length < igc ) - continue; - - /* check whether context is too long; it is a first guess only */ - - if ( bgc > in->pos || in->pos + igc + lgc > in->length ) - continue; - - if ( bgc ) - { - /* Since we don't know in advance the number of glyphs to inspect, - we search backwards for matches in the backtrack glyph array. - Note that `known_backtrack_classes' starts at index 0. */ - - curr_pos = 0; - s_in = &in->string[curr_pos]; - bc = ccsr.Backtrack; - - for ( i = 0, j = in->pos - 1; i < bgc; i++, j-- ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( j > curr_pos ) - j--; - else - break; - } - - if ( i >= known_backtrack_classes ) - { - /* Keeps us from having to do this for each rule */ - - error = Get_Class( &ccsf2->BacktrackClassDef, s_in[j], - &backtrack_classes[i], NULL ); - if ( error && error != TTO_Err_Not_Covered ) - goto End1; - known_backtrack_classes = i; - } - - if ( bc[bgc - 1 - i] != backtrack_classes[i] ) - break; - } - - if ( i != bgc ) - continue; - } - - curr_pos = in->pos; - s_in = &in->string[curr_pos]; - ic = ccsr.Input; - - /* Start at 1 because [0] is implied */ - - for ( i = 1, j = 1; i < igc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - goto End1; - - if ( curr_pos + j < in->length ) - j++; - else - break; - } - - if ( i >= known_input_classes ) - { - error = Get_Class( &ccsf2->InputClassDef, s_in[j], - &input_classes[i], NULL ); - if ( error && error != TTO_Err_Not_Covered ) - goto End1; - known_input_classes = i; - } - - if ( ic[i - 1] != input_classes[i] ) - break; - } - - if ( i != igc ) - continue; - - /* we are starting to check for lookahead glyphs right after the - last context glyph */ - - curr_pos = j; - s_in = &in->string[curr_pos]; - lc = ccsr.Lookahead; - - for ( i = 0, j = 0; i < lgc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( curr_pos + j < in->length ) - j++; - else - break; - } - - if ( i >= known_lookahead_classes ) - { - error = Get_Class( &ccsf2->LookaheadClassDef, s_in[j], - &lookahead_classes[i], NULL ); - if ( error && error != TTO_Err_Not_Covered ) - goto End1; - known_lookahead_classes = i; - } - - if ( lc[i] != lookahead_classes[i] ) - break; - } - - if ( i == lgc ) - { - error = Do_ContextSubst( gsub, igc, - ccsr.SubstCount, - ccsr.SubstLookupRecord, - in, out, - nesting_level ); - goto End1; - } - } - - error = TTO_Err_Not_Covered; - - End1: - FREE( lookahead_classes ); - - End2: - FREE( input_classes ); - - End3: - FREE( backtrack_classes ); - return error; - } - - - static TT_Error Lookup_ChainContextSubst3( - TTO_GSUBHeader* gsub, - TTO_ChainContextSubstFormat3* ccsf3, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - UShort index, i, j, curr_pos, property; - UShort bgc, igc, lgc; - TT_Error error; - UShort* s_in; - - TTO_Coverage* bc; - TTO_Coverage* ic; - TTO_Coverage* lc; - TTO_GDEFHeader* gdef; - - - gdef = gsub->gdef; - - if ( CHECK_Property( gdef, in->string[in->pos], flags, &property ) ) - return error; - - bgc = ccsf3->BacktrackGlyphCount; - igc = ccsf3->InputGlyphCount; - lgc = ccsf3->LookaheadGlyphCount; - - if ( context_length != 0xFFFF && context_length < igc ) - return TTO_Err_Not_Covered; - - /* check whether context is too long; it is a first guess only */ - - if ( bgc > in->pos || in->pos + igc + lgc > in->length ) - return TTO_Err_Not_Covered; - - if ( bgc ) - { - /* Since we don't know in advance the number of glyphs to inspect, - we search backwards for matches in the backtrack glyph array */ - - curr_pos = 0; - s_in = &in->string[curr_pos]; - bc = ccsf3->BacktrackCoverage; - - for ( i = bgc, j = in->pos - 1; i > 0; i--, j-- ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( j > curr_pos ) - j--; - else - return TTO_Err_Not_Covered; - } - - error = Coverage_Index( &bc[i - 1], s_in[j], &index ); - if ( error ) - return error; - } - } - - curr_pos = in->pos; - s_in = &in->string[curr_pos]; - ic = ccsf3->InputCoverage; - - /* Start at 1 because [0] is implied */ - - for ( i = 1, j = 1; i < igc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( curr_pos + j < in->length ) - j++; - else - return TTO_Err_Not_Covered; - } - - error = Coverage_Index( &ic[i], s_in[j], &index ); - if ( error ) - return error; - } - - /* we are starting for lookahead glyphs right after the last context - glyph */ - - curr_pos = j; - s_in = &in->string[curr_pos]; - lc = ccsf3->LookaheadCoverage; - - for ( i = 0, j = 0; i < lgc; i++, j++ ) - { - while ( CHECK_Property( gdef, s_in[j], flags, &property ) ) - { - if ( error && error != TTO_Err_Not_Covered ) - return error; - - if ( curr_pos + j < in->length ) - j++; - else - return TTO_Err_Not_Covered; - } - - error = Coverage_Index( &lc[i], s_in[j], &index ); - if ( error ) - return error; - } - - return Do_ContextSubst( gsub, igc, - ccsf3->SubstCount, - ccsf3->SubstLookupRecord, - in, out, - nesting_level ); - } - - - static TT_Error Lookup_ChainContextSubst( - TTO_GSUBHeader* gsub, - TTO_ChainContextSubst* ccs, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort flags, - UShort context_length, - int nesting_level ) - { - switch ( ccs->SubstFormat ) - { - case 1: - return Lookup_ChainContextSubst1( gsub, &ccs->ccsf.ccsf1, in, out, - flags, context_length, - nesting_level ); - - case 2: - return Lookup_ChainContextSubst2( gsub, &ccs->ccsf.ccsf2, in, out, - flags, context_length, - nesting_level ); - - case 3: - return Lookup_ChainContextSubst3( gsub, &ccs->ccsf.ccsf3, in, out, - flags, context_length, - nesting_level ); - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - - /*********** - * GSUB API - ***********/ - - - EXPORT_FUNC - TT_Error TT_GSUB_Select_Script( TTO_GSUBHeader* gsub, - TT_ULong script_tag, - TT_UShort* script_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - - - if ( !gsub || !script_index ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - for ( n = 0; n < sl->ScriptCount; n++ ) - if ( script_tag == sr[n].ScriptTag ) - { - *script_index = n; - - return TT_Err_Ok; - } - - return TTO_Err_Not_Covered; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Select_Language( TTO_GSUBHeader* gsub, - TT_ULong language_tag, - TT_UShort script_index, - TT_UShort* language_index, - TT_UShort* req_feature_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - - - if ( !gsub || !language_index || !req_feature_index ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - for ( n = 0; n < s->LangSysCount; n++ ) - if ( language_tag == lsr[n].LangSysTag ) - { - *language_index = n; - *req_feature_index = lsr[n].LangSys.ReqFeatureIndex; - - return TT_Err_Ok; - } - - return TTO_Err_Not_Covered; - } - - - /* selecting 0xFFFF for language_index asks for the values of the - default language (DefaultLangSys) */ - - EXPORT_FUNC - TT_Error TT_GSUB_Select_Feature( TTO_GSUBHeader* gsub, - TT_ULong feature_tag, - TT_UShort script_index, - TT_UShort language_index, - TT_UShort* feature_index ) - { - UShort n; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - TTO_LangSys* ls; - UShort* fi; - - TTO_FeatureList* fl; - TTO_FeatureRecord* fr; - - - if ( !gsub || !feature_index ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - fl = &gsub->FeatureList; - fr = fl->FeatureRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( language_index == 0xFFFF ) - ls = &s->DefaultLangSys; - else - { - if ( language_index >= s->LangSysCount ) - return TT_Err_Invalid_Argument; - - ls = &lsr[language_index].LangSys; - } - - fi = ls->FeatureIndex; - - for ( n = 0; n < ls->FeatureCount; n++ ) - { - if ( fi[n] >= fl->FeatureCount ) - return TTO_Err_Invalid_GSUB_SubTable_Format; - - if ( feature_tag == fr[fi[n]].FeatureTag ) - { - *feature_index = fi[n]; - - return TT_Err_Ok; - } - } - - return TTO_Err_Not_Covered; - } - - - /* The next three functions return a null-terminated list */ - - EXPORT_FUNC - TT_Error TT_GSUB_Query_Scripts( TTO_GSUBHeader* gsub, - TT_ULong** script_tag_list ) - { - UShort n; - TT_Error error; - ULong* stl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - - - if ( !gsub || !script_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - if ( ALLOC_ARRAY( stl, sl->ScriptCount + 1, ULong ) ) - return error; - - for ( n = 0; n < sl->ScriptCount; n++ ) - stl[n] = sr[n].ScriptTag; - stl[n] = 0; - - *script_tag_list = stl; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Query_Languages( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_ULong** language_tag_list ) - { - UShort n; - TT_Error error; - ULong* ltl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - - - if ( !gsub || !language_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( ALLOC_ARRAY( ltl, s->LangSysCount + 1, ULong ) ) - return error; - - for ( n = 0; n < s->LangSysCount; n++ ) - ltl[n] = lsr[n].LangSysTag; - ltl[n] = 0; - - *language_tag_list = ltl; - - return TT_Err_Ok; - } - - - /* selecting 0xFFFF for language_index asks for the values of the - default language (DefaultLangSys) */ - - EXPORT_FUNC - TT_Error TT_GSUB_Query_Features( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_UShort language_index, - TT_ULong** feature_tag_list ) - { - UShort n; - TT_Error error; - ULong* ftl; - - TTO_ScriptList* sl; - TTO_ScriptRecord* sr; - TTO_Script* s; - TTO_LangSysRecord* lsr; - TTO_LangSys* ls; - UShort* fi; - - TTO_FeatureList* fl; - TTO_FeatureRecord* fr; - - - if ( !gsub || !feature_tag_list ) - return TT_Err_Invalid_Argument; - - sl = &gsub->ScriptList; - sr = sl->ScriptRecord; - - fl = &gsub->FeatureList; - fr = fl->FeatureRecord; - - if ( script_index >= sl->ScriptCount ) - return TT_Err_Invalid_Argument; - - s = &sr[script_index].Script; - lsr = s->LangSysRecord; - - if ( language_index == 0xFFFF ) - ls = &s->DefaultLangSys; - else - { - if ( language_index >= s->LangSysCount ) - return TT_Err_Invalid_Argument; - - ls = &lsr[language_index].LangSys; - } - - fi = ls->FeatureIndex; - - if ( ALLOC_ARRAY( ftl, ls->FeatureCount + 1, ULong ) ) - return error; - - for ( n = 0; n < ls->FeatureCount; n++ ) - { - if ( fi[n] >= fl->FeatureCount ) - { - FREE( ftl ); - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - ftl[n] = fr[fi[n]].FeatureTag; - } - ftl[n] = 0; - - *feature_tag_list = ftl; - - return TT_Err_Ok; - } - - - /* Do an individual subtable lookup. Returns TT_Err_Ok if substitution - has been done, or TTO_Err_Not_Covered if not. */ - - static TT_Error Do_Glyph_Lookup( TTO_GSUBHeader* gsub, - UShort lookup_index, - TTO_GSUB_String* in, - TTO_GSUB_String* out, - UShort context_length, - int nesting_level ) - { - TT_Error error = TT_Err_Ok; - UShort i, flags; - TTO_Lookup* lo; - - - nesting_level++; - - if ( nesting_level > TTO_MAX_NESTING_LEVEL ) - return TTO_Err_Too_Many_Nested_Contexts; - - lo = &gsub->LookupList.Lookup[lookup_index]; - flags = lo->LookupFlag; - - for ( i = 0; i < lo->SubTableCount; i++ ) - { - switch ( lo->LookupType ) - { - case GSUB_LOOKUP_SINGLE: - error = Lookup_SingleSubst( &lo->SubTable[i].st.gsub.single, - in, out, - flags, context_length, gsub->gdef ); - break; - - case GSUB_LOOKUP_MULTIPLE: - error = Lookup_MultipleSubst( &lo->SubTable[i].st.gsub.multiple, - in, out, - flags, context_length, gsub->gdef ); - break; - - case GSUB_LOOKUP_ALTERNATE: - error = Lookup_AlternateSubst( gsub, - &lo->SubTable[i].st.gsub.alternate, - in, out, - flags, context_length, gsub->gdef ); - break; - - case GSUB_LOOKUP_LIGATURE: - error = Lookup_LigatureSubst( &lo->SubTable[i].st.gsub.ligature, - in, out, - flags, context_length, gsub->gdef ); - break; - - case GSUB_LOOKUP_CONTEXT: - error = Lookup_ContextSubst( gsub, &lo->SubTable[i].st.gsub.context, - in, out, - flags, context_length, nesting_level ); - break; - - case GSUB_LOOKUP_CHAIN: - error = Lookup_ChainContextSubst( gsub, - &lo->SubTable[i].st.gsub.chain, - in, out, - flags, context_length, - nesting_level ); - break; - } - - /* Check whether we have a successful substitution or an error other - than TTO_Err_Not_Covered */ - - if ( error != TTO_Err_Not_Covered ) - return error; - } - - return TTO_Err_Not_Covered; - } - - - /* apply one lookup to the input string object */ - - static TT_Error Do_String_Lookup( TTO_GSUBHeader* gsub, - UShort lookup_index, - TTO_GSUB_String* in, - TTO_GSUB_String* out ) - { - TT_Error error = TTO_Err_Not_Covered; - - UShort* properties = gsub->LookupList.Properties; - UShort* p_in = in->properties; - UShort* s_in = in->string; - - int nesting_level = 0; - - - while ( in->pos < in->length ) - { - if ( ~p_in[in->pos] & properties[lookup_index] ) - { - /* 0xFFFF indicates that we don't have a context length yet */ - error = Do_Glyph_Lookup( gsub, lookup_index, in, out, - 0xFFFF, nesting_level ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - } - else - error = TTO_Err_Not_Covered; - - if ( error == TTO_Err_Not_Covered ) - if ( ADD_String( in, 1, out, 1, &s_in[in->pos] ) ) - return error; - } - - return error; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Add_Feature( TTO_GSUBHeader* gsub, - TT_UShort feature_index, - TT_UShort property ) - { - UShort i; - - TTO_Feature feature; - UShort* properties; - UShort* index; - - - if ( !gsub || - feature_index >= gsub->FeatureList.FeatureCount ) - return TT_Err_Invalid_Argument; - - properties = gsub->LookupList.Properties; - - feature = gsub->FeatureList.FeatureRecord[feature_index].Feature; - index = feature.LookupListIndex; - - for ( i = 0; i < feature.LookupListCount; i++ ) - properties[index[i]] |= property; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Clear_Features( TTO_GSUBHeader* gsub ) - { - UShort i; - - UShort* properties; - - - if ( !gsub ) - return TT_Err_Invalid_Argument; - - properties = gsub->LookupList.Properties; - - for ( i = 0; i < gsub->LookupList.LookupCount; i++ ) - properties[i] = 0; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Register_Alternate_Function( TTO_GSUBHeader* gsub, - TTO_AltFunction alt, - void* data ) - { - if ( !gsub ) - return TT_Err_Invalid_Argument; - - gsub->alt = alt; - gsub->data = data; - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_GSUB_Apply_String( TTO_GSUBHeader* gsub, - TTO_GSUB_String* in, - TTO_GSUB_String* out ) - { - TT_Error error = TTO_Err_Not_Covered; - UShort j; - - TTO_GSUB_String tmp1; - TTO_GSUB_String* ptmp1; - TTO_GSUB_String tmp2; - TTO_GSUB_String* ptmp2; - TTO_GSUB_String* t; - - UShort* properties; - - - if ( !gsub || - !in || !out || in->length == 0 || in->pos >= in->length ) - return TT_Err_Invalid_Argument; - - properties = gsub->LookupList.Properties; - - tmp1.length = in->length; - tmp1.allocated = in->length; - tmp1.pos = in->pos; - - if ( ALLOC_ARRAY( tmp1.string, tmp1.length, UShort ) ) - return error; - MEM_Copy( tmp1.string, in->string, in->length * sizeof ( UShort ) ); - - /* make sure that we always have a `properties' array in the string - object */ - - if ( ALLOC_ARRAY( tmp1.properties, tmp1.length, UShort ) ) - return error; - if ( in->properties ) - MEM_Copy( tmp1.properties, in->properties, - in->length * sizeof( UShort ) ); - - tmp2.allocated = 0; - tmp2.pos = 0; - tmp2.string = NULL; - tmp2.properties = NULL; - - ptmp1 = &tmp1; - ptmp2 = &tmp2; - - for ( j = 0; j < gsub->LookupList.LookupCount; j++ ) - if ( properties[j] ) - { - error = Do_String_Lookup( gsub, j, ptmp1, ptmp2 ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - - /* flipping `in' and `out', preparing for the next loop */ - - ptmp1->pos = in->pos; - ptmp2->length = ptmp2->pos; - ptmp2->pos = in->pos; - - t = ptmp2; - ptmp2 = ptmp1; - ptmp1 = t; - } - - out->length = ptmp1->length; - out->pos = 0; - out->allocated = ptmp1->allocated; - out->string = ptmp1->string; - - if ( in->properties ) - out->properties = ptmp1->properties; - else - { - free( ptmp1->properties ); - out->properties = NULL; - } - - free( ptmp2->string ); - free( ptmp2->properties ); - - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxgsub.h diff -u xc/extras/FreeType/lib/extend/ftxgsub.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxgsub.h:removed --- xc/extras/FreeType/lib/extend/ftxgsub.h:1.1.1.3 Sat Feb 12 23:56:06 2000 +++ xc/extras/FreeType/lib/extend/ftxgsub.h Wed Mar 16 20:59:45 2005 @@ -1,581 +0,0 @@ -/******************************************************************* - * - * ftxgsub.h - * - * TrueType Open GSUB table support - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FTXOPEN_H -#error "Don't include this file! Use ftxopen.h instead." -#endif - -#ifndef FTXGSUB_H -#define FTXGSUB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define TTO_Err_Invalid_GSUB_SubTable_Format 0x1010 -#define TTO_Err_Invalid_GSUB_SubTable 0x1011 - - -/* Lookup types for glyph substitution */ - -#define GSUB_LOOKUP_SINGLE 1 -#define GSUB_LOOKUP_MULTIPLE 2 -#define GSUB_LOOKUP_ALTERNATE 3 -#define GSUB_LOOKUP_LIGATURE 4 -#define GSUB_LOOKUP_CONTEXT 5 -#define GSUB_LOOKUP_CHAIN 6 - - -/* Use this if a feature applies to all glyphs */ - -#define ALL_GLYPHS 0xFFFF - - - /* A pointer to a function which selects the alternate glyph. `pos' is - the position of the glyph with index `glyphID', `num_alternates' - gives the number of alternates in the `alternates' array. `data' - points to the user-defined structure specified during a call to - TT_GSUB_Register_Alternate_Function(). The function must return an - index into the `alternates' array. */ - - typedef TT_UShort (*TTO_AltFunction)(TT_ULong pos, - TT_UShort glyphID, - TT_UShort num_alternates, - TT_UShort* alternates, - void* data ); - - - struct TTO_GSUBHeader_ - { - TT_Bool loaded; - TT_ULong offset; - - TT_Fixed Version; - - TTO_ScriptList ScriptList; - TTO_FeatureList FeatureList; - TTO_LookupList LookupList; - - TTO_GDEFHeader* gdef; - - /* the next two fields are used for an alternate substitution callback - function to select the proper alternate glyph. */ - - TTO_AltFunction alt; - void* data; - }; - - typedef struct TTO_GSUBHeader_ TTO_GSUBHeader; - - - /* LookupType 1 */ - - struct TTO_SingleSubstFormat1_ - { - TT_Short DeltaGlyphID; /* constant added to get - substitution glyph index */ - }; - - typedef struct TTO_SingleSubstFormat1_ TTO_SingleSubstFormat1; - - - struct TTO_SingleSubstFormat2_ - { - TT_UShort GlyphCount; /* number of glyph IDs in - Substitute array */ - TT_UShort* Substitute; /* array of substitute glyph IDs */ - }; - - typedef struct TTO_SingleSubstFormat2_ TTO_SingleSubstFormat2; - - - struct TTO_SingleSubst_ - { - TT_UShort SubstFormat; /* 1 or 2 */ - TTO_Coverage Coverage; /* Coverage table */ - - union - { - TTO_SingleSubstFormat1 ssf1; - TTO_SingleSubstFormat2 ssf2; - } ssf; - }; - - typedef struct TTO_SingleSubst_ TTO_SingleSubst; - - - /* LookupType 2 */ - - struct TTO_Sequence_ - { - TT_UShort GlyphCount; /* number of glyph IDs in the - Substitute array */ - TT_UShort* Substitute; /* string of glyph IDs to - substitute */ - }; - - typedef struct TTO_Sequence_ TTO_Sequence; - - - struct TTO_MultipleSubst_ - { - TT_UShort SubstFormat; /* always 1 */ - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort SequenceCount; /* number of Sequence tables */ - TTO_Sequence* Sequence; /* array of Sequence tables */ - }; - - typedef struct TTO_MultipleSubst_ TTO_MultipleSubst; - - - /* LookupType 3 */ - - struct TTO_AlternateSet_ - { - TT_UShort GlyphCount; /* number of glyph IDs in the - Alternate array */ - TT_UShort* Alternate; /* array of alternate glyph IDs */ - }; - - typedef struct TTO_AlternateSet_ TTO_AlternateSet; - - - struct TTO_AlternateSubst_ - { - TT_UShort SubstFormat; /* always 1 */ - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort AlternateSetCount; - /* number of AlternateSet tables */ - TTO_AlternateSet* AlternateSet; /* array of AlternateSet tables */ - }; - - typedef struct TTO_AlternateSubst_ TTO_AlternateSubst; - - - /* LookupType 4 */ - - struct TTO_Ligature_ - { - TT_UShort LigGlyph; /* glyphID of ligature - to substitute */ - TT_UShort ComponentCount; /* number of components in ligature */ - TT_UShort* Component; /* array of component glyph IDs */ - }; - - typedef struct TTO_Ligature_ TTO_Ligature; - - - struct TTO_LigatureSet_ - { - TT_UShort LigatureCount; /* number of Ligature tables */ - TTO_Ligature* Ligature; /* array of Ligature tables */ - }; - - typedef struct TTO_LigatureSet_ TTO_LigatureSet; - - - struct TTO_LigatureSubst_ - { - TT_UShort SubstFormat; /* always 1 */ - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort LigatureSetCount; /* number of LigatureSet tables */ - TTO_LigatureSet* LigatureSet; /* array of LigatureSet tables */ - }; - - typedef struct TTO_LigatureSubst_ TTO_LigatureSubst; - - - /* needed by both lookup type 5 and 6 */ - - struct TTO_SubstLookupRecord_ - { - TT_UShort SequenceIndex; /* index into current - glyph sequence */ - TT_UShort LookupListIndex; /* Lookup to apply to that pos. */ - }; - - typedef struct TTO_SubstLookupRecord_ TTO_SubstLookupRecord; - - - /* LookupType 5 */ - - struct TTO_SubRule_ - { - TT_UShort GlyphCount; /* total number of input glyphs */ - TT_UShort SubstCount; /* number of SubstLookupRecord - tables */ - TT_UShort* Input; /* array of input glyph IDs */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of SubstLookupRecord - tables */ - }; - - typedef struct TTO_SubRule_ TTO_SubRule; - - - struct TTO_SubRuleSet_ - { - TT_UShort SubRuleCount; /* number of SubRule tables */ - TTO_SubRule* SubRule; /* array of SubRule tables */ - }; - - typedef struct TTO_SubRuleSet_ TTO_SubRuleSet; - - - struct TTO_ContextSubstFormat1_ - { - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort SubRuleSetCount; /* number of SubRuleSet tables */ - TTO_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */ - }; - - typedef struct TTO_ContextSubstFormat1_ TTO_ContextSubstFormat1; - - - struct TTO_SubClassRule_ - { - TT_UShort GlyphCount; /* total number of context classes */ - TT_UShort SubstCount; /* number of SubstLookupRecord - tables */ - TT_UShort* Class; /* array of classes */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of SubstLookupRecord - tables */ - }; - - typedef struct TTO_SubClassRule_ TTO_SubClassRule; - - - struct TTO_SubClassSet_ - { - TT_UShort SubClassRuleCount; - /* number of SubClassRule tables */ - TTO_SubClassRule* SubClassRule; /* array of SubClassRule tables */ - }; - - typedef struct TTO_SubClassSet_ TTO_SubClassSet; - - - /* The `MaxContextLength' field is not defined in the TTO specification - but simplifies the implementation of this format. It holds the - maximal context length used in the context rules. */ - - struct TTO_ContextSubstFormat2_ - { - TT_UShort MaxContextLength; - /* maximal context length */ - TTO_Coverage Coverage; /* Coverage table */ - TTO_ClassDefinition ClassDef; /* ClassDef table */ - TT_UShort SubClassSetCount; - /* number of SubClassSet tables */ - TTO_SubClassSet* SubClassSet; /* array of SubClassSet tables */ - }; - - typedef struct TTO_ContextSubstFormat2_ TTO_ContextSubstFormat2; - - - struct TTO_ContextSubstFormat3_ - { - TT_UShort GlyphCount; /* number of input glyphs */ - TT_UShort SubstCount; /* number of SubstLookupRecords */ - TTO_Coverage* Coverage; /* array of Coverage tables */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of substitution lookups */ - }; - - typedef struct TTO_ContextSubstFormat3_ TTO_ContextSubstFormat3; - - - struct TTO_ContextSubst_ - { - TT_UShort SubstFormat; /* 1, 2, or 3 */ - - union - { - TTO_ContextSubstFormat1 csf1; - TTO_ContextSubstFormat2 csf2; - TTO_ContextSubstFormat3 csf3; - } csf; - }; - - typedef struct TTO_ContextSubst_ TTO_ContextSubst; - - - /* LookupType 6 */ - - struct TTO_ChainSubRule_ - { - TT_UShort BacktrackGlyphCount; - /* total number of backtrack glyphs */ - TT_UShort* Backtrack; /* array of backtrack glyph IDs */ - TT_UShort InputGlyphCount; - /* total number of input glyphs */ - TT_UShort* Input; /* array of input glyph IDs */ - TT_UShort LookaheadGlyphCount; - /* total number of lookahead glyphs */ - TT_UShort* Lookahead; /* array of lookahead glyph IDs */ - TT_UShort SubstCount; /* number of SubstLookupRecords */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of SubstLookupRecords */ - }; - - typedef struct TTO_ChainSubRule_ TTO_ChainSubRule; - - - struct TTO_ChainSubRuleSet_ - { - TT_UShort ChainSubRuleCount; - /* number of ChainSubRule tables */ - TTO_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ - }; - - typedef struct TTO_ChainSubRuleSet_ TTO_ChainSubRuleSet; - - - struct TTO_ChainContextSubstFormat1_ - { - TTO_Coverage Coverage; /* Coverage table */ - TT_UShort ChainSubRuleSetCount; - /* number of ChainSubRuleSet tables */ - TTO_ChainSubRuleSet* ChainSubRuleSet; - /* array of ChainSubRuleSet tables */ - }; - - typedef struct TTO_ChainContextSubstFormat1_ TTO_ChainContextSubstFormat1; - - - struct TTO_ChainSubClassRule_ - { - TT_UShort BacktrackGlyphCount; - /* total number of backtrack - classes */ - TT_UShort* Backtrack; /* array of backtrack classes */ - TT_UShort InputGlyphCount; - /* total number of context classes */ - TT_UShort* Input; /* array of context classes */ - TT_UShort LookaheadGlyphCount; - /* total number of lookahead - classes */ - TT_UShort* Lookahead; /* array of lookahead classes */ - TT_UShort SubstCount; /* number of SubstLookupRecords */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of substitution lookups */ - }; - - typedef struct TTO_ChainSubClassRule_ TTO_ChainSubClassRule; - - - struct TTO_ChainSubClassSet_ - { - TT_UShort ChainSubClassRuleCount; - /* number of ChainSubClassRule - tables */ - TTO_ChainSubClassRule* ChainSubClassRule; - /* array of ChainSubClassRule - tables */ - }; - - typedef struct TTO_ChainSubClassSet_ TTO_ChainSubClassSet; - - - /* The `MaxXXXLength' fields are not defined in the TTO specification - but simplifies the implementation of this format. It holds the - maximal context length used in the specific context rules. */ - - struct TTO_ChainContextSubstFormat2_ - { - TTO_Coverage Coverage; /* Coverage table */ - - TT_UShort MaxBacktrackLength; - /* maximal backtrack length */ - TTO_ClassDefinition BacktrackClassDef; - /* BacktrackClassDef table */ - TT_UShort MaxInputLength; - /* maximal input length */ - TTO_ClassDefinition InputClassDef; - /* InputClassDef table */ - TT_UShort MaxLookaheadLength; - /* maximal lookahead length */ - TTO_ClassDefinition LookaheadClassDef; - /* LookaheadClassDef table */ - - TT_UShort ChainSubClassSetCount; - /* number of ChainSubClassSet - tables */ - TTO_ChainSubClassSet* ChainSubClassSet; - /* array of ChainSubClassSet - tables */ - }; - - typedef struct TTO_ChainContextSubstFormat2_ TTO_ChainContextSubstFormat2; - - - struct TTO_ChainContextSubstFormat3_ - { - TT_UShort BacktrackGlyphCount; - /* number of backtrack glyphs */ - TTO_Coverage* BacktrackCoverage; - /* array of backtrack Coverage - tables */ - TT_UShort InputGlyphCount; - /* number of input glyphs */ - TTO_Coverage* InputCoverage; - /* array of input coverage - tables */ - TT_UShort LookaheadGlyphCount; - /* number of lookahead glyphs */ - TTO_Coverage* LookaheadCoverage; - /* array of lookahead coverage - tables */ - TT_UShort SubstCount; /* number of SubstLookupRecords */ - TTO_SubstLookupRecord* SubstLookupRecord; - /* array of substitution lookups */ - }; - - typedef struct TTO_ChainContextSubstFormat3_ TTO_ChainContextSubstFormat3; - - - struct TTO_ChainContextSubst_ - { - TT_UShort SubstFormat; /* 1, 2, or 3 */ - - union - { - TTO_ChainContextSubstFormat1 ccsf1; - TTO_ChainContextSubstFormat2 ccsf2; - TTO_ChainContextSubstFormat3 ccsf3; - } ccsf; - }; - - typedef struct TTO_ChainContextSubst_ TTO_ChainContextSubst; - - - union TTO_GSUB_SubTable_ - { - TTO_SingleSubst single; - TTO_MultipleSubst multiple; - TTO_AlternateSubst alternate; - TTO_LigatureSubst ligature; - TTO_ContextSubst context; - TTO_ChainContextSubst chain; - }; - - typedef union TTO_GSUB_SubTable_ TTO_GSUB_SubTable; - - - /* A simple string object. It can both `send' and `receive' data. - In case of sending, `length' and `pos' will be used. In case of - receiving, `pos' points to the first free slot, and `allocated' - specifies the amount of allocated memory (and the `length' field - will be ignored). The routine TT_Add_String() will increase the - amount of memory if necessary. After end of receive, `length' - should be set to the value of `pos', and `pos' will be set to zero. - - `properties' (which is treated as a bit field) gives the glyph's - properties: If a certain bit is set for a glyph, the feature which - has the same bit set in its property value is applied. - - NEVER modify any elements of the structure! You should rather copy - its contents if necessary. - - TT_Add_String() will also handle allocation; you should use - free() in case you want to destroy the arrays in the object. */ - - struct TTO_GSUB_String_ - { - TT_ULong length; - TT_ULong pos; - TT_ULong allocated; - TT_UShort* string; - TT_UShort* properties; - }; - - typedef struct TTO_GSUB_String_ TTO_GSUB_String; - - - /* finally, the GSUB API */ - - EXPORT_DEF - TT_Error TT_Init_GSUB_Extension( TT_Engine engine ); - - EXPORT_DEF - TT_Error TT_Load_GSUB_Table( TT_Face face, - TTO_GSUBHeader* gsub, - TTO_GDEFHeader* gdef ); - - EXPORT_DEF - TT_Error TT_GSUB_Select_Script( TTO_GSUBHeader* gsub, - TT_ULong script_tag, - TT_UShort* script_index ); - EXPORT_DEF - TT_Error TT_GSUB_Select_Language( TTO_GSUBHeader* gsub, - TT_ULong language_tag, - TT_UShort script_index, - TT_UShort* language_index, - TT_UShort* req_feature_index ); - EXPORT_DEF - TT_Error TT_GSUB_Select_Feature( TTO_GSUBHeader* gsub, - TT_ULong feature_tag, - TT_UShort script_index, - TT_UShort language_index, - TT_UShort* feature_index ); - - EXPORT_DEF - TT_Error TT_GSUB_Query_Scripts( TTO_GSUBHeader* gsub, - TT_ULong** script_tag_list ); - EXPORT_DEF - TT_Error TT_GSUB_Query_Languages( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_ULong** language_tag_list ); - EXPORT_DEF - TT_Error TT_GSUB_Query_Features( TTO_GSUBHeader* gsub, - TT_UShort script_index, - TT_UShort language_index, - TT_ULong** feature_tag_list ); - - EXPORT_DEF - TT_Error TT_GSUB_Add_Feature( TTO_GSUBHeader* gsub, - TT_UShort feature_index, - TT_UShort property ); - EXPORT_DEF - TT_Error TT_GSUB_Clear_Features( TTO_GSUBHeader* gsub ); - - EXPORT_DEF - TT_Error TT_GSUB_Register_Alternate_Function( TTO_GSUBHeader* gsub, - TTO_AltFunction alt, - void* data ); - - EXPORT_DEF - TT_Error TT_GSUB_Apply_String( TTO_GSUBHeader* gsub, - TTO_GSUB_String* in, - TTO_GSUB_String* out ); - - EXPORT_DEF - TT_Error TT_GSUB_Add_String( TTO_GSUB_String* in, - TT_UShort num_in, - TTO_GSUB_String* out, - TT_UShort num_out, - TT_UShort* data ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXGSUB_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxkern.c diff -u xc/extras/FreeType/lib/extend/ftxkern.c:1.1.1.2 xc/extras/FreeType/lib/extend/ftxkern.c:removed --- xc/extras/FreeType/lib/extend/ftxkern.c:1.1.1.2 Sat Feb 12 23:56:06 2000 +++ xc/extras/FreeType/lib/extend/ftxkern.c Wed Mar 16 20:59:45 2005 @@ -1,564 +0,0 @@ -/******************************************************************* - * - * ftxkern.c 1.0 - * - * Kerning support extension. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The kerning support is currently part of the engine extensions. - * - ******************************************************************/ - -#include "ftxkern.h" - -#include "ttextend.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttmemory.h" -#include "ttfile.h" -#include "ttobjs.h" -#include "ttload.h" /* For the macros */ -#include "tttags.h" - -/* Required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_any - -#define KERNING_ID Build_Extension_ID( 'k', 'e', 'r', 'n' ) - - -/******************************************************************* - * - * Function : SubTable_Load_0 - * - * Description : Loads a format 0 kerning subtable data. - * - * Input : kern0 pointer to the kerning subtable - * - * Output : error code - * - * Notes : - Assumes that the stream is already `used' - * - * - the file cursor must be set by the caller - * - * - in case of error, the function _must_ destroy - * the data it allocates! - * - ******************************************************************/ - - static TT_Error Subtable_Load_0( TT_Kern_0* kern0, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort num_pairs, n; - - - if ( ACCESS_Frame( 8L ) ) - return error; - - num_pairs = GET_UShort(); - kern0->nPairs = 0; - kern0->searchRange = GET_UShort(); - kern0->entrySelector = GET_UShort(); - kern0->rangeShift = GET_UShort(); - - /* we only set kern0->nPairs if the subtable has been loaded */ - - FORGET_Frame(); - - if ( ALLOC_ARRAY( kern0->pairs, num_pairs, TT_Kern_0_Pair ) ) - return error; - - if ( ACCESS_Frame( num_pairs * 6L ) ) - goto Fail; - - for ( n = 0; n < num_pairs; n++ ) - { - kern0->pairs[n].left = GET_UShort(); - kern0->pairs[n].right = GET_UShort(); - kern0->pairs[n].value = GET_UShort(); - - if ( kern0->pairs[n].left >= input->numGlyphs || - kern0->pairs[n].right >= input->numGlyphs ) - { - FORGET_Frame(); - error = TT_Err_Invalid_Kerning_Table; - goto Fail; - } - } - - FORGET_Frame(); - - /* we're ok, set the pairs count */ - kern0->nPairs = num_pairs; - - return TT_Err_Ok; - - Fail: - FREE( kern0->pairs ); - return error; - } - - -/******************************************************************* - * - * Function : SubTable_Load_2 - * - * Description : Loads a format 2 kerning subtable data. - * - * Input : kern2 pointer to the kerning subtable - * length subtable length. This is required as - * the subheader doesn't give any indication - * of the size of the `array' table. - * - * Output : error code - * - * Notes : - Assumes that the stream is already `used' - * - * - the file cursor must be set by the caller - * - * - in case of error, the function _must_ destroy - * the data it allocates! - * - ******************************************************************/ - - static TT_Error Subtable_Load_2( TT_Kern_2* kern2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - Long table_base; - - UShort left_offset, right_offset, array_offset; - ULong array_size; - UShort left_max, right_max, n; - - - /* record the table offset */ - table_base = FILE_Pos(); - - if ( ACCESS_Frame( 8L ) ) - return error; - - kern2->rowWidth = GET_UShort(); - left_offset = GET_UShort(); - right_offset = GET_UShort(); - array_offset = GET_UShort(); - - FORGET_Frame(); - - /* first load left and right glyph classes */ - - if ( FILE_Seek( table_base + left_offset ) || - ACCESS_Frame( 4L ) ) - return error; - - kern2->leftClass.firstGlyph = GET_UShort(); - kern2->leftClass.nGlyphs = GET_UShort(); - - FORGET_Frame(); - - if ( ALLOC_ARRAY( kern2->leftClass.classes, - kern2->leftClass.nGlyphs, - UShort ) ) - return error; - - /* load left offsets */ - - if ( ACCESS_Frame( kern2->leftClass.nGlyphs * 2L ) ) - goto Fail_Left; - - for ( n = 0; n < kern2->leftClass.nGlyphs; n++ ) - kern2->leftClass.classes[n] = GET_UShort(); - - FORGET_Frame(); - - /* right class */ - - if ( FILE_Seek( table_base + right_offset ) || - ACCESS_Frame( 4L ) ) - goto Fail_Left; - - kern2->rightClass.firstGlyph = GET_UShort(); - kern2->rightClass.nGlyphs = GET_UShort(); - - FORGET_Frame(); - - if ( ALLOC_ARRAY( kern2->rightClass.classes, - kern2->rightClass.nGlyphs, - UShort ) ) - goto Fail_Left; - - /* load right offsets */ - - if ( ACCESS_Frame( kern2->rightClass.nGlyphs * 2L ) ) - goto Fail_Right; - - for ( n = 0; n < kern2->rightClass.nGlyphs; n++ ) - kern2->rightClass.classes[n] = GET_UShort(); - - FORGET_Frame(); - - /* Now load the kerning array. We don't have its size, we */ - /* must compute it from what we know. */ - - /* We thus compute the maximum left and right offsets and */ - /* add them to get the array size. */ - - left_max = right_max = 0; - - for ( n = 0; n < kern2->leftClass.nGlyphs; n++ ) - left_max = MAX( left_max, kern2->leftClass.classes[n] ); - - for ( n = 0; n < kern2->rightClass.nGlyphs; n++ ) - right_max = MAX( right_max, kern2->leftClass.classes[n] ); - - array_size = left_max + right_max + 2; - - if ( ALLOC( kern2->array, array_size ) ) - goto Fail_Right; - - if ( ACCESS_Frame( array_size ) ) - goto Fail_Array; - - for ( n = 0; n < array_size/2; n++ ) - kern2->array[n] = GET_Short(); - - FORGET_Frame(); - - /* we're good now */ - - return TT_Err_Ok; - - Fail_Array: - FREE( kern2->array ); - - Fail_Right: - FREE( kern2->rightClass.classes ); - kern2->rightClass.nGlyphs = 0; - - Fail_Left: - FREE( kern2->leftClass.classes ); - kern2->leftClass.nGlyphs = 0; - - return error; - } - - -/******************************************************************* - * - * Function : Kerning_Create - * - * Description : Creates the kerning directory if a face is - * loaded. The tables however are loaded on - * demand to save space. - * - * Input : face pointer to the parent face object - * kern pointer to the extension's kerning field - * - * Output : error code - * - * Notes : as in all constructors, the memory allocated isn't - * released in case of failure. Rather, the task is left - * to the destructor (which is called if an error - * occurs during the loading of a face). - * - ******************************************************************/ - - static TT_Error Kerning_Create( void* ext, - PFace face ) - { - DEFINE_LOAD_LOCALS( face->stream ); - - TT_Kerning* kern = (TT_Kerning*)ext; - UShort num_tables; - Long table; - - TT_Kern_Subtable* sub; - - - /* by convention */ - if ( !kern ) - return TT_Err_Ok; - - /* Now load the kerning directory. We're called from the face */ - /* constructor. We thus need not use the stream. */ - - kern->version = 0; - kern->nTables = 0; - kern->tables = NULL; - - table = TT_LookUp_Table( face, TTAG_kern ); - if ( table < 0 ) - return TT_Err_Ok; /* The table is optional */ - - if ( FILE_Seek( face->dirTables[table].Offset ) || - ACCESS_Frame( 4L ) ) - return error; - - kern->version = GET_UShort(); - num_tables = GET_UShort(); - - FORGET_Frame(); - - /* we don't set kern->nTables until we have allocated the array */ - - if ( ALLOC_ARRAY( kern->tables, num_tables, TT_Kern_Subtable ) ) - return error; - - kern->nTables = num_tables; - - /* now load the directory entries, but do _not_ load the tables ! */ - - sub = kern->tables; - - for ( table = 0; table < num_tables; table++ ) - { - if ( ACCESS_Frame( 6L ) ) - return error; - - sub->loaded = FALSE; /* redundant, but good to see */ - sub->version = GET_UShort(); - sub->length = GET_UShort() - 6; /* substract header length */ - sub->format = GET_Byte(); - sub->coverage = GET_Byte(); - - FORGET_Frame(); - - sub->offset = FILE_Pos(); - - /* now skip to the next table */ - - if ( FILE_Skip( sub->length ) ) - return error; - - sub++; - } - - /* that's fine, leave now */ - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : Kerning_Destroy - * - * Description : Destroys all kerning information. - * - * Input : kern pointer to the extension's kerning field - * - * Output : error code - * - * Notes : This function is a destructor; it must be able - * to destroy partially built tables. - * - ******************************************************************/ - - static TT_Error Kerning_Destroy( void* ext, - PFace face ) - { - TT_Kerning* kern = (TT_Kerning*)ext; - TT_Kern_Subtable* sub; - UShort n; - - - /* by convention */ - if ( !kern ) - return TT_Err_Ok; - - if ( kern->nTables == 0 ) - return TT_Err_Ok; /* no tables to release */ - - /* scan the table directory and release loaded entries */ - - sub = kern->tables; - for ( n = 0; n < kern->nTables; n++ ) - { - if ( sub->loaded ) - { - switch ( sub->format ) - { - case 0: - FREE( sub->t.kern0.pairs ); - sub->t.kern0.nPairs = 0; - sub->t.kern0.searchRange = 0; - sub->t.kern0.entrySelector = 0; - sub->t.kern0.rangeShift = 0; - break; - - case 2: - FREE( sub->t.kern2.leftClass.classes ); - sub->t.kern2.leftClass.firstGlyph = 0; - sub->t.kern2.leftClass.nGlyphs = 0; - - FREE( sub->t.kern2.rightClass.classes ); - sub->t.kern2.rightClass.firstGlyph = 0; - sub->t.kern2.rightClass.nGlyphs = 0; - - FREE( sub->t.kern2.array ); - sub->t.kern2.rowWidth = 0; - break; - - default: - ; /* invalid subtable format - do nothing */ - } - - sub->loaded = FALSE; - sub->version = 0; - sub->offset = 0; - sub->length = 0; - sub->coverage = 0; - sub->format = 0; - } - sub++; - } - - FREE( kern->tables ); - kern->nTables = 0; - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function : TT_Get_Kerning_Directory - * - * Description : Returns a given face's kerning directory. - * - * Input : face handle to the face object - * directory pointer to client's target directory - * - * Output : error code - * - * Notes : The kerning table directory is loaded with the face - * through the extension constructor. However, the kerning - * tables themselves are only loaded on demand, as they - * may represent a lot of data, unneeded by most uses of - * the engine. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Kerning_Directory( TT_Face face, - TT_Kerning* directory ) - { - PFace faze = HANDLE_Face( face ); - TT_Error error; - TT_Kerning* kerning; - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - /* copy directory header */ - error = TT_Extension_Get( faze, KERNING_ID, (void**)&kerning ); - if ( !error ) - *directory = *kerning; - - return error; - } - - -/******************************************************************* - * - * Function : TT_Load_Kerning_Table - * - * Description : Loads a kerning table intro memory. - * - * Input : face face handle - * kern_index index in the face's kerning directory - * - * Output : error code - * - * Notes : - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Load_Kerning_Table( TT_Face face, - TT_UShort kern_index ) - { - TT_Error error; - TT_Stream stream; - - TT_Kerning* kern; - TT_Kern_Subtable* sub; - - - PFace faze = HANDLE_Face( face ); - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - error = TT_Extension_Get( faze, KERNING_ID, (void**)&kern ); - if ( error ) - return error; - - if ( kern->nTables == 0 ) - return TT_Err_Table_Missing; - - if ( kern_index >= kern->nTables ) - return TT_Err_Invalid_Argument; - - sub = kern->tables + kern_index; - - if ( sub->format != 0 && sub->format != 2 ) - return TT_Err_Invalid_Kerning_Table_Format; - - /* now access stream */ - if ( USE_Stream( faze->stream, stream ) ) - return error; - - if ( FILE_Seek( sub->offset ) ) - goto Fail; - - if ( sub->format == 0 ) - error = Subtable_Load_0( &sub->t.kern0, faze ); - else if ( sub->format == 2 ) - error = Subtable_Load_2( &sub->t.kern2, faze ); - - if ( !error ) - sub->loaded = TRUE; - - Fail: - /* release stream */ - DONE_Stream( stream ); - - return error; - } - - - EXPORT_FUNC - TT_Error TT_Init_Kerning_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - TT_Error error; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - error = TT_Register_Extension( _engine, - KERNING_ID, - sizeof ( TT_Kerning ), - Kerning_Create, - Kerning_Destroy ); - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxkern.h diff -u xc/extras/FreeType/lib/extend/ftxkern.h:1.1.1.2 xc/extras/FreeType/lib/extend/ftxkern.h:removed --- xc/extras/FreeType/lib/extend/ftxkern.h:1.1.1.2 Sat Feb 12 23:56:07 2000 +++ xc/extras/FreeType/lib/extend/ftxkern.h Wed Mar 16 20:59:45 2005 @@ -1,181 +0,0 @@ -/******************************************************************* - * - * ftxkern.h 1.0 - * - * High-Level API Kerning extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The kerning support is currently part of the engine extensions. - * - * This file should _not_ depend on engine internal types. - * - ******************************************************************/ - -#ifndef FTXKERN_H -#define FTXKERN_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /* The kerning support in FreeType is minimal. This means that */ - /* we do not try to interpret the kerning data in any way to */ - /* `cook' it for a user application. This API lets you access */ - /* directly the kerning tables found in the TrueType file; it's */ - /* up to the client application to apply its own processing on */ - /* these. */ - - /* The reason for this is that we generally do not encourage */ - /* feature-bloat of the core engine. Moreover, not all */ - /* libraries or font servers really need kerning data, or all */ - /* formats of this data. */ - - /************** kerning error codes *****************************/ - - /* we choose the class 0x0A for our errors, this should not */ - /* match with any error code class used in any other extension */ - -#define TT_Err_Invalid_Kerning_Table_Format 0x0A00 -#define TT_Err_Invalid_Kerning_Table 0x0A01 - - - /********** structures definitions ******************************/ - - /* Remember that all types and function are accessible by client */ - /* applications in this section, and thus should have the `TT_' */ - /* prefix. */ - - /* format 0 kerning pair */ - - struct TT_Kern_0_Pair_ - { - TT_UShort left; /* index of left glyph in pair */ - TT_UShort right; /* index of right glyph in pair */ - TT_FWord value; /* kerning value */ - }; - - typedef struct TT_Kern_0_Pair_ TT_Kern_0_Pair; - - - /* format 0 kerning subtable */ - - struct TT_Kern_0_ - { - TT_UShort nPairs; /* number of kerning pairs */ - - TT_UShort searchRange; /* these values are defined by the TT spec */ - TT_UShort entrySelector; /* for table searchs. */ - TT_UShort rangeShift; - - TT_Kern_0_Pair* pairs; /* a table of nPairs `pairs' */ - }; - - typedef struct TT_Kern_0_ TT_Kern_0; - - - /* format 2 kerning glyph class */ - - struct TT_Kern_2_Class_ - { - TT_UShort firstGlyph; /* first glyph in range */ - TT_UShort nGlyphs; /* number of glyphs in range */ - TT_UShort* classes; /* a table giving for each ranged glyph */ - /* its class offset in the subtable pairs */ - /* two-dimensional array */ - }; - - typedef struct TT_Kern_2_Class_ TT_Kern_2_Class; - - - /* format 2 kerning subtable */ - - struct TT_Kern_2_ - { - TT_UShort rowWidth; /* length of one row in bytes */ - TT_Kern_2_Class leftClass; /* left class table */ - TT_Kern_2_Class rightClass; /* right class table */ - TT_FWord* array; /* 2-dimensional kerning values array */ - }; - - typedef struct TT_Kern_2_ TT_Kern_2; - - - /* kerning subtable */ - - struct TT_Kern_Subtable_ - { - TT_Bool loaded; /* boolean; indicates whether the table is */ - /* loaded */ - TT_UShort version; /* table version number */ - TT_Long offset; /* file offset of table */ - TT_UShort length; /* length of table, _excluding_ header */ - TT_Byte coverage; /* lower 8 bit of the coverage table entry */ - TT_Byte format; /* the subtable format, as found in the */ - /* higher 8 bits of the coverage table entry */ - union - { - TT_Kern_0 kern0; - TT_Kern_2 kern2; - } t; - }; - - typedef struct TT_Kern_Subtable_ TT_Kern_Subtable; - - - struct TT_Kerning_ - { - TT_UShort version; /* kern table version number. starts at 0 */ - TT_UShort nTables; /* number of tables */ - - TT_Kern_Subtable* tables; /* the kerning sub-tables */ - }; - - typedef struct TT_Kerning_ TT_Kerning; - - - - /***************** high-level API extension **************************/ - - /* Initialize Kerning extension, must be called after */ - /* TT_Init_FreeType(). There is no need for a finalizer */ - EXPORT_DEF - TT_Error TT_Init_Kerning_Extension( TT_Engine engine ); - - /* Note on the implemented mechanism: */ - - /* The kerning table directory is loaded with the face through the */ - /* extension constructor. However, the tables will only be loaded */ - /* on demand, as they may represent a lot of data, unnecessary to */ - /* most applications. */ - - /* Queries a pointer to the kerning directory for the face object */ - EXPORT_DEF - TT_Error TT_Get_Kerning_Directory( TT_Face face, - TT_Kerning* directory ); - - /* Load the kerning table number `kern_index' in the kerning */ - /* directory. The table will stay in memory until the `face' */ - /* face is destroyed. */ - EXPORT_DEF - TT_Error TT_Load_Kerning_Table( TT_Face face, - TT_UShort kern_index ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXKERN_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxopen.c diff -u xc/extras/FreeType/lib/extend/ftxopen.c:1.1.1.3 xc/extras/FreeType/lib/extend/ftxopen.c:removed --- xc/extras/FreeType/lib/extend/ftxopen.c:1.1.1.3 Sat Feb 12 23:56:07 2000 +++ xc/extras/FreeType/lib/extend/ftxopen.c Wed Mar 16 20:59:45 2005 @@ -1,1439 +0,0 @@ -/******************************************************************* - * - * ftxopen.c - * - * TrueType Open common table support. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "tttypes.h" -#include "ttload.h" -#include "ttextend.h" -#include "ttmemory.h" -#include "ttfile.h" - -#include "ftxopen.h" -#include "ftxopenf.h" - - - /*************************** - * Script related functions - ***************************/ - - - /* LangSys */ - - static TT_Error Load_LangSys( TTO_LangSys* ls, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* fi; - - - if ( ACCESS_Frame( 6L ) ) - return error; - - ls->LookupOrderOffset = GET_UShort(); /* should be 0 */ - ls->ReqFeatureIndex = GET_UShort(); - count = ls->FeatureCount = GET_UShort(); - - FORGET_Frame(); - - ls->FeatureIndex = NULL; - - if ( ALLOC_ARRAY( ls->FeatureIndex, count, UShort ) ) - return error; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( ls->FeatureIndex ); - return error; - } - - fi = ls->FeatureIndex; - - for ( n = 0; n < count; n++ ) - fi[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - static void Free_LangSys( TTO_LangSys* ls ) - { - FREE( ls->FeatureIndex ); - } - - - /* Script */ - - static TT_Error Load_Script( TTO_Script* s, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_LangSysRecord* lsr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - if ( new_offset != base_offset ) /* not a NULL offset */ - { - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LangSys( &s->DefaultLangSys, - input ) ) != TT_Err_Ok ) - return error; - (void)FILE_Seek( cur_offset ); - } - else - { - /* we create a DefaultLangSys table with no entries */ - - s->DefaultLangSys.LookupOrderOffset = 0; - s->DefaultLangSys.ReqFeatureIndex = 0xFFFF; - s->DefaultLangSys.FeatureCount = 0; - s->DefaultLangSys.FeatureIndex = NULL; - } - - if ( ACCESS_Frame( 2L ) ) - goto Fail2; - - count = s->LangSysCount = GET_UShort(); - - /* safety check; otherwise the official handling of TrueType Open - fonts won't work */ - - if ( s->LangSysCount == 0 && s->DefaultLangSys.FeatureCount == 0 ) - { - error = TTO_Err_Invalid_SubTable; - goto Fail2; - } - - FORGET_Frame(); - - s->LangSysRecord = NULL; - - if ( ALLOC_ARRAY( s->LangSysRecord, count, TTO_LangSysRecord ) ) - goto Fail2; - - lsr = s->LangSysRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 6L ) ) - goto Fail1; - - lsr[n].LangSysTag = GET_ULong(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_LangSys( &lsr[n].LangSys, input ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - for ( n = 0; n < count; n++ ) - Free_LangSys( &lsr[n].LangSys ); - - FREE( s->LangSysRecord ); - - Fail2: - Free_LangSys( &s->DefaultLangSys ); - return error; - } - - - static void Free_Script( TTO_Script* s ) - { - UShort n, count; - - TTO_LangSysRecord* lsr; - - - Free_LangSys( &s->DefaultLangSys ); - - if ( s->LangSysRecord ) - { - count = s->LangSysCount; - lsr = s->LangSysRecord; - - for ( n = 0; n < count; n++ ) - Free_LangSys( &lsr[n].LangSys ); - - FREE( lsr ); - } - } - - - /* ScriptList */ - - TT_Error Load_ScriptList( TTO_ScriptList* sl, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_ScriptRecord* sr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = sl->ScriptCount = GET_UShort(); - - FORGET_Frame(); - - sl->ScriptRecord = NULL; - - if ( ALLOC_ARRAY( sl->ScriptRecord, count, TTO_ScriptRecord ) ) - return error; - - sr = sl->ScriptRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 6L ) ) - goto Fail; - - sr[n].ScriptTag = GET_ULong(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Script( &sr[n].Script, input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_Script( &sr[n].Script ); - - FREE( sl->ScriptRecord ); - return error; - } - - - void Free_ScriptList( TTO_ScriptList* sl ) - { - UShort n, count; - - TTO_ScriptRecord* sr; - - - if ( sl->ScriptRecord ) - { - count = sl->ScriptCount; - sr = sl->ScriptRecord; - - for ( n = 0; n < count; n++ ) - Free_Script( &sr[n].Script ); - - FREE( sr ); - } - } - - - - /********************************* - * Feature List related functions - *********************************/ - - - /* Feature */ - - static TT_Error Load_Feature( TTO_Feature* f, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* lli; - - - if ( ACCESS_Frame( 4L ) ) - return error; - - f->FeatureParams = GET_UShort(); /* should be 0 */ - count = f->LookupListCount = GET_UShort(); - - FORGET_Frame(); - - f->LookupListIndex = NULL; - - if ( ALLOC_ARRAY( f->LookupListIndex, count, UShort ) ) - return error; - - lli = f->LookupListIndex; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( f->LookupListIndex ); - return error; - } - - for ( n = 0; n < count; n++ ) - lli[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - static void Free_Feature( TTO_Feature* f ) - { - FREE( f->LookupListIndex ); - } - - - /* FeatureList */ - - TT_Error Load_FeatureList( TTO_FeatureList* fl, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_FeatureRecord* fr; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = fl->FeatureCount = GET_UShort(); - - FORGET_Frame(); - - fl->FeatureRecord = NULL; - - if ( ALLOC_ARRAY( fl->FeatureRecord, count, TTO_FeatureRecord ) ) - return error; - - fr = fl->FeatureRecord; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 6L ) ) - goto Fail; - - fr[n].FeatureTag = GET_ULong(); - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Feature( &fr[n].Feature, input ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_Feature( &fr[n].Feature ); - - FREE( fl->FeatureRecord ); - return error; - } - - - void Free_FeatureList( TTO_FeatureList* fl ) - { - UShort n, count; - - TTO_FeatureRecord* fr; - - - if ( fl->FeatureRecord ) - { - count = fl->FeatureCount; - fr = fl->FeatureRecord; - - for ( n = 0; n < count; n++ ) - Free_Feature( &fr[n].Feature ); - - FREE( fr ); - } - } - - - - /******************************** - * Lookup List related functions - ********************************/ - - /* the subroutines of the following two functions are defined in - ftxgsub.c and ftxgpos.c respectively */ - - - /* SubTable */ - - static TT_Error Load_SubTable( TTO_SubTable* st, - PFace input, - TTO_Type table_type, - UShort lookup_type ) - { - if ( table_type == GSUB ) - switch ( lookup_type ) - { - case GSUB_LOOKUP_SINGLE: - return Load_SingleSubst( &st->st.gsub.single, input ); - - case GSUB_LOOKUP_MULTIPLE: - return Load_MultipleSubst( &st->st.gsub.multiple, input ); - - case GSUB_LOOKUP_ALTERNATE: - return Load_AlternateSubst( &st->st.gsub.alternate, input ); - - case GSUB_LOOKUP_LIGATURE: - return Load_LigatureSubst( &st->st.gsub.ligature, input ); - - case GSUB_LOOKUP_CONTEXT: - return Load_ContextSubst( &st->st.gsub.context, input ); - - case GSUB_LOOKUP_CHAIN: - return Load_ChainContextSubst( &st->st.gsub.chain, input ); - - default: - return TTO_Err_Invalid_GSUB_SubTable_Format; - } - else - switch ( lookup_type ) - { - case GPOS_LOOKUP_SINGLE: - return Load_SinglePos( &st->st.gpos.single, input ); - - case GPOS_LOOKUP_PAIR: - return Load_PairPos( &st->st.gpos.pair, input ); - - case GPOS_LOOKUP_CURSIVE: - return Load_CursivePos( &st->st.gpos.cursive, input ); - - case GPOS_LOOKUP_MARKBASE: - return Load_MarkBasePos( &st->st.gpos.markbase, input ); - - case GPOS_LOOKUP_MARKLIG: - return Load_MarkLigPos( &st->st.gpos.marklig, input ); - - case GPOS_LOOKUP_MARKMARK: - return Load_MarkMarkPos( &st->st.gpos.markmark, input ); - - case GPOS_LOOKUP_CONTEXT: - return Load_ContextPos( &st->st.gpos.context, input ); - - case GPOS_LOOKUP_CHAIN: - return Load_ChainContextPos ( &st->st.gpos.chain, input ); - - default: - return TTO_Err_Invalid_GPOS_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - static void Free_SubTable( TTO_SubTable* st, - TTO_Type table_type, - UShort lookup_type ) - { - if ( table_type == GSUB ) - switch ( lookup_type ) - { - case GSUB_LOOKUP_SINGLE: - Free_SingleSubst( &st->st.gsub.single ); - break; - - case GSUB_LOOKUP_MULTIPLE: - Free_MultipleSubst( &st->st.gsub.multiple ); - break; - - case GSUB_LOOKUP_ALTERNATE: - Free_AlternateSubst( &st->st.gsub.alternate ); - break; - - case GSUB_LOOKUP_LIGATURE: - Free_LigatureSubst( &st->st.gsub.ligature ); - break; - - case GSUB_LOOKUP_CONTEXT: - Free_ContextSubst( &st->st.gsub.context ); - break; - - case GSUB_LOOKUP_CHAIN: - Free_ChainContextSubst( &st->st.gsub.chain ); - break; - } - else - switch ( lookup_type ) - { - case GPOS_LOOKUP_SINGLE: - Free_SinglePos( &st->st.gpos.single ); - break; - - case GPOS_LOOKUP_PAIR: - Free_PairPos( &st->st.gpos.pair ); - break; - - case GPOS_LOOKUP_CURSIVE: - Free_CursivePos( &st->st.gpos.cursive ); - break; - - case GPOS_LOOKUP_MARKBASE: - Free_MarkBasePos( &st->st.gpos.markbase ); - break; - - case GPOS_LOOKUP_MARKLIG: - Free_MarkLigPos( &st->st.gpos.marklig ); - break; - - case GPOS_LOOKUP_MARKMARK: - Free_MarkMarkPos( &st->st.gpos.markmark ); - break; - - case GPOS_LOOKUP_CONTEXT: - Free_ContextPos( &st->st.gpos.context ); - break; - - case GPOS_LOOKUP_CHAIN: - Free_ChainContextPos ( &st->st.gpos.chain ); - break; - } - } - - - /* Lookup */ - - static TT_Error Load_Lookup( TTO_Lookup* l, - PFace input, - TTO_Type type ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_SubTable* st; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 6L ) ) - return error; - - l->LookupType = GET_UShort(); - l->LookupFlag = GET_UShort(); - count = l->SubTableCount = GET_UShort(); - - FORGET_Frame(); - - l->SubTable = NULL; - - if ( ALLOC_ARRAY( l->SubTable, count, TTO_SubTable ) ) - return error; - - st = l->SubTable; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_SubTable( &st[n], input, - type, l->LookupType ) ) != TT_Err_Ok ) - goto Fail; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail: - for ( n = 0; n < count; n++ ) - Free_SubTable( &st[n], type, l->LookupType ); - - FREE( l->SubTable ); - return error; - } - - - static void Free_Lookup( TTO_Lookup* l, - TTO_Type type ) - { - UShort n, count; - - TTO_SubTable* st; - - - if ( l->SubTable ) - { - count = l->SubTableCount; - st = l->SubTable; - - for ( n = 0; n < count; n++ ) - Free_SubTable( &st[n], type, l->LookupType ); - - FREE( st ); - } - } - - - /* LookupList */ - - TT_Error Load_LookupList( TTO_LookupList* ll, - PFace input, - TTO_Type type ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - ULong cur_offset, new_offset, base_offset; - - TTO_Lookup* l; - - - base_offset = FILE_Pos(); - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = ll->LookupCount = GET_UShort(); - - FORGET_Frame(); - - ll->Lookup = NULL; - - if ( ALLOC_ARRAY( ll->Lookup, count, TTO_Lookup ) ) - return error; - if ( ALLOC_ARRAY( ll->Properties, count, UShort ) ) - goto Fail2; - - l = ll->Lookup; - - for ( n = 0; n < count; n++ ) - { - if ( ACCESS_Frame( 2L ) ) - goto Fail1; - - new_offset = GET_UShort() + base_offset; - - FORGET_Frame(); - - cur_offset = FILE_Pos(); - if ( FILE_Seek( new_offset ) || - ( error = Load_Lookup( &l[n], input, type ) ) != TT_Err_Ok ) - goto Fail1; - (void)FILE_Seek( cur_offset ); - } - - return TT_Err_Ok; - - Fail1: - FREE( ll->Properties ); - - for ( n = 0; n < count; n++ ) - Free_Lookup( &l[n], type ); - - Fail2: - FREE( ll->Lookup ); - return error; - } - - - void Free_LookupList( TTO_LookupList* ll, - TTO_Type type ) - { - UShort n, count; - - TTO_Lookup* l; - - - FREE( ll->Properties ); - - if ( ll->Lookup ) - { - count = ll->LookupCount; - l = ll->Lookup; - - for ( n = 0; n < count; n++ ) - Free_Lookup( &l[n], type ); - - FREE( l ); - } - } - - - - /***************************** - * Coverage related functions - *****************************/ - - - /* CoverageFormat1 */ - - static TT_Error Load_Coverage1( TTO_CoverageFormat1* cf1, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* ga; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cf1->GlyphCount = GET_UShort(); - - FORGET_Frame(); - - cf1->GlyphArray = NULL; - - if ( ALLOC_ARRAY( cf1->GlyphArray, count, UShort ) ) - return error; - - ga = cf1->GlyphArray; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( cf1->GlyphArray ); - return error; - } - - for ( n = 0; n < count; n++ ) - ga[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - static void Free_Coverage1( TTO_CoverageFormat1* cf1 ) - { - FREE( cf1->GlyphArray ); - } - - - /* CoverageFormat2 */ - - static TT_Error Load_Coverage2( TTO_CoverageFormat2* cf2, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - TTO_RangeRecord* rr; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cf2->RangeCount = GET_UShort(); - - FORGET_Frame(); - - cf2->RangeRecord = NULL; - - if ( ALLOC_ARRAY( cf2->RangeRecord, count, TTO_RangeRecord ) ) - return error; - - rr = cf2->RangeRecord; - - if ( ACCESS_Frame( count * 6L ) ) - goto Fail; - - for ( n = 0; n < count; n++ ) - { - rr[n].Start = GET_UShort(); - rr[n].End = GET_UShort(); - rr[n].StartCoverageIndex = GET_UShort(); - - /* sanity check; we are limited to 16bit integers */ - if ( rr[n].Start > rr[n].End || - ( rr[n].End - rr[n].Start + (long)rr[n].StartCoverageIndex ) >= - 0x10000L ) - { - error = TTO_Err_Invalid_SubTable; - goto Fail; - } - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail: - FREE( cf2->RangeRecord ); - return error; - } - - - static void Free_Coverage2( TTO_CoverageFormat2* cf2 ) - { - FREE( cf2->RangeRecord ); - } - - - TT_Error Load_Coverage( TTO_Coverage* c, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ACCESS_Frame( 2L ) ) - return error; - - c->CoverageFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( c->CoverageFormat ) - { - case 1: - return Load_Coverage1( &c->cf.cf1, input ); - - case 2: - return Load_Coverage2( &c->cf.cf2, input ); - - default: - return TTO_Err_Invalid_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - void Free_Coverage( TTO_Coverage* c ) - { - switch ( c->CoverageFormat ) - { - case 1: - Free_Coverage1( &c->cf.cf1 ); - break; - - case 2: - Free_Coverage2( &c->cf.cf2 ); - break; - } - } - - - static TT_Error Coverage_Index1( TTO_CoverageFormat1* cf1, - UShort glyphID, - UShort* index ) - { - UShort min, max, new_min, new_max, middle; - - UShort* array = cf1->GlyphArray; - - - /* binary search */ - - new_min = 0; - new_max = cf1->GlyphCount - 1; - - do - { - min = new_min; - max = new_max; - - /* we use (min + max) / 2 = max - (max - min) / 2 to avoid - overflow and rounding errors */ - - middle = max - ( ( max - min ) >> 1 ); - - if ( glyphID == array[middle] ) - { - *index = middle; - return TT_Err_Ok; - } - else if ( glyphID < array[middle] ) - { - if ( middle == min ) - break; - new_max = middle - 1; - } - else - { - if ( middle == max ) - break; - new_min = middle + 1; - } - } while ( min < max ); - - return TTO_Err_Not_Covered; - } - - - static TT_Error Coverage_Index2( TTO_CoverageFormat2* cf2, - UShort glyphID, - UShort* index ) - { - UShort min, max, new_min, new_max, middle; - - TTO_RangeRecord* rr = cf2->RangeRecord; - - - /* binary search */ - - new_min = 0; - new_max = cf2->RangeCount - 1; - - do - { - min = new_min; - max = new_max; - - /* we use (min + max) / 2 = max - (max - min) / 2 to avoid - overflow and rounding errors */ - - middle = max - ( ( max - min ) >> 1 ); - - if ( glyphID >= rr[middle].Start && glyphID <= rr[middle].End ) - { - *index = rr[middle].StartCoverageIndex + glyphID - rr[middle].Start; - return TT_Err_Ok; - } - else if ( glyphID < rr[middle].Start ) - { - if ( middle == min ) - break; - new_max = middle - 1; - } - else - { - if ( middle == max ) - break; - new_min = middle + 1; - } - } while ( min < max ); - - return TTO_Err_Not_Covered; - } - - - TT_Error Coverage_Index( TTO_Coverage* c, - UShort glyphID, - UShort* index ) - { - switch ( c->CoverageFormat ) - { - case 1: - return Coverage_Index1( &c->cf.cf1, glyphID, index ); - - case 2: - return Coverage_Index2( &c->cf.cf2, glyphID, index ); - - default: - return TTO_Err_Invalid_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - - /************************************* - * Class Definition related functions - *************************************/ - - - /* ClassDefFormat1 */ - - static TT_Error Load_ClassDef1( TTO_ClassDefinition* cd, - UShort limit, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* cva; - Bool* d; - - TTO_ClassDefFormat1* cdf1; - - - cdf1 = &cd->cd.cd1; - - if ( ACCESS_Frame( 4L ) ) - return error; - - cdf1->StartGlyph = GET_UShort(); - count = cdf1->GlyphCount = GET_UShort(); - - FORGET_Frame(); - - /* sanity check; we are limited to 16bit integers */ - - if ( cdf1->StartGlyph + (long)count >= 0x10000L ) - return TTO_Err_Invalid_SubTable; - - cdf1->ClassValueArray = NULL; - - if ( ALLOC_ARRAY( cdf1->ClassValueArray, count, UShort ) ) - return error; - - d = cd->Defined; - cva = cdf1->ClassValueArray; - - if ( ACCESS_Frame( count * 2L ) ) - goto Fail; - - for ( n = 0; n < count; n++ ) - { - cva[n] = GET_UShort(); - if ( cva[n] >= limit ) - { - error = TTO_Err_Invalid_SubTable; - goto Fail; - } - d[cva[n]] = TRUE; - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail: - FREE( cva ); - - return error; - } - - - static void Free_ClassDef1( TTO_ClassDefFormat1* cdf1 ) - { - FREE( cdf1->ClassValueArray ); - } - - - /* ClassDefFormat2 */ - - static TT_Error Load_ClassDef2 ( TTO_ClassDefinition* cd, - UShort limit, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - TTO_ClassRangeRecord* crr; - Bool* d; - - TTO_ClassDefFormat2* cdf2; - - - cdf2 = &cd->cd.cd2; - - if ( ACCESS_Frame( 2L ) ) - return error; - - count = cdf2->ClassRangeCount = GET_UShort(); - - FORGET_Frame(); - - cdf2->ClassRangeRecord = NULL; - - if ( ALLOC_ARRAY( cdf2->ClassRangeRecord, count, TTO_ClassRangeRecord ) ) - return error; - - d = cd->Defined; - crr = cdf2->ClassRangeRecord; - - if ( ACCESS_Frame( count * 6L ) ) - goto Fail; - - for ( n = 0; n < count; n++ ) - { - crr[n].Start = GET_UShort(); - crr[n].End = GET_UShort(); - crr[n].Class = GET_UShort(); - - /* sanity check */ - - if ( crr[n].Start > crr[n].End || - crr[n].Class >= limit ) - { - error = TTO_Err_Invalid_SubTable; - goto Fail; - } - d[crr[n].Class] = TRUE; - } - - FORGET_Frame(); - - return TT_Err_Ok; - - Fail: - FREE( crr ); - - return error; - } - - - static void Free_ClassDef2( TTO_ClassDefFormat2* cdf2 ) - { - FREE( cdf2->ClassRangeRecord ); - } - - - /* ClassDefinition */ - - TT_Error Load_ClassDefinition( TTO_ClassDefinition* cd, - UShort limit, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - - if ( ALLOC_ARRAY( cd->Defined, limit, Bool ) ) - return error; - - if ( ACCESS_Frame( 2L ) ) - goto Fail; - - cd->ClassFormat = GET_UShort(); - - FORGET_Frame(); - - switch ( cd->ClassFormat ) - { - case 1: - error = Load_ClassDef1( cd, limit, input ); - break; - - case 2: - error = Load_ClassDef2( cd, limit, input ); - break; - - default: - error = TTO_Err_Invalid_SubTable_Format; - break; - } - - if ( error ) - goto Fail; - - cd->loaded = TRUE; - - return TT_Err_Ok; - - Fail: - FREE( cd->Defined ); - return error; - } - - - void Free_ClassDefinition( TTO_ClassDefinition* cd ) - { - if ( !cd->loaded ) - return; - - FREE( cd->Defined ); - - switch ( cd->ClassFormat ) - { - case 1: - Free_ClassDef1( &cd->cd.cd1 ); - break; - - case 2: - Free_ClassDef2( &cd->cd.cd2 ); - break; - } - } - - - static TT_Error Get_Class1( TTO_ClassDefFormat1* cdf1, - UShort glyphID, - UShort* class, - UShort* index ) - { - UShort* cva = cdf1->ClassValueArray; - - - *index = 0; - - if ( glyphID >= cdf1->StartGlyph && - glyphID <= cdf1->StartGlyph + cdf1->GlyphCount ) - { - *class = cva[glyphID - cdf1->StartGlyph]; - return TT_Err_Ok; - } - else - { - *class = 0; - return TTO_Err_Not_Covered; - } - } - - - /* we need the index value of the last searched class range record - in case of failure for constructed GDEF tables */ - - static TT_Error Get_Class2( TTO_ClassDefFormat2* cdf2, - UShort glyphID, - UShort* class, - UShort* index ) - { - TT_Error error = TT_Err_Ok; - UShort min, max, new_min, new_max, middle; - - TTO_ClassRangeRecord* crr = cdf2->ClassRangeRecord; - - - /* binary search */ - - new_min = 0; - new_max = cdf2->ClassRangeCount - 1; - - do - { - min = new_min; - max = new_max; - - /* we use (min + max) / 2 = max - (max - min) / 2 to avoid - overflow and rounding errors */ - - middle = max - ( ( max - min ) >> 1 ); - - if ( glyphID >= crr[middle].Start && glyphID <= crr[middle].End ) - { - *class = crr[middle].Class; - error = TT_Err_Ok; - break; - } - else if ( glyphID < crr[middle].Start ) - { - if ( middle == min ) - { - *class = 0; - error = TTO_Err_Not_Covered; - break; - } - new_max = middle - 1; - } - else - { - if ( middle == max ) - { - *class = 0; - error = TTO_Err_Not_Covered; - break; - } - new_min = middle + 1; - } - } while ( min < max ); - - if ( index ) - *index = middle; - - return error; - } - - - TT_Error Get_Class( TTO_ClassDefinition* cd, - UShort glyphID, - UShort* class, - UShort* index ) - { - switch ( cd->ClassFormat ) - { - case 1: - return Get_Class1( &cd->cd.cd1, glyphID, class, index ); - - case 2: - return Get_Class2( &cd->cd.cd2, glyphID, class, index ); - - default: - return TTO_Err_Invalid_SubTable_Format; - } - - return TT_Err_Ok; /* never reached */ - } - - - - /*************************** - * Device related functions - ***************************/ - - - TT_Error Load_Device( TTO_Device* d, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, count; - - UShort* dv; - - - if ( ACCESS_Frame( 6L ) ) - return error; - - d->StartSize = GET_UShort(); - d->EndSize = GET_UShort(); - d->DeltaFormat = GET_UShort(); - - FORGET_Frame(); - - if ( d->StartSize > d->EndSize || - d->DeltaFormat == 0 || d->DeltaFormat > 3 ) - return TTO_Err_Invalid_SubTable; - - d->DeltaValue = NULL; - - count = ( ( d->EndSize - d->StartSize + 1 ) >> - ( 4 - d->DeltaFormat ) ) + 1; - - if ( ALLOC_ARRAY( d->DeltaValue, count, UShort ) ) - return error; - - if ( ACCESS_Frame( count * 2L ) ) - { - FREE( d->DeltaValue ); - return error; - } - - dv = d->DeltaValue; - - for ( n = 0; n < count; n++ ) - dv[n] = GET_UShort(); - - FORGET_Frame(); - - return TT_Err_Ok; - } - - - void Free_Device( TTO_Device* d ) - { - FREE( d->DeltaValue ); - } - - - /* Since we have the delta values stored in compressed form, we must - uncompress it now. To simplify the interface, the function always - returns a meaningful value in `value'; the error is just for - information. - | - format = 1: 0011223344556677|8899101112131415|... - | - byte 1 byte 2 - - 00: (byte >> 14) & mask - 11: (byte >> 12) & mask - ... - - mask = 0x0003 - | - format = 2: 0000111122223333|4444555566667777|... - | - byte 1 byte 2 - - 0000: (byte >> 12) & mask - 1111: (byte >> 8) & mask - ... - - mask = 0x000F - | - format = 3: 0000000011111111|2222222233333333|... - | - byte 1 byte 2 - - 00000000: (byte >> 8) & mask - 11111111: (byte >> 0) & mask - .... - - mask = 0x00FF */ - - TT_Error Get_Device( TTO_Device* d, - UShort size, - Short* value ) - { - UShort byte, bits, mask, f, s; - - - f = d->DeltaFormat; - - if ( size >= d->StartSize && size <= d->EndSize ) - { - s = size - d->StartSize; - byte = d->DeltaValue[s >> ( 4 - f )]; - bits = byte >> ( 16 - ( s % ( 1 << ( 4 - f ) ) + 1 ) * ( 1 << f ) ); - mask = 0xFFFF >> ( 16 - ( 1 << f ) ); - - *value = (Short)( bits & mask ); - - /* conversion to a signed value */ - - if ( *value >= ( ( mask + 1 ) >> 1 ) ) - *value -= mask + 1; - - return TT_Err_Ok; - } - else - { - *value = 0; - return TTO_Err_Not_Covered; - } - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxopen.h diff -u xc/extras/FreeType/lib/extend/ftxopen.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxopen.h:removed --- xc/extras/FreeType/lib/extend/ftxopen.h:1.1.1.3 Sat Feb 12 23:56:08 2000 +++ xc/extras/FreeType/lib/extend/ftxopen.h Wed Mar 16 20:59:45 2005 @@ -1,304 +0,0 @@ -/******************************************************************* - * - * ftxopen.h - * - * TrueType Open support. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * This file should be included by the application. Nevertheless, - * the table specific APIs (and structures) are located in files like - * ftxgsub.h or ftxgpos.h; these header files are read by ftxopen.h . - * - ******************************************************************/ - -#ifndef FTXOPEN_H -#define FTXOPEN_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define TTO_MAX_NESTING_LEVEL 100 - -#define TTO_Err_Invalid_SubTable_Format 0x1000 -#define TTO_Err_Invalid_SubTable 0x1001 -#define TTO_Err_Not_Covered 0x1002 -#define TTO_Err_Too_Many_Nested_Contexts 0x1003 - - - /* Script list related structures */ - - struct TTO_LangSys_ - { - TT_UShort LookupOrderOffset; /* always 0 for TT Open 1.0 */ - TT_UShort ReqFeatureIndex; /* required FeatureIndex */ - TT_UShort FeatureCount; /* number of Feature indices */ - TT_UShort* FeatureIndex; /* array of Feature indices */ - }; - - typedef struct TTO_LangSys_ TTO_LangSys; - - - struct TTO_LangSysRecord_ - { - TT_ULong LangSysTag; /* LangSysTag identifier */ - TTO_LangSys LangSys; /* LangSys table */ - }; - - typedef struct TTO_LangSysRecord_ TTO_LangSysRecord; - - - struct TTO_Script_ - { - TTO_LangSys DefaultLangSys; /* DefaultLangSys table */ - TT_UShort LangSysCount; /* number of LangSysRecords */ - TTO_LangSysRecord* LangSysRecord; /* array of LangSysRecords */ - }; - - typedef struct TTO_Script_ TTO_Script; - - - struct TTO_ScriptRecord_ - { - TT_ULong ScriptTag; /* ScriptTag identifier */ - TTO_Script Script; /* Script table */ - }; - - typedef struct TTO_ScriptRecord_ TTO_ScriptRecord; - - - struct TTO_ScriptList_ - { - TT_UShort ScriptCount; /* number of ScriptRecords */ - TTO_ScriptRecord* ScriptRecord; /* array of ScriptRecords */ - }; - - typedef struct TTO_ScriptList_ TTO_ScriptList; - - - /* Feature list related structures */ - - struct TTO_Feature_ - { - TT_UShort FeatureParams; /* always 0 for TT Open 1.0 */ - TT_UShort LookupListCount; /* number of LookupList indices */ - TT_UShort* LookupListIndex; /* array of LookupList indices */ - }; - - typedef struct TTO_Feature_ TTO_Feature; - - - struct TTO_FeatureRecord_ - { - TT_ULong FeatureTag; /* FeatureTag identifier */ - TTO_Feature Feature; /* Feature table */ - }; - - typedef struct TTO_FeatureRecord_ TTO_FeatureRecord; - - - struct TTO_FeatureList_ - { - TT_UShort FeatureCount; /* number of FeatureRecords */ - TTO_FeatureRecord* FeatureRecord; /* array of FeatureRecords */ - }; - - typedef struct TTO_FeatureList_ TTO_FeatureList; - - - /* Lookup list related structures */ - - struct TTO_SubTable_; /* defined below after inclusion - of ftxgsub.h and ftxgpos.h */ - typedef struct TTO_SubTable_ TTO_SubTable; - - - struct TTO_Lookup_ - { - TT_UShort LookupType; /* Lookup type */ - TT_UShort LookupFlag; /* Lookup qualifiers */ - TT_UShort SubTableCount; /* number of SubTables */ - TTO_SubTable* SubTable; /* array of SubTables */ - }; - - typedef struct TTO_Lookup_ TTO_Lookup; - - - /* The `Properties' field is not defined in the TTO specification but - is needed for processing lookups. If properties[n] is > 0, the - function TT_GSUB_Apply() will process Lookup[n] for glyphs which - have the specific bit not set in the `properties' field of the - input string object. */ - - struct TTO_LookupList_ - { - TT_UShort LookupCount; /* number of Lookups */ - TTO_Lookup* Lookup; /* array of Lookup records */ - TT_UShort* Properties; /* array of flags */ - }; - - typedef struct TTO_LookupList_ TTO_LookupList; - - -/* Possible LookupFlag bit masks. `IGNORE_SPECIAL_MARKS' comes from the - OpenType 1.2 specification. */ - -#define IGNORE_BASE_GLYPHS 0x0002 -#define IGNORE_LIGATURES 0x0004 -#define IGNORE_MARKS 0x0008 -#define IGNORE_SPECIAL_MARKS 0xFF00 - - - struct TTO_CoverageFormat1_ - { - TT_UShort GlyphCount; /* number of glyphs in GlyphArray */ - TT_UShort* GlyphArray; /* array of glyph IDs */ - }; - - typedef struct TTO_CoverageFormat1_ TTO_CoverageFormat1; - - - struct TTO_RangeRecord_ - { - TT_UShort Start; /* first glyph ID in the range */ - TT_UShort End; /* last glyph ID in the range */ - TT_UShort StartCoverageIndex; /* coverage index of first - glyph ID in the range */ - }; - - typedef struct TTO_RangeRecord_ TTO_RangeRecord; - - - struct TTO_CoverageFormat2_ - { - TT_UShort RangeCount; /* number of RangeRecords */ - TTO_RangeRecord* RangeRecord; /* array of RangeRecords */ - }; - - typedef struct TTO_CoverageFormat2_ TTO_CoverageFormat2; - - - struct TTO_Coverage_ - { - TT_UShort CoverageFormat; /* 1 or 2 */ - - union - { - TTO_CoverageFormat1 cf1; - TTO_CoverageFormat2 cf2; - } cf; - }; - - typedef struct TTO_Coverage_ TTO_Coverage; - - - struct TTO_ClassDefFormat1_ - { - TT_UShort StartGlyph; /* first glyph ID of the - ClassValueArray */ - TT_UShort GlyphCount; /* size of the ClassValueArray */ - TT_UShort* ClassValueArray; /* array of class values */ - }; - - typedef struct TTO_ClassDefFormat1_ TTO_ClassDefFormat1; - - - struct TTO_ClassRangeRecord_ - { - TT_UShort Start; /* first glyph ID in the range */ - TT_UShort End; /* last glyph ID in the range */ - TT_UShort Class; /* applied to all glyphs in range */ - }; - - typedef struct TTO_ClassRangeRecord_ TTO_ClassRangeRecord; - - - struct TTO_ClassDefFormat2_ - { - TT_UShort ClassRangeCount; - /* number of ClassRangeRecords */ - TTO_ClassRangeRecord* ClassRangeRecord; - /* array of ClassRangeRecords */ - }; - - typedef struct TTO_ClassDefFormat2_ TTO_ClassDefFormat2; - - - /* The `Defined' field is not defined in the TTO specification but - apparently needed for processing fonts like trado.ttf: This font - refers to a class which contains not a single element. We map such - classes to class 0. */ - - struct TTO_ClassDefinition_ - { - TT_Bool loaded; - - TT_Bool* Defined; /* array of Booleans. - If Defined[n] is FALSE, - class n contains no glyphs. */ - TT_UShort ClassFormat; /* 1 or 2 */ - - union - { - TTO_ClassDefFormat1 cd1; - TTO_ClassDefFormat2 cd2; - } cd; - }; - - typedef struct TTO_ClassDefinition_ TTO_ClassDefinition; - - - struct TTO_Device_ - { - TT_UShort StartSize; /* smallest size to correct */ - TT_UShort EndSize; /* largest size to correct */ - TT_UShort DeltaFormat; /* DeltaValue array data format: - 1, 2, or 3 */ - TT_UShort* DeltaValue; /* array of compressed data */ - }; - - typedef struct TTO_Device_ TTO_Device; - - -#include "ftxgdef.h" -#include "ftxgsub.h" -#include "ftxgpos.h" - - - struct TTO_SubTable_ - { - union - { - TTO_GSUB_SubTable gsub; - TTO_GPOS_SubTable gpos; - } st; - }; - - - enum TTO_Type_ - { - GSUB, - GPOS - }; - - typedef enum TTO_Type_ TTO_Type; - - -#ifdef __cplusplus -} -#endif - -#endif /* FTXOPEN_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxopenf.h diff -u xc/extras/FreeType/lib/extend/ftxopenf.h:1.1.1.3 xc/extras/FreeType/lib/extend/ftxopenf.h:removed --- xc/extras/FreeType/lib/extend/ftxopenf.h:1.1.1.3 Sat Feb 12 23:56:08 2000 +++ xc/extras/FreeType/lib/extend/ftxopenf.h Wed Mar 16 20:59:45 2005 @@ -1,135 +0,0 @@ -/******************************************************************* - * - * ftxopenf.h - * - * internal TrueType Open functions - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef FTXOPENF_H -#define FTXOPENF_H - -#include "ftxopen.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /* functions from ftxopen.c */ - - TT_Error Load_ScriptList( TTO_ScriptList* sl, - PFace input ); - TT_Error Load_FeatureList( TTO_FeatureList* fl, - PFace input ); - TT_Error Load_LookupList( TTO_LookupList* ll, - PFace input, - TTO_Type type ); - - TT_Error Load_Coverage( TTO_Coverage* c, - PFace input ); - TT_Error Load_ClassDefinition( TTO_ClassDefinition* cd, - UShort limit, - PFace input ); - TT_Error Load_Device( TTO_Device* d, - PFace input ); - - void Free_ScriptList( TTO_ScriptList* sl ); - void Free_FeatureList( TTO_FeatureList* fl ); - void Free_LookupList( TTO_LookupList* ll, - TTO_Type type ); - - void Free_Coverage( TTO_Coverage* c ); - void Free_ClassDefinition( TTO_ClassDefinition* cd ); - void Free_Device( TTO_Device* d ); - - - /* functions from ftxgsub.c */ - - TT_Error Load_SingleSubst( TTO_SingleSubst* ss, - PFace input ); - TT_Error Load_MultipleSubst( TTO_MultipleSubst* ms, - PFace input ); - TT_Error Load_AlternateSubst( TTO_AlternateSubst* as, - PFace input ); - TT_Error Load_LigatureSubst( TTO_LigatureSubst* ls, - PFace input ); - TT_Error Load_ContextSubst( TTO_ContextSubst* cs, - PFace input ); - TT_Error Load_ChainContextSubst( TTO_ChainContextSubst* ccs, - PFace input ); - - void Free_SingleSubst( TTO_SingleSubst* ss ); - void Free_MultipleSubst( TTO_MultipleSubst* ms ); - void Free_AlternateSubst( TTO_AlternateSubst* as ); - void Free_LigatureSubst( TTO_LigatureSubst* ls ); - void Free_ContextSubst( TTO_ContextSubst* cs ); - void Free_ChainContextSubst( TTO_ChainContextSubst* ccs ); - - - /* functions from ftxgpos.c */ - - TT_Error Load_SinglePos( TTO_SinglePos* sp, - PFace input ); - TT_Error Load_PairPos( TTO_PairPos* pp, - PFace input ); - TT_Error Load_CursivePos( TTO_CursivePos* cp, - PFace input ); - TT_Error Load_MarkBasePos( TTO_MarkBasePos* mbp, - PFace input ); - TT_Error Load_MarkLigPos( TTO_MarkLigPos* mlp, - PFace input ); - TT_Error Load_MarkMarkPos( TTO_MarkMarkPos* mmp, - PFace input ); - TT_Error Load_ContextPos( TTO_ContextPos* cp, - PFace input ); - TT_Error Load_ChainContextPos( TTO_ChainContextPos* ccp, - PFace input ); - - void Free_SinglePos( TTO_SinglePos* sp ); - void Free_PairPos( TTO_PairPos* pp ); - void Free_CursivePos( TTO_CursivePos* cp ); - void Free_MarkBasePos( TTO_MarkBasePos* mbp ); - void Free_MarkLigPos( TTO_MarkLigPos* mlp ); - void Free_MarkMarkPos( TTO_MarkMarkPos* mmp ); - void Free_ContextPos( TTO_ContextPos* cp ); - void Free_ChainContextPos( TTO_ChainContextPos* ccp ); - - - /* query functions */ - - TT_Error Coverage_Index( TTO_Coverage* c, - UShort glyphID, - UShort* index ); - TT_Error Get_Class( TTO_ClassDefinition* cd, - UShort glyphID, - UShort* class, - UShort* index ); - TT_Error Get_Device( TTO_Device* d, - UShort size, - Short* value ); - - - /* functions from ftxgdef.c */ - - TT_Error Add_Glyph_Property( TTO_GDEFHeader* gdef, - UShort glyphID, - UShort property ); - - -#ifdef __cplusplus -} -#endif - -#endif /* FTXOPENF_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxpost.c diff -u xc/extras/FreeType/lib/extend/ftxpost.c:1.1.1.2 xc/extras/FreeType/lib/extend/ftxpost.c:removed --- xc/extras/FreeType/lib/extend/ftxpost.c:1.1.1.2 Sat Feb 12 23:56:09 2000 +++ xc/extras/FreeType/lib/extend/ftxpost.c Wed Mar 16 20:59:45 2005 @@ -1,522 +0,0 @@ -/******************************************************************* - * - * ftxpost.c - * - * post table support API extension body - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The post table is not completely loaded by the core engine. This - * file loads the missing PS glyph names and implements an API to - * access them. - * - ******************************************************************/ - -#include "ftxpost.h" - -#include "tttypes.h" -#include "ttobjs.h" -#include "tttables.h" -#include "ttload.h" /* for the macros */ -#include "ttfile.h" -#include "tttags.h" -#include "ttmemory.h" -#include "ttextend.h" - - -#define POST_ID Build_Extension_ID( 'p', 'o', 's', 't' ) - - - /* the 258 default Mac PS glyph names */ - - String* TT_Post_Default_Names[258] = - { - /* 0 */ - ".notdef", ".null", "CR", "space", "exclam", - "quotedbl", "numbersign", "dollar", "percent", "ampersand", - /* 10 */ - "quotesingle", "parenleft", "parenright", "asterisk", "plus", - "comma", "hyphen", "period", "slash", "zero", - /* 20 */ - "one", "two", "three", "four", "five", - "six", "seven", "eight", "nine", "colon", - /* 30 */ - "semicolon", "less", "equal", "greater", "question", - "at", "A", "B", "C", "D", - /* 40 */ - "E", "F", "G", "H", "I", - "J", "K", "L", "M", "N", - /* 50 */ - "O", "P", "Q", "R", "S", - "T", "U", "V", "W", "X", - /* 60 */ - "Y", "Z", "bracketleft", "backslash", "bracketright", - "asciicircum", "underscore", "grave", "a", "b", - /* 70 */ - "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", - /* 80 */ - "m", "n", "o", "p", "q", - "r", "s", "t", "u", "v", - /* 90 */ - "w", "x", "y", "z", "braceleft", - "bar", "braceright", "asciitilde", "Adieresis", "Aring", - /* 100 */ - "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", - "aacute", "agrave", "acircumflex", "adieresis", "atilde", - /* 110 */ - "aring", "ccedilla", "eacute", "egrave", "ecircumflex", - "edieresis", "iacute", "igrave", "icircumflex", "idieresis", - /* 120 */ - "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", - "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", - /* 130 */ - "dagger", "degree", "cent", "sterling", "section", - "bullet", "paragraph", "germandbls", "registered", "copyright", - /* 140 */ - "trademark", "acute", "dieresis", "notequal", "AE", - "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", - /* 150 */ - "yen", "mu", "partialdiff", "summation", "product", - "pi", "integral", "ordfeminine", "ordmasculine", "Omega", - /* 160 */ - "ae", "oslash", "questiondown", "exclamdown", "logicalnot", - "radical", "florin", "approxequal", "Delta", "guillemotleft", - /* 170 */ - "guillemotright", "ellipsis", "nbspace", "Agrave", "Atilde", - "Otilde", "OE", "oe", "endash", "emdash", - /* 180 */ - "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", - "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", - /* 190 */ - "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", - "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", - /* 200 */ - "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", - "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", - /* 210 */ - "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", - "dotlessi", "circumflex", "tilde", "macron", "breve", - /* 220 */ - "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", - "caron", "Lslash", "lslash", "Scaron", "scaron", - /* 230 */ - "Zcaron", "zcaron", "brokenbar", "Eth", "eth", - "Yacute", "yacute", "Thorn", "thorn", "minus", - /* 240 */ - "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", - "onequarter", "threequarters", "franc", "Gbreve", "gbreve", - /* 250 */ - "Idot", "Scedilla", "scedilla", "Cacute", "cacute", - "Ccaron", "ccaron", "dmacron", - }; - - - - static TT_Error Load_Format_20( TT_Post_20* post20, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort nameindex, n, num; - Byte len; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - num = GET_UShort(); - - FORGET_Frame(); - - /* UNDOCUMENTED! The number of glyphs in this table can be smaller */ - /* than the value in the maxp table (cf. cyberbit.ttf). */ - - /* There already exist fonts which have more than 32768 glyph names */ - /* in this table, so the test for this threshold has been dropped. */ - if ( num > input->numGlyphs ) - return TT_Err_Invalid_Post_Table; - - post20->numGlyphs = num; - - if ( ALLOC_ARRAY( post20->glyphNameIndex, num, TT_UShort ) ) - return error; - - if ( ACCESS_Frame( num * 2L ) ) - goto Fail; - - for ( n = 0; n < num; n++ ) - { - post20->glyphNameIndex[n] = GET_UShort(); - - if ( post20->glyphNameIndex[n] > 258 + num ) - { - FORGET_Frame(); - error = TT_Err_Invalid_Post_Table; - goto Fail; - } - } - - FORGET_Frame(); - - if ( ALLOC_ARRAY( post20->glyphNames, num, Char* ) ) - goto Fail; - - /* We must initialize the glyphNames array for proper */ - /* deallocation. */ - for ( n = 0; n < num; n++ ) - post20->glyphNames[n] = NULL; - - /* Now we can read the glyph names which are stored in */ - /* Pascal string format. */ - for ( n = 0; n < num; n++ ) - { - nameindex = post20->glyphNameIndex[n]; - - if ( nameindex < 258 ) - ; /* default Mac glyph, do nothing */ - else - { - if ( ACCESS_Frame( 1L ) ) - goto Fail1; - - len = GET_Byte(); - - FORGET_Frame(); - - if ( ALLOC_ARRAY( post20->glyphNames[nameindex - 258], - len + 1, Char ) || - FILE_Read( post20->glyphNames[nameindex - 258], len ) ) - goto Fail1; - - /* we make a C string */ - post20->glyphNames[nameindex - 258][len] = '\0'; - } - } - - return TT_Err_Ok; - - - Fail1: - for ( n = 0; n < num; n++ ) - if ( post20->glyphNames[n] ) - FREE( post20->glyphNames[n] ); - - FREE( post20->glyphNames ); - - Fail: - FREE( post20->glyphNameIndex ); - return error; - } - - - static TT_Error Load_Format_25( TT_Post_25* post25, - PFace input ) - { - DEFINE_LOAD_LOCALS( input->stream ); - - UShort n, num; - - - if ( ACCESS_Frame( 2L ) ) - return error; - - /* UNDOCUMENTED! This value appears only in the Apple TT specs. */ - num = GET_UShort(); - - FORGET_Frame(); - - if ( num > input->numGlyphs || num > 258 ) - return TT_Err_Invalid_Post_Table; - - post25->numGlyphs = num; - - if ( ALLOC_ARRAY( post25->offset, num, Char ) ) - return error; - - if ( ACCESS_Frame( num ) ) - goto Fail; - - for ( n = 0; n < num; n++ ) - { - post25->offset[n] = GET_Char(); - - /* We add 128 to the tests to avoid problems with negative */ - /* values for comparison. */ - if ( n + ( post25->offset[n] + 128 ) > num + 128 || - n + ( post25->offset[n] + 128 ) < 128 ) - { - FORGET_Frame(); - error = TT_Err_Invalid_Post_Table; - goto Fail; - } - } - - FORGET_Frame(); - - return TT_Err_Ok; - - - Fail: - FREE( post25->offset ); - return error; - } - - - static TT_Error Post_Create( void* ext, - PFace face ) - { - TT_Post* post = (TT_Post*)ext; - Long table; - - - /* by convention */ - if ( !post ) - return TT_Err_Ok; - - /* we store the start offset and the size of the subtable */ - table = TT_LookUp_Table( face, TTAG_post ); - post->offset = face->dirTables[table].Offset + 32L; - post->length = face->dirTables[table].Length - 32L; - post->loaded = FALSE; - - return TT_Err_Ok; - } - - - static TT_Error Post_Destroy( void* ext, - PFace face ) - { - TT_Post* post = (TT_Post*)ext; - UShort n; - - - /* by convention */ - if ( !post ) - return TT_Err_Ok; - - if ( post->loaded ) - { - switch ( face->postscript.FormatType ) - { - case 0x00010000: /* nothing to do */ - break; - - case 0x00020000: - for ( n = 0; n < post->p.post20.numGlyphs; n++ ) - if ( post->p.post20.glyphNames[n] ) - FREE( post->p.post20.glyphNames[n] ); - FREE( post->p.post20.glyphNames ); - FREE( post->p.post20.glyphNameIndex ); - break; - - case 0x00028000: - FREE( post->p.post25.offset ); - break; - - case 0x00030000: /* nothing to do */ - break; - -#if 0 - case 0x00040000: - break; -#endif - - default: - ; /* invalid format, do nothing */ - } - } - - return TT_Err_Ok; - } - - - EXPORT_FUNC - TT_Error TT_Init_Post_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - TT_Error error; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - error = TT_Register_Extension( _engine, - POST_ID, - sizeof ( TT_Post ), - Post_Create, - Post_Destroy ); - return error; - } - - -/******************************************************************* - * - * Function : TT_Load_PS_Names - * - * Description : Loads the PostScript Glyph Name subtable (if any). - * - * Output : error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Load_PS_Names( TT_Face face, - TT_Post* ppost ) - { - PFace faze = HANDLE_Face( face ); - TT_Error error; - TT_Stream stream; - TT_Post* post; - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - error = TT_Extension_Get( faze, POST_ID, (void**)&post ); - if ( error ) - return error; - - if ( USE_Stream( faze->stream, stream ) ) - return error; - - - switch ( faze->postscript.FormatType ) - { - case 0x00010000: - error = TT_Err_Ok; /* nothing to do */ - break; - - case 0x00020000: - if ( FILE_Seek( post->offset ) ) - goto Fail; - - error = Load_Format_20( &post->p.post20, faze ); - break; - - case 0x00028000: /* 2.5 in 16.16 format */ - if ( FILE_Seek( post->offset ) ) - goto Fail; - - error = Load_Format_25( &post->p.post25, faze ); - break; - - case 0x00030000: - error = TT_Err_Ok; /* nothing to do */ - break; - -#if 0 - case 0x00040000: - break; -#endif - - default: - error = TT_Err_Invalid_Post_Table_Format; - break; - } - - if ( !error ) - { - post->loaded = TRUE; - *ppost = *post; - } - - - Fail: - DONE_Stream( stream ); - - return error; - } - - -/******************************************************************* - * - * Function : TT_Get_PS_Name - * - * Description : Gets the PostScript Glyph Name of a glyph. - * - * Input : index glyph index - * PSname address of a string pointer. - * Will be NULL in case of error; otherwise it - * contains a pointer to the glyph name. - * - * You must not modify the returned string! - * - * Output : error code - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_PS_Name( TT_Face face, - TT_UShort index, - TT_String** PSname ) - { - PFace faze = HANDLE_Face( face ); - TT_Error error; - TT_Post* post; - UShort nameindex; - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( index >= faze->numGlyphs ) - return TT_Err_Invalid_Glyph_Index; - - error = TT_Extension_Get( faze, POST_ID, (void**)&post ); - if ( error ) - return error; - - - *PSname = TT_Post_Default_Names[0]; /* default value */ - - switch ( faze->postscript.FormatType ) - { - case 0x00010000: - if ( index < 258 ) /* paranoid checking */ - *PSname = TT_Post_Default_Names[index]; - break; - - case 0x00020000: - if ( index < post->p.post20.numGlyphs ) - nameindex = post->p.post20.glyphNameIndex[index]; - else - break; - - if ( nameindex < 258 ) - *PSname = TT_Post_Default_Names[nameindex]; - else - *PSname = (String*)post->p.post20.glyphNames[nameindex - 258]; - break; - - case 0x00028000: - if ( index < post->p.post25.numGlyphs ) /* paranoid checking */ - *PSname = TT_Post_Default_Names[index + post->p.post25.offset[index]]; - break; - - case 0x00030000: - break; /* nothing to do */ - -#if 0 - case 0x00040000: - break; -#endif - - default: - ; /* should never happen */ - } - - return TT_Err_Ok; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxpost.h diff -u xc/extras/FreeType/lib/extend/ftxpost.h:1.1.1.2 xc/extras/FreeType/lib/extend/ftxpost.h:removed --- xc/extras/FreeType/lib/extend/ftxpost.h:1.1.1.2 Sat Feb 12 23:56:09 2000 +++ xc/extras/FreeType/lib/extend/ftxpost.h Wed Mar 16 20:59:45 2005 @@ -1,107 +0,0 @@ -/******************************************************************* - * - * ftxpost.h - * - * post table support API extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * The post table is not completely loaded by the core engine. This - * file loads the missing PS glyph names and implements an API to - * access them. - * - ******************************************************************/ - -#ifndef FTXPOST_H -#define FTXPOST_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define TT_Err_Invalid_Post_Table_Format 0x0B00 -#define TT_Err_Invalid_Post_Table 0x0B01 - - /* the 258 standard Mac glyph names, used for format 1.0 and 2.5 */ - - extern TT_String* TT_Post_Default_Names[]; - - - /* format 2.0 table */ - - struct TT_Post_20_ - { - TT_UShort numGlyphs; - TT_UShort* glyphNameIndex; - TT_Char** glyphNames; - }; - - typedef struct TT_Post_20_ TT_Post_20; - - struct TT_Post_25_ - { - TT_UShort numGlyphs; - TT_Char* offset; - }; - - typedef struct TT_Post_25_ TT_Post_25; - -#if 0 - /* format 4.0 table -- not implemented yet */ - - struct TT_Post_40_ - { - }; - - typedef struct TT_Post_40_ TT_Post_40; -#endif - - - struct TT_Post_ - { - TT_Long offset; - TT_Long length; - TT_Bool loaded; - - union - { - TT_Post_20 post20; - TT_Post_25 post25; -#if 0 - TT_Post_40 post40; -#endif - } p; - }; - - typedef struct TT_Post_ TT_Post; - - - EXPORT_DEF - TT_Error TT_Init_Post_Extension( TT_Engine engine ); - - EXPORT_DEF - TT_Error TT_Load_PS_Names( TT_Face face, - TT_Post* post ); - EXPORT_DEF - TT_Error TT_Get_PS_Name( TT_Face face, - TT_UShort index, - TT_String** PSname ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXPOST_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxsbit.c diff -u xc/extras/FreeType/lib/extend/ftxsbit.c:1.2 xc/extras/FreeType/lib/extend/ftxsbit.c:removed --- xc/extras/FreeType/lib/extend/ftxsbit.c:1.2 Tue Oct 21 14:10:09 2003 +++ xc/extras/FreeType/lib/extend/ftxsbit.c Wed Mar 16 20:59:45 2005 @@ -1,1389 +0,0 @@ -/******************************************************************* - * - * ftxsbit.c - * - * Embedded bitmap API extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This extension is used to load the embedded bitmaps present - * in certain TrueType files. - * - ******************************************************************/ -/* $XFree86: xc/extras/FreeType/lib/extend/ftxsbit.c,v 1.2 2003/10/21 18:10:09 tsi Exp $ */ - -#include "ftxsbit.h" -#include "ttobjs.h" -#include "ttfile.h" -#include "ttload.h" -#include "ttmemory.h" -#include "tttags.h" -#include "ttextend.h" -#include "ttdebug.h" - - -#define SBIT_ID Build_Extension_ID( 's', 'b', 'i', 't' ) - - -/* Required by the tracing mode */ -#undef TT_COMPONENT -#define TT_COMPONENT trace_bitmap - -/* In all functions, the stream is taken from the 'face' object */ -#define DEFINE_LOCALS DEFINE_LOAD_LOCALS( face->stream ) -#define DEFINE_LOCALS_WO_FRAME DEFINE_LOAD_LOCALS_WO_FRAME( face->stream ) - - -/*************************** - * - * miscellaneous functions - * - ***************************/ - -/******************************************************************* - * - * Function: Load_BitmapData - * - * Bit-aligned bitmap data -> Byte-aligned bitmap data when pad is 0 - * - ******************************************************************/ - - static - TT_Error Load_BitmapData( TT_SBit_Image* image, - Int image_size, - Byte x_offset, - Byte y_offset, - UShort source_width, - UShort source_height, - Bool byte_padded ) - { - DEFINE_LOCALS; - - Int count; /* number of bits left in rows */ - Int loaded; /* number of bits loaded in the accumulator */ - UShort buff; /* accumulator */ - - PByte line; /* target write cursor */ - PByte limit; - - - if ( ( y_offset + source_height > image->map.rows ) || - ( x_offset + source_width > image->map.width ) ) - return TT_Err_Invalid_Argument; - - if ( ACCESS_Frame( image_size ) ) - return error; - - buff = 0; - loaded = 0; - line = (PByte)image->map.bitmap + - y_offset * image->map.cols; - limit = (PByte)image->map.bitmap + - ( y_offset + source_height ) * image->map.cols; - - for ( ; line < limit; line += image->map.cols ) - { - PByte ptr; - - - ptr = line + x_offset / 8; - count = source_width; - - /* We may assume that `loaded' is less than 8 */ - buff >>= x_offset % 8; - loaded += x_offset % 8; - - /* first of all, read all consecutive bytes */ - while ( count >= 8 ) - { - if ( loaded < 8 ) - { - buff |= ((UShort)GET_Byte()) << (8 - loaded); - loaded += 8; - } - - *ptr++ |= (Byte)(buff >> 8); - buff <<= 8; - loaded -= 8; - count -= 8; - } - - /* now write remaining bits (i.e. end of line with count < 8) */ - if ( count > 0 ) - { - if ( loaded < count ) - { - buff |= ((UShort)GET_Byte()) << (8 - loaded); - loaded += 8; - } - - *ptr |= ((Byte)(buff >> 8)) & ~(0xFF >> count); - buff <<= count; - loaded -= count; - } - - if ( byte_padded ) - { - buff = 0; - loaded = 0; - } - } - - FORGET_Frame(); - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function: Crop_Bitmap - * - ******************************************************************/ - - static - void Crop_Bitmap( TT_SBit_Image* image ) - { - /*******************************************************/ - /* In the following situation, some bounding boxes of */ - /* embedded bitmaps are too large. We need to crop it */ - /* to a reasonable size. */ - /* */ - /* --------- */ - /* | | ----- */ - /* | *** | |***| */ - /* | * | -----> | * | */ - /* | * | | * | */ - /* | * | | * | */ - /* | * | | * | */ - /* | *** | |***| */ - /* --------- ----- */ - /* */ - /*******************************************************/ - - Int rows, count; - Long line_len; - PByte line; - - - /********************************************************************/ - /* */ - /* first of all, check the top-most lines of the bitmap and remove */ - /* them if they're empty. */ - /* */ - { - line = (PByte)image->map.bitmap; - rows = image->map.rows; - line_len = image->map.cols; - - for ( count = 0; count < rows; count++ ) - { - PByte cur = line; - PByte limit = line + line_len; - - - for ( ; cur < limit; cur++ ) - if ( cur[0] ) - goto Found_Top; - - /* the current line was empty -- skip to next one */ - line = limit; - } - - Found_Top: - /* check that we have at least one filled line */ - if ( count >= rows ) - goto Empty_Bitmap; - - /* now, crop the empty upper lines */ - if ( count > 0 ) - { - line = (PByte)image->map.bitmap; - - MEM_Move( line, line + count*line_len, (rows-count) * line_len ); - - image->metrics.bbox.yMax -= count; - image->metrics.vertBearingY -= count; - image->metrics.horiBearingY -= count; - image->map.rows -= count; - rows -= count; - } - } - - /*******************************************************************/ - /* */ - /* second, crop the lower lines */ - /* */ - { - line = (PByte)image->map.bitmap + (rows-1) * line_len; - - for ( count = 0; count < rows; count++ ) - { - PByte cur = line; - PByte limit = line + line_len; - - - for ( ; cur < limit; cur++ ) - if ( cur[0] ) - goto Found_Bottom; - - /* the current line was empty -- skip to previous one */ - line -= line_len; - } - - Found_Bottom: - if ( count > 0 ) - { - image->metrics.bbox.yMin += count; - image->map.rows -= count; - rows -= count; - } - } - - /*******************************************************************/ - /* */ - /* third, get rid of the space on the left side of the glyph */ - /* */ - do - { - PByte limit; - - - line = (PByte)image->map.bitmap; - limit = line + rows * line_len; - - for ( ; line < limit; line += line_len ) - if ( line[0] & 0x80 ) - goto Found_Left; - - /* shift the whole glyph one pixel to the left */ - line = (PByte)image->map.bitmap; - limit = line + rows * line_len; - - for ( ; line < limit; line += line_len ) - { - Int n, width = image->map.width; - Byte old; - PByte cur = line; - - - old = cur[0] << 1; - - for ( n = 8; n < width; n += 8 ) - { - Byte val; - - - val = cur[1]; - cur[0] = old | (val >> 7); - old = val << 1; - cur++; - } - cur[0] = old; - } - - image->map.width--; - image->metrics.horiBearingX++; - image->metrics.vertBearingX++; - image->metrics.bbox.xMin++; - - } while ( image->map.width > 0 ); - - Found_Left: - - /*********************************************************************/ - /* */ - /* finally, crop the bitmap width to get rid of the space on the */ - /* right side of the glyph. */ - /* */ - do - { - Int right = image->map.width-1; - PByte limit; - Byte mask; - - - line = (PByte)image->map.bitmap + (right >> 3); - limit = line + rows*line_len; - mask = 0x80 >> (right & 7); - - for ( ; line < limit; line += line_len ) - if ( line[0] & mask ) - goto Found_Right; - - /* crop the whole glyph on the right */ - image->map.width--; - image->metrics.bbox.xMax--; - - } while ( image->map.width > 0 ); - - Found_Right: - /* all right, the bitmap was cropped */ - return; - - Empty_Bitmap: - image->map.width = 0; - image->map.rows = 0; - image->map.cols = 0; - image->map.size = 0; - } - -/************* - * - * Main body - * - *************/ - - - static - TT_Error Load_Range_Codes( TT_SBit_Range* range, - PFace face, - Bool load_offsets ) - { - DEFINE_LOCALS; - - ULong count, n, size; - - - (void)face; - - /* read glyph count */ - if ( ACCESS_Frame( 4L ) ) - goto Exit; - count = GET_ULong(); - FORGET_Frame(); - - range->num_glyphs = count; - - /* Allocate glyph offsets table if needed */ - if ( load_offsets ) - { - if ( ALLOC_ARRAY( range->glyph_offsets, count, ULong ) ) - goto Exit; - - size = count * 4L; - } - else - size = count * 2L; - - /* Allocate glyph codes table and access frame */ - if ( ALLOC_ARRAY ( range->glyph_codes, count, UShort ) || - ACCESS_Frame( size ) ) - goto Exit; - - for ( n = 0; n < count; n++ ) - { - range->glyph_codes[n] = GET_UShort(); - - if ( load_offsets ) - range->glyph_offsets[n] = (ULong)range->image_offset + GET_UShort(); - } - - FORGET_Frame(); - - Exit: - return error; - } - - - static - TT_Error Load_SBit_Range( TT_SBit_Strike* strike, - TT_SBit_Range* range, - PFace face ) - { - DEFINE_LOCALS; - - UShort format; - - - (void)face; - (void)strike; - - format = range->index_format; - PTRACE6(( "Index Format: %d\n", format )); - - switch( format ) - { - case 1: /* variable metrics with 4-byte offsets */ - case 3: /* variable metrics with 2-byte offsets */ - { - UShort num_glyphs, size_elem; - Bool large = (format == 1); - ULong* cur; - - num_glyphs = range->last_glyph - range->first_glyph + 1; - PTRACE5(( " num glyphs: %hu\n", num_glyphs )); - - range->num_glyphs = num_glyphs; - - num_glyphs++; /* BEWARE */ - - size_elem = large ? 4 : 2; - - if ( ALLOC_ARRAY( range->glyph_offsets, num_glyphs, ULong ) || - ACCESS_Frame( num_glyphs * size_elem ) ) - return error; - - cur = range->glyph_offsets; - - while ( num_glyphs > 0 ) - { - cur[0] = (TT_ULong)( range->image_offset + - (large ? GET_ULong() : GET_UShort()) ); - PTRACE7(( " offset: %d\n", cur[0] )); - cur++; - num_glyphs--; - } - - FORGET_Frame(); - } - break; - - case 2: /* all glyphs have identical metrics */ - case 4: - case 5: - { - error = 0; - - if ( format != 4 ) /* read constant metrics, formats 2 and 5 */ - { - TT_SBit_Metrics* metrics; - - - if ( ACCESS_Frame( 12L ) ) - return error; - - range->image_size = GET_ULong(); - metrics = &range->metrics; - - metrics->height = GET_Byte(); - metrics->width = GET_Byte(); - - metrics->horiBearingX = GET_Char(); - metrics->horiBearingY = GET_Char(); - metrics->horiAdvance = GET_Byte(); - - metrics->vertBearingX = GET_Char(); - metrics->vertBearingY = GET_Char(); - metrics->vertAdvance = GET_Byte(); - - FORGET_Frame(); - } - - if ( format != 2 ) /* load range codes, formats 4 and 5 */ - error = Load_Range_Codes( range, face, (format == 4) ); - } - break; - - default: - error = TT_Err_Invalid_File_Format; - } - - PTRACE3(( "Embedded Bitmap Location Tables loaded.\n" )); - - return error; - } - - -/******************************************************************* - * - * Function : Load_TrueType_Eblc - * - * Description : Loads the Eblc table directory into face table. - * - * Input : face face record to look for - * - * Output : Error code. - * - ******************************************************************/ - - static - TT_Error Load_TrueType_Eblc( PFace face, - TT_EBLC* eblc ) - { - DEFINE_LOCALS; - - ULong eblc_offset; - UShort i; - Long table; - - TT_SBit_Strike* strike; - - - PTRACE2(( "Load_EBLC_Table( %08lx )\n", (long)face )); - - eblc->version = 0; - - /* Try to find the `EBLC' or `bloc' table in the font files. */ - /* Both tags describe the same table; `EBLC' is for OpenType */ - /* fonts while `bloc' is for TrueType GX fonts. Many fonts */ - /* contain both tags pointing to the same table. */ - - table = TT_LookUp_Table( face, TTAG_EBLC ); - if ( table < 0 ) - table = TT_LookUp_Table( face, TTAG_bloc ); - - if ( table < 0 ) - /* This table is optional */ - return TT_Err_Ok; - - eblc_offset = face->dirTables[table].Offset; - - if ( FILE_Seek( eblc_offset ) || - ACCESS_Frame( 8L ) ) - return error; - - eblc->version = GET_ULong(); - eblc->num_strikes = GET_ULong(); - - FORGET_Frame(); - - PTRACE2(( "-- Tables count: %12u\n", eblc->num_strikes )); - PTRACE2(( "-- Format version: %08lx\n", eblc->version )); - - if ( eblc->version != 0x00020000 ) - { - PERROR(( "Invalid file format!\n" )); - return TT_Err_Invalid_File_Format; - } - - if ( ALLOC_ARRAY( eblc->strikes, eblc->num_strikes, TT_SBit_Strike ) || - ACCESS_Frame( 48L * eblc->num_strikes ) ) - return error; - - strike = eblc->strikes; - - for ( i = 0; i < eblc->num_strikes; i++, strike++ ) - { /* loop through the tables and get all entries */ - TT_SBit_Line_Metrics* metrics; - Int count; - - - strike->ranges_offset = GET_ULong(); - (void) GET_ULong(); /* dont' save */ - - strike->num_ranges = GET_ULong(); - strike->color_ref = GET_ULong(); - - /* load horizontal and vertical metrics */ - metrics = &strike->hori; - for ( count = 2; count > 0; count-- ) - { - metrics->ascender = GET_Char(); - metrics->descender = GET_Char(); - metrics->max_width = GET_Byte(); - - metrics->caret_slope_numerator = GET_Char(); - metrics->caret_slope_denominator = GET_Char(); - metrics->caret_offset = GET_Char(); - - metrics->min_origin_SB = GET_Char(); - metrics->min_advance_SB = GET_Char(); - metrics->max_before_BL = GET_Char(); - metrics->min_after_BL = GET_Char(); - metrics->pads[0] = GET_Char(); - metrics->pads[1] = GET_Char(); - - metrics = &strike->vert; - } - - strike->start_glyph = GET_UShort(); - strike->end_glyph = GET_UShort(); - strike->x_ppem = GET_Byte(); - strike->y_ppem = GET_Byte(); - strike->bit_depth = GET_Byte(); - strike->flags = GET_Char(); - - PTRACE4(( " start - end - ppemX - ppemY\n" )); - PTRACE4(( " %04d - %04d - %3u - %3u\n", - strike->start_glyph, - strike->end_glyph, - strike->x_ppem, - strike->y_ppem )); - } - - FORGET_Frame(); - - /* Load EBLC index ranges */ - strike = eblc->strikes; - - for ( i = 0; i < eblc->num_strikes; i++, strike++ ) - { - TT_SBit_Range* range; - UShort count = strike->num_ranges; - - - /* loop through the tables and get all entries */ - if ( ALLOC_ARRAY( strike->sbit_ranges, - strike->num_ranges, - TT_SBit_Range ) || - FILE_Seek( eblc_offset + strike->ranges_offset ) || - ACCESS_Frame( strike->num_ranges * 8L ) ) - return error; - - for ( range = strike->sbit_ranges; count > 0; count--, range++ ) - { - range->first_glyph = GET_UShort(); - range->last_glyph = GET_UShort(); - range->table_offset = eblc_offset + strike->ranges_offset + - GET_ULong(); - } - FORGET_Frame(); - - /* Now, read each index table */ - range = strike->sbit_ranges; - for ( count = strike->num_ranges; count > 0; count--, range++ ) - { - /* Read the header */ - if ( FILE_Seek( range->table_offset ) || - ACCESS_Frame( 8L ) ) - return error;; - - range->index_format = GET_UShort(); - range->image_format = GET_UShort(); - range->image_offset = GET_ULong(); - - FORGET_Frame(); - - error = Load_SBit_Range( strike, range, face ); - if (error) return error; - } - } - - return TT_Err_Ok; - } - - - static - void Free_TrueType_Eblc( TT_EBLC* eblc ) - { - if ( eblc ) - { - ULong i; - TT_SBit_Strike* strike = eblc->strikes; - - - strike = eblc->strikes; - - for ( i = eblc->num_strikes; i > 0; i--, strike++ ) - { - /* for each strike, release all glyph ranges */ - TT_SBit_Range* range = strike->sbit_ranges; - Int n; - - - for ( n = strike->num_ranges; n > 0; n--, range++ ) - { - /* release a range */ - FREE( range->glyph_offsets ); - FREE( range->glyph_codes ); - } - FREE( strike->sbit_ranges ); - strike->num_ranges = 0; - } - FREE( eblc->strikes ); - eblc->num_strikes = 0; - eblc->version = 0; - } - } - - - static - TT_Error Load_SBit_Metrics( TT_Big_Glyph_Metrics* metrics, - TT_SBit_Range* range, - ULong ebdt_offset ) - { - TT_Error error; - Byte height, width; - - - /* copy bitmap metrics for formats 2 and 5 */ - if ( ( ( range->index_format == 2 ) || ( range->index_format == 5 ) ) && - ( range->image_format == 5 ) ) - /* metrics are taken from current image bitmap */ - /* i.e. from `image.metrics' */ - { - TT_SBit_Metrics* rmetrics = &range->metrics; - - - metrics->bbox.xMin = rmetrics->horiBearingX; - metrics->bbox.xMax = metrics->bbox.xMin + rmetrics->width; - - metrics->bbox.yMax = rmetrics->horiBearingY; - metrics->bbox.yMin = metrics->bbox.yMax - rmetrics->height; - - metrics->horiBearingX = rmetrics->horiBearingX; - metrics->horiBearingY = metrics->bbox.yMax; - metrics->horiAdvance = rmetrics->horiAdvance; - - metrics->vertBearingX = rmetrics->vertBearingX; - metrics->vertBearingY = rmetrics->vertBearingY; - metrics->vertAdvance = rmetrics->vertAdvance; - - return TT_Err_Ok; - } - - switch ( range->image_format ) - { - case 1: - case 2: - case 6: - case 7: - case 8: - case 9: - { - Long length = 5L; - - - if ( range->image_format == 8 ) - length++; - - /* read the small metrics */ - if ( ACCESS_Frame( length ) ) - return error; - - height = GET_Byte(); - width = GET_Byte(); - - metrics->horiBearingX = GET_Char(); - metrics->horiBearingY = GET_Char(); - metrics->horiAdvance = GET_Byte(); - - FORGET_Frame(); - - metrics->bbox.xMin = metrics->horiBearingX; - metrics->bbox.yMax = metrics->horiBearingY; - metrics->bbox.xMax = metrics->bbox.xMin + width; - metrics->bbox.yMin = metrics->bbox.yMax - height; - - /* read the rest of the big metrics for the formats */ - /* that support it. */ - if ( ( range->image_format >= 6 ) && ( range->image_format != 8 ) ) - { - if ( ACCESS_Frame( 3L ) ) - return error; - - metrics->vertBearingX = (Int)GET_Char(); - metrics->vertBearingY = (Int)GET_Char(); - metrics->vertAdvance = (Int)GET_Char(); - - FORGET_Frame(); - } - else - { - /* XXX: How can we fill these when the information isn't */ - /* available? */ - metrics->vertBearingX = 0; - metrics->vertBearingY = 0; - metrics->vertAdvance = 0; - } - } - break; - - case 5: /* metrics are taken from current image bitmap */ - /* i.e. from 'image.metrics' */ - break; - - default: - PERROR(( "Unsupported embedded bitmap format!\n" )); - return TT_Err_Invalid_File_Format; - } - - return TT_Err_Ok; - } - - - static - TT_Error Load_SBit_Image( TT_SBit_Strike strike, - UShort glyph_index, - Byte x_offset, - Byte y_offset, - ULong ebdt_offset, - TT_SBit_Image* image, - UShort component_depth ) - { - TT_Error error; - Byte height, width; - - ULong bitmap_offset; - - TT_SBit_Range* range = 0; - - TT_Big_Glyph_Metrics metrics; - - /********************************************************************/ - /* */ - /* Scan the strike's range for the position/metrics of the source */ - /* glyph. */ - { - UShort count = strike.num_ranges; - TT_SBit_Range* cur = strike.sbit_ranges; - - for ( ; count > 0; count--, cur++ ) - { - /* look for the glyph in the current range */ - switch ( cur->index_format ) - { - case 1: - case 2: - case 3: - if ( glyph_index >= cur->first_glyph && - glyph_index <= cur->last_glyph ) - { - UShort delta = glyph_index - cur->first_glyph; - - - range = cur; - bitmap_offset = cur->index_format == 2 - ? cur->image_offset + cur->image_size * delta - : cur->glyph_offsets[delta]; - goto Found; - } - break; - - case 4: - case 5: - { - UShort n; - - - for ( n = 0; n < cur->num_glyphs; n++ ) - if ( cur->glyph_codes[n] == glyph_index ) - { - range = cur; - bitmap_offset = cur->index_format == 4 - ? cur->glyph_offsets[n] - : cur->image_offset + cur->image_size * n; - goto Found; - } - } - break; - - default: - return TT_Err_Invalid_Glyph_Index; - } - } - /* Not found */ - return TT_Err_Invalid_Glyph_Index; - } - - Found: - if ( FILE_Seek( ebdt_offset + bitmap_offset ) ) - return error; - - /* First of all, load the metrics if needed */ - error = Load_SBit_Metrics( &metrics, range, ebdt_offset ); - if ( error ) - return error; - - width = metrics.bbox.xMax - metrics.bbox.xMin; - height = metrics.bbox.yMax - metrics.bbox.yMin; - - if ( !component_depth ) - { - image->metrics = metrics; - - image->map.width = width; - image->map.rows = height; - - image->map.cols = (width + 7) >> 3; - image->map.size = height * image->map.cols; - - if ( REALLOC( image->map.bitmap, image->map.size ) ) - return error; - - MEM_Set( image->map.bitmap, 0, image->map.size ); - } - - /* Now, load the data as needed */ - switch ( range->image_format ) - { - case 1: - case 6: /* byte-aligned data */ - error = Load_BitmapData( image, - height * (( width + 7 ) >> 3), - x_offset, y_offset, - width, height, - 1 ); - if ( error ) - return error; - break; - - case 2: - case 5: - case 7: - error = Load_BitmapData( image, - (width * height + 7) >> 3, - x_offset, y_offset, - width, height, 0 ); - if ( error ) - return error; - break; - - case 8: - case 9: - { - /* Now, load composite sbit glyphs */ - /* This code is not sophisticated */ - - TT_SBit_Component* component_array; - UShort num_components; - Int i; - - if ( ACCESS_Frame( 2L ) ) - return error; - num_components = GET_UShort(); - FORGET_Frame(); - - MEM_Alloc( component_array, - sizeof ( TT_SBit_Component ) * num_components ); - - if ( ACCESS_Frame( 4L * num_components ) ) - return error; - - for ( i = 0; i < num_components; i++ ) - { - component_array[i].glyph_code = GET_UShort(); - component_array[i].x_offset = GET_Char(); - component_array[i].y_offset = GET_Char(); - } - - FORGET_Frame(); - - component_depth++; - - for ( i = 0; i < num_components; i++ ) - { - error = Load_SBit_Image( strike, component_array[i].glyph_code, - component_array[i].x_offset, - component_array[i].y_offset, - ebdt_offset, - image, - component_depth ); - if ( error ) - return error; - } - FREE( component_array ); - break; - - default: - return TT_Err_Invalid_File_Format; - } - } - - return TT_Err_Ok; - } - - -/******************************************************************* - * - * Function: Load_TrueType_Ebdt - * - ******************************************************************/ - - static - TT_Error Load_TrueType_Ebdt( PFace face, - TT_SBit_Strike strike, - ULong glyph_index, - TT_SBit_Image* image ) - { - DEFINE_LOCALS; - - ULong ebdt_offset; - ULong version; - Long i; - - - /* Try to find the `EBDT' or `bdat' table in the font files. */ - /* Both tags describe the same table, `EBDT' is for OpenType */ - /* fonts, while `bdat' is for TrueType GX fonts. Many fonts */ - /* contain both tags pointing to the same table */ - - i = TT_LookUp_Table( face, TTAG_EBDT ); - if ( i < 0 ) - i = TT_LookUp_Table( face, TTAG_bdat ); - - if ( i < 0 ) - return TT_Err_Table_Missing; - - ebdt_offset = face->dirTables[i].Offset; - - if ( FILE_Seek( ebdt_offset ) || - ACCESS_Frame( 4L ) ) /* read into frame */ - return error; - - version = GET_ULong(); - FORGET_Frame(); - - PTRACE2(( "-- Format version : %08lx\n", version )); - if ( version != 0x00020000 ) - { - PERROR(( "Invalid file format!\n" )); - return TT_Err_Invalid_File_Format; - } - - /* This doesn't compile, I simply commented it out ?? - David */ - /* PTRACE4(( "-- Format: %d\n", range->image_format )); */ - - error = Load_SBit_Image( strike, - glyph_index, - 0, 0, - ebdt_offset, - image, - 0 ); - if ( error ) - return error; - - return TT_Err_Ok; - } - - - static TT_Error EBLC_Create( void* ext, - PFace face ) - { - TT_EBLC* eblc = (TT_EBLC*)ext; - - - /* by convention */ - if ( !eblc ) - return TT_Err_Ok; - - return Load_TrueType_Eblc( face, eblc ); - } - - - static TT_Error EBLC_Destroy( void* ext, - PFace face ) - { - TT_EBLC* eblc = (TT_EBLC*)ext; - - - (void)face; - - if ( eblc ) - Free_TrueType_Eblc( eblc ); - - return TT_Err_Ok; - } - - - /*************************************************************/ - /* */ - /* */ - /* TT_Init_SBit_Extension */ - /* */ - /* */ - /* Initialize the embedded bitmaps extension for the */ - /* FreeType engine. */ - /* */ - /* */ - /* engine :: handle to current FreeType library instance */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - EXPORT_FUNC - TT_Error TT_Init_SBit_Extension( TT_Engine engine ) - { - PEngine_Instance _engine = HANDLE_Engine( engine ); - - TT_Error error; - - - if ( !_engine ) - return TT_Err_Invalid_Engine; - - error = TT_Register_Extension( _engine, - SBIT_ID, - sizeof ( TT_EBLC ), - EBLC_Create, - EBLC_Destroy ); - - return error; - } - - - /*************************************************************/ - /* */ - /* */ - /* TT_Get_Face_Bitmaps */ - /* */ - /* */ - /* Loads the `EBLC' table from a font file, if any. */ - /* */ - /* */ - /* face :: handle to the source TrueType font/face */ - /* */ - /* */ - /* eblc_table :: a descriptor for the EBLC table */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - /* */ - /* This function returns TT_Err_Table_Missing if the */ - /* font contains no embedded bitmaps. All fields in */ - /* `eblc_table' will then be set to 0. */ - /* */ - EXPORT_FUNC - TT_Error TT_Get_Face_Bitmaps( TT_Face face, - TT_EBLC* eblc_table ) - { - PFace faze = HANDLE_Face( face ); - TT_EBLC* eblc; - TT_Error error; - - - error = TT_Extension_Get( faze, SBIT_ID, (void**)&eblc ); - if ( !error ) - { - if ( eblc->version ) - { - *eblc_table = *eblc; - return TT_Err_Ok; - } - error = TT_Err_Table_Missing; - } - - eblc_table->version = 0; - eblc_table->num_strikes = 0; - eblc_table->strikes = 0; - - return error; - } - - -/******************************************************************* - * - * TT_Get_SBit_Strike - * - * - * Loads suitable strike (bitmap sizetable) for given instance. - * This strike includes sbitLineMetrics. - * - * - * face :: the source face - * instance :: the current size instance - * - * - * strike :: the bitmap strike descriptor - * - * - * TrueType error code. 0 means success. - * - ******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_SBit_Strike( TT_Face face, - TT_Instance instance, - TT_SBit_Strike* strike ) - { - TT_Error error; - PFace faze = HANDLE_Face( face ); - PInstance ins = HANDLE_Instance( instance ); - - TT_EBLC* eblc; - TT_Int x_ppem, y_ppem; - - - if ( !strike || !ins || ins->owner != faze ) - return TT_Err_Invalid_Argument; - - error = TT_Extension_Get( faze, SBIT_ID, (void**)&eblc ); - if ( error ) - goto Exit; - - /********************************************************************/ - /* */ - /* Look for an sbit strike that matches the current x and y ppms */ - /* */ - { - UShort count = eblc->num_strikes; - TT_SBit_Strike* cur = eblc->strikes; - - - x_ppem = ins->metrics.x_ppem; - y_ppem = ins->metrics.y_ppem; - - MEM_Set( strike, 0, sizeof ( TT_SBit_Strike ) ); - - for ( ; count > 0; count--, cur++ ) - if ( cur->x_ppem == x_ppem && - cur->y_ppem == y_ppem ) - { - *strike = *cur; - break; - } - - /* return immediately if we didn't find an appropriate strike */ - if ( !strike->num_ranges ) - error = TT_Err_Invalid_PPem; - } - - Exit: - return error; - } - - - /*************************************************************/ - /* */ - /* */ - /* TT_Load_Glyph_Bitmap */ - /* */ - /* */ - /* Loads a given glyph embedded bitmap. */ - /* */ - /* */ - /* face :: handle to the source TrueType font/face */ - /* instance :: current size/transform instance */ - /* glyph_index :: index of source glyph */ - /* bitmap :: target embedded bitmap descriptor */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - /* */ - /* This function returns an error if there is no */ - /* embedded bitmap for the glyph at the given */ - /* instance. */ - /* */ - EXPORT_FUNC - TT_Error TT_Load_Glyph_Bitmap( TT_Face face, - TT_Instance instance, - TT_UShort glyph_index, - TT_SBit_Image* image ) - { - TT_Stream stream; - TT_Error error; - - PFace faze = HANDLE_Face( face ); - PInstance ins = HANDLE_Instance( instance ); - - TT_SBit_Strike strike; - - - if ( ins->owner != faze ) - { - error = TT_Err_Invalid_Argument; - goto Fail; - } - - /********************************************************************/ - /* */ - /* Look for an sbit strike that matches the current x and y ppms */ - /* */ - error = TT_Get_SBit_Strike( face, instance, &strike ); - if ( error ) - goto Fail; - - /* return immediately if the glyph index isn't in the strike extent */ - if ( glyph_index < strike.start_glyph || - glyph_index > strike.end_glyph ) - { - error = TT_Err_Invalid_Glyph_Index; - goto Fail; - } - - { - image->bit_depth = 1; - - if ( !USE_Stream( faze->stream, stream ) ) - { - error = Load_TrueType_Ebdt( faze, strike, glyph_index, image ); - - DONE_Stream( stream ); - - /* exit successfully if we can */ - if ( !error ) - { - image->map.flow = TT_Flow_Down; - - Crop_Bitmap( image ); - - /* correct sbit metrics */ - { - TT_Big_Glyph_Metrics* metrics = &image->metrics; - - - metrics->bbox.xMin *= 64; - metrics->bbox.xMax *= 64; - - metrics->bbox.yMax *= 64; - metrics->bbox.yMin *= 64; - - metrics->horiBearingX *= 64; - metrics->horiBearingY *= 64; - metrics->horiAdvance *= 64; - - metrics->vertBearingX *= 64; - metrics->vertBearingY *= 64; - metrics->vertAdvance *= 64; - } - - goto Exit; - } - } - } - - Fail: - image->map.width = 0; - image->map.rows = 0; - image->map.cols = 0; - image->map.size = 0; - image->map.bitmap = 0; - image->map.flow = 0; - image->bit_depth = 0; - - Exit: - return error; - } - - - /*************************************************************/ - /* */ - /* */ - /* TT_New_SBit_Image */ - /* */ - /* */ - /* Allocates a new embedded bitmap container. */ - /* */ - /* */ - /* image :: sbit image */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - EXPORT_FUNC - TT_Error TT_New_SBit_Image( TT_SBit_Image** image ) - { - return MEM_Alloc( *image, sizeof ( **image ) ); - } - - - /*************************************************************/ - /* */ - /* */ - /* TT_Done_SBit_Image */ - /* */ - /* */ - /* Releases an embedded bitmap container. */ - /* */ - /* */ - /* image :: sbit image */ - /* */ - EXPORT_FUNC - void TT_Done_SBit_Image( TT_SBit_Image* image ) - { - FREE( image->map.bitmap ); - FREE( image ); - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxsbit.h diff -u xc/extras/FreeType/lib/extend/ftxsbit.h:1.1.1.1 xc/extras/FreeType/lib/extend/ftxsbit.h:removed --- xc/extras/FreeType/lib/extend/ftxsbit.h:1.1.1.1 Sat Feb 12 23:56:09 2000 +++ xc/extras/FreeType/lib/extend/ftxsbit.h Wed Mar 16 20:59:45 2005 @@ -1,490 +0,0 @@ -/******************************************************************* - * - * ftxsbit.h - * - * embedded bitmap support API extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This extension is used to load the embedded bitmaps present - * in certain TrueType files. - * - ******************************************************************/ - -#ifndef FTXSBIT_H -#define FTXSBIT_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /*************************************************************/ - /* */ - /* TT_SBit_Metrics */ - /* */ - /* */ - /* A structure used to hold the big metrics of a given */ - /* glyph bitmap in a TrueType or OpenType font. These */ - /* are usually found in the `EBDT' table. */ - /* */ - /* */ - /* height :: glyph height in pixels */ - /* width :: glyph width in pixels */ - /* */ - /* horiBearingX :: horizontal left bearing */ - /* horiBearingY :: horizontal top bearing */ - /* horiAdvance :: horizontal advance */ - /* */ - /* vertBearingX :: vertical left bearing */ - /* vertBearingY :: vertical top bearing */ - /* vertAdvance :: vertical advance */ - /* */ - typedef struct TT_SBit_Metrics_ - { - TT_Byte height; - TT_Byte width; - - TT_Char horiBearingX; - TT_Char horiBearingY; - TT_Byte horiAdvance; - - TT_Char vertBearingX; - TT_Char vertBearingY; - TT_Byte vertAdvance; - - } TT_SBit_Metrics; - - - /*************************************************************/ - /* */ - /* TT_SBit_Small_Metrics */ - /* */ - /* */ - /* A structure used to hold the small metrics of a given */ - /* glyph bitmap in a TrueType or OpenType font. These */ - /* are usually found in the `EBDT' table. */ - /* */ - /* */ - /* height :: glyph height in pixels */ - /* width :: glyph width in pixels */ - /* */ - /* bearingX :: left-side bearing */ - /* bearingY :: top-side bearing */ - /* advance :: advance width or height */ - /* */ - typedef struct TT_SBit_Small_Metrics_ - { - TT_Byte height; - TT_Byte width; - - TT_Char bearingX; - TT_Char bearingY; - TT_Byte advance; - - } TT_SBit_Small_Metrics; - - - /*************************************************************/ - /* */ - /* TT_SBit_Line_Metrics */ - /* */ - /* */ - /* A structure used to describe the text line metrics of */ - /* a given bitmap strike, for either horizontal or */ - /* vertical layout. */ - /* */ - /* */ - /* ascender :: ascender in pixels */ - /* descender :: descender in pixels */ - /* max_width :: maximum glyph width in pixels */ - /* */ - /* caret_slope_enumerator :: Rise of the caret slope, */ - /* typically set to 1 for non-italic fonts. */ - /* caret_slope_denominator :: Rise of the caret slope, */ - /* typically set to 0 for non-italic fonts. */ - /* caret_offset :: Offset in pixels */ - /* to move the caret for proper positioning. */ - /* */ - /* min_origin_SB :: Minimum of horiBearingX */ - /* (resp. vertBearingY) */ - /* min_advance_SB :: Minimum of */ - /* (hori. advance - ( horiBearingX + width )) */ - /* (resp. vert. advance - ( vertBearingY + height )) */ - /* max_before_BL :: Maximum of horiBearingY */ - /* (resp. Maximum of vertBearingY) */ - /* min_after_BL :: Minimum of ( horiBearingY - height ) */ - /* (resp. vertBearingX - width ) */ - /* */ - typedef struct TT_SBit_Line_Metrics_ - { - TT_Char ascender; - TT_Char descender; - TT_Byte max_width; - TT_Char caret_slope_numerator; - TT_Char caret_slope_denominator; - TT_Char caret_offset; - TT_Char min_origin_SB; - TT_Char min_advance_SB; - TT_Char max_before_BL; - TT_Char min_after_BL; - TT_Char pads[2]; - - } TT_SBit_Line_Metrics; - - - /*************************************************************/ - /* */ - /* TT_SBit_Range */ - /* */ - /* */ - /* A TrueType/OpenType subIndexTable as defined in the */ - /* `EBLC' or `bloc' tables. */ - /* */ - /* */ - /* */ - /* first_glyph :: first glyph index in range */ - /* last_glyph :: last glyph index in range */ - /* */ - /* index_format :: format of index table. valid */ - /* values are 1 to 5. */ - /* */ - /* image_format :: format of `EBDT' image data */ - /* image_offset :: offset to image data in `EBDT' */ - /* */ - /* image_size :: for index formats 2 and 5. This is */ - /* the size in bytes of each glyph bitmap */ - /* glyph bitmap */ - /* */ - /* big_metrics :: for index formats 2 and 5. This is */ - /* the big metrics for each glyph bitmap */ - /* */ - /* num_glyphs :: for index formats 4 and 5. This is */ - /* the number of glyphs in the code */ - /* array. */ - /* */ - /* glyph_offsets :: for index formats 1 and 3. */ - /* glyph_codes :: for index formats 4 and 5. */ - /* */ - /* table_offset :: offset of index table in `EBLC' table */ - /* -- only used during strike loading. */ - /* */ - typedef struct TT_SBit_Range - { - TT_UShort first_glyph; - TT_UShort last_glyph; - - TT_UShort index_format; - TT_UShort image_format; - TT_ULong image_offset; - - TT_ULong image_size; - TT_SBit_Metrics metrics; - TT_ULong num_glyphs; - - TT_ULong* glyph_offsets; - TT_UShort* glyph_codes; - - TT_ULong table_offset; - - } TT_SBit_Range; - - - /*************************************************************/ - /* */ - /* TT_SBit_Strike */ - /* */ - /* */ - /* A structure used describe a given bitmap strike in the */ - /* `EBLC' or `bloc' tables. */ - /* */ - /* */ - /* */ - /* num_index_ranges :: number of index ranges */ - /* index_ranges :: array of glyph index ranges */ - /* */ - /* color_ref :: unused. color reference? */ - /* hori :: line metrics for horizontal layouts. */ - /* vert :: line metrics for vertical layouts. */ - /* */ - /* start_glyph :: lowest glyph index for this strike. */ - /* end_glyph :: higher glyph index for this strike. */ - /* */ - /* x_ppem :: horizontal pixels per EM */ - /* y_ppem :: vertical pixels per EM */ - /* bit_depth :: bit depth. valid values are 1, 2, 4 & 8 */ - /* flags :: vertical or horizontal? */ - /* */ - typedef struct TT_SBit_Strike_ - { - TT_Int num_ranges; - TT_SBit_Range* sbit_ranges; - TT_ULong ranges_offset; - - TT_ULong color_ref; - - TT_SBit_Line_Metrics hori; - TT_SBit_Line_Metrics vert; - - TT_UShort start_glyph; - TT_UShort end_glyph; - - TT_Byte x_ppem; - TT_Byte y_ppem; - TT_Byte bit_depth; - TT_Char flags; - - } TT_SBit_Strike; - - - /*************************************************************/ - /* */ - /* TT_SBit_Component */ - /* */ - /* */ - /* A simple structure to describe a compound sbit element */ - /* */ - /* */ - /* glyph_code :: element's glyph index */ - /* x_offset :: element's left bearing */ - /* y_offset :: element's top bearing */ - /* */ - typedef struct TT_SBit_Component_ - { - TT_UShort glyph_code; - TT_Char x_offset; - TT_Char y_offset; - - } TT_SBit_Component; - - - /*************************************************************/ - /* */ - /* TT_SBit_Scale */ - /* */ - /* */ - /* A structure used describe a given bitmap scaling */ - /* table, as defined for the `EBSC' table. */ - /* */ - /* */ - /* hori :: horizontal line metrics */ - /* vert :: vertical line metrics */ - /* */ - /* x_ppem :: horizontal pixels per EM */ - /* y_ppem :: vertical pixels per EM */ - /* */ - /* x_ppem_substitute :: substitution x_ppem */ - /* y_ppem_substitute :: substitution y_ppem */ - /* */ - typedef struct TT_SBit_Scale_ - { - TT_SBit_Line_Metrics hori; - TT_SBit_Line_Metrics vert; - - TT_Byte x_ppem; - TT_Byte y_ppem; - - TT_Byte x_ppem_substitute; - TT_Byte y_ppem_substitute; - - } TT_SBit_Scale; - - - /*************************************************************/ - /* */ - /* TT_SBit_Image */ - /* */ - /* */ - /* A structure used to describe a given embedded bitmap */ - /* image. */ - /* */ - /* */ - /* map :: bitmap descriptor */ - /* bit_depth :: pixel bit depth */ - /* metrics :: glyph metrics for the bitmap */ - /* */ - typedef struct TT_SBit_Image_ - { - TT_Raster_Map map; - int bit_depth; - TT_Big_Glyph_Metrics metrics; - - } TT_SBit_Image; - - - /*************************************************************/ - /* */ - /* TT_EBLC */ - /* */ - /* */ - /* A structure used to describe the `EBLC' table from */ - /* a TrueType font. */ - /* */ - /* */ - /* version :: version number of the EBLC table */ - /* */ - /* num_strikes :: the number of strikes, i.e. bitmap */ - /* sizes, present in this font */ - /* */ - /* strikes :: array of strikes */ - /* */ - typedef struct TT_EBLC_ - { - TT_ULong version; - TT_ULong num_strikes; - TT_SBit_Strike* strikes; - - } TT_EBLC; - - - - - /*************************************************************/ - /* */ - /* */ - /* TT_Init_SBit_Extension */ - /* */ - /* */ - /* Initializes the embedded bitmap extension for the */ - /* FreeType engine. */ - /* */ - /* */ - /* engine :: handle to current FreeType library instance */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - EXPORT_DEF - TT_Error TT_Init_SBit_Extension( TT_Engine engine ); - - - /*************************************************************/ - /* */ - /* */ - /* TT_Get_Face_Bitmaps */ - /* */ - /* */ - /* Loads the `EBLC' table from a font file, if any. */ - /* */ - /* */ - /* face :: handle to the source TrueType font/face */ - /* */ - /* */ - /* eblc_table :: a descriptor for the EBLC table */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - /* */ - /* This function returns TT_Err_Table_Missing if the */ - /* font contains no embedded bitmaps. All fields in */ - /* `eblc_table' will then be set to 0. */ - /* */ - EXPORT_DEF - TT_Error TT_Get_Face_Bitmaps( TT_Face face, - TT_EBLC* eblc_table ); - - - /*************************************************************/ - /* */ - /* */ - /* TT_New_SBit_Image */ - /* */ - /* */ - /* Allocates a new embedded bitmap container. */ - /* */ - /* */ - /* image :: sbit image */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - EXPORT_DEF - TT_Error TT_New_SBit_Image( TT_SBit_Image** image ); - - - /*************************************************************/ - /* */ - /* */ - /* TT_Done_SBit_Image */ - /* */ - /* */ - /* Releases an embedded bitmap container. */ - /* */ - /* */ - /* image :: sbit image */ - /* */ - EXPORT_DEF - void TT_Done_SBit_Image( TT_SBit_Image* image ); - - - /*************************************************************/ - /* */ - /* TT_Get_SBit_Strike */ - /* */ - /* */ - /* Loads a suitable strike (bitmap sizetable) for the */ - /* given instance. This strike includes */ - /* sbitLineMetrics. */ - /* */ - /* */ - /* face :: the source face */ - /* instance :: the current size instance */ - /* */ - /* */ - /* strike :: the bitmap strike descriptor */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - EXPORT_DEF - TT_Error TT_Get_SBit_Strike( TT_Face face, - TT_Instance instance, - TT_SBit_Strike* strike ); - - - /*************************************************************/ - /* */ - /* */ - /* TT_Load_Glyph_Bitmap */ - /* */ - /* */ - /* Loads a given glyph embedded bitmap. */ - /* */ - /* */ - /* face :: handle to the source TrueType font/face */ - /* instance :: current size/transform instance */ - /* glyph_index :: index of source glyph */ - /* bitmap :: target embedded bitmap descriptor */ - /* */ - /* */ - /* Error code. 0 means success. */ - /* */ - /* */ - /* This function returns an error if there is no */ - /* embedded bitmap for the glyph at the given */ - /* instance. */ - /* */ - EXPORT_DEF - TT_Error TT_Load_Glyph_Bitmap( TT_Face face, - TT_Instance instance, - TT_UShort glyph_index, - TT_SBit_Image* bitmap ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXSBIT_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxwidth.c diff -u xc/extras/FreeType/lib/extend/ftxwidth.c:1.1.1.2 xc/extras/FreeType/lib/extend/ftxwidth.c:removed --- xc/extras/FreeType/lib/extend/ftxwidth.c:1.1.1.2 Sat Feb 12 23:56:09 2000 +++ xc/extras/FreeType/lib/extend/ftxwidth.c Wed Mar 16 20:59:46 2005 @@ -1,185 +0,0 @@ -/******************************************************************* - * - * ftxwidth.c 1.0 - * - * Glyph Widths (and Heights) fast retrieval extension - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This extension is used to parse the "glyf" table of a TrueType - * file in order to extract the bbox of a given range of glyphs. - * - * The bbox is then used to build font unit widths and height - * that are returned in two parallel arrays. - * - * This extension is needed by the FreeType/2 OS/2 Font Driver. - * - ******************************************************************/ - - -#include "ftxwidth.h" -#include "ttdebug.h" -#include "ttobjs.h" -#include "ttfile.h" -#include "tttags.h" -#include "ttload.h" - -/* Required by the tracing mode */ - -#undef TT_COMPONENT -#define TT_COMPONENT trace_any - - - /******************************************************************/ - /* */ - /* Function: TT_Get_Face_Widths */ - /* */ - /* Description: Returns the widths and/or heights of a given */ - /* range of glyphs for a face. */ - /* */ - /* Input: */ - /* face :: face handle */ - /* */ - /* first_glyph :: first glyph in range */ - /* */ - /* last_glyph :: last glyph in range */ - /* */ - /* widths :: address of table receiving the widths */ - /* expressed in font units (ushorts). Set */ - /* this parameter to NULL if you're not */ - /* interested by these values. */ - /* */ - /* heights :: address of table receiving the heights */ - /* expressed in font units (ushorts). Set */ - /* this parameter to NULL if you're not */ - /* interested by these values. */ - /* */ - /* Returns: */ - /* Error code */ - /* */ - /* */ - /******************************************************************/ - - EXPORT_FUNC - TT_Error TT_Get_Face_Widths( TT_Face face, - TT_UShort first_glyph, - TT_UShort last_glyph, - TT_UShort* widths, - TT_UShort* heights ) - { - DEFINE_ALL_LOCALS; - - PFace faze = HANDLE_Face(face); - UShort n; - Long table; - - ULong glyf_offset; /* offset of glyph table in file */ - UShort zero_width = 0; /* width of glyph 0 */ - UShort zero_height = 0; /* height of glyph 0 */ - - Bool zero_loaded = 0; - -#ifndef TT_HUGE_PTR - PStorage locations; -#else - Storage TT_HUGE_PTR * locations; -#endif - TT_BBox bbox; - - - if ( !faze ) - return TT_Err_Invalid_Face_Handle; - - if ( last_glyph >= faze->numGlyphs || - first_glyph > last_glyph ) - return TT_Err_Invalid_Argument; - - /* find "glyf" table */ - table = TT_LookUp_Table( faze, TTAG_glyf ); - if ( table < 0 ) - { - PERROR(( "ERROR: there is no glyph table in this font file!\n" )); - return TT_Err_Glyf_Table_Missing; - } - glyf_offset = faze->dirTables[table].Offset; - - /* now access stream */ - if ( USE_Stream( faze->stream, stream ) ) - return error; - - locations = faze->glyphLocations + first_glyph; - - /* loop to load each glyph in the range */ - for ( n = first_glyph; n <= last_glyph; n++ ) - { - if ( n + 1 < faze->numGlyphs && - locations[0] == locations[1] ) - { - /* Note : Glyph 0 is always used to indicate a missing glyph */ - /* in a range. We must thus return its width and height */ - /* where appropriate when we find an undefined glyph. */ - if ( zero_loaded == 0 ) - { - if ( FILE_Seek( glyf_offset + faze->glyphLocations[0] ) || - ACCESS_Frame( 10L ) ) - goto Fail; - - (void)GET_Short(); /* skip number of contours */ - - bbox.xMin = GET_Short(); - bbox.yMin = GET_Short(); - bbox.xMax = GET_Short(); - bbox.yMax = GET_Short(); - - FORGET_Frame(); - - zero_width = (UShort)(bbox.xMax - bbox.xMin); - zero_height = (UShort)(bbox.yMax - bbox.yMin); - zero_loaded = 1; - } - - if ( widths ) - *widths++ = zero_width; - - if ( heights ) - *heights++ = zero_height; - } - else - { - /* normal glyph, read header */ - if ( FILE_Seek( glyf_offset + locations[0] ) || - ACCESS_Frame( 10L ) ) - goto Fail; - - (void)GET_Short(); /* skip number of contours */ - - bbox.xMin = GET_Short(); - bbox.yMin = GET_Short(); - bbox.xMax = GET_Short(); - bbox.yMax = GET_Short(); - - FORGET_Frame(); - - if ( widths ) - *widths++ = (UShort)(bbox.xMax - bbox.xMin); - - if ( heights ) - *heights++ = (UShort)(bbox.yMax - bbox.yMin); - } - } - - Fail: - DONE_Stream( stream ); - return error; - } - - -/* END */ Index: xc/extras/FreeType/lib/extend/ftxwidth.h diff -u xc/extras/FreeType/lib/extend/ftxwidth.h:1.1.1.2 xc/extras/FreeType/lib/extend/ftxwidth.h:removed --- xc/extras/FreeType/lib/extend/ftxwidth.h:1.1.1.2 Sat Feb 12 23:56:10 2000 +++ xc/extras/FreeType/lib/extend/ftxwidth.h Wed Mar 16 20:59:46 2005 @@ -1,80 +0,0 @@ -/******************************************************************* - * - * ftxwidth.h - * - * Glyph Widths (and Heights) fast retrieval extension. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This extension is used to parse the `glyf' table of a TrueType - * file in order to extract the bounding box of a given range of glyphs. - * - * The bounding box is then used to build font unit widths and heights - * that are returned in two parallel arrays. - * - * This extension is needed by the FreeType/2 OS/2 Font Driver. - * - ******************************************************************/ - -#ifndef FTXWIDTH_H -#define FTXWIDTH_H - -#include "freetype.h" - -#ifdef __cplusplus -extern "C" { -#endif - - /******************************************************************/ - /* */ - /* Function: TT_Get_Face_Widths */ - /* */ - /* Description: Returns the widths and/or heights of a given */ - /* range of glyphs for a face. */ - /* */ - /* Input: */ - /* face :: face handle */ - /* */ - /* first_glyph :: first glyph in range */ - /* */ - /* last_glyph :: last glyph in range */ - /* */ - /* widths :: address of table receiving the widths */ - /* expressed in font units (ushorts). Set */ - /* this parameter to NULL if you're not */ - /* interested by these values. */ - /* */ - /* heights :: address of table receiving the heights */ - /* expressed in font units (ushorts). Set */ - /* this parameter to NULL if you're not */ - /* interested by these values */ - /* */ - /* Returns: */ - /* Error code */ - /* */ - /* */ - /******************************************************************/ - - EXPORT_DEF - TT_Error TT_Get_Face_Widths( TT_Face face, - TT_UShort first_glyph, - TT_UShort last_glyph, - TT_UShort* widths, - TT_UShort* heights ); - -#ifdef __cplusplus -} -#endif - -#endif /* FTXWIDTH_H */ - - -/* END */ Index: xc/extras/FreeType/lib/extend/readme.1st diff -u xc/extras/FreeType/lib/extend/readme.1st:1.1.1.3 xc/extras/FreeType/lib/extend/readme.1st:removed --- xc/extras/FreeType/lib/extend/readme.1st:1.1.1.3 Sat Feb 12 23:56:10 2000 +++ xc/extras/FreeType/lib/extend/readme.1st Wed Mar 16 20:59:46 2005 @@ -1,61 +0,0 @@ -This directory contains several extensions to the core engine. - -An extension is a separately compilable unit which can be linked by -a client application to add new functionalities to the engine. - -There are two kinds of extensions: an `API extension' provides -clients with new APIs to access internal engine structures or data, -while an `engine extension' implements new TrueType data or table -management. - -This directory contains the following: - - ftxcmap: An API extension to iterate over cmaps. - - ftxgasp: A simple API extension which returns the TrueType `gasp' - table to client applications, when found in a font file. - Though this table is always loaded by the engine, there - is no function in the core API to access it. The reason - is simple: to demonstrate a simple API extension with - `ftxgasp'! - - ftxkern: This engine extension is used to access kerning data, - when available in a font file. Note that it implements - on-the-fly loading and retrieving of kerning tables. - However, it doesn't interpret or process the data, and - client applications should use it according to the - TrueType specification. - - ftxpost: An engine extension to load the PostScript glyph names - of the `post' table. See the `ftzoom' program for an - example how to use it. - - ftxwidth: A simple extension used to load the widths and heights - of a given range of glyphs in a face. Results are - expressed in unscaled font units. This is required by - the latest version of the FreeType/2 DLL to speed up - font loading in the GRE (the OS/2 GRaphics Engine). It - can be used by other applications though... - - ftxerr18: This extension simply converts a TrueType engine error - code into a corresponding string describing the error. - It is useful if you intend to write a package for end - users and want to give them not `Error code 135' but - `OS/2 table missing'. See docs/errstr.txt for a - description how to use it (really simple!). ftxerr18 - supports localization of error strings (that is: error - strings are automatically translated into supported - languages) using gettext(). See docs/i18n.txt about - using gettext. - - ftxsbit: Embedded bitmap support. This is an engine extension. - See e.g. the `ftstrtto' program for its usage. - - ftxopen, - ftxgsub, - ftxgpos, - ftxgdef: This is experimental stuff for TrueType Open support! - Please ignore it or help debugging :-) - - ---- END --- Index: xc/extras/FreeType/pascal/lib/freetype.pas diff -u xc/extras/FreeType/pascal/lib/freetype.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/freetype.pas:removed --- xc/extras/FreeType/pascal/lib/freetype.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/freetype.pas Wed Mar 16 20:59:46 2005 @@ -1,1931 +0,0 @@ -(******************************************************************* - * - * FreeType.Pas - * - * High-level interface specification. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Notes : - * - * This is the only file that should be included by client - * application sources for the final release. All other types - * and functions defined in the "tt*.h" files are library - * internals, and should not be included ( except of course - * during development, as now ) - * - ******************************************************************) - -unit FreeType; - -interface - -type - -{$IFDEF OS2} - TT_Int = Longint; -{$ELSE} - TT_Int = Integer; -{$ENDIF} - - TT_Long = longint; - TT_ULong = longint; (* there are no unsigned longs in Pascal :-( *) - (* it will probably be a good idea to use cardinals *) - (* with Delphi and Virtual a bit later.. *) - TT_Short = integer; - TT_UShort = word; - - TT_Fixed = LongInt; (* Signed Fixed 16.16 Float *) - - TT_FWord = Integer; (* Distance in FUnits *) - TT_UFWord = Word; (* Unsigned Distance *) - - TT_F2Dot14 = Integer; (* signed fixed float 2.14 used for *) - (* unary vectors, with layout : *) - (* *) - (* s : 1 -- sign bit *) - (* m : 1 -- mantissa bit *) - (* f : 14 -- unsigned fractional *) - (* *) - (* 's:m' is the 2-bit signed int *) - (* value to which the *positive* *) - (* fractional part should be *) - (* added. *) - (* *) - - TT_F26Dot6 = LongInt; (* 26.6 fixed float, used for pixel coordinates *) - - TT_Pos = Longint; (* funits or 26.6, depending on context *) - - (******************************************************) - (* a simple unit vector type *) - (* *) - TT_UnitVector = record - - x : TT_F2Dot14; - y : TT_F2Dot14; - end; - - (******************************************************) - (* a simple vector type *) - (* *) - TT_Vector = record - - x : TT_Pos; - y : TT_Pos; - end; - - (******************************************************) - (* a simple 2x2 matrix type *) - (* *) - TT_Matrix = record - - xx, xy : TT_Fixed; - yx, yy : TT_Fixed; - end; - - (******************************************************) - (* a glyph's bounding box *) - (* *) - TT_BBox = record - - xMin, yMin : TT_Pos; - xMax, yMax : TT_Pos; - end; - - (******************************************************) - (* the engine's error condition type - 0 always *) - (* means success. *) - (* *) - TT_Error = TT_Int; - - TT_Points_Table = array[0..99] of TT_Vector; - TT_Points = ^TT_Points_Table; - - TT_Coordinates = array[0..99] of TT_Pos; - TT_PCoordinates = ^TT_Coordinates; - - TT_TouchTable = array[0..9] of byte; - TT_PTouchTable = ^TT_TouchTable; - - TT_ConStarts = array[0..9] of word; - TT_PConStarts = ^TT_ConStarts; - - (******************************************************) - (* glyph outline description *) - (* *) - TT_Outline = record - - n_points : integer; - n_contours : integer; - - points : TT_Points; (* array of point coordinates *) - flags : TT_PTouchTable; (* array of point flags *) - conEnds : TT_PConStarts; (* array of contours ends *) - - owner : Boolean; (* this flag is set when the outline *) - (* owns the arrays it uses. *) - - high_precision : Boolean; - second_pass : Boolean; - dropout_mode : Byte; - end; - - (******************************************************) - (* glyph metrics structure *) - (* *) - TT_Glyph_Metrics = record - - bbox : TT_BBox; - bearingX : TT_Pos; - bearingY : TT_Pos; - advance : TT_Pos; - end; - - (******************************************************) - (* big glyph metrics structure *) - (* *) - TT_Big_Glyph_Metrics = record - - bbox : TT_BBox; - horiBearingX : TT_Pos; - horiBearingY : TT_Pos; - horiAdvance : TT_Pos; - vertBearingX : TT_Pos; - vertBearingY : TT_Pos; - vertAdvance : TT_Pos; - end; - - (******************************************************) - (* instance metrics. used to return information to *) - (* clients regarding an instance's important state *) - (* *) - TT_Instance_Metrics = record - - pointsize : integer; - - x_ppem : integer; - y_ppem : integer; - - x_scale : TT_Fixed; - y_scale : TT_Fixed; - - x_resolution : integer; - y_resolution : integer; - end; - -const - TT_Flow_Down = -1; - TT_Flow_Up = +1; - -type - - (******************************************************) - (* a record used to describe a bitmap or pixmap to *) - (* the rasterizer. *) - (* *) - TT_Raster_Map = record - - Rows : TT_Int; (* rows number of the bitmap *) - Cols : TT_Int; (* columns (bytes) per row *) - Width : TT_Int; (* pixels per row *) - Flow : TT_Int; (* bit/pixmap's flow *) - Buffer : pointer; (* bit/pixmap data *) - Size : longint; (* bit/pixmap data size (bytes) *) - end; - - (******************************************************) - (* The TrueType font header table structure *) - (* *) - TT_Header = record - - table_version : TT_Fixed; - font_revision : TT_Fixed; - - checksum_adjust : TT_Long; - magic_number : TT_Long; - - flags : TT_UShort; - units_per_EM : TT_UShort; - - created : array[0..1] of TT_Long; - modified : array[0..1] of TT_Long; - - xMin, yMin : TT_FWord; - xMax, yMax : TT_FWord; - - mac_style : TT_UShort; - lowest_rec_PPEM : TT_UShort; - font_direction : TT_Short; - - index_to_loc_format : TT_Short; - glyph_data_format : TT_Short; - end; - - (******************************************************) - (* The TrueType horizontal header table structure *) - (* *) - TT_Horizontal_Header = record - - version : TT_Fixed; - ascender : TT_FWord; - descender : TT_FWord; - line_gap : TT_FWord; - - advance_Width_Max : TT_UShort; - min_left_side_bearing : TT_Short; - min_right_side_bearing : TT_Short; - xMax_extent : TT_Short; - caret_slope_rise : TT_Short; - caret_slope_run : TT_Short; - - reserved : array[0..4] of TT_SHort; - - metric_data_format : TT_Short; - number_of_HMetrics : TT_UShort; - - (* the following are not part of the header in the file *) - - short_metrics : Pointer; - long_metrics : Pointer; - end; - - (******************************************************) - (* The TrueType vertical header table structure *) - (* *) - TT_Vertical_Header = record - - version : TT_Fixed; - ascender : TT_FWord; - descender : TT_FWord; - line_gap : TT_FWord; - - advance_Height_Max : TT_UShort; - min_top_side_bearing : TT_Short; - min_bottom_side_bearing : TT_Short; - yMax_extent : TT_Short; - caret_slope_rise : TT_Short; - caret_slope_run : TT_Short; - - reserved : array[0..4] of TT_SHort; - - metric_data_format : TT_Short; - number_of_VMetrics : TT_UShort; - - (* the following are not part of the header in the file *) - - short_metrics : Pointer; - long_metrics : Pointer; - end; - - (******************************************************) - (* The TrueType OS/2 table structure *) - (* *) - TT_OS2 = record - version : TT_UShort; (* $0001 *) - xAvgCharWidth : TT_Short; - usWeightClass : TT_UShort; - usWidthClass : TT_UShort; - fsType : TT_Short; - ySubscriptXSize : TT_Short; - ySubscriptYSize : TT_Short; - ySubScriptXOffset : TT_Short; - ySubscriptYOffset : TT_Short; - ySuperscriptXSize : TT_Short; - ySuperscriptYSize : TT_Short; - ySuperscriptXOffset : TT_Short; - ySuperscriptYOffset : TT_Short; - yStrikeoutSize : TT_Short; - yStrikeoutPosition : TT_Short; - sFamilyClass : TT_Short; - panose : array[0..9] of Byte; - ulUnicodeRange1 : TT_ULong; (* bits 0-31 *) - ulUnicodeRange2 : TT_ULong; (* bits 32-63 *) - ulUnicodeRange3 : TT_ULong; (* bits 64-95 *) - ulUnicodeRange4 : TT_ULong; (* bits 96-127 *) - achVendID : array[0..3] of Byte; - fsSelection : TT_UShort; - usFirstCharIndex : TT_UShort; - usLastCharIndex : TT_UShort; - sTypoAscender : TT_Short; - sTypoDescender : TT_Short; - sTypoLineGap : TT_Short; - usWinAscent : TT_UShort; - usWinDescent : TT_UShort; - - (* only version 1 tables *) - ulCodePageRange1 : TT_ULong; - ulCodePageRange2 : TT_ULong; - end; - - (******************************************************) - (* The TrueType Postscript table structure *) - (* *) - TT_Postscript = record - - FormatType : TT_Fixed; - italicAngle : TT_Fixed; - underlinePosition : TT_Short; - underlineThickness : TT_Short; - isFixedPitch : TT_ULong; - minMemType42 : TT_ULong; - maxMemType42 : TT_ULong; - minMemType1 : TT_ULong; - maxMemType1 : TT_ULong; - end; - - (******************************************************) - (* face properties. use to report important face *) - (* data to clients *) - (* *) - TT_Face_Properties = record - - num_glyphs : integer; - max_points : integer; - max_contours : integer; - max_faces : integer; - - header : ^TT_Header; - horizontal : ^TT_Horizontal_Header; - vertical : ^TT_Vertical_Header; - os2 : ^TT_OS2; - postscript : ^TT_Postscript; - end; - - (******************************************************) - (* Objects handle types *) - (* *) - TT_Stream = record z : Pointer; end; - TT_Face = record z : Pointer; end; - TT_Instance = record z : Pointer; end; - TT_Glyph = record z : Pointer; end; - TT_CharMap = record z : Pointer; end; - - TT_Gray_Palette = array[0..4] of byte; - - (******************************************************************) - (* *) - (* ERROR CODES *) - (* *) - (******************************************************************) - -const - (* ------------------- Success is always 0 ---------------------- *) - - TT_Err_Ok = 0; - - (* -------------------------------------------------------------- *) - - TT_Err_Invalid_Face_Handle = $0001; - TT_Err_Invalid_Instance_Handle = $0002; - TT_Err_Invalid_Glyph_Handle = $0003; - TT_Err_Invalid_CharMap_Handle = $0004; - TT_Err_Invalid_Result_Address = $0005; - TT_Err_Invalid_Glyph_Index = $0006; - TT_Err_Invalid_Argument = $0007; - TT_Err_Could_Not_Open_File = $0008; - TT_Err_File_Is_Not_Collection = $0009; - - TT_Err_Table_Missing = $000A; - TT_Err_Invalid_Horiz_Metrics = $000B; - TT_Err_Invalid_Vert_Metrics = $000B; - TT_Err_Invalid_CharMap_Format = $000C; - - TT_Err_Invalid_File_Format = $0010; - TT_Err_File_Error = $0011; - - TT_Err_Invalid_Engine = $0020; - TT_Err_Too_Many_Extensions = $0021; - TT_Err_Extensions_Unsupported = $0022; - TT_Err_Invalid_Extension_Id = $0023; - - TT_Err_No_Vertical_Data = $0030; - - TT_Err_Max_Profile_Missing = $0080; - TT_Err_Header_Table_Missing = $0081; - TT_Err_Horiz_Header_Missing = $0082; - TT_Err_Locations_Missing = $0083; - TT_Err_Name_Table_Missing = $0084; - TT_Err_CMap_Table_Missing = $0085; - TT_Err_Hmtx_Table_Missing = $0086; - TT_Err_OS2_Table_Missing = $0087; - TT_Err_Post_Table_Missing = $0088; - - (* -------------------------------------------------------------- *) - - TT_Err_Out_Of_Memory = $0100; - - (* -------------------------------------------------------------- *) - - TT_Err_Invalid_File_Offset = $0200; - TT_Err_Invalid_File_Read = $0201; - TT_Err_Invalid_Frame_Access = $0202; - - (* -------------------------------------------------------------- *) - - TT_Err_Too_Many_Points = $0300; - TT_Err_Too_Many_Contours = $0301; - TT_Err_Invalid_Composite = $0302; - TT_Err_Too_Many_Ins = $0303; - - (* -------------------------------------------------------------- *) - - TT_Err_Invalid_Opcode = $0400; - TT_Err_Too_Few_Arguments = $0401; - TT_Err_Stack_Overflow = $0402; - TT_Err_Code_Overflow = $0403; - TT_Err_Bad_Argument = $0404; - TT_Err_Divide_By_Zero = $0405; - TT_Err_Storage_Overflow = $0406; - TT_Err_Cvt_Overflow = $0407; - TT_Err_Invalid_Reference = $0408; - TT_Err_Invalid_Distance = $0409; - TT_Err_Interpolate_Twilight = $040A; - TT_Err_Debug_Opcode = $040B; - TT_Err_ENDF_In_Exec_Stream = $040C; - TT_Err_Out_Of_CodeRanges = $040D; - TT_Err_Nested_DEFs = $040E; - TT_Err_Invalid_CodeRange = $040F; - TT_Err_Invalid_Displacement = $0410; - TT_Err_Execution_Too_Long = $0411; - TT_Err_Too_Many_FuncDefs = $0412; - TT_Err_Too_Many_InsDefs = $0413; - - TT_Err_Nested_Frame_Access = $0500; - TT_Err_Invalid_Cache_List = $0501; - TT_Err_Could_Not_Find_Context = $0502; - TT_Err_UNlisted_Object = $0503; - - TT_Err_Raster_Pool_Overflow = $0600; - TT_Err_Raster_Negative_Height = $0601; - TT_Err_Invalid_Value = $0602; - TT_Err_Raster_Not_Initialised = $0603; - - (* -------------------------------------------------------------- *) - - (***********************************************************************) - (* *) - (* Base Library Functions *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Initialise the engine *) - (* *) - function TT_Init_FreeType : TT_Error; - - (*****************************************************************) - (* Finalise the engine - discards all objects *) - (* *) - procedure TT_Done_FreeType; - - (*****************************************************************) - (* Set the gray-level palette used for font-smoothing *) - (* *) - (* it is an array of 5 bytes following this convention : *) - (* *) - (* palette[0] := background (white) *) - (* palette[1] := light *) - (* palette[2] := medium *) - (* palette[3] := dark *) - (* palette[4] := foreground (black) *) - (* *) - function TT_Set_Raster_Palette( palette : TT_Gray_Palette ) : TT_Error; - - (***********************************************************************) - (* *) - (* Face Management functions *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Open a new font file and returns a handle for it in '_face' *) - (* *) - (* The file can be a TrueType collection, in which case the *) - (* first embedded font will be loaded. *) - (* *) - function TT_Open_Face( fontname : string; - var _face : TT_Face ) : TT_Error; - - (*****************************************************************) - (* Open a font file embedded in a collection. *) - (* *) - function TT_Open_Collection( fontname : string; - faceIndex : integer; - var _face : TT_Face ) : TT_Error; - - (*****************************************************************) - (* Return face properties in 'prop' *) - (* *) - function TT_Get_Face_Properties( _face : TT_Face; - var prop : TT_Face_Properties ) : TT_Error; - - (*****************************************************************) - (* Set face's generic pointer *) - (* *) - function TT_Set_Face_Pointer( _face : TT_Face; - data : Pointer ) : TT_Error; - - (*****************************************************************) - (* Get face's generic pointer *) - (* *) - function TT_Get_Face_Pointer( _face : TT_Face ) : Pointer; - - (*****************************************************************) - (* close a given face object. This releases all child objects *) - (* like instances and glyphs *) - (* *) - function TT_Close_Face( _face : TT_Face ) : TT_Error; - - (***********************************************************************) - (* *) - (* Instance management functions *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* open a new face instance and return a handle in '_ins' *) - (* *) - function TT_New_Instance( _face : TT_Face; - var _ins : TT_Instance ) : TT_Error; - - (*****************************************************************) - (* set an instance's device resolutions, expressed in dpi *) - (* *) - function TT_Set_Instance_Resolutions( _ins : TT_Instance; - x_resolution : Integer; - y_resolution : Integer ) : TT_Error; - - (*****************************************************************) - (* set an instance's point size (assumes width==height) *) - (* *) - function TT_Set_Instance_PointSize( _ins : TT_Instance; - pointsize : Integer ) : TT_Error; - - (*****************************************************************) - (* set an instance's point size (assumes width==height) *) - (* *) - function TT_Set_Instance_CharSize( _ins : TT_Instance; - charsize : Integer ) : TT_Error; - - (*****************************************************************) - (* set an instance's point size (assumes width==height) *) - (* *) - function TT_Set_Instance_CharSizes( _ins : TT_Instance; - charsizex : Integer; - charsizey : Integer ) : TT_Error; - - (*****************************************************************) - (* set an instance's height and width, expressed in pixels *) - (* *) - function TT_Set_Instance_PixelSizes( _ins : TT_Instance; - pixelX : Integer; - pixelY : Integer; - pointsize : Integer ) : TT_Error; - - (*****************************************************************) - (* set an instance's height and width, expressed in pixels *) - (* *) - - (*****************************************************************) - (* the core truetype engine doesn't provide _direct_ support *) - (* for rotation or stretching. This means that the transforms *) - (* must be applied on the glyph outline by a higher-level *) - (* library or the client application. However, we use two flags *) - (* to notice the TrueType hinter that the glyphs will be *) - (* transformed later. *) - (* *) - (* rotated : set if the glyphs are to be rotated *) - (* distorted : set if the glyphs are to be distorted *) - (* *) - (* an application is any transform that doesn't keep distances *) - (* constants. skewing and stretching are examples of distorsion *) - (* *) - function TT_Set_Instance_Transforms( _ins : TT_Instance; - rotated : Boolean; - distorted : Boolean ) : TT_Error; - - (*****************************************************************) - (* Return instance metrics in 'm' *) - (* *) - function TT_Get_Instance_Metrics( _ins : TT_Instance; - var m : TT_Instance_Metrics ) : TT_Error; - - (*****************************************************************) - (* Set instance generic pointer *) - (* *) - function TT_Set_Instance_Pointer( _ins : TT_Instance; - data : Pointer ) : TT_Error; - - (*****************************************************************) - (* Get instance generic pointer *) - (* *) - function TT_Get_Instance_Pointer( _ins : TT_Instance ) : Pointer; - - (*****************************************************************) - (* Close an instance *) - (* *) - function TT_Done_Instance( _ins : TT_Instance ) : TT_Error; - - (***********************************************************************) - (* *) - (* Glyph management functions *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Create a new glyph container, return a handle in '_glyph' *) - (* *) - function TT_New_Glyph( _face : TT_Face; - var _glyph : TT_Glyph ) : TT_Error; - - (*****************************************************************) - (* Releases a glyph container *) - (* *) - function TT_Done_Glyph( _glyph : TT_Glyph ) : TT_Error; - - (*****************************************************************) - (* Load a glyph inside a container *) - (* *) - function TT_Load_Glyph( _instance : TT_Instance; - _glyph : TT_Glyph; - glyph_index : Word; - load_flags : Integer ) : TT_Error; - -const - TT_Load_Scale_Glyph = 1; (* ask the loader to scale the glyph *) - (* to the current pointsize/transform *) - - TT_Load_Hint_Glyph = 2; (* when scaling is on, ask the loader *) - (* to hint the glyph too.. *) - - TT_Load_Debug = 16; - - TT_Load_Default = TT_Load_Scale_Glyph or - TT_Load_Hint_Glyph; - - - (*****************************************************************) - (* Get a glyph's outline *) - (* *) - function TT_Get_Glyph_Outline( _glyph : TT_Glyph; - var outline : TT_Outline ) : TT_Error; - - (*****************************************************************) - (* Get a glyph's metrics *) - (* *) - function TT_Get_Glyph_Metrics( _glyph : TT_Glyph; - var gmetrics : TT_Glyph_Metrics ) : TT_Error; - - (*****************************************************************) - (* Get a glyph's big metrics *) - (* *) - function TT_Get_Glyph_Big_Metrics( _glyph : TT_Glyph; - var gmetrics : TT_Big_Glyph_Metrics - ) : TT_Error; - - (*****************************************************************) - (* Render a glyph's bitmap *) - (* *) - function TT_Get_Glyph_Bitmap( _glyph : TT_Glyph; - var map : TT_Raster_Map; - x_offset : TT_F26Dot6; - y_offset : TT_F26Dot6 ) : TT_Error; - - (*****************************************************************) - (* Render a glyph's pixmap (i.e. smoothed glyph ) *) - (* *) - function TT_Get_Glyph_Pixmap( _glyph : TT_Glyph; - var map : TT_Raster_Map; - x_offset : TT_F26Dot6; - y_offset : TT_F26Dot6 ) : TT_Error; - - (***********************************************************************) - (* *) - (* Outline functions *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Apply translation to an outline *) - (* *) - function TT_Translate_Outline( var out : TT_Outline; - x, y : TT_F26Dot6 ) : TT_Error; - - (*****************************************************************) - (* Apply a 2x2 transform to an outline *) - (* *) - function TT_Transform_Outline( var out : TT_Outline; - var mat : TT_Matrix ) : TT_Error; - - (*****************************************************************) - (* Apply a 2x2 transform to a vector *) - (* *) - function TT_Transform_Vector( var x, y : TT_F26Dot6; - var mat : TT_Matrix ) : TT_Error; - - (*****************************************************************) - (* Render an outline into a bitmap *) - (* *) - function TT_Get_Outline_Bitmap( var out : TT_Outline; - var map : TT_raster_Map ) : TT_Error; - - (*****************************************************************) - (* Render an outline into a pixmap *) - (* *) - function TT_Get_Outline_Pixmap( var out : TT_Outline; - var map : TT_raster_Map ) : TT_Error; - - - (*****************************************************************) - (* Get an outline's bounding box *) - (* *) - function TT_Get_Outline_BBox( var out : TT_Outline; - var bbox : TT_Bbox ) : TT_Error; - - (*****************************************************************) - (* Create a new glyph outline *) - (* *) - function TT_New_Outline( n_points : integer; - n_contours : integer; - var out : TT_Outline ) : TT_Error; - - (*****************************************************************) - (* Copy a glyph outline into another one *) - (* *) - function TT_Copy_Outline( var source : TT_Outline; - var target : TT_Outline ) : TT_Error; - - (*****************************************************************) - (* Clone a given outline. This will create the outline, then *) - (* copy the source in it *) - (* *) - function TT_Clone_Outline( var source : TT_Outline; - var target : TT_Outline ) : TT_Error; - - (*****************************************************************) - (* Discards a glyph outline *) - (* *) - function TT_Done_Outline( var out : TT_Outline ) : TT_Error; - - (***********************************************************************) - (* *) - (* Character Mapping support *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Get a face's number of character maps *) - (* *) - function TT_Get_CharMap_Count( face : TT_Face ) : integer; - - (*****************************************************************) - (* Get a given char. map's ID in a face *) - (* *) - function TT_Get_CharMap_ID( face : TT_Face; - charmapIndex : integer; - var platform : integer; - var encoding : integer ) : TT_Error; - - (*****************************************************************) - (* Get a handle to a given char. map *) - (* *) - function TT_Get_CharMap( face : TT_Face; - charmapIndex : integer; - var charMap : TT_CharMap ) : TT_Error; - - (*****************************************************************) - (* Translate from char. code to glyph index *) - (* *) - function TT_Char_Index( charmap : TT_CharMap; - charCode : Longint ) : Word; - - (***********************************************************************) - (* *) - (* Names Table support *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Return number of name table entries *) - (* *) - function TT_Get_Name_Count( face : TT_Face ) : integer; - - (*****************************************************************) - (* Return the ID of a given name table entry *) - (* *) - function TT_Get_Name_ID( face : TT_Face; - nameIndex : integer; - var platform : integer; - var encoding : integer; - var language : integer; - var nameid : integer ) : TT_Error; - - (*****************************************************************) - (* Return a given name table string *) - (* *) - function TT_Get_Name_String( face : TT_Face; - nameIndex : integer; - var str : Pointer; - var len : integer ) : TT_Error; - - (***********************************************************************) - (* *) - (* Font Storage Access *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* Access font data and copies it into user block *) - (* *) - function TT_Get_Font_Data( face : TT_Face; - tableTag : Longint; - offset : Longint; - var buffer; - var length : longint ) : TT_Error; - -implementation - -uses - TTTypes, - TTError, - TTCalc, - TTMemory, - TTTables, - TTCache, - TTFile, - TTCMap, - TTObjs, - TTLoad, - TTGLoad, - TTRaster, - TTInterp; - -var - raster_palette : TT_Gray_Palette; - - (*****************************************************************) - (* *) - (* *) - function TT_Init_FreeType : TT_Error; - begin - if TTMemory_Init or - TTCache_Init or - TTFile_Init or - TTObjs_Init or - TTRaster_Init then - begin - TT_Init_FreeType := error; - exit; - end; - - TT_Init_FreeType := TT_Err_Ok; - end; - - - (*****************************************************************) - (* *) - (* *) - procedure TT_Done_FreeType; - begin - TTRaster_Done; - TTObjs_Done; - TTFile_Done; - TTCache_Done; - TTMemory_Done; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Raster_Palette( palette : TT_Gray_Palette ) : TT_Error; - begin - raster_palette := palette; - TT_Set_Raster_Palette := TT_Err_Ok; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Open_Face( fontname : string; - var _face : TT_Face ) : TT_Error; - var - input : TFont_Input; - begin - input.fontIndex := 0; - - if TT_Open_Stream( fontname, input.stream ) then - begin - TT_Open_Face := error; - exit; - end; - - Cache_New( face_cache, Pointer(_face), @input ); - - TT_Open_Face := error; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Open_Collection( fontname : string; - faceIndex : integer; - var _face : TT_Face ) : TT_Error; - var - input : TFont_Input; - begin - input.fontIndex := faceIndex; - - if TT_Open_Stream( fontname, input.stream ) then - begin - TT_Open_Collection := error; - exit; - end; - - Cache_New( face_cache, Pointer(_face), @input ); - - TT_Open_Collection := error; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Face_Properties( _face : TT_Face; - var prop : TT_Face_Properties ) : TT_Error; - var - face : PFace; - begin - face := _face.z; - if face <> nil then - begin - with prop do - begin - num_Glyphs := face^.numGlyphs; - max_Points := face^.maxPoints; - max_Contours := face^.maxContours; - max_Faces := face^.ttcHeader.dirCount; - header := @face^.fontHeader; - horizontal := @face^.horizontalHeader; - - if face^.verticalInfo then - vertical := @face^.verticalHeader - else - vertical := nil; - - os2 := @face^.os2; - postscript := @face^.postscript; - end; - TT_Get_Face_Properties := TT_Err_Ok; - end - else - TT_Get_Face_Properties := TT_Err_Invalid_Face_Handle; - end; - - - (*****************************************************************) - (* Set face's generic pointer *) - (* *) - function TT_Set_Face_Pointer( _face : TT_Face; - data : Pointer ) : TT_Error; - var - face :PFace; - begin - face := PFace(_face.z); - if face <> nil then - begin - face^.generic := data; - TT_Set_Face_Pointer := TT_Err_Ok; - end - else - TT_Set_Face_Pointer := TT_Err_Invalid_Face_Handle; - end; - - (*****************************************************************) - (* Get face's generic pointer *) - (* *) - function TT_Get_Face_Pointer( _face : TT_Face ) : Pointer; - var - face : PFace; - begin - face := PFace(_face.z); - if face <> nil then - TT_Get_Face_Pointer := face^.generic - else - TT_get_Face_Pointer := nil; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Close_Face( _face : TT_Face ) : TT_Error; - var - face : PFace; - begin - face := _face.z; - if face <> nil then - begin - error := TT_Err_Ok; - (* Note : the stream is closed by the face destructor !! *) - Cache_Done( face_cache, _face.z ); - TT_Close_Face := error; - end - else - TT_Close_Face := TT_Err_Invalid_Face_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_New_Instance( _face : TT_Face; - var _ins : TT_Instance ) : TT_Error; - var - face : PFace; - ins : PInstance; - begin - face := _face.z; - if face <> nil then - begin - error := TT_Err_Ok; - if not Cache_New( face^.instances, _ins.z, face ) then - Instance_Init( _ins.z ); - TT_New_Instance := error; - end - else - TT_New_Instance := TT_Err_Invalid_Face_Handle; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_Resolutions( _ins : TT_Instance; - x_resolution : Integer; - y_resolution : Integer ) : TT_Error; - var - ins : PInstance; - begin - ins := _ins.z; - if ins <> nil then - begin - ins^.metrics.x_resolution := x_resolution; - ins^.metrics.y_resolution := y_resolution; - ins^.valid := False; - TT_Set_Instance_Resolutions := TT_Err_Ok; - end - else - TT_Set_Instance_Resolutions := TT_Err_Invalid_Instance_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_CharSize( _ins : TT_Instance; - charsize : Integer ) : TT_Error; - var - ins : PInstance; - begin - TT_Set_Instance_CharSize := - TT_Set_Instance_CharSizes( _ins, charsize, charsize ); - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_CharSizes( _ins : TT_Instance; - charsizex : Integer; - charsizey : Integer ) : TT_Error; - var - ins : PInstance; - begin - if (charsizex < 1*64) or (charsizey < 1*64) then - begin - TT_Set_Instance_CharSizes := TT_Err_Bad_Argument; - exit; - end; - - ins := _ins.z; - if ins <> nil then - begin - with ins^.metrics do - begin - x_scale1 := ( Long(charsizex) * x_resolution ) div 72; - x_scale2 := ins^.owner^.fontHeader.units_per_EM; - - y_scale1 := ( Long(charsizey) * y_resolution ) div 72; - y_scale2 := x_scale2; - - if ins^.owner^.fontHeader.flags and 8 <> 0 then - begin - x_scale1 := (x_scale1 + 32) and -64; - y_scale1 := (y_scale1 + 32) and -64; - end; - - x_ppem := x_scale1 div 64; - y_ppem := y_scale1 div 64; - end; - - if charsizex > charsizey then - ins^.metrics.pointsize := charsizex - else - ins^.metrics.pointsize := charsizey; - - ins^.valid := False; - TT_Set_Instance_CharSizes := TT_Err_Ok; - end - else - TT_Set_Instance_CharSizes := TT_Err_Invalid_Instance_Handle; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_PointSize( _ins : TT_Instance; - pointsize : integer ) : TT_Error; - begin - TT_Set_Instance_PointSize := - TT_Set_Instance_CharSize( _ins, pointsize*64 ); - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_PixelSizes( _ins : TT_Instance; - pixelX : Integer; - pixelY : Integer; - pointsize : Integer ) : TT_Error; - var - ins : PInstance; - begin - ins := _ins.z; - if ins <> nil then - begin - ins^.metrics.x_ppem := pixelX; - ins^.metrics.y_ppem := pixelY; - ins^.metrics.pointSize := pointsize; - - ins^.metrics.x_scale1 := ins^.metrics.x_ppem * 64; - ins^.metrics.x_scale2 := ins^.owner^.fontHeader.units_per_EM; - ins^.metrics.y_scale1 := ins^.metrics.y_ppem * 64; - ins^.metrics.y_scale2 := ins^.metrics.x_scale2; - - ins^.valid := false; - - TT_Set_Instance_PixelSizes := TT_Err_Ok; - end - else - TT_Set_Instance_PixelSizes := TT_Err_Invalid_Instance_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Set_Instance_Transforms( _ins : TT_Instance; - rotated : Boolean; - distorted : Boolean ) : TT_Error; - var - ins : PInstance; - begin - ins := _ins.z; - if ins <> nil then - begin - ins^.metrics.rotated := rotated; - ins^.metrics.stretched := distorted; - TT_Set_Instance_Transforms := TT_Err_Ok; - end - else - TT_Set_Instance_Transforms := TT_Err_Invalid_Instance_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Instance_Metrics( _ins : TT_Instance; - var m : TT_Instance_Metrics ) : TT_Error; - var - ins : PInstance; - begin - ins := _ins.z; - if ins <> nil then - begin - if not ins^.valid then - if Instance_Reset( ins, False ) then - begin - TT_Get_Instance_Metrics := error; - exit; - end; - - with m do - begin - pointSize := ins^.metrics.pointSize; - - x_scale := MulDiv_Round( $10000, - ins^.metrics.x_scale1, - ins^.metrics.x_scale2 ); - - y_scale := MulDiv_Round( $10000, - ins^.metrics.y_scale1, - ins^.metrics.y_scale2 ); - - x_resolution := ins^.metrics.x_resolution; - y_resolution := ins^.metrics.y_resolution; - - x_ppem := ins^.metrics.x_ppem; - y_ppem := ins^.metrics.y_ppem; - - TT_Get_Instance_Metrics := TT_Err_Ok; - end; - end - else - TT_Get_Instance_Metrics := TT_Err_Invalid_Instance_Handle; - end; - - - (*****************************************************************) - (* Set instance generic pointer *) - (* *) - function TT_Set_Instance_Pointer( _ins : TT_Instance; - data : Pointer ) : TT_Error; - var - ins : PInstance; - begin - ins := PInstance(_ins.z); - if ins <> nil then - begin - ins^.generic := data; - TT_Set_Instance_Pointer := TT_Err_Ok; - end - else - TT_Set_Instance_Pointer := TT_Err_Invalid_Instance_Handle; - end; - - (*****************************************************************) - (* Get instance generic pointer *) - (* *) - function TT_Get_Instance_Pointer( _ins : TT_Instance ) : Pointer; - var - ins : PInstance; - begin - ins := PInstance(_ins.z); - if ins <> nil then - TT_Get_Instance_Pointer := ins^.generic - else - TT_Get_Instance_Pointer := nil; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Done_Instance( _ins : TT_Instance ) : TT_Error; - var - ins : PInstance; - begin - ins := PInstance(_ins.z); - if ins <> nil then - begin - error := TT_Err_Ok; - Cache_Done( ins^.owner^.instances, ins ); - TT_Done_Instance := error; - end - else - TT_Done_Instance := TT_Err_Invalid_Instance_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_New_Glyph( _face : TT_Face; - var _glyph : TT_Glyph ) : TT_Error; - var - face : PFace; - begin - face := PFace(_face.z); - if face <> nil then - begin - error := TT_Err_Ok; - Cache_New( face^.glyphs, _glyph.z, _face.z ); - TT_New_Glyph := error; - end - else - TT_New_Glyph := TT_Err_Invalid_Face_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Done_Glyph( _glyph : TT_Glyph ) : TT_Error; - var - glyph : PGlyph; - begin - glyph := PGlyph(_glyph.z); - if glyph <> nil then - begin - error := TT_Err_Ok; - Cache_Done( glyph^.face^.glyphs, glyph ); - TT_Done_Glyph := error; - end - else - TT_Done_Glyph := TT_Err_Invalid_Glyph_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Load_Glyph( _instance : TT_Instance; - _glyph : TT_Glyph; - glyph_index : Word; - load_flags : Integer ) : TT_Error; - var - ins : PInstance; - glyph : PGlyph; - begin - ins := PInstance(_instance.z); - if ins = nil then - begin - TT_Load_Glyph := TT_Err_Invalid_Instance_Handle; - exit; - end; - - glyph := PGlyph(_glyph.z); - if glyph = nil then - begin - TT_Load_Glyph := TT_Err_Invalid_Glyph_Handle; - exit; - end; - - if ins^.owner <> glyph^.face then - begin - TT_Load_Glyph := TT_Err_Invalid_Face_Handle; - exit; - end; - - if not ins^.valid then - if Instance_Reset( ins, False ) then - begin - TT_Load_Glyph := error; - exit; - end; - - error := TT_Err_Ok; - Load_TrueType_Glyph( ins, glyph, glyph_index, load_flags ); - TT_Load_Glyph := error; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Glyph_Outline( _glyph : TT_Glyph; - var outline : TT_Outline ) : TT_Error; - var - glyph : PGlyph; - begin - glyph := PGlyph(_glyph.z); - if glyph <> nil then - begin - outline := glyph^.outline; - outline.owner := false; - TT_Get_Glyph_Outline := TT_Err_Ok; - end - else - TT_Get_Glyph_Outline := TT_Err_Invalid_Glyph_Handle; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Glyph_Metrics( _glyph : TT_Glyph; - var gmetrics : TT_Glyph_Metrics ) : TT_Error; - var - glyph : PGlyph; - begin - glyph := PGlyph(_glyph.z); - if glyph <> nil then - begin - gmetrics.bbox := glyph^.metrics.bbox; - gmetrics.bearingX := glyph^.metrics.horiBearingX; - gmetrics.bearingY := glyph^.metrics.horiBearingY; - gmetrics.advance := glyph^.metrics.horiAdvance; - TT_Get_Glyph_Metrics := TT_Err_Ok; - end - else - TT_Get_Glyph_Metrics := TT_Err_Invalid_Glyph_Handle; - end; - - (*****************************************************************) - (* Get a glyph's big metrics *) - (* *) - function TT_Get_Glyph_Big_Metrics( _glyph : TT_Glyph; - var gmetrics : TT_Big_Glyph_Metrics - ) : TT_Error; - var - glyph : PGlyph; - begin - glyph := PGlyph(_glyph.z); - if glyph <> nil then - begin - gmetrics := glyph^.metrics; - TT_Get_Glyph_Big_Metrics := TT_Err_Ok; - end - else - TT_Get_Glyph_Big_Metrics := TT_Err_Invalid_Glyph_Handle; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Glyph_Bitmap( _glyph : TT_Glyph; - var map : TT_raster_Map; - x_offset : TT_F26Dot6; - y_offset : TT_F26Dot6 ) : TT_Error; - var - glyph : PGlyph; - outline : TT_Outline; - n : Int; - begin - glyph := _glyph.z; - if glyph <> nil then - begin - outline := glyph^.outline; - (* XXX: for now, we only use dropout mode #2 *) - outline.dropout_mode := 2; - - TT_Translate_Outline( outline, x_offset, y_offset ); - TT_Get_Glyph_Bitmap := TT_Get_Outline_Bitmap( outline, map ); - TT_Translate_Outline( outline, -x_offset, -y_offset ); - end - else - TT_Get_Glyph_Bitmap := TT_Err_Invalid_Glyph_Handle; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Glyph_Pixmap( _glyph : TT_Glyph; - var map : TT_raster_Map; - x_offset : TT_F26Dot6; - y_offset : TT_F26Dot6 ) : TT_Error; - var - glyph : PGlyph; - outline : TT_Outline; - n : Int; - begin - glyph := _glyph.z; - if glyph <> nil then - begin - outline := glyph^.outline; - (* XXX: for now, we only use dropout mode #2 *) - outline.dropout_mode := 2; - - TT_translate_Outline( outline, x_offset, y_offset ); - TT_Get_Glyph_Pixmap := TT_Get_Outline_Pixmap( outline, map ); - TT_translate_Outline( outline, -x_offset, -y_offset ); - end - else - TT_Get_Glyph_Pixmap := TT_Err_Invalid_Glyph_Handle; - end; - - (*****************************************************************) - (* Create a new glyph outline *) - (* *) - function TT_New_Outline( n_points : integer; - n_contours : integer; - var out : TT_Outline ) : TT_Error; - label - Fail; - begin - out.n_points := n_points; - out.n_contours := n_contours; - out.points := nil; - out.flags := nil; - out.conEnds := nil; - out.owner := true; - - if Alloc( Pointer(out.points), 2*n_points*sizeof(TT_Pos) ) or - Alloc( Pointer(out.flags), n_points*sizeof(Byte) ) or - Alloc( Pointer(out.conEnds), n_contours*sizeof(Short) ) then - goto Fail; - - TT_New_Outline := TT_Err_Ok; - exit; - - Fail: - TT_Done_Outline( out ); - TT_New_Outline := error; - end; - - (*****************************************************************) - (* Copy a glyph outline into another one *) - (* *) - function TT_Copy_Outline( var source : TT_Outline; - var target : TT_Outline ) : TT_Error; - begin - if (source.n_points = target.n_points) and - (source.n_contours = target.n_contours) then - begin - move( source.points^, target.points^, 2*source.n_points*4 ); - move( source.flags^, target.flags^, source.n_points ); - move( source.conEnds^,target.conEnds^, source.n_contours*2 ); - end - else - TT_Copy_Outline := TT_Err_Invalid_Argument; - end; - - (*****************************************************************) - (* Clone a given outline. This will create the outline, then *) - (* copy the source in it *) - (* *) - function TT_Clone_Outline( var source : TT_Outline; - var target : TT_Outline ) : TT_Error; - begin - error := TT_New_Outline( source.n_points, source.n_contours, target ); - if error = TT_Err_Ok then - TT_Copy_Outline( source, target ); - - TT_Clone_Outline := error; - end; - - (*****************************************************************) - (* Discards a glyph outline *) - (* *) - function TT_Done_Outline( var out : TT_Outline ) : TT_Error; - begin - if out.owner then - begin - Free( Pointer(out.conEnds) ); - Free( Pointer(out.flags) ); - Free( Pointer(out.points) ); - out.n_points := 0; - out.n_contours := 0; - TT_Done_Outline := TT_Err_Ok; - end - else - TT_Done_Outline := TT_Err_Invalid_Argument; - end; - - (*****************************************************************) - (* Render an outline into a bitmap *) - (* *) - function TT_Get_Outline_Bitmap( var out : TT_Outline; - var map : TT_raster_Map ) : TT_Error; - begin - if Render_Glyph( out, map ) then - TT_Get_Outline_Bitmap := error - else - TT_Get_Outline_Bitmap := TT_Err_Ok; - end; - - (*****************************************************************) - (* Render an outline into a pixmap *) - (* *) - function TT_Get_Outline_Pixmap( var out : TT_Outline; - var map : TT_raster_Map ) : TT_Error; - begin - if Render_Gray_Glyph( out, map ) then - TT_Get_Outline_Pixmap := error - else - TT_Get_Outline_Pixmap := TT_Err_Ok; - end; - - (*****************************************************************) - (* Compute an outline's bounding box *) - (* *) - function TT_Get_Outline_BBox( var out : TT_Outline; - var bbox : TT_Bbox ) : TT_Error; - var - x, y, - xMin, yMin, - xMax, yMax : TT_Pos; - n : Int; - begin - - with bbox do - begin - xMin := $7FFFFFFF; - xMax := $80000000; - yMin := $7FFFFFFF; - yMax := $80000000; - - for n := 0 to out.n_points-1 do - begin - x := out.points^[n].x; - if x < xMin then xMin := x; - if x > xMax then xMax := x; - y := out.points^[n].y; - if y < yMin then yMin := y; - if y > yMax then yMax := y; - end; - end; - - TT_Get_Outline_BBox := TT_Err_Ok; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Translate_Outline( var out : TT_Outline; - x, y : TT_F26Dot6 ) : TT_Error; - var - n : integer; - begin - if x <> 0 then - for n := 0 to out.n_points-1 do - inc( out.points^[n].x, x ); - - if y <> 0 then - for n := 0 to out.n_points-1 do - inc( out.points^[n].y, y ); - - TT_Translate_Outline := TT_Err_Ok; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Transform_Outline( var out : TT_Outline; - var mat : TT_Matrix ) : TT_Error; - var - n : integer; - x, y, nx, ny : TT_F26Dot6; - begin - for n := 0 to out.n_points-1 do - begin - x := out.points^[n].x; - y := out.points^[n].y; - - nx := MulDiv_Round( mat.xx, x, $10000 ) + - MulDiv_Round( mat.xy, y, $10000 ); - - ny := MulDiv_ROund( mat.yx, x, $10000 ) + - MulDiv_Round( mat.yy, y, $10000 ); - - out.points^[n].x := nx; - out.points^[n].y := ny; - end; - - TT_Transform_Outline := TT_Err_Ok; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Transform_Vector( var x, y : TT_F26Dot6; - var mat : TT_Matrix ) : TT_Error; - var - nx, ny : TT_F26Dot6; - begin - nx := MulDiv_Round( mat.xx, x, $10000 ) + - MulDiv_Round( mat.xy, y, $10000 ); - - ny := MulDiv_Round( mat.yx, x, $10000 ) + - MulDiv_Round( mat.yy, y, $10000 ); - - x := nx; - y := ny; - - TT_Transform_Vector := TT_Err_Ok; - end; - - (***********************************************************************) - (* *) - (* Character Mapping support *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* *) - (* *) - function TT_Get_CharMap_Count( face : TT_Face ) : integer; - var - faze : PFace; - begin - faze := PFace(face.z); - if faze = nil then - TT_Get_CharMap_Count := -1 - else - TT_Get_CharMap_Count := faze^.numCMaps; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_CharMap_ID( face : TT_Face; - charmapIndex : integer; - var platform : integer; - var encoding : integer ) : TT_Error; - var - faze : PFace; - cmap : PCMapTable; - begin - faze := PFace(face.z); - if faze = nil then - begin - TT_Get_CharMap_ID := TT_Err_Invalid_Face_Handle; - exit; - end; - - if (charmapIndex < 0) or (charmapIndex >= faze^.numCMaps) then - begin - TT_Get_CharMap_ID := TT_Err_Invalid_Argument; - exit; - end; - - cmap := @faze^.cMaps^[charmapIndex]; - platform := cmap^.platformID; - encoding := cmap^.platformEncodingID; - - TT_Get_CharMap_ID := TT_Err_Ok; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_CharMap( face : TT_Face; - charmapIndex : integer; - var charMap : TT_CharMap ) : TT_Error; - var - faze : PFace; - begin - faze := PFace(face.z); - if faze = nil then - begin - TT_Get_CharMap := TT_Err_Invalid_Face_Handle; - exit; - end; - - if (charmapIndex < 0) or (charmapIndex >= faze^.numCMaps) then - begin - TT_Get_CharMap := TT_Err_Invalid_Argument; - exit; - end; - - charmap.z := @faze^.cMaps^[charmapIndex]; - - TT_Get_CharMap := TT_Err_Ok; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Char_Index( charmap : TT_CharMap; - charCode : Longint ) : Word; - begin - TT_Char_Index := CharMap_Index( PCMapTable(charmap.z)^, charCode ); - end; - - (***********************************************************************) - (* *) - (* Names Table support *) - (* *) - (***********************************************************************) - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Name_Count( face : TT_Face ) : integer; - var - faze : PFace; - begin - TT_Get_Name_Count := 0; - - faze := PFace( face.z ); - if faze = nil then exit; - - TT_Get_Name_Count := faze^.nameTable.numNameRecords; - end; - - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Name_ID( face : TT_Face; - nameIndex : integer; - var platform : integer; - var encoding : integer; - var language : integer; - var nameid : integer ) : TT_Error; - var - faze : PFace; - table : PName_Table; - rec : PName_Record; - label - Fail; - begin - faze := PFace( face.z ); - if faze = nil then - begin - TT_Get_Name_Id := TT_Err_Invalid_Face_Handle; - goto Fail; - end; - - table := @faze^.nameTable; - if (nameIndex < 0) or (nameIndex > table^.numNameRecords) then - begin - TT_Get_Name_Id := TT_Err_Bad_Argument; - goto Fail; - end; - - rec := @table^.names^[nameIndex]; - - platform := rec^.platformID; - encoding := rec^.encodingID; - language := rec^.languageID; - nameid := rec^.nameID; - - TT_Get_Name_ID := TT_Err_Ok; - exit; - - Fail: - platform := -1; - encoding := -1; - language := -1; - nameid := -1; - end; - - (*****************************************************************) - (* *) - (* *) - function TT_Get_Name_String( face : TT_Face; - nameIndex : integer; - var str : Pointer; - var len : integer ) : TT_Error; - var - faze : PFace; - table : PName_Table; - rec : PName_Record; - label - Fail; - begin - faze := PFace( face.z ); - if faze = nil then - begin - TT_Get_Name_String := TT_Err_Invalid_Face_Handle; - goto Fail; - end; - - table := @faze^.nameTable; - if (nameIndex < 0) or (nameIndex > table^.numNameRecords) then - begin - TT_Get_Name_String := TT_Err_Bad_Argument; - goto Fail; - end; - - rec := @table^.names^[nameIndex]; - - str := @table^.storage^[rec^.offset]; - len := rec^.length; - - TT_Get_Name_String := TT_Err_Ok; - exit; - - Fail: - str := nil; - len := 0; - end; - - - (*****************************************************************) - (* Access font data and copies it into user block *) - (* *) - function TT_Get_Font_Data( face : TT_Face; - tableTag : Longint; - offset : Longint; - var buffer; - var length : longint ) : TT_Error; - var - faze : PFace; - begin - faze := PFace(face.z); - if faze = nil then - begin - TT_Get_Font_Data := TT_Err_Invalid_Face_Handle; - length := 0; - end - else - begin - TT_Get_Font_Data := TT_Err_Ok; - if Load_TrueType_Any( faze, tableTag, offset, buffer, length ) then - TT_Get_Font_Data := error; - end; - end; - - -end. - Index: xc/extras/FreeType/pascal/lib/ttcache.pas diff -u xc/extras/FreeType/pascal/lib/ttcache.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcache.pas:removed --- xc/extras/FreeType/pascal/lib/ttcache.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcache.pas Wed Mar 16 20:59:46 2005 @@ -1,433 +0,0 @@ -(******************************************************************* - * - * ttcache.pas 1.0 - * - * Generic object cache - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * This component defines and implement object caches. - * - * An object class is a structure layout that encapsulate one - * given type of data used by the FreeType engine. Each object - * class is completely described by : - * - * - a 'root' or 'leading' structure containing the first - * important fields of the class. The root structure is - * always of fixed size. - * - * It is implemented as a simple C structure, and may - * contain several pointers to sub-tables that can be - * sized and allocated dynamically. - * - * examples : TFace, TInstance, TGlyph & TExecution_Context - * ( defined in 'ttobjs.h' ) - * - * - we make a difference between 'child' pointers and 'peer' - * pointers. A 'child' pointer points to a sub-table that is - * owned by the object, while a 'peer' pointer points to any - * other kind of data the object isn't responsible for. - * - * An object class is thus usually a 'tree' of 'child' tables. - * - * - each object class needs a constructor and a destructor. - * - * A constructor is a function which receives the address of - * freshly allocated and zeroed object root structure and - * 'builds' all the valid child data that must be associated - * to the object before it becomes 'valid'. - * - * A destructor does the inverse job : given the address of - * a valid object, it must discards all its child data and - * zero its main fields (essentially the pointers and array - * sizes found in the root fields). - * - * - * - * - * - * - * - * - * - * - * - * - ******************************************************************) - -unit TTCache; - -interface - -uses TTError, TTTypes; - -type - - (* Simple list node record. A List element is said to be 'unlinked' *) - (* when it doesn't belong to any list *) - (* *) - PList_Element = ^TList_Element; - TList_Element = record - - next : PList_Element; (* Pointer to next element of list *) - data : Pointer; (* Pointer to the listed object *) - end; - - - (* Simple singly-linked list record *) - (* LIFO - style, no tail field *) - TSingle_List = PList_Element; - - - TConstructor = function( _object : Pointer; - _parent : Pointer ) : TError; - - TDestructor = function( _object : Pointer ) : TError; - - PCache_Class = ^TCache_Class; - TCache_Class = record - Object_Size : Int; - Idle_Limit : Int; - Init : TConstructor; - Done : TDestructor; - end; - (* A Cache class record holds the data necessary to define *) - (* a cache kind. *) - - PCache = ^TCache; - TCache = record - clazz : PCache_Class; (* 'class' reserved in VP & Delphi *) - active : TSingle_List; - idle : TSingle_List; - idle_count : Int; - end; - - (* An object cache holds two lists tracking the active and *) - (* idle objects that are currently created and used by the *) - (* engine. It can also be 'protected' by a mutex *) - - function Cache_Create( var clazz : TCache_Class; - var cache : TCache ) : TError; - (* Initialize a new cache named 'cache', of class 'clazz', and *) - (* protected by the 'lock' mutex. Note that the mutex is ignored *) - (* as the pascal version isn't thread-safe *) - - function Cache_Destroy( var cache : TCache ) : TError; - (* Destroys a cache and all its listed objects *) - - function Cache_New( var cache : TCache; - var new_object : Pointer; - parent_data : Pointer ) : TError; - (* Extracts a new object from the cache. *) - - function Cache_Done( var cache : TCache; obj : Pointer ) : TError; - (* returns an object to the cache, or discards it depending *) - (* on the cache class' "idle_limit" field *) - - (********************************************************) - (* *) - (* Two functions used to manage list elements *) - (* *) - (* Note that they're thread-safe in multi-threaded *) - (* builds. *) - (* *) - - function Element_New : PList_Element; - (* Returns a new list element, either fresh or recycled *) - (* Note : the returned element is unlinked *) - - procedure Element_Done( element : PList_Element ); - (* Recycles or discards an element. *) - (* Note : The element must be unlinked !! *) - - - - - function TTCache_Init : TError; - - function TTCache_Done : TError; - - -implementation - -uses TTMemory; - -const - Null_Single_List = nil; - -var - Free_Elements : PList_Element; - -(******************************************************************* - * - * Function : Element_New - * - * Description : Gets a new ( either fresh or recycled ) list - * element. The element is unlisted. - * - * Notes : returns nil if out of memory - * - *****************************************************************) - - function Element_New : PList_Element; - var - element : PList_Element; - begin - (* LOCK *) - - if Free_Elements <> nil then - begin - element := Free_Elements; - Free_Elements := element^.next; - end - else - begin - Alloc( element, sizeof(TList_Element) ); - (* by convention, an allocated block is always zeroed *) - (* the fields of element need not be set to NULL then *) - end; - - (* UNLOCK *) - - Element_New := element; - end; - -(******************************************************************* - * - * Function : Element_Done - * - * Description : recycles an unlisted list element - * - * Notes : Doesn't check that the element is unlisted - * - *****************************************************************) - - procedure Element_Done( element : PList_Element ); - begin - (* LOCK *) - - element^.next := Free_Elements; - Free_Elements := element; - - (* UNLOCK *) - end; - - -(******************************************************************* - * - * Function : Cache_Create - * - * Description : Create a new cache object - * - *****************************************************************) - function Cache_Create( var clazz : TCache_Class; - var cache : TCache ) : TError; - begin - cache.clazz := @clazz; - cache.idle_count := 0; - cache.active := Null_Single_List; - cache.idle := Null_Single_List; - - Cache_Create := Success; - end; - - -(******************************************************************* - * - * Function : Cache_Destroy - * - * Description : Destroy a given cache object - * - *****************************************************************) - function Cache_Destroy( var cache : TCache ) : TError; - var - destroy : TDestructor; - current : PList_Element; - next : PList_Element; - begin - (* now destroy all active and idle listed objects *) - - destroy := cache.clazz^.done; - - (* active list *) - current := cache.active; - while current <> nil do - begin - next := current^.next; - destroy( current^.data ); - Free( current^.data ); - Element_Done( current ); - current := next; - end; - cache.active := Null_SIngle_List; - - (* idle list *) - current := cache.idle; - while current <> nil do - begin - next := current^.next; - destroy( current^.data ); - Free( current^.data ); - Element_Done( current ); - current := next; - end; - cache.idle := Null_Single_List; - - cache.clazz := nil; - cache.idle_count := 0; - - Cache_Destroy := Success; - end; - - -(******************************************************************* - * - * Function : Cache_New - * - * Description : Extracts one 'new' object from a cache - * - * Notes : The 'parent_data' pointer is passed to the object's - * initialiser when the new object is created from - * scratch. Recycled objects do not use this pointer - * - *****************************************************************) - function Cache_New( var cache : TCache; - var new_object : Pointer; - parent_data : Pointer ) : TError; - var - error : TError; - current : PList_Element; - obj : Pointer; - label - Fail; - begin - (* LOCK *) - current := cache.idle; - if current <> nil then - begin - cache.idle := current^.next; - dec( cache.idle_count ) - end; - (* UNLOCK *) - - if current = nil then - begin - (* if no object was found in the cache, create a new one *) - if Alloc( obj, cache.clazz^.object_size ) then exit; - - current := Element_New; - if current = nil then goto Fail; - - current^.data := obj; - - error := cache.clazz^.init( obj, parent_data ); - if error then goto Fail; - end; - - (* LOCK *) - current^.next := cache.active; - cache.active := current; - (* UNLOCK *) - - new_object := current^.data; - - Cache_New := Success; - exit; - - Fail: - Free( obj ); - Cache_New := Failure; - end; - -(******************************************************************* - * - * Function : Cache_Done - * - * Description : Discards an object intro a cache - * - *****************************************************************) - - function Cache_Done( var cache : TCache; obj : Pointer ) : TError; - var - error : TError; - element : PList_Element; - parent : ^PList_Element; - label - Suite; - begin - Cache_Done := failure; - - (* find element in list *) - (* LOCK *) - parent := @cache.active; - element := parent^; - while element <> nil do - begin - if element^.data = obj then - begin - parent^ := element^.next; - (* UNLOCK *) - goto Suite; - end; - parent := @element^.next; - element := parent^; - end; - (* UNLOCK *) - - (* Element wasn't found !! *) - {$IFDEF DEBUG} - {$ENDIF} - exit; - - Suite: - if ( cache.idle_count >= cache.clazz^.idle_limit ) then - begin - (* destroy the object when the cache is full *) - cache.clazz^.done( element^.data ); - Free( element^.data ); - Element_Done( element ); - end - else - begin - (* simply add the object to the idle list *) - (* LOCK *) - element^.next := cache.idle; - cache.idle := element; - inc( cache.idle_count ); - (* UNLOCK *) - end; - - Cache_Done := Success; - end; - - - function TTCache_Init : TError; - begin - Free_Elements := nil; - TTCache_Init := Success; - end; - - - function TTCache_Done : TError; - var - current, next : PList_ELement; - begin - current := free_elements; - while current <> nil do - begin - next := current^.next; - Free( current ); - current := next; - end; - TTCache_Done := success; - end; - -end. Index: xc/extras/FreeType/pascal/lib/ttcalc.pas diff -u xc/extras/FreeType/pascal/lib/ttcalc.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcalc.pas:removed --- xc/extras/FreeType/pascal/lib/ttcalc.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcalc.pas Wed Mar 16 20:59:46 2005 @@ -1,289 +0,0 @@ -(******************************************************************* - * - * TTCalc.Pas 1.2 - * - * Arithmetic and Vectorial Computations (specification) - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : All vector operations were moved to the interpreter - * - ******************************************************************) - -unit TTCalc; - -interface - -{$I TTCONFIG.INC} - -type - (* IntN types : *) - (* *) - (* These types are used as a way to garantee the size of some *) - (* specific integers. *) - (* *) - (* Of course, they are equivalent to Short, UShort, Long, etc .. *) - (* but parts of this unit could be used by different programs. *) - (* *) - - (* Define the 16-bit type *) -{$IFDEF BORLANDPASCAL} - Int16 = Integer; - Word16 = Word; (* 16-bits unsigned *) -{$ELSE} -{$IFDEF DELPHI16} - Int16 = Integer; - Word16 = Word; (* 16-bits unsigned *) -{$ELSE} -{$IFDEF DELPHI32} - Int16 = SmallInt; - Word16 = Word; (* 16-bits unsigned *) -{$ELSE} - Int16 = SmallInt; - Word16 = SmallWord; (* 16-bits unsigned *) -{$ENDIF} -{$ENDIF} -{$ENDIF} - - Int32 = LongInt; (* 32 bits integer *) - - Word32 = LongInt; (* 32 bits 'unsigned'. Note that there's *) - (* no unsigned long in Pascal.. *) - (* As cardinals are only 31 bits !! *) - - Int64 = record (* 64 "" *) - Lo, - Hi : LongInt; - end; - -function MulDiv( A, B, C : Int32 ): Int32; - -function MulDiv_Round( A, B, C : Int32 ): Int32; - -procedure Add64( var X, Y, Z : Int64 ); -procedure Sub64( var X, Y, Z : Int64 ); - -procedure MulTo64( X, Y : Int32; var Z : Int64 ); - -function Div64by32( var X : Int64; Y : Int32 ) : Int32; - -function Order64( var Z : Int64 ) : integer; -function Order32( Z : Int32 ) : integer; - -function Sqrt32( L : Int32 ): LongInt; -function Sqrt64( L : Int64 ): LongInt; - -{$IFDEF TEST} - procedure Neg64( var x : Int64 ); - procedure DivMod64by32( var X : Int64; Y : Int32; var Q, R : Int32 ); -{$ENDIF} - -implementation - -(* add support for Virtual Pascal inline assembly *) -{$IFDEF VIRTUALPASCAL} -{$I TTCALC2.INC} -{$ENDIF} - -(* add support for Delphi 2 and 3 inline assembly *) -{$IFDEF DELPHI32} -{$I TTCALC3.INC} -{$ENDIF} - -(* add support for Borland Pascal and Turbo Pascal inline assembly *) -{$IFDEF BORLANDPASCAL} -{$I TTCALC1.INC} -{$ENDIF} - -(* Delphi 16 uses the same inline assembly than Borland Pascal *) -{$IFDEF DELPHI16} -{$I TTCALC1.INC} -{$ENDIF} - -(* add support for Free Pascal inline assembly *) -{$IFDEF FPK} -{$I TTCALC4.INC} -{$ENDIF} - - (*****************************************************************) - (* *) - (* MulDiv : computes A*B/C with an intermediate 64 bits *) - (* precision. *) - (* *) - (*****************************************************************) - - function MulDiv( a, b, c : Int32 ) : Int32; - var - s : Int32; - temp : Int64; - begin - s := a; a := abs(a); - s := s xor b; b := abs(b); - s := s xor c; c := abs(c); - - MulTo64( a, b, temp ); - c := Div64by32( temp, c ); - - if s < 0 then c := -c; - - MulDiv := c; - end; - - (*****************************************************************) - (* *) - (* MulDiv : computes A*B/C with an intermediate 64 bits *) - (* _Round precision and rounding. *) - (* *) - (*****************************************************************) - - function MulDiv_Round( a, b, c : Int32 ) : Int32; - var - s : Int32; - - temp, temp2 : Int64; - begin - s := a; a := abs(a); - s := s xor b; b := abs(b); - s := s xor c; c := abs(c); - - MulTo64( a, b, temp ); - - temp2.hi := 0; - temp2.lo := c div 2; - - Add64( temp, temp2, temp ); - - c := Div64by32( temp, c ); - - if s < 0 then c := -c; - - MulDiv_Round := c; - end; - - -(**********************************************************) -(* Negation *) - - procedure Neg64( var x : Int64 ); - begin - (* Remember that -(0x80000000) == 0x80000000 with 2-complement! *) - (* We take care of that here. *) - - x.hi := x.hi xor $FFFFFFFF; - x.lo := x.lo xor $FFFFFFFF; - inc( x.lo ); - - if x.lo = 0 then - begin - inc( x.hi ); - if x.hi = $80000000 then (* check -MaxInt32-1 *) - begin - dec( x.lo ); (* we return $7FFFFFFF *) - dec( x.hi ); - end; - end; - end; - - -(**********************************************************) -(* MSB index ( return -1 for 0 ) *) - -function Order64( var Z : Int64 ) : integer; -begin - if Z.Hi <> 0 then Order64 := 32 + Order32( Z.Hi ) - else Order64 := Order32( Z.Lo ); -end; - - -(**********************************************************) -(* MSB index ( return -1 for 0 ) *) - -function Order32( Z : Int32 ) : integer; -var b : integer; -begin - b := 0; - while Z <> 0 do begin Z := Z shr 1; inc( b ); end; - Order32 := b-1; -end; - - -const - Roots : array[0..62] of LongInt - = ( - 1, 1, 2, 3, 4, 5, 8, 11, - 16, 22, 32, 45, 64, 90, 128, 181, - 256, 362, 512, 724, 1024, 1448, 2048, 2896, - 4096, 5892, 8192, 11585, 16384, 23170, 32768, 46340, - - 65536, 92681, 131072, 185363, 262144, 370727, - 524288, 741455, 1048576, 1482910, 2097152, 2965820, - 4194304, 5931641, 8388608, 11863283, 16777216, 23726566, - - 33554432, 47453132, 67108864, 94906265, - 134217728, 189812531, 268435456, 379625062, - 536870912, 759250125, 1073741824, 1518500250, - 2147483647 - ); - - -(**************************************************) -(* Integer Square Root *) - -function Sqrt32( L : Int32 ): LongInt; -var - R, S : LongInt; -begin - if L<=0 then Sqrt32:=0 else - if L=1 then Sqrt32:=1 else - begin - R:=Roots[ Order32(L) ]; - - Repeat - S:=R; - R:=( R+ L div R ) shr 1; - until ( R <= S ) and ( R*R <= L ); - - Sqrt32:=R; - end; -end; - - -(**************************************************) -(* Integer Square Root *) - -function Sqrt64( L : Int64 ): LongInt; -var - L2 : Int64; - R, S : LongInt; -begin - if L.Hi < 0 then Sqrt64:=0 else - begin - S := Order64(L); - if S = 0 then Sqrt64:=1 else - begin - R := Roots[S]; - - Repeat - - S := R; - R := ( R+Div64by32(L,R) ) shr 1; - - if ( R > S ) then continue; - - MulTo64( R, R, L2 ); - Sub64 ( L, L2, L2 ); - - until ( L2.Hi >= 0 ); - - Sqrt64 := R; - end - end -end; - -end. Index: xc/extras/FreeType/pascal/lib/ttcalc1.inc diff -u xc/extras/FreeType/pascal/lib/ttcalc1.inc:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcalc1.inc:removed --- xc/extras/FreeType/pascal/lib/ttcalc1.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcalc1.inc Wed Mar 16 20:59:46 2005 @@ -1,124 +0,0 @@ -(******************************************************************* - * - * TTCalc1.Inc 1.3 - * - * Arithmetic and Vectorial Computations (inline assembly) - * This version is used for 16-bit Turbo-Borland Pascal 6.0 & 7.0 - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : All vector operations were moved to the interpreter - * - ******************************************************************) - -(**********************************************************) -(* *) -(* The following routines are inline assembly, they are *) -(* thus processor and bitness specific. Replace them *) -(* with your own if you want to port the TrueType Engine *) - -(* We need unsigned longints to perform correctly our additions *) -(* we include inline assembly to get them, baaahhh .. *) - -{**********************************************************} -{* 64 Bit Addition *} - -procedure Add64( var X, Y, Z : Int64 ); assembler; -asm - les si,[X] - - mov ax,es:[ si ].word - mov dx,es:[si+2].word - mov bx,es:[si+4].word - mov cx,es:[si+6].word - - les si,[Y] - add ax,es:[ si ].word - adc dx,es:[si+2].word - adc bx,es:[si+4].word - adc cx,es:[si+6].word - - les si,[Z] - mov es:[ si ].word,ax - mov es:[si+2].word,dx - mov es:[si+4].word,bx - mov es:[si+6].word,cx -end; - - -{**********************************************************} -{* 64 Bit Substraction *} - -procedure Sub64( var X, Y, Z : Int64 ); assembler; -asm - les si,[X] - - mov ax,es:[ si ].word - mov dx,es:[si+2].word - mov bx,es:[si+4].word - mov cx,es:[si+6].word - - les si,[Y] - sub ax,es:[ si ].word - sbb dx,es:[si+2].word - sbb bx,es:[si+4].word - sbb cx,es:[si+6].word - - les si,[Z] - mov es:[ si ].word,ax - mov es:[si+2].word,dx - mov es:[si+4].word,bx - mov es:[si+6].word,cx -end; - - -{**********************************************************} -{* Multiply two Int32 to an Int64 *} - -procedure MulTo64( X, Y : Int32; var Z : Int64 ); assembler; -asm - les si,[Z] - db $66; mov ax,[X].word - db $66; imul [Y].word - db $66; mov es:[si],ax - db $66; mov es:[si+4],dx -end; - - -{**********************************************************} -{* Divide an Int64 by an Int32 *} - -function Div64by32( var X : Int64; Y : Int32 ) : Int32; assembler; -asm - les si,[X] - - db $66; mov ax,es:[si] - db $66; mov dx,es:[si+4] - db $66; idiv [Y].word - - db $66; mov dx, ax - db $66; sar dx, 16 -end; - - -procedure DivMod64by32( var X : Int64; Y : Int32; var Q, R : Int32 ); assembler; -asm - les si,[X] - - db $66; mov ax,es:[si] - db $66; mov dx,es:[si+4] - db $66; idiv [Y].word - - les si, [Q] - db $66; mov es:[si], ax - - les si, [R] - db $66; mov es:[si], dx -end; - Index: xc/extras/FreeType/pascal/lib/ttcalc2.inc diff -u xc/extras/FreeType/pascal/lib/ttcalc2.inc:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcalc2.inc:removed --- xc/extras/FreeType/pascal/lib/ttcalc2.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcalc2.inc Wed Mar 16 20:59:46 2005 @@ -1,107 +0,0 @@ -(******************************************************************* - * - * TTCalc2.Inc 1.2 - * - * Arithmetic and Vectorial Computations (inline assembly) - * This version is used for the OS/2 Virtual Pascal compiler - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : All vector operations were moved to the interpreter - * - ******************************************************************) - -(**********************************************************) -(* *) -(* The following routines are inline assembly, they are *) -(* thus processor and bitness specific. Replace them *) -(* with your own if you want to port the TrueType Engine *) - -(* We need unsigned longints to perform correctly our additions *) -(* we include inline assembly to get them, baaahhh .. *) - -(**********************************************************) -(* 64 Bit Addition *) - -procedure Add64( var X, Y, Z : Int64 ); assembler; -{&USES ebx, edx} -asm - mov ebx,[X].dword - mov eax,[ebx] - mov edx,[ebx+4] - - mov ebx,[Y].dword - add eax,[ebx] - adc edx,[ebx+4] - - mov ebx,[Z].dword - mov [ebx],eax - mov [ebx+4],edx -end; - - -(**********************************************************) -(* 64 Bit Substraction *) - -procedure Sub64( var X, Y, Z : Int64 ); assembler; -{&USES ebx, edx} -asm - mov ebx,[X].dword - mov eax,[ebx] - mov edx,[ebx+4] - - mov ebx,[Y].dword - sub eax,[ebx] - sbb edx,[ebx+4] - - mov ebx,[Z].dword - mov [ebx],eax - mov [ebx+4],edx -end; - - -(**********************************************************) -(* Multiply two Int32 to an Int64 *) - -procedure MulTo64( X, Y : Int32; var Z : Int64 ); assembler; -{&USES ebx, edx } -asm - mov ebx,[Z].dword - mov eax,[X] - imul dword ptr [Y] - mov [ebx],eax - mov [ebx+4],edx -end; - - -(**********************************************************) -(* Divide an Int64 by an Int32 *) - -function Div64by32( var X : Int64; Y : Int32 ) : Int32; assembler; -{&USES ebx, edx} -asm - mov ebx, [X].dword - mov eax, [ebx] - mov edx, [ebx+4] - idiv dword ptr [Y] -end; - -procedure DivMod64by32( var X : Int64; Y : Int32; var Q, R : Int32 ); - assembler; {&USES ebx, edx} -asm - mov ebx, [X].dword - mov eax, [ebx] - mov edx, [ebx+4] - idiv dword ptr [Y] - mov ebx, [Q].dword - mov [ebx], eax - mov ebx, [R].dword - mov [ebx], edx -end; - Index: xc/extras/FreeType/pascal/lib/ttcalc3.inc diff -u xc/extras/FreeType/pascal/lib/ttcalc3.inc:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcalc3.inc:removed --- xc/extras/FreeType/pascal/lib/ttcalc3.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcalc3.inc Wed Mar 16 20:59:46 2005 @@ -1,99 +0,0 @@ -(******************************************************************* - * - * TTCalc3.Inc 1.2 - * - * Arithmetic and Vectorial Computations (inline assembly) - * This version is used for Delphi 2 - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : All vector operations were moved to the interpreter - * - ******************************************************************) - -(**********************************************************) -(* *) -(* The following routines are inline assembly, they are *) -(* thus processor and bitness specific. Replace them *) -(* with your own if you want to port the TrueType Engine *) - -(* NOTE : Delphi seems to use the eax, edx then ecx registers to pass *) -(* the first three parameters *) - -(**********************************************************) -(* 64 Bit Addition *) - -procedure Add64( var X, Y, Z : Int64 ); assembler; -asm - push ebx - push esi - mov ebx, [ eax ] - mov esi, [eax+4] - add ebx, [ edx ] - adc esi, [edx+4] - mov [ ecx ], ebx - mov [ecx+4], esi - pop esi - pop ebx -end; - - -(**********************************************************) -(* 64 Bit Substraction *) - -procedure Sub64( var X, Y, Z : Int64 ); assembler; -asm - push ebx - push esi - mov ebx, [ eax ] - mov esi, [eax+4] - sub ebx, [ edx ] - sbb esi, [edx+4] - mov [ ecx ], ebx - mov [ecx+4], esi - pop esi - pop ebx -end; - - -(**********************************************************) -(* Multiply two Int32 to an Int64 *) - -procedure MulTo64( X, Y : Int32; var Z : Int64 ); assembler; -asm - imul edx - mov [ ecx ],eax - mov [ecx+4],edx -end; - -(**********************************************************) -(* Divide an Int64 by an Int32 *) - -function Div64by32( var X : Int64; Y : Int32 ) : Int32; assembler; -asm - mov ecx, edx - mov edx, [eax+4].dword - mov eax, [ eax ].dword - idiv ecx -end; - -procedure DivMod64by32( var X : Int64; Y : Int32; var Q, R : Int32 ); - assembler; -asm - push ebx - mov ebx, edx - mov edx, [eax+4].dword - mov eax, [ eax ].dword - idiv ebx - mov [ecx], eax - mov ebx, R - mov [ebx], edx - pop ebx -end; - Index: xc/extras/FreeType/pascal/lib/ttcalc4.inc diff -u xc/extras/FreeType/pascal/lib/ttcalc4.inc:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcalc4.inc:removed --- xc/extras/FreeType/pascal/lib/ttcalc4.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcalc4.inc Wed Mar 16 20:59:46 2005 @@ -1,134 +0,0 @@ -(******************************************************************* - * - * TTCalc4.Inc 1.2 - * - * Arithmetic and Vectorial Computations (inline assembly) - * This version is used for i386 FreePascal - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : All vector operations were moved to the interpreter - * - ******************************************************************) - -(**********************************************************) -(* *) -(* The following routines are inline assembly, they are *) -(* thus processor and bitness specific. Replace them *) -(* with your own if you want to port the TrueType Engine *) - -(**********************************************************) -(* 64 Bit Addition *) - -procedure Add64( var X, Y, Z : Int64 ); assembler; -asm - push %ebx - push %edx - - mov X,%ebx - mov (%ebx) ,%eax - mov 4(%ebx) ,%edx - - mov Y,%ebx - add (%ebx) ,%eax - adc 4(%ebx) ,%edx - - mov Z,%ebx - mov %eax, (%ebx) - mov %edx, 4(%ebx) - - pop %edx - pop %ebx -end; - - -(**********************************************************) -(* 64 Bit Substraction *) - -procedure Sub64( var X, Y, Z : Int64 ); assembler; -asm - push %ebx - push %edx - - mov X,%ebx - mov (%ebx) ,%eax - mov 4(%ebx) ,%edx - - mov Y,%ebx - sub (%ebx) ,%eax - sbb 4(%ebx) ,%edx - - mov Z,%ebx - mov %eax, (%ebx) - mov %edx, 4(%ebx) - - pop %edx - pop %ebx -end; - - -(**********************************************************) -(* Multiply two Int32 to an Int64 *) - -procedure MulTo64( X, Y : Int32; var Z : Int64 ); assembler; -asm - push %ebx - push %edx - - mov X,%eax - imull Y - - mov Z,%ebx - mov %eax, (%ebx) - mov %edx, 4(%ebx) - - pop %edx - pop %ebx -end; - - -(**********************************************************) -(* Divide an Int64 by an Int32 *) - -function Div64by32( var X : Int64; Y : Int32 ) : Int32; assembler; -asm - push %ebx - push %edx - - mov X,%ebx - mov (%ebx) ,%eax - mov 4(%ebx) ,%edx - idivl Y - - pop %edx - pop %ebx -end; - - -procedure DivMod64by32( var X : Int64; Y : Int32; var Q, R : Int32 ); - assembler; -asm - push %ebx - push %edx - - mov X,%ebx - mov (%ebx) ,%eax - mov 4(%ebx) ,%edx - idivl Y - - mov Q, %ebx - mov %eax, (%ebx) - - mov R, %ebx - mov %edx, (%ebx) - - pop %edx - pop %ebx -end; - Index: xc/extras/FreeType/pascal/lib/ttcmap.pas diff -u xc/extras/FreeType/pascal/lib/ttcmap.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttcmap.pas:removed --- xc/extras/FreeType/pascal/lib/ttcmap.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttcmap.pas Wed Mar 16 20:59:46 2005 @@ -1,431 +0,0 @@ -(******************************************************************* - * - * ttcmap.pas 1.0 - * - * Character Mappings unit. - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -unit TTCMap; - -interface - -uses FreeType, TTTypes; - -type - (********************************************************************) - (* *) - (* CHARACTER MAPPINGS SUBTABLES *) - (* *) - (********************************************************************) - - (* FORMAT 0 *) - - (* Apple standard character to glyph index mapping table *) - (* the glyphIdArray for this format has 256 entries *) - - TCMap0 = record - glyphIdArray : PUShort; - end; - - (* FORMAT 2 *) - - (* the format 2 table contains a variable-length array of subHeaders *) - (* (at most 256 entries) whose size must be determined algorithmically *) - TCMap2SubHeader = record - firstCode : UShort; (* first valid low byte *) - entryCount : UShort; (* number of valid low bytes *) - idDelta : Short; (* delta value to glyphIndex *) - idRangeOffset : UShort; (* offset fr. here to 1stCode *) - end; - - TCMap2SubHeaders = array[0..100] of TCMap2SubHeader; - PCMap2SubHeaders = ^TCMap2SubHeaders; - - (* Format 2 is used for mixed 8/16bit encodings (usually CJK fonts) *) - TCMap2 = record - subHeaderKeys : PUShort; - (* high byte mapping table *) - (* value = subHeader index * 8 *) - subHeaders : PCMap2SubHeaders; - glyphIdArray : PUShort; - numGlyphId : Int; - end; - - (* FORMAT 4 *) - - (*The format 4 table contains segCount segments *) - TCMap4Segment = record - endCount : UShort; - startCount : UShort; - idDelta : UShort; - idRangeOffset : UShort; - end; - TCMap4Segments = array[0..100] of TCMap4Segment; - PCMap4Segments = ^TCMap4Segments; - - (* Microsoft standard character to glyph index mapping table *) - TCMap4 = record - segCountX2 : UShort; (* segments number * 2 *) - searchRange : UShort; (* these parameters can be used *) - entrySelector : UShort; (* for a binary search *) - rangeShift : UShort; - segments : PCMap4Segments; - glyphIdArray : PUShort; - numGlyphId : Int; - end; - - (* FORMAT 6 *) - - (* trimmed table mapping (for representing one subrange) *) - TCMap6 = record - firstCode : UShort; (* first character code of subrange *) - entryCount : UShort; (* num. of character codes in subrange *) - - glyphIdArray : PUShort; - end; - - (* CHARMAP TABLE *) - - PCMapTable = ^TCMapTable; - TCMapTable = record - platformID : UShort; - platformEncodingID : UShort; - - Format : word; - Length : word; - Version : word; - Loaded : Boolean; - Offset : Long; - - case Byte of - 0 : ( cmap0 : TCMap0 ); - 2 : ( cmap2 : TCMap2 ); - 4 : ( cmap4 : TCMap4 ); - 6 : ( cmap6 : TCMap6 ); - end; - - TCMapTables = array[0..9] of TCMapTable; - PCMapTables = ^TCMapTables; - - - function CharMap_Load( var cmap : TCMapTable ) : TError; - - procedure CharMap_Free( var cmap : TCMapTable ); - - function CharMap_Index( var cmap : TCMapTable; charCode : Long ) : UShort; - -implementation - -uses - TTError, TTMemory, TTFile; - - function CharMap_Load( var cmap : TCMapTable ) : TError; - var - num_SH, u : UShort; - i : Int; - numGlyphId : Int; - num_segs : Int; - label - Fail; - begin - CharMap_Load := Failure; - - if cmap.loaded then - begin - CharMap_Load := Success; - exit; - end; - - if TT_Seek_File( cmap.offset ) then exit; - - case cmap.format of - - 0: with cmap.cmap0 do - if Alloc( glyphIdArray, 256 ) or - TT_Read_File( glyphIdArray^, 256 ) then goto Fail; - - 2: begin - num_SH := 0; - with cmap.cmap2 do - begin - if Alloc( subHeaderKeys, 256*sizeof(UShort) ) or - TT_Access_Frame( 512 ) then goto Fail; - - for i := 0 to 255 do - begin - u := GET_UShort shr 3; - subHeaderKeys^[i] := u; - - if num_SH < u then num_SH := u; - end; - - TT_Forget_Frame; - - (* now load sub headers *) - numGlyphId := ((cmap.length - 2*(256+3) - num_SH*8) and $FFFF) - div 2; - - if Alloc( subHeaders, (num_SH+1)*sizeof(TCMap2SubHeader) ) or - TT_Access_Frame( (num_SH+1)*8 ) then goto Fail; - - for i := 0 to num_SH do with subHeaders^[i] do - begin - firstCode := GET_UShort; - entryCount := GET_UShort; - idDelta := GET_UShort; - (* we apply the location offset immediately *) - idRangeOffset := GET_UShort - (num_SH-i)*8 - 2; - end; - - TT_Forget_Frame; - - (* load glyph ids *) - if Alloc( glyphIdArray, numGlyphId*sizeof(UShort) ) or - TT_Access_Frame( numGlyphId*2 ) then goto Fail; - - for i := 0 to numGlyphId-1 do - glyphIdArray^[i] := GET_UShort; - - TT_Forget_Frame; - end; - end; - - 4: with cmap.cmap4 do - begin - if TT_Access_Frame(8) then goto Fail; - - segCountX2 := Get_UShort; - searchRange := Get_UShort; - entrySelector := Get_UShort; - rangeShift := Get_UShort; - - num_segs := segCountX2 shr 1; - - TT_Forget_Frame; - - (* load segments *) - if Alloc( segments, num_segs*sizeof(TCMap4Segment) ) or - TT_Access_Frame( (num_segs*4+1)*2 ) then goto Fail; - - for i := 0 to num_segs-1 do - segments^[i].endCount := Get_UShort; - - Get_UShort; - - for i := 0 to num_segs-1 do - segments^[i].startCount := Get_UShort; - - for i := 0 to num_segs-1 do - segments^[i].idDelta := GET_Short; - - for i := 0 to num_segs-1 do - segments^[i].idRangeOffset := GET_UShort; - - TT_Forget_Frame; - - numGlyphId := (( cmap.length - (16+8*num_segs) ) and $FFFF) - div 2; - - (* load glyph ids *) - if Alloc( glyphIdArray, numGlyphId*sizeof(UShort) ) or - TT_Access_Frame( numGlyphId*2 ) then goto Fail; - - for i := 0 to numGlyphId-1 do - glyphIdArray^[i] := Get_UShort; - - TT_Forget_Frame; - end; - - 6: with cmap.cmap6 do - begin - if TT_Access_Frame(4) then goto Fail; - - firstCode := GET_UShort; - entryCount := GET_UShort; - - TT_Forget_Frame; - - if Alloc( glyphIdArray, entryCount*sizeof(Short) ) or - TT_Access_Frame( entryCount*2 ) then goto Fail; - - for i := 0 to entryCount-1 do - glyphIdArray^[i] := GET_UShort; - - TT_Forget_Frame; - end; - - else - error := TT_Err_Invalid_Charmap_Format; - exit; - end; - - CharMap_Load := success; - exit; - - Fail: - CharMap_Free( cmap ); - end; - - - procedure CharMap_Free( var cmap : TCMapTable ); - begin - with cmap do - case format of - - 0 : begin - Free( cmap.cmap0.glyphIdArray ); - end; - - 2 : begin - Free( cmap.cmap2.glyphIdArray ); - Free( cmap.cmap2.subHeaders ); - Free( cmap.cmap2.glyphIdArray ); - end; - - 4 : begin - Free( cmap.cmap4.segments ); - Free( cmap.cmap4.glyphIdArray ); - cmap.cmap4.segCountX2 := 0; - end; - - 6 : begin - Free( cmap.cmap6.glyphIdArray ); - cmap.cmap6.entryCount := 0; - end; - end; - - cmap.loaded := False; - cmap.format := 0; - cmap.length := 0; - cmap.version := 0; - end; - - - function code_to_index0( charCode : UShort; var cmap0 : TCMap0 ) : UShort; - begin - code_to_index0 := 0; - if charCode < 256 then - code_to_index0 := cmap0.glyphIdArray^[charCode] - end; - - - - function code_to_index2( charCode : UShort; var cmap2 : TCMap2 ) : UShort; - var - index1, idx, offset : UShort; - begin - code_to_index2 := 0; - - if charCode < 256 then idx := charCode - else idx := charCode shr 8; - - index1 := cmap2.subHeaderKeys^[idx]; - - if index1 = 0 then - begin - if charCode < 256 then - code_to_index2 := cmap2.glyphIdArray^[charCode]; (* 8Bit charcode *) - end - else - begin - if charCode < 256 then - exit; - - idx := charCode and 255; - with cmap2.subHeaders^[index1] do - begin - if ( idx < firstCode ) or - ( idx >= firstCode + entryCount ) then exit; - - offset := idRangeOffset div 2 + idx - firstCode; - - if offset >= cmap2.numGlyphId then exit; - - idx := cmap2.glyphIdArray^[offset]; - if idx <> 0 then - code_to_index2 := (idx + idDelta) and $FFFF; - end - end; - end; - - - - function code_to_index4( charCode : UShort; var cmap4 : TCMap4 ) : UShort; - var - i, index1, num_segs : Int; - label - Found; - begin - code_to_index4 := 0; - num_segs := cmap4.segCountX2 div 2; - i := 0; - - while ( i < num_segs ) do with cmap4.segments^[i] do - begin - if charCode <= endCount then goto Found; - inc(i); - end; - - exit; - - Found: - with cmap4.segments^[i] do - begin - - if charCode < startCount then - exit; - - if idRangeOffset = 0 then - code_to_index4 := (charCode + idDelta) and $FFFF - else - begin - index1 := idRangeOffset div 2 + (charCode - startCount) - - -(num_segs-i); - - if ( index1 < cmap4.numGlyphId ) and - ( cmap4.glyphIdArray^[index1] <> 0 ) then - - code_to_index4 := (cmap4.glyphIdArray^[index1] + idDelta) and $FFFF; - end; - end; - end; - - - function code_to_index6( charCode : UShort; var cmap6 : TCMap6 ) : UShort; - begin - code_to_index6 := 0; - with cmap6 do - begin - - if ( charCode < firstCode ) or - ( charCode >= firstCode + entryCount ) then exit; - - code_to_index6 := glyphIdArray^[charCode-firstCode]; - end - end; - - - function CharMap_Index( var cmap : TCMapTable; - charCode : Long ) : UShort; - begin - CharMap_Index := 0; - - case cmap.format of - 0: CharMap_Index := code_to_index0( charCode, cmap.cmap0 ); - 2: CharMap_Index := code_to_index2( charCode, cmap.cmap2 ); - 4: CharMap_Index := code_to_index4( charCode, cmap.cmap4 ); - 6: CharMap_Index := code_to_index6( charCode, cmap.cmap6 ); - end; - end; - -end. Index: xc/extras/FreeType/pascal/lib/ttconfig.inc diff -u xc/extras/FreeType/pascal/lib/ttconfig.inc:1.1.1.1 xc/extras/FreeType/pascal/lib/ttconfig.inc:removed --- xc/extras/FreeType/pascal/lib/ttconfig.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttconfig.inc Wed Mar 16 20:59:46 2005 @@ -1,75 +0,0 @@ -(* *) -(* TTConfig.Inc *) -(* *) -(* This file contains several definition pragmas that are used to *) -(* build several versions of the library. Each constant is commented *) - -(* Define the DEBUG constant if you want the library dumping trace *) -(* information to the standard error output. *) -{ $DEFINE DEBUG} - - -(* Define the ASSERT constant if you want to generate runtime integrity *) -(* checks within the library. Most of the checks will panic and stop the *) -(* the program when failed.. *) -{ $DEFINE ASSERT} - - -(* Define the INLINE constant if you want to use inlining when provided *) -(* by your compiler. Currently, only Virtual Pascal does *) -{$IFDEF VIRTUALPASCAL} -{$DEFINE INLINE} -{$ENDIF} - - -(* Define the USE32 constant on 32-bit systems. Virtual Pascal *) -(* always define it by default. Now set for Delphi 2 and 3 *) -{$IFDEF WIN32} -{$DEFINE USE32} -{$ENDIF} - -(* FreeType doesn't compile on old Pascal compilers that do not allow *) -(* inline assembly like Turbo Pascal 5.5 and below *) -{$IFDEF VER50} -ERROR : FreeType cannot be compiled with something older than Turbo Pascal 6.0 -{$ENDIF} -{$IFDEF VER55} -ERROR : FreeType cannot be compiled with something older than Turbo Pascal 6.0 -{$ENDIF} - -(* Define the BORLANDPASCAL constant whenever you're using a DOS-based *) -(* version of Turbo or Borland Pascal. *) -{$IFDEF VER60} -{$DEFINE BORLANDPASCAL} -{$ENDIF} -{$IFDEF VER70} -{$DEFINE BORLANDPASCAL} -{$ENDIF} - -(* Define DELPHI16 when compiled in the 16_bit version of Delphi *) -{$IFDEF VER80} -{$DEFINE DELPHI16} -{$ENDIF} - -(* Define DELPHI32 when compiled in any 32-bit version of Delphi *) -{$IFDEF VER90} (* for Delphi 2 *) -{$DEFINE DELPHI32} -{$ENDIF} -{$IFDEF VER100} (* for Delphi 3 *) -{$DEFINE DELPHI32} -{$ENDIF} -{$IFDEF VER110} (* for Borland C++ Builder 3 *) -{$DEFINE DELPHI32} -{$ENDIF} -{$IFDEF VER120} (* for Delphi 4 *) -{$DEFINE DELPHI32} -{$ENDIF} -{$IFDEF VER125} (* for Borland C++ Builder 4 *) -{$DEFINE DELPHI32} -{$ENDIF} - -(* I don't have Delphi 5, I hope this will work *) -{$IFDEF VER130} -{$DEFINE DELPHI32} -{$ENDIF} - Index: xc/extras/FreeType/pascal/lib/ttdebug.pas diff -u xc/extras/FreeType/pascal/lib/ttdebug.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttdebug.pas:removed --- xc/extras/FreeType/pascal/lib/ttdebug.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttdebug.pas Wed Mar 16 20:59:46 2005 @@ -1,851 +0,0 @@ -(******************************************************************* - * - * TTDebug.Pas 1.2 - * - * This unit is only used by the debugger. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -unit TTDebug; - -interface - -uses TTTypes, TTTables, TTObjs, TTInterp; - -type - - ByteHexStr = string[2]; (* hex representation of a byte *) - ShortHexStr = string[4]; (* " " " short *) - LongHexStr = string[8]; (* " " " long *) - DebugStr = string[128]; (* disassembled line output *) - - { TBreakPoint } - - { A simple record to hold breakpoint information } - { it may be completed later with pass count, etc.. } - { They must be in a sorted linked list } - - PBreakPoint = ^TBreakPoint; - TBreakPoint = record - Next : PBreakPoint; - Range : Int; - Address : Int; - end; - - { TRangeRec } - - { a record to store line number information and breakpoints list } - - PRangeRec = ^TRangeRec; - TRangeRec = record - Code : PByte; - Size : Int; - index : Int; - NLines : Int; - Disassembled : PUShort; - Breaks : PBreakPoint; - end; - - -{ Generate_Range : Generate Line Number information specific to } -{ a given range } - -procedure Generate_Range( CR : PCodeRange; - index : Int; - var RR : TRangeRec ); - -{ Throw_Range : Discard Line Number Information } - -procedure Throw_Range( var RR : TRangeRec ); - -{ Toggle_Break : Toggle a breakpoint } - -procedure Toggle_Break( var Head : PBreakPoint; Range, Adr : Int ); - -{ Set_Break : Set a breakpoint on a given address } - -procedure Set_Break ( var Head : PBreakPoint; Range, Adr : Int ); - -{ Clear_Break : Clear one specific breakpoint } - -procedure Clear_Break( var Head : PBreakPoint; Bp : PBreakPoint ); - -{ Clear_All_Breaks : Clear breakpoint list } - -procedure Clear_All_Breaks( var Head : PBreakPoint ); - -{ Find_Breakpoint : find one breakpoint at a given address } - -function Find_BreakPoint( Head : PBreakPoint; Range, IP : Int ) : PBreakPoint; - -{ Cur_U_Line : returns the current disassembled line at Code(IP) } - -function Cur_U_Line( Code : PByte; IP : Int ) : DebugStr; - -{ Get_Length : returns the length of the current opcode at Code(IP) } - -function Get_Length( Code : PByte; IP : Int ) : Int; - -function Get_Dis_Line( var cr : TRangeRec; addr : Int ) : Int; - - -{ Hex_N : returns an hexadecimal string } - -function Hex8 ( B : Byte ) : ByteHexStr; -function Hex16( W : word ) : ShortHexStr; -function Hex32( L : Long ) : LongHexStr; - - -implementation - -type - PStorageLong = ^TStorageLong; - TStorageLong = record (* do-it-all union record type *) - case Byte of - 0 : ( L : LongInt ); - 1 : ( S1, S2 : Integer ); - 2 : ( W1, W2 : Word ); - 3 : ( B1, B2, - B3, B4 : Byte ); - 4 : ( P : Pointer ); - end; - -var - OpSize : int; - -const - OpStr : array[ 0..255 ] of String[10] - = ( - 'SVTCA y', (* Set vectors to coordinate axis y *) - 'SVTCA x', (* Set vectors to coordinate axis x *) - 'SPvTCA y', (* Set Proj. vec. to coord. axis y *) - 'SPvTCA x', (* Set Proj. vec. to coord. axis x *) - 'SFvTCA y', (* Set Free. vec. to coord. axis y *) - 'SFvTCA x', (* Set Free. vec. to coord. axis x *) - 'SPvTL //', (* Set Proj. vec. parallel to segment *) - 'SPvTL +', (* Set Proj. vec. normal to segment *) - 'SFvTL //', (* Set Free. vec. parallel to segment *) - 'SFvTL +', (* Set Free. vec. normal to segment *) - 'SPvFS', (* Set Proj. vec. from stack *) - 'SFvFS', (* Set Free. vec. from stack *) - 'GPV', (* Get projection vector *) - 'GFV', (* Get freedom vector *) - 'SFvTPv', (* Set free. vec. to proj. vec. *) - 'ISECT', (* compute intersection *) - - 'SRP0', (* Set reference point 0 *) - 'SRP1', (* Set reference point 1 *) - 'SRP2', (* Set reference point 2 *) - 'SZP0', (* Set Zone Pointer 0 *) - 'SZP1', (* Set Zone Pointer 1 *) - 'SZP2', (* Set Zone Pointer 2 *) - 'SZPS', (* Set all zone pointers *) - 'SLOOP', (* Set loop counter *) - 'RTG', (* Round to Grid *) - 'RTHG', (* Round to Half-Grid *) - 'SMD', (* Set Minimum Distance *) - 'ELSE', (* Else *) - 'JMPR', (* Jump Relative *) - 'SCvTCi', (* Set CVT *) - 'SSwCi', (* *) - 'SSW', (* *) - - 'DUP', - 'POP', - 'CLEAR', - 'SWAP', - 'DEPTH', - 'CINDEX', - 'MINDEX', - 'AlignPTS', - 'INS_$28', - 'UTP', - 'LOOPCALL', - 'CALL', - 'FDEF', - 'ENDF', - 'MDAP[-]', - 'MDAP[r]', - - 'IUP[y]', - 'IUP[x]', - 'SHP[0]', - 'SHP[1]', - 'SHC[0]', - 'SHC[1]', - 'SHZ[0]', - 'SHZ[1]', - 'SHPIX', - 'IP', - 'MSIRP[0]', - 'MSIRP[1]', - 'AlignRP', - 'RTDG', - 'MIAP[-]', - 'MIAP[r]', - - 'NPushB', - 'NPushW', - 'WS', - 'RS', - 'WCvtP', - 'RCvt', - 'GC[0]', - 'GC[1]', - 'SCFS', - 'MD[0]', - 'MD[1]', - 'MPPEM', - 'MPS', - 'FlipON', - 'FlipOFF', - 'DEBUG', - - 'LT', - 'LTEQ', - 'GT', - 'GTEQ', - 'EQ', - 'NEQ', - 'ODD', - 'EVEN', - 'IF', - 'EIF', - 'AND', - 'OR', - 'NOT', - 'DeltaP1', - 'SDB', - 'SDS', - - 'ADD', - 'SUB', - 'DIV', - 'MUL', - 'ABS', - 'NEG', - 'FLOOR', - 'CEILING', - 'ROUND[G]', - 'ROUND[B]', - 'ROUND[W]', - 'ROUND[?]', - 'NROUND[G]', - 'NROUND[B]', - 'NROUND[W]', - 'NROUND[?]', - - 'WCvtF', - 'DeltaP2', - 'DeltaP3', - 'DeltaC1', - 'DeltaC2', - 'DeltaC3', - 'SROUND', - 'S45Round', - 'JROT', - 'JROF', - 'ROFF', - 'INS_$7B', - 'RUTG', - 'RDTG', - 'SANGW', - 'AA', - - 'FlipPT', - 'FlipRgON', - 'FlipRgOFF', - 'INS_$83', - 'INS_$84', - 'ScanCTRL', - 'SDPVTL[0]', - 'SDPVTL[1]', - 'GetINFO', - 'IDEF', - 'ROLL', - 'MAX', - 'MIN', - 'ScanTYPE', - 'IntCTRL', - 'INS_$8F', - - 'INS_$90', - 'INS_$91', - 'INS_$92', - 'INS_$93', - 'INS_$94', - 'INS_$95', - 'INS_$96', - 'INS_$97', - 'INS_$98', - 'INS_$99', - 'INS_$9A', - 'INS_$9B', - 'INS_$9C', - 'INS_$9D', - 'INS_$9E', - 'INS_$9F', - - 'INS_$A0', - 'INS_$A1', - 'INS_$A2', - 'INS_$A3', - 'INS_$A4', - 'INS_$A5', - 'INS_$A6', - 'INS_$A7', - 'INS_$A8', - 'INS_$A9', - 'INS_$AA', - 'INS_$AB', - 'INS_$AC', - 'INS_$AD', - 'INS_$AE', - 'INS_$AF', - - 'PushB[0]', - 'PushB[1]', - 'PushB[2]', - 'PushB[3]', - 'PushB[4]', - 'PushB[5]', - 'PushB[6]', - 'PushB[7]', - 'PushW[0]', - 'PushW[1]', - 'PushW[2]', - 'PushW[3]', - 'PushW[4]', - 'PushW[5]', - 'PushW[6]', - 'PushW[7]', - - 'MDRP[G]', - 'MDRP[B]', - 'MDRP[W]', - 'MDRP[?]', - 'MDRP[rG]', - 'MDRP[rB]', - 'MDRP[rW]', - 'MDRP[r?]', - 'MDRP[mG]', - 'MDRP[mB]', - 'MDRP[mW]', - 'MDRP[m?]', - 'MDRP[mrG]', - 'MDRP[mrB]', - 'MDRP[mrW]', - 'MDRP[mr?]', - 'MDRP[pG]', - 'MDRP[pB]', - - 'MDRP[pW]', - 'MDRP[p?]', - 'MDRP[prG]', - 'MDRP[prB]', - 'MDRP[prW]', - 'MDRP[pr?]', - 'MDRP[pmG]', - 'MDRP[pmB]', - 'MDRP[pmW]', - 'MDRP[pm?]', - 'MDRP[pmrG]', - 'MDRP[pmrB]', - 'MDRP[pmrW]', - 'MDRP[pmr?]', - - 'MIRP[G]', - 'MIRP[B]', - 'MIRP[W]', - 'MIRP[?]', - 'MIRP[rG]', - 'MIRP[rB]', - 'MIRP[rW]', - 'MIRP[r?]', - 'MIRP[mG]', - 'MIRP[mB]', - 'MIRP[mW]', - 'MIRP[m?]', - 'MIRP[mrG]', - 'MIRP[mrB]', - 'MIRP[mrW]', - 'MIRP[mr?]', - 'MIRP[pG]', - 'MIRP[pB]', - - 'MIRP[pW]', - 'MIRP[p?]', - 'MIRP[prG]', - 'MIRP[prB]', - 'MIRP[prW]', - 'MIRP[pr?]', - 'MIRP[pmG]', - 'MIRP[pmB]', - 'MIRP[pmW]', - 'MIRP[pm?]', - 'MIRP[pmrG]', - 'MIRP[pmrB]', - 'MIRP[pmrW]', - 'MIRP[pmr?]' - ); - -const - HexStr : string[16] = '0123456789abcdef'; - -(******************************************************************* - * - * Function : Hex8 - * - * Description : Returns the string hexadecimal representation - * of a Byte. - * - * Input : B byte - * - * Output : two-chars string - * - *****************************************************************) - -function Hex8( B : Byte ) : ByteHexStr; -var - S : ByteHexStr; -begin - S[0] :=#2; - S[1] := HexStr[ 1+( B shr 4 ) ]; - S[2] := HexStr[ 1+( B and 15 )]; - Hex8 := S; -end; - -(******************************************************************* - * - * Function : Hex16 - * - * Description : Returns the string hexadecimal representation - * of a Short. - * - * Input : W word - * - * Output : four-chars string - * - *****************************************************************) - -function Hex16( W : word ) : ShortHexStr; -begin - Hex16 := Hex8( Hi(w) )+Hex8( Lo(w) ); -end; - -(******************************************************************* - * - * Function : Hex32 - * - * Description : Returns the string hexadecimal representation - * of a Long. - * - * Input : L Long - * - * Output : eight-chars string - * - *****************************************************************) - -function Hex32( L : Long ) : LongHexStr; -begin - Hex32 := Hex16( TStorageLong(L).W2 )+Hex16( TStorageLong(L).W1 ); -end; - -(******************************************************************* - * - * Function : Cur_U_Line - * - * Description : Returns a string of the current unassembled - * line at Code^[IP]. - * - * Input : Code base code range - * IP current instruction pointer - * - * Output : line string - * - *****************************************************************) - -function Cur_U_Line( Code : PByte; IP : Int ) : DebugStr; -var - Op : Byte; - N, I : Int; - S : DebugStr; -begin - - Op := Code^[IP]; - S := Hex16(IP)+': '+Hex8(Op)+' '+OpStr[Op]; - - case Op of - - $40 : begin - n := Code^[IP+1]; - S := S+'('+Hex8(n)+')'; - for i := 1 to n do - S := S+' $'+Hex8( Code^[Ip+i+1] ); - end; - - $41 : begin - n := Code^[IP+1]; - S := S+'('+Hex8(n)+')'; - for i := 1 to n do - S := S+' $'+Hex8( Code^[Ip+i*2+1] )+Hex8( Code^[Ip+i*2+2] ); - end; - - $B0..$B7 : begin - n := Op-$B0; - for i := 0 to N do - S := S+' $'+Hex8( Code^[Ip+i+1] ); - end; - - $B8..$BF : begin - n := Op-$B8; - for i := 0 to N do - S := S+' $'+Hex8( Code^[IP+i*2+1] )+Hex8( Code^[Ip+i*2+2] ); - end; - - end; - - Cur_U_Line := S; -end; - -(******************************************************************* - * - * Function : Get_Length - * - * Description : Returns the length in bytes of the instruction at - * current instruction pointer. - * - * Input : Code base code range - * IP current instruction pointer - * - * Output : Length in bytes - * - *****************************************************************) - -function Get_Length( Code : PByte; IP : Int ) : Int; -var - Op : Byte; - N : Int; -begin - - Op := Code^[IP]; - - case Op of - - $40 : N := 2 + Code^[IP+1]; - $41 : N := 2 + Code^[IP+1]*2; - - $B0..$B7 : N := 2 + ( Op-$B0 ); - $B8..$BF : N := 3 + ( Op-$B8 )*2 - - else - N := 1; - end; - - Get_Length := N; - -end; - -(******************************************************************* - * - * Function : Generate_Range - * - * Description : Create a list of unassembled lines for a - * given code range - * - * Input : - * - * Output : - * - *****************************************************************) - -procedure Generate_Range( CR : PCodeRange; - index : Int; - var RR : TRangeRec ); -var - Adr, Line, N : Int; - Code : PByte; -begin - - N := CR^.Size; - - RR.Code := PByte( CR^.Base ); - RR.Size := N; - - Line := 0; - - if N > 0 then - begin - Adr := 0; - GetMem( RR.Disassembled, sizeof(Short) * N ); - - while Adr < N do - begin - RR.Disassembled^[Line] := Adr; - inc( Line ); - inc( Adr, Get_Length( RR.Code, Adr )); - end; - end; - - RR.NLines := Line; - RR.Index := index; - RR.Breaks := nil; -end; - -(******************************************************************* - * - * Function : Get_Dis_Line - * - * Description : Returns the line index of address 'addr' - * in the coderange 'cr' - * - *****************************************************************) - - function Get_Dis_Line( var cr : TRangeRec; addr : Int ) : Int; - var - l, r, m : Int; - begin - if (cr.NLines = 0) or - (addr > cr.Disassembled^[cr.Nlines-1] ) then - begin - Get_Dis_Line := -1; - exit; - end; - - l := 0; - r := cr.NLines-1; - - while ( r-l > 1 ) do - begin - if cr.Disassembled^[l] = addr then - begin - Get_Dis_Line := l; - exit; - end; - - if cr.Disassembled^[r] = addr then - begin - Get_Dis_Line := r; - exit; - end; - - m := (l+r) shr 1; - if cr.Disassembled^[m] = addr then - begin - Get_Dis_Line := m; - exit; - end - else - if cr.Disassembled^[m] < addr then - l := m - else - r := m; - end; - - if cr.Disassembled^[r] = addr then - begin - Get_Dis_Line := r; - exit; - end; - - Get_Dis_Line := l; - - end; - -(******************************************************************* - * - * Function : Throw_Range - * - * Description : Destroys a list of unassembled lines for a - * given code range - * - * Input : - * - * Output : - * - *****************************************************************) - -procedure Throw_Range( var RR : TRangeRec ); -var - B, Bnext : PBreakPoint; -begin - - if RR.Size > 0 then - FreeMem( RR.Disassembled, RR.Size * sizeof(Short) ); - - RR.Disassembled := nil; - RR.Size := 0; - RR.Code := nil; - RR.NLines := 0; - - B := RR.Breaks; - RR.Breaks := nil; - - while B<>nil do - begin - Bnext := B^.Next; - Dispose( B ); - B := Bnext; - end; -end; - -(******************************************************************* - * - * Function : Set_Break - * - * Description : Sets a Breakpoint ON - * - * Input : - * - * Output : - * - *****************************************************************) - -procedure Set_Break( var Head : PBreakPoint; - Range : Int; - Adr : Int ); -var - BP, - Old, - Cur : PBreakPoint; -begin - Old := nil; - Cur := Head; - - while (Cur <> nil) and (Cur^.Address < Adr) do - begin - Old := Cur; - Cur := Cur^.Next; - end; - - { No duplicates } - if Cur <> nil then - if (Cur^.Address = Adr) and (Cur^.Range = Range) then exit; - - New( BP ); - BP^.Address := Adr; - BP^.Range := Range; - BP^.Next := Cur; - - if Old = nil then - Head := BP - else - Old^.Next := BP; -end; - -(******************************************************************* - * - * Function : Clear_Break - * - * Description : Clears a breakpoint OFF - * - * Input : - * - * Output : - * - *****************************************************************) - -procedure Clear_Break( var Head : PBreakPoint; Bp : PBreakPoint ); -var - Old, - Cur : PBreakPoint; -begin - Old := nil; - Cur := Head; - - while (Cur <> nil) and (Cur <> Bp) do - begin - Old := Cur; - Cur := Cur^.Next; - end; - - if Cur = nil then exit; - - if Old = nil then - Head := Cur^.Next - else - Old^.Next := Cur^.Next; -end; - - - -procedure Toggle_Break( var Head : PBreakPoint; Range, Adr : Int ); -var - Bp : PBreakPoint; -begin - Bp := Find_BreakPoint( Head, Range, Adr ); - if Bp <> nil then Clear_Break( Head, Bp ) - else Set_Break( Head, Range, Adr ); -end; - -(******************************************************************* - * - * Function : Clear_All_Breaks - * - * Description : Clears all breakpoints - * - * Input : - * - * Output : - * - *****************************************************************) - -procedure Clear_All_Breaks( var Head : PBreakPoint ); -var - Old, - Cur : PBreakPoint; -begin - Cur := Head; - Head := Nil; - - while Cur <> nil do - begin - Old := Cur; - Cur := Cur^.Next; - Dispose( Old ); - end; -end; - -(******************************************************************* - * - * Function : Find_BreakPoint - * - * Description : Find a breakpoint at address IP - * - * Input : Head break points sorted linked list - * IP address of expected breakpoint - * - * Output : pointer to breakpoint if found - * nil otherwise. - * - *****************************************************************) - -function Find_BreakPoint( Head : PBreakPoint; Range, IP : Int ) : PBreakPoint; -var - Cur : PBreakPoint; - Res : PBreakPoint; -begin - Cur := Head; - Res := nil; - - while Cur <> nil do - begin - if (Cur^.Address = IP ) and - (Cur^.Range = Range) then Res := Cur; - - if (Cur^.Address >= IP) then Cur := nil - else Cur := Cur^.Next; - end; - - Find_BreakPoint := Res; -end; - -end. Index: xc/extras/FreeType/pascal/lib/tterror.pas diff -u xc/extras/FreeType/pascal/lib/tterror.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/tterror.pas:removed --- xc/extras/FreeType/pascal/lib/tterror.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/tterror.pas Wed Mar 16 20:59:46 2005 @@ -1,69 +0,0 @@ -(******************************************************************* - * - * tterror.pas 1.0 - * - * Simple Error management unit - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -unit TTError; - -interface - -uses FreeType; - - procedure Check_Error( error : Integer ); - - procedure Panic1( message : String ); - procedure Trace1( message : String ); - -(* The Pascal version of the library doesn't support multiple *) -(* threads. We use a global error variable, called simply "error" *) -(* to report all defects. The various functions return an error *) -(* condition, which can be either Success (false) or Failure (true) *) - -(* Note that the use of macros in the C version to automate error *) -(* reporting makes the two source trees very similar, even if they *) -(* differ from some design points like this one *) - -var - error : integer; - -implementation - - - procedure Panic1( message : String ); - begin - writeln( message ); - halt(1); - end; - - - procedure Trace1( message : String ); - begin - writeln( message ); - end; - - - procedure Check_Error( error : Integer ); - var - num : String[4]; - begin - if error <> TT_Err_Ok then - begin - str( -error:3, num ); - Panic1( 'Error code = ' + num ); - end; - end; - -end. - Index: xc/extras/FreeType/pascal/lib/ttfile.pas diff -u xc/extras/FreeType/pascal/lib/ttfile.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttfile.pas:removed --- xc/extras/FreeType/pascal/lib/ttfile.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttfile.pas Wed Mar 16 20:59:46 2005 @@ -1,979 +0,0 @@ -(******************************************************************* - * - * TTFile.Pas 1.2 - * - * File I/O Component (specification) - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : - * - * - * Changes from 1.1 to 1.2 : - * - * - Changes the stream operations semantics. See changes.txt - * - * - stream records are now allocated on demand in the heap - * - * - introduced the 'frame cache' to avoid Allocating/Freeing - * each frame, even tiny ones.. - * - * - support for thread-safety and re-entrancy - * - * ( re-entrancy is there for information only.. ) - * - * Changes from 1.0 to 1.1 : - * - * - defined the type TT_Stream for file handles - * - renamed ( and cleaned ) the API. - * - * - caching and memory-mapped files use the same API : - * - * TT_Access_Frame to notify - * - * - only the interface was really rewritten. This component still - * only supports one opened file at a time. - * - ******************************************************************) - -Unit TTFile; - -interface - -{$I TTCONFIG.INC} - -uses FreeType, - TTTypes, - TTError; - - function TTFile_Init : TError; - procedure TTFile_Done; - - (*********************************************************************) - (* *) - (* Stream Functions *) - (* *) - (*********************************************************************) - - function TT_Open_Stream( name : String; - var stream : TT_Stream ) : TError; - (* Open a file and return a stream handle for it *) - (* should only be used for a new typeface object's main stream *) - - procedure TT_Close_Stream( var stream : TT_Stream ); - (* closes, then discards a stream, when it becomes unuseful *) - (* should only be used for a typeface object's main stream *) - - function TT_Use_Stream( org_stream : TT_Stream; - var stream : TT_Stream ) : TError; - (* notices the component that we're going to use the file *) - (* opened in 'org_stream', and report errors to the 'error' *) - (* variable. the 'stream' variable is untouched, except in *) - (* re-entrant buids. *) - - (* in re-entrant builds, the original file handle is duplicated *) - (* to a new stream which reference is passed to the 'stream' *) - (* variable.. thus, each thread can have its own file cursor to *) - (* access the same file concurrently.. *) - - procedure TT_Flush_Stream( stream : TT_Stream ); - (* closes a stream's font handle. This is useful to save *) - (* system resources. *) - - procedure TT_Done_Stream( stream : TT_Stream ); - (* notice the file component that we don't need to perform *) - (* file ops on the stream 'stream' anymore.. *) - (* *) - (* in re-entrant builds, should also discard the stream *) - - (*********************************************************************) - (* *) - (* File Functions *) - (* *) - (* the following functions perform file operations on the *) - (* currently 'used' stream. In thread-safe builds, only one *) - (* stream can be used at a time. Synchronisation is performed *) - (* through the Use_Stream/Done_Stream functions *) - (* *) - (* Note: *) - (* re-entrant versions of these functions are only available *) - (* in the C source tree. There, a macro is used to add a 'stream' *) - (* parameter to each of these routines.. *) - (* *) - (*********************************************************************) - - function TT_Read_File( var ABuff; ACount : Int ) : TError; - (* Read a chunk of bytes directly from the file *) - - function TT_Seek_File( APos : LongInt ) : TError; - (* Seek a new file position *) - - function TT_Skip_File( ADist : LongInt ) : TError; - (* Skip to a new file position *) - - function TT_Read_At_File( APos : Long; var ABuff; ACount : Int ) : TError; - (* Seek and read a chunk of bytes *) - - function TT_File_Size : Longint; - - function TT_File_Pos : Longint; - - function TT_Stream_Size( stream : TT_Stream ) : longint; - - (*********************************************************************) - (* *) - (* Frame Functions *) - (* *) - (*********************************************************************) - - function TT_Access_Frame( aSize : Int ) : TError; - (* Access the next aSize bytes *) - - function TT_Check_And_Access_Frame( aSize : Int ) : TError; - (* Access the next min(aSize,file_size-file_pos) bytes *) - - function TT_Forget_Frame : TError; - (* Forget the previously cached frame *) - - (* The four following functions should only be used after a *) - (* TT_Access_Frame and before a TT_Forget_Frame *) - - (* They do not provide error handling, intentionnaly, and are much faster *) - (* moreover, they could be converted to MACROS in the C version *) - - function GET_Byte : Byte; - function GET_Char : ShortInt; - function GET_Short : Short; - function GET_UShort : UShort; - function GET_Long : Long; - function GET_ULong : ULong; - function GET_Tag4 : ULong; - -implementation - -uses - TTMemory; - - (* THREADS: TTMutex, *) - -const - frame_cache_size = 2048; - (* we allocate a single block where we'll place all of our frames *) - (* instead of allocating an new block on each access. Note that *) - (* frames that are bigger than this constant are effectively *) - (* allocated in the heap.. *) - -type - PString = ^string; - PFile = ^FILE; - PError = ^TT_Error; - - PStream_Rec = ^TStream_Rec; - TStream_Rec = record - name : PString; (* file pathname *) - open : Boolean; (* is the stream currently opened *) - font : PFILE; (* file handle for opened stream *) - base : Longint; (* base offset for embedding *) - size : Longint; (* size of font in resource *) - posit : Longint; (* current offset for closed streams *) - end; - -var - (* THREADS: File_Mutex : TMutex *) - - font_file : PFile; - cur_stream : PStream_Rec; - - current_frame : PByte; - frame_cursor : Longint; - frame_size : LongInt; - - dummy_error : TT_Error; - - frame_cache : PByte; - - function TT_File_Size : Longint; - begin - TT_File_Size := FileSize( font_file^ ); - end; - - function TT_File_Pos : Longint; - begin - TT_File_Pos := FilePos( font_file^ ); - end; - - function TT_Stream_Size( stream : TT_Stream ) : longint; - var - rec : PStream_Rec; - begin - rec := PStream_Rec(stream); - if rec = nil then - TT_Stream_Size := 0 - else - TT_Stream_Size := rec^.size; - end; - -(******************************************************************* - * - * Function : TTFile_Init - * - * Description : Init the file component - * - * - create a file mutex for thread-safe builds - * - ******************************************************************) - - function TTFile_Init : TError; - begin - (* empty current file *) - font_file := nil; - cur_stream := nil; - - (* empty frame *) - current_frame := nil; - frame_cursor := 0; - frame_size := 0; - - (* create frame cache *) - GetMem( frame_cache, frame_cache_size ); - - TTFile_Init := Success; - end; - -(******************************************************************* - * - * Function : TTFile_Done - * - * Description : Finalize the file component - * - * - destroys the file mutex for thread-safe builds - * - ******************************************************************) - - procedure TTFile_Done; - begin - (* empty current file *) - font_file := nil; - cur_stream := nil; - - (* empty frame *) - current_frame := nil; - frame_cursor := 0; - frame_size := 0; - end; - -(******************************************************************* - * - * Function : Stream_New - * - * Description : allocates a new stream record - * - * Input : stream : the target stream variable - * - * Output : True on sucess. - * - ******************************************************************) - - function Stream_New( pathname : string; - var stream : PStream_Rec ) : TError; - var - font : PFile; - name : PString; - len : Integer; - label - Fail_Memory; - begin - name := nil; - font := nil; - stream := nil; - len := length(pathname)+1; - - (* allocate a new stream_rec in the heap *) - if Alloc( pointer(stream), sizeof(TStream_Rec) ) or - Alloc( pointer(font), sizeof(FILE) ) or - Alloc( pointer(name), len ) then - goto Fail_Memory; - - move( pathname, name^, len ); - - stream^.font := font; - stream^.name := name; - stream^.open := false; - stream^.base := 0; - stream^.size := 0; - stream^.posit := 0; - - Stream_New := Success; - exit; - - Fail_Memory: - Free( pointer(name) ); - Free( pointer(font) ); - Free( pointer(stream) ); - Stream_New := Failure; - end; - -(******************************************************************* - * - * Function : Stream_Activate - * - * Description : activates a stream, if it needs it - * - * Input : stream : the target stream variable - * - * Output : Error condition - * - ******************************************************************) - - function Stream_Activate( stream : PStream_Rec ) : TError; - var - old_filemode : Long; - begin - Stream_Activate := Failure; - if stream = nil then exit; - - with stream^ do - begin - Stream_Activate := Success; - if open then exit; - - old_filemode := System.FileMode; - System.FileMode := 0; - (* read-only mode *) - - Assign( font^, name^ ); - {$I-} - Reset( font^, 1 ); - {$I+} - - System.FileMode := old_filemode; - - if IOResult <> 0 then - begin - error := TT_Err_Could_Not_Open_File; - Stream_Activate := Failure; - exit; - end; - - open := true; - base := 0; - if size = -1 then size := FileSize(font^); - - if posit <> 0 then - Seek( font^, posit ); - end; - end; - -(******************************************************************* - * - * Function : Stream_Deactivate - * - * Description : closes an active stream - * - * Input : stream : the target stream variable - * - * Output : Error condition - * - ******************************************************************) - - function Stream_Deactivate( stream : PStream_Rec ) : TError; - begin - Stream_Deactivate := Failure; - if stream = nil then exit; - - Stream_Deactivate := Success; - if not stream^.open then exit; - - stream^.posit := FilePos( stream^.font^ ); - close( stream^.font^ ); - stream^.open := false; - end; - -(******************************************************************* - * - * Function : Stream_Done - * - * Description : frees an active stream_rec - * - * Input : stream : the target stream variable - * - * Output : True on sucess. - * - * Notes : 'stream' is set to nil on exit.. - * - ******************************************************************) - - function Stream_Done( var stream : PStream_Rec ) : TError; - begin - Stream_Deactivate( stream ); - - Free( pointer(stream^.name) ); - Free( pointer(stream^.font) ); - Free( pointer(stream) ); - - Stream_Done := Success; - end; - -(******************************************************************* - * - * Function : TT_Open_Stream - * - * Description : opens the font file in a new stream - * - * Input : stream : target stream variable - * name : file pathname - * error : the variable that will be used to - * report stream errors - * - * Output : True on sucess. - * - ******************************************************************) - - function TT_Open_Stream( name : String; - var stream : TT_Stream ) : TError; - var - rec : PStream_Rec; - font : PFile; - - old_filemode : Long; - begin - TT_Open_Stream := Failure; - - if Stream_New( name, rec ) or - Stream_Activate( rec ) then - begin - stream.z := nil; - exit; - end; - - cur_stream := rec; - font_file := rec^.font; - stream := TT_Stream(rec); - - TT_Open_Stream := Success; - end; - -(******************************************************************* - * - * Function : TT_Close_Stream - * - * Description : Closes the font file and releases memory buffer - * - * Input : None - * - * Output : True ( always ) - * - ******************************************************************) - - procedure TT_Close_Stream( var stream : TT_Stream ); - begin - if stream.z = nil then exit; - - Stream_Done( PStream_Rec(stream) ); - font_file := nil; - cur_stream := nil; - stream.z := nil; - end; - -(******************************************************************* - * - * Function : TT_Use_Stream - * - * Description : Acquire the file mutex (blocking call) - * - * Input : org_stream : original stream to use - * stream : duplicate stream (in re-entrant builds) - * set to 'org_stream' otherwise - * error : error report variable - * - * Output : True on success. False on failure - * - ******************************************************************) - - function TT_Use_Stream( org_stream : TT_Stream; - var stream : TT_Stream ) : TError; - var - rec : PStream_Rec; - begin - TT_Use_Stream := Failure; - - stream := org_stream; - if org_stream.z = nil then exit; - - rec := PStream_Rec(stream); - Stream_Activate(rec); - cur_stream := rec; - font_file := rec^.font; - - TT_Use_Stream := Success; - end; - -(******************************************************************* - * - * Function : TT_Flush_Stream - * - * Description : closes a stream - * - * Input : stream : the stream - * - * Output : True on success. False on failure - * - ******************************************************************) - - procedure TT_Flush_Stream( stream : TT_Stream ); - begin - if stream.Z <> nil then - Stream_Deactivate( PStream_Rec(stream.z) ); - end; - -(******************************************************************* - * - * Function : TT_Done_Stream - * - * Description : Release the file mutex on a stream - * - * Input : stream : the stream - * - * Output : True on success. False on failure - * - ******************************************************************) - - procedure TT_Done_Stream( stream : TT_Stream ); - begin - if stream.z <> cur_stream then exit; - cur_stream := nil; - font_file := nil; - end; - -(******************************************************************* - * - * Function : TT_Seek_File - * - * Description : Seek the file cursor to a different position - * - * Input : APos new position on file - * - * Output : True on success. False if out of range - * - * Notes : Does not set the error variable - * - ******************************************************************) - -function TT_Seek_File( APos : LongInt ) : TError; -begin - {$I-} - Seek( Font_File^, APos ); - {$I+} - if IOResult <> 0 then - begin - error := TT_Err_Invalid_File_Offset; - TT_Seek_File := Failure; - exit; - end; - - TT_Seek_File := Success; -end; - -(******************************************************************* - * - * Function : TT_Skip_File - * - * Description : Skip forward the file cursor - * - * Input : ADist number of bytes to skip - * - * Output : see Seek_Font_File - * - ******************************************************************) - -function TT_Skip_File( ADist : LongInt ) : TError; -begin - TT_Skip_File := TT_Seek_File( FilePos(Font_File^)+ADist ); -end; - -(******************************************************************* - * - * Function : TT_Read_File - * - * Description : Reads a chunk of the file and copy it to memory - * - * Input : ABuff target buffer - * ACount length in bytes to read - * - * Output : True if success. False if out of range - * - * Notes : Current version prints an error message even if the - * debug state isn't on. - * - ******************************************************************) - -function TT_Read_File( var ABuff; ACount : Int ) : TError; -begin - TT_Read_File := Failure; - {$I-} - BlockRead( Font_File^, ABuff, ACount ); - {$I+} - - if IOResult <> 0 then - begin - error := TT_Err_Invalid_File_Read; - exit; - end; - - TT_Read_File := Success; -end; - -(******************************************************************* - * - * Function : TT_Read_At_File - * - * Description : Read file at a specified position - * - * Input : APos position to seek to before read - * ABuff target buffer - * ACount number of bytes to read - * - * Output : True on success. False if error. - * - * Notes : prints an error message if seek failed. - * - ******************************************************************) - -function TT_Read_At_File( APos : Long; var ABuff; ACount : Int ) : TError; -begin - TT_Read_At_File := Failure; - - if TT_Seek_File( APos ) or - TT_Read_File( ABuff, ACount ) then exit; - - TT_Read_At_File := Success; -end; - -(******************************************************************* - * - * Function : TT_Access_Frame - * - * Description : Notifies the component that we're going to read - * aSize bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : aSize number of bytes to access. - * - * Output : True on success. False on failure - * - * The function fails is the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly ( which usually means that aSize is - * too big in both cases ). - * - * It will also fail if you make two consecutive calls - * to TT_Access_Frame, without a TT_Forget_Frame between - * them. - * - ******************************************************************) - - function TT_Access_Frame( aSize : Int ) : TError; - var - readBytes : Longint; - begin - TT_Access_Frame := Failure; - - if current_frame <> nil then - begin - error := TT_Err_Nested_Frame_Access; - exit; - end; - (* We already are accessing one frame *) - - if aSize > frame_cache_size then - GetMem( current_frame, aSize ) - else - current_frame := frame_cache; - - if TT_Read_File( current_frame^, aSize ) then - begin - if aSize > frame_cache_size then - FreeMem( current_frame, aSize ); - - current_frame := nil; - exit; - end; - - frame_size := aSize; - frame_cursor := 0; - - TT_Access_Frame := Success; - end; - -(******************************************************************* - * - * Function : TT_Check_And_Access_Frame - * - * Description : Notifies the component that we're going to read - * aSize bytes from the current file position. - * This function should load/cache/map these bytes - * so that they will be addressed by the GET_xxx - * functions easily. - * - * Input : aSize number of bytes to access. - * - * Output : True on success. False on failure - * - * The function fails is the byte range is not within the - * the file, or if there is not enough memory to cache - * the bytes properly ( which usually means that aSize is - * too big in both cases ). - * - * It will also fail if you make two consecutive calls - * to TT_Access_Frame, without a TT_Forget_Frame between - * them. - * - * - * NOTE : The only difference with TT_Access_Frame is that we check - * that the frame is within the current file. We otherwise - * truncate it.. - * - ******************************************************************) - - function TT_Check_And_Access_Frame( aSize : Int ) : TError; - var - readBytes : Longint; - begin - TT_Check_And_Access_Frame := Failure; - - if current_frame <> nil then - begin - error := TT_Err_Nested_Frame_Access; - exit; - end; - (* We already are accessing one frame *) - - readBytes := TT_File_Size - TT_File_Pos; - if aSize > readBytes then aSize := readBytes; - - if aSize > frame_cache_size then - GetMem( current_frame, aSize ) - else - current_frame := frame_cache; - - if TT_Read_File( current_frame^, aSize ) then - begin - if aSize > frame_cache_size then - FreeMem( current_frame, aSize ); - exit; - end; - - frame_size := aSize; - frame_cursor := 0; - - TT_Check_And_Access_Frame := Success; - end; - -(******************************************************************* - * - * Function : TT_Forget_Frame - * - * Description : Releases a cached frame after reading - * - * Input : None - * - * Output : True on success. False on failure - * - ******************************************************************) - - function TT_Forget_Frame : TError; - begin - TT_Forget_Frame := Failure; - - if current_frame = nil then exit; - - if frame_size > frame_cache_size then - FreeMem( current_frame, frame_size ); - - frame_size := 0; - current_frame := nil; - frame_cursor := 0; - end; - -(******************************************************************* - * - * Function : GET_Byte - * - * Description : Extracts a byte from the current file frame - * - * Input : None - * - * Output : Extracted Byte. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_Byte : Byte; - begin - GET_Byte := current_frame^[frame_cursor]; - inc( frame_cursor ); - end; - -(******************************************************************* - * - * Function : GET_Char - * - * Description : Extracts a signed byte from the current file frame - * - * Input : None - * - * Output : Extracted char. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_Char : ShortInt; - begin - GET_Char := ShortInt( current_frame^[frame_cursor] ); - inc( frame_cursor ); - end; - -(******************************************************************* - * - * Function : GET_Short - * - * Description : Extracts a short from the current file frame - * - * Input : None - * - * Output : Extracted short. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_Short : Short; - begin - GET_Short := (Short(current_frame^[ frame_cursor ]) shl 8) or - Short(current_frame^[frame_cursor+1]); - inc( frame_cursor, 2 ); - end; - -(******************************************************************* - * - * Function : GET_UShort - * - * Description : Extracts an unsigned short from the frame - * - * Input : None - * - * Output : Extracted ushort. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_UShort : UShort; - begin - GET_UShort := (UShort(current_frame^[ frame_cursor ]) shl 8) or - UShort(current_frame^[frame_cursor+1]); - inc( frame_cursor, 2 ); - end; - -(******************************************************************* - * - * Function : GET_Long - * - * Description : Extracts a long from the frame - * - * Input : None - * - * Output : Extracted long. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_Long : Long; - begin - GET_Long := (Long(current_frame^[ frame_cursor ]) shl 24) or - (Long(current_frame^[frame_cursor+1]) shl 16) or - (Long(current_frame^[frame_cursor+2]) shl 8 ) or - (Long(current_frame^[frame_cursor+3]) ); - inc( frame_cursor, 4 ); - end; - -(******************************************************************* - * - * Function : GET_ULong - * - * Description : Extracts an unsigned long from the frame - * - * Input : None - * - * Output : Extracted ulong. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_ULong : ULong; - begin - GET_ULong := (ULong(current_frame^[ frame_cursor ]) shl 24) or - (ULong(current_frame^[frame_cursor+1]) shl 16) or - (ULong(current_frame^[frame_cursor+2]) shl 8 ) or - (ULong(current_frame^[frame_cursor+3]) ); - inc( frame_cursor, 4 ); - end; - -(******************************************************************* - * - * Function : GET_Tag4 - * - * Description : Extracts a Tag from the frame - * - * Input : None - * - * Output : Extracted 4 byte Tag. - * - * NOTES : We consider that the programmer is intelligent enough - * not to try to get a byte that is out of the frame. Hence, - * we provide no bounds check here. (A misbehaving client - * could easily page fault using this call). - * - ******************************************************************) - - function GET_Tag4 : ULong; - var - C : array[0..3] of Byte; - begin - move ( current_frame^[frame_cursor], c, 4 ); - inc( frame_cursor, 4 ); - - GET_Tag4 := ULong(C); -end; - -end. Index: xc/extras/FreeType/pascal/lib/ttgload.pas diff -u xc/extras/FreeType/pascal/lib/ttgload.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttgload.pas:removed --- xc/extras/FreeType/pascal/lib/ttgload.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttgload.pas Wed Mar 16 20:59:46 2005 @@ -1,1391 +0,0 @@ -(******************************************************************* - * - * ttgload.pas 1.0 - * - * TrueType glyph loader - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -Unit TTGLoad; - -interface - -{$I TTCONFIG.INC} - -uses - FreeType, TTError, TTTypes, TTObjs; - - function Load_TrueType_Glyph( instance : PInstance; - glyph : PGlyph; - glyph_index : Word; - load_flags : Int ) : TError; - (* loads a font glyph into a given glyph info. The instance and *) - (* glyph objects faces _must_ match. The load_flags indicates *) - (* what kind of values should be written to the glyph object *) - (* ( metrics, outline in EM coordinates, grid-fitted outline.. ) *) - (* *) - (* by default ( i.e. with load_flags = 0 ), this function only *) - (* returns the unscaled glyph metrics and points in EM units. *) - (* *) - (* Use the following flags to query scaling and hinting ops. *) - - (********************************************************) - (* return horizontal or vertical metrics in font units *) - (* for a given glyph. The metrics are the left side *) - (* bearing [resp. top side bearing] and advance width *) - (* [resp. advance height]. *) - (* *) - (* This function may move later to another component.. *) - (* *) - procedure TT_Get_Metrics( var header : TT_Horizontal_Header; - index : Int; - var bearing : TT_Pos; - var advance : TT_Pos ); - - function Get_Advance_Widths( face : PFace; - ppem : Int ) : PByte; - -implementation - -uses - TTTables, - TTCalc, - TTMemory, - TTFile, - TTInterp, - TTLoad; - -const - ARGS_ARE_WORDS = $01; - ARGS_ARE_XY_VALUES = $02; - ROUND_XY_TO_GRID = $04; - WE_HAVE_A_SCALE = $08; - (* reserved $10 *) - MORE_COMPONENTS = $20; - WE_HAVE_AN_XY_SCALE = $40; - WE_HAVE_A_2X2 = $80; - WE_HAVE_INSTR = $100; - USE_MY_METRICS = $200; - - - (********************************************************) - (* return horizontal or vertical metrics in font units *) - (* for a given glyph. The metrics are the left side *) - (* bearing [resp. top side bearing] and advance width *) - (* [resp. advance height]. *) - (* *) - (* This function may move later to another component.. *) - (* *) - procedure TT_Get_Metrics( var header : TT_Horizontal_Header; - index : Int; - var bearing : TT_Pos; - var advance : TT_Pos ); - var - k : Int; - longs : PTableLongMetrics; - begin - k := header.number_Of_HMetrics; - - if index < k then - begin - longs := PTableLongMetrics(header.long_metrics); - bearing := longs^[index].bearing; - advance := longs^[index].advance; - end - else - begin - bearing := PTableShortMetrics(header.short_metrics)^[index-k]; - advance := PTableLongMetrics(header.long_metrics)^[k-1].advance; - end; - end; - - - - (********************************************************) - (* return horizontal metrics in font units for a *) - (* given glyph. if "check" is true, take care of *) - (* mono-spaced fonts by returning the aw max. *) - (* *) - procedure Get_HMetrics( face : PFace; - index : Int; - check : Boolean; - var lsb : Int; - var aw : Int ); - var - left_bearing, advance : TT_Pos; - begin - TT_Get_Metrics( face^.horizontalHeader, index, left_bearing, advance ); - - lsb := Int(left_bearing); - aw := Int(advance); - - if check and (face^.postscript.isFixedPitch <> 0) then - aw := face^.horizontalHeader.advance_Width_Max; - end; - - - - (********************************************************) - (* return advance width table for a given pixel size *) - (* if it is found in the font's "hdmx" table (if any) *) - (* *) - function Get_Advance_Widths( face : PFace; - ppem : Int ) : PByte; - var - n : Integer; - begin - with face^.hdmx do - for n := 0 to num_records-1 do - if records^[n].ppem = ppem then - begin - Get_Advance_Widths := records^[n].widths; - exit; - end; - - Get_Advance_Widths := nil; - end; - - (********************************************************) - (* copy current glyph into original one *) - (* *) - procedure cur_to_org( n : int; - pts : PGlyph_Zone ); - var - k : int; - begin - for k := 0 to n-1 do with pts^ do - org^[k] := cur^[k]; - end; - - - (********************************************************) - (* copy original glyph into current one *) - (* *) - procedure org_to_cur( n : int; - pts : PGlyph_Zone ); - var - k : int; - begin - for k := 0 to n-1 do with pts^ do - cur^[k] := org^[k]; - end; - - (********************************************************) - (* translate an array of coordinates *) - (* *) - procedure translate_array( n : int; - coords : TT_Points; - dx, dy : TT_Pos ); - var - k : Int; - begin - if dx <> 0 then - for k := 0 to n-1 do inc( coords^[k].x, dx ); - if dy <> 0 then - for k := 0 to n-1 do inc( coords^[k].y, dy ); - end; - - (********************************************************) - (* mount one zone on top of another one *) - (* *) - procedure mount_zone( var source : TGlyph_Zone; - var target : TGlyph_Zone ); - var - np, nc : Int; - begin - np := source.n_points; - nc := source.n_contours; - - target.org := @source.org^[np]; - target.cur := @source.cur^[np]; - target.flags := @source.flags^[np]; - - target.conEnds := @source.conEnds^[nc]; - - target.n_points := 0; - target.n_contours := 0; - end; - -(******************************************************************* - * - * Function : Load_Simple_Glyph - * - * - ******************************************************************) - - - function Load_Simple_Glyph( exec : PExec_Context; - stream : TT_Stream; - n_contours : Int; - left_contours : Int; - left_points : Int; - load_flags : Int; - subg : PSubGlyph_Record ) : TError; - var - n_points, - n_ins, k : Int; - - c, cnt : Byte; - face : PFace; - coords : TT_Points; - flag : TT_PTouchTable; - x, y : TT_F26dot6; - pts : PGlyph_Zone; - - label - Fail, Fail_File, Fail_Exec; - begin - Load_Simple_Glyph := Failure; - - face := exec^.face; - - (* simple check *) - - if ( n_contours > left_contours ) then - begin - {$IFDEF DEBUG} - Writeln( 'ERROR: Glyph index ',i,' has ',Gl.numberOfContours ); - Writeln( ' contours > left ', left_contours ); - {$ENDIF} - error := TT_Err_Too_Many_Contours; - goto Fail; - end; - - (* preparing the execution context *) - mount_zone( subg^.zone, exec^.pts ); - - (* Reading the contours endpoints *) - - if TT_Access_Frame( (n_contours+1)*2 ) then - goto Fail_File; - - n_points := 0; - - for k := 0 to n_contours-1 do - begin - {$IFDEF DEBUG} Write( n_points,' '); {$ENDIF} - n_points := GET_Short; - exec^.pts.conEnds^[k] := n_points; - inc( n_points ); - end; - - if n_points > left_points then - begin - {$IFDEF DEBUG} Writeln( 'ERROR: Too many points' ); {$ENDIF} - error := TT_Err_Too_Many_Points; - goto Fail; - end; - - (* Loading instructions *) - - n_ins := GET_Short; - - TT_Forget_Frame; - -{ - if not subg^.is_hinted then - - if TT_Skip_File( n_ins ) then - goto Fail_File - else - (* skip the instructions *) - - else } - begin - - {$IFDEF DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF} - - if n_ins > face^.maxProfile.maxSizeOfInstructions then - begin - {$IFDEF DEBUG} Writeln('Too many instructions'); {$ENDIF} - error := TT_Err_Too_Many_Ins; - goto Fail; - end; - - with exec^ do - begin - if TT_Read_File( glyphIns^, n_ins ) then - goto Fail_File; - - glyphSize := n_ins; - - if Set_CodeRange( exec, - TT_CodeRange_Glyph, - glyphIns, - glyphSize ) then - goto Fail_Exec; - end - end; - - (* read the flags *) - - if TT_Check_And_Access_Frame( n_points*5 ) - then goto Fail; - - k := 0; - flag := exec^.pts.flags; - - while ( k < n_points ) do - begin - c := GET_Byte; - flag^[k] := c; - inc(k); - - if c and 8 <> 0 then - begin - cnt := GET_Byte; - - while ( cnt > 0 ) do - begin - flag^[k] := c; - inc( k ); - dec( cnt ); - end - end - end; - - (* Read the X *) - - x := 0; - coords := exec^.pts.org; - - for k := 0 to n_points-1 do - begin - if flag^[k] and 2 <> 0 then - - if flag^[k] and 16 <> 0 then inc( x, GET_Byte ) - else inc( x, -GET_Byte ) - else - if flag^[k] and 16 = 0 then inc( x, GET_Short ); - - coords^[k].x := x; - end; - - (* Read the Y *) - - y := 0; - - for k := 0 to n_points-1 do - begin - if flag^[k] and 4 <> 0 then - - if flag^[k] and 32 <> 0 then inc( y, GET_Byte ) - else inc( y, -GET_Byte ) - else - if flag^[k] and 32 = 0 then inc( y, GET_Short ); - - coords^[k].y := y; - end; - - TT_Forget_Frame; - - (* Now adds the two shadow points at n and n+1 *) - (* We need the left side bearing and advance width *) - - (* pp1 = xMin - lsb == glyph origin *) - coords^[n_points].x := subg^.bbox.XMin-subg^.leftBearing; - coords^[n_points].y := 0; - - (* pp2 = pp1 + aw == glyph next position *) - coords^[n_points+1].x := subg^.bbox.xMin- - subg^.leftBearing + subg^.advanceWidth; - coords^[n_points+1].y := 0; - - for k := 0 to n_points-1 do - exec^.pts.flags^[k] := exec^.pts.flags^[k] and TT_Flag_On_Curve; - - exec^.pts.flags^[n_points ] := 0; - exec^.pts.flags^[n_points+1] := 0; - - (* Note that we now return two more points, that are not *) - (* part of the glyph outline *) - inc( n_points, 2 ); - - (* now eventually scale and hint the glyph *) - - pts := @exec^.pts; - pts^.n_points := n_points; - - exec^.pts.n_contours := n_contours; - - if load_flags and TT_Load_Scale_Glyph = 0 then - begin - (* no scaling, just copy the org arrays into the cur ones *) - org_to_cur( n_points, pts ); - end - else - begin - - (* first scale the glyph points *) - for k := 0 to n_points-1 do with pts^ do - org^[k].x := Scale_X( exec^.metrics, org^[k].x ); - - for k := 0 to n_points-1 do with pts^ do - org^[k].y := Scale_Y( exec^.metrics, org^[k].y ); - - (* if hinting, round pp1, and shift the glyph accordingly *) - if subg^.is_hinted then - begin - x := pts^.org^[n_points-2].x; - x := ((x+32) and -64) - x; - translate_array( n_points, pts^.org, x, 0 ); - - org_to_cur( n_points, pts ); - - (* set the advance width *) - (* - x := (Scale_X( exec^.metrics, subg^.advanceWidth )+32) and -64; - with pts^ do - cur_x^[n_points-1] := cur_x^[n_points-2]+x; - *) - with pts^ do - cur^[n_points-1].x := (cur^[n_points-1].x+32) and -64; - - (* now consider hinting *) - if (exec^.glyphSize > 0) then - begin - exec^.is_composite := False; - - if Context_Run( exec, load_flags and TT_Load_Debug <> 0 ) then - goto Fail_Exec; - end; - end - else - org_to_cur( n_points, pts ); - end; - - (* save glyph origin and advance points *) - if not subg^.preserve_pps then - begin - subg^.pp1 := pts^.cur^[n_points-2]; - subg^.pp2 := pts^.cur^[n_points-1]; - end; - - Load_Simple_Glyph := Success; - - Fail: - exit; - - Fail_File: - error := TT_Err_File_Error; - exit; - - Fail_Exec: - error := exec^.error; - exit; - end; - -(******************************************************************* - * - * Function : Load_Composite_End - * - * - ******************************************************************) - - function Load_Composite_End( n_points : Int; - n_contours : Int; - exec : PExec_Context; - subg : PSubglyph_Record; - debug : Boolean ) : TError; - var - pts : PGlyph_Zone; - n_ins : Int; - k : Int; - phant1, - phant2, - x, y : TT_Pos; - widths : PByte; - - label - Fail, Fail_File, Fail_Exec; - begin - Load_Composite_End := Failure; - - if subg^.is_hinted and - (subg^.element_flag and WE_HAVE_INSTR <> 0) then - begin - if TT_Access_Frame(2) then goto Fail_File; - n_ins := Get_UShort; - TT_Forget_Frame; - - (* load the instructions *) - {$IFDEF DEBUG} Writeln('Instructions size : ', n_ins); {$ENDIF} - - if n_ins > exec^.face^.maxProfile.maxSizeOfInstructions then - begin - {$IFDEF DEBUG} Writeln('Too many instructions'); {$ENDIF} - error := TT_Err_Too_Many_Ins; - goto Fail; - end; - end - else - n_ins := 0; - - if n_ins > 0 then with exec^ do - begin - if TT_Read_File( glyphIns^, n_ins ) then - goto Fail_File; - - glyphSize := n_ins; - - if Set_CodeRange( exec, - TT_CodeRange_Glyph, - glyphIns, - glyphSize ) then goto Fail_File; - end; - - (* prepare the execution context *) - inc( n_points, 2 ); - - exec^.pts := subg^.zone; - pts := @exec^.pts; - pts^.n_points := n_points; - - (* add phantom points *) - with pts^ do - begin - cur^[n_points-2] := subg^.pp1; - cur^[n_points-1] := subg^.pp2; - flags^[n_points-2] := 0; - flags^[n_points-1] := 0; - end; - - (* if hinting, round the phantom points *) - if subg^.is_hinted then - begin - y := ((subg^.pp1.x+32) and -64); - pts^.cur^[n_points-2].y := y; - - x := ((subg^.pp2.x+32) and -64); - pts^.cur^[n_points-1].x := x; - end; - - for k := 0 to n_points-1 do - pts^.flags^[k] := pts^.flags^[k] and TT_Flag_On_Curve; - - cur_to_org( n_points, pts ); - - (* now consider hinting *) - if subg^.is_hinted and (n_ins > 0) then - begin - exec^.is_composite := true; - - if Context_Run( exec, debug ) then - goto Fail_Exec; - end; - - (* save glyph origin and advance points *) - subg^.pp1 := pts^.cur^[n_points-2]; - subg^.pp2 := pts^.cur^[n_points-1]; - - Load_Composite_End := Success; - error := TT_Err_Ok; - - Fail: - exit; - - Fail_File: - error := TT_Err_File_Error; - goto Fail; - - Fail_Exec: - error := exec^.error; - goto Fail; - - end; - - -(******************************************************************* - * - * Function : Init_Glyph_Component - * - * - ******************************************************************) - - - procedure Init_Glyph_Component( element : PSubGlyph_Record; - original : PSubGlyph_Record; - exec : PExec_Context ); - var - n: Int; - begin - with element^ do - begin - index := -1; - is_scaled := false; - is_hinted := false; - - if original <> nil then - mount_zone( original^.zone, zone ) - else - zone := exec^.pts; - - zone.n_contours := 0; - zone.n_points := 0; - - arg1 := 0; - arg2 := 0; - - element_flag := 0; - preserve_pps := false; - - transform.xx := 1 shl 16; - transform.xy := 0; - transform.yx := 0; - transform.yy := 1 shl 16; - - transform.ox := 0; - transform.oy := 0; - - leftBearing := 0; - advanceWidth := 0; - end; - end; - - - function Load_TrueType_Glyph( instance : PInstance; - glyph : PGlyph; - glyph_index : Word; - load_flags : Int ) : TError; - type - TPhases = ( Load_Exit, - Load_Glyph, - Load_Simple, - Load_Composite, - Load_End ); - (* the composite loader is a simple automata wich states *) - (* are defined by the TPhases enumeration *) - - var - face : PFace; - - num_points : Int; - num_contours : Int; - left_points : Int; - left_contours : Int; - - table, - num_ins, - index, - load_top : Int; - - new_flags, k, l : Int; - - glyph_offset, offset : Long; - - c : Byte; - - vec, nvec : TT_Vector; - - xmin, xmax, ymin, ymax : TT_F26Dot6; - - xx, xy, yx, yy : TT_Fixed; - - exec : PExec_Context; - stream : TT_Stream; - - subglyph, subglyph2 : PSubGlyph_Record; - - base_pts : TGlyph_Zone; - - phase : TPhases; - - debug : Boolean; - - leftSideBearing : TT_Pos; - advanceWidth : TT_Pos; - - top_bearing : TT_Pos; - advance_height : TT_Pos; - - error : TT_Error; - delta : Long; - widths : PByte; - horizontal : TT_Horizontal_Header; - label - Fin, - Fail, - Fail_File, - Fail_Handle, - Fail_Index; - - begin - - Load_TrueType_Glyph := Failure; - - (* check handle *) - - if (instance = nil) or (instance^.owner = nil) then - begin - error := TT_Err_Invalid_Face_Handle; - exit; - end; - - face := instance^.owner; - - table := LookUp_TrueType_Table( face, 'glyf'); - if table < 0 then - begin - {$IFDEF DEBUG} - Trace1( 'TTApi.load_glyph : couldn''t find glyf table' ); - {$ENDIF} - error := TT_Err_Table_Missing; - exit; - end; - - glyph_offset := face^.dirTables^[table].Offset; - - (* query new execution context *) - - if instance^.debug then - exec := instance^.context (* if debugging, use the pre-alloced context *) - else - exec := New_Context(instance); - - if exec = nil then - begin - error := TT_Err_Out_Of_Memory; - exit; - end; - - Context_Load( exec, instance ); - if instance^.GS.instruct_control and 2 <> 0 then - exec^.GS := Default_GraphicsState - else - exec^.GS := instance^.GS; - - glyph^.outline.high_precision := ( instance^.metrics.y_ppem < 24 ); - - glyph^.is_composite := false; - - (* save its critical pointers that will be modified *) - (* during load *) - - base_pts := exec^.pts; - - (* init variables *) - - left_points := face^.maxPoints; - left_contours := face^.maxContours; - - num_points := 0; - num_contours := 0; - - load_top := 0; - subglyph := @exec^.loadStack^[0]; - - Init_Glyph_Component( subglyph, nil, exec ); - - subglyph^.index := glyph_index; - subglyph^.is_hinted := load_flags and TT_Load_Hint_Glyph <> 0; - - if instance^.GS.instruct_control and 1 <> 0 then - subglyph^.is_hinted := False; - - (* now access stream *) - - if TT_Use_Stream( face^.stream, stream ) then - goto Fin; - - (* Main Loading Loop *) - - phase := Load_Glyph; - - while phase <> Load_Exit do - begin - - subglyph := @exec^.loadStack^[load_top]; - - case phase of - - (************************************************************) - (* *) - (* Load_Glyph state *) - (* *) - (* reading a glyph's generic header to determine *) - (* wether it's simple or composite *) - (* *) - (* exit states : Load_Simple and Load_Composite *) - (* *) - - Load_Glyph: - begin - (* check glyph index and table *) - - index := subglyph^.index; - if (index < 0) or (index >= face^.numGlyphs) then - begin - error := TT_Err_Invalid_Glyph_Index; - goto Fail; - end; - - (* load glyph metrics *) - Get_HMetrics( face, index, true, - subglyph^.leftBearing, - subglyph^.advanceWidth ); - - (* load glyph *) - if (index+1 < face^.numLocations) and - (face^.glyphLocations^[index] = face^.glyphLocations^[index+1]) then - begin - - (* as noticed by Frederic Loyer, these are spaces, not *) - (* the 'unknown' glyph *) - num_points := 0; - num_contours := 0; - - subglyph^.bbox.xMin := 0; - subglyph^.bbox.xMax := 0; - subglyph^.bbox.yMin := 0; - subglyph^.bbox.yMax := 0; - - subglyph^.pp1.x := 0; - subglyph^.pp2.x := subglyph^.advanceWidth; - if load_flags and TT_LOAD_Scale_Glyph <> 0 then - subglyph^.pp2.x := Scale_X( exec^.metrics, subglyph^.pp2.x ); - - exec^.glyphSize := 0; - phase := Load_End; - end - else - begin - offset := glyph_offset + face^.glyphLocations^[index]; - - (* read first glyph header *) - - if TT_Seek_File( offset ) or - TT_Access_Frame( 5*sizeof(Short) ) then - goto Fail_File; - - num_contours := GET_Short; - subglyph^.bbox.xMin := GET_Short; - subglyph^.bbox.yMin := GET_Short; - subglyph^.bbox.xMax := GET_Short; - subglyph^.bbox.yMax := GET_Short; - - TT_Forget_Frame; - - {$IFDEF DEBUG} - Writeln('Glyph ', i ); - - Writeln(' # of Contours : ',num_contours ); - Writeln(' xMin : ',subglyph^.xMin:4,' xMax : ',subglyph^.xMax); - Writeln(' yMin : ',subglyph^.yMin:4,' yMax : ',subglyph^.yMax); - Writeln('-'); - {$ENDIF} - - if num_contours > left_contours then - begin - {$IFDEF DEBUG} - Writeln( 'ERROR: Glyph index ', i, ' has ', num_contours ); - Writeln(' contours > left ', left_contours ); - {$ENDIF} - error := TT_Err_Too_Many_Contours; - goto Fail; - end; - - with subglyph^ do - begin - pp1.x := bbox.xMin - leftBearing; - pp1.y := 0; - pp2.x := pp1.x + advanceWidth; - pp2.y := 0; - - if load_flags and TT_Load_Scale_Glyph <> 0 then - begin - pp1.x := Scale_X( exec^.metrics, pp1.x ); - pp2.x := Scale_X( exec^.metrics, pp2.x ); - end; - end; - - (* is it a simple glyph ? *) - if num_contours >= 0 then - phase := Load_Simple - else - phase := Load_Composite; - - end - end; - - (************************************************************) - (* *) - (* Load_Simple state *) - (* *) - (* reading a simple glyph (num_contours must be set to *) - (* the glyph's number of contours..) *) - (* *) - (* exit states : Load_End *) - (* *) - - Load_Simple : - begin - new_flags := load_flags; - - if not subglyph^.is_hinted then - new_flags := new_flags and not TT_Load_Hint_Glyph; - (* disable hinting when scaling *) - - if new_flags and TT_Load_Debug <> 0 then - if load_top > 0 then - new_flags := new_flags and not TT_Load_Debug; - - if Load_Simple_Glyph( - exec, - stream, - num_contours, - left_contours, - left_points, - new_flags, - subglyph ) then - goto Fail; - - num_points := exec^.pts.n_points-2; - - phase := Load_End; - end; - - (************************************************************) - (* *) - (* Load_Composite state *) - (* *) - (* reading a composite glyph header a pushing a new *) - (* load element on the stack.. *) - (* *) - (* exit states : Load_Glyph *) - (* *) - - Load_Composite : - begin - - glyph^.is_composite := true; - - (* create a new element *) - - inc( load_top ); - - if load_top > face^.maxComponents then - begin - error := TT_Err_Invalid_Composite; - goto Fail; - end; - - subglyph2 := @exec^.loadStack^[load_top]; - - Init_Glyph_Component( subglyph2, subglyph, nil ); - - subglyph2^.index := -1; - subglyph2^.is_hinted := subglyph^.is_hinted; - - (* now read composite header *) - - if TT_Access_Frame( 4 ) then - goto Fail_File; - - new_flags := Get_UShort; - - subglyph^.element_flag := new_flags; - subglyph2^.index := Get_UShort; - - TT_Forget_Frame; - - k := 2; - - if new_flags and ARGS_ARE_WORDS <> 0 then - inc( k, 2 ); - - if new_flags and WE_HAVE_A_SCALE <> 0 then - inc( k, 2 ); - - if new_flags and WE_HAVE_AN_XY_SCALE <> 0 then - inc( k, 4 ); - - if new_flags and WE_HAVE_A_2X2 <> 0 then - inc( k, 8 ); - - if TT_Access_Frame( k ) then - goto Fail_File; - - if new_flags and ARGS_ARE_WORDS <> 0 then - begin - k := Get_Short; - l := Get_Short; - end - else - begin - k := Get_Byte; - l := Get_Byte; - end; - - subglyph^.arg1 := k; - subglyph^.arg2 := l; - - if new_flags and ARGS_ARE_XY_VALUES <> 0 then - begin - subglyph^.transform.ox := k; - subglyph^.transform.oy := l; - end; - - xx := 1 shl 16; - xy := 0; - yx := 0; - yy := 1 shl 16; - - if new_flags and WE_HAVE_A_SCALE <> 0 then - begin - xx := Long(Get_Short) shl 2; - yy := xx; - - subglyph2^.is_scaled := true; - end - else if new_flags and WE_HAVE_AN_XY_SCALE <> 0 then - begin - xx := Long(Get_Short) shl 2; - yy := Long(Get_Short) shl 2; - - subglyph2^.is_scaled := true; - end - else if new_flags and WE_HAVE_A_2X2 <> 0 then - begin - xx := Long(Get_Short) shl 2; - xy := Long(Get_Short) shl 2; - yx := Long(Get_Short) shl 2; - yy := Long(Get_Short) shl 2; - - subglyph2^.is_scaled := true; - end; - - subglyph^.transform.xx := xx; - subglyph^.transform.xy := xy; - subglyph^.transform.yx := yx; - subglyph^.transform.yy := yy; - - delta := MulDiv_Round( xx, yy, 1 shl 16 ) - - MulDiv_Round( xy, yx, 1 shl 16 ); - - if abs(delta) <> 1 shl 16 then - subglyph2^.is_hinted := false; - - TT_Forget_Frame; - - subglyph^.file_offset := TT_File_Pos; - - phase := Load_Glyph; - end; - - (************************************************************) - (* *) - (* Load_End state *) - (* *) - (* after loading a glyph, apply transform and offset *) - (* where necessary, pops element and continue or *) - (* stop process.. *) - (* *) - (* exit states : Load_Composite and Load_Exit *) - (* *) - - Load_End : - if load_top > 0 then - begin - - subglyph2 := subglyph; - - dec( load_top ); - subglyph := @exec^.loadStack^[load_top]; - - (* check advance width and left side bearing *) - - if not subglyph^.preserve_pps and - (subglyph^.element_flag and USE_MY_METRICS <> 0) then - begin - - subglyph^.leftBearing := subglyph2^.leftBearing; - subglyph^.advanceWidth := subglyph2^.advanceWidth; - - subglyph^.pp1 := subglyph2^.pp1; - subglyph^.pp2 := subglyph2^.pp2; - - subglyph^.preserve_pps := true; - end; - - (* apply scale/symmetry/rotation/wathever *) - - for k := 0 to num_points-1 do with subglyph^ do - begin - vec := subglyph2^.zone.cur^[k]; - - nvec.x := MulDiv_Round( vec.x, transform.xx, 1 shl 16 ) + - MulDiv_Round( vec.y, transform.yx, 1 shl 16 ); - - nvec.y := MulDiv_Round( vec.x, transform.xy, 1 shl 16 ) + - MulDiv_Round( vec.y, transform.yy, 1 shl 16 ); - - subglyph2^.zone.cur^[k] := nvec; - - vec := subglyph2^.zone.org^[k]; - - nvec.x := MulDiv_Round( vec.x, transform.xx, 1 shl 16 ) + - MulDiv_Round( vec.y, transform.yx, 1 shl 16 ); - - nvec.y := MulDiv_Round( vec.x, transform.xy, 1 shl 16 ) + - MulDiv_Round( vec.y, transform.yy, 1 shl 16 ); - - subglyph2^.zone.org^[k] := nvec; - end; - - (* adjust counts *) - for k := 0 to num_contours-1 do - inc( subglyph2^.zone.conEnds^[k], subglyph^.zone.n_points ); - - inc( subglyph^.zone.n_points, num_points ); - inc( subglyph^.zone.n_contours, num_contours ); - - dec( left_points, num_points ); - dec( left_contours, num_contours ); - - (* apply offset *) - - if subglyph^.element_flag and ARGS_ARE_XY_VALUES = 0 then - begin - k := subglyph^.arg1; - l := subglyph^.arg2; - - if (k < 0) or (k >= subglyph^.zone.n_points ) or - (l < 0) or (l >= num_points) then - begin - error := TT_Err_Invalid_Composite; - goto Fail; - end; - - inc( l, subglyph^.zone.n_points ); - - vec.x := subglyph^.zone.cur^[k].x - - subglyph^.zone.cur^[l].x; - - vec.y := subglyph^.zone.cur^[k].y - - subglyph^.zone.cur^[l].y; - end - else - begin - vec.x := subglyph^.transform.ox; - vec.y := subglyph^.transform.oy; - - if load_flags and TT_Load_Scale_Glyph <> 0 then - begin - vec.x := Scale_X( exec^.metrics, vec.x ); - vec.y := Scale_Y( exec^.metrics, vec.y ); - - if subglyph^.element_flag and ROUND_XY_TO_GRID <> 0 then - begin - vec.x := (vec.x+32) and -64; - vec.y := (vec.y+32) and -64; - end; - end - end; - - translate_array( num_points, subglyph2^.zone.cur, vec.x, vec.y ); - - cur_to_org( num_points, @subglyph2^.zone ); - - num_points := subglyph^.zone.n_points; - num_contours := subglyph^.zone.n_contours; - - (* check for last component *) - - if TT_Seek_File( subglyph^.file_offset ) then - goto Fail_File; - - if subglyph^.element_flag and MORE_COMPONENTS <> 0 then - phase := Load_Composite - else - begin - debug := ( load_top = 0 ) and - ( load_flags and TT_Load_Debug <> 0 ); - - if Load_Composite_End( num_points, - num_contours, - exec, - subglyph, - debug ) then goto Fail; - phase := Load_End; - end; - - end - else - phase := Load_Exit; - - end; - end; - - (* finally, copy the points arrays to the glyph object *) - - exec^.pts := base_pts; - - (* copy also the phantom points, the debugger needs them *) - inc( num_points, 2 ); - - for k := 0 to num_points-1 do with glyph^.outline do - begin - points^[k] := exec^.pts.cur^[k]; - flags ^[k] := exec^.pts.flags^[k]; - end; - - for k := 0 to num_contours-1 do with glyph^.outline do - conEnds^[k] := exec^.pts.conEnds^[k]; - - glyph^.outline.n_points := num_points; - glyph^.outline.n_contours := num_contours; - glyph^.outline.second_pass := true; - - TT_Get_Outline_BBox( glyph^.outline, glyph^.metrics.bbox ); - - glyph^.metrics.horiBearingX := glyph^.metrics.bbox.xMin - subglyph^.pp1.x; - glyph^.metrics.horiBearingY := glyph^.metrics.bbox.yMax; - glyph^.metrics.horiAdvance := subglyph^.pp2.x - subglyph^.pp1.x; - - glyph^.computed_width := glyph^.metrics.horiAdvance; - glyph^.precalc_width := -1; - - (* Now take care of vertical metrics. In the case where there is *) - (* no vertical information within the font (which is relatively *) - (* common), make up some metrics "by hand".. *) - (* *) - - begin - (* get the unscaled "tsb" and "ah" *) - (* don't assume that both the vertical header and metrics are *) - (* present in a font file... *) - if face^.verticalInfo and - ( face^.verticalHeader.number_Of_VMetrics > 0 ) then - begin - (* apparently, the following line isn't accepted by the FreePascal *) - (* compiler. It complains because the typecast occurs on a 'var' *) - (* parameter. Don't know if this is compiler bug or not, but I *) - (* changed the code with some stupid copy trick.. *) - (* *) - (* TT_Get_Metrics( TT_Horizontal_Header(face^.verticalHeader), *) - (* glyph_index, *) - (* top_bearing, *) - (* advance_height ); *) - (* *) - horizontal := TT_Horizontal_Header(face^.verticalHeader); - TT_Get_Metrics( horizontal, - glyph_index, - top_bearing, - advance_height ); - end - else - begin - (* Make up the distances from the horizontal header.. *) - (* *) - (* The typographic values are the only portable ones, which *) - (* is why we use them.. *) - (* *) - (* The sTypoDescender field is always negative, unlike the *) - (* Windows Descender.. *) - (* *) - with face^.os2 do - begin - top_bearing := sTypoLineGap div 2; - advance_height := sTypoAscender - sTypoDescender + sTypoLineGap; - end; - - end; - - (* now scale the metrics *) - if load_flags and TT_Load_Scale_Glyph <> 0 then - begin - top_bearing := Scale_Y( exec^.metrics, top_bearing ); - advance_height := Scale_Y( exec^.metrics, advance_height ); - end; - - with glyph^.metrics do - begin - vertBearingX := ( bbox.xMin - bbox.xMax ) div 2; - vertBearingY := top_bearing; - vertAdvance := advance_height; - - if load_flags and TT_Load_Hint_Glyph <> 0 then - begin - vertBearingX := vertBearingX and -64; - vertBearingY := (vertBearingY + 63) and -64; - vertAdvance := (vertAdvance+32) and -64; - end; - end; - - end; - - (* use hdmx table to adjust advance width as necessary *) - if load_flags and TT_Load_Default = TT_Load_Default then - begin - widths := Get_Advance_Widths( exec^.face, - exec^.instance^.metrics.x_ppem ); - if widths <> nil then - begin - glyph^.metrics.horiAdvance := widths^[glyph_index]*64; - glyph^.precalc_width := glyph^.metrics.horiAdvance; - end; - end; - - (* in case of hinting, shift the glyph so that (0,0) corresponds *) - (* to the glyph origin. *) - if subglyph^.is_hinted then - begin - glyph^.metrics.horiBearingX := (glyph^.metrics.bbox.xMin and -64) - - subglyph^.pp1.x; - - glyph^.metrics.horiAdvance := (glyph^.metrics.horiAdvance+32) and -64; - glyph^.computed_width := (glyph^.computed_width+32) and -64; - - translate_array( num_points, - glyph^.outline.points, - -subglyph^.pp1.x, - 0 ); - end; - - glyph^.outline.dropout_mode := exec^.GS.scan_type; - - Load_TrueType_Glyph := Success; - - Fail: - TT_Done_Stream( stream ); - - Fin: - - (* reset the execution context *) - exec^.pts := base_pts; - - if instance^.debug then - begin - exec^.pts.n_points := num_points; - exec^.pts.n_contours := num_contours; - end - else - Done_Context( exec); - - exit; - - Fail_File: - error := TT_Err_File_Error; - goto Fail; - - Fail_Handle: - error := TT_Err_Invalid_Instance_Handle; - exit; - - Fail_Index: - error := TT_Err_Invalid_Glyph_Index; - exit; - - end; - - -end. Index: xc/extras/FreeType/pascal/lib/ttinterp.pas diff -u xc/extras/FreeType/pascal/lib/ttinterp.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttinterp.pas:removed --- xc/extras/FreeType/pascal/lib/ttinterp.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttinterp.pas Wed Mar 16 20:59:46 2005 @@ -1,4797 +0,0 @@ -(******************************************************************* - * - * TTInterp.pas 2.0 - * - * TrueType bytecode intepreter. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Changes between 2.0 and 1.2 : - * - * - Lots, lots, of changes : This version is not re-entrant, - * but much faster. - * - * - ******************************************************************) - -unit TTInterp; - -interface - -uses FreeType, - TTTypes, - TTObjs; - - function Run_Ins( exec : PExec_Context ) : Boolean; - (* Run the interpreter with the current code range and IP *) - -implementation -uses - TTError, - TTMemory, - TTCalc; - -type - TInstruction_Function = procedure( args : PStorage ); - -const - Null_Vector : TT_Vector = (x:0;y:0); - -var - exc : TExec_Context; (* static variable *) - -const - - (*********************************************************************) - (* *) - (* Before an opcode is executed, the interpreter verifies that *) - (* there are enough arguments on the stack, with the help of *) - (* the Pop_Push_Count table. *) - (* *) - (* Note that for opcodes with a varying numbre of parameters, *) - (* either 0 or 1 arg is verified before execution, depending *) - (* on the nature of the instruction : *) - (* *) - (* - if the number of arguments is given by the bytecode *) - (* stream or the loop variable, 0 is chosen. *) - (* *) - (* - if the first argument is a count n that is followed *) - (* by arguments a1..an, then 1 is chosen. *) - (* *) - (*********************************************************************) - - Pop_Push_Count : array[0..511] of byte - = ( - (* SVTCA y *) 0, 0, - (* SVTCA x *) 0, 0, - (* SPvTCA y *) 0, 0, - (* SPvTCA x *) 0, 0, - (* SFvTCA y *) 0, 0, - (* SFvTCA x *) 0, 0, - (* SPvTL // *) 2, 0, - (* SPvTL + *) 2, 0, - (* SFvTL // *) 2, 0, - (* SFvTL + *) 2, 0, - (* SPvFS *) 2, 0, - (* SFvFS *) 2, 0, - (* GPV *) 0, 2, - (* GFV *) 0, 2, - (* SFvTPv *) 0, 0, - (* ISECT *) 5, 0, - - (* SRP0 *) 1, 0, - (* SRP1 *) 1, 0, - (* SRP2 *) 1, 0, - (* SZP0 *) 1, 0, - (* SZP1 *) 1, 0, - (* SZP2 *) 1, 0, - (* SZPS *) 1, 0, - (* SLOOP *) 1, 0, - (* RTG *) 0, 0, - (* RTHG *) 0, 0, - (* SMD *) 1, 0, - (* ELSE *) 0, 0, - (* JMPR *) 1, 0, - (* SCvTCi *) 1, 0, - (* SSwCi *) 1, 0, - (* SSW *) 1, 0, - - (* DUP *) 1, 2, - (* POP *) 1, 0, - (* CLEAR *) 0, 0, - (* SWAP *) 2, 2, - (* DEPTH *) 0, 1, - (* CINDEX *) 1, 1, - (* MINDEX *) 1, 0, (* first arg *) - (* AlignPTS *) 2, 0, - (* INS_$28 *) 0, 0, - (* UTP *) 1, 0, - (* LOOPCALL *) 2, 0, - (* CALL *) 1, 0, - (* FDEF *) 1, 0, - (* ENDF *) 0, 0, - (* MDAP[0] *) 1, 0, - (* MDAP[1] *) 1, 0, - - (* IUP[0] *) 0, 0, - (* IUP[1] *) 0, 0, - (* SHP[0] *) 0, 0, (* no args *) - (* SHP[1] *) 0, 0, (* no args *) - (* SHC[0] *) 1, 0, - (* SHC[1] *) 1, 0, - (* SHZ[0] *) 1, 0, - (* SHZ[1] *) 1, 0, - (* SHPIX *) 1, 0, (* first arg *) - (* IP *) 0, 0, (* no args *) - (* MSIRP[0] *) 2, 0, - (* MSIRP[1] *) 2, 0, - (* AlignRP *) 0, 0, (* no args *) - (* RTDG *) 0, 0, - (* MIAP[0] *) 2, 0, - (* MIAP[1] *) 2, 0, - - (* NPushB *) 0, 0, - (* NPushW *) 0, 0, - (* WS *) 2, 0, - (* RS *) 1, 1, - (* WCvtP *) 2, 0, - (* RCvt *) 1, 1, - (* GC[0] *) 1, 1, - (* GC[1] *) 1, 1, - (* SCFS *) 2, 0, - (* MD[0] *) 2, 1, - (* MD[1] *) 2, 1, - (* MPPEM *) 0, 1, - (* MPS *) 0, 1, - (* FlipON *) 0, 0, - (* FlipOFF *) 0, 0, - (* DEBUG *) 1, 0, - - (* LT *) 2, 1, - (* LTEQ *) 2, 1, - (* GT *) 2, 1, - (* GTEQ *) 2, 1, - (* EQ *) 2, 1, - (* NEQ *) 2, 1, - (* ODD *) 1, 1, - (* EVEN *) 1, 1, - (* IF *) 1, 0, - (* EIF *) 0, 0, - (* AND *) 2, 1, - (* OR *) 2, 1, - (* NOT *) 1, 1, - (* DeltaP1 *) 1, 0, (* first arg *) - (* SDB *) 1, 0, - (* SDS *) 1, 0, - - (* ADD *) 2, 1, - (* SUB *) 2, 1, - (* DIV *) 2, 1, - (* MUL *) 2, 1, - (* ABS *) 1, 1, - (* NEG *) 1, 1, - (* FLOOR *) 1, 1, - (* CEILING *) 1, 1, - (* ROUND[0] *) 1, 1, - (* ROUND[1] *) 1, 1, - (* ROUND[2] *) 1, 1, - (* ROUND[3] *) 1, 1, - (* NROUND[0]*) 1, 1, - (* NROUND[1]*) 1, 1, - (* NROUND[2]*) 1, 1, - (* NROUND[3]*) 1, 1, - - (* WCvtF *) 2, 0, - (* DeltaP2 *) 1, 0, (* first arg *) - (* DeltaP3 *) 1, 0, (* first arg *) - (* DeltaCn[0]*) 1, 0, (* first arg *) - (* DeltaCn[1]*) 1, 0, (* first arg *) - (* DeltaCn[2]*) 1, 0, (* first arg *) - (* SROUND *) 1, 0, - (* S45Round *) 1, 0, - (* JROT *) 2, 0, - (* JROF *) 2, 0, - (* ROFF *) 0, 0, - (* INS_$7B *) 0, 0, - (* RUTG *) 0, 0, - (* RDTG *) 0, 0, - (* SANGW *) 1, 0, - (* AA *) 1, 0, - - (* FlipPT *) 0, 0, (* no args *) - (* FlipRgON *) 2, 0, - (* FlipRgOFF*) 2, 0, - (* INS_$83 *) 0, 0, - (* INS_$84 *) 0, 0, - (* ScanCTRL *) 1, 0, - (* SDVPTL[0]*) 2, 0, - (* SDVPTL[1]*) 2, 0, - (* GetINFO *) 1, 1, - (* IDEF *) 1, 0, - (* ROLL *) 3, 3, (* pops 3 args/push 3 args *) - (* MAX *) 2, 1, - (* MIN *) 2, 1, - (* ScanTYPE *) 1, 0, - (* InstCTRL *) 2, 0, - (* INS_$8F *) 0, 0, - - (* INS_$90 *) 0, 0, - (* INS_$91 *) 0, 0, - (* INS_$92 *) 0, 0, - (* INS_$93 *) 0, 0, - (* INS_$94 *) 0, 0, - (* INS_$95 *) 0, 0, - (* INS_$96 *) 0, 0, - (* INS_$97 *) 0, 0, - (* INS_$98 *) 0, 0, - (* INS_$99 *) 0, 0, - (* INS_$9A *) 0, 0, - (* INS_$9B *) 0, 0, - (* INS_$9C *) 0, 0, - (* INS_$9D *) 0, 0, - (* INS_$9E *) 0, 0, - (* INS_$9F *) 0, 0, - - (* INS_$A0 *) 0, 0, - (* INS_$A1 *) 0, 0, - (* INS_$A2 *) 0, 0, - (* INS_$A3 *) 0, 0, - (* INS_$A4 *) 0, 0, - (* INS_$A5 *) 0, 0, - (* INS_$A6 *) 0, 0, - (* INS_$A7 *) 0, 0, - (* INS_$A8 *) 0, 0, - (* INS_$A9 *) 0, 0, - (* INS_$AA *) 0, 0, - (* INS_$AB *) 0, 0, - (* INS_$AC *) 0, 0, - (* INS_$AD *) 0, 0, - (* INS_$AE *) 0, 0, - (* INS_$AF *) 0, 0, - - (* PushB[0] *) 0, 1, - (* PushB[1] *) 0, 2, - (* PushB[2] *) 0, 3, - (* PushB[3] *) 0, 4, - (* PushB[4] *) 0, 5, - (* PushB[5] *) 0, 6, - (* PushB[6] *) 0, 7, - (* PushB[7] *) 0, 8, - (* PushW[0] *) 0, 1, - (* PushW[1] *) 0, 2, - (* PushW[2] *) 0, 3, - (* PushW[3] *) 0, 4, - (* PushW[4] *) 0, 5, - (* PushW[5] *) 0, 6, - (* PushW[6] *) 0, 7, - (* PushW[7] *) 0, 8, - - (* MDRP[00] *) 1, 0, - (* MDRP[01] *) 1, 0, - (* MDRP[02] *) 1, 0, - (* MDRP[03] *) 1, 0, - (* MDRP[04] *) 1, 0, - (* MDRP[05] *) 1, 0, - (* MDRP[06] *) 1, 0, - (* MDRP[07] *) 1, 0, - (* MDRP[08] *) 1, 0, - (* MDRP[09] *) 1, 0, - (* MDRP[10] *) 1, 0, - (* MDRP[11] *) 1, 0, - (* MDRP[12] *) 1, 0, - (* MDRP[13] *) 1, 0, - (* MDRP[14] *) 1, 0, - (* MDRP[15] *) 1, 0, - (* MDRP[16] *) 1, 0, - (* MDRP[17] *) 1, 0, - - (* MDRP[18] *) 1, 0, - (* MDRP[19] *) 1, 0, - (* MDRP[20] *) 1, 0, - (* MDRP[21] *) 1, 0, - (* MDRP[22] *) 1, 0, - (* MDRP[23] *) 1, 0, - (* MDRP[24] *) 1, 0, - (* MDRP[25] *) 1, 0, - (* MDRP[26] *) 1, 0, - (* MDRP[27] *) 1, 0, - (* MDRP[28] *) 1, 0, - (* MDRP[29] *) 1, 0, - (* MDRP[30] *) 1, 0, - (* MDRP[31] *) 1, 0, - - (* MIRP[00] *) 2, 0, - (* MIRP[01] *) 2, 0, - (* MIRP[02] *) 2, 0, - (* MIRP[03] *) 2, 0, - (* MIRP[04] *) 2, 0, - (* MIRP[05] *) 2, 0, - (* MIRP[06] *) 2, 0, - (* MIRP[07] *) 2, 0, - (* MIRP[08] *) 2, 0, - (* MIRP[09] *) 2, 0, - (* MIRP[10] *) 2, 0, - (* MIRP[11] *) 2, 0, - (* MIRP[12] *) 2, 0, - (* MIRP[13] *) 2, 0, - (* MIRP[14] *) 2, 0, - (* MIRP[15] *) 2, 0, - (* MIRP[16] *) 2, 0, - (* MIRP[17] *) 2, 0, - - (* MIRP[18] *) 2, 0, - (* MIRP[19] *) 2, 0, - (* MIRP[20] *) 2, 0, - (* MIRP[21] *) 2, 0, - (* MIRP[22] *) 2, 0, - (* MIRP[23] *) 2, 0, - (* MIRP[24] *) 2, 0, - (* MIRP[25] *) 2, 0, - (* MIRP[26] *) 2, 0, - (* MIRP[27] *) 2, 0, - (* MIRP[28] *) 2, 0, - (* MIRP[29] *) 2, 0, - (* MIRP[30] *) 2, 0, - (* MIRP[31] *) 2, 0 - ); - - -(******************************************************************* - * - * Function : Norm - * - * Description : returns the norm (length) of a vector - * - * Input : X, Y vector - * - * Output : returns length in F26dot6 - * - *****************************************************************) - - function Norm( X, Y : TT_F26dot6 ): TT_F26dot6; - var - T1, T2 : Int64; - begin - MulTo64( X, X, T1 ); - MulTo64( Y, Y, T2 ); - - Add64( T1, T2, T1 ); - - if ( (T1.lo or T1.Hi) = 0 ) then Norm := 0 - else Norm := Sqrt64( T1 ); - end; - -(******************************************************************* - * - * Function : Scale_Pixels - * - * Description : Converts from FUnits to Fractional pixels - * coordinates. - * - *****************************************************************) - - function Scale_Pixels( value : long ) : TT_F26Dot6; - {$IFDEF INLINE} inline; {$ENDIF} - begin - Scale_Pixels := MulDiv_Round( value, - exc.metrics.scale1, - exc.metrics.scale2 ); - end; - - function Get_Current_Ratio : Long; - var - x, y : Long; - begin - if exc.metrics.ratio <> 0 then - Get_Current_Ratio := exc.metrics.ratio - else - begin - if exc.GS.projVector.y = 0 then - exc.metrics.ratio := exc.metrics.x_ratio - - else if exc.GS.projVector.x = 0 then - exc.metrics.ratio := exc.metrics.y_ratio - - else - begin - x := MulDiv_Round( exc.GS.projVector.x, - exc.metrics.x_ratio, - $4000 ); - - y := MulDiv_Round( exc.GS.projVector.y, - exc.metrics.y_ratio, - $4000 ); - - exc.metrics.ratio := Norm( x, y ); - end; - - Get_Current_Ratio := exc.metrics.ratio; - end - end; - - function Get_Ppem : Long; - {$IFDEF INLINE} inline; {$ENDIF} - begin - Get_Ppem := MulDiv_Round( exc.metrics.ppem, Get_Current_Ratio, $10000 ); - end; - - - function Read_CVT( index : Int ) : TT_F26Dot6; - {$IFNDEF FPK} far; {$ENDIF} - begin - Read_CVT := exc.cvt^[index]; - end; - - function Read_CVT_Stretched( index : Int ) : TT_F26Dot6; far; - begin - Read_CVT_Stretched := MulDiv_Round( exc.cvt^[index], - Get_Current_Ratio, - $10000 ); - end; - - - procedure Write_CVT( index : Int; value : TT_F26Dot6 ); far; - begin - exc.cvt^[index] := value; - end; - - procedure Write_CVT_Stretched( index : Int; value : TT_F26Dot6 ); far; - begin - exc.cvt^[index] := MulDiv_Round( value, - $10000, - Get_Current_Ratio ); - end; - - - procedure Move_CVT( index : Int; value : TT_F26Dot6 ); far; - begin - inc( exc.cvt^[index], value ); - end; - - procedure Move_CVT_Stretched( index : Int; value : TT_F26dot6 ); far; - begin - inc( exc.cvt^[index], MulDiv_Round( value, - $10000, - Get_Current_Ratio )); - end; - -(******************************************************************* - * - * Function : Calc_Length - * - * Description : Computes the length in bytes of current opcode - * - *****************************************************************) - - function Calc_Length : boolean; - begin - Calc_Length := false; - - exc.opcode := exc.Code^[exc.IP]; - - case exc.opcode of - - $40 : if exc.IP+1 >= exc.codeSize - then exit - else - exc.length := exc.code^[exc.IP+1] + 2; - - $41 : if exc.IP+1 >= exc.codeSize - then exit - else - exc.length := exc.code^[exc.IP+1]*2 + 2; - - $B0..$B7 : exc.length := exc.opcode-$B0 + 2; - $B8..$BF : exc.length := (exc.opcode-$B8)*2 + 3; - else - exc.length := 1; - end; - - Calc_Length := exc.IP+exc.length <= exc.codeSize; - end; - -(******************************************************************* - * - * Function : Get_Short - * - * Description : Return a short integer taken from the instruction - * stream at address IP. - * - * Input : None - * - * Output : Short read at Code^[IP..IP+1] - * - * Notes : This one could become a Macro in the C version - * - *****************************************************************) - - function GetShort : Short; - var - L : Array[0..1] of Byte; - resultat : Short absolute L; (* XXX : un-portable *) - begin - (* This is little-endian code *) - - L[1] := exc.code^[exc.IP]; inc(exc.IP); - L[0] := exc.code^[exc.IP]; inc(exc.IP); - GetShort := resultat; - end; - - - function Goto_CodeRange( aRange, - aIP : Int ): boolean; - begin - - Goto_CodeRange := False; - - with exc do - begin - if (aRange<1) or (aRange>3) then - begin - exc.error := TT_Err_Bad_Argument; - exit; - end; - - with CodeRangeTable[ARange] do - begin - - if Base = nil then (* invalid coderange *) - begin - error := TT_Err_Invalid_Coderange; - exit; - end; - - (* NOTE : Because the last instruction of a program may be a CALL *) - (* which will return to the first byte *after* the code *) - (* range, we test for AIP <= Size, instead of AIP < Size *) - - if AIP > Size then - begin - error := TT_Err_Code_Overflow; - Goto_CodeRange := False; - exit; - end; - - Code := PByte(Base); - CodeSize := Size; - IP := AIP; - end; - - curRange := ARange; - end; - - Goto_CodeRange := True; - end; - - -(******************************************************************* - * - * Function : Direct_Move - * - * Description : Moves a point by a given distance along the - * freedom vector. - * - * Input : Vx, Vy point coordinates to move - * touch touch flag to modify - * distance - * - * Output : None - * - *****************************************************************) - - {$F+} - procedure Direct_Move( zone : PGlyph_Zone; - point : Int; - distance : TT_F26dot6 ); - var - v : TT_F26dot6; - begin - v := exc.GS.freeVector.x; - if v <> 0 then - begin - inc( zone^.cur^[point].x, MulDiv_Round( distance, - Long(v)*$10000, - exc.F_dot_P )); - - zone^.flags^[point] := zone^.flags^[point] or TT_Flag_Touched_X; - end; - - v := exc.GS.freeVector.y; - if v <> 0 then - begin - inc( zone^.cur^[point].y, MulDiv_Round( distance, - Long(v)*$10000, - exc.F_dot_P )); - - zone^.flags^[point] := zone^.flags^[point] or TT_Flag_Touched_Y; - end; - end; - - (* The following versions are used whenever both vectors are both *) - (* along one of the coordinate unit vectors, i.e. in 90% cases *) - - procedure Direct_Move_X( zone : PGlyph_Zone; - point : Int; - distance : TT_F26dot6 ); - begin - inc( zone^.cur^[point].x, distance ); - zone^.flags^[point] := zone^.flags^[point] or TT_Flag_Touched_X; - end; - - procedure Direct_Move_Y( zone : PGlyph_Zone; - point : Int; - distance : TT_F26dot6 ); - begin - inc( zone^.cur^[point].y, distance ); - zone^.flags^[point] := zone^.flags^[point] or TT_Flag_Touched_Y; - end; - -(******************************************************************* - * - * Function : Round_None - * - * Description : Do not round, but add engine compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - * NOTE : The spec says very few about the relationship between - * rounding and engine compensation. However, it seems - * from the description of super round that we should - * should add the compensation before rounding - * - *****************************************************************) - - function Round_None( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := distance + compensation; - if val < 0 then val := 0; - end - else - begin - val := distance - compensation; - if val > 0 then val := 0; - end; - - Round_None := val; - end; - -(******************************************************************* - * - * Function : Round_To_Grid - * - * Description : round value to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - *****************************************************************) - - function Round_To_Grid( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := (distance + 32 + compensation) and -64; - if val < 0 then val := 0; - end - else - begin - val := - ((compensation - distance + 32) and -64); - if val > 0 then val := 0; - end; - - Round_To_Grid := val; - end; - -(******************************************************************* - * - * Function : Round_To_Half_Grid - * - * Description : round value to half grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - *****************************************************************) - - function Round_To_Half_Grid( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := (distance + compensation) and -64 + 32; - if val < 0 then val := 0; - end - else - begin - val := - ((-distance + compensation) and -64 + 32); - if val > 0 then val := 0; - end; - - Round_To_Half_Grid := val; - end; - - -(******************************************************************* - * - * Function : Round_Down_To_Grid - * - * Description : round value down to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - *****************************************************************) - - function Round_Down_To_Grid( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := (distance + compensation) and -64; - if val < 0 then val := 0; - end - else - begin - val := - ((-distance + compensation) and -64); - if val > 0 then val := 0; - end; - - Round_Down_To_Grid := val; - end; - -(******************************************************************* - * - * Function : Round_Up_To_Grid - * - * Description : round value up to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - *****************************************************************) - - function Round_Up_To_Grid( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := (distance + 63 + compensation) and -64; - if val < 0 then val := 0; - end - else - begin - val := - ((-distance + 63 + compensation) and -64); - if val > 0 then val := 0; - end; - - Round_Up_To_Grid := val; - end; - -(******************************************************************* - * - * Function : Round_To_Double_Grid - * - * Description : round value to double grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - *****************************************************************) - - function Round_To_Double_Grid( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - if distance >= 0 then - begin - val := (distance + 16 + compensation) and -32; - if val < 0 then val := 0; - end - else - begin - val := - ((-distance + 16 + compensation) and -32); - if val > 0 then val := 0; - end; - - Round_To_Double_Grid := val; - end; - -(******************************************************************* - * - * Function : Round_Super - * - * Description : super round value to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - * NOTE : The spec says very few about the relationship between - * rounding and engine compensation. However, it seems - * from the description of super round that we should - * should add the compensation before rounding - * - *****************************************************************) - - function Round_Super( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - with exc do - - if distance >= 0 then - begin - val := (distance - phase + threshold + compensation) and -period; - if val < 0 then val := 0; - val := val + phase; - end - else - begin - val := -((-distance - phase + threshold + compensation) and -period); - if val > 0 then val := 0; - val := val - phase; - end; - - Round_Super := val; - end; - -(******************************************************************* - * - * Function : Round_Super_45 - * - * Description : super round value to grid after adding engine - * compensation - * - * Input : distance : distance to round - * compensation : engine compensation - * - * Output : rounded distance - * - * NOTE : There is a separate function for Round_Super_45 as we - * may need a greater precision. - * - *****************************************************************) - - function Round_Super_45( distance : TT_F26dot6; - compensation : TT_F26dot6 ) : TT_F26dot6; - var - val : TT_F26dot6; - begin - with exc do - - if distance >= 0 then - begin - val := ((distance - phase + threshold + compensation) div period) - * period; - if val < 0 then val := 0; - val := val + phase; - end - else - begin - val := -((-distance - phase + threshold + compensation) div period - * period ); - if val > 0 then val := 0; - val := val - phase; - end; - - Round_Super_45 := val; - end; - {$F-} - - procedure Compute_Round( round_mode : Byte ); - begin - case Round_Mode of - -{$IFDEF FPK} - TT_Round_Off : exc.func_round := @Round_None; - TT_Round_To_Grid : exc.func_round := @Round_To_Grid; - TT_Round_Up_To_Grid : exc.func_round := @Round_Up_To_Grid; - TT_Round_Down_To_Grid : exc.func_round := @Round_Down_To_Grid; - TT_Round_To_Half_Grid : exc.func_round := @Round_To_Half_Grid; - TT_Round_To_Double_Grid : exc.func_round := @Round_To_Double_Grid; - TT_Round_Super : exc.func_round := @Round_Super; - TT_Round_Super_45 : exc.func_round := @Round_Super_45; -{$ELSE} - TT_Round_Off : exc.func_round := Round_None; - TT_Round_To_Grid : exc.func_round := Round_To_Grid; - TT_Round_Up_To_Grid : exc.func_round := Round_Up_To_Grid; - TT_Round_Down_To_Grid : exc.func_round := Round_Down_To_Grid; - TT_Round_To_Half_Grid : exc.func_round := Round_To_Half_Grid; - TT_Round_To_Double_Grid : exc.func_round := Round_To_Double_Grid; - TT_Round_Super : exc.func_round := Round_Super; - TT_Round_Super_45 : exc.func_round := Round_Super_45; -{$ENDIF} - end; - end; - - -(******************************************************************* - * - * Function : SetSuperRound - * - * Description : Set Super Round parameters - * - * Input : GridPeriod Grid period - * OpCode SROUND opcode - * - * Output : None - * - * Notes : - * - *****************************************************************) - - procedure SetSuperRound( GridPeriod : TT_F26dot6; selector : Long ); - - begin - with exc do - begin - - Case selector and $C0 of - - $00 : period := GridPeriod div 2; - $40 : period := GridPeriod; - $80 : period := GridPeriod * 2; - - (* This opcode is reserved, but ... *) - - $C0 : period := GridPeriod; - end; - - Case selector and $30 of - - $00 : phase := 0; - $10 : phase := period div 4; - $20 : phase := period div 2; - $30 : phase := gridPeriod*3 div 4; - end; - - if selector and $F = 0 then - - Threshold := Period-1 - else - Threshold := (Integer( selector and $F )-4)*period div 8; - - period := period div 256; - phase := phase div 256; - threshold := threshold div 256; - - end - end; - -(******************************************************************* - * - * Function : Project - * - * Description : Computes the projection of (Vx,Vy) along the - * current projection vector - * - * Input : Vx, Vy input vector - * - * Output : return distance in F26dot6 - * - *****************************************************************) - - {$F+} - function Project( var P1, P2 : TT_Vector ) : TT_F26dot6; - var - T1, T2 : Int64; - begin - with exc.GS.projVector do - begin - MulTo64( P1.x - P2.x, x, T1 ); - MulTo64( P1.y - P2.y, y, T2 ); - end; - - Add64( T1, T2, T1 ); - - Project := Div64by32( T1, $4000 ); - end; - - - function Dual_Project( var P1, P2 : TT_Vector ) : TT_F26dot6; - var - T1, T2 : Int64; - begin - with exc.GS.dualVector do - begin - MulTo64( P1.x - P2.x, x, T1 ); - MulTo64( P1.y - P2.y, y, T2 ); - end; - - Add64( T1, T2, T1 ); - - Dual_Project := Div64by32( T1, $4000 ); - end; - - - function Free_Project( var P1, P2 : TT_Vector ) : TT_F26dot6; - var - T1, T2 : Int64; - begin - with exc.GS.freeVector do - begin - MulTo64( P1.x - P2.x, x, T1 ); - MulTo64( P1.y - P2.y, y, T2 ); - end; - - Add64( T1, T2, T1 ); - - Free_Project := Div64by32( T1, $4000 ); - end; - - - function Project_x( var P1, P2 : TT_Vector ) : TT_F26dot6; - begin - Project_x := P1.x - P2.x; - end; - - function Project_y( var P1, P2 : TT_Vector ) : TT_F26dot6; - begin - Project_y := P1.y - P2.y; - end; - {$F-} - -(******************************************************************* - * - * Function : Compute_Funcs - * - * Description : Computes the projections and movement function - * pointers according to the current graphics state - * - * Input : None - * - *****************************************************************) - - procedure Compute_Funcs; - begin - with exc, GS do - begin - - if (freeVector.x = $4000) then - begin -{$IFDEF FPK} - func_freeProj := @Project_x; -{$ELSE} - func_freeProj := Project_x; -{$ENDIF} - F_dot_P := Long(projVector.x) * $10000; - end - else - if (freeVector.y = $4000) then - begin -{$IFDEF FPK} - func_freeProj := @Project_y; -{$ELSE} - func_freeProj := Project_y; -{$ENDIF} - F_dot_P := Long(projVector.y) * $10000; - end - else - begin -{$IFDEF FPK} - func_move := @Direct_Move; - func_freeProj := @Free_Project; -{$ELSE} - func_move := Direct_Move; - func_freeProj := Free_Project; -{$ENDIF} - F_dot_P := Long(projVector.x) * freeVector.x * 4 + - Long(projVector.y) * freeVector.y * 4; - end; - -{$IFDEF FPK} - if (projVector.x = $4000) then func_Project := @Project_x - else - if (projVector.y = $4000) then func_Project := @Project_y - else - func_Project := @Project; - - if (dualVector.x = $4000) then func_dualproj := @Project_x - else - if (dualVector.y = $4000) then func_dualproj := @Project_y - else - func_dualproj := @Dual_Project; - - func_move := @Direct_Move; - - if F_dot_P = $40000000 then - - if freeVector.x = $4000 then func_move := @Direct_Move_x - else - if freeVector.y = $4000 then func_move := @Direct_Move_y; -{$ELSE} - if (projVector.x = $4000) then func_Project := Project_x - else - if (projVector.y = $4000) then func_Project := Project_y - else - func_Project := Project; - - if (dualVector.x = $4000) then func_dualproj := Project_x - else - if (dualVector.y = $4000) then func_dualproj := Project_y - else - func_dualproj := Dual_Project; - - func_move := Direct_Move; - - if F_dot_P = $40000000 then - - if freeVector.x = $4000 then func_move := Direct_Move_x - else - if freeVector.y = $4000 then func_move := Direct_Move_y; -{$ENDIF} - - (* at small sizes, F_dot_P can become too small, resulting *) - (* in overflows and 'spikes' in a number of glyfs like 'w' *) - - if abs( F_dot_P ) < $4000000 then F_dot_P := $40000000; - - (* set aspect ratio to 0 to force recomputation by Get_Current_Ratio *) - metrics.ratio := 0; - end; - end; - - -(**************************************************) -(* *) -(* Normalize : Normer un vecteur ( U, V ) *) -(* r‚sultat dans ( X, Y ) *) -(* False si vecteur paramŠtre nul *) -(* *) -(**************************************************) - -function Normalize( U, V : TT_F26dot6; var R : TT_UnitVector ): boolean; -var - Vec : TT_Vector; - W : TT_F26dot6; - S1, S2 : Boolean; - T : Int64; -begin - - if (Abs(U) < $10000) and (Abs(V) < $10000) then - begin - U := U*$100; - V := V*$100; - - W := Norm( U, V ); - if W = 0 then - begin - (* XXX : Undocumented. Apparently, it is possible to try *) - (* to normalize the vector (0,0). Return success *) - (* in this case *) - Normalize := SUCCESS; - exit; - end; - - R.x := MulDiv( U, $4000, W ); - R.y := MulDiv( V, $4000, W ); - - end - else - begin - - W := Norm( U, V ); - - if W > 0 then - begin - U := MulDiv( U, $4000, W ); - V := MulDiv( V, $4000, W ); - - W := U*U + V*V; - - (* Now, we want that Sqrt( W ) = $4000 *) - (* Or $1000000 <= W < $1004000 *) - - if U < 0 then begin U := -U; S1 := True; end else S1 := False; - if V < 0 then begin V := -V; S2 := True; end else S2 := False; - - while W < $1000000 do - begin - (* We need to increase W, by a minimal amount *) - if U < V then inc( U ) - else inc( V ); - W := U*U + V*V; - end; - - while W >= $1004000 do - begin - (* We need to decrease W, by a minimal amount *) - if U < V then dec( U ) - else dec( V ); - W := U*U + V*V; - end; - - (* Note that in various cases, we can only *) - (* compute a Sqrt(W) of $3FFF, eg. U=V *) - - if S1 then U := -U; - if S2 then V := -V; - - R.x := U; (* Type conversion *) - R.y := V; (* Type conversion *) - - end - else - begin - Normalize := False; - exc.error := TT_Err_Divide_By_Zero; - end; - end; - - Normalize := True; -end; - -{$F+} - -(****************************************************************) -(* *) -(* MANAGING THE STACK *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* DUP[] : Duplicate top stack element *) -(* CodeRange : $20 *) - - procedure Ins_DUP( args : PStorage ); - begin - args^[1] := args^[0]; - end; - -(*******************************************) -(* POP[] : POPs the stack's top elt. *) -(* CodeRange : $21 *) - - procedure Ins_POP( args : PStorage ); - begin - (* nothing to do *) - end; - -(*******************************************) -(* CLEAR[] : Clear the entire stack *) -(* CodeRange : $22 *) - - procedure Ins_CLEAR( args : PStorage ); - begin - exc.new_top := 0; - end; - -(*******************************************) -(* SWAP[] : Swap the top two elements *) -(* CodeRange : $23 *) - - procedure Ins_SWAP( args : PStorage ); - var L : Long; - begin - L := args^[0]; - args^[0] := args^[1]; - args^[1] := L; - end; - -(*******************************************) -(* DEPTH[] : return the stack depth *) -(* CodeRange : $24 *) - - procedure Ins_DEPTH( args : PStorage ); - begin - args^[0] := exc.top; - end; - -(*******************************************) -(* CINDEX[] : copy indexed element *) -(* CodeRange : $25 *) - - procedure Ins_CINDEX( args : PStorage ); - var - L : Long; - begin - L := args^[0]; - if (L <= 0) or (L > exc.args) then - exc.error := TT_Err_Invalid_Reference - else - args^[0] := exc.stack^[exc.args-l]; - end; - -(*******************************************) -(* MINDEX[] : move indexed element *) -(* CodeRange : $26 *) - - procedure Ins_MINDEX( args : PStorage ); - var - L, K : Long; - begin - L := args^[0]; - if (L <= 0) or (L > exc.args) then - exc.Error := TT_Err_Invalid_Reference - else - begin - K := exc.stack^[exc.args-L]; - - move( exc.stack^[exc.args-L+1], - exc.stack^[exc.args-L], - (L-1)*sizeof(Long) ); - - exc.stack^[exc.args-1] := K; - end; - end; - -(*******************************************) -(* ROLL[] : roll top three elements *) -(* CodeRange : $8A *) - - procedure Ins_ROLL( args : PStorage ); - var - A, B, C : Long; - begin - A := args^[2]; - B := args^[1]; - C := args^[0]; - - args^[2] := C; - args^[1] := A; - args^[0] := B; - end; - -(****************************************************************) -(* *) -(* MANAGING THE FLOW OF CONTROL *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - - function SkipCode : boolean; - var - b : Boolean; - begin - b := False; - - inc( exc.IP, exc.length ); - - b := exc.IP < exc.codeSize; - - if b then b := Calc_Length; - - if not b then - exc.error := TT_Err_Code_Overflow; - - SkipCode := b; - end; - - -(*******************************************) -(* IF[] : IF test *) -(* CodeRange : $58 *) - - procedure Ins_IF( args : PStorage ); - var - nIfs : Int; - Out : Boolean; - begin - if args^[0] <> 0 then exit; - - nIfs := 1; - Out := False; - - Repeat - - if not SkipCode then exit; - - Case exc.opcode of - - (* IF *) - $58 : inc( nIfs ); - - (* ELSE *) - $1B : out:= nIfs=1; - - (* EIF *) - $59 : begin - dec( nIfs ); - out:= nIfs=0; - end; - end; - - until Out; - end; - - -(*******************************************) -(* ELSE[] : ELSE *) -(* CodeRange : $1B *) - - procedure Ins_ELSE( args : PStorage ); - var - nIfs : Int; - begin - nIfs := 1; - - Repeat - - if not SkipCode then exit; - - case exc.opcode of - - (* IF *) - $58 : inc( nIfs ); - - (* EIF *) - $59 : dec( nIfs ); - end; - - until nIfs=0; - end; - -(*******************************************) -(* EIF[] : End IF *) -(* CodeRange : $59 *) - - procedure Ins_EIF( args : PStorage ); - begin - (* nothing to do *) - end; - -(*******************************************) -(* JROT[] : Jump Relative On True *) -(* CodeRange : $78 *) - - procedure Ins_JROT( args : PStorage ); - begin - if args^[1] <> 0 then - begin - inc( exc.IP, args^[0] ); - exc.step_ins := false; - end; - end; - -(*******************************************) -(* JMPR[] : JuMP Relative *) -(* CodeRange : $1C *) - - procedure Ins_JMPR( args : PStorage ); - begin - inc( exc.IP, args^[0] ); - exc.step_ins := false; - end; - -(*******************************************) -(* JROF[] : Jump Relative On False *) -(* CodeRange : $79 *) - - procedure Ins_JROF( args : PStorage ); - begin - if args^[1] = 0 then - begin - inc( exc.IP, args^[0] ); - exc.step_ins := false; - end; - end; - -(****************************************************************) -(* *) -(* LOGICAL FUNCTIONS *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* LT[] : Less Than *) -(* CodeRange : $50 *) - - procedure Ins_LT( args : PStorage ); - begin - if args^[0] < args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* LTEQ[] : Less Than or EQual *) -(* CodeRange : $51 *) - - procedure Ins_LTEQ( args : PStorage ); - begin - if args^[0] <= args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* GT[] : Greater Than *) -(* CodeRange : $52 *) - - procedure Ins_GT( args : PStorage ); - begin - if args^[0] > args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* GTEQ[] : Greater Than or EQual *) -(* CodeRange : $53 *) - - procedure Ins_GTEQ( args : PStorage ); - begin - if args^[0] >= args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* EQ[] : EQual *) -(* CodeRange : $54 *) - - procedure Ins_EQ( args : PStorage ); - begin - if args^[0] = args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* NEQ[] : Not EQual *) -(* CodeRange : $55 *) - - procedure Ins_NEQ( args : PStorage ); - begin - if args^[0] <> args^[1] then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* ODD[] : Odd *) -(* CodeRange : $56 *) - - procedure Ins_ODD( args : PStorage ); - begin - if exc.func_round( args^[0], 0 ) and 127 = 64 then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* EVEN[] : Even *) -(* CodeRange : $57 *) - - procedure Ins_EVEN( args : PStorage ); - begin - if exc.func_round( args^[0], 0 ) and 127 = 0 then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* AND[] : logical AND *) -(* CodeRange : $5A *) - - procedure Ins_AND( args : PStorage ); - begin - if ( args^[0] <> 0 ) and - ( args^[1] <> 0 ) then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* OR[] : logical OR *) -(* CodeRange : $5B *) - - procedure Ins_OR( args : PStorage ); - begin - if ( args^[0] <> 0 ) or - ( args^[1] <> 0 ) then args^[0] := 1 - else args^[0] := 0; - end; - -(*******************************************) -(* NOT[] : logical NOT *) -(* CodeRange : $5C *) - - procedure Ins_NOT( args : PStorage ); - begin - if args^[0] <> 0 then args^[0] := 0 - else args^[0] := 1; - end; - -(****************************************************************) -(* *) -(* ARITHMETIC AND MATH INSTRUCTIONS *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* ADD[] : ADD *) -(* CodeRange : $60 *) - - procedure Ins_ADD( args : PStorage ); - begin - inc( args^[0], args^[1] ); - end; - -(*******************************************) -(* SUB[] : SUBstract *) -(* CodeRange : $61 *) - - procedure Ins_SUB( args : PStorage ); - begin - dec( args^[0], args^[1] ); - end; - -(*******************************************) -(* DIV[] : DIVide *) -(* CodeRange : $62 *) - - procedure Ins_DIV( args : PStorage ); - begin - if args^[1] = 0 then - begin - exc.error := TT_Err_Divide_By_Zero; - exit; - end; - - args^[0] := MulDiv_Round( args^[0], 64, args^[1] ); - end; - -(*******************************************) -(* MUL[] : MULtiply *) -(* CodeRange : $63 *) - - procedure Ins_MUL( args : PStorage ); - begin - args^[0] := MulDiv_Round( args^[0], args^[1], 64 ); - end; - -(*******************************************) -(* ABS[] : ABSolute value *) -(* CodeRange : $64 *) - - procedure Ins_ABS( args : PStorage ); - begin - args^[0] := abs( args^[0] ); - end; - -(*******************************************) -(* NEG[] : NEGate *) -(* CodeRange : $65 *) - - procedure Ins_NEG( args : PStorage ); - begin - args^[0] := -args^[0]; - end; - -(*******************************************) -(* FLOOR[] : FLOOR *) -(* CodeRange : $66 *) - - procedure Ins_FLOOR( args : PStorage ); - begin - args^[0] := args^[0] and -64; - end; - -(*******************************************) -(* CEILING[] : CEILING *) -(* CodeRange : $67 *) - - procedure Ins_CEILING( args : PStorage ); - begin - args^[0] := ( args^[0]+63 ) and -64; - end; - -(*******************************************) -(* MAX[] : MAXimum *) -(* CodeRange : $68 *) - - procedure Ins_MAX( args : PStorage ); - begin - if args^[1] > args^[0] then args^[0] := args^[1]; - end; - -(*******************************************) -(* MIN[] : MINimum *) -(* CodeRange : $69 *) - - procedure Ins_MIN( args : PStorage ); - begin - if args^[1] < args^[0] then args^[0] := args^[1]; - end; - -(****************************************************************) -(* *) -(* COMPENSATING FOR THE ENGINE CHARACTERISTICS *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* ROUND[ab] : ROUND value *) -(* CodeRange : $68-$6B *) - - procedure Ins_ROUND( args : PStorage ); - begin - args^[0] := exc.func_round( args^[0], - exc.metrics.compensations[ exc.opcode-$68 ] ); - end; - -(*******************************************) -(* NROUND[ab]: No ROUNDing of value *) -(* CodeRange : $6C-$6F *) - - procedure Ins_NROUND( args : PStorage ); - begin - args^[0] := Round_None( args^[0], - exc.metrics.compensations[ exc.opcode-$6C ] ); - end; - -(****************************************************************) -(* *) -(* DEFINING AND USING FUNCTIONS AND INSTRUCTIONS *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* FDEF[] : Function DEFinition *) -(* CodeRange : $2C *) - - procedure Ins_FDEF( args : PStorage ); - var - func : int; - label - Suite; - begin - - (* check space *) - if exc.numFDefs >= exc.maxFDefs then begin - exc.error := TT_Err_Too_Many_FuncDefs; - exit; - end; - - func := Int(args^[0]); - with exc.FDefs^[exc.numFDefs] do - begin - Range := exc.curRange; - Opc := func; - Start := exc.IP+1; - Active := True; - end; - - if func > exc.maxFunc then - exc.maxFunc := func; - - inc(exc.numFDefs); - - (* now skip the whole function definition *) - (* we don't allow nested IDEFS & FDEFs *) - - while SkipCode do - - case exc.opcode of - - $89, (* IDEF *) - $2C : (* FDEF *) - begin - exc.error := TT_Err_Nested_Defs; - exit; - end; - - $2D : (* ENDF *) - exit; - end; - end; - -(*******************************************) -(* ENDF[] : END Function definition *) -(* CodeRange : $2D *) - - procedure Ins_ENDF( args : PStorage ); - begin - - if exc.callTop <= 0 then (* We encountered an ENDF without a call *) - begin - exc.error := TT_Err_ENDF_in_Exec_Stream; - exit; - end; - - dec( exc.CallTop ); - - with exc.Callstack^[exc.CallTop] do - begin - dec( Cur_Count ); - - exc.step_ins := false; - - if Cur_Count > 0 then - - begin - (* Loop the current function *) - inc( exc.callTop ); - exc.IP := Cur_Restart; - end - - else - (* exit the current call frame *) - (* NOTE : When the last intruction of a program *) - (* is a CALL or LOOPCALL, the return address *) - (* is always out of the code range. This is *) - (* valid address, and is why we do not test *) - (* the result of Goto_CodeRange here !! *) - - Goto_CodeRange( Caller_Range, Caller_IP ) - end; - - end; - -(*******************************************) -(* CALL[] : CALL function *) -(* CodeRange : $2B *) - - procedure Ins_CALL( args : PStorage ); - var - ii, nn : Int; - def : PDefRecord; - label - Fail; - begin - - (* First of all, check index *) - if (args^[0] < 0) or (args^[0] > exc.maxFunc) then - goto Fail; - - (* Except for some old Apple fonts, all functions in a TrueType *) - (* fonts are defined in increasing order, starting from 0. *) - (* *) - (* This mean that, normally, we have : *) - (* *) - (* exc.maxFunc+1 = exc.numFDefs *) - (* exc.FDefs[n].opc = n for n in 0..exc.maxFunc *) - (* *) - - nn := Int(args^[0]); - def := @exc.FDefs^[nn]; - - if ( exc.maxFunc+1 <> exc.numFDefs ) or ( def^.opc <> nn ) then begin - (* lookup the FDefs table *) - ii := 0; - def := @exc.FDefs^[0]; - while (ii < exc.numFDefs) and (def^.opc <> nn) do begin - inc(ii); - inc(def); - end; - - (* Fail if the function isn't listed *) - if ii >= exc.numFDefs then - goto Fail; - end; - - (* check that the function is active *) - if not def^.active then - goto Fail; - - (* check call stack *) - if exc.callTop >= exc.callSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - with exc.callstack^[exc.callTop] do - begin - Caller_Range := exc.curRange; - Caller_IP := exc.IP+1; - Cur_Count := 1; - Cur_Restart := def^.Start; - end; - - inc( exc.CallTop ); - - with def^ do Goto_CodeRange( Range, Start ); - - exc.step_ins := false; - exit; - - Fail: - exc.error := TT_Err_Invalid_Reference; - exit; - end; - -(*******************************************) -(* LOOPCALL[]: LOOP and CALL function *) -(* CodeRange : $2A *) - - procedure Ins_LOOPCALL( args : PStorage ); - begin - - if ( args^[1] < 0 ) or ( args^[1] >= exc.numFDefs ) or - ( not exc.FDefs^[args^[1]].Active ) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - if exc.callTop >= exc.callSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - if args^[0] > 0 then - begin - with exc.callstack^[exc.callTop] do - begin - Caller_Range := exc.curRange; - Caller_IP := exc.IP+1; - Cur_Count := args^[0]; - Cur_Restart := exc.FDefs^[args^[1]].Start; - end; - - inc( exc.CallTop ); - - with exc.FDefs^[args^[1]] do Goto_CodeRange( Range, Start ); - - exc.step_ins := false; - end; - - end; - -(*******************************************) -(* IDEF[] : Instruction DEFinition *) -(* CodeRange : $89 *) - - procedure Ins_IDEF( args : PStorage ); - var - i, A : Int; - begin - - A := 0; - - while ( A < exc.numIDefs ) do - with exc.IDefs^[A] do - begin - - if not Active then - begin - Opc := args^[0]; - Start := exc.IP+1; - Range := exc.curRange; - Active := True; - - A := exc.numIDefs; - - (* now skip the whole function definition *) - (* we don't allow nested IDEFS & FDEFs *) - - while SkipCode do - case exc.opcode of - - $89, (* IDEF *) - $2C : (* FDEF *) - begin - exc.error := TT_Err_Nested_Defs; - exit; - end; - - $2D : (* ENDF *) - exit; - end; - end - else - inc( A ); - end; - end; - -(****************************************************************) -(* *) -(* PUSHING DATA ONTO THE INTERPRETER STACK *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* NPUSHB[] : PUSH N Bytes *) -(* CodeRange : $40 *) - - procedure Ins_NPUSHB( args : PStorage ); - var - L, K : Long; - begin - L := exc.code^[exc.IP+1]; - - if exc.top + L > exc.stackSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - for K := 1 to L do - args^[k-1] := exc.code^[exc.IP+1+k]; - - inc( exc.new_top, L ); - end; - -(*******************************************) -(* NPUSHW[] : PUSH N Words *) -(* CodeRange : $41 *) - - procedure Ins_NPUSHW( args : PStorage ); - var - L, K : Long; - begin - L := exc.code^[exc.IP+1]; - - if exc.top + L > exc.stackSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - inc( exc.IP, 2 ); - - for K := 1 to L do - args^[k-1] := GetShort; - - exc.step_ins := false; - - inc( exc.new_top, L ); - end; - -(*******************************************) -(* PUSHB[abc]: PUSH Bytes *) -(* CodeRange : $B0-$B7 *) - - procedure Ins_PUSHB( args : PStorage ); - var - L, K : Long; - begin - L := exc.opcode - $B0+1; - - if exc.top + L >= exc.stackSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - for k := 1 to L do - args^[k-1] := exc.code^[exc.ip+k]; - - end; - -(*******************************************) -(* PUSHW[abc]: PUSH Words *) -(* CodeRange : $B8-$BF *) - - procedure Ins_PUSHW( args : PStorage ); - var - L, K : Long; - begin - L := exc.opcode - $B8+1; - - if exc.top + L >= exc.stackSize then - begin - exc.error := TT_Err_Stack_Overflow; - exit; - end; - - inc( exc.IP ); - - for k := 1 to L do - args^[k-1] := GetShort; - - exc.step_ins := false; - - end; - -(****************************************************************) -(* *) -(* MANAGING THE STORAGE AREA *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* RS[] : Read Store *) -(* CodeRange : $43 *) - - procedure Ins_RS( args : PStorage ); - begin - if (args^[0] < 0) or (args^[0] >= exc.storeSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - args^[0] := exc.storage^[args^[0]]; - end; - -(*******************************************) -(* WS[] : Write Store *) -(* CodeRange : $42 *) - - procedure Ins_WS( args : PStorage ); - begin - if (args^[0] < 0) or (args^[0] >= exc.storeSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.storage^[args^[0]] := args^[1]; - end; - -(*******************************************) -(* WCVTP[] : Write CVT in Pixel units *) -(* CodeRange : $44 *) - - procedure Ins_WCVTP( args : PStorage ); - begin - if (args^[0] < 0) or (args^[0] >= exc.cvtSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.func_write_cvt( args^[0], args^[1] ); - end; - -(*******************************************) -(* WCVTF[] : Write CVT in FUnits *) -(* CodeRange : $70 *) - - procedure Ins_WCVTF( args : PStorage ); - begin - if (args^[0] < 0) or (args^[0] >= exc.cvtSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.cvt^[args^[0]] := Scale_Pixels(args^[1]); - end; - -(*******************************************) -(* RCVT[] : Read CVT *) -(* CodeRange : $45 *) - - procedure Ins_RCVT( args : PStorage ); - begin - if (args^[0] < 0) or (args^[0] >= exc.cvtSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - args^[0] := exc.func_read_cvt(args^[0]); - end; - -(****************************************************************) -(* *) -(* MANAGING THE GRAPHICS STATE *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - -(*******************************************) -(* SVTCA[a] : Set F and P vectors to axis *) -(* CodeRange : $00-$01 *) - - procedure Ins_SVTCA( args : PStorage ); - var A, B : Short; - begin - case (exc.opcode and 1) of - 0 : A := $0000; - 1 : A := $4000; - end; - B := A xor $4000; - - exc.GS.freeVector.x := A; - exc.GS.projVector.x := A; - exc.GS.dualVector.x := A; - - exc.GS.freeVector.y := B; - exc.GS.projVector.y := B; - exc.GS.dualVector.y := B; - - Compute_Funcs; - end; - -(*******************************************) -(* SPVTCA[a] : Set PVector to Axis *) -(* CodeRange : $02-$03 *) - - procedure Ins_SPVTCA( args : PStorage ); - var A, B : Short; - begin - case (exc.opcode and 1) of - 0 : A := $0000; - 1 : A := $4000; - end; - B := A xor $4000; - - exc.GS.projVector.x := A; - exc.GS.dualVector.x := A; - - exc.GS.projVector.y := B; - exc.GS.dualVector.y := B; - - Compute_Funcs; - end; - -(*******************************************) -(* SFVTCA[a] : Set FVector to Axis *) -(* CodeRange : $04-$05 *) - - procedure Ins_SFVTCA( args : PStorage ); - var A, B : Short; - begin - case (exc.opcode and 1) of - 0 : A := $0000; - 1 : A := $4000; - end; - B := A xor $4000; - - exc.GS.freeVector.x := A; - exc.GS.freeVector.y := B; - - Compute_Funcs; - end; - - - - function Ins_SxVTL( aIdx1 : Int; - aIdx2 : Int; - aOpc : Int; - var Vec : TT_UnitVector ) : boolean; - var - A, B, C : Long; - begin - Ins_SxVTL := False; - - with exc do - begin - - if (aIdx2 >= zp1.n_points) or (aIdx1 >= zp2.n_points) then - begin - Error := TT_Err_Invalid_Reference; - exit; - end; - - with zp1.Cur^[aIdx2] do - begin - A := x; - B := y; - end; - - with zp2.Cur^[aIdx1] do - begin - dec( A, x ); - dec( B, y ); - end; - - if aOpc and 1 <> 0 then - begin - C := B; (* CounterClockwise rotation *) - B := A; - A := -C; - end; - - if not Normalize( A, B, Vec ) then - begin - exc.error := TT_Err_Ok; - Vec.x := $4000; - Vec.y := $0000; - end; - - Ins_SxVTL := True; - end; - end; - - -(*******************************************) -(* SPVTL[a] : Set PVector to Line *) -(* CodeRange : $06-$07 *) - - procedure Ins_SPVTL( args : PStorage ); - begin - if not INS_SxVTL( args^[1], - args^[0], - exc.opcode, - exc.GS.projVector ) then exit; - - exc.GS.dualVector := exc.GS.projVector; - Compute_Funcs; - end; - -(*******************************************) -(* SFVTL[a] : Set FVector to Line *) -(* CodeRange : $08-$09 *) - - procedure Ins_SFVTL( args : PStorage ); - begin - if not INS_SxVTL( args^[1], - args^[0], - exc.opcode, - exc.GS.freeVector ) then exit; - - Compute_Funcs; - end; - -(*******************************************) -(* SFVTPV[] : Set FVector to PVector *) -(* CodeRange : $0E *) - - procedure Ins_SFVTPV( args : PStorage ); - begin - exc.GS.freeVector := exc.GS.projVector; - Compute_Funcs; - end; - -(*******************************************) -(* SDPVTL[a] : Set Dual PVector to Line *) -(* CodeRange : $86-$87 *) - - procedure Ins_SDPVTL( args : PStorage ); - var - A, B, C : Long; - p1, p2 : Int; - begin - - p1 := args^[1]; - p2 := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp1.n_points) or - (args^[1] < 0) or (args^[1] >= exc.zp2.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - A := exc.zp1.org^[p2].x - exc.zp2.org^[p1].x; - B := exc.zp1.org^[p2].y - exc.zp2.org^[p1].y; - - if exc.opcode and 1 <> 0 then - begin - C := B; (* CounterClockwise rotation *) - B := A; - A := -C; - end; - - Normalize( A, B, exc.GS.dualVector ); - - A := exc.zp1.cur^[p2].x - exc.zp2.cur^[p1].x; - B := exc.zp1.cur^[p2].y - exc.zp2.cur^[p1].y; - - if exc.opcode and 1 <> 0 then - begin - C := B; (* CounterClockwise rotation *) - B := A; - A := -C; - end; - - Normalize( A, B, exc.GS.projVector ); - - Compute_Funcs; - exc.error := TT_Err_Ok; - end; - -(*******************************************) -(* SPVFS[] : Set PVector From Stack *) -(* CodeRange : $0A *) - - procedure Ins_SPVFS( args : PStorage ); - var - S : Short; - X, Y : Long; - begin - S := args^[1]; Y := S; (* type conversion; extends sign *) - S := args^[0]; X := S; (* type conversion; extends sign *) - - if not Normalize( X, Y, exc.GS.projVector ) then exit; - - exc.GS.dualVector := exc.GS.projVector; - - Compute_Funcs; - end; - -(*******************************************) -(* SFVFS[] : Set FVector From Stack *) -(* CodeRange : $0B *) - - procedure Ins_SFVFS( args : PStorage ); - var - S : Short; - X, Y : Long; - begin - S := args^[1]; Y := S; (* type conversion; extends sign *) - S := args^[0]; X := S; (* type conversion; extends sign *) - - if not Normalize( X, Y, exc.GS.freeVector ) then exit; - - Compute_Funcs; - end; - -(*******************************************) -(* GPV[] : Get Projection Vector *) -(* CodeRange : $0C *) - - procedure Ins_GPV( args : PStorage ); - begin - args^[0] := exc.GS.projVector.x; - args^[1] := exc.GS.projVector.y; - end; - -(*******************************************) -(* GFV[] : Get Freedom Vector *) -(* CodeRange : $0D *) - - procedure Ins_GFV( args : PStorage ); - begin - args^[0] := exc.GS.freeVector.x; - args^[1] := exc.GS.freeVector.y; - end; - -(*******************************************) -(* SRP0[] : Set Reference Point 0 *) -(* CodeRange : $10 *) - - procedure Ins_SRP0( args : PStorage ); - begin - exc.GS.rp0 := args^[0]; - end; - -(*******************************************) -(* SRP1[] : Set Reference Point 1 *) -(* CodeRange : $11 *) - - procedure Ins_SRP1( args : PStorage ); - begin - exc.GS.rp1 := args^[0]; - end; - -(*******************************************) -(* SRP2[] : Set Reference Point 2 *) -(* CodeRange : $12 *) - - procedure Ins_SRP2( args : PStorage ); - begin - exc.GS.rp2 := args^[0]; - end; - -(*******************************************) -(* SZP0[] : Set Zone Pointer 0 *) -(* CodeRange : $13 *) - - procedure Ins_SZP0( args : PStorage ); - begin - case args^[0] of - - 0 : exc.zp0 := exc.Twilight; - 1 : exc.zp0 := exc.Pts; - else - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.GS.gep0 := args^[0]; - end; - -(*******************************************) -(* SZP1[] : Set Zone Pointer 1 *) -(* CodeRange : $14 *) - - procedure Ins_SZP1( args : PStorage ); - begin - case args^[0] of - - 0 : exc.zp1 := exc.Twilight; - 1 : exc.zp1 := exc.Pts; - else - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.GS.gep1 := args^[0]; - end; - -(*******************************************) -(* SZP2[] : Set Zone Pointer 2 *) -(* CodeRange : $15 *) - - procedure Ins_SZP2( args : PStorage ); - begin - case args^[0] of - - 0 : exc.zp2 := exc.Twilight; - 1 : exc.zp2 := exc.Pts; - else - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.GS.gep2 := args^[0]; - end; - -(*******************************************) -(* SZPS[] : Set Zone Pointers *) -(* CodeRange : $16 *) - - procedure Ins_SZPS( args : PStorage ); - begin - case args^[0] of - - 0 : exc.zp0 := exc.Twilight; - 1 : exc.zp0 := exc.Pts; - else - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.zp1 := exc.zp0; - exc.zp2 := exc.zp0; - - exc.GS.gep0 := args^[0]; - exc.GS.gep1 := args^[0]; - exc.GS.gep2 := args^[0]; - end; - -(*******************************************) -(* RTHG[] : Round To Half Grid *) -(* CodeRange : $19 *) - - procedure Ins_RTHG( args : PStorage ); - begin - exc.GS.round_state := TT_Round_To_Half_Grid; - -{$IFDEF FPK} - exc.func_round := @Round_To_Half_Grid; -{$ELSE} - exc.func_round := Round_To_Half_Grid; -{$ENDIF} - end; - -(*******************************************) -(* RTG[] : Round To Grid *) -(* CodeRange : $18 *) - - procedure Ins_RTG( args : PStorage ); - begin - exc.GS.round_state := TT_Round_To_Grid; - -{$IFDEF FPK} - exc.func_round := @Round_To_Grid; -{$ELSE} - exc.func_round := Round_To_Grid; -{$ENDIF} - end; - -(*******************************************) -(* RTDG[] : Round To Double Grid *) -(* CodeRange : $3D *) - - procedure Ins_RTDG( args : PStorage ); - begin - exc.GS.round_state := TT_Round_To_Double_Grid; - -{$IFDEF FPK} - exc.func_round := @Round_To_Double_Grid; -{$ELSE} - exc.func_round := Round_To_Double_Grid; -{$ENDIF} - end; - -(*******************************************) -(* RUTG[] : Round Up To Grid *) -(* CodeRange : $7C *) - - procedure Ins_RUTG( args : PStorage ); - begin - exc.GS.round_state := TT_Round_Up_To_Grid; - -{$IFDEF FPK} - exc.func_round := @Round_Up_To_Grid; -{$ELSE} - exc.func_round := Round_Up_To_Grid; -{$ENDIF} - end; - -(*******************************************) -(* RDTG[] : Round Down To Grid *) -(* CodeRange : $7D *) - - procedure Ins_RDTG( args : PStorage ); - begin - exc.GS.round_state := TT_Round_Down_To_Grid; - -{$IFDEF FPK} - exc.func_round := @Round_Down_To_Grid; -{$ELSE} - exc.func_round := Round_Down_To_Grid; -{$ENDIF} - end; - -(*******************************************) -(* ROFF[] : Round OFF *) -(* CodeRange : $7A *) - - procedure Ins_ROFF( args : PStorage ); - begin - exc.GS.round_state := TT_Round_Off; - -{$IFDEF FPK} - exc.func_round := @Round_None; -{$ELSE} - exc.func_round := Round_None; -{$ENDIF} - end; - -(*******************************************) -(* SROUND[] : Super ROUND *) -(* CodeRange : $76 *) - - procedure Ins_SROUND( args : PStorage ); - begin - SetSuperRound( $4000, args^[0] ); - exc.GS.round_state := TT_Round_Super; - -{$IFDEF FPK} - exc.func_round := @Round_Super; -{$ELSE} - exc.func_round := Round_Super; -{$ENDIF} - end; - -(*******************************************) -(* S45ROUND[]: Super ROUND 45 degrees *) -(* CodeRange : $77 *) - - procedure Ins_S45ROUND( args : PStorage ); - begin - SetSuperRound( $2D41, args^[0] ); - exc.GS.round_state := TT_Round_Super_45; - -{$IFDEF FPK} - exc.func_round := @Round_Super_45; -{$ELSE} - exc.func_round := Round_Super_45; -{$ENDIF} - end; - - -(*******************************************) -(* SLOOP[] : Set LOOP variable *) -(* CodeRange : $17 *) - - procedure Ins_SLOOP( args : PStorage ); - begin - exc.GS.Loop := args^[0]; - end; - -(*******************************************) -(* SMD[] : Set Minimum Distance *) -(* CodeRange : $1A *) - - procedure Ins_SMD( args : PStorage ); - begin - exc.GS.minimum_distance := args^[0]; - end; - -(*******************************************) -(* INSTCTRL[]: INSTruction ConTRol *) -(* CodeRange : $8e *) - - procedure Ins_INSTCTRL( args : PStorage ); - var - K, L : Int; - begin - K := args^[1]; - L := args^[0]; - - if ( K < 1 ) or ( K > 2 ) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - if L <> 0 then L := K; - - exc.GS.instruct_control := ( exc.GS.instruct_control and not K ) or L; - end; - -(*******************************************) -(* SCANCTRL[]: SCAN ConTRol *) -(* CodeRange : $85 *) - - procedure Ins_SCANCTRL( args : PStorage ); - var - A : Int; - begin - - (* Get Threshold *) - A := args^[0] and $FF; - - if A = $FF then - exc.GS.scan_Control := True - else - if A = 0 then - exc.GS.scan_Control := False - else - begin - - A := A * 64; - - (* XXX TODO : Add rotation and stretch cases *) - - if ( args^[0] and $100 <> 0 ) and - ( exc.metrics.pointSize <= A ) then exc.GS.scan_Control := True; - - if ( args^[0] and $200 <> 0 ) and - ( false ) then exc.GS.scan_Control := True; - - if ( args^[0] and $400 <> 0 ) and - ( false ) then exc.GS.scan_Control := True; - - if ( args^[0] and $800 <> 0 ) and - ( exc.metrics.pointSize > A ) then exc.GS.scan_Control := False; - - if ( args^[0] and $1000 <> 0 ) and - ( not False ) then exc.GS.scan_Control := False; - - if ( args^[0] and $2000 <> 0 ) and - ( not False ) then exc.GS.scan_Control := False; - end; - end; - -(*******************************************) -(* SCANTYPE[]: SCAN TYPE *) -(* CodeRange : $8D *) - - procedure Ins_SCANTYPE( args : PStorage ); - begin - (* For compatibility with future enhancements, *) - (* we must ignore new modes *) - - if (args^[0] >= 0 ) and (args^[0] <= 5) then - begin - if args^[0] = 3 then args^[0] := 2; - - exc.GS.scan_type := args^[0]; - end; - end; - -(**********************************************) -(* SCVTCI[] : Set Control Value Table Cut In *) -(* CodeRange : $1D *) - - procedure Ins_SCVTCI( args : PStorage ); - begin - exc.GS.control_value_cutin := args^[0]; - end; - -(**********************************************) -(* SSWCI[] : Set Single Width Cut In *) -(* CodeRange : $1E *) - - procedure Ins_SSWCI( args : PStorage ); - begin - exc.GS.single_width_cutin := args^[0]; - end; - -(**********************************************) -(* SSW[] : Set Single Width *) -(* CodeRange : $1F *) - - procedure Ins_SSW( args : PStorage ); - begin - exc.GS.single_width_value := args^[0] div $400; - end; - -(**********************************************) -(* FLIPON[] : Set Auto_flip to On *) -(* CodeRange : $4D *) - - procedure Ins_FLIPON( args : PStorage ); - begin - exc.GS.auto_flip := True; - end; - -(**********************************************) -(* FLIPOFF[] : Set Auto_flip to Off *) -(* CodeRange : $4E *) - - procedure Ins_FLIPOFF( args : PStorage ); - begin - exc.GS.auto_flip := False; - end; - -(**********************************************) -(* SANGW[] : Set Angle Weigth *) -(* CodeRange : $7E *) - - procedure Ins_SANGW( args : PStorage ); - begin - (* instruction not supported anymore *) - end; - -(**********************************************) -(* SDB[] : Set Delta Base *) -(* CodeRange : $5E *) - - procedure Ins_SDB( args : PStorage ); - begin - exc.GS.delta_base := args^[0] - end; - -(**********************************************) -(* SDS[] : Set Delta Shift *) -(* CodeRange : $5F *) - - procedure Ins_SDS( args : PStorage ); - begin - exc.GS.delta_shift := args^[0] - end; - -(**********************************************) -(* GC[a] : Get Coordinate projected onto *) -(* CodeRange : $46-$47 *) - -(* BULLSHIT : Measures from the original glyph must to be taken *) -(* along the dual projection vector !! *) - - procedure Ins_GC( args : PStorage ); - var - L : Int; - begin - L := args^[0]; - - if (L < 0) or (L >= exc.zp2.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - case exc.opcode and 1 of - - 0 : L := exc.func_project ( exc.zp2.cur^[L], Null_Vector ); - 1 : L := exc.func_dualProj( exc.zp2.org^[L], Null_Vector ); - end; - - args^[0] := L; - end; - -(**********************************************) -(* SCFS[] : Set Coordinate From Stack *) -(* CodeRange : $48 *) -(* *) -(* Formule : *) -(* *) -(* OA := OA + ( value - OA.p )/( f.p ) x f *) -(* *) - - procedure Ins_SCFS( args : PStorage ); - var - K, L : Int; - begin - L := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp2.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - K := exc.func_project( exc.zp2.cur^[L], Null_Vector ); - - exc.func_move( @exc.zp2, L, args^[1] - K ); - - (* not part of the specs, but here for safety *) - - if exc.GS.gep2 = 0 then - exc.zp2.org^[L] := exc.zp2.cur^[L]; - - end; - -(**********************************************) -(* MD[a] : Measure Distance *) -(* CodeRange : $49-$4A *) - -(* BULLSHIT : Measure taken in the original glyph must be along *) -(* the dual projection vector *) - -(* Second BULLSHIT : Flag attributions are inverted !! *) -(* 0 => measure distance in original outline *) -(* 1 => measure distance in grid-fitted outline *) - - procedure Ins_MD( args : PStorage ); - var - K, L : Int; - D : TT_F26dot6; - vec1 : TT_Vector; - vec2 : TT_Vector; - begin - K := args^[1]; - L := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp0.n_points) or - (args^[1] < 0) or (args^[1] >= exc.zp1.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - case exc.opcode and 1 of - - 0 : D := exc.func_dualProj( exc.zp0.org^[L], exc.zp1.org^[K] ); - 1 : D := exc.func_project ( exc.zp0.cur^[L], exc.zp1.cur^[K] ); - end; - - args^[0] := D; - end; - -(**********************************************) -(* MPPEM[] : Measure Pixel Per EM *) -(* CodeRange : $4B *) - - procedure Ins_MPPEM( args : PStorage ); - begin - args^[0] := Get_Ppem; - end; - -(**********************************************) -(* MPS[] : Measure PointSize *) -(* CodeRange : $4C *) - - procedure Ins_MPS( args : PStorage ); - begin - args^[0] := exc.metrics.pointSize; - end; - -(****************************************************************) -(* *) -(* MANAGING OUTLINES *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - - -(**********************************************) -(* FLIPPT[] : FLIP PoinT *) -(* CodeRange : $80 *) - - procedure Ins_FLIPPT( args : PStorage ); - var - point : Int; - begin - if exc.top < exc.GS.loop then - begin - exc.error := TT_Err_Too_Few_Arguments; - exit; - end; - - while exc.GS.loop > 0 do - begin - dec( exc.args ); - - point := exc.stack^[ exc.args ]; - - if (point < 0) or (point >= exc.pts.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - exc.pts.flags^[point] := exc.pts.flags^[point] xor TT_Flag_On_Curve; - - dec( exc.GS.loop ); - end; - - exc.GS.loop := 1; - exc.new_top := exc.args; - end; - -(**********************************************) -(* FLIPRGON[]: FLIP RanGe ON *) -(* CodeRange : $81 *) - - procedure Ins_FLIPRGON( args : PStorage ); - var - I, K, L : Int; - begin - K := args^[1]; - L := args^[0]; - - if (K < 0) or (K >= exc.pts.n_points) or - (L < 0) or (L >= exc.pts.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - for I := L to K do - exc.pts.flags^[I] := exc.pts.flags^[I] or TT_Flag_On_Curve; - end; - -(**********************************************) -(* FLIPRGOFF : FLIP RanGe OFF *) -(* CodeRange : $82 *) - - procedure Ins_FLIPRGOFF( args : PStorage ); - var - I, K, L : Int; - begin - K := args^[1]; - L := args^[0]; - - if (K < 0) or (K >= exc.pts.n_points) or - (L < 0) or (L >= exc.pts.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - for I := L to K do - exc.pts.flags^[I] := exc.pts.flags^[I] and not TT_Flag_On_Curve; - end; - - - - function Compute_Point_Displacement( var x : TT_F26dot6; - var y : TT_F26dot6; - var zone : PGlyph_Zone; - var refp : Int ) : TError; - var - zp : PGlyph_Zone; - p : Int; - d : TT_F26dot6; - vec1 : TT_Vector; - vec2 : TT_Vector; - begin - - Compute_Point_Displacement := Success; - - case exc.opcode and 1 of - 0 : begin zp := @exc.zp1; p := exc.GS.rp2; end; - 1 : begin zp := @exc.zp0; p := exc.GS.rp1; end; - end; - - if (p < 0) or (p >= zp^.n_points) then - begin - exc.error := TT_Err_Invalid_Displacement; - Compute_Point_Displacement := Failure; - exit; - end; - - zone := zp; - refp := p; - - d := exc.func_project( zp^.cur^[p], zp^.org^[p] ); - - x := MulDiv_Round( d, Long(exc.GS.freeVector.x)*$10000, exc.F_dot_P ); - y := MulDiv_Round( d, Long(exc.GS.freeVector.y)*$10000, exc.F_dot_P ); - - end; - - - procedure Move_Zp2_Point( point : Int; - dx : TT_F26dot6; - dy : TT_F26dot6 ); - begin - if exc.GS.freeVector.x <> 0 then - begin - inc( exc.zp2.cur^[point].x, dx ); - exc.zp2.flags^[point] := exc.zp2.flags^[point] or TT_Flag_Touched_X; - end; - - if exc.GS.freeVector.y <> 0 then - begin - inc( exc.zp2.cur^[point].y, dy ); - exc.zp2.flags^[point] := exc.zp2.flags^[point] or TT_Flag_Touched_Y; - end; - end; - -(**********************************************) -(* SHP[a] : SHift Point by the last point *) -(* CodeRange : $32-33 *) - - procedure Ins_SHP( args : PStorage ); - var - zp : PGlyph_Zone; - refp : Int; - - dx : TT_F26dot6; - dy : TT_F26dot6; - point: Int; - begin - - if Compute_Point_Displacement( dx, dy, zp, refp ) then - exit; - - if exc.top < exc.GS.loop then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - while exc.GS.loop > 0 do - begin - - dec( exc.args ); - - point := exc.stack^[ exc.args ]; - - if (point < 0) or (point >= exc.zp2.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - Move_Zp2_Point( point, dx, dy ); - - dec( exc.GS.loop ); - - end; - - exc.GS.loop := 1; - exc.new_top := exc.args; - end; - -(**********************************************) -(* SHC[a] : SHift Contour *) -(* CodeRange : $34-35 *) - - procedure Ins_SHC( args : PStorage ); - var - zp : PGlyph_Zone; - refp : Int; - dx : TT_F26dot6; - dy : TT_F26dot6; - - contour, i : Int; - - first_point, last_point : Int; - begin - - contour := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.pts.n_contours ) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - if Compute_Point_Displacement( dx, dy, zp, refp ) then - exit; - - if contour = 0 then first_point := 0 else - first_point := exc.pts.conEnds^[contour-1]+1; - - last_point := exc.pts.conEnds^[contour]; - - for i := first_point to last_point do - begin - if (zp^.cur <> exc.zp2.cur) or - (refp <> i ) then - - Move_Zp2_Point( i, dx, dy ); - end; - - end; - -(**********************************************) -(* SHZ[a] : SHift Zone *) -(* CodeRange : $36-37 *) - - procedure Ins_SHZ( args : PStorage ); - var - zp : PGlyph_Zone; - refp : Int; - dx : TT_F26dot6; - dy : TT_F26dot6; - - zone, i : Int; - - last_point : Int; - begin - - zone := args^[0]; - - if (args^[0] < 0) or (args^[0] > 1) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - if Compute_Point_Displacement( dx, dy, zp, refp ) then - exit; - - last_point := zp^.n_points-1; - - for i := 0 to last_point do - begin - if (zp^.cur <> exc.zp2.cur) or - (refp <> i ) then - - Move_Zp2_Point( i, dx, dy ); - end; - - end; - -(**********************************************) -(* SHPIX[] : SHift points by a PIXel amount *) -(* CodeRange : $38 *) - - procedure Ins_SHPIX( args : PStorage ); - var - dx : TT_F26dot6; - dy : TT_F26dot6; - point: Int; - begin - - if exc.top < exc.GS.loop then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - dx := MulDiv_Round( args^[0], - exc.GS.freeVector.x, - $4000 ); - - dy := MulDiv_Round( args^[0], - exc.GS.freeVector.y, - $4000 ); - - while exc.GS.loop > 0 do - begin - - dec( exc.args ); - - point := exc.stack^[ exc.args ]; - - if (point < 0) or (point >= exc.zp2.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - Move_Zp2_Point( point, dx, dy ); - - dec( exc.GS.loop ); - - end; - - exc.GS.loop := 1; - exc.new_top := exc.args; - end; - -(**********************************************) -(* MSIRP[a] : Move Stack Indirect Relative *) -(* CodeRange : $3A-$3B *) - - procedure Ins_MSIRP( args : PStorage ); - var - point : Int; - distance : TT_F26dot6; - vec1 : TT_Vector; - vec2 : TT_Vector; - begin - - point := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp1.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - (* XXX : UNDOCUMENTED - Twilight Zone *) - - (* Again, one stupid undocumented feature found in the *) - (* twilight zone. What did these guys had in mind when *) - (* they wrote the spec ? There _must_ be another *) - (* specification than the published one !! #@%$& !! *) - - if exc.GS.gep0 = 0 then (* if in twilight zone *) - begin - exc.zp1.org^[point] := exc.zp0.org^[exc.GS.rp0]; - exc.zp1.cur^[point] := exc.zp1.org^[point]; - end; - - distance := exc.func_project( exc.zp1.cur^[point], - exc.zp0.cur^[exc.GS.rp0] ); - - exc.func_move( @exc.zp1, point, args^[1] - distance ); - - exc.GS.rp1 := exc.GS.rp0; - exc.GS.rp2 := point; - - if exc.opcode and 1 <> 0 then exc.GS.rp0 := point; - end; - -(**********************************************) -(* MDAP[a] : Move Direct Absolute Point *) -(* CodeRange : $2E-$2F *) - - procedure Ins_MDAP( args : PStorage ); - var - point : Int; - cur_dist : TT_F26dot6; - distance : TT_F26dot6; - begin - point := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp0.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - (* XXXX Is there some undocumented feature while in the *) - (* twilight zone ?? *) - - if exc.opcode and 1 <> 0 then - begin - - cur_dist := exc.func_project( exc.zp0.cur^[point], Null_Vector ); - - distance := exc.func_round( cur_dist, - exc.metrics.compensations[0] ) - - cur_dist; - end - else - distance := 0; - - exc.func_move( @exc.zp0, point, distance ); - - exc.GS.rp0 := point; - exc.GS.rp1 := point; - end; - -(**********************************************) -(* MIAP[a] : Move Indirect Absolute Point *) -(* CodeRange : $3E-$3F *) - - procedure Ins_MIAP( args : PStorage ); - var - cvtEntry : Int; - point : Int; - distance : TT_F26dot6; - org_dist : TT_F26dot6; - begin - cvtEntry := args^[1]; - point := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp0.n_points ) or - (args^[1] < 0) or (args^[1] >= exc.cvtSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - (* Undocumented : *) - (* *) - (* The behaviour of an MIAP instruction is quite *) - (* different when used in the twilight zone^. *) - (* *) - (* First, no control value cutin test is performed *) - (* as it would fail anyway. Second, the original *) - (* point, i.e. (org_x,org_y) of zp0.point, is set *) - (* to the absolute, unrounded, distance found in *) - (* the CVT. *) - (* *) - (* This is used in the CVT programs of the Microsoft *) - (* fonts Arial, Times, etc.., in order to re-adjust *) - (* some key font heights. It allows the use of the *) - (* IP instruction in the twilight zone, which *) - (* otherwise would be "illegal" per se the specs :) *) - (* *) - (* We implement it with a special sequence for the *) - (* twilight zone. This is a bad hack, but it seems *) - (* to work.. *) - (* - David *) - - distance := exc.func_read_cvt(cvtEntry); - - if exc.GS.gep0 = 0 then (* If in twilight zone *) - begin - exc.zp0.org^[point].y := MulDiv_Round( exc.GS.freeVector.x, - distance, - $4000 ); - - exc.zp0.org^[point].y := MulDiv_Round( exc.GS.freeVector.y, - distance, - $4000 ); - - exc.zp0.cur^[point] := exc.zp0.org^[point]; - end; - - org_dist := exc.func_project( exc.zp0.cur^[point], Null_Vector ); - - if exc.opcode and 1 <> 0 then (* rounding and control cutin flag *) - begin - - if abs( distance-org_dist ) > exc.GS.control_value_cutin then - distance := org_dist; - - distance := exc.func_round( distance, - exc.metrics.compensations[0] ); - end; - - exc.func_move( @exc.zp0, point, distance - org_dist ); - - exc.GS.rp0 := point; - exc.GS.rp1 := point; - - end; - -(**********************************************) -(* MDRP[abcde] : Move Direct Relative Point *) -(* CodeRange : $C0-$DF *) - - procedure Ins_MDRP( args : PStorage ); - var - point : Int; - distance : TT_F26dot6; - org_dist : TT_F26dot6; - begin - point := args^[0]; - - if (args^[0] < 0) or (args^[0] >= exc.zp1.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - (* XXXX Is there some undocumented feature while in the *) - (* twilight zone ?? *) - - org_dist := exc.func_dualProj( exc.zp1.org^[point], - exc.zp0.org^[exc.GS.rp0] ); - (* single width cutin test *) - - if abs(org_dist) < exc.GS.single_width_cutin then - - if org_dist >= 0 then org_dist := exc.GS.single_width_value - else org_dist := -exc.GS.single_width_value; - - (* round flag *) - - if exc.opcode and 4 <> 0 then - - distance := exc.func_round( org_dist, - exc.metrics.compensations[ exc.opcode and 3 ] ) - else - distance := Round_None( org_dist, - exc.metrics.compensations[ exc.opcode and 3 ] ); - - (* minimum distance flag *) - - if exc.opcode and 8 <> 0 then - begin - - if org_dist >= 0 then - - if distance < exc.GS.minimum_distance then - distance := exc.GS.minimum_distance - else - else - if distance > -exc.GS.minimum_distance then - distance := -exc.GS.minimum_distance; - end; - - (* now move the point *) - - org_dist := exc.func_project( exc.zp1.cur^[point], - exc.zp0.cur^[exc.GS.rp0] ); - - exc.func_move( @exc.zp1, point, distance - org_dist ); - - exc.GS.rp1 := exc.GS.rp0; - exc.GS.rp2 := point; - - if exc.opcode and 16 <> 0 then exc.GS.rp0 := point; - end; - -(**********************************************) -(* MIRP[abcde] : Move Indirect Relative Point *) -(* CodeRange : $E0-$FF *) - - procedure Ins_MIRP( args : PStorage ); - var - point : Int; - cvtEntry : Int; - cvt_dist : TT_F26dot6; - distance : TT_F26dot6; - cur_dist : TT_F26dot6; - org_dist : TT_F26dot6; - begin - - point := args^[0]; - cvtEntry := args^[1]; - - (* XXX : UNDOCUMENTED => cvt[-1] = 0 ???? *) - - if (args^[0] < 0 ) or (args^[0] >= exc.zp1.n_points) or - (args^[1] < -1) or (args^[1] >= exc.cvtSize) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - if cvtEntry < 0 then - cvt_dist := 0 - else - cvt_dist := exc.func_read_cvt(cvtEntry); - - (* single width test *) - - if abs(cvt_dist) < exc.GS.single_width_cutin then - - if cvt_dist >= 0 then cvt_dist := exc.GS.single_width_value - else cvt_dist := -exc.GS.single_width_value; - - (* XXX : Undocumented - twilight zone *) - - if exc.GS.gep1 = 0 then (* if in twilight zone *) - begin - exc.zp1.org^[point].x := exc.zp0.org^[exc.GS.rp0].x + - MulDiv_Round( cvt_dist, - exc.GS.freeVector.x, - $4000 ); - - exc.zp1.org^[point].x := exc.zp0.org^[exc.GS.rp0].y + - MulDiv_Round( cvt_dist, - exc.GS.freeVector.y, - $4000 ); - - exc.zp1.cur^[point] := exc.zp1.org^[point]; - end; - - - org_dist := exc.func_dualProj( exc.zp1.org^[point], - exc.zp0.org^[exc.GS.rp0] ); - - cur_dist := exc.func_Project( exc.zp1.cur^[point], - exc.zp0.cur^[exc.GS.rp0] ); - - (* auto-flip test *) - - if exc.GS.auto_flip then - if (org_dist xor cvt_dist < 0) then - cvt_dist := -cvt_dist; - - (* control value cutin and round *) - - if exc.opcode and 4 <> 0 then - begin - (* XXX : UNDOCUMENTED : only perform cut-in test when both *) - (* zone pointers refer to the points zone *) - - if exc.GS.gep0 = exc.GS.gep1 then - if abs( cvt_dist - org_dist ) >= exc.GS.control_value_cutin then - cvt_dist := org_dist; - - distance := exc.func_round( cvt_dist, - exc.metrics.compensations[ exc.opcode and 3 ] ); - end - else - distance := Round_None( cvt_dist, - exc.metrics.compensations[ exc.opcode and 3 ] ); - - (* minimum distance test *) - - if exc.opcode and 8 <> 0 then - begin - if org_dist >= 0 then - - if distance < exc.GS.minimum_distance then - distance := exc.GS.minimum_distance - else - else - if distance > -exc.GS.minimum_distance then - distance := -exc.GS.minimum_distance; - end; - - exc.func_move( @exc.zp1, point, distance - cur_dist ); - - exc.GS.rp1 := exc.GS.rp0; - - if exc.opcode and 16 <> 0 then exc.GS.rp0 := point; - - (* UNDOCUMENTED !! *) - - exc.GS.rp2 := point; - end; - -(**********************************************) -(* ALIGNRP[] : ALIGN Relative Point *) -(* CodeRange : $3C *) - - procedure Ins_ALIGNRP( args : PStorage ); - var - point : Int; - distance : TT_F26dot6; - begin - if exc.top < exc.GS.loop then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - while exc.GS.loop > 0 do - begin - - dec( exc.args ); - - point := exc.stack^[ exc.args ]; - - if (point < 0) or (point >= exc.zp1.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - distance := exc.func_project( exc.zp1.cur^[point], - exc.zp0.cur^[exc.GS.rp0] ); - - exc.func_move( @exc.zp1, point, -distance ); - - dec( exc.GS.loop ); - end; - - exc.GS.loop := 1; - exc.new_top := exc.args; - end; - -(**********************************************) -(* AA[] : Adjust Angle *) -(* CodeRange : $7F *) - - procedure Ins_AA( args : PStorage ); - begin - (* Intentional - no longer supported *) - end; - -(**********************************************) -(* ISECT[] : moves point to InterSECTion *) -(* CodeRange : $0F *) - - procedure Ins_ISECT( args : PStorage ); - var - point : Int; - a0, a1 : Int; - b0, b1 : Int; - - discriminant : TT_F26dot6; - dx, dy, - dax, day, - dbx, dby : TT_F26dot6; - - val : TT_F26dot6; - - R : TT_Vector; - - U, V : TT_UnitVector; - T1, T2 : Int64; - begin - - point := args^[0]; - a0 := args^[1]; - a1 := args^[2]; - b0 := args^[3]; - b1 := args^[4]; - - if (b0 >= exc.zp0.n_points) or (b1 >= exc.zp0.n_points) or - (a0 >= exc.zp1.n_points) or (a1 >= exc.zp1.n_points) or - (point >= exc.zp0.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; -(* - if Normalize( exc.zp1.cur_x^[a1] - exc.zp1.cur_x^[a0], - exc.zp1.cur_y^[a1] - exc.zp1.cur_y^[a0], - U ) - and - Normalize( - exc.zp0.cur_x^[b1] - exc.zp0.cur_x^[b0], - exc.zp0.cur_y^[b1] - exc.zp0.cur_y^[b0], - V ) - then - begin - - dx := MulDiv_Round( exc.zp0.cur_x^[b0] - - exc.zp1.cur_x^[a0], - V.x, - $4000 ) + - - MulDiv_Round( exc.zp0.cur_y^[b0] - - exc.zp1.cur_y^[a0], - V.y, - $4000 ); - - dy := MulDiv_Round( U.x, V.x, $4000 ) + - MulDiv_Round( U.y, V.y, $4000 ); - - if dy <> 0 then - begin - dx := MulDiv_Round( dx, $4000, dy ); - - exc.zp2.flags^[point] := exc.zp2.flags^[point] or - TT_Flag_Touched_Both; - - exc.zp2.cur_x^[point] := exc.zp1.cur_x^[a0] + - - MulDiv_Round( dx, U.x, $4000 ); - - exc.zp2.cur_y^[point] := exc.zp1.cur_y^[a0] + - - MulDiv_Round( dx, U.y, $4000 ); - - exit; - end; - end; - *) - dbx := exc.zp0.cur^[b1].x - exc.zp0.cur^[b0].x; - dby := exc.zp0.cur^[b1].y - exc.zp0.cur^[b0].y; - - dax := exc.zp1.cur^[a1].x - exc.zp1.cur^[a0].x; - day := exc.zp1.cur^[a1].y - exc.zp1.cur^[a0].y; - - dx := exc.zp0.cur^[b0].x - exc.zp1.cur^[a0].x; - dy := exc.zp0.cur^[b0].y - exc.zp1.cur^[a0].y; - - exc.zp2.flags^[point] := exc.zp2.flags^[point] or - TT_Flag_Touched_Both; - - discriminant := MulDiv( dax, -dby, $40 ) + - MulDiv( day, dbx, $40 ); - - if abs(discriminant) >= $40 then - begin - - val := MulDiv( dx, -dby, $40 ) + - MulDiv( dy, dbx, $40 ); - - R.x := MulDiv( val, dax, discriminant ); - R.y := MulDiv( val, day, discriminant ); - - exc.zp2.cur^[point].x := exc.zp1.cur^[a0].x + R.x; - exc.zp2.cur^[point].y := exc.zp1.cur^[a0].y + R.y; - end - else - begin - - (* else, take the middle of the middles of A and B *) - - exc.zp2.cur^[point].x := ( exc.zp1.cur^[a0].x + - exc.zp1.cur^[a1].x + - exc.zp0.cur^[b0].x + - exc.zp0.cur^[b1].x ) div 4; - - exc.zp2.cur^[point].y := ( exc.zp1.cur^[a0].y + - exc.zp1.cur^[a1].y + - exc.zp0.cur^[b0].y + - exc.zp0.cur^[b1].y ) div 4; - end; - end; - -(**********************************************) -(* ALIGNPTS[] : ALIGN PoinTS *) -(* CodeRange : $27 *) - - procedure Ins_ALIGNPTS( args : PStorage ); - var - p1, p2 : Int; - distance : TT_F26dot6; - begin - p1 := args^[0]; - p2 := args^[1]; - - if (args^[0] < 0) or (args^[0] >= exc.zp1.n_points) or - (args^[1] < 0) or (args^[1] >= exc.zp0.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - distance := exc.func_project( exc.zp0.cur^[p2], - exc.zp1.cur^[p1] ) div 2; - - exc.func_move( @exc.zp1, p1, distance ); - exc.func_move( @exc.zp0, p2, -distance ); - end; - -(**********************************************) -(* IP[] : Interpolate Point *) -(* CodeRange : $39 *) - - procedure Ins_IP( args : PStorage ); - var - org_a : TT_F26dot6; - org_b : TT_F26dot6; - org_x : TT_F26dot6; - cur_a : TT_F26dot6; - cur_b : TT_F26dot6; - cur_x : TT_F26dot6; - - distance : TT_F26dot6; - - point : Int; - begin - - if exc.top < exc.GS.loop then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - org_a := exc.func_dualProj( exc.zp0.org^[exc.GS.rp1], Null_Vector ); - - org_b := exc.func_dualProj( exc.zp1.org^[exc.GS.rp2], Null_Vector ); - - cur_a := exc.func_project( exc.zp0.cur^[exc.GS.rp1], Null_Vector ); - - cur_b := exc.func_project( exc.zp1.cur^[exc.GS.rp2], Null_Vector ); - - while exc.GS.loop > 0 do - begin - - dec( exc.args ); - - point := exc.stack^[ exc.args ]; - - org_x := exc.func_dualProj( exc.zp2.org^[point], Null_Vector ); - - cur_x := exc.func_project( exc.zp2.cur^[point], Null_Vector ); - - if (( org_a <= org_b ) and ( org_x <= org_a )) or - (( org_a > org_b ) and ( org_x >= org_a )) then - begin - distance := ( cur_a - org_a ) + ( org_x - cur_x ); - end - else - if (( org_a <= org_b ) and ( org_x >= org_b )) or - (( org_a > org_b ) and ( org_x < org_b )) then - begin - distance := ( cur_b - org_b ) + ( org_x - cur_x ); - end - else - begin - (* note : it seems that rounding this value isn't a good *) - (* idea ( width of capital 'S' in Times *) - - distance := MulDiv( cur_b - cur_a, - org_x - org_a, - org_b - org_a ) + ( cur_a - cur_x ); - end; - - exc.func_move( @exc.zp2, point, distance ); - - dec( exc.GS.loop ); - end; - - exc.GS.loop := 1; - exc.new_top := exc.args; - end; - -(**********************************************) -(* UTP[a] : UnTouch Point *) -(* CodeRange : $29 *) - - procedure Ins_UTP( args : PStorage ); - var - mask : Byte; - begin - if (args^[0] < 0) or (args^[0] >= exc.zp0.n_points) then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - mask := $FF; - - if exc.GS.freeVector.x <> 0 then mask := mask and not TT_Flag_Touched_X; - if exc.GS.freeVector.y <> 0 then mask := mask and not TT_Flag_Touched_Y; - - exc.zp0.flags^[args^[0]] := exc.zp0.flags^[args^[0]] and mask; - end; - -(**********************************************) -(* IUP[a] : Interpolate Untouched Points *) -(* CodeRange : $30-$31 *) - - procedure Ins_IUP( args : PStorage ); - var - mask : byte; - - first_point, (* first point of contour *) - end_point, (* end point (last+1) of contour *) - - first_touched, (* first touched point in contour *) - cur_touched, (* current touched point in contour *) - - point, (* current point *) - contour : Int; (* current contour *) - - orgs, (* original and current coordinate *) - curs : TT_Points; (* arrays *) - - procedure Shift_X( p1, p2, p : Int ); - var - i : Int; - x : TT_F26dot6; - begin - x := curs^[p].x - orgs^[p].x; - - for i := p1 to p-1 do inc( curs^[i].x, x ); - for i := p+1 to p2 do inc( curs^[i].x, x ); - end; - - procedure Shift_Y( p1, p2, p : Int ); - var - i : Int; - y : TT_F26dot6; - begin - y := curs^[p].y - orgs^[p].y; - - for i := p1 to p-1 do inc( curs^[i].y, y ); - for i := p+1 to p2 do inc( curs^[i].y, y ); - end; - - - procedure Interp_X( p1, p2, ref1, ref2 : Int ); - var - i : Int; - x, x1, x2, d1, d2 : TT_F26dot6; - begin - - if p1 > p2 then exit; - - x1 := orgs^[ref1].x; d1 := curs^[ref1].x - orgs^[ref1].x; - x2 := orgs^[ref2].x; d2 := curs^[ref2].x - orgs^[ref2].x; - - if x1 = x2 then - for i := p1 to p2 do - begin - x := orgs^[i].x; - if x <= x1 then x := x + d1 - else x := x + d2; - - curs^[i].x := x; - end - - else - if x1 < x2 then - - for i := p1 to p2 do - begin - x := orgs^[i].x; - - if (x <= x1) then x := x + d1 - else - if (x >= x2) then x := x + d2 - else - x := curs^[ref1].x + - MulDiv( x-x1, curs^[ref2].x-curs^[ref1].x, x2-x1 ); - - curs^[i].x := x; - end - else - - (* x2 < x1 *) - - for i := p1 to p2 do - begin - x := orgs^[i].x; - - if ( x <= x2 ) then x := x + d2 - else - if ( x >= x1 ) then x := x + d1 - else - x := curs^[ref1].x + - MulDiv( x-x1, curs^[ref2].x-curs^[ref1].x, x2-x1 ); - - curs^[i].x := x; - end; - end; - - procedure Interp_Y( p1, p2, ref1, ref2 : Int ); - var - i : Int; - y, y1, y2, d1, d2 : TT_F26dot6; - begin - - if p1 > p2 then exit; - - y1 := orgs^[ref1].y; d1 := curs^[ref1].y - orgs^[ref1].y; - y2 := orgs^[ref2].y; d2 := curs^[ref2].y - orgs^[ref2].y; - - if y1 = y2 then - for i := p1 to p2 do - begin - y := orgs^[i].y; - if y <= y1 then y := y + d1 - else y := y + d2; - - curs^[i].y := y; - end - - else - if y1 < y2 then - - for i := p1 to p2 do - begin - y := orgs^[i].y; - - if (y <= y1) then y := y + d1 - else - if (y >= y2) then y := y + d2 - else - y := curs^[ref1].y + - MulDiv( y-y1, curs^[ref2].y-curs^[ref1].y, y2-y1 ); - - curs^[i].y := y; - end - else - - (* y2 < y1 *) - - for i := p1 to p2 do - begin - y := orgs^[i].y; - - if ( y <= y2 ) then y := y + d2 - else - if ( y >= y1 ) then y := y + d1 - else - y := curs^[ref1].y + - MulDiv( y-y1, curs^[ref2].y-curs^[ref1].y, y2-y1 ); - - curs^[i].y := y; - end; - end; - - begin - orgs := exc.pts.org; - curs := exc.pts.cur; - - case exc.opcode and 1 of - 0 : mask := TT_Flag_Touched_Y; - 1 : mask := TT_Flag_Touched_X; - end; - - with exc do - begin - - contour := 0; - point := 0; - - repeat - - end_point := pts.conEnds^[contour]; - first_point := point; - - while ( point <= end_point ) and - ( pts.flags^[point] and mask = 0 ) do inc(point); - - if point <= end_point then - begin - - first_touched := point; - cur_touched := point; - - inc( point ); - - while ( point <= end_point ) do - begin - if pts.flags^[point] and mask <> 0 then - begin - if opcode and 1 <> 0 then - Interp_X( cur_touched+1, point-1, cur_touched, point ) - else - Interp_Y( cur_touched+1, point-1, cur_touched, point ); - - cur_touched := point; - end; - - inc( point ); - end; - - if cur_touched = first_touched then - if opcode and 1 <> 0 then - Shift_X( first_point, end_point, cur_touched ) - else - Shift_Y( first_point, end_point, cur_touched ) - else - begin - if opcode and 1 <> 0 then - begin - interp_x( cur_touched+1, end_point, cur_touched, first_touched ); - interp_x( first_point, first_touched-1, cur_touched, first_touched ); - end - else - begin - interp_y( cur_touched+1, end_point, cur_touched, first_touched ); - interp_y( first_point, first_touched-1, cur_touched, first_touched ); - end; - end; - - end; - - inc( contour ); - - until contour >= pts.n_contours; - - end; - - end; - -(**********************************************) -(* DELTAPn[] : DELTA Exceptions P1, P2, P3 *) -(* CodeRange : $5D,$71,$72 *) - - procedure Ins_DELTAP( args : PStorage ); - var - nump : Int; - k : Int; - A, B, C :Int; - begin - - nump := args^[0]; - - for K := 1 to nump do - begin - if exc.args < 2 then - begin - exc.error := TT_Err_Too_Few_Arguments; - exit; - end; - - dec( exc.args, 2 ); - - A := exc.stack^[exc.args+1]; - B := exc.stack^[ exc.args ]; - - (* XXX : *) - (* some commonly fonts have broke programs where the *) - (* the point reference has an invalid value. Here, we *) - (* simply ignore them, because a DeltaP won't change *) - (* a glyph shape dramatically.. *) - (* *) - - if A < exc.zp0.n_points then - begin - C := ( B and $F0 ) shr 4; - - Case exc.opcode of - $5D : ; - $71 : C := C+16; - $72 : C := C+32; - end; - - C := C + exc.GS.delta_Base; - - if GET_Ppem = C then - begin - B := (B and $F) - 8; - if B >= 0 then B := B+1; - B := ( B*64 ) div ( 1 shl exc.GS.delta_Shift ); - - exc.func_move( @exc.zp0, A, B ); - end; - end; - - end; - - exc.new_top := exc.args; - end; - - -(**********************************************) -(* DELTACn[] : DELTA Exceptions C1, C2, C3 *) -(* CodeRange : $73,$74,$75 *) - - procedure Ins_DELTAC( args : PStorage ); - var - nump : Int; - k : Int; - A, B, C :Int; - begin - - nump := args^[0]; - - for K := 1 to nump do - begin - if exc.args < 2 then - begin - exc.error := TT_Err_Too_Few_Arguments; - exit; - end; - - dec( exc.args, 2 ); - - A := exc.stack^[exc.args+1]; - B := exc.stack^[ exc.args ]; - - if A >= exc.cvtSize then - begin - exc.error := TT_Err_Invalid_Reference; - exit; - end; - - C := ( B and $F0 ) shr 4; - - Case exc.opcode of - $73 : ; - $74 : C := C+16; - $75 : C := C+32; - end; - - C := C + exc.GS.delta_Base; - - if GET_Ppem = C then - begin - B := (B and $F) - 8; - if B >= 0 then B := B+1; - B := ( B*64 ) div ( 1 shl exc.GS.delta_Shift ); - - exc.func_move_cvt( A, B ); - end; - end; - - exc.new_top := exc.args; - end; - -(****************************************************************) -(* *) -(* MISC. INSTRUCTIONS *) -(* *) -(****************************************************************) - -(***********************************************************) -(* DEBUG[] : DEBUG. Unsupported *) -(* CodeRange : $4F *) - -(* NOTE : The original instruction pops a value from the stack *) - - procedure Ins_DEBUG( args : PStorage ); - begin - exc.error := TT_Err_Debug_Opcode; - end; - -(**********************************************) -(* GETINFO[] : GET INFOrmation *) -(* CodeRange : $88 *) - - procedure Ins_GETINFO( args : PStorage ); - var - K : Int; - begin - K := 0; - - if args^[0] and 1 <> 0 then K := 3; - (* We return then Windows 3.1 version number *) - (* for the font scaler *) - - if false then K := K or $80; - (* Has the glyph been rotated ? *) - (* XXXX TO DO *) - - if false then K := K or $100; - (* Has the glyph been stretched ? *) - (* XXXX TO DO *) - - args^[0] := K; - end; - - - procedure Ins_UNKNOWN( args : PStorage ); - begin - exc.error := TT_Err_Invalid_Opcode; - end; - {$F-} - - - -const - Instruct_Dispatch : array[0..255] of TInstruction_Function - = ( - (* SVTCA y *) Ins_SVTCA, - (* SVTCA x *) Ins_SVTCA, - (* SPvTCA y *) Ins_SPVTCA, - (* SPvTCA x *) Ins_SPVTCA, - (* SFvTCA y *) Ins_SFVTCA, - (* SFvTCA x *) Ins_SFVTCA, - (* SPvTL // *) Ins_SPVTL, - (* SPvTL + *) Ins_SPVTL, - (* SFvTL // *) Ins_SFVTL, - (* SFvTL + *) Ins_SFVTL, - (* SPvFS *) Ins_SPVFS, - (* SFvFS *) Ins_SFVFS, - (* GPV *) Ins_GPV, - (* GFV *) Ins_GFV, - (* SFvTPv *) Ins_SFVTPV, - (* ISECT *) Ins_ISECT, - - (* SRP0 *) Ins_SRP0, - (* SRP1 *) Ins_SRP1, - (* SRP2 *) Ins_SRP2, - (* SZP0 *) Ins_SZP0, - (* SZP1 *) Ins_SZP1, - (* SZP2 *) Ins_SZP2, - (* SZPS *) Ins_SZPS, - (* SLOOP *) Ins_SLOOP, - (* RTG *) Ins_RTG, - (* RTHG *) Ins_RTHG, - (* SMD *) Ins_SMD, - (* ELSE *) Ins_ELSE, - (* JMPR *) Ins_JMPR, - (* SCvTCi *) Ins_SCVTCI, - (* SSwCi *) Ins_SSWCI, - (* SSW *) Ins_SSW, - - (* DUP *) Ins_DUP, - (* POP *) Ins_POP, - (* CLEAR *) Ins_CLEAR, - (* SWAP *) Ins_SWAP, - (* DEPTH *) Ins_DEPTH, - (* CINDEX *) Ins_CINDEX, - (* MINDEX *) Ins_MINDEX, - (* AlignPTS *) Ins_ALIGNPTS, - (* INS_$28 *) Ins_UNKNOWN, - (* UTP *) Ins_UTP, - (* LOOPCALL *) Ins_LOOPCALL, - (* CALL *) Ins_CALL, - (* FDEF *) Ins_FDEF, - (* ENDF *) Ins_ENDF, - (* MDAP[0] *) Ins_MDAP, - (* MDAP[1] *) Ins_MDAP, - - (* IUP[0] *) Ins_IUP, - (* IUP[1] *) Ins_IUP, - (* SHP[0] *) Ins_SHP, - (* SHP[1] *) Ins_SHP, - (* SHC[0] *) Ins_SHC, - (* SHC[1] *) Ins_SHC, - (* SHZ[0] *) Ins_SHZ, - (* SHZ[1] *) Ins_SHZ, - (* SHPIX *) Ins_SHPIX, - (* IP *) Ins_IP, - (* MSIRP[0] *) Ins_MSIRP, - (* MSIRP[1] *) Ins_MSIRP, - (* AlignRP *) Ins_ALIGNRP, - (* RTDG *) Ins_RTDG, - (* MIAP[0] *) Ins_MIAP, - (* MIAP[1] *) Ins_MIAP, - - (* NPushB *) Ins_NPUSHB, - (* NPushW *) Ins_NPUSHW, - (* WS *) Ins_WS, - (* RS *) Ins_RS, - (* WCvtP *) Ins_WCVTP, - (* RCvt *) Ins_RCVT, - (* GC[0] *) Ins_GC, - (* GC[1] *) Ins_GC, - (* SCFS *) Ins_SCFS, - (* MD[0] *) Ins_MD, - (* MD[1] *) Ins_MD, - (* MPPEM *) Ins_MPPEM, - (* MPS *) Ins_MPS, - (* FlipON *) Ins_FLIPON, - (* FlipOFF *) Ins_FLIPOFF, - (* DEBUG *) Ins_DEBUG, - - (* LT *) Ins_LT, - (* LTEQ *) Ins_LTEQ, - (* GT *) Ins_GT, - (* GTEQ *) Ins_GTEQ, - (* EQ *) Ins_EQ, - (* NEQ *) Ins_NEQ, - (* ODD *) Ins_ODD, - (* EVEN *) Ins_EVEN, - (* IF *) Ins_IF, - (* EIF *) Ins_EIF, - (* AND *) Ins_AND, - (* OR *) Ins_OR, - (* NOT *) Ins_NOT, - (* DeltaP1 *) Ins_DELTAP, - (* SDB *) Ins_SDB, - (* SDS *) Ins_SDS, - - (* ADD *) Ins_ADD, - (* SUB *) Ins_SUB, - (* DIV *) Ins_DIV, - (* MUL *) Ins_MUL, - (* ABS *) Ins_ABS, - (* NEG *) Ins_NEG, - (* FLOOR *) Ins_FLOOR, - (* CEILING *) Ins_CEILING, - (* ROUND[0] *) Ins_ROUND, - (* ROUND[1] *) Ins_ROUND, - (* ROUND[2] *) Ins_ROUND, - (* ROUND[3] *) Ins_ROUND, - (* NROUND[0]*) Ins_ROUND, - (* NROUND[1]*) Ins_ROUND, - (* NROUND[2]*) Ins_ROUND, - (* NROUND[3]*) Ins_ROUND, - - (* WCvtF *) Ins_WCVTF, - (* DeltaP2 *) Ins_DELTAP, - (* DeltaP3 *) Ins_DELTAP, - (* DeltaCn[0]*) Ins_DELTAC, - (* DeltaCn[1]*) Ins_DELTAC, - (* DeltaCn[2]*) Ins_DELTAC, - (* SROUND *) Ins_SROUND, - (* S45Round *) Ins_S45ROUND, - (* JROT *) Ins_JROT, - (* JROF *) Ins_JROF, - (* ROFF *) Ins_ROFF, - (* INS_$7B *) Ins_UNKNOWN, - (* RUTG *) Ins_RUTG, - (* RDTG *) Ins_RDTG, - (* SANGW *) Ins_SANGW, - (* AA *) Ins_AA, - - (* FlipPT *) Ins_FLIPPT, - (* FlipRgON *) Ins_FLIPRGON, - (* FlipRgOFF*) Ins_FLIPRGOFF, - (* INS_$83 *) Ins_UNKNOWN, - (* INS_$84 *) Ins_UNKNOWN, - (* ScanCTRL *) Ins_SCANCTRL, - (* SDPVTL[0]*) Ins_SDPVTL, - (* SDPVTL[1]*) Ins_SDPVTL, - (* GetINFO *) Ins_GETINFO, - (* IDEF *) Ins_IDEF, - (* ROLL *) Ins_ROLL, - (* MAX *) Ins_MAX, - (* MIN *) Ins_MIN, - (* ScanTYPE *) Ins_SCANTYPE, - (* InstCTRL *) Ins_INSTCTRL, - (* INS_$8F *) Ins_UNKNOWN, - - (* INS_$90 *) Ins_UNKNOWN, - (* INS_$91 *) Ins_UNKNOWN, - (* INS_$92 *) Ins_UNKNOWN, - (* INS_$93 *) Ins_UNKNOWN, - (* INS_$94 *) Ins_UNKNOWN, - (* INS_$95 *) Ins_UNKNOWN, - (* INS_$96 *) Ins_UNKNOWN, - (* INS_$97 *) Ins_UNKNOWN, - (* INS_$98 *) Ins_UNKNOWN, - (* INS_$99 *) Ins_UNKNOWN, - (* INS_$9A *) Ins_UNKNOWN, - (* INS_$9B *) Ins_UNKNOWN, - (* INS_$9C *) Ins_UNKNOWN, - (* INS_$9D *) Ins_UNKNOWN, - (* INS_$9E *) Ins_UNKNOWN, - (* INS_$9F *) Ins_UNKNOWN, - - (* INS_$A0 *) Ins_UNKNOWN, - (* INS_$A1 *) Ins_UNKNOWN, - (* INS_$A2 *) Ins_UNKNOWN, - (* INS_$A3 *) Ins_UNKNOWN, - (* INS_$A4 *) Ins_UNKNOWN, - (* INS_$A5 *) Ins_UNKNOWN, - (* INS_$A6 *) Ins_UNKNOWN, - (* INS_$A7 *) Ins_UNKNOWN, - (* INS_$A8 *) Ins_UNKNOWN, - (* INS_$A9 *) Ins_UNKNOWN, - (* INS_$AA *) Ins_UNKNOWN, - (* INS_$AB *) Ins_UNKNOWN, - (* INS_$AC *) Ins_UNKNOWN, - (* INS_$AD *) Ins_UNKNOWN, - (* INS_$AE *) Ins_UNKNOWN, - (* INS_$AF *) Ins_UNKNOWN, - - (* PushB[0] *) Ins_PUSHB, - (* PushB[1] *) Ins_PUSHB, - (* PushB[2] *) Ins_PUSHB, - (* PushB[3] *) Ins_PUSHB, - (* PushB[4] *) Ins_PUSHB, - (* PushB[5] *) Ins_PUSHB, - (* PushB[6] *) Ins_PUSHB, - (* PushB[7] *) Ins_PUSHB, - (* PushW[0] *) Ins_PUSHW, - (* PushW[1] *) Ins_PUSHW, - (* PushW[2] *) Ins_PUSHW, - (* PushW[3] *) Ins_PUSHW, - (* PushW[4] *) Ins_PUSHW, - (* PushW[5] *) Ins_PUSHW, - (* PushW[6] *) Ins_PUSHW, - (* PushW[7] *) Ins_PUSHW, - - (* MDRP[00] *) Ins_MDRP, - (* MDRP[01] *) Ins_MDRP, - (* MDRP[02] *) Ins_MDRP, - (* MDRP[03] *) Ins_MDRP, - (* MDRP[04] *) Ins_MDRP, - (* MDRP[05] *) Ins_MDRP, - (* MDRP[06] *) Ins_MDRP, - (* MDRP[07] *) Ins_MDRP, - (* MDRP[08] *) Ins_MDRP, - (* MDRP[09] *) Ins_MDRP, - (* MDRP[10] *) Ins_MDRP, - (* MDRP[11] *) Ins_MDRP, - (* MDRP[12] *) Ins_MDRP, - (* MDRP[13] *) Ins_MDRP, - (* MDRP[14] *) Ins_MDRP, - (* MDRP[15] *) Ins_MDRP, - (* MDRP[16] *) Ins_MDRP, - (* MDRP[17] *) Ins_MDRP, - - (* MDRP[18] *) Ins_MDRP, - (* MDRP[19] *) Ins_MDRP, - (* MDRP[20] *) Ins_MDRP, - (* MDRP[21] *) Ins_MDRP, - (* MDRP[22] *) Ins_MDRP, - (* MDRP[23] *) Ins_MDRP, - (* MDRP[24] *) Ins_MDRP, - (* MDRP[25] *) Ins_MDRP, - (* MDRP[26] *) Ins_MDRP, - (* MDRP[27] *) Ins_MDRP, - (* MDRP[28] *) Ins_MDRP, - (* MDRP[29] *) Ins_MDRP, - (* MDRP[30] *) Ins_MDRP, - (* MDRP[31] *) Ins_MDRP, - - (* MIRP[00] *) Ins_MIRP, - (* MIRP[01] *) Ins_MIRP, - (* MIRP[02] *) Ins_MIRP, - (* MIRP[03] *) Ins_MIRP, - (* MIRP[04] *) Ins_MIRP, - (* MIRP[05] *) Ins_MIRP, - (* MIRP[06] *) Ins_MIRP, - (* MIRP[07] *) Ins_MIRP, - (* MIRP[08] *) Ins_MIRP, - (* MIRP[09] *) Ins_MIRP, - (* MIRP[10] *) Ins_MIRP, - (* MIRP[11] *) Ins_MIRP, - (* MIRP[12] *) Ins_MIRP, - (* MIRP[13] *) Ins_MIRP, - (* MIRP[14] *) Ins_MIRP, - (* MIRP[15] *) Ins_MIRP, - - (* MIRP[16] *) Ins_MIRP, - (* MIRP[17] *) Ins_MIRP, - (* MIRP[18] *) Ins_MIRP, - (* MIRP[19] *) Ins_MIRP, - (* MIRP[20] *) Ins_MIRP, - (* MIRP[21] *) Ins_MIRP, - (* MIRP[22] *) Ins_MIRP, - (* MIRP[23] *) Ins_MIRP, - (* MIRP[24] *) Ins_MIRP, - (* MIRP[25] *) Ins_MIRP, - (* MIRP[26] *) Ins_MIRP, - (* MIRP[27] *) Ins_MIRP, - (* MIRP[28] *) Ins_MIRP, - (* MIRP[29] *) Ins_MIRP, - (* MIRP[30] *) Ins_MIRP, - (* MIRP[31] *) Ins_MIRP - - ); - -(****************************************************************) -(* *) -(* RUN *) -(* *) -(* This function executes a run of opcodes. It will exit *) -(* in the following cases : *) -(* *) -(* - Errors ( in which case it returns FALSE ) *) -(* *) -(* - Reaching the end of the main code range (returns TRUE) *) -(* reaching the end of a code range within a function *) -(* call is an error. *) -(* *) -(* - After executing one single opcode, if the flag *) -(* 'Instruction_Trap' is set to TRUE. (returns TRUE) *) -(* *) -(* On exit whith TRUE, test IP < CodeSize to know wether it *) -(* comes from a instruction trap or a normal termination *) -(* *) -(* *) -(* Note : The documented DEBUG opcode pops a value from *) -(* the stack. This behaviour is unsupported, here *) -(* a DEBUG opcode is always an error. *) -(* *) -(* *) -(* THIS IS THE INTERPRETER'S MAIN LOOP *) -(* *) -(* Instructions appear in the specs' order *) -(* *) -(****************************************************************) - - function Run_Ins( exec : PExec_Context ) : Boolean; - label - SuiteLabel, ErrorLabel, No_Error; - var - A : Int; - begin - - exc := exec^; - - (* set cvt functions *) - - exc.metrics.ratio := 0; - if exc.instance^.metrics.x_ppem <> exc.instance^.metrics.y_ppem then -{$IFDEF FPK} - begin - exc.func_read_cvt := @Read_CVT_Stretched; - exc.func_write_cvt := @Write_CVT_Stretched; - exc.func_move_cvt := @Move_CVT_Stretched; - end - else - begin - exc.func_read_cvt := @Read_CVT; - exc.func_write_cvt := @Write_CVT; - exc.func_move_cvt := @Move_CVT; - end; -{$ELSE} - begin - exc.func_read_cvt := Read_CVT_Stretched; - exc.func_write_cvt := Write_CVT_Stretched; - exc.func_move_cvt := Move_CVT_Stretched; - end - else - begin - exc.func_read_cvt := Read_CVT; - exc.func_write_cvt := Write_CVT; - exc.func_move_cvt := Move_CVT; - end; -{$ENDIF} - Compute_Funcs; - Compute_Round( exc.GS.round_state ); - - repeat - Calc_Length; - - (* First, let's check for empty stack and overflow *) - - exc.args := exc.top - Pop_Push_Count[ exc.opcode*2 ]; - - (* args is the top of the stack once arguments have been popped *) - (* one can also see it as the index of the last argument *) - - if exc.args < 0 then - begin - exc.error := TT_Err_Too_Few_Arguments; - goto ErrorLabel; - end; - - exc.new_top := exc.args + Pop_Push_Count[ exc.opcode*2+1 ]; - - (* new_top is the new top of the stack, after the instruction's *) - (* execution. top will be set to new_top after the 'case' *) - - if exc.new_top > exc.stackSize then - begin - exc.error := TT_Err_Stack_Overflow; - goto ErrorLabel; - end; - - exc.step_ins := true; - exc.error := TT_Err_Ok; - - Instruct_Dispatch[ exc.opcode ]( PStorage(@exc.stack^[exc.args]) ); - - if exc.error <> TT_Err_Ok then - begin - - case exc.error of - - TT_Err_Invalid_Opcode: (* looking for redefined instructions *) - - begin - A := 0; - while ( A < exc.numIDefs ) do - with exc.IDefs^[A] do - - if Active and ( exc.opcode = Opc ) then - begin - if exc.callTop >= exc.callSize then - begin - exc.error := TT_Err_Invalid_Reference; - goto ErrorLabel; - end; - - with exc.callstack^[exc.callTop] do - begin - Caller_Range := exc.curRange; - Caller_IP := exc.IP+1; - Cur_Count := 1; - Cur_Restart := Start; - end; - - if not Goto_CodeRange( Range, Start ) then - goto ErrorLabel; - - goto SuiteLabel; - end - else - inc(A); - - exc.error := TT_Err_Invalid_Opcode; - goto ErrorLabel; - - end; - else - exc.error := exc.error; - goto ErrorLabel; - end; - - end; - - exc.top := exc.new_top; - - if exc.step_ins then inc( exc.IP, exc.length ); - - SuiteLabel: - - if (exc.IP >= exc.codeSize) then - - if exc.callTop > 0 then - begin - exc.error := TT_Err_Code_Overflow; - goto ErrorLabel; - end - else - goto No_Error; - - until exc.instruction_trap; - - No_Error: - Run_Ins := Success; - exec^ := exc; - exit; - - ErrorLabel: - Run_Ins := Failure; - exec^ := exc; - - end; - -end. Index: xc/extras/FreeType/pascal/lib/ttload.pas diff -u xc/extras/FreeType/pascal/lib/ttload.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttload.pas:removed --- xc/extras/FreeType/pascal/lib/ttload.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttload.pas Wed Mar 16 20:59:47 2005 @@ -1,1496 +0,0 @@ -(******************************************************************* - * - * TTLoad.Pas 1.0 - * - * TrueType Tables loaders - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Difference between 1.0 and 1.1 : HUGE !! - * - * - Changed the load model to get in touch with TTFile 1.1 - * - Now loads one whole resident table in one call - * - defined resident and instance records/data - * - ******************************************************************) - -Unit TTLoad; - -interface - -uses FreeType, TTTypes, TTTables, TTCMap, TTObjs; - - function LookUp_TrueType_Table( face : PFace; - aTag : string ) : int; - - function Load_TrueType_Directory( face : PFace; - faceIndex : Int ) : TError; - - function Load_TrueType_MaxProfile( face : PFace ) : TError; - function Load_TrueType_Header ( face : PFace ) : TError; - function Load_TrueType_Locations ( face : PFace ) : TError; - function Load_TrueType_CVT ( face : PFace ) : TError; - function Load_TrueType_CMap ( face : PFace ) : TError; - function Load_TrueType_Gasp ( face : PFace ) : TError; - function Load_TrueType_Names ( face : PFace ) : TError; - function Load_TrueType_Programs ( face : PFace ) : TError; - function Load_trueType_Postscript( face : PFace ) : TError; - function Load_TrueType_OS2 ( face : PFace ) : TError; - function Load_TrueType_HDMX ( face : PFace ) : TError; - - function Load_TrueType_Metrics_Header( face : PFace; - vertical : Boolean ) : TError; - - function Load_TrueType_Any( face : PFace; - tag : longint; - offset : longint; - var buffer; - var length : longint ) : TError; - -implementation - -uses TTError, TTMemory, TTFile, TTCalc; - - (* Composite glyph decoding flags *) - -(******************************************************************* - * - * Function : LookUp_TrueType_Table - * - * Description : Looks for a TrueType table by name - * - * Input : face resident table to look for - * aTag searched tag - * - * Output : index of table if found, -1 otherwise. - * - ******************************************************************) - - function LookUp_TrueType_Table( face : PFace; - aTag : string ) : int; - var - ltag : Long; - i : int; - begin - ltag := (Long(ord(aTag[1])) shl 24) + (Long(ord(aTag[2])) shl 16) + - (Long(ord(aTag[3])) shl 8 ) + Long(ord(aTag[4])); - - for i := 0 to face^.numTables-1 do - begin - - if face^.dirTables^[i].Tag = lTag then - begin - LookUp_TrueType_Table := i; - exit; - end - end; - - (* couldn't find the table *) - LookUp_TrueType_Table := -1; - end; - - - function LookUp_Mandatory_Table( face : PFace; - aTag : string ) : int; - var - table : int; - begin - table := LookUp_TrueType_Table( face, aTag ); - if table < 0 then - error := TT_Err_Table_Missing; - - LookUp_Mandatory_Table := table; - end; - -(******************************************************************* - * - * Function : Load_TrueType_Collection - * - * Description : - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : A table directory doesn't own subttables. There is no - * constructor or destructor for it. - * - ******************************************************************) - - function Load_TrueType_Collection( face : PFace ) : TError; - var - n : Int; - const - TTC_Tag = ( ord('t') shl 24 ) + - ( ord('t') shl 16 ) + - ( ord('c') shl 8 ) + - ( ord(' ') ); - begin - Load_TrueType_Collection := Failure; - - with face^.ttcHeader do - begin - - if TT_Seek_File( 0 ) or - TT_Access_Frame( 12 ) then exit; - - Tag := Get_ULong; - version := Get_Long; - dirCount := Get_Long; - - TT_Forget_Frame; - - if Tag <> TTC_Tag then - begin - Tag := 0; - version := 0; - dirCount := 0; - tableDirectory := nil; - - error := TT_Err_File_Is_Not_Collection; - exit; - end; - - if Alloc( tableDirectory, dirCount * sizeof(ULong) ) or - TT_Access_Frame( dirCount*4 ) then exit; - - for n := 0 to dirCount-1 do - tableDirectory^[n] := Get_ULong; - - TT_Forget_Frame; - end; - - Load_TrueType_Collection := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_Directory - * - * Description : - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : A table directory doesn't own subttables. There is no - * constructor or destructor for it. - * - ******************************************************************) - - function Load_TrueType_Directory( face : PFace; - faceIndex : Int ) : TError; - var - n : Int; - tableDir : TTableDir; - begin - Load_TrueType_Directory := Failure; - - {$IFDEF DEBUG} Write('Directory '); {$ENDIF} - - if Load_TrueType_Collection(face) then - begin - if error <> TT_Err_File_Is_Not_Collection then - exit; - - (* The file isn't a collection, exit if index isn't 0 *) - if faceIndex <> 0 then - exit; - - error := TT_Err_Ok; - - (* Now skip to the beginning of the file *) - if TT_Seek_File(0) then - exit; - end - else - begin - (* file is a collection. Check the index *) - if ( faceIndex < 0 ) or - ( faceIndex >= face^.ttcHeader.dirCount ) then - begin - error := TT_Err_Bad_Argument; - exit; - end; - - (* select a TT Font within the ttc file *) - if TT_Seek_File( face^.ttcHeader.tableDirectory^[faceIndex] ) then - exit; - end; - - if TT_Access_Frame( 12 ) then - exit; - - tableDir.version := GET_Long; - tableDir.numTables := GET_UShort; - - tableDir.searchRange := GET_UShort; - tableDir.entrySelector := GET_UShort; - tableDir.rangeShift := GET_UShort; - - {$IFDEF DEBUG} Writeln('Tables number : ', tableDir.numTables ); {$ENDIF} - - TT_Forget_Frame; - - (* Check that we have a 'sfnt' format there *) - if (tableDir.version <> $10000 ) and (* MS fonts *) - (tableDir.version <> $74727565) then (* Mac fonts *) - begin - {$IFDEF DEBUG} Writeln('Invalid font format'); {$ENDIF} - error := TT_Err_Invalid_File_Format; - exit; - end; - - with face^ do - begin - - numTables := tableDir.numTables; - - if Alloc( dirTables, numTables * sizeof( TTableDirEntry ) ) or - TT_Access_Frame( 16 * numTables ) then exit; - - for n := 0 to numTables-1 do with dirTables^[n] do - begin - Tag := GET_ULong; - Checksum := GET_ULong; - Offset := GET_Long; - Length := Get_Long; - end; - - TT_Forget_Frame; - - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_Directory := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_MaxProfile - * - * Description : - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : A maximum profile is a static table that owns no - * subttable. It has then no constructor nor destructor - * - ******************************************************************) - - function Load_TrueType_MaxProfile( face : PFace ) : TError; - var - table : int; - begin - - Load_TrueType_MaxProfile := Failure; - - {$IFDEF DEBUG} Write('MaxProfile '); {$ENDIF} - - table := LookUp_Mandatory_Table( face, 'maxp'); - if table < 0 then exit; - - with face^ do - begin - - if TT_Seek_File( dirTables^[table].Offset ) or - TT_Access_Frame( 32 ) then exit; - - with MaxProfile do - begin - - ULong(Version) := GET_ULong; - - numGlyphs := GET_UShort; - maxPoints := GET_UShort; - maxContours := GET_UShort; - - maxCompositePoints := GET_UShort; - maxCompositeContours := GET_UShort; - maxZones := GET_UShort; - maxTwilightPoints := GET_UShort; - maxStorage := GET_UShort; - maxFunctionDefs := GET_UShort; - maxINstructionDefs := GET_UShort; - maxStackElements := GET_UShort; - - maxSizeOfInstructions := GET_UShort; - maxComponentElements := GET_UShort; - maxComponentDepth := GET_UShort; - end; - - TT_Forget_Frame; - - (* XXX : an adjustement that is necessary to load certain */ - /* broken fonts like "Keystrokes MT" :-( */ - /* */ - /* We allocate 64 function entries by default when */ - /* the maxFunctionDefs field is null. *) - - (* otherwise, we increment this field by one, in order *) - (* to load some old Apple fonts.. *) - - if maxProfile.maxFunctionDefs = 0 then - maxProfile.maxFunctionDefs := 64; - - numGlyphs := MaxProfile.numGlyphs; - (* compute number of glyphs *) - - maxPoints := MaxProfile.maxCompositePoints; - if (maxPoints < MaxProfile.maxPoints) then - maxPoints := MaxProfile.maxPoints; - (* compute max number of points *) - - maxContours := MaxProfile.maxCompositeContours; - if maxContours < MaxProfile.maxContours then - maxContours := MaxProfile.maxContours; - (* compute max number of contours *) - - maxComponents := MaxProfile.maxComponentElements + - MaxProfile.maxComponentDepth; - (* compute max number of components for glyph loading *) - - (* XXX: some fonts have maxComponents set to 0; we will *) - (* then use 16 of them by default *) - if maxComponents = 0 then maxComponents := 16; - - (* We also increase maxPoints and maxContours in order to support *) - (* some broken fonts *) - inc( maxPoints, 8 ); - inc( maxContours, 4 ); - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_MaxProfile := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_Gasp - * - * Description : - * - * Input : face - * - ******************************************************************) - - function Load_TrueType_Gasp( face : PFace ) : TError; - var - gRanges : PGaspRanges; - table, i : Int; - label - Fail; - begin - Load_TrueType_Gasp := Failure; - - with face^.gasp do - begin - version := 0; - numRanges := 0; - gaspRanges := nil; - end; - - table := Lookup_TrueType_Table( face, 'gasp' ); - if ( table < 0 ) then - begin - Load_TrueType_Gasp := Success; - exit; - end; - - if TT_Seek_File( face^.dirTables^[table].Offset ) or - TT_Access_Frame( 4 ) then exit; - - with face^.gasp do - begin - version := Get_UShort; - numRanges := Get_UShort; - gaspRanges := nil; - end; - - TT_Forget_Frame; - - if Alloc( gRanges, face^.gasp.numRanges * sizeof(TGaspRange) ) or - TT_Access_Frame( face^.gasp.numRanges * 4 ) then - goto Fail; - - face^.gasp.gaspRanges := gRanges; - - for i := 0 to face^.gasp.numRanges-1 do - with gRanges^[i] do - begin - maxPPEM := Get_UShort; - gaspFlag := Get_UShort; - end; - - TT_Forget_Frame; - - Load_TrueType_Gasp := Success; - exit; - - Fail: - Free( gRanges ); - face^.gasp.numRanges := 0; - end; - - -(******************************************************************* - * - * Function : Load_TrueType_Header - * - * Description : Load the TrueType header table in the resident - * table - * - * Input : face current leading segment. - * - * Output : True on success. False on failure - * - * Notes : A font header is a static table that owns no - * subttable. It has then no constructor nor destructor - * - ******************************************************************) - - function Load_TrueType_Header( face : PFace ) : TError; - var - i : int; - begin - Load_TrueType_Header := Failure; - - {$IFDEF DEBUG} Write('Header '); {$ENDIF} - - i := LookUp_Mandatory_Table(face, 'head'); - if i <= 0 then exit; - - with face^ do - begin - - if TT_Seek_File( dirTables^[i].offset ) or - TT_Access_Frame( 54 ) then exit; - - with FontHeader do - begin - - ULong(Table_Version) := GET_ULong; - ULong(Font_Revision) := GET_ULong; - - Checksum_Adjust := GET_Long; - Magic_Number := GET_Long; - - Flags := GET_UShort; - Units_Per_EM := GET_UShort; - - Created [0] := GET_Long; Created [1] := GET_Long; - Modified[0] := GET_Long; Modified[1] := GET_Long; - - xMin := GET_Short; - yMin := GET_SHort; - xMax := GET_SHort; - yMax := GET_Short; - - Mac_Style := GET_UShort; - Lowest_Rec_PPEM := GET_UShort; - - Font_Direction := GET_Short; - Index_To_Loc_Format := GET_Short; - Glyph_Data_Format := GET_Short; - - {$IFDEF DEBUG} Writeln('Units per EM : ',Units_Per_EM ); {$ENDIF} - - end; - - TT_Forget_Frame; - - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_Header := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_Metrics - * - * Description : Load TrueType metrics either from the "hmtx" or - * "vmtx" table. - * - * Input : face current resident leading segment - * vertical boolean. When set, try to load the vertical - * header. - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Metrics( face : PFace; - vertical : Boolean ) : TError; - var - table, n : int; - num_longs : int; - num_shorts : int; - num_shorts_checked : int; - temp : Short; - - header : ^TT_Horizontal_Header; - - shorts : ^PTableShortMetrics; - longs : ^PTableLongMetrics; - - begin - Load_TrueType_Metrics := Failure; - - {$IFDEF DEBUG} - if vertical then - Write('vmtx ') - else - Write('hmtx '); - {$ENDIF} - - if vertical then - begin - - table := LookUp_TrueType_Table( face, 'vmtx' ); - if table < 0 then - begin - (* This is an optional table. Return silently if it *) - (* wasn't found. Note : some fonts have a vertical *) - (* header, but no 'vmtx'. E.g. : mingliu.ttf *) - - face^.verticalHeader.number_Of_VMetrics := 0; - Load_TrueType_Metrics := Success; - exit; - end; - - header := @TT_Horizontal_Header(face^.verticalHeader); - end - else - begin - table := LookUp_Mandatory_Table( face, 'hmtx' ); - if table < 0 then - exit; - - header := @face^.horizontalHeader; - end; - - - shorts := @PTableShortMetrics(header^.short_metrics); - longs := @PTableLongMetrics (header^.long_metrics ); - - num_longs := header^.number_Of_HMetrics; - num_shorts := face^.numGlyphs - num_longs; - - num_shorts_checked := (face^.dirTables^[table].Length - num_longs*4) div 2; - - if num_shorts < 0 then - begin - {$IFDEF DEBUG} Writeln('!! More metrics than glyphs !\n'); {$ENDIF} - if vertical then error := TT_Err_Invalid_Vert_Metrics - else error := TT_Err_Invalid_Horiz_Metrics; - exit; - end; - - if Alloc( longs^, sizeof(TLongMetrics) * num_longs ) or - Alloc( shorts^, sizeof(TShortMetrics)* num_shorts ) or - - TT_Seek_File( face^.dirTables^[table].Offset ) or - TT_Access_Frame( face^.dirTables^[table].Length ) then exit; - - for n := 0 to num_longs-1 do with longs^^[n] do - begin - advance := GET_UShort; - bearing := GET_Short; - end; - - (* do we have an inconsistent number of metric values ? *) - if num_shorts > num_shorts_checked then - begin - for n := 0 to num_shorts_checked-1 do - shorts^^[n] := GET_Short; - - (* we fill up the missing left side bearings with the *) - (* last valid value. Since this will occur for buggy CJK *) - (* fonts usually, nothing serious will happen. *) - - temp := shorts^^[num_shorts_checked-1]; - - for n := num_shorts_checked to num_shorts-1 do - shorts^^[n] := temp; - end - else - for n := 0 to num_shorts-1 do - shorts^^[n] := GET_Short; - - TT_Forget_Frame; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_Metrics := Success; - end; - - -(******************************************************************* - * - * Function : Load_TrueType_Metrics_Header - * - * Description : - * - * Input : face current resident leading segment - * vertical boolean. When set, try to load the vertical - * header. - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Metrics_Header( face : PFace; - vertical : Boolean ) : TError; - var - table : int; - header : ^TT_Horizontal_Header; - begin - Load_TrueType_Metrics_Header := Failure; - - {$IFDEF DEBUG} - if vertical then - Write('Vertical Header ') - else - Write('Horizontal Header '); - {$ENDIF} - - if vertical then - begin - face^.verticalInfo := False; - - (* the vertical header is an optional table.. so return *) - (* silently if we don't find it *) - table := LookUp_TrueType_Table( face, 'vhea' ); - if (table < 0) then - begin - Load_TrueType_Metrics_Header := Success; - exit; - end; - - face^.verticalInfo := True; - header := @TT_Horizontal_Header(face^.verticalHeader); - end - else - begin - table := LookUp_Mandatory_Table( face, 'hhea'); - if ( table < 0 ) then - exit; - header := @face^.horizontalHeader; - end; - - with face^ do - begin - - if TT_Seek_File( dirTables^[table].Offset ) or - TT_Access_Frame( 36 ) then - exit; - - with header^ do - begin - - Long(Version) := GET_ULong; - Ascender := GET_Short; - Descender := GET_Short; - Line_Gap := GET_Short; - - advance_Width_Max := GET_UShort; - - min_Left_Side_Bearing := GET_Short; - min_Right_Side_Bearing := GET_Short; - xMax_Extent := GET_Short; - caret_Slope_Rise := GET_Short; - caret_Slope_Run := GET_Short; - - Reserved[0] := GET_Short; (* this is cared offset for vertical *) - - Reserved[1] := GET_Short; - Reserved[2] := GET_Short; - Reserved[3] := GET_Short; - Reserved[4] := GET_Short; - - metric_Data_Format := GET_Short; - number_Of_HMetrics := GET_UShort; - - short_metrics := nil; - long_metrics := nil; - - end; - - TT_Forget_Frame; - - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_Metrics_Header := Load_TrueType_Metrics( face, vertical ); - end; - -(******************************************************************* - * - * Function : Load_TrueType_Locations - * - * Description : Loads the location table in resident table - * - * Input : face Current Resident Leading Segment - * - * Output : True on success. False on failure - * - * NOTES : - * - * The Font Header *must* be loaded in the leading segment - * before calling this function. - * - * This table is destroyed directly by the resident destructor. - * - ******************************************************************) - - function Load_TrueType_Locations( face : PFace ): TError; - var - t, n : int; - LongOffsets : int; - begin - - Load_TrueType_Locations := Failure; - - {$IFDEF DEBUG} Write('Locations '); {$ENDIF} - - with face^ do - begin - - LongOffsets := fontHeader.Index_To_Loc_Format; - - t := LookUp_Mandatory_Table( face, 'loca' ); - if t < 0 then exit; - - if TT_Seek_File( dirTables^[T].Offset ) then exit; - - if LongOffsets <> 0 then - begin - - numLocations := dirTables^[T].Length shr 2; - - {$IFDEF DEBUG} - Writeln('Glyph locations # ( 32 bits offsets ) : ', numLocations ); - {$ENDIF} - - if Alloc( glyphLocations, sizeof(Long)*numLocations ) or - TT_Access_Frame( numLocations*4 ) then exit; - - for n := 0 to numLocations-1 do - glyphLocations^[n] := GET_Long; - - TT_Forget_Frame; - - end - else - begin - numLocations := dirTables^[T].Length shr 1; - - {$IFDEF DEBUG} - Writeln('Glyph locations # ( 16 bits offsets ) : ', numLocations ); - {$ENDIF} - - if Alloc( glyphLocations, sizeof(Long)*numLocations ) or - TT_Access_Frame( numLocations*2 ) then exit; - - for n := 0 to numLocations-1 do - glyphLocations^[n] := Long(GET_UShort) * 2; - - TT_Forget_Frame; - end; - - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_Locations := Success; - end; - - -(******************************************************************* - * - * Function : Load_TrueType_Names - * - * Description : Loads the name table into the face table - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : This attribute table is destroyed by the resident - * destructor. - * - ******************************************************************) - - function Load_TrueType_Names( face : PFace ) : TError; - var - table, i : Int; - bytes : Long; - begin - Load_TrueType_Names := Failure; - - table := Lookup_Mandatory_Table( face, 'name' ); - if table < 0 then exit; - - with face^.nameTable do - begin - (* Seek to the beginning of the table and check the frame access. *) - if TT_Seek_File( face^.dirTables^[table].Offset ) or - TT_Access_Frame( 6 ) then exit; - - format := GET_UShort; - numNameRecords := GET_UShort; - storageOffset := GET_UShort; - - TT_Forget_Frame; - - if Alloc( names, numNameRecords*sizeof(TName_Record) ) or - TT_Access_Frame( numNameRecords*12 ) then - begin - numNameRecords := 0; - exit; - end; - - (* Load the name records and determine how much storage is needed *) - (* to hold the strings themselves *) - - bytes := 0; - for i := 0 to numNameRecords-1 do with names^[i] do - begin - platformID := GET_UShort; - encodingID := GET_UShort; - languageID := GET_UShort; - nameID := GET_UShort; - length := GET_UShort; - offset := GET_UShort; - - (* this test takes care of 'holes' in the names tabls, as *) - (* reported by Erwin *) - if Offset + Length > bytes then - bytes := Offset + Length; - end; - - TT_Forget_Frame; - - storage := nil; - if bytes > 0 then - begin - if Alloc( storage, bytes ) then exit; - - if TT_Read_At_File( face^.dirTables^[table].Offset + storageOffset, - storage^, bytes ) then - begin - Free(storage); - exit; - end; - end; - - end; - - Load_TrueType_Names := Success; - exit; - end; - -(******************************************************************* - * - * Function : Load_TrueType_CVT - * - * Description : - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : This attribute table is destroyed by the resident - * destructor. - * - ******************************************************************) - - function Load_TrueType_CVT( face : PFace ): TError; - var - t, n : Int; - begin - Load_TrueType_CVT := Failure; - - {$IFDEF DEBUG} Write('CVT '); {$ENDIF} - - (* the CVT table is optional *) - - t := LookUp_TrueType_Table( face, 'cvt '); - if t < 0 then - begin - face^.cvt := nil; - face^.cvtSize := 0; - Load_TrueType_CVT := Success; - {$IFDEF DEBUG} writeln('none'); {$ENDIF} - exit; - end; - - with face^ do - begin - - cvtSize := dirTables^[t].Length div 2; - - if Alloc( cvt, sizeof(Short)*cvtSize ) or - - TT_Seek_File( dirTables^[t].Offset ) or - - TT_Access_Frame( 2*cvtSize ) then exit; - - for n := 0 to cvtSize-1 do - cvt^[n] := GET_Short; - - TT_Forget_Frame; - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - Load_TrueType_CVT := Success; - end; - - -(******************************************************************* - * - * Function : Load_TrueType_CMap - * - * Description : - * - * Input : face - * - * Output : True on success. False on failure - * - * Notes : The Cmap table directory is destroyed by the resident - * destructor. The Cmap subtables must be destroyed by - * Free_CMap_Table. - * - ******************************************************************) - - function Load_TrueType_CMap( face : PFace ) : TError; - var - off, table_start : Longint; - n, limit, t : Int; - - cmap_dir : TCMapDir; - entry : TCMapDirEntry; - cmap : PCMapTable; - label - Fail; - begin - - Load_TrueType_CMap := Failure; - - {$IFDEF DEBUG} Write('CMaps '); {$ENDIF} - - t := LookUp_Mandatory_Table( face,'cmap' ); - if t < 0 then exit; - - with face^ do - begin - - table_start := dirTables^[t].offset; - - if TT_Seek_File( dirTables^[t].Offset ) or - TT_Access_Frame( 4 ) then exit; - - cmap_dir.tableVersionNumber := GET_UShort; - cmap_dir.numCMaps := GET_UShort; - - TT_Forget_Frame; - - off := TT_File_Pos; - - (* save space in face data for cmap tables *) - numCMaps := cmap_dir.numCMaps; - if Alloc( cMaps, numCMaps * sizeof(TCMapTable) ) then exit; - - for n := 0 to numCMaps-1 do - begin - - if TT_Seek_File ( off ) or - TT_Access_Frame( 8 ) then exit; - - cmap := @cMaps^[n]; - - entry.platformID := GET_UShort; - entry.platformEncodingID := GET_UShort; - entry.offset := GET_Long; - - cmap^.loaded := False; - cmap^.platformID := entry.platformID; - cmap^.platformEncodingID := entry.platformEncodingID; - - TT_Forget_Frame; - - off := TT_File_Pos; - - if TT_Seek_File ( table_start + entry.offset ) or - TT_Access_Frame( 6 ) then exit; - - cmap^.format := Get_UShort; - cmap^.length := Get_UShort; - cmap^.version := Get_UShort; - - TT_Forget_Frame; - - cmap^.offset := TT_File_Pos; - - end; (* for n *) - - end; (* with face^ *) - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_CMap := Success; - exit; - - Fail: - Free( face^.cMaps ); - Load_TrueType_CMap := Failure; - end; - - -(* - procedure Free_CMap_Table( var cmap : TCMapTable ); - begin - if cmap.cmap0 <> nil then - with cmap do - case format of - - 0 : begin - Free( cmap0^.glyphIdArray ); - Free( cmap0 ); - end; - - 2 : begin - Free( cmap2^.glyphIdArray ); - Free( cmap2^.subHeaders ); - Free( cmap2 ); - end; - - 4 : begin - Free( cmap4^.glyphIdArray ); - Free( cmap4^.segments ); - Free( cmap4 ); - end; - - 6 : begin - Free( cmap6^.glyphIdArray ); - Free( cmap6 ); - end; - end; - - cmap.format := 0; - cmap.length := 0; - cmap.version := 0; - end; -*) - -(******************************************************************* - * - * Function : Load_TrueType_Programs - * - * Description : Load the Font and CVT programs in the resident - * table - * - * Input : face - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Programs( face : PFace ) : TError; - var - t : Int; - begin - - Load_TrueType_Programs := Failure; - - {$IFDEF DEBUG} Write('Font program '); {$ENDIF} - - (* The font program is optional *) - - t := Lookup_TrueType_Table( face, 'fpgm' ); - - if t < 0 then - - with face^ do - begin - fontProgram := nil; - fontPgmSize := 0; - - {$IFDEF DEBUG} Writeln('none in file'); {$ENDIF} - end - - else - - with face^ do - begin - - fontPgmSize := dirTables^[t].Length; - - if Alloc( fontProgram, fontPgmSize ) or - TT_Read_At_File( dirTables^[t].offset, - fontProgram^, - fontPgmSize ) then exit; - - {$IFDEF DEBUG} Writeln('loaded, ',fontPgmSize,' bytes'); {$ENDIF} - end; - - {$IFDEF DEBUG} Write('CVT program '); {$ENDIF} - - t := LookUp_trueType_Table( face, 'prep' ); - - (* The CVT table is optional *) - - if t < 0 then - - with face^ do - begin - cvtProgram := nil; - cvtPgmSize := 0; - - {$IFDEF DEBUG} Writeln('none in file'); {$ENDIF} - end - - else - - with face^ do - begin - - cvtPgmSize := dirTables^[t].Length; - - if Alloc( cvtProgram, cvtPgmSize ) or - TT_Read_At_File( dirTables^[t].offset, - cvtProgram^, - cvtPgmSize ) then exit; - - {$IFDEF DEBUG} Writeln('loaded, ',cvtPgmSize,' bytes'); {$ENDIF} - end; - - Load_TrueType_Programs := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_OS2 - * - * Description : Load the OS2 Table - * - * Input : face - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_OS2( face : PFace ) : TError; - var - table : Int; - i : Int; - begin - Load_TrueType_OS2 := Failure; - - {$IFDEF DEBUG} Write('OS/2 table '); {$ENDIF} - - (* We now support Apple fonts who do not have an OS/2 table *) - table := LookUp_Mandatory_Table( face, 'OS/2' ); - if table < 0 then begin - face^.os2.version := $FFFF; - Load_TrueType_OS2 := Success; - error := TT_Err_Ok; (* clear error *) - exit; - end; - - if TT_Seek_File( face^.dirTables^[table].offset ) or - TT_Access_Frame( 78 ) then exit; - - with face^.os2 do - begin - version := Get_UShort; - xAvgCharWidth := Get_Short; - usWeightClass := Get_UShort; - usWidthClass := Get_UShort; - fsType := Get_Short; - ySubscriptXSize := Get_Short; - ySubscriptYSize := Get_Short; - ySubscriptXOffset := Get_Short; - ySubscriptYOffset := Get_Short; - ySuperscriptXSize := Get_Short; - ySuperscriptYSize := Get_Short; - ySuperscriptXOffset := Get_Short; - ySuperscriptYOffset := Get_Short; - yStrikeoutSize := Get_Short; - yStrikeoutPosition := Get_Short; - sFamilyClass := Get_Short; - - for i := 0 to 9 do panose[i] := Get_Byte; - - ulUnicodeRange1 := Get_ULong; - ulUnicodeRange2 := Get_ULong; - ulUnicodeRange3 := Get_ULong; - ulUnicodeRange4 := Get_ULong; - - for i := 0 to 3 do achVendID[i] := Get_Byte; - - fsSelection := Get_UShort; - usFirstCharIndex := Get_UShort; - usLastCharIndex := Get_UShort; - sTypoAscender := Get_UShort; - sTypoDescender := Get_UShort; - sTypoLineGap := Get_UShort; - usWinAscent := Get_UShort; - usWinDescent := Get_UShort; - - TT_Forget_Frame; - - if version >= $0001 then - begin - if TT_Access_Frame(8) then exit; - - ulCodePageRange1 := Get_ULong; - ulCodePageRange2 := Get_ULong; - - TT_Forget_Frame; - end - else - begin - ulCodePageRange1 := 0; - ulCodePageRange2 := 0; - end; - - end; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_TrueType_OS2 := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_Postscript - * - * Description : Load the 'post' table - * - * Input : face - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Postscript( face : PFace ) : TError; - var - table : Int; - i : Int; - begin - Load_TrueType_Postscript := Failure; - - {$IFDEF DEBUG} Write('post table '); {$ENDIF} - - table := LookUp_TrueType_Table( face, 'post' ); - if table < 0 then exit; - - if TT_Seek_File( face^.dirTables^[table].offset ) or - TT_Access_Frame(32) then exit; - - with face^.postscript do - begin - formatType := Get_ULong; - italicAngle := Get_ULong; - underlinePosition := Get_Short; - underlineThickness := Get_Short; - isFixedPitch := Get_ULong; - minMemType42 := Get_ULong; - maxMemType42 := Get_ULong; - minMemType1 := Get_ULong; - maxMemType1 := Get_ULong; - end; - - TT_Forget_Frame; - - {$IFDEF DEBUG} Writeln('loaded'); {$ENDIF} - - Load_trueType_Postscript := Success; - end; - -(******************************************************************* - * - * Function : Load_TrueType_HDMX - * - * Description : Load the 'hdmx' tables - * - * Input : face - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Hdmx( face : PFace ) : TError; - var - table, n : Int; - num_glyphs : Int; - - version : UShort; - num_rec : Short; - recs : PHdmx_Records; - rec_size : Long; - rec : PHdmx_Record; - label - Fail; - begin - Load_TrueType_Hdmx := Failure; - - with face^.hdmx do - begin - version := 0; - num_records := 0; - records := nil; - end; - - (* This table is optional *) - - table := LookUp_TrueType_Table( face, 'hdmx' ); - if table < 0 then - begin - Load_TrueType_Hdmx := Success; - exit; - end; - - if TT_Seek_File( face^.dirTables^[table].offset ) or - TT_Access_Frame( 8 ) then exit; - - version := Get_UShort; - num_rec := Get_Short; - rec_size := Get_Long; - - TT_Forget_Frame; - - (* right now, we only recognize format 0 *) - - if version <> 0 then - exit; - - if Alloc( face^.hdmx.records, sizeof(THdmx_Record)*num_rec ) then - exit; - - face^.hdmx.num_records := num_rec; - num_glyphs := face^.NumGlyphs; - - rec_size := rec_size - num_glyphs - 2; - - for n := 0 to num_rec-1 do - begin - rec := @face^.hdmx.records^[n]; - - (* read record *) - - if TT_Access_Frame(2) then - goto Fail; - - rec^.ppem := Get_Byte; - rec^.max_width := Get_Byte; - - TT_Forget_Frame; - - if Alloc( rec^.widths, num_glyphs ) or - TT_Read_File( rec^.widths^, num_glyphs ) then - goto Fail; - - (* skip padding bytes *) - - if rec_size > 0 then - if TT_Skip_File( rec_size ) then - goto Fail; - end; - - Load_TrueType_HDMX := Success; - exit; - - Fail: - for n := 0 to num_rec-1 do - Free( face^.hdmx.records^[n].widths ); - - Free( face^.hdmx.records ); - face^.hdmx.num_records := 0; - end; - - -(******************************************************************* - * - * Function : Load_TrueType_Any - * - * Description : Load any TrueType table in user memory - * - * Input : face the font file's face object - * tag the table - * - * Output : True on success. False on failure - * - ******************************************************************) - - function Load_TrueType_Any( face : PFace; - tag : longint; - offset : longint; - var buffer; - var length : longint ) : TError; - var - stream : TT_Stream; - found, i : integer; - begin - if tag <> 0 then - begin - found := -1; - i := 0; - while i < face^.numTables do - if Longint(face^.dirTables^[i].tag) = tag then - begin - found := i; - i := face^.numTables; - end - else - inc(i); - - if found < 0 then - begin - error := TT_Err_Table_Missing; - Load_TrueType_Any := Failure; - exit; - end; - - inc( offset, face^.dirTables^[found].offset ); - - (* if length = 0, the user requested the table's size *) - if length = 0 then - begin - length := face^.dirTables^[found].length; - Load_TrueType_Any := Success; - exit; - end; - end - else - (* if length = 0 and tag = 0, the user requested the font file's size *) - if length = 0 then - begin - (* return length of font file *) - length := TT_Stream_Size( face^.stream ); - Load_TrueType_Any := Success; - exit; - end; - - TT_Use_Stream( face^.stream, stream ); - Load_TrueType_Any := TT_Read_At_File( offset, buffer, length ); - TT_Done_Stream( face^.stream ); - end; - -end. - Index: xc/extras/FreeType/pascal/lib/ttmemory.pas diff -u xc/extras/FreeType/pascal/lib/ttmemory.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttmemory.pas:removed --- xc/extras/FreeType/pascal/lib/ttmemory.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttmemory.pas Wed Mar 16 20:59:47 2005 @@ -1,282 +0,0 @@ -(******************************************************************* - * - * TTMemory.Pas 2.1 - * - * Memory management component (specification) - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * Differences between 2.1 and 2.0 : - * - * - Added a memory mutex to make the component thread-safe - * - * Differences between 2.0 and 1.1 : - * - * - The growing heap was completely removed in version 2.0 - * - * - The support for small mini-heaps may be re-introduced later - * to allow the storage of several consecutive arrays in one - * single block. - * - * IMPORTANT NOTICE : - * - * The Alloc and Free functions mimic their C equivalent, - * however, some points must be noticed : - * - * - both functions return a boolean. As usual, True indicates - * success, while False indicates failure. - * - * - the Alloc function puts a small header on front of each - * allocated block. The header contains a magic cookie and - * the size of the allocated block. This allows calls to - * Free without passing a block size as an argument, and thus - * reduces the risks of memory leaks. - * - * - it is possible to call Free with a nil pointer, in which - * case nothing happens, and the result is set to True (success) - * - * The pointer is set to nil after a call to Free in all cases. - * - * This is done to clear the destructors code, allowing - * - * if (pointer) then - * begin - * Free(pointer); - * pointer := nil; - * end; - * - * to be replaced by a single line : - * - * Free(pointer); - * - * - ******************************************************************) - -unit TTMemory; - -interface - -uses TTTypes; - -{$I TTCONFIG.INC} - -type - TMarkRecord = record - Magic : longint; - Top : integer; - end; - -const - Font_Pool_Allocated : boolean = False; - - function Alloc( var P; size : Longint ) : TError; - (* Allocates a new memory block in the current heap of 'size' bytes *) - (* - returns failure if no memory is left in the heap *) - - procedure Free ( var P ); - (* Releases a block previously allocated through 'Alloc' *) - (* - returns True (success) of P is nil before the call *) - (* - sets P to nil before exit *) - - function TTMemory_Init : TError; - procedure TTMemory_Done; - -implementation - -uses TTError; - -type - TByte = array[0..0] of Byte; - PByte = ^TByte; - - PBlock_Header = ^TBlock_Header; - TBlock_Header = record - magic : Longint; (* magic cookie *) - size : Longint; (* allocated size, including header *) - end; - - TBlock_Headers = array[0..1] of TBlock_Header; - PBlock_Headers = ^TBlock_Headers; - - (* Note that the Turbo-Pascal GetMem/FreeMem functions use no block *) - (* headers. That's why a byte size is needed for FreeMem. Thus, we *) - (* do not waste space here compared to a C malloc implementation *) - -const - Mark_Magic = $BABE0007; - (* This is the magic cookie used to recognize valide allocated blocks *) - - Header_Size = sizeof(TBlock_Header); - - (************************************************************************) - (* *) - (* MyHeapErr : *) - (* *) - (* By default, a call to GetMem with insufficient memory left will *) - (* generate a runtime error. We define here a function that is used *) - (* to allow GetMem to return nil in such cases. *) - (* *) - (************************************************************************) - - function MyHeapErr( Size: Integer ): Integer; far; - begin - MyHeapErr := 1; - end; - -(******************************************************************* - * - * Function : Alloc - * - * Description : allocate a new block in the current heap - * - * Notes : If you want to replace this function with - * your own, please be sure to respect these - * simple rules : - * - * - P must be set to nil in case of failure - * - * - The allocated block must be zeroed ! - * - *****************************************************************) - - function Alloc( var P; size : Longint ) : TError; - var - OldHeapError : Pointer; - - L : Longint; - P2 : Pointer; - begin - {$IFNDEF DELPHI32} - OldHeapError := HeapError; - HeapError := @MyHeapErr; - {$ENDIF} - - L := ( size + Header_Size + 3 ) and -4; - - {$IFDEF MSDOS} - if L shr 16 <> 0 then - begin - Writeln('Sorry, but this font is too large to be handled by a 16-bit program' ); - Alloc := Failure; - end; - {$ENDIF} - - GetMem( Pointer(P), L ); - - {$IFNDEF DELPHI32} - HeapError := OldHeapError; - {$ENDIF} - - if Pointer(P) <> nil then - begin - PBlock_Headers(P)^[0].magic := Mark_Magic; - PBlock_Headers(P)^[0].size := L; - - P2 := Pointer( @(PBlock_Headers(P)^[1]) ); - - {$IFDEF MSDOS} - if (ofs(P2^) <> ofs(Pointer(P)^)+Header_Size) or - (seg(P2^) <> seg(Pointer(P)^)) then - begin - Writeln('AAARGH !!: Sorry, but I have problems with 64 Kb segments'); - halt(1); - end; - {$ENDIF} - - Pointer(P) := P2; - fillchar( P2^, size, 0 ); - (* zero block *) - - Alloc := Success; - end - else - Alloc := Failure; - - end; - - -(******************************************************************* - * - * Function : Free - * - * Description : frees a block that was previsouly allocated - * by the Alloc function - * - * Notes : Doesn't need any size parameter. - * - * If you want to replace this function with your own, please - * be sure to respect these two rules : - * - * - the argument pointer can be nil, in which case the function - * should return immediately, with a success report. - * - * - the pointer P should be set to nil when exiting the - * function, except in case of failure. - * - *****************************************************************) - - procedure Free( var P ); - var - head : PBlock_Header; - i : Integer; - size : Longint; - begin - if Pointer(P) = nil then exit; - - i := -1; - head := @(PBlock_Headers(P)^[i]); - (* A hack to get the header in PB, as the line *) - (* @(PBlock_Headers(P)^[-1] would give a 'constant error' *) - (* at compile time. I'm unsure this works correctly in BP *) - - if head^.magic <> Mark_Magic then - begin - (* PANIC : An invalid Free call *) - Writeln('Invalid Free call'); - halt(1); - end; - - size := head^.size; - - head^.magic := 0; (* cleans the header *) - head^.size := 0; - - FreeMem( head, size ); - - Pointer(P) := nil; - end; - -(******************************************************************* - * - * Function : TTMemory_Init - * - * Description : Initializes the Memory component - * - *****************************************************************) - - function TTMemory_Init : TError; - begin - (* nothing to be done *) - TTMemory_Init := Success; - end; - -(******************************************************************* - * - * Function : TTMemory_Done - * - * Description : Finalize the memory component - * - *****************************************************************) - - procedure TTMemory_Done; - begin - (* nothing to be done *) - end; - -end. Index: xc/extras/FreeType/pascal/lib/ttobjs.pas diff -u xc/extras/FreeType/pascal/lib/ttobjs.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttobjs.pas:removed --- xc/extras/FreeType/pascal/lib/ttobjs.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttobjs.pas Wed Mar 16 20:59:47 2005 @@ -1,1945 +0,0 @@ -(******************************************************************* - * - * ttobjs.pas 2.0 - * - * Objects definition unit. - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -(* *) -(* The four important objects managed by the library are : *) -(* *) -(* Face : the object for a given typeface *) -(* Instance : the object for a face's given pointsize/transform *) -(* Context : the object for a given glyph loading/hinting execution *) -(* Glyph : the object for a given glyph ( outline and metrics ) *) -(* *) -(* A Face object is described by a TFace record, and its *) -(* associated sub-tables. It is created through a call to the *) -(* 'TT_Open_Face' API. *) -(* *) -(* An Instance object is described by a TInstance record, and *) -(* sub-tables. It is created for a given face through a call to the *) -(* 'TT_Open_Instance' API. Several instances can share the same face *) -(* *) -(* The pointsize and/or transform of a given instance object can be *) -(* changed on the fly through a call to the 'TT_Reset_Instance' API. *) -(* *) -(* A Glyph object is used to describe a glyph to the client application *) -(* It is made of a TGlyph_Record header, with several sub-tables used *) -(* to store, for example, point coordinates or outline info.. *) -(* It can hold metrics information and other attributes, as well as *) -(* the glyph's outline. A client application can request any kind of *) -(* info to the library on a given glyph through the 'TT_Get_Glyph' *) -(* call. *) -(* *) -(* *) -(* A Context is described by a TExec_Context record, and sub-tables *) -(* Execution contexts are created on demand during the following *) -(* operations : *) -(* *) -(* - creating a new instance ( to read and execute the font program ) *) -(* - setting/resetting the pointsize ( to execute the CVT program ) *) -(* - during glyph loading ( when hinting is on ) *) -(* *) -(* They are used to run TrueType instructions and load/store *) -(* glyph data that are not part of the Glyph object ( as they're of *) -(* no meaning to a client application ). *) -(* *) -(* The library keeps track of all objects related to a given face : *) -(* *) -(* A face's instances are kept in two linked lists : one is the 'active' *) -(* list, which tracks the face's current opened instances, while the *) -(* other is the 'idle' list used to collect/recycle instance objects *) -(* when they become unuseful after a 'TT_Close_Instance' call. *) -(* *) -(* In the same way, a face's execution contexts are kept in two *) -(* similar lists. Note that, as contexts are created on demand, *) -(* the active and idle contexts lists should always contain few *) -(* elements. *) -(* *) -(* Look also for the following files : *) -(* *) -(* Face manager : TTFace.pas *) -(* Instance manager : TTInst.pas *) -(* Context manager : TTExec.pas *) -(* Glyph manager : TTGlyph.pas *) -(* *) - -unit TTObjs; - -interface - -{$I TTCONFIG.INC} - -uses FreeType, - TTTypes, - TTError, - TTCache, - TTTables, - TTCMap; - -type - (* Graphics State *) - (* *) - (* The Graphics State (GS) is managed by the *) - (* instruction field, but does not come from *) - (* the font file. Thus, we can use 'int's *) - (* where needed. *) - (* *) - - PGraphicsState = ^TGraphicsState; - TGraphicsState = record - rp0, - rp1, - rp2 : int; - - dualVector, - projVector, - freeVector : TT_UnitVector; - - loop : longint; - minimum_distance : TT_F26dot6; - round_state : int; - - auto_flip : boolean; - control_value_cutin : TT_F26dot6; - single_width_cutin : TT_F26dot6; - single_width_value : TT_F26dot6; - delta_base : int; - delta_shift : int; - - instruct_control : byte; - scan_control : Boolean; - scan_type : Int; - - gep0, - gep1, - gep2 : int; - end; - - -const - Default_GraphicsState : TGraphicsState - = ( - rp0 : 0; - rp1 : 0; - rp2 : 0; - dualVector : ( x:$4000; y:0 ); - projVector : ( x:$4000; y:0 ); - freeVector : ( x:$4000; y:0 ); - loop : 1; - minimum_distance : 64; - round_state : 1; - auto_flip : True; - control_value_cutin : 4*17; - single_width_cutin : 0; - single_width_value : 0; - delta_Base : 9; - delta_Shift : 3; - instruct_control : 0; - scan_control : True; - scan_type : 0; - gep0 : 1; - gep1 : 1; - gep2 : 1 - ); - - (**********************************************************************) - (* *) - (* Execution Subtables : *) - (* *) - (**********************************************************************) - -const - MaxCodeRanges = 3; - (* There can only be 3 active code ranges at once : *) - (* - the Font Program *) - (* - the CVT Program *) - (* - a glyph's instructions set *) - - TT_CodeRange_Font = 1; - TT_CodeRange_Cvt = 2; - TT_CodeRange_Glyph = 3; - - CvtFlag_None = 0; - CvtFlag_X = 1; - CvtFlag_Y = 2; - CvtFlag_Both = 3; - -type - TCodeRange = record - Base : PByte; - Size : Int; - end; - PCodeRange = ^TCodeRange; - - (* defines a code range *) - (* *) - (* code ranges can be resident to a glyph ( i.e. the Font Program) *) - (* while some others are volatile ( Glyph instructions ) *) - (* tracking the state and presence of code ranges allows function *) - (* and instruction definitions within a code range to be forgotten *) - (* when the range is discarded *) - - TCodeRangeTable = array[1..MaxCodeRanges] of TCodeRange; - - (* defines a function/instruction definition record *) - PDefRecord = ^TDefRecord; - TDefRecord = record - Range : Int; (* in which code range is it located ? *) - Start : Int; (* where does it start ? *) - Opc : Byte; (* function #, or instruction code *) - Active : boolean; (* is the entry active ? *) - end; - - PDefArray = ^TDefArray; - TDefArray = array[0..99] of TDefRecord; - - (* defines a call record, used to manage function calls *) - TCallRecord = record - Caller_Range : Int; - Caller_IP : Int; - Cur_Count : Int; - Cur_Restart : Int; - end; - - (* defines a simple call stack *) - TCallStack = array[0..99] of TCallRecord; - PCallStack = ^TCallStack; - - PGlyph_Zone = ^TGlyph_Zone; - TGlyph_Zone = record - n_points : Int; - n_contours : Int; - - org : TT_Points; (* original (scaled) coords *) - cur : TT_Points; (* current coordinates *) - flags : TT_PTouchTable; - - conEnds : PUShort; - end; - - TRound_Function = function( distance, compensation : TT_F26dot6 ) - : TT_F26dot6; - (* Rounding function, as used by the interpreter *) - - TMove_Function = procedure( zone : PGlyph_Zone; - point : Int; - distance : TT_F26dot6 ); - (* Point displacement along the freedom vector routine, as *) - (* used by the interpreter *) - - TProject_Function = function( var P1, P2 : TT_Vector ) : TT_F26dot6; - (* Distance projection along one of the proj. vectors, as used *) - (* by the interpreter *) - - TFunc_Get_CVT = function ( index : Int ) : TT_F26Dot6; - (* Reading a cvt value. Take care of non-square pixels when *) - (* needed *) - - TFunc_Set_CVT = procedure( index : Int; value : TT_F26Dot6 ); - (* Setting or Moving a cvt value. Take care of non-square *) - (* pixels when needed *) - - - (********************************************************************) - (* *) - (* Glyph Sub-Tables *) - (* *) - (********************************************************************) - - PGlyph_Transform = ^TGlyph_Transform; - TGlyph_Transform = record - xx, xy : TT_Fixed; - yx, yy : TT_Fixed; - ox, oy : TT_F26Dot6; - end; - - PSubglyph_Record = ^TSubglyph_Record; - TSubglyph_Record = record - index : Int; - is_scaled : boolean; - is_hinted : boolean; - preserve_pps : boolean; - - bbox : TT_BBox; - zone : TGlyph_Zone; - - arg1, arg2 : Int; - element_flag : Int; - transform : TGlyph_Transform; - file_offset : Long; - - pp1, pp2 : TT_Vector; - - advanceWidth : Int; - leftBearing : Int; - end; - - TSubglyph_Stack = array[0..10] of TSubglyph_Record; - PSubglyph_Stack = ^TSubglyph_Stack; - - (* A note regarding non-squared pixels : *) - (* *) - (* ( This text will probably go into some docs at some time, for *) - (* now, it is kept there to explain some definitions in the *) - (* TIns_Metrics record ). *) - (* *) - (* The CVT is a one-dimensional array containing values that *) - (* control certain important characteristics in a font, like *) - (* the height of all capitals, all lowercase letter, default *) - (* spacing or stem width/height. *) - (* *) - (* These values are found in FUnits in the font file, and must be *) - (* scaled to pixel coordinates before being used by the CVT and *) - (* glyph programs. Unfortunately, when using distinct x and y *) - (* resolutions ( or distinct x and y pointsizes ), there are two *) - (* possible scalings. *) - (* *) - (* A first try was to implement a 'lazy' scheme were all values *) - (* were scaled when first used. However, some values are always *) - (* used in the same direction, and some other are used in many *) - (* different circumstances and orientations. *) - (* *) - (* I have found a simpler way to do the same, and it even seems to *) - (* work in most of the cases : *) - (* *) - (* - all CVT values are scaled to the maximum ppem size *) - (* *) - (* - when performing a read or write in the CVT, a ratio factor *) - (* is used to perform adequate scaling. Example : *) - (* *) - (* x_ppem = 14 *) - (* y_ppem = 10 *) - (* *) - (* we chose ppem = x_ppem = 14 as the CVT scaling size. All cvt *) - (* entries are scaled to it. *) - (* *) - (* x_ratio = 1.0 *) - (* y_ratio = y_ppem/ppem ( < 1.0 ) *) - (* *) - (* we compute the current ratio like : *) - (* *) - (* - if projVector is horizontal, ratio = x_ratio = 1.0 *) - (* - if projVector is vertical, ratop = y_ratio *) - (* - else, ratio = sqrt( (proj.x*x_ratio)ý+(proj.y*y_ratio)ý ) *) - (* *) - (* reading a cvt value returns ratio*cvt[index] *) - (* writing a cvt value in pixels cvt[index]/ratio *) - (* *) - (* the current ppem is simple ratio*ppem *) - (* *) - - TIns_Metrics = record - pointsize : TT_F26Dot6; - x_resolution : Int; - y_resolution : Int; - x_ppem : Int; - y_ppem : Int; - - x_scale1 : Long; - x_scale2 : Long; - y_scale1 : Long; - y_scale2 : Long; - - (* for non-square pixels *) - x_ratio : Long; - y_ratio : Long; - - scale1 : Long; - scale2 : Long; - ppem : Int; - ratio : Long; - - (* compensations *) - compensations : array[0..3] of TT_F26Dot6; - - (* flags *) - rotated : Boolean; - stretched : Boolean; - end; - - (********************************************************************) - (* *) - (* FreeType Face Object *) - (* *) - (********************************************************************) - - PFace = ^TFace; - PInstance = ^TInstance; - PExec_Context = ^TExec_Context; - - TFace = record - - stream : TT_Stream; - (* i/o stream *) - - ttcHeader : TTTCHeader; - (* TrueType collection header, if any was found *) - - maxProfile : TMaxProfile; - (* maximum profile table, as defined by the TT Spec *) - - (* Note : *) - (* it seems that some maximum values cannot be *) - (* taken directly from this table, but rather by *) - (* combining some of its fields ( e.g. the max. *) - (* number of points seems to be given by *) - (* MAX( maxPoints, maxCompositePoints ) *) - (* *) - (* For this reason, we define later our own *) - (* max values that are used to load and allocate *) - (* further tables.. *) - - fontHeader : TT_Header; - (* the font header as defined by the TT Spec *) - - horizontalHeader : TT_Horizontal_Header; - (* the horizontal header, as defined in the spec *) - - verticalInfo : Boolean; - (* set to true when vertical data is in the font *) - - verticalHeader : TT_Vertical_Header; - (* vertical header table *) - - os2 : TT_OS2; - (* 'OS/2' table *) - - postscript : TT_Postscript; - (* 'Post' table *) - - hdmx : THdmx; - (* 'hdmx' = horizontal device metrics table *) - - nameTable : TName_Table; - (* 'name' = name table *) - - numTables : Int; - dirTables : PTableDirEntries; - (* The directory of the TrueType tables found in *) - (* this face's stream *) - - numCMaps : Int; - cMaps : PCMapTables; - (* the directory of character mappings tables found *) - (* for this face.. *) - - numLocations : Int; - glyphLocations : PStorage; - (* the glyph locations table *) - - (* the hmtx table is now within the horizontal header *) - - fontPgmSize : Int; - fontProgram : PByte; - (* the font program, if any.. *) - - cvtPgmSize : Int; - cvtProgram : PByte; - (* the cvt (or 'prep') program, if any.. *) - - cvtSize : Int; - cvt : PShort; - (* the original, unscaled, control value table *) - - gasp : TGasp; - - (* the following values must be set by the *) - (* maximum profile loader.. *) - - numGlyphs : Int; - (* the face's total number of glyphs *) - - maxPoints : Int; - (* max glyph points number, simple and composite *) - - maxContours : Int; - (* max glyph contours number, simple and composite *) - - maxComponents : Int; - (* max components in a composite glyph *) - - (* the following lists are used to track active *) - (* instance and context objects, as well as *) - (* to recycle them.. *) - - (* see 'TTLists'.. *) - - instances : TCache; - glyphs : TCache; - (* various caches for this face's child objects *) - - extension : Pointer; - (* a typeless pointer to the face object's extensions *) - - generic : Pointer; - (* generic pointer - see TT_Set/Get_Face_Pointer *) - end; - - (********************************************************************) - (* *) - (* FreeType Instance Object *) - (* *) - (********************************************************************) - - TInstance = record - - owner : PFace; - - valid : Boolean; - metrics : TIns_Metrics; - - numFDefs : Int; (* number of function defs *) - maxFDefs : Int; - FDefs : PDefArray; (* table of FDefs entries *) - - numIDefs : Int; (* number of instruction defs *) - maxIDefs : Int; - IDefs : PDefArray; (* table of IDefs entries *) - - maxFunc : Int; (* maximum function number *) - maxIns : Int; (* maximum instruction number *) - - codeRangeTable : TCodeRangeTable; - - GS : TGraphicsState; - - storeSize : Int; - storage : PStorage; - (* the storage area *) - - cvtSize : Int; - cvt : PLong; - (* the scaled control value table *) - - twilight : TGlyph_Zone; - (* the instance's twilight zone *) - - (* debugging variables *) - - debug : Boolean; - context : PExec_Context; - (* when using the debugger, we must keep the *) - (* execution context with the instance object *) - (* rather than asking it on demand *) - - generic : Pointer; - (* generic pointer - see TT_Set/Get_Instance_Pointer *) - end; - - (********************************************************************) - (* *) - (* FreeType Execution Context Object *) - (* *) - (********************************************************************) - - TExec_Context = record - - face : PFace; - instance : PInstance; - error : Int; - - stackSize : Int; (* size of instance stack *) - top : Int; (* top of instance stack *) - stack : PStorage; (* current instance stack *) - - args : Int; (* number of arguments in opcode *) - new_top : Int; (* new stack top after opc. exec *) - - zp0, - zp1, - zp2, - twilight, - pts : TGlyph_Zone; - - GS : TGraphicsState; - - curRange : Int; (* current code range number *) - code : PByte; (* current code range *) - IP : Int; (* current instruction pointer *) - codeSize : Int; (* size of current range *) - - opcode : Byte; (* current opcode *) - length : Int; (* length of current opcode *) - - step_ins : boolean; (* used by the interpreter *) - (* if true, go to the next *) - (* instruction.. *) - - loadSize : Int; - loadStack : PSubglyph_Stack; - (* the load stack used to load composite glyphs *) - - glyphIns : PByte; (* glyph instructions *) - glyphSize : Int; (* glyph ins. size *) - - callTop : Int; - callSize : Int; - callStack : PCallStack; (* interpreter call stack *) - - period, (* values used for the *) - phase, (* 'SuperRounding' *) - threshold : TT_F26dot6; - - maxPoints : Int; - maxContours : Int; - - (* the following are copies of the variables found *) - (* in an instance object *) - - numFDefs : Int; (* number of function defs *) - maxFDefs : Int; - FDefs : PDefArray; (* table of FDefs entries *) - - numIDefs : Int; (* number of instruction defs *) - maxIDefs : Int; - IDefs : PDefArray; (* table of IDefs entries *) - - maxFunc : Int; (* maximum function number *) - maxIns : Int; (* maximum instruction number *) - - codeRangeTable : TCodeRangeTable; - - storeSize : Int; (* size of current storage *) - storage : PStorage; (* storage area *) - - metrics : TIns_Metrics; - - cur_ppem : Int; - scale1 : Long; - scale2 : Long; - cached_metrics : Boolean; - -(* - numContours : Int; - endContours : PUShort; -*) - Instruction_Trap : Boolean; - (* used by the full-screen debugger. If set, the *) - (* interpreter will exit after executing one *) - (* opcode. Used to perform single-stepping.. *) - - is_composite : Boolean; - (* this flag is true when the glyph is a composite *) - (* one. In this case, we measure original distances *) - (* in the loaded coordinates (font units), then *) - (* scale them appropriately. This get rids of *) - (* transformation artifacts (like symetries..) *) - - cvtSize : Int; - cvt : PLong; - - (* these variables are proper to the context *) - - F_dot_P : Long; - (* the dot product of the free and projection *) - (* vector is used in frequent operations.. *) - - func_round : TRound_Function; - func_project : TProject_Function; - func_dualproj : TProject_Function; - func_freeProj : TProject_Function; - func_move : TMove_Function; - - func_read_cvt : TFunc_Get_CVT; - func_write_cvt : TFunc_Set_CVT; - func_move_cvt : TFunc_Set_CVT; - (* single width ? *) - - end; - - (********************************************************************) - (* *) - (* FreeType Glyph Object *) - (* *) - (********************************************************************) - - PGlyph = ^TGlyph; - TGlyph = record - face : PFace; - metrics : TT_Big_Glyph_Metrics; - outline : TT_Outline; - - (* temporary - debugging purposes *) - computed_width : Int; - precalc_width : Int; - is_composite : Boolean; - end; - - PFont_Input = ^TFont_Input; - TFont_Input = record - stream : TT_Stream; (* inpute stream *) - fontIndex : Int; (* index of font in collection *) - end; - - (****************************************************************) - (* *) - (* Code Range Functions *) - (* *) - (****************************************************************) - - function Goto_CodeRange( exec : PExec_Context; - range : Int; - IP : Int ) : TError; - (* Go to a specified coderange *) - - function Get_CodeRange( exec : PExec_Context; - range : Int ) : PCodeRange; - (* return a pointer to a given coderange record *) - (* used only by the debugger *) - - function Set_CodeRange( exec : PExec_Context; - range : Int; - base : Pointer; - length : Int ) : TError; - (* Set a given code range properties *) - - function Clear_CodeRange( exec : PExec_Context; - range : Int ) : TError; - (* Clear a given code range *) - - (****************************************************************) - (* *) - (* Management Functions *) - (* *) - (****************************************************************) - - function New_Context( instance : PInstance ) : PExec_Context; - (* Get a new execution context, either fresh or recycled, for *) - (* an instance of the face 'res' *) - (* *) - (* Notes : - called by 'New_Face_Context' *) - (* - assumes that the face mutex is acquired *) - - procedure Done_Context( exec : PExec_Context ); - (* Releases an execution context. The context can be destroyed *) - (* or recycled, depending on implementation *) - (* *) - (* Notes : - called by 'Done_Face_Context' *) - (* - assumes that the face mutex is acquired *) - - (****************************************************************) - (* *) - (* Instance Update Functions *) - (* *) - (****************************************************************) - - procedure Context_Load( exec : PExec_Context; - ins : PInstance ); - (* update exec's data with the one found in 'ins' *) - (* typically before an execution *) - - procedure Context_Save( exec : PExec_Context; - ins : PInstance ); - (* update ins's data with the one found in 'exec' *) - (* typically after an execution *) - - function Context_Run( exec : PExec_Context; - debug : Boolean ) : TError; - - function Instance_Init( ins : PInstance ) : TError; - - function Instance_Reset( ins : PInstance; - debug : boolean ) : TError; - - - function Scale_X( var metrics : TIns_Metrics; x : TT_Pos ) : TT_Pos; - - function Scale_Y( var metrics : TIns_Metrics; y : TT_Pos ) : TT_Pos; - - function TTObjs_Init : TError; - (* Initialize object manager *) - - procedure TTObjs_Done; - (* Finalize object manager *) - -var - face_cache : TCache; - exec_cache : TCache; - -implementation - -uses TTMemory, TTFile, TTCalc, TTLoad, TTInterp; - - function Face_Create( _face : Pointer; - _input : Pointer ) : TError; far; forward; - - function Face_Destroy( _face : Pointer ) : TError; far; forward; - - function Context_Create( _context : Pointer; - _face : Pointer ) : TError; far; forward; - - function Context_Destroy( exec : Pointer ) : TError; far; forward; - - function Instance_Create( _ins : Pointer; - _face : Pointer ) : TError; far; forward; - - function Instance_Destroy( instance : Pointer ) : TError; far; forward; - - function Glyph_Create( _glyph : Pointer; - _face : Pointer ) : TError; far; forward; - - function Glyph_Destroy( _glyph : Pointer ) : TError; far; forward; - - - -const - objs_face_class : TCache_Class - = (object_size: sizeof(TFace); - idle_limit : -1; - init : Face_Create; - done : Face_Destroy ); - - objs_exec_class : TCache_Class - = (object_size: sizeof(TExec_Context); - idle_limit : 1; - init : Context_Create; - done : Context_Destroy ); - - objs_instance_class : TCache_Class - = (object_size: sizeof(TInstance); - idle_limit : -1; - init : Instance_Create; - done : Instance_Destroy ); - - objs_glyph_class : TCache_Class - = (object_size: sizeof(TGlyph); - idle_limit : -1; - init : Glyph_Create; - done : Glyph_Destroy ); - -(******************************************************************* - * - * Function : New_Context - * - * Description : gets a new active execution context for a given - * resident/face object. - * - * Input : aResident - * - * Output : Returns new exec. context. Nil in case of failure - * - * Notes : Don't forget to modify 'Free_Context' if you change - * the fields of a TExec_Context - * - ******************************************************************) - - function New_Context( instance : PInstance ) : PExec_Context; - var - exec : PExec_Context; - begin - if instance = nil then - exec := nil - else - Cache_New( exec_cache, Pointer(exec), instance^.owner ); - - New_Context := exec; - end; - -(******************************************************************* - * - * Function : Done_Context - * - * Description : - * - * Input : aResident - * - * Output : Discards an active execution context when it - * becomes unuseful. It is putin its face's recycle - * list - * - ******************************************************************) - - procedure Done_Context( exec : PExec_Context ); - begin - if exec <> nil then - Cache_Done( exec_cache, Pointer(exec) ); - end; - -(******************************************************************* - * - * Function : New_Instance - * - * Description : gets a new active instance for a given - * face object. - * - * Input : face - * - * Output : Returns new instance. Nil in case of failure - * - ******************************************************************) - - function New_Instance( face : PFace ) : PInstance; - var - ins : PInstance; - begin - if face = nil then - ins := nil - else - Cache_New( face^.instances, Pointer(ins), face ); - - New_Instance := ins; - end; - -(******************************************************************* - * - * Function : Done_Instance - * - * Description : - * - * Input : instance - * - * Output : Discards an active instance when it - * becomes unuseful. It is put in its face's recycle - * list - * - ******************************************************************) - - procedure Done_Instance( instance : PInstance ); - begin - if instance <> nil then - Cache_Done( instance^.owner^.instances, Pointer(instance) ); - end; - - (****************************************************************) - (* *) - (* Code Range Functions *) - (* *) - (****************************************************************) - -(******************************************************************* - * - * Function : Goto_CodeRange - * - * Description : Switch to a new code range (updates Code and IP). - * - * Input : exec target execution context - * range new execution code range - * IP new IP in new code range - * - * Output : SUCCESS on success. FAILURE on error (no code range). - * - *****************************************************************) - - function Goto_CodeRange( exec : PExec_Context; - range : Int; - IP : Int ) : TError; - begin - Goto_CodeRange := Failure; - - if (range < 1) or (range > 3) then - begin - error := TT_Err_Bad_Argument; - exit; - end; - - with exec^.codeRangeTable[range] do - begin - - if base = nil then - begin - error := TT_Err_Invalid_CodeRange; - exit; - end; - - (* NOTE : Because the last instruction of a program may be a CALL *) - (* which will return to the first byte *after* the code *) - (* range, we test for IP <= Size, instead of IP < Size. *) - - if IP > size then - begin - error := TT_Err_Code_Overflow; - exit; - end; - - exec^.code := base; - exec^.codeSize := size; - exec^.IP := IP; - exec^.currange := range; - end; - - Goto_CodeRange := Success; - end; - -(******************************************************************* - * - * Function : Get_CodeRange - * - * Description : Returns a pointer to a given code range. Should - * be used only by the debugger. Returns NULL if - * 'range' is out of current bounds. - * - * Input : exec target execution context - * range new execution code range - * - * Output : Pointer to the code range record. NULL on failure. - * - *****************************************************************) - - function Get_CodeRange( exec : PExec_Context; - range : Int ) : PCodeRange; - begin - if (range < 1) or (range > 3) then - Get_CodeRange := nil - else - Get_CodeRange := @exec^.codeRangeTable[range]; - end; - -(******************************************************************* - * - * Function : Set_CodeRange - * - * Description : Sets a code range. - * - * Input : exec target execution context - * range code range index - * base new code base - * length sange size in bytes - * - * Output : SUCCESS on success. FAILURE on error. - * - *****************************************************************) - - function Set_CodeRange( exec : PExec_Context; - range : Int; - base : Pointer; - length : Int ) : TError; - begin - Set_CodeRange := Failure; - - if (range < 1) or (range > 3) then - begin - error := TT_Err_Invalid_CodeRange; - exit; - end; - - exec^.codeRangeTable[range].base := base; - exec^.codeRangeTable[range].size := length; - - Set_CodeRange := Success; - end; - -(******************************************************************* - * - * Function : Clear_CodeRange - * - * Description : clears a code range. - * - * Input : exec target execution context - * range code range index - * - * Output : SUCCESS on success. FAILURE on error. - * - * Notes : Does not set the Error variable. - * - *****************************************************************) - - function Clear_CodeRange( exec : PExec_Context; - range : Int ) : TError; - begin - Clear_CodeRange := Failure; - - if (range < 1) or (range > 3) then - begin - error := TT_Err_Invalid_CodeRange; - exit; - end; - - exec^.codeRangeTable[range].base := nil; - exec^.codeRangeTable[range].size := 0; - - Clear_CodeRange := Success; - end; - - - (****************************************************************) - (* *) - (* Management Functions *) - (* *) - (****************************************************************) - -(******************************************************************* - * - * Function : Context_Destroy - * - * Description : Frees an execution context - * - * Input : context : execution context - * - * Notes : Allocation is found in the 'New_Context' function - * - ******************************************************************) - - function Context_Destroy( exec : Pointer ) : TError; - begin - Context_Destroy := Success; - - if exec = nil then exit; - - with PExec_Context(exec)^ do - begin - (* Free contours array *) - Free( pts.conEnds ); - pts.n_contours := 0; - - Free( pts.cur ); - Free( pts.org ); - - Free( pts.flags ); - pts.n_points := 0; - - (* Free stack *) - Free( stack ); - stackSize := 0; - - (* Free call stack *) - Free( callStack ); - callSize := 0; - callTop := 0; - - (* Free composite load stack *) - Free( loadStack ); - - (* free glyph code range *) - Free( glyphIns ); - glyphSize := 0; - - instance := nil; - face := nil; - end; - end; - - -(******************************************************************* - * - * Function : Context_Create - * - * Description : Creates a new execution context - * - * Input : _context context record - * _face face record - * - ******************************************************************) - - function Context_Create( _context : Pointer; - _face : Pointer ) : TError; - var - n_points : Int; - n_twilight : Int; - - exec : PExec_Context; - label - Fail_Memory; - begin - Context_Create := Failure; - - exec := PExec_Context(_context); - exec^.face := PFace(_face); - - with exec^ do - begin - - callSize := 32; - loadSize := face^.maxComponents + 1; - storeSize := face^.MaxProfile.maxStorage; - stackSize := face^.MaxProfile.maxStackElements + 32; - (* Allocate a little extra for broken fonts like Courbs.ttf *) - (* and Timesbs.ttf *) - - n_points := face^.maxPoints + 2; - - (* Reserve glyph code range *) - if Alloc( glyphIns, face^.MaxProfile.maxSizeOfInstructions ) or - - (* Reserve call stack *) - Alloc( callStack, callSize*sizeof(TCallRecord) ) or - - (* Reserve stack *) - Alloc( stack, stackSize*sizeof(Long) ) then - - (* we don't reserve the points and contours arrays anymore *) - (* as this will be performed automatically by a Context_Load *) - - (* the same is true for the load stack *) - - goto Fail_Memory; - - maxPoints := 0; - maxContours := 0; - - loadSize := 0; - loadStack := nil; - - pts.n_points := 0; - pts.n_contours := 0; - - instance := nil; - end; - - Context_Create := Success; - exit; - - Fail_Memory: - Context_Destroy(_context); - error := TT_Err_Out_Of_Memory; - exit; - end; - -(******************************************************************* - * - * Function : Context_Run - * - * Description : Run a glyph's bytecode stream - * - * Input : exec context record - * - ******************************************************************) - - function Context_Run( exec : PExec_Context; - debug : Boolean ) : TError; - begin - Context_Run := Failure; - - if Goto_CodeRange( exec, TT_CodeRange_Glyph, 0 ) then - exit; - - with exec^ do - begin - top := 0; - callTop := 0; - zp0 := pts; - zp1 := pts; - zp2 := pts; - GS.gep0 := 1; - GS.gep1 := 1; - GS.gep2 := 1; - - GS.projVector.x := $4000; - GS.projVector.y := $0000; - GS.freeVector := GS.projVector; - GS.dualVector := GS.projVector; - GS.round_state := 1; - GS.loop := 1; - end; - - if not debug and Run_Ins( @exec^ ) then - begin - error := exec^.error; - exit; - end; - - Context_Run := Success; - end; - -(****************************************************************) -(* *) -(* Instance Update Functions *) -(* *) -(****************************************************************) - -(******************************************************************* - * - * Function : Context_Load - * - * Description : loads instance data into a new execution context - * - *******************************************************************) - - procedure Context_Load( exec : PExec_Context; - ins : PInstance ); - - procedure Update_Max( var size : Int; - mult : Int; - var buff; - new_max : Int ); - begin - if size*mult < new_max then - begin - Free(buff); - Alloc( buff, new_max*mult ); - size := new_max; - end; - end; - - - procedure Update_Points( max_points : Int; - max_contours : Int; - exec : PExec_Context ); - begin - if exec^.maxPoints < max_points then - begin - Free( exec^.pts.org ); - Free( exec^.pts.cur ); - Free( exec^.pts.flags ); - - Alloc( exec^.pts.org, 2*sizeof(TT_F26dot6)*max_points ); - Alloc( exec^.pts.cur, 2*sizeof(TT_F26dot6)*max_points ); - Alloc( exec^.pts.flags, sizeof(Byte) *max_points ); - - exec^.maxPoints := max_points; - end; - - if exec^.maxContours < max_contours then - begin - Free( exec^.pts.conEnds ); - Alloc( exec^.pts.conEnds, sizeof(Short)*max_contours ); - exec^.maxContours := max_contours; - end; - end; - - - begin - with exec^ do - begin - - instance := ins; - face := ins^.owner; - - numFDefs := ins^.numFDefs; - numIDefs := ins^.numIDefs; - maxFDefs := ins^.maxFDefs; - maxIDefs := ins^.maxIDefs; - FDefs := ins^.FDefs; - IDefs := ins^.IDefs; - maxFunc := ins^.maxFunc; - maxIns := ins^.maxIns; - - metrics := ins^.metrics; - - codeRangeTable := ins^.codeRangeTable; - - storeSize := ins^.storeSize; - storage := ins^.storage; - - twilight := ins^.twilight; - - (* We reserve some extra space to deal with broken fonts *) - (* like Arial BS, Courier BS, etc.. *) - Update_Max( stackSize, - sizeof(Long), - stack, - face^.maxProfile.maxStackElements+32 ); - - Update_Max( loadSize, - sizeof(TSubglyph_Record), - loadStack, - face^.maxComponents+1 ); - - Update_Max( glyphSize, - sizeof(Byte), - glyphIns, - face^.maxProfile.maxSizeOfInstructions ); - - (* XXXX : Don't forget the phantom points !! *) - Update_Points( face^.maxPoints+2, face^.maxContours, exec ); - - pts.n_points := 0; - pts.n_contours := 0; - - instruction_trap := false; - - (* Set default graphics state *) - GS := ins^.GS; - - cvtSize := ins^.cvtSize; - cvt := ins^.cvt; - end; - end; - - - procedure Context_Save( exec : PExec_Context; - ins : PInstance ); - begin - with ins^ do - begin - error := exec^.error; - - numFDefs := exec^.numFDefs; - numIDefs := exec^.numIDefs; - maxFunc := exec^.maxFunc; - maxIns := exec^.maxIns; - - codeRangeTable := exec^.codeRangeTable; - - (* Set default graphics state *) - - GS := exec^.GS; - end; - end; - -(******************************************************************* - * - * Function : Instance_Destroy - * - * Description : The Instance Record destructor. - * - *****************************************************************) - - function Instance_Destroy( instance : Pointer ) : TError; - var - ins : PInstance; - begin - - Instance_Destroy := Success; - - ins := PInstance(instance); - if ins = nil then - exit; - - with ins^ do - begin - - if debug then - begin - context := nil; - debug := false; - end; - - (* Free twilight zone *) - Free( twilight.org ); - Free( twilight.cur ); - Free( twilight.flags ); - twilight.n_points := 0; - - Free( cvt ); - cvtSize := 0; - - Free( storage ); - storeSize := 0; - - Free( FDefs ); - Free( IDefs ); - numFDefs := 0; - numIDefs := 0; - maxFDefs := 0; - maxIDefs := 0; - - owner := nil; - valid := false; - - end; - end; - -(******************************************************************* - * - * Function : Instance_Create - * - * Description : The Instance constructor. - * - * This functions creates a new instance object for a given face - * - *****************************************************************) - - function Instance_Create( _ins : Pointer; - _face : Pointer ) : TError; - label - Fail_Memory; - var - l : Longint; - ins : PInstance; - face : PFace; - - n_twilight : Int; - begin - Instance_Create := Failure; - - {$IFDEF ASSERT} - if (_face = nil) then - Panic1('TTInst.Init_Instance : void argument' ); - {$ENDIF} - - face := PFace(_face); - ins := PInstance(_ins); - - ins^.owner := face; - - with face^, ins^ do - begin - - (* Reserve function and instruction defs arrays *) - maxFDefs := maxProfile.maxFunctionDefs; - maxIDefs := maxProfile.maxInstructionDefs; - storeSize := maxProfile.maxStorage; - n_twilight := maxProfile.maxTwilightPoints; - - if Alloc( FDefs, maxFDefs * sizeof(TDefRecord) ) or - Alloc( IDefs, maxIDefs * sizeof(TDefRecord) ) or - Alloc( storage, storeSize * sizeof(Long) ) or - - Alloc( twilight.org, 2* n_twilight * sizeof(TT_F26Dot6) ) or - Alloc( twilight.cur, 2* n_twilight * sizeof(TT_F26Dot6) ) or - Alloc( twilight.flags, n_twilight ) - - then goto Fail_Memory; - - twilight.n_points := n_twilight; - - metrics.x_resolution := 96; - metrics.y_resolution := 96; - metrics.pointSize := 10; - metrics.x_scale2 := 1; - metrics.y_scale2 := 1; - metrics.scale2 := 1; - - { Reserve Control Value Table } - cvtSize := face^.cvtSize; - - if Alloc( cvt, cvtSize * sizeof(Long) ) then - goto Fail_Memory; - - end; - - Instance_Create := Success; - exit; - - Fail_Memory: - Instance_Destroy(ins); - (* free all partially allocated tables, including the instance record *) - - error := TT_Err_Out_Of_Memory; - exit; - end; - - -(******************************************************************* - * - * Function : Instance_Init - * - * Description : Initializes a fresh new instance - * Executes the font program if any is found - * - * Input : ins the instance object to initialise - * - *****************************************************************) - - function Instance_Init( ins : PInstance ) : TError; - var - exec : PExec_Context; - face : PFace; - label - Fin; - begin - Instance_Init := Failure; - - face := ins^.owner; - - if ins^.debug then - exec := ins^.context - else - exec := New_Context( ins ); - (* debugging instances have their own context *) - - if exec = nil then - begin - error := TT_Err_Could_Not_Find_Context; - exit; - end; - - with ins^ do begin - GS := Default_GraphicsState; - numFDefs := 0; - numIDefs := 0; - maxFunc := -1; - maxIns := -1; - end; - - Context_Load( exec, ins ); - - with exec^ do - begin - callTop := 0; - top := 0; - period := 64; - phase := 0; - threshold := 0; - - with metrics do - begin - x_ppem := 10; - y_ppem := 10; - pointSize := 10; - x_scale1 := 0; - x_scale2 := 1; - y_scale1 := 0; - y_scale2 := 1; - - scale1 := 0; - scale2 := 1; - ratio := 1 shl 16; - end; - - instruction_trap := false; - - cvtSize := ins^.cvtSize; - cvt := ins^.cvt; - - F_dot_P := $10000; - end; - - Set_CodeRange( exec, - TT_CodeRange_Font, - face^.fontProgram, - face^.fontPgmSize ); - (* Allow font program execution *) - - Clear_CodeRange( exec, TT_CodeRange_Cvt ); - Clear_CodeRange( exec, TT_CodeRange_Glyph ); - (* disable CVT and glyph programs coderanges *) - - if face^.fontPgmSize > 0 then - begin - if Goto_CodeRange( exec, TT_CodeRange_Font, 0 ) then - goto Fin; - - if Run_Ins( @exec^ ) then - begin - error := exec^.error; - goto Fin; - end; - end; - - Instance_Init := Success; - - Fin: - Context_Save( exec, ins ); - - if not ins^.debug then - Done_Context( exec ); - - ins^.valid := False; - end; - -(******************************************************************* - * - * Function : Instance_Reset - * - * Description : Reset an instance to a new pointsize - * Executes the prep/cvt program if any is found - * - * Input : ins the instance object to initialise - * - *****************************************************************) - - function Instance_Reset( ins : PInstance; - debug : boolean ) : TError; - var - exec : PExec_Context; - face : PFace; - i : Int; - label - Fin; - begin - Instance_Reset := Failure; - - if ins^.valid then - begin - Instance_Reset := Success; - exit; - end; - - face := ins^.owner; - - (* compute new transform *) - - with ins^.metrics do - begin - - if x_ppem < 1 then x_ppem := 1; - if y_ppem < 1 then y_ppem := 1; - - if x_ppem >= y_ppem then - begin - scale1 := x_scale1; - scale2 := x_scale2; - ppem := x_ppem; - x_ratio := 1 shl 16; - y_ratio := MulDiv_Round( y_ppem, $10000, x_ppem ); - end - else - begin - scale1 := y_scale1; - scale2 := y_scale2; - ppem := y_ppem; - x_ratio := MulDiv_Round( x_ppem, $10000, y_ppem ); - y_ratio := 1 shl 16 - end; - end; - - (* scale the cvt values to the new ppem *) - - for i := 0 to ins^.cvtSize-1 do - ins^.cvt^[i] := MulDiv_Round( ins^.owner^.cvt^[i], - ins^.metrics.scale1, - ins^.metrics.scale2 ); - - (* Note that we use the y resolution by default to scale the cvt *) - - ins^.GS := Default_GraphicsState; - - if ins^.debug then - exec := ins^.context - else - exec := New_Context(ins); - - if exec = nil then - begin - error := TT_Err_Could_Not_Find_Context; - exit; - end; - - Context_Load( exec, ins ); - - Set_CodeRange( exec, - TT_CodeRange_CVT, - face^.cvtProgram, - face^.cvtPgmSize ); - - Clear_CodeRange( exec, TT_CodeRange_Glyph ); - - with exec^ do - begin - - for i := 0 to storeSize-1 do - storage^[i] := 0; - - instruction_trap := False; - - top := 0; - callTop := 0; - - (* all twilight points are originally zero *) - for i := 0 to twilight.n_points-1 do - begin - twilight.org^[i].x := 0; - twilight.org^[i].y := 0; - twilight.cur^[i].x := 0; - twilight.cur^[i].y := 0; - end; - end; - - if face^.cvtPgmSize > 0 then - if Goto_CodeRange( exec, TT_CodeRange_CVT, 0 ) or - ( (not debug) and Run_Ins( @exec^ ) ) then - goto Fin; - - ins^.GS := exec^.GS; - Instance_Reset := Success; - - Fin: - Context_Save( exec, ins ); - - if not ins^.debug then - Done_Context(exec); - - if error = 0 then - ins^.valid := True; - end; - - -(******************************************************************* - * - * Function : Face_Destroy - * - * Description : The face object destructor - * - *****************************************************************) - - function Face_Destroy( _face : Pointer ) : TError; - var - face : PFace; - n : Int; - begin - Face_Destroy := Success; - - face := PFace(_face); - if face = nil then exit; - - Cache_Destroy( face^.instances ); - Cache_Destroy( face^.glyphs ); - - (* freeing the tables directory *) - Free( face^.dirTables ); - face^.numTables := 0; - - (* freeing the locations table *) - Free( face^.glyphLocations ); - face^.numLocations := 0; - - (* freeing the character mapping tables *) - for n := 0 to face^.numCMaps-1 do - CharMap_Free( face^.cMaps^[n] ); - - Free( face^.cMaps ); - face^.numCMaps := 0; - - (* freeing the CVT *) - Free( face^.cvt ); - face^.cvtSize := 0; - - (* freeing the horizontal header *) - Free( face^.horizontalHeader.short_metrics ); - Free( face^.horizontalHeader.long_metrics ); - if face^.verticalInfo then - begin - Free( face^.verticalHeader.short_metrics ); - Free( face^.verticalHeader.long_metrics ); - face^.verticalInfo := False; - end; - - (* freeing the programs *) - Free( face^.fontProgram ); - Free( face^.cvtProgram ); - face^.fontPgmSize := 0; - face^.cvtPgmSize := 0; - - (* freeing the gasp table - none yet *) - Free( face^.gasp.gaspRanges ); - - (* freeing the names table *) - Free( face^.nameTable.names ); - Free( face^.nameTable.storage ); - face^.nameTable.numNameRecords := 0; - face^.nameTable.format := 0; - - (* freeing the hdmx table *) - for n := 0 to face^.hdmx.num_records-1 do - Free( face^.hdmx.records^[n].widths ); - - Free( face^.hdmx.records ); - face^.hdmx.num_records := 0; - - TT_Close_Stream( face^.stream ); - end; - -(******************************************************************* - * - * Function : Face_Create - * - * Description : The face object constructor - * - *****************************************************************) - - function Face_Create( _face : Pointer; - _input : Pointer ) : TError; - var - input : PFont_Input; - face : PFace; - label - Fail; - begin - Face_Create := Failure; - - face := PFace(_face); - input := PFont_Input(_input); - - face^.stream := input^.stream; - - if Cache_Create( objs_instance_class, face^.instances ) or - Cache_Create( objs_glyph_class, face^.glyphs ) then exit; - - (* Load collection directory if present *) - if Load_TrueType_Directory( face, input^.fontIndex ) then - exit; - - if Load_TrueType_Header ( face ) or - Load_TrueType_MaxProfile ( face ) or - Load_TrueType_Locations ( face ) or - Load_TrueType_CMap ( face ) or - Load_TrueType_CVT ( face ) or - Load_TrueType_Metrics_Header ( face, false ) or - Load_TrueType_Programs ( face ) or - Load_TrueType_Gasp ( face ) or - Load_TrueType_Names ( face ) or - Load_TrueType_OS2 ( face ) or - Load_TrueType_Hdmx ( face ) or - Load_TrueType_Postscript ( face ) or - Load_TrueType_Metrics_Header ( face, true ) then - goto Fail; - - Face_Create := Success; - exit; - - Fail: - Face_Destroy( face ); - end; - - - function Glyph_Destroy( _glyph : Pointer ) : TError; - var - glyph : PGlyph; - begin - Glyph_Destroy := Success; - - glyph := PGlyph(_glyph); - if glyph = nil then - exit; - - glyph^.outline.owner := true; - TT_Done_Outline( glyph^.outline ); - end; - - - function Glyph_Create( _glyph : Pointer; - _face : Pointer ) : TError; - var - glyph : PGlyph; - begin - glyph := PGlyph(_glyph); - - glyph^.face := PFace(_face); - error := TT_New_Outline( glyph^.face^.maxPoints+2, - glyph^.face^.maxContours, - glyph^.outline ); - if error <> TT_Err_Ok then - Glyph_Create := Failure - else - Glyph_Create := Success; - end; - - - - function Scale_X( var metrics : TIns_Metrics; x : TT_Pos ) : TT_Pos; - begin - Scale_X := MulDiv_Round( x, metrics.x_scale1, metrics.x_scale2 ); - end; - - - - function Scale_Y( var metrics : TIns_Metrics; y : TT_Pos ) : TT_Pos; - begin - Scale_Y := MulDiv_Round( y, metrics.y_scale1, metrics.y_scale2 ); - end; - - - - function TTObjs_Init : TError; - begin - TTObjs_Init := Failure; - - Cache_Create( objs_face_class, face_cache ); - Cache_Create( objs_exec_class, exec_cache ); - - TTObjs_Init := success; - end; - - - - procedure TTObjs_Done; - begin - Cache_Destroy( face_cache ); - Cache_Destroy( exec_cache ); - end; - -end. - Index: xc/extras/FreeType/pascal/lib/ttraster.pas diff -u xc/extras/FreeType/pascal/lib/ttraster.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/ttraster.pas:removed --- xc/extras/FreeType/pascal/lib/ttraster.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/ttraster.pas Wed Mar 16 20:59:47 2005 @@ -1,3445 +0,0 @@ -(******************************************************************* - * - * TTRaster.Pas v 1.2 - * - * The FreeType glyph rasterizer. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * NOTES : This version supports the following : - * - * - direct grayscaling - * - sub-banding - * - drop-out modes 4 and 5 - * - second pass for complete drop-out control ( bitmap only ) - * - variable precision - * - * Re-entrancy is _not_ planned. - * - * Changes between 1.1 and 1.2 : - * - * - no more trace tables, now uses linked list to sort - * coordinates. - * - * - reduced code size using function dispatch within a generic - * draw_sweep function. - * - * - added variable precision for finer rendering at small ppems - * - * - * Note that its interface may change in the future. - * - ******************************************************************) - -Unit TTRASTER; - -interface - -{$I TTCONFIG.INC} - -{ $DEFINE TURNS} - -uses -{$IFDEF VIRTUALPASCAL} - Use32, -{$ENDIF} - FreeType, - TTTypes; - -const - - Err_Ras_None = 0; - Err_Ras_NotIni = -2; (* Rasterizer not Initialized *) - Err_Ras_Overflow = -3; (* Profile Table Overflow *) - Err_Ras_Neg_H = -4; (* Negative Height encountered ! *) - Err_Ras_Invalid = -5; (* Invalid value encountered ! *) - Err_Ras_Invalid_Contours = -6; - - function Render_Glyph( var glyph : TT_Outline; - var target : TT_Raster_Map ) : TError; - - (* Render one glyph in the target bitmap, using drop-out control *) - (* mode 'scan' *) - - function Render_Gray_Glyph( var glyph : TT_Outline; - var target : TT_Raster_Map ) : TError; - - (* Render one gray-level glyph in the target pixmap *) - (* palette points to an array of 5 colors used for the rendering *) - (* use nil to reuse the last palette. Default is VGA graylevels *) - -{$IFDEF SMOOTH} - function Render_Smooth_Glyph( var glyph : TGlyphRecord; - target : PRasterBlock; - scan : Byte; - palette : pointer ) : boolean; -{$ENDIF} - - procedure Set_High_Precision( High : boolean ); - (* Set rendering precision. Should be set to TRUE for small sizes only *) - (* ( typically < 20 ppem ) *) - - procedure Set_Second_Pass( Pass : boolean ); - (* Set second pass flag *) - - function TTRaster_Init : TError; - procedure TTRaster_Done; - -implementation - -uses - TTCalc, { used for MulDiv } - TTError -{$IFDEF DEBUG} - ,GMain { Used to access VRAM pointer VIO during DEBUG } -{$ENDIF} - ; - - -{$DEFINE NO_ASM} - -const - Render_Pool_Size = 64000; - Gray_Lines_Size = 2048; - - MaxBezier = 32; (* Maximum number of stacked B‚ziers. *) - (* Setting this constant to more than 32 *) - (* is a pure waste of space *) - - Pixel_Bits = 6; (* fractional bits of input coordinates *) - - Cell_Bits = 8; - -type - - TEtats = ( Indetermine, Ascendant, Descendant, Plat ); - - PProfile = ^TProfile; - TProfile = record - Flow : Int; (* ascending or descending Profile *) - Height : Int; (* Profile's height in scanlines *) - Start : Int; (* Profile's starting scanline *) - Offset : ULong; (* offset of first coordinate in *) - (* render pool *) - - Link : PProfile; (* link used in several cases *) - - X : Longint; (* current coordinate during sweep *) - CountL : Int; (* number of lines to step before *) - (* this Profile becomes drawable *) - - next : PProfile; (* next Profile of the same contour *) - end; - - TBand = record - Y_Min : Int; - Y_Max : Int; - end; - - (* Simple record used to implement a stack of bands, required *) - (* by the sub-banding mechanism *) - -const - AlignProfileSize = ( sizeOf(TProfile) + 3 ) div 4; - (* You may need to compute this according to your prefered alignement *) - - LMask : array[0..7] of Byte - = ($FF,$7F,$3F,$1F,$0F,$07,$03,$01); - - RMask : array[0..7] of Byte - = ($80,$C0,$E0,$F0,$F8,$FC,$FE,$FF); - - (* left and right fill bitmasks *) - -type - Function_Sweep_Init = procedure( var min, max : Int ); - - Function_Sweep_Span = procedure( y : Int; - x1 : TT_F26dot6; - x2 : TT_F26dot6; - Left : PProfile; - Right : PProfile ); - - Function_Sweep_Step = procedure; - - (* prototypes used for sweep function dispatch *) - - TPoint = record x, y : long; end; - - TBezierStack = array[0..32*2] of TPoint; - PBezierStack = ^TBezierStack; - -{$IFNDEF CONST_PREC} - -var - Precision_Bits : Int; (* Fractional bits of Raster coordinates *) - Precision : Int; - Precision_Half : Int; - Precision_Step : Int; (* Bezier subdivision minimal step *) - Precision_Shift : Int; (* Shift used to convert coordinates *) - Precision_Mask : Longint; (* integer truncatoin mask *) - Precision_Jitter : Int; - -{$ELSE} - -const - Precision_Bits = 6; - Precision = 1 shl Precision_Bits; - Precision_Half = Precision div 2; - Precision_Step = Precision_Half; - Precision_Shift = 0; - Precision_Mask = -Precision; - Precision_Jitter = 2; - -{$ENDIF} - -var - Scale_Shift : Int; - - cProfile : PProfile; (* current Profile *) - fProfile : PProfile; (* head of Profiles linked list *) - oProfile : PProfile; (* old Profile *) - gProfile : PProfile; (* last Profile in case of impact *) - - nProfs : Int; (* current number of Profiles *) - - Etat : TEtats; (* State of current trace *) - - Fresh : Boolean; (* Indicates a new Profile which 'Start' field *) - (* must be set *) - - Joint : Boolean; (* Indicates that the last arc stopped sharp *) - (* on a scan-line. Important to get rid of *) - (* doublets *) - - Buff : PStorage; (* Profiles buffer a.k.a. Render Pool *) - SizeBuff : ULong; (* current render pool's size *) - MaxBuff : ULong; (* current render pool's top *) - profCur : ULong; (* current render pool cursor *) - - Cible : TT_Raster_Map; (* Description of target map *) - - BWidth : integer; - BCible : PByte; (* target bitmap buffer *) - GCible : PByte; (* target pixmap buffer *) - - TraceOfs : Int; (* current offset in target bitmap *) - TraceIncr : Int; (* increment to next line in target map *) - TraceG : Int; (* current offset in targer pixmap *) - - gray_min_x : Int; (* current min x during gray rendering *) - gray_max_x : Int; (* current max x during gray rendering *) - - (* Dispatch variables : *) - - Proc_Sweep_Init : Function_Sweep_Init; (* Sweep initialisation *) - Proc_Sweep_Span : Function_Sweep_Span; (* Span drawing *) - Proc_Sweep_Drop : Function_Sweep_Span; (* Drop out control *) - Proc_Sweep_Step : Function_Sweep_Step; (* Sweep line step *) - - Arcs : TBezierStack; - CurArc : Int; (* stack's top *) - - Points : TT_Points; - - Flags : PByte; (* current flags array *) - Outs : TT_PConStarts; (* current endpoints array *) - - nPoints, (* current number of points *) - nContours : Int; (* current number of contours *) - - LastX, (* Last and extrema coordinates during *) - LastY, (* rendering *) - MinY, - MaxY : LongInt; - -{$IFDEF TURNS} - numTurns : Int; -{$ENDIF} - - DropOutControl : Byte; (* current drop-out control mode *) - - Count_Table : array[0..255] of Word; - (* Look-up table used to quickly count set bits in a gray 2x2 cell *) - - Count_Table2 : array[0..255] of Word; - (* Look-up table used to quickly count set bits in a gray 2x2 cell *) - - Grays : array[0..4] of Byte; - (* gray palette used during gray-levels rendering *) - (* 0 : background .. 4 : foreground *) - - Gray_Lines : PByte; { 2 intermediate bitmap lines } - Gray_Width : integer; { width of the 'gray' lines in pixels } - -{$IFDEF SMOOTH} - Smooth_Cols : integer; - Smooths : array[0..16] of Byte; - (* smooth palette used during smooth-levels rendering *) - (* 0 : background...16 : foreground *) - - smooth_pass : integer; -{$ENDIF} - - Second_Pass : boolean; - (* indicates wether an horizontal pass should be performed *) - (* to control drop-out accurately when calling Render_Glyph *) - (* Note that there is no horizontal pass during gray render *) - - (* better set it off at ppem >= 18 *) - - Band_Stack : array[1..16] of TBand; - Band_Top : Int; - - - -{$IFDEF DEBUG3} -(****************************************************************************) -(* *) -(* Function: Pset *) -(* *) -(* Description: Used only in the "DEBUG3" state. *) -(* *) -(* This procedure simply plots a point on the video screen *) -(* Note that it relies on the value of cProfile->start, *) -(* which may sometimes not be set yet when Pset is called. *) -(* This will usually result in a dot plotted on the first *) -(* screen scanline ( far away its original position ). *) -(* *) -(* This "bug" means not that the current implementation is *) -(* buggy, as the bitmap will be rendered correctly, so don't *) -(* panic if you see 'flying' dots in debugging mode *) -(* *) -(* *) -(* Input: None *) -(* *) -(* Returns: Nada *) -(* *) -(****************************************************************************) - -procedure PSet; -var c : byte; - o : Int; - xz : LongInt; -begin - xz := Buff^[profCur] div Precision; - - with cProfile^ do - begin - - case Flow of - TT_Flow_Up : o := 80 * (profCur-Offset+Start) + xz div 8; - TT_Flow_Down : o := 80 * (Start-profCur+offset) + xz div 8; - end; - - if o > 0 then - begin - c := Vio^[o] or ( $80 shr ( xz and 7 )); - Vio^[o] := c; - end - end; -end; - -(****************************************************************************) -(* *) -(* Function: Clear_Band *) -(* *) -(* Description: Clears a Band on screen during DEBUG3 rendering *) -(* *) -(* Input: y1, y2 top and bottom of screen-wide band *) -(* *) -(* Returns: Nada. *) -(* *) -(****************************************************************************) - -procedure ClearBand( y1, y2 : Int ); -var - Y : Int; - K : Word; -begin - K := y1*80; - FillChar( Vio^[k], (y2-y1+1)*80, 0 ); -end; -{$ENDIF} - -{$IFNDEF CONST_PREC} - -(****************************************************************************) -(* *) -(* Function: Set_High_Precision *) -(* *) -(* Description: Sets precision variables according to param flag *) -(* *) -(* Input: High set to True for high precision ( typically for *) -(* ppem < 18 ), false otherwise. *) -(* *) -(****************************************************************************) - -procedure Set_High_Precision( High : boolean ); -begin - if High then - begin - Precision_Bits := 10; - Precision_Step := 128; - Precision_Jitter := 24; - end - else - begin - Precision_Bits := 6; - Precision_Step := 32; - Precision_Jitter := 2; - end; - - Precision := 1 shl Precision_Bits; - Precision_Half := Precision shr 1; - Precision_Shift := Precision_Bits - Pixel_Bits; - Precision_Mask := -Precision; -end; - -{$ENDIF} - -procedure Set_Second_Pass( Pass : boolean ); -begin - second_pass := pass; -end; - - -function TRUNC( x : Long ) : Long; {$IFDEF INLINE} inline; {$ENDIF} -begin - Trunc := (x and -Precision) div Precision; -end; - -function FRAC( x : Long ) : Int; {$IFDEF INLINE} inline; {$ENDIF} -begin - Frac := x and (Precision-1); -end; - -function FLOOR( x : Long ) : Long; {$IFDEF INLINE} inline; {$ENDIF} -begin - Floor := x and -Precision; -end; - -function CEILING( x : Long ) : Long; {$IFDEF INLINE} inline; {$ENDIF} -begin - Ceiling := (x + Precision-1) and -Precision; -end; - -function SCALED( x : Long ) : Long; {$IFDEF INLINE} inline; {$ENDIF} -begin - SCALED := (x shl scale_shift) - precision_half; -end; - -{$IFDEF USE32} (* speed things a bit on 32-bit systems *) -function MulDiv( a, b, c : Long ) : Long; {$IFDEF INLINE} inline; {$ENDIF} -begin - MulDiv := a*b div c; -end; -{$ENDIF} - -(****************************************************************************) -(* *) -(* Function: New_Profile *) -(* *) -(* Description: Creates a new Profile in the render pool *) -(* *) -(* Input: AEtat state/orientation of the new Profile *) -(* *) -(* Returns: True on sucess *) -(* False in case of overflow or of incoherent Profile *) -(* *) -(****************************************************************************) - -function New_Profile( AEtat : TEtats ) : boolean; -begin - - if fProfile = NIL then - begin - cProfile := PProfile( @Buff^[profCur] ); - fProfile := cProfile; - inc( profCur, AlignProfileSize ); - end; - - if profCur >= MaxBuff then - begin - Error := Err_Ras_Overflow; - New_Profile := False; - exit; - end; - - with cProfile^ do - begin - - Case AEtat of - - Ascendant : Flow := TT_Flow_Up; - Descendant : Flow := TT_Flow_Down; - else -{$IFDEF DEBUG} - Writeln('ERROR : Incoherent Profile' ); - Halt(30); -{$ELSE} - New_Profile := False; - Error := Err_Ras_Invalid; - exit; -{$ENDIF} - end; - - Start := 0; - Height := 0; - Offset := profCur; - Link := nil; - next := nil; - end; - - if gProfile = nil then gProfile := cProfile; - - Etat := AEtat; - Fresh := True; - Joint := False; - - New_Profile := True; -end; - -{$IFDEF TURNS} -(****************************************************************************) -(* *) -(* Function: Insert_Y_Turn *) -(* *) -(* Description: Insert a slaient into the sorted list *) -(* *) -(* Input: new y turn *) -(* *) -(****************************************************************************) - -procedure Insert_Y_Turn( y : Int ); -var - y_turns : PStorage; - y2, n : Int; -begin - n := numTurns-1; - y_turns := @Buff^[SizeBuff-numTurns]; - - (* look for first y value that is <= *) - while (n >= 0) and (y < y_turns^[n]) do dec(n); - - (* if it is <, simply insert it, ignor if we found one == *) - - if (n >= 0) and (y > y_turns^[n]) then - while (n >= 0) do - begin - y2 := y_turns^[n]; - y_turns^[n] := y; - y := y2; - dec( n ); - end; - - if (n < 0) then - begin - dec( MaxBuff ); - inc( numTurns ); - Buff^[SizeBuff-numTurns] := y; - end -end; -{$ENDIF} - - -(****************************************************************************) -(* *) -(* Function: End_Profile *) -(* *) -(* Description: Finalizes the current Profile. *) -(* *) -(* Input: None *) -(* *) -(* Returns: True on success *) -(* False on overflow or incoherency. *) -(* *) -(****************************************************************************) - -function End_Profile : boolean; -var - H : Int; - oldProfile : PProfile; -begin - H := profCur - cProfile^.Offset; - - if H < 0 then - begin - End_Profile := False; - Error := Err_Ras_Neg_H; - exit; - end; - - if H > 0 then - begin - oldProfile := cProfile; - cProfile^.Height := H; - cProfile := PProfile( @Buff^[profCur] ); - - inc( profCur, AlignProfileSize ); - - cProfile^.Height := 0; - cProfile^.Offset := profCur; - oldProfile^.next := cProfile; - inc( nProfs ); - end; - - if profCur >= MaxBuff then - begin - End_Profile := False; - Error := Err_Ras_Overflow; - exit; - end; - - Joint := False; - - End_Profile := True; -end; - -(****************************************************************************) -(* *) -(* Function: Finalize_Profile_Table *) -(* *) -(* Description: Adjusts all links in the Profiles list *) -(* *) -(* Input: None *) -(* *) -(* Returns: Nada *) -(* *) -(****************************************************************************) - -procedure Finalize_Profile_Table; -var - n : int; - p : PProfile; - - Bottom, Top : Int; -begin - - n := nProfs; - - if n > 1 then - begin - - P := fProfile; - - while n > 0 do with P^ do - begin - if n > 1 then - Link := PProfile( @Buff^[ Offset + Height ] ) - else - Link := nil; - - with P^ do - Case Flow of - - TT_Flow_Up : begin - Bottom := Start; - Top := Start+Height-1; - end; - - TT_Flow_Down : begin - Bottom := Start-Height+1; - Top := Start; - - Start := Bottom; - Offset := Offset+Height-1; - end; - end; -{$IFDEF TURNS} - Insert_Y_Turn( Bottom ); - Insert_Y_Turn( Top+1 ); -{$ENDIF} - P := Link; - - dec( n ); - end; - end - else - fProfile := nil; - -end; - -(****************************************************************************) -(* *) -(* Function: Split_Bezier *) -(* *) -(* Description: Subdivises one Bezier arc into two joint *) -(* sub-arcs in the Bezier stack. *) -(* *) -(* Input: None ( subdivised bezier is taken from the top of the *) -(* stack ) *) -(* *) -(* Returns: Nada *) -(* *) -(****************************************************************************) - -procedure Split_Bezier( base : PBezierStack ); -var - arc : PBezierStack; - a, b : Long; -begin -{$IFNDEF NO_ASM} - asm - push esi - push ebx - push ecx - - mov esi, base - - mov eax, [esi+2*8] (* arc^[4].x := arc^[2].x *) - mov ebx, [esi+1*8] (* b := arc^[1].x *) - mov ecx, [esi+0*8] (* b := (arc^[0].x+b) div 2 *) - - mov [esi+4*8], eax - - add eax, ebx (* a := (arc^[2].x+b) div 2 *) - add ebx, ecx - mov edx, eax - mov ecx, ebx - sar edx, 31 - sar ecx, 31 - sub eax, edx - sub ebx, ecx - sar eax, 1 - sar ebx, 1 - - mov [esi+3*8], eax (* arc^[3].x := a *) - mov [esi+1*8], ebx - - add eax, ebx (* arc[2].x := (a+b) div 2 *) - mov edx, eax - sar edx, 31 - sub eax, edx - sar eax, 1 - mov [esi+2*8], eax - - add esi, 4 - - mov eax, [esi+2*8] (* arc^[4].x := arc^[2].x *) - mov ebx, [esi+1*8] (* b := arc^[1].x *) - mov ecx, [esi+0*8] (* b := (arc^[0].x+b) div 2 *) - - mov [esi+4*8], eax - - add eax, ebx (* a := (arc^[2].x+b) div 2 *) - add ebx, ecx - mov edx, eax - mov ecx, ebx - sar edx, 31 - sar ecx, 31 - sub eax, edx - sub ebx, ecx - sar eax, 1 - sar ebx, 1 - - mov [esi+3*8], eax (* arc^[3].x := a *) - mov [esi+1*8], ebx - - add eax, ebx (* arc[2].x := (a+b) div 2 *) - mov edx, eax - sar edx, 31 - sub eax, edx - sar eax, 1 - mov [esi+2*8], eax - - pop ecx - pop ebx - pop esi - end; -{$ELSE} - arc := base; - - arc^[4].x := arc^[2].x; - b := arc^[1].x; - a := (arc^[2].x + b) div 2; arc^[3].x := a; - b := (arc^[0].x + b) div 2; arc^[1].x := b; - arc^[2].x := (a+b) div 2; - - arc^[4].y := arc^[2].y; - b := arc^[1].y; - a := (arc^[2].y + b) div 2; arc^[3].y := a; - b := (arc^[0].y + b) div 2; arc^[1].y := b; - arc^[2].y := (a+b) div 2; -{$ENDIF} -end; - -(****************************************************************************) -(* *) -(* Function: Push_Bezier *) -(* *) -(* Description: Clears the Bezier stack and pushes a new Arc on top of it. *) -(* *) -(* Input: x1,y1 x2,y2 x3,y3 new Bezier arc *) -(* *) -(* Returns: nada *) -(* *) -(****************************************************************************) - -procedure PushBezier( x1, y1, x2, y2, x3, y3 : LongInt ); -begin - curArc:=0; - - with Arcs[CurArc+2] do begin x:=x1; y:=y1; end; - with Arcs[CurArc+1] do begin x:=x2; y:=y2; end; - with Arcs[ CurArc ] do begin x:=x3; y:=y3; end; -end; - -(****************************************************************************) -(* *) -(* Function: Line_Up *) -(* *) -(* Description: Compute the x-coordinates of an ascending line segment *) -(* and stores them in the render pool. *) -(* *) -(* Input: x1,y1 x2,y2 Segment start (x1,y1) and end (x2,y2) points *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow. *) -(* *) -(****************************************************************************) - -function Line_Up( x1, y1, x2, y2, miny, maxy : LongInt ) : boolean; -var - Dx, Dy : LongInt; - e1, e2, f1, f2, size : Int; - Ix, Rx, Ax : LongInt; - top : PStorage; -begin - Line_Up := True; - - Dx := x2-x1; Dy := y2-y1; - - if (Dy <= 0) or (y2 < MinY) or (y1 > MaxY) then exit; - - if y1 < MinY then - begin - x1 := x1 + MulDiv( Dx, MinY-y1, Dy ); - e1 := Trunc(MinY); - f1 := 0; - end - else - begin - e1 := Trunc(y1); - f1 := Frac(y1); - end; - - if y2 > MaxY then - begin - (* x2 := x2 + MulDiv( Dx, MaxY-y2, Dy ); *) - e2 := Trunc(MaxY); - f2 := 0; - end - else - begin - e2 := Trunc(y2); - f2 := Frac(y2); - end; - - if f1 > 0 then - if e1 = e2 then exit - else - begin - inc( x1, MulDiv( Dx, precision-f1, Dy ) ); - inc( e1 ); - end - else - if Joint then - dec( profCur ); - - Joint := (f2 = 0); - - (* Indicates that the segment stopped sharp on a ScanLine *) - - if Fresh then - begin - cProfile^.Start := e1; - Fresh := False; - end; - - size := ( e2-e1 )+1; - if ( profCur + size >= MaxBuff ) then - begin - Line_Up := False; - Error := Err_Ras_Overflow; - exit; - end; - - if Dx > 0 then - begin - Ix := (Precision*Dx) div Dy; - Rx := (Precision*Dx) mod Dy; - Dx := 1; - end - else - begin - Ix := -((Precision*-Dx) div Dy); - Rx := (Precision*-Dx) mod Dy; - Dx := -1; - end; - - Ax := -Dy; - {top := @Buff^[profCur];} - - while size > 0 do - begin - Buff^[profCur] := x1; - {$IFDEF DEBUG3} Pset; {$ENDIF} - inc( profCur ); - {top := @top^[1];} - - inc( x1, Ix ); - inc( ax, rx ); - - if ax >= 0 then - begin - dec( ax, dy ); - inc( x1, dx ); - end; - - dec( size ); - end; - -end; - -(****************************************************************************) -(* *) -(* Function: Line_Down *) -(* *) -(* Description: Compute the x-coordinates of a descending line segment *) -(* and stores them in the render pool. *) -(* *) -(* Input: x1,y1 x2,y2 Segment start (x1,y1) and end (x2,y2) points *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow. *) -(* *) -(****************************************************************************) - -function Line_Down( x1, y1, x2, y2, miny, maxy : LongInt ): boolean; -var - _fresh : Boolean; -begin - _fresh := fresh; - - Line_Down := Line_Up( x1, -y1, x2, -y2, -maxy, -miny ); - - if _fresh and not fresh then - cProfile^.start := -cProfile^.start; -end; - -(****************************************************************************) -(* *) -(* Function: Bezier_Up *) -(* *) -(* Description: Compute the x-coordinates of an ascending bezier arc *) -(* and stores them in the render pool. *) -(* *) -(* Input: None.The arc is taken from the top of the Bezier stack. *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow. *) -(* *) -(****************************************************************************) - -function Bezier_Up( miny, maxy : Long ) : boolean; -var - x1, y1, x2, y2, e, e2, e0 : LongInt; - carc, debArc, f1 : Int; - base : PBezierStack; -label - Fin; -begin - Bezier_Up := True; - - carc := curArc; - base := @Arcs[cArc]; - y1 := base^[2].y; - y2 := base^[0].y; - - if ( y2 < MinY ) or ( y1 > MaxY ) then - goto Fin; - - e2 := FLOOR(y2); - - if e2 > MaxY then e2 := MaxY; - - e0 := MinY; - - if y1 < MinY then - e := MinY - else - begin - e := CEILING(y1); - f1 := FRAC(y1); - e0 := e; - - if f1 = 0 then - begin - - if Joint then begin dec(profCur); Joint:=False; end; - (* ^ Ce test permet d'‚viter les doublons *) - - Buff^[profCur] := base^[2].x; - {$IFDEF DEBUG3} Pset; {$ENDIF} - inc( profCur ); - inc( e, Precision ); - end - end; - - if Fresh then - begin - cProfile^.Start := TRUNC(e0); - Fresh := False; - end; - - if e2 < e then - goto Fin; - - (* overflow ? *) - if ( profCur + TRUNC(e2-e)+ 1 >= MaxBuff ) then - begin - Bezier_Up := False; - Error := Err_Ras_Overflow; - exit; - end; - - debArc := cArc; - - while ( cArc >= debArc ) and ( e <= e2 ) do - begin - Joint := False; - y2 := base^[0].y; - - if y2 > e then - begin - y1 := base^[2].y; - if ( y2-y1 >= precision_step ) then - begin - Split_Bezier( base ); - inc( cArc, 2 ); - base := @base^[2]; - end - else - begin - Buff^[profCur] := base^[2].x + - MulDiv( base^[0].x - base^[2].x, - e - y1, - y2 - y1 ); - - {$IFDEF DEBUG3} Pset; {$ENDIF} - - inc( profCur ); - dec( cArc, 2 ); - base := @Arcs[cArc]; - inc( e, Precision ); - end; - end - else - begin - if y2 = e then - begin - joint := True; - Buff^[profCur] := Arcs[cArc].x; - {$IFDEF DEBUG3} Pset; {$ENDIF} - inc( profCur ); - inc( e, Precision ); - end; - dec( cArc, 2 ); - base := @Arcs[cArc]; - end - end; - -Fin: - dec( curArc, 2); - exit; -end; - - -(****************************************************************************) -(* *) -(* Function: Bezier_Down *) -(* *) -(* Description: Compute the x-coordinates of a descending bezier arc *) -(* and stores them in the render pool. *) -(* *) -(* Input: None. Arc is taken from the top of the Bezier stack. *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow. *) -(* *) -(****************************************************************************) - -function Bezier_Down( miny, maxy : Long ) : boolean; -var - base : PBezierStack; - _fresh : Boolean; -begin - _fresh := fresh; - base := @Arcs[curArc]; - - base^[0].y := -base^[0].y; - base^[1].y := -base^[1].y; - base^[2].y := -base^[2].y; - - Bezier_Down := Bezier_Up( -maxy, -miny ); - - if _fresh and not fresh then - cProfile^.start := -cProfile^.start; - - base^[0].y := -base^[0].y; -end; - -(****************************************************************************) -(* *) -(* Function: Line_To *) -(* *) -(* Description: Injects a new line segment and adjust Profiles list. *) -(* *) -(* Input: x, y : segment endpoint ( start point in LastX,LastY ) *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow or Incorrect Profile *) -(* *) -(****************************************************************************) - -function Line_To( x, y : LongInt ) : boolean; -begin - Line_To := False; - - case Etat of - - Indetermine : if y > lastY then - if not New_Profile( Ascendant ) then exit else - else - if y < lastY then - if not New_Profile( Descendant ) then exit; - - Ascendant : if y < lastY then - if not End_Profile or - not New_Profile( Descendant ) then exit; - - Descendant : if y > LastY then - if not End_Profile or - not New_Profile( Ascendant ) then exit; - end; - - Case Etat of - Ascendant : if not Line_Up ( LastX, LastY, X, Y, miny, maxy ) then exit; - Descendant : if not Line_Down( LastX, LastY, X, Y, miny, maxy ) then exit; - end; - - LastX := x; - LastY := y; - - Line_To := True; -end; - -(****************************************************************************) -(* *) -(* Function: Bezier_State *) -(* *) -(* Description: Determines the state (ascending/descending/flat/undet) *) -(* of a Bezier arc, along one given axis. *) -(* *) -(* Input: y1, y2, y3 : coordinates of the Bezier arc. *) -(* along the concerned axis. *) -(* *) -(* Returns: State, i.e. Ascending, Descending, Flat or Undetermined *) -(* *) -(****************************************************************************) - - -function Bezier_State( y1, y2, y3 : TT_F26Dot6 ) : TEtats; -begin - (* determine orientation of a Bezier arc *) - if y1 = y2 then - - if y2 = y3 then Bezier_State := Plat - else - if y2 > y3 then Bezier_State := Descendant - else - Bezier_State := Ascendant - else - if y1 > y2 then - - if y2 >= y3 then Bezier_State := Descendant - else - Bezier_State := Indetermine - else - - if y2 <= y3 then Bezier_State := Ascendant - else - Bezier_State := Indetermine; -end; - - -(****************************************************************************) -(* *) -(* Function: Bezier_To *) -(* *) -(* Description: Injects a new bezier arc and adjust Profiles list. *) -(* *) -(* Input: x, y : arc endpoint ( start point in LastX, LastY ) *) -(* Cx, Cy : control point *) -(* *) -(* Returns: True on success *) -(* False if Render Pool overflow or Incorrect Profile *) -(* *) -(****************************************************************************) - - -function Bezier_To( x, y, Cx, Cy : LongInt ) : boolean; -var - y3, x3 : LongInt; - Etat_Bez : TEtats; -begin - Bezier_To := False; - - PushBezier( LastX, LastY, Cx, Cy, X, Y ); - - while ( curArc >= 0 ) do - begin - y3 := Arcs[curArc].y; - x3 := Arcs[curArc].x; - - Etat_Bez := Bezier_State( Arcs[curArc+2].y, Arcs[curArc+1].y, y3 ); - - case Etat_Bez of - - Plat : dec( curArc, 2 ); - - Indetermine : begin - Split_Bezier( @Arcs[curArc] ); - inc( curArc, 2 ); - end; - else - if Etat <> Etat_Bez then - begin - if Etat <> Indetermine then - if not End_Profile then exit; - - if not New_Profile( Etat_Bez ) then exit; - end; - - case Etat of - Ascendant : if not Bezier_Up( miny, maxy ) then exit; - Descendant : if not Bezier_Down( miny, maxy ) then exit; - end; - - end; - end; - - LastX := x3; - LastY := y3; - - Bezier_To := True; -end; - -(****************************************************************************) -(* *) -(* Function: DecomposeCurve *) -(* *) -(* Description: This functions scans the outline arrays in order to *) -(* emit individual segments and beziers by calling the *) -(* functions Line_To and Bezier_To. It handles all weird *) -(* cases, like when the first point is off the curve, or *) -(* when there are simply no "on" points in the contour ! *) -(* *) -(* Input: xCoord, yCoord : array coordinates to use. *) -(* first, last : indexes of first and last point in *) -(* contour. *) -(* *) -(* Returns: True on success *) -(* False if case of error. *) -(* *) -(* Notes: The function assumes that 'first' < 'last' *) -(* *) -(****************************************************************************) - -procedure swap( var x, y : Long ); {$IFDEF INLINE} inline; {$ENDIF} -var - s : Long; -begin - s := x; x := y; y := s; -end; - -function DecomposeCurve( first, last : Int; - flipped : Boolean ) : boolean; -var - index : Int; - - x, y : Long; (* current point *) - cx, cy : Long; (* current Bezier control point *) - mx, my : Long; (* middle point *) - - x_first, y_first : Long; (* first point coordinates *) - x_last, y_last : Long; (* last point coordinates *) - - on_curve : Boolean; -begin - - DecomposeCurve := False; - -(* the following code is miscompiled by Virtual Pascal 1.1 *) -(* although it works OK with 2.0, strange... *) -(* - with points^[first] do - begin - x_first := SCALED( x ); - y_first := SCALED( y ); - end; -*) - x_first := SCALED( points^[first].x ); - y_first := SCALED( points^[first].y ); - - if flipped then swap( x_first, y_first ); - - with points^[last] do - begin - x_last := SCALED( x ); - y_last := SCALED( y ); - end; - - if flipped then swap( x_last, y_last ); - - LastX := x_first; cx := x_first; - LastY := y_first; cy := y_first; - - index := first; - on_curve := Flags^[first] and 1 <> 0; - - (* check first point, and set origin *) - if not on_curve then - begin - (* first point is off the curve - yes, this happens !! *) - - if Flags^[last] and 1 <> 0 then - begin - LastX := x_last; (* start at last point if it is *) - LastY := y_last; (* on the curve *) - end - else - begin - LastX := (LastX + x_last) div 2; (* if both first and last point *) - LastY := (LastY + y_last) div 2; (* are off the curve, start midway *) - - (* record midpoint in x_last,y_last *) - x_last := LastX; - y_last := LastY; - end; - end; - - (* now process each contour point *) - while ( index < last ) do - begin - inc( index ); - - x := SCALED( points^[index].x ); - y := SCALED( points^[index].y ); - - if flipped then swap( x, y ); - - if on_curve then - begin - (* the previous point was on the curve *) - - on_curve := Flags^[index] and 1 <> 0; - if on_curve then - begin - (* two successive on points -> emit segment *) - if not Line_To( x, y ) then exit; - end - else - begin - (* else, keep current point as control for next bezier *) - cx := x; - cy := y; - end; - end - else - begin - (* the previous point was off the curve *) - - on_curve := Flags^[index] and 1 <> 0; - if on_curve then - begin - (* reaching on point -> emit Bezier *) - if not Bezier_To( x, y, cx, cy ) then exit; - end - else - begin - (* two successive off points -> create middle point *) - (* then emit Bezier *) - mx := (cx + x) div 2; - my := (cy + y) div 2; - - if not Bezier_To( mx, my, cx, cy ) then exit; - - cx := x; - cy := y; - end; - end; - end; - - (* end of contour, close curve cleanly *) - if ( Flags^[first] and 1 <> 0 ) then - - if on_curve then - if not Line_To( x_first, y_first ) then exit else - else - if not Bezier_To( x_first, y_first, cx, cy ) then exit else - - else - if not on_curve then - if not Bezier_To( x_last, y_last, cx, cy ) then exit; - - DecomposeCurve := True; -end; - -(****************************************************************************) -(* *) -(* Function: Convert_Glyph *) -(* *) -(* Description: Converts a glyph into a series of segments and arcs *) -(* and make a Profiles list with them. *) -(* *) -(* Input: _xCoord, _yCoord : coordinates tables. *) -(* *) -(* Uses the 'Flag' table too. *) -(* *) -(* Returns: True on success *) -(* False if any error was encountered during render. *) -(* *) -(****************************************************************************) - -Function Convert_Glyph( flipped : Boolean ) : boolean; -var - i, j, First, Last, Start : Int; - - y1, y2, y3 : LongInt; - - lastProfile : PProfile; - -begin - Convert_Glyph := False; - - j := 0; - fProfile := NIL; - Joint := False; - Fresh := False; - - MaxBuff := SizeBuff - AlignProfileSize; - -{$IFDEF TURNS} - numTurns := 0; -{$ENDIF} - - cProfile := PProfile( @Buff^[profCur] ); - cProfile^.Offset := profCur; - nProfs := 0; - - for i := 0 to nContours-1 do - begin - - Etat := Indetermine; - gProfile := nil; - - (* decompose a single contour into individual segments and *) - (* beziers *) - - if not DecomposeCurve( j, outs^[i], flipped ) then exit; - j := outs^[i] + 1; - - (* We _must_ take care of the case when the first and last arcs join *) - (* while having the same orientation *) - - if ( Frac(lastY) = 0 ) and - ( lastY >= MinY ) and - ( lastY <= MaxY ) then - - if ( gProfile <> nil ) and (* gProfile can be nil *) - ( gProfile^.Flow = cProfile^.Flow ) then (* if the contour was *) - (* too small to be drawn *) - dec( profCur ); - - lastProfile := cProfile; - - if not End_Profile then exit; - - if gProfile <> nil then lastProfile^.next := gProfile; - - end; - - Finalize_Profile_Table; - - Convert_Glyph := (profCur < MaxBuff); -end; - - - (************************************************) - (* *) - (* Init_Linked *) - (* *) - (* Init an empty linked list. *) - (* *) - (************************************************) - - procedure Init_Linked( var L : PProfile ); - begin - L := nil; - end; - - (************************************************) - (* *) - (* InsNew : *) - (* *) - (* Inserts a new Profile in a linked list. *) - (* *) - (************************************************) - - procedure InsNew( var List : PProfile; - Profile : PProfile ); - var - current : PProfile; - old : ^PProfile; - x : Long; - label - Place; - begin - - old := @list; - current := old^; - x := profile^.x; - - while current <> nil do - begin - if x < current^.x then - goto Place; - - old := @current^.link; - current := old^; - end; - - Place: - profile^.link := current; - old^ := profile; - end; - - (************************************************) - (* *) - (* DelOld : *) - (* *) - (* Removes an old Profile from a linked list *) - (* *) - (************************************************) - - - procedure DelOld( var List : PProfile; - Profile : PProfile ); - var - current : PProfile; - old : ^PProfile; - - begin - - old := @list; - current := old^; - - while current <> nil do - begin - if current = profile then - begin - old^ := current^.link; - exit; - end; - - old := @current^.link; - current := old^; - end; - - {$IFDEF ASSERT} - Writeln('(Raster:DelOld) Incoherent deletion'); - halt(9); - {$ENDIF} - end; - - -{$IFDEF TURNS} - (************************************************) - (* *) - (* Update: *) - (* *) - (* Update all X offsets in a drawing list *) - (* *) - (************************************************) - - procedure Update( var List : PProfile ); - var - current : PProfile; - begin - (* recompute coordinates *) - current := list; - - while current <> nil do with current^ do - begin - X := Buff^[offset]; - inc( offset, flow ); - dec( height ); - current := link; - end; - end; -{$ENDIF} - - (************************************************) - (* *) - (* Sort : *) - (* *) - (* Sorts 'quickly' (??) a trace list. *) - (* *) - (************************************************) - - procedure Sort( var List : PProfile ); - var - current, next : PProfile; - old : ^PProfile; - begin - - (* First, recompute coordinates *) - - current := list; - - while current <> nil do with current^ do - begin - X := Buff^[offset]; - inc( offset, flow ); - dec( height ); - current := link; - end; - - (* Then, do the sort *) - - old := @list; - current := old^; - - if current = nil then - exit; - - next := current^.link; - - while next <> nil do - begin - if current^.x <= next^.x then - begin - old := @current^.link; - current := old^; - - if current = nil then - exit; - end - else - begin - old^ := next; - current^.link := next^.link; - next^.link := current; - - old := @list; - current := old^; - end; - - next := current^.link; - end; - - end; - -{$IFDEF TURNS} - -(********************************************************************) -(* *) -(* Generic Sweep Drawing routine *) -(* *) -(* *) -(* *) -(********************************************************************) - -function Draw_Sweep : boolean; - -label - Scan_DropOuts, - Next_Line, - Skip_To_Next; - -var - y, k, - I, J : Int; - P, Q : PProfile; - - Top, - Bottom, - y_height, - y_change, - min_Y, - max_Y : Int; - - x1, x2, xs, e1, e2 : LongInt; - - Wait : PProfile; - - Draw_Left : PProfile; - Draw_Right : PProfile; - - Drop_Left : PProfile; - Drop_Right : PProfile; - - P_Left, Q_Left : PProfile; - P_Right, Q_Right : PProfile; - - Phase : Int; - dropouts : Int; - -begin - - Draw_Sweep := False; - - (* Init the empty linked lists *) - - Init_Linked( Wait ); - - Init_Linked( Draw_Left ); - Init_Linked( Draw_Right ); - - Init_Linked( Drop_Left ); - Init_Linked( Drop_Right ); - - (* First, compute min Y and max Y *) - - P := fProfile; - max_Y := TRUNC(MinY); - min_Y := TRUNC(MaxY); - - while P <> nil do - with P^ do - begin - Q := P^.Link; - - Bottom := P^.Start; - Top := Bottom + P^.Height-1; - - if min_Y > Bottom then min_Y := Bottom; - if max_Y < Top then max_Y := Top; - - X := 0; - InsNew( Wait, P ); - - P := Q; - end; - - (* Check the y-turns *) - if (numTurns = 0) then - begin - Error := Err_Ras_Invalid; - exit; - end; - - (* Now inits the sweeps *) - - Proc_Sweep_Init( min_Y, max_Y ); - - (* Then compute the distance of each Profile to min Y *) - - P := Wait; - while P <> nil do - begin - with P^ do CountL := (Start-min_Y); - P := P^.link;; - end; - - (* Let's go *) - - y := min_y; - y_height := 0; - - if ( numTurns > 0 ) and - ( Buff^[sizeBuff-numTurns] = min_y ) then - dec( numTurns ); - - while numTurns > 0 do - begin - (* Look in the wait list for new activations *) - - P := Wait; - while P <> nil do with P^ do - begin - Q := link; - - dec( CountL, y_height ); - if CountL = 0 then - begin - DelOld( Wait, P ); - case Flow of - TT_Flow_Up : InsNew( Draw_Left, P ); - TT_Flow_Down : InsNew( Draw_Right, P ); - end - end; - - P := Q; - end; - - (* Sort the drawing lists *) - - Sort( Draw_Left ); - Sort( Draw_Right ); - - y_change := Buff^[sizebuff-numTurns]; - dec( numTurns ); - - y_height := y_change - y; - - while y < y_change do - begin - - (* Let's trace *) - - dropouts := 0; - - P_Left := Draw_Left; - P_Right := Draw_Right; - - while ( P_Left <> nil ) do - begin - - {$IFDEF ASSERT} - if P_Right = nil then - Halt(13); - {$ENDIF} - - x1 := P_Left^ .X; - x2 := P_Right^.X; - - if x1 > x2 then - begin - xs := x1; - x1 := x2; - x2 := xs; - end; - - if ( x2-x1 <= Precision ) then - begin - e1 := ( x1+Precision-1 ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - if (dropOutControl <> 0) and - ((e1 > e2) or (e2 = e1 + Precision)) then - begin - P_Left ^.x := x1; - P_Right^.x := x2; - - inc( dropouts ); - - (* mark profile for drop-out control *) - P_Left^.CountL := 1; - - goto Skip_To_Next; - end - end; - - Proc_Sweep_Span( y, x1, x2, P_Left, P_Right ); - - Skip_To_Next: - - P_Left := P_Left ^.Link; - P_Right := P_Right^.Link; - end; - - {$IFDEF ASSERT} - if P_Right <> nil then - Halt(10); - {$ENDIF} - - (* Now perform the dropouts only _after_ the span drawing *) - if (dropouts > 0) then - goto Scan_DropOuts; - -Next_Line: - - (* Step to next line *) - Proc_Sweep_Step; - - inc(y); - - if y < y_change then - begin - Update( Draw_Left ); - Update( Draw_Right ); - end - - end; - - (* We finalize the Profiles that need it *) - - P := Draw_Left; - while P <> nil do - begin - Q := P^.Link; - if P^.height = 0 then - DelOld( Draw_Left, P ); - P := Q; - end; - - P := Draw_Right; - while P <> nil do - begin - Q := P^.Link; - if P^.height = 0 then - DelOld( Draw_Right, P ); - P := Q; - end; - - end; - - while y <= max_y do - begin - Proc_Sweep_Step; - inc( y ); - end; - - Draw_Sweep := True; - exit; - -Scan_DropOuts : - P_Left := Draw_Left; - P_Right := Draw_Right; - - while (P_Left <> nil) do - begin - if P_Left^.countL <> 0 then - begin - P_Left^.countL := 0; - Proc_Sweep_Drop( y, P_Left^.x, P_Right^.x, P_Left, P_Right ); - end; - - P_Left := P_Left^.link; - P_Right := P_Right^.Link; - end; - - goto Next_Line; -end; - - -{$ELSE} - -(********************************************************************) -(* *) -(* Generic Sweep Drawing routine *) -(* *) -(* *) -(* *) -(********************************************************************) - -function Draw_Sweep : boolean; - -label - Skip_To_Next; - -var - y, k, - I, J : Int; - P, Q : PProfile; - - Top, - Bottom, - min_Y, - max_Y : Int; - - x1, x2, xs, e1, e2 : LongInt; - - Wait : PProfile; - - Draw_Left : PProfile; - Draw_Right : PProfile; - - Drop_Left : PProfile; - Drop_Right : PProfile; - - P_Left, Q_Left : PProfile; - P_Right, Q_Right : PProfile; - - Phase : Int; - dropouts : Int; - -begin - - Draw_Sweep := False; - - (* Init the empty linked lists *) - - Init_Linked( Wait ); - - Init_Linked( Draw_Left ); - Init_Linked( Draw_Right ); - - Init_Linked( Drop_Left ); - Init_Linked( Drop_Right ); - - (* First, compute min Y and max Y *) - - P := fProfile; - max_Y := TRUNC(MinY); - min_Y := TRUNC(MaxY); - - while P <> nil do - with P^ do - begin - Q := P^.Link; - - Bottom := P^.Start; - Top := Bottom + P^.Height-1; - - if min_Y > Bottom then min_Y := Bottom; - if max_Y < Top then max_Y := Top; - - X := 0; - InsNew( Wait, P ); - - P := Q; - end; - - (* Now inits the sweeps *) - - Proc_Sweep_Init( min_Y, max_Y ); - - (* Then compute the distance of each Profile to min Y *) - - P := Wait; - while P <> nil do - begin - with P^ do CountL := (Start-min_Y); - P := P^.link;; - end; - - (* Let's go *) - - for y := min_Y to max_Y do - begin - - (* Look in the wait list for new activations *) - - P := Wait; - while P <> nil do with P^ do - begin - Q := link; - - if CountL = 0 then - begin - DelOld( Wait, P ); - case Flow of - TT_Flow_Up : InsNew( Draw_Left, P ); - TT_Flow_Down : InsNew( Draw_Right, P ); - end - end - else - dec( CountL ); - - P := Q; - end; - - (* Sort the drawing lists *) - - Sort( Draw_Left ); - Sort( Draw_Right ); - - (* Let's trace *) - - dropouts := 0; - - P_Left := Draw_Left; - P_Right := Draw_Right; - - while ( P_Left <> nil ) do - begin - - {$IFDEF ASSERT} - if P_Right = nil then - Halt(13); - {$ENDIF} - - Q_Left := P_Left^ .Link; - Q_Right := P_Right^.Link; - - {$IFDEF ASSERT} - if Q_Right = nil then - Halt(11); - {$ENDIF} - - x1 := P_Left^ .X; - x2 := P_Right^.X; - - if x1 > x2 then - begin - xs := x1; - x1 := x2; - x2 := xs; - end; - - if ( x2-x1 <= Precision ) then - begin - e1 := ( x1+Precision-1 ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - if (dropOutControl <> 0) and - ((e1 > e2) or (e2 = e1 + Precision)) then - begin - P_Left^.x := x1; - P_Right^.x := x2; - - inc( dropouts ); - - DelOld( Draw_Left, P_Left ); - DelOld( Draw_Right, P_Right ); - - InsNew( Drop_Left, P_Left ); - InsNew( Drop_Right, P_Right ); - - goto Skip_To_Next; - end - end; - - Proc_Sweep_Span( y, x1, x2, P_Left, P_Right ); - - (* We finalize the Profile if needed *) - - if P_Left ^.height = 0 then - DelOld( Draw_Left, P_Left ); - - if P_Right^.height = 0 then - DelOld( Draw_Right, P_Right ); - - Skip_To_Next: - - P_Left := Q_Left; - P_Right := Q_Right; - end; - - {$IFDEF ASSERT} - if P_Right <> nil then - Halt(10); - {$ENDIF} - - (* Now perform the dropouts only _after_ the span drawing *) - - P_Left := Drop_Left; - P_Right := Drop_Right; - - while ( dropouts > 0 ) do - begin - - Q_Left := P_Left^. Link; - Q_Right := P_Right^.Link; - - DelOld( Drop_Left, P_Left ); - DelOld( Drop_Right, P_Right ); - - Proc_Sweep_Drop( y, P_Left^.x, P_Right^.x, P_Left, P_Right ); - - if P_Left^.height > 0 then - InsNew( Draw_Left, P_Left ); - - if P_Right^.height > 0 then - InsNew( Draw_Right, P_Right ); - - P_Left := Q_Left; - P_Right := Q_Right; - - dec( dropouts ); - end; - - (* Step to next line *) - - Proc_Sweep_Step; - - end; - - Draw_Sweep := True; - -end; - -{$ENDIF} - -{$F+ Far calls are necessary for function pointers under BP7} -{ This flag is currently ignored by the Virtual Compiler } - -(***********************************************************************) -(* *) -(* Vertical Sweep Procedure Set : *) -(* *) -(* These three routines are used during the vertical black/white *) -(* sweep phase by the generic Draw_Sweep function. *) -(* *) -(***********************************************************************) - -procedure Vertical_Sweep_Init( var min, max : Int ); -begin - case Cible.flow of - - TT_Flow_Up : begin - traceOfs := min * Cible.cols; - traceIncr := Cible.cols; - end; - else - traceOfs := (Cible.rows - 1 - min)*Cible.cols; - traceIncr := -Cible.cols; - end; - - gray_min_x := 0; - gray_max_x := 0; -end; - - - -procedure Vertical_Sweep_Span( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : Longint; - c1, c2 : Int; - f1, f2 : Int; - base : PByte; -begin -{$IFNDEF NO_ASM} - asm - push esi - push ebx - push ecx - - mov eax, X1 - mov ebx, X2 - mov ecx, [Precision_Bits] - - sub ebx, eax - add eax, [Precision] - dec eax - - sub ebx, [Precision] - cmp ebx, [Precision_Jitter] - jg @No_Jitter - - @Do_Jitter: - mov ebx, eax - jmp @0 - - @No_Jitter: - mov ebx, X2 - - @0: - sar ebx, cl - js @Sortie - - sar eax, cl - mov ecx, [BWidth] - - cmp eax, ebx - jg @Sortie - - cmp eax, ecx - jge @Sortie - - test eax, eax - jns @1 - xor eax, eax - @1: - cmp ebx, ecx - jl @2 - lea ebx, [ecx-1] - @2: - - mov edx, eax - mov ecx, ebx - and edx, 7 - sar eax, 3 - and ecx, 7 - sar ebx, 3 - - cmp eax, [gray_min_X] - jge @3 - mov [gray_min_X], eax - - @3: - cmp ebx, [gray_max_X] - jl @4 - mov [gray_max_X], ebx - - @4: - mov esi, ebx - - mov ebx, [BCible] - add ebx, [TraceOfs] - add ebx, eax - - sub esi, eax - jz @5 - - mov al, [LMask + edx].byte - or [ebx], al - inc ebx - dec esi - jz @6 - mov eax, -1 - @7: - mov [ebx].byte, al - dec esi - lea ebx, [ebx+1] - jnz @7 - - @6: - mov al, [RMask + ecx].byte - or [ebx], al - jmp @8 - - @5: - mov al, [LMask + edx].byte - and al, [RMask + ecx].byte - or [ebx], al - - @8: - @Sortie: - pop ecx - pop ebx - pop esi - end; -{$ELSE} - - e1 := (( x1+Precision-1 ) and Precision_Mask) div Precision; - - if ( x2-x1-Precision <= Precision_Jitter ) then - e2 := e1 - else - e2 := ( x2 and Precision_Mask ) div Precision; - - if (e2 >= 0) and (e1 < BWidth) then - - begin - if e1 < 0 then e1 := 0; - if e2 >= BWidth then e2 := BWidth-1; - - c1 := e1 shr 3; - c2 := e2 shr 3; - - f1 := e1 and 7; - f2 := e2 and 7; - - if gray_min_X > c1 then gray_min_X := c1; - if gray_max_X < c2 then gray_max_X := c2; - - base := @BCible^[TraceOfs + c1]; - - if c1 = c2 then - base^[0] := base^[0] or ( LMask[f1] and Rmask[f2] ) - else - begin - base^[0] := base^[0] or LMask[f1]; - - if c2>c1+1 then - FillChar( base^[1], c2-c1-1, $FF ); - - base := @base^[c2-c1]; - base^[0] := base^[0] or RMask[f2]; - end - end; -{$ENDIF} -end; - - -procedure Vertical_Sweep_Drop( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : Longint; - c1, c2 : Int; - f1, f2 : Int; - - j : Int; -begin - - (* Drop-out control *) - - e1 := ( x1+Precision-1 ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - (* We are guaranteed that x2-x1 <= Precision here *) - - if e1 > e2 then - if e1 = e2 + Precision then - - case DropOutControl of - - (* Drop-out Control Rule #3 *) - 1 : e1 := e2; - - 4 : begin - e1 := ((x1+x2+1) div 2 + Precision-1) and Precision_Mask; - e2 := e1; - end; - - (* Drop-out Control Rule #4 *) - - (* The spec is not very clear regarding rule #4. It *) - (* presents a method that is way too costly to implement *) - (* while the general idea seems to get rid of 'stubs'. *) - (* *) - (* Here, we only get rid of stubs recognized when : *) - (* *) - (* upper stub : *) - (* *) - (* - P_Left and P_Right are in the same contour *) - (* - P_Right is the successor of P_Left in that contour *) - (* - y is the top of P_Left and P_Right *) - (* *) - (* lower stub : *) - (* *) - (* - P_Left and P_Right are in the same contour *) - (* - P_Left is the successor of P_Right in that contour *) - (* - y is the bottom of P_Left *) - (* *) - - 2,5 : begin - - if ( x2-x1 < Precision_Half ) then - begin - (* upper stub test *) - - if ( Left^.next = Right ) and - ( Left^.Height <= 0 ) then exit; - - (* lower stub test *) - - if ( Right^.next = Left ) and - ( Left^.Start = y ) then exit; - end; - - (* Check that the rightmost pixel is not already set *) - e1 := e1 div Precision; - - c1 := e1 shr 3; - f1 := e1 and 7; - - if ( e1 >= 0 ) and ( e1 < BWidth ) and - ( BCible^[TraceOfs+c1] and ($80 shr f1) <> 0 ) then - exit; - - case DropOutControl of - 2 : e1 := e2; - 5 : e1 := ((x1+x2+1) div 2 + Precision-1) and Precision_Mask; - end; - - e2 := e1; - - end; - else - exit; (* unsupported mode *) - end - - else - else - e2 := e1; (* when x1 = e1, x2 = e2, e2 = e1 + 64 *) - - e1 := e1 div Precision; - - if (e1 >= 0) and (e1 < BWidth ) then - begin - c1 := e1 shr 3; - f1 := e1 and 7; - - if gray_min_X > c1 then gray_min_X := c1; - if gray_max_X < c1 then gray_max_X := c1; - - j := TraceOfs + c1; - - BCible^[j] := BCible^[j] or ($80 shr f1); - end; -end; - - - -procedure Vertical_Sweep_Step; -begin - inc( TraceOfs, traceIncr ); -end; - - -(***********************************************************************) -(* *) -(* Horizontal Sweep Procedure Set : *) -(* *) -(* These three routines are used during the horizontal black/white *) -(* sweep phase by the generic Draw_Sweep function. *) -(* *) -(***********************************************************************) - -procedure Horizontal_Sweep_Init( var min, max : Int ); -begin - (* Nothing, really *) -end; - - -procedure Horizontal_Sweep_Span( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : Longint; - c1, c2 : Int; - f1, f2 : Int; - - j : Int; -begin - - if ( x2-x1 < Precision ) then - begin - e1 := ( x1+(Precision-1) ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - if e1 = e2 then - begin - c1 := y shr 3; - f1 := y and 7; - - if (e1 >= 0) then - begin - e1 := e1 shr Precision_Bits; - if Cible.flow = TT_Flow_Up then - j := c1 + e1*Cible.cols - else - j := c1 + (Cible.rows-1-e1)*Cible.cols; - if e1 < Cible.Rows then - BCible^[j] := BCible^[j] or ($80 shr f1); - end; - end; - end; - -{$IFDEF RIEN} - e1 := ( x1+(Precision-1) ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - (* We are here guaranteed that x2-x1 > Precision *) - - c1 := y shr 3; - f1 := y and 7; - - if (e1 >= 0) then - begin - e1 := e1 shr Precision_Bits; - if Cible.flow = TT_Flow_Up then - j := c1 + e1*Cible.cols - else - j := c1 + (Cible.rows-1-e1)*Cible.cols; - if e1 < Cible.Rows then - BCible^[j] := BCible^[j] or ($80 shr f1); - end; - - if (e2 >= 0) then - begin - e2 := e2 shr Precision_Bits; - if Cible.flow = TT_Flow_Up then - j := c1 + e1*Cible.cols - else - j := c1 + (Cible.rows-1-e2)*Cible.cols; - if (e2 <> e1) and (e2 < Cible.Rows) then - BCible^[j] := BCible^[j] or ($80 shr f1); - end; -{$ENDIF} - -end; - - - -procedure Horizontal_Sweep_Drop( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : Longint; - c1, c2 : Int; - f1, f2 : Int; - - j : Int; -begin - - e1 := ( x1+(Precision-1) ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - (* During the horizontal sweep, we only take care of drop-outs *) - - if e1 > e2 then - if e1 = e2 + Precision then - - case DropOutControl of - - 0 : exit; - - (* Drop-out Control Rule #3 *) - 1 : e1 := e2; - - 4 : begin - e1 := ( (x1+x2) div 2 +Precision div 2 ) and Precision_Mask; - e2 := e1; - end; - - (* Drop-out Control Rule #4 *) - - (* The spec is not very clear regarding rule #4. It *) - (* presents a method that is way too costly to implement *) - (* while the general idea seems to get rid of 'stubs'. *) - (* *) - - 2,5 : begin - - (* rightmost stub test *) - - if ( Left^.next = Right ) and - ( Left^.Height <= 0 ) then exit; - - (* leftmost stub test *) - - if ( Right^.next = Left ) and - ( Left^.Start = y ) then exit; - - (* Check that the upmost pixel is not already set *) - - e1 := e1 div Precision; - - c1 := y shr 3; - f1 := y and 7; - - if Cible.flow = TT_Flow_Up then - j := c1 + e1*Cible.cols - else - j := c1 + (Cible.rows-1-e1)*Cible.cols; - - if ( e1 >= 0 ) and ( e1 < Cible.Rows ) and - ( BCible^[j] and ($80 shr f1) <> 0 ) then exit; - - case DropOutControl of - 2 : e1 := e2; - 5 : e1 := ((x1+x2) div 2 + Precision_Half) and Precision_Mask; - end; - - e2 := e1; - end; - else - exit; (* Unsupported mode *) - end; - - c1 := y shr 3; - f1 := y and 7; - - if (e1 >= 0) then - begin - e1 := e1 shr Precision_Bits; - if Cible.flow = TT_Flow_Up then - j := c1 + e1*Cible.cols - else - j := c1 + (Cible.rows-1-e1)*Cible.cols; - if e1 < Cible.Rows then BCible^[j] := BCible^[j] or ($80 shr f1); - end; - -end; - - - -procedure Horizontal_Sweep_Step; -begin - (* Nothing, really *) -end; - -(***********************************************************************) -(* *) -(* Vertical Gray Sweep Procedure Set : *) -(* *) -(* These two routines are used during the vertical gray-levels *) -(* sweep phase by the generic Draw_Sweep function. *) -(* *) -(* *) -(* NOTES : *) -(* *) -(* - The target pixmap's width *must* be a multiple of 4 *) -(* *) -(* - you have to use the function Vertical_Sweep_Span for *) -(* the gray span call. *) -(* *) -(***********************************************************************) - -procedure Vertical_Gray_Sweep_Init( var min, max : Int ); -begin - min := min and -2; - max := (max+3) and -2; - - case Cible.flow of - - TT_Flow_Up : begin - traceG := (min div 2)*Cible.cols; - traceIncr := Cible.cols; - end; - else - traceG := (Cible.rows-1- (min div 2))*Cible.cols; - traceIncr := -Cible.cols; - end; - - TraceOfs := 0; - gray_min_x := Cible.Cols; - gray_max_x := -Cible.Cols; -end; - - -procedure Vertical_Gray_Sweep_Step; -var - j, c1, c2 : Int; -begin - inc( TraceOfs, Gray_Width ); - - if TraceOfs > Gray_Width then - begin - - if gray_max_X >= 0 then - begin - - if gray_max_x > cible.cols-1 then gray_max_x := cible.cols-1; - if gray_min_x < 0 then gray_min_x := 0; - - j := TraceG + gray_min_x*4; - - for c1 := gray_min_x to gray_max_x do - begin - - c2 := Count_Table[ BCible^[c1 ] ] + - Count_Table[ BCible^[c1+Gray_Width] ]; - - if c2 <> 0 then - begin - BCible^[c1 ] := 0; - BCible^[c1+Gray_Width] := 0; - - GCible^[j] := GCible^[j] or Grays[ (c2 and $F000) shr 12 ]; inc(j); - GCible^[j] := GCible^[j] or Grays[ (c2 and $0F00) shr 8 ]; inc(j); - GCible^[j] := GCible^[j] or Grays[ (c2 and $00F0) shr 4 ]; inc(j); - GCible^[j] := GCible^[j] or Grays[ (c2 and $000F) ]; inc(j); - end - else - inc( j, 4 ); - - end; - end; - - TraceOfs := 0; - inc( TraceG, traceIncr ); - - gray_min_x := Cible.Cols; - gray_max_x := -Cible.Cols; - end; -end; - -(***********************************************************************) -(* *) -(* Horizontal Gray Sweep Procedure Set : *) -(* *) -(* These three routines are used during the horizontal gray-levels *) -(* sweep phase by the generic Draw_Sweep function. *) -(* *) -(***********************************************************************) - -procedure Horizontal_Gray_Sweep_Span( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : TT_F26Dot6; - c1, f1, j : Int; -begin - exit; - y := y div 2; - - e1 := ( x1+(Precision-1) ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - if (e1 >= 0) then - begin - e1 := e1 shr (Precision_Bits+1); -(* if Cible.flow = TT_Flow_Up then *) - j := y + e1*Cible.cols; -(* else -// j := c1 + (Cible.rows-1-e1)*Cible.cols; *) - if e1 < Cible.Rows then - if GCible^[j] = Grays[0] then - GCible^[j] := Grays[1]; - end; - - if (e2 >= 0) then - begin - e2 := e2 shr (Precision_Bits+1); -(* if Cible.flow = TT_Flow_Up then *) - j := y + e2*Cible.cols; -(* else -// j := c1 + (Cible.rows-1-e2)*Cible.cols; *) - if (e2 <> e1) and (e2 < Cible.Rows) then - if GCible^[j] = Grays[0] then - GCible^[j] := Grays[1]; - end; - -end; - - -procedure Horizontal_Gray_Sweep_Drop( y : Int; - x1, - x2 : TT_F26dot6; - Left, - Right : PProfile ); -var - e1, e2 : Longint; - f1, f2 : Int; - color : Byte; - j : Int; -begin - - e1 := ( x1+(Precision-1) ) and Precision_Mask; - e2 := x2 and Precision_Mask; - - (* During the horizontal sweep, we only take care of drop-outs *) - - if e1 > e2 then - if e1 = e2 + Precision then - - case DropOutControl of - - 0 : exit; - - (* Drop-out Control Rule #3 *) - 1 : e1 := e2; - - 4 : begin - e1 := ( (x1+x2) div 2 +Precision div 2 ) and Precision_Mask; - e2 := e1; - end; - - (* Drop-out Control Rule #4 *) - - (* The spec is not very clear regarding rule #4. It *) - (* presents a method that is way too costly to implement *) - (* while the general idea seems to get rid of 'stubs'. *) - (* *) - - 2,5 : begin - - (* lowest stub test *) - - if ( Left^.next = Right ) and - ( Left^.Height <= 0 ) then exit; - - (* upper stub test *) - - if ( Right^.next = Left ) and - ( Left^.Start = y ) then exit; - - case DropOutControl of - 2 : e1 := e2; - 5 : e1 := ((x1+x2) div 2 + Precision_Half) and Precision_Mask; - end; - - e2 := e1; - end; - else - exit; (* Unsupported mode *) - end; - - if (e1 >= 0) then - begin - (* A small trick to make 'average' thin line appear in *) - (* medium gray.. *) - - if ( x2-x1 >= Precision_Half ) then - color := Grays[2] - else color := Grays[1]; - - e1 := e1 shr (Precision_Bits+1); - if Cible.flow = TT_Flow_Up then - j := (y div 2) + e1*Cible.cols - else - j := (y div 2) + (Cible.rows-1-e1)*Cible.cols; - if e1 < Cible.Rows then - if GCible^[j] = Grays[0] then - GCible^[j] := color; - end; -end; - -{$IFDEF SMOOTH} - -(***********************************************************************) -(* *) -(* Vertical Smooth Sweep Procedure Set : *) -(* *) -(* These two routines are used during the vertical smooth-levels *) -(* sweep phase by the generic Draw_Sweep function. *) -(* *) -(* *) -(* NOTES : *) -(* *) -(* - The target pixmap's width *must* be a multiple of 2 *) -(* *) -(* - you have to use the function Vertical_Sweep_Span for *) -(* the smooth span call. *) -(* *) -(***********************************************************************) - -procedure Smooth_Sweep_Init( var min, max : Int ); -var - i : integer; -begin - min := min and -4; - max := (max + 7) and -4; - TraceOfs := 0; - TraceG := Cible.Cols * ( min div 4 ); - gray_min_x := Cible.Cols; - gray_max_x := -Cible.Cols; - - smooth_pass := 0; -(* - for i := 0 to Smooth_Cols-1 do - GCible^[i] := 0; -*) -end; - - - -procedure Smooth_Sweep_Step; -var - j, c1, c2 : Int; -begin - - if gray_max_X >= 0 then - begin - - if gray_max_x > cible.cols-1 then gray_max_x := cible.cols-1; - - if gray_min_x < 0 then gray_min_x := 0; - - j := TraceG + gray_min_x*2; - - for c1 := gray_min_x to gray_max_x do - begin - - c2 := Count_Table2[ BCible^[c1] ]; - - if c2 <> 0 then - begin - inc( GCible^[j], c2 shr 4 ); inc(j); - inc( GCible^[j], c2 and 15 ); inc(j); - - BCible^[c1] := 0; - end - else - inc( j, 2 ); - end; - - end; - - traceOfs := 0; - inc( smooth_pass ); - - if smooth_pass >= 4 then - begin - - j := TraceG + gray_min_x*2; - - for c1 := gray_min_x to gray_max_x do - begin - c2 := GCible^[j]; GCible^[j] := Smooths[c2]; inc(j); - c2 := GCible^[j]; GCible^[j] := Smooths[c2]; inc(j); - end; - - smooth_pass := 0; - inc( TraceG, Cible.Cols ); - - gray_min_x := Cible.Cols; - gray_max_x := -Cible.Cols; - end; - -end; - -{$ENDIF} - -{$F- End of dispatching functions definitions } - -(****************************************************************************) -(* *) -(* Function: Render_Single_Pass *) -(* *) -(* Description: Performs one sweep with sub-banding. *) -(* *) -(* Input: _XCoord, _YCoord : x and y coordinates arrays *) -(* *) -(* Returns: True on success *) -(* False if any error was encountered during render. *) -(* *) -(****************************************************************************) - -function Render_Single_Pass( vertical : Boolean ) : boolean; -var - i, j, k : Int; -begin - Render_Single_Pass := False; - - while Band_Top > 0 do - - begin - - with Band_Stack[ Band_Top ] do - begin - MaxY := longint(Y_Max) * Precision; - MinY := longint(Y_Min) * Precision; - end; - - profCur := 0; - Error := Err_Ras_None; - - if not Convert_Glyph( vertical ) then - begin - - if Error <> Err_Ras_Overflow then exit; - Error := Err_Ras_None; - - (* sub-banding *) - - {$IFDEF DEBUG3} - ClearBand( MinY shr Precision_Bits, MaxY shr Precision_Bits ); - {$ENDIF} - - with Band_Stack[Band_Top] do - begin - I := Y_Min; - J := Y_Max; - end; - - K := ( I + J ) div 2; - - if ( Band_Top >= 8 ) or ( K <= I ) then - begin - Band_Top := 0; - Error := Err_Ras_Invalid; - exit; - end - else - begin - - with Band_Stack[Band_Top+1] do - begin - Y_Min := K; - Y_Max := J; - end; - - Band_Stack[Band_Top].Y_Max := K-1; - - inc( Band_Top ); - end - end - else - begin - - if ( fProfile <> nil ) then - if not Draw_Sweep then exit; - - dec( Band_Top ); - end; - - end; - - Render_Single_Pass := true; -end; - -(****************************************************************************) -(* *) -(* Function: Render_Glyph *) -(* *) -(* Description: Renders a glyph in a bitmap. Sub-banding if needed *) -(* *) -(* Input: AGlyph Glyph record *) -(* *) -(* Returns: True on success *) -(* False if any error was encountered during render. *) -(* *) -(****************************************************************************) - -function Render_Glyph( var glyph : TT_Outline; - var target : TT_Raster_Map ) : TError; -begin - - Render_Glyph := Failure; - - if Buff = nil then - begin - Error := Err_Ras_NotIni; - exit; - end; - - if glyph.conEnds^[glyph.n_contours-1] > glyph.n_points then - begin - Error := Err_Ras_Invalid_Contours; - exit; - end; - - Cible := target; - - Outs := glyph.conEnds; - Flags := PByte(glyph.flags); - nPoints := Glyph.n_points; - nContours := Glyph.n_contours; - - points := Glyph.points; - - Set_High_Precision( glyph.high_precision ); - scale_shift := precision_shift; - DropOutControl := glyph.dropout_mode; - second_pass := glyph.second_pass; - - Error := Err_Ras_None; - - (* Vertical Sweep *) - -{$IFDEF FPK} - Proc_Sweep_Init := @Vertical_Sweep_Init; - Proc_Sweep_Span := @Vertical_Sweep_Span; - Proc_Sweep_Drop := @Vertical_Sweep_Drop; - Proc_Sweep_Step := @Vertical_Sweep_Step; -{$ELSE} - Proc_Sweep_Init := Vertical_Sweep_Init; - Proc_Sweep_Span := Vertical_Sweep_Span; - Proc_Sweep_Drop := Vertical_Sweep_Drop; - Proc_Sweep_Step := Vertical_Sweep_Step; -{$ENDIF} - - Band_Top := 1; - Band_Stack[1].Y_Min := 0; - Band_Stack[1].Y_Max := Cible.Rows-1; - - BWidth := Cible.width; - BCible := PByte( Cible.Buffer ); - - if not Render_Single_Pass( False ) then exit; - - (* Horizontal Sweep *) - - if Second_Pass then - begin - -{$IFDEF FPK} - Proc_Sweep_Init := @Horizontal_Sweep_Init; - Proc_Sweep_Span := @Horizontal_Sweep_Span; - Proc_Sweep_Drop := @Horizontal_Sweep_Drop; - Proc_Sweep_Step := @Horizontal_Sweep_Step; -{$ELSE} - Proc_Sweep_Init := Horizontal_Sweep_Init; - Proc_Sweep_Span := Horizontal_Sweep_Span; - Proc_Sweep_Drop := Horizontal_Sweep_Drop; - Proc_Sweep_Step := Horizontal_Sweep_Step; -{$ENDIF} - - Band_Top := 1; - Band_Stack[1].Y_Min := 0; - Band_Stack[1].Y_Max := Cible.Width-1; - - BWidth := Cible.rows; - BCible := PByte( Cible.Buffer ); - - if not Render_Single_Pass( True ) then exit; - - end; - - Render_Glyph := Success; -end; - -(****************************************************************************) -(* *) -(* Function: Render_Gray_Glyph *) -(* *) -(* Description: Renders a glyph with grayscaling. Sub-banding if needed *) -(* *) -(* Input: AGlyph Glyph record *) -(* *) -(* Returns: True on success *) -(* False if any error was encountered during render. *) -(* *) -(****************************************************************************) - - function Render_Gray_Glyph( var glyph : TT_Outline; - var target : TT_Raster_Map ) : TError; -begin - - Render_Gray_Glyph := Failure; - - cible := target; - - Outs := Glyph.conEnds; - Flags := PByte(glyph.flags); - nPoints := Glyph.n_points; - nContours := Glyph.n_contours; - - points := Glyph.points; - - Set_High_Precision( glyph.high_precision ); - scale_shift := precision_shift+1; - DropOutControl := glyph.dropout_mode; - second_pass := glyph.high_precision; - - Error := Err_Ras_None; - - Band_Top := 1; - Band_Stack[1].Y_Min := 0; - Band_Stack[1].Y_Max := 2*Cible.Rows - 1; - - BWidth := Gray_Width; - - if BWidth > Cible.cols div 4 then BWidth := Cible.cols div 4; - - BWidth := BWidth*8; - BCible := PByte( Gray_Lines ); - GCible := PByte( Cible.Buffer ); - -{$IFDEF FPK} - Proc_Sweep_Init := @Vertical_Gray_Sweep_Init; - Proc_Sweep_Span := @Vertical_Sweep_Span; - Proc_Sweep_Drop := @Vertical_Sweep_Drop; - Proc_Sweep_Step := @Vertical_Gray_Sweep_Step; -{$ELSE} - Proc_Sweep_Init := Vertical_Gray_Sweep_Init; - Proc_Sweep_Span := Vertical_Sweep_Span; - Proc_Sweep_Drop := Vertical_Sweep_Drop; - Proc_Sweep_Step := Vertical_Gray_Sweep_Step; -{$ENDIF} - - if not Render_Single_Pass( False ) then exit; - - (* Horizontal Sweep *) - - if Second_Pass then - begin - -{$IFDEF FPK} - Proc_Sweep_Init := @Horizontal_Sweep_Init; - Proc_Sweep_Span := @Horizontal_Gray_Sweep_Span; - Proc_Sweep_Drop := @Horizontal_Gray_Sweep_Drop; - Proc_Sweep_Step := @Horizontal_Sweep_Step; -{$ELSE} - Proc_Sweep_Init := Horizontal_Sweep_Init; - Proc_Sweep_Span := Horizontal_Gray_Sweep_Span; - Proc_Sweep_Drop := Horizontal_Gray_Sweep_Drop; - Proc_Sweep_Step := Horizontal_Sweep_Step; -{$ENDIF} - - Band_Top := 1; - Band_Stack[1].Y_Min := 0; - Band_Stack[1].Y_Max := Cible.Width*2-1; - - BWidth := Cible.rows; - GCible := PByte( Cible.Buffer ); - - if not Render_Single_Pass( True ) then exit; - - end; - - Render_Gray_Glyph := Success; - exit; - -end; - -{$IFDEF SMOOTH} -(****************************************************************************) -(* *) -(* Function: Render_Smooth_Glyph *) -(* *) -(* Description: Renders a glyph with grayscaling. Sub-banding if needed *) -(* *) -(* Input: AGlyph Glyph record *) -(* *) -(* Returns: True on success *) -(* False if any error was encountered during render. *) -(* *) -(****************************************************************************) - -function Render_Smooth_Glyph( var glyph : TGlyphRecord; - target : PRasterBlock; - scan : Byte; - palette : pointer ) : boolean; -begin - - Render_Smooth_Glyph := Failure; - - if target <> nil then - cible := target^; -(* - if palette <> nil then - move( palette^, Grays, 5 ); -*) - Outs := Glyph.endPoints; - Flags := PByte(glyph.Flag); - nPoints := Glyph.Points; - nContours := Glyph.numConts; - - scale_shift := precision_shift+2; - DropOutControl := scan; - - Raster_Error := Err_Ras_None; - - Band_Top := 1; - Band_Stack[1].Y_Min := 0; - Band_Stack[1].Y_Max := 4*Cible.Rows - 1; - - BWidth := Smooth_Cols; - - if BWidth > Cible.cols then BWidth := Cible.cols; - - BWidth := BWidth*8; - BCible := PByte( Gray_Lines ); - GCible := PByte( Cible.Buffer ); - -{$IFDEF FPK} - Proc_Sweep_Init := @Smooth_Sweep_Init; - Proc_Sweep_Span := @Vertical_Sweep_Span; - Proc_Sweep_Drop := @Vertical_Sweep_Drop; - Proc_Sweep_Step := @Smooth_Sweep_Step; -{$ELSE} - Proc_Sweep_Init := Smooth_Sweep_Init; - Proc_Sweep_Span := Vertical_Sweep_Span; - Proc_Sweep_Drop := Vertical_Sweep_Drop; - Proc_Sweep_Step := Smooth_Sweep_Step; -{$ENDIF} - - if not Render_Single_Pass( Glyph.XCoord, Glyph.YCoord ) then exit; - - Render_Smooth_Glyph := Success; - -end; - -{$ENDIF} - -(****************************************************************************) -(* *) -(* Function: Init_Rasterizer *) -(* *) -(* Description: Initializes the rasterizer. *) -(* *) -(* Input: rasterBlock target bitmap/pixmap description *) -(* profBuffer pointer to the render pool *) -(* profSize size in bytes of the render pool *) -(* *) -(* Returns: 1 ( always, but we should check parameters ) *) -(* *) -(****************************************************************************) - -function TTRaster_Init : TError; -var - i, j, c, l : integer; -const - Default_Grays : array[0..4] of Byte - = ( 0, 23, 27, 29, 31 ); - - Default_Smooths : array[0..16] of Byte - = ( 0, 20, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 31, 31, 31 ); -begin - GetMem( Buff, Render_Pool_Size ); - SizeBuff := (Render_Pool_Size div 4); - - GetMem( Gray_Lines, Gray_Lines_Size ); - Gray_Width := Gray_Lines_Size div 2; - -{$IFDEF SMOOTH} - Smooth_Cols := Gray_Lines_Size div 4; -{$ENDIF} - - { Initialisation of Count_Table } - - for i := 0 to 255 do - begin - l := 0; - j := i; - for c := 0 to 3 do - begin - l := l shl 4; - if ( j and $80 <> 0 ) then inc(l); - if ( j and $40 <> 0 ) then inc(l); - j := (j shl 2) and $FF; - end; - Count_table[i] := l; - end; - - (* default Grays takes the gray levels of the standard VGA *) - (* 256 colors mode *) - - Grays[0] := 0; - Grays[1] := 23; - Grays[2] := 27; - Grays[3] := 29; - Grays[4] := 31; - - -{$IFDEF SMOOTH} - - { Initialisation of Count_Table2 } - for i := 0 to 255 do - begin - l := 0; - j := i; - for c := 0 to 1 do - begin - l := l shl 4; - if ( j and $80 <> 0 ) then inc(l); - if ( j and $40 <> 0 ) then inc(l); - if ( j and $20 <> 0 ) then inc(l); - if ( j and $10 <> 0 ) then inc(l); - j := (j shl 4) and $FF; - end; - Count_table2[i] := l; - end; - move( Default_Smooths, Smooths, 17 ); -{$ENDIF} - - Set_High_Precision(False); - Set_Second_Pass(False); - - DropOutControl := 2; - Error := Err_Ras_None; - - TTRaster_Init := Success; -end; - -procedure Cycle_DropOut; -begin - case DropOutControl of - - 0 : DropOutControl := 1; - 1 : DropOutControl := 2; - 2 : DropOutControl := 4; - 4 : DropOutControl := 5; - else - DropOutControl := 0; - end; -end; - -procedure TTRaster_Done; -begin - FreeMem( Buff, Render_Pool_Size ); - FreeMem( Gray_Lines, Gray_Lines_Size ); -end; - - -end. Index: xc/extras/FreeType/pascal/lib/tttables.pas diff -u xc/extras/FreeType/pascal/lib/tttables.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/tttables.pas:removed --- xc/extras/FreeType/pascal/lib/tttables.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/tttables.pas Wed Mar 16 20:59:47 2005 @@ -1,247 +0,0 @@ -(******************************************************************* - * - * TTTables.Pas 1.2 - * - * TrueType Tables declarations - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - * - * Difference between 1.1 and 1.2 : - * - * - TTTables now only contains the declarations of the - * TrueType tables. - * - * - Instance, Resident and Execution context declarations - * were moved to TTObjs - * - * - Tables loaders were moved to the new TTLoad component - * - ******************************************************************) - -Unit TTTables; - -interface - -uses FreeType, TTTypes; - -(***************************************************************************) -(* *) -(* TrueType Table Types *) -(* *) -(***************************************************************************) - -type - (* TrueType collection header *) - PTTCHeader = ^TTTCHeader; - TTTCHeader = record - Tag : Long; - version : TT_Fixed; - DirCount : ULong; - TableDirectory : PStorage; - end; - - (* TrueType Table Directory type *) - PTableDir = ^TTableDir; - TTableDir = Record - version : TT_Fixed; (* should be $10000 *) - numTables : UShort; (* Tables number *) - - searchRange, (* These parameters are only used *) - entrySelector, (* for a dichotomy search in the *) - rangeShift : UShort; (* directory. We ignore them *) - end; - - (* The 'TableDir' is followed by 'numTables' TableDirEntries *) - - TTableDirEntry = Record - Tag : Long; (* table type *) - CheckSum : Long; (* table Checksum *) - Offset : Long; (* Table file offset *) - Length : Long; (* Table length *) - end; - - TTableDirEntries = array[0..100] of TTableDirEntry; - PTableDirEntries = ^TTableDirEntries; - - (* 'cmap' tables *) - - TCMapDir = record - tableVersionNumber : UShort; - numCMaps : UShort; - end; - - TCMapDirEntry = record - platformID : UShort; - platformEncodingID : UShort; - offset : Long; - end; - - TCMapDirEntries = array[0..10] of TCMapDirEntry; - PCMapDirEntries = ^TCMapDirEntries; - - (* table "maxp" of Maximum Profiles' *) - - TMaxProfile = Record - Version : TT_Fixed; - numGlyphs, - maxPoints, - maxContours, - maxCompositePoints, - maxCompositeContours, - maxZones, - maxTwilightPoints, - maxStorage, - maxFunctionDefs, - maxInstructionDefs, - maxStackElements, - - maxSizeOfInstructions, - maxComponentElements, - maxComponentDepth : UShort; - end; - - (* table "gasp" *) - -const - Gasp_GridFit = 1; - Gasp_DoGray = 2; - -type - TGaspRange = record - maxPPEM : UShort; - gaspFlag : UShort; - end; - - TGaspRanges = array[0..9] of TGaspRange; - PGaspRanges = ^TGaspRanges; - - TGasp = record - version : UShort; - numRanges : UShort; - gaspRanges : PGaspRanges; - end; - - (* table "HMTX" *) - - TLongMetrics = record - advance : UShort; - bearing : Short; - end; - - TTableLongMetrics = array[0..255] of TLongMetrics; - PTableLongMetrics = ^TTableLongMetrics; - - TShortMetrics = Short; - TTableShortMetrics = array[0..255] of TShortMetrics; - PTableShortMetrics = ^TTableShortMetrics; - -{ - (* table "OS/2" *) - - TOS2_Table = record - version : UShort; (* $0001 *) - xAvgCharWidth : Short; - usWeightClass : UShort; - usWidthClass : UShort; - fsType : Short; - ySubscriptXSize : Short; - ySubscriptYSize : Short; - ySubScriptXOffset : Short; - ySubscriptYOffset : Short; - ySuperscriptXSize : Short; - ySuperscriptYSize : Short; - ySuperscriptXOffset : Short; - ySuperscriptYOffset : Short; - yStrikeoutSize : Short; - yStrikeoutPosition : Short; - sFamilyClass : Short; - panose : array[0..9] of Byte; - ulUnicodeRange1 : ULong; (* bits 0-31 *) - ulUnicodeRange2 : ULong; (* bits 32-63 *) - ulUnicodeRange3 : ULong; (* bits 64-95 *) - ulUnicodeRange4 : ULong; (* bits 96-127 *) - achVendID : array[0..3] of Byte; - fsSelection : UShort; - usFirstCharIndex : UShort; - usLastCharIndex : UShort; - sTypoAscender : UShort; - sTypoDescender : UShort; - sTypoLineGap : UShort; - usWinAscent : UShort; - usWinDescent : UShort; - - (* only version 1 tables *) - ulCodePageRange1 : ULong; - ulCodePageRange2 : ULong; - end; - - (* table "post" *) - - TPostscript = record - FormatType : TT_Fixed; - italicAngle : TT_Fixed; - underlinePosition : Short; - underlineThickness : Short; - isFixedPitch : ULong; - minMemType42 : ULong; - maxMemType42 : ULong; - minMemType1 : ULong; - maxMemType1 : ULong; - end; -} - (* table "name" *) - - (* table "name" *) - - TName_Record = record - - platformID : UShort; - encodingID : UShort; - languageID : UShort; - nameID : UShort; - length : UShort; - offset : UShort; - end; - PName_Record = ^TName_Record; - TName_Records = array[0..0] of TName_Record; - PName_Records = ^TName_Records; - - - PName_Table = ^TName_Table; - TName_Table = record - - format : UShort; - numNameRecords : UShort; - storageOffset : UShort; - names : PName_Records; - storage : PByte; - end; - - - PHdmx_Record = ^THdmx_Record; - THdmx_Record = record - ppem : Byte; - max_width : Byte; - widths : PByte; - end; - - THdmx_Records = array[0..19] of THdmx_Record; - PHdmx_Records = ^THdmx_Records; - - THdmx = record - version : UShort; - num_records : Short; - records : PHdmx_Records; - end; - -implementation - -end. - Index: xc/extras/FreeType/pascal/lib/tttypes.pas diff -u xc/extras/FreeType/pascal/lib/tttypes.pas:1.1.1.1 xc/extras/FreeType/pascal/lib/tttypes.pas:removed --- xc/extras/FreeType/pascal/lib/tttypes.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/lib/tttypes.pas Wed Mar 16 20:59:47 2005 @@ -1,102 +0,0 @@ -(******************************************************************* - * - * TTTypes.pas 1.0 - * - * Global internal types definitions - * - * Copyright 1996, 1997 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -unit TTTypes; - -interface - -uses FreeType; - -type - - (*********************** SIMPLE PRIMITIVE TYPES *******************) - - (* BYTE is already defined in Pascal *) - (* They are equivalent to C unsigned chars *) - - UShort = Word; (* unsigned short integer, must be on 16 bits *) - Short = Integer; (* signed short integer, must be on 16 bits *) - - Long = Longint; - ULong = LongInt; (* unsigned long integer, must be on 32 bits *) - (* NOTE : There is no 'LongWord' in Pascal, *) - (* but the unsigned ops are all in *) - (* the inline assembly routines *) - -{$IFDEF USE32} - Int = LongInt; (* the 'int' type is used for loop counters and *) -{$ELSE} (* indexes.. Their size must be the one a given *) - Int = Integer; (* system handles most easily ( 16 bits on Turbo *) -{$ENDIF} (* and 32 on Virtual Pascals ) *) - - TByteArray = array[0..1000] of Byte; - PByte = ^TByteArray; - - TShortArray = array[0..1000] of Short; - PShort = ^TShortArray; - - TUShortArray = array[0..1000] of UShort; - PUShort = ^TUShortArray; - - TStorage = array[0..16000] of Long; - PStorage = ^TStorage; - PLong = PStorage; - PULong = PStorage; - - TError = boolean; - - (***************** FreeType Internal Types *****************************) - - TCoordinates = array[0..1023] of TT_F26Dot6; - PCoordinates = ^TCoordinates; - - PTouchTable = PByte; - - TVecRecord = record - n : Int; (* number of points *) - org_x : PCoordinates; (* original coordinates arrays *) - org_y : PCoordinates; - cur_x : PCoordinates; (* current coordinates arrays *) - cur_y : PCoordinates; - touch : PTouchTable; (* touch flags array *) - end; - (* This type is used to describe each point zone in the interpreter *) - -const - - TT_Round_Off = 5; - TT_Round_To_Half_Grid = 0; - TT_Round_To_Grid = 1; - TT_Round_To_Double_Grid = 2; - TT_Round_Up_To_Grid = 4; - TT_Round_Down_To_Grid = 3; - TT_Round_Super = 6; - TT_ROund_Super_45 = 7; - - Success = False; - Failure = True; - - TT_Flag_Touched_X = $02; (* X touched flag *) - TT_Flag_Touched_Y = $04; (* Y touched flag *) - - TT_Flag_Touched_Both = TT_Flag_Touched_X or TT_FLag_Touched_Y; - - TT_Flag_On_Curve = $01; (* Point is On curve *) - -implementation - -end. Index: xc/extras/FreeType/pascal/test/codetv.pas diff -u xc/extras/FreeType/pascal/test/codetv.pas:1.1.1.1 xc/extras/FreeType/pascal/test/codetv.pas:removed --- xc/extras/FreeType/pascal/test/codetv.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/codetv.pas Wed Mar 16 20:59:47 2005 @@ -1,248 +0,0 @@ -{****************************************************************************} -{* *} -{* CodeView.PAS *} -{* *} -{* This unit implements a simple TrueType bytecode viewer for the *} -{* FREETYPE project debugger. *} -{* *} -{****************************************************************************} - -Unit CodeTV; - -interface - -uses Objects, Views, Drivers, TTTypes, TTDebug; - -{$I DEBUGGER.INC} - -type - - { TCodeViewer } - - { This TView is a simple code list viewer ( IP + focused + breaks ) } - - PCodeViewer = ^TCodeViewer; - TCodeViewer = object( TListViewer ) - - constructor Init( var Bounds : TRect; - ARange : PRangeRec ); - - procedure Draw; virtual; - procedure HandleEvent( var Event : TEvent ); virtual; - - procedure Change_Range( ARange : PRangeRec ); - procedure Change_Focus( ALine : integer ); - - procedure Get_Cursor_Addr( P : PLong ); - - private - CodeRange : PRangeRec; - IP : Int; - end; - - { TCodeWindow } - - PCodeWindow = ^TCodeWindow; - TCodeWindow = object( TWindow ) - CodeView : PCodeViewer; - constructor Init( var Bounds : TRect; - ARange : PRangeRec ); - end; - -implementation - -{ TCodeViewer } - -constructor TCodeViewer.Init; -begin - inherited Init( Bounds, 1, nil, nil ); - - GrowMode := gfGrowHiX or gfGrowHiY; - DragMode := dmDragGrow or dmLimitLoX or dmLimitLoY; - EventMask := EventMask or evWave; - - IP := 0; - - Change_Range( ARange ); -end; - - -procedure TCodeViewer.Change_Range; -begin - codeRange := ARange; - - if codeRange <> nil then - SetRange( codeRange^.NLines ) - else - SetRange( 0 ); -end; - -procedure TCodeViewer.Change_Focus; -begin - - if ALine < 0 then - begin - IP := -1; - DrawView; - exit; - end; - - if ALine >= TopItem + Size.Y then TopItem := ALine; - - if codeRange <> nil then - begin - FocusItem( ALine ); - IP := codeRange^.Disassembled^[ALine]; - end; - DrawView; -end; - - -procedure TCodeViewer.Get_Cursor_Addr( P : PLong ); -begin - with codeRange^ do - begin - if (Focused < 0) or (Focused >= NLines) then - P^[0] := -1 - else - P^[0] := disassembled^[Focused]; - end; -end; - - -procedure TCodeViewer.HandleEvent( var Event : TEvent ); -var - Limits : TRect; - Mini, Maxi : Objects.TPoint; -begin - - inherited HandleEvent(Event); - - case Event.What of - - evCommand : case Event.Command of - - cmChangeRange : Change_Range( Event.InfoPtr ); - - cmQueryCursorAddr : Get_Cursor_Addr( Event.InfoPtr ); - - cmResize: begin - Owner^.GetExtent(Limits); - SizeLimits( Mini, Maxi ); - DragView(Event, DragMode, Limits, Mini, Maxi ); - ClearEvent(Event); - end; - - end; - - evWave : case Event.Command of - - cmReFocus : Change_Focus( Event.InfoInt ); - - end; - end; -end; - - -procedure TCodeViewer.Draw; -const - Colors : array[0..3] of byte - = ($1E,$40,$0E,$30); - Prefix : array[1..3] of Char - = ( 'f', 'c', 'g' ); -var - I, J, Item : Int; - B : TDrawBuffer; - S : String; - Indent : Int; - Ligne : Int; - - Color : word; - - On_BP : boolean; - BP : PBreakPoint; - -begin - -{ - Colors[0] := GetColor(1); (* Normal line *) - Colors[1] := GetColor(2); (* Normal breakpoint *) - Colors[2] := GetColor(3); (* Focused line *) - Colors[3] := GetColor(4); (* Focused breakpoint *) -} - if HScrollBar <> nil then Indent := HScrollBar^.Value - else Indent := 0; - - with CodeRange^ do - begin - - BP := Breaks; - - if (BP <> nil) and (NLines > TopItem) then - while (BP <> nil) and (BP^.Address < Disassembled^[TopItem]) do - BP := BP^.Next; - - for I := 0 to Self.Size.Y-1 do - begin - - Item := TopItem + I; - - Color := 0; - - if Item < NLines then - begin - - Ligne := Disassembled^[Item]; - - if (BP <> nil) and (BP^.Address = Ligne) then - begin - Color := 1; - Repeat - BP := BP^.Next - until (BP = nil) or (BP^.Address > Ligne); - end; - - if (Range > 0) and - ( Focused = Item ) then - - Color := Color or 2; - - S := ' ' + Cur_U_Line( Code, Ligne ); - - S[2] := Prefix[index]; - - S := copy( S, 1 + Indent, Self.Size.X ); - - if Ligne = IP then - begin - S[1] := '='; - S[7] := '>'; - end - end - else - begin - S := ''; - end; - - Color := Colors[Color]; - - MoveChar( B, ' ', Color, Self.Size.X ); - MoveStr( B, S, Color ); - - WriteLine( 0, I, Self.Size.X, 1, B ); - end; - end; -end; - -{ TCodeWindow } - -constructor TCodeWindow.Init; -begin - inherited Init( Bounds,'Code',wnNoNumber ); - GetExtent( Bounds ); - Bounds.Grow(-1,-1); - New( CodeView, Init( Bounds, ARange ) ); - Insert( CodeView ); -end; - -end. Index: xc/extras/FreeType/pascal/test/common.pas diff -u xc/extras/FreeType/pascal/test/common.pas:1.1.1.1 xc/extras/FreeType/pascal/test/common.pas:removed --- xc/extras/FreeType/pascal/test/common.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/common.pas Wed Mar 16 20:59:47 2005 @@ -1,84 +0,0 @@ -Unit Common; - -interface - -const - Max_Arguments = 1024; - -var - num_arguments : integer; - (* the number of arguments contained in the 'arguments' array *) - - arguments : array[0..Max_Arguments-1] of ^string; - (* This array will hold all arguments after wildcard expansion *) - (* note that it will not contain the original arguments that *) - (* were before 'first_argument' of Expand_Wildcards *) - - procedure Expand_WildCards( first_argument : integer; - default_extension : string ); - (* expand all wildcards into filenames *) - -implementation - -uses Dos; - - procedure Split( Original : String; - var Base : String; - var Name : String ); - var - n : integer; - begin - n := length(Original); - - while ( n > 0 ) do - if ( Original[n] = '\' ) or - ( Original[n] = '/' ) then - begin - Base := Copy( Original, 1, n-1 ); - Name := Copy( Original, n+1, length(Original) ); - exit; - end - else - dec(n); - - Base := ''; - Name := Original; - end; - - - procedure Expand_WildCards( first_argument : integer; - default_extension : string ); - var - i, n : integer; - base, name : string; - SRec : SearchRec; - begin - num_arguments := 0; - i := first_argument; - - while ( i <= ParamCount ) do - begin - Split( ParamStr(i), base, name ); - if base <> '' then - base := base + '\'; - - FindFirst( base+name, Archive+ReadOnly+Hidden, SRec ); - if DosError <> 0 then - FindFirst( base+name+default_extension, AnyFile, SRec ); - - while (DosError = 0) and (num_arguments < Max_Arguments) do - begin - GetMem( arguments[num_arguments], length(base)+length(SRec.Name)+1 ); - arguments[num_arguments]^ := base + SRec.Name; - inc( num_arguments ); - FindNext( SRec ); - end; - - {$IFDEF OS2} - FindClose( SRec ); - {$ENDIF} - inc( i ); - end; - end; - -end. Index: xc/extras/FreeType/pascal/test/debugger.inc diff -u xc/extras/FreeType/pascal/test/debugger.inc:1.1.1.1 xc/extras/FreeType/pascal/test/debugger.inc:removed --- xc/extras/FreeType/pascal/test/debugger.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/debugger.inc Wed Mar 16 20:59:47 2005 @@ -1,42 +0,0 @@ -{ DEBUGGER.INC : Constantes des commandes du debugger FREETYPE } - -const - - evWave = $200; { Broadcast messages } - - cmNewWin = 200; - cmFileOpen = 201; - - cmNewExecution = 300; - cmRefocus = 301; - cmChangeRange = 302; - cmQueryCursorAddr = 303; - - cmRun = 400; - kb_val_Run = kbCtrlF9; - kb_str_Run = 'Ctrl-F9'; - - cmGotoCursor = 401; - kb_val_GotoCursor = kbF4; - kb_str_GotoCursor = 'F4'; - - cmTraceInto = 402; - kb_val_TraceInto = kbF7; - kb_str_TraceInto = 'F7'; - - cmStepOver = 403; - kb_val_StepOver = kbF8; - kb_str_StepOver = 'F8'; - - cmUntilReturn = 404; - kb_val_UntilReturn = kbAltF8; - kb_str_UntilReturn = 'Alt-F8'; - - cmToggleBreak = 500; - kb_val_ToggleBreak = kbCtrlF8; - - cmClearBreaks = 501; - - cmViewGlyph = 600; - kb_val_ViewGlyph = kbF9; - kb_str_ViewGlyph = 'F9'; Index: xc/extras/FreeType/pascal/test/debugger.pas diff -u xc/extras/FreeType/pascal/test/debugger.pas:1.1.1.1 xc/extras/FreeType/pascal/test/debugger.pas:removed --- xc/extras/FreeType/pascal/test/debugger.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/debugger.pas Wed Mar 16 20:59:47 2005 @@ -1,924 +0,0 @@ -program Debugger; - -uses -{$IFDEF OS2} - Use32, -{$ENDIF} - -(* Turbo Vision units *) - Drivers, - Objects, - Views, - Menus, - App, - MsgBox, - - Crt, - -(* FreeType units *) - FreeType, - TTInterp, - TTTypes, - TTMemory, - TTError, - TTTables, - TTObjs, - TTFile, - TTCalc, - TTDebug, - TTRaster, - -(* graphics system units *) - GDriver, - GMain, - GEvents, - -(* Debugger's Turbo Vision enhancements *) - CodeTv, - StackTv, - StateTv, - ZoneTv; - -{$I DEBUGGER.INC} - -(* define this variable if you want to debug the CVT rather than a *) -(* glyph's instruction set.. *) -{ $DEFINE DEBUG_CVT} - -const - Precis = 64; - - Screen_Width = 640; - Screen_Height = 480; - Screen_Cols = Screen_Width div 8; - Screen_Size = Screen_Cols * Screen_Height; - - Grid_Width = Screen_Width div 16; - Grid_Height = Screen_Height div 16; - Grid_Cols = Grid_Width div 8; - Grid_Size = Grid_Cols * Grid_Height; - - Screen_Center_X = Screen_Width div 2; - Screen_Center_Y = Screen_Height div 2; - - Grid_Center_X = Grid_Width div 2; - Grid_Center_Y = Grid_Height div 2; - - Profile_Buff_Size = 64000; - - -type - TDebug_Mode = ( debug_code, view_glyph ); - - TMyApp = object( TApplication ) - constructor Init; - procedure NewWindow; virtual; - procedure InitMenuBar; virtual; - procedure HandleEvent( var Event : TEvent ); virtual; - - procedure Single_Step; - procedure Execute_Loop; - procedure New_Execution; - procedure ReFocus; - end; - - TEtat = ( etat_Termine, etat_Arret, etat_Execution ); - - TVolatileBreakPoint = record - range : Int; - address : Int; - end; - -var - CW : PCodeWindow; - SW : PStackWindow; - GW : PStateWindow; - ZW : PZoneWindow; - - Code_Range : array[1..3] of PCodeRange; - - Gen_Range : array[1..3] of TRangeRec; - - old_Range : Int; - - stream : TT_Stream; - - the_face : TT_Face; - the_glyph : TT_Glyph; - the_instance : TT_Instance; - - face : PFace; - glyph : PGlyph; - glyph2 : PGlyph; - instance : PInstance; - exec : PExec_Context; - - error : TT_Error; - - Etat : TEtat; - - Volatiles : PBreakPoint; - - xCoord : TT_PCoordinates; - yCoord : TT_PCoordinates; - Flag : TT_PTouchTable; - - Bitmap_small : TT_Raster_Map; - Bitmap_big : TT_Raster_Map; - - display_outline : boolean; - hint_glyph : boolean; - - debug_mode : TDebug_Mode; - MyApp : TMyApp; - - Range : Int; - P : PByteArray; - FileName : String; - Font_Buffer : PStorage; - Out_File : Text; - T, I : int; - - glyph_number : Int; - point_size : Int; - -procedure Initialize; -var - i : int; -begin - for i := 1 to 3 do Code_Range[i] := Get_CodeRange(exec,i); - for i := 1 to 3 do Generate_Range( Code_Range[i], i, Gen_Range[i] ); - - Volatiles := nil; - - display_outline := true; - Debug_Mode := debug_code; -end; - -(******************************************************************* - * - * Function : InitRows - * - * Description : Allocates the target bitmaps - * - *****************************************************************) - -Procedure Init_Engine; -var - P: Pointer; -begin - - (* The big bitmap will contain the grid, the glyph contours and *) - (* the magnified bitmap *) - - Bitmap_big.rows := Screen_Height; - Bitmap_big.cols := Screen_Cols; - Bitmap_big.width := Screen_Width; - Bitmap_big.flow := TT_Flow_Up; - Bitmap_big.size := Screen_Size; - - GetMem( Bitmap_big.buffer, Bitmap_big.size ); - if Bitmap_big.buffer = NIL then - begin - Writeln('ERREUR:InitRows:Not enough memory to allocate big BitMap'); - halt(1); - end; - - (* The small bitmap contains the rendered glyph, and is then later *) - (* magnified into the big bitmap *) - - Bitmap_small.rows := Grid_Height; - Bitmap_small.cols := Grid_Cols; - Bitmap_small.width := Grid_Width; - Bitmap_small.flow := TT_Flow_Up; - Bitmap_small.size := Grid_Size; - - GetMem( Bitmap_small.buffer, Bitmap_small.size ); - if Bitmap_small.buffer = NIL then - begin - Writeln('ERREUR:InitRows:Not enough memory to allocate big BitMap'); - halt(1); - end; - - FillChar( Bitmap_big.Buffer^, Bitmap_big.Size, 0 ); - FillChar( Bitmap_small.Buffer^, Bitmap_small.size, 0 ); -end; - -(******************************************************************* - * - * Function : ClearData - * - * Description : Clears the bitmaps - * - *****************************************************************) - -Procedure ClearData; -var i: integer; -begin - FillChar( Bitmap_big. Buffer^, Bitmap_big. Size, 0 ); - FillChar( Bitmap_small.Buffer^, Bitmap_small.size, 0 ); -end; - - -function Render_Magnified : boolean; -label - Exit_1; -type - TBlock = array[0..7] of Byte; - PBlock = ^TBlock; -const -{ - Grid_Empty : TBlock - = ( $10, $10, $10, $FF, $10, $10, $10, $10 ); -} - Grid_Pixel2 : TBlock - = ( $FE, $FE, $FE, $FE, $FE, $FE, $FE, $00 ); - - Pixel_Center_X = 3; - Pixel_Center_Y = 3; - - Grid_Empty : TBlock - = ( $00, $00, $00, $10, $00, $00, $00, $00 ); - - Grid_Pixel1 : TBlock - = ( $00, $00, $38, $38, $38, $00, $00, $00 ); - - Big_Center_X = Grid_Center_X*16 + Pixel_Center_X; - Big_Center_Y = Grid_Center_Y*16 + Pixel_Center_Y; - -var - r, w, w2, u, v, b, c : integer; - - x, y : Long; - - block : PBlock; - G : TT_Outline; - - pixel, - empty : PBlock; - - numPoints : integer; -begin - Render_Magnified := False; - - ClearData; - - numpoints := exec^.pts.n_points - 2; (* Remove phantom points *) - - for r := 0 to numPoints-1 do with exec^.pts do - begin - glyph2^.outline.points^[r].x := exec^.pts.cur^[r].x+64; - glyph2^.outline.points^[r].y := exec^.pts.cur^[r].y+64; - end; - - (* We begin rendering the glyph within the small bitmap *) - - G.n_contours := glyph^.outline.n_contours; - G.conEnds := glyph^.outline.conEnds; - G.Points := glyph^.outline.points; - G.points := glyph2^.outline.points; - G.Flags := glyph^.outline.flags; - - G.second_pass := True; - G.high_precision := True; - G.dropout_mode := 2; - - if Render_Glyph ( G, Bitmap_small ) then goto Exit_1; - - (* Then, we render the glyph outline in the bit bitmap *) - - for r := 0 to numPoints-1 do - begin - x := exec^.pts.cur^[r].x; - y := exec^.pts.cur^[r].y; - - x := (x - Precis*Grid_Center_X)*16 + Big_Center_X*Precis; - y := (y - Precis*Grid_Center_Y)*16 + Big_Center_Y*Precis; - - glyph2^.outline.points^[r].x := x + 8*64; - glyph2^.outline.points^[r].y := y + 8*64; - end; - - (* first compute the magnified coordinates *) - - G.n_contours := glyph^.outline.n_contours; - G.conEnds := glyph^.outline.conEnds; - G.Points := glyph^.outline.points; - G.points := glyph2^.outline.points; - G.Flags := glyph^.outline.flags; - - G.second_pass := True; - G.high_precision := True; - G.dropout_mode := 2; - - if display_outline then - if Render_Glyph ( G, Bitmap_big ) then goto Exit_1; - - (* Now, magnify the small bitmap, XORing it to the big bitmap *) - - r := 0; - w := 0; - b := 0; - - empty := @Grid_Empty; - - if display_outline then pixel := @Grid_Pixel1 - else pixel := @Grid_Pixel2; - - for y := 0 to Grid_Height-1 do - begin - - for x := 0 to Grid_Width-1 do - begin - - w2 := w; - b := b shr 1; - - if b = 0 then - begin - c := PByte(Bitmap_small.Buffer)^[r]; - b := $80; - inc( r ); - end; - - if c and b <> 0 then block := pixel - else block := empty; - - for v := 0 to 7 do - begin - PByte(Bitmap_Big.Buffer)^[w2] := PByte(Bitmap_Big.Buffer)^[w2] - xor block^[v]; - inc( w2, Bitmap_Big.cols ); - end; - - inc( w, 2 ); - - end; - - inc( w, 15*Screen_Cols ); - - end; - - - (* Display the resulting big bitmap *) - - Display_BitMap_On_Screen( Bitmap_big.Buffer^, 450, 80 ); - -Exit_1: - (* Clear the bitmaps *) - - Render_Magnified := True; -end; - - -function Render_Simple : boolean; -label - Exit_1; -var - r, w, w2, u, v, b, c : integer; - - x, y : Long; - - G : TT_Outline; - - numPoints : integer; -begin - Render_Simple := False; - - numpoints := exec^.pts.n_points - 2; (* Remove phantom points *) - - for r := 0 to numPoints-1 do with exec^.pts do - begin - glyph2^.outline.points^[r].x := exec^.pts.cur^[r].x + 32; - glyph2^.outline.points^[r].y := exec^.pts.cur^[r].y + 32; - end; - - (* We begin rendering the glyph within the small bitmap *) - - G.n_contours := glyph^.outline.n_contours; - G.conEnds := glyph^.outline.conEnds; - G.Points := glyph^.outline.points; - G.points := glyph2^.outline.points; - G.Flags := glyph^.outline.flags; - - G.second_pass := True; - G.high_precision := True; - G.dropout_mode := 2; - - - if display_outline then - if Render_Glyph ( G, Bitmap_big ) then goto Exit_1; - - (* Display the resulting big bitmap *) - - Display_BitMap_On_Screen( Bitmap_big.Buffer^, 450, 80 ); - -Exit_1: - (* Clear the bitmaps *) - - ClearData; - - Render_Simple := True; -end; - - -procedure Exit_Viewer; -begin - Restore_Screen; - debug_mode := debug_code; - MyApp.SetScreenMode( smCo80 + smFont8x8 ); - MyApp.Show; - MyApp.ReDraw; -end; - - -procedure Enter_Viewer; -begin - Set_Graph_Screen( Graphics_Mode_Mono ); - - if not Render_Magnified then - Exit_Viewer - else - debug_mode := view_glyph; -end; - - -procedure TMyApp.Execute_Loop; -var - Out : Boolean; - B : PBreakPoint; - - Event : TEvent; -begin - - Out := False; - etat := etat_Execution; - - repeat - - Single_Step; - - B := Find_BreakPoint( Volatiles, exec^.curRange, exec^.IP ); - if B <> nil then - begin - Clear_Break( Volatiles, B ); - Out := True; - end; - - if etat = etat_Execution then - begin - B := Find_BreakPoint( Gen_Range[exec^.curRange].Breaks, - exec^.curRange, - exec^.IP ); - if B <> nil then - begin - Out := True; - Etat := etat_Arret; - end; - end - else - Out := True; - - until Out; - -end; - - -procedure TMyApp.New_Execution; -var - Event : TEvent; -begin - Event.What := evWave; - Event.Command := cmNewExecution; - - HandleEvent( Event ); -end; - - -procedure TMyApp.Single_Step; -var - tempStr : string[6]; -begin - - if Run_Ins( exec ) then - begin - etat := etat_Termine; - str( exec^.error, tempStr ); - MessageBox( 'Error : '+tempStr, nil, mfError+mfOkButton ); - exit; - end; - - if exec^.IP >= exec^.codeSize then - - begin - if (exec^.curRange <> TT_CodeRange_CVT) or - Goto_CodeRange( exec, TT_CodeRange_Glyph, 0 ) then - - begin - etat := etat_Termine; - MessageBox( 'Completed', nil, mfInformation+mfOkButton ); - exit; - end; - end -end; - - -procedure TMyApp.ReFocus; -var - Event : TEvent; -begin - Event.What := evCommand; - - if Old_Range <> exec^.curRange then - begin - Old_Range := exec^.curRange; - Event.Command := cmChangeRange; - Event.InfoPtr := @Gen_Range[Old_Range]; - CW^.HandleEvent( Event ); - end; - - Event.What := evWave; - Event.Command := cmRefocus; - - if etat <> etat_Termine then - Event.InfoInt := Get_Dis_Line( Gen_Range[Old_Range], exec^.IP ) - else - Event.InfoInt := -1; - - HandleEvent( Event ); -end; - - -procedure TMyApp.NewWindow; -var - R : TRect; - RR : TRangeRec; -begin - Desktop^.GetExtent(R); - R.B.X := 32; - - Old_Range := exec^.curRange; - - New( CW, Init( R, @Gen_Range[Old_Range] ) ); - Desktop^.Insert(CW); - - Desktop^.GetExtent(R); - R.A.X := 32; - R.B.X := 50; - R.B.Y := R.B.Y div 2; - - New( SW, Init( R, exec ) ); - Desktop^.Insert(SW); - - Desktop^.GetExtent(R); - R.A.X := 50; - R.B.Y := R.B.Y div 2; - - New( GW, Init( R, exec ) ); - Desktop^.Insert(GW); - - Desktop^.GetExtent(R); - R.A.X := 32; - R.A.Y := R.B.Y div 2; - -{$IFDEF DEBUG_CVT} - New( ZW, Init( R, @exec^.twilight ) ); -{$ELSE} - New( ZW, Init( R, @exec^.pts ) ); -{$ENDIF} - Desktop^.Insert(ZW); - - etat := etat_Arret; -end; - - -procedure TMyApp.InitMenuBar; -var - R : TRect; -begin - GetExtent(R); - R.B.Y := R.A.Y + 1; - MenuBar := New( PMenuBar, Init( R, NewMenu( - NewSubMenu( '~F~ile', hcNoContext, NewMenu( - NewItem( '~O~pen','F3', kbF3, cmFileOpen, - hcNoContext, - nil )), - NewSubMenu( '~R~un', hcNoContext, - NewMenu( - NewItem( '~R~un','Ctrl-F9', kbCtrlF9, - cmRun, hcNoContext, - - NewItem( '~G~o to cursor','F4', kbF4, - cmGoToCursor, hcNoContext, - - NewItem( '~T~race into', 'F7', kbF7, - cmTraceInto, hcNoContext, - - NewItem( '~S~tep over', 'F8', kbF8, - cmStepOver, hcNoContext, - - NewItem( '~V~iew glyph', 'F9', kbF9, - cmViewGlyph, hcNoContext, - nil - ) - ) - ) - ) - ) - ), - nil - ))))); -end; - - -procedure TMyApp.HandleEvent( var Event : TEvent ); -var - Adr : Long; -begin - - if debug_mode = view_glyph then - begin - - case Event.What of - - evKeyDown : case Event.KeyCode of - - kbF2 : begin - display_outline := not display_outline; - - if not Render_Magnified then - Exit_Viewer; - - end; - - kbESC : Exit_Viewer; - - end; - end; - - ClearEvent( Event ); - exit; - - end; - - inherited HandleEvent(Event); - - case Event.What of - - evCommand : case Event.Command of - - cmNewWin : NewWindow; - - cmGoToCursor : begin - if etat = etat_Termine then exit; - - Event.Command := cmQueryCursorAddr; - Event.InfoPtr := @Adr; - - CW^.HandleEvent( Event ); - - Set_Break( Volatiles, - exec^.curRange, - Adr ); - - New_Execution; - Execute_Loop; - ReFocus; - end; - - cmTraceInto : begin - if etat = etat_termine then exit; - - New_Execution; - Single_Step; - ReFocus; - end; - - cmStepOver : begin - if etat = etat_termine then exit; - - New_Execution; - with exec^ do - case code^[IP] of - - $2A, (* LOOPCALL *) - $2B : (* CALL *) - - begin - - Set_Break( Volatiles, - exec^.curRange, - exec^.IP + - Get_Length( exec^.Code, - exec^.IP ) ); - Execute_Loop; - end; - - else - - Single_Step; - end; - - ReFocus; - end; - - cmViewGlyph : - Enter_Viewer; - - else - exit; - end; - - else - exit; - end; - - ClearEvent(Event); -end; - - -constructor TMyApp.Init; -begin - inherited Init; - SetScreenMode( smCo80 + smFont8x8 ); - NewWindow; -end; - - - -(******************************************************************* - * - * Function : LoadTrueTypeChar - * - * Description : - * - * Notes : - * - *****************************************************************) - -Function LoadTrueTypeChar( index : integer ) : boolean; -var - j, load_flag : int; - - rc : TT_Error; - -begin - LoadTrueTypeChar := FALSE; -(* - if hint_glyph then load_flag := TT_Load_Scale_Glyph or TT_Load_Hint_Glyph - else load_flag := TT_Load_Scale_Glyph; -*) - - load_flag := TT_Load_Scale_Glyph or TT_Load_Hint_Glyph or TT_Load_Debug; - - rc := TT_Load_Glyph( the_instance, - the_glyph, - index, - load_flag ); - if rc <> TT_Err_Ok then exit; - - LoadTrueTypeChar := TRUE; -end; - - -procedure Usage; -begin - Writeln('Simple Library Debugger -- part of the FreeType project'); - Writeln('-----------------------------------------------------'); - Writeln; - Writeln(' Usage : debugger glyph_number point_size fontfile[.ttf]'); - Writeln; - halt(2); -end; - - -var - Code : Int; - -begin - - if ParamCount <> 3 then - Usage; - - val( ParamStr(1), glyph_number, Code ); - if Code <> 0 then - Usage; - - val( ParamStr(2), point_size, Code ); - if Code <> 0 then - Usage; - - filename := ParamStr(3); - if Pos( '.', filename ) = 0 then filename := filename + '.ttf'; - - TT_Init_FreeType; - - error := TT_Open_Face( filename, the_face ); - if error <> TT_Err_Ok then - begin - Writeln('Could not open file ',filename ); - halt(1); - end; - - face := PFace(the_face.z); - - error := TT_New_Glyph( the_face, the_glyph ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR : Could not get glyph' ); - Check_Error(error); - end; - - glyph2 := PGlyph( the_glyph.z ); - - error := TT_New_Glyph( the_face, the_glyph ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR : Could not get glyph' ); - Check_Error(error); - end; - - glyph := PGlyph( the_glyph.z ); - - error := TT_New_Instance( the_face, the_instance ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR: Could not create new instance' ); - Check_Error(error); - end; - - instance := PInstance(the_instance.z); - - exec := New_Context( instance ); - if exec = nil then - begin - Writeln( 'could not create execution context' ); - halt(1); - end; - - instance^.debug := true; - instance^.context := exec; - - TT_Set_Instance_Resolutions( the_instance, 96, 96 ); - -{$IFDEF DEBUG_CVT} - exec^.curRange := 1; - - (* code taken from freetype.pas *) - - with instance^.metrics do - begin - x_scale1 := ( Long(point_size*64) * x_resolution ) div 72; - x_scale2 := instance^.owner^.fontHeader.units_per_EM; - - y_scale1 := ( Long(point_size*64) * y_resolution ) div 72; - y_scale2 := x_scale2; - - if instance^.owner^.fontHeader.flags and 8 <> 0 then - begin - x_scale1 := (x_scale1 + 32) and -64; - y_scale1 := (y_scale1 + 32) and -64; - end; - - x_ppem := x_scale1 div 64; - y_ppem := y_scale1 div 64; - end; - - instance^.metrics.pointsize := point_size*64; - instance^.valid := False; - - if Instance_Reset( instance, true ) then - Panic1('Could not reset instance before executing CVT'); -{$ELSE} - error := TT_Set_Instance_PointSize( the_instance, point_size ); - if error <> TT_Err_Ok then - begin - Writeln('Could not execute CVT program' ); - Check_Error(error); - end; -{$ENDIF} - - Init_Engine; - -{$IFNDEF DEBUG_CVT} - if not LoadTrueTypeChar( glyph_number ) then - begin - Writeln('Error while loading glyph' ); - halt(1); - end; -{$ENDIF} - - exec^.instruction_trap := true; - -{$IFNDEF DEBUG_CVT} -(* Run_Context( exec, true ); *) -{$ENDIF} - - Initialize; - - MyApp.Init; - MyApp.Run; - MyApp.Done; - - TT_Done_FreeType; -end. Index: xc/extras/FreeType/pascal/test/dump.pas diff -u xc/extras/FreeType/pascal/test/dump.pas:1.1.1.1 xc/extras/FreeType/pascal/test/dump.pas:removed --- xc/extras/FreeType/pascal/test/dump.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/dump.pas Wed Mar 16 20:59:47 2005 @@ -1,551 +0,0 @@ -{***************************************************************************} -{* *} -{* FreeType Font Tester. *} -{* *} -{* This program is used to compare computed advance widths with the *} -{* values present in the "hdmx" table. It is now useless but remains *} -{* a good base for other quick font metrics checkers.. *} -{* *} -{* This source code has been compiled and run under both Virtual Pascal *} -{* on OS/2 and Borland's BP7. *} -{* *} -{***************************************************************************} - -program Dump; - -uses Crt, - Dos, -{$IFDEF OS2} - Use32, -{$ENDIF} - GMain, - GEvents, - GDriver, - FreeType, - TTCalc, - TTObjs, - TTTables; - -{ &PMTYPE NOVIO} - -{$DEFINE DEBUG} - -type - TPathName = string[128]; - -const - Precis = 64; - - Precis2 = Precis div 2; - - PrecisAux = 1024; - - Profile_Buff_Size = 32000; - - Max_Files = 1024; - -var - face : TT_Face; - instance : TT_Instance; - glyph : TT_Glyph; - - metrics : TT_Glyph_Metrics; - imetrics : TT_Instance_Metrics; - - props : TT_Face_Properties; - - ymin, ymax, xmax, xmin, xsize : longint; - res, old_res : int; - - numPoints, numContours : int; - - Bit : TT_Raster_Map; - - Rotation : int; (* Angle modulo 1024 *) - - num_glyphs : int; - - error : TT_Error; - gray_level : Boolean; - - display_outline : boolean; - hint_glyph : boolean; - scan_type : Byte; - - old_glyph : int; - cur_glyph : int; - - scale_shift : Int; - - grayLines : array[0..2048] of Byte; - - filenames : array[0..Max_Files-1] of ^TPathName; - -(******************************************************************* - * - * Function : Set_Raster_Area - * - *****************************************************************) - - procedure Set_Raster_Area; - begin - Bit.rows := vio_Height; - Bit.width := vio_Width; - Bit.flow := TT_Flow_Up; - - if gray_level then - Bit.cols := Bit.width - else - Bit.cols := (Bit.width+7) div 8; - - Bit.size := Bit.rows * Bit.cols; - end; - -(******************************************************************* - * - * Function : Clear_Data - * - *****************************************************************) - - procedure Clear_Data; - begin - if gray_level then - fillchar( Bit.buffer^, Bit.size, gray_palette[0] ) - else - fillchar( Bit.buffer^, Bit.size, 0 ); - end; - -(******************************************************************* - * - * Function : Init_Engine - * - *****************************************************************) - - procedure Init_Engine( maxRes : Int ); - begin - Set_Raster_Area; - GetMem( Bit.buffer, Bit.size ); - Clear_Data; - end; - -(******************************************************************* - * - * Function : Reset_Scale - * - *****************************************************************) - - function Reset_Scale( res : Int ) : Boolean; - begin - error := TT_Set_Instance_Pointsize( instance, res ); - Reset_Scale := (error = TT_Err_Ok); - end; - - - procedure Split( Original : String; - var Base : String; - var Name : String ); - var - n : integer; - begin - n := length(Original); - - while ( n > 0 ) do - if ( Original[n] = '\' ) or - ( Original[n] = '/' ) then - begin - Base := Copy( Original, 1, n-1 ); - Name := Copy( Original, n+1, length(Original) ); - exit; - end - else - dec(n); - - Base := ''; - Name := Original; - end; - -(******************************************************************* - * - * Function : LoadTrueTypeChar - * - * Description : Loads a single glyph into the xcoord, ycoord and - * flag arrays, from the instance data. - * - *****************************************************************) - -Function LoadTrueTypeChar( index : integer; - hint : boolean ) : boolean; -var - j, load_flag : int; - - result : TT_Error; - -begin - LoadTrueTypeChar := True; - - if hint then load_flag := TT_Load_Scale_Glyph or TT_Load_Hint_Glyph - else load_flag := TT_Load_Scale_Glyph; - - result := TT_Load_Glyph( instance, - glyph, - index, - load_flag ); - if result <> TT_Err_Ok then - exit; - - LoadTrueTypeChar := False; -end; - - -var - Error_String : String; - ine : Int; - -procedure Dump_AW( _face : TT_Face ); -var - i, j, n : integer; - - x, y : longint; - - start_x, - start_y, - step_x, - step_y : longint; - - fail : Int; - face : PFace; - - rec : PHdmx_Record; - -begin - - face := PFace(_face.z); - - rec := nil; - - for n := 0 to face^.hdmx.num_records-1 do - if face^.hdmx.records^[n].ppem = imetrics.x_ppem then - rec := @face^.hdmx.records^[n]; - - if rec = nil then - begin - Writeln('Pas de hdmx record pour ', imetrics.x_ppem, ' ppem'); - exit; - end; - - ine := 0; - while ine < num_glyphs do - begin - - if not LoadTrueTypeChar( ine, true ) then - begin - - TT_Get_Glyph_Metrics( glyph, metrics ); - - x := metrics.advance div 64; - - if rec^.widths^[ine] <> x then - begin - Write( '(',ine:3,':',rec^.widths^[ine]:2,' ',x:2,')' ); - end; - end; - - inc( ine ); - end; - Writeln; - Writeln; -end; - - - -procedure Erreur( s : String ); -begin - Restore_Screen; - Writeln( 'Error : ', s, ', error code = ', error ); - Halt(1); -end; - - -procedure Usage; -begin - Writeln('Simple TrueType Glyphs viewer - part of the FreeType project' ); - Writeln; - Writeln('Usage : ',paramStr(0),' FontName[.TTF]'); - Halt(1); -end; - - - -var - i: integer; - heure, - min1, - min2, - sec1, - sec2, - cent1, - cent2 : -{$IFDEF OS2} - longint; -{$ELSE} - word; -{$ENDIF} - - C : Char; - - Filename : String; - -label Fin; - -var - Fail : Int; - glyphStr : String[4]; - ev : Event; - - Code : Int; - - init_memory, end_memory : LongInt; - - num_args : Integer; - point_size : Integer; - num_files : Integer; - cur_file : Integer; - first_arg : Int; - sortie : Boolean; - - base : string; - name : string; - - SRec : SearchRec; - -begin - TextMode( co80+Font8x8 ); - - TT_Init_FreeType; - - num_args := ParamCount; - - if num_args = 0 then - Usage; - - first_arg := 1; - - gray_level := False; - - if ParamStr(first_arg) = '-g' then - begin - inc( first_arg ); - gray_level := True; - end; - - if first_arg > num_args+1 then - Usage; - - val( ParamStr(first_arg), point_size, Code ); - if Code <> 0 then - point_size := 24 - else - inc( first_arg ); - - num_files := 0; - - while first_arg <= num_args do - begin - Split( ParamStr(first_arg), base, name ); - if base <> '' then - base := base + '\'; - - FindFirst( base+name, Archive+ReadOnly+Hidden, SRec ); - if DosError <> 0 then - FindFirst( base+name+'.ttf', AnyFile, SRec ); - - while (DosError = 0) and (num_files < Max_Files) do - begin - GetMem( filenames[num_files], length(base)+length(SRec.Name)+1 ); - filenames[num_files]^ := base + SRec.Name; - inc( num_files ); - FindNext( SRec ); - end; - - {$IFDEF OS2} - FindClose( SRec ); - {$ENDIF} - inc( first_arg ); - end; - - cur_file := 0; - - if num_files = 0 then - begin - Writeln('Could not find file(s)'); - Halt(3); - end; - -(* - if gray_level then - begin - if not Set_Graph_Screen( Graphics_Mode_Gray ) then - Erreur( 'could not set grayscale graphics mode' ); - end - else - begin - if not Set_Graph_Screen( Graphics_Mode_Mono ) then - Erreur( 'could not set mono graphics mode' ); - end; -*) - - Init_Engine( point_size ); - - repeat - - FileName := Filenames[cur_file]^; - - if Pos('.',FileName) = 0 then FileName:=FileName+'.TTF'; - - error := TT_Open_Face( filename, face ); - if error <> TT_Err_Ok then - Erreur( 'Could not open '+filename ); - - TT_Get_Face_Properties( face, props ); - - num_glyphs := props.num_Glyphs; - - i := length(FileName); - while (i > 1) and (FileName[i] <> '\') do dec(i); - - FileName := Copy( FileName, i+1, length(FileName) ); - - error := TT_New_Glyph( face, glyph ); - if error <> TT_Err_Ok then - Erreur('Could not create glyph container'); - - error := TT_New_Instance( face, instance ); - if error <> TT_Err_Ok then - Erreur('Could not create instance'); - - Rotation := 0; - Fail := 0; - res := point_size; - scan_type := 2; - - if ( gray_level ) then scale_shift := 1 - else scale_shift := 0; - - Reset_Scale( res ); - - display_outline := true; - hint_glyph := true; - - old_glyph := -1; - old_res := res; - cur_glyph := 0; - - sortie := false; - - Repeat - -(* - if Render_ABC( cur_glyph ) then - inc( Fail ) - else - Display_Bitmap_On_Screen( Bit.Buffer^, Bit.rows, Bit.cols ); - - Clear_Data; - - Print_XY( 0, 0, FileName ); - - TT_Get_Instance_Metrics( instance, imetrics ); - - Print_Str(' point size = '); - Str( imetrics.pointSize:3, glyphStr ); - Print_Str( glyphStr ); - - Print_Str(' glyph = '); - Str( cur_glyph, glyphStr ); - Print_Str( glyphStr ); - - Print_XY( 0, 1, 'Hinting (''z'') : ' ); - if hint_glyph then Print_Str('on ') - else Print_Str('off'); - - Print_XY( 0, 2, 'scan type(''e'') : ' ); - case scan_type of - 0 : Print_Str('none '); - 1 : Print_Str('level 1'); - 2 : Print_Str('level 2'); - 4 : Print_Str('level 4'); - 5 : Print_Str('level 5'); - end; -*) - TT_Get_Instance_Metrics( instance, imetrics ); - Writeln( Filename,' ',imetrics.pointsize,' pts = ',imetrics.x_ppem,' ppem' ); - - Dump_AW( face ); - - Get_Event(ev); - - case ev.what of - - event_Quit : goto Fin; - - event_Keyboard : case char(ev.info) of - - 'n' : begin - sortie := true; - if cur_file+1 < num_files then - inc( cur_file ); - end; - - 'p' : begin - sortie := true; - if cur_file > 1 then - dec( cur_file ); - end; - - 'z' : hint_glyph := not hint_glyph; - - - 'e' : begin - inc( scan_type ); - if scan_type = 3 then scan_type := 4; - if scan_type >= 6 then scan_type := 0; - end; - end; - - event_Scale_Glyph : begin - inc( res, ev.info ); - if res < 1 then res := 1; - if res > 1400 then res := 1400; - end; - - event_Change_Glyph : begin - inc( cur_glyph, ev.info ); - if cur_glyph < 0 then cur_glyph := 0; - if cur_glyph >= num_glyphs - then cur_glyph := num_glyphs-1; - end; - end; - - if res <> old_res then - begin - if not Reset_Scale(res) then - Erreur( 'Could not resize font' ); - old_res := res; - end; - - Until sortie; - - TT_Done_Glyph( glyph ); - TT_Close_Face( face ); - - until false; - - Fin: - Restore_Screen; - - Writeln; - Writeln('Fails : ', Fail ); - - TT_Done_FreeType; -end. - Index: xc/extras/FreeType/pascal/test/gdriver.pas diff -u xc/extras/FreeType/pascal/test/gdriver.pas:1.1.1.1 xc/extras/FreeType/pascal/test/gdriver.pas:removed --- xc/extras/FreeType/pascal/test/gdriver.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/gdriver.pas Wed Mar 16 20:59:47 2005 @@ -1,123 +0,0 @@ -(******************************************************************* - * - * gdriver : Graphics utility driver generic interface 1.1 - * - * Generic interface for all drivers of the graphics utility used - * by the FreeType test programs. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -Unit GDriver; - -interface - -uses GEvents, GMain; - - (* Note that we now support an event based model, even with */ - /* full-screen modes. It is the responsability of the driver */ - /* to map its events to the TEvent structure when called */ - /* through Get_Event *) - -type - Event = record - what : GEvent; (* event class *) - info : Int; (* event parameter *) - end; - - (* the event classes are defined in the file 'gevents.h' included *) - (* by the test programs, not by the graphics utility *) - - procedure Get_Event( var ev : Event ); - (* get last event. In full-screen modes, a key-stroke must be */ - /* translated to an event class with a parameter. *) - - function Driver_Set_Graphics( mode : Int ) : boolean; - (* A call to this function must set the graphics mode, the Vio *) - (* variable, as well as the values vio_ScanLineWidth, vio_Width *) - (* and vio_Height *) - - function Driver_Restore_Mode : boolean; - (* Restore previous mode or release display buffer/window *) - - procedure Driver_Display_Bitmap( var buff; line, col : Int ); - (* Display bitmap on screen *) - -implementation - -{$IFDEF OS2} - - uses Os2Base, CRT; - {$I GDRV_OS2.INC} - -{$ELSE} - - uses CRT; - {$I GDRV_DOS.INC} - -{$ENDIF} - -type - Translator = record - key : char; - ev_class : GEvent; - ev_info : Int; - end; - -const - Num_Translators = 15; - - Translators : array[1..Num_Translators] of Translator - = ( - (key:#27; ev_class:event_Quit ; ev_info:0), - - (key:'x'; ev_class: event_Rotate_Glyph; ev_info: -1), - (key:'c'; ev_class: event_Rotate_Glyph; ev_info: 1), - (key:'v'; ev_class: event_Rotate_Glyph; ev_info: -16), - (key:'b'; ev_class: event_Rotate_Glyph; ev_info: 16), - - (key:'9'; ev_class: event_Change_Glyph; ev_info:-100), - (key:'0'; ev_class: event_Change_Glyph; ev_info: 100), - (key:'i'; ev_class: event_Change_Glyph; ev_info: -10), - (key:'o'; ev_class: event_Change_Glyph; ev_info: 10), - (key:'k'; ev_class: event_Change_Glyph; ev_info: -1), - (key:'l'; ev_class: event_Change_Glyph; ev_info: 1), - - (key:'+'; ev_class: event_Scale_Glyph; ev_info: 10), - (key:'-'; ev_class: event_Scale_Glyph; ev_info: -10), - (key:'u'; ev_class: event_Scale_Glyph; ev_info: 1), - (key:'j'; ev_class: event_Scale_Glyph; ev_info: -1) - ); - - procedure Get_Event( var ev : Event ); - var - i : Int; - c : char; - begin - c := ReadKey; - - for i := 1 to Num_Translators do - begin - if c = translators[i].key then - begin - ev.what := translators[i].ev_class; - ev.info := translators[i].ev_info; - exit; - end; - end; - - (* unrecognized keystroke *) - - ev.what := event_Keyboard; - ev.info := Int(c); - end; - -end. - Index: xc/extras/FreeType/pascal/test/gdrv_dos.inc diff -u xc/extras/FreeType/pascal/test/gdrv_dos.inc:1.1.1.1 xc/extras/FreeType/pascal/test/gdrv_dos.inc:removed --- xc/extras/FreeType/pascal/test/gdrv_dos.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/gdrv_dos.inc Wed Mar 16 20:59:47 2005 @@ -1,96 +0,0 @@ - - { Restores screen to the original state } - - function Driver_Restore_Mode: boolean; - begin - asm - mov ax, $0003 - int $10 - end; - Driver_Restore_Mode := True; - end; - - function Driver_Set_Graphics( mode : Int ) : boolean; - var - rc : Int; - begin - Driver_Set_Graphics := False; - - rc := 0; - - case Mode of - - Graphics_Mode_Mono : begin - asm - mov ax, $0012 - int $10 - end; - Vio_ScanLineWidth := 80; - Vio_Width := 640; - Vio_Height := 480; - end; - - Graphics_Mode_Gray : begin - asm - mov ax, $0013 - int $10 - end; - Vio_ScanLineWidth := 320; - Vio_Width := 320; - Vio_Height := 200; - - (* default gray palette takes the gray levels *) - (* the standard VGA 256 colors mode *) - - gray_palette[0] := 0; - gray_palette[1] := 23; - gray_palette[2] := 27; - gray_palette[3] := 29; - gray_palette[4] := 31; - end; - else - rc := -1; - end; - - if rc <> 0 then exit; - - Vio := @Mem[$A000:0]; - - Driver_Set_Graphics := True; - end; - - - procedure Driver_Display_Bitmap; assembler; - asm - push ds - push bp - - les di, [Vio] - - cld - - mov cx,[Vio_ScanLineWidth] - mov bx,[col] - mov ax,[line] - dec ax - mul cx - add di,ax - mov dx,[line] - - lds si,[Buff] - - mov bp,bx - add bx,cx - - @1: - mov cx,bp - rep movsb - sub di,bx - dec dx - jnz @1 - - pop bp - pop ds - end; - - Index: xc/extras/FreeType/pascal/test/gdrv_os2.inc diff -u xc/extras/FreeType/pascal/test/gdrv_os2.inc:1.1.1.1 xc/extras/FreeType/pascal/test/gdrv_os2.inc:removed --- xc/extras/FreeType/pascal/test/gdrv_os2.inc:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/gdrv_os2.inc Wed Mar 16 20:59:47 2005 @@ -1,148 +0,0 @@ - - {$IFDEF DYNAMIC_VERSION} - {$Dynamic System} - {$L VPRTL.LIB} - {$ENDIF} - - - type - Ptr16Rec = record - Ofs,Sel: SmallWord; - end; - - var - OrgMode : VioModeInfo; - VioBufOfs : Longint; - Status : SmallWord; - - { BIOS Video Mode -#13 } - - const - VioMode_640x480x16 : VioModeInfo = - ( cb: SizeOf(VioModeInfo); - fbType: vgmt_Other + vgmt_Graphics; - Color: colors_16; - Col: 80; - Row: 35; - HRes: 640; - VRes: 480 - ); - - VioMode_320x200x256 : VioModeInfo = - ( cb: SizeOf(VioModeInfo); - fbType: vgmt_Other + vgmt_Graphics; - Color: colors_256; - Col: 40; - Row: 25; - HRes: 320; - VRes: 200 - ); - - VioBuf: VioPhysBuf = - ( pBuf: Ptr($A0000); - cb: 64*1024 - ); - - { Restores screen to the original state } - - function Driver_Restore_Mode: boolean; - begin - VioSetMode(OrgMode, 0); - Driver_Restore_Mode := True; - end; - - function Driver_Set_Graphics( mode : Int ) - : boolean; - var - rc : Int; - begin - Driver_Set_Graphics := False; - - { Save original video mode } - OrgMode.cb := SizeOf(VioModeInfo); - VioGetMode(OrgMode, 0); - - case Mode of - - Graphics_Mode_Mono : begin - rc := VioSetMode( VioMode_640x480x16, 0 ); - Vio_ScanLineWidth := 80; - Vio_Width := 640; - Vio_Height := 480; - end; - - Graphics_Mode_Gray : begin - rc := VioSetMode( VioMode_320x200x256, 0 ); - Vio_ScanLineWidth := 320; - Vio_Width := 320; - Vio_Height := 200; - - (* default gray palette takes the gray levels *) - (* the standard VGA 256 colors mode *) - - gray_palette[0] := 0; - gray_palette[1] := 23; - gray_palette[2] := 27; - gray_palette[3] := 29; - gray_palette[4] := 31; - end; - else - rc := -1; - end; - - { Set VGA 640x400x16 - video mode } - if rc <> 0 then exit; - - { Get selector for physical video buffer } - if VioGetPhysBuf(VioBuf, 0) <> 0 then exit; - - { Make flat pointer that points to the physical video buffer} - Ptr16Rec(VioBufOfs).Ofs := 0; - Ptr16Rec(VioBufOfs).Sel := VioBuf.Sel; - SelToFlat(Pointer(VioBufOfs)); - - { Clear the screen. Unlike function 0 of the BIOS INT 10h } - { VioSetMode doesn't clear the screen. } - FillChar(Pointer(VioBufOfs)^,64*1024,0); - Vio := PVioScreenBuffer(VioBufOfs); - - Driver_Set_Graphics := True; - end; - - - procedure Driver_Display_Bitmap; assembler; - asm - push esi - push edi - push ebx - push ecx - - mov esi,[Buff] - - mov ecx,[Vio_ScanLineWidth] - mov ebx,[Col] - mov eax,[Line] - - dec eax - mul ecx - - mov edi,[VioBufOfs] - add edi,eax - - mov edx,[line] - add ebx,[Vio_ScanLineWidth] - @1: - mov ecx,[col] - rep movsb - sub edi,ebx - dec edx - jnz @1 - - pop ecx - pop ebx - pop edi - pop esi - end; - Index: xc/extras/FreeType/pascal/test/gevents.pas diff -u xc/extras/FreeType/pascal/test/gevents.pas:1.1.1.1 xc/extras/FreeType/pascal/test/gevents.pas:removed --- xc/extras/FreeType/pascal/test/gevents.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/gevents.pas Wed Mar 16 20:59:47 2005 @@ -1,42 +0,0 @@ -(******************************************************************* - * - * gevents test programs events definition 1.1 - * - * This file defines the events used by the FreeType test programs - * It is _not_ included by 'gmain.c'. This file is also used by the - * drivers to translate their own events in GEvents. - * - * Not a very good design, but we're not rewriting X.. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -Unit GEvents; - -interface - -type - GEvent = ( - event_None, - event_Quit, (* Quit program *) - - event_Keyboard, (* unknown keystroke *) - - event_Change_Glyph, - event_Rotate_Glyph, - event_Scale_Glyph, - - event_Change_ScanType, - event_Change_Instructions - ); - -implementation - -end. Index: xc/extras/FreeType/pascal/test/gmain.pas diff -u xc/extras/FreeType/pascal/test/gmain.pas:1.1.1.1 xc/extras/FreeType/pascal/test/gmain.pas:removed --- xc/extras/FreeType/pascal/test/gmain.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/gmain.pas Wed Mar 16 20:59:47 2005 @@ -1,474 +0,0 @@ -(******************************************************************* - * - * gmain graphics utility main interface 1.1 - * - * This file defines a common interface, implemented in the body - * file 'gmain.c'. It relies on system dependent driver files, - * like 'gfs_os.c', whose interface is described in 'gdriver.h'. - * - * Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************) - -Unit GMain; - -interface - -const - Graphics_Mode_Mono = 1; - Graphics_Mode_Gray = 2; - -type - TVioScreenBuffer = array[0..0] of Byte; - PVioScreenBuffer = ^TVioScreenBuffer; - -{$IFDEF OS2} - Int = LongInt; -{$ELSE} - Int = Integer; -{$ENDIF} - -var - - Vio : PVioScreenBuffer; - (* pointer to VRAM or display buffer *) - - vio_ScanLineWidth : Int; - vio_Width : Int; - vio_Height : Int; - - gray_palette : array[0..4] of Byte; (* gray palette *) - - gcursor_x : int; - gcursor_y : int; - - gwindow_width : int; - gwindow_height : int; - - function Set_Graph_Screen( mode : int ) : boolean; - (* Set a Graphics Mode, chosen from the Graphics_Mode_xxx list *) - - function Restore_Screen : boolean; - (* Restore a previous ( or text ) video mode *) - - procedure Display_Bitmap_On_Screen( var buff; line, col : Int ); - (* display bitmap of 'line' line, and 'col' columns ( each *) - (* column mode of 1 byte *) - - procedure Goto_XY( x, y : int ); - - procedure Print_Str( str : string ); - - procedure Print_XY ( x, y : int; str : string ); - -implementation - -uses GDriver; - - type - TFunction_8x8 = procedure( x, y : Int; c : char ); - - TByte = array[0..0] of Byte; - PByte = ^TByte; - - var - Current_Mode : Byte; - Print_8x8 : TFunction_8x8; - - const - Font_8x8 : array[0..2047] of Byte - = ( - $00, $00, $00, $00, $00, $00, $00, $00, - $7E, $81, $A5, $81, $BD, $99, $81, $7E, - $7E, $FF, $DB, $FF, $C3, $E7, $FF, $7E, - $6C, $FE, $FE, $FE, $7C, $38, $10, $00, - $10, $38, $7C, $FE, $7C, $38, $10, $00, - $38, $7C, $38, $FE, $FE, $92, $10, $7C, - $00, $10, $38, $7C, $FE, $7C, $38, $7C, - $00, $00, $18, $3C, $3C, $18, $00, $00, - $FF, $FF, $E7, $C3, $C3, $E7, $FF, $FF, - $00, $3C, $66, $42, $42, $66, $3C, $00, - $FF, $C3, $99, $BD, $BD, $99, $C3, $FF, - $0F, $07, $0F, $7D, $CC, $CC, $CC, $78, - $3C, $66, $66, $66, $3C, $18, $7E, $18, - $3F, $33, $3F, $30, $30, $70, $F0, $E0, - $7F, $63, $7F, $63, $63, $67, $E6, $C0, - $99, $5A, $3C, $E7, $E7, $3C, $5A, $99, - $80, $E0, $F8, $FE, $F8, $E0, $80, $00, - $02, $0E, $3E, $FE, $3E, $0E, $02, $00, - $18, $3C, $7E, $18, $18, $7E, $3C, $18, - $66, $66, $66, $66, $66, $00, $66, $00, - $7F, $DB, $DB, $7B, $1B, $1B, $1B, $00, - $3E, $63, $38, $6C, $6C, $38, $86, $FC, - $00, $00, $00, $00, $7E, $7E, $7E, $00, - $18, $3C, $7E, $18, $7E, $3C, $18, $FF, - $18, $3C, $7E, $18, $18, $18, $18, $00, - $18, $18, $18, $18, $7E, $3C, $18, $00, - $00, $18, $0C, $FE, $0C, $18, $00, $00, - $00, $30, $60, $FE, $60, $30, $00, $00, - $00, $00, $C0, $C0, $C0, $FE, $00, $00, - $00, $24, $66, $FF, $66, $24, $00, $00, - $00, $18, $3C, $7E, $FF, $FF, $00, $00, - $00, $FF, $FF, $7E, $3C, $18, $00, $00, - $00, $00, $00, $00, $00, $00, $00, $00, - $18, $3C, $3C, $18, $18, $00, $18, $00, - $6C, $6C, $6C, $00, $00, $00, $00, $00, - $6C, $6C, $FE, $6C, $FE, $6C, $6C, $00, - $18, $7E, $C0, $7C, $06, $FC, $18, $00, - $00, $C6, $CC, $18, $30, $66, $C6, $00, - $38, $6C, $38, $76, $DC, $CC, $76, $00, - $30, $30, $60, $00, $00, $00, $00, $00, - $18, $30, $60, $60, $60, $30, $18, $00, - $60, $30, $18, $18, $18, $30, $60, $00, - $00, $66, $3C, $FF, $3C, $66, $00, $00, - $00, $18, $18, $7E, $18, $18, $00, $00, - $00, $00, $00, $00, $00, $18, $18, $30, - $00, $00, $00, $7E, $00, $00, $00, $00, - $00, $00, $00, $00, $00, $18, $18, $00, - $06, $0C, $18, $30, $60, $C0, $80, $00, - $7C, $CE, $DE, $F6, $E6, $C6, $7C, $00, - $30, $70, $30, $30, $30, $30, $FC, $00, - $78, $CC, $0C, $38, $60, $CC, $FC, $00, - $78, $CC, $0C, $38, $0C, $CC, $78, $00, - $1C, $3C, $6C, $CC, $FE, $0C, $1E, $00, - $FC, $C0, $F8, $0C, $0C, $CC, $78, $00, - $38, $60, $C0, $F8, $CC, $CC, $78, $00, - $FC, $CC, $0C, $18, $30, $30, $30, $00, - $78, $CC, $CC, $78, $CC, $CC, $78, $00, - $78, $CC, $CC, $7C, $0C, $18, $70, $00, - $00, $18, $18, $00, $00, $18, $18, $00, - $00, $18, $18, $00, $00, $18, $18, $30, - $18, $30, $60, $C0, $60, $30, $18, $00, - $00, $00, $7E, $00, $7E, $00, $00, $00, - $60, $30, $18, $0C, $18, $30, $60, $00, - $3C, $66, $0C, $18, $18, $00, $18, $00, - $7C, $C6, $DE, $DE, $DC, $C0, $7C, $00, - $30, $78, $CC, $CC, $FC, $CC, $CC, $00, - $FC, $66, $66, $7C, $66, $66, $FC, $00, - $3C, $66, $C0, $C0, $C0, $66, $3C, $00, - $F8, $6C, $66, $66, $66, $6C, $F8, $00, - $FE, $62, $68, $78, $68, $62, $FE, $00, - $FE, $62, $68, $78, $68, $60, $F0, $00, - $3C, $66, $C0, $C0, $CE, $66, $3A, $00, - $CC, $CC, $CC, $FC, $CC, $CC, $CC, $00, - $78, $30, $30, $30, $30, $30, $78, $00, - $1E, $0C, $0C, $0C, $CC, $CC, $78, $00, - $E6, $66, $6C, $78, $6C, $66, $E6, $00, - $F0, $60, $60, $60, $62, $66, $FE, $00, - $C6, $EE, $FE, $FE, $D6, $C6, $C6, $00, - $C6, $E6, $F6, $DE, $CE, $C6, $C6, $00, - $38, $6C, $C6, $C6, $C6, $6C, $38, $00, - $FC, $66, $66, $7C, $60, $60, $F0, $00, - $7C, $C6, $C6, $C6, $D6, $7C, $0E, $00, - $FC, $66, $66, $7C, $6C, $66, $E6, $00, - $7C, $C6, $E0, $78, $0E, $C6, $7C, $00, - $FC, $B4, $30, $30, $30, $30, $78, $00, - $CC, $CC, $CC, $CC, $CC, $CC, $FC, $00, - $CC, $CC, $CC, $CC, $CC, $78, $30, $00, - $C6, $C6, $C6, $C6, $D6, $FE, $6C, $00, - $C6, $C6, $6C, $38, $6C, $C6, $C6, $00, - $CC, $CC, $CC, $78, $30, $30, $78, $00, - $FE, $C6, $8C, $18, $32, $66, $FE, $00, - $78, $60, $60, $60, $60, $60, $78, $00, - $C0, $60, $30, $18, $0C, $06, $02, $00, - $78, $18, $18, $18, $18, $18, $78, $00, - $10, $38, $6C, $C6, $00, $00, $00, $00, - $00, $00, $00, $00, $00, $00, $00, $FF, - $30, $30, $18, $00, $00, $00, $00, $00, - $00, $00, $78, $0C, $7C, $CC, $76, $00, - $E0, $60, $60, $7C, $66, $66, $DC, $00, - $00, $00, $78, $CC, $C0, $CC, $78, $00, - $1C, $0C, $0C, $7C, $CC, $CC, $76, $00, - $00, $00, $78, $CC, $FC, $C0, $78, $00, - $38, $6C, $64, $F0, $60, $60, $F0, $00, - $00, $00, $76, $CC, $CC, $7C, $0C, $F8, - $E0, $60, $6C, $76, $66, $66, $E6, $00, - $30, $00, $70, $30, $30, $30, $78, $00, - $0C, $00, $1C, $0C, $0C, $CC, $CC, $78, - $E0, $60, $66, $6C, $78, $6C, $E6, $00, - $70, $30, $30, $30, $30, $30, $78, $00, - $00, $00, $CC, $FE, $FE, $D6, $D6, $00, - $00, $00, $B8, $CC, $CC, $CC, $CC, $00, - $00, $00, $78, $CC, $CC, $CC, $78, $00, - $00, $00, $DC, $66, $66, $7C, $60, $F0, - $00, $00, $76, $CC, $CC, $7C, $0C, $1E, - $00, $00, $DC, $76, $62, $60, $F0, $00, - $00, $00, $7C, $C0, $70, $1C, $F8, $00, - $10, $30, $FC, $30, $30, $34, $18, $00, - $00, $00, $CC, $CC, $CC, $CC, $76, $00, - $00, $00, $CC, $CC, $CC, $78, $30, $00, - $00, $00, $C6, $C6, $D6, $FE, $6C, $00, - $00, $00, $C6, $6C, $38, $6C, $C6, $00, - $00, $00, $CC, $CC, $CC, $7C, $0C, $F8, - $00, $00, $FC, $98, $30, $64, $FC, $00, - $1C, $30, $30, $E0, $30, $30, $1C, $00, - $18, $18, $18, $00, $18, $18, $18, $00, - $E0, $30, $30, $1C, $30, $30, $E0, $00, - $76, $DC, $00, $00, $00, $00, $00, $00, - $00, $10, $38, $6C, $C6, $C6, $FE, $00, - $7C, $C6, $C0, $C6, $7C, $0C, $06, $7C, - $00, $CC, $00, $CC, $CC, $CC, $76, $00, - $1C, $00, $78, $CC, $FC, $C0, $78, $00, - $7E, $81, $3C, $06, $3E, $66, $3B, $00, - $CC, $00, $78, $0C, $7C, $CC, $76, $00, - $E0, $00, $78, $0C, $7C, $CC, $76, $00, - $30, $30, $78, $0C, $7C, $CC, $76, $00, - $00, $00, $7C, $C6, $C0, $78, $0C, $38, - $7E, $81, $3C, $66, $7E, $60, $3C, $00, - $CC, $00, $78, $CC, $FC, $C0, $78, $00, - $E0, $00, $78, $CC, $FC, $C0, $78, $00, - $CC, $00, $70, $30, $30, $30, $78, $00, - $7C, $82, $38, $18, $18, $18, $3C, $00, - $E0, $00, $70, $30, $30, $30, $78, $00, - $C6, $10, $7C, $C6, $FE, $C6, $C6, $00, - $30, $30, $00, $78, $CC, $FC, $CC, $00, - $1C, $00, $FC, $60, $78, $60, $FC, $00, - $00, $00, $7F, $0C, $7F, $CC, $7F, $00, - $3E, $6C, $CC, $FE, $CC, $CC, $CE, $00, - $78, $84, $00, $78, $CC, $CC, $78, $00, - $00, $CC, $00, $78, $CC, $CC, $78, $00, - $00, $E0, $00, $78, $CC, $CC, $78, $00, - $78, $84, $00, $CC, $CC, $CC, $76, $00, - $00, $E0, $00, $CC, $CC, $CC, $76, $00, - $00, $CC, $00, $CC, $CC, $7C, $0C, $F8, - $C3, $18, $3C, $66, $66, $3C, $18, $00, - $CC, $00, $CC, $CC, $CC, $CC, $78, $00, - $18, $18, $7E, $C0, $C0, $7E, $18, $18, - $38, $6C, $64, $F0, $60, $E6, $FC, $00, - $CC, $CC, $78, $30, $FC, $30, $FC, $30, - $F8, $CC, $CC, $FA, $C6, $CF, $C6, $C3, - $0E, $1B, $18, $3C, $18, $18, $D8, $70, - $1C, $00, $78, $0C, $7C, $CC, $76, $00, - $38, $00, $70, $30, $30, $30, $78, $00, - $00, $1C, $00, $78, $CC, $CC, $78, $00, - $00, $1C, $00, $CC, $CC, $CC, $76, $00, - $00, $F8, $00, $B8, $CC, $CC, $CC, $00, - $FC, $00, $CC, $EC, $FC, $DC, $CC, $00, - $3C, $6C, $6C, $3E, $00, $7E, $00, $00, - $38, $6C, $6C, $38, $00, $7C, $00, $00, - $18, $00, $18, $18, $30, $66, $3C, $00, - $00, $00, $00, $FC, $C0, $C0, $00, $00, - $00, $00, $00, $FC, $0C, $0C, $00, $00, - $C6, $CC, $D8, $36, $6B, $C2, $84, $0F, - $C3, $C6, $CC, $DB, $37, $6D, $CF, $03, - $18, $00, $18, $18, $3C, $3C, $18, $00, - $00, $33, $66, $CC, $66, $33, $00, $00, - $00, $CC, $66, $33, $66, $CC, $00, $00, - $22, $88, $22, $88, $22, $88, $22, $88, - $55, $AA, $55, $AA, $55, $AA, $55, $AA, - $DB, $F6, $DB, $6F, $DB, $7E, $D7, $ED, - $18, $18, $18, $18, $18, $18, $18, $18, - $18, $18, $18, $18, $F8, $18, $18, $18, - $18, $18, $F8, $18, $F8, $18, $18, $18, - $36, $36, $36, $36, $F6, $36, $36, $36, - $00, $00, $00, $00, $FE, $36, $36, $36, - $00, $00, $F8, $18, $F8, $18, $18, $18, - $36, $36, $F6, $06, $F6, $36, $36, $36, - $36, $36, $36, $36, $36, $36, $36, $36, - $00, $00, $FE, $06, $F6, $36, $36, $36, - $36, $36, $F6, $06, $FE, $00, $00, $00, - $36, $36, $36, $36, $FE, $00, $00, $00, - $18, $18, $F8, $18, $F8, $00, $00, $00, - $00, $00, $00, $00, $F8, $18, $18, $18, - $18, $18, $18, $18, $1F, $00, $00, $00, - $18, $18, $18, $18, $FF, $00, $00, $00, - $00, $00, $00, $00, $FF, $18, $18, $18, - $18, $18, $18, $18, $1F, $18, $18, $18, - $00, $00, $00, $00, $FF, $00, $00, $00, - $18, $18, $18, $18, $FF, $18, $18, $18, - $18, $18, $1F, $18, $1F, $18, $18, $18, - $36, $36, $36, $36, $37, $36, $36, $36, - $36, $36, $37, $30, $3F, $00, $00, $00, - $00, $00, $3F, $30, $37, $36, $36, $36, - $36, $36, $F7, $00, $FF, $00, $00, $00, - $00, $00, $FF, $00, $F7, $36, $36, $36, - $36, $36, $37, $30, $37, $36, $36, $36, - $00, $00, $FF, $00, $FF, $00, $00, $00, - $36, $36, $F7, $00, $F7, $36, $36, $36, - $18, $18, $FF, $00, $FF, $00, $00, $00, - $36, $36, $36, $36, $FF, $00, $00, $00, - $00, $00, $FF, $00, $FF, $18, $18, $18, - $00, $00, $00, $00, $FF, $36, $36, $36, - $36, $36, $36, $36, $3F, $00, $00, $00, - $18, $18, $1F, $18, $1F, $00, $00, $00, - $00, $00, $1F, $18, $1F, $18, $18, $18, - $00, $00, $00, $00, $3F, $36, $36, $36, - $36, $36, $36, $36, $FF, $36, $36, $36, - $18, $18, $FF, $18, $FF, $18, $18, $18, - $18, $18, $18, $18, $F8, $00, $00, $00, - $00, $00, $00, $00, $1F, $18, $18, $18, - $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, - $00, $00, $00, $00, $FF, $FF, $FF, $FF, - $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, - $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, - $FF, $FF, $FF, $FF, $00, $00, $00, $00, - $00, $00, $76, $DC, $C8, $DC, $76, $00, - $00, $78, $CC, $F8, $CC, $F8, $C0, $C0, - $00, $FC, $CC, $C0, $C0, $C0, $C0, $00, - $00, $00, $FE, $6C, $6C, $6C, $6C, $00, - $FC, $CC, $60, $30, $60, $CC, $FC, $00, - $00, $00, $7E, $D8, $D8, $D8, $70, $00, - $00, $66, $66, $66, $66, $7C, $60, $C0, - $00, $76, $DC, $18, $18, $18, $18, $00, - $FC, $30, $78, $CC, $CC, $78, $30, $FC, - $38, $6C, $C6, $FE, $C6, $6C, $38, $00, - $38, $6C, $C6, $C6, $6C, $6C, $EE, $00, - $1C, $30, $18, $7C, $CC, $CC, $78, $00, - $00, $00, $7E, $DB, $DB, $7E, $00, $00, - $06, $0C, $7E, $DB, $DB, $7E, $60, $C0, - $38, $60, $C0, $F8, $C0, $60, $38, $00, - $78, $CC, $CC, $CC, $CC, $CC, $CC, $00, - $00, $7E, $00, $7E, $00, $7E, $00, $00, - $18, $18, $7E, $18, $18, $00, $7E, $00, - $60, $30, $18, $30, $60, $00, $FC, $00, - $18, $30, $60, $30, $18, $00, $FC, $00, - $0E, $1B, $1B, $18, $18, $18, $18, $18, - $18, $18, $18, $18, $18, $D8, $D8, $70, - $18, $18, $00, $7E, $00, $18, $18, $00, - $00, $76, $DC, $00, $76, $DC, $00, $00, - $38, $6C, $6C, $38, $00, $00, $00, $00, - $00, $00, $00, $18, $18, $00, $00, $00, - $00, $00, $00, $00, $18, $00, $00, $00, - $0F, $0C, $0C, $0C, $EC, $6C, $3C, $1C, - $58, $6C, $6C, $6C, $6C, $00, $00, $00, - $70, $98, $30, $60, $F8, $00, $00, $00, - $00, $00, $3C, $3C, $3C, $3C, $00, $00, - $00, $00, $00, $00, $00, $00, $00, $00 - ); - -{$F+} - procedure Print_8x8_Mono( x, y : Int; c : char ); - var - offset, i : Int; - bitm : PByte; - begin - offset := x + y*Vio_ScanLineWidth*8; - bitm := @Font_8x8[ ord(c)*8 ]; - - for i := 0 to 7 do - begin - Vio^[offset] := bitm^[i]; - inc( offset, Vio_ScanLineWidth ); - end; - end; - - procedure Print_8x8_Gray( x, y : Int; c : char ); - var - offset, i, bit : Int; - - bitm : PByte; - begin - offset := ( x + y*Vio_ScanLineWidth )*8; - bitm := @font_8x8[ ord(c)*8 ]; - - for i := 0 to 7 do - begin - bit := $80; - while bit > 0 do - begin - if ( bit and bitm^[i] <> 0 ) then Vio^[offset] := $FF - else Vio^[offset] := $00; - bit := bit shr 1; - inc( offset ); - end; - - inc( offset, Vio_ScanLineWidth-8 ); - end; - - end; -{$F-} - - function Set_Graph_Screen( mode : Int ): boolean; - begin - Set_Graph_Screen := False; - - gcursor_x := 0; - gcursor_y := 0; - - case mode of - - Graphics_Mode_Mono : begin - if not Driver_Set_Graphics(mode) then exit; - gwindow_width := vio_ScanLineWidth; - gwindow_height := vio_Height div 8; - - Print_8x8 := Print_8x8_Mono; - end; - - Graphics_Mode_Gray : begin - if not Driver_Set_Graphics(mode) then exit; - gwindow_width := vio_ScanLineWidth div 8; - gwindow_height := vio_Height div 8; - - Print_8x8 := Print_8x8_Gray; - end; - else - exit; - end; - - Set_Graph_Screen := True; - end; - - - function Restore_Screen : boolean; - begin - gcursor_x := 0; - gcursor_y := 0; - - gwindow_height := 0; - gwindow_width := 0; - - Restore_Screen := Driver_Restore_Mode; - end; - - procedure Display_Bitmap_On_Screen; - begin - Driver_Display_Bitmap( buff, line, col ); - end; - - procedure Goto_XY( x, y : Int ); - begin - gcursor_x := x; - gcursor_y := y; - end; - - procedure Print_Str( str : string ); - var - i : Int; - begin - for i := 1 to length(str) do - begin - case str[i] of - - #13 : begin - gcursor_x := 0; - inc( gcursor_y ); - if gcursor_y > gwindow_height then gcursor_y := 0; - end; - else - Print_8x8( gcursor_x, gcursor_y, str[i] ); - inc( gcursor_x ); - if gcursor_x >= gwindow_width then - begin - gcursor_x := 0; - inc( gcursor_y ); - if gcursor_y >= gwindow_height then gcursor_y := 0; - end - end - end - end; - - procedure Print_XY( x, y : Int; str : string ); - begin - Goto_XY( x, y ); - Print_Str( str ); - end; - -end. - Index: xc/extras/FreeType/pascal/test/lint.pas diff -u xc/extras/FreeType/pascal/test/lint.pas:1.1.1.1 xc/extras/FreeType/pascal/test/lint.pas:removed --- xc/extras/FreeType/pascal/test/lint.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/lint.pas Wed Mar 16 20:59:47 2005 @@ -1,277 +0,0 @@ -{***************************************************************************} -{* *} -{* FreeType Font glyph programs checker *} -{* *} -{* *} -{* This small program will load a TrueType font file and try to *} -{* render it at a given point size. *} -{* *} -{* This version will also catch differences between the engine's *} -{* computed advance widths, and the pre-calc values found in the *} -{* "hdmx" table *} -{* *} -{* This source code has been compiled and run under both Virtual Pascal *} -{* on OS/2 and Borland's BP7. *} -{* *} -{***************************************************************************} - -program Abc; - -uses Crt, - Common, -{$IFDEF OS2} - Use32, -{$ENDIF} - FreeType, - TTObjs; - -const - Precis = 64; - Precis2 = Precis div 2; - - PrecisAux = 1024; - - Screen_Width = 640; - Screen_Height = 480; - Screen_Cols = Screen_Width div 8; - Screen_Size = Screen_Cols * Screen_Height; - - Grid_Width = Screen_Width div 8; - Grid_Height = Screen_Height div 8; - Grid_Cols = Grid_Width div 8; - Grid_Size = Grid_Cols * Grid_Height; - - Screen_Center_X = Screen_Width div 2; - Screen_Center_Y = Screen_Height div 2; - - Grid_Center_X = Grid_Width div 2; - Grid_Center_Y = Grid_Height div 2; - - Profile_Buff_Size = 64000; - -var - - res, old_res : integer; - - numPoints, numContours : integer; - - Bitmap_small : TT_Raster_Map; - Bitmap_big : TT_Raster_Map; - - Rotation : integer; (* Angle modulo 1024 *) - - num_glyphs : integer; - - face : TT_Face; - instance : TT_Instance; - glyph : TT_Glyph; - - metrics : TT_Glyph_Metrics; - imetrics : TT_Instance_Metrics; - - props : TT_Face_Properties; - - point_size : integer; - error : TT_Error; - - display_outline : boolean; - hint_glyph : boolean; - scan_type : Byte; - - old_glyph : integer; - - FOut : Text; - -(******************************************************************* - * - * Function : LoadTrueTypeChar - * - * Description : Loads a single glyph into the xcoord, ycoord and - * flag arrays, from the instance data. - * - *****************************************************************) - -Function LoadTrueTypeChar( index : integer; - hint : boolean ) : TT_Error; -var - j, load_flag : integer; - - result : TT_Error; - -begin - if hint then load_flag := TT_Load_Scale_Glyph or TT_Load_Hint_Glyph - else load_flag := TT_Load_Scale_Glyph; - - result := TT_Load_Glyph( instance, - glyph, - index, - load_flag ); - - LoadTrueTypeChar := result; -end; - - -procedure Usage; -begin - Writeln('Simple TrueType Glyphs viewer - part of the FreeType project' ); - Writeln; - Writeln('Usage : ',paramStr(0),' size fontname[.ttf] [fontname.. ]'); - Writeln; - Halt(1); -end; - - - -var i: integer; - heure, - min1, - min2, - sec1, - sec2, - cent1, - cent2 : -{$IFDEF OS2} - longint; -{$ELSE} - word; -{$ENDIF} - - C : Char; - - Filename : String; - -label Fin; - -var - Fail : Integer; - PtSize : Integer; - Param : Integer; - code : Integer; - glyphStr : String[4]; - cur_file : Integer; - valid : Boolean; - - Mem0 : Longint; - -label - Lopo; - -begin - - Mem0 := MemAvail; - - TT_Init_FreeType; - - if ParamCount < 2 then Usage; - - val( ParamStr(1), point_size, code ); - if code <> 0 then Usage; - - if ( point_size <= 0 ) then - begin - Writeln('Invalid argument : pointsize must be >= 1'); - Usage; - end; - - Expand_WildCards( 2, '.ttf' ); - - for cur_file := 0 to num_arguments-1 do - begin - - FileName := arguments[cur_file]^; - - if Pos('.',FileName) = 0 then FileName:=FileName+'.TTF'; - - Write( MemAvail:6, ' ' ); - - error := TT_Open_Face( filename, face ); - - i := length(FileName); - while (i > 1) and (FileName[i] <> '\') do dec(i); - FileName := Copy( FileName, i+1, length(FileName) ); - - Write( cur_file:3,' ', filename:12, ': ' ); - - if error <> TT_Err_Ok then - begin - Writeln( 'could not open file, error code = ', error ); - goto Lopo; - end; - - TT_Get_Face_Properties( face, props ); - num_glyphs := props.num_Glyphs; - - error := TT_New_Glyph( face, glyph ); - if error <> TT_Err_Ok then - begin - Writeln( 'could not create glyph, error code = ', - error ); - goto Lopo; - end; - - error := TT_New_Instance( face, instance ); - if error <> TT_Err_Ok then - begin - Writeln( 'could not create instance, error code = ', - error ); - goto Lopo; - end; - - error := TT_Set_Instance_PointSize( instance, point_size ); - if error <> TT_Err_Ok then - begin - Writeln( 'could not set point size, error code = ', error ); - goto Lopo; - end; - - Fail := 0; - for i := 0 to num_glyphs-1 do - begin - error := LoadTrueTypeChar( i, true ); - if error <> TT_Err_Ok then - begin - inc( Fail ); - if Fail < 10 then - Writeln( 'error hinting glyph ', i, ', code = ', - error ); - end; - -{$IFDEF RIEN} - with PGlyph(glyph.z)^ do - begin - if (precalc_width >= 0) and - (precalc_width <> computed_width) then - begin - Write( i:5,' hdmx = ',precalc_width:3 ); - Write( ', engine = ',computed_width ); - if is_composite then Write( ' (composite)' ); - Writeln; - end - end; -{$ENDIF} - - end; - - if Fail >= 10 then - Writeln( 'there were ',Fail,' failed glyphs' ); - - if Fail = 0 then - Writeln( 'ok' ); - - Lopo: - - TT_Close_Face( face ); - - end; - - Fin: - - Writeln('Memory consumed by lint = ', Mem0 - MemAvail ); - - TT_Done_FreeType; - - Writeln('Memory leaked after engine termination = ', Mem0 - MemAvail ); - -end. - - Index: xc/extras/FreeType/pascal/test/stacktv.pas diff -u xc/extras/FreeType/pascal/test/stacktv.pas:1.1.1.1 xc/extras/FreeType/pascal/test/stacktv.pas:removed --- xc/extras/FreeType/pascal/test/stacktv.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/stacktv.pas Wed Mar 16 20:59:47 2005 @@ -1,148 +0,0 @@ -(* The Turbo Vision Stack Component. Part of the FreeType Debugger *) - -unit StackTV; - -interface - -uses Objects, Views, Drivers, TTTypes, TTObjs, TTDebug; - -type - - { TStackView } - - { A Simple stack display } - - PStackView = ^TStackView; - TStackView = object( TListViewer ) - constructor Init( var Bounds : TRect; - aexec : PExec_Context; - AVScrollBar : PScrollBar ); - - procedure HandleEvent( var Event : TEvent ); virtual; - procedure Draw; virtual; - procedure Update; - - private - exec : PExec_Context; - end; - - { TStackWindow } - - PStackWindow = ^TStackWindow; - TStackWindow = object( TWindow ) - V : PScrollBar; - S : PStackView; - constructor Init( var Bounds : TRect; - exec : PExec_Context ); - end; - -implementation - -{$I DEBUGGER.INC} - -{ TStackView } - -constructor TStackView.Init; -begin - inherited Init( Bounds, 1, nil, AVScrollBar ); - exec := aexec; - - GrowMode := gfGrowHiX or gfGrowHiY; - DragMode := dmDragGrow or dmLimitLoX or dmLimitLoY; - EventMask := EventMask or evWave; - - SetRange( exec^.stackSize ); -end; - -procedure TStackView.Draw; -const - Colors : array[0..1] of Byte = ($1E,$3E); -var - B : TDrawBuffer; - Color : Byte; - I, Item : Int; - S : String[16]; -begin - Color := Colors[0]; - - if exec^.top <= Size.Y then Item := Size.Y-1 - else Item := exec^.top-1-TopItem; - - for I := 0 to Size.Y-1 do - begin - - MoveChar( B, ' ', Color, Size.X ); - - if Item < exec^.top then - begin - S := ' ' + Hex16( Item ) + ': ' + Hex32( exec^.stack^[Item] ); - MoveStr( B, S, Color ); - end; - - WriteLine( 0, I, Size.X, 1, B ); - dec( Item ); - end; - -end; - - -procedure TStackView.Update; -begin - FocusItem( 0 ); - DrawView; -end; - -procedure TStackView.HandleEvent; -var - Limits : TRect; - Mini, Maxi : Objects.TPoint; -begin - case Event.What of - - evWave : case Event.Command of - - cmReFocus : Update; - - end; - end; - - inherited HandleEvent( Event ); - - case Event.Command of - - cmResize: begin - Owner^.GetExtent(Limits); - SizeLimits( Mini, Maxi ); - DragView(Event, DragMode, Limits, Mini, Maxi ); - ClearEvent(Event); - end; - end; - -end; - - - -{ TStackWindow } - -constructor TStackWindow.Init; -var - R : TRect; -begin - inherited Init( Bounds, 'Pile', wnNoNumber ); - - GetExtent( Bounds ); - R := Bounds; - R.A.X := R.B.X-1; - inc( R.A.Y ); - dec( R.B.Y ); - New( V, Init(R) ); - Insert( V ); - - R := Bounds; - R.Grow(-1,-1); - New( S, Init( R, exec, V )); - - Insert( S ); -end; - -end. Index: xc/extras/FreeType/pascal/test/statetv.pas diff -u xc/extras/FreeType/pascal/test/statetv.pas:1.1.1.1 xc/extras/FreeType/pascal/test/statetv.pas:removed --- xc/extras/FreeType/pascal/test/statetv.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/statetv.pas Wed Mar 16 20:59:47 2005 @@ -1,196 +0,0 @@ -unit StateTV; - -interface - -uses Objects, Views, Drivers, TTTypes, TTObjs, TTDebug; - -{$I DEBUGGER.INC} - -type - - { State Viewer } - - { A simple TView to show the current graphics state } - - PStateViewer = ^TStateViewer; - TStateViewer = object( TView ) - - constructor Init( var Bounds : TRect; - aexec : PExec_Context ); - - procedure HandleEvent( var Event : TEvent ); virtual; - procedure Draw; virtual; - - private - exec : PExec_Context; - end; - - { PStateWindow } - - PStateWindow = ^TStateWindow; - TStateWindow = object( TWindow ) - stateView : PStateViewer; - constructor Init( var Bounds : TRect; - exec : PExec_Context ); - end; - -implementation - -{ TStateViewer } - -constructor TStateViewer.Init; -begin - inherited Init( Bounds ); - exec := aexec; - Options := Options or ofSelectable; - EventMask := EventMask or evWave; -end; - -procedure TStateViewer.Draw; -var - B : TDrawBuffer; - S : String; - Color : Int; - n : Int; -begin - Color := $1E; - n := 0; - MoveChar( B, ' ', Color, Self.Size.X ); - - S := ' Loop ' + Hex16( exec^.GS.loop ); - - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Auto_flip '; - if exec^.GS.auto_flip then S := S + ' Yes' - else S := S + ' No'; - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Dual ('+Hex16(exec^.GS.dualVector.x)+','+ - Hex16(exec^.GS.dualVector.y)+')'; - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Projection ('+Hex16(exec^.GS.projVector.x)+','+ - Hex16(exec^.GS.projVector.y)+')'; - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Freedom ('+Hex16(exec^.GS.freeVector.x)+','+ - Hex16(exec^.GS.freeVector.y)+')'; - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Gep0 ' + Hex8( exec^.GS.gep0 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Gep1 ' + Hex8( exec^.GS.gep1 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Gep2 ' + Hex8( exec^.GS.gep2 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Ins_Control ' + Hex8( exec^.GS.instruct_control ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Rounding ' + Hex8( exec^.GS.round_state ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Min_Distance ' + Hex32( exec^.GS.minimum_distance ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Rp0 ' + Hex8( exec^.GS.rp0 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Rp1 ' + Hex8( exec^.GS.rp1 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Rp2 ' + Hex8( exec^.GS.rp2 ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Ctrl_Val_Cutin ' + Hex32( exec^.GS.control_value_cutin ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Sngl_Width_Cutin ' + Hex32( exec^.GS.single_width_cutin ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Sngl_Widht_Value ' + Hex32( exec^.GS.single_width_value ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - S := ' Scan_type ' + Hex8( exec^.GS.scan_type ); - MoveStr( B, S, Color ); - WriteLine( 0, n, Self.Size.X, 1, B ); - inc( n ); - - MoveChar( B, ' ', Color, Self.Size.X ); - WriteLine( 0, n, Self.Size.X, Size.Y-n, B ); - -end; - -procedure TStateViewer.HandleEvent; -var - Limits : TRect; - Mini, Maxi : Objects.TPoint; -begin - - inherited HandleEvent( Event ); - - case Event.What of - - evWave : case Event.Command of - - cmReFocus : DrawView; -(* - cmResize: begin - Owner^.GetExtent(Limits); - SizeLimits( Mini, Maxi ); - DragView(Event, DragMode, Limits, Mini, Maxi ); - ClearEvent(Event); - end; -*) - end; - end; -end; - - -constructor TStateWindow.Init; -begin - inherited Init( Bounds, 'State', wnNoNumber ); - GetExtent( Bounds ); - Bounds.Grow(-1,-1); - New( StateView, Init( Bounds, exec ) ); - Insert( StateView ); -end; - -end. Index: xc/extras/FreeType/pascal/test/timer.pas diff -u xc/extras/FreeType/pascal/test/timer.pas:1.1.1.1 xc/extras/FreeType/pascal/test/timer.pas:removed --- xc/extras/FreeType/pascal/test/timer.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/timer.pas Wed Mar 16 20:59:47 2005 @@ -1,377 +0,0 @@ -{***************************************************************************} -{* *} -{* FreeType Performance Timer *} -{* *} -{* *} -{* This source code has been compiled and run under both Virtual Pascal *} -{* on OS/2 and Borland's BP7. *} -{* *} -{* *} -{* The C scan-line converter has been highly optimized, unlike the *} -{* Pascal one which is still 'aged'. Don't be surprised to see drastic *} -{* performance differences then.. *} -{* *} -{***************************************************************************} - -program Timer; - -uses -{$IFDEF OS2} - Use32, -{$ENDIF} - Crt, - Dos, (* for GetTime *) - GMain, - GEvents, - GDriver, - FreeType, - - TTError, (* for CheckError *) - TTTypes; (* for commodity types *) - -{$DEFINE VISUAL} - -{ $DEFINE DEBUG} - -{$IFDEF VISUAL} -{&PMTYPE NOVIO} -{$ENDIF} - -const - Precis = 64; - Precis2 = Precis div 2; - - PrecisAux = 1024; - - Centre_X : int = 320; - Centre_Y : int = 225; - - Max_Glyphs = 512; - -var - xC : TT_PCoordinates; - yC : TT_PCoordinates; - Fl : TT_PTouchTable; - - cons : PUShort; - - outlines : array[0..Max_Glyphs-1] of TT_Outline; - - lastp : int; - lastc : int; - - res : int; - - numPoints, numContours : int; - - Bit : TT_Raster_Map; - - Rotation : int; (* Angle modulo 1024 *) - - num_glyphs : int; - - gray_level : Boolean; - - face : TT_Face; - instance : TT_Instance; - glyph : TT_Glyph; - - metrics : TT_Glyph_Metrics; - imetrics : TT_Instance_Metrics; - - props : TT_Face_Properties; - - old_glyph : int; - cur_glyph : int; - tot_glyph : int; - - grayLines : array[0..2048] of Byte; - - error : TT_Error; - - -Procedure InitRows; -var - i: integer; - P: Pointer; -begin - - if gray_level then - begin - Bit.rows := 200; - Bit.cols := 320; - Bit.width := 320*2; - Bit.flow := TT_Flow_Down; - Bit.size := 320*200; - end - else - begin - Bit.rows := 450; - Bit.cols := 80; - Bit.width := 640; - Bit.flow := TT_Flow_Down; - Bit.size := 80*450; - end; - - GetMem( Bit.buffer, Bit.size ); - if Bit.buffer = NIL then - begin - Writeln('ERREUR:InitRows:Not enough memory to allocate BitMap'); - halt(1); - end; - - FillChar( Bit.Buffer^, Bit.Size, 0 ); -end; - - -Procedure ClearData; -var i: integer; -begin - FillChar( Bit.Buffer^, Bit.Size, 0 ); -end; - - -procedure Preload_Glyphs( var start : Int ); -var - i, j, fin, np, nc : integer; - outline : TT_Outline; - -begin - fin := start + Max_Glyphs; - if fin > num_glyphs then fin := num_glyphs; - - tot_glyph := fin-start; - - cur_glyph := 0; - lastp := 0; - lastc := 0; - - {$IFNDEF VISUAL} - Write('Loading ', fin-start,' glyphs '); - {$ENDIF} - - for i := start to fin-1 do - begin - - if TT_Load_Glyph( instance, - glyph, - i, - TT_Load_Default ) = TT_Err_Ok then - begin - TT_Get_Glyph_Outline( glyph, outline ); - - TT_New_Outline( outline.n_points, - outline.n_contours, - outlines[cur_glyph] ); - - outline.high_precision := false; - outline.second_pass := false; - - TT_Copy_Outline( outline, outlines[cur_glyph] ); - - - TT_Translate_Outline( outlines[cur_glyph], - vio_Width*16, - vio_Height*16 ); - inc( cur_glyph ); - end; - - end; - - start := fin; -end; - - - -function ConvertRaster(index : integer) : boolean; -begin - if gray_level then - error := TT_Get_Outline_Pixmap( outlines[index], Bit ) - else - error := TT_Get_Outline_Bitmap( outlines[index], Bit ); - - ConvertRaster := (error <> TT_Err_Ok); -end; - - -procedure Usage; -begin - Writeln('Simple TrueType Glyphs viewer - part of the FreeType project' ); - Writeln; - Writeln('Usage : ',paramStr(0),' FontName[.TTF]'); - Halt(1); -end; - - -function Get_Time : LongInt; -var - heure, - min, - sec, - cent : -{$IFDEF OS2} - longint; -{$ELSE} - word; -{$ENDIF} -begin - GetTime( heure, min, sec, cent ); - Get_Time := 6000*longint(min) + 100*longint(sec) + cent; -end; - - - -var i : integer; - Filename : String; - Fail : Int; - T, T0, T1 : Long; - - start : Int; - -begin - xC := NIL; - yC := NIL; - Fl := NIL; - - TT_Init_FreeType; - - if ParamCount = 0 then Usage; - - gray_level := ParamStr(1)='-g'; - - if gray_level then - if ParamCount <> 2 then Usage else - else - if ParamCount <> 1 then Usage; - - if gray_level then Filename := ParamStr(2) - else Filename := ParamStr(1); - - if Pos('.',FileName) = 0 then FileName:=FileName+'.TTF'; - - error := TT_Open_Face( filename, face ); - - if error <> TT_Err_Ok then - begin - Writeln('ERROR: Could not open ', FileName ); - Check_Error(error); - end; - - TT_Get_Face_Properties( face, props ); - - num_glyphs := props.num_Glyphs; - - i := length(FileName); - while (i > 1) and (FileName[i] <> '\') do dec(i); - - FileName := Copy( FileName, i+1, length(FileName) ); - - error := TT_New_Glyph( face, glyph ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR : Could not get glyph' ); - Check_Error(error); - end; - - i := props.max_Points * num_glyphs; - - GetMem( fl, i ); - i := i * sizeof(Long); - - GetMem( xC, i ); - GetMem( yC, i ); - - i := props.max_Contours * num_glyphs; - - GetMem( cons, i*sizeof(UShort) ); - - error := TT_New_Instance( face, instance ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR: Could not open face instance from ', Filename ); - Check_Error(error); - end; - - error := TT_Set_Instance_PointSize( instance, 400 ); - if error <> TT_Err_Ok then - begin - Writeln('ERROR: Could set pointsize' ); - Check_Error(error); - end; - - Rotation := 0; - Fail := 0; - - InitRows; - - {$IFDEF VISUAL} - if gray_level then - begin - if not Set_Graph_Screen( Graphics_Mode_Gray ) then - Panic1( 'could not set grayscale graphics mode' ); - end - else - begin - if not Set_Graph_Screen( Graphics_Mode_Mono ) then - Panic1( 'could not set mono graphics mode' ); - end; - - {$ENDIF} - - start := 0; - - T := Get_Time; - T1 := 0; - - while start < num_glyphs do - begin - - Preload_Glyphs(start); - - {$IFNDEF VISUAL} - write('... '); - {$ENDIF} - - T0 := Get_Time; - - for cur_glyph := 0 to tot_glyph-1 do - begin - if not ConvertRaster(cur_glyph) then - {$IFDEF VISUAL} - begin - Display_Bitmap_On_Screen( Bit.Buffer^, Bit.rows, Bit.cols ); - ClearData; - end - {$ELSE} - begin - end - {$ENDIF} - else - inc( Fail ); - end; - - T0 := Get_Time - T0; - writeln( T0/100:0:2,' s' ); - - inc( T1, T0 ); - - for cur_glyph := 0 to tot_glyph-1 do - TT_Done_Outline( outlines[cur_glyph] ); - end; - - T := Get_Time - T; - - {$IFDEF VISUAL} - Restore_Screen; - {$ENDIF} - - writeln; - writeln('Render time : ', T1/100:0:2,' s' ); - writeln('Total time : ', T /100:0:2,' s'); - writeln('Glyphs/second : ', Long(num_glyphs)*100/T1:0:1 ); - writeln('Fails : ',Fail ); -end. - -begin -end. - Index: xc/extras/FreeType/pascal/test/view.pas diff -u xc/extras/FreeType/pascal/test/view.pas:1.1.1.1 xc/extras/FreeType/pascal/test/view.pas:removed --- xc/extras/FreeType/pascal/test/view.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/view.pas Wed Mar 16 20:59:47 2005 @@ -1,523 +0,0 @@ -{***************************************************************************} -{* *} -{* FreeType Glyph Viewer. *} -{* *} -{* *} -{* This small program will load a TrueType font file and allow *} -{* you to view/scale/rotate its glyphs. Glyphs are in the order *} -{* found within the 'glyf' table. *} -{* *} -{* NOTE : This version displays a magnified view of the glyph *} -{* along with the pixel grid. *} -{* *} -{* This source code has been compiled and run under both Virtual Pascal *} -{* on OS/2 and Borland's BP7. *} -{* *} -{***************************************************************************} - -program View; - -uses Crt, - Common, -{$IFDEF OS2} - Use32, -{$ENDIF} - GMain, - GEvents, - GDriver, - FreeType; - -{&PMTYPE NOVIO} - -{$DEFINE DEBUG} - -const - Precis = 64; - - Precis2 = Precis div 2; - - PrecisAux = 1024; - - Profile_Buff_Size = 32000; - - Max_Files = 1024; - -var - face : TT_Face; - instance : TT_Instance; - glyph : TT_Glyph; - - metrics : TT_Glyph_Metrics; - imetrics : TT_Instance_Metrics; - - props : TT_Face_Properties; - - ymin, ymax, xmax, xmin, xsize : longint; - res, old_res : int; - - numPoints, numContours : int; - - Bit : TT_Raster_Map; - - Rotation : int; (* Angle modulo 1024 *) - - num_glyphs : int; - - error : TT_Error; - gray_level : Boolean; - - display_outline : boolean; - hint_glyph : boolean; - scan_type : Byte; - - old_glyph : int; - cur_glyph : int; - - scale_shift : Int; - - grayLines : array[0..2048] of Byte; - -(******************************************************************* - * - * Function : Set_Raster_Area - * - *****************************************************************) - - procedure Set_Raster_Area; - begin - Bit.rows := vio_Height; - Bit.width := vio_Width; - Bit.flow := TT_Flow_Up; - - if gray_level then - Bit.cols := Bit.width - else - Bit.cols := (Bit.width+7) div 8; - - Bit.size := Bit.rows * Bit.cols; - end; - -(******************************************************************* - * - * Function : Clear_Data - * - *****************************************************************) - - procedure Clear_Data; - begin - if gray_level then - fillchar( Bit.buffer^, Bit.size, gray_palette[0] ) - else - fillchar( Bit.buffer^, Bit.size, 0 ); - end; - -(******************************************************************* - * - * Function : Init_Engine - * - *****************************************************************) - - procedure Init_Engine( maxRes : Int ); - begin - Set_Raster_Area; - GetMem( Bit.buffer, Bit.size ); - Clear_Data; - end; - -(******************************************************************* - * - * Function : Reset_Scale - * - *****************************************************************) - - function Reset_Scale( res : Int ) : Boolean; - begin - error := TT_Set_Instance_CharSize( instance, res*64 ); - Reset_Scale := (error = TT_Err_Ok); - end; - - -(******************************************************************* - * - * Function : LoadTrueTypeChar - * - * Description : Loads a single glyph into the xcoord, ycoord and - * flag arrays, from the instance data. - * - *****************************************************************) - -Function LoadTrueTypeChar( index : integer; - hint : boolean ) : TT_Error; -var - j, load_flag : int; - - result : TT_Error; - -begin - if hint then load_flag := TT_Load_Scale_Glyph or TT_Load_Hint_Glyph - else load_flag := TT_Load_Scale_Glyph; - - result := TT_Load_Glyph( instance, - glyph, - index, - load_flag ); - - LoadTrueTypeChar := result; -end; - - -var - Error_String : String; - ine : Int; - -function Render_ABC( glyph_index : integer ) : boolean; -var - i, j : integer; - - x, y : longint; - - start_x, - start_y, - step_x, - step_y : longint; - - fail : Int; -begin - - Render_ABC := True; - - TT_Get_Instance_Metrics( instance, imetrics ); - - start_x := 4; - start_y := vio_Height - 30 - imetrics.y_ppem; - - step_x := imetrics.x_ppem + 4; - step_y := imetrics.y_ppem + 10; - - x := start_x; - y := start_y; - - fail := 0; - - ine := glyph_index; - while ine < num_glyphs do - begin - - if LoadTrueTypeChar( ine, hint_glyph ) = TT_Err_Ok then - begin - - TT_Get_Glyph_Metrics( glyph, metrics ); - - if gray_level then - TT_Get_Glyph_Pixmap( glyph, Bit, x*64, y*64 ) - else - TT_Get_Glyph_Bitmap( glyph, Bit, x*64, y*64 ); - - inc( x, (metrics.advance div 64) + 1 ); - - if x > vio_Width - 40 then - begin - x := start_x; - dec( y, step_y ); - if y < 10 then - begin - Render_ABC := False; - exit; - end; - end; - end - else - inc( fail ); - - inc(ine); - end; - - Render_ABC := False; -end; - - - -procedure Erreur( s : String ); -begin - Restore_Screen; - Writeln( 'Error : ', s, ', error code = ', error ); - Halt(1); -end; - - -procedure Usage; -begin - Writeln('Simple TrueType Glyphs viewer - part of the FreeType project' ); - Writeln; - Writeln('Usage : ',paramStr(0),' FontName[.TTF]'); - Halt(1); -end; - - - -var - i: integer; - heure, - min1, - min2, - sec1, - sec2, - cent1, - cent2 : -{$IFDEF OS2} - longint; -{$ELSE} - word; -{$ENDIF} - - C : Char; - - Filename : String; - -label Fin; - -var - Fail : Int; - glyphStr : String[4]; - ev : Event; - - Code : Int; - - init_memory, end_memory : LongInt; - - num_args : Integer; - point_size : Integer; - cur_file : Integer; - first_arg : Int; - sortie : Boolean; - valid : Boolean; - errmsg : String; - -label - Lopo; - -begin - TextMode( co80+Font8x8 ); - - TT_Init_FreeType; - - num_args := ParamCount; - - if num_args = 0 then - Usage; - - first_arg := 1; - - gray_level := False; - - if ParamStr(first_arg) = '-g' then - begin - inc( first_arg ); - gray_level := True; - end; - - if first_arg > num_args+1 then - Usage; - - val( ParamStr(first_arg), point_size, Code ); - if Code <> 0 then - point_size := 24 - else - inc( first_arg ); - - Expand_Wildcards( first_arg, '.ttf' ); - - cur_file := 0; - - if num_arguments = 0 then - begin - Writeln('Could not find file(s)'); - Halt(3); - end; - - if gray_level then - begin - if not Set_Graph_Screen( Graphics_Mode_Gray ) then - Erreur( 'could not set grayscale graphics mode' ); - end - else - begin - if not Set_Graph_Screen( Graphics_Mode_Mono ) then - Erreur( 'could not set mono graphics mode' ); - end; - - Init_Engine( 24 ); - - repeat - - valid := True; - - FileName := arguments[cur_file]^; - - if Pos('.',FileName) = 0 then FileName:=FileName+'.TTF'; - - error := TT_Open_Face( filename, face ); - if error <> TT_Err_Ok then - begin - str( error, errmsg ); - errmsg := 'Could not open '+filename+', error code = '+errmsg; - valid := false; - goto Lopo; - end; - - TT_Get_Face_Properties( face, props ); - - num_glyphs := props.num_Glyphs; - - i := length(FileName); - while (i > 1) and (FileName[i] <> '\') do dec(i); - - FileName := Copy( FileName, i+1, length(FileName) ); - - error := TT_New_Glyph( face, glyph ); - if error <> TT_Err_Ok then - Erreur('Could not create glyph container'); - - error := TT_New_Instance( face, instance ); - if error <> TT_Err_Ok then - begin - str( error, errmsg ); - errmsg := 'Could not create instance, error code = '+errmsg; - valid := false; - goto Lopo; - end; - - TT_Set_Instance_Resolutions( instance, 96, 96 ); - - Rotation := 0; - Fail := 0; - res := point_size; - scan_type := 2; - - Reset_Scale( res ); - - Lopo: - - display_outline := true; - hint_glyph := true; - - old_glyph := -1; - old_res := res; - cur_glyph := 0; - - sortie := false; - - Repeat - - if valid then - begin - if Render_ABC( cur_glyph ) then - inc( Fail ) - else - Display_Bitmap_On_Screen( Bit.Buffer^, Bit.rows, Bit.cols ); - - Clear_Data; - - Print_XY( 0, 0, FileName ); - - TT_Get_Instance_Metrics( instance, imetrics ); - - Print_Str(' pt size = '); - Str( imetrics.pointSize div 64:3, glyphStr ); - Print_Str( glyphStr ); - - Print_Str(' ppem = '); - Str( imetrics.y_ppem:3, glyphStr ); - Print_Str( glyphStr ); - - Print_Str(' glyph = '); - Str( cur_glyph, glyphStr ); - Print_Str( glyphStr ); - - Print_XY( 0, 1, 'Hinting (''z'') : ' ); - if hint_glyph then Print_Str('on ') - else Print_Str('off'); - - Print_XY( 0, 2, 'scan type(''e'') : ' ); - case scan_type of - 0 : Print_Str('none '); - 1 : Print_Str('level 1'); - 2 : Print_Str('level 2'); - 4 : Print_Str('level 4'); - 5 : Print_Str('level 5'); - end; - end - else - begin - Clear_Data; - Display_Bitmap_On_Screen( Bit.buffer^, Bit.rows, Bit.cols ); - Print_XY( 0, 0, errmsg ); - end; - - Get_Event(ev); - - case ev.what of - - event_Quit : goto Fin; - - event_Keyboard : case char(ev.info) of - - 'n' : begin - sortie := true; - if cur_file+1 < num_arguments then - inc( cur_file ); - end; - - 'p' : begin - sortie := true; - if cur_file > 0 then - dec( cur_file ); - end; - - 'z' : hint_glyph := not hint_glyph; - - - 'e' : begin - inc( scan_type ); - if scan_type = 3 then scan_type := 4; - if scan_type >= 6 then scan_type := 0; - end; - end; - - event_Scale_Glyph : begin - inc( res, ev.info ); - if res < 1 then res := 1; - if res > 1400 then res := 1400; - end; - - event_Change_Glyph : begin - inc( cur_glyph, ev.info ); - if cur_glyph < 0 then cur_glyph := 0; - if cur_glyph >= num_glyphs - then cur_glyph := num_glyphs-1; - end; - end; - - if res <> old_res then - begin - if not Reset_Scale(res) then - Erreur( 'Could not resize font' ); - old_res := res; - end; - - Until sortie; - - TT_Done_Glyph( glyph ); - TT_Close_Face( face ); - - until false; - - Fin: - Restore_Screen; - - Writeln; - Writeln('Fails : ', Fail ); - - TT_Done_FreeType; -end. - Index: xc/extras/FreeType/pascal/test/zonetv.pas diff -u xc/extras/FreeType/pascal/test/zonetv.pas:1.1.1.1 xc/extras/FreeType/pascal/test/zonetv.pas:removed --- xc/extras/FreeType/pascal/test/zonetv.pas:1.1.1.1 Sat Feb 12 23:56:11 2000 +++ xc/extras/FreeType/pascal/test/zonetv.pas Wed Mar 16 20:59:47 2005 @@ -1,222 +0,0 @@ -{****************************************************************************} -{* *} -{* ZoneTV.PAS *} -{* *} -{* This unit implements a simple TrueType zone points viewer for the *} -{* FREETYPE project debugger. *} -{* *} -{****************************************************************************} - -Unit ZoneTV; - -interface - -uses Objects, Views, Drivers, FreeType, TTTypes, TTTables, TTObjs, TTDebug; - -{$I DEBUGGER.INC} - -type - - { TZoneViewer } - - { This TView is a simple point array viewer } - - PZoneViewer = ^TZoneViewer; - TZoneViewer = object( TListViewer ) - - constructor Init( var Bounds : TRect; - AZone : PGlyph_Zone ); - - procedure Draw; virtual; - procedure HandleEvent( var Event : TEvent ); virtual; - - private - Zone : PGlyph_Zone; { Pointer to the zone being displayed } - Save : TGlyph_Zone; { A copy of the zone to highlight } - { changes } - procedure Copy_Zone; - - end; - - { TCodeWindow } - - PZoneWindow = ^TZoneWindow; - TZoneWindow = object( TWindow ) - ZoneView : PZoneViewer; - constructor Init( var Bounds : TRect; - AZone : PGlyph_Zone ); - end; - -implementation - -{ TZoneViewer } - -constructor TZoneViewer.Init; -var - n : Int; -begin - inherited Init( Bounds, 1, nil, nil ); - - GrowMode := gfGrowHiX or gfGrowHiY; - DragMode := dmDragGrow or dmLimitLoX or dmLimitLoY; - Options := Options or ofSelectable; - EventMask := EventMask or evWave; - - Zone := AZone; - - GetMem( Save.org, zone^.n_points*2*sizeof(Long) ); - GetMem( Save.cur, zone^.n_points*2*sizeof(Long) ); - GetMem( Save.flags, zone^.n_points*sizeof(Byte) ); - - Save.n_points := Zone^.n_points; - Save.n_contours := Zone^.n_contours; - - Copy_Zone; - - SetRange( Save.n_points ); -end; - - -procedure TZoneViewer.Copy_Zone; -var - n : Int; -begin - n := 2*zone^.n_points * sizeof(Long); - - (* Note that we save also the original coordinates, as we're not sure *) - (* that the debugger is debugged ! *) - - move( Zone^.org^, Save.org^, n ); - move( Zone^.cur^, Save.cur^, n ); - move( Zone^.flags^, Save.flags^, zone^.n_points ); -end; - - -procedure TZoneViewer.HandleEvent( var Event : TEvent ); -var - Limits : TRect; - Mini, Maxi : Objects.TPoint; -begin - - inherited HandleEvent(Event); - - Case Event.What of - - evWave : case Event.Command of - - cmNewExecution : Copy_Zone; - - cmRefocus : DrawView; - - end; - - evCommand : case Event.Command of - - cmResize: begin - Owner^.GetExtent(Limits); - SizeLimits( Mini, Maxi ); - DragView(Event, DragMode, Limits, Mini, Maxi ); - ClearEvent(Event); - end; - end; - end; -end; - - -procedure TZoneViewer.Draw; -const - Colors : array[0..3] of byte - = ($30,$3F,$0B,$0E); - Touchs : array[0..3] of Char - = (' ','x','y','b'); - OnOff : array[0..1] of Char - = (' ',':'); -var - I, J, Item : Int; - B : TDrawBuffer; - S : String; - Indent : Int; - Ligne : Int; - - Changed : Boolean; - - Back_Color, - Color : word; - - On_BP : boolean; - BP : PBreakPoint; - -begin - - if HScrollBar <> nil then Indent := HScrollBar^.Value - else Indent := 0; - - with Save do - begin - - for I := 0 to Self.Size.Y-1 do - begin - - MoveChar( B, ' ', Colors[0], Self.Size.X ); - - Item := TopItem + I; - - if (Range > 0) and - ( Focused = Item ) then Back_Color := 2 - else Back_Color := 0; - - if Item < n_points then - begin - - Color := Back_Color; - if ( flags^[item] <> Zone^.flags^[item] ) then inc( Color ); - - S := Hex16( Item ) + ': '; - S[1] := OnOff[Zone^.flags^[item] and 1]; - S[7] := Touchs[(Zone^.flags^[item] and TT_Flag_Touched_Both) shr 1]; - - MoveStr( B, S, Colors[Color] ); - - Color := Back_Color; - if ( org^[item].x <> Zone^.org^[item].x ) then inc( Color ); - - MoveStr ( B[8], Hex32( Zone^.org^[item].x ), Colors[Color] ); - MoveChar( B[16], ',', Colors[0], 1 ); - - Color := Back_Color; - if ( org^[item].y <> Zone^.org^[item].y ) then inc( Color ); - - MoveStr( B[17], Hex32( Zone^.org^[item].y ), Colors[Color] ); - MoveStr( B[25], ' : ', Colors[0] ); - - Color := Back_Color; - if ( cur^[item].x <> Zone^.cur^[item].x ) then inc( Color ); - - MoveStr ( B[28], Hex32( Zone^.cur^[item].x ), Colors[Color] ); - MoveChar( B[36], ',', Colors[0], 1 ); - - Color := Back_Color; - if ( cur^[item].y <> Zone^.cur^[item].y ) then inc( Color ); - - MoveStr( B[37], Hex32( Zone^.cur^[item].y ), Colors[Color] ); - - end; - - WriteLine( 0, I, Self.Size.X, 1, B ); - end; - end; -end; - -{ TZoneWindow } - -constructor TZoneWindow.Init; -begin - inherited Init( Bounds,'Zone',wnNoNumber ); - GetExtent( Bounds ); - Bounds.Grow(-1,-1); - New( ZoneView, Init( Bounds, AZone ) ); - Insert( ZoneView ); -end; - -end. - Index: xc/extras/FreeType/po/.cvsignore diff -u xc/extras/FreeType/po/.cvsignore:1.1.1.1 xc/extras/FreeType/po/.cvsignore:removed --- xc/extras/FreeType/po/.cvsignore:1.1.1.1 Sat Feb 12 23:56:12 2000 +++ xc/extras/FreeType/po/.cvsignore Wed Mar 16 20:59:47 2005 @@ -1,8 +0,0 @@ -*.gmo -*.mo -Makefile -Makefile.in -POTFILES -cat-id-tbl.c -freetype.pot -stamp-cat-id Index: xc/extras/FreeType/po/Makefile.in.in diff -u xc/extras/FreeType/po/Makefile.in.in:1.1.1.2 xc/extras/FreeType/po/Makefile.in.in:removed --- xc/extras/FreeType/po/Makefile.in.in:1.1.1.2 Sat Jan 23 22:22:26 1999 +++ xc/extras/FreeType/po/Makefile.in.in Wed Mar 16 20:59:47 2005 @@ -1,216 +0,0 @@ -# -# -# Makefile for freetype I18n, -# based on the Makefile.in.in that comes with gettext -# -# Erwin Dieterich, 20. 1. 1998 Erwin.Dieterich.ED@Bayer-AG.de -# -# -# -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995, 1996 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -PACKAGE = freetype -VERSION = @freetype_version@ - -SHELL = /bin/sh -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datadir = $(prefix)/@DATADIRNAME@ -localedir = @LOCALEDIR@ -gnulocaledir = @LOCALEDIR@ -subdir = po - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -CC = @CC@ -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -MSGMERGE = @MSGMERGE@ - -DEFS = @DEFS@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ - -INCLUDES = -I.. - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot - -POTFILES = \ - -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -INSTOBJEXT = @INSTOBJEXT@ - -.SUFFIXES: -.SUFFIXES: .c .o .po .pox .gmo .mo .msg - -.c.o: - $(COMPILE) $< - -.po.pox: - $(MAKE) $(PACKAGE).pot - $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox - -.po.mo: - $(MSGFMT) -o $@ $< - -.po.gmo: - file=`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -o $$file $< - - - -all: all-@USE_NLS@ - -all-yes: $(PACKAGE).pot $(CATALOGS) -all-no: - @echo "No support for NLS requested" - -$(PACKAGE).pot: $(POTFILES) - if test -n "$(XGETTEXT)"; then \ - $(XGETTEXT) --default-domain=freetype --directory=$(srcdir)/.. \ - --keyword=_ --files-from=$(srcdir)/POTFILES.in; \ - mv freetype.po freetype.pot; \ - else \ - echo "xgettext not available: $(PACKAGE).pot not updated" 1>&2; \ - fi - - -install: install-exec install-data -install-exec: -install-data: install-data-@USE_NLS@ -install-data-no: all -install-data-yes: all - $(top_srcdir)/mkinstalldirs $(datadir); \ - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - case "$$cat" in \ - *.gmo) destdir=$(gnulocaledir);; \ - *) destdir=$(localedir);; \ - esac; \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - dir=$$destdir/$$lang/LC_MESSAGES; \ - $(top_srcdir)/mkinstalldirs $$dir; \ - if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ - echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ - fi; \ - if test -r $$cat.m; then \ - $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ - else \ - if test -r $(srcdir)/$$cat.m ; then \ - $(INSTALL_DATA) $(srcdir)/$$cat.m \ - $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ - echo "installing $(srcdir)/$$cat as" \ - "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ - else \ - true; \ - fi; \ - fi; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ - rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ - rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ - done - rm -f $(gettextsrcdir)/po-Makefile.in.in - -check: all - -dvi info tags TAGS ID: - -mostlyclean: - rm -f core core.* *.pox $(PACKAGE).po *.old.po - rm -fr *.o *~ - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo *.gmo *.msg *.cat.m - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: update-po $(DISTFILES) - dists="$(DISTFILES)"; \ - for file in $$dists; do \ - ln $(srcdir)/$$file $(distdir) 2> /dev/null \ - || cp -p $(srcdir)/$$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(PACKAGE).pot - PATH=`pwd`/../src:$$PATH; \ - cd $(srcdir); \ - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ - mv $$lang.po $$lang.old.po; \ - echo "$$lang:"; \ - if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ - rm -f $$lang.old.po; \ - else \ - echo "msgmerge for $$cat failed!"; \ - rm -f $$lang.po; \ - mv $$lang.old.po $$lang.po; \ - fi; \ - done - -POTFILES: POTFILES.in - ( if test 'x$(srcdir)' != 'x.'; then \ - posrcprefix='$(top_srcdir)/'; \ - else \ - posrcprefix="../"; \ - fi; \ - sed -e '/^#/d' -e '/^[ ]*$$/d' \ - -e "s@.*@ $$posrcprefix& \\\\@" \ - -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES ) - -Makefile: Makefile.in.in ../config.status POTFILES - cd .. \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Index: xc/extras/FreeType/po/POTFILES.in diff -u xc/extras/FreeType/po/POTFILES.in:1.1.1.2 xc/extras/FreeType/po/POTFILES.in:removed --- xc/extras/FreeType/po/POTFILES.in:1.1.1.2 Sat Feb 12 23:56:12 2000 +++ xc/extras/FreeType/po/POTFILES.in Wed Mar 16 20:59:47 2005 @@ -1,10 +0,0 @@ -# -# List of source files containing translatable strings -# -# -lib/extend/ftxerr18.c -test/fterror.c -test/ftdump.c -test/ftlint.c -test/ftmetric.c -test/ftsbit.c Index: xc/extras/FreeType/po/cs.po diff -u xc/extras/FreeType/po/cs.po:1.1.1.3 xc/extras/FreeType/po/cs.po:removed --- xc/extras/FreeType/po/cs.po:1.1.1.3 Sat Feb 12 23:56:12 2000 +++ xc/extras/FreeType/po/cs.po Wed Mar 16 20:59:48 2005 @@ -1,756 +0,0 @@ -# Czech messages for FreeType -# Copyright (C) 1998-9 Pavel Kaňkovský -# Pavel Kaňkovský , 1998-9 -# -msgid "" -msgstr "" -"Project-Id-Version: FreeType 1.3\n" -"POT-Creation-Date: 1999-09-07 12:49+0000\n" -"PO-Revision-Date: 1999-08-30\n" -"Last-Translator: Pavel Kaňkovský , 1999\n" -"Language-Team: Czech\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/extend/ftxerr18.c:47 -msgid "Successful function call, no error." -msgstr "Úspěąné volání funkce, ľádná chyba." - -#: lib/extend/ftxerr18.c:50 -msgid "Invalid face handle." -msgstr "Neplatný manipulátor písma." - -#: lib/extend/ftxerr18.c:52 -msgid "Invalid instance handle." -msgstr "Neplatný manipulátor instance." - -#: lib/extend/ftxerr18.c:54 -msgid "Invalid glyph handle." -msgstr "Neplatný manipulátor litery." - -#: lib/extend/ftxerr18.c:56 -msgid "Invalid charmap handle." -msgstr "Neplatný manipulátor znakové mapy." - -#: lib/extend/ftxerr18.c:58 -msgid "Invalid result address." -msgstr "Neplatná adresa výsledku." - -#: lib/extend/ftxerr18.c:60 -msgid "Invalid glyph index." -msgstr "Neplatný index litery." - -#: lib/extend/ftxerr18.c:62 -msgid "Invalid argument." -msgstr "Neplatný argument." - -#: lib/extend/ftxerr18.c:64 -msgid "Could not open file." -msgstr "Nelze otevřít soubor." - -#: lib/extend/ftxerr18.c:66 -msgid "File is not a TrueType collection." -msgstr "Soubor není kolekce písem TrueType." - -#: lib/extend/ftxerr18.c:69 -msgid "Mandatory table missing." -msgstr "Některá z povinných tabulek chybí." - -#: lib/extend/ftxerr18.c:71 -msgid "Invalid horizontal metrics (hmtx table broken)." -msgstr "Neplatná horizontální metrika (tabulka HMTX poąkozena)." - -#: lib/extend/ftxerr18.c:73 -msgid "Invalid charmap format." -msgstr "Neplatný formát znakové mapy." - -#: lib/extend/ftxerr18.c:75 -msgid "Invalid ppem value." -msgstr "Neplatné rozměry liter (ppem)." - -#: lib/extend/ftxerr18.c:77 -msgid "Invalid vertical metrics (vmtx table broken)." -msgstr "Neplatná vertikální metrika (tabulka VMTX poąkozena)." - -#: lib/extend/ftxerr18.c:80 -msgid "Invalid file format." -msgstr "Neplatný formát souboru." - -#: lib/extend/ftxerr18.c:83 -msgid "Invalid engine." -msgstr "Neplatná globální data knihovny." - -#: lib/extend/ftxerr18.c:85 -msgid "Too many extensions." -msgstr "Přílią mnoho roząíření." - -#: lib/extend/ftxerr18.c:87 -msgid "Extensions unsupported." -msgstr "Roząíření není podporováno." - -#: lib/extend/ftxerr18.c:89 -msgid "Invalid extension id." -msgstr "Neplatný identifikátor roząíření." - -#: lib/extend/ftxerr18.c:92 -msgid "No vertical data in font." -msgstr "V písmu nejsou obsaľena ľádná vertikální data." - -#: lib/extend/ftxerr18.c:95 -msgid "Maximum Profile (maxp) table missing." -msgstr "Tabulka maximálních hodnot (MAXP) chybí." - -#: lib/extend/ftxerr18.c:97 -msgid "Font Header (head) table missing." -msgstr "Tabulka HEAD chybí." - -#: lib/extend/ftxerr18.c:99 -msgid "Horizontal Header (hhea) table missing." -msgstr "Tabulka HHEA chybí." - -#: lib/extend/ftxerr18.c:101 -msgid "Index to Location (loca) table missing." -msgstr "Tabulka pozic liter (LOCA) chybí." - -#: lib/extend/ftxerr18.c:103 -msgid "Naming (name) table missing." -msgstr "Tabulka jmen (NAME) chybí." - -#: lib/extend/ftxerr18.c:105 -msgid "Character to Glyph Index Mapping (cmap) tables missing." -msgstr "Tabulky znakových map (CMAP) chybí." - -#: lib/extend/ftxerr18.c:107 -msgid "Horizontal Metrics (hmtx) table missing." -msgstr "Tabulka horizontálních metrik (HTMX) chybí." - -#: lib/extend/ftxerr18.c:109 -msgid "OS/2 table missing." -msgstr "Tabulka OS/2 chybí." - -#: lib/extend/ftxerr18.c:111 -msgid "PostScript (post) table missing." -msgstr "Tabulka dat pro PostScript (POST) chybí." - -#: lib/extend/ftxerr18.c:113 -msgid "Glyph (glyf) table missing." -msgstr "Tabulka liter (GLYF) chybí." - -#: lib/extend/ftxerr18.c:118 -msgid "Out of memory." -msgstr "Nedostatek paměti." - -#: lib/extend/ftxerr18.c:123 -msgid "Invalid file offset." -msgstr "Neplatná pozice v souboru." - -#: lib/extend/ftxerr18.c:125 -msgid "Invalid file read." -msgstr "Neplatné čtení ze souboru." - -#: lib/extend/ftxerr18.c:127 -msgid "Invalid frame access." -msgstr "Neplatný přístup k úseku souboru." - -#: lib/extend/ftxerr18.c:132 -msgid "Too many points." -msgstr "Přílią mnoho bodů." - -#: lib/extend/ftxerr18.c:134 -msgid "Too many contours." -msgstr "Přílią mnoho kontur." - -#: lib/extend/ftxerr18.c:136 -msgid "Invalid composite glyph." -msgstr "Neplatná kompozitní litera." - -#: lib/extend/ftxerr18.c:138 -msgid "Too many instructions." -msgstr "Přílią mnoho instrukcí." - -#: lib/extend/ftxerr18.c:143 -msgid "Invalid opcode." -msgstr "Neplatný kód operace." - -#: lib/extend/ftxerr18.c:145 -msgid "Too few arguments." -msgstr "Přílią málo argumentů." - -#: lib/extend/ftxerr18.c:147 -msgid "Stack overflow." -msgstr "Přetečení zásobníku." - -#: lib/extend/ftxerr18.c:149 -msgid "Code overflow." -msgstr "Přetečení oblasti instrukcí." - -#: lib/extend/ftxerr18.c:151 -msgid "Bad argument." -msgstr "©patný argument." - -#: lib/extend/ftxerr18.c:153 -msgid "Divide by zero." -msgstr "Dělení nulou." - -#: lib/extend/ftxerr18.c:155 -msgid "Storage overflow." -msgstr "Přetečení oblasti pro ukládání dat." - -#: lib/extend/ftxerr18.c:157 -msgid "Control Value (cvt) table overflow." -msgstr "Přetečení tabulky řídících hodnot (CVT)." - -#: lib/extend/ftxerr18.c:159 -msgid "Invalid reference." -msgstr "Neplatný odkaz." - -#: lib/extend/ftxerr18.c:161 -msgid "Invalid distance." -msgstr "Neplatná vzdálenost." - -#: lib/extend/ftxerr18.c:163 -msgid "Interpolate twilight points." -msgstr "Interpolace mezi body v soumračné zóně." - -#: lib/extend/ftxerr18.c:165 -msgid "`DEBUG' opcode found." -msgstr "Ladící operace." - -#: lib/extend/ftxerr18.c:167 -msgid "`ENDF' in byte-code stream." -msgstr "Operace ENDF nalezena na ąpatném místě." - -#: lib/extend/ftxerr18.c:169 -msgid "Out of code ranges." -msgstr "Mimo oblasti instrukcí." - -#: lib/extend/ftxerr18.c:171 -msgid "Nested function definitions." -msgstr "Vnořené definice funkcí." - -#: lib/extend/ftxerr18.c:173 -msgid "Invalid code range." -msgstr "Neplatná oblast instrukcí." - -#: lib/extend/ftxerr18.c:175 -msgid "Invalid displacement." -msgstr "Neplatné posunutí." - -#: lib/extend/ftxerr18.c:177 -msgid "Endless loop encountered while executing instructions." -msgstr "Doąlo k zacyklení během vykonávání instrukcí." - -#: lib/extend/ftxerr18.c:182 -msgid "Nested frame access." -msgstr "Vnořené přístupy k úseku souboru." - -#: lib/extend/ftxerr18.c:184 -msgid "Invalid cache list." -msgstr "Neplatný seznam vyrovnávací paměti." - -#: lib/extend/ftxerr18.c:186 -msgid "Could not find context." -msgstr "Nelze najít kontext." - -#: lib/extend/ftxerr18.c:188 -msgid "Unlisted object." -msgstr "Objekt není v seznamu." - -#: lib/extend/ftxerr18.c:193 -msgid "Raster pool overflow." -msgstr "Přetečení paměti rasterizéru." - -#: lib/extend/ftxerr18.c:195 -msgid "Raster: negative height encountered." -msgstr "Rasterizér: záporná výąka." - -#: lib/extend/ftxerr18.c:197 -msgid "Raster: invalid value." -msgstr "Rasterizér: neplatná hodnota." - -#: lib/extend/ftxerr18.c:199 -msgid "Raster not initialized." -msgstr "Rasterizér není incializován." - -#: lib/extend/ftxerr18.c:204 -msgid "Invalid kerning (kern) table format." -msgstr "Neplatný formát tabulky kernů (KERN)." - -#: lib/extend/ftxerr18.c:206 -msgid "Invalid kerning (kern) table." -msgstr "Neplatná tabulka kernů (KERN)." - -#: lib/extend/ftxerr18.c:208 -msgid "Invalid PostScript (post) table format." -msgstr "Neplatný formát tabulky PostScript (POST)." - -#: lib/extend/ftxerr18.c:210 -msgid "Invalid PostScript (post) table." -msgstr "Neplatná tabulka PostScript (POST)." - -#: lib/extend/ftxerr18.c:216 -msgid "Invalid TrueType Open subtable format." -msgstr "Neplatný formát podtabulky TrueType Open." - -#: lib/extend/ftxerr18.c:218 -msgid "Invalid TrueType Open subtable." -msgstr "Neplatná podtabulka TrueType Open." - -#: lib/extend/ftxerr18.c:220 -msgid "Glyph(s) not covered by lookup." -msgstr "Jedna či více liter během prohledávání nenalezena." - -#: lib/extend/ftxerr18.c:222 -msgid "Too many nested context substitutions." -msgstr "Přílią mnoho vloľených kontextových substitucí." - -#: lib/extend/ftxerr18.c:224 -msgid "Invalid glyph substitution (GSUB) table format." -msgstr "Neplatný formát tabulky substitucí liter (GSUB)." - -#: lib/extend/ftxerr18.c:226 -msgid "Invalid glyph substitution (GSUB) table." -msgstr "Neplatná tabulka substitucí liter (GSUB)." - -#: lib/extend/ftxerr18.c:228 -msgid "Invalid glyph positioning (GPOS) table format." -msgstr "Neplatný formát tabulky umís»ování liter (GPOS)." - -#: lib/extend/ftxerr18.c:230 -msgid "Invalid glyph positioning (GPOS) table." -msgstr "Neplatná tabulka umís»ování liter (GPOS)." - -#: lib/extend/ftxerr18.c:237 -msgid "Invalid Error Number." -msgstr "Neznámý kód chyby." - -#: test/fterror.c:60 -msgid "Start of fterror.\n" -msgstr "Začátek fterror.\n" - -#: test/fterror.c:68 -msgid "End of fterror.\n" -msgstr "Konec fterror.\n" - -#: test/ftdump.c:168 test/ftlint.c:207 test/ftmetric.c:292 -msgid "Could not create glyph container.\n" -msgstr "Nelze vytvořit kontejner liter.\n" - -#: test/ftdump.c:178 test/ftlint.c:215 test/ftmetric.c:301 test/ftsbit.c:213 -msgid "Could not create instance.\n" -msgstr "Nelze vytvořit instanci.\n" - -#: test/ftdump.c:187 -msgid "Could not create second instance.\n" -msgstr "Nelze vytvořit druhou instanci.\n" - -#: test/ftdump.c:193 -msgid "Memory footprint statistics:\n" -msgstr "Statistika pamě»ových nároků:\n" - -#: test/ftdump.c:201 -msgid "face object" -msgstr "objekt písma" - -#: test/ftdump.c:202 -msgid "glyph object" -msgstr "objekt litery" - -#: test/ftdump.c:203 -msgid "instance object" -msgstr "objekt instance" - -#: test/ftdump.c:207 -msgid "exec. context object" -msgstr "objekt prováděcího kontextu" - -#: test/ftdump.c:214 -msgid "total memory usage" -msgstr "celková spotřeba paměti" - -#: test/ftdump.c:222 test/ftdump.c:574 test/ftdump.c:784 test/ftdump.c:921 -#: test/ftlint.c:274 test/ftlint.c:287 test/ftmetric.c:387 test/ftsbit.c:284 -#, c-format -msgid "FreeType error message: %s\n" -msgstr "Chybové hláąení FreeType: %s\n" - -#: test/ftdump.c:299 -msgid "font name table entries\n" -msgstr "poloľky v tabulce jmen\n" - -#: test/ftdump.c:309 -#, c-format -msgid "" -"PostScript name: %s\n" -"\n" -msgstr "" -"PostScriptové jméno: %s\n" -"\n" - -#: test/ftdump.c:332 -msgid "character map encodings\n" -msgstr "kódování map znaků\n" - -#: test/ftdump.c:339 test/ftdump.c:483 -msgid "The file doesn't seem to have any encoding table.\n" -msgstr "Soubor zřejmě neobsahuje ľádnou mapu znaků.\n" - -#: test/ftdump.c:343 test/ftdump.c:487 -#, c-format -msgid "" -"There are %hu encodings:\n" -"\n" -msgstr "" -"%hu kódování:\n" -"\n" - -#: test/ftdump.c:348 -#, c-format -msgid "encoding %2u: " -msgstr "kódování %2u: " - -#: test/ftdump.c:375 test/ftdump.c:384 test/ftdump.c:447 -#, c-format -msgid "Unknown value %hu" -msgstr "Neznámá hodnota %hu" - -#: test/ftdump.c:454 -msgid "Unknown" -msgstr "Neznámé" - -#: test/ftdump.c:476 -msgid "ftxcmap test\n" -msgstr "test roząíření ftxcmap\n" - -#: test/ftdump.c:493 -#, c-format -msgid "encoding %2u:\n" -msgstr "kódování %2u:\n" - -#: test/ftdump.c:498 -#, c-format -msgid "first: glyph index %hu, character code 0x%lx\n" -msgstr "první: index litery %hu, kód znaku 0x%lx\n" - -#: test/ftdump.c:502 -#, c-format -msgid "next: glyph index %hu, character code 0x%lx\n" -msgstr "daląí: index litery %hu, kód znaku 0x%lx\n" - -#: test/ftdump.c:506 -#, c-format -msgid "last: glyph index %hu, character code 0x%lx\n" -msgstr "poslední: glyph index %hu, character code 0x%lx\n" - -#: test/ftdump.c:528 test/ftmetric.c:282 -msgid "Error while retrieving embedded bitmaps table.\n" -msgstr "Chyba během načítání tabulky vloľených bitmap.\n" - -#: test/ftdump.c:532 -msgid "embedded bitmap table\n" -msgstr "tabulka vloľených bimap\n" - -#: test/ftdump.c:535 -#, c-format -msgid " version of embedded bitmap table: 0x%lx\n" -msgstr " verze tabulky vloľených bitmap: 0x%lx\n" - -#: test/ftdump.c:537 -#, c-format -msgid " number of embedded bitmap strikes: %lu\n" -msgstr " počet bloků vloľených bitmap: %lu\n" - -#: test/ftdump.c:547 -#, c-format -msgid " bitmap strike %hu/%lu: " -msgstr " blok vloľených bitmap %hu/%lu: " - -#: test/ftdump.c:550 -#, c-format -msgid "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" -msgstr "%hux%hu pixelů, bitová hloubka %hu, litery [%hu..%hu]\n" - -#: test/ftdump.c:559 -#, c-format -msgid " range format (%hu:%hu) glyphs %hu..%hu\n" -msgstr " úsek formátu (%hu:%hu) litery %hu..%hu\n" - -#: test/ftdump.c:610 -msgid "Error while loading GSUB table.\n" -msgstr "Chyba během načítání tabulky GSUB.\n" - -#: test/ftdump.c:614 -msgid "GSUB table\n" -msgstr "tabulka GSUB\n" - -#: test/ftdump.c:621 -msgid "Error while querying GSUB script list.\n" -msgstr "Chyba během prohledávání seznamu GSUB skriptů.\n" - -#: test/ftdump.c:634 -#, c-format -msgid "Error while selecting GSUB script `%4.4s'.\n" -msgstr "Chyba při pokusu vybrat GSUB skript \"%4.4s\".\n" - -#: test/ftdump.c:639 -#, c-format -msgid " script `%4.4s' (index %hu):\n" -msgstr " skript \"%4.4s\" (index %hu):\n" - -#: test/ftdump.c:647 -#, c-format -msgid "Error while querying GSUB default language system for script `%4.4s'.\n" -msgstr "" -"Chyba během zkoumání běľného jazykového systému GSUB skriptu \"%4.4s\".\n" - -#: test/ftdump.c:652 -msgid " default language system:\n" -msgstr " běľný jazykový systém:\n" - -#: test/ftdump.c:665 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for default language system of script `%4.4s'.\n" -msgstr "" -"Chyba při výběru GSUB vlastnosti \"%4.4s\"\n" -"pro běľný jazykový systém skriptu \"%4.4s\".\n" - -#: test/ftdump.c:671 test/ftdump.c:752 -#, c-format -msgid " feature `%4.4s' (index %hu; lookup " -msgstr " vlastnost \"%4.4s\" (index %hu; vyhledávání " - -#: test/ftdump.c:687 -#, c-format -msgid "Error while querying GSUB language list for script `%4.4s'.\n" -msgstr "Chyba během zkoumání seznamu jazyků pro GSUB skript \"%4.4s\".\n" - -#: test/ftdump.c:704 -#, c-format -msgid "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" -msgstr "Chyba během výběru jazyka \"%4.4s\" pro GSUB skript \"%4.4s\".\n" - -#: test/ftdump.c:709 -#, c-format -msgid " language `%4.4s' (index %hu):\n" -msgstr " jazyk \"%4.4s\" (index %hu):\n" - -#: test/ftdump.c:714 -#, c-format -msgid " required feature index %hu (lookup " -msgstr " poľadovaná vlastnost (index %hu; vyhledávání " - -#: test/ftdump.c:729 -#, c-format -msgid "" -"Error while querying GSUB feature list\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Chyba během zkoumání seznamu vlastností\n" -"pro GSUB skript \"%4.4s\", jazyk \"%4.4s\".\n" - -#: test/ftdump.c:746 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Chyba během výběru vlastnosti \"%4.4s\"\n" -"pro GSUB skript \"%4.4s\", jazyk \"%4.4s\".\n" - -#: test/ftdump.c:771 -msgid "" -"Lookups:\n" -"\n" -msgstr "" -"Vyhledávací údaje:\n" -"\n" - -#: test/ftdump.c:774 -#, c-format -msgid " %hu: type %hu, flag 0x%x\n" -msgstr " %hu: typ %hu, příznaky 0x%x\n" - -#: test/ftdump.c:809 -msgid "ftdump: Simple TrueType Dumper -- part of the FreeType project" -msgstr "" -"ftdump: jednoduchý výpis obsahu písma TrueType -- součást projektu FreeType" - -#: test/ftdump.c:813 -#, c-format -msgid "" -"Usage: %s fontname[.ttf|.ttc]\n" -"\n" -msgstr "" -"Pouľití: %s název-písma[.ttf|.ttc]\n" -"\n" - -#: test/ftdump.c:845 test/ftlint.c:134 test/ftmetric.c:226 test/ftsbit.c:126 -msgid "Error while initializing engine.\n" -msgstr "Chyba během inicializace knihovny.\n" - -#: test/ftdump.c:852 test/ftmetric.c:234 test/ftsbit.c:133 -msgid "Error while initializing embedded bitmap extension.\n" -msgstr "Chyba během inicializace roząíření pro vloľené bitmapy.\n" - -#: test/ftdump.c:859 -msgid "Error while initializing GSUB extension.\n" -msgstr "Chyba během inicializace roząíření pro substituce liter (GSUB).\n" - -#: test/ftdump.c:875 test/ftlint.c:187 test/ftmetric.c:249 test/ftsbit.c:181 -#, c-format -msgid "Could not find or open %s.\n" -msgstr "Nelze nalézt nebo otevřít soubor %s.\n" - -#: test/ftdump.c:878 test/ftlint.c:193 test/ftmetric.c:252 test/ftsbit.c:187 -#, c-format -msgid "Error while opening %s.\n" -msgstr "Chyba během otevírání souboru %s.\n" - -#: test/ftlint.c:94 -msgid "" -"ftlint: Simple TrueType instruction tester -- part of the FreeType project" -msgstr "ftlint: test instrukcí písma TrueType -- součást projektu FreeType" - -#: test/ftlint.c:99 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n" -"\n" -msgstr "" -"Pouľití: %s ppem název-písma[.ttf|.ttc] [název-daląího-písma..]\n" -"\n" - -#: test/ftlint.c:226 test/ftsbit.c:224 -#, c-format -msgid "Could not set point size to %d.\n" -msgstr "Nelze nastavit velikost písma na %d bodů.\n" - -#: test/ftlint.c:239 -msgid "" -"Error with\n" -" " -msgstr "" -"Výskyt chyb\n" -" " - -#: test/ftlint.c:240 -#, c-format -msgid "glyph %4u: %s\n" -msgstr "litera %4d: %s\n" - -#: test/ftlint.c:253 -msgid "1 fail.\n" -msgstr "počet chyb: 1\n" - -#: test/ftlint.c:255 -#, c-format -msgid "%d fails.\n" -msgstr "počet chyb: %d\n" - -#: test/ftmetric.c:68 -msgid "" -"ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" -msgstr "ftmetric: výpis metrik písma TrueType -- součást projektu FreeType" - -#: test/ftmetric.c:72 -#, c-format -msgid "" -"Usage: %s [options below] point fontname[.ttf|.ttc]\n" -"\n" -" -B show sbit's metrics (default: none)\n" -" -c C use C'th font index of TrueType collection (default: 0)\n" -" -i index glyph index (default: 0)\n" -" -r R use resolution R dpi (default: 72)\n" -"\n" -msgstr "" -"Pouľití: %s [volby viz níľe] bodová-velikost název-písma[.ttf|.ttc]\n" -"\n" -" -B zobraz rozměry bitmapy (std: nezobrazuj)\n" -" -c C pouľij písmo indexu C z kolekce písem (std: 0)\n" -" -i index index litery (std: 0)\n" -" -r R rozliąení R bodů na palec (std: 72 dpi)\n" -"\n" - -#: test/ftmetric.c:259 -#, c-format -msgid "There are %d fonts in this collection.\n" -msgstr "Počet písem v kolekci: %d.\n" - -#: test/ftmetric.c:264 -#, c-format -msgid "There is no collection with index %d in this font file.\n" -msgstr "V kolekci není ľádné písmo s indexem %d.\n" - -#: test/ftmetric.c:278 -msgid "There is no embedded bitmap data in the font.\n" -msgstr "V souboru písma nejsou vloľeny ľádné bitmapy.\n" - -#: test/ftmetric.c:308 -msgid "Could not set device resolutions.\n" -msgstr "Nelze nastavit rozliąení zařízení.\n" - -#: test/ftmetric.c:315 -msgid "Could not reset instance.\n" -msgstr "Nelze inicializovat instanci.\n" - -#: test/ftmetric.c:321 -#, c-format -msgid "Instance metrics: ppemX %d, ppemY %d\n" -msgstr "Rozměry instance: ppemX %d, ppemY %d\n" - -#: test/ftmetric.c:331 test/ftsbit.c:233 -msgid "Could not allocate glyph bitmap container.\n" -msgstr "Nelze vytvořit kontejner vloľených bitmap.\n" - -#: test/ftmetric.c:339 test/ftsbit.c:257 -#, c-format -msgid "Can't load bitmap for glyph %d.\n" -msgstr "Nelze načíst bitmapu pro literu %d.\n" - -#: test/ftmetric.c:366 -msgid "Outline's metrics" -msgstr "Rozměry obrysu" - -#: test/ftmetric.c:368 -msgid "Outline glyph\n" -msgstr "Obrys litery\n" - -#: test/ftsbit.c:89 -msgid "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" -msgstr "" -"ftsbit: výpis bitmap vloľených do písma TrueType -- součást projektu FreeType" - -#: test/ftsbit.c:94 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" -msgstr "" -"Pouľití: %s ppem název-písma[.ttf|.ttc] [název-daląího-písma..]\n" -"\n" - -#: test/ftsbit.c:199 -msgid "Could not find embedded bitmaps in this font.\n" -msgstr "V souboru písma nelze nalézt ľádné vloľené bitmapy.\n" - -#: test/ftsbit.c:205 -msgid "Error while loading embedded bitmaps.\n" -msgstr "Chyba během načítání vloľených bitmap.\n" - -#: test/ftsbit.c:251 -#, c-format -msgid " no bitmap for glyph %d.\n" -msgstr " litera %d nemá ľádnou vloľenou bitmapu.\n" - -#: test/ftsbit.c:263 -#, c-format -msgid "glyph index %d = %dx%d pixels, " -msgstr "litera %d = %dx%d pixelů, " - -#: test/ftsbit.c:266 -#, c-format -msgid "advance = %ld, minBearing = [%ld,%ld]\n" -msgstr "posun = %ld, minBearing = [%ld,%ld]\n" Index: xc/extras/FreeType/po/de.po diff -u xc/extras/FreeType/po/de.po:1.1.1.3 xc/extras/FreeType/po/de.po:removed --- xc/extras/FreeType/po/de.po:1.1.1.3 Sat Feb 12 23:56:13 2000 +++ xc/extras/FreeType/po/de.po Wed Mar 16 20:59:48 2005 @@ -1,760 +0,0 @@ -# German messages for FreeType. -# Copyright (C) 1997-1998 Erwin Dieterich -# Erwin Dieterich , 1997-1998. -# -msgid "" -msgstr "" -"Project-Id-Version: FreeType 1.0\n" -"POT-Creation-Date: 1999-09-07 12:49+0000\n" -"PO-Revision-Date: 1999-05-26\n" -"Last-Translator: Werner Lemberg \n" -"Language-Team: German\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/extend/ftxerr18.c:47 -msgid "Successful function call, no error." -msgstr "Funktionsaufruf erfolgreich." - -#: lib/extend/ftxerr18.c:50 -msgid "Invalid face handle." -msgstr "Ungültiger Schrifthenkel." - -#: lib/extend/ftxerr18.c:52 -msgid "Invalid instance handle." -msgstr "Ungültiger Instanzenhenkel." - -#: lib/extend/ftxerr18.c:54 -msgid "Invalid glyph handle." -msgstr "Ungültiger Glyphhenkel." - -#: lib/extend/ftxerr18.c:56 -msgid "Invalid charmap handle." -msgstr "Ungültiger Charmaphenkel." - -#: lib/extend/ftxerr18.c:58 -msgid "Invalid result address." -msgstr "Ungültige Ergebnisadresse." - -#: lib/extend/ftxerr18.c:60 -msgid "Invalid glyph index." -msgstr "Ungültiger Glyphindex." - -#: lib/extend/ftxerr18.c:62 -msgid "Invalid argument." -msgstr "Ungültiger Übergabeparameter" - -#: lib/extend/ftxerr18.c:64 -msgid "Could not open file." -msgstr "Datei konnte nicht geöffnet werden." - -#: lib/extend/ftxerr18.c:66 -msgid "File is not a TrueType collection." -msgstr "Datei ist keine TrueType-Collection." - -#: lib/extend/ftxerr18.c:69 -msgid "Mandatory table missing." -msgstr "Eine obligatorische Tabelle fehlt." - -#: lib/extend/ftxerr18.c:71 -msgid "Invalid horizontal metrics (hmtx table broken)." -msgstr "Ungültige horizontale Metrik (`hmtx'-Tabelle defekt)." - -#: lib/extend/ftxerr18.c:73 -msgid "Invalid charmap format." -msgstr "Ungültiges Format der Zeichenkodierungstabelle." - -#: lib/extend/ftxerr18.c:75 -msgid "Invalid ppem value." -msgstr "Ungültiger ppem-Wert." - -#: lib/extend/ftxerr18.c:77 -msgid "Invalid vertical metrics (vmtx table broken)." -msgstr "Ungültige vertikale Metrik (`vmtx'-Tabelle defekt)." - -#: lib/extend/ftxerr18.c:80 -msgid "Invalid file format." -msgstr "Ungültiges Dateiformat." - -#: lib/extend/ftxerr18.c:83 -msgid "Invalid engine." -msgstr "Ungültige FreeType-Maschine (engine)." - -#: lib/extend/ftxerr18.c:85 -msgid "Too many extensions." -msgstr "Zu viele Erweiterungen." - -#: lib/extend/ftxerr18.c:87 -msgid "Extensions unsupported." -msgstr "Erweiterungen nicht unterstützt." - -#: lib/extend/ftxerr18.c:89 -msgid "Invalid extension id." -msgstr "Ungültige Erweiterungs-ID." - -#: lib/extend/ftxerr18.c:92 -msgid "No vertical data in font." -msgstr "Keine vertikale Informationen in der Schrift." - -#: lib/extend/ftxerr18.c:95 -msgid "Maximum Profile (maxp) table missing." -msgstr "`Maximum Profile (maxp)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:97 -msgid "Font Header (head) table missing." -msgstr "`Font Header (head)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:99 -msgid "Horizontal Header (hhea) table missing." -msgstr "`Horizontal Header (hhea)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:101 -msgid "Index to Location (loca) table missing." -msgstr "`Index to Location (loca)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:103 -msgid "Naming (name) table missing." -msgstr "`Naming (name)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:105 -msgid "Character to Glyph Index Mapping (cmap) tables missing." -msgstr "`Character to Glyph Index Mapping (cmap)'-Tabellen fehlen." - -#: lib/extend/ftxerr18.c:107 -msgid "Horizontal Metrics (hmtx) table missing." -msgstr "`Horizontal Metrics (hmtx)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:109 -msgid "OS/2 table missing." -msgstr "`OS/2'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:111 -msgid "PostScript (post) table missing." -msgstr "`PostScript (post)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:113 -msgid "Glyph (glyf) table missing." -msgstr "`Glyph (glyf)'-Tabelle fehlt." - -#: lib/extend/ftxerr18.c:118 -msgid "Out of memory." -msgstr "Zu wenig Speicher." - -#: lib/extend/ftxerr18.c:123 -msgid "Invalid file offset." -msgstr "Ungültiger Dateioffset." - -#: lib/extend/ftxerr18.c:125 -msgid "Invalid file read." -msgstr "Ungültiger Lesezugriff auf Datei." - -#: lib/extend/ftxerr18.c:127 -msgid "Invalid frame access." -msgstr "Ungültiger Speicherrahmenzugriff." - -#: lib/extend/ftxerr18.c:132 -msgid "Too many points." -msgstr "Zu viele Punkte." - -#: lib/extend/ftxerr18.c:134 -msgid "Too many contours." -msgstr "Zu viele Konturen." - -#: lib/extend/ftxerr18.c:136 -msgid "Invalid composite glyph." -msgstr "Ungültiges zusammengesetztes Glyph." - -#: lib/extend/ftxerr18.c:138 -msgid "Too many instructions." -msgstr "Zu viele Programminstruktionen." - -#: lib/extend/ftxerr18.c:143 -msgid "Invalid opcode." -msgstr "Ungültiger Opcode." - -#: lib/extend/ftxerr18.c:145 -msgid "Too few arguments." -msgstr "Zu wenig Übergabeparameter." - -#: lib/extend/ftxerr18.c:147 -msgid "Stack overflow." -msgstr "Stacküberlauf." - -#: lib/extend/ftxerr18.c:149 -msgid "Code overflow." -msgstr "Codeüberlauf." - -#: lib/extend/ftxerr18.c:151 -msgid "Bad argument." -msgstr "Falscher Übergabeparameter." - -#: lib/extend/ftxerr18.c:153 -msgid "Divide by zero." -msgstr "Division durch Null." - -#: lib/extend/ftxerr18.c:155 -msgid "Storage overflow." -msgstr "Speicherüberlauf." - -#: lib/extend/ftxerr18.c:157 -msgid "Control Value (cvt) table overflow." -msgstr "Überlauf der `Control Value (cvt)'-Tabelle." - -#: lib/extend/ftxerr18.c:159 -msgid "Invalid reference." -msgstr "Ungültige Referenz." - -#: lib/extend/ftxerr18.c:161 -msgid "Invalid distance." -msgstr "Ungültiger Abstand." - -#: lib/extend/ftxerr18.c:163 -msgid "Interpolate twilight points." -msgstr "Interpolation von Punkten der Zwielichtzone." - -#: lib/extend/ftxerr18.c:165 -msgid "`DEBUG' opcode found." -msgstr "`DEBUG'-Opcode gefunden." - -#: lib/extend/ftxerr18.c:167 -msgid "`ENDF' in byte-code stream." -msgstr "`ENDF' in Bytecode-Strom." - -#: lib/extend/ftxerr18.c:169 -msgid "Out of code ranges." -msgstr "Außerhalb des Codebereichs." - -#: lib/extend/ftxerr18.c:171 -msgid "Nested function definitions." -msgstr "Verschachtelte Funktionsdefinitionen." - -#: lib/extend/ftxerr18.c:173 -msgid "Invalid code range." -msgstr "Ungültiger Codebereich." - -#: lib/extend/ftxerr18.c:175 -msgid "Invalid displacement." -msgstr "Ungültige Verschiebung." - -#: lib/extend/ftxerr18.c:177 -msgid "Endless loop encountered while executing instructions." -msgstr "" -"Unendliche Schleife beim Ausführen\n" -"der Programminstruktionen entdeckt." - -#: lib/extend/ftxerr18.c:182 -msgid "Nested frame access." -msgstr "Verschachtelter Speicherrahmenzugriff." - -#: lib/extend/ftxerr18.c:184 -msgid "Invalid cache list." -msgstr "Ungütlige Cacheliste." - -#: lib/extend/ftxerr18.c:186 -msgid "Could not find context." -msgstr "Der Kontext konnte nicht gefunden werden." - -#: lib/extend/ftxerr18.c:188 -msgid "Unlisted object." -msgstr "Objekt ist nicht aufgeführt." - -#: lib/extend/ftxerr18.c:193 -msgid "Raster pool overflow." -msgstr "Überlauf des Rasterpools." - -#: lib/extend/ftxerr18.c:195 -msgid "Raster: negative height encountered." -msgstr "Raster: Negative Höhe gefunden." - -#: lib/extend/ftxerr18.c:197 -msgid "Raster: invalid value." -msgstr "Raster: Ungültiger Wert." - -#: lib/extend/ftxerr18.c:199 -msgid "Raster not initialized." -msgstr "Raster nicht initialisiert." - -#: lib/extend/ftxerr18.c:204 -msgid "Invalid kerning (kern) table format." -msgstr "Ungültiges Format der `Kerning (kern)'-Tabelle." - -#: lib/extend/ftxerr18.c:206 -msgid "Invalid kerning (kern) table." -msgstr "Ungültige `Kerning (kern)'-Tabelle." - -#: lib/extend/ftxerr18.c:208 -msgid "Invalid PostScript (post) table format." -msgstr "Ungültiges Format der `PostScript (post)'-Tabelle." - -#: lib/extend/ftxerr18.c:210 -msgid "Invalid PostScript (post) table." -msgstr "Ungültige `PostScript (post)'-Tabelle." - -#: lib/extend/ftxerr18.c:216 -msgid "Invalid TrueType Open subtable format." -msgstr "Ungültiges Format einer TrueType-Open-Subtabelle." - -#: lib/extend/ftxerr18.c:218 -msgid "Invalid TrueType Open subtable." -msgstr "Ungültige TrueType-Open-Subtabelle." - -#: lib/extend/ftxerr18.c:220 -msgid "Glyph(s) not covered by lookup." -msgstr "Glyph(en) von Lookup-Prozedur nicht erfaßt." - -#: lib/extend/ftxerr18.c:222 -msgid "Too many nested context substitutions." -msgstr "Zu viele verschachtelte Kontext-Substitutionen." - -#: lib/extend/ftxerr18.c:224 -msgid "Invalid glyph substitution (GSUB) table format." -msgstr "Ungültiges Format der `glyph substitution (GSUB)'-Tabelle." - -#: lib/extend/ftxerr18.c:226 -msgid "Invalid glyph substitution (GSUB) table." -msgstr "Ungültige `glyph substitution (GSUB)'-Tabelle." - -#: lib/extend/ftxerr18.c:228 -msgid "Invalid glyph positioning (GPOS) table format." -msgstr "Ungültiges Format der `glyph positioning (GPOS)'-Tabelle." - -#: lib/extend/ftxerr18.c:230 -msgid "Invalid glyph positioning (GPOS) table." -msgstr "Ungültige `glyph positioning (GPOS)'-Tabelle." - -#: lib/extend/ftxerr18.c:237 -msgid "Invalid Error Number." -msgstr "Ungültige Fehler-ID." - -#: test/fterror.c:60 -msgid "Start of fterror.\n" -msgstr "Beginn von fterror.\n" - -#: test/fterror.c:68 -msgid "End of fterror.\n" -msgstr "Ende von fterror.\n" - -#: test/ftdump.c:168 test/ftlint.c:207 test/ftmetric.c:292 -msgid "Could not create glyph container.\n" -msgstr "Konnte den Glyphcontainer nicht erzeugen.\n" - -#: test/ftdump.c:178 test/ftlint.c:215 test/ftmetric.c:301 test/ftsbit.c:213 -msgid "Could not create instance.\n" -msgstr "Konnte die Instanz nicht erzeugen.\n" - -#: test/ftdump.c:187 -msgid "Could not create second instance.\n" -msgstr "Konnte die zweite Instanz nicht erzeugen.\n" - -#: test/ftdump.c:193 -msgid "Memory footprint statistics:\n" -msgstr "Speicherabdruck-Statistik:\n" - -#: test/ftdump.c:201 -msgid "face object" -msgstr "Schriftobjekt" - -#: test/ftdump.c:202 -msgid "glyph object" -msgstr "Glyphobjekt" - -#: test/ftdump.c:203 -msgid "instance object" -msgstr "Instanzobjekt" - -#: test/ftdump.c:207 -msgid "exec. context object" -msgstr "Ausführbares Kontextobjekt" - -#: test/ftdump.c:214 -msgid "total memory usage" -msgstr "Gesamtverbrauch an Speicher" - -#: test/ftdump.c:222 test/ftdump.c:574 test/ftdump.c:784 test/ftdump.c:921 -#: test/ftlint.c:274 test/ftlint.c:287 test/ftmetric.c:387 test/ftsbit.c:284 -#, c-format -msgid "FreeType error message: %s\n" -msgstr "FreeType Fehlermeldung: %s\n" - -#: test/ftdump.c:299 -msgid "font name table entries\n" -msgstr "Einträge in der `name'-Tabelle der Schrift\n" - -#: test/ftdump.c:309 -#, c-format -msgid "" -"PostScript name: %s\n" -"\n" -msgstr "" -"PostScript-Name: %s\n" -"\n" - -#: test/ftdump.c:332 -msgid "character map encodings\n" -msgstr "Zeichenkodierungstabellen\n" - -#: test/ftdump.c:339 test/ftdump.c:483 -msgid "The file doesn't seem to have any encoding table.\n" -msgstr "Diese Datei enthält anscheinend keine `cmap'-Tabelle.\n" - -#: test/ftdump.c:343 test/ftdump.c:487 -#, c-format -msgid "" -"There are %hu encodings:\n" -"\n" -msgstr "" -"Es gibt %hu Kodierungen:\n" -"\n" - -#: test/ftdump.c:348 -#, c-format -msgid "encoding %2u: " -msgstr "Kodierung %2u: " - -#: test/ftdump.c:375 test/ftdump.c:384 test/ftdump.c:447 -#, c-format -msgid "Unknown value %hu" -msgstr "Unbekannter Wert %hu" - -#: test/ftdump.c:454 -msgid "Unknown" -msgstr "Unbekannt" - -#: test/ftdump.c:476 -msgid "ftxcmap test\n" -msgstr "Test von ftxcmap\n" - -#: test/ftdump.c:493 -#, c-format -msgid "encoding %2u:\n" -msgstr "Kodierung %2u:\n" - -#: test/ftdump.c:498 -#, c-format -msgid "first: glyph index %hu, character code 0x%lx\n" -msgstr "Erster Eintrag: Glyphindex %hu, Zeichenkode 0x%lx\n" - -#: test/ftdump.c:502 -#, c-format -msgid "next: glyph index %hu, character code 0x%lx\n" -msgstr "Nächster Eintrag: Glyphindex %hu, Zeichenkode 0x%lx\n" - -#: test/ftdump.c:506 -#, c-format -msgid "last: glyph index %hu, character code 0x%lx\n" -msgstr "Letzter Eintrag: Glyphindex %hu, Zeichenkode 0x%lx\n" - -#: test/ftdump.c:528 test/ftmetric.c:282 -msgid "Error while retrieving embedded bitmaps table.\n" -msgstr "Fehler beim Laden der `embedded bitmaps'-Tabelle.\n" - -#: test/ftdump.c:532 -msgid "embedded bitmap table\n" -msgstr "`embedded bitmap'-Tabelle\n" - -#: test/ftdump.c:535 -#, c-format -msgid " version of embedded bitmap table: 0x%lx\n" -msgstr " Version der `embedded bitmap'-Tabelle: 0x%lx\n" - -#: test/ftdump.c:537 -#, c-format -msgid " number of embedded bitmap strikes: %lu\n" -msgstr " Anzahl der eingebetteten Bitmapsätze: %lu\n" - -#: test/ftdump.c:547 -#, c-format -msgid " bitmap strike %hu/%lu: " -msgstr " Bitmapsatz %hu/%hu: " - -#: test/ftdump.c:550 -#, c-format -msgid "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" -msgstr "%hux%hu Pixel, Tiefe %hu Bit, Glyphbereich [%hu-%hu]\n" - -#: test/ftdump.c:559 -#, c-format -msgid " range format (%hu:%hu) glyphs %hu..%hu\n" -msgstr " Bereichsformat (%hu:%hu) Glyphen %hu-%hu\n" - -#: test/ftdump.c:610 -msgid "Error while loading GSUB table.\n" -msgstr "Fehler beim Laden der `GSUB'-Tabelle.\n" - -#: test/ftdump.c:614 -msgid "GSUB table\n" -msgstr "`GSUB'-Tabelle\n" - -#: test/ftdump.c:621 -msgid "Error while querying GSUB script list.\n" -msgstr "Fehler bei Abfrage der GSUB Schriftenliste.\n" - -#: test/ftdump.c:634 -#, c-format -msgid "Error while selecting GSUB script `%4.4s'.\n" -msgstr "Fehler bei Auswahl der GSUB Schrift `%4.4s'.\n" - -#: test/ftdump.c:639 -#, c-format -msgid " script `%4.4s' (index %hu):\n" -msgstr " Schrift `%4.4s' (Index %hu):\n" - -#: test/ftdump.c:647 -#, c-format -msgid "Error while querying GSUB default language system for script `%4.4s'.\n" -msgstr "" -"Fehler bei Abfrage der GSUB-Standardsprachenwerte für Schrift `%4.4s'.\n" - -#: test/ftdump.c:652 -msgid " default language system:\n" -msgstr " Standardsprachenwerte:\n" - -#: test/ftdump.c:665 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for default language system of script `%4.4s'.\n" -msgstr "" -"Fehler bei Auswahl des GSUB-Merkmals `%4.4s'\n" -"für Standardsprachenwert der Schrift `%4.4s'.\n" - -#: test/ftdump.c:671 test/ftdump.c:752 -#, c-format -msgid " feature `%4.4s' (index %hu; lookup " -msgstr " Merkmal `%4.4s' (Index %hu; Lookup " - -#: test/ftdump.c:687 -#, c-format -msgid "Error while querying GSUB language list for script `%4.4s'.\n" -msgstr "Fehler bei Abfrage der GSUB-Sprachenliste für Schrift `%4.4s'.\n" - -#: test/ftdump.c:704 -#, c-format -msgid "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" -msgstr "Fehler bei Auswahl der GSUB-Sprache `%4.4s' für Schrift `%4.4s'.\n" - -#: test/ftdump.c:709 -#, c-format -msgid " language `%4.4s' (index %hu):\n" -msgstr " Sprache `%4.4s' (Index %hu):\n" - -#: test/ftdump.c:714 -#, c-format -msgid " required feature index %hu (lookup " -msgstr " Benötigtes Merkmal: Index %hu (Lookup " - -#: test/ftdump.c:729 -#, c-format -msgid "" -"Error while querying GSUB feature list\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Fehler bei Abfrage der GSUB-Merkmaltabelle\n" -"für Schrift `%4.4s', Sprache `%4.4s'.\n" - -#: test/ftdump.c:746 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Fehler bei Auswahl des GSUB-Merkmals `%4.4s'\n" -"für Schrift `%4.4s', Sprache `%4.4s'.\n" - -#: test/ftdump.c:771 -msgid "" -"Lookups:\n" -"\n" -msgstr "" -"Lookups:\n" -"\n" - -#: test/ftdump.c:774 -#, c-format -msgid " %hu: type %hu, flag 0x%x\n" -msgstr " %hu: Typ %hu, Flag 0x%x\n" - -#: test/ftdump.c:809 -msgid "ftdump: Simple TrueType Dumper -- part of the FreeType project" -msgstr "ftdump: Ein einfacher TrueType Dumper -- Teil des FreeType-Projekts" - -#: test/ftdump.c:813 -#, c-format -msgid "" -"Usage: %s fontname[.ttf|.ttc]\n" -"\n" -msgstr "" -"Verwendung: %s Fontname[.ttf|.ttc]\n" -"\n" - -#: test/ftdump.c:845 test/ftlint.c:134 test/ftmetric.c:226 test/ftsbit.c:126 -msgid "Error while initializing engine.\n" -msgstr "Fehler beim Starten von FreeType.\n" - -#: test/ftdump.c:852 test/ftmetric.c:234 test/ftsbit.c:133 -msgid "Error while initializing embedded bitmap extension.\n" -msgstr "Fehler bei Initialisierung der Erweiterung für eingebettete Bitmaps.\n" - -#: test/ftdump.c:859 -msgid "Error while initializing GSUB extension.\n" -msgstr "Fehler beim Starten der GSUB-Erweiterung.\n" - -#: test/ftdump.c:875 test/ftlint.c:187 test/ftmetric.c:249 test/ftsbit.c:181 -#, c-format -msgid "Could not find or open %s.\n" -msgstr "Datei `%s' konnte nicht gefunden oder geöffnet werden.\n" - -#: test/ftdump.c:878 test/ftlint.c:193 test/ftmetric.c:252 test/ftsbit.c:187 -#, c-format -msgid "Error while opening %s.\n" -msgstr "Fehler beim Öffnen von %s.\n" - -#: test/ftlint.c:94 -msgid "" -"ftlint: Simple TrueType instruction tester -- part of the FreeType project" -msgstr "" -"ftlint: Ein einfacher TTF Instruktionen-Tester -- Teil des FreeType-Projekts" - -#: test/ftlint.c:99 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n" -"\n" -msgstr "" -"Verwendung: %s ppem Fontname[.ttf|.ttc] [Fontname2..]\n" -"\n" - -#: test/ftlint.c:226 test/ftsbit.c:224 -#, c-format -msgid "Could not set point size to %d.\n" -msgstr "Konnte die Schriftgröße nicht auf %d Punkt setzen.\n" - -#: test/ftlint.c:239 -msgid "" -"Error with\n" -" " -msgstr "" -"Fehler bei\n" -" " - -#: test/ftlint.c:240 -#, c-format -msgid "glyph %4u: %s\n" -msgstr "Glyph %4u: %s\n" - -#: test/ftlint.c:253 -msgid "1 fail.\n" -msgstr "1 mal gescheitert.\n" - -#: test/ftlint.c:255 -#, c-format -msgid "%d fails.\n" -msgstr "%d mal gescheitert.\n" - -#: test/ftmetric.c:68 -msgid "" -"ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" -msgstr "" -"ftmetric: Ein einfacher TTF Metrik/Glyph-Dumper -- Teil des FreeType-Projekts" - -#: test/ftmetric.c:72 -#, c-format -msgid "" -"Usage: %s [options below] point fontname[.ttf|.ttc]\n" -"\n" -" -B show sbit's metrics (default: none)\n" -" -c C use C'th font index of TrueType collection (default: 0)\n" -" -i index glyph index (default: 0)\n" -" -r R use resolution R dpi (default: 72)\n" -"\n" -msgstr "" -"Verwendung: %s [Optionen s.u.] Punktgröße Fontname[.ttf|.ttc]\n" -"\n" -" -B zeige Metriken von eingebetteten Bitmaps (Standardwert: nein)\n" -" -c C verwende den `C'ten Fontindex der TrueType-Collection\n" -" (Standardwert: 0)\n" -" -i Index Glyphindex (Standardwert: 0)\n" -" -r R verwende Auflösung `R' dpi (Standardwert: 72)\n" -"\n" - -#: test/ftmetric.c:259 -#, c-format -msgid "There are %d fonts in this collection.\n" -msgstr "Es gibt %d Fonts in dieser TrueType-Collection.\n" - -#: test/ftmetric.c:264 -#, c-format -msgid "There is no collection with index %d in this font file.\n" -msgstr "In dieser Fontdatei gibt es keine Collection mit Index %d.\n" - -#: test/ftmetric.c:278 -msgid "There is no embedded bitmap data in the font.\n" -msgstr "Konnte keine eingebetteten Bitmaps in Fontdatei finden.\n" - -#: test/ftmetric.c:308 -msgid "Could not set device resolutions.\n" -msgstr "Konnte die Geräteauflösung nicht setzen.\n" - -#: test/ftmetric.c:315 -msgid "Could not reset instance.\n" -msgstr "Konnte die Instanz nicht neu setzen.\n" - -#: test/ftmetric.c:321 -#, c-format -msgid "Instance metrics: ppemX %d, ppemY %d\n" -msgstr "Instanzmetriken: ppemX %d, ppemY %d\n" - -#: test/ftmetric.c:331 test/ftsbit.c:233 -msgid "Could not allocate glyph bitmap container.\n" -msgstr "Konnte den Glyphcontainer für Bitmaps nicht erzeugen.\n" - -#: test/ftmetric.c:339 test/ftsbit.c:257 -#, c-format -msgid "Can't load bitmap for glyph %d.\n" -msgstr "Kann Bitmap für Glyph %d nicht laden.\n" - -#: test/ftmetric.c:366 -msgid "Outline's metrics" -msgstr "Vektormetriken" - -#: test/ftmetric.c:368 -msgid "Outline glyph\n" -msgstr "Vektorglyph\n" - -#: test/ftsbit.c:89 -msgid "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" -msgstr "" -"ftsbit: Ein einfacher TrueType `sbit' Dumper -- Teil des FreeType-Projekts" - -#: test/ftsbit.c:94 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" -msgstr "" -"Verwendung: %s ppem Fontname[.ttf|.ttc] Glyphindex [Glyphindex2..]\n" -"\n" - -#: test/ftsbit.c:199 -msgid "Could not find embedded bitmaps in this font.\n" -msgstr "Konnte keine eingebetteten Bitmaps in Fontdatei finden.\n" - -#: test/ftsbit.c:205 -msgid "Error while loading embedded bitmaps.\n" -msgstr "Fehler beim Laden von eingebettete Bitmaps.\n" - -#: test/ftsbit.c:251 -#, c-format -msgid " no bitmap for glyph %d.\n" -msgstr " keine Bitmap für Glyph %d.\n" - -#: test/ftsbit.c:263 -#, c-format -msgid "glyph index %d = %dx%d pixels, " -msgstr "Glyphindex %d = %dx%d Pixel, " - -#: test/ftsbit.c:266 -#, c-format -msgid "advance = %ld, minBearing = [%ld,%ld]\n" -msgstr "Vorschubbreite = %ld, `minBearing' = [%ld,%ld]\n" Index: xc/extras/FreeType/po/es.po diff -u xc/extras/FreeType/po/es.po:1.1.1.3 xc/extras/FreeType/po/es.po:removed --- xc/extras/FreeType/po/es.po:1.1.1.3 Sat Feb 12 23:56:13 2000 +++ xc/extras/FreeType/po/es.po Wed Mar 16 20:59:48 2005 @@ -1,762 +0,0 @@ -# Spanish messages for FreeType. -# Copyright (C) 1998-99 Miguel A. Pérez Valdenebro -# Miguel A. Pérez Valdenebro , 1998. -# -msgid "" -msgstr "" -"Project-Id-Version: FreeType 1.3\n" -"POT-Creation-Date: 1999-09-07 12:49+0000\n" -"PO-Revision-Date: 1999-09-01\n" -"Last-Translator: \n" -"Language-Team: Spanish\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/extend/ftxerr18.c:47 -msgid "Successful function call, no error." -msgstr "Éxito en la llamada a función." - -#: lib/extend/ftxerr18.c:50 -msgid "Invalid face handle." -msgstr "Ticket de diseńo inválido." - -#: lib/extend/ftxerr18.c:52 -msgid "Invalid instance handle." -msgstr "Ticket de instancia inválido." - -#: lib/extend/ftxerr18.c:54 -msgid "Invalid glyph handle." -msgstr "Ticket de glifo inválido." - -#: lib/extend/ftxerr18.c:56 -msgid "Invalid charmap handle." -msgstr "Ticket de codificación inválido." - -#: lib/extend/ftxerr18.c:58 -msgid "Invalid result address." -msgstr "Dirección del resultado inválida." - -#: lib/extend/ftxerr18.c:60 -msgid "Invalid glyph index." -msgstr "Índice de glifo inválido." - -#: lib/extend/ftxerr18.c:62 -msgid "Invalid argument." -msgstr "Argumento inválido." - -#: lib/extend/ftxerr18.c:64 -msgid "Could not open file." -msgstr "No se puedo abrir el fichero." - -#: lib/extend/ftxerr18.c:66 -msgid "File is not a TrueType collection." -msgstr "El fichero no es una colección TrueType." - -#: lib/extend/ftxerr18.c:69 -msgid "Mandatory table missing." -msgstr "No se encuentra une tabla obligatoria." - -#: lib/extend/ftxerr18.c:71 -msgid "Invalid horizontal metrics (hmtx table broken)." -msgstr "Dimensiones horizontales (tabla `hmtx') incorrectas." - -#: lib/extend/ftxerr18.c:73 -msgid "Invalid charmap format." -msgstr "Formato de codificación inválido." - -#: lib/extend/ftxerr18.c:75 -msgid "Invalid ppem value." -msgstr "Tamańo en pixel invalido." - -#: lib/extend/ftxerr18.c:77 -msgid "Invalid vertical metrics (vmtx table broken)." -msgstr "Dimensiones verticales (tabla `vmtx') incorrectas." - -#: lib/extend/ftxerr18.c:80 -msgid "Invalid file format." -msgstr "Formato de fichero inválido." - -#: lib/extend/ftxerr18.c:83 -msgid "Invalid engine." -msgstr "Instancia de la biblioteca incorrecta." - -#: lib/extend/ftxerr18.c:85 -msgid "Too many extensions." -msgstr "Demasiadas extensiones (max:8)." - -#: lib/extend/ftxerr18.c:87 -msgid "Extensions unsupported." -msgstr "Extensión no soportada." - -#: lib/extend/ftxerr18.c:89 -msgid "Invalid extension id." -msgstr "Identificador de extensión inválido." - -#: lib/extend/ftxerr18.c:92 -msgid "No vertical data in font." -msgstr "Placa sin datos verticales." - -#: lib/extend/ftxerr18.c:95 -msgid "Maximum Profile (maxp) table missing." -msgstr "No se encuentra la tabla `maxp'." - -#: lib/extend/ftxerr18.c:97 -msgid "Font Header (head) table missing." -msgstr "No se encuentra la cabecera (head) de la placa." - -#: lib/extend/ftxerr18.c:99 -msgid "Horizontal Header (hhea) table missing." -msgstr "No se encuentra la cabecera para la horizontal (hhea)." - -#: lib/extend/ftxerr18.c:101 -msgid "Index to Location (loca) table missing." -msgstr "No se encuentra la tabla de los posiciones (loca)." - -#: lib/extend/ftxerr18.c:103 -msgid "Naming (name) table missing." -msgstr "No se encuentra la tabla de los nombres (name)." - -#: lib/extend/ftxerr18.c:105 -msgid "Character to Glyph Index Mapping (cmap) tables missing." -msgstr "" -"No se encuentra la tabla de correspondencia de carácter a glifo (cmap)." - -#: lib/extend/ftxerr18.c:107 -msgid "Horizontal Metrics (hmtx) table missing." -msgstr "No se encuentra la tabla de dimensiones horizontales (hmtx)." - -#: lib/extend/ftxerr18.c:109 -msgid "OS/2 table missing." -msgstr "No se encuentra la tabla `OS/2'." - -#: lib/extend/ftxerr18.c:111 -msgid "PostScript (post) table missing." -msgstr "No se encuentra la tabla PostScript (post)." - -#: lib/extend/ftxerr18.c:113 -msgid "Glyph (glyf) table missing." -msgstr "No se encuentra los glifos (tabla `glyf')." - -#: lib/extend/ftxerr18.c:118 -msgid "Out of memory." -msgstr "No hay suficiente memoria." - -#: lib/extend/ftxerr18.c:123 -msgid "Invalid file offset." -msgstr "Dirección en el fichero inválido." - -#: lib/extend/ftxerr18.c:125 -msgid "Invalid file read." -msgstr "Lectura de fichero incorrecta." - -#: lib/extend/ftxerr18.c:127 -msgid "Invalid frame access." -msgstr "Ventana de acceso inválida." - -#: lib/extend/ftxerr18.c:132 -msgid "Too many points." -msgstr "Demasiados puntos de control." - -#: lib/extend/ftxerr18.c:134 -msgid "Too many contours." -msgstr "Demasiados contornos." - -#: lib/extend/ftxerr18.c:136 -msgid "Invalid composite glyph." -msgstr "Glifo compuesto inválido." - -#: lib/extend/ftxerr18.c:138 -msgid "Too many instructions." -msgstr "Demasiadas instrucciones." - -#: lib/extend/ftxerr18.c:143 -msgid "Invalid opcode." -msgstr "Código de operación inválido." - -#: lib/extend/ftxerr18.c:145 -msgid "Too few arguments." -msgstr "Hace falta más argumentos." - -#: lib/extend/ftxerr18.c:147 -msgid "Stack overflow." -msgstr "Desbordamiento de pila." - -#: lib/extend/ftxerr18.c:149 -msgid "Code overflow." -msgstr "Desbordamiento de código." - -#: lib/extend/ftxerr18.c:151 -msgid "Bad argument." -msgstr "Argumento incorrecto." - -#: lib/extend/ftxerr18.c:153 -msgid "Divide by zero." -msgstr "División por cero." - -#: lib/extend/ftxerr18.c:155 -msgid "Storage overflow." -msgstr "Desbordamiento de capacidad en el almacen." - -#: lib/extend/ftxerr18.c:157 -msgid "Control Value (cvt) table overflow." -msgstr "Desbordamiento de capacidad (tabla CVT)." - -#: lib/extend/ftxerr18.c:159 -msgid "Invalid reference." -msgstr "Referencia incorrecta." - -#: lib/extend/ftxerr18.c:161 -msgid "Invalid distance." -msgstr "Distancia incorrecta." - -#: lib/extend/ftxerr18.c:163 -msgid "Interpolate twilight points." -msgstr "Interpolación de marcas (puntos de referencia)." - -#: lib/extend/ftxerr18.c:165 -msgid "`DEBUG' opcode found." -msgstr "Se ha encontrado la instrucción `DEBUG'." - -#: lib/extend/ftxerr18.c:167 -msgid "`ENDF' in byte-code stream." -msgstr "Se ha encontrado `ENDF' en el programa de un glifo." - -#: lib/extend/ftxerr18.c:169 -msgid "Out of code ranges." -msgstr "Demasiados espacios de ejecución (code ranges)." - -#: lib/extend/ftxerr18.c:171 -msgid "Nested function definitions." -msgstr "Definiciones de funciones encajadas." - -#: lib/extend/ftxerr18.c:173 -msgid "Invalid code range." -msgstr "Espacio de ejecución (code range) incorrecto." - -#: lib/extend/ftxerr18.c:175 -msgid "Invalid displacement." -msgstr "Desplazamiento inválido." - -#: lib/extend/ftxerr18.c:177 -msgid "Endless loop encountered while executing instructions." -msgstr "" -"Se ha encontrado bucle sin fin durante la ejecución de las instrucciones." - -#: lib/extend/ftxerr18.c:182 -msgid "Nested frame access." -msgstr "Ventanas de acceso encajadas." - -#: lib/extend/ftxerr18.c:184 -msgid "Invalid cache list." -msgstr "Lista de `cache' inválida." - -#: lib/extend/ftxerr18.c:186 -msgid "Could not find context." -msgstr "No se puede encontrar el contexto." - -#: lib/extend/ftxerr18.c:188 -msgid "Unlisted object." -msgstr "Este objeto no es encadenado en el `cache'." - -#: lib/extend/ftxerr18.c:193 -msgid "Raster pool overflow." -msgstr "Tramador: Desbordamiento de memoria." - -#: lib/extend/ftxerr18.c:195 -msgid "Raster: negative height encountered." -msgstr "Tramador: altura negativa." - -#: lib/extend/ftxerr18.c:197 -msgid "Raster: invalid value." -msgstr "Tramador: valor erroneo." - -#: lib/extend/ftxerr18.c:199 -msgid "Raster not initialized." -msgstr "Tramador no inicializado." - -#: lib/extend/ftxerr18.c:204 -msgid "Invalid kerning (kern) table format." -msgstr "Formato de la tabla `kern' incorrecto." - -#: lib/extend/ftxerr18.c:206 -msgid "Invalid kerning (kern) table." -msgstr "Tabla `kern' inválida." - -#: lib/extend/ftxerr18.c:208 -msgid "Invalid PostScript (post) table format." -msgstr "Formato de tabla PostScript (post) incorrecto." - -#: lib/extend/ftxerr18.c:210 -msgid "Invalid PostScript (post) table." -msgstr "Tabla PostScript (post) inválida." - -#: lib/extend/ftxerr18.c:216 -msgid "Invalid TrueType Open subtable format." -msgstr "Formato de la tabla TrueType Open incorrecto." - -#: lib/extend/ftxerr18.c:218 -msgid "Invalid TrueType Open subtable." -msgstr "Tabla TrueType Open inválida." - -#: lib/extend/ftxerr18.c:220 -msgid "Glyph(s) not covered by lookup." -msgstr "Estos glifos no existen en las tablas de busqueda (lookups)." - -#: lib/extend/ftxerr18.c:222 -msgid "Too many nested context substitutions." -msgstr "Demasiados cambios contextuales encajados." - -#: lib/extend/ftxerr18.c:224 -msgid "Invalid glyph substitution (GSUB) table format." -msgstr "Formato de la tabla de cambios de glifos (GSUB) incorrecto." - -#: lib/extend/ftxerr18.c:226 -msgid "Invalid glyph substitution (GSUB) table." -msgstr "Tabla de cambios de glifos (GSUB) inválida." - -#: lib/extend/ftxerr18.c:228 -msgid "Invalid glyph positioning (GPOS) table format." -msgstr "Formato de la tabla de posiciones de los glifos (GPOS) incorrecto." - -#: lib/extend/ftxerr18.c:230 -msgid "Invalid glyph positioning (GPOS) table." -msgstr "Tabla de posiciones de los glifos (GPOS) inválida." - -#: lib/extend/ftxerr18.c:237 -msgid "Invalid Error Number." -msgstr "Número de Error Inválido." - -#: test/fterror.c:60 -msgid "Start of fterror.\n" -msgstr "Inicio de fterror.\n" - -#: test/fterror.c:68 -msgid "End of fterror.\n" -msgstr "Fin de fterror.\n" - -#: test/ftdump.c:168 test/ftlint.c:207 test/ftmetric.c:292 -msgid "Could not create glyph container.\n" -msgstr "No se puede crear una caja de glifo.\n" - -#: test/ftdump.c:178 test/ftlint.c:215 test/ftmetric.c:301 test/ftsbit.c:213 -msgid "Could not create instance.\n" -msgstr "No se puede crear una instancia.\n" - -#: test/ftdump.c:187 -msgid "Could not create second instance.\n" -msgstr "No se puede crear una segunda instancia.\n" - -#: test/ftdump.c:193 -msgid "Memory footprint statistics:\n" -msgstr "Estadísticas de asignación de memoria:\n" - -#: test/ftdump.c:201 -msgid "face object" -msgstr "objeto diseńo" - -#: test/ftdump.c:202 -msgid "glyph object" -msgstr "objeto glifo" - -#: test/ftdump.c:203 -msgid "instance object" -msgstr "objeto instancia" - -#: test/ftdump.c:207 -msgid "exec. context object" -msgstr "objeto contexto de calculo" - -#: test/ftdump.c:214 -msgid "total memory usage" -msgstr "uso total de memoria" - -#: test/ftdump.c:222 test/ftdump.c:574 test/ftdump.c:784 test/ftdump.c:921 -#: test/ftlint.c:274 test/ftlint.c:287 test/ftmetric.c:387 test/ftsbit.c:284 -#, c-format -msgid "FreeType error message: %s\n" -msgstr "Mensaje de error FreeType: %s\n" - -#: test/ftdump.c:299 -msgid "font name table entries\n" -msgstr "Entradas en la tabla de nombres\n" - -#: test/ftdump.c:309 -#, c-format -msgid "" -"PostScript name: %s\n" -"\n" -msgstr "" -"Nombre de la PostScript: %s\n" -"\n" - -#: test/ftdump.c:332 -msgid "character map encodings\n" -msgstr "Codificaciones del mapa de caracteres\n" - -#: test/ftdump.c:339 test/ftdump.c:483 -msgid "The file doesn't seem to have any encoding table.\n" -msgstr "La placa no parece tener ninguna tabla de codificación.\n" - -#: test/ftdump.c:343 test/ftdump.c:487 -#, c-format -msgid "" -"There are %hu encodings:\n" -"\n" -msgstr "" -"Hay %hu codificaciones:\n" -"\n" - -#: test/ftdump.c:348 -#, c-format -msgid "encoding %2u: " -msgstr " codificación %2u: " - -#: test/ftdump.c:375 test/ftdump.c:384 test/ftdump.c:447 -#, c-format -msgid "Unknown value %hu" -msgstr "Desconocido %hu" - -#: test/ftdump.c:454 -msgid "Unknown" -msgstr "Desconocido" - -#: test/ftdump.c:476 -msgid "ftxcmap test\n" -msgstr "Muestra de ftxcmap\n" - -#: test/ftdump.c:493 -#, c-format -msgid "encoding %2u:\n" -msgstr "Codificación %2u:\n" - -#: test/ftdump.c:498 -#, c-format -msgid "first: glyph index %hu, character code 0x%lx\n" -msgstr "primero: glifo índice %hu, codigo de carácter 0x%lx\n" - -#: test/ftdump.c:502 -#, c-format -msgid "next: glyph index %hu, character code 0x%lx\n" -msgstr "siguiente: glifo índice %hu, codigo de carácter 0x%lx\n" - -#: test/ftdump.c:506 -#, c-format -msgid "last: glyph index %hu, character code 0x%lx\n" -msgstr "ultimo: glifo índice %hu, codigo de carácter 0x%lx\n" - -#: test/ftdump.c:528 test/ftmetric.c:282 -msgid "Error while retrieving embedded bitmaps table.\n" -msgstr "Error durante la recuperación de los bitmaps.\n" - -#: test/ftdump.c:532 -msgid "embedded bitmap table\n" -msgstr "Tabla de bitmaps\n" - -#: test/ftdump.c:535 -#, c-format -msgid " version of embedded bitmap table: 0x%lx\n" -msgstr " version de la tabla de bitmap: 0x%lx\n" - -#: test/ftdump.c:537 -#, c-format -msgid " number of embedded bitmap strikes: %lu\n" -msgstr " número de tamańos de bitmaps: %lu\n" - -#: test/ftdump.c:547 -#, c-format -msgid " bitmap strike %hu/%lu: " -msgstr " tamańo %hu en %lu: " - -#: test/ftdump.c:550 -#, c-format -msgid "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" -msgstr "%hux%hu pixels, en %hu bits, glifos [%hu...%hu]\n" - -#: test/ftdump.c:559 -#, c-format -msgid " range format (%hu:%hu) glyphs %hu..%hu\n" -msgstr " formato intervalo (%hu:%hu) glifos %hu...%hu\n" - -#: test/ftdump.c:610 -msgid "Error while loading GSUB table.\n" -msgstr "Error durante la creación de la tabla GSUB.\n" - -#: test/ftdump.c:614 -msgid "GSUB table\n" -msgstr "Table de cambios de glifos (GSUB)\n" - -#: test/ftdump.c:621 -msgid "Error while querying GSUB script list.\n" -msgstr "Error durante la busqueda de la lista de las escrituras en GSUB.\n" - -#: test/ftdump.c:634 -#, c-format -msgid "Error while selecting GSUB script `%4.4s'.\n" -msgstr "Error durante la selección de la escritura `%4.4s' en GSUB.\n" - -#: test/ftdump.c:639 -#, c-format -msgid " script `%4.4s' (index %hu):\n" -msgstr " escritura `%4.4s' (índice %hu):\n" - -#: test/ftdump.c:647 -#, c-format -msgid "Error while querying GSUB default language system for script `%4.4s'.\n" -msgstr "" -"Error durante la busqueda en GSUB de las informaciones\n" -"relativas a las lenguas estandar de la escritura `%4.4s'.\n" - -#: test/ftdump.c:652 -msgid " default language system:\n" -msgstr " lenguas estandar:\n" - -#: test/ftdump.c:665 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for default language system of script `%4.4s'.\n" -msgstr "" -"Error durante la selección de la información `%4.4s' en GSUB\n" -"para las lenguas estandar de la escritura `%4.4s'.\n" - -#: test/ftdump.c:671 test/ftdump.c:752 -#, c-format -msgid " feature `%4.4s' (index %hu; lookup " -msgstr " información `%4.4s' (índice %hu: tabla de busqueda " - -#: test/ftdump.c:687 -#, c-format -msgid "Error while querying GSUB language list for script `%4.4s'.\n" -msgstr "" -"Error durante la busqueda de las lenguas de la escritura `%4.4s' en GSUB.\n" - -#: test/ftdump.c:704 -#, c-format -msgid "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" -msgstr "" -"Error durante la selección de la lengua `%4.4s' para `%4.4s' en GSUB.\n" - -#: test/ftdump.c:709 -#, c-format -msgid " language `%4.4s' (index %hu):\n" -msgstr " lengua `%4.4s' (índice %hu):\n" - -#: test/ftdump.c:714 -#, c-format -msgid " required feature index %hu (lookup " -msgstr " información obligatoria índice %hu (tabla de busqueda " - -#: test/ftdump.c:729 -#, c-format -msgid "" -"Error while querying GSUB feature list\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Error durante la busqueda en GSUB de las informaciones\n" -"relativas a la escritura `%4.4s', lengua `%4.4s'.\n" - -#: test/ftdump.c:746 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Error durante la selección de la información `%4.4s'\n" -"relativa a la escritura `%4.4s', lengua `%4.4s' en GSUB.\n" - -#: test/ftdump.c:771 -msgid "" -"Lookups:\n" -"\n" -msgstr "Tabla de busqueda:\n" - -#: test/ftdump.c:774 -#, c-format -msgid " %hu: type %hu, flag 0x%x\n" -msgstr " %hu: tipo %hu, indicador 0x%x\n" - -# -#: test/ftdump.c:809 -msgid "ftdump: Simple TrueType Dumper -- part of the FreeType project" -msgstr "" -"ftdump: información sobre placas TrueType -- parte del proyecto FreeType" - -#: test/ftdump.c:813 -#, c-format -msgid "" -"Usage: %s fontname[.ttf|.ttc]\n" -"\n" -msgstr "" -"Uso: %s nombre_de_la_placa[.ttf|.ttc]\n" -"\n" - -#: test/ftdump.c:845 test/ftlint.c:134 test/ftmetric.c:226 test/ftsbit.c:126 -msgid "Error while initializing engine.\n" -msgstr "Error durante la inicialización de la biblioteca.\n" - -#: test/ftdump.c:852 test/ftmetric.c:234 test/ftsbit.c:133 -msgid "Error while initializing embedded bitmap extension.\n" -msgstr "Error durante la inicialización de la extensión `bitmap'.\n" - -#: test/ftdump.c:859 -msgid "Error while initializing GSUB extension.\n" -msgstr "Error durante la inicialización de la extensión `GSUB'.\n" - -#: test/ftdump.c:875 test/ftlint.c:187 test/ftmetric.c:249 test/ftsbit.c:181 -#, c-format -msgid "Could not find or open %s.\n" -msgstr "No se puede encontrar o abrir el fichero %s.\n" - -#: test/ftdump.c:878 test/ftlint.c:193 test/ftmetric.c:252 test/ftsbit.c:187 -#, c-format -msgid "Error while opening %s.\n" -msgstr "Error abriendo %s.\n" - -#: test/ftlint.c:94 -msgid "" -"ftlint: Simple TrueType instruction tester -- part of the FreeType project" -msgstr "" -"ftlint: verificador de instrucciones TrueType -- parte del proyecto FreeType" - -#: test/ftlint.c:99 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n" -"\n" -msgstr "" -"Uso: %s ppem nombre_de_la_placa[.ttf|.ttc] [nombre2...]\n" -"\n" - -#: test/ftlint.c:226 test/ftsbit.c:224 -#, c-format -msgid "Could not set point size to %d.\n" -msgstr "No se puede asignar el tamańo del punto a %d.\n" - -#: test/ftlint.c:239 -msgid "" -"Error with\n" -" " -msgstr "" -"Error con\n" -" " - -#: test/ftlint.c:240 -#, c-format -msgid "glyph %4u: %s\n" -msgstr "glifo %4u: %s\n" - -#: test/ftlint.c:253 -msgid "1 fail.\n" -msgstr "1 error.\n" - -#: test/ftlint.c:255 -#, c-format -msgid "%d fails.\n" -msgstr "%d errores.\n" - -#: test/ftmetric.c:68 -msgid "" -"ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" -msgstr "" -"ftmetric: información sobre dimensiones TrueType -- parte del proyecto " -"FreeType" - -#: test/ftmetric.c:72 -#, c-format -msgid "" -"Usage: %s [options below] point fontname[.ttf|.ttc]\n" -"\n" -" -B show sbit's metrics (default: none)\n" -" -c C use C'th font index of TrueType collection (default: 0)\n" -" -i index glyph index (default: 0)\n" -" -r R use resolution R dpi (default: 72)\n" -"\n" -msgstr "" -"Uso: %s [optiones] ppem nombre_de_la_placa[.ttf|.ttc]\n" -"\n" -" -B muestra dimensiones de los sbit's (default: no)\n" -" -c C usa (C+1)Ş placa de la collección TrueType (default: 1Ş)\n" -" -i index muestra esto glifo (default: primero glifo)\n" -" -r R usa resolución R en dpi (default: 72)\n" -"\n" - -#: test/ftmetric.c:259 -#, c-format -msgid "There are %d fonts in this collection.\n" -msgstr "Hay %d placas en esta collección.\n" - -#: test/ftmetric.c:264 -#, c-format -msgid "There is no collection with index %d in this font file.\n" -msgstr "No hay placa con índice %d en esto fichero.\n" - -#: test/ftmetric.c:278 -msgid "There is no embedded bitmap data in the font.\n" -msgstr "No hay bitmaps en esto fichero.\n" - -#: test/ftmetric.c:308 -msgid "Could not set device resolutions.\n" -msgstr "No se puede poner esta resolución.\n" - -#: test/ftmetric.c:315 -msgid "Could not reset instance.\n" -msgstr "No se puede inicializar la instancia.\n" - -#: test/ftmetric.c:321 -#, c-format -msgid "Instance metrics: ppemX %d, ppemY %d\n" -msgstr "Dimensiones: ppemX %d, ppemY %d\n" - -#: test/ftmetric.c:331 test/ftsbit.c:233 -msgid "Could not allocate glyph bitmap container.\n" -msgstr "No se puede crear un contenedor de bitmap.\n" - -#: test/ftmetric.c:339 test/ftsbit.c:257 -#, c-format -msgid "Can't load bitmap for glyph %d.\n" -msgstr "Ne se puede crear un bitmap para el glifo %d.\n" - -#: test/ftmetric.c:366 -msgid "Outline's metrics" -msgstr "Dimensiones del contorno" - -#: test/ftmetric.c:368 -msgid "Outline glyph\n" -msgstr "Glifo utilizando el contorno\n" - -#: test/ftsbit.c:89 -msgid "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" -msgstr "ftsbit: bitmaps de una placa TrueType -- parte del proyecto FreeType" - -#: test/ftsbit.c:94 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" -msgstr "" -"Uso: %s ppem nombre_de_font[.ttf|.ttc] índice_de_glifo [índice2...]\n" -"\n" - -#: test/ftsbit.c:199 -msgid "Could not find embedded bitmaps in this font.\n" -msgstr "No se puede encontrar bitmaps en esto fichero.\n" - -#: test/ftsbit.c:205 -msgid "Error while loading embedded bitmaps.\n" -msgstr "Error durante la lectura de los bitmaps.\n" - -#: test/ftsbit.c:251 -#, c-format -msgid " no bitmap for glyph %d.\n" -msgstr " no bitmap para el glifo %d.\n" - -#: test/ftsbit.c:263 -#, c-format -msgid "glyph index %d = %dx%d pixels, " -msgstr "glifo índice %d = %dx%d pixels, " - -#: test/ftsbit.c:266 -#, c-format -msgid "advance = %ld, minBearing = [%ld,%ld]\n" -msgstr "`advance' = %ld, `bearings' = [%ld,%ld]\n" Index: xc/extras/FreeType/po/fr.po diff -u xc/extras/FreeType/po/fr.po:1.1.1.3 xc/extras/FreeType/po/fr.po:removed --- xc/extras/FreeType/po/fr.po:1.1.1.3 Sat Feb 12 23:56:14 2000 +++ xc/extras/FreeType/po/fr.po Wed Mar 16 20:59:48 2005 @@ -1,752 +0,0 @@ -# French messages for FreeType, without accents. -# Copyright (C) 1998-99 David Turner -# David Turner , 1998 -# -msgid "" -msgstr "" -"Project-Id-Version: FreeType 1.3\n" -"POT-Creation-Date: 1999-09-07 12:49+0000\n" -"PO-Revision-Date: 1999-09-01 20:00+0200\n" -"Last-Translator: David Turner \n" -"Language-Team: French\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=us-ascii\n" -"Content-Transfer-Encoding: 7bit\n" - -#: lib/extend/ftxerr18.c:47 -msgid "Successful function call, no error." -msgstr "Appel de fonction reussi, pas d'erreur." - -#: lib/extend/ftxerr18.c:50 -msgid "Invalid face handle." -msgstr "Mauvais handle d'oeil (face)." - -#: lib/extend/ftxerr18.c:52 -msgid "Invalid instance handle." -msgstr "Mauvais handle d'instance." - -#: lib/extend/ftxerr18.c:54 -msgid "Invalid glyph handle." -msgstr "Mauvais handle de glyphe." - -#: lib/extend/ftxerr18.c:56 -msgid "Invalid charmap handle." -msgstr "Mauvais handle d'encodage (charmap)." - -#: lib/extend/ftxerr18.c:58 -msgid "Invalid result address." -msgstr "Mauvaise adresse de resultat." - -#: lib/extend/ftxerr18.c:60 -msgid "Invalid glyph index." -msgstr "Numero de glyphe incorrect." - -#: lib/extend/ftxerr18.c:62 -msgid "Invalid argument." -msgstr "Argument incorrect." - -#: lib/extend/ftxerr18.c:64 -msgid "Could not open file." -msgstr "Le fichier n'a pas pu etre ouvert." - -#: lib/extend/ftxerr18.c:66 -msgid "File is not a TrueType collection." -msgstr "Ce fichier n'est pas une collection." - -#: lib/extend/ftxerr18.c:69 -msgid "Mandatory table missing." -msgstr "Il manque une table critique." - -#: lib/extend/ftxerr18.c:71 -msgid "Invalid horizontal metrics (hmtx table broken)." -msgstr "Metriques horizontales (table `hmtx') incorrectes." - -#: lib/extend/ftxerr18.c:73 -msgid "Invalid charmap format." -msgstr "Format d'encodage (charmap) invalide." - -#: lib/extend/ftxerr18.c:75 -msgid "Invalid ppem value." -msgstr "Taille en pixels incorrecte." - -#: lib/extend/ftxerr18.c:77 -msgid "Invalid vertical metrics (vmtx table broken)." -msgstr "Metriques verticales (table `vmtx') incorrectes." - -#: lib/extend/ftxerr18.c:80 -msgid "Invalid file format." -msgstr "Format de fichier invalide." - -#: lib/extend/ftxerr18.c:83 -msgid "Invalid engine." -msgstr "Mauvaise instance de bibliotheque (engine)" - -#: lib/extend/ftxerr18.c:85 -msgid "Too many extensions." -msgstr "Trop d'extensions utilisees (max: 8)." - -#: lib/extend/ftxerr18.c:87 -msgid "Extensions unsupported." -msgstr "Extensions non disponibles." - -#: lib/extend/ftxerr18.c:89 -msgid "Invalid extension id." -msgstr "Mauvais numero d'extension." - -#: lib/extend/ftxerr18.c:92 -msgid "No vertical data in font." -msgstr "Pas de donnees verticales dans cette police." - -#: lib/extend/ftxerr18.c:95 -msgid "Maximum Profile (maxp) table missing." -msgstr "Il manque la table `maxp'." - -#: lib/extend/ftxerr18.c:97 -msgid "Font Header (head) table missing." -msgstr "Il manque l'en-tete de police (head)." - -#: lib/extend/ftxerr18.c:99 -msgid "Horizontal Header (hhea) table missing." -msgstr "Il manque l'en-tete pour l'horizontale (hhea)." - -#: lib/extend/ftxerr18.c:101 -msgid "Index to Location (loca) table missing." -msgstr "Il manque les index de glyphes (table `loca')." - -#: lib/extend/ftxerr18.c:103 -msgid "Naming (name) table missing." -msgstr "Il manque la table des noms (name)." - -#: lib/extend/ftxerr18.c:105 -msgid "Character to Glyph Index Mapping (cmap) tables missing." -msgstr "Il manque la table des encodages (cmap)." - -#: lib/extend/ftxerr18.c:107 -msgid "Horizontal Metrics (hmtx) table missing." -msgstr "Il manque les metriques horizontales (hmtx)." - -#: lib/extend/ftxerr18.c:109 -msgid "OS/2 table missing." -msgstr "Il manque la table `OS/2'." - -#: lib/extend/ftxerr18.c:111 -msgid "PostScript (post) table missing." -msgstr "Il manque la table Postscript (post)." - -#: lib/extend/ftxerr18.c:113 -msgid "Glyph (glyf) table missing." -msgstr "Il manque les glyphes (table `glyf')." - -#: lib/extend/ftxerr18.c:118 -msgid "Out of memory." -msgstr "Pas assez de memoire." - -#: lib/extend/ftxerr18.c:123 -msgid "Invalid file offset." -msgstr "Adresse dans le fichier incorrecte." - -#: lib/extend/ftxerr18.c:125 -msgid "Invalid file read." -msgstr "Lecture du fichier impossible." - -#: lib/extend/ftxerr18.c:127 -msgid "Invalid frame access." -msgstr "Fenetre d'access incorrecte." - -#: lib/extend/ftxerr18.c:132 -msgid "Too many points." -msgstr "Trop de points." - -#: lib/extend/ftxerr18.c:134 -msgid "Too many contours." -msgstr "Trop de contours." - -#: lib/extend/ftxerr18.c:136 -msgid "Invalid composite glyph." -msgstr "Glyphe compose invalide." - -#: lib/extend/ftxerr18.c:138 -msgid "Too many instructions." -msgstr "Trop d'instructions." - -#: lib/extend/ftxerr18.c:143 -msgid "Invalid opcode." -msgstr "Code-operation invalide." - -#: lib/extend/ftxerr18.c:145 -msgid "Too few arguments." -msgstr "Il manque un ou des arguments." - -#: lib/extend/ftxerr18.c:147 -msgid "Stack overflow." -msgstr "Debordement de la pile." - -#: lib/extend/ftxerr18.c:149 -msgid "Code overflow." -msgstr "Debordement dans le code." - -#: lib/extend/ftxerr18.c:151 -msgid "Bad argument." -msgstr "Mauvais argument." - -#: lib/extend/ftxerr18.c:153 -msgid "Divide by zero." -msgstr "Division par zero." - -#: lib/extend/ftxerr18.c:155 -msgid "Storage overflow." -msgstr "Depassement de capacite (stockage)." - -#: lib/extend/ftxerr18.c:157 -msgid "Control Value (cvt) table overflow." -msgstr "Depassement de capacite (tableau cvt)." - -#: lib/extend/ftxerr18.c:159 -msgid "Invalid reference." -msgstr "Reference incorrecte." - -#: lib/extend/ftxerr18.c:161 -msgid "Invalid distance." -msgstr "Distance incorrecte." - -#: lib/extend/ftxerr18.c:163 -msgid "Interpolate twilight points." -msgstr "Interpolation de points de repere." - -#: lib/extend/ftxerr18.c:165 -msgid "`DEBUG' opcode found." -msgstr "Le code `DEBUG' a ete rencontre." - -#: lib/extend/ftxerr18.c:167 -msgid "`ENDF' in byte-code stream." -msgstr "'ENDF' invalide dans les instructions d'un glyphe." - -#: lib/extend/ftxerr18.c:169 -msgid "Out of code ranges." -msgstr "Pas assez d'espace d'execution (code ranges)." - -#: lib/extend/ftxerr18.c:171 -msgid "Nested function definitions." -msgstr "Definitions imbriquees de fonction." - -#: lib/extend/ftxerr18.c:173 -msgid "Invalid code range." -msgstr "Espace d'execution (code range) incorrect." - -#: lib/extend/ftxerr18.c:175 -msgid "Invalid displacement." -msgstr "Deplacement invalide." - -#: lib/extend/ftxerr18.c:177 -msgid "Endless loop encountered while executing instructions." -msgstr "Arret force d'une boucle infinie." - -#: lib/extend/ftxerr18.c:182 -msgid "Nested frame access." -msgstr "Fenetres d'acces imbriquees." - -#: lib/extend/ftxerr18.c:184 -msgid "Invalid cache list." -msgstr "(Mauvaise liste chainee de caches)." - -#: lib/extend/ftxerr18.c:186 -msgid "Could not find context." -msgstr "Contexte introuvable." - -#: lib/extend/ftxerr18.c:188 -msgid "Unlisted object." -msgstr "Objet non chaine dans le cache." - -#: lib/extend/ftxerr18.c:193 -msgid "Raster pool overflow." -msgstr "Debordement de memoire de la trameuse." - -#: lib/extend/ftxerr18.c:195 -msgid "Raster: negative height encountered." -msgstr "Trameuse: hauteur negative." - -#: lib/extend/ftxerr18.c:197 -msgid "Raster: invalid value." -msgstr "Trameuse: valeur incorrecte." - -#: lib/extend/ftxerr18.c:199 -msgid "Raster not initialized." -msgstr "Trameuse: non initialisee." - -#: lib/extend/ftxerr18.c:204 -msgid "Invalid kerning (kern) table format." -msgstr "Format de table de crenage (kern) invalide." - -#: lib/extend/ftxerr18.c:206 -msgid "Invalid kerning (kern) table." -msgstr "Table de crenage (kern) incorrecte." - -#: lib/extend/ftxerr18.c:208 -msgid "Invalid PostScript (post) table format." -msgstr "Format de table Postscript (post) invalide." - -#: lib/extend/ftxerr18.c:210 -msgid "Invalid PostScript (post) table." -msgstr "Table Postscript (post) incorrecte." - -#: lib/extend/ftxerr18.c:216 -msgid "Invalid TrueType Open subtable format." -msgstr "Format de table TrueType Open invalide." - -#: lib/extend/ftxerr18.c:218 -msgid "Invalid TrueType Open subtable." -msgstr "Sous-table TrueType Open incorrecte." - -#: lib/extend/ftxerr18.c:220 -msgid "Glyph(s) not covered by lookup." -msgstr "Des glyphes sont absents d'une table de recherche (lookup)." - -#: lib/extend/ftxerr18.c:222 -msgid "Too many nested context substitutions." -msgstr "Substitutions contextuelles imbriquees trop profondement." - -#: lib/extend/ftxerr18.c:224 -msgid "Invalid glyph substitution (GSUB) table format." -msgstr "Format de la table de substitution de glyphes (GSUB) invalide." - -#: lib/extend/ftxerr18.c:226 -msgid "Invalid glyph substitution (GSUB) table." -msgstr "Table de substitution de glyphes (GSUB) incorrecte." - -#: lib/extend/ftxerr18.c:228 -msgid "Invalid glyph positioning (GPOS) table format." -msgstr "Format de table de positionnement des glyphes (GPOS) invalide." - -#: lib/extend/ftxerr18.c:230 -msgid "Invalid glyph positioning (GPOS) table." -msgstr "Table de positionnement des glyphes (GPOS) incorrecte." - -#: lib/extend/ftxerr18.c:237 -msgid "Invalid Error Number." -msgstr "Numero d'erreur inconnu ?" - -#: test/fterror.c:60 -msgid "Start of fterror.\n" -msgstr "Debut de fterror.\n" - -#: test/fterror.c:68 -msgid "End of fterror.\n" -msgstr "Fin de fterror.\n" - -#: test/ftdump.c:168 test/ftlint.c:207 test/ftmetric.c:292 -msgid "Could not create glyph container.\n" -msgstr "Impossible de creer un conteneur de glyphe.\n" - -#: test/ftdump.c:178 test/ftlint.c:215 test/ftmetric.c:301 test/ftsbit.c:213 -msgid "Could not create instance.\n" -msgstr "Impossible de creer une instance\n" - -#: test/ftdump.c:187 -msgid "Could not create second instance.\n" -msgstr "Impossible de creer une deuxieme instance.\n" - -#: test/ftdump.c:193 -msgid "Memory footprint statistics:\n" -msgstr "Statistiques de consommation de la memoire:\n" - -#: test/ftdump.c:201 -msgid "face object" -msgstr "objet oeil" - -#: test/ftdump.c:202 -msgid "glyph object" -msgstr "objet glyphe" - -#: test/ftdump.c:203 -msgid "instance object" -msgstr "objet instance" - -#: test/ftdump.c:207 -msgid "exec. context object" -msgstr "objet contexte" - -#: test/ftdump.c:214 -msgid "total memory usage" -msgstr "consommation totale de memoire" - -#: test/ftdump.c:222 test/ftdump.c:574 test/ftdump.c:784 test/ftdump.c:921 -#: test/ftlint.c:274 test/ftlint.c:287 test/ftmetric.c:387 test/ftsbit.c:284 -#, c-format -msgid "FreeType error message: %s\n" -msgstr "Message d'erreur FreeType : %s\n" - -#: test/ftdump.c:299 -msgid "font name table entries\n" -msgstr "Elements du tableau des noms\n" - -#: test/ftdump.c:309 -#, c-format -msgid "" -"PostScript name: %s\n" -"\n" -msgstr "" -"Nom de Postscript : %s\n" -"\n" - -#: test/ftdump.c:332 -msgid "character map encodings\n" -msgstr "Encodages des caracteres\n" - -#: test/ftdump.c:339 test/ftdump.c:483 -msgid "The file doesn't seem to have any encoding table.\n" -msgstr "Cette police ne semble pas avoir de table d'encodage.\n" - -#: test/ftdump.c:343 test/ftdump.c:487 -#, c-format -msgid "" -"There are %hu encodings:\n" -"\n" -msgstr "" -"Il y a %hu encodage(s) :\n" -"\n" - -#: test/ftdump.c:348 -#, c-format -msgid "encoding %2u: " -msgstr "encodage %2u : " - -#: test/ftdump.c:375 test/ftdump.c:384 test/ftdump.c:447 -#, c-format -msgid "Unknown value %hu" -msgstr "(valeur inconnue %hu)" - -#: test/ftdump.c:454 -msgid "Unknown" -msgstr "(inconnu)" - -#: test/ftdump.c:476 -msgid "ftxcmap test\n" -msgstr "Test de ftxcmap\n" - -#: test/ftdump.c:493 -#, c-format -msgid "encoding %2u:\n" -msgstr "encodage %2u :\n" - -#: test/ftdump.c:498 -#, c-format -msgid "first: glyph index %hu, character code 0x%lx\n" -msgstr "premier : glyphe numero %hu, caractere code 0x%lx\n" - -#: test/ftdump.c:502 -#, c-format -msgid "next: glyph index %hu, character code 0x%lx\n" -msgstr "suivant : glyphe numero %hu, caractere code 0x%lx\n" - -#: test/ftdump.c:506 -#, c-format -msgid "last: glyph index %hu, character code 0x%lx\n" -msgstr "dernier : glyphe numero %hu, caractere code 0x%lx\n" - -#: test/ftdump.c:528 test/ftmetric.c:282 -msgid "Error while retrieving embedded bitmaps table.\n" -msgstr "Erreur pendant la recuperation de la table des bitmaps.\n" - -#: test/ftdump.c:532 -msgid "embedded bitmap table\n" -msgstr "Table des bitmaps incorpores\n" - -#: test/ftdump.c:535 -#, c-format -msgid " version of embedded bitmap table: 0x%lx\n" -msgstr " version de la table de bitmaps : 0x%lx\n" - -#: test/ftdump.c:537 -#, c-format -msgid " number of embedded bitmap strikes: %lu\n" -msgstr " nombre de tailles de bitmaps : %lu\n" - -#: test/ftdump.c:547 -#, c-format -msgid " bitmap strike %hu/%lu: " -msgstr " taille de bitmap %hu sur %lu : " - -#: test/ftdump.c:550 -#, c-format -msgid "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" -msgstr "%hux%hu pixels par %hu bit(s), glyphes de %hu a %hu\n" - -#: test/ftdump.c:559 -#, c-format -msgid " range format (%hu:%hu) glyphs %hu..%hu\n" -msgstr " format intervalle (%hu:%hu) glyphes %hu a %hu\n" - -#: test/ftdump.c:610 -msgid "Error while loading GSUB table.\n" -msgstr "Erreur en chargeant la table GSUB.\n" - -#: test/ftdump.c:614 -msgid "GSUB table\n" -msgstr "Table des substitutions de glyphes (GSUB)\n" - -#: test/ftdump.c:621 -msgid "Error while querying GSUB script list.\n" -msgstr "Erreur en demandant la liste des ecritures dans GSUB.\n" - -#: test/ftdump.c:634 -#, c-format -msgid "Error while selecting GSUB script `%4.4s'.\n" -msgstr "Erreur en selectionnant l'ecriture `%4.4s' dans GSUB.\n" - -#: test/ftdump.c:639 -#, c-format -msgid " script `%4.4s' (index %hu):\n" -msgstr " Ecriture `%4.4s' (numero %hu)\n" - -#: test/ftdump.c:647 -#, c-format -msgid "Error while querying GSUB default language system for script `%4.4s'.\n" -msgstr "Erreur en cherchant pour les langues standards de `%4.4s' dans GSUB.\n" - -#: test/ftdump.c:652 -msgid " default language system:\n" -msgstr " Langue standard :\n" - -#: test/ftdump.c:665 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for default language system of script `%4.4s'.\n" -msgstr "" -"Erreur en selectionnant dans GSUB l'information `%4.4s'\n" -"pour la langue standard de l'ecriture `%4.4s'.\n" - -#: test/ftdump.c:671 test/ftdump.c:752 -#, c-format -msgid " feature `%4.4s' (index %hu; lookup " -msgstr " information `%4.4s' (numero %hu ; table(s) de recherche " - -#: test/ftdump.c:687 -#, c-format -msgid "Error while querying GSUB language list for script `%4.4s'.\n" -msgstr "Erreur en demandant la liste des langues pour `%4.4s' dans GSUB.\n" - -#: test/ftdump.c:704 -#, c-format -msgid "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" -msgstr "Erreur en selectionnant la langue `%4.4s' pour `%4.4s' dans GSUB.\n" - -#: test/ftdump.c:709 -#, c-format -msgid " language `%4.4s' (index %hu):\n" -msgstr " langue `%4.4s' (numero %hu) :\n" - -#: test/ftdump.c:714 -#, c-format -msgid " required feature index %hu (lookup " -msgstr " information requise (table(s) de recherche " - -#: test/ftdump.c:729 -#, c-format -msgid "" -"Error while querying GSUB feature list\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Erreur en recherchant dans GSUB la liste des informations\n" -"pour l'ecriture `%4.4s', langue `%4.4s'.\n" - -#: test/ftdump.c:746 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Erreur en selectionnant dans GSUB l'information `%4.4s'\n" -"pour l'ecriture `%4.4s', langue `%4.4s'.\n" - -#: test/ftdump.c:771 -msgid "" -"Lookups:\n" -"\n" -msgstr " Tables de recherche :\n" - -#: test/ftdump.c:774 -#, c-format -msgid " %hu: type %hu, flag 0x%x\n" -msgstr "%4hu : type %hu, drapeaux 0x%x\n" - -#: test/ftdump.c:809 -msgid "ftdump: Simple TrueType Dumper -- part of the FreeType project" -msgstr "ftdump : utilitaire d'informations TrueType -- www.freetype.org" - -#: test/ftdump.c:813 -#, c-format -msgid "" -"Usage: %s fontname[.ttf|.ttc]\n" -"\n" -msgstr "" -"Utilisation : %s nompolice[.ttf|.ttc]\n" -"\n" - -#: test/ftdump.c:845 test/ftlint.c:134 test/ftmetric.c:226 test/ftsbit.c:126 -msgid "Error while initializing engine.\n" -msgstr "Erreur lors de l'initialisation de FreeType.\n" - -#: test/ftdump.c:852 test/ftmetric.c:234 test/ftsbit.c:133 -msgid "Error while initializing embedded bitmap extension.\n" -msgstr "Erreur lors de l'initialisation de l'extension `bitmaps'.\n" - -#: test/ftdump.c:859 -msgid "Error while initializing GSUB extension.\n" -msgstr "Erreur lors de l'initialisation de l'extension `GSUB'.\n" - -#: test/ftdump.c:875 test/ftlint.c:187 test/ftmetric.c:249 test/ftsbit.c:181 -#, c-format -msgid "Could not find or open %s.\n" -msgstr "Impossible de trouver ou d'ouvrir %s.\n" - -#: test/ftdump.c:878 test/ftlint.c:193 test/ftmetric.c:252 test/ftsbit.c:187 -#, c-format -msgid "Error while opening %s.\n" -msgstr "Erreur lors de l'ouverture de %s.\n" - -#: test/ftlint.c:94 -msgid "" -"ftlint: Simple TrueType instruction tester -- part of the FreeType project" -msgstr "" -"ftlint : verificateur simple d'instructions TrueType - www.freetype.org" - -#: test/ftlint.c:99 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n" -"\n" -msgstr "" -"Utilisation : %s ppem nompolice[.ttf|.ttc] [nompolice2...]\n" -"\n" - -#: test/ftlint.c:226 test/ftsbit.c:224 -#, c-format -msgid "Could not set point size to %d.\n" -msgstr "Impossible de selectionner la taille %d.\n" - -#: test/ftlint.c:239 -msgid "" -"Error with\n" -" " -msgstr "" -"Erreur avec\n" -" " - -#: test/ftlint.c:240 -#, c-format -msgid "glyph %4u: %s\n" -msgstr "glyphe %4u : %s\n" - -#: test/ftlint.c:253 -msgid "1 fail.\n" -msgstr "1 echec.\n" - -#: test/ftlint.c:255 -#, c-format -msgid "%d fails.\n" -msgstr "%d echecs.\n" - -#: test/ftmetric.c:68 -msgid "" -"ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" -msgstr "ftmetric : affichage des metriques TrueType -- www.freetype.org" - -#: test/ftmetric.c:72 -#, c-format -msgid "" -"Usage: %s [options below] point fontname[.ttf|.ttc]\n" -"\n" -" -B show sbit's metrics (default: none)\n" -" -c C use C'th font index of TrueType collection (default: 0)\n" -" -i index glyph index (default: 0)\n" -" -r R use resolution R dpi (default: 72)\n" -"\n" -msgstr "" -"Utilisation : %s [options] point nompolice[.ttf|.ttc]\n" -"\n" -" -B montrer les metriques des bitmaps (defaut : non)\n" -" -c C utilise la police numero C d'une collection (defaut : 0)\n" -" -i index numero du glyphe (default : 0)\n" -" -r R resolution en dpi (defaut : 72)\n" -"\n" - -#: test/ftmetric.c:259 -#, c-format -msgid "There are %d fonts in this collection.\n" -msgstr "Il y a %d polices dans cette collection.\n" - -#: test/ftmetric.c:264 -#, c-format -msgid "There is no collection with index %d in this font file.\n" -msgstr "Il n'y a aucune police d'indice %d dans cette collection.\n" - -#: test/ftmetric.c:278 -msgid "There is no embedded bitmap data in the font.\n" -msgstr "Il n'y a pas de bitmaps dans cette police.\n" - -#: test/ftmetric.c:308 -msgid "Could not set device resolutions.\n" -msgstr "Impossible de changer la resolution.\n" - -#: test/ftmetric.c:315 -msgid "Could not reset instance.\n" -msgstr "Impossible de changer la taile.\n" - -#: test/ftmetric.c:321 -#, c-format -msgid "Instance metrics: ppemX %d, ppemY %d\n" -msgstr "Metriques de l'instance : ppemX %d ppemY %d\n" - -#: test/ftmetric.c:331 test/ftsbit.c:233 -msgid "Could not allocate glyph bitmap container.\n" -msgstr "Impossible d'allouer un conteneur de glyphe.\n" - -#: test/ftmetric.c:339 test/ftsbit.c:257 -#, c-format -msgid "Can't load bitmap for glyph %d.\n" -msgstr "Impossible de charger le bitmap du glyphe %d.\n" - -#: test/ftmetric.c:366 -msgid "Outline's metrics" -msgstr "Metriques du dessin vectorise" - -#: test/ftmetric.c:368 -msgid "Outline glyph\n" -msgstr "glyphe du dessin vectorise\n" - -#: test/ftsbit.c:89 -msgid "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" -msgstr "ftsbit : affichage des `sbit' TrueType -- www.freetype.org" - -#: test/ftsbit.c:94 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" -msgstr "" -"Utilisation : %s ppm nompolice[.ttf|.ttc] numero_glyphe [numero_glyphe2...]\n" -"\n" - -#: test/ftsbit.c:199 -msgid "Could not find embedded bitmaps in this font.\n" -msgstr "Pas de bitmaps dans cette police.\n" - -#: test/ftsbit.c:205 -msgid "Error while loading embedded bitmaps.\n" -msgstr "Erreur lors du chargement des bitmaps.\n" - -#: test/ftsbit.c:251 -#, c-format -msgid " no bitmap for glyph %d.\n" -msgstr " pas de bitmap pour le glyphe %d.\n" - -#: test/ftsbit.c:263 -#, c-format -msgid "glyph index %d = %dx%d pixels, " -msgstr "glyphe numero %d = %dx%d pixels, " - -#: test/ftsbit.c:266 -#, c-format -msgid "advance = %ld, minBearing = [%ld,%ld]\n" -msgstr "chasse = %ld, approches = [%ld,%ld]\n" Index: xc/extras/FreeType/po/nl.po diff -u xc/extras/FreeType/po/nl.po:1.1.1.3 xc/extras/FreeType/po/nl.po:removed --- xc/extras/FreeType/po/nl.po:1.1.1.3 Sat Feb 12 23:56:14 2000 +++ xc/extras/FreeType/po/nl.po Wed Mar 16 20:59:48 2005 @@ -1,758 +0,0 @@ -# Dutch messages for FreeType. -# Copyright (C) 1998-1999 Gertjan de Back -# Gertjan de Back , 1999. -# -msgid "" -msgstr "" -"Project-Id-Version: FreeType 1.0\n" -"POT-Creation-Date: 1999-09-07 12:49+0000\n" -"PO-Revision-Date: 1999-09-07\n" -"Last-Translator: Gertjan de Back \n" -"Language-Team: Dutch\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/extend/ftxerr18.c:47 -msgid "Successful function call, no error." -msgstr "Functieaanroep succesvol." - -#: lib/extend/ftxerr18.c:50 -msgid "Invalid face handle." -msgstr "Ongeldige Face handle." - -#: lib/extend/ftxerr18.c:52 -msgid "Invalid instance handle." -msgstr "Ongeldige Instance handle." - -#: lib/extend/ftxerr18.c:54 -msgid "Invalid glyph handle." -msgstr "Ongeldige Glyph handle." - -#: lib/extend/ftxerr18.c:56 -msgid "Invalid charmap handle." -msgstr "Ongeldige Charmap handle." - -#: lib/extend/ftxerr18.c:58 -msgid "Invalid result address." -msgstr "Ongeldig resultaat adres." - -#: lib/extend/ftxerr18.c:60 -msgid "Invalid glyph index." -msgstr "Ongeldige Glyph index." - -#: lib/extend/ftxerr18.c:62 -msgid "Invalid argument." -msgstr "Ongeldig argument." - -#: lib/extend/ftxerr18.c:64 -msgid "Could not open file." -msgstr "Bestand kon niet geopend worden." - -#: lib/extend/ftxerr18.c:66 -msgid "File is not a TrueType collection." -msgstr "Bestand is geen TrueType collectie." - -#: lib/extend/ftxerr18.c:69 -msgid "Mandatory table missing." -msgstr "Vereiste tabel ontbreekt." - -#: lib/extend/ftxerr18.c:71 -msgid "Invalid horizontal metrics (hmtx table broken)." -msgstr "Ongeldige horizontale metriek (hmtx tabel defect)." - -#: lib/extend/ftxerr18.c:73 -msgid "Invalid charmap format." -msgstr "Ongeldige Charmap opmaak." - -#: lib/extend/ftxerr18.c:75 -msgid "Invalid ppem value." -msgstr "Ongeldige ppem waarde." - -#: lib/extend/ftxerr18.c:77 -msgid "Invalid vertical metrics (vmtx table broken)." -msgstr "Ongeldige vertikale metriek (vmtx tabel defect)." - -#: lib/extend/ftxerr18.c:80 -msgid "Invalid file format." -msgstr "Ongeldige bestandsopmaak." - -#: lib/extend/ftxerr18.c:83 -msgid "Invalid engine." -msgstr "Ongeldige engine." - -#: lib/extend/ftxerr18.c:85 -msgid "Too many extensions." -msgstr "Te veel uitbreidingen." - -#: lib/extend/ftxerr18.c:87 -msgid "Extensions unsupported." -msgstr "Uitbreidingen niet ondersteund." - -#: lib/extend/ftxerr18.c:89 -msgid "Invalid extension id." -msgstr "Ongeldige uitbreiding id." - -#: lib/extend/ftxerr18.c:92 -msgid "No vertical data in font." -msgstr "Geen vertikale informatie in lettertype." - -#: lib/extend/ftxerr18.c:95 -msgid "Maximum Profile (maxp) table missing." -msgstr "`Maximum Profile (maxp)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:97 -msgid "Font Header (head) table missing." -msgstr "`Font Header (head)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:99 -msgid "Horizontal Header (hhea) table missing." -msgstr "`Horizontal Header (hhea)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:101 -msgid "Index to Location (loca) table missing." -msgstr "`Index to Location (loca)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:103 -msgid "Naming (name) table missing." -msgstr "`Naming (name)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:105 -msgid "Character to Glyph Index Mapping (cmap) tables missing." -msgstr "`Character to Glyph Index Mapping (cmap)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:107 -msgid "Horizontal Metrics (hmtx) table missing." -msgstr "`Horizontal Metrics (hmtx)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:109 -msgid "OS/2 table missing." -msgstr "OS/2 tabel ontbreekt." - -#: lib/extend/ftxerr18.c:111 -msgid "PostScript (post) table missing." -msgstr "`PostScript (post)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:113 -msgid "Glyph (glyf) table missing." -msgstr "`Naming (glyf)' tabel ontbreekt." - -#: lib/extend/ftxerr18.c:118 -msgid "Out of memory." -msgstr "Onvoldoende geheugen." - -#: lib/extend/ftxerr18.c:123 -msgid "Invalid file offset." -msgstr "Bestand positie ongeldig." - -#: lib/extend/ftxerr18.c:125 -msgid "Invalid file read." -msgstr "Lezen van bestand ongeldig." - -#: lib/extend/ftxerr18.c:127 -msgid "Invalid frame access." -msgstr "Toegang tot frame ongeldig." - -#: lib/extend/ftxerr18.c:132 -msgid "Too many points." -msgstr "Te veel punten." - -#: lib/extend/ftxerr18.c:134 -msgid "Too many contours." -msgstr "Te veel contouren." - -#: lib/extend/ftxerr18.c:136 -msgid "Invalid composite glyph." -msgstr "Samengestelde Glyph ongeldig." - -#: lib/extend/ftxerr18.c:138 -msgid "Too many instructions." -msgstr "Te veel instructies." - -#: lib/extend/ftxerr18.c:143 -msgid "Invalid opcode." -msgstr "Ongeldige opcode." - -#: lib/extend/ftxerr18.c:145 -msgid "Too few arguments." -msgstr "Te weinig argumenten." - -#: lib/extend/ftxerr18.c:147 -msgid "Stack overflow." -msgstr "Stack overloop." - -#: lib/extend/ftxerr18.c:149 -msgid "Code overflow." -msgstr "Code overloop." - -#: lib/extend/ftxerr18.c:151 -msgid "Bad argument." -msgstr "Foutief argument." - -#: lib/extend/ftxerr18.c:153 -msgid "Divide by zero." -msgstr "Deling door nul." - -#: lib/extend/ftxerr18.c:155 -msgid "Storage overflow." -msgstr "Opslag overloop." - -#: lib/extend/ftxerr18.c:157 -msgid "Control Value (cvt) table overflow." -msgstr "`Control Value (cvt)' tabel overloop." - -#: lib/extend/ftxerr18.c:159 -msgid "Invalid reference." -msgstr "Ongeldige referentie." - -#: lib/extend/ftxerr18.c:161 -msgid "Invalid distance." -msgstr "Ongeldige afstand." - -#: lib/extend/ftxerr18.c:163 -msgid "Interpolate twilight points." -msgstr "Interpolatie van schemer (twilight) punten." - -#: lib/extend/ftxerr18.c:165 -msgid "`DEBUG' opcode found." -msgstr "`DEBUG'-opcode gevonden." - -#: lib/extend/ftxerr18.c:167 -msgid "`ENDF' in byte-code stream." -msgstr "`ENDF' in bytecode-stroom." - -#: lib/extend/ftxerr18.c:169 -msgid "Out of code ranges." -msgstr "Onvoldoende codegebieden." - -#: lib/extend/ftxerr18.c:171 -msgid "Nested function definitions." -msgstr "Functiedefinities genest." - -#: lib/extend/ftxerr18.c:173 -msgid "Invalid code range." -msgstr "Ongeldig codegebied." - -#: lib/extend/ftxerr18.c:175 -msgid "Invalid displacement." -msgstr "Ongeldige verplaatsing." - -#: lib/extend/ftxerr18.c:177 -msgid "Endless loop encountered while executing instructions." -msgstr "Oneindige loop aangetrofffen tijdens het uitvoeren van instructies." - -#: lib/extend/ftxerr18.c:182 -msgid "Nested frame access." -msgstr "Frame toegang genest." - -#: lib/extend/ftxerr18.c:184 -msgid "Invalid cache list." -msgstr "Ongeldige cachelijst." - -#: lib/extend/ftxerr18.c:186 -msgid "Could not find context." -msgstr "Context niet gevonden." - -#: lib/extend/ftxerr18.c:188 -msgid "Unlisted object." -msgstr "Object niet aanwezig." - -#: lib/extend/ftxerr18.c:193 -msgid "Raster pool overflow." -msgstr "Overloop van Raster pool." - -#: lib/extend/ftxerr18.c:195 -msgid "Raster: negative height encountered." -msgstr "Raster: negatieve hoogte aangetroffen." - -#: lib/extend/ftxerr18.c:197 -msgid "Raster: invalid value." -msgstr "Raster: ongeldige waarde." - -#: lib/extend/ftxerr18.c:199 -msgid "Raster not initialized." -msgstr "Raster niet geinitialiseerd." - -#: lib/extend/ftxerr18.c:204 -msgid "Invalid kerning (kern) table format." -msgstr "Ongeldige `Kerning (kern)' tabel opmaak." - -#: lib/extend/ftxerr18.c:206 -msgid "Invalid kerning (kern) table." -msgstr "Ongeldige `Kerning (kern)' tabel." - -#: lib/extend/ftxerr18.c:208 -msgid "Invalid PostScript (post) table format." -msgstr "Ongeldige `PostScript (post)' tabel opmaak." - -#: lib/extend/ftxerr18.c:210 -msgid "Invalid PostScript (post) table." -msgstr "Ongeldige `PostScript (post)' tabel." - -#: lib/extend/ftxerr18.c:216 -msgid "Invalid TrueType Open subtable format." -msgstr "Ongeldige opmaak van TrueType Open subtabel." - -#: lib/extend/ftxerr18.c:218 -msgid "Invalid TrueType Open subtable." -msgstr "Ongeldige TrueType Open subtabel." - -#: lib/extend/ftxerr18.c:220 -msgid "Glyph(s) not covered by lookup." -msgstr "Glyph(s) niet door opgenomen in Lookup." - -#: lib/extend/ftxerr18.c:222 -msgid "Too many nested context substitutions." -msgstr "Te veel geneste context vervangingen." - -#: lib/extend/ftxerr18.c:224 -msgid "Invalid glyph substitution (GSUB) table format." -msgstr "Ongeldige Glyph vervanging (GSUB) tabel opmaak." - -#: lib/extend/ftxerr18.c:226 -msgid "Invalid glyph substitution (GSUB) table." -msgstr "Ongeldige Glyph vervanging (GSUB) tabel." - -#: lib/extend/ftxerr18.c:228 -msgid "Invalid glyph positioning (GPOS) table format." -msgstr "Ongeldige Glyph plaatsing (GPOS) tabel opmaak." - -#: lib/extend/ftxerr18.c:230 -msgid "Invalid glyph positioning (GPOS) table." -msgstr "Ongeldige Glyph plaatsing (GPOS) tabel." - -#: lib/extend/ftxerr18.c:237 -msgid "Invalid Error Number." -msgstr "Ongeldig foutnummer." - -#: test/fterror.c:60 -msgid "Start of fterror.\n" -msgstr "Begin van fterror.\n" - -#: test/fterror.c:68 -msgid "End of fterror.\n" -msgstr "Einde van fterror.\n" - -#: test/ftdump.c:168 test/ftlint.c:207 test/ftmetric.c:292 -msgid "Could not create glyph container.\n" -msgstr "Aanmaken Glyph container mislukt.\n" - -#: test/ftdump.c:178 test/ftlint.c:215 test/ftmetric.c:301 test/ftsbit.c:213 -msgid "Could not create instance.\n" -msgstr "Aanmaken Instance mislukt.\n" - -#: test/ftdump.c:187 -msgid "Could not create second instance.\n" -msgstr "Aanmaken tweede Instance mislukt.\n" - -#: test/ftdump.c:193 -msgid "Memory footprint statistics:\n" -msgstr "Statistieken geheugengebruik:\n" - -#: test/ftdump.c:201 -msgid "face object" -msgstr "Face object" - -#: test/ftdump.c:202 -msgid "glyph object" -msgstr "Glyph object" - -#: test/ftdump.c:203 -msgid "instance object" -msgstr "Instance object" - -#: test/ftdump.c:207 -msgid "exec. context object" -msgstr "uitv. context object" - -#: test/ftdump.c:214 -msgid "total memory usage" -msgstr "totaal geheugengebruik" - -#: test/ftdump.c:222 test/ftdump.c:574 test/ftdump.c:784 test/ftdump.c:921 -#: test/ftlint.c:274 test/ftlint.c:287 test/ftmetric.c:387 test/ftsbit.c:284 -#, c-format -msgid "FreeType error message: %s\n" -msgstr "FreeType foutmelding: %s\n" - -#: test/ftdump.c:299 -msgid "font name table entries\n" -msgstr "lettertypen in namentabel\n" - -#: test/ftdump.c:309 -#, c-format -msgid "" -"PostScript name: %s\n" -"\n" -msgstr "" -"PostScript naam: %s\n" -"\n" - -#: test/ftdump.c:332 -msgid "character map encodings\n" -msgstr "tekencodering tabellen\n" - -#: test/ftdump.c:339 test/ftdump.c:483 -msgid "The file doesn't seem to have any encoding table.\n" -msgstr "Het bestand schijnt geen codering tabellen te bevatten.\n" - -#: test/ftdump.c:343 test/ftdump.c:487 -#, c-format -msgid "" -"There are %hu encodings:\n" -"\n" -msgstr "" -"Er zijn %hu coderingen:\n" -"\n" - -#: test/ftdump.c:348 -#, c-format -msgid "encoding %2u: " -msgstr "codering %2u: " - -#: test/ftdump.c:375 test/ftdump.c:384 test/ftdump.c:447 -#, c-format -msgid "Unknown value %hu" -msgstr "Waarde %hu onbekend" - -#: test/ftdump.c:454 -msgid "Unknown" -msgstr "Onbekend" - -#: test/ftdump.c:476 -msgid "ftxcmap test\n" -msgstr "ftxcmap test\n" - -#: test/ftdump.c:493 -#, c-format -msgid "encoding %2u:\n" -msgstr "codering %2u:\n" - -#: test/ftdump.c:498 -#, c-format -msgid "first: glyph index %hu, character code 0x%lx\n" -msgstr "eerste: Glyph index %hu, karakter code 0x%lx\n" - -#: test/ftdump.c:502 -#, c-format -msgid "next: glyph index %hu, character code 0x%lx\n" -msgstr "volgende: Glyph index %hu, karakter code 0x%lx\n" - -#: test/ftdump.c:506 -#, c-format -msgid "last: glyph index %hu, character code 0x%lx\n" -msgstr "laatste: Glyph index %hu, karakter code 0x%lx\n" - -#: test/ftdump.c:528 test/ftmetric.c:282 -msgid "Error while retrieving embedded bitmaps table.\n" -msgstr "Fout bij het ophalen van ingebedde bitmap tabel.\n" - -#: test/ftdump.c:532 -msgid "embedded bitmap table\n" -msgstr "ingebedde bitmap tabel\n" - -#: test/ftdump.c:535 -#, c-format -msgid " version of embedded bitmap table: 0x%lx\n" -msgstr " versie van ingebedde bitmap tabel: 0x%lx\n" - -#: test/ftdump.c:537 -#, c-format -msgid " number of embedded bitmap strikes: %lu\n" -msgstr " aantal ingebedde bitmap treffers: %lu\n" - -#: test/ftdump.c:547 -#, c-format -msgid " bitmap strike %hu/%lu: " -msgstr " bitmap treffer %hu/%lu: " - -#: test/ftdump.c:550 -#, c-format -msgid "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" -msgstr "%hux%hu pixels, %hu-bit diepte, Glyphs [%hu..%hu]\n" - -#: test/ftdump.c:559 -#, c-format -msgid " range format (%hu:%hu) glyphs %hu..%hu\n" -msgstr " bereik formaat (%hu:%hu) Glyphs %hu..%hu\n" - -#: test/ftdump.c:610 -msgid "Error while loading GSUB table.\n" -msgstr "Fout bij het laden van GSUB tabel.\n" - -#: test/ftdump.c:614 -msgid "GSUB table\n" -msgstr "GSUB tabel\n" - -#: test/ftdump.c:621 -msgid "Error while querying GSUB script list.\n" -msgstr "Fout bij het opvragen van GSUB script lijst.\n" - -#: test/ftdump.c:634 -#, c-format -msgid "Error while selecting GSUB script `%4.4s'.\n" -msgstr "Fout bij het selecteren van GSUB script `%4.4s'.\n" - -#: test/ftdump.c:639 -#, c-format -msgid " script `%4.4s' (index %hu):\n" -msgstr " script `%4.4s' (index %hu):\n" - -#: test/ftdump.c:647 -#, c-format -msgid "Error while querying GSUB default language system for script `%4.4s'.\n" -msgstr "" -"Fout bij het opvragen van GSUB standaard taal systeem voor script `%4.4s'.\n" - -#: test/ftdump.c:652 -msgid " default language system:\n" -msgstr " standaard taal systeem:\n" - -#: test/ftdump.c:665 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for default language system of script `%4.4s'.\n" -msgstr "" -"Fout bij het selecteren van GSUB kenmerk `%4.4s'\n" -"voor standaard taal systeem van script `%4.4s'.\n" - -#: test/ftdump.c:671 test/ftdump.c:752 -#, c-format -msgid " feature `%4.4s' (index %hu; lookup " -msgstr " kenmerk `%4.4s' (index %hu; lookup " - -#: test/ftdump.c:687 -#, c-format -msgid "Error while querying GSUB language list for script `%4.4s'.\n" -msgstr "Fout bij het opvragen van GSUB taal lijst voor script `%4.4s'.\n" - -#: test/ftdump.c:704 -#, c-format -msgid "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" -msgstr "Fout bij het selecteren van GSUB taal `%4.4s' voor script `%4.4s'.\n" - -#: test/ftdump.c:709 -#, c-format -msgid " language `%4.4s' (index %hu):\n" -msgstr " taal `%4.4s' (index %hu):\n" - -#: test/ftdump.c:714 -#, c-format -msgid " required feature index %hu (lookup " -msgstr " benodigde kenmerk index %hu (lookup " - -#: test/ftdump.c:729 -#, c-format -msgid "" -"Error while querying GSUB feature list\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Fout bij het opvragen van GSUB kenmerken lijst\n" -"voor script `%4.4s', taal `%4.4s'.\n" - -#: test/ftdump.c:746 -#, c-format -msgid "" -"Error while selecting GSUB feature `%4.4s'\n" -"for script `%4.4s', language `%4.4s'.\n" -msgstr "" -"Fout bij het selecteren van GSUB kenmerk `%4.4s'\n" -"voor script `%4.4s', taal `%4.4s'.\n" - -#: test/ftdump.c:771 -msgid "" -"Lookups:\n" -"\n" -msgstr "" -"Lookups:\n" -"\n" - -#: test/ftdump.c:774 -#, c-format -msgid " %hu: type %hu, flag 0x%x\n" -msgstr " %hu: type %hu, vlag 0x%x\n" - -#: test/ftdump.c:809 -msgid "ftdump: Simple TrueType Dumper -- part of the FreeType project" -msgstr "" -"ftdump: eenvoudige TrueType dumper -- onderdeel van het FreeType project" - -#: test/ftdump.c:813 -#, c-format -msgid "" -"Usage: %s fontname[.ttf|.ttc]\n" -"\n" -msgstr "" -"Gebruik: %s lettertype[.ttf|.ttc]\n" -"\n" - -#: test/ftdump.c:845 test/ftlint.c:134 test/ftmetric.c:226 test/ftsbit.c:126 -msgid "Error while initializing engine.\n" -msgstr "Fout bij het starten van de FreeType engine.\n" - -#: test/ftdump.c:852 test/ftmetric.c:234 test/ftsbit.c:133 -msgid "Error while initializing embedded bitmap extension.\n" -msgstr "Fout bij het starten de ingebedde bitmap toevoeging.\n" - -#: test/ftdump.c:859 -msgid "Error while initializing GSUB extension.\n" -msgstr "Fout bij het starten van de GSUB toevoeging.\n" - -#: test/ftdump.c:875 test/ftlint.c:187 test/ftmetric.c:249 test/ftsbit.c:181 -#, c-format -msgid "Could not find or open %s.\n" -msgstr "Kan %s niet vinden of openen.\n" - -#: test/ftdump.c:878 test/ftlint.c:193 test/ftmetric.c:252 test/ftsbit.c:187 -#, c-format -msgid "Error while opening %s.\n" -msgstr "Fout bij het openen van %s.\n" - -#: test/ftlint.c:94 -msgid "" -"ftlint: Simple TrueType instruction tester -- part of the FreeType project" -msgstr "" -"ftlint: TrueType instructie tester -- onderdeel van het FreeType project" - -#: test/ftlint.c:99 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n" -"\n" -msgstr "" -"Gebruik: %s ppem lettertype[.ttf|.ttc] [lettertype2..]\n" -"\n" - -#: test/ftlint.c:226 test/ftsbit.c:224 -#, c-format -msgid "Could not set point size to %d.\n" -msgstr "Instellen van puntgrootte %d mislukt.\n" - -#: test/ftlint.c:239 -msgid "" -"Error with\n" -" " -msgstr "" -"Fout met\n" -" " - -#: test/ftlint.c:240 -#, c-format -msgid "glyph %4u: %s\n" -msgstr "Glyph %4u: %s\n" - -#: test/ftlint.c:253 -msgid "1 fail.\n" -msgstr "1 misser.\n" - -#: test/ftlint.c:255 -#, c-format -msgid "%d fails.\n" -msgstr "%d missers.\n" - -#: test/ftmetric.c:68 -msgid "" -"ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" -msgstr "" -"ftmetric: TTF metriek/Glyph dumper -- onderdeel van het FreeType project" - -#: test/ftmetric.c:72 -#, c-format -msgid "" -"Usage: %s [options below] point fontname[.ttf|.ttc]\n" -"\n" -" -B show sbit's metrics (default: none)\n" -" -c C use C'th font index of TrueType collection (default: 0)\n" -" -i index glyph index (default: 0)\n" -" -r R use resolution R dpi (default: 72)\n" -"\n" -msgstr "" -"Gebruik: %s [opties hieronder] punt lettertype[.ttf|.ttc]\n" -"\n" -" -B toon sbit's metriek (standaard: geen)\n" -" -c C gebruik 'C'e lettertype index van TrueType collectie (standaard: " -"0)\n" -" -i index Glyph index (standaard: 0)\n" -" -r R gebruik resolutie van R dpi (standaard: 72)\n" -"\n" - -#: test/ftmetric.c:259 -#, c-format -msgid "There are %d fonts in this collection.\n" -msgstr "Er zijn %d lettertypen in deze collectie.\n" - -#: test/ftmetric.c:264 -#, c-format -msgid "There is no collection with index %d in this font file.\n" -msgstr "Er is geen collectie met index %d in dit lettertype.\n" - -#: test/ftmetric.c:278 -msgid "There is no embedded bitmap data in the font.\n" -msgstr "Er is geen ingebedde bitmap informatie in het lettertype.\n" - -#: test/ftmetric.c:308 -msgid "Could not set device resolutions.\n" -msgstr "Instellen van resolutie is mislukt.\n" - -#: test/ftmetric.c:315 -msgid "Could not reset instance.\n" -msgstr "Her-instellen van Instance mislukt.\n" - -#: test/ftmetric.c:321 -#, c-format -msgid "Instance metrics: ppemX %d, ppemY %d\n" -msgstr "Instance metriek: ppemX %d, ppemY %d\n" - -#: test/ftmetric.c:331 test/ftsbit.c:233 -msgid "Could not allocate glyph bitmap container.\n" -msgstr "Toewijzen van Glyph bitmap container mislukt.\n" - -#: test/ftmetric.c:339 test/ftsbit.c:257 -#, c-format -msgid "Can't load bitmap for glyph %d.\n" -msgstr "Laden van bitmap voor Glyph %d mislukt.\n" - -#: test/ftmetric.c:366 -msgid "Outline's metrics" -msgstr "Omtrek metriek" - -#: test/ftmetric.c:368 -msgid "Outline glyph\n" -msgstr "Omtrek Glyph\n" - -#: test/ftsbit.c:89 -msgid "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" -msgstr "ftsbit: TrueType `sbit' dumper -- onderdeel van het FreeType project" - -#: test/ftsbit.c:94 -#, c-format -msgid "" -"Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" -msgstr "" -"Gebruik: %s ppem lettertype[.ttf|.ttc] glyph_index [glyph_index2..]\n" -"\n" - -#: test/ftsbit.c:199 -msgid "Could not find embedded bitmaps in this font.\n" -msgstr "Ingebedde bitmaps niet gevonden in dit lettertype.\n" - -#: test/ftsbit.c:205 -msgid "Error while loading embedded bitmaps.\n" -msgstr "Fout bij het laden van ingebedde bitmaps.\n" - -#: test/ftsbit.c:251 -#, c-format -msgid " no bitmap for glyph %d.\n" -msgstr " geen bitmap voor Glyph %d.\n" - -#: test/ftsbit.c:263 -#, c-format -msgid "glyph index %d = %dx%d pixels, " -msgstr "Glyph index %d = %dx%d pixels, " - -#: test/ftsbit.c:266 -#, c-format -msgid "advance = %ld, minBearing = [%ld,%ld]\n" -msgstr "advance = %ld, minBearing = [%ld,%ld]\n" Index: xc/extras/FreeType/test/.cvsignore diff -u xc/extras/FreeType/test/.cvsignore:1.1.1.1 xc/extras/FreeType/test/.cvsignore:removed --- xc/extras/FreeType/test/.cvsignore:1.1.1.1 Sat Feb 12 23:56:14 2000 +++ xc/extras/FreeType/test/.cvsignore Wed Mar 16 20:59:48 2005 @@ -1,12 +0,0 @@ -.libs -ftview -fttimer -ftlint -ftdump -ftzoom -ftstring -ftstrpnm -fterror -ftsbit -ftmetric -ftstrtto Index: xc/extras/FreeType/test/README diff -u xc/extras/FreeType/test/README:1.1.1.1 xc/extras/FreeType/test/README:removed --- xc/extras/FreeType/test/README:1.1.1.1 Sat Feb 12 23:56:14 2000 +++ xc/extras/FreeType/test/README Wed Mar 16 20:59:48 2005 @@ -1,6 +0,0 @@ - -The instructions how to use the test programs can be found in the -main `README' file located in the parent directory. - - ---- end of README --- Index: xc/extras/FreeType/test/arabic.c diff -u xc/extras/FreeType/test/arabic.c:1.1.1.1 xc/extras/FreeType/test/arabic.c:removed --- xc/extras/FreeType/test/arabic.c:1.1.1.1 Sat Feb 12 23:56:14 2000 +++ xc/extras/FreeType/test/arabic.c Wed Mar 16 20:59:48 2005 @@ -1,386 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* arabic -- An implementation of the contextual algorithm given in the */ -/* Unicode 2.0 book to assign the `isolated', `initial', `medial', and */ -/* `final' properties to an input string of character codes for the Arabic */ -/* script. */ -/* */ -/****************************************************************************/ - -#include -#include - -#include "arabic.h" -#include "freetype.h" -#include "ftxopen.h" - - - /* - - Here a table of the joining classes for characters in the range - U+0620 - U+06FF. - - The following character also has a joining class: - - U+200C ZERO WIDTH NON-JOINER -> causing - - All other characters are given the joining class `none'. - - */ - - joining_class arabic[] = - { - /* U+0620 */ - none, none, right, right, - right, right, dual, right, - dual, right, dual, dual, - dual, dual, dual, right, - - /* U+0630 */ - right, right, right, dual, - dual, dual, dual, dual, - dual, dual, dual, none, - none, none, none, none, - - /* U+0640 */ - causing, dual, dual, dual, - dual, dual, dual, dual, - right, right, dual, transparent, - transparent, transparent, transparent, transparent, - - /* U+0650 */ - transparent, transparent, transparent, none, - none, none, none, none, - none, none, none, none, - none, none, none, none, - - /* U+0660 */ - none, none, none, none, - none, none, none, none, - none, none, none, none, - none, none, none, none, - - /* U+0670 */ - transparent, none, right, right, - none, right, right, right, - dual, dual, dual, dual, - dual, dual, dual, dual, - - /* U+0680 */ - dual, dual, dual, dual, - dual, dual, dual, dual, - right, right, right, right, - right, right, right, right, - - /* U+0690 */ - right, right, right, right, - right, right, right, right, - right, right, dual, dual, - dual, dual, dual, dual, - - /* U+06A0 */ - dual, dual, dual, dual, - dual, dual, dual, dual, - dual, dual, dual, dual, - dual, dual, dual, dual, - - /* U+06B0 */ - dual, dual, dual, dual, - dual, dual, dual, dual, - dual, dual, dual, dual, - dual, dual, dual, dual, - - /* U+06C0 */ - right, dual, right, right, - right, right, right, right, - right, right, right, right, - dual, right, dual, right, - - /* U+06D0 */ - dual, dual, right, right, - none, none, none, transparent, - transparent, transparent, transparent, transparent, - transparent, transparent, transparent, transparent, - - /* U+06E0 */ - transparent, transparent, transparent, transparent, - transparent, none, none, transparent, - transparent, none, transparent, transparent, - transparent, transparent, none, none, - - /* U+06F0 */ - none, none, none, none, - none, none, none, none, - none, none, dual, dual, - dual, none, none, none - }; - - - struct cgc_ - { - TT_UShort char_code; - TT_UShort glyph_index; - TT_UShort class; - }; - - typedef struct cgc_ cgc; - - - int compare_cgc( const void* a, - const void* b ) - { - return ( ((cgc*)a)->glyph_index > ((cgc*)b)->glyph_index ) ? - 1 : ( ( ((cgc*)a)->glyph_index == ((cgc*)b)->glyph_index ) ? - 0 : -1 ); - } - - - TT_Error Build_Arabic_Glyph_Properties( TT_CharMap char_map, - TT_UShort max_glyphs, - TTO_GDEFHeader** gdef ) - { - TT_UShort i, j, num_glyphs; - - cgc Arabic[0x0700 - 0x0620]; - - TT_UShort glyph_indices[0x700 - 0x0620]; - TT_UShort classes[0x700 - 0x0620]; - - if ( !gdef ) - return TT_Err_Invalid_Argument; - - j = 0; - - for ( i = 0x0620; i < 0x0700; i++ ) - { - Arabic[j].char_code = i; - Arabic[j].class = ( arabic[i - 0x0620] == transparent ) ? - MARK_GLYPH : SIMPLE_GLYPH; - Arabic[j].glyph_index = TT_Char_Index( char_map, i ); - if ( Arabic[j].glyph_index ) - j++; - } - num_glyphs = j; - - if ( !num_glyphs ) - { - /* no Arabic font */ - *gdef = NULL; - return TT_Err_Ok; - } - - /* sort it */ - - qsort( Arabic, num_glyphs, sizeof ( cgc ), compare_cgc ); - - /* write it to the arrays, removing duplicates */ - - glyph_indices[0] = Arabic[0].glyph_index; - classes[0] = Arabic[0].class; - - j = 1; - - for ( i = 1; i < num_glyphs; i++ ) - { - glyph_indices[j] = Arabic[i].glyph_index; - classes[j] = Arabic[i].class; - - if ( glyph_indices[j - 1] != glyph_indices[j] ) - j++; - } - num_glyphs = j; - - TT_GDEF_Build_ClassDefinition( *gdef, max_glyphs, num_glyphs, - glyph_indices, classes ); - - return TT_Err_Ok; - } - - - /* The joining rules as given in the Unicode 2.0 book (characters are - here specified as appearing in the byte stream, i.e. *not* in - visual order). Joining classes are given in angle brackets, glyph - forms in square brackets. Glyphs affected by a specific rule are - enclosed with vertical bars. - - Note: The description of the joining algorithm in the book is - severely broken. You can get a corrected version from - www.unicode.org (as of 29-Jun-1999, this hasn't appeared). - - R1: - - apply joining rules for - -> [shape1] [shape2] - - -> [shape1] [isolated] [shape2] - - R2: || - - -> [final] - - R3: || - - -> [initial] - - R4: || - - -> [medial] - - R5: || - - -> [final] - - R6: || - - -> [initial] - - R7: If R1-R6 fail: - - -> [isolated] */ - - - /* `direction' can be -1, 0, or 1 to indicate the last non-transparent - glyph, the current glyph, and the next non-transparent glyph, - respectively. */ - - static joining_class Get_Joining_Class( TT_UShort* string, - TT_UShort pos, - TT_UShort length, - int direction ) - { - joining_class j; - - - while ( 1 ) - { - if ( pos == 0 && direction < 0 ) - return none; - - pos += direction; - - if ( pos >= length ) - return none; - - if ( string[pos] < 0x0620 || - string[pos] >= 0x0700 ) - { - if ( string[pos] == 0x200C ) - return causing; - else - return none; - } - else - j = arabic[string[pos] - 0x0620]; - - if ( !direction || j != transparent ) - return j; - } - } - - - TT_Error Assign_Arabic_Properties( TT_UShort* string, - TT_UShort* properties, - TT_UShort length ) - { - joining_class previous, current, next; - - TT_UShort i; - - - if ( !string || !properties || length == 0 ) - return TT_Err_Invalid_Argument; - - for ( i = 0; i < length; i++ ) - { - previous = Get_Joining_Class( string, i, length, -1 ); - current = Get_Joining_Class( string, i, length, 0 ); - next = Get_Joining_Class( string, i, length, 1 ); - - /* R1 */ - - if ( current == transparent ) - { - properties[i] |= isolated_p; - continue; - } - - /* R2 */ - - if ( previous == causing || - previous == left || - previous == dual ) - if ( current == right ) - { - properties[i] |= final_p; - continue; - } - - /* R3 */ - - if ( current == left ) - if ( next == causing || - next == right || - next == dual ) - { - properties[i] |= initial_p; - continue; - } - - /* R4 */ - - if ( previous == causing || - previous == left || - previous == dual ) - if ( current == dual ) - if ( next == causing || - next == right || - next == dual ) - { - properties[i] |= medial_p; - continue; - } - - /* R5 */ - - if ( previous == causing || - previous == left || - previous == dual ) - if ( current == dual ) - if ( !( next == causing || - next == right || - next == dual ) ) - { - properties[i] |= final_p; - continue; - } - - /* R6 */ - - if ( !( previous == causing || - previous == left || - previous == dual ) ) - if ( current == dual ) - if ( next == causing || - next == right || - next == dual ) - { - properties[i] |= initial_p; - continue; - } - - /* R7 */ - - if ( current != none ) - properties[i] |= isolated_p; - } - - return TT_Err_Ok; - } - - -/* End */ Index: xc/extras/FreeType/test/arabic.h diff -u xc/extras/FreeType/test/arabic.h:1.1.1.1 xc/extras/FreeType/test/arabic.h:removed --- xc/extras/FreeType/test/arabic.h:1.1.1.1 Sat Feb 12 23:56:15 2000 +++ xc/extras/FreeType/test/arabic.h Wed Mar 16 20:59:48 2005 @@ -1,66 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* arabic -- An implementation of the contextual algorithm given in the */ -/* Unicode 2.0 book to assign the `isolated', `initial', `medial', and */ -/* `final' properties to an input string of character codes for the Arabic */ -/* script. */ -/* */ -/****************************************************************************/ - - -#include "freetype.h" -#include "ftxopen.h" - - - enum joining_type_ - { - isolated = 1, /* nominal */ - final = 2, /* right_joining */ - initial = 4, /* left_joining */ - medial = 8 /* double_joining */ - }; - - typedef enum joining_type_ joining_type; - - - /* A glyph's property value as needed by e.g. TT_GSUB_Apply_String() - specifies which features should *not* be applied */ - - enum arabic_glyph_property_ - { - isolated_p = final | initial | medial, - final_p = isolated | initial | medial, - initial_p = isolated | final | medial, - medial_p = isolated | final | initial - }; - - typedef enum arabic_glyph_property_ arabic_glyph_property; - - - enum joining_class_ - { - right, - left, /* not used */ - dual, - causing, - none, - transparent - }; - - typedef enum joining_class_ joining_class; - - - TT_Error Assign_Arabic_Properties( TT_UShort* string, - TT_UShort* properties, - TT_UShort length ); - TT_Error Build_Arabic_Glyph_Properties( TT_CharMap char_map, - TT_UShort max_glyphs, - TTO_GDEFHeader** gdef ); - - -/* End */ Index: xc/extras/FreeType/test/blitter.c diff -u xc/extras/FreeType/test/blitter.c:1.1.1.1 xc/extras/FreeType/test/blitter.c:removed --- xc/extras/FreeType/test/blitter.c:1.1.1.1 Sat Feb 12 23:56:15 2000 +++ xc/extras/FreeType/test/blitter.c Wed Mar 16 20:59:48 2005 @@ -1,492 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* blitter.c: Support for blitting of bitmaps with various depth. */ -/* */ -/****************************************************************************/ - -#include "blitter.h" - - - typedef struct TBlitter_ - { - int width; /* width in pixels of the written area */ - int height; /* height in pixels of the written area */ - - int xread; /* x position of start point in read area */ - int yread; /* y position of start point in read area */ - - int xwrite; /* x position of start point in write area */ - int ywrite; /* y position of start point in write area */ - - int right_clip; /* amount of right clip */ - - char* read; /* top left corner of source map */ - char* write; /* top left corner of target map */ - - int read_line; /* byte increment to go down one row in read area */ - int write_line; /* byte increment to go down one row in write area */ - - TT_Raster_Map source; - TT_Raster_Map target; - - int source_depth; - int target_depth; - - } TBlitter; - - - static - int compute_clips( TBlitter* blit, - int x_offset, - int y_offset ) - { - int xmin, ymin, xmax, ymax, width, height, target_width; - - - /* perform clipping and setup variables */ - width = blit->source.width; - height = blit->source.rows; - - switch ( blit->source_depth ) - { - case 1: - width = (width + 7) & -8; - break; - - case 4: - width = (width + 1) & -2; - break; - } - - xmin = x_offset; - ymin = y_offset; - xmax = xmin + width-1; - ymax = ymin + height-1; - - /* clip if necessary */ - if ( width == 0 || height == 0 || - xmax < 0 || xmin >= blit->target.width || - ymax < 0 || ymin >= blit->target.rows ) - return 1; - - /* set up clipping and cursors */ - blit->yread = 0; - if ( ymin < 0 ) - { - blit->yread -= ymin; - height += ymin; - blit->ywrite = 0; - } - else - blit->ywrite = ymin; - - if ( ymax >= blit->target.rows ) - height -= ymax - blit->target.rows + 1; - - blit->xread = 0; - if ( xmin < 0 ) - { - blit->xread -= xmin; - width += xmin; - blit->xwrite = 0; - } - else - blit->xwrite = xmin; - - target_width = blit->target.width; - - switch ( blit->target_depth ) - { - case 1: - target_width = (target_width + 7) & -8; - break; - case 4: - target_width = (target_width + 1) & -2; - break; - } - - blit->right_clip = xmax - target_width + 1; - if ( blit->right_clip > 0 ) - width -= blit->right_clip; - else - blit->right_clip = 0; - - blit->width = width; - blit->height = height; - - /* set read and write to the top-left corner of the the read */ - /* and write area before clipping. */ - - blit->read = (char*)blit->source.bitmap; - blit->write = (char*)blit->target.bitmap; - - if ( blit->source.flow == TT_Flow_Up ) - { - blit->read_line = -blit->source.cols; - blit->read += (blit->source.rows-1) * blit->source.cols; - } - else - blit->read_line = blit->source.cols; - - if ( blit->target.flow == TT_Flow_Up ) - { - blit->write_line = -blit->target.cols; - blit->write += (blit->target.rows-1) * blit->target.cols; - } - else - blit->write_line = blit->target.cols; - - /* now go to the start line. Note that we do not move the */ - /* x position yet, as this is dependent on the pixel format */ - blit->read += blit->yread * blit->read_line; - blit->write += blit->ywrite * blit->write_line; - - return 0; - } - - -/**************************************************************************/ -/* */ -/* blit_bitmap_to_bitmap */ -/* */ -/**************************************************************************/ - - static - void blit_bitmap_to_bitmap( TBlitter* blit ) - { - int shift, left_clip, x, y; - unsigned char* read; - unsigned char* write; - - - left_clip = ( blit->xread > 0 ); - shift = ( blit->xwrite - blit->xread ) & 7; - - read = (unsigned char*)blit->read + (blit->xread >> 3); - write = (unsigned char*)blit->write + (blit->xwrite >> 3); - - if ( shift == 0 ) - { - y = blit->height; - do - { - unsigned char* _read = read; - unsigned char* _write = write; - - - x = blit->width; - - do - { - *_write++ |= *_read++; - x -= 8; - } while ( x > 0 ); - - read += blit->read_line; - write += blit->write_line; - y--; - } while ( y > 0 ); - } - else - { - int first, last, count; - - - first = blit->xwrite >> 3; - last = (blit->xwrite + blit->width-1) >> 3; - - count = last - first; - - if ( blit->right_clip ) - count++; - - y = blit->height; - - do - { - unsigned char* _read = read; - unsigned char* _write = write; - unsigned char old; - int shift2 = (8-shift); - - - if ( left_clip ) - old = (*_read++) << shift2; - else - old = 0; - - x = count; - while ( x > 0 ) - { - unsigned char val; - - - val = *_read++; - *_write++ |= ( (val >> shift) | old ); - old = val << shift2; - x--; - } - - if ( !blit->right_clip ) - *_write |= old; - - read += blit->read_line; - write += blit->write_line; - y--; - - } while ( y > 0 ); - } - } - - -/**************************************************************************/ -/* */ -/* blit_bitmap_to_pixmap8 */ -/* */ -/**************************************************************************/ - - static - void blit_bitmap_to_pixmap8( TBlitter* blit, - unsigned char color ) - { - int x, y; - unsigned int left_mask; - unsigned char* read; - unsigned char* write; - - - read = (unsigned char*)blit->read + (blit->xread >> 3); - write = (unsigned char*)blit->write + blit->xwrite; - - left_mask = 0x80 >> (blit->xread & 7); - - y = blit->height; - do - { - unsigned char* _read = read; - unsigned char* _write = write; - unsigned int mask = left_mask; - unsigned int val = 0; - - - x = blit->width; - do - { - if ( mask == 0x80 ) - val = *_read++; - - if ( val & mask ) - *_write = (unsigned char)color; - - mask >>= 1; - if ( mask == 0 ) - mask = 0x80; - - _write++; - x--; - } while ( x > 0 ); - - read += blit->read_line; - write += blit->write_line; - y--; - } while ( y > 0 ); - } - - -/**************************************************************************/ -/* */ -/* blit_bitmap_to_pixmap4 */ -/* */ -/**************************************************************************/ - - static - void blit_bitmap_to_pixmap4( TBlitter* blit, - unsigned char color ) - { - int x, y, phase; - unsigned int left_mask; - unsigned char* read; - unsigned char* write; - - - color = color & 15; - - read = (unsigned char*)blit->read + (blit->xread >> 3); - write = (unsigned char*)blit->write + (blit->xwrite >> 1); - - /* now begin blit */ - left_mask = 0x80 >> (blit->xread & 7); - phase = blit->xwrite & 1; - - y = blit->height; - do - { - unsigned char* _read = read; - unsigned char* _write = write; - unsigned int mask = left_mask; - int _phase = phase; - unsigned int val = 0; - - x = blit->width; - do - { - if ( mask == 0x80 ) - val = *_read++; - - if ( val & mask ) - { - if ( _phase ) - *_write = (*_write & 0xF0) | color; - else - *_write = (*_write & 0x0F) | (color << 4); - } - - mask >>= 1; - if ( mask == 0 ) - mask = 0x80; - - _write += _phase; - _phase ^= 1; - x--; - } while ( x > 0 ); - - read += blit->read_line; - write += blit->write_line; - y--; - } while ( y > 0 ); - } - - -/**************************************************************************/ -/* */ -/* blit_bitmap_to_pixmap16 */ -/* */ -/**************************************************************************/ - - static - void blit_bitmap_to_pixmap16( TBlitter* blit, - unsigned short color ) - { - int x, y; - unsigned int left_mask; - unsigned char* read; - unsigned short* write; - - - read = (unsigned char*)blit->read + (blit->xread >> 3); - write = (unsigned short*)(blit->write + blit->xwrite*2); - - left_mask = 0x80 >> (blit->xread & 7); - - y = blit->height; - do - { - unsigned char* _read = read; - unsigned short* _write = write; - unsigned int mask = left_mask; - unsigned int val = 0; - - x = blit->width; - do - { - if ( mask == 0x80 ) - val = *_read++; - - if ( val & mask ) - *_write = color; - - mask >>= 1; - if ( mask == 0 ) - mask = 0x80; - - _write++; - x--; - } while ( x > 0 ); - - read += blit->read_line; - write += blit->write_line; - y--; - } while ( y > 0 ); - } - - - /* */ - /* Blit_Bitmap */ - /* */ - /* */ - /* blit a source bitmap to a target bitmap or pixmap */ - /* */ - /* */ - /* target :: target bitmap or pixmap */ - /* source :: source bitmap (depth must be 1) */ - /* target_depth :: pixel bit depth of target map */ - /* x_offset :: horizontal offset of source in target */ - /* y_offset :: vertical offset of source in target */ - /* color :: color to use when blitting to color pixmap */ - /* */ - /* */ - /* error code. 0 means success */ - /* */ - /* */ - /* an error occurs when the target bit depth isn't supported, or */ - /* if the source's bit depth isn't 1. */ - /* */ - /* the offsets are relative to the top-left corner of the target */ - /* map. Positive y are downwards. */ - /* */ - extern - int Blit_Bitmap( TT_Raster_Map* target, - TT_Raster_Map* source, - int target_depth, - int x_offset, - int y_offset, - int color ) - { - TBlitter blit; - - - if ( !target || !source ) - return -1; - - blit.source = *source; - blit.target = *target; - blit.source_depth = 1; - blit.target_depth = target_depth; - - /* set up blitter and compute clipping. Return immediately if needed */ - if ( compute_clips( &blit, x_offset, y_offset ) ) - return 0; - - /* now perform the blit */ - switch ( target_depth ) - { - case 1: - blit_bitmap_to_bitmap( &blit ); - break; - - case 4: - blit_bitmap_to_pixmap4( &blit, (unsigned char)color ); - break; - - case 8: - blit_bitmap_to_pixmap8( &blit, (unsigned char)color ); - break; - - case 16: - blit_bitmap_to_pixmap16( &blit, (unsigned short)color ); - break; - - default: - return -2; - } - - return 0; - } - - -/* End */ Index: xc/extras/FreeType/test/blitter.h diff -u xc/extras/FreeType/test/blitter.h:1.1.1.1 xc/extras/FreeType/test/blitter.h:removed --- xc/extras/FreeType/test/blitter.h:1.1.1.1 Sat Feb 12 23:56:15 2000 +++ xc/extras/FreeType/test/blitter.h Wed Mar 16 20:59:48 2005 @@ -1,52 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* blitter.h: Support for blitting of bitmaps with various depth. */ -/* */ -/****************************************************************************/ - -#ifndef BLITTER_H -#define BLITTER_H - -#include - - /* */ - /* Blit_Bitmap */ - /* */ - /* */ - /* blit a source bitmap to a target bitmap or pixmap */ - /* */ - /* */ - /* target :: target bitmap or pixmap */ - /* source :: source bitmap (depth must be 1) */ - /* target_depth :: pixel bit depth of target map */ - /* x_offset :: horizontal offset of source in target */ - /* y_offset :: vertical offset of source in target */ - /* color :: color to use when blitting to color pixmap */ - /* */ - /* */ - /* error code. 0 means success */ - /* */ - /* */ - /* an error occurs when the target bit depth isn't supported, or */ - /* if the source's bit depth isn't 1. */ - /* */ - /* the offsets are relative to the top-left corner of the target */ - /* map. Positive y are downwards. */ - /* */ - extern - int Blit_Bitmap( TT_Raster_Map* target, - TT_Raster_Map* source, - int target_depth, - int x_offset, - int y_offset, - int color ); - -#endif - - -/* End */ Index: xc/extras/FreeType/test/common.c diff -u xc/extras/FreeType/test/common.c:1.3 xc/extras/FreeType/test/common.c:removed --- xc/extras/FreeType/test/common.c:1.3 Tue Oct 21 14:10:09 2003 +++ xc/extras/FreeType/test/common.c Wed Mar 16 20:59:48 2005 @@ -1,311 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* common.c: Various utility functions. */ -/* */ -/****************************************************************************/ -/* $XFree86: xc/extras/FreeType/test/common.c,v 1.3 2003/10/21 18:10:09 tsi Exp $ */ - - -/* - * This is a cheap replacement for getopt() because that routine is not - * available on some platforms and behaves differently on other platforms. - * This code was written from scratch without looking at any other - * implementation. - * - * This code is hereby expressly placed in the public domain. - * mleisher@crl.nmsu.edu (Mark Leisher) - * 10 October 1997 - */ - -#ifndef lint -#ifdef __GNUC__ - static char rcsid[] __attribute__ ((unused)) = "Id: common.c,v 1.14 1999/08/13 12:54:34 werner Exp $"; -#else - static char rcsid[] = "Id: common.c,v 1.14 1999/08/13 12:54:34 werner Exp $"; -#endif -#endif - -#include -#include -#include -#include - -#include "common.h" -#include "freetype.h" /* TT_Raster_Map */ - - /* - * Externals visible to programs. - */ - - int ft_opterr = 1; - int ft_optind = 1; - char* ft_optarg; - - /* - * Internal variables that are used to detect when the global values - * need to be reset. - */ - - static int cmdac; -#ifdef __STDC__ - static const char* cmdname; - static char* const* cmdav; -#else - static char* cmdname; - static char** cmdav; -#endif - - - int -#ifdef __STDC__ - ft_getopt( int ac, char* const* av, const char* pat ) -#else - ft_getopt( ac, av, pat ) - int ac; - char** av; - char* pat; -#endif - { - int opt; -#ifdef __STDC__ - const char* p; - const char* pp; -#else - char* p; - char* pp; -#endif - - - /* - * If there is no pattern, indicate the parsing is done. - */ - if ( pat == 0 || *pat == 0 ) - return -1; - - /* - * Always reset the option argument to NULL. - */ - ft_optarg = 0; - - /* - * If the number of arguments or argument list do not match the last - * values seen, reset the internal pointers and the globals. - */ - if ( ac != cmdac || av != cmdav ) - { - ft_optind = 1; - cmdac = ac; - cmdav = av; - - /* - * Determine the command name in case it is needed for warning - * messages. - */ - for ( cmdname = 0, p = av[0]; *p; p++ ) - { - if ( *p == '/' || *p == '\\' ) - cmdname = p; - } - - /* - * Skip the path separator if the name was assigned. - */ - if ( cmdname ) - cmdname++; - else - cmdname = av[0]; - } - - /* - * If the next index is greater than or equal to the number of - * arguments, then the command line is done. - */ - if ( ft_optind >= ac ) - return -1; - - /* - * Test the next argument for one of three cases: - * 1. The next argument does not have an initial '-'. - * 2. The next argument is '-'. - * 3. The next argument is '--'. - * - * In either of these cases, command line processing is done. - */ - if ( av[ft_optind][0] != '-' || - strcmp( av[ft_optind], "-" ) == 0 || - strcmp( av[ft_optind], "--" ) == 0 ) - return -1; - - /* - * Point at the next command line argument and increment the - * command line index. - */ - p = av[ft_optind++]; - - /* - * Look for the first character of the command line option. - */ - for ( opt = *(p + 1), pp = pat; *pp && *pp != opt; pp++ ) - ; - - /* - * If nothing in the pattern was recognized, then issue a warning - * and return a '?'. - */ - if ( *pp == 0 ) - { - if ( ft_opterr ) - fprintf( stderr, "%s: illegal option -- %c\n", cmdname, opt ); - return '?'; - } - - /* - * If the option expects an argument, get it. - */ - if ( *(pp + 1) == ':' && (ft_optarg = av[ft_optind]) == 0 ) - { - /* - * If the option argument is NULL, issue a warning and return a '?'. - */ - if ( ft_opterr ) - fprintf( stderr, "%s: option requires an argument -- %c\n", - cmdname, opt ); - opt = '?'; - } - else if ( ft_optarg ) - /* - * Increment the option index past the argument. - */ - ft_optind++; - - /* - * Return the option character. - */ - return opt; - } - - -/****************************************************************************/ -/* */ -/* ft_basename(): */ -/* */ -/* a stupid but useful function... */ -/* */ -/* rewritten by DavidT to get rid of GPLed programs in the FreeType engine. */ -/* */ -/****************************************************************************/ - - char* -#ifdef __STDC__ - ft_basename( const char* name ) -#else - ft_basename( name ) - char* name; -#endif - { -#ifdef __STDC__ - const char* base; - const char* current; -#else - char* base; - char* current; -#endif - char c; - - - base = name; - current = name; - - c = *current; - - while ( c ) - { - if ( c == '/' || c == '\\' ) - base = current + 1; - - current++; - c = *current; - } - - return (char*)base; - } - - - void -#ifdef __STDC__ - Panic( const char* fmt, ... ) -#else - Panic( fmt ) - const char* fmt; -#endif - { - va_list ap; - - - va_start( ap, fmt ); - vprintf( fmt, ap ); - va_end( ap ); - - exit( EXIT_FAILURE ); - } - - - void -#ifdef __STDC__ - Show_Single_Glyph( const TT_Raster_Map* map ) -#else - Show_Single_Glyph( map ) - const TT_Raster_Map* map; -#endif - { - int y; - - unsigned char* line = map->bitmap; - - - for ( y = 0; y < map->rows; y++, line += map->cols ) - { - unsigned char* ptr = line; - int x; - unsigned char mask = 0x80; - - - for ( x = 0; x < map->width; x++ ) - { - printf( "%c", (ptr[0] & mask) ? '*' : '.' ); - mask >>= 1; - if ( mask == 0 ) - { - mask = 0x80; - ptr++; - } - } - printf( "\n" ); - } - } - - - void -#ifdef __STDC__ - separator_line( FILE* out, const int length ) -#else - separator_line( out, length ) - FILE* out; - int length; -#endif - { - int i; - - - for ( i = 0; i < length; i++ ) - fputc( '-', out ); - fprintf( out, "\n\n" ); - } - - -/* End */ Index: xc/extras/FreeType/test/common.h diff -u xc/extras/FreeType/test/common.h:1.1.1.2 xc/extras/FreeType/test/common.h:removed --- xc/extras/FreeType/test/common.h:1.1.1.2 Sat Feb 12 23:56:15 2000 +++ xc/extras/FreeType/test/common.h Wed Mar 16 20:59:48 2005 @@ -1,82 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* common.h: Various utility functions. */ -/* */ -/****************************************************************************/ - -#ifndef COMMON_H -#define COMMON_H - -#include - -#include "freetype.h" /* TT_Raster_Map */ - -/* - * This is a cheap replacement for getopt() because that routine is not - * available on some platforms and behaves differently on other platforms. - * - * This code is hereby expressly placed in the public domain. - * mleisher@crl.nmsu.edu (Mark Leisher) - * 10 October 1997 - */ - -#ifdef __cplusplus - extern "C" { -#endif - - extern int ft_opterr; - extern int ft_optind; - extern char* ft_optarg; - - extern int ft_getopt( -#ifdef __STDC__ - int argc, - char* const* argv, - const char* pattern -#endif - ); - - - extern char* ft_basename( -#ifdef __STDC__ - const char* name -#endif - ); - - - /* print a message and exit */ - extern void Panic( -#ifdef __STDC__ - const char* fmt, ... -#endif - ); - - - extern void Show_Single_Glyph( -#ifdef __STDC__ - const TT_Raster_Map* map -#endif - ); - - - extern void separator_line( -#ifdef __STDC__ - FILE* out, - const int length -#endif - ); - - -#ifdef __cplusplus - } -#endif - -#endif /* COMMON_H */ - - -/* End */ Index: xc/extras/FreeType/test/display.c diff -u xc/extras/FreeType/test/display.c:1.1.1.2 xc/extras/FreeType/test/display.c:removed --- xc/extras/FreeType/test/display.c:1.1.1.2 Sat Feb 12 23:56:15 2000 +++ xc/extras/FreeType/test/display.c Wed Mar 16 20:59:48 2005 @@ -1,299 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* display.c: Display component used by all test programs. */ -/* */ -/* This file is used to display glyphs and strings in a target window */ -/* using the graphics drivers provided by gmain.c, gevents.h, etc. */ -/* */ -/* Its role is to be shared and heavely commented to let people understand */ -/* how we do the job... */ -/* */ -/****************************************************************************/ - -#include /* malloc() and free() */ -#include /* memset() */ - -#include "display.h" -#include "freetype.h" -#include "gmain.h" - - /* The target bitmap or pixmap -- covering the full display window/screen */ - TT_Raster_Map Bit; - - /* A smaller intermediate bitmap used to render individual glyphs when */ - /* font smoothing mode is activated. It is then or-ed to `Bit'. */ - TT_Raster_Map Small_Bit; - -/* The magic of or-ing gray-levels: */ -/* */ -/* When gray-level mode (a.k.a. font-smoothing) is on, `Bit' is an 8-bit */ -/* pixmap of the size of the display window or screen. */ -/* */ -/* The gray-level palette to use for display is system-dependent, and */ -/* given by the "gray_palette" variable defined in 'gmain.c'. It is */ -/* set up by the graphics driver, and we cannot assume anything about its */ -/* values. */ -/* */ -/* The function TT_Get_Glyph_Pixmap() can use any palette to render each */ -/* individual glyph, however we'll later need to "or" the glyph to */ -/* the display pixmap `Bit' to be able to form strings of text by */ -/* juxtaposing several glyphs together. */ -/* */ -/* If we use the gray_palette directly, we'll encounter trouble doing */ -/* the "or". Example: */ -/* */ -/* Suppose that gray_palette = { 0, 32, 64, 128, 255 } */ -/* */ -/* Let's render a glyph with this palette and "or" it to */ -/* the `Bit' pixmap. If, by chance, we superpose two distinct non-zero */ -/* colors, we will get strange results, like 32+64 = 96, which isn't in */ -/* our gray palette! */ -/* */ -/* There are two ways to solve this problem: */ -/* */ -/* - perform a "slow or" where we check all possible combinations */ -/* and solve conflicts. */ -/* */ -/* - render all pixmaps using a special "virtual" palette that eases */ -/* the "oring" process, then convert the whole display pixmap to */ -/* "display" colors at once. */ -/* */ -/* We choose the second solution, of course; this means that: */ -/* */ -/* - the virtual palette used is simply = { 0, 1, 2, 3, 4 }, defined in */ -/* the variable "palette" below. The `Bit' and `Small_Bit' pixmaps will */ -/* always contain pixels within these values, with the exception of */ -/* post-render display, where `Bit' will be converted to display values */ -/* by the Convert_To_Display_Palette() function. */ -/* */ -/* - as or-ing values between 0 and 4 will give us values between */ -/* 0 and 7, we use a second palette, called "bounding_palette" */ -/* to maintain all values within the virtual palette. */ -/* */ -/* in effect bounding_palette = { 0, 1, 2, 3, 4, 4, 4, 4 } */ -/* */ -/* which means that (3|4) == 7 => 4 after bounding */ -/* */ - - /* the virtual palette */ - unsigned char virtual_palette[5] = { 0, 1, 2, 3, 4 }; - - /* Or-ing the possible palette values gets us from 0 to 7 */ - /* We must bound check these... */ - unsigned char bounded_palette[8] = { 0, 1, 2, 3, 4, 4, 4, 4 }; - - - /* Clears the Bit bitmap/pixmap */ - void Clear_Display( void ) - { - memset( Bit.bitmap, 0, Bit.size ); - } - - - /* Clears the Small_Bit pixmap */ - void Clear_Small( void ) - { - memset( Small_Bit.bitmap, 0, Small_Bit.size ); - } - - - /* Initialize the display bitmap named Bit */ - int Init_Display( int font_smoothing ) - { - Bit.rows = vio_Height; /* the whole window */ - Bit.width = vio_Width; - Bit.flow = TT_Flow_Up; - - if ( font_smoothing ) - Bit.cols = (Bit.width+3) & -4; /* must be 32-bits aligned */ - else - Bit.cols = (Bit.width+7) >> 3; - - Bit.size = (long)Bit.cols * Bit.rows; - - if ( Bit.bitmap ) - free( Bit.bitmap ); - Bit.bitmap = malloc( (int)Bit.size ); - if ( !Bit.bitmap ) - return -1; - - Clear_Display(); - return 0; - } - - - /* Convert the display pixmap from virtual to display palette */ - void Convert_To_Display_Palette( void ) - { - unsigned char* p; - long i; - - p = Bit.bitmap; - for ( i = 0; i < Bit.size; i++ ) - { - *p = gray_palette[(int)*p]; - p++; - } - } - - - /* Init Small Bitmap */ - int Init_Small( int x_ppem, int y_ppem ) - { - if ( Small_Bit.bitmap ) - free( Small_Bit.bitmap ); - - Small_Bit.rows = y_ppem + 32; - Small_Bit.width = x_ppem + 32; - Small_Bit.cols = ( Small_Bit.width+3 ) & -4; /* pad to 32-bits */ - Small_Bit.flow = TT_Flow_Up; - Small_Bit.size = (long)Small_Bit.rows * Small_Bit.cols; - - Small_Bit.bitmap = malloc( (int)Small_Bit.size ); - if ( Small_Bit.bitmap ) - return -1; - - Clear_Small(); - return 0; - } - - - /* Render a single glyph into the display bit/pixmap */ - /* */ - /* Note that in b/w mode, we simply render the glyph directly into */ - /* the display map, as the scan-line converter or-es the glyph into */ - /* the target bitmap. */ - /* */ - /* In gray mode, however, the glyph is first rendered indivdually in */ - /* the Small_Bit map, then 'or-ed' with bounding into the display */ - /* pixmap. */ - /* */ - - TT_Error Render_Single_Glyph( int font_smoothing, - TT_Glyph glyph, - int x_offset, - int y_offset ) - { - if ( !font_smoothing ) - return TT_Get_Glyph_Bitmap( glyph, &Bit, - (long)x_offset*64, (long)y_offset*64 ); - else - { - TT_Glyph_Metrics metrics; - - TT_Error error; - TT_F26Dot6 x, y, xmin, ymin, xmax, ymax; - int ioff, iread; - char *off, *read, *_off, *_read; - - - /* font-smoothing mode */ - - /* we begin by grid-fitting the bounding box */ - TT_Get_Glyph_Metrics( glyph, &metrics ); - - xmin = metrics.bbox.xMin & -64; - ymin = metrics.bbox.yMin & -64; - xmax = (metrics.bbox.xMax+63) & -64; - ymax = (metrics.bbox.yMax+63) & -64; - - /* now render the glyph in the small pixmap */ - - /* IMPORTANT NOTE: the offset parameters passed to the function */ - /* TT_Get_Glyph_Bitmap() must be integer pixel values, i.e., */ - /* multiples of 64. HINTING WILL BE RUINED IF THIS ISN'T THE CASE! */ - /* This is why we _did_ grid-fit the bounding box, especially xmin */ - /* and ymin. */ - - Clear_Small(); - error = TT_Get_Glyph_Pixmap( glyph, &Small_Bit, -xmin, -ymin ); - if ( error ) - return error; - - /* Blit-or the resulting small pixmap into the biggest one */ - /* We do that by hand, and provide also clipping. */ - - xmin = (xmin >> 6) + x_offset; - ymin = (ymin >> 6) + y_offset; - xmax = (xmax >> 6) + x_offset; - ymax = (ymax >> 6) + y_offset; - - /* Take care of comparing xmin and ymin with signed values! */ - /* This was the cause of strange misplacements when Bit.rows */ - /* was unsigned. */ - - if ( xmin >= (int)Bit.width || - ymin >= (int)Bit.rows || - xmax < 0 || - ymax < 0 ) - return TT_Err_Ok; /* nothing to do */ - - /* Note that the clipping check is performed _after_ rendering */ - /* the glyph in the small bitmap to let this function return */ - /* potential error codes for all glyphs, even hidden ones. */ - - /* In exotic glyphs, the bounding box may be larger than the */ - /* size of the small pixmap. Take care of that here. */ - - if ( xmax-xmin + 1 > Small_Bit.width ) - xmax = xmin + Small_Bit.width - 1; - - if ( ymax-ymin + 1 > Small_Bit.rows ) - ymax = ymin + Small_Bit.rows - 1; - - /* set up clipping and cursors */ - - iread = 0; - if ( ymin < 0 ) - { - iread -= ymin * Small_Bit.cols; - ioff = 0; - ymin = 0; - } - else - ioff = ymin * Bit.cols; - - if ( ymax >= Bit.rows ) - ymax = Bit.rows-1; - - if ( xmin < 0 ) - { - iread -= xmin; - xmin = 0; - } - else - ioff += xmin; - - if ( xmax >= Bit.width ) - xmax = Bit.width - 1; - - _read = (char*)Small_Bit.bitmap + iread; - _off = (char*)Bit.bitmap + ioff; - - for ( y = ymin; y <= ymax; y++ ) - { - read = _read; - off = _off; - - for ( x = xmin; x <= xmax; x++ ) - { - *off = bounded_palette[*off | *read]; - off++; - read++; - } - _read += Small_Bit.cols; - _off += Bit.cols; - } - - return TT_Err_Ok; - } - } - - - -/* End */ Index: xc/extras/FreeType/test/display.h diff -u xc/extras/FreeType/test/display.h:1.1.1.2 xc/extras/FreeType/test/display.h:removed --- xc/extras/FreeType/test/display.h:1.1.1.2 Sat Feb 12 23:56:16 2000 +++ xc/extras/FreeType/test/display.h Wed Mar 16 20:59:48 2005 @@ -1,73 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* display.h: Display component interface used by test programs */ -/* */ -/* This file is used to display glyphs and strings in a target window */ -/* using the graphics drivers provided by gmain.c, gevents.h, etc. */ -/* */ -/* Its role is to be shared and heavely commented to let people understand */ -/* how we do the job... */ -/* */ -/* See comments in display.c for a full description! */ -/* */ -/****************************************************************************/ - -#ifndef DISPLAY_H -#define DISPLAY_H - -#include "freetype.h" /* TT_Raster_Map */ - - /* The target bitmap or pixmap -- covering the full display window/screen */ - extern TT_Raster_Map Bit; - - /* A smaller intermediate bitmap used to render individual glyphs when */ - /* font smoothing mode is activated. It is then or-ed to `Bit'. */ - extern TT_Raster_Map Small_Bit; - - /* the virtual palette */ - extern unsigned char virtual_palette[5]; - - /* Or-ing the possible palette values gets us from 0 to 7 */ - /* We must bound check these... */ - extern unsigned char bounded_palette[8]; - - - /* Clears the Bit bitmap/pixmap */ - void Clear_Display( void ); - - /* Clears the Small_Bit pixmap */ - void Clear_Small( void ); - - /* Initialize the display bitmap named Bit */ - int Init_Display( int font_smoothing ); - - /* Initialize Small Bitmap */ - int Init_Small( int x_ppem, int y_ppem ); - - /* Convert the display pixmap from virtual to display palette */ - void Convert_To_Display_Palette( void ); - - /* Render a single glyph into the display bit/pixmap. */ - /* */ - /* Note that in b/w mode, we simply render the glyph directly into */ - /* the display map, as the scan-line converter or-es the glyph into */ - /* the target bitmap. */ - /* */ - /* In gray mode, however, the glyph is first rendered individually in */ - /* the Small_Bit map, then 'or-ed' with bounding into the display */ - /* pixmap. */ - /* */ - TT_Error Render_Single_Glyph( int font_smoothing, - TT_Glyph glyph, - int x_offset, - int y_offset ); - -#endif /* DISPLAY_H */ - - -/* End */ Index: xc/extras/FreeType/test/fdebug.c diff -u xc/extras/FreeType/test/fdebug.c:1.1.1.2 xc/extras/FreeType/test/fdebug.c:removed --- xc/extras/FreeType/test/fdebug.c:1.1.1.2 Sat Feb 12 23:56:16 2000 +++ xc/extras/FreeType/test/fdebug.c Wed Mar 16 20:59:48 2005 @@ -1,285 +0,0 @@ -/****************************************************************************} -{* *} -{* The FreeType project - a Free and Portable Quality TrueType Renderer. *} -{* *} -{* Copyright 1996-1999 by *} -{* D. Turner, R.Wilhelm, and W. Lemberg *} -{* *} -{* fdebug : A very simple TrueType bytecode debugger. *} -{* *} -{* NOTE : You must compile the interpreter with the DEBUG_INTERPRETER *} -{* macro defined in order to link this program! *} -{* *} -{****************************************************************************/ - -#include /* libc ANSI */ -#include -#include -#include - -#include "freetype.h" -#include "tttypes.h" -#include "ttdebug.h" -#include "ttobjs.h" - - -#ifdef UNIX -#ifndef HAVE_POSIX_TERMIOS -#include -#include -#else -#ifndef HAVE_TCGETATTR -#define HAVE_TCGETATTR -#endif /* HAVE_TCGETATTR */ -#ifndef HAVE_TCSETATTR -#define HAVE_TCSETATTR -#endif /* HAVE_TCSETATTR */ -#include -#endif /* HAVE_POSIX_TERMIOS */ -#endif - - /* MAGIC: This variable is only defined in ttinterp.c if the */ - /* macro DEBUG_INTERPRETER is set. It specifies the code */ - /* range to debug. By default, it is TT_CodeRange_Glyph. */ - /* */ - extern - int debug_coderange; - - -#define Font_Buff_Size 256000 /* this buffer holds all */ - /* font specific data. */ - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_Error error; - - TT_Face_Properties properties; - - int num_glyphs; - int ptsize; - - Int Fail; - Int Num; - int mode = 2; - unsigned char autorun; - -/********************************************************************* - * - * Usage : print usage message - * - *********************************************************************/ - - static - void Usage( const char* execname ) - { - TT_Message( "fdebug: a simple TrueType bytecode debugger - part of the FreeType project\n" ); - TT_Message( "--------------------------------------------------------------------------\n\n"); - TT_Message( "Usage: %s glyphnum ppem fontname[.ttf]\n", execname ); - TT_Message( " or %s --cvt ppem fontname[.ttf]\n", execname ); - TT_Message( " or %s --font fontname[.ttf]\n\n", execname ); - exit( EXIT_FAILURE ); - } - - -/********************************************************************* - * - * Init_Keyboard : set the input file descriptor to char-by-char - * mode on Unix.. - * - *********************************************************************/ - -#ifdef UNIX - - struct termios old_termio; - - static - void Init_Keyboard( void ) - { - struct termios termio; - - -#ifndef HAVE_TCGETATTR - ioctl( 0, TCGETS, &old_termio ); -#else - tcgetattr( 0, &old_termio ); -#endif - - termio = old_termio; - - termio.c_lflag &= ~(ICANON+ECHO+ECHOE+ECHOK+ECHONL+ECHOKE); - -#ifndef HAVE_TCSETATTR - ioctl( 0, TCSETS, &termio ); -#else - tcsetattr( 0, TCSANOW, &termio ); -#endif - } - - static - void Reset_Keyboard( voi ) - { -#ifndef HAVE_TCSETATTR - ioctl( 0, TCSETS, &old_termio ); -#else - tcsetattr( 0, TCSANOW, &old_termio ); -#endif - - } - -#else - - static - void Init_Keyboard( void ) - { - } - - static - void Reset_Keyboard( voi ) - { - } - -#endif - - static - void Print_Banner( void ) - { - TT_Message( "fdebug - a simple TrueType bytecode debugger for FreeType\n" ); - TT_Message( "------------------------------------------------------------\n" ); - TT_Message( "type '?' for help - copyright 1996-1999 the FreeType Project\n\n" ); - } - - - static - void Error( const char* message, - const char* filename ) - { - static char tempstr[256]; - - sprintf( tempstr, "ERROR (%s): %s\n", filename, message ); - TT_Message( tempstr ); - - sprintf( tempstr, " code = 0x%04lx\n", error ); - TT_Message( tempstr ); - - Reset_Keyboard(); - exit( EXIT_FAILURE ); - } - - - static - void Init_Face( const char* filename ) - { - error = TT_Init_FreeType(&engine); - if (error) Error( "could not initialise FreeType", filename ); - - /* open face object */ - error = TT_Open_Face( engine, filename, &face ); - if (error) Error( "could not find or open file", filename ); - - /* get properties */ - TT_Get_Face_Properties( face, &properties ); - num_glyphs = properties.num_Glyphs; - - /* create instance */ - error = TT_New_Instance( face, &instance ); - if (error) Error( "could not create instance", filename ); - - error = TT_New_Glyph( face, &glyph ); - if (error) Error( "could not create glyph container", filename ); - - TT_Set_Instance_Resolutions( instance, 96, 96 ); - - error = TT_Set_Instance_CharSize( instance, ptsize << 6 ); - if (error) Error( "could not set text size", filename ); - } - - - int main( int argc, char** argv ) - { - int i; - char filename[128+4]; - char* execname; - - - execname = argv[0]; - if ( argc < 2 ) - Usage( execname ); - - if ( strcmp( argv[1], "--font" ) == 0 ) - { - debug_coderange = TT_CodeRange_Font; - mode = 0; - argc--; - argv++; - } - else if ( strcmp( argv[1], "--cvt" ) == 0 ) - { - debug_coderange = TT_CodeRange_Cvt; - argv++; - argc--; - mode = 1; - } - else if ( sscanf( argv[1], "%d", &Num ) == 1 ) - { - mode = 2; - argv++; - argc--; - } - else - Usage( execname ); - - /* read the point size for cvt and glyph modes */ - if (mode > 0) - { - if ( sscanf( argv[1], "%d", &ptsize ) != 1 ) - Usage( execname ); - argc--; - argv++; - } - - if ( argc != 2 ) - Usage(execname); - - i = strlen( argv[1] ); - while ( i > 0 && argv[1][i] != '\\' ) - { - if ( argv[1][i] == '.' ) - i = 0; - i--; - } - - filename[128] = 0; - - strncpy( filename, argv[1], 128 ); - if ( i >= 0 ) - strncpy( filename + strlen(filename), ".ttf", 4 ); - - Init_Keyboard(); - - if (mode == 2) - { - Init_Face( filename ); - Print_Banner(); - - error = TT_Load_Glyph( instance, glyph, Num, TTLOAD_DEFAULT ); - if (error) Error( "Error during bytecode execution", filename ); - } - else - { - Print_Banner(); - Init_Face( filename ); - } - - TT_Done_FreeType(engine); - - Reset_Keyboard(); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftdump.c diff -u xc/extras/FreeType/test/ftdump.c:1.2 xc/extras/FreeType/test/ftdump.c:removed --- xc/extras/FreeType/test/ftdump.c:1.2 Sat Jan 11 22:55:44 2003 +++ xc/extras/FreeType/test/ftdump.c Wed Mar 16 20:59:48 2005 @@ -1,929 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftdump: Simple TrueType font file resource profiler. */ -/* */ -/* This program dumps various properties of a given font file. */ -/* */ -/* */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ -/* $XFree86: xc/extras/FreeType/test/ftdump.c,v 1.2 2003/01/12 03:55:44 tsi Exp $ */ - -#include -#include -#include - -#include "common.h" /* for Panic() etc. */ -#include "freetype.h" -#include "ftxcmap.h" -#include "ftxopen.h" /* TrueType Open support */ -#include "ftxsbit.h" /* embedded bitmap support */ - -/* - * The following comment should be ignored. The "ttobjs.h" file does - * already include ft_conf.h. - * - * ------------------------------------------------------------------ - * - * IGNORE> Basically, an external program using FreeType shouldn't depend on an - * IGNORE> internal file of the FreeType library, especially not on ft_conf.h -- but - * IGNORE> to avoid another configure script which tests for the existence of the - * IGNORE> i18n stuff we include ft_conf.h here since we can be sure that our test - * IGNORE> programs use the same configuration options as the library itself. - */ - -#include "ttobjs.h" /* We're going to access internal tables directly */ - -#ifdef HAVE_LIBINTL_H - -#ifdef HAVE_LOCALE_H -#include -#endif - -#include "ftxerr18.h" -#include -#else -#define gettext( x ) ( x ) -#endif - - - TT_Error error; - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - - TT_Instance_Metrics imetrics; - TT_Outline outline; - TT_Glyph_Metrics metrics; - - TT_Face_Properties properties; - - int num_glyphs; - int ptsize; - - int Fail; - int Num; - - int flag_memory = 1; - int flag_names = 1; - int flag_encodings = 1; - int flag_cmap = 1; - int flag_sbits = 1; - int flag_ttopen = 1; - -#ifdef FREETYPE_DLL - - /* If the library is linked as a DLL, TTMemory_Allocated() */ - /* (which is not exported) cannot be accessed. */ - /* In this case, some compilers report an error because */ - /* they try to link against a non-existing symbol. */ - /* */ - /* We thus avoid the external reference on these compilers. */ - -# define TTMemory_Allocated 0L - -#else - extern long TTMemory_Allocated; -#endif - - long org_memory, old_memory, cur_memory; - - const char* Apple_Encodings[33] = - { - "Roman", "Japanese", "Chinese", "Korean", "Arabic", "Hebrew", - "Greek", "Russian", "RSymbol", "Devanagari", "Gurmukhi", - "Gujarati", "Oriya", "Bengali", "Tamil", "Telugu", "Kannada", - "Malayalam", "Sinhalese", "Burmese", "Khmer", "Tai", "Laotian", - "Georgian", "Armenian", "Maldivian/Simplif. Chinese", "Tibetan", - "Mongolian", "Geez", "Slavic", "Vietnamese", "Sindhi", "Uninterpreted" - }; - - struct - { - long initial_overhead; - long face_object; - long glyph_object; - long first_instance; - long second_instance; - - } memory_footprint; - - - /* We ignore error message strings with this function */ - -#ifndef HAVE_LIBINTL_H - static char* - TT_ErrToString18( TT_Error error ) - { - static char temp[32]; - - - sprintf( temp, "0x%04lx", error ); - return temp; - } -#endif - - - void - Save_Memory( long* var ) - { - *var = TTMemory_Allocated - old_memory; - old_memory += *var; - } - -#define FOOTPRINT( field ) Save_Memory( &memory_footprint.##field ) - - - static void - Print_Mem( long val, char* string ) - { - printf( "%6ld Bytes (%4ld kByte): %s\n", - val, - ( val + 1023L ) / 1024, - string ); - } - -#define PRINT_MEM( field, string ) \ - Print_Mem( memory_footprint.##field, string ) - - - /* Print the memory footprint */ - - void - Print_Memory( void ) - { - /* create glyph */ - error = TT_New_Glyph( face, &glyph ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create glyph container.\n" ) ); - goto Failure; - } - - FOOTPRINT( glyph_object ); - - /* create instance */ - error = TT_New_Instance( face, &instance ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create instance.\n" ) ); - goto Failure; - } - - FOOTPRINT( first_instance ); - - error = TT_New_Instance( face, &instance ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create second instance.\n" ) ); - goto Failure; - } - - FOOTPRINT( second_instance ); - - printf( gettext( "Memory footprint statistics:\n" ) ); - separator_line( stdout, 78 ); - - /* NOTE: In our current implementation, the face's execution */ - /* context object is created lazily with the first */ - /* instance. However, all later instances share the */ - /* the same context. */ - - PRINT_MEM( face_object, gettext( "face object" ) ); - PRINT_MEM( glyph_object, gettext( "glyph object" ) ); - PRINT_MEM( second_instance, gettext( "instance object" ) ); - - Print_Mem( memory_footprint.first_instance - - memory_footprint.second_instance, - gettext( "exec. context object" ) ); - - separator_line( stdout, 78 ); - - Print_Mem( memory_footprint.face_object + - memory_footprint.glyph_object + - memory_footprint.first_instance, - gettext( "total memory usage" ) ); - - printf( "\n" ); - - return; - - Failure: - fprintf( stderr, " " ); - Panic( gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - } - - - static char name_buffer[257]; - static int name_len = 0; - - - static char* - LookUp_Name( int index ) - { - unsigned short i, n; - - unsigned short platform, encoding, language, id; - char* string; - unsigned short string_len; - - int j, found; - - - n = properties.num_Names; - - for ( i = 0; i < n; i++ ) - { - TT_Get_Name_ID( face, i, &platform, &encoding, &language, &id ); - TT_Get_Name_String( face, i, &string, &string_len ); - - if ( id == index ) - { - - /* The following code was inspired from Mark Leisher's */ - /* ttf2bdf package */ - - found = 0; - - /* Try to find a Microsoft English name */ - - if ( platform == 3 ) - for ( j = 1; j >= 0; j-- ) - if ( encoding == j ) /* Microsoft ? */ - if ( (language & 0x3FF) == 0x009 ) /* English language */ - { - found = 1; - break; - } - - if ( !found && platform == 0 && language == 0 ) - found = 1; - - /* Found a Unicode Name. */ - - if ( found ) - { - if ( string_len > 512 ) - string_len = 512; - - name_len = 0; - - for ( i = 1; i < string_len; i += 2 ) - name_buffer[name_len++] = string[i]; - - name_buffer[name_len] = '\0'; - - return name_buffer; - } - } - } - - /* Not found */ - return NULL; - } - - - static void - Print_Names( void ) - { - printf( gettext( "font name table entries\n" ) ); - separator_line( stdout, 78 ); - - if ( LookUp_Name( 4 ) ) - printf( "%s - ", name_buffer ); - - if ( LookUp_Name( 5 ) ) - printf( "%s\n\n", name_buffer ); - - if ( LookUp_Name( 6 ) ) - printf( gettext( "PostScript name: %s\n\n" ), name_buffer ); - - if ( LookUp_Name( 0 ) ) - printf( "%s\n\n", name_buffer ); - - if ( LookUp_Name( 7 ) ) - printf( name_buffer ); - - printf( "\n" ); - separator_line( stdout, 78 ); - } - - - static void - Print_Encodings( void ) - { - unsigned short n, i; - unsigned short platform, encoding; - char* platStr, *encoStr; - - char tempStr[128]; - - - printf( gettext( "character map encodings\n" ) ); - separator_line( stdout, 78 ); - - n = properties.num_CharMaps; - if ( n == 0 ) - { - printf( gettext( - "The file doesn't seem to have any encoding table.\n" ) ); - return; - } - - printf( gettext( "There are %hu encodings:\n\n" ), n ); - - for ( i = 0; i < n; i++ ) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - printf( gettext( "encoding %2u: " ), i ); - - platStr = encoStr = NULL; - - switch ( platform ) - { - case TT_PLATFORM_APPLE_UNICODE: - platStr = "Apple Unicode"; - switch ( encoding ) - { - case TT_APPLE_ID_DEFAULT: - encoStr = ""; - break; - - case TT_APPLE_ID_UNICODE_1_1: - encoStr = "(v.1.1)"; - break; - - case TT_APPLE_ID_ISO_10646: - encoStr = "(ISO 10646-1:1993)"; - break; - - case TT_APPLE_ID_UNICODE_2_0: - encoStr = "(v.2.0)"; - break; - - default: - sprintf( tempStr, gettext( "Unknown value %hu" ), encoding ); - encoStr = tempStr; - } - break; - - case TT_PLATFORM_MACINTOSH: - platStr = "Apple"; - if ( encoding > 32 ) - { - sprintf( tempStr, gettext( "Unknown value %hu" ), encoding ); - encoStr = tempStr; - } - else - encoStr = (char*)Apple_Encodings[encoding]; - break; - - case TT_PLATFORM_ISO: - platStr = "Iso"; - switch ( encoding ) - { - case TT_ISO_ID_7BIT_ASCII: - platStr = "Ascii"; - encoStr = "7-bit"; - break; - - case TT_ISO_ID_10646: - encoStr = "10646"; - break; - - case TT_ISO_ID_8859_1: - encoStr = "8859-1"; - break; - - default: - sprintf( tempStr, "%hu", encoding ); - encoStr = tempStr; - } - break; - - case TT_PLATFORM_MICROSOFT: - platStr = "Windows"; - switch ( encoding ) - { - case TT_MS_ID_SYMBOL_CS: - encoStr = "Symbol"; - break; - - case TT_MS_ID_UNICODE_CS: - encoStr = "Unicode"; - break; - - case TT_MS_ID_SJIS: - encoStr = "Shift-JIS"; - break; - - case TT_MS_ID_GB2312: - encoStr = "GB2312"; - break; - - case TT_MS_ID_BIG_5: - encoStr = "Big 5"; - break; - - case TT_MS_ID_WANSUNG: - encoStr = "WanSung"; - break; - - case TT_MS_ID_JOHAB: - encoStr = "Johab"; - break; - - default: - sprintf( tempStr, gettext( "Unknown value %hu" ), encoding ); - encoStr = tempStr; - } - break; - - default: - sprintf( tempStr, "%hu - %hu", platform, encoding ); - platStr = gettext( "Unknown" ); - encoStr = tempStr; - } - - printf( "%s %s\n", platStr, encoStr ); - } - - printf( "\n" ); - separator_line( stdout, 78 ); - } - - - static void - Print_Cmap( void ) - { - TT_CharMap charmap; - TT_UShort glyph_index; - TT_Long char_index; - unsigned short n, i; - unsigned short platform, encoding; - - - printf( gettext( "ftxcmap test\n" ) ); - separator_line( stdout, 78 ); - - n = properties.num_CharMaps; - if ( n == 0 ) - { - printf( gettext( - "The file doesn't seem to have any encoding table.\n" ) ); - return; - } - - printf( gettext( "There are %hu encodings:\n\n" ), n ); - - for ( i = 0; i < n; i++ ) - { - - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - printf( gettext( "encoding %2u:\n" ), i ); - - TT_Get_CharMap( face, i, &charmap); - - char_index = TT_CharMap_First( charmap, &glyph_index ); - printf( gettext( "first: glyph index %hu, character code 0x%lx\n" ), - glyph_index, char_index ); - - char_index = TT_CharMap_Next( charmap, char_index, &glyph_index ); - printf( gettext( "next: glyph index %hu, character code 0x%lx\n" ), - glyph_index, char_index ); - - char_index = TT_CharMap_Last( charmap, &glyph_index ); - printf( gettext( "last: glyph index %hu, character code 0x%lx\n" ), - glyph_index, char_index ); - } - - printf( "\n" ); - separator_line( stdout, 78 ); - } - - - static void - Print_SBits( void ) - { - TT_EBLC eblc; - TT_Error error; - - - error = TT_Get_Face_Bitmaps( face, &eblc ); - if ( error == TT_Err_Table_Missing ) - return; - if ( error ) - { - fprintf( stderr, gettext( - "Error while retrieving embedded bitmaps table.\n" ) ); - goto Failure; - } - - printf( gettext( "embedded bitmap table\n" ) ); - separator_line( stdout, 78 ); - - printf( gettext( " version of embedded bitmap table: 0x%lx\n" ), - eblc.version ); - printf( gettext( " number of embedded bitmap strikes: %lu\n" ), - eblc.num_strikes ); - - { - TT_SBit_Strike* strike = eblc.strikes; - int count = 0; - - - for ( ; count < eblc.num_strikes; count++, strike++ ) - { - printf( gettext( " bitmap strike %hu/%lu: " ), - count + 1, eblc.num_strikes ); - - printf( gettext( "%hux%hu pixels, %hu-bit depth, glyphs [%hu..%hu]\n" ), - strike->x_ppem, strike->y_ppem, strike->bit_depth, - strike->start_glyph, strike->end_glyph ); - { - TT_SBit_Range* range = strike->sbit_ranges; - TT_SBit_Range* limit = range + strike->num_ranges; - - - for ( ; range < limit; range++ ) - printf( gettext( " range format (%hu:%hu) glyphs %hu..%hu\n" ), - range->index_format, - range->image_format, - range->first_glyph, - range->last_glyph ); - } - } - } - printf( "\n" ); - separator_line( stdout, 78 ); - - return; - - Failure: - fprintf( stderr, " " ); - Panic( gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - } - - -#define TAG2STRING( t, s ) s[0] = (char)(t >> 24), \ - s[1] = (char)(t >> 16), \ - s[2] = (char)(t >> 8), \ - s[3] = (char)(t ) - - - static void - Print_GSUB( void ) - { - TTO_GSUBHeader gsub; - TT_Error error; - - TT_UShort i; - TTO_Feature f; - TTO_Lookup* lo; - - TT_ULong *script_tag_list, *stl; - TT_ULong *language_tag_list, *ltl; - TT_ULong *feature_tag_list, *ftl; - - TT_UShort script_index, language_index, - feature_index, req_feature_index; - - char script_tag[4], language_tag[4], feature_tag[4]; - - - error = TT_Load_GSUB_Table( face, &gsub, NULL ); - if ( error == TT_Err_Table_Missing ) - return; - if ( error ) - { - fprintf( stderr, gettext( "Error while loading GSUB table.\n" ) ); - goto Failure; - } - - printf( gettext( "GSUB table\n" ) ); - separator_line( stdout, 78 ); - - error = TT_GSUB_Query_Scripts( &gsub, &script_tag_list ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while querying GSUB script list.\n" ) ); - goto Failure; - } - - stl = script_tag_list; - for ( ; *stl; stl++ ) - { - TAG2STRING( *stl, script_tag ); - - error = TT_GSUB_Select_Script( &gsub, *stl, &script_index ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while selecting GSUB script `%4.4s'.\n" ), - script_tag ); - goto Failure; - } - - printf( gettext( " script `%4.4s' (index %hu):\n" ), - script_tag, script_index ); - - error = TT_GSUB_Query_Features( &gsub, script_index, 0xFFFF, - &feature_tag_list ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while querying GSUB default language system for script `%4.4s'.\n" ), - script_tag ); - goto Failure; - } - - printf( gettext( " default language system:\n" ) ); - - ftl = feature_tag_list; - for ( ; *ftl; ftl++ ) - { - TAG2STRING( *ftl, feature_tag ); - - error = TT_GSUB_Select_Feature( &gsub, *ftl, - script_index, 0xFFFF, - &feature_index ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while selecting GSUB feature `%4.4s'\n" - "for default language system of script `%4.4s'.\n" ), - feature_tag, script_tag ); - goto Failure; - } - - printf( gettext( " feature `%4.4s' (index %hu; lookup " ), - feature_tag, feature_index ); - - f = gsub.FeatureList.FeatureRecord[feature_index].Feature; - - for ( i = 0; i < f.LookupListCount - 1; i++ ) - printf( "%hu, ", f.LookupListIndex[i] ); - printf( "%hu)\n", f.LookupListIndex[i] ); - } - free( feature_tag_list ); - - error = TT_GSUB_Query_Languages( &gsub, script_index, - &language_tag_list ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while querying GSUB language list for script `%4.4s'.\n" ), - script_tag ); - goto Failure; - } - - ltl = language_tag_list; - for ( ; *ltl; ltl++ ) - { - TAG2STRING( *ltl, language_tag ); - - error = TT_GSUB_Select_Language( &gsub, *ltl, - script_index, - &language_index, - &req_feature_index ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while selecting GSUB language `%4.4s' for script `%4.4s'.\n" ), - language_tag, script_tag ); - goto Failure; - } - - printf( gettext( " language `%4.4s' (index %hu):\n" ), - language_tag, language_index ); - - if ( req_feature_index != 0xFFFF ) - { - printf( gettext( " required feature index %hu (lookup " ), - req_feature_index ); - - f = gsub.FeatureList.FeatureRecord[req_feature_index].Feature; - - for ( i = 0; i < f.LookupListCount - 1; i++ ) - printf( "%hu, ", f.LookupListIndex[i] ); - printf( "%hu)\n", f.LookupListIndex[i] ); - } - - error = TT_GSUB_Query_Features( &gsub, script_index, language_index, - &feature_tag_list ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while querying GSUB feature list\n" - "for script `%4.4s', language `%4.4s'.\n" ), - script_tag, language_tag ); - goto Failure; - } - - ftl = feature_tag_list; - for ( ; *ftl; ftl++ ) - { - TAG2STRING( *ftl, feature_tag ); - - error = TT_GSUB_Select_Feature( &gsub, *ftl, - script_index, language_index, - &feature_index ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while selecting GSUB feature `%4.4s'\n" - "for script `%4.4s', language `%4.4s'.\n" ), - feature_tag, script_tag, language_tag ); - goto Failure; - } - - printf( gettext( " feature `%4.4s' (index %hu; lookup " ), - feature_tag, feature_index ); - - f = gsub.FeatureList.FeatureRecord[feature_index].Feature; - - for ( i = 0; i < f.LookupListCount - 1; i++ ) - printf( "%hu, ", f.LookupListIndex[i] ); - printf( "%hu)\n", f.LookupListIndex[i] ); - } - free( feature_tag_list ); - } - free( language_tag_list ); - } - free( script_tag_list ); - - printf( "\n" ); - - lo = gsub.LookupList.Lookup; - - printf( gettext( "Lookups:\n\n" ) ); - - for ( i = 0; i < gsub.LookupList.LookupCount; i++ ) - printf( gettext( " %hu: type %hu, flag 0x%x\n" ), - i, lo[i].LookupType, lo[i].LookupFlag ); - - printf( "\n" ); - separator_line( stdout, 78 ); - - return; - - Failure: - fprintf( stderr, " " ); - Panic( gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - } - - - int - main( int argc, char** argv ) - { - int i; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - char* gt; - - -#ifdef HAVE_LIBINTL_H - setlocale( LC_ALL, "" ); - bindtextdomain( "freetype", LOCALEDIR ); - textdomain( "freetype" ); -#endif - - execname = argv[0]; - - if ( argc != 2 ) - { - gt = gettext( "ftdump: Simple TrueType Dumper -- part of the FreeType project" ); - fprintf( stderr, "%s\n", gt ); - separator_line( stderr, strlen( gt ) ); - - fprintf( stderr, gettext( "Usage: %s fontname[.ttf|.ttc]\n\n" ), - execname ); - - exit( EXIT_FAILURE ); - } - - i = strlen( argv[1] ); - while ( i > 0 && argv[1][i] != '\\' ) - { - if ( argv[1][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[1], 128 ); - strncpy( alt_filename, argv[1], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Initialize engine */ - - old_memory = 0; - - if ( (error = TT_Init_FreeType( &engine )) ) - { - fprintf( stderr, gettext( "Error while initializing engine.\n" ) ); - goto Failure; - } - - if ( (error = TT_Init_SBit_Extension( engine )) ) - { - fprintf( stderr, gettext( - "Error while initializing embedded bitmap extension.\n" ) ); - goto Failure; - } - - if ( (error = TT_Init_GSUB_Extension( engine )) ) - { - fprintf( stderr, gettext( - "Error while initializing GSUB extension.\n" ) ); - goto Failure; - } - - FOOTPRINT( initial_overhead ); - - /* Open and Load face */ - - error = TT_Open_Face( engine, filename, &face ); - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( gettext( "Could not find or open %s.\n" ), filename ); - if ( error ) - { - fprintf( stderr, gettext( "Error while opening %s.\n" ), filename ); - goto Failure; - } - - FOOTPRINT( face_object ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &properties ); - num_glyphs = properties.num_Glyphs; - - /* Now do various dumps */ - - if ( flag_names ) - Print_Names(); - - if ( flag_encodings ) - Print_Encodings(); - - if ( flag_cmap ) - Print_Cmap(); - - if ( flag_sbits ) - Print_SBits(); - - if ( flag_ttopen ) - Print_GSUB(); - -#ifndef FREETYPE_DLL /* the statistics are meaningless if we use a DLL. */ - if ( flag_memory ) - Print_Memory(); -#endif - - TT_Close_Face( face ); - - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - - Failure: - fprintf( stderr, " " ); - Panic( gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - - return 0; /* never reached */ -} - - -/* End */ Index: xc/extras/FreeType/test/fterror.c diff -u xc/extras/FreeType/test/fterror.c:1.1.1.3 xc/extras/FreeType/test/fterror.c:removed --- xc/extras/FreeType/test/fterror.c:1.1.1.3 Sat Feb 12 23:56:17 2000 +++ xc/extras/FreeType/test/fterror.c Wed Mar 16 20:59:48 2005 @@ -1,76 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* E. Dieterich */ -/* */ -/* fterror: test errstr functionality. */ -/* */ -/****************************************************************************/ - - -#include -#include - -#include "freetype.h" -#include "ftxerr18.h" - -/* - * Basically, an external program using FreeType shouldn't depend on an - * internal file of the FreeType library, especially not on ft_conf.h -- but - * to avoid another configure script which tests for the existence of the - * i18n stuff we include ft_conf.h here since we can be sure that our test - * programs use the same configuration options as the library itself. - */ - -#include "ft_conf.h" - - -#ifdef HAVE_LIBINTL_H - -#ifdef HAVE_LOCALE_H -#include -#endif - -#include - -#else /* HAVE_LIBINTL_H */ - -#define gettext( x ) ( x ) - -#endif /* HAVE_LIBINTL_H */ - - - int - main( void ) - { - int i; -#ifdef HAVE_LIBINTL_H - char* domain; - - - setlocale( LC_ALL, "" ); - bindtextdomain( "freetype", LOCALEDIR ); - domain = textdomain( "freetype" ); -#endif - -#if 0 - printf( "domain: %s\n", domain = textdomain( "" ) ); -#endif - printf( gettext( "Start of fterror.\n" ) ); - - for ( i = 0; i < 10; i++ ) - printf( "Code: %i, %s\n", i, TT_ErrToString18( i ) ); - -#if 0 - printf( "domain: %s\n", domain = textdomain( "" ) ); -#endif - printf( gettext( "End of fterror.\n" ) ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftlint.c diff -u xc/extras/FreeType/test/ftlint.c:1.1.1.3 xc/extras/FreeType/test/ftlint.c:removed --- xc/extras/FreeType/test/ftlint.c:1.1.1.3 Sat Feb 12 23:56:17 2000 +++ xc/extras/FreeType/test/ftlint.c Wed Mar 16 20:59:48 2005 @@ -1,296 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftlint: a simple TrueType instruction tester. */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "common.h" -#include "freetype.h" - -/* - * Basically, an external program using FreeType shouldn't depend on an - * internal file of the FreeType library, especially not on ft_conf.h -- but - * to avoid another configure script which tests for the existence of the - * i18n stuff we include ft_conf.h here since we can be sure that our test - * programs use the same configuration options as the library itself. - */ - -#include "ft_conf.h" - - -#ifdef HAVE_LIBINTL_H - -#ifdef HAVE_LOCALE_H -#include -#endif - -#include -#include "ftxerr18.h" - -#else /* !HAVE_LIBINTL */ - -#define gettext( x ) ( x ) - - /* We ignore error message strings with this function */ - - static char* - TT_ErrToString18( TT_Error error ) - { - static char temp[32]; - - - sprintf( temp, "0x%04lx", error ); - return temp; - } - -#endif /* !HAVE_LIBINTL */ - - - TT_Error error; - - TT_Engine engine; - - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - - TT_Outline outline; - TT_Glyph_Metrics metrics; - - TT_Face_Properties properties; - - unsigned int num_glyphs; - int ptsize; - - int Fail; - int Num; - - - static TT_Error - LoadTrueTypeChar( int idx ) - { - return TT_Load_Glyph( instance, glyph, idx, TTLOAD_DEFAULT ); - } - - - static void - Usage( char* name ) - { - char* gt; - - - gt = gettext( "ftlint: Simple TrueType instruction tester -- part of the FreeType project" ); - fprintf( stderr, "%s\n", gt ); - separator_line( stderr, strlen( gt ) ); - - fprintf( stderr, gettext( - "Usage: %s ppem fontname[.ttf|.ttc] [fontname2..]\n\n" ), name ); - - exit( EXIT_FAILURE ); - } - - - int - main( int argc, char** argv ) - { - int i, file_index; - unsigned int id; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - char* fname; - - -#ifdef HAVE_LIBINTL_H - setlocale( LC_ALL, "" ); - bindtextdomain( "freetype", LOCALEDIR ); - textdomain( "freetype" ); -#endif - - execname = argv[0]; - - if ( argc < 3 ) - Usage( execname ); - - if ( sscanf( argv[1], "%d", &ptsize ) != 1 ) - Usage( execname ); - - /* Initialize engine */ - if ( (error = TT_Init_FreeType( &engine )) ) - { - fprintf( stderr, - gettext( "Error while initializing engine.\n" ) ); - goto Failure; - } - - /* Now check all files */ - for ( file_index = 2; file_index < argc; file_index++ ) - { - fname = argv[file_index]; - i = strlen( fname ); - while ( i > 0 && fname[i] != '\\' && fname[i] != '/' ) - { - if ( fname[i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, fname, 128 ); - strncpy( alt_filename, fname, 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Load face */ - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - i = strlen( filename ); - fname = filename; - - while ( i >= 0 ) - if ( filename[i] == '/' || filename[i] == '\\' ) - { - fname = filename + i + 1; - i = -1; - } - else - i--; - - fprintf( stderr, "%s: ", fname ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - fprintf( stderr, gettext( "Could not find or open %s.\n" ), - filename ); - goto Fail_Face; - } - if ( error ) - { - fprintf( stderr, gettext( "Error while opening %s.\n" ), filename ); - goto Fail_Face; - } - - /* get face properties */ - - TT_Get_Face_Properties( face, &properties ); - num_glyphs = properties.num_Glyphs; - - /* create glyph */ - error = TT_New_Glyph( face, &glyph ); - if ( error ) - { - fprintf( stderr, - gettext( "Could not create glyph container.\n" ) ); - goto Fail_Glyph; - } - - /* create instance */ - error = TT_New_Instance( face, &instance ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create instance.\n" ) ); - goto Fail_Instance; - } - - error = TT_Set_Instance_PixelSizes( instance, - ptsize, - ptsize, - ptsize*3/4 ); - if ( error ) - { - fprintf( stderr, - gettext( "Could not set point size to %d.\n" ), - ptsize ); - goto Fail_Set; - } - - Fail = 0; - - for ( id = 0; id < num_glyphs; id++ ) - { - if ( (error = LoadTrueTypeChar( id )) ) - { - if ( Fail < 10 ) - { - fprintf( stderr, !Fail ? gettext( "Error with\n " ) : " " ); - fprintf( stderr, gettext( "glyph %4u: %s\n" ), - id, TT_ErrToString18( error ) ); - } - Fail++; - } - } - - if ( Fail == 0 ) - fprintf( stderr, "OK.\n" ); - else - { - fprintf( stderr, " " ); - if ( Fail == 1 ) - fprintf( stderr, gettext( "1 fail.\n" ) ); - else - fprintf( stderr, gettext( "%d fails.\n" ), Fail ); - } - - /* hush complaints at the end of the loop */ - error = 0; - - Fail_Set: - TT_Done_Instance( instance ); - Fail_Instance: - TT_Done_Glyph( glyph ); - Fail_Glyph: - TT_Close_Face( face ); - Fail_Face: - ; - - - if ( error ) - { - fprintf( stderr, " " ); - fprintf( stderr, gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - } - } - - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - - Failure: - fprintf( stderr, " " ); - fprintf( stderr, gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - - exit( EXIT_FAILURE ); - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftmetric.c diff -u xc/extras/FreeType/test/ftmetric.c:1.1.1.1 xc/extras/FreeType/test/ftmetric.c:removed --- xc/extras/FreeType/test/ftmetric.c:1.1.1.1 Sat Feb 12 23:56:17 2000 +++ xc/extras/FreeType/test/ftmetric.c Wed Mar 16 20:59:48 2005 @@ -1,396 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1999 by */ -/* Yamano'uchi H. and W. Lemberg */ -/* */ -/* ftmetric: dump metrics and a glyph. */ -/* */ -/* NOTE: This is just a test program that is used to debug */ -/* the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "common.h" -#include "freetype.h" -#include "ftxsbit.h" - -/* - * Basically, an external program using FreeType shouldn't depend on an - * internal file of the FreeType library, especially not on ft_conf.h -- but - * to avoid another configure script which tests for the existence of the - * i18n stuff we include ft_conf.h here since we can be sure that our test - * programs use the same configuration options as the library itself. - */ - -#include "ft_conf.h" - - -#ifdef HAVE_LIBINTL_H - -#ifdef HAVE_LOCALE_H -#include -#endif - -#include -#include "ftxerr18.h" - -#else /* !HAVE_LIBINTL */ - -#define gettext( x ) ( x ) - - /* We ignore error message strings with this function */ - - static char* - TT_ErrToString18( TT_Error error ) - { - static char temp[32]; - - - sprintf( temp, "0x%04lx", error ); - return temp; - } - -#endif /* !HAVE_LIBINTL */ - - static void - usage( char* execname ) - { - char* gt; - - - fprintf( stderr, "\n" ); - gt = gettext( "ftmetric: Simple TTF metrics/glyph dumper -- part of the FreeType project" ); - fprintf( stderr, "%s\n", gt ); - separator_line( stderr, strlen( gt ) ); - fprintf( stderr, gettext( - "Usage: %s [options below] point fontname[.ttf|.ttc]\n" - "\n" - " -B show sbit's metrics (default: none)\n" - " -c C use C'th font index of TrueType collection (default: 0)\n" - " -i index glyph index (default: 0)\n" - " -r R use resolution R dpi (default: 72)\n" - "\n" ), execname ); - - exit( EXIT_FAILURE ); - } - - - static void - Show_Metrics( TT_Big_Glyph_Metrics metrics, - char* title ) - { - int show_advance = 1; - - - printf("%s: xMin %d, xMax %d, yMin %d, yMax %d", - title, - (int)(metrics.bbox.xMin / 64), - (int)(metrics.bbox.xMax / 64), - (int)(metrics.bbox.yMin / 64), - (int)(metrics.bbox.yMax / 64)); - - - if ( show_advance ) - printf( ", advance width %d", (int)(metrics.horiAdvance / 64) ); - - printf("\n"); - return; - } - - - int - main( int argc, char** argv ) - { - int i, orig_ptsize, file; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - int option; - - int ptsize; - int num_Faces = 0; - int glyph_index = 0; - int load_flags = TTLOAD_DEFAULT; - - int force_sbit = 0; - - TT_Engine engine; - - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - - TT_Raster_Map map; - - TT_Big_Glyph_Metrics metrics; - TT_Face_Properties properties; - TT_Instance_Metrics imetrics; - - TT_EBLC eblc; - TT_SBit_Image* bitmap = NULL; - - TT_Error error; - - - int res = 72; - -#ifdef HAVE_LIBINTL_H - setlocale( LC_ALL, "" ); - bindtextdomain( "freetype", LOCALEDIR ); - textdomain( "freetype" ); -#endif - - execname = ft_basename( argv[0] ); - - while ( 1 ) - { - option = ft_getopt( argc, argv, "c:r:i:B" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'r': - res = atoi( ft_optarg ); - if ( res < 1 ) - usage( execname ); - break; - - case 'c': - num_Faces = atoi( ft_optarg ); - if ( num_Faces < 0 ) - usage( execname ); - break; - - case 'i': - glyph_index = atoi( ft_optarg ); - if ( glyph_index < 0 ) - usage( execname ); - break; - - case 'B': - force_sbit = 1; - break; - - default: - usage( execname ); - break; - } - } - - argc -= ft_optind; - argv += ft_optind; - - if ( argc <= 1 ) - usage( execname ); - - if ( sscanf( argv[0], "%d", &orig_ptsize ) != 1 ) - orig_ptsize = 64; - - file = 1; - - ptsize = orig_ptsize; - - i = strlen( argv[file] ); - while ( i > 0 && argv[file][i] != '\\' && argv[file][i] != '/' ) - { - if ( argv[file][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[file], 128 ); - strncpy( alt_filename, argv[file], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Initialize engine */ - - error = TT_Init_FreeType( &engine ); - if ( error ) - { - fprintf( stderr, gettext( "Error while initializing engine.\n" ) ); - goto Failure; - } - - error = TT_Init_SBit_Extension( engine ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while initializing embedded bitmap extension.\n" ) ); - goto Failure; - } - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( gettext( "Could not find or open %s.\n" ), filename ); - if ( error ) - { - fprintf( stderr, gettext( "Error while opening %s.\n" ), - filename ); - goto Failure; - } - - TT_Get_Face_Properties( face, &properties ); - - printf( gettext( "There are %d fonts in this collection.\n" ), - (int)(properties.num_Faces) ); - - if ( num_Faces >= properties.num_Faces ) - Panic( gettext( - "There is no collection with index %d in this font file.\n" ), - num_Faces ); - - TT_Close_Face( face ); - - error = TT_Open_Collection( engine, filename, num_Faces, &face ); - - /* get face properties and eblc */ - - TT_Get_Face_Properties( face, &properties ); - if ( force_sbit ) - { - error = TT_Get_Face_Bitmaps( face, &eblc ); - if ( error == TT_Err_Table_Missing ) - Panic( gettext( "There is no embedded bitmap data in the font.\n" ) ); - if ( error ) - { - fprintf( stderr, gettext( - "Error while retrieving embedded bitmaps table.\n" ) ); - goto Failure; - } - } - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create glyph container.\n" ) ); - goto Failure; - } - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create instance.\n" ) ); - goto Failure; - } - - error = TT_Set_Instance_Resolutions( instance, res, res ); - if ( error ) - { - fprintf( stderr, gettext( "Could not set device resolutions.\n" ) ); - goto Failure; - } - - error = TT_Set_Instance_CharSize( instance, ptsize*64 ); - if ( error ) - { - fprintf( stderr, gettext( "Could not reset instance.\n" ) ); - goto Failure; - } - - TT_Get_Instance_Metrics( instance, &imetrics ); - - printf( gettext( "Instance metrics: ppemX %d, ppemY %d\n" ), - imetrics.x_ppem, - imetrics.y_ppem ); - - if ( force_sbit ) - { - error = TT_New_SBit_Image( &bitmap ); - if ( error ) - { - fprintf( stderr, gettext( - "Could not allocate glyph bitmap container.\n" ) ); - goto Failure; - } - - error = TT_Load_Glyph_Bitmap( face, instance, glyph_index, bitmap ); - if ( error ) - { - fprintf( stderr, gettext( - "Can't load bitmap for glyph %d.\n" ), glyph_index ); - goto Failure; - } - - Show_Metrics( bitmap->metrics, "SBit's metrics" ); - - printf( "SBit glyph:\n" ); - Show_Single_Glyph( &bitmap->map ); - } - else - { - TT_Load_Glyph( instance, glyph, glyph_index, load_flags ); - TT_Get_Glyph_Big_Metrics( glyph, &metrics ); - - map.width = ( metrics.bbox.xMax - metrics.bbox.xMin ) / 64; - map.rows = ( metrics.bbox.yMax - metrics.bbox.yMin ) / 64; - map.cols = ( map.width + 7 ) / 8; - map.size = map.cols * map.rows; - map.bitmap = malloc( map.size ); - map.flow = TT_Flow_Down; - - memset( map.bitmap, 0, map.size ); - - error = TT_Get_Glyph_Bitmap( glyph, &map, - -metrics.bbox.xMin, - -metrics.bbox.yMin ); - - Show_Metrics( metrics, gettext( "Outline's metrics" ) ); - - printf( gettext( "Outline glyph\n" ) ); - Show_Single_Glyph( &map ); - } - - free( map.bitmap ); - - if ( bitmap ) - TT_Done_SBit_Image( bitmap ); - - TT_Done_Instance( instance ); - TT_Done_Glyph( glyph ); - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - - Failure: - fprintf( stderr, " " ); - fprintf( stderr, gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - - exit( EXIT_FAILURE ); - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftsbit.c diff -u xc/extras/FreeType/test/ftsbit.c:1.1.1.1 xc/extras/FreeType/test/ftsbit.c:removed --- xc/extras/FreeType/test/ftsbit.c:1.1.1.1 Sat Feb 12 23:56:17 2000 +++ xc/extras/FreeType/test/ftsbit.c Wed Mar 16 20:59:48 2005 @@ -1,293 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftsbit: a _very_ simple embedded bitmap dumper for FreeType 1.x. */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "common.h" - -#include "freetype.h" -#include "ftxsbit.h" - -/* - * Basically, an external program using FreeType shouldn't depend on an - * internal file of the FreeType library, especially not on ft_conf.h -- but - * to avoid another configure script which tests for the existence of the - * i18n stuff we include ft_conf.h here since we can be sure that our test - * programs use the same configuration options as the library itself. - */ - -#include "ft_conf.h" - - -#ifdef HAVE_LIBINTL_H - -#ifdef HAVE_LOCALE_H -#include -#endif - -#include -#include "ftxerr18.h" - -#else /* !HAVE_LIBINTL */ - -#define gettext( x ) ( x ) - - /* We ignore error message strings with this function */ - - static char* TT_ErrToString18( TT_Error error ) - { - static char temp[32]; - - - sprintf( temp, "0x%04lx", error ); - return temp; - } - -#endif /* !HAVE_LIBINTL */ - - - TT_Error error; - - TT_Engine engine; - - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - - TT_Outline outline; - TT_Glyph_Metrics metrics; - - TT_Face_Properties properties; - TT_EBLC eblc; - TT_SBit_Image* bitmap; - - unsigned int num_glyphs; - int ptsize; - - int Fail; - int Num; - - - static void Usage( char* name ) - { - char* gt; - - - gt = gettext( "ftsbit: Simple TrueType `sbit' dumper -- part of the FreeType project" ); - fprintf( stderr, "%s\n", gt ); - separator_line( stderr, strlen( gt ) ); - - fprintf( stderr, gettext( - "Usage: %s ppem fontname[.ttf|.ttc] glyph_index [glyph_index2..]\n\n" ), name ); - - exit( EXIT_FAILURE ); - } - - - int main( int argc, char** argv ) - { - int i; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - char* fname; - - -#ifdef HAVE_LIBINTL_H - setlocale( LC_ALL, "" ); - bindtextdomain( "freetype", LOCALEDIR ); - textdomain( "freetype" ); -#endif - - execname = argv[0]; - - if ( argc < 3 ) - Usage( execname ); - - if ( sscanf( argv[1], "%d", &ptsize ) != 1 ) - Usage( execname ); - - /* Initialize engine */ - if ( (error = TT_Init_FreeType( &engine )) ) - { - fprintf( stderr, gettext( "Error while initializing engine.\n" ) ); - goto Failure; - } - - if ( (error = TT_Init_SBit_Extension( engine )) ) - { - fprintf( stderr, gettext( - "Error while initializing embedded bitmap extension.\n" ) ); - goto Failure; - } - - /* Now check all files */ - fname = argv[2]; - i = strlen( fname ); - while ( i > 0 && fname[i] != '\\' && fname[i] != '/' ) - { - if ( fname[i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, fname, 128 ); - strncpy( alt_filename, fname, 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Load face */ - error = TT_Open_Face( engine, filename, &face ); - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - i = strlen( filename ); - fname = filename; - - while ( i >= 0 ) - if ( filename[i] == '/' || filename[i] == '\\' ) - { - fname = filename + i + 1; - i = -1; - } - else - i--; - - if ( error ) - { - fprintf( stderr, gettext( "Could not find or open %s.\n" ), - filename ); - goto Failure; - } - if ( error ) - { - fprintf( stderr, gettext( "Error while opening %s.\n" ), filename ); - goto Failure; - } - - /* get face properties */ - TT_Get_Face_Properties( face, &properties ); - num_glyphs = properties.num_Glyphs; - - error = TT_Get_Face_Bitmaps( face, &eblc ); - if ( error == TT_Err_Table_Missing ) - { - fprintf( stderr, gettext( - "Could not find embedded bitmaps in this font.\n" ) ); - goto Failure; - } - if ( error ) - { - fprintf( stderr, gettext( - "Error while loading embedded bitmaps.\n" ) ); - goto Failure; - } - - /* create instance */ - error = TT_New_Instance( face, &instance ); - if ( error ) - { - fprintf( stderr, gettext( "Could not create instance.\n" ) ); - goto Failure; - } - - error = TT_Set_Instance_PixelSizes( instance, - ptsize, - ptsize, - ptsize*3/4 ); - if ( error ) - { - fprintf( stderr, - gettext( "Could not set point size to %d.\n" ), - ptsize ); - goto Failure; - } - - error = TT_New_SBit_Image( &bitmap ); - if ( error ) - { - fprintf( stderr, gettext( - "Could not allocate glyph bitmap container.\n" ) ); - goto Failure; - } - - for ( i = 3; i < argc; i++ ) - { - unsigned short glyph_index; - - - /* we use %i to allow the prefixes `0x' and `0' */ - if ( sscanf( argv[i], "%hi", &glyph_index ) != 1 ) - Usage( execname ); - - error = TT_Load_Glyph_Bitmap( face, instance, glyph_index, bitmap ); - - if ( error == TT_Err_Invalid_Glyph_Index ) - { - fprintf( stderr, gettext( - " no bitmap for glyph %d.\n" ), glyph_index ); - continue; - } - if ( error ) - { - fprintf( stderr, gettext( - "Can't load bitmap for glyph %d.\n" ), glyph_index ); - goto Failure; - } - - /* Dump the resulting bitmap */ - { - printf( gettext( "glyph index %d = %dx%d pixels, " ), - glyph_index, bitmap->map.rows, bitmap->map.width ); - - printf( gettext( "advance = %ld, minBearing = [%ld,%ld]\n" ), - (long)(bitmap->metrics.horiAdvance / 64), - (long)(bitmap->metrics.horiBearingX / 64), - (long)(bitmap->metrics.horiBearingY / 64)); - - Show_Single_Glyph( &bitmap->map ); - } - } - - TT_Done_SBit_Image( bitmap ); - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - - Failure: - fprintf( stderr, " " ); - fprintf( stderr, gettext( "FreeType error message: %s\n" ), - TT_ErrToString18( error ) ); - - exit( EXIT_FAILURE ); - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftstring.c diff -u xc/extras/FreeType/test/ftstring.c:1.1.1.3 xc/extras/FreeType/test/ftstring.c:removed --- xc/extras/FreeType/test/ftstring.c:1.1.1.3 Sat Feb 12 23:56:18 2000 +++ xc/extras/FreeType/test/ftstring.c Wed Mar 16 20:59:48 2005 @@ -1,486 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftstring: Making string text from individual glyph information. */ -/* */ -/* Keys: */ -/* */ -/* + : fast scale up */ -/* - : fast scale down */ -/* u : fine scale down */ -/* j : fine scale up */ -/* */ -/* h : toggle hinting */ -/* */ -/* ESC : exit */ -/* */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "common.h" /* for Panic() and Message() only */ -#include "display.h" -#include "freetype.h" - -#include "gevents.h" -#include "gdriver.h" -#include "gmain.h" - -#define Pi 3.1415926535 - -#define MAXPTSIZE 500 /* dtp */ -#define Center_X ( Bit.width / 2 ) /* dtp */ -#define Center_Y ( Bit.rows / 2 ) /* dtp */ - - char Header[128]; - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_CharMap char_map; - - TT_Glyph_Metrics metrics; - TT_Outline outline; - TT_Face_Properties properties; - TT_Instance_Metrics imetrics; - - int num_glyphs; - - int ptsize; - int hinted; - - int Rotation; - int Fail; - int Num; - unsigned char autorun; - - int gray_render; - - short glyph_code[128]; - int num_codes; - -/* Convert an ASCII string to a string of glyph indexes. */ -/* */ -/* IMPORTANT NOTE: */ -/* */ -/* There is no portable way to convert from any system's char. code */ -/* to Unicode. This function simply takes a char. string as argument */ -/* and "interprets" each character as a Unicode char. index with no */ -/* further check. */ -/* */ -/* This mapping is only valid for the ASCII character set (i.e., */ -/* codes 32 to 127); all other codes (like accentuated characters) */ -/* will produce more or less random results, depending on the system */ -/* being run. */ - - static void CharToUnicode( char* source ) - { - unsigned short i, n; - unsigned short platform, encoding; - - /* First, look for a Unicode charmap */ - - n = properties.num_CharMaps; - - for ( i = 0; i < n; i++ ) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - if ( (platform == 3 && encoding == 1 ) || - (platform == 0 && encoding == 0 ) ) - { - TT_Get_CharMap( face, i, &char_map ); - i = n + 1; - } - } - - if ( i == n ) - Panic( "Sorry, but this font doesn't contain any Unicode mapping table\n" ); - - for ( n = 0; n < 128 && source[n]; n++ ) - glyph_code[n] = TT_Char_Index( char_map, (short)source[n] ); - -#if 0 - /* Note, if you have a function, say ToUnicode(), to convert from */ - /* char codes to Unicode, use the following line instead: */ - - glyph_code[n] = TT_Char_Index( char_map, ToUnicode( source[n] ) ); -#endif - - num_codes = n; - } - - - static TT_Error Reset_Scale( int pointSize ) - { - TT_Error error; - - - if ( (error = TT_Set_Instance_PointSize( instance, pointSize )) ) - { - RestoreScreen(); - printf( "error = 0x%x\n", (int)error ); - Panic( "could not reset instance\n" ); - } - - TT_Get_Instance_Metrics( instance, &imetrics ); - - /* now re-allocate the small bitmap */ - if ( gray_render ) - { - Init_Small( imetrics.x_ppem, imetrics.y_ppem ); - Clear_Small(); - } - - return TT_Err_Ok; - } - - - static TT_Error LoadTrueTypeChar( int idx, int hint ) - { - int flags; - - - flags = TTLOAD_SCALE_GLYPH; - if ( hint ) - flags |= TTLOAD_HINT_GLYPH; - - return TT_Load_Glyph( instance, glyph, idx, flags ); - } - - - static TT_Error Render_All( void ) - { - TT_F26Dot6 x, y, z, minx, miny, maxx, maxy; - int i; - - TT_Error error; - - - /* On the first pass, we compute the compound bounding box */ - - x = y = 0; - - minx = miny = maxx = maxy = 0; - - for ( i = 0; i < num_codes; i++ ) - { - if ( !(error = LoadTrueTypeChar( glyph_code[i], hinted )) ) - { - TT_Get_Glyph_Metrics( glyph, &metrics ); - - z = x + metrics.bbox.xMin; - if ( minx > z ) - minx = z; - - z = x + metrics.bbox.xMax; - if ( maxx < z ) - maxx = z; - - z = y + metrics.bbox.yMin; - if ( miny > z ) - miny = z; - - z = y + metrics.bbox.yMax; - if ( maxy < z ) - maxy = z; - - x += metrics.advance & -64; - } - else - Fail++; - } - - /* We now center the bbox inside the target bitmap */ - - minx = ( minx & -64 ) >> 6; - miny = ( miny & -64 ) >> 6; - - maxx = ( (maxx+63) & -64 ) >> 6; - maxy = ( (maxy+63) & -64 ) >> 6; - - maxx -= minx; - maxy -= miny; - - minx = (Bit.width - maxx)/2; - miny = (Bit.rows + miny)/2; - - maxx += minx; - maxy += maxy; - - /* On the second pass, we render each glyph to its centered position. */ - /* This is slow, because we reload each glyph to render it! */ - - x = minx; - y = miny; - - for ( i = 0; i < num_codes; i++ ) - { - if ( !(error = LoadTrueTypeChar( glyph_code[i], hinted )) ) - { - TT_Get_Glyph_Metrics( glyph, &metrics ); - - Render_Single_Glyph( gray_render, glyph, x, y ); - - x += metrics.advance/64; - } - } - - return TT_Err_Ok; - } - - - static int Process_Event( TEvent* event ) - { - switch ( event->what ) - { - case event_Quit: /* ESC or q */ - return 0; - - case event_Keyboard: - if ( event->info == 'h' ) /* Toggle hinting */ - hinted = !hinted; - break; - - case event_Rotate_Glyph: - break; - - case event_Scale_Glyph: - ptsize += event->info; - if ( ptsize < 1 ) ptsize = 1; - if ( ptsize > MAXPTSIZE ) ptsize = MAXPTSIZE; - break; - - case event_Change_Glyph: - break; - } - - return 1; - } - - - static void usage( char* execname ) - { - printf( "\n" ); - printf( "ftstring: simple String Test Display -- part of the FreeType project\n" ); - printf( "--------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "Usage: %s [options below] ppem fontname[.ttf|.ttc] [string]\n", - execname ); - printf( "\n" ); - printf( " -g gray-level rendering (default: none)\n" ); - printf( " -r R use resolution R dpi (default: 96)\n" ); - printf( "\n" ); - - exit( EXIT_FAILURE ); - } - - - int main( int argc, char** argv ) - { - int i, old_ptsize, orig_ptsize, file; - int XisSetup = 0; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - int option; - int res = 96; - - TT_Error error; - TEvent event; - - - execname = argv[0]; - - while ( 1 ) - { - option = ft_getopt( argc, argv, "gr:" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'g': - gray_render = 1; - break; - - case 'r': - res = atoi( ft_optarg ); - if ( res < 1 ) - usage( execname ); - break; - - default: - usage( execname ); - break; - } - } - - argc -= ft_optind; - argv += ft_optind; - - if ( argc <= 1 ) - usage( execname ); - - if ( sscanf( argv[0], "%d", &orig_ptsize ) != 1 ) - orig_ptsize = 64; - - file = 1; - - /* Initialize engine */ - - if ( (error = TT_Init_FreeType( &engine )) ) - Panic( "Error while initializing engine, code = 0x%x.\n", error ); - - ptsize = orig_ptsize; - hinted = 1; - - i = strlen( argv[file] ); - while ( i > 0 && argv[file][i] != '\\' && argv[file][i] != '/' ) - { - if ( argv[file][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[file], 128 ); - strncpy( alt_filename, argv[file], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open %s.\n", filename ); - else if (error) - Panic( "Error while opening %s, error code = 0x%x.\n", - filename, error ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &properties ); - - num_glyphs = properties.num_Glyphs; - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - Panic( "Could not create glyph container.\n" ); - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - Panic( "Could not create instance for %s.\n", filename ); - - error = TT_Set_Instance_Resolutions( instance, res, res ); - if ( error ) - Panic( "Could not set device resolutions." ); - - if ( !XisSetup ) - { - XisSetup = 1; - - if ( gray_render ) - { - if ( !SetGraphScreen( Graphics_Mode_Gray ) ) - Panic( "Could not set up grayscale graphics mode.\n" ); - - TT_Set_Raster_Gray_Palette( engine, virtual_palette ); - } - else - { - if ( !SetGraphScreen( Graphics_Mode_Mono ) ) - Panic( "Could not set up mono graphics mode.\n" ); - } - } - - Init_Display( gray_render ); - - Reset_Scale( ptsize ); - - old_ptsize = ptsize; - - Fail = 0; - Num = 0; - - CharToUnicode( ( argv[2] ? argv[2] : - "The quick brown fox jumps over the lazy dog" ) ); - - for ( ;; ) - { - int key; - - - Clear_Display(); - Render_All(); - if ( gray_render ) - Convert_To_Display_Palette(); - - sprintf( Header, "%s: ptsize: %4d hinting: %s", - ft_basename( filename ), ptsize, - hinted ? "on" : "off" ); - - Display_Bitmap_On_Screen( Bit.bitmap, Bit.rows, Bit.cols ); - -#ifndef X11 -#ifndef OS2 - Print_XY( 0, 0, Header ); -#endif -#endif - - Get_Event( &event ); - if ( !( key = Process_Event( &event ) ) ) - goto Fin; - - if ( ptsize != old_ptsize ) - { - if ( Reset_Scale( ptsize ) ) - Panic( "Could not resize font.\n" ); - - old_ptsize = ptsize; - } - } - - Fin: - RestoreScreen(); - - TT_Done_FreeType( engine ); - - printf( "Execution completed successfully.\n" ); - printf( "Fails = %d.\n", Fail ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ -} - - -/* End */ Index: xc/extras/FreeType/test/ftstrpnm.c diff -u xc/extras/FreeType/test/ftstrpnm.c:1.1.1.3 xc/extras/FreeType/test/ftstrpnm.c:removed --- xc/extras/FreeType/test/ftstrpnm.c:1.1.1.3 Sat Feb 12 23:56:18 2000 +++ xc/extras/FreeType/test/ftstrpnm.c Wed Mar 16 20:59:48 2005 @@ -1,510 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftstrpnm: convert text to image (in PGM or PBM format) */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#define PROGNAME "ftstrpnm" - -#include -#include -#include - -#include "common.h" /* for ft_getopt() */ -#include "freetype.h" - -#define TT_VALID( handle ) ( ( handle ).z != NULL ) - - - /* Global variables */ - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - - TT_Face_Properties properties; - - TT_Raster_Map bit; - TT_Raster_Map small_bit; /* used when font-smoothing is enabled */ - - int pnm_width, pnm_height; - int pnm_x_shift, pnm_y_shift; - - - /* Loaded glyphs for all characters */ - - TT_Glyph *glyphs = NULL; - - - /* Options */ - - int dpi = 96; - int ptsize = 12; - int hinted = 1; - int smooth = 0; - int border = 0; - - - /* raster map management */ - - static void Init_Raster_Map( TT_Raster_Map* bit, int width, int height ) - { - bit->rows = height; - bit->width = ( width + 3 ) & -4; - bit->flow = TT_Flow_Down; - - if ( smooth ) - { - bit->cols = bit->width; - bit->size = bit->rows * bit->width; - } - else - { - bit->cols = ( bit->width + 7 ) / 8; /* convert to # of bytes */ - bit->size = bit->rows * bit->cols; /* number of bytes in buffer */ - } - - bit->bitmap = (void *) malloc( bit->size ); - if ( !bit->bitmap ) - Panic( "Not enough memory to allocate bitmap!\n" ); - } - - - static void Done_Raster_Map( TT_Raster_Map *bit ) - { - free( bit->bitmap ); - bit->bitmap = NULL; - } - - - static void Clear_Raster_Map( TT_Raster_Map* bit ) - { - memset( bit->bitmap, 0, bit->size ); - } - - - static void Blit_Or( TT_Raster_Map* dst, TT_Raster_Map* src, - int x_off, int y_off ) - { - int x, y; - int x1, x2, y1, y2; - char *s, *d; - - - /* clipping */ - - x1 = x_off < 0 ? -x_off : 0; - y1 = y_off < 0 ? -y_off : 0; - - x2 = (int)dst->cols - x_off; - if ( x2 > src->cols ) - x2 = src->cols; - - y2 = (int)dst->rows - y_off; - if ( y2 > src->rows ) - y2 = src->rows; - - if ( x1 >= x2 ) - return; - - /* do the real work now */ - - for ( y = y1; y < y2; ++y ) - { - s = ( (char*)src->bitmap ) + y * src->cols + x1; - d = ( (char*)dst->bitmap ) + ( y + y_off ) * dst->cols + x1 + x_off; - - for ( x = x1; x < x2; ++x ) - *d++ |= *s++; - } - } - - - static void Dump_Raster_Map( TT_Raster_Map* bit, FILE* file ) - { - /* kudos for this code snippet go to Norman Walsh */ - - char* bmap; - int i; - - - bmap = (char *)bit->bitmap; - - if ( smooth ) - { - fprintf( file, "P5\n%d %d\n4\n", pnm_width, pnm_height ); - for ( i = bit->size - 1; i >= 0; --i ) - bmap[i] = bmap[i] > 4 ? 0 : 4 - bmap[i]; - for ( i = pnm_height; i > 0; --i, bmap += bit->cols ) - fwrite( bmap, 1, pnm_width, file ); - } - else - { - fprintf( file, "P4\n%d %d\n", pnm_width, pnm_height ); - for ( i = pnm_height; i > 0; --i, bmap += bit->cols ) - fwrite( bmap, 1, (pnm_width+7) / 8, file ); - } - - fflush( file ); - } - - - /* glyph management */ - - static void Load_Glyphs( char* txt, int txtlen ) - { - unsigned short i, n, code, load_flags; - unsigned short num_glyphs = 0, no_cmap = 0; - unsigned short platform, encoding; - TT_Error error; - TT_CharMap char_map; - - - /* First, look for a Unicode charmap */ - - n = properties.num_CharMaps; - - for ( i = 0; i < n; i++ ) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - if ( (platform == 3 && encoding == 1 ) || - (platform == 0 && encoding == 0 ) ) - { - TT_Get_CharMap( face, i, &char_map ); - break; - } - } - - if ( i == n ) - { - TT_Face_Properties properties; - - - TT_Get_Face_Properties( face, &properties ); - - no_cmap = 1; - num_glyphs = properties.num_Glyphs; - } - - - /* Second, allocate the array */ - - glyphs = (TT_Glyph*)malloc( 256 * sizeof ( TT_Glyph ) ); - memset( glyphs, 0, 256 * sizeof ( TT_Glyph ) ); - - /* Finally, load the glyphs you need */ - - load_flags = TTLOAD_SCALE_GLYPH; - if ( hinted ) - load_flags |= TTLOAD_HINT_GLYPH; - - for ( i = 0; i < txtlen; ++i ) - { - unsigned char j = txt[i]; - - - if ( TT_VALID( glyphs[j] ) ) - continue; - - if ( no_cmap ) - { - code = (j - ' ' + 1) < 0 ? 0 : (j - ' ' + 1); - if ( code >= num_glyphs ) - code = 0; - } - else - code = TT_Char_Index( char_map, j ); - - (void)( - ( error = TT_New_Glyph( face, &glyphs[j] ) ) || - ( error = TT_Load_Glyph( instance, glyphs[j], code, load_flags ) ) - ); - - if ( error ) - Panic( "Cannot allocate and load glyph: error 0x%x.\n", error ); - } - } - - - static void Done_Glyphs( void ) - { - int i; - - - if ( !glyphs ) - return; - - for ( i = 0; i < 256; ++i ) - TT_Done_Glyph( glyphs[i] ); - - free( glyphs ); - - glyphs = NULL; - } - - - /* face & instance management */ - - static void Init_Face( const char* filename ) - { - TT_Error error; - - - /* load the typeface */ - - error = TT_Open_Face( engine, filename, &face ); - if ( error ) - { - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open %s.\n", filename ); - else - Panic( "Error while opening %s, error code = 0x%x.\n", - filename, error ); - } - - TT_Get_Face_Properties( face, &properties ); - - /* create and initialize instance */ - - (void) ( - ( error = TT_New_Instance( face, &instance ) ) || - ( error = TT_Set_Instance_Resolutions( instance, dpi, dpi ) ) || - ( error = TT_Set_Instance_PointSize( instance, ptsize ) ) - ); - - if ( error ) - Panic( "Could not create and initialize instance: error 0x%x.\n", - error ); - } - - - static void Done_Face( void ) - { - TT_Done_Instance( instance ); - TT_Close_Face( face ); - } - - - /* rasterization stuff */ - - static void Init_Raster_Areas( const char* txt, int txtlen ) - { - int i, upm, ascent, descent; - TT_Face_Properties properties; - TT_Instance_Metrics imetrics; - TT_Glyph_Metrics gmetrics; - - - /* allocate the large bitmap */ - - TT_Get_Face_Properties( face, &properties ); - TT_Get_Instance_Metrics( instance, &imetrics ); - - upm = properties.header->Units_Per_EM; - ascent = ( properties.horizontal->Ascender * imetrics.y_ppem ) / upm; - descent = ( properties.horizontal->Descender * imetrics.y_ppem ) / upm; - - pnm_width = 2 * border; - pnm_height = 2 * border + ascent - descent; - - for ( i = 0; i < txtlen; ++i ) - { - unsigned char j = txt[i]; - - - if ( !TT_VALID( glyphs[j] ) ) - continue; - - TT_Get_Glyph_Metrics( glyphs[j], &gmetrics ); - pnm_width += gmetrics.advance / 64; - } - - Init_Raster_Map( &bit, pnm_width, pnm_height ); - Clear_Raster_Map( &bit ); - - pnm_x_shift = border; - pnm_y_shift = border - descent; - - /* allocate the small bitmap if you need it */ - - if ( smooth ) - Init_Raster_Map( &small_bit, imetrics.x_ppem + 32, pnm_height ); - } - - - static void Done_Raster_Areas( void ) - { - Done_Raster_Map( &bit ); - if ( smooth ) - Done_Raster_Map( &small_bit ); - } - - - static void Render_Glyph( TT_Glyph glyph, - int x_off, int y_off, - TT_Glyph_Metrics* gmetrics ) - { - if ( !smooth ) - TT_Get_Glyph_Bitmap( glyph, &bit, x_off * 64L, y_off * 64L); - else - { - TT_F26Dot6 xmin, ymin, xmax, ymax; - - - /* grid-fit the bounding box */ - - xmin = gmetrics->bbox.xMin & -64; - ymin = gmetrics->bbox.yMin & -64; - xmax = (gmetrics->bbox.xMax + 63) & -64; - ymax = (gmetrics->bbox.yMax + 63) & -64; - - /* now render the glyph in the small pixmap */ - /* and blit-or the resulting small pixmap into the biggest one */ - - Clear_Raster_Map( &small_bit ); - TT_Get_Glyph_Pixmap( glyph, &small_bit, -xmin, -ymin ); - Blit_Or( &bit, &small_bit, xmin/64 + x_off, -ymin/64 - y_off ); - } - } - - - static void Render_All_Glyphs( char* txt, int txtlen ) - { - int i; - TT_F26Dot6 x, y, adjx; - TT_Glyph_Metrics gmetrics; - - - x = pnm_x_shift; - y = pnm_y_shift; - - for ( i = 0; i < txtlen; i++ ) - { - unsigned char j = txt[i]; - - if ( !TT_VALID( glyphs[j] ) ) - continue; - - TT_Get_Glyph_Metrics( glyphs[j], &gmetrics ); - - adjx = x; /* ??? lsb */ - Render_Glyph( glyphs[j], adjx, y, &gmetrics ); - - x += gmetrics.advance / 64; - } - } - - - static void usage( void ) - { - printf( "\n" ); - printf( "%s: simple text to image converter -- part of the FreeType project\n", PROGNAME ); - printf( "\n" ); - printf( "Usage: %s [options below] filename [string]\n", PROGNAME ); - printf( "\n" ); - printf( " -g gray-level rendering (default: off)\n" ); - printf( " -h hinting off (default: on)\n" ); - printf( " -r X resolution X dpi (default: 96)\n" ); - printf( " -p X pointsize X pt (default: 12)\n" ); - printf( " -b X border X pixels wide (default: 0)\n" ); - printf( "\n" ); - - exit( EXIT_FAILURE ); - } - - - int main( int argc, char** argv ) - { - int option, txtlen; - char *txt, *filename; - TT_Error error; - - - /* Parse options */ - - while ( 1 ) - { - option = ft_getopt( argc, argv, "ghr:p:b:" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'g': - smooth = 1; - break; - case 'h': - hinted = 0; - break; - case 'r': - dpi = atoi( ft_optarg ); - break; - case 'p': - ptsize = atoi( ft_optarg ); - break; - case 'b': - border = atoi( ft_optarg ); - break; - - default: - usage(); - break; - } - } - - argc -= ft_optind; - argv += ft_optind; - - if ( argc <= 0 || argc > 2 || dpi <= 0 || ptsize <= 0 || border < 0 ) - usage(); - - filename = argv[0]; - - if ( argc > 1 ) - txt = argv[1]; - else - txt = "The quick brown fox jumps over the lazy dog"; - - txtlen = strlen( txt ); - - /* Initialize engine and other stuff */ - - error = TT_Init_FreeType( &engine ); - if ( error ) - Panic( "Error while initializing engine, code = 0x%x.\n", error ); - - Init_Face( filename ); - Load_Glyphs( txt, txtlen ); - Init_Raster_Areas( txt, txtlen ); - - /* Do the real work now */ - - Render_All_Glyphs( txt, txtlen ); - Dump_Raster_Map( &bit, stdout ); - - /* Clean up */ - - Done_Raster_Areas(); - Done_Glyphs(); - Done_Face(); - - /* That's all, folks! */ - - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ -} - - -/* End */ Index: xc/extras/FreeType/test/ftstrtto.c diff -u xc/extras/FreeType/test/ftstrtto.c:1.1.1.1 xc/extras/FreeType/test/ftstrtto.c:removed --- xc/extras/FreeType/test/ftstrtto.c:1.1.1.1 Sat Feb 12 23:56:18 2000 +++ xc/extras/FreeType/test/ftstrtto.c Wed Mar 16 20:59:49 2005 @@ -1,1158 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftstrtto: Making string text from individual glyph information, using */ -/* TrueType Open features. */ -/* */ -/* Keys: */ -/* */ -/* + : fast scale up */ -/* - : fast scale down */ -/* u : fine scale down */ -/* j : fine scale up */ -/* */ -/* h : toggle hinting */ -/* K : toggle kerning */ -/* B : toggle sbit */ -/* G : toggle GSUB */ -/* */ -/* q : */ -/* ESC : exit */ -/* */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "arabic.h" -#include "blitter.h" -#include "common.h" /* for Panic() only */ -#include "display.h" - -#include "freetype.h" -#include "ftxkern.h" -#include "ftxopen.h" -#include "ftxsbit.h" - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -#define MAXPTSIZE 500 /* dtp */ -#define Center_X ( Bit.width / 2 ) /* dtp */ -#define Center_Y ( Bit.rows / 2 ) /* dtp */ - -#define FEATURE_init MAKE_TT_TAG( 'i', 'n', 'i', 't' ) -#define FEATURE_medi MAKE_TT_TAG( 'm', 'e', 'd', 'i' ) -#define FEATURE_fina MAKE_TT_TAG( 'f', 'i', 'n', 'a' ) -#define FEATURE_isol MAKE_TT_TAG( 'i', 's', 'o', 'l' ) - - - char Header[128]; - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_CharMap char_map; - TT_Kerning directory; - - TTO_GSUBHeader gsub_; - TTO_GSUBHeader* gsub; - TTO_GDEFHeader gdef_; - TTO_GDEFHeader* gdef; - - TT_Big_Glyph_Metrics metrics; - TT_Outline outline; - TT_Face_Properties face_properties; - TT_Instance_Metrics imetrics; - - TT_SBit_Image* sbit; - - int pt_size; - int ttc_index; - TT_Bool hinted; - TT_Bool gray_render; - TT_Bool r2l; - TT_Bool vertical; - - TT_Bool has_kern; - TT_Bool use_kern; - TT_Bool has_gdef; - TT_Bool has_gsub; - TT_Bool use_gsub; - TT_Bool has_sbit; - TT_Bool use_sbit; - TT_Bool glyph_has_sbit; - - TT_Bool default_language_system; - - int Fail; - - char* char_string; - - TT_UShort glyph_code_array[129]; - TT_UShort char_code[128]; - TT_UShort properties[128]; - - TT_UShort* glyph_code; - int num_glyphs; - - TT_ULong script_tag; - char* script_tag_string; - TT_UShort script_index; - - TT_ULong language_tag; - char* language_tag_string; - TT_UShort language_index; - TT_UShort req_feature_index = 0xFFFF; - - TT_ULong* feature_tags; - char** feature_tag_strings; - TT_UShort* feature_indices; - int num_features; - - - static void Select_CMap( void ) - { - TT_UShort i, n; - TT_UShort platform, encoding; - - - n = face_properties.num_CharMaps; - - for ( i = 0; i < n; i++ ) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - if ( platform == 3 && encoding == 1 ) - { - TT_Get_CharMap( face, i, &char_map ); - break; - } - } - - /* we try only pid/eid (0,0) if no (3,1) map is found -- many Windows - fonts have only rudimentary (0,0) support. */ - - if ( i == n ) - { - for ( i = 0; i < n; i++ ) - { - TT_Get_CharMap_ID( face, i, &platform, &encoding ); - if ( platform == 0 && encoding == 0 ) - { - TT_Get_CharMap( face, i, &char_map ); - break; - } - } - - if ( i == n ) - Panic( "Sorry, but this font doesn't contain" - " any Unicode mapping table\n" ); - } - } - - - /* Convert a Latin 1 string to a string of glyph indexes. */ - /* */ - /* IMPORTANT NOTE: */ - /* */ - /* There is no portable way to convert from any system's char. code */ - /* to Unicode. This function simply takes a char. string as argument */ - /* and `interprets' each character as a Unicode char. index with no */ - /* further check. */ - /* */ - /* We interpret the command line string as Unicode with the high byte */ - /* set to zero. This is equivalent to Latin-1. */ - - static void Latin1Char_To_Glyph( char* source ) - { - TT_UShort n; - - - glyph_code = glyph_code_array + 1; /* we want to make glyph_code[-1] */ - glyph_code[-1] = 0; /* possible. */ - - for ( n = 0; n < 128 && source[n]; n++ ) - { - char_code[n] = (TT_UShort)( (unsigned char)source[n] ); - glyph_code[n] = TT_Char_Index( char_map, char_code[n] ); - } - - num_glyphs = n; - } - - - static void UTF8Char_To_Glyph( char* source ) - { - TT_UShort in, out, in_code, out_code; - TT_UShort count, limit; - - - glyph_code = glyph_code_array + 1; /* we want to make glyph_code[-1] */ - glyph_code[-1] = 0; /* possible. */ - - for ( in = out = 0, count = limit = 1, in_code = out_code = 0; - in < 128 && source[in]; in++ ) - { - in_code = (TT_UShort)( (unsigned char)source[in] ); - - if ( in_code >= 0xC0 ) - { - limit = 1; - count = 1; - - if ( in_code < 0xE0 ) /* U+0080 - U+07FF */ - { - limit = 2; - out_code = in_code & 0x1F; - } - else if ( in_code < 0xF0 ) /* U+0800 - U+FFFF */ - { - limit = 3; - out_code = in_code & 0x0F; - } - continue; - } - else if ( in_code >= 0x80 ) - { - count++; - - if ( count <= limit ) - { - out_code <<= 6; - out_code += in_code & 0x3F; - } - if ( count != limit ) - continue; - } - else - out_code = in_code; - - char_code[out] = out_code; - glyph_code[out++] = TT_Char_Index( char_map, out_code ); - } - - num_glyphs = out; - } - - - static TT_Error Reset_Scale( int pointSize ) - { - TT_Error error; - - - error = TT_Set_Instance_CharSize( instance, pointSize * 64L ); - if ( error ) - { - RestoreScreen(); - Panic( "Could not reset instance, code = 0x%x.\n", error ); - } - - TT_Get_Instance_Metrics( instance, &imetrics ); - - /* now re-allocate the small bitmap */ - if ( gray_render ) - { - Init_Small( imetrics.x_ppem, imetrics.y_ppem ); - Clear_Small(); - } - - return TT_Err_Ok; - } - - - static TT_Error Load_TrueType_Char( TT_UShort idx, - int hint ) - { - int flags; - TT_Error error; - - - glyph_has_sbit = 0; - - error = TT_Load_Glyph_Bitmap( face, instance, idx, sbit ); - if ( error == TT_Err_Ok ) - { - has_sbit = 1; - glyph_has_sbit = 1; - } - - if ( glyph_has_sbit && use_sbit ) - return TT_Err_Ok; - - flags = TTLOAD_SCALE_GLYPH; - if ( hint ) - flags |= TTLOAD_HINT_GLYPH; - - return TT_Load_Glyph( instance, glyph, idx, flags ); - } - - - static TT_Error Get_Kern_Values( TT_UShort idx, - TT_Pos* x, - TT_Pos* y ) - { - TT_UShort i; - TT_Kern_Subtable table; - TT_Kern_0_Pair* pairs_0; - - TT_UShort min, max, new_min, new_max, middle; - TT_Long target_idx, current_idx; - - - *x = 0; - *y = 0; - - for ( i = 0; i < directory.nTables; i++ ) - { - table = directory.tables[i]; - - /* handle only horizontal kerning tables */ - - if ( table.coverage & 0x0001 ) - { - switch ( table.format ) - { - case 0: - pairs_0 = table.t.kern0.pairs; - target_idx = ( glyph_code[idx - 1] << 16 ) + glyph_code[idx]; - - /* binary search */ - - new_min = 0; - new_max = table.t.kern0.nPairs - 1; - - do - { - min = new_min; - max = new_max; - middle = max - ( ( max - min ) >> 1 ); - - current_idx = ( pairs_0[middle].left << 16 ) + - pairs_0[middle].right; - - if ( target_idx == current_idx ) - { - *x += pairs_0[middle].value; - break; - } - else if ( target_idx < current_idx ) - { - if ( middle == min ) - break; - new_max = middle - 1; - } - else - { - if ( middle == max ) - break; - new_min = middle + 1; - } - } while ( min < max ); - - break; - - /* we currently ignore format 2 kerning tables */ - - case 2: - break; - } - } - } - - /* scaling and rounding */ - - *x = ( ( ( *x * imetrics.x_scale ) / 0x10000 ) + 32 ) & -64; - *y = ( ( ( *y * imetrics.y_scale ) / 0x10000 ) + 32 ) & -64; - - return TT_Err_Ok; - } - - - /* for testing purposes, we always select the last available alternate - glyph, not using the `data' field. */ - - static TT_UShort alternate_function( TT_ULong pos, - TT_UShort glyphID, - TT_UShort num_alternates, - TT_UShort* alternates, - void* data ) - { - return num_alternates - 1; - } - - - static TT_Error Render_All( void ) - { - TT_Pos x, y, z, min_x, min_y, max_x, max_y; - TT_Pos kern_x, kern_y; - int i, n; - TT_UShort* gc; - TT_UShort glyph_property = 0; - - TT_Error error; - - TTO_GSUB_String in, out; - - - /* On the first pass, we compute the compound bounding box */ - - x = y = 0; - kern_x = kern_y = 0; - min_x = min_y = max_x = max_y = 0; - - in.length = num_glyphs; - in.pos = 0; - in.string = glyph_code; - in.properties = properties; - - out.pos = 0; - out.allocated = 0; - out.string = NULL; - out.properties = NULL; - - if ( has_gsub && use_gsub ) - { - error = TT_GSUB_Apply_String( gsub, &in, &out ); - if ( error && error != TTO_Err_Not_Covered ) - return error; - - n = out.length; - gc = out.string; - } - else - { - n = in.length; - gc = in.string; - } - - has_sbit = 0; - - for ( i = 0; i < n; i++ ) - { - error = Load_TrueType_Char( gc[i], hinted ); - if ( error == TT_Err_Ok ) - { - if ( glyph_has_sbit && use_sbit ) - metrics = sbit->metrics; - else - TT_Get_Glyph_Big_Metrics( glyph, &metrics ); - if ( has_kern && use_kern ) - Get_Kern_Values( i, &kern_x, &kern_y ); - - z = x + metrics.bbox.xMin + kern_x; - if ( min_x > z ) - min_x = z; - - z = x + metrics.bbox.xMax + kern_x; - if ( max_x < z ) - max_x = z; - - z = y + metrics.bbox.yMin + kern_y; - if ( min_y > z ) - min_y = z; - - z = y + metrics.bbox.yMax + kern_y; - if ( max_y < z ) - max_y = z; - - if ( has_gdef ) - { - error = TT_GDEF_Get_Glyph_Property( gdef, gc[i], &glyph_property ); - if ( error ) - return error; - } - - /* advance only if it is not a mark glyph */ - - if ( !( glyph_property & TTO_MARK ) ) - { - if ( vertical ) - y += ( metrics.vertAdvance & -64 ) + kern_y; - else - x += ( metrics.horiAdvance & -64 ) + kern_x; - } - } - else - Fail++; - } - - /* We now center the bbox inside the target bitmap */ - - min_x = ( min_x & -64 ) >> 6; - min_y = ( min_y & -64 ) >> 6; - - max_x = ( (max_x + 63) & -64 ) >> 6; - max_y = ( (max_y + 63) & -64 ) >> 6; - - max_x -= min_x; - max_y -= min_y; - - min_x = ( Bit.width - max_x ) / 2; - min_y = ( Bit.rows - max_y ) / 2; - - max_x += min_x; - max_y += min_y; - - /* On the second pass, we render each glyph to its centered position. */ - /* This is slow, because we reload each glyph to render it! */ - - x = vertical ? min_x : ( r2l ? max_x : min_x ); - y = vertical ? ( r2l ? min_y : max_y ) : min_y; - - for ( i = 0; i < n; i++ ) - { - error = Load_TrueType_Char( gc[i], hinted ); - if ( error == TT_Err_Ok ) - { - if ( glyph_has_sbit && use_sbit ) - metrics = sbit->metrics; - else - TT_Get_Glyph_Big_Metrics( glyph, &metrics ); - if ( has_kern && use_kern ) - Get_Kern_Values( i, &kern_x, &kern_y ); - - if ( has_gdef ) - (void)TT_GDEF_Get_Glyph_Property( gdef, gc[i], &glyph_property ); - - if ( !( glyph_property & TTO_MARK ) ) - { - if ( r2l ) - { - if ( vertical ) - y += metrics.vertAdvance / 64; - else - x -= metrics.horiAdvance / 64; - } - else - { - if ( vertical ) - y -= kern_y / 64; - else - x += kern_x / 64; - } - } - - /* We must specify the upper left corner of the bitmap, but the - lower left corner for the outline. Another complication is that - Blit_Bitmap() assumes that increasing y values means moving - downwards. - - For vertical layout, the origin of the horizontal and vertical - bearings of embedded bitmaps is the top, thus we shift the - outline glyphs down. */ - - if ( glyph_has_sbit && use_sbit ) - Blit_Bitmap( &Bit, - &sbit->map, - gray_render ? 8 : 1, - x + - ( vertical ? metrics.vertBearingX : - metrics.horiBearingX ) / 64, - Bit.rows - y - - ( vertical ? metrics.vertBearingY : - metrics.horiBearingY ) / 64, - gray_palette[4] ); - else - Render_Single_Glyph( - gray_render, - glyph, - x, - y - - ( vertical ? metrics.vertBearingY + metrics.bbox.yMax : - 0 ) / 64 ); - - if ( !( glyph_property & TTO_MARK ) ) - { - if ( r2l ) - { - if ( vertical ) - y += kern_y / 64; - else - x -= kern_x / 64; - } - else - { - if ( vertical ) - y -= metrics.vertAdvance / 64; - else - x += metrics.horiAdvance / 64; - } - } - } - } - - if ( out.string ) - free( out.string ); - if ( out.properties ) - free( out.properties ); - - return TT_Err_Ok; - } - - - static int Process_Event( TEvent* event ) - { - switch ( event->what ) - { - case event_Quit: /* ESC or q */ - return 0; - - case event_Keyboard: - if ( event->info == 'h' ) /* Toggle hinting */ - hinted = !hinted; - else if ( event->info == 'K' ) /* Toggle kerning */ - use_kern = !use_kern; - else if ( event->info == 'B' ) /* Toggle sbit */ - use_sbit = !use_sbit; - else if ( event->info == 'G' ) /* Toggle gsub */ - use_gsub = !use_gsub; - break; - - case event_Rotate_Glyph: - break; - - case event_Scale_Glyph: - pt_size += event->info; - if ( pt_size < 1 ) pt_size = 1; - if ( pt_size > MAXPTSIZE ) pt_size = MAXPTSIZE; - break; - - case event_Change_Glyph: - break; - } - - return 1; - } - - - static void Usage( char* execname ) - { - fprintf( stderr, - "\n" - "ftstrtto: TrueType Open String Test Display -- part of the FreeType project\n" - "---------------------------------------------------------------------------\n" - "\n" - "Usage: %s [options below] ppem fontname[.ttf|.ttc] [string|-]\n" - "\n" - " -c C use font with index C in TrueType collection (default: 0)\n" - " -f F use feature F (can be specified more than once)\n" - " -g gray-level rendering\n" - " -l L use language L\n" - " -r R use resolution R dpi (default: 96)\n" - " -s S use script S\n" - " -u interpret input data as UTF8-encoded\n" - " -v display string vertically\n" - " -x display string from right to left\n" - "\n" - " F, L, and S must be specified as 4-character tags.\n" - " Specifying only F and S selects default language system of S.\n" - " Specifying only L and S selects the req. feature of L only (if any).\n" - "\n" - " If `-' is specified as input string, stdin is read instead.\n" - "\n", execname ); - - exit( EXIT_FAILURE ); - } - - - static TT_ULong Make_Tag( char* tag_string ) - { - char t1 = ' ', t2 = ' ', t3 = ' ', t4 = ' '; - - - if ( !tag_string ) - return 0; - - t1 = tag_string[0]; - if ( tag_string[1] ) - t2 = tag_string[1]; - if ( tag_string[2] ) - t3 = tag_string[2]; - if ( tag_string[3] ) - t4 = tag_string[3]; - - return MAKE_TT_TAG( t1, t2, t3, t4 ); - } - - - int main( int argc, - char** argv ) - { - int i, old_pt_size, orig_pt_size, file; - - int graphics_initialized = 0; - - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - - int option; - int res = 96; - int utf8 = 0; - - TT_Error error; - TEvent event; - - - execname = argv[0]; - - while ( 1 ) - { - option = ft_getopt( argc, argv, "c:f:gl:r:s:uvx" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'c': - ttc_index = atoi( ft_optarg ); - if ( ttc_index < 0 ) - Usage( execname ); - break; - - case 'f': - num_features++; - feature_tag_strings = (char**) - realloc( feature_tag_strings, - num_features * sizeof ( char* ) ); - feature_tags = (TT_ULong*) - realloc( feature_tags, - num_features * sizeof ( TT_ULong ) ); - feature_tag_strings[num_features - 1] = ft_optarg; - if ( !(feature_tags[num_features - 1] = Make_Tag( ft_optarg ) ) ) - Usage( execname ); - break; - - case 'g': - gray_render = 1; - break; - - case 'l': - language_tag_string = ft_optarg; - if ( !(language_tag = Make_Tag( ft_optarg ) ) ) - Usage( execname ); - break; - - case 'r': - res = atoi( ft_optarg ); - if ( res < 1 ) - Usage( execname ); - break; - - case 's': - script_tag_string = ft_optarg; - if ( !(script_tag = Make_Tag( ft_optarg ) ) ) - Usage( execname ); - break; - - case 'u': - utf8 = 1; - break; - - case 'v': - vertical = 1; - break; - - case 'x': - r2l = 1; - break; - - default: - Usage( execname ); - break; - } - } - - argc -= ft_optind; - argv += ft_optind; - - if ( argc <= 1 ) - Usage( execname ); - - if ( sscanf( argv[0], "%d", &orig_pt_size ) != 1 ) - orig_pt_size = 64; - - file = 1; - - /* Initialize engine */ - - error = TT_Init_FreeType( &engine ); - if ( error ) - Panic( "Error while initializing engine, code = 0x%x.\n", error ); - - error = TT_Init_Kerning_Extension( engine ); - if ( error ) - Panic( "Error while initializing kerning extension, code = 0x%x.\n", - error ); - - error = TT_Init_SBit_Extension( engine ); - if ( error ) - Panic( "Error while initializing sbit extension, code = 0x%x.\n", - error ); - - error = TT_Init_GDEF_Extension( engine ); - if ( error ) - Panic( "Error while initializing GDEF extension, code = 0x%x.\n", - error ); - - error = TT_Init_GSUB_Extension( engine ); - if ( error ) - Panic( "Error while initializing GSUB extension, code = 0x%x.\n", - error ); - - pt_size = orig_pt_size; - hinted = 1; - use_gsub = 1; - use_kern = 1; - use_sbit = 1; - - i = strlen( argv[file] ); - while ( i > 0 && argv[file][i] != '\\' && argv[file][i] != '/' ) - { - if ( argv[file][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[file], 128 ); - strncpy( alt_filename, argv[file], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open `%s'.\n", filename ); - else if ( error ) - Panic( "Error while opening `%s', code = 0x%x.\n", - filename, error ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &face_properties ); - - /* open font in collection */ - - if ( ttc_index >= face_properties.num_Faces ) - Panic( "There is no collection with index %d in this font file.\n", - ttc_index ); - - TT_Close_Face( face ); - - error = TT_Open_Collection( engine, filename, ttc_index, &face ); - if ( error ) - Panic( "Error while opening collection %d in `%s', code = 0x%x.\n", - ttc_index, filename, error ); - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - Panic( "Could not create glyph container, code = 0x%x.\n", error ); - - /* create sbit slot */ - - error = TT_New_SBit_Image( &sbit ); - if ( error ) - Panic( "Could not create sbit slot, code = 0x%x.\n" , error); - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - Panic( "Could not create instance for `%s', code = 0x%x.\n", - filename, error ); - - error = TT_Set_Instance_Resolutions( instance, res, res ); - if ( error ) - Panic( "Could not set device resolutions, code = 0x%x.\n", error ); - - error = TT_Get_Kerning_Directory( face, &directory ); - if ( error ) - Panic( "Could not get kerning directory, code = 0x%x.\n", error ); - - /* load all kerning tables */ - - for ( i = 0; i < directory.nTables; i++ ) - { - error = TT_Load_Kerning_Table( face, i ); - if ( error ) - Panic( "Could not load kerning table, code = 0x%x.\n", error ); - } - - if ( directory.nTables ) - has_kern = 1; - - Select_CMap(); - - /* GDEF support */ - - gdef = &gdef_; - - error = TT_Load_GDEF_Table( face, gdef ); - if ( !error ) - has_gdef = 1; - else if ( error != TT_Err_Table_Missing ) - Panic( "Error while loading GDEF table, code = 0x%x.\n", error ); - - /* we must assign glyph properties in case no GDEF table is available */ - - if ( !has_gdef ) - { - Build_Arabic_Glyph_Properties( char_map, face_properties.num_Glyphs, - &gdef ); - if ( gdef ) - has_gdef = 1; - } - - /* GSUB support */ - - gsub = &gsub_; - - error = TT_Load_GSUB_Table( face, gsub, gdef ); - if ( !error ) - { - if ( script_tag && feature_tags ) - has_gsub = 1; - if ( script_tag && language_tag ) - has_gsub = 1; - } - else if ( error != TT_Err_Table_Missing ) - Panic( "Error while loading GSUB table, code = 0x%x.\n", error ); - - TT_GSUB_Clear_Features( gsub ); - - if ( has_gsub && !language_tag ) - default_language_system = 1; - - feature_indices = (TT_UShort*) - malloc( num_features * sizeof ( TT_UShort ) ); - - if ( has_gsub ) - { - error = TT_GSUB_Select_Script( gsub, - script_tag, - &script_index ); - if ( error ) - Panic( "Requested script `%-4.4s' not found.\n", - script_tag_string ); - - if ( default_language_system ) - { - for ( i = 0; i < num_features; i++ ) - { - error = TT_GSUB_Select_Feature( gsub, - feature_tags[i], - script_index, 0xFFFF, - &feature_indices[i] ); - if ( error ) - Panic( "Requested feature `%-4.4s'\n" - "for default language system of script `%-4.4s' not found.\n", - feature_tag_strings[i], script_tag_string ); - } - } - else - { - error = TT_GSUB_Select_Language( gsub, - language_tag, - script_index, - &language_index, - &req_feature_index ); - if ( error ) - Panic( "Requested language `%-4.4s'\n" - "for script `%-4.4s' not found.\n", - language_tag_string, script_tag_string ); - - for ( i = 0; i < num_features; i++ ) - { - error = TT_GSUB_Select_Feature( gsub, - feature_tags[i], - script_index, language_index, - &feature_indices[i] ); - if ( error ) - Panic( "Requested feature `%-4.4s'\n" - "for script `%-4.4s', language `%-4.4s' not found.\n", - feature_tag_strings[i], script_tag_string, - language_tag_string ); - } - } - - if ( req_feature_index != 0xFFFF ) - TT_GSUB_Add_Feature( gsub, req_feature_index, ALL_GLYPHS ); - else if ( !num_features ) - has_gsub = 0; - - for ( i = 0; i < num_features; i++ ) - { - if ( feature_tags[i] == FEATURE_init ) - TT_GSUB_Add_Feature( gsub, feature_indices[i], initial ); - else if ( feature_tags[i] == FEATURE_medi ) - TT_GSUB_Add_Feature( gsub, feature_indices[i], medial ); - else if ( feature_tags[i] == FEATURE_fina ) - TT_GSUB_Add_Feature( gsub, feature_indices[i], final ); - else if ( feature_tags[i] == FEATURE_isol ) - TT_GSUB_Add_Feature( gsub, feature_indices[i], isolated ); - else - TT_GSUB_Add_Feature( gsub, feature_indices[i], ALL_GLYPHS ); - } - - TT_GSUB_Register_Alternate_Function( gsub, alternate_function, NULL ); - } - - - if ( !graphics_initialized ) - { - graphics_initialized = 1; - - if ( gray_render ) - { - if ( !SetGraphScreen( Graphics_Mode_Gray ) ) - Panic( "Could not set up grayscale graphics mode.\n" ); - - TT_Set_Raster_Gray_Palette( engine, virtual_palette ); - } - else - { - if ( !SetGraphScreen( Graphics_Mode_Mono ) ) - Panic( "Could not set up mono graphics mode.\n" ); - } - } - - Init_Display( gray_render ); - - Reset_Scale( pt_size ); - - old_pt_size = pt_size; - - Fail = 0; - - /* get string to display, if any */ - - if ( argv[2] ) - { - if ( argv[2][0] == '-' ) - { - int ch; - char* p; - - - char_string = (char*)malloc( 128 * sizeof ( char ) ); - p = char_string; - - for ( i = 0; i < 128; i++ ) - { - ch = getchar(); - if ( ch == '\n' || ch == EOF ) - { - *p = '\0'; - break; - } - - *p++ = (char)ch; - } - - *p = '\0'; - } - else - char_string = argv[2]; - } - else - char_string = "The quick brown fox jumps over the lazy dog"; - - if ( utf8 ) - UTF8Char_To_Glyph( char_string ); - else - Latin1Char_To_Glyph( char_string ); - - /* we assign Arabic script features (e.g. `initial' or `final') */ - - Assign_Arabic_Properties( char_code, properties, num_glyphs ); - - for ( ;; ) - { - int key; - - - Clear_Display(); - - error = Render_All(); - if ( error ) - Panic( "Error while rendering string, code = 0x%x.\n", error ); - - if ( gray_render ) - Convert_To_Display_Palette(); - - sprintf( Header, - "%s: ptsize: %d hinting: %s%s%s%s%s%s%s", - ft_basename( filename ), - pt_size, - hinted ? "on" : "off", - has_kern ? " kerning: " : "", - has_kern ? ( use_kern ? "on" : "off" ) : "", - has_sbit ? " sbit: " : "", - has_sbit ? ( use_sbit ? "on" : "off" ) : "", - has_gsub ? " GSUB: " : "", - has_gsub ? ( use_gsub ? "on" : "off" ) : "" ); - - Display_Bitmap_On_Screen( Bit.bitmap, Bit.rows, Bit.cols ); - -#ifndef X11 -#ifndef OS2 - Print_XY( 0, 0, Header ); -#endif -#endif - - Get_Event( &event ); - if ( !( key = Process_Event( &event ) ) ) - goto Fin; - - if ( pt_size != old_pt_size ) - { - if ( Reset_Scale( pt_size ) ) - Panic( "Could not resize font.\n" ); - - old_pt_size = pt_size; - } - } - - Fin: - RestoreScreen(); - - TT_Done_FreeType( engine ); - - printf( "Execution completed successfully.\n" ); - printf( "Fails = %d.\n", Fail ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ -} - - -/* End */ Index: xc/extras/FreeType/test/fttimer.c diff -u xc/extras/FreeType/test/fttimer.c:1.1.1.3 xc/extras/FreeType/test/fttimer.c:removed --- xc/extras/FreeType/test/fttimer.c:1.1.1.3 Sat Feb 12 23:56:18 2000 +++ xc/extras/FreeType/test/fttimer.c Wed Mar 16 20:59:49 2005 @@ -1,455 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project - a Free and Portable Quality TrueType Renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* fttimer: A simple performance benchmark. Now with graylevel rendering */ -/* with the '-g' option. */ -/* */ -/* Be aware that the timer program benchmarks different things */ -/* in each release of the FreeType library. Thus, performance */ -/* should only be compared between similar release numbers. */ -/* */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. In no way does it shows the final */ -/* high-level interface that client applications will use. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "common.h" /* for Panic() */ -#include "freetype.h" - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - -#ifndef __USE_MISC -#define __USE_MISC /* MkLinux needs this to get a definition of - CLOCKS_PER_SEC */ -#endif - -#include /* for clock() */ - -/* SunOS 4.1.* does not define CLOCKS_PER_SEC, so include */ -/* to get the HZ macro which is the equivalent. */ -#if defined(__sun__) && !defined(SVR4) && !defined(__SVR4) -#include -#define CLOCKS_PER_SEC HZ -#endif - -#define MAX_GLYPHS 512 /* Maximum number of glyphs rendered at one time */ - - char Header[128]; - - TT_Error error; - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - - TT_Outline outline; - TT_Glyph_Metrics metrics; - - TT_Face_Properties properties; - - TT_F26Dot6* cur_x; - TT_F26Dot6* cur_y; - - unsigned short* cur_endContour; - unsigned char* cur_touch; - - TT_Outline outlines[MAX_GLYPHS]; - - int num_glyphs; - int tab_glyphs; - int cur_glyph; - int cur_point; - unsigned short cur_contour; - - TT_Raster_Map Bit; - - int Fail; - int Num; - - short visual; /* display glyphs while rendering */ - short gray_render; /* smooth fonts with gray levels */ - - - static void Clear_Buffer( void ); - - -/*******************************************************************/ -/* */ -/* Get_Time: */ -/* */ -/* Returns the current time in milliseconds. */ -/* */ -/*******************************************************************/ - - long Get_Time( void ) - { - return clock() * 1000 / CLOCKS_PER_SEC; - } - - -/*******************************************************************/ -/* */ -/* Init_Engine: */ -/* */ -/* Allocates bitmap, render pool and other structs... */ -/* */ -/*******************************************************************/ - - void Init_Engine( void ) - { - Bit.rows = vio_Height; /* The whole window */ - Bit.width = vio_Width; - - if ( gray_render ) - { - Bit.cols = Bit.width; - Bit.flow = TT_Flow_Up; - Bit.size = Bit.rows * Bit.width; - } - else - { - Bit.cols = (Bit.width + 7) / 8; /* convert to # of bytes */ - Bit.flow = TT_Flow_Up; - Bit.size = Bit.rows * Bit.cols; /* number of bytes in buffer */ - } - - Bit.bitmap = (void*)malloc( Bit.size ); - if ( !Bit.bitmap ) - Panic( "ERROR: not enough memory to allocate bitmap!\n" ); - - Clear_Buffer(); - } - - -/*******************************************************************/ -/* */ -/* Clear_Buffer: */ -/* */ -/* Clears current bitmap. */ -/* */ -/*******************************************************************/ - - static void Clear_Buffer( void ) - { - if ( gray_render ) - memset( Bit.bitmap, gray_palette[0], Bit.size ); - else - memset( Bit.bitmap, 0, Bit.size ); - } - - -/*******************************************************************/ -/* */ -/* LoadTrueTypeChar: */ -/* */ -/* Loads a glyph into memory. */ -/* */ -/*******************************************************************/ - - TT_Error LoadTrueTypeChar( int idx ) - { - error = TT_Load_Glyph( instance, glyph, idx, TTLOAD_DEFAULT ); - if ( error ) - return error; - - TT_Get_Glyph_Outline( glyph, &outline ); - - outline.second_pass = 0; - outline.high_precision = 0; - outline.dropout_mode = 0; - - /* debugging */ -#if 0 - if ( idx == 0 && !visual ) - { - printf( "points = %d\n", outline.points ); - for ( j = 0; j < outline.points; j++ ) - printf( "%02x (%01hx,%01hx)\n", - j, outline.xCoord[j], outline.yCoord[j] ); - printf( "\n" ); - } -#endif - - /* create a new outline */ - TT_New_Outline( outline.n_points, - outline.n_contours, - &outlines[cur_glyph] ); - - /* copy the glyph outline into it */ - outline.high_precision = 0; - outline.second_pass = 0; - TT_Copy_Outline( &outline, &outlines[cur_glyph] ); - - /* translate it */ - TT_Translate_Outline( &outlines[cur_glyph], - vio_Width * 16, - vio_Height * 16 ); - cur_glyph++; - - return TT_Err_Ok; - } - - -/*******************************************************************/ -/* */ -/* ConvertRaster: */ -/* */ -/* Performs scan conversion. */ -/* */ -/*******************************************************************/ - - TT_Error ConvertRaster( int index ) - { - outlines[index].second_pass = 0; - outlines[index].high_precision = 0; - - if ( gray_render ) - return TT_Get_Outline_Pixmap( engine, &outlines[index], &Bit ); - else - return TT_Get_Outline_Bitmap( engine, &outlines[index], &Bit ); - } - - - int main( int argc, char** argv ) - { - int i, total, mode, base, rendered_glyphs; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - - long t, t0, tz0; - - - execname = argv[0]; - - gray_render = 0; - visual = 0; - - while ( argc > 1 && argv[1][0] == '-' ) - { - switch ( argv[1][1] ) - { - case 'g': - gray_render = 1; - break; - - case 'v': - visual = 1; - break; - - default: - Panic( "Unknown argument '%s'!\n", argv[1] ); - } - argc--; - argv++; - } - - if ( argc != 2 ) - { - fprintf( stderr, "fttimer: simple performance timer -- part of the FreeType project\n" ); - fprintf( stderr,"-----------------------------------------------------------------\n\n" ); - fprintf( stderr,"Usage: %s [-g] [-v] fontname[.ttf|.ttc]\n\n", execname ); - fprintf( stderr," where '-g' asks for gray-levels rendering\n" ); - fprintf( stderr," '-v' displays while rendering (slower)\n" ); - - exit( EXIT_FAILURE ); - } - - i = strlen( argv[1] ); - while ( i > 0 && argv[1][i] != '\\' ) - { - if ( argv[1][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[1], 128 ); - strncpy( alt_filename, argv[1], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Initialize engine */ - - if ( (error = TT_Init_FreeType( &engine )) ) - Panic( "Error while initializing engine, code = 0x%x.\n", error ); - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open %s.\n", filename ); - else if ( error ) - Panic( "Error while opening %s, error code = 0x%x.\n", - filename, error ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &properties ); - - num_glyphs = properties.num_Glyphs; - - tab_glyphs = MAX_GLYPHS; - if ( tab_glyphs > num_glyphs ) - tab_glyphs = num_glyphs; - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - Panic( "Could not create glyph container.\n" ); - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - Panic( "Could not create instance for %s.\n", filename ); - - error = TT_Set_Instance_CharSize( instance, 400*64 ); - if ( error ) - Panic( "Could not reset instance for %s.\n", filename ); - - if ( gray_render ) - mode = Graphics_Mode_Gray; - else - mode = Graphics_Mode_Mono; - - if ( visual ) - { - if ( !SetGraphScreen( mode ) ) - Panic( "Could not set graphics mode.\n" ); - TT_Set_Raster_Gray_Palette( engine, gray_palette ); - } - else - { - /* This is the default bitmap size used */ - vio_Width = 640; - vio_Height = 450; - } - - Init_Engine(); - - Num = 0; - Fail = 0; - - total = num_glyphs; - base = 0; - - rendered_glyphs = 0; - - t0 = 0; /* Initial time */ - - tz0 = Get_Time(); - - while ( total > 0 ) - { - /* First, preload 'tab_glyphs' in memory */ - - cur_glyph = 0; - cur_point = 0; - cur_contour = 0; - - printf( "loading %d glyphs", tab_glyphs ); - - for ( Num = 0; Num < tab_glyphs; Num++ ) - { - error = LoadTrueTypeChar( base + Num ); - if ( error ) - Fail++; - - total--; - } - - base += tab_glyphs; - - if ( tab_glyphs > total ) - tab_glyphs = total; - - printf( ", rendering... " ); - - /* Now, render the loaded glyphs */ - - t = Get_Time(); - - for ( Num = 0; Num < cur_glyph; Num++ ) - { - if ( (error = ConvertRaster( Num )) ) - Fail++; - else - { - rendered_glyphs ++; - - if ( visual ) - { - sprintf( Header, "Glyph: %5d", Num ); - Display_Bitmap_On_Screen( Bit.bitmap, Bit.rows, Bit.cols ); - - Clear_Buffer(); - } - } - } - - t = Get_Time() - t; - if ( t < 0 ) - t += 100L * 60 * 60; - - printf( " = %f s\n", (double)t / 1000 ); - t0 += t; - - /* Now free all loaded outlines */ - for ( Num = 0; Num < cur_glyph; Num++ ) - TT_Done_Outline( &outlines[Num] ); - } - - tz0 = Get_Time() - tz0; - - if ( visual ) - RestoreScreen(); - - TT_Close_Face( face ); - - printf( "\n" ); - printf( "rendered glyphs = %d\n", rendered_glyphs ); - printf( "render time = %f s\n", (double)t0 / 1000 ); - printf( "fails = %d\n", Fail ); - printf( "average glyphs/s = %f\n", - (double)rendered_glyphs / t0 * 1000 ); - - printf( "total timing = %f s\n", (double)tz0 / 1000 ); - printf( "Fails = %d\n", Fail ); - - TT_Done_FreeType( engine ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/ftview.c diff -u xc/extras/FreeType/test/ftview.c:1.1.1.3 xc/extras/FreeType/test/ftview.c:removed --- xc/extras/FreeType/test/ftview.c:1.1.1.3 Sat Feb 12 23:56:19 2000 +++ xc/extras/FreeType/test/ftview.c Wed Mar 16 20:59:49 2005 @@ -1,540 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project -- a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftview: A simple font viewer. Now supports hinting and grayscaling */ -/* with the '-g' option. */ -/* */ -/* */ -/* Keys: */ -/* */ -/* x : fine counter-clockwise rotation */ -/* c : fine clockwise rotation */ -/* */ -/* v : fast counter-clockwise rotation */ -/* b : fast clockwise rotation */ -/* */ -/* + : fast scale up */ -/* - : fast scale down */ -/* u : fine scale down */ -/* j : fine scale up */ -/* */ -/* l : go to next glyph */ -/* k : go to previous glyph */ -/* */ -/* o : go to tenth next glyph */ -/* i : go to tenth previous glyph */ -/* */ -/* 0 : go to hundredth next glyph */ -/* 9 : go to hundredth previous glyph */ -/* */ -/* ) : go to 1000th next glyph */ -/* ( : go to 1000th previous glyph */ -/* */ -/* } : go to 10000th next glyph */ -/* { : go to 10000th previous glyph */ -/* */ -/* n : go to next (or last) .ttf file */ -/* p : go to previous (or first) .ttf file */ -/* */ -/* h : toggle hinting */ -/* */ -/* B : toggle sbit */ -/* */ -/* ESC : exit */ -/* */ -/* */ -/* NOTE: This is just a test program that is used to show off and */ -/* debug the current engine. */ -/* */ -/****************************************************************************/ - -#include -#include -#include - -#include "blitter.h" -#include "common.h" /* for Panic() only */ -#include "display.h" -#include "freetype.h" -#include "ftxsbit.h" - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - -#define Pi 3.1415926535 - -#define MAXPTSIZE 500 /* dtp */ -#define Center_X ( Bit.width / 2 ) /* dtp */ -#define Center_Y ( Bit.rows / 2 ) /* dtp */ - -/* - * If Ignore_Err_Not_SBit is not defined, - * "Fail" increase when the glyph does not have sbit and - * sbit_flag is 1. - */ -#define Ignore_Err_Not_SBit 1 - - char Header[128]; - - TT_Engine engine; - - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_CharMap char_map; - - TT_Big_Glyph_Metrics metrics; - TT_Outline outline; - TT_Face_Properties properties; - TT_Instance_Metrics imetrics; - - TT_SBit_Image* sbit; - - int num_glyphs; - - int ptsize; - int hinted; - - int Rotation; - int Fail; - int Num; - unsigned char autorun; - - int gray_render; - unsigned int sbit_flag; /* 0 if to display outlines - * 1 if to use embedded bitmaps - * 2 if to show sbit and outline glyphs - */ - - int glyph_has_sbit; - - - - static TT_Error Reset_Scale( int pointSize ) - { - TT_Error error; - TT_SBit_Strike strike; - - if ( (error = TT_Set_Instance_PointSize( instance, pointSize )) ) - { - RestoreScreen(); - fprintf( stderr, "Error = 0x%x.\n", (int)error ); - Panic( "Could not reset instance.\n" ); - } - TT_Get_Instance_Metrics( instance, &imetrics ); - - /* now re-allocates the small bitmap */ - if ( gray_render ) - { - Init_Small( imetrics.x_ppem, imetrics.y_ppem ); - Clear_Small(); - } - - if ( TT_Get_SBit_Strike( face, instance, &strike ) ) - glyph_has_sbit = 0; - else - glyph_has_sbit = 1; - - return TT_Err_Ok; - } - - - static TT_Error LoadTrueTypeChar( int idx, - int hint ) - { - int flags; - - - flags = TTLOAD_SCALE_GLYPH; - if ( hint ) - flags |= TTLOAD_HINT_GLYPH; - - return TT_Load_Glyph( instance, glyph, idx, flags ); - } - - - static TT_Error Render_All( int first_glyph, - int ptsize ) - { - TT_F26Dot6 start_x, start_y, step_x, step_y, x, y; - int i; - - TT_Error error = 0; - - - start_x = 4; - start_y = vio_Height - ( ( ptsize * 96 + 36 ) / 72 + 10 ); - - step_x = imetrics.x_ppem + 4; - step_y = imetrics.y_ppem + 10; - - x = start_x; - y = start_y; - - i = first_glyph; - - while ( i < num_glyphs ) - { - if ( ( glyph_has_sbit ) && - ( ( sbit_flag + 1 ) & 2 ) && - !(error = TT_Load_Glyph_Bitmap( face, instance, i, sbit )) ) - { - Blit_Bitmap( &Bit, - &sbit->map, - gray_render ? 8 : 1, - x + (sbit->metrics.horiBearingX/64), - Bit.rows - y - (sbit->metrics.horiBearingY/64), - gray_palette[4] ); - metrics = sbit->metrics; - goto Step; - } - - if ( ( ( !glyph_has_sbit ) || - ( ( sbit_flag + 1 ) & 1 ) ) && - !(error = LoadTrueTypeChar( i, hinted )) ) - { - TT_Get_Glyph_Outline( glyph, &outline ); - TT_Get_Glyph_Big_Metrics( glyph, &metrics ); - - Render_Single_Glyph( gray_render, glyph, x, y ); - } - else - { -#ifdef Ignore_Err_Not_SBit - if (!(( glyph_has_sbit ) && - ( sbit_flag == 1 ) && - ( error == TT_Err_Invalid_Glyph_Index ))) -#endif - Fail++; - } - Step: - x += ( metrics.horiAdvance / 64 ) + 1; - - if ( x + imetrics.x_ppem > vio_Width ) - { - x = start_x; - y -= step_y; - - if ( y < 10 ) - return TT_Err_Ok; - } - i++; - } - return TT_Err_Ok; - } - - - static int Process_Event( TEvent* event ) - { - switch ( event->what ) - { - case event_Quit: /* ESC or q */ - return 0; - - case event_Keyboard: - if ( event->info == 'n' ) /* Next file */ - return 'n'; - if ( event->info == 'p' ) /* Previous file */ - return 'p'; - if ( event->info == 'h' ) /* Toggle hinting */ - hinted = !hinted; - if ( ( event->info == 'B' ) && ( glyph_has_sbit ) ) /* Toggle sbit */ - sbit_flag = ( sbit_flag + 1 ) % 3; - break; - - case event_Rotate_Glyph: - Rotation = ( Rotation + event->info ) & 1023; - break; - - case event_Scale_Glyph: - ptsize += event->info; - if ( ptsize < 1 ) ptsize = 1; - if ( ptsize > MAXPTSIZE ) ptsize = MAXPTSIZE; - break; - - case event_Change_Glyph: - Num += event->info; - if ( Num < 0 ) Num = 0; - if ( Num >= num_glyphs ) Num = num_glyphs - 1; - break; - } - - return 1; - } - - - static void usage( char* execname ) - { - fprintf( stderr, "\n" ); - fprintf( stderr, "ftview: simple TrueType interpreter tester -- part of the FreeType project\n" ); - fprintf( stderr, "--------------------------------------------------------------------------\n" ); - fprintf( stderr, "\n" ); - fprintf( stderr, "Usage: %s [options below] ppem fontname[.ttf|.ttc] ...\n", - execname ); - fprintf( stderr, "\n" ); - fprintf( stderr, " -g gray-level rendering (default: none)\n" ); - fprintf( stderr, " -r R use resolution R dpi (default: 96)\n" ); - fprintf( stderr, " -B use embedded bitmaps (default: none)\n" ); - fprintf( stderr, "\n" ); - - exit( EXIT_FAILURE ); - } - - - int main( int argc, - char** argv ) - { - int i, old_ptsize, orig_ptsize, file; - int XisSetup = 0; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - int option; - int res = 96; - - TT_Error error; - TEvent event; - - TT_EBLC eblc_table; - - - execname = ft_basename( argv[0] ); - - while ( 1 ) - { - option = ft_getopt( argc, argv, "gr:B" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'g': - gray_render = 1; - sbit_flag = 0; - break; - - case 'r': - res = atoi( ft_optarg ); - if ( res < 1 ) - usage( execname ); - break; - - case 'B': - if (!gray_render) -#if 0 - sbit_flag = 1; -#else - sbit_flag = 2; -#endif - break; - - default: - usage( execname ); - break; - } - } - - argc -= ft_optind; - argv += ft_optind; - - if ( argc <= 1 ) - usage( execname ); - - if ( sscanf( argv[0], "%d", &orig_ptsize ) != 1 ) - orig_ptsize = 64; - - file = 1; - - /* Initialize engine */ - - if ( (error = TT_Init_FreeType( &engine )) ) - Panic( "Error while initializing engine, code = 0x%x.\n", error ); - - if ( (error = TT_Init_SBit_Extension( engine )) ) - Panic( "Error while initializing sbit extention, code = 0x%x.\n", error ); - - NewFile: - ptsize = orig_ptsize; - hinted = 1; - - i = strlen( argv[file] ); - while ( i > 0 && argv[file][i] != '\\' && argv[file][i] != '/' ) - { - if ( argv[file][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[file], 128 ); - strncpy( alt_filename, argv[file], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open %s.\n", filename ); - else if ( error ) - Panic( "Error while opening %s, code = 0x%x.\n", filename, error ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &properties ); - - num_glyphs = properties.num_Glyphs; - - glyph_has_sbit = 0; - - error = TT_Get_Face_Bitmaps( face, &eblc_table ); - if ( error == TT_Err_Ok ) - glyph_has_sbit = 1; - if ( sbit_flag && !glyph_has_sbit ) - Panic( "%s does not have embedded bitmap glyphs.\n", filename ); - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - Panic( "Could not create glyph container.\n" ); - - error = TT_New_SBit_Image( &sbit ); - if ( error ) - Panic( "Could not create sbit slot.\n" ); - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - Panic( "Could not create instance for %s.\n", filename ); - - error = TT_Set_Instance_Resolutions( instance, res, res ); - if ( error ) - Panic( "Could not set device resolutions." ); - - if ( !XisSetup ) - { - XisSetup = 1; - - if ( gray_render ) - { - if ( !SetGraphScreen( Graphics_Mode_Gray ) ) - Panic( "Could not set up grayscale graphics mode.\n" ); - - TT_Set_Raster_Gray_Palette( engine, virtual_palette ); - } - else - { - if ( !SetGraphScreen( Graphics_Mode_Mono ) ) - Panic( "Could not set up mono graphics mode.\n" ); - } - } - - Init_Display( gray_render ); - - Reset_Scale( ptsize ); - - old_ptsize = ptsize; - - Fail = 0; - Num = 0; - - for ( ;; ) - { - int key; - char* sbit_string; - static char* sbit_messages[4] = - { "off", "on", " if available", "NONE" }; - - sbit_string = sbit_messages[3]; - if ( glyph_has_sbit ) - { - if (sbit_flag >= 0 && sbit_flag < 3) - sbit_string = sbit_messages[sbit_flag]; - } - - Clear_Display(); - Render_All( Num, ptsize ); - if ( gray_render ) - Convert_To_Display_Palette(); - - sprintf( Header, "%s: Glyph: %4d ptsize: %4d hinting: %s sbit: %s", - ft_basename( filename ), Num, ptsize, - hinted ? "on" : "off", - sbit_string ); - Display_Bitmap_On_Screen( Bit.bitmap, Bit.rows, Bit.cols ); - -#ifndef X11 -#ifndef OS2 - Print_XY( 0, 0, Header ); -#endif -#endif - - Get_Event( &event ); - if ( !( key = Process_Event( &event ) ) ) - goto End; - - if ( key == 'n' ) - { - TT_Close_Face( face ); - - if ( file < argc - 1 ) - file++; - - goto NewFile; - } - - if ( key == 'p' ) - { - TT_Close_Face( face ); - - if ( file > 1 ) - file--; - - goto NewFile; - } - - if ( ptsize != old_ptsize ) - { - if ( Reset_Scale( ptsize ) ) - Panic( "Could not resize font.\n" ); - - old_ptsize = ptsize; - } - } - - End: - RestoreScreen(); - - TT_Done_FreeType( engine ); - - printf( "Execution completed successfully.\n" ); - printf( "Fails = %d\n", Fail ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ -} - - -/* End */ Index: xc/extras/FreeType/test/ftzoom.c diff -u xc/extras/FreeType/test/ftzoom.c:1.1.1.3 xc/extras/FreeType/test/ftzoom.c:removed --- xc/extras/FreeType/test/ftzoom.c:1.1.1.3 Sat Feb 12 23:56:19 2000 +++ xc/extras/FreeType/test/ftzoom.c Wed Mar 16 20:59:49 2005 @@ -1,681 +0,0 @@ -/****************************************************************************/ -/* */ -/* The FreeType project - a free and portable quality TrueType renderer. */ -/* */ -/* Copyright 1996-1999 by */ -/* D. Turner, R.Wilhelm, and W. Lemberg */ -/* */ -/* ftzoom : A simple glyph viewer. Now supports graylevel rendering */ -/* with the '-g' option. */ -/* */ -/* Use `-p ' together with `-e ' to */ -/* select a cmap. */ -/* */ -/* Keys: */ -/* */ -/* x : fine counter_clockwise rotation */ -/* c : fine clockwise rotation */ -/* */ -/* v : fast counter_clockwise rotation */ -/* b : fast clockwise rotation */ -/* */ -/* + : fast scale up */ -/* - : fast scale down */ -/* u : fine scale down */ -/* j : fine scale up */ -/* */ -/* l : go to next glyph */ -/* k : go to previous glyph */ -/* */ -/* o : go to tenth next glyph */ -/* i : go to tenth previous glyph */ -/* */ -/* 0 : go to hundredth next glyph */ -/* 9 : go to hundredth previous glyph */ -/* */ -/* ) : go to 1000th next glyph */ -/* ( : go to 1000th previous glyph */ -/* */ -/* } : go to 10000th next glyph */ -/* { : go to 10000th previous glyph */ -/* */ -/* q : */ -/* ESC : exit */ -/* */ -/* */ -/* NOTE 1: This is just a test program that is used to show off and */ -/* debug the current engine. In no way does it show the final */ -/* high-level interface that client applications will use. */ -/* */ -/* NOTE 2: The `post' engine is used to display the PS glyph names. */ -/* Use the `-n' switch if you don't want that. */ -/* */ -/****************************************************************************/ - -#include -#include -#include -#include - -#include "common.h" /* for Panic() only */ -#include "freetype.h" -#include "ftxpost.h" - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - -#ifdef DEBUG_LEVEL_TRACE -#include "ttdebug.h" -#endif - - -#define Pi 3.1415926535 - -#define MAXPTSIZE 5000 /* dtp */ - - char Header[128]; - - TT_Engine engine; - TT_Face face; - TT_Instance instance; - TT_Glyph glyph; - TT_CharMap char_map; - - TT_Glyph_Metrics metrics; - TT_Outline outline; - TT_Face_Properties properties; - TT_Instance_Metrics imetrics; - - int num_glyphs; - int xcenter_upem; - int ycenter_upem; - int units_per_em; - - int ptsize; - int old_ptsize; - int rotation; - int old_rotation; - - TT_Matrix matrix; - TT_Matrix zoom_matrix; - int apply_matrix; - int xcenter; - int ycenter; - int xoffset; - int yoffset; - - TT_Raster_Map Bit; - - int Fail; - int Num; - int Code; - - int gray_render = 0; - int hinted = 1; - int use_cmap = 0; - int zoom_factor = 1; - int grid = 0; - int use_post = 1; - - char palette[5] = { 0, 1, 2, 3, 4 }; - - - static void ClearData( void ) - { - if ( gray_render ) - memset( Bit.bitmap, gray_palette[0], Bit.size ); - else - memset( Bit.bitmap, 0, Bit.size ); - } - - - void Init_Raster_Area( void ) - { - Bit.rows = vio_Height; /* The whole window */ - Bit.width = vio_Width; - Bit.flow = TT_Flow_Up; - - if ( gray_render ) - { - Bit.cols = Bit.width; - Bit.size = Bit.rows * Bit.width; - } - else - { - Bit.cols = ( Bit.width + 7 ) / 8; /* convert to # of bytes */ - Bit.size = Bit.rows * Bit.cols; /* number of bytes in buffer */ - } - - Bit.bitmap = (void*)malloc( (int)Bit.size ); - if ( !Bit.bitmap ) - Panic( "Not enough memory to allocate bitmap!\n" ); - - ClearData(); - } - - - static TT_Error Reset_PtSize( int pointSize ) - { - TT_Error error; - - - if ( (error = TT_Set_Instance_PointSize( instance, pointSize )) ) - { - RestoreScreen(); - printf( "Error = 0x%x.\n", (int)error ); - Panic( "Could not reset instance.\n" ); - } - - TT_Get_Instance_Metrics( instance, &imetrics ); - - xcenter = imetrics.x_ppem * xcenter_upem / units_per_em / 4; - ycenter = imetrics.y_ppem * ycenter_upem / units_per_em / 4; - - xoffset = vio_Width/2 - xcenter; - yoffset = vio_Height/2 - ycenter; - - return TT_Err_Ok; - } - - - static TT_Error Reset_Rotation( int rotation ) - { - if ( rotation ) - { - float angle; - - - TT_Set_Instance_Transform_Flags( instance, 1, 0 ); - - angle = rotation * Pi / 512; - - matrix.xx = (TT_Fixed)(cos( angle ) * (1L<<16)); - matrix.xy = (TT_Fixed)(sin( angle ) * (1L<<16)); - matrix.yx = -matrix.xy; - matrix.yy = matrix.xx; - - apply_matrix = 1; - } - else - apply_matrix = 0; - - if ( zoom_factor != 1 ) - { - zoom_matrix.xx = zoom_matrix.yy = zoom_factor * (1L<<16); - zoom_matrix.xy = zoom_matrix.yx = 0; - } - - return TT_Err_Ok; - } - - - static TT_Error LoadTrueTypeChar( int idx, int hint ) - { - TT_Error error; - int flags; - - - flags = TTLOAD_SCALE_GLYPH; - if ( hint ) - flags |= TTLOAD_HINT_GLYPH; - - error = TT_Load_Glyph( instance, glyph, idx, flags ); - if ( error ) - return error; - - if ( apply_matrix || zoom_factor != 1 ) - { - TT_Get_Glyph_Outline( glyph, &outline ); - TT_Translate_Outline( &outline, -xcenter*64L, -ycenter*64L ); - if ( apply_matrix ) - TT_Transform_Outline( &outline, &matrix ); - if ( zoom_factor != 1 ) - TT_Transform_Outline( &outline, &zoom_matrix ); - TT_Translate_Outline( &outline, xcenter*64L, ycenter*64L ); - } - - return error; - } - - - static TT_Error ConvertRaster( void ) - { - if ( gray_render ) - return TT_Get_Glyph_Pixmap( glyph, &Bit, xoffset*64L, yoffset*64L ); - else - return TT_Get_Glyph_Bitmap( glyph, &Bit, xoffset*64L, yoffset*64L ); - } - - - static void DrawGrid( void ) - { - char *bmap, mask; - int x, y, shift, toggle; - - - bmap = (char *)Bit.bitmap; - - for ( y = 0; y < Bit.rows; ++y ) - { - if ( ( y - xoffset ) % zoom_factor == 0 ) - { - if ( gray_render ) - for ( x = y & 1; x < Bit.cols; x += 2 ) - bmap[x] = 4 - bmap[x]; - else { - mask = y & 1 ? 0x55 : 0xAA; - for ( x = 0; x < Bit.cols; ++x ) - bmap[x] ^= mask; - } - } - else - { - toggle = y & 1; - - if ( gray_render ) - { - for ( x = xoffset % zoom_factor; x < Bit.cols; x += zoom_factor ) - if ( ( x & 1 ) == toggle ) - bmap[x] = 4 - bmap[x]; - } - else - { - /* tricky business */ - shift = xoffset % zoom_factor; - for ( x = 0; x < Bit.cols; ++x ) - { - for ( mask = 0; shift < 8; shift += zoom_factor ) - if ( ( shift & 1 ) == toggle ) - mask |= 0x80 >> shift; - bmap[x] ^= mask; - shift -= 8; - } - } - } - bmap += Bit.cols; - } - } - - - static int Process_Event( TEvent* event ) - { - switch ( event->what ) - { - case event_Quit: /* ESC or q */ - return 0; - - case event_Keyboard: - if ( event->info == 'h' ) /* Toggle hinting */ - hinted = !hinted; - break; - - case event_Rotate_Glyph: - rotation = ( rotation + event->info ) & 1023; - break; - - case event_Scale_Glyph: - ptsize += event->info; - if ( ptsize < 1 ) - ptsize = 1; - if ( ptsize > MAXPTSIZE / zoom_factor ) - ptsize = MAXPTSIZE / zoom_factor; - break; - - case event_Change_Glyph: - if ( use_cmap ) - { - if ( event->info < 0 ) - { - if ( Code > -event->info ) - Code += event->info; - else - Code = 0; - - for ( ; Code >= 0; Code-- ) - { - Num = TT_Char_Index( char_map, Code ); - if ( Num > 0 ) - break; - } - } - else - { - if ( Code < 65536 - event->info - 1 ) - Code += event->info; - else - Code = 65536 - 1; - - for ( ; Code < 65536; Code++ ) - { - Num = TT_Char_Index( char_map, Code ); - if ( Num > 0 ) - break; - } - } - } - else - { - if ( event->info < 0 ) - { - if ( Num > -event->info ) - Num += event->info; - else - Num = 0; - } - else - { - if ( Num < num_glyphs - event->info - 1 ) - Num += event->info; - else - Num = num_glyphs - 1; - } - } - break; - } - - return 1; - } - - - void usage( char* execname ) - { - printf( "\n" ); - printf( "ftzoom: simple TrueType glyph viewer -- part of the FreeType project\n" ); - printf( "--------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "Usage: %s [options below] fontname[.ttf|.ttc]\n", execname ); - printf( "\n" ); - printf( " -g gray-level rendering (default: none)\n" ); - printf( " -r R use resolution R dpi (default: 96)\n" ); - printf( " -z Z Z:1 magnification (default: 1:1)\n" ); - printf( " -p id platform id (default: none)\n" ); - printf( " -e id encoding id (default: none)\n" ); - printf( " -n don't use the `post' table\n" ); - printf( " If either -p or -e is not set, no cmap will be used.\n" ); - printf( "\n" ); - - exit( EXIT_FAILURE ); - } - - - /* stack check dtp */ - - int main( int argc, char** argv ) - { - int i; - int platform = -1, encoding = -1; - char filename[128 + 4]; - char alt_filename[128 + 4]; - char* execname; - int option; - int res = 96; - TT_Error error; - TT_Post post; - - TEvent event; - - - execname = argv[0]; - gray_render = 0; - - -#ifdef DEBUG_LEVEL_TRACE - - set_tt_trace_levels( trace_raster, 7 ); - set_tt_trace_levels( trace_gload, 7 ); - -#endif - - - while ( 1 ) - { - option = ft_getopt( argc, argv, "e:gnp:r:z:" ); - - if ( option == -1 ) - break; - - switch ( option ) - { - case 'e': - encoding = atoi( ft_optarg ); - break; - - case 'g': - gray_render = 1; - break; - - case 'n': - use_post = 0; - break; - - case 'p': - platform = atoi( ft_optarg ); - break; - - case 'r': - res = atoi( ft_optarg ); - if ( res < 1 ) - usage( execname ); - break; - - case 'z': - zoom_factor = atoi( ft_optarg ); - if ( zoom_factor < 1 || zoom_factor > 16 ) - usage( execname ); - if ( zoom_factor > 4 ) - grid = 1; - break; - - default: - usage( execname ); - break; - } - } - - if ( ft_optind == argc ) - usage( execname ); - - i = strlen( argv[ft_optind] ); - while ( i > 0 && argv[ft_optind][i] != '\\' && argv[ft_optind][i] != '/' ) - { - if ( argv[ft_optind][i] == '.' ) - i = 0; - i--; - } - - filename[128] = '\0'; - alt_filename[128] = '\0'; - - strncpy( filename, argv[ft_optind], 128 ); - strncpy( alt_filename, argv[ft_optind], 128 ); - - if ( i >= 0 ) - { - strncpy( filename + strlen( filename ), ".ttf", 4 ); - strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 ); - } - - if ( platform >= 0 || encoding >= 0 ) - use_cmap = 1; - - /* Initialization */ - TT_Init_FreeType( &engine ); - - /* Initialization of the post extension */ - if ( use_post ) - TT_Init_Post_Extension( engine ); - - /* Load face */ - - error = TT_Open_Face( engine, filename, &face ); - - if ( error == TT_Err_Could_Not_Open_File ) - { - strcpy( filename, alt_filename ); - error = TT_Open_Face( engine, alt_filename, &face ); - } - - if ( error == TT_Err_Could_Not_Open_File ) - Panic( "Could not find/open %s.\n", filename ); - else if ( error ) - Panic( "Error while opening %s, error code = 0x%x.\n", - filename, error ); - - /* get face properties and allocate preload arrays */ - - TT_Get_Face_Properties( face, &properties ); - - num_glyphs = properties.num_Glyphs; - xcenter_upem = (properties.header->xMax - properties.header->xMin) / 2; - ycenter_upem = (properties.header->yMax - properties.header->yMin) / 2; - units_per_em = properties.header->Units_Per_EM; - - /* load full post table */ - if ( use_post ) - { - error = TT_Load_PS_Names( face, &post ); - if ( error ) - Panic( "Could not load PS names.\n" ); - } - - /* create glyph */ - - error = TT_New_Glyph( face, &glyph ); - if ( error ) - Panic( "Could not create glyph container.\n" ); - - /* create instance */ - - error = TT_New_Instance( face, &instance ); - if ( error ) - Panic( "Could not create instance for %s.\n", filename ); - - error = TT_Set_Instance_Resolutions( instance, res, res ); - if ( error ) - Panic( "Could not set device resolutions." ); - - if ( gray_render ) - { - if ( !SetGraphScreen( Graphics_Mode_Gray ) ) - Panic( "Could not set up grayscale graphics mode.\n" ); - - TT_Set_Raster_Gray_Palette( engine, gray_palette ); - } - else - { - if ( !SetGraphScreen( Graphics_Mode_Mono ) ) - Panic( "Could not set up mono graphics mode.\n" ); - } - - Init_Raster_Area(); - - old_ptsize = ptsize = 150 / zoom_factor; - old_rotation = rotation = 0; - - Reset_PtSize ( ptsize ); - Reset_Rotation( rotation ); - - if ( use_cmap ) - { - unsigned short num_cmap; - unsigned short cmap_plat; - unsigned short cmap_enc; - - - num_cmap = properties.num_CharMaps; - for ( i = 0; i < num_cmap; i++ ) - { - error = TT_Get_CharMap_ID( face, i, &cmap_plat, &cmap_enc ); - if ( error ) - Panic( "Cannot query cmap, error = 0x%x.\n", error ); - if ( cmap_plat == platform && cmap_enc == encoding ) - break; - } - - if ( i == num_cmap ) - Panic( "Invalid platform and/or encoding ID.\n" ); - - error = TT_Get_CharMap( face, i, &char_map ); - if ( error ) - Panic( "Cannot load cmap, error = 0x%x.\n", error ); - - num_glyphs = (1L << 16) - 1; - } - - Code = 0; - Num = 0; - Fail = 0; - - for ( ;; ) - { - char *glyphname; - - - glyphname = NULL; - - ClearData(); - - if ( ptsize != old_ptsize ) - { - Reset_PtSize( ptsize ); - old_ptsize = ptsize; - } - - if ( rotation != old_rotation ) - { - Reset_Rotation( rotation ); - old_rotation = rotation; - } - - if ( (error = LoadTrueTypeChar( Num, hinted )) == TT_Err_Ok ) - { - ConvertRaster(); - if ( grid ) - DrawGrid(); - - if ( use_post ) - (void)TT_Get_PS_Name(face, Num, &glyphname); - - if ( use_cmap ) - sprintf( Header, "\"%s\": index = %3d, code = 0x%x, hinting = %s", - use_post ? glyphname : "", Num, Code, - hinted ? "ON" : "OFF" ); - else - sprintf( Header, "\"%s\": index = %3d, hinting = %s", - use_post ? glyphname : "", Num, hinted ? "ON" : "OFF" ); - } - else { - Fail++; - sprintf( Header, "\"%s\": index = %3d, hinting = %s (ERROR 0x%lx)", - glyphname ? glyphname : "", Num, - hinted ? "ON" : "OFF", error ); - } - - Display_Bitmap_On_Screen( Bit.bitmap, Bit.rows, Bit.cols ); - -#ifndef X11 -#ifndef OS2 - Print_XY( 0, 0, Header ); -#endif -#endif - - Get_Event( &event ); - if ( !Process_Event( &event ) ) goto End; - } - - End: - - RestoreScreen(); - - TT_Done_FreeType( engine ); - - printf( "Fails = %d.\n", Fail ); - - exit( EXIT_SUCCESS ); /* for safety reasons */ - - return 0; /* never reached */ - } - - -/* End */ Index: xc/extras/FreeType/test/gdriver.h diff -u xc/extras/FreeType/test/gdriver.h:1.1.1.2 xc/extras/FreeType/test/gdriver.h:removed --- xc/extras/FreeType/test/gdriver.h:1.1.1.2 Sat Feb 12 23:56:20 2000 +++ xc/extras/FreeType/test/gdriver.h Wed Mar 16 20:59:49 2005 @@ -1,55 +0,0 @@ -/******************************************************************* - * - * gdriver.h : Graphics utility driver generic interface 1.1 - * - * Generic interface for all drivers of the graphics utility used - * by the FreeType test programs. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef GDRIVER_H -#define GDRIVER_H - - /* Note that we now support an event based model, even with */ - /* full-screen modes. It is the responsability of the driver */ - /* to map its events to the TEvent structure when called */ - /* through Get_Event. */ - - /* The event classes are defined in the file 'gevents.h' included */ - /* by the test programs, not by the graphics utility. */ - - typedef struct _TEvent - { - int what; /* event class */ - int info; /* event parameter */ - } TEvent; - - - /* Get last event. In full-screen modes, a keystroke must be */ - /* translated to an event class with a parameter. */ - void Get_Event( TEvent* event ); - - /* A call to this function must set the graphics mode, the Vio */ - /* variable, as well as the values vio_ScanLineWidth, vio_Width */ - /* and vio_Height. */ - int Driver_Set_Graphics( int mode ); - - /* Restore previous mode or release display buffer/window */ - int Driver_Restore_Mode( void ); - - /* display bitmap on screen */ - int Driver_Display_Bitmap( char* buffer, int line, int col ); - -#endif /* GDRIVER_H */ - - -/* End */ Index: xc/extras/FreeType/test/gevents.h diff -u xc/extras/FreeType/test/gevents.h:1.1.1.2 xc/extras/FreeType/test/gevents.h:removed --- xc/extras/FreeType/test/gevents.h:1.1.1.2 Sat Feb 12 23:56:20 2000 +++ xc/extras/FreeType/test/gevents.h Wed Mar 16 20:59:49 2005 @@ -1,43 +0,0 @@ -/******************************************************************* - * - * gevents.h test programs events definition 1.1 - * - * This file defines the events used by the FreeType test programs - * It is _not_ included by 'gmain.c'. This file is also used by the - * drivers to translate their own events in GEvents. - * - * Not a very good design, but we're not rewriting X... - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef GEVENTS_H -#define GEVENTS_H - - typedef enum _GEvent - { - event_None, - event_Quit, /* Quit program */ - - event_Keyboard, /* unknown keystroke */ - - event_Change_Glyph, - event_Rotate_Glyph, - event_Scale_Glyph, - - event_Change_ScanType, - event_Change_Instructions - } GEvent; - -#endif /* GEVENTS_H */ - - -/* End */ Index: xc/extras/FreeType/test/gmain.c diff -u xc/extras/FreeType/test/gmain.c:1.1.1.2 xc/extras/FreeType/test/gmain.c:removed --- xc/extras/FreeType/test/gmain.c:1.1.1.2 Sat Feb 12 23:56:20 2000 +++ xc/extras/FreeType/test/gmain.c Wed Mar 16 20:59:49 2005 @@ -1,475 +0,0 @@ -/******************************************************************* - * - * gmain.c graphics utility main body 1.1 - * - * This file defines a common implementation of the graphics - * utility used by the FreeType test programs. It relies on - * system-specific drivers, like 'gfs_os.c', which interface is - * described in the file 'gdriver.h'. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include "gdriver.h" -#include "gmain.h" - -#ifndef FAILURE -#define FAILURE 0 -#endif - -#ifndef SUCCESS -#define SUCCESS 1 -#endif - - char* Vio; /* pointer to VRAM or display buffer */ - - int vio_ScanLineWidth; /* scan line width in bytes */ - - int vio_Width; - int vio_Height; - - int gcursor_x = 0; - int gcursor_y = 0; - - int gwindow_width = 0; - int gwindow_height = 0; - - unsigned char gray_palette[5]; - - - typedef void TFunction_Print_8x8_Char( int x, - int y, - unsigned char c ); - - TFunction_Print_8x8_Char* Print_8x8_Char; - - /* font characters */ - - unsigned char font_8x8[2048] = - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E, - 0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, - 0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00, - 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00, - 0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x92, 0x10, 0x7C, - 0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C, - 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, - 0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, - 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, - 0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78, - 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, - 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0, - 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0, - 0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99, - 0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00, - 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00, - 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18, - 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00, - 0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00, - 0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0x86, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00, - 0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF, - 0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, - 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, - 0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, - 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, - 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, - 0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00, - 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, - 0x18, 0x7E, 0xC0, 0x7C, 0x06, 0xFC, 0x18, 0x00, - 0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00, - 0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00, - 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00, - 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00, - 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00, - 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, - 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, - 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, - 0x7C, 0xCE, 0xDE, 0xF6, 0xE6, 0xC6, 0x7C, 0x00, - 0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00, - 0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00, - 0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, - 0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x1E, 0x00, - 0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00, - 0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, - 0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, - 0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00, - 0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00, - 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30, - 0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00, - 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, - 0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00, - 0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00, - 0x7C, 0xC6, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00, - 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00, - 0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00, - 0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00, - 0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, - 0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00, - 0xFE, 0x62, 0x68, 0x78, 0x68, 0x60, 0xF0, 0x00, - 0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3A, 0x00, - 0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, - 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, - 0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00, - 0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00, - 0xF0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00, - 0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00, - 0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00, - 0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x00, - 0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00, - 0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0x7C, 0x0E, 0x00, - 0xFC, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0xE6, 0x00, - 0x7C, 0xC6, 0xE0, 0x78, 0x0E, 0xC6, 0x7C, 0x00, - 0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x00, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, - 0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00, - 0xC6, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0xC6, 0x00, - 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00, - 0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00, - 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00, - 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00, - 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, - 0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, - 0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00, - 0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00, - 0x1C, 0x0C, 0x0C, 0x7C, 0xCC, 0xCC, 0x76, 0x00, - 0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, - 0x38, 0x6C, 0x64, 0xF0, 0x60, 0x60, 0xF0, 0x00, - 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, - 0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00, - 0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, - 0x0C, 0x00, 0x1C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, - 0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00, - 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, - 0x00, 0x00, 0xCC, 0xFE, 0xFE, 0xD6, 0xD6, 0x00, - 0x00, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, - 0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, - 0x00, 0x00, 0xDC, 0x66, 0x66, 0x7C, 0x60, 0xF0, - 0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E, - 0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0xF0, 0x00, - 0x00, 0x00, 0x7C, 0xC0, 0x70, 0x1C, 0xF8, 0x00, - 0x10, 0x30, 0xFC, 0x30, 0x30, 0x34, 0x18, 0x00, - 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00, - 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00, - 0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00, - 0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, - 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, - 0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00, - 0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00, - 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, - 0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00, - 0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00, - 0x7C, 0xC6, 0xC0, 0xC6, 0x7C, 0x0C, 0x06, 0x7C, - 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, - 0x1C, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, - 0x7E, 0x81, 0x3C, 0x06, 0x3E, 0x66, 0x3B, 0x00, - 0xCC, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, - 0xE0, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, - 0x30, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, - 0x00, 0x00, 0x7C, 0xC6, 0xC0, 0x78, 0x0C, 0x38, - 0x7E, 0x81, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, - 0xCC, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, - 0xE0, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, - 0xCC, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, - 0x7C, 0x82, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00, - 0xE0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, - 0xC6, 0x10, 0x7C, 0xC6, 0xFE, 0xC6, 0xC6, 0x00, - 0x30, 0x30, 0x00, 0x78, 0xCC, 0xFC, 0xCC, 0x00, - 0x1C, 0x00, 0xFC, 0x60, 0x78, 0x60, 0xFC, 0x00, - 0x00, 0x00, 0x7F, 0x0C, 0x7F, 0xCC, 0x7F, 0x00, - 0x3E, 0x6C, 0xCC, 0xFE, 0xCC, 0xCC, 0xCE, 0x00, - 0x78, 0x84, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, - 0x00, 0xCC, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, - 0x00, 0xE0, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, - 0x78, 0x84, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, - 0x00, 0xE0, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, - 0x00, 0xCC, 0x00, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, - 0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00, - 0xCC, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x00, - 0x18, 0x18, 0x7E, 0xC0, 0xC0, 0x7E, 0x18, 0x18, - 0x38, 0x6C, 0x64, 0xF0, 0x60, 0xE6, 0xFC, 0x00, - 0xCC, 0xCC, 0x78, 0x30, 0xFC, 0x30, 0xFC, 0x30, - 0xF8, 0xCC, 0xCC, 0xFA, 0xC6, 0xCF, 0xC6, 0xC3, - 0x0E, 0x1B, 0x18, 0x3C, 0x18, 0x18, 0xD8, 0x70, - 0x1C, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00, - 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, - 0x00, 0x1C, 0x00, 0x78, 0xCC, 0xCC, 0x78, 0x00, - 0x00, 0x1C, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x00, - 0x00, 0xF8, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0x00, - 0xFC, 0x00, 0xCC, 0xEC, 0xFC, 0xDC, 0xCC, 0x00, - 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00, 0x00, - 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x7C, 0x00, 0x00, - 0x18, 0x00, 0x18, 0x18, 0x30, 0x66, 0x3C, 0x00, - 0x00, 0x00, 0x00, 0xFC, 0xC0, 0xC0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xFC, 0x0C, 0x0C, 0x00, 0x00, - 0xC6, 0xCC, 0xD8, 0x36, 0x6B, 0xC2, 0x84, 0x0F, - 0xC3, 0xC6, 0xCC, 0xDB, 0x37, 0x6D, 0xCF, 0x03, - 0x18, 0x00, 0x18, 0x18, 0x3C, 0x3C, 0x18, 0x00, - 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, - 0x00, 0xCC, 0x66, 0x33, 0x66, 0xCC, 0x00, 0x00, - 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, - 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, - 0xDB, 0xF6, 0xDB, 0x6F, 0xDB, 0x7E, 0xD7, 0xED, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, - 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, - 0x36, 0x36, 0x36, 0x36, 0xF6, 0x36, 0x36, 0x36, - 0x00, 0x00, 0x00, 0x00, 0xFE, 0x36, 0x36, 0x36, - 0x00, 0x00, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18, - 0x36, 0x36, 0xF6, 0x06, 0xF6, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, - 0x00, 0x00, 0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, - 0x36, 0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, - 0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, - 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, - 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x37, 0x30, 0x3F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3F, 0x30, 0x37, 0x36, 0x36, 0x36, - 0x36, 0x36, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, - 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, - 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, - 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00, - 0x18, 0x18, 0x1F, 0x18, 0x1F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1F, 0x18, 0x1F, 0x18, 0x18, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x3F, 0x36, 0x36, 0x36, - 0x36, 0x36, 0x36, 0x36, 0xFF, 0x36, 0x36, 0x36, - 0x18, 0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x76, 0xDC, 0xC8, 0xDC, 0x76, 0x00, - 0x00, 0x78, 0xCC, 0xF8, 0xCC, 0xF8, 0xC0, 0xC0, - 0x00, 0xFC, 0xCC, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, - 0x00, 0x00, 0xFE, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, - 0xFC, 0xCC, 0x60, 0x30, 0x60, 0xCC, 0xFC, 0x00, - 0x00, 0x00, 0x7E, 0xD8, 0xD8, 0xD8, 0x70, 0x00, - 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x60, 0xC0, - 0x00, 0x76, 0xDC, 0x18, 0x18, 0x18, 0x18, 0x00, - 0xFC, 0x30, 0x78, 0xCC, 0xCC, 0x78, 0x30, 0xFC, - 0x38, 0x6C, 0xC6, 0xFE, 0xC6, 0x6C, 0x38, 0x00, - 0x38, 0x6C, 0xC6, 0xC6, 0x6C, 0x6C, 0xEE, 0x00, - 0x1C, 0x30, 0x18, 0x7C, 0xCC, 0xCC, 0x78, 0x00, - 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00, - 0x06, 0x0C, 0x7E, 0xDB, 0xDB, 0x7E, 0x60, 0xC0, - 0x38, 0x60, 0xC0, 0xF8, 0xC0, 0x60, 0x38, 0x00, - 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, - 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, - 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x7E, 0x00, - 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xFC, 0x00, - 0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xFC, 0x00, - 0x0E, 0x1B, 0x1B, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x18, 0x18, 0x18, 0xD8, 0xD8, 0x70, - 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00, - 0x00, 0x76, 0xDC, 0x00, 0x76, 0xDC, 0x00, 0x00, - 0x38, 0x6C, 0x6C, 0x38, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x0F, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C, - 0x58, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, - 0x70, 0x98, 0x30, 0x60, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - - - void Print_8x8_Mono( int x, int y, unsigned char c ) - { - int offset, i; - unsigned char* bitm; - - if ( !Vio ) - return; - - offset = x + y * vio_ScanLineWidth * 8; - bitm = font_8x8 + (int)c * 8; - - for ( i = 0; i < 8; i++ ) - { - Vio[offset] = *bitm; - bitm++; - offset += vio_ScanLineWidth; - } - } - - - void Print_8x8_Gray( int x, int y, unsigned char c ) - { - int offset, i, bit; - unsigned char* bitm; - - if ( !Vio ) - return; - - offset = x * 8 + y * vio_ScanLineWidth * 8; - bitm = font_8x8 + (int)c * 8; - - for ( i = 0; i < 8; i++ ) - { - bit = 0x80; - while ( bit > 0 ) - { - if ( bit & *bitm ) - Vio[offset] = (char)0x0f; - else - Vio[offset] = 0x00; - - bit >>= 1; - offset++; - } - offset += vio_ScanLineWidth - 8; - bitm++; - } - } - - - int SetGraphScreen( int mode ) - { - gcursor_x = 0; - gcursor_y = 0; - - switch( mode ) - { - case Graphics_Mode_Mono: - if ( !Driver_Set_Graphics( mode ) ) - return FAILURE; - - gwindow_width = vio_ScanLineWidth; - gwindow_height = vio_Height / 8; - - Print_8x8_Char = Print_8x8_Mono; - break; - - case Graphics_Mode_Gray: - if ( !Driver_Set_Graphics( mode ) ) - return FAILURE; - - gwindow_width = vio_ScanLineWidth / 8; - gwindow_height = vio_Height / 8; - - Print_8x8_Char = Print_8x8_Gray; - break; - - default: - /* Invalid function call */ - return FAILURE; - } - - return SUCCESS; - } - - - /* restore previous (or text) video mode */ - - int RestoreScreen( void ) - { - gcursor_x = 0; - gcursor_y = 0; - gwindow_height = 0; - gwindow_height = 0; - - return Driver_Restore_Mode(); - } - - - void Display_Bitmap_On_Screen( char* buffer, int line, int col ) - { - Driver_Display_Bitmap( buffer, line, col ); - } - - - void Goto_XY( int x, int y ) - { - gcursor_x = x; - gcursor_y = y; - } - - - void Print_Str( char* string ) - { - if ( !string ) return; - - while ( *string ) - { - switch ( *string ) - { - case '\n': - gcursor_x = 0; - gcursor_y++; - if ( gcursor_y > gwindow_height ) gcursor_y = 0; - break; - - default: - (*Print_8x8_Char)( gcursor_x, gcursor_y, *string ); - - gcursor_x++; - - if ( gcursor_x >= gwindow_width ) - { - gcursor_x = 0; - gcursor_y++; - - if ( gcursor_y >= gwindow_height ) gcursor_y = 0; - } - } - string++; - } - } - - - void Print_XY( int x, int y, char* string ) - { - Goto_XY( x, y ); - Print_Str( string ); - } - - - - - - - - - -/* End */ Index: xc/extras/FreeType/test/gmain.h diff -u xc/extras/FreeType/test/gmain.h:1.1.1.2 xc/extras/FreeType/test/gmain.h:removed --- xc/extras/FreeType/test/gmain.h:1.1.1.2 Sat Feb 12 23:56:21 2000 +++ xc/extras/FreeType/test/gmain.h Wed Mar 16 20:59:49 2005 @@ -1,71 +0,0 @@ -/******************************************************************* - * - * gmain.h graphics utility main interface 1.1 - * - * This file defines a common interface, implemented in the body - * file 'gmain.c'. It relies on system dependent driver files, - * like 'gfs_os.c', whose interface is described in 'gdriver.h'. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#ifndef GMAIN_H -#define GMAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Graphics mode definitions */ - -#define Graphics_Mode_Mono 1 /* monochrome graphics mode */ -#define Graphics_Mode_Gray 2 /* 8-bit palette graphics mode */ - - extern char* Vio; /* Pointer to VRAM or display buffer */ - - extern int vio_ScanLineWidth; /* Scan Line width in bytes */ - - extern int vio_Width; - extern int vio_Height; - - extern unsigned char gray_palette[5]; /* standard gray_palette */ - - - /* set a graphics mode, chosen from the FS_Graphics_xxx list */ - int SetGraphScreen( int mode ); - - /* restore previous (or text) video mode */ - int RestoreScreen( void ); - - /* display a bitmap of 'line' lines, and 'col' columns (each */ - /* column made of 8 bits) */ - void Display_Bitmap_On_Screen( char* buffer, int line, int col ); - - void Goto_XY( int x, int y ); - - - extern int gcursor_x; - extern int gcursor_y; - - extern int gwindow_width; - extern int gwindow_height; - - void Print_Str( char* string ); - void Print_XY ( int x, int y, char* string ); - -#ifdef __cplusplus -} -#endif - -#endif /* GMAIN_H */ - - -/* End */ Index: xc/extras/FreeType/test/arch/amigaos/Makefile.gcc diff -u xc/extras/FreeType/test/arch/amigaos/Makefile.gcc:1.1.1.2 xc/extras/FreeType/test/arch/amigaos/Makefile.gcc:removed --- xc/extras/FreeType/test/arch/amigaos/Makefile.gcc:1.1.1.2 Sat Feb 12 23:56:21 2000 +++ xc/extras/FreeType/test/arch/amigaos/Makefile.gcc Wed Mar 16 20:59:49 2005 @@ -1,106 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for amiga using ADE. -# -# You will need GNU make. -# -# Use this file while in the 'test' directory with the following statement: -# -# make -f arch/amigaos/Makefile.gcc - -ARCH = arch/amigaos -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -CC = gcc - -LIBDIR = ../lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -CFLAGS = -ansi -Wall -g -noixemul $(INCDIRS) -# CFLAGS = -Wall -noixemul -O2 -Ilib $(INCDIRS) - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -GSRC = gmain.c display.c blitter.c $(ARCH)/gw_amiga.c -GOBJ = $(GSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -%.exe: - $(CC) $(CFLAGS) -o $@ @^ - - -EXEFILES = ftdump \ - fterror \ - ftlint \ - ftmetric \ - ftsbit \ - ftstring \ - ftstrpnm \ - ftstrtto \ - fttimer \ - ftview \ - ftzoom - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - -ftzoom: $(GOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview: $(GOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump: ftdump.o common.o $(LIBDIR)/libttf.a -ftstring: $(GOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -fttimer: $(GOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftsbit: ftsbit.o common.o $(LIBDIR)/libttf.a -ftstrpnm: ftstrpnm.o common.o $(LIBDIR)/libttf.a -ftmetric: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto: $(GOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -rm dep.end core - -rm $(EXE) - -do_clean: - -rm *.o - -rm arch/amigaos/*.o - - -depend: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $(SRC) $(GSRC) > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/test/arch/amigaos/TODO diff -u xc/extras/FreeType/test/arch/amigaos/TODO:1.1.1.1 xc/extras/FreeType/test/arch/amigaos/TODO:removed --- xc/extras/FreeType/test/arch/amigaos/TODO:1.1.1.1 Sat Sep 5 23:00:51 1998 +++ xc/extras/FreeType/test/arch/amigaos/TODO Wed Mar 16 20:59:49 2005 @@ -1,16 +0,0 @@ - - * To test the window oriented driver. - - * To improve the window oriented driver to use ROM functions like - WriteChunkyPixel() (or similar) instead of the current routine. - - * To build a truetype.library from libttf.a - - * truetype.datatype. - - * Program to convert truetype fonts in Amiga fonts. - - Suggestions, bug reports, code improvements, support for other compilers, - ... are welcome ! - - Send them to: map@medusa.es or to freetype@lists.lrz-muenchen.de Index: xc/extras/FreeType/test/arch/amigaos/gfsamiga.c diff -u xc/extras/FreeType/test/arch/amigaos/gfsamiga.c:1.1.1.2 xc/extras/FreeType/test/arch/amigaos/gfsamiga.c:removed --- xc/extras/FreeType/test/arch/amigaos/gfsamiga.c:1.1.1.2 Sat Feb 12 23:56:21 2000 +++ xc/extras/FreeType/test/arch/amigaos/gfsamiga.c Wed Mar 16 20:59:49 2005 @@ -1,428 +0,0 @@ -/******************************************************************* - * - * gfsamiga.c graphics utility fullscreen Amiga driver. 1.0 - * - * This is the driver for fullscreen Amiga display, used by the - * graphics utility of the FreeType test suite. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -/* standard includes */ - -#include -#include - -/* AmigaOS includes */ - -#include -#include -#include -#include - -#ifdef __GNUC__ - -#include -#include -#include -#include - -#else - -#include -#include -#include -#include - -#endif - -/* FreeType includes */ - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - -/* some screen definitions */ - -#define MONO_SCREEN_WIDTH 640 -#define MONO_SCREEN_HEIGHT 512 -#define MONO_SCREEN_DEPTH 1 - -#define GRAY_SCREEN_WIDTH 320 -#define GRAY_SCREEN_HEIGHT 256 -#define GRAY_SCREEN_DEPTH 3 - -#define DISPLAY_MEM ( 1024 * 64 ) - - - /* external variables */ - - extern struct Library* SysBase; - extern struct Library* DOSBase; - - extern int vio_ScanLineWidth; - extern char* Vio; - extern char gray_palette[5]; - - /* global variables */ - - struct Library* IntuitionBase = NULL; - struct Library* GfxBase = NULL; - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - - /* local variables */ - - static struct Screen* fts = NULL; - static struct Window* ftw = NULL; - - static int graphx_mode; - - - /* exit gracefully */ - - static void AmigaCleanUp( void ) - { - if ( ftw ) - CloseWindow( ftw ); - - if ( fts ) - CloseScreen( fts ); - - if ( IntuitionBase ) - CloseLibrary( IntuitionBase ); - - if ( GfxBase ) - CloseLibrary( GfxBase ); - - if ( graphx_mode == Graphics_Mode_Gray ) - if ( Vio ) - FreeMem( Vio, DISPLAY_MEM ); - } - - - static void SetPalette( void ) - { - short color[] = { 0x0000, - 0x0333, - 0x0777, - 0x0BBB, - 0x0FFF, - 0x0A00, - 0x00A0, - 0x000A - }; - short i; - - - for ( i = 0; i < 8; i++ ) - { - if ( i < 5 ) - gray_palette[i] = i; - - SetRGB4( &fts->ViewPort, i, (UBYTE)(color[i] >> 8 & 0x0f), - (UBYTE)(color[i] >> 4 & 0x0f), - (UBYTE)(color[i] & 0x0f ) ); - } - } - - - /* open libraries & custom screen */ - - static int AmigaInit( void ) - { - /* cleanup at exit */ - if ( atexit( AmigaCleanUp ) ) - { - PutStr( "atexit() failed\n" ); - return -1; - } - - /* open intuition library */ - - IntuitionBase = (struct Library*)OpenLibrary( "intuition.library", 37L ); - if ( IntuitionBase == NULL ) - { - PutStr( "Could not open intuition library\n" ); - return -1; - } - - /* Open graphics library */ - - GfxBase = OpenLibrary( "graphics.library", 37L ); - if ( GfxBase == NULL ) - { - PutStr( "Could not open graphics library\n" ); - return -1; - } - - if ( graphx_mode == Graphics_Mode_Gray ) - { - /* open custom screen */ - fts = (struct Screen*)OpenScreenTags( - NULL, - SA_DisplayID, (PAL_MONITOR_ID | LORES_KEY), - SA_Width, GRAY_SCREEN_WIDTH, - SA_Height, GRAY_SCREEN_HEIGHT, - SA_Depth, GRAY_SCREEN_DEPTH, - SA_ShowTitle, FALSE, - TAG_DONE ); - - if ( fts == NULL ) - { - PutStr( "Could not open custom screen\n" ); - return -1; - } - - /* set gray palette */ - SetPalette(); - } - else - { - /* open custom screen */ - fts = (struct Screen*)OpenScreenTags( - NULL, - SA_DisplayID, (PAL_MONITOR_ID | HIRESLACE_KEY), - SA_Width, MONO_SCREEN_WIDTH, - SA_Height, MONO_SCREEN_HEIGHT, - SA_Depth, MONO_SCREEN_DEPTH, - SA_ShowTitle, FALSE, - TAG_DONE ); - - if ( fts == NULL ) - { - PutStr( "Could not open custom screen\n" ); - return -1; - } - } - - /* open intuition window */ - ftw = OpenWindowTags( - NULL, - WA_Left, 0, - WA_Width, fts->Width, - WA_Top, 0, - WA_Height, fts->Height, - WA_IDCMP, IDCMP_VANILLAKEY | IDCMP_MOUSEBUTTONS, - WA_Flags, WFLG_BACKDROP | WFLG_BORDERLESS | - WFLG_RMBTRAP | WFLG_ACTIVATE, - WA_Gadgets, NULL, - WA_Title, NULL, - WA_CustomScreen, fts, - TAG_DONE ); - - if ( ftw == NULL ) - { - PutStr( "Could not open intuition window\n" ); - return -1; - } - - if ( graphx_mode == Graphics_Mode_Gray ) - { - Vio = (char*)AllocMem( DISPLAY_MEM, MEMF_ANY ); - - if ( !Vio ) - { - PutStr( "Cannot AllocMem() display memory\n" ); - return -1; - } - - vio_Width = vio_ScanLineWidth = GRAY_SCREEN_WIDTH; - vio_Height = GRAY_SCREEN_HEIGHT; - } - else - { - Vio = (char*)fts->BitMap.Planes[0]; - vio_ScanLineWidth = fts->BitMap.BytesPerRow; - vio_Width = MONO_SCREEN_WIDTH; - vio_Height = MONO_SCREEN_HEIGHT; - } - - return 0; - } - - - /* get events in the window */ - - static char Get_Intuition_Event( void ) - { - struct IntuiMessage* msg; - ULONG class; - USHORT code; - - - WaitPort( ftw->UserPort ); - - while ( ( msg = (struct IntuiMessage*)GetMsg( ftw->UserPort ) ) ) - { - class = msg->Class; - code = msg->Code; - - ReplyMsg( (struct Message*)msg ); - - switch ( class ) - { - case IDCMP_MOUSEBUTTONS: - return (char)27; - - case IDCMP_VANILLAKEY: - return (char)code; - } - } - - return '\0'; - } - - - /* set Amiga graphics mode */ - - int Driver_Set_Graphics( int mode ) - { - graphx_mode = mode; - - - if ( AmigaInit() == -1 ) - return 0; /* failure */ - - return 1; /* success */ - } - - - /* restore screen to its original state */ - - int Driver_Restore_Mode( void ) - { - /* do nothing */ - - return 1; /* success */ - } - - - /* display bitmap */ - - int Driver_Display_Bitmap( char* buffer, int line, int col ) - { - int y, z; - char* target; - char old = -1; - - - target = Vio + ( line - 1 ) * vio_ScanLineWidth; - - for ( y = 0; y < line; y++ ) - { - CopyMem( buffer, target, col ); - target -= vio_ScanLineWidth; - buffer += col; - } - - if ( graphx_mode == Graphics_Mode_Gray ) - { - /* clear screen */ - SetRast( &fts->RastPort, 0 ); - - /* draw glyph */ - for ( y = 0; y < line; y++ ) - { - for ( z = 0; z < col; z++ ) - { - int c = Vio[y * vio_ScanLineWidth + z]; - - if ( c != 0 ) - { - if ( old != c ) - { - if ( c < 0 || c > 5 ) - { - PutStr( "Unexpected value!\n" ); - SetAPen( &fts->RastPort, 7 ); - } - else - { - old = c; - SetAPen( &fts->RastPort, c ); - } - } - - WritePixel( &fts->RastPort, z, y ); - } - } - } - } - - return 1; /* success */ - } - - - void Get_Event( TEvent* event ) - { - int i; - char c; - - - c = Get_Intuition_Event(); - - if ( c != '\0' ) - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - event->what = trans[i].event_class; - event->info = trans[i].event_info; - return; - } - } - - /* unrecognized keystroke */ - - event->what = event_Keyboard; - event->info = (int)c; - - return; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/amigaos/gw_amiga.c diff -u xc/extras/FreeType/test/arch/amigaos/gw_amiga.c:1.1.1.3 xc/extras/FreeType/test/arch/amigaos/gw_amiga.c:removed --- xc/extras/FreeType/test/arch/amigaos/gw_amiga.c:1.1.1.3 Sat Feb 12 23:56:22 2000 +++ xc/extras/FreeType/test/arch/amigaos/gw_amiga.c Wed Mar 16 20:59:49 2005 @@ -1,522 +0,0 @@ -/******************************************************************* - * - * gw_amiga.c graphics utility Intuition Amiga driver. - * - * This is the driver for windowed display under Amiga WorkBench, - * used by the graphics utility of the FreeType test suite. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -/* modified by Richard Griffith - open largest window we can, and adapt accordingly - gray and mono both appear black on white - display Header message in Window title - add simple menus - */ - -/* standard includes */ - -#include -#include - -/* AmigaOS includes */ - -#include -#include -#include -#include -#include - -#ifdef __GNUC__ -#include -#include -#include -#include -#include -#else -#include -#include -#include -#include -#include -#endif - -/* FreeType includes */ - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -/* some screen definitions */ - -#define MONO_WINDOW_WIDTH 0xFFFF -#define MONO_WINDOW_HEIGHT 0xFFFF - -#define GRAY_WINDOW_WIDTH 0xFFFF -#define GRAY_WINDOW_HEIGHT 0xFFFF - -#define DISPLAY_MEM ( 1024 * 64 ) - - - /* external variables */ - extern struct Library* SysBase; - extern struct Library* DOSBase; - - extern int vio_ScanLineWidth; - extern char* Vio; -/* extern char gray_palette[5]; */ - - /* global variables */ - struct Library* IntuitionBase = NULL; - struct Library* GfxBase = NULL; - struct Library *GadToolsBase = NULL; - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - - /* local variables */ - static struct Screen* fts = NULL; - static struct Window* ftw = NULL; - static APTR VisualInfo = NULL; - static struct Menu *ftmenus = NULL; - - static int graphx_mode; - - static ULONG vio_allocsize; - - static struct NewMenu ftNewMenu[] = { - {NM_TITLE, (STRPTR)"File", NULL, 0, NULL, NULL}, - {NM_ITEM, (STRPTR)"Next", (STRPTR)"n", 0, 0L, (APTR)'n'}, - {NM_ITEM, (STRPTR)"Previous",(STRPTR)"p", 0, 0L, (APTR)'p'}, - {NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL}, - {NM_ITEM, (STRPTR)"Quit", (STRPTR)"q", 0, 0L, (APTR)'q'}, - {NM_TITLE, (STRPTR)"Options", NULL, 0, NULL, NULL}, - {NM_ITEM, (STRPTR)"Scale Up", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"Fine", (STRPTR)"u", 0, 0L, (APTR)'u'}, - {NM_SUB, (STRPTR)"Fast", (STRPTR)"+", 0, 0L, (APTR)'+'}, - {NM_ITEM, (STRPTR)"Scale Down", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"Fine", (STRPTR)"j", 0, 0L, (APTR)'j'}, - {NM_SUB, (STRPTR)"Fast", (STRPTR)"-", 0, 0L, (APTR)'-'}, - {NM_ITEM, (STRPTR)"Toggle Hinting", (STRPTR)"h", 0, 0L, (APTR)'h'}, - {NM_ITEM, (STRPTR)"Toggle Kerning", (STRPTR)"K", 0, 0L, (APTR)'K'}, - {NM_ITEM, (STRPTR)"Toggle sbit", (STRPTR)"B", 0, 0L, (APTR)'B'}, - {NM_ITEM, (STRPTR)"Toggle GSUB", (STRPTR)"G", 0, 0L, (APTR)'G'}, - {NM_TITLE, (STRPTR)"Glyph", NULL, 0, NULL, NULL}, - {NM_ITEM, (STRPTR)"Next", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"1", (STRPTR)"l", 0, 0L, (APTR)'l'}, - {NM_SUB, (STRPTR)"10", (STRPTR)"o", 0, 0L, (APTR)'o'}, - {NM_SUB, (STRPTR)"100", (STRPTR)"0", 0, 0L, (APTR)'0'}, - {NM_SUB, (STRPTR)"1000", (STRPTR)")", 0, 0L, (APTR)')'}, - {NM_SUB, (STRPTR)"10000",(STRPTR)"}", 0, 0L, (APTR)'}'}, - {NM_ITEM, (STRPTR)"Previous", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"1", (STRPTR)"k", 0, 0L, (APTR)'k'}, - {NM_SUB, (STRPTR)"10", (STRPTR)"i", 0, 0L, (APTR)'i'}, - {NM_SUB, (STRPTR)"100", (STRPTR)"9", 0, 0L, (APTR)'9'}, - {NM_SUB, (STRPTR)"1000", (STRPTR)"(", 0, 0L, (APTR)'('}, - {NM_SUB, (STRPTR)"10000",(STRPTR)"{", 0, 0L, (APTR)'{'}, - {NM_TITLE, (STRPTR)"Rotate", NULL, 0, NULL, NULL}, - {NM_ITEM, (STRPTR)"Clockwise", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"Fine", (STRPTR)"c", 0, 0L, (APTR)'c'}, - {NM_SUB, (STRPTR)"Fast", (STRPTR)"b", 0, 0L, (APTR)'b'}, - {NM_ITEM, (STRPTR)"Counter-clockwise", NULL, 0, NULL, NULL}, - {NM_SUB, (STRPTR)"Fine", (STRPTR)"x", 0, 0L, (APTR)'x'}, - {NM_SUB, (STRPTR)"Fast", (STRPTR)"v", 0, 0L, (APTR)'v'}, - {NM_END, NULL, NULL, 0, 0L, NULL} }; - - - /* Exit gracefully */ - static void AmigaCleanUp( void ) - { - if ( Vio ) - FreeMem( Vio, vio_allocsize ); - - ReleasePen( fts->ViewPort.ColorMap, gray_palette[0] ); - ReleasePen( fts->ViewPort.ColorMap, gray_palette[1] ); - - if ( graphx_mode == Graphics_Mode_Gray ) - { - ReleasePen( fts->ViewPort.ColorMap, gray_palette[2] ); - ReleasePen( fts->ViewPort.ColorMap, gray_palette[3] ); - ReleasePen( fts->ViewPort.ColorMap, gray_palette[4] ); - } - - if ( ftmenus ) - { - ClearMenuStrip( ftw ); - FreeMenus( ftmenus ); - } - - if ( ftw ) - CloseWindow( ftw ); - - if ( VisualInfo ) - FreeVisualInfo( VisualInfo ); - - if ( GfxBase ) - CloseLibrary( GfxBase ); - - if ( GadToolsBase ) - CloseLibrary( GadToolsBase ); - - if ( IntuitionBase ) - CloseLibrary( IntuitionBase ); - - } - - - /* open libraries & custom screen */ - static int AmigaInit( void ) - { - /* cleanup at exit */ - if ( atexit( AmigaCleanUp ) ) - { - PutStr( "atexit() failed\n" ); - return -1; - } - - /* open intuition library */ - IntuitionBase = (struct Library*)OpenLibrary( "intuition.library", 39L ); - if ( IntuitionBase == NULL ) - { - PutStr( "Could not open intuition library\n" ); - return -1; - } - - /* open gaadtools library */ - GadToolsBase = (struct Library*)OpenLibrary( "gadtools.library", 39L ); - if ( GadToolsBase == NULL ) - { - PutStr( "Could not open gadtools library\n" ); - return -1; - } - - /* open graphics library */ - GfxBase = OpenLibrary( "graphics.library", 39L ); - if ( GfxBase == NULL ) - { - PutStr( "Could not open graphics library\n" ); - return -1; - } - - /* get public screen */ - fts = LockPubScreen( NULL ); - - if ( fts == NULL ) - { - PutStr( "Could not lock public screen\n" ); - return -1; - } - - if ( ! ( VisualInfo = GetVisualInfo( fts, TAG_DONE ))) - { - PutStr( "Could not get VisualInfo\n" ); - return -1; - } - - if ( graphx_mode == Graphics_Mode_Gray ) - { - vio_ScanLineWidth = GRAY_WINDOW_WIDTH; - vio_Width = GRAY_WINDOW_WIDTH; - vio_Height = GRAY_WINDOW_HEIGHT; - - gray_palette[4] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0x00000000, 0x00000000, 0x00000000, NULL ); - gray_palette[3] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0x33333300, 0x33333300, 0x33333300, NULL ); - gray_palette[2] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0x77777700, 0x77777700, 0x77777700, NULL ); - gray_palette[1] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0xBBBBBB00, 0xBBBBBB00, 0xBBBBBB00, NULL ); - gray_palette[0] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0xFFFFFF00, 0xFFFFFF00, 0xFFFFFF00, NULL ); - } - else - { - vio_ScanLineWidth = MONO_WINDOW_WIDTH / 8; - vio_Width = MONO_WINDOW_WIDTH; - vio_Height = MONO_WINDOW_HEIGHT; - - gray_palette[0] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0xFFFFFF00, 0xFFFFFF00, 0xFFFFFF00, NULL ); - gray_palette[1] = ObtainBestPenA( fts->ViewPort.ColorMap, - 0x00000000, 0x00000000, 0x00000000, NULL ); - } - - if ( ! ( ftmenus = CreateMenus( ftNewMenu, GTMN_FrontPen, 0L, TAG_DONE))) - { - PutStr( "Could not create menus\n" ); - return -1; - } - - LayoutMenus( ftmenus, VisualInfo, GTMN_NewLookMenus, TRUE, TAG_DONE ); - - /* open intuition window */ - ftw = OpenWindowTags( - NULL, - WA_InnerWidth, vio_Width, - WA_InnerHeight, vio_Height, - WA_IDCMP, IDCMP_MENUPICK | IDCMP_VANILLAKEY | IDCMP_CLOSEWINDOW, - /* WA_AutoAdjust, TRUE, */ - WA_CloseGadget, TRUE, - WA_Activate, TRUE, - WA_DragBar, TRUE, - WA_SmartRefresh, TRUE, - WA_Gadgets, NULL, - WA_Flags, WFLG_DEPTHGADGET | WFLG_SMART_REFRESH, - WA_Title, (UBYTE*)"FreeType Project", - WA_NewLookMenus, TRUE, - WA_PubScreen, fts, - TAG_DONE ); - - if ( ftw == NULL ) - { - PutStr( "Could not open intuition window\n" ); - return -1; - } - - SetMenuStrip( ftw, ftmenus ); - - UnlockPubScreen( NULL, fts ); - - vio_Height = ftw->Height - ftw->BorderTop - ftw->BorderBottom - 2; - vio_Width = (ftw->Width - ftw->BorderLeft - ftw->BorderRight) & 0xFFFFFC; - - if ( graphx_mode == Graphics_Mode_Gray ) - { - vio_ScanLineWidth = vio_Width; - } else { - vio_ScanLineWidth = vio_Width / 8; - } - vio_allocsize = vio_Height * vio_ScanLineWidth; - - Vio = (char*)AllocMem( vio_allocsize, MEMF_ANY ); - if ( Vio == NULL ) - { - PutStr( "Could not allocate memory\n" ); - return -1; - } - - return 0; - } - - - /* get events in the window */ - static char Get_Intuition_Event( void ) - { - struct IntuiMessage* msg; - ULONG class; - USHORT code; - int rc; - struct MenuItem *n; - - - WaitPort( ftw->UserPort ); - - while ( ( msg = (struct IntuiMessage*)GetMsg( ftw->UserPort ) ) ) - { - class = msg->Class; - code = msg->Code; - - ReplyMsg( (struct Message*)msg ); - - switch( class ) - { - case IDCMP_REFRESHWINDOW: - GT_BeginRefresh( ftw ); - GT_EndRefresh( ftw, TRUE ); - break; - - case IDCMP_CLOSEWINDOW: - return (char)27; - - case IDCMP_VANILLAKEY: - return (char)code; - - case IDCMP_MENUPICK: - while( code != MENUNULL ) - { - n = ItemAddress( ftmenus, code ); - rc = (int)GTMENUITEM_USERDATA( n ); - code = n->NextSelect; - } /* despite loop, we only do one */ - return (char)rc; - } - } - - - return '\0'; - } - - - /* Set Amiga graphics mode */ - int Driver_Set_Graphics( int mode ) - { - graphx_mode = mode; - - if ( AmigaInit() == -1 ) - return 0; /* failure */ - - return 1; /* success */ - } - - - /* restore screen to its original state */ - int Driver_Restore_Mode( void ) - { - /* Do nothing */ - - return 1; /* success */ - } - - - /* display bitmap */ - int Driver_Display_Bitmap( char* buffer, int line, int col ) - { - int y, z; - char* target; - char old = 0; - extern char Header[]; - - SetWindowTitles(ftw,Header,Header); - - - target = Vio + ( line - 1 ) * vio_ScanLineWidth; - - for ( y = 0; y < line; y++ ) - { - CopyMem( buffer, target, col ); - target -= vio_ScanLineWidth; - buffer += col; - } - - /* clear window */ - /* SetRast( ftw->RPort, gray_palette[0] ); */ - - SetAPen( ftw->RPort, gray_palette[0] ); - - RectFill( ftw->RPort, ftw->BorderLeft, ftw->BorderTop, - ftw->Width - ftw->BorderRight - 1, - ftw->Height - ftw->BorderBottom - 1 ); - - if ( graphx_mode != Graphics_Mode_Gray ) - { - SetAPen( ftw->RPort, gray_palette[1] ); - old = 1; - } - - /* Draw glyph */ - for ( y = 0; y < line; y++ ) - { - for ( z = 0; z < col; z++ ) - { - int c = Vio[y * vio_ScanLineWidth + z]; - - if ( graphx_mode == Graphics_Mode_Gray ) - { - if ( c != 0 && c != gray_palette[0] ) - { - if ( old != c ) - { - old = c; - /* printf("x = %d, y = %d, color = %d\n", z, y, c ); */ - SetAPen( ftw->RPort, c ); - } - - WritePixel( ftw->RPort, ftw->BorderLeft + z, ftw->BorderTop + y ); - } - } - else - { - int mask = 0x80; - int counter = 0; - - while ( mask ) - { - if ( mask & c ) - WritePixel( ftw->RPort, ftw->BorderLeft + z * 8 + counter, - ftw->BorderTop + y ); - - counter++; - mask >>= 1; - } - } - } - } - - return 1; /* success */ - } - - - void Get_Event( TEvent* event ) - { - int i; - char c; - - - c = Get_Intuition_Event(); - - if ( c != '\0' ) - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - event->what = trans[i].event_class; - event->info = trans[i].event_info; - return; - } - } - - /* unrecognized keystroke */ - - event->what = event_Keyboard; - event->info = (int)c; - - return; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/amigaos/smakefile diff -u xc/extras/FreeType/test/arch/amigaos/smakefile:1.1.1.2 xc/extras/FreeType/test/arch/amigaos/smakefile:removed --- xc/extras/FreeType/test/arch/amigaos/smakefile:1.1.1.2 Sat Feb 12 23:56:22 2000 +++ xc/extras/FreeType/test/arch/amigaos/smakefile Wed Mar 16 20:59:49 2005 @@ -1,180 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for amiga using SAS/C -# and smake -# -# Use this file while in the 'test/arch/amigaos' directory with -# the following statements: -# -# smake assign -# smake -# -# the 'assign' step creates an assignment to simplify referencing -# the core library module, as smake has quite a few limitations in -# dealing with multi-directory projects. - -OBJB = ttapi.o ttcache.o ttcalc.o ttcmap.o ttdebug.o \ - ttextend.o ttfile.o ttgload.o ttinterp.o ttload.o \ - ttmemory.o ttmutex.o ttobjs.o ttraster.o - -OBJS = freetype.o - -OBJX = ftxgasp.o ftxkern.o ftxpost.o ftxcmap.o ftxwidth.o ftxerr18.o \ - ftxsbit.o ftxgsub.o ftxopen.o - -CORE = FT:lib/ -COREXT = $(CORE)extend/ -TST = FT:test/ - -OPTIMIZER = optimize optcomp=5 optdep=4 optinlocal optrdep=4 - -SCFLAGS = idlen=40 idir=$(CORE)arch/amigaos idir=$(CORE) - -TSCFLAGS = $(SCFLAGS) idir=$(TST) idir=$(COREXT) - -LIB=ttf.lib -TOPTS=$(TSCFLAGS) link lib=$(LIB) lib=lib:scm.lib \ - lib=lib:sc.lib lib=lib:amiga.lib - -EXE = ftzoom ftlint ftview fttimer ftmetric \ - ftdump ftstring ftstrpnm ftsbit ftstrtto - -TOBJ = gw_amiga.o gmain.o common.o blitter.o - -all: ttf.lib $(EXE) - -assign: - assign FT: /// - -ttf.lib: $(OBJS) $(OBJX) - oml $@ r $(OBJS) $(OBJX) - -ttfdbg.lib: $(OBJB) $(OBJX) - oml $@ r $(OBJB) $(OBJX) - -clean: - -delete \#?.o - -delete //\#?.o - -delete \#?.lib - -delete $(EXE) - - -# -# freetype library core single object -# -freetype.o: $(CORE)arch/amigaos/freetype.c - sc $(SCFLAGS) code=far $(OPTIMIZER) objname=$@ $< - -# -# freetype library core as separate objects -# -ttapi.o: $(CORE)ttapi.c - sc $(SCFLAGS) objname=$@ $< -ttcache.o: $(CORE)ttcache.c - sc $(SCFLAGS) objname=$@ $< -ttcalc.o: $(CORE)ttcalc.c - sc $(SCFLAGS) objname=$@ $< -ttcmap.o: $(CORE)ttcmap.c - sc $(SCFLAGS) objname=$@ $< -ttdebug.o: $(CORE)ttdebug.c - sc $(SCFLAGS) objname=$@ $< -ttextend.o: $(CORE)ttextend.c - sc $(SCFLAGS) objname=$@ $< -ttfile.o: $(CORE)ttfile.c - sc $(SCFLAGS) objname=$@ $< -ttgload.o: $(CORE)ttgload.c - sc $(SCFLAGS) objname=$@ $< -ttinterp.o: $(CORE)ttinterp.c - sc $(SCFLAGS) objname=$@ $< -ttload.o: $(CORE)ttload.c - sc $(SCFLAGS) objname=$@ $< -ttmemory.o: $(CORE)ttmemory.c - sc $(SCFLAGS) objname=$@ $< -ttmutex.o: $(CORE)ttmutex.c - sc $(SCFLAGS) objname=$@ $< -ttobjs.o: $(CORE)ttobjs.c - sc $(SCFLAGS) objname=$@ $< -ttraster.o: $(CORE)ttraster.c - sc $(SCFLAGS) objname=$@ $< - -# -# library extentions -# -ftxgasp.o: $(COREXT)ftxgasp.c - sc $(SCFLAGS) objname=$@ $< -ftxkern.o: $(COREXT)ftxkern.c - sc $(SCFLAGS) objname=$@ $< -ftxpost.o: $(COREXT)ftxpost.c - sc $(SCFLAGS) objname=$@ $< -ftxcmap.o: $(COREXT)ftxcmap.c - sc $(SCFLAGS) objname=$@ $< -ftxwidth.o: $(COREXT)ftxwidth.c - sc $(SCFLAGS) objname=$@ $< -ftxerr18.o: $(COREXT)ftxerr18.c - sc $(SCFLAGS) objname=$@ $< -ftxsbit.o: $(COREXT)ftxsbit.c - sc $(SCFLAGS) objname=$@ $< -ftxgsub.o: $(COREXT)ftxgsub.c - sc $(SCFLAGS) objname=$@ $< -ftxopen.o: $(COREXT)ftxopen.c - sc $(SCFLAGS) objname=$@ $< - -# -# Test programs -# -ftzoom: $(TST)ftzoom.c $(TOBJ) $(LIB) - sc $(TST)ftzoom.c programname=$@ $(TOBJ) $(TOPTS) - -ftlint: $(TST)ftlint.c common.o $(LIB) - sc $(TST)ftlint.c programname=$@ common.o $(TOPTS) - -ftdump: $(TST)ftdump.c common.o $(LIB) - sc $(TST)ftdump.c programname=$@ common.o $(TOPTS) - -# use unsigned char so full latin1 encoding may be used in string argument -ftstring: $(TST)ftstring.c $(TOBJ) display.o $(LIB) - sc $(TST)ftstring.c uchar programname=$@ $(TOBJ) display.o $(TOPTS) - -ftview: $(TST)ftview.c $(TOBJ) display.o $(LIB) - sc $(TST)ftview.c programname=$@ $(TOBJ) display.o $(TOPTS) - -fttimer: $(TST)fttimer.c $(TOBJ) $(LIB) - sc $(TST)fttimer.c programname=$@ $(TOBJ) $(TOPTS) - -ftstrpnm: $(TST)ftstrpnm.c common.o $(LIB) - sc $(TST)ftstrpnm.c uchar programname=$@ common.o $(TOPTS) - -ftsbit: $(TST)ftsbit.c common.o $(LIB) - sc $(TST)ftsbit.c programname=$@ common.o $(TOPTS) - -ftmetric: $(TST)ftmetric.c common.o $(LIB) - sc $(TST)ftmetric.c programname=$@ common.o $(TOPTS) - -# use unsigned char so full latin1/UTF8 encoding may be used in argument -ftstrtto: $(TST)ftstrtto.c $(TOBJ) display.o arabic.o $(LIB) - sc $(TST)ftstrtto.c uchar programname=$@ $(TOBJ) \ - arabic.o display.o $(TOPTS) - -# -# Test program support modules -# - -gw_amiga.o: gw_amiga.c - sc gw_amiga.c $(TSCFLAGS) - -common.o: $(TST)common.c - sc $(TSCFLAGS) objname=$@ $< - -blitter.o: $(TST)blitter.c - sc $(TSCFLAGS) objname=$@ $< - -display.o: $(TST)display.c - sc $(TSCFLAGS) objname=$@ $< - -gmain.o: $(TST)gmain.c - sc $(TSCFLAGS) objname=$@ $< - -arabic.o: $(TST)arabic.c - sc $(TSCFLAGS) objname=$@ $< - -# end of smakefile Index: xc/extras/FreeType/test/arch/debugger/Makefile diff -u xc/extras/FreeType/test/arch/debugger/Makefile:1.1.1.1 xc/extras/FreeType/test/arch/debugger/Makefile:removed --- xc/extras/FreeType/test/arch/debugger/Makefile:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/debugger/Makefile Wed Mar 16 20:59:49 2005 @@ -1,99 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the debugger for emx-gcc under OS/2 resp. under Unix. -# -# You will need GNU make. -# -# Use this file while in the `test' directory with the following statement: -# -# make -f arch/debugger/Makefile - -ARCH = arch/debugger -FT_MAKEFILE = $(ARCH)/Makefile - -CC = gcc - -LIBDIR = ../lib -LIBTTF = $(LIBDIR)/$(ARCH)/libttf.a - -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/extend -I$(LIBDIR)/$(ARCH) -I. - -# Note: The debugger uses non-ANSI functions to read the keyboard -# on OS/2 -- do not set the `-ansi flag here. -# -CFLAGS = -Wall -O0 -g $(INCDIRS) - - -SRC = fdebug.c common.c - -ALLSRC = $(SRC) -ALLOBJ = $(ALLSRC:.c=.o) - -# on OS/2, do not use the curses library -# -ifdef OS2_SHELL -EXE := fdebug.exe -OS := OS2 -EFENCE := -EXTRAFLAGS := -RM := del -else -EXE := fdebug -OS := UNIX -EFENCE := -lefence -RM := rm -f -# -# POSIX TERMIOS: Do not define if you use OLD U*ix like 4.2BSD. -# -EXTRAFLAGS := HAVE_POSIX_TERMIOS -endif - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< -D$(OS) -D$(EXTRAFLAGS) - -%.exe: - $(CC) $(CFLAGS) -o $@ $^ - - - -EXEFILES = $(EXE) - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -$(EXE): fdebug.o common.o $(LIBTTF) -$(EXE): - $(CC) $(CFLAGS) -o $@ $^ $(EFENCE) - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -$(RM) dep.end $(EXEFILES) core - -do_clean: - -$(RM) $(subst /,\,$(ALLOBJ)) - - -depend: $(ALLSRC) - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.emx Index: xc/extras/FreeType/test/arch/msdos/Makefile.BC diff -u xc/extras/FreeType/test/arch/msdos/Makefile.BC:1.1.1.1 xc/extras/FreeType/test/arch/msdos/Makefile.BC:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.BC:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.BC Wed Mar 16 20:59:49 2005 @@ -1,181 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for BC++ under MSDOS, large model. -# -# Tested with Borland C++ v.3.1, 4.02, 5.0 -# You will need Borland MAKE (v.3.6 and above should be OK, for oldest -# versions refer to the instructions below). -# -# -# Use this file while in the 'test' directory with the following statement: -# -# make -farch\msdos\Makefile.BC -# -# -# Debug versions can be obtained with -# -# make -DDEBUG -farch\msdos\Makefile.BC -# -# A special version enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# make -DBIGFONTS -farch\msdos\Makefile.BC - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.BC - -CC = bcc - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend -SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -w-pia - -# Credits go to Dave Hoo for pointing out that modern -# Borland compilers (from BC++ 3.1 on) can increase the limit of -# the length of identifiers. -!if ! $d(DEBUG) -CFLAGS = -ml -A -O2 -3 -i40 $(INCDIRS) $(SPURIOUS_WARNINGS) -LDFLAGS = -ml -!else -CFLAGS = -v -N -ml -A -i40 $(INCDIRS) $(SPURIOUS_WARNINGS) -LDFLAGS = -v -ml -!endif - - -# full-screen MSDOS driver -GDRIVER = $(ARCH)\.\gfs_dos.c - -DISPLAY = display.c - -G1SRC = gmain.c blitter.c $(GDRIVER) -GSRC = $(DISPLAY) $(G1SRC) - -GOBJ = $(GSRC:.c=.obj) -G1OBJ = $(G1SRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - $(CC) -c -o$* @&&| - $(CFLAGS) $< -| - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!if !$d(DEBUG) -# Skipped if DEBUG build -all: freetype $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -!if $d(BIGFONTS) -MAKEBIG = -DBIGFONTS -!endif - -freetype: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) $(MAKEBIG) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG $(MAKEBIG) debug - cd ..\test - - -# Borland C compilers are unable to include in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| - -.obj.exe: - $(CC) -e$* @&&| - $(LDFLAGS) $** -| - -# Borland versions of make are unable to use the $** variable inside -# implicit rules (like .obj.exe:). The job has to be done by hand. :-( -ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj arabic.obj \ - $(LIBDIR)\libttf.lib - -fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib - -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib - -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftsbit.obj common.obj $(LIBDIR)\libttf.lib - -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftmetric.obj common.obj $(LIBDIR)\libttf.lib - -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - del time.h # clean the ugly hack for Turbo C... - -!include "$(ARCH)\depend.dos" - -# end of Makefile Index: xc/extras/FreeType/test/arch/msdos/Makefile.MS diff -u xc/extras/FreeType/test/arch/msdos/Makefile.MS:1.1.1.1 xc/extras/FreeType/test/arch/msdos/Makefile.MS:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.MS:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.MS Wed Mar 16 20:59:49 2005 @@ -1,142 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Microsoft C for MS-DOS, -# large model. It also works for Visual C++ 1.x 16-bits compiler, but -# you should instead use the Makefile customized for it, Makefile.VC. -# -# You will need NMAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake /f arch\msdos\Makefile.MS -# -# -# Debug versions can be obtained with -# -# nmake DEBUG=1 /f arch\msdos\Makefile.MS -# -# A special version enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# nmake BIGFONTS=1 /f arch\msdos\Makefile.MS - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.MS -FT_MAKE = $(MAKE) /nologo - -CC = cl /nologo - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend - -!ifndef DEBUG -CFLAGS = /Ox /AL /Za /W2 /G2 $(INCDIRS) -LDFLAGS = /AL -!else -CFLAGS = /Zi /AL /Za /W2 /G2 $(INCDIRS) -LDFLAGS = /Zi /AL -!endif - - -# full-screen MSDOS driver -GDRIVER = $(ARCH)\gfs_dos.c - -GSRC = display.c gmain.c blitter.c $(GDRIVER) - -GOBJ = $(GSRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - @$(CC) /c /Fo$* @<< - $(CFLAGS) $< -<< - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skiped if DEBUG build -all: freetype $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -!ifdef BIGFONTS -MAKEBIG = BIGFONTS=1 -!endif - -freetype: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) $(MAKEBIG) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 $(MAKEBIG) debug - cd ..\test - -.obj.exe: - $(CC) /Fe$* @<< - $(LDFLAGS) $** -<< - -ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib -fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - - -!include "$(ARCH)\depend.dos" - -# end of Makefile.MS Index: xc/extras/FreeType/test/arch/msdos/Makefile.TC diff -u xc/extras/FreeType/test/arch/msdos/Makefile.TC:1.1.1.1 xc/extras/FreeType/test/arch/msdos/Makefile.TC:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.TC:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.TC Wed Mar 16 20:59:49 2005 @@ -1,196 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Turbo C under MSDOS, large model. -# -# You will need Borland MAKE. -# Tested with Turbo C v.1.5, v.2.0, Turbo C++ v.1.0 -# Turbo C v.1.0 (May '87) is too old (lack of structure assignment) -# to compile FreeType. Update your compiler. ;-) -# -# -# Use this file while in the 'test' directory with the following statement: -# -# make -farch\msdos\Makefile.TC -# -# -# Debug versions can be obtained (except for TC 1.5) with -# -# make -DDEBUG -farch\msdos\Makefile.TC - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.TC - -CC = tcc - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend - -!if ! $d(DEBUG) -CFLAGS = -ml -A -O -Z -G -a -w-stv -w-sig $(INCDIRS) -LDFLAGS = -ml -!else -# For Turbo C v.1.5, replace the -v option below by -y. -CFLAGS = -v -N -ml -A -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig $(INCDIRS) -LDFLAGS = -v -ml -!endif - - -# full-screen MSDOS driver -GDRIVER = $(ARCH)\.\gfs_dos.obj - -# the line below does not work with these old versions of make... -# GOBJ = $(GSRC:.c=.o) - -DISPLAY = display.obj - -G1OBJ = gmain.obj blitter.obj $(GDRIVER) -GOBJ = $(DISPLAY) $(G1OBJ) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = arabic.obj \ - common.obj \ - ftdump.obj \ - fterror.obj \ - ftlint.obj \ - ftmetric.obj \ - ftsbit.obj \ - ftstring.obj \ - ftstrpnm.obj \ - ftstrtto.obj \ - fttimer.obj \ - ftview.obj \ - ftzoom.obj - - -.c.obj: - $(CC) $(CFLAGS) -c -o$* $< - - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - - -!if !$d(DEBUG) -# Skipped if DEBUG build -all: freetype $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -freetype: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG debug - cd ..\test - - -# Borland C compilers are unable to include in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER): - $(CC) $(CFLAGS) -A- -c -o$* $*.c - -!if $(__MAKE__) < 0x0300 -# Also, Turbo C v.1.5 and v.2.0 are not fully ANSI compliant with regard to -# , particularly the clock() function. -# So we use an ugly hack here: a modified version of time.h, with the -# necessary machinery, is included in the arch\msdos directory. -time.h: $(ARCH)\time_tc.h - copy $(ARCH)\time_tc.h time.h - -# Below is the special rule for forcing recompilation of fttimer.obj -# using our , without using the rule that is pulled in by -# !include "$(ARCH)\depend.dos" at the end of the Makefile... -fttimer.exe: $(G1OBJ) fttimer.c time.h common.obj $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) -c -o$* $*.c - $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -!else -# Normal behaviour -fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib -!endif - - -# This old gr... make is unable to have a $ variable to name all the -# dependencies. :-( So the job have to be done by hand... -ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj \ - arabic.obj $(LIBDIR)\libttf.lib - -# fttimer.exe is handled above (because of hack) - -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib - -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib - -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftsbit.obj common.obj $(LIBDIR)\libttf.lib - -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftmetric.obj common.obj $(LIBDIR)\libttf.lib - -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - del time.h # clean the ugly hack for Turbo C... - -!include "$(ARCH)\depend.dos" - -# end of Makefile Index: xc/extras/FreeType/test/arch/msdos/Makefile.VC diff -u xc/extras/FreeType/test/arch/msdos/Makefile.VC:1.1.1.1 xc/extras/FreeType/test/arch/msdos/Makefile.VC:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.VC:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.VC Wed Mar 16 20:59:49 2005 @@ -1,143 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Microsoft Visual C++ 1.x -# and Microsoft C/C++ v.7.0 16-bit compilers for MS-DOS, large model. -# -# You will need NMAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake /f arch\msdos\Makefile.VC -# -# -# Debug versions can be obtained with -# -# nmake DEBUG=1 /f arch\msdos\Makefile.VC -# -# A special version enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# nmake BIGFONTS=1 /f arch\msdos\Makefile.VC - -ARCH = arch\msdos -FT_MAKEFILE = $(ARCH)\Makefile.VC -FT_MAKE = $(MAKE) /nologo - -CC = cl /nologo - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend - -# One can also consider using "set MSC_CMD_FLAGS=/Gr /Op- /Gy /YX". -# With Microsoft C/C++ 7.0, use /G2 instead of /G3. -!ifndef DEBUG -CFLAGS = /Ox /AL /Za /W2 /G3 $(INCDIRS) -LDFLAGS = /AL -!else -CFLAGS = /Zi /Ge /AL /Za /W2 /G3 $(INCDIRS) -LDFLAGS = /Zi /AL -!endif - - -# full-screen MSDOS driver -GDRIVER = $(ARCH)\gfs_dos.c - -GSRC = display.c gmain.c blitter.c $(GDRIVER) - -GOBJ = $(GSRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - @$(CC) /c /Fo$* @<< - $(CFLAGS) $< -<< - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skiped if DEBUG build -all: freetype $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -!ifdef BIGFONTS -MAKEBIG = BIGFONTS=1 -!endif - -freetype: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) $(MAKEBIG) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 $(MAKEBIG) debug - cd ..\test - -.obj.exe: - $(CC) /Fe$* @<< - $(LDFLAGS) $** -<< - -ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib -fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - - -!include "$(ARCH)\depend.dos" - -# end of Makefile.VC Index: xc/extras/FreeType/test/arch/msdos/Makefile.dm diff -u xc/extras/FreeType/test/arch/msdos/Makefile.dm:1.1.1.2 xc/extras/FreeType/test/arch/msdos/Makefile.dm:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.dm:1.1.1.2 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.dm Wed Mar 16 20:59:49 2005 @@ -1,145 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc and djgpp under MSDOS. -# -# You will need dmake. -# -# Use this file while in the 'test' directory with the following statement: -# -# dmake -r -f arch/msdos/Makefile.dm - -ARCH = arch/msdos -FT_MAKEFILE = $(ARCH)/Makefile.dm -FT_MAKE = dmake -r - -.IMPORT: COMSPEC -SHELL := $(COMSPEC) -SHELLFLAGS := /c -GROUPSHELL := $(SHELL) -GROUPFLAGS := $(SHELLFLAGS) -GROUPSUFFIX := .bat -SHELLMETAS := *"?<>&| - -CC = gcc - -LIBDIR = ../lib -LIBDIR_DOS = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -CFLAGS = -Wall -ansi -O2 -g $(INCDIRS) -# CFLAGS = -ansi -Wall -O2 -s $(INCDIRS) - -# full-screen MSDOS driver -GDRIVER = $(ARCH)/gfs_dos.c - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -GSRC = gmain.c display.c blitter.c $(GDRIVER) -GOBJ = $(GSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -%.exe: - $(CC) $(CFLAGS) -o $@ @$(mktmp $(&:t"\n")\n) - - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean do_distclean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -freetype: -[ - cd $(LIBDIR_DOS) - $(FT_MAKE) -f $(FT_MAKEFILE) all - cd $(MAKEDIR) -] - -freetype_debug: -[ - cd $(LIBDIR_DOS) - $(FT_MAKE) -f $(FT_MAKEFILE) debug - cd $(MAKEDIR) -] - -ftzoom.exe: $(GOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean -[ - cd $(LIBDIR_DOS) - $(FT_MAKE) -f $(FT_MAKEFILE) clean - cd $(MAKEDIR) -] - -distclean: do_clean do_distclean -[ - cd $(LIBDIR_DOS) - $(FT_MAKE) -f $(FT_MAKEFILE) distclean - cd $(MAKEDIR) -] - -do_distclean: --[ - del dep.end - del *.exe - del core -] - -do_clean: --[ - del *.o - del $(ARCH)\gfs_dos.o -] - -#depend: $(SRC) $(GSRC) -#[ -# cd $(LIBDIR_DOS) -# $(FT_MAKE) -f $(FT_MAKEFILE) depend -# cd $(MAKEDIR) -# $(CC) -E -M $(INCDIRS) @$(mktmp $(<:t"\n")\n) > dep.end -#] -# -#ifeq (dep.end,$(wildcard dep.end)) -# include dep.end -#endif - -# end of Makefile.dm Index: xc/extras/FreeType/test/arch/msdos/Makefile.gcc diff -u xc/extras/FreeType/test/arch/msdos/Makefile.gcc:1.1.1.3 xc/extras/FreeType/test/arch/msdos/Makefile.gcc:removed --- xc/extras/FreeType/test/arch/msdos/Makefile.gcc:1.1.1.3 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/Makefile.gcc Wed Mar 16 20:59:49 2005 @@ -1,130 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc and djgpp under MSDOS. -# -# You will need a recent GNU make DOS port. -# -# Use this file while in the 'test' directory with the following statement: -# -# make -f arch/msdos/Makefile.gcc -# -# -# If you have the GNU gettext package installed with DJGPP, you can also try -# -# make -f arch/msdos/Makefile.gcc HAVE_GETTEXT - -ARCH = arch/msdos -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -CC = gcc - -LIBDIR = ../lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -ifndef GETTEXT -GETTEXT=NO_GETTEXT -endif - -CFLAGS = -Wall -ansi -O2 -g $(INCDIRS) -D$(GETTEXT) -# CFLAGS = -ansi -Wall -O2 -s $(INCDIRS) -D$(GETTEXT) - - -# full-screen MSDOS driver -GDRIVER = $(ARCH)/gfs_dos.c - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -GSRC = gmain.c display.c blitter.c $(GDRIVER) -GOBJ = $(GSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - - -ifeq ($(GETTEXT),HAVE_GETTEXT) -%.exe: - $(CC) $(CFLAGS) -o $@ $^ -lintl -else -%.exe: - $(CC) $(CFLAGS) -o $@ $^ -endif - - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -HAVE_GETTEXT: - $(MAKE) -f $(FT_MAKEFILE) GETTEXT=HAVE_GETTEXT all - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - -ftzoom.exe: $(GOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -fterror.exe: fterror.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -del dep.end - -del *.exe - -del core - -do_clean: - -del *.o - -del response - -del $(ARCH)\gfs_dos.o - -depend: $(SRC) $(GSRC) - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/test/arch/msdos/depend.dos diff -u xc/extras/FreeType/test/arch/msdos/depend.dos:1.1.1.1 xc/extras/FreeType/test/arch/msdos/depend.dos:removed --- xc/extras/FreeType/test/arch/msdos/depend.dos:1.1.1.1 Sat Feb 12 23:56:23 2000 +++ xc/extras/FreeType/test/arch/msdos/depend.dos Wed Mar 16 20:59:49 2005 @@ -1,50 +0,0 @@ -# This dependency file to be used with various MS-DOS compilers -# has been generated automatically with the script `makedep' on -# 03-Sep-1999. - -arabic.obj: arabic.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h -blitter.obj: blitter.c blitter.h -common.obj: common.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -display.obj: display.c display.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gmain.h -fdebug.obj: fdebug.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\tttypes.h ..\lib\ttconfig.h \ - ..\lib\arch\msdos\ft_conf.h ..\lib\ttdebug.h ..\lib\ttobjs.h \ - ..\lib\ttengine.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -ftdump.obj: ftdump.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxcmap.h ..\lib\extend\ftxopen.h \ - ..\lib\extend\ftxgdef.h ..\lib\extend\ftxgsub.h \ - ..\lib\extend\ftxgpos.h ..\lib\extend\ftxsbit.h ..\lib\ttobjs.h \ - ..\lib\ttconfig.h ..\lib\arch\msdos\ft_conf.h ..\lib\ttengine.h \ - ..\lib\tttypes.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -fterror.obj: fterror.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxerr18.h \ - ..\lib\arch\msdos\ft_conf.h -ftlint.obj: ftlint.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\arch\msdos\ft_conf.h -ftmetric.obj: ftmetric.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\msdos\ft_conf.h -ftsbit.obj: ftsbit.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\msdos\ft_conf.h -ftstring.obj: ftstring.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h display.h gevents.h gdriver.h gmain.h -ftstrpnm.obj: ftstrpnm.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -ftstrtto.obj: ftstrtto.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h blitter.h common.h \ - display.h ..\lib\extend\ftxkern.h ..\lib\extend\ftxsbit.h gdriver.h \ - gevents.h gmain.h -fttimer.obj: fttimer.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gdriver.h gevents.h gmain.h -ftview.obj: ftview.c blitter.h common.h display.h \ - ..\lib\extend\ftxsbit.h gdriver.h gevents.h gmain.h -ftzoom.obj: ftzoom.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxpost.h gdriver.h gevents.h gmain.h -gmain.obj: gmain.c gdriver.h gmain.h -arch\msdos\gfs_dos.obj: arch\msdos\gfs_dos.c gdriver.h gevents.h gmain.h Index: xc/extras/FreeType/test/arch/msdos/gfs_dos.c diff -u xc/extras/FreeType/test/arch/msdos/gfs_dos.c:1.1.1.3 xc/extras/FreeType/test/arch/msdos/gfs_dos.c:removed --- xc/extras/FreeType/test/arch/msdos/gfs_dos.c:1.1.1.3 Sat Feb 12 23:56:24 2000 +++ xc/extras/FreeType/test/arch/msdos/gfs_dos.c Wed Mar 16 20:59:50 2005 @@ -1,357 +0,0 @@ -/******************************************************************* - * - * gfs_dos.c graphics utility fullscreen Dos driver. 1.0 - * - * This is the driver for fullscreen Dos display, used by the - * graphics utility of the FreeType test suite. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#if defined( __STDC__ ) || defined( __TURBOC__ ) -#include -#else -#include -#endif - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -/* The following #ifdef are used to define the following macros : */ -/* */ -/* - int86 : function to call an interrupt */ -/* - reg_ax : the 'ax' register as stored in the REGS struct */ -/* */ - -/* ---- DJGPP dos compiler support --------------------------------------- */ - -/* DJGPP v1.x */ -#if !defined( __DJGPP__ ) && defined( __GO32__ ) - -#define DJGPP1 -#undef __STRICT_ANSI__ -#include -#include -#include -#include - -#define reg_ax regs.x.ax - -#endif - -/* DJGPP v2.x */ -#ifdef __DJGPP__ - -#define DJGPP2 -#undef __STRICT_ANSI__ -#include -#include -#include -#define int86( a, b, c ) int86( a, b, c ) -#define reg_ax regs.x.ax - -#endif - -/* ---- Microsoft C compilers support ------------------------------------ */ - -#if defined( M_I86 ) || defined( _M_I86 ) - -#include -#include - -#define reg_ax regs.x.ax - -#ifdef _M_I86 /* a recent compiler, which do not pollute name spaces */ -#define getch() _getch() -#define REGS _REGS -#define int86( a, b, c ) _int86( a, b, c ) -#endif - -#ifndef MK_FP -#ifdef _MK_FP -#define MK_FP( seg, ofs ) _MK_FP( seg, ofs ) -#else -#ifndef _M_I86 /* old versions */ -#define __far _far -#endif -#define MK_FP( seg, offset ) (void __far *)( ((unsigned long)seg << 16) + \ - (unsigned long)(unsigned)offset ) -#endif /* _MK_FP */ -#endif /* MK_FP */ - -#endif /* Microsoft compilers */ - -/* ---- Borland C compiler support --------------------------------------- */ - -#ifdef __TURBOC__ -#ifdef __STDC__ -#error "MK_FP is incompatible with ANSI mode. Use the `-A-' switch." -#endif - -#include /* Includes the declaration of int86 */ -#include /* for getch */ - -#define reg_ax regs.x.ax -#define int86( a, b, c ) int86( a, b, c ) - -#endif - -/* ---- Phar Lap 286|DOS extender support -------------------------------- */ - -#ifdef DOSX286 -/* The symbol DOSX286 must be specified on the command line. */ - -#include -#endif - -/* ---- EMX/Dos compiler support ----------------------------------------- */ - -#ifdef __EMX__ - -#include -#include -#include /* for getch */ - extern _read_kbd(); /* to avoid an ANSI warning during compilation */ - -#define int86 _int86 -#define reg_ax regs.x.ax - -#endif - -/* ---- WATCOM Dos/16 & Dos/32 support ----------------------------------- */ - -#ifdef __WATCOMC__ - -#include - -#define reg_ax regs.w.ax - -#ifdef __386__ -#define int86 int386 -#endif - -#endif - - -#if !defined( reg_ax ) || !defined( int86 ) -#error "Your compiler is not (yet) supported. Check the source file!" -#endif - - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - - /* Set Graphics Mode */ - - int Driver_Set_Graphics( int mode ) - { - union REGS regs; - - - switch ( mode ) - { - case Graphics_Mode_Mono: /* Standard VGA 640x480x16 mode */ - reg_ax = 0x12; - int86( 0x10, ®s, ®s ); - - vio_ScanLineWidth = 80; - vio_Width = 640; - vio_Height = 480; - break; - - case Graphics_Mode_Gray: /* Standard VGA 320x200x256 mode */ - reg_ax = 0x13; - int86( 0x10, ®s, ®s ); - - vio_ScanLineWidth = 320; - vio_Width = 320; - vio_Height = 200; - - /* default gray_palette takes the gray levels of the standard VGA */ - /* 256 colors mode */ - - gray_palette[0] = 0; - gray_palette[1] = 23; - gray_palette[2] = 27; - gray_palette[3] = 29; - gray_palette[4] = 31; - break; - - default: - return 0; /* failure */ - } - -#if defined( __EMX__ ) - Vio = _memaccess( 0xA0000, 0xAFFFF, 1 ); -#elif defined( DJGPP1 ) || defined( DJGPP2 ) - Vio = (char *)0xA0000; -#elif defined( __WATCOMC__ ) && defined( __386__ ) - Vio = (char *)0xA0000; -#elif defined( DOSX286 ) - { - unsigned short sel; - - - if ( DosMapRealSeg( 0xA000, (long)vio_ScanLineWidth*vio_Height, &sel ) ) - return 0; /* failure */ - - Vio = (char*)MK_FP( sel, 0 ); - } -#else - Vio = (char*)MK_FP( 0xA000, 0 ); -#endif - - return 1; /* success */ - } - - - /* Revert to text mode */ - - int Driver_Restore_Mode() - { - union REGS regs; - - - reg_ax = 0x3; - int86( 0x10, ®s, ®s ); - -#ifdef DOSX286 - -#ifndef FP_SEG -#define FP_SEG(fp) (*((unsigned __far *)&(fp) + 1)) -#endif - - DosFreeSeg( FP_SEG( Vio ) ); -#endif - - return 1; /* success */ - } - - - int Driver_Display_Bitmap( char* buffer, int line, int col ) - { - int y, used_col; - char* target; - - -#ifdef DJGPP2 - char cbuf = 0; - int i; - for( i = 0; i < vio_Height*vio_ScanLineWidth; i++ ) - dosmemput( &cbuf, 1, (unsigned long) Vio+i ); -#else - -#ifdef DJGPP1 - __djgpp_nearptr_enable(); - Vio += __djgpp_conventional_base; - -#else - - memset( Vio, 0, vio_Height * vio_ScanLineWidth ); - -#endif /* DJGPP1 */ - -#endif /* DJGPP2 */ - - if ( line > vio_Height ) - line = vio_Height; - if ( col > vio_ScanLineWidth ) - used_col = vio_ScanLineWidth; - else - used_col = col; - - target = Vio + ( line - 1 ) * vio_ScanLineWidth; - - for ( y = 0; y < line; y++ ) - { -#ifdef DJGPP2 - dosmemput( buffer, used_col, (unsigned long)target ); -#else - memcpy( target, buffer, used_col ); -#endif - target -= vio_ScanLineWidth; - buffer += col; - } - -#ifdef DJGPP1 - __djgpp_nearptr_disable(); - Vio -= __djgpp_conventional_base; -#endif - - return 1; /* success */ - } - - - void Get_Event( TEvent* event ) - { - int i; - char c; - - - c = getch(); - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - event->what = trans[i].event_class; - event->info = trans[i].event_info; - return; - } - } - - /* unrecognized keystroke */ - - event->what = event_Keyboard; - event->info = (int)c; - return; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/msdos/makedep diff -u xc/extras/FreeType/test/arch/msdos/makedep:1.1.1.1 xc/extras/FreeType/test/arch/msdos/makedep:removed --- xc/extras/FreeType/test/arch/msdos/makedep:1.1.1.1 Sat Feb 12 23:56:24 2000 +++ xc/extras/FreeType/test/arch/msdos/makedep Wed Mar 16 20:59:50 2005 @@ -1,22 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for older compilers -# on the MS-DOS platform. - -echo "\ -# This dependency file to be used with various MS-DOS compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.dos - -(cd ../.. - gcc -MM -I../lib/arch/msdos -I../lib -I../lib/extend -I. *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.dos - -(cd ../.. - gcc -MM -I../lib/arch/win16 -I../lib -I../lib/extend -I. \ - -Dreg_ax -Dint86 arch/msdos/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\msdos\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.dos - -# eof Index: xc/extras/FreeType/test/arch/msdos/time_tc.h diff -u xc/extras/FreeType/test/arch/msdos/time_tc.h:1.1.1.1 xc/extras/FreeType/test/arch/msdos/time_tc.h:removed --- xc/extras/FreeType/test/arch/msdos/time_tc.h:1.1.1.1 Sat Feb 12 23:56:24 2000 +++ xc/extras/FreeType/test/arch/msdos/time_tc.h Wed Mar 16 20:59:50 2005 @@ -1,124 +0,0 @@ -/******************************************************************* - * - * time.h Replacement for buggy of old Turbo C compilers - * - * This file is a hack! It replaces when compiling with - * old versions of Borland Turbo C compilers that lack clock(), - * and provide its own version. - * - * Written by Antoine Leca - * Copyright 1999 Antoine Leca, David Turner, Robert Wilhelm - * and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#if !defined __TURBOC__ || !defined __MSDOS__ || __TURBOC__>0x200 -/* - * We are not running on a Borland compiler, or either on - * a recent version that does not need the hack. - * Certainly the user does not clean up the directory. - * Stop the compilation. - */ -#error Remove the file time.h in directory test - -#endif - -#ifndef _TIME_H_DEFINED -#define _TIME_H_DEFINED - -#if defined _TM_DEFINED || defined _TIME_T -#error Another version of seems to have been already included -#endif - -#ifndef __TIME_T -#define __TIME_T -typedef long time_t; -#endif - -#ifndef __CLOCK_T -#define __CLOCK_T -typedef long clock_t; -#define CLK_TCK 18.2 -#endif - -#define CLOCKS_PER_SEC CLK_TCK - -struct tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; - - -clock_t clock (void); -double difftime(time_t time2, time_t time1); -time_t time (time_t *timer); - -char *asctime (const struct tm *tblock); -char *ctime (const time_t *time); -struct tm *gmtime (const time_t *timer); -struct tm *localtime(const time_t *timer); - - -#if __TURBOC__ <= 0x0150 - -/******************************************************************* - * - * Function : clock - * - * Description : Turbo C v.1.x lacks the clock() function that is - * needed for at least fttimer. - * So this is a replacement that does more or less - * the functionnality of clock(), using the BIOS. - * Since we do not know exactly when the process - * started (as clock() is supposed to do), we cheat - * a little here. - * - * Input : None - * - * Output : None - * - * Notes : Use two static objects. - * NEED_CLOCK_HERE is a macro that should be defined - * in only ONE module (otherwise, the linker will complain). - * - ******************************************************************/ - -extern long biostime(int cmd, long newtime); - -static long CountOfTicks; -static long DateOfReference = 0; - -clock_t clock (void) -{ - - if (DateOfReference == 0) /* this is the first call */ - { - DateOfReference = time(NULL) / 86400L; - CountOfTicks = biostime(0,0L) - CLOCKS_PER_SEC; - /* pretend we start one second ago */ - return CLOCKS_PER_SEC; /* to avoid returning 0 */ - } - - return (time(NULL) / 86400L - DateOfReference) * 0x1800B0L - + biostime(0,0L) - CountOfTicks; -} - -#endif /* Turbo C v.1.x */ - -#endif /* defined __TIME_H_DEFINED */ - - -/* End */ Index: xc/extras/FreeType/test/arch/os2/Makefile.dm diff -u xc/extras/FreeType/test/arch/os2/Makefile.dm:1.1.1.2 xc/extras/FreeType/test/arch/os2/Makefile.dm:removed --- xc/extras/FreeType/test/arch/os2/Makefile.dm:1.1.1.2 Sat Feb 12 23:56:24 2000 +++ xc/extras/FreeType/test/arch/os2/Makefile.dm Wed Mar 16 20:59:50 2005 @@ -1,143 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc under OS/2 -# -# You will need dmake. -# -# Use this file while in the 'test' directory with the following statement: -# -# dmake -r -f arch/os2/Makefile.dm - -ARCH = arch/os2 -FT_MAKEFILE = $(ARCH)/Makefile.dm -FT_MAKE = dmake -r - -.IMPORT: COMSPEC -SHELL := $(COMSPEC) -SHELLFLAGS := /c -GROUPSHELL := $(SHELL) -GROUPFLAGS := $(SHELLFLAGS) -GROUPSUFFIX := .cmd -SHELLMETAS := *"?<>&| - -CC = gcc - -LIBDIR = ../lib -LIBDIR_OS2 = $(subst,/,\ $(LIBDIR)) -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -# CFLAGS = -Wall -ansi -O2 -g $(INCDIRS) -CFLAGS = -ansi -Wall -O2 -s -Zcrtdll $(INCDIRS) - -# full-screen MSDOS driver -GFSDRIVER = $(ARCH)/gfs_os2.c -GPMDRIVER = $(ARCH)/gpm_os2.c -GPM_DEF = $(ARCH)/gpm_os2.def - -DISPLAY = display.c - -SRC = ftlint.c fttimer.c ftview.c ftzoom.c ftdump.c ftstring.c ftstrpnm.c \ - ftsbit.c common.c blitter.c ftmetric.c ftstrtto.c arabic.c - -GSRC = gmain.c display.c blitter.c -GFSSRC = $(GSRC) $(GFSDRIVER) -GPMSRC = $(GSRC) $(GPMDRIVER) - -GFSOBJ = $(GFSSRC:.c=.o) -GPMOBJ = $(GPMSRC:.c=.o) - -ALLSRC = $(SRC) $(GSRC) $(GFSDRIVER) $(GPMDRIVER) -ALLOBJ = $(ALLSRC:.c=.o) - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -%.exe: - $(CC) $(CFLAGS) -o $@ @$(mktmp $(&:t"\n")\n) - - -EXEFILES = ftview.exe ftviewfs.exe \ - ftlint.exe \ - fttimer.exe fttimefs.exe \ - ftdump.exe \ - ftstring.exe ftstrfs.exe \ - ftzoom.exe ftzoomfs.exe \ - ftstrpnm.exe \ - ftsbit.exe \ - ftmetric.exe \ - ftstrtto.exe ftstrtfs.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean do_distclean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - - -freetype: -[ - cd $(LIBDIR_OS2) - $(FT_MAKE) -f $(FT_MAKEFILE) all - cd $(MAKEDIR) -] - -freetype_debug: -[ - cd $(LIBDIR_OS2) - $(FT_MAKE) -f $(FT_MAKEFILE) debug - cd $(MAKEDIR) -] - -ftzoom.exe: $(GPMOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftzoomfs.exe: $(GFSOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GPMOBJ) ftview.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftviewfs.exe: $(GFSOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GPMOBJ) ftstring.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftstrfs.exe: $(GFSOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GPMOBJ) fttimer.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -fttimefs.exe: $(GFSOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GPMOBJ) ftstrtto.o common.o arabic.o \ - $(LIBDIR)/libttf.a $(GPM_DEF) -ftstrtfs.exe: $(GFSOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean -[ - cd $(LIBDIR_OS2) - $(FT_MAKE) -f $(FT_MAKEFILE) clean - cd $(MAKEDIR) -] - -distclean: do_clean do_distclean -[ - cd $(LIBDIR_OS2) - $(FT_MAKE) -f $(FT_MAKEFILE) distclean - cd $(MAKEDIR) -] - -do_distclean: - -+del dep.end $(EXEFILES) core - -do_clean: - -+del $(subst,/,\ $(ALLOBJ)) - -# depend: $(ALLSRC) -#[ -# cd $(LIBDIR_OS2) -# $(FT_MAKE) -f $(FT_MAKEFILE) depend -# cd $(MAKEDIR) -# $(CC) -E -M $(INCDIRS) @$(mktmp $(<:t"\n")\n) > dep.end -#] -# -# ifeq (dep.end,$(wildcard dep.end)) -# include dep.end -# endif - -# end of Makefile.dm Index: xc/extras/FreeType/test/arch/os2/Makefile.emx diff -u xc/extras/FreeType/test/arch/os2/Makefile.emx:1.1.1.3 xc/extras/FreeType/test/arch/os2/Makefile.emx:removed --- xc/extras/FreeType/test/arch/os2/Makefile.emx:1.1.1.3 Sat Feb 12 23:56:24 2000 +++ xc/extras/FreeType/test/arch/os2/Makefile.emx Wed Mar 16 20:59:50 2005 @@ -1,108 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for emx-gcc under OS/2. -# -# You will need GNU make. -# -# Use this file while in the 'test' directory with the following statement: -# -# make -f arch/os2/Makefile.emx - -ARCH = arch/os2 -FT_MAKEFILE = $(ARCH)/Makefile.emx - -CC = gcc - -LIBDIR = ../lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/extend -I$(LIBDIR)/$(ARCH) -I. - -CFLAGS = -Wall -ansi -O0 -g $(INCDIRS) -# CFLAGS = -ansi -Wall -O2 -s -Zcrtdll $(INCDIRS) - -GFSDRIVER = $(ARCH)/gfs_os2.c -GPMDRIVER = $(ARCH)/gpm_os2.c -GPM_DEF = $(ARCH)/gpm_os2.def - -SRC = fttimer.c ftview.c ftlint.c ftzoom.c ftdump.c ftstring.c ftstrpnm.c \ - ftsbit.c common.c blitter.c ftmetric.c ftstrtto.c arabic.c - -GSRC = gmain.c display.c blitter.c -GFSSRC = $(GSRC) $(GFSDRIVER) -GPMSRC = $(GSRC) $(GPMDRIVER) -GFSOBJ = $(GFSSRC:.c=.o) -GPMOBJ = $(GPMSRC:.c=.o) - -ALLSRC = $(SRC) $(GSRC) $(GFSDRIVER) $(GPMDRIVER) -ALLOBJ = $(ALLSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -%.exe: - $(CC) $(CFLAGS) -o $@ $^ - - -EXEFILES = ftview.exe ftviewfs.exe \ - fttimer.exe fttimefs.exe \ - ftlint.exe \ - ftstring.exe ftstrfs.exe \ - ftstrpnm.exe \ - ftzoom.exe ftzoomfs.exe \ - ftsbit.exe \ - ftdump.exe \ - ftmetric.exe \ - ftstrtto.exe ftstrtfs.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - -ftzoom.exe: $(GPMOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftzoomfs.exe: $(GFSOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GPMOBJ) ftview.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftviewfs.exe: $(GFSOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GPMOBJ) ftstring.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -ftstrfs.exe: $(GFSOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GPMOBJ) fttimer.o common.o $(LIBDIR)/libttf.a $(GPM_DEF) -fttimefs.exe: $(GFSOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GPMOBJ) ftstrtto.o common.o arabic.o \ - $(LIBDIR)/libttf.a $(GPM_DEF) -ftstrtfs.exe: $(GFSOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -del dep.end $(EXEFILES) core - -do_clean: - -del $(subst /,\,$(ALLOBJ)) - - -depend: $(ALLSRC) - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.emx Index: xc/extras/FreeType/test/arch/os2/Makefile.icc diff -u xc/extras/FreeType/test/arch/os2/Makefile.icc:1.1.1.2 xc/extras/FreeType/test/arch/os2/Makefile.icc:removed --- xc/extras/FreeType/test/arch/os2/Makefile.icc:1.1.1.2 Sat Feb 12 23:56:25 2000 +++ xc/extras/FreeType/test/arch/os2/Makefile.icc Wed Mar 16 20:59:50 2005 @@ -1,145 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for IBM VisualAge C++ under OS/2. -# -# You will need nmake. -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake -f arch\os2\Makefile.icc - -ARCH = arch\os2 -FT_MAKEFILE = $(ARCH)\Makefile.icc -FT_MAKE = $(MAKE) -nologo - -CC = icc - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\extend -I$(LIBDIR)\$(ARCH) -I. -CFLAGS = -O+ -Gd+ -Gn+ -Gl+ -Ti- -Tm- -Q+ -Wpro- -Wcnd- $(INCDIRS) - -# Fullscreen OS/2 driver -GFSDRIVER_SRC = $(ARCH)\gfs_os2.c -GFSDRIVER = $(ARCH)\gfs_os2.obj - -# PM OS/2 Driver -GPMDRIVER = $(ARCH)\gpm_os2.obj -GPMDRIVER_SRC = $(ARCH)\gpm_os2.c -GPM_DEF = $(ARCH)\gpm_os2.def - -SRC = gmain.c display.c common.c arabic.c \ - ftzoom.c ftview.c fttimer.c ftlint.c ftdump.c ftstring.c \ - ftstrpnm.c ftsbit.c ftmetric.c ftstrtto.c \ - $(GFSDRIVER_SRC) - -COMMON = common.obj -GFSOBJS = gmain.obj display.obj $(GFSDRIVER) $(COMMON) blitter.obj -GPMOBJS = gmain.obj display.obj $(GPMDRIVER) $(COMMON) blitter.obj -OBJ1 = ftzoom.obj -OBJ2 = fttimer.obj -OBJ3 = ftview.obj -OBJ4 = ftlint.obj -OBJ5 = ftdump.obj -OBJ6 = ftstring.obj -OBJ7 = ftstrpnm.obj -OBJ8 = ftsbit.obj -OBJ9 = ftmetric.obj -OBJ10 = ftstrtto.obj - - -EXEFILES = fttimefs.exe fttimer.exe \ - ftzoom.exe ftzoomfs.exe \ - ftviewfs.exe ftview.exe \ - ftlint.exe \ - ftdump.exe \ - ftstring.exe ftstrfs.exe \ - ftstrpnm.exe \ - ftsbit.exe \ - ftmetric.exe \ - ftstrtto.exe ftstrtfs.exe - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - - -freetype: - cd $(LIBDIR) - $(FT_MAKE) -f $(FT_MAKEFILE) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) -f $(FT_MAKEFILE) debug - cd ..\test - -$(GFSDRIVER): $(GFSDRIVER_SRC) - $(CC) $(CFLAGS) /c /Fo$@ $** -I. - -$(GPMDRIVER): $(GPMDRIVER_SRC) - $(CC) $(CFLAGS) /c /Fo$@ $** -I. - -ftzoomfs.exe: $(GFSOBJS) $(OBJ1) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) /Fe$@ $** - -ftzoom.exe: $(GPMOBJS) $(OBJ1) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) $(GPM_DEF) /Fe$@ $** - -fttimefs.exe: $(GFSOBJS) $(OBJ2) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) /Fe$@ $** - -fttimer.exe: $(GPMOBJS) $(OBJ2) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) $(GPM_DEF) /Fe$@ $** - -ftviewfs.exe: $(GFSOBJS) $(OBJ3) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) /Fe$@ $** - -ftview.exe: $(GPMOBJS) $(OBJ3) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) $(GPM_DEF) /Fe$@ $** - -ftlint.exe: $(OBJ4) $(LIBDIR)\libttf.lib $(COMMON) - $(CC) $(CFLAGS) /Fe$@ $** - -ftdump.exe: $(OBJ5) $(LIBDIR)\libttf.lib $(COMMON) - $(CC) $(CFLAGS) /Fe$@ $** - -ftstrfs.exe: $(GFSOBJS) $(OBJ6) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) /Fe$@ $** - -ftstring.exe: $(GPMOBJS) $(OBJ6) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) $(GPM_DEF) /Fe$@ $** - -ftstrpnm.exe: $(OBJ7) $(LIBDIR)\libttf.lib $(COMMON) - $(CC) $(CFLAGS) /Fe$@ $** - -ftsbit.exe: $(OBJ8) $(LIBDIR)\libttf.lib $(COMMON) - $(CC) $(CFLAGS) /Fe$@ $** - -ftmetric.exe: $(OBJ9) $(LIBDIR)\libttf.lib $(COMMON) - $(CC) $(CFLAGS) /Fe$@ $** - -ftstrtfs.exe: $(GFSOBJS) $(OBJ10) $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) /Fe$@ $** - -ftstrtto.exe: $(GPMOBJS) $(OBJ10) arabic.obj $(LIBDIR)\libttf.lib - $(CC) $(CFLAGS) $(GPM_DEF) /Fe$@ $** - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) -f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) -f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(GFSDRIVER) - -del $(GPMDRIVER) - -# end of Makefile.icc Index: xc/extras/FreeType/test/arch/os2/Makefile.wat diff -u xc/extras/FreeType/test/arch/os2/Makefile.wat:1.1.1.2 xc/extras/FreeType/test/arch/os2/Makefile.wat:removed --- xc/extras/FreeType/test/arch/os2/Makefile.wat:1.1.1.2 Sat Feb 12 23:56:25 2000 +++ xc/extras/FreeType/test/arch/os2/Makefile.wat Wed Mar 16 20:59:50 2005 @@ -1,155 +0,0 @@ -# This file is part of the FreeType project -# -# This builds the test programs with the Watcom compiler -# -# You'll need Watcom's wmake -# -# Invoke by "wmake -f arch\os2\Makefile.wat" when in the "test" directory - -ARCH = arch\os2 -FT_MAKEFILE = $(ARCH)\Makefile.wat -FT_MAKE = wmake -h - -.EXTENSIONS: -.EXTENSIONS: .exe .obj .c .h -.obj:. -.c:. -.h:.;..\lib - -CC = wcl386 - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I$(LIBDIR)\extend -LIBFILE = $(LIBDIR)\libttf.lib - -LINK_OPTS = - -OBJ_CFLAGS = /c /otexanl+ /s /w4 /zq $(INCDIRS) - -CCFLAGS = /otexanl+ /s /w4 /zq $(INCDIRS) - -GFSDRIVER = $(ARCH)\gfs_os2.obj -GFSDRIVER_SRC = $(ARCH)\gfs_os2.c - -GPMDRIVER = $(ARCH)\gpm_os2.obj -GPMDRIVER_SRC = $(ARCH)\gpm_os2.c -GPMDRIVER_DEF = $(ARCH)\gpm_os2.def - -SRC = gmain.c display.c blitter.c & - fttimer.c ftview.c ftlint.c ftzoom.c ftdump.c ftstring.c & - ftstrpnm.c ftsbit.c ftmetric.c ftstrtto.c & - $(GPMDRIVER_SRC) $(GFSDRIVER_SRC) - -GFSOBJ = gmain.obj $(GFSDRIVER) blitter.obj display.obj -GPMOBJ = gmain.obj $(GPMDRIVER) blitter.obj display.obj - -PM = $(LIBFILE) $(GPMOBJ) common.obj -FS = $(LIBFILE) $(GFSOBJ) common.obj - - -# graphics utility and test driver - -EXEFILES = ftview.exe ftviewfs.exe & - fttimer.exe fttimefs.exe & - ftlint.exe & - ftdump.exe & - ftstring.exe ftstrfs.exe & - ftzoom.exe ftzoomfs.exe & - ftstrpnm.exe & - ftsbit.exe & - ftmetric.exe & - ftstrtto.exe ftstrtfs.exe - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - - -freetype: .symbolic - cd ..\lib - $(FT_MAKE) -f $(FT_MAKEFILE) all - cd ..\test - -freetype_debug: .symbolic - cd ..\lib - $(FT_MAKE) -f $(FT_MAKEFILE) debug - cd ..\test - -# implicit rules -# -.c.obj : - $(CC) $(OBJ_CFLAGS) $[* /fo=$[*.obj - - -# the full-screen graphics driver -# -$(GFSDRIVER): $(GFSDRIVER_SRC) - $(CC) $(OBJ_CFLAGS) $[*.c /fo=$[*.obj - -# the pm graphics driver -# -$(GPMDRIVER): $(GPMDRIVER_SRC) - $(CC) $(OBJ_CFLAGS) $[*.c /fo=$[*.obj - -ftzoom.exe : ftzoom.obj $(LIBFILE) $(PM) $(GPMDRIVER_DEF) - $(CC) $(CCFLAGS) -l=os2v2_pm $(PM) $[*.c /fe=$[*.exe - -ftzoomfs.exe : ftzoom.obj $(LIBFILE) $(FS) - $(CC) $(CCFLAGS) $(FS) $[@ /fe=ftzoomfs.exe - -ftview.exe : ftview.obj $(LIBFILE) $(PM) $(GPMDRIVER_DEF) - $(CC) $(CCFLAGS) -l=os2v2_pm $(PM) $[*.c /fe=$[*.exe - -ftviewfs.exe : ftview.obj $(LIBFILE) $(FS) - $(CC) $(CCFLAGS) $(FS) $[*.c /fe=ftviewfs.exe - -ftstring.exe : ftstring.obj $(LIBFILE) $(PM) $(GPMDRIVER_DEF) - $(CC) $(CCFLAGS) -l=os2v2_pm $(PM) $[*.c /fe=$[*.exe - -ftstrfs.exe : ftstring.obj $(LIBFILE) $(FS) - $(CC) $(CCFLAGS) $(FS) $[*.c /fe=ftstrfs.exe - -fttimer.exe: fttimer.obj $(LIBFILE) $(PM) $(GPMDRIVER_DEF) - $(CC) $(CCFLAGS) -l=os2v2_pm $(PM) $[*.c /fe=$[*.exe - -fttimefs.exe: fttimer.obj $(LIBFILE) $(FS) - $(CC) $(CCFLAGS) $(FS) $[*.c /fe=fttimefs.exe - -ftlint.exe: ftlint.obj $(LIBFILE) - $(CC) $(CCFLAGS) $(LIBFILE) common.obj $[*.c /fe=$[*.exe - -ftdump.exe: ftdump.obj $(LIBFILE) - $(CC) $(CCFLAGS) $(LIBFILE) common.obj $[*.c /fe=$[*.exe - -ftstrpnm.exe: ftstrpnm.obj $(LIBFILE) - $(CC) $(CCFLAGS) $(LIBFILE) common.obj $[*.c /fe=$[*.exe - -ftsbit.exe: ftsbit.obj $(LIBFILE) - $(CC) $(CCFLAGS) $(LIBFILE) common.obj $[*.c /fe=$[*.exe - -ftmetric.exe: ftmetric.obj $(LIBFILE) - $(CC) $(CCFLAGS) $(LIBFILE) common.obj $[*.c /fe=$[*.exe - -ftstrtto.exe : ftstrtto.obj arabic.obj $(LIBFILE) $(PM) $(GPMDRIVER_DEF) - $(CC) $(CCFLAGS) -l=os2v2_pm $(PM) $[*.c /fe=$[*.exe - -ftstrtfs.exe : ftstrtto.obj arabic.obj $(LIBFILE) $(FS) - $(CC) $(CCFLAGS) $(FS) $[*.c /fe=ftstrtfs.exe - - -clean: .symbolic - @-erase *.obj - @-erase $(ARCH)\*.obj - -distclean: .symbolic clean - @-erase *.exe - @-erase *.err - cd ..\lib - $(FT_MAKE) -f $(FT_MAKEFILE) distclean - cd ..\test - -new: .symbolic - @-wtouch *.c - -# end of Makefile.wat Index: xc/extras/FreeType/test/arch/os2/gfs_os2.c diff -u xc/extras/FreeType/test/arch/os2/gfs_os2.c:1.1.1.2 xc/extras/FreeType/test/arch/os2/gfs_os2.c:removed --- xc/extras/FreeType/test/arch/os2/gfs_os2.c:1.1.1.2 Sat Feb 12 23:56:25 2000 +++ xc/extras/FreeType/test/arch/os2/gfs_os2.c Wed Mar 16 20:59:50 2005 @@ -1,219 +0,0 @@ -/******************************************************************* - * - * gfs_os2.c graphics utility fullscreen OS/2 driver. 1.0 - * - * This is the driver for fullscreen OS/2 display, used by the - * graphics utility of the FreeType test suite. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#include - -#define INCL_SUB -#include - -#ifdef __EMX__ -#include -#endif - -#if defined(__EMX__)||defined(__IBMC__) -#include /* for getch */ - extern _read_kbd(); /* to avoid an ANSI warning during compilation */ -#endif - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - - static VIOMODEINFO OrgMode; - static long VioBufOfs; - - - /* BIOS video modes */ - - static VIOMODEINFO VioMode_640x480x16 = - { - sizeof ( VIOMODEINFO ), - VGMT_OTHER + VGMT_GRAPHICS, - COLORS_16, - 80, - 35, - 640, - 480 - }; - - static VIOMODEINFO VioMode_320x200x256 = - { - sizeof ( VIOMODEINFO ), - VGMT_OTHER + VGMT_GRAPHICS, - 8, - 40, - 25, - 320, - 200 - }; - - static VIOPHYSBUF VioBuf = - { - (void*)0xA0000L, - 64*1024 - }; - - - /* Restores screen to its original state */ - - int Driver_Restore_Mode() - { - VioSetMode( &OrgMode, 0 ); - return 1; - } - - - /* Sets graphics mode */ - - int Driver_Set_Graphics( int mode ) - { - int rc; - - - OrgMode.cb = sizeof ( VIOMODEINFO ); - VioGetMode( &OrgMode, 0 ); - - switch ( mode ) - { - case Graphics_Mode_Mono: - rc = VioSetMode( &VioMode_640x480x16, 0 ); - vio_ScanLineWidth = 80; - vio_Width = 640; - vio_Height = 480; - break; - - case Graphics_Mode_Gray: - rc = VioSetMode( &VioMode_320x200x256, 0 ); - vio_ScanLineWidth = 320; - vio_Width = 320; - vio_Height = 200; - - /* default gray_palette takes the gray levels of the standard VGA */ - /* 256 colors mode */ - - gray_palette[0] = 0; - gray_palette[1] = 23; - gray_palette[2] = 27; - gray_palette[3] = 29; - gray_palette[4] = 31; - break; - - default: - rc = -1; - break; - } - - if ( rc ) return 0; /* failure */ - - if ( VioGetPhysBuf( &VioBuf, 0 ) ) return 0; /* Could not access VRAM */ - - VioBufOfs = (long)MAKEP( VioBuf.asel[0], 0 ); - - memset( (void*)VioBufOfs, 0, 64 * 1024 ); - - Vio = (char*)VioBufOfs; - - return 1; /* success */ - } - - - int Driver_Display_Bitmap( char* buffer, int line, int col ) - { - int y; - char* target; - - target = Vio + ( line - 1 ) * vio_ScanLineWidth; - - for ( y = 0; y < line; y++ ) - { - memcpy( target, buffer, col ); - target -= vio_ScanLineWidth; - buffer += col; - } - - return 1; /* success */ - } - - - void Get_Event( TEvent* event ) - { - int i; - char c; - - - c = getch(); - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - event->what = trans[i].event_class; - event->info = trans[i].event_info; - return; - } - } - - /* unrecognized keystroke */ - - event->what = event_Keyboard; - event->info = (int)c; - return; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/os2/gpm_os2.c diff -u xc/extras/FreeType/test/arch/os2/gpm_os2.c:1.1.1.2 xc/extras/FreeType/test/arch/os2/gpm_os2.c:removed --- xc/extras/FreeType/test/arch/os2/gpm_os2.c:1.1.1.2 Sat Feb 12 23:56:26 2000 +++ xc/extras/FreeType/test/arch/os2/gpm_os2.c Wed Mar 16 20:59:50 2005 @@ -1,654 +0,0 @@ -/******************************************************************* - * - * gpm_os2.c graphics OS/2 Presentation Manager Window driver. 0.2 - * - * This is the driver for windowed OS/2 display, used by the - * graphics utility of the FreeType test suite. - * - * written by Eric Olson (eolson@imag.net) - * - * Borrowing liberally from the other FreeType drivers. - * Some bitmap manipulations are derived from fastgpi.c, - * a sample program written by Donald Graft (dgraft@gate.net). - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#include - -#define INCL_DOS -#define INCL_WIN -#define INCL_GPI -#define INCL_SUB - -#include - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -#define VIO_WIDTH 640u /* these can be changed but VIO_WIDTH should remain */ -#define VIO_HEIGHT 360u /* for now a multiple of 32 to avoid padding issues */ -#define MAG_WIDTH VIO_WIDTH -#define MAG_HEIGHT 120u -#define MAX_MAG 16 /* should be less than Min(MAG_WIDTH, MAG_HEIGHT) */ - - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - - static HAB habt; - static HAB hab; - static HWND hwndFrame, hwndClient; - static HWND hwndTitle; - static HDC hdcMemory; - static HPS hpsMemory = (HPS) NULL; - - /* Threads and semaphores */ - TID MessageThread; - HMTX hmtxPSMemoryLock; - HEV hevKeyLock; - - /* Bitmap information */ - static PBITMAPINFO2 pbmi; - static HBITMAP hbm; - BYTE Bitmap[VIO_WIDTH * VIO_HEIGHT]; - BOOL ready = FALSE; - - /* Coordinates for the bitblt of whole graphic area */ - POINTL aptlFull[4] = {{ 0u, MAG_HEIGHT }, - { VIO_WIDTH, VIO_HEIGHT + MAG_HEIGHT }, - { 0u, 0u }, - { VIO_WIDTH, VIO_HEIGHT }}; - - /* Coordinates for the magnification bitblt */ - POINTL aptlMagd[4] = {{ 0u, 0u }, - { MAG_WIDTH, MAG_HEIGHT }, /* target */ - { 0u, 0u }, - { VIO_WIDTH, VIO_HEIGHT }}; /* source */ - - /* level of magnification and center of magnification window */ - static int magnification=1; - static POINTL view_target = {0, 0}; - static SIZEL mag_win_size; - - /* local event to pass on */ - TEvent ourevent = { event_Rotate_Glyph, 0 }; - - /* grayscale vs b/w mode */ - int Colourmode; - - /* array defined in the test programs */ - extern char Header[]; - - - void RunPMWindow( ULONG ); - MRESULT EXPENTRY Message_Process( HWND, ULONG, MPARAM, MPARAM ); - - - - /* restores screen to its original state */ - - int Driver_Restore_Mode() - { - /* PMWindow has probably already destroyed itself */ - if ( hwndFrame ) - WinDestroyWindow( hwndFrame ); - - WinReleasePS( hpsMemory ); - WinTerminate( habt ); - - return 1; - } - - - /* set graphics mode */ - - int Driver_Set_Graphics( int mode ) - { - LONG palette[5]; - int x; - POINTL coords; - SIZEL sizl = { 0, 0 }; - - PTIB thread_block; - PPIB process_block; - - /* XXX : This is a very nasty hack, it fools OS/2 and let the program */ - /* call PM functions, even though stdin/stdout/stderr are still */ - /* directed to the standard i/o streams.. */ - /* The program must be compiled with WINDOWCOMPAT */ - /* */ - /* Credits go to Michal for finding this !! */ - /* */ - DosGetInfoBlocks( &thread_block, &process_block ); - process_block->pib_ultype = 3; - - /* save mono vs grayscale status */ - Colourmode = mode; - - /* event semaphore to signal reraster event */ - DosCreateEventSem( NULL, &hevKeyLock, 0, TRUE ); - - /* mutex semaphore for access to the presentation space */ - DosCreateMutexSem( NULL, &hmtxPSMemoryLock, 0, FALSE ); - - /* Start thread with Presentation Manager window */ - DosCreateThread( &MessageThread, (PFNTHREAD)RunPMWindow, 0UL, 0UL, 32920 ); - - /* open anchor block to permit Gpi calls from this thread */ - habt = WinInitialize( 0 ); - - /* create device context and presentation space for our graphic */ - hdcMemory = DevOpenDC( hab, OD_MEMORY, (PSZ)"*", 0L, 0L, 0L ); - - DosRequestMutexSem( hmtxPSMemoryLock, SEM_INDEFINITE_WAIT ); - hpsMemory = GpiCreatePS( - habt, hdcMemory, &sizl, - PU_PELS | GPIT_MICRO | GPIA_ASSOC | GPIF_DEFAULT ); - GpiSetBackMix( hpsMemory, BM_OVERPAINT ); - - /* create bitmap for raster image of graphic */ - - /* find some memory for the bitmap header */ - DosAllocMem( (PPVOID)&pbmi, - sizeof ( BITMAPINFO2 ) + sizeof ( RGB2 ) * 256, - PAG_COMMIT | PAG_READ | PAG_WRITE); - /* 256 should really be 2 if not grayscale */ - - /* initialize the header to appropriate values */ - memset( pbmi, 0, sizeof ( BITMAPINFO2 ) + sizeof ( RGB2 ) * 256 ); - - pbmi->cbFix = sizeof ( BITMAPINFOHEADER2 ); - pbmi->cx = VIO_WIDTH; - pbmi->cy = VIO_HEIGHT; - pbmi->cPlanes = 1; - - switch ( mode ) - { - case Graphics_Mode_Mono: - pbmi->cBitCount = 1; - break; - - case Graphics_Mode_Gray: - pbmi->cBitCount = 8; - break; - } - - hbm = GpiCreateBitmap( hpsMemory, (PBITMAPINFOHEADER2)pbmi, - 0L, NULL, NULL ); - - /* associate it with the presentation space */ - GpiSetBitmap( hpsMemory, hbm ); - pbmi->cbFix = sizeof ( BITMAPINFOHEADER2 ); - GpiQueryBitmapInfoHeader( hbm, (PBITMAPINFOHEADER2) pbmi ); - - switch ( mode ) - { - case Graphics_Mode_Mono: - DosReleaseMutexSem( hmtxPSMemoryLock ); - - vio_ScanLineWidth = VIO_WIDTH / 8; - vio_Width = VIO_WIDTH; - vio_Height = VIO_HEIGHT; - - gray_palette[0] = 0; /* to avoid testing for grayscale... */ - break; - - case Graphics_Mode_Gray: - vio_ScanLineWidth = VIO_WIDTH; - vio_Width = VIO_WIDTH; - vio_Height = VIO_HEIGHT; - - /* set gray_palette by convoluted procedure */ - - /* create logical color palette */ - palette[0] = 0xffffffL; /* White */ - palette[1] = 0xbbbbbbL; - palette[2] = 0x777777L; /* Gray */ - palette[3] = 0x333333L; - palette[4] = 0L; /* Black */ - - GpiCreateLogColorTable( hpsMemory, (ULONG)LCOL_PURECOLOR, - (LONG)LCOLF_CONSECRGB, (LONG)0L, - (LONG)5L, (PLONG)palette ); - - /* plot to presentation space in all five gray shades */ - for (x = 0 ; x < 5 ; x++) - { - GpiSetColor( hpsMemory, (LONG)x ); - coords.x = x; - coords.y = 0; - GpiSetPel( hpsMemory, &coords ); - } - - /* retrieve the 5 pixels as gray_palette */ - GpiQueryBitmapInfoHeader( hbm, (PBITMAPINFOHEADER2) pbmi ); - GpiQueryBitmapBits( hpsMemory, 0L, (LONG)VIO_HEIGHT - 2, - &Bitmap[0], pbmi ); - for ( x = 0; x < 5; x++ ) - { - gray_palette[x] = Bitmap[x]; - } - - /* initialization in case we paint before Driver_Display is called */ - memset( &Bitmap[0], gray_palette[0], vio_Height * vio_ScanLineWidth ); - DosReleaseMutexSem( hmtxPSMemoryLock ); - break; - - default: - return 0; /* Unknown mode */ - } - - return 1; /* success even if windows were not setup right */ - } - - - int Driver_Display_Bitmap( char* buffer, int lines, int cols ) - { - int y, target; - - - /* copy the bitmap and blt to presentation space */ - if ( (lines == vio_Height) & (cols == vio_ScanLineWidth) ) - memcpy( &Bitmap[0], buffer, lines * cols ); - else - { - memset( &Bitmap[0], gray_palette[0], vio_Height * vio_ScanLineWidth ); - /* temporary hack to center any bitmap */ - target = ( vio_Height - lines ) / 2 * vio_ScanLineWidth + - ( vio_ScanLineWidth - cols ) / 2; - - for ( y = 0 ; y < lines ; y++ ) - { - memcpy( &Bitmap[target], buffer, cols ); - target += vio_ScanLineWidth; - buffer += cols; - } - } - - /* Get permission and write to in-memory ps */ - DosRequestMutexSem( hmtxPSMemoryLock, SEM_INDEFINITE_WAIT ); - GpiSetBitmapBits( hpsMemory, 0L, (LONG)VIO_HEIGHT - 2, &Bitmap[0], pbmi ); - DosReleaseMutexSem( hmtxPSMemoryLock ); - ready = TRUE; - - /* Invalidate and ask for redraw now */ - WinInvalidateRect( hwndClient, NULL, FALSE ); - WinUpdateWindow( hwndFrame ); - - return 1; /* success */ - } - - - void Get_Event( TEvent* event ) - { - ULONG ulRequestCount; - - - /* the Get_Event function blocks until there is an event to process */ - DosWaitEventSem( hevKeyLock, SEM_INDEFINITE_WAIT ); - DosQueryEventSem( hevKeyLock, &ulRequestCount ); - DosResetEventSem( hevKeyLock, &ulRequestCount ); - event->what = ourevent.what; - event->info = ourevent.info; - return; - } - - - void RunPMWindow( ULONG dummy ) - { - unsigned char classname[] = "DisplayClass"; - ULONG flClassFlags; - static HMQ hmq; - QMSG qmsg; - - - if ( (hab = WinInitialize( 0 )) == 0 ) - { - printf( "Error doing WinInitialize()\n" ); - return; - } - - if ( (hmq = WinCreateMsgQueue( hab, 0 )) == (HMQ)NULL ) - { - printf( "Error doing WinCreateMsgQueue()\n" ); - return; - } - - if ( !WinRegisterClass( hab, (PSZ)classname, (PFNWP)Message_Process, - CS_SIZEREDRAW, 0 ) ) - { - printf( "Error doing WinRegisterClass()\n" ); - return; - } - - flClassFlags = FCF_TITLEBAR | FCF_MINBUTTON | FCF_DLGBORDER | - FCF_TASKLIST | FCF_SYSMENU; - if ( (hwndFrame = WinCreateStdWindow( HWND_DESKTOP, - WS_VISIBLE, - &flClassFlags, - (PSZ)classname, - (PSZ)"FreeType PM Graphics", - WS_VISIBLE, - 0, 0, &hwndClient )) == 0 ) - { - printf( "Error doing WinCreateStdWindow()\n" ); - return; - } - - /* find the title window handle */ - hwndTitle = WinWindowFromID( hwndFrame, FID_TITLEBAR ); - - /* set Window size and position */ - WinSetWindowPos( - hwndFrame, 0L, - (SHORT)60, - (SHORT)WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN ) - - ( VIO_HEIGHT + MAG_HEIGHT + 100 ), - (SHORT)WinQuerySysValue( HWND_DESKTOP, SV_CYDLGFRAME ) * 2 + - VIO_WIDTH, - (SHORT)WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR ) + - WinQuerySysValue( HWND_DESKTOP, SV_CYDLGFRAME ) * 2 + - VIO_HEIGHT + MAG_HEIGHT, - SWP_SIZE | SWP_MOVE ) ; - - /* run the message queue till the end */ - while ( WinGetMsg( hab, &qmsg, (HWND)NULL, 0, 0 ) ) - WinDispatchMsg( hab, &qmsg ); - - /* clean-up */ - WinDestroyWindow( hwndFrame ); - hwndFrame = (HWND)NULL; - WinDestroyMsgQueue( hmq ); - WinTerminate( hab ); - - /* await death... */ - while ( 1 ) - DosSleep( 100 ); - } - - - void Adjust_Mag_Rectangle( void ) - { - SIZEL source, - target; - - - /* Step 1, find optimal source size for this mag and window size */ - source.cx = mag_win_size.cx / magnification; - if (source.cx > vio_Width) source.cx = vio_Width; - source.cy = mag_win_size.cy / magnification; - if (source.cy > vio_Height) source.cy = vio_Height; - - target.cx = source.cx * magnification; - target.cy = source.cy * magnification; - - aptlMagd[0].x = (mag_win_size.cx - target.cx) / 2; - aptlMagd[0].y = (mag_win_size.cy - target.cy) / 2; - aptlMagd[1].x = aptlMagd[0].x + target.cx - 1; - aptlMagd[1].y = aptlMagd[0].x + target.cy - 1; - - /* Step 2, try crosshairs point dependent coordinates */ - aptlMagd[2].x = view_target.x - source.cx / 2; - aptlMagd[2].y = view_target.y - source.cy / 2; - if (aptlMagd[2].x < 0 ) aptlMagd[2].x = 0; - if (aptlMagd[2].y < 0 ) aptlMagd[2].y = 0; - if (aptlMagd[2].x > vio_Width - source.cx) - aptlMagd[2].x = vio_Width - source.cx; - if (aptlMagd[2].y > vio_Height - source.cy) - aptlMagd[2].y = vio_Height - source.cy; - - aptlMagd[3].x = aptlMagd[2].x + source.cx - 1; - aptlMagd[3].y = aptlMagd[2].y + source.cy - 1; - - } /* End of Adjust_Mag_Rectangle; */ - - - /* Message processing for our PM Window class */ - MRESULT EXPENTRY Message_Process( HWND handle, ULONG mess, - MPARAM parm1, MPARAM parm2 ) - { - static HDC hdc; - static HPS hps; - static BOOL minimized; - - POINTL top_corner, bottom_corner; - SWP swp; - int i; - - - switch( mess ) - { - case WM_DESTROY: - /* warn the main thread to quit if it didn't know */ - ourevent.what = event_Quit; - ourevent.info = 0; - DosPostEventSem( hevKeyLock ); - break; - - case WM_CREATE: - /* set original magnification */ - magnification = 4; - minimized = FALSE; - - /* create Device Context and Presentation Space for screen. */ - /* could we use a cached one ? */ - hdc = WinOpenWindowDC( handle ); - mag_win_size.cx = 0; - mag_win_size.cy = 0; - hps = GpiCreatePS( hab, hdc, &mag_win_size, - PU_PELS | GPIT_MICRO | GPIA_ASSOC | GPIF_DEFAULT ); - - /* Set to size of magnifier window */ - mag_win_size.cx = MAG_WIDTH; - mag_win_size.cy = MAG_HEIGHT; - Adjust_Mag_Rectangle(); - - /* take the input focus */ - WinFocusChange( HWND_DESKTOP, handle, 0L ); - break; - - case WM_BUTTON1DOWN: - if ( MOUSEMSG( &mess )->y >= MAG_HEIGHT ) - { - view_target.x = MOUSEMSG( &mess )->x; - view_target.y = MOUSEMSG( &mess )->y - MAG_HEIGHT; - Adjust_Mag_Rectangle(); - WinInvalidateRect( hwndClient, NULL, FALSE ); - } - - return WinDefWindowProc( handle, mess, parm1, parm2 ); - break; - - case WM_MINMAXFRAME: - /* to update minimized if changed */ - swp = *((PSWP) parm1); - if ( swp.fl & SWP_MINIMIZE ) - minimized = TRUE; - if ( swp.fl & SWP_RESTORE ) - minimized = FALSE; - return WinDefWindowProc( handle, mess, parm1, parm2 ); - break; - - case WM_ERASEBACKGROUND: - case WM_PAINT: - /* reset the window title only if not minimized */ - if ( !minimized ) - WinSetWindowText( hwndTitle, Header ); - - /* copy the memory image of the screen out to the real screen */ - DosRequestMutexSem( hmtxPSMemoryLock, SEM_INDEFINITE_WAIT ); - WinBeginPaint( handle, hps, NULL ); - - /* main image and magnified picture */ - GpiBitBlt( hps, hpsMemory, 4L, aptlFull, ROP_SRCCOPY, BBO_AND ); - GpiBitBlt( hps, hpsMemory, 4L, aptlMagd, ROP_SRCCOPY, BBO_AND ); - - /* double-dash the magnifing bounding box. Paint the mag liner? */ - if ( magnification != 1 ) - { - GpiSetLineType( hps, LINETYPE_LONGDASH ); - - bottom_corner.x = aptlMagd[2].x - 1; - bottom_corner.y = aptlMagd[2].y + MAG_HEIGHT - 1; - top_corner.x = aptlMagd[3].x ; - top_corner.y = aptlMagd[3].y + MAG_HEIGHT; - - GpiMove( hps, &bottom_corner ); - GpiBox( hps, DRO_OUTLINE, &top_corner, 0L, 0L ); - -#if 0 - GpiSetClipRegion(); - GpiErase(); -#endif - } - - WinEndPaint( hps ); - DosReleaseMutexSem( hmtxPSMemoryLock ); - break; - - case WM_CHAR: - if ( CHARMSG( &mess )->fs & KC_KEYUP ) - break; - - switch ( CHARMSG( &mess )->vkey ) - { - case VK_ESC: - ourevent.what = event_Quit; - ourevent.info = 0; - DosPostEventSem( hevKeyLock ); - break; - - case VK_PAGEDOWN: - if ( magnification < MAX_MAG ) - { - magnification += 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_PAGEUP: - if ( magnification > 1 ) - { - magnification -= 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_LEFT: - if ( view_target.x > 0 ) - { - view_target.x -= 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_RIGHT: - if ( view_target.x < VIO_WIDTH - 1 ) - { - view_target.x += 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_DOWN: - if ( view_target.y > 0 ) - { - view_target.y -= 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_UP: - if ( view_target.y < VIO_HEIGHT - 1 ) - { - view_target.y += 1; - Adjust_Mag_Rectangle(); - WinInvalidateRect( handle, NULL, FALSE ); - } - break; - - case VK_F1: /* bring up help and about dialog window */ - break; - } - - if ( CHARMSG( &mess )->fs & KC_CHAR ) - { - char c = (CHAR)CHARMSG( &mess )->chr ; - - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - ourevent.what = trans[i].event_class; - ourevent.info = trans[i].event_info; - DosPostEventSem( hevKeyLock ); - return (MRESULT)TRUE; - } - } - - /* unrecognized keystroke */ - ourevent.what = event_Keyboard; - ourevent.info = (int)c; - DosPostEventSem( hevKeyLock ); - } - break; - - default: - return WinDefWindowProc( handle, mess, parm1, parm2 ); - } - - return (MRESULT) FALSE; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/os2/gpm_os2.def diff -u xc/extras/FreeType/test/arch/os2/gpm_os2.def:1.1.1.1 xc/extras/FreeType/test/arch/os2/gpm_os2.def:removed --- xc/extras/FreeType/test/arch/os2/gpm_os2.def:1.1.1.1 Sat Sep 5 23:00:51 1998 +++ xc/extras/FreeType/test/arch/os2/gpm_os2.def Wed Mar 16 20:59:50 2005 @@ -1,5 +0,0 @@ -NAME WINDOWCOMPAT - -DESCRIPTION 'FreeType Graphics' -HEAPSIZE 8192 -STACKSIZE 40888 Index: xc/extras/FreeType/test/arch/unix/.cvsignore diff -u xc/extras/FreeType/test/arch/unix/.cvsignore:1.1.1.1 xc/extras/FreeType/test/arch/unix/.cvsignore:removed --- xc/extras/FreeType/test/arch/unix/.cvsignore:1.1.1.1 Sat Feb 12 23:56:26 2000 +++ xc/extras/FreeType/test/arch/unix/.cvsignore Wed Mar 16 20:59:51 2005 @@ -1 +0,0 @@ -Makefile Index: xc/extras/FreeType/test/arch/unix/Makefile.in diff -u xc/extras/FreeType/test/arch/unix/Makefile.in:1.1.1.3 xc/extras/FreeType/test/arch/unix/Makefile.in:removed --- xc/extras/FreeType/test/arch/unix/Makefile.in:1.1.1.3 Sat Feb 12 23:56:26 2000 +++ xc/extras/FreeType/test/arch/unix/Makefile.in Wed Mar 16 20:59:51 2005 @@ -1,170 +0,0 @@ -# This file is part of the FreeType project. -# -# test/arch/unix/Makefile.in - -ARCH = arch/unix - -top_builddir=.. - -VPATH = @srcdir@/../.. -srcdir = @srcdir@/../.. - -RM = @RM@ -RMF = @RM@ -f -RMDIR = @RMDIR@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ - -CC = @CC@ -CPP = @CPP@ - -LIBTOOL = $(top_builddir)/libtool -MKINSTALLDIRS = $(srcdir)/../mkinstalldirs - -include $(top_builddir)/MakeSub - -FT_LIBDIR = $(srcdir)/../lib -INCDIRS = -I. -I$(srcdir) -I$(top_builddir) \ - -I$(FT_LIBDIR) -I$(FT_LIBDIR)/extend - -CFLAGS = @CFLAGS@ @X_CFLAGS@ @XX_CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -FT_CFLAGS = $(INCDIRS) $(CFLAGS) $(CPPFLAGS) -DX11 -DLOCALEDIR='"@LOCALEDIR@"' - -FT_LIBS = @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ @LIBS@ - -SRC = $(srcdir)/arabic.c \ - $(srcdir)/common.c \ - $(srcdir)/ftdump.c \ - $(srcdir)/fterror.c \ - $(srcdir)/ftlint.c \ - $(srcdir)/ftmetric.c \ - $(srcdir)/ftsbit.c \ - $(srcdir)/ftstring.c \ - $(srcdir)/ftstrpnm.c \ - $(srcdir)/fttimer.c \ - $(srcdir)/ftview.c \ - $(srcdir)/ftzoom.c \ - $(srcdir)/ftstrtto.c \ - $(srcdir)/gmain.c \ - $(srcdir)/$(ARCH)/gwin_x11.c - -DISPOBJS = common.o gmain.o display.o gwin_x11.o blitter.o - -PROGRAMS = ftview fttimer ftlint ftdump ftzoom ftsbit \ - ftstring ftstrpnm fterror ftmetric ftstrtto - -# set this variable to nil if you don't need to use Electric-Fence -EFENCE = -#EFENCE = -lefence - - -# variables used to compile either with libtool or not -# -PROCESS = $(LIBTOOL) --mode=link $(CC) $(FT_CFLAGS) -#PROCESS = $(CC) $(FT_CFLAGS) - -LIBTTF = $(top_builddir)/lib/libttf.la -#LIBTTF =$(top_builddir)/lib/libttf.a - -.c.o: - $(CC) -c $(FT_CFLAGS) $< - - -all: $(PROGRAMS) - - -gwin_x11.o: $(srcdir)/$(ARCH)/gwin_x11.c - $(CC) -c $(FT_CFLAGS) $(srcdir)/$(ARCH)/gwin_x11.c - -ftzoom: ftzoom.o $(DISPOBJS) $(LIBTTF) - $(PROCESS) -o ftzoom ftzoom.o $(DISPOBJS) \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) -lX11 - -fttimer: fttimer.o $(DISPOBJS) $(LIBTTF) - $(PROCESS) -o fttimer fttimer.o $(DISPOBJS) \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) -lX11 - -ftview: ftview.o $(DISPOBJS) $(LIBTTF) - $(PROCESS) -o ftview ftview.o $(DISPOBJS) \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) -lX11 - -ftlint: ftlint.o common.o $(LIBTTF) - $(PROCESS) -o ftlint ftlint.o common.o \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) - -ftdump: ftdump.o common.o $(LIBTTF) - $(PROCESS) -o ftdump ftdump.o common.o \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) - -ftmetric: ftmetric.o common.o $(LIBTTF) - $(PROCESS) -o ftmetric ftmetric.o common.o \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) - -ftsbit: ftsbit.o common.o $(LIBTTF) - $(PROCESS) -o ftsbit ftsbit.o common.o \ - $(EFENCE) $(LIBTTF) - -ftstring: ftstring.o $(DISPOBJS) $(LIBTTF) - $(PROCESS) -o ftstring ftstring.o $(DISPOBJS) \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) -lX11 - -# ftstrpnm does not need any extra libraries -ftstrpnm: ftstrpnm.o common.o $(LIBTTF) - $(PROCESS) -o ftstrpnm ftstrpnm.o common.o \ - $(EFENCE) $(LIBTTF) - -fterror: fterror.o common.o $(LIBTTF) - $(PROCESS) -o fterror fterror.o common.o \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) - -ftstrtto: ftstrtto.o $(DISPOBJS) arabic.o $(LIBTTF) - $(PROCESS) -o ftstrtto ftstrtto.o $(DISPOBJS) arabic.o \ - $(EFENCE) $(LIBTTF) $(FT_LIBS) -lX11 - - -install: $(PROGRAMS) - $(MKINSTALLDIRS) $(bindir) - for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$P $(bindir)/$$P ; \ - done - -uninstall: - -for P in $(PROGRAMS) ; do \ - $(LIBTOOL) --mode=uninstall $(RM) $(bindir)/$$P ; \ - done - -clean: do_clean - -distclean: do_clean - -$(RMF) $(PROGRAMS) - -$(RMF) *~ *.orig core *.core - -$(RMF) config.cache config.log config.status - -$(RMF) $(ARCH)/Makefile - -$(RMF) .libs/* - -$(RMDIR) .libs - -do_clean: - -$(RMF) *.o - -depend: - (echo '/^#.* PUT NO STUFF BELOW/,$$d' ; echo w ; echo q) | \ - ed - $(ARCH)/Makefile - echo '# Dependencies generated by make depend: PUT NO STUFF BELOW' \ - >> $(ARCH)/Makefile - for file in $(SRC) ; do \ - $(CPP) $(CPPFLAGS) $(INCDIRS) $$file | \ - sed -n -e 's|^# [1-9][0-9]* "\([^/].*\.h\)".*|\1|p' \ - -e 's|^# [1-9][0-9]* "\($(srcdir)/.*\.h\)".*|\1|p' | \ - sed -e 's|/\./|.|g' -e "s/^/`basename $$file .c`.o: /" ; \ - done | \ - sort -u | \ - awk '{ if (LINE == 1) \ - { line = last = $$1 } \ - else if ($$1 != last) \ - { print line ; line = last = $$1 } \ - line = line " " $$2 } \ - END { print line }' >> $(ARCH)/Makefile - -# Dependencies generated by make depend: PUT NO STUFF BELOW Index: xc/extras/FreeType/test/arch/unix/gwin_x11.c diff -u xc/extras/FreeType/test/arch/unix/gwin_x11.c:1.1.1.2 xc/extras/FreeType/test/arch/unix/gwin_x11.c:removed --- xc/extras/FreeType/test/arch/unix/gwin_x11.c:1.1.1.2 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/unix/gwin_x11.c Wed Mar 16 20:59:51 2005 @@ -1,451 +0,0 @@ -/******************************************************************* - * - * gwin_x11.c graphics utility X-Window driver. 1.0 - * - * This is the driver for windowed display under X11, used by the - * graphics utility of the FreeType test suite. - * - * Copyright 1996-1999 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include "common.h" /* for Panic() */ -#include "freetype.h" - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - - /* Translator added to ease changes to control keys */ - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - /* End of translators addition. See Get_Event() below */ - - extern char Header[]; /* defined in the test programs */ - - static Window win; - static GC gcblack; - static XColor color[5]; - - Display* display; - static char* displayname = ""; - - static XImage* image; - - static Visual* visual; - static Colormap colormap; - static int depth; - static Bool gray; - - static Cursor idle; - static Cursor busy; - - static int win_origin_x, win_origin_y, - win_width, win_height; - static int image_width, image_height; - - long vioBufOfs; - - - - /* restore acreen to its original state */ - - int Driver_Restore_Mode( void ) - { - XUnmapWindow( display, win ); - XCloseDisplay( display ); - - return 1; /* success */ - } - - - /* set graphics mode */ - - void x11init( void ) - { - int screen_num, i; - XTextProperty xtp; - XSizeHints xsh; - XSetWindowAttributes xswa; - -#if 1 - unsigned short colors[5] = { 0, 16, 32, 48, 63 }; /* gamma = 1.0 */ -#else - unsigned short colors[5] = { 0, 34, 46, 55, 63 }; /* gamma = 2.2 */ -#endif - - - XrmInitialize(); - - if( !( display = XOpenDisplay( displayname ) ) ) - Panic( "ERROR: cannot open display\n" ); - - screen_num = DefaultScreen ( display ); - colormap = DefaultColormap( display, screen_num ); - depth = DefaultDepth ( display, screen_num ); - visual = DefaultVisual ( display, screen_num ); - - idle = XCreateFontCursor( display, XC_left_ptr ); - busy = XCreateFontCursor( display, XC_watch ); - - if ( gray ) - { - int count; - XPixmapFormatValues* formats; - - - formats = XListPixmapFormats( display, &count ); - vio_ScanLineWidth = 0; - - while ( count > 0 ) - { - --count; - if ( formats[count].depth == depth ) - { - int bits; - - bits = win_width * formats[count].bits_per_pixel; - if ( bits % formats[count].scanline_pad ) - { - bits -= bits % formats[count].scanline_pad; - bits += formats[count].scanline_pad; - } - - vio_ScanLineWidth = bits / 8; - break; - } - } - if ( !vio_ScanLineWidth ) - Panic( "ERROR: the display doesn't offer a suitable pixmap format\n" ); - - XFree( formats ); - } - - Vio = (char*)malloc( win_height * vio_ScanLineWidth ); - - if ( !Vio ) - Panic( "ERROR: cannot malloc display memory\n" ); - - xswa.border_pixel = BlackPixel( display, screen_num ); - xswa.background_pixel = WhitePixel( display, screen_num ); - xswa.cursor = busy; - - xswa.event_mask = KeyPressMask | ExposureMask; - - win = XCreateWindow( display, - RootWindow( display, screen_num ), - win_origin_x, - win_origin_y, - win_width, - win_height, - 10, - depth, - InputOutput, - visual, - CWBackPixel | CWBorderPixel | CWEventMask | CWCursor, - &xswa ); - - XMapWindow( display, win ); - - gcblack = XCreateGC( display, RootWindow( display, screen_num ), - 0L, NULL ); - XSetForeground( display, gcblack, BlackPixel( display, screen_num ) ); - XSetBackground( display, gcblack, WhitePixel( display, screen_num ) ); - - /* allocate colors */ - - if ( gray ) - for ( i = 0; i < 5; i++ ) - { - gray_palette[i] = i; - - color[i].red = - color[i].green = - color[i].blue = 65535 - ( colors[i] * 65535 ) / 63; - - if ( !XAllocColor( display, colormap, &color[i] ) ) - Panic( "ERROR: cannot allocate Color\n" ); - } - - image = XCreateImage( display, - visual, - gray ? depth : 1, - gray ? ZPixmap : XYBitmap, - 0, - (char*)Vio, - win_width, - win_height, - 8, - 0 ); - if ( !image ) - Panic( "ERROR: cannot create image\n" ); - - if ( !gray ) - { - image->byte_order = MSBFirst; - image->bitmap_bit_order = MSBFirst; - } - - /* make window manager happy :-) */ - xtp.value = (unsigned char*)"FreeType"; - xtp.encoding = 31; - xtp.format = 8; - xtp.nitems = strlen( (char*)xtp.value ); - - xsh.x = win_origin_x; - xsh.y = win_origin_y; - - xsh.width = win_width; - xsh.height = win_height; - xsh.flags = (PPosition | PSize); - xsh.flags = 0; - - XSetWMProperties( display, win, &xtp, &xtp, NULL, 0, &xsh, NULL, NULL ); - } - - - int Driver_Set_Graphics( int mode ) - { - if ( mode == Graphics_Mode_Gray ) - { - gray = 1; - vio_ScanLineWidth = 320; - - win_origin_x = 0; - win_origin_y = 0; - win_width = 320; - win_height = 200; - } - else if ( mode == Graphics_Mode_Mono ) - { - gray = 0; - vio_ScanLineWidth = 80; - - win_origin_x = 0; - win_origin_y = 0; - win_width = 640; - win_height = 450; - } - else - Panic( "ERROR: mode %d not supported\n", mode ); - - vio_Width = win_width; - vio_Height = win_height; - - x11init(); - - return 1; /* success */ - } - - - void Put_Image( int x, int y, int w, int h ) - { - XPutImage( display, win, gcblack, image, x, y, x, y, w, h ); - } - - - int Driver_Display_Bitmap( char* buffer, int line, int col ) - { - int z, y, used_col; - char* target; - - - XClearWindow( display, win ); - - /* this displays the Header string in the window title */ - XStoreName( display, win, Header ); - - if ( line > win_height ) - line = win_height; - - if ( !gray ) - { - if ( col > vio_ScanLineWidth ) - used_col = vio_ScanLineWidth; - else - used_col = col; - - target = Vio + ( line - 1 ) * vio_ScanLineWidth; - - for ( y = 0; y < line; y++ ) - { - memcpy( (char*)target, buffer, used_col ); - target -= vio_ScanLineWidth; - buffer += col; - } - - Put_Image( 0, 0, used_col * 8, line ); - image_width = used_col * 8; - image_height = line; - } - else - { - if ( col > win_width ) - used_col = win_width; - else - used_col = col; - - for ( y = line - 1; y >= 0; y-- ) - { - char* bufp; - - - bufp = buffer; - - for ( z = 0; z < used_col; z++ ) - { - int c; - - - c = *bufp++; - - if ( c < 0 || c >= 5 ) /* security check */ - { - /* Message( "weird grayshade: %d\n", c ); */ - c = 0; - } - XPutPixel( image, z, y, color[c].pixel ); - } - - buffer += col; - } - - Put_Image( 0, 0, used_col, line ); - image_width = used_col; - image_height = line; - } - - return 1; - } - - - /* This function maps X keystrokes into GEvents. Note that */ - /* currently only keystrokes events exit this function. */ - - void Get_Event( TEvent* event ) - { - static char key_buffer[10]; - static int key_cursor = 0; - static int key_number = 0; - static XEvent x_event; - KeySym key; - - int i, bool_exit; - char c; - - XComposeStatus compose; - - - bool_exit = key_cursor < key_number; - - XDefineCursor( display, win, idle ); - - while ( !bool_exit ) - { - XNextEvent( display, &x_event ); - - switch ( x_event.type ) - { - case KeyPress: - key_number = XLookupString( &x_event.xkey, - key_buffer, - sizeof ( key_buffer ), - &key, - &compose ); - key_cursor = 0; - - if ( key_number > 0 ) - bool_exit = 1; - break; - - case MappingNotify: - XRefreshKeyboardMapping( &x_event.xmapping ); - break; - - case Expose: -#if 0 - Put_Image( x_event.xexpose.x, - x_event.xexpose.y, - x_event.xexpose.width, - x_event.xexpose.height ); -#else - /* we always redraw the whole image */ - Put_Image( 0, 0, image_width, image_height ); -#endif - break; - - /* You should add more cases to handle mouse events, etc. */ - } - } - - XDefineCursor( display, win, busy ); - XFlush ( display ); - - c = key_buffer[key_cursor++]; - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - event->what = trans[i].event_class; - event->info = trans[i].event_info; - return; - } - } - - event->what = event_Keyboard; - event->info = (int)c; - } - - -/* End */ Index: xc/extras/FreeType/test/arch/win16/Makefile.BC diff -u xc/extras/FreeType/test/arch/win16/Makefile.BC:1.1.1.1 xc/extras/FreeType/test/arch/win16/Makefile.BC:removed --- xc/extras/FreeType/test/arch/win16/Makefile.BC:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/Makefile.BC Wed Mar 16 20:59:51 2005 @@ -1,212 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for BC++ for 16-bit Windows, -# using large model, and using Easy-Win to display console outputs. -# -# Tested with Borland C++ v.4.02, 5.0 -# You will need Borland MAKE (v.3.6 and above should be OK, for oldest -# versions refer to the instructions below). -# -# -# Use this file while in the 'test' directory with the following statement: -# -# make -farch\win16\Makefile.BC -# -# -# A DLL version of the library can be built and then used with -# -# make -DDLL -farch/win16/Makefile.BC dll -# -# (do not forget to define DLL, otherwise the link phase will fail). -# -# -# Debug versions can be obtained with -# -# make -DDEBUG -farch\win16\Makefile.BC -# -# Special versions enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# make -DBIGFONTS -farch\msdos\Makefile.BC - -ARCH = arch\win16 -FT_MAKEFILE = $(ARCH)\Makefile.BC -FT_DLL = ft13_16.dll - -CC = bcc - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend -SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -w-pia - -# Credits go to Dave Hoo for pointing out that modern -# Borland compilers (from BC++ 3.1 on) can increase the limit of -# the length of identifiers. -CFLAGS = -WSE -ml -A -i40 $(INCDIRS) $(SPURIOUS_WARNINGS) - -!if ! $d(DEBUG) -CFLAGS = $(CFLAGS) -O2 -3 -LDFLAGS = -ml -W -lC -!else -CFLAGS = $(CFLAGS) -v -N -LDFLAGS = -v -ml -W -lC -!endif - -!if $d(DLL) -CFLAGS = $(CFLAGS) -DFREETYPE_DLL -!endif - - -# Windows graphic driver -GDRIVER = $(ARCH)\gw_win16.c - -DISPLAY = display.c - -G1SRC = gmain.c blitter.c $(GDRIVER) -GSRC = $(DISPLAY) $(G1SRC) - -GOBJ = $(GSRC:.c=.obj) -G1OBJ = $(G1SRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - $(CC) -c -o$* @&&| - $(CFLAGS) $< -| - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!if !$d(DEBUG) -# Skipped if DEBUG build -all: freetype $(EXEFILES) - -dll: the_dll $(EXEFILES) - -!else -# Skipped if non-DEBUG build -default_target: debug -dll: the_debug_dll $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - - -!if $d(BIGFONTS) -MAKEBIG = -DBIGFONTS -!endif - -freetype: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) $(MAKEBIG) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG $(MAKEBIG) debug - cd ..\test - -the_dll: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDLL $(MAKEBIG) dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - -the_debug_dll: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG -DDLL $(MAKEBIG) dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - - -# C compilers are unable to include 16-bit in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| - - -# Borland versions of make are unable to use the $** variable inside -# implicit rules (like .obj.exe:). The job have to be done by hand. :-( -ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj arabic.obj \ - $(LIBDIR)\libttf.lib - -fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib - -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib - -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftsbit.obj common.obj $(LIBDIR)\libttf.lib - -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftmetric.obj common.obj $(LIBDIR)\libttf.lib - -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -del *.dll - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - -!include "$(ARCH)\depend.win" - -# end of Makefile Index: xc/extras/FreeType/test/arch/win16/Makefile.MS diff -u xc/extras/FreeType/test/arch/win16/Makefile.MS:1.1.1.1 xc/extras/FreeType/test/arch/win16/Makefile.MS:removed --- xc/extras/FreeType/test/arch/win16/Makefile.MS:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/Makefile.MS Wed Mar 16 20:59:51 2005 @@ -1,145 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Microsoft C compilers -# for 16-bit Windows, large model, using QuickWin to display console -# outputs. It also works for Visual C++ 1.x 16-bits compiler, but -# you should instead use the Makefile customized for it, Makefile.VC. -# -# You will need NMAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake /f arch\win16\Makefile.MS -# -# -# A debug version can be obtained with -# -# nmake DEBUG=1 /f arch\win16\Makefile.MS - -ARCH = arch\win16 -FT_MAKEFILE = $(ARCH)\Makefile.MS -FT_MAKE = $(MAKE) /nologo - -CC = cl /nologo - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend - -!ifndef DEBUG -CFLAGS = /Ox /AL /Za /W2 /G2 $(INCDIRS) -LDFLAGS = /AL -!else -CFLAGS = /Zi /AL /Za /W2 /G2 $(INCDIRS) -LDFLAGS = /Zi /AL -!endif - -CFLAGS = $(CFLAGS) /GA /Mq -LDFLAGS = $(LDFLAGS) /GA /Mq - - -# Windows graphic driver -GDRIVER = $(ARCH)\gw_win16.c - -GSRC = display.c gmain.c blitter.c $(GDRIVER) - -GOBJ = $(GSRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - @$(CC) /c /Fo$* @<< - $(CFLAGS) $< -<< - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skiped if DEBUG build -all: freetype $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -freetype: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 debug - cd ..\test - - -# C compilers are unable to include 16-bit in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - @$(CC) /c /Fo$* @<< - $(CFLAGS) /Ze $(GDRIVER) -<< - -.obj.exe: - $(CC) /Fe$* @<< - $(LDFLAGS) $** -<< - -ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib -fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - - -!include "$(ARCH)\depend.win" - -# end of Makefile.MS Index: xc/extras/FreeType/test/arch/win16/Makefile.VC diff -u xc/extras/FreeType/test/arch/win16/Makefile.VC:1.1.1.1 xc/extras/FreeType/test/arch/win16/Makefile.VC:removed --- xc/extras/FreeType/test/arch/win16/Makefile.VC:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/Makefile.VC Wed Mar 16 20:59:51 2005 @@ -1,187 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Microsoft Visual C++ 1.x -# and Microsoft C/C++ v.7.0 compilers for 16-bit Windows, large model, -# using QuickWin to display console outputs. -# -# You will need NMAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake /f arch\win16\Makefile.VC -# -# A DLL version of the library can be built and then used with -# -# nmake DLL=1 /f arch\win16\Makefile.VC dll -# -# (do not forget to define DLL, otherwise the link phase will fail). -# -# -# Debug versions can be obtained with -# -# nmake DEBUG=1 /f arch\win16\Makefile.VC -# -# Special versions enabled to handle big fonts (with more than 16,384 -# glyphs) can be obtained with -# -# nmake BIGFONTS=1 /f arch\win16\Makefile.VC - -ARCH = arch\win16 -FT_MAKEFILE = $(ARCH)\Makefile.VC -FT_MAKE = $(MAKE) /nologo -FT_DLL = ft13_16.dll - -CC = cl /nologo - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend - -# One can also consider using "set MSC_CMD_FLAGS=/Gr /Op- /Gy /YX". -# With Microsoft C/C++ 7.0, use /G2 instead of /G3. -!ifndef DEBUG -CFLAGS = /Ox /AL /Za /W2 /G3 $(INCDIRS) -LDFLAGS = /AL -!else -CFLAGS = /Zi /Ge /AL /Za /W2 /G3 $(INCDIRS) -LDFLAGS = /Zi /AL -!endif - -CFLAGS = $(CFLAGS) /Mq -LDFLAGS = $(LDFLAGS) /Mq - -!ifdef DLL -CFLAGS = $(CFLAGS) /DFREETYPE_DLL -!endif - - -# Windows graphic driver -GDRIVER = $(ARCH)\gw_win16.c - -GSRC = display.c gmain.c blitter.c $(GDRIVER) - -GOBJ = $(GSRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - @$(CC) /c /Fo$* @<< - $(CFLAGS) $< -<< - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skiped if DEBUG build -all: freetype $(EXEFILES) - -dll: the_dll $(EXEFILES) - -!else -# Skipped if non-DEBUG build -default_target: debug -dll: the_debug_dll $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -!ifdef BIGFONTS -MAKEBIG = BIGFONTS=1 -!endif - -freetype: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) $(MAKEBIG) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 $(MAKEBIG) debug - cd ..\test - -the_dll: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DLL=1 $(MAKEBIG) dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - -the_debug_dll: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 DLL=1 $(MAKEBIG) dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - - -# C compilers are unable to include 16-bit in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - @$(CC) /c /Fo$* @<< - $(CFLAGS) /Ze $(GDRIVER) -<< - -.obj.exe: - $(CC) /Fe$* @<< - $(LDFLAGS) $** -<< - -ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib -fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -del *.dll - -del *.pdb - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - - -!include "$(ARCH)\depend.win" - -# end of Makefile.VC Index: xc/extras/FreeType/test/arch/win16/depend.win diff -u xc/extras/FreeType/test/arch/win16/depend.win:1.1.1.1 xc/extras/FreeType/test/arch/win16/depend.win:removed --- xc/extras/FreeType/test/arch/win16/depend.win:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/depend.win Wed Mar 16 20:59:51 2005 @@ -1,52 +0,0 @@ -# This dependency file to be used with various Windows compilers -# has been generated automatically with the script `makedep' on -# 02-Sep-1999. - -arabic.obj: arabic.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h -blitter.obj: blitter.c blitter.h -common.obj: common.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -display.obj: display.c display.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gmain.h -fdebug.obj: fdebug.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\tttypes.h ..\lib\ttconfig.h \ - ..\lib\arch\win16\ft_conf.h ..\lib\ttdebug.h ..\lib\ttobjs.h \ - ..\lib\ttengine.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -ftdump.obj: ftdump.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxcmap.h ..\lib\extend\ftxopen.h \ - ..\lib\extend\ftxgdef.h ..\lib\extend\ftxgsub.h \ - ..\lib\extend\ftxgpos.h ..\lib\extend\ftxsbit.h ..\lib\ttobjs.h \ - ..\lib\ttconfig.h ..\lib\arch\win16\ft_conf.h ..\lib\ttengine.h \ - ..\lib\tttypes.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -fterror.obj: fterror.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxerr18.h \ - ..\lib\arch\win16\ft_conf.h -ftlint.obj: ftlint.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\arch\win16\ft_conf.h -ftmetric.obj: ftmetric.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\win16\ft_conf.h -ftsbit.obj: ftsbit.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\win16\ft_conf.h -ftstring.obj: ftstring.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h display.h gevents.h gdriver.h gmain.h -ftstrpnm.obj: ftstrpnm.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -ftstrtto.obj: ftstrtto.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h blitter.h common.h \ - display.h ..\lib\extend\ftxkern.h ..\lib\extend\ftxsbit.h gdriver.h \ - gevents.h gmain.h -fttimer.obj: fttimer.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gdriver.h gevents.h gmain.h -ftview.obj: ftview.c blitter.h common.h display.h \ - ..\lib\extend\ftxsbit.h gdriver.h gevents.h gmain.h -ftzoom.obj: ftzoom.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxpost.h gdriver.h gevents.h gmain.h -gmain.obj: gmain.c gdriver.h gmain.h -!ifndef __MAKE__ -arch\win16\gw_win16.obj: arch\win16\gw_win16.c gdriver.h gevents.h gmain.h -!endif Index: xc/extras/FreeType/test/arch/win16/gw_win16.c diff -u xc/extras/FreeType/test/arch/win16/gw_win16.c:1.1.1.1 xc/extras/FreeType/test/arch/win16/gw_win16.c:removed --- xc/extras/FreeType/test/arch/win16/gw_win16.c:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/gw_win16.c Wed Mar 16 20:59:51 2005 @@ -1,430 +0,0 @@ -/******************************************************************* - * - * gw_win16.c graphics driver for 16-bit Windows platform. 0.1 - * - * This is the driver for displaying inside a window under 16-bit - * Microsoft Windows, used by the graphics utility of the - * FreeType test suite. - * - * Written by Antoine Leca. - * Copyright 1999 by Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * Borrowing liberally from the other FreeType drivers. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#include - -#include - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -/* The following #ifdef are used to define the following macros : */ -/* */ -/* - hInst : variable containing the handle of the current instance. */ -/* - hPrev : variable containing the handle of the previous instance. */ -/* */ - -/* ---- Microsoft C compilers support ------------------------------------ */ - -#if defined( M_I86 ) || defined( _M_I86 ) - -extern HINSTANCE _hInstance, _hPrevInstance; -#define hInst _hInstance -#define hPrev _hPrevInstance - -#endif - -/* ---- Borland C compiler support --------------------------------------- */ - -#ifdef __TURBOC__ - -#pragma option -A- - -extern HINSTANCE _hInstance, _hPrev; -#define hInst _hInstance -#define hPrev _hPrev - -#endif - - -#if !defined ( hInst ) || !defined ( hPrev ) -#error Your compiler is not (yet) supported. Check the source file! -#endif - -/* ---- Common initialisations ------------------------------------------- */ - -/* Size of the window. */ -#define WIN_WIDTH 640u -#define WIN_HEIGHT 400u -/* The values will be divided by 2 for gray-scale rendering. */ - -/* These values can be changed, but WIN_WIDTH should remain for now a */ -/* multiple of 32 to avoid padding issues. */ - -/* Also, to avoid 16-bit overflowing issues, the product */ -/* WIN_WIDTH * WIN_HEIGHT should not excess 512K for monochrome */ -/* rendering, and 256K for gray-scale rendering. */ - - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - /* handle of the window. */ - static HWND hwndGraphic; - - /* bitmap information */ - static LPBITMAPINFO pbmi; - static HBITMAP hbm; - - /* local event to pass on */ - static TEvent ourevent = { event_Quit, 0 }; - static int eventToProcess = 0; - - /* array defined in the test programs */ - extern char Header[]; - - -/* restores screen to its original state */ - -int Driver_Restore_Mode() - { - /* The graphical window has perhaps already destroyed itself */ - if ( hwndGraphic ) { - DestroyWindow ( hwndGraphic ); - PostMessage ( hwndGraphic, WM_QUIT, 0, 0 ); - } - - if ( pbmi ) free ( pbmi ); - - return 1; - } - - -/* - * set graphics mode - * and create the window class and the message handling. - */ - -/* Declarations of the Windows-specific functions that are below. */ -static BOOL RegisterTheClass ( void ); -static BOOL CreateTheWindow ( int width, int height ); - - -int Driver_Set_Graphics ( int mode ) - { - int i; - static const RGBQUAD gray_scale[5] = { - { 0xFF, 0xFF, 0xFF, 0 }, /* white */ - { 0xC0, 0xC0, 0xC0, 0 }, - { 0x80, 0x80, 0x80, 0 }, - { 0x40, 0x40, 0x40, 0 }, - { 0, 0, 0, 0 } }; /* black */ - - if( ! RegisterTheClass() ) return 0; /* if already running, fails. */ - - /* find some memory for the bitmap header */ - if ( (pbmi = malloc ( sizeof ( BITMAPINFO ) + sizeof ( RGBQUAD ) * 256 ) ) - /* 256 should really be 2 if not grayscale */ - == NULL ) - /* lack of memory; fails the process */ - return 0; - - /* initialize the header to appropriate values */ - memset( pbmi, 0, sizeof ( BITMAPINFO ) + sizeof ( RGBQUAD ) * 256 ); - - switch ( mode ) - { - case Graphics_Mode_Mono: - pbmi->bmiHeader.biBitCount = 1; - pbmi->bmiColors[0] = gray_scale[0]; - pbmi->bmiColors[1] = gray_scale[4]; - - vio_ScanLineWidth = WIN_WIDTH / 8; - vio_Width = WIN_WIDTH; - vio_Height = WIN_HEIGHT; - - break; - - case Graphics_Mode_Gray: - pbmi->bmiHeader.biBitCount = 8; - pbmi->bmiHeader.biClrUsed = 5; - - memcpy ( &pbmi->bmiColors[0], gray_scale, sizeof gray_scale ); - - vio_ScanLineWidth = WIN_WIDTH / 2; - vio_Width = WIN_WIDTH / 2; - vio_Height = WIN_HEIGHT/ 2; - - for ( i = 0; i < 5; ++i ) - gray_palette[i] = i; - - break; - - default: - - free ( pbmi ); - return 0; /* Unknown mode */ - } - - pbmi->bmiHeader.biSize = sizeof ( BITMAPINFOHEADER ); - pbmi->bmiHeader.biWidth = vio_Width; - pbmi->bmiHeader.biHeight = vio_Height; - pbmi->bmiHeader.biPlanes = 1; - - if ( (long) vio_Height * vio_ScanLineWidth > 0xFFE0ul ) - /* too big to work on 16-bit; fails the process */ - { - free ( pbmi ); - return 0; - } - - if( ! CreateTheWindow ( vio_Width, vio_Height ) ) - { - free ( pbmi ); - return 0; - } - - return 1; /* success even if the window was not built. */ - } - - -int Driver_Display_Bitmap ( char* buffer, int lines, int cols ) - { - HDC hDC; - - if ( cols * 8 != pbmi->bmiHeader.biWidth * pbmi->bmiHeader.biBitCount ) - pbmi->bmiHeader.biWidth = cols * 8 / pbmi->bmiHeader.biBitCount; - - hDC = GetDC ( hwndGraphic ); - SetDIBits ( hDC, hbm, 0, lines, buffer, pbmi, DIB_RGB_COLORS ); - ReleaseDC ( hwndGraphic, hDC ); - - ShowWindow( hwndGraphic, SW_SHOW ); - InvalidateRect ( hwndGraphic, NULL, FALSE ); - UpdateWindow ( hwndGraphic ); - - return 1; /* success */ - } - - -void Get_Event( TEvent* event ) - { - MSG msg; - - if ( hwndGraphic ) - { - SetWindowText ( hwndGraphic, Header ); - } - - do { - while ( PeekMessage( &msg, 0, 0, 0, PM_REMOVE ) ) { - TranslateMessage ( &msg ); - DispatchMessage ( &msg ); - } - if ( ! eventToProcess ) - WaitMessage(); - } while ( ! eventToProcess ); - - event->what = ourevent.what; - event->info = ourevent.info; - eventToProcess = 0; - return; - } - - -/* ---- Windows-specific stuff ------------------------------------------- */ - -LRESULT CALLBACK Message_Process( HWND, UINT, WPARAM, LPARAM ); - -static -BOOL RegisterTheClass ( void ) - { - WNDCLASS ourClass = { - /* UINT style */ 0, - /* WNDPROC lpfnWndProc */ Message_Process, - /* int cbClsExtra */ 0, - /* int cbWndExtra */ 0, - /* HANDLE hInstance */ 0, - /* HICON hIcon */ 0, - /* HCURSOR hCursor */ 0, - /* HBRUSH hbrBackground*/ 0, - /* LPCTSTR lpszMenuName */ NULL, - /* LPCTSTR lpszClassName*/ "FreeTypeTestGraphicDriver16" - }; - - if( hPrev ) - /* There is another instance of the same program. */ - /* No need to register the class. */ - return 1; - - ourClass.hInstance = hInst; - ourClass.hIcon = LoadIcon(0, IDI_APPLICATION); - ourClass.hCursor = LoadCursor(0, IDC_ARROW); - ourClass.hbrBackground= GetStockObject(BLACK_BRUSH); - - return RegisterClass(&ourClass) != 0; /* return False if it fails. */ - } - -static -BOOL CreateTheWindow ( int width, int height ) - { - if ( ! (hwndGraphic = CreateWindow( - /* LPCSTR lpszClassName; */ "FreeTypeTestGraphicDriver16", - /* LPCSTR lpszWindowName; */ "FreeType Test Graphic Driver", - /* DWORD dwStyle; */ WS_OVERLAPPED | WS_SYSMENU, - /* int x; */ CW_USEDEFAULT, - /* int y; */ CW_USEDEFAULT, - /* int nWidth; */ width + 2*GetSystemMetrics(SM_CXBORDER), - /* int nHeight; */ height+ GetSystemMetrics(SM_CYBORDER) - + GetSystemMetrics(SM_CYCAPTION), - /* HWND hwndParent; */ HWND_DESKTOP, - /* HMENU hmenu; */ 0, - /* HINSTANCE hinst; */ hInst, - /* void FAR* lpvParam; */ NULL)) - ) - /* creation failed... */ - return 0; - - return 1; - } - - /* Message processing for our Windows class */ -LRESULT CALLBACK Message_Process( HWND handle, UINT mess, - WPARAM wParam, LPARAM lParam ) - { - - switch( mess ) - { - case WM_DESTROY: - /* warn the main thread to quit if it didn't know */ - ourevent.what = event_Quit; - ourevent.info = 0; - eventToProcess = 1; - hwndGraphic = 0; - PostQuitMessage ( 0 ); - DeleteObject ( hbm ); - break; - - case WM_CREATE: - { - HDC hDC; - - hDC = GetDC ( handle ); - hbm = CreateDIBitmap ( - /* HDC hdc; handle of device context */ hDC, - /* BITMAPINFOHEADER FAR* lpbmih; addr.of header*/ &pbmi->bmiHeader, - /* DWORD dwInit; CBM_INIT to initialize bitmap */ 0, - /* const void FAR* lpvBits; address of values */ NULL, - /* BITMAPINFO FAR* lpbmi; addr.of bitmap data */ pbmi, - /* UINT fnColorUse; RGB or palette indices */ DIB_RGB_COLORS); - ReleaseDC ( handle, hDC ); - break; - } - - case WM_PAINT: - { - HDC hDC, memDC; - HANDLE oldbm; - PAINTSTRUCT ps; - - hDC = BeginPaint ( handle, &ps ); - memDC = CreateCompatibleDC(hDC); - oldbm = SelectObject(memDC, hbm); - BitBlt ( hDC, 0, 0, vio_Width, vio_Height, memDC, 0, 0, SRCCOPY); - ReleaseDC ( handle, hDC ); - SelectObject ( memDC, oldbm ); - DeleteObject ( memDC ); - EndPaint ( handle, &ps ); - } - - case WM_KEYDOWN: - switch ( wParam ) - { - case VK_ESCAPE: - ourevent.what = event_Quit; - ourevent.info = 0; - eventToProcess = 1; - break; - - case VK_F1: /* bring up help and about dialog window */ - break; - } - break; - - case WM_CHAR: - { - char c = wParam ; - int i; - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - ourevent.what = trans[i].event_class; - ourevent.info = trans[i].event_info; - eventToProcess = 1; - return 0; - } - } - - /* unrecognized keystroke */ - ourevent.what = event_Keyboard; - ourevent.info = (int)c; - eventToProcess = 1; - } - break; - - default: - return DefWindowProc( handle, mess, wParam, lParam ); - } - - return 0; - } - -/* End */ Index: xc/extras/FreeType/test/arch/win16/makedep diff -u xc/extras/FreeType/test/arch/win16/makedep:1.1.1.1 xc/extras/FreeType/test/arch/win16/makedep:removed --- xc/extras/FreeType/test/arch/win16/makedep:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win16/makedep Wed Mar 16 20:59:51 2005 @@ -1,30 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for older compilers -# on the Windows 16-bit platform. -# -# If you run this script under non-Windows operating systems, expect -# warnings that `windows.h' can't be found. - -echo "\ -# This dependency file to be used with various Windows compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.win - -(cd ../.. - gcc -MM -I../lib/arch/win16 -I../lib -I../lib/extend -I. \ - *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.win - -echo "!ifndef __MAKE__" >> depend.win - -(cd ../.. - gcc -MM -I../lib/arch/win16 -I../lib -I../lib/extend -I. \ - -DhInst -DhPrev arch/win16/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\win16\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.win - -echo "!endif" >> depend.win - -# eof Index: xc/extras/FreeType/test/arch/win32/Makefile.BC diff -u xc/extras/FreeType/test/arch/win32/Makefile.BC:1.1.1.1 xc/extras/FreeType/test/arch/win32/Makefile.BC:removed --- xc/extras/FreeType/test/arch/win32/Makefile.BC:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/Makefile.BC Wed Mar 16 20:59:51 2005 @@ -1,197 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for BC++ for Win32. -# -# Tested with Borland C++ v.4.02, 5.0, and Borland C++ builder 4. -# You will need Borland MAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# make -farch\win32\Makefile.BC -# -# -# A DLL version of the library can be built and then used with -# -# make -DDLL -farch/win16/Makefile.BC dll -# -# (do not forget to define DLL, otherwise the link phase will fail). -# -# -# A debug version can be obtained with -# -# make -DDEBUG -farch\win32\Makefile.BC - -ARCH = arch\win32 -FT_MAKEFILE = $(ARCH)\Makefile.BC -FT_DLL = ft13_32.dll - -CC = bcc32 - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR);$(LIBDIR)\$(ARCH);.;$(LIBDIR)\extend -SPURIOUS_WARNINGS = -w-nak -w-par -w-use -w-aus -w-stu -w-stv -w-cln -w-sig -w-pia -CFLAGS = -i48 $(INCDIRS) $(SPURIOUS_WARNINGS) - -!ifndef DEBUG -CFLAGS = $(CFLAGS) -O2 -A -LDFLAGS = -WC -!else -CFLAGS = $(CFLAGS) -v -LDFLAGS = -v -WC -!endif - -!ifdef DLL -CFLAGS = $(CFLAGS) -DFREETYPE_DLL -!endif - -# Windows graphic driver -GDRIVER = $(ARCH)\gw_win32.c - -DISPLAY = display.c - -G1SRC = gmain.c blitter.c $(GDRIVER) -GSRC = $(DISPLAY) $(G1SRC) - -GOBJ = $(GSRC:.c=.obj) -G1OBJ = $(G1SRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - $(CC) -c -o$* @&&| - $(CFLAGS) $< -| - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skipped if DEBUG build -all: freetype $(EXEFILES) - -dll: the_dll $(EXEFILES) - -!else -# Skipped if non-DEBUG build -default_target: debug -dll: the_debug_dll $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -freetype: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG debug - cd ..\test - -the_dll: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDLL dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - -the_debug_dll: - cd $(LIBDIR) - make -f$(FT_MAKEFILE) -DDEBUG -DDLL dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - - -# C compilers are unable to include in ANSI mode, -# because of the // comments... -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - $(CC) -c -o$* @&&| - $(CFLAGS) -A- $*.c -| - - -# Borland versions of make are unable to use the $** variable inside -# implicit rules (like .obj.exe:). The job have to be done by hand. :-( -ftzoom.exe: $(G1OBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftzoom.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftview.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstring.obj $(GOBJ) common.obj $(LIBDIR)\libttf.lib - -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrtto.obj $(GOBJ) common.obj arabic.obj \ - $(LIBDIR)\libttf.lib - -fttimer.exe: $(G1OBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fttimer.obj $(G1OBJ) common.obj $(LIBDIR)\libttf.lib - -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftlint.obj common.obj $(LIBDIR)\libttf.lib - -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftdump.obj common.obj $(LIBDIR)\libttf.lib - -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib - -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftsbit.obj common.obj $(LIBDIR)\libttf.lib - -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) ftmetric.obj common.obj $(LIBDIR)\libttf.lib - -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - $(CC) $(LDFLAGS) fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - make -f$(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -del *.dll - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - -del *.tds - -!include "$(ARCH)\depend.win" - -# end of Makefile Index: xc/extras/FreeType/test/arch/win32/Makefile.CL diff -u xc/extras/FreeType/test/arch/win32/Makefile.CL:1.1.1.1 xc/extras/FreeType/test/arch/win32/Makefile.CL:removed --- xc/extras/FreeType/test/arch/win32/Makefile.CL:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/Makefile.CL Wed Mar 16 20:59:51 2005 @@ -1,175 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for Microsoft Visual C++. -# -# You will need NMAKE. -# -# -# Use this file while in the 'test' directory with the following statement: -# -# nmake /f arch\win32\Makefile.CL -# -# A DLL version of the library can be built and then used with -# -# nmake DLL=1 /f arch\win32\Makefile.CL dll -# -# (do not forget to define DLL, otherwise the link phase will fail). -# -# -# Debug versions can be obtained with -# -# nmake DEBUG=1 /f arch\win32\Makefile.CL - -ARCH = arch\win32 -FT_MAKEFILE = $(ARCH)\Makefile.CL -FT_MAKE = $(MAKE) /nologo -FT_DLL = ft13_32.dll - -CC = cl /nologo - -LIBDIR = ..\lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)\$(ARCH) -I. -I$(LIBDIR)\extend - -CFLAGS_ANSI = /Za -!ifndef DEBUG -CFLAGS = /Ox /W2 $(INCDIRS) -LDFLAGS = -!else -CFLAGS = /Zi /Ge /W2 $(INCDIRS) -LDFLAGS = /Zi -!endif - -!ifdef DLL -CFLAGS = $(CFLAGS) /DEXPORT_DEF=__declspec(dllexport) /DFREETYPE_DLL -!endif - - -# Windows graphic driver -GDRIVER = $(ARCH)\gw_win32.c - -GSRC = display.c gmain.c blitter.c $(GDRIVER) - -GOBJ = $(GSRC:.c=.obj) - - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -OBJ = $(SRC:.c=.obj) - - -.c.obj: - @$(CC) /c /Fo$* @<< - $(CFLAGS) $(CFLAGS_ANSI) $< -<< - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -!ifndef DEBUG -# Skiped if DEBUG build -all: freetype $(EXEFILES) - -dll: the_dll $(EXEFILES) - -!else -# Skipped if non-DEBUG build -default_target: debug -dll: the_debug_dll $(EXEFILES) - -!endif - -debug: freetype_debug $(EXEFILES) - -freetype: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) all - cd ..\test - -freetype_debug: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 debug - cd ..\test - -the_dll: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DLL=1 dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - -the_debug_dll: - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) DEBUG=1 DLL=1 dll - cd ..\test - -copy $(LIBDIR)\$(FT_DLL) - - -# C compilers are unable to include 32-bit in ANSI mode. -# So we have a special rule for this file, to build it outside ANSI. -$(GDRIVER:.c=.obj): - $(CC) /c /Fo$* @<< - $(CFLAGS) /Ze $(GDRIVER) -<< - -.obj.exe: - $(CC) /Fe$* @<< - $(LDFLAGS) $** GDI32.LIB USER32.LIB -<< - -ftzoom.exe: $(GOBJ) ftzoom.obj common.obj $(LIBDIR)\libttf.lib -ftview.exe: $(GOBJ) ftview.obj common.obj $(LIBDIR)\libttf.lib -ftstring.exe: $(GOBJ) ftstring.obj common.obj $(LIBDIR)\libttf.lib -ftstrtto.exe: $(GOBJ) ftstrtto.obj common.obj arabic.obj $(LIBDIR)\libttf.lib -fttimer.exe: $(GOBJ) fttimer.obj common.obj $(LIBDIR)\libttf.lib -ftlint.exe: ftlint.obj common.obj $(LIBDIR)\libttf.lib -ftdump.exe: ftdump.obj common.obj $(LIBDIR)\libttf.lib -ftstrpnm.exe: ftstrpnm.obj common.obj $(LIBDIR)\libttf.lib -ftsbit.exe: ftsbit.obj common.obj $(LIBDIR)\libttf.lib -ftmetric.exe: ftmetric.obj common.obj $(LIBDIR)\libttf.lib -fterror.exe: fterror.obj common.obj $(LIBDIR)\libttf.lib - - -clean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) clean - cd ..\test - -distclean: do_clean - cd $(LIBDIR) - $(FT_MAKE) /f $(FT_MAKEFILE) distclean - cd ..\test - -del *.exe - -del *.dll - -del *.pdb - -do_clean: - -del *.obj - -del $(ARCH)\*.obj - -del *.ilk - -del *.pch - -del *.exp - - -!include "$(ARCH)\depend.win" - -# end of Makefile.CL Index: xc/extras/FreeType/test/arch/win32/Makefile.Min diff -u xc/extras/FreeType/test/arch/win32/Makefile.Min:1.1.1.1 xc/extras/FreeType/test/arch/win32/Makefile.Min:removed --- xc/extras/FreeType/test/arch/win32/Makefile.Min:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/Makefile.Min Wed Mar 16 20:59:51 2005 @@ -1,122 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for MinGW32 gcc under Win9x. -# -# You will need a port of GNU make; the MingW32 port works. -# -# Use this file while in the 'test' directory with the following statement: -# -# make -f arch/win32/Makefile.min - -ARCH = arch/win32 -FT_MAKEFILE = $(ARCH)/Makefile.min - -CC = gcc - -LIBDIR = ../lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -ifdef DEBUG - -CFLAGS = -ansi -pedantic -Wall -O2 -g $(INCDIRS) -LDFLAGS = -g -luser32 -lgdi32 - -else - -CFLAGS = -ansi -pedantic -Wall -O2 -s $(INCDIRS) -LDFLAGS = -s -luser32 -lgdi32 - -endif - - -# graphic Windows driver -GDRIVER = $(ARCH)/gw_win32.c - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -GSRC = gmain.c display.c blitter.c $(GDRIVER) -GOBJ = $(GSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - - -%.exe: - $(CC) $(LDFLAGS) -o $@ $^ - - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - -ftzoom.exe: $(GOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -fterror.exe: fterror.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -del dep.end - -del *.exe - -del core - -do_clean: - -del *.o - -del response - -del $(subst /,\,$(GDRIVER:.c=.o)) - -depend: $(SRC) $(GSRC) - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/test/arch/win32/Makefile.gcc diff -u xc/extras/FreeType/test/arch/win32/Makefile.gcc:1.1.1.1 xc/extras/FreeType/test/arch/win32/Makefile.gcc:removed --- xc/extras/FreeType/test/arch/win32/Makefile.gcc:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/Makefile.gcc Wed Mar 16 20:59:51 2005 @@ -1,131 +0,0 @@ -# This file is part of the FreeType project. -# -# It builds the library and test programs for gcc under Win32. -# -# You will need GNU make. -# -# Use this file while in the 'test' directory with the following statement: -# -# make -f arch/win32/Makefile.gcc -# -# -# If you have the GNU gettext package installed, you can also try -# -# make -f arch/win32/Makefile.gcc HAVE_GETTEXT - -ARCH = arch/win32 -FT_MAKEFILE = $(ARCH)/Makefile.gcc - -CC = gcc - -LIBDIR = ../lib -INCDIRS = -I$(LIBDIR) -I$(LIBDIR)/$(ARCH) -I. -I$(LIBDIR)/extend - -ifndef GETTEXT -GETTEXT=NO_GETTEXT -endif - -CFLAGS = -Wall -ansi -O2 -g $(INCDIRS) -# -D$(GETTEXT) -# CFLAGS = -ansi -Wall -O2 -s $(INCDIRS) -D$(GETTEXT) - - -# graphic Windows driver -GDRIVER = $(ARCH)/gw_win32.c - -SRC = arabic.c \ - common.c \ - ftdump.c \ - fterror.c \ - ftlint.c \ - ftmetric.c \ - ftsbit.c \ - ftstring.c \ - ftstrpnm.c \ - ftstrtto.c \ - fttimer.c \ - ftview.c \ - ftzoom.c - -GSRC = gmain.c display.c blitter.c $(GDRIVER) -GOBJ = $(GSRC:.c=.o) - - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - - -ifeq ($(GETTEXT),HAVE_GETTEXT) -%.exe: - $(CC) $(CFLAGS) -o $@ $^ -lintl -else -%.exe: - $(CC) $(CFLAGS) -o $@ $^ -endif - - -EXEFILES = ftdump.exe \ - fterror.exe \ - ftlint.exe \ - ftmetric.exe \ - ftsbit.exe \ - ftstring.exe \ - ftstrpnm.exe \ - ftstrtto.exe \ - fttimer.exe \ - ftview.exe \ - ftzoom.exe - -.PHONY: all debug freetype freetype_debug \ - clean distclean do_clean depend - - -all: freetype $(EXEFILES) - -debug: freetype_debug $(EXEFILES) - -HAVE_GETTEXT: - $(MAKE) -f $(FT_MAKEFILE) GETTEXT=HAVE_GETTEXT all - -freetype: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) all - -freetype_debug: - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) debug - -ftzoom.exe: $(GOBJ) ftzoom.o common.o $(LIBDIR)/libttf.a -ftview.exe: $(GOBJ) ftview.o common.o $(LIBDIR)/libttf.a -ftlint.exe: ftlint.o common.o $(LIBDIR)/libttf.a -ftdump.exe: ftdump.o common.o $(LIBDIR)/libttf.a -fterror.exe: fterror.o common.o $(LIBDIR)/libttf.a -ftstring.exe: $(GOBJ) ftstring.o common.o $(LIBDIR)/libttf.a -fttimer.exe: $(GOBJ) fttimer.o common.o $(LIBDIR)/libttf.a -ftstrpnm.exe: ftstrpnm.o common.o $(LIBDIR)/libttf.a -ftsbit.exe: ftsbit.o common.o $(LIBDIR)/libttf.a -ftmetric.exe: ftmetric.o common.o $(LIBDIR)/libttf.a -ftstrtto.exe: $(GOBJ) ftstrtto.o common.o arabic.o $(LIBDIR)/libttf.a - - -clean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) clean - -distclean: do_clean - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) distclean - -del dep.end - -del *.exe - -del core - -do_clean: - -del *.o - -del response - -del $(GDRIVER:.c=.o) - -depend: $(SRC) $(GSRC) - $(MAKE) -C $(LIBDIR) -f $(FT_MAKEFILE) depend - $(CC) -E -M $(INCDIRS) $^ > dep.end - -ifeq (dep.end,$(wildcard dep.end)) - include dep.end -endif - -# end of Makefile.gcc Index: xc/extras/FreeType/test/arch/win32/depend.win diff -u xc/extras/FreeType/test/arch/win32/depend.win:1.1.1.1 xc/extras/FreeType/test/arch/win32/depend.win:removed --- xc/extras/FreeType/test/arch/win32/depend.win:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/depend.win Wed Mar 16 20:59:51 2005 @@ -1,52 +0,0 @@ -# This dependency file to be used with various Windows compilers -# has been generated automatically with the script `makedep' on -# 03-Sep-1999. - -arabic.obj: arabic.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h -blitter.obj: blitter.c blitter.h -common.obj: common.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -display.obj: display.c display.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gmain.h -fdebug.obj: fdebug.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\tttypes.h ..\lib\ttconfig.h \ - ..\lib\arch\win32\ft_conf.h ..\lib\ttdebug.h ..\lib\ttobjs.h \ - ..\lib\ttengine.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -ftdump.obj: ftdump.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxcmap.h ..\lib\extend\ftxopen.h \ - ..\lib\extend\ftxgdef.h ..\lib\extend\ftxgsub.h \ - ..\lib\extend\ftxgpos.h ..\lib\extend\ftxsbit.h ..\lib\ttobjs.h \ - ..\lib\ttconfig.h ..\lib\arch\win32\ft_conf.h ..\lib\ttengine.h \ - ..\lib\tttypes.h ..\lib\ttmutex.h ..\lib\ttcache.h ..\lib\tttables.h \ - ..\lib\ttcmap.h -fterror.obj: fterror.c ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxerr18.h \ - ..\lib\arch\win32\ft_conf.h -ftlint.obj: ftlint.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\arch\win32\ft_conf.h -ftmetric.obj: ftmetric.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\win32\ft_conf.h -ftsbit.obj: ftsbit.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxsbit.h ..\lib\arch\win32\ft_conf.h -ftstring.obj: ftstring.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h display.h gevents.h gdriver.h gmain.h -ftstrpnm.obj: ftstrpnm.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h -ftstrtto.obj: ftstrtto.c arabic.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxopen.h ..\lib\extend\ftxgdef.h \ - ..\lib\extend\ftxgsub.h ..\lib\extend\ftxgpos.h blitter.h common.h \ - display.h ..\lib\extend\ftxkern.h ..\lib\extend\ftxsbit.h gdriver.h \ - gevents.h gmain.h -fttimer.obj: fttimer.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h gdriver.h gevents.h gmain.h -ftview.obj: ftview.c blitter.h common.h display.h \ - ..\lib\extend\ftxsbit.h gdriver.h gevents.h gmain.h -ftzoom.obj: ftzoom.c common.h ..\lib\freetype.h ..\lib\fterrid.h \ - ..\lib\ftnameid.h ..\lib\extend\ftxpost.h gdriver.h gevents.h gmain.h -gmain.obj: gmain.c gdriver.h gmain.h -!ifndef __MAKE__ -arch\win32\gw_win32.obj: arch\win32\gw_win32.c gdriver.h gevents.h gmain.h -!endif Index: xc/extras/FreeType/test/arch/win32/gw_win32.c diff -u xc/extras/FreeType/test/arch/win32/gw_win32.c:1.1.1.1 xc/extras/FreeType/test/arch/win32/gw_win32.c:removed --- xc/extras/FreeType/test/arch/win32/gw_win32.c:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/gw_win32.c Wed Mar 16 20:59:51 2005 @@ -1,378 +0,0 @@ -/******************************************************************* - * - * gw_win32.c graphics driver for Win32 platform. 0.1 - * - * This is the driver for displaying inside a window under Win32, - * used by the graphics utility of the FreeType test suite. - * - * Written by Antoine Leca. - * Copyright 1999 by Antoine Leca, - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * Borrowing liberally from the other FreeType drivers. - * - * This file is part of the FreeType project, and may only be used - * modified and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - ******************************************************************/ - -#include -#include -#include - -#define WIN32_LEAN_AND_MEAN -#include - -#include "gdriver.h" -#include "gevents.h" -#include "gmain.h" - - -/* Size of the window. */ -#define WIN_WIDTH 640u -#define WIN_HEIGHT 450u - -/* These values can be changed, but WIN_WIDTH should remain for now a */ -/* multiple of 32 to avoid padding issues. */ - - - typedef struct _Translator - { - char key; - GEvent event_class; - int event_info; - } Translator; - -#define NUM_Translators 20 - - static const Translator trans[NUM_Translators] = - { - { (char)27, event_Quit, 0 }, - { 'q', event_Quit, 0 }, - - { 'x', event_Rotate_Glyph, -1 }, - { 'c', event_Rotate_Glyph, 1 }, - { 'v', event_Rotate_Glyph, -16 }, - { 'b', event_Rotate_Glyph, 16 }, - - { '{', event_Change_Glyph, -10000 }, - { '}', event_Change_Glyph, 10000 }, - { '(', event_Change_Glyph, -1000 }, - { ')', event_Change_Glyph, 1000 }, - { '9', event_Change_Glyph, -100 }, - { '0', event_Change_Glyph, 100 }, - { 'i', event_Change_Glyph, -10 }, - { 'o', event_Change_Glyph, 10 }, - { 'k', event_Change_Glyph, -1 }, - { 'l', event_Change_Glyph, 1 }, - - { '+', event_Scale_Glyph, 10 }, - { '-', event_Scale_Glyph, -10 }, - { 'u', event_Scale_Glyph, 1 }, - { 'j', event_Scale_Glyph, -1 } - }; - - /* handle of the window. */ - static HWND hwndGraphic; - - /* bitmap information */ - static LPBITMAPINFO pbmi; - static HBITMAP hbm; - - /* local event to pass on */ - static TEvent ourevent = { event_Quit, 0 }; - static int eventToProcess = 0; - - /* array defined in the test programs */ - extern char Header[]; - - -/* restores screen to its original state */ - -int Driver_Restore_Mode() - { - /* The graphical window has perhaps already destroyed itself */ - if ( hwndGraphic ) { - DestroyWindow ( hwndGraphic ); - PostMessage( hwndGraphic, WM_QUIT, 0, 0 ); - } - - if ( pbmi ) free ( pbmi ); - - return 1; - } - - -/* - * set graphics mode - * and create the window class and the message handling. - */ - -/* Declarations of the Windows-specific functions that are below. */ -static BOOL RegisterTheClass ( void ); -static BOOL CreateTheWindow ( int width, int height ); - - -int Driver_Set_Graphics ( int mode ) - { - int i; - static RGBQUAD gray_scale[5] = { - { 0xFF, 0xFF, 0xFF, 0 }, /* white */ - { 0xC0, 0xC0, 0xC0, 0 }, - { 0x80, 0x80, 0x80, 0 }, - { 0x40, 0x40, 0x40, 0 }, - { 0, 0, 0, 0 } }; /* black */ - - if( ! RegisterTheClass() ) return 0; /* if already running, fails. */ - - /* find some memory for the bitmap header */ - if ( (pbmi = malloc ( sizeof ( BITMAPINFO ) + sizeof ( RGBQUAD ) * 256 ) ) - /* 256 should really be 2 if not grayscale */ - == NULL ) - /* lack of memory; fails the process */ - return 0; - - /* initialize the header to appropriate values */ - memset( pbmi, 0, sizeof ( BITMAPINFO ) + sizeof ( RGBQUAD ) * 256 ); - - switch ( mode ) - { - case Graphics_Mode_Mono: - pbmi->bmiHeader.biBitCount = 1; - pbmi->bmiColors[0] = gray_scale[0]; - pbmi->bmiColors[1] = gray_scale[4]; - - vio_ScanLineWidth = WIN_WIDTH / 8; - vio_Width = WIN_WIDTH; - vio_Height = WIN_HEIGHT; - - break; - - case Graphics_Mode_Gray: - pbmi->bmiHeader.biBitCount = 8; - pbmi->bmiHeader.biClrUsed = 5; - - memcpy ( &pbmi->bmiColors[0], gray_scale, sizeof gray_scale ); - - vio_ScanLineWidth = WIN_WIDTH; - vio_Width = WIN_WIDTH; - vio_Height = WIN_HEIGHT; - - for ( i = 0; i < 5; ++i ) - gray_palette[i] = i; - - break; - - default: - free ( pbmi ); - return 0; /* Unknown mode */ - } - - pbmi->bmiHeader.biSize = sizeof ( BITMAPINFOHEADER ); - pbmi->bmiHeader.biWidth = vio_Width; - pbmi->bmiHeader.biHeight = vio_Height; - pbmi->bmiHeader.biPlanes = 1; - - if( ! CreateTheWindow(vio_Width, vio_Height) ) - { - free ( pbmi ); - return 0; - } - - return 1; /* success even if the window was not built. */ - } - - -int Driver_Display_Bitmap ( char* buffer, int lines, int cols ) - { - HDC hDC; - - if ( cols * 8 != pbmi->bmiHeader.biWidth * pbmi->bmiHeader.biBitCount ) - pbmi->bmiHeader.biWidth = cols * 8 / pbmi->bmiHeader.biBitCount; - - hDC = GetDC ( hwndGraphic ); - SetDIBits ( hDC, hbm, 0, lines, buffer, pbmi, DIB_RGB_COLORS ); - ReleaseDC ( hwndGraphic, hDC ); - - ShowWindow( hwndGraphic, SW_SHOW ); - InvalidateRect ( hwndGraphic, NULL, FALSE ); - UpdateWindow ( hwndGraphic ); - - return 1; /* success */ - } - - -void Get_Event( TEvent* event ) - { - MSG msg; - - if ( hwndGraphic ) - { - SetWindowText ( hwndGraphic, Header ); - } - - do { - while ( PeekMessage( &msg, 0, 0, 0, PM_REMOVE ) ) { - TranslateMessage ( &msg ); - DispatchMessage ( &msg ); - } - if ( ! eventToProcess ) - WaitMessage(); - } while ( ! eventToProcess ); - - event->what = ourevent.what; - event->info = ourevent.info; - eventToProcess = 0; - return; - } - - -/* ---- Windows-specific stuff ------------------------------------------- */ - -LRESULT CALLBACK Message_Process( HWND, UINT, WPARAM, LPARAM ); - -static -BOOL RegisterTheClass ( void ) - { - WNDCLASS ourClass = { - /* UINT style */ 0, - /* WNDPROC lpfnWndProc */ Message_Process, - /* int cbClsExtra */ 0, - /* int cbWndExtra */ 0, - /* HANDLE hInstance */ 0, - /* HICON hIcon */ 0, - /* HCURSOR hCursor */ 0, - /* HBRUSH hbrBackground*/ 0, - /* LPCTSTR lpszMenuName */ NULL, - /* LPCTSTR lpszClassName*/ "FreeTypeTestGraphicDriver" - }; - - ourClass.hInstance = GetModuleHandle( NULL ); - ourClass.hIcon = LoadIcon(0, IDI_APPLICATION); - ourClass.hCursor = LoadCursor(0, IDC_ARROW); - ourClass.hbrBackground= GetStockObject(BLACK_BRUSH); - - return RegisterClass(&ourClass) != 0; /* return False if it fails. */ - } - -static -BOOL CreateTheWindow ( int width, int height ) - { - - if ( ! (hwndGraphic = CreateWindow( - /* LPCSTR lpszClassName; */ "FreeTypeTestGraphicDriver", - /* LPCSTR lpszWindowName; */ "FreeType Test Graphic Driver", - /* DWORD dwStyle; */ WS_OVERLAPPED | WS_SYSMENU, - /* int x; */ CW_USEDEFAULT, - /* int y; */ CW_USEDEFAULT, - /* int nWidth; */ width + 2*GetSystemMetrics(SM_CXBORDER), - /* int nHeight; */ height+ GetSystemMetrics(SM_CYBORDER) - + GetSystemMetrics(SM_CYCAPTION), - /* HWND hwndParent; */ HWND_DESKTOP, - /* HMENU hmenu; */ 0, - /* HINSTANCE hinst; */ GetModuleHandle( NULL ), - /* void FAR* lpvParam; */ NULL)) - ) - /* creation failed... */ - return 0; - - return 1; - } - - /* Message processing for our Windows class */ -LRESULT CALLBACK Message_Process( HWND handle, UINT mess, - WPARAM wParam, LPARAM lParam ) - { - - switch( mess ) - { - case WM_DESTROY: - /* warn the main thread to quit if it didn't know */ - ourevent.what = event_Quit; - ourevent.info = 0; - eventToProcess = 1; - hwndGraphic = 0; - PostQuitMessage ( 0 ); - DeleteObject ( hbm ); - break; - - case WM_CREATE: - { - HDC hDC; - - hDC = GetDC ( handle ); - hbm = CreateDIBitmap ( - /* HDC hdc; handle of device context */ hDC, - /* BITMAPINFOHEADER FAR* lpbmih; addr.of header*/ &pbmi->bmiHeader, - /* DWORD dwInit; CBM_INIT to initialize bitmap */ 0, - /* const void FAR* lpvBits; address of values */ NULL, - /* BITMAPINFO FAR* lpbmi; addr.of bitmap data */ pbmi, - /* UINT fnColorUse; RGB or palette indices */ DIB_RGB_COLORS); - ReleaseDC ( handle, hDC ); - break; - } - - case WM_PAINT: - { - HDC hDC, memDC; - HANDLE oldbm; - PAINTSTRUCT ps; - - hDC = BeginPaint ( handle, &ps ); - memDC = CreateCompatibleDC(hDC); - oldbm = SelectObject(memDC, hbm); - BitBlt ( hDC, 0, 0, vio_Width, vio_Height, memDC, 0, 0, SRCCOPY); - ReleaseDC ( handle, hDC ); - SelectObject ( memDC, oldbm ); - DeleteObject ( memDC ); - EndPaint ( handle, &ps ); - } - - case WM_KEYDOWN: - switch ( wParam ) - { - case VK_ESCAPE: - ourevent.what = event_Quit; - ourevent.info = 0; - eventToProcess = 1; - break; - - case VK_F1: /* bring up help and about dialog window */ - break; - } - break; - - case WM_CHAR: - { - char c = wParam ; - int i; - - for ( i = 0; i < NUM_Translators; i++ ) - { - if ( c == trans[i].key ) - { - ourevent.what = trans[i].event_class; - ourevent.info = trans[i].event_info; - eventToProcess = 1; - return 0; - } - } - - /* unrecognized keystroke */ - ourevent.what = event_Keyboard; - ourevent.info = (int)c; - eventToProcess = 1; - } - break; - - default: - return DefWindowProc( handle, mess, wParam, lParam ); - } - - return 0; - } - -/* End */ Index: xc/extras/FreeType/test/arch/win32/makedep diff -u xc/extras/FreeType/test/arch/win32/makedep:1.1.1.1 xc/extras/FreeType/test/arch/win32/makedep:removed --- xc/extras/FreeType/test/arch/win32/makedep:1.1.1.1 Sat Feb 12 23:56:27 2000 +++ xc/extras/FreeType/test/arch/win32/makedep Wed Mar 16 20:59:51 2005 @@ -1,29 +0,0 @@ -# makedep -# -# This shell script creates a dependency file necessary for some compilers -# on the Windows 32-bit platform. -# -# If you run this script under non-Windows operating systems, expect -# warnings that `windows.h' can't be found. - -echo "\ -# This dependency file to be used with various Windows compilers -# has been generated automatically with the script \`makedep' on -# `date +%d-%b-%Y`. -" > depend.win - -(cd ../.. - gcc -MM -I../lib/arch/win32 -I../lib -I../lib/extend -I. *.c | \ - sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.win - -echo "!ifndef __MAKE__" >> depend.win - -(cd ../.. - gcc -MM -I../lib/arch/win32 -I../lib -I../lib/extend -I. \ - arch/win32/*.c | \ - sed -e "s/^\(.*\)\.o:/arch\\\\win32\\\\\1.obj:/" \ - -e "s:/:\\\\:g") >> depend.win - -echo "!endif" >> depend.win - -# eof Index: xc/extras/Mesa/Makefile diff -u /dev/null xc/extras/Mesa/Makefile:1.4 --- /dev/null Wed Mar 16 20:59:52 2005 +++ xc/extras/Mesa/Makefile Fri Dec 10 10:40:59 2004 @@ -0,0 +1,378 @@ +# Top-level Mesa makefile + +TOP = . + +SUBDIRS = src progs + + +default: $(TOP)/configs/current + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE)) || exit 1 ; \ + done + + +doxygen: + (cd doxygen ; make) ; \ + +clean: + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE) clean) ; \ + done + + +realclean: + touch $(TOP)/configs/current + $(MAKE) clean + -rm -rf lib* + -rm -f $(TOP)/configs/current + + +install: + @echo "Installing" + $(TOP)/bin/installmesa + +# If there's no current configuration file +$(TOP)/configs/current: + @echo + @echo + @echo "Please choose a configuration from the following list:" + @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS" + @echo + @echo "Then type 'make ' (ex: 'make linux-x86')" + @echo "(ignore the following error message)" + @exit 1 + + +# Rules to set/install a specific build configuration +aix \ +aix-64 \ +aix-gcc \ +aix-static \ +beos \ +darwin \ +darwin-static \ +freebsd \ +freebsd-dri \ +freebsd-dri-x86 \ +hpux10 \ +hpux10-gcc \ +hpux10-static \ +hpux11-32 \ +hpux11-32-static \ +hpux11-32-static-nothreads \ +hpux11-64 \ +hpux11-64-static \ +hpux9 \ +hpux9-gcc \ +irix6-64 \ +irix6-64-static \ +irix6-n32 \ +irix6-n32-static \ +irix6-o32 \ +irix6-o32-static \ +linux \ +linux-alpha \ +linux-alpha-static \ +linux-debug \ +linux-dri \ +linux-dri-x86 \ +linux-dri-x86-64 \ +linux-glide \ +linux-icc \ +linux-icc-static \ +linux-osmesa16 \ +linux-osmesa16-static \ +linux-osmesa32 \ +linux-ppc \ +linux-ppc-static \ +linux-solo \ +linux-solo-x86 \ +linux-solo-ia64 \ +linux-sparc \ +linux-sparc5 \ +linux-static \ +linux-ultrasparc \ +linux-tcc \ +linux-x86 \ +linux-x86-debug \ +linux-x86-64 \ +linux-x86-64-static \ +linux-x86-glide \ +linux-x86-static \ +netbsd \ +openbsd \ +osf1 \ +solaris-x86 \ +solaris-x86-gcc \ +sunos4 \ +sunos4-gcc \ +sunos4-static \ +sunos5 \ +sunos5-gcc \ +sunos5-smp \ +ultrix-gcc: + (cd configs && rm -f current && ln -s $@ current) + $(MAKE) default + + +# Rules for making release tarballs + +DIRECTORY = Mesa-6.2.1 +LIB_NAME = MesaLib-6.2.1 +DEMO_NAME = MesaDemos-6.2.1 + +LIB_FILES = \ + $(DIRECTORY)/Makefile* \ + $(DIRECTORY)/descrip.mms \ + $(DIRECTORY)/mms-config. \ + $(DIRECTORY)/Mesa.dsw \ + $(DIRECTORY)/bin/mklib \ + $(DIRECTORY)/bin/installmesa \ + $(DIRECTORY)/configs/[a-z]* \ + $(DIRECTORY)/docs/*.html \ + $(DIRECTORY)/docs/COPYING \ + $(DIRECTORY)/docs/INSTALL.GNU \ + $(DIRECTORY)/docs/README.* \ + $(DIRECTORY)/docs/RELNOTES* \ + $(DIRECTORY)/docs/VERSIONS \ + $(DIRECTORY)/docs/*.spec \ + $(DIRECTORY)/include/GL/internal/glcore.h \ + $(DIRECTORY)/include/GL/dmesa.h \ + $(DIRECTORY)/include/GL/amesa.h \ + $(DIRECTORY)/include/GL/fxmesa.h \ + $(DIRECTORY)/include/GL/ggimesa.h \ + $(DIRECTORY)/include/GL/gl.h \ + $(DIRECTORY)/include/GL/glext.h \ + $(DIRECTORY)/include/GL/gl_mangle.h \ + $(DIRECTORY)/include/GL/glu.h \ + $(DIRECTORY)/include/GL/glu_mangle.h \ + $(DIRECTORY)/include/GL/glx.h \ + $(DIRECTORY)/include/GL/glxext.h \ + $(DIRECTORY)/include/GL/glx_mangle.h \ + $(DIRECTORY)/include/GL/mesa_wgl.h \ + $(DIRECTORY)/include/GL/mglmesa.h \ + $(DIRECTORY)/include/GL/osmesa.h \ + $(DIRECTORY)/include/GL/svgamesa.h \ + $(DIRECTORY)/include/GL/ugl*.h \ + $(DIRECTORY)/include/GL/vms_x_fix.h \ + $(DIRECTORY)/include/GL/wmesa.h \ + $(DIRECTORY)/include/GL/xmesa.h \ + $(DIRECTORY)/include/GL/xmesa_x.h \ + $(DIRECTORY)/include/GL/xmesa_xf86.h \ + $(DIRECTORY)/src/Makefile \ + $(DIRECTORY)/src/descrip.mms \ + $(DIRECTORY)/src/mesa/Makefile* \ + $(DIRECTORY)/src/mesa/sources \ + $(DIRECTORY)/src/mesa/descrip.mms \ + $(DIRECTORY)/src/mesa/depend \ + $(DIRECTORY)/src/mesa/main/*.[chS] \ + $(DIRECTORY)/src/mesa/main/main.dsp \ + $(DIRECTORY)/src/mesa/main/descrip.mms \ + $(DIRECTORY)/src/mesa/glapi/*.[chS] \ + $(DIRECTORY)/src/mesa/glapi/glapi.dsp \ + $(DIRECTORY)/src/mesa/glapi/descrip.mms \ + $(DIRECTORY)/src/mesa/array_cache/*.[ch] \ + $(DIRECTORY)/src/mesa/array_cache/array_cache.dsp \ + $(DIRECTORY)/src/mesa/array_cache/descrip.mms \ + $(DIRECTORY)/src/mesa/math/*.[ch] \ + $(DIRECTORY)/src/mesa/math/math.dsp \ + $(DIRECTORY)/src/mesa/math/descrip.mms \ + $(DIRECTORY)/src/mesa/shader/*.[ch] \ + $(DIRECTORY)/src/mesa/shader/shader.dsp \ + $(DIRECTORY)/src/mesa/shader/descrip.mms \ + $(DIRECTORY)/src/mesa/swrast/*.[ch] \ + $(DIRECTORY)/src/mesa/swrast/swrast.dsp \ + $(DIRECTORY)/src/mesa/swrast/descrip.mms \ + $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \ + $(DIRECTORY)/src/mesa/swrast_setup/swrast_setup.dsp \ + $(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \ + $(DIRECTORY)/src/mesa/tnl/*.[chS] \ + $(DIRECTORY)/src/mesa/tnl/tnl.dsp \ + $(DIRECTORY)/src/mesa/tnl/descrip.mms \ + $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \ + $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \ + $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \ + $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \ + $(DIRECTORY)/src/mesa/drivers/beos/Makefile \ + $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \ + $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \ + $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/glide/*.def \ + $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \ + $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \ + $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \ + $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \ + $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \ + $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \ + $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.dsp \ + $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \ + $(DIRECTORY)/src/mesa/drivers/windows/*/*.dsp \ + $(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \ + $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \ + $(DIRECTORY)/src/mesa/sparc/*.[chS] \ + $(DIRECTORY)/src/mesa/x86/Makefile \ + $(DIRECTORY)/src/mesa/x86/*.[ch] \ + $(DIRECTORY)/src/mesa/x86/*.S \ + $(DIRECTORY)/src/glu/Makefile \ + $(DIRECTORY)/src/glu/descrip.mms \ + $(DIRECTORY)/src/glu/sgi/Makefile \ + $(DIRECTORY)/src/glu/sgi/Makefile.win \ + $(DIRECTORY)/src/glu/sgi/Makefile.DJ \ + $(DIRECTORY)/src/glu/sgi/cc*.txt \ + $(DIRECTORY)/src/glu/sgi/glu.def \ + $(DIRECTORY)/src/glu/sgi/glu.dsp \ + $(DIRECTORY)/src/glu/sgi/dummy.cc \ + $(DIRECTORY)/src/glu/sgi/descrip.mms \ + $(DIRECTORY)/src/glu/sgi/mesaglu.opt \ + $(DIRECTORY)/src/glu/sgi/include/gluos.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \ + $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \ + $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \ + $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \ + $(DIRECTORY)/src/glu/sgi/libtess/README \ + $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \ + $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \ + $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \ + $(DIRECTORY)/src/glu/mesa/README[12] \ + $(DIRECTORY)/src/glu/mesa/Makefile* \ + $(DIRECTORY)/src/glu/mesa/descrip.mms \ + $(DIRECTORY)/src/glu/mesa/mms_depend \ + $(DIRECTORY)/src/glu/mesa/*.def \ + $(DIRECTORY)/src/glu/mesa/depend \ + $(DIRECTORY)/src/glu/mesa/*.[ch] \ + $(DIRECTORY)/src/glw/*.[ch] \ + $(DIRECTORY)/src/glw/Makefile* \ + $(DIRECTORY)/src/glw/README \ + $(DIRECTORY)/src/glw/depend \ + $(DIRECTORY)/progs/Makefile \ + $(DIRECTORY)/progs/util/README \ + $(DIRECTORY)/progs/util/*.[ch] \ + $(DIRECTORY)/progs/util/sampleMakefile \ + $(DIRECTORY)/vms/analyze_map.com \ + $(DIRECTORY)/vms/xlib.opt \ + $(DIRECTORY)/vms/xlib_share.opt + + +DEMO_FILES = \ + $(DIRECTORY)/include/GL/glut.h \ + $(DIRECTORY)/include/GL/glutf90.h \ + $(DIRECTORY)/src/glut/glx/Makefile* \ + $(DIRECTORY)/src/glut/glx/depend \ + $(DIRECTORY)/src/glut/glx/*def \ + $(DIRECTORY)/src/glut/glx/descrip.mms \ + $(DIRECTORY)/src/glut/glx/mms_depend \ + $(DIRECTORY)/src/glut/glx/glut.dsp \ + $(DIRECTORY)/src/glut/glx/*.[ch] \ + $(DIRECTORY)/src/glut/beos/*.[ch] \ + $(DIRECTORY)/src/glut/beos/*.cpp \ + $(DIRECTORY)/src/glut/beos/Makefile \ + $(DIRECTORY)/src/glut/dos/*.[ch] \ + $(DIRECTORY)/src/glut/dos/Makefile.DJ \ + $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \ + $(DIRECTORY)/src/glut/ggi/*.[ch] \ + $(DIRECTORY)/src/glut/ggi/Makefile \ + $(DIRECTORY)/progs/beos/*.cpp \ + $(DIRECTORY)/progs/beos/Makefile \ + $(DIRECTORY)/progs/images/*.rgb \ + $(DIRECTORY)/progs/images/*.rgba \ + $(DIRECTORY)/progs/demos/Makefile* \ + $(DIRECTORY)/progs/demos/descrip.mms \ + $(DIRECTORY)/progs/demos/*.[ch] \ + $(DIRECTORY)/progs/demos/*.cxx \ + $(DIRECTORY)/progs/demos/*.dat \ + $(DIRECTORY)/progs/demos/README \ + $(DIRECTORY)/progs/demos/Windows/*.dsp \ + $(DIRECTORY)/progs/demos/Windows/*.dsw \ + $(DIRECTORY)/progs/xdemos/Makefile* \ + $(DIRECTORY)/progs/xdemos/descrip.mms \ + $(DIRECTORY)/progs/xdemos/*.[chf] \ + $(DIRECTORY)/progs/redbook/Makefile* \ + $(DIRECTORY)/progs/redbook/README \ + $(DIRECTORY)/progs/redbook/*.[ch] \ + $(DIRECTORY)/progs/samples/Makefile* \ + $(DIRECTORY)/progs/samples/README \ + $(DIRECTORY)/progs/samples/*.c \ + $(DIRECTORY)/progs/windml/Makefile.ugl \ + $(DIRECTORY)/progs/windml/*.c \ + $(DIRECTORY)/progs/windml/*.bmp \ + $(DIRECTORY)/progs/ggi/*.c + + +DRI_FILES = \ + $(DIRECTORY)/src/glx/Makefile \ + $(DIRECTORY)/src/glx/mini/*.[ch] \ + $(DIRECTORY)/src/glx/mini/example.miniglx.conf \ + $(DIRECTORY)/src/glx/mini/NOTES \ + $(DIRECTORY)/src/mesa/drivers/dri/Makefile \ + $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \ + $(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \ + $(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \ + $(DIRECTORY)/src/mesa/drivers/dri/*/depend \ + $(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \ + $(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \ + $(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch] + + +# Everything for new a Mesa release: +tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5 + + +lib_gz: + rm -f configs/current ; \ + cd .. ; \ + tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \ + gzip $(LIB_NAME).tar ; \ + mv $(LIB_NAME).tar.gz $(DIRECTORY) + +demo_gz: + cd .. ; \ + tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \ + gzip $(DEMO_NAME).tar ; \ + mv $(DEMO_NAME).tar.gz $(DIRECTORY) + +lib_bz2: + rm -f configs/current ; \ + cd .. ; \ + tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \ + bzip2 $(LIB_NAME).tar ; \ + mv $(LIB_NAME).tar.bz2 $(DIRECTORY) + +demo_bz2: + cd .. ; \ + tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) ; \ + bzip2 $(DEMO_NAME).tar ; \ + mv $(DEMO_NAME).tar.bz2 $(DIRECTORY) + +lib_zip: + rm -f configs/current ; \ + -rm $(LIB_NAME).zip ; \ + cd .. ; \ + zip -r $(LIB_NAME).zip $(LIB_FILES) ; \ + mv $(LIB_NAME).zip $(DIRECTORY) + +demo_zip: + -rm $(DEMO_NAME).zip ; \ + cd .. ; \ + zip -r $(DEMO_NAME).zip $(DEMO_FILES) ; \ + mv $(DEMO_NAME).zip $(DIRECTORY) + +md5: + @-md5sum $(LIB_NAME).tar.gz + @-md5sum $(LIB_NAME).tar.bz2 + @-md5sum $(LIB_NAME).zip + @-md5sum $(DEMO_NAME).tar.gz + @-md5sum $(DEMO_NAME).tar.bz2 + @-md5sum $(DEMO_NAME).zip Index: xc/extras/Mesa/docs/README.CYGWIN diff -u /dev/null xc/extras/Mesa/docs/README.CYGWIN:1.1.1.1 --- /dev/null Wed Mar 16 21:00:01 2005 +++ xc/extras/Mesa/docs/README.CYGWIN Fri Dec 10 10:07:00 2004 @@ -0,0 +1,256 @@ + + Mesa Cygwin/X11 Information + + +WARNING +======= + +If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the +latest setup.exe from Cygwin the GL (Mesa) libraries and include are already +installed in /usr/X11R6. + +The following will explain how to "replace" them. + +Installation +============ + +How to compile Mesa on Cygwin/X11 systems: + +1. Shared libs: + type 'make cygwin-sl'. + + When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and + Mesa-x.y/bin directories. + + +2. Static libs: + type 'make cygwin-static'. + When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory. + +Header and library files: + After you've compiled Mesa and tried the demos I recommend the following + procedure for "installing" Mesa. + + Copy the Mesa include/GL directory to /usr/X11R6/include: + cp -a include/GL /usr/X11R6/include + + Copy the Mesa library files to /usr/X11R6/lib: + cp -a lib/* /usr/X11R6ocal/lib + + Copy the Mesa bin files (used by the DLL stuff) to /usr/X11R6/bin: + cp -a lib/cyg* /usr/X11R6/bin + +Xt/Motif widgets: + If you want to use Mesa or OpenGL in your Xt/Motif program you can build + the widgets found in either the widgets-mesa or widgets-sgi directories. + The former were written for Mesa and the later are the original SGI + widgets. Look in those directories for more information. + For the Motif widgets you must have downloaded the lesstif package. + + +Using the library +================= + +Configuration options: + The file src/mesa/main/config.h has many parameters which you can adjust + such as maximum number of lights, clipping planes, maximum texture size, + etc. In particular, you may want to change DEPTH_BITS from 16 to 32 + if a 16-bit depth buffer isn't precise enough for your application. + + +Shared libraries: + If you compile shared libraries (Win32 DLLS) you may have to set an + environment variable to specify where the Mesa libraries are located. + Set the PATH variable to include /your-dir/Mesa-2.6/bin. + Otherwise, when you try to run a demo it may fail with a message saying + that one or more DLL couldn't be found. + + +Xt/Motif Widgets: + Two versions of the Xt/Motif OpenGL drawing area widgets are included: + + widgets-sgi/ SGI's stock widgets + widgets-mesa/ Mesa-tuned widgets + + Look in those directories for details + + +Togl: + Togl is an OpenGL/Mesa widget for Tcl/Tk. + See http://togl.sourceforge.net for more information. + + + +X Display Modes: + Mesa supports RGB(A) rendering into almost any X visual type and depth. + + The glXChooseVisual function tries its best to pick an appropriate visual + for the given attribute list. However, if this doesn't suit your needs + you can force Mesa to use any X visual you want (any supported by your + X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL + environment variables. When an RGB visual is requested, glXChooseVisual + will first look if the MESA_RGB_VISUAL variable is defined. If so, it + will try to use the specified visual. Similarly, when a color index + visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL + variable. + + The format of accepted values is: + Here are some examples: + + using the C-shell: + % setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor + % setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor + % setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor + + using the KornShell: + $ export MESA_RGB_VISUAL="TrueColor 8" + $ export MESA_CI_VISUAL="PseudoColor 12" + $ export MESA_RGB_VISUAL="PseudoColor 8" + + +Double buffering: + Mesa can use either an X Pixmap or XImage as the backbuffer when in + double buffer mode. Using GLX, the default is to use an XImage. The + MESA_BACK_BUFFER environment variable can override this. The valid + values for MESA_BACK_BUFFER are: Pixmap and XImage (only the first + letter is checked, case doesn't matter). + + A pixmap is faster when drawing simple lines and polygons while an + XImage is faster when Mesa has to do pixel-by-pixel rendering. If you + need depth buffering the XImage will almost surely be faster. Exper- + iment with the MESA_BACK_BUFFER variable to see which is faster for + your application. + + +Colormaps: + When using Mesa directly or with GLX, it's up to the application writer + to create a window with an appropriate colormap. The aux, tk, and GLUT + toolkits try to minimize colormap "flashing" by sharing colormaps when + possible. Specifically, if the visual and depth of the window matches + that of the root window, the root window's colormap will be shared by + the Mesa window. Otherwise, a new, private colormap will be allocated. + + When sharing the root colormap, Mesa may be unable to allocate the colors + it needs, resulting in poor color quality. This can happen when a + large number of colorcells in the root colormap are already allocated. + To prevent colormap sharing in aux, tk and GLUT, define the environment + variable MESA_PRIVATE_CMAP. The value isn't significant. + + +Gamma correction: + To compensate for the nonlinear relationship between pixel values + and displayed intensities, there is a gamma correction feature in + Mesa. Some systems, such as Silicon Graphics, support gamma + correction in hardware (man gamma) so you won't need to use Mesa's + gamma facility. Other systems, however, may need gamma adjustment + to produce images which look correct. If in the past you thought + Mesa's images were too dim, read on. + + Gamma correction is controlled with the MESA_GAMMA environment + variable. Its value is of the form "Gr Gg Gb" or just "G" where + Gr is the red gamma value, Gg is the green gamma value, Gb is the + blue gamma value and G is one gamma value to use for all three + channels. Each value is a positive real number typically in the + range 1.0 to 2.5. The defaults are all 1.0, effectively disabling + gamma correction. Examples using csh: + + % setenv MESA_GAMMA "2.3 2.2 2.4" // separate R,G,B values + % setenv MESA_GAMMA "2.0" // same gamma for R,G,B + + The demos/gamma.c program may help you to determine reasonable gamma + value for your display. With correct gamma values, the color intensities + displayed in the top row (drawn by dithering) should nearly match those + in the bottom row (drawn as grays). + + Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well + on HP displays using the HP-ColorRecovery technology. + + Mesa implements gamma correction with a lookup table which translates + a "linear" pixel value to a gamma-corrected pixel value. There is a + small performance penalty. Gamma correction only works in RGB mode. + Also be aware that pixel values read back from the frame buffer will + not be "un-corrected" so glReadPixels may not return the same data + drawn with glDrawPixels. + + For more information about gamma correction see: + http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html + + +Overlay Planes + + Overlay planes in the frame buffer are supported by Mesa but require + hardware and X server support. To determine if your X server has + overlay support you can test for the SERVER_OVERLAY_VISUALS property: + + xprop -root | grep SERVER_OVERLAY_VISUALS + + +HPCR glClear(GL_COLOR_BUFFER_BIT) dithering + + If you set the MESA_HPCR_CLEAR environment variable then dithering + will be used when clearing the color buffer. This is only applicable + to HP systems with the HPCR (Color Recovery) system. + + +Extensions +========== + There are three Mesa-specific GLX extensions at this time. + + GLX_MESA_pixmap_colormap + + This extension adds the GLX function: + + GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, + Pixmap pixmap, Colormap cmap ) + + It is an alternative to the standard glXCreateGLXPixmap() function. + Since Mesa supports RGB rendering into any X visual, not just True- + Color or DirectColor, Mesa needs colormap information to convert RGB + values into pixel values. An X window carries this information but a + pixmap does not. This function associates a colormap to a GLX pixmap. + See the xdemos/glxpixmap.c file for an example of how to use this + extension. + + GLX_MESA_release_buffers + + Mesa associates a set of ancillary (depth, accumulation, stencil and + alpha) buffers with each X window it draws into. These ancillary + buffers are allocated for each X window the first time the X window + is passed to glXMakeCurrent(). Mesa, however, can't detect when an + X window has been destroyed in order to free the ancillary buffers. + + The best it can do is to check for recently destroyed windows whenever + the client calls the glXCreateContext() or glXDestroyContext() + functions. This may not be sufficient in all situations though. + + The GLX_MESA_release_buffers extension allows a client to explicitly + deallocate the ancillary buffers by calling glxReleaseBuffersMESA() + just before an X window is destroyed. For example: + + #ifdef GLX_MESA_release_buffers + glXReleaseBuffersMESA( dpy, window ); + #endif + XDestroyWindow( dpy, window ); + + This extension is new in Mesa 2.0. + + GLX_MESA_copy_sub_buffer + + This extension adds the glXCopySubBufferMESA() function. It works + like glXSwapBuffers() but only copies a sub-region of the window + instead of the whole window. + + This extension is new in Mesa version 2.6 + + + +Summary of X-related environment variables: + MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only) + MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only) + MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only) + MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only) + MESA_GAMMA - gamma correction coefficients (X only) + + +---------------------------------------------------------------------- +README.CYGWIN - lassauge April 2004 - based on README.X11 Index: xc/extras/Mesa/docs/RELNOTES-5.0.1 diff -u xc/extras/Mesa/docs/RELNOTES-5.0.1:1.1.1.1 xc/extras/Mesa/docs/RELNOTES-5.0.1:1.1.1.2 --- xc/extras/Mesa/docs/RELNOTES-5.0.1:1.1.1.1 Sun Sep 28 13:22:36 2003 +++ xc/extras/Mesa/docs/RELNOTES-5.0.1 Thu Apr 8 05:15:17 2004 @@ -43,4 +43,4 @@ ---------------------------------------------------------------------- -$Id: RELNOTES-5.0.1,v 1.1.2.4 2003/03/30 16:07:16 brianp Exp $ +$Id: RELNOTES-5.0.1,v 3.1 2003/03/30 16:17:54 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-5.0.2 diff -u xc/extras/Mesa/docs/RELNOTES-5.0.2:1.1.1.1 xc/extras/Mesa/docs/RELNOTES-5.0.2:1.1.1.2 --- xc/extras/Mesa/docs/RELNOTES-5.0.2:1.1.1.1 Sun Sep 28 13:22:36 2003 +++ xc/extras/Mesa/docs/RELNOTES-5.0.2 Thu Apr 8 05:15:17 2004 @@ -43,4 +43,4 @@ ---------------------------------------------------------------------- -$Id: RELNOTES-5.0.2,v 1.1.2.2 2003/09/04 23:09:27 brianp Exp $ +$Id: RELNOTES-5.0.2,v 1.1 2003/09/04 23:10:38 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-5.1 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-5.1:1.1.1.1 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-5.1 Thu Apr 8 05:15:17 2004 @@ -0,0 +1,279 @@ + + Mesa 5.1 release notes + + December 17, 2003 + + PLEASE READ!!!! + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Even-numbered versions (such as 5.0) designate stable releases. +Odd-numbered versions (such as 5.1) designate new developmental releases. + + +Bug fixes +--------- +See the VERSIONS file for a list of bugs fixed in this release. + + + +New Features in Mesa 5.1 +------------------------ + +GL_ARB_vertex_program / GL_ARB_fragment_program + Michal Krol and Karl Rasche implemented these extensions. Thanks! + Be aware that there may be some rough edges and lurking bugs. + +GL_ATI_texture_env_combine3 extension + This adds a few new texture combine modes. + Contributed by Ian Romanick. + +GL_SGI_texture_color_table + Adds a color table lookup to the RGBA texture path. There's a separate + color table for each texture unit. + Contributed by Eric Plante. + +GL_NV_fragment_program + NVIDIA's fragment-level programming feature. + Possible lurking bugs: + - the DDX and DDY commands aren't fully tested + - there may be bugs in the parser + - the TEX and TXP instructions both do perspective correction + - the pack/unpack instructions may not be correct + +GL_EXT_depth_bounds_test + This extension adds a scissor-like test for the Z axis. It's used to + optimize stencil-volume shadow algorithms. + +GL_NV_light_max_exponent + Lifts the 128 limit for max light exponent. + +GL_EXT_texture_rectangle + Identical to GL_NV_texture_rectangle + +GL_ARB_occlusion_query + Useful for visibility-based culling. + +GL_ARB_texture_non_power_of_two + Removes the restriction that texture dimensions must be powers of two. + +GL_ARB_vertex_buffer_object + Allows server-side vertex arrays, optimized host/card data transfers, etc. + +GL_ARB_point_sprite + ARB-approved version of GL_NV_point_sprite. Basically allows textures + to be applied to points. + +GL_IBM_multimode_draw_arrays + Allows multiple vertex arrays to be drawn with one call, including arrays + of different types of primitives. + +GL_SUN_multi_draw_arrays + An alias for GL_EXT_multi_draw_arrays, standard in OpenGL 1.4. + +Faster glDrawPixels / glCopyPixels in X11 driver + If your X screen is 32bpp, glDrawPixels to the front color buffer will + be accelerated (via XPutImage()) if the image format is GL_BGRA and the + type is GL_UNSIGNED_BYTE. No raster operations, such as depth test, + blend, fog, etc. can be enabled. + + If your X screen is 16bpp, glDrawPixels to the front color buffer will + be accelerated (via XPutImage()) if the image format is GL_RGB and the + type is GL_UNSIGNED_SHORT_5_6_5. No raster operations, such as depth + test, blend, fog, etc. can be enabled. + + glCopyPixels() calls for the front color buffer will be accelerated + (via XCopyArea()) if no raster operations, such as depth test, blend, + fog, pixel zoom, etc. are enabled. + + The speed-up over typical software rendering is a factor of 10 for + glDrawPixels and 100 for glCopyPixels. + + +With the addition of GL_ARB_occlusion_query, GL_ARB_vertex_buffer_object, +GL_ARB_texture_non_power_of_two and GL_EXT_shadow_funcs, Mesa 5.1 supports +all the new features of OpenGL 1.5. Mesa 6.0 (the next stable release) +will advertise GL_VERSION = "1.5". + + + +Vertex/Fragment program debugger +-------------------------------- + +GL_MESA_program_debug is an experimental extension to support +interactive debugging of vertex and fragment programs. See the +docs/MESA_program_debug.spec file for details. + +The bulk of the vertex/fragment program debugger is implemented +outside of Mesa. The GL_MESA_program_debug extension just has minimal +hooks for stopping running programs and inspecting programs. + +The progs/tests/debugger.c (only in CVS) program is an example of how +the extension can be used. Presently, the debugger code and demo code +is in the same file. Eventually the debugger code should be moved +into a reusable module. + +As it is now, the demo lets you set breakpoings in vertex/fragment +programs, single step, and print intermediate register values. It's +basically just a proof of concept. + + + +Directory tree reorganization +----------------------------- + +The directory structure for Mesa has been overhauled to improve its layout. +All source code for Mesa, GLU, GLUT, etc is now under the src/ directory +in appropriate subdirectories. + +The Mesa source code and drivers has been reorganized under src/mesa/. + +All demonstration programs and tests are now in subdirectories under progs/. + + + +Build System Changes +-------------------- + +The GNU automake/autoconf support has been removed. As it was, it seldom +worked on anything but Linux. The Mesa developers aren't big fans of +automake/autoconf/libtool and didn't have the time to maintain it. +If someone wants to contribute new automake/autoconf support (and is +willing to maintain it), it may be re-incorporated into Mesa, subject +to some requirements. + +The "old style" makefile system has been updated: + 1. Make-config has been trimmed down to fewer, modern configurations. + 2. Most of the bin/mklib.* scripts have been rolled into a new "mklib" + script that works on all sorts of systems. There are probably some + bugs in it, but it's been tested on Linux, SunOS 5.8 and IRIX 6.5. + Improvements/contributes are greatly appreciated. + 3. The Makefile.X11 files have been cleaned up in various ways + + + +Source File Changes +------------------- + +The mmath.[ch] files are obsolete. Their contents have been moved +into the imports.[ch] and macros.[ch] files. + +The files related to vertex and fragment programming have changed. +Old files: + vpexec.[ch] + vpparse.[ch] + vpstate.[ch] +New files: + program.[ch] - generic ARB/NV program code + arbprogram.[ch] - ARB program API functions + arbfragparse.[ch] - ARB fragment program parsing + arbvertparse.[ch] - ARB vertex program parsing + arbparse.[ch] - ARB vertex/fragment parsing + arbparse_syn.h - vertex/fragment program syntax + nvprogram.[ch] - NV program API functions + nvvertprog.h - NV vertex program definitions + nvfragprog.h - NV fragment program definitions + nvvertparse.[ch] - NV vertex program parser + nvfragparse.[ch] - NV fragment program parser + nvvertexec.[ch] - NV vertex program execution + swrast/s_nvfragprog.[ch] - NV fragment program execution + +The files related to per-vertex handling have changed. +Old files: + tnl/t_eval_api.c - old per-vertex code + tnl/t_imm_alloc.c - old per-vertex code + tnl/t_imm_api.c - old per-vertex code + tnl/t_imm_debug.c - old per-vertex code + tnl/t_imm_dlist.c - old per-vertex code + tnl/t_imm_elt.c - old per-vertex code + tnl/t_imm_eval.c - old per-vertex code + tnl/t_imm_exec.c - old per-vertex code + tnl/t_imm_fixup.c - old per-vertex code + tnl/t_vtx_sse.c - old per-vertex code + tnl/t_vtx_x86.c - old per-vertex code +New files: + tnl/t_save_api.c - new per-vertex code + tnl/t_save_loopback.c - new per-vertex code + tnl/t_save_playback.c - new per-vertex code + tnl/t_vtx_eval.c - old per-vertex code + +Other new files: + bufferobj.[ch] - GL_ARB_vertex_buffer_object functions + version.h - defines the Mesa version info + +Other removed files: + swrast/s_histogram.[ch] - moved into src/histogram.c + + + +Other Changes +------------- + +The ctx->Driver.CreateTexture function has been removed - it wasn't used. + +New device driver hook functions: + NewTextureObject - used to allocate struct gl_texture_objects + NewTextureImage - used to allocate struct gl_texture_images + +New ctx->Texture._EnabledCoordUnits field: + With the addition of GL_NV_fragment_program we may need to interpolate + various sets of texture coordinates even when the corresponding texture + unit is not enabled. That is, glEnable(GL_TEXTURE_xD) may never get + called but we still may have to interpolate texture coordinates across + triangles so that the fragment program will get them. + This new field indicates which sets of texture coordinates are needed. + If a bit is set in the ctx->Texture._EnabledUnits bitmask is set, the + same bit MUST be set in ctx->Texture._EnabledCoordUnits. + +The ctx->_TriangleCaps field is deprecated. + Instead of testing the DD_* bits in _TriangleCaps, you should instead + directly test the relevant state variables, or use one of the helper + functions like NEED_SECONDARY_COLOR() at the bottom of context.h + While testing _TriangleCaps bits was fast, it was kludgey, and setting + the bits in the first place could be error prone. + +New vertex processing code. + The code behind glBegin, glEnd, glVertex, glNormal, etc. has been + totally rewritten. It's a cleaner implementation now and should use + less memory. (Keith) + + + +To Do +----- +Add screen-awareness to fakeglx.c + + + + +Device Driver Status +-------------------- + +A number of Mesa's software drivers haven't been actively maintained for +some time. We rely on volunteers to maintain many of these drivers. +Here's the current status of all included drivers: + + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.4 +OSMesa (off-screen) implements OpenGL 1.4 +FX (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.4 +DJGPP implements OpenGL 1.4 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.4 +Allegro needs updating +D3D needs updating + +Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the +driver call the _mesa_enable_1_4_extensions() function. + + +---------------------------------------------------------------------- Index: xc/extras/Mesa/docs/RELNOTES-6.0 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-6.0:1.1.1.1 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-6.0 Thu Apr 8 05:15:17 2004 @@ -0,0 +1,87 @@ + + Mesa 6.0 release notes + + January 16, 2004 + + PLEASE READ!!!! + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Odd numbered versions (such as 5.1) designate new developmental releases. +Even numbered versions (such as 6.0) designate stable releases. + +Mesa version 6.0 signifies two things: + + 1. A stabilization of the 5.1 development release + 2. Implementation of the OpenGL 1.5 specification. When you query + glGetString(GL_VERSION) "1.5" will be returned (as long as the + driver supports all the required features). + + +Note that the Mesa major version number is incremented with the OpenGL +minor version number: + + Mesa 1.x == OpenGL 1.0 + Mesa 2.x == OpenGL 1.1 + Mesa 3.x == OpenGL 1.2 + Mesa 4.x == OpenGL 1.3 + Mesa 5.x == OpenGL 1.4 + Mesa 6.x == OpenGL 1.5 + + + +New Features +------------ + +Mesa 5.1 already had all the new features of OpenGL 1.5, implemented as +extensions. These extensions were simply promoted to standard features: + + GL_ARB_occlusion_query extension + GL_ARB_texture_non_power_of_two extension + GL_ARB_vertex_buffer_object extension + GL_EXT_shadow_funcs + + + +Device Drivers +-------------- + +Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on +the device driver. For example, if the driver enables all the ARB +extensions which are part of OpenGL 1.3 then glGetString(GL_VERSION) +will return "1.3". Otherwise, it'll return "1.2". + +A number of Mesa's software drivers haven't been actively maintained for +some time. We rely on volunteers to maintain many of the drivers. +Here's the current status of all included drivers: + + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.5 +OSMesa (off-screen) implements OpenGL 1.5 +FX (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.5 +DJGPP implements OpenGL 1.5 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.5 +Allegro needs updating +D3D needs updating + + + + +Other Changes +------------- + +See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.0. + + +---------------------------------------------------------------------- +$Id: RELNOTES-6.0,v 1.3 2004/01/15 15:47:57 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-6.0.1 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-6.0.1:1.3 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-6.0.1 Fri Dec 10 10:30:08 2004 @@ -0,0 +1,50 @@ + + Mesa 6.0.1 release notes + + April 2, 2003 + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Even-numbered versions (such as 6.0.x) designate stable releases. +Odd-numbered versions (such as 6.1.x) designate new developmental releases. + +Mesa 6.0.1 just fixes bugs found since the 6.0 release. See the VERSIONS +file for details. + + + +Device Drivers +-------------- + +Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5 +depending on the device driver's capabilities. For example, if the +driver enables all the ARB extensions which are part of OpenGL 1.5 +then glGetString(GL_VERSION) will return "1.5". Otherwise, it'll +return "1.4" or the next lower version that implements all required +functionality. + +A number of Mesa's software drivers haven't been actively maintained for +some time. We rely on volunteers to maintain many of the drivers. +Here's the current status of all included drivers: + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.5 +OSMesa (off-screen) implements OpenGL 1.5 +FX (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.5 +DJGPP implements OpenGL 1.5 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.5 +Allegro needs updating +D3D needs updating + + +---------------------------------------------------------------------- +$Id: RELNOTES-6.0.1,v 3.1 2004/04/02 23:37:02 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-6.1 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-6.1:1.1.1.2 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-6.1 Fri Dec 10 10:07:01 2004 @@ -0,0 +1,112 @@ + + Mesa 6.1 release notes + + August 18, 2004 + + PLEASE READ!!!! + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Odd numbered versions (such as 6.1) designate new developmental releases. +Even numbered versions (such as 6.0) designate stable releases. + + +New Features +------------ + +Half-precision floating point (GLhalf) pixel formats are supported +in Mesa, but the feature isn't exposed yet since the ARB extension +hasn't been finalized yet. + + +Texture image handling +---------------------- + +The code which implements image conversion, pixel transfer ops, etc +for glTexImage commands has been rewritten. + +Now the gl_texture_format struct has a new StoreImage function +pointer. Each texture format must implement this function. The +function is totally responsible for converting the user's texture +image into the specific format. A few helper functions makes this +relatively simple. + +Overall, the code is much simpler, cleaner and easier to work with +now. Adding new texture formats is straight-forward and there's no +longer any distinction between "hardware" and "software" formats. + +Finally, the code for compressed texture images has been reorganized +as well. + +Removed files: + texutil.c + texutil.h + texutil_tmp.h + +New files: + texcompress_s3tc.c + texcompress_fxt1.c + + + +Driver / context changes +------------------------ + +The _mesa_create_context() and _mesa_initialize_context() function +parameters have changed. They now take a pointer to a struct +dd_function_table. Drivers can initialize this table by calling +_mesa_init_driver_functions(). Drivers should then plug in the special +functions they implement. In particular, the ctx->Driver.NewTextureObject +pointer _must_ be set so that the default texture objects created in +_mesa_create/initialize_context() are correctly built. + +The _mesa_init_driver_functions() function allows a lot of redundant code +to be removed from the device drivers (such as initializing +ctx->Driver.Accum to point to _swrast_Accum). Adding new functions to +the dd_function_table can be done with less hassle since the pointer can +be initialized in _mesa_init_driver_functions() rather than in _all_ the +drivers. + + +Device Drivers +-------------- + +Mesa advertises itself as supporting OpenGL 1.2, 1.3, 1.4 or 1.5 +depending on the device driver's capabilities. For example, if the +driver enables all the ARB extensions which are part of OpenGL 1.5 +then glGetString(GL_VERSION) will return "1.5". Otherwise, it'll +return "1.4" or the next lower version that implements all required +functionality. + +A number of Mesa's software drivers haven't been actively maintained for +some time. We rely on volunteers to maintain many of the drivers. +Here's the current status of all included drivers: + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.5 +OSMesa (off-screen) implements OpenGL 1.5 +Glide (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.5 +DJGPP implements OpenGL 1.5 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.5 +Allegro needs updating +D3D needs updating + + + +Other Changes +------------- + +See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.1. + + +---------------------------------------------------------------------- +$Id: RELNOTES-6.1,v 3.5 2004/08/17 22:58:23 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-6.2 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-6.2:1.1.1.1 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-6.2 Fri Dec 10 10:07:01 2004 @@ -0,0 +1,49 @@ + + Mesa 6.2 release notes + + October 2, 2004 + + PLEASE READ!!!! + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Odd numbered versions (such as 6.1) designate new developmental releases. +Even numbered versions (such as 6.2) designate stable releases. + + +This release primarily just fixes bugs found in the Mesa 6.1 release. +See the VERSIONS file for details. + + + +Known Issues +------------ + +The GL_EXT_pixel_buffer_object extension isn't fully implemented for +functions like glPolygonStipple, glConvolutionFilter, glColorTable, +etc. The important functions like glRead/DrawPixels, glTex[Sub]Image, +and glBitmap work with PBOs. + + + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.5 +OSMesa (off-screen) implements OpenGL 1.5 +Glide (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.5 +DJGPP implements OpenGL 1.5 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.5 +Allegro needs updating +D3D needs updating + + +---------------------------------------------------------------------- +$Id: RELNOTES-6.2,v 3.3 2004/10/02 14:59:29 brianp Exp $ Index: xc/extras/Mesa/docs/RELNOTES-6.2.1 diff -u /dev/null xc/extras/Mesa/docs/RELNOTES-6.2.1:1.1.1.1 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/RELNOTES-6.2.1 Fri Dec 10 10:34:03 2004 @@ -0,0 +1,50 @@ + + Mesa 6.2.1 release notes + + December 9, 2004 + + PLEASE READ!!!! + + + +Introduction +------------ + +Mesa uses an even/odd version number scheme like the Linux kernel. +Odd numbered versions (such as 6.1) designate new developmental releases. +Even numbered versions (such as 6.2.x) designate stable releases. + + +This release primarily just fixes bugs found in the Mesa 6.2 release. +See the VERSIONS file for details. + + + +Known Issues +------------ + +The GL_EXT_pixel_buffer_object extension isn't fully implemented for +functions like glPolygonStipple, glConvolutionFilter, glColorTable, +etc. The important functions like glRead/DrawPixels, glTex[Sub]Image, +and glBitmap work with PBOs. This has been fixed for Mesa 6.3. + + + + +Driver Status +---------------------- --------------------- +XMesa (Xlib) implements OpenGL 1.5 +OSMesa (off-screen) implements OpenGL 1.5 +Glide (3dfx Voodoo1/2) implements OpenGL 1.3 +SVGA implements OpenGL 1.3 +Wind River UGL implements OpenGL 1.3 +Windows/Win32 implements OpenGL 1.5 +DJGPP implements OpenGL 1.5 +GGI implements OpenGL 1.3 +BeOS implements OpenGL 1.5 +Allegro needs updating +D3D needs updating + + +---------------------------------------------------------------------- +$Id: RELNOTES-6.2.1,v 1.1.2.2 2004/12/09 23:09:19 brianp Exp $ Index: xc/extras/Mesa/docs/VERSIONS diff -u xc/extras/Mesa/docs/VERSIONS:1.4 xc/extras/Mesa/docs/VERSIONS:1.9 --- xc/extras/Mesa/docs/VERSIONS:1.4 Sun Sep 28 15:16:51 2003 +++ xc/extras/Mesa/docs/VERSIONS Fri Dec 10 10:41:00 2004 @@ -1145,3 +1145,170 @@ Changes: - build GLUT with -fexceptions so C++ apps propogate exceptions + +5.1 December 17, 2003 + New: + - reorganized directory tree + - GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche) + - GL_ATI_texture_env_combine3 extension (Ian Romanick) + - GL_SGI_texture_color_table extension (Eric Plante) + - GL_NV_fragment_program extension + - GL_NV_light_max_exponent extension + - GL_EXT_texture_rectangle (identical to GL_NV_texture_rectangle) + - GL_ARB_occlusion_query extension + - GL_ARB_point_sprite extension + - GL_ARB_texture_non_power_of_two extension + - GL_IBM_multimode_draw_arrays extension + - GL_EXT_texture_mirror_clamp extension (Ian Romanick) + - GL_ARB_vertex_buffer_object extension + - new X86 feature detection code (Petr Sebor) + - less memory used for display lists and vertex buffers + - demo of per-pixel lighting with a fragment program (demos/fplight.c) + - new version (18) of glext.h header + - new spriteblast.c demo of GL_ARB_point_sprite + - faster glDrawPixels in X11 driver in some cases (see RELNOTES-5.1) + - faster glCopyPixels in X11 driver in some cases (see RELNOTES-5.1) + Bug fixes: + - really enable OpenGL 1.4 features in DOS driver. + - fixed issues in glDrawPixels and glCopyPixels for very wide images + - glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint + - fixed some texgen bugs reported by Daniel Borca + - fixed wglMakeCurrent(NULL, NULL) bug (#835861) + - fixed glTexSubImage3D z-offset bug (Cedric Gautier) + - fixed RGBA blend enable bug (Ville Syrjala) + - glAccum is supposed to be a no-op in selection/feedback mode + - fixed texgen bug #597589 (John Popplewell) + Changes: + - dropped API trace feature (src/Trace/) + - documentation overhaul. merged with website content. more html. + - glxgears.c demo updated to use GLX swap rate extensions + - glTexImage1/2/3D now allows width/height/depth = 0 + - disable SPARC asm code on Linux (bug 852204) + + +6.0 January 16, 2004 + New: + - full OpenGL 1.5 support + - updated GL/glext.h file to version 21 + Changes: + - changed max framebuffer size to 4Kx4K (MAX_WIDTH/HEIGHT in config.h) + Bug fixes: + - fixed bug in UNCLAMPED_FLOAT_TO_UBYTE macro; solves a color + clamping issue + - updated suno5-gcc configs + - glColor3 functions sometimes resulted in undefined alpha values + - fixed FP divide by zero error seen on VMS with xlockmore, others + - fixed vertex/fragment program debug problem (bug 873011) + - building on AIX with gcc works now + - glDeleteProgramsARB failed for ARB fragment programs (bug 876160) + - glDrawRangeElements tried to modify potentially read-only storage + - updated files for building on Windows + + +6.0.1 April 2, 2004 + New: + - upgraded glext.h to version 22 + - new build targets (Dan Schikore) + - new linux-x86-opteron build target (Heath Feather) + Bug fixes: + - glBindProgramARB didn't update all necessary state + - fixed build problems on OpenBSD + - omit CVS directories from tarballs + - glGetTexImage(GL_COLOR_INDEX) was broken + - fixed an infinite loop in t&l module + - silenced some valgrind warnings about using unitialized memory + - fixed some compilation/link glitches on IRIX (Mike Stephens) + - glBindProgram wasn't getting compiled into display lists + - GLX_FBCONFIG_ID wasn't recognized in glXChooseFBConfig() (bug 888079) + - two-sided lighting and vertex program didn't work (bug 887330) + - stores to program parameter registers in vertex state programs + didn't work. + - fixed glOrtho bug found with gcc 3.2.2 (RH9) + - glXCreateWindow() wasn't fully implemented (bug 890894) + - generic vertex attribute arrays didn't work in display lists + - vertex buffer objects' default usage and access fields were wrong + - glDrawArrays with start!=0 was broken + - fragment program PK2H, UP2H, UP4B and UP4UB instructions were broken + - linux-osmesa16-static config didn't work + - fixed a few color index rendering problems (bug 910687) + - glInterleavedArrays didn't respect GL_CLIENT_ACTIVE_TEXTURE + - OSMesa RGB and BGR modes were broken + - glProgramStringARB mistakenly required a null-terminated string + - fragment program XPD instruction was incorrect + - glGetMaterial() didn't work reliably + - ARB_fragment_program KIL instruction was incorrect + + +6.1 August 18, 2004 + New: + - Revamped Makefile system + - glXUseRotatedXFont() utility (see xdemos/xuserotfont.c) + - internal driver interface changes related to texture object + allocation, vertex/fragment programs, BlendEquationSeparate, etc. + - option to walk triangle edges with double-precision floats + (Justin Novosad of Discreet) (see config.h file) + - support for AUX buffers in software GLX driver + - updated glext.h to version 24 and glxext.h to version 6 + - new MESA_GLX_FORCE_ALPHA and MESA_GLX_DEPTH_BITS env vars + - updated BeOS support (Philippe Houdoin) + Changes: + - fragment fog interpolation is perspective corrected now + - new glTexImage code, much cleaner, may be a bit faster + Bug fixes: + - glArrayElement in display lists didn't handle generic vertex attribs + - glFogCoord didn't always work properly + - ARB_fragment_program fog options didn't work + - frag prog TEX instruction no longer incorrectly divides s,t,r by q + - ARB frag prog TEX and TEXP instructions now use LOD=0 + - glTexEnviv in display lists didn't work + - glRasterPos didn't do texgen or apply texture matrix + - GL_DOUBLE-valued vertex arrays were broken in some cases + - fixed texture rectangle edge/border sampling bugs + - sampling an incomplete texture in a fragment program would segfault + - glTexImage was missing a few error checks + - fixed some minor glGetTexParameter glitches + - GL_INTENSITY was mistakenly accepted as a to glTexImage + - fragment program writes to RC/HC register were broken + - fixed a few glitches in GL_HP_occlusion_test extension + - glBeginQueryARB and glEndQueryARB didn't work inside display lists + - vertex program state references were broken + - fixed triangle color interpolation bug on AIX (Shane Blackett) + - fixed a number of minor memory leaks (bug #1002030) + + +6.2 October 2, 2004 + New: + - enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle) + - updated Doxygen support (Jose Fonseca) + Changes: + - some GGI driver updates (Christoph Egger, bug 1025977) + Bug fixes: + - Omit GL_ARB_texture_non_power_of_two from list of OpenGL 1.5 features + - fixed a few compilation issues on IRIX + - fixed a matrix classification bug (reported by Wes Bethel) + - we weren't reseting the vertex/fragment program error state + before parsing (Dave Reveman) + - adjust texcoords for sampling texture rectangles (Dave Reveman) + - glGet*(GL_MAX_VERTEX_ATTRIBS_ARB) wasn't implemented + - repeated calls to glDeleteTexture(t) could lead to a crash + - fixed potential ref count bugs in VBOs and vertex/fragment programs + - spriteblast demo didn't handle window size changes correctly + - glTexSubImage didn't handle pixels=NULL correctly for PBOs + - fixed color index mode glDrawPixels bug (Karl Schultz) + + +6.2.1 December 9, 2004 + Bug fixes: + - don't apply regular fog or color sum when using a fragment program + - glProgramEnvParameter4fARB always generated an error on + GL_FRAGMENT_PROGRAM_ARB (fdo bug 1645) + - glVertexAttrib3svNV and glVertexAttrib3svARB were broken + - fixed width/height mix-up in glSeparableFilter2D() + - fixed regression in glCopyPixels + convolution + - glReadPixels from a clipped front color buffer didn't always work + - glTexImage didn't accept GL_RED/GREEN/BLUE as the format + - Attempting queries/accesses of VBO 0 weren't detected as errors + - paletted textures failed if the palette had fewer that 256 entries + Changes: + - fixed a bunch of compiler warnings found with gcc 3.4 + - bug reports should to go bugzilla.freedesktop.org Index: xc/extras/Mesa/docs/index.html diff -u xc/extras/Mesa/docs/index.html:1.1.1.1 xc/extras/Mesa/docs/index.html:removed --- xc/extras/Mesa/docs/index.html:1.1.1.1 Sun Sep 28 13:22:39 2003 +++ xc/extras/Mesa/docs/index.html Wed Mar 16 21:00:02 2005 @@ -1,91 +0,0 @@ - - - Index to Mesa Documentation - - - - -

    Main Documentation

    -
      -
    • README - general, top-level documentation -
    • INSTALL - compilation/installation instructions -
    • VERSIONS - version history / change log -
    • COPYRIGHT - copyright and license information -
    • COPYING - some parts of Mesa are GPL'd -
    • CONFORM - - results of running the OpenGL conformance tests -
    • DEVINFO - information for Mesa developers -
    • www.mesa3d.org - Mesa website -
    - -

    Platform and Driver Information

    -

    -Be warned, some of these files may be very out of date. -

    - - -

    Release Notes

    - - -

    Mesa Extension Specifications

    - - -

    Source Code Documentation

    -

    -Doxygen is used to automatically -produce cross-referenced documentation from the Mesa sources. -This is not included in the normal Mesa distribution. -Download Mesa from CVS if interested. -

    -

    -Source documentation -

    - - - - Index: xc/extras/Mesa/docs/precompiled.html diff -u /dev/null xc/extras/Mesa/docs/precompiled.html:1.1.1.1 --- /dev/null Wed Mar 16 21:00:02 2005 +++ xc/extras/Mesa/docs/precompiled.html Thu Jun 10 10:21:16 2004 @@ -0,0 +1,24 @@ + + +Precompiled libraries + + + +

    Precompiled Libraries

    + +

    +In general, precompiled libraries are not available. +However, people occasionally prepare packages of precompiled libraries +for some systems. +

    + +

    Mesa-6.0 for Solaris

    + +

    +Steve Christensen has submitted precompiled Mesa-6.0 libraries for +Solaris at +sunfreeware.com. +

    + + + Index: xc/extras/Mesa/include/GL/gl.h diff -u xc/extras/Mesa/include/GL/gl.h:1.17 xc/extras/Mesa/include/GL/gl.h:1.21 --- xc/extras/Mesa/include/GL/gl.h:1.17 Sun Sep 28 15:16:51 2003 +++ xc/extras/Mesa/include/GL/gl.h Fri Dec 10 10:30:08 2004 @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 5.0.1 + * Version: 6.2 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,14 @@ /********************************************************************** - * Begin system-specific stuff. + * Begin system-specific stuff. Do not do any of this when building + * for SciTech SNAP, as this is all done before this header file is + * included. */ +#if !defined(__SCITECH_SNAP__) + +#include /* to get ptrdiff_t, used below */ + #if defined(__BEOS__) #include /* to get some BeOS-isms */ #endif @@ -55,6 +61,9 @@ # define GLAPI extern # endif /* _STATIC_MESA support */ # define GLAPIENTRY __stdcall +#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ +# define GLAPI extern +# define GLAPIENTRY __stdcall #else /* non-Windows compilation */ # define GLAPI extern @@ -79,7 +88,7 @@ #endif #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__) -#include +#include #endif #if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED @@ -89,6 +98,11 @@ #ifndef APIENTRY #define APIENTRY GLAPIENTRY #endif +#define APIENTRYP APIENTRY * + +#ifndef GLAPIENTRYP +#define GLAPIENTRYP GLAPIENTRY * +#endif #ifdef CENTERLINE_CLPP #define signed @@ -98,6 +112,7 @@ #pragma export on #endif +#endif /* !__SCITECH_SNAP__ */ /* * End system-specific stuff. **********************************************************************/ @@ -153,10 +168,10 @@ #define GL_INT 0x1404 #define GL_UNSIGNED_INT 0x1405 #define GL_FLOAT 0x1406 -#define GL_DOUBLE 0x140A #define GL_2_BYTES 0x1407 #define GL_3_BYTES 0x1408 #define GL_4_BYTES 0x1409 +#define GL_DOUBLE 0x140A /* Primitives */ #define GL_POINTS 0x0000 @@ -1197,11 +1212,11 @@ GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param ); GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLint mapsize, +GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ); -GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLint mapsize, +GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize, const GLuint *values ); -GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLint mapsize, +GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize, const GLushort *values ); GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values ); @@ -1514,10 +1529,10 @@ GLint y, GLsizei width, GLsizei height ); -typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* @@ -1709,40 +1724,40 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); -typedef void (APIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRY * PFNGLRESETMINMAXPROC) (GLenum target); +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); @@ -1948,52 +1963,52 @@ GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); -typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); /* @@ -2073,40 +2088,40 @@ GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); #endif /* GL_ARB_multitexture */ @@ -2118,437 +2133,7 @@ */ #if defined(GL_GLEXT_LEGACY) - -/* - * 1. GL_EXT_abgr - */ -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 - -#define GL_ABGR_EXT 0x8000 - -#endif /* GL_EXT_abgr */ - - - -/* - * 2. GL_EXT_blend_color - */ -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 - -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 - -GLAPI void GLAPIENTRY glBlendColorEXT( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); - -#endif /* GL_EXT_blend_color */ - - - -/* - * 3. GL_EXT_polygon_offset - */ -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 - -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 - -GLAPI void GLAPIENTRY glPolygonOffsetEXT( GLfloat factor, GLfloat bias ); - -#endif /* GL_EXT_polygon_offset */ - - - -/* - * 6. GL_EXT_texture3D - */ -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 - -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A - -GLAPI void GLAPIENTRY glTexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); - -GLAPI void GLAPIENTRY glCopyTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); - -#endif /* GL_EXT_texture3D */ - - - -/* - * 20. GL_EXT_texture_object - */ -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 - -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 - -GLAPI void GLAPIENTRY glGenTexturesEXT( GLsizei n, GLuint *textures ); - -GLAPI void GLAPIENTRY glDeleteTexturesEXT( GLsizei n, const GLuint *textures); - -GLAPI void GLAPIENTRY glBindTextureEXT( GLenum target, GLuint texture ); - -GLAPI void GLAPIENTRY glPrioritizeTexturesEXT( GLsizei n, const GLuint *textures, const GLclampf *priorities ); - -GLAPI GLboolean GLAPIENTRY glAreTexturesResidentEXT( GLsizei n, const GLuint *textures, GLboolean *residences ); - -GLAPI GLboolean GLAPIENTRY glIsTextureEXT( GLuint texture ); - -#endif /* GL_EXT_texture_object */ - - - -/* - * 27. GL_EXT_rescale_normal - */ -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 - -#define GL_RESCALE_NORMAL_EXT 0x803A - -#endif /* GL_EXT_rescale_normal */ - - - -/* - * 30. GL_EXT_vertex_array - */ -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 - -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 - -GLAPI void GLAPIENTRY glVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glIndexPointerEXT( GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glEdgeFlagPointerEXT( GLsizei stride, GLsizei count, const GLboolean *ptr ); - -GLAPI void GLAPIENTRY glGetPointervEXT( GLenum pname, GLvoid **params ); - -GLAPI void GLAPIENTRY glArrayElementEXT( GLint i ); - -GLAPI void GLAPIENTRY glDrawArraysEXT( GLenum mode, GLint first, GLsizei count ); - -#endif /* GL_EXT_vertex_array */ - - - -/* - * 35. GL_SGIS_texture_edge_clamp - */ -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 - -#define GL_CLAMP_TO_EDGE_SGIS 0x812F - -#endif /* GL_SGIS_texture_edge_clamp */ - - - -/* - * 37. GL_EXT_blend_minmax - */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 - -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 - -GLAPI void GLAPIENTRY glBlendEquationEXT( GLenum mode ); - -#endif /* GL_EXT_blend_minmax */ - - - -/* - * 38. GL_EXT_blend_subtract (requires GL_EXT_blend_max ) - */ -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 - -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B - -#endif /* GL_EXT_blend_subtract */ - - - -/* - * 39. GL_EXT_blend_logic_op - */ -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 - -/* No new tokens or functions */ - -#endif /* GL_EXT_blend_logic_op */ - - - -/* - * 54. GL_EXT_point_parameters - */ -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 - -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 - -GLAPI void GLAPIENTRY glPointParameterfEXT( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPointParameterfvEXT( GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glPointParameterfSGIS(GLenum pname, GLfloat param); -GLAPI void GLAPIENTRY glPointParameterfvSGIS(GLenum pname, const GLfloat *params); - -#endif /* GL_EXT_point_parameters */ - - - -/* - * 78. GL_EXT_paletted_texture - */ -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 - -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 -#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 - -GLAPI void GLAPIENTRY glColorTableEXT( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ); - -GLAPI void GLAPIENTRY glColorSubTableEXT( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ); - -GLAPI void GLAPIENTRY glGetColorTableEXT( GLenum target, GLenum format, GLenum type, GLvoid *table ); - -GLAPI void GLAPIENTRY glGetColorTableParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ); - -GLAPI void GLAPIENTRY glGetColorTableParameterivEXT( GLenum target, GLenum pname, GLint *params ); - -#endif /* GL_EXT_paletted_texture */ - - - -/* - * 79. GL_EXT_clip_volume_hint - */ -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 - -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 - -#endif /* GL_EXT_clip_volume_hint */ - - - -/* - * 97. GL_EXT_compiled_vertex_array - */ -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 - -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 - -GLAPI void GLAPIENTRY glLockArraysEXT( GLint first, GLsizei count ); -GLAPI void GLAPIENTRY glUnlockArraysEXT( void ); - -#endif /* GL_EXT_compiled_vertex_array */ - -/* - * 137. GL_HP_occlusion_test - */ -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 - -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 - -#endif /* GL_HP_occlusion_test */ - - -/* - * 141. GL_EXT_shared_texture_palette (req's GL_EXT_paletted_texture) - */ -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 - -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB - -#endif /* GL_EXT_shared_texture_palette */ - - - -/* - * 176. GL_EXT_stencil_wrap - */ -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 - -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 - -#endif /* GL_EXT_stencil_wrap */ - - - -/* - * 179. GL_NV_texgen_reflection - */ -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 - -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 - -#endif /* GL_NV_texgen_reflection */ - - - -/* - * 185. GL_EXT_texture_env_add - */ -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 - -/* No new tokens or functions */ - -#endif /* GL_EXT_texture_env_add */ - - - -/* - * 197. GL_MESA_window_pos - */ -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 - -GLAPI void GLAPIENTRY glWindowPos2iMESA( GLint x, GLint y ); -GLAPI void GLAPIENTRY glWindowPos2sMESA( GLshort x, GLshort y ); -GLAPI void GLAPIENTRY glWindowPos2fMESA( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glWindowPos2dMESA( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glWindowPos2ivMESA( const GLint *p ); -GLAPI void GLAPIENTRY glWindowPos2svMESA( const GLshort *p ); -GLAPI void GLAPIENTRY glWindowPos2fvMESA( const GLfloat *p ); -GLAPI void GLAPIENTRY glWindowPos2dvMESA( const GLdouble *p ); -GLAPI void GLAPIENTRY glWindowPos3iMESA( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glWindowPos3sMESA( GLshort x, GLshort y, GLshort z ); -GLAPI void GLAPIENTRY glWindowPos3fMESA( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glWindowPos3dMESA( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glWindowPos3ivMESA( const GLint *p ); -GLAPI void GLAPIENTRY glWindowPos3svMESA( const GLshort *p ); -GLAPI void GLAPIENTRY glWindowPos3fvMESA( const GLfloat *p ); -GLAPI void GLAPIENTRY glWindowPos3dvMESA( const GLdouble *p ); -GLAPI void GLAPIENTRY glWindowPos4iMESA( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glWindowPos4sMESA( GLshort x, GLshort y, GLshort z, GLshort w ); -GLAPI void GLAPIENTRY glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glWindowPos4dMESA( GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void GLAPIENTRY glWindowPos4ivMESA( const GLint *p ); -GLAPI void GLAPIENTRY glWindowPos4svMESA( const GLshort *p ); -GLAPI void GLAPIENTRY glWindowPos4fvMESA( const GLfloat *p ); -GLAPI void GLAPIENTRY glWindowPos4dvMESA( const GLdouble *p ); - -#endif /* GL_MESA_window_pos */ - - - -/* - * 196. GL_MESA_resize_bufffers - */ -#ifndef GL_MESA_resize_bufffers -#define GL_MESA_resize_buffers 1 - -GLAPI void GLAPIENTRY glResizeBuffersMESA( void ); - -#endif /* GL_MESA_resize_bufffers */ - - - -/* - * 220. GL_EXT_texture_env_dot3 - */ -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 - -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 - -#endif /* GL_EXT_texture_env_dot3 */ - +/* All extensions that used to be here are now found in glext.h */ #else /* GL_GLEXT_LEGACY */ @@ -2605,51 +2190,47 @@ #endif /* GL_MESA_packed_depth_stencil */ -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 - -#define GL_YCBCR_MESA 0x8757 -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA /* same as Apple */ -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB /* same as Apple */ - -#endif /* GL_MESA_texture_ycbcr */ +#ifndef GL_MESA_program_debug +#define GL_MESA_program_debug 1 +#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 +#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 +#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 +#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 +#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4 +#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5 +#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 +#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 +extern void +glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, + GLvoid *data); -#define GL_PACK_INVERT_MESA 0x8758 +extern void +glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, + GLfloat *v); -#endif /* GL_MESA_pack_invert */ +#endif /* GL_MESA_program_debug */ +#ifndef GL_ATI_blend_equation_separate +#define GL_ATI_blend_equation_separate 1 -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 +#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); -#endif /* GL_APPLE_client_storage */ +#endif /* GL_ATI_blend_equation_separate */ - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 - -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB - -#endif /* GL_APPLE_ycbcr_422 */ - - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif +/** + ** NOTE!!!!! If you add new functions to this file, or update + ** glext.h be sure to regenerate the gl_mangle.h file. See comments + ** in that file for details. + **/ /********************************************************************** Index: xc/extras/Mesa/include/GL/glext.h diff -u xc/extras/Mesa/include/GL/glext.h:1.11 xc/extras/Mesa/include/GL/glext.h:1.14 --- xc/extras/Mesa/include/GL/glext.h:1.11 Mon Sep 9 17:51:55 2002 +++ xc/extras/Mesa/include/GL/glext.h Fri Dec 10 10:30:08 2004 @@ -24,7 +24,7 @@ ** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2002 Silicon Graphics, Inc. +** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. ** @@ -34,7 +34,7 @@ ** version 1.2.1 Specification. */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include #endif @@ -42,6 +42,9 @@ #ifndef APIENTRY #define APIENTRY #endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif #ifndef GLAPI #define GLAPI extern #endif @@ -49,9 +52,9 @@ /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated 2002/08/21 */ +/* glext.h last updated 2004/7/26 */ /* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ -#define GL_GLEXT_VERSION 17 +#define GL_GLEXT_VERSION 24 #ifndef GL_VERSION_1_2 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 @@ -248,7 +251,6 @@ #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 #define GL_CLAMP_TO_BORDER 0x812D -#define GL_CLAMP_TO_BORDER_SGIS 0x812D #define GL_COMBINE 0x8570 #define GL_COMBINE_RGB 0x8571 #define GL_COMBINE_ALPHA 0x8572 @@ -317,6 +319,59 @@ #define GL_COMPARE_R_TO_TEXTURE 0x884E #endif +#ifndef GL_VERSION_1_5 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +#endif + #ifndef GL_ARB_multitexture #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 @@ -534,21 +589,29 @@ #endif #ifndef GL_ARB_vertex_program -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 #define GL_COLOR_SUM_ARB 0x8458 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_VERTEX_PROGRAM_ARB 0x8620 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 #define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B #define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 @@ -572,15 +635,7 @@ #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_CURRENT_MATRIX_ARB 0x8641 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 #define GL_MATRIX0_ARB 0x88C0 #define GL_MATRIX1_ARB 0x88C1 #define GL_MATRIX2_ARB 0x88C2 @@ -615,6 +670,161 @@ #define GL_MATRIX31_ARB 0x88DF #endif +#ifndef GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + #ifndef GL_EXT_abgr #define GL_ABGR_EXT 0x8000 #endif @@ -945,6 +1155,10 @@ #define GL_CLAMP_TO_EDGE_SGIS 0x812F #endif +#ifndef GL_SGIS_texture_border_clamp +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif + #ifndef GL_EXT_blend_minmax #define GL_FUNC_ADD_EXT 0x8006 #define GL_MIN_EXT 0x8007 @@ -2308,7 +2522,7 @@ #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA #define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE #define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF #define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 @@ -2423,9 +2637,242 @@ #define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 #endif +#ifndef GL_ATI_text_fragment_shader +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +#ifndef GL_APPLE_element_array +#define GL_ELEMENT_ARRAY_APPLE 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A +#endif + +#ifndef GL_APPLE_fence +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +#ifndef GL_S3_s3tc +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +#ifndef GL_ATI_texture_float +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +#ifndef GL_NV_float_buffer +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +#ifndef GL_NV_fragment_program +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +#endif + +#ifndef GL_NV_half_float +#define GL_HALF_FLOAT_NV 0x140B +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +#endif + +#ifndef GL_NV_primitive_restart +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +#ifndef GL_NV_vertex_program2 +#endif + +#ifndef GL_ATI_map_object_buffer +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +#endif + +#ifndef GL_MESA_pack_invert +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + +#ifndef GL_NV_fragment_program_option +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + +#ifndef GL_NV_vertex_program2_option +/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ +/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ +#endif + +#ifndef GL_NV_vertex_program3 +/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ +#endif + /*************************************************************/ +#include +#ifndef GL_VERSION_1_5 +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +#endif + +#ifndef GL_ARB_vertex_buffer_object +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +#endif + +#ifndef GL_ARB_shader_objects +/* GL types for handling shader object handles and characters */ +typedef char GLcharARB; /* native character */ +typedef unsigned int GLhandleARB; /* shader object handle */ +#endif + +#ifndef GL_NV_half_float +/* GL type for representing NVIDIA "half" floating point type in host memory */ +typedef unsigned short GLhalfNV; +#endif + #ifndef GL_VERSION_1_2 #define GL_VERSION_1_2 1 #ifdef GL_GLEXT_PROTOTYPES @@ -2468,44 +2915,44 @@ GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRY * PFNGLRESETMINMAXPROC) (GLenum target); -typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif #ifndef GL_VERSION_1_3 @@ -2556,54 +3003,54 @@ GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, void *); +GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); #endif #ifndef GL_VERSION_1_4 @@ -2655,51 +3102,95 @@ GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos3sv (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRY * PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRY * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRY * PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRY * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRY * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRY * PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRY * PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +#endif + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsQuery (GLuint); +GLAPI void APIENTRY glBeginQuery (GLenum, GLuint); +GLAPI void APIENTRY glEndQuery (GLenum); +GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *); +GLAPI void APIENTRY glBindBuffer (GLenum, GLuint); +GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsBuffer (GLuint); +GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum); +GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *); +GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *); +GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum); +GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum); +GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); #endif #ifndef GL_ARB_multitexture @@ -2740,40 +3231,40 @@ GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); #endif #ifndef GL_ARB_transpose_matrix @@ -2784,10 +3275,10 @@ GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *); GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); #endif #ifndef GL_ARB_multisample @@ -2795,7 +3286,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); #endif #ifndef GL_ARB_texture_env_add @@ -2815,15 +3306,15 @@ GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, void *); +GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); #endif #ifndef GL_ARB_texture_border_clamp @@ -2836,8 +3327,8 @@ GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_ARB_vertex_blend @@ -2854,16 +3345,16 @@ GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glVertexBlendARB (GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRY * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRY * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRY * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRY * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRY * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRY * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRY * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLVERTEXBLENDARBPROC) (GLint count); +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); #endif #ifndef GL_ARB_matrix_palette @@ -2875,11 +3366,11 @@ GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *); GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRY * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRY * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRY * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_ARB_texture_env_combine @@ -2894,8 +3385,8 @@ #define GL_ARB_texture_env_dot3 1 #endif -#ifndef GL_ARB_texture_mirror_repeat -#define GL_ARB_texture_mirror_repeat 1 +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 #endif #ifndef GL_ARB_depth_texture @@ -2930,22 +3421,22 @@ GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); #endif #ifndef GL_ARB_vertex_program @@ -3014,68 +3505,251 @@ GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); GLAPI GLboolean APIENTRY glIsProgramARB (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRY * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRY * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRY * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRY * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +#endif + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint); +GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *); +GLAPI GLboolean APIENTRY glIsBufferARB (GLuint); +GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); +GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); +GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); +GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum); +GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum); +GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsQueryARB (GLuint); +GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint); +GLAPI void APIENTRY glEndQueryARB (GLenum); +GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB); +GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum); +GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB); +GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum); +GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); +GLAPI void APIENTRY glCompileShaderARB (GLhandleARB); +GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); +GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB); +GLAPI void APIENTRY glLinkProgramARB (GLhandleARB); +GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB); +GLAPI void APIENTRY glValidateProgramARB (GLhandleARB); +GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat); +GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glUniform1iARB (GLint, GLint); +GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint); +GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint); +GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *); +GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *); +GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); +GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); +GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *); +GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); +GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *); +GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *); +GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *); +GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); +GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#endif + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#endif + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#endif + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 #endif #ifndef GL_EXT_abgr @@ -3087,7 +3761,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); #endif #ifndef GL_EXT_polygon_offset @@ -3095,7 +3769,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); #endif #ifndef GL_EXT_texture @@ -3108,8 +3782,8 @@ GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_SGIS_texture_filter4 @@ -3118,8 +3792,8 @@ GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRY * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); #endif #ifndef GL_EXT_subtexture @@ -3128,8 +3802,8 @@ GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_EXT_copy_texture @@ -3141,11 +3815,11 @@ GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRY * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif #ifndef GL_EXT_histogram @@ -3162,16 +3836,16 @@ GLAPI void APIENTRY glResetHistogramEXT (GLenum); GLAPI void APIENTRY glResetMinmaxEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRY * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRY * PFNGLRESETMINMAXEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); #endif #ifndef GL_EXT_convolution @@ -3191,19 +3865,19 @@ GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); #endif #ifndef GL_EXT_color_matrix @@ -3221,13 +3895,13 @@ GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRY * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); #endif #ifndef GL_SGIX_pixel_texture @@ -3235,7 +3909,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelTexGenSGIX (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); #endif #ifndef GL_SGIS_pixel_texture @@ -3248,12 +3922,12 @@ GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *); GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); #endif #ifndef GL_SGIS_texture4D @@ -3262,8 +3936,8 @@ GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_SGI_texture_color_table @@ -3284,12 +3958,12 @@ GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint); GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRY * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRY * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRY * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRY * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRY * PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRY * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); #endif #ifndef GL_SGIS_detail_texture @@ -3298,8 +3972,8 @@ GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRY * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); #endif #ifndef GL_SGIS_sharpen_texture @@ -3308,8 +3982,8 @@ GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRY * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); #endif #ifndef GL_EXT_packed_pixels @@ -3326,8 +4000,8 @@ GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean); GLAPI void APIENTRY glSamplePatternSGIS (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRY * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); #endif #ifndef GL_EXT_rescale_normal @@ -3347,15 +4021,15 @@ GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); #endif #ifndef GL_EXT_misc_attribute @@ -3387,7 +4061,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendEquationEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); #endif #ifndef GL_EXT_blend_subtract @@ -3418,10 +4092,10 @@ GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint); GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); #endif #ifndef GL_SGIX_texture_multi_buffer @@ -3434,8 +4108,8 @@ GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_SGIS_point_parameters @@ -3444,8 +4118,8 @@ GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_SGIX_instruments @@ -3458,12 +4132,12 @@ GLAPI void APIENTRY glStartInstrumentsSGIX (void); GLAPI void APIENTRY glStopInstrumentsSGIX (GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRY * PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRY * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRY * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRY * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRY * PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRY * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); #endif #ifndef GL_SGIX_texture_scale_bias @@ -3475,7 +4149,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFrameZoomSGIX (GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); #endif #ifndef GL_SGIX_tag_sample_buffer @@ -3483,7 +4157,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTagSampleBufferSGIX (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); #endif #ifndef GL_SGIX_polynomial_ffd @@ -3494,10 +4168,10 @@ GLAPI void APIENTRY glDeformSGIX (GLbitfield); GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRY * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRY * PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRY * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); #endif #ifndef GL_SGIX_reference_plane @@ -3505,7 +4179,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); #endif #ifndef GL_SGIX_flush_raster @@ -3513,7 +4187,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFlushRasterSGIX (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void); +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); #endif #ifndef GL_SGIX_depth_texture @@ -3526,8 +4200,8 @@ GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *); GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRY * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); #endif #ifndef GL_SGIX_fog_offset @@ -3544,12 +4218,12 @@ GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); #endif #ifndef GL_HP_convolution_border_modes @@ -3566,8 +4240,8 @@ GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); #endif #ifndef GL_PGI_vertex_hints @@ -3579,7 +4253,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glHintPGI (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLHINTPGIPROC) (GLenum target, GLint mode); +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); #endif #ifndef GL_EXT_paletted_texture @@ -3590,10 +4264,10 @@ GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); #endif #ifndef GL_EXT_clip_volume_hint @@ -3610,12 +4284,12 @@ GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint); GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); #endif #ifndef GL_SGIX_ir_instrument1 @@ -3643,7 +4317,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); #endif #ifndef GL_EXT_index_func @@ -3651,7 +4325,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); #endif #ifndef GL_EXT_index_array_formats @@ -3664,8 +4338,8 @@ GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei); GLAPI void APIENTRY glUnlockArraysEXT (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void); +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); #endif #ifndef GL_EXT_cull_vertex @@ -3674,8 +4348,8 @@ GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *); GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); #endif #ifndef GL_SGIX_ycrcb @@ -3704,24 +4378,24 @@ GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); #endif #ifndef GL_IBM_rasterpos_clip @@ -3737,7 +4411,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); #endif #ifndef GL_WIN_phong_shading @@ -3755,9 +4429,9 @@ GLAPI void APIENTRY glTextureLightEXT (GLenum); GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRY * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); #endif #ifndef GL_SGIX_blend_alpha_minmax @@ -3778,12 +4452,12 @@ GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei); GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); #endif #ifndef GL_SGIX_async_pixel @@ -3802,10 +4476,10 @@ GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *); GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRY * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRY * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRY * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); #endif #ifndef GL_HP_occlusion_test @@ -3820,10 +4494,10 @@ GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); #endif #ifndef GL_EXT_pixel_transform_color_table @@ -3859,23 +4533,23 @@ GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *); GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_EXT_texture_perturb_normal @@ -3883,7 +4557,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTextureNormalEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); #endif #ifndef GL_EXT_multi_draw_arrays @@ -3892,8 +4566,8 @@ GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); #endif #ifndef GL_EXT_fog_coord @@ -3905,11 +4579,11 @@ GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *); GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRY * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRY * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRY * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_REND_screen_coordinates @@ -3942,28 +4616,28 @@ GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRY * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRY * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRY * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRY * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRY * PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRY * PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRY * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRY * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRY * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRY * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRY * PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRY * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_EXT_texture_env_combine @@ -3987,7 +4661,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFinishTextureSUNX (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFINISHTEXTURESUNXPROC) (void); +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); #endif #ifndef GL_SUN_global_alpha @@ -4002,14 +4676,14 @@ GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort); GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); #endif #ifndef GL_SUN_triangle_list @@ -4023,13 +4697,13 @@ GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *); GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); #endif #ifndef GL_SUN_vertex @@ -4076,46 +4750,46 @@ GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); #endif #ifndef GL_EXT_blend_func_separate @@ -4123,7 +4797,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); #endif #ifndef GL_INGR_blend_func_separate @@ -4131,7 +4805,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); #endif #ifndef GL_INGR_color_clamp @@ -4177,9 +4851,9 @@ GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *); GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRY * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRY * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_NV_light_max_exponent @@ -4192,8 +4866,8 @@ GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRY * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); #endif #ifndef GL_NV_register_combiners @@ -4213,19 +4887,19 @@ GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); #endif #ifndef GL_NV_fog_distance @@ -4249,7 +4923,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glResizeBuffersMESA (void); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLRESIZEBUFFERSMESAPROC) (void); +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); #endif #ifndef GL_MESA_window_pos @@ -4280,30 +4954,30 @@ GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRY * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRY * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRY * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRY * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRY * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRY * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRY * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); #endif #ifndef GL_IBM_cull_vertex @@ -4313,11 +4987,11 @@ #ifndef GL_IBM_multimode_draw_arrays #define GL_IBM_multimode_draw_arrays 1 #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (GLenum, const GLint *, const GLsizei *, GLsizei, GLint); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* *, GLsizei, GLint); +GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); +GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); #endif #ifndef GL_IBM_vertex_array_lists @@ -4332,14 +5006,14 @@ GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); #endif #ifndef GL_SGIX_subsample @@ -4371,7 +5045,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTbufferMask3DFX (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); #endif #ifndef GL_EXT_multisample @@ -4380,8 +5054,8 @@ GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean); GLAPI void APIENTRY glSamplePatternEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); #endif #ifndef GL_SGIX_vertex_preclip @@ -4405,7 +5079,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); #endif #ifndef GL_SGIX_igloo_interface @@ -4413,7 +5087,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); #endif #ifndef GL_EXT_texture_env_dot3 @@ -4435,13 +5109,13 @@ GLAPI void APIENTRY glFinishFenceNV (GLuint); GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRY * PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); #endif #ifndef GL_NV_evaluators @@ -4457,15 +5131,15 @@ GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRY * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRY * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRY * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); #endif #ifndef GL_NV_packed_depth_stencil @@ -4478,8 +5152,8 @@ GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); #endif #ifndef GL_NV_texture_compression_vtc @@ -4570,70 +5244,70 @@ GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); -typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); -typedef void (APIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); #endif #ifndef GL_SGIX_texture_coordinate_clamp @@ -4668,10 +5342,10 @@ GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *); GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); #endif #ifndef GL_ATI_fragment_shader @@ -4692,20 +5366,20 @@ GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRY * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRY * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRY * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRY * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRY * PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRY * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRY * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRY * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); #endif #ifndef GL_ATI_pn_triangles @@ -4714,8 +5388,8 @@ GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint); GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); #endif #ifndef GL_ATI_vertex_array_object @@ -4726,7 +5400,7 @@ GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint); +GLAPI void APIENTRY glFreeObjectBufferATI (GLuint); GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *); @@ -4734,18 +5408,18 @@ GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRY * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRY * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRY * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRY * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRY * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRY * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); #endif #ifndef GL_EXT_vertex_shader @@ -4764,8 +5438,8 @@ GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint); GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint); GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); -GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const void *); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const void *); +GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *); +GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *); GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *); GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *); GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *); @@ -4774,7 +5448,7 @@ GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *); GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *); GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *); -GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const void *); +GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *); GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint); GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint); GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum); @@ -4794,48 +5468,48 @@ GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRY * PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRY * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRY * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRY * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRY * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRY * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRY * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRY * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRY * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRY * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRY * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRY * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRY * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr); -typedef void (APIENTRY * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr); -typedef void (APIENTRY * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRY * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRY * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRY * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRY * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRY * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRY * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRY * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRY * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr); -typedef void (APIENTRY * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRY * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRY * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRY * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRY * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRY * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRY * PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRY * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRY * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRY * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRY * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRY * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRY * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); #endif #ifndef GL_ATI_vertex_streams @@ -4887,51 +5561,51 @@ GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRY * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); #endif #ifndef GL_ATI_element_array @@ -4941,9 +5615,9 @@ GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); #endif #ifndef GL_SUN_mesh_array @@ -4951,7 +5625,7 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); #endif #ifndef GL_SUN_slice_accum @@ -4977,13 +5651,13 @@ GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); #endif #ifndef GL_NV_point_sprite @@ -4992,8 +5666,8 @@ GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); #endif #ifndef GL_NV_texture_shader3 @@ -5013,7 +5687,339 @@ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +#endif + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#endif + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#endif + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *); +GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei); +GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei); +GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei); +GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +#endif + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *); +GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *); +GLAPI void APIENTRY glSetFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint); +GLAPI void APIENTRY glFinishFenceAPPLE (GLuint); +GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint); +GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +#endif + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint); +GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *); +GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *); +GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +#endif + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *); +GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *); +GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +#endif + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#endif + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#endif + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +#endif + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +/* This is really a WGL extension, but defines some associated GL enums. + * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. + */ +#endif + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#endif + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#endif + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#endif + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); +GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); +GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *); +GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *); +GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *); +GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +#endif + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV); +GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *); +GLAPI void APIENTRY glFogCoordhNV (GLhalfNV); +GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *); +GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV); +GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); +GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *); +GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +#endif + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *); +GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +#endif + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveRestartNV (void); +GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +#endif + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#endif + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#endif + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint); +GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +#endif + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum); +GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +#endif + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint); +GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *); +GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +#endif + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +#endif + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#endif + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +#endif + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#endif + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#endif + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#endif + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#endif + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#endif + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#endif + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 #endif Index: xc/extras/Mesa/include/GL/glxext.h diff -u xc/extras/Mesa/include/GL/glxext.h:1.6 xc/extras/Mesa/include/GL/glxext.h:1.12 --- xc/extras/Mesa/include/GL/glxext.h:1.6 Mon Jan 12 21:42:51 2004 +++ xc/extras/Mesa/include/GL/glxext.h Fri Dec 10 12:21:09 2004 @@ -24,7 +24,7 @@ ** ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. ** @@ -33,9 +33,9 @@ ** not been independently verified as being compliant with the OpenGL(R) ** version 1.2.1 Specification. */ -/* $XFree86: xc/extras/Mesa/include/GL/glxext.h,v 1.6 2004/01/13 02:42:51 tsi Exp $ */ +/* $XFree86: xc/extras/Mesa/include/GL/glxext.h,v 1.12 2004/12/10 17:21:09 alanh Exp $ */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include #endif @@ -43,6 +43,9 @@ #ifndef APIENTRY #define APIENTRY #endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif #ifndef GLAPI #define GLAPI extern #endif @@ -50,9 +53,9 @@ /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ -/* glxext.h last updated 2002/03/22 */ +/* glxext.h last updated 2004/07/26 */ /* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ -#define GLX_GLXEXT_VERSION 5 +#define GLX_GLXEXT_VERSION 6 #ifndef GLX_VERSION_1_3 #define GLX_WINDOW_BIT 0x00000001 @@ -261,9 +264,6 @@ #ifndef GLX_MESA_release_buffers #endif -#ifndef GLX_MESA_agp_offset -#endif - #ifndef GLX_MESA_set_3dfx_mode #define GLX_3DFX_WINDOW_MODE_MESA 0x1 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 @@ -283,6 +283,22 @@ #ifndef GLX_OML_sync_control #endif +#ifndef GLX_SGIX_hyperpipe_group +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +#endif + +#ifndef GLX_MESA_agp_offset +#endif + /*************************************************************/ @@ -321,7 +337,7 @@ typedef long long int int64_t; #endif -#if defined(SCO) || defined(__USLC__) +#if defined(__SCO__) || defined(__USLC__) #include #endif @@ -423,18 +439,18 @@ typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); #endif -#ifdef _VL_H #ifndef GLX_SGIX_video_source #define GLX_SGIX_video_source 1 +#ifdef _VL_H #ifdef GLX_GLXEXT_PROTOTYPES extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode); extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); +#endif /* _VL_H */ #endif -#endif /* _VL_H */ #ifndef GLX_EXT_visual_rating #define GLX_EXT_visual_rating 1 #endif @@ -513,16 +529,16 @@ typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); #endif -#ifdef _DM_BUFFER_H_ #ifndef GLX_SGIX_dmbuffer #define GLX_SGIX_dmbuffer 1 +#ifdef _DM_BUFFER_H_ #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); +#endif /* _DM_BUFFER_H_ */ #endif -#endif /* _DM_BUFFER_H_ */ #ifndef GLX_SGIX_swap_group #define GLX_SGIX_swap_group 1 #ifdef GLX_GLXEXT_PROTOTYPES @@ -581,24 +597,6 @@ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); #endif -#ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLuint glXGetAGPOffsetMESA (const GLvoid *); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLuint ( * PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *); -#endif - -#ifndef GLX_MESA_swap_control -#define GLX_MESA_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLint glXSwapIntervalMESA(unsigned interval); -extern GLint glXGetSwapIntervalMESA( void ); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLint ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned interval); -typedef GLint ( * PFNGLXGETSWAPINTERVALMESAPROC) ( void ); -#endif - #ifndef GLX_SGIX_visual_select_group #define GLX_SGIX_visual_select_group 1 #endif @@ -623,18 +621,59 @@ typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); #endif -#ifndef GLX_MESA_swap_frame_usage -#define GLX_MESA_swap_frame_usage 1 +#ifndef GLX_SGIX_hyperpipe_group +#define GLX_SGIX_hyperpipe_group 1 + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; +} GLXHyperpipeNetworkSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int + participationType; + int timeSlice; +} GLXHyperpipeConfigSGIX; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin, srcYOrigin, srcWidth, srcHeight; + int destXOrigin, destYOrigin, destWidth, destHeight; +} GLXPipeRect; + +typedef struct { + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin, YOrigin, maxHeight, maxWidth; +} GLXPipeRectLimits; + +#ifdef GLX_GLXEXT_PROTOTYPES +extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *); +extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *); +extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *); +extern int glXDestroyHyperpipeConfigSGIX (Display *, int); +extern int glXBindHyperpipeSGIX (Display *, int); +extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *); +extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *); +extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); +typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); +typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); +typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); +typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); +typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); +typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); +#endif + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 #ifdef GLX_GLXEXT_PROTOTYPES -extern GLint glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable); -extern GLint glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable); -extern GLint glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, GLfloat *usage); -extern GLint glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *sbc, int64_t *missedFrames, GLfloat *lastMissedUsage); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLint ( * PFNGLXBEGINFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable); -typedef GLint ( * PFNGLXENDFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable); -typedef GLint ( * PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, GLfloat *usage); -typedef GLint ( * PFNGLXQUERYFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable, int64_t *sbc, int64_t *missedFrames, GLfloat *lastMissedUsage); +extern unsigned int glXGetAGPOffsetMESA (const void *); +#endif /* GLX_GLXEXT_PROTOTYPES */ +typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); #endif #ifdef __cplusplus Index: xc/extras/Mesa/include/GL/xmesa_x.h diff -u xc/extras/Mesa/include/GL/xmesa_x.h:1.3 xc/extras/Mesa/include/GL/xmesa_x.h:1.4 --- xc/extras/Mesa/include/GL/xmesa_x.h:1.3 Thu Mar 2 11:06:57 2000 +++ xc/extras/Mesa/include/GL/xmesa_x.h Thu Jun 10 10:43:38 2004 @@ -30,6 +30,10 @@ * Authors: * Kevin E. Martin * + * When we're building the XMesa driver for stand-alone Mesa we + * include this file when building the xm_*.c files. + * We need to define some types and macros differently when building + * in the Xserver vs. stand-alone Mesa. */ #ifndef _XMESA_X_H_ @@ -55,35 +59,25 @@ #define XMesaSetBackground XSetBackground #define XMesaSetPlaneMask XSetPlaneMask #define XMesaSetFunction XSetFunction -#define XMesaSetDashes XSetDashes -#define XMesaSetLineAttributes XSetLineAttributes #define XMesaSetFillStyle XSetFillStyle #define XMesaSetTile XSetTile -#define XMesaSetStipple XSetStipple #define XMesaDrawPoint XDrawPoint #define XMesaDrawPoints XDrawPoints -#define XMesaDrawLine XDrawLine #define XMesaFillRectangle XFillRectangle #define XMesaPutImage XPutImage #define XMesaCopyArea XCopyArea -#define XMesaFillPolygon XFillPolygon #define XMesaCreatePixmap XCreatePixmap #define XMesaFreePixmap XFreePixmap #define XMesaFreeGC XFreeGC #define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size -#define GET_REDMASK(__v) __v->visinfo->red_mask -#define GET_GREENMASK(__v) __v->visinfo->green_mask -#define GET_BLUEMASK(__v) __v->visinfo->blue_mask -#if defined(__cplusplus) || defined(c_plusplus) -#define GET_VISUAL_CLASS(__v) __v->visinfo->c_class -#else -#define GET_VISUAL_CLASS(__v) __v->visinfo->class -#endif +#define GET_REDMASK(__v) __v->mesa_visual.redMask +#define GET_GREENMASK(__v) __v->mesa_visual.greenMask +#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask #define GET_VISUAL_DEPTH(__v) __v->visinfo->depth -#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->visinfo->screen) +#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen) #define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display) #define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True) Index: xc/extras/Mesa/include/GL/xmesa_xf86.h diff -u xc/extras/Mesa/include/GL/xmesa_xf86.h:1.5 xc/extras/Mesa/include/GL/xmesa_xf86.h:1.6 --- xc/extras/Mesa/include/GL/xmesa_xf86.h:1.5 Mon Nov 13 18:30:39 2000 +++ xc/extras/Mesa/include/GL/xmesa_xf86.h Thu Jun 10 10:43:38 2004 @@ -30,6 +30,10 @@ * Authors: * Kevin E. Martin * + * When we're building the XMesa driver for use in the X server (as the + * indirect render) we include this file when building the xm_*.c files. + * We need to define some types and macros differently when building + * in the Xserver vs. stand-alone Mesa. */ #ifndef _XMESA_XF86_H_ @@ -66,25 +70,6 @@ dixChangeGC(NullClient, __gc, __mask, NULL, __v); \ } while (0) -#define XMesaSetDashes(__d,__gc,__do,__dl,__n) \ -do { \ - (void) __d; \ - SetDashes(__gc, __do, __n, (unsigned char *)__dl); \ -} while (0) - -#define XMesaSetLineAttributes(__d,__gc,__lw,__ls,__cs,__js) \ -do { \ - CARD32 __v[4]; \ - (void) __d; \ - __v[0] = __lw; \ - __v[1] = __ls; \ - __v[2] = __cs; \ - __v[3] = __js; \ - dixChangeGC(NullClient, __gc, \ - GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle, \ - __v, NULL); \ -} while (0) - #define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground) #define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground) #define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask) @@ -92,7 +77,6 @@ #define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle) #define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile) -#define XMesaSetStipple(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCStipple) #define XMesaDrawPoint(__d,__b,__gc,__x,__y) \ do { \ @@ -111,18 +95,6 @@ (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \ } while (0) -#define XMesaDrawLine(__d,__b,__gc,__x0,__y0,__x1,__y1) \ -do { \ - XMesaPoint __p[2]; \ - (void) __d; \ - ValidateGC(__b, __gc); \ - __p[0].x = __x0; \ - __p[0].y = __y0; \ - __p[1].x = __x1; \ - __p[1].y = __y1; \ - (*__gc->ops->Polylines)(__b, __gc, CoordModeOrigin, 2, __p); \ -} while (0) - #define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \ do { \ xRectangle __r[1]; \ @@ -155,16 +127,11 @@ __sx, __sy, __w, __h, __x, __y); \ } while (0) -#define XMesaFillPolygon(__d,__b,__gc,__p,__n,__s,__m) \ -do { \ - (void) __d; \ - ValidateGC(__b, __gc); \ - (*__gc->ops->FillPolygon)(__b, __gc, __s, __m, __n, __p); \ -} while (0) /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ (*__d->CreatePixmap)(__d, __w, __h, __depth) + #define XMesaFreePixmap(__d,__b) \ (*__d->DestroyPixmap)(__b) @@ -174,12 +141,11 @@ FreeScratchGC(__gc); \ } while (0) -#define GET_COLORMAP_SIZE(__v) __v->visinfo->ColormapEntries -#define GET_REDMASK(__v) __v->visinfo->redMask -#define GET_GREENMASK(__v) __v->visinfo->greenMask -#define GET_BLUEMASK(__v) __v->visinfo->blueMask -#define GET_VISUAL_CLASS(__v) __v->visinfo->class -#define GET_VISUAL_DEPTH(__v) __v->visinfo->nplanes +#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries +#define GET_REDMASK(__v) __v->mesa_visual.redMask +#define GET_GREENMASK(__v) __v->mesa_visual.greenMask +#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask +#define GET_VISUAL_DEPTH(__v) __v->nplanes #define GET_BLACK_PIXEL(__v) __v->display->blackPixel #define CHECK_BYTE_ORDER(__v) GL_TRUE #define CHECK_FOR_HPCR(__v) GL_FALSE Index: xc/extras/Mesa/include/GL/internal/dri_interface.h diff -u /dev/null xc/extras/Mesa/include/GL/internal/dri_interface.h:1.2 --- /dev/null Wed Mar 16 21:00:05 2005 +++ xc/extras/Mesa/include/GL/internal/dri_interface.h Fri Dec 10 13:24:34 2004 @@ -0,0 +1,504 @@ +/* + * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file dri_interface.h + * + * This file contains all the types and functions that define the interface + * between a DRI driver and driver loader. Currently, the most common driver + * loader is the XFree86 libGL.so. However, other loaders do exist, and in + * the future the server-side libglx.a will also be a loader. + * + * \author Kevin E. Martin + * \author Ian Romanick + */ + +#ifndef DRI_INTERFACE_H +#define DRI_INTERFACE_H + +#ifndef DRI_NEW_INTERFACE_ONLY +# include +# include +# include "GL/glxint.h" +#endif + +#include +#include +#include + +/** + * \name DRI interface structures + * + * The following structures define the interface between the GLX client + * side library and the DRI (direct rendering infrastructure). + */ +/*@{*/ +typedef struct __DRIdisplayRec __DRIdisplay; +typedef struct __DRIscreenRec __DRIscreen; +typedef struct __DRIcontextRec __DRIcontext; +typedef struct __DRIdrawableRec __DRIdrawable; +typedef struct __DRIdriverRec __DRIdriver; +typedef struct __DRIframebufferRec __DRIframebuffer; +typedef struct __DRIversionRec __DRIversion; +typedef unsigned long __DRIid; +typedef void __DRInativeDisplay; +/*@}*/ + + +/** + * \name Functions provided by the driver loader. + */ +/*@{*/ +extern __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn); + + +/** + * Type of a pointer to \c __glXGetInternalVersion, as returned by + * \c glXGetProcAddress. + * + * \sa __glXGetInternalVersion, glXGetProcAddress + */ +typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void ); + +/** + * Type of a pointer to \c __glXWindowExists, as returned by + * \c glXGetProcAddress. + * + * \sa __glXWindowExists, glXGetProcAddress + */ +typedef GLboolean (* PFNGLXWINDOWEXISTSPROC) (__DRInativeDisplay *dpy, __DRIid draw); + +/** + * Type of a pointer to \c __glXGetUST, as returned by \c glXGetProcAddress. + * + * \sa __glXGetUST, glXGetProcAddress + */ +typedef int (* PFNGLXGETUSTPROC) ( int64_t * ust ); + +/** + * Type of pointer to \c __glXCreateContextModes, as returned by + * \c glXGetProcAddress. + * + * \sa _gl_context_modes_create, glXGetProcAddress + */ + +typedef __GLcontextModes * (* PFNGLXCREATECONTEXTMODES) ( unsigned count, + size_t minimum_bytes_per_struct ); + +/** + * Type of a pointer to \c glXGetScreenDriver, as returned by + * \c glXGetProcAddress. This function is used to get the name of the DRI + * driver for the specified screen of the specified display. The driver + * name is typically used with \c glXGetDriverConfig. + * + * \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig + */ +typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum); + +/** + * Type of a pointer to \c glXGetDriverConfig, as returned by + * \c glXGetProcAddress. This function is used to get the XML document + * describing the configuration options available for the specified driver. + * + * \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver + */ +typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName); + +/** + * Type of a pointer to \c __glXScrEnableExtension, as returned by + * \c glXGetProcAddress. This function is used to enable a GLX extension + * on the specified screen. + * + * \sa __glXScrEnableExtension, glXGetProcAddress + */ +typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name ); + +/** + * Type of a pointer to \c __glXGetDrawableInfo, as returned by + * \c glXGetProcAddress. This function is used to get information about the + * position, size, and clip rects of a drawable. + * + * \sa __glXGetDrawableInfo, glXGetProcAddress + */ +typedef GLboolean (* PFNGLXGETDRAWABLEINFOPROC) ( __DRInativeDisplay *dpy, int scrn, + __DRIid draw, unsigned int * index, unsigned int * stamp, + int * x, int * y, int * width, int * height, + int * numClipRects, drm_clip_rect_t ** pClipRects, + int * backX, int * backY, + int * numBackClipRects, drm_clip_rect_t ** pBackClipRects ); + +/*@}*/ + + +/** + * \name Functions and data provided by the driver. + */ +/*@{*/ + +typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn, + __DRIscreen *psc, const __GLcontextModes * modes, + const __DRIversion * ddx_version, const __DRIversion * dri_version, + const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, + void * pSAREA, int fd, int internal_api_version, + __GLcontextModes ** driver_modes); +typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC; +extern CREATENEWSCREENFUNC __driCreateNewScreen; + +#ifndef DRI_NEW_INTERFACE_ONLY + +extern void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config); + +#endif /* DRI_NEW_INTERFACE_ONLY */ + + +/** + * XML document describing the configuration options supported by the + * driver. + */ +extern const char __driConfigOptions[]; + +/*@}*/ + + +/** + * Stored version of some component (i.e., server-side DRI module, kernel-side + * DRM, etc.). + * + * \todo + * There are several data structures that explicitly store a major version, + * minor version, and patch level. These structures should be modified to + * have a \c __DRIversionRec instead. + */ +struct __DRIversionRec { + int major; /**< Major version number. */ + int minor; /**< Minor version number. */ + int patch; /**< Patch-level. */ +}; + +/** + * Framebuffer information record. Used by libGL to communicate information + * about the framebuffer to the driver's \c __driCreateNewScreen function. + * + * In XFree86, most of this information is derrived from data returned by + * calling \c XF86DRIGetDeviceInfo. + * + * \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen + * __driUtilCreateNewScreen CallCreateNewScreen + * + * \bug This structure could be better named. + */ +struct __DRIframebufferRec { + unsigned char *base; /**< Framebuffer base address in the CPU's + * address space. This value is calculated by + * calling \c drmMap on the framebuffer handle + * returned by \c XF86DRIGetDeviceInfo (or a + * similar function). + */ + int size; /**< Framebuffer size, in bytes. */ + int stride; /**< Number of bytes from one line to the next. */ + int width; /**< Pixel width of the framebuffer. */ + int height; /**< Pixel height of the framebuffer. */ + int dev_priv_size; /**< Size of the driver's dev-priv structure. */ + void *dev_priv; /**< Pointer to the driver's dev-priv structure. */ +}; + + +/** + * Screen dependent methods. This structure is initialized during the + * \c __DRIdisplayRec::createScreen call. + */ +struct __DRIscreenRec { + /** + * Method to destroy the private DRI screen data. + */ + void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate); + + /** + * Method to create the private DRI context data and initialize the + * context dependent methods. + * + * \sa __DRIscreenRec::createNewContext driCreateContext + * driCreateNewContext + * + * \deprecated + * This function has been replaced by \c __DRIscreenRec::createNewContext. + * New drivers will continue to export this method, but it will eventually + * (in the next XFree86 major relearse) go away. + */ +#ifndef DRI_NEW_INTERFACE_ONLY + void *(*createContext)(Display *dpy, XVisualInfo *vis, void *sharedPrivate, + __DRIcontext *pctx); +#else + void * createContext; +#endif /* DRI_NEW_INTERFACE_ONLY */ + + /** + * Method to create the private DRI drawable data and initialize the + * drawable dependent methods. + */ + void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, + __DRIid draw, __DRIdrawable *pdraw, + int renderType, const int *attrs); + + /** + * Method to return a pointer to the DRI drawable data. + */ + __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw, + void *drawablePrivate); + + /** + * Opaque pointer to private per screen direct rendering data. \c NULL + * if direct rendering is not supported on this screen. Never + * dereferenced in libGL. + */ + void *private; + + /** + * Get the number of vertical refreshes since some point in time before + * this function was first called (i.e., system start up). + * + * \since Internal API version 20030317. + */ + int (*getMSC)( void *screenPrivate, int64_t *msc ); + + /** + * Opaque pointer that points back to the containing + * \c __GLXscreenConfigs. This data structure is shared with DRI drivers + * but \c __GLXscreenConfigs is not. However, they are needed by some GLX + * functions called by DRI drivers. + * + * \since Internal API version 20030813. + */ + void *screenConfigs; + + /** + * Functions associated with MESA_allocate_memory. + * + * \since Internal API version 20030815. + */ + /*@{*/ + void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size, + GLfloat readfreq, GLfloat writefreq, + GLfloat priority); + + void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer); + + GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer); + /*@}*/ + + /** + * Method to create the private DRI context data and initialize the + * context dependent methods. + * + * \since Internal API version 20031201. + */ + void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, + int render_type, + void *sharedPrivate, __DRIcontext *pctx); +}; + +/** + * Context dependent methods. This structure is initialized during the + * \c __DRIscreenRec::createContext call. + */ +struct __DRIcontextRec { + /** + * Method to destroy the private DRI context data. + */ + void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate); + + /** + * Method to bind a DRI drawable to a DRI graphics context. + * + * \deprecated Replaced by bindContext3. + */ +#ifndef DRI_NEW_INTERFACE_ONLY + Bool (*bindContext)(Display *dpy, int scrn, GLXDrawable draw, + GLXContext gc); +#else + void *bindContext; +#endif /* DRI_NEW_INTERFACE_ONLY */ + + /** + * Method to unbind a DRI drawable to a DRI graphics context. + * + * \deprecated Replaced by unbindContext3. + */ +#ifndef DRI_NEW_INTERFACE_ONLY + Bool (*unbindContext)(Display *dpy, int scrn, GLXDrawable draw, + GLXContext gc, int will_rebind); +#else + void *unbindContext; +#endif /* DRI_NEW_INTERFACE_ONLY */ + + /** + * Opaque pointer to private per context direct rendering data. + * \c NULL if direct rendering is not supported on the display or + * screen used to create this context. Never dereferenced in libGL. + */ + void *private; + + /** + * Method to bind a DRI drawable to a DRI graphics context. + * + * \since Internal API version 20030606. + * \deprecated Replaced by bindContext3. + */ +#ifndef DRI_NEW_INTERFACE_ONLY + Bool (*bindContext2)(Display *dpy, int scrn, GLXDrawable draw, + GLXDrawable read, GLXContext gc); +#else + void *bindContext2; +#endif /* DRI_NEW_INTERFACE_ONLY */ + + /** + * Method to unbind a DRI drawable from a DRI graphics context. + * + * \since Internal API version 20030606. + * \deprecated Replaced by unbindContext3. + */ +#ifndef DRI_NEW_INTERFACE_ONLY + Bool (*unbindContext2)(Display *dpy, int scrn, GLXDrawable draw, + GLXDrawable read, GLXContext gc); +#else + void *unbindContext2; +#endif /* DRI_NEW_INTERFACE_ONLY */ + + /** + * Pointer to the mode used to create this context. + * + * \since Internal API version 20040317. + */ + const __GLcontextModes * mode; + + /** + * Method to bind a DRI drawable to a DRI graphics context. + * + * \since Internal API version 20040415. + */ + GLboolean (*bindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, + __DRIid read, __DRIcontext *ctx); + + /** + * Method to unbind a DRI drawable from a DRI graphics context. + * + * \since Internal API version 20040415. + */ + GLboolean (*unbindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, + __DRIid read, __DRIcontext *ctx); +}; + +/** + * Drawable dependent methods. This structure is initialized during the + * \c __DRIscreenRec::createDrawable call. \c createDrawable is not called + * by libGL at this time. It's currently used via the dri_util.c utility code + * instead. + */ +struct __DRIdrawableRec { + /** + * Method to destroy the private DRI drawable data. + */ + void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate); + + /** + * Method to swap the front and back buffers. + */ + void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate); + + /** + * Opaque pointer to private per drawable direct rendering data. + * \c NULL if direct rendering is not supported on the display or + * screen used to create this drawable. Never dereferenced in libGL. + */ + void *private; + + /** + * Get the number of completed swap buffers for this drawable. + * + * \since Internal API version 20030317. + */ + int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ); + + /** + * Wait for the SBC to be greater than or equal target_sbc. + * + * \since Internal API version 20030317. + */ + int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv, + int64_t target_sbc, + int64_t * msc, int64_t * sbc ); + + /** + * Wait for the MSC to equal target_msc, or, if that has already passed, + * the next time (MSC % divisor) is equal to remainder. If divisor is + * zero, the function will return as soon as MSC is greater than or equal + * to target_msc. + * + * \since Internal API version 20030317. + */ + int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv, + int64_t target_msc, int64_t divisor, int64_t remainder, + int64_t * msc, int64_t * sbc ); + + /** + * Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once + * rendering is complete, waits until MSC is equal to target_msc, or + * if that has already passed, waits until (MSC % divisor) is equal + * to remainder. If divisor is zero, the swap will happen as soon as + * MSC is greater than or equal to target_msc. + * + * \since Internal API version 20030317. + */ + int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate, + int64_t target_msc, + int64_t divisor, int64_t remainder); + + /** + * Enable or disable frame usage tracking. + * + * \since Internal API version 20030317. + */ + int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable); + + /** + * Retrieve frame usage information. + * + * \since Internal API version 20030317. + */ + int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, + int64_t * sbc, int64_t * missedFrames, + float * lastMissedUsage, float * usage ); + + /** + * Used by drivers that implement the GLX_SGI_swap_control or + * GLX_MESA_swap_control extension. + * + * \since Internal API version 20030317. + */ + unsigned swap_interval; +}; + +#endif Index: xc/extras/Mesa/include/GL/internal/glcore.h diff -u /dev/null xc/extras/Mesa/include/GL/internal/glcore.h:1.4 --- /dev/null Wed Mar 16 21:00:05 2005 +++ xc/extras/Mesa/include/GL/internal/glcore.h Fri Dec 10 10:30:08 2004 @@ -0,0 +1,498 @@ +/* $XFree86: xc/extras/Mesa/include/GL/internal/glcore.h,v 1.4 2004/12/10 15:30:08 alanh Exp $ */ +#ifndef __gl_core_h_ +#define __gl_core_h_ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +*/ + +#ifndef XFree86LOADER +#include +#endif + +#ifdef CAPI +#undef CAPI +#endif +#define CAPI + +#define GL_CORE_SGI 1 +#define GL_CORE_MESA 2 +#define GL_CORE_APPLE 4 + +typedef struct __GLcontextRec __GLcontext; +typedef struct __GLinterfaceRec __GLinterface; + +/* +** This file defines the interface between the GL core and the surrounding +** "operating system" that supports it (currently the GLX or WGL extensions). +** +** Members (data and function pointers) are documented as imported or +** exported according to how they are used by the core rendering functions. +** Imported members are initialized by the "operating system" and used by +** the core functions. Exported members are initialized by the core functions +** and used by the "operating system". +*/ + +/* +** Mode and limit information for a context. This information is +** kept around in the context so that values can be used during +** command execution, and for returning information about the +** context to the application. +*/ +typedef struct __GLcontextModesRec { + struct __GLcontextModesRec * next; + + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; /* total bits for rgb */ + GLint indexBits; /* total bits for colorindex */ + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + GLint pixmapMode; + + /* GLX */ + GLint visualID; + GLint visualType; /**< One of the GLX X visual types. (i.e., + * \c GLX_TRUE_COLOR, etc.) + */ + + /* EXT_visual_rating / GLX 1.2 */ + GLint visualRating; + + /* EXT_visual_info / GLX 1.2 */ + GLint transparentPixel; + /* colors are floats scaled to ints */ + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + /* ARB_multisample / SGIS_multisample */ + GLint sampleBuffers; + GLint samples; + + /* SGIX_fbconfig / GLX 1.3 */ + GLint drawableType; + GLint renderType; + GLint xRenderable; + GLint fbconfigID; + + /* SGIX_pbuffer / GLX 1.3 */ + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ + GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ + + /* SGIX_visual_select_group */ + GLint visualSelectGroup; + + /* OML_swap_method */ + GLint swapMethod; + + GLint screen; +} __GLcontextModes; + +/* Several fields of __GLcontextModes can take these as values. Since + * GLX header files may not be available everywhere they need to be used, + * redefine them here. + */ +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 + +#define GLX_DONT_CARE 0xFFFFFFFF + +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 + +/************************************************************************/ + +/* +** Structure used for allocating and freeing drawable private memory. +** (like software buffers, for example). +** +** The memory allocation routines are provided by the surrounding +** "operating system" code, and they are to be used for allocating +** software buffers and things which are associated with the drawable, +** and used by any context which draws to that drawable. There are +** separate memory allocation functions for drawables and contexts +** since drawables and contexts can be created and destroyed independently +** of one another, and the "operating system" may want to use separate +** allocation arenas for each. +** +** The freePrivate function is filled in by the core routines when they +** allocates software buffers, and stick them in "private". The freePrivate +** function will destroy anything allocated to this drawable (to be called +** when the drawable is destroyed). +*/ +typedef struct __GLdrawableRegionRec __GLdrawableRegion; +typedef struct __GLdrawableBufferRec __GLdrawableBuffer; +typedef struct __GLdrawablePrivateRec __GLdrawablePrivate; + +typedef struct __GLregionRectRec { + /* lower left (inside the rectangle) */ + GLint x0, y0; + /* upper right (outside the rectangle) */ + GLint x1, y1; +} __GLregionRect; + +struct __GLdrawableRegionRec { + GLint numRects; + __GLregionRect *rects; + __GLregionRect boundingRect; +}; + +/************************************************************************/ + +/* masks for the buffers */ +#define __GL_FRONT_BUFFER_MASK 0x00000001 +#define __GL_FRONT_LEFT_BUFFER_MASK 0x00000001 +#define __GL_FRONT_RIGHT_BUFFER_MASK 0x00000002 +#define __GL_BACK_BUFFER_MASK 0x00000004 +#define __GL_BACK_LEFT_BUFFER_MASK 0x00000004 +#define __GL_BACK_RIGHT_BUFFER_MASK 0x00000008 +#define __GL_ACCUM_BUFFER_MASK 0x00000010 +#define __GL_DEPTH_BUFFER_MASK 0x00000020 +#define __GL_STENCIL_BUFFER_MASK 0x00000040 +#define __GL_AUX_BUFFER_MASK(i) (0x0000080 << (i)) + +#define __GL_ALL_BUFFER_MASK 0xffffffff + +/* what Resize routines return if resize resorted to fallback case */ +#define __GL_BUFFER_FALLBACK 0x10 + +typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, + __GLdrawablePrivate *glPriv, GLint bits); +typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, + __GLdrawablePrivate *glPriv, GLint bits, + __GLbufFallbackInitFn back); + +/* +** A drawable buffer +** +** This data structure describes the context side of a drawable. +** +** According to the spec there could be multiple contexts bound to the same +** drawable at the same time (from different threads). In order to avoid +** multiple-access conflicts, locks are used to serialize access. When a +** thread needs to access (read or write) a member of the drawable, it takes +** a lock first. Some of the entries in the drawable are treated "mostly +** constant", so we take the freedom of allowing access to them without +** taking a lock (for optimization reasons). +** +** For more details regarding locking, see buffers.h in the GL core +*/ +struct __GLdrawableBufferRec { + /* + ** Buffer dimensions + */ + GLint width, height, depth; + + /* + ** Framebuffer base address + */ + void *base; + + /* + ** Framebuffer size (in bytes) + */ + GLuint size; + + /* + ** Size (in bytes) of each element in the framebuffer + */ + GLuint elementSize; + GLuint elementSizeLog2; + + /* + ** Element skip from one scanline to the next. + ** If the buffer is part of another buffer (for example, fullscreen + ** front buffer), outerWidth is the width of that buffer. + */ + GLint outerWidth; + + /* + ** outerWidth * elementSize + */ + GLint byteWidth; + + /* + ** Allocation/deallocation is done based on this handle. A handle + ** is conceptually different from the framebuffer 'base'. + */ + void *handle; + + /* imported */ + GLboolean (*resize)(__GLdrawableBuffer *buf, + GLint x, GLint y, GLuint width, GLuint height, + __GLdrawablePrivate *glPriv, GLuint bufferMask); + void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); + void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); + void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, + GLuint val, GLint x, GLint y, GLint w, GLint h); + void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); + + /* exported */ + void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); +#ifdef __cplusplus + void *privatePtr; +#else + void *private; +#endif + + /* private */ + void *other; /* implementation private data */ + __GLbufMainInitFn mainInit; + __GLbufFallbackInitFn fallbackInit; +}; + +/* +** The context side of the drawable private +*/ +struct __GLdrawablePrivateRec { + /* + ** Drawable Modes + */ + __GLcontextModes *modes; + + /* + ** Drawable size + */ + GLuint width, height; + + /* + ** Origin in screen coordinates of the drawable + */ + GLint xOrigin, yOrigin; +#ifdef __GL_ALIGNED_BUFFERS + /* + ** Drawable offset from screen origin + */ + GLint xOffset, yOffset; + + /* + ** Alignment restriction + */ + GLint xAlignment, yAlignment; +#endif + /* + ** Should we invert the y axis? + */ + GLint yInverted; + + /* + ** Mask specifying which buffers are renderable by the hw + */ + GLuint accelBufferMask; + + /* + ** the buffers themselves + */ + __GLdrawableBuffer frontBuffer; + __GLdrawableBuffer backBuffer; + __GLdrawableBuffer accumBuffer; + __GLdrawableBuffer depthBuffer; + __GLdrawableBuffer stencilBuffer; +#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0) + __GLdrawableBuffer *auxBuffer; +#endif + + __GLdrawableRegion ownershipRegion; + + /* + ** Lock for the drawable private structure + */ + void *lock; +#ifdef DEBUG + /* lock debugging info */ + int lockRefCount; + int lockLine[10]; + char *lockFile[10]; +#endif + + /* imported */ + void *(*malloc)(size_t size); + void *(*calloc)(size_t numElem, size_t elemSize); + void *(*realloc)(void *oldAddr, size_t newSize); + void (*free)(void *addr); + + GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, + GLint x, GLint y, GLsizei width, GLsizei height); + void (*setClipRect)(__GLdrawablePrivate *glPriv, + GLint x, GLint y, GLsizei width, GLsizei height); + void (*updateClipRegion)(__GLdrawablePrivate *glPriv); + GLboolean (*resize)(__GLdrawablePrivate *glPriv); + void (*getDrawableSize)(__GLdrawablePrivate *glPriv, + GLint *x, GLint *y, GLuint *width, GLuint *height); + + void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc); + void (*unlockDP)(__GLdrawablePrivate *glPriv); + + /* exported */ +#ifdef __cplusplus + void *privatePtr; +#else + void *private; +#endif + void (*freePrivate)(__GLdrawablePrivate *); + + /* client data */ + void *other; +}; + +/* +** Macros to lock/unlock the drawable private +*/ +#if defined(DEBUG) +#define __GL_LOCK_DP(glPriv,gc) \ + (*(glPriv)->lockDP)(glPriv,gc); \ + (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \ + (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \ + (glPriv)->lockRefCount++ +#define __GL_UNLOCK_DP(glPriv) \ + (glPriv)->lockRefCount--; \ + (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \ + (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \ + (*(glPriv)->unlockDP)(glPriv) +#else /* DEBUG */ +#define __GL_LOCK_DP(glPriv,gc) (*(glPriv)->lockDP)(glPriv,gc) +#define __GL_UNLOCK_DP(glPriv) (*(glPriv)->unlockDP)(glPriv) +#endif /* DEBUG */ + + +/* +** Procedures which are imported by the GL from the surrounding +** "operating system". Math functions are not considered part of the +** "operating system". +*/ +typedef struct __GLimportsRec { + /* Memory management */ + void * (*malloc)(__GLcontext *gc, size_t size); + void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize); + void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize); + void (*free)(__GLcontext *gc, void *addr); + + /* Error handling */ + void (*warning)(__GLcontext *gc, char *fmt); + void (*fatal)(__GLcontext *gc, char *fmt); + + /* other system calls */ + char *(CAPI *getenv)(__GLcontext *gc, const char *var); + int (CAPI *atoi)(__GLcontext *gc, const char *str); + int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...); + void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode); + int (CAPI *fclose)(__GLcontext *gc, void *stream); + int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...); + + /* Drawing surface management */ + __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc); + __GLdrawablePrivate *(*getReadablePrivate)(__GLcontext *gc); + + /* Operating system dependent data goes here */ + void *other; +} __GLimports; + +/************************************************************************/ + +/* +** Procedures which are exported by the GL to the surrounding "operating +** system" so that it can manage multiple GL context's. +*/ +typedef struct __GLexportsRec { + /* Context management (return GL_FALSE on failure) */ + GLboolean (*destroyContext)(__GLcontext *gc); + GLboolean (*loseCurrent)(__GLcontext *gc); + /* oldglPriv isn't used anymore, kept for backwards compatibility */ + GLboolean (*makeCurrent)(__GLcontext *gc); + GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare); + GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask); + GLboolean (*forceCurrent)(__GLcontext *gc); + + /* Drawing surface notification callbacks */ + GLboolean (*notifyResize)(__GLcontext *gc); + void (*notifyDestroy)(__GLcontext *gc); + void (*notifySwapBuffers)(__GLcontext *gc); + + /* Dispatch table override control for external agents like libGLS */ + struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc); + void (*beginDispatchOverride)(__GLcontext *gc); + void (*endDispatchOverride)(__GLcontext *gc); +} __GLexports; + +/************************************************************************/ + +/* +** This must be the first member of a __GLcontext structure. This is the +** only part of a context that is exposed to the outside world; everything +** else is opaque. +*/ +struct __GLinterfaceRec { + __GLimports imports; + __GLexports exports; +}; + +extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *); +extern void __glCoreNopDispatch(void); + +#endif /* __gl_core_h_ */ Index: xc/extras/Mesa/src/Makefile diff -u /dev/null xc/extras/Mesa/src/Makefile:1.3 --- /dev/null Wed Mar 16 21:00:26 2005 +++ xc/extras/Mesa/src/Makefile Fri Dec 10 10:30:09 2004 @@ -0,0 +1,34 @@ +# src/Makefile + +TOP = .. + +include $(TOP)/configs/current + +SUBDIRS = $(SRC_DIRS) + + +default: message $(LIB_DIR) subdirs + + +message: + @echo "Making sources for" $(CONFIG_NAME) + + +subdirs: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir ; $(MAKE)) || exit 1 ; \ + fi \ + done + + +$(LIB_DIR): + -mkdir $(LIB_DIR) + + +clean: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir ; $(MAKE) clean) ; \ + fi \ + done Index: xc/extras/Mesa/src/accum.c diff -u xc/extras/Mesa/src/accum.c:1.12 xc/extras/Mesa/src/accum.c:removed --- xc/extras/Mesa/src/accum.c:1.12 Tue Dec 2 09:28:12 2003 +++ xc/extras/Mesa/src/accum.c Wed Mar 16 21:00:27 2005 @@ -1,90 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "accum.h" -#include "context.h" -#include "imports.h" -#include "macros.h" -#include "state.h" -#include "mtypes.h" - - -void -_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) -{ - GLfloat tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - tmp[0] = CLAMP( red, -1.0F, 1.0F ); - tmp[1] = CLAMP( green, -1.0F, 1.0F ); - tmp[2] = CLAMP( blue, -1.0F, 1.0F ); - tmp[3] = CLAMP( alpha, -1.0F, 1.0F ); - - if (TEST_EQ_4V(tmp, ctx->Accum.ClearColor)) - return; - - FLUSH_VERTICES(ctx, _NEW_ACCUM); - COPY_4FV( ctx->Accum.ClearColor, tmp ); -} - - -void -_mesa_Accum( GLenum op, GLfloat value ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint xpos, ypos, width, height; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->Visual.accumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glAccum"); - return; - } - - if (ctx->NewState) - _mesa_update_state( ctx ); - - if (ctx->RenderMode != GL_RENDER) { - /* no-op */ - return; - } - - /* Determine region to operate upon. */ - if (ctx->Scissor.Enabled) { - xpos = ctx->Scissor.X; - ypos = ctx->Scissor.Y; - width = ctx->Scissor.Width; - height = ctx->Scissor.Height; - } - else { - /* whole window */ - xpos = 0; - ypos = 0; - width = ctx->DrawBuffer->Width; - height = ctx->DrawBuffer->Height; - } - - ctx->Driver.Accum( ctx, op, value, xpos, ypos, width, height ); -} Index: xc/extras/Mesa/src/accum.h diff -u xc/extras/Mesa/src/accum.h:1.4 xc/extras/Mesa/src/accum.h:removed --- xc/extras/Mesa/src/accum.h:1.4 Fri Feb 22 14:25:22 2002 +++ xc/extras/Mesa/src/accum.h Wed Mar 16 21:00:27 2005 @@ -1,42 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef ACCUM_H -#define ACCUM_H - - -#include "mtypes.h" - - -extern void -_mesa_Accum( GLenum op, GLfloat value ); - - -extern void -_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); - - -#endif Index: xc/extras/Mesa/src/api_arrayelt.c diff -u xc/extras/Mesa/src/api_arrayelt.c:1.3 xc/extras/Mesa/src/api_arrayelt.c:removed --- xc/extras/Mesa/src/api_arrayelt.c:1.3 Sun Sep 28 15:16:52 2003 +++ xc/extras/Mesa/src/api_arrayelt.c Wed Mar 16 21:00:27 2005 @@ -1,364 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* Author: - * Keith Whitwell - */ - -#include "glheader.h" -#include "api_arrayelt.h" -#include "context.h" -#include "glapi.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" - - -typedef void (*texarray_func)( GLenum, const void * ); - -typedef struct { - GLint unit; - struct gl_client_array *array; - texarray_func func; -} AEtexarray; - -typedef void (*array_func)( const void * ); - -typedef struct { - struct gl_client_array *array; - array_func func; -} AEarray; - -typedef struct { - AEtexarray texarrays[MAX_TEXTURE_UNITS+1]; - AEarray arrays[32]; - GLuint NewState; -} AEcontext; - -#define AE_CONTEXT(ctx) ((AEcontext *)(ctx)->aelt_context) -#define TYPE_IDX(t) ((t) & 0xf) - -static void (*colorfuncs[2][8])( const void * ) = { - { (array_func)glColor3bv, - (array_func)glColor3ubv, - (array_func)glColor3sv, - (array_func)glColor3usv, - (array_func)glColor3iv, - (array_func)glColor3uiv, - (array_func)glColor3fv, - (array_func)glColor3dv }, - - { (array_func)glColor4bv, - (array_func)glColor4ubv, - (array_func)glColor4sv, - (array_func)glColor4usv, - (array_func)glColor4iv, - (array_func)glColor4uiv, - (array_func)glColor4fv, - (array_func)glColor4dv } -}; - -static void (*vertexfuncs[3][8])( const void * ) = { - { 0, - 0, - (array_func)glVertex2sv, - 0, - (array_func)glVertex2iv, - 0, - (array_func)glVertex2fv, - (array_func)glVertex2dv }, - - { 0, - 0, - (array_func)glVertex3sv, - 0, - (array_func)glVertex3iv, - 0, - (array_func)glVertex3fv, - (array_func)glVertex3dv }, - - { 0, - 0, - (array_func)glVertex4sv, - 0, - (array_func)glVertex4iv, - 0, - (array_func)glVertex4fv, - (array_func)glVertex4dv } -}; - - -static void (*multitexfuncs[4][8])( GLenum, const void * ) = { - { 0, - 0, - (texarray_func)glMultiTexCoord1svARB, - 0, - (texarray_func)glMultiTexCoord1ivARB, - 0, - (texarray_func)glMultiTexCoord1fvARB, - (texarray_func)glMultiTexCoord1dvARB }, - - { 0, - 0, - (texarray_func)glMultiTexCoord2svARB, - 0, - (texarray_func)glMultiTexCoord2ivARB, - 0, - (texarray_func)glMultiTexCoord2fvARB, - (texarray_func)glMultiTexCoord2dvARB }, - - { 0, - 0, - (texarray_func)glMultiTexCoord3svARB, - 0, - (texarray_func)glMultiTexCoord3ivARB, - 0, - (texarray_func)glMultiTexCoord3fvARB, - (texarray_func)glMultiTexCoord3dvARB }, - - { 0, - 0, - (texarray_func)glMultiTexCoord4svARB, - 0, - (texarray_func)glMultiTexCoord4ivARB, - 0, - (texarray_func)glMultiTexCoord4fvARB, - (texarray_func)glMultiTexCoord4dvARB } -}; - -static void (*indexfuncs[8])( const void * ) = { - 0, - (array_func)glIndexubv, - (array_func)glIndexsv, - 0, - (array_func)glIndexiv, - 0, - (array_func)glIndexfv, - (array_func)glIndexdv -}; - - -static void (*normalfuncs[8])( const void * ) = { - (array_func)glNormal3bv, - 0, - (array_func)glNormal3sv, - 0, - (array_func)glNormal3iv, - 0, - (array_func)glNormal3fv, - (array_func)glNormal3dv, -}; - - -/* Wrapper functions in case glSecondaryColor*EXT doesn't exist */ -static void SecondaryColor3bvEXT(const GLbyte *c) -{ - _glapi_Dispatch->SecondaryColor3bvEXT(c); -} - -static void SecondaryColor3ubvEXT(const GLubyte *c) -{ - _glapi_Dispatch->SecondaryColor3ubvEXT(c); -} - -static void SecondaryColor3svEXT(const GLshort *c) -{ - _glapi_Dispatch->SecondaryColor3svEXT(c); -} - -static void SecondaryColor3usvEXT(const GLushort *c) -{ - _glapi_Dispatch->SecondaryColor3usvEXT(c); -} - -static void SecondaryColor3ivEXT(const GLint *c) -{ - _glapi_Dispatch->SecondaryColor3ivEXT(c); -} - -static void SecondaryColor3uivEXT(const GLuint *c) -{ - _glapi_Dispatch->SecondaryColor3uivEXT(c); -} - -static void SecondaryColor3fvEXT(const GLfloat *c) -{ - _glapi_Dispatch->SecondaryColor3fvEXT(c); -} - -static void SecondaryColor3dvEXT(const GLdouble *c) -{ - _glapi_Dispatch->SecondaryColor3dvEXT(c); -} - -static void (*secondarycolorfuncs[8])( const void * ) = { - (array_func) SecondaryColor3bvEXT, - (array_func) SecondaryColor3ubvEXT, - (array_func) SecondaryColor3svEXT, - (array_func) SecondaryColor3usvEXT, - (array_func) SecondaryColor3ivEXT, - (array_func) SecondaryColor3uivEXT, - (array_func) SecondaryColor3fvEXT, - (array_func) SecondaryColor3dvEXT, -}; - - -/* Again, wrapper functions in case glSecondaryColor*EXT doesn't exist */ -static void FogCoordfvEXT(const GLfloat *f) -{ - _glapi_Dispatch->FogCoordfvEXT(f); -} - -static void FogCoorddvEXT(const GLdouble *f) -{ - _glapi_Dispatch->FogCoorddvEXT(f); -} - -static void (*fogcoordfuncs[8])( const void * ) = { - 0, - 0, - 0, - 0, - 0, - 0, - (array_func) FogCoordfvEXT, - (array_func) FogCoorddvEXT -}; - - - -GLboolean _ae_create_context( GLcontext *ctx ) -{ - ctx->aelt_context = MALLOC( sizeof(AEcontext) ); - if (!ctx->aelt_context) - return GL_FALSE; - - AE_CONTEXT(ctx)->NewState = ~0; - return GL_TRUE; -} - - -void _ae_destroy_context( GLcontext *ctx ) -{ - if ( AE_CONTEXT( ctx ) ) { - FREE( ctx->aelt_context ); - ctx->aelt_context = 0; - } -} - - -static void _ae_update_state( GLcontext *ctx ) -{ - AEcontext *actx = AE_CONTEXT(ctx); - AEtexarray *ta = actx->texarrays; - AEarray *aa = actx->arrays; - GLuint i; - - for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) - if (ctx->Array.TexCoord[i].Enabled) { - ta->unit = i; - ta->array = &ctx->Array.TexCoord[i]; - ta->func = multitexfuncs[ta->array->Size-1][TYPE_IDX(ta->array->Type)]; - ta++; - } - - ta->func = 0; - - if (ctx->Array.Color.Enabled) { - aa->array = &ctx->Array.Color; - aa->func = colorfuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)]; - aa++; - } - - if (ctx->Array.Normal.Enabled) { - aa->array = &ctx->Array.Normal; - aa->func = normalfuncs[TYPE_IDX(aa->array->Type)]; - aa++; - } - - if (ctx->Array.Index.Enabled) { - aa->array = &ctx->Array.Index; - aa->func = indexfuncs[TYPE_IDX(aa->array->Type)]; - aa++; - } - - if (ctx->Array.EdgeFlag.Enabled) { - aa->array = &ctx->Array.EdgeFlag; - aa->func = (array_func)glEdgeFlagv; - aa++; - } - - if (ctx->Array.FogCoord.Enabled) { - aa->array = &ctx->Array.FogCoord; - aa->func = fogcoordfuncs[TYPE_IDX(aa->array->Type)]; - aa++; - } - - if (ctx->Array.SecondaryColor.Enabled) { - aa->array = &ctx->Array.SecondaryColor; - aa->func = secondarycolorfuncs[TYPE_IDX(aa->array->Type)]; - aa++; - } - - /* Must be last - */ - if (ctx->Array.Vertex.Enabled) { - aa->array = &ctx->Array.Vertex; - aa->func = vertexfuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; - aa++; - } - - aa->func = 0; - actx->NewState = 0; -} - - -void _ae_loopback_array_elt( GLint elt ) -{ - GET_CURRENT_CONTEXT(ctx); - AEcontext *actx = AE_CONTEXT(ctx); - AEtexarray *ta; - AEarray *aa; - - if (actx->NewState) - _ae_update_state( ctx ); - - for (ta = actx->texarrays ; ta->func ; ta++) { - ta->func( ta->unit + GL_TEXTURE0_ARB, (char *)ta->array->Ptr + elt * ta->array->StrideB ); - } - - /* Must be last - */ - for (aa = actx->arrays ; aa->func ; aa++) { - aa->func( (char *)aa->array->Ptr + elt * aa->array->StrideB ); - } -} - - - -void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) -{ - AE_CONTEXT(ctx)->NewState |= new_state; -} Index: xc/extras/Mesa/src/api_arrayelt.h diff -u xc/extras/Mesa/src/api_arrayelt.h:1.2 xc/extras/Mesa/src/api_arrayelt.h:removed --- xc/extras/Mesa/src/api_arrayelt.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/api_arrayelt.h Wed Mar 16 21:00:27 2005 @@ -1,37 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef API_ARRAYELT_H -#define API_ARRAYELT_H - -#include "mtypes.h" - -extern GLboolean _ae_create_context( GLcontext *ctx ); -extern void _ae_destroy_context( GLcontext *ctx ); -extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ); -extern void _ae_loopback_array_elt( GLint elt ); - -#endif Index: xc/extras/Mesa/src/api_eval.c diff -u xc/extras/Mesa/src/api_eval.c:1.3 xc/extras/Mesa/src/api_eval.c:removed --- xc/extras/Mesa/src/api_eval.c:1.3 Sun Sep 28 15:16:52 2003 +++ xc/extras/Mesa/src/api_eval.c Wed Mar 16 21:00:27 2005 @@ -1,325 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#include "glheader.h" -#include "api_eval.h" -#include "context.h" -#include "macros.h" -#include "mmath.h" -#include "math/m_eval.h" - -static void do_EvalCoord1f(GLcontext* ctx, GLfloat u) -{ - - /** Color Index **/ - if (ctx->Eval.Map1Index) - { - GLfloat findex; - struct gl_1d_map *map = &ctx->EvalMap.Map1Index; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, &findex, uu, 1, map->Order); - glIndexi( (GLint) findex ); - } - - /** Color **/ - if (ctx->Eval.Map1Color4) { - GLfloat fcolor[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Color4; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, fcolor, uu, 4, map->Order); - glColor4fv( fcolor ); - } - - /** Normal Vector **/ - if (ctx->Eval.Map1Normal) { - GLfloat normal[3]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Normal; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, normal, uu, 3, map->Order); - glNormal3fv( normal ); - } - - /** Texture Coordinates **/ - if (ctx->Eval.Map1TextureCoord4) { - GLfloat texcoord[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Texture4; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, texcoord, uu, 4, map->Order); - glTexCoord4fv( texcoord ); - } - else if (ctx->Eval.Map1TextureCoord3) { - GLfloat texcoord[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Texture3; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, texcoord, uu, 3, map->Order); - glTexCoord3fv( texcoord ); - } - else if (ctx->Eval.Map1TextureCoord2) { - GLfloat texcoord[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Texture2; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, texcoord, uu, 2, map->Order); - glTexCoord2fv( texcoord ); - } - else if (ctx->Eval.Map1TextureCoord1) { - GLfloat texcoord[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Texture1; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, texcoord, uu, 1, map->Order); - glTexCoord1fv( texcoord ); - } - - /** Vertex **/ - if (ctx->Eval.Map1Vertex4) - { - GLfloat vertex[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Vertex4; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, vertex, uu, 4, map->Order); - glVertex4fv( vertex ); - } - else if (ctx->Eval.Map1Vertex3) - { - GLfloat vertex[4]; - struct gl_1d_map *map = &ctx->EvalMap.Map1Vertex3; - GLfloat uu = (u - map->u1) * map->du; - _math_horner_bezier_curve(map->Points, vertex, uu, 3, map->Order); - glVertex3fv( vertex ); - } -} - -#define CROSS_PROD(n, u, v) \ - (n)[0] = (u)[1]*(v)[2] - (u)[2]*(v)[1]; \ - (n)[1] = (u)[2]*(v)[0] - (u)[0]*(v)[2]; \ - (n)[2] = (u)[0]*(v)[1] - (u)[1]*(v)[0] - - -static void do_EvalCoord2f( GLcontext* ctx, GLfloat u, GLfloat v ) -{ - /** Color Index **/ - if (ctx->Eval.Map2Index) { - GLfloat findex; - struct gl_2d_map *map = &ctx->EvalMap.Map2Index; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, &findex, uu, vv, 1, - map->Uorder, map->Vorder); - glIndexi( (GLuint) (GLint) findex ); - } - - /** Color **/ - if (ctx->Eval.Map2Color4) { - GLfloat fcolor[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Color4; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, fcolor, uu, vv, 4, - map->Uorder, map->Vorder); - glColor4fv( fcolor ); - } - - /** Normal **/ - if (ctx->Eval.Map2Normal && - (!ctx->Eval.AutoNormal || (!ctx->Eval.Map2Vertex3 && - !ctx->Eval.Map2Vertex4))) { - GLfloat normal[3]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Normal; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, normal, uu, vv, 3, - map->Uorder, map->Vorder); - glNormal3fv( normal ); - } - - /** Texture Coordinates **/ - if (ctx->Eval.Map2TextureCoord4) { - GLfloat texcoord[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Texture4; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, texcoord, uu, vv, 4, - map->Uorder, map->Vorder); - glTexCoord4fv( texcoord ); - } - else if (ctx->Eval.Map2TextureCoord3) { - GLfloat texcoord[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Texture3; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, texcoord, uu, vv, 3, - map->Uorder, map->Vorder); - glTexCoord3fv( texcoord ); - } - else if (ctx->Eval.Map2TextureCoord2) { - GLfloat texcoord[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Texture2; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, texcoord, uu, vv, 2, - map->Uorder, map->Vorder); - glTexCoord2fv( texcoord ); - } - else if (ctx->Eval.Map2TextureCoord1) { - GLfloat texcoord[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Texture1; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - _math_horner_bezier_surf(map->Points, texcoord, uu, vv, 1, - map->Uorder, map->Vorder); - glTexCoord1fv( texcoord ); - } - - /** Vertex **/ - if(ctx->Eval.Map2Vertex4) { - GLfloat vertex[4]; - GLfloat normal[3]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Vertex4; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - - if (ctx->Eval.AutoNormal) { - GLfloat du[4], dv[4]; - - _math_de_casteljau_surf(map->Points, vertex, du, dv, uu, vv, 4, - map->Uorder, map->Vorder); - - CROSS_PROD(normal, du, dv); - NORMALIZE_3FV(normal); - glNormal3fv( normal ); - glVertex4fv( vertex ); - } - else { - _math_horner_bezier_surf(map->Points, vertex, uu, vv, 4, - map->Uorder, map->Vorder); - glVertex4fv( vertex ); - } - } - else if (ctx->Eval.Map2Vertex3) { - GLfloat vertex[4]; - struct gl_2d_map *map = &ctx->EvalMap.Map2Vertex3; - GLfloat uu = (u - map->u1) * map->du; - GLfloat vv = (v - map->v1) * map->dv; - if (ctx->Eval.AutoNormal) { - GLfloat du[3], dv[3]; - GLfloat normal[3]; - _math_de_casteljau_surf(map->Points, vertex, du, dv, uu, vv, 3, - map->Uorder, map->Vorder); - CROSS_PROD(normal, du, dv); - NORMALIZE_3FV(normal); - glNormal3fv( normal ); - glVertex3fv( vertex ); - } - else { - _math_horner_bezier_surf(map->Points, vertex, uu, vv, 3, - map->Uorder, map->Vorder); - glVertex3fv( vertex ); - } - } -} - - -void _mesa_EvalPoint1( GLint i ) -{ - GET_CURRENT_CONTEXT( ctx ); - GLfloat du = ((ctx->Eval.MapGrid1u2 - ctx->Eval.MapGrid1u1) / - (GLfloat) ctx->Eval.MapGrid1un); - GLfloat u = i * du + ctx->Eval.MapGrid1u1; - - glEvalCoord1f( u ); -} - - -void _mesa_EvalPoint2( GLint i, GLint j ) -{ - GET_CURRENT_CONTEXT( ctx ); - GLfloat du = ((ctx->Eval.MapGrid2u2 - ctx->Eval.MapGrid2u1) / - (GLfloat) ctx->Eval.MapGrid2un); - GLfloat dv = ((ctx->Eval.MapGrid2v2 - ctx->Eval.MapGrid2v1) / - (GLfloat) ctx->Eval.MapGrid2vn); - GLfloat u = i * du + ctx->Eval.MapGrid2u1; - GLfloat v = j * dv + ctx->Eval.MapGrid2v1; - - glEvalCoord2f( u, v ); -} - -/* Wierd thing about eval is that it doesn't affect 'current' values. - * This technique of saving and resetting current values requires - * that: - * - * 1) Current values are updated immediately in the glColor, - * etc. functions. - * - * 2) Hardware color values are stored seperately from ctx->Current, - * for example in dma buffers, or direct emit to registers. - */ -void _mesa_EvalCoord1f( GLfloat u ) -{ - GET_CURRENT_CONTEXT( ctx ); - GLfloat normal[3], texcoord[4], color[4]; - GLuint index; - - COPY_3FV( normal, ctx->Current.Attrib[VERT_ATTRIB_NORMAL] ); - COPY_4FV( texcoord, ctx->Current.Attrib[VERT_ATTRIB_TEX0] ); - COPY_4FV( color, ctx->Current.Attrib[VERT_ATTRIB_COLOR0] ); - index = ctx->Current.Index; - - do_EvalCoord1f( ctx, u ); - - COPY_3FV( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], normal ); - COPY_4FV( ctx->Current.Attrib[VERT_ATTRIB_TEX0], texcoord ); - COPY_4FV( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], color ); - ctx->Current.Index = index; -} - -void _mesa_EvalCoord2f( GLfloat u, GLfloat v ) -{ - GET_CURRENT_CONTEXT( ctx ); - GLfloat normal[3], texcoord[4], color[4]; - GLuint index; - - COPY_3FV( normal, ctx->Current.Attrib[VERT_ATTRIB_NORMAL] ); - COPY_4FV( texcoord, ctx->Current.Attrib[VERT_ATTRIB_TEX0] ); - COPY_4FV( color, ctx->Current.Attrib[VERT_ATTRIB_COLOR0] ); - index = ctx->Current.Index; - - do_EvalCoord2f( ctx, u, v ); - - COPY_3FV( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], normal ); - COPY_4FV( ctx->Current.Attrib[VERT_ATTRIB_TEX0], texcoord ); - COPY_4FV( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], color ); - ctx->Current.Index = index; -} - -void _mesa_EvalCoord1fv( const GLfloat *u ) -{ - glEvalCoord1f( u[0] ); -} - -void _mesa_EvalCoord2fv( const GLfloat *u ) -{ - glEvalCoord2f( u[0], u[1] ); -} Index: xc/extras/Mesa/src/api_eval.h diff -u xc/extras/Mesa/src/api_eval.h:1.2 xc/extras/Mesa/src/api_eval.h:removed --- xc/extras/Mesa/src/api_eval.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/api_eval.h Wed Mar 16 21:00:27 2005 @@ -1,42 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef API_EVAL_H -#define API_EVAL_H - -#include "mtypes.h" - -extern void _mesa_EvalPoint1( GLint i ); -extern void _mesa_EvalPoint2( GLint i, GLint j ); -extern void _mesa_EvalCoord1f( GLfloat u ); -extern void _mesa_EvalCoord2f( GLfloat u, GLfloat v ); -extern void _mesa_EvalCoord1fv( const GLfloat *u ); -extern void _mesa_EvalCoord2fv( const GLfloat *u ); - -#endif - - - Index: xc/extras/Mesa/src/api_loopback.c diff -u xc/extras/Mesa/src/api_loopback.c:1.3 xc/extras/Mesa/src/api_loopback.c:removed --- xc/extras/Mesa/src/api_loopback.c:1.3 Sun Sep 28 15:16:52 2003 +++ xc/extras/Mesa/src/api_loopback.c Wed Mar 16 21:00:27 2005 @@ -1,1873 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - - -#include "glheader.h" -#include "glapi.h" -#include "glapitable.h" -#include "macros.h" -#include "colormac.h" -#include "api_loopback.h" - -/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc - * calls to a smaller set of driver-provided formats. Currently just - * go back to dispatch to find these (eg. call glNormal3f directly), - * hence 'loopback'. - * - * The driver must supply all of the remaining entry points, which are - * listed in dd.h. The easiest way for a driver to do this is to - * install the supplied software t&l module. - */ -#define COLORUBV(v) glColor4ubv(v) -#define COLORF(r,g,b,a) glColor4f(r,g,b,a) -#define VERTEX2(x,y) glVertex2f(x,y) -#define VERTEX3(x,y,z) glVertex3f(x,y,z) -#define VERTEX4(x,y,z,w) glVertex4f(x,y,z,w) -#define NORMAL(x,y,z) glNormal3f(x,y,z) -#define TEXCOORD1(s) glTexCoord1f(s) -#define TEXCOORD2(s,t) glTexCoord2f(s,t) -#define TEXCOORD3(s,t,u) glTexCoord3f(s,t,u) -#define TEXCOORD4(s,t,u,v) glTexCoord4f(s,t,u,v) -#define INDEX(c) glIndexi(c) -#define MULTI_TEXCOORD1(z,s) glMultiTexCoord1fARB(z,s) -#define MULTI_TEXCOORD2(z,s,t) glMultiTexCoord2fARB(z,s,t) -#define MULTI_TEXCOORD3(z,s,t,u) glMultiTexCoord3fARB(z,s,t,u) -#define MULTI_TEXCOORD4(z,s,t,u,v) glMultiTexCoord4fARB(z,s,t,u,v) -#define EVALCOORD1(x) glEvalCoord1f(x) -#define EVALCOORD2(x,y) glEvalCoord2f(x,y) -#define MATERIALFV(a,b,c) glMaterialfv(a,b,c) -#define RECTF(a,b,c,d) glRectf(a,b,c,d) - -#define ATTRIB(index, x, y, z, w) _glapi_Dispatch->VertexAttrib4fNV(index, x, y, z, w) - - -#define FOGCOORDF(x) _glapi_Dispatch->FogCoordfEXT(x) -#define SECONDARYCOLORUB(a,b,c) _glapi_Dispatch->SecondaryColor3ubEXT(a,b,c) -#define SECONDARYCOLORF(a,b,c) _glapi_Dispatch->SecondaryColor3fEXT(a,b,c) - - -static void -loopback_Color3b( GLbyte red, GLbyte green, GLbyte blue ) -{ - GLubyte col[4]; - col[0] = BYTE_TO_UBYTE(red); - col[1] = BYTE_TO_UBYTE(green); - col[2] = BYTE_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3d( GLdouble red, GLdouble green, GLdouble blue ) -{ - GLubyte col[4]; - GLfloat r = (GLfloat) red; - GLfloat g = (GLfloat) green; - GLfloat b = (GLfloat) blue; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - col[3] = 255; - COLORUBV( col ); -} - -static void -loopback_Color3i( GLint red, GLint green, GLint blue ) -{ - GLubyte col[4]; - col[0] = INT_TO_UBYTE(red); - col[1] = INT_TO_UBYTE(green); - col[2] = INT_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3s( GLshort red, GLshort green, GLshort blue ) -{ - GLubyte col[4]; - col[0] = SHORT_TO_UBYTE(red); - col[1] = SHORT_TO_UBYTE(green); - col[2] = SHORT_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3ui( GLuint red, GLuint green, GLuint blue ) -{ - GLubyte col[4]; - col[0] = UINT_TO_UBYTE(red); - col[1] = UINT_TO_UBYTE(green); - col[2] = UINT_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3us( GLushort red, GLushort green, GLushort blue ) -{ - GLubyte col[4]; - col[0] = USHORT_TO_UBYTE(red); - col[1] = USHORT_TO_UBYTE(green); - col[2] = USHORT_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color4b( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ) -{ - GLubyte col[4]; - col[0] = BYTE_TO_UBYTE(red); - col[1] = BYTE_TO_UBYTE(green); - col[2] = BYTE_TO_UBYTE(blue); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) -{ - GLubyte col[4]; - GLfloat r = (GLfloat) red; - GLfloat g = (GLfloat) green; - GLfloat b = (GLfloat) blue; - GLfloat a = (GLfloat) alpha; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - UNCLAMPED_FLOAT_TO_UBYTE(col[3], a); - COLORUBV( col ); -} - -static void -loopback_Color4i( GLint red, GLint green, GLint blue, GLint alpha ) -{ - GLubyte col[4]; - col[0] = INT_TO_UBYTE(red); - col[1] = INT_TO_UBYTE(green); - col[2] = INT_TO_UBYTE(blue); - col[3] = INT_TO_UBYTE(alpha); - COLORUBV(col); -} - -static void -loopback_Color4s( GLshort red, GLshort green, GLshort blue, - GLshort alpha ) -{ - GLubyte col[4]; - col[0] = SHORT_TO_UBYTE(red); - col[1] = SHORT_TO_UBYTE(green); - col[2] = SHORT_TO_UBYTE(blue); - col[3] = SHORT_TO_UBYTE(alpha); - COLORUBV(col); -} - -static void -loopback_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha ) -{ - GLubyte col[4]; - col[0] = UINT_TO_UBYTE(red); - col[1] = UINT_TO_UBYTE(green); - col[2] = UINT_TO_UBYTE(blue); - col[3] = UINT_TO_UBYTE(alpha); - COLORUBV(col); -} - -static void -loopback_Color4us( GLushort red, GLushort green, GLushort blue, - GLushort alpha ) -{ - GLubyte col[4]; - col[0] = USHORT_TO_UBYTE(red); - col[1] = USHORT_TO_UBYTE(green); - col[2] = USHORT_TO_UBYTE(blue); - col[3] = USHORT_TO_UBYTE(alpha); - COLORUBV(col); -} - -static void -loopback_Color3bv( const GLbyte *v ) -{ - GLubyte col[4]; - col[0] = BYTE_TO_UBYTE(v[0]); - col[1] = BYTE_TO_UBYTE(v[1]); - col[2] = BYTE_TO_UBYTE(v[2]); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3dv( const GLdouble *v ) -{ - GLubyte col[4]; - GLfloat r = (GLfloat) v[0]; - GLfloat g = (GLfloat) v[1]; - GLfloat b = (GLfloat) v[2]; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - col[3] = 255; - COLORUBV( col ); -} - -static void -loopback_Color3iv( const GLint *v ) -{ - GLubyte col[4]; - col[0] = INT_TO_UBYTE(v[0]); - col[1] = INT_TO_UBYTE(v[1]); - col[2] = INT_TO_UBYTE(v[2]); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3sv( const GLshort *v ) -{ - GLubyte col[4]; - col[0] = SHORT_TO_UBYTE(v[0]); - col[1] = SHORT_TO_UBYTE(v[1]); - col[2] = SHORT_TO_UBYTE(v[2]); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3uiv( const GLuint *v ) -{ - GLubyte col[4]; - col[0] = UINT_TO_UBYTE(v[0]); - col[1] = UINT_TO_UBYTE(v[1]); - col[2] = UINT_TO_UBYTE(v[2]); - col[3] = 255; - COLORUBV(col); -} - -static void -loopback_Color3usv( const GLushort *v ) -{ - GLubyte col[4]; - col[0] = USHORT_TO_UBYTE(v[0]); - col[1] = USHORT_TO_UBYTE(v[1]); - col[2] = USHORT_TO_UBYTE(v[2]); - col[3] = 255; - COLORUBV(col); - -} - -static void -loopback_Color4bv( const GLbyte *v ) -{ - GLubyte col[4]; - col[0] = BYTE_TO_UBYTE(v[0]); - col[1] = BYTE_TO_UBYTE(v[1]); - col[2] = BYTE_TO_UBYTE(v[2]); - col[3] = BYTE_TO_UBYTE(v[3]); - COLORUBV(col); -} - -static void -loopback_Color4dv( const GLdouble *v ) -{ - GLubyte col[4]; - GLfloat r = (GLfloat) v[0]; - GLfloat g = (GLfloat) v[1]; - GLfloat b = (GLfloat) v[2]; - GLfloat a = (GLfloat) v[3]; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - UNCLAMPED_FLOAT_TO_UBYTE(col[3], a); - COLORUBV( col ); -} - -static void -loopback_Color4iv( const GLint *v ) -{ - GLubyte col[4]; - col[0] = INT_TO_UBYTE(v[0]); - col[1] = INT_TO_UBYTE(v[1]); - col[2] = INT_TO_UBYTE(v[2]); - col[3] = INT_TO_UBYTE(v[3]); - COLORUBV(col); -} - -static void -loopback_Color4sv( const GLshort *v) -{ - GLubyte col[4]; - col[0] = SHORT_TO_UBYTE(v[0]); - col[1] = SHORT_TO_UBYTE(v[1]); - col[2] = SHORT_TO_UBYTE(v[2]); - col[3] = SHORT_TO_UBYTE(v[3]); - COLORUBV(col); -} - -static void -loopback_Color4uiv( const GLuint *v) -{ - GLubyte col[4]; - col[0] = UINT_TO_UBYTE(v[0]); - col[1] = UINT_TO_UBYTE(v[1]); - col[2] = UINT_TO_UBYTE(v[2]); - col[3] = UINT_TO_UBYTE(v[3]); - COLORUBV(col); -} - -static void -loopback_Color4usv( const GLushort *v) -{ - GLubyte col[4]; - col[0] = USHORT_TO_UBYTE(v[0]); - col[1] = USHORT_TO_UBYTE(v[1]); - col[2] = USHORT_TO_UBYTE(v[2]); - col[3] = USHORT_TO_UBYTE(v[3]); - COLORUBV(col); -} - -static void -loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue ) -{ - COLORF( BYTE_TO_FLOAT(red), - BYTE_TO_FLOAT(green), - BYTE_TO_FLOAT(blue), - 1.0 ); -} - -static void -loopback_Color3d_f( GLdouble red, GLdouble green, GLdouble blue ) -{ - COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 ); -} - -static void -loopback_Color3i_f( GLint red, GLint green, GLint blue ) -{ - COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green), - INT_TO_FLOAT(blue), 1.0); -} - -static void -loopback_Color3s_f( GLshort red, GLshort green, GLshort blue ) -{ - COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green), - SHORT_TO_FLOAT(blue), 1.0); -} - -static void -loopback_Color3ui_f( GLuint red, GLuint green, GLuint blue ) -{ - COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green), - UINT_TO_FLOAT(blue), 1.0 ); -} - -static void -loopback_Color3us_f( GLushort red, GLushort green, GLushort blue ) -{ - COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green), - USHORT_TO_FLOAT(blue), 1.0 ); -} - - -static void -loopback_Color3bv_f( const GLbyte *v ) -{ - COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2]), 1.0 ); -} - -static void -loopback_Color3dv_f( const GLdouble *v ) -{ - COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 ); -} - -static void -loopback_Color3iv_f( const GLint *v ) -{ - COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) ); -} - -static void -loopback_Color3sv_f( const GLshort *v ) -{ - COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2]), 1.0 ); -} - -static void -loopback_Color3uiv_f( const GLuint *v ) -{ - COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2]), 1.0 ); -} - -static void -loopback_Color3usv_f( const GLushort *v ) -{ - COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2]), 1.0 ); -} - - -static void -loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue, - GLbyte alpha ) -{ - COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green), - BYTE_TO_FLOAT(blue), BYTE_TO_FLOAT(alpha) ); -} - -static void -loopback_Color4d_f( GLdouble red, GLdouble green, GLdouble blue, - GLdouble alpha ) -{ - COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha ); -} - -static void -loopback_Color4i_f( GLint red, GLint green, GLint blue, GLint alpha ) -{ - COLORF( INT_TO_FLOAT(red), INT_TO_FLOAT(green), - INT_TO_FLOAT(blue), INT_TO_FLOAT(alpha) ); -} - -static void -loopback_Color4s_f( GLshort red, GLshort green, GLshort blue, - GLshort alpha ) -{ - COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green), - SHORT_TO_FLOAT(blue), SHORT_TO_FLOAT(alpha) ); -} - -static void -loopback_Color4ui_f( GLuint red, GLuint green, GLuint blue, GLuint alpha ) -{ - COLORF( UINT_TO_FLOAT(red), UINT_TO_FLOAT(green), - UINT_TO_FLOAT(blue), UINT_TO_FLOAT(alpha) ); -} - -static void -loopback_Color4us_f( GLushort red, GLushort green, GLushort blue, GLushort alpha ) -{ - COLORF( USHORT_TO_FLOAT(red), USHORT_TO_FLOAT(green), - USHORT_TO_FLOAT(blue), USHORT_TO_FLOAT(alpha) ); -} - - -static void -loopback_Color4iv_f( const GLint *v ) -{ - COLORF( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]) ); -} - - -static void -loopback_Color4bv_f( const GLbyte *v ) -{ - COLORF( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]) ); -} - -static void -loopback_Color4dv_f( const GLdouble *v ) -{ - COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] ); -} - - -static void -loopback_Color4sv_f( const GLshort *v) -{ - COLORF( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]) ); -} - - -static void -loopback_Color4uiv_f( const GLuint *v) -{ - COLORF( UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]) ); -} - -static void -loopback_Color4usv_f( const GLushort *v) -{ - COLORF( USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]) ); -} - -static void -loopback_FogCoorddEXT( GLdouble d ) -{ - FOGCOORDF( (GLfloat) d ); -} - -static void -loopback_FogCoorddvEXT( const GLdouble *v ) -{ - FOGCOORDF( (GLfloat) *v ); -} - - -static void -loopback_Indexd( GLdouble c ) -{ - INDEX( (GLint) c ); -} - -static void -loopback_Indexf( GLfloat c ) -{ - INDEX( (GLuint) (GLint) c ); -} - -static void -loopback_Indexs( GLshort c ) -{ - INDEX( (GLint) c ); -} - -static void -loopback_Indexub( GLubyte c ) -{ - INDEX( (GLint) c ); -} - -static void -loopback_Indexdv( const GLdouble *c ) -{ - INDEX( (GLint) (GLint) *c ); -} - -static void -loopback_Indexfv( const GLfloat *c ) -{ - INDEX( (GLint) (GLint) *c ); -} - -static void -loopback_Indexiv( const GLint *c ) -{ - INDEX( *c ); -} - -static void -loopback_Indexsv( const GLshort *c ) -{ - INDEX( (GLint) *c ); -} - -static void -loopback_Indexubv( const GLubyte *c ) -{ - INDEX( (GLint) *c ); -} - -static void -loopback_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz ) -{ - NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) ); -} - -static void -loopback_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz ) -{ - NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz); -} - -static void -loopback_Normal3i( GLint nx, GLint ny, GLint nz ) -{ - NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) ); -} - -static void -loopback_Normal3s( GLshort nx, GLshort ny, GLshort nz ) -{ - NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) ); -} - -static void -loopback_Normal3bv( const GLbyte *v ) -{ - NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) ); -} - -static void -loopback_Normal3dv( const GLdouble *v ) -{ - NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_Normal3iv( const GLint *v ) -{ - NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) ); -} - -static void -loopback_Normal3sv( const GLshort *v ) -{ - NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) ); -} - -static void -loopback_TexCoord1d( GLdouble s ) -{ - TEXCOORD1((GLfloat) s); -} - -static void -loopback_TexCoord1i( GLint s ) -{ - TEXCOORD1((GLfloat) s); -} - -static void -loopback_TexCoord1s( GLshort s ) -{ - TEXCOORD1((GLfloat) s); -} - -static void -loopback_TexCoord2d( GLdouble s, GLdouble t ) -{ - TEXCOORD2((GLfloat) s,(GLfloat) t); -} - -static void -loopback_TexCoord2s( GLshort s, GLshort t ) -{ - TEXCOORD2((GLfloat) s,(GLfloat) t); -} - -static void -loopback_TexCoord2i( GLint s, GLint t ) -{ - TEXCOORD2((GLfloat) s,(GLfloat) t); -} - -static void -loopback_TexCoord3d( GLdouble s, GLdouble t, GLdouble r ) -{ - TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); -} - -static void -loopback_TexCoord3i( GLint s, GLint t, GLint r ) -{ - TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); -} - -static void -loopback_TexCoord3s( GLshort s, GLshort t, GLshort r ) -{ - TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); -} - -static void -loopback_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ) -{ - TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); -} - -static void -loopback_TexCoord4i( GLint s, GLint t, GLint r, GLint q ) -{ - TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); -} - -static void -loopback_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ) -{ - TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); -} - -static void -loopback_TexCoord1dv( const GLdouble *v ) -{ - TEXCOORD1((GLfloat) v[0]); -} - -static void -loopback_TexCoord1iv( const GLint *v ) -{ - TEXCOORD1((GLfloat) v[0]); -} - -static void -loopback_TexCoord1sv( const GLshort *v ) -{ - TEXCOORD1((GLfloat) v[0]); -} - -static void -loopback_TexCoord2dv( const GLdouble *v ) -{ - TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); -} - -static void -loopback_TexCoord2iv( const GLint *v ) -{ - TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); -} - -static void -loopback_TexCoord2sv( const GLshort *v ) -{ - TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); -} - -static void -loopback_TexCoord3dv( const GLdouble *v ) -{ - TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); -} - -static void -loopback_TexCoord3iv( const GLint *v ) -{ - TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]); -} - -static void -loopback_TexCoord3sv( const GLshort *v ) -{ - TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]); -} - -static void -loopback_TexCoord4dv( const GLdouble *v ) -{ - TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); -} - -static void -loopback_TexCoord4iv( const GLint *v ) -{ - TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); -} - -static void -loopback_TexCoord4sv( const GLshort *v ) -{ - TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); -} - -static void -loopback_Vertex2d( GLdouble x, GLdouble y ) -{ - VERTEX2( (GLfloat) x, (GLfloat) y ); -} - -static void -loopback_Vertex2i( GLint x, GLint y ) -{ - VERTEX2( (GLfloat) x, (GLfloat) y ); -} - -static void -loopback_Vertex2s( GLshort x, GLshort y ) -{ - VERTEX2( (GLfloat) x, (GLfloat) y ); -} - -static void -loopback_Vertex3d( GLdouble x, GLdouble y, GLdouble z ) -{ - VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z ); -} - -static void -loopback_Vertex3i( GLint x, GLint y, GLint z ) -{ - VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z ); -} - -static void -loopback_Vertex3s( GLshort x, GLshort y, GLshort z ) -{ - VERTEX3( (GLfloat) x, (GLfloat) y, (GLfloat) z ); -} - -static void -loopback_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) -{ - VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w ); -} - -static void -loopback_Vertex4i( GLint x, GLint y, GLint z, GLint w ) -{ - VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w ); -} - -static void -loopback_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w ) -{ - VERTEX4( (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w ); -} - -static void -loopback_Vertex2dv( const GLdouble *v ) -{ - VERTEX2( (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_Vertex2iv( const GLint *v ) -{ - VERTEX2( (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_Vertex2sv( const GLshort *v ) -{ - VERTEX2( (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_Vertex3dv( const GLdouble *v ) -{ - VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_Vertex3iv( const GLint *v ) -{ - VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_Vertex3sv( const GLshort *v ) -{ - VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_Vertex4dv( const GLdouble *v ) -{ - VERTEX4( (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_Vertex4iv( const GLint *v ) -{ - VERTEX4( (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_Vertex4sv( const GLshort *v ) -{ - VERTEX4( (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_MultiTexCoord1dARB(GLenum target, GLdouble s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void -loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void -loopback_MultiTexCoord1iARB(GLenum target, GLint s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void -loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void -loopback_MultiTexCoord1sARB(GLenum target, GLshort s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void -loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void -loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void -loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void -loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void -loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void -loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void -loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void -loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void -loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void -loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void -loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void -loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void -loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void -loopback_EvalCoord2dv( const GLdouble *u ) -{ - EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] ); -} - -static void -loopback_EvalCoord2fv( const GLfloat *u ) -{ - EVALCOORD2( u[0], u[1] ); -} - -static void -loopback_EvalCoord2d( GLdouble u, GLdouble v ) -{ - EVALCOORD2( (GLfloat) u, (GLfloat) v ); -} - -static void -loopback_EvalCoord1dv( const GLdouble *u ) -{ - EVALCOORD1( (GLfloat) *u ); -} - -static void -loopback_EvalCoord1fv( const GLfloat *u ) -{ - EVALCOORD1( (GLfloat) *u ); -} - -static void -loopback_EvalCoord1d( GLdouble u ) -{ - EVALCOORD1( (GLfloat) u ); -} - -static void -loopback_Materialf( GLenum face, GLenum pname, GLfloat param ) -{ - GLfloat fparam[4]; - fparam[0] = param; - MATERIALFV( face, pname, fparam ); -} - -static void -loopback_Materiali(GLenum face, GLenum pname, GLint param ) -{ - GLfloat p = (GLfloat) param; - MATERIALFV(face, pname, &p); -} - -static void -loopback_Materialiv(GLenum face, GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - switch (pname) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - case GL_AMBIENT_AND_DIFFUSE: - fparam[0] = INT_TO_FLOAT( params[0] ); - fparam[1] = INT_TO_FLOAT( params[1] ); - fparam[2] = INT_TO_FLOAT( params[2] ); - fparam[3] = INT_TO_FLOAT( params[3] ); - break; - case GL_SHININESS: - fparam[0] = (GLfloat) params[0]; - break; - case GL_COLOR_INDEXES: - fparam[0] = (GLfloat) params[0]; - fparam[1] = (GLfloat) params[1]; - fparam[2] = (GLfloat) params[2]; - break; - default: - ; - } - MATERIALFV(face, pname, fparam); -} - - -static void -loopback_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); -} - -static void -loopback_Rectdv(const GLdouble *v1, const GLdouble *v2) -{ - RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); -} - -static void -loopback_Rectfv(const GLfloat *v1, const GLfloat *v2) -{ - RECTF(v1[0], v1[1], v2[0], v2[1]); -} - -static void -loopback_Recti(GLint x1, GLint y1, GLint x2, GLint y2) -{ - RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); -} - -static void -loopback_Rectiv(const GLint *v1, const GLint *v2) -{ - RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); -} - -static void -loopback_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); -} - -static void -loopback_Rectsv(const GLshort *v1, const GLshort *v2) -{ - RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); -} - -static void -loopback_SecondaryColor3bEXT( GLbyte red, GLbyte green, GLbyte blue ) -{ - SECONDARYCOLORUB( BYTE_TO_UBYTE(red), - BYTE_TO_UBYTE(green), - BYTE_TO_UBYTE(blue) ); -} - -static void -loopback_SecondaryColor3dEXT( GLdouble red, GLdouble green, GLdouble blue ) -{ - GLubyte col[3]; - GLfloat r = (GLfloat) red; - GLfloat g = (GLfloat) green; - GLfloat b = (GLfloat) blue; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - SECONDARYCOLORUB( col[0], col[1], col[2] ); -} - -static void -loopback_SecondaryColor3iEXT( GLint red, GLint green, GLint blue ) -{ - SECONDARYCOLORUB( INT_TO_UBYTE(red), - INT_TO_UBYTE(green), - INT_TO_UBYTE(blue)); -} - -static void -loopback_SecondaryColor3sEXT( GLshort red, GLshort green, GLshort blue ) -{ - SECONDARYCOLORUB(SHORT_TO_UBYTE(red), - SHORT_TO_UBYTE(green), - SHORT_TO_UBYTE(blue)); -} - -static void -loopback_SecondaryColor3uiEXT( GLuint red, GLuint green, GLuint blue ) -{ - SECONDARYCOLORUB(UINT_TO_UBYTE(red), - UINT_TO_UBYTE(green), - UINT_TO_UBYTE(blue)); -} - -static void -loopback_SecondaryColor3usEXT( GLushort red, GLushort green, GLushort blue ) -{ - SECONDARYCOLORUB(USHORT_TO_UBYTE(red), - USHORT_TO_UBYTE(green), - USHORT_TO_UBYTE(blue)); -} - -static void -loopback_SecondaryColor3bvEXT( const GLbyte *v ) -{ - const GLfloat a = BYTE_TO_FLOAT(v[0]); - const GLfloat b = BYTE_TO_FLOAT(v[1]); - const GLfloat c = BYTE_TO_FLOAT(v[2]); - SECONDARYCOLORF(a,b,c); -} - -static void -loopback_SecondaryColor3dvEXT( const GLdouble *v ) -{ - GLubyte col[3]; - GLfloat r = (GLfloat) v[0]; - GLfloat g = (GLfloat) v[1]; - GLfloat b = (GLfloat) v[2]; - UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); - SECONDARYCOLORUB( col[0], col[1], col[2] ); -} - -static void -loopback_SecondaryColor3ivEXT( const GLint *v ) -{ - SECONDARYCOLORUB(INT_TO_UBYTE(v[0]), - INT_TO_UBYTE(v[1]), - INT_TO_UBYTE(v[2])); -} - -static void -loopback_SecondaryColor3svEXT( const GLshort *v ) -{ - SECONDARYCOLORUB(SHORT_TO_UBYTE(v[0]), - SHORT_TO_UBYTE(v[1]), - SHORT_TO_UBYTE(v[2])); -} - -static void -loopback_SecondaryColor3uivEXT( const GLuint *v ) -{ - SECONDARYCOLORUB(UINT_TO_UBYTE(v[0]), - UINT_TO_UBYTE(v[1]), - UINT_TO_UBYTE(v[2])); -} - -static void -loopback_SecondaryColor3usvEXT( const GLushort *v ) -{ - SECONDARYCOLORUB(USHORT_TO_UBYTE(v[0]), - USHORT_TO_UBYTE(v[1]), - USHORT_TO_UBYTE(v[2])); -} - - -static void -loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue ) -{ - SECONDARYCOLORF( BYTE_TO_FLOAT(red), - BYTE_TO_FLOAT(green), - BYTE_TO_FLOAT(blue) ); -} - -static void -loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue ) -{ - SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue ); -} - -static void -loopback_SecondaryColor3iEXT_f( GLint red, GLint green, GLint blue ) -{ - SECONDARYCOLORF( INT_TO_FLOAT(red), - INT_TO_FLOAT(green), - INT_TO_FLOAT(blue)); -} - -static void -loopback_SecondaryColor3sEXT_f( GLshort red, GLshort green, GLshort blue ) -{ - SECONDARYCOLORF(SHORT_TO_FLOAT(red), - SHORT_TO_FLOAT(green), - SHORT_TO_FLOAT(blue)); -} - -static void -loopback_SecondaryColor3uiEXT_f( GLuint red, GLuint green, GLuint blue ) -{ - SECONDARYCOLORF(UINT_TO_FLOAT(red), - UINT_TO_FLOAT(green), - UINT_TO_FLOAT(blue)); -} - -static void -loopback_SecondaryColor3usEXT_f( GLushort red, GLushort green, GLushort blue ) -{ - SECONDARYCOLORF(USHORT_TO_FLOAT(red), - USHORT_TO_FLOAT(green), - USHORT_TO_FLOAT(blue)); -} - -static void -loopback_SecondaryColor3bvEXT_f( const GLbyte *v ) -{ - SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]), - BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2])); -} - -static void -loopback_SecondaryColor3dvEXT_f( const GLdouble *v ) -{ - SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} -static void -loopback_SecondaryColor3ivEXT_f( const GLint *v ) -{ - SECONDARYCOLORF(INT_TO_FLOAT(v[0]), - INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2])); -} - -static void -loopback_SecondaryColor3svEXT_f( const GLshort *v ) -{ - SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]), - SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2])); -} - -static void -loopback_SecondaryColor3uivEXT_f( const GLuint *v ) -{ - SECONDARYCOLORF(UINT_TO_FLOAT(v[0]), - UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2])); -} - -static void -loopback_SecondaryColor3usvEXT_f( const GLushort *v ) -{ - SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]), - USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2])); -} - - -/* - * GL_NV_vertex_program - */ - -static void -loopback_VertexAttrib1sNV(GLuint index, GLshort x) -{ - ATTRIB(index, (GLfloat) x, 0.0F, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib1fNV(GLuint index, GLfloat x) -{ - ATTRIB(index, x, 0.0F, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib1dNV(GLuint index, GLdouble x) -{ - ATTRIB(index, (GLfloat) x, 0.0F, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y) -{ - ATTRIB(index, (GLfloat) x, y, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) -{ - ATTRIB(index, (GLfloat) x, y, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) -{ - ATTRIB(index, (GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) -{ - ATTRIB(index, (GLfloat) x, y, z, 1.0F); -} - -static void -loopback_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - ATTRIB(index, x, y, z, 1.0F); -} - -static void -loopback_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void -loopback_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void -loopback_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - ATTRIB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void -loopback_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - ATTRIB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), - UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w)); -} - -static void -loopback_VertexAttrib1svNV(GLuint index, const GLshort *v) -{ - ATTRIB(index, (GLfloat) v[0], 0.0F, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib1fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB(index, v[0], 0.0F, 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib1dvNV(GLuint index, const GLdouble *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2svNV(GLuint index, const GLshort *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB(index, v[0], v[1], 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void -loopback_VertexAttrib3svNV(GLuint index, const GLshort *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void -loopback_VertexAttrib3fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB(index, v[0], v[1], v[2], 1.0F); -} - -static void -loopback_VertexAttrib3dvNV(GLuint index, const GLdouble *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void -loopback_VertexAttrib4svNV(GLuint index, const GLshort *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void -loopback_VertexAttrib4fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB(index, v[0], v[1], v[2], v[3]); -} - -static void -loopback_VertexAttrib4dvNV(GLuint index, const GLdouble *v) -{ - ATTRIB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void -loopback_VertexAttrib4ubvNV(GLuint index, const GLubyte *v) -{ - ATTRIB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), - UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3])); -} - - -static void -loopback_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib1svNV(index + i, v + i); -} - -static void -loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib1fvNV(index + i, v + i); -} - -static void -loopback_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib1dvNV(index + i, v + i); -} - -static void -loopback_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib2svNV(index + i, v + 2 * i); -} - -static void -loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib2fvNV(index + i, v + 2 * i); -} - -static void -loopback_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib2dvNV(index + i, v + 2 * i); -} - -static void -loopback_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib3svNV(index + i, v + 3 * i); -} - -static void -loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib3fvNV(index + i, v + 3 * i); -} - -static void -loopback_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib3dvNV(index + i, v + 3 * i); -} - -static void -loopback_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib4svNV(index + i, v + 4 * i); -} - -static void -loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib4fvNV(index + i, v + 4 * i); -} - -static void -loopback_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib4dvNV(index + i, v + 4 * i); -} - -static void -loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v) -{ - GLint i; - for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib4ubvNV(index + i, v + 4 * i); -} - - - -void -_mesa_loopback_prefer_float( struct _glapi_table *dest, - GLboolean prefer_float_colors ) -{ - if (!prefer_float_colors) { - dest->Color3b = loopback_Color3b; - dest->Color3d = loopback_Color3d; - dest->Color3i = loopback_Color3i; - dest->Color3s = loopback_Color3s; - dest->Color3ui = loopback_Color3ui; - dest->Color3us = loopback_Color3us; - dest->Color4b = loopback_Color4b; - dest->Color4d = loopback_Color4d; - dest->Color4i = loopback_Color4i; - dest->Color4s = loopback_Color4s; - dest->Color4ui = loopback_Color4ui; - dest->Color4us = loopback_Color4us; - dest->Color3bv = loopback_Color3bv; - dest->Color3dv = loopback_Color3dv; - dest->Color3iv = loopback_Color3iv; - dest->Color3sv = loopback_Color3sv; - dest->Color3uiv = loopback_Color3uiv; - dest->Color3usv = loopback_Color3usv; - dest->Color4bv = loopback_Color4bv; - dest->Color4dv = loopback_Color4dv; - dest->Color4iv = loopback_Color4iv; - dest->Color4sv = loopback_Color4sv; - dest->Color4uiv = loopback_Color4uiv; - dest->Color4usv = loopback_Color4usv; - dest->SecondaryColor3bEXT = loopback_SecondaryColor3bEXT; - dest->SecondaryColor3dEXT = loopback_SecondaryColor3dEXT; - dest->SecondaryColor3iEXT = loopback_SecondaryColor3iEXT; - dest->SecondaryColor3sEXT = loopback_SecondaryColor3sEXT; - dest->SecondaryColor3uiEXT = loopback_SecondaryColor3uiEXT; - dest->SecondaryColor3usEXT = loopback_SecondaryColor3usEXT; - dest->SecondaryColor3bvEXT = loopback_SecondaryColor3bvEXT; - dest->SecondaryColor3dvEXT = loopback_SecondaryColor3dvEXT; - dest->SecondaryColor3ivEXT = loopback_SecondaryColor3ivEXT; - dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT; - dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT; - dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT; - } - else { - dest->Color3b = loopback_Color3b_f; - dest->Color3d = loopback_Color3d_f; - dest->Color3i = loopback_Color3i_f; - dest->Color3s = loopback_Color3s_f; - dest->Color3ui = loopback_Color3ui_f; - dest->Color3us = loopback_Color3us_f; - dest->Color4b = loopback_Color4b_f; - dest->Color4d = loopback_Color4d_f; - dest->Color4i = loopback_Color4i_f; - dest->Color4s = loopback_Color4s_f; - dest->Color4ui = loopback_Color4ui_f; - dest->Color4us = loopback_Color4us_f; - dest->Color3bv = loopback_Color3bv_f; - dest->Color3dv = loopback_Color3dv_f; - dest->Color3iv = loopback_Color3iv_f; - dest->Color3sv = loopback_Color3sv_f; - dest->Color3uiv = loopback_Color3uiv_f; - dest->Color3usv = loopback_Color3usv_f; - dest->Color4bv = loopback_Color4bv_f; - dest->Color4dv = loopback_Color4dv_f; - dest->Color4iv = loopback_Color4iv_f; - dest->Color4sv = loopback_Color4sv_f; - dest->Color4uiv = loopback_Color4uiv_f; - dest->Color4usv = loopback_Color4usv_f; - dest->SecondaryColor3bEXT = loopback_SecondaryColor3bEXT_f; - dest->SecondaryColor3dEXT = loopback_SecondaryColor3dEXT_f; - dest->SecondaryColor3iEXT = loopback_SecondaryColor3iEXT_f; - dest->SecondaryColor3sEXT = loopback_SecondaryColor3sEXT_f; - dest->SecondaryColor3uiEXT = loopback_SecondaryColor3uiEXT_f; - dest->SecondaryColor3usEXT = loopback_SecondaryColor3usEXT_f; - dest->SecondaryColor3bvEXT = loopback_SecondaryColor3bvEXT_f; - dest->SecondaryColor3dvEXT = loopback_SecondaryColor3dvEXT_f; - dest->SecondaryColor3ivEXT = loopback_SecondaryColor3ivEXT_f; - dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT_f; - dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT_f; - dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT_f; - } -} - -/* Passing prefer_float_colors as true will mean that all colors - * *except* Color{34}ub{v} are passed as floats. Setting it false will - * mean all colors *except* Color{34}f{v} are passed as ubytes. - * - * This code never registers handlers for any of the entry points - * listed in vtxfmt.h. - */ -void -_mesa_loopback_init_api_table( struct _glapi_table *dest, - GLboolean prefer_float_colors ) -{ - _mesa_loopback_prefer_float( dest, prefer_float_colors ); - - dest->Indexd = loopback_Indexd; - dest->Indexf = loopback_Indexf; - dest->Indexs = loopback_Indexs; - dest->Indexub = loopback_Indexub; - dest->Indexdv = loopback_Indexdv; - dest->Indexfv = loopback_Indexfv; - dest->Indexiv = loopback_Indexiv; - dest->Indexsv = loopback_Indexsv; - dest->Indexubv = loopback_Indexubv; - dest->Normal3b = loopback_Normal3b; - dest->Normal3d = loopback_Normal3d; - dest->Normal3i = loopback_Normal3i; - dest->Normal3s = loopback_Normal3s; - dest->Normal3bv = loopback_Normal3bv; - dest->Normal3dv = loopback_Normal3dv; - dest->Normal3iv = loopback_Normal3iv; - dest->Normal3sv = loopback_Normal3sv; - dest->TexCoord1d = loopback_TexCoord1d; - dest->TexCoord1i = loopback_TexCoord1i; - dest->TexCoord1s = loopback_TexCoord1s; - dest->TexCoord2d = loopback_TexCoord2d; - dest->TexCoord2s = loopback_TexCoord2s; - dest->TexCoord2i = loopback_TexCoord2i; - dest->TexCoord3d = loopback_TexCoord3d; - dest->TexCoord3i = loopback_TexCoord3i; - dest->TexCoord3s = loopback_TexCoord3s; - dest->TexCoord4d = loopback_TexCoord4d; - dest->TexCoord4i = loopback_TexCoord4i; - dest->TexCoord4s = loopback_TexCoord4s; - dest->TexCoord1dv = loopback_TexCoord1dv; - dest->TexCoord1iv = loopback_TexCoord1iv; - dest->TexCoord1sv = loopback_TexCoord1sv; - dest->TexCoord2dv = loopback_TexCoord2dv; - dest->TexCoord2iv = loopback_TexCoord2iv; - dest->TexCoord2sv = loopback_TexCoord2sv; - dest->TexCoord3dv = loopback_TexCoord3dv; - dest->TexCoord3iv = loopback_TexCoord3iv; - dest->TexCoord3sv = loopback_TexCoord3sv; - dest->TexCoord4dv = loopback_TexCoord4dv; - dest->TexCoord4iv = loopback_TexCoord4iv; - dest->TexCoord4sv = loopback_TexCoord4sv; - dest->Vertex2d = loopback_Vertex2d; - dest->Vertex2i = loopback_Vertex2i; - dest->Vertex2s = loopback_Vertex2s; - dest->Vertex3d = loopback_Vertex3d; - dest->Vertex3i = loopback_Vertex3i; - dest->Vertex3s = loopback_Vertex3s; - dest->Vertex4d = loopback_Vertex4d; - dest->Vertex4i = loopback_Vertex4i; - dest->Vertex4s = loopback_Vertex4s; - dest->Vertex2dv = loopback_Vertex2dv; - dest->Vertex2iv = loopback_Vertex2iv; - dest->Vertex2sv = loopback_Vertex2sv; - dest->Vertex3dv = loopback_Vertex3dv; - dest->Vertex3iv = loopback_Vertex3iv; - dest->Vertex3sv = loopback_Vertex3sv; - dest->Vertex4dv = loopback_Vertex4dv; - dest->Vertex4iv = loopback_Vertex4iv; - dest->Vertex4sv = loopback_Vertex4sv; - dest->MultiTexCoord1dARB = loopback_MultiTexCoord1dARB; - dest->MultiTexCoord1dvARB = loopback_MultiTexCoord1dvARB; - dest->MultiTexCoord1iARB = loopback_MultiTexCoord1iARB; - dest->MultiTexCoord1ivARB = loopback_MultiTexCoord1ivARB; - dest->MultiTexCoord1sARB = loopback_MultiTexCoord1sARB; - dest->MultiTexCoord1svARB = loopback_MultiTexCoord1svARB; - dest->MultiTexCoord2dARB = loopback_MultiTexCoord2dARB; - dest->MultiTexCoord2dvARB = loopback_MultiTexCoord2dvARB; - dest->MultiTexCoord2iARB = loopback_MultiTexCoord2iARB; - dest->MultiTexCoord2ivARB = loopback_MultiTexCoord2ivARB; - dest->MultiTexCoord2sARB = loopback_MultiTexCoord2sARB; - dest->MultiTexCoord2svARB = loopback_MultiTexCoord2svARB; - dest->MultiTexCoord3dARB = loopback_MultiTexCoord3dARB; - dest->MultiTexCoord3dvARB = loopback_MultiTexCoord3dvARB; - dest->MultiTexCoord3iARB = loopback_MultiTexCoord3iARB; - dest->MultiTexCoord3ivARB = loopback_MultiTexCoord3ivARB; - dest->MultiTexCoord3sARB = loopback_MultiTexCoord3sARB; - dest->MultiTexCoord3svARB = loopback_MultiTexCoord3svARB; - dest->MultiTexCoord4dARB = loopback_MultiTexCoord4dARB; - dest->MultiTexCoord4dvARB = loopback_MultiTexCoord4dvARB; - dest->MultiTexCoord4iARB = loopback_MultiTexCoord4iARB; - dest->MultiTexCoord4ivARB = loopback_MultiTexCoord4ivARB; - dest->MultiTexCoord4sARB = loopback_MultiTexCoord4sARB; - dest->MultiTexCoord4svARB = loopback_MultiTexCoord4svARB; - dest->EvalCoord2dv = loopback_EvalCoord2dv; - dest->EvalCoord2fv = loopback_EvalCoord2fv; - dest->EvalCoord2d = loopback_EvalCoord2d; - dest->EvalCoord1dv = loopback_EvalCoord1dv; - dest->EvalCoord1fv = loopback_EvalCoord1fv; - dest->EvalCoord1d = loopback_EvalCoord1d; - dest->Materialf = loopback_Materialf; - dest->Materiali = loopback_Materiali; - dest->Materialiv = loopback_Materialiv; - dest->Rectd = loopback_Rectd; - dest->Rectdv = loopback_Rectdv; - dest->Rectfv = loopback_Rectfv; - dest->Recti = loopback_Recti; - dest->Rectiv = loopback_Rectiv; - dest->Rects = loopback_Rects; - dest->Rectsv = loopback_Rectsv; - dest->FogCoorddEXT = loopback_FogCoorddEXT; - dest->FogCoorddvEXT = loopback_FogCoorddvEXT; - - dest->VertexAttrib1sNV = loopback_VertexAttrib1sNV; - dest->VertexAttrib1fNV = loopback_VertexAttrib1fNV; - dest->VertexAttrib1dNV = loopback_VertexAttrib1dNV; - dest->VertexAttrib2sNV = loopback_VertexAttrib2sNV; - dest->VertexAttrib2fNV = loopback_VertexAttrib2fNV; - dest->VertexAttrib2dNV = loopback_VertexAttrib2dNV; - dest->VertexAttrib3sNV = loopback_VertexAttrib3sNV; - dest->VertexAttrib3fNV = loopback_VertexAttrib3fNV; - dest->VertexAttrib3dNV = loopback_VertexAttrib3dNV; - dest->VertexAttrib4sNV = loopback_VertexAttrib4sNV; - dest->VertexAttrib4dNV = loopback_VertexAttrib4dNV; - dest->VertexAttrib4ubNV = loopback_VertexAttrib4ubNV; - - dest->VertexAttrib1svNV = loopback_VertexAttrib1svNV; - dest->VertexAttrib1fvNV = loopback_VertexAttrib1fvNV; - dest->VertexAttrib1dvNV = loopback_VertexAttrib1dvNV; - dest->VertexAttrib2svNV = loopback_VertexAttrib2svNV; - dest->VertexAttrib2fvNV = loopback_VertexAttrib2fvNV; - dest->VertexAttrib2dvNV = loopback_VertexAttrib2dvNV; - dest->VertexAttrib3svNV = loopback_VertexAttrib3svNV; - dest->VertexAttrib3fvNV = loopback_VertexAttrib3fvNV; - dest->VertexAttrib3dvNV = loopback_VertexAttrib3dvNV; - dest->VertexAttrib4svNV = loopback_VertexAttrib4svNV; - dest->VertexAttrib4fvNV = loopback_VertexAttrib4fvNV; - dest->VertexAttrib4dvNV = loopback_VertexAttrib4dvNV; - dest->VertexAttrib4ubvNV = loopback_VertexAttrib4ubvNV; - - dest->VertexAttribs1svNV = loopback_VertexAttribs1svNV; - dest->VertexAttribs1fvNV = loopback_VertexAttribs1fvNV; - dest->VertexAttribs1dvNV = loopback_VertexAttribs1dvNV; - dest->VertexAttribs2svNV = loopback_VertexAttribs2svNV; - dest->VertexAttribs2fvNV = loopback_VertexAttribs2fvNV; - dest->VertexAttribs2dvNV = loopback_VertexAttribs2dvNV; - dest->VertexAttribs3svNV = loopback_VertexAttribs3svNV; - dest->VertexAttribs3fvNV = loopback_VertexAttribs3fvNV; - dest->VertexAttribs3dvNV = loopback_VertexAttribs3dvNV; - dest->VertexAttribs4svNV = loopback_VertexAttribs4svNV; - dest->VertexAttribs4fvNV = loopback_VertexAttribs4fvNV; - dest->VertexAttribs4dvNV = loopback_VertexAttribs4dvNV; - dest->VertexAttribs4ubvNV = loopback_VertexAttribs4ubvNV; - -} Index: xc/extras/Mesa/src/api_loopback.h diff -u xc/extras/Mesa/src/api_loopback.h:1.2 xc/extras/Mesa/src/api_loopback.h:removed --- xc/extras/Mesa/src/api_loopback.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/api_loopback.h Wed Mar 16 21:00:27 2005 @@ -1,39 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef API_LOOPBACK_H -#define API_LOOPBACK_H - -#include "glheader.h" - -struct _glapi_table; - -extern void _mesa_loopback_prefer_float( struct _glapi_table *dest, - GLboolean prefer_float_colors ); - -extern void _mesa_loopback_init_api_table( struct _glapi_table *dest, - GLboolean prefer_float_colors ); - -#endif Index: xc/extras/Mesa/src/api_noop.c diff -u xc/extras/Mesa/src/api_noop.c:1.3 xc/extras/Mesa/src/api_noop.c:removed --- xc/extras/Mesa/src/api_noop.c:1.3 Sun Sep 28 15:16:52 2003 +++ xc/extras/Mesa/src/api_noop.c Wed Mar 16 21:00:27 2005 @@ -1,630 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "api_noop.h" -#include "api_validate.h" -#include "context.h" -#include "colormac.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" - - -/* In states where certain vertex components are required for t&l or - * rasterization, we still need to keep track of the current values. - * These functions provide this service by keeping uptodate the - * 'ctx->Current' struct for all data elements not included in the - * currently enabled hardware vertex. - * - */ -void _mesa_noop_EdgeFlag( GLboolean b ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.EdgeFlag = b; -} - -void _mesa_noop_EdgeFlagv( const GLboolean *b ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.EdgeFlag = *b; -} - -void _mesa_noop_FogCoordfEXT( GLfloat a ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.Attrib[VERT_ATTRIB_FOG][0] = a; -} - -void _mesa_noop_FogCoordfvEXT( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.Attrib[VERT_ATTRIB_FOG][0] = *v; -} - -void _mesa_noop_Indexi( GLint i ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.Index = i; -} - -void _mesa_noop_Indexiv( const GLint *v ) -{ - GET_CURRENT_CONTEXT(ctx); - ctx->Current.Index = *v; -} - -void _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - COPY_FLOAT(dest[2], c); -} - -void _mesa_noop_Normal3fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - COPY_FLOAT(dest[2], v[2]); -} - -void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_material mat[2]; - GLuint bitmask = _mesa_material_bitmask( ctx, face, pname, ~0, - "_mesa_noop_Materialfv" ); - if (bitmask == 0) - return; - - if (bitmask & FRONT_AMBIENT_BIT) { - COPY_4FV( mat[0].Ambient, params ); - } - if (bitmask & BACK_AMBIENT_BIT) { - COPY_4FV( mat[1].Ambient, params ); - } - if (bitmask & FRONT_DIFFUSE_BIT) { - COPY_4FV( mat[0].Diffuse, params ); - } - if (bitmask & BACK_DIFFUSE_BIT) { - COPY_4FV( mat[1].Diffuse, params ); - } - if (bitmask & FRONT_SPECULAR_BIT) { - COPY_4FV( mat[0].Specular, params ); - } - if (bitmask & BACK_SPECULAR_BIT) { - COPY_4FV( mat[1].Specular, params ); - } - if (bitmask & FRONT_EMISSION_BIT) { - COPY_4FV( mat[0].Emission, params ); - } - if (bitmask & BACK_EMISSION_BIT) { - COPY_4FV( mat[1].Emission, params ); - } - if (bitmask & FRONT_SHININESS_BIT) { - GLfloat shininess = CLAMP( params[0], 0.0F, 128.0F ); - mat[0].Shininess = shininess; - } - if (bitmask & BACK_SHININESS_BIT) { - GLfloat shininess = CLAMP( params[0], 0.0F, 128.0F ); - mat[1].Shininess = shininess; - } - if (bitmask & FRONT_INDEXES_BIT) { - mat[0].AmbientIndex = params[0]; - mat[0].DiffuseIndex = params[1]; - mat[0].SpecularIndex = params[2]; - } - if (bitmask & BACK_INDEXES_BIT) { - mat[1].AmbientIndex = params[0]; - mat[1].DiffuseIndex = params[1]; - mat[1].SpecularIndex = params[2]; - } - - _mesa_update_material( ctx, mat, bitmask ); -} - -void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = UBYTE_TO_FLOAT(a); - color[1] = UBYTE_TO_FLOAT(b); - color[2] = UBYTE_TO_FLOAT(c); - color[3] = UBYTE_TO_FLOAT(d); -} - -void _mesa_noop_Color4ubv( const GLubyte *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = UBYTE_TO_FLOAT(v[0]); - color[1] = UBYTE_TO_FLOAT(v[1]); - color[2] = UBYTE_TO_FLOAT(v[2]); - color[3] = UBYTE_TO_FLOAT(v[3]); -} - -void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = a; - color[1] = b; - color[2] = c; - color[3] = d; -} - -void _mesa_noop_Color4fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = v[0]; - color[1] = v[1]; - color[2] = v[2]; - color[3] = v[3]; -} - -void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = UBYTE_TO_FLOAT(a); - color[1] = UBYTE_TO_FLOAT(b); - color[2] = UBYTE_TO_FLOAT(c); - color[3] = 1.0; -} - -void _mesa_noop_Color3ubv( const GLubyte *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = UBYTE_TO_FLOAT(v[0]); - color[1] = UBYTE_TO_FLOAT(v[1]); - color[2] = UBYTE_TO_FLOAT(v[2]); - color[3] = 1.0; -} - -void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = a; - color[1] = b; - color[2] = c; - color[3] = 1.0; -} - -void _mesa_noop_Color3fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - color[0] = v[0]; - color[1] = v[1]; - color[2] = v[2]; - color[3] = 1.0; -} - -void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], a); - dest[1] = 0; - dest[2] = 0; - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], v[0]); - dest[1] = 0; - dest[2] = 0; - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - dest[2] = 0; - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - dest[2] = 0; - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - COPY_FLOAT(dest[2], c); - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - COPY_FLOAT(dest[2], v[2]); - dest[3] = 1; - } -} - -void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b, - GLfloat c, GLfloat d ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - COPY_FLOAT(dest[2], c); - dest[3] = d; - } -} - -void _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = target - GL_TEXTURE0_ARB; - - /* unit is unsigned -- cannot be less than zero. - */ - if (unit < MAX_TEXTURE_UNITS) - { - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - COPY_FLOAT(dest[2], v[2]); - COPY_FLOAT(dest[3], v[3]); - } -} - -void _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - color[0] = UBYTE_TO_FLOAT(a); - color[1] = UBYTE_TO_FLOAT(b); - color[2] = UBYTE_TO_FLOAT(c); - color[3] = 1.0; -} - -void _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - color[0] = UBYTE_TO_FLOAT(v[0]); - color[1] = UBYTE_TO_FLOAT(v[1]); - color[2] = UBYTE_TO_FLOAT(v[2]); - color[3] = 1.0; -} - -void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - color[0] = a; - color[1] = b; - color[2] = c; - color[3] = 1.0; -} - -void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - color[0] = v[0]; - color[1] = v[1]; - color[2] = v[2]; - color[3] = 1.0; -} - -void _mesa_noop_TexCoord1f( GLfloat a ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], a); - dest[1] = 0; - dest[2] = 0; - dest[3] = 1; -} - -void _mesa_noop_TexCoord1fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], v[0]); - dest[1] = 0; - dest[2] = 0; - dest[3] = 1; -} - -void _mesa_noop_TexCoord2f( GLfloat a, GLfloat b ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - dest[2] = 0; - dest[3] = 1; -} - -void _mesa_noop_TexCoord2fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - dest[2] = 0; - dest[3] = 1; -} - -void _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - COPY_FLOAT(dest[2], c); - dest[3] = 1; -} - -void _mesa_noop_TexCoord3fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - COPY_FLOAT(dest[2], v[2]); - dest[3] = 1; -} - -void _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], a); - COPY_FLOAT(dest[1], b); - COPY_FLOAT(dest[2], c); - COPY_FLOAT(dest[3], d); -} - -void _mesa_noop_TexCoord4fv( const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0]; - COPY_FLOAT(dest[0], v[0]); - COPY_FLOAT(dest[1], v[1]); - COPY_FLOAT(dest[2], v[2]); - COPY_FLOAT(dest[3], v[3]); -} - -/* Useful outside begin/end? - */ -void _mesa_noop_Vertex2fv( const GLfloat *v ) -{ - (void) v; -} - -void _mesa_noop_Vertex3fv( const GLfloat *v ) -{ - (void) v; -} - -void _mesa_noop_Vertex4fv( const GLfloat *v ) -{ - (void) v; -} - -void _mesa_noop_Vertex2f( GLfloat a, GLfloat b ) -{ - (void) a; (void) b; -} - -void _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c ) -{ - (void) a; (void) b; (void) c; -} - -void _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) -{ - (void) a; (void) b; (void) c; (void) d; -} - - - -void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, - GLfloat y, GLfloat z, GLfloat w ) -{ - GET_CURRENT_CONTEXT(ctx); - if (index < 16) { - ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w); - } -} - -void _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - if (index < 16) { - ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]); - } -} - - - -/* Execute a glRectf() function. This is not suitable for GL_COMPILE - * modes (as the test for outside begin/end is not compiled), - * but may be useful for drivers in circumstances which exclude - * display list interactions. - * - * (None of the functions in this file are suitable for GL_COMPILE - * modes). - */ -void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) -{ - { - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - } - - glBegin( GL_QUADS ); - glVertex2f( x1, y1 ); - glVertex2f( x2, y1 ); - glVertex2f( x2, y2 ); - glVertex2f( x1, y2 ); - glEnd(); -} - - -/* Some very basic support for arrays. Drivers without explicit array - * support can hook these in, but still need to supply an array-elt - * implementation. - */ -void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - if (!_mesa_validate_DrawArrays( ctx, mode, start, count )) - return; - - glBegin(mode); - for (i = start ; i <= count ; i++) - glArrayElement( i ); - glEnd(); -} - - -void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices )) - return; - - glBegin(mode); - - switch (type) { - case GL_UNSIGNED_BYTE: - for (i = 0 ; i < count ; i++) - glArrayElement( ((GLubyte *)indices)[i] ); - break; - case GL_UNSIGNED_SHORT: - for (i = 0 ; i < count ; i++) - glArrayElement( ((GLushort *)indices)[i] ); - break; - case GL_UNSIGNED_INT: - for (i = 0 ; i < count ; i++) - glArrayElement( ((GLuint *)indices)[i] ); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); - break; - } - - glEnd(); -} - -void _mesa_noop_DrawRangeElements(GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices) -{ - GET_CURRENT_CONTEXT(ctx); - - if (_mesa_validate_DrawRangeElements( ctx, mode, - start, end, - count, type, indices )) - glDrawElements( mode, count, type, indices ); -} Index: xc/extras/Mesa/src/api_noop.h diff -u xc/extras/Mesa/src/api_noop.h:1.3 xc/extras/Mesa/src/api_noop.h:removed --- xc/extras/Mesa/src/api_noop.h:1.3 Sun Sep 28 15:16:53 2003 +++ xc/extras/Mesa/src/api_noop.h Wed Mar 16 21:00:27 2005 @@ -1,154 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _API_NOOP_H -#define _API_NOOP_H - - -#include "glheader.h" -#include "mtypes.h" -#include "context.h" - -/* In states where certain vertex components are required for t&l or - * rasterization, we still need to keep track of the current values. - * These functions provide this service by keeping uptodate the - * 'ctx->Current' struct for all data elements not included in the - * currently enabled hardware vertex. - * - */ -extern void _mesa_noop_EdgeFlag( GLboolean b ); - -extern void _mesa_noop_EdgeFlagv( const GLboolean *b ); - -extern void _mesa_noop_FogCoordfEXT( GLfloat a ); - -extern void _mesa_noop_FogCoordfvEXT( const GLfloat *v ); - -extern void _mesa_noop_Indexi( GLint i ); - -extern void _mesa_noop_Indexiv( const GLint *v ); - -extern void _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c ); - -extern void _mesa_noop_Normal3fv( const GLfloat *v ); - -extern void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *param ); - -extern void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d ); - -extern void _mesa_noop_Color4ubv( const GLubyte *v ); - -extern void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); - -extern void _mesa_noop_Color4fv( const GLfloat *v ); - -extern void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c ); - -extern void _mesa_noop_Color3ubv( const GLubyte *v ); - -extern void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c ); - -extern void _mesa_noop_Color3fv( const GLfloat *v ); - -extern void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a ); - -extern void _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v ); - -extern void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, - GLfloat b ); - -extern void _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v ); - -extern void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, - GLfloat b, GLfloat c); - -extern void _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v ); - -extern void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, - GLfloat b, GLfloat c, GLfloat d ); - -extern void _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v ); - -extern void _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c ); - -extern void _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v ); - -extern void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c ); - -extern void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v ); - -extern void _mesa_noop_TexCoord1f( GLfloat a ); - -extern void _mesa_noop_TexCoord1fv( const GLfloat *v ); - -extern void _mesa_noop_TexCoord2f( GLfloat a, GLfloat b ); - -extern void _mesa_noop_TexCoord2fv( const GLfloat *v ); - -extern void _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c ); - -extern void _mesa_noop_TexCoord3fv( const GLfloat *v ); - -extern void _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); - -extern void _mesa_noop_TexCoord4fv( const GLfloat *v ); - -extern void _mesa_noop_Vertex2fv( const GLfloat *v ); - -extern void _mesa_noop_Vertex3fv( const GLfloat *v ); - -extern void _mesa_noop_Vertex4fv( const GLfloat *v ); - -extern void _mesa_noop_Vertex2f( GLfloat a, GLfloat b ); - -extern void _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c ); - -extern void _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); - -extern void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, - GLfloat y, GLfloat z, GLfloat w ); - -extern void _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v ); - - - -/* Not strictly a noop -- translate Rectf down to Begin/End and - * vertices. Closer to the loopback operations, but doesn't meet the - * criteria for inclusion there (cannot be used in the Save table). - */ -extern void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); - - -extern void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count); -extern void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices); -extern void _mesa_noop_DrawRangeElements(GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices); - - - -#endif Index: xc/extras/Mesa/src/api_validate.c diff -u xc/extras/Mesa/src/api_validate.c:1.4 xc/extras/Mesa/src/api_validate.c:removed --- xc/extras/Mesa/src/api_validate.c:1.4 Wed Oct 22 11:27:39 2003 +++ xc/extras/Mesa/src/api_validate.c Wed Mar 16 21:00:27 2005 @@ -1,140 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/api_validate.c,v 1.4 2003/10/22 15:27:39 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "api_validate.h" -#include "context.h" -#include "imports.h" -#include "mtypes.h" -#include "state.h" - - -GLboolean -_mesa_validate_DrawElements(GLcontext *ctx, - GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); - return GL_FALSE; - } - - if (mode > GL_POLYGON) { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); - return GL_FALSE; - } - - if (type != GL_UNSIGNED_INT && - type != GL_UNSIGNED_BYTE && - type != GL_UNSIGNED_SHORT) - { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" ); - return GL_FALSE; - } - - if (ctx->NewState) - _mesa_update_state( ctx ); - - if (ctx->Array.Vertex.Enabled - || (ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)) - return GL_TRUE; - else - return GL_FALSE; - - return GL_TRUE; -} - - -GLboolean -_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawElements(count)" ); - return GL_FALSE; - } - - if (mode > GL_POLYGON) { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); - return GL_FALSE; - } - - if (end < start) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(endNewState) - _mesa_update_state( ctx ); - - if (ctx->Array.Vertex.Enabled - || (ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)) - return GL_TRUE; - else - return GL_FALSE; -} - - - -GLboolean -_mesa_validate_DrawArrays(GLcontext *ctx, - GLenum mode, GLint start, GLsizei count) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (count<0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); - return GL_FALSE; - } - - if (mode > GL_POLYGON) { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" ); - return GL_FALSE; - } - - if (ctx->NewState) - _mesa_update_state( ctx ); - - if (ctx->Array.Vertex.Enabled - || (ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)) - return GL_TRUE; - else - return GL_FALSE; -} Index: xc/extras/Mesa/src/api_validate.h diff -u xc/extras/Mesa/src/api_validate.h:1.2 xc/extras/Mesa/src/api_validate.h:removed --- xc/extras/Mesa/src/api_validate.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/api_validate.h Wed Mar 16 21:00:27 2005 @@ -1,49 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef API_VALIDATE_H -#define API_VALIDATE_H - - -#include "mtypes.h" - -extern GLboolean -_mesa_validate_DrawArrays(GLcontext *ctx, - GLenum mode, GLint start, GLsizei count); - -extern GLboolean -_mesa_validate_DrawElements(GLcontext *ctx, - GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices); - -extern GLboolean -_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices); - - -#endif Index: xc/extras/Mesa/src/attrib.c diff -u xc/extras/Mesa/src/attrib.c:1.16 xc/extras/Mesa/src/attrib.c:removed --- xc/extras/Mesa/src/attrib.c:1.16 Sun Sep 28 15:16:53 2003 +++ xc/extras/Mesa/src/attrib.c Wed Mar 16 21:00:27 2005 @@ -1,1215 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "accum.h" -#include "attrib.h" -#include "blend.h" -#include "buffers.h" -#include "colormac.h" -#include "context.h" -#include "depth.h" -#include "enable.h" -#include "enums.h" -#include "fog.h" -#include "hint.h" -#include "light.h" -#include "lines.h" -#include "matrix.h" -#include "points.h" -#include "polygon.h" -#include "simple_list.h" -#include "stencil.h" -#include "texobj.h" -#include "texstate.h" -#include "mtypes.h" -#include "math/m_xform.h" - - -/* - * Allocate a new attribute state node. These nodes have a - * "kind" value and a pointer to a struct of state data. - */ -static struct gl_attrib_node * -new_attrib_node( GLbitfield kind ) -{ - struct gl_attrib_node *an = MALLOC_STRUCT(gl_attrib_node); - if (an) { - an->kind = kind; - } - return an; -} - - -void -_mesa_PushAttrib(GLbitfield mask) -{ - struct gl_attrib_node *newnode; - struct gl_attrib_node *head; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glPushAttrib %x\n", (int) mask); - - if (ctx->AttribStackDepth >= MAX_ATTRIB_STACK_DEPTH) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" ); - return; - } - - /* Build linked list of attribute nodes which save all attribute */ - /* groups specified by the mask. */ - head = NULL; - - if (mask & GL_ACCUM_BUFFER_BIT) { - struct gl_accum_attrib *attr; - attr = MALLOC_STRUCT( gl_accum_attrib ); - MEMCPY( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) ); - newnode = new_attrib_node( GL_ACCUM_BUFFER_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_COLOR_BUFFER_BIT) { - struct gl_colorbuffer_attrib *attr; - attr = MALLOC_STRUCT( gl_colorbuffer_attrib ); - MEMCPY( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); - newnode = new_attrib_node( GL_COLOR_BUFFER_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_CURRENT_BIT) { - struct gl_current_attrib *attr; - FLUSH_CURRENT( ctx, 0 ); - attr = MALLOC_STRUCT( gl_current_attrib ); - MEMCPY( attr, &ctx->Current, sizeof(struct gl_current_attrib) ); - newnode = new_attrib_node( GL_CURRENT_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_DEPTH_BUFFER_BIT) { - struct gl_depthbuffer_attrib *attr; - attr = MALLOC_STRUCT( gl_depthbuffer_attrib ); - MEMCPY( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) ); - newnode = new_attrib_node( GL_DEPTH_BUFFER_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_ENABLE_BIT) { - struct gl_enable_attrib *attr; - GLuint i; - attr = MALLOC_STRUCT( gl_enable_attrib ); - /* Copy enable flags from all other attributes into the enable struct. */ - attr->AlphaTest = ctx->Color.AlphaEnabled; - attr->AutoNormal = ctx->Eval.AutoNormal; - attr->Blend = ctx->Color.BlendEnabled; - attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled; - attr->ColorMaterial = ctx->Light.ColorMaterialEnabled; - attr->Convolution1D = ctx->Pixel.Convolution1DEnabled; - attr->Convolution2D = ctx->Pixel.Convolution2DEnabled; - attr->Separable2D = ctx->Pixel.Separable2DEnabled; - attr->CullFace = ctx->Polygon.CullFlag; - attr->DepthTest = ctx->Depth.Test; - attr->Dither = ctx->Color.DitherFlag; - attr->Fog = ctx->Fog.Enabled; - for (i=0;iLight[i] = ctx->Light.Light[i].Enabled; - } - attr->Lighting = ctx->Light.Enabled; - attr->LineSmooth = ctx->Line.SmoothFlag; - attr->LineStipple = ctx->Line.StippleFlag; - attr->Histogram = ctx->Pixel.HistogramEnabled; - attr->MinMax = ctx->Pixel.MinMaxEnabled; - attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled; - attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled; - attr->Map1Color4 = ctx->Eval.Map1Color4; - attr->Map1Index = ctx->Eval.Map1Index; - attr->Map1Normal = ctx->Eval.Map1Normal; - attr->Map1TextureCoord1 = ctx->Eval.Map1TextureCoord1; - attr->Map1TextureCoord2 = ctx->Eval.Map1TextureCoord2; - attr->Map1TextureCoord3 = ctx->Eval.Map1TextureCoord3; - attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4; - attr->Map1Vertex3 = ctx->Eval.Map1Vertex3; - attr->Map1Vertex4 = ctx->Eval.Map1Vertex4; - MEMCPY(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); - attr->Map2Color4 = ctx->Eval.Map2Color4; - attr->Map2Index = ctx->Eval.Map2Index; - attr->Map2Normal = ctx->Eval.Map2Normal; - attr->Map2TextureCoord1 = ctx->Eval.Map2TextureCoord1; - attr->Map2TextureCoord2 = ctx->Eval.Map2TextureCoord2; - attr->Map2TextureCoord3 = ctx->Eval.Map2TextureCoord3; - attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4; - attr->Map2Vertex3 = ctx->Eval.Map2Vertex3; - attr->Map2Vertex4 = ctx->Eval.Map2Vertex4; - MEMCPY(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); - attr->Normalize = ctx->Transform.Normalize; - attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; - attr->PixelTexture = ctx->Pixel.PixelTextureEnabled; - attr->PointSmooth = ctx->Point.SmoothFlag; - attr->PointSprite = ctx->Point.PointSprite; - attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint; - attr->PolygonOffsetLine = ctx->Polygon.OffsetLine; - attr->PolygonOffsetFill = ctx->Polygon.OffsetFill; - attr->PolygonSmooth = ctx->Polygon.SmoothFlag; - attr->PolygonStipple = ctx->Polygon.StippleFlag; - attr->RescaleNormals = ctx->Transform.RescaleNormals; - attr->Scissor = ctx->Scissor.Enabled; - attr->Stencil = ctx->Stencil.Enabled; - attr->MultisampleEnabled = ctx->Multisample.Enabled; - attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage; - attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne; - attr->SampleCoverage = ctx->Multisample.SampleCoverage; - attr->SampleCoverageInvert = ctx->Multisample.SampleCoverageInvert; - for (i=0; iTexture[i] = ctx->Texture.Unit[i].Enabled; - attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled; - } - /* GL_NV_vertex_program */ - attr->VertexProgram = ctx->VertexProgram.Enabled; - attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled; - attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled; - newnode = new_attrib_node( GL_ENABLE_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_EVAL_BIT) { - struct gl_eval_attrib *attr; - attr = MALLOC_STRUCT( gl_eval_attrib ); - MEMCPY( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) ); - newnode = new_attrib_node( GL_EVAL_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_FOG_BIT) { - struct gl_fog_attrib *attr; - attr = MALLOC_STRUCT( gl_fog_attrib ); - MEMCPY( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) ); - newnode = new_attrib_node( GL_FOG_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_HINT_BIT) { - struct gl_hint_attrib *attr; - attr = MALLOC_STRUCT( gl_hint_attrib ); - MEMCPY( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) ); - newnode = new_attrib_node( GL_HINT_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_LIGHTING_BIT) { - struct gl_light_attrib *attr; - FLUSH_CURRENT(ctx, 0); /* flush material changes */ - attr = MALLOC_STRUCT( gl_light_attrib ); - MEMCPY( attr, &ctx->Light, sizeof(struct gl_light_attrib) ); - newnode = new_attrib_node( GL_LIGHTING_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_LINE_BIT) { - struct gl_line_attrib *attr; - attr = MALLOC_STRUCT( gl_line_attrib ); - MEMCPY( attr, &ctx->Line, sizeof(struct gl_line_attrib) ); - newnode = new_attrib_node( GL_LINE_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_LIST_BIT) { - struct gl_list_attrib *attr; - attr = MALLOC_STRUCT( gl_list_attrib ); - MEMCPY( attr, &ctx->List, sizeof(struct gl_list_attrib) ); - newnode = new_attrib_node( GL_LIST_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_PIXEL_MODE_BIT) { - struct gl_pixel_attrib *attr; - attr = MALLOC_STRUCT( gl_pixel_attrib ); - MEMCPY( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) ); - newnode = new_attrib_node( GL_PIXEL_MODE_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_POINT_BIT) { - struct gl_point_attrib *attr; - attr = MALLOC_STRUCT( gl_point_attrib ); - MEMCPY( attr, &ctx->Point, sizeof(struct gl_point_attrib) ); - newnode = new_attrib_node( GL_POINT_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_POLYGON_BIT) { - struct gl_polygon_attrib *attr; - attr = MALLOC_STRUCT( gl_polygon_attrib ); - MEMCPY( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) ); - newnode = new_attrib_node( GL_POLYGON_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_POLYGON_STIPPLE_BIT) { - GLuint *stipple; - stipple = (GLuint *) MALLOC( 32*sizeof(GLuint) ); - MEMCPY( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) ); - newnode = new_attrib_node( GL_POLYGON_STIPPLE_BIT ); - newnode->data = stipple; - newnode->next = head; - head = newnode; - } - - if (mask & GL_SCISSOR_BIT) { - struct gl_scissor_attrib *attr; - attr = MALLOC_STRUCT( gl_scissor_attrib ); - MEMCPY( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) ); - newnode = new_attrib_node( GL_SCISSOR_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_STENCIL_BUFFER_BIT) { - struct gl_stencil_attrib *attr; - attr = MALLOC_STRUCT( gl_stencil_attrib ); - MEMCPY( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) ); - newnode = new_attrib_node( GL_STENCIL_BUFFER_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_TEXTURE_BIT) { - struct gl_texture_attrib *attr; - GLuint u; - /* Bump the texture object reference counts so that they don't - * inadvertantly get deleted. - */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - ctx->Texture.Unit[u].Current1D->RefCount++; - ctx->Texture.Unit[u].Current2D->RefCount++; - ctx->Texture.Unit[u].Current3D->RefCount++; - ctx->Texture.Unit[u].CurrentCubeMap->RefCount++; - ctx->Texture.Unit[u].CurrentRect->RefCount++; - } - attr = MALLOC_STRUCT( gl_texture_attrib ); - MEMCPY( attr, &ctx->Texture, sizeof(struct gl_texture_attrib) ); - /* copy state of the currently bound texture objects */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - _mesa_copy_texture_object(&attr->Unit[u].Saved1D, - attr->Unit[u].Current1D); - _mesa_copy_texture_object(&attr->Unit[u].Saved2D, - attr->Unit[u].Current2D); - _mesa_copy_texture_object(&attr->Unit[u].Saved3D, - attr->Unit[u].Current3D); - _mesa_copy_texture_object(&attr->Unit[u].SavedCubeMap, - attr->Unit[u].CurrentCubeMap); - _mesa_copy_texture_object(&attr->Unit[u].SavedRect, - attr->Unit[u].CurrentRect); - } - newnode = new_attrib_node( GL_TEXTURE_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_TRANSFORM_BIT) { - struct gl_transform_attrib *attr; - attr = MALLOC_STRUCT( gl_transform_attrib ); - MEMCPY( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) ); - newnode = new_attrib_node( GL_TRANSFORM_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - if (mask & GL_VIEWPORT_BIT) { - struct gl_viewport_attrib *attr; - attr = MALLOC_STRUCT( gl_viewport_attrib ); - MEMCPY( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) ); - newnode = new_attrib_node( GL_VIEWPORT_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - /* GL_ARB_multisample */ - if (mask & GL_MULTISAMPLE_BIT_ARB) { - struct gl_multisample_attrib *attr; - attr = MALLOC_STRUCT( gl_multisample_attrib ); - MEMCPY( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) ); - newnode = new_attrib_node( GL_MULTISAMPLE_BIT_ARB ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - ctx->AttribStack[ctx->AttribStackDepth] = head; - ctx->AttribStackDepth++; -} - - - -static void -pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) -{ - GLuint i; - -#define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM) \ - if ((VALUE) != (NEWVALUE)) { \ - _mesa_set_enable( ctx, ENUM, (NEWVALUE) ); \ - } - - TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST); - TEST_AND_UPDATE(ctx->Color.BlendEnabled, enable->Blend, GL_BLEND); - - for (i=0;iTransform.ClipPlanesEnabled & mask) != (enable->ClipPlanes & mask)) - _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i), - (GLboolean) ((enable->ClipPlanes & mask) ? GL_TRUE : GL_FALSE)); - } - - TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial, - GL_COLOR_MATERIAL); - TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE); - TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST); - TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER); - TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D, - GL_CONVOLUTION_1D); - TEST_AND_UPDATE(ctx->Pixel.Convolution2DEnabled, enable->Convolution2D, - GL_CONVOLUTION_2D); - TEST_AND_UPDATE(ctx->Pixel.Separable2DEnabled, enable->Separable2D, - GL_SEPARABLE_2D); - TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG); - TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING); - TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH); - TEST_AND_UPDATE(ctx->Line.StippleFlag, enable->LineStipple, - GL_LINE_STIPPLE); - TEST_AND_UPDATE(ctx->Color.IndexLogicOpEnabled, enable->IndexLogicOp, - GL_INDEX_LOGIC_OP); - TEST_AND_UPDATE(ctx->Color.ColorLogicOpEnabled, enable->ColorLogicOp, - GL_COLOR_LOGIC_OP); - - TEST_AND_UPDATE(ctx->Eval.Map1Color4, enable->Map1Color4, GL_MAP1_COLOR_4); - TEST_AND_UPDATE(ctx->Eval.Map1Index, enable->Map1Index, GL_MAP1_INDEX); - TEST_AND_UPDATE(ctx->Eval.Map1Normal, enable->Map1Normal, GL_MAP1_NORMAL); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord1, enable->Map1TextureCoord1, - GL_MAP1_TEXTURE_COORD_1); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord2, enable->Map1TextureCoord2, - GL_MAP1_TEXTURE_COORD_2); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord3, enable->Map1TextureCoord3, - GL_MAP1_TEXTURE_COORD_3); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord4, enable->Map1TextureCoord4, - GL_MAP1_TEXTURE_COORD_4); - TEST_AND_UPDATE(ctx->Eval.Map1Vertex3, enable->Map1Vertex3, - GL_MAP1_VERTEX_3); - TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4, - GL_MAP1_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map1Attrib[i], enable->Map1Attrib[i], - GL_MAP1_VERTEX_ATTRIB0_4_NV + i); - } - - TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4); - TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX); - TEST_AND_UPDATE(ctx->Eval.Map2Normal, enable->Map2Normal, GL_MAP2_NORMAL); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord1, enable->Map2TextureCoord1, - GL_MAP2_TEXTURE_COORD_1); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord2, enable->Map2TextureCoord2, - GL_MAP2_TEXTURE_COORD_2); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord3, enable->Map2TextureCoord3, - GL_MAP2_TEXTURE_COORD_3); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord4, enable->Map2TextureCoord4, - GL_MAP2_TEXTURE_COORD_4); - TEST_AND_UPDATE(ctx->Eval.Map2Vertex3, enable->Map2Vertex3, - GL_MAP2_VERTEX_3); - TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4, - GL_MAP2_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map2Attrib[i], enable->Map2Attrib[i], - GL_MAP2_VERTEX_ATTRIB0_4_NV + i); - } - - TEST_AND_UPDATE(ctx->Eval.AutoNormal, enable->AutoNormal, GL_AUTO_NORMAL); - TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE); - TEST_AND_UPDATE(ctx->Transform.RescaleNormals, enable->RescaleNormals, - GL_RESCALE_NORMAL_EXT); - TEST_AND_UPDATE(ctx->Transform.RasterPositionUnclipped, - enable->RasterPositionUnclipped, - GL_RASTER_POSITION_UNCLIPPED_IBM); - TEST_AND_UPDATE(ctx->Pixel.PixelTextureEnabled, enable->PixelTexture, - GL_POINT_SMOOTH); - TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth, - GL_POINT_SMOOTH); - if (ctx->Extensions.NV_point_sprite) { - TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite, - GL_POINT_SPRITE_NV); - } - TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint, - GL_POLYGON_OFFSET_POINT); - TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine, - GL_POLYGON_OFFSET_LINE); - TEST_AND_UPDATE(ctx->Polygon.OffsetFill, enable->PolygonOffsetFill, - GL_POLYGON_OFFSET_FILL); - TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, enable->PolygonSmooth, - GL_POLYGON_SMOOTH); - TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple, - GL_POLYGON_STIPPLE); - TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST); - TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST); - /* XXX two-sided stencil */ - TEST_AND_UPDATE(ctx->Multisample.Enabled, enable->MultisampleEnabled, - GL_MULTISAMPLE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage, - enable->SampleAlphaToCoverage, - GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToOne, - enable->SampleAlphaToOne, - GL_SAMPLE_ALPHA_TO_ONE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleCoverage, - enable->SampleCoverage, - GL_SAMPLE_COVERAGE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleCoverageInvert, - enable->SampleCoverageInvert, - GL_SAMPLE_COVERAGE_INVERT_ARB); - /* GL_NV_vertex_program */ - TEST_AND_UPDATE(ctx->VertexProgram.Enabled, - enable->VertexProgram, - GL_VERTEX_PROGRAM_NV); - TEST_AND_UPDATE(ctx->VertexProgram.PointSizeEnabled, - enable->VertexProgramPointSize, - GL_VERTEX_PROGRAM_POINT_SIZE_NV); - TEST_AND_UPDATE(ctx->VertexProgram.TwoSideEnabled, - enable->VertexProgramTwoSide, - GL_VERTEX_PROGRAM_TWO_SIDE_NV); - -#undef TEST_AND_UPDATE - - /* texture unit enables */ - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - if (ctx->Texture.Unit[i].Enabled != enable->Texture[i]) { - ctx->Texture.Unit[i].Enabled = enable->Texture[i]; - if (ctx->Driver.Enable) { - if (ctx->Driver.ActiveTexture) { - (*ctx->Driver.ActiveTexture)(ctx, i); - } - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_1D, - (GLboolean) (enable->Texture[i] & TEXTURE_1D_BIT) ); - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_2D, - (GLboolean) (enable->Texture[i] & TEXTURE_2D_BIT) ); - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_3D, - (GLboolean) (enable->Texture[i] & TEXTURE_3D_BIT) ); - if (ctx->Extensions.ARB_texture_cube_map) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_CUBE_MAP_ARB, - (GLboolean) (enable->Texture[i] & TEXTURE_CUBE_BIT) ); - if (ctx->Extensions.NV_texture_rectangle) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_RECTANGLE_NV, - (GLboolean) (enable->Texture[i] & TEXTURE_RECT_BIT) ); - } - } - - if (ctx->Texture.Unit[i].TexGenEnabled != enable->TexGen[i]) { - ctx->Texture.Unit[i].TexGenEnabled = enable->TexGen[i]; - if (ctx->Driver.Enable) { - if (ctx->Driver.ActiveTexture) { - (*ctx->Driver.ActiveTexture)(ctx, i); - } - if (enable->TexGen[i] & S_BIT) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_TRUE); - else - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_FALSE); - if (enable->TexGen[i] & T_BIT) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_TRUE); - else - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_FALSE); - if (enable->TexGen[i] & R_BIT) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_TRUE); - else - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_FALSE); - if (enable->TexGen[i] & Q_BIT) - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_TRUE); - else - (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_FALSE); - } - } - } - - if (ctx->Driver.ActiveTexture) { - (*ctx->Driver.ActiveTexture)(ctx, ctx->Texture.CurrentUnit); - } -} - - -static void -pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) -{ - GLuint u; - - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - const struct gl_texture_unit *unit = &texAttrib->Unit[u]; - GLuint i; - - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u); - _mesa_set_enable(ctx, GL_TEXTURE_1D, - (GLboolean) (unit->Enabled & TEXTURE_1D_BIT ? GL_TRUE : GL_FALSE)); - _mesa_set_enable(ctx, GL_TEXTURE_2D, - (GLboolean) (unit->Enabled & TEXTURE_2D_BIT ? GL_TRUE : GL_FALSE)); - _mesa_set_enable(ctx, GL_TEXTURE_3D, - (GLboolean) (unit->Enabled & TEXTURE_3D_BIT ? GL_TRUE : GL_FALSE)); - if (ctx->Extensions.ARB_texture_cube_map) { - _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB, - (GLboolean) (unit->Enabled & TEXTURE_CUBE_BIT ? GL_TRUE : GL_FALSE)); - } - if (ctx->Extensions.NV_texture_rectangle) { - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV, - (GLboolean) (unit->Enabled & TEXTURE_RECT_BIT ? GL_TRUE : GL_FALSE)); - } - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); - _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); - _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenModeS); - _mesa_TexGeni(GL_T, GL_TEXTURE_GEN_MODE, unit->GenModeT); - _mesa_TexGeni(GL_R, GL_TEXTURE_GEN_MODE, unit->GenModeR); - _mesa_TexGeni(GL_Q, GL_TEXTURE_GEN_MODE, unit->GenModeQ); - _mesa_TexGenfv(GL_S, GL_OBJECT_PLANE, unit->ObjectPlaneS); - _mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->ObjectPlaneT); - _mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->ObjectPlaneR); - _mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->ObjectPlaneQ); - _mesa_TexGenfv(GL_S, GL_EYE_PLANE, unit->EyePlaneS); - _mesa_TexGenfv(GL_T, GL_EYE_PLANE, unit->EyePlaneT); - _mesa_TexGenfv(GL_R, GL_EYE_PLANE, unit->EyePlaneR); - _mesa_TexGenfv(GL_Q, GL_EYE_PLANE, unit->EyePlaneQ); - if (ctx->Extensions.EXT_texture_lod_bias) { - _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, - GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias); - } - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, - unit->CombineModeRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, - unit->CombineModeA); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, - unit->CombineSourceRGB[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, - unit->CombineSourceRGB[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_EXT, - unit->CombineSourceRGB[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_EXT, - unit->CombineSourceA[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_EXT, - unit->CombineSourceA[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA_EXT, - unit->CombineSourceA[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, - unit->CombineOperandRGB[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, - unit->CombineOperandRGB[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_EXT, - unit->CombineOperandRGB[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_EXT, - unit->CombineOperandA[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_EXT, - unit->CombineOperandA[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA_EXT, - unit->CombineOperandA[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, - 1 << unit->CombineScaleShiftRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, - 1 << unit->CombineScaleShiftA); - } - - /* Restore texture object state */ - for (i = 0; i < NUM_TEXTURE_TARGETS; i++) { - GLenum target = 0; - const struct gl_texture_object *obj = NULL; - GLfloat bordColor[4]; - - switch (i) { - case 0: - target = GL_TEXTURE_1D; - obj = &unit->Saved1D; - break; - case 1: - target = GL_TEXTURE_2D; - obj = &unit->Saved2D; - break; - case 2: - target = GL_TEXTURE_3D; - obj = &unit->Saved3D; - break; - case 3: - if (!ctx->Extensions.ARB_texture_cube_map) - continue; - target = GL_TEXTURE_CUBE_MAP_ARB; - obj = &unit->SavedCubeMap; - break; - case 4: - if (!ctx->Extensions.NV_texture_rectangle) - continue; - target = GL_TEXTURE_RECTANGLE_NV; - obj = &unit->SavedRect; - break; - default: - ; /* silence warnings */ - } - - _mesa_BindTexture(target, obj->Name); - - bordColor[0] = CHAN_TO_FLOAT(obj->BorderColor[0]); - bordColor[1] = CHAN_TO_FLOAT(obj->BorderColor[1]); - bordColor[2] = CHAN_TO_FLOAT(obj->BorderColor[2]); - bordColor[3] = CHAN_TO_FLOAT(obj->BorderColor[3]); - - _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); - _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, bordColor); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, obj->WrapR); - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, obj->MinFilter); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter); - _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod); - _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod); - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, - obj->MaxAnisotropy); - } - if (ctx->Extensions.SGIX_shadow) { - _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_SGIX, - obj->CompareFlag); - _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_OPERATOR_SGIX, - obj->CompareOperator); - } - if (ctx->Extensions.SGIX_shadow_ambient) { - _mesa_TexParameterf(target, GL_SHADOW_AMBIENT_SGIX, - obj->ShadowAmbient); - } - - } - } - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB - + texAttrib->CurrentUnit); - - /* "un-bump" the texture object reference counts. We did that so they - * wouldn't inadvertantly get deleted while they were still referenced - * inside the attribute state stack. - */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - ctx->Texture.Unit[u].Current1D->RefCount--; - ctx->Texture.Unit[u].Current2D->RefCount--; - ctx->Texture.Unit[u].Current3D->RefCount--; - ctx->Texture.Unit[u].CurrentCubeMap->RefCount--; - ctx->Texture.Unit[u].CurrentRect->RefCount--; - } -} - - -/* - * This function is kind of long just because we have to call a lot - * of device driver functions to update device driver state. - * - * XXX As it is now, most of the pop-code calls immediate-mode Mesa functions - * in order to restore GL state. This isn't terribly efficient but it - * ensures that dirty flags and any derived state gets updated correctly. - * We could at least check if the value to restore equals the current value - * and then skip the Mesa call. - */ -void -_mesa_PopAttrib(void) -{ - struct gl_attrib_node *attr, *next; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->AttribStackDepth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" ); - return; - } - - ctx->AttribStackDepth--; - attr = ctx->AttribStack[ctx->AttribStackDepth]; - - while (attr) { - - if (MESA_VERBOSE & VERBOSE_API) { - _mesa_debug(ctx, "glPopAttrib %s\n", - _mesa_lookup_enum_by_nr(attr->kind)); - } - - switch (attr->kind) { - case GL_ACCUM_BUFFER_BIT: - { - const struct gl_accum_attrib *accum; - accum = (const struct gl_accum_attrib *) attr->data; - _mesa_ClearAccum(accum->ClearColor[0], - accum->ClearColor[1], - accum->ClearColor[2], - accum->ClearColor[3]); - } - break; - case GL_COLOR_BUFFER_BIT: - { - const struct gl_colorbuffer_attrib *color; - color = (const struct gl_colorbuffer_attrib *) attr->data; - _mesa_ClearIndex((GLfloat) color->ClearIndex); - _mesa_ClearColor(color->ClearColor[0], - color->ClearColor[1], - color->ClearColor[2], - color->ClearColor[3]); - _mesa_IndexMask(color->IndexMask); - _mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0), - (GLboolean) (color->ColorMask[1] != 0), - (GLboolean) (color->ColorMask[2] != 0), - (GLboolean) (color->ColorMask[3] != 0)); - _mesa_DrawBuffer(color->DrawBuffer); - _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled); - _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef); - _mesa_set_enable(ctx, GL_BLEND, color->BlendEnabled); - _mesa_BlendFuncSeparateEXT(color->BlendSrcRGB, - color->BlendDstRGB, - color->BlendSrcA, - color->BlendDstA); - _mesa_BlendEquation(color->BlendEquation); - _mesa_BlendColor(color->BlendColor[0], - color->BlendColor[1], - color->BlendColor[2], - color->BlendColor[3]); - _mesa_LogicOp(color->LogicOp); - _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, - color->ColorLogicOpEnabled); - _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP, - color->IndexLogicOpEnabled); - _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag); - } - break; - case GL_CURRENT_BIT: - FLUSH_CURRENT( ctx, 0 ); - MEMCPY( &ctx->Current, attr->data, - sizeof(struct gl_current_attrib) ); - break; - case GL_DEPTH_BUFFER_BIT: - { - const struct gl_depthbuffer_attrib *depth; - depth = (const struct gl_depthbuffer_attrib *) attr->data; - _mesa_DepthFunc(depth->Func); - _mesa_ClearDepth(depth->Clear); - _mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test); - _mesa_DepthMask(depth->Mask); - if (ctx->Extensions.HP_occlusion_test) - _mesa_set_enable(ctx, GL_OCCLUSION_TEST_HP, - depth->OcclusionTest); - } - break; - case GL_ENABLE_BIT: - { - const struct gl_enable_attrib *enable; - enable = (const struct gl_enable_attrib *) attr->data; - pop_enable_group(ctx, enable); - ctx->NewState |= _NEW_ALL; - } - break; - case GL_EVAL_BIT: - MEMCPY( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) ); - ctx->NewState |= _NEW_EVAL; - break; - case GL_FOG_BIT: - { - const struct gl_fog_attrib *fog; - fog = (const struct gl_fog_attrib *) attr->data; - _mesa_set_enable(ctx, GL_FOG, fog->Enabled); - _mesa_Fogfv(GL_FOG_COLOR, fog->Color); - _mesa_Fogf(GL_FOG_DENSITY, fog->Density); - _mesa_Fogf(GL_FOG_START, fog->Start); - _mesa_Fogf(GL_FOG_END, fog->End); - _mesa_Fogf(GL_FOG_INDEX, fog->Index); - _mesa_Fogi(GL_FOG_MODE, fog->Mode); - } - break; - case GL_HINT_BIT: - { - const struct gl_hint_attrib *hint; - hint = (const struct gl_hint_attrib *) attr->data; - _mesa_Hint(GL_PERSPECTIVE_CORRECTION_HINT, - hint->PerspectiveCorrection ); - _mesa_Hint(GL_POINT_SMOOTH_HINT, hint->PointSmooth); - _mesa_Hint(GL_LINE_SMOOTH_HINT, hint->LineSmooth); - _mesa_Hint(GL_POLYGON_SMOOTH_HINT, hint->PolygonSmooth); - _mesa_Hint(GL_FOG_HINT, hint->Fog); - _mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, - hint->ClipVolumeClipping); - if (ctx->Extensions.ARB_texture_compression) - _mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB, - hint->TextureCompression); - } - break; - case GL_LIGHTING_BIT: - { - GLuint i; - const struct gl_light_attrib *light; - light = (const struct gl_light_attrib *) attr->data; - /* lighting enable */ - _mesa_set_enable(ctx, GL_LIGHTING, light->Enabled); - /* per-light state */ - - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - - for (i = 0; i < MAX_LIGHTS; i++) { - GLenum lgt = (GLenum) (GL_LIGHT0 + i); - const struct gl_light *l = &light->Light[i]; - GLfloat tmp[4]; - _mesa_set_enable(ctx, lgt, l->Enabled); - _mesa_Lightfv( lgt, GL_AMBIENT, l->Ambient ); - _mesa_Lightfv( lgt, GL_DIFFUSE, l->Diffuse ); - _mesa_Lightfv( lgt, GL_SPECULAR, l->Specular ); - TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->inv, l->EyePosition ); - _mesa_Lightfv( lgt, GL_POSITION, tmp ); - TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->m, l->EyeDirection ); - _mesa_Lightfv( lgt, GL_SPOT_DIRECTION, tmp ); - _mesa_Lightfv( lgt, GL_SPOT_EXPONENT, &l->SpotExponent ); - _mesa_Lightfv( lgt, GL_SPOT_CUTOFF, &l->SpotCutoff ); - _mesa_Lightfv( lgt, GL_CONSTANT_ATTENUATION, - &l->ConstantAttenuation ); - _mesa_Lightfv( lgt, GL_LINEAR_ATTENUATION, - &l->LinearAttenuation ); - _mesa_Lightfv( lgt, GL_QUADRATIC_ATTENUATION, - &l->QuadraticAttenuation ); - } - /* light model */ - _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT, - light->Model.Ambient); - _mesa_LightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER, - (GLfloat) light->Model.LocalViewer); - _mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE, - (GLfloat) light->Model.TwoSide); - _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, - (GLfloat) light->Model.ColorControl); - /* materials */ - MEMCPY(ctx->Light.Material, light->Material, - 2 * sizeof(struct gl_material)); - /* shade model */ - _mesa_ShadeModel(light->ShadeModel); - /* color material */ - _mesa_ColorMaterial(light->ColorMaterialFace, - light->ColorMaterialMode); - _mesa_set_enable(ctx, GL_COLOR_MATERIAL, - light->ColorMaterialEnabled); - } - break; - case GL_LINE_BIT: - { - const struct gl_line_attrib *line; - line = (const struct gl_line_attrib *) attr->data; - _mesa_set_enable(ctx, GL_LINE_SMOOTH, line->SmoothFlag); - _mesa_set_enable(ctx, GL_LINE_STIPPLE, line->StippleFlag); - _mesa_LineStipple(line->StippleFactor, line->StipplePattern); - _mesa_LineWidth(line->Width); - } - break; - case GL_LIST_BIT: - MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) ); - break; - case GL_PIXEL_MODE_BIT: - MEMCPY( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) ); - ctx->NewState |= _NEW_PIXEL; - break; - case GL_POINT_BIT: - { - const struct gl_point_attrib *point; - point = (const struct gl_point_attrib *) attr->data; - _mesa_PointSize(point->Size); - _mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag); - if (ctx->Extensions.EXT_point_parameters) { - _mesa_PointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT, - point->Params); - _mesa_PointParameterfEXT(GL_POINT_SIZE_MIN_EXT, - point->MinSize); - _mesa_PointParameterfEXT(GL_POINT_SIZE_MAX_EXT, - point->MaxSize); - _mesa_PointParameterfEXT(GL_POINT_FADE_THRESHOLD_SIZE_EXT, - point->Threshold); - } - if (ctx->Extensions.NV_point_sprite) { - GLuint u; - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - _mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV, - (GLint) point->CoordReplace[u]); - } - _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite); - _mesa_PointParameteriNV(GL_POINT_SPRITE_R_MODE_NV, - ctx->Point.SpriteRMode); - } - } - break; - case GL_POLYGON_BIT: - { - const struct gl_polygon_attrib *polygon; - polygon = (const struct gl_polygon_attrib *) attr->data; - _mesa_CullFace(polygon->CullFaceMode); - _mesa_FrontFace(polygon->FrontFace); - _mesa_PolygonMode(GL_FRONT, polygon->FrontMode); - _mesa_PolygonMode(GL_BACK, polygon->BackMode); - _mesa_PolygonOffset(polygon->OffsetFactor, - polygon->OffsetUnits); - _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, polygon->SmoothFlag); - _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, polygon->StippleFlag); - _mesa_set_enable(ctx, GL_CULL_FACE, polygon->CullFlag); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_POINT, - polygon->OffsetPoint); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_LINE, - polygon->OffsetLine); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, - polygon->OffsetFill); - } - break; - case GL_POLYGON_STIPPLE_BIT: - MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) ); - ctx->NewState |= _NEW_POLYGONSTIPPLE; - if (ctx->Driver.PolygonStipple) - ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data ); - break; - case GL_SCISSOR_BIT: - { - const struct gl_scissor_attrib *scissor; - scissor = (const struct gl_scissor_attrib *) attr->data; - _mesa_Scissor(scissor->X, scissor->Y, - scissor->Width, scissor->Height); - _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled); - } - break; - case GL_STENCIL_BUFFER_BIT: - { - const GLint face = 0; /* XXX stencil two side */ - const struct gl_stencil_attrib *stencil; - stencil = (const struct gl_stencil_attrib *) attr->data; - _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); - _mesa_ClearStencil(stencil->Clear); - _mesa_StencilFunc(stencil->Function[face], stencil->Ref[face], - stencil->ValueMask[face]); - _mesa_StencilMask(stencil->WriteMask[face]); - _mesa_StencilOp(stencil->FailFunc[face], - stencil->ZFailFunc[face], - stencil->ZPassFunc[face]); - } - break; - case GL_TRANSFORM_BIT: - { - GLuint i; - const struct gl_transform_attrib *xform; - xform = (const struct gl_transform_attrib *) attr->data; - _mesa_MatrixMode(xform->MatrixMode); - - if (ctx->ProjectionMatrixStack.Top->flags & MAT_DIRTY) - _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); - - /* restore clip planes */ - for (i = 0; i < MAX_CLIP_PLANES; i++) { - const GLuint mask = 1 << 1; - const GLfloat *eyePlane = xform->EyeUserPlane[i]; - COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane); - if (xform->ClipPlanesEnabled & mask) { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE); - } - else { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE); - } - if (ctx->Driver.ClipPlane) - ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, eyePlane ); - } - - /* normalize/rescale */ - if (xform->Normalize != ctx->Transform.Normalize) - _mesa_set_enable(ctx, GL_NORMALIZE,ctx->Transform.Normalize); - if (xform->RescaleNormals != ctx->Transform.RescaleNormals) - _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT, - ctx->Transform.RescaleNormals); - } - break; - case GL_TEXTURE_BIT: - /* Take care of texture object reference counters */ - { - const struct gl_texture_attrib *texture; - texture = (const struct gl_texture_attrib *) attr->data; - pop_texture_group(ctx, texture); - ctx->NewState |= _NEW_TEXTURE; - } - break; - case GL_VIEWPORT_BIT: - { - const struct gl_viewport_attrib *vp; - vp = (const struct gl_viewport_attrib *) attr->data; - _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height); - _mesa_DepthRange(vp->Near, vp->Far); - } - break; - case GL_MULTISAMPLE_BIT_ARB: - { - const struct gl_multisample_attrib *ms; - ms = (const struct gl_multisample_attrib *) attr->data; - _mesa_SampleCoverageARB(ms->SampleCoverageValue, - ms->SampleCoverageInvert); - } - break; - - default: - _mesa_problem( ctx, "Bad attrib flag in PopAttrib"); - break; - } - - next = attr->next; - FREE( attr->data ); - FREE( attr ); - attr = next; - } -} - - -#define GL_CLIENT_PACK_BIT (1<<20) -#define GL_CLIENT_UNPACK_BIT (1<<21) - - -void -_mesa_PushClientAttrib(GLbitfield mask) -{ - struct gl_attrib_node *newnode; - struct gl_attrib_node *head; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->ClientAttribStackDepth >= MAX_CLIENT_ATTRIB_STACK_DEPTH) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" ); - return; - } - - /* Build linked list of attribute nodes which save all attribute */ - /* groups specified by the mask. */ - head = NULL; - - if (mask & GL_CLIENT_PIXEL_STORE_BIT) { - struct gl_pixelstore_attrib *attr; - /* packing attribs */ - attr = MALLOC_STRUCT( gl_pixelstore_attrib ); - MEMCPY( attr, &ctx->Pack, sizeof(struct gl_pixelstore_attrib) ); - newnode = new_attrib_node( GL_CLIENT_PACK_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - /* unpacking attribs */ - attr = MALLOC_STRUCT( gl_pixelstore_attrib ); - MEMCPY( attr, &ctx->Unpack, sizeof(struct gl_pixelstore_attrib) ); - newnode = new_attrib_node( GL_CLIENT_UNPACK_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) { - struct gl_array_attrib *attr; - attr = MALLOC_STRUCT( gl_array_attrib ); - MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); - newnode = new_attrib_node( GL_CLIENT_VERTEX_ARRAY_BIT ); - newnode->data = attr; - newnode->next = head; - head = newnode; - } - - ctx->ClientAttribStack[ctx->ClientAttribStackDepth] = head; - ctx->ClientAttribStackDepth++; -} - - - - -void -_mesa_PopClientAttrib(void) -{ - struct gl_attrib_node *attr, *next; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->ClientAttribStackDepth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" ); - return; - } - - ctx->ClientAttribStackDepth--; - attr = ctx->ClientAttribStack[ctx->ClientAttribStackDepth]; - - while (attr) { - switch (attr->kind) { - case GL_CLIENT_PACK_BIT: - MEMCPY( &ctx->Pack, attr->data, - sizeof(struct gl_pixelstore_attrib) ); - ctx->NewState |= _NEW_PACKUNPACK; - break; - case GL_CLIENT_UNPACK_BIT: - MEMCPY( &ctx->Unpack, attr->data, - sizeof(struct gl_pixelstore_attrib) ); - ctx->NewState |= _NEW_PACKUNPACK; - break; - case GL_CLIENT_VERTEX_ARRAY_BIT: - MEMCPY( &ctx->Array, attr->data, - sizeof(struct gl_array_attrib) ); - ctx->NewState |= _NEW_ARRAY; - break; - default: - _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib"); - break; - } - - next = attr->next; - FREE( attr->data ); - FREE( attr ); - attr = next; - } -} Index: xc/extras/Mesa/src/attrib.h diff -u xc/extras/Mesa/src/attrib.h:1.5 xc/extras/Mesa/src/attrib.h:removed --- xc/extras/Mesa/src/attrib.h:1.5 Sun Sep 28 15:16:53 2003 +++ xc/extras/Mesa/src/attrib.h Wed Mar 16 21:00:28 2005 @@ -1,45 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef ATTRIB_H -#define ATTRIB_H - - -#include "mtypes.h" - -extern void -_mesa_PushAttrib( GLbitfield mask ); - -extern void -_mesa_PopAttrib( void ); - -extern void -_mesa_PushClientAttrib( GLbitfield mask ); - -extern void -_mesa_PopClientAttrib( void ); - - -#endif Index: xc/extras/Mesa/src/blend.c diff -u xc/extras/Mesa/src/blend.c:1.12 xc/extras/Mesa/src/blend.c:removed --- xc/extras/Mesa/src/blend.c:1.12 Mon Dec 1 18:35:03 2003 +++ xc/extras/Mesa/src/blend.c Wed Mar 16 21:00:28 2005 @@ -1,460 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "blend.h" -#include "colormac.h" -#include "context.h" -#include "enums.h" -#include "macros.h" -#include "mtypes.h" - - -void -_mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) -{ - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glBlendFunc %s %s\n", - _mesa_lookup_enum_by_nr(sfactor), - _mesa_lookup_enum_by_nr(dfactor)); - - switch (sfactor) { - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_SRC_ALPHA_SATURATE: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(sfactor)" ); - return; - } - - switch (dfactor) { - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFunc(dfactor)" ); - return; - } - - if (ctx->Color.BlendDstRGB == dfactor && - ctx->Color.BlendSrcRGB == sfactor && - ctx->Color.BlendDstA == dfactor && - ctx->Color.BlendSrcA == sfactor) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.BlendDstRGB = ctx->Color.BlendDstA = dfactor; - ctx->Color.BlendSrcRGB = ctx->Color.BlendSrcA = sfactor; - - if (ctx->Driver.BlendFunc) - ctx->Driver.BlendFunc( ctx, sfactor, dfactor ); -} - - -/* GL_EXT_blend_func_separate */ -void -_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n", - _mesa_lookup_enum_by_nr(sfactorRGB), - _mesa_lookup_enum_by_nr(dfactorRGB), - _mesa_lookup_enum_by_nr(sfactorA), - _mesa_lookup_enum_by_nr(dfactorA)); - - switch (sfactorRGB) { - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_SRC_ALPHA_SATURATE: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorRGB)"); - return; - } - - switch (dfactorRGB) { - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorRGB)"); - return; - } - - switch (sfactorA) { - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_SRC_ALPHA_SATURATE: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(sfactorA)"); - return; - } - - switch (dfactorA) { - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - if (!ctx->Extensions.NV_blend_square) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)"); - return; - } - /* fall-through */ - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendFuncSeparate(dfactorA)" ); - return; - } - - if (ctx->Color.BlendSrcRGB == sfactorRGB && - ctx->Color.BlendDstRGB == dfactorRGB && - ctx->Color.BlendSrcA == sfactorA && - ctx->Color.BlendDstA == dfactorA) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - - ctx->Color.BlendSrcRGB = sfactorRGB; - ctx->Color.BlendDstRGB = dfactorRGB; - ctx->Color.BlendSrcA = sfactorA; - ctx->Color.BlendDstA = dfactorA; - - if (ctx->Driver.BlendFuncSeparate) { - (*ctx->Driver.BlendFuncSeparate)( ctx, sfactorRGB, dfactorRGB, - sfactorA, dfactorA ); - } -} - - - -/* This is really an extension function! */ -void -_mesa_BlendEquation( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glBlendEquation %s\n", - _mesa_lookup_enum_by_nr(mode)); - - switch (mode) { - case GL_FUNC_ADD_EXT: - break; - case GL_MIN_EXT: - case GL_MAX_EXT: - if (!ctx->Extensions.EXT_blend_minmax && - !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); - return; - } - break; - case GL_LOGIC_OP: - if (!ctx->Extensions.EXT_blend_logic_op) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); - return; - } - break; - case GL_FUNC_SUBTRACT_EXT: - case GL_FUNC_REVERSE_SUBTRACT_EXT: - if (!ctx->Extensions.EXT_blend_subtract && - !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glBlendEquation" ); - return; - } - - if (ctx->Color.BlendEquation == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.BlendEquation = mode; - - /* This is needed to support 1.1's RGB logic ops AND - * 1.0's blending logicops. - */ - ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled || - (ctx->Color.BlendEnabled && - mode == GL_LOGIC_OP)); - - if (ctx->Driver.BlendEquation) - (*ctx->Driver.BlendEquation)( ctx, mode ); -} - - - -void -_mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) -{ - GLfloat tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - tmp[0] = CLAMP( red, 0.0F, 1.0F ); - tmp[1] = CLAMP( green, 0.0F, 1.0F ); - tmp[2] = CLAMP( blue, 0.0F, 1.0F ); - tmp[3] = CLAMP( alpha, 0.0F, 1.0F ); - - if (TEST_EQ_4V(tmp, ctx->Color.BlendColor)) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4FV( ctx->Color.BlendColor, tmp ); - - if (ctx->Driver.BlendColor) - (*ctx->Driver.BlendColor)(ctx, tmp); -} - - -void -_mesa_AlphaFunc( GLenum func, GLclampf ref ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (func) { - case GL_NEVER: - case GL_LESS: - case GL_EQUAL: - case GL_LEQUAL: - case GL_GREATER: - case GL_NOTEQUAL: - case GL_GEQUAL: - case GL_ALWAYS: - ref = CLAMP(ref, 0.0F, 1.0F); - - if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRef == ref) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.AlphaFunc = func; - ctx->Color.AlphaRef = ref; - - if (ctx->Driver.AlphaFunc) - ctx->Driver.AlphaFunc(ctx, func, ref); - return; - - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glAlphaFunc(func)" ); - return; - } -} - - -void -_mesa_LogicOp( GLenum opcode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (opcode) { - case GL_CLEAR: - case GL_SET: - case GL_COPY: - case GL_COPY_INVERTED: - case GL_NOOP: - case GL_INVERT: - case GL_AND: - case GL_NAND: - case GL_OR: - case GL_NOR: - case GL_XOR: - case GL_EQUIV: - case GL_AND_REVERSE: - case GL_AND_INVERTED: - case GL_OR_REVERSE: - case GL_OR_INVERTED: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glLogicOp" ); - return; - } - - if (ctx->Color.LogicOp == opcode) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.LogicOp = opcode; - - if (ctx->Driver.LogicOpcode) - ctx->Driver.LogicOpcode( ctx, opcode ); -} - - -void -_mesa_IndexMask( GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Color.IndexMask == mask) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.IndexMask = mask; - - if (ctx->Driver.IndexMask) - ctx->Driver.IndexMask( ctx, mask ); -} - - -void -_mesa_ColorMask( GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - GLubyte tmp[4]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glColorMask %d %d %d %d\n", red, green, blue, alpha); - - /* Shouldn't have any information about channel depth in core mesa - * -- should probably store these as the native booleans: - */ - tmp[RCOMP] = red ? 0xff : 0x0; - tmp[GCOMP] = green ? 0xff : 0x0; - tmp[BCOMP] = blue ? 0xff : 0x0; - tmp[ACOMP] = alpha ? 0xff : 0x0; - - if (TEST_EQ_4UBV(tmp, ctx->Color.ColorMask)) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4UBV(ctx->Color.ColorMask, tmp); - - if (ctx->Driver.ColorMask) - ctx->Driver.ColorMask( ctx, red, green, blue, alpha ); -} Index: xc/extras/Mesa/src/blend.h diff -u xc/extras/Mesa/src/blend.h:1.5 xc/extras/Mesa/src/blend.h:removed --- xc/extras/Mesa/src/blend.h:1.5 Fri Feb 22 14:25:24 2002 +++ xc/extras/Mesa/src/blend.h Wed Mar 16 21:00:28 2005 @@ -1,67 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef BLEND_H -#define BLEND_H - - -#include "mtypes.h" - - -extern void -_mesa_BlendFunc( GLenum sfactor, GLenum dfactor ); - - -extern void -_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA ); - - -extern void -_mesa_BlendEquation( GLenum mode ); - - -extern void -_mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - - -extern void -_mesa_AlphaFunc( GLenum func, GLclampf ref ); - - -extern void -_mesa_LogicOp( GLenum opcode ); - - -extern void -_mesa_IndexMask( GLuint mask ); - -extern void -_mesa_ColorMask( GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ); - - -#endif Index: xc/extras/Mesa/src/buffers.c diff -u xc/extras/Mesa/src/buffers.c:1.11 xc/extras/Mesa/src/buffers.c:removed --- xc/extras/Mesa/src/buffers.c:1.11 Sun Sep 28 15:16:53 2003 +++ xc/extras/Mesa/src/buffers.c Wed Mar 16 21:00:28 2005 @@ -1,480 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "accum.h" -#include "buffers.h" -#include "colormac.h" -#include "context.h" -#include "depth.h" -#include "enums.h" -#include "macros.h" -#include "stencil.h" -#include "state.h" -#include "mtypes.h" - - - -void -_mesa_ClearIndex( GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Color.ClearIndex == (GLuint) c) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.ClearIndex = (GLuint) c; - - if (!ctx->Visual.rgbMode && ctx->Driver.ClearIndex) { - /* it's OK to call glClearIndex in RGBA mode but it should be a NOP */ - (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex ); - } -} - - - -void -_mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) -{ - GLfloat tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - tmp[0] = CLAMP(red, 0.0F, 1.0F); - tmp[1] = CLAMP(green, 0.0F, 1.0F); - tmp[2] = CLAMP(blue, 0.0F, 1.0F); - tmp[3] = CLAMP(alpha, 0.0F, 1.0F); - - if (TEST_EQ_4V(tmp, ctx->Color.ClearColor)) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4V(ctx->Color.ClearColor, tmp); - - if (ctx->Visual.rgbMode && ctx->Driver.ClearColor) { - /* it's OK to call glClearColor in CI mode but it should be a NOP */ - (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor); - } -} - - - -void -_mesa_Clear( GLbitfield mask ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glClear 0x%x\n", mask); - - if (mask & ~(GL_COLOR_BUFFER_BIT | - GL_DEPTH_BUFFER_BIT | - GL_STENCIL_BUFFER_BIT | - GL_ACCUM_BUFFER_BIT)) { - /* invalid bit set */ - _mesa_error( ctx, GL_INVALID_VALUE, "glClear(mask)"); - return; - } - - if (ctx->NewState) { - _mesa_update_state( ctx ); /* update _Xmin, etc */ - } - - if (ctx->RenderMode==GL_RENDER) { - const GLint x = ctx->DrawBuffer->_Xmin; - const GLint y = ctx->DrawBuffer->_Ymin; - const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; - const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; - GLbitfield ddMask; - - /* don't clear depth buffer if depth writing disabled */ - if (!ctx->Depth.Mask) - mask &= ~GL_DEPTH_BUFFER_BIT; - - /* Build the bitmask to send to device driver's Clear function. - * Note that the GL_COLOR_BUFFER_BIT flag will expand to 0, 1, 2 or 4 - * of the FRONT/BACK_LEFT/RIGHT_BIT flags. - */ - ddMask = 0; - if (mask & GL_COLOR_BUFFER_BIT) - ddMask |= ctx->Color._DrawDestMask; - if ((mask & GL_DEPTH_BUFFER_BIT) && ctx->Visual.depthBits > 0) - ddMask |= GL_DEPTH_BUFFER_BIT; - if ((mask & GL_STENCIL_BUFFER_BIT) && ctx->Visual.stencilBits > 0) - ddMask |= GL_STENCIL_BUFFER_BIT; - if ((mask & GL_ACCUM_BUFFER_BIT) && ctx->Visual.accumRedBits > 0) - ddMask |= GL_ACCUM_BUFFER_BIT; - - ASSERT(ctx->Driver.Clear); - ctx->Driver.Clear( ctx, ddMask, (GLboolean) !ctx->Scissor.Enabled, - x, y, width, height ); - } -} - - -void -_mesa_DrawBuffer( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */ - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); - - /* - * Do error checking and compute the _DrawDestMask bitfield. - */ - switch (mode) { - case GL_RIGHT: - if (!ctx->Visual.stereoMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return;} - if (ctx->Visual.doubleBufferMode) - ctx->Color._DrawDestMask = FRONT_RIGHT_BIT | BACK_RIGHT_BIT; - else - ctx->Color._DrawDestMask = FRONT_RIGHT_BIT; - break; - case GL_FRONT_RIGHT: - if (!ctx->Visual.stereoMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return; - } - ctx->Color._DrawDestMask = FRONT_RIGHT_BIT; - break; - case GL_BACK_RIGHT: - if (!ctx->Visual.stereoMode || !ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return; - } - ctx->Color._DrawDestMask = BACK_RIGHT_BIT; - break; - case GL_BACK_LEFT: - if (!ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return; - } - ctx->Color._DrawDestMask = BACK_LEFT_BIT; - break; - case GL_FRONT_AND_BACK: - if (!ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return; - } - if (ctx->Visual.stereoMode) - ctx->Color._DrawDestMask = FRONT_LEFT_BIT | BACK_LEFT_BIT - | FRONT_RIGHT_BIT | BACK_RIGHT_BIT; - else - ctx->Color._DrawDestMask = FRONT_LEFT_BIT | BACK_LEFT_BIT; - break; - case GL_BACK: - if (!ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer" ); - return; - } - if (ctx->Visual.stereoMode) - ctx->Color._DrawDestMask = BACK_LEFT_BIT | BACK_RIGHT_BIT; - else - ctx->Color._DrawDestMask = BACK_LEFT_BIT; - break; - case GL_LEFT: - /* never an error */ - if (ctx->Visual.doubleBufferMode) - ctx->Color._DrawDestMask = FRONT_LEFT_BIT | BACK_LEFT_BIT; - else - ctx->Color._DrawDestMask = FRONT_LEFT_BIT; - break; - case GL_FRONT_LEFT: - /* never an error */ - ctx->Color._DrawDestMask = FRONT_LEFT_BIT; - break; - case GL_FRONT: - /* never an error */ - if (ctx->Visual.stereoMode) - ctx->Color._DrawDestMask = FRONT_LEFT_BIT | FRONT_RIGHT_BIT; - else - ctx->Color._DrawDestMask = FRONT_LEFT_BIT; - break; - case GL_NONE: - /* never an error */ - ctx->Color._DrawDestMask = 0; - break; - case GL_AUX0: - if (ctx->Const.NumAuxBuffers >= 1) { - ctx->Color._DrawDestMask = AUX0_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX0)" ); - return; - } - break; - case GL_AUX1: - if (ctx->Const.NumAuxBuffers >= 2) { - ctx->Color._DrawDestMask = AUX1_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX1)" ); - return; - } - break; - case GL_AUX2: - if (ctx->Const.NumAuxBuffers >= 3) { - ctx->Color._DrawDestMask = AUX2_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX2)" ); - return; - } - break; - case GL_AUX3: - if (ctx->Const.NumAuxBuffers >= 4) { - ctx->Color._DrawDestMask = AUX3_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX3)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" ); - return; - } - - ctx->Color.DrawBuffer = mode; - ctx->NewState |= _NEW_COLOR; - - /* - * Call device driver function. - */ - if (ctx->Driver.DrawBuffer) - (*ctx->Driver.DrawBuffer)(ctx, mode); -} - - - -void -_mesa_ReadBuffer( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); - - /* - * Do error checking and compute ctx->Pixel._ReadSrcMask. - */ - switch (mode) { - case GL_LEFT: - case GL_FRONT: - case GL_FRONT_LEFT: - /* Front-Left buffer, always exists */ - ctx->Pixel._ReadSrcMask = FRONT_LEFT_BIT; - break; - case GL_BACK: - case GL_BACK_LEFT: - /* Back-Left buffer, requires double buffering */ - if (!ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); - return; - } - ctx->Pixel._ReadSrcMask = BACK_LEFT_BIT; - break; - case GL_FRONT_RIGHT: - case GL_RIGHT: - if (!ctx->Visual.stereoMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); - return; - } - ctx->Pixel._ReadSrcMask = FRONT_RIGHT_BIT; - break; - case GL_BACK_RIGHT: - if (!ctx->Visual.stereoMode || !ctx->Visual.doubleBufferMode) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" ); - return; - } - ctx->Pixel._ReadSrcMask = BACK_RIGHT_BIT; - break; - case GL_AUX0: - if (ctx->Const.NumAuxBuffers >= 1) { - ctx->Pixel._ReadSrcMask = AUX0_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX0)" ); - return; - } - break; - case GL_AUX1: - if (ctx->Const.NumAuxBuffers >= 2) { - ctx->Pixel._ReadSrcMask = AUX1_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX1)" ); - return; - } - break; - case GL_AUX2: - if (ctx->Const.NumAuxBuffers >= 3) { - ctx->Pixel._ReadSrcMask = AUX2_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX2)" ); - return; - } - break; - case GL_AUX3: - if (ctx->Const.NumAuxBuffers >= 4) { - ctx->Pixel._ReadSrcMask = AUX3_BIT; - } - else { - _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX3)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glReadBuffer" ); - return; - } - - ctx->Pixel.ReadBuffer = mode; - ctx->NewState |= _NEW_PIXEL; - - /* - * Call device driver function. - */ - if (ctx->Driver.ReadBuffer) - (*ctx->Driver.ReadBuffer)(ctx, mode); -} - - -/* - * GL_MESA_resize_buffers extension - * When this function is called, we'll ask the window system how large - * the current window is. If it's not what we expect, we'll have to - * resize/reallocate the software accum/stencil/depth/alpha buffers. - */ -void -_mesa_ResizeBuffersMESA( void ) -{ - GLcontext *ctx = _mesa_get_current_context(); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glResizeBuffersMESA\n"); - - if (ctx) { - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); - - if (ctx->DrawBuffer) { - GLuint buf_width, buf_height; - GLframebuffer *buffer = ctx->DrawBuffer; - - /* ask device driver for size of output buffer */ - (*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height ); - - /* see if size of device driver's color buffer (window) has changed */ - if (buffer->Width == buf_width && buffer->Height == buf_height) - return; /* size is as expected */ - - buffer->Width = buf_width; - buffer->Height = buf_height; - - ctx->Driver.ResizeBuffers( buffer ); - } - - if (ctx->ReadBuffer && ctx->ReadBuffer != ctx->DrawBuffer) { - GLuint buf_width, buf_height; - GLframebuffer *buffer = ctx->ReadBuffer; - - /* ask device driver for size of read buffer */ - (*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height ); - - /* see if size of device driver's color buffer (window) has changed */ - if (buffer->Width == buf_width && buffer->Height == buf_height) - return; /* size is as expected */ - - buffer->Width = buf_width; - buffer->Height = buf_height; - - ctx->Driver.ResizeBuffers( buffer ); - } - - ctx->NewState |= _NEW_BUFFERS; /* to update scissor / window bounds */ - } -} - - -void -_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" ); - return; - } - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); - - if (x == ctx->Scissor.X && - y == ctx->Scissor.Y && - width == ctx->Scissor.Width && - height == ctx->Scissor.Height) - return; - - FLUSH_VERTICES(ctx, _NEW_SCISSOR); - ctx->Scissor.X = x; - ctx->Scissor.Y = y; - ctx->Scissor.Width = width; - ctx->Scissor.Height = height; - - if (ctx->Driver.Scissor) - ctx->Driver.Scissor( ctx, x, y, width, height ); -} - - -/* - * XXX move somewhere else someday? - */ -void -_mesa_SampleCoverageARB(GLclampf value, GLboolean invert) -{ - GLcontext *ctx = _mesa_get_current_context(); - - if (!ctx->Extensions.ARB_multisample) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleCoverageARB"); - return; - } - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); - ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0); - ctx->Multisample.SampleCoverageInvert = invert; - ctx->NewState |= _NEW_MULTISAMPLE; -} - Index: xc/extras/Mesa/src/buffers.h diff -u xc/extras/Mesa/src/buffers.h:1.2 xc/extras/Mesa/src/buffers.h:removed --- xc/extras/Mesa/src/buffers.h:1.2 Fri Feb 22 14:25:24 2002 +++ xc/extras/Mesa/src/buffers.h Wed Mar 16 21:00:28 2005 @@ -1,60 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef BUFFERS_H -#define BUFFERS_H - - -#include "mtypes.h" - - -extern void -_mesa_ClearIndex( GLfloat c ); - -extern void -_mesa_ClearColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ); - -extern void -_mesa_Clear( GLbitfield mask ); - -extern void -_mesa_DrawBuffer( GLenum mode ); - -extern void -_mesa_ReadBuffer( GLenum mode ); - -extern void -_mesa_ResizeBuffersMESA( void ); - -extern void -_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ); - -extern void -_mesa_SampleCoverageARB(GLclampf value, GLboolean invert); - - -#endif Index: xc/extras/Mesa/src/clip.c diff -u xc/extras/Mesa/src/clip.c:1.7 xc/extras/Mesa/src/clip.c:removed --- xc/extras/Mesa/src/clip.c:1.7 Sun Sep 28 15:16:53 2003 +++ xc/extras/Mesa/src/clip.c Wed Mar 16 21:00:28 2005 @@ -1,119 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "clip.h" -#include "context.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" - -#include "math/m_xform.h" -#include "math/m_matrix.h" - - - -/**********************************************************************/ -/* Get/Set User clip-planes. */ -/**********************************************************************/ - - - -void -_mesa_ClipPlane( GLenum plane, const GLdouble *eq ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint p; - GLfloat equation[4]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - p = (GLint) plane - (GLint) GL_CLIP_PLANE0; - if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) { - _mesa_error( ctx, GL_INVALID_ENUM, "glClipPlane" ); - return; - } - - equation[0] = (GLfloat) eq[0]; - equation[1] = (GLfloat) eq[1]; - equation[2] = (GLfloat) eq[2]; - equation[3] = (GLfloat) eq[3]; - - /* - * The equation is transformed by the transpose of the inverse of the - * current modelview matrix and stored in the resulting eye coordinates. - * - * KW: Eqn is then transformed to the current clip space, where user - * clipping now takes place. The clip-space equations are recalculated - * whenever the projection matrix changes. - */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY) - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - - _mesa_transform_vector( equation, equation, - ctx->ModelviewMatrixStack.Top->inv ); - - if (TEST_EQ_4V(ctx->Transform.EyeUserPlane[p], equation)) - return; - - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - COPY_4FV(ctx->Transform.EyeUserPlane[p], equation); - - /* Update derived state. This state also depends on the projection - * matrix, and is recalculated on changes to the projection matrix by - * code in _mesa_update_state(). - */ - if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { - if (ctx->ProjectionMatrixStack.Top->flags & MAT_DIRTY) - _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); - - _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], - ctx->Transform.EyeUserPlane[p], - ctx->ProjectionMatrixStack.Top->inv ); - } - - if (ctx->Driver.ClipPlane) - ctx->Driver.ClipPlane( ctx, plane, equation ); -} - - -void -_mesa_GetClipPlane( GLenum plane, GLdouble *equation ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint p; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - p = (GLint) (plane - GL_CLIP_PLANE0); - if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetClipPlane" ); - return; - } - - equation[0] = (GLdouble) ctx->Transform.EyeUserPlane[p][0]; - equation[1] = (GLdouble) ctx->Transform.EyeUserPlane[p][1]; - equation[2] = (GLdouble) ctx->Transform.EyeUserPlane[p][2]; - equation[3] = (GLdouble) ctx->Transform.EyeUserPlane[p][3]; -} Index: xc/extras/Mesa/src/clip.h diff -u xc/extras/Mesa/src/clip.h:1.4 xc/extras/Mesa/src/clip.h:removed --- xc/extras/Mesa/src/clip.h:1.4 Fri Feb 22 14:25:24 2002 +++ xc/extras/Mesa/src/clip.h Wed Mar 16 21:00:28 2005 @@ -1,39 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - - - -#ifndef CLIP_H -#define CLIP_H - -#include "mtypes.h" - -extern void _mesa_ClipPlane( GLenum plane, const GLdouble *equation ); - -extern void _mesa_GetClipPlane( GLenum plane, GLdouble *equation ); - -#endif Index: xc/extras/Mesa/src/colormac.h diff -u xc/extras/Mesa/src/colormac.h:1.3 xc/extras/Mesa/src/colormac.h:removed --- xc/extras/Mesa/src/colormac.h:1.3 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/colormac.h Wed Mar 16 21:00:28 2005 @@ -1,135 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -/* - * Color-related macros - */ - -#ifndef COLORMAC_H -#define COLORMAC_H - - -#include "glheader.h" -#include "config.h" -#include "macros.h" -#include "mmath.h" -/* Do not reference mtypes.h from this file. - */ - - -#if CHAN_BITS == 8 - -#define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (GLchan) (b)) -#define UBYTE_TO_CHAN(b) (b) -#define SHORT_TO_CHAN(s) ((s) < 0 ? 0 : (GLchan) ((s) >> 7)) -#define USHORT_TO_CHAN(s) ((GLchan) ((s) >> 8)) -#define INT_TO_CHAN(i) ((i) < 0 ? 0 : (GLchan) ((i) >> 23)) -#define UINT_TO_CHAN(i) ((GLchan) ((i) >> 24)) - -#define CHAN_TO_UBYTE(c) (c) -#define CHAN_TO_FLOAT(c) UBYTE_TO_FLOAT(c) - -#define CLAMPED_FLOAT_TO_CHAN(c, f) CLAMPED_FLOAT_TO_UBYTE(c, f) -#define UNCLAMPED_FLOAT_TO_CHAN(c, f) UNCLAMPED_FLOAT_TO_UBYTE(c, f) - -#define COPY_CHAN4(DST, SRC) COPY_4UBV(DST, SRC) - -#define CHAN_PRODUCT(a, b) ((GLubyte) (((GLint)(a) * ((GLint)(b) + 1)) >> 8)) - - -#elif CHAN_BITS == 16 - -#define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (((GLchan) (b)) * 516)) -#define UBYTE_TO_CHAN(b) ((((GLchan) (b)) << 8) | ((GLchan) (b))) -#define SHORT_TO_CHAN(s) ((s) < 0 ? 0 : (GLchan) (s)) -#define USHORT_TO_CHAN(s) (s) -#define INT_TO_CHAN(i) ((i) < 0 ? 0 : (GLchan) ((i) >> 15)) -#define UINT_TO_CHAN(i) ((GLchan) ((i) >> 16)) - -#define CHAN_TO_UBYTE(c) ((c) >> 8) -#define CHAN_TO_FLOAT(c) ((GLfloat) ((c) * (1.0 / CHAN_MAXF))) - -#define CLAMPED_FLOAT_TO_CHAN(c, f) CLAMPED_FLOAT_TO_USHORT(c, f) -#define UNCLAMPED_FLOAT_TO_CHAN(c, f) UNCLAMPED_FLOAT_TO_USHORT(c, f) - -#define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) - -#define CHAN_PRODUCT(a, b) ((GLchan) ((((GLuint) (a)) * ((GLuint) (b))) / 65535)) - - -#elif CHAN_BITS == 32 - -/* XXX floating-point color channels not fully thought-out */ -#define BYTE_TO_CHAN(b) ((GLfloat) ((b) * (1.0F / 127.0F))) -#define UBYTE_TO_CHAN(b) ((GLfloat) ((b) * (1.0F / 255.0F))) -#define SHORT_TO_CHAN(s) ((GLfloat) ((s) * (1.0F / 32767.0F))) -#define USHORT_TO_CHAN(s) ((GLfloat) ((s) * (1.0F / 65535.0F))) -#define INT_TO_CHAN(i) ((GLfloat) ((i) * (1.0F / 2147483647.0F))) -#define UINT_TO_CHAN(i) ((GLfloat) ((i) * (1.0F / 4294967295.0F))) - -#define CHAN_TO_UBYTE(c) FLOAT_TO_UBYTE(c) -#define CHAN_TO_FLOAT(c) (c) - -#define CLAMPED_FLOAT_TO_CHAN(c, f) c = (f) -#define UNCLAMPED_FLOAT_TO_CHAN(c, f) c = (f) - -#define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) - -#define CHAN_PRODUCT(a, b) ((a) * (b)) - -#else - -#error unexpected CHAN_BITS size - -#endif - - - -/* - * Convert 3 channels at once. - */ -#define UNCLAMPED_FLOAT_TO_RGB_CHAN(dst, f) \ -do { \ - UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \ - UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \ - UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \ -} while (0) - - -/* - * Convert 4 channels at once. - */ -#define UNCLAMPED_FLOAT_TO_RGBA_CHAN(dst, f) \ -do { \ - UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \ - UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \ - UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \ - UNCLAMPED_FLOAT_TO_CHAN(dst[3], f[3]); \ -} while (0) - - -#endif /* COLORMAC_H */ Index: xc/extras/Mesa/src/colortab.c diff -u xc/extras/Mesa/src/colortab.c:1.12 xc/extras/Mesa/src/colortab.c:removed --- xc/extras/Mesa/src/colortab.c:1.12 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/colortab.c Wed Mar 16 21:00:28 2005 @@ -1,1223 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "colortab.h" -#include "context.h" -#include "image.h" -#include "macros.h" -#include "mmath.h" -#include "state.h" - - -/* - * Given an internalFormat token passed to glColorTable, - * return the corresponding base format. - * Return -1 if invalid token. - */ -static GLint -base_colortab_format( GLenum format ) -{ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return GL_ALPHA; - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return GL_INTENSITY; - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return GL_RGB; - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_RGBA; - default: - return -1; /* error */ - } -} - - -void -_mesa_init_colortable( struct gl_color_table *p ) -{ - p->FloatTable = GL_FALSE; - p->Table = NULL; - p->Size = 0; - p->IntFormat = GL_RGBA; -} - - - -void -_mesa_free_colortable_data( struct gl_color_table *p ) -{ - if (p->Table) { - FREE(p->Table); - p->Table = NULL; - } -} - - -/* - * Examine table's format and set the component sizes accordingly. - */ -static void -set_component_sizes( struct gl_color_table *table ) -{ - switch (table->Format) { - case GL_ALPHA: - table->RedSize = 0; - table->GreenSize = 0; - table->BlueSize = 0; - table->AlphaSize = CHAN_BITS; - table->IntensitySize = 0; - table->LuminanceSize = 0; - break; - case GL_LUMINANCE: - table->RedSize = 0; - table->GreenSize = 0; - table->BlueSize = 0; - table->AlphaSize = 0; - table->IntensitySize = 0; - table->LuminanceSize = CHAN_BITS; - break; - case GL_LUMINANCE_ALPHA: - table->RedSize = 0; - table->GreenSize = 0; - table->BlueSize = 0; - table->AlphaSize = CHAN_BITS; - table->IntensitySize = 0; - table->LuminanceSize = CHAN_BITS; - break; - case GL_INTENSITY: - table->RedSize = 0; - table->GreenSize = 0; - table->BlueSize = 0; - table->AlphaSize = 0; - table->IntensitySize = CHAN_BITS; - table->LuminanceSize = 0; - break; - case GL_RGB: - table->RedSize = CHAN_BITS; - table->GreenSize = CHAN_BITS; - table->BlueSize = CHAN_BITS; - table->AlphaSize = 0; - table->IntensitySize = 0; - table->LuminanceSize = 0; - break; - case GL_RGBA: - table->RedSize = CHAN_BITS; - table->GreenSize = CHAN_BITS; - table->BlueSize = CHAN_BITS; - table->AlphaSize = CHAN_BITS; - table->IntensitySize = 0; - table->LuminanceSize = 0; - break; - default: - _mesa_problem(NULL, "unexpected format in set_component_sizes"); - } -} - - - -void -_mesa_ColorTable( GLenum target, GLenum internalFormat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *data ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_object *texObj = NULL; - struct gl_color_table *table = NULL; - GLboolean proxy = GL_FALSE; - GLint baseFormat; - GLfloat rScale = 1.0, gScale = 1.0, bScale = 1.0, aScale = 1.0; - GLfloat rBias = 0.0, gBias = 0.0, bBias = 0.0, aBias = 0.0; - GLboolean floatTable = GL_FALSE; - GLint comps; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */ - - switch (target) { - case GL_TEXTURE_1D: - texObj = texUnit->Current1D; - table = &texObj->Palette; - break; - case GL_TEXTURE_2D: - texObj = texUnit->Current2D; - table = &texObj->Palette; - break; - case GL_TEXTURE_3D: - texObj = texUnit->Current3D; - table = &texObj->Palette; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); - return; - } - texObj = texUnit->CurrentCubeMap; - table = &texObj->Palette; - break; - case GL_PROXY_TEXTURE_1D: - texObj = ctx->Texture.Proxy1D; - table = &texObj->Palette; - proxy = GL_TRUE; - break; - case GL_PROXY_TEXTURE_2D: - texObj = ctx->Texture.Proxy2D; - table = &texObj->Palette; - proxy = GL_TRUE; - break; - case GL_PROXY_TEXTURE_3D: - texObj = ctx->Texture.Proxy3D; - table = &texObj->Palette; - proxy = GL_TRUE; - break; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); - return; - } - texObj = ctx->Texture.ProxyCubeMap; - table = &texObj->Palette; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - table = &ctx->Texture.Palette; - break; - case GL_COLOR_TABLE: - table = &ctx->ColorTable; - floatTable = GL_TRUE; - rScale = ctx->Pixel.ColorTableScale[0]; - gScale = ctx->Pixel.ColorTableScale[1]; - bScale = ctx->Pixel.ColorTableScale[2]; - aScale = ctx->Pixel.ColorTableScale[3]; - rBias = ctx->Pixel.ColorTableBias[0]; - gBias = ctx->Pixel.ColorTableBias[1]; - bBias = ctx->Pixel.ColorTableBias[2]; - aBias = ctx->Pixel.ColorTableBias[3]; - break; - case GL_PROXY_COLOR_TABLE: - table = &ctx->ProxyColorTable; - proxy = GL_TRUE; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->PostConvolutionColorTable; - floatTable = GL_TRUE; - rScale = ctx->Pixel.PCCTscale[0]; - gScale = ctx->Pixel.PCCTscale[1]; - bScale = ctx->Pixel.PCCTscale[2]; - aScale = ctx->Pixel.PCCTscale[3]; - rBias = ctx->Pixel.PCCTbias[0]; - gBias = ctx->Pixel.PCCTbias[1]; - bBias = ctx->Pixel.PCCTbias[2]; - aBias = ctx->Pixel.PCCTbias[3]; - break; - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->ProxyPostConvolutionColorTable; - proxy = GL_TRUE; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->PostColorMatrixColorTable; - floatTable = GL_TRUE; - rScale = ctx->Pixel.PCMCTscale[0]; - gScale = ctx->Pixel.PCMCTscale[1]; - bScale = ctx->Pixel.PCMCTscale[2]; - aScale = ctx->Pixel.PCMCTscale[3]; - rBias = ctx->Pixel.PCMCTbias[0]; - gBias = ctx->Pixel.PCMCTbias[1]; - bBias = ctx->Pixel.PCMCTbias[2]; - aBias = ctx->Pixel.PCMCTbias[3]; - break; - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->ProxyPostColorMatrixColorTable; - proxy = GL_TRUE; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); - return; - } - - assert(table); - - if (!_mesa_is_legal_format_and_type(format, type) || - format == GL_INTENSITY) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glColorTable(format or type)"); - return; - } - - baseFormat = base_colortab_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)"); - return; - } - - if (width < 0 || (width != 0 && _mesa_bitcount(width) != 1)) { - /* error */ - if (proxy) { - table->Size = 0; - table->IntFormat = (GLenum) 0; - table->Format = (GLenum) 0; - } - else { - _mesa_error(ctx, GL_INVALID_VALUE, "glColorTable(width=%d)", width); - } - return; - } - - if (width > (GLsizei) ctx->Const.MaxColorTableSize) { - if (proxy) { - table->Size = 0; - table->IntFormat = (GLenum) 0; - table->Format = (GLenum) 0; - } - else { - _mesa_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)"); - } - return; - } - - table->Size = width; - table->IntFormat = internalFormat; - table->Format = (GLenum) baseFormat; - set_component_sizes(table); - - comps = _mesa_components_in_format(table->Format); - assert(comps > 0); /* error should have been caught sooner */ - - if (!proxy) { - /* free old table, if any */ - if (table->Table) { - FREE(table->Table); - table->Table = NULL; - } - if (width > 0) { - if (floatTable) { - GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4]; - GLfloat *tableF; - GLint i; - - _mesa_unpack_float_color_span(ctx, width, table->Format, - tempTab, /* dest */ - format, type, data, &ctx->Unpack, - 0, GL_FALSE); - - table->FloatTable = GL_TRUE; - table->Table = MALLOC(comps * width * sizeof(GLfloat)); - if (!table->Table) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); - return; - } - - tableF = (GLfloat *) table->Table; - - switch (table->Format) { - case GL_INTENSITY: - for (i = 0; i < width; i++) { - tableF[i] = CLAMP(tempTab[i] * rScale + rBias, 0.0F, 1.0F); - } - break; - case GL_LUMINANCE: - for (i = 0; i < width; i++) { - tableF[i] = CLAMP(tempTab[i] * rScale + rBias, 0.0F, 1.0F); - } - break; - case GL_ALPHA: - for (i = 0; i < width; i++) { - tableF[i] = CLAMP(tempTab[i] * aScale + aBias, 0.0F, 1.0F); - } - break; - case GL_LUMINANCE_ALPHA: - for (i = 0; i < width; i++) { - tableF[i*2+0] = CLAMP(tempTab[i*2+0] * rScale + rBias, 0.0F, 1.0F); - tableF[i*2+1] = CLAMP(tempTab[i*2+1] * aScale + aBias, 0.0F, 1.0F); - } - break; - case GL_RGB: - for (i = 0; i < width; i++) { - tableF[i*3+0] = CLAMP(tempTab[i*3+0] * rScale + rBias, 0.0F, 1.0F); - tableF[i*3+1] = CLAMP(tempTab[i*3+1] * gScale + gBias, 0.0F, 1.0F); - tableF[i*3+2] = CLAMP(tempTab[i*3+2] * bScale + bBias, 0.0F, 1.0F); - } - break; - case GL_RGBA: - for (i = 0; i < width; i++) { - tableF[i*4+0] = CLAMP(tempTab[i*4+0] * rScale + rBias, 0.0F, 1.0F); - tableF[i*4+1] = CLAMP(tempTab[i*4+1] * gScale + gBias, 0.0F, 1.0F); - tableF[i*4+2] = CLAMP(tempTab[i*4+2] * bScale + bBias, 0.0F, 1.0F); - tableF[i*4+3] = CLAMP(tempTab[i*4+3] * aScale + aBias, 0.0F, 1.0F); - } - break; - default: - _mesa_problem(ctx, "Bad format in _mesa_ColorTable"); - return; - } - } - else { - /* store GLchan table */ - table->FloatTable = GL_FALSE; - table->Table = MALLOC(comps * width * sizeof(GLchan)); - if (!table->Table) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); - return; - } - _mesa_unpack_chan_color_span(ctx, width, table->Format, - (GLchan *) table->Table, /* dest */ - format, type, data, - &ctx->Unpack, 0); - } /* floatTable */ - } /* width > 0 */ - } /* proxy */ - - if (texObj || target == GL_SHARED_TEXTURE_PALETTE_EXT) { - /* texture object palette, texObj==NULL means the shared palette */ - if (ctx->Driver.UpdateTexturePalette) { - (*ctx->Driver.UpdateTexturePalette)( ctx, texObj ); - } - } - - ctx->NewState |= _NEW_PIXEL; -} - - - -void -_mesa_ColorSubTable( GLenum target, GLsizei start, - GLsizei count, GLenum format, GLenum type, - const GLvoid *data ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_object *texObj = NULL; - struct gl_color_table *table = NULL; - GLfloat rScale = 1.0, gScale = 1.0, bScale = 1.0, aScale = 1.0; - GLfloat rBias = 0.0, gBias = 0.0, bBias = 0.0, aBias = 0.0; - GLint comps; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_TEXTURE_1D: - texObj = texUnit->Current1D; - table = &texObj->Palette; - break; - case GL_TEXTURE_2D: - texObj = texUnit->Current2D; - table = &texObj->Palette; - break; - case GL_TEXTURE_3D: - texObj = texUnit->Current3D; - table = &texObj->Palette; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)"); - return; - } - texObj = texUnit->CurrentCubeMap; - table = &texObj->Palette; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - table = &ctx->Texture.Palette; - break; - case GL_COLOR_TABLE: - table = &ctx->ColorTable; - rScale = ctx->Pixel.ColorTableScale[0]; - gScale = ctx->Pixel.ColorTableScale[1]; - bScale = ctx->Pixel.ColorTableScale[2]; - aScale = ctx->Pixel.ColorTableScale[3]; - rBias = ctx->Pixel.ColorTableBias[0]; - gBias = ctx->Pixel.ColorTableBias[1]; - bBias = ctx->Pixel.ColorTableBias[2]; - aBias = ctx->Pixel.ColorTableBias[3]; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->PostConvolutionColorTable; - rScale = ctx->Pixel.PCCTscale[0]; - gScale = ctx->Pixel.PCCTscale[1]; - bScale = ctx->Pixel.PCCTscale[2]; - aScale = ctx->Pixel.PCCTscale[3]; - rBias = ctx->Pixel.PCCTbias[0]; - gBias = ctx->Pixel.PCCTbias[1]; - bBias = ctx->Pixel.PCCTbias[2]; - aBias = ctx->Pixel.PCCTbias[3]; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->PostColorMatrixColorTable; - rScale = ctx->Pixel.PCMCTscale[0]; - gScale = ctx->Pixel.PCMCTscale[1]; - bScale = ctx->Pixel.PCMCTscale[2]; - aScale = ctx->Pixel.PCMCTscale[3]; - rBias = ctx->Pixel.PCMCTbias[0]; - gBias = ctx->Pixel.PCMCTbias[1]; - bBias = ctx->Pixel.PCMCTbias[2]; - aBias = ctx->Pixel.PCMCTbias[3]; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)"); - return; - } - - assert(table); - - if (!_mesa_is_legal_format_and_type(format, type) || - format == GL_INTENSITY) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glColorSubTable(format or type)"); - return; - } - - if (count < 1) { - _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); - return; - } - - comps = _mesa_components_in_format(table->Format); - assert(comps > 0); /* error should have been caught sooner */ - - if (start + count > (GLint) table->Size) { - _mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)"); - return; - } - - if (!table->Table) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorSubTable"); - return; - } - - if (!table->FloatTable) { - GLchan *dest = (GLchan *) table->Table + start * comps * sizeof(GLchan); - _mesa_unpack_chan_color_span(ctx, count, table->Format, dest, - format, type, data, &ctx->Unpack, 0); - } - else { - GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4]; - GLfloat *tableF; - GLint i; - - ASSERT(table->FloatTable); - - _mesa_unpack_float_color_span(ctx, count, table->Format, - tempTab, /* dest */ - format, type, data, &ctx->Unpack, - 0, GL_FALSE); - - tableF = (GLfloat *) table->Table; - - switch (table->Format) { - case GL_INTENSITY: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j] = CLAMP(tempTab[i] * rScale + rBias, 0.0F, 1.0F); - } - break; - case GL_LUMINANCE: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j] = CLAMP(tempTab[i] * rScale + rBias, 0.0F, 1.0F); - } - break; - case GL_ALPHA: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j] = CLAMP(tempTab[i] * aScale + aBias, 0.0F, 1.0F); - } - break; - case GL_LUMINANCE_ALPHA: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j*2+0] = CLAMP(tempTab[i*2+0] * rScale + rBias, 0.0F, 1.0F); - tableF[j*2+1] = CLAMP(tempTab[i*2+1] * aScale + aBias, 0.0F, 1.0F); - } - break; - case GL_RGB: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j*3+0] = CLAMP(tempTab[i*3+0] * rScale + rBias, 0.0F, 1.0F); - tableF[j*3+1] = CLAMP(tempTab[i*3+1] * gScale + gBias, 0.0F, 1.0F); - tableF[j*3+2] = CLAMP(tempTab[i*3+2] * bScale + bBias, 0.0F, 1.0F); - } - break; - case GL_RGBA: - for (i = 0; i < count; i++) { - GLuint j = start + i; - tableF[j*4+0] = CLAMP(tempTab[i*4+0] * rScale + rBias, 0.0F, 1.0F); - tableF[j*4+1] = CLAMP(tempTab[i*4+1] * gScale + gBias, 0.0F, 1.0F); - tableF[j*4+2] = CLAMP(tempTab[i*4+2] * bScale + bBias, 0.0F, 1.0F); - tableF[j*4+3] = CLAMP(tempTab[i*4+3] * aScale + aBias, 0.0F, 1.0F); - } - break; - default: - _mesa_problem(ctx, "Bad format in _mesa_ColorSubTable"); - return; - } - } - - if (texObj || target == GL_SHARED_TEXTURE_PALETTE_EXT) { - /* per-texture object palette */ - if (ctx->Driver.UpdateTexturePalette) { - (*ctx->Driver.UpdateTexturePalette)( ctx, texObj ); - } - } - - ctx->NewState |= _NEW_PIXEL; -} - - - -/* XXX not tested */ -void -_mesa_CopyColorTable(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - /* Select buffer to read from */ - ctx->Driver.CopyColorTable( ctx, target, internalformat, x, y, width ); -} - - - -/* XXX not tested */ -void -_mesa_CopyColorSubTable(GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - ctx->Driver.CopyColorSubTable( ctx, target, start, x, y, width ); -} - - - -void -_mesa_GetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *data ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_color_table *table = NULL; - GLchan rgba[MAX_COLOR_TABLE_SIZE][4]; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - switch (target) { - case GL_TEXTURE_1D: - table = &texUnit->Current1D->Palette; - break; - case GL_TEXTURE_2D: - table = &texUnit->Current2D->Palette; - break; - case GL_TEXTURE_3D: - table = &texUnit->Current3D->Palette; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)"); - return; - } - table = &texUnit->CurrentCubeMap->Palette; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - table = &ctx->Texture.Palette; - break; - case GL_COLOR_TABLE: - table = &ctx->ColorTable; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->PostConvolutionColorTable; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->PostColorMatrixColorTable; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)"); - return; - } - - assert(table); - - switch (table->Format) { - case GL_ALPHA: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = 0; - rgba[i][GCOMP] = 0; - rgba[i][BCOMP] = 0; - rgba[i][ACOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = 0; - rgba[i][GCOMP] = 0; - rgba[i][BCOMP] = 0; - rgba[i][ACOMP] = tableUB[i]; - } - } - break; - case GL_LUMINANCE: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][GCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][BCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][ACOMP] = CHAN_MAX; - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = tableUB[i]; - rgba[i][GCOMP] = tableUB[i]; - rgba[i][BCOMP] = tableUB[i]; - rgba[i][ACOMP] = CHAN_MAX; - } - } - break; - case GL_LUMINANCE_ALPHA: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = IROUND_POS(tableF[i*2+0] * CHAN_MAXF); - rgba[i][GCOMP] = IROUND_POS(tableF[i*2+0] * CHAN_MAXF); - rgba[i][BCOMP] = IROUND_POS(tableF[i*2+0] * CHAN_MAXF); - rgba[i][ACOMP] = IROUND_POS(tableF[i*2+1] * CHAN_MAXF); - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = tableUB[i*2+0]; - rgba[i][GCOMP] = tableUB[i*2+0]; - rgba[i][BCOMP] = tableUB[i*2+0]; - rgba[i][ACOMP] = tableUB[i*2+1]; - } - } - break; - case GL_INTENSITY: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][GCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][BCOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - rgba[i][ACOMP] = IROUND_POS(tableF[i] * CHAN_MAXF); - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = tableUB[i]; - rgba[i][GCOMP] = tableUB[i]; - rgba[i][BCOMP] = tableUB[i]; - rgba[i][ACOMP] = tableUB[i]; - } - } - break; - case GL_RGB: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = IROUND_POS(tableF[i*3+0] * CHAN_MAXF); - rgba[i][GCOMP] = IROUND_POS(tableF[i*3+1] * CHAN_MAXF); - rgba[i][BCOMP] = IROUND_POS(tableF[i*3+2] * CHAN_MAXF); - rgba[i][ACOMP] = CHAN_MAX; - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = tableUB[i*3+0]; - rgba[i][GCOMP] = tableUB[i*3+1]; - rgba[i][BCOMP] = tableUB[i*3+2]; - rgba[i][ACOMP] = CHAN_MAX; - } - } - break; - case GL_RGBA: - if (table->FloatTable) { - const GLfloat *tableF = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = IROUND_POS(tableF[i*4+0] * CHAN_MAXF); - rgba[i][GCOMP] = IROUND_POS(tableF[i*4+1] * CHAN_MAXF); - rgba[i][BCOMP] = IROUND_POS(tableF[i*4+2] * CHAN_MAXF); - rgba[i][ACOMP] = IROUND_POS(tableF[i*4+3] * CHAN_MAXF); - } - } - else { - const GLchan *tableUB = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < table->Size; i++) { - rgba[i][RCOMP] = tableUB[i*4+0]; - rgba[i][GCOMP] = tableUB[i*4+1]; - rgba[i][BCOMP] = tableUB[i*4+2]; - rgba[i][ACOMP] = tableUB[i*4+3]; - } - } - break; - default: - _mesa_problem(ctx, "bad table format in glGetColorTable"); - return; - } - - _mesa_pack_rgba_span(ctx, table->Size, (const GLchan (*)[4]) rgba, - format, type, data, &ctx->Pack, GL_FALSE); -} - - - -void -_mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_COLOR_TABLE_SGI: - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - ctx->Pixel.ColorTableScale[0] = params[0]; - ctx->Pixel.ColorTableScale[1] = params[1]; - ctx->Pixel.ColorTableScale[2] = params[2]; - ctx->Pixel.ColorTableScale[3] = params[3]; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - ctx->Pixel.ColorTableBias[0] = params[0]; - ctx->Pixel.ColorTableBias[1] = params[1]; - ctx->Pixel.ColorTableBias[2] = params[2]; - ctx->Pixel.ColorTableBias[3] = params[3]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); - return; - } - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - ctx->Pixel.PCCTscale[0] = params[0]; - ctx->Pixel.PCCTscale[1] = params[1]; - ctx->Pixel.PCCTscale[2] = params[2]; - ctx->Pixel.PCCTscale[3] = params[3]; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - ctx->Pixel.PCCTbias[0] = params[0]; - ctx->Pixel.PCCTbias[1] = params[1]; - ctx->Pixel.PCCTbias[2] = params[2]; - ctx->Pixel.PCCTbias[3] = params[3]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); - return; - } - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - ctx->Pixel.PCMCTscale[0] = params[0]; - ctx->Pixel.PCMCTscale[1] = params[1]; - ctx->Pixel.PCMCTscale[2] = params[2]; - ctx->Pixel.PCMCTscale[3] = params[3]; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - ctx->Pixel.PCMCTbias[0] = params[0]; - ctx->Pixel.PCMCTbias[1] = params[1]; - ctx->Pixel.PCMCTbias[2] = params[2]; - ctx->Pixel.PCMCTbias[3] = params[3]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)"); - return; - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)"); - return; - } - - ctx->NewState |= _NEW_PIXEL; -} - - - -void -_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GLfloat fparams[4]; - if (pname == GL_COLOR_TABLE_SGI || - pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI || - pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) { - /* four values */ - fparams[0] = (GLfloat) params[0]; - fparams[1] = (GLfloat) params[1]; - fparams[2] = (GLfloat) params[2]; - fparams[3] = (GLfloat) params[3]; - } - else { - /* one values */ - fparams[0] = (GLfloat) params[0]; - } - _mesa_ColorTableParameterfv(target, pname, fparams); -} - - - -void -_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_color_table *table = NULL; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (target) { - case GL_TEXTURE_1D: - table = &texUnit->Current1D->Palette; - break; - case GL_TEXTURE_2D: - table = &texUnit->Current2D->Palette; - break; - case GL_TEXTURE_3D: - table = &texUnit->Current3D->Palette; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetColorTableParameterfv(target)"); - return; - } - table = &texUnit->CurrentCubeMap->Palette; - break; - case GL_PROXY_TEXTURE_1D: - table = &ctx->Texture.Proxy1D->Palette; - break; - case GL_PROXY_TEXTURE_2D: - table = &ctx->Texture.Proxy2D->Palette; - break; - case GL_PROXY_TEXTURE_3D: - table = &ctx->Texture.Proxy3D->Palette; - break; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetColorTableParameterfv(target)"); - return; - } - table = &ctx->Texture.ProxyCubeMap->Palette; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - table = &ctx->Texture.Palette; - break; - case GL_COLOR_TABLE: - table = &ctx->ColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = ctx->Pixel.ColorTableScale[0]; - params[1] = ctx->Pixel.ColorTableScale[1]; - params[2] = ctx->Pixel.ColorTableScale[2]; - params[3] = ctx->Pixel.ColorTableScale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = ctx->Pixel.ColorTableBias[0]; - params[1] = ctx->Pixel.ColorTableBias[1]; - params[2] = ctx->Pixel.ColorTableBias[2]; - params[3] = ctx->Pixel.ColorTableBias[3]; - return; - } - break; - case GL_PROXY_COLOR_TABLE: - table = &ctx->ProxyColorTable; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->PostConvolutionColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = ctx->Pixel.PCCTscale[0]; - params[1] = ctx->Pixel.PCCTscale[1]; - params[2] = ctx->Pixel.PCCTscale[2]; - params[3] = ctx->Pixel.PCCTscale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = ctx->Pixel.PCCTbias[0]; - params[1] = ctx->Pixel.PCCTbias[1]; - params[2] = ctx->Pixel.PCCTbias[2]; - params[3] = ctx->Pixel.PCCTbias[3]; - return; - } - break; - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->ProxyPostConvolutionColorTable; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->PostColorMatrixColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = ctx->Pixel.PCMCTscale[0]; - params[1] = ctx->Pixel.PCMCTscale[1]; - params[2] = ctx->Pixel.PCMCTscale[2]; - params[3] = ctx->Pixel.PCMCTscale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = ctx->Pixel.PCMCTbias[0]; - params[1] = ctx->Pixel.PCMCTbias[1]; - params[2] = ctx->Pixel.PCMCTbias[2]; - params[3] = ctx->Pixel.PCMCTbias[3]; - return; - } - break; - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->ProxyPostColorMatrixColorTable; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)"); - return; - } - - assert(table); - - switch (pname) { - case GL_COLOR_TABLE_FORMAT: - *params = (GLfloat) table->IntFormat; - break; - case GL_COLOR_TABLE_WIDTH: - *params = (GLfloat) table->Size; - break; - case GL_COLOR_TABLE_RED_SIZE: - *params = table->RedSize; - break; - case GL_COLOR_TABLE_GREEN_SIZE: - *params = table->GreenSize; - break; - case GL_COLOR_TABLE_BLUE_SIZE: - *params = table->BlueSize; - break; - case GL_COLOR_TABLE_ALPHA_SIZE: - *params = table->AlphaSize; - break; - case GL_COLOR_TABLE_LUMINANCE_SIZE: - *params = table->LuminanceSize; - break; - case GL_COLOR_TABLE_INTENSITY_SIZE: - *params = table->IntensitySize; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(pname)" ); - return; - } -} - - - -void -_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_color_table *table = NULL; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (target) { - case GL_TEXTURE_1D: - table = &texUnit->Current1D->Palette; - break; - case GL_TEXTURE_2D: - table = &texUnit->Current2D->Palette; - break; - case GL_TEXTURE_3D: - table = &texUnit->Current3D->Palette; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetColorTableParameteriv(target)"); - return; - } - table = &texUnit->CurrentCubeMap->Palette; - break; - case GL_PROXY_TEXTURE_1D: - table = &ctx->Texture.Proxy1D->Palette; - break; - case GL_PROXY_TEXTURE_2D: - table = &ctx->Texture.Proxy2D->Palette; - break; - case GL_PROXY_TEXTURE_3D: - table = &ctx->Texture.Proxy3D->Palette; - break; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetColorTableParameteriv(target)"); - return; - } - table = &ctx->Texture.ProxyCubeMap->Palette; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - table = &ctx->Texture.Palette; - break; - case GL_COLOR_TABLE: - table = &ctx->ColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = (GLint) ctx->Pixel.ColorTableScale[0]; - params[1] = (GLint) ctx->Pixel.ColorTableScale[1]; - params[2] = (GLint) ctx->Pixel.ColorTableScale[2]; - params[3] = (GLint) ctx->Pixel.ColorTableScale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = (GLint) ctx->Pixel.ColorTableBias[0]; - params[1] = (GLint) ctx->Pixel.ColorTableBias[1]; - params[2] = (GLint) ctx->Pixel.ColorTableBias[2]; - params[3] = (GLint) ctx->Pixel.ColorTableBias[3]; - return; - } - break; - case GL_PROXY_COLOR_TABLE: - table = &ctx->ProxyColorTable; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->PostConvolutionColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = (GLint) ctx->Pixel.PCCTscale[0]; - params[1] = (GLint) ctx->Pixel.PCCTscale[1]; - params[2] = (GLint) ctx->Pixel.PCCTscale[2]; - params[3] = (GLint) ctx->Pixel.PCCTscale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = (GLint) ctx->Pixel.PCCTbias[0]; - params[1] = (GLint) ctx->Pixel.PCCTbias[1]; - params[2] = (GLint) ctx->Pixel.PCCTbias[2]; - params[3] = (GLint) ctx->Pixel.PCCTbias[3]; - return; - } - break; - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - table = &ctx->ProxyPostConvolutionColorTable; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->PostColorMatrixColorTable; - if (pname == GL_COLOR_TABLE_SCALE_SGI) { - params[0] = (GLint) ctx->Pixel.PCMCTscale[0]; - params[1] = (GLint) ctx->Pixel.PCMCTscale[1]; - params[2] = (GLint) ctx->Pixel.PCMCTscale[2]; - params[3] = (GLint) ctx->Pixel.PCMCTscale[3]; - return; - } - else if (pname == GL_COLOR_TABLE_BIAS_SGI) { - params[0] = (GLint) ctx->Pixel.PCMCTbias[0]; - params[1] = (GLint) ctx->Pixel.PCMCTbias[1]; - params[2] = (GLint) ctx->Pixel.PCMCTbias[2]; - params[3] = (GLint) ctx->Pixel.PCMCTbias[3]; - return; - } - break; - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - table = &ctx->ProxyPostColorMatrixColorTable; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)"); - return; - } - - assert(table); - - switch (pname) { - case GL_COLOR_TABLE_FORMAT: - *params = table->IntFormat; - break; - case GL_COLOR_TABLE_WIDTH: - *params = table->Size; - break; - case GL_COLOR_TABLE_RED_SIZE: - *params = table->RedSize; - break; - case GL_COLOR_TABLE_GREEN_SIZE: - *params = table->GreenSize; - break; - case GL_COLOR_TABLE_BLUE_SIZE: - *params = table->BlueSize; - break; - case GL_COLOR_TABLE_ALPHA_SIZE: - *params = table->AlphaSize; - break; - case GL_COLOR_TABLE_LUMINANCE_SIZE: - *params = table->LuminanceSize; - break; - case GL_COLOR_TABLE_INTENSITY_SIZE: - *params = table->IntensitySize; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(pname)" ); - return; - } -} Index: xc/extras/Mesa/src/colortab.h diff -u xc/extras/Mesa/src/colortab.h:1.6 xc/extras/Mesa/src/colortab.h:removed --- xc/extras/Mesa/src/colortab.h:1.6 Fri Feb 22 14:25:24 2002 +++ xc/extras/Mesa/src/colortab.h Wed Mar 16 21:00:28 2005 @@ -1,86 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef COLORTAB_H -#define COLORTAB_H - - -#include "mtypes.h" - - -extern void -_mesa_init_colortable( struct gl_color_table *p ); - -extern void -_mesa_free_colortable_data( struct gl_color_table *p ); - - -extern void -_mesa_ColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *table ); - - -extern void -_mesa_ColorSubTable( GLenum target, GLsizei start, - GLsizei count, GLenum format, GLenum type, - const GLvoid *table ); - - -extern void -_mesa_CopyColorSubTable(GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width); - - -extern void -_mesa_CopyColorTable(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width); - - -extern void -_mesa_GetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ); - - -extern void -_mesa_ColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - - -extern void -_mesa_ColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params); - - -extern void -_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ); - - -extern void -_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ); - - -#endif Index: xc/extras/Mesa/src/config.h diff -u xc/extras/Mesa/src/config.h:1.12 xc/extras/Mesa/src/config.h:removed --- xc/extras/Mesa/src/config.h:1.12 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/config.h Wed Mar 16 21:00:28 2005 @@ -1,206 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Tunable configuration parameters. - */ - - - -#ifndef CONFIG_H -#define CONFIG_H - -#ifdef HAVE_CONFIG_H -#include "conf.h" -#endif - - -/* - * OpenGL implementation limits - */ - -/* Maximum modelview matrix stack depth: */ -#define MAX_MODELVIEW_STACK_DEPTH 32 - -/* Maximum projection matrix stack depth: */ -#define MAX_PROJECTION_STACK_DEPTH 32 - -/* Maximum texture matrix stack depth: */ -#define MAX_TEXTURE_STACK_DEPTH 10 - -/* Maximum color matrix stack depth: */ -#define MAX_COLOR_STACK_DEPTH 4 - -/* Vertex program matrix stacks: */ -#define MAX_PROGRAM_MATRICES 8 -#define MAX_PROGRAM_STACK_DEPTH 4 - -/* Maximum attribute stack depth: */ -#define MAX_ATTRIB_STACK_DEPTH 16 - -/* Maximum client attribute stack depth: */ -#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16 - -/* Maximum recursion depth of display list calls: */ -#define MAX_LIST_NESTING 64 - -/* Maximum number of lights: */ -#define MAX_LIGHTS 8 - -/* Maximum user-defined clipping planes: */ -#define MAX_CLIP_PLANES 6 - -/* Maximum pixel map lookup table size: */ -#define MAX_PIXEL_MAP_TABLE 256 - -/* Number of auxillary color buffers: */ -#define NUM_AUX_BUFFERS 0 - -/* Maximum order (degree) of curves: */ -#ifdef AMIGA -# define MAX_EVAL_ORDER 12 -#else -# define MAX_EVAL_ORDER 30 -#endif - -/* Maximum Name stack depth */ -#define MAX_NAME_STACK_DEPTH 64 - -/* Min and Max point sizes and granularity */ -#define MIN_POINT_SIZE 1.0 -#define MAX_POINT_SIZE 20.0 -#define POINT_SIZE_GRANULARITY 0.1 - -/* Min and Max line widths and granularity */ -#define MIN_LINE_WIDTH 1.0 -#define MAX_LINE_WIDTH 10.0 -#define LINE_WIDTH_GRANULARITY 0.1 - -/* Max texture palette / color table size */ -#define MAX_COLOR_TABLE_SIZE 256 - -/* Number of 1D/2D texture mipmap levels */ -#define MAX_TEXTURE_LEVELS 12 - -/* Number of 3D texture mipmap levels */ -#define MAX_3D_TEXTURE_LEVELS 8 - -/* Number of cube texture mipmap levels - GL_ARB_texture_cube_map */ -#define MAX_CUBE_TEXTURE_LEVELS 12 - -/* Maximum rectangular texture size - GL_NV_texture_rectangle */ -#define MAX_TEXTURE_RECT_SIZE 2048 - -/* Number of texture units - GL_ARB_multitexture */ -#define MAX_TEXTURE_UNITS 8 - -/* Maximum viewport/image size: */ -#define MAX_WIDTH 2048 -#define MAX_HEIGHT 2048 - -/* Maxmimum size for CVA. May be overridden by the drivers. */ -#define MAX_ARRAY_LOCK_SIZE 3000 - -/* Subpixel precision for antialiasing, window coordinate snapping */ -#define SUB_PIXEL_BITS 4 - -/* Size of histogram tables */ -#define HISTOGRAM_TABLE_SIZE 256 - -/* Max convolution filter sizes */ -#define MAX_CONVOLUTION_WIDTH 9 -#define MAX_CONVOLUTION_HEIGHT 9 - -/* GL_ARB_texture_compression */ -#define MAX_COMPRESSED_TEXTURE_FORMATS 25 - -/* GL_EXT_texture_filter_anisotropic */ -#define MAX_TEXTURE_MAX_ANISOTROPY 16.0 - -/* GL_EXT_texture_lod_bias */ -#define MAX_TEXTURE_LOD_BIAS 4.0 - - - -/* - * Mesa-specific parameters - */ - - -/* - * Bits per accumulation buffer color component: 8, 16 or 32 - */ -#define ACCUM_BITS 16 - - -/* - * Bits per depth buffer value. Any reasonable value up to 31 will - * work. 32 doesn't work because of integer overflow problems in the - * rasterizer code. - */ -#ifndef DEFAULT_SOFTWARE_DEPTH_BITS -#define DEFAULT_SOFTWARE_DEPTH_BITS 16 -#endif -#if DEFAULT_SOFTWARE_DEPTH_BITS <= 16 -#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort -#else -#define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint -#endif - - - -/* - * Bits per stencil value: 8 - */ -#define STENCIL_BITS 8 - - -/* - * Bits per color channel: 8, 16 or 32 - */ -#ifndef CHAN_BITS -#define CHAN_BITS 8 -#endif - - -/* - * Color channel component order - * (changes will almost certainly cause problems at this time) - */ -#define RCOMP 0 -#define GCOMP 1 -#define BCOMP 2 -#define ACOMP 3 - - - -/* - * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1. - */ -#define FEATURE_NV_vertex_program 1 - - -#endif /* CONFIG_H */ Index: xc/extras/Mesa/src/context.c diff -u xc/extras/Mesa/src/context.c:1.19 xc/extras/Mesa/src/context.c:removed --- xc/extras/Mesa/src/context.c:1.19 Mon Dec 1 18:35:03 2003 +++ xc/extras/Mesa/src/context.c Wed Mar 16 21:00:28 2005 @@ -1,2387 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "buffers.h" -#include "clip.h" -#include "colortab.h" -#include "context.h" -#include "dlist.h" -#include "eval.h" -#include "enums.h" -#include "extensions.h" -#include "fog.h" -#include "get.h" -#include "glthread.h" -#include "hash.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "simple_list.h" -#include "state.h" -#include "teximage.h" -#include "texobj.h" -#include "texstate.h" -#include "mtypes.h" -#include "varray.h" -#if FEATURE_NV_vertex_program -#include "vpstate.h" -#endif -#include "vtxfmt.h" -#include "math/m_translate.h" -#include "math/m_matrix.h" -#include "math/m_xform.h" -#include "math/mathmod.h" - - -#if defined(MESA_TRACE) -#include "Trace/tr_context.h" -#include "Trace/tr_wrapper.h" -#endif - -#ifdef USE_SPARC_ASM -#include "SPARC/sparc.h" -#endif - -#ifndef MESA_VERBOSE -int MESA_VERBOSE = 0; -#endif - -#ifndef MESA_DEBUG_FLAGS -int MESA_DEBUG_FLAGS = 0; -#endif - - -static void -free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ); - - -/**********************************************************************/ -/***** OpenGL SI-style interface (new in Mesa 3.5) *****/ -/**********************************************************************/ - -/* Called by window system/device driver (via gc->exports.destroyCurrent()) - * when the rendering context is to be destroyed. - */ -GLboolean -_mesa_destroyContext(__GLcontext *gc) -{ - if (gc) { - _mesa_free_context_data(gc); - _mesa_free(gc); - } - return GL_TRUE; -} - -/* Called by window system/device driver (via gc->exports.loseCurrent()) - * when the rendering context is made non-current. - */ -GLboolean -_mesa_loseCurrent(__GLcontext *gc) -{ - /* XXX unbind context from thread */ - return GL_TRUE; -} - -/* Called by window system/device driver (via gc->exports.makeCurrent()) - * when the rendering context is made current. - */ -GLboolean -_mesa_makeCurrent(__GLcontext *gc) -{ - /* XXX bind context to thread */ - return GL_TRUE; -} - -/* Called by window system/device driver - yadda, yadda, yadda. - * See above comments. - */ -GLboolean -_mesa_shareContext(__GLcontext *gc, __GLcontext *gcShare) -{ - if (gc && gcShare && gc->Shared && gcShare->Shared) { - gc->Shared->RefCount--; - if (gc->Shared->RefCount == 0) { - free_shared_state(gc, gc->Shared); - } - gc->Shared = gcShare->Shared; - gc->Shared->RefCount++; - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - -GLboolean -_mesa_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask) -{ - if (dst && src) { - _mesa_copy_context( src, dst, mask ); - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - -GLboolean -_mesa_forceCurrent(__GLcontext *gc) -{ - return GL_TRUE; -} - -GLboolean -_mesa_notifyResize(__GLcontext *gc) -{ - GLint x, y; - GLuint width, height; - __GLdrawablePrivate *d = gc->imports.getDrawablePrivate(gc); - if (!d || !d->getDrawableSize) - return GL_FALSE; - d->getDrawableSize( d, &x, &y, &width, &height ); - /* update viewport, resize software buffers, etc. */ - return GL_TRUE; -} - -void -_mesa_notifyDestroy(__GLcontext *gc) -{ - /* Called when the context's window/buffer is going to be destroyed. */ - /* Unbind from it. */ -} - -/* Called by window system just before swapping buffers. - * We have to finish any pending rendering. - */ -void -_mesa_notifySwapBuffers(__GLcontext *gc) -{ - FLUSH_VERTICES( gc, 0 ); -} - -struct __GLdispatchStateRec * -_mesa_dispatchExec(__GLcontext *gc) -{ - return NULL; -} - -void -_mesa_beginDispatchOverride(__GLcontext *gc) -{ -} - -void -_mesa_endDispatchOverride(__GLcontext *gc) -{ -} - -/* Setup the exports. The window system will call these functions - * when it needs Mesa to do something. - * NOTE: Device drivers should override these functions! For example, - * the Xlib driver should plug in the XMesa*-style functions into this - * structure. The XMesa-style functions should then call the _mesa_* - * version of these functions. This is an approximation to OO design - * (inheritance and virtual functions). - */ -static void -_mesa_init_default_exports(__GLexports *exports) -{ - exports->destroyContext = _mesa_destroyContext; - exports->loseCurrent = _mesa_loseCurrent; - exports->makeCurrent = _mesa_makeCurrent; - exports->shareContext = _mesa_shareContext; - exports->copyContext = _mesa_copyContext; - exports->forceCurrent = _mesa_forceCurrent; - exports->notifyResize = _mesa_notifyResize; - exports->notifyDestroy = _mesa_notifyDestroy; - exports->notifySwapBuffers = _mesa_notifySwapBuffers; - exports->dispatchExec = _mesa_dispatchExec; - exports->beginDispatchOverride = _mesa_beginDispatchOverride; - exports->endDispatchOverride = _mesa_endDispatchOverride; -} - - - -/* exported OpenGL SI interface */ -__GLcontext * -__glCoreCreateContext(__GLimports *imports, __GLcontextModes *modes) -{ - GLcontext *ctx; - - ctx = (GLcontext *) (*imports->calloc)(NULL, 1, sizeof(GLcontext)); - if (ctx == NULL) { - return NULL; - } - - _mesa_initialize_context(ctx, modes, NULL, imports, GL_FALSE); - ctx->imports = *imports; - - return ctx; -} - - -/* exported OpenGL SI interface */ -void -__glCoreNopDispatch(void) -{ -#if 0 - /* SI */ - __gl_dispatch = __glNopDispatchState; -#else - /* Mesa */ - _glapi_set_dispatch(NULL); -#endif -} - - -/**********************************************************************/ -/***** GL Visual allocation/destruction *****/ -/**********************************************************************/ - - -/* - * Allocate a new GLvisual object. - * Input: rgbFlag - GL_TRUE=RGB(A) mode, GL_FALSE=Color Index mode - * dbFlag - double buffering? - * stereoFlag - stereo buffer? - * depthBits - requested bits per depth buffer value - * Any value in [0, 32] is acceptable but the actual - * depth type will be GLushort or GLuint as needed. - * stencilBits - requested minimum bits per stencil buffer value - * accumBits - requested minimum bits per accum buffer component - * indexBits - number of bits per pixel if rgbFlag==GL_FALSE - * red/green/blue/alphaBits - number of bits per color component - * in frame buffer for RGB(A) mode. - * We always use 8 in core Mesa though. - * Return: pointer to new GLvisual or NULL if requested parameters can't - * be met. - */ -GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint indexBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ) -{ - GLvisual *vis = (GLvisual *) CALLOC( sizeof(GLvisual) ); - if (vis) { - if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag, - redBits, greenBits, blueBits, alphaBits, - indexBits, depthBits, stencilBits, - accumRedBits, accumGreenBits, - accumBlueBits, accumAlphaBits, - numSamples)) { - FREE(vis); - return NULL; - } - } - return vis; -} - - -/* - * Initialize the fields of the given GLvisual. - * Input: see _mesa_create_visual() above. - * Return: GL_TRUE = success - * GL_FALSE = failure. - */ -GLboolean -_mesa_initialize_visual( GLvisual *vis, - GLboolean rgbFlag, - GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint indexBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ) -{ - (void) numSamples; - - assert(vis); - - /* This is to catch bad values from device drivers not updated for - * Mesa 3.3. Some device drivers just passed 1. That's a REALLY - * bad value now (a 1-bit depth buffer!?!). - */ - assert(depthBits == 0 || depthBits > 1); - - if (depthBits < 0 || depthBits > 32) { - return GL_FALSE; - } - if (stencilBits < 0 || stencilBits > (GLint) (8 * sizeof(GLstencil))) { - return GL_FALSE; - } - if (accumRedBits < 0 || accumRedBits > (GLint) (8 * sizeof(GLaccum))) { - return GL_FALSE; - } - if (accumGreenBits < 0 || accumGreenBits > (GLint) (8 * sizeof(GLaccum))) { - return GL_FALSE; - } - if (accumBlueBits < 0 || accumBlueBits > (GLint) (8 * sizeof(GLaccum))) { - return GL_FALSE; - } - if (accumAlphaBits < 0 || accumAlphaBits > (GLint) (8 * sizeof(GLaccum))) { - return GL_FALSE; - } - - vis->rgbMode = rgbFlag; - vis->doubleBufferMode = dbFlag; - vis->stereoMode = stereoFlag; - - vis->redBits = redBits; - vis->greenBits = greenBits; - vis->blueBits = blueBits; - vis->alphaBits = alphaBits; - - vis->indexBits = indexBits; - vis->depthBits = depthBits; - vis->accumRedBits = (accumRedBits > 0) ? (8 * sizeof(GLaccum)) : 0; - vis->accumGreenBits = (accumGreenBits > 0) ? (8 * sizeof(GLaccum)) : 0; - vis->accumBlueBits = (accumBlueBits > 0) ? (8 * sizeof(GLaccum)) : 0; - vis->accumAlphaBits = (accumAlphaBits > 0) ? (8 * sizeof(GLaccum)) : 0; - vis->stencilBits = (stencilBits > 0) ? (8 * sizeof(GLstencil)) : 0; - - vis->haveAccumBuffer = accumRedBits > 0; - vis->haveDepthBuffer = depthBits > 0; - vis->haveStencilBuffer = stencilBits > 0; - - vis->numAuxBuffers = 0; - vis->level = 0; - vis->pixmapMode = 0; - - return GL_TRUE; -} - - -void -_mesa_destroy_visual( GLvisual *vis ) -{ - FREE(vis); -} - - -/**********************************************************************/ -/***** GL Framebuffer allocation/destruction *****/ -/**********************************************************************/ - - -/* - * Create a new framebuffer. A GLframebuffer is a struct which - * encapsulates the depth, stencil and accum buffers and related - * parameters. - * Input: visual - a GLvisual pointer (we copy the struct contents) - * softwareDepth - create/use a software depth buffer? - * softwareStencil - create/use a software stencil buffer? - * softwareAccum - create/use a software accum buffer? - * softwareAlpha - create/use a software alpha buffer? - * Return: pointer to new GLframebuffer struct or NULL if error. - */ -GLframebuffer * -_mesa_create_framebuffer( const GLvisual *visual, - GLboolean softwareDepth, - GLboolean softwareStencil, - GLboolean softwareAccum, - GLboolean softwareAlpha ) -{ - GLframebuffer *buffer = CALLOC_STRUCT(gl_frame_buffer); - assert(visual); - if (buffer) { - _mesa_initialize_framebuffer(buffer, visual, - softwareDepth, softwareStencil, - softwareAccum, softwareAlpha ); - } - return buffer; -} - - -/* - * Initialize a GLframebuffer object. - * Input: See _mesa_create_framebuffer() above. - */ -void -_mesa_initialize_framebuffer( GLframebuffer *buffer, - const GLvisual *visual, - GLboolean softwareDepth, - GLboolean softwareStencil, - GLboolean softwareAccum, - GLboolean softwareAlpha ) -{ - assert(buffer); - assert(visual); - - _mesa_bzero(buffer, sizeof(GLframebuffer)); - - /* sanity checks */ - if (softwareDepth ) { - assert(visual->depthBits > 0); - } - if (softwareStencil) { - assert(visual->stencilBits > 0); - } - if (softwareAccum) { - assert(visual->rgbMode); - assert(visual->accumRedBits > 0); - assert(visual->accumGreenBits > 0); - assert(visual->accumBlueBits > 0); - } - if (softwareAlpha) { - assert(visual->rgbMode); - assert(visual->alphaBits > 0); - } - - buffer->Visual = *visual; - buffer->UseSoftwareDepthBuffer = softwareDepth; - buffer->UseSoftwareStencilBuffer = softwareStencil; - buffer->UseSoftwareAccumBuffer = softwareAccum; - buffer->UseSoftwareAlphaBuffers = softwareAlpha; -} - - -/* - * Free a framebuffer struct and its buffers. - */ -void -_mesa_destroy_framebuffer( GLframebuffer *buffer ) -{ - if (buffer) { - _mesa_free_framebuffer_data(buffer); - FREE(buffer); - } -} - - -/* - * Free the data hanging off of , but not itself. - */ -void -_mesa_free_framebuffer_data( GLframebuffer *buffer ) -{ - if (!buffer) - return; - - if (buffer->DepthBuffer) { - MESA_PBUFFER_FREE( buffer->DepthBuffer ); - buffer->DepthBuffer = NULL; - } - if (buffer->Accum) { - MESA_PBUFFER_FREE( buffer->Accum ); - buffer->Accum = NULL; - } - if (buffer->Stencil) { - MESA_PBUFFER_FREE( buffer->Stencil ); - buffer->Stencil = NULL; - } - if (buffer->FrontLeftAlpha) { - MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); - buffer->FrontLeftAlpha = NULL; - } - if (buffer->BackLeftAlpha) { - MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); - buffer->BackLeftAlpha = NULL; - } - if (buffer->FrontRightAlpha) { - MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); - buffer->FrontRightAlpha = NULL; - } - if (buffer->BackRightAlpha) { - MESA_PBUFFER_FREE( buffer->BackRightAlpha ); - buffer->BackRightAlpha = NULL; - } -} - - - -/**********************************************************************/ -/***** Context allocation, initialization, destroying *****/ -/**********************************************************************/ - - -_glthread_DECLARE_STATIC_MUTEX(OneTimeLock); - - -/* - * This function just calls all the various one-time-init functions in Mesa. - */ -static void -one_time_init( GLcontext *ctx ) -{ - static GLboolean alreadyCalled = GL_FALSE; - _glthread_LOCK_MUTEX(OneTimeLock); - if (!alreadyCalled) { - /* do some implementation tests */ - assert( sizeof(GLbyte) == 1 ); - assert( sizeof(GLshort) >= 2 ); - assert( sizeof(GLint) >= 4 ); - assert( sizeof(GLubyte) == 1 ); - assert( sizeof(GLushort) >= 2 ); - assert( sizeof(GLuint) >= 4 ); - - _mesa_init_lists(); - - _math_init(); - _mesa_init_math(); - -#ifdef USE_SPARC_ASM - _mesa_init_sparc_glapi_relocs(); -#endif - if (_mesa_getenv("MESA_DEBUG")) { - _glapi_noop_enable_warnings(GL_TRUE); -#ifndef GLX_DIRECT_RENDERING - /* libGL from before 2002/06/28 don't have this function. Someday, - * when newer libGL libs are common, remove the #ifdef test. This - * only serves to print warnings when calling undefined GL functions. - */ - _glapi_set_warning_func( (_glapi_warning_func) _mesa_warning ); -#endif - } - else { - _glapi_noop_enable_warnings(GL_FALSE); - } - -#if defined(DEBUG) && defined(__DATE__) && defined(__TIME__) - _mesa_debug(ctx, "Mesa DEBUG build %s %s\n", __DATE__, __TIME__); -#endif - - alreadyCalled = GL_TRUE; - } - _glthread_UNLOCK_MUTEX(OneTimeLock); -} - - -static void -init_matrix_stack( struct matrix_stack *stack, - GLuint maxDepth, GLuint dirtyFlag ) -{ - GLuint i; - - stack->Depth = 0; - stack->MaxDepth = maxDepth; - stack->DirtyFlag = dirtyFlag; - /* The stack */ - stack->Stack = (GLmatrix *) CALLOC(maxDepth * sizeof(GLmatrix)); - for (i = 0; i < maxDepth; i++) { - _math_matrix_ctr(&stack->Stack[i]); - _math_matrix_alloc_inv(&stack->Stack[i]); - } - stack->Top = stack->Stack; -} - - -static void -free_matrix_stack( struct matrix_stack *stack ) -{ - GLuint i; - for (i = 0; i < stack->MaxDepth; i++) { - _math_matrix_dtr(&stack->Stack[i]); - } - FREE(stack->Stack); - stack->Stack = stack->Top = NULL; -} - - -/* - * Allocate and initialize a shared context state structure. - */ -static struct gl_shared_state * -alloc_shared_state( void ) -{ - struct gl_shared_state *ss; - GLboolean outOfMemory; - - ss = CALLOC_STRUCT(gl_shared_state); - if (!ss) - return NULL; - - _glthread_INIT_MUTEX(ss->Mutex); - - ss->DisplayList = _mesa_NewHashTable(); - ss->TexObjects = _mesa_NewHashTable(); -#if FEATURE_NV_vertex_program - ss->VertexPrograms = _mesa_NewHashTable(); -#endif - - /* Default Texture objects */ - outOfMemory = GL_FALSE; - - ss->Default1D = _mesa_alloc_texture_object(ss, 0, GL_TEXTURE_1D); - if (!ss->Default1D) { - outOfMemory = GL_TRUE; - } - - ss->Default2D = _mesa_alloc_texture_object(ss, 0, GL_TEXTURE_2D); - if (!ss->Default2D) { - outOfMemory = GL_TRUE; - } - - ss->Default3D = _mesa_alloc_texture_object(ss, 0, GL_TEXTURE_3D); - if (!ss->Default3D) { - outOfMemory = GL_TRUE; - } - - ss->DefaultCubeMap = _mesa_alloc_texture_object(ss, 0, - GL_TEXTURE_CUBE_MAP_ARB); - if (!ss->DefaultCubeMap) { - outOfMemory = GL_TRUE; - } - - ss->DefaultRect = _mesa_alloc_texture_object(ss, 0, - GL_TEXTURE_RECTANGLE_NV); - if (!ss->DefaultRect) { - outOfMemory = GL_TRUE; - } - - if (!ss->DisplayList || !ss->TexObjects -#if FEATURE_NV_vertex_program - || !ss->VertexPrograms -#endif - || outOfMemory) { - /* Ran out of memory at some point. Free everything and return NULL */ - if (ss->DisplayList) - _mesa_DeleteHashTable(ss->DisplayList); - if (ss->TexObjects) - _mesa_DeleteHashTable(ss->TexObjects); - if (ss->VertexPrograms) - _mesa_DeleteHashTable(ss->VertexPrograms); - if (ss->Default1D) - _mesa_free_texture_object(ss, ss->Default1D); - if (ss->Default2D) - _mesa_free_texture_object(ss, ss->Default2D); - if (ss->Default3D) - _mesa_free_texture_object(ss, ss->Default3D); - if (ss->DefaultCubeMap) - _mesa_free_texture_object(ss, ss->DefaultCubeMap); - if (ss->DefaultRect) - _mesa_free_texture_object(ss, ss->DefaultRect); - FREE(ss); - return NULL; - } - else { - return ss; - } -} - - -/* - * Deallocate a shared state context and all children structures. - */ -static void -free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) -{ - /* Free display lists */ - while (1) { - GLuint list = _mesa_HashFirstEntry(ss->DisplayList); - if (list) { - _mesa_destroy_list(ctx, list); - } - else { - break; - } - } - _mesa_DeleteHashTable(ss->DisplayList); - - /* Free texture objects */ - while (ss->TexObjectList) { - if (ctx->Driver.DeleteTexture) - (*ctx->Driver.DeleteTexture)( ctx, ss->TexObjectList ); - /* this function removes from linked list too! */ - _mesa_free_texture_object(ss, ss->TexObjectList); - } - _mesa_DeleteHashTable(ss->TexObjects); - -#if FEATURE_NV_vertex_program - /* Free vertex programs */ - while (1) { - GLuint prog = _mesa_HashFirstEntry(ss->VertexPrograms); - if (prog) { - _mesa_delete_program(ctx, prog); - } - else { - break; - } - } - _mesa_DeleteHashTable(ss->VertexPrograms); -#endif - - _glthread_DESTROY_MUTEX(ss->Mutex); - - FREE(ss); -} - - - -/* - * Initialize the nth light. Note that the defaults for light 0 are - * different than the other lights. - */ -static void -init_light( struct gl_light *l, GLuint n ) -{ - make_empty_list( l ); - - ASSIGN_4V( l->Ambient, 0.0, 0.0, 0.0, 1.0 ); - if (n==0) { - ASSIGN_4V( l->Diffuse, 1.0, 1.0, 1.0, 1.0 ); - ASSIGN_4V( l->Specular, 1.0, 1.0, 1.0, 1.0 ); - } - else { - ASSIGN_4V( l->Diffuse, 0.0, 0.0, 0.0, 1.0 ); - ASSIGN_4V( l->Specular, 0.0, 0.0, 0.0, 1.0 ); - } - ASSIGN_4V( l->EyePosition, 0.0, 0.0, 1.0, 0.0 ); - ASSIGN_3V( l->EyeDirection, 0.0, 0.0, -1.0 ); - l->SpotExponent = 0.0; - _mesa_invalidate_spot_exp_table( l ); - l->SpotCutoff = 180.0; - l->_CosCutoff = 0.0; /* KW: -ve values not admitted */ - l->ConstantAttenuation = 1.0; - l->LinearAttenuation = 0.0; - l->QuadraticAttenuation = 0.0; - l->Enabled = GL_FALSE; -} - - - -static void -init_lightmodel( struct gl_lightmodel *lm ) -{ - ASSIGN_4V( lm->Ambient, 0.2F, 0.2F, 0.2F, 1.0F ); - lm->LocalViewer = GL_FALSE; - lm->TwoSide = GL_FALSE; - lm->ColorControl = GL_SINGLE_COLOR; -} - - -static void -init_material( struct gl_material *m ) -{ - ASSIGN_4V( m->Ambient, 0.2F, 0.2F, 0.2F, 1.0F ); - ASSIGN_4V( m->Diffuse, 0.8F, 0.8F, 0.8F, 1.0F ); - ASSIGN_4V( m->Specular, 0.0F, 0.0F, 0.0F, 1.0F ); - ASSIGN_4V( m->Emission, 0.0F, 0.0F, 0.0F, 1.0F ); - m->Shininess = 0.0; - m->AmbientIndex = 0; - m->DiffuseIndex = 1; - m->SpecularIndex = 1; -} - - - -static void -init_texture_unit( GLcontext *ctx, GLuint unit ) -{ - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - - texUnit->EnvMode = GL_MODULATE; - texUnit->CombineModeRGB = GL_MODULATE; - texUnit->CombineModeA = GL_MODULATE; - texUnit->CombineSourceRGB[0] = GL_TEXTURE; - texUnit->CombineSourceRGB[1] = GL_PREVIOUS_EXT; - texUnit->CombineSourceRGB[2] = GL_CONSTANT_EXT; - texUnit->CombineSourceA[0] = GL_TEXTURE; - texUnit->CombineSourceA[1] = GL_PREVIOUS_EXT; - texUnit->CombineSourceA[2] = GL_CONSTANT_EXT; - texUnit->CombineOperandRGB[0] = GL_SRC_COLOR; - texUnit->CombineOperandRGB[1] = GL_SRC_COLOR; - texUnit->CombineOperandRGB[2] = GL_SRC_ALPHA; - texUnit->CombineOperandA[0] = GL_SRC_ALPHA; - texUnit->CombineOperandA[1] = GL_SRC_ALPHA; - texUnit->CombineOperandA[2] = GL_SRC_ALPHA; - texUnit->CombineScaleShiftRGB = 0; - texUnit->CombineScaleShiftA = 0; - - ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 ); - texUnit->TexGenEnabled = 0; - texUnit->GenModeS = GL_EYE_LINEAR; - texUnit->GenModeT = GL_EYE_LINEAR; - texUnit->GenModeR = GL_EYE_LINEAR; - texUnit->GenModeQ = GL_EYE_LINEAR; - texUnit->_GenBitS = TEXGEN_EYE_LINEAR; - texUnit->_GenBitT = TEXGEN_EYE_LINEAR; - texUnit->_GenBitR = TEXGEN_EYE_LINEAR; - texUnit->_GenBitQ = TEXGEN_EYE_LINEAR; - - /* Yes, these plane coefficients are correct! */ - ASSIGN_4V( texUnit->ObjectPlaneS, 1.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->ObjectPlaneT, 0.0, 1.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->ObjectPlaneR, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->ObjectPlaneQ, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->EyePlaneS, 1.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->EyePlaneT, 0.0, 1.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->EyePlaneR, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->EyePlaneQ, 0.0, 0.0, 0.0, 0.0 ); - - texUnit->Current1D = ctx->Shared->Default1D; - texUnit->Current2D = ctx->Shared->Default2D; - texUnit->Current3D = ctx->Shared->Default3D; - texUnit->CurrentCubeMap = ctx->Shared->DefaultCubeMap; - texUnit->CurrentRect = ctx->Shared->DefaultRect; -} - - - - -/* Initialize a 1-D evaluator map */ -static void -init_1d_map( struct gl_1d_map *map, int n, const float *initial ) -{ - map->Order = 1; - map->u1 = 0.0; - map->u2 = 1.0; - map->Points = (GLfloat *) MALLOC(n * sizeof(GLfloat)); - if (map->Points) { - GLint i; - for (i=0;iPoints[i] = initial[i]; - } -} - - -/* Initialize a 2-D evaluator map */ -static void -init_2d_map( struct gl_2d_map *map, int n, const float *initial ) -{ - map->Uorder = 1; - map->Vorder = 1; - map->u1 = 0.0; - map->u2 = 1.0; - map->v1 = 0.0; - map->v2 = 1.0; - map->Points = (GLfloat *) MALLOC(n * sizeof(GLfloat)); - if (map->Points) { - GLint i; - for (i=0;iPoints[i] = initial[i]; - } -} - - -/* - * Initialize the attribute groups in a GLcontext. - */ -static void -init_attrib_groups( GLcontext *ctx ) -{ - GLuint i; - - assert(ctx); - - assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS); - assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS); - - /* Constants, may be overriden by device drivers */ - ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS; - ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS; - ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS; - ctx->Const.MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE; - ctx->Const.MaxTextureUnits = MAX_TEXTURE_UNITS; - ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY; - ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS; - ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE; - ctx->Const.SubPixelBits = SUB_PIXEL_BITS; - ctx->Const.MinPointSize = MIN_POINT_SIZE; - ctx->Const.MaxPointSize = MAX_POINT_SIZE; - ctx->Const.MinPointSizeAA = MIN_POINT_SIZE; - ctx->Const.MaxPointSizeAA = MAX_POINT_SIZE; - ctx->Const.PointSizeGranularity = (GLfloat) POINT_SIZE_GRANULARITY; - ctx->Const.MinLineWidth = MIN_LINE_WIDTH; - ctx->Const.MaxLineWidth = MAX_LINE_WIDTH; - ctx->Const.MinLineWidthAA = MIN_LINE_WIDTH; - ctx->Const.MaxLineWidthAA = MAX_LINE_WIDTH; - ctx->Const.LineWidthGranularity = (GLfloat) LINE_WIDTH_GRANULARITY; - ctx->Const.NumAuxBuffers = NUM_AUX_BUFFERS; - ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE; - ctx->Const.MaxConvolutionWidth = MAX_CONVOLUTION_WIDTH; - ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT; - ctx->Const.MaxClipPlanes = MAX_CLIP_PLANES; - ctx->Const.MaxLights = MAX_LIGHTS; - - /* Initialize matrix stacks */ - init_matrix_stack(&ctx->ModelviewMatrixStack, MAX_MODELVIEW_STACK_DEPTH, - _NEW_MODELVIEW); - init_matrix_stack(&ctx->ProjectionMatrixStack, MAX_PROJECTION_STACK_DEPTH, - _NEW_PROJECTION); - init_matrix_stack(&ctx->ColorMatrixStack, MAX_COLOR_STACK_DEPTH, - _NEW_COLOR_MATRIX); - for (i = 0; i < MAX_TEXTURE_UNITS; i++) - init_matrix_stack(&ctx->TextureMatrixStack[i], MAX_TEXTURE_STACK_DEPTH, - _NEW_TEXTURE_MATRIX); - for (i = 0; i < MAX_PROGRAM_MATRICES; i++) - init_matrix_stack(&ctx->ProgramMatrixStack[i], MAX_PROGRAM_STACK_DEPTH, - _NEW_TRACK_MATRIX); - ctx->CurrentStack = &ctx->ModelviewMatrixStack; - - /* Init combined Modelview*Projection matrix */ - _math_matrix_ctr( &ctx->_ModelProjectMatrix ); - - /* Accumulate buffer group */ - ASSIGN_4V( ctx->Accum.ClearColor, 0.0, 0.0, 0.0, 0.0 ); - - /* Color buffer group */ - ctx->Color.IndexMask = 0xffffffff; - ctx->Color.ColorMask[0] = 0xff; - ctx->Color.ColorMask[1] = 0xff; - ctx->Color.ColorMask[2] = 0xff; - ctx->Color.ColorMask[3] = 0xff; - ctx->Color.ClearIndex = 0; - ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 ); - ctx->Color.DrawBuffer = GL_FRONT; - ctx->Color.AlphaEnabled = GL_FALSE; - ctx->Color.AlphaFunc = GL_ALWAYS; - ctx->Color.AlphaRef = 0; - ctx->Color.BlendEnabled = GL_FALSE; - ctx->Color.BlendSrcRGB = GL_ONE; - ctx->Color.BlendDstRGB = GL_ZERO; - ctx->Color.BlendSrcA = GL_ONE; - ctx->Color.BlendDstA = GL_ZERO; - ctx->Color.BlendEquation = GL_FUNC_ADD_EXT; - ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 ); - ctx->Color.IndexLogicOpEnabled = GL_FALSE; - ctx->Color.ColorLogicOpEnabled = GL_FALSE; - ctx->Color._LogicOpEnabled = GL_FALSE; - ctx->Color.LogicOp = GL_COPY; - ctx->Color.DitherFlag = GL_TRUE; - - /* Current group */ - for (i = 0; i < VERT_ATTRIB_MAX; i++) { - ASSIGN_4V( ctx->Current.Attrib[i], 0.0, 0.0, 0.0, 1.0 ); - } - /* special cases: */ - ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 1.0 ); - ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 ); - ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 ); - ctx->Current.Index = 1; - ctx->Current.EdgeFlag = GL_TRUE; - - ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 ); - ctx->Current.RasterDistance = 0.0; - ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 ); - ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 0.0 ); - ctx->Current.RasterIndex = 1; - for (i=0; iCurrent.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 ); - ctx->Current.RasterPosValid = GL_TRUE; - - - /* Depth buffer group */ - ctx->Depth.Test = GL_FALSE; - ctx->Depth.Clear = 1.0; - ctx->Depth.Func = GL_LESS; - ctx->Depth.Mask = GL_TRUE; - ctx->Depth.OcclusionTest = GL_FALSE; - - /* Evaluators group */ - ctx->Eval.Map1Color4 = GL_FALSE; - ctx->Eval.Map1Index = GL_FALSE; - ctx->Eval.Map1Normal = GL_FALSE; - ctx->Eval.Map1TextureCoord1 = GL_FALSE; - ctx->Eval.Map1TextureCoord2 = GL_FALSE; - ctx->Eval.Map1TextureCoord3 = GL_FALSE; - ctx->Eval.Map1TextureCoord4 = GL_FALSE; - ctx->Eval.Map1Vertex3 = GL_FALSE; - ctx->Eval.Map1Vertex4 = GL_FALSE; - MEMSET(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib)); - ctx->Eval.Map2Color4 = GL_FALSE; - ctx->Eval.Map2Index = GL_FALSE; - ctx->Eval.Map2Normal = GL_FALSE; - ctx->Eval.Map2TextureCoord1 = GL_FALSE; - ctx->Eval.Map2TextureCoord2 = GL_FALSE; - ctx->Eval.Map2TextureCoord3 = GL_FALSE; - ctx->Eval.Map2TextureCoord4 = GL_FALSE; - ctx->Eval.Map2Vertex3 = GL_FALSE; - ctx->Eval.Map2Vertex4 = GL_FALSE; - MEMSET(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib)); - ctx->Eval.AutoNormal = GL_FALSE; - ctx->Eval.MapGrid1un = 1; - ctx->Eval.MapGrid1u1 = 0.0; - ctx->Eval.MapGrid1u2 = 1.0; - ctx->Eval.MapGrid2un = 1; - ctx->Eval.MapGrid2vn = 1; - ctx->Eval.MapGrid2u1 = 0.0; - ctx->Eval.MapGrid2u2 = 1.0; - ctx->Eval.MapGrid2v1 = 0.0; - ctx->Eval.MapGrid2v2 = 1.0; - - /* Evaluator data */ - { - static GLfloat vertex[4] = { 0.0, 0.0, 0.0, 1.0 }; - static GLfloat normal[3] = { 0.0, 0.0, 1.0 }; - static GLfloat index[1] = { 1.0 }; - static GLfloat color[4] = { 1.0, 1.0, 1.0, 1.0 }; - static GLfloat texcoord[4] = { 0.0, 0.0, 0.0, 1.0 }; - static GLfloat attrib[4] = { 0.0, 0.0, 0.0, 1.0 }; - - init_1d_map( &ctx->EvalMap.Map1Vertex3, 3, vertex ); - init_1d_map( &ctx->EvalMap.Map1Vertex4, 4, vertex ); - init_1d_map( &ctx->EvalMap.Map1Index, 1, index ); - init_1d_map( &ctx->EvalMap.Map1Color4, 4, color ); - init_1d_map( &ctx->EvalMap.Map1Normal, 3, normal ); - init_1d_map( &ctx->EvalMap.Map1Texture1, 1, texcoord ); - init_1d_map( &ctx->EvalMap.Map1Texture2, 2, texcoord ); - init_1d_map( &ctx->EvalMap.Map1Texture3, 3, texcoord ); - init_1d_map( &ctx->EvalMap.Map1Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_1d_map( ctx->EvalMap.Map1Attrib + i, 4, attrib ); - - init_2d_map( &ctx->EvalMap.Map2Vertex3, 3, vertex ); - init_2d_map( &ctx->EvalMap.Map2Vertex4, 4, vertex ); - init_2d_map( &ctx->EvalMap.Map2Index, 1, index ); - init_2d_map( &ctx->EvalMap.Map2Color4, 4, color ); - init_2d_map( &ctx->EvalMap.Map2Normal, 3, normal ); - init_2d_map( &ctx->EvalMap.Map2Texture1, 1, texcoord ); - init_2d_map( &ctx->EvalMap.Map2Texture2, 2, texcoord ); - init_2d_map( &ctx->EvalMap.Map2Texture3, 3, texcoord ); - init_2d_map( &ctx->EvalMap.Map2Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_2d_map( ctx->EvalMap.Map2Attrib + i, 4, attrib ); - } - - /* Fog group */ - ctx->Fog.Enabled = GL_FALSE; - ctx->Fog.Mode = GL_EXP; - ASSIGN_4V( ctx->Fog.Color, 0.0, 0.0, 0.0, 0.0 ); - ctx->Fog.Index = 0.0; - ctx->Fog.Density = 1.0; - ctx->Fog.Start = 0.0; - ctx->Fog.End = 1.0; - ctx->Fog.ColorSumEnabled = GL_FALSE; - ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT; - - /* Hint group */ - ctx->Hint.PerspectiveCorrection = GL_DONT_CARE; - ctx->Hint.PointSmooth = GL_DONT_CARE; - ctx->Hint.LineSmooth = GL_DONT_CARE; - ctx->Hint.PolygonSmooth = GL_DONT_CARE; - ctx->Hint.Fog = GL_DONT_CARE; - ctx->Hint.ClipVolumeClipping = GL_DONT_CARE; - ctx->Hint.TextureCompression = GL_DONT_CARE; - ctx->Hint.GenerateMipmap = GL_DONT_CARE; - - /* Histogram group */ - ctx->Histogram.Width = 0; - ctx->Histogram.Format = GL_RGBA; - ctx->Histogram.Sink = GL_FALSE; - ctx->Histogram.RedSize = 0; - ctx->Histogram.GreenSize = 0; - ctx->Histogram.BlueSize = 0; - ctx->Histogram.AlphaSize = 0; - ctx->Histogram.LuminanceSize = 0; - for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) { - ctx->Histogram.Count[i][0] = 0; - ctx->Histogram.Count[i][1] = 0; - ctx->Histogram.Count[i][2] = 0; - ctx->Histogram.Count[i][3] = 0; - } - - /* Min/Max group */ - ctx->MinMax.Format = GL_RGBA; - ctx->MinMax.Sink = GL_FALSE; - ctx->MinMax.Min[RCOMP] = 1000; ctx->MinMax.Max[RCOMP] = -1000; - ctx->MinMax.Min[GCOMP] = 1000; ctx->MinMax.Max[GCOMP] = -1000; - ctx->MinMax.Min[BCOMP] = 1000; ctx->MinMax.Max[BCOMP] = -1000; - ctx->MinMax.Min[ACOMP] = 1000; ctx->MinMax.Max[ACOMP] = -1000; - - /* Extensions */ - _mesa_extensions_ctr( ctx ); - - /* Lighting group */ - for (i=0;iLight.Light[i], i ); - } - make_empty_list( &ctx->Light.EnabledList ); - - init_lightmodel( &ctx->Light.Model ); - init_material( &ctx->Light.Material[0] ); - init_material( &ctx->Light.Material[1] ); - ctx->Light.ShadeModel = GL_SMOOTH; - ctx->Light.Enabled = GL_FALSE; - ctx->Light.ColorMaterialFace = GL_FRONT_AND_BACK; - ctx->Light.ColorMaterialMode = GL_AMBIENT_AND_DIFFUSE; - ctx->Light.ColorMaterialBitmask = _mesa_material_bitmask( ctx, - GL_FRONT_AND_BACK, - GL_AMBIENT_AND_DIFFUSE, ~0, 0 ); - - ctx->Light.ColorMaterialEnabled = GL_FALSE; - - /* Lighting miscellaneous */ - ctx->_ShineTabList = MALLOC_STRUCT( gl_shine_tab ); - make_empty_list( ctx->_ShineTabList ); - for (i = 0 ; i < 10 ; i++) { - struct gl_shine_tab *s = MALLOC_STRUCT( gl_shine_tab ); - s->shininess = -1; - s->refcount = 0; - insert_at_tail( ctx->_ShineTabList, s ); - } - - - /* Line group */ - ctx->Line.SmoothFlag = GL_FALSE; - ctx->Line.StippleFlag = GL_FALSE; - ctx->Line.Width = 1.0; - ctx->Line._Width = 1.0; - ctx->Line.StipplePattern = 0xffff; - ctx->Line.StippleFactor = 1; - - /* Display List group */ - ctx->List.ListBase = 0; - - /* Multisample */ - ctx->Multisample.Enabled = GL_FALSE; - ctx->Multisample.SampleAlphaToCoverage = GL_FALSE; - ctx->Multisample.SampleAlphaToOne = GL_FALSE; - ctx->Multisample.SampleCoverage = GL_FALSE; - ctx->Multisample.SampleCoverageValue = 1.0; - ctx->Multisample.SampleCoverageInvert = GL_FALSE; - - /* Pixel group */ - ctx->Pixel.RedBias = 0.0; - ctx->Pixel.RedScale = 1.0; - ctx->Pixel.GreenBias = 0.0; - ctx->Pixel.GreenScale = 1.0; - ctx->Pixel.BlueBias = 0.0; - ctx->Pixel.BlueScale = 1.0; - ctx->Pixel.AlphaBias = 0.0; - ctx->Pixel.AlphaScale = 1.0; - ctx->Pixel.DepthBias = 0.0; - ctx->Pixel.DepthScale = 1.0; - ctx->Pixel.IndexOffset = 0; - ctx->Pixel.IndexShift = 0; - ctx->Pixel.ZoomX = 1.0; - ctx->Pixel.ZoomY = 1.0; - ctx->Pixel.MapColorFlag = GL_FALSE; - ctx->Pixel.MapStencilFlag = GL_FALSE; - ctx->Pixel.MapStoSsize = 1; - ctx->Pixel.MapItoIsize = 1; - ctx->Pixel.MapItoRsize = 1; - ctx->Pixel.MapItoGsize = 1; - ctx->Pixel.MapItoBsize = 1; - ctx->Pixel.MapItoAsize = 1; - ctx->Pixel.MapRtoRsize = 1; - ctx->Pixel.MapGtoGsize = 1; - ctx->Pixel.MapBtoBsize = 1; - ctx->Pixel.MapAtoAsize = 1; - ctx->Pixel.MapStoS[0] = 0; - ctx->Pixel.MapItoI[0] = 0; - ctx->Pixel.MapItoR[0] = 0.0; - ctx->Pixel.MapItoG[0] = 0.0; - ctx->Pixel.MapItoB[0] = 0.0; - ctx->Pixel.MapItoA[0] = 0.0; - ctx->Pixel.MapItoR8[0] = 0; - ctx->Pixel.MapItoG8[0] = 0; - ctx->Pixel.MapItoB8[0] = 0; - ctx->Pixel.MapItoA8[0] = 0; - ctx->Pixel.MapRtoR[0] = 0.0; - ctx->Pixel.MapGtoG[0] = 0.0; - ctx->Pixel.MapBtoB[0] = 0.0; - ctx->Pixel.MapAtoA[0] = 0.0; - ctx->Pixel.HistogramEnabled = GL_FALSE; - ctx->Pixel.MinMaxEnabled = GL_FALSE; - ctx->Pixel.PixelTextureEnabled = GL_FALSE; - ctx->Pixel.FragmentRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - ctx->Pixel.FragmentAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; - ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(ctx->Pixel.ColorTableScale, 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.ColorTableBias, 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(ctx->Pixel.PCCTscale, 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.PCCTbias, 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(ctx->Pixel.PCMCTscale, 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.PCMCTbias, 0.0, 0.0, 0.0, 0.0); - ctx->Pixel.ColorTableEnabled = GL_FALSE; - ctx->Pixel.PostConvolutionColorTableEnabled = GL_FALSE; - ctx->Pixel.PostColorMatrixColorTableEnabled = GL_FALSE; - ctx->Pixel.Convolution1DEnabled = GL_FALSE; - ctx->Pixel.Convolution2DEnabled = GL_FALSE; - ctx->Pixel.Separable2DEnabled = GL_FALSE; - for (i = 0; i < 3; i++) { - ASSIGN_4V(ctx->Pixel.ConvolutionBorderColor[i], 0.0, 0.0, 0.0, 0.0); - ctx->Pixel.ConvolutionBorderMode[i] = GL_REDUCE; - ASSIGN_4V(ctx->Pixel.ConvolutionFilterScale[i], 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.ConvolutionFilterBias[i], 0.0, 0.0, 0.0, 0.0); - } - for (i = 0; i < MAX_CONVOLUTION_WIDTH * MAX_CONVOLUTION_WIDTH * 4; i++) { - ctx->Convolution1D.Filter[i] = 0.0; - ctx->Convolution2D.Filter[i] = 0.0; - ctx->Separable2D.Filter[i] = 0.0; - } - ASSIGN_4V(ctx->Pixel.PostConvolutionScale, 1.0, 1.0, 1.0, 1.0); - ASSIGN_4V(ctx->Pixel.PostConvolutionBias, 0.0, 0.0, 0.0, 0.0); - - /* Point group */ - ctx->Point.SmoothFlag = GL_FALSE; - ctx->Point.Size = 1.0; - ctx->Point._Size = 1.0; - ctx->Point.Params[0] = 1.0; - ctx->Point.Params[1] = 0.0; - ctx->Point.Params[2] = 0.0; - ctx->Point._Attenuated = GL_FALSE; - ctx->Point.MinSize = 0.0; - ctx->Point.MaxSize = ctx->Const.MaxPointSize; - ctx->Point.Threshold = 1.0; - ctx->Point.PointSprite = GL_FALSE; /* GL_NV_point_sprite */ - ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite */ - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_NV_point_sprite */ - } - - /* Polygon group */ - ctx->Polygon.CullFlag = GL_FALSE; - ctx->Polygon.CullFaceMode = GL_BACK; - ctx->Polygon.FrontFace = GL_CCW; - ctx->Polygon._FrontBit = 0; - ctx->Polygon.FrontMode = GL_FILL; - ctx->Polygon.BackMode = GL_FILL; - ctx->Polygon.SmoothFlag = GL_FALSE; - ctx->Polygon.StippleFlag = GL_FALSE; - ctx->Polygon.OffsetFactor = 0.0F; - ctx->Polygon.OffsetUnits = 0.0F; - ctx->Polygon.OffsetPoint = GL_FALSE; - ctx->Polygon.OffsetLine = GL_FALSE; - ctx->Polygon.OffsetFill = GL_FALSE; - - /* Polygon Stipple group */ - MEMSET( ctx->PolygonStipple, 0xff, 32*sizeof(GLuint) ); - - /* Scissor group */ - ctx->Scissor.Enabled = GL_FALSE; - ctx->Scissor.X = 0; - ctx->Scissor.Y = 0; - ctx->Scissor.Width = 0; - ctx->Scissor.Height = 0; - - /* Stencil group */ - ctx->Stencil.Enabled = GL_FALSE; - ctx->Stencil.TestTwoSide = GL_FALSE; - ctx->Stencil.ActiveFace = 0; /* 0 = GL_FRONT, 1 = GL_BACK */ - ctx->Stencil.Function[0] = GL_ALWAYS; - ctx->Stencil.Function[1] = GL_ALWAYS; - ctx->Stencil.FailFunc[0] = GL_KEEP; - ctx->Stencil.FailFunc[1] = GL_KEEP; - ctx->Stencil.ZPassFunc[0] = GL_KEEP; - ctx->Stencil.ZPassFunc[1] = GL_KEEP; - ctx->Stencil.ZFailFunc[0] = GL_KEEP; - ctx->Stencil.ZFailFunc[1] = GL_KEEP; - ctx->Stencil.Ref[0] = 0; - ctx->Stencil.Ref[1] = 0; - ctx->Stencil.ValueMask[0] = STENCIL_MAX; - ctx->Stencil.ValueMask[1] = STENCIL_MAX; - ctx->Stencil.WriteMask[0] = STENCIL_MAX; - ctx->Stencil.WriteMask[1] = STENCIL_MAX; - ctx->Stencil.Clear = 0; - - /* Texture group */ - ctx->Texture.CurrentUnit = 0; /* multitexture */ - ctx->Texture._EnabledUnits = 0; - for (i=0; iTexture.SharedPalette = GL_FALSE; - _mesa_init_colortable(&ctx->Texture.Palette); - - /* Transformation group */ - ctx->Transform.MatrixMode = GL_MODELVIEW; - ctx->Transform.Normalize = GL_FALSE; - ctx->Transform.RescaleNormals = GL_FALSE; - ctx->Transform.RasterPositionUnclipped = GL_FALSE; - for (i=0;iTransform.EyeUserPlane[i], 0.0, 0.0, 0.0, 0.0 ); - } - ctx->Transform.ClipPlanesEnabled = 0; - - /* Viewport group */ - ctx->Viewport.X = 0; - ctx->Viewport.Y = 0; - ctx->Viewport.Width = 0; - ctx->Viewport.Height = 0; - ctx->Viewport.Near = 0.0; - ctx->Viewport.Far = 1.0; - _math_matrix_ctr(&ctx->Viewport._WindowMap); - -#define Sz 10 -#define Tz 14 - ctx->Viewport._WindowMap.m[Sz] = 0.5F * ctx->DepthMaxF; - ctx->Viewport._WindowMap.m[Tz] = 0.5F * ctx->DepthMaxF; -#undef Sz -#undef Tz - - ctx->Viewport._WindowMap.flags = MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION; - ctx->Viewport._WindowMap.type = MATRIX_3D_NO_ROT; - - /* Vertex arrays */ - ctx->Array.Vertex.Size = 4; - ctx->Array.Vertex.Type = GL_FLOAT; - ctx->Array.Vertex.Stride = 0; - ctx->Array.Vertex.StrideB = 0; - ctx->Array.Vertex.Ptr = NULL; - ctx->Array.Vertex.Enabled = GL_FALSE; - ctx->Array.Vertex.Flags = CA_CLIENT_DATA; - ctx->Array.Normal.Type = GL_FLOAT; - ctx->Array.Normal.Stride = 0; - ctx->Array.Normal.StrideB = 0; - ctx->Array.Normal.Ptr = NULL; - ctx->Array.Normal.Enabled = GL_FALSE; - ctx->Array.Normal.Flags = CA_CLIENT_DATA; - ctx->Array.Color.Size = 4; - ctx->Array.Color.Type = GL_FLOAT; - ctx->Array.Color.Stride = 0; - ctx->Array.Color.StrideB = 0; - ctx->Array.Color.Ptr = NULL; - ctx->Array.Color.Enabled = GL_FALSE; - ctx->Array.Color.Flags = CA_CLIENT_DATA; - ctx->Array.SecondaryColor.Size = 3; - ctx->Array.SecondaryColor.Type = GL_FLOAT; - ctx->Array.SecondaryColor.Stride = 0; - ctx->Array.SecondaryColor.StrideB = 0; - ctx->Array.SecondaryColor.Ptr = NULL; - ctx->Array.SecondaryColor.Enabled = GL_FALSE; - ctx->Array.SecondaryColor.Flags = CA_CLIENT_DATA; - ctx->Array.FogCoord.Size = 1; - ctx->Array.FogCoord.Type = GL_FLOAT; - ctx->Array.FogCoord.Stride = 0; - ctx->Array.FogCoord.StrideB = 0; - ctx->Array.FogCoord.Ptr = NULL; - ctx->Array.FogCoord.Enabled = GL_FALSE; - ctx->Array.FogCoord.Flags = CA_CLIENT_DATA; - ctx->Array.Index.Type = GL_FLOAT; - ctx->Array.Index.Stride = 0; - ctx->Array.Index.StrideB = 0; - ctx->Array.Index.Ptr = NULL; - ctx->Array.Index.Enabled = GL_FALSE; - ctx->Array.Index.Flags = CA_CLIENT_DATA; - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - ctx->Array.TexCoord[i].Size = 4; - ctx->Array.TexCoord[i].Type = GL_FLOAT; - ctx->Array.TexCoord[i].Stride = 0; - ctx->Array.TexCoord[i].StrideB = 0; - ctx->Array.TexCoord[i].Ptr = NULL; - ctx->Array.TexCoord[i].Enabled = GL_FALSE; - ctx->Array.TexCoord[i].Flags = CA_CLIENT_DATA; - } - ctx->Array.TexCoordInterleaveFactor = 1; - ctx->Array.EdgeFlag.Stride = 0; - ctx->Array.EdgeFlag.StrideB = 0; - ctx->Array.EdgeFlag.Ptr = NULL; - ctx->Array.EdgeFlag.Enabled = GL_FALSE; - ctx->Array.EdgeFlag.Flags = CA_CLIENT_DATA; - ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */ - - /* Pixel transfer */ - ctx->Pack.Alignment = 4; - ctx->Pack.RowLength = 0; - ctx->Pack.ImageHeight = 0; - ctx->Pack.SkipPixels = 0; - ctx->Pack.SkipRows = 0; - ctx->Pack.SkipImages = 0; - ctx->Pack.SwapBytes = GL_FALSE; - ctx->Pack.LsbFirst = GL_FALSE; - ctx->Unpack.Alignment = 4; - ctx->Unpack.RowLength = 0; - ctx->Unpack.ImageHeight = 0; - ctx->Unpack.SkipPixels = 0; - ctx->Unpack.SkipRows = 0; - ctx->Unpack.SkipImages = 0; - ctx->Unpack.SwapBytes = GL_FALSE; - ctx->Unpack.LsbFirst = GL_FALSE; - - /* Feedback */ - ctx->Feedback.Type = GL_2D; /* TODO: verify */ - ctx->Feedback.Buffer = NULL; - ctx->Feedback.BufferSize = 0; - ctx->Feedback.Count = 0; - - /* Selection/picking */ - ctx->Select.Buffer = NULL; - ctx->Select.BufferSize = 0; - ctx->Select.BufferCount = 0; - ctx->Select.Hits = 0; - ctx->Select.NameStackDepth = 0; - - /* Renderer and client attribute stacks */ - ctx->AttribStackDepth = 0; - ctx->ClientAttribStackDepth = 0; - - /* Display list */ - ctx->CallDepth = 0; - ctx->ExecuteFlag = GL_TRUE; - ctx->CompileFlag = GL_FALSE; - ctx->CurrentListPtr = NULL; - ctx->CurrentBlock = NULL; - ctx->CurrentListNum = 0; - ctx->CurrentPos = 0; - - /* Color tables */ - _mesa_init_colortable(&ctx->ColorTable); - _mesa_init_colortable(&ctx->ProxyColorTable); - _mesa_init_colortable(&ctx->PostConvolutionColorTable); - _mesa_init_colortable(&ctx->ProxyPostConvolutionColorTable); - _mesa_init_colortable(&ctx->PostColorMatrixColorTable); - _mesa_init_colortable(&ctx->ProxyPostColorMatrixColorTable); - - /* GL_NV_vertex_program */ - ctx->VertexProgram.Enabled = GL_FALSE; - ctx->VertexProgram.PointSizeEnabled = GL_FALSE; - ctx->VertexProgram.TwoSideEnabled = GL_FALSE; - ctx->VertexProgram.CurrentID = 0; - ctx->VertexProgram.ErrorPos = -1; - ctx->VertexProgram.Current = NULL; - for (i = 0; i < VP_NUM_PROG_REGS / 4; i++) { - ctx->VertexProgram.TrackMatrix[i] = GL_NONE; - ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV; - } - - /* Miscellaneous */ - ctx->NewState = _NEW_ALL; - ctx->RenderMode = GL_RENDER; - ctx->_ImageTransferState = 0; - - ctx->_NeedNormals = 0; - ctx->_NeedEyeCoords = 0; - ctx->_ModelViewInvScale = 1.0; - - ctx->ErrorValue = (GLenum) GL_NO_ERROR; - - ctx->CatchSignals = GL_TRUE; - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - ctx->_Facing = 0; - - /* For debug/development only */ - ctx->NoRaster = _mesa_getenv("MESA_NO_RASTER") ? GL_TRUE : GL_FALSE; - ctx->FirstTimeCurrent = GL_TRUE; - - /* Dither disable */ - ctx->NoDither = _mesa_getenv("MESA_NO_DITHER") ? GL_TRUE : GL_FALSE; - if (ctx->NoDither) { - if (_mesa_getenv("MESA_DEBUG")) { - _mesa_debug(ctx, "MESA_NO_DITHER set - dithering disabled\n"); - } - ctx->Color.DitherFlag = GL_FALSE; - } -} - - - - -/* - * Allocate the proxy textures. If we run out of memory part way through - * the allocations clean up and return GL_FALSE. - * Return: GL_TRUE=success, GL_FALSE=failure - */ -static GLboolean -alloc_proxy_textures( GLcontext *ctx ) -{ - GLboolean out_of_memory; - GLint i; - - ctx->Texture.Proxy1D = _mesa_alloc_texture_object(NULL, 0, GL_TEXTURE_1D); - if (!ctx->Texture.Proxy1D) { - return GL_FALSE; - } - - ctx->Texture.Proxy2D = _mesa_alloc_texture_object(NULL, 0, GL_TEXTURE_2D); - if (!ctx->Texture.Proxy2D) { - _mesa_free_texture_object(NULL, ctx->Texture.Proxy1D); - return GL_FALSE; - } - - ctx->Texture.Proxy3D = _mesa_alloc_texture_object(NULL, 0, GL_TEXTURE_3D); - if (!ctx->Texture.Proxy3D) { - _mesa_free_texture_object(NULL, ctx->Texture.Proxy1D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy2D); - return GL_FALSE; - } - - ctx->Texture.ProxyCubeMap = _mesa_alloc_texture_object(NULL, 0, - GL_TEXTURE_CUBE_MAP_ARB); - if (!ctx->Texture.ProxyCubeMap) { - _mesa_free_texture_object(NULL, ctx->Texture.Proxy1D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy2D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy3D); - return GL_FALSE; - } - - ctx->Texture.ProxyRect = _mesa_alloc_texture_object(NULL, 0, - GL_TEXTURE_RECTANGLE_NV); - if (!ctx->Texture.ProxyRect) { - _mesa_free_texture_object(NULL, ctx->Texture.Proxy1D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy2D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy3D); - _mesa_free_texture_object(NULL, ctx->Texture.ProxyCubeMap); - return GL_FALSE; - } - - out_of_memory = GL_FALSE; - for (i=0;iTexture.Proxy1D->Image[i] = _mesa_alloc_texture_image(); - ctx->Texture.Proxy2D->Image[i] = _mesa_alloc_texture_image(); - ctx->Texture.Proxy3D->Image[i] = _mesa_alloc_texture_image(); - ctx->Texture.ProxyCubeMap->Image[i] = _mesa_alloc_texture_image(); - if (!ctx->Texture.Proxy1D->Image[i] - || !ctx->Texture.Proxy2D->Image[i] - || !ctx->Texture.Proxy3D->Image[i] - || !ctx->Texture.ProxyCubeMap->Image[i]) { - out_of_memory = GL_TRUE; - } - } - ctx->Texture.ProxyRect->Image[0] = _mesa_alloc_texture_image(); - if (!ctx->Texture.ProxyRect->Image[0]) - out_of_memory = GL_TRUE; - - if (out_of_memory) { - for (i=0;iTexture.Proxy1D->Image[i]) { - _mesa_free_texture_image(ctx->Texture.Proxy1D->Image[i]); - } - if (ctx->Texture.Proxy2D->Image[i]) { - _mesa_free_texture_image(ctx->Texture.Proxy2D->Image[i]); - } - if (ctx->Texture.Proxy3D->Image[i]) { - _mesa_free_texture_image(ctx->Texture.Proxy3D->Image[i]); - } - if (ctx->Texture.ProxyCubeMap->Image[i]) { - _mesa_free_texture_image(ctx->Texture.ProxyCubeMap->Image[i]); - } - } - if (ctx->Texture.ProxyRect->Image[0]) { - _mesa_free_texture_image(ctx->Texture.ProxyRect->Image[0]); - } - _mesa_free_texture_object(NULL, ctx->Texture.Proxy1D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy2D); - _mesa_free_texture_object(NULL, ctx->Texture.Proxy3D); - _mesa_free_texture_object(NULL, ctx->Texture.ProxyCubeMap); - _mesa_free_texture_object(NULL, ctx->Texture.ProxyRect); - return GL_FALSE; - } - else { - return GL_TRUE; - } -} - - -static void add_debug_flags( const char *debug ) -{ -#ifdef MESA_DEBUG - if (_mesa_strstr(debug, "varray")) - MESA_VERBOSE |= VERBOSE_VARRAY; - - if (_mesa_strstr(debug, "tex")) - MESA_VERBOSE |= VERBOSE_TEXTURE; - - if (_mesa_strstr(debug, "imm")) - MESA_VERBOSE |= VERBOSE_IMMEDIATE; - - if (_mesa_strstr(debug, "pipe")) - MESA_VERBOSE |= VERBOSE_PIPELINE; - - if (_mesa_strstr(debug, "driver")) - MESA_VERBOSE |= VERBOSE_DRIVER; - - if (_mesa_strstr(debug, "state")) - MESA_VERBOSE |= VERBOSE_STATE; - - if (_mesa_strstr(debug, "api")) - MESA_VERBOSE |= VERBOSE_API; - - if (_mesa_strstr(debug, "list")) - MESA_VERBOSE |= VERBOSE_DISPLAY_LIST; - - if (_mesa_strstr(debug, "lighting")) - MESA_VERBOSE |= VERBOSE_LIGHTING; - - /* Debug flag: - */ - if (_mesa_strstr(debug, "flush")) - MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH; -#endif -} - - -/* - * Initialize a GLcontext struct. This includes allocating all the - * other structs and arrays which hang off of the context by pointers. - */ -GLboolean -_mesa_initialize_context( GLcontext *ctx, - const GLvisual *visual, - GLcontext *share_list, - void *driver_ctx, - GLboolean direct ) -{ - GLuint dispatchSize; - const char *c; - - ASSERT(driver_ctx); - - /* If the driver wants core Mesa to use special imports, it'll have to - * override these defaults. - */ - _mesa_init_default_imports( &(ctx->imports), driver_ctx ); - - /* initialize the exports (Mesa functions called by the window system) */ - _mesa_init_default_exports( &(ctx->exports) ); - - /* misc one-time initializations */ - one_time_init(ctx); - - ctx->DriverCtx = driver_ctx; - ctx->Visual = *visual; - ctx->DrawBuffer = NULL; - ctx->ReadBuffer = NULL; - - if (share_list) { - /* share state with another context */ - ctx->Shared = share_list->Shared; - } - else { - /* allocate new, unshared state */ - ctx->Shared = alloc_shared_state(); - if (!ctx->Shared) { - return GL_FALSE; - } - } - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - ctx->Shared->RefCount++; - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - - /* Effectively bind the default textures to all texture units */ - ctx->Shared->Default1D->RefCount += MAX_TEXTURE_UNITS; - ctx->Shared->Default2D->RefCount += MAX_TEXTURE_UNITS; - ctx->Shared->Default3D->RefCount += MAX_TEXTURE_UNITS; - ctx->Shared->DefaultCubeMap->RefCount += MAX_TEXTURE_UNITS; - ctx->Shared->DefaultRect->RefCount += MAX_TEXTURE_UNITS; - - init_attrib_groups( ctx ); - - if (visual->doubleBufferMode) { - ctx->Color.DrawBuffer = GL_BACK; - ctx->Color._DrawDestMask = BACK_LEFT_BIT; - ctx->Pixel.ReadBuffer = GL_BACK; - ctx->Pixel._ReadSrcMask = BACK_LEFT_BIT; - } - else { - ctx->Color.DrawBuffer = GL_FRONT; - ctx->Color._DrawDestMask = FRONT_LEFT_BIT; - ctx->Pixel.ReadBuffer = GL_FRONT; - ctx->Pixel._ReadSrcMask = FRONT_LEFT_BIT; - } - - if (!alloc_proxy_textures(ctx)) { - free_shared_state(ctx, ctx->Shared); - return GL_FALSE; - } - - /* - * For XFree86/DRI: tell libGL to add these functions to the dispatcher. - * Basically, we should add all extension functions above offset 577. - * This enables older libGL libraries to work with newer drivers that - * have newer extensions. - */ - /* GL_ARB_window_pos aliases with GL_MESA_window_pos */ - _glapi_add_entrypoint("glWindowPos2dARB", 513); - _glapi_add_entrypoint("glWindowPos2dvARB", 514); - _glapi_add_entrypoint("glWindowPos2fARB", 515); - _glapi_add_entrypoint("glWindowPos2fvARB", 516); - _glapi_add_entrypoint("glWindowPos2iARB", 517); - _glapi_add_entrypoint("glWindowPos2ivARB", 518); - _glapi_add_entrypoint("glWindowPos2sARB", 519); - _glapi_add_entrypoint("glWindowPos2svARB", 520); - _glapi_add_entrypoint("glWindowPos3dARB", 521); - _glapi_add_entrypoint("glWindowPos3dvARB", 522); - _glapi_add_entrypoint("glWindowPos3fARB", 523); - _glapi_add_entrypoint("glWindowPos3fvARB", 524); - _glapi_add_entrypoint("glWindowPos3iARB", 525); - _glapi_add_entrypoint("glWindowPos3ivARB", 526); - _glapi_add_entrypoint("glWindowPos3sARB", 527); - _glapi_add_entrypoint("glWindowPos3svARB", 528); - /* new extension functions */ - _glapi_add_entrypoint("glAreProgramsResidentNV", 578); - _glapi_add_entrypoint("glBindProgramNV", 579); - _glapi_add_entrypoint("glDeleteProgramsNV", 580); - _glapi_add_entrypoint("glExecuteProgramNV", 581); - _glapi_add_entrypoint("glGenProgramsNV", 582); - _glapi_add_entrypoint("glGetProgramParameterdvNV", 583); - _glapi_add_entrypoint("glGetProgramParameterfvNV", 584); - _glapi_add_entrypoint("glGetProgramivNV", 585); - _glapi_add_entrypoint("glGetProgramStringNV", 586); - _glapi_add_entrypoint("glGetTrackMatrixivNV", 587); - _glapi_add_entrypoint("glGetVertexAttribdvNV", 588); - _glapi_add_entrypoint("glGetVertexAttribfvNV", 589); - _glapi_add_entrypoint("glGetVertexAttribivNV", 590); - _glapi_add_entrypoint("glGetVertexAttribPointervNV", 591); - _glapi_add_entrypoint("glIsProgramNV", 592); - _glapi_add_entrypoint("glLoadProgramNV", 593); - _glapi_add_entrypoint("glProgramParameter4dNV", 594); - _glapi_add_entrypoint("glProgramParameter4dvNV", 595); - _glapi_add_entrypoint("glProgramParameter4fNV", 596); - _glapi_add_entrypoint("glProgramParameter4fvNV", 597); - _glapi_add_entrypoint("glProgramParameters4dvNV", 598); - _glapi_add_entrypoint("glProgramParameters4fvNV", 599); - _glapi_add_entrypoint("glRequestResidentProgramsNV", 600); - _glapi_add_entrypoint("glTrackMatrixNV", 601); - _glapi_add_entrypoint("glVertexAttribPointerNV", 602); - _glapi_add_entrypoint("glVertexAttrib1dNV", 603); - _glapi_add_entrypoint("glVertexAttrib1dvNV", 604); - _glapi_add_entrypoint("glVertexAttrib1fNV", 605); - _glapi_add_entrypoint("glVertexAttrib1fvNV", 606); - _glapi_add_entrypoint("glVertexAttrib1sNV", 607); - _glapi_add_entrypoint("glVertexAttrib1svNV", 608); - _glapi_add_entrypoint("glVertexAttrib2dNV", 609); - _glapi_add_entrypoint("glVertexAttrib2dvNV", 610); - _glapi_add_entrypoint("glVertexAttrib2fNV", 611); - _glapi_add_entrypoint("glVertexAttrib2fvNV", 612); - _glapi_add_entrypoint("glVertexAttrib2sNV", 613); - _glapi_add_entrypoint("glVertexAttrib2svNV", 614); - _glapi_add_entrypoint("glVertexAttrib3dNV", 615); - _glapi_add_entrypoint("glVertexAttrib3dvNV", 616); - _glapi_add_entrypoint("glVertexAttrib3fNV", 617); - _glapi_add_entrypoint("glVertexAttrib3fvNV", 618); - _glapi_add_entrypoint("glVertexAttrib3sNV", 619); - _glapi_add_entrypoint("glVertexAttrib3svNV", 620); - _glapi_add_entrypoint("glVertexAttrib4dNV", 621); - _glapi_add_entrypoint("glVertexAttrib4dvNV", 622); - _glapi_add_entrypoint("glVertexAttrib4fNV", 623); - _glapi_add_entrypoint("glVertexAttrib4fvNV", 624); - _glapi_add_entrypoint("glVertexAttrib4sNV", 625); - _glapi_add_entrypoint("glVertexAttrib4svNV", 626); - _glapi_add_entrypoint("glVertexAttrib4ubNV", 627); - _glapi_add_entrypoint("glVertexAttrib4ubvNV", 628); - _glapi_add_entrypoint("glVertexAttribs1dvNV", 629); - _glapi_add_entrypoint("glVertexAttribs1fvNV", 630); - _glapi_add_entrypoint("glVertexAttribs1svNV", 631); - _glapi_add_entrypoint("glVertexAttribs2dvNV", 632); - _glapi_add_entrypoint("glVertexAttribs2fvNV", 633); - _glapi_add_entrypoint("glVertexAttribs2svNV", 634); - _glapi_add_entrypoint("glVertexAttribs3dvNV", 635); - _glapi_add_entrypoint("glVertexAttribs3fvNV", 636); - _glapi_add_entrypoint("glVertexAttribs3svNV", 637); - _glapi_add_entrypoint("glVertexAttribs4dvNV", 638); - _glapi_add_entrypoint("glVertexAttribs4fvNV", 639); - _glapi_add_entrypoint("glVertexAttribs4svNV", 640); - _glapi_add_entrypoint("glVertexAttribs4ubvNV", 641); - _glapi_add_entrypoint("glPointParameteriNV", 642); - _glapi_add_entrypoint("glPointParameterivNV", 643); - _glapi_add_entrypoint("glMultiDrawArraysEXT", 644); - _glapi_add_entrypoint("glMultiDrawElementsEXT", 645); - _glapi_add_entrypoint("glActiveStencilFaceEXT", 646); - _glapi_add_entrypoint("glDeleteFencesNV", 647); - _glapi_add_entrypoint("glGenFencesNV", 648); - _glapi_add_entrypoint("glIsFenceNV", 649); - _glapi_add_entrypoint("glTestFenceNV", 650); - _glapi_add_entrypoint("glGetFenceivNV", 651); - _glapi_add_entrypoint("glFinishFenceNV", 652); - _glapi_add_entrypoint("glSetFenceNV", 653); - - /* Find the larger of Mesa's dispatch table and libGL's dispatch table. - * In practice, this'll be the same for stand-alone Mesa. But for DRI - * Mesa we do this to accomodate different versions of libGL and various - * DRI drivers. - */ - dispatchSize = MAX2(_glapi_get_dispatch_table_size(), - sizeof(struct _glapi_table) / sizeof(void *)); - - /* setup API dispatch tables */ - ctx->Exec = (struct _glapi_table *) CALLOC(dispatchSize * sizeof(void*)); - ctx->Save = (struct _glapi_table *) CALLOC(dispatchSize * sizeof(void*)); - if (!ctx->Exec || !ctx->Save) { - free_shared_state(ctx, ctx->Shared); - if (ctx->Exec) - FREE( ctx->Exec ); - } - _mesa_init_exec_table(ctx->Exec, dispatchSize); - _mesa_init_dlist_table(ctx->Save, dispatchSize); - ctx->CurrentDispatch = ctx->Exec; - - ctx->ExecPrefersFloat = GL_FALSE; - ctx->SavePrefersFloat = GL_FALSE; - - /* Neutral tnl module stuff */ - _mesa_init_exec_vtxfmt( ctx ); - ctx->TnlModule.Current = NULL; - ctx->TnlModule.SwapCount = 0; - - /* Z buffer stuff */ - if (ctx->Visual.depthBits == 0) { - /* Special case. Even if we don't have a depth buffer we need - * good values for DepthMax for Z vertex transformation purposes - * and for per-fragment fog computation. - */ - ctx->DepthMax = 1 << 16; - ctx->DepthMaxF = (GLfloat) ctx->DepthMax; - } - else if (ctx->Visual.depthBits < 32) { - ctx->DepthMax = (1 << ctx->Visual.depthBits) - 1; - ctx->DepthMaxF = (GLfloat) ctx->DepthMax; - } - else { - /* Special case since shift values greater than or equal to the - * number of bits in the left hand expression's type are undefined. - */ - ctx->DepthMax = 0xffffffff; - ctx->DepthMaxF = (GLfloat) ctx->DepthMax; - } - ctx->MRD = 1.0; /* Minimum resolvable depth value, for polygon offset */ - - c = _mesa_getenv("MESA_DEBUG"); - if (c) - add_debug_flags(c); - - c = _mesa_getenv("MESA_VERBOSE"); - if (c) - add_debug_flags(c); - - return GL_TRUE; -} - - - -/* - * Allocate and initialize a GLcontext structure. - * Input: visual - a GLvisual pointer (we copy the struct contents) - * sharelist - another context to share display lists with or NULL - * driver_ctx - pointer to device driver's context state struct - * direct - direct rendering? - * Return: pointer to a new __GLcontextRec or NULL if error. - */ -GLcontext * -_mesa_create_context( const GLvisual *visual, - GLcontext *share_list, - void *driver_ctx, - GLboolean direct ) - -{ - GLcontext *ctx; - - ASSERT(visual); - ASSERT(driver_ctx); - - ctx = (GLcontext *) _mesa_calloc(sizeof(GLcontext)); - if (!ctx) - return NULL; - - if (_mesa_initialize_context(ctx, visual, share_list, driver_ctx, direct)) { - return ctx; - } - else { - _mesa_free(ctx); - return NULL; - } -} - - - -/* - * Free the data associated with the given context. - * But don't free() the GLcontext struct itself! - */ -void -_mesa_free_context_data( GLcontext *ctx ) -{ - struct gl_shine_tab *s, *tmps; - GLuint i; - - /* if we're destroying the current context, unbind it first */ - if (ctx == _mesa_get_current_context()) { - _mesa_make_current(NULL, NULL); - } - - /* - * Free transformation matrix stacks - */ - free_matrix_stack(&ctx->ModelviewMatrixStack); - free_matrix_stack(&ctx->ProjectionMatrixStack); - free_matrix_stack(&ctx->ColorMatrixStack); - for (i = 0; i < MAX_TEXTURE_UNITS; i++) - free_matrix_stack(&ctx->TextureMatrixStack[i]); - for (i = 0; i < MAX_PROGRAM_MATRICES; i++) - free_matrix_stack(&ctx->ProgramMatrixStack[i]); - /* combined Modelview*Projection matrix */ - _math_matrix_dtr( &ctx->_ModelProjectMatrix ); - - -#if FEATURE_NV_vertex_program - if (ctx->VertexProgram.Current) { - ctx->VertexProgram.Current->RefCount--; - if (ctx->VertexProgram.Current->RefCount <= 0) - _mesa_delete_program(ctx, ctx->VertexProgram.CurrentID); - } -#endif - - /* Shared context state (display lists, textures, etc) */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - ctx->Shared->RefCount--; - assert(ctx->Shared->RefCount >= 0); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - if (ctx->Shared->RefCount == 0) { - /* free shared state */ - free_shared_state( ctx, ctx->Shared ); - } - - /* Free lighting shininess exponentiation table */ - foreach_s( s, tmps, ctx->_ShineTabList ) { - FREE( s ); - } - FREE( ctx->_ShineTabList ); - - /* Free proxy texture objects */ - _mesa_free_texture_object( NULL, ctx->Texture.Proxy1D ); - _mesa_free_texture_object( NULL, ctx->Texture.Proxy2D ); - _mesa_free_texture_object( NULL, ctx->Texture.Proxy3D ); - _mesa_free_texture_object( NULL, ctx->Texture.ProxyCubeMap ); - _mesa_free_texture_object( NULL, ctx->Texture.ProxyRect ); - - /* Free evaluator data */ - if (ctx->EvalMap.Map1Vertex3.Points) - FREE( ctx->EvalMap.Map1Vertex3.Points ); - if (ctx->EvalMap.Map1Vertex4.Points) - FREE( ctx->EvalMap.Map1Vertex4.Points ); - if (ctx->EvalMap.Map1Index.Points) - FREE( ctx->EvalMap.Map1Index.Points ); - if (ctx->EvalMap.Map1Color4.Points) - FREE( ctx->EvalMap.Map1Color4.Points ); - if (ctx->EvalMap.Map1Normal.Points) - FREE( ctx->EvalMap.Map1Normal.Points ); - if (ctx->EvalMap.Map1Texture1.Points) - FREE( ctx->EvalMap.Map1Texture1.Points ); - if (ctx->EvalMap.Map1Texture2.Points) - FREE( ctx->EvalMap.Map1Texture2.Points ); - if (ctx->EvalMap.Map1Texture3.Points) - FREE( ctx->EvalMap.Map1Texture3.Points ); - if (ctx->EvalMap.Map1Texture4.Points) - FREE( ctx->EvalMap.Map1Texture4.Points ); - for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map1Attrib[i].Points)); - - if (ctx->EvalMap.Map2Vertex3.Points) - FREE( ctx->EvalMap.Map2Vertex3.Points ); - if (ctx->EvalMap.Map2Vertex4.Points) - FREE( ctx->EvalMap.Map2Vertex4.Points ); - if (ctx->EvalMap.Map2Index.Points) - FREE( ctx->EvalMap.Map2Index.Points ); - if (ctx->EvalMap.Map2Color4.Points) - FREE( ctx->EvalMap.Map2Color4.Points ); - if (ctx->EvalMap.Map2Normal.Points) - FREE( ctx->EvalMap.Map2Normal.Points ); - if (ctx->EvalMap.Map2Texture1.Points) - FREE( ctx->EvalMap.Map2Texture1.Points ); - if (ctx->EvalMap.Map2Texture2.Points) - FREE( ctx->EvalMap.Map2Texture2.Points ); - if (ctx->EvalMap.Map2Texture3.Points) - FREE( ctx->EvalMap.Map2Texture3.Points ); - if (ctx->EvalMap.Map2Texture4.Points) - FREE( ctx->EvalMap.Map2Texture4.Points ); - for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map2Attrib[i].Points)); - - _mesa_free_colortable_data( &ctx->ColorTable ); - _mesa_free_colortable_data( &ctx->PostConvolutionColorTable ); - _mesa_free_colortable_data( &ctx->PostColorMatrixColorTable ); - _mesa_free_colortable_data( &ctx->Texture.Palette ); - - _math_matrix_dtr(&ctx->Viewport._WindowMap); - - _mesa_extensions_dtr(ctx); - - FREE(ctx->Exec); - FREE(ctx->Save); -} - - - -/* - * Destroy a GLcontext structure. - */ -void -_mesa_destroy_context( GLcontext *ctx ) -{ - if (ctx) { - _mesa_free_context_data(ctx); - FREE( (void *) ctx ); - } -} - - - -/* - * Copy attribute groups from one context to another. - * Input: src - source context - * dst - destination context - * mask - bitwise OR of GL_*_BIT flags - */ -void -_mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask ) -{ - if (mask & GL_ACCUM_BUFFER_BIT) { - /* OK to memcpy */ - dst->Accum = src->Accum; - } - if (mask & GL_COLOR_BUFFER_BIT) { - /* OK to memcpy */ - dst->Color = src->Color; - } - if (mask & GL_CURRENT_BIT) { - /* OK to memcpy */ - dst->Current = src->Current; - } - if (mask & GL_DEPTH_BUFFER_BIT) { - /* OK to memcpy */ - dst->Depth = src->Depth; - } - if (mask & GL_ENABLE_BIT) { - /* no op */ - } - if (mask & GL_EVAL_BIT) { - /* OK to memcpy */ - dst->Eval = src->Eval; - } - if (mask & GL_FOG_BIT) { - /* OK to memcpy */ - dst->Fog = src->Fog; - } - if (mask & GL_HINT_BIT) { - /* OK to memcpy */ - dst->Hint = src->Hint; - } - if (mask & GL_LIGHTING_BIT) { - GLuint i; - /* begin with memcpy */ - MEMCPY( &dst->Light, &src->Light, sizeof(struct gl_light) ); - /* fixup linked lists to prevent pointer insanity */ - make_empty_list( &(dst->Light.EnabledList) ); - for (i = 0; i < MAX_LIGHTS; i++) { - if (dst->Light.Light[i].Enabled) { - insert_at_tail(&(dst->Light.EnabledList), &(dst->Light.Light[i])); - } - } - } - if (mask & GL_LINE_BIT) { - /* OK to memcpy */ - dst->Line = src->Line; - } - if (mask & GL_LIST_BIT) { - /* OK to memcpy */ - dst->List = src->List; - } - if (mask & GL_PIXEL_MODE_BIT) { - /* OK to memcpy */ - dst->Pixel = src->Pixel; - } - if (mask & GL_POINT_BIT) { - /* OK to memcpy */ - dst->Point = src->Point; - } - if (mask & GL_POLYGON_BIT) { - /* OK to memcpy */ - dst->Polygon = src->Polygon; - } - if (mask & GL_POLYGON_STIPPLE_BIT) { - /* Use loop instead of MEMCPY due to problem with Portland Group's - * C compiler. Reported by John Stone. - */ - GLuint i; - for (i = 0; i < 32; i++) { - dst->PolygonStipple[i] = src->PolygonStipple[i]; - } - } - if (mask & GL_SCISSOR_BIT) { - /* OK to memcpy */ - dst->Scissor = src->Scissor; - } - if (mask & GL_STENCIL_BUFFER_BIT) { - /* OK to memcpy */ - dst->Stencil = src->Stencil; - } - if (mask & GL_TEXTURE_BIT) { - /* Cannot memcpy because of pointers */ - _mesa_copy_texture_state(src, dst); - } - if (mask & GL_TRANSFORM_BIT) { - /* OK to memcpy */ - dst->Transform = src->Transform; - } - if (mask & GL_VIEWPORT_BIT) { - /* Cannot use memcpy, because of pointers in GLmatrix _WindowMap */ - dst->Viewport.X = src->Viewport.X; - dst->Viewport.Y = src->Viewport.Y; - dst->Viewport.Width = src->Viewport.Width; - dst->Viewport.Height = src->Viewport.Height; - dst->Viewport.Near = src->Viewport.Near; - dst->Viewport.Far = src->Viewport.Far; - _math_matrix_copy(&dst->Viewport._WindowMap, &src->Viewport._WindowMap); - } - - /* XXX FIXME: Call callbacks? - */ - dst->NewState = _NEW_ALL; -} - - - -static void print_info( void ) -{ - _mesa_debug(NULL, "Mesa GL_VERSION = %s\n", - (char *) _mesa_GetString(GL_VERSION)); - _mesa_debug(NULL, "Mesa GL_RENDERER = %s\n", - (char *) _mesa_GetString(GL_RENDERER)); - _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n", - (char *) _mesa_GetString(GL_VENDOR)); - _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", - (char *) _mesa_GetString(GL_EXTENSIONS)); -#if defined(THREADS) - _mesa_debug(NULL, "Mesa thread-safe: YES\n"); -#else - _mesa_debug(NULL, "Mesa thread-safe: NO\n"); -#endif -#if defined(USE_X86_ASM) - _mesa_debug(NULL, "Mesa x86-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa x86-optimized: NO\n"); -#endif -#if defined(USE_SPARC_ASM) - _mesa_debug(NULL, "Mesa sparc-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa sparc-optimized: NO\n"); -#endif -} - - -/* - * Set the current context, binding the given frame buffer to the context. - */ -void -_mesa_make_current( GLcontext *newCtx, GLframebuffer *buffer ) -{ - _mesa_make_current2( newCtx, buffer, buffer ); -} - - -/* - * Bind the given context to the given draw-buffer and read-buffer - * and make it the current context for this thread. - */ -void -_mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer, - GLframebuffer *readBuffer ) -{ - if (MESA_VERBOSE) - _mesa_debug(newCtx, "_mesa_make_current2()\n"); - - /* Check that the context's and framebuffer's visuals are compatible. - * We could do a lot more checking here but this'll catch obvious - * problems. - */ - if (newCtx && drawBuffer && readBuffer) { - if (newCtx->Visual.rgbMode != drawBuffer->Visual.rgbMode || - newCtx->Visual.redBits != drawBuffer->Visual.redBits || - newCtx->Visual.depthBits != drawBuffer->Visual.depthBits || - newCtx->Visual.stencilBits != drawBuffer->Visual.stencilBits || - newCtx->Visual.accumRedBits != drawBuffer->Visual.accumRedBits) { - return; /* incompatible */ - } - } - - /* We call this function periodically (just here for now) in - * order to detect when multithreading has begun. - */ - _glapi_check_multithread(); - - _glapi_set_context((void *) newCtx); - ASSERT(_mesa_get_current_context() == newCtx); - - - if (!newCtx) { - _glapi_set_dispatch(NULL); /* none current */ - } - else { - _glapi_set_dispatch(newCtx->CurrentDispatch); - - if (drawBuffer && readBuffer) { - /* TODO: check if newCtx and buffer's visual match??? */ - newCtx->DrawBuffer = drawBuffer; - newCtx->ReadBuffer = readBuffer; - newCtx->NewState |= _NEW_BUFFERS; - - if (drawBuffer->Width == 0 && drawBuffer->Height == 0) { - /* get initial window size */ - GLuint bufWidth, bufHeight; - - /* ask device driver for size of output buffer */ - (*newCtx->Driver.GetBufferSize)( drawBuffer, &bufWidth, &bufHeight ); - - if (drawBuffer->Width == bufWidth && drawBuffer->Height == bufHeight) - return; /* size is as expected */ - - drawBuffer->Width = bufWidth; - drawBuffer->Height = bufHeight; - - newCtx->Driver.ResizeBuffers( drawBuffer ); - } - - if (readBuffer != drawBuffer && - readBuffer->Width == 0 && readBuffer->Height == 0) { - /* get initial window size */ - GLuint bufWidth, bufHeight; - - /* ask device driver for size of output buffer */ - (*newCtx->Driver.GetBufferSize)( readBuffer, &bufWidth, &bufHeight ); - - if (readBuffer->Width == bufWidth && readBuffer->Height == bufHeight) - return; /* size is as expected */ - - readBuffer->Width = bufWidth; - readBuffer->Height = bufHeight; - - newCtx->Driver.ResizeBuffers( readBuffer ); - } - } - - /* This is only for T&L - a bit out of place, or misnamed (BP) */ - if (newCtx->Driver.MakeCurrent) - newCtx->Driver.MakeCurrent( newCtx, drawBuffer, readBuffer ); - - /* We can use this to help debug user's problems. Tell them to set - * the MESA_INFO env variable before running their app. Then the - * first time each context is made current we'll print some useful - * information. - */ - if (newCtx->FirstTimeCurrent) { - if (_mesa_getenv("MESA_INFO")) { - print_info(); - } - newCtx->FirstTimeCurrent = GL_FALSE; - } - } -} - - - -/* - * Return current context handle for the calling thread. - * This isn't the fastest way to get the current context. - * If you need speed, see the GET_CURRENT_CONTEXT() macro in context.h - */ -GLcontext * -_mesa_get_current_context( void ) -{ - return (GLcontext *) _glapi_get_context(); -} - - -/* - * Return pointer to this context's current API dispatch table. - * It'll either be the immediate-mode execute dispatcher or the - * display list compile dispatcher. - */ -struct _glapi_table * -_mesa_get_dispatch(GLcontext *ctx) -{ - return ctx->CurrentDispatch; -} - - - -/**********************************************************************/ -/***** Miscellaneous functions *****/ -/**********************************************************************/ - - -/* - * Record the given error code and call the driver's Error function if defined. - * This is called via _mesa_error(). - */ -void -_mesa_record_error( GLcontext *ctx, GLenum error ) -{ - if (!ctx) - return; - - if (ctx->ErrorValue == GL_NO_ERROR) { - ctx->ErrorValue = error; - } - - /* Call device driver's error handler, if any. This is used on the Mac. */ - if (ctx->Driver.Error) { - (*ctx->Driver.Error)( ctx ); - } -} - - -void -_mesa_Finish( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (ctx->Driver.Finish) { - (*ctx->Driver.Finish)( ctx ); - } -} - - - -void -_mesa_Flush( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (ctx->Driver.Flush) { - (*ctx->Driver.Flush)( ctx ); - } -} - - - -const char *_mesa_prim_name[GL_POLYGON+4] = { - "GL_POINTS", - "GL_LINES", - "GL_LINE_LOOP", - "GL_LINE_STRIP", - "GL_TRIANGLES", - "GL_TRIANGLE_STRIP", - "GL_TRIANGLE_FAN", - "GL_QUADS", - "GL_QUAD_STRIP", - "GL_POLYGON", - "outside begin/end", - "inside unkown primitive", - "unknown state" -}; Index: xc/extras/Mesa/src/context.h diff -u xc/extras/Mesa/src/context.h:1.6 xc/extras/Mesa/src/context.h:removed --- xc/extras/Mesa/src/context.h:1.6 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/context.h Wed Mar 16 21:00:28 2005 @@ -1,239 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef CONTEXT_H -#define CONTEXT_H - - -#include "glapi.h" -#include "mtypes.h" - - -/* - * There are three Mesa datatypes which are meant to be used by device - * drivers: - * GLcontext: this contains the Mesa rendering state - * GLvisual: this describes the color buffer (rgb vs. ci), whether - * or not there's a depth buffer, stencil buffer, etc. - * GLframebuffer: contains pointers to the depth buffer, stencil - * buffer, accum buffer and alpha buffers. - * - * These types should be encapsulated by corresponding device driver - * datatypes. See xmesa.h and xmesaP.h for an example. - * - * In OOP terms, GLcontext, GLvisual, and GLframebuffer are base classes - * which the device driver must derive from. - * - * The following functions create and destroy these datatypes. - */ - - -/* - * Create/destroy a GLvisual. - */ -extern GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint indexBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ); - -extern GLboolean -_mesa_initialize_visual( GLvisual *v, - GLboolean rgbFlag, - GLboolean dbFlag, - GLboolean stereoFlag, - GLint redBits, - GLint greenBits, - GLint blueBits, - GLint alphaBits, - GLint indexBits, - GLint depthBits, - GLint stencilBits, - GLint accumRedBits, - GLint accumGreenBits, - GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ); - -extern void -_mesa_destroy_visual( GLvisual *vis ); - - - -/* - * Create/destroy a GLframebuffer. - */ -extern GLframebuffer * -_mesa_create_framebuffer( const GLvisual *visual, - GLboolean softwareDepth, - GLboolean softwareStencil, - GLboolean softwareAccum, - GLboolean softwareAlpha ); - -extern void -_mesa_initialize_framebuffer( GLframebuffer *fb, - const GLvisual *visual, - GLboolean softwareDepth, - GLboolean softwareStencil, - GLboolean softwareAccum, - GLboolean softwareAlpha ); - -extern void -_mesa_free_framebuffer_data( GLframebuffer *buffer ); - -extern void -_mesa_destroy_framebuffer( GLframebuffer *buffer ); - - - -/* - * Create/destroy a GLcontext. - */ -extern GLcontext * -_mesa_create_context( const GLvisual *visual, - GLcontext *share_list, - void *driver_ctx, - GLboolean direct ); - -extern GLboolean -_mesa_initialize_context( GLcontext *ctx, - const GLvisual *visual, - GLcontext *share_list, - void *driver_ctx, - GLboolean direct ); - -extern void -_mesa_free_context_data( GLcontext *ctx ); - -extern void -_mesa_destroy_context( GLcontext *ctx ); - - -extern void -_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); - - -extern void -_mesa_make_current( GLcontext *ctx, GLframebuffer *buffer ); - - -extern void -_mesa_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer, - GLframebuffer *readBuffer ); - - -extern GLcontext * -_mesa_get_current_context(void); - - - -/* - * Macros for fetching current context. - */ -#ifdef THREADS - -#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context()) - -#else - -#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context - -#endif - - - -/* OpenGL SI-style export functions. */ - -extern GLboolean -_mesa_destroyContext(__GLcontext *gc); - -extern GLboolean -_mesa_loseCurrent(__GLcontext *gc); - -extern GLboolean -_mesa_makeCurrent(__GLcontext *gc); - -extern GLboolean -_mesa_shareContext(__GLcontext *gc, __GLcontext *gcShare); - -extern GLboolean -_mesa_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask); - -extern GLboolean -_mesa_forceCurrent(__GLcontext *gc); - -extern GLboolean -_mesa_notifyResize(__GLcontext *gc); - -extern void -_mesa_notifyDestroy(__GLcontext *gc); - -extern void -_mesa_notifySwapBuffers(__GLcontext *gc); - -extern struct __GLdispatchStateRec * -_mesa_dispatchExec(__GLcontext *gc); - -extern void -_mesa_beginDispatchOverride(__GLcontext *gc); - -extern void -_mesa_endDispatchOverride(__GLcontext *gc); - - - -extern struct _glapi_table * -_mesa_get_dispatch(GLcontext *ctx); - - - -/* - * Miscellaneous - */ - -extern void -_mesa_record_error( GLcontext *ctx, GLenum error ); - - -extern void -_mesa_Finish( void ); - -extern void -_mesa_Flush( void ); - - -#endif Index: xc/extras/Mesa/src/convolve.c diff -u xc/extras/Mesa/src/convolve.c:1.6 xc/extras/Mesa/src/convolve.c:removed --- xc/extras/Mesa/src/convolve.c:1.6 Wed Oct 22 11:27:39 2003 +++ xc/extras/Mesa/src/convolve.c Wed Mar 16 21:00:28 2005 @@ -1,1413 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/convolve.c,v 1.6 2003/10/22 15:27:39 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Image convolution functions. - * - * Notes: filter kernel elements are indexed by and as in - * the GL spec. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "convolve.h" -#include "context.h" -#include "image.h" -#include "mtypes.h" -#include "state.h" - - -/* - * Given an internalFormat token passed to glConvolutionFilter - * or glSeparableFilter, return the corresponding base format. - * Return -1 if invalid token. - */ -static GLint -base_filter_format( GLenum format ) -{ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return GL_ALPHA; - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return GL_INTENSITY; - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return GL_RGB; - case 4: - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_RGBA; - default: - return -1; /* error */ - } -} - - -void -_mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) -{ - GLint baseFormat; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target != GL_CONVOLUTION_1D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(target)"); - return; - } - - baseFormat = base_filter_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(internalFormat)"); - return; - } - - if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter1D(width)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D(format or type)"); - return; - } - - if (format == GL_COLOR_INDEX || - format == GL_STENCIL_INDEX || - format == GL_DEPTH_COMPONENT || - format == GL_INTENSITY || - type == GL_BITMAP) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(format or type)"); - return; - } - - ctx->Convolution1D.Format = format; - ctx->Convolution1D.InternalFormat = internalFormat; - ctx->Convolution1D.Width = width; - ctx->Convolution1D.Height = 1; - - /* unpack filter image */ - _mesa_unpack_float_color_span(ctx, width, GL_RGBA, - ctx->Convolution1D.Filter, - format, type, image, &ctx->Unpack, - 0, GL_FALSE); - - /* apply scale and bias */ - { - const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[0]; - const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[0]; - GLint i; - for (i = 0; i < width; i++) { - GLfloat r = ctx->Convolution1D.Filter[i * 4 + 0]; - GLfloat g = ctx->Convolution1D.Filter[i * 4 + 1]; - GLfloat b = ctx->Convolution1D.Filter[i * 4 + 2]; - GLfloat a = ctx->Convolution1D.Filter[i * 4 + 3]; - r = r * scale[0] + bias[0]; - g = g * scale[1] + bias[1]; - b = b * scale[2] + bias[2]; - a = a * scale[3] + bias[3]; - ctx->Convolution1D.Filter[i * 4 + 0] = r; - ctx->Convolution1D.Filter[i * 4 + 1] = g; - ctx->Convolution1D.Filter[i * 4 + 2] = b; - ctx->Convolution1D.Filter[i * 4 + 3] = a; - } - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - GLint baseFormat; - GLint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target != GL_CONVOLUTION_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(target)"); - return; - } - - baseFormat = base_filter_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(internalFormat)"); - return; - } - - if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(width)"); - return; - } - if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - _mesa_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(height)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D(format or type)"); - return; - } - if (format == GL_COLOR_INDEX || - format == GL_STENCIL_INDEX || - format == GL_DEPTH_COMPONENT || - format == GL_INTENSITY || - type == GL_BITMAP) { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(format or type)"); - return; - } - - /* this should have been caught earlier */ - assert(_mesa_components_in_format(format) > 0); - - ctx->Convolution2D.Format = format; - ctx->Convolution2D.InternalFormat = internalFormat; - ctx->Convolution2D.Width = width; - ctx->Convolution2D.Height = height; - - /* Unpack filter image. We always store filters in RGBA format. */ - for (i = 0; i < height; i++) { - const GLvoid *src = _mesa_image_address(&ctx->Unpack, image, width, - height, format, type, 0, i, 0); - GLfloat *dst = ctx->Convolution2D.Filter + i * width * 4; - _mesa_unpack_float_color_span(ctx, width, GL_RGBA, dst, - format, type, src, &ctx->Unpack, - 0, GL_FALSE); - } - - /* apply scale and bias */ - { - const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[1]; - const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[1]; - for (i = 0; i < width * height; i++) { - GLfloat r = ctx->Convolution2D.Filter[i * 4 + 0]; - GLfloat g = ctx->Convolution2D.Filter[i * 4 + 1]; - GLfloat b = ctx->Convolution2D.Filter[i * 4 + 2]; - GLfloat a = ctx->Convolution2D.Filter[i * 4 + 3]; - r = r * scale[0] + bias[0]; - g = g * scale[1] + bias[1]; - b = b * scale[2] + bias[2]; - a = a * scale[3] + bias[3]; - ctx->Convolution2D.Filter[i * 4 + 0] = r; - ctx->Convolution2D.Filter[i * 4 + 1] = g; - ctx->Convolution2D.Filter[i * 4 + 2] = b; - ctx->Convolution2D.Filter[i * 4 + 3] = a; - } - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint c; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - break; - case GL_CONVOLUTION_2D: - c = 1; - break; - case GL_SEPARABLE_2D: - c = 2; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_MODE: - if (param == (GLfloat) GL_REDUCE || - param == (GLfloat) GL_CONSTANT_BORDER || - param == (GLfloat) GL_REPLICATE_BORDER) { - ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(params)"); - return; - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(pname)"); - return; - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint c; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - break; - case GL_CONVOLUTION_2D: - c = 1; - break; - case GL_SEPARABLE_2D: - c = 2; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - COPY_4V(ctx->Pixel.ConvolutionBorderColor[c], params); - break; - case GL_CONVOLUTION_BORDER_MODE: - if (params[0] == (GLfloat) GL_REDUCE || - params[0] == (GLfloat) GL_CONSTANT_BORDER || - params[0] == (GLfloat) GL_REPLICATE_BORDER) { - ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(params)"); - return; - } - break; - case GL_CONVOLUTION_FILTER_SCALE: - COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params); - break; - case GL_CONVOLUTION_FILTER_BIAS: - COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(pname)"); - return; - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint c; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - break; - case GL_CONVOLUTION_2D: - c = 1; - break; - case GL_SEPARABLE_2D: - c = 2; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_MODE: - if (param == (GLint) GL_REDUCE || - param == (GLint) GL_CONSTANT_BORDER || - param == (GLint) GL_REPLICATE_BORDER) { - ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(params)"); - return; - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(pname)"); - return; - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint c; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - break; - case GL_CONVOLUTION_2D: - c = 1; - break; - case GL_SEPARABLE_2D: - c = 2; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - ctx->Pixel.ConvolutionBorderColor[c][0] = INT_TO_FLOAT(params[0]); - ctx->Pixel.ConvolutionBorderColor[c][1] = INT_TO_FLOAT(params[1]); - ctx->Pixel.ConvolutionBorderColor[c][2] = INT_TO_FLOAT(params[2]); - ctx->Pixel.ConvolutionBorderColor[c][3] = INT_TO_FLOAT(params[3]); - break; - case GL_CONVOLUTION_BORDER_MODE: - if (params[0] == (GLint) GL_REDUCE || - params[0] == (GLint) GL_CONSTANT_BORDER || - params[0] == (GLint) GL_REPLICATE_BORDER) { - ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(params)"); - return; - } - break; - case GL_CONVOLUTION_FILTER_SCALE: - /* COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params); */ - /* need cast to prevent compiler warnings */ - ctx->Pixel.ConvolutionFilterScale[c][0] = (GLfloat) params[0]; - ctx->Pixel.ConvolutionFilterScale[c][1] = (GLfloat) params[1]; - ctx->Pixel.ConvolutionFilterScale[c][2] = (GLfloat) params[2]; - ctx->Pixel.ConvolutionFilterScale[c][3] = (GLfloat) params[3]; - break; - case GL_CONVOLUTION_FILTER_BIAS: - /* COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params); */ - /* need cast to prevent compiler warnings */ - ctx->Pixel.ConvolutionFilterBias[c][0] = (GLfloat) params[0]; - ctx->Pixel.ConvolutionFilterBias[c][1] = (GLfloat) params[1]; - ctx->Pixel.ConvolutionFilterBias[c][2] = (GLfloat) params[2]; - ctx->Pixel.ConvolutionFilterBias[c][3] = (GLfloat) params[3]; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)"); - return; - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width) -{ - GLint baseFormat; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target != GL_CONVOLUTION_1D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(target)"); - return; - } - - baseFormat = base_filter_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(internalFormat)"); - return; - } - - if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter1D(width)"); - return; - } - - ctx->Driver.CopyConvolutionFilter1D( ctx, target, - internalFormat, x, y, width); -} - - -void -_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - GLint baseFormat; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target != GL_CONVOLUTION_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(target)"); - return; - } - - baseFormat = base_filter_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(internalFormat)"); - return; - } - - if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(width)"); - return; - } - if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(height)"); - return; - } - - ctx->Driver.CopyConvolutionFilter2D( ctx, target, internalFormat, x, y, - width, height ); - -} - - -void -_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image) -{ - const struct gl_convolution_attrib *filter; - GLuint row; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); - return; - } - - if (format == GL_COLOR_INDEX || - format == GL_STENCIL_INDEX || - format == GL_DEPTH_COMPONENT || - format == GL_INTENSITY || - type == GL_BITMAP) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); - return; - } - - switch (target) { - case GL_CONVOLUTION_1D: - filter = &(ctx->Convolution1D); - break; - case GL_CONVOLUTION_2D: - filter = &(ctx->Convolution2D); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)"); - return; - } - - for (row = 0; row < filter->Height; row++) { - GLvoid *dst = _mesa_image_address( &ctx->Pack, image, filter->Width, - filter->Height, format, type, - 0, row, 0); - const GLfloat *src = filter->Filter + row * filter->Width * 4; - _mesa_pack_float_rgba_span(ctx, filter->Width, - (const GLfloat (*)[4]) src, - format, type, dst, &ctx->Pack, 0); - } -} - - -void -_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - const struct gl_convolution_attrib *conv; - GLuint c; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - conv = &ctx->Convolution1D; - break; - case GL_CONVOLUTION_2D: - c = 1; - conv = &ctx->Convolution2D; - break; - case GL_SEPARABLE_2D: - c = 2; - conv = &ctx->Separable2D; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - COPY_4V(params, ctx->Pixel.ConvolutionBorderColor[c]); - break; - case GL_CONVOLUTION_BORDER_MODE: - *params = (GLfloat) ctx->Pixel.ConvolutionBorderMode[c]; - break; - case GL_CONVOLUTION_FILTER_SCALE: - COPY_4V(params, ctx->Pixel.ConvolutionFilterScale[c]); - break; - case GL_CONVOLUTION_FILTER_BIAS: - COPY_4V(params, ctx->Pixel.ConvolutionFilterBias[c]); - break; - case GL_CONVOLUTION_FORMAT: - *params = (GLfloat) conv->Format; - break; - case GL_CONVOLUTION_WIDTH: - *params = (GLfloat) conv->Width; - break; - case GL_CONVOLUTION_HEIGHT: - *params = (GLfloat) conv->Height; - break; - case GL_MAX_CONVOLUTION_WIDTH: - *params = (GLfloat) ctx->Const.MaxConvolutionWidth; - break; - case GL_MAX_CONVOLUTION_HEIGHT: - *params = (GLfloat) ctx->Const.MaxConvolutionHeight; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)"); - return; - } -} - - -void -_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - const struct gl_convolution_attrib *conv; - GLuint c; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (target) { - case GL_CONVOLUTION_1D: - c = 0; - conv = &ctx->Convolution1D; - break; - case GL_CONVOLUTION_2D: - c = 1; - conv = &ctx->Convolution2D; - break; - case GL_SEPARABLE_2D: - c = 2; - conv = &ctx->Separable2D; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)"); - return; - } - - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - params[0] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][0]); - params[1] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][1]); - params[2] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][2]); - params[3] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][3]); - break; - case GL_CONVOLUTION_BORDER_MODE: - *params = (GLint) ctx->Pixel.ConvolutionBorderMode[c]; - break; - case GL_CONVOLUTION_FILTER_SCALE: - params[0] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][0]; - params[1] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][1]; - params[2] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][2]; - params[3] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][3]; - break; - case GL_CONVOLUTION_FILTER_BIAS: - params[0] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][0]; - params[1] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][1]; - params[2] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][2]; - params[3] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][3]; - break; - case GL_CONVOLUTION_FORMAT: - *params = (GLint) conv->Format; - break; - case GL_CONVOLUTION_WIDTH: - *params = (GLint) conv->Width; - break; - case GL_CONVOLUTION_HEIGHT: - *params = (GLint) conv->Height; - break; - case GL_MAX_CONVOLUTION_WIDTH: - *params = (GLint) ctx->Const.MaxConvolutionWidth; - break; - case GL_MAX_CONVOLUTION_HEIGHT: - *params = (GLint) ctx->Const.MaxConvolutionHeight; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)"); - return; - } -} - - -void -_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) -{ - const GLint colStart = MAX_CONVOLUTION_WIDTH * 4; - const struct gl_convolution_attrib *filter; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - if (target != GL_SEPARABLE_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter(target)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter(format or type)"); - return; - } - - if (format == GL_COLOR_INDEX || - format == GL_STENCIL_INDEX || - format == GL_DEPTH_COMPONENT || - format == GL_INTENSITY || - type == GL_BITMAP) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)"); - return; - } - - filter = &ctx->Separable2D; - - /* Row filter */ - { - GLvoid *dst = _mesa_image_address( &ctx->Pack, row, filter->Width, - filter->Height, format, type, - 0, 0, 0); - _mesa_pack_float_rgba_span(ctx, filter->Width, - (const GLfloat (*)[4]) filter->Filter, - format, type, dst, &ctx->Pack, 0); - } - - /* Column filter */ - { - GLvoid *dst = _mesa_image_address( &ctx->Pack, column, filter->Width, - 1, format, type, - 0, 0, 0); - const GLfloat *src = filter->Filter + colStart; - _mesa_pack_float_rgba_span(ctx, filter->Height, - (const GLfloat (*)[4]) src, - format, type, dst, &ctx->Pack, 0); - } - - (void) span; /* unused at this time */ -} - - -void -_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) -{ - const GLint colStart = MAX_CONVOLUTION_WIDTH * 4; - GLint baseFormat; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target != GL_SEPARABLE_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(target)"); - return; - } - - baseFormat = base_filter_format(internalFormat); - if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(internalFormat)"); - return; - } - - if (width < 0 || width > MAX_CONVOLUTION_WIDTH) { - _mesa_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(width)"); - return; - } - if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) { - _mesa_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(height)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D(format or type)"); - return; - } - - if (format == GL_COLOR_INDEX || - format == GL_STENCIL_INDEX || - format == GL_DEPTH_COMPONENT || - format == GL_INTENSITY || - type == GL_BITMAP) { - _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(format or type)"); - return; - } - - ctx->Separable2D.Format = format; - ctx->Separable2D.InternalFormat = internalFormat; - ctx->Separable2D.Width = width; - ctx->Separable2D.Height = height; - - /* unpack row filter */ - _mesa_unpack_float_color_span(ctx, width, GL_RGBA, - ctx->Separable2D.Filter, - format, type, row, &ctx->Unpack, - 0, GL_FALSE); - - /* apply scale and bias */ - { - const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[2]; - const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[2]; - GLint i; - for (i = 0; i < width; i++) { - GLfloat r = ctx->Separable2D.Filter[i * 4 + 0]; - GLfloat g = ctx->Separable2D.Filter[i * 4 + 1]; - GLfloat b = ctx->Separable2D.Filter[i * 4 + 2]; - GLfloat a = ctx->Separable2D.Filter[i * 4 + 3]; - r = r * scale[0] + bias[0]; - g = g * scale[1] + bias[1]; - b = b * scale[2] + bias[2]; - a = a * scale[3] + bias[3]; - ctx->Separable2D.Filter[i * 4 + 0] = r; - ctx->Separable2D.Filter[i * 4 + 1] = g; - ctx->Separable2D.Filter[i * 4 + 2] = b; - ctx->Separable2D.Filter[i * 4 + 3] = a; - } - } - - /* unpack column filter */ - _mesa_unpack_float_color_span(ctx, width, GL_RGBA, - &ctx->Separable2D.Filter[colStart], - format, type, column, &ctx->Unpack, - 0, GL_FALSE); - - /* apply scale and bias */ - { - const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[2]; - const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[2]; - GLint i; - for (i = 0; i < width; i++) { - GLfloat r = ctx->Separable2D.Filter[i * 4 + 0 + colStart]; - GLfloat g = ctx->Separable2D.Filter[i * 4 + 1 + colStart]; - GLfloat b = ctx->Separable2D.Filter[i * 4 + 2 + colStart]; - GLfloat a = ctx->Separable2D.Filter[i * 4 + 3 + colStart]; - r = r * scale[0] + bias[0]; - g = g * scale[1] + bias[1]; - b = b * scale[2] + bias[2]; - a = a * scale[3] + bias[3]; - ctx->Separable2D.Filter[i * 4 + 0 + colStart] = r; - ctx->Separable2D.Filter[i * 4 + 1 + colStart] = g; - ctx->Separable2D.Filter[i * 4 + 2 + colStart] = b; - ctx->Separable2D.Filter[i * 4 + 3 + colStart] = a; - } - } - - ctx->NewState |= _NEW_PIXEL; -} - - -/**********************************************************************/ -/*** image convolution functions ***/ -/**********************************************************************/ - -static void -convolve_1d_reduce(GLint srcWidth, const GLfloat src[][4], - GLint filterWidth, const GLfloat filter[][4], - GLfloat dest[][4]) -{ - GLint dstWidth; - GLint i, n; - - if (filterWidth >= 1) - dstWidth = srcWidth - (filterWidth - 1); - else - dstWidth = srcWidth; - - if (dstWidth <= 0) - return; /* null result */ - - for (i = 0; i < dstWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (n = 0; n < filterWidth; n++) { - sumR += src[i + n][RCOMP] * filter[n][RCOMP]; - sumG += src[i + n][GCOMP] * filter[n][GCOMP]; - sumB += src[i + n][BCOMP] * filter[n][BCOMP]; - sumA += src[i + n][ACOMP] * filter[n][ACOMP]; - } - dest[i][RCOMP] = sumR; - dest[i][GCOMP] = sumG; - dest[i][BCOMP] = sumB; - dest[i][ACOMP] = sumA; - } -} - - -static void -convolve_1d_constant(GLint srcWidth, const GLfloat src[][4], - GLint filterWidth, const GLfloat filter[][4], - GLfloat dest[][4], - const GLfloat borderColor[4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - GLint i, n; - - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (n = 0; n < filterWidth; n++) { - if (i + n < halfFilterWidth || i + n - halfFilterWidth >= srcWidth) { - sumR += borderColor[RCOMP] * filter[n][RCOMP]; - sumG += borderColor[GCOMP] * filter[n][GCOMP]; - sumB += borderColor[BCOMP] * filter[n][BCOMP]; - sumA += borderColor[ACOMP] * filter[n][ACOMP]; - } - else { - sumR += src[i + n - halfFilterWidth][RCOMP] * filter[n][RCOMP]; - sumG += src[i + n - halfFilterWidth][GCOMP] * filter[n][GCOMP]; - sumB += src[i + n - halfFilterWidth][BCOMP] * filter[n][BCOMP]; - sumA += src[i + n - halfFilterWidth][ACOMP] * filter[n][ACOMP]; - } - } - dest[i][RCOMP] = sumR; - dest[i][GCOMP] = sumG; - dest[i][BCOMP] = sumB; - dest[i][ACOMP] = sumA; - } -} - - -static void -convolve_1d_replicate(GLint srcWidth, const GLfloat src[][4], - GLint filterWidth, const GLfloat filter[][4], - GLfloat dest[][4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - GLint i, n; - - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (n = 0; n < filterWidth; n++) { - if (i + n < halfFilterWidth) { - sumR += src[0][RCOMP] * filter[n][RCOMP]; - sumG += src[0][GCOMP] * filter[n][GCOMP]; - sumB += src[0][BCOMP] * filter[n][BCOMP]; - sumA += src[0][ACOMP] * filter[n][ACOMP]; - } - else if (i + n - halfFilterWidth >= srcWidth) { - sumR += src[srcWidth - 1][RCOMP] * filter[n][RCOMP]; - sumG += src[srcWidth - 1][GCOMP] * filter[n][GCOMP]; - sumB += src[srcWidth - 1][BCOMP] * filter[n][BCOMP]; - sumA += src[srcWidth - 1][ACOMP] * filter[n][ACOMP]; - } - else { - sumR += src[i + n - halfFilterWidth][RCOMP] * filter[n][RCOMP]; - sumG += src[i + n - halfFilterWidth][GCOMP] * filter[n][GCOMP]; - sumB += src[i + n - halfFilterWidth][BCOMP] * filter[n][BCOMP]; - sumA += src[i + n - halfFilterWidth][ACOMP] * filter[n][ACOMP]; - } - } - dest[i][RCOMP] = sumR; - dest[i][GCOMP] = sumG; - dest[i][BCOMP] = sumB; - dest[i][ACOMP] = sumA; - } -} - - -static void -convolve_2d_reduce(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat filter[][4], - GLfloat dest[][4]) -{ - GLint dstWidth, dstHeight; - GLint i, j, n, m; - - if (filterWidth >= 1) - dstWidth = srcWidth - (filterWidth - 1); - else - dstWidth = srcWidth; - - if (filterHeight >= 1) - dstHeight = srcHeight - (filterHeight - 1); - else - dstHeight = srcHeight; - - if (dstWidth <= 0 || dstHeight <= 0) - return; - - for (j = 0; j < dstHeight; j++) { - for (i = 0; i < dstWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - const GLint k = (j + m) * srcWidth + i + n; - const GLint f = m * filterWidth + n; - sumR += src[k][RCOMP] * filter[f][RCOMP]; - sumG += src[k][GCOMP] * filter[f][GCOMP]; - sumB += src[k][BCOMP] * filter[f][BCOMP]; - sumA += src[k][ACOMP] * filter[f][ACOMP]; - } - } - dest[j * dstWidth + i][RCOMP] = sumR; - dest[j * dstWidth + i][GCOMP] = sumG; - dest[j * dstWidth + i][BCOMP] = sumB; - dest[j * dstWidth + i][ACOMP] = sumA; - } - } -} - - -static void -convolve_2d_constant(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat filter[][4], - GLfloat dest[][4], - const GLfloat borderColor[4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - const GLint halfFilterHeight = filterHeight / 2; - GLint i, j, n, m; - - for (j = 0; j < srcHeight; j++) { - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - const GLint f = m * filterWidth + n; - const GLint is = i + n - halfFilterWidth; - const GLint js = j + m - halfFilterHeight; - if (is < 0 || is >= srcWidth || - js < 0 || js >= srcHeight) { - sumR += borderColor[RCOMP] * filter[f][RCOMP]; - sumG += borderColor[GCOMP] * filter[f][GCOMP]; - sumB += borderColor[BCOMP] * filter[f][BCOMP]; - sumA += borderColor[ACOMP] * filter[f][ACOMP]; - } - else { - const GLint k = js * srcWidth + is; - sumR += src[k][RCOMP] * filter[f][RCOMP]; - sumG += src[k][GCOMP] * filter[f][GCOMP]; - sumB += src[k][BCOMP] * filter[f][BCOMP]; - sumA += src[k][ACOMP] * filter[f][ACOMP]; - } - } - } - dest[j * srcWidth + i][RCOMP] = sumR; - dest[j * srcWidth + i][GCOMP] = sumG; - dest[j * srcWidth + i][BCOMP] = sumB; - dest[j * srcWidth + i][ACOMP] = sumA; - } - } -} - - -static void -convolve_2d_replicate(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat filter[][4], - GLfloat dest[][4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - const GLint halfFilterHeight = filterHeight / 2; - GLint i, j, n, m; - - for (j = 0; j < srcHeight; j++) { - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - const GLint f = m * filterWidth + n; - GLint is = i + n - halfFilterWidth; - GLint js = j + m - halfFilterHeight; - GLint k; - if (is < 0) - is = 0; - else if (is >= srcWidth) - is = srcWidth - 1; - if (js < 0) - js = 0; - else if (js >= srcHeight) - js = srcHeight - 1; - k = js * srcWidth + is; - sumR += src[k][RCOMP] * filter[f][RCOMP]; - sumG += src[k][GCOMP] * filter[f][GCOMP]; - sumB += src[k][BCOMP] * filter[f][BCOMP]; - sumA += src[k][ACOMP] * filter[f][ACOMP]; - } - } - dest[j * srcWidth + i][RCOMP] = sumR; - dest[j * srcWidth + i][GCOMP] = sumG; - dest[j * srcWidth + i][BCOMP] = sumB; - dest[j * srcWidth + i][ACOMP] = sumA; - } - } -} - - -static void -convolve_sep_reduce(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat rowFilt[][4], - const GLfloat colFilt[][4], - GLfloat dest[][4]) -{ - GLint dstWidth, dstHeight; - GLint i, j, n, m; - - if (filterWidth >= 1) - dstWidth = srcWidth - (filterWidth - 1); - else - dstWidth = srcWidth; - - if (filterHeight >= 1) - dstHeight = srcHeight - (filterHeight - 1); - else - dstHeight = srcHeight; - - if (dstWidth <= 0 || dstHeight <= 0) - return; - - for (j = 0; j < dstHeight; j++) { - for (i = 0; i < dstWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - GLint k = (j + m) * srcWidth + i + n; - sumR += src[k][RCOMP] * rowFilt[n][RCOMP] * colFilt[m][RCOMP]; - sumG += src[k][GCOMP] * rowFilt[n][GCOMP] * colFilt[m][GCOMP]; - sumB += src[k][BCOMP] * rowFilt[n][BCOMP] * colFilt[m][BCOMP]; - sumA += src[k][ACOMP] * rowFilt[n][ACOMP] * colFilt[m][ACOMP]; - } - } - dest[j * dstWidth + i][RCOMP] = sumR; - dest[j * dstWidth + i][GCOMP] = sumG; - dest[j * dstWidth + i][BCOMP] = sumB; - dest[j * dstWidth + i][ACOMP] = sumA; - } - } -} - - -static void -convolve_sep_constant(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat rowFilt[][4], - const GLfloat colFilt[][4], - GLfloat dest[][4], - const GLfloat borderColor[4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - const GLint halfFilterHeight = filterHeight / 2; - GLint i, j, n, m; - - for (j = 0; j < srcHeight; j++) { - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - const GLint is = i + n - halfFilterWidth; - const GLint js = j + m - halfFilterHeight; - if (is < 0 || is >= srcWidth || - js < 0 || js >= srcHeight) { - sumR += borderColor[RCOMP] * rowFilt[n][RCOMP] * colFilt[m][RCOMP]; - sumG += borderColor[GCOMP] * rowFilt[n][GCOMP] * colFilt[m][GCOMP]; - sumB += borderColor[BCOMP] * rowFilt[n][BCOMP] * colFilt[m][BCOMP]; - sumA += borderColor[ACOMP] * rowFilt[n][ACOMP] * colFilt[m][ACOMP]; - } - else { - GLint k = js * srcWidth + is; - sumR += src[k][RCOMP] * rowFilt[n][RCOMP] * colFilt[m][RCOMP]; - sumG += src[k][GCOMP] * rowFilt[n][GCOMP] * colFilt[m][GCOMP]; - sumB += src[k][BCOMP] * rowFilt[n][BCOMP] * colFilt[m][BCOMP]; - sumA += src[k][ACOMP] * rowFilt[n][ACOMP] * colFilt[m][ACOMP]; - } - - } - } - dest[j * srcWidth + i][RCOMP] = sumR; - dest[j * srcWidth + i][GCOMP] = sumG; - dest[j * srcWidth + i][BCOMP] = sumB; - dest[j * srcWidth + i][ACOMP] = sumA; - } - } -} - - -static void -convolve_sep_replicate(GLint srcWidth, GLint srcHeight, - const GLfloat src[][4], - GLint filterWidth, GLint filterHeight, - const GLfloat rowFilt[][4], - const GLfloat colFilt[][4], - GLfloat dest[][4]) -{ - const GLint halfFilterWidth = filterWidth / 2; - const GLint halfFilterHeight = filterHeight / 2; - GLint i, j, n, m; - - for (j = 0; j < srcHeight; j++) { - for (i = 0; i < srcWidth; i++) { - GLfloat sumR = 0.0; - GLfloat sumG = 0.0; - GLfloat sumB = 0.0; - GLfloat sumA = 0.0; - for (m = 0; m < filterHeight; m++) { - for (n = 0; n < filterWidth; n++) { - GLint is = i + n - halfFilterWidth; - GLint js = j + m - halfFilterHeight; - GLint k; - if (is < 0) - is = 0; - else if (is >= srcWidth) - is = srcWidth - 1; - if (js < 0) - js = 0; - else if (js >= srcHeight) - js = srcHeight - 1; - k = js * srcWidth + is; - sumR += src[k][RCOMP] * rowFilt[n][RCOMP] * colFilt[m][RCOMP]; - sumG += src[k][GCOMP] * rowFilt[n][GCOMP] * colFilt[m][GCOMP]; - sumB += src[k][BCOMP] * rowFilt[n][BCOMP] * colFilt[m][BCOMP]; - sumA += src[k][ACOMP] * rowFilt[n][ACOMP] * colFilt[m][ACOMP]; - } - } - dest[j * srcWidth + i][RCOMP] = sumR; - dest[j * srcWidth + i][GCOMP] = sumG; - dest[j * srcWidth + i][BCOMP] = sumB; - dest[j * srcWidth + i][ACOMP] = sumA; - } - } -} - - - -void -_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, - const GLfloat *srcImage, GLfloat *dstImage) -{ - switch (ctx->Pixel.ConvolutionBorderMode[0]) { - case GL_REDUCE: - convolve_1d_reduce(*width, (const GLfloat (*)[4]) srcImage, - ctx->Convolution1D.Width, - (const GLfloat (*)[4]) ctx->Convolution1D.Filter, - (GLfloat (*)[4]) dstImage); - *width = *width - (MAX2(ctx->Convolution1D.Width, 1) - 1); - break; - case GL_CONSTANT_BORDER: - convolve_1d_constant(*width, (const GLfloat (*)[4]) srcImage, - ctx->Convolution1D.Width, - (const GLfloat (*)[4]) ctx->Convolution1D.Filter, - (GLfloat (*)[4]) dstImage, - ctx->Pixel.ConvolutionBorderColor[0]); - break; - case GL_REPLICATE_BORDER: - convolve_1d_replicate(*width, (const GLfloat (*)[4]) srcImage, - ctx->Convolution1D.Width, - (const GLfloat (*)[4]) ctx->Convolution1D.Filter, - (GLfloat (*)[4]) dstImage); - break; - default: - ; - } -} - - -void -_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage) -{ - switch (ctx->Pixel.ConvolutionBorderMode[1]) { - case GL_REDUCE: - convolve_2d_reduce(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Convolution2D.Width, - ctx->Convolution2D.Height, - (const GLfloat (*)[4]) ctx->Convolution2D.Filter, - (GLfloat (*)[4]) dstImage); - *width = *width - (MAX2(ctx->Convolution2D.Width, 1) - 1); - *height = *height - (MAX2(ctx->Convolution2D.Height, 1) - 1); - break; - case GL_CONSTANT_BORDER: - convolve_2d_constant(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Convolution2D.Width, - ctx->Convolution2D.Height, - (const GLfloat (*)[4]) ctx->Convolution2D.Filter, - (GLfloat (*)[4]) dstImage, - ctx->Pixel.ConvolutionBorderColor[1]); - break; - case GL_REPLICATE_BORDER: - convolve_2d_replicate(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Convolution2D.Width, - ctx->Convolution2D.Height, - (const GLfloat (*)[4])ctx->Convolution2D.Filter, - (GLfloat (*)[4]) dstImage); - break; - default: - ; - } -} - - -void -_mesa_convolve_sep_image(const GLcontext *ctx, - GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage) -{ - const GLfloat *rowFilter = ctx->Separable2D.Filter; - const GLfloat *colFilter = rowFilter + 4 * MAX_CONVOLUTION_WIDTH; - - switch (ctx->Pixel.ConvolutionBorderMode[2]) { - case GL_REDUCE: - convolve_sep_reduce(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Separable2D.Width, - ctx->Separable2D.Height, - (const GLfloat (*)[4]) rowFilter, - (const GLfloat (*)[4]) colFilter, - (GLfloat (*)[4]) dstImage); - *width = *width - (MAX2(ctx->Separable2D.Width, 1) - 1); - *height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1); - break; - case GL_CONSTANT_BORDER: - convolve_sep_constant(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Separable2D.Width, - ctx->Separable2D.Height, - (const GLfloat (*)[4]) rowFilter, - (const GLfloat (*)[4]) colFilter, - (GLfloat (*)[4]) dstImage, - ctx->Pixel.ConvolutionBorderColor[2]); - break; - case GL_REPLICATE_BORDER: - convolve_sep_replicate(*width, *height, - (const GLfloat (*)[4]) srcImage, - ctx->Separable2D.Width, - ctx->Separable2D.Height, - (const GLfloat (*)[4]) rowFilter, - (const GLfloat (*)[4]) colFilter, - (GLfloat (*)[4]) dstImage); - break; - default: - ; - } -} - - - -/* - * This function computes an image's size after convolution. - * If the convolution border mode is GL_REDUCE, the post-convolution - * image will be smaller than the original. - */ -void -_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, - GLsizei *width, GLsizei *height) -{ - if (ctx->Pixel.Convolution1DEnabled - && dimensions == 1 - && ctx->Pixel.ConvolutionBorderMode[0] == GL_REDUCE) { - *width = *width - (MAX2(ctx->Convolution1D.Width, 1) - 1); - } - else if (ctx->Pixel.Convolution2DEnabled - && dimensions > 1 - && ctx->Pixel.ConvolutionBorderMode[1] == GL_REDUCE) { - *width = *width - (MAX2(ctx->Convolution2D.Width, 1) - 1); - *height = *height - (MAX2(ctx->Convolution2D.Height, 1) - 1); - } - else if (ctx->Pixel.Separable2DEnabled - && dimensions > 1 - && ctx->Pixel.ConvolutionBorderMode[2] == GL_REDUCE) { - *width = *width - (MAX2(ctx->Separable2D.Width, 1) - 1); - *height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1); - } -} Index: xc/extras/Mesa/src/convolve.h diff -u xc/extras/Mesa/src/convolve.h:1.2 xc/extras/Mesa/src/convolve.h:removed --- xc/extras/Mesa/src/convolve.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/convolve.h Wed Mar 16 21:00:28 2005 @@ -1,107 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef CONVOLVE_H -#define CONVOLVE_H - - -#include "mtypes.h" - - -extern void -_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, - GLenum format, GLenum type, const GLvoid *image); - -extern void -_mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, - GLsizei height, GLenum format, GLenum type, - const GLvoid *image); - -extern void -_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat params); - -extern void -_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - -extern void -_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint params); - -extern void -_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params); - -extern void -_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width); - -extern void -_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height); - -extern void -_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, - GLvoid *image); - -extern void -_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params); - -extern void -_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params); - -extern void -_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, - GLvoid *row, GLvoid *column, GLvoid *span); - -extern void -_mesa_SeparableFilter2D(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *row, const GLvoid *column); - - - -extern void -_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, - const GLfloat *srcImage, GLfloat *dstImage); - - -extern void -_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage); - - -extern void -_mesa_convolve_sep_image(const GLcontext *ctx, - GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage); - - -extern void -_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, - GLsizei *width, GLsizei *height); - - -#endif Index: xc/extras/Mesa/src/dd.h diff -u xc/extras/Mesa/src/dd.h:1.19 xc/extras/Mesa/src/dd.h:removed --- xc/extras/Mesa/src/dd.h:1.19 Wed Oct 22 11:44:41 2003 +++ xc/extras/Mesa/src/dd.h Wed Mar 16 21:00:28 2005 @@ -1,699 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -#ifndef DD_INCLUDED -#define DD_INCLUDED - -/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */ - -struct gl_pixelstore_attrib; - -/* Mask bits sent to the driver Clear() function */ -#define DD_FRONT_LEFT_BIT FRONT_LEFT_BIT /* 1 */ -#define DD_FRONT_RIGHT_BIT FRONT_RIGHT_BIT /* 2 */ -#define DD_BACK_LEFT_BIT BACK_LEFT_BIT /* 4 */ -#define DD_BACK_RIGHT_BIT BACK_RIGHT_BIT /* 8 */ -#define DD_AUX0 AUX0_BIT /* future use */ -#define DD_AUX1 AUX1_BIT /* future use */ -#define DD_AUX2 AUX2_BIT /* future use */ -#define DD_AUX3 AUX3_BIT /* future use */ -#define DD_DEPTH_BIT GL_DEPTH_BUFFER_BIT /* 0x00000100 */ -#define DD_ACCUM_BIT GL_ACCUM_BUFFER_BIT /* 0x00000200 */ -#define DD_STENCIL_BIT GL_STENCIL_BUFFER_BIT /* 0x00000400 */ - - -/* - * Device Driver function table. - */ -struct dd_function_table { - - const GLubyte * (*GetString)( GLcontext *ctx, GLenum name ); - /* Return a string as needed by glGetString(). - * Only the GL_RENDERER token must be implemented. Otherwise, - * NULL can be returned. - */ - - void (*UpdateState)( GLcontext *ctx, GLuint new_state ); - /* - * UpdateState() is called to notify the driver after Mesa has made - * some internal state changes. This is in addition to any - * statechange callbacks Mesa may already have made. - */ - - void (*Clear)( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint x, GLint y, GLint width, GLint height ); - /* Clear the color/depth/stencil/accum buffer(s). - * 'mask' is a bitmask of the DD_*_BIT values defined above that indicates - * which buffers need to be cleared. - * If 'all' is true then the clear the whole buffer, else clear only the - * region defined by (x,y,width,height). - * This function must obey the glColorMask, glIndexMask and glStencilMask - * settings! - * Software Mesa can do masked clears if the device driver can't. - */ - - void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); - /* - * Specifies the current buffer for writing. Called via glDrawBuffer(). - * Note the driver must organize fallbacks (eg with swrast) if it - * cannot implement the requested mode. - */ - - - void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); - /* - * Specifies the current buffer for reading. Called via glReadBuffer(). - */ - - void (*GetBufferSize)( GLframebuffer *buffer, - GLuint *width, GLuint *height ); - /* - * Returns the width and height of the named buffer/window. - * Mesa uses this to determine when the driver's window size has changed. - */ - - void (*ResizeBuffers)( GLframebuffer *buffer ); - /* - * Resize the driver's depth/stencil/accum/back buffers to match the - * size given in the GLframebuffer struct. This is typically called - * when Mesa detects that a window size has changed. - */ - - void (*Finish)( GLcontext *ctx ); - /* - * This is called whenever glFinish() is called. - */ - - void (*Flush)( GLcontext *ctx ); - /* - * This is called whenever glFlush() is called. - */ - - void (*Error)( GLcontext *ctx ); - /* - * Called whenever an error is generated. ctx->ErrorValue contains - * the error value. - */ - - - /*** - *** For hardware accumulation buffer: - ***/ - void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value, - GLint xpos, GLint ypos, GLint width, GLint height ); - /* Execute glAccum command within the given scissor region. - */ - - - /*** - *** glDraw/Read/CopyPixels and glBitmap functions: - ***/ - - void (*DrawPixels)( GLcontext *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels ); - /* This is called by glDrawPixels. - * 'unpack' describes how to unpack the source image data. - */ - - void (*ReadPixels)( GLcontext *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - GLvoid *dest ); - /* Called by glReadPixels. - */ - - void (*CopyPixels)( GLcontext *ctx, - GLint srcx, GLint srcy, - GLsizei width, GLsizei height, - GLint dstx, GLint dsty, GLenum type ); - /* Do a glCopyPixels. This function must respect all rasterization - * state, glPixelTransfer, glPixelZoom, etc. - */ - - void (*Bitmap)( GLcontext *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - const struct gl_pixelstore_attrib *unpack, - const GLubyte *bitmap ); - /* This is called by glBitmap. Works the same as DrawPixels, above. - */ - - /*** - *** Texture image functions: - ***/ - const struct gl_texture_format * - (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat, - GLenum srcFormat, GLenum srcType ); - /* This is called by the _mesa_store_tex[sub]image[123]d() fallback - * functions. The driver should examine and return a - * pointer to an appropriate gl_texture_format. - */ - - void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - /* Called by glTexImage1/2/3D. - * Arguments: - * , , , and are user specified. - * indicates the image packing of pixels. - * is the target texture object. - * is the target texture image. It will have the texture - * width, height, depth, border and internalFormat information. - * is returned by this function and indicates whether - * core Mesa should keep an internal copy of the texture image. - * Drivers should call a fallback routine from texstore.c if needed. - */ - - void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLenum type, - const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLint depth, - GLenum format, GLenum type, - const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - /* Called by glTexSubImage1/2/3D. - * Arguments: - * , , , , , , , - * , , and are user specified. - * indicates the image packing of pixels. - * is the target texture object. - * is the target texture image. It will have the texture - * width, height, border and internalFormat information. - * The driver should use a fallback routine from texstore.c if needed. - */ - - void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level, - GLenum internalFormat, GLint x, GLint y, - GLsizei width, GLint border ); - void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level, - GLenum internalFormat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border ); - /* Called by glCopyTexImage1D and glCopyTexImage2D. - * Drivers should use a fallback routine from texstore.c if needed. - */ - - void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, - GLint x, GLint y, GLsizei width ); - void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLsizei height ); - void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, - GLsizei width, GLsizei height ); - /* Called by glCopyTexSubImage1/2/3D. - * Drivers should use a fallback routine from texstore.c if needed. - */ - - GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLenum format, GLenum type, - GLint width, GLint height, - GLint depth, GLint border); - /* Called by glTexImage[123]D when user specifies a proxy texture - * target. Return GL_TRUE if the proxy test passes, return GL_FALSE - * if the test fails. - */ - - /*** - *** Compressed texture functions: - ***/ - - void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage ); - /* Called by glCompressedTexImage1/2/3D. - * Arguments: - * , , , are user specified. - * is the target texture object. - * is the target texture image. It will have the texture - * width, height, depth, border and internalFormat information. - * is returned by this function and indicates whether - * core Mesa should keep an internal copy of the texture image. - * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa - * should do the job. - */ - - void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLint height, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLint height, GLint depth, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - /* Called by glCompressedTexSubImage1/2/3D. - * Arguments: - * , , , , , , - * , and are user specified. - * is the target texture object. - * is the target texture image. It will have the texture - * width, height, depth, border and internalFormat information. - * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa - * should do the job. - */ - - /*** - *** Texture object functions: - ***/ - - void (*BindTexture)( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj ); - /* Called by glBindTexture(). - */ - - void (*CreateTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); - /* Called when a texture object is created. - */ - - void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); - /* Called when a texture object is about to be deallocated. Driver - * should free anything attached to the DriverData pointers. - */ - - GLboolean (*IsTextureResident)( GLcontext *ctx, - struct gl_texture_object *t ); - /* Called by glAreTextureResident(). - */ - - void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, - GLclampf priority ); - /* Called by glPrioritizeTextures(). - */ - - void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); - /* Called by glActiveTextureARB to set current texture unit. - */ - - void (*UpdateTexturePalette)( GLcontext *ctx, - struct gl_texture_object *tObj ); - /* Called when the texture's color lookup table is changed. - * If tObj is NULL then the shared texture palette ctx->Texture.Palette - * is to be updated. - */ - - /*** - *** Imaging functionality: - ***/ - void (*CopyColorTable)( GLcontext *ctx, - GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width ); - - void (*CopyColorSubTable)( GLcontext *ctx, - GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width ); - - void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target, - GLenum internalFormat, - GLint x, GLint y, GLsizei width ); - - void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target, - GLenum internalFormat, - GLint x, GLint y, - GLsizei width, GLsizei height ); - - - - /*** - *** State-changing functions (drawing functions are above) - *** - *** These functions are called by their corresponding OpenGL API functions. - *** They're ALSO called by the gl_PopAttrib() function!!! - *** May add more functions like these to the device driver in the future. - ***/ - void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); - void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); - void (*BlendEquation)(GLcontext *ctx, GLenum mode); - void (*BlendFunc)(GLcontext *ctx, GLenum sfactor, GLenum dfactor); - void (*BlendFuncSeparate)(GLcontext *ctx, - GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA); - void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); - void (*ClearDepth)(GLcontext *ctx, GLclampd d); - void (*ClearIndex)(GLcontext *ctx, GLuint index); - void (*ClearStencil)(GLcontext *ctx, GLint s); - void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); - void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, - GLboolean bmask, GLboolean amask ); - void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); - void (*CullFace)(GLcontext *ctx, GLenum mode); - void (*FrontFace)(GLcontext *ctx, GLenum mode); - void (*DepthFunc)(GLcontext *ctx, GLenum func); - void (*DepthMask)(GLcontext *ctx, GLboolean flag); - void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval); - void (*Enable)(GLcontext* ctx, GLenum cap, GLboolean state); - void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); - void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); - void (*IndexMask)(GLcontext *ctx, GLuint mask); - void (*Lightfv)(GLcontext *ctx, GLenum light, - GLenum pname, const GLfloat *params ); - void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); - void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); - void (*LineWidth)(GLcontext *ctx, GLfloat width); - void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); - void (*PointParameterfv)(GLcontext *ctx, GLenum pname, - const GLfloat *params); - void (*PointSize)(GLcontext *ctx, GLfloat size); - void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); - void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); - void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); - void (*RenderMode)(GLcontext *ctx, GLenum mode ); - void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); - void (*ShadeModel)(GLcontext *ctx, GLenum mode); - void (*StencilFunc)(GLcontext *ctx, GLenum func, GLint ref, GLuint mask); - void (*StencilMask)(GLcontext *ctx, GLuint mask); - void (*StencilOp)(GLcontext *ctx, GLenum fail, GLenum zfail, GLenum zpass); - void (*ActiveStencilFace)(GLcontext *ctx, GLuint face); - void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, - const GLfloat *params); - void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, - const GLfloat *param); - void (*TexParameter)(GLcontext *ctx, GLenum target, - struct gl_texture_object *texObj, - GLenum pname, const GLfloat *params); - void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); - void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); - - /*** - *** Vertex array functions - *** - *** Called by the corresponding OpenGL functions. - ***/ - void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*NormalPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*FogCoordPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*IndexPointer)(GLcontext *ctx, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); - void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, - GLenum type, GLsizei stride, const GLvoid *ptr); - - - /*** State-query functions - *** - *** Return GL_TRUE if query was completed, GL_FALSE otherwise. - ***/ - GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result); - GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result); - GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result); - GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); - GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); - - /*** - *** Support for multiple t&l engines - ***/ - - GLuint NeedValidate; - /* Bitmask of state changes that require the current tnl module to be - * validated, using ValidateTnlModule() below. - */ - - void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state ); - /* Validate the current tnl module. This is called directly after - * UpdateState() when a state change that has occured matches the - * NeedValidate bitmask above. This ensures all computed values are - * up to date, thus allowing the driver to decide if the current tnl - * module needs to be swapped out. - * - * This must be non-NULL if a driver installs a custom tnl module and - * sets the NeedValidate bitmask, but may be NULL otherwise. - */ - - -#define PRIM_OUTSIDE_BEGIN_END GL_POLYGON+1 -#define PRIM_INSIDE_UNKNOWN_PRIM GL_POLYGON+2 -#define PRIM_UNKNOWN GL_POLYGON+3 - - GLuint CurrentExecPrimitive; - /* Set by the driver-supplied t&l engine. Set to - * PRIM_OUTSIDE_BEGIN_END when outside begin/end. - */ - - GLuint CurrentSavePrimitive; - /* Current state of an in-progress compilation. May take on any of - * the additional values defined above. - */ - - -#define FLUSH_STORED_VERTICES 0x1 -#define FLUSH_UPDATE_CURRENT 0x2 - GLuint NeedFlush; - /* Set by the driver-supplied t&l engine whenever vertices are - * buffered between begin/end objects or ctx->Current is not uptodate. - * - * The FlushVertices() call below may be used to resolve - * these conditions. - */ - - void (*FlushVertices)( GLcontext *ctx, GLuint flags ); - /* If inside begin/end, ASSERT(0). - * Otherwise, - * if (flags & FLUSH_STORED_VERTICES) flushes any buffered vertices, - * if (flags & FLUSH_UPDATE_CURRENT) updates ctx->Current - * and ctx->Light.Material - * - * Note that the default t&l engine never clears the - * FLUSH_UPDATE_CURRENT bit, even after performing the update. - */ - - void (*LightingSpaceChange)( GLcontext *ctx ); - /* Notify driver that the special derived value _NeedEyeCoords has - * changed. - */ - - void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); - void (*EndList)( GLcontext *ctx ); - /* Let the t&l component know what is going on with display lists - * in time to make changes to dispatch tables, etc. - * Called by glNewList() and glEndList(), respectively. - */ - - void (*BeginCallList)( GLcontext *ctx, GLuint list ); - void (*EndCallList)( GLcontext *ctx ); - /* Notify the t&l component before and after calling a display list. - * Called by glCallList(s), but not recursively. - */ - - void (*MakeCurrent)( GLcontext *ctx, GLframebuffer *drawBuffer, - GLframebuffer *readBuffer ); - /* Let the t&l component know when the context becomes current. - */ - - - void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); - void (*UnlockArraysEXT)( GLcontext *ctx ); - /* Called by glLockArraysEXT() and glUnlockArraysEXT(), respectively. - */ -}; - - - -/* - * Transform/Clip/Lighting interface - */ -typedef struct { - void (*ArrayElement)( GLint ); /* NOTE */ - void (*Color3f)( GLfloat, GLfloat, GLfloat ); - void (*Color3fv)( const GLfloat * ); - void (*Color3ub)( GLubyte, GLubyte, GLubyte ); - void (*Color3ubv)( const GLubyte * ); - void (*Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); - void (*Color4fv)( const GLfloat * ); - void (*Color4ub)( GLubyte, GLubyte, GLubyte, GLubyte ); - void (*Color4ubv)( const GLubyte * ); - void (*EdgeFlag)( GLboolean ); - void (*EdgeFlagv)( const GLboolean * ); - void (*EvalCoord1f)( GLfloat ); /* NOTE */ - void (*EvalCoord1fv)( const GLfloat * ); /* NOTE */ - void (*EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */ - void (*EvalCoord2fv)( const GLfloat * ); /* NOTE */ - void (*EvalPoint1)( GLint ); /* NOTE */ - void (*EvalPoint2)( GLint, GLint ); /* NOTE */ - void (*FogCoordfEXT)( GLfloat ); - void (*FogCoordfvEXT)( const GLfloat * ); - void (*Indexi)( GLint ); - void (*Indexiv)( const GLint * ); - void (*Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */ - void (*MultiTexCoord1fARB)( GLenum, GLfloat ); - void (*MultiTexCoord1fvARB)( GLenum, const GLfloat * ); - void (*MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); - void (*MultiTexCoord2fvARB)( GLenum, const GLfloat * ); - void (*MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); - void (*MultiTexCoord3fvARB)( GLenum, const GLfloat * ); - void (*MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); - void (*MultiTexCoord4fvARB)( GLenum, const GLfloat * ); - void (*Normal3f)( GLfloat, GLfloat, GLfloat ); - void (*Normal3fv)( const GLfloat * ); - void (*SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); - void (*SecondaryColor3fvEXT)( const GLfloat * ); - void (*SecondaryColor3ubEXT)( GLubyte, GLubyte, GLubyte ); - void (*SecondaryColor3ubvEXT)( const GLubyte * ); - void (*TexCoord1f)( GLfloat ); - void (*TexCoord1fv)( const GLfloat * ); - void (*TexCoord2f)( GLfloat, GLfloat ); - void (*TexCoord2fv)( const GLfloat * ); - void (*TexCoord3f)( GLfloat, GLfloat, GLfloat ); - void (*TexCoord3fv)( const GLfloat * ); - void (*TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); - void (*TexCoord4fv)( const GLfloat * ); - void (*Vertex2f)( GLfloat, GLfloat ); - void (*Vertex2fv)( const GLfloat * ); - void (*Vertex3f)( GLfloat, GLfloat, GLfloat ); - void (*Vertex3fv)( const GLfloat * ); - void (*Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); - void (*Vertex4fv)( const GLfloat * ); - void (*CallList)( GLuint ); /* NOTE */ - void (*Begin)( GLenum ); - void (*End)( void ); - void (*VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); - void (*VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); - - /* Drivers present a reduced set of the functions possible in - * begin/end objects. Core mesa provides translation stubs for the - * remaining functions to map down to these entrypoints. - * - * These are the initial values to be installed into dispatch by - * mesa. If the t&l driver wants to modify the dispatch table - * while installed, it must do so itself. It would be possible for - * the vertexformat to install it's own initial values for these - * functions, but this way there is an obvious list of what is - * expected of the driver. - * - * If the driver wants to hook in entrypoints other than those - * listed above, it must restore them to their original values in - * the disable() callback, below. - */ - - void (*Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); - /* - */ - - void (*DrawArrays)( GLenum mode, GLint start, GLsizei count ); - void (*DrawElements)( GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices ); - void (*DrawRangeElements)( GLenum mode, GLuint start, - GLuint end, GLsizei count, - GLenum type, const GLvoid *indices ); - /* These may or may not belong here. Heuristic: If an array is - * enabled, the installed vertex format should support that array and - * it's current size natively. - */ - - void (*EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); - void (*EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); - /* If you don't support eval, fallback to the default vertex format - * on receiving an eval call and use the pipeline mechanism to - * provide partial t&l acceleration. - * - * Mesa will provide a set of helper functions to do eval within - * accelerated vertex formats, eventually... - */ - - GLboolean prefer_float_colors; - /* Should core try to send colors to glColor4f or glColor4chan, - * where it has a choice? - */ -} GLvertexformat; - - -#endif /* DD_INCLUDED */ Index: xc/extras/Mesa/src/debug.c diff -u xc/extras/Mesa/src/debug.c:1.3 xc/extras/Mesa/src/debug.c:removed --- xc/extras/Mesa/src/debug.c:1.3 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/debug.c Wed Mar 16 21:00:28 2005 @@ -1,89 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "mtypes.h" -#include "context.h" -#include "imports.h" -#include "debug.h" - - -void -_mesa_print_state( const char *msg, GLuint state ) -{ - _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", - msg, - state, - (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "", - (state & _NEW_PROJECTION) ? "ctx->Projection, " : "", - (state & _NEW_TEXTURE_MATRIX) ? "ctx->TextureMatrix, " : "", - (state & _NEW_COLOR_MATRIX) ? "ctx->ColorMatrix, " : "", - (state & _NEW_ACCUM) ? "ctx->Accum, " : "", - (state & _NEW_COLOR) ? "ctx->Color, " : "", - (state & _NEW_DEPTH) ? "ctx->Depth, " : "", - (state & _NEW_EVAL) ? "ctx->Eval/EvalMap, " : "", - (state & _NEW_FOG) ? "ctx->Fog, " : "", - (state & _NEW_HINT) ? "ctx->Hint, " : "", - (state & _NEW_LIGHT) ? "ctx->Light, " : "", - (state & _NEW_LINE) ? "ctx->Line, " : "", - (state & _NEW_PIXEL) ? "ctx->Pixel, " : "", - (state & _NEW_POINT) ? "ctx->Point, " : "", - (state & _NEW_POLYGON) ? "ctx->Polygon, " : "", - (state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "", - (state & _NEW_SCISSOR) ? "ctx->Scissor, " : "", - (state & _NEW_TEXTURE) ? "ctx->Texture, " : "", - (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "", - (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", - (state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "", - (state & _NEW_ARRAY) ? "ctx->Array, " : "", - (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "", - (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : ""); -} - - - -void -_mesa_print_tri_caps( const char *name, GLuint flags ) -{ - _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", - name, - flags, - (flags & DD_FLATSHADE) ? "flat-shade, " : "", - (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "", - (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "", - (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "", - (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "", - (flags & DD_TRI_OFFSET) ? "tri-offset, " : "", - (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "", - (flags & DD_LINE_SMOOTH) ? "line-smooth, " : "", - (flags & DD_LINE_STIPPLE) ? "line-stipple, " : "", - (flags & DD_LINE_WIDTH) ? "line-wide, " : "", - (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "", - (flags & DD_POINT_SIZE) ? "point-size, " : "", - (flags & DD_POINT_ATTEN) ? "point-atten, " : "", - (flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : "" - ); -} Index: xc/extras/Mesa/src/debug.h diff -u xc/extras/Mesa/src/debug.h:1.2 xc/extras/Mesa/src/debug.h:removed --- xc/extras/Mesa/src/debug.h:1.2 Mon Dec 16 11:18:26 2002 +++ xc/extras/Mesa/src/debug.h Wed Mar 16 21:00:29 2005 @@ -1,33 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _DEBUG_H -#define _DEBUG_H - -void _mesa_print_tri_caps( const char *name, GLuint flags ); -void _mesa_print_enable_flags( const char *msg, GLuint flags ); -void _mesa_print_state( const char *msg, GLuint state ); - -#endif Index: xc/extras/Mesa/src/depth.c diff -u xc/extras/Mesa/src/depth.c:1.8 xc/extras/Mesa/src/depth.c:removed --- xc/extras/Mesa/src/depth.c:1.8 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/depth.c Wed Mar 16 21:00:29 2005 @@ -1,117 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "enums.h" -#include "depth.h" -#include "macros.h" -#include "mtypes.h" - - -/**********************************************************************/ -/***** API Functions *****/ -/**********************************************************************/ - - - -void -_mesa_ClearDepth( GLclampd depth ) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat tmp = (GLfloat) CLAMP( depth, 0.0, 1.0 ); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Depth.Clear == tmp) - return; - - FLUSH_VERTICES(ctx, _NEW_DEPTH); - ctx->Depth.Clear = tmp; - if (ctx->Driver.ClearDepth) - (*ctx->Driver.ClearDepth)( ctx, ctx->Depth.Clear ); -} - - - -void -_mesa_DepthFunc( GLenum func ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func)); - - switch (func) { - case GL_LESS: /* (default) pass if incoming z < stored z */ - case GL_GEQUAL: - case GL_LEQUAL: - case GL_GREATER: - case GL_NOTEQUAL: - case GL_EQUAL: - case GL_ALWAYS: - case GL_NEVER: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glDepth.Func" ); - return; - } - - if (ctx->Depth.Func == func) - return; - - FLUSH_VERTICES(ctx, _NEW_DEPTH); - ctx->Depth.Func = func; - - if (ctx->Driver.DepthFunc) - ctx->Driver.DepthFunc( ctx, func ); -} - - - -void -_mesa_DepthMask( GLboolean flag ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glDepthMask %d\n", flag); - - /* - * GL_TRUE indicates depth buffer writing is enabled (default) - * GL_FALSE indicates depth buffer writing is disabled - */ - if (ctx->Depth.Mask == flag) - return; - - FLUSH_VERTICES(ctx, _NEW_DEPTH); - ctx->Depth.Mask = flag; - - if (ctx->Driver.DepthMask) - ctx->Driver.DepthMask( ctx, flag ); -} Index: xc/extras/Mesa/src/depth.h diff -u xc/extras/Mesa/src/depth.h:1.5 xc/extras/Mesa/src/depth.h:removed --- xc/extras/Mesa/src/depth.h:1.5 Fri Feb 22 14:25:27 2002 +++ xc/extras/Mesa/src/depth.h Wed Mar 16 21:00:29 2005 @@ -1,52 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef DEPTH_H -#define DEPTH_H - - -#include "mtypes.h" - - -/* - * Immediate-mode API entrpoints - */ - -extern void -_mesa_ClearDepth( GLclampd depth ); - - -extern void -_mesa_DepthFunc( GLenum func ); - - -extern void -_mesa_DepthMask( GLboolean flag ); - - - - -#endif Index: xc/extras/Mesa/src/dispatch.c diff -u xc/extras/Mesa/src/dispatch.c:1.4 xc/extras/Mesa/src/dispatch.c:removed --- xc/extras/Mesa/src/dispatch.c:1.4 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/dispatch.c Wed Mar 16 21:00:29 2005 @@ -1,90 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file generates all the gl* function entyrpoints. - * But if we're using X86-optimized dispatch (X86/glapi_x86.S) then - * we don't use this code. - * - * NOTE: This file should _not_ be used when compiling Mesa for a DRI- - * based device driver. - * - */ - - -#include "glheader.h" -#include "glapi.h" -#include "glapitable.h" -#include "glthread.h" - - -#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) - -#if defined(WIN32) -#define KEYWORD1 GLAPI -#else -#define KEYWORD1 -#endif - -#define KEYWORD2 GLAPIENTRY - -#if defined(USE_MGL_NAMESPACE) -#define NAME(func) mgl##func -#else -#define NAME(func) gl##func -#endif - - -#if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */ - -#define F stdout -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - (_glapi_Dispatch->FUNC) ARGS; - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return (_glapi_Dispatch->FUNC) ARGS - -#else - -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - (_glapi_Dispatch->FUNC) ARGS; - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return (_glapi_Dispatch->FUNC) ARGS - -#endif /* logging */ - - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#include "glapitemp.h" - - -#endif /* USE_X86_ASM */ Index: xc/extras/Mesa/src/dlist.c diff -u xc/extras/Mesa/src/dlist.c:1.13 xc/extras/Mesa/src/dlist.c:removed --- xc/extras/Mesa/src/dlist.c:1.13 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/dlist.c Wed Mar 16 21:00:29 2005 @@ -1,6484 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "api_loopback.h" -#include "attrib.h" -#include "blend.h" -#include "buffers.h" -#include "clip.h" -#include "colormac.h" -#include "colortab.h" -#include "context.h" -#include "convolve.h" -#include "depth.h" -#include "dlist.h" -#include "enable.h" -#include "enums.h" -#include "eval.h" -#include "extensions.h" -#include "feedback.h" -#include "get.h" -#include "glapi.h" -#include "hash.h" -#include "histogram.h" -#include "image.h" -#include "light.h" -#include "lines.h" -#include "dlist.h" -#include "macros.h" -#include "matrix.h" -#include "pixel.h" -#include "points.h" -#include "polygon.h" -#include "state.h" -#include "texobj.h" -#include "teximage.h" -#include "texstate.h" -#include "mtypes.h" -#include "varray.h" -#if FEATURE_NV_vertex_program -#include "vpstate.h" -#endif - -#include "math/m_matrix.h" -#include "math/m_xform.h" - - - -/* -Functions which aren't compiled but executed immediately: - glIsList - glGenLists - glDeleteLists - glEndList --- BUT: call ctx->Driver.EndList at end of list execution? - glFeedbackBuffer - glSelectBuffer - glRenderMode - glReadPixels - glPixelStore - glFlush - glFinish - glIsEnabled - glGet* - -Functions which cause errors if called while compiling a display list: - glNewList -*/ - - - -/* - * Display list instructions are stored as sequences of "nodes". Nodes - * are allocated in blocks. Each block has BLOCK_SIZE nodes. Blocks - * are linked together with a pointer. - */ - - -/* How many nodes to allocate at a time: - * - reduced now that we hold vertices etc. elsewhere. - */ -#define BLOCK_SIZE 256 - - -/* - * Display list opcodes. - * - * The fact that these identifiers are assigned consecutive - * integer values starting at 0 is very important, see InstSize array usage) - * - */ -typedef enum { - OPCODE_ACCUM, - OPCODE_ALPHA_FUNC, - OPCODE_BIND_TEXTURE, - OPCODE_BITMAP, - OPCODE_BLEND_COLOR, - OPCODE_BLEND_EQUATION, - OPCODE_BLEND_FUNC, - OPCODE_BLEND_FUNC_SEPARATE, - OPCODE_CALL_LIST, - OPCODE_CALL_LIST_OFFSET, - OPCODE_CLEAR, - OPCODE_CLEAR_ACCUM, - OPCODE_CLEAR_COLOR, - OPCODE_CLEAR_DEPTH, - OPCODE_CLEAR_INDEX, - OPCODE_CLEAR_STENCIL, - OPCODE_CLIP_PLANE, - OPCODE_COLOR_MASK, - OPCODE_COLOR_MATERIAL, - OPCODE_COLOR_TABLE, - OPCODE_COLOR_TABLE_PARAMETER_FV, - OPCODE_COLOR_TABLE_PARAMETER_IV, - OPCODE_COLOR_SUB_TABLE, - OPCODE_CONVOLUTION_FILTER_1D, - OPCODE_CONVOLUTION_FILTER_2D, - OPCODE_CONVOLUTION_PARAMETER_I, - OPCODE_CONVOLUTION_PARAMETER_IV, - OPCODE_CONVOLUTION_PARAMETER_F, - OPCODE_CONVOLUTION_PARAMETER_FV, - OPCODE_COPY_COLOR_SUB_TABLE, - OPCODE_COPY_COLOR_TABLE, - OPCODE_COPY_PIXELS, - OPCODE_COPY_TEX_IMAGE1D, - OPCODE_COPY_TEX_IMAGE2D, - OPCODE_COPY_TEX_SUB_IMAGE1D, - OPCODE_COPY_TEX_SUB_IMAGE2D, - OPCODE_COPY_TEX_SUB_IMAGE3D, - OPCODE_CULL_FACE, - OPCODE_DEPTH_FUNC, - OPCODE_DEPTH_MASK, - OPCODE_DEPTH_RANGE, - OPCODE_DISABLE, - OPCODE_DRAW_BUFFER, - OPCODE_DRAW_PIXELS, - OPCODE_ENABLE, - OPCODE_EVALMESH1, - OPCODE_EVALMESH2, - OPCODE_FOG, - OPCODE_FRONT_FACE, - OPCODE_FRUSTUM, - OPCODE_HINT, - OPCODE_HISTOGRAM, - OPCODE_INDEX_MASK, - OPCODE_INIT_NAMES, - OPCODE_LIGHT, - OPCODE_LIGHT_MODEL, - OPCODE_LINE_STIPPLE, - OPCODE_LINE_WIDTH, - OPCODE_LIST_BASE, - OPCODE_LOAD_IDENTITY, - OPCODE_LOAD_MATRIX, - OPCODE_LOAD_NAME, - OPCODE_LOGIC_OP, - OPCODE_MAP1, - OPCODE_MAP2, - OPCODE_MAPGRID1, - OPCODE_MAPGRID2, - OPCODE_MATRIX_MODE, - OPCODE_MIN_MAX, - OPCODE_MULT_MATRIX, - OPCODE_ORTHO, - OPCODE_PASSTHROUGH, - OPCODE_PIXEL_MAP, - OPCODE_PIXEL_TRANSFER, - OPCODE_PIXEL_ZOOM, - OPCODE_POINT_SIZE, - OPCODE_POINT_PARAMETERS, - OPCODE_POLYGON_MODE, - OPCODE_POLYGON_STIPPLE, - OPCODE_POLYGON_OFFSET, - OPCODE_POP_ATTRIB, - OPCODE_POP_MATRIX, - OPCODE_POP_NAME, - OPCODE_PRIORITIZE_TEXTURE, - OPCODE_PUSH_ATTRIB, - OPCODE_PUSH_MATRIX, - OPCODE_PUSH_NAME, - OPCODE_RASTER_POS, - OPCODE_READ_BUFFER, - OPCODE_RESET_HISTOGRAM, - OPCODE_RESET_MIN_MAX, - OPCODE_ROTATE, - OPCODE_SCALE, - OPCODE_SCISSOR, - OPCODE_SELECT_TEXTURE_SGIS, - OPCODE_SELECT_TEXTURE_COORD_SET, - OPCODE_SHADE_MODEL, - OPCODE_STENCIL_FUNC, - OPCODE_STENCIL_MASK, - OPCODE_STENCIL_OP, - OPCODE_TEXENV, - OPCODE_TEXGEN, - OPCODE_TEXPARAMETER, - OPCODE_TEX_IMAGE1D, - OPCODE_TEX_IMAGE2D, - OPCODE_TEX_IMAGE3D, - OPCODE_TEX_SUB_IMAGE1D, - OPCODE_TEX_SUB_IMAGE2D, - OPCODE_TEX_SUB_IMAGE3D, - OPCODE_TRANSLATE, - OPCODE_VIEWPORT, - OPCODE_WINDOW_POS, - /* GL_ARB_multitexture */ - OPCODE_ACTIVE_TEXTURE, - /* GL_SGIX/SGIS_pixel_texture */ - OPCODE_PIXEL_TEXGEN_SGIX, - OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, - /* GL_ARB_texture_compression */ - OPCODE_COMPRESSED_TEX_IMAGE_1D, - OPCODE_COMPRESSED_TEX_IMAGE_2D, - OPCODE_COMPRESSED_TEX_IMAGE_3D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, - /* GL_ARB_multisample */ - OPCODE_SAMPLE_COVERAGE, - /* GL_ARB_window_pos */ - OPCODE_WINDOW_POS_ARB, - /* GL_NV_vertex_program */ - OPCODE_BIND_PROGRAM_NV, - OPCODE_EXECUTE_PROGRAM_NV, - OPCODE_REQUEST_PROGRAMS_RESIDENT_NV, - OPCODE_LOAD_PROGRAM_NV, - OPCODE_PROGRAM_PARAMETER4F_NV, - OPCODE_TRACK_MATRIX_NV, - /* GL_EXT_stencil_two_side */ - OPCODE_ACTIVE_STENCIL_FACE_EXT, - /* The following three are meta instructions */ - OPCODE_ERROR, /* raise compiled-in error */ - OPCODE_CONTINUE, - OPCODE_END_OF_LIST, - OPCODE_DRV_0 -} OpCode; - - -/* - * Each instruction in the display list is stored as a sequence of - * contiguous nodes in memory. - * Each node is the union of a variety of datatypes. - */ -union node { - OpCode opcode; - GLboolean b; - GLbitfield bf; - GLubyte ub; - GLshort s; - GLushort us; - GLint i; - GLuint ui; - GLenum e; - GLfloat f; - GLvoid *data; - void *next; /* If prev node's opcode==OPCODE_CONTINUE */ -}; - - - -/* Number of nodes of storage needed for each instruction. Sizes for - * dynamically allocated opcodes are stored in the context struct. - */ -static GLuint InstSize[ OPCODE_END_OF_LIST+1 ]; - -void mesa_print_display_list( GLuint list ); - - -/**********************************************************************/ -/***** Private *****/ -/**********************************************************************/ - - - - - -/* - * Make an empty display list. This is used by glGenLists() to - * reserver display list IDs. - */ -static Node *make_empty_list( void ) -{ - Node *n = (Node *) MALLOC( sizeof(Node) ); - n[0].opcode = OPCODE_END_OF_LIST; - return n; -} - - - -/* - * Destroy all nodes in a display list. - * Input: list - display list number - */ -void _mesa_destroy_list( GLcontext *ctx, GLuint list ) -{ - Node *n, *block; - GLboolean done; - - if (list==0) - return; - - block = (Node *) _mesa_HashLookup(ctx->Shared->DisplayList, list); - n = block; - - done = block ? GL_FALSE : GL_TRUE; - while (!done) { - - /* check for extension opcodes first */ - - GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0; - if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) { - ctx->listext.opcode[i].destroy(ctx, &n[1]); - n += ctx->listext.opcode[i].size; - } - else { - switch (n[0].opcode) { - case OPCODE_MAP1: - FREE(n[6].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_MAP2: - FREE(n[10].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_DRAW_PIXELS: - FREE( n[5].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_BITMAP: - FREE( n[7].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COLOR_TABLE: - FREE( n[6].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COLOR_SUB_TABLE: - FREE( n[6].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONVOLUTION_FILTER_1D: - FREE( n[6].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONVOLUTION_FILTER_2D: - FREE( n[7].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_POLYGON_STIPPLE: - FREE( n[1].data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_IMAGE1D: - FREE(n[8].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_IMAGE2D: - FREE( n[9]. data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_IMAGE3D: - FREE( n[10]. data ); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_SUB_IMAGE1D: - FREE(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_SUB_IMAGE2D: - FREE(n[9].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_TEX_SUB_IMAGE3D: - FREE(n[11].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_IMAGE_1D: - FREE(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_IMAGE_2D: - FREE(n[8].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_IMAGE_3D: - FREE(n[9].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: - FREE(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: - FREE(n[9].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: - FREE(n[11].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONTINUE: - n = (Node *) n[1].next; - FREE( block ); - block = n; - break; - case OPCODE_END_OF_LIST: - FREE( block ); - done = GL_TRUE; - break; - default: - /* Most frequent case */ - n += InstSize[n[0].opcode]; - break; - } - } - } - - _mesa_HashRemove(ctx->Shared->DisplayList, list); -} - - - -/* - * Translate the nth element of list from type to GLuint. - */ -static GLuint translate_id( GLsizei n, GLenum type, const GLvoid *list ) -{ - GLbyte *bptr; - GLubyte *ubptr; - GLshort *sptr; - GLushort *usptr; - GLint *iptr; - GLuint *uiptr; - GLfloat *fptr; - - switch (type) { - case GL_BYTE: - bptr = (GLbyte *) list; - return (GLuint) *(bptr+n); - case GL_UNSIGNED_BYTE: - ubptr = (GLubyte *) list; - return (GLuint) *(ubptr+n); - case GL_SHORT: - sptr = (GLshort *) list; - return (GLuint) *(sptr+n); - case GL_UNSIGNED_SHORT: - usptr = (GLushort *) list; - return (GLuint) *(usptr+n); - case GL_INT: - iptr = (GLint *) list; - return (GLuint) *(iptr+n); - case GL_UNSIGNED_INT: - uiptr = (GLuint *) list; - return (GLuint) *(uiptr+n); - case GL_FLOAT: - fptr = (GLfloat *) list; - return (GLuint) *(fptr+n); - case GL_2_BYTES: - ubptr = ((GLubyte *) list) + 2*n; - return (GLuint) *ubptr * 256 + (GLuint) *(ubptr+1); - case GL_3_BYTES: - ubptr = ((GLubyte *) list) + 3*n; - return (GLuint) *ubptr * 65536 - + (GLuint) *(ubptr+1) * 256 - + (GLuint) *(ubptr+2); - case GL_4_BYTES: - ubptr = ((GLubyte *) list) + 4*n; - return (GLuint) *ubptr * 16777216 - + (GLuint) *(ubptr+1) * 65536 - + (GLuint) *(ubptr+2) * 256 - + (GLuint) *(ubptr+3); - default: - return 0; - } -} - - - - -/**********************************************************************/ -/***** Public *****/ -/**********************************************************************/ - -void _mesa_init_lists( void ) -{ - static int init_flag = 0; - - if (init_flag==0) { - InstSize[OPCODE_ACCUM] = 3; - InstSize[OPCODE_ALPHA_FUNC] = 3; - InstSize[OPCODE_BIND_TEXTURE] = 3; - InstSize[OPCODE_BITMAP] = 8; - InstSize[OPCODE_BLEND_COLOR] = 5; - InstSize[OPCODE_BLEND_EQUATION] = 2; - InstSize[OPCODE_BLEND_FUNC] = 3; - InstSize[OPCODE_BLEND_FUNC_SEPARATE] = 5; - InstSize[OPCODE_CALL_LIST] = 2; - InstSize[OPCODE_CALL_LIST_OFFSET] = 3; - InstSize[OPCODE_CLEAR] = 2; - InstSize[OPCODE_CLEAR_ACCUM] = 5; - InstSize[OPCODE_CLEAR_COLOR] = 5; - InstSize[OPCODE_CLEAR_DEPTH] = 2; - InstSize[OPCODE_CLEAR_INDEX] = 2; - InstSize[OPCODE_CLEAR_STENCIL] = 2; - InstSize[OPCODE_CLIP_PLANE] = 6; - InstSize[OPCODE_COLOR_MASK] = 5; - InstSize[OPCODE_COLOR_MATERIAL] = 3; - InstSize[OPCODE_COLOR_TABLE] = 7; - InstSize[OPCODE_COLOR_TABLE_PARAMETER_FV] = 7; - InstSize[OPCODE_COLOR_TABLE_PARAMETER_IV] = 7; - InstSize[OPCODE_COLOR_SUB_TABLE] = 7; - InstSize[OPCODE_CONVOLUTION_FILTER_1D] = 7; - InstSize[OPCODE_CONVOLUTION_FILTER_2D] = 8; - InstSize[OPCODE_CONVOLUTION_PARAMETER_I] = 4; - InstSize[OPCODE_CONVOLUTION_PARAMETER_IV] = 7; - InstSize[OPCODE_CONVOLUTION_PARAMETER_F] = 4; - InstSize[OPCODE_CONVOLUTION_PARAMETER_FV] = 7; - InstSize[OPCODE_COPY_PIXELS] = 6; - InstSize[OPCODE_COPY_COLOR_SUB_TABLE] = 6; - InstSize[OPCODE_COPY_COLOR_TABLE] = 6; - InstSize[OPCODE_COPY_TEX_IMAGE1D] = 8; - InstSize[OPCODE_COPY_TEX_IMAGE2D] = 9; - InstSize[OPCODE_COPY_TEX_SUB_IMAGE1D] = 7; - InstSize[OPCODE_COPY_TEX_SUB_IMAGE2D] = 9; - InstSize[OPCODE_COPY_TEX_SUB_IMAGE3D] = 10; - InstSize[OPCODE_CULL_FACE] = 2; - InstSize[OPCODE_DEPTH_FUNC] = 2; - InstSize[OPCODE_DEPTH_MASK] = 2; - InstSize[OPCODE_DEPTH_RANGE] = 3; - InstSize[OPCODE_DISABLE] = 2; - InstSize[OPCODE_DRAW_BUFFER] = 2; - InstSize[OPCODE_DRAW_PIXELS] = 6; - InstSize[OPCODE_ENABLE] = 2; - InstSize[OPCODE_EVALMESH1] = 4; - InstSize[OPCODE_EVALMESH2] = 6; - InstSize[OPCODE_FOG] = 6; - InstSize[OPCODE_FRONT_FACE] = 2; - InstSize[OPCODE_FRUSTUM] = 7; - InstSize[OPCODE_HINT] = 3; - InstSize[OPCODE_HISTOGRAM] = 5; - InstSize[OPCODE_INDEX_MASK] = 2; - InstSize[OPCODE_INIT_NAMES] = 1; - InstSize[OPCODE_LIGHT] = 7; - InstSize[OPCODE_LIGHT_MODEL] = 6; - InstSize[OPCODE_LINE_STIPPLE] = 3; - InstSize[OPCODE_LINE_WIDTH] = 2; - InstSize[OPCODE_LIST_BASE] = 2; - InstSize[OPCODE_LOAD_IDENTITY] = 1; - InstSize[OPCODE_LOAD_MATRIX] = 17; - InstSize[OPCODE_LOAD_NAME] = 2; - InstSize[OPCODE_LOGIC_OP] = 2; - InstSize[OPCODE_MAP1] = 7; - InstSize[OPCODE_MAP2] = 11; - InstSize[OPCODE_MAPGRID1] = 4; - InstSize[OPCODE_MAPGRID2] = 7; - InstSize[OPCODE_MATRIX_MODE] = 2; - InstSize[OPCODE_MIN_MAX] = 4; - InstSize[OPCODE_MULT_MATRIX] = 17; - InstSize[OPCODE_ORTHO] = 7; - InstSize[OPCODE_PASSTHROUGH] = 2; - InstSize[OPCODE_PIXEL_MAP] = 4; - InstSize[OPCODE_PIXEL_TRANSFER] = 3; - InstSize[OPCODE_PIXEL_ZOOM] = 3; - InstSize[OPCODE_POINT_SIZE] = 2; - InstSize[OPCODE_POINT_PARAMETERS] = 5; - InstSize[OPCODE_POLYGON_MODE] = 3; - InstSize[OPCODE_POLYGON_STIPPLE] = 2; - InstSize[OPCODE_POLYGON_OFFSET] = 3; - InstSize[OPCODE_POP_ATTRIB] = 1; - InstSize[OPCODE_POP_MATRIX] = 1; - InstSize[OPCODE_POP_NAME] = 1; - InstSize[OPCODE_PRIORITIZE_TEXTURE] = 3; - InstSize[OPCODE_PUSH_ATTRIB] = 2; - InstSize[OPCODE_PUSH_MATRIX] = 1; - InstSize[OPCODE_PUSH_NAME] = 2; - InstSize[OPCODE_RASTER_POS] = 5; - InstSize[OPCODE_READ_BUFFER] = 2; - InstSize[OPCODE_RESET_HISTOGRAM] = 2; - InstSize[OPCODE_RESET_MIN_MAX] = 2; - InstSize[OPCODE_ROTATE] = 5; - InstSize[OPCODE_SCALE] = 4; - InstSize[OPCODE_SCISSOR] = 5; - InstSize[OPCODE_STENCIL_FUNC] = 4; - InstSize[OPCODE_STENCIL_MASK] = 2; - InstSize[OPCODE_STENCIL_OP] = 4; - InstSize[OPCODE_SHADE_MODEL] = 2; - InstSize[OPCODE_TEXENV] = 7; - InstSize[OPCODE_TEXGEN] = 7; - InstSize[OPCODE_TEXPARAMETER] = 7; - InstSize[OPCODE_TEX_IMAGE1D] = 9; - InstSize[OPCODE_TEX_IMAGE2D] = 10; - InstSize[OPCODE_TEX_IMAGE3D] = 11; - InstSize[OPCODE_TEX_SUB_IMAGE1D] = 8; - InstSize[OPCODE_TEX_SUB_IMAGE2D] = 10; - InstSize[OPCODE_TEX_SUB_IMAGE3D] = 12; - InstSize[OPCODE_TRANSLATE] = 4; - InstSize[OPCODE_VIEWPORT] = 5; - InstSize[OPCODE_WINDOW_POS] = 5; - InstSize[OPCODE_CONTINUE] = 2; - InstSize[OPCODE_ERROR] = 3; - InstSize[OPCODE_END_OF_LIST] = 1; - /* GL_SGIX/SGIS_pixel_texture */ - InstSize[OPCODE_PIXEL_TEXGEN_SGIX] = 2; - InstSize[OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS] = 3; - /* GL_ARB_texture_compression */ - InstSize[OPCODE_COMPRESSED_TEX_IMAGE_1D] = 8; - InstSize[OPCODE_COMPRESSED_TEX_IMAGE_2D] = 9; - InstSize[OPCODE_COMPRESSED_TEX_IMAGE_3D] = 10; - InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D] = 8; - InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D] = 10; - InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D] = 12; - /* GL_ARB_multisample */ - InstSize[OPCODE_SAMPLE_COVERAGE] = 3; - /* GL_ARB_multitexture */ - InstSize[OPCODE_ACTIVE_TEXTURE] = 2; - /* GL_ARB_window_pos */ - InstSize[OPCODE_WINDOW_POS_ARB] = 4; - /* GL_NV_vertex_program */ - InstSize[OPCODE_BIND_PROGRAM_NV] = 3; - InstSize[OPCODE_EXECUTE_PROGRAM_NV] = 7; - InstSize[OPCODE_REQUEST_PROGRAMS_RESIDENT_NV] = 2; - InstSize[OPCODE_LOAD_PROGRAM_NV] = 4; - InstSize[OPCODE_PROGRAM_PARAMETER4F_NV] = 7; - InstSize[OPCODE_TRACK_MATRIX_NV] = 5; - /* GL_EXT_stencil_two_side */ - InstSize[OPCODE_ACTIVE_STENCIL_FACE_EXT] = 2; - } - init_flag = 1; -} - - -/* - * Allocate space for a display list instruction. - * Input: opcode - type of instruction - * argcount - size in bytes of data required. - * Return: pointer to the usable data area (not including the internal - * opcode). - */ -void * -_mesa_alloc_instruction( GLcontext *ctx, int opcode, GLint sz ) -{ - Node *n, *newblock; - GLuint count = 1 + (sz + sizeof(Node) - 1) / sizeof(Node); - -#ifdef DEBUG - if (opcode < (int) OPCODE_DRV_0) { - assert( count == InstSize[opcode] ); - } -#endif - - if (ctx->CurrentPos + count + 2 > BLOCK_SIZE) { - /* This block is full. Allocate a new block and chain to it */ - n = ctx->CurrentBlock + ctx->CurrentPos; - n[0].opcode = OPCODE_CONTINUE; - newblock = (Node *) MALLOC( sizeof(Node) * BLOCK_SIZE ); - if (!newblock) { - _mesa_error( ctx, GL_OUT_OF_MEMORY, "Building display list" ); - return NULL; - } - n[1].next = (Node *) newblock; - ctx->CurrentBlock = newblock; - ctx->CurrentPos = 0; - } - - n = ctx->CurrentBlock + ctx->CurrentPos; - ctx->CurrentPos += count; - - n[0].opcode = (OpCode) opcode; - - return (void *)&n[1]; -} - - -/* Allow modules and drivers to get their own opcodes. - */ -int -_mesa_alloc_opcode( GLcontext *ctx, - GLuint sz, - void (*execute)( GLcontext *, void * ), - void (*destroy)( GLcontext *, void * ), - void (*print)( GLcontext *, void * ) ) -{ - if (ctx->listext.nr_opcodes < GL_MAX_EXT_OPCODES) { - GLuint i = ctx->listext.nr_opcodes++; - ctx->listext.opcode[i].size = 1 + (sz + sizeof(Node) - 1)/sizeof(Node); - ctx->listext.opcode[i].execute = execute; - ctx->listext.opcode[i].destroy = destroy; - ctx->listext.opcode[i].print = print; - return i + OPCODE_DRV_0; - } - return -1; -} - - - -/* Mimic the old behaviour of alloc_instruction: - * - sz is in units of sizeof(Node) - * - return value a pointer to sizeof(Node) before the actual - * usable data area. - */ -#define ALLOC_INSTRUCTION(ctx, opcode, sz) \ - ((Node *)_mesa_alloc_instruction(ctx, opcode, sz*sizeof(Node)) - 1) - - - -/* - * Display List compilation functions - */ -static void save_Accum( GLenum op, GLfloat value ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ACCUM, 2 ); - if (n) { - n[1].e = op; - n[2].f = value; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Accum)( op, value ); - } -} - - -static void save_AlphaFunc( GLenum func, GLclampf ref ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ALPHA_FUNC, 2 ); - if (n) { - n[1].e = func; - n[2].f = (GLfloat) ref; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->AlphaFunc)( func, ref ); - } -} - - -static void save_BindTexture( GLenum target, GLuint texture ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_TEXTURE, 2 ); - if (n) { - n[1].e = target; - n[2].ui = texture; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BindTexture)( target, texture ); - } -} - - -static void save_Bitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, - GLfloat xmove, GLfloat ymove, - const GLubyte *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image = _mesa_unpack_bitmap( width, height, pixels, &ctx->Unpack ); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BITMAP, 7 ); - if (n) { - n[1].i = (GLint) width; - n[2].i = (GLint) height; - n[3].f = xorig; - n[4].f = yorig; - n[5].f = xmove; - n[6].f = ymove; - n[7].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Bitmap)( width, height, - xorig, yorig, xmove, ymove, pixels ); - } -} - - -static void save_BlendEquation( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_EQUATION, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BlendEquation)( mode ); - } -} - - -static void save_BlendFunc( GLenum sfactor, GLenum dfactor ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC, 2 ); - if (n) { - n[1].e = sfactor; - n[2].e = dfactor; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BlendFunc)( sfactor, dfactor ); - } -} - - -static void save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_FUNC_SEPARATE, 4 ); - if (n) { - n[1].e = sfactorRGB; - n[2].e = dfactorRGB; - n[3].e = sfactorA; - n[4].e = dfactorA; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BlendFuncSeparateEXT)( sfactorRGB, dfactorRGB, - sfactorA, dfactorA); - } -} - - -static void save_BlendColor( GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BLEND_COLOR, 4 ); - if (n) { - n[1].f = red; - n[2].f = green; - n[3].f = blue; - n[4].f = alpha; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BlendColor)( red, green, blue, alpha ); - } -} - - -void _mesa_save_CallList( GLuint list ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - - n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST, 1 ); - if (n) { - n[1].ui = list; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CallList)( list ); - } -} - - -void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - GLboolean typeErrorFlag; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_2_BYTES: - case GL_3_BYTES: - case GL_4_BYTES: - typeErrorFlag = GL_FALSE; - break; - default: - typeErrorFlag = GL_TRUE; - } - - for (i=0;iExecuteFlag) { - (*ctx->Exec->CallLists)( n, type, lists ); - } -} - - -static void save_Clear( GLbitfield mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR, 1 ); - if (n) { - n[1].bf = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Clear)( mask ); - } -} - - -static void save_ClearAccum( GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_ACCUM, 4 ); - if (n) { - n[1].f = red; - n[2].f = green; - n[3].f = blue; - n[4].f = alpha; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClearAccum)( red, green, blue, alpha ); - } -} - - -static void save_ClearColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_COLOR, 4 ); - if (n) { - n[1].f = red; - n[2].f = green; - n[3].f = blue; - n[4].f = alpha; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClearColor)( red, green, blue, alpha ); - } -} - - -static void save_ClearDepth( GLclampd depth ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_DEPTH, 1 ); - if (n) { - n[1].f = (GLfloat) depth; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClearDepth)( depth ); - } -} - - -static void save_ClearIndex( GLfloat c ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_INDEX, 1 ); - if (n) { - n[1].f = c; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClearIndex)( c ); - } -} - - -static void save_ClearStencil( GLint s ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLEAR_STENCIL, 1 ); - if (n) { - n[1].i = s; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClearStencil)( s ); - } -} - - -static void save_ClipPlane( GLenum plane, const GLdouble *equ ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CLIP_PLANE, 5 ); - if (n) { - n[1].e = plane; - n[2].f = (GLfloat) equ[0]; - n[3].f = (GLfloat) equ[1]; - n[4].f = (GLfloat) equ[2]; - n[5].f = (GLfloat) equ[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ClipPlane)( plane, equ ); - } -} - - - -static void save_ColorMask( GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MASK, 4 ); - if (n) { - n[1].b = red; - n[2].b = green; - n[3].b = blue; - n[4].b = alpha; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorMask)( red, green, blue, alpha ); - } -} - - -static void save_ColorMaterial( GLenum face, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MATERIAL, 2 ); - if (n) { - n[1].e = face; - n[2].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorMaterial)( face, mode ); - } -} - - -static void save_ColorTable( GLenum target, GLenum internalFormat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *table ) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_1D || - target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || - target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - /* execute immediately */ - (*ctx->Exec->ColorTable)( target, internalFormat, width, - format, type, table ); - } - else { - GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, table, - &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE, 6 ); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].e = format; - n[5].e = type; - n[6].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorTable)( target, internalFormat, width, - format, type, table ); - } - } -} - - - -static void -save_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - if (pname == GL_COLOR_TABLE_SGI || - pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI || - pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) { - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - } - - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorTableParameterfv)( target, pname, params ); - } -} - - -static void -save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_COLOR_TABLE_SGI || - pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI || - pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - } - - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorTableParameteriv)( target, pname, params ); - } -} - - - -static void save_ColorSubTable( GLenum target, GLsizei start, GLsizei count, - GLenum format, GLenum type, - const GLvoid *table) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image = _mesa_unpack_image(count, 1, 1, format, type, table, - &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_SUB_TABLE, 6 ); - if (n) { - n[1].e = target; - n[2].i = start; - n[3].i = count; - n[4].e = format; - n[5].e = type; - n[6].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ColorSubTable)(target, start, count, format, type, table); - } -} - - -static void -save_CopyColorSubTable(GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5 ); - if (n) { - n[1].e = target; - n[2].i = start; - n[3].i = x; - n[4].i = y; - n[5].i = width; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyColorSubTable)(target, start, x, y, width); - } -} - - -static void -save_CopyColorTable(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_COLOR_TABLE, 5 ); - if (n) { - n[1].e = target; - n[2].e = internalformat; - n[3].i = x; - n[4].i = y; - n[5].i = width; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyColorTable)(target, internalformat, x, y, width); - } -} - - -static void -save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, - GLenum format, GLenum type, const GLvoid *filter) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, filter, - &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_1D, 6 ); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].e = format; - n[5].e = type; - n[6].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionFilter1D)( target, internalFormat, width, - format, type, filter ); - } -} - - -static void -save_ConvolutionFilter2D(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *filter) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, filter, - &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_FILTER_2D, 7 ); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].i = height; - n[5].e = format; - n[6].e = type; - n[7].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionFilter2D)( target, internalFormat, width, height, - format, type, filter ); - } -} - - -static void -save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = param; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionParameteri)( target, pname, param ); - } -} - - -static void -save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_CONVOLUTION_BORDER_COLOR || - pname == GL_CONVOLUTION_FILTER_SCALE || - pname == GL_CONVOLUTION_FILTER_BIAS) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - else { - n[4].i = n[5].i = n[6].i = 0; - } - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionParameteriv)( target, pname, params ); - } -} - - -static void -save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = param; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionParameterf)( target, pname, param ); - } -} - - -static void -save_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - if (pname == GL_CONVOLUTION_BORDER_COLOR || - pname == GL_CONVOLUTION_FILTER_SCALE || - pname == GL_CONVOLUTION_FILTER_BIAS) { - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - else { - n[4].f = n[5].f = n[6].f = 0.0F; - } - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ConvolutionParameterfv)( target, pname, params ); - } -} - - -static void -save_CopyPixels( GLint x, GLint y, - GLsizei width, GLsizei height, GLenum type ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_PIXELS, 5 ); - if (n) { - n[1].i = x; - n[2].i = y; - n[3].i = (GLint) width; - n[4].i = (GLint) height; - n[5].e = type; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyPixels)( x, y, width, height, type ); - } -} - - - -static void -save_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLint border ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE1D, 7 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalformat; - n[4].i = x; - n[5].i = y; - n[6].i = width; - n[7].i = border; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyTexImage1D)( target, level, internalformat, - x, y, width, border ); - } -} - - -static void -save_CopyTexImage2D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, GLsizei width, - GLsizei height, GLint border ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_IMAGE2D, 8 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalformat; - n[4].i = x; - n[5].i = y; - n[6].i = width; - n[7].i = height; - n[8].i = border; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyTexImage2D)( target, level, internalformat, - x, y, width, height, border ); - } -} - - - -static void -save_CopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = x; - n[5].i = y; - n[6].i = width; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyTexSubImage1D)( target, level, xoffset, x, y, width ); - } -} - - -static void -save_CopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLint height ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = x; - n[6].i = y; - n[7].i = width; - n[8].i = height; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyTexSubImage2D)( target, level, xoffset, yoffset, - x, y, width, height ); - } -} - - -static void -save_CopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, - GLsizei width, GLint height ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = zoffset; - n[6].i = x; - n[7].i = y; - n[8].i = width; - n[9].i = height; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CopyTexSubImage3D)( target, level, - xoffset, yoffset, zoffset, - x, y, width, height ); - } -} - - -static void save_CullFace( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_CULL_FACE, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CullFace)( mode ); - } -} - - -static void save_DepthFunc( GLenum func ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_FUNC, 1 ); - if (n) { - n[1].e = func; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->DepthFunc)( func ); - } -} - - -static void save_DepthMask( GLboolean mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_MASK, 1 ); - if (n) { - n[1].b = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->DepthMask)( mask ); - } -} - - -static void save_DepthRange( GLclampd nearval, GLclampd farval ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DEPTH_RANGE, 2 ); - if (n) { - n[1].f = (GLfloat) nearval; - n[2].f = (GLfloat) farval; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->DepthRange)( nearval, farval ); - } -} - - -static void save_Disable( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DISABLE, 1 ); - if (n) { - n[1].e = cap; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Disable)( cap ); - } -} - - -static void save_DrawBuffer( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_BUFFER, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->DrawBuffer)( mode ); - } -} - - -static void save_DrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, - pixels, &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_DRAW_PIXELS, 5 ); - if (n) { - n[1].i = width; - n[2].i = height; - n[3].e = format; - n[4].e = type; - n[5].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->DrawPixels)( width, height, format, type, pixels ); - } -} - - - -static void save_Enable( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ENABLE, 1 ); - if (n) { - n[1].e = cap; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Enable)( cap ); - } -} - - - -void _mesa_save_EvalMesh1( GLenum mode, GLint i1, GLint i2 ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH1, 3 ); - if (n) { - n[1].e = mode; - n[2].i = i1; - n[3].i = i2; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->EvalMesh1)( mode, i1, i2 ); - } -} - - -void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_EVALMESH2, 5 ); - if (n) { - n[1].e = mode; - n[2].i = i1; - n[3].i = i2; - n[4].i = j1; - n[5].i = j2; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->EvalMesh2)( mode, i1, i2, j1, j2 ); - } -} - - - - -static void save_Fogfv( GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_FOG, 5 ); - if (n) { - n[1].e = pname; - n[2].f = params[0]; - n[3].f = params[1]; - n[4].f = params[2]; - n[5].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Fogfv)( pname, params ); - } -} - - -static void save_Fogf( GLenum pname, GLfloat param ) -{ - save_Fogfv(pname, ¶m); -} - - -static void save_Fogiv(GLenum pname, const GLint *params ) -{ - GLfloat p[4]; - switch (pname) { - case GL_FOG_MODE: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_INDEX: - p[0] = (GLfloat) *params; - break; - case GL_FOG_COLOR: - p[0] = INT_TO_FLOAT( params[0] ); - p[1] = INT_TO_FLOAT( params[1] ); - p[2] = INT_TO_FLOAT( params[2] ); - p[3] = INT_TO_FLOAT( params[3] ); - break; - default: - /* Error will be caught later in gl_Fogfv */ - ; - } - save_Fogfv(pname, p); -} - - -static void save_Fogi(GLenum pname, GLint param ) -{ - save_Fogiv(pname, ¶m); -} - - -static void save_FrontFace( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_FRONT_FACE, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->FrontFace)( mode ); - } -} - - -static void save_Frustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_FRUSTUM, 6 ); - if (n) { - n[1].f = (GLfloat) left; - n[2].f = (GLfloat) right; - n[3].f = (GLfloat) bottom; - n[4].f = (GLfloat) top; - n[5].f = (GLfloat) nearval; - n[6].f = (GLfloat) farval; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Frustum)( left, right, bottom, top, nearval, farval ); - } -} - - -static void save_Hint( GLenum target, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_HINT, 2 ); - if (n) { - n[1].e = target; - n[2].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Hint)( target, mode ); - } -} - - -static void -save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_HISTOGRAM, 4 ); - if (n) { - n[1].e = target; - n[2].i = width; - n[3].e = internalFormat; - n[4].b = sink; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Histogram)( target, width, internalFormat, sink ); - } -} - - -static void save_IndexMask( GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_INDEX_MASK, 1 ); - if (n) { - n[1].ui = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->IndexMask)( mask ); - } -} - - -static void save_InitNames( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_INIT_NAMES, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->InitNames)(); - } -} - - -static void save_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT, 6 ); - if (OPCODE_LIGHT) { - GLint i, nParams; - n[1].e = light; - n[2].e = pname; - switch (pname) { - case GL_AMBIENT: - nParams = 4; - break; - case GL_DIFFUSE: - nParams = 4; - break; - case GL_SPECULAR: - nParams = 4; - break; - case GL_POSITION: - nParams = 4; - break; - case GL_SPOT_DIRECTION: - nParams = 3; - break; - case GL_SPOT_EXPONENT: - nParams = 1; - break; - case GL_SPOT_CUTOFF: - nParams = 1; - break; - case GL_CONSTANT_ATTENUATION: - nParams = 1; - break; - case GL_LINEAR_ATTENUATION: - nParams = 1; - break; - case GL_QUADRATIC_ATTENUATION: - nParams = 1; - break; - default: - nParams = 0; - } - for (i = 0; i < nParams; i++) { - n[3+i].f = params[i]; - } - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Lightfv)( light, pname, params ); - } -} - - -static void save_Lightf( GLenum light, GLenum pname, GLfloat params ) -{ - save_Lightfv(light, pname, ¶ms); -} - - -static void save_Lightiv( GLenum light, GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - switch (pname) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - fparam[0] = INT_TO_FLOAT( params[0] ); - fparam[1] = INT_TO_FLOAT( params[1] ); - fparam[2] = INT_TO_FLOAT( params[2] ); - fparam[3] = INT_TO_FLOAT( params[3] ); - break; - case GL_POSITION: - fparam[0] = (GLfloat) params[0]; - fparam[1] = (GLfloat) params[1]; - fparam[2] = (GLfloat) params[2]; - fparam[3] = (GLfloat) params[3]; - break; - case GL_SPOT_DIRECTION: - fparam[0] = (GLfloat) params[0]; - fparam[1] = (GLfloat) params[1]; - fparam[2] = (GLfloat) params[2]; - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - fparam[0] = (GLfloat) params[0]; - break; - default: - /* error will be caught later in gl_Lightfv */ - ; - } - save_Lightfv( light, pname, fparam ); -} - - -static void save_Lighti( GLenum light, GLenum pname, GLint param ) -{ - save_Lightiv( light, pname, ¶m ); -} - - -static void save_LightModelfv( GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LIGHT_MODEL, 5 ); - if (n) { - n[1].e = pname; - n[2].f = params[0]; - n[3].f = params[1]; - n[4].f = params[2]; - n[5].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LightModelfv)( pname, params ); - } -} - - -static void save_LightModelf( GLenum pname, GLfloat param ) -{ - save_LightModelfv(pname, ¶m); -} - - -static void save_LightModeliv( GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - switch (pname) { - case GL_LIGHT_MODEL_AMBIENT: - fparam[0] = INT_TO_FLOAT( params[0] ); - fparam[1] = INT_TO_FLOAT( params[1] ); - fparam[2] = INT_TO_FLOAT( params[2] ); - fparam[3] = INT_TO_FLOAT( params[3] ); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: - fparam[0] = (GLfloat) params[0]; - break; - default: - /* Error will be caught later in gl_LightModelfv */ - ; - } - save_LightModelfv(pname, fparam); -} - - -static void save_LightModeli( GLenum pname, GLint param ) -{ - save_LightModeliv(pname, ¶m); -} - - -static void save_LineStipple( GLint factor, GLushort pattern ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_STIPPLE, 2 ); - if (n) { - n[1].i = factor; - n[2].us = pattern; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LineStipple)( factor, pattern ); - } -} - - -static void save_LineWidth( GLfloat width ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LINE_WIDTH, 1 ); - if (n) { - n[1].f = width; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LineWidth)( width ); - } -} - - -static void save_ListBase( GLuint base ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LIST_BASE, 1 ); - if (n) { - n[1].ui = base; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ListBase)( base ); - } -} - - -static void save_LoadIdentity( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_IDENTITY, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->LoadIdentity)(); - } -} - - -static void save_LoadMatrixf( const GLfloat *m ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_MATRIX, 16 ); - if (n) { - GLuint i; - for (i=0;i<16;i++) { - n[1+i].f = m[i]; - } - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LoadMatrixf)( m ); - } -} - - -static void save_LoadMatrixd( const GLdouble *m ) -{ - GLfloat f[16]; - GLint i; - for (i = 0; i < 16; i++) { - f[i] = (GLfloat) m[i]; - } - save_LoadMatrixf(f); -} - - -static void save_LoadName( GLuint name ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LOAD_NAME, 1 ); - if (n) { - n[1].ui = name; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LoadName)( name ); - } -} - - -static void save_LogicOp( GLenum opcode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_LOGIC_OP, 1 ); - if (n) { - n[1].e = opcode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->LogicOp)( opcode ); - } -} - - -static void save_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble *points) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 ); - if (n) { - GLfloat *pnts = _mesa_copy_map_points1d( target, stride, order, points ); - n[1].e = target; - n[2].f = (GLfloat) u1; - n[3].f = (GLfloat) u2; - n[4].i = _mesa_evaluator_components(target); /* stride */ - n[5].i = order; - n[6].data = (void *) pnts; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Map1d)( target, u1, u2, stride, order, points ); - } -} - -static void save_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat *points) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP1, 6 ); - if (n) { - GLfloat *pnts = _mesa_copy_map_points1f( target, stride, order, points ); - n[1].e = target; - n[2].f = u1; - n[3].f = u2; - n[4].i = _mesa_evaluator_components(target); /* stride */ - n[5].i = order; - n[6].data = (void *) pnts; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Map1f)( target, u1, u2, stride, order, points ); - } -} - - -static void save_Map2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 ); - if (n) { - GLfloat *pnts = _mesa_copy_map_points2d( target, ustride, uorder, - vstride, vorder, points ); - n[1].e = target; - n[2].f = (GLfloat) u1; - n[3].f = (GLfloat) u2; - n[4].f = (GLfloat) v1; - n[5].f = (GLfloat) v2; - /* XXX verify these strides are correct */ - n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride*/ - n[7].i = _mesa_evaluator_components(target); /*vstride*/ - n[8].i = uorder; - n[9].i = vorder; - n[10].data = (void *) pnts; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Map2d)( target, - u1, u2, ustride, uorder, - v1, v2, vstride, vorder, points ); - } -} - - -static void save_Map2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAP2, 10 ); - if (n) { - GLfloat *pnts = _mesa_copy_map_points2f( target, ustride, uorder, - vstride, vorder, points ); - n[1].e = target; - n[2].f = u1; - n[3].f = u2; - n[4].f = v1; - n[5].f = v2; - /* XXX verify these strides are correct */ - n[6].i = _mesa_evaluator_components(target) * vorder; /*ustride*/ - n[7].i = _mesa_evaluator_components(target); /*vstride*/ - n[8].i = uorder; - n[9].i = vorder; - n[10].data = (void *) pnts; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Map2f)( target, u1, u2, ustride, uorder, - v1, v2, vstride, vorder, points ); - } -} - - -static void save_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID1, 3 ); - if (n) { - n[1].i = un; - n[2].f = u1; - n[3].f = u2; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->MapGrid1f)( un, u1, u2 ); - } -} - - -static void save_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 ) -{ - save_MapGrid1f(un, (GLfloat) u1, (GLfloat) u2); -} - - -static void save_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MAPGRID2, 6 ); - if (n) { - n[1].i = un; - n[2].f = u1; - n[3].f = u2; - n[4].i = vn; - n[5].f = v1; - n[6].f = v2; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->MapGrid2f)( un, u1, u2, vn, v1, v2 ); - } -} - - - -static void save_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ) -{ - save_MapGrid2f(un, (GLfloat) u1, (GLfloat) u2, - vn, (GLfloat) v1, (GLfloat) v2); -} - - -static void save_MatrixMode( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MATRIX_MODE, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->MatrixMode)( mode ); - } -} - - -static void -save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MIN_MAX, 3 ); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].b = sink; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Minmax)( target, internalFormat, sink ); - } -} - - -static void save_MultMatrixf( const GLfloat *m ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_MULT_MATRIX, 16 ); - if (n) { - GLuint i; - for (i=0;i<16;i++) { - n[1+i].f = m[i]; - } - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->MultMatrixf)( m ); - } -} - - -static void save_MultMatrixd( const GLdouble *m ) -{ - GLfloat f[16]; - GLint i; - for (i = 0; i < 16; i++) { - f[i] = (GLfloat) m[i]; - } - save_MultMatrixf(f); -} - - -static void save_NewList( GLuint list, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - /* It's an error to call this function while building a display list */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" ); - (void) list; - (void) mode; -} - - - -static void save_Ortho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ORTHO, 6 ); - if (n) { - n[1].f = (GLfloat) left; - n[2].f = (GLfloat) right; - n[3].f = (GLfloat) bottom; - n[4].f = (GLfloat) top; - n[5].f = (GLfloat) nearval; - n[6].f = (GLfloat) farval; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Ortho)( left, right, bottom, top, nearval, farval ); - } -} - - -static void -save_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_MAP, 3 ); - if (n) { - n[1].e = map; - n[2].i = mapsize; - n[3].data = (void *) MALLOC( mapsize * sizeof(GLfloat) ); - MEMCPY( n[3].data, (void *) values, mapsize * sizeof(GLfloat) ); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PixelMapfv)( map, mapsize, values ); - } -} - - -static void -save_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ) -{ - GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; - GLint i; - if (map==GL_PIXEL_MAP_I_TO_I || map==GL_PIXEL_MAP_S_TO_S) { - for (i=0;iExecuteFlag) { - (*ctx->Exec->PixelTransferf)( pname, param ); - } -} - - -static void -save_PixelTransferi( GLenum pname, GLint param ) -{ - save_PixelTransferf( pname, (GLfloat) param ); -} - - -static void -save_PixelZoom( GLfloat xfactor, GLfloat yfactor ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_ZOOM, 2 ); - if (n) { - n[1].f = xfactor; - n[2].f = yfactor; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PixelZoom)( xfactor, yfactor ); - } -} - - -static void -save_PointParameterfvEXT( GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_PARAMETERS, 4 ); - if (n) { - n[1].e = pname; - n[2].f = params[0]; - n[3].f = params[1]; - n[4].f = params[2]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PointParameterfvEXT)( pname, params ); - } -} - - -static void save_PointParameterfEXT( GLenum pname, GLfloat param ) -{ - save_PointParameterfvEXT(pname, ¶m); -} - -static void save_PointParameteriNV( GLenum pname, GLint param ) -{ - GLfloat p = (GLfloat) param; - save_PointParameterfvEXT(pname, &p); -} - -static void save_PointParameterivNV( GLenum pname, const GLint *param ) -{ - GLfloat p = (GLfloat) param[0]; - save_PointParameterfvEXT(pname, &p); -} - - -static void save_PointSize( GLfloat size ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_POINT_SIZE, 1 ); - if (n) { - n[1].f = size; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PointSize)( size ); - } -} - - -static void save_PolygonMode( GLenum face, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_MODE, 2 ); - if (n) { - n[1].e = face; - n[2].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PolygonMode)( face, mode ); - } -} - - -/* - * Polygon stipple must have been upacked already! - */ -static void save_PolygonStipple( const GLubyte *pattern ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_STIPPLE, 1 ); - if (n) { - void *data; - n[1].data = MALLOC( 32 * 4 ); - data = n[1].data; /* This needed for Acorn compiler */ - MEMCPY( data, pattern, 32 * 4 ); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PolygonStipple)( (GLubyte*) pattern ); - } -} - - -static void save_PolygonOffset( GLfloat factor, GLfloat units ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_POLYGON_OFFSET, 2 ); - if (n) { - n[1].f = factor; - n[2].f = units; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PolygonOffset)( factor, units ); - } -} - - -static void save_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) -{ - GET_CURRENT_CONTEXT(ctx); - save_PolygonOffset(factor, ctx->DepthMaxF * bias); -} - - -static void save_PopAttrib( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_ATTRIB, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->PopAttrib)(); - } -} - - -static void save_PopMatrix( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_MATRIX, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->PopMatrix)(); - } -} - - -static void save_PopName( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_NAME, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->PopName)(); - } -} - - -static void save_PrioritizeTextures( GLsizei num, const GLuint *textures, - const GLclampf *priorities ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - for (i=0;iExecuteFlag) { - (*ctx->Exec->PrioritizeTextures)( num, textures, priorities ); - } -} - - -static void save_PushAttrib( GLbitfield mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_ATTRIB, 1 ); - if (n) { - n[1].bf = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PushAttrib)( mask ); - } -} - - -static void save_PushMatrix( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_MATRIX, 0 ); - if (ctx->ExecuteFlag) { - (*ctx->Exec->PushMatrix)(); - } -} - - -static void save_PushName( GLuint name ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_NAME, 1 ); - if (n) { - n[1].ui = name; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PushName)( name ); - } -} - - -static void save_RasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - n = ALLOC_INSTRUCTION( ctx, OPCODE_RASTER_POS, 4 ); - if (n) { - n[1].f = x; - n[2].f = y; - n[3].f = z; - n[4].f = w; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->RasterPos4f)( x, y, z, w ); - } -} - -static void save_RasterPos2d(GLdouble x, GLdouble y) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -static void save_RasterPos2f(GLfloat x, GLfloat y) -{ - save_RasterPos4f(x, y, 0.0F, 1.0F); -} - -static void save_RasterPos2i(GLint x, GLint y) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -static void save_RasterPos2s(GLshort x, GLshort y) -{ - save_RasterPos4f(x, y, 0.0F, 1.0F); -} - -static void save_RasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void save_RasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ - save_RasterPos4f(x, y, z, 1.0F); -} - -static void save_RasterPos3i(GLint x, GLint y, GLint z) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void save_RasterPos3s(GLshort x, GLshort y, GLshort z) -{ - save_RasterPos4f(x, y, z, 1.0F); -} - -static void save_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void save_RasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ - save_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void save_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - save_RasterPos4f(x, y, z, w); -} - -static void save_RasterPos2dv(const GLdouble *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void save_RasterPos2fv(const GLfloat *v) -{ - save_RasterPos4f(v[0], v[1], 0.0F, 1.0F); -} - -static void save_RasterPos2iv(const GLint *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void save_RasterPos2sv(const GLshort *v) -{ - save_RasterPos4f(v[0], v[1], 0.0F, 1.0F); -} - -static void save_RasterPos3dv(const GLdouble *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void save_RasterPos3fv(const GLfloat *v) -{ - save_RasterPos4f(v[0], v[1], v[2], 1.0F); -} - -static void save_RasterPos3iv(const GLint *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void save_RasterPos3sv(const GLshort *v) -{ - save_RasterPos4f(v[0], v[1], v[2], 1.0F); -} - -static void save_RasterPos4dv(const GLdouble *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -static void save_RasterPos4fv(const GLfloat *v) -{ - save_RasterPos4f(v[0], v[1], v[2], v[3]); -} - -static void save_RasterPos4iv(const GLint *v) -{ - save_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -static void save_RasterPos4sv(const GLshort *v) -{ - save_RasterPos4f(v[0], v[1], v[2], v[3]); -} - - -static void save_PassThrough( GLfloat token ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PASSTHROUGH, 1 ); - if (n) { - n[1].f = token; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PassThrough)( token ); - } -} - - -static void save_ReadBuffer( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_READ_BUFFER, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ReadBuffer)( mode ); - } -} - - -static void -save_ResetHistogram(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_HISTOGRAM, 1 ); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ResetHistogram)( target ); - } -} - - -static void -save_ResetMinmax(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_RESET_MIN_MAX, 1 ); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ResetMinmax)( target ); - } -} - - -static void save_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ROTATE, 4 ); - if (n) { - n[1].f = angle; - n[2].f = x; - n[3].f = y; - n[4].f = z; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Rotatef)( angle, x, y, z ); - } -} - - -static void save_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) -{ - save_Rotatef((GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - -static void save_Scalef( GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_SCALE, 3 ); - if (n) { - n[1].f = x; - n[2].f = y; - n[3].f = z; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Scalef)( x, y, z ); - } -} - - -static void save_Scaled( GLdouble x, GLdouble y, GLdouble z ) -{ - save_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - -static void save_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_SCISSOR, 4 ); - if (n) { - n[1].i = x; - n[2].i = y; - n[3].i = width; - n[4].i = height; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Scissor)( x, y, width, height ); - } -} - - -static void save_ShadeModel( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_SHADE_MODEL, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ShadeModel)( mode ); - } -} - - -static void save_StencilFunc( GLenum func, GLint ref, GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_FUNC, 3 ); - if (n) { - n[1].e = func; - n[2].i = ref; - n[3].ui = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->StencilFunc)( func, ref, mask ); - } -} - - -static void save_StencilMask( GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_MASK, 1 ); - if (n) { - n[1].ui = mask; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->StencilMask)( mask ); - } -} - - -static void save_StencilOp( GLenum fail, GLenum zfail, GLenum zpass ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_STENCIL_OP, 3 ); - if (n) { - n[1].e = fail; - n[2].e = zfail; - n[3].e = zpass; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->StencilOp)( fail, zfail, zpass ); - } -} - - -static void save_TexEnvfv( GLenum target, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXENV, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexEnvfv)( target, pname, params ); - } -} - - -static void save_TexEnvf( GLenum target, GLenum pname, GLfloat param ) -{ - save_TexEnvfv( target, pname, ¶m ); -} - - -static void save_TexEnvi( GLenum target, GLenum pname, GLint param ) -{ - GLfloat p[4]; - p[0] = (GLfloat) param; - p[1] = p[2] = p[3] = 0.0; - save_TexEnvfv( target, pname, p ); -} - - -static void save_TexEnviv( GLenum target, GLenum pname, const GLint *param ) -{ - GLfloat p[4]; - p[0] = INT_TO_FLOAT( param[0] ); - p[1] = INT_TO_FLOAT( param[1] ); - p[2] = INT_TO_FLOAT( param[2] ); - p[3] = INT_TO_FLOAT( param[3] ); - save_TexEnvfv( target, pname, p ); -} - - -static void save_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXGEN, 6 ); - if (n) { - n[1].e = coord; - n[2].e = pname; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexGenfv)( coord, pname, params ); - } -} - - -static void save_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) -{ - GLfloat p[4]; - p[0] = (GLfloat) params[0]; - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; - save_TexGenfv(coord, pname, p); -} - - -static void save_TexGend(GLenum coord, GLenum pname, GLdouble param ) -{ - GLfloat p = (GLfloat) param; - save_TexGenfv( coord, pname, &p ); -} - - -static void save_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) -{ - GLfloat p[4]; - p[0] = (GLfloat) params[0]; - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; - save_TexGenfv( coord, pname, p ); -} - - -static void save_TexGenf( GLenum coord, GLenum pname, GLfloat param ) -{ - save_TexGenfv(coord, pname, ¶m); -} - - -static void save_TexGeni( GLenum coord, GLenum pname, GLint param ) -{ - save_TexGeniv( coord, pname, ¶m ); -} - - -static void save_TexParameterfv( GLenum target, - GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEXPARAMETER, 6 ); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexParameterfv)( target, pname, params ); - } -} - - -static void save_TexParameterf( GLenum target, GLenum pname, GLfloat param ) -{ - save_TexParameterfv(target, pname, ¶m); -} - - -static void save_TexParameteri( GLenum target, GLenum pname, GLint param ) -{ - GLfloat fparam[4]; - fparam[0] = (GLfloat) param; - fparam[1] = fparam[2] = fparam[3] = 0.0; - save_TexParameterfv(target, pname, fparam); -} - - -static void save_TexParameteriv( GLenum target, GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - fparam[0] = (GLfloat) params[0]; - fparam[1] = fparam[2] = fparam[3] = 0.0; - save_TexParameterfv(target, pname, fparam); -} - - -static void save_TexImage1D( GLenum target, - GLint level, GLint components, - GLsizei width, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_1D) { - /* don't compile, execute immediately */ - (*ctx->Exec->TexImage1D)( target, level, components, width, - border, format, type, pixels ); - } - else { - GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, - pixels, &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE1D, 8 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = components; - n[4].i = (GLint) width; - n[5].i = border; - n[6].e = format; - n[7].e = type; - n[8].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexImage1D)( target, level, components, width, - border, format, type, pixels ); - } - } -} - - -static void save_TexImage2D( GLenum target, - GLint level, GLint components, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_2D) { - /* don't compile, execute immediately */ - (*ctx->Exec->TexImage2D)( target, level, components, width, - height, border, format, type, pixels ); - } - else { - GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, - pixels, &ctx->Unpack); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE2D, 9 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = components; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = border; - n[7].e = format; - n[8].e = type; - n[9].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexImage2D)( target, level, components, width, - height, border, format, type, pixels ); - } - } -} - - -static void save_TexImage3D( GLenum target, - GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_3D) { - /* don't compile, execute immediately */ - (*ctx->Exec->TexImage3D)( target, level, internalFormat, width, - height, depth, border, format, type, pixels ); - } - else { - Node *n; - GLvoid *image = _mesa_unpack_image(width, height, depth, format, type, - pixels, &ctx->Unpack); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_IMAGE3D, 10 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = (GLint) internalFormat; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = (GLint) depth; - n[7].i = border; - n[8].e = format; - n[9].e = type; - n[10].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexImage3D)( target, level, internalFormat, width, - height, depth, border, format, type, pixels ); - } - } -} - - -static void save_TexSubImage1D( GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, - pixels, &ctx->Unpack); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE1D, 7 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = (GLint) width; - n[5].e = format; - n[6].e = type; - n[7].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexSubImage1D)( target, level, xoffset, width, - format, type, pixels ); - } -} - - -static void save_TexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, - pixels, &ctx->Unpack); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE2D, 9 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = (GLint) width; - n[6].i = (GLint) height; - n[7].e = format; - n[8].e = type; - n[9].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexSubImage2D)( target, level, xoffset, yoffset, - width, height, format, type, pixels ); - } -} - - -static void save_TexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset,GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - GLvoid *image = _mesa_unpack_image(width, height, depth, format, type, - pixels, &ctx->Unpack); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TEX_SUB_IMAGE3D, 11 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = zoffset; - n[6].i = (GLint) width; - n[7].i = (GLint) height; - n[8].i = (GLint) depth; - n[9].e = format; - n[10].e = type; - n[11].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TexSubImage3D)( target, level, - xoffset, yoffset, zoffset, - width, height, depth, format, type, pixels ); - } -} - - -static void save_Translatef( GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TRANSLATE, 3 ); - if (n) { - n[1].f = x; - n[2].f = y; - n[3].f = z; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Translatef)( x, y, z ); - } -} - - -static void save_Translated( GLdouble x, GLdouble y, GLdouble z ) -{ - save_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - - -static void save_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_VIEWPORT, 4 ); - if (n) { - n[1].i = x; - n[2].i = y; - n[3].i = (GLint) width; - n[4].i = (GLint) height; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->Viewport)( x, y, width, height ); - } -} - - -static void save_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - n = ALLOC_INSTRUCTION( ctx, OPCODE_WINDOW_POS, 4 ); - if (n) { - n[1].f = x; - n[2].f = y; - n[3].f = z; - n[4].f = w; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->WindowPos4fMESA)( x, y, z, w ); - } -} - -static void save_WindowPos2dMESA(GLdouble x, GLdouble y) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -static void save_WindowPos2fMESA(GLfloat x, GLfloat y) -{ - save_WindowPos4fMESA(x, y, 0.0F, 1.0F); -} - -static void save_WindowPos2iMESA(GLint x, GLint y) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -static void save_WindowPos2sMESA(GLshort x, GLshort y) -{ - save_WindowPos4fMESA(x, y, 0.0F, 1.0F); -} - -static void save_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void save_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) -{ - save_WindowPos4fMESA(x, y, z, 1.0F); -} - -static void save_WindowPos3iMESA(GLint x, GLint y, GLint z) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void save_WindowPos3sMESA(GLshort x, GLshort y, GLshort z) -{ - save_WindowPos4fMESA(x, y, z, 1.0F); -} - -static void save_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void save_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w) -{ - save_WindowPos4fMESA((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void save_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w) -{ - save_WindowPos4fMESA(x, y, z, w); -} - -static void save_WindowPos2dvMESA(const GLdouble *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void save_WindowPos2fvMESA(const GLfloat *v) -{ - save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); -} - -static void save_WindowPos2ivMESA(const GLint *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -static void save_WindowPos2svMESA(const GLshort *v) -{ - save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); -} - -static void save_WindowPos3dvMESA(const GLdouble *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void save_WindowPos3fvMESA(const GLfloat *v) -{ - save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); -} - -static void save_WindowPos3ivMESA(const GLint *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -static void save_WindowPos3svMESA(const GLshort *v) -{ - save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); -} - -static void save_WindowPos4dvMESA(const GLdouble *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -static void save_WindowPos4fvMESA(const GLfloat *v) -{ - save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); -} - -static void save_WindowPos4ivMESA(const GLint *v) -{ - save_WindowPos4fMESA((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -static void save_WindowPos4svMESA(const GLshort *v) -{ - save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); -} - - - -/* GL_ARB_multitexture */ -static void save_ActiveTextureARB( GLenum target ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_TEXTURE, 1 ); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ActiveTextureARB)( target ); - } -} - - -/* GL_ARB_transpose_matrix */ - -static void save_LoadTransposeMatrixdARB( const GLdouble m[16] ) -{ - GLfloat tm[16]; - _math_transposefd(tm, m); - save_LoadMatrixf(tm); -} - - -static void save_LoadTransposeMatrixfARB( const GLfloat m[16] ) -{ - GLfloat tm[16]; - _math_transposef(tm, m); - save_LoadMatrixf(tm); -} - - -static void -save_MultTransposeMatrixdARB( const GLdouble m[16] ) -{ - GLfloat tm[16]; - _math_transposefd(tm, m); - save_MultMatrixf(tm); -} - - -static void -save_MultTransposeMatrixfARB( const GLfloat m[16] ) -{ - GLfloat tm[16]; - _math_transposef(tm, m); - save_MultMatrixf(tm); -} - - -static void -save_PixelTexGenSGIX(GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_SGIX, 1 ); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PixelTexGenSGIX)( mode ); - } -} - - -/* GL_ARB_texture_compression */ -static void -save_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_1D) { - /* don't compile, execute immediately */ - (*ctx->Exec->CompressedTexImage1DARB)(target, level, internalFormat, - width, border, imageSize, data); - } - else { - Node *n; - GLvoid *image; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = border; - n[6].i = imageSize; - n[7].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexImage1DARB)(target, level, internalFormat, - width, border, imageSize, data); - } - } -} - - -static void -save_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_2D) { - /* don't compile, execute immediately */ - (*ctx->Exec->CompressedTexImage2DARB)(target, level, internalFormat, - width, height, border, imageSize, data); - } - else { - Node *n; - GLvoid *image; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = border; - n[7].i = imageSize; - n[8].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexImage2DARB)(target, level, internalFormat, - width, height, border, imageSize, data); - } - } -} - - -static void -save_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_3D) { - /* don't compile, execute immediately */ - (*ctx->Exec->CompressedTexImage3DARB)(target, level, internalFormat, - width, height, depth, border, imageSize, data); - } - else { - Node *n; - GLvoid *image; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = (GLint) depth; - n[7].i = border; - n[8].i = imageSize; - n[9].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexImage3DARB)(target, level, internalFormat, - width, height, depth, border, imageSize, data); - } - } -} - - -static void -save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - Node *n; - GLvoid *image; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = (GLint) width; - n[5].e = format; - n[6].i = imageSize; - n[7].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexSubImage1DARB)(target, level, xoffset, - width, format, imageSize, data); - } -} - - -static void -save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data) -{ - Node *n; - GLvoid *image; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = (GLint) width; - n[6].i = (GLint) height; - n[7].e = format; - n[8].i = imageSize; - n[9].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexSubImage2DARB)(target, level, xoffset, yoffset, - width, height, format, imageSize, data); - } -} - - -static void -save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - Node *n; - GLvoid *image; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - /* make copy of image */ - image = MALLOC(imageSize); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB"); - return; - } - MEMCPY(image, data, imageSize); - n = ALLOC_INSTRUCTION( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11 ); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = zoffset; - n[6].i = (GLint) width; - n[7].i = (GLint) height; - n[8].i = (GLint) depth; - n[9].e = format; - n[10].i = imageSize; - n[11].data = image; - } - else if (image) { - FREE(image); - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->CompressedTexSubImage3DARB)(target, level, xoffset, yoffset, - zoffset, width, height, depth, format, imageSize, data); - } -} - - -/* GL_ARB_multisample */ -static void -save_SampleCoverageARB(GLclampf value, GLboolean invert) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_SAMPLE_COVERAGE, 2 ); - if (n) { - n[1].f = value; - n[2].b = invert; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->SampleCoverageARB)( value, invert ); - } -} - - -/* GL_SGIS_pixel_texture */ - -static void -save_PixelTexGenParameteriSGIS(GLenum target, GLint value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, 2 ); - if (n) { - n[1].e = target; - n[2].i = value; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->PixelTexGenParameteriSGIS)( target, value ); - } -} - - -static void -save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) -{ - save_PixelTexGenParameteriSGIS(target, (GLint) value); -} - - -static void -save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) -{ - save_PixelTexGenParameteriSGIS(target, *value); -} - - -static void -save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) -{ - save_PixelTexGenParameteriSGIS(target, (GLint) *value); -} - - -/* - * GL_NV_vertex_program - */ -#if FEATURE_NV_vertex_program -static void -save_BindProgramNV(GLenum target, GLuint id) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_BIND_PROGRAM_NV, 2 ); - if (n) { - n[1].e = target; - n[2].ui = id; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->BindProgramNV)( target, id ); - } -} - -static void -save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_EXECUTE_PROGRAM_NV, 6 ); - if (n) { - n[1].e = target; - n[2].ui = id; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ExecuteProgramNV)(target, id, params); - } -} - - -static void -save_ProgramParameter4fNV(GLenum target, GLuint index, - GLfloat x, GLfloat y, - GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_PROGRAM_PARAMETER4F_NV, 6 ); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = x; - n[4].f = y; - n[5].f = z; - n[6].f = w; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ProgramParameter4fNV)(target, index, x, y, z, w); - } -} - - -static void -save_ProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat *params) -{ - save_ProgramParameter4fNV(target, index, params[0], params[1], - params[2], params[3]); -} - - -static void -save_ProgramParameter4dNV(GLenum target, GLuint index, - GLdouble x, GLdouble y, - GLdouble z, GLdouble w) -{ - save_ProgramParameter4fNV(target, index, (GLfloat) x, (GLfloat) y, - (GLfloat) z, (GLfloat) w); -} - - -static void -save_ProgramParameter4dvNV(GLenum target, GLuint index, - const GLdouble *params) -{ - save_ProgramParameter4fNV(target, index, (GLfloat) params[0], - (GLfloat) params[1], (GLfloat) params[2], - (GLfloat) params[3]); -} - - -static void -save_ProgramParameters4dvNV(GLenum target, GLuint index, - GLuint num, const GLdouble *params) -{ - GLuint i; - for (i = 0; i < num; i++) { - save_ProgramParameter4dvNV(target, index + i, params + 4 * i); - } -} - - -static void -save_ProgramParameters4fvNV(GLenum target, GLuint index, - GLuint num, const GLfloat *params) -{ - GLuint i; - for (i = 0; i < num; i++) { - save_ProgramParameter4fvNV(target, index + i, params + 4 * i); - } -} - - - -static void -save_TrackMatrixNV(GLenum target, GLuint address, - GLenum matrix, GLenum transform) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_TRACK_MATRIX_NV, 4 ); - if (n) { - n[1].e = target; - n[2].ui = address; - n[3].e = matrix; - n[4].e = transform; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->TrackMatrixNV)(target, address, matrix, transform); - } -} -#endif /* FEATURE_NV_vertex_program */ - - -/* GL_EXT_stencil_two_side */ -static void save_ActiveStencilFaceEXT( GLenum face ) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1 ); - if (n) { - n[1].e = face; - } - if (ctx->ExecuteFlag) { - (*ctx->Exec->ActiveStencilFaceEXT)( face ); - } -} - - - -/* KW: Compile commands - * - * Will appear in the list before the vertex buffer containing the - * command that provoked the error. I don't see this as a problem. - */ -void -_mesa_save_error( GLcontext *ctx, GLenum error, const char *s ) -{ - Node *n; - n = ALLOC_INSTRUCTION( ctx, OPCODE_ERROR, 2 ); - if (n) { - n[1].e = error; - n[2].data = (void *) s; - } - /* execute already done */ -} - - -/* - * Compile an error into current display list. - */ -void -_mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ) -{ - if (ctx->CompileFlag) - _mesa_save_error( ctx, error, s ); - - if (ctx->ExecuteFlag) - _mesa_error( ctx, error, s ); -} - - - -static GLboolean -islist(GLcontext *ctx, GLuint list) -{ - if (list > 0 && _mesa_HashLookup(ctx->Shared->DisplayList, list)) { - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - - -/**********************************************************************/ -/* Display list execution */ -/**********************************************************************/ - - -/* - * Execute a display list. Note that the ListBase offset must have already - * been added before calling this function. I.e. the list argument is - * the absolute list number, not relative to ListBase. - * Input: list - display list number - */ -static void -execute_list( GLcontext *ctx, GLuint list ) -{ - Node *n; - GLboolean done; - - if (!islist(ctx,list)) - return; - - if (ctx->Driver.BeginCallList) - ctx->Driver.BeginCallList( ctx, list ); - - ctx->CallDepth++; - - n = (Node *) _mesa_HashLookup(ctx->Shared->DisplayList, list); - - done = GL_FALSE; - while (!done) { - OpCode opcode = n[0].opcode; - int i = (int)n[0].opcode - (int)OPCODE_DRV_0; - - if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) { - ctx->listext.opcode[i].execute(ctx, &n[1]); - n += ctx->listext.opcode[i].size; - } - else { - switch (opcode) { - case OPCODE_ERROR: - _mesa_error( ctx, n[1].e, (const char *) n[2].data ); - break; - case OPCODE_ACCUM: - (*ctx->Exec->Accum)( n[1].e, n[2].f ); - break; - case OPCODE_ALPHA_FUNC: - (*ctx->Exec->AlphaFunc)( n[1].e, n[2].f ); - break; - case OPCODE_BIND_TEXTURE: - (*ctx->Exec->BindTexture)( n[1].e, n[2].ui ); - break; - case OPCODE_BITMAP: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->Bitmap)( (GLsizei) n[1].i, (GLsizei) n[2].i, - n[3].f, n[4].f, n[5].f, n[6].f, (const GLubyte *) n[7].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_BLEND_COLOR: - (*ctx->Exec->BlendColor)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_BLEND_EQUATION: - (*ctx->Exec->BlendEquation)( n[1].e ); - break; - case OPCODE_BLEND_FUNC: - (*ctx->Exec->BlendFunc)( n[1].e, n[2].e ); - break; - case OPCODE_BLEND_FUNC_SEPARATE: - (*ctx->Exec->BlendFuncSeparateEXT)(n[1].e, n[2].e, n[3].e, n[4].e); - break; - case OPCODE_CALL_LIST: - /* Generated by glCallList(), don't add ListBase */ - if (ctx->CallDepthCallDepth < MAX_LIST_NESTING) { - execute_list( ctx, ctx->List.ListBase + n[1].ui ); - } - break; - case OPCODE_CLEAR: - (*ctx->Exec->Clear)( n[1].bf ); - break; - case OPCODE_CLEAR_COLOR: - (*ctx->Exec->ClearColor)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_CLEAR_ACCUM: - (*ctx->Exec->ClearAccum)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_CLEAR_DEPTH: - (*ctx->Exec->ClearDepth)( (GLclampd) n[1].f ); - break; - case OPCODE_CLEAR_INDEX: - (*ctx->Exec->ClearIndex)( (GLfloat) n[1].ui ); - break; - case OPCODE_CLEAR_STENCIL: - (*ctx->Exec->ClearStencil)( n[1].i ); - break; - case OPCODE_CLIP_PLANE: - { - GLdouble eq[4]; - eq[0] = n[2].f; - eq[1] = n[3].f; - eq[2] = n[4].f; - eq[3] = n[5].f; - (*ctx->Exec->ClipPlane)( n[1].e, eq ); - } - break; - case OPCODE_COLOR_MASK: - (*ctx->Exec->ColorMask)( n[1].b, n[2].b, n[3].b, n[4].b ); - break; - case OPCODE_COLOR_MATERIAL: - (*ctx->Exec->ColorMaterial)( n[1].e, n[2].e ); - break; - case OPCODE_COLOR_TABLE: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->ColorTable)( n[1].e, n[2].e, n[3].i, n[4].e, - n[5].e, n[6].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_COLOR_TABLE_PARAMETER_FV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - (*ctx->Exec->ColorTableParameterfv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_COLOR_TABLE_PARAMETER_IV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - (*ctx->Exec->ColorTableParameteriv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_COLOR_SUB_TABLE: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->ColorSubTable)( n[1].e, n[2].i, n[3].i, - n[4].e, n[5].e, n[6].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_FILTER_1D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->ConvolutionFilter1D)( n[1].e, n[2].i, n[3].i, - n[4].e, n[5].e, n[6].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_FILTER_2D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->ConvolutionFilter2D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].e, n[6].e, n[7].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_PARAMETER_I: - (*ctx->Exec->ConvolutionParameteri)( n[1].e, n[2].e, n[3].i ); - break; - case OPCODE_CONVOLUTION_PARAMETER_IV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - (*ctx->Exec->ConvolutionParameteriv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_CONVOLUTION_PARAMETER_F: - (*ctx->Exec->ConvolutionParameterf)( n[1].e, n[2].e, n[3].f ); - break; - case OPCODE_CONVOLUTION_PARAMETER_FV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - (*ctx->Exec->ConvolutionParameterfv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_COPY_COLOR_SUB_TABLE: - (*ctx->Exec->CopyColorSubTable)( n[1].e, n[2].i, - n[3].i, n[4].i, n[5].i ); - break; - case OPCODE_COPY_COLOR_TABLE: - (*ctx->Exec->CopyColorSubTable)( n[1].e, n[2].i, - n[3].i, n[4].i, n[5].i ); - break; - case OPCODE_COPY_PIXELS: - (*ctx->Exec->CopyPixels)( n[1].i, n[2].i, - (GLsizei) n[3].i, (GLsizei) n[4].i, n[5].e ); - break; - case OPCODE_COPY_TEX_IMAGE1D: - (*ctx->Exec->CopyTexImage1D)( n[1].e, n[2].i, n[3].e, n[4].i, - n[5].i, n[6].i, n[7].i ); - break; - case OPCODE_COPY_TEX_IMAGE2D: - (*ctx->Exec->CopyTexImage2D)( n[1].e, n[2].i, n[3].e, n[4].i, - n[5].i, n[6].i, n[7].i, n[8].i ); - break; - case OPCODE_COPY_TEX_SUB_IMAGE1D: - (*ctx->Exec->CopyTexSubImage1D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i ); - break; - case OPCODE_COPY_TEX_SUB_IMAGE2D: - (*ctx->Exec->CopyTexSubImage2D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i, n[7].i, n[8].i ); - break; - case OPCODE_COPY_TEX_SUB_IMAGE3D: - (*ctx->Exec->CopyTexSubImage3D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i, n[7].i, n[8].i , n[9].i); - break; - case OPCODE_CULL_FACE: - (*ctx->Exec->CullFace)( n[1].e ); - break; - case OPCODE_DEPTH_FUNC: - (*ctx->Exec->DepthFunc)( n[1].e ); - break; - case OPCODE_DEPTH_MASK: - (*ctx->Exec->DepthMask)( n[1].b ); - break; - case OPCODE_DEPTH_RANGE: - (*ctx->Exec->DepthRange)( (GLclampd) n[1].f, (GLclampd) n[2].f ); - break; - case OPCODE_DISABLE: - (*ctx->Exec->Disable)( n[1].e ); - break; - case OPCODE_DRAW_BUFFER: - (*ctx->Exec->DrawBuffer)( n[1].e ); - break; - case OPCODE_DRAW_PIXELS: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->DrawPixels)( n[1].i, n[2].i, n[3].e, n[4].e, - n[5].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_ENABLE: - (*ctx->Exec->Enable)( n[1].e ); - break; - case OPCODE_EVALMESH1: - (*ctx->Exec->EvalMesh1)( n[1].e, n[2].i, n[3].i ); - break; - case OPCODE_EVALMESH2: - (*ctx->Exec->EvalMesh2)( n[1].e, n[2].i, n[3].i, n[4].i, n[5].i ); - break; - case OPCODE_FOG: - { - GLfloat p[4]; - p[0] = n[2].f; - p[1] = n[3].f; - p[2] = n[4].f; - p[3] = n[5].f; - (*ctx->Exec->Fogfv)( n[1].e, p ); - } - break; - case OPCODE_FRONT_FACE: - (*ctx->Exec->FrontFace)( n[1].e ); - break; - case OPCODE_FRUSTUM: - (*ctx->Exec->Frustum)( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); - break; - case OPCODE_HINT: - (*ctx->Exec->Hint)( n[1].e, n[2].e ); - break; - case OPCODE_HISTOGRAM: - (*ctx->Exec->Histogram)( n[1].e, n[2].i, n[3].e, n[4].b ); - break; - case OPCODE_INDEX_MASK: - (*ctx->Exec->IndexMask)( n[1].ui ); - break; - case OPCODE_INIT_NAMES: - (*ctx->Exec->InitNames)(); - break; - case OPCODE_LIGHT: - { - GLfloat p[4]; - p[0] = n[3].f; - p[1] = n[4].f; - p[2] = n[5].f; - p[3] = n[6].f; - (*ctx->Exec->Lightfv)( n[1].e, n[2].e, p ); - } - break; - case OPCODE_LIGHT_MODEL: - { - GLfloat p[4]; - p[0] = n[2].f; - p[1] = n[3].f; - p[2] = n[4].f; - p[3] = n[5].f; - (*ctx->Exec->LightModelfv)( n[1].e, p ); - } - break; - case OPCODE_LINE_STIPPLE: - (*ctx->Exec->LineStipple)( n[1].i, n[2].us ); - break; - case OPCODE_LINE_WIDTH: - (*ctx->Exec->LineWidth)( n[1].f ); - break; - case OPCODE_LIST_BASE: - (*ctx->Exec->ListBase)( n[1].ui ); - break; - case OPCODE_LOAD_IDENTITY: - (*ctx->Exec->LoadIdentity)(); - break; - case OPCODE_LOAD_MATRIX: - if (sizeof(Node)==sizeof(GLfloat)) { - (*ctx->Exec->LoadMatrixf)( &n[1].f ); - } - else { - GLfloat m[16]; - GLuint i; - for (i=0;i<16;i++) { - m[i] = n[1+i].f; - } - (*ctx->Exec->LoadMatrixf)( m ); - } - break; - case OPCODE_LOAD_NAME: - (*ctx->Exec->LoadName)( n[1].ui ); - break; - case OPCODE_LOGIC_OP: - (*ctx->Exec->LogicOp)( n[1].e ); - break; - case OPCODE_MAP1: - { - GLenum target = n[1].e; - GLint ustride = _mesa_evaluator_components(target); - GLint uorder = n[5].i; - GLfloat u1 = n[2].f; - GLfloat u2 = n[3].f; - (*ctx->Exec->Map1f)( target, u1, u2, ustride, uorder, - (GLfloat *) n[6].data ); - } - break; - case OPCODE_MAP2: - { - GLenum target = n[1].e; - GLfloat u1 = n[2].f; - GLfloat u2 = n[3].f; - GLfloat v1 = n[4].f; - GLfloat v2 = n[5].f; - GLint ustride = n[6].i; - GLint vstride = n[7].i; - GLint uorder = n[8].i; - GLint vorder = n[9].i; - (*ctx->Exec->Map2f)( target, u1, u2, ustride, uorder, - v1, v2, vstride, vorder, - (GLfloat *) n[10].data ); - } - break; - case OPCODE_MAPGRID1: - (*ctx->Exec->MapGrid1f)( n[1].i, n[2].f, n[3].f ); - break; - case OPCODE_MAPGRID2: - (*ctx->Exec->MapGrid2f)( n[1].i, n[2].f, n[3].f, n[4].i, n[5].f, n[6].f); - break; - case OPCODE_MATRIX_MODE: - (*ctx->Exec->MatrixMode)( n[1].e ); - break; - case OPCODE_MIN_MAX: - (*ctx->Exec->Minmax)(n[1].e, n[2].e, n[3].b); - break; - case OPCODE_MULT_MATRIX: - if (sizeof(Node)==sizeof(GLfloat)) { - (*ctx->Exec->MultMatrixf)( &n[1].f ); - } - else { - GLfloat m[16]; - GLuint i; - for (i=0;i<16;i++) { - m[i] = n[1+i].f; - } - (*ctx->Exec->MultMatrixf)( m ); - } - break; - case OPCODE_ORTHO: - (*ctx->Exec->Ortho)( n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); - break; - case OPCODE_PASSTHROUGH: - (*ctx->Exec->PassThrough)( n[1].f ); - break; - case OPCODE_PIXEL_MAP: - (*ctx->Exec->PixelMapfv)( n[1].e, n[2].i, (GLfloat *) n[3].data ); - break; - case OPCODE_PIXEL_TRANSFER: - (*ctx->Exec->PixelTransferf)( n[1].e, n[2].f ); - break; - case OPCODE_PIXEL_ZOOM: - (*ctx->Exec->PixelZoom)( n[1].f, n[2].f ); - break; - case OPCODE_POINT_SIZE: - (*ctx->Exec->PointSize)( n[1].f ); - break; - case OPCODE_POINT_PARAMETERS: - { - GLfloat params[3]; - params[0] = n[2].f; - params[1] = n[3].f; - params[2] = n[4].f; - (*ctx->Exec->PointParameterfvEXT)( n[1].e, params ); - } - break; - case OPCODE_POLYGON_MODE: - (*ctx->Exec->PolygonMode)( n[1].e, n[2].e ); - break; - case OPCODE_POLYGON_STIPPLE: - (*ctx->Exec->PolygonStipple)( (GLubyte *) n[1].data ); - break; - case OPCODE_POLYGON_OFFSET: - (*ctx->Exec->PolygonOffset)( n[1].f, n[2].f ); - break; - case OPCODE_POP_ATTRIB: - (*ctx->Exec->PopAttrib)(); - break; - case OPCODE_POP_MATRIX: - (*ctx->Exec->PopMatrix)(); - break; - case OPCODE_POP_NAME: - (*ctx->Exec->PopName)(); - break; - case OPCODE_PRIORITIZE_TEXTURE: - (*ctx->Exec->PrioritizeTextures)( 1, &n[1].ui, &n[2].f ); - break; - case OPCODE_PUSH_ATTRIB: - (*ctx->Exec->PushAttrib)( n[1].bf ); - break; - case OPCODE_PUSH_MATRIX: - (*ctx->Exec->PushMatrix)(); - break; - case OPCODE_PUSH_NAME: - (*ctx->Exec->PushName)( n[1].ui ); - break; - case OPCODE_RASTER_POS: - (*ctx->Exec->RasterPos4f)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_READ_BUFFER: - (*ctx->Exec->ReadBuffer)( n[1].e ); - break; - case OPCODE_RESET_HISTOGRAM: - (*ctx->Exec->ResetHistogram)( n[1].e ); - break; - case OPCODE_RESET_MIN_MAX: - (*ctx->Exec->ResetMinmax)( n[1].e ); - break; - case OPCODE_ROTATE: - (*ctx->Exec->Rotatef)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_SCALE: - (*ctx->Exec->Scalef)( n[1].f, n[2].f, n[3].f ); - break; - case OPCODE_SCISSOR: - (*ctx->Exec->Scissor)( n[1].i, n[2].i, n[3].i, n[4].i ); - break; - case OPCODE_SHADE_MODEL: - (*ctx->Exec->ShadeModel)( n[1].e ); - break; - case OPCODE_STENCIL_FUNC: - (*ctx->Exec->StencilFunc)( n[1].e, n[2].i, n[3].ui ); - break; - case OPCODE_STENCIL_MASK: - (*ctx->Exec->StencilMask)( n[1].ui ); - break; - case OPCODE_STENCIL_OP: - (*ctx->Exec->StencilOp)( n[1].e, n[2].e, n[3].e ); - break; - case OPCODE_TEXENV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - (*ctx->Exec->TexEnvfv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_TEXGEN: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - (*ctx->Exec->TexGenfv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_TEXPARAMETER: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - (*ctx->Exec->TexParameterfv)( n[1].e, n[2].e, params ); - } - break; - case OPCODE_TEX_IMAGE1D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexImage1D)( - n[1].e, /* target */ - n[2].i, /* level */ - n[3].i, /* components */ - n[4].i, /* width */ - n[5].e, /* border */ - n[6].e, /* format */ - n[7].e, /* type */ - n[8].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TEX_IMAGE2D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexImage2D)( - n[1].e, /* target */ - n[2].i, /* level */ - n[3].i, /* components */ - n[4].i, /* width */ - n[5].i, /* height */ - n[6].e, /* border */ - n[7].e, /* format */ - n[8].e, /* type */ - n[9].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TEX_IMAGE3D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexImage3D)( - n[1].e, /* target */ - n[2].i, /* level */ - n[3].i, /* components */ - n[4].i, /* width */ - n[5].i, /* height */ - n[6].i, /* depth */ - n[7].e, /* border */ - n[8].e, /* format */ - n[9].e, /* type */ - n[10].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TEX_SUB_IMAGE1D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexSubImage1D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].e, - n[6].e, n[7].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TEX_SUB_IMAGE2D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexSubImage2D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].e, - n[6].i, n[7].e, n[8].e, n[9].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TEX_SUB_IMAGE3D: - { - struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = _mesa_native_packing; - (*ctx->Exec->TexSubImage3D)( n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i, n[7].i, - n[8].i, n[9].e, n[10].e, - n[11].data ); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_TRANSLATE: - (*ctx->Exec->Translatef)( n[1].f, n[2].f, n[3].f ); - break; - case OPCODE_VIEWPORT: - (*ctx->Exec->Viewport)(n[1].i, n[2].i, - (GLsizei) n[3].i, (GLsizei) n[4].i); - break; - case OPCODE_WINDOW_POS: - (*ctx->Exec->WindowPos4fMESA)( n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */ - (*ctx->Exec->ActiveTextureARB)( n[1].e ); - break; - case OPCODE_PIXEL_TEXGEN_SGIX: /* GL_SGIX_pixel_texture */ - (*ctx->Exec->PixelTexGenSGIX)( n[1].e ); - break; - case OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS: /* GL_SGIS_pixel_texture */ - (*ctx->Exec->PixelTexGenParameteriSGIS)( n[1].e, n[2].i ); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */ - (*ctx->Exec->CompressedTexImage1DARB)(n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, n[7].data); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */ - (*ctx->Exec->CompressedTexImage2DARB)(n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, n[7].i, n[8].data); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */ - (*ctx->Exec->CompressedTexImage3DARB)(n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, n[9].data); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */ - (*ctx->Exec->CompressedTexSubImage1DARB)(n[1].e, n[2].i, n[3].i, - n[4].i, n[5].e, n[6].i, n[7].data); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */ - (*ctx->Exec->CompressedTexSubImage2DARB)(n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i, n[7].e, n[8].i, n[9].data); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */ - (*ctx->Exec->CompressedTexSubImage3DARB)(n[1].e, n[2].i, n[3].i, - n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, - n[9].e, n[10].i, n[11].data); - break; - case OPCODE_SAMPLE_COVERAGE: /* GL_ARB_multisample */ - (*ctx->Exec->SampleCoverageARB)(n[1].f, n[2].b); - break; - case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */ - (*ctx->Exec->WindowPos3fMESA)( n[1].f, n[2].f, n[3].f ); - break; - case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */ - (*ctx->Exec->BindProgramNV)( n[1].e, n[2].ui ); - break; - case OPCODE_EXECUTE_PROGRAM_NV: - { - GLfloat v[4]; - v[0] = n[3].f; - v[1] = n[4].f; - v[2] = n[5].f; - v[3] = n[6].f; - (*ctx->Exec->ExecuteProgramNV)(n[1].e, n[2].ui, v); - } - break; - case OPCODE_REQUEST_PROGRAMS_RESIDENT_NV: - /* - (*ctx->Exec->RequestResidentProgramsNV)(); - */ - break; - case OPCODE_LOAD_PROGRAM_NV: - /* - (*ctx->Exec->LoadProgramNV)(); - */ - break; - case OPCODE_PROGRAM_PARAMETER4F_NV: - (*ctx->Exec->ProgramParameter4fNV)(n[1].e, n[2].ui, n[3].f, - n[4].f, n[5].f, n[6].f); - break; - case OPCODE_TRACK_MATRIX_NV: - (*ctx->Exec->TrackMatrixNV)(n[1].e, n[2].ui, n[3].e, n[4].e); - break; - - case OPCODE_CONTINUE: - n = (Node *) n[1].next; - break; - case OPCODE_END_OF_LIST: - done = GL_TRUE; - break; - default: - { - char msg[1000]; - _mesa_sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode); - _mesa_problem(ctx, msg); - } - done = GL_TRUE; - } - - /* increment n to point to next compiled command */ - if (opcode!=OPCODE_CONTINUE) { - n += InstSize[opcode]; - } - } - } - ctx->CallDepth--; - - if (ctx->Driver.EndCallList) - ctx->Driver.EndCallList( ctx ); -} - - - - - -/**********************************************************************/ -/* GL functions */ -/**********************************************************************/ - - - - -/* - * Test if a display list number is valid. - */ -GLboolean -_mesa_IsList( GLuint list ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); /* must be called before assert */ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - return islist(ctx, list); -} - - -/* - * Delete a sequence of consecutive display lists. - */ -void -_mesa_DeleteLists( GLuint list, GLsizei range ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint i; - FLUSH_VERTICES(ctx, 0); /* must be called before assert */ - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (range<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteLists" ); - return; - } - for (i=list;iShared->Mutex); - - base = _mesa_HashFindFreeKeyBlock(ctx->Shared->DisplayList, range); - if (base) { - /* reserve the list IDs by with empty/dummy lists */ - GLint i; - for (i=0; iShared->DisplayList, base+i, make_empty_list()); - } - } - - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - - return base; -} - - - -/* - * Begin a new display list. - */ -void -_mesa_NewList( GLuint list, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_CURRENT(ctx, 0); /* must be called before assert */ - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glNewList %u %s\n", list, - _mesa_lookup_enum_by_nr(mode)); - - if (list==0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glNewList" ); - return; - } - - if (mode!=GL_COMPILE && mode!=GL_COMPILE_AND_EXECUTE) { - _mesa_error( ctx, GL_INVALID_ENUM, "glNewList" ); - return; - } - - if (ctx->CurrentListPtr) { - /* already compiling a display list */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glNewList" ); - return; - } - - /* Allocate new display list */ - ctx->CurrentListNum = list; - ctx->CurrentBlock = (Node *) MALLOC( sizeof(Node) * BLOCK_SIZE ); - ctx->CurrentListPtr = ctx->CurrentBlock; - ctx->CurrentPos = 0; - ctx->CompileFlag = GL_TRUE; - ctx->ExecuteFlag = (mode == GL_COMPILE_AND_EXECUTE); - - ctx->Driver.NewList( ctx, list, mode ); - - ctx->CurrentDispatch = ctx->Save; - _glapi_set_dispatch( ctx->CurrentDispatch ); -} - - - -/* - * End definition of current display list. Is the current - * ASSERT_OUTSIDE_BEGIN_END strong enough to really guarentee that - * we are outside begin/end calls? - */ -void -_mesa_EndList( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_CURRENT(ctx, 0); /* must be called before assert */ - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glEndList\n"); - - /* Check that a list is under construction */ - if (!ctx->CurrentListPtr) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glEndList" ); - return; - } - - (void) ALLOC_INSTRUCTION( ctx, OPCODE_END_OF_LIST, 0 ); - - /* Destroy old list, if any */ - _mesa_destroy_list(ctx, ctx->CurrentListNum); - /* Install the list */ - _mesa_HashInsert(ctx->Shared->DisplayList, ctx->CurrentListNum, ctx->CurrentListPtr); - - - if (MESA_VERBOSE & VERBOSE_DISPLAY_LIST) - mesa_print_display_list(ctx->CurrentListNum); - - ctx->CurrentListNum = 0; - ctx->CurrentListPtr = NULL; - ctx->ExecuteFlag = GL_TRUE; - ctx->CompileFlag = GL_FALSE; - - ctx->Driver.EndList( ctx ); - - ctx->CurrentDispatch = ctx->Exec; - _glapi_set_dispatch( ctx->CurrentDispatch ); -} - - - -void -_mesa_CallList( GLuint list ) -{ - GLboolean save_compile_flag; - GET_CURRENT_CONTEXT(ctx); - FLUSH_CURRENT(ctx, 0); - /* VERY IMPORTANT: Save the CompileFlag status, turn it off, */ - /* execute the display list, and restore the CompileFlag. */ - - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glCallList %d\n", list); - -/* mesa_print_display_list( list ); */ - - save_compile_flag = ctx->CompileFlag; - if (save_compile_flag) { - ctx->CompileFlag = GL_FALSE; - } - - execute_list( ctx, list ); - ctx->CompileFlag = save_compile_flag; - - /* also restore API function pointers to point to "save" versions */ - if (save_compile_flag) { - ctx->CurrentDispatch = ctx->Save; - _glapi_set_dispatch( ctx->CurrentDispatch ); - } -} - - - -/* - * Execute glCallLists: call multiple display lists. - */ -void -_mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint list; - GLint i; - GLboolean save_compile_flag; - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glCallLists %d\n", n); - - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_2_BYTES: - case GL_3_BYTES: - case GL_4_BYTES: - /* OK */ - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glCallLists(type)"); - return; - } - - /* Save the CompileFlag status, turn it off, execute display list, - * and restore the CompileFlag. - */ - save_compile_flag = ctx->CompileFlag; - ctx->CompileFlag = GL_FALSE; - - for (i=0;iList.ListBase + list ); - } - - ctx->CompileFlag = save_compile_flag; - - /* also restore API function pointers to point to "save" versions */ - if (save_compile_flag) { - ctx->CurrentDispatch = ctx->Save; - _glapi_set_dispatch( ctx->CurrentDispatch ); - } -} - - - -/* - * Set the offset added to list numbers in glCallLists. - */ -void -_mesa_ListBase( GLuint base ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); /* must be called before assert */ - ASSERT_OUTSIDE_BEGIN_END(ctx); - ctx->List.ListBase = base; -} - - -/* Can no longer assume ctx->Exec->Func is equal to _mesa_Func. - */ -static void exec_Finish( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->Finish(); -} - -static void exec_Flush( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->Flush( ); -} - -static void exec_GetBooleanv( GLenum pname, GLboolean *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetBooleanv( pname, params ); -} - -static void exec_GetClipPlane( GLenum plane, GLdouble *equation ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetClipPlane( plane, equation ); -} - -static void exec_GetDoublev( GLenum pname, GLdouble *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetDoublev( pname, params ); -} - -static GLenum exec_GetError( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->GetError( ); -} - -static void exec_GetFloatv( GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetFloatv( pname, params ); -} - -static void exec_GetIntegerv( GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetIntegerv( pname, params ); -} - -static void exec_GetLightfv( GLenum light, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetLightfv( light, pname, params ); -} - -static void exec_GetLightiv( GLenum light, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetLightiv( light, pname, params ); -} - -static void exec_GetMapdv( GLenum target, GLenum query, GLdouble *v ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMapdv( target, query, v ); -} - -static void exec_GetMapfv( GLenum target, GLenum query, GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMapfv( target, query, v ); -} - -static void exec_GetMapiv( GLenum target, GLenum query, GLint *v ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMapiv( target, query, v ); -} - -static void exec_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMaterialfv( face, pname, params ); -} - -static void exec_GetMaterialiv( GLenum face, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMaterialiv( face, pname, params ); -} - -static void exec_GetPixelMapfv( GLenum map, GLfloat *values ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPixelMapfv( map, values ); -} - -static void exec_GetPixelMapuiv( GLenum map, GLuint *values ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPixelMapuiv( map, values ); -} - -static void exec_GetPixelMapusv( GLenum map, GLushort *values ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPixelMapusv( map, values ); -} - -static void exec_GetPolygonStipple( GLubyte *dest ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPolygonStipple( dest ); -} - -static const GLubyte *exec_GetString( GLenum name ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->GetString( name ); -} - -static void exec_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexEnvfv( target, pname, params ); -} - -static void exec_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexEnviv( target, pname, params ); -} - -static void exec_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexGendv( coord, pname, params ); -} - -static void exec_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexGenfv( coord, pname, params ); -} - -static void exec_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexGeniv( coord, pname, params ); -} - -static void exec_GetTexImage( GLenum target, GLint level, GLenum format, - GLenum type, GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexImage( target, level, format, type, pixels ); -} - -static void exec_GetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexLevelParameterfv( target, level, pname, params ); -} - -static void exec_GetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexLevelParameteriv( target, level, pname, params ); -} - -static void exec_GetTexParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexParameterfv( target, pname, params ); -} - -static void exec_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetTexParameteriv( target, pname, params ); -} - -static GLboolean exec_IsEnabled( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->IsEnabled( cap ); -} - -static void exec_PixelStoref( GLenum pname, GLfloat param ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->PixelStoref( pname, param ); -} - -static void exec_PixelStorei( GLenum pname, GLint param ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->PixelStorei( pname, param ); -} - -static void exec_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->ReadPixels( x, y, width, height, format, type, pixels ); -} - -static GLint exec_RenderMode( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->RenderMode( mode ); -} - -static void exec_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->FeedbackBuffer( size, type, buffer ); -} - -static void exec_SelectBuffer( GLsizei size, GLuint *buffer ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->SelectBuffer( size, buffer ); -} - -static GLboolean exec_AreTexturesResident(GLsizei n, const GLuint *texName, - GLboolean *residences) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->AreTexturesResident( n, texName, residences); -} - -static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->ColorPointer( size, type, stride, ptr); -} - -static void exec_DeleteTextures( GLsizei n, const GLuint *texName) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->DeleteTextures( n, texName); -} - -static void exec_DisableClientState( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->DisableClientState( cap ); -} - -static void exec_EdgeFlagPointer(GLsizei stride, const void *vptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->EdgeFlagPointer( stride, vptr); -} - -static void exec_EnableClientState( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->EnableClientState( cap ); -} - -static void exec_GenTextures( GLsizei n, GLuint *texName ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GenTextures( n, texName ); -} - -static void exec_GetPointerv( GLenum pname, GLvoid **params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPointerv( pname, params ); -} - -static void exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->IndexPointer( type, stride, ptr); -} - -static void exec_InterleavedArrays(GLenum format, GLsizei stride, - const GLvoid *pointer) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->InterleavedArrays( format, stride, pointer); -} - -static GLboolean exec_IsTexture( GLuint texture ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return ctx->Exec->IsTexture( texture ); -} - -static void exec_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->NormalPointer( type, stride, ptr ); -} - -static void exec_PopClientAttrib(void) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->PopClientAttrib(); -} - -static void exec_PushClientAttrib(GLbitfield mask) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->PushClientAttrib( mask); -} - -static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->TexCoordPointer( size, type, stride, ptr); -} - -static void exec_GetCompressedTexImageARB(GLenum target, GLint level, - GLvoid *img) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetCompressedTexImageARB( target, level, img); -} - -static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->VertexPointer( size, type, stride, ptr); -} - -static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->CopyConvolutionFilter1D( target, internalFormat, x, y, width); -} - -static void exec_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, - GLint x, GLint y, GLsizei width, - GLsizei height) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->CopyConvolutionFilter2D( target, internalFormat, x, y, width, - height); -} - -static void exec_GetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *data ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetColorTable( target, format, type, data ); -} - -static void exec_GetColorTableParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetColorTableParameterfv( target, pname, params ); -} - -static void exec_GetColorTableParameteriv( GLenum target, GLenum pname, - GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetColorTableParameteriv( target, pname, params ); -} - -static void exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, - GLvoid *image) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetConvolutionFilter( target, format, type, image); -} - -static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname, - GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetConvolutionParameterfv( target, pname, params); -} - -static void exec_GetConvolutionParameteriv(GLenum target, GLenum pname, - GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetConvolutionParameteriv( target, pname, params); -} - -static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format, - GLenum type, GLvoid *values) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetHistogram( target, reset, format, type, values); -} - -static void exec_GetHistogramParameterfv(GLenum target, GLenum pname, - GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetHistogramParameterfv( target, pname, params); -} - -static void exec_GetHistogramParameteriv(GLenum target, GLenum pname, - GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetHistogramParameteriv( target, pname, params); -} - -static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format, - GLenum type, GLvoid *values) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMinmax( target, reset, format, type, values); -} - -static void exec_GetMinmaxParameterfv(GLenum target, GLenum pname, - GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMinmaxParameterfv( target, pname, params); -} - -static void exec_GetMinmaxParameteriv(GLenum target, GLenum pname, - GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetMinmaxParameteriv( target, pname, params); -} - -static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type, - GLvoid *row, GLvoid *column, GLvoid *span) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetSeparableFilter( target, format, type, row, column, span); -} - -static void exec_SeparableFilter2D(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, - const GLvoid *column) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->SeparableFilter2D( target, internalFormat, width, height, format, - type, row, column); -} - -static void exec_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPixelTexGenParameterivSGIS( target, value); -} - -static void exec_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->GetPixelTexGenParameterfvSGIS( target, value); -} - -static void exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->ColorPointerEXT( size, type, stride, count, ptr); -} - -static void exec_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, - const GLboolean *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->EdgeFlagPointerEXT( stride, count, ptr); -} - -static void exec_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->IndexPointerEXT( type, stride, count, ptr); -} - -static void exec_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->NormalPointerEXT( type, stride, count, ptr); -} - -static void exec_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->TexCoordPointerEXT( size, type, stride, count, ptr); -} - -static void exec_VertexPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->VertexPointerEXT( size, type, stride, count, ptr); -} - -static void exec_LockArraysEXT(GLint first, GLsizei count) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->LockArraysEXT( first, count); -} - -static void exec_UnlockArraysEXT( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->UnlockArraysEXT( ); -} - -static void exec_ResizeBuffersMESA( void ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->ResizeBuffersMESA( ); -} - - -static void exec_ClientActiveTextureARB( GLenum target ) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->ClientActiveTextureARB(target); -} - -static void exec_SecondaryColorPointerEXT(GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->SecondaryColorPointerEXT( size, type, stride, ptr); -} - -static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->FogCoordPointerEXT( type, stride, ptr); -} - -/* GL_EXT_multi_draw_arrays */ -static void exec_MultiDrawArraysEXT(GLenum mode, GLint *first, - GLsizei *count, GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->MultiDrawArraysEXT( mode, first, count, primcount ); -} - -/* GL_EXT_multi_draw_arrays */ -static void exec_MultiDrawElementsEXT(GLenum mode, const GLsizei *count, - GLenum type, const GLvoid **indices, - GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - ctx->Exec->MultiDrawElementsEXT(mode, count, type, indices, primcount); -} - - - -/* - * Assign all the pointers in to point to Mesa's display list - * building functions. - * - * This does not include any of the tnl functions - they are - * initialized from _mesa_init_api_defaults and from the active vtxfmt - * struct. - */ -void -_mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize ) -{ - _mesa_init_no_op_table(table, tableSize); - - _mesa_loopback_init_api_table( table, GL_TRUE ); - - /* GL 1.0 */ - table->Accum = save_Accum; - table->AlphaFunc = save_AlphaFunc; - table->Bitmap = save_Bitmap; - table->BlendFunc = save_BlendFunc; - table->CallList = _mesa_save_CallList; - table->CallLists = _mesa_save_CallLists; - table->Clear = save_Clear; - table->ClearAccum = save_ClearAccum; - table->ClearColor = save_ClearColor; - table->ClearDepth = save_ClearDepth; - table->ClearIndex = save_ClearIndex; - table->ClearStencil = save_ClearStencil; - table->ClipPlane = save_ClipPlane; - table->ColorMask = save_ColorMask; - table->ColorMaterial = save_ColorMaterial; - table->CopyPixels = save_CopyPixels; - table->CullFace = save_CullFace; - table->DeleteLists = _mesa_DeleteLists; - table->DepthFunc = save_DepthFunc; - table->DepthMask = save_DepthMask; - table->DepthRange = save_DepthRange; - table->Disable = save_Disable; - table->DrawBuffer = save_DrawBuffer; - table->DrawPixels = save_DrawPixels; - table->Enable = save_Enable; - table->EndList = _mesa_EndList; - table->EvalMesh1 = _mesa_save_EvalMesh1; - table->EvalMesh2 = _mesa_save_EvalMesh2; - table->Finish = exec_Finish; - table->Flush = exec_Flush; - table->Fogf = save_Fogf; - table->Fogfv = save_Fogfv; - table->Fogi = save_Fogi; - table->Fogiv = save_Fogiv; - table->FrontFace = save_FrontFace; - table->Frustum = save_Frustum; - table->GenLists = _mesa_GenLists; - table->GetBooleanv = exec_GetBooleanv; - table->GetClipPlane = exec_GetClipPlane; - table->GetDoublev = exec_GetDoublev; - table->GetError = exec_GetError; - table->GetFloatv = exec_GetFloatv; - table->GetIntegerv = exec_GetIntegerv; - table->GetLightfv = exec_GetLightfv; - table->GetLightiv = exec_GetLightiv; - table->GetMapdv = exec_GetMapdv; - table->GetMapfv = exec_GetMapfv; - table->GetMapiv = exec_GetMapiv; - table->GetMaterialfv = exec_GetMaterialfv; - table->GetMaterialiv = exec_GetMaterialiv; - table->GetPixelMapfv = exec_GetPixelMapfv; - table->GetPixelMapuiv = exec_GetPixelMapuiv; - table->GetPixelMapusv = exec_GetPixelMapusv; - table->GetPolygonStipple = exec_GetPolygonStipple; - table->GetString = exec_GetString; - table->GetTexEnvfv = exec_GetTexEnvfv; - table->GetTexEnviv = exec_GetTexEnviv; - table->GetTexGendv = exec_GetTexGendv; - table->GetTexGenfv = exec_GetTexGenfv; - table->GetTexGeniv = exec_GetTexGeniv; - table->GetTexImage = exec_GetTexImage; - table->GetTexLevelParameterfv = exec_GetTexLevelParameterfv; - table->GetTexLevelParameteriv = exec_GetTexLevelParameteriv; - table->GetTexParameterfv = exec_GetTexParameterfv; - table->GetTexParameteriv = exec_GetTexParameteriv; - table->Hint = save_Hint; - table->IndexMask = save_IndexMask; - table->InitNames = save_InitNames; - table->IsEnabled = exec_IsEnabled; - table->IsList = _mesa_IsList; - table->LightModelf = save_LightModelf; - table->LightModelfv = save_LightModelfv; - table->LightModeli = save_LightModeli; - table->LightModeliv = save_LightModeliv; - table->Lightf = save_Lightf; - table->Lightfv = save_Lightfv; - table->Lighti = save_Lighti; - table->Lightiv = save_Lightiv; - table->LineStipple = save_LineStipple; - table->LineWidth = save_LineWidth; - table->ListBase = save_ListBase; - table->LoadIdentity = save_LoadIdentity; - table->LoadMatrixd = save_LoadMatrixd; - table->LoadMatrixf = save_LoadMatrixf; - table->LoadName = save_LoadName; - table->LogicOp = save_LogicOp; - table->Map1d = save_Map1d; - table->Map1f = save_Map1f; - table->Map2d = save_Map2d; - table->Map2f = save_Map2f; - table->MapGrid1d = save_MapGrid1d; - table->MapGrid1f = save_MapGrid1f; - table->MapGrid2d = save_MapGrid2d; - table->MapGrid2f = save_MapGrid2f; - table->MatrixMode = save_MatrixMode; - table->MultMatrixd = save_MultMatrixd; - table->MultMatrixf = save_MultMatrixf; - table->NewList = save_NewList; - table->Ortho = save_Ortho; - table->PassThrough = save_PassThrough; - table->PixelMapfv = save_PixelMapfv; - table->PixelMapuiv = save_PixelMapuiv; - table->PixelMapusv = save_PixelMapusv; - table->PixelStoref = exec_PixelStoref; - table->PixelStorei = exec_PixelStorei; - table->PixelTransferf = save_PixelTransferf; - table->PixelTransferi = save_PixelTransferi; - table->PixelZoom = save_PixelZoom; - table->PointSize = save_PointSize; - table->PolygonMode = save_PolygonMode; - table->PolygonOffset = save_PolygonOffset; - table->PolygonStipple = save_PolygonStipple; - table->PopAttrib = save_PopAttrib; - table->PopMatrix = save_PopMatrix; - table->PopName = save_PopName; - table->PushAttrib = save_PushAttrib; - table->PushMatrix = save_PushMatrix; - table->PushName = save_PushName; - table->RasterPos2d = save_RasterPos2d; - table->RasterPos2dv = save_RasterPos2dv; - table->RasterPos2f = save_RasterPos2f; - table->RasterPos2fv = save_RasterPos2fv; - table->RasterPos2i = save_RasterPos2i; - table->RasterPos2iv = save_RasterPos2iv; - table->RasterPos2s = save_RasterPos2s; - table->RasterPos2sv = save_RasterPos2sv; - table->RasterPos3d = save_RasterPos3d; - table->RasterPos3dv = save_RasterPos3dv; - table->RasterPos3f = save_RasterPos3f; - table->RasterPos3fv = save_RasterPos3fv; - table->RasterPos3i = save_RasterPos3i; - table->RasterPos3iv = save_RasterPos3iv; - table->RasterPos3s = save_RasterPos3s; - table->RasterPos3sv = save_RasterPos3sv; - table->RasterPos4d = save_RasterPos4d; - table->RasterPos4dv = save_RasterPos4dv; - table->RasterPos4f = save_RasterPos4f; - table->RasterPos4fv = save_RasterPos4fv; - table->RasterPos4i = save_RasterPos4i; - table->RasterPos4iv = save_RasterPos4iv; - table->RasterPos4s = save_RasterPos4s; - table->RasterPos4sv = save_RasterPos4sv; - table->ReadBuffer = save_ReadBuffer; - table->ReadPixels = exec_ReadPixels; - table->RenderMode = exec_RenderMode; - table->Rotated = save_Rotated; - table->Rotatef = save_Rotatef; - table->Scaled = save_Scaled; - table->Scalef = save_Scalef; - table->Scissor = save_Scissor; - table->FeedbackBuffer = exec_FeedbackBuffer; - table->SelectBuffer = exec_SelectBuffer; - table->ShadeModel = save_ShadeModel; - table->StencilFunc = save_StencilFunc; - table->StencilMask = save_StencilMask; - table->StencilOp = save_StencilOp; - table->TexEnvf = save_TexEnvf; - table->TexEnvfv = save_TexEnvfv; - table->TexEnvi = save_TexEnvi; - table->TexEnviv = save_TexEnviv; - table->TexGend = save_TexGend; - table->TexGendv = save_TexGendv; - table->TexGenf = save_TexGenf; - table->TexGenfv = save_TexGenfv; - table->TexGeni = save_TexGeni; - table->TexGeniv = save_TexGeniv; - table->TexImage1D = save_TexImage1D; - table->TexImage2D = save_TexImage2D; - table->TexParameterf = save_TexParameterf; - table->TexParameterfv = save_TexParameterfv; - table->TexParameteri = save_TexParameteri; - table->TexParameteriv = save_TexParameteriv; - table->Translated = save_Translated; - table->Translatef = save_Translatef; - table->Viewport = save_Viewport; - - /* GL 1.1 */ - table->AreTexturesResident = exec_AreTexturesResident; - table->AreTexturesResidentEXT = exec_AreTexturesResident; - table->BindTexture = save_BindTexture; - table->ColorPointer = exec_ColorPointer; - table->CopyTexImage1D = save_CopyTexImage1D; - table->CopyTexImage2D = save_CopyTexImage2D; - table->CopyTexSubImage1D = save_CopyTexSubImage1D; - table->CopyTexSubImage2D = save_CopyTexSubImage2D; - table->DeleteTextures = exec_DeleteTextures; - table->DisableClientState = exec_DisableClientState; - table->EdgeFlagPointer = exec_EdgeFlagPointer; - table->EnableClientState = exec_EnableClientState; - table->GenTextures = exec_GenTextures; - table->GenTexturesEXT = exec_GenTextures; - table->GetPointerv = exec_GetPointerv; - table->IndexPointer = exec_IndexPointer; - table->InterleavedArrays = exec_InterleavedArrays; - table->IsTexture = exec_IsTexture; - table->IsTextureEXT = exec_IsTexture; - table->NormalPointer = exec_NormalPointer; - table->PopClientAttrib = exec_PopClientAttrib; - table->PrioritizeTextures = save_PrioritizeTextures; - table->PushClientAttrib = exec_PushClientAttrib; - table->TexCoordPointer = exec_TexCoordPointer; - table->TexSubImage1D = save_TexSubImage1D; - table->TexSubImage2D = save_TexSubImage2D; - table->VertexPointer = exec_VertexPointer; - - /* GL 1.2 */ - table->CopyTexSubImage3D = save_CopyTexSubImage3D; - table->TexImage3D = save_TexImage3D; - table->TexSubImage3D = save_TexSubImage3D; - - /* GL_ARB_imaging */ - /* Not all are supported */ - table->BlendColor = save_BlendColor; - table->BlendEquation = save_BlendEquation; - table->ColorSubTable = save_ColorSubTable; - table->ColorTable = save_ColorTable; - table->ColorTableParameterfv = save_ColorTableParameterfv; - table->ColorTableParameteriv = save_ColorTableParameteriv; - table->ConvolutionFilter1D = save_ConvolutionFilter1D; - table->ConvolutionFilter2D = save_ConvolutionFilter2D; - table->ConvolutionParameterf = save_ConvolutionParameterf; - table->ConvolutionParameterfv = save_ConvolutionParameterfv; - table->ConvolutionParameteri = save_ConvolutionParameteri; - table->ConvolutionParameteriv = save_ConvolutionParameteriv; - table->CopyColorSubTable = save_CopyColorSubTable; - table->CopyColorTable = save_CopyColorTable; - table->CopyConvolutionFilter1D = exec_CopyConvolutionFilter1D; - table->CopyConvolutionFilter2D = exec_CopyConvolutionFilter2D; - table->GetColorTable = exec_GetColorTable; - table->GetColorTableEXT = exec_GetColorTable; - table->GetColorTableParameterfv = exec_GetColorTableParameterfv; - table->GetColorTableParameterfvEXT = exec_GetColorTableParameterfv; - table->GetColorTableParameteriv = exec_GetColorTableParameteriv; - table->GetColorTableParameterivEXT = exec_GetColorTableParameteriv; - table->GetConvolutionFilter = exec_GetConvolutionFilter; - table->GetConvolutionFilterEXT = exec_GetConvolutionFilter; - table->GetConvolutionParameterfv = exec_GetConvolutionParameterfv; - table->GetConvolutionParameterfvEXT = exec_GetConvolutionParameterfv; - table->GetConvolutionParameteriv = exec_GetConvolutionParameteriv; - table->GetConvolutionParameterivEXT = exec_GetConvolutionParameteriv; - table->GetHistogram = exec_GetHistogram; - table->GetHistogramEXT = exec_GetHistogram; - table->GetHistogramParameterfv = exec_GetHistogramParameterfv; - table->GetHistogramParameterfvEXT = exec_GetHistogramParameterfv; - table->GetHistogramParameteriv = exec_GetHistogramParameteriv; - table->GetHistogramParameterivEXT = exec_GetHistogramParameteriv; - table->GetMinmax = exec_GetMinmax; - table->GetMinmaxEXT = exec_GetMinmax; - table->GetMinmaxParameterfv = exec_GetMinmaxParameterfv; - table->GetMinmaxParameterfvEXT = exec_GetMinmaxParameterfv; - table->GetMinmaxParameteriv = exec_GetMinmaxParameteriv; - table->GetMinmaxParameterivEXT = exec_GetMinmaxParameteriv; - table->GetSeparableFilter = exec_GetSeparableFilter; - table->GetSeparableFilterEXT = exec_GetSeparableFilter; - table->Histogram = save_Histogram; - table->Minmax = save_Minmax; - table->ResetHistogram = save_ResetHistogram; - table->ResetMinmax = save_ResetMinmax; - table->SeparableFilter2D = exec_SeparableFilter2D; - - /* 2. GL_EXT_blend_color */ -#if 0 - table->BlendColorEXT = save_BlendColorEXT; -#endif - - /* 3. GL_EXT_polygon_offset */ - table->PolygonOffsetEXT = save_PolygonOffsetEXT; - - /* 6. GL_EXT_texture3d */ -#if 0 - table->CopyTexSubImage3DEXT = save_CopyTexSubImage3D; - table->TexImage3DEXT = save_TexImage3DEXT; - table->TexSubImage3DEXT = save_TexSubImage3D; -#endif - - /* 15. GL_SGIX_pixel_texture */ - table->PixelTexGenSGIX = save_PixelTexGenSGIX; - - /* 15. GL_SGIS_pixel_texture */ - table->PixelTexGenParameteriSGIS = save_PixelTexGenParameteriSGIS; - table->PixelTexGenParameterfSGIS = save_PixelTexGenParameterfSGIS; - table->PixelTexGenParameterivSGIS = save_PixelTexGenParameterivSGIS; - table->PixelTexGenParameterfvSGIS = save_PixelTexGenParameterfvSGIS; - table->GetPixelTexGenParameterivSGIS = exec_GetPixelTexGenParameterivSGIS; - table->GetPixelTexGenParameterfvSGIS = exec_GetPixelTexGenParameterfvSGIS; - - /* 30. GL_EXT_vertex_array */ - table->ColorPointerEXT = exec_ColorPointerEXT; - table->EdgeFlagPointerEXT = exec_EdgeFlagPointerEXT; - table->IndexPointerEXT = exec_IndexPointerEXT; - table->NormalPointerEXT = exec_NormalPointerEXT; - table->TexCoordPointerEXT = exec_TexCoordPointerEXT; - table->VertexPointerEXT = exec_VertexPointerEXT; - - /* 37. GL_EXT_blend_minmax */ -#if 0 - table->BlendEquationEXT = save_BlendEquationEXT; -#endif - - /* 54. GL_EXT_point_parameters */ - table->PointParameterfEXT = save_PointParameterfEXT; - table->PointParameterfvEXT = save_PointParameterfvEXT; - - /* 78. GL_EXT_paletted_texture */ -#if 0 - table->ColorTableEXT = save_ColorTable; - table->ColorSubTableEXT = save_ColorSubTable; -#endif - table->GetColorTableEXT = exec_GetColorTable; - table->GetColorTableParameterfvEXT = exec_GetColorTableParameterfv; - table->GetColorTableParameterivEXT = exec_GetColorTableParameteriv; - - /* 97. GL_EXT_compiled_vertex_array */ - table->LockArraysEXT = exec_LockArraysEXT; - table->UnlockArraysEXT = exec_UnlockArraysEXT; - - /* 145. GL_EXT_secondary_color */ - table->SecondaryColorPointerEXT = exec_SecondaryColorPointerEXT; - - /* 148. GL_EXT_multi_draw_arrays */ - table->MultiDrawArraysEXT = exec_MultiDrawArraysEXT; - table->MultiDrawElementsEXT = exec_MultiDrawElementsEXT; - - /* 149. GL_EXT_fog_coord */ - table->FogCoordPointerEXT = exec_FogCoordPointerEXT; - - /* 173. GL_EXT_blend_func_separate */ - table->BlendFuncSeparateEXT = save_BlendFuncSeparateEXT; - - /* 196. GL_MESA_resize_buffers */ - table->ResizeBuffersMESA = exec_ResizeBuffersMESA; - - /* 197. GL_MESA_window_pos */ - table->WindowPos2dMESA = save_WindowPos2dMESA; - table->WindowPos2dvMESA = save_WindowPos2dvMESA; - table->WindowPos2fMESA = save_WindowPos2fMESA; - table->WindowPos2fvMESA = save_WindowPos2fvMESA; - table->WindowPos2iMESA = save_WindowPos2iMESA; - table->WindowPos2ivMESA = save_WindowPos2ivMESA; - table->WindowPos2sMESA = save_WindowPos2sMESA; - table->WindowPos2svMESA = save_WindowPos2svMESA; - table->WindowPos3dMESA = save_WindowPos3dMESA; - table->WindowPos3dvMESA = save_WindowPos3dvMESA; - table->WindowPos3fMESA = save_WindowPos3fMESA; - table->WindowPos3fvMESA = save_WindowPos3fvMESA; - table->WindowPos3iMESA = save_WindowPos3iMESA; - table->WindowPos3ivMESA = save_WindowPos3ivMESA; - table->WindowPos3sMESA = save_WindowPos3sMESA; - table->WindowPos3svMESA = save_WindowPos3svMESA; - table->WindowPos4dMESA = save_WindowPos4dMESA; - table->WindowPos4dvMESA = save_WindowPos4dvMESA; - table->WindowPos4fMESA = save_WindowPos4fMESA; - table->WindowPos4fvMESA = save_WindowPos4fvMESA; - table->WindowPos4iMESA = save_WindowPos4iMESA; - table->WindowPos4ivMESA = save_WindowPos4ivMESA; - table->WindowPos4sMESA = save_WindowPos4sMESA; - table->WindowPos4svMESA = save_WindowPos4svMESA; - -#if FEATURE_NV_vertex_program - /* 233. GL_NV_vertex_program */ - /* The following commands DO NOT go into display lists: - * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV, - * VertexAttribPointerNV, GetProgram*, GetVertexAttrib* - */ - table->BindProgramNV = save_BindProgramNV; - table->DeleteProgramsNV = _mesa_DeleteProgramsNV; - table->ExecuteProgramNV = save_ExecuteProgramNV; - table->GenProgramsNV = _mesa_GenProgramsNV; - table->AreProgramsResidentNV = _mesa_AreProgramsResidentNV; - table->RequestResidentProgramsNV = _mesa_RequestResidentProgramsNV; - table->GetProgramParameterfvNV = _mesa_GetProgramParameterfvNV; - table->GetProgramParameterdvNV = _mesa_GetProgramParameterdvNV; - table->GetProgramivNV = _mesa_GetProgramivNV; - table->GetProgramStringNV = _mesa_GetProgramStringNV; - table->GetTrackMatrixivNV = _mesa_GetTrackMatrixivNV; - table->GetVertexAttribdvNV = _mesa_GetVertexAttribdvNV; - table->GetVertexAttribfvNV = _mesa_GetVertexAttribfvNV; - table->GetVertexAttribivNV = _mesa_GetVertexAttribivNV; - table->GetVertexAttribPointervNV = _mesa_GetVertexAttribPointervNV; - table->IsProgramNV = _mesa_IsProgramNV; - table->LoadProgramNV = _mesa_LoadProgramNV; - table->ProgramParameter4dNV = save_ProgramParameter4dNV; - table->ProgramParameter4dvNV = save_ProgramParameter4dvNV; - table->ProgramParameter4fNV = save_ProgramParameter4fNV; - table->ProgramParameter4fvNV = save_ProgramParameter4fvNV; - table->ProgramParameters4dvNV = save_ProgramParameters4dvNV; - table->ProgramParameters4fvNV = save_ProgramParameters4fvNV; - table->TrackMatrixNV = save_TrackMatrixNV; - table->VertexAttribPointerNV = _mesa_VertexAttribPointerNV; -#endif - - /* 262. GL_NV_point_sprite */ - table->PointParameteriNV = save_PointParameteriNV; - table->PointParameterivNV = save_PointParameterivNV; - - /* 268. GL_EXT_stencil_two_side */ - table->ActiveStencilFaceEXT = save_ActiveStencilFaceEXT; - - /* ARB 1. GL_ARB_multitexture */ - table->ActiveTextureARB = save_ActiveTextureARB; - table->ClientActiveTextureARB = exec_ClientActiveTextureARB; - - /* ARB 3. GL_ARB_transpose_matrix */ - table->LoadTransposeMatrixdARB = save_LoadTransposeMatrixdARB; - table->LoadTransposeMatrixfARB = save_LoadTransposeMatrixfARB; - table->MultTransposeMatrixdARB = save_MultTransposeMatrixdARB; - table->MultTransposeMatrixfARB = save_MultTransposeMatrixfARB; - - /* ARB 5. GL_ARB_multisample */ - table->SampleCoverageARB = save_SampleCoverageARB; - - /* ARB 12. GL_ARB_texture_compression */ - table->CompressedTexImage3DARB = save_CompressedTexImage3DARB; - table->CompressedTexImage2DARB = save_CompressedTexImage2DARB; - table->CompressedTexImage1DARB = save_CompressedTexImage1DARB; - table->CompressedTexSubImage3DARB = save_CompressedTexSubImage3DARB; - table->CompressedTexSubImage2DARB = save_CompressedTexSubImage2DARB; - table->CompressedTexSubImage1DARB = save_CompressedTexSubImage1DARB; - table->GetCompressedTexImageARB = exec_GetCompressedTexImageARB; - - /* ARB 14. GL_ARB_point_parameters */ - /* re-use EXT_point_parameters functions */ - - /* ARB 25. GL_ARB_window_pos */ - /* re-use MESA_window_pos functions */ -} - - - -/*** - *** Debugging code - ***/ -static const char *enum_string( GLenum k ) -{ - return _mesa_lookup_enum_by_nr( k ); -} - - -/* - * Print the commands in a display list. For debugging only. - * TODO: many commands aren't handled yet. - */ -static void print_list( GLcontext *ctx, GLuint list ) -{ - Node *n; - GLboolean done; - - if (!glIsList(list)) { - _mesa_printf("%u is not a display list ID\n", list); - return; - } - - n = (Node *) _mesa_HashLookup(ctx->Shared->DisplayList, list); - - _mesa_printf("START-LIST %u, address %p\n", list, (void*)n ); - - done = n ? GL_FALSE : GL_TRUE; - while (!done) { - OpCode opcode = n[0].opcode; - GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0; - - if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) { - ctx->listext.opcode[i].print(ctx, &n[1]); - n += ctx->listext.opcode[i].size; - } - else { - switch (opcode) { - case OPCODE_ACCUM: - _mesa_printf("accum %s %g\n", enum_string(n[1].e), n[2].f ); - break; - case OPCODE_BITMAP: - _mesa_printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i, - n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data ); - break; - case OPCODE_CALL_LIST: - _mesa_printf("CallList %d\n", (int) n[1].ui ); - break; - case OPCODE_CALL_LIST_OFFSET: - _mesa_printf("CallList %d + offset %u = %u\n", (int) n[1].ui, - ctx->List.ListBase, ctx->List.ListBase + n[1].ui ); - break; - case OPCODE_COLOR_TABLE_PARAMETER_FV: - _mesa_printf("ColorTableParameterfv %s %s %f %f %f %f\n", - enum_string(n[1].e), enum_string(n[2].e), - n[3].f, n[4].f, n[5].f, n[6].f); - break; - case OPCODE_COLOR_TABLE_PARAMETER_IV: - _mesa_printf("ColorTableParameteriv %s %s %d %d %d %d\n", - enum_string(n[1].e), enum_string(n[2].e), - n[3].i, n[4].i, n[5].i, n[6].i); - break; - case OPCODE_DISABLE: - _mesa_printf("Disable %s\n", enum_string(n[1].e)); - break; - case OPCODE_ENABLE: - _mesa_printf("Enable %s\n", enum_string(n[1].e)); - break; - case OPCODE_FRUSTUM: - _mesa_printf("Frustum %g %g %g %g %g %g\n", - n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); - break; - case OPCODE_LINE_STIPPLE: - _mesa_printf("LineStipple %d %x\n", n[1].i, (int) n[2].us ); - break; - case OPCODE_LOAD_IDENTITY: - _mesa_printf("LoadIdentity\n"); - break; - case OPCODE_LOAD_MATRIX: - _mesa_printf("LoadMatrix\n"); - _mesa_printf(" %8f %8f %8f %8f\n", - n[1].f, n[5].f, n[9].f, n[13].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[2].f, n[6].f, n[10].f, n[14].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[3].f, n[7].f, n[11].f, n[15].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[4].f, n[8].f, n[12].f, n[16].f); - break; - case OPCODE_MULT_MATRIX: - _mesa_printf("MultMatrix (or Rotate)\n"); - _mesa_printf(" %8f %8f %8f %8f\n", - n[1].f, n[5].f, n[9].f, n[13].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[2].f, n[6].f, n[10].f, n[14].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[3].f, n[7].f, n[11].f, n[15].f); - _mesa_printf(" %8f %8f %8f %8f\n", - n[4].f, n[8].f, n[12].f, n[16].f); - break; - case OPCODE_ORTHO: - _mesa_printf("Ortho %g %g %g %g %g %g\n", - n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f ); - break; - case OPCODE_POP_ATTRIB: - _mesa_printf("PopAttrib\n"); - break; - case OPCODE_POP_MATRIX: - _mesa_printf("PopMatrix\n"); - break; - case OPCODE_POP_NAME: - _mesa_printf("PopName\n"); - break; - case OPCODE_PUSH_ATTRIB: - _mesa_printf("PushAttrib %x\n", n[1].bf ); - break; - case OPCODE_PUSH_MATRIX: - _mesa_printf("PushMatrix\n"); - break; - case OPCODE_PUSH_NAME: - _mesa_printf("PushName %d\n", (int) n[1].ui ); - break; - case OPCODE_RASTER_POS: - _mesa_printf("RasterPos %g %g %g %g\n", - n[1].f, n[2].f,n[3].f,n[4].f); - break; - case OPCODE_ROTATE: - _mesa_printf("Rotate %g %g %g %g\n", - n[1].f, n[2].f, n[3].f, n[4].f ); - break; - case OPCODE_SCALE: - _mesa_printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f ); - break; - case OPCODE_TRANSLATE: - _mesa_printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f ); - break; - case OPCODE_BIND_TEXTURE: - _mesa_printf("BindTexture %s %d\n", - _mesa_lookup_enum_by_nr(n[1].ui), n[2].ui); - break; - case OPCODE_SHADE_MODEL: - _mesa_printf("ShadeModel %s\n", - _mesa_lookup_enum_by_nr(n[1].ui)); - break; - case OPCODE_MAP1: - _mesa_printf("Map1 %s %.3f %.3f %d %d\n", - _mesa_lookup_enum_by_nr(n[1].ui), - n[2].f, n[3].f, n[4].i, n[5].i); - break; - case OPCODE_MAP2: - _mesa_printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n", - _mesa_lookup_enum_by_nr(n[1].ui), - n[2].f, n[3].f, n[4].f, n[5].f, - n[6].i, n[7].i, n[8].i, n[9].i); - break; - case OPCODE_MAPGRID1: - _mesa_printf("MapGrid1 %d %.3f %.3f\n", - n[1].i, n[2].f, n[3].f); - break; - case OPCODE_MAPGRID2: - _mesa_printf("MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n", - n[1].i, n[2].f, n[3].f, - n[4].i, n[5].f, n[6].f); - break; - case OPCODE_EVALMESH1: - _mesa_printf("EvalMesh1 %d %d\n", n[1].i, n[2].i); - break; - case OPCODE_EVALMESH2: - _mesa_printf("EvalMesh2 %d %d %d %d\n", - n[1].i, n[2].i, n[3].i, n[4].i); - break; - - /* - * meta opcodes/commands - */ - case OPCODE_ERROR: - _mesa_printf("Error: %s %s\n", - enum_string(n[1].e), (const char *)n[2].data ); - break; - case OPCODE_CONTINUE: - _mesa_printf("DISPLAY-LIST-CONTINUE\n"); - n = (Node *) n[1].next; - break; - case OPCODE_END_OF_LIST: - _mesa_printf("END-LIST %u\n", list); - done = GL_TRUE; - break; - default: - if (opcode < 0 || opcode > OPCODE_END_OF_LIST) { - _mesa_printf("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n", - opcode, (void*) n); - return; - } - else { - _mesa_printf("command %d, %u operands\n", opcode, InstSize[opcode]); - } - } - /* increment n to point to next compiled command */ - if (opcode!=OPCODE_CONTINUE) { - n += InstSize[opcode]; - } - } - } -} - - - -/* - * Clients may call this function to help debug display list problems. - * This function is _ONLY_FOR_DEBUGGING_PURPOSES_. It may be removed, - * changed, or break in the future without notice. - */ -void mesa_print_display_list( GLuint list ) -{ - GET_CURRENT_CONTEXT(ctx); - print_list( ctx, list ); -} Index: xc/extras/Mesa/src/dlist.h diff -u xc/extras/Mesa/src/dlist.h:1.6 xc/extras/Mesa/src/dlist.h:removed --- xc/extras/Mesa/src/dlist.h:1.6 Sun Sep 28 15:16:54 2003 +++ xc/extras/Mesa/src/dlist.h Wed Mar 16 21:00:29 2005 @@ -1,108 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef DLIST_H -#define DLIST_H - - -#include "mtypes.h" - - -#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \ -do { \ - if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \ - ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \ - _mesa_compile_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ - return retval; \ - } \ -} while (0) - -#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \ -do { \ - if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \ - ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \ - _mesa_compile_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ - return; \ - } \ -} while (0) - -#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx) \ -do { \ - ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx); \ - FLUSH_VERTICES(ctx, 0); \ -} while (0) - -#define ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval)\ -do { \ - ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval); \ - FLUSH_VERTICES(ctx, 0); \ -} while (0) - - -extern void _mesa_init_lists( void ); - -extern void _mesa_destroy_list( GLcontext *ctx, GLuint list ); - -extern void _mesa_CallList( GLuint list ); - -extern void _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists ); - -extern void _mesa_DeleteLists( GLuint list, GLsizei range ); - -extern void _mesa_EndList( void ); - -extern GLuint _mesa_GenLists( GLsizei range ); - -extern GLboolean _mesa_IsList( GLuint list ); - -extern void _mesa_ListBase( GLuint base ); - -extern void _mesa_NewList( GLuint list, GLenum mode ); - -extern void _mesa_init_dlist_table( struct _glapi_table *table, - GLuint tableSize ); - -extern void _mesa_save_error( GLcontext *ctx, GLenum error, const char *s ); - -extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ); - - -extern void *_mesa_alloc_instruction( GLcontext *ctx, int opcode, GLint sz ); - -extern int _mesa_alloc_opcode( GLcontext *ctx, GLuint sz, - void (*execute)( GLcontext *, void * ), - void (*destroy)( GLcontext *, void * ), - void (*print)( GLcontext *, void * ) ); - -extern void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, - GLint j1, GLint j2 ); -extern void _mesa_save_EvalMesh1( GLenum mode, GLint i1, GLint i2 ); -extern void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists ); -extern void _mesa_save_CallList( GLuint list ); - - - -#endif Index: xc/extras/Mesa/src/drawpix.c diff -u xc/extras/Mesa/src/drawpix.c:1.10 xc/extras/Mesa/src/drawpix.c:removed --- xc/extras/Mesa/src/drawpix.c:1.10 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/drawpix.c Wed Mar 16 21:00:29 2005 @@ -1,283 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "colormac.h" -#include "context.h" -#include "drawpix.h" -#include "feedback.h" -#include "macros.h" -#include "mmath.h" -#include "state.h" -#include "mtypes.h" - - -/* - * Execute glDrawPixels - */ -void -_mesa_DrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glDrawPixels(width or height < 0" ); - return; - } - - if (ctx->RenderMode==GL_RENDER) { - GLint x, y; - if (!pixels || !ctx->Current.RasterPosValid) { - return; - } - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - /* Round, to satisfy conformance tests (matches SGI's OpenGL) */ - x = IROUND(ctx->Current.RasterPos[0]); - y = IROUND(ctx->Current.RasterPos[1]); - - ctx->OcclusionResult = GL_TRUE; - ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type, - &ctx->Unpack, pixels); - } - else if (ctx->RenderMode==GL_FEEDBACK) { - /* Feedback the current raster pos info */ - if (ctx->Current.RasterPosValid) { - FLUSH_CURRENT( ctx, 0 ); - FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_DRAW_PIXEL_TOKEN ); - _mesa_feedback_vertex( ctx, - ctx->Current.RasterPos, - ctx->Current.RasterColor, - ctx->Current.RasterIndex, - ctx->Current.RasterTexCoords[0] ); - } - } - else if (ctx->RenderMode==GL_SELECT) { - if (ctx->Current.RasterPosValid) { - _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); - } - } -} - - - -void -_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glReadPixels(width=%d height=%d)", width, height ); - return; - } - - if (!pixels) { - _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(pixels)" ); - return; - } - - if (ctx->NewState) - _mesa_update_state(ctx); - - ctx->Driver.ReadPixels(ctx, x, y, width, height, - format, type, &ctx->Pack, pixels); -} - - - -void -_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, - GLenum type ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint destx, desty; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glCopyPixels(width or height < 0)" ); - return; - } - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - if (ctx->RenderMode==GL_RENDER) { - /* Destination of copy: */ - if (!ctx->Current.RasterPosValid) { - return; - } - - /* Round, to satisfy conformance tests (matches SGI's OpenGL) */ - destx = IROUND(ctx->Current.RasterPos[0]); - desty = IROUND(ctx->Current.RasterPos[1]); - - ctx->OcclusionResult = GL_TRUE; - - ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty, - type ); - } - else if (ctx->RenderMode == GL_FEEDBACK) { - if (ctx->Current.RasterPosValid) { - FLUSH_CURRENT( ctx, 0 ); - FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_COPY_PIXEL_TOKEN ); - _mesa_feedback_vertex( ctx, - ctx->Current.RasterPos, - ctx->Current.RasterColor, - ctx->Current.RasterIndex, - ctx->Current.RasterTexCoords[0] ); - } - } - else if (ctx->RenderMode == GL_SELECT) { - _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); - } -} - - - -void -_mesa_Bitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glBitmap(width or height < 0)" ); - return; - } - - if (ctx->Current.RasterPosValid == GL_FALSE) { - return; /* do nothing */ - } - - if (ctx->RenderMode==GL_RENDER) { - if (bitmap) { - /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */ - GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig); - GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig); - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - ctx->OcclusionResult = GL_TRUE; - ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap ); - } - } - else if (ctx->RenderMode==GL_FEEDBACK) { - if (ctx->Current.RasterPosValid) { - FLUSH_CURRENT(ctx, 0); - FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_BITMAP_TOKEN ); - _mesa_feedback_vertex( ctx, - ctx->Current.RasterPos, - ctx->Current.RasterColor, - ctx->Current.RasterIndex, - ctx->Current.RasterTexCoords[0] ); - } - } - else if (ctx->RenderMode==GL_SELECT) { - /* Bitmaps don't generate selection hits. See appendix B of 1.1 spec. */ - } - - /* update raster position */ - ctx->Current.RasterPos[0] += xmove; - ctx->Current.RasterPos[1] += ymove; -} - - - -#if 0 /* experimental */ -/* - * Execute glDrawDepthPixelsMESA(). This function accepts both a color - * image and depth (Z) image. Rasterization produces fragments with - * color and Z taken from these images. This function is intended for - * Z-compositing. Normally, this operation requires two glDrawPixels - * calls with stencil testing. - */ -void -_mesa_DrawDepthPixelsMESA( GLsizei width, GLsizei height, - GLenum colorFormat, GLenum colorType, - const GLvoid *colors, - GLenum depthType, const GLvoid *depths ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glDrawDepthPixelsMESA(width or height < 0" ); - return; - } - - if (ctx->RenderMode==GL_RENDER) { - GLint x, y; - if (!colors || !depths || !ctx->Current.RasterPosValid) { - return; - } - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - /* Round, to satisfy conformance tests (matches SGI's OpenGL) */ - x = IROUND(ctx->Current.RasterPos[0]); - y = IROUND(ctx->Current.RasterPos[1]); - - ctx->OcclusionResult = GL_TRUE; - ctx->Driver.DrawDepthPixelsMESA(ctx, x, y, width, height, - colorFormat, colorType, colors, - depthType, depths, &ctx->Unpack); - } - else if (ctx->RenderMode==GL_FEEDBACK) { - /* Feedback the current raster pos info */ - if (ctx->Current.RasterPosValid) { - FLUSH_CURRENT( ctx, 0 ); - FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_DRAW_PIXEL_TOKEN ); - _mesa_feedback_vertex( ctx, - ctx->Current.RasterPos, - ctx->Current.RasterColor, - ctx->Current.RasterIndex, - ctx->Current.RasterTexCoords[0] ); - } - } - else if (ctx->RenderMode==GL_SELECT) { - if (ctx->Current.RasterPosValid) { - _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); - } - } -} - -#endif Index: xc/extras/Mesa/src/drawpix.h diff -u xc/extras/Mesa/src/drawpix.h:1.4 xc/extras/Mesa/src/drawpix.h:removed --- xc/extras/Mesa/src/drawpix.h:1.4 Fri Feb 22 14:25:28 2002 +++ xc/extras/Mesa/src/drawpix.h Wed Mar 16 21:00:29 2005 @@ -1,55 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef DRAWPIXELS_H -#define DRAWPIXELS_H - - -#include "mtypes.h" - - -extern void -_mesa_DrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, const GLvoid *pixels ); - - -extern void -_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid *pixels ); - - -extern void -_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, - GLenum type ); - - -extern void -_mesa_Bitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ); - - -#endif Index: xc/extras/Mesa/src/enable.c diff -u xc/extras/Mesa/src/enable.c:1.15 xc/extras/Mesa/src/enable.c:removed --- xc/extras/Mesa/src/enable.c:1.15 Mon Dec 1 18:35:03 2003 +++ xc/extras/Mesa/src/enable.c Wed Mar 16 21:00:29 2005 @@ -1,1294 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "context.h" -#include "enable.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "simple_list.h" -#include "mtypes.h" -#include "enums.h" -#include "math/m_matrix.h" -#include "math/m_xform.h" - - - -#define CHECK_EXTENSION(EXTNAME, CAP) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", \ - state ? "Enable" : "Disable", CAP); \ - return; \ - } - - - -static void -client_state( GLcontext *ctx, GLenum cap, GLboolean state ) -{ - GLuint flag; - GLuint *var; - - switch (cap) { - case GL_VERTEX_ARRAY: - var = &ctx->Array.Vertex.Enabled; - flag = _NEW_ARRAY_VERTEX; - break; - case GL_NORMAL_ARRAY: - var = &ctx->Array.Normal.Enabled; - flag = _NEW_ARRAY_NORMAL; - break; - case GL_COLOR_ARRAY: - var = &ctx->Array.Color.Enabled; - flag = _NEW_ARRAY_COLOR0; - break; - case GL_INDEX_ARRAY: - var = &ctx->Array.Index.Enabled; - flag = _NEW_ARRAY_INDEX; - break; - case GL_TEXTURE_COORD_ARRAY: - var = &ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled; - flag = _NEW_ARRAY_TEXCOORD(ctx->Array.ActiveTexture); - break; - case GL_EDGE_FLAG_ARRAY: - var = &ctx->Array.EdgeFlag.Enabled; - flag = _NEW_ARRAY_EDGEFLAG; - break; - case GL_FOG_COORDINATE_ARRAY_EXT: - var = &ctx->Array.FogCoord.Enabled; - flag = _NEW_ARRAY_FOGCOORD; - break; - case GL_SECONDARY_COLOR_ARRAY_EXT: - var = &ctx->Array.SecondaryColor.Enabled; - flag = _NEW_ARRAY_COLOR1; - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - { - GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV; - var = &ctx->Array.VertexAttrib[n].Enabled; - flag = _NEW_ARRAY_ATTRIB(n); - } - break; -#endif /* FEATURE_NV_vertex_program */ - - default: - _mesa_error( ctx, GL_INVALID_ENUM, - "glEnable/DisableClientState(0x%x)", cap); - return; - } - - if (*var == state) - return; - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.NewState |= flag; - *var = state; - - if (state) - ctx->Array._Enabled |= flag; - else - ctx->Array._Enabled &= ~flag; - - if (ctx->Driver.Enable) { - (*ctx->Driver.Enable)( ctx, cap, state ); - } -} - - - -void -_mesa_EnableClientState( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - client_state( ctx, cap, GL_TRUE ); -} - - - -void -_mesa_DisableClientState( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - client_state( ctx, cap, GL_FALSE ); -} - - -#undef CHECK_EXTENSION -#define CHECK_EXTENSION(EXTNAME, CAP) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \ - state ? "Enable" : "Disable", CAP); \ - return; \ - } - - -/* - * Perform glEnable and glDisable calls. - */ -void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) -{ - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "%s %s (newstate is %x)\n", - state ? "glEnable" : "glDisable", - _mesa_lookup_enum_by_nr(cap), - ctx->NewState); - - switch (cap) { - case GL_ALPHA_TEST: - if (ctx->Color.AlphaEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.AlphaEnabled = state; - break; - case GL_AUTO_NORMAL: - if (ctx->Eval.AutoNormal == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.AutoNormal = state; - break; - case GL_BLEND: - if (ctx->Color.BlendEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.BlendEnabled = state; - /* This is needed to support 1.1's RGB logic ops AND - * 1.0's blending logicops. - */ - ctx->Color._LogicOpEnabled = - (ctx->Color.ColorLogicOpEnabled || - (state && ctx->Color.BlendEquation == GL_LOGIC_OP)); - break; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - { - const GLuint p = cap - GL_CLIP_PLANE0; - - if ((ctx->Transform.ClipPlanesEnabled & (1 << p)) == ((GLuint) state << p)) - return; - - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - - if (state) { - ctx->Transform.ClipPlanesEnabled |= (1 << p); - - if (ctx->ProjectionMatrixStack.Top->flags & MAT_DIRTY) - _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); - - /* This derived state also calculated in clip.c and - * from _mesa_update_state() on changes to EyeUserPlane - * and ctx->ProjectionMatrix respectively. - */ - _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], - ctx->Transform.EyeUserPlane[p], - ctx->ProjectionMatrixStack.Top->inv ); - } - else { - ctx->Transform.ClipPlanesEnabled &= ~(1 << p); - } - } - break; - case GL_COLOR_MATERIAL: - if (ctx->Light.ColorMaterialEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - FLUSH_CURRENT(ctx, 0); - ctx->Light.ColorMaterialEnabled = state; - if (state) { - _mesa_update_color_material( ctx, - ctx->Current.Attrib[VERT_ATTRIB_COLOR0] ); - } - break; - case GL_CULL_FACE: - if (ctx->Polygon.CullFlag == state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.CullFlag = state; - break; - case GL_DEPTH_TEST: - if (state && ctx->Visual.depthBits==0) { - _mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer"); - return; - } - if (ctx->Depth.Test==state) - return; - FLUSH_VERTICES(ctx, _NEW_DEPTH); - ctx->Depth.Test = state; - break; - case GL_DITHER: - if (ctx->NoDither) { - state = GL_FALSE; /* MESA_NO_DITHER env var */ - } - if (ctx->Color.DitherFlag==state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.DitherFlag = state; - break; - case GL_FOG: - if (ctx->Fog.Enabled==state) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Enabled = state; - break; - case GL_HISTOGRAM: - CHECK_EXTENSION(EXT_histogram, cap); - if (ctx->Pixel.HistogramEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.HistogramEnabled = state; - break; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.Light[cap-GL_LIGHT0].Enabled = state; - if (state) { - insert_at_tail(&ctx->Light.EnabledList, - &ctx->Light.Light[cap-GL_LIGHT0]); - } - else { - remove_from_list(&ctx->Light.Light[cap-GL_LIGHT0]); - } - break; - case GL_LIGHTING: - if (ctx->Light.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.Enabled = state; - - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; - - if ((ctx->Light.Enabled && - ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) - || ctx->Fog.ColorSumEnabled) - ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; - else - ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR; - - break; - case GL_LINE_SMOOTH: - if (ctx->Line.SmoothFlag == state) - return; - FLUSH_VERTICES(ctx, _NEW_LINE); - ctx->Line.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_LINE_SMOOTH; - break; - case GL_LINE_STIPPLE: - if (ctx->Line.StippleFlag == state) - return; - FLUSH_VERTICES(ctx, _NEW_LINE); - ctx->Line.StippleFlag = state; - ctx->_TriangleCaps ^= DD_LINE_STIPPLE; - break; - case GL_INDEX_LOGIC_OP: - if (ctx->Color.IndexLogicOpEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.IndexLogicOpEnabled = state; - break; - case GL_COLOR_LOGIC_OP: - if (ctx->Color.ColorLogicOpEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.ColorLogicOpEnabled = state; - /* This is needed to support 1.1's RGB logic ops AND - * 1.0's blending logicops. - */ - ctx->Color._LogicOpEnabled = - (state || (ctx->Color.BlendEnabled && - ctx->Color.BlendEquation == GL_LOGIC_OP)); - break; - case GL_MAP1_COLOR_4: - if (ctx->Eval.Map1Color4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Color4 = state; - break; - case GL_MAP1_INDEX: - if (ctx->Eval.Map1Index == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Index = state; - break; - case GL_MAP1_NORMAL: - if (ctx->Eval.Map1Normal == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Normal = state; - break; - case GL_MAP1_TEXTURE_COORD_1: - if (ctx->Eval.Map1TextureCoord1 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1TextureCoord1 = state; - break; - case GL_MAP1_TEXTURE_COORD_2: - if (ctx->Eval.Map1TextureCoord2 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1TextureCoord2 = state; - break; - case GL_MAP1_TEXTURE_COORD_3: - if (ctx->Eval.Map1TextureCoord3 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1TextureCoord3 = state; - break; - case GL_MAP1_TEXTURE_COORD_4: - if (ctx->Eval.Map1TextureCoord4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1TextureCoord4 = state; - break; - case GL_MAP1_VERTEX_3: - if (ctx->Eval.Map1Vertex3 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Vertex3 = state; - break; - case GL_MAP1_VERTEX_4: - if (ctx->Eval.Map1Vertex4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Vertex4 = state; - break; - case GL_MAP2_COLOR_4: - if (ctx->Eval.Map2Color4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Color4 = state; - break; - case GL_MAP2_INDEX: - if (ctx->Eval.Map2Index == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Index = state; - break; - case GL_MAP2_NORMAL: - if (ctx->Eval.Map2Normal == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Normal = state; - break; - case GL_MAP2_TEXTURE_COORD_1: - if (ctx->Eval.Map2TextureCoord1 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2TextureCoord1 = state; - break; - case GL_MAP2_TEXTURE_COORD_2: - if (ctx->Eval.Map2TextureCoord2 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2TextureCoord2 = state; - break; - case GL_MAP2_TEXTURE_COORD_3: - if (ctx->Eval.Map2TextureCoord3 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2TextureCoord3 = state; - break; - case GL_MAP2_TEXTURE_COORD_4: - if (ctx->Eval.Map2TextureCoord4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2TextureCoord4 = state; - break; - case GL_MAP2_VERTEX_3: - if (ctx->Eval.Map2Vertex3 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Vertex3 = state; - break; - case GL_MAP2_VERTEX_4: - if (ctx->Eval.Map2Vertex4 == state) - return; - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Vertex4 = state; - break; - case GL_MINMAX: - if (ctx->Pixel.MinMaxEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.MinMaxEnabled = state; - break; - case GL_NORMALIZE: - if (ctx->Transform.Normalize == state) - return; - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->Transform.Normalize = state; - break; - case GL_POINT_SMOOTH: - if (ctx->Point.SmoothFlag==state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_POINT_SMOOTH; - break; - case GL_POLYGON_SMOOTH: - if (ctx->Polygon.SmoothFlag==state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.SmoothFlag = state; - ctx->_TriangleCaps ^= DD_TRI_SMOOTH; - break; - case GL_POLYGON_STIPPLE: - if (ctx->Polygon.StippleFlag==state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.StippleFlag = state; - ctx->_TriangleCaps ^= DD_TRI_STIPPLE; - break; - case GL_POLYGON_OFFSET_POINT: - if (ctx->Polygon.OffsetPoint==state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.OffsetPoint = state; - break; - case GL_POLYGON_OFFSET_LINE: - if (ctx->Polygon.OffsetLine==state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.OffsetLine = state; - break; - case GL_POLYGON_OFFSET_FILL: - /*case GL_POLYGON_OFFSET_EXT:*/ - if (ctx->Polygon.OffsetFill==state) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.OffsetFill = state; - break; - case GL_RESCALE_NORMAL_EXT: - if (ctx->Transform.RescaleNormals == state) - return; - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->Transform.RescaleNormals = state; - break; - case GL_SCISSOR_TEST: - if (ctx->Scissor.Enabled==state) - return; - FLUSH_VERTICES(ctx, _NEW_SCISSOR); - ctx->Scissor.Enabled = state; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - if (ctx->Texture.SharedPalette == state) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - ctx->Texture.SharedPalette = state; - break; - case GL_STENCIL_TEST: - if (state && ctx->Visual.stencilBits==0) { - _mesa_warning(ctx, - "glEnable(GL_STENCIL_TEST) but no stencil buffer"); - return; - } - if (ctx->Stencil.Enabled==state) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.Enabled = state; - break; - case GL_TEXTURE_1D: { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - GLuint newenabled = texUnit->Enabled & ~TEXTURE_1D_BIT; - if (state) - newenabled |= TEXTURE_1D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->Enabled = newenabled; - break; - } - case GL_TEXTURE_2D: { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - GLuint newenabled = texUnit->Enabled & ~TEXTURE_2D_BIT; - if (state) - newenabled |= TEXTURE_2D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->Enabled = newenabled; - break; - } - case GL_TEXTURE_3D: { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - GLuint newenabled = texUnit->Enabled & ~TEXTURE_3D_BIT; - if (state) - newenabled |= TEXTURE_3D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->Enabled = newenabled; - break; - } - case GL_TEXTURE_GEN_Q: { - GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLuint newenabled = texUnit->TexGenEnabled & ~Q_BIT; - if (state) - newenabled |= Q_BIT; - if (texUnit->TexGenEnabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->TexGenEnabled = newenabled; - break; - } - case GL_TEXTURE_GEN_R: { - GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLuint newenabled = texUnit->TexGenEnabled & ~R_BIT; - if (state) - newenabled |= R_BIT; - if (texUnit->TexGenEnabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->TexGenEnabled = newenabled; - break; - } - break; - case GL_TEXTURE_GEN_S: { - GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLuint newenabled = texUnit->TexGenEnabled & ~S_BIT; - if (state) - newenabled |= S_BIT; - if (texUnit->TexGenEnabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->TexGenEnabled = newenabled; - break; - } - break; - case GL_TEXTURE_GEN_T: { - GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLuint newenabled = texUnit->TexGenEnabled & ~T_BIT; - if (state) - newenabled |= T_BIT; - if (texUnit->TexGenEnabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->TexGenEnabled = newenabled; - break; - } - break; - - /* - * CLIENT STATE!!! - */ - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_FOG_COORDINATE_ARRAY_EXT: - case GL_SECONDARY_COLOR_ARRAY_EXT: - client_state( ctx, cap, state ); - return; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION(HP_occlusion_test, cap); - if (ctx->Depth.OcclusionTest == state) - return; - FLUSH_VERTICES(ctx, _NEW_DEPTH); - ctx->Depth.OcclusionTest = state; - if (state) - ctx->OcclusionResult = ctx->OcclusionResultSaved; - else - ctx->OcclusionResultSaved = ctx->OcclusionResult; - break; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION(SGIS_pixel_texture, cap); - if (ctx->Pixel.PixelTextureEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PixelTextureEnabled = state; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION(SGIX_pixel_texture, cap); - if (ctx->Pixel.PixelTextureEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PixelTextureEnabled = state; - break; - - /* GL_SGI_color_table */ - case GL_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table, cap); - if (ctx->Pixel.ColorTableEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.ColorTableEnabled = state; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table, cap); - if (ctx->Pixel.PostConvolutionColorTableEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionColorTableEnabled = state; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table, cap); - if (ctx->Pixel.PostColorMatrixColorTableEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixColorTableEnabled = state; - break; - - /* GL_EXT_convolution */ - case GL_CONVOLUTION_1D: - CHECK_EXTENSION(EXT_convolution, cap); - if (ctx->Pixel.Convolution1DEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.Convolution1DEnabled = state; - break; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION(EXT_convolution, cap); - if (ctx->Pixel.Convolution2DEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.Convolution2DEnabled = state; - break; - case GL_SEPARABLE_2D: - CHECK_EXTENSION(EXT_convolution, cap); - if (ctx->Pixel.Separable2DEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.Separable2DEnabled = state; - break; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - GLuint newenabled = texUnit->Enabled & ~TEXTURE_CUBE_BIT; - CHECK_EXTENSION(ARB_texture_cube_map, cap); - if (state) - newenabled |= TEXTURE_CUBE_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->Enabled = newenabled; - } - break; - - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION(EXT_secondary_color, cap); - if (ctx->Fog.ColorSumEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.ColorSumEnabled = state; - - if ((ctx->Light.Enabled && - ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) - || ctx->Fog.ColorSumEnabled) - ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; - else - ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR; - - break; - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION(ARB_multisample, cap); - if (ctx->Multisample.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.Enabled = state; - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION(ARB_multisample, cap); - if (ctx->Multisample.SampleAlphaToCoverage == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.SampleAlphaToCoverage = state; - break; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION(ARB_multisample, cap); - if (ctx->Multisample.SampleAlphaToOne == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.SampleAlphaToOne = state; - break; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION(ARB_multisample, cap); - if (ctx->Multisample.SampleCoverage == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.SampleCoverage = state; - break; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION(ARB_multisample, cap); - if (ctx->Multisample.SampleCoverageInvert == state) - return; - FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE); - ctx->Multisample.SampleCoverageInvert = state; - break; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION(IBM_rasterpos_clip, cap); - if (ctx->Transform.RasterPositionUnclipped == state) - return; - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->Transform.RasterPositionUnclipped = state; - break; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - CHECK_EXTENSION(NV_point_sprite, cap); - if (ctx->Point.PointSprite == state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.PointSprite = state; - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - if (ctx->VertexProgram.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_TRANSFORM | _NEW_PROGRAM); /* XXX OK? */ - ctx->VertexProgram.Enabled = state; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - if (ctx->VertexProgram.PointSizeEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT | _NEW_PROGRAM); - ctx->VertexProgram.PointSizeEnabled = state; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - if (ctx->VertexProgram.TwoSideEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); /* XXX OK? */ - ctx->VertexProgram.TwoSideEnabled = state; - break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Attrib[map] = state; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Attrib[map] = state; - } - break; -#endif /* FEATURE_NV_vertex_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION(NV_texture_rectangle, cap); - { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; - GLuint newenabled = texUnit->Enabled & ~TEXTURE_RECT_BIT; - CHECK_EXTENSION(NV_texture_rectangle, cap); - if (state) - newenabled |= TEXTURE_RECT_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->Enabled = newenabled; - } - break; - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION(EXT_stencil_two_side, cap); - if (ctx->Stencil.TestTwoSide == state) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.TestTwoSide = state; - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "%s(0x%x)", state ? "glEnable" : "glDisable", cap); - return; - } - - if (ctx->Driver.Enable) { - (*ctx->Driver.Enable)( ctx, cap, state ); - } -} - - -void -_mesa_Enable( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - _mesa_set_enable( ctx, cap, GL_TRUE ); -} - - -void -_mesa_Disable( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - _mesa_set_enable( ctx, cap, GL_FALSE ); -} - - -#undef CHECK_EXTENSION -#define CHECK_EXTENSION(EXTNAME) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled"); \ - return GL_FALSE; \ - } - - -GLboolean -_mesa_IsEnabled( GLenum cap ) -{ - GET_CURRENT_CONTEXT(ctx); - switch (cap) { - case GL_ALPHA_TEST: - return ctx->Color.AlphaEnabled; - case GL_AUTO_NORMAL: - return ctx->Eval.AutoNormal; - case GL_BLEND: - return ctx->Color.BlendEnabled; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - return (ctx->Transform.ClipPlanesEnabled >> (cap - GL_CLIP_PLANE0)) & 1; - case GL_COLOR_MATERIAL: - return ctx->Light.ColorMaterialEnabled; - case GL_CULL_FACE: - return ctx->Polygon.CullFlag; - case GL_DEPTH_TEST: - return ctx->Depth.Test; - case GL_DITHER: - return ctx->Color.DitherFlag; - case GL_FOG: - return ctx->Fog.Enabled; - case GL_LIGHTING: - return ctx->Light.Enabled; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - return ctx->Light.Light[cap-GL_LIGHT0].Enabled; - case GL_LINE_SMOOTH: - return ctx->Line.SmoothFlag; - case GL_LINE_STIPPLE: - return ctx->Line.StippleFlag; - case GL_INDEX_LOGIC_OP: - return ctx->Color.IndexLogicOpEnabled; - case GL_COLOR_LOGIC_OP: - return ctx->Color.ColorLogicOpEnabled; - case GL_MAP1_COLOR_4: - return ctx->Eval.Map1Color4; - case GL_MAP1_INDEX: - return ctx->Eval.Map1Index; - case GL_MAP1_NORMAL: - return ctx->Eval.Map1Normal; - case GL_MAP1_TEXTURE_COORD_1: - return ctx->Eval.Map1TextureCoord1; - case GL_MAP1_TEXTURE_COORD_2: - return ctx->Eval.Map1TextureCoord2; - case GL_MAP1_TEXTURE_COORD_3: - return ctx->Eval.Map1TextureCoord3; - case GL_MAP1_TEXTURE_COORD_4: - return ctx->Eval.Map1TextureCoord4; - case GL_MAP1_VERTEX_3: - return ctx->Eval.Map1Vertex3; - case GL_MAP1_VERTEX_4: - return ctx->Eval.Map1Vertex4; - case GL_MAP2_COLOR_4: - return ctx->Eval.Map2Color4; - case GL_MAP2_INDEX: - return ctx->Eval.Map2Index; - case GL_MAP2_NORMAL: - return ctx->Eval.Map2Normal; - case GL_MAP2_TEXTURE_COORD_1: - return ctx->Eval.Map2TextureCoord1; - case GL_MAP2_TEXTURE_COORD_2: - return ctx->Eval.Map2TextureCoord2; - case GL_MAP2_TEXTURE_COORD_3: - return ctx->Eval.Map2TextureCoord3; - case GL_MAP2_TEXTURE_COORD_4: - return ctx->Eval.Map2TextureCoord4; - case GL_MAP2_VERTEX_3: - return ctx->Eval.Map2Vertex3; - case GL_MAP2_VERTEX_4: - return ctx->Eval.Map2Vertex4; - case GL_NORMALIZE: - return ctx->Transform.Normalize; - case GL_POINT_SMOOTH: - return ctx->Point.SmoothFlag; - case GL_POLYGON_SMOOTH: - return ctx->Polygon.SmoothFlag; - case GL_POLYGON_STIPPLE: - return ctx->Polygon.StippleFlag; - case GL_POLYGON_OFFSET_POINT: - return ctx->Polygon.OffsetPoint; - case GL_POLYGON_OFFSET_LINE: - return ctx->Polygon.OffsetLine; - case GL_POLYGON_OFFSET_FILL: - /*case GL_POLYGON_OFFSET_EXT:*/ - return ctx->Polygon.OffsetFill; - case GL_RESCALE_NORMAL_EXT: - return ctx->Transform.RescaleNormals; - case GL_SCISSOR_TEST: - return ctx->Scissor.Enabled; - case GL_SHARED_TEXTURE_PALETTE_EXT: - return ctx->Texture.SharedPalette; - case GL_STENCIL_TEST: - return ctx->Stencil.Enabled; - case GL_TEXTURE_1D: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->Enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_2D: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->Enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_3D: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->Enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_GEN_Q: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_GEN_R: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_GEN_S: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE; - } - case GL_TEXTURE_GEN_T: - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE; - } - - /* - * CLIENT STATE!!! - */ - case GL_VERTEX_ARRAY: - return (ctx->Array.Vertex.Enabled != 0); - case GL_NORMAL_ARRAY: - return (ctx->Array.Normal.Enabled != 0); - case GL_COLOR_ARRAY: - return (ctx->Array.Color.Enabled != 0); - case GL_INDEX_ARRAY: - return (ctx->Array.Index.Enabled != 0); - case GL_TEXTURE_COORD_ARRAY: - return (ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled != 0); - case GL_EDGE_FLAG_ARRAY: - return (ctx->Array.EdgeFlag.Enabled != 0); - case GL_FOG_COORDINATE_ARRAY_EXT: - CHECK_EXTENSION(EXT_fog_coord); - return (ctx->Array.FogCoord.Enabled != 0); - case GL_SECONDARY_COLOR_ARRAY_EXT: - CHECK_EXTENSION(EXT_secondary_color); - return (ctx->Array.SecondaryColor.Enabled != 0); - - /* GL_EXT_histogram */ - case GL_HISTOGRAM: - CHECK_EXTENSION(EXT_histogram); - return ctx->Pixel.HistogramEnabled; - case GL_MINMAX: - CHECK_EXTENSION(EXT_histogram); - return ctx->Pixel.MinMaxEnabled; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION(HP_occlusion_test); - return ctx->Depth.OcclusionTest; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION(SGIS_pixel_texture); - return ctx->Pixel.PixelTextureEnabled; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION(SGIX_pixel_texture); - return ctx->Pixel.PixelTextureEnabled; - - /* GL_SGI_color_table */ - case GL_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table); - return ctx->Pixel.ColorTableEnabled; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table); - return ctx->Pixel.PostConvolutionColorTableEnabled; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - CHECK_EXTENSION(SGI_color_table); - return ctx->Pixel.PostColorMatrixColorTableEnabled; - - /* GL_EXT_convolution */ - case GL_CONVOLUTION_1D: - CHECK_EXTENSION(EXT_convolution); - return ctx->Pixel.Convolution1DEnabled; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION(EXT_convolution); - return ctx->Pixel.Convolution2DEnabled; - case GL_SEPARABLE_2D: - CHECK_EXTENSION(EXT_convolution); - return ctx->Pixel.Separable2DEnabled; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - CHECK_EXTENSION(ARB_texture_cube_map); - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->Enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE; - } - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION(ARB_multisample); - return ctx->Multisample.Enabled; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION(ARB_multisample); - return ctx->Multisample.SampleAlphaToCoverage; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION(ARB_multisample); - return ctx->Multisample.SampleAlphaToOne; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION(ARB_multisample); - return ctx->Multisample.SampleCoverage; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION(ARB_multisample); - return ctx->Multisample.SampleCoverageInvert; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION(IBM_rasterpos_clip); - return ctx->Transform.RasterPositionUnclipped; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - return ctx->Point.PointSprite; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION(NV_vertex_program); - return ctx->VertexProgram.Enabled; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION(NV_vertex_program); - return ctx->VertexProgram.PointSizeEnabled; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION(NV_vertex_program); - return ctx->VertexProgram.TwoSideEnabled; - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION(NV_vertex_program); - { - GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV; - return (ctx->Array.VertexAttrib[n].Enabled != 0); - } - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map1Attrib[map]; - } - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map2Attrib[map]; - } -#endif /* FEATURE_NV_vertex_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION(NV_texture_rectangle); - { - const struct gl_texture_unit *texUnit; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - return (texUnit->Enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE; - } - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION(EXT_stencil_two_side); - return ctx->Stencil.TestTwoSide; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap); - return GL_FALSE; - } -} Index: xc/extras/Mesa/src/enable.h diff -u xc/extras/Mesa/src/enable.h:1.4 xc/extras/Mesa/src/enable.h:removed --- xc/extras/Mesa/src/enable.h:1.4 Fri Feb 22 14:25:28 2002 +++ xc/extras/Mesa/src/enable.h Wed Mar 16 21:00:29 2005 @@ -1,53 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef ENABLE_H -#define ENABLE_H - - -#include "mtypes.h" - - -extern void -_mesa_set_enable( GLcontext* ctx, GLenum cap, GLboolean state ); - -extern void -_mesa_Disable( GLenum cap ); - -extern void -_mesa_Enable( GLenum cap ); - -extern GLboolean -_mesa_IsEnabled( GLenum cap ); - -extern void -_mesa_EnableClientState( GLenum cap ); - -extern void -_mesa_DisableClientState( GLenum cap ); - - -#endif Index: xc/extras/Mesa/src/enums.c diff -u xc/extras/Mesa/src/enums.c:1.11 xc/extras/Mesa/src/enums.c:removed --- xc/extras/Mesa/src/enums.c:1.11 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/enums.c Wed Mar 16 21:00:29 2005 @@ -1,973 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Author: - * Keith Whitwell - */ - - -#include "glheader.h" -#include "enums.h" -#include "imports.h" - - -typedef struct { - const char *c; - int n; -} enum_elt; - -enum_elt all_enums[] = -{ - /* Boolean values */ - { "GL_FALSE", 0 }, - { "GL_TRUE", 1 }, - - /* Data types */ - { "GL_BYTE", 0x1400 }, - { "GL_UNSIGNED_BYTE", 0x1401 }, - { "GL_SHORT", 0x1402 }, - { "GL_UNSIGNED_SHORT", 0x1403 }, - { "GL_INT", 0x1404 }, - { "GL_UNSIGNED_INT", 0x1405 }, - { "GL_FLOAT", 0x1406 }, - { "GL_DOUBLE", 0x140A }, - { "GL_2_BYTES", 0x1407 }, - { "GL_3_BYTES", 0x1408 }, - { "GL_4_BYTES", 0x1409 }, - - /* Primitives */ - { "GL_LINES", 0x0001 }, - { "GL_POINTS", 0x0000 }, - { "GL_LINE_STRIP", 0x0003 }, - { "GL_LINE_LOOP", 0x0002 }, - { "GL_TRIANGLES", 0x0004 }, - { "GL_TRIANGLE_STRIP", 0x0005 }, - { "GL_TRIANGLE_FAN", 0x0006 }, - { "GL_QUADS", 0x0007 }, - { "GL_QUAD_STRIP", 0x0008 }, - { "GL_POLYGON", 0x0009 }, - { "GL_EDGE_FLAG", 0x0B43 }, - - /* Vertex Arrays */ - { "GL_VERTEX_ARRAY", 0x8074 }, - { "GL_NORMAL_ARRAY", 0x8075 }, - { "GL_COLOR_ARRAY", 0x8076 }, - { "GL_INDEX_ARRAY", 0x8077 }, - { "GL_TEXTURE_COORD_ARRAY", 0x8078 }, - { "GL_EDGE_FLAG_ARRAY", 0x8079 }, - { "GL_VERTEX_ARRAY_SIZE", 0x807A }, - { "GL_VERTEX_ARRAY_TYPE", 0x807B }, - { "GL_VERTEX_ARRAY_STRIDE", 0x807C }, - { "GL_NORMAL_ARRAY_TYPE", 0x807E }, - { "GL_NORMAL_ARRAY_STRIDE", 0x807F }, - { "GL_COLOR_ARRAY_SIZE", 0x8081 }, - { "GL_COLOR_ARRAY_TYPE", 0x8082 }, - { "GL_COLOR_ARRAY_STRIDE", 0x8083 }, - { "GL_INDEX_ARRAY_TYPE", 0x8085 }, - { "GL_INDEX_ARRAY_STRIDE", 0x8086 }, - { "GL_TEXTURE_COORD_ARRAY_SIZE", 0x8088 }, - { "GL_TEXTURE_COORD_ARRAY_TYPE", 0x8089 }, - { "GL_TEXTURE_COORD_ARRAY_STRIDE", 0x808A }, - { "GL_EDGE_FLAG_ARRAY_STRIDE", 0x808C }, - { "GL_VERTEX_ARRAY_POINTER", 0x808E }, - { "GL_NORMAL_ARRAY_POINTER", 0x808F }, - { "GL_COLOR_ARRAY_POINTER", 0x8090 }, - { "GL_INDEX_ARRAY_POINTER", 0x8091 }, - { "GL_TEXTURE_COORD_ARRAY_POINTER", 0x8092 }, - { "GL_EDGE_FLAG_ARRAY_POINTER", 0x8093 }, - { "GL_V2F", 0x2A20 }, - { "GL_V3F", 0x2A21 }, - { "GL_C4UB_V2F", 0x2A22 }, - { "GL_C4UB_V3F", 0x2A23 }, - { "GL_C3F_V3F", 0x2A24 }, - { "GL_N3F_V3F", 0x2A25 }, - { "GL_C4F_N3F_V3F", 0x2A26 }, - { "GL_T2F_V3F", 0x2A27 }, - { "GL_T4F_V4F", 0x2A28 }, - { "GL_T2F_C4UB_V3F", 0x2A29 }, - { "GL_T2F_C3F_V3F", 0x2A2A }, - { "GL_T2F_N3F_V3F", 0x2A2B }, - { "GL_T2F_C4F_N3F_V3F", 0x2A2C }, - { "GL_T4F_C4F_N3F_V4F", 0x2A2D }, - - /* Matrix Mode */ - { "GL_MATRIX_MODE", 0x0BA0 }, - { "GL_MODELVIEW", 0x1700 }, - { "GL_PROJECTION", 0x1701 }, - { "GL_TEXTURE", 0x1702 }, - - /* Points */ - { "GL_POINT_SMOOTH", 0x0B10 }, - { "GL_POINT_SIZE", 0x0B11 }, - { "GL_POINT_SIZE_GRANULARITY ", 0x0B13 }, - { "GL_POINT_SIZE_RANGE", 0x0B12 }, - - /* Lines */ - { "GL_LINE_SMOOTH", 0x0B20 }, - { "GL_LINE_STIPPLE", 0x0B24 }, - { "GL_LINE_STIPPLE_PATTERN", 0x0B25 }, - { "GL_LINE_STIPPLE_REPEAT", 0x0B26 }, - { "GL_LINE_WIDTH", 0x0B21 }, - { "GL_LINE_WIDTH_GRANULARITY", 0x0B23 }, - { "GL_LINE_WIDTH_RANGE", 0x0B22 }, - - /* Polygons */ - { "GL_POINT", 0x1B00 }, - { "GL_LINE", 0x1B01 }, - { "GL_FILL", 0x1B02 }, - { "GL_CCW", 0x0901 }, - { "GL_CW", 0x0900 }, - { "GL_FRONT", 0x0404 }, - { "GL_BACK", 0x0405 }, - { "GL_CULL_FACE", 0x0B44 }, - { "GL_CULL_FACE_MODE", 0x0B45 }, - { "GL_POLYGON_SMOOTH", 0x0B41 }, - { "GL_POLYGON_STIPPLE", 0x0B42 }, - { "GL_FRONT_FACE", 0x0B46 }, - { "GL_POLYGON_MODE", 0x0B40 }, - { "GL_POLYGON_OFFSET_FACTOR", 0x8038 }, - { "GL_POLYGON_OFFSET_UNITS", 0x2A00 }, - { "GL_POLYGON_OFFSET_POINT", 0x2A01 }, - { "GL_POLYGON_OFFSET_LINE", 0x2A02 }, - { "GL_POLYGON_OFFSET_FILL", 0x8037 }, - - /* Display Lists */ - { "GL_COMPILE", 0x1300 }, - { "GL_COMPILE_AND_EXECUTE", 0x1301 }, - { "GL_LIST_BASE", 0x0B32 }, - { "GL_LIST_INDEX", 0x0B33 }, - { "GL_LIST_MODE", 0x0B30 }, - - /* Depth buffer */ - { "GL_NEVER", 0x0200 }, - { "GL_LESS", 0x0201 }, - { "GL_GEQUAL", 0x0206 }, - { "GL_LEQUAL", 0x0203 }, - { "GL_GREATER", 0x0204 }, - { "GL_NOTEQUAL", 0x0205 }, - { "GL_EQUAL", 0x0202 }, - { "GL_ALWAYS", 0x0207 }, - { "GL_DEPTH_TEST", 0x0B71 }, - { "GL_DEPTH_BITS", 0x0D56 }, - { "GL_DEPTH_CLEAR_VALUE", 0x0B73 }, - { "GL_DEPTH_FUNC", 0x0B74 }, - { "GL_DEPTH_RANGE", 0x0B70 }, - { "GL_DEPTH_WRITEMASK", 0x0B72 }, - { "GL_DEPTH_COMPONENT", 0x1902 }, - - /* Lighting */ - { "GL_LIGHTING", 0x0B50 }, - { "GL_LIGHT0", 0x4000 }, - { "GL_LIGHT1", 0x4001 }, - { "GL_LIGHT2", 0x4002 }, - { "GL_LIGHT3", 0x4003 }, - { "GL_LIGHT4", 0x4004 }, - { "GL_LIGHT5", 0x4005 }, - { "GL_LIGHT6", 0x4006 }, - { "GL_LIGHT7", 0x4007 }, - { "GL_SPOT_EXPONENT", 0x1205 }, - { "GL_SPOT_CUTOFF", 0x1206 }, - { "GL_CONSTANT_ATTENUATION", 0x1207 }, - { "GL_LINEAR_ATTENUATION", 0x1208 }, - { "GL_QUADRATIC_ATTENUATION", 0x1209 }, - { "GL_AMBIENT", 0x1200 }, - { "GL_DIFFUSE", 0x1201 }, - { "GL_SPECULAR", 0x1202 }, - { "GL_SHININESS", 0x1601 }, - { "GL_EMISSION", 0x1600 }, - { "GL_POSITION", 0x1203 }, - { "GL_SPOT_DIRECTION", 0x1204 }, - { "GL_AMBIENT_AND_DIFFUSE", 0x1602 }, - { "GL_COLOR_INDEXES", 0x1603 }, - { "GL_LIGHT_MODEL_TWO_SIDE", 0x0B52 }, - { "GL_LIGHT_MODEL_LOCAL_VIEWER", 0x0B51 }, - { "GL_LIGHT_MODEL_AMBIENT", 0x0B53 }, - { "GL_FRONT_AND_BACK", 0x0408 }, - { "GL_SHADE_MODEL", 0x0B54 }, - { "GL_FLAT", 0x1D00 }, - { "GL_SMOOTH", 0x1D01 }, - { "GL_COLOR_MATERIAL", 0x0B57 }, - { "GL_COLOR_MATERIAL_FACE", 0x0B55 }, - { "GL_COLOR_MATERIAL_PARAMETER", 0x0B56 }, - { "GL_NORMALIZE", 0x0BA1 }, - - /* User clipping planes */ - { "GL_CLIP_PLANE0", 0x3000 }, - { "GL_CLIP_PLANE1", 0x3001 }, - { "GL_CLIP_PLANE2", 0x3002 }, - { "GL_CLIP_PLANE3", 0x3003 }, - { "GL_CLIP_PLANE4", 0x3004 }, - { "GL_CLIP_PLANE5", 0x3005 }, - - /* Accumulation buffer */ - { "GL_ACCUM_RED_BITS", 0x0D58 }, - { "GL_ACCUM_GREEN_BITS", 0x0D59 }, - { "GL_ACCUM_BLUE_BITS", 0x0D5A }, - { "GL_ACCUM_ALPHA_BITS", 0x0D5B }, - { "GL_ACCUM_CLEAR_VALUE", 0x0B80 }, - { "GL_ACCUM", 0x0100 }, - { "GL_ADD", 0x0104 }, - { "GL_LOAD", 0x0101 }, - { "GL_MULT", 0x0103 }, - { "GL_RETURN", 0x0102 }, - - /* Alpha testing */ - { "GL_ALPHA_TEST", 0x0BC0 }, - { "GL_ALPHA_TEST_REF", 0x0BC2 }, - { "GL_ALPHA_TEST_FUNC", 0x0BC1 }, - - /* Blending */ - { "GL_BLEND", 0x0BE2 }, - { "GL_BLEND_SRC", 0x0BE1 }, - { "GL_BLEND_DST", 0x0BE0 }, - { "GL_ZERO", 0 }, - { "GL_ONE", 1 }, - { "GL_SRC_COLOR", 0x0300 }, - { "GL_ONE_MINUS_SRC_COLOR", 0x0301 }, - { "GL_DST_COLOR", 0x0306 }, - { "GL_ONE_MINUS_DST_COLOR", 0x0307 }, - { "GL_SRC_ALPHA", 0x0302 }, - { "GL_ONE_MINUS_SRC_ALPHA", 0x0303 }, - { "GL_DST_ALPHA", 0x0304 }, - { "GL_ONE_MINUS_DST_ALPHA", 0x0305 }, - { "GL_SRC_ALPHA_SATURATE", 0x0308 }, - { "GL_CONSTANT_COLOR", 0x8001 }, - { "GL_ONE_MINUS_CONSTANT_COLOR", 0x8002 }, - { "GL_CONSTANT_ALPHA", 0x8003 }, - { "GL_ONE_MINUS_CONSTANT_ALPHA", 0x8004 }, - - /* Render Mode */ - { "GL_FEEDBACK", 0x1C01 }, - { "GL_RENDER", 0x1C00 }, - { "GL_SELECT", 0x1C02 }, - - /* Feedback */ - { "GL_2D", 0x0600 }, - { "GL_3D", 0x0601 }, - { "GL_3D_COLOR", 0x0602 }, - { "GL_3D_COLOR_TEXTURE", 0x0603 }, - { "GL_4D_COLOR_TEXTURE", 0x0604 }, - { "GL_POINT_TOKEN", 0x0701 }, - { "GL_LINE_TOKEN", 0x0702 }, - { "GL_LINE_RESET_TOKEN", 0x0707 }, - { "GL_POLYGON_TOKEN", 0x0703 }, - { "GL_BITMAP_TOKEN", 0x0704 }, - { "GL_DRAW_PIXEL_TOKEN", 0x0705 }, - { "GL_COPY_PIXEL_TOKEN", 0x0706 }, - { "GL_PASS_THROUGH_TOKEN", 0x0700 }, - { "GL_FEEDBACK_BUFFER_POINTER", 0x0DF0 }, - { "GL_FEEDBACK_BUFFER_SIZE", 0x0DF1 }, - { "GL_FEEDBACK_BUFFER_TYPE", 0x0DF2 }, - - /* Selection */ - { "GL_SELECTION_BUFFER_POINTER", 0x0DF3 }, - { "GL_SELECTION_BUFFER_SIZE", 0x0DF4 }, - - /* Fog */ - { "GL_FOG", 0x0B60 }, - { "GL_FOG_MODE", 0x0B65 }, - { "GL_FOG_DENSITY", 0x0B62 }, - { "GL_FOG_COLOR", 0x0B66 }, - { "GL_FOG_INDEX", 0x0B61 }, - { "GL_FOG_START", 0x0B63 }, - { "GL_FOG_END", 0x0B64 }, - { "GL_LINEAR", 0x2601 }, - { "GL_EXP", 0x0800 }, - { "GL_EXP2", 0x0801 }, - - /* Logic Ops */ - { "GL_LOGIC_OP", 0x0BF1 }, - { "GL_INDEX_LOGIC_OP", 0x0BF1 }, - { "GL_COLOR_LOGIC_OP", 0x0BF2 }, - { "GL_LOGIC_OP_MODE", 0x0BF0 }, - { "GL_CLEAR", 0x1500 }, - { "GL_SET", 0x150F }, - { "GL_COPY", 0x1503 }, - { "GL_COPY_INVERTED", 0x150C }, - { "GL_NOOP", 0x1505 }, - { "GL_INVERT", 0x150A }, - { "GL_AND", 0x1501 }, - { "GL_NAND", 0x150E }, - { "GL_OR", 0x1507 }, - { "GL_NOR", 0x1508 }, - { "GL_XOR", 0x1506 }, - { "GL_EQUIV", 0x1509 }, - { "GL_AND_REVERSE", 0x1502 }, - { "GL_AND_INVERTED", 0x1504 }, - { "GL_OR_REVERSE", 0x150B }, - { "GL_OR_INVERTED", 0x150D }, - - /* Stencil */ - { "GL_STENCIL_TEST", 0x0B90 }, - { "GL_STENCIL_WRITEMASK", 0x0B98 }, - { "GL_STENCIL_BITS", 0x0D57 }, - { "GL_STENCIL_FUNC", 0x0B92 }, - { "GL_STENCIL_VALUE_MASK", 0x0B93 }, - { "GL_STENCIL_REF", 0x0B97 }, - { "GL_STENCIL_FAIL", 0x0B94 }, - { "GL_STENCIL_PASS_DEPTH_PASS", 0x0B96 }, - { "GL_STENCIL_PASS_DEPTH_FAIL", 0x0B95 }, - { "GL_STENCIL_CLEAR_VALUE", 0x0B91 }, - { "GL_STENCIL_INDEX", 0x1901 }, - { "GL_KEEP", 0x1E00 }, - { "GL_REPLACE", 0x1E01 }, - { "GL_INCR", 0x1E02 }, - { "GL_DECR", 0x1E03 }, - - /* Buffers, Pixel Drawing/Reading */ - { "GL_NONE", 0 }, - { "GL_LEFT", 0x0406 }, - { "GL_RIGHT", 0x0407 }, - { "GL_FRONT_LEFT", 0x0400 }, - { "GL_FRONT_RIGHT", 0x0401 }, - { "GL_BACK_LEFT", 0x0402 }, - { "GL_BACK_RIGHT", 0x0403 }, - { "GL_AUX0", 0x0409 }, - { "GL_AUX1", 0x040A }, - { "GL_AUX2", 0x040B }, - { "GL_AUX3", 0x040C }, - { "GL_COLOR_INDEX", 0x1900 }, - { "GL_RED", 0x1903 }, - { "GL_GREEN", 0x1904 }, - { "GL_BLUE", 0x1905 }, - { "GL_ALPHA", 0x1906 }, - { "GL_LUMINANCE", 0x1909 }, - { "GL_LUMINANCE_ALPHA", 0x190A }, - { "GL_ALPHA_BITS", 0x0D55 }, - { "GL_RED_BITS", 0x0D52 }, - { "GL_GREEN_BITS", 0x0D53 }, - { "GL_BLUE_BITS", 0x0D54 }, - { "GL_INDEX_BITS", 0x0D51 }, - { "GL_SUBPIXEL_BITS", 0x0D50 }, - { "GL_AUX_BUFFERS", 0x0C00 }, - { "GL_READ_BUFFER", 0x0C02 }, - { "GL_DRAW_BUFFER", 0x0C01 }, - { "GL_DOUBLEBUFFER", 0x0C32 }, - { "GL_STEREO", 0x0C33 }, - { "GL_BITMAP", 0x1A00 }, - { "GL_COLOR", 0x1800 }, - { "GL_DEPTH", 0x1801 }, - { "GL_STENCIL", 0x1802 }, - { "GL_DITHER", 0x0BD0 }, - { "GL_RGB", 0x1907 }, - { "GL_RGBA", 0x1908 }, - - /* Implementation limits */ - { "GL_MAX_LIST_NESTING", 0x0B31 }, - { "GL_MAX_ATTRIB_STACK_DEPTH", 0x0D35 }, - { "GL_MAX_MODELVIEW_STACK_DEPTH", 0x0D36 }, - { "GL_MAX_NAME_STACK_DEPTH", 0x0D37 }, - { "GL_MAX_PROJECTION_STACK_DEPTH", 0x0D38 }, - { "GL_MAX_TEXTURE_STACK_DEPTH", 0x0D39 }, - { "GL_MAX_EVAL_ORDER", 0x0D30 }, - { "GL_MAX_LIGHTS", 0x0D31 }, - { "GL_MAX_CLIP_PLANES", 0x0D32 }, - { "GL_MAX_TEXTURE_SIZE", 0x0D33 }, - { "GL_MAX_PIXEL_MAP_TABLE", 0x0D34 }, - { "GL_MAX_VIEWPORT_DIMS", 0x0D3A }, - { "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH", 0x0D3B }, - - - { "GL_ATTRIB_STACK_DEPTH", 0x0BB0 }, - { "GL_CLIENT_ATTRIB_STACK_DEPTH", 0x0BB1 }, - { "GL_COLOR_CLEAR_VALUE", 0x0C22 }, - { "GL_COLOR_WRITEMASK", 0x0C23 }, - { "GL_CURRENT_INDEX", 0x0B01 }, - { "GL_CURRENT_COLOR", 0x0B00 }, - { "GL_CURRENT_NORMAL", 0x0B02 }, - { "GL_CURRENT_RASTER_COLOR", 0x0B04 }, - { "GL_CURRENT_RASTER_DISTANCE", 0x0B09 }, - { "GL_CURRENT_RASTER_INDEX", 0x0B05 }, - { "GL_CURRENT_RASTER_POSITION", 0x0B07 }, - { "GL_CURRENT_RASTER_TEXTURE_COORDS", 0x0B06}, - { "GL_CURRENT_RASTER_POSITION_VALID", 0x0B08 }, - { "GL_CURRENT_TEXTURE_COORDS", 0x0B03 }, - { "GL_INDEX_CLEAR_VALUE", 0x0C20 }, - { "GL_INDEX_MODE", 0x0C30 }, - { "GL_INDEX_WRITEMASK", 0x0C21 }, - { "GL_MODELVIEW_MATRIX", 0x0BA6 }, - { "GL_MODELVIEW_STACK_DEPTH", 0x0BA3 }, - { "GL_NAME_STACK_DEPTH", 0x0D70 }, - { "GL_PROJECTION_MATRIX", 0x0BA7 }, - { "GL_PROJECTION_STACK_DEPTH", 0x0BA4 }, - { "GL_RENDER_MODE", 0x0C40 }, - { "GL_RGBA_MODE", 0x0C31 }, - { "GL_TEXTURE_MATRIX", 0x0BA8 }, - { "GL_TEXTURE_STACK_DEPTH", 0x0BA5 }, - { "GL_VIEWPORT", 0x0BA2 }, - - - /* Evaluators */ - { "GL_AUTO_NORMAL", 0x0D80 }, - { "GL_MAP1_COLOR_4", 0x0D90 }, - { "GL_MAP1_GRID_DOMAIN", 0x0DD0 }, - { "GL_MAP1_GRID_SEGMENTS", 0x0DD1 }, - { "GL_MAP1_INDEX", 0x0D91 }, - { "GL_MAP1_NORMAL", 0x0D92 }, - { "GL_MAP1_TEXTURE_COORD_1", 0x0D93 }, - { "GL_MAP1_TEXTURE_COORD_2", 0x0D94 }, - { "GL_MAP1_TEXTURE_COORD_3", 0x0D95 }, - { "GL_MAP1_TEXTURE_COORD_4", 0x0D96 }, - { "GL_MAP1_VERTEX_3", 0x0D97 }, - { "GL_MAP1_VERTEX_4", 0x0D98 }, - { "GL_MAP2_COLOR_4", 0x0DB0 }, - { "GL_MAP2_GRID_DOMAIN", 0x0DD2 }, - { "GL_MAP2_GRID_SEGMENTS", 0x0DD3 }, - { "GL_MAP2_INDEX", 0x0DB1 }, - { "GL_MAP2_NORMAL", 0x0DB2 }, - { "GL_MAP2_TEXTURE_COORD_1", 0x0DB3 }, - { "GL_MAP2_TEXTURE_COORD_2", 0x0DB4 }, - { "GL_MAP2_TEXTURE_COORD_3", 0x0DB5 }, - { "GL_MAP2_TEXTURE_COORD_4", 0x0DB6 }, - { "GL_MAP2_VERTEX_3", 0x0DB7 }, - { "GL_MAP2_VERTEX_4", 0x0DB8 }, - { "GL_COEFF", 0x0A00 }, - { "GL_DOMAIN", 0x0A02 }, - { "GL_ORDER", 0x0A01 }, - - /* Hints */ - { "GL_FOG_HINT", 0x0C54 }, - { "GL_LINE_SMOOTH_HINT", 0x0C52 }, - { "GL_PERSPECTIVE_CORRECTION_HINT", 0x0C50 }, - { "GL_POINT_SMOOTH_HINT", 0x0C51 }, - { "GL_POLYGON_SMOOTH_HINT", 0x0C53 }, - { "GL_DONT_CARE", 0x1100 }, - { "GL_FASTEST", 0x1101 }, - { "GL_NICEST", 0x1102 }, - - /* Scissor box */ - { "GL_SCISSOR_TEST", 0x0C11 }, - { "GL_SCISSOR_BOX", 0x0C10 }, - - /* Pixel Mode / Transfer */ - { "GL_MAP_COLOR", 0x0D10 }, - { "GL_MAP_STENCIL", 0x0D11 }, - { "GL_INDEX_SHIFT", 0x0D12 }, - { "GL_INDEX_OFFSET", 0x0D13 }, - { "GL_RED_SCALE", 0x0D14 }, - { "GL_RED_BIAS", 0x0D15 }, - { "GL_GREEN_SCALE", 0x0D18 }, - { "GL_GREEN_BIAS", 0x0D19 }, - { "GL_BLUE_SCALE", 0x0D1A }, - { "GL_BLUE_BIAS", 0x0D1B }, - { "GL_ALPHA_SCALE", 0x0D1C }, - { "GL_ALPHA_BIAS", 0x0D1D }, - { "GL_DEPTH_SCALE", 0x0D1E }, - { "GL_DEPTH_BIAS", 0x0D1F }, - { "GL_PIXEL_MAP_S_TO_S_SIZE", 0x0CB1 }, - { "GL_PIXEL_MAP_I_TO_I_SIZE", 0x0CB0 }, - { "GL_PIXEL_MAP_I_TO_R_SIZE", 0x0CB2 }, - { "GL_PIXEL_MAP_I_TO_G_SIZE", 0x0CB3 }, - { "GL_PIXEL_MAP_I_TO_B_SIZE", 0x0CB4 }, - { "GL_PIXEL_MAP_I_TO_A_SIZE", 0x0CB5 }, - { "GL_PIXEL_MAP_R_TO_R_SIZE", 0x0CB6 }, - { "GL_PIXEL_MAP_G_TO_G_SIZE", 0x0CB7 }, - { "GL_PIXEL_MAP_B_TO_B_SIZE", 0x0CB8 }, - { "GL_PIXEL_MAP_A_TO_A_SIZE", 0x0CB9 }, - { "GL_PIXEL_MAP_S_TO_S", 0x0C71 }, - { "GL_PIXEL_MAP_I_TO_I", 0x0C70 }, - { "GL_PIXEL_MAP_I_TO_R", 0x0C72 }, - { "GL_PIXEL_MAP_I_TO_G", 0x0C73 }, - { "GL_PIXEL_MAP_I_TO_B", 0x0C74 }, - { "GL_PIXEL_MAP_I_TO_A", 0x0C75 }, - { "GL_PIXEL_MAP_R_TO_R", 0x0C76 }, - { "GL_PIXEL_MAP_G_TO_G", 0x0C77 }, - { "GL_PIXEL_MAP_B_TO_B", 0x0C78 }, - { "GL_PIXEL_MAP_A_TO_A", 0x0C79 }, - { "GL_PACK_ALIGNMENT", 0x0D05 }, - { "GL_PACK_LSB_FIRST", 0x0D01 }, - { "GL_PACK_ROW_LENGTH", 0x0D02 }, - { "GL_PACK_SKIP_PIXELS", 0x0D04 }, - { "GL_PACK_SKIP_ROWS", 0x0D03 }, - { "GL_PACK_SWAP_BYTES", 0x0D00 }, - { "GL_UNPACK_ALIGNMENT", 0x0CF5 }, - { "GL_UNPACK_LSB_FIRST", 0x0CF1 }, - { "GL_UNPACK_ROW_LENGTH", 0x0CF2 }, - { "GL_UNPACK_SKIP_PIXELS", 0x0CF4 }, - { "GL_UNPACK_SKIP_ROWS", 0x0CF3 }, - { "GL_UNPACK_SWAP_BYTES", 0x0CF0 }, - { "GL_ZOOM_X", 0x0D16 }, - { "GL_ZOOM_Y", 0x0D17 }, - - /* Texture mapping */ - { "GL_TEXTURE_ENV", 0x2300 }, - { "GL_TEXTURE_ENV_MODE", 0x2200 }, - { "GL_TEXTURE_1D", 0x0DE0 }, - { "GL_TEXTURE_2D", 0x0DE1 }, - { "GL_TEXTURE_WRAP_S", 0x2802 }, - { "GL_TEXTURE_WRAP_T", 0x2803 }, - { "GL_TEXTURE_MAG_FILTER", 0x2800 }, - { "GL_TEXTURE_MIN_FILTER", 0x2801 }, - { "GL_TEXTURE_ENV_COLOR", 0x2201 }, - { "GL_TEXTURE_GEN_S", 0x0C60 }, - { "GL_TEXTURE_GEN_T", 0x0C61 }, - { "GL_TEXTURE_GEN_MODE", 0x2500 }, - { "GL_TEXTURE_BORDER_COLOR", 0x1004 }, - { "GL_TEXTURE_WIDTH", 0x1000 }, - { "GL_TEXTURE_HEIGHT", 0x1001 }, - { "GL_TEXTURE_BORDER", 0x1005 }, - { "GL_TEXTURE_COMPONENTS", 0x1003 }, - { "GL_TEXTURE_RED_SIZE", 0x805C }, - { "GL_TEXTURE_GREEN_SIZE", 0x805D }, - { "GL_TEXTURE_BLUE_SIZE", 0x805E }, - { "GL_TEXTURE_ALPHA_SIZE", 0x805F }, - { "GL_TEXTURE_LUMINANCE_SIZE", 0x8060 }, - { "GL_TEXTURE_INTENSITY_SIZE", 0x8061 }, - { "GL_NEAREST_MIPMAP_NEAREST", 0x2700 }, - { "GL_NEAREST_MIPMAP_LINEAR", 0x2702 }, - { "GL_LINEAR_MIPMAP_NEAREST", 0x2701 }, - { "GL_LINEAR_MIPMAP_LINEAR", 0x2703 }, - { "GL_OBJECT_LINEAR", 0x2401 }, - { "GL_OBJECT_PLANE", 0x2501 }, - { "GL_EYE_LINEAR", 0x2400 }, - { "GL_EYE_PLANE", 0x2502 }, - { "GL_SPHERE_MAP", 0x2402 }, - { "GL_DECAL", 0x2101 }, - { "GL_MODULATE", 0x2100 }, - { "GL_NEAREST", 0x2600 }, - { "GL_REPEAT", 0x2901 }, - { "GL_CLAMP", 0x2900 }, - { "GL_S", 0x2000 }, - { "GL_T", 0x2001 }, - { "GL_R", 0x2002 }, - { "GL_Q", 0x2003 }, - { "GL_TEXTURE_GEN_R", 0x0C62 }, - { "GL_TEXTURE_GEN_Q", 0x0C63 }, - - /* GL 1.1 texturing */ - { "GL_PROXY_TEXTURE_1D", 0x8063 }, - { "GL_PROXY_TEXTURE_2D", 0x8064 }, - { "GL_TEXTURE_PRIORITY", 0x8066 }, - { "GL_TEXTURE_RESIDENT", 0x8067 }, - { "GL_TEXTURE_BINDING_1D", 0x8068 }, - { "GL_TEXTURE_BINDING_2D", 0x8069 }, - { "GL_TEXTURE_INTERNAL_FORMAT", 0x1003 }, - - /* GL 1.2 texturing */ - { "GL_PACK_SKIP_IMAGES", 0x806B }, - { "GL_PACK_IMAGE_HEIGHT", 0x806C }, - { "GL_UNPACK_SKIP_IMAGES", 0x806D }, - { "GL_UNPACK_IMAGE_HEIGHT", 0x806E }, - { "GL_TEXTURE_3D", 0x806F }, - { "GL_PROXY_TEXTURE_3D", 0x8070 }, - { "GL_TEXTURE_DEPTH", 0x8071 }, - { "GL_TEXTURE_WRAP_R", 0x8072 }, - { "GL_MAX_3D_TEXTURE_SIZE", 0x8073 }, - { "GL_TEXTURE_BINDING_3D", 0x806A }, - - /* Internal texture formats (GL 1.1) */ - { "GL_ALPHA4", 0x803B }, - { "GL_ALPHA8", 0x803C }, - { "GL_ALPHA12", 0x803D }, - { "GL_ALPHA16", 0x803E }, - { "GL_LUMINANCE4", 0x803F }, - { "GL_LUMINANCE8", 0x8040 }, - { "GL_LUMINANCE12", 0x8041 }, - { "GL_LUMINANCE16", 0x8042 }, - { "GL_LUMINANCE4_ALPHA4", 0x8043 }, - { "GL_LUMINANCE6_ALPHA2", 0x8044 }, - { "GL_LUMINANCE8_ALPHA8", 0x8045 }, - { "GL_LUMINANCE12_ALPHA4", 0x8046 }, - { "GL_LUMINANCE12_ALPHA12", 0x8047 }, - { "GL_LUMINANCE16_ALPHA16", 0x8048 }, - { "GL_INTENSITY", 0x8049 }, - { "GL_INTENSITY4", 0x804A }, - { "GL_INTENSITY8", 0x804B }, - { "GL_INTENSITY12", 0x804C }, - { "GL_INTENSITY16", 0x804D }, - { "GL_R3_G3_B2", 0x2A10 }, - { "GL_RGB4", 0x804F }, - { "GL_RGB5", 0x8050 }, - { "GL_RGB8", 0x8051 }, - { "GL_RGB10", 0x8052 }, - { "GL_RGB12", 0x8053 }, - { "GL_RGB16", 0x8054 }, - { "GL_RGBA2", 0x8055 }, - { "GL_RGBA4", 0x8056 }, - { "GL_RGB5_A1", 0x8057 }, - { "GL_RGBA8", 0x8058 }, - { "GL_RGB10_A2", 0x8059 }, - { "GL_RGBA12", 0x805A }, - { "GL_RGBA16", 0x805B }, - - /* Utility */ - { "GL_VENDOR", 0x1F00 }, - { "GL_RENDERER", 0x1F01 }, - { "GL_VERSION", 0x1F02 }, - { "GL_EXTENSIONS", 0x1F03 }, - - /* Errors */ - { "GL_INVALID_VALUE", 0x0501 }, - { "GL_INVALID_ENUM", 0x0500 }, - { "GL_INVALID_OPERATION", 0x0502 }, - { "GL_STACK_OVERFLOW", 0x0503 }, - { "GL_STACK_UNDERFLOW", 0x0504 }, - { "GL_OUT_OF_MEMORY", 0x0505 }, - - /* - * Extensions - */ - - { "GL_CONSTANT_COLOR_EXT", 0x8001 }, - { "GL_ONE_MINUS_CONSTANT_COLOR_EXT", 0x8002 }, - { "GL_CONSTANT_ALPHA_EXT", 0x8003 }, - { "GL_ONE_MINUS_CONSTANT_ALPHA_EXT", 0x8004 }, - { "GL_BLEND_EQUATION_EXT", 0x8009 }, - { "GL_MIN_EXT", 0x8007 }, - { "GL_MAX_EXT", 0x8008 }, - { "GL_FUNC_ADD_EXT", 0x8006 }, - { "GL_FUNC_SUBTRACT_EXT", 0x800A }, - { "GL_FUNC_REVERSE_SUBTRACT_EXT", 0x800B }, - { "GL_BLEND_COLOR_EXT", 0x8005 }, - - { "GL_POLYGON_OFFSET_EXT", 0x8037 }, - { "GL_POLYGON_OFFSET_FACTOR_EXT", 0x8038 }, - { "GL_POLYGON_OFFSET_BIAS_EXT", 0x8039 }, - - - { "GL_VERTEX_ARRAY_EXT", 0x8074 }, - { "GL_NORMAL_ARRAY_EXT", 0x8075 }, - { "GL_COLOR_ARRAY_EXT", 0x8076 }, - { "GL_INDEX_ARRAY_EXT", 0x8077 }, - { "GL_TEXTURE_COORD_ARRAY_EXT", 0x8078 }, - { "GL_EDGE_FLAG_ARRAY_EXT", 0x8079 }, - { "GL_VERTEX_ARRAY_SIZE_EXT", 0x807A }, - { "GL_VERTEX_ARRAY_TYPE_EXT", 0x807B }, - { "GL_VERTEX_ARRAY_STRIDE_EXT", 0x807C }, - { "GL_VERTEX_ARRAY_COUNT_EXT", 0x807D }, - { "GL_NORMAL_ARRAY_TYPE_EXT", 0x807E }, - { "GL_NORMAL_ARRAY_STRIDE_EXT", 0x807F }, - { "GL_NORMAL_ARRAY_COUNT_EXT", 0x8080 }, - { "GL_COLOR_ARRAY_SIZE_EXT", 0x8081 }, - { "GL_COLOR_ARRAY_TYPE_EXT", 0x8082 }, - { "GL_COLOR_ARRAY_STRIDE_EXT", 0x8083 }, - { "GL_COLOR_ARRAY_COUNT_EXT", 0x8084 }, - { "GL_INDEX_ARRAY_TYPE_EXT", 0x8085 }, - { "GL_INDEX_ARRAY_STRIDE_EXT", 0x8086 }, - { "GL_INDEX_ARRAY_COUNT_EXT", 0x8087 }, - { "GL_TEXTURE_COORD_ARRAY_SIZE_EXT", 0x8088 }, - { "GL_TEXTURE_COORD_ARRAY_TYPE_EXT", 0x8089 }, - { "GL_TEXTURE_COORD_ARRAY_STRIDE_EXT", 0x808A }, - { "GL_TEXTURE_COORD_ARRAY_COUNT_EXT", 0x808B }, - { "GL_EDGE_FLAG_ARRAY_STRIDE_EXT", 0x808C }, - { "GL_EDGE_FLAG_ARRAY_COUNT_EXT", 0x808D }, - { "GL_VERTEX_ARRAY_POINTER_EXT", 0x808E }, - { "GL_NORMAL_ARRAY_POINTER_EXT", 0x808F }, - { "GL_COLOR_ARRAY_POINTER_EXT", 0x8090 }, - { "GL_INDEX_ARRAY_POINTER_EXT", 0x8091 }, - { "GL_TEXTURE_COORD_ARRAY_POINTER_EXT", 0x8092 }, - { "GL_EDGE_FLAG_ARRAY_POINTER_EXT", 0x8093 }, - - { "GL_TEXTURE_PRIORITY_EXT", 0x8066 }, - { "GL_TEXTURE_RESIDENT_EXT", 0x8067 }, - { "GL_TEXTURE_1D_BINDING_EXT", 0x8068 }, - { "GL_TEXTURE_2D_BINDING_EXT", 0x8069 }, - - { "GL_PACK_SKIP_IMAGES_EXT", 0x806B }, - { "GL_PACK_IMAGE_HEIGHT_EXT", 0x806C }, - { "GL_UNPACK_SKIP_IMAGES_EXT", 0x806D }, - { "GL_UNPACK_IMAGE_HEIGHT_EXT", 0x806E }, - { "GL_TEXTURE_3D_EXT", 0x806F }, - { "GL_PROXY_TEXTURE_3D_EXT", 0x8070 }, - { "GL_TEXTURE_DEPTH_EXT", 0x8071 }, - { "GL_TEXTURE_WRAP_R_EXT", 0x8072 }, - { "GL_MAX_3D_TEXTURE_SIZE_EXT", 0x8073 }, - { "GL_TEXTURE_3D_BINDING_EXT", 0x806A }, - - { "GL_TABLE_TOO_LARGE_EXT", 0x8031 }, - { "GL_COLOR_TABLE_FORMAT_EXT", 0x80D8 }, - { "GL_COLOR_TABLE_WIDTH_EXT", 0x80D9 }, - { "GL_COLOR_TABLE_RED_SIZE_EXT", 0x80DA }, - { "GL_COLOR_TABLE_GREEN_SIZE_EXT", 0x80DB }, - { "GL_COLOR_TABLE_BLUE_SIZE_EXT", 0x80DC }, - { "GL_COLOR_TABLE_ALPHA_SIZE_EXT", 0x80DD }, - { "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT", 0x80DE }, - { "GL_COLOR_TABLE_INTENSITY_SIZE_EXT", 0x80DF }, - { "GL_TEXTURE_INDEX_SIZE_EXT", 0x80ED }, - { "GL_COLOR_INDEX1_EXT", 0x80E2 }, - { "GL_COLOR_INDEX2_EXT", 0x80E3 }, - { "GL_COLOR_INDEX4_EXT", 0x80E4 }, - { "GL_COLOR_INDEX8_EXT", 0x80E5 }, - { "GL_COLOR_INDEX12_EXT", 0x80E6 }, - { "GL_COLOR_INDEX16_EXT", 0x80E7 }, - - { "GL_SHARED_TEXTURE_PALETTE_EXT", 0x81FB }, - - { "GL_POINT_SIZE_MIN_EXT", 0x8126 }, - { "GL_POINT_SIZE_MAX_EXT", 0x8127 }, - { "GL_POINT_FADE_THRESHOLD_SIZE_EXT", 0x8128 }, - { "GL_DISTANCE_ATTENUATION_EXT", 0x8129 }, - - { "GL_RESCALE_NORMAL_EXT", 0x803A }, - - { "GL_ABGR_EXT", 0x8000 }, - - { "GL_INCR_WRAP_EXT", 0x8507 }, - { "GL_DECR_WRAP_EXT", 0x8508 }, - - { "GL_CLAMP_TO_EDGE_SGIS", 0x812F }, - - { "GL_BLEND_DST_RGB_INGR", 0x80C8 }, - { "GL_BLEND_SRC_RGB_INGR", 0x80C9 }, - { "GL_BLEND_DST_ALPHA_INGR", 0x80CA }, - { "GL_BLEND_SRC_ALPHA_INGR", 0x80CB }, - - { "GL_RESCALE_NORMAL", 0x803A }, - { "GL_CLAMP_TO_EDGE", 0x812F }, - { "GL_MAX_ELEMENTS_VERTICES", 0xF0E8 }, - { "GL_MAX_ELEMENTS_INDICES", 0xF0E9 }, - { "GL_BGR", 0x80E0 }, - { "GL_BGRA", 0x80E1 }, - { "GL_UNSIGNED_BYTE_3_3_2", 0x8032 }, - { "GL_UNSIGNED_BYTE_2_3_3_REV", 0x8362 }, - { "GL_UNSIGNED_SHORT_5_6_5", 0x8363 }, - { "GL_UNSIGNED_SHORT_5_6_5_REV", 0x8364 }, - { "GL_UNSIGNED_SHORT_4_4_4_4", 0x8033 }, - { "GL_UNSIGNED_SHORT_4_4_4_4_REV", 0x8365 }, - { "GL_UNSIGNED_SHORT_5_5_5_1", 0x8034 }, - { "GL_UNSIGNED_SHORT_1_5_5_5_REV", 0x8366 }, - { "GL_UNSIGNED_INT_8_8_8_8", 0x8035 }, - { "GL_UNSIGNED_INT_8_8_8_8_REV", 0x8367 }, - { "GL_UNSIGNED_INT_10_10_10_2", 0x8036 }, - { "GL_UNSIGNED_INT_2_10_10_10_REV", 0x8368 }, - { "GL_LIGHT_MODEL_COLOR_CONTROL", 0x81F8 }, - { "GL_SINGLE_COLOR", 0x81F9 }, - { "GL_SEPARATE_SPECULAR_COLOR", 0x81FA }, - { "GL_TEXTURE_MIN_LOD", 0x813A }, - { "GL_TEXTURE_MAX_LOD", 0x813B }, - { "GL_TEXTURE_BASE_LEVEL", 0x813C }, - { "GL_TEXTURE_MAX_LEVEL", 0x813D }, - - { "GL_TEXTURE0_ARB", 0x84C0 }, - { "GL_TEXTURE1_ARB", 0x84C1 }, - { "GL_TEXTURE2_ARB", 0x84C2 }, - { "GL_TEXTURE3_ARB", 0x84C3 }, - { "GL_ACTIVE_TEXTURE_ARB", 0x84E0 }, - { "GL_CLIENT_ACTIVE_TEXTURE_ARB", 0x84E1 }, - { "GL_MAX_TEXTURE_UNITS_ARB", 0x84E2 }, - - { "GL_OCCLUSION_TEST_HP", 0x8165 }, - { "GL_OCCLUSION_TEST_RESULT_HP", 0x8166 }, - - { "GL_TEXTURE_FILTER_CONTROL_EXT", 0x8500 }, - { "GL_TEXTURE_LOD_BIAS_EXT", 0x8501 }, - - /* GL_ARB_texture_cube_map */ - { "GL_NORMAL_MAP_ARB", 0x8511 }, - { "GL_REFLECTION_MAP_ARB", 0x8512 }, - { "GL_TEXTURE_CUBE_MAP_ARB", 0x8513 }, - { "GL_TEXTURE_BINDING_CUBE_MAP_ARB", 0x8514 }, - { "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB", 0x8515 }, - { "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB", 0x8516 }, - { "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB", 0x8517 }, - { "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB", 0x8518 }, - { "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB", 0x8519 }, - { "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB", 0x851a }, - { "GL_PROXY_TEXTURE_CUBE_MAP_ARB", 0x851b }, - { "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB", 0x851c }, - - { "GL_PREFER_DOUBLEBUFFER_HINT_PGI", 107000 }, - { "GL_STRICT_DEPTHFUNC_HINT_PGI", 107030 }, - { "GL_STRICT_LIGHTING_HINT_PGI", 107031 }, - { "GL_STRICT_SCISSOR_HINT_PGI", 107032 }, - { "GL_FULL_STIPPLE_HINT_PGI", 107033 }, - { "GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI", 107011 }, - { "GL_NATIVE_GRAPHICS_END_HINT_PGI", 107012 }, - { "GL_CONSERVE_MEMORY_HINT_PGI", 107005 }, - { "GL_RECLAIM_MEMORY_HINT_PGI", 107006 }, - { "GL_ALWAYS_FAST_HINT_PGI", 107020 }, - { "GL_ALWAYS_SOFT_HINT_PGI", 107021 }, - { "GL_ALLOW_DRAW_OBJ_HINT_PGI", 107022 }, - { "GL_ALLOW_DRAW_WIN_HINT_PGI", 107023 }, - { "GL_ALLOW_DRAW_FRG_HINT_PGI", 107024 }, - { "GL_ALLOW_DRAW_SPN_HINT_PGI", 107024 }, - { "GL_ALLOW_DRAW_MEM_HINT_PGI", 107025 }, - { "GL_CLIP_NEAR_HINT_PGI", 107040 }, - { "GL_CLIP_FAR_HINT_PGI", 107041 }, - { "GL_WIDE_LINE_HINT_PGI", 107042 }, - { "GL_BACK_NORMALS_HINT_PGI", 107043 }, - { "GL_NATIVE_GRAPHICS_HANDLE_PGI", 107010 }, - - /* GL_EXT_compiled_vertex_array */ - { "GL_ARRAY_ELEMENT_LOCK_FIRST_EXT", 0x81A8}, - { "GL_ARRAY_ELEMENT_LOCK_COUNT_EXT", 0x81A9}, - - /* GL_EXT_clip_volume_hint */ - { "GL_CLIP_VOLUME_CLIPPING_HINT_EXT", 0x80F0}, - - /* GL_EXT_texture_env_combine */ - { "GL_COMBINE_EXT", 0x8570 }, - { "GL_COMBINE_RGB_EXT", 0x8571 }, - { "GL_COMBINE_ALPHA_EXT", 0x8572 }, - { "GL_SOURCE0_RGB_EXT", 0x8580 }, - { "GL_SOURCE1_RGB_EXT", 0x8581 }, - { "GL_SOURCE2_RGB_EXT", 0x8582 }, - { "GL_SOURCE0_ALPHA_EXT", 0x8588 }, - { "GL_SOURCE1_ALPHA_EXT", 0x8589 }, - { "GL_SOURCE2_ALPHA_EXT", 0x858A }, - { "GL_OPERAND0_RGB_EXT", 0x8590 }, - { "GL_OPERAND1_RGB_EXT", 0x8591 }, - { "GL_OPERAND2_RGB_EXT", 0x8592 }, - { "GL_OPERAND0_ALPHA_EXT", 0x8598 }, - { "GL_OPERAND1_ALPHA_EXT", 0x8599 }, - { "GL_OPERAND2_ALPHA_EXT", 0x859A }, - { "GL_RGB_SCALE_EXT", 0x8573 }, - { "GL_ADD_SIGNED_EXT", 0x8574 }, - { "GL_INTERPOLATE_EXT", 0x8575 }, - { "GL_CONSTANT_EXT", 0x8576 }, - { "GL_PRIMARY_COLOR_EXT", 0x8577 }, - { "GL_PREVIOUS_EXT", 0x8578 }, - - /* GL_ARB_texture_env_combine */ - { "GL_SUBTRACT_ARB", 0x84E7 }, - - /* GL_EXT_texture_env_dot3 */ - { "GL_DOT3_RGB_EXT", 0x8740 }, - { "GL_DOT3_RGBA_EXT", 0x8741 }, - - /* GL_ARB_texture_env_dot3 */ - { "GL_DOT3_RGB_ARB", 0x86ae }, - { "GL_DOT3_RGBA_ARB", 0x86af }, - - /* GL_ARB_texture_border_clamp */ - { "GL_CLAMP_TO_BORDER_ARB", 0x812D }, - - /* GL_ATI_texture_env_combine3 */ - { "GL_MODULATE_ADD_ATI", 0x8744 }, - { "GL_MODULATE_SIGNED_ADD_ATI", 0x8745 }, - { "GL_MODULATE_SUBTRACT_ATI", 0x8746 }, - - /* GL_ARB_texture_compression */ - { "GL_COMPRESSED_ALPHA_ARB", 0x84E9 }, - { "GL_COMPRESSED_LUMINANCE_ARB", 0x84EA }, - { "GL_COMPRESSED_LUMINANCE_ALPHA_ARB", 0x84EB }, - { "GL_COMPRESSED_INTENSITY_ARB", 0x84EC }, - { "GL_COMPRESSED_RGB_ARB", 0x84ED }, - { "GL_COMPRESSED_RGBA_ARB", 0x84EE }, - { "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB", 0x86A0 }, - { "GL_TEXTURE_COMPRESSED_ARB", 0x86A1 }, - { "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB", 0x86A2 }, - { "GL_COMPRESSED_TEXTURE_FORMATS_ARB", 0x86A3 }, - - /* GL_EXT_texture_compression_s3tc */ - { "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", 0x83F0 }, - { "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", 0x83F1 }, - { "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT", 0x83F2 }, - { "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT", 0x83F3 }, - - /* GL_S3_s3tc */ - { "GL_RGB_S3TC", 0x83A0 }, - { "GL_RGB4_S3TC", 0x83A1 }, - { "GL_RGBA_S3TC", 0x83A2 }, - { "GL_RGBA4_S3TC", 0x83A3 }, - - /* GL_3DFX_texture_compression_FXT1 */ - { "GL_COMPRESSED_RGB_FXT1_3DFX", 0x86B0 }, - { "GL_COMPRESSED_RGBA_FXT1_3DFX", 0x86B1 }, -}; - -#define Elements(x) sizeof(x)/sizeof(*x) - -typedef int (GLWINAPIV *cfunc)(const void *, const void *); - -static enum_elt **index1 = 0; -static int sorted = 0; - -static int compar_name( const enum_elt *a, const enum_elt *b ) -{ - return _mesa_strcmp(a->c, b->c); -} - - -/* note the extra level of indirection - */ -static int compar_nr( const enum_elt **a, const enum_elt **b ) -{ - return (*a)->n - (*b)->n; -} - - -static void sort_enums( void ) -{ - GLuint i; - index1 = (enum_elt **)MALLOC( Elements(all_enums) * sizeof(enum_elt *) ); - sorted = 1; - - if (!index1) - return; /* what else can we do? */ - - qsort( all_enums, Elements(all_enums), sizeof(*all_enums), - (cfunc) compar_name ); - - for (i = 0 ; i < Elements(all_enums) ; i++) - index1[i] = &all_enums[i]; - - qsort( index1, Elements(all_enums), sizeof(*index1), (cfunc) compar_nr ); -} - - - -int _mesa_lookup_enum_by_name( const char *symbol ) -{ - enum_elt tmp; - enum_elt *e; - - if (!sorted) - sort_enums(); - - if (!symbol) - return 0; - - tmp.c = symbol; - e = (enum_elt *)bsearch( &tmp, all_enums, Elements(all_enums), - sizeof(*all_enums), (cfunc) compar_name ); - - return e ? e->n : -1; -} - - -static char token_tmp[20]; - -const char *_mesa_lookup_enum_by_nr( int nr ) -{ - enum_elt tmp, *e, **f; - - if (!sorted) - sort_enums(); - - tmp.n = nr; - e = &tmp; - - f = (enum_elt **)bsearch( &e, index1, Elements(all_enums), - sizeof(*index1), (cfunc) compar_nr ); - - if (f) { - return (*f)->c; - } - else { - /* this isn't re-entrant safe, no big deal here */ - _mesa_sprintf(token_tmp, "0x%x", nr); - return token_tmp; - } -} Index: xc/extras/Mesa/src/enums.h diff -u xc/extras/Mesa/src/enums.h:1.4 xc/extras/Mesa/src/enums.h:removed --- xc/extras/Mesa/src/enums.h:1.4 Fri Feb 22 14:25:28 2002 +++ xc/extras/Mesa/src/enums.h Wed Mar 16 21:00:29 2005 @@ -1,33 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _ENUMS_H_ -#define _ENUMS_H_ - -extern const char *_mesa_lookup_enum_by_nr( int nr ); -extern int _mesa_lookup_enum_by_name( const char *symbol ); - -#endif Index: xc/extras/Mesa/src/eval.c diff -u xc/extras/Mesa/src/eval.c:1.8 xc/extras/Mesa/src/eval.c:removed --- xc/extras/Mesa/src/eval.c:1.8 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/eval.c Wed Mar 16 21:00:29 2005 @@ -1,798 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * eval.c was written by - * Bernd Barsuhn (bdbarsuh@cip.informatik.uni-erlangen.de) and - * Volker Weiss (vrweiss@cip.informatik.uni-erlangen.de). - * - * My original implementation of evaluators was simplistic and didn't - * compute surface normal vectors properly. Bernd and Volker applied - * used more sophisticated methods to get better results. - * - * Thanks guys! - */ - - -#include "glheader.h" -#include "imports.h" -#include "colormac.h" -#include "context.h" -#include "eval.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" - - -/* - * Return the number of components per control point for any type of - * evaluator. Return 0 if bad target. - * See table 5.1 in the OpenGL 1.2 spec. - */ -GLuint _mesa_evaluator_components( GLenum target ) -{ - switch (target) { - case GL_MAP1_VERTEX_3: return 3; - case GL_MAP1_VERTEX_4: return 4; - case GL_MAP1_INDEX: return 1; - case GL_MAP1_COLOR_4: return 4; - case GL_MAP1_NORMAL: return 3; - case GL_MAP1_TEXTURE_COORD_1: return 1; - case GL_MAP1_TEXTURE_COORD_2: return 2; - case GL_MAP1_TEXTURE_COORD_3: return 3; - case GL_MAP1_TEXTURE_COORD_4: return 4; - case GL_MAP2_VERTEX_3: return 3; - case GL_MAP2_VERTEX_4: return 4; - case GL_MAP2_INDEX: return 1; - case GL_MAP2_COLOR_4: return 4; - case GL_MAP2_NORMAL: return 3; - case GL_MAP2_TEXTURE_COORD_1: return 1; - case GL_MAP2_TEXTURE_COORD_2: return 2; - case GL_MAP2_TEXTURE_COORD_3: return 3; - case GL_MAP2_TEXTURE_COORD_4: return 4; - default: break; - } - - /* XXX need to check for the vertex program extension - if (!ctx->Extensions.NV_vertex_program) - return 0; - */ - - if (target >= GL_MAP1_VERTEX_ATTRIB0_4_NV && - target <= GL_MAP1_VERTEX_ATTRIB15_4_NV) - return 4; - - if (target >= GL_MAP2_VERTEX_ATTRIB0_4_NV && - target <= GL_MAP2_VERTEX_ATTRIB15_4_NV) - return 4; - - return 0; -} - - -/* - * Return pointer to the gl_1d_map struct for the named target. - */ -static struct gl_1d_map * -get_1d_map( GLcontext *ctx, GLenum target ) -{ - switch (target) { - case GL_MAP1_VERTEX_3: - return &ctx->EvalMap.Map1Vertex3; - case GL_MAP1_VERTEX_4: - return &ctx->EvalMap.Map1Vertex4; - case GL_MAP1_INDEX: - return &ctx->EvalMap.Map1Index; - case GL_MAP1_COLOR_4: - return &ctx->EvalMap.Map1Color4; - case GL_MAP1_NORMAL: - return &ctx->EvalMap.Map1Normal; - case GL_MAP1_TEXTURE_COORD_1: - return &ctx->EvalMap.Map1Texture1; - case GL_MAP1_TEXTURE_COORD_2: - return &ctx->EvalMap.Map1Texture2; - case GL_MAP1_TEXTURE_COORD_3: - return &ctx->EvalMap.Map1Texture3; - case GL_MAP1_TEXTURE_COORD_4: - return &ctx->EvalMap.Map1Texture4; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map1Attrib[target - GL_MAP1_VERTEX_ATTRIB0_4_NV]; - default: - return NULL; - } -} - - -/* - * Return pointer to the gl_2d_map struct for the named target. - */ -static struct gl_2d_map * -get_2d_map( GLcontext *ctx, GLenum target ) -{ - switch (target) { - case GL_MAP2_VERTEX_3: - return &ctx->EvalMap.Map2Vertex3; - case GL_MAP2_VERTEX_4: - return &ctx->EvalMap.Map2Vertex4; - case GL_MAP2_INDEX: - return &ctx->EvalMap.Map2Index; - case GL_MAP2_COLOR_4: - return &ctx->EvalMap.Map2Color4; - case GL_MAP2_NORMAL: - return &ctx->EvalMap.Map2Normal; - case GL_MAP2_TEXTURE_COORD_1: - return &ctx->EvalMap.Map2Texture1; - case GL_MAP2_TEXTURE_COORD_2: - return &ctx->EvalMap.Map2Texture2; - case GL_MAP2_TEXTURE_COORD_3: - return &ctx->EvalMap.Map2Texture3; - case GL_MAP2_TEXTURE_COORD_4: - return &ctx->EvalMap.Map2Texture4; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map2Attrib[target - GL_MAP2_VERTEX_ATTRIB0_4_NV]; - default: - return NULL; - } -} - - -/**********************************************************************/ -/*** Copy and deallocate control points ***/ -/**********************************************************************/ - - -/* - * Copy 1-parametric evaluator control points from user-specified - * memory space to a buffer of contiguous control points. - * Input: see glMap1f for details - * Return: pointer to buffer of contiguous control points or NULL if out - * of memory. - */ -GLfloat *_mesa_copy_map_points1f( GLenum target, GLint ustride, GLint uorder, - const GLfloat *points ) -{ - GLfloat *buffer, *p; - GLint i, k, size = _mesa_evaluator_components(target); - - if (!points || !size) - return NULL; - - buffer = (GLfloat *) MALLOC(uorder * size * sizeof(GLfloat)); - - if (buffer) - for (i = 0, p = buffer; i < uorder; i++, points += ustride) - for (k = 0; k < size; k++) - *p++ = points[k]; - - return buffer; -} - - - -/* - * Same as above but convert doubles to floats. - */ -GLfloat *_mesa_copy_map_points1d( GLenum target, GLint ustride, GLint uorder, - const GLdouble *points ) -{ - GLfloat *buffer, *p; - GLint i, k, size = _mesa_evaluator_components(target); - - if (!points || !size) - return NULL; - - buffer = (GLfloat *) MALLOC(uorder * size * sizeof(GLfloat)); - - if (buffer) - for (i = 0, p = buffer; i < uorder; i++, points += ustride) - for (k = 0; k < size; k++) - *p++ = (GLfloat) points[k]; - - return buffer; -} - - - -/* - * Copy 2-parametric evaluator control points from user-specified - * memory space to a buffer of contiguous control points. - * Additional memory is allocated to be used by the horner and - * de Casteljau evaluation schemes. - * - * Input: see glMap2f for details - * Return: pointer to buffer of contiguous control points or NULL if out - * of memory. - */ -GLfloat *_mesa_copy_map_points2f( GLenum target, - GLint ustride, GLint uorder, - GLint vstride, GLint vorder, - const GLfloat *points ) -{ - GLfloat *buffer, *p; - GLint i, j, k, size, dsize, hsize; - GLint uinc; - - size = _mesa_evaluator_components(target); - - if (!points || size==0) { - return NULL; - } - - /* max(uorder, vorder) additional points are used in */ - /* horner evaluation and uorder*vorder additional */ - /* values are needed for de Casteljau */ - dsize = (uorder == 2 && vorder == 2)? 0 : uorder*vorder; - hsize = (uorder > vorder ? uorder : vorder)*size; - - if(hsize>dsize) - buffer = (GLfloat *) MALLOC((uorder*vorder*size+hsize)*sizeof(GLfloat)); - else - buffer = (GLfloat *) MALLOC((uorder*vorder*size+dsize)*sizeof(GLfloat)); - - /* compute the increment value for the u-loop */ - uinc = ustride - vorder*vstride; - - if (buffer) - for (i=0, p=buffer; i vorder ? uorder : vorder)*size; - - if(hsize>dsize) - buffer = (GLfloat *) MALLOC((uorder*vorder*size+hsize)*sizeof(GLfloat)); - else - buffer = (GLfloat *) MALLOC((uorder*vorder*size+dsize)*sizeof(GLfloat)); - - /* compute the increment value for the u-loop */ - uinc = ustride - vorder*vstride; - - if (buffer) - for (i=0, p=buffer; i MAX_EVAL_ORDER) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(order)" ); - return; - } - if (!points) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(points)" ); - return; - } - - k = _mesa_evaluator_components( target ); - if (k == 0) { - _mesa_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); - } - - if (ustride < k) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap1(stride)" ); - return; - } - - if (ctx->Texture.CurrentUnit != 0) { - /* See OpenGL 1.2.1 spec, section F.2.13 */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glMap2(ACTIVE_TEXTURE != 0)" ); - return; - } - - map = get_1d_map(ctx, target); - if (!map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); - return; - } - - /* make copy of the control points */ - if (type == GL_FLOAT) - pnts = _mesa_copy_map_points1f(target, ustride, uorder, (GLfloat*) points); - else - pnts = _mesa_copy_map_points1d(target, ustride, uorder, (GLdouble*) points); - - - FLUSH_VERTICES(ctx, _NEW_EVAL); - map->Order = uorder; - map->u1 = u1; - map->u2 = u2; - map->du = 1.0F / (u2 - u1); - if (map->Points) - FREE( map->Points ); - map->Points = pnts; -} - - - -void -_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat *points ) -{ - map1(target, u1, u2, stride, order, points, GL_FLOAT); -} - - -void -_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble *points ) -{ - map1(target, (GLfloat) u1, (GLfloat) u2, stride, order, points, GL_DOUBLE); -} - - -static void -map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLvoid *points, GLenum type ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint k; - GLfloat *pnts; - struct gl_2d_map *map = NULL; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - ASSERT(type == GL_FLOAT || type == GL_DOUBLE); - - if (u1==u2) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(u1,u2)" ); - return; - } - - if (v1==v2) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(v1,v2)" ); - return; - } - - if (uorder<1 || uorder>MAX_EVAL_ORDER) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(uorder)" ); - return; - } - - if (vorder<1 || vorder>MAX_EVAL_ORDER) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(vorder)" ); - return; - } - - k = _mesa_evaluator_components( target ); - if (k==0) { - _mesa_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); - } - - if (ustride < k) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(ustride)" ); - return; - } - if (vstride < k) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMap2(vstride)" ); - return; - } - - if (ctx->Texture.CurrentUnit != 0) { - /* See OpenGL 1.2.1 spec, section F.2.13 */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glMap2(ACTIVE_TEXTURE != 0)" ); - return; - } - - map = get_2d_map(ctx, target); - if (!map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); - return; - } - - /* make copy of the control points */ - if (type == GL_FLOAT) - pnts = _mesa_copy_map_points2f(target, ustride, uorder, - vstride, vorder, (GLfloat*) points); - else - pnts = _mesa_copy_map_points2d(target, ustride, uorder, - vstride, vorder, (GLdouble*) points); - - - FLUSH_VERTICES(ctx, _NEW_EVAL); - map->Uorder = uorder; - map->u1 = u1; - map->u2 = u2; - map->du = 1.0F / (u2 - u1); - map->Vorder = vorder; - map->v1 = v1; - map->v2 = v2; - map->dv = 1.0F / (v2 - v1); - if (map->Points) - FREE( map->Points ); - map->Points = pnts; -} - - -void -_mesa_Map2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points) -{ - map2(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - points, GL_FLOAT); -} - - -void -_mesa_Map2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ) -{ - map2(target, (GLfloat) u1, (GLfloat) u2, ustride, uorder, - (GLfloat) v1, (GLfloat) v2, vstride, vorder, points, GL_DOUBLE); -} - - - -void -_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_1d_map *map1d; - struct gl_2d_map *map2d; - GLint i, n; - GLfloat *data; - GLuint comps; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - comps = _mesa_evaluator_components(target); - if (!comps) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" ); - return; - } - - map1d = get_1d_map(ctx, target); - map2d = get_2d_map(ctx, target); - ASSERT(map1d || map2d); - - switch (query) { - case GL_COEFF: - if (map1d) { - data = map1d->Points; - n = map1d->Order * comps; - } - else { - data = map2d->Points; - n = map2d->Uorder * map2d->Vorder * comps; - } - if (data) { - for (i=0;iOrder; - } - else { - v[0] = (GLdouble) map2d->Uorder; - v[1] = (GLdouble) map2d->Vorder; - } - break; - case GL_DOMAIN: - if (map1d) { - v[0] = (GLdouble) map1d->u1; - v[1] = (GLdouble) map1d->u2; - } - else { - v[0] = (GLdouble) map2d->u1; - v[1] = (GLdouble) map2d->u2; - v[2] = (GLdouble) map2d->v1; - v[3] = (GLdouble) map2d->v2; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(query)" ); - } -} - - -void -_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_1d_map *map1d; - struct gl_2d_map *map2d; - GLint i, n; - GLfloat *data; - GLuint comps; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - comps = _mesa_evaluator_components(target); - if (!comps) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" ); - return; - } - - map1d = get_1d_map(ctx, target); - map2d = get_2d_map(ctx, target); - ASSERT(map1d || map2d); - - switch (query) { - case GL_COEFF: - if (map1d) { - data = map1d->Points; - n = map1d->Order * comps; - } - else { - data = map2d->Points; - n = map2d->Uorder * map2d->Vorder * comps; - } - if (data) { - for (i=0;iOrder; - } - else { - v[0] = (GLfloat) map2d->Uorder; - v[1] = (GLfloat) map2d->Vorder; - } - break; - case GL_DOMAIN: - if (map1d) { - v[0] = map1d->u1; - v[1] = map1d->u2; - } - else { - v[0] = map2d->u1; - v[1] = map2d->u2; - v[2] = map2d->v1; - v[3] = map2d->v2; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(query)" ); - } -} - - -void -_mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_1d_map *map1d; - struct gl_2d_map *map2d; - GLuint i, n; - GLfloat *data; - GLuint comps; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - comps = _mesa_evaluator_components(target); - if (!comps) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" ); - return; - } - - map1d = get_1d_map(ctx, target); - map2d = get_2d_map(ctx, target); - ASSERT(map1d || map2d); - - switch (query) { - case GL_COEFF: - if (map1d) { - data = map1d->Points; - n = map1d->Order * comps; - } - else { - data = map2d->Points; - n = map2d->Uorder * map2d->Vorder * comps; - } - if (data) { - for (i=0;iOrder; - } - else { - v[0] = map2d->Uorder; - v[1] = map2d->Vorder; - } - break; - case GL_DOMAIN: - if (map1d) { - v[0] = ROUNDF(map1d->u1); - v[1] = ROUNDF(map1d->u2); - } - else { - v[0] = ROUNDF(map2d->u1); - v[1] = ROUNDF(map2d->u2); - v[2] = ROUNDF(map2d->v1); - v[3] = ROUNDF(map2d->v2); - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(query)" ); - } -} - - - -void -_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (un<1) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid1f" ); - return; - } - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.MapGrid1un = un; - ctx->Eval.MapGrid1u1 = u1; - ctx->Eval.MapGrid1u2 = u2; - ctx->Eval.MapGrid1du = (u2 - u1) / (GLfloat) un; -} - - -void -_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 ) -{ - _mesa_MapGrid1f( un, (GLfloat) u1, (GLfloat) u2 ); -} - - -void -_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (un<1) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(un)" ); - return; - } - if (vn<1) { - _mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(vn)" ); - return; - } - - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.MapGrid2un = un; - ctx->Eval.MapGrid2u1 = u1; - ctx->Eval.MapGrid2u2 = u2; - ctx->Eval.MapGrid2du = (u2 - u1) / (GLfloat) un; - ctx->Eval.MapGrid2vn = vn; - ctx->Eval.MapGrid2v1 = v1; - ctx->Eval.MapGrid2v2 = v2; - ctx->Eval.MapGrid2dv = (v2 - v1) / (GLfloat) vn; -} - - -void -_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ) -{ - _mesa_MapGrid2f( un, (GLfloat) u1, (GLfloat) u2, - vn, (GLfloat) v1, (GLfloat) v2 ); -} Index: xc/extras/Mesa/src/eval.h diff -u xc/extras/Mesa/src/eval.h:1.4 xc/extras/Mesa/src/eval.h:removed --- xc/extras/Mesa/src/eval.h:1.4 Fri Feb 22 14:25:28 2002 +++ xc/extras/Mesa/src/eval.h Wed Mar 16 21:00:29 2005 @@ -1,108 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef EVAL_H -#define EVAL_H - - -#include "mtypes.h" - - -extern void _mesa_init_eval( void ); - - -extern GLuint _mesa_evaluator_components( GLenum target ); - - -extern void gl_free_control_points( GLcontext *ctx, - GLenum target, GLfloat *data ); - - -extern GLfloat *_mesa_copy_map_points1f( GLenum target, - GLint ustride, GLint uorder, - const GLfloat *points ); - -extern GLfloat *_mesa_copy_map_points1d( GLenum target, - GLint ustride, GLint uorder, - const GLdouble *points ); - -extern GLfloat *_mesa_copy_map_points2f( GLenum target, - GLint ustride, GLint uorder, - GLint vstride, GLint vorder, - const GLfloat *points ); - -extern GLfloat *_mesa_copy_map_points2d(GLenum target, - GLint ustride, GLint uorder, - GLint vstride, GLint vorder, - const GLdouble *points ); - - - -extern void -_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat *points ); - -extern void -_mesa_Map2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ); - -extern void -_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble *points ); - -extern void -_mesa_Map2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ); - -extern void -_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); - -extern void -_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); - -extern void -_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ); - -extern void -_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ); - -extern void -_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ); - -extern void -_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ); - -extern void -_mesa_GetMapiv( GLenum target, GLenum query, GLint *v ); - - -#endif Index: xc/extras/Mesa/src/extensions.c diff -u xc/extras/Mesa/src/extensions.c:1.16 xc/extras/Mesa/src/extensions.c:removed --- xc/extras/Mesa/src/extensions.c:1.16 Wed Oct 22 11:27:40 2003 +++ xc/extras/Mesa/src/extensions.c Wed Mar 16 21:00:29 2005 @@ -1,479 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/extensions.c,v 1.16 2003/10/22 15:27:40 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "extensions.h" -#include "simple_list.h" -#include "mtypes.h" - - -#define MAX_EXT_NAMELEN 80 - -struct extension { - struct extension *next, *prev; - GLint enabled; - GLboolean *flag; /* optional flag stored elsewhere */ - char name[MAX_EXT_NAMELEN+1]; - void (*notify)( GLcontext *, GLboolean ); -}; - -#define F(x) (int)(unsigned long)&(((struct gl_extensions *)0)->x) -#define ON GL_TRUE -#define OFF GL_FALSE - -static const struct { - GLboolean enabled; - const char *name; - int flag_offset; -} default_extensions[] = { - { OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) }, - { OFF, "GL_ARB_imaging", F(ARB_imaging) }, - { OFF, "GL_ARB_multisample", F(ARB_multisample) }, - { OFF, "GL_ARB_multitexture", F(ARB_multitexture) }, - { OFF, "GL_ARB_point_parameters", F(EXT_point_parameters) }, - { OFF, "GL_ARB_shadow", F(ARB_shadow) }, - { OFF, "GL_ARB_shadow_ambient", F(SGIX_shadow_ambient) }, - { OFF, "GL_ARB_texture_border_clamp", F(ARB_texture_border_clamp) }, - { OFF, "GL_ARB_texture_compression", F(ARB_texture_compression) }, - { OFF, "GL_ARB_texture_cube_map", F(ARB_texture_cube_map) }, - { OFF, "GL_ARB_texture_env_add", F(EXT_texture_env_add) }, - { OFF, "GL_ARB_texture_env_combine", F(ARB_texture_env_combine) }, - { OFF, "GL_ARB_texture_env_crossbar", F(ARB_texture_env_crossbar) }, - { OFF, "GL_ARB_texture_env_dot3", F(ARB_texture_env_dot3) }, - { OFF, "GL_ARB_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)}, - { ON, "GL_ARB_transpose_matrix", 0 }, - { ON, "GL_ARB_window_pos", F(ARB_window_pos) }, - { ON, "GL_EXT_abgr", 0 }, - { ON, "GL_EXT_bgra", 0 }, - { OFF, "GL_EXT_blend_color", F(EXT_blend_color) }, - { OFF, "GL_EXT_blend_func_separate", F(EXT_blend_func_separate) }, - { OFF, "GL_EXT_blend_logic_op", F(EXT_blend_logic_op) }, - { OFF, "GL_EXT_blend_minmax", F(EXT_blend_minmax) }, - { OFF, "GL_EXT_blend_subtract", F(EXT_blend_subtract) }, - { ON, "GL_EXT_clip_volume_hint", 0 }, - { ON, "GL_EXT_compiled_vertex_array", F(EXT_compiled_vertex_array) }, - { OFF, "GL_EXT_convolution", F(EXT_convolution) }, - { ON, "GL_EXT_copy_texture", 0 }, - { ON, "GL_EXT_draw_range_elements", 0 }, - { OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) }, - { OFF, "GL_EXT_histogram", F(EXT_histogram) }, - { OFF, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) }, - { ON, "GL_EXT_packed_pixels", 0 }, - { OFF, "GL_EXT_paletted_texture", F(EXT_paletted_texture) }, - { OFF, "GL_EXT_point_parameters", F(EXT_point_parameters) }, - { ON, "GL_EXT_polygon_offset", 0 }, - { ON, "GL_EXT_rescale_normal", 0 }, - { OFF, "GL_EXT_secondary_color", F(EXT_secondary_color) }, - { ON, "GL_EXT_separate_specular_color", 0 }, - { OFF, "GL_EXT_shadow_funcs", F(EXT_shadow_funcs) }, - { OFF, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) }, - { OFF, "GL_EXT_stencil_two_side", F(EXT_stencil_two_side) }, - { OFF, "GL_EXT_stencil_wrap", F(EXT_stencil_wrap) }, - { ON, "GL_EXT_subtexture", 0 }, - { ON, "GL_EXT_texture", 0 }, - { ON, "GL_EXT_texture3D", F(EXT_texture3D) }, - { OFF, "GL_EXT_texture_compression_s3tc", F(EXT_texture_compression_s3tc) }, - { OFF, "GL_EXT_texture_edge_clamp", F(SGIS_texture_edge_clamp) }, - { OFF, "GL_EXT_texture_env_add", F(EXT_texture_env_add) }, - { OFF, "GL_EXT_texture_env_combine", F(EXT_texture_env_combine) }, - { OFF, "GL_EXT_texture_env_dot3", F(EXT_texture_env_dot3) }, - { OFF, "GL_EXT_texture_filter_anisotropic", F(EXT_texture_filter_anisotropic) }, - { ON, "GL_EXT_texture_object", 0 }, - { OFF, "GL_EXT_texture_lod_bias", F(EXT_texture_lod_bias) }, - { OFF, "GL_EXT_texture_rectangle", F(NV_texture_rectangle) }, - { ON, "GL_EXT_vertex_array", 0 }, - { OFF, "GL_EXT_vertex_array_set", F(EXT_vertex_array_set) }, - { OFF, "GL_3DFX_texture_compression_FXT1", F(TDFX_texture_compression_FXT1) }, - { OFF, "GL_APPLE_client_storage", F(APPLE_client_storage) }, - { ON, "GL_APPLE_packed_pixels", 0 }, - { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)}, - { OFF, "GL_ATI_texture_mirror_once", F(ATI_texture_mirror_once)}, - { OFF, "GL_HP_occlusion_test", F(HP_occlusion_test) }, - { ON, "GL_IBM_rasterpos_clip", F(IBM_rasterpos_clip) }, - { OFF, "GL_IBM_texture_mirrored_repeat", F(ARB_texture_mirrored_repeat)}, - { OFF, "GL_INGR_blend_func_separate", F(EXT_blend_func_separate) }, - { OFF, "GL_MESA_pack_invert", F(MESA_pack_invert) }, - { OFF, "GL_MESA_packed_depth_stencil", 0 }, - { OFF, "GL_MESA_resize_buffers", F(MESA_resize_buffers) }, - { OFF, "GL_MESA_ycbcr_texture", F(MESA_ycbcr_texture) }, - { ON, "GL_MESA_window_pos", F(ARB_window_pos) }, - { OFF, "GL_NV_blend_square", F(NV_blend_square) }, - { OFF, "GL_NV_point_sprite", F(NV_point_sprite) }, - { OFF, "GL_NV_texture_rectangle", F(NV_texture_rectangle) }, - { ON, "GL_NV_texgen_reflection", 0 }, - { OFF, "GL_NV_vertex_program", F(NV_vertex_program) }, - { OFF, "GL_NV_vertex_program1_1", F(NV_vertex_program1_1) }, - { OFF, "GL_SGI_color_matrix", F(SGI_color_matrix) }, - { OFF, "GL_SGI_color_table", F(SGI_color_table) }, - { OFF, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) }, - { OFF, "GL_SGIS_pixel_texture", F(SGIS_pixel_texture) }, - { OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) }, - { OFF, "GL_SGIS_texture_edge_clamp", F(SGIS_texture_edge_clamp) }, - { ON, "GL_SGIS_texture_lod", 0 }, - { OFF, "GL_SGIX_depth_texture", F(SGIX_depth_texture) }, - { OFF, "GL_SGIX_pixel_texture", F(SGIX_pixel_texture) }, - { OFF, "GL_SGIX_shadow", F(SGIX_shadow) }, - { OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) }, -}; - - - - -/* - * Enable all extensions suitable for a software-only renderer. - * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc. - */ -void -_mesa_enable_sw_extensions(GLcontext *ctx) -{ - const char *extensions[] = { - "GL_ARB_depth_texture", - "GL_ARB_imaging", - "GL_ARB_multitexture", - "GL_ARB_point_parameters", - "GL_ARB_shadow", - "GL_ARB_shadow_ambient", - "GL_ARB_texture_border_clamp", - "GL_ARB_texture_cube_map", - "GL_ARB_texture_env_add", - "GL_ARB_texture_env_combine", - "GL_ARB_texture_env_crossbar", - "GL_ARB_texture_env_dot3", - "GL_ARB_texture_mirrored_repeat", - "GL_ATI_texture_mirror_once", - "GL_ATI_texture_env_combine3", - "GL_EXT_blend_color", - "GL_EXT_blend_func_separate", - "GL_EXT_blend_logic_op", - "GL_EXT_blend_minmax", - "GL_EXT_blend_subtract", - "GL_EXT_convolution", - "GL_EXT_fog_coord", - "GL_EXT_histogram", - "GL_EXT_paletted_texture", - "GL_EXT_point_parameters", - "GL_EXT_shadow_funcs", - "GL_EXT_secondary_color", - "GL_EXT_shared_texture_palette", - "GL_EXT_stencil_wrap", - "GL_EXT_stencil_two_side", - "GL_EXT_texture_edge_clamp", - "GL_EXT_texture_env_add", - "GL_EXT_texture_env_combine", - "GL_EXT_texture_env_dot3", - "GL_EXT_texture_lod_bias", - "GL_EXT_texture_rectangle", - "GL_HP_occlusion_test", - "GL_IBM_texture_mirrored_repeat", - "GL_INGR_blend_func_separate", - "GL_MESA_pack_invert", - "GL_MESA_resize_buffers", - "GL_MESA_ycbcr_texture", - "GL_NV_blend_square", - "GL_NV_point_sprite", - "GL_NV_texture_rectangle", - "GL_NV_texgen_reflection", -#if FEATURE_NV_vertex_program - "GL_NV_vertex_program", - "GL_NV_vertex_program1_1", -#endif - "GL_SGI_color_matrix", - "GL_SGI_color_table", - "GL_SGIS_generate_mipmap", - "GL_SGIS_pixel_texture", - "GL_SGIS_texture_edge_clamp", - "GL_SGIS_texture_border_clamp", - "GL_SGIX_depth_texture", - "GL_SGIX_pixel_texture", - "GL_SGIX_shadow", - "GL_SGIX_shadow_ambient", - NULL - }; - GLuint i; - - for (i = 0; extensions[i]; i++) { - _mesa_enable_extension(ctx, extensions[i]); - } -} - - -/* - * Enable GL_ARB_imaging and all the EXT extensions that are subsets of it. - */ -void -_mesa_enable_imaging_extensions(GLcontext *ctx) -{ - const char *extensions[] = { - "GL_ARB_imaging", - "GL_EXT_blend_color", - "GL_EXT_blend_minmax", - "GL_EXT_blend_subtract", - "GL_EXT_convolution", - "GL_EXT_histogram", - "GL_SGI_color_matrix", - "GL_SGI_color_table", - NULL - }; - GLuint i; - - for (i = 0; extensions[i]; i++) { - _mesa_enable_extension(ctx, extensions[i]); - } -} - - - -/* - * Enable all OpenGL 1.3 features and extensions. - */ -void -_mesa_enable_1_3_extensions(GLcontext *ctx) -{ - const char *extensions[] = { - "GL_ARB_multisample", - "GL_ARB_multitexture", - "GL_ARB_texture_border_clamp", - "GL_ARB_texture_compression", - "GL_ARB_texture_cube_map", - "GL_ARB_texture_env_add", - "GL_ARB_texture_env_combine", - "GL_ARB_texture_env_dot3", - "GL_ARB_transpose_matrix", - NULL - }; - GLuint i; - - for (i = 0; extensions[i]; i++) { - _mesa_enable_extension(ctx, extensions[i]); - } -} - - - -/* - * Enable all OpenGL 1.4 features and extensions. - */ -void -_mesa_enable_1_4_extensions(GLcontext *ctx) -{ - const char *extensions[] = { - "GL_ARB_depth_texture", - "GL_ARB_point_parameters", - "GL_ARB_shadow", - "GL_ARB_texture_env_crossbar", - "GL_ARB_texture_mirrored_repeat", - "GL_ARB_window_pos", - "GL_EXT_blend_color", - "GL_EXT_blend_func_separate", - "GL_EXT_blend_logic_op", - "GL_EXT_blend_minmax", - "GL_EXT_blend_subtract", - "GL_EXT_fog_coord", - "GL_EXT_multi_draw_arrays", - "GL_EXT_secondary_color", - "GL_EXT_stencil_wrap", - "GL_EXT_texture_lod_bias", - "GL_SGIS_generate_mipmap", - NULL - }; - GLuint i; - - for (i = 0; extensions[i]; i++) { - _mesa_enable_extension(ctx, extensions[i]); - } -} - - - -/* - * Add a new extenstion. This would be called from a Mesa driver. - */ -void -_mesa_add_extension( GLcontext *ctx, - GLboolean enabled, - const char *name, - GLboolean *flag_ptr ) -{ - /* We should never try to add an extension after - * _mesa_extensions_get_string() has been called! - */ - assert(ctx->Extensions.ext_string == 0); - - { - struct extension *t = MALLOC_STRUCT(extension); - t->enabled = enabled; - _mesa_strncpy(t->name, name, MAX_EXT_NAMELEN); - t->name[MAX_EXT_NAMELEN] = 0; - t->flag = flag_ptr; - if (t->flag) - *t->flag = enabled; - insert_at_tail( ctx->Extensions.ext_list, t ); - } -} - - -/* - * Either enable or disable the named extension. - */ -static void -set_extension( GLcontext *ctx, const char *name, GLint state ) -{ - /* XXX we should assert that ext_string is null. We should never be - * enabling/disabling extensions after _mesa_extensions_get_string() - * has been called! - */ - struct extension *i; - foreach( i, ctx->Extensions.ext_list ) - if (_mesa_strncmp(i->name, name, MAX_EXT_NAMELEN) == 0) - break; - - if (i == ctx->Extensions.ext_list) { - /* this is an error. Drivers should never try to enable/disable - * an extension which is unknown to Mesa or wasn't added by calling - * _mesa_add_extension(). - */ - return; - } - - if (i->flag) - *(i->flag) = state; - i->enabled = state; -} - - - -void -_mesa_enable_extension( GLcontext *ctx, const char *name ) -{ - if (ctx->Extensions.ext_string == 0) - set_extension( ctx, name, 1 ); -} - - -void -_mesa_disable_extension( GLcontext *ctx, const char *name ) -{ - if (ctx->Extensions.ext_string == 0) - set_extension( ctx, name, 0 ); -} - - -/* - * Test if the named extension is enabled in this context. - */ -GLboolean -_mesa_extension_is_enabled( GLcontext *ctx, const char *name) -{ - struct extension *i; - foreach( i, ctx->Extensions.ext_list ) - if (_mesa_strncmp(i->name, name, MAX_EXT_NAMELEN) == 0) { - if (i->enabled) - return GL_TRUE; - else - return GL_FALSE; - } - - return GL_FALSE; -} - - -void -_mesa_extensions_dtr( GLcontext *ctx ) -{ - struct extension *i, *nexti; - - if (ctx->Extensions.ext_string) { - FREE( ctx->Extensions.ext_string ); - ctx->Extensions.ext_string = 0; - } - - if (ctx->Extensions.ext_list) { - foreach_s( i, nexti, ctx->Extensions.ext_list ) { - remove_from_list( i ); - FREE( i ); - } - - FREE(ctx->Extensions.ext_list); - ctx->Extensions.ext_list = 0; - } -} - - -void -_mesa_extensions_ctr( GLcontext *ctx ) -{ - GLuint i; - GLboolean *base = (GLboolean *)&ctx->Extensions; - - ctx->Extensions.ext_string = NULL; - ctx->Extensions.ext_list = MALLOC_STRUCT(extension); - make_empty_list( ctx->Extensions.ext_list ); - - for (i = 0 ; i < Elements(default_extensions) ; i++) { - GLboolean *ptr = NULL; - - if (default_extensions[i].flag_offset) - ptr = base + default_extensions[i].flag_offset; - - (void) _mesa_add_extension( ctx, - default_extensions[i].enabled, - default_extensions[i].name, - ptr); - } -} - - -const char * -_mesa_extensions_get_string( GLcontext *ctx ) -{ - if (ctx->Extensions.ext_string == 0) - { - struct extension *i; - char *str; - GLuint len = 0; - foreach (i, ctx->Extensions.ext_list) - if (i->enabled) - len += _mesa_strlen(i->name) + 1; - - if (len == 0) - return ""; - - str = (char *) _mesa_malloc(len * sizeof(char)); - ctx->Extensions.ext_string = str; - - foreach (i, ctx->Extensions.ext_list) - if (i->enabled) { - _mesa_strcpy(str, i->name); - str += _mesa_strlen(str); - *str++ = ' '; - } - - *(str-1) = 0; - } - - return ctx->Extensions.ext_string; -} Index: xc/extras/Mesa/src/extensions.h diff -u xc/extras/Mesa/src/extensions.h:1.6 xc/extras/Mesa/src/extensions.h:removed --- xc/extras/Mesa/src/extensions.h:1.6 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/extensions.h Wed Mar 16 21:00:29 2005 @@ -1,56 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _EXTENSIONS_H_ -#define _EXTENSIONS_H_ - -#include "mtypes.h" - - -extern void _mesa_enable_sw_extensions(GLcontext *ctx); - -extern void _mesa_enable_imaging_extensions(GLcontext *ctx); - -extern void _mesa_enable_1_3_extensions(GLcontext *ctx); - -extern void _mesa_enable_1_4_extensions(GLcontext *ctx); - -extern void _mesa_add_extension( GLcontext *ctx, GLboolean enabled, - const char *name, GLboolean *flag_ptr ); - -extern void _mesa_enable_extension( GLcontext *ctx, const char *name ); - -extern void _mesa_disable_extension( GLcontext *ctx, const char *name ); - -extern GLboolean _mesa_extension_is_enabled( GLcontext *ctx, const char *name); - -extern void _mesa_extensions_dtr( GLcontext *ctx ); - -extern void _mesa_extensions_ctr( GLcontext *ctx ); - -extern const char *_mesa_extensions_get_string( GLcontext *ctx ); - -#endif Index: xc/extras/Mesa/src/feedback.c diff -u xc/extras/Mesa/src/feedback.c:1.7 xc/extras/Mesa/src/feedback.c:removed --- xc/extras/Mesa/src/feedback.c:1.7 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/feedback.c Wed Mar 16 21:00:29 2005 @@ -1,404 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "enums.h" -#include "feedback.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" - - - -#define FB_3D 0x01 -#define FB_4D 0x02 -#define FB_INDEX 0x04 -#define FB_COLOR 0x08 -#define FB_TEXTURE 0X10 - - - -void -_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode==GL_FEEDBACK) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" ); - return; - } - if (size<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(size<0)" ); - return; - } - if (!buffer) { - _mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" ); - ctx->Feedback.BufferSize = 0; - return; - } - - switch (type) { - case GL_2D: - ctx->Feedback._Mask = 0; - break; - case GL_3D: - ctx->Feedback._Mask = FB_3D; - break; - case GL_3D_COLOR: - ctx->Feedback._Mask = (FB_3D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX)); - break; - case GL_3D_COLOR_TEXTURE: - ctx->Feedback._Mask = (FB_3D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) | - FB_TEXTURE); - break; - case GL_4D_COLOR_TEXTURE: - ctx->Feedback._Mask = (FB_3D | FB_4D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) | - FB_TEXTURE); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" ); - return; - } - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); /* Always flush */ - ctx->Feedback.Type = type; - ctx->Feedback.BufferSize = size; - ctx->Feedback.Buffer = buffer; - ctx->Feedback.Count = 0; /* Becaues of this. */ -} - - -void -_mesa_PassThrough( GLfloat token ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode==GL_FEEDBACK) { - FLUSH_VERTICES(ctx, 0); - FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_PASS_THROUGH_TOKEN ); - FEEDBACK_TOKEN( ctx, token ); - } -} - - - -/* - * Put a vertex into the feedback buffer. - */ -void _mesa_feedback_vertex( GLcontext *ctx, - const GLfloat win[4], - const GLfloat color[4], - GLuint index, - const GLfloat texcoord[4] ) -{ - FEEDBACK_TOKEN( ctx, win[0] ); - FEEDBACK_TOKEN( ctx, win[1] ); - if (ctx->Feedback._Mask & FB_3D) { - FEEDBACK_TOKEN( ctx, win[2] ); - } - if (ctx->Feedback._Mask & FB_4D) { - FEEDBACK_TOKEN( ctx, win[3] ); - } - if (ctx->Feedback._Mask & FB_INDEX) { - FEEDBACK_TOKEN( ctx, (GLfloat) index ); - } - if (ctx->Feedback._Mask & FB_COLOR) { - FEEDBACK_TOKEN( ctx, color[0] ); - FEEDBACK_TOKEN( ctx, color[1] ); - FEEDBACK_TOKEN( ctx, color[2] ); - FEEDBACK_TOKEN( ctx, color[3] ); - } - if (ctx->Feedback._Mask & FB_TEXTURE) { - FEEDBACK_TOKEN( ctx, texcoord[0] ); - FEEDBACK_TOKEN( ctx, texcoord[1] ); - FEEDBACK_TOKEN( ctx, texcoord[2] ); - FEEDBACK_TOKEN( ctx, texcoord[3] ); - } -} - - -/**********************************************************************/ -/* Selection */ -/**********************************************************************/ - - -/* - * NOTE: this function can't be put in a display list. - */ -void -_mesa_SelectBuffer( GLsizei size, GLuint *buffer ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode==GL_SELECT) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glSelectBuffer" ); - return; /* KW: added return */ - } - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); /* why bother? */ - ctx->Select.Buffer = buffer; - ctx->Select.BufferSize = size; - ctx->Select.BufferCount = 0; - ctx->Select.HitFlag = GL_FALSE; - ctx->Select.HitMinZ = 1.0; - ctx->Select.HitMaxZ = 0.0; -} - - -#define WRITE_RECORD( CTX, V ) \ - if (CTX->Select.BufferCount < CTX->Select.BufferSize) { \ - CTX->Select.Buffer[CTX->Select.BufferCount] = (V); \ - } \ - CTX->Select.BufferCount++; - - - -void _mesa_update_hitflag( GLcontext *ctx, GLfloat z ) -{ - ctx->Select.HitFlag = GL_TRUE; - if (z < ctx->Select.HitMinZ) { - ctx->Select.HitMinZ = z; - } - if (z > ctx->Select.HitMaxZ) { - ctx->Select.HitMaxZ = z; - } -} - - -static void write_hit_record( GLcontext *ctx ) -{ - GLuint i; - GLuint zmin, zmax, zscale = (~0u); - - /* HitMinZ and HitMaxZ are in [0,1]. Multiply these values by */ - /* 2^32-1 and round to nearest unsigned integer. */ - - assert( ctx != NULL ); /* this line magically fixes a SunOS 5.x/gcc bug */ - zmin = (GLuint) ((GLfloat) zscale * ctx->Select.HitMinZ); - zmax = (GLuint) ((GLfloat) zscale * ctx->Select.HitMaxZ); - - WRITE_RECORD( ctx, ctx->Select.NameStackDepth ); - WRITE_RECORD( ctx, zmin ); - WRITE_RECORD( ctx, zmax ); - for (i = 0; i < ctx->Select.NameStackDepth; i++) { - WRITE_RECORD( ctx, ctx->Select.NameStack[i] ); - } - - ctx->Select.Hits++; - ctx->Select.HitFlag = GL_FALSE; - ctx->Select.HitMinZ = 1.0; - ctx->Select.HitMaxZ = -1.0; -} - - - -void -_mesa_InitNames( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - /* Record the hit before the HitFlag is wiped out again. */ - if (ctx->RenderMode == GL_SELECT) { - if (ctx->Select.HitFlag) { - write_hit_record( ctx ); - } - } - ctx->Select.NameStackDepth = 0; - ctx->Select.HitFlag = GL_FALSE; - ctx->Select.HitMinZ = 1.0; - ctx->Select.HitMaxZ = 0.0; - ctx->NewState |= _NEW_RENDERMODE; -} - - - -void -_mesa_LoadName( GLuint name ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode != GL_SELECT) { - return; - } - if (ctx->Select.NameStackDepth == 0) { - _mesa_error( ctx, GL_INVALID_OPERATION, "glLoadName" ); - return; - } - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); - - if (ctx->Select.HitFlag) { - write_hit_record( ctx ); - } - if (ctx->Select.NameStackDepth < MAX_NAME_STACK_DEPTH) { - ctx->Select.NameStack[ctx->Select.NameStackDepth-1] = name; - } - else { - ctx->Select.NameStack[MAX_NAME_STACK_DEPTH-1] = name; - } -} - - -void -_mesa_PushName( GLuint name ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode != GL_SELECT) { - return; - } - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); - if (ctx->Select.HitFlag) { - write_hit_record( ctx ); - } - if (ctx->Select.NameStackDepth >= MAX_NAME_STACK_DEPTH) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushName" ); - } - else - ctx->Select.NameStack[ctx->Select.NameStackDepth++] = name; -} - - - -void -_mesa_PopName( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->RenderMode != GL_SELECT) { - return; - } - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); - if (ctx->Select.HitFlag) { - write_hit_record( ctx ); - } - if (ctx->Select.NameStackDepth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopName" ); - } - else - ctx->Select.NameStackDepth--; -} - - - -/**********************************************************************/ -/* Render Mode */ -/**********************************************************************/ - - - -/* - * NOTE: this function can't be put in a display list. - */ -GLint -_mesa_RenderMode( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint result; - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glRenderMode %s\n", _mesa_lookup_enum_by_nr(mode)); - - FLUSH_VERTICES(ctx, _NEW_RENDERMODE); - - switch (ctx->RenderMode) { - case GL_RENDER: - result = 0; - break; - case GL_SELECT: - if (ctx->Select.HitFlag) { - write_hit_record( ctx ); - } - if (ctx->Select.BufferCount > ctx->Select.BufferSize) { - /* overflow */ -#ifdef DEBUG - _mesa_warning(ctx, "Feedback buffer overflow"); -#endif - result = -1; - } - else { - result = ctx->Select.Hits; - } - ctx->Select.BufferCount = 0; - ctx->Select.Hits = 0; - ctx->Select.NameStackDepth = 0; - break; - case GL_FEEDBACK: - if (ctx->Feedback.Count > ctx->Feedback.BufferSize) { - /* overflow */ - result = -1; - } - else { - result = ctx->Feedback.Count; - } - ctx->Feedback.Count = 0; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); - return 0; - } - - switch (mode) { - case GL_RENDER: - break; - case GL_SELECT: - if (ctx->Select.BufferSize==0) { - /* haven't called glSelectBuffer yet */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); - } - break; - case GL_FEEDBACK: - if (ctx->Feedback.BufferSize==0) { - /* haven't called glFeedbackBuffer yet */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glRenderMode" ); - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glRenderMode" ); - return 0; - } - - ctx->RenderMode = mode; - if (ctx->Driver.RenderMode) - ctx->Driver.RenderMode( ctx, mode ); - - return result; -} Index: xc/extras/Mesa/src/feedback.h diff -u xc/extras/Mesa/src/feedback.h:1.4 xc/extras/Mesa/src/feedback.h:removed --- xc/extras/Mesa/src/feedback.h:1.4 Fri Feb 22 14:25:29 2002 +++ xc/extras/Mesa/src/feedback.h Wed Mar 16 21:00:29 2005 @@ -1,76 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef FEEDBACK_H -#define FEEDBACK_H - - -#include "mtypes.h" - - -#define FEEDBACK_TOKEN( CTX, T ) \ - if (CTX->Feedback.Count < CTX->Feedback.BufferSize) { \ - CTX->Feedback.Buffer[CTX->Feedback.Count] = (GLfloat) (T); \ - } \ - CTX->Feedback.Count++; - - -extern void _mesa_feedback_vertex( GLcontext *ctx, - const GLfloat win[4], - const GLfloat color[4], - GLuint index, - const GLfloat texcoord[4] ); - - -extern void _mesa_update_hitflag( GLcontext *ctx, GLfloat z ); - - -extern void -_mesa_PassThrough( GLfloat token ); - -extern void -_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); - -extern void -_mesa_SelectBuffer( GLsizei size, GLuint *buffer ); - -extern void -_mesa_InitNames( void ); - -extern void -_mesa_LoadName( GLuint name ); - -extern void -_mesa_PushName( GLuint name ); - -extern void -_mesa_PopName( void ); - -extern GLint -_mesa_RenderMode( GLenum mode ); - - -#endif Index: xc/extras/Mesa/src/fog.c diff -u xc/extras/Mesa/src/fog.c:1.12 xc/extras/Mesa/src/fog.c:removed --- xc/extras/Mesa/src/fog.c:1.12 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/fog.c Wed Mar 16 21:00:29 2005 @@ -1,158 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0.3 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "fog.h" -#include "mtypes.h" - - - -void -_mesa_Fogf(GLenum pname, GLfloat param) -{ - _mesa_Fogfv(pname, ¶m); -} - - -void -_mesa_Fogi(GLenum pname, GLint param ) -{ - GLfloat fparam = (GLfloat) param; - _mesa_Fogfv(pname, &fparam); -} - - -void -_mesa_Fogiv(GLenum pname, const GLint *params ) -{ - GLfloat p[4]; - switch (pname) { - case GL_FOG_MODE: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_INDEX: - case GL_FOG_COORDINATE_SOURCE_EXT: - p[0] = (GLfloat) *params; - break; - case GL_FOG_COLOR: - p[0] = INT_TO_FLOAT( params[0] ); - p[1] = INT_TO_FLOAT( params[1] ); - p[2] = INT_TO_FLOAT( params[2] ); - p[3] = INT_TO_FLOAT( params[3] ); - break; - default: - /* Error will be caught later in _mesa_Fogfv */ - ; - } - _mesa_Fogfv(pname, p); -} - - -void -_mesa_Fogfv( GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLenum m; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (pname) { - case GL_FOG_MODE: - m = (GLenum) (GLint) *params; - switch (m) { - case GL_LINEAR: - case GL_EXP: - case GL_EXP2: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); - return; - } - if (ctx->Fog.Mode == m) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Mode = m; - break; - case GL_FOG_DENSITY: - if (*params<0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glFog" ); - return; - } - if (ctx->Fog.Density == *params) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Density = *params; - break; - case GL_FOG_START: - if (ctx->Fog.Start == *params) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Start = *params; - break; - case GL_FOG_END: - if (ctx->Fog.End == *params) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.End = *params; - break; - case GL_FOG_INDEX: - if (ctx->Fog.Index == *params) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Index = *params; - break; - case GL_FOG_COLOR: - if (TEST_EQ_4V(ctx->Fog.Color, params)) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Color[0] = CLAMP(params[0], 0.0F, 1.0F); - ctx->Fog.Color[1] = CLAMP(params[1], 0.0F, 1.0F); - ctx->Fog.Color[2] = CLAMP(params[2], 0.0F, 1.0F); - ctx->Fog.Color[3] = CLAMP(params[3], 0.0F, 1.0F); - break; - case GL_FOG_COORDINATE_SOURCE_EXT: { - GLenum p = (GLenum) (GLint) *params; - if (!ctx->Extensions.EXT_fog_coord || - (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glFog"); - return; - } - if (ctx->Fog.FogCoordinateSource == p) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.FogCoordinateSource = p; - break; - } - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); - return; - } - - if (ctx->Driver.Fogfv) { - (*ctx->Driver.Fogfv)( ctx, pname, params ); - } -} Index: xc/extras/Mesa/src/fog.h diff -u xc/extras/Mesa/src/fog.h:1.5 xc/extras/Mesa/src/fog.h:removed --- xc/extras/Mesa/src/fog.h:1.5 Fri Feb 22 14:25:29 2002 +++ xc/extras/Mesa/src/fog.h Wed Mar 16 21:00:29 2005 @@ -1,51 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef FOG_H -#define FOG_H - - -#include "mtypes.h" - - - -extern void -_mesa_Fogf(GLenum pname, GLfloat param); - - -extern void -_mesa_Fogi(GLenum pname, GLint param ); - - -extern void -_mesa_Fogfv(GLenum pname, const GLfloat *params ); - - -extern void -_mesa_Fogiv(GLenum pname, const GLint *params ); - - -#endif Index: xc/extras/Mesa/src/get.c diff -u xc/extras/Mesa/src/get.c:1.18 xc/extras/Mesa/src/get.c:removed --- xc/extras/Mesa/src/get.c:1.18 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/get.c Wed Mar 16 21:00:29 2005 @@ -1,5747 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "enable.h" -#include "enums.h" -#include "extensions.h" -#include "get.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" -#include "texcompress.h" -#include "math/m_matrix.h" - - - -#define FLOAT_TO_BOOL(X) ( (X)==0.0F ? GL_FALSE : GL_TRUE ) -#define INT_TO_BOOL(I) ( (I)==0 ? GL_FALSE : GL_TRUE ) -#define ENUM_TO_BOOL(E) ( (E)==0 ? GL_FALSE : GL_TRUE ) - -#ifdef SPECIALCAST -/* Needed for an Amiga compiler */ -#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X)) -#define ENUM_TO_DOUBLE(X) ((GLdouble)(GLint)(X)) -#else -/* all other compilers */ -#define ENUM_TO_FLOAT(X) ((GLfloat)(X)) -#define ENUM_TO_DOUBLE(X) ((GLdouble)(X)) -#endif - - -/* Check if named extension is enabled, if not generate error and return */ - -#define CHECK_EXTENSION_B(EXTNAME, PNAME) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_VALUE, \ - "glGetBooleanv(0x%x)", (int) PNAME); \ - return; \ - } - -#define CHECK_EXTENSION_I(EXTNAME, PNAME) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_VALUE, \ - "glGetIntegerv(0x%x)", (int) PNAME); \ - return; \ - } - -#define CHECK_EXTENSION_F(EXTNAME, PNAME) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_VALUE, \ - "glGetFloatv(0x%x)", (int) PNAME); \ - return; \ - } - -#define CHECK_EXTENSION_D(EXTNAME, PNAME) \ - if (!ctx->Extensions.EXTNAME) { \ - _mesa_error(ctx, GL_INVALID_VALUE, \ - "glGetDoublev(0x%x)", (int) PNAME); \ - return; \ - } - - - - -static GLenum -pixel_texgen_mode(const GLcontext *ctx) -{ - if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_POSITION) { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_RGBA; - } - else { - return GL_RGB; - } - } - else { - if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) { - return GL_ALPHA; - } - else { - return GL_NONE; - } - } -} - - -void -_mesa_GetBooleanv( GLenum pname, GLboolean *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint i; - GLuint texUnit = ctx->Texture.CurrentUnit; - const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!params) - return; - - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetBooleanv %s\n", _mesa_lookup_enum_by_nr(pname)); - - if (ctx->Driver.GetBooleanv - && (*ctx->Driver.GetBooleanv)(ctx, pname, params)) - return; - - switch (pname) { - case GL_ACCUM_RED_BITS: - *params = INT_TO_BOOL(ctx->Visual.accumRedBits); - break; - case GL_ACCUM_GREEN_BITS: - *params = INT_TO_BOOL(ctx->Visual.accumGreenBits); - break; - case GL_ACCUM_BLUE_BITS: - *params = INT_TO_BOOL(ctx->Visual.accumBlueBits); - break; - case GL_ACCUM_ALPHA_BITS: - *params = INT_TO_BOOL(ctx->Visual.accumAlphaBits); - break; - case GL_ACCUM_CLEAR_VALUE: - params[0] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[0]); - params[1] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[1]); - params[2] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[2]); - params[3] = FLOAT_TO_BOOL(ctx->Accum.ClearColor[3]); - break; - case GL_ALPHA_BIAS: - *params = FLOAT_TO_BOOL(ctx->Pixel.AlphaBias); - break; - case GL_ALPHA_BITS: - *params = INT_TO_BOOL(ctx->Visual.alphaBits); - break; - case GL_ALPHA_SCALE: - *params = FLOAT_TO_BOOL(ctx->Pixel.AlphaScale); - break; - case GL_ALPHA_TEST: - *params = ctx->Color.AlphaEnabled; - break; - case GL_ALPHA_TEST_FUNC: - *params = ENUM_TO_BOOL(ctx->Color.AlphaFunc); - break; - case GL_ALPHA_TEST_REF: - *params = ctx->Color.AlphaRef ? GL_TRUE : GL_FALSE; - break; - case GL_ATTRIB_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->AttribStackDepth); - break; - case GL_AUTO_NORMAL: - *params = ctx->Eval.AutoNormal; - break; - case GL_AUX_BUFFERS: - *params = (ctx->Const.NumAuxBuffers) ? GL_TRUE : GL_FALSE; - break; - case GL_BLEND: - *params = ctx->Color.BlendEnabled; - break; - case GL_BLEND_DST: - *params = ENUM_TO_BOOL(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC: - *params = ENUM_TO_BOOL(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_SRC_RGB_EXT: - *params = ENUM_TO_BOOL(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_DST_RGB_EXT: - *params = ENUM_TO_BOOL(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC_ALPHA_EXT: - *params = ENUM_TO_BOOL(ctx->Color.BlendSrcA); - break; - case GL_BLEND_DST_ALPHA_EXT: - *params = ENUM_TO_BOOL(ctx->Color.BlendDstA); - break; - case GL_BLEND_EQUATION_EXT: - *params = ENUM_TO_BOOL( ctx->Color.BlendEquation ); - break; - case GL_BLEND_COLOR_EXT: - params[0] = FLOAT_TO_BOOL( ctx->Color.BlendColor[0] ); - params[1] = FLOAT_TO_BOOL( ctx->Color.BlendColor[1] ); - params[2] = FLOAT_TO_BOOL( ctx->Color.BlendColor[2] ); - params[3] = FLOAT_TO_BOOL( ctx->Color.BlendColor[3] ); - break; - case GL_BLUE_BIAS: - *params = FLOAT_TO_BOOL(ctx->Pixel.BlueBias); - break; - case GL_BLUE_BITS: - *params = INT_TO_BOOL( ctx->Visual.blueBits ); - break; - case GL_BLUE_SCALE: - *params = FLOAT_TO_BOOL(ctx->Pixel.BlueScale); - break; - case GL_CLIENT_ATTRIB_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->ClientAttribStackDepth); - break; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - if (ctx->Transform.ClipPlanesEnabled & (1 << (pname - GL_CLIP_PLANE0))) - *params = GL_TRUE; - else - *params = GL_FALSE; - break; - case GL_COLOR_CLEAR_VALUE: - params[0] = ctx->Color.ClearColor[0] ? GL_TRUE : GL_FALSE; - params[1] = ctx->Color.ClearColor[1] ? GL_TRUE : GL_FALSE; - params[2] = ctx->Color.ClearColor[2] ? GL_TRUE : GL_FALSE; - params[3] = ctx->Color.ClearColor[3] ? GL_TRUE : GL_FALSE; - break; - case GL_COLOR_MATERIAL: - *params = ctx->Light.ColorMaterialEnabled; - break; - case GL_COLOR_MATERIAL_FACE: - *params = ENUM_TO_BOOL(ctx->Light.ColorMaterialFace); - break; - case GL_COLOR_MATERIAL_PARAMETER: - *params = ENUM_TO_BOOL(ctx->Light.ColorMaterialMode); - break; - case GL_COLOR_WRITEMASK: - params[0] = ctx->Color.ColorMask[RCOMP] ? GL_TRUE : GL_FALSE; - params[1] = ctx->Color.ColorMask[GCOMP] ? GL_TRUE : GL_FALSE; - params[2] = ctx->Color.ColorMask[BCOMP] ? GL_TRUE : GL_FALSE; - params[3] = ctx->Color.ColorMask[ACOMP] ? GL_TRUE : GL_FALSE; - break; - case GL_CULL_FACE: - *params = ctx->Polygon.CullFlag; - break; - case GL_CULL_FACE_MODE: - *params = ENUM_TO_BOOL(ctx->Polygon.CullFaceMode); - break; - case GL_CURRENT_COLOR: - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]); - params[3] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]); - break; - case GL_CURRENT_INDEX: - FLUSH_CURRENT(ctx, 0); - *params = INT_TO_BOOL(ctx->Current.Index); - break; - case GL_CURRENT_NORMAL: - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]); - break; - case GL_CURRENT_RASTER_COLOR: - params[0] = FLOAT_TO_BOOL(ctx->Current.RasterColor[0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.RasterColor[1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.RasterColor[2]); - params[3] = FLOAT_TO_BOOL(ctx->Current.RasterColor[3]); - break; - case GL_CURRENT_RASTER_DISTANCE: - *params = FLOAT_TO_BOOL(ctx->Current.RasterDistance); - break; - case GL_CURRENT_RASTER_INDEX: - *params = FLOAT_TO_BOOL(ctx->Current.RasterIndex); - break; - case GL_CURRENT_RASTER_POSITION: - params[0] = FLOAT_TO_BOOL(ctx->Current.RasterPos[0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.RasterPos[1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.RasterPos[2]); - params[3] = FLOAT_TO_BOOL(ctx->Current.RasterPos[3]); - break; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - params[0] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoords[texUnit][0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoords[texUnit][1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoords[texUnit][2]); - params[3] = FLOAT_TO_BOOL(ctx->Current.RasterTexCoords[texUnit][3]); - break; - case GL_CURRENT_RASTER_POSITION_VALID: - *params = ctx->Current.RasterPosValid; - break; - case GL_CURRENT_TEXTURE_COORDS: - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]); - params[1] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]); - params[2] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]); - params[3] = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]); - break; - case GL_DEPTH_BIAS: - *params = FLOAT_TO_BOOL(ctx->Pixel.DepthBias); - break; - case GL_DEPTH_BITS: - *params = INT_TO_BOOL(ctx->Visual.depthBits); - break; - case GL_DEPTH_CLEAR_VALUE: - *params = FLOAT_TO_BOOL(ctx->Depth.Clear); - break; - case GL_DEPTH_FUNC: - *params = ENUM_TO_BOOL(ctx->Depth.Func); - break; - case GL_DEPTH_RANGE: - params[0] = FLOAT_TO_BOOL(ctx->Viewport.Near); - params[1] = FLOAT_TO_BOOL(ctx->Viewport.Far); - break; - case GL_DEPTH_SCALE: - *params = FLOAT_TO_BOOL(ctx->Pixel.DepthScale); - break; - case GL_DEPTH_TEST: - *params = ctx->Depth.Test; - break; - case GL_DEPTH_WRITEMASK: - *params = ctx->Depth.Mask; - break; - case GL_DITHER: - *params = ctx->Color.DitherFlag; - break; - case GL_DOUBLEBUFFER: - *params = ctx->Visual.doubleBufferMode; - break; - case GL_DRAW_BUFFER: - *params = ENUM_TO_BOOL(ctx->Color.DrawBuffer); - break; - case GL_EDGE_FLAG: - FLUSH_CURRENT(ctx, 0); - *params = ctx->Current.EdgeFlag; - break; - case GL_FEEDBACK_BUFFER_SIZE: - *params = INT_TO_BOOL(ctx->Feedback.BufferSize); - break; - case GL_FEEDBACK_BUFFER_TYPE: - *params = INT_TO_BOOL(ctx->Feedback.Type); - break; - case GL_FOG: - *params = ctx->Fog.Enabled; - break; - case GL_FOG_COLOR: - params[0] = FLOAT_TO_BOOL(ctx->Fog.Color[0]); - params[1] = FLOAT_TO_BOOL(ctx->Fog.Color[1]); - params[2] = FLOAT_TO_BOOL(ctx->Fog.Color[2]); - params[3] = FLOAT_TO_BOOL(ctx->Fog.Color[3]); - break; - case GL_FOG_DENSITY: - *params = FLOAT_TO_BOOL(ctx->Fog.Density); - break; - case GL_FOG_END: - *params = FLOAT_TO_BOOL(ctx->Fog.End); - break; - case GL_FOG_HINT: - *params = ENUM_TO_BOOL(ctx->Hint.Fog); - break; - case GL_FOG_INDEX: - *params = FLOAT_TO_BOOL(ctx->Fog.Index); - break; - case GL_FOG_MODE: - *params = ENUM_TO_BOOL(ctx->Fog.Mode); - break; - case GL_FOG_START: - *params = FLOAT_TO_BOOL(ctx->Fog.End); - break; - case GL_FRONT_FACE: - *params = ENUM_TO_BOOL(ctx->Polygon.FrontFace); - break; - case GL_GREEN_BIAS: - *params = FLOAT_TO_BOOL(ctx->Pixel.GreenBias); - break; - case GL_GREEN_BITS: - *params = INT_TO_BOOL( ctx->Visual.greenBits ); - break; - case GL_GREEN_SCALE: - *params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale); - break; - case GL_INDEX_BITS: - *params = INT_TO_BOOL( ctx->Visual.indexBits ); - break; - case GL_INDEX_CLEAR_VALUE: - *params = INT_TO_BOOL(ctx->Color.ClearIndex); - break; - case GL_INDEX_MODE: - *params = ctx->Visual.rgbMode ? GL_FALSE : GL_TRUE; - break; - case GL_INDEX_OFFSET: - *params = INT_TO_BOOL(ctx->Pixel.IndexOffset); - break; - case GL_INDEX_SHIFT: - *params = INT_TO_BOOL(ctx->Pixel.IndexShift); - break; - case GL_INDEX_WRITEMASK: - *params = INT_TO_BOOL(ctx->Color.IndexMask); - break; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - *params = ctx->Light.Light[pname-GL_LIGHT0].Enabled; - break; - case GL_LIGHTING: - *params = ctx->Light.Enabled; - break; - case GL_LIGHT_MODEL_AMBIENT: - params[0] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[0]); - params[1] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[1]); - params[2] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[2]); - params[3] = FLOAT_TO_BOOL(ctx->Light.Model.Ambient[3]); - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - params[0] = ENUM_TO_BOOL(ctx->Light.Model.ColorControl); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - *params = ctx->Light.Model.LocalViewer; - break; - case GL_LIGHT_MODEL_TWO_SIDE: - *params = ctx->Light.Model.TwoSide; - break; - case GL_LINE_SMOOTH: - *params = ctx->Line.SmoothFlag; - break; - case GL_LINE_SMOOTH_HINT: - *params = ENUM_TO_BOOL(ctx->Hint.LineSmooth); - break; - case GL_LINE_STIPPLE: - *params = ctx->Line.StippleFlag; - break; - case GL_LINE_STIPPLE_PATTERN: - *params = INT_TO_BOOL(ctx->Line.StipplePattern); - break; - case GL_LINE_STIPPLE_REPEAT: - *params = INT_TO_BOOL(ctx->Line.StippleFactor); - break; - case GL_LINE_WIDTH: - *params = FLOAT_TO_BOOL(ctx->Line.Width); - break; - case GL_LINE_WIDTH_GRANULARITY: - *params = FLOAT_TO_BOOL(ctx->Const.LineWidthGranularity); - break; - case GL_LINE_WIDTH_RANGE: - params[0] = FLOAT_TO_BOOL(ctx->Const.MinLineWidthAA); - params[1] = FLOAT_TO_BOOL(ctx->Const.MaxLineWidthAA); - break; - case GL_ALIASED_LINE_WIDTH_RANGE: - params[0] = FLOAT_TO_BOOL(ctx->Const.MinLineWidth); - params[1] = FLOAT_TO_BOOL(ctx->Const.MaxLineWidth); - break; - case GL_LIST_BASE: - *params = INT_TO_BOOL(ctx->List.ListBase); - break; - case GL_LIST_INDEX: - *params = INT_TO_BOOL( ctx->CurrentListNum ); - break; - case GL_LIST_MODE: - if (!ctx->CompileFlag) - *params = 0; - else if (ctx->ExecuteFlag) - *params = ENUM_TO_BOOL(GL_COMPILE_AND_EXECUTE); - else - *params = ENUM_TO_BOOL(GL_COMPILE); - break; - case GL_INDEX_LOGIC_OP: - *params = ctx->Color.IndexLogicOpEnabled; - break; - case GL_COLOR_LOGIC_OP: - *params = ctx->Color.ColorLogicOpEnabled; - break; - case GL_LOGIC_OP_MODE: - *params = ENUM_TO_BOOL(ctx->Color.LogicOp); - break; - case GL_MAP1_COLOR_4: - *params = ctx->Eval.Map1Color4; - break; - case GL_MAP1_GRID_DOMAIN: - params[0] = FLOAT_TO_BOOL(ctx->Eval.MapGrid1u1); - params[1] = FLOAT_TO_BOOL(ctx->Eval.MapGrid1u2); - break; - case GL_MAP1_GRID_SEGMENTS: - *params = INT_TO_BOOL(ctx->Eval.MapGrid1un); - break; - case GL_MAP1_INDEX: - *params = ctx->Eval.Map1Index; - break; - case GL_MAP1_NORMAL: - *params = ctx->Eval.Map1Normal; - break; - case GL_MAP1_TEXTURE_COORD_1: - *params = ctx->Eval.Map1TextureCoord1; - break; - case GL_MAP1_TEXTURE_COORD_2: - *params = ctx->Eval.Map1TextureCoord2; - break; - case GL_MAP1_TEXTURE_COORD_3: - *params = ctx->Eval.Map1TextureCoord3; - break; - case GL_MAP1_TEXTURE_COORD_4: - *params = ctx->Eval.Map1TextureCoord4; - break; - case GL_MAP1_VERTEX_3: - *params = ctx->Eval.Map1Vertex3; - break; - case GL_MAP1_VERTEX_4: - *params = ctx->Eval.Map1Vertex4; - break; - case GL_MAP2_COLOR_4: - *params = ctx->Eval.Map2Color4; - break; - case GL_MAP2_GRID_DOMAIN: - params[0] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2u1); - params[1] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2u2); - params[2] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2v1); - params[3] = FLOAT_TO_BOOL(ctx->Eval.MapGrid2v2); - break; - case GL_MAP2_GRID_SEGMENTS: - params[0] = INT_TO_BOOL(ctx->Eval.MapGrid2un); - params[1] = INT_TO_BOOL(ctx->Eval.MapGrid2vn); - break; - case GL_MAP2_INDEX: - *params = ctx->Eval.Map2Index; - break; - case GL_MAP2_NORMAL: - *params = ctx->Eval.Map2Normal; - break; - case GL_MAP2_TEXTURE_COORD_1: - *params = ctx->Eval.Map2TextureCoord1; - break; - case GL_MAP2_TEXTURE_COORD_2: - *params = ctx->Eval.Map2TextureCoord2; - break; - case GL_MAP2_TEXTURE_COORD_3: - *params = ctx->Eval.Map2TextureCoord3; - break; - case GL_MAP2_TEXTURE_COORD_4: - *params = ctx->Eval.Map2TextureCoord4; - break; - case GL_MAP2_VERTEX_3: - *params = ctx->Eval.Map2Vertex3; - break; - case GL_MAP2_VERTEX_4: - *params = ctx->Eval.Map2Vertex4; - break; - case GL_MAP_COLOR: - *params = ctx->Pixel.MapColorFlag; - break; - case GL_MAP_STENCIL: - *params = ctx->Pixel.MapStencilFlag; - break; - case GL_MATRIX_MODE: - *params = ENUM_TO_BOOL( ctx->Transform.MatrixMode ); - break; - case GL_MAX_ATTRIB_STACK_DEPTH: - *params = INT_TO_BOOL(MAX_ATTRIB_STACK_DEPTH); - break; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - *params = INT_TO_BOOL( MAX_CLIENT_ATTRIB_STACK_DEPTH); - break; - case GL_MAX_CLIP_PLANES: - *params = INT_TO_BOOL(ctx->Const.MaxClipPlanes); - break; - case GL_MAX_ELEMENTS_VERTICES: /* GL_VERSION_1_2 */ - *params = INT_TO_BOOL(ctx->Const.MaxArrayLockSize); - break; - case GL_MAX_ELEMENTS_INDICES: /* GL_VERSION_1_2 */ - *params = INT_TO_BOOL(ctx->Const.MaxArrayLockSize); - break; - case GL_MAX_EVAL_ORDER: - *params = INT_TO_BOOL(MAX_EVAL_ORDER); - break; - case GL_MAX_LIGHTS: - *params = INT_TO_BOOL(ctx->Const.MaxLights); - break; - case GL_MAX_LIST_NESTING: - *params = INT_TO_BOOL(MAX_LIST_NESTING); - break; - case GL_MAX_MODELVIEW_STACK_DEPTH: - *params = INT_TO_BOOL(MAX_MODELVIEW_STACK_DEPTH); - break; - case GL_MAX_NAME_STACK_DEPTH: - *params = INT_TO_BOOL(MAX_NAME_STACK_DEPTH); - break; - case GL_MAX_PIXEL_MAP_TABLE: - *params = INT_TO_BOOL(MAX_PIXEL_MAP_TABLE); - break; - case GL_MAX_PROJECTION_STACK_DEPTH: - *params = INT_TO_BOOL(MAX_PROJECTION_STACK_DEPTH); - break; - case GL_MAX_TEXTURE_SIZE: - *params = INT_TO_BOOL(1 << (ctx->Const.MaxTextureLevels - 1)); - break; - case GL_MAX_3D_TEXTURE_SIZE: - *params = INT_TO_BOOL(1 << (ctx->Const.Max3DTextureLevels - 1)); - break; - case GL_MAX_TEXTURE_STACK_DEPTH: - *params = INT_TO_BOOL(MAX_TEXTURE_STACK_DEPTH); - break; - case GL_MAX_VIEWPORT_DIMS: - params[0] = INT_TO_BOOL(MAX_WIDTH); - params[1] = INT_TO_BOOL(MAX_HEIGHT); - break; - case GL_MODELVIEW_MATRIX: - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(ctx->ModelviewMatrixStack.Top->m[i]); - } - break; - case GL_MODELVIEW_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->ModelviewMatrixStack.Depth + 1); - break; - case GL_NAME_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->Select.NameStackDepth); - break; - case GL_NORMALIZE: - *params = ctx->Transform.Normalize; - break; - case GL_PACK_ALIGNMENT: - *params = INT_TO_BOOL(ctx->Pack.Alignment); - break; - case GL_PACK_LSB_FIRST: - *params = ctx->Pack.LsbFirst; - break; - case GL_PACK_ROW_LENGTH: - *params = INT_TO_BOOL(ctx->Pack.RowLength); - break; - case GL_PACK_SKIP_PIXELS: - *params = INT_TO_BOOL(ctx->Pack.SkipPixels); - break; - case GL_PACK_SKIP_ROWS: - *params = INT_TO_BOOL(ctx->Pack.SkipRows); - break; - case GL_PACK_SWAP_BYTES: - *params = ctx->Pack.SwapBytes; - break; - case GL_PACK_SKIP_IMAGES_EXT: - *params = ctx->Pack.SkipImages; - break; - case GL_PACK_IMAGE_HEIGHT_EXT: - *params = ctx->Pack.ImageHeight; - break; - case GL_PACK_INVERT_MESA: - *params = ctx->Pack.Invert; - break; - case GL_PERSPECTIVE_CORRECTION_HINT: - *params = ENUM_TO_BOOL(ctx->Hint.PerspectiveCorrection); - break; - case GL_PIXEL_MAP_A_TO_A_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapAtoAsize); - break; - case GL_PIXEL_MAP_B_TO_B_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapBtoBsize); - break; - case GL_PIXEL_MAP_G_TO_G_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapGtoGsize); - break; - case GL_PIXEL_MAP_I_TO_A_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapItoAsize); - break; - case GL_PIXEL_MAP_I_TO_B_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapItoBsize); - break; - case GL_PIXEL_MAP_I_TO_G_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapItoGsize); - break; - case GL_PIXEL_MAP_I_TO_I_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapItoIsize); - break; - case GL_PIXEL_MAP_I_TO_R_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapItoRsize); - break; - case GL_PIXEL_MAP_R_TO_R_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapRtoRsize); - break; - case GL_PIXEL_MAP_S_TO_S_SIZE: - *params = INT_TO_BOOL(ctx->Pixel.MapStoSsize); - break; - case GL_POINT_SIZE: - *params = FLOAT_TO_BOOL(ctx->Point.Size); - break; - case GL_POINT_SIZE_GRANULARITY: - *params = FLOAT_TO_BOOL(ctx->Const.PointSizeGranularity ); - break; - case GL_POINT_SIZE_RANGE: - params[0] = FLOAT_TO_BOOL(ctx->Const.MinPointSizeAA); - params[1] = FLOAT_TO_BOOL(ctx->Const.MaxPointSizeAA); - break; - case GL_ALIASED_POINT_SIZE_RANGE: - params[0] = FLOAT_TO_BOOL(ctx->Const.MinPointSize); - params[1] = FLOAT_TO_BOOL(ctx->Const.MaxPointSize); - break; - case GL_POINT_SMOOTH: - *params = ctx->Point.SmoothFlag; - break; - case GL_POINT_SMOOTH_HINT: - *params = ENUM_TO_BOOL(ctx->Hint.PointSmooth); - break; - case GL_POINT_SIZE_MIN_EXT: - *params = FLOAT_TO_BOOL(ctx->Point.MinSize); - break; - case GL_POINT_SIZE_MAX_EXT: - *params = FLOAT_TO_BOOL(ctx->Point.MaxSize); - break; - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - *params = FLOAT_TO_BOOL(ctx->Point.Threshold); - break; - case GL_DISTANCE_ATTENUATION_EXT: - params[0] = FLOAT_TO_BOOL(ctx->Point.Params[0]); - params[1] = FLOAT_TO_BOOL(ctx->Point.Params[1]); - params[2] = FLOAT_TO_BOOL(ctx->Point.Params[2]); - break; - case GL_POLYGON_MODE: - params[0] = ENUM_TO_BOOL(ctx->Polygon.FrontMode); - params[1] = ENUM_TO_BOOL(ctx->Polygon.BackMode); - break; - case GL_POLYGON_OFFSET_BIAS_EXT: /* GL_EXT_polygon_offset */ - *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetUnits ); - break; - case GL_POLYGON_OFFSET_FACTOR: - *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetFactor ); - break; - case GL_POLYGON_OFFSET_UNITS: - *params = FLOAT_TO_BOOL( ctx->Polygon.OffsetUnits ); - break; - case GL_POLYGON_SMOOTH: - *params = ctx->Polygon.SmoothFlag; - break; - case GL_POLYGON_SMOOTH_HINT: - *params = ENUM_TO_BOOL(ctx->Hint.PolygonSmooth); - break; - case GL_POLYGON_STIPPLE: - *params = ctx->Polygon.StippleFlag; - break; - case GL_PROJECTION_MATRIX: - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(ctx->ProjectionMatrixStack.Top->m[i]); - } - break; - case GL_PROJECTION_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->ProjectionMatrixStack.Depth + 1); - break; - case GL_READ_BUFFER: - *params = ENUM_TO_BOOL(ctx->Pixel.ReadBuffer); - break; - case GL_RED_BIAS: - *params = FLOAT_TO_BOOL(ctx->Pixel.RedBias); - break; - case GL_RED_BITS: - *params = INT_TO_BOOL( ctx->Visual.redBits ); - break; - case GL_RED_SCALE: - *params = FLOAT_TO_BOOL(ctx->Pixel.RedScale); - break; - case GL_RENDER_MODE: - *params = ENUM_TO_BOOL(ctx->RenderMode); - break; - case GL_RESCALE_NORMAL: - *params = ctx->Transform.RescaleNormals; - break; - case GL_RGBA_MODE: - *params = ctx->Visual.rgbMode; - break; - case GL_SCISSOR_BOX: - params[0] = INT_TO_BOOL(ctx->Scissor.X); - params[1] = INT_TO_BOOL(ctx->Scissor.Y); - params[2] = INT_TO_BOOL(ctx->Scissor.Width); - params[3] = INT_TO_BOOL(ctx->Scissor.Height); - break; - case GL_SCISSOR_TEST: - *params = ctx->Scissor.Enabled; - break; - case GL_SELECTION_BUFFER_SIZE: - *params = INT_TO_BOOL(ctx->Select.BufferSize); - break; - case GL_SHADE_MODEL: - *params = ENUM_TO_BOOL(ctx->Light.ShadeModel); - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - *params = ctx->Texture.SharedPalette; - break; - case GL_STENCIL_BITS: - *params = INT_TO_BOOL(ctx->Visual.stencilBits); - break; - case GL_STENCIL_CLEAR_VALUE: - *params = INT_TO_BOOL(ctx->Stencil.Clear); - break; - case GL_STENCIL_FAIL: - *params = ENUM_TO_BOOL(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_FUNC: - *params = ENUM_TO_BOOL(ctx->Stencil.Function[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_FAIL: - *params = ENUM_TO_BOOL(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_PASS: - *params = ENUM_TO_BOOL(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_REF: - *params = INT_TO_BOOL(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_TEST: - *params = ctx->Stencil.Enabled; - break; - case GL_STENCIL_VALUE_MASK: - *params = INT_TO_BOOL(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_WRITEMASK: - *params = INT_TO_BOOL(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]); - break; - case GL_STEREO: - *params = ctx->Visual.stereoMode; - break; - case GL_SUBPIXEL_BITS: - *params = INT_TO_BOOL(ctx->Const.SubPixelBits); - break; - case GL_TEXTURE_1D: - *params = _mesa_IsEnabled(GL_TEXTURE_1D); - break; - case GL_TEXTURE_2D: - *params = _mesa_IsEnabled(GL_TEXTURE_2D); - break; - case GL_TEXTURE_3D: - *params = _mesa_IsEnabled(GL_TEXTURE_3D); - break; - case GL_TEXTURE_BINDING_1D: - *params = INT_TO_BOOL(textureUnit->Current1D->Name); - break; - case GL_TEXTURE_BINDING_2D: - *params = INT_TO_BOOL(textureUnit->Current2D->Name); - break; - case GL_TEXTURE_BINDING_3D: - *params = INT_TO_BOOL(textureUnit->Current3D->Name); - break; - case GL_TEXTURE_ENV_COLOR: - { - params[0] = FLOAT_TO_BOOL(textureUnit->EnvColor[0]); - params[1] = FLOAT_TO_BOOL(textureUnit->EnvColor[1]); - params[2] = FLOAT_TO_BOOL(textureUnit->EnvColor[2]); - params[3] = FLOAT_TO_BOOL(textureUnit->EnvColor[3]); - } - break; - case GL_TEXTURE_ENV_MODE: - *params = ENUM_TO_BOOL(textureUnit->EnvMode); - break; - case GL_TEXTURE_GEN_S: - *params = (textureUnit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE; - break; - case GL_TEXTURE_GEN_T: - *params = (textureUnit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE; - break; - case GL_TEXTURE_GEN_R: - *params = (textureUnit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE; - break; - case GL_TEXTURE_GEN_Q: - *params = (textureUnit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE; - break; - case GL_TEXTURE_MATRIX: - for (i=0;i<16;i++) { - params[i] = - FLOAT_TO_BOOL(ctx->TextureMatrixStack[texUnit].Top->m[i]); - } - break; - case GL_TEXTURE_STACK_DEPTH: - *params = INT_TO_BOOL(ctx->TextureMatrixStack[texUnit].Depth + 1); - break; - case GL_UNPACK_ALIGNMENT: - *params = INT_TO_BOOL(ctx->Unpack.Alignment); - break; - case GL_UNPACK_LSB_FIRST: - *params = ctx->Unpack.LsbFirst; - break; - case GL_UNPACK_ROW_LENGTH: - *params = INT_TO_BOOL(ctx->Unpack.RowLength); - break; - case GL_UNPACK_SKIP_PIXELS: - *params = INT_TO_BOOL(ctx->Unpack.SkipPixels); - break; - case GL_UNPACK_SKIP_ROWS: - *params = INT_TO_BOOL(ctx->Unpack.SkipRows); - break; - case GL_UNPACK_SWAP_BYTES: - *params = ctx->Unpack.SwapBytes; - break; - case GL_UNPACK_SKIP_IMAGES_EXT: - *params = ctx->Unpack.SkipImages; - break; - case GL_UNPACK_IMAGE_HEIGHT_EXT: - *params = ctx->Unpack.ImageHeight; - break; - case GL_UNPACK_CLIENT_STORAGE_APPLE: - *params = ctx->Unpack.ClientStorage; - break; - case GL_VIEWPORT: - params[0] = INT_TO_BOOL(ctx->Viewport.X); - params[1] = INT_TO_BOOL(ctx->Viewport.Y); - params[2] = INT_TO_BOOL(ctx->Viewport.Width); - params[3] = INT_TO_BOOL(ctx->Viewport.Height); - break; - case GL_ZOOM_X: - *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomX); - break; - case GL_ZOOM_Y: - *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomY); - break; - case GL_VERTEX_ARRAY: - *params = ctx->Array.Vertex.Enabled; - break; - case GL_VERTEX_ARRAY_SIZE: - *params = INT_TO_BOOL(ctx->Array.Vertex.Size); - break; - case GL_VERTEX_ARRAY_TYPE: - *params = ENUM_TO_BOOL(ctx->Array.Vertex.Type); - break; - case GL_VERTEX_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.Vertex.Stride); - break; - case GL_VERTEX_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - case GL_NORMAL_ARRAY: - *params = ctx->Array.Normal.Enabled; - break; - case GL_NORMAL_ARRAY_TYPE: - *params = ENUM_TO_BOOL(ctx->Array.Normal.Type); - break; - case GL_NORMAL_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.Normal.Stride); - break; - case GL_NORMAL_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - case GL_COLOR_ARRAY: - *params = ctx->Array.Color.Enabled; - break; - case GL_COLOR_ARRAY_SIZE: - *params = INT_TO_BOOL(ctx->Array.Color.Size); - break; - case GL_COLOR_ARRAY_TYPE: - *params = ENUM_TO_BOOL(ctx->Array.Color.Type); - break; - case GL_COLOR_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.Color.Stride); - break; - case GL_COLOR_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - case GL_INDEX_ARRAY: - *params = ctx->Array.Index.Enabled; - break; - case GL_INDEX_ARRAY_TYPE: - *params = ENUM_TO_BOOL(ctx->Array.Index.Type); - break; - case GL_INDEX_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.Index.Stride); - break; - case GL_INDEX_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - case GL_TEXTURE_COORD_ARRAY: - *params = ctx->Array.TexCoord[texUnit].Enabled; - break; - case GL_TEXTURE_COORD_ARRAY_SIZE: - *params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Size); - break; - case GL_TEXTURE_COORD_ARRAY_TYPE: - *params = ENUM_TO_BOOL(ctx->Array.TexCoord[texUnit].Type); - break; - case GL_TEXTURE_COORD_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Stride); - break; - case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - case GL_EDGE_FLAG_ARRAY: - *params = ctx->Array.EdgeFlag.Enabled; - break; - case GL_EDGE_FLAG_ARRAY_STRIDE: - *params = INT_TO_BOOL(ctx->Array.EdgeFlag.Stride); - break; - case GL_EDGE_FLAG_ARRAY_COUNT_EXT: - *params = INT_TO_BOOL(0); - break; - - /* GL_ARB_multitexture */ - case GL_MAX_TEXTURE_UNITS_ARB: - CHECK_EXTENSION_B(ARB_multitexture, pname); - *params = INT_TO_BOOL(ctx->Const.MaxTextureUnits); - break; - case GL_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_B(ARB_multitexture, pname); - *params = INT_TO_BOOL(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit); - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_B(ARB_multitexture, pname); - *params = INT_TO_BOOL(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture); - break; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - CHECK_EXTENSION_B(ARB_texture_cube_map, pname); - *params = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); - break; - case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - CHECK_EXTENSION_B(ARB_texture_cube_map, pname); - *params = INT_TO_BOOL(textureUnit->CurrentCubeMap->Name); - break; - case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: - CHECK_EXTENSION_B(ARB_texture_cube_map, pname); - *params = INT_TO_BOOL(1 << (ctx->Const.MaxCubeTextureLevels - 1)); - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - CHECK_EXTENSION_B(ARB_texture_compression, pname); - *params = INT_TO_BOOL(ctx->Hint.TextureCompression); - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_B(ARB_texture_compression, pname); - *params = INT_TO_BOOL(_mesa_get_compressed_formats(ctx, NULL)); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_B(ARB_texture_compression, pname); - { - GLint formats[100]; - GLuint i, n; - n = _mesa_get_compressed_formats(ctx, formats); - for (i = 0; i < n; i++) - params[i] = INT_TO_BOOL(formats[i]); - } - break; - - /* GL_EXT_compiled_vertex_array */ - case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: - *params = ctx->Array.LockFirst ? GL_TRUE : GL_FALSE; - break; - case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT: - *params = ctx->Array.LockCount ? GL_TRUE : GL_FALSE; - break; - - /* GL_ARB_transpose_matrix */ - case GL_TRANSPOSE_COLOR_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ColorMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(tm[i]); - } - } - break; - case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ModelviewMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(tm[i]); - } - } - break; - case GL_TRANSPOSE_PROJECTION_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ProjectionMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(tm[i]); - } - } - break; - case GL_TRANSPOSE_TEXTURE_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->TextureMatrixStack[texUnit].Top->m); - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(tm[i]); - } - } - break; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION_B(HP_occlusion_test, pname); - *params = ctx->Depth.OcclusionTest; - return; - case GL_OCCLUSION_TEST_RESULT_HP: - CHECK_EXTENSION_B(HP_occlusion_test, pname); - if (ctx->Depth.OcclusionTest) - *params = ctx->OcclusionResult; - else - *params = ctx->OcclusionResultSaved; - /* reset flag now */ - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - return; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - *params = ctx->Pixel.PixelTextureEnabled; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - *params = ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - *params = (GLboolean) pixel_texgen_mode(ctx); - break; - - /* GL_SGI_color_matrix (also in 1.2 imaging) */ - case GL_COLOR_MATRIX_SGI: - for (i=0;i<16;i++) { - params[i] = FLOAT_TO_BOOL(ctx->ColorMatrixStack.Top->m[i]); - } - break; - case GL_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = INT_TO_BOOL(ctx->ColorMatrixStack.Depth + 1); - break; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = FLOAT_TO_BOOL(MAX_COLOR_STACK_DEPTH); - break; - case GL_POST_COLOR_MATRIX_RED_SCALE_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[0]); - break; - case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[1]); - break; - case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[2]); - break; - case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[3]); - break; - case GL_POST_COLOR_MATRIX_RED_BIAS_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[0]); - break; - case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[1]); - break; - case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[2]); - break; - case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI: - *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[3]); - break; - - /* GL_EXT_convolution (also in 1.2 imaging) */ - case GL_CONVOLUTION_1D_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = ctx->Pixel.Convolution1DEnabled; - break; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = ctx->Pixel.Convolution2DEnabled; - break; - case GL_SEPARABLE_2D: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = ctx->Pixel.Separable2DEnabled; - break; - case GL_POST_CONVOLUTION_RED_SCALE_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[0]); - break; - case GL_POST_CONVOLUTION_GREEN_SCALE_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[1]); - break; - case GL_POST_CONVOLUTION_BLUE_SCALE_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[2]); - break; - case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[3]); - break; - case GL_POST_CONVOLUTION_RED_BIAS_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[0]); - break; - case GL_POST_CONVOLUTION_GREEN_BIAS_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[1]); - break; - case GL_POST_CONVOLUTION_BLUE_BIAS_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[2]); - break; - case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT: - CHECK_EXTENSION_B(EXT_convolution, pname); - *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[2]); - break; - - /* GL_EXT_histogram (also in 1.2 imaging) */ - case GL_HISTOGRAM: - CHECK_EXTENSION_B(EXT_histogram, pname); - *params = ctx->Pixel.HistogramEnabled; - break; - case GL_MINMAX: - CHECK_EXTENSION_B(EXT_histogram, pname); - *params = ctx->Pixel.MinMaxEnabled; - break; - - /* GL_SGI_color_table (also in 1.2 imaging */ - case GL_COLOR_TABLE_SGI: - *params = ctx->Pixel.ColorTableEnabled; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - *params = ctx->Pixel.PostConvolutionColorTableEnabled; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - *params = ctx->Pixel.PostColorMatrixColorTableEnabled; - break; - - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - *params = ctx->Fog.ColorSumEnabled; - break; - case GL_CURRENT_SECONDARY_COLOR_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - FLUSH_CURRENT(ctx, 0); - params[0] = INT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]); - params[1] = INT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]); - params[2] = INT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]); - params[3] = INT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]); - break; - case GL_SECONDARY_COLOR_ARRAY_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - *params = ctx->Array.SecondaryColor.Enabled; - break; - case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - *params = ENUM_TO_BOOL(ctx->Array.SecondaryColor.Type); - break; - case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - *params = INT_TO_BOOL(ctx->Array.SecondaryColor.Stride); - break; - case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT: - CHECK_EXTENSION_B(EXT_secondary_color, pname); - *params = INT_TO_BOOL(ctx->Array.SecondaryColor.Size); - break; - - /* GL_EXT_fog_coord */ - case GL_CURRENT_FOG_COORDINATE_EXT: - CHECK_EXTENSION_B(EXT_fog_coord, pname); - FLUSH_CURRENT(ctx, 0); - *params = FLOAT_TO_BOOL(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]); - break; - case GL_FOG_COORDINATE_ARRAY_EXT: - CHECK_EXTENSION_B(EXT_fog_coord, pname); - *params = ctx->Array.FogCoord.Enabled; - break; - case GL_FOG_COORDINATE_ARRAY_TYPE_EXT: - CHECK_EXTENSION_B(EXT_fog_coord, pname); - *params = ENUM_TO_BOOL(ctx->Array.FogCoord.Type); - break; - case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_B(EXT_fog_coord, pname); - *params = INT_TO_BOOL(ctx->Array.FogCoord.Stride); - break; - case GL_FOG_COORDINATE_SOURCE_EXT: - CHECK_EXTENSION_B(EXT_fog_coord, pname); - *params = ENUM_TO_BOOL(ctx->Fog.FogCoordinateSource); - break; - - /* GL_EXT_texture_lod_bias */ - case GL_MAX_TEXTURE_LOD_BIAS_EXT: - *params = FLOAT_TO_BOOL(ctx->Const.MaxTextureLodBias); - break; - - /* GL_EXT_texture_filter_anisotropic */ - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - CHECK_EXTENSION_B(EXT_texture_filter_anisotropic, pname); - *params = FLOAT_TO_BOOL(ctx->Const.MaxTextureMaxAnisotropy); - break; - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = ctx->Multisample.Enabled; - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = ctx->Multisample.SampleAlphaToCoverage; - break; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = ctx->Multisample.SampleAlphaToOne; - break; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = ctx->Multisample.SampleCoverage; - break; - case GL_SAMPLE_COVERAGE_VALUE_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = FLOAT_TO_BOOL(ctx->Multisample.SampleCoverageValue); - break; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = ctx->Multisample.SampleCoverageInvert; - break; - case GL_SAMPLE_BUFFERS_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = 0; /* XXX fix someday */ - break; - case GL_SAMPLES_ARB: - CHECK_EXTENSION_B(ARB_multisample, pname); - *params = 0; /* XXX fix someday */ - break; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION_B(IBM_rasterpos_clip, pname); - *params = ctx->Transform.RasterPositionUnclipped; - break; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = ctx->Point.PointSprite; - break; - case GL_POINT_SPRITE_R_MODE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = ENUM_TO_BOOL(ctx->Point.SpriteRMode); - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - CHECK_EXTENSION_B(SGIS_generate_mipmap, pname); - *params = ENUM_TO_BOOL(ctx->Hint.GenerateMipmap); - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = ctx->VertexProgram.Enabled; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = ctx->VertexProgram.PointSizeEnabled; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = ctx->VertexProgram.TwoSideEnabled; - break; - case GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = (MAX_PROGRAM_STACK_DEPTH > 0) ? GL_TRUE : GL_FALSE; - break; - case GL_MAX_TRACK_MATRICES_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = (MAX_PROGRAM_MATRICES > 0) ? GL_TRUE : GL_FALSE; - break; - case GL_CURRENT_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = GL_TRUE; - break; - case GL_CURRENT_MATRIX_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_BOOL(ctx->CurrentStack->Top->m[i]); - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = (ctx->VertexProgram.CurrentID != 0) ? GL_TRUE : GL_FALSE; - break; - case GL_PROGRAM_ERROR_POSITION_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - *params = (ctx->VertexProgram.ErrorPos != 0) ? GL_TRUE : GL_FALSE; - break; - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_VERTEX_ATTRIB_ARRAY0_NV; - *params = ctx->Array.VertexAttrib[n].Enabled; - } - break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP1_VERTEX_ATTRIB0_4_NV; - *params = ctx->Eval.Map1Attrib[n]; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP2_VERTEX_ATTRIB0_4_NV; - *params = ctx->Eval.Map2Attrib[n]; - } - break; -#endif /* FEATURE_NV_vertex_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION_B(NV_texture_rectangle, pname); - *params = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV); - break; - case GL_TEXTURE_BINDING_RECTANGLE_NV: - CHECK_EXTENSION_B(NV_texture_rectangle, pname); - *params = INT_TO_BOOL(textureUnit->CurrentRect->Name); - break; - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - CHECK_EXTENSION_B(NV_texture_rectangle, pname); - *params = INT_TO_BOOL(ctx->Const.MaxTextureRectSize); - break; - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION_B(EXT_stencil_two_side, pname); - *params = ctx->Stencil.TestTwoSide; - break; - case GL_ACTIVE_STENCIL_FACE_EXT: - CHECK_EXTENSION_B(EXT_stencil_two_side, pname); - *params = ENUM_TO_BOOL(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT); - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname); - } -} - - -void -_mesa_GetDoublev( GLenum pname, GLdouble *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint i; - GLuint texUnit = ctx->Texture.CurrentUnit; - const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!params) - return; - - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetDoublev %s\n", _mesa_lookup_enum_by_nr(pname)); - - if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params)) - return; - - switch (pname) { - case GL_ACCUM_RED_BITS: - *params = (GLdouble) ctx->Visual.accumRedBits; - break; - case GL_ACCUM_GREEN_BITS: - *params = (GLdouble) ctx->Visual.accumGreenBits; - break; - case GL_ACCUM_BLUE_BITS: - *params = (GLdouble) ctx->Visual.accumBlueBits; - break; - case GL_ACCUM_ALPHA_BITS: - *params = (GLdouble) ctx->Visual.accumAlphaBits; - break; - case GL_ACCUM_CLEAR_VALUE: - params[0] = (GLdouble) ctx->Accum.ClearColor[0]; - params[1] = (GLdouble) ctx->Accum.ClearColor[1]; - params[2] = (GLdouble) ctx->Accum.ClearColor[2]; - params[3] = (GLdouble) ctx->Accum.ClearColor[3]; - break; - case GL_ALPHA_BIAS: - *params = (GLdouble) ctx->Pixel.AlphaBias; - break; - case GL_ALPHA_BITS: - *params = (GLdouble) ctx->Visual.alphaBits; - break; - case GL_ALPHA_SCALE: - *params = (GLdouble) ctx->Pixel.AlphaScale; - break; - case GL_ALPHA_TEST: - *params = (GLdouble) ctx->Color.AlphaEnabled; - break; - case GL_ALPHA_TEST_FUNC: - *params = ENUM_TO_DOUBLE(ctx->Color.AlphaFunc); - break; - case GL_ALPHA_TEST_REF: - *params = (GLdouble) ctx->Color.AlphaRef; - break; - case GL_ATTRIB_STACK_DEPTH: - *params = (GLdouble ) (ctx->AttribStackDepth); - break; - case GL_AUTO_NORMAL: - *params = (GLdouble) ctx->Eval.AutoNormal; - break; - case GL_AUX_BUFFERS: - *params = (GLdouble) ctx->Const.NumAuxBuffers; - break; - case GL_BLEND: - *params = (GLdouble) ctx->Color.BlendEnabled; - break; - case GL_BLEND_DST: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_SRC_RGB_EXT: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_DST_RGB_EXT: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC_ALPHA_EXT: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendSrcA); - break; - case GL_BLEND_DST_ALPHA_EXT: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendDstA); - break; - case GL_BLEND_EQUATION_EXT: - *params = ENUM_TO_DOUBLE(ctx->Color.BlendEquation); - break; - case GL_BLEND_COLOR_EXT: - params[0] = (GLdouble) ctx->Color.BlendColor[0]; - params[1] = (GLdouble) ctx->Color.BlendColor[1]; - params[2] = (GLdouble) ctx->Color.BlendColor[2]; - params[3] = (GLdouble) ctx->Color.BlendColor[3]; - break; - case GL_BLUE_BIAS: - *params = (GLdouble) ctx->Pixel.BlueBias; - break; - case GL_BLUE_BITS: - *params = (GLdouble) ctx->Visual.blueBits; - break; - case GL_BLUE_SCALE: - *params = (GLdouble) ctx->Pixel.BlueScale; - break; - case GL_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLdouble) (ctx->ClientAttribStackDepth); - break; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - if (ctx->Transform.ClipPlanesEnabled & (1 << (pname - GL_CLIP_PLANE0))) - *params = 1.0; - else - *params = 0.0; - break; - case GL_COLOR_CLEAR_VALUE: - params[0] = (GLdouble) ctx->Color.ClearColor[0]; - params[1] = (GLdouble) ctx->Color.ClearColor[1]; - params[2] = (GLdouble) ctx->Color.ClearColor[2]; - params[3] = (GLdouble) ctx->Color.ClearColor[3]; - break; - case GL_COLOR_MATERIAL: - *params = (GLdouble) ctx->Light.ColorMaterialEnabled; - break; - case GL_COLOR_MATERIAL_FACE: - *params = ENUM_TO_DOUBLE(ctx->Light.ColorMaterialFace); - break; - case GL_COLOR_MATERIAL_PARAMETER: - *params = ENUM_TO_DOUBLE(ctx->Light.ColorMaterialMode); - break; - case GL_COLOR_WRITEMASK: - params[0] = ctx->Color.ColorMask[RCOMP] ? 1.0 : 0.0; - params[1] = ctx->Color.ColorMask[GCOMP] ? 1.0 : 0.0; - params[2] = ctx->Color.ColorMask[BCOMP] ? 1.0 : 0.0; - params[3] = ctx->Color.ColorMask[ACOMP] ? 1.0 : 0.0; - break; - case GL_CULL_FACE: - *params = (GLdouble) ctx->Polygon.CullFlag; - break; - case GL_CULL_FACE_MODE: - *params = ENUM_TO_DOUBLE(ctx->Polygon.CullFaceMode); - break; - case GL_CURRENT_COLOR: - FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]; - params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]; - break; - case GL_CURRENT_INDEX: - FLUSH_CURRENT(ctx, 0); - *params = (GLdouble) ctx->Current.Index; - break; - case GL_CURRENT_NORMAL: - FLUSH_CURRENT(ctx, 0); - params[0] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]; - params[1] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]; - params[2] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]; - break; - case GL_CURRENT_RASTER_COLOR: - params[0] = (GLdouble) ctx->Current.RasterColor[0]; - params[1] = (GLdouble) ctx->Current.RasterColor[1]; - params[2] = (GLdouble) ctx->Current.RasterColor[2]; - params[3] = (GLdouble) ctx->Current.RasterColor[3]; - break; - case GL_CURRENT_RASTER_DISTANCE: - params[0] = (GLdouble) ctx->Current.RasterDistance; - break; - case GL_CURRENT_RASTER_INDEX: - *params = (GLdouble) ctx->Current.RasterIndex; - break; - case GL_CURRENT_RASTER_POSITION: - params[0] = (GLdouble) ctx->Current.RasterPos[0]; - params[1] = (GLdouble) ctx->Current.RasterPos[1]; - params[2] = (GLdouble) ctx->Current.RasterPos[2]; - params[3] = (GLdouble) ctx->Current.RasterPos[3]; - break; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - params[0] = (GLdouble) ctx->Current.RasterTexCoords[texUnit][0]; - params[1] = (GLdouble) ctx->Current.RasterTexCoords[texUnit][1]; - params[2] = (GLdouble) ctx->Current.RasterTexCoords[texUnit][2]; - params[3] = (GLdouble) ctx->Current.RasterTexCoords[texUnit][3]; - break; - case GL_CURRENT_RASTER_POSITION_VALID: - *params = (GLdouble) ctx->Current.RasterPosValid; - break; - case GL_CURRENT_TEXTURE_COORDS: - FLUSH_CURRENT(ctx, 0); - params[0] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]; - params[1] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]; - params[2] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]; - params[3] = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]; - break; - case GL_DEPTH_BIAS: - *params = (GLdouble) ctx->Pixel.DepthBias; - break; - case GL_DEPTH_BITS: - *params = (GLdouble) ctx->Visual.depthBits; - break; - case GL_DEPTH_CLEAR_VALUE: - *params = (GLdouble) ctx->Depth.Clear; - break; - case GL_DEPTH_FUNC: - *params = ENUM_TO_DOUBLE(ctx->Depth.Func); - break; - case GL_DEPTH_RANGE: - params[0] = (GLdouble) ctx->Viewport.Near; - params[1] = (GLdouble) ctx->Viewport.Far; - break; - case GL_DEPTH_SCALE: - *params = (GLdouble) ctx->Pixel.DepthScale; - break; - case GL_DEPTH_TEST: - *params = (GLdouble) ctx->Depth.Test; - break; - case GL_DEPTH_WRITEMASK: - *params = (GLdouble) ctx->Depth.Mask; - break; - case GL_DITHER: - *params = (GLdouble) ctx->Color.DitherFlag; - break; - case GL_DOUBLEBUFFER: - *params = (GLdouble) ctx->Visual.doubleBufferMode; - break; - case GL_DRAW_BUFFER: - *params = ENUM_TO_DOUBLE(ctx->Color.DrawBuffer); - break; - case GL_EDGE_FLAG: - FLUSH_CURRENT(ctx, 0); - *params = (GLdouble) ctx->Current.EdgeFlag; - break; - case GL_FEEDBACK_BUFFER_SIZE: - *params = (GLdouble) ctx->Feedback.BufferSize; - break; - case GL_FEEDBACK_BUFFER_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Feedback.Type); - break; - case GL_FOG: - *params = (GLdouble) ctx->Fog.Enabled; - break; - case GL_FOG_COLOR: - params[0] = (GLdouble) ctx->Fog.Color[0]; - params[1] = (GLdouble) ctx->Fog.Color[1]; - params[2] = (GLdouble) ctx->Fog.Color[2]; - params[3] = (GLdouble) ctx->Fog.Color[3]; - break; - case GL_FOG_DENSITY: - *params = (GLdouble) ctx->Fog.Density; - break; - case GL_FOG_END: - *params = (GLdouble) ctx->Fog.End; - break; - case GL_FOG_HINT: - *params = ENUM_TO_DOUBLE(ctx->Hint.Fog); - break; - case GL_FOG_INDEX: - *params = (GLdouble) ctx->Fog.Index; - break; - case GL_FOG_MODE: - *params = ENUM_TO_DOUBLE(ctx->Fog.Mode); - break; - case GL_FOG_START: - *params = (GLdouble) ctx->Fog.Start; - break; - case GL_FRONT_FACE: - *params = ENUM_TO_DOUBLE(ctx->Polygon.FrontFace); - break; - case GL_GREEN_BIAS: - *params = (GLdouble) ctx->Pixel.GreenBias; - break; - case GL_GREEN_BITS: - *params = (GLdouble) ctx->Visual.greenBits; - break; - case GL_GREEN_SCALE: - *params = (GLdouble) ctx->Pixel.GreenScale; - break; - case GL_INDEX_BITS: - *params = (GLdouble) ctx->Visual.indexBits; - break; - case GL_INDEX_CLEAR_VALUE: - *params = (GLdouble) ctx->Color.ClearIndex; - break; - case GL_INDEX_MODE: - *params = ctx->Visual.rgbMode ? 0.0 : 1.0; - break; - case GL_INDEX_OFFSET: - *params = (GLdouble) ctx->Pixel.IndexOffset; - break; - case GL_INDEX_SHIFT: - *params = (GLdouble) ctx->Pixel.IndexShift; - break; - case GL_INDEX_WRITEMASK: - *params = (GLdouble) ctx->Color.IndexMask; - break; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - *params = (GLdouble) ctx->Light.Light[pname-GL_LIGHT0].Enabled; - break; - case GL_LIGHTING: - *params = (GLdouble) ctx->Light.Enabled; - break; - case GL_LIGHT_MODEL_AMBIENT: - params[0] = (GLdouble) ctx->Light.Model.Ambient[0]; - params[1] = (GLdouble) ctx->Light.Model.Ambient[1]; - params[2] = (GLdouble) ctx->Light.Model.Ambient[2]; - params[3] = (GLdouble) ctx->Light.Model.Ambient[3]; - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - params[0] = (GLdouble) ctx->Light.Model.ColorControl; - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - *params = (GLdouble) ctx->Light.Model.LocalViewer; - break; - case GL_LIGHT_MODEL_TWO_SIDE: - *params = (GLdouble) ctx->Light.Model.TwoSide; - break; - case GL_LINE_SMOOTH: - *params = (GLdouble) ctx->Line.SmoothFlag; - break; - case GL_LINE_SMOOTH_HINT: - *params = ENUM_TO_DOUBLE(ctx->Hint.LineSmooth); - break; - case GL_LINE_STIPPLE: - *params = (GLdouble) ctx->Line.StippleFlag; - break; - case GL_LINE_STIPPLE_PATTERN: - *params = (GLdouble) ctx->Line.StipplePattern; - break; - case GL_LINE_STIPPLE_REPEAT: - *params = (GLdouble) ctx->Line.StippleFactor; - break; - case GL_LINE_WIDTH: - *params = (GLdouble) ctx->Line.Width; - break; - case GL_LINE_WIDTH_GRANULARITY: - *params = (GLdouble) ctx->Const.LineWidthGranularity; - break; - case GL_LINE_WIDTH_RANGE: - params[0] = (GLdouble) ctx->Const.MinLineWidthAA; - params[1] = (GLdouble) ctx->Const.MaxLineWidthAA; - break; - case GL_ALIASED_LINE_WIDTH_RANGE: - params[0] = (GLdouble) ctx->Const.MinLineWidth; - params[1] = (GLdouble) ctx->Const.MaxLineWidth; - break; - case GL_LIST_BASE: - *params = (GLdouble) ctx->List.ListBase; - break; - case GL_LIST_INDEX: - *params = (GLdouble) ctx->CurrentListNum; - break; - case GL_LIST_MODE: - if (!ctx->CompileFlag) - *params = 0.0; - else if (ctx->ExecuteFlag) - *params = ENUM_TO_DOUBLE(GL_COMPILE_AND_EXECUTE); - else - *params = ENUM_TO_DOUBLE(GL_COMPILE); - break; - case GL_INDEX_LOGIC_OP: - *params = (GLdouble) ctx->Color.IndexLogicOpEnabled; - break; - case GL_COLOR_LOGIC_OP: - *params = (GLdouble) ctx->Color.ColorLogicOpEnabled; - break; - case GL_LOGIC_OP_MODE: - *params = ENUM_TO_DOUBLE(ctx->Color.LogicOp); - break; - case GL_MAP1_COLOR_4: - *params = (GLdouble) ctx->Eval.Map1Color4; - break; - case GL_MAP1_GRID_DOMAIN: - params[0] = (GLdouble) ctx->Eval.MapGrid1u1; - params[1] = (GLdouble) ctx->Eval.MapGrid1u2; - break; - case GL_MAP1_GRID_SEGMENTS: - *params = (GLdouble) ctx->Eval.MapGrid1un; - break; - case GL_MAP1_INDEX: - *params = (GLdouble) ctx->Eval.Map1Index; - break; - case GL_MAP1_NORMAL: - *params = (GLdouble) ctx->Eval.Map1Normal; - break; - case GL_MAP1_TEXTURE_COORD_1: - *params = (GLdouble) ctx->Eval.Map1TextureCoord1; - break; - case GL_MAP1_TEXTURE_COORD_2: - *params = (GLdouble) ctx->Eval.Map1TextureCoord2; - break; - case GL_MAP1_TEXTURE_COORD_3: - *params = (GLdouble) ctx->Eval.Map1TextureCoord3; - break; - case GL_MAP1_TEXTURE_COORD_4: - *params = (GLdouble) ctx->Eval.Map1TextureCoord4; - break; - case GL_MAP1_VERTEX_3: - *params = (GLdouble) ctx->Eval.Map1Vertex3; - break; - case GL_MAP1_VERTEX_4: - *params = (GLdouble) ctx->Eval.Map1Vertex4; - break; - case GL_MAP2_COLOR_4: - *params = (GLdouble) ctx->Eval.Map2Color4; - break; - case GL_MAP2_GRID_DOMAIN: - params[0] = (GLdouble) ctx->Eval.MapGrid2u1; - params[1] = (GLdouble) ctx->Eval.MapGrid2u2; - params[2] = (GLdouble) ctx->Eval.MapGrid2v1; - params[3] = (GLdouble) ctx->Eval.MapGrid2v2; - break; - case GL_MAP2_GRID_SEGMENTS: - params[0] = (GLdouble) ctx->Eval.MapGrid2un; - params[1] = (GLdouble) ctx->Eval.MapGrid2vn; - break; - case GL_MAP2_INDEX: - *params = (GLdouble) ctx->Eval.Map2Index; - break; - case GL_MAP2_NORMAL: - *params = (GLdouble) ctx->Eval.Map2Normal; - break; - case GL_MAP2_TEXTURE_COORD_1: - *params = (GLdouble) ctx->Eval.Map2TextureCoord1; - break; - case GL_MAP2_TEXTURE_COORD_2: - *params = (GLdouble) ctx->Eval.Map2TextureCoord2; - break; - case GL_MAP2_TEXTURE_COORD_3: - *params = (GLdouble) ctx->Eval.Map2TextureCoord3; - break; - case GL_MAP2_TEXTURE_COORD_4: - *params = (GLdouble) ctx->Eval.Map2TextureCoord4; - break; - case GL_MAP2_VERTEX_3: - *params = (GLdouble) ctx->Eval.Map2Vertex3; - break; - case GL_MAP2_VERTEX_4: - *params = (GLdouble) ctx->Eval.Map2Vertex4; - break; - case GL_MAP_COLOR: - *params = (GLdouble) ctx->Pixel.MapColorFlag; - break; - case GL_MAP_STENCIL: - *params = (GLdouble) ctx->Pixel.MapStencilFlag; - break; - case GL_MATRIX_MODE: - *params = ENUM_TO_DOUBLE(ctx->Transform.MatrixMode); - break; - case GL_MAX_ATTRIB_STACK_DEPTH: - *params = (GLdouble) MAX_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLdouble) MAX_CLIENT_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIP_PLANES: - *params = (GLdouble) ctx->Const.MaxClipPlanes; - break; - case GL_MAX_ELEMENTS_VERTICES: /* GL_VERSION_1_2 */ - *params = (GLdouble) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_ELEMENTS_INDICES: /* GL_VERSION_1_2 */ - *params = (GLdouble) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_EVAL_ORDER: - *params = (GLdouble) MAX_EVAL_ORDER; - break; - case GL_MAX_LIGHTS: - *params = (GLdouble) ctx->Const.MaxLights; - break; - case GL_MAX_LIST_NESTING: - *params = (GLdouble) MAX_LIST_NESTING; - break; - case GL_MAX_MODELVIEW_STACK_DEPTH: - *params = (GLdouble) MAX_MODELVIEW_STACK_DEPTH; - break; - case GL_MAX_NAME_STACK_DEPTH: - *params = (GLdouble) MAX_NAME_STACK_DEPTH; - break; - case GL_MAX_PIXEL_MAP_TABLE: - *params = (GLdouble) MAX_PIXEL_MAP_TABLE; - break; - case GL_MAX_PROJECTION_STACK_DEPTH: - *params = (GLdouble) MAX_PROJECTION_STACK_DEPTH; - break; - case GL_MAX_TEXTURE_SIZE: - *params = (GLdouble) (1 << (ctx->Const.MaxTextureLevels - 1)); - break; - case GL_MAX_3D_TEXTURE_SIZE: - *params = (GLdouble) (1 << (ctx->Const.Max3DTextureLevels - 1)); - break; - case GL_MAX_TEXTURE_STACK_DEPTH: - *params = (GLdouble) MAX_TEXTURE_STACK_DEPTH; - break; - case GL_MAX_VIEWPORT_DIMS: - params[0] = (GLdouble) MAX_WIDTH; - params[1] = (GLdouble) MAX_HEIGHT; - break; - case GL_MODELVIEW_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLdouble) ctx->ModelviewMatrixStack.Top->m[i]; - } - break; - case GL_MODELVIEW_STACK_DEPTH: - *params = (GLdouble) (ctx->ModelviewMatrixStack.Depth + 1); - break; - case GL_NAME_STACK_DEPTH: - *params = (GLdouble) ctx->Select.NameStackDepth; - break; - case GL_NORMALIZE: - *params = (GLdouble) ctx->Transform.Normalize; - break; - case GL_PACK_ALIGNMENT: - *params = (GLdouble) ctx->Pack.Alignment; - break; - case GL_PACK_LSB_FIRST: - *params = (GLdouble) ctx->Pack.LsbFirst; - break; - case GL_PACK_ROW_LENGTH: - *params = (GLdouble) ctx->Pack.RowLength; - break; - case GL_PACK_SKIP_PIXELS: - *params = (GLdouble) ctx->Pack.SkipPixels; - break; - case GL_PACK_SKIP_ROWS: - *params = (GLdouble) ctx->Pack.SkipRows; - break; - case GL_PACK_SWAP_BYTES: - *params = (GLdouble) ctx->Pack.SwapBytes; - break; - case GL_PACK_SKIP_IMAGES_EXT: - *params = (GLdouble) ctx->Pack.SkipImages; - break; - case GL_PACK_IMAGE_HEIGHT_EXT: - *params = (GLdouble) ctx->Pack.ImageHeight; - break; - case GL_PACK_INVERT_MESA: - *params = (GLdouble) ctx->Pack.Invert; - break; - case GL_PERSPECTIVE_CORRECTION_HINT: - *params = ENUM_TO_DOUBLE(ctx->Hint.PerspectiveCorrection); - break; - case GL_PIXEL_MAP_A_TO_A_SIZE: - *params = (GLdouble) ctx->Pixel.MapAtoAsize; - break; - case GL_PIXEL_MAP_B_TO_B_SIZE: - *params = (GLdouble) ctx->Pixel.MapBtoBsize; - break; - case GL_PIXEL_MAP_G_TO_G_SIZE: - *params = (GLdouble) ctx->Pixel.MapGtoGsize; - break; - case GL_PIXEL_MAP_I_TO_A_SIZE: - *params = (GLdouble) ctx->Pixel.MapItoAsize; - break; - case GL_PIXEL_MAP_I_TO_B_SIZE: - *params = (GLdouble) ctx->Pixel.MapItoBsize; - break; - case GL_PIXEL_MAP_I_TO_G_SIZE: - *params = (GLdouble) ctx->Pixel.MapItoGsize; - break; - case GL_PIXEL_MAP_I_TO_I_SIZE: - *params = (GLdouble) ctx->Pixel.MapItoIsize; - break; - case GL_PIXEL_MAP_I_TO_R_SIZE: - *params = (GLdouble) ctx->Pixel.MapItoRsize; - break; - case GL_PIXEL_MAP_R_TO_R_SIZE: - *params = (GLdouble) ctx->Pixel.MapRtoRsize; - break; - case GL_PIXEL_MAP_S_TO_S_SIZE: - *params = (GLdouble) ctx->Pixel.MapStoSsize; - break; - case GL_POINT_SIZE: - *params = (GLdouble) ctx->Point.Size; - break; - case GL_POINT_SIZE_GRANULARITY: - *params = (GLdouble) ctx->Const.PointSizeGranularity; - break; - case GL_POINT_SIZE_RANGE: - params[0] = (GLdouble) ctx->Const.MinPointSizeAA; - params[1] = (GLdouble) ctx->Const.MaxPointSizeAA; - break; - case GL_ALIASED_POINT_SIZE_RANGE: - params[0] = (GLdouble) ctx->Const.MinPointSize; - params[1] = (GLdouble) ctx->Const.MaxPointSize; - break; - case GL_POINT_SMOOTH: - *params = (GLdouble) ctx->Point.SmoothFlag; - break; - case GL_POINT_SMOOTH_HINT: - *params = ENUM_TO_DOUBLE(ctx->Hint.PointSmooth); - break; - case GL_POINT_SIZE_MIN_EXT: - *params = (GLdouble) (ctx->Point.MinSize); - break; - case GL_POINT_SIZE_MAX_EXT: - *params = (GLdouble) (ctx->Point.MaxSize); - break; - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - *params = (GLdouble) (ctx->Point.Threshold); - break; - case GL_DISTANCE_ATTENUATION_EXT: - params[0] = (GLdouble) (ctx->Point.Params[0]); - params[1] = (GLdouble) (ctx->Point.Params[1]); - params[2] = (GLdouble) (ctx->Point.Params[2]); - break; - case GL_POLYGON_MODE: - params[0] = ENUM_TO_DOUBLE(ctx->Polygon.FrontMode); - params[1] = ENUM_TO_DOUBLE(ctx->Polygon.BackMode); - break; - case GL_POLYGON_OFFSET_BIAS_EXT: /* GL_EXT_polygon_offset */ - *params = (GLdouble) ctx->Polygon.OffsetUnits; - break; - case GL_POLYGON_OFFSET_FACTOR: - *params = (GLdouble) ctx->Polygon.OffsetFactor; - break; - case GL_POLYGON_OFFSET_UNITS: - *params = (GLdouble) ctx->Polygon.OffsetUnits; - break; - case GL_POLYGON_SMOOTH: - *params = (GLdouble) ctx->Polygon.SmoothFlag; - break; - case GL_POLYGON_SMOOTH_HINT: - *params = ENUM_TO_DOUBLE(ctx->Hint.PolygonSmooth); - break; - case GL_POLYGON_STIPPLE: - *params = (GLdouble) ctx->Polygon.StippleFlag; - break; - case GL_PROJECTION_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLdouble) ctx->ProjectionMatrixStack.Top->m[i]; - } - break; - case GL_PROJECTION_STACK_DEPTH: - *params = (GLdouble) (ctx->ProjectionMatrixStack.Depth + 1); - break; - case GL_READ_BUFFER: - *params = ENUM_TO_DOUBLE(ctx->Pixel.ReadBuffer); - break; - case GL_RED_BIAS: - *params = (GLdouble) ctx->Pixel.RedBias; - break; - case GL_RED_BITS: - *params = (GLdouble) ctx->Visual.redBits; - break; - case GL_RED_SCALE: - *params = (GLdouble) ctx->Pixel.RedScale; - break; - case GL_RENDER_MODE: - *params = ENUM_TO_DOUBLE(ctx->RenderMode); - break; - case GL_RESCALE_NORMAL: - *params = (GLdouble) ctx->Transform.RescaleNormals; - break; - case GL_RGBA_MODE: - *params = (GLdouble) ctx->Visual.rgbMode; - break; - case GL_SCISSOR_BOX: - params[0] = (GLdouble) ctx->Scissor.X; - params[1] = (GLdouble) ctx->Scissor.Y; - params[2] = (GLdouble) ctx->Scissor.Width; - params[3] = (GLdouble) ctx->Scissor.Height; - break; - case GL_SCISSOR_TEST: - *params = (GLdouble) ctx->Scissor.Enabled; - break; - case GL_SELECTION_BUFFER_SIZE: - *params = (GLdouble) ctx->Select.BufferSize; - break; - case GL_SHADE_MODEL: - *params = ENUM_TO_DOUBLE(ctx->Light.ShadeModel); - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - *params = (GLdouble) ctx->Texture.SharedPalette; - break; - case GL_STENCIL_BITS: - *params = (GLdouble) ctx->Visual.stencilBits; - break; - case GL_STENCIL_CLEAR_VALUE: - *params = (GLdouble) ctx->Stencil.Clear; - break; - case GL_STENCIL_FAIL: - *params = ENUM_TO_DOUBLE(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_FUNC: - *params = ENUM_TO_DOUBLE(ctx->Stencil.Function[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_FAIL: - *params = ENUM_TO_DOUBLE(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_PASS: - *params = ENUM_TO_DOUBLE(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_REF: - *params = (GLdouble) ctx->Stencil.Ref[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_TEST: - *params = (GLdouble) ctx->Stencil.Enabled; - break; - case GL_STENCIL_VALUE_MASK: - *params = (GLdouble) ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_WRITEMASK: - *params = (GLdouble) ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]; - break; - case GL_STEREO: - *params = (GLdouble) ctx->Visual.stereoMode; - break; - case GL_SUBPIXEL_BITS: - *params = (GLdouble) ctx->Const.SubPixelBits; - break; - case GL_TEXTURE_1D: - *params = _mesa_IsEnabled(GL_TEXTURE_1D) ? 1.0 : 0.0; - break; - case GL_TEXTURE_2D: - *params = _mesa_IsEnabled(GL_TEXTURE_2D) ? 1.0 : 0.0; - break; - case GL_TEXTURE_3D: - *params = _mesa_IsEnabled(GL_TEXTURE_3D) ? 1.0 : 0.0; - break; - case GL_TEXTURE_BINDING_1D: - *params = (GLdouble) textureUnit->Current1D->Name; - break; - case GL_TEXTURE_BINDING_2D: - *params = (GLdouble) textureUnit->Current2D->Name; - break; - case GL_TEXTURE_BINDING_3D: - *params = (GLdouble) textureUnit->Current3D->Name; - break; - case GL_TEXTURE_ENV_COLOR: - params[0] = (GLdouble) textureUnit->EnvColor[0]; - params[1] = (GLdouble) textureUnit->EnvColor[1]; - params[2] = (GLdouble) textureUnit->EnvColor[2]; - params[3] = (GLdouble) textureUnit->EnvColor[3]; - break; - case GL_TEXTURE_ENV_MODE: - *params = ENUM_TO_DOUBLE(textureUnit->EnvMode); - break; - case GL_TEXTURE_GEN_S: - *params = (textureUnit->TexGenEnabled & S_BIT) ? 1.0 : 0.0; - break; - case GL_TEXTURE_GEN_T: - *params = (textureUnit->TexGenEnabled & T_BIT) ? 1.0 : 0.0; - break; - case GL_TEXTURE_GEN_R: - *params = (textureUnit->TexGenEnabled & R_BIT) ? 1.0 : 0.0; - break; - case GL_TEXTURE_GEN_Q: - *params = (textureUnit->TexGenEnabled & Q_BIT) ? 1.0 : 0.0; - break; - case GL_TEXTURE_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLdouble) ctx->TextureMatrixStack[texUnit].Top->m[i]; - } - break; - case GL_TEXTURE_STACK_DEPTH: - *params = (GLdouble) (ctx->TextureMatrixStack[texUnit].Depth + 1); - break; - case GL_UNPACK_ALIGNMENT: - *params = (GLdouble) ctx->Unpack.Alignment; - break; - case GL_UNPACK_LSB_FIRST: - *params = (GLdouble) ctx->Unpack.LsbFirst; - break; - case GL_UNPACK_ROW_LENGTH: - *params = (GLdouble) ctx->Unpack.RowLength; - break; - case GL_UNPACK_SKIP_PIXELS: - *params = (GLdouble) ctx->Unpack.SkipPixels; - break; - case GL_UNPACK_SKIP_ROWS: - *params = (GLdouble) ctx->Unpack.SkipRows; - break; - case GL_UNPACK_SWAP_BYTES: - *params = (GLdouble) ctx->Unpack.SwapBytes; - break; - case GL_UNPACK_SKIP_IMAGES_EXT: - *params = (GLdouble) ctx->Unpack.SkipImages; - break; - case GL_UNPACK_IMAGE_HEIGHT_EXT: - *params = (GLdouble) ctx->Unpack.ImageHeight; - break; - case GL_UNPACK_CLIENT_STORAGE_APPLE: - *params = (GLdouble) ctx->Unpack.ClientStorage; - break; - case GL_VIEWPORT: - params[0] = (GLdouble) ctx->Viewport.X; - params[1] = (GLdouble) ctx->Viewport.Y; - params[2] = (GLdouble) ctx->Viewport.Width; - params[3] = (GLdouble) ctx->Viewport.Height; - break; - case GL_ZOOM_X: - *params = (GLdouble) ctx->Pixel.ZoomX; - break; - case GL_ZOOM_Y: - *params = (GLdouble) ctx->Pixel.ZoomY; - break; - case GL_VERTEX_ARRAY: - *params = (GLdouble) ctx->Array.Vertex.Enabled; - break; - case GL_VERTEX_ARRAY_SIZE: - *params = (GLdouble) ctx->Array.Vertex.Size; - break; - case GL_VERTEX_ARRAY_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Array.Vertex.Type); - break; - case GL_VERTEX_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.Vertex.Stride; - break; - case GL_VERTEX_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_NORMAL_ARRAY: - *params = (GLdouble) ctx->Array.Normal.Enabled; - break; - case GL_NORMAL_ARRAY_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Array.Normal.Type); - break; - case GL_NORMAL_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.Normal.Stride; - break; - case GL_NORMAL_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_COLOR_ARRAY: - *params = (GLdouble) ctx->Array.Color.Enabled; - break; - case GL_COLOR_ARRAY_SIZE: - *params = (GLdouble) ctx->Array.Color.Size; - break; - case GL_COLOR_ARRAY_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Array.Color.Type); - break; - case GL_COLOR_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.Color.Stride; - break; - case GL_COLOR_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_INDEX_ARRAY: - *params = (GLdouble) ctx->Array.Index.Enabled; - break; - case GL_INDEX_ARRAY_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Array.Index.Type); - break; - case GL_INDEX_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.Index.Stride; - break; - case GL_INDEX_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_TEXTURE_COORD_ARRAY: - *params = (GLdouble) ctx->Array.TexCoord[texUnit].Enabled; - break; - case GL_TEXTURE_COORD_ARRAY_SIZE: - *params = (GLdouble) ctx->Array.TexCoord[texUnit].Size; - break; - case GL_TEXTURE_COORD_ARRAY_TYPE: - *params = ENUM_TO_DOUBLE(ctx->Array.TexCoord[texUnit].Type); - break; - case GL_TEXTURE_COORD_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.TexCoord[texUnit].Stride; - break; - case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_EDGE_FLAG_ARRAY: - *params = (GLdouble) ctx->Array.EdgeFlag.Enabled; - break; - case GL_EDGE_FLAG_ARRAY_STRIDE: - *params = (GLdouble) ctx->Array.EdgeFlag.Stride; - break; - case GL_EDGE_FLAG_ARRAY_COUNT_EXT: - *params = 0.0; - break; - - /* GL_ARB_multitexture */ - case GL_MAX_TEXTURE_UNITS_ARB: - CHECK_EXTENSION_D(ARB_multitexture, pname); - *params = (GLdouble) ctx->Const.MaxTextureUnits; - break; - case GL_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_D(ARB_multitexture, pname); - *params = (GLdouble) (GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit); - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_D(ARB_multitexture, pname); - *params = (GLdouble) (GL_TEXTURE0_ARB + ctx->Array.ActiveTexture); - break; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - CHECK_EXTENSION_D(ARB_texture_cube_map, pname); - *params = (GLdouble) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); - break; - case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - CHECK_EXTENSION_D(ARB_texture_cube_map, pname); - *params = (GLdouble) textureUnit->CurrentCubeMap->Name; - break; - case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: - CHECK_EXTENSION_D(ARB_texture_cube_map, pname); - *params = (GLdouble) (1 << (ctx->Const.MaxCubeTextureLevels - 1)); - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - CHECK_EXTENSION_D(ARB_texture_compression, pname); - *params = (GLdouble) ctx->Hint.TextureCompression; - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_D(ARB_texture_compression, pname); - *params = (GLdouble) _mesa_get_compressed_formats(ctx, NULL); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_D(ARB_texture_compression, pname); - { - GLint formats[100]; - GLuint i, n; - n = _mesa_get_compressed_formats(ctx, formats); - for (i = 0; i < n; i++) - params[i] = (GLdouble) formats[i]; - } - break; - - /* GL_EXT_compiled_vertex_array */ - case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: - *params = (GLdouble) ctx->Array.LockFirst; - break; - case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT: - *params = (GLdouble) ctx->Array.LockCount; - break; - - /* GL_ARB_transpose_matrix */ - case GL_TRANSPOSE_COLOR_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ColorMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLdouble) tm[i]; - } - } - break; - case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ModelviewMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLdouble) tm[i]; - } - } - break; - case GL_TRANSPOSE_PROJECTION_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ProjectionMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLdouble) tm[i]; - } - } - break; - case GL_TRANSPOSE_TEXTURE_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->TextureMatrixStack[texUnit].Top->m); - for (i=0;i<16;i++) { - params[i] = (GLdouble) tm[i]; - } - } - break; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION_D(HP_occlusion_test, pname); - *params = (GLdouble) ctx->Depth.OcclusionTest; - break; - case GL_OCCLUSION_TEST_RESULT_HP: - CHECK_EXTENSION_D(HP_occlusion_test, pname); - if (ctx->Depth.OcclusionTest) - *params = (GLdouble) ctx->OcclusionResult; - else - *params = (GLdouble) ctx->OcclusionResultSaved; - /* reset flag now */ - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - break; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - *params = (GLdouble) ctx->Pixel.PixelTextureEnabled; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - *params = (GLdouble) ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - *params = (GLdouble) pixel_texgen_mode(ctx); - break; - - /* GL_SGI_color_matrix (also in 1.2 imaging) */ - case GL_COLOR_MATRIX_SGI: - for (i=0;i<16;i++) { - params[i] = (GLdouble) ctx->ColorMatrixStack.Top->m[i]; - } - break; - case GL_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = (GLdouble) (ctx->ColorMatrixStack.Depth + 1); - break; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = (GLdouble) MAX_COLOR_STACK_DEPTH; - break; - case GL_POST_COLOR_MATRIX_RED_SCALE_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[3]; - break; - case GL_POST_COLOR_MATRIX_RED_BIAS_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[3]; - break; - - /* GL_EXT_convolution (also in 1.2 imaging) */ - case GL_CONVOLUTION_1D_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.Convolution1DEnabled; - break; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.Convolution2DEnabled; - break; - case GL_SEPARABLE_2D: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.Separable2DEnabled; - break; - case GL_POST_CONVOLUTION_RED_SCALE_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionScale[0]; - break; - case GL_POST_CONVOLUTION_GREEN_SCALE_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionScale[1]; - break; - case GL_POST_CONVOLUTION_BLUE_SCALE_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionScale[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionScale[3]; - break; - case GL_POST_CONVOLUTION_RED_BIAS_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionBias[0]; - break; - case GL_POST_CONVOLUTION_GREEN_BIAS_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionBias[1]; - break; - case GL_POST_CONVOLUTION_BLUE_BIAS_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionBias[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT: - CHECK_EXTENSION_D(EXT_convolution, pname); - *params = (GLdouble) ctx->Pixel.PostConvolutionBias[2]; - break; - - /* GL_EXT_histogram (also in 1.2 imaging) */ - case GL_HISTOGRAM: - CHECK_EXTENSION_D(EXT_histogram, pname); - *params = (GLdouble) ctx->Pixel.HistogramEnabled; - break; - case GL_MINMAX: - CHECK_EXTENSION_D(EXT_histogram, pname); - *params = (GLdouble) ctx->Pixel.MinMaxEnabled; - break; - - /* GL_SGI_color_table (also in 1.2 imaging */ - case GL_COLOR_TABLE_SGI: - *params = (GLdouble) ctx->Pixel.ColorTableEnabled; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - *params = (GLdouble) ctx->Pixel.PostConvolutionColorTableEnabled; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - *params = (GLdouble) ctx->Pixel.PostColorMatrixColorTableEnabled; - break; - - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - *params = (GLdouble) ctx->Fog.ColorSumEnabled; - break; - case GL_CURRENT_SECONDARY_COLOR_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]; - params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]; - break; - case GL_SECONDARY_COLOR_ARRAY_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - *params = (GLdouble) ctx->Array.SecondaryColor.Enabled; - break; - case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - *params = (GLdouble) ctx->Array.SecondaryColor.Type; - break; - case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - *params = (GLdouble) ctx->Array.SecondaryColor.Stride; - break; - case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT: - CHECK_EXTENSION_D(EXT_secondary_color, pname); - *params = (GLdouble) ctx->Array.SecondaryColor.Size; - break; - - /* GL_EXT_fog_coord */ - case GL_CURRENT_FOG_COORDINATE_EXT: - CHECK_EXTENSION_D(EXT_fog_coord, pname); - FLUSH_CURRENT(ctx, 0); - *params = (GLdouble) ctx->Current.Attrib[VERT_ATTRIB_FOG][0]; - break; - case GL_FOG_COORDINATE_ARRAY_EXT: - CHECK_EXTENSION_D(EXT_fog_coord, pname); - *params = (GLdouble) ctx->Array.FogCoord.Enabled; - break; - case GL_FOG_COORDINATE_ARRAY_TYPE_EXT: - CHECK_EXTENSION_D(EXT_fog_coord, pname); - *params = (GLdouble) ctx->Array.FogCoord.Type; - break; - case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_D(EXT_fog_coord, pname); - *params = (GLdouble) ctx->Array.FogCoord.Stride; - break; - case GL_FOG_COORDINATE_SOURCE_EXT: - CHECK_EXTENSION_D(EXT_fog_coord, pname); - *params = (GLdouble) ctx->Fog.FogCoordinateSource; - break; - - /* GL_EXT_texture_lod_bias */ - case GL_MAX_TEXTURE_LOD_BIAS_EXT: - *params = (GLdouble) ctx->Const.MaxTextureLodBias; - break; - - /* GL_EXT_texture_filter_anisotropic */ - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - CHECK_EXTENSION_D(EXT_texture_filter_anisotropic, pname); - *params = (GLdouble) ctx->Const.MaxTextureMaxAnisotropy; - break; - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = (GLdouble) ctx->Multisample.Enabled; - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = (GLdouble) ctx->Multisample.SampleAlphaToCoverage; - break; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = (GLdouble) ctx->Multisample.SampleAlphaToOne; - break; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = (GLdouble) ctx->Multisample.SampleCoverage; - break; - case GL_SAMPLE_COVERAGE_VALUE_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = ctx->Multisample.SampleCoverageValue; - break; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = (GLdouble) ctx->Multisample.SampleCoverageInvert; - break; - case GL_SAMPLE_BUFFERS_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = 0.0; /* XXX fix someday */ - break; - case GL_SAMPLES_ARB: - CHECK_EXTENSION_D(ARB_multisample, pname); - *params = 0.0; /* XXX fix someday */ - break; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION_D(IBM_rasterpos_clip, pname); - *params = (GLdouble) ctx->Transform.RasterPositionUnclipped; - break; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLdouble) ctx->Point.PointSprite; - break; - case GL_POINT_SPRITE_R_MODE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLdouble) ctx->Point.SpriteRMode; - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - CHECK_EXTENSION_D(SGIS_generate_mipmap, pname); - *params = (GLdouble) ctx->Hint.GenerateMipmap; - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->VertexProgram.Enabled; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->VertexProgram.PointSizeEnabled; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->VertexProgram.TwoSideEnabled; - break; - case GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) MAX_PROGRAM_STACK_DEPTH; - break; - case GL_MAX_TRACK_MATRICES_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) MAX_PROGRAM_MATRICES; - break; - case GL_CURRENT_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->CurrentStack->Depth + 1; - break; - case GL_CURRENT_MATRIX_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - for (i = 0; i < 16; i++) - params[i] = (GLdouble) ctx->CurrentStack->Top->m[i]; - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->VertexProgram.CurrentID; - break; - case GL_PROGRAM_ERROR_POSITION_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - *params = (GLdouble) ctx->VertexProgram.ErrorPos; - break; - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION_D(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_VERTEX_ATTRIB_ARRAY0_NV; - *params = (GLdouble) ctx->Array.VertexAttrib[n].Enabled; - } - break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP1_VERTEX_ATTRIB0_4_NV; - *params = (GLdouble) ctx->Eval.Map1Attrib[n]; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP2_VERTEX_ATTRIB0_4_NV; - *params = (GLdouble) ctx->Eval.Map2Attrib[n]; - } - break; -#endif /* FEATURE_NV_vertex_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION_D(NV_texture_rectangle, pname); - *params = (GLdouble) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV); - break; - case GL_TEXTURE_BINDING_RECTANGLE_NV: - CHECK_EXTENSION_D(NV_texture_rectangle, pname); - *params = (GLdouble) textureUnit->CurrentRect->Name; - break; - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - CHECK_EXTENSION_D(NV_texture_rectangle, pname); - *params = (GLdouble) ctx->Const.MaxTextureRectSize; - break; - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION_D(EXT_stencil_two_side, pname); - *params = (GLdouble) ctx->Stencil.TestTwoSide; - break; - case GL_ACTIVE_STENCIL_FACE_EXT: - CHECK_EXTENSION_D(EXT_stencil_two_side, pname); - *params = (GLdouble) (ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT); - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetDoublev(pname=0x%x)", pname); - } -} - - -void -_mesa_GetFloatv( GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint i; - GLuint texUnit = ctx->Texture.CurrentUnit; - const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!params) - return; - - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetFloatv %s\n", _mesa_lookup_enum_by_nr(pname)); - - if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params)) - return; - - switch (pname) { - case GL_ACCUM_RED_BITS: - *params = (GLfloat) ctx->Visual.accumRedBits; - break; - case GL_ACCUM_GREEN_BITS: - *params = (GLfloat) ctx->Visual.accumGreenBits; - break; - case GL_ACCUM_BLUE_BITS: - *params = (GLfloat) ctx->Visual.accumBlueBits; - break; - case GL_ACCUM_ALPHA_BITS: - *params = (GLfloat) ctx->Visual.accumAlphaBits; - break; - case GL_ACCUM_CLEAR_VALUE: - params[0] = ctx->Accum.ClearColor[0]; - params[1] = ctx->Accum.ClearColor[1]; - params[2] = ctx->Accum.ClearColor[2]; - params[3] = ctx->Accum.ClearColor[3]; - break; - case GL_ALPHA_BIAS: - *params = ctx->Pixel.AlphaBias; - break; - case GL_ALPHA_BITS: - *params = (GLfloat) ctx->Visual.alphaBits; - break; - case GL_ALPHA_SCALE: - *params = ctx->Pixel.AlphaScale; - break; - case GL_ALPHA_TEST: - *params = (GLfloat) ctx->Color.AlphaEnabled; - break; - case GL_ALPHA_TEST_FUNC: - *params = ENUM_TO_FLOAT(ctx->Color.AlphaFunc); - break; - case GL_ALPHA_TEST_REF: - *params = (GLfloat) ctx->Color.AlphaRef; - break; - case GL_ATTRIB_STACK_DEPTH: - *params = (GLfloat) (ctx->AttribStackDepth); - break; - case GL_AUTO_NORMAL: - *params = (GLfloat) ctx->Eval.AutoNormal; - break; - case GL_AUX_BUFFERS: - *params = (GLfloat) ctx->Const.NumAuxBuffers; - break; - case GL_BLEND: - *params = (GLfloat) ctx->Color.BlendEnabled; - break; - case GL_BLEND_DST: - *params = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC: - *params = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_SRC_RGB_EXT: - *params = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB); - break; - case GL_BLEND_DST_RGB_EXT: - *params = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB); - break; - case GL_BLEND_SRC_ALPHA_EXT: - *params = ENUM_TO_FLOAT(ctx->Color.BlendSrcA); - break; - case GL_BLEND_DST_ALPHA_EXT: - *params = ENUM_TO_FLOAT(ctx->Color.BlendDstA); - break; - case GL_BLEND_EQUATION_EXT: - *params = ENUM_TO_FLOAT(ctx->Color.BlendEquation); - break; - case GL_BLEND_COLOR_EXT: - params[0] = ctx->Color.BlendColor[0]; - params[1] = ctx->Color.BlendColor[1]; - params[2] = ctx->Color.BlendColor[2]; - params[3] = ctx->Color.BlendColor[3]; - break; - case GL_BLUE_BIAS: - *params = ctx->Pixel.BlueBias; - break; - case GL_BLUE_BITS: - *params = (GLfloat) ctx->Visual.blueBits; - break; - case GL_BLUE_SCALE: - *params = ctx->Pixel.BlueScale; - break; - case GL_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLfloat) (ctx->ClientAttribStackDepth); - break; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - if (ctx->Transform.ClipPlanesEnabled & (1 << (pname - GL_CLIP_PLANE0))) - *params = 1.0; - else - *params = 0.0; - break; - case GL_COLOR_CLEAR_VALUE: - params[0] = ctx->Color.ClearColor[0]; - params[1] = ctx->Color.ClearColor[1]; - params[2] = ctx->Color.ClearColor[2]; - params[3] = ctx->Color.ClearColor[3]; - break; - case GL_COLOR_MATERIAL: - *params = (GLfloat) ctx->Light.ColorMaterialEnabled; - break; - case GL_COLOR_MATERIAL_FACE: - *params = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace); - break; - case GL_COLOR_MATERIAL_PARAMETER: - *params = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode); - break; - case GL_COLOR_WRITEMASK: - params[0] = ctx->Color.ColorMask[RCOMP] ? 1.0F : 0.0F; - params[1] = ctx->Color.ColorMask[GCOMP] ? 1.0F : 0.0F; - params[2] = ctx->Color.ColorMask[BCOMP] ? 1.0F : 0.0F; - params[3] = ctx->Color.ColorMask[ACOMP] ? 1.0F : 0.0F; - break; - case GL_CULL_FACE: - *params = (GLfloat) ctx->Polygon.CullFlag; - break; - case GL_CULL_FACE_MODE: - *params = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode); - break; - case GL_CURRENT_COLOR: - FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]; - params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]; - break; - case GL_CURRENT_INDEX: - FLUSH_CURRENT(ctx, 0); - *params = (GLfloat) ctx->Current.Index; - break; - case GL_CURRENT_NORMAL: - FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]; - break; - case GL_CURRENT_RASTER_COLOR: - params[0] = ctx->Current.RasterColor[0]; - params[1] = ctx->Current.RasterColor[1]; - params[2] = ctx->Current.RasterColor[2]; - params[3] = ctx->Current.RasterColor[3]; - break; - case GL_CURRENT_RASTER_DISTANCE: - params[0] = ctx->Current.RasterDistance; - break; - case GL_CURRENT_RASTER_INDEX: - *params = (GLfloat) ctx->Current.RasterIndex; - break; - case GL_CURRENT_RASTER_POSITION: - params[0] = ctx->Current.RasterPos[0]; - params[1] = ctx->Current.RasterPos[1]; - params[2] = ctx->Current.RasterPos[2]; - params[3] = ctx->Current.RasterPos[3]; - break; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - params[0] = ctx->Current.RasterTexCoords[texUnit][0]; - params[1] = ctx->Current.RasterTexCoords[texUnit][1]; - params[2] = ctx->Current.RasterTexCoords[texUnit][2]; - params[3] = ctx->Current.RasterTexCoords[texUnit][3]; - break; - case GL_CURRENT_RASTER_POSITION_VALID: - *params = (GLfloat) ctx->Current.RasterPosValid; - break; - case GL_CURRENT_TEXTURE_COORDS: - FLUSH_CURRENT(ctx, 0); - params[0] = (GLfloat) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]; - params[1] = (GLfloat) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]; - params[2] = (GLfloat) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]; - params[3] = (GLfloat) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]; - break; - case GL_DEPTH_BIAS: - *params = (GLfloat) ctx->Pixel.DepthBias; - break; - case GL_DEPTH_BITS: - *params = (GLfloat) ctx->Visual.depthBits; - break; - case GL_DEPTH_CLEAR_VALUE: - *params = (GLfloat) ctx->Depth.Clear; - break; - case GL_DEPTH_FUNC: - *params = ENUM_TO_FLOAT(ctx->Depth.Func); - break; - case GL_DEPTH_RANGE: - params[0] = (GLfloat) ctx->Viewport.Near; - params[1] = (GLfloat) ctx->Viewport.Far; - break; - case GL_DEPTH_SCALE: - *params = (GLfloat) ctx->Pixel.DepthScale; - break; - case GL_DEPTH_TEST: - *params = (GLfloat) ctx->Depth.Test; - break; - case GL_DEPTH_WRITEMASK: - *params = (GLfloat) ctx->Depth.Mask; - break; - case GL_DITHER: - *params = (GLfloat) ctx->Color.DitherFlag; - break; - case GL_DOUBLEBUFFER: - *params = (GLfloat) ctx->Visual.doubleBufferMode; - break; - case GL_DRAW_BUFFER: - *params = ENUM_TO_FLOAT(ctx->Color.DrawBuffer); - break; - case GL_EDGE_FLAG: - FLUSH_CURRENT(ctx, 0); - *params = (GLfloat) ctx->Current.EdgeFlag; - break; - case GL_FEEDBACK_BUFFER_SIZE: - *params = (GLfloat) ctx->Feedback.BufferSize; - break; - case GL_FEEDBACK_BUFFER_TYPE: - *params = ENUM_TO_FLOAT(ctx->Feedback.Type); - break; - case GL_FOG: - *params = (GLfloat) ctx->Fog.Enabled; - break; - case GL_FOG_COLOR: - params[0] = ctx->Fog.Color[0]; - params[1] = ctx->Fog.Color[1]; - params[2] = ctx->Fog.Color[2]; - params[3] = ctx->Fog.Color[3]; - break; - case GL_FOG_DENSITY: - *params = ctx->Fog.Density; - break; - case GL_FOG_END: - *params = ctx->Fog.End; - break; - case GL_FOG_HINT: - *params = ENUM_TO_FLOAT(ctx->Hint.Fog); - break; - case GL_FOG_INDEX: - *params = ctx->Fog.Index; - break; - case GL_FOG_MODE: - *params = ENUM_TO_FLOAT(ctx->Fog.Mode); - break; - case GL_FOG_START: - *params = ctx->Fog.Start; - break; - case GL_FRONT_FACE: - *params = ENUM_TO_FLOAT(ctx->Polygon.FrontFace); - break; - case GL_GREEN_BIAS: - *params = (GLfloat) ctx->Pixel.GreenBias; - break; - case GL_GREEN_BITS: - *params = (GLfloat) ctx->Visual.greenBits; - break; - case GL_GREEN_SCALE: - *params = (GLfloat) ctx->Pixel.GreenScale; - break; - case GL_INDEX_BITS: - *params = (GLfloat) ctx->Visual.indexBits; - break; - case GL_INDEX_CLEAR_VALUE: - *params = (GLfloat) ctx->Color.ClearIndex; - break; - case GL_INDEX_MODE: - *params = ctx->Visual.rgbMode ? 0.0F : 1.0F; - break; - case GL_INDEX_OFFSET: - *params = (GLfloat) ctx->Pixel.IndexOffset; - break; - case GL_INDEX_SHIFT: - *params = (GLfloat) ctx->Pixel.IndexShift; - break; - case GL_INDEX_WRITEMASK: - *params = (GLfloat) ctx->Color.IndexMask; - break; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - *params = (GLfloat) ctx->Light.Light[pname-GL_LIGHT0].Enabled; - break; - case GL_LIGHTING: - *params = (GLfloat) ctx->Light.Enabled; - break; - case GL_LIGHT_MODEL_AMBIENT: - params[0] = ctx->Light.Model.Ambient[0]; - params[1] = ctx->Light.Model.Ambient[1]; - params[2] = ctx->Light.Model.Ambient[2]; - params[3] = ctx->Light.Model.Ambient[3]; - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - *params = (GLfloat) ctx->Light.Model.LocalViewer; - break; - case GL_LIGHT_MODEL_TWO_SIDE: - *params = (GLfloat) ctx->Light.Model.TwoSide; - break; - case GL_LINE_SMOOTH: - *params = (GLfloat) ctx->Line.SmoothFlag; - break; - case GL_LINE_SMOOTH_HINT: - *params = ENUM_TO_FLOAT(ctx->Hint.LineSmooth); - break; - case GL_LINE_STIPPLE: - *params = (GLfloat) ctx->Line.StippleFlag; - break; - case GL_LINE_STIPPLE_PATTERN: - *params = (GLfloat) ctx->Line.StipplePattern; - break; - case GL_LINE_STIPPLE_REPEAT: - *params = (GLfloat) ctx->Line.StippleFactor; - break; - case GL_LINE_WIDTH: - *params = (GLfloat) ctx->Line.Width; - break; - case GL_LINE_WIDTH_GRANULARITY: - *params = (GLfloat) ctx->Const.LineWidthGranularity; - break; - case GL_LINE_WIDTH_RANGE: - params[0] = (GLfloat) ctx->Const.MinLineWidthAA; - params[1] = (GLfloat) ctx->Const.MaxLineWidthAA; - break; - case GL_ALIASED_LINE_WIDTH_RANGE: - params[0] = (GLfloat) ctx->Const.MinLineWidth; - params[1] = (GLfloat) ctx->Const.MaxLineWidth; - break; - case GL_LIST_BASE: - *params = (GLfloat) ctx->List.ListBase; - break; - case GL_LIST_INDEX: - *params = (GLfloat) ctx->CurrentListNum; - break; - case GL_LIST_MODE: - if (!ctx->CompileFlag) - *params = 0.0F; - else if (ctx->ExecuteFlag) - *params = ENUM_TO_FLOAT(GL_COMPILE_AND_EXECUTE); - else - *params = ENUM_TO_FLOAT(GL_COMPILE); - break; - case GL_INDEX_LOGIC_OP: - *params = (GLfloat) ctx->Color.IndexLogicOpEnabled; - break; - case GL_COLOR_LOGIC_OP: - *params = (GLfloat) ctx->Color.ColorLogicOpEnabled; - break; - case GL_LOGIC_OP_MODE: - *params = ENUM_TO_FLOAT(ctx->Color.LogicOp); - break; - case GL_MAP1_COLOR_4: - *params = (GLfloat) ctx->Eval.Map1Color4; - break; - case GL_MAP1_GRID_DOMAIN: - params[0] = ctx->Eval.MapGrid1u1; - params[1] = ctx->Eval.MapGrid1u2; - break; - case GL_MAP1_GRID_SEGMENTS: - *params = (GLfloat) ctx->Eval.MapGrid1un; - break; - case GL_MAP1_INDEX: - *params = (GLfloat) ctx->Eval.Map1Index; - break; - case GL_MAP1_NORMAL: - *params = (GLfloat) ctx->Eval.Map1Normal; - break; - case GL_MAP1_TEXTURE_COORD_1: - *params = (GLfloat) ctx->Eval.Map1TextureCoord1; - break; - case GL_MAP1_TEXTURE_COORD_2: - *params = (GLfloat) ctx->Eval.Map1TextureCoord2; - break; - case GL_MAP1_TEXTURE_COORD_3: - *params = (GLfloat) ctx->Eval.Map1TextureCoord3; - break; - case GL_MAP1_TEXTURE_COORD_4: - *params = (GLfloat) ctx->Eval.Map1TextureCoord4; - break; - case GL_MAP1_VERTEX_3: - *params = (GLfloat) ctx->Eval.Map1Vertex3; - break; - case GL_MAP1_VERTEX_4: - *params = (GLfloat) ctx->Eval.Map1Vertex4; - break; - case GL_MAP2_COLOR_4: - *params = (GLfloat) ctx->Eval.Map2Color4; - break; - case GL_MAP2_GRID_DOMAIN: - params[0] = ctx->Eval.MapGrid2u1; - params[1] = ctx->Eval.MapGrid2u2; - params[2] = ctx->Eval.MapGrid2v1; - params[3] = ctx->Eval.MapGrid2v2; - break; - case GL_MAP2_GRID_SEGMENTS: - params[0] = (GLfloat) ctx->Eval.MapGrid2un; - params[1] = (GLfloat) ctx->Eval.MapGrid2vn; - break; - case GL_MAP2_INDEX: - *params = (GLfloat) ctx->Eval.Map2Index; - break; - case GL_MAP2_NORMAL: - *params = (GLfloat) ctx->Eval.Map2Normal; - break; - case GL_MAP2_TEXTURE_COORD_1: - *params = ctx->Eval.Map2TextureCoord1; - break; - case GL_MAP2_TEXTURE_COORD_2: - *params = ctx->Eval.Map2TextureCoord2; - break; - case GL_MAP2_TEXTURE_COORD_3: - *params = ctx->Eval.Map2TextureCoord3; - break; - case GL_MAP2_TEXTURE_COORD_4: - *params = ctx->Eval.Map2TextureCoord4; - break; - case GL_MAP2_VERTEX_3: - *params = (GLfloat) ctx->Eval.Map2Vertex3; - break; - case GL_MAP2_VERTEX_4: - *params = (GLfloat) ctx->Eval.Map2Vertex4; - break; - case GL_MAP_COLOR: - *params = (GLfloat) ctx->Pixel.MapColorFlag; - break; - case GL_MAP_STENCIL: - *params = (GLfloat) ctx->Pixel.MapStencilFlag; - break; - case GL_MATRIX_MODE: - *params = ENUM_TO_FLOAT(ctx->Transform.MatrixMode); - break; - case GL_MAX_ATTRIB_STACK_DEPTH: - *params = (GLfloat) MAX_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLfloat) MAX_CLIENT_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIP_PLANES: - *params = (GLfloat) ctx->Const.MaxClipPlanes; - break; - case GL_MAX_ELEMENTS_VERTICES: /* GL_VERSION_1_2 */ - *params = (GLfloat) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_ELEMENTS_INDICES: /* GL_VERSION_1_2 */ - *params = (GLfloat) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_EVAL_ORDER: - *params = (GLfloat) MAX_EVAL_ORDER; - break; - case GL_MAX_LIGHTS: - *params = (GLfloat) ctx->Const.MaxLights; - break; - case GL_MAX_LIST_NESTING: - *params = (GLfloat) MAX_LIST_NESTING; - break; - case GL_MAX_MODELVIEW_STACK_DEPTH: - *params = (GLfloat) MAX_MODELVIEW_STACK_DEPTH; - break; - case GL_MAX_NAME_STACK_DEPTH: - *params = (GLfloat) MAX_NAME_STACK_DEPTH; - break; - case GL_MAX_PIXEL_MAP_TABLE: - *params = (GLfloat) MAX_PIXEL_MAP_TABLE; - break; - case GL_MAX_PROJECTION_STACK_DEPTH: - *params = (GLfloat) MAX_PROJECTION_STACK_DEPTH; - break; - case GL_MAX_TEXTURE_SIZE: - *params = (GLfloat) (1 << (ctx->Const.MaxTextureLevels - 1)); - break; - case GL_MAX_3D_TEXTURE_SIZE: - *params = (GLfloat) (1 << (ctx->Const.Max3DTextureLevels - 1)); - break; - case GL_MAX_TEXTURE_STACK_DEPTH: - *params = (GLfloat) MAX_TEXTURE_STACK_DEPTH; - break; - case GL_MAX_VIEWPORT_DIMS: - params[0] = (GLfloat) MAX_WIDTH; - params[1] = (GLfloat) MAX_HEIGHT; - break; - case GL_MODELVIEW_MATRIX: - for (i=0;i<16;i++) { - params[i] = ctx->ModelviewMatrixStack.Top->m[i]; - } - break; - case GL_MODELVIEW_STACK_DEPTH: - *params = (GLfloat) (ctx->ModelviewMatrixStack.Depth + 1); - break; - case GL_NAME_STACK_DEPTH: - *params = (GLfloat) ctx->Select.NameStackDepth; - break; - case GL_NORMALIZE: - *params = (GLfloat) ctx->Transform.Normalize; - break; - case GL_PACK_ALIGNMENT: - *params = (GLfloat) ctx->Pack.Alignment; - break; - case GL_PACK_LSB_FIRST: - *params = (GLfloat) ctx->Pack.LsbFirst; - break; - case GL_PACK_ROW_LENGTH: - *params = (GLfloat) ctx->Pack.RowLength; - break; - case GL_PACK_SKIP_PIXELS: - *params = (GLfloat) ctx->Pack.SkipPixels; - break; - case GL_PACK_SKIP_ROWS: - *params = (GLfloat) ctx->Pack.SkipRows; - break; - case GL_PACK_SWAP_BYTES: - *params = (GLfloat) ctx->Pack.SwapBytes; - break; - case GL_PACK_SKIP_IMAGES_EXT: - *params = (GLfloat) ctx->Pack.SkipImages; - break; - case GL_PACK_IMAGE_HEIGHT_EXT: - *params = (GLfloat) ctx->Pack.ImageHeight; - break; - case GL_PACK_INVERT_MESA: - *params = (GLfloat) ctx->Pack.Invert; - break; - case GL_PERSPECTIVE_CORRECTION_HINT: - *params = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection); - break; - case GL_PIXEL_MAP_A_TO_A_SIZE: - *params = (GLfloat) ctx->Pixel.MapAtoAsize; - break; - case GL_PIXEL_MAP_B_TO_B_SIZE: - *params = (GLfloat) ctx->Pixel.MapBtoBsize; - break; - case GL_PIXEL_MAP_G_TO_G_SIZE: - *params = (GLfloat) ctx->Pixel.MapGtoGsize; - break; - case GL_PIXEL_MAP_I_TO_A_SIZE: - *params = (GLfloat) ctx->Pixel.MapItoAsize; - break; - case GL_PIXEL_MAP_I_TO_B_SIZE: - *params = (GLfloat) ctx->Pixel.MapItoBsize; - break; - case GL_PIXEL_MAP_I_TO_G_SIZE: - *params = (GLfloat) ctx->Pixel.MapItoGsize; - break; - case GL_PIXEL_MAP_I_TO_I_SIZE: - *params = (GLfloat) ctx->Pixel.MapItoIsize; - break; - case GL_PIXEL_MAP_I_TO_R_SIZE: - *params = (GLfloat) ctx->Pixel.MapItoRsize; - break; - case GL_PIXEL_MAP_R_TO_R_SIZE: - *params = (GLfloat) ctx->Pixel.MapRtoRsize; - break; - case GL_PIXEL_MAP_S_TO_S_SIZE: - *params = (GLfloat) ctx->Pixel.MapStoSsize; - break; - case GL_POINT_SIZE: - *params = (GLfloat) ctx->Point.Size; - break; - case GL_POINT_SIZE_GRANULARITY: - *params = (GLfloat) ctx->Const.PointSizeGranularity; - break; - case GL_POINT_SIZE_RANGE: - params[0] = (GLfloat) ctx->Const.MinPointSizeAA; - params[1] = (GLfloat) ctx->Const.MaxPointSizeAA; - break; - case GL_ALIASED_POINT_SIZE_RANGE: - params[0] = (GLfloat) ctx->Const.MinPointSize; - params[1] = (GLfloat) ctx->Const.MaxPointSize; - break; - case GL_POINT_SMOOTH: - *params = (GLfloat) ctx->Point.SmoothFlag; - break; - case GL_POINT_SMOOTH_HINT: - *params = ENUM_TO_FLOAT(ctx->Hint.PointSmooth); - break; - case GL_POINT_SIZE_MIN_EXT: - *params = (GLfloat) (ctx->Point.MinSize); - break; - case GL_POINT_SIZE_MAX_EXT: - *params = (GLfloat) (ctx->Point.MaxSize); - break; - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - *params = (GLfloat) (ctx->Point.Threshold); - break; - case GL_DISTANCE_ATTENUATION_EXT: - params[0] = (GLfloat) (ctx->Point.Params[0]); - params[1] = (GLfloat) (ctx->Point.Params[1]); - params[2] = (GLfloat) (ctx->Point.Params[2]); - break; - case GL_POLYGON_MODE: - params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode); - params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode); - break; -#ifdef GL_EXT_polygon_offset - case GL_POLYGON_OFFSET_BIAS_EXT: - *params = ctx->Polygon.OffsetUnits; - break; -#endif - case GL_POLYGON_OFFSET_FACTOR: - *params = ctx->Polygon.OffsetFactor; - break; - case GL_POLYGON_OFFSET_UNITS: - *params = ctx->Polygon.OffsetUnits; - break; - case GL_POLYGON_SMOOTH: - *params = (GLfloat) ctx->Polygon.SmoothFlag; - break; - case GL_POLYGON_SMOOTH_HINT: - *params = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth); - break; - case GL_POLYGON_STIPPLE: - *params = (GLfloat) ctx->Polygon.StippleFlag; - break; - case GL_PROJECTION_MATRIX: - for (i=0;i<16;i++) { - params[i] = ctx->ProjectionMatrixStack.Top->m[i]; - } - break; - case GL_PROJECTION_STACK_DEPTH: - *params = (GLfloat) (ctx->ProjectionMatrixStack.Depth + 1); - break; - case GL_READ_BUFFER: - *params = ENUM_TO_FLOAT(ctx->Pixel.ReadBuffer); - break; - case GL_RED_BIAS: - *params = ctx->Pixel.RedBias; - break; - case GL_RED_BITS: - *params = (GLfloat) ctx->Visual.redBits; - break; - case GL_RED_SCALE: - *params = ctx->Pixel.RedScale; - break; - case GL_RENDER_MODE: - *params = ENUM_TO_FLOAT(ctx->RenderMode); - break; - case GL_RESCALE_NORMAL: - *params = (GLfloat) ctx->Transform.RescaleNormals; - break; - case GL_RGBA_MODE: - *params = (GLfloat) ctx->Visual.rgbMode; - break; - case GL_SCISSOR_BOX: - params[0] = (GLfloat) ctx->Scissor.X; - params[1] = (GLfloat) ctx->Scissor.Y; - params[2] = (GLfloat) ctx->Scissor.Width; - params[3] = (GLfloat) ctx->Scissor.Height; - break; - case GL_SCISSOR_TEST: - *params = (GLfloat) ctx->Scissor.Enabled; - break; - case GL_SELECTION_BUFFER_SIZE: - *params = (GLfloat) ctx->Select.BufferSize; - break; - case GL_SHADE_MODEL: - *params = ENUM_TO_FLOAT(ctx->Light.ShadeModel); - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - *params = (GLfloat) ctx->Texture.SharedPalette; - break; - case GL_STENCIL_BITS: - *params = (GLfloat) ctx->Visual.stencilBits; - break; - case GL_STENCIL_CLEAR_VALUE: - *params = (GLfloat) ctx->Stencil.Clear; - break; - case GL_STENCIL_FAIL: - *params = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_FUNC: - *params = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_FAIL: - *params = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_PASS_DEPTH_PASS: - *params = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]); - break; - case GL_STENCIL_REF: - *params = (GLfloat) ctx->Stencil.Ref[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_TEST: - *params = (GLfloat) ctx->Stencil.Enabled; - break; - case GL_STENCIL_VALUE_MASK: - *params = (GLfloat) ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_WRITEMASK: - *params = (GLfloat) ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]; - break; - case GL_STEREO: - *params = (GLfloat) ctx->Visual.stereoMode; - break; - case GL_SUBPIXEL_BITS: - *params = (GLfloat) ctx->Const.SubPixelBits; - break; - case GL_TEXTURE_1D: - *params = _mesa_IsEnabled(GL_TEXTURE_1D) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_2D: - *params = _mesa_IsEnabled(GL_TEXTURE_2D) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_3D: - *params = _mesa_IsEnabled(GL_TEXTURE_3D) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_BINDING_1D: - *params = (GLfloat) textureUnit->Current1D->Name; - break; - case GL_TEXTURE_BINDING_2D: - *params = (GLfloat) textureUnit->Current2D->Name; - break; - case GL_TEXTURE_BINDING_3D: - *params = (GLfloat) textureUnit->Current2D->Name; - break; - case GL_TEXTURE_ENV_COLOR: - params[0] = textureUnit->EnvColor[0]; - params[1] = textureUnit->EnvColor[1]; - params[2] = textureUnit->EnvColor[2]; - params[3] = textureUnit->EnvColor[3]; - break; - case GL_TEXTURE_ENV_MODE: - *params = ENUM_TO_FLOAT(textureUnit->EnvMode); - break; - case GL_TEXTURE_GEN_S: - *params = (textureUnit->TexGenEnabled & S_BIT) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_GEN_T: - *params = (textureUnit->TexGenEnabled & T_BIT) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_GEN_R: - *params = (textureUnit->TexGenEnabled & R_BIT) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_GEN_Q: - *params = (textureUnit->TexGenEnabled & Q_BIT) ? 1.0F : 0.0F; - break; - case GL_TEXTURE_MATRIX: - for (i=0;i<16;i++) { - params[i] = ctx->TextureMatrixStack[texUnit].Top->m[i]; - } - break; - case GL_TEXTURE_STACK_DEPTH: - *params = (GLfloat) (ctx->TextureMatrixStack[texUnit].Depth + 1); - break; - case GL_UNPACK_ALIGNMENT: - *params = (GLfloat) ctx->Unpack.Alignment; - break; - case GL_UNPACK_LSB_FIRST: - *params = (GLfloat) ctx->Unpack.LsbFirst; - break; - case GL_UNPACK_ROW_LENGTH: - *params = (GLfloat) ctx->Unpack.RowLength; - break; - case GL_UNPACK_SKIP_PIXELS: - *params = (GLfloat) ctx->Unpack.SkipPixels; - break; - case GL_UNPACK_SKIP_ROWS: - *params = (GLfloat) ctx->Unpack.SkipRows; - break; - case GL_UNPACK_SWAP_BYTES: - *params = (GLfloat) ctx->Unpack.SwapBytes; - break; - case GL_UNPACK_SKIP_IMAGES_EXT: - *params = (GLfloat) ctx->Unpack.SkipImages; - break; - case GL_UNPACK_IMAGE_HEIGHT_EXT: - *params = (GLfloat) ctx->Unpack.ImageHeight; - break; - case GL_UNPACK_CLIENT_STORAGE_APPLE: - *params = (GLfloat) ctx->Unpack.ClientStorage; - break; - case GL_VIEWPORT: - params[0] = (GLfloat) ctx->Viewport.X; - params[1] = (GLfloat) ctx->Viewport.Y; - params[2] = (GLfloat) ctx->Viewport.Width; - params[3] = (GLfloat) ctx->Viewport.Height; - break; - case GL_ZOOM_X: - *params = (GLfloat) ctx->Pixel.ZoomX; - break; - case GL_ZOOM_Y: - *params = (GLfloat) ctx->Pixel.ZoomY; - break; - case GL_VERTEX_ARRAY: - *params = (GLfloat) ctx->Array.Vertex.Enabled; - break; - case GL_VERTEX_ARRAY_SIZE: - *params = (GLfloat) ctx->Array.Vertex.Size; - break; - case GL_VERTEX_ARRAY_TYPE: - *params = ENUM_TO_FLOAT(ctx->Array.Vertex.Type); - break; - case GL_VERTEX_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.Vertex.Stride; - break; - case GL_VERTEX_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_NORMAL_ARRAY: - *params = (GLfloat) ctx->Array.Normal.Enabled; - break; - case GL_NORMAL_ARRAY_TYPE: - *params = ENUM_TO_FLOAT(ctx->Array.Normal.Type); - break; - case GL_NORMAL_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.Normal.Stride; - break; - case GL_NORMAL_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_COLOR_ARRAY: - *params = (GLfloat) ctx->Array.Color.Enabled; - break; - case GL_COLOR_ARRAY_SIZE: - *params = (GLfloat) ctx->Array.Color.Size; - break; - case GL_COLOR_ARRAY_TYPE: - *params = ENUM_TO_FLOAT(ctx->Array.Color.Type); - break; - case GL_COLOR_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.Color.Stride; - break; - case GL_COLOR_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_INDEX_ARRAY: - *params = (GLfloat) ctx->Array.Index.Enabled; - break; - case GL_INDEX_ARRAY_TYPE: - *params = ENUM_TO_FLOAT(ctx->Array.Index.Type); - break; - case GL_INDEX_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.Index.Stride; - break; - case GL_INDEX_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_TEXTURE_COORD_ARRAY: - *params = (GLfloat) ctx->Array.TexCoord[texUnit].Enabled; - break; - case GL_TEXTURE_COORD_ARRAY_SIZE: - *params = (GLfloat) ctx->Array.TexCoord[texUnit].Size; - break; - case GL_TEXTURE_COORD_ARRAY_TYPE: - *params = ENUM_TO_FLOAT(ctx->Array.TexCoord[texUnit].Type); - break; - case GL_TEXTURE_COORD_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.TexCoord[texUnit].Stride; - break; - case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: - *params = 0.0; - break; - case GL_EDGE_FLAG_ARRAY: - *params = (GLfloat) ctx->Array.EdgeFlag.Enabled; - break; - case GL_EDGE_FLAG_ARRAY_STRIDE: - *params = (GLfloat) ctx->Array.EdgeFlag.Stride; - break; - case GL_EDGE_FLAG_ARRAY_COUNT_EXT: - *params = 0.0; - break; - - /* GL_ARB_multitexture */ - case GL_MAX_TEXTURE_UNITS_ARB: - CHECK_EXTENSION_F(ARB_multitexture, pname); - *params = (GLfloat) ctx->Const.MaxTextureUnits; - break; - case GL_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_F(ARB_multitexture, pname); - *params = (GLfloat) (GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit); - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_F(ARB_multitexture, pname); - *params = (GLfloat) (GL_TEXTURE0_ARB + ctx->Array.ActiveTexture); - break; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - CHECK_EXTENSION_F(ARB_texture_cube_map, pname); - *params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); - break; - case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - CHECK_EXTENSION_F(ARB_texture_cube_map, pname); - *params = (GLfloat) textureUnit->CurrentCubeMap->Name; - break; - case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: - CHECK_EXTENSION_F(ARB_texture_cube_map, pname); - *params = (GLfloat) (1 << (ctx->Const.MaxCubeTextureLevels - 1)); - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - CHECK_EXTENSION_F(ARB_texture_compression, pname); - *params = (GLfloat) ctx->Hint.TextureCompression; - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_F(ARB_texture_compression, pname); - *params = (GLfloat) _mesa_get_compressed_formats(ctx, NULL); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_F(ARB_texture_compression, pname); - { - GLint formats[100]; - GLuint i, n; - n = _mesa_get_compressed_formats(ctx, formats); - for (i = 0; i < n; i++) - params[i] = (GLfloat) formats[i]; - } - break; - - /* GL_EXT_compiled_vertex_array */ - case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: - CHECK_EXTENSION_F(EXT_compiled_vertex_array, pname); - *params = (GLfloat) ctx->Array.LockFirst; - break; - case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT: - CHECK_EXTENSION_F(EXT_compiled_vertex_array, pname); - *params = (GLfloat) ctx->Array.LockCount; - break; - - /* GL_ARB_transpose_matrix */ - case GL_TRANSPOSE_COLOR_MATRIX_ARB: - _math_transposef(params, ctx->ColorMatrixStack.Top->m); - break; - case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB: - _math_transposef(params, ctx->ModelviewMatrixStack.Top->m); - break; - case GL_TRANSPOSE_PROJECTION_MATRIX_ARB: - _math_transposef(params, ctx->ProjectionMatrixStack.Top->m); - break; - case GL_TRANSPOSE_TEXTURE_MATRIX_ARB: - _math_transposef(params, ctx->TextureMatrixStack[texUnit].Top->m); - break; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION_F(HP_occlusion_test, pname); - *params = (GLfloat) ctx->Depth.OcclusionTest; - break; - case GL_OCCLUSION_TEST_RESULT_HP: - CHECK_EXTENSION_F(HP_occlusion_test, pname); - if (ctx->Depth.OcclusionTest) - *params = (GLfloat) ctx->OcclusionResult; - else - *params = (GLfloat) ctx->OcclusionResultSaved; - /* reset flag now */ - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - break; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - *params = (GLfloat) ctx->Pixel.PixelTextureEnabled; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - *params = (GLfloat) ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - *params = (GLfloat) pixel_texgen_mode(ctx); - break; - - /* GL_SGI_color_matrix (also in 1.2 imaging) */ - case GL_COLOR_MATRIX_SGI: - for (i=0;i<16;i++) { - params[i] = ctx->ColorMatrixStack.Top->m[i]; - } - break; - case GL_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = (GLfloat) (ctx->ColorMatrixStack.Depth + 1); - break; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI: - *params = (GLfloat) MAX_COLOR_STACK_DEPTH; - break; - case GL_POST_COLOR_MATRIX_RED_SCALE_SGI: - *params = ctx->Pixel.PostColorMatrixScale[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI: - *params = ctx->Pixel.PostColorMatrixScale[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI: - *params = ctx->Pixel.PostColorMatrixScale[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI: - *params = ctx->Pixel.PostColorMatrixScale[3]; - break; - case GL_POST_COLOR_MATRIX_RED_BIAS_SGI: - *params = ctx->Pixel.PostColorMatrixBias[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI: - *params = ctx->Pixel.PostColorMatrixBias[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI: - *params = ctx->Pixel.PostColorMatrixBias[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI: - *params = ctx->Pixel.PostColorMatrixBias[3]; - break; - - /* GL_EXT_convolution (also in 1.2 imaging) */ - case GL_CONVOLUTION_1D_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = (GLfloat) ctx->Pixel.Convolution1DEnabled; - break; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = (GLfloat) ctx->Pixel.Convolution2DEnabled; - break; - case GL_SEPARABLE_2D: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = (GLfloat) ctx->Pixel.Separable2DEnabled; - break; - case GL_POST_CONVOLUTION_RED_SCALE_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionScale[0]; - break; - case GL_POST_CONVOLUTION_GREEN_SCALE_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionScale[1]; - break; - case GL_POST_CONVOLUTION_BLUE_SCALE_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionScale[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionScale[3]; - break; - case GL_POST_CONVOLUTION_RED_BIAS_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionBias[0]; - break; - case GL_POST_CONVOLUTION_GREEN_BIAS_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionBias[1]; - break; - case GL_POST_CONVOLUTION_BLUE_BIAS_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionBias[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT: - CHECK_EXTENSION_F(EXT_convolution, pname); - *params = ctx->Pixel.PostConvolutionBias[2]; - break; - - /* GL_EXT_histogram (also in 1.2 imaging) */ - case GL_HISTOGRAM: - CHECK_EXTENSION_F(EXT_histogram, pname); - *params = (GLfloat) ctx->Pixel.HistogramEnabled; - break; - case GL_MINMAX: - CHECK_EXTENSION_F(EXT_histogram, pname); - *params = (GLfloat) ctx->Pixel.MinMaxEnabled; - break; - - /* GL_SGI_color_table (also in 1.2 imaging */ - case GL_COLOR_TABLE_SGI: - *params = (GLfloat) ctx->Pixel.ColorTableEnabled; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - *params = (GLfloat) ctx->Pixel.PostConvolutionColorTableEnabled; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - *params = (GLfloat) ctx->Pixel.PostColorMatrixColorTableEnabled; - break; - - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - *params = (GLfloat) ctx->Fog.ColorSumEnabled; - break; - case GL_CURRENT_SECONDARY_COLOR_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]; - params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]; - break; - case GL_SECONDARY_COLOR_ARRAY_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - *params = (GLfloat) ctx->Array.SecondaryColor.Enabled; - break; - case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - *params = (GLfloat) ctx->Array.SecondaryColor.Type; - break; - case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - *params = (GLfloat) ctx->Array.SecondaryColor.Stride; - break; - case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT: - CHECK_EXTENSION_F(EXT_secondary_color, pname); - *params = (GLfloat) ctx->Array.SecondaryColor.Size; - break; - - /* GL_EXT_fog_coord */ - case GL_CURRENT_FOG_COORDINATE_EXT: - CHECK_EXTENSION_F(EXT_fog_coord, pname); - FLUSH_CURRENT(ctx, 0); - *params = (GLfloat) ctx->Current.Attrib[VERT_ATTRIB_FOG][0]; - break; - case GL_FOG_COORDINATE_ARRAY_EXT: - CHECK_EXTENSION_F(EXT_fog_coord, pname); - *params = (GLfloat) ctx->Array.FogCoord.Enabled; - break; - case GL_FOG_COORDINATE_ARRAY_TYPE_EXT: - CHECK_EXTENSION_F(EXT_fog_coord, pname); - *params = (GLfloat) ctx->Array.FogCoord.Type; - break; - case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_F(EXT_fog_coord, pname); - *params = (GLfloat) ctx->Array.FogCoord.Stride; - break; - case GL_FOG_COORDINATE_SOURCE_EXT: - CHECK_EXTENSION_F(EXT_fog_coord, pname); - *params = (GLfloat) ctx->Fog.FogCoordinateSource; - break; - - /* GL_EXT_texture_lod_bias */ - case GL_MAX_TEXTURE_LOD_BIAS_EXT: - *params = ctx->Const.MaxTextureLodBias; - break; - - /* GL_EXT_texture_filter_anisotropic */ - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - CHECK_EXTENSION_F(EXT_texture_filter_anisotropic, pname); - *params = ctx->Const.MaxTextureMaxAnisotropy; - break; - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = (GLfloat) ctx->Multisample.Enabled; - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = (GLfloat) ctx->Multisample.SampleAlphaToCoverage; - break; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = (GLfloat) ctx->Multisample.SampleAlphaToOne; - break; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = (GLfloat) ctx->Multisample.SampleCoverage; - break; - case GL_SAMPLE_COVERAGE_VALUE_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = ctx->Multisample.SampleCoverageValue; - break; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = (GLfloat) ctx->Multisample.SampleCoverageInvert; - break; - case GL_SAMPLE_BUFFERS_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = 0.0; /* XXX fix someday */ - break; - case GL_SAMPLES_ARB: - CHECK_EXTENSION_F(ARB_multisample, pname); - *params = 0.0; /* XXX fix someday */ - break; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION_F(IBM_rasterpos_clip, pname); - *params = (GLfloat) ctx->Transform.RasterPositionUnclipped; - break; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLfloat) ctx->Point.PointSprite; - break; - case GL_POINT_SPRITE_R_MODE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLfloat) ctx->Point.SpriteRMode; - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - CHECK_EXTENSION_F(SGIS_generate_mipmap, pname); - *params = (GLfloat) ctx->Hint.GenerateMipmap; - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->VertexProgram.Enabled; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->VertexProgram.PointSizeEnabled; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->VertexProgram.TwoSideEnabled; - break; - case GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) MAX_PROGRAM_STACK_DEPTH; - break; - case GL_MAX_TRACK_MATRICES_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) MAX_PROGRAM_MATRICES; - break; - case GL_CURRENT_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->CurrentStack->Depth + 1; - break; - case GL_CURRENT_MATRIX_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - for (i = 0; i < 16; i++) - params[i] = ctx->CurrentStack->Top->m[i]; - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->VertexProgram.CurrentID; - break; - case GL_PROGRAM_ERROR_POSITION_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - *params = (GLfloat) ctx->VertexProgram.ErrorPos; - break; - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION_F(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_VERTEX_ATTRIB_ARRAY0_NV; - *params = (GLfloat) ctx->Array.VertexAttrib[n].Enabled; - } - break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP1_VERTEX_ATTRIB0_4_NV; - *params = (GLfloat) ctx->Eval.Map1Attrib[n]; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP2_VERTEX_ATTRIB0_4_NV; - *params = (GLfloat) ctx->Eval.Map2Attrib[n]; - } - break; - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION_F(NV_texture_rectangle, pname); - *params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV); - break; - case GL_TEXTURE_BINDING_RECTANGLE_NV: - CHECK_EXTENSION_F(NV_texture_rectangle, pname); - *params = (GLfloat) textureUnit->CurrentRect->Name; - break; - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - CHECK_EXTENSION_F(NV_texture_rectangle, pname); - *params = (GLfloat) ctx->Const.MaxTextureRectSize; - break; -#endif /* FEATURE_NV_vertex_program */ - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION_F(EXT_stencil_two_side, pname); - *params = (GLfloat) ctx->Stencil.TestTwoSide; - break; - case GL_ACTIVE_STENCIL_FACE_EXT: - CHECK_EXTENSION_F(EXT_stencil_two_side, pname); - *params = (GLfloat) (ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT); - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(0x%x)", pname); - } -} - - -void -_mesa_GetIntegerv( GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint i; - GLuint texUnit = ctx->Texture.CurrentUnit; - const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!params) - return; - - /* We need this in order to get correct results for - * GL_OCCLUSION_TEST_RESULT_HP. There might be other important cases. - */ - FLUSH_VERTICES(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetIntegerv %s\n", _mesa_lookup_enum_by_nr(pname)); - - if (ctx->Driver.GetIntegerv - && (*ctx->Driver.GetIntegerv)(ctx, pname, params)) - return; - - switch (pname) { - case GL_ACCUM_RED_BITS: - *params = (GLint) ctx->Visual.accumRedBits; - break; - case GL_ACCUM_GREEN_BITS: - *params = (GLint) ctx->Visual.accumGreenBits; - break; - case GL_ACCUM_BLUE_BITS: - *params = (GLint) ctx->Visual.accumBlueBits; - break; - case GL_ACCUM_ALPHA_BITS: - *params = (GLint) ctx->Visual.accumAlphaBits; - break; - case GL_ACCUM_CLEAR_VALUE: - params[0] = FLOAT_TO_INT( ctx->Accum.ClearColor[0] ); - params[1] = FLOAT_TO_INT( ctx->Accum.ClearColor[1] ); - params[2] = FLOAT_TO_INT( ctx->Accum.ClearColor[2] ); - params[3] = FLOAT_TO_INT( ctx->Accum.ClearColor[3] ); - break; - case GL_ALPHA_BIAS: - *params = (GLint) ctx->Pixel.AlphaBias; - break; - case GL_ALPHA_BITS: - *params = ctx->Visual.alphaBits; - break; - case GL_ALPHA_SCALE: - *params = (GLint) ctx->Pixel.AlphaScale; - break; - case GL_ALPHA_TEST: - *params = (GLint) ctx->Color.AlphaEnabled; - break; - case GL_ALPHA_TEST_REF: - *params = FLOAT_TO_INT(ctx->Color.AlphaRef); - break; - case GL_ALPHA_TEST_FUNC: - *params = (GLint) ctx->Color.AlphaFunc; - break; - case GL_ATTRIB_STACK_DEPTH: - *params = (GLint) (ctx->AttribStackDepth); - break; - case GL_AUTO_NORMAL: - *params = (GLint) ctx->Eval.AutoNormal; - break; - case GL_AUX_BUFFERS: - *params = (GLint) ctx->Const.NumAuxBuffers; - break; - case GL_BLEND: - *params = (GLint) ctx->Color.BlendEnabled; - break; - case GL_BLEND_DST: - *params = (GLint) ctx->Color.BlendDstRGB; - break; - case GL_BLEND_SRC: - *params = (GLint) ctx->Color.BlendSrcRGB; - break; - case GL_BLEND_SRC_RGB_EXT: - *params = (GLint) ctx->Color.BlendSrcRGB; - break; - case GL_BLEND_DST_RGB_EXT: - *params = (GLint) ctx->Color.BlendDstRGB; - break; - case GL_BLEND_SRC_ALPHA_EXT: - *params = (GLint) ctx->Color.BlendSrcA; - break; - case GL_BLEND_DST_ALPHA_EXT: - *params = (GLint) ctx->Color.BlendDstA; - break; - case GL_BLEND_EQUATION_EXT: - *params = (GLint) ctx->Color.BlendEquation; - break; - case GL_BLEND_COLOR_EXT: - params[0] = FLOAT_TO_INT( ctx->Color.BlendColor[0] ); - params[1] = FLOAT_TO_INT( ctx->Color.BlendColor[1] ); - params[2] = FLOAT_TO_INT( ctx->Color.BlendColor[2] ); - params[3] = FLOAT_TO_INT( ctx->Color.BlendColor[3] ); - break; - case GL_BLUE_BIAS: - *params = (GLint) ctx->Pixel.BlueBias; - break; - case GL_BLUE_BITS: - *params = (GLint) ctx->Visual.blueBits; - break; - case GL_BLUE_SCALE: - *params = (GLint) ctx->Pixel.BlueScale; - break; - case GL_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLint) (ctx->ClientAttribStackDepth); - break; - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - if (ctx->Transform.ClipPlanesEnabled & (1 << (pname - GL_CLIP_PLANE0))) - *params = 1; - else - *params = 0; - break; - case GL_COLOR_CLEAR_VALUE: - params[0] = FLOAT_TO_INT( (ctx->Color.ClearColor[0]) ); - params[1] = FLOAT_TO_INT( (ctx->Color.ClearColor[1]) ); - params[2] = FLOAT_TO_INT( (ctx->Color.ClearColor[2]) ); - params[3] = FLOAT_TO_INT( (ctx->Color.ClearColor[3]) ); - break; - case GL_COLOR_MATERIAL: - *params = (GLint) ctx->Light.ColorMaterialEnabled; - break; - case GL_COLOR_MATERIAL_FACE: - *params = (GLint) ctx->Light.ColorMaterialFace; - break; - case GL_COLOR_MATERIAL_PARAMETER: - *params = (GLint) ctx->Light.ColorMaterialMode; - break; - case GL_COLOR_WRITEMASK: - params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0; - params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0; - params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0; - params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0; - break; - case GL_CULL_FACE: - *params = (GLint) ctx->Polygon.CullFlag; - break; - case GL_CULL_FACE_MODE: - *params = (GLint) ctx->Polygon.CullFaceMode; - break; - case GL_CURRENT_COLOR: - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]); - params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]); - params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]); - params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]); - break; - case GL_CURRENT_INDEX: - FLUSH_CURRENT(ctx, 0); - *params = (GLint) ctx->Current.Index; - break; - case GL_CURRENT_NORMAL: - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]); - params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]); - params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]); - break; - case GL_CURRENT_RASTER_COLOR: - params[0] = FLOAT_TO_INT( ctx->Current.RasterColor[0] ); - params[1] = FLOAT_TO_INT( ctx->Current.RasterColor[1] ); - params[2] = FLOAT_TO_INT( ctx->Current.RasterColor[2] ); - params[3] = FLOAT_TO_INT( ctx->Current.RasterColor[3] ); - break; - case GL_CURRENT_RASTER_DISTANCE: - params[0] = (GLint) ctx->Current.RasterDistance; - break; - case GL_CURRENT_RASTER_INDEX: - *params = (GLint) ctx->Current.RasterIndex; - break; - case GL_CURRENT_RASTER_POSITION: - params[0] = (GLint) ctx->Current.RasterPos[0]; - params[1] = (GLint) ctx->Current.RasterPos[1]; - params[2] = (GLint) ctx->Current.RasterPos[2]; - params[3] = (GLint) ctx->Current.RasterPos[3]; - break; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - params[0] = (GLint) ctx->Current.RasterTexCoords[texUnit][0]; - params[1] = (GLint) ctx->Current.RasterTexCoords[texUnit][1]; - params[2] = (GLint) ctx->Current.RasterTexCoords[texUnit][2]; - params[3] = (GLint) ctx->Current.RasterTexCoords[texUnit][3]; - break; - case GL_CURRENT_RASTER_POSITION_VALID: - *params = (GLint) ctx->Current.RasterPosValid; - break; - case GL_CURRENT_TEXTURE_COORDS: - FLUSH_CURRENT(ctx, 0); - params[0] = (GLint) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]; - params[1] = (GLint) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]; - params[2] = (GLint) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]; - params[3] = (GLint) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]; - break; - case GL_DEPTH_BIAS: - *params = (GLint) ctx->Pixel.DepthBias; - break; - case GL_DEPTH_BITS: - *params = ctx->Visual.depthBits; - break; - case GL_DEPTH_CLEAR_VALUE: - *params = (GLint) ctx->Depth.Clear; - break; - case GL_DEPTH_FUNC: - *params = (GLint) ctx->Depth.Func; - break; - case GL_DEPTH_RANGE: - params[0] = (GLint) ctx->Viewport.Near; - params[1] = (GLint) ctx->Viewport.Far; - break; - case GL_DEPTH_SCALE: - *params = (GLint) ctx->Pixel.DepthScale; - break; - case GL_DEPTH_TEST: - *params = (GLint) ctx->Depth.Test; - break; - case GL_DEPTH_WRITEMASK: - *params = (GLint) ctx->Depth.Mask; - break; - case GL_DITHER: - *params = (GLint) ctx->Color.DitherFlag; - break; - case GL_DOUBLEBUFFER: - *params = (GLint) ctx->Visual.doubleBufferMode; - break; - case GL_DRAW_BUFFER: - *params = (GLint) ctx->Color.DrawBuffer; - break; - case GL_EDGE_FLAG: - FLUSH_CURRENT(ctx, 0); - *params = (GLint) ctx->Current.EdgeFlag; - break; - case GL_FEEDBACK_BUFFER_SIZE: - *params = ctx->Feedback.BufferSize; - break; - case GL_FEEDBACK_BUFFER_TYPE: - *params = ctx->Feedback.Type; - break; - case GL_FOG: - *params = (GLint) ctx->Fog.Enabled; - break; - case GL_FOG_COLOR: - params[0] = FLOAT_TO_INT( ctx->Fog.Color[0] ); - params[1] = FLOAT_TO_INT( ctx->Fog.Color[1] ); - params[2] = FLOAT_TO_INT( ctx->Fog.Color[2] ); - params[3] = FLOAT_TO_INT( ctx->Fog.Color[3] ); - break; - case GL_FOG_DENSITY: - *params = (GLint) ctx->Fog.Density; - break; - case GL_FOG_END: - *params = (GLint) ctx->Fog.End; - break; - case GL_FOG_HINT: - *params = (GLint) ctx->Hint.Fog; - break; - case GL_FOG_INDEX: - *params = (GLint) ctx->Fog.Index; - break; - case GL_FOG_MODE: - *params = (GLint) ctx->Fog.Mode; - break; - case GL_FOG_START: - *params = (GLint) ctx->Fog.Start; - break; - case GL_FRONT_FACE: - *params = (GLint) ctx->Polygon.FrontFace; - break; - case GL_GREEN_BIAS: - *params = (GLint) ctx->Pixel.GreenBias; - break; - case GL_GREEN_BITS: - *params = (GLint) ctx->Visual.greenBits; - break; - case GL_GREEN_SCALE: - *params = (GLint) ctx->Pixel.GreenScale; - break; - case GL_INDEX_BITS: - *params = (GLint) ctx->Visual.indexBits; - break; - case GL_INDEX_CLEAR_VALUE: - *params = (GLint) ctx->Color.ClearIndex; - break; - case GL_INDEX_MODE: - *params = ctx->Visual.rgbMode ? 0 : 1; - break; - case GL_INDEX_OFFSET: - *params = ctx->Pixel.IndexOffset; - break; - case GL_INDEX_SHIFT: - *params = ctx->Pixel.IndexShift; - break; - case GL_INDEX_WRITEMASK: - *params = (GLint) ctx->Color.IndexMask; - break; - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - *params = (GLint) ctx->Light.Light[pname-GL_LIGHT0].Enabled; - break; - case GL_LIGHTING: - *params = (GLint) ctx->Light.Enabled; - break; - case GL_LIGHT_MODEL_AMBIENT: - params[0] = FLOAT_TO_INT( ctx->Light.Model.Ambient[0] ); - params[1] = FLOAT_TO_INT( ctx->Light.Model.Ambient[1] ); - params[2] = FLOAT_TO_INT( ctx->Light.Model.Ambient[2] ); - params[3] = FLOAT_TO_INT( ctx->Light.Model.Ambient[3] ); - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - params[0] = (GLint) ctx->Light.Model.ColorControl; - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - *params = (GLint) ctx->Light.Model.LocalViewer; - break; - case GL_LIGHT_MODEL_TWO_SIDE: - *params = (GLint) ctx->Light.Model.TwoSide; - break; - case GL_LINE_SMOOTH: - *params = (GLint) ctx->Line.SmoothFlag; - break; - case GL_LINE_SMOOTH_HINT: - *params = (GLint) ctx->Hint.LineSmooth; - break; - case GL_LINE_STIPPLE: - *params = (GLint) ctx->Line.StippleFlag; - break; - case GL_LINE_STIPPLE_PATTERN: - *params = (GLint) ctx->Line.StipplePattern; - break; - case GL_LINE_STIPPLE_REPEAT: - *params = (GLint) ctx->Line.StippleFactor; - break; - case GL_LINE_WIDTH: - *params = (GLint) ctx->Line.Width; - break; - case GL_LINE_WIDTH_GRANULARITY: - *params = (GLint) ctx->Const.LineWidthGranularity; - break; - case GL_LINE_WIDTH_RANGE: - params[0] = (GLint) ctx->Const.MinLineWidthAA; - params[1] = (GLint) ctx->Const.MaxLineWidthAA; - break; - case GL_ALIASED_LINE_WIDTH_RANGE: - params[0] = (GLint) ctx->Const.MinLineWidth; - params[1] = (GLint) ctx->Const.MaxLineWidth; - break; - case GL_LIST_BASE: - *params = (GLint) ctx->List.ListBase; - break; - case GL_LIST_INDEX: - *params = (GLint) ctx->CurrentListNum; - break; - case GL_LIST_MODE: - if (!ctx->CompileFlag) - *params = 0; - else if (ctx->ExecuteFlag) - *params = (GLint) GL_COMPILE_AND_EXECUTE; - else - *params = (GLint) GL_COMPILE; - break; - case GL_INDEX_LOGIC_OP: - *params = (GLint) ctx->Color.IndexLogicOpEnabled; - break; - case GL_COLOR_LOGIC_OP: - *params = (GLint) ctx->Color.ColorLogicOpEnabled; - break; - case GL_LOGIC_OP_MODE: - *params = (GLint) ctx->Color.LogicOp; - break; - case GL_MAP1_COLOR_4: - *params = (GLint) ctx->Eval.Map1Color4; - break; - case GL_MAP1_GRID_DOMAIN: - params[0] = (GLint) ctx->Eval.MapGrid1u1; - params[1] = (GLint) ctx->Eval.MapGrid1u2; - break; - case GL_MAP1_GRID_SEGMENTS: - *params = (GLint) ctx->Eval.MapGrid1un; - break; - case GL_MAP1_INDEX: - *params = (GLint) ctx->Eval.Map1Index; - break; - case GL_MAP1_NORMAL: - *params = (GLint) ctx->Eval.Map1Normal; - break; - case GL_MAP1_TEXTURE_COORD_1: - *params = (GLint) ctx->Eval.Map1TextureCoord1; - break; - case GL_MAP1_TEXTURE_COORD_2: - *params = (GLint) ctx->Eval.Map1TextureCoord2; - break; - case GL_MAP1_TEXTURE_COORD_3: - *params = (GLint) ctx->Eval.Map1TextureCoord3; - break; - case GL_MAP1_TEXTURE_COORD_4: - *params = (GLint) ctx->Eval.Map1TextureCoord4; - break; - case GL_MAP1_VERTEX_3: - *params = (GLint) ctx->Eval.Map1Vertex3; - break; - case GL_MAP1_VERTEX_4: - *params = (GLint) ctx->Eval.Map1Vertex4; - break; - case GL_MAP2_COLOR_4: - *params = (GLint) ctx->Eval.Map2Color4; - break; - case GL_MAP2_GRID_DOMAIN: - params[0] = (GLint) ctx->Eval.MapGrid2u1; - params[1] = (GLint) ctx->Eval.MapGrid2u2; - params[2] = (GLint) ctx->Eval.MapGrid2v1; - params[3] = (GLint) ctx->Eval.MapGrid2v2; - break; - case GL_MAP2_GRID_SEGMENTS: - params[0] = (GLint) ctx->Eval.MapGrid2un; - params[1] = (GLint) ctx->Eval.MapGrid2vn; - break; - case GL_MAP2_INDEX: - *params = (GLint) ctx->Eval.Map2Index; - break; - case GL_MAP2_NORMAL: - *params = (GLint) ctx->Eval.Map2Normal; - break; - case GL_MAP2_TEXTURE_COORD_1: - *params = (GLint) ctx->Eval.Map2TextureCoord1; - break; - case GL_MAP2_TEXTURE_COORD_2: - *params = (GLint) ctx->Eval.Map2TextureCoord2; - break; - case GL_MAP2_TEXTURE_COORD_3: - *params = (GLint) ctx->Eval.Map2TextureCoord3; - break; - case GL_MAP2_TEXTURE_COORD_4: - *params = (GLint) ctx->Eval.Map2TextureCoord4; - break; - case GL_MAP2_VERTEX_3: - *params = (GLint) ctx->Eval.Map2Vertex3; - break; - case GL_MAP2_VERTEX_4: - *params = (GLint) ctx->Eval.Map2Vertex4; - break; - case GL_MAP_COLOR: - *params = (GLint) ctx->Pixel.MapColorFlag; - break; - case GL_MAP_STENCIL: - *params = (GLint) ctx->Pixel.MapStencilFlag; - break; - case GL_MATRIX_MODE: - *params = (GLint) ctx->Transform.MatrixMode; - break; - case GL_MAX_ATTRIB_STACK_DEPTH: - *params = (GLint) MAX_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - *params = (GLint) MAX_CLIENT_ATTRIB_STACK_DEPTH; - break; - case GL_MAX_CLIP_PLANES: - *params = (GLint) ctx->Const.MaxClipPlanes; - break; - case GL_MAX_ELEMENTS_VERTICES: /* GL_VERSION_1_2 */ - *params = (GLint) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_ELEMENTS_INDICES: /* GL_VERSION_1_2 */ - *params = (GLint) ctx->Const.MaxArrayLockSize; - break; - case GL_MAX_EVAL_ORDER: - *params = (GLint) MAX_EVAL_ORDER; - break; - case GL_MAX_LIGHTS: - *params = (GLint) ctx->Const.MaxLights; - break; - case GL_MAX_LIST_NESTING: - *params = (GLint) MAX_LIST_NESTING; - break; - case GL_MAX_MODELVIEW_STACK_DEPTH: - *params = (GLint) MAX_MODELVIEW_STACK_DEPTH; - break; - case GL_MAX_NAME_STACK_DEPTH: - *params = (GLint) MAX_NAME_STACK_DEPTH; - break; - case GL_MAX_PIXEL_MAP_TABLE: - *params = (GLint) MAX_PIXEL_MAP_TABLE; - break; - case GL_MAX_PROJECTION_STACK_DEPTH: - *params = (GLint) MAX_PROJECTION_STACK_DEPTH; - break; - case GL_MAX_TEXTURE_SIZE: - *params = (1 << (ctx->Const.MaxTextureLevels - 1)); - break; - case GL_MAX_3D_TEXTURE_SIZE: - *params = (1 << (ctx->Const.Max3DTextureLevels - 1)); - break; - case GL_MAX_TEXTURE_STACK_DEPTH: - *params = (GLint) MAX_TEXTURE_STACK_DEPTH; - break; - case GL_MAX_VIEWPORT_DIMS: - params[0] = (GLint) MAX_WIDTH; - params[1] = (GLint) MAX_HEIGHT; - break; - case GL_MODELVIEW_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLint) ctx->ModelviewMatrixStack.Top->m[i]; - } - break; - case GL_MODELVIEW_STACK_DEPTH: - *params = (GLint) (ctx->ModelviewMatrixStack.Depth + 1); - break; - case GL_NAME_STACK_DEPTH: - *params = (GLint) ctx->Select.NameStackDepth; - break; - case GL_NORMALIZE: - *params = (GLint) ctx->Transform.Normalize; - break; - case GL_PACK_ALIGNMENT: - *params = ctx->Pack.Alignment; - break; - case GL_PACK_LSB_FIRST: - *params = (GLint) ctx->Pack.LsbFirst; - break; - case GL_PACK_ROW_LENGTH: - *params = ctx->Pack.RowLength; - break; - case GL_PACK_SKIP_PIXELS: - *params = ctx->Pack.SkipPixels; - break; - case GL_PACK_SKIP_ROWS: - *params = ctx->Pack.SkipRows; - break; - case GL_PACK_SWAP_BYTES: - *params = (GLint) ctx->Pack.SwapBytes; - break; - case GL_PACK_SKIP_IMAGES_EXT: - *params = ctx->Pack.SkipImages; - break; - case GL_PACK_IMAGE_HEIGHT_EXT: - *params = ctx->Pack.ImageHeight; - break; - case GL_PACK_INVERT_MESA: - *params = ctx->Pack.Invert; - break; - case GL_PERSPECTIVE_CORRECTION_HINT: - *params = (GLint) ctx->Hint.PerspectiveCorrection; - break; - case GL_PIXEL_MAP_A_TO_A_SIZE: - *params = ctx->Pixel.MapAtoAsize; - break; - case GL_PIXEL_MAP_B_TO_B_SIZE: - *params = ctx->Pixel.MapBtoBsize; - break; - case GL_PIXEL_MAP_G_TO_G_SIZE: - *params = ctx->Pixel.MapGtoGsize; - break; - case GL_PIXEL_MAP_I_TO_A_SIZE: - *params = ctx->Pixel.MapItoAsize; - break; - case GL_PIXEL_MAP_I_TO_B_SIZE: - *params = ctx->Pixel.MapItoBsize; - break; - case GL_PIXEL_MAP_I_TO_G_SIZE: - *params = ctx->Pixel.MapItoGsize; - break; - case GL_PIXEL_MAP_I_TO_I_SIZE: - *params = ctx->Pixel.MapItoIsize; - break; - case GL_PIXEL_MAP_I_TO_R_SIZE: - *params = ctx->Pixel.MapItoRsize; - break; - case GL_PIXEL_MAP_R_TO_R_SIZE: - *params = ctx->Pixel.MapRtoRsize; - break; - case GL_PIXEL_MAP_S_TO_S_SIZE: - *params = ctx->Pixel.MapStoSsize; - break; - case GL_POINT_SIZE: - *params = (GLint) ctx->Point.Size; - break; - case GL_POINT_SIZE_GRANULARITY: - *params = (GLint) ctx->Const.PointSizeGranularity; - break; - case GL_POINT_SIZE_RANGE: - params[0] = (GLint) ctx->Const.MinPointSizeAA; - params[1] = (GLint) ctx->Const.MaxPointSizeAA; - break; - case GL_ALIASED_POINT_SIZE_RANGE: - params[0] = (GLint) ctx->Const.MinPointSize; - params[1] = (GLint) ctx->Const.MaxPointSize; - break; - case GL_POINT_SMOOTH: - *params = (GLint) ctx->Point.SmoothFlag; - break; - case GL_POINT_SMOOTH_HINT: - *params = (GLint) ctx->Hint.PointSmooth; - break; - case GL_POINT_SIZE_MIN_EXT: - *params = (GLint) (ctx->Point.MinSize); - break; - case GL_POINT_SIZE_MAX_EXT: - *params = (GLint) (ctx->Point.MaxSize); - break; - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - *params = (GLint) (ctx->Point.Threshold); - break; - case GL_DISTANCE_ATTENUATION_EXT: - params[0] = (GLint) (ctx->Point.Params[0]); - params[1] = (GLint) (ctx->Point.Params[1]); - params[2] = (GLint) (ctx->Point.Params[2]); - break; - case GL_POLYGON_MODE: - params[0] = (GLint) ctx->Polygon.FrontMode; - params[1] = (GLint) ctx->Polygon.BackMode; - break; - case GL_POLYGON_OFFSET_BIAS_EXT: /* GL_EXT_polygon_offset */ - *params = (GLint) ctx->Polygon.OffsetUnits; - break; - case GL_POLYGON_OFFSET_FACTOR: - *params = (GLint) ctx->Polygon.OffsetFactor; - break; - case GL_POLYGON_OFFSET_UNITS: - *params = (GLint) ctx->Polygon.OffsetUnits; - break; - case GL_POLYGON_SMOOTH: - *params = (GLint) ctx->Polygon.SmoothFlag; - break; - case GL_POLYGON_SMOOTH_HINT: - *params = (GLint) ctx->Hint.PolygonSmooth; - break; - case GL_POLYGON_STIPPLE: - *params = (GLint) ctx->Polygon.StippleFlag; - break; - case GL_PROJECTION_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLint) ctx->ProjectionMatrixStack.Top->m[i]; - } - break; - case GL_PROJECTION_STACK_DEPTH: - *params = (GLint) (ctx->ProjectionMatrixStack.Depth + 1); - break; - case GL_READ_BUFFER: - *params = (GLint) ctx->Pixel.ReadBuffer; - break; - case GL_RED_BIAS: - *params = (GLint) ctx->Pixel.RedBias; - break; - case GL_RED_BITS: - *params = (GLint) ctx->Visual.redBits; - break; - case GL_RED_SCALE: - *params = (GLint) ctx->Pixel.RedScale; - break; - case GL_RENDER_MODE: - *params = (GLint) ctx->RenderMode; - break; - case GL_RESCALE_NORMAL: - *params = (GLint) ctx->Transform.RescaleNormals; - break; - case GL_RGBA_MODE: - *params = (GLint) ctx->Visual.rgbMode; - break; - case GL_SCISSOR_BOX: - params[0] = (GLint) ctx->Scissor.X; - params[1] = (GLint) ctx->Scissor.Y; - params[2] = (GLint) ctx->Scissor.Width; - params[3] = (GLint) ctx->Scissor.Height; - break; - case GL_SCISSOR_TEST: - *params = (GLint) ctx->Scissor.Enabled; - break; - case GL_SELECTION_BUFFER_SIZE: - *params = (GLint) ctx->Select.BufferSize; - break; - case GL_SHADE_MODEL: - *params = (GLint) ctx->Light.ShadeModel; - break; - case GL_SHARED_TEXTURE_PALETTE_EXT: - *params = (GLint) ctx->Texture.SharedPalette; - break; - case GL_STENCIL_BITS: - *params = ctx->Visual.stencilBits; - break; - case GL_STENCIL_CLEAR_VALUE: - *params = (GLint) ctx->Stencil.Clear; - break; - case GL_STENCIL_FAIL: - *params = (GLint) ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_FUNC: - *params = (GLint) ctx->Stencil.Function[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_PASS_DEPTH_FAIL: - *params = (GLint) ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_PASS_DEPTH_PASS: - *params = (GLint) ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_REF: - *params = (GLint) ctx->Stencil.Ref[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_TEST: - *params = (GLint) ctx->Stencil.Enabled; - break; - case GL_STENCIL_VALUE_MASK: - *params = (GLint) ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_WRITEMASK: - *params = (GLint) ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]; - break; - case GL_STEREO: - *params = (GLint) ctx->Visual.stereoMode; - break; - case GL_SUBPIXEL_BITS: - *params = ctx->Const.SubPixelBits; - break; - case GL_TEXTURE_1D: - *params = _mesa_IsEnabled(GL_TEXTURE_1D) ? 1 : 0; - break; - case GL_TEXTURE_2D: - *params = _mesa_IsEnabled(GL_TEXTURE_2D) ? 1 : 0; - break; - case GL_TEXTURE_3D: - *params = _mesa_IsEnabled(GL_TEXTURE_3D) ? 1 : 0; - break; - case GL_TEXTURE_BINDING_1D: - *params = textureUnit->Current1D->Name; - break; - case GL_TEXTURE_BINDING_2D: - *params = textureUnit->Current2D->Name; - break; - case GL_TEXTURE_BINDING_3D: - *params = textureUnit->Current3D->Name; - break; - case GL_TEXTURE_ENV_COLOR: - params[0] = FLOAT_TO_INT( textureUnit->EnvColor[0] ); - params[1] = FLOAT_TO_INT( textureUnit->EnvColor[1] ); - params[2] = FLOAT_TO_INT( textureUnit->EnvColor[2] ); - params[3] = FLOAT_TO_INT( textureUnit->EnvColor[3] ); - break; - case GL_TEXTURE_ENV_MODE: - *params = (GLint) textureUnit->EnvMode; - break; - case GL_TEXTURE_GEN_S: - *params = (textureUnit->TexGenEnabled & S_BIT) ? 1 : 0; - break; - case GL_TEXTURE_GEN_T: - *params = (textureUnit->TexGenEnabled & T_BIT) ? 1 : 0; - break; - case GL_TEXTURE_GEN_R: - *params = (textureUnit->TexGenEnabled & R_BIT) ? 1 : 0; - break; - case GL_TEXTURE_GEN_Q: - *params = (textureUnit->TexGenEnabled & Q_BIT) ? 1 : 0; - break; - case GL_TEXTURE_MATRIX: - for (i=0;i<16;i++) { - params[i] = (GLint) ctx->TextureMatrixStack[texUnit].Top->m[i]; - } - break; - case GL_TEXTURE_STACK_DEPTH: - *params = (GLint) (ctx->TextureMatrixStack[texUnit].Depth + 1); - break; - case GL_UNPACK_ALIGNMENT: - *params = ctx->Unpack.Alignment; - break; - case GL_UNPACK_LSB_FIRST: - *params = (GLint) ctx->Unpack.LsbFirst; - break; - case GL_UNPACK_ROW_LENGTH: - *params = ctx->Unpack.RowLength; - break; - case GL_UNPACK_SKIP_PIXELS: - *params = ctx->Unpack.SkipPixels; - break; - case GL_UNPACK_SKIP_ROWS: - *params = ctx->Unpack.SkipRows; - break; - case GL_UNPACK_SWAP_BYTES: - *params = (GLint) ctx->Unpack.SwapBytes; - break; - case GL_UNPACK_SKIP_IMAGES_EXT: - *params = ctx->Unpack.SkipImages; - break; - case GL_UNPACK_IMAGE_HEIGHT_EXT: - *params = ctx->Unpack.ImageHeight; - break; - case GL_UNPACK_CLIENT_STORAGE_APPLE: - *params = ctx->Unpack.ClientStorage; - break; - case GL_VIEWPORT: - params[0] = (GLint) ctx->Viewport.X; - params[1] = (GLint) ctx->Viewport.Y; - params[2] = (GLint) ctx->Viewport.Width; - params[3] = (GLint) ctx->Viewport.Height; - break; - case GL_ZOOM_X: - *params = (GLint) ctx->Pixel.ZoomX; - break; - case GL_ZOOM_Y: - *params = (GLint) ctx->Pixel.ZoomY; - break; - case GL_VERTEX_ARRAY: - *params = (GLint) ctx->Array.Vertex.Enabled; - break; - case GL_VERTEX_ARRAY_SIZE: - *params = ctx->Array.Vertex.Size; - break; - case GL_VERTEX_ARRAY_TYPE: - *params = ctx->Array.Vertex.Type; - break; - case GL_VERTEX_ARRAY_STRIDE: - *params = ctx->Array.Vertex.Stride; - break; - case GL_VERTEX_ARRAY_COUNT_EXT: - *params = 0; - break; - case GL_NORMAL_ARRAY: - *params = (GLint) ctx->Array.Normal.Enabled; - break; - case GL_NORMAL_ARRAY_TYPE: - *params = ctx->Array.Normal.Type; - break; - case GL_NORMAL_ARRAY_STRIDE: - *params = ctx->Array.Normal.Stride; - break; - case GL_NORMAL_ARRAY_COUNT_EXT: - *params = 0; - break; - case GL_COLOR_ARRAY: - *params = (GLint) ctx->Array.Color.Enabled; - break; - case GL_COLOR_ARRAY_SIZE: - *params = ctx->Array.Color.Size; - break; - case GL_COLOR_ARRAY_TYPE: - *params = ctx->Array.Color.Type; - break; - case GL_COLOR_ARRAY_STRIDE: - *params = ctx->Array.Color.Stride; - break; - case GL_COLOR_ARRAY_COUNT_EXT: - *params = 0; - break; - case GL_INDEX_ARRAY: - *params = (GLint) ctx->Array.Index.Enabled; - break; - case GL_INDEX_ARRAY_TYPE: - *params = ctx->Array.Index.Type; - break; - case GL_INDEX_ARRAY_STRIDE: - *params = ctx->Array.Index.Stride; - break; - case GL_INDEX_ARRAY_COUNT_EXT: - *params = 0; - break; - case GL_TEXTURE_COORD_ARRAY: - *params = (GLint) ctx->Array.TexCoord[texUnit].Enabled; - break; - case GL_TEXTURE_COORD_ARRAY_SIZE: - *params = ctx->Array.TexCoord[texUnit].Size; - break; - case GL_TEXTURE_COORD_ARRAY_TYPE: - *params = ctx->Array.TexCoord[texUnit].Type; - break; - case GL_TEXTURE_COORD_ARRAY_STRIDE: - *params = ctx->Array.TexCoord[texUnit].Stride; - break; - case GL_TEXTURE_COORD_ARRAY_COUNT_EXT: - *params = 0; - break; - case GL_EDGE_FLAG_ARRAY: - *params = (GLint) ctx->Array.EdgeFlag.Enabled; - break; - case GL_EDGE_FLAG_ARRAY_STRIDE: - *params = ctx->Array.EdgeFlag.Stride; - break; - case GL_EDGE_FLAG_ARRAY_COUNT_EXT: - *params = 0; - break; - - /* GL_ARB_multitexture */ - case GL_MAX_TEXTURE_UNITS_ARB: - CHECK_EXTENSION_I(ARB_multitexture, pname); - *params = ctx->Const.MaxTextureUnits; - break; - case GL_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_I(ARB_multitexture, pname); - *params = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit; - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - CHECK_EXTENSION_I(ARB_multitexture, pname); - *params = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture; - break; - - /* GL_ARB_texture_cube_map */ - case GL_TEXTURE_CUBE_MAP_ARB: - CHECK_EXTENSION_I(ARB_texture_cube_map, pname); - *params = (GLint) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB); - break; - case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - CHECK_EXTENSION_I(ARB_texture_cube_map, pname); - *params = textureUnit->CurrentCubeMap->Name; - break; - case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: - CHECK_EXTENSION_I(ARB_texture_cube_map, pname); - *params = (1 << (ctx->Const.MaxCubeTextureLevels - 1)); - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - CHECK_EXTENSION_I(ARB_texture_compression, pname); - *params = (GLint) ctx->Hint.TextureCompression; - break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_I(ARB_texture_compression, pname); - *params = (GLint) _mesa_get_compressed_formats(ctx, NULL); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - CHECK_EXTENSION_I(ARB_texture_compression, pname); - (void) _mesa_get_compressed_formats(ctx, params); - break; - - /* GL_EXT_compiled_vertex_array */ - case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: - CHECK_EXTENSION_I(EXT_compiled_vertex_array, pname); - *params = ctx->Array.LockFirst; - break; - case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT: - CHECK_EXTENSION_I(EXT_compiled_vertex_array, pname); - *params = ctx->Array.LockCount; - break; - - /* GL_ARB_transpose_matrix */ - case GL_TRANSPOSE_COLOR_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ColorMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLint) tm[i]; - } - } - break; - case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ModelviewMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLint) tm[i]; - } - } - break; - case GL_TRANSPOSE_PROJECTION_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->ProjectionMatrixStack.Top->m); - for (i=0;i<16;i++) { - params[i] = (GLint) tm[i]; - } - } - break; - case GL_TRANSPOSE_TEXTURE_MATRIX_ARB: - { - GLfloat tm[16]; - GLuint i; - _math_transposef(tm, ctx->TextureMatrixStack[texUnit].Top->m); - for (i=0;i<16;i++) { - params[i] = (GLint) tm[i]; - } - } - break; - - /* GL_HP_occlusion_test */ - case GL_OCCLUSION_TEST_HP: - CHECK_EXTENSION_I(HP_occlusion_test, pname); - *params = (GLint) ctx->Depth.OcclusionTest; - break; - case GL_OCCLUSION_TEST_RESULT_HP: - CHECK_EXTENSION_I(HP_occlusion_test, pname); - if (ctx->Depth.OcclusionTest) - *params = (GLint) ctx->OcclusionResult; - else - *params = (GLint) ctx->OcclusionResultSaved; - /* reset flag now */ - ctx->OcclusionResult = GL_FALSE; - ctx->OcclusionResultSaved = GL_FALSE; - break; - - /* GL_SGIS_pixel_texture */ - case GL_PIXEL_TEXTURE_SGIS: - CHECK_EXTENSION_I(SGIS_pixel_texture, pname); - *params = (GLint) ctx->Pixel.PixelTextureEnabled; - break; - - /* GL_SGIX_pixel_texture */ - case GL_PIXEL_TEX_GEN_SGIX: - CHECK_EXTENSION_I(SGIX_pixel_texture, pname); - *params = (GLint) ctx->Pixel.PixelTextureEnabled; - break; - case GL_PIXEL_TEX_GEN_MODE_SGIX: - CHECK_EXTENSION_I(SGIX_pixel_texture, pname); - *params = (GLint) pixel_texgen_mode(ctx); - break; - - /* GL_SGI_color_matrix (also in 1.2 imaging) */ - case GL_COLOR_MATRIX_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - for (i=0;i<16;i++) { - params[i] = (GLint) ctx->ColorMatrixStack.Top->m[i]; - } - break; - case GL_COLOR_MATRIX_STACK_DEPTH_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = ctx->ColorMatrixStack.Depth + 1; - break; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = MAX_COLOR_STACK_DEPTH; - break; - case GL_POST_COLOR_MATRIX_RED_SCALE_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixScale[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixScale[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixScale[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixScale[3]; - break; - case GL_POST_COLOR_MATRIX_RED_BIAS_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixBias[0]; - break; - case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixBias[1]; - break; - case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixBias[2]; - break; - case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI: - CHECK_EXTENSION_I(SGI_color_matrix, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixBias[3]; - break; - - /* GL_EXT_convolution (also in 1.2 imaging) */ - case GL_CONVOLUTION_1D_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.Convolution1DEnabled; - break; - case GL_CONVOLUTION_2D: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.Convolution2DEnabled; - break; - case GL_SEPARABLE_2D: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.Separable2DEnabled; - break; - case GL_POST_CONVOLUTION_RED_SCALE_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionScale[0]; - break; - case GL_POST_CONVOLUTION_GREEN_SCALE_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionScale[1]; - break; - case GL_POST_CONVOLUTION_BLUE_SCALE_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionScale[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionScale[3]; - break; - case GL_POST_CONVOLUTION_RED_BIAS_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionBias[0]; - break; - case GL_POST_CONVOLUTION_GREEN_BIAS_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionBias[1]; - break; - case GL_POST_CONVOLUTION_BLUE_BIAS_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionBias[2]; - break; - case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT: - CHECK_EXTENSION_I(EXT_convolution, pname); - *params = (GLint) ctx->Pixel.PostConvolutionBias[2]; - break; - - /* GL_EXT_histogram (also in 1.2 imaging) */ - case GL_HISTOGRAM: - CHECK_EXTENSION_I(EXT_histogram, pname); - *params = (GLint) ctx->Pixel.HistogramEnabled; - break; - case GL_MINMAX: - CHECK_EXTENSION_I(EXT_histogram, pname); - *params = (GLint) ctx->Pixel.MinMaxEnabled; - break; - - /* GL_SGI_color_table (also in 1.2 imaging */ - case GL_COLOR_TABLE_SGI: - CHECK_EXTENSION_I(SGI_color_table, pname); - *params = (GLint) ctx->Pixel.ColorTableEnabled; - break; - case GL_POST_CONVOLUTION_COLOR_TABLE_SGI: - CHECK_EXTENSION_I(SGI_color_table, pname); - *params = (GLint) ctx->Pixel.PostConvolutionColorTableEnabled; - break; - case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI: - CHECK_EXTENSION_I(SGI_color_table, pname); - *params = (GLint) ctx->Pixel.PostColorMatrixColorTableEnabled; - break; - - - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - *params = (GLint) ctx->Fog.ColorSumEnabled; - break; - case GL_CURRENT_SECONDARY_COLOR_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_INT( (ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]) ); - params[1] = FLOAT_TO_INT( (ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]) ); - params[2] = FLOAT_TO_INT( (ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]) ); - params[3] = FLOAT_TO_INT( (ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]) ); - break; - case GL_SECONDARY_COLOR_ARRAY_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - *params = (GLint) ctx->Array.SecondaryColor.Enabled; - break; - case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - *params = (GLint) ctx->Array.SecondaryColor.Type; - break; - case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - *params = (GLint) ctx->Array.SecondaryColor.Stride; - break; - case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT: - CHECK_EXTENSION_I(EXT_secondary_color, pname); - *params = (GLint) ctx->Array.SecondaryColor.Size; - break; - - /* GL_EXT_fog_coord */ - case GL_CURRENT_FOG_COORDINATE_EXT: - CHECK_EXTENSION_I(EXT_fog_coord, pname); - FLUSH_CURRENT(ctx, 0); - *params = (GLint) ctx->Current.Attrib[VERT_ATTRIB_FOG][0]; - break; - case GL_FOG_COORDINATE_ARRAY_EXT: - CHECK_EXTENSION_I(EXT_fog_coord, pname); - *params = (GLint) ctx->Array.FogCoord.Enabled; - break; - case GL_FOG_COORDINATE_ARRAY_TYPE_EXT: - CHECK_EXTENSION_I(EXT_fog_coord, pname); - *params = (GLint) ctx->Array.FogCoord.Type; - break; - case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT: - CHECK_EXTENSION_I(EXT_fog_coord, pname); - *params = (GLint) ctx->Array.FogCoord.Stride; - break; - case GL_FOG_COORDINATE_SOURCE_EXT: - CHECK_EXTENSION_I(EXT_fog_coord, pname); - *params = (GLint) ctx->Fog.FogCoordinateSource; - break; - - /* GL_EXT_texture_lod_bias */ - case GL_MAX_TEXTURE_LOD_BIAS_EXT: - *params = (GLint) ctx->Const.MaxTextureLodBias; - break; - - /* GL_EXT_texture_filter_anisotropic */ - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - CHECK_EXTENSION_I(EXT_texture_filter_anisotropic, pname); - *params = (GLint) ctx->Const.MaxTextureMaxAnisotropy; - break; - - /* GL_ARB_multisample */ - case GL_MULTISAMPLE_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.Enabled; - break; - case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.SampleAlphaToCoverage; - break; - case GL_SAMPLE_ALPHA_TO_ONE_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.SampleAlphaToOne; - break; - case GL_SAMPLE_COVERAGE_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.SampleCoverage; - break; - case GL_SAMPLE_COVERAGE_VALUE_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.SampleCoverageValue; - break; - case GL_SAMPLE_COVERAGE_INVERT_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = (GLint) ctx->Multisample.SampleCoverageInvert; - break; - case GL_SAMPLE_BUFFERS_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = 0; /* XXX fix someday */ - break; - case GL_SAMPLES_ARB: - CHECK_EXTENSION_I(ARB_multisample, pname); - *params = 0; /* XXX fix someday */ - break; - - /* GL_IBM_rasterpos_clip */ - case GL_RASTER_POSITION_UNCLIPPED_IBM: - CHECK_EXTENSION_I(IBM_rasterpos_clip, pname); - *params = (GLint) ctx->Transform.RasterPositionUnclipped; - break; - - /* GL_NV_point_sprite */ - case GL_POINT_SPRITE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLint) ctx->Point.PointSprite; - break; - case GL_POINT_SPRITE_R_MODE_NV: - CHECK_EXTENSION_B(NV_point_sprite, pname); - *params = (GLint) ctx->Point.SpriteRMode; - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - CHECK_EXTENSION_I(SGIS_generate_mipmap, pname); - *params = (GLint) ctx->Hint.GenerateMipmap; - break; - -#if FEATURE_NV_vertex_program - case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = (GLint) ctx->VertexProgram.Enabled; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = (GLint) ctx->VertexProgram.PointSizeEnabled; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = (GLint) ctx->VertexProgram.TwoSideEnabled; - break; - case GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = MAX_PROGRAM_STACK_DEPTH; - break; - case GL_MAX_TRACK_MATRICES_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = MAX_PROGRAM_MATRICES; - break; - case GL_CURRENT_MATRIX_STACK_DEPTH_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = ctx->CurrentStack->Depth + 1; - break; - case GL_CURRENT_MATRIX_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - for (i = 0; i < 16; i++) - params[i] = (GLint) ctx->CurrentStack->Top->m[i]; - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = (GLint) ctx->VertexProgram.CurrentID; - break; - case GL_PROGRAM_ERROR_POSITION_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - *params = (GLint) ctx->VertexProgram.ErrorPos; - break; - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION_I(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_VERTEX_ATTRIB_ARRAY0_NV; - *params = (GLint) ctx->Array.VertexAttrib[n].Enabled; - } - break; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP1_VERTEX_ATTRIB0_4_NV; - *params = (GLint) ctx->Eval.Map1Attrib[n]; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION_B(NV_vertex_program, pname); - { - GLuint n = (GLuint) pname - GL_MAP2_VERTEX_ATTRIB0_4_NV; - *params = (GLint) ctx->Eval.Map2Attrib[n]; - } - break; - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION_I(NV_texture_rectangle, pname); - *params = (GLint) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV); - break; - case GL_TEXTURE_BINDING_RECTANGLE_NV: - CHECK_EXTENSION_I(NV_texture_rectangle, pname); - *params = (GLint) textureUnit->CurrentRect->Name; - break; - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - CHECK_EXTENSION_I(NV_texture_rectangle, pname); - *params = (GLint) ctx->Const.MaxTextureRectSize; - break; -#endif /* FEATURE_NV_vertex_program */ - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION_I(EXT_stencil_two_side, pname); - *params = (GLint) ctx->Stencil.TestTwoSide; - break; - case GL_ACTIVE_STENCIL_FACE_EXT: - CHECK_EXTENSION_I(EXT_stencil_two_side, pname); - *params = (GLint) (ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT); - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname); - } -} - - - -void -_mesa_GetPointerv( GLenum pname, GLvoid **params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = ctx->Texture.CurrentUnit; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!params) - return; - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_lookup_enum_by_nr(pname)); - - if (ctx->Driver.GetPointerv - && (*ctx->Driver.GetPointerv)(ctx, pname, params)) - return; - - switch (pname) { - case GL_VERTEX_ARRAY_POINTER: - *params = ctx->Array.Vertex.Ptr; - break; - case GL_NORMAL_ARRAY_POINTER: - *params = ctx->Array.Normal.Ptr; - break; - case GL_COLOR_ARRAY_POINTER: - *params = ctx->Array.Color.Ptr; - break; - case GL_SECONDARY_COLOR_ARRAY_POINTER_EXT: - *params = ctx->Array.SecondaryColor.Ptr; - break; - case GL_FOG_COORDINATE_ARRAY_POINTER_EXT: - *params = ctx->Array.FogCoord.Ptr; - break; - case GL_INDEX_ARRAY_POINTER: - *params = ctx->Array.Index.Ptr; - break; - case GL_TEXTURE_COORD_ARRAY_POINTER: - *params = ctx->Array.TexCoord[texUnit].Ptr; - break; - case GL_EDGE_FLAG_ARRAY_POINTER: - *params = ctx->Array.EdgeFlag.Ptr; - break; - case GL_FEEDBACK_BUFFER_POINTER: - *params = ctx->Feedback.Buffer; - break; - case GL_SELECTION_BUFFER_POINTER: - *params = ctx->Select.Buffer; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" ); - return; - } -} - - - -const GLubyte * -_mesa_GetString( GLenum name ) -{ - GET_CURRENT_CONTEXT(ctx); - static const char *vendor = "Brian Paul"; - static const char *renderer = "Mesa"; - static const char *version_1_2 = "1.2 Mesa 5.0.2"; - static const char *version_1_3 = "1.3 Mesa 5.0.2"; - static const char *version_1_4 = "1.4 Mesa 5.0.2"; - - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - - /* this is a required driver function */ - assert(ctx->Driver.GetString); - { - const GLubyte *str = (*ctx->Driver.GetString)(ctx, name); - if (str) - return str; - - switch (name) { - case GL_VENDOR: - return (const GLubyte *) vendor; - case GL_RENDERER: - return (const GLubyte *) renderer; - case GL_VERSION: - if (ctx->Extensions.ARB_multisample && - ctx->Extensions.ARB_multitexture && - ctx->Extensions.ARB_texture_border_clamp && - ctx->Extensions.ARB_texture_compression && - ctx->Extensions.ARB_texture_cube_map && - ctx->Extensions.EXT_texture_env_add && - ctx->Extensions.ARB_texture_env_combine && - ctx->Extensions.ARB_texture_env_dot3) { - if (ctx->Extensions.ARB_depth_texture && - ctx->Extensions.ARB_shadow && - ctx->Extensions.ARB_texture_env_crossbar && - ctx->Extensions.ARB_texture_mirrored_repeat && - ctx->Extensions.ARB_window_pos && - ctx->Extensions.EXT_blend_color && - ctx->Extensions.EXT_blend_func_separate && - ctx->Extensions.EXT_blend_logic_op && - ctx->Extensions.EXT_blend_minmax && - ctx->Extensions.EXT_blend_subtract && - ctx->Extensions.EXT_fog_coord && - ctx->Extensions.EXT_multi_draw_arrays && - ctx->Extensions.EXT_point_parameters && /*aka ARB*/ - ctx->Extensions.EXT_secondary_color && - ctx->Extensions.EXT_stencil_wrap && - ctx->Extensions.EXT_texture_lod_bias && - ctx->Extensions.SGIS_generate_mipmap) { - return (const GLubyte *) version_1_4; - } - else { - return (const GLubyte *) version_1_3; - } - } - else { - return (const GLubyte *) version_1_2; - } - case GL_EXTENSIONS: - return (const GLubyte *) _mesa_extensions_get_string(ctx); - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" ); - return (const GLubyte *) 0; - } - } -} - - -/* - * Execute a glGetError command - */ -GLenum -_mesa_GetError( void ) -{ - GET_CURRENT_CONTEXT(ctx); - GLenum e = ctx->ErrorValue; - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetError <-- %s\n", _mesa_lookup_enum_by_nr(e)); - - ctx->ErrorValue = (GLenum) GL_NO_ERROR; - return e; -} Index: xc/extras/Mesa/src/get.h diff -u xc/extras/Mesa/src/get.h:1.4 xc/extras/Mesa/src/get.h:removed --- xc/extras/Mesa/src/get.h:1.4 Fri Feb 22 14:25:30 2002 +++ xc/extras/Mesa/src/get.h Wed Mar 16 21:00:30 2005 @@ -1,57 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GET_H -#define GET_H - - -#include "mtypes.h" - - -extern void -_mesa_GetBooleanv( GLenum pname, GLboolean *params ); - -extern void -_mesa_GetDoublev( GLenum pname, GLdouble *params ); - -extern void -_mesa_GetFloatv( GLenum pname, GLfloat *params ); - -extern void -_mesa_GetIntegerv( GLenum pname, GLint *params ); - -extern void -_mesa_GetPointerv( GLenum pname, GLvoid **params ); - -extern const GLubyte * -_mesa_GetString( GLenum name ); - -extern GLenum -_mesa_GetError( void ); - - - -#endif Index: xc/extras/Mesa/src/glapi.c diff -u xc/extras/Mesa/src/glapi.c:1.15 xc/extras/Mesa/src/glapi.c:removed --- xc/extras/Mesa/src/glapi.c:1.15 Tue Dec 2 15:27:33 2003 +++ xc/extras/Mesa/src/glapi.c Wed Mar 16 21:00:30 2005 @@ -1,928 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/glapi.c,v 1.15 2003/12/02 20:27:33 dawes Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file manages the OpenGL API dispatch layer. - * The dispatch table (struct _glapi_table) is basically just a list - * of function pointers. - * There are functions to set/get the current dispatch table for the - * current thread and to manage registration/dispatch of dynamically - * added extension functions. - * - * It's intended that this file and the other glapi*.[ch] files are - * flexible enough to be reused in several places: XFree86, DRI- - * based libGL.so, and perhaps the SGI SI. - * - * NOTE: There are no dependencies on Mesa in this code. - * - * Versions (API changes): - * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0 - * 2001/01/16 - added dispatch override feature for Mesa 3.5 - * 2002/06/28 - added _glapi_set_warning_func(), Mesa 4.1. - * 2002/10/01 - _glapi_get_proc_address() will now generate new entrypoints - * itself (using offset ~0). _glapi_add_entrypoint() can be - * called afterward and it'll fill in the correct dispatch - * offset. This allows DRI libGL to avoid probing for DRI - * drivers! No changes to the public glapi interface. - */ - - - -#include "glheader.h" -#include "glapi.h" -#include "glapioffsets.h" -#include "glapitable.h" -#include "glthread.h" - -/***** BEGIN NO-OP DISPATCH *****/ - -static GLboolean WarnFlag = GL_FALSE; -static _glapi_warning_func warning_func; - - -/* - * Enable/disable printing of warning messages. - */ -void -_glapi_noop_enable_warnings(GLboolean enable) -{ - WarnFlag = enable; -} - -/* - * Register a callback function for reporting errors. - */ -void -_glapi_set_warning_func( _glapi_warning_func func ) -{ - warning_func = func; -} - -static GLboolean -warn(void) -{ - if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) - && warning_func) { - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - -#define KEYWORD1 static -#define KEYWORD2 -#define NAME(func) NoOp##func - -#define F NULL - -#define DISPATCH(func, args, msg) \ - if (warn()) { \ - warning_func(NULL, "GL User Error: called without context:"); \ - warning_func msg; \ - } - -#define RETURN_DISPATCH(func, args, msg) \ - if (warn()) { \ - warning_func(NULL, "GL User Error: called without context:"); \ - warning_func msg; \ - } \ - return 0 - -#define DISPATCH_TABLE_NAME __glapi_noop_table -#define UNUSED_TABLE_NAME __usused_noop_functions - -#define TABLE_ENTRY(name) (void *) NoOp##name - -static int NoOpUnused(void) -{ - if (warn()) { - warning_func(NULL, "GL User Error: calling extension function without a current context\n"); - } - return 0; -} - -#include "glapitemp.h" - -/***** END NO-OP DISPATCH *****/ - - - -/***** BEGIN THREAD-SAFE DISPATCH *****/ -/* if we support thread-safety, build a special dispatch table for use - * in thread-safety mode (ThreadSafe == GL_TRUE). Each entry in the - * dispatch table will call _glthread_GetTSD() to get the actual dispatch - * table bound to the current thread, then jump through that table. - */ - -#if defined(THREADS) - -static GLboolean ThreadSafe = GL_FALSE; /* In thread-safe mode? */ -static _glthread_TSD DispatchTSD; /* Per-thread dispatch pointer */ -static _glthread_TSD RealDispatchTSD; /* only when using override */ -static _glthread_TSD ContextTSD; /* Per-thread context pointer */ - - -#define KEYWORD1 static -#define KEYWORD2 GLAPIENTRY -#define NAME(func) _ts_##func - -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - struct _glapi_table *dispatch; \ - dispatch = (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); \ - if (!dispatch) \ - dispatch = (struct _glapi_table *) __glapi_noop_table; \ - (dispatch->FUNC) ARGS - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - struct _glapi_table *dispatch; \ - dispatch = (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); \ - if (!dispatch) \ - dispatch = (struct _glapi_table *) __glapi_noop_table; \ - return (dispatch->FUNC) ARGS - -#define DISPATCH_TABLE_NAME __glapi_threadsafe_table -#define UNUSED_TABLE_NAME __usused_threadsafe_functions - -#define TABLE_ENTRY(name) (void *) _ts_##name - -static int _ts_Unused(void) -{ - return 0; -} - -#include "glapitemp.h" - -#endif - -/***** END THREAD-SAFE DISPATCH *****/ - - - -struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table; -struct _glapi_table *_glapi_RealDispatch = (struct _glapi_table *) __glapi_noop_table; - -/* Used when thread safety disabled */ -void *_glapi_Context = NULL; - - -static GLboolean DispatchOverride = GL_FALSE; - - - -/* strdup() is actually not a standard ANSI C or POSIX routine. - * Irix will not define it if ANSI mode is in effect. - */ -static char * -str_dup(const char *str) -{ - char *copy; - copy = (char*) malloc(strlen(str) + 1); - if (!copy) - return NULL; - strcpy(copy, str); - return copy; -} - - - -/* - * We should call this periodically from a function such as glXMakeCurrent - * in order to test if multiple threads are being used. - */ -void -_glapi_check_multithread(void) -{ -#if defined(THREADS) - if (!ThreadSafe) { - static unsigned long knownID; - static GLboolean firstCall = GL_TRUE; - if (firstCall) { - knownID = _glthread_GetID(); - firstCall = GL_FALSE; - } - else if (knownID != _glthread_GetID()) { - ThreadSafe = GL_TRUE; - } - } - if (ThreadSafe) { - /* make sure that this thread's dispatch pointer isn't null */ - if (!_glapi_get_dispatch()) { - _glapi_set_dispatch(NULL); - } - } -#endif -} - - - -/* - * Set the current context pointer for this thread. - * The context pointer is an opaque type which should be cast to - * void from the real context pointer type. - */ -void -_glapi_set_context(void *context) -{ -#if defined(THREADS) - _glthread_SetTSD(&ContextTSD, context); - if (ThreadSafe) - _glapi_Context = NULL; - else - _glapi_Context = context; -#else - _glapi_Context = context; -#endif -} - - - -/* - * Get the current context pointer for this thread. - * The context pointer is an opaque type which should be cast from - * void to the real context pointer type. - */ -void * -_glapi_get_context(void) -{ -#if defined(THREADS) - if (ThreadSafe) { - return _glthread_GetTSD(&ContextTSD); - } - else { - return _glapi_Context; - } -#else - return _glapi_Context; -#endif -} - - - -/* - * Set the global or per-thread dispatch table pointer. - */ -void -_glapi_set_dispatch(struct _glapi_table *dispatch) -{ - if (!dispatch) { - /* use the no-op functions */ - dispatch = (struct _glapi_table *) __glapi_noop_table; - } -#ifdef DEBUG - else { - _glapi_check_table(dispatch); - } -#endif - -#if defined(THREADS) - if (DispatchOverride) { - _glthread_SetTSD(&RealDispatchTSD, (void *) dispatch); - if (ThreadSafe) - _glapi_RealDispatch = (struct _glapi_table*) __glapi_threadsafe_table; - else - _glapi_RealDispatch = dispatch; - } - else { - /* normal operation */ - _glthread_SetTSD(&DispatchTSD, (void *) dispatch); - if (ThreadSafe) - _glapi_Dispatch = (struct _glapi_table *) __glapi_threadsafe_table; - else - _glapi_Dispatch = dispatch; - } -#else /*THREADS*/ - if (DispatchOverride) { - _glapi_RealDispatch = dispatch; - } - else { - _glapi_Dispatch = dispatch; - } -#endif /*THREADS*/ -} - - - -/* - * Return pointer to current dispatch table for calling thread. - */ -struct _glapi_table * -_glapi_get_dispatch(void) -{ -#if defined(THREADS) - if (ThreadSafe) { - if (DispatchOverride) { - return (struct _glapi_table *) _glthread_GetTSD(&RealDispatchTSD); - } - else { - return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); - } - } - else { - if (DispatchOverride) { - assert(_glapi_RealDispatch); - return _glapi_RealDispatch; - } - else { - assert(_glapi_Dispatch); - return _glapi_Dispatch; - } - } -#else - return _glapi_Dispatch; -#endif -} - - -/* - * Notes on dispatch overrride: - * - * Dispatch override allows an external agent to hook into the GL dispatch - * mechanism before execution goes into the core rendering library. For - * example, a trace mechanism would insert itself as an overrider, print - * logging info for each GL function, then dispatch to the real GL function. - * - * libGLS (GL Stream library) is another agent that might use override. - * - * We don't allow more than one layer of overriding at this time. - * In the future we may allow nested/layered override. In that case - * _glapi_begin_dispatch_override() will return an override layer, - * _glapi_end_dispatch_override(layer) will remove an override layer - * and _glapi_get_override_dispatch(layer) will return the dispatch - * table for a given override layer. layer = 0 will be the "real" - * dispatch table. - */ - -/* - * Return: dispatch override layer number. - */ -int -_glapi_begin_dispatch_override(struct _glapi_table *override) -{ - struct _glapi_table *real = _glapi_get_dispatch(); - - assert(!DispatchOverride); /* can't nest at this time */ - DispatchOverride = GL_TRUE; - - _glapi_set_dispatch(real); - -#if defined(THREADS) - _glthread_SetTSD(&DispatchTSD, (void *) override); - if (ThreadSafe) - _glapi_Dispatch = (struct _glapi_table *) __glapi_threadsafe_table; - else - _glapi_Dispatch = override; -#else - _glapi_Dispatch = override; -#endif - return 1; -} - - -void -_glapi_end_dispatch_override(int layer) -{ - struct _glapi_table *real = _glapi_get_dispatch(); - (void) layer; - DispatchOverride = GL_FALSE; - _glapi_set_dispatch(real); - /* the rest of this isn't needed, just play it safe */ -#if defined(THREADS) - _glthread_SetTSD(&RealDispatchTSD, NULL); -#endif - _glapi_RealDispatch = NULL; -} - - -struct _glapi_table * -_glapi_get_override_dispatch(int layer) -{ - if (layer == 0) { - return _glapi_get_dispatch(); - } - else { - if (DispatchOverride) { -#if defined(THREADS) - return (struct _glapi_table *) _glthread_GetTSD(&DispatchTSD); -#else - return _glapi_Dispatch; -#endif - } - else { - return NULL; - } - } -} - - -struct name_address_offset { - const char *Name; - GLvoid *Address; - GLuint Offset; -}; - - -/* The code in this file is auto-generated with Python */ -#include "glprocs.h" - - - -/* - * Return dispatch table offset of the named static (built-in) function. - * Return -1 if function not found. - */ -static GLint -get_static_proc_offset(const char *funcName) -{ - GLuint i; - for (i = 0; static_functions[i].Name; i++) { - if (strcmp(static_functions[i].Name, funcName) == 0) { - return static_functions[i].Offset; - } - } - return -1; -} - - -/* - * Return dispatch function address the named static (built-in) function. - * Return NULL if function not found. - */ -static GLvoid * -get_static_proc_address(const char *funcName) -{ - GLint i; - for (i = 0; static_functions[i].Name; i++) { - if (strcmp(static_functions[i].Name, funcName) == 0) { - return static_functions[i].Address; - } - } - return NULL; -} - - - -/********************************************************************** - * Extension function management. - */ - -/* - * Number of extension functions which we can dynamically add at runtime. - */ -#define MAX_EXTENSION_FUNCS 300 - - -/* - * The disptach table size (number of entries) is the sizeof the - * _glapi_table struct plus the number of dynamic entries we can add. - * The extra slots can be filled in by DRI drivers that register new extension - * functions. - */ -#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS) - - -static struct name_address_offset ExtEntryTable[MAX_EXTENSION_FUNCS]; -static GLuint NumExtEntryPoints = 0; - -#ifdef USE_SPARC_ASM -extern void __glapi_sparc_icache_flush(unsigned int *); -#endif - -/* - * Generate a dispatch function (entrypoint) which jumps through - * the given slot number (offset) in the current dispatch table. - * We need assembly language in order to accomplish this. - */ -static void * -generate_entrypoint(GLuint functionOffset) -{ -#if defined(USE_X86_ASM) - /* - * This x86 code contributed by Josh Vanderhoof. - * - * 0: a1 10 32 54 76 movl __glapi_Dispatch,%eax - * 00 01 02 03 04 - * 5: 85 c0 testl %eax,%eax - * 05 06 - * 7: 74 06 je f - * 07 08 - * 9: ff a0 10 32 54 76 jmp *0x76543210(%eax) - * 09 0a 0b 0c 0d 0e - * f: e8 fc ff ff ff call __glapi_get_dispatch - * 0f 10 11 12 13 - * 14: ff a0 10 32 54 76 jmp *0x76543210(%eax) - * 14 15 16 17 18 19 - */ - static const unsigned char insn_template[] = { - 0xa1, 0x00, 0x00, 0x00, 0x00, - 0x85, 0xc0, - 0x74, 0x06, - 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0xe8, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xa0, 0x00, 0x00, 0x00, 0x00 - }; - unsigned char *code = (unsigned char *) malloc(sizeof(insn_template)); - unsigned int next_insn; - if (code) { - memcpy(code, insn_template, sizeof(insn_template)); - - *(unsigned int *)(code + 0x01) = (unsigned int)&_glapi_Dispatch; - *(unsigned int *)(code + 0x0b) = (unsigned int)functionOffset * 4; - next_insn = (unsigned int)(code + 0x14); - *(unsigned int *)(code + 0x10) = (unsigned int)_glapi_get_dispatch - next_insn; - *(unsigned int *)(code + 0x16) = (unsigned int)functionOffset * 4; - } - return code; -#elif defined(USE_SPARC_ASM) - -#if defined(__sparc_v9__) && !defined(__linux__) -#define SPARC_64BIT_ADDR -#endif - -#ifdef SPARC_64BIT_ADDR - static const unsigned int insn_template[] = { - 0x05000000, /* sethi %uhi(_glapi_Dispatch), %g2 */ - 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */ - 0x8410a000, /* or %g2, %ulo(_glapi_Dispatch), %g2 */ - 0x82106000, /* or %g1, %lo(_glapi_Dispatch), %g1 */ - 0x8528b020, /* sllx %g2, 32, %g2 */ - 0xc2584002, /* ldx [%g1 + %g2], %g1 */ - 0x05000000, /* sethi %hi(8 * glapioffset), %g2 */ - 0x8410a000, /* or %g2, %lo(8 * glapioffset), %g2 */ - 0xc6584002, /* ldx [%g1 + %g2], %g3 */ - 0x81c0c000, /* jmpl %g3, %g0 */ - 0x01000000 /* nop */ - }; -#else - static const unsigned int insn_template[] = { - 0x03000000, /* sethi %hi(_glapi_Dispatch), %g1 */ - 0xc2006000, /* ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ - 0xc6006000, /* ld [%g1 + %lo(4*glapioffset)], %g3 */ - 0x81c0c000, /* jmpl %g3, %g0 */ - 0x01000000 /* nop */ - }; -#endif - unsigned int *code = (unsigned int *) malloc(sizeof(insn_template)); - unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch; - if (code) { - memcpy(code, insn_template, sizeof(insn_template)); - -#ifdef SPARC_64BIT_ADDR - code[0] |= (glapi_addr >> (32 + 10)); - code[1] |= ((glapi_addr & 0xffffffff) >> 10); - __glapi_sparc_icache_flush(&code[0]); - code[2] |= ((glapi_addr >> 32) & ((1 << 10) - 1)); - code[3] |= (glapi_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&code[2]); - code[6] |= ((functionOffset * 8) >> 10); - code[7] |= ((functionOffset * 8) & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&code[6]); -#else - code[0] |= (glapi_addr >> 10); - code[1] |= (glapi_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&code[0]); - code[2] |= (functionOffset * 4); - __glapi_sparc_icache_flush(&code[2]); -#endif - } - return code; -#else - return NULL; -#endif /* USE_*_ASM */ -} - - -/* - * This function inserts a new dispatch offset into the assembly language - * stub that was generated with the preceeding function. - */ -static void -fill_in_entrypoint_offset(void *entrypoint, GLuint offset) -{ -#if defined(USE_X86_ASM) - - unsigned char *code = (unsigned char *) entrypoint; - *(unsigned int *)(code + 0x0b) = offset * 4; - *(unsigned int *)(code + 0x16) = offset * 4; - -#elif defined(USE_SPARC_ASM) - - /* XXX this hasn't been tested! */ - unsigned int *code = (unsigned int *) entrypoint; -#ifdef SPARC_64BIT_ADDR - code[6] = 0x05000000; /* sethi %hi(8 * glapioffset), %g2 */ - code[7] = 0x8410a000; /* or %g2, %lo(8 * glapioffset), %g2 */ - code[6] |= ((offset * 8) >> 10); - code[7] |= ((offset * 8) & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&code[6]); -#else /* SPARC_64BIT_ADDR */ - code[2] = 0xc6006000; /* ld [%g1 + %lo(4*glapioffset)], %g3 */ - code[2] |= (offset * 4); - __glapi_sparc_icache_flush(&code[2]); -#endif /* SPARC_64BIT_ADDR */ - -#endif /* USE_*_ASM */ -} - - -/* - * Add a new extension function entrypoint. - * Return: GL_TRUE = success or GL_FALSE = failure - */ -GLboolean -_glapi_add_entrypoint(const char *funcName, GLuint offset) -{ - /* trivial rejection test */ - if (!funcName || funcName[0] != 'g' || funcName[1] != 'l') - return GL_FALSE; - - /* first check if the named function is already statically present */ - { - GLint index = get_static_proc_offset(funcName); - if (index >= 0) { - return (GLboolean) ((GLuint) index == offset); /* bad offset! */ - } - } - - /* See if this function has already been dynamically added */ - { - GLuint i; - for (i = 0; i < NumExtEntryPoints; i++) { - if (strcmp(ExtEntryTable[i].Name, funcName) == 0) { - /* function already registered */ - if (ExtEntryTable[i].Offset == offset) { - return GL_TRUE; /* offsets match */ - } - else if (ExtEntryTable[i].Offset == ~0 - && offset < DISPATCH_TABLE_SIZE) { - /* need to patch-up the dispatch code */ - if (offset != ~0) { - fill_in_entrypoint_offset(ExtEntryTable[i].Address, offset); - ExtEntryTable[i].Offset = offset; - } - return GL_TRUE; - } - else { - return GL_FALSE; /* bad offset! */ - } - } - } - } - - /* This is a new function, try to add it. */ - if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS || - offset >= DISPATCH_TABLE_SIZE) { - /* No space left */ - return GL_FALSE; - } - else { - void *entrypoint = generate_entrypoint(offset); - if (!entrypoint) - return GL_FALSE; /* couldn't generate assembly */ - - /* OK! */ - ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName); - ExtEntryTable[NumExtEntryPoints].Offset = offset; - ExtEntryTable[NumExtEntryPoints].Address = entrypoint; - NumExtEntryPoints++; - - return GL_TRUE; /* success */ - } - - /* should never get here, silence compiler warnings */ - return GL_FALSE; -} - - -/* - * Return offset of entrypoint for named function within dispatch table. - */ -GLint -_glapi_get_proc_offset(const char *funcName) -{ - /* search extension functions first */ - GLuint i; - for (i = 0; i < NumExtEntryPoints; i++) { - if (strcmp(ExtEntryTable[i].Name, funcName) == 0) { - return ExtEntryTable[i].Offset; - } - } - - /* search static functions */ - return get_static_proc_offset(funcName); -} - - - -/* - * Return entrypoint for named function. - */ -const GLvoid * -_glapi_get_proc_address(const char *funcName) -{ - GLuint i; - - if (funcName[0] != 'g' || funcName[1] != 'l') - return NULL; - - /* search extension functions first */ - for (i = 0; i < NumExtEntryPoints; i++) { - if (strcmp(ExtEntryTable[i].Name, funcName) == 0) { - return ExtEntryTable[i].Address; - } - } - - /* search static functions */ - { - const GLvoid *func = get_static_proc_address(funcName); - if (func) - return func; - } - - /* generate new entrypoint - use a temporary dispatch offset of - * ~0 (i.e. -1). Later, when the driver calls _glapi_add_entrypoint() - * we'll put in the proper offset. If that never happens, and the - * user calls this function, he'll segfault. That's what you get - * when you try calling a GL function that doesn't really exist. - */ - if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) { - GLvoid *entrypoint = generate_entrypoint(~0); - if (!entrypoint) - return GL_FALSE; - - ExtEntryTable[NumExtEntryPoints].Name = str_dup(funcName); - ExtEntryTable[NumExtEntryPoints].Offset = ~0; - ExtEntryTable[NumExtEntryPoints].Address = entrypoint; - NumExtEntryPoints++; - - return entrypoint; - } - else { - /* no space for new functions! */ - return NULL; - } -} - - - -/* - * Return the name of the function at the given dispatch offset. - * This is only intended for debugging. - */ -const char * -_glapi_get_proc_name(GLuint offset) -{ - const GLuint n = sizeof(static_functions) / sizeof(struct name_address_offset); - GLuint i; - - /* search built-in functions */ - for (i = 0; i < n; i++) { - if (static_functions[i].Offset == offset) - return static_functions[i].Name; - } - - /* search added extension functions */ - for (i = 0; i < NumExtEntryPoints; i++) { - if (ExtEntryTable[i].Offset == offset) { - return ExtEntryTable[i].Name; - } - } - return NULL; -} - - - -/* - * Return size of dispatch table struct as number of functions (or - * slots). - */ -GLuint -_glapi_get_dispatch_table_size(void) -{ - return DISPATCH_TABLE_SIZE; -} - - - -/* - * Get API dispatcher version string. - */ -const char * -_glapi_get_version(void) -{ - return "20021001"; /* YYYYMMDD */ -} - - - -/* - * Make sure there are no NULL pointers in the given dispatch table. - * Intended for debugging purposes. - */ -void -_glapi_check_table(const struct _glapi_table *table) -{ -#ifdef DEBUG - const GLuint entries = _glapi_get_dispatch_table_size(); - const void **tab = (const void **) table; - GLuint i; - for (i = 1; i < entries; i++) { - assert(tab[i]); - } - - /* Do some spot checks to be sure that the dispatch table - * slots are assigned correctly. - */ - { - GLuint BeginOffset = _glapi_get_proc_offset("glBegin"); - char *BeginFunc = (char*) &table->Begin; - GLuint offset = (BeginFunc - (char *) table) / sizeof(void *); - assert(BeginOffset == _gloffset_Begin); - assert(BeginOffset == offset); - } - { - GLuint viewportOffset = _glapi_get_proc_offset("glViewport"); - char *viewportFunc = (char*) &table->Viewport; - GLuint offset = (viewportFunc - (char *) table) / sizeof(void *); - assert(viewportOffset == _gloffset_Viewport); - assert(viewportOffset == offset); - } - { - GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer"); - char *VertexPointerFunc = (char*) &table->VertexPointer; - GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *); - assert(VertexPointerOffset == _gloffset_VertexPointer); - assert(VertexPointerOffset == offset); - } - { - GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax"); - char *ResetMinMaxFunc = (char*) &table->ResetMinmax; - GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *); - assert(ResetMinMaxOffset == _gloffset_ResetMinmax); - assert(ResetMinMaxOffset == offset); - } - { - GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor"); - char *blendColorFunc = (char*) &table->BlendColor; - GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *); - assert(blendColorOffset == _gloffset_BlendColor); - assert(blendColorOffset == offset); - } - { - GLuint istextureOffset = _glapi_get_proc_offset("glIsTextureEXT"); - char *istextureFunc = (char*) &table->IsTextureEXT; - GLuint offset = (istextureFunc - (char *) table) / sizeof(void *); - assert(istextureOffset == _gloffset_IsTextureEXT); - assert(istextureOffset == offset); - } - { - GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT"); - char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT; - GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); - assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT); - assert(secondaryColor3fOffset == offset); - assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (void *) &glSecondaryColor3fEXT); - } - { - GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); - char *pointParameterivFunc = (char*) &table->PointParameterivNV; - GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); - assert(pointParameterivOffset == _gloffset_PointParameterivNV); - assert(pointParameterivOffset == offset); - assert(_glapi_get_proc_address("glPointParameterivNV") == (void *) &glPointParameterivNV); - } - { - GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); - char *setFenceFunc = (char*) &table->SetFenceNV; - GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *); - assert(setFenceOffset == _gloffset_SetFenceNV); - assert(setFenceOffset == offset); - assert(_glapi_get_proc_address("glSetFenceNV") == (void *) &glSetFenceNV); - } -#endif -} Index: xc/extras/Mesa/src/glapi.h diff -u xc/extras/Mesa/src/glapi.h:1.4 xc/extras/Mesa/src/glapi.h:removed --- xc/extras/Mesa/src/glapi.h:1.4 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/glapi.h Wed Mar 16 21:00:30 2005 @@ -1,109 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _GLAPI_H -#define _GLAPI_H - - -#include "GL/gl.h" - -struct _glapi_table; - -typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); - - -extern void *_glapi_Context; - -extern struct _glapi_table *_glapi_Dispatch; - - -extern void -_glapi_noop_enable_warnings(GLboolean enable); - -extern void -_glapi_set_warning_func(_glapi_warning_func func); - -extern void -_glapi_check_multithread(void); - - -extern void -_glapi_set_context(void *context); - - -extern void * -_glapi_get_context(void); - - -extern void -_glapi_set_dispatch(struct _glapi_table *dispatch); - - -extern struct _glapi_table * -_glapi_get_dispatch(void); - - -extern int -_glapi_begin_dispatch_override(struct _glapi_table *override); - - -extern void -_glapi_end_dispatch_override(int layer); - - -struct _glapi_table * -_glapi_get_override_dispatch(int layer); - - -extern GLuint -_glapi_get_dispatch_table_size(void); - - -extern const char * -_glapi_get_version(void); - - -extern void -_glapi_check_table(const struct _glapi_table *table); - - -extern GLboolean -_glapi_add_entrypoint(const char *funcName, GLuint offset); - - -extern GLint -_glapi_get_proc_offset(const char *funcName); - - -extern const GLvoid * -_glapi_get_proc_address(const char *funcName); - - -extern const char * -_glapi_get_proc_name(GLuint offset); - - -#endif Index: xc/extras/Mesa/src/glapioffsets.h diff -u xc/extras/Mesa/src/glapioffsets.h:1.6 xc/extras/Mesa/src/glapioffsets.h:removed --- xc/extras/Mesa/src/glapioffsets.h:1.6 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/glapioffsets.h Wed Mar 16 21:00:30 2005 @@ -1,660 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gloffsets.py script */ -#ifndef _GLAPI_OFFSETS_H_ -#define _GLAPI_OFFSETS_H_ - -#define _gloffset_NewList 0 -#define _gloffset_EndList 1 -#define _gloffset_CallList 2 -#define _gloffset_CallLists 3 -#define _gloffset_DeleteLists 4 -#define _gloffset_GenLists 5 -#define _gloffset_ListBase 6 -#define _gloffset_Begin 7 -#define _gloffset_Bitmap 8 -#define _gloffset_Color3b 9 -#define _gloffset_Color3bv 10 -#define _gloffset_Color3d 11 -#define _gloffset_Color3dv 12 -#define _gloffset_Color3f 13 -#define _gloffset_Color3fv 14 -#define _gloffset_Color3i 15 -#define _gloffset_Color3iv 16 -#define _gloffset_Color3s 17 -#define _gloffset_Color3sv 18 -#define _gloffset_Color3ub 19 -#define _gloffset_Color3ubv 20 -#define _gloffset_Color3ui 21 -#define _gloffset_Color3uiv 22 -#define _gloffset_Color3us 23 -#define _gloffset_Color3usv 24 -#define _gloffset_Color4b 25 -#define _gloffset_Color4bv 26 -#define _gloffset_Color4d 27 -#define _gloffset_Color4dv 28 -#define _gloffset_Color4f 29 -#define _gloffset_Color4fv 30 -#define _gloffset_Color4i 31 -#define _gloffset_Color4iv 32 -#define _gloffset_Color4s 33 -#define _gloffset_Color4sv 34 -#define _gloffset_Color4ub 35 -#define _gloffset_Color4ubv 36 -#define _gloffset_Color4ui 37 -#define _gloffset_Color4uiv 38 -#define _gloffset_Color4us 39 -#define _gloffset_Color4usv 40 -#define _gloffset_EdgeFlag 41 -#define _gloffset_EdgeFlagv 42 -#define _gloffset_End 43 -#define _gloffset_Indexd 44 -#define _gloffset_Indexdv 45 -#define _gloffset_Indexf 46 -#define _gloffset_Indexfv 47 -#define _gloffset_Indexi 48 -#define _gloffset_Indexiv 49 -#define _gloffset_Indexs 50 -#define _gloffset_Indexsv 51 -#define _gloffset_Normal3b 52 -#define _gloffset_Normal3bv 53 -#define _gloffset_Normal3d 54 -#define _gloffset_Normal3dv 55 -#define _gloffset_Normal3f 56 -#define _gloffset_Normal3fv 57 -#define _gloffset_Normal3i 58 -#define _gloffset_Normal3iv 59 -#define _gloffset_Normal3s 60 -#define _gloffset_Normal3sv 61 -#define _gloffset_RasterPos2d 62 -#define _gloffset_RasterPos2dv 63 -#define _gloffset_RasterPos2f 64 -#define _gloffset_RasterPos2fv 65 -#define _gloffset_RasterPos2i 66 -#define _gloffset_RasterPos2iv 67 -#define _gloffset_RasterPos2s 68 -#define _gloffset_RasterPos2sv 69 -#define _gloffset_RasterPos3d 70 -#define _gloffset_RasterPos3dv 71 -#define _gloffset_RasterPos3f 72 -#define _gloffset_RasterPos3fv 73 -#define _gloffset_RasterPos3i 74 -#define _gloffset_RasterPos3iv 75 -#define _gloffset_RasterPos3s 76 -#define _gloffset_RasterPos3sv 77 -#define _gloffset_RasterPos4d 78 -#define _gloffset_RasterPos4dv 79 -#define _gloffset_RasterPos4f 80 -#define _gloffset_RasterPos4fv 81 -#define _gloffset_RasterPos4i 82 -#define _gloffset_RasterPos4iv 83 -#define _gloffset_RasterPos4s 84 -#define _gloffset_RasterPos4sv 85 -#define _gloffset_Rectd 86 -#define _gloffset_Rectdv 87 -#define _gloffset_Rectf 88 -#define _gloffset_Rectfv 89 -#define _gloffset_Recti 90 -#define _gloffset_Rectiv 91 -#define _gloffset_Rects 92 -#define _gloffset_Rectsv 93 -#define _gloffset_TexCoord1d 94 -#define _gloffset_TexCoord1dv 95 -#define _gloffset_TexCoord1f 96 -#define _gloffset_TexCoord1fv 97 -#define _gloffset_TexCoord1i 98 -#define _gloffset_TexCoord1iv 99 -#define _gloffset_TexCoord1s 100 -#define _gloffset_TexCoord1sv 101 -#define _gloffset_TexCoord2d 102 -#define _gloffset_TexCoord2dv 103 -#define _gloffset_TexCoord2f 104 -#define _gloffset_TexCoord2fv 105 -#define _gloffset_TexCoord2i 106 -#define _gloffset_TexCoord2iv 107 -#define _gloffset_TexCoord2s 108 -#define _gloffset_TexCoord2sv 109 -#define _gloffset_TexCoord3d 110 -#define _gloffset_TexCoord3dv 111 -#define _gloffset_TexCoord3f 112 -#define _gloffset_TexCoord3fv 113 -#define _gloffset_TexCoord3i 114 -#define _gloffset_TexCoord3iv 115 -#define _gloffset_TexCoord3s 116 -#define _gloffset_TexCoord3sv 117 -#define _gloffset_TexCoord4d 118 -#define _gloffset_TexCoord4dv 119 -#define _gloffset_TexCoord4f 120 -#define _gloffset_TexCoord4fv 121 -#define _gloffset_TexCoord4i 122 -#define _gloffset_TexCoord4iv 123 -#define _gloffset_TexCoord4s 124 -#define _gloffset_TexCoord4sv 125 -#define _gloffset_Vertex2d 126 -#define _gloffset_Vertex2dv 127 -#define _gloffset_Vertex2f 128 -#define _gloffset_Vertex2fv 129 -#define _gloffset_Vertex2i 130 -#define _gloffset_Vertex2iv 131 -#define _gloffset_Vertex2s 132 -#define _gloffset_Vertex2sv 133 -#define _gloffset_Vertex3d 134 -#define _gloffset_Vertex3dv 135 -#define _gloffset_Vertex3f 136 -#define _gloffset_Vertex3fv 137 -#define _gloffset_Vertex3i 138 -#define _gloffset_Vertex3iv 139 -#define _gloffset_Vertex3s 140 -#define _gloffset_Vertex3sv 141 -#define _gloffset_Vertex4d 142 -#define _gloffset_Vertex4dv 143 -#define _gloffset_Vertex4f 144 -#define _gloffset_Vertex4fv 145 -#define _gloffset_Vertex4i 146 -#define _gloffset_Vertex4iv 147 -#define _gloffset_Vertex4s 148 -#define _gloffset_Vertex4sv 149 -#define _gloffset_ClipPlane 150 -#define _gloffset_ColorMaterial 151 -#define _gloffset_CullFace 152 -#define _gloffset_Fogf 153 -#define _gloffset_Fogfv 154 -#define _gloffset_Fogi 155 -#define _gloffset_Fogiv 156 -#define _gloffset_FrontFace 157 -#define _gloffset_Hint 158 -#define _gloffset_Lightf 159 -#define _gloffset_Lightfv 160 -#define _gloffset_Lighti 161 -#define _gloffset_Lightiv 162 -#define _gloffset_LightModelf 163 -#define _gloffset_LightModelfv 164 -#define _gloffset_LightModeli 165 -#define _gloffset_LightModeliv 166 -#define _gloffset_LineStipple 167 -#define _gloffset_LineWidth 168 -#define _gloffset_Materialf 169 -#define _gloffset_Materialfv 170 -#define _gloffset_Materiali 171 -#define _gloffset_Materialiv 172 -#define _gloffset_PointSize 173 -#define _gloffset_PolygonMode 174 -#define _gloffset_PolygonStipple 175 -#define _gloffset_Scissor 176 -#define _gloffset_ShadeModel 177 -#define _gloffset_TexParameterf 178 -#define _gloffset_TexParameterfv 179 -#define _gloffset_TexParameteri 180 -#define _gloffset_TexParameteriv 181 -#define _gloffset_TexImage1D 182 -#define _gloffset_TexImage2D 183 -#define _gloffset_TexEnvf 184 -#define _gloffset_TexEnvfv 185 -#define _gloffset_TexEnvi 186 -#define _gloffset_TexEnviv 187 -#define _gloffset_TexGend 188 -#define _gloffset_TexGendv 189 -#define _gloffset_TexGenf 190 -#define _gloffset_TexGenfv 191 -#define _gloffset_TexGeni 192 -#define _gloffset_TexGeniv 193 -#define _gloffset_FeedbackBuffer 194 -#define _gloffset_SelectBuffer 195 -#define _gloffset_RenderMode 196 -#define _gloffset_InitNames 197 -#define _gloffset_LoadName 198 -#define _gloffset_PassThrough 199 -#define _gloffset_PopName 200 -#define _gloffset_PushName 201 -#define _gloffset_DrawBuffer 202 -#define _gloffset_Clear 203 -#define _gloffset_ClearAccum 204 -#define _gloffset_ClearIndex 205 -#define _gloffset_ClearColor 206 -#define _gloffset_ClearStencil 207 -#define _gloffset_ClearDepth 208 -#define _gloffset_StencilMask 209 -#define _gloffset_ColorMask 210 -#define _gloffset_DepthMask 211 -#define _gloffset_IndexMask 212 -#define _gloffset_Accum 213 -#define _gloffset_Disable 214 -#define _gloffset_Enable 215 -#define _gloffset_Finish 216 -#define _gloffset_Flush 217 -#define _gloffset_PopAttrib 218 -#define _gloffset_PushAttrib 219 -#define _gloffset_Map1d 220 -#define _gloffset_Map1f 221 -#define _gloffset_Map2d 222 -#define _gloffset_Map2f 223 -#define _gloffset_MapGrid1d 224 -#define _gloffset_MapGrid1f 225 -#define _gloffset_MapGrid2d 226 -#define _gloffset_MapGrid2f 227 -#define _gloffset_EvalCoord1d 228 -#define _gloffset_EvalCoord1dv 229 -#define _gloffset_EvalCoord1f 230 -#define _gloffset_EvalCoord1fv 231 -#define _gloffset_EvalCoord2d 232 -#define _gloffset_EvalCoord2dv 233 -#define _gloffset_EvalCoord2f 234 -#define _gloffset_EvalCoord2fv 235 -#define _gloffset_EvalMesh1 236 -#define _gloffset_EvalPoint1 237 -#define _gloffset_EvalMesh2 238 -#define _gloffset_EvalPoint2 239 -#define _gloffset_AlphaFunc 240 -#define _gloffset_BlendFunc 241 -#define _gloffset_LogicOp 242 -#define _gloffset_StencilFunc 243 -#define _gloffset_StencilOp 244 -#define _gloffset_DepthFunc 245 -#define _gloffset_PixelZoom 246 -#define _gloffset_PixelTransferf 247 -#define _gloffset_PixelTransferi 248 -#define _gloffset_PixelStoref 249 -#define _gloffset_PixelStorei 250 -#define _gloffset_PixelMapfv 251 -#define _gloffset_PixelMapuiv 252 -#define _gloffset_PixelMapusv 253 -#define _gloffset_ReadBuffer 254 -#define _gloffset_CopyPixels 255 -#define _gloffset_ReadPixels 256 -#define _gloffset_DrawPixels 257 -#define _gloffset_GetBooleanv 258 -#define _gloffset_GetClipPlane 259 -#define _gloffset_GetDoublev 260 -#define _gloffset_GetError 261 -#define _gloffset_GetFloatv 262 -#define _gloffset_GetIntegerv 263 -#define _gloffset_GetLightfv 264 -#define _gloffset_GetLightiv 265 -#define _gloffset_GetMapdv 266 -#define _gloffset_GetMapfv 267 -#define _gloffset_GetMapiv 268 -#define _gloffset_GetMaterialfv 269 -#define _gloffset_GetMaterialiv 270 -#define _gloffset_GetPixelMapfv 271 -#define _gloffset_GetPixelMapuiv 272 -#define _gloffset_GetPixelMapusv 273 -#define _gloffset_GetPolygonStipple 274 -#define _gloffset_GetString 275 -#define _gloffset_GetTexEnvfv 276 -#define _gloffset_GetTexEnviv 277 -#define _gloffset_GetTexGendv 278 -#define _gloffset_GetTexGenfv 279 -#define _gloffset_GetTexGeniv 280 -#define _gloffset_GetTexImage 281 -#define _gloffset_GetTexParameterfv 282 -#define _gloffset_GetTexParameteriv 283 -#define _gloffset_GetTexLevelParameterfv 284 -#define _gloffset_GetTexLevelParameteriv 285 -#define _gloffset_IsEnabled 286 -#define _gloffset_IsList 287 -#define _gloffset_DepthRange 288 -#define _gloffset_Frustum 289 -#define _gloffset_LoadIdentity 290 -#define _gloffset_LoadMatrixf 291 -#define _gloffset_LoadMatrixd 292 -#define _gloffset_MatrixMode 293 -#define _gloffset_MultMatrixf 294 -#define _gloffset_MultMatrixd 295 -#define _gloffset_Ortho 296 -#define _gloffset_PopMatrix 297 -#define _gloffset_PushMatrix 298 -#define _gloffset_Rotated 299 -#define _gloffset_Rotatef 300 -#define _gloffset_Scaled 301 -#define _gloffset_Scalef 302 -#define _gloffset_Translated 303 -#define _gloffset_Translatef 304 -#define _gloffset_Viewport 305 -#define _gloffset_ArrayElement 306 -#define _gloffset_BindTexture 307 -#define _gloffset_ColorPointer 308 -#define _gloffset_DisableClientState 309 -#define _gloffset_DrawArrays 310 -#define _gloffset_DrawElements 311 -#define _gloffset_EdgeFlagPointer 312 -#define _gloffset_EnableClientState 313 -#define _gloffset_IndexPointer 314 -#define _gloffset_Indexub 315 -#define _gloffset_Indexubv 316 -#define _gloffset_InterleavedArrays 317 -#define _gloffset_NormalPointer 318 -#define _gloffset_PolygonOffset 319 -#define _gloffset_TexCoordPointer 320 -#define _gloffset_VertexPointer 321 -#define _gloffset_AreTexturesResident 322 -#define _gloffset_CopyTexImage1D 323 -#define _gloffset_CopyTexImage2D 324 -#define _gloffset_CopyTexSubImage1D 325 -#define _gloffset_CopyTexSubImage2D 326 -#define _gloffset_DeleteTextures 327 -#define _gloffset_GenTextures 328 -#define _gloffset_GetPointerv 329 -#define _gloffset_IsTexture 330 -#define _gloffset_PrioritizeTextures 331 -#define _gloffset_TexSubImage1D 332 -#define _gloffset_TexSubImage2D 333 -#define _gloffset_PopClientAttrib 334 -#define _gloffset_PushClientAttrib 335 -#define _gloffset_BlendColor 336 -#define _gloffset_BlendEquation 337 -#define _gloffset_DrawRangeElements 338 -#define _gloffset_ColorTable 339 -#define _gloffset_ColorTableParameterfv 340 -#define _gloffset_ColorTableParameteriv 341 -#define _gloffset_CopyColorTable 342 -#define _gloffset_GetColorTable 343 -#define _gloffset_GetColorTableParameterfv 344 -#define _gloffset_GetColorTableParameteriv 345 -#define _gloffset_ColorSubTable 346 -#define _gloffset_CopyColorSubTable 347 -#define _gloffset_ConvolutionFilter1D 348 -#define _gloffset_ConvolutionFilter2D 349 -#define _gloffset_ConvolutionParameterf 350 -#define _gloffset_ConvolutionParameterfv 351 -#define _gloffset_ConvolutionParameteri 352 -#define _gloffset_ConvolutionParameteriv 353 -#define _gloffset_CopyConvolutionFilter1D 354 -#define _gloffset_CopyConvolutionFilter2D 355 -#define _gloffset_GetConvolutionFilter 356 -#define _gloffset_GetConvolutionParameterfv 357 -#define _gloffset_GetConvolutionParameteriv 358 -#define _gloffset_GetSeparableFilter 359 -#define _gloffset_SeparableFilter2D 360 -#define _gloffset_GetHistogram 361 -#define _gloffset_GetHistogramParameterfv 362 -#define _gloffset_GetHistogramParameteriv 363 -#define _gloffset_GetMinmax 364 -#define _gloffset_GetMinmaxParameterfv 365 -#define _gloffset_GetMinmaxParameteriv 366 -#define _gloffset_Histogram 367 -#define _gloffset_Minmax 368 -#define _gloffset_ResetHistogram 369 -#define _gloffset_ResetMinmax 370 -#define _gloffset_TexImage3D 371 -#define _gloffset_TexSubImage3D 372 -#define _gloffset_CopyTexSubImage3D 373 -#define _gloffset_ActiveTextureARB 374 -#define _gloffset_ClientActiveTextureARB 375 -#define _gloffset_MultiTexCoord1dARB 376 -#define _gloffset_MultiTexCoord1dvARB 377 -#define _gloffset_MultiTexCoord1fARB 378 -#define _gloffset_MultiTexCoord1fvARB 379 -#define _gloffset_MultiTexCoord1iARB 380 -#define _gloffset_MultiTexCoord1ivARB 381 -#define _gloffset_MultiTexCoord1sARB 382 -#define _gloffset_MultiTexCoord1svARB 383 -#define _gloffset_MultiTexCoord2dARB 384 -#define _gloffset_MultiTexCoord2dvARB 385 -#define _gloffset_MultiTexCoord2fARB 386 -#define _gloffset_MultiTexCoord2fvARB 387 -#define _gloffset_MultiTexCoord2iARB 388 -#define _gloffset_MultiTexCoord2ivARB 389 -#define _gloffset_MultiTexCoord2sARB 390 -#define _gloffset_MultiTexCoord2svARB 391 -#define _gloffset_MultiTexCoord3dARB 392 -#define _gloffset_MultiTexCoord3dvARB 393 -#define _gloffset_MultiTexCoord3fARB 394 -#define _gloffset_MultiTexCoord3fvARB 395 -#define _gloffset_MultiTexCoord3iARB 396 -#define _gloffset_MultiTexCoord3ivARB 397 -#define _gloffset_MultiTexCoord3sARB 398 -#define _gloffset_MultiTexCoord3svARB 399 -#define _gloffset_MultiTexCoord4dARB 400 -#define _gloffset_MultiTexCoord4dvARB 401 -#define _gloffset_MultiTexCoord4fARB 402 -#define _gloffset_MultiTexCoord4fvARB 403 -#define _gloffset_MultiTexCoord4iARB 404 -#define _gloffset_MultiTexCoord4ivARB 405 -#define _gloffset_MultiTexCoord4sARB 406 -#define _gloffset_MultiTexCoord4svARB 407 -#define _gloffset_LoadTransposeMatrixfARB 408 -#define _gloffset_LoadTransposeMatrixdARB 409 -#define _gloffset_MultTransposeMatrixfARB 410 -#define _gloffset_MultTransposeMatrixdARB 411 -#define _gloffset_SampleCoverageARB 412 -#define _gloffset___unused413 413 -#define _gloffset_PolygonOffsetEXT 414 -#define _gloffset_GetTexFilterFuncSGIS 415 -#define _gloffset_TexFilterFuncSGIS 416 -#define _gloffset_GetHistogramEXT 417 -#define _gloffset_GetHistogramParameterfvEXT 418 -#define _gloffset_GetHistogramParameterivEXT 419 -#define _gloffset_GetMinmaxEXT 420 -#define _gloffset_GetMinmaxParameterfvEXT 421 -#define _gloffset_GetMinmaxParameterivEXT 422 -#define _gloffset_GetConvolutionFilterEXT 423 -#define _gloffset_GetConvolutionParameterfvEXT 424 -#define _gloffset_GetConvolutionParameterivEXT 425 -#define _gloffset_GetSeparableFilterEXT 426 -#define _gloffset_GetColorTableSGI 427 -#define _gloffset_GetColorTableParameterfvSGI 428 -#define _gloffset_GetColorTableParameterivSGI 429 -#define _gloffset_PixelTexGenSGIX 430 -#define _gloffset_PixelTexGenParameteriSGIS 431 -#define _gloffset_PixelTexGenParameterivSGIS 432 -#define _gloffset_PixelTexGenParameterfSGIS 433 -#define _gloffset_PixelTexGenParameterfvSGIS 434 -#define _gloffset_GetPixelTexGenParameterivSGIS 435 -#define _gloffset_GetPixelTexGenParameterfvSGIS 436 -#define _gloffset_TexImage4DSGIS 437 -#define _gloffset_TexSubImage4DSGIS 438 -#define _gloffset_AreTexturesResidentEXT 439 -#define _gloffset_GenTexturesEXT 440 -#define _gloffset_IsTextureEXT 441 -#define _gloffset_DetailTexFuncSGIS 442 -#define _gloffset_GetDetailTexFuncSGIS 443 -#define _gloffset_SharpenTexFuncSGIS 444 -#define _gloffset_GetSharpenTexFuncSGIS 445 -#define _gloffset_SampleMaskSGIS 446 -#define _gloffset_SamplePatternSGIS 447 -#define _gloffset_ColorPointerEXT 448 -#define _gloffset_EdgeFlagPointerEXT 449 -#define _gloffset_IndexPointerEXT 450 -#define _gloffset_NormalPointerEXT 451 -#define _gloffset_TexCoordPointerEXT 452 -#define _gloffset_VertexPointerEXT 453 -#define _gloffset_SpriteParameterfSGIX 454 -#define _gloffset_SpriteParameterfvSGIX 455 -#define _gloffset_SpriteParameteriSGIX 456 -#define _gloffset_SpriteParameterivSGIX 457 -#define _gloffset_PointParameterfEXT 458 -#define _gloffset_PointParameterfvEXT 459 -#define _gloffset_GetInstrumentsSGIX 460 -#define _gloffset_InstrumentsBufferSGIX 461 -#define _gloffset_PollInstrumentsSGIX 462 -#define _gloffset_ReadInstrumentsSGIX 463 -#define _gloffset_StartInstrumentsSGIX 464 -#define _gloffset_StopInstrumentsSGIX 465 -#define _gloffset_FrameZoomSGIX 466 -#define _gloffset_TagSampleBufferSGIX 467 -#define _gloffset_ReferencePlaneSGIX 468 -#define _gloffset_FlushRasterSGIX 469 -#define _gloffset_GetListParameterfvSGIX 470 -#define _gloffset_GetListParameterivSGIX 471 -#define _gloffset_ListParameterfSGIX 472 -#define _gloffset_ListParameterfvSGIX 473 -#define _gloffset_ListParameteriSGIX 474 -#define _gloffset_ListParameterivSGIX 475 -#define _gloffset_FragmentColorMaterialSGIX 476 -#define _gloffset_FragmentLightfSGIX 477 -#define _gloffset_FragmentLightfvSGIX 478 -#define _gloffset_FragmentLightiSGIX 479 -#define _gloffset_FragmentLightivSGIX 480 -#define _gloffset_FragmentLightModelfSGIX 481 -#define _gloffset_FragmentLightModelfvSGIX 482 -#define _gloffset_FragmentLightModeliSGIX 483 -#define _gloffset_FragmentLightModelivSGIX 484 -#define _gloffset_FragmentMaterialfSGIX 485 -#define _gloffset_FragmentMaterialfvSGIX 486 -#define _gloffset_FragmentMaterialiSGIX 487 -#define _gloffset_FragmentMaterialivSGIX 488 -#define _gloffset_GetFragmentLightfvSGIX 489 -#define _gloffset_GetFragmentLightivSGIX 490 -#define _gloffset_GetFragmentMaterialfvSGIX 491 -#define _gloffset_GetFragmentMaterialivSGIX 492 -#define _gloffset_LightEnviSGIX 493 -#define _gloffset_VertexWeightfEXT 494 -#define _gloffset_VertexWeightfvEXT 495 -#define _gloffset_VertexWeightPointerEXT 496 -#define _gloffset_FlushVertexArrayRangeNV 497 -#define _gloffset_VertexArrayRangeNV 498 -#define _gloffset_CombinerParameterfvNV 499 -#define _gloffset_CombinerParameterfNV 500 -#define _gloffset_CombinerParameterivNV 501 -#define _gloffset_CombinerParameteriNV 502 -#define _gloffset_CombinerInputNV 503 -#define _gloffset_CombinerOutputNV 504 -#define _gloffset_FinalCombinerInputNV 505 -#define _gloffset_GetCombinerInputParameterfvNV 506 -#define _gloffset_GetCombinerInputParameterivNV 507 -#define _gloffset_GetCombinerOutputParameterfvNV 508 -#define _gloffset_GetCombinerOutputParameterivNV 509 -#define _gloffset_GetFinalCombinerInputParameterfvNV 510 -#define _gloffset_GetFinalCombinerInputParameterivNV 511 -#define _gloffset_ResizeBuffersMESA 512 -#define _gloffset_WindowPos2dMESA 513 -#define _gloffset_WindowPos2dvMESA 514 -#define _gloffset_WindowPos2fMESA 515 -#define _gloffset_WindowPos2fvMESA 516 -#define _gloffset_WindowPos2iMESA 517 -#define _gloffset_WindowPos2ivMESA 518 -#define _gloffset_WindowPos2sMESA 519 -#define _gloffset_WindowPos2svMESA 520 -#define _gloffset_WindowPos3dMESA 521 -#define _gloffset_WindowPos3dvMESA 522 -#define _gloffset_WindowPos3fMESA 523 -#define _gloffset_WindowPos3fvMESA 524 -#define _gloffset_WindowPos3iMESA 525 -#define _gloffset_WindowPos3ivMESA 526 -#define _gloffset_WindowPos3sMESA 527 -#define _gloffset_WindowPos3svMESA 528 -#define _gloffset_WindowPos4dMESA 529 -#define _gloffset_WindowPos4dvMESA 530 -#define _gloffset_WindowPos4fMESA 531 -#define _gloffset_WindowPos4fvMESA 532 -#define _gloffset_WindowPos4iMESA 533 -#define _gloffset_WindowPos4ivMESA 534 -#define _gloffset_WindowPos4sMESA 535 -#define _gloffset_WindowPos4svMESA 536 -#define _gloffset_BlendFuncSeparateEXT 537 -#define _gloffset_IndexMaterialEXT 538 -#define _gloffset_IndexFuncEXT 539 -#define _gloffset_LockArraysEXT 540 -#define _gloffset_UnlockArraysEXT 541 -#define _gloffset_CullParameterdvEXT 542 -#define _gloffset_CullParameterfvEXT 543 -#define _gloffset_HintPGI 544 -#define _gloffset_FogCoordfEXT 545 -#define _gloffset_FogCoordfvEXT 546 -#define _gloffset_FogCoorddEXT 547 -#define _gloffset_FogCoorddvEXT 548 -#define _gloffset_FogCoordPointerEXT 549 -#define _gloffset_GetColorTableEXT 550 -#define _gloffset_GetColorTableParameterivEXT 551 -#define _gloffset_GetColorTableParameterfvEXT 552 -#define _gloffset_TbufferMask3DFX 553 -#define _gloffset_CompressedTexImage3DARB 554 -#define _gloffset_CompressedTexImage2DARB 555 -#define _gloffset_CompressedTexImage1DARB 556 -#define _gloffset_CompressedTexSubImage3DARB 557 -#define _gloffset_CompressedTexSubImage2DARB 558 -#define _gloffset_CompressedTexSubImage1DARB 559 -#define _gloffset_GetCompressedTexImageARB 560 -#define _gloffset_SecondaryColor3bEXT 561 -#define _gloffset_SecondaryColor3bvEXT 562 -#define _gloffset_SecondaryColor3dEXT 563 -#define _gloffset_SecondaryColor3dvEXT 564 -#define _gloffset_SecondaryColor3fEXT 565 -#define _gloffset_SecondaryColor3fvEXT 566 -#define _gloffset_SecondaryColor3iEXT 567 -#define _gloffset_SecondaryColor3ivEXT 568 -#define _gloffset_SecondaryColor3sEXT 569 -#define _gloffset_SecondaryColor3svEXT 570 -#define _gloffset_SecondaryColor3ubEXT 571 -#define _gloffset_SecondaryColor3ubvEXT 572 -#define _gloffset_SecondaryColor3uiEXT 573 -#define _gloffset_SecondaryColor3uivEXT 574 -#define _gloffset_SecondaryColor3usEXT 575 -#define _gloffset_SecondaryColor3usvEXT 576 -#define _gloffset_SecondaryColorPointerEXT 577 -#define _gloffset_AreProgramsResidentNV 578 -#define _gloffset_BindProgramNV 579 -#define _gloffset_DeleteProgramsNV 580 -#define _gloffset_ExecuteProgramNV 581 -#define _gloffset_GenProgramsNV 582 -#define _gloffset_GetProgramParameterdvNV 583 -#define _gloffset_GetProgramParameterfvNV 584 -#define _gloffset_GetProgramivNV 585 -#define _gloffset_GetProgramStringNV 586 -#define _gloffset_GetTrackMatrixivNV 587 -#define _gloffset_GetVertexAttribdvNV 588 -#define _gloffset_GetVertexAttribfvNV 589 -#define _gloffset_GetVertexAttribivNV 590 -#define _gloffset_GetVertexAttribPointervNV 591 -#define _gloffset_IsProgramNV 592 -#define _gloffset_LoadProgramNV 593 -#define _gloffset_ProgramParameter4dNV 594 -#define _gloffset_ProgramParameter4dvNV 595 -#define _gloffset_ProgramParameter4fNV 596 -#define _gloffset_ProgramParameter4fvNV 597 -#define _gloffset_ProgramParameters4dvNV 598 -#define _gloffset_ProgramParameters4fvNV 599 -#define _gloffset_RequestResidentProgramsNV 600 -#define _gloffset_TrackMatrixNV 601 -#define _gloffset_VertexAttribPointerNV 602 -#define _gloffset_VertexAttrib1dNV 603 -#define _gloffset_VertexAttrib1dvNV 604 -#define _gloffset_VertexAttrib1fNV 605 -#define _gloffset_VertexAttrib1fvNV 606 -#define _gloffset_VertexAttrib1sNV 607 -#define _gloffset_VertexAttrib1svNV 608 -#define _gloffset_VertexAttrib2dNV 609 -#define _gloffset_VertexAttrib2dvNV 610 -#define _gloffset_VertexAttrib2fNV 611 -#define _gloffset_VertexAttrib2fvNV 612 -#define _gloffset_VertexAttrib2sNV 613 -#define _gloffset_VertexAttrib2svNV 614 -#define _gloffset_VertexAttrib3dNV 615 -#define _gloffset_VertexAttrib3dvNV 616 -#define _gloffset_VertexAttrib3fNV 617 -#define _gloffset_VertexAttrib3fvNV 618 -#define _gloffset_VertexAttrib3sNV 619 -#define _gloffset_VertexAttrib3svNV 620 -#define _gloffset_VertexAttrib4dNV 621 -#define _gloffset_VertexAttrib4dvNV 622 -#define _gloffset_VertexAttrib4fNV 623 -#define _gloffset_VertexAttrib4fvNV 624 -#define _gloffset_VertexAttrib4sNV 625 -#define _gloffset_VertexAttrib4svNV 626 -#define _gloffset_VertexAttrib4ubNV 627 -#define _gloffset_VertexAttrib4ubvNV 628 -#define _gloffset_VertexAttribs1dvNV 629 -#define _gloffset_VertexAttribs1fvNV 630 -#define _gloffset_VertexAttribs1svNV 631 -#define _gloffset_VertexAttribs2dvNV 632 -#define _gloffset_VertexAttribs2fvNV 633 -#define _gloffset_VertexAttribs2svNV 634 -#define _gloffset_VertexAttribs3dvNV 635 -#define _gloffset_VertexAttribs3fvNV 636 -#define _gloffset_VertexAttribs3svNV 637 -#define _gloffset_VertexAttribs4dvNV 638 -#define _gloffset_VertexAttribs4fvNV 639 -#define _gloffset_VertexAttribs4svNV 640 -#define _gloffset_VertexAttribs4ubvNV 641 -#define _gloffset_PointParameteriNV 642 -#define _gloffset_PointParameterivNV 643 -#define _gloffset_MultiDrawArraysEXT 644 -#define _gloffset_MultiDrawElementsEXT 645 -#define _gloffset_ActiveStencilFaceEXT 646 -#define _gloffset_DeleteFencesNV 647 -#define _gloffset_GenFencesNV 648 -#define _gloffset_IsFenceNV 649 -#define _gloffset_TestFenceNV 650 -#define _gloffset_GetFenceivNV 651 -#define _gloffset_FinishFenceNV 652 -#define _gloffset_SetFenceNV 653 - -#endif Index: xc/extras/Mesa/src/glapitable.h diff -u xc/extras/Mesa/src/glapitable.h:1.6 xc/extras/Mesa/src/glapitable.h:removed --- xc/extras/Mesa/src/glapitable.h:1.6 Sun Sep 28 15:16:55 2003 +++ xc/extras/Mesa/src/glapitable.h Wed Mar 16 21:00:30 2005 @@ -1,665 +0,0 @@ -/* DO NOT EDIT - This file generated automatically with gltable.py script */ -#ifndef _GLAPI_TABLE_H_ -#define _GLAPI_TABLE_H_ - -#include - -struct _glapi_table -{ - void (*NewList)(GLuint list, GLenum mode); /* 0 */ - void (*EndList)(void); /* 1 */ - void (*CallList)(GLuint list); /* 2 */ - void (*CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */ - void (*DeleteLists)(GLuint list, GLsizei range); /* 4 */ - GLuint (*GenLists)(GLsizei range); /* 5 */ - void (*ListBase)(GLuint base); /* 6 */ - void (*Begin)(GLenum mode); /* 7 */ - void (*Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */ - void (*Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */ - void (*Color3bv)(const GLbyte * v); /* 10 */ - void (*Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */ - void (*Color3dv)(const GLdouble * v); /* 12 */ - void (*Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */ - void (*Color3fv)(const GLfloat * v); /* 14 */ - void (*Color3i)(GLint red, GLint green, GLint blue); /* 15 */ - void (*Color3iv)(const GLint * v); /* 16 */ - void (*Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */ - void (*Color3sv)(const GLshort * v); /* 18 */ - void (*Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */ - void (*Color3ubv)(const GLubyte * v); /* 20 */ - void (*Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */ - void (*Color3uiv)(const GLuint * v); /* 22 */ - void (*Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */ - void (*Color3usv)(const GLushort * v); /* 24 */ - void (*Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */ - void (*Color4bv)(const GLbyte * v); /* 26 */ - void (*Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */ - void (*Color4dv)(const GLdouble * v); /* 28 */ - void (*Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */ - void (*Color4fv)(const GLfloat * v); /* 30 */ - void (*Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */ - void (*Color4iv)(const GLint * v); /* 32 */ - void (*Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */ - void (*Color4sv)(const GLshort * v); /* 34 */ - void (*Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */ - void (*Color4ubv)(const GLubyte * v); /* 36 */ - void (*Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */ - void (*Color4uiv)(const GLuint * v); /* 38 */ - void (*Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */ - void (*Color4usv)(const GLushort * v); /* 40 */ - void (*EdgeFlag)(GLboolean flag); /* 41 */ - void (*EdgeFlagv)(const GLboolean * flag); /* 42 */ - void (*End)(void); /* 43 */ - void (*Indexd)(GLdouble c); /* 44 */ - void (*Indexdv)(const GLdouble * c); /* 45 */ - void (*Indexf)(GLfloat c); /* 46 */ - void (*Indexfv)(const GLfloat * c); /* 47 */ - void (*Indexi)(GLint c); /* 48 */ - void (*Indexiv)(const GLint * c); /* 49 */ - void (*Indexs)(GLshort c); /* 50 */ - void (*Indexsv)(const GLshort * c); /* 51 */ - void (*Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */ - void (*Normal3bv)(const GLbyte * v); /* 53 */ - void (*Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */ - void (*Normal3dv)(const GLdouble * v); /* 55 */ - void (*Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */ - void (*Normal3fv)(const GLfloat * v); /* 57 */ - void (*Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */ - void (*Normal3iv)(const GLint * v); /* 59 */ - void (*Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */ - void (*Normal3sv)(const GLshort * v); /* 61 */ - void (*RasterPos2d)(GLdouble x, GLdouble y); /* 62 */ - void (*RasterPos2dv)(const GLdouble * v); /* 63 */ - void (*RasterPos2f)(GLfloat x, GLfloat y); /* 64 */ - void (*RasterPos2fv)(const GLfloat * v); /* 65 */ - void (*RasterPos2i)(GLint x, GLint y); /* 66 */ - void (*RasterPos2iv)(const GLint * v); /* 67 */ - void (*RasterPos2s)(GLshort x, GLshort y); /* 68 */ - void (*RasterPos2sv)(const GLshort * v); /* 69 */ - void (*RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */ - void (*RasterPos3dv)(const GLdouble * v); /* 71 */ - void (*RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */ - void (*RasterPos3fv)(const GLfloat * v); /* 73 */ - void (*RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */ - void (*RasterPos3iv)(const GLint * v); /* 75 */ - void (*RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */ - void (*RasterPos3sv)(const GLshort * v); /* 77 */ - void (*RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */ - void (*RasterPos4dv)(const GLdouble * v); /* 79 */ - void (*RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */ - void (*RasterPos4fv)(const GLfloat * v); /* 81 */ - void (*RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */ - void (*RasterPos4iv)(const GLint * v); /* 83 */ - void (*RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */ - void (*RasterPos4sv)(const GLshort * v); /* 85 */ - void (*Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */ - void (*Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */ - void (*Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */ - void (*Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */ - void (*Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */ - void (*Rectiv)(const GLint * v1, const GLint * v2); /* 91 */ - void (*Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */ - void (*Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */ - void (*TexCoord1d)(GLdouble s); /* 94 */ - void (*TexCoord1dv)(const GLdouble * v); /* 95 */ - void (*TexCoord1f)(GLfloat s); /* 96 */ - void (*TexCoord1fv)(const GLfloat * v); /* 97 */ - void (*TexCoord1i)(GLint s); /* 98 */ - void (*TexCoord1iv)(const GLint * v); /* 99 */ - void (*TexCoord1s)(GLshort s); /* 100 */ - void (*TexCoord1sv)(const GLshort * v); /* 101 */ - void (*TexCoord2d)(GLdouble s, GLdouble t); /* 102 */ - void (*TexCoord2dv)(const GLdouble * v); /* 103 */ - void (*TexCoord2f)(GLfloat s, GLfloat t); /* 104 */ - void (*TexCoord2fv)(const GLfloat * v); /* 105 */ - void (*TexCoord2i)(GLint s, GLint t); /* 106 */ - void (*TexCoord2iv)(const GLint * v); /* 107 */ - void (*TexCoord2s)(GLshort s, GLshort t); /* 108 */ - void (*TexCoord2sv)(const GLshort * v); /* 109 */ - void (*TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */ - void (*TexCoord3dv)(const GLdouble * v); /* 111 */ - void (*TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */ - void (*TexCoord3fv)(const GLfloat * v); /* 113 */ - void (*TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */ - void (*TexCoord3iv)(const GLint * v); /* 115 */ - void (*TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */ - void (*TexCoord3sv)(const GLshort * v); /* 117 */ - void (*TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */ - void (*TexCoord4dv)(const GLdouble * v); /* 119 */ - void (*TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */ - void (*TexCoord4fv)(const GLfloat * v); /* 121 */ - void (*TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */ - void (*TexCoord4iv)(const GLint * v); /* 123 */ - void (*TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */ - void (*TexCoord4sv)(const GLshort * v); /* 125 */ - void (*Vertex2d)(GLdouble x, GLdouble y); /* 126 */ - void (*Vertex2dv)(const GLdouble * v); /* 127 */ - void (*Vertex2f)(GLfloat x, GLfloat y); /* 128 */ - void (*Vertex2fv)(const GLfloat * v); /* 129 */ - void (*Vertex2i)(GLint x, GLint y); /* 130 */ - void (*Vertex2iv)(const GLint * v); /* 131 */ - void (*Vertex2s)(GLshort x, GLshort y); /* 132 */ - void (*Vertex2sv)(const GLshort * v); /* 133 */ - void (*Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */ - void (*Vertex3dv)(const GLdouble * v); /* 135 */ - void (*Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */ - void (*Vertex3fv)(const GLfloat * v); /* 137 */ - void (*Vertex3i)(GLint x, GLint y, GLint z); /* 138 */ - void (*Vertex3iv)(const GLint * v); /* 139 */ - void (*Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */ - void (*Vertex3sv)(const GLshort * v); /* 141 */ - void (*Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */ - void (*Vertex4dv)(const GLdouble * v); /* 143 */ - void (*Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */ - void (*Vertex4fv)(const GLfloat * v); /* 145 */ - void (*Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */ - void (*Vertex4iv)(const GLint * v); /* 147 */ - void (*Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */ - void (*Vertex4sv)(const GLshort * v); /* 149 */ - void (*ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */ - void (*ColorMaterial)(GLenum face, GLenum mode); /* 151 */ - void (*CullFace)(GLenum mode); /* 152 */ - void (*Fogf)(GLenum pname, GLfloat param); /* 153 */ - void (*Fogfv)(GLenum pname, const GLfloat * params); /* 154 */ - void (*Fogi)(GLenum pname, GLint param); /* 155 */ - void (*Fogiv)(GLenum pname, const GLint * params); /* 156 */ - void (*FrontFace)(GLenum mode); /* 157 */ - void (*Hint)(GLenum target, GLenum mode); /* 158 */ - void (*Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */ - void (*Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */ - void (*Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */ - void (*Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */ - void (*LightModelf)(GLenum pname, GLfloat param); /* 163 */ - void (*LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */ - void (*LightModeli)(GLenum pname, GLint param); /* 165 */ - void (*LightModeliv)(GLenum pname, const GLint * params); /* 166 */ - void (*LineStipple)(GLint factor, GLushort pattern); /* 167 */ - void (*LineWidth)(GLfloat width); /* 168 */ - void (*Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */ - void (*Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */ - void (*Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */ - void (*Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */ - void (*PointSize)(GLfloat size); /* 173 */ - void (*PolygonMode)(GLenum face, GLenum mode); /* 174 */ - void (*PolygonStipple)(const GLubyte * mask); /* 175 */ - void (*Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */ - void (*ShadeModel)(GLenum mode); /* 177 */ - void (*TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */ - void (*TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */ - void (*TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */ - void (*TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */ - void (*TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */ - void (*TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */ - void (*TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */ - void (*TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */ - void (*TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */ - void (*TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */ - void (*TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */ - void (*TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */ - void (*TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */ - void (*TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */ - void (*TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */ - void (*TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */ - void (*FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */ - void (*SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */ - GLint (*RenderMode)(GLenum mode); /* 196 */ - void (*InitNames)(void); /* 197 */ - void (*LoadName)(GLuint name); /* 198 */ - void (*PassThrough)(GLfloat token); /* 199 */ - void (*PopName)(void); /* 200 */ - void (*PushName)(GLuint name); /* 201 */ - void (*DrawBuffer)(GLenum mode); /* 202 */ - void (*Clear)(GLbitfield mask); /* 203 */ - void (*ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */ - void (*ClearIndex)(GLfloat c); /* 205 */ - void (*ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */ - void (*ClearStencil)(GLint s); /* 207 */ - void (*ClearDepth)(GLclampd depth); /* 208 */ - void (*StencilMask)(GLuint mask); /* 209 */ - void (*ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */ - void (*DepthMask)(GLboolean flag); /* 211 */ - void (*IndexMask)(GLuint mask); /* 212 */ - void (*Accum)(GLenum op, GLfloat value); /* 213 */ - void (*Disable)(GLenum cap); /* 214 */ - void (*Enable)(GLenum cap); /* 215 */ - void (*Finish)(void); /* 216 */ - void (*Flush)(void); /* 217 */ - void (*PopAttrib)(void); /* 218 */ - void (*PushAttrib)(GLbitfield mask); /* 219 */ - void (*Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */ - void (*Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */ - void (*Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */ - void (*Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */ - void (*MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */ - void (*MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */ - void (*MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */ - void (*MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */ - void (*EvalCoord1d)(GLdouble u); /* 228 */ - void (*EvalCoord1dv)(const GLdouble * u); /* 229 */ - void (*EvalCoord1f)(GLfloat u); /* 230 */ - void (*EvalCoord1fv)(const GLfloat * u); /* 231 */ - void (*EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */ - void (*EvalCoord2dv)(const GLdouble * u); /* 233 */ - void (*EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */ - void (*EvalCoord2fv)(const GLfloat * u); /* 235 */ - void (*EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */ - void (*EvalPoint1)(GLint i); /* 237 */ - void (*EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */ - void (*EvalPoint2)(GLint i, GLint j); /* 239 */ - void (*AlphaFunc)(GLenum func, GLclampf ref); /* 240 */ - void (*BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */ - void (*LogicOp)(GLenum opcode); /* 242 */ - void (*StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */ - void (*StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */ - void (*DepthFunc)(GLenum func); /* 245 */ - void (*PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */ - void (*PixelTransferf)(GLenum pname, GLfloat param); /* 247 */ - void (*PixelTransferi)(GLenum pname, GLint param); /* 248 */ - void (*PixelStoref)(GLenum pname, GLfloat param); /* 249 */ - void (*PixelStorei)(GLenum pname, GLint param); /* 250 */ - void (*PixelMapfv)(GLenum map, GLint mapsize, const GLfloat * values); /* 251 */ - void (*PixelMapuiv)(GLenum map, GLint mapsize, const GLuint * values); /* 252 */ - void (*PixelMapusv)(GLenum map, GLint mapsize, const GLushort * values); /* 253 */ - void (*ReadBuffer)(GLenum mode); /* 254 */ - void (*CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */ - void (*ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */ - void (*DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */ - void (*GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */ - void (*GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */ - void (*GetDoublev)(GLenum pname, GLdouble * params); /* 260 */ - GLenum (*GetError)(void); /* 261 */ - void (*GetFloatv)(GLenum pname, GLfloat * params); /* 262 */ - void (*GetIntegerv)(GLenum pname, GLint * params); /* 263 */ - void (*GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */ - void (*GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */ - void (*GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */ - void (*GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */ - void (*GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */ - void (*GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */ - void (*GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */ - void (*GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */ - void (*GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */ - void (*GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */ - void (*GetPolygonStipple)(GLubyte * mask); /* 274 */ - const GLubyte * (*GetString)(GLenum name); /* 275 */ - void (*GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */ - void (*GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */ - void (*GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */ - void (*GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */ - void (*GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */ - void (*GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */ - void (*GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */ - void (*GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */ - void (*GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */ - void (*GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */ - GLboolean (*IsEnabled)(GLenum cap); /* 286 */ - GLboolean (*IsList)(GLuint list); /* 287 */ - void (*DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */ - void (*Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */ - void (*LoadIdentity)(void); /* 290 */ - void (*LoadMatrixf)(const GLfloat * m); /* 291 */ - void (*LoadMatrixd)(const GLdouble * m); /* 292 */ - void (*MatrixMode)(GLenum mode); /* 293 */ - void (*MultMatrixf)(const GLfloat * m); /* 294 */ - void (*MultMatrixd)(const GLdouble * m); /* 295 */ - void (*Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */ - void (*PopMatrix)(void); /* 297 */ - void (*PushMatrix)(void); /* 298 */ - void (*Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */ - void (*Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */ - void (*Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */ - void (*Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */ - void (*Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */ - void (*Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */ - void (*Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */ - void (*ArrayElement)(GLint i); /* 306 */ - void (*BindTexture)(GLenum target, GLuint texture); /* 307 */ - void (*ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */ - void (*DisableClientState)(GLenum array); /* 309 */ - void (*DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */ - void (*DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */ - void (*EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */ - void (*EnableClientState)(GLenum array); /* 313 */ - void (*IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */ - void (*Indexub)(GLubyte c); /* 315 */ - void (*Indexubv)(const GLubyte * c); /* 316 */ - void (*InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */ - void (*NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */ - void (*PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */ - void (*TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */ - void (*VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */ - GLboolean (*AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */ - void (*CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */ - void (*CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */ - void (*CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */ - void (*CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */ - void (*DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */ - void (*GenTextures)(GLsizei n, GLuint * textures); /* 328 */ - void (*GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */ - GLboolean (*IsTexture)(GLuint texture); /* 330 */ - void (*PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */ - void (*TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */ - void (*TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */ - void (*PopClientAttrib)(void); /* 334 */ - void (*PushClientAttrib)(GLbitfield mask); /* 335 */ - void (*BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */ - void (*BlendEquation)(GLenum mode); /* 337 */ - void (*DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */ - void (*ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */ - void (*ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */ - void (*ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */ - void (*CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */ - void (*GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */ - void (*GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */ - void (*GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */ - void (*ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */ - void (*CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */ - void (*ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */ - void (*ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */ - void (*ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */ - void (*ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */ - void (*ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */ - void (*ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */ - void (*CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */ - void (*CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */ - void (*GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */ - void (*GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */ - void (*GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */ - void (*GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */ - void (*SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */ - void (*GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */ - void (*GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */ - void (*GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */ - void (*GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */ - void (*GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */ - void (*GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */ - void (*Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */ - void (*Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */ - void (*ResetHistogram)(GLenum target); /* 369 */ - void (*ResetMinmax)(GLenum target); /* 370 */ - void (*TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */ - void (*TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */ - void (*CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */ - void (*ActiveTextureARB)(GLenum texture); /* 374 */ - void (*ClientActiveTextureARB)(GLenum texture); /* 375 */ - void (*MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */ - void (*MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */ - void (*MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */ - void (*MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */ - void (*MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */ - void (*MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */ - void (*MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */ - void (*MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */ - void (*MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */ - void (*MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */ - void (*MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */ - void (*MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */ - void (*MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */ - void (*MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */ - void (*MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */ - void (*MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */ - void (*MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */ - void (*MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */ - void (*MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */ - void (*MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */ - void (*MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */ - void (*MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */ - void (*MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */ - void (*MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */ - void (*MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */ - void (*MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */ - void (*MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */ - void (*MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */ - void (*MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */ - void (*MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */ - void (*MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */ - void (*MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */ - void (*LoadTransposeMatrixfARB)(const GLfloat * m); /* 408 */ - void (*LoadTransposeMatrixdARB)(const GLdouble * m); /* 409 */ - void (*MultTransposeMatrixfARB)(const GLfloat * m); /* 410 */ - void (*MultTransposeMatrixdARB)(const GLdouble * m); /* 411 */ - void (*SampleCoverageARB)(GLclampf value, GLboolean invert); /* 412 */ - void (*__unused413)(void); /* 413 */ - void (*PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 414 */ - void (*GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights); /* 415 */ - void (*TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights); /* 416 */ - void (*GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 417 */ - void (*GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 418 */ - void (*GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 419 */ - void (*GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 420 */ - void (*GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 421 */ - void (*GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 422 */ - void (*GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 423 */ - void (*GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 424 */ - void (*GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 425 */ - void (*GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 426 */ - void (*GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 427 */ - void (*GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params); /* 428 */ - void (*GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params); /* 429 */ - void (*PixelTexGenSGIX)(GLenum mode); /* 430 */ - void (*PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 431 */ - void (*PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 432 */ - void (*PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 433 */ - void (*PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 434 */ - void (*GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 435 */ - void (*GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 436 */ - void (*TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 437 */ - void (*TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels); /* 438 */ - GLboolean (*AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 439 */ - void (*GenTexturesEXT)(GLsizei n, GLuint * textures); /* 440 */ - GLboolean (*IsTextureEXT)(GLuint texture); /* 441 */ - void (*DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); /* 442 */ - void (*GetDetailTexFuncSGIS)(GLenum target, GLfloat * points); /* 443 */ - void (*SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); /* 444 */ - void (*GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points); /* 445 */ - void (*SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 446 */ - void (*SamplePatternSGIS)(GLenum pattern); /* 447 */ - void (*ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 448 */ - void (*EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 449 */ - void (*IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 450 */ - void (*NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 451 */ - void (*TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 452 */ - void (*VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 453 */ - void (*SpriteParameterfSGIX)(GLenum pname, GLfloat param); /* 454 */ - void (*SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params); /* 455 */ - void (*SpriteParameteriSGIX)(GLenum pname, GLint param); /* 456 */ - void (*SpriteParameterivSGIX)(GLenum pname, const GLint * params); /* 457 */ - void (*PointParameterfEXT)(GLenum pname, GLfloat param); /* 458 */ - void (*PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 459 */ - GLint (*GetInstrumentsSGIX)(void); /* 460 */ - void (*InstrumentsBufferSGIX)(GLsizei size, GLint * buffer); /* 461 */ - GLint (*PollInstrumentsSGIX)(GLint * marker_p); /* 462 */ - void (*ReadInstrumentsSGIX)(GLint marker); /* 463 */ - void (*StartInstrumentsSGIX)(void); /* 464 */ - void (*StopInstrumentsSGIX)(GLint marker); /* 465 */ - void (*FrameZoomSGIX)(GLint factor); /* 466 */ - void (*TagSampleBufferSGIX)(void); /* 467 */ - void (*ReferencePlaneSGIX)(const GLdouble * equation); /* 468 */ - void (*FlushRasterSGIX)(void); /* 469 */ - void (*GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params); /* 470 */ - void (*GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params); /* 471 */ - void (*ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param); /* 472 */ - void (*ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params); /* 473 */ - void (*ListParameteriSGIX)(GLuint list, GLenum pname, GLint param); /* 474 */ - void (*ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params); /* 475 */ - void (*FragmentColorMaterialSGIX)(GLenum face, GLenum mode); /* 476 */ - void (*FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param); /* 477 */ - void (*FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params); /* 478 */ - void (*FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param); /* 479 */ - void (*FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params); /* 480 */ - void (*FragmentLightModelfSGIX)(GLenum pname, GLfloat param); /* 481 */ - void (*FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params); /* 482 */ - void (*FragmentLightModeliSGIX)(GLenum pname, GLint param); /* 483 */ - void (*FragmentLightModelivSGIX)(GLenum pname, const GLint * params); /* 484 */ - void (*FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param); /* 485 */ - void (*FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params); /* 486 */ - void (*FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param); /* 487 */ - void (*FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params); /* 488 */ - void (*GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params); /* 489 */ - void (*GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params); /* 490 */ - void (*GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params); /* 491 */ - void (*GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params); /* 492 */ - void (*LightEnviSGIX)(GLenum pname, GLint param); /* 493 */ - void (*VertexWeightfEXT)(GLfloat weight); /* 494 */ - void (*VertexWeightfvEXT)(const GLfloat * weight); /* 495 */ - void (*VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 496 */ - void (*FlushVertexArrayRangeNV)(void); /* 497 */ - void (*VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 498 */ - void (*CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 499 */ - void (*CombinerParameterfNV)(GLenum pname, GLfloat param); /* 500 */ - void (*CombinerParameterivNV)(GLenum pname, const GLint * params); /* 501 */ - void (*CombinerParameteriNV)(GLenum pname, GLint param); /* 502 */ - void (*CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 503 */ - void (*CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 504 */ - void (*FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 505 */ - void (*GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 506 */ - void (*GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 507 */ - void (*GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 508 */ - void (*GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 509 */ - void (*GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 510 */ - void (*GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 511 */ - void (*ResizeBuffersMESA)(void); /* 512 */ - void (*WindowPos2dMESA)(GLdouble x, GLdouble y); /* 513 */ - void (*WindowPos2dvMESA)(const GLdouble * v); /* 514 */ - void (*WindowPos2fMESA)(GLfloat x, GLfloat y); /* 515 */ - void (*WindowPos2fvMESA)(const GLfloat * v); /* 516 */ - void (*WindowPos2iMESA)(GLint x, GLint y); /* 517 */ - void (*WindowPos2ivMESA)(const GLint * v); /* 518 */ - void (*WindowPos2sMESA)(GLshort x, GLshort y); /* 519 */ - void (*WindowPos2svMESA)(const GLshort * v); /* 520 */ - void (*WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 521 */ - void (*WindowPos3dvMESA)(const GLdouble * v); /* 522 */ - void (*WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 523 */ - void (*WindowPos3fvMESA)(const GLfloat * v); /* 524 */ - void (*WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 525 */ - void (*WindowPos3ivMESA)(const GLint * v); /* 526 */ - void (*WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 527 */ - void (*WindowPos3svMESA)(const GLshort * v); /* 528 */ - void (*WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 529 */ - void (*WindowPos4dvMESA)(const GLdouble * v); /* 530 */ - void (*WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 531 */ - void (*WindowPos4fvMESA)(const GLfloat * v); /* 532 */ - void (*WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 533 */ - void (*WindowPos4ivMESA)(const GLint * v); /* 534 */ - void (*WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 535 */ - void (*WindowPos4svMESA)(const GLshort * v); /* 536 */ - void (*BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 537 */ - void (*IndexMaterialEXT)(GLenum face, GLenum mode); /* 538 */ - void (*IndexFuncEXT)(GLenum func, GLclampf ref); /* 539 */ - void (*LockArraysEXT)(GLint first, GLsizei count); /* 540 */ - void (*UnlockArraysEXT)(void); /* 541 */ - void (*CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 542 */ - void (*CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 543 */ - void (*HintPGI)(GLenum target, GLint mode); /* 544 */ - void (*FogCoordfEXT)(GLfloat coord); /* 545 */ - void (*FogCoordfvEXT)(const GLfloat * coord); /* 546 */ - void (*FogCoorddEXT)(GLdouble coord); /* 547 */ - void (*FogCoorddvEXT)(const GLdouble * coord); /* 548 */ - void (*FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 549 */ - void (*GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data); /* 550 */ - void (*GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 551 */ - void (*GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 552 */ - void (*TbufferMask3DFX)(GLuint mask); /* 553 */ - void (*CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 554 */ - void (*CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 555 */ - void (*CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 556 */ - void (*CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 557 */ - void (*CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 558 */ - void (*CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 559 */ - void (*GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 560 */ - void (*SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 561 */ - void (*SecondaryColor3bvEXT)(const GLbyte * v); /* 562 */ - void (*SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 563 */ - void (*SecondaryColor3dvEXT)(const GLdouble * v); /* 564 */ - void (*SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 565 */ - void (*SecondaryColor3fvEXT)(const GLfloat * v); /* 566 */ - void (*SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 567 */ - void (*SecondaryColor3ivEXT)(const GLint * v); /* 568 */ - void (*SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 569 */ - void (*SecondaryColor3svEXT)(const GLshort * v); /* 570 */ - void (*SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 571 */ - void (*SecondaryColor3ubvEXT)(const GLubyte * v); /* 572 */ - void (*SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 573 */ - void (*SecondaryColor3uivEXT)(const GLuint * v); /* 574 */ - void (*SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 575 */ - void (*SecondaryColor3usvEXT)(const GLushort * v); /* 576 */ - void (*SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 577 */ - GLboolean (*AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 578 */ - void (*BindProgramNV)(GLenum target, GLuint id); /* 579 */ - void (*DeleteProgramsNV)(GLsizei n, const GLuint * ids); /* 580 */ - void (*ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 581 */ - void (*GenProgramsNV)(GLsizei n, GLuint * ids); /* 582 */ - void (*GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 583 */ - void (*GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 584 */ - void (*GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 585 */ - void (*GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 586 */ - void (*GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 587 */ - void (*GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 588 */ - void (*GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 589 */ - void (*GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 590 */ - void (*GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 591 */ - GLboolean (*IsProgramNV)(GLuint id); /* 592 */ - void (*LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 593 */ - void (*ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 594 */ - void (*ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); /* 595 */ - void (*ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 596 */ - void (*ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); /* 597 */ - void (*ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 598 */ - void (*ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 599 */ - void (*RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 600 */ - void (*TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 601 */ - void (*VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 602 */ - void (*VertexAttrib1dNV)(GLuint index, GLdouble x); /* 603 */ - void (*VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 604 */ - void (*VertexAttrib1fNV)(GLuint index, GLfloat x); /* 605 */ - void (*VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 606 */ - void (*VertexAttrib1sNV)(GLuint index, GLshort x); /* 607 */ - void (*VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 608 */ - void (*VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 609 */ - void (*VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 610 */ - void (*VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 611 */ - void (*VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 612 */ - void (*VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 613 */ - void (*VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 614 */ - void (*VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 615 */ - void (*VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 616 */ - void (*VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 617 */ - void (*VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 618 */ - void (*VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 619 */ - void (*VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 620 */ - void (*VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 621 */ - void (*VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 622 */ - void (*VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 623 */ - void (*VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 624 */ - void (*VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 625 */ - void (*VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 626 */ - void (*VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 627 */ - void (*VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 628 */ - void (*VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 629 */ - void (*VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 630 */ - void (*VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 631 */ - void (*VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 632 */ - void (*VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 633 */ - void (*VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 634 */ - void (*VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 635 */ - void (*VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 636 */ - void (*VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 637 */ - void (*VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 638 */ - void (*VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 639 */ - void (*VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 640 */ - void (*VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 641 */ - void (*PointParameteriNV)(GLenum pname, GLint params); /* 642 */ - void (*PointParameterivNV)(GLenum pname, const GLint * params); /* 643 */ - void (*MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 644 */ - void (*MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 645 */ - void (*ActiveStencilFaceEXT)(GLenum face); /* 646 */ - void (*DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 647 */ - void (*GenFencesNV)(GLsizei n, GLuint * fences); /* 648 */ - GLboolean (*IsFenceNV)(GLuint fence); /* 649 */ - GLboolean (*TestFenceNV)(GLuint fence); /* 650 */ - void (*GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 651 */ - void (*FinishFenceNV)(GLuint fence); /* 652 */ - void (*SetFenceNV)(GLuint fence, GLenum condition); /* 653 */ -}; - -#endif Index: xc/extras/Mesa/src/glapitemp.h diff -u xc/extras/Mesa/src/glapitemp.h:1.7 xc/extras/Mesa/src/glapitemp.h:removed --- xc/extras/Mesa/src/glapitemp.h:1.7 Thu Nov 6 13:37:51 2003 +++ xc/extras/Mesa/src/glapitemp.h Wed Mar 16 21:00:30 2005 @@ -1,5181 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/glapitemp.h,v 1.7 2003/11/06 18:37:51 tsi Exp $ */ - -/* DO NOT EDIT! This file is generated by the glapitemp.py script. */ - -/* - * Note directed upstream: - * - * glapitemp.py doesn't handle GLbitfield's properly. Until that's corrected, - * I'm changing this file directly. - * - * Marc Aurele La France, tsi@xfree86.org - */ - -/* - * This file is a template which generates the OpenGL API entry point - * functions. It should be included by a .c file which first defines - * the following macros: - * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32 - * KEYWORD2 - usually nothing, but might be __stdcall on Win32 - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. - * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value - * - * Here's an example which generates the usual OpenGL functions: - * #define KEYWORD1 - * #define KEYWORD2 - * #define NAME(func) gl##func - * #define DISPATCH(func, args, msg) \ - * struct _glapi_table *dispatch = CurrentDispatch; \ - * (*dispatch->func) args - * #define RETURN DISPATCH(func, args, msg) \ - * struct _glapi_table *dispatch = CurrentDispatch; \ - * return (*dispatch->func) args - * - */ - - -#ifndef KEYWORD1 -#define KEYWORD1 -#endif - -#ifndef KEYWORD2 -#define KEYWORD2 -#endif - -#ifndef NAME -#error NAME must be defined -#endif - -#ifndef DISPATCH -#error DISPATCH must be defined -#endif - -#ifndef RETURN_DISPATCH -#error RETURN_DISPATCH must be defined -#endif - -GLAPI void GLAPIENTRY gl__unused413(void); /* silence warning */ - -KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode) -{ - DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(EndList)(void) -{ - DISPATCH(EndList, (), (F, "glEndList();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(CallList)(GLuint list) -{ - DISPATCH(CallList, (list), (F, "glCallList(%d);\n", list)); -} - -KEYWORD1 void KEYWORD2 NAME(CallLists)(GLsizei n, GLenum type, const GLvoid * lists) -{ - DISPATCH(CallLists, (n, type, lists), (F, "glCallLists(%d, 0x%x, %p);\n", n, type, (const void *) lists)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteLists)(GLuint list, GLsizei range) -{ - DISPATCH(DeleteLists, (list, range), (F, "glDeleteLists(%d, %d);\n", list, range)); -} - -KEYWORD1 GLuint KEYWORD2 NAME(GenLists)(GLsizei range) -{ - RETURN_DISPATCH(GenLists, (range), (F, "glGenLists(%d);\n", range)); -} - -KEYWORD1 void KEYWORD2 NAME(ListBase)(GLuint base) -{ - DISPATCH(ListBase, (base), (F, "glListBase(%d);\n", base)); -} - -KEYWORD1 void KEYWORD2 NAME(Begin)(GLenum mode) -{ - DISPATCH(Begin, (mode), (F, "glBegin(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap) -{ - DISPATCH(Bitmap, (width, height, xorig, yorig, xmove, ymove, bitmap), (F, "glBitmap(%d, %d, %f, %f, %f, %f, %p);\n", width, height, xorig, yorig, xmove, ymove, (const void *) bitmap)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - DISPATCH(Color3b, (red, green, blue), (F, "glColor3b(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3bv)(const GLbyte * v) -{ - DISPATCH(Color3bv, (v), (F, "glColor3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - DISPATCH(Color3d, (red, green, blue), (F, "glColor3d(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3dv)(const GLdouble * v) -{ - DISPATCH(Color3dv, (v), (F, "glColor3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Color3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - DISPATCH(Color3f, (red, green, blue), (F, "glColor3f(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3fv)(const GLfloat * v) -{ - DISPATCH(Color3fv, (v), (F, "glColor3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Color3i)(GLint red, GLint green, GLint blue) -{ - DISPATCH(Color3i, (red, green, blue), (F, "glColor3i(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3iv)(const GLint * v) -{ - DISPATCH(Color3iv, (v), (F, "glColor3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3s)(GLshort red, GLshort green, GLshort blue) -{ - DISPATCH(Color3s, (red, green, blue), (F, "glColor3s(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3sv)(const GLshort * v) -{ - DISPATCH(Color3sv, (v), (F, "glColor3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - DISPATCH(Color3ub, (red, green, blue), (F, "glColor3ub(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ubv)(const GLubyte * v) -{ - DISPATCH(Color3ubv, (v), (F, "glColor3ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ui)(GLuint red, GLuint green, GLuint blue) -{ - DISPATCH(Color3ui, (red, green, blue), (F, "glColor3ui(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3uiv)(const GLuint * v) -{ - DISPATCH(Color3uiv, (v), (F, "glColor3uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3us)(GLushort red, GLushort green, GLushort blue) -{ - DISPATCH(Color3us, (red, green, blue), (F, "glColor3us(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3usv)(const GLushort * v) -{ - DISPATCH(Color3usv, (v), (F, "glColor3usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - DISPATCH(Color4b, (red, green, blue, alpha), (F, "glColor4b(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4bv)(const GLbyte * v) -{ - DISPATCH(Color4bv, (v), (F, "glColor4bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - DISPATCH(Color4d, (red, green, blue, alpha), (F, "glColor4d(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4dv)(const GLdouble * v) -{ - DISPATCH(Color4dv, (v), (F, "glColor4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - DISPATCH(Color4f, (red, green, blue, alpha), (F, "glColor4f(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4fv)(const GLfloat * v) -{ - DISPATCH(Color4fv, (v), (F, "glColor4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(Color4i)(GLint red, GLint green, GLint blue, GLint alpha) -{ - DISPATCH(Color4i, (red, green, blue, alpha), (F, "glColor4i(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4iv)(const GLint * v) -{ - DISPATCH(Color4iv, (v), (F, "glColor4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - DISPATCH(Color4s, (red, green, blue, alpha), (F, "glColor4s(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4sv)(const GLshort * v) -{ - DISPATCH(Color4sv, (v), (F, "glColor4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - DISPATCH(Color4ub, (red, green, blue, alpha), (F, "glColor4ub(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ubv)(const GLubyte * v) -{ - DISPATCH(Color4ubv, (v), (F, "glColor4ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - DISPATCH(Color4ui, (red, green, blue, alpha), (F, "glColor4ui(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4uiv)(const GLuint * v) -{ - DISPATCH(Color4uiv, (v), (F, "glColor4uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - DISPATCH(Color4us, (red, green, blue, alpha), (F, "glColor4us(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4usv)(const GLushort * v) -{ - DISPATCH(Color4usv, (v), (F, "glColor4usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlag)(GLboolean flag) -{ - DISPATCH(EdgeFlag, (flag), (F, "glEdgeFlag(%d);\n", flag)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagv)(const GLboolean * flag) -{ - DISPATCH(EdgeFlagv, (flag), (F, "glEdgeFlagv(%p);\n", (const void *) flag)); -} - -KEYWORD1 void KEYWORD2 NAME(End)(void) -{ - DISPATCH(End, (), (F, "glEnd();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Indexd)(GLdouble c) -{ - DISPATCH(Indexd, (c), (F, "glIndexd(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexdv)(const GLdouble * c) -{ - DISPATCH(Indexdv, (c), (F, "glIndexdv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexf)(GLfloat c) -{ - DISPATCH(Indexf, (c), (F, "glIndexf(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexfv)(const GLfloat * c) -{ - DISPATCH(Indexfv, (c), (F, "glIndexfv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexi)(GLint c) -{ - DISPATCH(Indexi, (c), (F, "glIndexi(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexiv)(const GLint * c) -{ - DISPATCH(Indexiv, (c), (F, "glIndexiv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexs)(GLshort c) -{ - DISPATCH(Indexs, (c), (F, "glIndexs(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexsv)(const GLshort * c) -{ - DISPATCH(Indexsv, (c), (F, "glIndexsv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz) -{ - DISPATCH(Normal3b, (nx, ny, nz), (F, "glNormal3b(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3bv)(const GLbyte * v) -{ - DISPATCH(Normal3bv, (v), (F, "glNormal3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz) -{ - DISPATCH(Normal3d, (nx, ny, nz), (F, "glNormal3d(%f, %f, %f);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3dv)(const GLdouble * v) -{ - DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz) -{ - DISPATCH(Normal3f, (nx, ny, nz), (F, "glNormal3f(%f, %f, %f);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3fv)(const GLfloat * v) -{ - DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3i)(GLint nx, GLint ny, GLint nz) -{ - DISPATCH(Normal3i, (nx, ny, nz), (F, "glNormal3i(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3iv)(const GLint * v) -{ - DISPATCH(Normal3iv, (v), (F, "glNormal3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3s)(GLshort nx, GLshort ny, GLshort nz) -{ - DISPATCH(Normal3s, (nx, ny, nz), (F, "glNormal3s(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3sv)(const GLshort * v) -{ - DISPATCH(Normal3sv, (v), (F, "glNormal3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2d)(GLdouble x, GLdouble y) -{ - DISPATCH(RasterPos2d, (x, y), (F, "glRasterPos2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2dv)(const GLdouble * v) -{ - DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2f)(GLfloat x, GLfloat y) -{ - DISPATCH(RasterPos2f, (x, y), (F, "glRasterPos2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2fv)(const GLfloat * v) -{ - DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2i)(GLint x, GLint y) -{ - DISPATCH(RasterPos2i, (x, y), (F, "glRasterPos2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2iv)(const GLint * v) -{ - DISPATCH(RasterPos2iv, (v), (F, "glRasterPos2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2s)(GLshort x, GLshort y) -{ - DISPATCH(RasterPos2s, (x, y), (F, "glRasterPos2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2sv)(const GLshort * v) -{ - DISPATCH(RasterPos2sv, (v), (F, "glRasterPos2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(RasterPos3d, (x, y, z), (F, "glRasterPos3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3dv)(const GLdouble * v) -{ - DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(RasterPos3f, (x, y, z), (F, "glRasterPos3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3fv)(const GLfloat * v) -{ - DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3i)(GLint x, GLint y, GLint z) -{ - DISPATCH(RasterPos3i, (x, y, z), (F, "glRasterPos3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3iv)(const GLint * v) -{ - DISPATCH(RasterPos3iv, (v), (F, "glRasterPos3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3s)(GLshort x, GLshort y, GLshort z) -{ - DISPATCH(RasterPos3s, (x, y, z), (F, "glRasterPos3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3sv)(const GLshort * v) -{ - DISPATCH(RasterPos3sv, (v), (F, "glRasterPos3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DISPATCH(RasterPos4d, (x, y, z, w), (F, "glRasterPos4d(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4dv)(const GLdouble * v) -{ - DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DISPATCH(RasterPos4f, (x, y, z, w), (F, "glRasterPos4f(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4fv)(const GLfloat * v) -{ - DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4i)(GLint x, GLint y, GLint z, GLint w) -{ - DISPATCH(RasterPos4i, (x, y, z, w), (F, "glRasterPos4i(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4iv)(const GLint * v) -{ - DISPATCH(RasterPos4iv, (v), (F, "glRasterPos4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - DISPATCH(RasterPos4s, (x, y, z, w), (F, "glRasterPos4s(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4sv)(const GLshort * v) -{ - DISPATCH(RasterPos4sv, (v), (F, "glRasterPos4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - DISPATCH(Rectd, (x1, y1, x2, y2), (F, "glRectd(%f, %f, %f, %f);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectdv)(const GLdouble * v1, const GLdouble * v2) -{ - DISPATCH(Rectdv, (v1, v2), (F, "glRectdv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - DISPATCH(Rectf, (x1, y1, x2, y2), (F, "glRectf(%f, %f, %f, %f);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectfv)(const GLfloat * v1, const GLfloat * v2) -{ - DISPATCH(Rectfv, (v1, v2), (F, "glRectfv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Recti)(GLint x1, GLint y1, GLint x2, GLint y2) -{ - DISPATCH(Recti, (x1, y1, x2, y2), (F, "glRecti(%d, %d, %d, %d);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectiv)(const GLint * v1, const GLint * v2) -{ - DISPATCH(Rectiv, (v1, v2), (F, "glRectiv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - DISPATCH(Rects, (x1, y1, x2, y2), (F, "glRects(%d, %d, %d, %d);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectsv)(const GLshort * v1, const GLshort * v2) -{ - DISPATCH(Rectsv, (v1, v2), (F, "glRectsv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1d)(GLdouble s) -{ - DISPATCH(TexCoord1d, (s), (F, "glTexCoord1d(%f);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1dv)(const GLdouble * v) -{ - DISPATCH(TexCoord1dv, (v), (F, "glTexCoord1dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1f)(GLfloat s) -{ - DISPATCH(TexCoord1f, (s), (F, "glTexCoord1f(%f);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1fv)(const GLfloat * v) -{ - DISPATCH(TexCoord1fv, (v), (F, "glTexCoord1fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1i)(GLint s) -{ - DISPATCH(TexCoord1i, (s), (F, "glTexCoord1i(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1iv)(const GLint * v) -{ - DISPATCH(TexCoord1iv, (v), (F, "glTexCoord1iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1s)(GLshort s) -{ - DISPATCH(TexCoord1s, (s), (F, "glTexCoord1s(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1sv)(const GLshort * v) -{ - DISPATCH(TexCoord1sv, (v), (F, "glTexCoord1sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2d)(GLdouble s, GLdouble t) -{ - DISPATCH(TexCoord2d, (s, t), (F, "glTexCoord2d(%f, %f);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2dv)(const GLdouble * v) -{ - DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2f)(GLfloat s, GLfloat t) -{ - DISPATCH(TexCoord2f, (s, t), (F, "glTexCoord2f(%f, %f);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2fv)(const GLfloat * v) -{ - DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2i)(GLint s, GLint t) -{ - DISPATCH(TexCoord2i, (s, t), (F, "glTexCoord2i(%d, %d);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2iv)(const GLint * v) -{ - DISPATCH(TexCoord2iv, (v), (F, "glTexCoord2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2s)(GLshort s, GLshort t) -{ - DISPATCH(TexCoord2s, (s, t), (F, "glTexCoord2s(%d, %d);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2sv)(const GLshort * v) -{ - DISPATCH(TexCoord2sv, (v), (F, "glTexCoord2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r) -{ - DISPATCH(TexCoord3d, (s, t, r), (F, "glTexCoord3d(%f, %f, %f);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3dv)(const GLdouble * v) -{ - DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r) -{ - DISPATCH(TexCoord3f, (s, t, r), (F, "glTexCoord3f(%f, %f, %f);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3fv)(const GLfloat * v) -{ - DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3i)(GLint s, GLint t, GLint r) -{ - DISPATCH(TexCoord3i, (s, t, r), (F, "glTexCoord3i(%d, %d, %d);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3iv)(const GLint * v) -{ - DISPATCH(TexCoord3iv, (v), (F, "glTexCoord3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3s)(GLshort s, GLshort t, GLshort r) -{ - DISPATCH(TexCoord3s, (s, t, r), (F, "glTexCoord3s(%d, %d, %d);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3sv)(const GLshort * v) -{ - DISPATCH(TexCoord3sv, (v), (F, "glTexCoord3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - DISPATCH(TexCoord4d, (s, t, r, q), (F, "glTexCoord4d(%f, %f, %f, %f);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4dv)(const GLdouble * v) -{ - DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - DISPATCH(TexCoord4f, (s, t, r, q), (F, "glTexCoord4f(%f, %f, %f, %f);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat * v) -{ - DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4i)(GLint s, GLint t, GLint r, GLint q) -{ - DISPATCH(TexCoord4i, (s, t, r, q), (F, "glTexCoord4i(%d, %d, %d, %d);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4iv)(const GLint * v) -{ - DISPATCH(TexCoord4iv, (v), (F, "glTexCoord4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) -{ - DISPATCH(TexCoord4s, (s, t, r, q), (F, "glTexCoord4s(%d, %d, %d, %d);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4sv)(const GLshort * v) -{ - DISPATCH(TexCoord4sv, (v), (F, "glTexCoord4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2d)(GLdouble x, GLdouble y) -{ - DISPATCH(Vertex2d, (x, y), (F, "glVertex2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2dv)(const GLdouble * v) -{ - DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2f)(GLfloat x, GLfloat y) -{ - DISPATCH(Vertex2f, (x, y), (F, "glVertex2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2fv)(const GLfloat * v) -{ - DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2i)(GLint x, GLint y) -{ - DISPATCH(Vertex2i, (x, y), (F, "glVertex2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2iv)(const GLint * v) -{ - DISPATCH(Vertex2iv, (v), (F, "glVertex2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2s)(GLshort x, GLshort y) -{ - DISPATCH(Vertex2s, (x, y), (F, "glVertex2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2sv)(const GLshort * v) -{ - DISPATCH(Vertex2sv, (v), (F, "glVertex2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3d)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(Vertex3d, (x, y, z), (F, "glVertex3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3dv)(const GLdouble * v) -{ - DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3f)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(Vertex3f, (x, y, z), (F, "glVertex3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3fv)(const GLfloat * v) -{ - DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3i)(GLint x, GLint y, GLint z) -{ - DISPATCH(Vertex3i, (x, y, z), (F, "glVertex3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3iv)(const GLint * v) -{ - DISPATCH(Vertex3iv, (v), (F, "glVertex3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3s)(GLshort x, GLshort y, GLshort z) -{ - DISPATCH(Vertex3s, (x, y, z), (F, "glVertex3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3sv)(const GLshort * v) -{ - DISPATCH(Vertex3sv, (v), (F, "glVertex3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DISPATCH(Vertex4d, (x, y, z, w), (F, "glVertex4d(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4dv)(const GLdouble * v) -{ - DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DISPATCH(Vertex4f, (x, y, z, w), (F, "glVertex4f(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4fv)(const GLfloat * v) -{ - DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4i)(GLint x, GLint y, GLint z, GLint w) -{ - DISPATCH(Vertex4i, (x, y, z, w), (F, "glVertex4i(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4iv)(const GLint * v) -{ - DISPATCH(Vertex4iv, (v), (F, "glVertex4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - DISPATCH(Vertex4s, (x, y, z, w), (F, "glVertex4s(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4sv)(const GLshort * v) -{ - DISPATCH(Vertex4sv, (v), (F, "glVertex4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(ClipPlane)(GLenum plane, const GLdouble * equation) -{ - DISPATCH(ClipPlane, (plane, equation), (F, "glClipPlane(0x%x, %p);\n", plane, (const void *) equation)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMaterial)(GLenum face, GLenum mode) -{ - DISPATCH(ColorMaterial, (face, mode), (F, "glColorMaterial(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(CullFace)(GLenum mode) -{ - DISPATCH(CullFace, (mode), (F, "glCullFace(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogf)(GLenum pname, GLfloat param) -{ - DISPATCH(Fogf, (pname, param), (F, "glFogf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogfv)(GLenum pname, const GLfloat * params) -{ - DISPATCH(Fogfv, (pname, params), (F, "glFogfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogi)(GLenum pname, GLint param) -{ - DISPATCH(Fogi, (pname, param), (F, "glFogi(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogiv)(GLenum pname, const GLint * params) -{ - DISPATCH(Fogiv, (pname, params), (F, "glFogiv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FrontFace)(GLenum mode) -{ - DISPATCH(FrontFace, (mode), (F, "glFrontFace(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Hint)(GLenum target, GLenum mode) -{ - DISPATCH(Hint, (target, mode), (F, "glHint(0x%x, 0x%x);\n", target, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightf)(GLenum light, GLenum pname, GLfloat param) -{ - DISPATCH(Lightf, (light, pname, param), (F, "glLightf(0x%x, 0x%x, %f);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightfv)(GLenum light, GLenum pname, const GLfloat * params) -{ - DISPATCH(Lightfv, (light, pname, params), (F, "glLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Lighti)(GLenum light, GLenum pname, GLint param) -{ - DISPATCH(Lighti, (light, pname, param), (F, "glLighti(0x%x, 0x%x, %d);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightiv)(GLenum light, GLenum pname, const GLint * params) -{ - DISPATCH(Lightiv, (light, pname, params), (F, "glLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModelf)(GLenum pname, GLfloat param) -{ - DISPATCH(LightModelf, (pname, param), (F, "glLightModelf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModelfv)(GLenum pname, const GLfloat * params) -{ - DISPATCH(LightModelfv, (pname, params), (F, "glLightModelfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModeli)(GLenum pname, GLint param) -{ - DISPATCH(LightModeli, (pname, param), (F, "glLightModeli(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModeliv)(GLenum pname, const GLint * params) -{ - DISPATCH(LightModeliv, (pname, params), (F, "glLightModeliv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LineStipple)(GLint factor, GLushort pattern) -{ - DISPATCH(LineStipple, (factor, pattern), (F, "glLineStipple(%d, %d);\n", factor, pattern)); -} - -KEYWORD1 void KEYWORD2 NAME(LineWidth)(GLfloat width) -{ - DISPATCH(LineWidth, (width), (F, "glLineWidth(%f);\n", width)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialf)(GLenum face, GLenum pname, GLfloat param) -{ - DISPATCH(Materialf, (face, pname, param), (F, "glMaterialf(0x%x, 0x%x, %f);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialfv)(GLenum face, GLenum pname, const GLfloat * params) -{ - DISPATCH(Materialfv, (face, pname, params), (F, "glMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Materiali)(GLenum face, GLenum pname, GLint param) -{ - DISPATCH(Materiali, (face, pname, param), (F, "glMateriali(0x%x, 0x%x, %d);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialiv)(GLenum face, GLenum pname, const GLint * params) -{ - DISPATCH(Materialiv, (face, pname, params), (F, "glMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointSize)(GLfloat size) -{ - DISPATCH(PointSize, (size), (F, "glPointSize(%f);\n", size)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonMode)(GLenum face, GLenum mode) -{ - DISPATCH(PolygonMode, (face, mode), (F, "glPolygonMode(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonStipple)(const GLubyte * mask) -{ - DISPATCH(PolygonStipple, (mask), (F, "glPolygonStipple(%p);\n", (const void *) mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(Scissor, (x, y, width, height), (F, "glScissor(%d, %d, %d, %d);\n", x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ShadeModel)(GLenum mode) -{ - DISPATCH(ShadeModel, (mode), (F, "glShadeModel(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterf)(GLenum target, GLenum pname, GLfloat param) -{ - DISPATCH(TexParameterf, (target, pname, param), (F, "glTexParameterf(0x%x, 0x%x, %f);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(TexParameterfv, (target, pname, params), (F, "glTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameteri)(GLenum target, GLenum pname, GLint param) -{ - DISPATCH(TexParameteri, (target, pname, param), (F, "glTexParameteri(0x%x, 0x%x, %d);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(TexParameteriv, (target, pname, params), (F, "glTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexImage1D, (target, level, internalformat, width, border, format, type, pixels), (F, "glTexImage1D(0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexImage2D, (target, level, internalformat, width, height, border, format, type, pixels), (F, "glTexImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvf)(GLenum target, GLenum pname, GLfloat param) -{ - DISPATCH(TexEnvf, (target, pname, param), (F, "glTexEnvf(0x%x, 0x%x, %f);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(TexEnvfv, (target, pname, params), (F, "glTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvi)(GLenum target, GLenum pname, GLint param) -{ - DISPATCH(TexEnvi, (target, pname, param), (F, "glTexEnvi(0x%x, 0x%x, %d);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnviv)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(TexEnviv, (target, pname, params), (F, "glTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGend)(GLenum coord, GLenum pname, GLdouble param) -{ - DISPATCH(TexGend, (coord, pname, param), (F, "glTexGend(0x%x, 0x%x, %f);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGendv)(GLenum coord, GLenum pname, const GLdouble * params) -{ - DISPATCH(TexGendv, (coord, pname, params), (F, "glTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGenf)(GLenum coord, GLenum pname, GLfloat param) -{ - DISPATCH(TexGenf, (coord, pname, param), (F, "glTexGenf(0x%x, 0x%x, %f);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params) -{ - DISPATCH(TexGenfv, (coord, pname, params), (F, "glTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGeni)(GLenum coord, GLenum pname, GLint param) -{ - DISPATCH(TexGeni, (coord, pname, param), (F, "glTexGeni(0x%x, 0x%x, %d);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGeniv)(GLenum coord, GLenum pname, const GLint * params) -{ - DISPATCH(TexGeniv, (coord, pname, params), (F, "glTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer) -{ - DISPATCH(FeedbackBuffer, (size, type, buffer), (F, "glFeedbackBuffer(%d, 0x%x, %p);\n", size, type, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(SelectBuffer)(GLsizei size, GLuint * buffer) -{ - DISPATCH(SelectBuffer, (size, buffer), (F, "glSelectBuffer(%d, %p);\n", size, (const void *) buffer)); -} - -KEYWORD1 GLint KEYWORD2 NAME(RenderMode)(GLenum mode) -{ - RETURN_DISPATCH(RenderMode, (mode), (F, "glRenderMode(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(InitNames)(void) -{ - DISPATCH(InitNames, (), (F, "glInitNames();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(LoadName)(GLuint name) -{ - DISPATCH(LoadName, (name), (F, "glLoadName(%d);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(PassThrough)(GLfloat token) -{ - DISPATCH(PassThrough, (token), (F, "glPassThrough(%f);\n", token)); -} - -KEYWORD1 void KEYWORD2 NAME(PopName)(void) -{ - DISPATCH(PopName, (), (F, "glPopName();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushName)(GLuint name) -{ - DISPATCH(PushName, (name), (F, "glPushName(%d);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffer)(GLenum mode) -{ - DISPATCH(DrawBuffer, (mode), (F, "glDrawBuffer(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask) -{ - DISPATCH(Clear, (mask), (F, "glClear(%x);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - DISPATCH(ClearAccum, (red, green, blue, alpha), (F, "glClearAccum(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearIndex)(GLfloat c) -{ - DISPATCH(ClearIndex, (c), (F, "glClearIndex(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - DISPATCH(ClearColor, (red, green, blue, alpha), (F, "glClearColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearStencil)(GLint s) -{ - DISPATCH(ClearStencil, (s), (F, "glClearStencil(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearDepth)(GLclampd depth) -{ - DISPATCH(ClearDepth, (depth), (F, "glClearDepth(%f);\n", depth)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilMask)(GLuint mask) -{ - DISPATCH(StencilMask, (mask), (F, "glStencilMask(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - DISPATCH(ColorMask, (red, green, blue, alpha), (F, "glColorMask(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthMask)(GLboolean flag) -{ - DISPATCH(DepthMask, (flag), (F, "glDepthMask(%d);\n", flag)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexMask)(GLuint mask) -{ - DISPATCH(IndexMask, (mask), (F, "glIndexMask(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Accum)(GLenum op, GLfloat value) -{ - DISPATCH(Accum, (op, value), (F, "glAccum(0x%x, %f);\n", op, value)); -} - -KEYWORD1 void KEYWORD2 NAME(Disable)(GLenum cap) -{ - DISPATCH(Disable, (cap), (F, "glDisable(0x%x);\n", cap)); -} - -KEYWORD1 void KEYWORD2 NAME(Enable)(GLenum cap) -{ - DISPATCH(Enable, (cap), (F, "glEnable(0x%x);\n", cap)); -} - -KEYWORD1 void KEYWORD2 NAME(Finish)(void) -{ - DISPATCH(Finish, (), (F, "glFinish();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Flush)(void) -{ - DISPATCH(Flush, (), (F, "glFlush();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PopAttrib)(void) -{ - DISPATCH(PopAttrib, (), (F, "glPopAttrib();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushAttrib)(GLbitfield mask) -{ - DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%x);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points) -{ - DISPATCH(Map1d, (target, u1, u2, stride, order, points), (F, "glMap1d(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points) -{ - DISPATCH(Map1f, (target, u1, u2, stride, order, points), (F, "glMap1f(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points) -{ - DISPATCH(Map2d, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2d(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points) -{ - DISPATCH(Map2f, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2f(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2) -{ - DISPATCH(MapGrid1d, (un, u1, u2), (F, "glMapGrid1d(%d, %f, %f);\n", un, u1, u2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2) -{ - DISPATCH(MapGrid1f, (un, u1, u2), (F, "glMapGrid1f(%d, %f, %f);\n", un, u1, u2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - DISPATCH(MapGrid2d, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2d(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - DISPATCH(MapGrid2f, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2f(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1d)(GLdouble u) -{ - DISPATCH(EvalCoord1d, (u), (F, "glEvalCoord1d(%f);\n", u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1dv)(const GLdouble * u) -{ - DISPATCH(EvalCoord1dv, (u), (F, "glEvalCoord1dv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1f)(GLfloat u) -{ - DISPATCH(EvalCoord1f, (u), (F, "glEvalCoord1f(%f);\n", u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1fv)(const GLfloat * u) -{ - DISPATCH(EvalCoord1fv, (u), (F, "glEvalCoord1fv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2d)(GLdouble u, GLdouble v) -{ - DISPATCH(EvalCoord2d, (u, v), (F, "glEvalCoord2d(%f, %f);\n", u, v)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2dv)(const GLdouble * u) -{ - DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p /* %g, %g */);\n", (const void *) u, u[0], u[1])); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2f)(GLfloat u, GLfloat v) -{ - DISPATCH(EvalCoord2f, (u, v), (F, "glEvalCoord2f(%f, %f);\n", u, v)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2fv)(const GLfloat * u) -{ - DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p /* %g, %g */);\n", (const void *) u, u[0], u[1])); -} - -KEYWORD1 void KEYWORD2 NAME(EvalMesh1)(GLenum mode, GLint i1, GLint i2) -{ - DISPATCH(EvalMesh1, (mode, i1, i2), (F, "glEvalMesh1(0x%x, %d, %d);\n", mode, i1, i2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalPoint1)(GLint i) -{ - DISPATCH(EvalPoint1, (i), (F, "glEvalPoint1(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - DISPATCH(EvalMesh2, (mode, i1, i2, j1, j2), (F, "glEvalMesh2(0x%x, %d, %d, %d, %d);\n", mode, i1, i2, j1, j2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalPoint2)(GLint i, GLint j) -{ - DISPATCH(EvalPoint2, (i, j), (F, "glEvalPoint2(%d, %d);\n", i, j)); -} - -KEYWORD1 void KEYWORD2 NAME(AlphaFunc)(GLenum func, GLclampf ref) -{ - DISPATCH(AlphaFunc, (func, ref), (F, "glAlphaFunc(0x%x, %f);\n", func, ref)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFunc)(GLenum sfactor, GLenum dfactor) -{ - DISPATCH(BlendFunc, (sfactor, dfactor), (F, "glBlendFunc(0x%x, 0x%x);\n", sfactor, dfactor)); -} - -KEYWORD1 void KEYWORD2 NAME(LogicOp)(GLenum opcode) -{ - DISPATCH(LogicOp, (opcode), (F, "glLogicOp(0x%x);\n", opcode)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilFunc)(GLenum func, GLint ref, GLuint mask) -{ - DISPATCH(StencilFunc, (func, ref, mask), (F, "glStencilFunc(0x%x, %d, %d);\n", func, ref, mask)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass) -{ - DISPATCH(StencilOp, (fail, zfail, zpass), (F, "glStencilOp(0x%x, 0x%x, 0x%x);\n", fail, zfail, zpass)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthFunc)(GLenum func) -{ - DISPATCH(DepthFunc, (func), (F, "glDepthFunc(0x%x);\n", func)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelZoom)(GLfloat xfactor, GLfloat yfactor) -{ - DISPATCH(PixelZoom, (xfactor, yfactor), (F, "glPixelZoom(%f, %f);\n", xfactor, yfactor)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTransferf)(GLenum pname, GLfloat param) -{ - DISPATCH(PixelTransferf, (pname, param), (F, "glPixelTransferf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTransferi)(GLenum pname, GLint param) -{ - DISPATCH(PixelTransferi, (pname, param), (F, "glPixelTransferi(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelStoref)(GLenum pname, GLfloat param) -{ - DISPATCH(PixelStoref, (pname, param), (F, "glPixelStoref(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelStorei)(GLenum pname, GLint param) -{ - DISPATCH(PixelStorei, (pname, param), (F, "glPixelStorei(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapfv)(GLenum map, GLint mapsize, const GLfloat * values) -{ - DISPATCH(PixelMapfv, (map, mapsize, values), (F, "glPixelMapfv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapuiv)(GLenum map, GLint mapsize, const GLuint * values) -{ - DISPATCH(PixelMapuiv, (map, mapsize, values), (F, "glPixelMapuiv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapusv)(GLenum map, GLint mapsize, const GLushort * values) -{ - DISPATCH(PixelMapusv, (map, mapsize, values), (F, "glPixelMapusv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadBuffer)(GLenum mode) -{ - DISPATCH(ReadBuffer, (mode), (F, "glReadBuffer(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - DISPATCH(CopyPixels, (x, y, width, height, type), (F, "glCopyPixels(%d, %d, %d, %d, 0x%x);\n", x, y, width, height, type)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) -{ - DISPATCH(ReadPixels, (x, y, width, height, format, type, pixels), (F, "glReadPixels(%d, %d, %d, %d, 0x%x, 0x%x, %p);\n", x, y, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(DrawPixels, (width, height, format, type, pixels), (F, "glDrawPixels(%d, %d, 0x%x, 0x%x, %p);\n", width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBooleanv)(GLenum pname, GLboolean * params) -{ - DISPATCH(GetBooleanv, (pname, params), (F, "glGetBooleanv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetClipPlane)(GLenum plane, GLdouble * equation) -{ - DISPATCH(GetClipPlane, (plane, equation), (F, "glGetClipPlane(0x%x, %p);\n", plane, (const void *) equation)); -} - -KEYWORD1 void KEYWORD2 NAME(GetDoublev)(GLenum pname, GLdouble * params) -{ - DISPATCH(GetDoublev, (pname, params), (F, "glGetDoublev(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(GetError)(void) -{ - RETURN_DISPATCH(GetError, (), (F, "glGetError();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(GetFloatv)(GLenum pname, GLfloat * params) -{ - DISPATCH(GetFloatv, (pname, params), (F, "glGetFloatv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetIntegerv)(GLenum pname, GLint * params) -{ - DISPATCH(GetIntegerv, (pname, params), (F, "glGetIntegerv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetLightfv)(GLenum light, GLenum pname, GLfloat * params) -{ - DISPATCH(GetLightfv, (light, pname, params), (F, "glGetLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetLightiv)(GLenum light, GLenum pname, GLint * params) -{ - DISPATCH(GetLightiv, (light, pname, params), (F, "glGetLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapdv)(GLenum target, GLenum query, GLdouble * v) -{ - DISPATCH(GetMapdv, (target, query, v), (F, "glGetMapdv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapfv)(GLenum target, GLenum query, GLfloat * v) -{ - DISPATCH(GetMapfv, (target, query, v), (F, "glGetMapfv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapiv)(GLenum target, GLenum query, GLint * v) -{ - DISPATCH(GetMapiv, (target, query, v), (F, "glGetMapiv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params) -{ - DISPATCH(GetMaterialfv, (face, pname, params), (F, "glGetMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMaterialiv)(GLenum face, GLenum pname, GLint * params) -{ - DISPATCH(GetMaterialiv, (face, pname, params), (F, "glGetMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapfv)(GLenum map, GLfloat * values) -{ - DISPATCH(GetPixelMapfv, (map, values), (F, "glGetPixelMapfv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapuiv)(GLenum map, GLuint * values) -{ - DISPATCH(GetPixelMapuiv, (map, values), (F, "glGetPixelMapuiv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapusv)(GLenum map, GLushort * values) -{ - DISPATCH(GetPixelMapusv, (map, values), (F, "glGetPixelMapusv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPolygonStipple)(GLubyte * mask) -{ - DISPATCH(GetPolygonStipple, (mask), (F, "glGetPolygonStipple(%p);\n", (const void *) mask)); -} - -KEYWORD1 const GLubyte * KEYWORD2 NAME(GetString)(GLenum name) -{ - RETURN_DISPATCH(GetString, (name), (F, "glGetString(0x%x);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetTexEnvfv, (target, pname, params), (F, "glGetTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexEnviv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetTexEnviv, (target, pname, params), (F, "glGetTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params) -{ - DISPATCH(GetTexGendv, (coord, pname, params), (F, "glGetTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params) -{ - DISPATCH(GetTexGenfv, (coord, pname, params), (F, "glGetTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGeniv)(GLenum coord, GLenum pname, GLint * params) -{ - DISPATCH(GetTexGeniv, (coord, pname, params), (F, "glGetTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) -{ - DISPATCH(GetTexImage, (target, level, format, type, pixels), (F, "glGetTexImage(0x%x, %d, 0x%x, 0x%x, %p);\n", target, level, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetTexParameterfv, (target, pname, params), (F, "glGetTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetTexParameteriv, (target, pname, params), (F, "glGetTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params) -{ - DISPATCH(GetTexLevelParameterfv, (target, level, pname, params), (F, "glGetTexLevelParameterfv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params) -{ - DISPATCH(GetTexLevelParameteriv, (target, level, pname, params), (F, "glGetTexLevelParameteriv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabled)(GLenum cap) -{ - RETURN_DISPATCH(IsEnabled, (cap), (F, "glIsEnabled(0x%x);\n", cap)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsList)(GLuint list) -{ - RETURN_DISPATCH(IsList, (list), (F, "glIsList(%d);\n", list)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthRange)(GLclampd zNear, GLclampd zFar) -{ - DISPATCH(DepthRange, (zNear, zFar), (F, "glDepthRange(%f, %f);\n", zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - DISPATCH(Frustum, (left, right, bottom, top, zNear, zFar), (F, "glFrustum(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadIdentity)(void) -{ - DISPATCH(LoadIdentity, (), (F, "glLoadIdentity();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(LoadMatrixf)(const GLfloat * m) -{ - DISPATCH(LoadMatrixf, (m), (F, "glLoadMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadMatrixd)(const GLdouble * m) -{ - DISPATCH(LoadMatrixd, (m), (F, "glLoadMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MatrixMode)(GLenum mode) -{ - DISPATCH(MatrixMode, (mode), (F, "glMatrixMode(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(MultMatrixf)(const GLfloat * m) -{ - DISPATCH(MultMatrixf, (m), (F, "glMultMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultMatrixd)(const GLdouble * m) -{ - DISPATCH(MultMatrixd, (m), (F, "glMultMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - DISPATCH(Ortho, (left, right, bottom, top, zNear, zFar), (F, "glOrtho(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(PopMatrix)(void) -{ - DISPATCH(PopMatrix, (), (F, "glPopMatrix();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushMatrix)(void) -{ - DISPATCH(PushMatrix, (), (F, "glPushMatrix();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(Rotated, (angle, x, y, z), (F, "glRotated(%f, %f, %f, %f);\n", angle, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(Rotatef, (angle, x, y, z), (F, "glRotatef(%f, %f, %f, %f);\n", angle, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Scaled)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(Scaled, (x, y, z), (F, "glScaled(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Scalef)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(Scalef, (x, y, z), (F, "glScalef(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Translated)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(Translated, (x, y, z), (F, "glTranslated(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Translatef)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(Translatef, (x, y, z), (F, "glTranslatef(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(Viewport, (x, y, width, height), (F, "glViewport(%d, %d, %d, %d);\n", x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ArrayElement)(GLint i) -{ - DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(DisableClientState)(GLenum array) -{ - DISPATCH(DisableClientState, (array), (F, "glDisableClientState(0x%x);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArrays)(GLenum mode, GLint first, GLsizei count) -{ - DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArrays(0x%x, %d, %d);\n", mode, first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices) -{ - DISPATCH(DrawElements, (mode, count, type, indices), (F, "glDrawElements(0x%x, %d, 0x%x, %p);\n", mode, count, type, (const void *) indices)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(EdgeFlagPointer, (stride, pointer), (F, "glEdgeFlagPointer(%d, %p);\n", stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(EnableClientState)(GLenum array) -{ - DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params) -{ - DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(InterleavedArrays, (format, stride, pointer), (F, "glInterleavedArrays(0x%x, %d, %p);\n", format, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units) -{ - DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1D(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture) -{ - DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures) -{ - DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures) -{ - DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture) -{ - RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities) -{ - DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexub)(GLubyte c) -{ - DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexubv)(const GLubyte * c) -{ - DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(PopClientAttrib)(void) -{ - DISPATCH(PopClientAttrib, (), (F, "glPopClientAttrib();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushClientAttrib)(GLbitfield mask) -{ - DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%x);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquation)(GLenum mode) -{ - DISPATCH(BlendEquation, (mode), (F, "glBlendEquation(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) -{ - DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElements(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTable(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) -{ - DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTable(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) -{ - DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1D(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) -{ - DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params) -{ - DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterf(0x%x, 0x%x, %f);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params) -{ - DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteri(0x%x, 0x%x, %d);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1D(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2D(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) -{ - DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); -} - -KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) -{ - DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(Minmax)(GLenum target, GLenum internalformat, GLboolean sink) -{ - DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmax(0x%x, 0x%x, %d);\n", target, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetHistogram)(GLenum target) -{ - DISPATCH(ResetHistogram, (target), (F, "glResetHistogram(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetMinmax)(GLenum target) -{ - DISPATCH(ResetMinmax, (target), (F, "glResetMinmax(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3D(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveTextureARB)(GLenum texture) -{ - DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTextureARB(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ClientActiveTextureARB)(GLenum texture) -{ - DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTextureARB(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dARB)(GLenum target, GLdouble s) -{ - DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1dARB(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dvARB)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fARB)(GLenum target, GLfloat s) -{ - DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1fARB(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fvARB)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iARB)(GLenum target, GLint s) -{ - DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1iARB(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1ivARB)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sARB)(GLenum target, GLshort s) -{ - DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1sARB(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1svARB)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t) -{ - DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2dARB(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t) -{ - DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2fARB(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t) -{ - DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2iARB(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2ivARB)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t) -{ - DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2sARB(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2svARB)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3dARB(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3fARB(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r) -{ - DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3iARB(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3ivARB)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3sARB(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3svARB)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4dARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4fARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4iARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4ivARB)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4sARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixfARB)(const GLfloat * m) -{ - DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixfARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixdARB)(const GLdouble * m) -{ - DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixdARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixfARB)(const GLfloat * m) -{ - DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixfARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixdARB)(const GLdouble * m) -{ - DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixdARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleCoverageARB)(GLclampf value, GLboolean invert) -{ - DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverageARB(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(__unused413)(void) -{ - DISPATCH(__unused413, (), (F, "gl__unused413();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img) -{ - DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture) -{ - DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTexture(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture) -{ - DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTexture(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1d)(GLenum target, GLdouble s) -{ - DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1d(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dv)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1f)(GLenum target, GLfloat s) -{ - DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1f(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fv)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1i)(GLenum target, GLint s) -{ - DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1i(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iv)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1s)(GLenum target, GLshort s) -{ - DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1s(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sv)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t) -{ - DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2d(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dv)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dv(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t) -{ - DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2f(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fv)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fv(0x%x, %p /* %g, %g */);\n", target, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2i)(GLenum target, GLint s, GLint t) -{ - DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2i(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iv)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t) -{ - DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2s(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sv)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3d(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dv)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dv(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3f(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fv)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fv(0x%x, %p /* %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r) -{ - DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3i(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iv)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3s(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sv)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4d(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dv)(GLenum target, const GLdouble * v) -{ - DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dv(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fv)(GLenum target, const GLfloat * v) -{ - DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fv(0x%x, %p /* %g, %g, %g, %g */);\n", target, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4i(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iv)(GLenum target, const GLint * v) -{ - DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4s(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sv)(GLenum target, const GLshort * v) -{ - DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixf)(const GLfloat * m) -{ - DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m) -{ - DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixf)(const GLfloat * m) -{ - DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixd)(const GLdouble * m) -{ - DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert) -{ - DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1D(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImage)(GLenum target, GLint level, GLvoid * img) -{ - DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImage(0x%x, %d, %p);\n", target, level, (const void *) img)); -} - -/* No dispatch for WeightbvARB() */ -/* No dispatch for WeightsvARB() */ -/* No dispatch for WeightivARB() */ -/* No dispatch for WeightfvARB() */ -/* No dispatch for WeightdvARB() */ -/* No dispatch for WeightubvARB() */ -/* No dispatch for WeightusvARB() */ -/* No dispatch for WeightuivARB() */ -/* No dispatch for WeightPointerARB() */ -/* No dispatch for VertexBlendARB() */ -/* No dispatch for CurrentPaletteMatrixARB() */ -/* No dispatch for MatrixIndexubvARB() */ -/* No dispatch for MatrixIndexusvARB() */ -/* No dispatch for MatrixIndexuivARB() */ -/* No dispatch for MatrixIndexPointerARB() */ -KEYWORD1 void KEYWORD2 NAME(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColorEXT(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) -{ - DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights) -{ - DISPATCH(GetTexFilterFuncSGIS, (target, filter, weights), (F, "glGetTexFilterFuncSGIS(0x%x, 0x%x, %p);\n", target, filter, (const void *) weights)); -} - -KEYWORD1 void KEYWORD2 NAME(TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights) -{ - DISPATCH(TexFilterFuncSGIS, (target, filter, n, weights), (F, "glTexFilterFuncSGIS(0x%x, 0x%x, %d, %p);\n", target, filter, n, (const void *) weights)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1DEXT(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1DEXT(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetHistogramEXT, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetHistogramParameterfvEXT, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetHistogramParameterivEXT, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetMinmaxEXT, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetMinmaxParameterfvEXT, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetMinmaxParameterivEXT, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(HistogramEXT)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogramEXT(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(MinmaxEXT)(GLenum target, GLenum internalformat, GLboolean sink) -{ - DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmaxEXT(0x%x, 0x%x, %d);\n", target, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetHistogramEXT)(GLenum target) -{ - DISPATCH(ResetHistogram, (target), (F, "glResetHistogramEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetMinmaxEXT)(GLenum target) -{ - DISPATCH(ResetMinmax, (target), (F, "glResetMinmaxEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) -{ - DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1DEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) -{ - DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfEXT)(GLenum target, GLenum pname, GLfloat params) -{ - DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterfEXT(0x%x, 0x%x, %f);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfvEXT)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriEXT)(GLenum target, GLenum pname, GLint params) -{ - DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteriEXT(0x%x, 0x%x, %d);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterivEXT)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1DEXT(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2DEXT)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - DISPATCH(GetConvolutionFilterEXT, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetConvolutionParameterfvEXT, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetConvolutionParameterivEXT, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) -{ - DISPATCH(GetSeparableFilterEXT, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); -} - -KEYWORD1 void KEYWORD2 NAME(SeparableFilter2DEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) -{ - DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableSGI)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfvSGI)(GLenum target, GLenum pname, const GLfloat * params) -{ - DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameterivSGI)(GLenum target, GLenum pname, const GLint * params) -{ - DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorTableSGI)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTableSGI(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - DISPATCH(GetColorTableSGI, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetColorTableParameterfvSGI, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetColorTableParameterivSGI, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTexGenSGIX)(GLenum mode) -{ - DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameteriSGIS)(GLenum pname, GLint param) -{ - DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params) -{ - DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param) -{ - DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params) -{ - DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params) -{ - DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params) -{ - DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexImage4DSGIS, (target, level, internalformat, width, height, depth, size4d, border, format, type, pixels), (F, "glTexImage4DSGIS(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, size4d, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels) -{ - DISPATCH(TexSubImage4DSGIS, (target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels), (F, "glTexSubImage4DSGIS(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, (const void *) pixels)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - RETURN_DISPATCH(AreTexturesResidentEXT, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(BindTextureEXT)(GLenum target, GLuint texture) -{ - DISPATCH(BindTexture, (target, texture), (F, "glBindTextureEXT(0x%x, %d);\n", target, texture)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures) -{ - DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures) -{ - DISPATCH(GenTexturesEXT, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture) -{ - RETURN_DISPATCH(IsTextureEXT, (texture), (F, "glIsTextureEXT(%d);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(PrioritizeTexturesEXT)(GLsizei n, const GLuint * textures, const GLclampf * priorities) -{ - DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTexturesEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); -} - -KEYWORD1 void KEYWORD2 NAME(DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points) -{ - DISPATCH(DetailTexFuncSGIS, (target, n, points), (F, "glDetailTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(GetDetailTexFuncSGIS)(GLenum target, GLfloat * points) -{ - DISPATCH(GetDetailTexFuncSGIS, (target, points), (F, "glGetDetailTexFuncSGIS(0x%x, %p);\n", target, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points) -{ - DISPATCH(SharpenTexFuncSGIS, (target, n, points), (F, "glSharpenTexFuncSGIS(0x%x, %d, %p);\n", target, n, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points) -{ - DISPATCH(GetSharpenTexFuncSGIS, (target, points), (F, "glGetSharpenTexFuncSGIS(0x%x, %p);\n", target, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleMaskSGIS)(GLclampf value, GLboolean invert) -{ - DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplePatternSGIS)(GLenum pattern) -{ - DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern)); -} - -KEYWORD1 void KEYWORD2 NAME(ArrayElementEXT)(GLint i) -{ - DISPATCH(ArrayElement, (i), (F, "glArrayElementEXT(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - DISPATCH(ColorPointerEXT, (size, type, stride, count, pointer), (F, "glColorPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count) -{ - DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArraysEXT(0x%x, %d, %d);\n", mode, first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer) -{ - DISPATCH(EdgeFlagPointerEXT, (stride, count, pointer), (F, "glEdgeFlagPointerEXT(%d, %d, %p);\n", stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPointervEXT)(GLenum pname, GLvoid ** params) -{ - DISPATCH(GetPointerv, (pname, params), (F, "glGetPointervEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - DISPATCH(IndexPointerEXT, (type, stride, count, pointer), (F, "glIndexPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - DISPATCH(NormalPointerEXT, (type, stride, count, pointer), (F, "glNormalPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - DISPATCH(TexCoordPointerEXT, (size, type, stride, count, pointer), (F, "glTexCoordPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - DISPATCH(VertexPointerEXT, (size, type, stride, count, pointer), (F, "glVertexPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationEXT)(GLenum mode) -{ - DISPATCH(BlendEquation, (mode), (F, "glBlendEquationEXT(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(SpriteParameterfSGIX)(GLenum pname, GLfloat param) -{ - DISPATCH(SpriteParameterfSGIX, (pname, param), (F, "glSpriteParameterfSGIX(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params) -{ - DISPATCH(SpriteParameterfvSGIX, (pname, params), (F, "glSpriteParameterfvSGIX(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(SpriteParameteriSGIX)(GLenum pname, GLint param) -{ - DISPATCH(SpriteParameteriSGIX, (pname, param), (F, "glSpriteParameteriSGIX(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(SpriteParameterivSGIX)(GLenum pname, const GLint * params) -{ - DISPATCH(SpriteParameterivSGIX, (pname, params), (F, "glSpriteParameterivSGIX(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param) -{ - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * params) -{ - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfARB)(GLenum pname, GLfloat param) -{ - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfARB(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfvARB)(GLenum pname, const GLfloat * params) -{ - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvARB(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfSGIS)(GLenum pname, GLfloat param) -{ - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfvSGIS)(GLenum pname, const GLfloat * params) -{ - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetInstrumentsSGIX)(void) -{ - RETURN_DISPATCH(GetInstrumentsSGIX, (), (F, "glGetInstrumentsSGIX();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(InstrumentsBufferSGIX)(GLsizei size, GLint * buffer) -{ - DISPATCH(InstrumentsBufferSGIX, (size, buffer), (F, "glInstrumentsBufferSGIX(%d, %p);\n", size, (const void *) buffer)); -} - -KEYWORD1 GLint KEYWORD2 NAME(PollInstrumentsSGIX)(GLint * marker_p) -{ - RETURN_DISPATCH(PollInstrumentsSGIX, (marker_p), (F, "glPollInstrumentsSGIX(%p);\n", (const void *) marker_p)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadInstrumentsSGIX)(GLint marker) -{ - DISPATCH(ReadInstrumentsSGIX, (marker), (F, "glReadInstrumentsSGIX(%d);\n", marker)); -} - -KEYWORD1 void KEYWORD2 NAME(StartInstrumentsSGIX)(void) -{ - DISPATCH(StartInstrumentsSGIX, (), (F, "glStartInstrumentsSGIX();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(StopInstrumentsSGIX)(GLint marker) -{ - DISPATCH(StopInstrumentsSGIX, (marker), (F, "glStopInstrumentsSGIX(%d);\n", marker)); -} - -KEYWORD1 void KEYWORD2 NAME(FrameZoomSGIX)(GLint factor) -{ - DISPATCH(FrameZoomSGIX, (factor), (F, "glFrameZoomSGIX(%d);\n", factor)); -} - -KEYWORD1 void KEYWORD2 NAME(TagSampleBufferSGIX)(void) -{ - DISPATCH(TagSampleBufferSGIX, (), (F, "glTagSampleBufferSGIX();\n")); -} - -/* No dispatch for DeformationMap3dSGIX() */ -/* No dispatch for DeformationMap3fSGIX() */ -/* No dispatch for DeformSGIX() */ -/* No dispatch for LoadIdentityDeformationMapSGIX() */ -KEYWORD1 void KEYWORD2 NAME(ReferencePlaneSGIX)(const GLdouble * equation) -{ - DISPATCH(ReferencePlaneSGIX, (equation), (F, "glReferencePlaneSGIX(%p);\n", (const void *) equation)); -} - -KEYWORD1 void KEYWORD2 NAME(FlushRasterSGIX)(void) -{ - DISPATCH(FlushRasterSGIX, (), (F, "glFlushRasterSGIX();\n")); -} - -/* No dispatch for FogFuncSGIS() */ -/* No dispatch for GetFogFuncSGIS() */ -/* No dispatch for ImageTransformParameteriHP() */ -/* No dispatch for ImageTransformParameterfHP() */ -/* No dispatch for ImageTransformParameterivHP() */ -/* No dispatch for ImageTransformParameterfvHP() */ -/* No dispatch for GetImageTransformParameterivHP() */ -/* No dispatch for GetImageTransformParameterfvHP() */ -KEYWORD1 void KEYWORD2 NAME(ColorSubTableEXT)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) -{ - DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTableEXT(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorSubTableEXT)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTableEXT(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(HintPGI)(GLenum target, GLint mode) -{ - DISPATCH(HintPGI, (target, mode), (F, "glHintPGI(0x%x, %d);\n", target, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - DISPATCH(ColorTable, (target, internalFormat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalFormat, width, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data) -{ - DISPATCH(GetColorTableEXT, (target, format, type, data), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetColorTableParameterivEXT, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetColorTableParameterfvEXT, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params) -{ - DISPATCH(GetListParameterfvSGIX, (list, pname, params), (F, "glGetListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params) -{ - DISPATCH(GetListParameterivSGIX, (list, pname, params), (F, "glGetListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param) -{ - DISPATCH(ListParameterfSGIX, (list, pname, param), (F, "glListParameterfSGIX(%d, 0x%x, %f);\n", list, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params) -{ - DISPATCH(ListParameterfvSGIX, (list, pname, params), (F, "glListParameterfvSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ListParameteriSGIX)(GLuint list, GLenum pname, GLint param) -{ - DISPATCH(ListParameteriSGIX, (list, pname, param), (F, "glListParameteriSGIX(%d, 0x%x, %d);\n", list, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params) -{ - DISPATCH(ListParameterivSGIX, (list, pname, params), (F, "glListParameterivSGIX(%d, 0x%x, %p);\n", list, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexMaterialEXT)(GLenum face, GLenum mode) -{ - DISPATCH(IndexMaterialEXT, (face, mode), (F, "glIndexMaterialEXT(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexFuncEXT)(GLenum func, GLclampf ref) -{ - DISPATCH(IndexFuncEXT, (func, ref), (F, "glIndexFuncEXT(0x%x, %f);\n", func, ref)); -} - -KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count) -{ - DISPATCH(LockArraysEXT, (first, count), (F, "glLockArraysEXT(%d, %d);\n", first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void) -{ - DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(CullParameterdvEXT)(GLenum pname, GLdouble * params) -{ - DISPATCH(CullParameterdvEXT, (pname, params), (F, "glCullParameterdvEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CullParameterfvEXT)(GLenum pname, GLfloat * params) -{ - DISPATCH(CullParameterfvEXT, (pname, params), (F, "glCullParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentColorMaterialSGIX)(GLenum face, GLenum mode) -{ - DISPATCH(FragmentColorMaterialSGIX, (face, mode), (F, "glFragmentColorMaterialSGIX(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param) -{ - DISPATCH(FragmentLightfSGIX, (light, pname, param), (F, "glFragmentLightfSGIX(0x%x, 0x%x, %f);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params) -{ - DISPATCH(FragmentLightfvSGIX, (light, pname, params), (F, "glFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param) -{ - DISPATCH(FragmentLightiSGIX, (light, pname, param), (F, "glFragmentLightiSGIX(0x%x, 0x%x, %d);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params) -{ - DISPATCH(FragmentLightivSGIX, (light, pname, params), (F, "glFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfSGIX)(GLenum pname, GLfloat param) -{ - DISPATCH(FragmentLightModelfSGIX, (pname, param), (F, "glFragmentLightModelfSGIX(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params) -{ - DISPATCH(FragmentLightModelfvSGIX, (pname, params), (F, "glFragmentLightModelfvSGIX(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightModeliSGIX)(GLenum pname, GLint param) -{ - DISPATCH(FragmentLightModeliSGIX, (pname, param), (F, "glFragmentLightModeliSGIX(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentLightModelivSGIX)(GLenum pname, const GLint * params) -{ - DISPATCH(FragmentLightModelivSGIX, (pname, params), (F, "glFragmentLightModelivSGIX(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param) -{ - DISPATCH(FragmentMaterialfSGIX, (face, pname, param), (F, "glFragmentMaterialfSGIX(0x%x, 0x%x, %f);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params) -{ - DISPATCH(FragmentMaterialfvSGIX, (face, pname, params), (F, "glFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param) -{ - DISPATCH(FragmentMaterialiSGIX, (face, pname, param), (F, "glFragmentMaterialiSGIX(0x%x, 0x%x, %d);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params) -{ - DISPATCH(FragmentMaterialivSGIX, (face, pname, params), (F, "glFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params) -{ - DISPATCH(GetFragmentLightfvSGIX, (light, pname, params), (F, "glGetFragmentLightfvSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params) -{ - DISPATCH(GetFragmentLightivSGIX, (light, pname, params), (F, "glGetFragmentLightivSGIX(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params) -{ - DISPATCH(GetFragmentMaterialfvSGIX, (face, pname, params), (F, "glGetFragmentMaterialfvSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params) -{ - DISPATCH(GetFragmentMaterialivSGIX, (face, pname, params), (F, "glGetFragmentMaterialivSGIX(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LightEnviSGIX)(GLenum pname, GLint param) -{ - DISPATCH(LightEnviSGIX, (pname, param), (F, "glLightEnviSGIX(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) -{ - DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); -} - -/* No dispatch for ApplyTextureEXT() */ -/* No dispatch for TextureLightEXT() */ -/* No dispatch for TextureMaterialEXT() */ -/* No dispatch for AsyncMarkerSGIX() */ -/* No dispatch for FinishAsyncSGIX() */ -/* No dispatch for PollAsyncSGIX() */ -/* No dispatch for GenAsyncMarkersSGIX() */ -/* No dispatch for DeleteAsyncMarkersSGIX() */ -/* No dispatch for IsAsyncMarkerSGIX() */ -/* No dispatch for VertexPointervINTEL() */ -/* No dispatch for NormalPointervINTEL() */ -/* No dispatch for ColorPointervINTEL() */ -/* No dispatch for TexCoordPointervINTEL() */ -/* No dispatch for PixelTransformParameteriEXT() */ -/* No dispatch for PixelTransformParameterfEXT() */ -/* No dispatch for PixelTransformParameterivEXT() */ -/* No dispatch for PixelTransformParameterfvEXT() */ -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue) -{ - DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3bEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bvEXT)(const GLbyte * v) -{ - DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue) -{ - DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3dEXT(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dvEXT)(const GLdouble * v) -{ - DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dvEXT(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue) -{ - DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3fEXT(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fvEXT)(const GLfloat * v) -{ - DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fvEXT(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue) -{ - DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3iEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ivEXT)(const GLint * v) -{ - DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3ivEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue) -{ - DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3sEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3svEXT)(const GLshort * v) -{ - DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3svEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue) -{ - DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ubEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubvEXT)(const GLubyte * v) -{ - DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue) -{ - DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3uiEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uivEXT)(const GLuint * v) -{ - DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uivEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue) -{ - DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3usEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usvEXT)(const GLushort * v) -{ - DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -/* No dispatch for TextureNormalEXT() */ -KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) -{ - DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) -{ - DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord) -{ - DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord) -{ - DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddEXT)(GLdouble coord) -{ - DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoorddEXT(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddvEXT)(const GLdouble * coord) -{ - DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddvEXT(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointerEXT(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -/* No dispatch for Tangent3bEXT() */ -/* No dispatch for Tangent3bvEXT() */ -/* No dispatch for Tangent3dEXT() */ -/* No dispatch for Tangent3dvEXT() */ -/* No dispatch for Tangent3fEXT() */ -/* No dispatch for Tangent3fvEXT() */ -/* No dispatch for Tangent3iEXT() */ -/* No dispatch for Tangent3ivEXT() */ -/* No dispatch for Tangent3sEXT() */ -/* No dispatch for Tangent3svEXT() */ -/* No dispatch for Binormal3bEXT() */ -/* No dispatch for Binormal3bvEXT() */ -/* No dispatch for Binormal3dEXT() */ -/* No dispatch for Binormal3dvEXT() */ -/* No dispatch for Binormal3fEXT() */ -/* No dispatch for Binormal3fvEXT() */ -/* No dispatch for Binormal3iEXT() */ -/* No dispatch for Binormal3ivEXT() */ -/* No dispatch for Binormal3sEXT() */ -/* No dispatch for Binormal3svEXT() */ -/* No dispatch for TangentPointerEXT() */ -/* No dispatch for BinormalPointerEXT() */ -/* No dispatch for FinishTextureSUNX() */ -/* No dispatch for GlobalAlphaFactorbSUN() */ -/* No dispatch for GlobalAlphaFactorsSUN() */ -/* No dispatch for GlobalAlphaFactoriSUN() */ -/* No dispatch for GlobalAlphaFactorfSUN() */ -/* No dispatch for GlobalAlphaFactordSUN() */ -/* No dispatch for GlobalAlphaFactorubSUN() */ -/* No dispatch for GlobalAlphaFactorusSUN() */ -/* No dispatch for GlobalAlphaFactoruiSUN() */ -/* No dispatch for ReplacementCodeuiSUN() */ -/* No dispatch for ReplacementCodeusSUN() */ -/* No dispatch for ReplacementCodeubSUN() */ -/* No dispatch for ReplacementCodeuivSUN() */ -/* No dispatch for ReplacementCodeusvSUN() */ -/* No dispatch for ReplacementCodeubvSUN() */ -/* No dispatch for ReplacementCodePointerSUN() */ -/* No dispatch for Color4ubVertex2fSUN() */ -/* No dispatch for Color4ubVertex2fvSUN() */ -/* No dispatch for Color4ubVertex3fSUN() */ -/* No dispatch for Color4ubVertex3fvSUN() */ -/* No dispatch for Color3fVertex3fSUN() */ -/* No dispatch for Color3fVertex3fvSUN() */ -/* No dispatch for Normal3fVertex3fSUN() */ -/* No dispatch for Normal3fVertex3fvSUN() */ -/* No dispatch for Color4fNormal3fVertex3fSUN() */ -/* No dispatch for Color4fNormal3fVertex3fvSUN() */ -/* No dispatch for TexCoord2fVertex3fSUN() */ -/* No dispatch for TexCoord2fVertex3fvSUN() */ -/* No dispatch for TexCoord4fVertex4fSUN() */ -/* No dispatch for TexCoord4fVertex4fvSUN() */ -/* No dispatch for TexCoord2fColor4ubVertex3fSUN() */ -/* No dispatch for TexCoord2fColor4ubVertex3fvSUN() */ -/* No dispatch for TexCoord2fColor3fVertex3fSUN() */ -/* No dispatch for TexCoord2fColor3fVertex3fvSUN() */ -/* No dispatch for TexCoord2fNormal3fVertex3fSUN() */ -/* No dispatch for TexCoord2fNormal3fVertex3fvSUN() */ -/* No dispatch for TexCoord2fColor4fNormal3fVertex3fSUN() */ -/* No dispatch for TexCoord2fColor4fNormal3fVertex3fvSUN() */ -/* No dispatch for TexCoord4fColor4fNormal3fVertex4fSUN() */ -/* No dispatch for TexCoord4fColor4fNormal3fVertex4fvSUN() */ -/* No dispatch for ReplacementCodeuiVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiColor4ubVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiColor4ubVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiColor3fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiColor3fVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiNormal3fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiNormal3fVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiColor4fNormal3fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiColor4fNormal3fVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN() */ -/* No dispatch for ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN() */ -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateINGR)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexWeightfEXT)(GLfloat weight) -{ - DISPATCH(VertexWeightfEXT, (weight), (F, "glVertexWeightfEXT(%f);\n", weight)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexWeightfvEXT)(const GLfloat * weight) -{ - DISPATCH(VertexWeightfvEXT, (weight), (F, "glVertexWeightfvEXT(%p);\n", (const void *) weight)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(VertexWeightPointerEXT, (size, type, stride, pointer), (F, "glVertexWeightPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(FlushVertexArrayRangeNV)(void) -{ - DISPATCH(FlushVertexArrayRangeNV, (), (F, "glFlushVertexArrayRangeNV();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer) -{ - DISPATCH(VertexArrayRangeNV, (length, pointer), (F, "glVertexArrayRangeNV(%d, %p);\n", length, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterfvNV)(GLenum pname, const GLfloat * params) -{ - DISPATCH(CombinerParameterfvNV, (pname, params), (F, "glCombinerParameterfvNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterfNV)(GLenum pname, GLfloat param) -{ - DISPATCH(CombinerParameterfNV, (pname, param), (F, "glCombinerParameterfNV(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterivNV)(GLenum pname, const GLint * params) -{ - DISPATCH(CombinerParameterivNV, (pname, params), (F, "glCombinerParameterivNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameteriNV)(GLenum pname, GLint param) -{ - DISPATCH(CombinerParameteriNV, (pname, param), (F, "glCombinerParameteriNV(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - DISPATCH(CombinerInputNV, (stage, portion, variable, input, mapping, componentUsage), (F, "glCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x);\n", stage, portion, variable, input, mapping, componentUsage)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) -{ - DISPATCH(CombinerOutputNV, (stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum), (F, "glCombinerOutputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, %d, %d, %d);\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum)); -} - -KEYWORD1 void KEYWORD2 NAME(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - DISPATCH(FinalCombinerInputNV, (variable, input, mapping, componentUsage), (F, "glFinalCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x);\n", variable, input, mapping, componentUsage)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params) -{ - DISPATCH(GetCombinerInputParameterfvNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterfvNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params) -{ - DISPATCH(GetCombinerInputParameterivNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterivNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params) -{ - DISPATCH(GetCombinerOutputParameterfvNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterfvNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params) -{ - DISPATCH(GetCombinerOutputParameterivNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterivNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params) -{ - DISPATCH(GetFinalCombinerInputParameterfvNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterfvNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params) -{ - DISPATCH(GetFinalCombinerInputParameterivNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterivNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void) -{ - DISPATCH(ResizeBuffersMESA, (), (F, "glResizeBuffersMESA();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y) -{ - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dMESA(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble * v) -{ - DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvMESA(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y) -{ - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fMESA(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat * v) -{ - DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvMESA(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y) -{ - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iMESA(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint * v) -{ - DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y) -{ - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sMESA(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort * v) -{ - DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dMESA(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble * v) -{ - DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvMESA(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fMESA(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat * v) -{ - DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvMESA(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z) -{ - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iMESA(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint * v) -{ - DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z) -{ - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sMESA(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort * v) -{ - DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, "glWindowPos4dMESA(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble * v) -{ - DISPATCH(WindowPos4dvMESA, (v), (F, "glWindowPos4dvMESA(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, "glWindowPos4fMESA(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat * v) -{ - DISPATCH(WindowPos4fvMESA, (v), (F, "glWindowPos4fvMESA(%p /* %g, %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w) -{ - DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, "glWindowPos4iMESA(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint * v) -{ - DISPATCH(WindowPos4ivMESA, (v), (F, "glWindowPos4ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, "glWindowPos4sMESA(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v) -{ - DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v)); -} - -/* No dispatch for MultiModeDrawArraysIBM() */ -/* No dispatch for MultiModeDrawElementsIBM() */ -/* No dispatch for ColorPointerListIBM() */ -/* No dispatch for SecondaryColorPointerListIBM() */ -/* No dispatch for EdgeFlagPointerListIBM() */ -/* No dispatch for FogCoordPointerListIBM() */ -/* No dispatch for IndexPointerListIBM() */ -/* No dispatch for NormalPointerListIBM() */ -/* No dispatch for TexCoordPointerListIBM() */ -/* No dispatch for VertexPointerListIBM() */ -KEYWORD1 void KEYWORD2 NAME(TbufferMask3DFX)(GLuint mask) -{ - DISPATCH(TbufferMask3DFX, (mask), (F, "glTbufferMask3DFX(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleMaskEXT)(GLclampf value, GLboolean invert) -{ - DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskEXT(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplePatternEXT)(GLenum pattern) -{ - DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternEXT(0x%x);\n", pattern)); -} - -/* No dispatch for TextureColorMaskSGIS() */ -/* No dispatch for IglooInterfaceSGIX() */ -KEYWORD1 void KEYWORD2 NAME(DeleteFencesNV)(GLsizei n, const GLuint * fences) -{ - DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences)); -} - -KEYWORD1 void KEYWORD2 NAME(GenFencesNV)(GLsizei n, GLuint * fences) -{ - DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsFenceNV)(GLuint fence) -{ - RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(TestFenceNV)(GLuint fence) -{ - RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFenceivNV)(GLuint fence, GLenum pname, GLint * params) -{ - DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FinishFenceNV)(GLuint fence) -{ - DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence)); -} - -KEYWORD1 void KEYWORD2 NAME(SetFenceNV)(GLuint fence, GLenum condition) -{ - DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition)); -} - -/* No dispatch for MapControlPointsNV() */ -/* No dispatch for MapParameterivNV() */ -/* No dispatch for MapParameterfvNV() */ -/* No dispatch for GetMapControlPointsNV() */ -/* No dispatch for GetMapParameterivNV() */ -/* No dispatch for GetMapParameterfvNV() */ -/* No dispatch for GetMapAttribParameterivNV() */ -/* No dispatch for GetMapAttribParameterfvNV() */ -/* No dispatch for EvalMapsNV() */ -/* No dispatch for CombinerStageParameterfvNV() */ -/* No dispatch for GetCombinerStageParameterfvNV() */ -KEYWORD1 void KEYWORD2 NAME(WindowPos2dARB)(GLdouble x, GLdouble y) -{ - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dARB(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fARB)(GLfloat x, GLfloat y) -{ - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fARB(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iARB)(GLint x, GLint y) -{ - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iARB(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sARB)(GLshort x, GLshort y) -{ - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sARB(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dvARB)(const GLdouble * p) -{ - DISPATCH(WindowPos2dvMESA, (p), (F, "glWindowPos2dvARB(%p /* %g, %g */);\n", (const void *) p, p[0], p[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fvARB)(const GLfloat * p) -{ - DISPATCH(WindowPos2fvMESA, (p), (F, "glWindowPos2fvARB(%p /* %g, %g */);\n", (const void *) p, p[0], p[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2ivARB)(const GLint * p) -{ - DISPATCH(WindowPos2ivMESA, (p), (F, "glWindowPos2ivARB(%p);\n", (const void *) p)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2svARB)(const GLshort * p) -{ - DISPATCH(WindowPos2svMESA, (p), (F, "glWindowPos2svARB(%p);\n", (const void *) p)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dARB(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fARB(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iARB)(GLint x, GLint y, GLint z) -{ - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iARB(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sARB)(GLshort x, GLshort y, GLshort z) -{ - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sARB(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dvARB)(const GLdouble * p) -{ - DISPATCH(WindowPos3dvMESA, (p), (F, "glWindowPos3dvARB(%p /* %g, %g, %g */);\n", (const void *) p, p[0], p[1], p[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fvARB)(const GLfloat * p) -{ - DISPATCH(WindowPos3fvMESA, (p), (F, "glWindowPos3fvARB(%p /* %g, %g, %g */);\n", (const void *) p, p[0], p[1], p[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3ivARB)(const GLint * p) -{ - DISPATCH(WindowPos3ivMESA, (p), (F, "glWindowPos3ivARB(%p);\n", (const void *) p)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3svARB)(const GLshort * p) -{ - DISPATCH(WindowPos3svMESA, (p), (F, "glWindowPos3svARB(%p);\n", (const void *) p)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences) -{ - RETURN_DISPATCH(AreProgramsResidentNV, (n, ids, residences), (F, "glAreProgramsResidentNV(%d, %p, %p);\n", n, (const void *) ids, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(BindProgramNV)(GLenum target, GLuint id) -{ - DISPATCH(BindProgramNV, (target, id), (F, "glBindProgramNV(0x%x, %d);\n", target, id)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteProgramsNV)(GLsizei n, const GLuint * ids) -{ - DISPATCH(DeleteProgramsNV, (n, ids), (F, "glDeleteProgramsNV(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params) -{ - DISPATCH(ExecuteProgramNV, (target, id, params), (F, "glExecuteProgramNV(0x%x, %d, %p);\n", target, id, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GenProgramsNV)(GLsizei n, GLuint * ids) -{ - DISPATCH(GenProgramsNV, (n, ids), (F, "glGenProgramsNV(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params) -{ - DISPATCH(GetProgramParameterdvNV, (target, index, pname, params), (F, "glGetProgramParameterdvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params) -{ - DISPATCH(GetProgramParameterfvNV, (target, index, pname, params), (F, "glGetProgramParameterfvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramivNV)(GLuint id, GLenum pname, GLint * params) -{ - DISPATCH(GetProgramivNV, (id, pname, params), (F, "glGetProgramivNV(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program) -{ - DISPATCH(GetProgramStringNV, (id, pname, program), (F, "glGetProgramStringNV(%d, 0x%x, %p);\n", id, pname, (const void *) program)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params) -{ - DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params) -{ - DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params) -{ - DISPATCH(GetVertexAttribfvNV, (index, pname, params), (F, "glGetVertexAttribfvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params) -{ - DISPATCH(GetVertexAttribivNV, (index, pname, params), (F, "glGetVertexAttribivNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer) -{ - DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramNV)(GLuint id) -{ - RETURN_DISPATCH(IsProgramNV, (id), (F, "glIsProgramNV(%d);\n", id)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program) -{ - DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DISPATCH(ProgramParameter4dNV, (target, index, x, y, z, w), (F, "glProgramParameter4dNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params) -{ - DISPATCH(ProgramParameter4dvNV, (target, index, params), (F, "glProgramParameter4dvNV(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3])); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DISPATCH(ProgramParameter4fNV, (target, index, x, y, z, w), (F, "glProgramParameter4fNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params) -{ - DISPATCH(ProgramParameter4fvNV, (target, index, params), (F, "glProgramParameter4fvNV(0x%x, %d, %p /* %g, %g, %g, %g */);\n", target, index, (const void *) params, params[0], params[1], params[2], params[3])); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params) -{ - DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p /* %g, %g, %g, %g */);\n", target, index, num, (const void *) params, params[0], params[1], params[2], params[3])); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params) -{ - DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p /* %g, %g, %g, %g */);\n", target, index, num, (const void *) params, params[0], params[1], params[2], params[3])); -} - -KEYWORD1 void KEYWORD2 NAME(RequestResidentProgramsNV)(GLsizei n, const GLuint * ids) -{ - DISPATCH(RequestResidentProgramsNV, (n, ids), (F, "glRequestResidentProgramsNV(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform) -{ - DISPATCH(TrackMatrixNV, (target, address, matrix, transform), (F, "glTrackMatrixNV(0x%x, %d, 0x%x, 0x%x);\n", target, address, matrix, transform)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(VertexAttribPointerNV, (index, size, type, stride, pointer), (F, "glVertexAttribPointerNV(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dNV)(GLuint index, GLdouble x) -{ - DISPATCH(VertexAttrib1dNV, (index, x), (F, "glVertexAttrib1dNV(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvNV)(GLuint index, const GLdouble * v) -{ - DISPATCH(VertexAttrib1dvNV, (index, v), (F, "glVertexAttrib1dvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fNV)(GLuint index, GLfloat x) -{ - DISPATCH(VertexAttrib1fNV, (index, x), (F, "glVertexAttrib1fNV(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvNV)(GLuint index, const GLfloat * v) -{ - DISPATCH(VertexAttrib1fvNV, (index, v), (F, "glVertexAttrib1fvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sNV)(GLuint index, GLshort x) -{ - DISPATCH(VertexAttrib1sNV, (index, x), (F, "glVertexAttrib1sNV(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svNV)(GLuint index, const GLshort * v) -{ - DISPATCH(VertexAttrib1svNV, (index, v), (F, "glVertexAttrib1svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y) -{ - DISPATCH(VertexAttrib2dNV, (index, x, y), (F, "glVertexAttrib2dNV(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvNV)(GLuint index, const GLdouble * v) -{ - DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvNV(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y) -{ - DISPATCH(VertexAttrib2fNV, (index, x, y), (F, "glVertexAttrib2fNV(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvNV)(GLuint index, const GLfloat * v) -{ - DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvNV(%d, %p /* %g, %g */);\n", index, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y) -{ - DISPATCH(VertexAttrib2sNV, (index, x, y), (F, "glVertexAttrib2sNV(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svNV)(GLuint index, const GLshort * v) -{ - DISPATCH(VertexAttrib2svNV, (index, v), (F, "glVertexAttrib2svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(VertexAttrib3dNV, (index, x, y, z), (F, "glVertexAttrib3dNV(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvNV)(GLuint index, const GLdouble * v) -{ - DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvNV(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(VertexAttrib3fNV, (index, x, y, z), (F, "glVertexAttrib3fNV(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvNV)(GLuint index, const GLfloat * v) -{ - DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvNV(%d, %p /* %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - DISPATCH(VertexAttrib3sNV, (index, x, y, z), (F, "glVertexAttrib3sNV(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svNV)(GLuint index, const GLshort * v) -{ - DISPATCH(VertexAttrib3svNV, (index, v), (F, "glVertexAttrib3svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DISPATCH(VertexAttrib4dNV, (index, x, y, z, w), (F, "glVertexAttrib4dNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvNV)(GLuint index, const GLdouble * v) -{ - DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvNV(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DISPATCH(VertexAttrib4fNV, (index, x, y, z, w), (F, "glVertexAttrib4fNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvNV)(GLuint index, const GLfloat * v) -{ - DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvNV(%d, %p /* %g, %g, %g, %g */);\n", index, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - DISPATCH(VertexAttrib4sNV, (index, x, y, z, w), (F, "glVertexAttrib4sNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svNV)(GLuint index, const GLshort * v) -{ - DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - DISPATCH(VertexAttrib4ubNV, (index, x, y, z, w), (F, "glVertexAttrib4ubNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvNV)(GLuint index, const GLubyte * v) -{ - DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4ubvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - DISPATCH(VertexAttribs1dvNV, (index, n, v), (F, "glVertexAttribs1dvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - DISPATCH(VertexAttribs1fvNV, (index, n, v), (F, "glVertexAttribs1fvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - DISPATCH(VertexAttribs1svNV, (index, n, v), (F, "glVertexAttribs1svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - DISPATCH(VertexAttribs2dvNV, (index, n, v), (F, "glVertexAttribs2dvNV(%d, %d, %p /* %g, %g */);\n", index, n, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - DISPATCH(VertexAttribs2fvNV, (index, n, v), (F, "glVertexAttribs2fvNV(%d, %d, %p /* %g, %g */);\n", index, n, (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - DISPATCH(VertexAttribs2svNV, (index, n, v), (F, "glVertexAttribs2svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - DISPATCH(VertexAttribs3dvNV, (index, n, v), (F, "glVertexAttribs3dvNV(%d, %d, %p /* %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - DISPATCH(VertexAttribs3fvNV, (index, n, v), (F, "glVertexAttribs3fvNV(%d, %d, %p /* %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - DISPATCH(VertexAttribs3svNV, (index, n, v), (F, "glVertexAttribs3svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - DISPATCH(VertexAttribs4dvNV, (index, n, v), (F, "glVertexAttribs4dvNV(%d, %d, %p /* %g, %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - DISPATCH(VertexAttribs4fvNV, (index, n, v), (F, "glVertexAttribs4fvNV(%d, %d, %p /* %g, %g, %g, %g */);\n", index, n, (const void *) v, v[0], v[1], v[2], v[3])); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - DISPATCH(VertexAttribs4svNV, (index, n, v), (F, "glVertexAttribs4svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v) -{ - DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteriNV)(GLenum pname, GLint params) -{ - DISPATCH(PointParameteriNV, (pname, params), (F, "glPointParameteriNV(0x%x, %d);\n", pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * params) -{ - DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordf)(GLfloat coord) -{ - DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordf(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfv)(const GLfloat * coord) -{ - DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfv(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordd)(GLdouble coord) -{ - DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoordd(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddv)(const GLdouble * coord) -{ - DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddv(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawArrays)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) -{ - DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArrays(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawElements)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) -{ - DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElements(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterf)(GLenum pname, GLfloat param) -{ - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfv)(GLenum pname, const GLfloat * params) -{ - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteri)(GLenum pname, GLint param) -{ - DISPATCH(PointParameteriNV, (pname, param), (F, "glPointParameteri(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteriv)(GLenum pname, const GLint * params) -{ - DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameteriv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3b(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bv)(const GLbyte * v) -{ - DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3d(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dv)(const GLdouble * v) -{ - DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3f(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fv)(const GLfloat * v) -{ - DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3i)(GLint red, GLint green, GLint blue) -{ - DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3i(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iv)(const GLint * v) -{ - DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue) -{ - DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3s(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sv)(const GLshort * v) -{ - DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ub(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubv)(const GLubyte * v) -{ - DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue) -{ - DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3ui(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiv)(const GLuint * v) -{ - DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue) -{ - DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3us(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usv)(const GLushort * v) -{ - DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const void * pointer) -{ - DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2d)(GLdouble x, GLdouble y) -{ - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dv)(const GLdouble * v) -{ - DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2f)(GLfloat x, GLfloat y) -{ - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fv)(const GLfloat * v) -{ - DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fv(%p /* %g, %g */);\n", (const void *) v, v[0], v[1])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2i)(GLint x, GLint y) -{ - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iv)(const GLint * v) -{ - DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2s)(GLshort x, GLshort y) -{ - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sv)(const GLshort * v) -{ - DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dv)(const GLdouble * v) -{ - DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fv)(const GLfloat * v) -{ - DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fv(%p /* %g, %g, %g */);\n", (const void *) v, v[0], v[1], v[2])); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3i)(GLint x, GLint y, GLint z) -{ - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iv)(const GLint * v) -{ - DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3s)(GLshort x, GLshort y, GLshort z) -{ - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sv)(const GLshort * v) -{ - DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveStencilFaceEXT)(GLenum face) -{ - DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face)); -} - - - -/* - * This is how a dispatch table can be initialized with all the functions - * we generated above. - */ -#ifdef DISPATCH_TABLE_NAME - -#ifndef TABLE_ENTRY -#error TABLE_ENTRY must be defined -#endif - -void *DISPATCH_TABLE_NAME[] = { - TABLE_ENTRY(NewList), - TABLE_ENTRY(EndList), - TABLE_ENTRY(CallList), - TABLE_ENTRY(CallLists), - TABLE_ENTRY(DeleteLists), - TABLE_ENTRY(GenLists), - TABLE_ENTRY(ListBase), - TABLE_ENTRY(Begin), - TABLE_ENTRY(Bitmap), - TABLE_ENTRY(Color3b), - TABLE_ENTRY(Color3bv), - TABLE_ENTRY(Color3d), - TABLE_ENTRY(Color3dv), - TABLE_ENTRY(Color3f), - TABLE_ENTRY(Color3fv), - TABLE_ENTRY(Color3i), - TABLE_ENTRY(Color3iv), - TABLE_ENTRY(Color3s), - TABLE_ENTRY(Color3sv), - TABLE_ENTRY(Color3ub), - TABLE_ENTRY(Color3ubv), - TABLE_ENTRY(Color3ui), - TABLE_ENTRY(Color3uiv), - TABLE_ENTRY(Color3us), - TABLE_ENTRY(Color3usv), - TABLE_ENTRY(Color4b), - TABLE_ENTRY(Color4bv), - TABLE_ENTRY(Color4d), - TABLE_ENTRY(Color4dv), - TABLE_ENTRY(Color4f), - TABLE_ENTRY(Color4fv), - TABLE_ENTRY(Color4i), - TABLE_ENTRY(Color4iv), - TABLE_ENTRY(Color4s), - TABLE_ENTRY(Color4sv), - TABLE_ENTRY(Color4ub), - TABLE_ENTRY(Color4ubv), - TABLE_ENTRY(Color4ui), - TABLE_ENTRY(Color4uiv), - TABLE_ENTRY(Color4us), - TABLE_ENTRY(Color4usv), - TABLE_ENTRY(EdgeFlag), - TABLE_ENTRY(EdgeFlagv), - TABLE_ENTRY(End), - TABLE_ENTRY(Indexd), - TABLE_ENTRY(Indexdv), - TABLE_ENTRY(Indexf), - TABLE_ENTRY(Indexfv), - TABLE_ENTRY(Indexi), - TABLE_ENTRY(Indexiv), - TABLE_ENTRY(Indexs), - TABLE_ENTRY(Indexsv), - TABLE_ENTRY(Normal3b), - TABLE_ENTRY(Normal3bv), - TABLE_ENTRY(Normal3d), - TABLE_ENTRY(Normal3dv), - TABLE_ENTRY(Normal3f), - TABLE_ENTRY(Normal3fv), - TABLE_ENTRY(Normal3i), - TABLE_ENTRY(Normal3iv), - TABLE_ENTRY(Normal3s), - TABLE_ENTRY(Normal3sv), - TABLE_ENTRY(RasterPos2d), - TABLE_ENTRY(RasterPos2dv), - TABLE_ENTRY(RasterPos2f), - TABLE_ENTRY(RasterPos2fv), - TABLE_ENTRY(RasterPos2i), - TABLE_ENTRY(RasterPos2iv), - TABLE_ENTRY(RasterPos2s), - TABLE_ENTRY(RasterPos2sv), - TABLE_ENTRY(RasterPos3d), - TABLE_ENTRY(RasterPos3dv), - TABLE_ENTRY(RasterPos3f), - TABLE_ENTRY(RasterPos3fv), - TABLE_ENTRY(RasterPos3i), - TABLE_ENTRY(RasterPos3iv), - TABLE_ENTRY(RasterPos3s), - TABLE_ENTRY(RasterPos3sv), - TABLE_ENTRY(RasterPos4d), - TABLE_ENTRY(RasterPos4dv), - TABLE_ENTRY(RasterPos4f), - TABLE_ENTRY(RasterPos4fv), - TABLE_ENTRY(RasterPos4i), - TABLE_ENTRY(RasterPos4iv), - TABLE_ENTRY(RasterPos4s), - TABLE_ENTRY(RasterPos4sv), - TABLE_ENTRY(Rectd), - TABLE_ENTRY(Rectdv), - TABLE_ENTRY(Rectf), - TABLE_ENTRY(Rectfv), - TABLE_ENTRY(Recti), - TABLE_ENTRY(Rectiv), - TABLE_ENTRY(Rects), - TABLE_ENTRY(Rectsv), - TABLE_ENTRY(TexCoord1d), - TABLE_ENTRY(TexCoord1dv), - TABLE_ENTRY(TexCoord1f), - TABLE_ENTRY(TexCoord1fv), - TABLE_ENTRY(TexCoord1i), - TABLE_ENTRY(TexCoord1iv), - TABLE_ENTRY(TexCoord1s), - TABLE_ENTRY(TexCoord1sv), - TABLE_ENTRY(TexCoord2d), - TABLE_ENTRY(TexCoord2dv), - TABLE_ENTRY(TexCoord2f), - TABLE_ENTRY(TexCoord2fv), - TABLE_ENTRY(TexCoord2i), - TABLE_ENTRY(TexCoord2iv), - TABLE_ENTRY(TexCoord2s), - TABLE_ENTRY(TexCoord2sv), - TABLE_ENTRY(TexCoord3d), - TABLE_ENTRY(TexCoord3dv), - TABLE_ENTRY(TexCoord3f), - TABLE_ENTRY(TexCoord3fv), - TABLE_ENTRY(TexCoord3i), - TABLE_ENTRY(TexCoord3iv), - TABLE_ENTRY(TexCoord3s), - TABLE_ENTRY(TexCoord3sv), - TABLE_ENTRY(TexCoord4d), - TABLE_ENTRY(TexCoord4dv), - TABLE_ENTRY(TexCoord4f), - TABLE_ENTRY(TexCoord4fv), - TABLE_ENTRY(TexCoord4i), - TABLE_ENTRY(TexCoord4iv), - TABLE_ENTRY(TexCoord4s), - TABLE_ENTRY(TexCoord4sv), - TABLE_ENTRY(Vertex2d), - TABLE_ENTRY(Vertex2dv), - TABLE_ENTRY(Vertex2f), - TABLE_ENTRY(Vertex2fv), - TABLE_ENTRY(Vertex2i), - TABLE_ENTRY(Vertex2iv), - TABLE_ENTRY(Vertex2s), - TABLE_ENTRY(Vertex2sv), - TABLE_ENTRY(Vertex3d), - TABLE_ENTRY(Vertex3dv), - TABLE_ENTRY(Vertex3f), - TABLE_ENTRY(Vertex3fv), - TABLE_ENTRY(Vertex3i), - TABLE_ENTRY(Vertex3iv), - TABLE_ENTRY(Vertex3s), - TABLE_ENTRY(Vertex3sv), - TABLE_ENTRY(Vertex4d), - TABLE_ENTRY(Vertex4dv), - TABLE_ENTRY(Vertex4f), - TABLE_ENTRY(Vertex4fv), - TABLE_ENTRY(Vertex4i), - TABLE_ENTRY(Vertex4iv), - TABLE_ENTRY(Vertex4s), - TABLE_ENTRY(Vertex4sv), - TABLE_ENTRY(ClipPlane), - TABLE_ENTRY(ColorMaterial), - TABLE_ENTRY(CullFace), - TABLE_ENTRY(Fogf), - TABLE_ENTRY(Fogfv), - TABLE_ENTRY(Fogi), - TABLE_ENTRY(Fogiv), - TABLE_ENTRY(FrontFace), - TABLE_ENTRY(Hint), - TABLE_ENTRY(Lightf), - TABLE_ENTRY(Lightfv), - TABLE_ENTRY(Lighti), - TABLE_ENTRY(Lightiv), - TABLE_ENTRY(LightModelf), - TABLE_ENTRY(LightModelfv), - TABLE_ENTRY(LightModeli), - TABLE_ENTRY(LightModeliv), - TABLE_ENTRY(LineStipple), - TABLE_ENTRY(LineWidth), - TABLE_ENTRY(Materialf), - TABLE_ENTRY(Materialfv), - TABLE_ENTRY(Materiali), - TABLE_ENTRY(Materialiv), - TABLE_ENTRY(PointSize), - TABLE_ENTRY(PolygonMode), - TABLE_ENTRY(PolygonStipple), - TABLE_ENTRY(Scissor), - TABLE_ENTRY(ShadeModel), - TABLE_ENTRY(TexParameterf), - TABLE_ENTRY(TexParameterfv), - TABLE_ENTRY(TexParameteri), - TABLE_ENTRY(TexParameteriv), - TABLE_ENTRY(TexImage1D), - TABLE_ENTRY(TexImage2D), - TABLE_ENTRY(TexEnvf), - TABLE_ENTRY(TexEnvfv), - TABLE_ENTRY(TexEnvi), - TABLE_ENTRY(TexEnviv), - TABLE_ENTRY(TexGend), - TABLE_ENTRY(TexGendv), - TABLE_ENTRY(TexGenf), - TABLE_ENTRY(TexGenfv), - TABLE_ENTRY(TexGeni), - TABLE_ENTRY(TexGeniv), - TABLE_ENTRY(FeedbackBuffer), - TABLE_ENTRY(SelectBuffer), - TABLE_ENTRY(RenderMode), - TABLE_ENTRY(InitNames), - TABLE_ENTRY(LoadName), - TABLE_ENTRY(PassThrough), - TABLE_ENTRY(PopName), - TABLE_ENTRY(PushName), - TABLE_ENTRY(DrawBuffer), - TABLE_ENTRY(Clear), - TABLE_ENTRY(ClearAccum), - TABLE_ENTRY(ClearIndex), - TABLE_ENTRY(ClearColor), - TABLE_ENTRY(ClearStencil), - TABLE_ENTRY(ClearDepth), - TABLE_ENTRY(StencilMask), - TABLE_ENTRY(ColorMask), - TABLE_ENTRY(DepthMask), - TABLE_ENTRY(IndexMask), - TABLE_ENTRY(Accum), - TABLE_ENTRY(Disable), - TABLE_ENTRY(Enable), - TABLE_ENTRY(Finish), - TABLE_ENTRY(Flush), - TABLE_ENTRY(PopAttrib), - TABLE_ENTRY(PushAttrib), - TABLE_ENTRY(Map1d), - TABLE_ENTRY(Map1f), - TABLE_ENTRY(Map2d), - TABLE_ENTRY(Map2f), - TABLE_ENTRY(MapGrid1d), - TABLE_ENTRY(MapGrid1f), - TABLE_ENTRY(MapGrid2d), - TABLE_ENTRY(MapGrid2f), - TABLE_ENTRY(EvalCoord1d), - TABLE_ENTRY(EvalCoord1dv), - TABLE_ENTRY(EvalCoord1f), - TABLE_ENTRY(EvalCoord1fv), - TABLE_ENTRY(EvalCoord2d), - TABLE_ENTRY(EvalCoord2dv), - TABLE_ENTRY(EvalCoord2f), - TABLE_ENTRY(EvalCoord2fv), - TABLE_ENTRY(EvalMesh1), - TABLE_ENTRY(EvalPoint1), - TABLE_ENTRY(EvalMesh2), - TABLE_ENTRY(EvalPoint2), - TABLE_ENTRY(AlphaFunc), - TABLE_ENTRY(BlendFunc), - TABLE_ENTRY(LogicOp), - TABLE_ENTRY(StencilFunc), - TABLE_ENTRY(StencilOp), - TABLE_ENTRY(DepthFunc), - TABLE_ENTRY(PixelZoom), - TABLE_ENTRY(PixelTransferf), - TABLE_ENTRY(PixelTransferi), - TABLE_ENTRY(PixelStoref), - TABLE_ENTRY(PixelStorei), - TABLE_ENTRY(PixelMapfv), - TABLE_ENTRY(PixelMapuiv), - TABLE_ENTRY(PixelMapusv), - TABLE_ENTRY(ReadBuffer), - TABLE_ENTRY(CopyPixels), - TABLE_ENTRY(ReadPixels), - TABLE_ENTRY(DrawPixels), - TABLE_ENTRY(GetBooleanv), - TABLE_ENTRY(GetClipPlane), - TABLE_ENTRY(GetDoublev), - TABLE_ENTRY(GetError), - TABLE_ENTRY(GetFloatv), - TABLE_ENTRY(GetIntegerv), - TABLE_ENTRY(GetLightfv), - TABLE_ENTRY(GetLightiv), - TABLE_ENTRY(GetMapdv), - TABLE_ENTRY(GetMapfv), - TABLE_ENTRY(GetMapiv), - TABLE_ENTRY(GetMaterialfv), - TABLE_ENTRY(GetMaterialiv), - TABLE_ENTRY(GetPixelMapfv), - TABLE_ENTRY(GetPixelMapuiv), - TABLE_ENTRY(GetPixelMapusv), - TABLE_ENTRY(GetPolygonStipple), - TABLE_ENTRY(GetString), - TABLE_ENTRY(GetTexEnvfv), - TABLE_ENTRY(GetTexEnviv), - TABLE_ENTRY(GetTexGendv), - TABLE_ENTRY(GetTexGenfv), - TABLE_ENTRY(GetTexGeniv), - TABLE_ENTRY(GetTexImage), - TABLE_ENTRY(GetTexParameterfv), - TABLE_ENTRY(GetTexParameteriv), - TABLE_ENTRY(GetTexLevelParameterfv), - TABLE_ENTRY(GetTexLevelParameteriv), - TABLE_ENTRY(IsEnabled), - TABLE_ENTRY(IsList), - TABLE_ENTRY(DepthRange), - TABLE_ENTRY(Frustum), - TABLE_ENTRY(LoadIdentity), - TABLE_ENTRY(LoadMatrixf), - TABLE_ENTRY(LoadMatrixd), - TABLE_ENTRY(MatrixMode), - TABLE_ENTRY(MultMatrixf), - TABLE_ENTRY(MultMatrixd), - TABLE_ENTRY(Ortho), - TABLE_ENTRY(PopMatrix), - TABLE_ENTRY(PushMatrix), - TABLE_ENTRY(Rotated), - TABLE_ENTRY(Rotatef), - TABLE_ENTRY(Scaled), - TABLE_ENTRY(Scalef), - TABLE_ENTRY(Translated), - TABLE_ENTRY(Translatef), - TABLE_ENTRY(Viewport), - TABLE_ENTRY(ArrayElement), - TABLE_ENTRY(BindTexture), - TABLE_ENTRY(ColorPointer), - TABLE_ENTRY(DisableClientState), - TABLE_ENTRY(DrawArrays), - TABLE_ENTRY(DrawElements), - TABLE_ENTRY(EdgeFlagPointer), - TABLE_ENTRY(EnableClientState), - TABLE_ENTRY(IndexPointer), - TABLE_ENTRY(Indexub), - TABLE_ENTRY(Indexubv), - TABLE_ENTRY(InterleavedArrays), - TABLE_ENTRY(NormalPointer), - TABLE_ENTRY(PolygonOffset), - TABLE_ENTRY(TexCoordPointer), - TABLE_ENTRY(VertexPointer), - TABLE_ENTRY(AreTexturesResident), - TABLE_ENTRY(CopyTexImage1D), - TABLE_ENTRY(CopyTexImage2D), - TABLE_ENTRY(CopyTexSubImage1D), - TABLE_ENTRY(CopyTexSubImage2D), - TABLE_ENTRY(DeleteTextures), - TABLE_ENTRY(GenTextures), - TABLE_ENTRY(GetPointerv), - TABLE_ENTRY(IsTexture), - TABLE_ENTRY(PrioritizeTextures), - TABLE_ENTRY(TexSubImage1D), - TABLE_ENTRY(TexSubImage2D), - TABLE_ENTRY(PopClientAttrib), - TABLE_ENTRY(PushClientAttrib), - TABLE_ENTRY(BlendColor), - TABLE_ENTRY(BlendEquation), - TABLE_ENTRY(DrawRangeElements), - TABLE_ENTRY(ColorTable), - TABLE_ENTRY(ColorTableParameterfv), - TABLE_ENTRY(ColorTableParameteriv), - TABLE_ENTRY(CopyColorTable), - TABLE_ENTRY(GetColorTable), - TABLE_ENTRY(GetColorTableParameterfv), - TABLE_ENTRY(GetColorTableParameteriv), - TABLE_ENTRY(ColorSubTable), - TABLE_ENTRY(CopyColorSubTable), - TABLE_ENTRY(ConvolutionFilter1D), - TABLE_ENTRY(ConvolutionFilter2D), - TABLE_ENTRY(ConvolutionParameterf), - TABLE_ENTRY(ConvolutionParameterfv), - TABLE_ENTRY(ConvolutionParameteri), - TABLE_ENTRY(ConvolutionParameteriv), - TABLE_ENTRY(CopyConvolutionFilter1D), - TABLE_ENTRY(CopyConvolutionFilter2D), - TABLE_ENTRY(GetConvolutionFilter), - TABLE_ENTRY(GetConvolutionParameterfv), - TABLE_ENTRY(GetConvolutionParameteriv), - TABLE_ENTRY(GetSeparableFilter), - TABLE_ENTRY(SeparableFilter2D), - TABLE_ENTRY(GetHistogram), - TABLE_ENTRY(GetHistogramParameterfv), - TABLE_ENTRY(GetHistogramParameteriv), - TABLE_ENTRY(GetMinmax), - TABLE_ENTRY(GetMinmaxParameterfv), - TABLE_ENTRY(GetMinmaxParameteriv), - TABLE_ENTRY(Histogram), - TABLE_ENTRY(Minmax), - TABLE_ENTRY(ResetHistogram), - TABLE_ENTRY(ResetMinmax), - TABLE_ENTRY(TexImage3D), - TABLE_ENTRY(TexSubImage3D), - TABLE_ENTRY(CopyTexSubImage3D), - TABLE_ENTRY(ActiveTextureARB), - TABLE_ENTRY(ClientActiveTextureARB), - TABLE_ENTRY(MultiTexCoord1dARB), - TABLE_ENTRY(MultiTexCoord1dvARB), - TABLE_ENTRY(MultiTexCoord1fARB), - TABLE_ENTRY(MultiTexCoord1fvARB), - TABLE_ENTRY(MultiTexCoord1iARB), - TABLE_ENTRY(MultiTexCoord1ivARB), - TABLE_ENTRY(MultiTexCoord1sARB), - TABLE_ENTRY(MultiTexCoord1svARB), - TABLE_ENTRY(MultiTexCoord2dARB), - TABLE_ENTRY(MultiTexCoord2dvARB), - TABLE_ENTRY(MultiTexCoord2fARB), - TABLE_ENTRY(MultiTexCoord2fvARB), - TABLE_ENTRY(MultiTexCoord2iARB), - TABLE_ENTRY(MultiTexCoord2ivARB), - TABLE_ENTRY(MultiTexCoord2sARB), - TABLE_ENTRY(MultiTexCoord2svARB), - TABLE_ENTRY(MultiTexCoord3dARB), - TABLE_ENTRY(MultiTexCoord3dvARB), - TABLE_ENTRY(MultiTexCoord3fARB), - TABLE_ENTRY(MultiTexCoord3fvARB), - TABLE_ENTRY(MultiTexCoord3iARB), - TABLE_ENTRY(MultiTexCoord3ivARB), - TABLE_ENTRY(MultiTexCoord3sARB), - TABLE_ENTRY(MultiTexCoord3svARB), - TABLE_ENTRY(MultiTexCoord4dARB), - TABLE_ENTRY(MultiTexCoord4dvARB), - TABLE_ENTRY(MultiTexCoord4fARB), - TABLE_ENTRY(MultiTexCoord4fvARB), - TABLE_ENTRY(MultiTexCoord4iARB), - TABLE_ENTRY(MultiTexCoord4ivARB), - TABLE_ENTRY(MultiTexCoord4sARB), - TABLE_ENTRY(MultiTexCoord4svARB), - TABLE_ENTRY(LoadTransposeMatrixfARB), - TABLE_ENTRY(LoadTransposeMatrixdARB), - TABLE_ENTRY(MultTransposeMatrixfARB), - TABLE_ENTRY(MultTransposeMatrixdARB), - TABLE_ENTRY(SampleCoverageARB), - TABLE_ENTRY(__unused413), - TABLE_ENTRY(PolygonOffsetEXT), - TABLE_ENTRY(GetTexFilterFuncSGIS), - TABLE_ENTRY(TexFilterFuncSGIS), - TABLE_ENTRY(GetHistogramEXT), - TABLE_ENTRY(GetHistogramParameterfvEXT), - TABLE_ENTRY(GetHistogramParameterivEXT), - TABLE_ENTRY(GetMinmaxEXT), - TABLE_ENTRY(GetMinmaxParameterfvEXT), - TABLE_ENTRY(GetMinmaxParameterivEXT), - TABLE_ENTRY(GetConvolutionFilterEXT), - TABLE_ENTRY(GetConvolutionParameterfvEXT), - TABLE_ENTRY(GetConvolutionParameterivEXT), - TABLE_ENTRY(GetSeparableFilterEXT), - TABLE_ENTRY(GetColorTableSGI), - TABLE_ENTRY(GetColorTableParameterfvSGI), - TABLE_ENTRY(GetColorTableParameterivSGI), - TABLE_ENTRY(PixelTexGenSGIX), - TABLE_ENTRY(PixelTexGenParameteriSGIS), - TABLE_ENTRY(PixelTexGenParameterivSGIS), - TABLE_ENTRY(PixelTexGenParameterfSGIS), - TABLE_ENTRY(PixelTexGenParameterfvSGIS), - TABLE_ENTRY(GetPixelTexGenParameterivSGIS), - TABLE_ENTRY(GetPixelTexGenParameterfvSGIS), - TABLE_ENTRY(TexImage4DSGIS), - TABLE_ENTRY(TexSubImage4DSGIS), - TABLE_ENTRY(AreTexturesResidentEXT), - TABLE_ENTRY(GenTexturesEXT), - TABLE_ENTRY(IsTextureEXT), - TABLE_ENTRY(DetailTexFuncSGIS), - TABLE_ENTRY(GetDetailTexFuncSGIS), - TABLE_ENTRY(SharpenTexFuncSGIS), - TABLE_ENTRY(GetSharpenTexFuncSGIS), - TABLE_ENTRY(SampleMaskSGIS), - TABLE_ENTRY(SamplePatternSGIS), - TABLE_ENTRY(ColorPointerEXT), - TABLE_ENTRY(EdgeFlagPointerEXT), - TABLE_ENTRY(IndexPointerEXT), - TABLE_ENTRY(NormalPointerEXT), - TABLE_ENTRY(TexCoordPointerEXT), - TABLE_ENTRY(VertexPointerEXT), - TABLE_ENTRY(SpriteParameterfSGIX), - TABLE_ENTRY(SpriteParameterfvSGIX), - TABLE_ENTRY(SpriteParameteriSGIX), - TABLE_ENTRY(SpriteParameterivSGIX), - TABLE_ENTRY(PointParameterfEXT), - TABLE_ENTRY(PointParameterfvEXT), - TABLE_ENTRY(GetInstrumentsSGIX), - TABLE_ENTRY(InstrumentsBufferSGIX), - TABLE_ENTRY(PollInstrumentsSGIX), - TABLE_ENTRY(ReadInstrumentsSGIX), - TABLE_ENTRY(StartInstrumentsSGIX), - TABLE_ENTRY(StopInstrumentsSGIX), - TABLE_ENTRY(FrameZoomSGIX), - TABLE_ENTRY(TagSampleBufferSGIX), - TABLE_ENTRY(ReferencePlaneSGIX), - TABLE_ENTRY(FlushRasterSGIX), - TABLE_ENTRY(GetListParameterfvSGIX), - TABLE_ENTRY(GetListParameterivSGIX), - TABLE_ENTRY(ListParameterfSGIX), - TABLE_ENTRY(ListParameterfvSGIX), - TABLE_ENTRY(ListParameteriSGIX), - TABLE_ENTRY(ListParameterivSGIX), - TABLE_ENTRY(FragmentColorMaterialSGIX), - TABLE_ENTRY(FragmentLightfSGIX), - TABLE_ENTRY(FragmentLightfvSGIX), - TABLE_ENTRY(FragmentLightiSGIX), - TABLE_ENTRY(FragmentLightivSGIX), - TABLE_ENTRY(FragmentLightModelfSGIX), - TABLE_ENTRY(FragmentLightModelfvSGIX), - TABLE_ENTRY(FragmentLightModeliSGIX), - TABLE_ENTRY(FragmentLightModelivSGIX), - TABLE_ENTRY(FragmentMaterialfSGIX), - TABLE_ENTRY(FragmentMaterialfvSGIX), - TABLE_ENTRY(FragmentMaterialiSGIX), - TABLE_ENTRY(FragmentMaterialivSGIX), - TABLE_ENTRY(GetFragmentLightfvSGIX), - TABLE_ENTRY(GetFragmentLightivSGIX), - TABLE_ENTRY(GetFragmentMaterialfvSGIX), - TABLE_ENTRY(GetFragmentMaterialivSGIX), - TABLE_ENTRY(LightEnviSGIX), - TABLE_ENTRY(VertexWeightfEXT), - TABLE_ENTRY(VertexWeightfvEXT), - TABLE_ENTRY(VertexWeightPointerEXT), - TABLE_ENTRY(FlushVertexArrayRangeNV), - TABLE_ENTRY(VertexArrayRangeNV), - TABLE_ENTRY(CombinerParameterfvNV), - TABLE_ENTRY(CombinerParameterfNV), - TABLE_ENTRY(CombinerParameterivNV), - TABLE_ENTRY(CombinerParameteriNV), - TABLE_ENTRY(CombinerInputNV), - TABLE_ENTRY(CombinerOutputNV), - TABLE_ENTRY(FinalCombinerInputNV), - TABLE_ENTRY(GetCombinerInputParameterfvNV), - TABLE_ENTRY(GetCombinerInputParameterivNV), - TABLE_ENTRY(GetCombinerOutputParameterfvNV), - TABLE_ENTRY(GetCombinerOutputParameterivNV), - TABLE_ENTRY(GetFinalCombinerInputParameterfvNV), - TABLE_ENTRY(GetFinalCombinerInputParameterivNV), - TABLE_ENTRY(ResizeBuffersMESA), - TABLE_ENTRY(WindowPos2dMESA), - TABLE_ENTRY(WindowPos2dvMESA), - TABLE_ENTRY(WindowPos2fMESA), - TABLE_ENTRY(WindowPos2fvMESA), - TABLE_ENTRY(WindowPos2iMESA), - TABLE_ENTRY(WindowPos2ivMESA), - TABLE_ENTRY(WindowPos2sMESA), - TABLE_ENTRY(WindowPos2svMESA), - TABLE_ENTRY(WindowPos3dMESA), - TABLE_ENTRY(WindowPos3dvMESA), - TABLE_ENTRY(WindowPos3fMESA), - TABLE_ENTRY(WindowPos3fvMESA), - TABLE_ENTRY(WindowPos3iMESA), - TABLE_ENTRY(WindowPos3ivMESA), - TABLE_ENTRY(WindowPos3sMESA), - TABLE_ENTRY(WindowPos3svMESA), - TABLE_ENTRY(WindowPos4dMESA), - TABLE_ENTRY(WindowPos4dvMESA), - TABLE_ENTRY(WindowPos4fMESA), - TABLE_ENTRY(WindowPos4fvMESA), - TABLE_ENTRY(WindowPos4iMESA), - TABLE_ENTRY(WindowPos4ivMESA), - TABLE_ENTRY(WindowPos4sMESA), - TABLE_ENTRY(WindowPos4svMESA), - TABLE_ENTRY(BlendFuncSeparateEXT), - TABLE_ENTRY(IndexMaterialEXT), - TABLE_ENTRY(IndexFuncEXT), - TABLE_ENTRY(LockArraysEXT), - TABLE_ENTRY(UnlockArraysEXT), - TABLE_ENTRY(CullParameterdvEXT), - TABLE_ENTRY(CullParameterfvEXT), - TABLE_ENTRY(HintPGI), - TABLE_ENTRY(FogCoordfEXT), - TABLE_ENTRY(FogCoordfvEXT), - TABLE_ENTRY(FogCoorddEXT), - TABLE_ENTRY(FogCoorddvEXT), - TABLE_ENTRY(FogCoordPointerEXT), - TABLE_ENTRY(GetColorTableEXT), - TABLE_ENTRY(GetColorTableParameterivEXT), - TABLE_ENTRY(GetColorTableParameterfvEXT), - TABLE_ENTRY(TbufferMask3DFX), - TABLE_ENTRY(CompressedTexImage3DARB), - TABLE_ENTRY(CompressedTexImage2DARB), - TABLE_ENTRY(CompressedTexImage1DARB), - TABLE_ENTRY(CompressedTexSubImage3DARB), - TABLE_ENTRY(CompressedTexSubImage2DARB), - TABLE_ENTRY(CompressedTexSubImage1DARB), - TABLE_ENTRY(GetCompressedTexImageARB), - TABLE_ENTRY(SecondaryColor3bEXT), - TABLE_ENTRY(SecondaryColor3bvEXT), - TABLE_ENTRY(SecondaryColor3dEXT), - TABLE_ENTRY(SecondaryColor3dvEXT), - TABLE_ENTRY(SecondaryColor3fEXT), - TABLE_ENTRY(SecondaryColor3fvEXT), - TABLE_ENTRY(SecondaryColor3iEXT), - TABLE_ENTRY(SecondaryColor3ivEXT), - TABLE_ENTRY(SecondaryColor3sEXT), - TABLE_ENTRY(SecondaryColor3svEXT), - TABLE_ENTRY(SecondaryColor3ubEXT), - TABLE_ENTRY(SecondaryColor3ubvEXT), - TABLE_ENTRY(SecondaryColor3uiEXT), - TABLE_ENTRY(SecondaryColor3uivEXT), - TABLE_ENTRY(SecondaryColor3usEXT), - TABLE_ENTRY(SecondaryColor3usvEXT), - TABLE_ENTRY(SecondaryColorPointerEXT), - TABLE_ENTRY(AreProgramsResidentNV), - TABLE_ENTRY(BindProgramNV), - TABLE_ENTRY(DeleteProgramsNV), - TABLE_ENTRY(ExecuteProgramNV), - TABLE_ENTRY(GenProgramsNV), - TABLE_ENTRY(GetProgramParameterdvNV), - TABLE_ENTRY(GetProgramParameterfvNV), - TABLE_ENTRY(GetProgramivNV), - TABLE_ENTRY(GetProgramStringNV), - TABLE_ENTRY(GetTrackMatrixivNV), - TABLE_ENTRY(GetVertexAttribdvNV), - TABLE_ENTRY(GetVertexAttribfvNV), - TABLE_ENTRY(GetVertexAttribivNV), - TABLE_ENTRY(GetVertexAttribPointervNV), - TABLE_ENTRY(IsProgramNV), - TABLE_ENTRY(LoadProgramNV), - TABLE_ENTRY(ProgramParameter4dNV), - TABLE_ENTRY(ProgramParameter4dvNV), - TABLE_ENTRY(ProgramParameter4fNV), - TABLE_ENTRY(ProgramParameter4fvNV), - TABLE_ENTRY(ProgramParameters4dvNV), - TABLE_ENTRY(ProgramParameters4fvNV), - TABLE_ENTRY(RequestResidentProgramsNV), - TABLE_ENTRY(TrackMatrixNV), - TABLE_ENTRY(VertexAttribPointerNV), - TABLE_ENTRY(VertexAttrib1dNV), - TABLE_ENTRY(VertexAttrib1dvNV), - TABLE_ENTRY(VertexAttrib1fNV), - TABLE_ENTRY(VertexAttrib1fvNV), - TABLE_ENTRY(VertexAttrib1sNV), - TABLE_ENTRY(VertexAttrib1svNV), - TABLE_ENTRY(VertexAttrib2dNV), - TABLE_ENTRY(VertexAttrib2dvNV), - TABLE_ENTRY(VertexAttrib2fNV), - TABLE_ENTRY(VertexAttrib2fvNV), - TABLE_ENTRY(VertexAttrib2sNV), - TABLE_ENTRY(VertexAttrib2svNV), - TABLE_ENTRY(VertexAttrib3dNV), - TABLE_ENTRY(VertexAttrib3dvNV), - TABLE_ENTRY(VertexAttrib3fNV), - TABLE_ENTRY(VertexAttrib3fvNV), - TABLE_ENTRY(VertexAttrib3sNV), - TABLE_ENTRY(VertexAttrib3svNV), - TABLE_ENTRY(VertexAttrib4dNV), - TABLE_ENTRY(VertexAttrib4dvNV), - TABLE_ENTRY(VertexAttrib4fNV), - TABLE_ENTRY(VertexAttrib4fvNV), - TABLE_ENTRY(VertexAttrib4sNV), - TABLE_ENTRY(VertexAttrib4svNV), - TABLE_ENTRY(VertexAttrib4ubNV), - TABLE_ENTRY(VertexAttrib4ubvNV), - TABLE_ENTRY(VertexAttribs1dvNV), - TABLE_ENTRY(VertexAttribs1fvNV), - TABLE_ENTRY(VertexAttribs1svNV), - TABLE_ENTRY(VertexAttribs2dvNV), - TABLE_ENTRY(VertexAttribs2fvNV), - TABLE_ENTRY(VertexAttribs2svNV), - TABLE_ENTRY(VertexAttribs3dvNV), - TABLE_ENTRY(VertexAttribs3fvNV), - TABLE_ENTRY(VertexAttribs3svNV), - TABLE_ENTRY(VertexAttribs4dvNV), - TABLE_ENTRY(VertexAttribs4fvNV), - TABLE_ENTRY(VertexAttribs4svNV), - TABLE_ENTRY(VertexAttribs4ubvNV), - TABLE_ENTRY(PointParameteriNV), - TABLE_ENTRY(PointParameterivNV), - TABLE_ENTRY(MultiDrawArraysEXT), - TABLE_ENTRY(MultiDrawElementsEXT), - TABLE_ENTRY(ActiveStencilFaceEXT), - TABLE_ENTRY(DeleteFencesNV), - TABLE_ENTRY(GenFencesNV), - TABLE_ENTRY(IsFenceNV), - TABLE_ENTRY(TestFenceNV), - TABLE_ENTRY(GetFenceivNV), - TABLE_ENTRY(FinishFenceNV), - TABLE_ENTRY(SetFenceNV), - /* A whole bunch of no-op functions. These might be called - * when someone tries to call a dynamically-registered - * extension function without a current rendering context. - */ - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), -}; -#endif /* DISPATCH_TABLE_NAME */ - - -/* - * This is just used to silence compiler warnings. - * We list the functions which aren't otherwise used. - */ -#ifdef UNUSED_TABLE_NAME -void *UNUSED_TABLE_NAME[] = { - TABLE_ENTRY(ActiveTexture), - TABLE_ENTRY(ClientActiveTexture), - TABLE_ENTRY(MultiTexCoord1d), - TABLE_ENTRY(MultiTexCoord1dv), - TABLE_ENTRY(MultiTexCoord1f), - TABLE_ENTRY(MultiTexCoord1fv), - TABLE_ENTRY(MultiTexCoord1i), - TABLE_ENTRY(MultiTexCoord1iv), - TABLE_ENTRY(MultiTexCoord1s), - TABLE_ENTRY(MultiTexCoord1sv), - TABLE_ENTRY(MultiTexCoord2d), - TABLE_ENTRY(MultiTexCoord2dv), - TABLE_ENTRY(MultiTexCoord2f), - TABLE_ENTRY(MultiTexCoord2fv), - TABLE_ENTRY(MultiTexCoord2i), - TABLE_ENTRY(MultiTexCoord2iv), - TABLE_ENTRY(MultiTexCoord2s), - TABLE_ENTRY(MultiTexCoord2sv), - TABLE_ENTRY(MultiTexCoord3d), - TABLE_ENTRY(MultiTexCoord3dv), - TABLE_ENTRY(MultiTexCoord3f), - TABLE_ENTRY(MultiTexCoord3fv), - TABLE_ENTRY(MultiTexCoord3i), - TABLE_ENTRY(MultiTexCoord3iv), - TABLE_ENTRY(MultiTexCoord3s), - TABLE_ENTRY(MultiTexCoord3sv), - TABLE_ENTRY(MultiTexCoord4d), - TABLE_ENTRY(MultiTexCoord4dv), - TABLE_ENTRY(MultiTexCoord4f), - TABLE_ENTRY(MultiTexCoord4fv), - TABLE_ENTRY(MultiTexCoord4i), - TABLE_ENTRY(MultiTexCoord4iv), - TABLE_ENTRY(MultiTexCoord4s), - TABLE_ENTRY(MultiTexCoord4sv), - TABLE_ENTRY(LoadTransposeMatrixf), - TABLE_ENTRY(LoadTransposeMatrixd), - TABLE_ENTRY(MultTransposeMatrixf), - TABLE_ENTRY(MultTransposeMatrixd), - TABLE_ENTRY(SampleCoverage), - TABLE_ENTRY(CompressedTexImage3D), - TABLE_ENTRY(CompressedTexImage2D), - TABLE_ENTRY(CompressedTexImage1D), - TABLE_ENTRY(CompressedTexSubImage3D), - TABLE_ENTRY(CompressedTexSubImage2D), - TABLE_ENTRY(CompressedTexSubImage1D), - TABLE_ENTRY(GetCompressedTexImage), - TABLE_ENTRY(BlendColorEXT), - TABLE_ENTRY(TexImage3DEXT), - TABLE_ENTRY(TexSubImage3DEXT), - TABLE_ENTRY(TexSubImage1DEXT), - TABLE_ENTRY(TexSubImage2DEXT), - TABLE_ENTRY(CopyTexImage1DEXT), - TABLE_ENTRY(CopyTexImage2DEXT), - TABLE_ENTRY(CopyTexSubImage1DEXT), - TABLE_ENTRY(CopyTexSubImage2DEXT), - TABLE_ENTRY(CopyTexSubImage3DEXT), - TABLE_ENTRY(HistogramEXT), - TABLE_ENTRY(MinmaxEXT), - TABLE_ENTRY(ResetHistogramEXT), - TABLE_ENTRY(ResetMinmaxEXT), - TABLE_ENTRY(ConvolutionFilter1DEXT), - TABLE_ENTRY(ConvolutionFilter2DEXT), - TABLE_ENTRY(ConvolutionParameterfEXT), - TABLE_ENTRY(ConvolutionParameterfvEXT), - TABLE_ENTRY(ConvolutionParameteriEXT), - TABLE_ENTRY(ConvolutionParameterivEXT), - TABLE_ENTRY(CopyConvolutionFilter1DEXT), - TABLE_ENTRY(CopyConvolutionFilter2DEXT), - TABLE_ENTRY(SeparableFilter2DEXT), - TABLE_ENTRY(ColorTableSGI), - TABLE_ENTRY(ColorTableParameterfvSGI), - TABLE_ENTRY(ColorTableParameterivSGI), - TABLE_ENTRY(CopyColorTableSGI), - TABLE_ENTRY(BindTextureEXT), - TABLE_ENTRY(DeleteTexturesEXT), - TABLE_ENTRY(PrioritizeTexturesEXT), - TABLE_ENTRY(ArrayElementEXT), - TABLE_ENTRY(DrawArraysEXT), - TABLE_ENTRY(GetPointervEXT), - TABLE_ENTRY(BlendEquationEXT), - TABLE_ENTRY(PointParameterfARB), - TABLE_ENTRY(PointParameterfvARB), - TABLE_ENTRY(PointParameterfSGIS), - TABLE_ENTRY(PointParameterfvSGIS), - TABLE_ENTRY(ColorSubTableEXT), - TABLE_ENTRY(CopyColorSubTableEXT), - TABLE_ENTRY(ColorTableEXT), - TABLE_ENTRY(DrawRangeElementsEXT), - TABLE_ENTRY(BlendFuncSeparateINGR), - TABLE_ENTRY(SampleMaskEXT), - TABLE_ENTRY(SamplePatternEXT), - TABLE_ENTRY(WindowPos2dARB), - TABLE_ENTRY(WindowPos2fARB), - TABLE_ENTRY(WindowPos2iARB), - TABLE_ENTRY(WindowPos2sARB), - TABLE_ENTRY(WindowPos2dvARB), - TABLE_ENTRY(WindowPos2fvARB), - TABLE_ENTRY(WindowPos2ivARB), - TABLE_ENTRY(WindowPos2svARB), - TABLE_ENTRY(WindowPos3dARB), - TABLE_ENTRY(WindowPos3fARB), - TABLE_ENTRY(WindowPos3iARB), - TABLE_ENTRY(WindowPos3sARB), - TABLE_ENTRY(WindowPos3dvARB), - TABLE_ENTRY(WindowPos3fvARB), - TABLE_ENTRY(WindowPos3ivARB), - TABLE_ENTRY(WindowPos3svARB), - TABLE_ENTRY(BlendFuncSeparate), - TABLE_ENTRY(FogCoordf), - TABLE_ENTRY(FogCoordfv), - TABLE_ENTRY(FogCoordd), - TABLE_ENTRY(FogCoorddv), - TABLE_ENTRY(FogCoordPointer), - TABLE_ENTRY(MultiDrawArrays), - TABLE_ENTRY(MultiDrawElements), - TABLE_ENTRY(PointParameterf), - TABLE_ENTRY(PointParameterfv), - TABLE_ENTRY(PointParameteri), - TABLE_ENTRY(PointParameteriv), - TABLE_ENTRY(SecondaryColor3b), - TABLE_ENTRY(SecondaryColor3bv), - TABLE_ENTRY(SecondaryColor3d), - TABLE_ENTRY(SecondaryColor3dv), - TABLE_ENTRY(SecondaryColor3f), - TABLE_ENTRY(SecondaryColor3fv), - TABLE_ENTRY(SecondaryColor3i), - TABLE_ENTRY(SecondaryColor3iv), - TABLE_ENTRY(SecondaryColor3s), - TABLE_ENTRY(SecondaryColor3sv), - TABLE_ENTRY(SecondaryColor3ub), - TABLE_ENTRY(SecondaryColor3ubv), - TABLE_ENTRY(SecondaryColor3ui), - TABLE_ENTRY(SecondaryColor3uiv), - TABLE_ENTRY(SecondaryColor3us), - TABLE_ENTRY(SecondaryColor3usv), - TABLE_ENTRY(SecondaryColorPointer), - TABLE_ENTRY(WindowPos2d), - TABLE_ENTRY(WindowPos2dv), - TABLE_ENTRY(WindowPos2f), - TABLE_ENTRY(WindowPos2fv), - TABLE_ENTRY(WindowPos2i), - TABLE_ENTRY(WindowPos2iv), - TABLE_ENTRY(WindowPos2s), - TABLE_ENTRY(WindowPos2sv), - TABLE_ENTRY(WindowPos3d), - TABLE_ENTRY(WindowPos3dv), - TABLE_ENTRY(WindowPos3f), - TABLE_ENTRY(WindowPos3fv), - TABLE_ENTRY(WindowPos3i), - TABLE_ENTRY(WindowPos3iv), - TABLE_ENTRY(WindowPos3s), - TABLE_ENTRY(WindowPos3sv), -}; -#endif /*UNUSED_TABLE_NAME*/ - - -#undef KEYWORD1 -#undef KEYWORD2 -#undef NAME -#undef DISPATCH -#undef RETURN_DISPATCH -#undef DISPATCH_TABLE_NAME -#undef UNUSED_TABLE_NAME -#undef TABLE_ENTRY - Index: xc/extras/Mesa/src/glheader.h diff -u xc/extras/Mesa/src/glheader.h:1.22 xc/extras/Mesa/src/glheader.h:removed --- xc/extras/Mesa/src/glheader.h:1.22 Wed Oct 22 11:44:41 2003 +++ xc/extras/Mesa/src/glheader.h Wed Mar 16 21:00:30 2005 @@ -1,295 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLHEADER_H -#define GLHEADER_H - - -/* - * This is the top-most include file of the Mesa sources. - * It includes gl.h and all system headers which are needed. - * Other Mesa source files should _not_ directly include any system - * headers. This allows Mesa to be integrated into XFree86 and - * allows system-dependent hacks/work-arounds to be collected in one place. - * - * If you touch this file, everything gets recompiled! - * - * This file should be included before any other header in the .c files. - * - * Put compiler/OS/assembly pragmas and macros here to avoid - * cluttering other source files. - */ - - - -#if defined(XFree86LOADER) && defined(IN_MODULE) -#include "xf86_ansic.h" -#else -#include -#include -/* If we can use Compaq's Fast Math Library on Alpha */ -#if defined(__alpha__) && defined(CCPML) -#include -#else -#include -#endif -#include -#include -#include -#include -#if defined(__linux__) && defined(__i386__) -#include -#endif -#endif -#include -#include - - -#ifdef HAVE_CONFIG_H -#include "conf.h" -#endif - - -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) -# define __WIN32__ -# define finite _finite -#endif - -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) -# pragma warning( disable : 4068 ) /* unknown pragma */ -# pragma warning( disable : 4710 ) /* function 'foo' not inlined */ -# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ -# pragma warning( disable : 4127 ) /* conditional expression is constant */ -# if defined(MESA_MINWARN) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# endif -# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# define WGLAPI __declspec(dllexport) -# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# define WGLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# define WGLAPI __declspec(dllimport) -# endif /* _STATIC_MESA support */ -# define GLAPIENTRY __stdcall -# define GLAPIENTRYP __stdcall * -# define GLCALLBACK __stdcall -# define GLCALLBACKP __stdcall * -# if defined(__CYGWIN__) -# define GLCALLBACKPCAST * -# else -# define GLCALLBACKPCAST __stdcall * -# endif -# define GLWINAPI __stdcall -# define GLWINAPIV __cdecl -#else -/* non-Windows compilation */ -# define GLAPI extern -# define GLAPIENTRY -# define GLAPIENTRYP * -# define GLCALLBACK -# define GLCALLBACKP * -# define GLCALLBACKPCAST * -# define GLWINAPI -# define GLWINAPIV -#endif /* WIN32 / CYGWIN bracket */ - -/* compatability guard so we don't need to change client code */ - -#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__) -#if 0 -# define CALLBACK GLCALLBACK -typedef void *HGLRC; -typedef void *HDC; -#endif -typedef int (GLAPIENTRY *PROC)(); -typedef unsigned long COLORREF; -#endif - - -/* Make sure we include glext.h from gl.h */ -#define GL_GLEXT_PROTOTYPES - - -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) -# define WGL_FONT_LINES 0 -# define WGL_FONT_POLYGONS 1 -#ifndef _GNU_H_WINDOWS32_FUNCTIONS -# ifdef UNICODE -# define wglUseFontBitmaps wglUseFontBitmapsW -# define wglUseFontOutlines wglUseFontOutlinesW -# else -# define wglUseFontBitmaps wglUseFontBitmapsA -# define wglUseFontOutlines wglUseFontOutlinesA -# endif /* !UNICODE */ -#endif /* _GNU_H_WINDOWS32_FUNCTIONS */ -typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; -typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; -typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR; -#if !defined(GLX_USE_MESA) -#include -#endif -#endif - - -/* - * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN. - * Do not use them unless absolutely necessary! - * Try to use a runtime test instead. - * For now, only used by some DRI hardware drivers for color/texel packing. - */ -#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN -#if defined(__linux__) -#include -#define CPU_TO_LE32( x ) bswap_32( x ) -#else /*__linux__*/ -#define CPU_TO_LE32( x ) ( x ) /* fix me for non-Linux big-endian! */ -#endif /*__linux__*/ -#define MESA_BIG_ENDIAN 1 -#else -#define CPU_TO_LE32( x ) ( x ) -#define MESA_LITTLE_ENDIAN 1 -#endif -#define LE32_TO_CPU( x ) CPU_TO_LE32( x ) - - -/* This is a macro on IRIX */ -#ifdef _P -#undef _P -#endif - - - -#include "GL/gl.h" -#include "GL/glext.h" - - -#ifndef CAPI -#ifdef WIN32 -#define CAPI _cdecl -#else -#define CAPI -#endif -#endif -#include - - - -/* Disable unreachable code warnings for Watcom C++ */ -#ifdef __WATCOMC__ -#pragma disable_message(201) -#endif - - -/* Turn off macro checking systems used by other libraries */ -#ifdef CHECK -#undef CHECK -#endif - - -/* Create a macro so that asm functions can be linked into compilers other - * than GNU C - */ -#ifndef _ASMAPI -#if !defined( __GNUC__ ) && !defined( VMS ) -#define _ASMAPI __cdecl -#else -#define _ASMAPI -#endif -#ifdef PTR_DECL_IN_FRONT -#define _ASMAPIP * _ASMAPI -#else -#define _ASMAPIP _ASMAPI * -#endif -#endif - -#ifdef USE_X86_ASM -#define _NORMAPI _ASMAPI -#define _NORMAPIP _ASMAPIP -#else -#define _NORMAPI -#define _NORMAPIP * -#endif - - -/* Function inlining */ -#if defined(__GNUC__) -# define INLINE __inline__ -#elif defined(__MSC__) -# define INLINE __inline -#elif defined(_MSC_VER) -# define INLINE __inline -#elif defined(__ICL) -# define INLINE __inline -#else -# define INLINE -#endif - - -/* - * Provide a reasonable replacement for __FUNCTION__ when using - * non-GNU C compilers. - */ -#if !defined(__GNUC__) -#define STRINGIZE(x) #x -#define STRINGIZE_EVAL(x) STRINGIZE(x) -#define __FUNCTION__ STRINGIZE_EVAL(__FILE__) ", line " STRINGIZE_EVAL(__LINE__) -#endif - - -/* Some compilers don't like some of Mesa's const usage */ -#ifdef NO_CONST -# define CONST -#else -# define CONST const -#endif - - -#ifdef DEBUG -# define ASSERT(X) assert(X) -#else -# define ASSERT(X) -#endif - - -/* - * Sometimes we treat GLfloats as GLints. On x86 systems, moving a float - * as a int (thereby using integer registers instead of fp registers) is - * a performance win. Typically, this can be done with ordinary casts. - * But with gcc's -fstrict-aliasing flag (which defaults to on in gcc 3.0) - * these casts generate warnings. - * The following union typedef is used to solve that. - */ -typedef union { GLfloat f; GLint i; } fi_type; - - -#endif /* GLHEADER_H */ Index: xc/extras/Mesa/src/glprocs.h diff -u xc/extras/Mesa/src/glprocs.h:1.1.1.1 xc/extras/Mesa/src/glprocs.h:removed --- xc/extras/Mesa/src/glprocs.h:1.1.1.1 Sun Sep 28 13:25:56 2003 +++ xc/extras/Mesa/src/glprocs.h Wed Mar 16 21:00:30 2005 @@ -1,814 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glprocs.py script */ - -/* This file is only included by glapi.c and is used for - * the GetProcAddress() function - */ - -static struct name_address_offset static_functions[] = { - { "glNewList", (GLvoid *) glNewList, _gloffset_NewList }, - { "glEndList", (GLvoid *) glEndList, _gloffset_EndList }, - { "glCallList", (GLvoid *) glCallList, _gloffset_CallList }, - { "glCallLists", (GLvoid *) glCallLists, _gloffset_CallLists }, - { "glDeleteLists", (GLvoid *) glDeleteLists, _gloffset_DeleteLists }, - { "glGenLists", (GLvoid *) glGenLists, _gloffset_GenLists }, - { "glListBase", (GLvoid *) glListBase, _gloffset_ListBase }, - { "glBegin", (GLvoid *) glBegin, _gloffset_Begin }, - { "glBitmap", (GLvoid *) glBitmap, _gloffset_Bitmap }, - { "glColor3b", (GLvoid *) glColor3b, _gloffset_Color3b }, - { "glColor3bv", (GLvoid *) glColor3bv, _gloffset_Color3bv }, - { "glColor3d", (GLvoid *) glColor3d, _gloffset_Color3d }, - { "glColor3dv", (GLvoid *) glColor3dv, _gloffset_Color3dv }, - { "glColor3f", (GLvoid *) glColor3f, _gloffset_Color3f }, - { "glColor3fv", (GLvoid *) glColor3fv, _gloffset_Color3fv }, - { "glColor3i", (GLvoid *) glColor3i, _gloffset_Color3i }, - { "glColor3iv", (GLvoid *) glColor3iv, _gloffset_Color3iv }, - { "glColor3s", (GLvoid *) glColor3s, _gloffset_Color3s }, - { "glColor3sv", (GLvoid *) glColor3sv, _gloffset_Color3sv }, - { "glColor3ub", (GLvoid *) glColor3ub, _gloffset_Color3ub }, - { "glColor3ubv", (GLvoid *) glColor3ubv, _gloffset_Color3ubv }, - { "glColor3ui", (GLvoid *) glColor3ui, _gloffset_Color3ui }, - { "glColor3uiv", (GLvoid *) glColor3uiv, _gloffset_Color3uiv }, - { "glColor3us", (GLvoid *) glColor3us, _gloffset_Color3us }, - { "glColor3usv", (GLvoid *) glColor3usv, _gloffset_Color3usv }, - { "glColor4b", (GLvoid *) glColor4b, _gloffset_Color4b }, - { "glColor4bv", (GLvoid *) glColor4bv, _gloffset_Color4bv }, - { "glColor4d", (GLvoid *) glColor4d, _gloffset_Color4d }, - { "glColor4dv", (GLvoid *) glColor4dv, _gloffset_Color4dv }, - { "glColor4f", (GLvoid *) glColor4f, _gloffset_Color4f }, - { "glColor4fv", (GLvoid *) glColor4fv, _gloffset_Color4fv }, - { "glColor4i", (GLvoid *) glColor4i, _gloffset_Color4i }, - { "glColor4iv", (GLvoid *) glColor4iv, _gloffset_Color4iv }, - { "glColor4s", (GLvoid *) glColor4s, _gloffset_Color4s }, - { "glColor4sv", (GLvoid *) glColor4sv, _gloffset_Color4sv }, - { "glColor4ub", (GLvoid *) glColor4ub, _gloffset_Color4ub }, - { "glColor4ubv", (GLvoid *) glColor4ubv, _gloffset_Color4ubv }, - { "glColor4ui", (GLvoid *) glColor4ui, _gloffset_Color4ui }, - { "glColor4uiv", (GLvoid *) glColor4uiv, _gloffset_Color4uiv }, - { "glColor4us", (GLvoid *) glColor4us, _gloffset_Color4us }, - { "glColor4usv", (GLvoid *) glColor4usv, _gloffset_Color4usv }, - { "glEdgeFlag", (GLvoid *) glEdgeFlag, _gloffset_EdgeFlag }, - { "glEdgeFlagv", (GLvoid *) glEdgeFlagv, _gloffset_EdgeFlagv }, - { "glEnd", (GLvoid *) glEnd, _gloffset_End }, - { "glIndexd", (GLvoid *) glIndexd, _gloffset_Indexd }, - { "glIndexdv", (GLvoid *) glIndexdv, _gloffset_Indexdv }, - { "glIndexf", (GLvoid *) glIndexf, _gloffset_Indexf }, - { "glIndexfv", (GLvoid *) glIndexfv, _gloffset_Indexfv }, - { "glIndexi", (GLvoid *) glIndexi, _gloffset_Indexi }, - { "glIndexiv", (GLvoid *) glIndexiv, _gloffset_Indexiv }, - { "glIndexs", (GLvoid *) glIndexs, _gloffset_Indexs }, - { "glIndexsv", (GLvoid *) glIndexsv, _gloffset_Indexsv }, - { "glNormal3b", (GLvoid *) glNormal3b, _gloffset_Normal3b }, - { "glNormal3bv", (GLvoid *) glNormal3bv, _gloffset_Normal3bv }, - { "glNormal3d", (GLvoid *) glNormal3d, _gloffset_Normal3d }, - { "glNormal3dv", (GLvoid *) glNormal3dv, _gloffset_Normal3dv }, - { "glNormal3f", (GLvoid *) glNormal3f, _gloffset_Normal3f }, - { "glNormal3fv", (GLvoid *) glNormal3fv, _gloffset_Normal3fv }, - { "glNormal3i", (GLvoid *) glNormal3i, _gloffset_Normal3i }, - { "glNormal3iv", (GLvoid *) glNormal3iv, _gloffset_Normal3iv }, - { "glNormal3s", (GLvoid *) glNormal3s, _gloffset_Normal3s }, - { "glNormal3sv", (GLvoid *) glNormal3sv, _gloffset_Normal3sv }, - { "glRasterPos2d", (GLvoid *) glRasterPos2d, _gloffset_RasterPos2d }, - { "glRasterPos2dv", (GLvoid *) glRasterPos2dv, _gloffset_RasterPos2dv }, - { "glRasterPos2f", (GLvoid *) glRasterPos2f, _gloffset_RasterPos2f }, - { "glRasterPos2fv", (GLvoid *) glRasterPos2fv, _gloffset_RasterPos2fv }, - { "glRasterPos2i", (GLvoid *) glRasterPos2i, _gloffset_RasterPos2i }, - { "glRasterPos2iv", (GLvoid *) glRasterPos2iv, _gloffset_RasterPos2iv }, - { "glRasterPos2s", (GLvoid *) glRasterPos2s, _gloffset_RasterPos2s }, - { "glRasterPos2sv", (GLvoid *) glRasterPos2sv, _gloffset_RasterPos2sv }, - { "glRasterPos3d", (GLvoid *) glRasterPos3d, _gloffset_RasterPos3d }, - { "glRasterPos3dv", (GLvoid *) glRasterPos3dv, _gloffset_RasterPos3dv }, - { "glRasterPos3f", (GLvoid *) glRasterPos3f, _gloffset_RasterPos3f }, - { "glRasterPos3fv", (GLvoid *) glRasterPos3fv, _gloffset_RasterPos3fv }, - { "glRasterPos3i", (GLvoid *) glRasterPos3i, _gloffset_RasterPos3i }, - { "glRasterPos3iv", (GLvoid *) glRasterPos3iv, _gloffset_RasterPos3iv }, - { "glRasterPos3s", (GLvoid *) glRasterPos3s, _gloffset_RasterPos3s }, - { "glRasterPos3sv", (GLvoid *) glRasterPos3sv, _gloffset_RasterPos3sv }, - { "glRasterPos4d", (GLvoid *) glRasterPos4d, _gloffset_RasterPos4d }, - { "glRasterPos4dv", (GLvoid *) glRasterPos4dv, _gloffset_RasterPos4dv }, - { "glRasterPos4f", (GLvoid *) glRasterPos4f, _gloffset_RasterPos4f }, - { "glRasterPos4fv", (GLvoid *) glRasterPos4fv, _gloffset_RasterPos4fv }, - { "glRasterPos4i", (GLvoid *) glRasterPos4i, _gloffset_RasterPos4i }, - { "glRasterPos4iv", (GLvoid *) glRasterPos4iv, _gloffset_RasterPos4iv }, - { "glRasterPos4s", (GLvoid *) glRasterPos4s, _gloffset_RasterPos4s }, - { "glRasterPos4sv", (GLvoid *) glRasterPos4sv, _gloffset_RasterPos4sv }, - { "glRectd", (GLvoid *) glRectd, _gloffset_Rectd }, - { "glRectdv", (GLvoid *) glRectdv, _gloffset_Rectdv }, - { "glRectf", (GLvoid *) glRectf, _gloffset_Rectf }, - { "glRectfv", (GLvoid *) glRectfv, _gloffset_Rectfv }, - { "glRecti", (GLvoid *) glRecti, _gloffset_Recti }, - { "glRectiv", (GLvoid *) glRectiv, _gloffset_Rectiv }, - { "glRects", (GLvoid *) glRects, _gloffset_Rects }, - { "glRectsv", (GLvoid *) glRectsv, _gloffset_Rectsv }, - { "glTexCoord1d", (GLvoid *) glTexCoord1d, _gloffset_TexCoord1d }, - { "glTexCoord1dv", (GLvoid *) glTexCoord1dv, _gloffset_TexCoord1dv }, - { "glTexCoord1f", (GLvoid *) glTexCoord1f, _gloffset_TexCoord1f }, - { "glTexCoord1fv", (GLvoid *) glTexCoord1fv, _gloffset_TexCoord1fv }, - { "glTexCoord1i", (GLvoid *) glTexCoord1i, _gloffset_TexCoord1i }, - { "glTexCoord1iv", (GLvoid *) glTexCoord1iv, _gloffset_TexCoord1iv }, - { "glTexCoord1s", (GLvoid *) glTexCoord1s, _gloffset_TexCoord1s }, - { "glTexCoord1sv", (GLvoid *) glTexCoord1sv, _gloffset_TexCoord1sv }, - { "glTexCoord2d", (GLvoid *) glTexCoord2d, _gloffset_TexCoord2d }, - { "glTexCoord2dv", (GLvoid *) glTexCoord2dv, _gloffset_TexCoord2dv }, - { "glTexCoord2f", (GLvoid *) glTexCoord2f, _gloffset_TexCoord2f }, - { "glTexCoord2fv", (GLvoid *) glTexCoord2fv, _gloffset_TexCoord2fv }, - { "glTexCoord2i", (GLvoid *) glTexCoord2i, _gloffset_TexCoord2i }, - { "glTexCoord2iv", (GLvoid *) glTexCoord2iv, _gloffset_TexCoord2iv }, - { "glTexCoord2s", (GLvoid *) glTexCoord2s, _gloffset_TexCoord2s }, - { "glTexCoord2sv", (GLvoid *) glTexCoord2sv, _gloffset_TexCoord2sv }, - { "glTexCoord3d", (GLvoid *) glTexCoord3d, _gloffset_TexCoord3d }, - { "glTexCoord3dv", (GLvoid *) glTexCoord3dv, _gloffset_TexCoord3dv }, - { "glTexCoord3f", (GLvoid *) glTexCoord3f, _gloffset_TexCoord3f }, - { "glTexCoord3fv", (GLvoid *) glTexCoord3fv, _gloffset_TexCoord3fv }, - { "glTexCoord3i", (GLvoid *) glTexCoord3i, _gloffset_TexCoord3i }, - { "glTexCoord3iv", (GLvoid *) glTexCoord3iv, _gloffset_TexCoord3iv }, - { "glTexCoord3s", (GLvoid *) glTexCoord3s, _gloffset_TexCoord3s }, - { "glTexCoord3sv", (GLvoid *) glTexCoord3sv, _gloffset_TexCoord3sv }, - { "glTexCoord4d", (GLvoid *) glTexCoord4d, _gloffset_TexCoord4d }, - { "glTexCoord4dv", (GLvoid *) glTexCoord4dv, _gloffset_TexCoord4dv }, - { "glTexCoord4f", (GLvoid *) glTexCoord4f, _gloffset_TexCoord4f }, - { "glTexCoord4fv", (GLvoid *) glTexCoord4fv, _gloffset_TexCoord4fv }, - { "glTexCoord4i", (GLvoid *) glTexCoord4i, _gloffset_TexCoord4i }, - { "glTexCoord4iv", (GLvoid *) glTexCoord4iv, _gloffset_TexCoord4iv }, - { "glTexCoord4s", (GLvoid *) glTexCoord4s, _gloffset_TexCoord4s }, - { "glTexCoord4sv", (GLvoid *) glTexCoord4sv, _gloffset_TexCoord4sv }, - { "glVertex2d", (GLvoid *) glVertex2d, _gloffset_Vertex2d }, - { "glVertex2dv", (GLvoid *) glVertex2dv, _gloffset_Vertex2dv }, - { "glVertex2f", (GLvoid *) glVertex2f, _gloffset_Vertex2f }, - { "glVertex2fv", (GLvoid *) glVertex2fv, _gloffset_Vertex2fv }, - { "glVertex2i", (GLvoid *) glVertex2i, _gloffset_Vertex2i }, - { "glVertex2iv", (GLvoid *) glVertex2iv, _gloffset_Vertex2iv }, - { "glVertex2s", (GLvoid *) glVertex2s, _gloffset_Vertex2s }, - { "glVertex2sv", (GLvoid *) glVertex2sv, _gloffset_Vertex2sv }, - { "glVertex3d", (GLvoid *) glVertex3d, _gloffset_Vertex3d }, - { "glVertex3dv", (GLvoid *) glVertex3dv, _gloffset_Vertex3dv }, - { "glVertex3f", (GLvoid *) glVertex3f, _gloffset_Vertex3f }, - { "glVertex3fv", (GLvoid *) glVertex3fv, _gloffset_Vertex3fv }, - { "glVertex3i", (GLvoid *) glVertex3i, _gloffset_Vertex3i }, - { "glVertex3iv", (GLvoid *) glVertex3iv, _gloffset_Vertex3iv }, - { "glVertex3s", (GLvoid *) glVertex3s, _gloffset_Vertex3s }, - { "glVertex3sv", (GLvoid *) glVertex3sv, _gloffset_Vertex3sv }, - { "glVertex4d", (GLvoid *) glVertex4d, _gloffset_Vertex4d }, - { "glVertex4dv", (GLvoid *) glVertex4dv, _gloffset_Vertex4dv }, - { "glVertex4f", (GLvoid *) glVertex4f, _gloffset_Vertex4f }, - { "glVertex4fv", (GLvoid *) glVertex4fv, _gloffset_Vertex4fv }, - { "glVertex4i", (GLvoid *) glVertex4i, _gloffset_Vertex4i }, - { "glVertex4iv", (GLvoid *) glVertex4iv, _gloffset_Vertex4iv }, - { "glVertex4s", (GLvoid *) glVertex4s, _gloffset_Vertex4s }, - { "glVertex4sv", (GLvoid *) glVertex4sv, _gloffset_Vertex4sv }, - { "glClipPlane", (GLvoid *) glClipPlane, _gloffset_ClipPlane }, - { "glColorMaterial", (GLvoid *) glColorMaterial, _gloffset_ColorMaterial }, - { "glCullFace", (GLvoid *) glCullFace, _gloffset_CullFace }, - { "glFogf", (GLvoid *) glFogf, _gloffset_Fogf }, - { "glFogfv", (GLvoid *) glFogfv, _gloffset_Fogfv }, - { "glFogi", (GLvoid *) glFogi, _gloffset_Fogi }, - { "glFogiv", (GLvoid *) glFogiv, _gloffset_Fogiv }, - { "glFrontFace", (GLvoid *) glFrontFace, _gloffset_FrontFace }, - { "glHint", (GLvoid *) glHint, _gloffset_Hint }, - { "glLightf", (GLvoid *) glLightf, _gloffset_Lightf }, - { "glLightfv", (GLvoid *) glLightfv, _gloffset_Lightfv }, - { "glLighti", (GLvoid *) glLighti, _gloffset_Lighti }, - { "glLightiv", (GLvoid *) glLightiv, _gloffset_Lightiv }, - { "glLightModelf", (GLvoid *) glLightModelf, _gloffset_LightModelf }, - { "glLightModelfv", (GLvoid *) glLightModelfv, _gloffset_LightModelfv }, - { "glLightModeli", (GLvoid *) glLightModeli, _gloffset_LightModeli }, - { "glLightModeliv", (GLvoid *) glLightModeliv, _gloffset_LightModeliv }, - { "glLineStipple", (GLvoid *) glLineStipple, _gloffset_LineStipple }, - { "glLineWidth", (GLvoid *) glLineWidth, _gloffset_LineWidth }, - { "glMaterialf", (GLvoid *) glMaterialf, _gloffset_Materialf }, - { "glMaterialfv", (GLvoid *) glMaterialfv, _gloffset_Materialfv }, - { "glMateriali", (GLvoid *) glMateriali, _gloffset_Materiali }, - { "glMaterialiv", (GLvoid *) glMaterialiv, _gloffset_Materialiv }, - { "glPointSize", (GLvoid *) glPointSize, _gloffset_PointSize }, - { "glPolygonMode", (GLvoid *) glPolygonMode, _gloffset_PolygonMode }, - { "glPolygonStipple", (GLvoid *) glPolygonStipple, _gloffset_PolygonStipple }, - { "glScissor", (GLvoid *) glScissor, _gloffset_Scissor }, - { "glShadeModel", (GLvoid *) glShadeModel, _gloffset_ShadeModel }, - { "glTexParameterf", (GLvoid *) glTexParameterf, _gloffset_TexParameterf }, - { "glTexParameterfv", (GLvoid *) glTexParameterfv, _gloffset_TexParameterfv }, - { "glTexParameteri", (GLvoid *) glTexParameteri, _gloffset_TexParameteri }, - { "glTexParameteriv", (GLvoid *) glTexParameteriv, _gloffset_TexParameteriv }, - { "glTexImage1D", (GLvoid *) glTexImage1D, _gloffset_TexImage1D }, - { "glTexImage2D", (GLvoid *) glTexImage2D, _gloffset_TexImage2D }, - { "glTexEnvf", (GLvoid *) glTexEnvf, _gloffset_TexEnvf }, - { "glTexEnvfv", (GLvoid *) glTexEnvfv, _gloffset_TexEnvfv }, - { "glTexEnvi", (GLvoid *) glTexEnvi, _gloffset_TexEnvi }, - { "glTexEnviv", (GLvoid *) glTexEnviv, _gloffset_TexEnviv }, - { "glTexGend", (GLvoid *) glTexGend, _gloffset_TexGend }, - { "glTexGendv", (GLvoid *) glTexGendv, _gloffset_TexGendv }, - { "glTexGenf", (GLvoid *) glTexGenf, _gloffset_TexGenf }, - { "glTexGenfv", (GLvoid *) glTexGenfv, _gloffset_TexGenfv }, - { "glTexGeni", (GLvoid *) glTexGeni, _gloffset_TexGeni }, - { "glTexGeniv", (GLvoid *) glTexGeniv, _gloffset_TexGeniv }, - { "glFeedbackBuffer", (GLvoid *) glFeedbackBuffer, _gloffset_FeedbackBuffer }, - { "glSelectBuffer", (GLvoid *) glSelectBuffer, _gloffset_SelectBuffer }, - { "glRenderMode", (GLvoid *) glRenderMode, _gloffset_RenderMode }, - { "glInitNames", (GLvoid *) glInitNames, _gloffset_InitNames }, - { "glLoadName", (GLvoid *) glLoadName, _gloffset_LoadName }, - { "glPassThrough", (GLvoid *) glPassThrough, _gloffset_PassThrough }, - { "glPopName", (GLvoid *) glPopName, _gloffset_PopName }, - { "glPushName", (GLvoid *) glPushName, _gloffset_PushName }, - { "glDrawBuffer", (GLvoid *) glDrawBuffer, _gloffset_DrawBuffer }, - { "glClear", (GLvoid *) glClear, _gloffset_Clear }, - { "glClearAccum", (GLvoid *) glClearAccum, _gloffset_ClearAccum }, - { "glClearIndex", (GLvoid *) glClearIndex, _gloffset_ClearIndex }, - { "glClearColor", (GLvoid *) glClearColor, _gloffset_ClearColor }, - { "glClearStencil", (GLvoid *) glClearStencil, _gloffset_ClearStencil }, - { "glClearDepth", (GLvoid *) glClearDepth, _gloffset_ClearDepth }, - { "glStencilMask", (GLvoid *) glStencilMask, _gloffset_StencilMask }, - { "glColorMask", (GLvoid *) glColorMask, _gloffset_ColorMask }, - { "glDepthMask", (GLvoid *) glDepthMask, _gloffset_DepthMask }, - { "glIndexMask", (GLvoid *) glIndexMask, _gloffset_IndexMask }, - { "glAccum", (GLvoid *) glAccum, _gloffset_Accum }, - { "glDisable", (GLvoid *) glDisable, _gloffset_Disable }, - { "glEnable", (GLvoid *) glEnable, _gloffset_Enable }, - { "glFinish", (GLvoid *) glFinish, _gloffset_Finish }, - { "glFlush", (GLvoid *) glFlush, _gloffset_Flush }, - { "glPopAttrib", (GLvoid *) glPopAttrib, _gloffset_PopAttrib }, - { "glPushAttrib", (GLvoid *) glPushAttrib, _gloffset_PushAttrib }, - { "glMap1d", (GLvoid *) glMap1d, _gloffset_Map1d }, - { "glMap1f", (GLvoid *) glMap1f, _gloffset_Map1f }, - { "glMap2d", (GLvoid *) glMap2d, _gloffset_Map2d }, - { "glMap2f", (GLvoid *) glMap2f, _gloffset_Map2f }, - { "glMapGrid1d", (GLvoid *) glMapGrid1d, _gloffset_MapGrid1d }, - { "glMapGrid1f", (GLvoid *) glMapGrid1f, _gloffset_MapGrid1f }, - { "glMapGrid2d", (GLvoid *) glMapGrid2d, _gloffset_MapGrid2d }, - { "glMapGrid2f", (GLvoid *) glMapGrid2f, _gloffset_MapGrid2f }, - { "glEvalCoord1d", (GLvoid *) glEvalCoord1d, _gloffset_EvalCoord1d }, - { "glEvalCoord1dv", (GLvoid *) glEvalCoord1dv, _gloffset_EvalCoord1dv }, - { "glEvalCoord1f", (GLvoid *) glEvalCoord1f, _gloffset_EvalCoord1f }, - { "glEvalCoord1fv", (GLvoid *) glEvalCoord1fv, _gloffset_EvalCoord1fv }, - { "glEvalCoord2d", (GLvoid *) glEvalCoord2d, _gloffset_EvalCoord2d }, - { "glEvalCoord2dv", (GLvoid *) glEvalCoord2dv, _gloffset_EvalCoord2dv }, - { "glEvalCoord2f", (GLvoid *) glEvalCoord2f, _gloffset_EvalCoord2f }, - { "glEvalCoord2fv", (GLvoid *) glEvalCoord2fv, _gloffset_EvalCoord2fv }, - { "glEvalMesh1", (GLvoid *) glEvalMesh1, _gloffset_EvalMesh1 }, - { "glEvalPoint1", (GLvoid *) glEvalPoint1, _gloffset_EvalPoint1 }, - { "glEvalMesh2", (GLvoid *) glEvalMesh2, _gloffset_EvalMesh2 }, - { "glEvalPoint2", (GLvoid *) glEvalPoint2, _gloffset_EvalPoint2 }, - { "glAlphaFunc", (GLvoid *) glAlphaFunc, _gloffset_AlphaFunc }, - { "glBlendFunc", (GLvoid *) glBlendFunc, _gloffset_BlendFunc }, - { "glLogicOp", (GLvoid *) glLogicOp, _gloffset_LogicOp }, - { "glStencilFunc", (GLvoid *) glStencilFunc, _gloffset_StencilFunc }, - { "glStencilOp", (GLvoid *) glStencilOp, _gloffset_StencilOp }, - { "glDepthFunc", (GLvoid *) glDepthFunc, _gloffset_DepthFunc }, - { "glPixelZoom", (GLvoid *) glPixelZoom, _gloffset_PixelZoom }, - { "glPixelTransferf", (GLvoid *) glPixelTransferf, _gloffset_PixelTransferf }, - { "glPixelTransferi", (GLvoid *) glPixelTransferi, _gloffset_PixelTransferi }, - { "glPixelStoref", (GLvoid *) glPixelStoref, _gloffset_PixelStoref }, - { "glPixelStorei", (GLvoid *) glPixelStorei, _gloffset_PixelStorei }, - { "glPixelMapfv", (GLvoid *) glPixelMapfv, _gloffset_PixelMapfv }, - { "glPixelMapuiv", (GLvoid *) glPixelMapuiv, _gloffset_PixelMapuiv }, - { "glPixelMapusv", (GLvoid *) glPixelMapusv, _gloffset_PixelMapusv }, - { "glReadBuffer", (GLvoid *) glReadBuffer, _gloffset_ReadBuffer }, - { "glCopyPixels", (GLvoid *) glCopyPixels, _gloffset_CopyPixels }, - { "glReadPixels", (GLvoid *) glReadPixels, _gloffset_ReadPixels }, - { "glDrawPixels", (GLvoid *) glDrawPixels, _gloffset_DrawPixels }, - { "glGetBooleanv", (GLvoid *) glGetBooleanv, _gloffset_GetBooleanv }, - { "glGetClipPlane", (GLvoid *) glGetClipPlane, _gloffset_GetClipPlane }, - { "glGetDoublev", (GLvoid *) glGetDoublev, _gloffset_GetDoublev }, - { "glGetError", (GLvoid *) glGetError, _gloffset_GetError }, - { "glGetFloatv", (GLvoid *) glGetFloatv, _gloffset_GetFloatv }, - { "glGetIntegerv", (GLvoid *) glGetIntegerv, _gloffset_GetIntegerv }, - { "glGetLightfv", (GLvoid *) glGetLightfv, _gloffset_GetLightfv }, - { "glGetLightiv", (GLvoid *) glGetLightiv, _gloffset_GetLightiv }, - { "glGetMapdv", (GLvoid *) glGetMapdv, _gloffset_GetMapdv }, - { "glGetMapfv", (GLvoid *) glGetMapfv, _gloffset_GetMapfv }, - { "glGetMapiv", (GLvoid *) glGetMapiv, _gloffset_GetMapiv }, - { "glGetMaterialfv", (GLvoid *) glGetMaterialfv, _gloffset_GetMaterialfv }, - { "glGetMaterialiv", (GLvoid *) glGetMaterialiv, _gloffset_GetMaterialiv }, - { "glGetPixelMapfv", (GLvoid *) glGetPixelMapfv, _gloffset_GetPixelMapfv }, - { "glGetPixelMapuiv", (GLvoid *) glGetPixelMapuiv, _gloffset_GetPixelMapuiv }, - { "glGetPixelMapusv", (GLvoid *) glGetPixelMapusv, _gloffset_GetPixelMapusv }, - { "glGetPolygonStipple", (GLvoid *) glGetPolygonStipple, _gloffset_GetPolygonStipple }, - { "glGetString", (GLvoid *) glGetString, _gloffset_GetString }, - { "glGetTexEnvfv", (GLvoid *) glGetTexEnvfv, _gloffset_GetTexEnvfv }, - { "glGetTexEnviv", (GLvoid *) glGetTexEnviv, _gloffset_GetTexEnviv }, - { "glGetTexGendv", (GLvoid *) glGetTexGendv, _gloffset_GetTexGendv }, - { "glGetTexGenfv", (GLvoid *) glGetTexGenfv, _gloffset_GetTexGenfv }, - { "glGetTexGeniv", (GLvoid *) glGetTexGeniv, _gloffset_GetTexGeniv }, - { "glGetTexImage", (GLvoid *) glGetTexImage, _gloffset_GetTexImage }, - { "glGetTexParameterfv", (GLvoid *) glGetTexParameterfv, _gloffset_GetTexParameterfv }, - { "glGetTexParameteriv", (GLvoid *) glGetTexParameteriv, _gloffset_GetTexParameteriv }, - { "glGetTexLevelParameterfv", (GLvoid *) glGetTexLevelParameterfv, _gloffset_GetTexLevelParameterfv }, - { "glGetTexLevelParameteriv", (GLvoid *) glGetTexLevelParameteriv, _gloffset_GetTexLevelParameteriv }, - { "glIsEnabled", (GLvoid *) glIsEnabled, _gloffset_IsEnabled }, - { "glIsList", (GLvoid *) glIsList, _gloffset_IsList }, - { "glDepthRange", (GLvoid *) glDepthRange, _gloffset_DepthRange }, - { "glFrustum", (GLvoid *) glFrustum, _gloffset_Frustum }, - { "glLoadIdentity", (GLvoid *) glLoadIdentity, _gloffset_LoadIdentity }, - { "glLoadMatrixf", (GLvoid *) glLoadMatrixf, _gloffset_LoadMatrixf }, - { "glLoadMatrixd", (GLvoid *) glLoadMatrixd, _gloffset_LoadMatrixd }, - { "glMatrixMode", (GLvoid *) glMatrixMode, _gloffset_MatrixMode }, - { "glMultMatrixf", (GLvoid *) glMultMatrixf, _gloffset_MultMatrixf }, - { "glMultMatrixd", (GLvoid *) glMultMatrixd, _gloffset_MultMatrixd }, - { "glOrtho", (GLvoid *) glOrtho, _gloffset_Ortho }, - { "glPopMatrix", (GLvoid *) glPopMatrix, _gloffset_PopMatrix }, - { "glPushMatrix", (GLvoid *) glPushMatrix, _gloffset_PushMatrix }, - { "glRotated", (GLvoid *) glRotated, _gloffset_Rotated }, - { "glRotatef", (GLvoid *) glRotatef, _gloffset_Rotatef }, - { "glScaled", (GLvoid *) glScaled, _gloffset_Scaled }, - { "glScalef", (GLvoid *) glScalef, _gloffset_Scalef }, - { "glTranslated", (GLvoid *) glTranslated, _gloffset_Translated }, - { "glTranslatef", (GLvoid *) glTranslatef, _gloffset_Translatef }, - { "glViewport", (GLvoid *) glViewport, _gloffset_Viewport }, - { "glArrayElement", (GLvoid *) glArrayElement, _gloffset_ArrayElement }, - { "glColorPointer", (GLvoid *) glColorPointer, _gloffset_ColorPointer }, - { "glDisableClientState", (GLvoid *) glDisableClientState, _gloffset_DisableClientState }, - { "glDrawArrays", (GLvoid *) glDrawArrays, _gloffset_DrawArrays }, - { "glDrawElements", (GLvoid *) glDrawElements, _gloffset_DrawElements }, - { "glEdgeFlagPointer", (GLvoid *) glEdgeFlagPointer, _gloffset_EdgeFlagPointer }, - { "glEnableClientState", (GLvoid *) glEnableClientState, _gloffset_EnableClientState }, - { "glGetPointerv", (GLvoid *) glGetPointerv, _gloffset_GetPointerv }, - { "glIndexPointer", (GLvoid *) glIndexPointer, _gloffset_IndexPointer }, - { "glInterleavedArrays", (GLvoid *) glInterleavedArrays, _gloffset_InterleavedArrays }, - { "glNormalPointer", (GLvoid *) glNormalPointer, _gloffset_NormalPointer }, - { "glTexCoordPointer", (GLvoid *) glTexCoordPointer, _gloffset_TexCoordPointer }, - { "glVertexPointer", (GLvoid *) glVertexPointer, _gloffset_VertexPointer }, - { "glPolygonOffset", (GLvoid *) glPolygonOffset, _gloffset_PolygonOffset }, - { "glCopyTexImage1D", (GLvoid *) glCopyTexImage1D, _gloffset_CopyTexImage1D }, - { "glCopyTexImage2D", (GLvoid *) glCopyTexImage2D, _gloffset_CopyTexImage2D }, - { "glCopyTexSubImage1D", (GLvoid *) glCopyTexSubImage1D, _gloffset_CopyTexSubImage1D }, - { "glCopyTexSubImage2D", (GLvoid *) glCopyTexSubImage2D, _gloffset_CopyTexSubImage2D }, - { "glTexSubImage1D", (GLvoid *) glTexSubImage1D, _gloffset_TexSubImage1D }, - { "glTexSubImage2D", (GLvoid *) glTexSubImage2D, _gloffset_TexSubImage2D }, - { "glAreTexturesResident", (GLvoid *) glAreTexturesResident, _gloffset_AreTexturesResident }, - { "glBindTexture", (GLvoid *) glBindTexture, _gloffset_BindTexture }, - { "glDeleteTextures", (GLvoid *) glDeleteTextures, _gloffset_DeleteTextures }, - { "glGenTextures", (GLvoid *) glGenTextures, _gloffset_GenTextures }, - { "glIsTexture", (GLvoid *) glIsTexture, _gloffset_IsTexture }, - { "glPrioritizeTextures", (GLvoid *) glPrioritizeTextures, _gloffset_PrioritizeTextures }, - { "glIndexub", (GLvoid *) glIndexub, _gloffset_Indexub }, - { "glIndexubv", (GLvoid *) glIndexubv, _gloffset_Indexubv }, - { "glPopClientAttrib", (GLvoid *) glPopClientAttrib, _gloffset_PopClientAttrib }, - { "glPushClientAttrib", (GLvoid *) glPushClientAttrib, _gloffset_PushClientAttrib }, - { "glBlendColor", (GLvoid *) glBlendColor, _gloffset_BlendColor }, - { "glBlendEquation", (GLvoid *) glBlendEquation, _gloffset_BlendEquation }, - { "glDrawRangeElements", (GLvoid *) glDrawRangeElements, _gloffset_DrawRangeElements }, - { "glColorTable", (GLvoid *) glColorTable, _gloffset_ColorTable }, - { "glColorTableParameterfv", (GLvoid *) glColorTableParameterfv, _gloffset_ColorTableParameterfv }, - { "glColorTableParameteriv", (GLvoid *) glColorTableParameteriv, _gloffset_ColorTableParameteriv }, - { "glCopyColorTable", (GLvoid *) glCopyColorTable, _gloffset_CopyColorTable }, - { "glGetColorTable", (GLvoid *) glGetColorTable, _gloffset_GetColorTable }, - { "glGetColorTableParameterfv", (GLvoid *) glGetColorTableParameterfv, _gloffset_GetColorTableParameterfv }, - { "glGetColorTableParameteriv", (GLvoid *) glGetColorTableParameteriv, _gloffset_GetColorTableParameteriv }, - { "glColorSubTable", (GLvoid *) glColorSubTable, _gloffset_ColorSubTable }, - { "glCopyColorSubTable", (GLvoid *) glCopyColorSubTable, _gloffset_CopyColorSubTable }, - { "glConvolutionFilter1D", (GLvoid *) glConvolutionFilter1D, _gloffset_ConvolutionFilter1D }, - { "glConvolutionFilter2D", (GLvoid *) glConvolutionFilter2D, _gloffset_ConvolutionFilter2D }, - { "glConvolutionParameterf", (GLvoid *) glConvolutionParameterf, _gloffset_ConvolutionParameterf }, - { "glConvolutionParameterfv", (GLvoid *) glConvolutionParameterfv, _gloffset_ConvolutionParameterfv }, - { "glConvolutionParameteri", (GLvoid *) glConvolutionParameteri, _gloffset_ConvolutionParameteri }, - { "glConvolutionParameteriv", (GLvoid *) glConvolutionParameteriv, _gloffset_ConvolutionParameteriv }, - { "glCopyConvolutionFilter1D", (GLvoid *) glCopyConvolutionFilter1D, _gloffset_CopyConvolutionFilter1D }, - { "glCopyConvolutionFilter2D", (GLvoid *) glCopyConvolutionFilter2D, _gloffset_CopyConvolutionFilter2D }, - { "glGetConvolutionFilter", (GLvoid *) glGetConvolutionFilter, _gloffset_GetConvolutionFilter }, - { "glGetConvolutionParameterfv", (GLvoid *) glGetConvolutionParameterfv, _gloffset_GetConvolutionParameterfv }, - { "glGetConvolutionParameteriv", (GLvoid *) glGetConvolutionParameteriv, _gloffset_GetConvolutionParameteriv }, - { "glGetSeparableFilter", (GLvoid *) glGetSeparableFilter, _gloffset_GetSeparableFilter }, - { "glSeparableFilter2D", (GLvoid *) glSeparableFilter2D, _gloffset_SeparableFilter2D }, - { "glGetHistogram", (GLvoid *) glGetHistogram, _gloffset_GetHistogram }, - { "glGetHistogramParameterfv", (GLvoid *) glGetHistogramParameterfv, _gloffset_GetHistogramParameterfv }, - { "glGetHistogramParameteriv", (GLvoid *) glGetHistogramParameteriv, _gloffset_GetHistogramParameteriv }, - { "glGetMinmax", (GLvoid *) glGetMinmax, _gloffset_GetMinmax }, - { "glGetMinmaxParameterfv", (GLvoid *) glGetMinmaxParameterfv, _gloffset_GetMinmaxParameterfv }, - { "glGetMinmaxParameteriv", (GLvoid *) glGetMinmaxParameteriv, _gloffset_GetMinmaxParameteriv }, - { "glHistogram", (GLvoid *) glHistogram, _gloffset_Histogram }, - { "glMinmax", (GLvoid *) glMinmax, _gloffset_Minmax }, - { "glResetHistogram", (GLvoid *) glResetHistogram, _gloffset_ResetHistogram }, - { "glResetMinmax", (GLvoid *) glResetMinmax, _gloffset_ResetMinmax }, - { "glTexImage3D", (GLvoid *) glTexImage3D, _gloffset_TexImage3D }, - { "glTexSubImage3D", (GLvoid *) glTexSubImage3D, _gloffset_TexSubImage3D }, - { "glCopyTexSubImage3D", (GLvoid *) glCopyTexSubImage3D, _gloffset_CopyTexSubImage3D }, - { "glActiveTextureARB", (GLvoid *) glActiveTextureARB, _gloffset_ActiveTextureARB }, - { "glClientActiveTextureARB", (GLvoid *) glClientActiveTextureARB, _gloffset_ClientActiveTextureARB }, - { "glMultiTexCoord1dARB", (GLvoid *) glMultiTexCoord1dARB, _gloffset_MultiTexCoord1dARB }, - { "glMultiTexCoord1dvARB", (GLvoid *) glMultiTexCoord1dvARB, _gloffset_MultiTexCoord1dvARB }, - { "glMultiTexCoord1fARB", (GLvoid *) glMultiTexCoord1fARB, _gloffset_MultiTexCoord1fARB }, - { "glMultiTexCoord1fvARB", (GLvoid *) glMultiTexCoord1fvARB, _gloffset_MultiTexCoord1fvARB }, - { "glMultiTexCoord1iARB", (GLvoid *) glMultiTexCoord1iARB, _gloffset_MultiTexCoord1iARB }, - { "glMultiTexCoord1ivARB", (GLvoid *) glMultiTexCoord1ivARB, _gloffset_MultiTexCoord1ivARB }, - { "glMultiTexCoord1sARB", (GLvoid *) glMultiTexCoord1sARB, _gloffset_MultiTexCoord1sARB }, - { "glMultiTexCoord1svARB", (GLvoid *) glMultiTexCoord1svARB, _gloffset_MultiTexCoord1svARB }, - { "glMultiTexCoord2dARB", (GLvoid *) glMultiTexCoord2dARB, _gloffset_MultiTexCoord2dARB }, - { "glMultiTexCoord2dvARB", (GLvoid *) glMultiTexCoord2dvARB, _gloffset_MultiTexCoord2dvARB }, - { "glMultiTexCoord2fARB", (GLvoid *) glMultiTexCoord2fARB, _gloffset_MultiTexCoord2fARB }, - { "glMultiTexCoord2fvARB", (GLvoid *) glMultiTexCoord2fvARB, _gloffset_MultiTexCoord2fvARB }, - { "glMultiTexCoord2iARB", (GLvoid *) glMultiTexCoord2iARB, _gloffset_MultiTexCoord2iARB }, - { "glMultiTexCoord2ivARB", (GLvoid *) glMultiTexCoord2ivARB, _gloffset_MultiTexCoord2ivARB }, - { "glMultiTexCoord2sARB", (GLvoid *) glMultiTexCoord2sARB, _gloffset_MultiTexCoord2sARB }, - { "glMultiTexCoord2svARB", (GLvoid *) glMultiTexCoord2svARB, _gloffset_MultiTexCoord2svARB }, - { "glMultiTexCoord3dARB", (GLvoid *) glMultiTexCoord3dARB, _gloffset_MultiTexCoord3dARB }, - { "glMultiTexCoord3dvARB", (GLvoid *) glMultiTexCoord3dvARB, _gloffset_MultiTexCoord3dvARB }, - { "glMultiTexCoord3fARB", (GLvoid *) glMultiTexCoord3fARB, _gloffset_MultiTexCoord3fARB }, - { "glMultiTexCoord3fvARB", (GLvoid *) glMultiTexCoord3fvARB, _gloffset_MultiTexCoord3fvARB }, - { "glMultiTexCoord3iARB", (GLvoid *) glMultiTexCoord3iARB, _gloffset_MultiTexCoord3iARB }, - { "glMultiTexCoord3ivARB", (GLvoid *) glMultiTexCoord3ivARB, _gloffset_MultiTexCoord3ivARB }, - { "glMultiTexCoord3sARB", (GLvoid *) glMultiTexCoord3sARB, _gloffset_MultiTexCoord3sARB }, - { "glMultiTexCoord3svARB", (GLvoid *) glMultiTexCoord3svARB, _gloffset_MultiTexCoord3svARB }, - { "glMultiTexCoord4dARB", (GLvoid *) glMultiTexCoord4dARB, _gloffset_MultiTexCoord4dARB }, - { "glMultiTexCoord4dvARB", (GLvoid *) glMultiTexCoord4dvARB, _gloffset_MultiTexCoord4dvARB }, - { "glMultiTexCoord4fARB", (GLvoid *) glMultiTexCoord4fARB, _gloffset_MultiTexCoord4fARB }, - { "glMultiTexCoord4fvARB", (GLvoid *) glMultiTexCoord4fvARB, _gloffset_MultiTexCoord4fvARB }, - { "glMultiTexCoord4iARB", (GLvoid *) glMultiTexCoord4iARB, _gloffset_MultiTexCoord4iARB }, - { "glMultiTexCoord4ivARB", (GLvoid *) glMultiTexCoord4ivARB, _gloffset_MultiTexCoord4ivARB }, - { "glMultiTexCoord4sARB", (GLvoid *) glMultiTexCoord4sARB, _gloffset_MultiTexCoord4sARB }, - { "glMultiTexCoord4svARB", (GLvoid *) glMultiTexCoord4svARB, _gloffset_MultiTexCoord4svARB }, - { "glLoadTransposeMatrixfARB", (GLvoid *) glLoadTransposeMatrixfARB, _gloffset_LoadTransposeMatrixfARB }, - { "glLoadTransposeMatrixdARB", (GLvoid *) glLoadTransposeMatrixdARB, _gloffset_LoadTransposeMatrixdARB }, - { "glMultTransposeMatrixfARB", (GLvoid *) glMultTransposeMatrixfARB, _gloffset_MultTransposeMatrixfARB }, - { "glMultTransposeMatrixdARB", (GLvoid *) glMultTransposeMatrixdARB, _gloffset_MultTransposeMatrixdARB }, - { "glSampleCoverageARB", (GLvoid *) glSampleCoverageARB, _gloffset_SampleCoverageARB }, - { "glCompressedTexImage3DARB", (GLvoid *) glCompressedTexImage3DARB, _gloffset_CompressedTexImage3DARB }, - { "glCompressedTexImage2DARB", (GLvoid *) glCompressedTexImage2DARB, _gloffset_CompressedTexImage2DARB }, - { "glCompressedTexImage1DARB", (GLvoid *) glCompressedTexImage1DARB, _gloffset_CompressedTexImage1DARB }, - { "glCompressedTexSubImage3DARB", (GLvoid *) glCompressedTexSubImage3DARB, _gloffset_CompressedTexSubImage3DARB }, - { "glCompressedTexSubImage2DARB", (GLvoid *) glCompressedTexSubImage2DARB, _gloffset_CompressedTexSubImage2DARB }, - { "glCompressedTexSubImage1DARB", (GLvoid *) glCompressedTexSubImage1DARB, _gloffset_CompressedTexSubImage1DARB }, - { "glGetCompressedTexImageARB", (GLvoid *) glGetCompressedTexImageARB, _gloffset_GetCompressedTexImageARB }, - { "glActiveTexture", (GLvoid *) glActiveTexture, _gloffset_ActiveTextureARB }, - { "glClientActiveTexture", (GLvoid *) glClientActiveTexture, _gloffset_ClientActiveTextureARB }, - { "glMultiTexCoord1d", (GLvoid *) glMultiTexCoord1d, _gloffset_MultiTexCoord1dARB }, - { "glMultiTexCoord1dv", (GLvoid *) glMultiTexCoord1dv, _gloffset_MultiTexCoord1dvARB }, - { "glMultiTexCoord1f", (GLvoid *) glMultiTexCoord1f, _gloffset_MultiTexCoord1fARB }, - { "glMultiTexCoord1fv", (GLvoid *) glMultiTexCoord1fv, _gloffset_MultiTexCoord1fvARB }, - { "glMultiTexCoord1i", (GLvoid *) glMultiTexCoord1i, _gloffset_MultiTexCoord1iARB }, - { "glMultiTexCoord1iv", (GLvoid *) glMultiTexCoord1iv, _gloffset_MultiTexCoord1ivARB }, - { "glMultiTexCoord1s", (GLvoid *) glMultiTexCoord1s, _gloffset_MultiTexCoord1sARB }, - { "glMultiTexCoord1sv", (GLvoid *) glMultiTexCoord1sv, _gloffset_MultiTexCoord1svARB }, - { "glMultiTexCoord2d", (GLvoid *) glMultiTexCoord2d, _gloffset_MultiTexCoord2dARB }, - { "glMultiTexCoord2dv", (GLvoid *) glMultiTexCoord2dv, _gloffset_MultiTexCoord2dvARB }, - { "glMultiTexCoord2f", (GLvoid *) glMultiTexCoord2f, _gloffset_MultiTexCoord2fARB }, - { "glMultiTexCoord2fv", (GLvoid *) glMultiTexCoord2fv, _gloffset_MultiTexCoord2fvARB }, - { "glMultiTexCoord2i", (GLvoid *) glMultiTexCoord2i, _gloffset_MultiTexCoord2iARB }, - { "glMultiTexCoord2iv", (GLvoid *) glMultiTexCoord2iv, _gloffset_MultiTexCoord2ivARB }, - { "glMultiTexCoord2s", (GLvoid *) glMultiTexCoord2s, _gloffset_MultiTexCoord2sARB }, - { "glMultiTexCoord2sv", (GLvoid *) glMultiTexCoord2sv, _gloffset_MultiTexCoord2svARB }, - { "glMultiTexCoord3d", (GLvoid *) glMultiTexCoord3d, _gloffset_MultiTexCoord3dARB }, - { "glMultiTexCoord3dv", (GLvoid *) glMultiTexCoord3dv, _gloffset_MultiTexCoord3dvARB }, - { "glMultiTexCoord3f", (GLvoid *) glMultiTexCoord3f, _gloffset_MultiTexCoord3fARB }, - { "glMultiTexCoord3fv", (GLvoid *) glMultiTexCoord3fv, _gloffset_MultiTexCoord3fvARB }, - { "glMultiTexCoord3i", (GLvoid *) glMultiTexCoord3i, _gloffset_MultiTexCoord3iARB }, - { "glMultiTexCoord3iv", (GLvoid *) glMultiTexCoord3iv, _gloffset_MultiTexCoord3ivARB }, - { "glMultiTexCoord3s", (GLvoid *) glMultiTexCoord3s, _gloffset_MultiTexCoord3sARB }, - { "glMultiTexCoord3sv", (GLvoid *) glMultiTexCoord3sv, _gloffset_MultiTexCoord3svARB }, - { "glMultiTexCoord4d", (GLvoid *) glMultiTexCoord4d, _gloffset_MultiTexCoord4dARB }, - { "glMultiTexCoord4dv", (GLvoid *) glMultiTexCoord4dv, _gloffset_MultiTexCoord4dvARB }, - { "glMultiTexCoord4f", (GLvoid *) glMultiTexCoord4f, _gloffset_MultiTexCoord4fARB }, - { "glMultiTexCoord4fv", (GLvoid *) glMultiTexCoord4fv, _gloffset_MultiTexCoord4fvARB }, - { "glMultiTexCoord4i", (GLvoid *) glMultiTexCoord4i, _gloffset_MultiTexCoord4iARB }, - { "glMultiTexCoord4iv", (GLvoid *) glMultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB }, - { "glMultiTexCoord4s", (GLvoid *) glMultiTexCoord4s, _gloffset_MultiTexCoord4sARB }, - { "glMultiTexCoord4sv", (GLvoid *) glMultiTexCoord4sv, _gloffset_MultiTexCoord4svARB }, - { "glLoadTransposeMatrixf", (GLvoid *) glLoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB }, - { "glLoadTransposeMatrixd", (GLvoid *) glLoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB }, - { "glMultTransposeMatrixf", (GLvoid *) glMultTransposeMatrixf, _gloffset_MultTransposeMatrixfARB }, - { "glMultTransposeMatrixd", (GLvoid *) glMultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB }, - { "glSampleCoverage", (GLvoid *) glSampleCoverage, _gloffset_SampleCoverageARB }, - { "glCompressedTexImage3D", (GLvoid *) glCompressedTexImage3D, _gloffset_CompressedTexImage3DARB }, - { "glCompressedTexImage2D", (GLvoid *) glCompressedTexImage2D, _gloffset_CompressedTexImage2DARB }, - { "glCompressedTexImage1D", (GLvoid *) glCompressedTexImage1D, _gloffset_CompressedTexImage1DARB }, - { "glCompressedTexSubImage3D", (GLvoid *) glCompressedTexSubImage3D, _gloffset_CompressedTexSubImage3DARB }, - { "glCompressedTexSubImage2D", (GLvoid *) glCompressedTexSubImage2D, _gloffset_CompressedTexSubImage2DARB }, - { "glCompressedTexSubImage1D", (GLvoid *) glCompressedTexSubImage1D, _gloffset_CompressedTexSubImage1DARB }, - { "glGetCompressedTexImage", (GLvoid *) glGetCompressedTexImage, _gloffset_GetCompressedTexImageARB }, - { "glBlendColorEXT", (GLvoid *) glBlendColorEXT, _gloffset_BlendColor }, - { "glPolygonOffsetEXT", (GLvoid *) glPolygonOffsetEXT, _gloffset_PolygonOffsetEXT }, - { "glTexImage3DEXT", (GLvoid *) glTexImage3DEXT, _gloffset_TexImage3D }, - { "glTexSubImage3DEXT", (GLvoid *) glTexSubImage3DEXT, _gloffset_TexSubImage3D }, - { "glGetTexFilterFuncSGIS", (GLvoid *) glGetTexFilterFuncSGIS, _gloffset_GetTexFilterFuncSGIS }, - { "glTexFilterFuncSGIS", (GLvoid *) glTexFilterFuncSGIS, _gloffset_TexFilterFuncSGIS }, - { "glTexSubImage1DEXT", (GLvoid *) glTexSubImage1DEXT, _gloffset_TexSubImage1D }, - { "glTexSubImage2DEXT", (GLvoid *) glTexSubImage2DEXT, _gloffset_TexSubImage2D }, - { "glCopyTexImage1DEXT", (GLvoid *) glCopyTexImage1DEXT, _gloffset_CopyTexImage1D }, - { "glCopyTexImage2DEXT", (GLvoid *) glCopyTexImage2DEXT, _gloffset_CopyTexImage2D }, - { "glCopyTexSubImage1DEXT", (GLvoid *) glCopyTexSubImage1DEXT, _gloffset_CopyTexSubImage1D }, - { "glCopyTexSubImage2DEXT", (GLvoid *) glCopyTexSubImage2DEXT, _gloffset_CopyTexSubImage2D }, - { "glCopyTexSubImage3DEXT", (GLvoid *) glCopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D }, - { "glGetHistogramEXT", (GLvoid *) glGetHistogramEXT, _gloffset_GetHistogramEXT }, - { "glGetHistogramParameterfvEXT", (GLvoid *) glGetHistogramParameterfvEXT, _gloffset_GetHistogramParameterfvEXT }, - { "glGetHistogramParameterivEXT", (GLvoid *) glGetHistogramParameterivEXT, _gloffset_GetHistogramParameterivEXT }, - { "glGetMinmaxEXT", (GLvoid *) glGetMinmaxEXT, _gloffset_GetMinmaxEXT }, - { "glGetMinmaxParameterfvEXT", (GLvoid *) glGetMinmaxParameterfvEXT, _gloffset_GetMinmaxParameterfvEXT }, - { "glGetMinmaxParameterivEXT", (GLvoid *) glGetMinmaxParameterivEXT, _gloffset_GetMinmaxParameterivEXT }, - { "glHistogramEXT", (GLvoid *) glHistogramEXT, _gloffset_Histogram }, - { "glMinmaxEXT", (GLvoid *) glMinmaxEXT, _gloffset_Minmax }, - { "glResetHistogramEXT", (GLvoid *) glResetHistogramEXT, _gloffset_ResetHistogram }, - { "glResetMinmaxEXT", (GLvoid *) glResetMinmaxEXT, _gloffset_ResetMinmax }, - { "glConvolutionFilter1DEXT", (GLvoid *) glConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D }, - { "glConvolutionFilter2DEXT", (GLvoid *) glConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D }, - { "glConvolutionParameterfEXT", (GLvoid *) glConvolutionParameterfEXT, _gloffset_ConvolutionParameterf }, - { "glConvolutionParameterfvEXT", (GLvoid *) glConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv }, - { "glConvolutionParameteriEXT", (GLvoid *) glConvolutionParameteriEXT, _gloffset_ConvolutionParameteri }, - { "glConvolutionParameterivEXT", (GLvoid *) glConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv }, - { "glCopyConvolutionFilter1DEXT", (GLvoid *) glCopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D }, - { "glCopyConvolutionFilter2DEXT", (GLvoid *) glCopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D }, - { "glGetConvolutionFilterEXT", (GLvoid *) glGetConvolutionFilterEXT, _gloffset_GetConvolutionFilterEXT }, - { "glGetConvolutionParameterfvEXT", (GLvoid *) glGetConvolutionParameterfvEXT, _gloffset_GetConvolutionParameterfvEXT }, - { "glGetConvolutionParameterivEXT", (GLvoid *) glGetConvolutionParameterivEXT, _gloffset_GetConvolutionParameterivEXT }, - { "glGetSeparableFilterEXT", (GLvoid *) glGetSeparableFilterEXT, _gloffset_GetSeparableFilterEXT }, - { "glSeparableFilter2DEXT", (GLvoid *) glSeparableFilter2DEXT, _gloffset_SeparableFilter2D }, - { "glColorTableSGI", (GLvoid *) glColorTableSGI, _gloffset_ColorTable }, - { "glColorTableParameterfvSGI", (GLvoid *) glColorTableParameterfvSGI, _gloffset_ColorTableParameterfv }, - { "glColorTableParameterivSGI", (GLvoid *) glColorTableParameterivSGI, _gloffset_ColorTableParameteriv }, - { "glCopyColorTableSGI", (GLvoid *) glCopyColorTableSGI, _gloffset_CopyColorTable }, - { "glGetColorTableSGI", (GLvoid *) glGetColorTableSGI, _gloffset_GetColorTableSGI }, - { "glGetColorTableParameterfvSGI", (GLvoid *) glGetColorTableParameterfvSGI, _gloffset_GetColorTableParameterfvSGI }, - { "glGetColorTableParameterivSGI", (GLvoid *) glGetColorTableParameterivSGI, _gloffset_GetColorTableParameterivSGI }, - { "glPixelTexGenSGIX", (GLvoid *) glPixelTexGenSGIX, _gloffset_PixelTexGenSGIX }, - { "glPixelTexGenParameteriSGIS", (GLvoid *) glPixelTexGenParameteriSGIS, _gloffset_PixelTexGenParameteriSGIS }, - { "glPixelTexGenParameterivSGIS", (GLvoid *) glPixelTexGenParameterivSGIS, _gloffset_PixelTexGenParameterivSGIS }, - { "glPixelTexGenParameterfSGIS", (GLvoid *) glPixelTexGenParameterfSGIS, _gloffset_PixelTexGenParameterfSGIS }, - { "glPixelTexGenParameterfvSGIS", (GLvoid *) glPixelTexGenParameterfvSGIS, _gloffset_PixelTexGenParameterfvSGIS }, - { "glGetPixelTexGenParameterivSGIS", (GLvoid *) glGetPixelTexGenParameterivSGIS, _gloffset_GetPixelTexGenParameterivSGIS }, - { "glGetPixelTexGenParameterfvSGIS", (GLvoid *) glGetPixelTexGenParameterfvSGIS, _gloffset_GetPixelTexGenParameterfvSGIS }, - { "glTexImage4DSGIS", (GLvoid *) glTexImage4DSGIS, _gloffset_TexImage4DSGIS }, - { "glTexSubImage4DSGIS", (GLvoid *) glTexSubImage4DSGIS, _gloffset_TexSubImage4DSGIS }, - { "glAreTexturesResidentEXT", (GLvoid *) glAreTexturesResidentEXT, _gloffset_AreTexturesResidentEXT }, - { "glBindTextureEXT", (GLvoid *) glBindTextureEXT, _gloffset_BindTexture }, - { "glDeleteTexturesEXT", (GLvoid *) glDeleteTexturesEXT, _gloffset_DeleteTextures }, - { "glGenTexturesEXT", (GLvoid *) glGenTexturesEXT, _gloffset_GenTexturesEXT }, - { "glIsTextureEXT", (GLvoid *) glIsTextureEXT, _gloffset_IsTextureEXT }, - { "glPrioritizeTexturesEXT", (GLvoid *) glPrioritizeTexturesEXT, _gloffset_PrioritizeTextures }, - { "glDetailTexFuncSGIS", (GLvoid *) glDetailTexFuncSGIS, _gloffset_DetailTexFuncSGIS }, - { "glGetDetailTexFuncSGIS", (GLvoid *) glGetDetailTexFuncSGIS, _gloffset_GetDetailTexFuncSGIS }, - { "glSharpenTexFuncSGIS", (GLvoid *) glSharpenTexFuncSGIS, _gloffset_SharpenTexFuncSGIS }, - { "glGetSharpenTexFuncSGIS", (GLvoid *) glGetSharpenTexFuncSGIS, _gloffset_GetSharpenTexFuncSGIS }, - { "glSampleMaskSGIS", (GLvoid *) glSampleMaskSGIS, _gloffset_SampleMaskSGIS }, - { "glSamplePatternSGIS", (GLvoid *) glSamplePatternSGIS, _gloffset_SamplePatternSGIS }, - { "glArrayElementEXT", (GLvoid *) glArrayElementEXT, _gloffset_ArrayElement }, - { "glColorPointerEXT", (GLvoid *) glColorPointerEXT, _gloffset_ColorPointerEXT }, - { "glDrawArraysEXT", (GLvoid *) glDrawArraysEXT, _gloffset_DrawArrays }, - { "glEdgeFlagPointerEXT", (GLvoid *) glEdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT }, - { "glGetPointervEXT", (GLvoid *) glGetPointervEXT, _gloffset_GetPointerv }, - { "glIndexPointerEXT", (GLvoid *) glIndexPointerEXT, _gloffset_IndexPointerEXT }, - { "glNormalPointerEXT", (GLvoid *) glNormalPointerEXT, _gloffset_NormalPointerEXT }, - { "glTexCoordPointerEXT", (GLvoid *) glTexCoordPointerEXT, _gloffset_TexCoordPointerEXT }, - { "glVertexPointerEXT", (GLvoid *) glVertexPointerEXT, _gloffset_VertexPointerEXT }, - { "glBlendEquationEXT", (GLvoid *) glBlendEquationEXT, _gloffset_BlendEquation }, - { "glSpriteParameterfSGIX", (GLvoid *) glSpriteParameterfSGIX, _gloffset_SpriteParameterfSGIX }, - { "glSpriteParameterfvSGIX", (GLvoid *) glSpriteParameterfvSGIX, _gloffset_SpriteParameterfvSGIX }, - { "glSpriteParameteriSGIX", (GLvoid *) glSpriteParameteriSGIX, _gloffset_SpriteParameteriSGIX }, - { "glSpriteParameterivSGIX", (GLvoid *) glSpriteParameterivSGIX, _gloffset_SpriteParameterivSGIX }, - { "glPointParameterfEXT", (GLvoid *) glPointParameterfEXT, _gloffset_PointParameterfEXT }, - { "glPointParameterfvEXT", (GLvoid *) glPointParameterfvEXT, _gloffset_PointParameterfvEXT }, - { "glPointParameterfARB", (GLvoid *) glPointParameterfARB, _gloffset_PointParameterfEXT }, - { "glPointParameterfvARB", (GLvoid *) glPointParameterfvARB, _gloffset_PointParameterfvEXT }, - { "glPointParameterfSGIS", (GLvoid *) glPointParameterfSGIS, _gloffset_PointParameterfEXT }, - { "glPointParameterfvSGIS", (GLvoid *) glPointParameterfvSGIS, _gloffset_PointParameterfvEXT }, - { "glGetInstrumentsSGIX", (GLvoid *) glGetInstrumentsSGIX, _gloffset_GetInstrumentsSGIX }, - { "glInstrumentsBufferSGIX", (GLvoid *) glInstrumentsBufferSGIX, _gloffset_InstrumentsBufferSGIX }, - { "glPollInstrumentsSGIX", (GLvoid *) glPollInstrumentsSGIX, _gloffset_PollInstrumentsSGIX }, - { "glReadInstrumentsSGIX", (GLvoid *) glReadInstrumentsSGIX, _gloffset_ReadInstrumentsSGIX }, - { "glStartInstrumentsSGIX", (GLvoid *) glStartInstrumentsSGIX, _gloffset_StartInstrumentsSGIX }, - { "glStopInstrumentsSGIX", (GLvoid *) glStopInstrumentsSGIX, _gloffset_StopInstrumentsSGIX }, - { "glFrameZoomSGIX", (GLvoid *) glFrameZoomSGIX, _gloffset_FrameZoomSGIX }, - { "glTagSampleBufferSGIX", (GLvoid *) glTagSampleBufferSGIX, _gloffset_TagSampleBufferSGIX }, - { "glReferencePlaneSGIX", (GLvoid *) glReferencePlaneSGIX, _gloffset_ReferencePlaneSGIX }, - { "glFlushRasterSGIX", (GLvoid *) glFlushRasterSGIX, _gloffset_FlushRasterSGIX }, - { "glColorSubTableEXT", (GLvoid *) glColorSubTableEXT, _gloffset_ColorSubTable }, - { "glCopyColorSubTableEXT", (GLvoid *) glCopyColorSubTableEXT, _gloffset_CopyColorSubTable }, - { "glHintPGI", (GLvoid *) glHintPGI, _gloffset_HintPGI }, - { "glColorTableEXT", (GLvoid *) glColorTableEXT, _gloffset_ColorTable }, - { "glGetColorTableEXT", (GLvoid *) glGetColorTableEXT, _gloffset_GetColorTableEXT }, - { "glGetColorTableParameterivEXT", (GLvoid *) glGetColorTableParameterivEXT, _gloffset_GetColorTableParameterivEXT }, - { "glGetColorTableParameterfvEXT", (GLvoid *) glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfvEXT }, - { "glGetListParameterfvSGIX", (GLvoid *) glGetListParameterfvSGIX, _gloffset_GetListParameterfvSGIX }, - { "glGetListParameterivSGIX", (GLvoid *) glGetListParameterivSGIX, _gloffset_GetListParameterivSGIX }, - { "glListParameterfSGIX", (GLvoid *) glListParameterfSGIX, _gloffset_ListParameterfSGIX }, - { "glListParameterfvSGIX", (GLvoid *) glListParameterfvSGIX, _gloffset_ListParameterfvSGIX }, - { "glListParameteriSGIX", (GLvoid *) glListParameteriSGIX, _gloffset_ListParameteriSGIX }, - { "glListParameterivSGIX", (GLvoid *) glListParameterivSGIX, _gloffset_ListParameterivSGIX }, - { "glIndexMaterialEXT", (GLvoid *) glIndexMaterialEXT, _gloffset_IndexMaterialEXT }, - { "glIndexFuncEXT", (GLvoid *) glIndexFuncEXT, _gloffset_IndexFuncEXT }, - { "glLockArraysEXT", (GLvoid *) glLockArraysEXT, _gloffset_LockArraysEXT }, - { "glUnlockArraysEXT", (GLvoid *) glUnlockArraysEXT, _gloffset_UnlockArraysEXT }, - { "glCullParameterdvEXT", (GLvoid *) glCullParameterdvEXT, _gloffset_CullParameterdvEXT }, - { "glCullParameterfvEXT", (GLvoid *) glCullParameterfvEXT, _gloffset_CullParameterfvEXT }, - { "glFragmentColorMaterialSGIX", (GLvoid *) glFragmentColorMaterialSGIX, _gloffset_FragmentColorMaterialSGIX }, - { "glFragmentLightfSGIX", (GLvoid *) glFragmentLightfSGIX, _gloffset_FragmentLightfSGIX }, - { "glFragmentLightfvSGIX", (GLvoid *) glFragmentLightfvSGIX, _gloffset_FragmentLightfvSGIX }, - { "glFragmentLightiSGIX", (GLvoid *) glFragmentLightiSGIX, _gloffset_FragmentLightiSGIX }, - { "glFragmentLightivSGIX", (GLvoid *) glFragmentLightivSGIX, _gloffset_FragmentLightivSGIX }, - { "glFragmentLightModelfSGIX", (GLvoid *) glFragmentLightModelfSGIX, _gloffset_FragmentLightModelfSGIX }, - { "glFragmentLightModelfvSGIX", (GLvoid *) glFragmentLightModelfvSGIX, _gloffset_FragmentLightModelfvSGIX }, - { "glFragmentLightModeliSGIX", (GLvoid *) glFragmentLightModeliSGIX, _gloffset_FragmentLightModeliSGIX }, - { "glFragmentLightModelivSGIX", (GLvoid *) glFragmentLightModelivSGIX, _gloffset_FragmentLightModelivSGIX }, - { "glFragmentMaterialfSGIX", (GLvoid *) glFragmentMaterialfSGIX, _gloffset_FragmentMaterialfSGIX }, - { "glFragmentMaterialfvSGIX", (GLvoid *) glFragmentMaterialfvSGIX, _gloffset_FragmentMaterialfvSGIX }, - { "glFragmentMaterialiSGIX", (GLvoid *) glFragmentMaterialiSGIX, _gloffset_FragmentMaterialiSGIX }, - { "glFragmentMaterialivSGIX", (GLvoid *) glFragmentMaterialivSGIX, _gloffset_FragmentMaterialivSGIX }, - { "glGetFragmentLightfvSGIX", (GLvoid *) glGetFragmentLightfvSGIX, _gloffset_GetFragmentLightfvSGIX }, - { "glGetFragmentLightivSGIX", (GLvoid *) glGetFragmentLightivSGIX, _gloffset_GetFragmentLightivSGIX }, - { "glGetFragmentMaterialfvSGIX", (GLvoid *) glGetFragmentMaterialfvSGIX, _gloffset_GetFragmentMaterialfvSGIX }, - { "glGetFragmentMaterialivSGIX", (GLvoid *) glGetFragmentMaterialivSGIX, _gloffset_GetFragmentMaterialivSGIX }, - { "glLightEnviSGIX", (GLvoid *) glLightEnviSGIX, _gloffset_LightEnviSGIX }, - { "glDrawRangeElementsEXT", (GLvoid *) glDrawRangeElementsEXT, _gloffset_DrawRangeElements }, - { "glSecondaryColor3bEXT", (GLvoid *) glSecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT }, - { "glSecondaryColor3bvEXT", (GLvoid *) glSecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT }, - { "glSecondaryColor3dEXT", (GLvoid *) glSecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT }, - { "glSecondaryColor3dvEXT", (GLvoid *) glSecondaryColor3dvEXT, _gloffset_SecondaryColor3dvEXT }, - { "glSecondaryColor3fEXT", (GLvoid *) glSecondaryColor3fEXT, _gloffset_SecondaryColor3fEXT }, - { "glSecondaryColor3fvEXT", (GLvoid *) glSecondaryColor3fvEXT, _gloffset_SecondaryColor3fvEXT }, - { "glSecondaryColor3iEXT", (GLvoid *) glSecondaryColor3iEXT, _gloffset_SecondaryColor3iEXT }, - { "glSecondaryColor3ivEXT", (GLvoid *) glSecondaryColor3ivEXT, _gloffset_SecondaryColor3ivEXT }, - { "glSecondaryColor3sEXT", (GLvoid *) glSecondaryColor3sEXT, _gloffset_SecondaryColor3sEXT }, - { "glSecondaryColor3svEXT", (GLvoid *) glSecondaryColor3svEXT, _gloffset_SecondaryColor3svEXT }, - { "glSecondaryColor3ubEXT", (GLvoid *) glSecondaryColor3ubEXT, _gloffset_SecondaryColor3ubEXT }, - { "glSecondaryColor3ubvEXT", (GLvoid *) glSecondaryColor3ubvEXT, _gloffset_SecondaryColor3ubvEXT }, - { "glSecondaryColor3uiEXT", (GLvoid *) glSecondaryColor3uiEXT, _gloffset_SecondaryColor3uiEXT }, - { "glSecondaryColor3uivEXT", (GLvoid *) glSecondaryColor3uivEXT, _gloffset_SecondaryColor3uivEXT }, - { "glSecondaryColor3usEXT", (GLvoid *) glSecondaryColor3usEXT, _gloffset_SecondaryColor3usEXT }, - { "glSecondaryColor3usvEXT", (GLvoid *) glSecondaryColor3usvEXT, _gloffset_SecondaryColor3usvEXT }, - { "glSecondaryColorPointerEXT", (GLvoid *) glSecondaryColorPointerEXT, _gloffset_SecondaryColorPointerEXT }, - { "glMultiDrawArraysEXT", (GLvoid *) glMultiDrawArraysEXT, _gloffset_MultiDrawArraysEXT }, - { "glMultiDrawElementsEXT", (GLvoid *) glMultiDrawElementsEXT, _gloffset_MultiDrawElementsEXT }, - { "glFogCoordfEXT", (GLvoid *) glFogCoordfEXT, _gloffset_FogCoordfEXT }, - { "glFogCoordfvEXT", (GLvoid *) glFogCoordfvEXT, _gloffset_FogCoordfvEXT }, - { "glFogCoorddEXT", (GLvoid *) glFogCoorddEXT, _gloffset_FogCoorddEXT }, - { "glFogCoorddvEXT", (GLvoid *) glFogCoorddvEXT, _gloffset_FogCoorddvEXT }, - { "glFogCoordPointerEXT", (GLvoid *) glFogCoordPointerEXT, _gloffset_FogCoordPointerEXT }, - { "glBlendFuncSeparateEXT", (GLvoid *) glBlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT }, - { "glBlendFuncSeparateINGR", (GLvoid *) glBlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT }, - { "glVertexWeightfEXT", (GLvoid *) glVertexWeightfEXT, _gloffset_VertexWeightfEXT }, - { "glVertexWeightfvEXT", (GLvoid *) glVertexWeightfvEXT, _gloffset_VertexWeightfvEXT }, - { "glVertexWeightPointerEXT", (GLvoid *) glVertexWeightPointerEXT, _gloffset_VertexWeightPointerEXT }, - { "glFlushVertexArrayRangeNV", (GLvoid *) glFlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV }, - { "glVertexArrayRangeNV", (GLvoid *) glVertexArrayRangeNV, _gloffset_VertexArrayRangeNV }, - { "glCombinerParameterfvNV", (GLvoid *) glCombinerParameterfvNV, _gloffset_CombinerParameterfvNV }, - { "glCombinerParameterfNV", (GLvoid *) glCombinerParameterfNV, _gloffset_CombinerParameterfNV }, - { "glCombinerParameterivNV", (GLvoid *) glCombinerParameterivNV, _gloffset_CombinerParameterivNV }, - { "glCombinerParameteriNV", (GLvoid *) glCombinerParameteriNV, _gloffset_CombinerParameteriNV }, - { "glCombinerInputNV", (GLvoid *) glCombinerInputNV, _gloffset_CombinerInputNV }, - { "glCombinerOutputNV", (GLvoid *) glCombinerOutputNV, _gloffset_CombinerOutputNV }, - { "glFinalCombinerInputNV", (GLvoid *) glFinalCombinerInputNV, _gloffset_FinalCombinerInputNV }, - { "glGetCombinerInputParameterfvNV", (GLvoid *) glGetCombinerInputParameterfvNV, _gloffset_GetCombinerInputParameterfvNV }, - { "glGetCombinerInputParameterivNV", (GLvoid *) glGetCombinerInputParameterivNV, _gloffset_GetCombinerInputParameterivNV }, - { "glGetCombinerOutputParameterfvNV", (GLvoid *) glGetCombinerOutputParameterfvNV, _gloffset_GetCombinerOutputParameterfvNV }, - { "glGetCombinerOutputParameterivNV", (GLvoid *) glGetCombinerOutputParameterivNV, _gloffset_GetCombinerOutputParameterivNV }, - { "glGetFinalCombinerInputParameterfvNV", (GLvoid *) glGetFinalCombinerInputParameterfvNV, _gloffset_GetFinalCombinerInputParameterfvNV }, - { "glGetFinalCombinerInputParameterivNV", (GLvoid *) glGetFinalCombinerInputParameterivNV, _gloffset_GetFinalCombinerInputParameterivNV }, - { "glResizeBuffersMESA", (GLvoid *) glResizeBuffersMESA, _gloffset_ResizeBuffersMESA }, - { "glWindowPos2dMESA", (GLvoid *) glWindowPos2dMESA, _gloffset_WindowPos2dMESA }, - { "glWindowPos2dvMESA", (GLvoid *) glWindowPos2dvMESA, _gloffset_WindowPos2dvMESA }, - { "glWindowPos2fMESA", (GLvoid *) glWindowPos2fMESA, _gloffset_WindowPos2fMESA }, - { "glWindowPos2fvMESA", (GLvoid *) glWindowPos2fvMESA, _gloffset_WindowPos2fvMESA }, - { "glWindowPos2iMESA", (GLvoid *) glWindowPos2iMESA, _gloffset_WindowPos2iMESA }, - { "glWindowPos2ivMESA", (GLvoid *) glWindowPos2ivMESA, _gloffset_WindowPos2ivMESA }, - { "glWindowPos2sMESA", (GLvoid *) glWindowPos2sMESA, _gloffset_WindowPos2sMESA }, - { "glWindowPos2svMESA", (GLvoid *) glWindowPos2svMESA, _gloffset_WindowPos2svMESA }, - { "glWindowPos3dMESA", (GLvoid *) glWindowPos3dMESA, _gloffset_WindowPos3dMESA }, - { "glWindowPos3dvMESA", (GLvoid *) glWindowPos3dvMESA, _gloffset_WindowPos3dvMESA }, - { "glWindowPos3fMESA", (GLvoid *) glWindowPos3fMESA, _gloffset_WindowPos3fMESA }, - { "glWindowPos3fvMESA", (GLvoid *) glWindowPos3fvMESA, _gloffset_WindowPos3fvMESA }, - { "glWindowPos3iMESA", (GLvoid *) glWindowPos3iMESA, _gloffset_WindowPos3iMESA }, - { "glWindowPos3ivMESA", (GLvoid *) glWindowPos3ivMESA, _gloffset_WindowPos3ivMESA }, - { "glWindowPos3sMESA", (GLvoid *) glWindowPos3sMESA, _gloffset_WindowPos3sMESA }, - { "glWindowPos3svMESA", (GLvoid *) glWindowPos3svMESA, _gloffset_WindowPos3svMESA }, - { "glWindowPos4dMESA", (GLvoid *) glWindowPos4dMESA, _gloffset_WindowPos4dMESA }, - { "glWindowPos4dvMESA", (GLvoid *) glWindowPos4dvMESA, _gloffset_WindowPos4dvMESA }, - { "glWindowPos4fMESA", (GLvoid *) glWindowPos4fMESA, _gloffset_WindowPos4fMESA }, - { "glWindowPos4fvMESA", (GLvoid *) glWindowPos4fvMESA, _gloffset_WindowPos4fvMESA }, - { "glWindowPos4iMESA", (GLvoid *) glWindowPos4iMESA, _gloffset_WindowPos4iMESA }, - { "glWindowPos4ivMESA", (GLvoid *) glWindowPos4ivMESA, _gloffset_WindowPos4ivMESA }, - { "glWindowPos4sMESA", (GLvoid *) glWindowPos4sMESA, _gloffset_WindowPos4sMESA }, - { "glWindowPos4svMESA", (GLvoid *) glWindowPos4svMESA, _gloffset_WindowPos4svMESA }, - { "glTbufferMask3DFX", (GLvoid *) glTbufferMask3DFX, _gloffset_TbufferMask3DFX }, - { "glSampleMaskEXT", (GLvoid *) glSampleMaskEXT, _gloffset_SampleMaskSGIS }, - { "glSamplePatternEXT", (GLvoid *) glSamplePatternEXT, _gloffset_SamplePatternSGIS }, - { "glDeleteFencesNV", (GLvoid *) glDeleteFencesNV, _gloffset_DeleteFencesNV }, - { "glGenFencesNV", (GLvoid *) glGenFencesNV, _gloffset_GenFencesNV }, - { "glIsFenceNV", (GLvoid *) glIsFenceNV, _gloffset_IsFenceNV }, - { "glTestFenceNV", (GLvoid *) glTestFenceNV, _gloffset_TestFenceNV }, - { "glGetFenceivNV", (GLvoid *) glGetFenceivNV, _gloffset_GetFenceivNV }, - { "glFinishFenceNV", (GLvoid *) glFinishFenceNV, _gloffset_FinishFenceNV }, - { "glSetFenceNV", (GLvoid *) glSetFenceNV, _gloffset_SetFenceNV }, - { "glWindowPos2dARB", (GLvoid *) glWindowPos2dARB, _gloffset_WindowPos2dMESA }, - { "glWindowPos2fARB", (GLvoid *) glWindowPos2fARB, _gloffset_WindowPos2fMESA }, - { "glWindowPos2iARB", (GLvoid *) glWindowPos2iARB, _gloffset_WindowPos2iMESA }, - { "glWindowPos2sARB", (GLvoid *) glWindowPos2sARB, _gloffset_WindowPos2sMESA }, - { "glWindowPos2dvARB", (GLvoid *) glWindowPos2dvARB, _gloffset_WindowPos2dvMESA }, - { "glWindowPos2fvARB", (GLvoid *) glWindowPos2fvARB, _gloffset_WindowPos2fvMESA }, - { "glWindowPos2ivARB", (GLvoid *) glWindowPos2ivARB, _gloffset_WindowPos2ivMESA }, - { "glWindowPos2svARB", (GLvoid *) glWindowPos2svARB, _gloffset_WindowPos2svMESA }, - { "glWindowPos3dARB", (GLvoid *) glWindowPos3dARB, _gloffset_WindowPos3dMESA }, - { "glWindowPos3fARB", (GLvoid *) glWindowPos3fARB, _gloffset_WindowPos3fMESA }, - { "glWindowPos3iARB", (GLvoid *) glWindowPos3iARB, _gloffset_WindowPos3iMESA }, - { "glWindowPos3sARB", (GLvoid *) glWindowPos3sARB, _gloffset_WindowPos3sMESA }, - { "glWindowPos3dvARB", (GLvoid *) glWindowPos3dvARB, _gloffset_WindowPos3dvMESA }, - { "glWindowPos3fvARB", (GLvoid *) glWindowPos3fvARB, _gloffset_WindowPos3fvMESA }, - { "glWindowPos3ivARB", (GLvoid *) glWindowPos3ivARB, _gloffset_WindowPos3ivMESA }, - { "glWindowPos3svARB", (GLvoid *) glWindowPos3svARB, _gloffset_WindowPos3svMESA }, - { "glAreProgramsResidentNV", (GLvoid *) glAreProgramsResidentNV, _gloffset_AreProgramsResidentNV }, - { "glBindProgramNV", (GLvoid *) glBindProgramNV, _gloffset_BindProgramNV }, - { "glDeleteProgramsNV", (GLvoid *) glDeleteProgramsNV, _gloffset_DeleteProgramsNV }, - { "glExecuteProgramNV", (GLvoid *) glExecuteProgramNV, _gloffset_ExecuteProgramNV }, - { "glGenProgramsNV", (GLvoid *) glGenProgramsNV, _gloffset_GenProgramsNV }, - { "glGetProgramParameterdvNV", (GLvoid *) glGetProgramParameterdvNV, _gloffset_GetProgramParameterdvNV }, - { "glGetProgramParameterfvNV", (GLvoid *) glGetProgramParameterfvNV, _gloffset_GetProgramParameterfvNV }, - { "glGetProgramivNV", (GLvoid *) glGetProgramivNV, _gloffset_GetProgramivNV }, - { "glGetProgramStringNV", (GLvoid *) glGetProgramStringNV, _gloffset_GetProgramStringNV }, - { "glGetTrackMatrixivNV", (GLvoid *) glGetTrackMatrixivNV, _gloffset_GetTrackMatrixivNV }, - { "glGetVertexAttribdvNV", (GLvoid *) glGetVertexAttribdvNV, _gloffset_GetVertexAttribdvNV }, - { "glGetVertexAttribfvNV", (GLvoid *) glGetVertexAttribfvNV, _gloffset_GetVertexAttribfvNV }, - { "glGetVertexAttribivNV", (GLvoid *) glGetVertexAttribivNV, _gloffset_GetVertexAttribivNV }, - { "glGetVertexAttribPointervNV", (GLvoid *) glGetVertexAttribPointervNV, _gloffset_GetVertexAttribPointervNV }, - { "glIsProgramNV", (GLvoid *) glIsProgramNV, _gloffset_IsProgramNV }, - { "glLoadProgramNV", (GLvoid *) glLoadProgramNV, _gloffset_LoadProgramNV }, - { "glProgramParameter4dNV", (GLvoid *) glProgramParameter4dNV, _gloffset_ProgramParameter4dNV }, - { "glProgramParameter4dvNV", (GLvoid *) glProgramParameter4dvNV, _gloffset_ProgramParameter4dvNV }, - { "glProgramParameter4fNV", (GLvoid *) glProgramParameter4fNV, _gloffset_ProgramParameter4fNV }, - { "glProgramParameter4fvNV", (GLvoid *) glProgramParameter4fvNV, _gloffset_ProgramParameter4fvNV }, - { "glProgramParameters4dvNV", (GLvoid *) glProgramParameters4dvNV, _gloffset_ProgramParameters4dvNV }, - { "glProgramParameters4fvNV", (GLvoid *) glProgramParameters4fvNV, _gloffset_ProgramParameters4fvNV }, - { "glRequestResidentProgramsNV", (GLvoid *) glRequestResidentProgramsNV, _gloffset_RequestResidentProgramsNV }, - { "glTrackMatrixNV", (GLvoid *) glTrackMatrixNV, _gloffset_TrackMatrixNV }, - { "glVertexAttribPointerNV", (GLvoid *) glVertexAttribPointerNV, _gloffset_VertexAttribPointerNV }, - { "glVertexAttrib1dNV", (GLvoid *) glVertexAttrib1dNV, _gloffset_VertexAttrib1dNV }, - { "glVertexAttrib1dvNV", (GLvoid *) glVertexAttrib1dvNV, _gloffset_VertexAttrib1dvNV }, - { "glVertexAttrib1fNV", (GLvoid *) glVertexAttrib1fNV, _gloffset_VertexAttrib1fNV }, - { "glVertexAttrib1fvNV", (GLvoid *) glVertexAttrib1fvNV, _gloffset_VertexAttrib1fvNV }, - { "glVertexAttrib1sNV", (GLvoid *) glVertexAttrib1sNV, _gloffset_VertexAttrib1sNV }, - { "glVertexAttrib1svNV", (GLvoid *) glVertexAttrib1svNV, _gloffset_VertexAttrib1svNV }, - { "glVertexAttrib2dNV", (GLvoid *) glVertexAttrib2dNV, _gloffset_VertexAttrib2dNV }, - { "glVertexAttrib2dvNV", (GLvoid *) glVertexAttrib2dvNV, _gloffset_VertexAttrib2dvNV }, - { "glVertexAttrib2fNV", (GLvoid *) glVertexAttrib2fNV, _gloffset_VertexAttrib2fNV }, - { "glVertexAttrib2fvNV", (GLvoid *) glVertexAttrib2fvNV, _gloffset_VertexAttrib2fvNV }, - { "glVertexAttrib2sNV", (GLvoid *) glVertexAttrib2sNV, _gloffset_VertexAttrib2sNV }, - { "glVertexAttrib2svNV", (GLvoid *) glVertexAttrib2svNV, _gloffset_VertexAttrib2svNV }, - { "glVertexAttrib3dNV", (GLvoid *) glVertexAttrib3dNV, _gloffset_VertexAttrib3dNV }, - { "glVertexAttrib3dvNV", (GLvoid *) glVertexAttrib3dvNV, _gloffset_VertexAttrib3dvNV }, - { "glVertexAttrib3fNV", (GLvoid *) glVertexAttrib3fNV, _gloffset_VertexAttrib3fNV }, - { "glVertexAttrib3fvNV", (GLvoid *) glVertexAttrib3fvNV, _gloffset_VertexAttrib3fvNV }, - { "glVertexAttrib3sNV", (GLvoid *) glVertexAttrib3sNV, _gloffset_VertexAttrib3sNV }, - { "glVertexAttrib3svNV", (GLvoid *) glVertexAttrib3svNV, _gloffset_VertexAttrib3svNV }, - { "glVertexAttrib4dNV", (GLvoid *) glVertexAttrib4dNV, _gloffset_VertexAttrib4dNV }, - { "glVertexAttrib4dvNV", (GLvoid *) glVertexAttrib4dvNV, _gloffset_VertexAttrib4dvNV }, - { "glVertexAttrib4fNV", (GLvoid *) glVertexAttrib4fNV, _gloffset_VertexAttrib4fNV }, - { "glVertexAttrib4fvNV", (GLvoid *) glVertexAttrib4fvNV, _gloffset_VertexAttrib4fvNV }, - { "glVertexAttrib4sNV", (GLvoid *) glVertexAttrib4sNV, _gloffset_VertexAttrib4sNV }, - { "glVertexAttrib4svNV", (GLvoid *) glVertexAttrib4svNV, _gloffset_VertexAttrib4svNV }, - { "glVertexAttrib4ubNV", (GLvoid *) glVertexAttrib4ubNV, _gloffset_VertexAttrib4ubNV }, - { "glVertexAttrib4ubvNV", (GLvoid *) glVertexAttrib4ubvNV, _gloffset_VertexAttrib4ubvNV }, - { "glVertexAttribs1dvNV", (GLvoid *) glVertexAttribs1dvNV, _gloffset_VertexAttribs1dvNV }, - { "glVertexAttribs1fvNV", (GLvoid *) glVertexAttribs1fvNV, _gloffset_VertexAttribs1fvNV }, - { "glVertexAttribs1svNV", (GLvoid *) glVertexAttribs1svNV, _gloffset_VertexAttribs1svNV }, - { "glVertexAttribs2dvNV", (GLvoid *) glVertexAttribs2dvNV, _gloffset_VertexAttribs2dvNV }, - { "glVertexAttribs2fvNV", (GLvoid *) glVertexAttribs2fvNV, _gloffset_VertexAttribs2fvNV }, - { "glVertexAttribs2svNV", (GLvoid *) glVertexAttribs2svNV, _gloffset_VertexAttribs2svNV }, - { "glVertexAttribs3dvNV", (GLvoid *) glVertexAttribs3dvNV, _gloffset_VertexAttribs3dvNV }, - { "glVertexAttribs3fvNV", (GLvoid *) glVertexAttribs3fvNV, _gloffset_VertexAttribs3fvNV }, - { "glVertexAttribs3svNV", (GLvoid *) glVertexAttribs3svNV, _gloffset_VertexAttribs3svNV }, - { "glVertexAttribs4dvNV", (GLvoid *) glVertexAttribs4dvNV, _gloffset_VertexAttribs4dvNV }, - { "glVertexAttribs4fvNV", (GLvoid *) glVertexAttribs4fvNV, _gloffset_VertexAttribs4fvNV }, - { "glVertexAttribs4svNV", (GLvoid *) glVertexAttribs4svNV, _gloffset_VertexAttribs4svNV }, - { "glVertexAttribs4ubvNV", (GLvoid *) glVertexAttribs4ubvNV, _gloffset_VertexAttribs4ubvNV }, - { "glPointParameteriNV", (GLvoid *) glPointParameteriNV, _gloffset_PointParameteriNV }, - { "glPointParameterivNV", (GLvoid *) glPointParameterivNV, _gloffset_PointParameterivNV }, - { "glBlendFuncSeparate", (GLvoid *) glBlendFuncSeparate, _gloffset_BlendFuncSeparateEXT }, - { "glFogCoordf", (GLvoid *) glFogCoordf, _gloffset_FogCoordfEXT }, - { "glFogCoordfv", (GLvoid *) glFogCoordfv, _gloffset_FogCoordfvEXT }, - { "glFogCoordd", (GLvoid *) glFogCoordd, _gloffset_FogCoorddEXT }, - { "glFogCoorddv", (GLvoid *) glFogCoorddv, _gloffset_FogCoorddvEXT }, - { "glFogCoordPointer", (GLvoid *) glFogCoordPointer, _gloffset_FogCoordPointerEXT }, - { "glMultiDrawArrays", (GLvoid *) glMultiDrawArrays, _gloffset_MultiDrawArraysEXT }, - { "glMultiDrawElements", (GLvoid *) glMultiDrawElements, _gloffset_MultiDrawElementsEXT }, - { "glPointParameterf", (GLvoid *) glPointParameterf, _gloffset_PointParameterfEXT }, - { "glPointParameterfv", (GLvoid *) glPointParameterfv, _gloffset_PointParameterfvEXT }, - { "glPointParameteri", (GLvoid *) glPointParameteri, _gloffset_PointParameteriNV }, - { "glPointParameteriv", (GLvoid *) glPointParameteriv, _gloffset_PointParameterivNV }, - { "glSecondaryColor3b", (GLvoid *) glSecondaryColor3b, _gloffset_SecondaryColor3bEXT }, - { "glSecondaryColor3bv", (GLvoid *) glSecondaryColor3bv, _gloffset_SecondaryColor3bvEXT }, - { "glSecondaryColor3d", (GLvoid *) glSecondaryColor3d, _gloffset_SecondaryColor3dEXT }, - { "glSecondaryColor3dv", (GLvoid *) glSecondaryColor3dv, _gloffset_SecondaryColor3dvEXT }, - { "glSecondaryColor3f", (GLvoid *) glSecondaryColor3f, _gloffset_SecondaryColor3fEXT }, - { "glSecondaryColor3fv", (GLvoid *) glSecondaryColor3fv, _gloffset_SecondaryColor3fvEXT }, - { "glSecondaryColor3i", (GLvoid *) glSecondaryColor3i, _gloffset_SecondaryColor3iEXT }, - { "glSecondaryColor3iv", (GLvoid *) glSecondaryColor3iv, _gloffset_SecondaryColor3ivEXT }, - { "glSecondaryColor3s", (GLvoid *) glSecondaryColor3s, _gloffset_SecondaryColor3sEXT }, - { "glSecondaryColor3sv", (GLvoid *) glSecondaryColor3sv, _gloffset_SecondaryColor3svEXT }, - { "glSecondaryColor3ub", (GLvoid *) glSecondaryColor3ub, _gloffset_SecondaryColor3ubEXT }, - { "glSecondaryColor3ubv", (GLvoid *) glSecondaryColor3ubv, _gloffset_SecondaryColor3ubvEXT }, - { "glSecondaryColor3ui", (GLvoid *) glSecondaryColor3ui, _gloffset_SecondaryColor3uiEXT }, - { "glSecondaryColor3uiv", (GLvoid *) glSecondaryColor3uiv, _gloffset_SecondaryColor3uivEXT }, - { "glSecondaryColor3us", (GLvoid *) glSecondaryColor3us, _gloffset_SecondaryColor3usEXT }, - { "glSecondaryColor3usv", (GLvoid *) glSecondaryColor3usv, _gloffset_SecondaryColor3usvEXT }, - { "glSecondaryColorPointer", (GLvoid *) glSecondaryColorPointer, _gloffset_SecondaryColorPointerEXT }, - { "glWindowPos2d", (GLvoid *) glWindowPos2d, _gloffset_WindowPos2dMESA }, - { "glWindowPos2dv", (GLvoid *) glWindowPos2dv, _gloffset_WindowPos2dvMESA }, - { "glWindowPos2f", (GLvoid *) glWindowPos2f, _gloffset_WindowPos2fMESA }, - { "glWindowPos2fv", (GLvoid *) glWindowPos2fv, _gloffset_WindowPos2fvMESA }, - { "glWindowPos2i", (GLvoid *) glWindowPos2i, _gloffset_WindowPos2iMESA }, - { "glWindowPos2iv", (GLvoid *) glWindowPos2iv, _gloffset_WindowPos2ivMESA }, - { "glWindowPos2s", (GLvoid *) glWindowPos2s, _gloffset_WindowPos2sMESA }, - { "glWindowPos2sv", (GLvoid *) glWindowPos2sv, _gloffset_WindowPos2svMESA }, - { "glWindowPos3d", (GLvoid *) glWindowPos3d, _gloffset_WindowPos3dMESA }, - { "glWindowPos3dv", (GLvoid *) glWindowPos3dv, _gloffset_WindowPos3dvMESA }, - { "glWindowPos3f", (GLvoid *) glWindowPos3f, _gloffset_WindowPos3fMESA }, - { "glWindowPos3fv", (GLvoid *) glWindowPos3fv, _gloffset_WindowPos3fvMESA }, - { "glWindowPos3i", (GLvoid *) glWindowPos3i, _gloffset_WindowPos3iMESA }, - { "glWindowPos3iv", (GLvoid *) glWindowPos3iv, _gloffset_WindowPos3ivMESA }, - { "glWindowPos3s", (GLvoid *) glWindowPos3s, _gloffset_WindowPos3sMESA }, - { "glWindowPos3sv", (GLvoid *) glWindowPos3sv, _gloffset_WindowPos3svMESA }, - { "glActiveStencilFaceEXT", (GLvoid *) glActiveStencilFaceEXT, _gloffset_ActiveStencilFaceEXT }, - { NULL, NULL } /* end of list marker */ -}; Index: xc/extras/Mesa/src/glthread.c diff -u xc/extras/Mesa/src/glthread.c:1.4 xc/extras/Mesa/src/glthread.c:removed --- xc/extras/Mesa/src/glthread.c:1.4 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/glthread.c Wed Mar 16 21:00:30 2005 @@ -1,367 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * XXX There's probably some work to do in order to make this file - * truly reusable outside of Mesa. First, the glheader.h include must go. - */ - - -#include "glheader.h" -#include "glthread.h" - - -/* - * This file should still compile even when THREADS is not defined. - * This is to make things easier to deal with on the makefile scene.. - */ -#ifdef THREADS -#include - -/* - * Error messages - */ -#define INIT_TSD_ERROR "_glthread_: failed to allocate key for thread specific data" -#define GET_TSD_ERROR "_glthread_: failed to get thread specific data" -#define SET_TSD_ERROR "_glthread_: thread failed to set thread specific data" - - -/* - * Magic number to determine if a TSD object has been initialized. - * Kind of a hack but there doesn't appear to be a better cross-platform - * solution. - */ -#define INIT_MAGIC 0xff8adc98 - - - -/* - * POSIX Threads -- The best way to go if your platform supports them. - * Solaris >= 2.5 have POSIX threads, IRIX >= 6.4 reportedly - * has them, and many of the free Unixes now have them. - * Be sure to use appropriate -mt or -D_REENTRANT type - * compile flags when building. - */ -#ifdef PTHREADS - -unsigned long -_glthread_GetID(void) -{ - return (unsigned long) pthread_self(); -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - return pthread_getspecific(tsd->key); -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if (pthread_setspecific(tsd->key, ptr) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#endif /* PTHREADS */ - - - -/* - * Solaris/Unix International Threads -- Use only if POSIX threads - * aren't available on your Unix platform. Solaris 2.[34] are examples - * of platforms where this is the case. Be sure to use -mt and/or - * -D_REENTRANT when compiling. - */ -#ifdef SOLARIS_THREADS -#define USE_LOCK_FOR_KEY /* undef this to try a version without - lock for the global key... */ - -unsigned long -_glthread_GetID(void) -{ - abort(); /* XXX not implemented yet */ - return (unsigned long) 0; -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 || - (errno = thr_keycreate(&(tsd->key), free)) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void* ret; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } -#ifdef USE_LOCK_FOR_KEY - mutex_lock(&tsd->keylock); - thr_getspecific(tsd->key, &ret); - mutex_unlock(&tsd->keylock); -#else - if ((errno = thr_getspecific(tsd->key, &ret)) != 0) { - perror(GET_TSD_ERROR); - exit(-1); - } -#endif - return ret; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if ((errno = thr_setspecific(tsd->key, ptr)) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#undef USE_LOCK_FOR_KEY -#endif /* SOLARIS_THREADS */ - - - -/* - * Win32 Threads. The only available option for Windows 95/NT. - * Be sure that you compile using the Multithreaded runtime, otherwise - * bad things will happen. - */ -#ifdef WIN32_THREADS - -unsigned long -_glthread_GetID(void) -{ - abort(); /* XXX not implemented yet */ - return (unsigned long) 0; -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - tsd->key = TlsAlloc(); - if (tsd->key == 0xffffffff) { - /* Can Windows handle stderr messages for non-console - applications? Does Windows have perror? */ - /* perror(SET_INIT_ERROR);*/ - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - return TlsGetValue(tsd->key); -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - /* the following code assumes that the _glthread_TSD has been initialized - to zero at creation */ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if (TlsSetValue(tsd->key, ptr) == 0) { - /* Can Windows handle stderr messages for non-console - applications? Does Windows have perror? */ - /* perror(SET_TSD_ERROR);*/ - exit(-1); - } -} - -#endif /* WIN32_THREADS */ - - - -/* - * XFree86 has its own thread wrapper, Xthreads.h - * We wrap it again for GL. - */ -#ifdef XTHREADS - -unsigned long -_glthread_GetID(void) -{ - return (unsigned long) xthread_self(); -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if (xthread_key_create(&tsd->key, NULL) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void *ptr; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_get_specific(tsd->key, &ptr); - return ptr; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - xthread_set_specific(tsd->key, ptr); -} - -#endif /* XTHREAD */ - - - -/* - * BeOS threads - */ -#ifdef BEOS_THREADS - -unsigned long -_glthread_GetID(void) -{ - return (unsigned long) find_thread(NULL); -} - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - tsd->key = tls_allocate(); - tsd->initMagic = INIT_MAGIC; -} - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - return tls_get(tsd->key); -} - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - tls_set(tsd->key, ptr); -} - -#endif /* BEOS_THREADS */ - - - -#else /* THREADS */ - - -/* - * no-op functions - */ - -unsigned long -_glthread_GetID(void) -{ - return 0; -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - (void) tsd; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - (void) tsd; - return NULL; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - (void) tsd; - (void) ptr; -} - - -#endif /* THREADS */ Index: xc/extras/Mesa/src/glthread.h diff -u xc/extras/Mesa/src/glthread.h:1.6 xc/extras/Mesa/src/glthread.h:removed --- xc/extras/Mesa/src/glthread.h:1.6 Wed Oct 22 11:44:41 2003 +++ xc/extras/Mesa/src/glthread.h Wed Mar 16 21:00:30 2005 @@ -1,295 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Thread support for gl dispatch. - * - * Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu) - * and Christoph Poliwoda (poliwoda@volumegraphics.com) - * Revised by Keith Whitwell - * Adapted for new gl dispatcher by Brian Paul - * - * - * - * DOCUMENTATION - * - * This thread module exports the following types: - * _glthread_TSD Thread-specific data area - * _glthread_Thread Thread datatype - * _glthread_Mutex Mutual exclusion lock - * - * Macros: - * _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex - * _glthread_INIT_MUTEX(name) Initialize a mutex - * _glthread_LOCK_MUTEX(name) Lock a mutex - * _glthread_UNLOCK_MUTEX(name) Unlock a mutex - * - * Functions: - * _glthread_GetID(v) Get integer thread ID - * _glthread_InitTSD() Initialize thread-specific data - * _glthread_GetTSD() Get thread-specific data - * _glthread_SetTSD() Set thread-specific data - * - */ - -/* - * If this file is accidentally included by a non-threaded build, - * it should not cause the build to fail, or otherwise cause problems. - * In general, it should only be included when needed however. - */ - -#ifndef GLTHREAD_H -#define GLTHREAD_H - - -#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(XTHREADS) -#define THREADS -#endif - -#ifdef VMS -#include -#endif - -/* - * POSIX threads. This should be your choice in the Unix world - * whenever possible. When building with POSIX threads, be sure - * to enable any compiler flags which will cause the MT-safe - * libc (if one exists) to be used when linking, as well as any - * header macros for MT-safe errno, etc. For Solaris, this is the -mt - * compiler flag. On Solaris with gcc, use -D_REENTRANT to enable - * proper compiling for MT-safe libc etc. - */ -#if defined(PTHREADS) -#include /* POSIX threads headers */ - -typedef struct { - pthread_key_t key; - int initMagic; -} _glthread_TSD; - -typedef pthread_t _glthread_Thread; - -typedef pthread_mutex_t _glthread_Mutex; - -#define _glthread_DECLARE_STATIC_MUTEX(name) \ - static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER - -#define _glthread_INIT_MUTEX(name) \ - pthread_mutex_init(&(name), NULL) - -#define _glthread_DESTROY_MUTEX(name) \ - pthread_mutex_destroy(&(name)) - -#define _glthread_LOCK_MUTEX(name) \ - (void) pthread_mutex_lock(&(name)) - -#define _glthread_UNLOCK_MUTEX(name) \ - (void) pthread_mutex_unlock(&(name)) - -#endif /* PTHREADS */ - - - - -/* - * Solaris threads. Use only up to Solaris 2.4. - * Solaris 2.5 and higher provide POSIX threads. - * Be sure to compile with -mt on the Solaris compilers, or - * use -D_REENTRANT if using gcc. - */ -#ifdef SOLARIS_THREADS -#include - -typedef struct { - thread_key_t key; - mutex_t keylock; - int initMagic; -} _glthread_TSD; - -typedef thread_t _glthread_Thread; - -typedef mutex_t _glthread_Mutex; - -/* XXX need to really implement mutex-related macros */ -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 -#define _glthread_INIT_MUTEX(name) (void) name -#define _glthread_DESTROY_MUTEX(name) (void) name -#define _glthread_LOCK_MUTEX(name) (void) name -#define _glthread_UNLOCK_MUTEX(name) (void) name - -#endif /* SOLARIS_THREADS */ - - - - -/* - * Windows threads. Should work with Windows NT and 95. - * IMPORTANT: Link with multithreaded runtime library when THREADS are - * used! - */ -#ifdef WIN32_THREADS -#include - -typedef struct { - DWORD key; - int initMagic; -} _glthread_TSD; - -typedef HANDLE _glthread_Thread; - -typedef CRITICAL_SECTION _glthread_Mutex; - -/* XXX need to really implement mutex-related macros */ -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 -#define _glthread_INIT_MUTEX(name) (void) name -#define _glthread_DESTROY_MUTEX(name) (void) name -#define _glthread_LOCK_MUTEX(name) (void) name -#define _glthread_UNLOCK_MUTEX(name) (void) name - -#endif /* WIN32_THREADS */ - - - - -/* - * XFree86 has its own thread wrapper, Xthreads.h - * We wrap it again for GL. - */ -#ifdef XTHREADS -#include "Xthreads.h" - -typedef struct { - xthread_key_t key; - int initMagic; -} _glthread_TSD; - -typedef xthread_t _glthread_Thread; - -typedef xmutex_rec _glthread_Mutex; - -#ifdef XMUTEX_INITIALIZER -#define _glthread_DECLARE_STATIC_MUTEX(name) \ - static _glthread_Mutex name = XMUTEX_INITIALIZER -#else -#define _glthread_DECLARE_STATIC_MUTEX(name) \ - static _glthread_Mutex name -#endif - -#define _glthread_INIT_MUTEX(name) \ - xmutex_init(&(name)) - -#define _glthread_DESTROY_MUTEX(name) \ - xmutex_clear(&(name)) - -#define _glthread_LOCK_MUTEX(name) \ - (void) xmutex_lock(&(name)) - -#define _glthread_UNLOCK_MUTEX(name) \ - (void) xmutex_unlock(&(name)) - -#endif /* XTHREADS */ - - - -/* - * BeOS threads. R5.x required. - */ -#ifdef BEOS_THREADS -#include -#include - -typedef struct { - int32 key; - int initMagic; -} _glthread_TSD; - -typedef thread_id _glthread_Thread; - -/* Use Benaphore, aka speeder semaphore */ -typedef struct { - int32 lock; - sem_id sem; -} benaphore; -typedef benaphore _glthread_Mutex; - -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, -create_sem(0, #name"_benaphore") } -#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0 -#define _glthread_LOCK_MUTEX(name) if((atomic_add(&(name.lock), 1)) >= 1) acquire_sem(name.sem) -#define _glthread_UNLOCK_MUTEX(name) if((atomic_add(&(name.lock), -1)) > 1) release_sem(name.sem) - -#endif /* BEOS_THREADS */ - - - -#ifndef THREADS - -/* - * THREADS not defined - */ - -typedef GLuint _glthread_TSD; - -typedef GLuint _glthread_Thread; - -typedef GLuint _glthread_Mutex; - -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 - -#define _glthread_INIT_MUTEX(name) (void) name - -#define _glthread_DESTROY_MUTEX(name) (void) name - -#define _glthread_LOCK_MUTEX(name) (void) name - -#define _glthread_UNLOCK_MUTEX(name) (void) name - -#endif /* THREADS */ - - - -/* - * Platform independent thread specific data API. - */ - -extern unsigned long -_glthread_GetID(void); - - -extern void -_glthread_InitTSD(_glthread_TSD *); - - -extern void * -_glthread_GetTSD(_glthread_TSD *); - - -extern void -_glthread_SetTSD(_glthread_TSD *, void *); - - - -#endif /* THREADS_H */ Index: xc/extras/Mesa/src/hash.c diff -u xc/extras/Mesa/src/hash.c:1.7 xc/extras/Mesa/src/hash.c:removed --- xc/extras/Mesa/src/hash.c:1.7 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/hash.c Wed Mar 16 21:00:30 2005 @@ -1,323 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "glthread.h" -#include "hash.h" -#include "context.h" - - -/** - * \file hash.c - * \brief Generic hash table. Used for display lists and texture objects. - * The hash functions are thread-safe. - * \author Brian Paul - * \note key=0 is illegal - */ - - -#define TABLE_SIZE 1023 /**< Size of lookup table/array */ - -/** - * An entry in the hash table. This struct is private to this file. - */ -struct HashEntry { - GLuint Key; /**< the entry's key */ - void *Data; /**< the entry's data */ - struct HashEntry *Next; /**< pointer to next entry */ -}; - -/** - * The hashtable data structure. This is an opaque types (it's not - * defined in the .h file). - */ -struct _mesa_HashTable { - struct HashEntry *Table[TABLE_SIZE]; /**< the lookup table */ - GLuint MaxKey; /**< highest key inserted so far */ - _glthread_Mutex Mutex; /**< mutual exclusion lock */ -}; - - - -/** - * Create a new hash table. - * \return pointer to a new, empty hash table. - */ -struct _mesa_HashTable *_mesa_NewHashTable(void) -{ - struct _mesa_HashTable *table = CALLOC_STRUCT(_mesa_HashTable); - if (table) { - _glthread_INIT_MUTEX(table->Mutex); - } - return table; -} - - - -/** - * Delete a hash table. - * \param table - the hash table to delete - */ -void _mesa_DeleteHashTable(struct _mesa_HashTable *table) -{ - GLuint i; - assert(table); - for (i=0;iTable[i]; - while (entry) { - struct HashEntry *next = entry->Next; - FREE(entry); - entry = next; - } - } - _glthread_DESTROY_MUTEX(table->Mutex); - FREE(table); -} - - - -/** - * Lookup an entry in the hash table. - * \param table - the hash table - * \param key - the key - * \return pointer to user's data or NULL if key not in table - */ -void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key) -{ - GLuint pos; - const struct HashEntry *entry; - - assert(table); - assert(key); - - pos = key & (TABLE_SIZE-1); - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - return entry->Data; - } - entry = entry->Next; - } - return NULL; -} - - - -/** - * Insert into the hash table. If an entry with this key already exists - * we'll replace the existing entry. - * \param table - the hash table - * \param key - the key (not zero) - * \param data - pointer to user data - */ -void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data) -{ - /* search for existing entry with this key */ - GLuint pos; - struct HashEntry *entry; - - assert(table); - assert(key); - - _glthread_LOCK_MUTEX(table->Mutex); - - if (key > table->MaxKey) - table->MaxKey = key; - - pos = key & (TABLE_SIZE-1); - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - /* replace entry's data */ - entry->Data = data; - _glthread_UNLOCK_MUTEX(table->Mutex); - return; - } - entry = entry->Next; - } - - /* alloc and insert new table entry */ - entry = MALLOC_STRUCT(HashEntry); - entry->Key = key; - entry->Data = data; - entry->Next = table->Table[pos]; - table->Table[pos] = entry; - - _glthread_UNLOCK_MUTEX(table->Mutex); -} - - - -/** - * Remove an entry from the hash table. - * \param table - the hash table - * \param key - key of entry to remove - */ -void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key) -{ - GLuint pos; - struct HashEntry *entry, *prev; - - assert(table); - assert(key); - - _glthread_LOCK_MUTEX(table->Mutex); - - pos = key & (TABLE_SIZE-1); - prev = NULL; - entry = table->Table[pos]; - while (entry) { - if (entry->Key == key) { - /* found it! */ - if (prev) { - prev->Next = entry->Next; - } - else { - table->Table[pos] = entry->Next; - } - FREE(entry); - _glthread_UNLOCK_MUTEX(table->Mutex); - return; - } - prev = entry; - entry = entry->Next; - } - - _glthread_UNLOCK_MUTEX(table->Mutex); -} - - - -/** - * Get the key of the "first" entry in the hash table. - * This is used in the course of deleting all display lists when - * a context is destroyed. - * \param table - the hash table - * \return key for the "first" entry in the hash table. - */ -GLuint _mesa_HashFirstEntry(struct _mesa_HashTable *table) -{ - GLuint pos; - assert(table); - _glthread_LOCK_MUTEX(table->Mutex); - for (pos=0; pos < TABLE_SIZE; pos++) { - if (table->Table[pos]) { - _glthread_UNLOCK_MUTEX(table->Mutex); - return table->Table[pos]->Key; - } - } - _glthread_UNLOCK_MUTEX(table->Mutex); - return 0; -} - - - -/** - * Dump contents of hash table for debugging. - * \param table - the hash table - */ -void _mesa_HashPrint(const struct _mesa_HashTable *table) -{ - GLuint i; - assert(table); - for (i=0;iTable[i]; - while (entry) { - _mesa_debug(NULL, "%u %p\n", entry->Key, entry->Data); - entry = entry->Next; - } - } -} - - - -/** - * Find a block of 'numKeys' adjacent unused hash keys. - * \param table - the hash table - * \param numKeys - number of keys needed - * \return Starting key of free block or 0 if failure - */ -GLuint _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys) -{ - GLuint maxKey = ~((GLuint) 0); - _glthread_LOCK_MUTEX(table->Mutex); - if (maxKey - numKeys > table->MaxKey) { - /* the quick solution */ - _glthread_UNLOCK_MUTEX(table->Mutex); - return table->MaxKey + 1; - } - else { - /* the slow solution */ - GLuint freeCount = 0; - GLuint freeStart = 1; - GLuint key; - for (key=1; key!=maxKey; key++) { - if (_mesa_HashLookup(table, key)) { - /* darn, this key is already in use */ - freeCount = 0; - freeStart = key+1; - } - else { - /* this key not in use, check if we've found enough */ - freeCount++; - if (freeCount == numKeys) { - _glthread_UNLOCK_MUTEX(table->Mutex); - return freeStart; - } - } - } - /* cannot allocate a block of numKeys consecutive keys */ - _glthread_UNLOCK_MUTEX(table->Mutex); - return 0; - } -} - - - -#ifdef HASH_TEST_HARNESS -int main(int argc, char *argv[]) -{ - int a, b, c; - struct HashTable *t; - - _mesa_printf("&a = %p\n", &a); - _mesa_printf("&b = %p\n", &b); - - t = _mesa_NewHashTable(); - _mesa_HashInsert(t, 501, &a); - _mesa_HashInsert(t, 10, &c); - _mesa_HashInsert(t, 0xfffffff8, &b); - _mesa_HashPrint(t); - - _mesa_printf("Find 501: %p\n", _mesa_HashLookup(t,501)); - _mesa_printf("Find 1313: %p\n", _mesa_HashLookup(t,1313)); - _mesa_printf("Find block of 100: %d\n", _mesa_HashFindFreeKeyBlock(t, 100)); - - _mesa_DeleteHashTable(t); - - return 0; -} -#endif Index: xc/extras/Mesa/src/hash.h diff -u xc/extras/Mesa/src/hash.h:1.6 xc/extras/Mesa/src/hash.h:removed --- xc/extras/Mesa/src/hash.h:1.6 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/hash.h Wed Mar 16 21:00:30 2005 @@ -1,58 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef HASH_H -#define HASH_H - - -#include "glheader.h" - - -/** - * Opaque hash table type. - */ -struct HashTable; - - - -extern struct _mesa_HashTable *_mesa_NewHashTable(void); - -extern void _mesa_DeleteHashTable(struct _mesa_HashTable *table); - -extern void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key); - -extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data); - -extern void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key); - -extern GLuint _mesa_HashFirstEntry(struct _mesa_HashTable *table); - -extern void _mesa_HashPrint(const struct _mesa_HashTable *table); - -extern GLuint _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys); - - -#endif Index: xc/extras/Mesa/src/hint.c diff -u xc/extras/Mesa/src/hint.c:1.4 xc/extras/Mesa/src/hint.c:removed --- xc/extras/Mesa/src/hint.c:1.4 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/hint.c Wed Mar 16 21:00:30 2005 @@ -1,122 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "enums.h" -#include "context.h" -#include "hint.h" -#include "imports.h" - - - -void -_mesa_Hint( GLenum target, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glHint %s %d\n", - _mesa_lookup_enum_by_nr(target), mode); - - if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) { - _mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)"); - return; - } - - switch (target) { - case GL_FOG_HINT: - if (ctx->Hint.Fog == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.Fog = mode; - break; - case GL_LINE_SMOOTH_HINT: - if (ctx->Hint.LineSmooth == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.LineSmooth = mode; - break; - case GL_PERSPECTIVE_CORRECTION_HINT: - if (ctx->Hint.PerspectiveCorrection == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.PerspectiveCorrection = mode; - break; - case GL_POINT_SMOOTH_HINT: - if (ctx->Hint.PointSmooth == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.PointSmooth = mode; - break; - case GL_POLYGON_SMOOTH_HINT: - if (ctx->Hint.PolygonSmooth == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.PolygonSmooth = mode; - break; - - /* GL_EXT_clip_volume_hint */ - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - if (ctx->Hint.ClipVolumeClipping == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.ClipVolumeClipping = mode; - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - if (!ctx->Extensions.ARB_texture_compression) { - _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); - return; - } - if (ctx->Hint.TextureCompression == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.TextureCompression = mode; - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - if (!ctx->Extensions.SGIS_generate_mipmap) { - _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); - return; - } - if (ctx->Hint.GenerateMipmap == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.GenerateMipmap = mode; - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); - return; - } - - if (ctx->Driver.Hint) { - (*ctx->Driver.Hint)( ctx, target, mode ); - } -} Index: xc/extras/Mesa/src/hint.h diff -u xc/extras/Mesa/src/hint.h:1.3 xc/extras/Mesa/src/hint.h:removed --- xc/extras/Mesa/src/hint.h:1.3 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/hint.h Wed Mar 16 21:00:30 2005 @@ -1,38 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef HINT_H -#define HINT_H - - -#include "mtypes.h" - - -extern void -_mesa_Hint( GLenum target, GLenum mode ); - - -#endif Index: xc/extras/Mesa/src/histogram.c diff -u xc/extras/Mesa/src/histogram.c:1.3 xc/extras/Mesa/src/histogram.c:removed --- xc/extras/Mesa/src/histogram.c:1.3 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/histogram.c Wed Mar 16 21:00:30 2005 @@ -1,1030 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "image.h" -#include "histogram.h" -#include "mmath.h" - - -/* - * XXX the packed pixel formats haven't been tested. - */ -static void -pack_histogram( GLcontext *ctx, - GLuint n, CONST GLuint rgba[][4], - GLenum format, GLenum type, GLvoid *destination, - const struct gl_pixelstore_attrib *packing ) -{ - const GLint comps = _mesa_components_in_format(format); - GLuint luminance[MAX_WIDTH]; - - if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) { - GLuint i; - for (i = 0; i < n; i++) { - luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP]; - } - } - -#define PACK_MACRO(TYPE) \ - { \ - GLuint i; \ - switch (format) { \ - case GL_RED: \ - for (i=0;iSwapBytes) { - _mesa_swap2(dst, n * comps); - } - } - break; - case GL_SHORT: - { - GLshort *dst = (GLshort *) destination; - PACK_MACRO(GLshort); - if (packing->SwapBytes) { - _mesa_swap2((GLushort *) dst, n * comps); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint *dst = (GLuint *) destination; - PACK_MACRO(GLuint); - if (packing->SwapBytes) { - _mesa_swap4(dst, n * comps); - } - } - break; - case GL_INT: - { - GLint *dst = (GLint *) destination; - PACK_MACRO(GLint); - if (packing->SwapBytes) { - _mesa_swap4((GLuint *) dst, n * comps); - } - } - break; - case GL_FLOAT: - { - GLfloat *dst = (GLfloat *) destination; - PACK_MACRO(GLfloat); - if (packing->SwapBytes) { - _mesa_swap4((GLuint *) dst, n * comps); - } - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - if (format == GL_RGB) { - GLubyte *dst = (GLubyte *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x7) << 5) - | ((rgba[i][GCOMP] & 0x7) << 2) - | ((rgba[i][BCOMP] & 0x3) ); - } - } - else { - GLubyte *dst = (GLubyte *) destination; - GLuint i; - ASSERT(format == GL_BGR); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x7) << 5) - | ((rgba[i][GCOMP] & 0x7) << 2) - | ((rgba[i][RCOMP] & 0x3) ); - } - } - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - if (format == GL_RGB) { - GLubyte *dst = (GLubyte *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x3) << 6) - | ((rgba[i][GCOMP] & 0x7) << 3) - | ((rgba[i][BCOMP] & 0x7) ); - } - } - else { - GLubyte *dst = (GLubyte *) destination; - GLuint i; - ASSERT(format == GL_BGR); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x3) << 6) - | ((rgba[i][GCOMP] & 0x7) << 3) - | ((rgba[i][RCOMP] & 0x7) ); - } - } - break; - case GL_UNSIGNED_SHORT_5_6_5: - if (format == GL_RGB) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x3f) << 5) - | ((rgba[i][BCOMP] & 0x1f) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_BGR); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x3f) << 5) - | ((rgba[i][RCOMP] & 0x1f) ); - } - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - if (format == GL_RGB) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x3f) << 5) - | ((rgba[i][RCOMP] & 0x1f) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_BGR); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x3f) << 5) - | ((rgba[i][BCOMP] & 0x1f) ); - } - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - if (format == GL_RGBA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0xf) << 12) - | ((rgba[i][GCOMP] & 0xf) << 8) - | ((rgba[i][BCOMP] & 0xf) << 4) - | ((rgba[i][ACOMP] & 0xf) ); - } - } - else if (format == GL_BGRA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0xf) << 12) - | ((rgba[i][GCOMP] & 0xf) << 8) - | ((rgba[i][RCOMP] & 0xf) << 4) - | ((rgba[i][ACOMP] & 0xf) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xf) << 12) - | ((rgba[i][BCOMP] & 0xf) << 8) - | ((rgba[i][GCOMP] & 0xf) << 4) - | ((rgba[i][RCOMP] & 0xf) ); - } - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - if (format == GL_RGBA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xf) << 12) - | ((rgba[i][BCOMP] & 0xf) << 8) - | ((rgba[i][GCOMP] & 0xf) << 4) - | ((rgba[i][RCOMP] & 0xf) ); - } - } - else if (format == GL_BGRA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xf) << 12) - | ((rgba[i][RCOMP] & 0xf) << 8) - | ((rgba[i][GCOMP] & 0xf) << 4) - | ((rgba[i][BCOMP] & 0xf) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0xf) << 12) - | ((rgba[i][GCOMP] & 0xf) << 8) - | ((rgba[i][BCOMP] & 0xf) << 4) - | ((rgba[i][ACOMP] & 0xf) ); - } - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - if (format == GL_RGBA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x1f) << 6) - | ((rgba[i][BCOMP] & 0x1f) << 1) - | ((rgba[i][ACOMP] & 0x1) ); - } - } - else if (format == GL_BGRA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x1f) << 6) - | ((rgba[i][RCOMP] & 0x1f) << 1) - | ((rgba[i][ACOMP] & 0x1) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x1f) << 11) - | ((rgba[i][BCOMP] & 0x1f) << 6) - | ((rgba[i][GCOMP] & 0x1f) << 1) - | ((rgba[i][RCOMP] & 0x1) ); - } - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - if (format == GL_RGBA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x1f) << 11) - | ((rgba[i][BCOMP] & 0x1f) << 6) - | ((rgba[i][GCOMP] & 0x1f) << 1) - | ((rgba[i][RCOMP] & 0x1) ); - } - } - else if (format == GL_BGRA) { - GLushort *dst = (GLushort *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x1f) << 11) - | ((rgba[i][RCOMP] & 0x1f) << 6) - | ((rgba[i][GCOMP] & 0x1f) << 1) - | ((rgba[i][BCOMP] & 0x1) ); - } - } - else { - GLushort *dst = (GLushort *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x1f) << 11) - | ((rgba[i][GCOMP] & 0x1f) << 6) - | ((rgba[i][BCOMP] & 0x1f) << 1) - | ((rgba[i][ACOMP] & 0x1) ); - } - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - if (format == GL_RGBA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0xff) << 24) - | ((rgba[i][GCOMP] & 0xff) << 16) - | ((rgba[i][BCOMP] & 0xff) << 8) - | ((rgba[i][ACOMP] & 0xff) ); - } - } - else if (format == GL_BGRA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0xff) << 24) - | ((rgba[i][GCOMP] & 0xff) << 16) - | ((rgba[i][RCOMP] & 0xff) << 8) - | ((rgba[i][ACOMP] & 0xff) ); - } - } - else { - GLuint *dst = (GLuint *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xff) << 24) - | ((rgba[i][BCOMP] & 0xff) << 16) - | ((rgba[i][GCOMP] & 0xff) << 8) - | ((rgba[i][RCOMP] & 0xff) ); - } - } - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - if (format == GL_RGBA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xff) << 24) - | ((rgba[i][BCOMP] & 0xff) << 16) - | ((rgba[i][GCOMP] & 0xff) << 8) - | ((rgba[i][RCOMP] & 0xff) ); - } - } - else if (format == GL_BGRA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0xff) << 24) - | ((rgba[i][RCOMP] & 0xff) << 16) - | ((rgba[i][GCOMP] & 0xff) << 8) - | ((rgba[i][BCOMP] & 0xff) ); - } - } - else { - GLuint *dst = (GLuint *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0xff) << 24) - | ((rgba[i][GCOMP] & 0xff) << 16) - | ((rgba[i][BCOMP] & 0xff) << 8) - | ((rgba[i][ACOMP] & 0xff) ); - } - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - if (format == GL_RGBA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x3ff) << 22) - | ((rgba[i][GCOMP] & 0x3ff) << 12) - | ((rgba[i][BCOMP] & 0x3ff) << 2) - | ((rgba[i][ACOMP] & 0x3) ); - } - } - else if (format == GL_BGRA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][BCOMP] & 0x3ff) << 22) - | ((rgba[i][GCOMP] & 0x3ff) << 12) - | ((rgba[i][RCOMP] & 0x3ff) << 2) - | ((rgba[i][ACOMP] & 0x3) ); - } - } - else { - GLuint *dst = (GLuint *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x3ff) << 22) - | ((rgba[i][BCOMP] & 0x3ff) << 12) - | ((rgba[i][GCOMP] & 0x3ff) << 2) - | ((rgba[i][RCOMP] & 0x3) ); - } - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - if (format == GL_RGBA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x3ff) << 22) - | ((rgba[i][BCOMP] & 0x3ff) << 12) - | ((rgba[i][GCOMP] & 0x3ff) << 2) - | ((rgba[i][RCOMP] & 0x3) ); - } - } - else if (format == GL_BGRA) { - GLuint *dst = (GLuint *) destination; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][ACOMP] & 0x3ff) << 22) - | ((rgba[i][RCOMP] & 0x3ff) << 12) - | ((rgba[i][GCOMP] & 0x3ff) << 2) - | ((rgba[i][BCOMP] & 0x3) ); - } - } - else { - GLuint *dst = (GLuint *) destination; - GLuint i; - ASSERT(format == GL_ABGR_EXT); - for (i = 0; i < n; i++) { - dst[i] = ((rgba[i][RCOMP] & 0x3ff) << 22) - | ((rgba[i][GCOMP] & 0x3ff) << 12) - | ((rgba[i][BCOMP] & 0x3ff) << 2) - | ((rgba[i][ACOMP] & 0x3) ); - } - } - break; - default: - _mesa_problem(ctx, "Bad type in pack_histogram"); - } - -#undef PACK_MACRO -} - - -/* - * Given an internalFormat token passed to glHistogram or glMinMax, - * return the corresponding base format. - * Return -1 if invalid token. - */ -static GLint -base_histogram_format( GLenum format ) -{ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return GL_ALPHA; - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return GL_LUMINANCE_ALPHA; - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return GL_RGB; - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_RGBA; - default: - return -1; /* error */ - } -} - - -void -_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax"); - return; - } - - if (target != GL_MINMAX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmax(target)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax(format or type)"); - return; - } - - if (type != GL_UNSIGNED_BYTE && - type != GL_BYTE && - type != GL_UNSIGNED_SHORT && - type != GL_SHORT && - type != GL_UNSIGNED_INT && - type != GL_INT && - type != GL_FLOAT && - type != GL_UNSIGNED_BYTE_3_3_2 && - type != GL_UNSIGNED_BYTE_2_3_3_REV && - type != GL_UNSIGNED_SHORT_5_6_5 && - type != GL_UNSIGNED_SHORT_5_6_5_REV && - type != GL_UNSIGNED_SHORT_4_4_4_4 && - type != GL_UNSIGNED_SHORT_4_4_4_4_REV && - type != GL_UNSIGNED_SHORT_5_5_5_1 && - type != GL_UNSIGNED_SHORT_1_5_5_5_REV && - type != GL_UNSIGNED_INT_8_8_8_8 && - type != GL_UNSIGNED_INT_8_8_8_8_REV && - type != GL_UNSIGNED_INT_10_10_10_2 && - type != GL_UNSIGNED_INT_2_10_10_10_REV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmax(type)"); - return; - } - - if (!values) - return; - - { - GLfloat minmax[2][4]; - minmax[0][RCOMP] = CLAMP(ctx->MinMax.Min[RCOMP], 0.0F, 1.0F); - minmax[0][GCOMP] = CLAMP(ctx->MinMax.Min[GCOMP], 0.0F, 1.0F); - minmax[0][BCOMP] = CLAMP(ctx->MinMax.Min[BCOMP], 0.0F, 1.0F); - minmax[0][ACOMP] = CLAMP(ctx->MinMax.Min[ACOMP], 0.0F, 1.0F); - minmax[1][RCOMP] = CLAMP(ctx->MinMax.Max[RCOMP], 0.0F, 1.0F); - minmax[1][GCOMP] = CLAMP(ctx->MinMax.Max[GCOMP], 0.0F, 1.0F); - minmax[1][BCOMP] = CLAMP(ctx->MinMax.Max[BCOMP], 0.0F, 1.0F); - minmax[1][ACOMP] = CLAMP(ctx->MinMax.Max[ACOMP], 0.0F, 1.0F); - _mesa_pack_float_rgba_span(ctx, 2, (CONST GLfloat (*)[4]) minmax, - format, type, values, &ctx->Pack, 0); - } - - if (reset) { - _mesa_ResetMinmax(GL_MINMAX); - } -} - - -void -_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram"); - return; - } - - if (target != GL_HISTOGRAM) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogram(target)"); - return; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram(format or type)"); - return; - } - - if (type != GL_UNSIGNED_BYTE && - type != GL_BYTE && - type != GL_UNSIGNED_SHORT && - type != GL_SHORT && - type != GL_UNSIGNED_INT && - type != GL_INT && - type != GL_FLOAT && - type != GL_UNSIGNED_BYTE_3_3_2 && - type != GL_UNSIGNED_BYTE_2_3_3_REV && - type != GL_UNSIGNED_SHORT_5_6_5 && - type != GL_UNSIGNED_SHORT_5_6_5_REV && - type != GL_UNSIGNED_SHORT_4_4_4_4 && - type != GL_UNSIGNED_SHORT_4_4_4_4_REV && - type != GL_UNSIGNED_SHORT_5_5_5_1 && - type != GL_UNSIGNED_SHORT_1_5_5_5_REV && - type != GL_UNSIGNED_INT_8_8_8_8 && - type != GL_UNSIGNED_INT_8_8_8_8_REV && - type != GL_UNSIGNED_INT_10_10_10_2 && - type != GL_UNSIGNED_INT_2_10_10_10_REV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogram(type)"); - return; - } - - if (!values) - return; - - pack_histogram(ctx, ctx->Histogram.Width, - (CONST GLuint (*)[4]) ctx->Histogram.Count, - format, type, values, &ctx->Pack); - - if (reset) { - GLuint i; - for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) { - ctx->Histogram.Count[i][0] = 0; - ctx->Histogram.Count[i][1] = 0; - ctx->Histogram.Count[i][2] = 0; - ctx->Histogram.Count[i][3] = 0; - } - } -} - - -void -_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameterfv"); - return; - } - - if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(target)"); - return; - } - - switch (pname) { - case GL_HISTOGRAM_WIDTH: - *params = (GLfloat) ctx->Histogram.Width; - break; - case GL_HISTOGRAM_FORMAT: - *params = (GLfloat) ctx->Histogram.Format; - break; - case GL_HISTOGRAM_RED_SIZE: - *params = (GLfloat) ctx->Histogram.RedSize; - break; - case GL_HISTOGRAM_GREEN_SIZE: - *params = (GLfloat) ctx->Histogram.GreenSize; - break; - case GL_HISTOGRAM_BLUE_SIZE: - *params = (GLfloat) ctx->Histogram.BlueSize; - break; - case GL_HISTOGRAM_ALPHA_SIZE: - *params = (GLfloat) ctx->Histogram.AlphaSize; - break; - case GL_HISTOGRAM_LUMINANCE_SIZE: - *params = (GLfloat) ctx->Histogram.LuminanceSize; - break; - case GL_HISTOGRAM_SINK: - *params = (GLfloat) ctx->Histogram.Sink; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameterfv(pname)"); - } -} - - -void -_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameteriv"); - return; - } - - if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(target)"); - return; - } - - switch (pname) { - case GL_HISTOGRAM_WIDTH: - *params = (GLint) ctx->Histogram.Width; - break; - case GL_HISTOGRAM_FORMAT: - *params = (GLint) ctx->Histogram.Format; - break; - case GL_HISTOGRAM_RED_SIZE: - *params = (GLint) ctx->Histogram.RedSize; - break; - case GL_HISTOGRAM_GREEN_SIZE: - *params = (GLint) ctx->Histogram.GreenSize; - break; - case GL_HISTOGRAM_BLUE_SIZE: - *params = (GLint) ctx->Histogram.BlueSize; - break; - case GL_HISTOGRAM_ALPHA_SIZE: - *params = (GLint) ctx->Histogram.AlphaSize; - break; - case GL_HISTOGRAM_LUMINANCE_SIZE: - *params = (GLint) ctx->Histogram.LuminanceSize; - break; - case GL_HISTOGRAM_SINK: - *params = (GLint) ctx->Histogram.Sink; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHistogramParameteriv(pname)"); - } -} - - -void -_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameterfv"); - return; - } - if (target != GL_MINMAX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameterfv(target)"); - return; - } - if (pname == GL_MINMAX_FORMAT) { - *params = (GLfloat) ctx->MinMax.Format; - } - else if (pname == GL_MINMAX_SINK) { - *params = (GLfloat) ctx->MinMax.Sink; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameterfv(pname)"); - } -} - - -void -_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameteriv"); - return; - } - if (target != GL_MINMAX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinmaxParameteriv(target)"); - return; - } - if (pname == GL_MINMAX_FORMAT) { - *params = (GLint) ctx->MinMax.Format; - } - else if (pname == GL_MINMAX_SINK) { - *params = (GLint) ctx->MinMax.Sink; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetMinMaxParameteriv(pname)"); - } -} - - -void -_mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink) -{ - GLuint i; - GLboolean error = GL_FALSE; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */ - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glHistogram"); - return; - } - - if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) { - _mesa_error(ctx, GL_INVALID_ENUM, "glHistogram(target)"); - return; - } - - if (width < 0 || width > HISTOGRAM_TABLE_SIZE) { - if (target == GL_PROXY_HISTOGRAM) { - error = GL_TRUE; - } - else { - if (width < 0) - _mesa_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); - else - _mesa_error(ctx, GL_TABLE_TOO_LARGE, "glHistogram(width)"); - return; - } - } - - if (width != 0 && _mesa_bitcount(width) != 1) { - if (target == GL_PROXY_HISTOGRAM) { - error = GL_TRUE; - } - else { - _mesa_error(ctx, GL_INVALID_VALUE, "glHistogram(width)"); - return; - } - } - - if (base_histogram_format(internalFormat) < 0) { - if (target == GL_PROXY_HISTOGRAM) { - error = GL_TRUE; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glHistogram(internalFormat)"); - return; - } - } - - /* reset histograms */ - for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) { - ctx->Histogram.Count[i][0] = 0; - ctx->Histogram.Count[i][1] = 0; - ctx->Histogram.Count[i][2] = 0; - ctx->Histogram.Count[i][3] = 0; - } - - if (error) { - ctx->Histogram.Width = 0; - ctx->Histogram.Format = 0; - ctx->Histogram.RedSize = 0; - ctx->Histogram.GreenSize = 0; - ctx->Histogram.BlueSize = 0; - ctx->Histogram.AlphaSize = 0; - ctx->Histogram.LuminanceSize = 0; - } - else { - ctx->Histogram.Width = width; - ctx->Histogram.Format = internalFormat; - ctx->Histogram.Sink = sink; - ctx->Histogram.RedSize = 8 * sizeof(GLuint); - ctx->Histogram.GreenSize = 8 * sizeof(GLuint); - ctx->Histogram.BlueSize = 8 * sizeof(GLuint); - ctx->Histogram.AlphaSize = 8 * sizeof(GLuint); - ctx->Histogram.LuminanceSize = 8 * sizeof(GLuint); - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glMinmax"); - return; - } - - if (target != GL_MINMAX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(target)"); - return; - } - - if (base_histogram_format(internalFormat) < 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)"); - return; - } - - if (ctx->MinMax.Sink == sink) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->MinMax.Sink = sink; -} - - -void -_mesa_ResetHistogram(GLenum target) -{ - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* sideeffects */ - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glResetHistogram"); - return; - } - - if (target != GL_HISTOGRAM) { - _mesa_error(ctx, GL_INVALID_ENUM, "glResetHistogram(target)"); - return; - } - - for (i = 0; i < HISTOGRAM_TABLE_SIZE; i++) { - ctx->Histogram.Count[i][0] = 0; - ctx->Histogram.Count[i][1] = 0; - ctx->Histogram.Count[i][2] = 0; - ctx->Histogram.Count[i][3] = 0; - } - - ctx->NewState |= _NEW_PIXEL; -} - - -void -_mesa_ResetMinmax(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.EXT_histogram && !ctx->Extensions.ARB_imaging) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glResetMinmax"); - return; - } - - if (target != GL_MINMAX) { - _mesa_error(ctx, GL_INVALID_ENUM, "glResetMinMax(target)"); - return; - } - - ctx->MinMax.Min[RCOMP] = 1000; ctx->MinMax.Max[RCOMP] = -1000; - ctx->MinMax.Min[GCOMP] = 1000; ctx->MinMax.Max[GCOMP] = -1000; - ctx->MinMax.Min[BCOMP] = 1000; ctx->MinMax.Max[BCOMP] = -1000; - ctx->MinMax.Min[ACOMP] = 1000; ctx->MinMax.Max[ACOMP] = -1000; - ctx->NewState |= _NEW_PIXEL; -} Index: xc/extras/Mesa/src/histogram.h diff -u xc/extras/Mesa/src/histogram.h:1.3 xc/extras/Mesa/src/histogram.h:removed --- xc/extras/Mesa/src/histogram.h:1.3 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/histogram.h Wed Mar 16 21:00:30 2005 @@ -1,61 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef HISTOGRAM_H -#define HISTOGRAM_H - -#include "glheader.h" -#include "mtypes.h" - - -extern void _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values); - -extern void _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); - -extern void _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params); - -extern void _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params); - -extern void _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params); - -extern void _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params); - -extern void _mesa_Histogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); - -extern void _mesa_Minmax(GLenum target, GLenum internalformat, GLboolean sink); - -extern void _mesa_ResetHistogram(GLenum target); - -extern void _mesa_ResetMinmax(GLenum target); - -extern void -_mesa_update_minmax(GLcontext *ctx, GLuint n, const GLfloat rgba[][4]); - -extern void -_mesa_update_histogram(GLcontext *ctx, GLuint n, const GLfloat rgba[][4]); - - -#endif Index: xc/extras/Mesa/src/image.c diff -u xc/extras/Mesa/src/image.c:1.19 xc/extras/Mesa/src/image.c:removed --- xc/extras/Mesa/src/image.c:1.19 Sun Sep 28 15:16:56 2003 +++ xc/extras/Mesa/src/image.c Wed Mar 16 21:00:30 2005 @@ -1,3942 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "image.h" -#include "imports.h" -#include "histogram.h" -#include "macros.h" -#include "mmath.h" -#include "pixel.h" -#include "mtypes.h" - - -/* - * These are the image packing parameters for Mesa's internal images. - * That is, _mesa_unpack_image() returns image data in this format. - * When we execute image commands (glDrawPixels, glTexImage, etc) - * from within display lists we have to be sure to set the current - * unpacking params to these values! - */ -const struct gl_pixelstore_attrib _mesa_native_packing = { - 1, /* Alignment */ - 0, /* RowLength */ - 0, /* SkipPixels */ - 0, /* SkipRows */ - 0, /* ImageHeight */ - 0, /* SkipImages */ - GL_FALSE, /* SwapBytes */ - GL_FALSE, /* LsbFirst */ - GL_FALSE, /* ClientStorage */ - GL_FALSE /* Invert */ -}; - - - -/* - * Flip the 8 bits in each byte of the given array. - * - * XXX try this trick to flip bytes someday: - * v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555); - * v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333); - * v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); - */ -static void -flip_bytes( GLubyte *p, GLuint n ) -{ - register GLuint i, a, b; - - for (i=0;i> 1) | - ((b & 0x20) >> 3) | - ((b & 0x40) >> 5) | - ((b & 0x80) >> 7); - p[i] = (GLubyte) a; - } -} - - -/* - * Flip the order of the 2 bytes in each word in the given array. - */ -void -_mesa_swap2( GLushort *p, GLuint n ) -{ - register GLuint i; - - for (i=0;i> 8) | ((p[i] << 8) & 0xff00); - } -} - - - -/* - * Flip the order of the 4 bytes in each word in the given array. - */ -void -_mesa_swap4( GLuint *p, GLuint n ) -{ - register GLuint i, a, b; - - for (i=0;i> 24) - | ((b >> 8) & 0xff00) - | ((b << 8) & 0xff0000) - | ((b << 24) & 0xff000000); - p[i] = a; - } -} - - - - -/* - * Return the size, in bytes, of the given GL datatype. - * Return 0 if GL_BITMAP. - * Return -1 if invalid type enum. - */ -GLint _mesa_sizeof_type( GLenum type ) -{ - switch (type) { - case GL_BITMAP: - return 0; - case GL_UNSIGNED_BYTE: - return sizeof(GLubyte); - case GL_BYTE: - return sizeof(GLbyte); - case GL_UNSIGNED_SHORT: - return sizeof(GLushort); - case GL_SHORT: - return sizeof(GLshort); - case GL_UNSIGNED_INT: - return sizeof(GLuint); - case GL_INT: - return sizeof(GLint); - case GL_FLOAT: - return sizeof(GLfloat); - default: - return -1; - } -} - - -/* - * Same as _mesa_sizeof_packed_type() but we also accept the - * packed pixel format datatypes. - */ -GLint _mesa_sizeof_packed_type( GLenum type ) -{ - switch (type) { - case GL_BITMAP: - return 0; - case GL_UNSIGNED_BYTE: - return sizeof(GLubyte); - case GL_BYTE: - return sizeof(GLbyte); - case GL_UNSIGNED_SHORT: - return sizeof(GLushort); - case GL_SHORT: - return sizeof(GLshort); - case GL_UNSIGNED_INT: - return sizeof(GLuint); - case GL_INT: - return sizeof(GLint); - case GL_FLOAT: - return sizeof(GLfloat); - case GL_UNSIGNED_BYTE_3_3_2: - return sizeof(GLubyte); - case GL_UNSIGNED_BYTE_2_3_3_REV: - return sizeof(GLubyte); - case GL_UNSIGNED_SHORT_5_6_5: - return sizeof(GLushort); - case GL_UNSIGNED_SHORT_5_6_5_REV: - return sizeof(GLushort); - case GL_UNSIGNED_SHORT_4_4_4_4: - return sizeof(GLushort); - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - return sizeof(GLushort); - case GL_UNSIGNED_SHORT_5_5_5_1: - return sizeof(GLushort); - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - return sizeof(GLushort); - case GL_UNSIGNED_INT_8_8_8_8: - return sizeof(GLuint); - case GL_UNSIGNED_INT_8_8_8_8_REV: - return sizeof(GLuint); - case GL_UNSIGNED_INT_10_10_10_2: - return sizeof(GLuint); - case GL_UNSIGNED_INT_2_10_10_10_REV: - return sizeof(GLuint); - case GL_UNSIGNED_SHORT_8_8_MESA: - case GL_UNSIGNED_SHORT_8_8_REV_MESA: - return sizeof(GLushort); - default: - return -1; - } -} - - - -/* - * Return the number of components in a GL enum pixel type. - * Return -1 if bad format. - */ -GLint _mesa_components_in_format( GLenum format ) -{ - switch (format) { - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_INTENSITY: - return 1; - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGB: - return 3; - case GL_RGBA: - return 4; - case GL_BGR: - return 3; - case GL_BGRA: - return 4; - case GL_ABGR_EXT: - return 4; - case GL_YCBCR_MESA: - return 2; - default: - return -1; - } -} - - -/* - * Return bytes per pixel for given format and type - * Return -1 if bad format or type. - */ -GLint _mesa_bytes_per_pixel( GLenum format, GLenum type ) -{ - GLint comps = _mesa_components_in_format( format ); - if (comps < 0) - return -1; - - switch (type) { - case GL_BITMAP: - return 0; /* special case */ - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return comps * sizeof(GLubyte); - case GL_SHORT: - case GL_UNSIGNED_SHORT: - return comps * sizeof(GLshort); - case GL_INT: - case GL_UNSIGNED_INT: - return comps * sizeof(GLint); - case GL_FLOAT: - return comps * sizeof(GLfloat); - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - if (format == GL_RGB || format == GL_BGR) - return sizeof(GLubyte); - else - return -1; /* error */ - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - if (format == GL_RGB || format == GL_BGR) - return sizeof(GLushort); - else - return -1; /* error */ - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT) - return sizeof(GLushort); - else - return -1; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT) - return sizeof(GLuint); - else - return -1; - case GL_UNSIGNED_SHORT_8_8_MESA: - case GL_UNSIGNED_SHORT_8_8_REV_MESA: - if (format == GL_YCBCR_MESA) - return sizeof(GLushort); - else - return -1; - default: - return -1; - } -} - - -/* - * Test if the given pixel format and type are legal. - * Return GL_TRUE for legal, GL_FALSE for illegal. - */ -GLboolean -_mesa_is_legal_format_and_type( GLenum format, GLenum type ) -{ - switch (format) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - switch (type) { - case GL_BITMAP: - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - return GL_TRUE; - default: - return GL_FALSE; - } - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_INTENSITY: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_DEPTH_COMPONENT: - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - return GL_TRUE; - default: - return GL_FALSE; - } - case GL_RGB: - case GL_BGR: - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - return GL_TRUE; - default: - return GL_FALSE; - } - case GL_RGBA: - case GL_BGRA: - case GL_ABGR_EXT: - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return GL_TRUE; - default: - return GL_FALSE; - } - case GL_YCBCR_MESA: - if (type == GL_UNSIGNED_SHORT_8_8_MESA || - type == GL_UNSIGNED_SHORT_8_8_REV_MESA) - return GL_TRUE; - else - return GL_FALSE; - default: - ; /* fall-through */ - } - return GL_FALSE; -} - - - -/* - * Return the address of a pixel in an image (actually a volume). - * Pixel unpacking/packing parameters are observed according to 'packing'. - * Input: image - start of image data - * width, height - size of image - * format - image format - * type - pixel component type - * packing - the pixelstore attributes - * img - which image in the volume (0 for 1D or 2D images) - * row, column - location of pixel in the image - * Return: address of pixel at (image,row,column) in image or NULL if error. - */ -GLvoid * -_mesa_image_address( const struct gl_pixelstore_attrib *packing, - const GLvoid *image, GLsizei width, - GLsizei height, GLenum format, GLenum type, - GLint img, GLint row, GLint column ) -{ - GLint alignment; /* 1, 2 or 4 */ - GLint pixels_per_row; - GLint rows_per_image; - GLint skiprows; - GLint skippixels; - GLint skipimages; /* for 3-D volume images */ - GLubyte *pixel_addr; - - alignment = packing->Alignment; - if (packing->RowLength > 0) { - pixels_per_row = packing->RowLength; - } - else { - pixels_per_row = width; - } - if (packing->ImageHeight > 0) { - rows_per_image = packing->ImageHeight; - } - else { - rows_per_image = height; - } - skiprows = packing->SkipRows; - skippixels = packing->SkipPixels; - skipimages = packing->SkipImages; - - if (type==GL_BITMAP) { - /* BITMAP data */ - GLint comp_per_pixel; /* components per pixel */ - GLint bytes_per_comp; /* bytes per component */ - GLint bytes_per_row; - GLint bytes_per_image; - - /* Compute bytes per component */ - bytes_per_comp = _mesa_sizeof_packed_type( type ); - if (bytes_per_comp<0) { - return NULL; - } - - /* Compute number of components per pixel */ - comp_per_pixel = _mesa_components_in_format( format ); - if (comp_per_pixel<0 && type != GL_BITMAP) { - return NULL; - } - - bytes_per_row = alignment - * CEILING( comp_per_pixel*pixels_per_row, 8*alignment ); - - bytes_per_image = bytes_per_row * rows_per_image; - - pixel_addr = (GLubyte *) image - + (skipimages + img) * bytes_per_image - + (skiprows + row) * bytes_per_row - + (skippixels + column) / 8; - } - else { - /* Non-BITMAP data */ - GLint bytes_per_pixel, bytes_per_row, remainder, bytes_per_image; - GLint topOfImage; - - bytes_per_pixel = _mesa_bytes_per_pixel( format, type ); - - /* The pixel type and format should have been error checked earlier */ - assert(bytes_per_pixel > 0); - - bytes_per_row = pixels_per_row * bytes_per_pixel; - remainder = bytes_per_row % alignment; - if (remainder > 0) - bytes_per_row += (alignment - remainder); - - ASSERT(bytes_per_row % alignment == 0); - - bytes_per_image = bytes_per_row * rows_per_image; - - if (packing->Invert) { - /* set pixel_addr to the last row */ - topOfImage = bytes_per_row * (height - 1); - bytes_per_row = -bytes_per_row; - } - else { - topOfImage = 0; - } - - /* compute final pixel address */ - pixel_addr = (GLubyte *) image - + (skipimages + img) * bytes_per_image - + topOfImage - + (skiprows + row) * bytes_per_row - + (skippixels + column) * bytes_per_pixel; - } - - return (GLvoid *) pixel_addr; -} - - - -/* - * Compute the stride between image rows (in bytes) for the given - * pixel packing parameters and image width, format and type. - */ -GLint -_mesa_image_row_stride( const struct gl_pixelstore_attrib *packing, - GLint width, GLenum format, GLenum type ) -{ - ASSERT(packing); - if (type == GL_BITMAP) { - /* BITMAP data */ - GLint bytes; - if (packing->RowLength == 0) { - bytes = (width + 7) / 8; - } - else { - bytes = (packing->RowLength + 7) / 8; - } - if (packing->Invert) { - /* negate the bytes per row (negative row stride) */ - bytes = -bytes; - } - return bytes; - } - else { - /* Non-BITMAP data */ - const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type); - GLint bytesPerRow, remainder; - if (bytesPerPixel <= 0) - return -1; /* error */ - if (packing->RowLength == 0) { - bytesPerRow = bytesPerPixel * width; - } - else { - bytesPerRow = bytesPerPixel * packing->RowLength; - } - remainder = bytesPerRow % packing->Alignment; - if (remainder > 0) - bytesPerRow += (packing->Alignment - remainder); - if (packing->Invert) - bytesPerRow = -bytesPerRow; - return bytesPerRow; - } -} - - - -/* - * Compute the stride between images in a 3D texture (in bytes) for the given - * pixel packing parameters and image width, format and type. - */ -GLint -_mesa_image_image_stride( const struct gl_pixelstore_attrib *packing, - GLint width, GLint height, - GLenum format, GLenum type ) -{ - ASSERT(packing); - ASSERT(type != GL_BITMAP); - - { - const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type); - GLint bytesPerRow, bytesPerImage, remainder; - - if (bytesPerPixel <= 0) - return -1; /* error */ - if (packing->RowLength == 0) { - bytesPerRow = bytesPerPixel * width; - } - else { - bytesPerRow = bytesPerPixel * packing->RowLength; - } - remainder = bytesPerRow % packing->Alignment; - if (remainder > 0) - bytesPerRow += (packing->Alignment - remainder); - - if (packing->ImageHeight == 0) - bytesPerImage = bytesPerRow * height; - else - bytesPerImage = bytesPerRow * packing->ImageHeight; - - return bytesPerImage; - } -} - - - - -/* - * Unpack a 32x32 pixel polygon stipple from user memory using the - * current pixel unpack settings. - */ -void -_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32], - const struct gl_pixelstore_attrib *unpacking ) -{ - GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap( 32, 32, pattern, unpacking ); - if (ptrn) { - /* Convert pattern from GLubytes to GLuints and handle big/little - * endian differences - */ - GLubyte *p = ptrn; - GLint i; - for (i = 0; i < 32; i++) { - dest[i] = (p[0] << 24) - | (p[1] << 16) - | (p[2] << 8) - | (p[3] ); - p += 4; - } - FREE(ptrn); - } -} - - - -/* - * Pack polygon stipple into user memory given current pixel packing - * settings. - */ -void -_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest, - const struct gl_pixelstore_attrib *packing ) -{ - /* Convert pattern from GLuints to GLubytes to handle big/little - * endian differences. - */ - GLubyte ptrn[32*4]; - GLint i; - for (i = 0; i < 32; i++) { - ptrn[i * 4 + 0] = (GLubyte) ((pattern[i] >> 24) & 0xff); - ptrn[i * 4 + 1] = (GLubyte) ((pattern[i] >> 16) & 0xff); - ptrn[i * 4 + 2] = (GLubyte) ((pattern[i] >> 8 ) & 0xff); - ptrn[i * 4 + 3] = (GLubyte) ((pattern[i] ) & 0xff); - } - - _mesa_pack_bitmap(32, 32, ptrn, dest, packing); -} - - -/* - * Unpack bitmap data. Resulting data will be in most-significant-bit-first - * order with row alignment = 1 byte. - */ -GLvoid * -_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, - const struct gl_pixelstore_attrib *packing ) -{ - GLint bytes, row, width_in_bytes; - GLubyte *buffer, *dst; - - if (!pixels) - return NULL; - - /* Alloc dest storage */ - bytes = ((width + 7) / 8 * height); - buffer = (GLubyte *) MALLOC( bytes ); - if (!buffer) - return NULL; - - - width_in_bytes = CEILING( width, 8 ); - dst = buffer; - for (row = 0; row < height; row++) { - const GLubyte *src = (const GLubyte *) - _mesa_image_address(packing, pixels, width, height, - GL_COLOR_INDEX, GL_BITMAP, 0, row, 0); - if (!src) { - FREE(buffer); - return NULL; - } - - if (packing->SkipPixels == 0) { - MEMCPY( dst, src, width_in_bytes ); - if (packing->LsbFirst) { - flip_bytes( dst, width_in_bytes ); - } - } - else { - /* handling SkipPixels is a bit tricky (no pun intended!) */ - GLint i; - if (packing->LsbFirst) { - GLubyte srcMask = 1 << (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; - const GLubyte *s = src; - GLubyte *d = dst; - *d = 0; - for (i = 0; i < width; i++) { - if (*s & srcMask) { - *d |= dstMask; - } - if (srcMask == 128) { - srcMask = 1; - s++; - } - else { - srcMask = srcMask << 1; - } - if (dstMask == 1) { - dstMask = 128; - d++; - *d = 0; - } - else { - dstMask = dstMask >> 1; - } - } - } - else { - GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; - const GLubyte *s = src; - GLubyte *d = dst; - *d = 0; - for (i = 0; i < width; i++) { - if (*s & srcMask) { - *d |= dstMask; - } - if (srcMask == 1) { - srcMask = 128; - s++; - } - else { - srcMask = srcMask >> 1; - } - if (dstMask == 1) { - dstMask = 128; - d++; - *d = 0; - } - else { - dstMask = dstMask >> 1; - } - } - } - } - dst += width_in_bytes; - } - - return buffer; -} - - -/* - * Pack bitmap data. - */ -void -_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, - GLubyte *dest, const struct gl_pixelstore_attrib *packing ) -{ - GLint row, width_in_bytes; - const GLubyte *src; - - if (!source) - return; - - width_in_bytes = CEILING( width, 8 ); - src = source; - for (row = 0; row < height; row++) { - GLubyte *dst = (GLubyte *) _mesa_image_address( packing, dest, - width, height, GL_COLOR_INDEX, GL_BITMAP, 0, row, 0 ); - if (!dst) - return; - - if (packing->SkipPixels == 0) { - MEMCPY( dst, src, width_in_bytes ); - if (packing->LsbFirst) { - flip_bytes( dst, width_in_bytes ); - } - } - else { - /* handling SkipPixels is a bit tricky (no pun intended!) */ - GLint i; - if (packing->LsbFirst) { - GLubyte srcMask = 1 << (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; - const GLubyte *s = src; - GLubyte *d = dst; - *d = 0; - for (i = 0; i < width; i++) { - if (*s & srcMask) { - *d |= dstMask; - } - if (srcMask == 128) { - srcMask = 1; - s++; - } - else { - srcMask = srcMask << 1; - } - if (dstMask == 1) { - dstMask = 128; - d++; - *d = 0; - } - else { - dstMask = dstMask >> 1; - } - } - } - else { - GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7); - GLubyte dstMask = 128; - const GLubyte *s = src; - GLubyte *d = dst; - *d = 0; - for (i = 0; i < width; i++) { - if (*s & srcMask) { - *d |= dstMask; - } - if (srcMask == 1) { - srcMask = 128; - s++; - } - else { - srcMask = srcMask >> 1; - } - if (dstMask == 1) { - dstMask = 128; - d++; - *d = 0; - } - else { - dstMask = dstMask >> 1; - } - } - } - } - src += width_in_bytes; - } -} - - - -/* - * Used to pack an array [][4] of RGBA GLchan colors as specified - * by the dstFormat, dstType and dstPacking. Used by glReadPixels, - * glGetConvolutionFilter(), etc. - */ -void -_mesa_pack_float_rgba_span( GLcontext *ctx, - GLuint n, CONST GLfloat rgbaIn[][4], - GLenum dstFormat, GLenum dstType, - GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ) -{ - const GLint comps = _mesa_components_in_format(dstFormat); - GLfloat luminance[MAX_WIDTH]; - GLfloat (*rgba)[4]; - GLuint i; - - if (transferOps) { - /* make copy of incoming data */ - DEFMARRAY(GLfloat, rgbaCopy, MAX_WIDTH, 4); /* mac 32k limitation */ - CHECKARRAY(rgbaCopy, return); /* mac 32k limitation */ - - for (i = 0; i < n; i++) { - rgbaCopy[i][0] = rgbaIn[i][0]; - rgbaCopy[i][1] = rgbaIn[i][1]; - rgbaCopy[i][2] = rgbaIn[i][2]; - rgbaCopy[i][3] = rgbaIn[i][3]; - } - - rgba = (GLfloat (*)[4]) rgbaCopy; - - /* scale & bias */ - if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.RedScale, ctx->Pixel.GreenScale, - ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, - ctx->Pixel.RedBias, ctx->Pixel.GreenBias, - ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); - } - /* color map lookup */ - if (transferOps & IMAGE_MAP_COLOR_BIT) { - _mesa_map_rgba( ctx, n, rgba ); - } - /* GL_COLOR_TABLE lookup */ - if (transferOps & IMAGE_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->ColorTable, n, rgba); - } - /* convolution */ - if (transferOps & IMAGE_CONVOLUTION_BIT) { - /* this has to be done in the calling code */ - } - /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ - if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.PostConvolutionScale[RCOMP], - ctx->Pixel.PostConvolutionScale[GCOMP], - ctx->Pixel.PostConvolutionScale[BCOMP], - ctx->Pixel.PostConvolutionScale[ACOMP], - ctx->Pixel.PostConvolutionBias[RCOMP], - ctx->Pixel.PostConvolutionBias[GCOMP], - ctx->Pixel.PostConvolutionBias[BCOMP], - ctx->Pixel.PostConvolutionBias[ACOMP]); - } - /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); - } - /* color matrix transform */ - if (transferOps & IMAGE_COLOR_MATRIX_BIT) { - _mesa_transform_rgba(ctx, n, rgba); - } - /* GL_POST_COLOR_MATRIX_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba); - } - /* update histogram count */ - if (transferOps & IMAGE_HISTOGRAM_BIT) { - _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); - } - /* min/max here */ - if (transferOps & IMAGE_MIN_MAX_BIT) { - _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); - if (ctx->MinMax.Sink) { - UNDEFARRAY(rgbaCopy); /* mac 32k limitation */ - return; - } - } - UNDEFARRAY(rgbaCopy); /* mac 32k limitation */ - } - else { - /* use incoming data, not a copy */ - rgba = (GLfloat (*)[4]) rgbaIn; - } - - /* XXX clamp rgba to [0,1]? */ - - - if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) { - for (i = 0; i < n; i++) { - GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP]; -#if CHAN_TYPE == GL_FLOAT - luminance[i] = sum; -#else - luminance[i] = CLAMP(sum, 0.0F, 1.0F); -#endif - } - } - - /* - * Pack/store the pixels. Ugh! Lots of cases!!! - */ - switch (dstType) { - case GL_UNSIGNED_BYTE: - { - GLubyte *dst = (GLubyte *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - _mesa_swap2( (GLushort *) dst, n * comps); - } - } - break; - case GL_SHORT: - { - GLshort *dst = (GLshort *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - _mesa_swap2( (GLushort *) dst, n * comps ); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint *dst = (GLuint *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n * comps ); - } - } - break; - case GL_INT: - { - GLint *dst = (GLint *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n * comps ); - } - } - break; - case GL_FLOAT: - { - GLfloat *dst = (GLfloat *) dstAddr; - switch (dstFormat) { - case GL_RED: - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n * comps ); - } - } - break; - case GL_UNSIGNED_BYTE_3_3_2: - if (dstFormat == GL_RGB) { - GLubyte *dst = (GLubyte *) dstAddr; - for (i=0;iNewState & _NEW_PIXEL) == 0 || transferOps == 0); - - /* Test for optimized case first */ - if (transferOps == 0 && dstFormat == GL_RGBA && dstType == CHAN_TYPE) { - /* common simple case */ - MEMCPY(dstAddr, srcRgba, n * 4 * sizeof(GLchan)); - } - else if (transferOps == 0 && dstFormat == GL_RGB && dstType == CHAN_TYPE) { - /* common simple case */ - GLuint i; - GLchan *dest = (GLchan *) dstAddr; - for (i = 0; i < n; i++) { - dest[0] = srcRgba[i][RCOMP]; - dest[1] = srcRgba[i][GCOMP]; - dest[2] = srcRgba[i][BCOMP]; - dest += 3; - } - } - else if (transferOps == 0 && dstFormat == GL_RGBA && dstType == GL_UNSIGNED_BYTE) { - /* common simple case */ - GLuint i; - GLubyte *dest = (GLubyte *) dstAddr; - for (i = 0; i < n; i++) { - dest[0] = CHAN_TO_UBYTE(srcRgba[i][RCOMP]); - dest[1] = CHAN_TO_UBYTE(srcRgba[i][GCOMP]); - dest[2] = CHAN_TO_UBYTE(srcRgba[i][BCOMP]); - dest[3] = CHAN_TO_UBYTE(srcRgba[i][ACOMP]); - dest += 4; - } - } - else { - /* general solution */ - GLuint i; - DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */ - CHECKARRAY(rgba, return); /* mac 32k limitation */ - - assert(n <= MAX_WIDTH); - /* convert color components to floating point */ - for (i=0;iLsbFirst) { - GLubyte mask = 1 << (unpack->SkipPixels & 0x7); - GLuint i; - for (i = 0; i < n; i++) { - indexes[i] = (*ubsrc & mask) ? 1 : 0; - if (mask == 128) { - mask = 1; - ubsrc++; - } - else { - mask = mask << 1; - } - } - } - else { - GLubyte mask = 128 >> (unpack->SkipPixels & 0x7); - GLuint i; - for (i = 0; i < n; i++) { - indexes[i] = (*ubsrc & mask) ? 1 : 0; - if (mask == 1) { - mask = 128; - ubsrc++; - } - else { - mask = mask >> 1; - } - } - } - } - break; - case GL_UNSIGNED_BYTE: - { - GLuint i; - const GLubyte *s = (const GLubyte *) src; - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - break; - case GL_BYTE: - { - GLuint i; - const GLbyte *s = (const GLbyte *) src; - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - break; - case GL_UNSIGNED_SHORT: - { - GLuint i; - const GLushort *s = (const GLushort *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLushort value = s[i]; - SWAP2BYTE(value); - indexes[i] = value; - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - } - break; - case GL_SHORT: - { - GLuint i; - const GLshort *s = (const GLshort *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLshort value = s[i]; - SWAP2BYTE(value); - indexes[i] = value; - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint i; - const GLuint *s = (const GLuint *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLuint value = s[i]; - SWAP4BYTE(value); - indexes[i] = value; - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - } - break; - case GL_INT: - { - GLuint i; - const GLint *s = (const GLint *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLint value = s[i]; - SWAP4BYTE(value); - indexes[i] = value; - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i]; - } - } - break; - case GL_FLOAT: - { - GLuint i; - const GLfloat *s = (const GLfloat *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLfloat value = s[i]; - SWAP4BYTE(value); - indexes[i] = (GLuint) value; - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = (GLuint) s[i]; - } - } - break; - default: - _mesa_problem(NULL, "bad srcType in extract_uint_indexes"); - return; - } -} - - - -/* - * This function extracts floating point RGBA values from arbitrary - * image data. srcFormat and srcType are the format and type parameters - * passed to glDrawPixels, glTexImage[123]D, glTexSubImage[123]D, etc. - * - * Refering to section 3.6.4 of the OpenGL 1.2 spec, this function - * implements the "Conversion to floating point", "Conversion to RGB", - * and "Final Expansion to RGBA" operations. - * - * Args: n - number of pixels - * rgba - output colors - * srcFormat - format of incoming data - * srcType - datatype of incoming data - * src - source data pointer - * swapBytes - perform byteswapping of incoming data? - */ -static void -extract_float_rgba(GLuint n, GLfloat rgba[][4], - GLenum srcFormat, GLenum srcType, const GLvoid *src, - GLboolean swapBytes) -{ - GLint redIndex, greenIndex, blueIndex, alphaIndex; - GLint stride; - GLint rComp, bComp, gComp, aComp; - - ASSERT(srcFormat == GL_RED || - srcFormat == GL_GREEN || - srcFormat == GL_BLUE || - srcFormat == GL_ALPHA || - srcFormat == GL_LUMINANCE || - srcFormat == GL_LUMINANCE_ALPHA || - srcFormat == GL_INTENSITY || - srcFormat == GL_RGB || - srcFormat == GL_BGR || - srcFormat == GL_RGBA || - srcFormat == GL_BGRA || - srcFormat == GL_ABGR_EXT); - - ASSERT(srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_FLOAT || - srcType == GL_UNSIGNED_BYTE_3_3_2 || - srcType == GL_UNSIGNED_BYTE_2_3_3_REV || - srcType == GL_UNSIGNED_SHORT_5_6_5 || - srcType == GL_UNSIGNED_SHORT_5_6_5_REV || - srcType == GL_UNSIGNED_SHORT_4_4_4_4 || - srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV || - srcType == GL_UNSIGNED_SHORT_5_5_5_1 || - srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || - srcType == GL_UNSIGNED_INT_8_8_8_8 || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV); - - rComp = gComp = bComp = aComp = -1; - - switch (srcFormat) { - case GL_RED: - redIndex = 0; - greenIndex = blueIndex = alphaIndex = -1; - stride = 1; - break; - case GL_GREEN: - greenIndex = 0; - redIndex = blueIndex = alphaIndex = -1; - stride = 1; - break; - case GL_BLUE: - blueIndex = 0; - redIndex = greenIndex = alphaIndex = -1; - stride = 1; - break; - case GL_ALPHA: - redIndex = greenIndex = blueIndex = -1; - alphaIndex = 0; - stride = 1; - break; - case GL_LUMINANCE: - redIndex = greenIndex = blueIndex = 0; - alphaIndex = -1; - stride = 1; - break; - case GL_LUMINANCE_ALPHA: - redIndex = greenIndex = blueIndex = 0; - alphaIndex = 1; - stride = 2; - break; - case GL_INTENSITY: - redIndex = greenIndex = blueIndex = alphaIndex = 0; - stride = 1; - break; - case GL_RGB: - redIndex = 0; - greenIndex = 1; - blueIndex = 2; - alphaIndex = -1; - stride = 3; - break; - case GL_BGR: - redIndex = 2; - greenIndex = 1; - blueIndex = 0; - alphaIndex = -1; - stride = 3; - break; - case GL_RGBA: - redIndex = 0; - greenIndex = 1; - blueIndex = 2; - alphaIndex = 3; - rComp = 0; - gComp = 1; - bComp = 2; - aComp = 3; - stride = 4; - break; - case GL_BGRA: - redIndex = 2; - greenIndex = 1; - blueIndex = 0; - alphaIndex = 3; - rComp = 2; - gComp = 1; - bComp = 0; - aComp = 3; - stride = 4; - break; - case GL_ABGR_EXT: - redIndex = 3; - greenIndex = 2; - blueIndex = 1; - alphaIndex = 0; - rComp = 3; - gComp = 2; - bComp = 1; - aComp = 0; - stride = 4; - break; - default: - _mesa_problem(NULL, "bad srcFormat in extract float data"); - return; - } - - -#define PROCESS(INDEX, CHANNEL, DEFAULT, TYPE, CONVERSION) \ - if ((INDEX) < 0) { \ - GLuint i; \ - for (i = 0; i < n; i++) { \ - rgba[i][CHANNEL] = DEFAULT; \ - } \ - } \ - else if (swapBytes) { \ - const TYPE *s = (const TYPE *) src; \ - GLuint i; \ - for (i = 0; i < n; i++) { \ - TYPE value = s[INDEX]; \ - if (sizeof(TYPE) == 2) { \ - SWAP2BYTE(value); \ - } \ - else if (sizeof(TYPE) == 4) { \ - SWAP4BYTE(value); \ - } \ - rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \ - s += stride; \ - } \ - } \ - else { \ - const TYPE *s = (const TYPE *) src; \ - GLuint i; \ - for (i = 0; i < n; i++) { \ - rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \ - s += stride; \ - } \ - } - - switch (srcType) { - case GL_UNSIGNED_BYTE: - PROCESS(redIndex, RCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLubyte, UBYTE_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLubyte, UBYTE_TO_FLOAT); - break; - case GL_BYTE: - PROCESS(redIndex, RCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLbyte, BYTE_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLbyte, BYTE_TO_FLOAT); - break; - case GL_UNSIGNED_SHORT: - PROCESS(redIndex, RCOMP, 0.0F, GLushort, USHORT_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLushort, USHORT_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLushort, USHORT_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLushort, USHORT_TO_FLOAT); - break; - case GL_SHORT: - PROCESS(redIndex, RCOMP, 0.0F, GLshort, SHORT_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLshort, SHORT_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLshort, SHORT_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLshort, SHORT_TO_FLOAT); - break; - case GL_UNSIGNED_INT: - PROCESS(redIndex, RCOMP, 0.0F, GLuint, UINT_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLuint, UINT_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLuint, UINT_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLuint, UINT_TO_FLOAT); - break; - case GL_INT: - PROCESS(redIndex, RCOMP, 0.0F, GLint, INT_TO_FLOAT); - PROCESS(greenIndex, GCOMP, 0.0F, GLint, INT_TO_FLOAT); - PROCESS(blueIndex, BCOMP, 0.0F, GLint, INT_TO_FLOAT); - PROCESS(alphaIndex, ACOMP, 1.0F, GLint, INT_TO_FLOAT); - break; - case GL_FLOAT: - PROCESS(redIndex, RCOMP, 0.0F, GLfloat, (GLfloat)); - PROCESS(greenIndex, GCOMP, 0.0F, GLfloat, (GLfloat)); - PROCESS(blueIndex, BCOMP, 0.0F, GLfloat, (GLfloat)); - PROCESS(alphaIndex, ACOMP, 1.0F, GLfloat, (GLfloat)); - break; - case GL_UNSIGNED_BYTE_3_3_2: - { - const GLubyte *ubsrc = (const GLubyte *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLubyte p = ubsrc[i]; - rgba[i][RCOMP] = ((p >> 5) ) * (1.0F / 7.0F); - rgba[i][GCOMP] = ((p >> 2) & 0x7) * (1.0F / 7.0F); - rgba[i][BCOMP] = ((p ) & 0x3) * (1.0F / 3.0F); - rgba[i][ACOMP] = 1.0F; - } - } - break; - case GL_UNSIGNED_BYTE_2_3_3_REV: - { - const GLubyte *ubsrc = (const GLubyte *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLubyte p = ubsrc[i]; - rgba[i][RCOMP] = ((p ) & 0x7) * (1.0F / 7.0F); - rgba[i][GCOMP] = ((p >> 3) & 0x7) * (1.0F / 7.0F); - rgba[i][BCOMP] = ((p >> 6) ) * (1.0F / 3.0F); - rgba[i][ACOMP] = 1.0F; - } - } - break; - case GL_UNSIGNED_SHORT_5_6_5: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][RCOMP] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][GCOMP] = ((p >> 5) & 0x3f) * (1.0F / 63.0F); - rgba[i][BCOMP] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][ACOMP] = 1.0F; - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][RCOMP] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][GCOMP] = ((p >> 5) & 0x3f) * (1.0F / 63.0F); - rgba[i][BCOMP] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][ACOMP] = 1.0F; - } - } - break; - case GL_UNSIGNED_SHORT_5_6_5_REV: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][RCOMP] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][GCOMP] = ((p >> 5) & 0x3f) * (1.0F / 63.0F); - rgba[i][BCOMP] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][ACOMP] = 1.0F; - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][RCOMP] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][GCOMP] = ((p >> 5) & 0x3f) * (1.0F / 63.0F); - rgba[i][BCOMP] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][ACOMP] = 1.0F; - } - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][rComp] = ((p >> 12) ) * (1.0F / 15.0F); - rgba[i][gComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F); - rgba[i][bComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F); - rgba[i][aComp] = ((p ) & 0xf) * (1.0F / 15.0F); - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][rComp] = ((p >> 12) ) * (1.0F / 15.0F); - rgba[i][gComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F); - rgba[i][bComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F); - rgba[i][aComp] = ((p ) & 0xf) * (1.0F / 15.0F); - } - } - break; - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][rComp] = ((p ) & 0xf) * (1.0F / 15.0F); - rgba[i][gComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F); - rgba[i][bComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F); - rgba[i][aComp] = ((p >> 12) ) * (1.0F / 15.0F); - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][rComp] = ((p ) & 0xf) * (1.0F / 15.0F); - rgba[i][gComp] = ((p >> 4) & 0xf) * (1.0F / 15.0F); - rgba[i][bComp] = ((p >> 8) & 0xf) * (1.0F / 15.0F); - rgba[i][aComp] = ((p >> 12) ) * (1.0F / 15.0F); - } - } - break; - case GL_UNSIGNED_SHORT_5_5_5_1: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][gComp] = ((p >> 6) & 0x1f) * (1.0F / 31.0F); - rgba[i][bComp] = ((p >> 1) & 0x1f) * (1.0F / 31.0F); - rgba[i][aComp] = ((p ) & 0x1) * (1.0F / 1.0F); - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][rComp] = ((p >> 11) ) * (1.0F / 31.0F); - rgba[i][gComp] = ((p >> 6) & 0x1f) * (1.0F / 31.0F); - rgba[i][bComp] = ((p >> 1) & 0x1f) * (1.0F / 31.0F); - rgba[i][aComp] = ((p ) & 0x1) * (1.0F / 1.0F); - } - } - break; - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - if (swapBytes) { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - SWAP2BYTE(p); - rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][gComp] = ((p >> 5) & 0x1f) * (1.0F / 31.0F); - rgba[i][bComp] = ((p >> 10) & 0x1f) * (1.0F / 31.0F); - rgba[i][aComp] = ((p >> 15) ) * (1.0F / 1.0F); - } - } - else { - const GLushort *ussrc = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLushort p = ussrc[i]; - rgba[i][rComp] = ((p ) & 0x1f) * (1.0F / 31.0F); - rgba[i][gComp] = ((p >> 5) & 0x1f) * (1.0F / 31.0F); - rgba[i][bComp] = ((p >> 10) & 0x1f) * (1.0F / 31.0F); - rgba[i][aComp] = ((p >> 15) ) * (1.0F / 1.0F); - } - } - break; - case GL_UNSIGNED_INT_8_8_8_8: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff); - rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff); - rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff); - rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) ); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) ); - rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff); - rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff); - rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff); - } - } - break; - case GL_UNSIGNED_INT_8_8_8_8_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) ); - rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff); - rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff); - rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff); - rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff); - rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff); - rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) ); - } - } - break; - case GL_UNSIGNED_INT_10_10_10_2: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rComp] = ((p >> 22) ) * (1.0F / 1023.0F); - rgba[i][gComp] = ((p >> 12) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][bComp] = ((p >> 2) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][aComp] = ((p ) & 0x3 ) * (1.0F / 3.0F); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = ((p >> 22) ) * (1.0F / 1023.0F); - rgba[i][gComp] = ((p >> 12) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][bComp] = ((p >> 2) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][aComp] = ((p ) & 0x3 ) * (1.0F / 3.0F); - } - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rComp] = ((p ) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][gComp] = ((p >> 10) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][bComp] = ((p >> 20) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][aComp] = ((p >> 30) ) * (1.0F / 3.0F); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rComp] = ((p ) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][gComp] = ((p >> 10) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][bComp] = ((p >> 20) & 0x3ff) * (1.0F / 1023.0F); - rgba[i][aComp] = ((p >> 30) ) * (1.0F / 3.0F); - } - } - break; - default: - _mesa_problem(NULL, "bad srcType in extract float data"); - break; - } -} - - - -/* - * Unpack a row of color image data from a client buffer according to - * the pixel unpacking parameters. - * Return GLubyte values in the specified dest image format. - * This is (or will be) used by glDrawPixels and glTexImage?D(). - * Input: ctx - the context - * n - number of pixels in the span - * dstFormat - format of destination color array - * dest - the destination color array - * srcFormat - source image format - * srcType - source image datatype - * source - source image pointer - * srcPacking - pixel unpacking parameters - * transferOps - bitmask of IMAGE_*_BIT values of operations to apply - * - * XXX perhaps expand this to process whole images someday. - */ -void -_mesa_unpack_chan_color_span( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLchan dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ) -{ - ASSERT(dstFormat == GL_ALPHA || - dstFormat == GL_LUMINANCE || - dstFormat == GL_LUMINANCE_ALPHA || - dstFormat == GL_INTENSITY || - dstFormat == GL_RGB || - dstFormat == GL_RGBA || - dstFormat == GL_COLOR_INDEX); - - ASSERT(srcFormat == GL_RED || - srcFormat == GL_GREEN || - srcFormat == GL_BLUE || - srcFormat == GL_ALPHA || - srcFormat == GL_LUMINANCE || - srcFormat == GL_LUMINANCE_ALPHA || - srcFormat == GL_INTENSITY || - srcFormat == GL_RGB || - srcFormat == GL_BGR || - srcFormat == GL_RGBA || - srcFormat == GL_BGRA || - srcFormat == GL_ABGR_EXT || - srcFormat == GL_COLOR_INDEX); - - ASSERT(srcType == GL_BITMAP || - srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_FLOAT || - srcType == GL_UNSIGNED_BYTE_3_3_2 || - srcType == GL_UNSIGNED_BYTE_2_3_3_REV || - srcType == GL_UNSIGNED_SHORT_5_6_5 || - srcType == GL_UNSIGNED_SHORT_5_6_5_REV || - srcType == GL_UNSIGNED_SHORT_4_4_4_4 || - srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV || - srcType == GL_UNSIGNED_SHORT_5_5_5_1 || - srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || - srcType == GL_UNSIGNED_INT_8_8_8_8 || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV); - - /* Try simple cases first */ - if (transferOps == 0 ){ - if (srcType == CHAN_TYPE) { - if (dstFormat == GL_RGBA) { - if (srcFormat == GL_RGBA) { - MEMCPY( dest, source, n * 4 * sizeof(GLchan) ); - return; - } - else if (srcFormat == GL_RGB) { - GLuint i; - const GLchan *src = (const GLchan *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; - dst[3] = CHAN_MAX; - src += 3; - dst += 4; - } - return; - } - } - else if (dstFormat == GL_RGB) { - if (srcFormat == GL_RGB) { - MEMCPY( dest, source, n * 3 * sizeof(GLchan) ); - return; - } - else if (srcFormat == GL_RGBA) { - GLuint i; - const GLchan *src = (const GLchan *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; - src += 4; - dst += 3; - } - return; - } - } - else if (dstFormat == srcFormat) { - GLint comps = _mesa_components_in_format(srcFormat); - assert(comps > 0); - MEMCPY( dest, source, n * comps * sizeof(GLchan) ); - return; - } - } - /* - * Common situation, loading 8bit RGBA/RGB source images - * into 16/32 bit destination. (OSMesa16/32) - */ - else if (srcType == GL_UNSIGNED_BYTE) { - if (dstFormat == GL_RGBA) { - if (srcFormat == GL_RGB) { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = UBYTE_TO_CHAN(src[0]); - dst[1] = UBYTE_TO_CHAN(src[1]); - dst[2] = UBYTE_TO_CHAN(src[2]); - dst[3] = CHAN_MAX; - src += 3; - dst += 4; - } - return; - } - else if (srcFormat == GL_RGBA) { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = UBYTE_TO_CHAN(src[0]); - dst[1] = UBYTE_TO_CHAN(src[1]); - dst[2] = UBYTE_TO_CHAN(src[2]); - dst[3] = UBYTE_TO_CHAN(src[3]); - src += 4; - dst += 4; - } - return; - } - } - else if (dstFormat == GL_RGB) { - if (srcFormat == GL_RGB) { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = UBYTE_TO_CHAN(src[0]); - dst[1] = UBYTE_TO_CHAN(src[1]); - dst[2] = UBYTE_TO_CHAN(src[2]); - src += 3; - dst += 3; - } - return; - } - else if (srcFormat == GL_RGBA) { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - GLchan *dst = dest; - for (i = 0; i < n; i++) { - dst[0] = UBYTE_TO_CHAN(src[0]); - dst[1] = UBYTE_TO_CHAN(src[1]); - dst[2] = UBYTE_TO_CHAN(src[2]); - src += 4; - dst += 3; - } - return; - } - } - } - } - - - /* general solution begins here */ - { - GLint dstComponents; - GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex; - GLint dstLuminanceIndex, dstIntensityIndex; - DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */ - CHECKARRAY(rgba, return); /* mac 32k limitation */ - - dstComponents = _mesa_components_in_format( dstFormat ); - /* source & dest image formats should have been error checked by now */ - assert(dstComponents > 0); - - /* - * Extract image data and convert to RGBA floats - */ - assert(n <= MAX_WIDTH); - if (srcFormat == GL_COLOR_INDEX) { - GLuint indexes[MAX_WIDTH]; - extract_uint_indexes(n, indexes, srcFormat, srcType, source, - srcPacking); - - if (dstFormat == GL_COLOR_INDEX - && (transferOps & IMAGE_MAP_COLOR_BIT)) { - _mesa_map_ci(ctx, n, indexes); - } - if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { - _mesa_shift_and_offset_ci(ctx, n, indexes); - } - - if (dstFormat == GL_COLOR_INDEX) { - /* convert to GLchan and return */ - GLuint i; - for (i = 0; i < n; i++) { - dest[i] = (GLchan) (indexes[i] & 0xff); - } - UNDEFARRAY(rgba); /* mac 32k limitation */ - return; - } - else { - /* Convert indexes to RGBA */ - _mesa_map_ci_to_rgba(ctx, n, indexes, rgba); - } - } - else { - extract_float_rgba(n, rgba, srcFormat, srcType, source, - srcPacking->SwapBytes); - - /* scale and bias colors */ - if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.RedScale, ctx->Pixel.GreenScale, - ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, - ctx->Pixel.RedBias, ctx->Pixel.GreenBias, - ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); - } - /* color map lookup */ - if (transferOps & IMAGE_MAP_COLOR_BIT) { - _mesa_map_rgba(ctx, n, rgba); - } - } - - if (transferOps) { - /* GL_COLOR_TABLE lookup */ - if (transferOps & IMAGE_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->ColorTable, n, rgba); - } - /* convolution */ - if (transferOps & IMAGE_CONVOLUTION_BIT) { - /* this has to be done in the calling code */ - } - /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ - if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.PostConvolutionScale[RCOMP], - ctx->Pixel.PostConvolutionScale[GCOMP], - ctx->Pixel.PostConvolutionScale[BCOMP], - ctx->Pixel.PostConvolutionScale[ACOMP], - ctx->Pixel.PostConvolutionBias[RCOMP], - ctx->Pixel.PostConvolutionBias[GCOMP], - ctx->Pixel.PostConvolutionBias[BCOMP], - ctx->Pixel.PostConvolutionBias[ACOMP]); - } - /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); - } - /* color matrix transform */ - if (transferOps & IMAGE_COLOR_MATRIX_BIT) { - _mesa_transform_rgba(ctx, n, rgba); - } - /* GL_POST_COLOR_MATRIX_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba); - } - /* update histogram count */ - if (transferOps & IMAGE_HISTOGRAM_BIT) { - _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); - } - /* min/max here */ - if (transferOps & IMAGE_MIN_MAX_BIT) { - _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); - } - } - - /* clamp to [0,1] */ -#if CHAN_TYPE != GL_FLOAT - { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); - rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); - rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); - rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); - } - } -#endif - - /* Now determine which color channels we need to produce. - * And determine the dest index (offset) within each color tuple. - */ - switch (dstFormat) { - case GL_ALPHA: - dstAlphaIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = -1; - dstLuminanceIndex = dstIntensityIndex = -1; - break; - case GL_LUMINANCE: - dstLuminanceIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1; - dstIntensityIndex = -1; - break; - case GL_LUMINANCE_ALPHA: - dstLuminanceIndex = 0; - dstAlphaIndex = 1; - dstRedIndex = dstGreenIndex = dstBlueIndex = -1; - dstIntensityIndex = -1; - break; - case GL_INTENSITY: - dstIntensityIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1; - dstLuminanceIndex = -1; - break; - case GL_RGB: - dstRedIndex = 0; - dstGreenIndex = 1; - dstBlueIndex = 2; - dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1; - break; - case GL_RGBA: - dstRedIndex = 0; - dstGreenIndex = 1; - dstBlueIndex = 2; - dstAlphaIndex = 3; - dstLuminanceIndex = dstIntensityIndex = -1; - break; - default: - _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()"); - UNDEFARRAY(rgba); /* mac 32k limitation */ - return; - } - - - /* Now return the GLchan data in the requested dstFormat */ - - if (dstRedIndex >= 0) { - GLchan *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - CLAMPED_FLOAT_TO_CHAN(dst[dstRedIndex], rgba[i][RCOMP]); - dst += dstComponents; - } - } - - if (dstGreenIndex >= 0) { - GLchan *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - CLAMPED_FLOAT_TO_CHAN(dst[dstGreenIndex], rgba[i][GCOMP]); - dst += dstComponents; - } - } - - if (dstBlueIndex >= 0) { - GLchan *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - CLAMPED_FLOAT_TO_CHAN(dst[dstBlueIndex], rgba[i][BCOMP]); - dst += dstComponents; - } - } - - if (dstAlphaIndex >= 0) { - GLchan *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - CLAMPED_FLOAT_TO_CHAN(dst[dstAlphaIndex], rgba[i][ACOMP]); - dst += dstComponents; - } - } - - if (dstIntensityIndex >= 0) { - GLchan *dst = dest; - GLuint i; - assert(dstIntensityIndex == 0); - assert(dstComponents == 1); - for (i = 0; i < n; i++) { - /* Intensity comes from red channel */ - CLAMPED_FLOAT_TO_CHAN(dst[i], rgba[i][RCOMP]); - } - } - - if (dstLuminanceIndex >= 0) { - GLchan *dst = dest; - GLuint i; - assert(dstLuminanceIndex == 0); - for (i = 0; i < n; i++) { - /* Luminance comes from red channel */ - CLAMPED_FLOAT_TO_CHAN(dst[0], rgba[i][RCOMP]); - dst += dstComponents; - } - } - UNDEFARRAY(rgba); /* mac 32k limitation */ - } -} - - -void -_mesa_unpack_float_color_span( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLfloat dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps, GLboolean clamp ) -{ - ASSERT(dstFormat == GL_ALPHA || - dstFormat == GL_LUMINANCE || - dstFormat == GL_LUMINANCE_ALPHA || - dstFormat == GL_INTENSITY || - dstFormat == GL_RGB || - dstFormat == GL_RGBA || - dstFormat == GL_COLOR_INDEX); - - ASSERT(srcFormat == GL_RED || - srcFormat == GL_GREEN || - srcFormat == GL_BLUE || - srcFormat == GL_ALPHA || - srcFormat == GL_LUMINANCE || - srcFormat == GL_LUMINANCE_ALPHA || - srcFormat == GL_INTENSITY || - srcFormat == GL_RGB || - srcFormat == GL_BGR || - srcFormat == GL_RGBA || - srcFormat == GL_BGRA || - srcFormat == GL_ABGR_EXT || - srcFormat == GL_COLOR_INDEX); - - ASSERT(srcType == GL_BITMAP || - srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_FLOAT || - srcType == GL_UNSIGNED_BYTE_3_3_2 || - srcType == GL_UNSIGNED_BYTE_2_3_3_REV || - srcType == GL_UNSIGNED_SHORT_5_6_5 || - srcType == GL_UNSIGNED_SHORT_5_6_5_REV || - srcType == GL_UNSIGNED_SHORT_4_4_4_4 || - srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV || - srcType == GL_UNSIGNED_SHORT_5_5_5_1 || - srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || - srcType == GL_UNSIGNED_INT_8_8_8_8 || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV); - - /* general solution, no special cases, yet */ - { - GLint dstComponents; - GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex; - GLint dstLuminanceIndex, dstIntensityIndex; - DEFMARRAY(GLfloat, rgba, MAX_WIDTH, 4); /* mac 32k limitation */ - CHECKARRAY(rgba, return); /* mac 32k limitation */ - - dstComponents = _mesa_components_in_format( dstFormat ); - /* source & dest image formats should have been error checked by now */ - assert(dstComponents > 0); - - /* - * Extract image data and convert to RGBA floats - */ - assert(n <= MAX_WIDTH); - if (srcFormat == GL_COLOR_INDEX) { - GLuint indexes[MAX_WIDTH]; - extract_uint_indexes(n, indexes, srcFormat, srcType, source, - srcPacking); - - if (dstFormat == GL_COLOR_INDEX - && (transferOps & IMAGE_MAP_COLOR_BIT)) { - _mesa_map_ci(ctx, n, indexes); - } - if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { - _mesa_shift_and_offset_ci(ctx, n, indexes); - } - - if (dstFormat == GL_COLOR_INDEX) { - /* convert to GLchan and return */ - GLuint i; - for (i = 0; i < n; i++) { - dest[i] = (GLchan) (indexes[i] & 0xff); - } - UNDEFARRAY(rgba); /* mac 32k limitation */ - return; - } - else { - /* Convert indexes to RGBA */ - _mesa_map_ci_to_rgba(ctx, n, indexes, rgba); - } - } - else { - extract_float_rgba(n, rgba, srcFormat, srcType, source, - srcPacking->SwapBytes); - - /* scale and bias colors */ - if (transferOps & IMAGE_SCALE_BIAS_BIT) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.RedScale, ctx->Pixel.GreenScale, - ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale, - ctx->Pixel.RedBias, ctx->Pixel.GreenBias, - ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias); - } - /* color map lookup */ - if (transferOps & IMAGE_MAP_COLOR_BIT) { - _mesa_map_rgba(ctx, n, rgba); - } - } - - if (transferOps) { - /* GL_COLOR_TABLE lookup */ - if (transferOps & IMAGE_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->ColorTable, n, rgba); - } - /* convolution */ - if (transferOps & IMAGE_CONVOLUTION_BIT) { - /* XXX to do */ - } - /* GL_POST_CONVOLUTION_RED/GREEN/BLUE/ALPHA_SCALE/BIAS */ - if (transferOps & IMAGE_POST_CONVOLUTION_SCALE_BIAS) { - _mesa_scale_and_bias_rgba(ctx, n, rgba, - ctx->Pixel.PostConvolutionScale[RCOMP], - ctx->Pixel.PostConvolutionScale[GCOMP], - ctx->Pixel.PostConvolutionScale[BCOMP], - ctx->Pixel.PostConvolutionScale[ACOMP], - ctx->Pixel.PostConvolutionBias[RCOMP], - ctx->Pixel.PostConvolutionBias[GCOMP], - ctx->Pixel.PostConvolutionBias[BCOMP], - ctx->Pixel.PostConvolutionBias[ACOMP]); - } - /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostConvolutionColorTable, n, rgba); - } - /* color matrix transform */ - if (transferOps & IMAGE_COLOR_MATRIX_BIT) { - _mesa_transform_rgba(ctx, n, rgba); - } - /* GL_POST_COLOR_MATRIX_COLOR_TABLE lookup */ - if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) { - _mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba); - } - /* update histogram count */ - if (transferOps & IMAGE_HISTOGRAM_BIT) { - _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); - } - /* min/max here */ - if (transferOps & IMAGE_MIN_MAX_BIT) { - _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); - } - } - - /* clamp to [0,1] */ -#if CHAN_TYPE != GL_FLOAT - if (clamp) { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); - rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); - rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); - rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); - } - } -#endif - - /* Now determine which color channels we need to produce. - * And determine the dest index (offset) within each color tuple. - */ - switch (dstFormat) { - case GL_ALPHA: - dstAlphaIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = -1; - dstLuminanceIndex = dstIntensityIndex = -1; - break; - case GL_LUMINANCE: - dstLuminanceIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1; - dstIntensityIndex = -1; - break; - case GL_LUMINANCE_ALPHA: - dstLuminanceIndex = 0; - dstAlphaIndex = 1; - dstRedIndex = dstGreenIndex = dstBlueIndex = -1; - dstIntensityIndex = -1; - break; - case GL_INTENSITY: - dstIntensityIndex = 0; - dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1; - dstLuminanceIndex = -1; - break; - case GL_RGB: - dstRedIndex = 0; - dstGreenIndex = 1; - dstBlueIndex = 2; - dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1; - break; - case GL_RGBA: - dstRedIndex = 0; - dstGreenIndex = 1; - dstBlueIndex = 2; - dstAlphaIndex = 3; - dstLuminanceIndex = dstIntensityIndex = -1; - break; - default: - _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_float_color_span()"); - UNDEFARRAY(rgba); /* mac 32k limitation */ - return; - } - - /* Now pack results in the requested dstFormat */ - if (dstRedIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[dstRedIndex] = rgba[i][RCOMP]; - dst += dstComponents; - } - } - - if (dstGreenIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[dstGreenIndex] = rgba[i][GCOMP]; - dst += dstComponents; - } - } - - if (dstBlueIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[dstBlueIndex] = rgba[i][BCOMP]; - dst += dstComponents; - } - } - - if (dstAlphaIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[dstAlphaIndex] = rgba[i][ACOMP]; - dst += dstComponents; - } - } - - if (dstIntensityIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - assert(dstIntensityIndex == 0); - assert(dstComponents == 1); - for (i = 0; i < n; i++) { - /* Intensity comes from red channel */ - dst[i] = rgba[i][RCOMP]; - } - } - - if (dstLuminanceIndex >= 0) { - GLfloat *dst = dest; - GLuint i; - assert(dstLuminanceIndex == 0); - for (i = 0; i < n; i++) { - /* Luminance comes from red channel */ - dst[0] = rgba[i][RCOMP]; - dst += dstComponents; - } - } - UNDEFARRAY(rgba); /* mac 32k limitation */ - } -} - - - - -/* - * Unpack a row of color index data from a client buffer according to - * the pixel unpacking parameters. - * This is (or will be) used by glDrawPixels, glTexImage[123]D, etc. - * - * Args: ctx - the context - * n - number of pixels - * dstType - destination datatype - * dest - destination array - * srcType - source pixel type - * source - source data pointer - * srcPacking - pixel unpacking parameters - * transferOps - the pixel transfer operations to apply - */ -void -_mesa_unpack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ) -{ - ASSERT(srcType == GL_BITMAP || - srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_FLOAT); - - ASSERT(dstType == GL_UNSIGNED_BYTE || - dstType == GL_UNSIGNED_SHORT || - dstType == GL_UNSIGNED_INT); - - - transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT); - - /* - * Try simple cases first - */ - if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE - && dstType == GL_UNSIGNED_BYTE) { - MEMCPY(dest, source, n * sizeof(GLubyte)); - } - else if (transferOps == 0 && srcType == GL_UNSIGNED_INT - && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) { - MEMCPY(dest, source, n * sizeof(GLuint)); - } - else { - /* - * general solution - */ - GLuint indexes[MAX_WIDTH]; - assert(n <= MAX_WIDTH); - - extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source, - srcPacking); - - if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { - /* shift and offset indexes */ - _mesa_shift_and_offset_ci(ctx, n, indexes); - } - if (transferOps & IMAGE_MAP_COLOR_BIT) { - /* Apply lookup table */ - _mesa_map_ci(ctx, n, indexes); - } - - /* convert to dest type */ - switch (dstType) { - case GL_UNSIGNED_BYTE: - { - GLubyte *dst = (GLubyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLubyte) (indexes[i] & 0xff); - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLushort) (indexes[i] & 0xffff); - } - } - break; - case GL_UNSIGNED_INT: - MEMCPY(dest, indexes, n * sizeof(GLuint)); - break; - default: - _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span"); - } - } -} - - -void -_mesa_pack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLuint *source, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ) -{ - GLuint indexes[MAX_WIDTH]; - - ASSERT(n <= MAX_WIDTH); - - transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT); - - if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) { - /* make a copy of input */ - MEMCPY(indexes, source, n * sizeof(GLuint)); - if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { - _mesa_shift_and_offset_ci( ctx, n, indexes); - } - if (transferOps & IMAGE_MAP_COLOR_BIT) { - _mesa_map_ci(ctx, n, indexes); - } - source = indexes; - } - - switch (dstType) { - case GL_UNSIGNED_BYTE: - { - GLubyte *dst = (GLubyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - *dst++ = (GLubyte) source[i]; - } - } - break; - case GL_BYTE: - { - GLbyte *dst = (GLbyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLbyte) source[i]; - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLushort *dst = (GLushort *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLushort) source[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_SHORT: - { - GLshort *dst = (GLshort *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLshort) source[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLuint) source[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_INT: - { - GLint *dst = (GLint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLint) source[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_FLOAT: - { - GLfloat *dst = (GLfloat *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLfloat) source[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - default: - _mesa_problem(ctx, "bad type in _mesa_pack_index_span"); - } -} - - - -/* - * Unpack a row of stencil data from a client buffer according to - * the pixel unpacking parameters. - * This is (or will be) used by glDrawPixels - * - * Args: ctx - the context - * n - number of pixels - * dstType - destination datatype - * dest - destination array - * srcType - source pixel type - * source - source data pointer - * srcPacking - pixel unpacking parameters - * transferOps - apply offset/bias/lookup ops? - */ -void -_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ) -{ - ASSERT(srcType == GL_BITMAP || - srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_FLOAT); - - ASSERT(dstType == GL_UNSIGNED_BYTE || - dstType == GL_UNSIGNED_SHORT || - dstType == GL_UNSIGNED_INT); - - /* only shift and offset apply to stencil */ - transferOps &= IMAGE_SHIFT_OFFSET_BIT; - - /* - * Try simple cases first - */ - if (transferOps == 0 && - srcType == GL_UNSIGNED_BYTE && - dstType == GL_UNSIGNED_BYTE) { - MEMCPY(dest, source, n * sizeof(GLubyte)); - } - else if (transferOps == 0 && - srcType == GL_UNSIGNED_INT && - dstType == GL_UNSIGNED_INT && - !srcPacking->SwapBytes) { - MEMCPY(dest, source, n * sizeof(GLuint)); - } - else { - /* - * general solution - */ - GLuint indexes[MAX_WIDTH]; - assert(n <= MAX_WIDTH); - - extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source, - srcPacking); - - if (transferOps) { - if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { - /* shift and offset indexes */ - _mesa_shift_and_offset_ci(ctx, n, indexes); - } - - if (ctx->Pixel.MapStencilFlag) { - /* Apply stencil lookup table */ - GLuint mask = ctx->Pixel.MapStoSsize - 1; - GLuint i; - for (i=0;iPixel.MapStoS[ indexes[i] & mask ]; - } - } - } - - /* convert to dest type */ - switch (dstType) { - case GL_UNSIGNED_BYTE: - { - GLubyte *dst = (GLubyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLubyte) (indexes[i] & 0xff); - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = (GLushort) (indexes[i] & 0xffff); - } - } - break; - case GL_UNSIGNED_INT: - MEMCPY(dest, indexes, n * sizeof(GLuint)); - break; - default: - _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); - } - } -} - - -void -_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLstencil *source, - const struct gl_pixelstore_attrib *dstPacking ) -{ - GLstencil stencil[MAX_WIDTH]; - - ASSERT(n <= MAX_WIDTH); - - if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset || - ctx->Pixel.MapStencilFlag) { - /* make a copy of input */ - MEMCPY(stencil, source, n * sizeof(GLstencil)); - if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset) { - _mesa_shift_and_offset_stencil( ctx, n, stencil ); - } - if (ctx->Pixel.MapStencilFlag) { - _mesa_map_stencil( ctx, n, stencil ); - } - source = stencil; - } - - switch (dstType) { - case GL_UNSIGNED_BYTE: - if (sizeof(GLstencil) == 8) { - MEMCPY( dest, source, n ); - } - else { - GLubyte *dst = (GLubyte *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_SHORT: - { - GLshort *dst = (GLshort *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_INT: - { - GLint *dst = (GLint *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_FLOAT: - { - GLfloat *dst = (GLfloat *) dest; - GLuint i; - for (i=0;iSwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_BITMAP: - if (dstPacking->LsbFirst) { - GLubyte *dst = (GLubyte *) dest; - GLint shift = 0; - GLuint i; - for (i = 0; i < n; i++) { - if (shift == 0) - *dst = 0; - *dst |= ((source[i] != 0) << shift); - shift++; - if (shift == 8) { - shift = 0; - dst++; - } - } - } - else { - GLubyte *dst = (GLubyte *) dest; - GLint shift = 7; - GLuint i; - for (i = 0; i < n; i++) { - if (shift == 7) - *dst = 0; - *dst |= ((source[i] != 0) << shift); - shift--; - if (shift < 0) { - shift = 7; - dst++; - } - } - } - break; - default: - _mesa_problem(ctx, "bad type in _mesa_pack_index_span"); - } -} - - - -void -_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking ) -{ - switch (srcType) { - case GL_BYTE: - { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - for (i = 0; i < n; i++) { - dest[i] = BYTE_TO_FLOAT(src[i]); - } - } - break; - case GL_UNSIGNED_BYTE: - { - GLuint i; - const GLubyte *src = (const GLubyte *) source; - for (i = 0; i < n; i++) { - dest[i] = UBYTE_TO_FLOAT(src[i]); - } - } - break; - case GL_SHORT: - { - GLuint i; - const GLshort *src = (const GLshort *) source; - for (i = 0; i < n; i++) { - dest[i] = SHORT_TO_FLOAT(src[i]); - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLuint i; - const GLushort *src = (const GLushort *) source; - for (i = 0; i < n; i++) { - dest[i] = USHORT_TO_FLOAT(src[i]); - } - } - break; - case GL_INT: - { - GLuint i; - const GLint *src = (const GLint *) source; - for (i = 0; i < n; i++) { - dest[i] = INT_TO_FLOAT(src[i]); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint i; - const GLuint *src = (const GLuint *) source; - for (i = 0; i < n; i++) { - dest[i] = UINT_TO_FLOAT(src[i]); - } - } - break; - case GL_FLOAT: - MEMCPY(dest, source, n * sizeof(GLfloat)); - break; - default: - _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()"); - return; - } - - - /* apply depth scale and bias and clamp to [0,1] */ - if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - GLuint i; - for (i = 0; i < n; i++) { - GLfloat d = dest[i] * ctx->Pixel.DepthScale + ctx->Pixel.DepthBias; - dest[i] = CLAMP(d, 0.0F, 1.0F); - } - } -} - - - -/* - * Pack an array of depth values. The values are floats in [0,1]. - */ -void -_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, - GLenum dstType, const GLfloat *depthSpan, - const struct gl_pixelstore_attrib *dstPacking ) -{ - GLfloat depthCopy[MAX_WIDTH]; - const GLboolean bias_or_scale = ctx->Pixel.DepthBias != 0.0 || - ctx->Pixel.DepthScale != 1.0; - - ASSERT(n <= MAX_WIDTH); - - if (bias_or_scale) { - GLuint i; - for (i = 0; i < n; i++) { - GLfloat d; - d = depthSpan[i] * ctx->Pixel.DepthScale + ctx->Pixel.DepthBias; - depthCopy[i] = CLAMP(d, 0.0F, 1.0F); - } - depthSpan = depthCopy; - } - - switch (dstType) { - case GL_UNSIGNED_BYTE: - { - GLubyte *dst = (GLubyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UBYTE( depthSpan[i] ); - } - } - break; - case GL_BYTE: - { - GLbyte *dst = (GLbyte *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_BYTE( depthSpan[i] ); - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLushort *dst = (GLushort *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_USHORT( depthSpan[i] ); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_SHORT: - { - GLshort *dst = (GLshort *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_SHORT( depthSpan[i] ); - } - if (dstPacking->SwapBytes) { - _mesa_swap2( (GLushort *) dst, n ); - } - } - break; - case GL_UNSIGNED_INT: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UINT( depthSpan[i] ); - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_INT: - { - GLint *dst = (GLint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_INT( depthSpan[i] ); - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - case GL_FLOAT: - { - GLfloat *dst = (GLfloat *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = depthSpan[i]; - } - if (dstPacking->SwapBytes) { - _mesa_swap4( (GLuint *) dst, n ); - } - } - break; - default: - _mesa_problem(ctx, "bad type in _mesa_pack_depth_span"); - } -} - - - - -/* - * Unpack image data. Apply byteswapping, byte flipping (bitmap). - * Return all image data in a contiguous block. - */ -void * -_mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *unpack ) -{ - GLint bytesPerRow, compsPerRow; - GLboolean flipBytes, swap2, swap4; - - if (!pixels) - return NULL; /* not necessarily an error */ - - if (width <= 0 || height <= 0 || depth <= 0) - return NULL; /* generate error later */ - - if (format == GL_BITMAP) { - bytesPerRow = (width + 7) >> 3; - flipBytes = !unpack->LsbFirst; - swap2 = swap4 = GL_FALSE; - compsPerRow = 0; - } - else { - const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type); - const GLint components = _mesa_components_in_format(format); - GLint bytesPerComp; - if (bytesPerPixel <= 0 || components <= 0) - return NULL; /* bad format or type. generate error later */ - bytesPerRow = bytesPerPixel * width; - bytesPerComp = bytesPerPixel / components; - flipBytes = GL_FALSE; - swap2 = (bytesPerComp == 2) && unpack->SwapBytes; - swap4 = (bytesPerComp == 4) && unpack->SwapBytes; - compsPerRow = components * width; - assert(compsPerRow >= width); - } - - { - GLubyte *destBuffer = (GLubyte *) MALLOC(bytesPerRow * height * depth); - GLubyte *dst; - GLint img, row; - if (!destBuffer) - return NULL; /* generate GL_OUT_OF_MEMORY later */ - - dst = destBuffer; - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - const GLvoid *src = _mesa_image_address(unpack, pixels, - width, height, format, type, img, row, 0); - MEMCPY(dst, src, bytesPerRow); - /* byte flipping/swapping */ - if (flipBytes) { - flip_bytes((GLubyte *) dst, bytesPerRow); - } - else if (swap2) { - _mesa_swap2((GLushort*) dst, compsPerRow); - } - else if (swap4) { - _mesa_swap4((GLuint*) dst, compsPerRow); - } - dst += bytesPerRow; - } - } - return destBuffer; - } -} Index: xc/extras/Mesa/src/image.h diff -u xc/extras/Mesa/src/image.h:1.7 xc/extras/Mesa/src/image.h:removed --- xc/extras/Mesa/src/image.h:1.7 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/image.h Wed Mar 16 21:00:31 2005 @@ -1,174 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef IMAGE_H -#define IMAGE_H - - -#include "mtypes.h" - - -extern const struct gl_pixelstore_attrib _mesa_native_packing; - - -extern void -_mesa_swap2( GLushort *p, GLuint n ); - -extern void -_mesa_swap4( GLuint *p, GLuint n ); - -extern GLint -_mesa_sizeof_type( GLenum type ); - -extern GLint -_mesa_sizeof_packed_type( GLenum type ); - -extern GLint -_mesa_components_in_format( GLenum format ); - -extern GLint -_mesa_bytes_per_pixel( GLenum format, GLenum type ); - -extern GLboolean -_mesa_is_legal_format_and_type( GLenum format, GLenum type ); - - -extern GLvoid * -_mesa_image_address( const struct gl_pixelstore_attrib *packing, - const GLvoid *image, GLsizei width, - GLsizei height, GLenum format, GLenum type, - GLint img, GLint row, GLint column ); - - -extern GLint -_mesa_image_row_stride( const struct gl_pixelstore_attrib *packing, - GLint width, GLenum format, GLenum type ); - - -extern GLint -_mesa_image_image_stride( const struct gl_pixelstore_attrib *packing, - GLint width, GLint height, - GLenum format, GLenum type ); - -extern void -_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32], - const struct gl_pixelstore_attrib *unpacking ); - - -extern void -_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest, - const struct gl_pixelstore_attrib *packing ); - - -extern GLvoid * -_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, - const struct gl_pixelstore_attrib *packing ); - -extern void -_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, - GLubyte *dest, const struct gl_pixelstore_attrib *packing ); - - -extern void -_mesa_pack_float_rgba_span( GLcontext *ctx, - GLuint n, CONST GLfloat rgba[][4], - GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - -extern void -_mesa_pack_rgba_span( GLcontext *ctx, - GLuint n, CONST GLchan rgba[][4], - GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_chan_color_span( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLchan dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_float_color_span( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLfloat dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps, GLboolean clamp ); - - -extern void -_mesa_unpack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - - -extern void -_mesa_pack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLuint *source, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - -extern void -_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLstencil *source, - const struct gl_pixelstore_attrib *dstPacking ); - - -extern void -_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking ); - -extern void -_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, - GLenum dstType, const GLfloat *depthSpan, - const struct gl_pixelstore_attrib *dstPacking ); - - -extern void * -_mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *unpack ); - - -#endif Index: xc/extras/Mesa/src/imports.c diff -u xc/extras/Mesa/src/imports.c:1.3 xc/extras/Mesa/src/imports.c:removed --- xc/extras/Mesa/src/imports.c:1.3 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/imports.c Wed Mar 16 21:00:31 2005 @@ -1,695 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Imports are services which the device driver or window system or - * operating system provides to the core renderer. The core renderer (Mesa) - * will call these functions in order to do memory allocation, simple I/O, - * etc. - * - * Some drivers will want to override/replace this file with something - * specialized, but that'll be rare. - * - * Eventually, I want to move roll the glheader.h file into this. - * - * The OpenGL SI's __GLimports structure allows per-context specification of - * replacements for the standard C lib functions. In practice that's probably - * never needed; compile-time replacements are far more likely. - * - * The _mesa_foo() functions defined here don't in general take a context - * parameter. I guess we can change that someday, if need be. - * So for now, the __GLimports stuff really isn't used. - */ - - -#include "glheader.h" -#include "mtypes.h" -#include "context.h" -#include "imports.h" - - -#define MAXSTRING 4000 /* for vsnprintf() */ - -#ifdef WIN32 -#define vsnprintf _vsnprintf -#elif defined(__IBMC__) || defined(__IBMCPP__) || defined(VMS) -extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); -#endif - - -/**********************************************************************/ -/* Wrappers for standard C library functions */ -/**********************************************************************/ - -/* - * Functions still needed: - * scanf - * qsort - * bsearch - * rand and RAND_MAX - */ - -void * -_mesa_malloc(size_t bytes) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86malloc(bytes); -#else - return malloc(bytes); -#endif -} - - -void * -_mesa_calloc(size_t bytes) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86calloc(1, bytes); -#else - return calloc(1, bytes); -#endif -} - - -void -_mesa_free(void *ptr) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86free(ptr); -#else - free(ptr); -#endif -} - - -void * -_mesa_align_malloc(size_t bytes, unsigned long alignment) -{ - unsigned long ptr, buf; - - ASSERT( alignment > 0 ); - - /* Allocate extra memory to accomodate rounding up the address for - * alignment and to record the real malloc address. - */ - ptr = (unsigned long) _mesa_malloc(bytes + alignment + sizeof(void *)); - if (!ptr) - return NULL; - - buf = (ptr + alignment + sizeof(void *)) & ~(unsigned long)(alignment - 1); - *(unsigned long *)(buf - sizeof(void *)) = ptr; - -#ifdef DEBUG - /* mark the non-aligned area */ - while ( ptr < buf - sizeof(void *) ) { - *(unsigned long *)ptr = 0xcdcdcdcd; - ptr += sizeof(unsigned long); - } -#endif - - return (void *) buf; -} - - -void * -_mesa_align_calloc(size_t bytes, unsigned long alignment) -{ - unsigned long ptr, buf; - - ASSERT( alignment > 0 ); - - ptr = (unsigned long) _mesa_calloc(bytes + alignment + sizeof(void *)); - if (!ptr) - return NULL; - - buf = (ptr + alignment + sizeof(void *)) & ~(unsigned long)(alignment - 1); - *(unsigned long *)(buf - sizeof(void *)) = ptr; - -#ifdef DEBUG - /* mark the non-aligned area */ - while ( ptr < buf - sizeof(void *) ) { - *(unsigned long *)ptr = 0xcdcdcdcd; - ptr += sizeof(unsigned long); - } -#endif - - return (void *)buf; -} - - -void -_mesa_align_free(void *ptr) -{ -#if 0 - _mesa_free( (void *)(*(unsigned long *)((unsigned long)ptr - sizeof(void *))) ); -#else - /* The actuall address to free is stuffed in the word immediately - * before the address the client sees. - */ - void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); - void *realAddr = *cubbyHole; - _mesa_free(realAddr); -#endif -} - - -void * -_mesa_memcpy(void *dest, const void *src, size_t n) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86memcpy(dest, src, n); -#elif defined(SUNOS4) - return memcpy((char *) dest, (char *) src, (int) n); -#else - return memcpy(dest, src, n); -#endif -} - - -void -_mesa_memset( void *dst, int val, size_t n ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86memset( dst, val, n ); -#elif defined(SUNOS4) - memset( (char *) dst, (int) val, (int) n ); -#else - memset(dst, val, n); -#endif -} - - -void -_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ) -{ - while (n-- > 0) - *dst++ = val; -} - - -void -_mesa_bzero( void *dst, size_t n ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86memset( dst, 0, n ); -#elif defined(__FreeBSD__) - bzero( dst, n ); -#else - memset( dst, 0, n ); -#endif -} - - -double -_mesa_sin(double a) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86sin(a); -#else - return sin(a); -#endif -} - - -double -_mesa_cos(double a) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86cos(a); -#else - return cos(a); -#endif -} - - -double -_mesa_sqrt(double x) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86sqrt(x); -#else - return sqrt(x); -#endif -} - - -double -_mesa_pow(double x, double y) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86pow(x, y); -#else - return pow(x, y); -#endif -} - - -char * -_mesa_getenv( const char *var ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86getenv(var); -#else - return getenv(var); -#endif -} - - -char * -_mesa_strstr( const char *haystack, const char *needle ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strstr(haystack, needle); -#else - return strstr(haystack, needle); -#endif -} - - -char * -_mesa_strncat( char *dest, const char *src, size_t n ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncat(dest, src, n); -#else - return strncat(dest, src, n); -#endif -} - - -char * -_mesa_strcpy( char *dest, const char *src ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strcpy(dest, src); -#else - return strcpy(dest, src); -#endif -} - - -char * -_mesa_strncpy( char *dest, const char *src, size_t n ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncpy(dest, src, n); -#else - return strncpy(dest, src, n); -#endif -} - - -size_t -_mesa_strlen( const char *s ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strlen(s); -#else - return strlen(s); -#endif -} - - -int -_mesa_strcmp( const char *s1, const char *s2 ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strcmp(s1, s2); -#else - return strcmp(s1, s2); -#endif -} - - -int -_mesa_strncmp( const char *s1, const char *s2, size_t n ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strncmp(s1, s2, n); -#else - return strncmp(s1, s2, n); -#endif -} - - -char * -_mesa_strdup( const char *s ) -{ - int l = _mesa_strlen(s); - char *s2 = (char *) _mesa_malloc(l + 1); - if (s2) - _mesa_strcpy(s2, s); - return s2; -} - - -int -_mesa_atoi(const char *s) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86atoi(s); -#else - return atoi(s); -#endif -} - - -double -_mesa_strtod( const char *s, char **end ) -{ -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86strtod(s, end); -#else - return strtod(s, end); -#endif -} - - -int -_mesa_sprintf( char *str, const char *fmt, ... ) -{ - int r; - va_list args; - va_start( args, fmt ); - va_end( args ); -#if defined(XFree86LOADER) && defined(IN_MODULE) - r = xf86vsprintf( str, fmt, args ); -#else - r = vsprintf( str, fmt, args ); -#endif - return r; -} - - -void -_mesa_printf( const char *fmtString, ... ) -{ - char s[MAXSTRING]; - va_list args; - va_start( args, fmtString ); - vsnprintf(s, MAXSTRING, fmtString, args); - va_end( args ); -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86printf("%s", s); -#else - printf("%s", s); -#endif -} - - -void -_mesa_warning( GLcontext *ctx, const char *fmtString, ... ) -{ - GLboolean debug; - char str[MAXSTRING]; - va_list args; - (void) ctx; - va_start( args, fmtString ); - (void) vsnprintf( str, MAXSTRING, fmtString, args ); - va_end( args ); -#ifdef DEBUG - debug = GL_TRUE; /* always print warning */ -#else - debug = _mesa_getenv("MESA_DEBUG") ? GL_TRUE : GL_FALSE; -#endif - if (debug) { -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa warning: %s\n", str); -#else - fprintf(stderr, "Mesa warning: %s\n", str); -#endif - } -} - - -/* - * This function is called when the Mesa user has stumbled into a code - * path which may not be implemented fully or correctly. - */ -void -_mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) -{ - va_list args; - char str[MAXSTRING]; - (void) ctx; - - va_start( args, fmtString ); - vsnprintf( str, MAXSTRING, fmtString, args ); - va_end( args ); - -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa implementation error: %s\n", str); - xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n"); -#else - fprintf(stderr, "Mesa implementation error: %s\n", str); - fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" ); -#endif -} - - -/* - * If in debug mode, print error message to stdout. - * Also, record the error code by calling _mesa_record_error(). - * Input: ctx - the GL context - * error - the error value - * fmtString - printf-style format string, followed by optional args - */ -void -_mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) -{ - const char *debugEnv; - GLboolean debug; - - debugEnv = _mesa_getenv("MESA_DEBUG"); - -#ifdef DEBUG - if (debugEnv && _mesa_strstr(debugEnv, "silent")) - debug = GL_FALSE; - else - debug = GL_TRUE; -#else - if (debugEnv) - debug = GL_TRUE; - else - debug = GL_FALSE; -#endif - - if (debug) { - va_list args; - char where[MAXSTRING]; - const char *errstr; - - va_start( args, fmtString ); - vsnprintf( where, MAXSTRING, fmtString, args ); - va_end( args ); - - switch (error) { - case GL_NO_ERROR: - errstr = "GL_NO_ERROR"; - break; - case GL_INVALID_VALUE: - errstr = "GL_INVALID_VALUE"; - break; - case GL_INVALID_ENUM: - errstr = "GL_INVALID_ENUM"; - break; - case GL_INVALID_OPERATION: - errstr = "GL_INVALID_OPERATION"; - break; - case GL_STACK_OVERFLOW: - errstr = "GL_STACK_OVERFLOW"; - break; - case GL_STACK_UNDERFLOW: - errstr = "GL_STACK_UNDERFLOW"; - break; - case GL_OUT_OF_MEMORY: - errstr = "GL_OUT_OF_MEMORY"; - break; - case GL_TABLE_TOO_LARGE: - errstr = "GL_TABLE_TOO_LARGE"; - break; - default: - errstr = "unknown"; - break; - } - _mesa_debug(ctx, "Mesa user error: %s in %s\n", errstr, where); - } - - _mesa_record_error(ctx, error); -} - - -/* - * Call this to report debug information. Uses stderr. - */ -void -_mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) -{ - char s[MAXSTRING]; - va_list args; - va_start(args, fmtString); - vsnprintf(s, MAXSTRING, fmtString, args); - va_end(args); -#if defined(XFree86LOADER) && defined(IN_MODULE) - xf86fprintf(stderr, "Mesa: %s", s); -#else - fprintf(stderr, "Mesa: %s", s); -#endif -} - - - -/**********************************************************************/ -/* Default Imports Wrapper */ -/**********************************************************************/ - -static void * -default_malloc(__GLcontext *gc, size_t size) -{ - (void) gc; - return _mesa_malloc(size); -} - -static void * -default_calloc(__GLcontext *gc, size_t numElem, size_t elemSize) -{ - (void) gc; - return _mesa_calloc(numElem * elemSize); -} - -static void * -default_realloc(__GLcontext *gc, void *oldAddr, size_t newSize) -{ - (void) gc; -#if defined(XFree86LOADER) && defined(IN_MODULE) - return xf86realloc(oldAddr, newSize); -#else - return realloc(oldAddr, newSize); -#endif -} - -static void -default_free(__GLcontext *gc, void *addr) -{ - (void) gc; - _mesa_free(addr); -} - -static char * CAPI -default_getenv( __GLcontext *gc, const char *var ) -{ - (void) gc; - return _mesa_getenv(var); -} - -static void -default_warning(__GLcontext *gc, char *str) -{ - _mesa_warning(gc, str); -} - -static void -default_fatal(__GLcontext *gc, char *str) -{ - _mesa_problem(gc, str); - abort(); -} - -static int CAPI -default_atoi(__GLcontext *gc, const char *str) -{ - (void) gc; - return atoi(str); -} - -static int CAPI -default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...) -{ - int r; - va_list args; - va_start( args, fmt ); - r = vsprintf( str, fmt, args ); - va_end( args ); - return r; -} - -static void * CAPI -default_fopen(__GLcontext *gc, const char *path, const char *mode) -{ - return fopen(path, mode); -} - -static int CAPI -default_fclose(__GLcontext *gc, void *stream) -{ - return fclose((FILE *) stream); -} - -static int CAPI -default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...) -{ - int r; - va_list args; - va_start( args, fmt ); - r = vfprintf( (FILE *) stream, fmt, args ); - va_end( args ); - return r; -} - -/* XXX this really is driver-specific and can't be here */ -static __GLdrawablePrivate * -default_GetDrawablePrivate(__GLcontext *gc) -{ - return NULL; -} - - - - -/* - * Initialize a __GLimports object to point to the functions in - * this file. This is to be called from device drivers. - * Input: imports - the object to init - * driverCtx - pointer to device driver-specific data - */ -void -_mesa_init_default_imports(__GLimports *imports, void *driverCtx) -{ - imports->malloc = default_malloc; - imports->calloc = default_calloc; - imports->realloc = default_realloc; - imports->free = default_free; - imports->warning = default_warning; - imports->fatal = default_fatal; - imports->getenv = default_getenv; /* not used for now */ - imports->atoi = default_atoi; - imports->sprintf = default_sprintf; - imports->fopen = default_fopen; - imports->fclose = default_fclose; - imports->fprintf = default_fprintf; - imports->getDrawablePrivate = default_GetDrawablePrivate; - imports->other = driverCtx; -} Index: xc/extras/Mesa/src/imports.h diff -u xc/extras/Mesa/src/imports.h:1.3 xc/extras/Mesa/src/imports.h:removed --- xc/extras/Mesa/src/imports.h:1.3 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/imports.h Wed Mar 16 21:00:31 2005 @@ -1,210 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file provides wrappers for all the standard C library functions - * like malloc, free, printf, getenv, etc. - */ - - -#ifndef IMPORTS_H -#define IMPORTS_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define MALLOC(BYTES) _mesa_malloc(BYTES) -#define CALLOC(BYTES) _mesa_calloc(BYTES) -#define MALLOC_STRUCT(T) (struct T *) _mesa_malloc(sizeof(struct T)) -#define CALLOC_STRUCT(T) (struct T *) _mesa_calloc(sizeof(struct T)) -#define FREE(PTR) _mesa_free(PTR) - -#define ALIGN_MALLOC(BYTES, N) _mesa_align_malloc(BYTES, N) -#define ALIGN_CALLOC(BYTES, N) _mesa_align_calloc(BYTES, N) -#define ALIGN_MALLOC_STRUCT(T, N) (struct T *) _mesa_align_malloc(sizeof(struct T), N) -#define ALIGN_CALLOC_STRUCT(T, N) (struct T *) _mesa_align_calloc(sizeof(struct T), N) -#define ALIGN_FREE(PTR) _mesa_align_free(PTR) - -#define MEMCPY( DST, SRC, BYTES) _mesa_memcpy(DST, SRC, BYTES) -#define MEMSET( DST, VAL, N ) _mesa_memset(DST, VAL, N) - -#define MEMSET16( DST, VAL, N ) _mesa_memset16( (DST), (VAL), (size_t) (N) ) - - -/* MACs and BeOS don't support static larger than 32kb, so... */ -#if defined(macintosh) && !defined(__MRC__) -/*extern char *AGLAlloc(int size);*/ -/*extern void AGLFree(char* ptr);*/ -# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_alloc(sizeof(TYPE)*(SIZE)) -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2)) -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3)) - -# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0) -# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0) -#elif defined(__BEOS__) -# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_malloc(sizeof(TYPE)*(SIZE)) -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2)) -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3)) -# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0) -# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0) -#else -# define DEFARRAY(TYPE,NAME,SIZE) TYPE NAME[SIZE] -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE NAME[SIZE1][SIZE2] -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE NAME[SIZE1][SIZE2][SIZE3] -# define CHECKARRAY(NAME,CMD) do {} while(0) -# define UNDEFARRAY(NAME) -#endif - - -#ifdef MESA_EXTERNAL_BUFFERALLOC -/* - * If you want Mesa's depth/stencil/accum/etc buffers to be allocated - * with a specialized allocator you can define MESA_EXTERNAL_BUFFERALLOC - * and implement _ext_mesa_alloc/free_pixelbuffer() in your app. - * Contributed by Gerk Huisma (gerk@five-d.demon.nl). - */ -extern void *_ext_mesa_alloc_pixelbuffer( unsigned int size ); -extern void _ext_mesa_free_pixelbuffer( void *pb ); - -#define MESA_PBUFFER_ALLOC(BYTES) (void *) _ext_mesa_alloc_pixelbuffer(BYTES) -#define MESA_PBUFFER_FREE(PTR) _ext_mesa_free_pixelbuffer(PTR) -#else -/* Default buffer allocation uses the aligned allocation routines: */ -#define MESA_PBUFFER_ALLOC(BYTES) (void *) _mesa_align_malloc(BYTES, 512) -#define MESA_PBUFFER_FREE(PTR) _mesa_align_free(PTR) -#endif - - -extern void * -_mesa_malloc( size_t bytes ); - -extern void * -_mesa_calloc( size_t bytes ); - -extern void -_mesa_free( void *ptr ); - -extern void * -_mesa_align_malloc( size_t bytes, unsigned long alignment ); - -extern void * -_mesa_align_calloc( size_t bytes, unsigned long alignment ); - -extern void -_mesa_align_free( void *ptr ); - -extern void * -_mesa_memcpy( void *dest, const void *src, size_t n ); - -extern void -_mesa_memset( void *dst, int val, size_t n ); - -extern void -_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); - -extern void -_mesa_bzero( void *dst, size_t n ); - - -extern double -_mesa_sin(double a); - -extern double -_mesa_cos(double a); - -extern double -_mesa_sqrt(double x); - -extern double -_mesa_pow(double x, double y); - - -extern char * -_mesa_getenv( const char *var ); - -extern char * -_mesa_strstr( const char *haystack, const char *needle ); - -extern char * -_mesa_strncat( char *dest, const char *src, size_t n ); - -extern char * -_mesa_strcpy( char *dest, const char *src ); - -extern char * -_mesa_strncpy( char *dest, const char *src, size_t n ); - -extern size_t -_mesa_strlen( const char *s ); - -extern int -_mesa_strcmp( const char *s1, const char *s2 ); - -extern int -_mesa_strncmp( const char *s1, const char *s2, size_t n ); - -extern char * -_mesa_strdup( const char *s ); - -extern int -_mesa_atoi( const char *s ); - -extern double -_mesa_strtod( const char *s, char **end ); - -extern int -_mesa_sprintf( char *str, const char *fmt, ... ); - -extern void -_mesa_printf( const char *fmtString, ... ); - - -extern void -_mesa_warning( __GLcontext *gc, const char *fmtString, ... ); - -extern void -_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... ); - -extern void -_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ); - -extern void -_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ); - - -extern void -_mesa_init_default_imports( __GLimports *imports, void *driverCtx ); - - -#ifdef __cplusplus -} -#endif - - -#endif /* IMPORTS_H */ Index: xc/extras/Mesa/src/light.c diff -u xc/extras/Mesa/src/light.c:1.8 xc/extras/Mesa/src/light.c:removed --- xc/extras/Mesa/src/light.c:1.8 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/light.c Wed Mar 16 21:00:31 2005 @@ -1,1293 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "colormac.h" -#include "context.h" -#include "enums.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "simple_list.h" -#include "mtypes.h" -#include "math/m_xform.h" -#include "math/m_matrix.h" - - -/* XXX this is a bit of a hack needed for compilation within XFree86 */ -#ifndef FLT_MIN -#define FLT_MIN 1e-37 -#endif - - -void -_mesa_ShadeModel( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode)); - - if (mode != GL_FLAT && mode != GL_SMOOTH) { - _mesa_error( ctx, GL_INVALID_ENUM, "glShadeModel" ); - return; - } - - if (ctx->Light.ShadeModel == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.ShadeModel = mode; - ctx->_TriangleCaps ^= DD_FLATSHADE; - if (ctx->Driver.ShadeModel) - (*ctx->Driver.ShadeModel)( ctx, mode ); -} - - - -void -_mesa_Lightf( GLenum light, GLenum pname, GLfloat param ) -{ - _mesa_Lightfv( light, pname, ¶m ); -} - - -void -_mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i = (GLint) (light - GL_LIGHT0); - struct gl_light *l = &ctx->Light.Light[i]; - - if (i < 0 || i >= (GLint) ctx->Const.MaxLights) { - _mesa_error( ctx, GL_INVALID_ENUM, "glLight(light=0x%x)", light ); - return; - } - - switch (pname) { - case GL_AMBIENT: - if (TEST_EQ_4V(l->Ambient, params)) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_4V( l->Ambient, params ); - break; - case GL_DIFFUSE: - if (TEST_EQ_4V(l->Diffuse, params)) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_4V( l->Diffuse, params ); - break; - case GL_SPECULAR: - if (TEST_EQ_4V(l->Specular, params)) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_4V( l->Specular, params ); - break; - case GL_POSITION: { - GLfloat tmp[4]; - /* transform position by ModelView matrix */ - TRANSFORM_POINT( tmp, ctx->ModelviewMatrixStack.Top->m, params ); - if (TEST_EQ_4V(l->EyePosition, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_4V(l->EyePosition, tmp); - if (l->EyePosition[3] != 0.0F) - l->_Flags |= LIGHT_POSITIONAL; - else - l->_Flags &= ~LIGHT_POSITIONAL; - break; - } - case GL_SPOT_DIRECTION: { - GLfloat tmp[4]; - /* transform direction by inverse modelview */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) { - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - } - TRANSFORM_NORMAL( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); - if (TEST_EQ_3V(l->EyeDirection, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_3V(l->EyeDirection, tmp); - break; - } - case GL_SPOT_EXPONENT: - if (params[0]<0.0 || params[0]>128.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); - return; - } - if (l->SpotExponent == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - l->SpotExponent = params[0]; - _mesa_invalidate_spot_exp_table( l ); - break; - case GL_SPOT_CUTOFF: - if ((params[0]<0.0 || params[0]>90.0) && params[0]!=180.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); - return; - } - if (l->SpotCutoff == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - l->SpotCutoff = params[0]; - l->_CosCutoff = (GLfloat) _mesa_cos(params[0]*DEG2RAD); - if (l->_CosCutoff < 0) - l->_CosCutoff = 0; - if (l->SpotCutoff != 180.0F) - l->_Flags |= LIGHT_SPOT; - else - l->_Flags &= ~LIGHT_SPOT; - break; - case GL_CONSTANT_ATTENUATION: - if (params[0]<0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); - return; - } - if (l->ConstantAttenuation == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - l->ConstantAttenuation = params[0]; - break; - case GL_LINEAR_ATTENUATION: - if (params[0]<0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); - return; - } - if (l->LinearAttenuation == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - l->LinearAttenuation = params[0]; - break; - case GL_QUADRATIC_ATTENUATION: - if (params[0]<0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLight" ); - return; - } - if (l->QuadraticAttenuation == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - l->QuadraticAttenuation = params[0]; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glLight(pname=0x%x)", pname ); - return; - } - - if (ctx->Driver.Lightfv) - ctx->Driver.Lightfv( ctx, light, pname, params ); -} - - -void -_mesa_Lighti( GLenum light, GLenum pname, GLint param ) -{ - _mesa_Lightiv( light, pname, ¶m ); -} - - -void -_mesa_Lightiv( GLenum light, GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - - switch (pname) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - fparam[0] = INT_TO_FLOAT( params[0] ); - fparam[1] = INT_TO_FLOAT( params[1] ); - fparam[2] = INT_TO_FLOAT( params[2] ); - fparam[3] = INT_TO_FLOAT( params[3] ); - break; - case GL_POSITION: - fparam[0] = (GLfloat) params[0]; - fparam[1] = (GLfloat) params[1]; - fparam[2] = (GLfloat) params[2]; - fparam[3] = (GLfloat) params[3]; - break; - case GL_SPOT_DIRECTION: - fparam[0] = (GLfloat) params[0]; - fparam[1] = (GLfloat) params[1]; - fparam[2] = (GLfloat) params[2]; - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - fparam[0] = (GLfloat) params[0]; - break; - default: - /* error will be caught later in gl_Lightfv */ - ; - } - - _mesa_Lightfv( light, pname, fparam ); -} - - - -void -_mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint l = (GLint) (light - GL_LIGHT0); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (l < 0 || l >= (GLint) ctx->Const.MaxLights) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); - return; - } - - switch (pname) { - case GL_AMBIENT: - COPY_4V( params, ctx->Light.Light[l].Ambient ); - break; - case GL_DIFFUSE: - COPY_4V( params, ctx->Light.Light[l].Diffuse ); - break; - case GL_SPECULAR: - COPY_4V( params, ctx->Light.Light[l].Specular ); - break; - case GL_POSITION: - COPY_4V( params, ctx->Light.Light[l].EyePosition ); - break; - case GL_SPOT_DIRECTION: - COPY_3V( params, ctx->Light.Light[l].EyeDirection ); - break; - case GL_SPOT_EXPONENT: - params[0] = ctx->Light.Light[l].SpotExponent; - break; - case GL_SPOT_CUTOFF: - params[0] = ctx->Light.Light[l].SpotCutoff; - break; - case GL_CONSTANT_ATTENUATION: - params[0] = ctx->Light.Light[l].ConstantAttenuation; - break; - case GL_LINEAR_ATTENUATION: - params[0] = ctx->Light.Light[l].LinearAttenuation; - break; - case GL_QUADRATIC_ATTENUATION: - params[0] = ctx->Light.Light[l].QuadraticAttenuation; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" ); - break; - } -} - - - -void -_mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint l = (GLint) (light - GL_LIGHT0); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (l < 0 || l >= (GLint) ctx->Const.MaxLights) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); - return; - } - - switch (pname) { - case GL_AMBIENT: - params[0] = FLOAT_TO_INT(ctx->Light.Light[l].Ambient[0]); - params[1] = FLOAT_TO_INT(ctx->Light.Light[l].Ambient[1]); - params[2] = FLOAT_TO_INT(ctx->Light.Light[l].Ambient[2]); - params[3] = FLOAT_TO_INT(ctx->Light.Light[l].Ambient[3]); - break; - case GL_DIFFUSE: - params[0] = FLOAT_TO_INT(ctx->Light.Light[l].Diffuse[0]); - params[1] = FLOAT_TO_INT(ctx->Light.Light[l].Diffuse[1]); - params[2] = FLOAT_TO_INT(ctx->Light.Light[l].Diffuse[2]); - params[3] = FLOAT_TO_INT(ctx->Light.Light[l].Diffuse[3]); - break; - case GL_SPECULAR: - params[0] = FLOAT_TO_INT(ctx->Light.Light[l].Specular[0]); - params[1] = FLOAT_TO_INT(ctx->Light.Light[l].Specular[1]); - params[2] = FLOAT_TO_INT(ctx->Light.Light[l].Specular[2]); - params[3] = FLOAT_TO_INT(ctx->Light.Light[l].Specular[3]); - break; - case GL_POSITION: - params[0] = (GLint) ctx->Light.Light[l].EyePosition[0]; - params[1] = (GLint) ctx->Light.Light[l].EyePosition[1]; - params[2] = (GLint) ctx->Light.Light[l].EyePosition[2]; - params[3] = (GLint) ctx->Light.Light[l].EyePosition[3]; - break; - case GL_SPOT_DIRECTION: - params[0] = (GLint) ctx->Light.Light[l].EyeDirection[0]; - params[1] = (GLint) ctx->Light.Light[l].EyeDirection[1]; - params[2] = (GLint) ctx->Light.Light[l].EyeDirection[2]; - break; - case GL_SPOT_EXPONENT: - params[0] = (GLint) ctx->Light.Light[l].SpotExponent; - break; - case GL_SPOT_CUTOFF: - params[0] = (GLint) ctx->Light.Light[l].SpotCutoff; - break; - case GL_CONSTANT_ATTENUATION: - params[0] = (GLint) ctx->Light.Light[l].ConstantAttenuation; - break; - case GL_LINEAR_ATTENUATION: - params[0] = (GLint) ctx->Light.Light[l].LinearAttenuation; - break; - case GL_QUADRATIC_ATTENUATION: - params[0] = (GLint) ctx->Light.Light[l].QuadraticAttenuation; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" ); - break; - } -} - - - -/**********************************************************************/ -/*** Light Model ***/ -/**********************************************************************/ - - -void -_mesa_LightModelfv( GLenum pname, const GLfloat *params ) -{ - GLenum newenum; - GLboolean newbool; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (pname) { - case GL_LIGHT_MODEL_AMBIENT: - if (TEST_EQ_4V( ctx->Light.Model.Ambient, params )) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_4V( ctx->Light.Model.Ambient, params ); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - newbool = (params[0]!=0.0); - if (ctx->Light.Model.LocalViewer == newbool) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.Model.LocalViewer = newbool; - break; - case GL_LIGHT_MODEL_TWO_SIDE: - newbool = (params[0]!=0.0); - if (ctx->Light.Model.TwoSide == newbool) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.Model.TwoSide = newbool; - - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - if (params[0] == (GLfloat) GL_SINGLE_COLOR) - newenum = GL_SINGLE_COLOR; - else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR) - newenum = GL_SEPARATE_SPECULAR_COLOR; - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(param=0x0%x)", - (GLint) params[0] ); - return; - } - if (ctx->Light.Model.ColorControl == newenum) - return; - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.Model.ColorControl = newenum; - - if ((ctx->Light.Enabled && - ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) - || ctx->Fog.ColorSumEnabled) - ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; - else - ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR; - - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(pname=0x%x)", pname ); - break; - } - - if (ctx->Driver.LightModelfv) - ctx->Driver.LightModelfv( ctx, pname, params ); -} - - -void -_mesa_LightModeliv( GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - - switch (pname) { - case GL_LIGHT_MODEL_AMBIENT: - fparam[0] = INT_TO_FLOAT( params[0] ); - fparam[1] = INT_TO_FLOAT( params[1] ); - fparam[2] = INT_TO_FLOAT( params[2] ); - fparam[3] = INT_TO_FLOAT( params[3] ); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: - fparam[0] = (GLfloat) params[0]; - break; - default: - /* Error will be caught later in gl_LightModelfv */ - ; - } - _mesa_LightModelfv( pname, fparam ); -} - - -void -_mesa_LightModeli( GLenum pname, GLint param ) -{ - _mesa_LightModeliv( pname, ¶m ); -} - - -void -_mesa_LightModelf( GLenum pname, GLfloat param ) -{ - _mesa_LightModelfv( pname, ¶m ); -} - - - -/********** MATERIAL **********/ - - -/* - * Given a face and pname value (ala glColorMaterial), compute a bitmask - * of the targeted material values. - */ -GLuint -_mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, - GLuint legal, const char *where ) -{ - GLuint bitmask = 0; - - /* Make a bitmask indicating what material attribute(s) we're updating */ - switch (pname) { - case GL_EMISSION: - bitmask |= FRONT_EMISSION_BIT | BACK_EMISSION_BIT; - break; - case GL_AMBIENT: - bitmask |= FRONT_AMBIENT_BIT | BACK_AMBIENT_BIT; - break; - case GL_DIFFUSE: - bitmask |= FRONT_DIFFUSE_BIT | BACK_DIFFUSE_BIT; - break; - case GL_SPECULAR: - bitmask |= FRONT_SPECULAR_BIT | BACK_SPECULAR_BIT; - break; - case GL_SHININESS: - bitmask |= FRONT_SHININESS_BIT | BACK_SHININESS_BIT; - break; - case GL_AMBIENT_AND_DIFFUSE: - bitmask |= FRONT_AMBIENT_BIT | BACK_AMBIENT_BIT; - bitmask |= FRONT_DIFFUSE_BIT | BACK_DIFFUSE_BIT; - break; - case GL_COLOR_INDEXES: - bitmask |= FRONT_INDEXES_BIT | BACK_INDEXES_BIT; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, where ); - return 0; - } - - if (face==GL_FRONT) { - bitmask &= FRONT_MATERIAL_BITS; - } - else if (face==GL_BACK) { - bitmask &= BACK_MATERIAL_BITS; - } - else if (face != GL_FRONT_AND_BACK) { - _mesa_error( ctx, GL_INVALID_ENUM, where ); - return 0; - } - - if (bitmask & ~legal) { - _mesa_error( ctx, GL_INVALID_ENUM, where ); - return 0; - } - - return bitmask; -} - - -/* Perform a straight copy between pairs of materials. - */ -void _mesa_copy_material_pairs( struct gl_material dst[2], - const struct gl_material src[2], - GLuint bitmask ) -{ - if (bitmask & FRONT_EMISSION_BIT) { - COPY_4FV( dst[0].Emission, src[0].Emission ); - } - if (bitmask & BACK_EMISSION_BIT) { - COPY_4FV( dst[1].Emission, src[1].Emission ); - } - if (bitmask & FRONT_AMBIENT_BIT) { - COPY_4FV( dst[0].Ambient, src[0].Ambient ); - } - if (bitmask & BACK_AMBIENT_BIT) { - COPY_4FV( dst[1].Ambient, src[1].Ambient ); - } - if (bitmask & FRONT_DIFFUSE_BIT) { - COPY_4FV( dst[0].Diffuse, src[0].Diffuse ); - } - if (bitmask & BACK_DIFFUSE_BIT) { - COPY_4FV( dst[1].Diffuse, src[1].Diffuse ); - } - if (bitmask & FRONT_SPECULAR_BIT) { - COPY_4FV( dst[0].Specular, src[0].Specular ); - } - if (bitmask & BACK_SPECULAR_BIT) { - COPY_4FV( dst[1].Specular, src[1].Specular ); - } - if (bitmask & FRONT_SHININESS_BIT) { - dst[0].Shininess = src[0].Shininess; - } - if (bitmask & BACK_SHININESS_BIT) { - dst[1].Shininess = src[1].Shininess; - } - if (bitmask & FRONT_INDEXES_BIT) { - dst[0].AmbientIndex = src[0].AmbientIndex; - dst[0].DiffuseIndex = src[0].DiffuseIndex; - dst[0].SpecularIndex = src[0].SpecularIndex; - } - if (bitmask & BACK_INDEXES_BIT) { - dst[1].AmbientIndex = src[1].AmbientIndex; - dst[1].DiffuseIndex = src[1].DiffuseIndex; - dst[1].SpecularIndex = src[1].SpecularIndex; - } -} - - -/* - * Check if the global material has to be updated with info that was - * associated with a vertex via glMaterial. - * This function is used when any material values get changed between - * glBegin/glEnd either by calling glMaterial() or by calling glColor() - * when GL_COLOR_MATERIAL is enabled. - * - * src[0] is front material, src[1] is back material - * - * Additionally keeps the precomputed lighting state uptodate. - */ -void _mesa_update_material( GLcontext *ctx, - const struct gl_material src[2], - GLuint bitmask ) -{ - struct gl_light *light, *list = &ctx->Light.EnabledList; - - if (ctx->Light.ColorMaterialEnabled) - bitmask &= ~ctx->Light.ColorMaterialBitmask; - - if (MESA_VERBOSE&VERBOSE_IMMEDIATE) - _mesa_debug(ctx, "_mesa_update_material, mask 0x%x\n", bitmask); - - if (!bitmask) - return; - - /* update material emission */ - if (bitmask & FRONT_EMISSION_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Emission, src[0].Emission ); - } - if (bitmask & BACK_EMISSION_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Emission, src[1].Emission ); - } - - /* update material ambience */ - if (bitmask & FRONT_AMBIENT_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Ambient, src[0].Ambient ); - foreach (light, list) { - SCALE_3V( light->_MatAmbient[0], light->Ambient, src[0].Ambient); - } - } - if (bitmask & BACK_AMBIENT_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Ambient, src[1].Ambient ); - foreach (light, list) { - SCALE_3V( light->_MatAmbient[1], light->Ambient, src[1].Ambient); - } - } - - /* update BaseColor = emission + scene's ambience * material's ambience */ - if (bitmask & (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT)) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_3V( ctx->Light._BaseColor[0], mat->Emission ); - ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient, - ctx->Light.Model.Ambient ); - } - if (bitmask & (BACK_EMISSION_BIT | BACK_AMBIENT_BIT)) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_3V( ctx->Light._BaseColor[1], mat->Emission ); - ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient, - ctx->Light.Model.Ambient ); - } - - /* update material diffuse values */ - if (bitmask & FRONT_DIFFUSE_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Diffuse, src[0].Diffuse ); - foreach (light, list) { - SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse ); - } - } - if (bitmask & BACK_DIFFUSE_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Diffuse, src[1].Diffuse ); - foreach (light, list) { - SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse ); - } - } - - /* update material specular values */ - if (bitmask & FRONT_SPECULAR_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Specular, src[0].Specular ); - foreach (light, list) { - SCALE_3V( light->_MatSpecular[0], light->Specular, mat->Specular); - } - } - if (bitmask & BACK_SPECULAR_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Specular, src[1].Specular ); - foreach (light, list) { - SCALE_3V( light->_MatSpecular[1], light->Specular, mat->Specular); - } - } - - if (bitmask & FRONT_SHININESS_BIT) { - ctx->Light.Material[0].Shininess = src[0].Shininess; - _mesa_invalidate_shine_table( ctx, 0 ); - } - if (bitmask & BACK_SHININESS_BIT) { - ctx->Light.Material[1].Shininess = src[1].Shininess; - _mesa_invalidate_shine_table( ctx, 1 ); - } - - if (bitmask & FRONT_INDEXES_BIT) { - ctx->Light.Material[0].AmbientIndex = src[0].AmbientIndex; - ctx->Light.Material[0].DiffuseIndex = src[0].DiffuseIndex; - ctx->Light.Material[0].SpecularIndex = src[0].SpecularIndex; - } - if (bitmask & BACK_INDEXES_BIT) { - ctx->Light.Material[1].AmbientIndex = src[1].AmbientIndex; - ctx->Light.Material[1].DiffuseIndex = src[1].DiffuseIndex; - ctx->Light.Material[1].SpecularIndex = src[1].SpecularIndex; - } - - if (0) { - struct gl_material *mat = &ctx->Light.Material[0]; - _mesa_debug(ctx, "update_mat emission : %f %f %f\n", - mat->Emission[0], mat->Emission[1], mat->Emission[2]); - _mesa_debug(ctx, "update_mat specular : %f %f %f\n", - mat->Specular[0], mat->Specular[1], mat->Specular[2]); - _mesa_debug(ctx, "update_mat diffuse : %f %f %f\n", - mat->Diffuse[0], mat->Diffuse[1], mat->Diffuse[2]); - _mesa_debug(ctx, "update_mat ambient : %f %f %f\n", - mat->Ambient[0], mat->Ambient[1], mat->Ambient[2]); - } -} - - - - - - - -/* - * Update the current materials from the given rgba color - * according to the bitmask in ColorMaterialBitmask, which is - * set by glColorMaterial(). - */ -void _mesa_update_color_material( GLcontext *ctx, - const GLfloat color[4] ) -{ - struct gl_light *light, *list = &ctx->Light.EnabledList; - GLuint bitmask = ctx->Light.ColorMaterialBitmask; - - if (MESA_VERBOSE&VERBOSE_IMMEDIATE) - _mesa_debug(ctx, "_mesa_update_color_material, mask 0x%x\n", bitmask); - - /* update emissive colors */ - if (bitmask & FRONT_EMISSION_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Emission, color ); - } - - if (bitmask & BACK_EMISSION_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Emission, color ); - } - - /* update light->_MatAmbient = light's ambient * material's ambient */ - if (bitmask & FRONT_AMBIENT_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - foreach (light, list) { - SCALE_3V( light->_MatAmbient[0], light->Ambient, color); - } - COPY_4FV( mat->Ambient, color ); - } - - if (bitmask & BACK_AMBIENT_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - foreach (light, list) { - SCALE_3V( light->_MatAmbient[1], light->Ambient, color); - } - COPY_4FV( mat->Ambient, color ); - } - - /* update BaseColor = emission + scene's ambience * material's ambience */ - if (bitmask & (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT)) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_3V( ctx->Light._BaseColor[0], mat->Emission ); - ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient, ctx->Light.Model.Ambient ); - } - - if (bitmask & (BACK_EMISSION_BIT | BACK_AMBIENT_BIT)) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_3V( ctx->Light._BaseColor[1], mat->Emission ); - ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient, ctx->Light.Model.Ambient ); - } - - /* update light->_MatDiffuse = light's diffuse * material's diffuse */ - if (bitmask & FRONT_DIFFUSE_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Diffuse, color ); - foreach (light, list) { - SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse ); - } - } - - if (bitmask & BACK_DIFFUSE_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Diffuse, color ); - foreach (light, list) { - SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse ); - } - } - - /* update light->_MatSpecular = light's specular * material's specular */ - if (bitmask & FRONT_SPECULAR_BIT) { - struct gl_material *mat = &ctx->Light.Material[0]; - COPY_4FV( mat->Specular, color ); - foreach (light, list) { - ACC_SCALE_3V( light->_MatSpecular[0], light->Specular, mat->Specular); - } - } - - if (bitmask & BACK_SPECULAR_BIT) { - struct gl_material *mat = &ctx->Light.Material[1]; - COPY_4FV( mat->Specular, color ); - foreach (light, list) { - ACC_SCALE_3V( light->_MatSpecular[1], light->Specular, mat->Specular); - } - } - - if (0) { - struct gl_material *mat = &ctx->Light.Material[0]; - _mesa_debug(ctx, "update_color_mat emission : %f %f %f\n", - mat->Emission[0], mat->Emission[1], mat->Emission[2]); - _mesa_debug(ctx, "update_color_mat specular : %f %f %f\n", - mat->Specular[0], mat->Specular[1], mat->Specular[2]); - _mesa_debug(ctx, "update_color_mat diffuse : %f %f %f\n", - mat->Diffuse[0], mat->Diffuse[1], mat->Diffuse[2]); - _mesa_debug(ctx, "update_color_mat ambient : %f %f %f\n", - mat->Ambient[0], mat->Ambient[1], mat->Ambient[2]); - } -} - - - - -void -_mesa_ColorMaterial( GLenum face, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint bitmask; - GLuint legal = (FRONT_EMISSION_BIT | BACK_EMISSION_BIT | - FRONT_SPECULAR_BIT | BACK_SPECULAR_BIT | - FRONT_DIFFUSE_BIT | BACK_DIFFUSE_BIT | - FRONT_AMBIENT_BIT | BACK_AMBIENT_BIT); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glColorMaterial %s %s\n", - _mesa_lookup_enum_by_nr(face), - _mesa_lookup_enum_by_nr(mode)); - - bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial"); - - if (ctx->Light.ColorMaterialBitmask == bitmask && - ctx->Light.ColorMaterialFace == face && - ctx->Light.ColorMaterialMode == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.ColorMaterialBitmask = bitmask; - ctx->Light.ColorMaterialFace = face; - ctx->Light.ColorMaterialMode = mode; - - if (ctx->Light.ColorMaterialEnabled) { - FLUSH_CURRENT( ctx, 0 ); - _mesa_update_color_material(ctx,ctx->Current.Attrib[VERT_ATTRIB_COLOR0]); - } - - if (ctx->Driver.ColorMaterial) - (*ctx->Driver.ColorMaterial)( ctx, face, mode ); -} - - - - - -void -_mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint f; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* update materials */ - - if (face==GL_FRONT) { - f = 0; - } - else if (face==GL_BACK) { - f = 1; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(face)" ); - return; - } - switch (pname) { - case GL_AMBIENT: - COPY_4FV( params, ctx->Light.Material[f].Ambient ); - break; - case GL_DIFFUSE: - COPY_4FV( params, ctx->Light.Material[f].Diffuse ); - break; - case GL_SPECULAR: - COPY_4FV( params, ctx->Light.Material[f].Specular ); - break; - case GL_EMISSION: - COPY_4FV( params, ctx->Light.Material[f].Emission ); - break; - case GL_SHININESS: - *params = ctx->Light.Material[f].Shininess; - break; - case GL_COLOR_INDEXES: - params[0] = ctx->Light.Material[f].AmbientIndex; - params[1] = ctx->Light.Material[f].DiffuseIndex; - params[2] = ctx->Light.Material[f].SpecularIndex; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); - } -} - - - -void -_mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint f; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* update materials */ - - if (face==GL_FRONT) { - f = 0; - } - else if (face==GL_BACK) { - f = 1; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialiv(face)" ); - return; - } - switch (pname) { - case GL_AMBIENT: - params[0] = FLOAT_TO_INT( ctx->Light.Material[f].Ambient[0] ); - params[1] = FLOAT_TO_INT( ctx->Light.Material[f].Ambient[1] ); - params[2] = FLOAT_TO_INT( ctx->Light.Material[f].Ambient[2] ); - params[3] = FLOAT_TO_INT( ctx->Light.Material[f].Ambient[3] ); - break; - case GL_DIFFUSE: - params[0] = FLOAT_TO_INT( ctx->Light.Material[f].Diffuse[0] ); - params[1] = FLOAT_TO_INT( ctx->Light.Material[f].Diffuse[1] ); - params[2] = FLOAT_TO_INT( ctx->Light.Material[f].Diffuse[2] ); - params[3] = FLOAT_TO_INT( ctx->Light.Material[f].Diffuse[3] ); - break; - case GL_SPECULAR: - params[0] = FLOAT_TO_INT( ctx->Light.Material[f].Specular[0] ); - params[1] = FLOAT_TO_INT( ctx->Light.Material[f].Specular[1] ); - params[2] = FLOAT_TO_INT( ctx->Light.Material[f].Specular[2] ); - params[3] = FLOAT_TO_INT( ctx->Light.Material[f].Specular[3] ); - break; - case GL_EMISSION: - params[0] = FLOAT_TO_INT( ctx->Light.Material[f].Emission[0] ); - params[1] = FLOAT_TO_INT( ctx->Light.Material[f].Emission[1] ); - params[2] = FLOAT_TO_INT( ctx->Light.Material[f].Emission[2] ); - params[3] = FLOAT_TO_INT( ctx->Light.Material[f].Emission[3] ); - break; - case GL_SHININESS: - *params = ROUNDF( ctx->Light.Material[f].Shininess ); - break; - case GL_COLOR_INDEXES: - params[0] = ROUNDF( ctx->Light.Material[f].AmbientIndex ); - params[1] = ROUNDF( ctx->Light.Material[f].DiffuseIndex ); - params[2] = ROUNDF( ctx->Light.Material[f].SpecularIndex ); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetMaterialfv(pname)" ); - } -} - - - - -/**********************************************************************/ -/***** Lighting computation *****/ -/**********************************************************************/ - - -/* - * Notes: - * When two-sided lighting is enabled we compute the color (or index) - * for both the front and back side of the primitive. Then, when the - * orientation of the facet is later learned, we can determine which - * color (or index) to use for rendering. - * - * KW: We now know orientation in advance and only shade for - * the side or sides which are actually required. - * - * Variables: - * n = normal vector - * V = vertex position - * P = light source position - * Pe = (0,0,0,1) - * - * Precomputed: - * IF P[3]==0 THEN - * // light at infinity - * IF local_viewer THEN - * _VP_inf_norm = unit vector from V to P // Precompute - * ELSE - * // eye at infinity - * _h_inf_norm = Normalize( VP + <0,0,1> ) // Precompute - * ENDIF - * ENDIF - * - * Functions: - * Normalize( v ) = normalized vector v - * Magnitude( v ) = length of vector v - */ - - - -/* - * Whenever the spotlight exponent for a light changes we must call - * this function to recompute the exponent lookup table. - */ -void -_mesa_invalidate_spot_exp_table( struct gl_light *l ) -{ - l->_SpotExpTable[0][0] = -1; -} - -static void validate_spot_exp_table( struct gl_light *l ) -{ - GLint i; - GLdouble exponent = l->SpotExponent; - GLdouble tmp = 0; - GLint clamp = 0; - - l->_SpotExpTable[0][0] = 0.0; - - for (i = EXP_TABLE_SIZE - 1; i > 0 ;i--) { - if (clamp == 0) { - tmp = _mesa_pow(i / (GLdouble) (EXP_TABLE_SIZE - 1), exponent); - if (tmp < FLT_MIN * 100.0) { - tmp = 0.0; - clamp = 1; - } - } - l->_SpotExpTable[i][0] = (GLfloat) tmp; - } - for (i = 0; i < EXP_TABLE_SIZE - 1; i++) { - l->_SpotExpTable[i][1] = (l->_SpotExpTable[i+1][0] - - l->_SpotExpTable[i][0]); - } - l->_SpotExpTable[EXP_TABLE_SIZE-1][1] = 0.0; -} - - - - -/* Calculate a new shine table. Doing this here saves a branch in - * lighting, and the cost of doing it early may be partially offset - * by keeping a MRU cache of shine tables for various shine values. - */ -void -_mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ) -{ - if (ctx->_ShineTable[i]) - ctx->_ShineTable[i]->refcount--; - ctx->_ShineTable[i] = 0; -} - -static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess ) -{ - struct gl_shine_tab *list = ctx->_ShineTabList; - struct gl_shine_tab *s; - - foreach(s, list) - if ( s->shininess == shininess ) - break; - - if (s == list) { - GLint j; - GLfloat *m; - - foreach(s, list) - if (s->refcount == 0) - break; - - m = s->tab; - m[0] = 0.0; - if (shininess == 0.0) { - for (j = 1 ; j <= SHINE_TABLE_SIZE ; j++) - m[j] = 1.0; - } - else { - for (j = 1 ; j < SHINE_TABLE_SIZE ; j++) { - GLdouble t, x = j / (GLfloat) (SHINE_TABLE_SIZE - 1); - if (x < 0.005) /* underflow check */ - x = 0.005; - t = _mesa_pow(x, shininess); - if (t > 1e-20) - m[j] = (GLfloat) t; - else - m[j] = 0.0; - } - m[SHINE_TABLE_SIZE] = 1.0; - } - - s->shininess = shininess; - } - - if (ctx->_ShineTable[i]) - ctx->_ShineTable[i]->refcount--; - - ctx->_ShineTable[i] = s; - move_to_tail( list, s ); - s->refcount++; -} - -void -_mesa_validate_all_lighting_tables( GLcontext *ctx ) -{ - GLint i; - GLfloat shininess; - - shininess = ctx->Light.Material[0].Shininess; - if (!ctx->_ShineTable[0] || ctx->_ShineTable[0]->shininess != shininess) - validate_shine_table( ctx, 0, shininess ); - - shininess = ctx->Light.Material[1].Shininess; - if (!ctx->_ShineTable[1] || ctx->_ShineTable[1]->shininess != shininess) - validate_shine_table( ctx, 1, shininess ); - - for (i = 0 ; i < MAX_LIGHTS ; i++) - if (ctx->Light.Light[i]._SpotExpTable[0][0] == -1) - validate_spot_exp_table( &ctx->Light.Light[i] ); -} - - - - -/* - * Examine current lighting parameters to determine if the optimized lighting - * function can be used. - * Also, precompute some lighting values such as the products of light - * source and material ambient, diffuse and specular coefficients. - */ -void -_mesa_update_lighting( GLcontext *ctx ) -{ - struct gl_light *light; - ctx->_NeedEyeCoords &= ~NEED_EYE_LIGHT; - ctx->_NeedNormals &= ~NEED_NORMALS_LIGHT; - ctx->Light._Flags = 0; - - if (!ctx->Light.Enabled) - return; - - ctx->_NeedNormals |= NEED_NORMALS_LIGHT; - - foreach(light, &ctx->Light.EnabledList) { - ctx->Light._Flags |= light->_Flags; - } - - ctx->Light._NeedVertices = - ((ctx->Light._Flags & (LIGHT_POSITIONAL|LIGHT_SPOT)) || - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR || - ctx->Light.Model.LocalViewer); - - if ((ctx->Light._Flags & LIGHT_POSITIONAL) || - ctx->Light.Model.LocalViewer) - ctx->_NeedEyeCoords |= NEED_EYE_LIGHT; - - - /* XXX: This test is overkill & needs to be fixed both for software and - * hardware t&l drivers. The above should be sufficient & should - * be tested to verify this. - */ - if (ctx->Light._NeedVertices) - ctx->_NeedEyeCoords |= NEED_EYE_LIGHT; - - - /* Precompute some shading values. Although we reference - * Light.Material here, we can get away without flushing - * FLUSH_UPDATE_CURRENT, as when any outstanding material changes - * are flushed, they will update the derived state at that time. - */ - if (ctx->Visual.rgbMode) { - GLuint sides = ctx->Light.Model.TwoSide ? 2 : 1; - GLuint side; - for (side=0; side < sides; side++) { - struct gl_material *mat = &ctx->Light.Material[side]; - - COPY_3V(ctx->Light._BaseColor[side], mat->Emission); - ACC_SCALE_3V(ctx->Light._BaseColor[side], - ctx->Light.Model.Ambient, - mat->Ambient); - } - - foreach (light, &ctx->Light.EnabledList) { - for (side=0; side< sides; side++) { - const struct gl_material *mat = &ctx->Light.Material[side]; - SCALE_3V( light->_MatDiffuse[side], light->Diffuse, mat->Diffuse ); - SCALE_3V( light->_MatAmbient[side], light->Ambient, mat->Ambient ); - SCALE_3V( light->_MatSpecular[side], light->Specular, - mat->Specular); - } - } - } - else { - static const GLfloat ci[3] = { .30F, .59F, .11F }; - foreach(light, &ctx->Light.EnabledList) { - light->_dli = DOT3(ci, light->Diffuse); - light->_sli = DOT3(ci, light->Specular); - } - } -} - - -/* _NEW_MODELVIEW - * _NEW_LIGHT - * _TNL_NEW_NEED_EYE_COORDS - * - * Update on (_NEW_MODELVIEW | _NEW_LIGHT) when lighting is enabled. - * Also update on lighting space changes. - */ -void -_mesa_compute_light_positions( GLcontext *ctx ) -{ - struct gl_light *light; - static const GLfloat eye_z[3] = { 0, 0, 1 }; - - if (!ctx->Light.Enabled) - return; - - if (ctx->_NeedEyeCoords) { - COPY_3V( ctx->_EyeZDir, eye_z ); - } - else { - TRANSFORM_NORMAL( ctx->_EyeZDir, eye_z, ctx->ModelviewMatrixStack.Top->m ); - } - - foreach (light, &ctx->Light.EnabledList) { - - if (ctx->_NeedEyeCoords) { - COPY_4FV( light->_Position, light->EyePosition ); - } - else { - TRANSFORM_POINT( light->_Position, ctx->ModelviewMatrixStack.Top->inv, - light->EyePosition ); - } - - if (!(light->_Flags & LIGHT_POSITIONAL)) { - /* VP (VP) = Normalize( Position ) */ - COPY_3V( light->_VP_inf_norm, light->_Position ); - NORMALIZE_3FV( light->_VP_inf_norm ); - - if (!ctx->Light.Model.LocalViewer) { - /* _h_inf_norm = Normalize( V_to_P + <0,0,1> ) */ - ADD_3V( light->_h_inf_norm, light->_VP_inf_norm, ctx->_EyeZDir); - NORMALIZE_3FV( light->_h_inf_norm ); - } - light->_VP_inf_spot_attenuation = 1.0; - } - - if (light->_Flags & LIGHT_SPOT) { - if (ctx->_NeedEyeCoords) { - COPY_3V( light->_NormDirection, light->EyeDirection ); - } - else { - TRANSFORM_NORMAL( light->_NormDirection, - light->EyeDirection, - ctx->ModelviewMatrixStack.Top->m); - } - - NORMALIZE_3FV( light->_NormDirection ); - - if (!(light->_Flags & LIGHT_POSITIONAL)) { - GLfloat PV_dot_dir = - DOT3(light->_VP_inf_norm, - light->_NormDirection); - - if (PV_dot_dir > light->_CosCutoff) { - double x = PV_dot_dir * (EXP_TABLE_SIZE-1); - int k = (int) x; - light->_VP_inf_spot_attenuation = - (GLfloat) (light->_SpotExpTable[k][0] + - (x-k)*light->_SpotExpTable[k][1]); - } - else { - light->_VP_inf_spot_attenuation = 0; - } - } - } - } -} Index: xc/extras/Mesa/src/light.h diff -u xc/extras/Mesa/src/light.h:1.8 xc/extras/Mesa/src/light.h:removed --- xc/extras/Mesa/src/light.h:1.8 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/light.h Wed Mar 16 21:00:31 2005 @@ -1,122 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef LIGHT_H -#define LIGHT_H - - -#include "mtypes.h" - - -extern void -_mesa_ShadeModel( GLenum mode ); - -extern void -_mesa_ColorMaterial( GLenum face, GLenum mode ); - -extern void -_mesa_Lightf( GLenum light, GLenum pname, GLfloat param ); - -extern void -_mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ); - -extern void -_mesa_Lightiv( GLenum light, GLenum pname, const GLint *params ); - -extern void -_mesa_Lighti( GLenum light, GLenum pname, GLint param ); - -extern void -_mesa_LightModelf( GLenum pname, GLfloat param ); - -extern void -_mesa_LightModelfv( GLenum pname, const GLfloat *params ); - -extern void -_mesa_LightModeli( GLenum pname, GLint param ); - -extern void -_mesa_LightModeliv( GLenum pname, const GLint *params ); - -extern void -_mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ); - -extern void -_mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ); - -extern void -_mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); - -extern void -_mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ); - - -/* Lerp between adjacent values in the f(x) lookup table, giving a - * continuous function, with adequeate overall accuracy. (Though - * still pretty good compared to a straight lookup). - * Result should be a GLfloat. - */ -#define GET_SHINE_TAB_ENTRY( table, dp, result ) \ -do { \ - struct gl_shine_tab *_tab = table; \ - float f = (dp * (SHINE_TABLE_SIZE-1)); \ - int k = (int) f; \ - if (k > SHINE_TABLE_SIZE-2) \ - result = (GLfloat) _mesa_pow( dp, _tab->shininess ); \ - else \ - result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]); \ -} while (0) - - - -extern GLuint _mesa_material_bitmask( GLcontext *ctx, - GLenum face, GLenum pname, - GLuint legal, - const char * ); - -extern void _mesa_invalidate_spot_exp_table( struct gl_light *l ); - -extern void _mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ); - -extern void _mesa_validate_all_lighting_tables( GLcontext *ctx ); - -extern void _mesa_update_lighting( GLcontext *ctx ); - -extern void _mesa_compute_light_positions( GLcontext *ctx ); - -extern void _mesa_update_material( GLcontext *ctx, - const struct gl_material src[2], - GLuint bitmask ); - -extern void _mesa_copy_material_pairs( struct gl_material dst[2], - const struct gl_material src[2], - GLuint bitmask ); - -extern void _mesa_update_color_material( GLcontext *ctx, - const GLfloat rgba[4] ); - - -#endif Index: xc/extras/Mesa/src/lines.c diff -u xc/extras/Mesa/src/lines.c:1.11 xc/extras/Mesa/src/lines.c:removed --- xc/extras/Mesa/src/lines.c:1.11 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/lines.c Wed Mar 16 21:00:31 2005 @@ -1,87 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "context.h" -#include "depth.h" -#include "lines.h" -#include "macros.h" -#include "mmath.h" -#include "texstate.h" -#include "mtypes.h" - - -void -_mesa_LineWidth( GLfloat width ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (width<=0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glLineWidth" ); - return; - } - - if (ctx->Line.Width == width) - return; - - FLUSH_VERTICES(ctx, _NEW_LINE); - ctx->Line.Width = width; - ctx->Line._Width = CLAMP(width, - ctx->Const.MinLineWidth, - ctx->Const.MaxLineWidth); - - - if (width != 1.0) - ctx->_TriangleCaps |= DD_LINE_WIDTH; - else - ctx->_TriangleCaps &= ~DD_LINE_WIDTH; - - if (ctx->Driver.LineWidth) - (*ctx->Driver.LineWidth)(ctx, width); -} - - - -void -_mesa_LineStipple( GLint factor, GLushort pattern ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - factor = CLAMP( factor, 1, 256 ); - - if (ctx->Line.StippleFactor == factor && - ctx->Line.StipplePattern == pattern) - return; - - FLUSH_VERTICES(ctx, _NEW_LINE); - ctx->Line.StippleFactor = factor; - ctx->Line.StipplePattern = pattern; - - if (ctx->Driver.LineStipple) - ctx->Driver.LineStipple( ctx, factor, pattern ); -} Index: xc/extras/Mesa/src/lines.h diff -u xc/extras/Mesa/src/lines.h:1.4 xc/extras/Mesa/src/lines.h:removed --- xc/extras/Mesa/src/lines.h:1.4 Fri Feb 22 14:25:34 2002 +++ xc/extras/Mesa/src/lines.h Wed Mar 16 21:00:31 2005 @@ -1,41 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef LINES_H -#define LINES_H - - -#include "mtypes.h" - - -extern void -_mesa_LineWidth( GLfloat width ); - -extern void -_mesa_LineStipple( GLint factor, GLushort pattern ); - - -#endif Index: xc/extras/Mesa/src/macros.h diff -u xc/extras/Mesa/src/macros.h:1.8 xc/extras/Mesa/src/macros.h:removed --- xc/extras/Mesa/src/macros.h:1.8 Sun Sep 28 15:16:57 2003 +++ xc/extras/Mesa/src/macros.h Wed Mar 16 21:00:31 2005 @@ -1,526 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.0.3 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * A collection of useful macros. - */ - - -#ifndef MACROS_H -#define MACROS_H - - -#include "glheader.h" -/* Do not reference mtypes.h from this file. - */ - - -/* Limits: */ -#define MAX_GLUSHORT 0xffff -#define MAX_GLUINT 0xffffffff - - -/* Pi */ -#ifndef M_PI -#define M_PI (3.1415926) -#endif - - -/* Degrees to radians conversion: */ -#define DEG2RAD (M_PI/180.0) - - -#ifndef NULL -#define NULL 0 -#endif - - -/* Stepping a GLfloat pointer by a byte stride - */ -#define STRIDE_F(p, i) (p = (GLfloat *)((GLubyte *)p + i)) -#define STRIDE_UI(p, i) (p = (GLuint *)((GLubyte *)p + i)) -#define STRIDE_4UB(p, i) (p = (GLubyte (*)[4])((GLubyte *)p + i)) -#define STRIDE_4CHAN(p, i) (p = (GLchan (*)[4])((GLubyte *)p + i)) -#define STRIDE_CHAN(p, i) (p = (GLchan *)((GLubyte *)p + i)) -#define STRIDE_T(p, t, i) (p = (t)((GLubyte *)p + i)) - - -#define ZERO_2V( DST ) (DST)[0] = (DST)[1] = 0 -#define ZERO_3V( DST ) (DST)[0] = (DST)[1] = (DST)[2] = 0 -#define ZERO_4V( DST ) (DST)[0] = (DST)[1] = (DST)[2] = (DST)[3] = 0 - - -#define TEST_EQ_4V(a,b) ((a)[0] == (b)[0] && \ - (a)[1] == (b)[1] && \ - (a)[2] == (b)[2] && \ - (a)[3] == (b)[3]) - -#define TEST_EQ_3V(a,b) ((a)[0] == (b)[0] && \ - (a)[1] == (b)[1] && \ - (a)[2] == (b)[2]) - -#if defined(__i386__) -#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC)) -#else -#define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC) -#endif - - - -/* Copy short vectors: */ -#define COPY_2V( DST, SRC ) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ -} while (0) - -#define COPY_3V( DST, SRC ) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ - (DST)[2] = (SRC)[2]; \ -} while (0) - -#define COPY_4V( DST, SRC ) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ - (DST)[2] = (SRC)[2]; \ - (DST)[3] = (SRC)[3]; \ -} while (0) - -#define COPY_2V_CAST( DST, SRC, CAST ) \ -do { \ - (DST)[0] = (CAST)(SRC)[0]; \ - (DST)[1] = (CAST)(SRC)[1]; \ -} while (0) - -#define COPY_3V_CAST( DST, SRC, CAST ) \ -do { \ - (DST)[0] = (CAST)(SRC)[0]; \ - (DST)[1] = (CAST)(SRC)[1]; \ - (DST)[2] = (CAST)(SRC)[2]; \ -} while (0) - -#define COPY_4V_CAST( DST, SRC, CAST ) \ -do { \ - (DST)[0] = (CAST)(SRC)[0]; \ - (DST)[1] = (CAST)(SRC)[1]; \ - (DST)[2] = (CAST)(SRC)[2]; \ - (DST)[3] = (CAST)(SRC)[3]; \ -} while (0) - -#if defined(__i386__) -#define COPY_4UBV(DST, SRC) \ -do { \ - *((GLuint*)(DST)) = *((GLuint*)(SRC)); \ -} while (0) -#else -/* The GLuint cast might fail if DST or SRC are not dword-aligned (RISC) */ -#define COPY_4UBV(DST, SRC) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ - (DST)[2] = (SRC)[2]; \ - (DST)[3] = (SRC)[3]; \ -} while (0) -#endif - -#define COPY_2FV( DST, SRC ) \ -do { \ - const GLfloat *_tmp = (SRC); \ - (DST)[0] = _tmp[0]; \ - (DST)[1] = _tmp[1]; \ -} while (0) - -#define COPY_3FV( DST, SRC ) \ -do { \ - const GLfloat *_tmp = (SRC); \ - (DST)[0] = _tmp[0]; \ - (DST)[1] = _tmp[1]; \ - (DST)[2] = _tmp[2]; \ -} while (0) - -#define COPY_4FV( DST, SRC ) \ -do { \ - const GLfloat *_tmp = (SRC); \ - (DST)[0] = _tmp[0]; \ - (DST)[1] = _tmp[1]; \ - (DST)[2] = _tmp[2]; \ - (DST)[3] = _tmp[3]; \ -} while (0) - - - -#define COPY_SZ_4V(DST, SZ, SRC) \ -do { \ - switch (SZ) { \ - case 4: (DST)[3] = (SRC)[3]; \ - case 3: (DST)[2] = (SRC)[2]; \ - case 2: (DST)[1] = (SRC)[1]; \ - case 1: (DST)[0] = (SRC)[0]; \ - } \ -} while(0) - -#define COPY_CLEAN_4V(DST, SZ, SRC) \ -do { \ - ASSIGN_4V( DST, 0, 0, 0, 1 ); \ - COPY_SZ_4V( DST, SZ, SRC ); \ -} while (0) - -#define SUB_4V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] - (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] - (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] - (SRCB)[2]; \ - (DST)[3] = (SRCA)[3] - (SRCB)[3]; \ -} while (0) - -#define ADD_4V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] + (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] + (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] + (SRCB)[2]; \ - (DST)[3] = (SRCA)[3] + (SRCB)[3]; \ -} while (0) - -#define SCALE_4V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] * (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] * (SRCB)[2]; \ - (DST)[3] = (SRCA)[3] * (SRCB)[3]; \ -} while (0) - -#define ACC_4V( DST, SRC ) \ -do { \ - (DST)[0] += (SRC)[0]; \ - (DST)[1] += (SRC)[1]; \ - (DST)[2] += (SRC)[2]; \ - (DST)[3] += (SRC)[3]; \ -} while (0) - -#define ACC_SCALE_4V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] += (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] += (SRCA)[1] * (SRCB)[1]; \ - (DST)[2] += (SRCA)[2] * (SRCB)[2]; \ - (DST)[3] += (SRCA)[3] * (SRCB)[3]; \ -} while (0) - -#define ACC_SCALE_SCALAR_4V( DST, S, SRCB ) \ -do { \ - (DST)[0] += S * (SRCB)[0]; \ - (DST)[1] += S * (SRCB)[1]; \ - (DST)[2] += S * (SRCB)[2]; \ - (DST)[3] += S * (SRCB)[3]; \ -} while (0) - -#define SCALE_SCALAR_4V( DST, S, SRCB ) \ -do { \ - (DST)[0] = S * (SRCB)[0]; \ - (DST)[1] = S * (SRCB)[1]; \ - (DST)[2] = S * (SRCB)[2]; \ - (DST)[3] = S * (SRCB)[3]; \ -} while (0) - - -#define SELF_SCALE_SCALAR_4V( DST, S ) \ -do { \ - (DST)[0] *= S; \ - (DST)[1] *= S; \ - (DST)[2] *= S; \ - (DST)[3] *= S; \ -} while (0) - - -/* - * Similarly for 3-vectors. - */ -#define SUB_3V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] - (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] - (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] - (SRCB)[2]; \ -} while (0) - -#define ADD_3V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] + (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] + (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] + (SRCB)[2]; \ -} while (0) - -#define SCALE_3V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] * (SRCB)[1]; \ - (DST)[2] = (SRCA)[2] * (SRCB)[2]; \ -} while (0) - -#define SELF_SCALE_3V( DST, SRC ) \ -do { \ - (DST)[0] *= (SRC)[0]; \ - (DST)[1] *= (SRC)[1]; \ - (DST)[2] *= (SRC)[2]; \ -} while (0) - -#define ACC_3V( DST, SRC ) \ -do { \ - (DST)[0] += (SRC)[0]; \ - (DST)[1] += (SRC)[1]; \ - (DST)[2] += (SRC)[2]; \ -} while (0) - -#define ACC_SCALE_3V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] += (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] += (SRCA)[1] * (SRCB)[1]; \ - (DST)[2] += (SRCA)[2] * (SRCB)[2]; \ -} while (0) - -#define SCALE_SCALAR_3V( DST, S, SRCB ) \ -do { \ - (DST)[0] = S * (SRCB)[0]; \ - (DST)[1] = S * (SRCB)[1]; \ - (DST)[2] = S * (SRCB)[2]; \ -} while (0) - -#define ACC_SCALE_SCALAR_3V( DST, S, SRCB ) \ -do { \ - (DST)[0] += S * (SRCB)[0]; \ - (DST)[1] += S * (SRCB)[1]; \ - (DST)[2] += S * (SRCB)[2]; \ -} while (0) - -#define SELF_SCALE_SCALAR_3V( DST, S ) \ -do { \ - (DST)[0] *= S; \ - (DST)[1] *= S; \ - (DST)[2] *= S; \ -} while (0) - -#define ACC_SCALAR_3V( DST, S ) \ -do { \ - (DST)[0] += S; \ - (DST)[1] += S; \ - (DST)[2] += S; \ -} while (0) - -/* And also for 2-vectors - */ -#define SUB_2V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] - (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] - (SRCB)[1]; \ -} while (0) - -#define ADD_2V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] + (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] + (SRCB)[1]; \ -} while (0) - -#define SCALE_2V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] = (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] = (SRCA)[1] * (SRCB)[1]; \ -} while (0) - -#define ACC_2V( DST, SRC ) \ -do { \ - (DST)[0] += (SRC)[0]; \ - (DST)[1] += (SRC)[1]; \ -} while (0) - -#define ACC_SCALE_2V( DST, SRCA, SRCB ) \ -do { \ - (DST)[0] += (SRCA)[0] * (SRCB)[0]; \ - (DST)[1] += (SRCA)[1] * (SRCB)[1]; \ -} while (0) - -#define SCALE_SCALAR_2V( DST, S, SRCB ) \ -do { \ - (DST)[0] = S * (SRCB)[0]; \ - (DST)[1] = S * (SRCB)[1]; \ -} while (0) - -#define ACC_SCALE_SCALAR_2V( DST, S, SRCB ) \ -do { \ - (DST)[0] += S * (SRCB)[0]; \ - (DST)[1] += S * (SRCB)[1]; \ -} while (0) - -#define SELF_SCALE_SCALAR_2V( DST, S ) \ -do { \ - (DST)[0] *= S; \ - (DST)[1] *= S; \ -} while (0) - -#define ACC_SCALAR_2V( DST, S ) \ -do { \ - (DST)[0] += S; \ - (DST)[1] += S; \ -} while (0) - - - -/* Assign scalers to short vectors: */ -#define ASSIGN_2V( V, V0, V1 ) \ -do { \ - V[0] = V0; \ - V[1] = V1; \ -} while(0) - -#define ASSIGN_3V( V, V0, V1, V2 ) \ -do { \ - V[0] = V0; \ - V[1] = V1; \ - V[2] = V2; \ -} while(0) - -#define ASSIGN_4V( V, V0, V1, V2, V3 ) \ -do { \ - V[0] = V0; \ - V[1] = V1; \ - V[2] = V2; \ - V[3] = V3; \ -} while(0) - - - - -/* Absolute value (for Int, Float, Double): */ -#define ABSI(X) ((X) < 0 ? -(X) : (X)) -#define ABSF(X) ((X) < 0.0F ? -(X) : (X)) -#define ABSD(X) ((X) < 0.0 ? -(X) : (X)) - - - -/* Round a floating-point value to the nearest integer: */ -#define ROUNDF(X) ( (X)<0.0F ? ((GLint) ((X)-0.5F)) : ((GLint) ((X)+0.5F)) ) - - -/* Compute ceiling of integer quotient of A divided by B: */ -#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) - - -/* Clamp X to [MIN,MAX]: */ -#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) - -/* Assign X to CLAMP(X, MIN, MAX) */ -#define CLAMP_SELF(x, mn, mx) \ - ( (x)<(mn) ? ((x) = (mn)) : ((x)>(mx) ? ((x)=(mx)) : (x)) ) - - - -/* Min of two values: */ -#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) - -/* MAX of two values: */ -#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) - -/* Dot product of two 2-element vectors */ -#define DOT2( a, b ) ( (a)[0]*(b)[0] + (a)[1]*(b)[1] ) - -/* Dot product of two 3-element vectors */ -#define DOT3( a, b ) ( (a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] ) - -/* Dot product of two 4-element vectors */ -#define DOT4( a, b ) ( (a)[0]*(b)[0] + (a)[1]*(b)[1] + \ - (a)[2]*(b)[2] + (a)[3]*(b)[3] ) - -#define DOT4V(v,a,b,c,d) (v[0]*(a) + v[1]*(b) + v[2]*(c) + v[3]*(d)) - - -#define CROSS3(n, u, v) \ -do { \ - (n)[0] = (u)[1]*(v)[2] - (u)[2]*(v)[1]; \ - (n)[1] = (u)[2]*(v)[0] - (u)[0]*(v)[2]; \ - (n)[2] = (u)[0]*(v)[1] - (u)[1]*(v)[0]; \ -} while (0) - - - -/* Generic color packing macros - * XXX We may move these into texutil.h at some point. - */ - -#define PACK_COLOR_8888( a, b, c, d ) \ - (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) - -#define PACK_COLOR_888( a, b, c ) \ - (((a) << 16) | ((b) << 8) | (c)) - -#define PACK_COLOR_565( a, b, c ) \ - ((((a) & 0xf8) << 8) | (((b) & 0xfc) << 3) | (((c) & 0xf8) >> 3)) - -#define PACK_COLOR_1555( a, b, c, d ) \ - ((((b) & 0xf8) << 7) | (((c) & 0xf8) << 2) | (((d) & 0xf8) >> 3) | \ - ((a) ? 0x8000 : 0)) - -#define PACK_COLOR_4444( a, b, c, d ) \ - ((((a) & 0xf0) << 8) | (((b) & 0xf0) << 4) | ((c) & 0xf0) | ((d) >> 4)) - -#define PACK_COLOR_88( a, b ) \ - (((a) << 8) | (b)) - -#define PACK_COLOR_332( a, b, c ) \ - (((a) & 0xe0) | (((b) & 0xe0) >> 3) | (((c) & 0xc0) >> 6)) - - -#ifdef MESA_BIG_ENDIAN - -#define PACK_COLOR_8888_LE( a, b, c, d ) PACK_COLOR_8888( d, c, b, a ) - -#define PACK_COLOR_565_LE( a, b, c ) \ - (((a) & 0xf8) | (((b) & 0xe0) >> 5) | (((b) & 0x1c) << 11) | \ - (((c) & 0xf8) << 5)) - -#define PACK_COLOR_1555_LE( a, b, c, d ) \ - ((((b) & 0xf8) >> 1) | (((c) & 0xc0) >> 6) | (((c) & 0x38) << 10) | \ - (((d) & 0xf8) << 5) | ((a) ? 0x80 : 0)) - -#define PACK_COLOR_4444_LE( a, b, c, d ) PACK_COLOR_4444( c, d, a, b ) - -#define PACK_COLOR_88_LE( a, b ) PACK_COLOR_88( b, a ) - -#else /* little endian */ - -#define PACK_COLOR_8888_LE( a, b, c, d ) PACK_COLOR_8888( a, b, c, d ) - -#define PACK_COLOR_565_LE( a, b, c ) PACK_COLOR_565( a, b, c ) - -#define PACK_COLOR_1555_LE( a, b, c, d ) PACK_COLOR_1555( a, b, c, d ) - -#define PACK_COLOR_4444_LE( a, b, c, d ) PACK_COLOR_4444( a, b, c, d ) - -#define PACK_COLOR_88_LE( a, b ) PACK_COLOR_88( a, b ) - -#endif /* endianness */ - - -#endif Index: xc/extras/Mesa/src/matrix.c diff -u xc/extras/Mesa/src/matrix.c:1.12 xc/extras/Mesa/src/matrix.c:removed --- xc/extras/Mesa/src/matrix.c:1.12 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/matrix.c Wed Mar 16 21:00:31 2005 @@ -1,482 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Matrix operations - * - * NOTES: - * 1. 4x4 transformation matrices are stored in memory in column major order. - * 2. Points/vertices are to be thought of as column vectors. - * 3. Transformation of a point p by a matrix M is: p' = M * p - */ - - -#include "glheader.h" -#include "imports.h" -#include "buffers.h" -#include "context.h" -#include "enums.h" -#include "macros.h" -#include "matrix.h" -#include "mmath.h" -#include "mtypes.h" -#include "math/m_matrix.h" - - - -void -_mesa_Frustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (nearval <= 0.0 || - farval <= 0.0 || - nearval == farval || - left == right || - top == bottom) - { - _mesa_error( ctx, GL_INVALID_VALUE, "glFrustum" ); - return; - } - - _math_matrix_frustum( ctx->CurrentStack->Top, - (GLfloat) left, (GLfloat) right, - (GLfloat) bottom, (GLfloat) top, - (GLfloat) nearval, (GLfloat) farval ); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_Ortho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glFrustum(%f, %f, %f, %f, %f, %f)\n", - left, right, bottom, top, nearval, farval); - - if (left == right || - bottom == top || - nearval == farval) - { - _mesa_error( ctx, GL_INVALID_VALUE, "glOrtho" ); - return; - } - - _math_matrix_ortho( ctx->CurrentStack->Top, - (GLfloat) left, (GLfloat) right, - (GLfloat) bottom, (GLfloat) top, - (GLfloat) nearval, (GLfloat) farval ); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_MatrixMode( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Transform.MatrixMode == mode && mode != GL_TEXTURE) - return; - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - - switch (mode) { - case GL_MODELVIEW: - ctx->CurrentStack = &ctx->ModelviewMatrixStack; - break; - case GL_PROJECTION: - ctx->CurrentStack = &ctx->ProjectionMatrixStack; - break; - case GL_TEXTURE: - ctx->CurrentStack = &ctx->TextureMatrixStack[ctx->Texture.CurrentUnit]; - break; - case GL_COLOR: - ctx->CurrentStack = &ctx->ColorMatrixStack; - break; - case GL_MATRIX0_NV: - case GL_MATRIX1_NV: - case GL_MATRIX2_NV: - case GL_MATRIX3_NV: - case GL_MATRIX4_NV: - case GL_MATRIX5_NV: - case GL_MATRIX6_NV: - case GL_MATRIX7_NV: - if (!ctx->Extensions.NV_vertex_program) { - _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode" ); - return; - } - ctx->CurrentStack = &ctx->ProgramMatrixStack[mode - GL_MATRIX0_NV]; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode" ); - return; - } - - ctx->Transform.MatrixMode = mode; -} - - - -void -_mesa_PushMatrix( void ) -{ - GET_CURRENT_CONTEXT(ctx); - struct matrix_stack *stack = ctx->CurrentStack; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glPushMatrix %s\n", - _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); - - if (stack->Depth + 1 >= stack->MaxDepth) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix" ); - return; - } - _math_matrix_copy( &stack->Stack[stack->Depth + 1], - &stack->Stack[stack->Depth] ); - stack->Depth++; - stack->Top = &(stack->Stack[stack->Depth]); - ctx->NewState |= stack->DirtyFlag; -} - - - -void -_mesa_PopMatrix( void ) -{ - GET_CURRENT_CONTEXT(ctx); - struct matrix_stack *stack = ctx->CurrentStack; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glPopMatrix %s\n", - _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode)); - - if (stack->Depth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopMatrix" ); - return; - } - stack->Depth--; - stack->Top = &(stack->Stack[stack->Depth]); - ctx->NewState |= stack->DirtyFlag; -} - - - -void -_mesa_LoadIdentity( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glLoadIdentity()"); - - _math_matrix_set_identity( ctx->CurrentStack->Top ); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_LoadMatrixf( const GLfloat *m ) -{ - GET_CURRENT_CONTEXT(ctx); - if (!m) return; - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, - "glLoadMatrix(%f %f %f %f, %f %f %f %f, %f %f %f %f, %f %f %f %f\n", - m[0], m[4], m[8], m[12], - m[1], m[5], m[9], m[13], - m[2], m[6], m[10], m[14], - m[3], m[7], m[11], m[15]); - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _math_matrix_loadf( ctx->CurrentStack->Top, m ); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_LoadMatrixd( const GLdouble *m ) -{ - GLint i; - GLfloat f[16]; - if (!m) return; - for (i = 0; i < 16; i++) - f[i] = (GLfloat) m[i]; - _mesa_LoadMatrixf(f); -} - - - -/* - * Multiply the active matrix by an arbitary matrix. - */ -void -_mesa_MultMatrixf( const GLfloat *m ) -{ - GET_CURRENT_CONTEXT(ctx); - if (!m) return; - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, - "glMultMatrix(%f %f %f %f, %f %f %f %f, %f %f %f %f, %f %f %f %f\n", - m[0], m[4], m[8], m[12], - m[1], m[5], m[9], m[13], - m[2], m[6], m[10], m[14], - m[3], m[7], m[11], m[15]); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _math_matrix_mul_floats( ctx->CurrentStack->Top, m ); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -/* - * Multiply the active matrix by an arbitary matrix. - */ -void -_mesa_MultMatrixd( const GLdouble *m ) -{ - GLint i; - GLfloat f[16]; - if (!m) return; - for (i = 0; i < 16; i++) - f[i] = (GLfloat) m[i]; - _mesa_MultMatrixf( f ); -} - - - - -/* - * Execute a glRotate call - */ -void -_mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (angle != 0.0F) { - _math_matrix_rotate( ctx->CurrentStack->Top, angle, x, y, z); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; - } -} - -void -_mesa_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) -{ - _mesa_Rotatef((GLfloat) angle, (GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - -/* - * Execute a glScale call - */ -void -_mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _math_matrix_scale( ctx->CurrentStack->Top, x, y, z); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_Scaled( GLdouble x, GLdouble y, GLdouble z ) -{ - _mesa_Scalef((GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - -/* - * Execute a glTranslate call - */ -void -_mesa_Translatef( GLfloat x, GLfloat y, GLfloat z ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _math_matrix_translate( ctx->CurrentStack->Top, x, y, z); - ctx->NewState |= ctx->CurrentStack->DirtyFlag; -} - - -void -_mesa_Translated( GLdouble x, GLdouble y, GLdouble z ) -{ - _mesa_Translatef((GLfloat) x, (GLfloat) y, (GLfloat) z); -} - - -void -_mesa_LoadTransposeMatrixfARB( const GLfloat *m ) -{ - GLfloat tm[16]; - if (!m) return; - _math_transposef(tm, m); - _mesa_LoadMatrixf(tm); -} - - -void -_mesa_LoadTransposeMatrixdARB( const GLdouble *m ) -{ - GLfloat tm[16]; - if (!m) return; - _math_transposefd(tm, m); - _mesa_LoadMatrixf(tm); -} - - -void -_mesa_MultTransposeMatrixfARB( const GLfloat *m ) -{ - GLfloat tm[16]; - if (!m) return; - _math_transposef(tm, m); - _mesa_MultMatrixf(tm); -} - - -void -_mesa_MultTransposeMatrixdARB( const GLdouble *m ) -{ - GLfloat tm[16]; - if (!m) return; - _math_transposefd(tm, m); - _mesa_MultMatrixf(tm); -} - - -/* - * Called via glViewport or display list execution. - */ -void -_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _mesa_set_viewport(ctx, x, y, width, height); -} - - -/* - * Define a new viewport and reallocate auxillary buffers if the size of - * the window (color buffer) has changed. - */ -void -_mesa_set_viewport( GLcontext *ctx, GLint x, GLint y, - GLsizei width, GLsizei height ) -{ - const GLfloat n = ctx->Viewport.Near; - const GLfloat f = ctx->Viewport.Far; - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glViewport %d %d %d %d\n", x, y, width, height); - - if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glViewport(%d, %d, %d, %d)", x, y, width, height ); - return; - } - - /* clamp width, and height to implementation dependent range */ - width = CLAMP( width, 1, MAX_WIDTH ); - height = CLAMP( height, 1, MAX_HEIGHT ); - - /* Save viewport */ - ctx->Viewport.X = x; - ctx->Viewport.Width = width; - ctx->Viewport.Y = y; - ctx->Viewport.Height = height; - - /* compute scale and bias values :: This is really driver-specific - * and should be maintained elsewhere if at all. - */ - ctx->Viewport._WindowMap.m[MAT_SX] = (GLfloat) width / 2.0F; - ctx->Viewport._WindowMap.m[MAT_TX] = ctx->Viewport._WindowMap.m[MAT_SX] + x; - ctx->Viewport._WindowMap.m[MAT_SY] = (GLfloat) height / 2.0F; - ctx->Viewport._WindowMap.m[MAT_TY] = ctx->Viewport._WindowMap.m[MAT_SY] + y; - ctx->Viewport._WindowMap.m[MAT_SZ] = ctx->DepthMaxF * ((f - n) / 2.0F); - ctx->Viewport._WindowMap.m[MAT_TZ] = ctx->DepthMaxF * ((f - n) / 2.0F + n); - ctx->Viewport._WindowMap.flags = MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION; - ctx->Viewport._WindowMap.type = MATRIX_3D_NO_ROT; - ctx->NewState |= _NEW_VIEWPORT; - - /* Check if window/buffer has been resized and if so, reallocate the - * ancillary buffers. - */ - _mesa_ResizeBuffersMESA(); - - if (ctx->Driver.Viewport) { - (*ctx->Driver.Viewport)( ctx, x, y, width, height ); - } -} - - - -void -_mesa_DepthRange( GLclampd nearval, GLclampd farval ) -{ - /* - * nearval - specifies mapping of the near clipping plane to window - * coordinates, default is 0 - * farval - specifies mapping of the far clipping plane to window - * coordinates, default is 1 - * - * After clipping and div by w, z coords are in -1.0 to 1.0, - * corresponding to near and far clipping planes. glDepthRange - * specifies a linear mapping of the normalized z coords in - * this range to window z coords. - */ - GLfloat n, f; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval); - - n = (GLfloat) CLAMP( nearval, 0.0, 1.0 ); - f = (GLfloat) CLAMP( farval, 0.0, 1.0 ); - - ctx->Viewport.Near = n; - ctx->Viewport.Far = f; - ctx->Viewport._WindowMap.m[MAT_SZ] = ctx->DepthMaxF * ((f - n) / 2.0F); - ctx->Viewport._WindowMap.m[MAT_TZ] = ctx->DepthMaxF * ((f - n) / 2.0F + n); - ctx->NewState |= _NEW_VIEWPORT; - - if (ctx->Driver.DepthRange) { - (*ctx->Driver.DepthRange)( ctx, nearval, farval ); - } -} Index: xc/extras/Mesa/src/matrix.h diff -u xc/extras/Mesa/src/matrix.h:1.7 xc/extras/Mesa/src/matrix.h:removed --- xc/extras/Mesa/src/matrix.h:1.7 Fri Feb 22 14:25:36 2002 +++ xc/extras/Mesa/src/matrix.h Wed Mar 16 21:00:31 2005 @@ -1,108 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef MATRIX_H -#define MATRIX_H - - -#include "mtypes.h" - - -extern void -_mesa_Frustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ); - -extern void -_mesa_Ortho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble nearval, GLdouble farval ); - -extern void -_mesa_PushMatrix( void ); - -extern void -_mesa_PopMatrix( void ); - -extern void -_mesa_LoadIdentity( void ); - -extern void -_mesa_LoadMatrixf( const GLfloat *m ); - -extern void -_mesa_LoadMatrixd( const GLdouble *m ); - -extern void -_mesa_MatrixMode( GLenum mode ); - -extern void -_mesa_MultMatrixf( const GLfloat *m ); - -extern void -_mesa_MultMatrixd( const GLdouble *m ); - -extern void -_mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); - -extern void -_mesa_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ); - -extern void -_mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ); - -extern void -_mesa_Scaled( GLdouble x, GLdouble y, GLdouble z ); - -extern void -_mesa_Translatef( GLfloat x, GLfloat y, GLfloat z ); - -extern void -_mesa_Translated( GLdouble x, GLdouble y, GLdouble z ); - -extern void -_mesa_LoadTransposeMatrixfARB( const GLfloat *m ); - -extern void -_mesa_LoadTransposeMatrixdARB( const GLdouble *m ); - -extern void -_mesa_MultTransposeMatrixfARB( const GLfloat *m ); - -extern void -_mesa_MultTransposeMatrixdARB( const GLdouble *m ); - -extern void -_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ); - -extern void -_mesa_set_viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ); - -extern void -_mesa_DepthRange( GLclampd nearval, GLclampd farval ); - - -#endif Index: xc/extras/Mesa/src/mmath.c diff -u xc/extras/Mesa/src/mmath.c:1.8 xc/extras/Mesa/src/mmath.c:removed --- xc/extras/Mesa/src/mmath.c:1.8 Wed Oct 22 11:27:40 2003 +++ xc/extras/Mesa/src/mmath.c Wed Mar 16 21:00:31 2005 @@ -1,174 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/mmath.c,v 1.8 2003/10/22 15:27:40 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "mmath.h" - - -/* - * A High Speed, Low Precision Square Root - * by Paul Lalonde and Robert Dawson - * from "Graphics Gems", Academic Press, 1990 - */ - -/* - * SPARC implementation of a fast square root by table - * lookup. - * SPARC floating point format is as follows: - * - * BIT 31 30 23 22 0 - * sign exponent mantissa - */ -static short sqrttab[0x100]; /* declare table of square roots */ - -static void init_sqrt(void) -{ -#ifdef FAST_MATH - unsigned short i; - fi_type fi; /* to access the bits of a float in C quickly */ - /* we use a union defined in glheader.h */ - - for(i=0; i<= 0x7f; i++) { - fi.i = 0; - - /* - * Build a float with the bit pattern i as mantissa - * and an exponent of 0, stored as 127 - */ - - fi.i = (i << 16) | (127 << 23); - fi.f = _mesa_sqrt(fi.f); - - /* - * Take the square root then strip the first 7 bits of - * the mantissa into the table - */ - - sqrttab[i] = (fi.i & 0x7fffff) >> 16; - - /* - * Repeat the process, this time with an exponent of - * 1, stored as 128 - */ - - fi.i = 0; - fi.i = (i << 16) | (128 << 23); - fi.f = sqrt(fi.f); - sqrttab[i+0x80] = (fi.i & 0x7fffff) >> 16; - } -#else - (void) sqrttab; /* silence compiler warnings */ -#endif /*FAST_MATH*/ -} - - -float gl_sqrt( float x ) -{ -#ifdef FAST_MATH - fi_type num; - /* to access the bits of a float in C - * we use a union from glheader.h */ - - short e; /* the exponent */ - if (x == 0.0F) return 0.0F; /* check for square root of 0 */ - num.f = x; - e = (num.i >> 23) - 127; /* get the exponent - on a SPARC the */ - /* exponent is stored with 127 added */ - num.i &= 0x7fffff; /* leave only the mantissa */ - if (e & 0x01) num.i |= 0x800000; - /* the exponent is odd so we have to */ - /* look it up in the second half of */ - /* the lookup table, so we set the */ - /* high bit */ - e >>= 1; /* divide the exponent by two */ - /* note that in C the shift */ - /* operators are sign preserving */ - /* for signed operands */ - /* Do the table lookup, based on the quaternary mantissa, - * then reconstruct the result back into a float - */ - num.i = ((sqrttab[num.i >> 16]) << 16) | ((e + 127) << 23); - return num.f; -#else - return (GLfloat) _mesa_sqrt(x); -#endif -} - - -/* ubyte -> float conversion */ -float _mesa_ubyte_to_float_color_tab[256]; - - -/* - * Initialize tables, etc for fast math functions. - */ -void -_mesa_init_math(void) -{ - static GLboolean initialized = GL_FALSE; - - if (!initialized) { - int i; - for (i = 0; i < 256; i++) { - _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; - } - - init_sqrt(); - - initialized = GL_TRUE; - -#if defined(_FPU_GETCW) && defined(_FPU_SETCW) - { - const char *debug = _mesa_getenv("MESA_DEBUG"); - if (debug && _mesa_strcmp(debug, "FP")==0) { - /* die on FP exceptions */ - fpu_control_t mask; - _FPU_GETCW(mask); - mask &= ~(_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM - | _FPU_MASK_OM | _FPU_MASK_UM); - _FPU_SETCW(mask); - } - } -#endif - } -} - - - -/* - * Return number of bits set in given GLuint. - */ -GLuint -_mesa_bitcount(GLuint n) -{ - GLuint bits; - for (bits = 0; n > 0; n = n >> 1) { - if (n & 1) { - bits++; - } - } - return bits; -} Index: xc/extras/Mesa/src/mmath.h diff -u xc/extras/Mesa/src/mmath.h:1.22 xc/extras/Mesa/src/mmath.h:removed --- xc/extras/Mesa/src/mmath.h:1.22 Wed Oct 22 11:44:41 2003 +++ xc/extras/Mesa/src/mmath.h Wed Mar 16 21:00:32 2005 @@ -1,678 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/mmath.h,v 1.22 2003/10/22 15:44:41 tsi Exp $ */ - - -/* - * Faster arithmetic functions. If the FAST_MATH preprocessor symbol is - * defined on the command line (-DFAST_MATH) then we'll use some (hopefully) - * faster functions for sqrt(), etc. - */ - - -#ifndef MMATH_H -#define MMATH_H - - -#include "glheader.h" -#include "imports.h" -/* Do not reference mtypes.h from this file. - */ - -/* - * Set the x86 FPU control word to guarentee only 32 bits of presision - * are stored in registers. Allowing the FPU to store more introduces - * differences between situations where numbers are pulled out of memory - * vs. situations where the compiler is able to optimize register usage. - * - * In the worst case, we force the compiler to use a memory access to - * truncate the float, by specifying the 'volatile' keyword. - */ -#if defined(__GNUC__) && defined(__i386__) - -/* Hardware default: All exceptions masked, extended double precision, - * round to nearest. IEEE compliant. - */ -#define DEFAULT_X86_FPU 0x037f - -/* All exceptions masked, single precision, round to nearest. - */ -#define FAST_X86_FPU 0x003f - -/* Set it up how we want it. The fldcw instruction will cause any - * pending FP exceptions to be raised prior to entering the block, and - * we clear any pending exceptions before exiting the block. Hence, asm - * code has free reign over the FPU while in the fast math block. - */ -#if defined(NO_FAST_MATH) -#define START_FAST_MATH(x) \ -do { \ - static GLuint mask = DEFAULT_X86_FPU; \ - __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ - __asm__ ( "fldcw %0" : : "m" (mask) ); \ -} while (0) -#else -#define START_FAST_MATH(x) \ -do { \ - static GLuint mask = FAST_X86_FPU; \ - __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ - __asm__ ( "fldcw %0" : : "m" (mask) ); \ -} while (0) -#endif - -/* Put it back how the application had it, and clear any exceptions that - * may have occurred in the FAST_MATH block. - */ -#define END_FAST_MATH(x) \ -do { \ - __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \ -} while (0) - -#define HAVE_FAST_MATH - -#elif defined(__WATCOMC__) && !defined(NO_FAST_MATH) - -/* This is the watcom specific inline assembly version of setcw and getcw */ - -void START_FAST_MATH2(unsigned short *x); -#pragma aux START_FAST_MATH2 = \ - "fstcw word ptr [esi]" \ - "or word ptr [esi], 0x3f" \ - "fldcw word ptr [esi]" \ - parm [esi] \ - modify exact []; - -void END_FAST_MATH2(unsigned short *x); -#pragma aux END_FAST_MATH2 = \ - "fldcw word ptr [esi]" \ - parm [esi] \ - modify exact []; - -#define START_FAST_MATH(x) START_FAST_MATH2(& x) -#define END_FAST_MATH(x) END_FAST_MATH2(& x) - -/* -__inline START_FAST_MATH(unsigned short x) - { - _asm { - fstcw ax - mov x , ax - or ax, 0x3f - fldcw ax - } - } - -__inline END_FAST_MATH(unsigned short x) - { - _asm { - fldcw x - } - } -*/ -#define HAVE_FAST_MATH - -#else -#define START_FAST_MATH(x) x = 0 -#define END_FAST_MATH(x) (void)(x) - -/* The mac float really is a float, with the same precision as a - * single precision 387 float. - */ -#if defined(macintosh) || defined(__powerpc__) -#define HAVE_FAST_MATH -#endif - -#endif - - - -/* - * Square root - */ - -extern float gl_sqrt(float x); - -#ifdef FAST_MATH -#if defined(__WATCOMC__) && defined(USE_X86_ASM) -# define GL_SQRT(X) asm_sqrt(X) -#else -# define GL_SQRT(X) gl_sqrt(X) -#endif -#else -# define GL_SQRT(X) sqrt(X) -#endif - - -/* - * Normalize a 3-element vector to unit length. - */ -#define NORMALIZE_3FV( V ) \ -do { \ - GLfloat len = (GLfloat) LEN_SQUARED_3FV(V); \ - if (len) { \ - len = (GLfloat) (1.0 / GL_SQRT(len)); \ - (V)[0] = (GLfloat) ((V)[0] * len); \ - (V)[1] = (GLfloat) ((V)[1] * len); \ - (V)[2] = (GLfloat) ((V)[2] * len); \ - } \ -} while(0) - -#define LEN_3FV( V ) (GL_SQRT((V)[0]*(V)[0]+(V)[1]*(V)[1]+(V)[2]*(V)[2])) -#define LEN_2FV( V ) (GL_SQRT((V)[0]*(V)[0]+(V)[1]*(V)[1])) - -#define LEN_SQUARED_3FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1]+(V)[2]*(V)[2]) -#define LEN_SQUARED_2FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1]) - - -/* - * Single precision ceiling, floor, and absolute value functions - */ -#if defined(XFree86LOADER) && defined(IN_MODULE) -#define CEILF(x) ((GLfloat) xf86ceil(x)) -#define FLOORF(x) ((GLfloat) xf86floor(x)) -#define FABSF(x) ((GLfloat) xf86fabs(x)) -#elif defined(__gnu_linux__) -/* C99 functions */ -#define CEILF(x) ceilf(x) -#define FLOORF(x) floorf(x) -#define FABSF(x) fabsf(x) -#else -#define CEILF(x) ((GLfloat) ceil(x)) -#define FLOORF(x) ((GLfloat) floor(x)) -#define FABSF(x) ((GLfloat) fabs(x)) -#endif - - -#if defined(__i386__) || defined(__sparc__) || defined(__s390x__) || \ - defined(__powerpc__) || defined(__AMD64__) || \ - ( defined(__alpha__) && ( defined(__IEEE_FLOAT) || !defined(VMS) ) ) -#define USE_IEEE -#endif - - - -#define GET_FLOAT_BITS(x) ((fi_type *) &(x))->i - -/* - * Float -> Int conversions (rounding, floor, ceiling) - */ - -#if defined(USE_SPARC_ASM) && defined(__GNUC__) && defined(__sparc__) - -static INLINE int iround(float f) -{ - int r; - __asm__ ("fstoi %1, %0" : "=f" (r) : "f" (f)); - return r; -} - -#define IROUND(x) iround(x) - -#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) - - -static INLINE int iround(float f) -{ - int r; - __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st"); - return r; -} - -#define IROUND(x) iround(x) - -/* - * IEEE floor for computers that round to nearest or even. - * 'f' must be between -4194304 and 4194303. - * This floor operation is done by "(iround(f + .5) + iround(f - .5)) >> 1", - * but uses some IEEE specific tricks for better speed. - * Contributed by Josh Vanderhoof - */ -static INLINE int ifloor(float f) -{ - int ai, bi; - double af, bf; - af = (3 << 22) + 0.5 + (double)f; - bf = (3 << 22) + 0.5 - (double)f; - /* GCC generates an extra fstp/fld without this. */ - __asm__ ("fstps %0" : "=m" (ai) : "t" (af) : "st"); - __asm__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st"); - return (ai - bi) >> 1; -} - -#define IFLOOR(x) ifloor(x) - -/* - * IEEE ceil for computers that round to nearest or even. - * 'f' must be between -4194304 and 4194303. - * This ceil operation is done by "(iround(f + .5) + iround(f - .5) + 1) >> 1", - * but uses some IEEE specific tricks for better speed. - * Contributed by Josh Vanderhoof - */ -static INLINE int iceil(float f) -{ - int ai, bi; - double af, bf; - af = (3 << 22) + 0.5 + (double)f; - bf = (3 << 22) + 0.5 - (double)f; - /* GCC generates an extra fstp/fld without this. */ - __asm__ ("fstps %0" : "=m" (ai) : "t" (af) : "st"); - __asm__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st"); - return (ai - bi + 1) >> 1; -} - -#define ICEIL(x) iceil(x) - - -#elif defined(USE_X86_ASM) && defined(__MSC__) && defined(__WIN32__) - - -static INLINE int iround(float f) -{ - int r; - _asm { - fld f - fistp r - } - return r; -} - -#define IROUND(x) iround(x) - - -#elif defined(USE_X86_ASM) && defined(__WATCOMC__) - - -long iround(float f); -#pragma aux iround = \ - "push eax" \ - "fistp dword ptr [esp]" \ - "pop eax" \ - parm [8087] \ - value [eax] \ - modify exact [eax]; - -#define IROUND(x) iround(x) - -float asm_sqrt (float x); -#pragma aux asm_sqrt = \ - "fsqrt" \ - parm [8087] \ - value [8087] \ - modify exact []; - - -#endif /* assembly/optimized IROUND, IROUND_POS, IFLOOR, ICEIL macros */ - - -/* default IROUND macro */ -#ifndef IROUND -#define IROUND(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F))) -#endif - - -/* default IROUND_POS macro */ -#ifndef IROUND_POS -#ifdef DEBUG -#define IROUND_POS(f) (ASSERT((f) >= 0.0F), IROUND(f)) -#else -#define IROUND_POS(f) (IROUND(f)) -#endif -#endif /* IROUND_POS */ - - -/* default IFLOOR macro */ -#ifndef IFLOOR -static INLINE int ifloor(float f) -{ -#ifdef USE_IEEE - int ai, bi; - double af, bf; - union { int i; float f; } u; - - af = (3 << 22) + 0.5 + (double)f; - bf = (3 << 22) + 0.5 - (double)f; - u.f = af; ai = u.i; - u.f = bf; bi = u.i; - return (ai - bi) >> 1; -#else - int i = IROUND(f); - return (i > f) ? i - 1 : i; -#endif -} -#define IFLOOR(x) ifloor(x) -#endif /* IFLOOR */ - - -/* default ICEIL macro */ -#ifndef ICEIL -static INLINE int iceil(float f) -{ -#ifdef USE_IEEE - int ai, bi; - double af, bf; - union { int i; float f; } u; - af = (3 << 22) + 0.5 + (double)f; - bf = (3 << 22) + 0.5 - (double)f; - u.f = af; ai = u.i; - u.f = bf; bi = u.i; - return (ai - bi + 1) >> 1; -#else - int i = IROUND(f); - return (i < f) ? i + 1 : i; -#endif -} -#define ICEIL(x) iceil(x) -#endif /* ICEIL */ - - - -/* - * Convert unclamped or clamped ([0,1]) floats to ubytes for color - * conversion only. These functions round to the nearest int. - */ -#define IEEE_ONE 0x3f800000 -#define IEEE_0996 0x3f7f0000 /* 0.996 or something??? used in macro - below only */ - -#if defined(USE_IEEE) && !defined(DEBUG) - -/* - * This function/macro is sensitive to precision. Test carefully - * if you change it. - */ -#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \ - do { \ - union { GLfloat r; GLuint i; } __tmp; \ - __tmp.r = (f); \ - ub = ((__tmp.i >= IEEE_0996) \ - ? ((GLint)__tmp.i < 0) ? (GLubyte)0 : (GLubyte)255 \ - : (__tmp.r = __tmp.r*(255.0F/256.0F) + 32768.0F, \ - (GLubyte)__tmp.i)); \ - } while (0) - -#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \ - UNCLAMPED_FLOAT_TO_UBYTE(ub, f) - -#define COPY_FLOAT( dst, src ) \ - ((fi_type *) &(dst))->i = ((fi_type *) &(src))->i - -#else /* USE_IEEE */ - -#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \ - ub = ((GLubyte) IROUND(CLAMP((f), 0.0F, 1.0F) * 255.0F)) - -#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \ - ub = ((GLubyte) IROUND((f) * 255.0F)) - -#define COPY_FLOAT( dst, src ) (dst) = (src) - -#endif /* USE_IEEE */ - - - -/* - * Integer / float conversion for colors, normals, etc. - */ - -/* Convert GLubyte in [0,255] to GLfloat in [0.0,1.0] */ -extern float _mesa_ubyte_to_float_color_tab[256]; -#define UBYTE_TO_FLOAT(u) _mesa_ubyte_to_float_color_tab[(unsigned int)(u)] - -/* Convert GLfloat in [0.0,1.0] to GLubyte in [0,255] */ -#define FLOAT_TO_UBYTE(X) ((GLubyte) (GLint) ((X) * 255.0F)) - - -/* Convert GLbyte in [-128,127] to GLfloat in [-1.0,1.0] */ -#define BYTE_TO_FLOAT(B) ((2.0F * (B) + 1.0F) * (1.0F/255.0F)) - -/* Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127] */ -#define FLOAT_TO_BYTE(X) ( (((GLint) (255.0F * (X))) - 1) / 2 ) - - -/* Convert GLushort in [0,65536] to GLfloat in [0.0,1.0] */ -#define USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F)) - -/* Convert GLfloat in [0.0,1.0] to GLushort in [0,65536] */ -#define FLOAT_TO_USHORT(X) ((GLushort) (GLint) ((X) * 65535.0F)) - - -/* Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0] */ -#define SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)) - -/* Convert GLfloat in [0.0,1.0] to GLshort in [-32768,32767] */ -#define FLOAT_TO_SHORT(X) ( (((GLint) (65535.0F * (X))) - 1) / 2 ) - - -/* Convert GLuint in [0,4294967295] to GLfloat in [0.0,1.0] */ -#define UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0F)) - -/* Convert GLfloat in [0.0,1.0] to GLuint in [0,4294967295] */ -#define FLOAT_TO_UINT(X) ((GLuint) ((X) * 4294967295.0)) - - -/* Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */ -#define INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0F)) - -/* Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647] */ -/* causes overflow: -#define FLOAT_TO_INT(X) ( (((GLint) (4294967294.0F * (X))) - 1) / 2 ) -*/ -/* a close approximation: */ -#define FLOAT_TO_INT(X) ( (GLint) (2147483647.0 * (X)) ) - - -#define BYTE_TO_UBYTE(b) ((GLubyte) ((b) < 0 ? 0 : (GLubyte) (b))) -#define SHORT_TO_UBYTE(s) ((GLubyte) ((s) < 0 ? 0 : (GLubyte) ((s) >> 7))) -#define USHORT_TO_UBYTE(s) ((GLubyte) ((s) >> 8)) -#define INT_TO_UBYTE(i) ((GLubyte) ((i) < 0 ? 0 : (GLubyte) ((i) >> 23))) -#define UINT_TO_UBYTE(i) ((GLubyte) ((i) >> 24)) - - -#define BYTE_TO_USHORT(b) ((b) < 0 ? 0 : ((GLushort) (((b) * 65535) / 255))) -#define UBYTE_TO_USHORT(b) (((GLushort) (b) << 8) | (GLushort) (b)) -#define SHORT_TO_USHORT(s) ((s) < 0 ? 0 : ((GLushort) (((s) * 65535 / 32767)))) -#define INT_TO_USHORT(i) ((i) < 0 ? 0 : ((GLushort) ((i) >> 15))) -#define UINT_TO_USHORT(i) ((i) < 0 ? 0 : ((GLushort) ((i) >> 16))) -#define UNCLAMPED_FLOAT_TO_USHORT(us, f) \ - us = ( (GLushort) IROUND( CLAMP((f), 0.0, 1.0) * 65535.0F) ) -#define CLAMPED_FLOAT_TO_USHORT(us, f) \ - us = ( (GLushort) IROUND( (f) * 65535.0F) ) - - - -/* - * Linear interpolation - * NOTE: OUT argument is evaluated twice! - * NOTE: Be wary of using *coord++ as an argument to any of these macros! - */ -#define LINTERP(T, OUT, IN) ((OUT) + (T) * ((IN) - (OUT))) - -/* Can do better with integer math: - */ -#define INTERP_UB( t, dstub, outub, inub ) \ -do { \ - GLfloat inf = UBYTE_TO_FLOAT( inub ); \ - GLfloat outf = UBYTE_TO_FLOAT( outub ); \ - GLfloat dstf = LINTERP( t, outf, inf ); \ - UNCLAMPED_FLOAT_TO_UBYTE( dstub, dstf ); \ -} while (0) - -#define INTERP_CHAN( t, dstc, outc, inc ) \ -do { \ - GLfloat inf = CHAN_TO_FLOAT( inc ); \ - GLfloat outf = CHAN_TO_FLOAT( outc ); \ - GLfloat dstf = LINTERP( t, outf, inf ); \ - UNCLAMPED_FLOAT_TO_CHAN( dstc, dstf ); \ -} while (0) - -#define INTERP_UI( t, dstui, outui, inui ) \ - dstui = (GLuint) (GLint) LINTERP( (t), (GLfloat) (outui), (GLfloat) (inui) ) - -#define INTERP_F( t, dstf, outf, inf ) \ - dstf = LINTERP( t, outf, inf ) - -#define INTERP_4F( t, dst, out, in ) \ -do { \ - dst[0] = LINTERP( (t), (out)[0], (in)[0] ); \ - dst[1] = LINTERP( (t), (out)[1], (in)[1] ); \ - dst[2] = LINTERP( (t), (out)[2], (in)[2] ); \ - dst[3] = LINTERP( (t), (out)[3], (in)[3] ); \ -} while (0) - -#define INTERP_3F( t, dst, out, in ) \ -do { \ - dst[0] = LINTERP( (t), (out)[0], (in)[0] ); \ - dst[1] = LINTERP( (t), (out)[1], (in)[1] ); \ - dst[2] = LINTERP( (t), (out)[2], (in)[2] ); \ -} while (0) - -#define INTERP_4CHAN( t, dst, out, in ) \ -do { \ - INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \ - INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \ - INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \ - INTERP_CHAN( (t), (dst)[3], (out)[3], (in)[3] ); \ -} while (0) - -#define INTERP_3CHAN( t, dst, out, in ) \ -do { \ - INTERP_CHAN( (t), (dst)[0], (out)[0], (in)[0] ); \ - INTERP_CHAN( (t), (dst)[1], (out)[1], (in)[1] ); \ - INTERP_CHAN( (t), (dst)[2], (out)[2], (in)[2] ); \ -} while (0) - -#define INTERP_SZ( t, vec, to, out, in, sz ) \ -do { \ - switch (sz) { \ - case 4: vec[to][3] = LINTERP( (t), (vec)[out][3], (vec)[in][3] ); \ - case 3: vec[to][2] = LINTERP( (t), (vec)[out][2], (vec)[in][2] ); \ - case 2: vec[to][1] = LINTERP( (t), (vec)[out][1], (vec)[in][1] ); \ - case 1: vec[to][0] = LINTERP( (t), (vec)[out][0], (vec)[in][0] ); \ - } \ -} while(0) - - -/* - * Fixed point arithmetic macros - */ -#ifdef FIXED_14 -#define FIXED_ONE 0x00004000 -#define FIXED_HALF 0x00002000 -#define FIXED_FRAC_MASK 0x00003FFF -#define FIXED_SCALE 16384.0f -#define FIXED_SHIFT 14 -#else -#define FIXED_ONE 0x00000800 -#define FIXED_HALF 0x00000400 -#define FIXED_FRAC_MASK 0x000007FF -#define FIXED_SCALE 2048.0f -#define FIXED_SHIFT 11 -#endif -#define FIXED_INT_MASK (~FIXED_FRAC_MASK) -#define FIXED_EPSILON 1 -#define FloatToFixed(X) (IROUND((X) * FIXED_SCALE)) -#define IntToFixed(I) ((I) << FIXED_SHIFT) -#define FixedToInt(X) ((X) >> FIXED_SHIFT) -#define FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT) -#define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) -#define FixedFloor(X) ((X) & FIXED_INT_MASK) -#define FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE)) -#define PosFloatToFixed(X) FloatToFixed(X) -#define SignedFloatToFixed(X) FloatToFixed(X) - -/* Returns TRUE for x == Inf or x == NaN. */ -#ifdef USE_IEEE -static INLINE int IS_INF_OR_NAN( float x ) -{ - union {float f; int i;} tmp; - tmp.f = x; - return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); -} -#elif defined(isfinite) -#define IS_INF_OR_NAN(x) (!isfinite(x)) -#elif defined(finite) -#define IS_INF_OR_NAN(x) (!finite(x)) -#elif __VMS -#define IS_INF_OR_NAN(x) (!finite(x)) -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define IS_INF_OR_NAN(x) (!isfinite(x)) -#else -#define IS_INF_OR_NAN(x) (!finite(x)) -#endif - - -/* - * Return log_base_2(x). - */ -#ifdef USE_IEEE - -#if 0 -/* This is pretty fast, but not accurate enough (only 2 fractional bits). - * Based on code from http://www.stereopsis.com/log2.html - */ -static INLINE GLfloat LOG2(GLfloat x) -{ - const GLfloat y = x * x * x * x; - const GLuint ix = *((GLuint *) &y); - const GLuint exp = (ix >> 23) & 0xFF; - const GLint log2 = ((GLint) exp) - 127; - return (GLfloat) log2 * (1.0 / 4.0); /* 4, because of x^4 above */ -} -#endif - -/* Pretty fast, and accurate. - * Based on code from http://www.flipcode.com/totd/ - */ -static INLINE GLfloat LOG2(GLfloat val) -{ - GLint *exp_ptr = (GLint *) &val; - GLint x = *exp_ptr; - const GLint log_2 = ((x >> 23) & 255) - 128; - x &= ~(255 << 23); - x += 127 << 23; - *exp_ptr = x; - val = ((-1.0f/3) * val + 2) * val - 2.0f/3; - return val + log_2; -} - -#else /* USE_IEEE */ - -/* Slow, portable solution. - * NOTE: log_base_2(x) = log(x) / log(2) - * NOTE: 1.442695 = 1/log(2). - */ -#define LOG2(x) ((GLfloat) (log(x) * 1.442695F)) - -#endif /* USE_IEEE */ - - -extern void -_mesa_init_math(void); - - -extern GLuint -_mesa_bitcount(GLuint n); - - -#endif Index: xc/extras/Mesa/src/mtypes.h diff -u xc/extras/Mesa/src/mtypes.h:1.4 xc/extras/Mesa/src/mtypes.h:removed --- xc/extras/Mesa/src/mtypes.h:1.4 Mon Dec 1 18:35:03 2003 +++ xc/extras/Mesa/src/mtypes.h Wed Mar 16 21:00:32 2005 @@ -1,1888 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file mtypes.h - * \brief Main Mesa data structures. - */ - -#ifndef TYPES_H -#define TYPES_H - - -#include "glheader.h" -#include "config.h" /* Hardwired parameters */ -#include "glapitable.h" -#include "glthread.h" - -#include "math/m_matrix.h" /* GLmatrix */ - -#if defined(MESA_TRACE) -#include "Trace/tr_context.h" -#endif - - -/* Please try to mark derived values with a leading underscore ('_'). - */ - -/* - * Color channel data type: - */ -#if CHAN_BITS == 8 - typedef GLubyte GLchan; -#define CHAN_MAX 255 -#define CHAN_MAXF 255.0F -#define CHAN_TYPE GL_UNSIGNED_BYTE -#elif CHAN_BITS == 16 - typedef GLushort GLchan; -#define CHAN_MAX 65535 -#define CHAN_MAXF 65535.0F -#define CHAN_TYPE GL_UNSIGNED_SHORT -#elif CHAN_BITS == 32 - typedef GLfloat GLchan; -#define CHAN_MAX 1.0 -#define CHAN_MAXF 1.0F -#define CHAN_TYPE GL_FLOAT -#else -#error "illegal number of color channel bits" -#endif - - -/** - * Accumulation buffer data type: - */ -#if ACCUM_BITS==8 - typedef GLbyte GLaccum; -#elif ACCUM_BITS==16 - typedef GLshort GLaccum; -#elif ACCUM_BITS==32 - typedef GLfloat GLaccum; -#else -# error "illegal number of accumulation bits" -#endif - - -/** - * Stencil buffer data type: - */ -#if STENCIL_BITS==8 - typedef GLubyte GLstencil; -# define STENCIL_MAX 0xff -#elif STENCIL_BITS==16 - typedef GLushort GLstencil; -# define STENCIL_MAX 0xffff -#else -# error "illegal number of stencil bits" -#endif - - -/** - * Depth buffer data type: - */ -typedef GLuint GLdepth; /* Must be 32-bits! */ - - -/** - * Fixed point data type: - */ -typedef int GLfixed; - - - -/** - * Some forward type declarations - */ -struct _mesa_HashTable; -struct gl_texture_image; -struct gl_texture_object; -typedef struct __GLcontextRec GLcontext; -typedef struct __GLcontextModesRec GLvisual; -typedef struct gl_frame_buffer GLframebuffer; - - - -/* These define the aliases between numbered vertex attributes and - * conventional OpenGL vertex attributes. We use these values in - * quite a few places. New in Mesa 4.1. - */ -#define VERT_ATTRIB_POS 0 -#define VERT_ATTRIB_WEIGHT 1 -#define VERT_ATTRIB_NORMAL 2 -#define VERT_ATTRIB_COLOR0 3 -#define VERT_ATTRIB_COLOR1 4 -#define VERT_ATTRIB_FOG 5 -#define VERT_ATTRIB_SIX 6 -#define VERT_ATTRIB_SEVEN 7 -#define VERT_ATTRIB_TEX0 8 -#define VERT_ATTRIB_TEX1 9 -#define VERT_ATTRIB_TEX2 10 -#define VERT_ATTRIB_TEX3 11 -#define VERT_ATTRIB_TEX4 12 -#define VERT_ATTRIB_TEX5 13 -#define VERT_ATTRIB_TEX6 14 -#define VERT_ATTRIB_TEX7 15 -#define VERT_ATTRIB_MAX 16 - -/* These are used in bitfields in many places */ -#define VERT_BIT_POS (1 << VERT_ATTRIB_POS) -#define VERT_BIT_WEIGHT (1 << VERT_ATTRIB_WEIGHT) -#define VERT_BIT_NORMAL (1 << VERT_ATTRIB_NORMAL) -#define VERT_BIT_COLOR0 (1 << VERT_ATTRIB_COLOR0) -#define VERT_BIT_COLOR1 (1 << VERT_ATTRIB_COLOR1) -#define VERT_BIT_FOG (1 << VERT_ATTRIB_FOG) -#define VERT_BIT_SIX (1 << VERT_ATTRIB_SIX) -#define VERT_BIT_SEVEN (1 << VERT_ATTRIB_SEVEN) -#define VERT_BIT_TEX0 (1 << VERT_ATTRIB_TEX0) -#define VERT_BIT_TEX1 (1 << VERT_ATTRIB_TEX1) -#define VERT_BIT_TEX2 (1 << VERT_ATTRIB_TEX2) -#define VERT_BIT_TEX3 (1 << VERT_ATTRIB_TEX3) -#define VERT_BIT_TEX4 (1 << VERT_ATTRIB_TEX4) -#define VERT_BIT_TEX5 (1 << VERT_ATTRIB_TEX5) -#define VERT_BIT_TEX6 (1 << VERT_ATTRIB_TEX6) -#define VERT_BIT_TEX7 (1 << VERT_ATTRIB_TEX7) - -#define VERT_BIT_TEX(u) (1 << (VERT_ATTRIB_TEX0 + (u))) - - - -/** - * Maximum number of temporary vertices required for clipping. (Used - * in array_cache and tnl modules). - */ -#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1) - - -/* Data structure for color tables */ -struct gl_color_table { - GLenum Format; /* GL_ALPHA, GL_RGB, GL_RGB, etc */ - GLenum IntFormat; - GLuint Size; /* number of entries (rows) in table */ - GLvoid *Table; /* either GLfloat * or GLchan * */ - GLboolean FloatTable; /* are entries stored as floats? */ - GLubyte RedSize; - GLubyte GreenSize; - GLubyte BlueSize; - GLubyte AlphaSize; - GLubyte LuminanceSize; - GLubyte IntensitySize; -}; - - -/* - * Bit flags used for updating material values. - */ -#define FRONT_AMBIENT_BIT 0x1 -#define BACK_AMBIENT_BIT 0x2 -#define FRONT_DIFFUSE_BIT 0x4 -#define BACK_DIFFUSE_BIT 0x8 -#define FRONT_SPECULAR_BIT 0x10 -#define BACK_SPECULAR_BIT 0x20 -#define FRONT_EMISSION_BIT 0x40 -#define BACK_EMISSION_BIT 0x80 -#define FRONT_SHININESS_BIT 0x100 -#define BACK_SHININESS_BIT 0x200 -#define FRONT_INDEXES_BIT 0x400 -#define BACK_INDEXES_BIT 0x800 - -#define FRONT_MATERIAL_BITS (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT | \ - FRONT_DIFFUSE_BIT | FRONT_SPECULAR_BIT | \ - FRONT_SHININESS_BIT | FRONT_INDEXES_BIT) - -#define BACK_MATERIAL_BITS (BACK_EMISSION_BIT | BACK_AMBIENT_BIT | \ - BACK_DIFFUSE_BIT | BACK_SPECULAR_BIT | \ - BACK_SHININESS_BIT | BACK_INDEXES_BIT) - -#define ALL_MATERIAL_BITS (FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS) - - - -/* - * Specular exponent and material shininess lookup table sizes: - */ -#define EXP_TABLE_SIZE 512 -#define SHINE_TABLE_SIZE 256 - -struct gl_shine_tab { - struct gl_shine_tab *next, *prev; - GLfloat tab[SHINE_TABLE_SIZE+1]; - GLfloat shininess; - GLuint refcount; -}; - - -struct gl_light { - struct gl_light *next; /* double linked list with sentinel */ - struct gl_light *prev; - - GLfloat Ambient[4]; /* ambient color */ - GLfloat Diffuse[4]; /* diffuse color */ - GLfloat Specular[4]; /* specular color */ - GLfloat EyePosition[4]; /* position in eye coordinates */ - GLfloat EyeDirection[4]; /* spotlight dir in eye coordinates */ - GLfloat SpotExponent; - GLfloat SpotCutoff; /* in degress */ - GLfloat _CosCutoff; /* = MAX(0, cos(SpotCutoff)) */ - GLfloat ConstantAttenuation; - GLfloat LinearAttenuation; - GLfloat QuadraticAttenuation; - GLboolean Enabled; /* On/off flag */ - - /* Derived fields */ - GLuint _Flags; /* State */ - - GLfloat _Position[4]; /* position in eye/obj coordinates */ - GLfloat _VP_inf_norm[3]; /* Norm direction to infinite light */ - GLfloat _h_inf_norm[3]; /* Norm( _VP_inf_norm + <0,0,1> ) */ - GLfloat _NormDirection[4]; /* normalized spotlight direction */ - GLfloat _VP_inf_spot_attenuation; - - GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /* to replace a pow() call */ - GLfloat _MatAmbient[2][3]; /* material ambient * light ambient */ - GLfloat _MatDiffuse[2][3]; /* material diffuse * light diffuse */ - GLfloat _MatSpecular[2][3]; /* material spec * light specular */ - GLfloat _dli; /* CI diffuse light intensity */ - GLfloat _sli; /* CI specular light intensity */ -}; - - -struct gl_lightmodel { - GLfloat Ambient[4]; /* ambient color */ - GLboolean LocalViewer; /* Local (or infinite) view point? */ - GLboolean TwoSide; /* Two (or one) sided lighting? */ - GLenum ColorControl; /* either GL_SINGLE_COLOR */ - /* or GL_SEPARATE_SPECULAR_COLOR */ -}; - - -struct gl_material -{ - GLfloat Ambient[4]; - GLfloat Diffuse[4]; - GLfloat Specular[4]; - GLfloat Emission[4]; - GLfloat Shininess; - GLfloat AmbientIndex; /* for color index lighting */ - GLfloat DiffuseIndex; /* for color index lighting */ - GLfloat SpecularIndex; /* for color index lighting */ -}; - - -/* - * Attribute structures: - * We define a struct for each attribute group to make pushing and - * popping attributes easy. Also it's a good organization. - */ -struct gl_accum_attrib { - GLfloat ClearColor[4]; /* Accumulation buffer clear color */ -}; - - -/* - * Used in _DrawDestMask and _ReadSrcMask below to identify color buffers. - */ -#define FRONT_LEFT_BIT 0x1 -#define FRONT_RIGHT_BIT 0x2 -#define BACK_LEFT_BIT 0x4 -#define BACK_RIGHT_BIT 0x8 -#define AUX0_BIT 0x10 -#define AUX1_BIT 0x20 -#define AUX2_BIT 0x40 -#define AUX3_BIT 0x80 - -struct gl_colorbuffer_attrib { - GLuint ClearIndex; /* Index to use for glClear */ - GLclampf ClearColor[4]; /* Color to use for glClear */ - - GLuint IndexMask; /* Color index write mask */ - GLubyte ColorMask[4]; /* Each flag is 0xff or 0x0 */ - - GLenum DrawBuffer; /* Which buffer to draw into */ - GLubyte _DrawDestMask; /* bitwise-OR of FRONT/BACK_LEFT/RIGHT_BITs */ - - /* alpha testing */ - GLboolean AlphaEnabled; /* Alpha test enabled flag */ - GLenum AlphaFunc; /* Alpha test function */ - GLclampf AlphaRef; - - /* blending */ - GLboolean BlendEnabled; /* Blending enabled flag */ - GLenum BlendSrcRGB; /* Blending source operator */ - GLenum BlendDstRGB; /* Blending destination operator */ - GLenum BlendSrcA; /* GL_INGR_blend_func_separate */ - GLenum BlendDstA; /* GL_INGR_blend_func_separate */ - GLenum BlendEquation; - GLfloat BlendColor[4]; - - /* logic op */ - GLenum LogicOp; /* Logic operator */ - GLboolean IndexLogicOpEnabled; /* Color index logic op enabled flag */ - GLboolean ColorLogicOpEnabled; /* RGBA logic op enabled flag */ - GLboolean _LogicOpEnabled; /* RGBA logic op + ETX_blend_logic_op enabled flag */ - - GLboolean DitherFlag; /* Dither enable flag */ -}; - - -struct gl_current_attrib { - /* These values valid only when FLUSH_VERTICES has been called. - */ - GLfloat Attrib[VERT_ATTRIB_MAX][4]; /* Current vertex attributes */ - /* indexed by VERT_ATTRIB_* */ - GLuint Index; /* Current color index */ - GLboolean EdgeFlag; /* Current edge flag */ - - /* These values are always valid. BTW, note how similar this set of - * attributes is to the SWvertex datatype in the software rasterizer... - */ - GLfloat RasterPos[4]; /* Current raster position */ - GLfloat RasterDistance; /* Current raster distance */ - GLfloat RasterColor[4]; /* Current raster color */ - GLfloat RasterSecondaryColor[4]; /* Current rast 2ndary color */ - GLuint RasterIndex; /* Current raster index */ - GLfloat RasterTexCoords[MAX_TEXTURE_UNITS][4];/* Current raster texcoords */ - GLboolean RasterPosValid; /* Raster pos valid flag */ -}; - - -struct gl_depthbuffer_attrib { - GLenum Func; /* Function for depth buffer compare */ - GLfloat Clear; /* Value to clear depth buffer to */ - GLboolean Test; /* Depth buffering enabled flag */ - GLboolean Mask; /* Depth buffer writable? */ - GLboolean OcclusionTest; /* GL_HP_occlusion_test */ -}; - - -struct gl_enable_attrib { - GLboolean AlphaTest; - GLboolean AutoNormal; - GLboolean Blend; - GLuint ClipPlanes; - GLboolean ColorMaterial; - GLboolean Convolution1D; - GLboolean Convolution2D; - GLboolean Separable2D; - GLboolean CullFace; - GLboolean DepthTest; - GLboolean Dither; - GLboolean Fog; - GLboolean Histogram; - GLboolean Light[MAX_LIGHTS]; - GLboolean Lighting; - GLboolean LineSmooth; - GLboolean LineStipple; - GLboolean IndexLogicOp; - GLboolean ColorLogicOp; - GLboolean Map1Color4; - GLboolean Map1Index; - GLboolean Map1Normal; - GLboolean Map1TextureCoord1; - GLboolean Map1TextureCoord2; - GLboolean Map1TextureCoord3; - GLboolean Map1TextureCoord4; - GLboolean Map1Vertex3; - GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ - GLboolean Map2Color4; - GLboolean Map2Index; - GLboolean Map2Normal; - GLboolean Map2TextureCoord1; - GLboolean Map2TextureCoord2; - GLboolean Map2TextureCoord3; - GLboolean Map2TextureCoord4; - GLboolean Map2Vertex3; - GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ - GLboolean MinMax; - GLboolean Normalize; - GLboolean PixelTexture; - GLboolean PointSmooth; - GLboolean PolygonOffsetPoint; - GLboolean PolygonOffsetLine; - GLboolean PolygonOffsetFill; - GLboolean PolygonSmooth; - GLboolean PolygonStipple; - GLboolean RescaleNormals; - GLboolean Scissor; - GLboolean Stencil; - GLboolean MultisampleEnabled; /* GL_ARB_multisample */ - GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ - GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ - GLboolean SampleCoverage; /* GL_ARB_multisample */ - GLboolean SampleCoverageInvert; /* GL_ARB_multisample */ - GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ - GLuint Texture[MAX_TEXTURE_UNITS]; - GLuint TexGen[MAX_TEXTURE_UNITS]; - GLboolean VertexProgram; /* GL_NV_vertex_program */ - GLboolean VertexProgramPointSize; /* GL_NV_vertex_program */ - GLboolean VertexProgramTwoSide; /* GL_NV_vertex_program */ - GLboolean PointSprite; /* GL_NV_point_sprite */ -}; - - -struct gl_eval_attrib { - /* Enable bits */ - GLboolean Map1Color4; - GLboolean Map1Index; - GLboolean Map1Normal; - GLboolean Map1TextureCoord1; - GLboolean Map1TextureCoord2; - GLboolean Map1TextureCoord3; - GLboolean Map1TextureCoord4; - GLboolean Map1Vertex3; - GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ - GLboolean Map2Color4; - GLboolean Map2Index; - GLboolean Map2Normal; - GLboolean Map2TextureCoord1; - GLboolean Map2TextureCoord2; - GLboolean Map2TextureCoord3; - GLboolean Map2TextureCoord4; - GLboolean Map2Vertex3; - GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ - GLboolean AutoNormal; - /* Map Grid endpoints and divisions and calculated du values */ - GLint MapGrid1un; - GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; - GLint MapGrid2un, MapGrid2vn; - GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; - GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; -}; - - -struct gl_fog_attrib { - GLboolean Enabled; /* Fog enabled flag */ - GLfloat Color[4]; /* Fog color */ - GLfloat Density; /* Density >= 0.0 */ - GLfloat Start; /* Start distance in eye coords */ - GLfloat End; /* End distance in eye coords */ - GLfloat Index; /* Fog index */ - GLenum Mode; /* Fog mode */ - GLboolean ColorSumEnabled; - GLenum FogCoordinateSource; /* GL_EXT_fog_coord */ -}; - - -struct gl_hint_attrib { - /* always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE */ - GLenum PerspectiveCorrection; - GLenum PointSmooth; - GLenum LineSmooth; - GLenum PolygonSmooth; - GLenum Fog; - GLenum ClipVolumeClipping; /* GL_EXT_clip_volume_hint */ - GLenum TextureCompression; /* GL_ARB_texture_compression */ - GLenum GenerateMipmap; /* GL_SGIS_generate_mipmap */ -}; - - -struct gl_histogram_attrib { - GLuint Width; /* number of table entries */ - GLint Format; /* GL_ALPHA, GL_RGB, etc */ - GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /* the histogram */ - GLboolean Sink; /* terminate image transfer? */ - GLubyte RedSize; /* Bits per counter */ - GLubyte GreenSize; - GLubyte BlueSize; - GLubyte AlphaSize; - GLubyte LuminanceSize; -}; - - -struct gl_minmax_attrib { - GLenum Format; - GLboolean Sink; - GLfloat Min[4], Max[4]; /* RGBA */ -}; - - -struct gl_convolution_attrib { - GLenum Format; - GLenum InternalFormat; - GLuint Width; - GLuint Height; - GLfloat Filter[MAX_CONVOLUTION_WIDTH * MAX_CONVOLUTION_HEIGHT * 4]; -}; - - -#define LIGHT_SPOT 0x1 -#define LIGHT_LOCAL_VIEWER 0x2 -#define LIGHT_POSITIONAL 0x4 -#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER) - -struct gl_light_attrib { - struct gl_light Light[MAX_LIGHTS]; /* Array of lights */ - struct gl_lightmodel Model; /* Lighting model */ - - /* Must flush FLUSH_VERTICES before referencing: - */ - struct gl_material Material[2]; /* Material 0=front, 1=back */ - - GLboolean Enabled; /* Lighting enabled flag */ - GLenum ShadeModel; /* GL_FLAT or GL_SMOOTH */ - GLenum ColorMaterialFace; /* GL_FRONT, BACK or FRONT_AND_BACK */ - GLenum ColorMaterialMode; /* GL_AMBIENT, GL_DIFFUSE, etc */ - GLuint ColorMaterialBitmask; /* bitmask formed from Face and Mode */ - GLboolean ColorMaterialEnabled; - - struct gl_light EnabledList; /* List sentinel */ - - /* Derived for optimizations: */ - GLboolean _NeedVertices; /* Use fast shader? */ - GLuint _Flags; /* LIGHT_* flags, see above */ - GLfloat _BaseColor[2][3]; -}; - - -struct gl_line_attrib { - GLboolean SmoothFlag; /* GL_LINE_SMOOTH enabled? */ - GLboolean StippleFlag; /* GL_LINE_STIPPLE enabled? */ - GLushort StipplePattern; /* Stipple pattern */ - GLint StippleFactor; /* Stipple repeat factor */ - GLfloat Width; /* Line width */ - GLfloat _Width; /* Clamped Line width */ -}; - - -struct gl_list_attrib { - GLuint ListBase; -}; - - -struct gl_list_opcode { - GLuint size; - void (*execute)( GLcontext *ctx, void *data ); - void (*destroy)( GLcontext *ctx, void *data ); - void (*print)( GLcontext *ctx, void *data ); -}; - -#define GL_MAX_EXT_OPCODES 16 - -struct gl_list_extensions { - struct gl_list_opcode opcode[GL_MAX_EXT_OPCODES]; - GLuint nr_opcodes; -}; - - -struct gl_multisample_attrib { - GLboolean Enabled; - GLboolean SampleAlphaToCoverage; - GLboolean SampleAlphaToOne; - GLboolean SampleCoverage; - GLfloat SampleCoverageValue; - GLboolean SampleCoverageInvert; -}; - - -struct gl_pixel_attrib { - GLenum ReadBuffer; /* src buffer for glRead/CopyPixels */ - GLubyte _ReadSrcMask; /* Not really a mask, but like _DrawDestMask */ - /* May be: FRONT_LEFT_BIT, BACK_LEFT_BIT, */ - /* FRONT_RIGHT_BIT or BACK_RIGHT_BIT. */ - GLfloat RedBias, RedScale; - GLfloat GreenBias, GreenScale; - GLfloat BlueBias, BlueScale; - GLfloat AlphaBias, AlphaScale; - GLfloat DepthBias, DepthScale; - GLint IndexShift, IndexOffset; - GLboolean MapColorFlag; - GLboolean MapStencilFlag; - GLfloat ZoomX, ZoomY; - /* XXX move these out of gl_pixel_attrib */ - GLint MapStoSsize; /* Size of each pixel map */ - GLint MapItoIsize; - GLint MapItoRsize; - GLint MapItoGsize; - GLint MapItoBsize; - GLint MapItoAsize; - GLint MapRtoRsize; - GLint MapGtoGsize; - GLint MapBtoBsize; - GLint MapAtoAsize; - GLint MapStoS[MAX_PIXEL_MAP_TABLE]; /* Pixel map tables */ - GLint MapItoI[MAX_PIXEL_MAP_TABLE]; - GLfloat MapItoR[MAX_PIXEL_MAP_TABLE]; - GLfloat MapItoG[MAX_PIXEL_MAP_TABLE]; - GLfloat MapItoB[MAX_PIXEL_MAP_TABLE]; - GLfloat MapItoA[MAX_PIXEL_MAP_TABLE]; - GLubyte MapItoR8[MAX_PIXEL_MAP_TABLE]; /* converted to 8-bit color */ - GLubyte MapItoG8[MAX_PIXEL_MAP_TABLE]; - GLubyte MapItoB8[MAX_PIXEL_MAP_TABLE]; - GLubyte MapItoA8[MAX_PIXEL_MAP_TABLE]; - GLfloat MapRtoR[MAX_PIXEL_MAP_TABLE]; - GLfloat MapGtoG[MAX_PIXEL_MAP_TABLE]; - GLfloat MapBtoB[MAX_PIXEL_MAP_TABLE]; - GLfloat MapAtoA[MAX_PIXEL_MAP_TABLE]; - /* GL_EXT_histogram */ - GLboolean HistogramEnabled; - GLboolean MinMaxEnabled; - /* GL_SGIS_pixel_texture */ - GLboolean PixelTextureEnabled; - GLenum FragmentRgbSource; - GLenum FragmentAlphaSource; - /* GL_SGI_color_matrix */ - GLfloat PostColorMatrixScale[4]; /* RGBA */ - GLfloat PostColorMatrixBias[4]; /* RGBA */ - /* GL_SGI_color_table */ - GLfloat ColorTableScale[4]; - GLfloat ColorTableBias[4]; - GLboolean ColorTableEnabled; - GLfloat PCCTscale[4]; - GLfloat PCCTbias[4]; - GLboolean PostConvolutionColorTableEnabled; - GLfloat PCMCTscale[4]; - GLfloat PCMCTbias[4]; - GLboolean PostColorMatrixColorTableEnabled; - /* Convolution */ - GLboolean Convolution1DEnabled; - GLboolean Convolution2DEnabled; - GLboolean Separable2DEnabled; - GLfloat ConvolutionBorderColor[3][4]; - GLenum ConvolutionBorderMode[3]; - GLfloat ConvolutionFilterScale[3][4]; - GLfloat ConvolutionFilterBias[3][4]; - GLfloat PostConvolutionScale[4]; /* RGBA */ - GLfloat PostConvolutionBias[4]; /* RGBA */ -}; - - -struct gl_point_attrib { - GLboolean SmoothFlag; /* True if GL_POINT_SMOOTH is enabled */ - GLfloat Size; /* User-specified point size */ - GLfloat _Size; /* Size clamped to Const.Min/MaxPointSize */ - GLfloat Params[3]; /* GL_EXT_point_parameters */ - GLfloat MinSize, MaxSize; /* GL_EXT_point_parameters */ - GLfloat Threshold; /* GL_EXT_point_parameters */ - GLboolean _Attenuated; /* True if Params != [1, 0, 0] */ - GLboolean PointSprite; /* GL_NV_point_sprite */ - GLboolean CoordReplace[MAX_TEXTURE_UNITS]; /* GL_NV_point_sprite */ - GLenum SpriteRMode; /* GL_NV_point_sprite */ -}; - - -struct gl_polygon_attrib { - GLenum FrontFace; /* Either GL_CW or GL_CCW */ - GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */ - GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */ - GLboolean _FrontBit; /* 0=GL_CCW, 1=GL_CW */ - GLboolean CullFlag; /* Culling on/off flag */ - GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */ - GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */ - GLenum CullFaceMode; /* Culling mode GL_FRONT or GL_BACK */ - GLfloat OffsetFactor; /* Polygon offset factor, from user */ - GLfloat OffsetUnits; /* Polygon offset units, from user */ - GLboolean OffsetPoint; /* Offset in GL_POINT mode */ - GLboolean OffsetLine; /* Offset in GL_LINE mode */ - GLboolean OffsetFill; /* Offset in GL_FILL mode */ -}; - - -struct gl_scissor_attrib { - GLboolean Enabled; /* Scissor test enabled? */ - GLint X, Y; /* Lower left corner of box */ - GLsizei Width, Height; /* Size of box */ -}; - - -struct gl_stencil_attrib { - GLboolean Enabled; /* Enabled flag */ - GLboolean TestTwoSide; /* GL_EXT_stencil_two_side */ - GLubyte ActiveFace; /* GL_EXT_stencil_two_side (0 or 1) */ - GLenum Function[2]; /* Stencil function */ - GLenum FailFunc[2]; /* Fail function */ - GLenum ZPassFunc[2]; /* Depth buffer pass function */ - GLenum ZFailFunc[2]; /* Depth buffer fail function */ - GLstencil Ref[2]; /* Reference value */ - GLstencil ValueMask[2]; /* Value mask */ - GLstencil WriteMask[2]; /* Write mask */ - GLstencil Clear; /* Clear value */ -}; - - -/* TexGenEnabled flags */ -#define S_BIT 1 -#define T_BIT 2 -#define R_BIT 4 -#define Q_BIT 8 - -/* Texture.Unit[]._ReallyEnabled flags: */ -#define TEXTURE_1D_BIT 0x01 -#define TEXTURE_2D_BIT 0x02 -#define TEXTURE_3D_BIT 0x04 -#define TEXTURE_CUBE_BIT 0x08 -#define TEXTURE_RECT_BIT 0x10 - -#define NUM_TEXTURE_TARGETS 5 /* 1D, 2D, 3D, CUBE and RECT */ - - -/* Bitmap versions of the GL_ constants. */ -#define TEXGEN_SPHERE_MAP 0x1 -#define TEXGEN_OBJ_LINEAR 0x2 -#define TEXGEN_EYE_LINEAR 0x4 -#define TEXGEN_REFLECTION_MAP_NV 0x8 -#define TEXGEN_NORMAL_MAP_NV 0x10 - -#define TEXGEN_NEED_NORMALS (TEXGEN_SPHERE_MAP | \ - TEXGEN_REFLECTION_MAP_NV | \ - TEXGEN_NORMAL_MAP_NV) -#define TEXGEN_NEED_EYE_COORD (TEXGEN_SPHERE_MAP | \ - TEXGEN_REFLECTION_MAP_NV | \ - TEXGEN_NORMAL_MAP_NV | \ - TEXGEN_EYE_LINEAR) - - - -/* A selection of state flags to make driver and module's lives easier. */ -#define ENABLE_TEXGEN0 0x1 -#define ENABLE_TEXGEN1 0x2 -#define ENABLE_TEXGEN2 0x4 -#define ENABLE_TEXGEN3 0x8 -#define ENABLE_TEXGEN4 0x10 -#define ENABLE_TEXGEN5 0x20 -#define ENABLE_TEXGEN6 0x40 -#define ENABLE_TEXGEN7 0x80 - -#define ENABLE_TEXMAT0 0x1 /* Ie. not the identity matrix */ -#define ENABLE_TEXMAT1 0x2 -#define ENABLE_TEXMAT2 0x4 -#define ENABLE_TEXMAT3 0x8 -#define ENABLE_TEXMAT4 0x10 -#define ENABLE_TEXMAT5 0x20 -#define ENABLE_TEXMAT6 0x40 -#define ENABLE_TEXMAT7 0x80 - -#define ENABLE_TEXGEN(i) (ENABLE_TEXGEN0 << (i)) -#define ENABLE_TEXMAT(i) (ENABLE_TEXMAT0 << (i)) - -/* - * If teximage is color-index, texelOut returns GLchan[1]. - * If teximage is depth, texelOut returns GLfloat[1]. - * Otherwise, texelOut returns GLchan[4]. - */ -typedef void (*FetchTexelFunc)( const struct gl_texture_image *texImage, - GLint col, GLint row, GLint img, - GLvoid *texelOut ); - -/* Texture format record */ -struct gl_texture_format { - GLint MesaFormat; /* One of the MESA_FORMAT_* values */ - - GLenum BaseFormat; /* Either GL_ALPHA, GL_INTENSITY, GL_LUMINANCE, - * GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA, - * GL_COLOR_INDEX or GL_DEPTH_COMPONENT. - */ - GLubyte RedBits; /* Bits per texel component */ - GLubyte GreenBits; /* These are just rough approximations for */ - GLubyte BlueBits; /* compressed texture formats. */ - GLubyte AlphaBits; - GLubyte LuminanceBits; - GLubyte IntensityBits; - GLubyte IndexBits; - GLubyte DepthBits; - - GLint TexelBytes; /* Bytes per texel (0 for compressed formats */ - - FetchTexelFunc FetchTexel1D; /* Texel fetch function pointers */ - FetchTexelFunc FetchTexel2D; - FetchTexelFunc FetchTexel3D; -}; - - -/* Texture image record */ -struct gl_texture_image { - GLenum Format; /* GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, - * GL_INTENSITY, GL_RGB, GL_RGBA, - * GL_COLOR_INDEX or GL_DEPTH_COMPONENT only. - * Used for choosing TexEnv arithmetic. - */ - GLint IntFormat; /* Internal format as given by the user */ - GLuint Border; /* 0 or 1 */ - GLuint Width; /* = 2^WidthLog2 + 2*Border */ - GLuint Height; /* = 2^HeightLog2 + 2*Border */ - GLuint Depth; /* = 2^DepthLog2 + 2*Border */ - GLuint RowStride; /* == Width unless IsClientData and padded */ - GLuint Width2; /* = Width - 2*Border */ - GLuint Height2; /* = Height - 2*Border */ - GLuint Depth2; /* = Depth - 2*Border */ - GLuint WidthLog2; /* = log2(Width2) */ - GLuint HeightLog2; /* = log2(Height2) */ - GLuint DepthLog2; /* = log2(Depth2) */ - GLuint MaxLog2; /* = MAX(WidthLog2, HeightLog2) */ - GLfloat WidthScale; /* used for mipmap lod computation */ - GLfloat HeightScale; /* used for mipmap lod computation */ - GLfloat DepthScale; /* used for mipmap lod computation */ - GLvoid *Data; /* Image data, accessed via FetchTexel() */ - GLboolean IsClientData; /* Data owned by client? */ - - - const struct gl_texture_format *TexFormat; - - FetchTexelFunc FetchTexel; /* Texel fetch function pointer */ - - GLboolean IsCompressed; /* GL_ARB_texture_compression */ - GLuint CompressedSize; /* GL_ARB_texture_compression */ - - /* For device driver: */ - void *DriverData; /* Arbitrary device driver data */ -}; - - -/* Texture object record */ -struct gl_texture_object { - _glthread_Mutex Mutex; /* for thread safety */ - GLint RefCount; /* reference count */ - GLuint Name; /* an unsigned integer */ - GLenum Target; /* GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */ - GLfloat Priority; /* in [0,1] */ - GLfloat BorderColor[4]; /* unclamped */ - GLchan _BorderChan[4]; /* clamped, as GLchan */ - GLenum WrapS; /* Wrap modes are: GL_CLAMP, REPEAT */ - GLenum WrapT; /* GL_CLAMP_TO_EDGE, and */ - GLenum WrapR; /* GL_CLAMP_TO_BORDER_ARB */ - GLenum MinFilter; /* minification filter */ - GLenum MagFilter; /* magnification filter */ - GLfloat MinLod; /* min lambda, OpenGL 1.2 */ - GLfloat MaxLod; /* max lambda, OpenGL 1.2 */ - GLfloat LodBias; /* lod bias, OpenGL 1.4 */ - GLint BaseLevel; /* min mipmap level, OpenGL 1.2 */ - GLint MaxLevel; /* max mipmap level, OpenGL 1.2 */ - GLfloat MaxAnisotropy; /* GL_EXT_texture_filter_anisotropic */ - GLboolean CompareFlag; /* GL_SGIX_shadow */ - GLenum CompareOperator; /* GL_SGIX_shadow */ - GLfloat ShadowAmbient; - GLenum CompareMode; /* GL_ARB_shadow */ - GLenum CompareFunc; /* GL_ARB_shadow */ - GLenum DepthMode; /* GL_ARB_depth_texture */ - GLint _MaxLevel; /* actual max mipmap level (q in the spec) */ - GLfloat _MaxLambda; /* = _MaxLevel - BaseLevel (q - b in spec) */ - GLboolean GenerateMipmap; /* GL_SGIS_generate_mipmap */ - - struct gl_texture_image *Image[MAX_TEXTURE_LEVELS]; - - /* Texture cube faces */ - /* Image[] is alias for *PosX[MAX_TEXTURE_LEVELS]; */ - struct gl_texture_image *NegX[MAX_TEXTURE_LEVELS]; - struct gl_texture_image *PosY[MAX_TEXTURE_LEVELS]; - struct gl_texture_image *NegY[MAX_TEXTURE_LEVELS]; - struct gl_texture_image *PosZ[MAX_TEXTURE_LEVELS]; - struct gl_texture_image *NegZ[MAX_TEXTURE_LEVELS]; - - /* GL_EXT_paletted_texture */ - struct gl_color_table Palette; - - GLboolean Complete; /* Is texture object complete? */ - struct gl_texture_object *Next; /* Next in linked list */ - - /* For device driver: */ - void *DriverData; /* Arbitrary device driver data */ -}; - - -/* Texture unit record */ -struct gl_texture_unit { - GLuint Enabled; /* bitmask of TEXTURE_*_BIT flags */ - GLuint _ReallyEnabled; /* 0 or exactly one of TEXTURE_*_BIT flags */ - - GLenum EnvMode; /* GL_MODULATE, GL_DECAL, GL_BLEND, etc. */ - GLfloat EnvColor[4]; - GLuint TexGenEnabled; /* Bitwise-OR of [STRQ]_BIT values */ - GLenum GenModeS; /* Tex coord generation mode, either */ - GLenum GenModeT; /* GL_OBJECT_LINEAR, or */ - GLenum GenModeR; /* GL_EYE_LINEAR, or */ - GLenum GenModeQ; /* GL_SPHERE_MAP */ - GLuint _GenBitS; - GLuint _GenBitT; - GLuint _GenBitR; - GLuint _GenBitQ; - GLuint _GenFlags; /* bitwise or of GenBit[STRQ] */ - GLfloat ObjectPlaneS[4]; - GLfloat ObjectPlaneT[4]; - GLfloat ObjectPlaneR[4]; - GLfloat ObjectPlaneQ[4]; - GLfloat EyePlaneS[4]; - GLfloat EyePlaneT[4]; - GLfloat EyePlaneR[4]; - GLfloat EyePlaneQ[4]; - GLfloat LodBias; /* for biasing mipmap levels */ - - /* GL_EXT_texture_env_combine */ - GLenum CombineModeRGB; /* GL_REPLACE, GL_DECAL, GL_ADD, etc. */ - GLenum CombineModeA; /* GL_REPLACE, GL_DECAL, GL_ADD, etc. */ - GLenum CombineSourceRGB[3]; /* GL_PRIMARY_COLOR, GL_TEXTURE, etc. */ - GLenum CombineSourceA[3]; /* GL_PRIMARY_COLOR, GL_TEXTURE, etc. */ - GLenum CombineOperandRGB[3]; /* SRC_COLOR, ONE_MINUS_SRC_COLOR, etc */ - GLenum CombineOperandA[3]; /* SRC_ALPHA, ONE_MINUS_SRC_ALPHA, etc */ - GLuint CombineScaleShiftRGB; /* 0, 1 or 2 */ - GLuint CombineScaleShiftA; /* 0, 1 or 2 */ - - struct gl_texture_object *Current1D; - struct gl_texture_object *Current2D; - struct gl_texture_object *Current3D; - struct gl_texture_object *CurrentCubeMap; /* GL_ARB_texture_cube_map */ - struct gl_texture_object *CurrentRect; /* GL_NV_texture_rectangle */ - - struct gl_texture_object *_Current; /* Points to really enabled tex obj */ - - struct gl_texture_object Saved1D; /* only used by glPush/PopAttrib */ - struct gl_texture_object Saved2D; - struct gl_texture_object Saved3D; - struct gl_texture_object SavedCubeMap; - struct gl_texture_object SavedRect; -}; - - -/* The texture attribute group */ -struct gl_texture_attrib { - /* multitexture */ - GLuint CurrentUnit; /* Active texture unit */ - - GLuint _EnabledUnits; /* one bit set for each really-enabled unit */ - GLuint _GenFlags; /* for texgen */ - GLuint _TexGenEnabled; - GLuint _TexMatEnabled; - - struct gl_texture_unit Unit[MAX_TEXTURE_UNITS]; - - struct gl_texture_object *Proxy1D; - struct gl_texture_object *Proxy2D; - struct gl_texture_object *Proxy3D; - struct gl_texture_object *ProxyCubeMap; - struct gl_texture_object *ProxyRect; - - /* GL_EXT_shared_texture_palette */ - GLboolean SharedPalette; - struct gl_color_table Palette; -}; - - -struct gl_transform_attrib { - GLenum MatrixMode; /* Matrix mode */ - GLfloat EyeUserPlane[MAX_CLIP_PLANES][4]; - GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4]; /* derived */ - GLuint ClipPlanesEnabled; /* on/off bitmask */ - GLboolean Normalize; /* Normalize all normals? */ - GLboolean RescaleNormals; /* GL_EXT_rescale_normal */ - GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ -}; - - -struct gl_viewport_attrib { - GLint X, Y; /* position */ - GLsizei Width, Height; /* size */ - GLfloat Near, Far; /* Depth buffer range */ - GLmatrix _WindowMap; /* Mapping transformation as a matrix. */ -}; - - -/* For the attribute stack: */ -struct gl_attrib_node { - GLbitfield kind; - void *data; - struct gl_attrib_node *next; -}; - - -/* - * Client pixel packing/unpacking attributes - */ -struct gl_pixelstore_attrib { - GLint Alignment; - GLint RowLength; - GLint SkipPixels; - GLint SkipRows; - GLint ImageHeight; /* for GL_EXT_texture3D */ - GLint SkipImages; /* for GL_EXT_texture3D */ - GLboolean SwapBytes; - GLboolean LsbFirst; - GLboolean ClientStorage; /* GL_APPLE_client_storage */ - GLboolean Invert; /* GL_MESA_pack_invert */ -}; - - -#define CA_CLIENT_DATA 0x1 /* Data not alloced by mesa */ - - -/* - * Client vertex array attributes - */ -struct gl_client_array { - GLint Size; - GLenum Type; - GLsizei Stride; /* user-specified stride */ - GLsizei StrideB; /* actual stride in bytes */ - void *Ptr; - GLuint Flags; - GLuint Enabled; /* one of the _NEW_ARRAY_ bits */ -}; - - -struct gl_array_attrib { - struct gl_client_array Vertex; /* client data descriptors */ - struct gl_client_array Normal; - struct gl_client_array Color; - struct gl_client_array SecondaryColor; - struct gl_client_array FogCoord; - struct gl_client_array Index; - struct gl_client_array TexCoord[MAX_TEXTURE_UNITS]; - struct gl_client_array EdgeFlag; - - struct gl_client_array VertexAttrib[16]; /* GL_NV_vertex_program */ - - GLint TexCoordInterleaveFactor; - GLint ActiveTexture; /* Client Active Texture */ - GLuint LockFirst; - GLuint LockCount; - - GLuint _Enabled; /* _NEW_ARRAY_* - bit set if array enabled */ - GLuint NewState; /* _NEW_ARRAY_* */ -}; - - -struct gl_feedback { - GLenum Type; - GLuint _Mask; /* FB_* bits */ - GLfloat *Buffer; - GLuint BufferSize; - GLuint Count; -}; - - -struct gl_selection { - GLuint *Buffer; - GLuint BufferSize; /* size of SelectBuffer */ - GLuint BufferCount; /* number of values in SelectBuffer */ - GLuint Hits; /* number of records in SelectBuffer */ - GLuint NameStackDepth; - GLuint NameStack[MAX_NAME_STACK_DEPTH]; - GLboolean HitFlag; - GLfloat HitMinZ, HitMaxZ; -}; - - -/* - * 1-D Evaluator control points - */ -struct gl_1d_map { - GLuint Order; /* Number of control points */ - GLfloat u1, u2, du; /* u1, u2, 1.0/(u2-u1) */ - GLfloat *Points; /* Points to contiguous control points */ -}; - - -/* - * 2-D Evaluator control points - */ -struct gl_2d_map { - GLuint Uorder; /* Number of control points in U dimension */ - GLuint Vorder; /* Number of control points in V dimension */ - GLfloat u1, u2, du; - GLfloat v1, v2, dv; - GLfloat *Points; /* Points to contiguous control points */ -}; - - -/* - * All evalutator control points - */ -struct gl_evaluators { - /* 1-D maps */ - struct gl_1d_map Map1Vertex3; - struct gl_1d_map Map1Vertex4; - struct gl_1d_map Map1Index; - struct gl_1d_map Map1Color4; - struct gl_1d_map Map1Normal; - struct gl_1d_map Map1Texture1; - struct gl_1d_map Map1Texture2; - struct gl_1d_map Map1Texture3; - struct gl_1d_map Map1Texture4; - struct gl_1d_map Map1Attrib[16]; /* GL_NV_vertex_program */ - - /* 2-D maps */ - struct gl_2d_map Map2Vertex3; - struct gl_2d_map Map2Vertex4; - struct gl_2d_map Map2Index; - struct gl_2d_map Map2Color4; - struct gl_2d_map Map2Normal; - struct gl_2d_map Map2Texture1; - struct gl_2d_map Map2Texture2; - struct gl_2d_map Map2Texture3; - struct gl_2d_map Map2Texture4; - struct gl_2d_map Map2Attrib[16]; /* GL_NV_vertex_program */ -}; - - -/* - * Vertex program tokens and datatypes - */ - -#define VP_MAX_INSTRUCTIONS 128 - -#define VP_NUM_INPUT_REGS VERT_ATTRIB_MAX -#define VP_NUM_OUTPUT_REGS 15 -#define VP_NUM_TEMP_REGS 12 -#define VP_NUM_PROG_REGS 96 - -#define VP_NUM_TOTAL_REGISTERS (VP_NUM_INPUT_REGS + VP_NUM_OUTPUT_REGS + VP_NUM_TEMP_REGS + VP_NUM_PROG_REGS) - -/* Location of register sets within the whole register file */ -#define VP_INPUT_REG_START 0 -#define VP_INPUT_REG_END (VP_INPUT_REG_START + VP_NUM_INPUT_REGS - 1) -#define VP_OUTPUT_REG_START (VP_INPUT_REG_END + 1) -#define VP_OUTPUT_REG_END (VP_OUTPUT_REG_START + VP_NUM_OUTPUT_REGS - 1) -#define VP_TEMP_REG_START (VP_OUTPUT_REG_END + 1) -#define VP_TEMP_REG_END (VP_TEMP_REG_START + VP_NUM_TEMP_REGS - 1) -#define VP_PROG_REG_START (VP_TEMP_REG_END + 1) -#define VP_PROG_REG_END (VP_PROG_REG_START + VP_NUM_PROG_REGS - 1) - - -/* Machine state (i.e. the register file) */ -struct vp_machine -{ - GLfloat Registers[VP_NUM_TOTAL_REGISTERS][4]; - GLint AddressReg; /* might someday be a 4-vector */ -}; - - -/* Vertex program opcodes */ -enum vp_opcode -{ - MOV, - LIT, - RCP, - RSQ, - EXP, - LOG, - MUL, - ADD, - DP3, - DP4, - DST, - MIN, - MAX, - SLT, - SGE, - MAD, - ARL, - DPH, - RCC, - SUB, - ABS, - END -}; - - -/* Instruction source register */ -struct vp_src_register -{ - GLint Register; /* or the offset from the address register */ - GLuint Swizzle[4]; - GLboolean Negate; - GLboolean RelAddr; -}; - - -/* Instruction destination register */ -struct vp_dst_register -{ - GLint Register; - GLboolean WriteMask[4]; -}; - - -/* Vertex program instruction */ -struct vp_instruction -{ - enum vp_opcode Opcode; - struct vp_src_register SrcReg[3]; - struct vp_dst_register DstReg; -}; - - -/* The actual vertex program, stored in the hash table */ -struct vp_program -{ - GLubyte *String; /* Original user code */ - struct vp_instruction *Instructions; /* Compiled instructions */ - GLenum Target; /* GL_VERTEX_PROGRAM_NV or GL_VERTEX_STATE_PROGRAM_NV */ - GLint RefCount; /* Since programs can be shared among contexts */ - GLboolean IsPositionInvariant; /* GL_NV_vertex_program1_1 */ - GLboolean Resident; - GLuint InputsRead; /* Bitmask of which input regs are read */ - GLuint OutputsWritten; /* Bitmask of which output regs are written to */ -}; - - -/* - * State vars for GL_NV_vertex_program - */ -struct vertex_program_state -{ - GLboolean Enabled; /* GL_VERTEX_PROGRAM_NV */ - GLboolean PointSizeEnabled; /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - GLboolean TwoSideEnabled; /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - GLuint CurrentID; /* currently bound program's ID */ - GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_NV */ - struct vp_program *Current; /* ptr to currently bound program */ - struct vp_machine Machine; /* machine state */ - - GLenum TrackMatrix[VP_NUM_PROG_REGS / 4]; - GLenum TrackMatrixTransform[VP_NUM_PROG_REGS / 4]; -}; - - - -/* - * State which can be shared by multiple contexts: - */ -struct gl_shared_state { - _glthread_Mutex Mutex; /* for thread safety */ - GLint RefCount; /* Reference count */ - struct _mesa_HashTable *DisplayList; /* Display lists hash table */ - struct _mesa_HashTable *TexObjects; /* Texture objects hash table */ - struct gl_texture_object *TexObjectList;/* Linked list of texture objects */ - - /* Default texture objects (shared by all multi-texture units) */ - struct gl_texture_object *Default1D; - struct gl_texture_object *Default2D; - struct gl_texture_object *Default3D; - struct gl_texture_object *DefaultCubeMap; - struct gl_texture_object *DefaultRect; - - /* GL_NV_vertex_program */ - struct _mesa_HashTable *VertexPrograms; - - void *DriverData; /* Device driver shared state */ -}; - - -/* - * A "frame buffer" is a color buffer and its optional ancillary buffers: - * depth, accum, stencil, and software-simulated alpha buffers. - * In C++ terms, think of this as a base class from which device drivers - * will make derived classes. - */ -struct gl_frame_buffer { - GLvisual Visual; /* The corresponding visual */ - - GLuint Width, Height; /* size of frame buffer in pixels */ - - GLboolean UseSoftwareDepthBuffer; - GLboolean UseSoftwareAccumBuffer; - GLboolean UseSoftwareStencilBuffer; - GLboolean UseSoftwareAlphaBuffers; - - /* Software depth (aka Z) buffer */ - GLvoid *DepthBuffer; /* array [Width*Height] of GLushort or GLuint*/ - - /* Software stencil buffer */ - GLstencil *Stencil; /* array [Width*Height] of GLstencil values */ - - /* Software accumulation buffer */ - GLaccum *Accum; /* array [4*Width*Height] of GLaccum values */ - - /* Software alpha planes */ - GLvoid *FrontLeftAlpha; /* array [Width*Height] of GLubyte */ - GLvoid *BackLeftAlpha; /* array [Width*Height] of GLubyte */ - GLvoid *FrontRightAlpha; /* array [Width*Height] of GLubyte */ - GLvoid *BackRightAlpha; /* array [Width*Height] of GLubyte */ - - /* Drawing bounds: intersection of window size and scissor box */ - GLint _Xmin, _Ymin; /* inclusive */ - GLint _Xmax, _Ymax; /* exclusive */ -}; - - -/* - * Constants which may be overriden by device driver during context creation - * but are never changed after that. - */ -struct gl_constants { - GLint MaxTextureLevels; - GLint Max3DTextureLevels; - GLint MaxCubeTextureLevels; /* GL_ARB_texture_cube_map */ - GLint MaxTextureRectSize; /* GL_NV_texture_rectangle */ - GLuint MaxTextureUnits; - GLfloat MaxTextureMaxAnisotropy; /* GL_EXT_texture_filter_anisotropic */ - GLfloat MaxTextureLodBias; /* GL_EXT_texture_lod_bias */ - GLuint MaxArrayLockSize; - GLint SubPixelBits; - GLfloat MinPointSize, MaxPointSize; /* aliased */ - GLfloat MinPointSizeAA, MaxPointSizeAA; /* antialiased */ - GLfloat PointSizeGranularity; - GLfloat MinLineWidth, MaxLineWidth; /* aliased */ - GLfloat MinLineWidthAA, MaxLineWidthAA; /* antialiased */ - GLfloat LineWidthGranularity; - GLuint NumAuxBuffers; - GLuint MaxColorTableSize; - GLuint MaxConvolutionWidth; - GLuint MaxConvolutionHeight; - GLuint MaxClipPlanes; - GLuint MaxLights; -}; - - -/* - * List of extensions. - */ -struct extension; -struct gl_extensions { - char *ext_string; - struct extension *ext_list; - /* Flags to quickly test if certain extensions are available. - * Not every extension needs to have such a flag, but it's encouraged. - */ - GLboolean ARB_depth_texture; - GLboolean ARB_imaging; - GLboolean ARB_multisample; - GLboolean ARB_multitexture; - GLboolean ARB_shadow; - GLboolean ARB_texture_border_clamp; - GLboolean ARB_texture_compression; - GLboolean ARB_texture_cube_map; - GLboolean ARB_texture_env_combine; - GLboolean ARB_texture_env_crossbar; - GLboolean ARB_texture_env_dot3; - GLboolean ARB_texture_mirrored_repeat; - GLboolean ARB_window_pos; - GLboolean ATI_texture_env_combine3; - GLboolean ATI_texture_mirror_once; - GLboolean EXT_blend_color; - GLboolean EXT_blend_func_separate; - GLboolean EXT_blend_logic_op; - GLboolean EXT_blend_minmax; - GLboolean EXT_blend_subtract; - GLboolean EXT_convolution; - GLboolean EXT_compiled_vertex_array; - GLboolean EXT_fog_coord; - GLboolean EXT_histogram; - GLboolean EXT_multi_draw_arrays; - GLboolean EXT_paletted_texture; - GLboolean EXT_point_parameters; - GLboolean EXT_shadow_funcs; - GLboolean EXT_secondary_color; - GLboolean EXT_shared_texture_palette; - GLboolean EXT_stencil_wrap; - GLboolean EXT_stencil_two_side; - GLboolean EXT_texture3D; - GLboolean EXT_texture_compression_s3tc; - GLboolean EXT_texture_env_add; - GLboolean EXT_texture_env_combine; - GLboolean EXT_texture_env_dot3; - GLboolean EXT_texture_filter_anisotropic; - GLboolean EXT_texture_lod_bias; - GLboolean EXT_vertex_array_set; - GLboolean HP_occlusion_test; - GLboolean IBM_rasterpos_clip; - GLboolean MESA_pack_invert; - GLboolean MESA_resize_buffers; - GLboolean MESA_ycbcr_texture; - GLboolean NV_blend_square; - GLboolean NV_point_sprite; - GLboolean NV_texture_rectangle; - GLboolean NV_vertex_program; - GLboolean NV_vertex_program1_1; - GLboolean SGI_color_matrix; - GLboolean SGI_color_table; - GLboolean SGIS_generate_mipmap; - GLboolean SGIS_pixel_texture; - GLboolean SGIS_texture_edge_clamp; - GLboolean SGIX_depth_texture; - GLboolean SGIX_pixel_texture; - GLboolean SGIX_shadow; - GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */ - GLboolean TDFX_texture_compression_FXT1; - GLboolean APPLE_client_storage; -}; - - -/* - * A stack of matrices (projection, modelview, color, texture, etc). - */ -struct matrix_stack -{ - GLmatrix *Top; /* points into Stack */ - GLmatrix *Stack; /* array [MaxDepth] of GLmatrix */ - GLuint Depth; /* 0 <= Depth < MaxDepth */ - GLuint MaxDepth; /* size of Stack[] array */ - GLuint DirtyFlag; /* _NEW_MODELVIEW or _NEW_PROJECTION, for example */ -}; - - -/* - * Bits for image transfer operations (ctx->ImageTransferState). - */ -#define IMAGE_SCALE_BIAS_BIT 0x1 -#define IMAGE_SHIFT_OFFSET_BIT 0x2 -#define IMAGE_MAP_COLOR_BIT 0x4 -#define IMAGE_COLOR_TABLE_BIT 0x8 -#define IMAGE_CONVOLUTION_BIT 0x10 -#define IMAGE_POST_CONVOLUTION_SCALE_BIAS 0x20 -#define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40 -#define IMAGE_COLOR_MATRIX_BIT 0x80 -#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100 -#define IMAGE_HISTOGRAM_BIT 0x200 -#define IMAGE_MIN_MAX_BIT 0x400 - -/* transfer ops up to convolution: */ -#define IMAGE_PRE_CONVOLUTION_BITS (IMAGE_SCALE_BIAS_BIT | \ - IMAGE_SHIFT_OFFSET_BIT | \ - IMAGE_MAP_COLOR_BIT | \ - IMAGE_COLOR_TABLE_BIT) - -/* transfer ops after convolution: */ -#define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \ - IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \ - IMAGE_COLOR_MATRIX_BIT | \ - IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT |\ - IMAGE_HISTOGRAM_BIT | \ - IMAGE_MIN_MAX_BIT) - - -/* - * Bits to indicate what state has changed. 6 unused flags. - */ -#define _NEW_MODELVIEW 0x1 /* ctx->ModelView */ -#define _NEW_PROJECTION 0x2 /* ctx->Projection */ -#define _NEW_TEXTURE_MATRIX 0x4 /* ctx->TextureMatrix */ -#define _NEW_COLOR_MATRIX 0x8 /* ctx->ColorMatrix */ -#define _NEW_ACCUM 0x10 /* ctx->Accum */ -#define _NEW_COLOR 0x20 /* ctx->Color */ -#define _NEW_DEPTH 0x40 /* ctx->Depth */ -#define _NEW_EVAL 0x80 /* ctx->Eval, ctx->EvalMap */ -#define _NEW_FOG 0x100 /* ctx->Fog */ -#define _NEW_HINT 0x200 /* ctx->Hint */ -#define _NEW_LIGHT 0x400 /* ctx->Light */ -#define _NEW_LINE 0x800 /* ctx->Line */ -#define _NEW_PIXEL 0x1000 /* ctx->Pixel */ -#define _NEW_POINT 0x2000 /* ctx->Point */ -#define _NEW_POLYGON 0x4000 /* ctx->Polygon */ -#define _NEW_POLYGONSTIPPLE 0x8000 /* ctx->PolygonStipple */ -#define _NEW_SCISSOR 0x10000 /* ctx->Scissor */ -#define _NEW_STENCIL 0x20000 /* ctx->Stencil */ -#define _NEW_TEXTURE 0x40000 /* ctx->Texture */ -#define _NEW_TRANSFORM 0x80000 /* ctx->Transform */ -#define _NEW_VIEWPORT 0x100000 /* ctx->Viewport */ -#define _NEW_PACKUNPACK 0x200000 /* ctx->Pack, ctx->Unpack */ -#define _NEW_ARRAY 0x400000 /* ctx->Array */ -#define _NEW_RENDERMODE 0x800000 /* RenderMode, Feedback, Select */ -#define _NEW_BUFFERS 0x1000000 /* ctx->Visual, ctx->DrawBuffer, */ -#define _NEW_MULTISAMPLE 0x2000000 /* ctx->Multisample */ -#define _NEW_TRACK_MATRIX 0x4000000 /* ctx->VertexProgram */ -#define _NEW_PROGRAM 0x8000000 /* ctx->VertexProgram */ -#define _NEW_ALL ~0 - - - -/* Bits to track array state changes (also used to summarize array enabled) - */ -#define _NEW_ARRAY_VERTEX VERT_BIT_POS -#define _NEW_ARRAY_WEIGHT VERT_BIT_WEIGHT -#define _NEW_ARRAY_NORMAL VERT_BIT_NORMAL -#define _NEW_ARRAY_COLOR0 VERT_BIT_COLOR0 -#define _NEW_ARRAY_COLOR1 VERT_BIT_COLOR1 -#define _NEW_ARRAY_FOGCOORD VERT_BIT_FOG -#define _NEW_ARRAY_INDEX VERT_BIT_SIX -#define _NEW_ARRAY_EDGEFLAG VERT_BIT_SEVEN -#define _NEW_ARRAY_TEXCOORD_0 VERT_BIT_TEX0 -#define _NEW_ARRAY_TEXCOORD_1 VERT_BIT_TEX1 -#define _NEW_ARRAY_TEXCOORD_2 VERT_BIT_TEX2 -#define _NEW_ARRAY_TEXCOORD_3 VERT_BIT_TEX3 -#define _NEW_ARRAY_TEXCOORD_4 VERT_BIT_TEX4 -#define _NEW_ARRAY_TEXCOORD_5 VERT_BIT_TEX5 -#define _NEW_ARRAY_TEXCOORD_6 VERT_BIT_TEX6 -#define _NEW_ARRAY_TEXCOORD_7 VERT_BIT_TEX7 -#define _NEW_ARRAY_ATTRIB_0 0x10000 /* start at bit 16 */ -#define _NEW_ARRAY_ALL 0xffffffff - - -#define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i)) -#define _NEW_ARRAY_ATTRIB(i) (_NEW_ARRAY_ATTRIB_0 << (i)) - - -/* A bunch of flags that we think might be useful to drivers. - * Set in the ctx->_TriangleCaps bitfield. - */ -#define DD_FLATSHADE 0x1 -#define DD_SEPARATE_SPECULAR 0x2 -#define DD_TRI_CULL_FRONT_BACK 0x4 /* special case on some hw */ -#define DD_TRI_LIGHT_TWOSIDE 0x8 -#define DD_TRI_UNFILLED 0x10 -#define DD_TRI_SMOOTH 0x20 -#define DD_TRI_STIPPLE 0x40 -#define DD_TRI_OFFSET 0x80 -#define DD_LINE_SMOOTH 0x100 -#define DD_LINE_STIPPLE 0x200 -#define DD_LINE_WIDTH 0x400 -#define DD_POINT_SMOOTH 0x800 -#define DD_POINT_SIZE 0x1000 -#define DD_POINT_ATTEN 0x2000 - - -/* Define the state changes under which each of these bits might change - */ -#define _DD_NEW_FLATSHADE _NEW_LIGHT -#define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG) -#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON -#define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT -#define _DD_NEW_TRI_UNFILLED _NEW_POLYGON -#define _DD_NEW_TRI_SMOOTH _NEW_POLYGON -#define _DD_NEW_TRI_STIPPLE _NEW_POLYGON -#define _DD_NEW_TRI_OFFSET _NEW_POLYGON -#define _DD_NEW_LINE_SMOOTH _NEW_LINE -#define _DD_NEW_LINE_STIPPLE _NEW_LINE -#define _DD_NEW_LINE_WIDTH _NEW_LINE -#define _DD_NEW_POINT_SMOOTH _NEW_POINT -#define _DD_NEW_POINT_SIZE _NEW_POINT -#define _DD_NEW_POINT_ATTEN _NEW_POINT - -#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ - _NEW_TEXTURE | \ - _NEW_POINT | \ - _NEW_MODELVIEW) - -#define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \ - _NEW_TEXTURE) - -#define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL | _NEW_COLOR_MATRIX) - - -/* Bits for ctx->_NeedNormals */ -#define NEED_NORMALS_TEXGEN 0x1 -#define NEED_NORMALS_LIGHT 0x2 - -/* Bits for ctx->_NeedEyeCoords */ -#define NEED_EYE_TEXGEN 0x1 -#define NEED_EYE_LIGHT 0x2 -#define NEED_EYE_LIGHT_MODELVIEW 0x4 -#define NEED_EYE_POINT_ATTEN 0x8 -#define NEED_EYE_DRIVER 0x10 - - -/* - * Forward declaration of display list datatypes: - */ -union node; -typedef union node Node; - - -/* This has to be included here. */ -#include "dd.h" - - -/* - * Core Mesa's support for tnl modules: - */ -#define NUM_VERTEX_FORMAT_ENTRIES (sizeof(GLvertexformat) / sizeof(void *)) - -struct gl_tnl_module { - /* Vertex format to be lazily swapped into current dispatch. - */ - GLvertexformat *Current; - - /* Record of functions swapped out. On restore, only need to swap - * these functions back in. - */ - void *Swapped[NUM_VERTEX_FORMAT_ENTRIES][2]; - GLuint SwapCount; -}; - - -/** - * This is the central context data structure for Mesa. Almost all - * OpenGL state is contained in this structure. - * Think of this as a base class from which device drivers will derive - * sub classes. - */ -struct __GLcontextRec { - /** - * OS related interfaces; these *must* be the first members of this - * structure, because they are exposed to the outside world (i.e. GLX - * extension). - */ - __GLimports imports; - __GLexports exports; - - /* State possibly shared with other contexts in the address space */ - struct gl_shared_state *Shared; - - /* API function pointer tables */ - struct _glapi_table *Save; /**< Display list save funcs */ - struct _glapi_table *Exec; /**< Execute funcs */ - struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */ - - GLboolean ExecPrefersFloat; /**< What preference for color conversion? */ - GLboolean SavePrefersFloat; - - GLvisual Visual; - GLframebuffer *DrawBuffer; /**< buffer for writing */ - GLframebuffer *ReadBuffer; /**< buffer for reading */ - - /** - * Device driver function pointer table - */ - struct dd_function_table Driver; - - void *DriverCtx; /**< Points to device driver context/state */ - void *DriverMgrCtx; /**< Points to device driver manager (optional)*/ - - /* Core/Driver constants */ - struct gl_constants Const; - - /* The various 4x4 matrix stacks */ - struct matrix_stack ModelviewMatrixStack; - struct matrix_stack ProjectionMatrixStack; - struct matrix_stack ColorMatrixStack; - struct matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS]; - struct matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; - struct matrix_stack *CurrentStack; /* Points to one of the above stacks */ - - /* Combined modelview and projection matrix */ - GLmatrix _ModelProjectMatrix; - - /* Display lists */ - GLuint CallDepth; /* Current recursion calling depth */ - GLboolean ExecuteFlag; /* Execute GL commands? */ - GLboolean CompileFlag; /* Compile GL commands into display list? */ - Node *CurrentListPtr; /* Head of list being compiled */ - GLuint CurrentListNum; /* Number of the list being compiled */ - Node *CurrentBlock; /* Pointer to current block of nodes */ - GLuint CurrentPos; /* Index into current block of nodes */ - - /* Extensions */ - struct gl_extensions Extensions; - - /* Renderer attribute stack */ - GLuint AttribStackDepth; - struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH]; - - /* Renderer attribute groups */ - struct gl_accum_attrib Accum; - struct gl_colorbuffer_attrib Color; - struct gl_current_attrib Current; - struct gl_depthbuffer_attrib Depth; - struct gl_eval_attrib Eval; - struct gl_fog_attrib Fog; - struct gl_hint_attrib Hint; - struct gl_light_attrib Light; - struct gl_line_attrib Line; - struct gl_list_attrib List; - struct gl_multisample_attrib Multisample; - struct gl_pixel_attrib Pixel; - struct gl_point_attrib Point; - struct gl_polygon_attrib Polygon; - GLuint PolygonStipple[32]; - struct gl_scissor_attrib Scissor; - struct gl_stencil_attrib Stencil; - struct gl_texture_attrib Texture; - struct gl_transform_attrib Transform; - struct gl_viewport_attrib Viewport; - - /* Other attribute groups */ - struct gl_histogram_attrib Histogram; - struct gl_minmax_attrib MinMax; - struct gl_convolution_attrib Convolution1D; - struct gl_convolution_attrib Convolution2D; - struct gl_convolution_attrib Separable2D; - - /* Client attribute stack */ - GLuint ClientAttribStackDepth; - struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH]; - - /* Client attribute groups */ - struct gl_array_attrib Array; /* Vertex arrays */ - struct gl_pixelstore_attrib Pack; /* Pixel packing */ - struct gl_pixelstore_attrib Unpack; /* Pixel unpacking */ - - struct gl_evaluators EvalMap; /* All evaluators */ - struct gl_feedback Feedback; /* Feedback */ - struct gl_selection Select; /* Selection */ - - struct gl_color_table ColorTable; /* Pre-convolution */ - struct gl_color_table ProxyColorTable; /* Pre-convolution */ - struct gl_color_table PostConvolutionColorTable; - struct gl_color_table ProxyPostConvolutionColorTable; - struct gl_color_table PostColorMatrixColorTable; - struct gl_color_table ProxyPostColorMatrixColorTable; - - struct vertex_program_state VertexProgram; /* GL_NV_vertex_program */ - - GLenum ErrorValue; /* Last error code */ - GLenum RenderMode; /* either GL_RENDER, GL_SELECT, GL_FEEDBACK */ - GLuint NewState; /* bitwise-or of _NEW_* flags */ - - /* Derived */ - GLuint _TriangleCaps; /* bitwise-or of DD_* flags */ - GLuint _ImageTransferState;/* bitwise-or of IMAGE_*_BIT flags */ - GLfloat _EyeZDir[3]; - GLfloat _ModelViewInvScale; - GLuint _NeedEyeCoords; - GLuint _NeedNormals; /* Are vertex normal vectors needed? */ - - struct gl_shine_tab *_ShineTable[2]; /* Active shine tables */ - struct gl_shine_tab *_ShineTabList; /* Mru list of inactive shine tables */ - - struct gl_list_extensions listext; /* driver dlist extensions */ - - - GLboolean OcclusionResult; /**< for GL_HP_occlusion_test */ - GLboolean OcclusionResultSaved; /**< for GL_HP_occlusion_test */ - GLuint _Facing; /* This is a hack for 2-sided stencil test. We don't */ - /* have a better way to communicate this value from */ - /* swrast_setup to swrast. */ - - - /* Z buffer stuff */ - GLuint DepthMax; /**< Max depth buffer value */ - GLfloat DepthMaxF; /**< Float max depth buffer value */ - GLfloat MRD; /**< minimum resolvable difference in Z values */ - - /** Should 3Dfx Glide driver catch signals? */ - GLboolean CatchSignals; - - /** For debugging/development only */ - GLboolean NoRaster; - GLboolean FirstTimeCurrent; - - /** Dither disable via MESA_NO_DITHER env var */ - GLboolean NoDither; - - GLboolean Rendering; - -#if defined(MESA_TRACE) - struct _glapi_table *TraceDispatch; - trace_context_t *TraceCtx; -#else - void *TraceDispatch; - void *TraceCtx; -#endif - - /* Core tnl module support */ - struct gl_tnl_module TnlModule; - - /* Hooks for module contexts. These will eventually live - * in the driver or elsewhere. - */ - void *swrast_context; - void *swsetup_context; - void *swtnl_context; - void *swtnl_im; - void *acache_context; - void *aelt_context; -}; - - -/* The string names for GL_POINT, GL_LINE_LOOP, etc */ -extern const char *_mesa_prim_name[GL_POLYGON+4]; - -#ifdef MESA_DEBUG -extern int MESA_VERBOSE; -extern int MESA_DEBUG_FLAGS; -#else -# define MESA_VERBOSE 0 -# define MESA_DEBUG_FLAGS 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif - - -enum _verbose { - VERBOSE_VARRAY = 0x0001, - VERBOSE_TEXTURE = 0x0002, - VERBOSE_IMMEDIATE = 0x0004, - VERBOSE_PIPELINE = 0x0008, - VERBOSE_DRIVER = 0x0010, - VERBOSE_STATE = 0x0020, - VERBOSE_API = 0x0040, - VERBOSE_DISPLAY_LIST = 0x0100, - VERBOSE_LIGHTING = 0x0200, - VERBOSE_PRIMS = 0x0400, - VERBOSE_VERTS = 0x0800 -}; - - -enum _debug { - DEBUG_ALWAYS_FLUSH = 0x1 -}; - - - -#define Elements(x) sizeof(x)/sizeof(*(x)) - - -/* Eventually let the driver specify what statechanges require a flush: - */ -#define FLUSH_VERTICES(ctx, newstate) \ -do { \ - if (MESA_VERBOSE & VERBOSE_STATE) \ - _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", __FUNCTION__); \ - if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \ - ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \ - ctx->NewState |= newstate; \ -} while (0) - -#define FLUSH_CURRENT(ctx, newstate) \ -do { \ - if (MESA_VERBOSE & VERBOSE_STATE) \ - _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", __FUNCTION__); \ - if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \ - ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \ - ctx->NewState |= newstate; \ -} while (0) - -#define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \ -do { \ - if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \ - _mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ - return retval; \ - } \ -} while (0) - -#define ASSERT_OUTSIDE_BEGIN_END(ctx) \ -do { \ - if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \ - _mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \ - return; \ - } \ -} while (0) - -#define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx) \ -do { \ - ASSERT_OUTSIDE_BEGIN_END(ctx); \ - FLUSH_VERTICES(ctx, 0); \ -} while (0) - -#define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval) \ -do { \ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval); \ - FLUSH_VERTICES(ctx, 0); \ -} while (0) - - - - -#endif /* TYPES_H */ Index: xc/extras/Mesa/src/pixel.c diff -u xc/extras/Mesa/src/pixel.c:1.11 xc/extras/Mesa/src/pixel.c:removed --- xc/extras/Mesa/src/pixel.c:1.11 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/pixel.c Wed Mar 16 21:00:32 2005 @@ -1,1329 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "imports.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "pixel.h" -#include "mtypes.h" - - -/**********************************************************************/ -/***** glPixelZoom *****/ -/**********************************************************************/ - - - -void -_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ) -{ - GET_CURRENT_CONTEXT(ctx); - - if (ctx->Pixel.ZoomX == xfactor && - ctx->Pixel.ZoomY == yfactor) - return; - - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.ZoomX = xfactor; - ctx->Pixel.ZoomY = yfactor; -} - - - -/**********************************************************************/ -/***** glPixelStore *****/ -/**********************************************************************/ - - -void -_mesa_PixelStorei( GLenum pname, GLint param ) -{ - /* NOTE: this call can't be compiled into the display list */ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (pname) { - case GL_PACK_SWAP_BYTES: - if (param == (GLint)ctx->Pack.SwapBytes) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.SwapBytes = param ? GL_TRUE : GL_FALSE; - break; - case GL_PACK_LSB_FIRST: - if (param == (GLint)ctx->Pack.LsbFirst) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.LsbFirst = param ? GL_TRUE : GL_FALSE; - break; - case GL_PACK_ROW_LENGTH: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.RowLength == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.RowLength = param; - break; - case GL_PACK_IMAGE_HEIGHT: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.ImageHeight == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.ImageHeight = param; - break; - case GL_PACK_SKIP_PIXELS: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.SkipPixels == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.SkipPixels = param; - break; - case GL_PACK_SKIP_ROWS: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.SkipRows == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.SkipRows = param; - break; - case GL_PACK_SKIP_IMAGES: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.SkipImages == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.SkipImages = param; - break; - case GL_PACK_ALIGNMENT: - if (param!=1 && param!=2 && param!=4 && param!=8) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Pack.Alignment == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.Alignment = param; - break; - case GL_PACK_INVERT_MESA: - if (!ctx->Extensions.MESA_pack_invert) { - _mesa_error( ctx, GL_INVALID_ENUM, "glPixelstore(pname)" ); - return; - } - if (ctx->Pack.Invert == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Pack.Invert = param; - break; - - case GL_UNPACK_SWAP_BYTES: - if (param == (GLint)ctx->Unpack.SwapBytes) - return; - if ((GLint)ctx->Unpack.SwapBytes == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.SwapBytes = param ? GL_TRUE : GL_FALSE; - break; - case GL_UNPACK_LSB_FIRST: - if (param == (GLint)ctx->Unpack.LsbFirst) - return; - if ((GLint)ctx->Unpack.LsbFirst == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.LsbFirst = param ? GL_TRUE : GL_FALSE; - break; - case GL_UNPACK_ROW_LENGTH: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Unpack.RowLength == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.RowLength = param; - break; - case GL_UNPACK_IMAGE_HEIGHT: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Unpack.ImageHeight == param) - return; - - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.ImageHeight = param; - break; - case GL_UNPACK_SKIP_PIXELS: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Unpack.SkipPixels == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.SkipPixels = param; - break; - case GL_UNPACK_SKIP_ROWS: - if (param<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Unpack.SkipRows == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.SkipRows = param; - break; - case GL_UNPACK_SKIP_IMAGES: - if (param < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" ); - return; - } - if (ctx->Unpack.SkipImages == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.SkipImages = param; - break; - case GL_UNPACK_ALIGNMENT: - if (param!=1 && param!=2 && param!=4 && param!=8) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelStore" ); - return; - } - if (ctx->Unpack.Alignment == param) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.Alignment = param; - break; - case GL_UNPACK_CLIENT_STORAGE_APPLE: - if (param == (GLint)ctx->Unpack.ClientStorage) - return; - FLUSH_VERTICES(ctx, _NEW_PACKUNPACK); - ctx->Unpack.ClientStorage = param ? GL_TRUE : GL_FALSE; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glPixelStore" ); - return; - } -} - - -void -_mesa_PixelStoref( GLenum pname, GLfloat param ) -{ - _mesa_PixelStorei( pname, (GLint) param ); -} - - - -/**********************************************************************/ -/***** glPixelMap *****/ -/**********************************************************************/ - - - -void -_mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) -{ - GLint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (mapsize < 1 || mapsize > MAX_PIXEL_MAP_TABLE) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); - return; - } - - if (map >= GL_PIXEL_MAP_S_TO_S && map <= GL_PIXEL_MAP_I_TO_A) { - /* test that mapsize is a power of two */ - if (_mesa_bitcount((GLuint) mapsize) != 1) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapfv(mapsize)" ); - return; - } - } - - FLUSH_VERTICES(ctx, _NEW_PIXEL); - - switch (map) { - case GL_PIXEL_MAP_S_TO_S: - ctx->Pixel.MapStoSsize = mapsize; - for (i=0;iPixel.MapStoS[i] = (GLint) values[i]; - } - break; - case GL_PIXEL_MAP_I_TO_I: - ctx->Pixel.MapItoIsize = mapsize; - for (i=0;iPixel.MapItoI[i] = (GLint) values[i]; - } - break; - case GL_PIXEL_MAP_I_TO_R: - ctx->Pixel.MapItoRsize = mapsize; - for (i=0;iPixel.MapItoR[i] = val; - ctx->Pixel.MapItoR8[i] = (GLint) (val * 255.0F); - } - break; - case GL_PIXEL_MAP_I_TO_G: - ctx->Pixel.MapItoGsize = mapsize; - for (i=0;iPixel.MapItoG[i] = val; - ctx->Pixel.MapItoG8[i] = (GLint) (val * 255.0F); - } - break; - case GL_PIXEL_MAP_I_TO_B: - ctx->Pixel.MapItoBsize = mapsize; - for (i=0;iPixel.MapItoB[i] = val; - ctx->Pixel.MapItoB8[i] = (GLint) (val * 255.0F); - } - break; - case GL_PIXEL_MAP_I_TO_A: - ctx->Pixel.MapItoAsize = mapsize; - for (i=0;iPixel.MapItoA[i] = val; - ctx->Pixel.MapItoA8[i] = (GLint) (val * 255.0F); - } - break; - case GL_PIXEL_MAP_R_TO_R: - ctx->Pixel.MapRtoRsize = mapsize; - for (i=0;iPixel.MapRtoR[i] = CLAMP( values[i], 0.0F, 1.0F ); - } - break; - case GL_PIXEL_MAP_G_TO_G: - ctx->Pixel.MapGtoGsize = mapsize; - for (i=0;iPixel.MapGtoG[i] = CLAMP( values[i], 0.0F, 1.0F ); - } - break; - case GL_PIXEL_MAP_B_TO_B: - ctx->Pixel.MapBtoBsize = mapsize; - for (i=0;iPixel.MapBtoB[i] = CLAMP( values[i], 0.0F, 1.0F ); - } - break; - case GL_PIXEL_MAP_A_TO_A: - ctx->Pixel.MapAtoAsize = mapsize; - for (i=0;iPixel.MapAtoA[i] = CLAMP( values[i], 0.0F, 1.0F ); - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glPixelMapfv(map)" ); - } -} - - - -void -_mesa_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ) -{ - const GLint n = MIN2(mapsize, MAX_PIXEL_MAP_TABLE); - GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; - GLint i; - if (map==GL_PIXEL_MAP_I_TO_I || map==GL_PIXEL_MAP_S_TO_S) { - for (i=0;iPixel.MapItoIsize;i++) { - values[i] = (GLfloat) ctx->Pixel.MapItoI[i]; - } - break; - case GL_PIXEL_MAP_S_TO_S: - for (i=0;iPixel.MapStoSsize;i++) { - values[i] = (GLfloat) ctx->Pixel.MapStoS[i]; - } - break; - case GL_PIXEL_MAP_I_TO_R: - MEMCPY(values,ctx->Pixel.MapItoR,ctx->Pixel.MapItoRsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_I_TO_G: - MEMCPY(values,ctx->Pixel.MapItoG,ctx->Pixel.MapItoGsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_I_TO_B: - MEMCPY(values,ctx->Pixel.MapItoB,ctx->Pixel.MapItoBsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_I_TO_A: - MEMCPY(values,ctx->Pixel.MapItoA,ctx->Pixel.MapItoAsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_R_TO_R: - MEMCPY(values,ctx->Pixel.MapRtoR,ctx->Pixel.MapRtoRsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_G_TO_G: - MEMCPY(values,ctx->Pixel.MapGtoG,ctx->Pixel.MapGtoGsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_B_TO_B: - MEMCPY(values,ctx->Pixel.MapBtoB,ctx->Pixel.MapBtoBsize*sizeof(GLfloat)); - break; - case GL_PIXEL_MAP_A_TO_A: - MEMCPY(values,ctx->Pixel.MapAtoA,ctx->Pixel.MapAtoAsize*sizeof(GLfloat)); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); - } -} - - -void -_mesa_GetPixelMapuiv( GLenum map, GLuint *values ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (map) { - case GL_PIXEL_MAP_I_TO_I: - MEMCPY(values, ctx->Pixel.MapItoI, ctx->Pixel.MapItoIsize*sizeof(GLint)); - break; - case GL_PIXEL_MAP_S_TO_S: - MEMCPY(values, ctx->Pixel.MapStoS, ctx->Pixel.MapStoSsize*sizeof(GLint)); - break; - case GL_PIXEL_MAP_I_TO_R: - for (i=0;iPixel.MapItoRsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapItoR[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_G: - for (i=0;iPixel.MapItoGsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapItoG[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_B: - for (i=0;iPixel.MapItoBsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapItoB[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_A: - for (i=0;iPixel.MapItoAsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapItoA[i] ); - } - break; - case GL_PIXEL_MAP_R_TO_R: - for (i=0;iPixel.MapRtoRsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapRtoR[i] ); - } - break; - case GL_PIXEL_MAP_G_TO_G: - for (i=0;iPixel.MapGtoGsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapGtoG[i] ); - } - break; - case GL_PIXEL_MAP_B_TO_B: - for (i=0;iPixel.MapBtoBsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapBtoB[i] ); - } - break; - case GL_PIXEL_MAP_A_TO_A: - for (i=0;iPixel.MapAtoAsize;i++) { - values[i] = FLOAT_TO_UINT( ctx->Pixel.MapAtoA[i] ); - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); - } -} - - -void -_mesa_GetPixelMapusv( GLenum map, GLushort *values ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (map) { - case GL_PIXEL_MAP_I_TO_I: - for (i=0;iPixel.MapItoIsize;i++) { - values[i] = (GLushort) ctx->Pixel.MapItoI[i]; - } - break; - case GL_PIXEL_MAP_S_TO_S: - for (i=0;iPixel.MapStoSsize;i++) { - values[i] = (GLushort) ctx->Pixel.MapStoS[i]; - } - break; - case GL_PIXEL_MAP_I_TO_R: - for (i=0;iPixel.MapItoRsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoR[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_G: - for (i=0;iPixel.MapItoGsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoG[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_B: - for (i=0;iPixel.MapItoBsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoB[i] ); - } - break; - case GL_PIXEL_MAP_I_TO_A: - for (i=0;iPixel.MapItoAsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapItoA[i] ); - } - break; - case GL_PIXEL_MAP_R_TO_R: - for (i=0;iPixel.MapRtoRsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapRtoR[i] ); - } - break; - case GL_PIXEL_MAP_G_TO_G: - for (i=0;iPixel.MapGtoGsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapGtoG[i] ); - } - break; - case GL_PIXEL_MAP_B_TO_B: - for (i=0;iPixel.MapBtoBsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapBtoB[i] ); - } - break; - case GL_PIXEL_MAP_A_TO_A: - for (i=0;iPixel.MapAtoAsize;i++) { - values[i] = FLOAT_TO_USHORT( ctx->Pixel.MapAtoA[i] ); - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetPixelMapfv" ); - } -} - - - -/**********************************************************************/ -/***** glPixelTransfer *****/ -/**********************************************************************/ - - -/* - * Implements glPixelTransfer[fi] whether called immediately or from a - * display list. - */ -void -_mesa_PixelTransferf( GLenum pname, GLfloat param ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (pname) { - case GL_MAP_COLOR: - if (ctx->Pixel.MapColorFlag == (param ? GL_TRUE : GL_FALSE)) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.MapColorFlag = param ? GL_TRUE : GL_FALSE; - break; - case GL_MAP_STENCIL: - if (ctx->Pixel.MapStencilFlag == (param ? GL_TRUE : GL_FALSE)) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.MapStencilFlag = param ? GL_TRUE : GL_FALSE; - break; - case GL_INDEX_SHIFT: - if (ctx->Pixel.IndexShift == (GLint) param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.IndexShift = (GLint) param; - break; - case GL_INDEX_OFFSET: - if (ctx->Pixel.IndexOffset == (GLint) param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.IndexOffset = (GLint) param; - break; - case GL_RED_SCALE: - if (ctx->Pixel.RedScale == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.RedScale = param; - break; - case GL_RED_BIAS: - if (ctx->Pixel.RedBias == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.RedBias = param; - break; - case GL_GREEN_SCALE: - if (ctx->Pixel.GreenScale == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.GreenScale = param; - break; - case GL_GREEN_BIAS: - if (ctx->Pixel.GreenBias == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.GreenBias = param; - break; - case GL_BLUE_SCALE: - if (ctx->Pixel.BlueScale == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.BlueScale = param; - break; - case GL_BLUE_BIAS: - if (ctx->Pixel.BlueBias == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.BlueBias = param; - break; - case GL_ALPHA_SCALE: - if (ctx->Pixel.AlphaScale == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.AlphaScale = param; - break; - case GL_ALPHA_BIAS: - if (ctx->Pixel.AlphaBias == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.AlphaBias = param; - break; - case GL_DEPTH_SCALE: - if (ctx->Pixel.DepthScale == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.DepthScale = param; - break; - case GL_DEPTH_BIAS: - if (ctx->Pixel.DepthBias == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.DepthBias = param; - break; - case GL_POST_COLOR_MATRIX_RED_SCALE: - if (ctx->Pixel.PostColorMatrixScale[0] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixScale[0] = param; - break; - case GL_POST_COLOR_MATRIX_RED_BIAS: - if (ctx->Pixel.PostColorMatrixBias[0] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixBias[0] = param; - break; - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - if (ctx->Pixel.PostColorMatrixScale[1] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixScale[1] = param; - break; - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - if (ctx->Pixel.PostColorMatrixBias[1] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixBias[1] = param; - break; - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - if (ctx->Pixel.PostColorMatrixScale[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixScale[2] = param; - break; - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - if (ctx->Pixel.PostColorMatrixBias[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixBias[2] = param; - break; - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - if (ctx->Pixel.PostColorMatrixScale[3] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixScale[3] = param; - break; - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - if (ctx->Pixel.PostColorMatrixBias[3] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostColorMatrixBias[3] = param; - break; - case GL_POST_CONVOLUTION_RED_SCALE: - if (ctx->Pixel.PostConvolutionScale[0] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionScale[0] = param; - break; - case GL_POST_CONVOLUTION_RED_BIAS: - if (ctx->Pixel.PostConvolutionBias[0] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionBias[0] = param; - break; - case GL_POST_CONVOLUTION_GREEN_SCALE: - if (ctx->Pixel.PostConvolutionScale[1] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionScale[1] = param; - break; - case GL_POST_CONVOLUTION_GREEN_BIAS: - if (ctx->Pixel.PostConvolutionBias[1] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionBias[1] = param; - break; - case GL_POST_CONVOLUTION_BLUE_SCALE: - if (ctx->Pixel.PostConvolutionScale[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionScale[2] = param; - break; - case GL_POST_CONVOLUTION_BLUE_BIAS: - if (ctx->Pixel.PostConvolutionBias[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionBias[2] = param; - break; - case GL_POST_CONVOLUTION_ALPHA_SCALE: - if (ctx->Pixel.PostConvolutionScale[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionScale[2] = param; - break; - case GL_POST_CONVOLUTION_ALPHA_BIAS: - if (ctx->Pixel.PostConvolutionBias[2] == param) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionBias[2] = param; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" ); - return; - } -} - - -void -_mesa_PixelTransferi( GLenum pname, GLint param ) -{ - _mesa_PixelTransferf( pname, (GLfloat) param ); -} - - - -/**********************************************************************/ -/***** Pixel processing functions ******/ -/**********************************************************************/ - - -/* - * Apply scale and bias factors to an array of RGBA pixels. - */ -void -_mesa_scale_and_bias_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4], - GLfloat rScale, GLfloat gScale, - GLfloat bScale, GLfloat aScale, - GLfloat rBias, GLfloat gBias, - GLfloat bBias, GLfloat aBias) -{ - if (rScale != 1.0 || rBias != 0.0) { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = rgba[i][RCOMP] * rScale + rBias; - } - } - if (gScale != 1.0 || gBias != 0.0) { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][GCOMP] = rgba[i][GCOMP] * gScale + gBias; - } - } - if (bScale != 1.0 || bBias != 0.0) { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][BCOMP] = rgba[i][BCOMP] * bScale + bBias; - } - } - if (aScale != 1.0 || aBias != 0.0) { - GLuint i; - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = rgba[i][ACOMP] * aScale + aBias; - } - } -} - - -/* - * Apply pixel mapping to an array of floating point RGBA pixels. - */ -void -_mesa_map_rgba( const GLcontext *ctx, GLuint n, GLfloat rgba[][4] ) -{ - const GLfloat rscale = (GLfloat) (ctx->Pixel.MapRtoRsize - 1); - const GLfloat gscale = (GLfloat) (ctx->Pixel.MapGtoGsize - 1); - const GLfloat bscale = (GLfloat) (ctx->Pixel.MapBtoBsize - 1); - const GLfloat ascale = (GLfloat) (ctx->Pixel.MapAtoAsize - 1); - const GLfloat *rMap = ctx->Pixel.MapRtoR; - const GLfloat *gMap = ctx->Pixel.MapGtoG; - const GLfloat *bMap = ctx->Pixel.MapBtoB; - const GLfloat *aMap = ctx->Pixel.MapAtoA; - GLuint i; - for (i=0;iPixel.PostColorMatrixScale[0]; - const GLfloat rb = ctx->Pixel.PostColorMatrixBias[0]; - const GLfloat gs = ctx->Pixel.PostColorMatrixScale[1]; - const GLfloat gb = ctx->Pixel.PostColorMatrixBias[1]; - const GLfloat bs = ctx->Pixel.PostColorMatrixScale[2]; - const GLfloat bb = ctx->Pixel.PostColorMatrixBias[2]; - const GLfloat as = ctx->Pixel.PostColorMatrixScale[3]; - const GLfloat ab = ctx->Pixel.PostColorMatrixBias[3]; - const GLfloat *m = ctx->ColorMatrixStack.Top->m; - GLuint i; - for (i = 0; i < n; i++) { - const GLfloat r = rgba[i][RCOMP]; - const GLfloat g = rgba[i][GCOMP]; - const GLfloat b = rgba[i][BCOMP]; - const GLfloat a = rgba[i][ACOMP]; - rgba[i][RCOMP] = (m[0] * r + m[4] * g + m[ 8] * b + m[12] * a) * rs + rb; - rgba[i][GCOMP] = (m[1] * r + m[5] * g + m[ 9] * b + m[13] * a) * gs + gb; - rgba[i][BCOMP] = (m[2] * r + m[6] * g + m[10] * b + m[14] * a) * bs + bb; - rgba[i][ACOMP] = (m[3] * r + m[7] * g + m[11] * b + m[15] * a) * as + ab; - } -} - - -/* - * Apply a color table lookup to an array of colors. - */ -void -_mesa_lookup_rgba(const struct gl_color_table *table, - GLuint n, GLfloat rgba[][4]) -{ - ASSERT(table->FloatTable); - if (!table->Table || table->Size == 0) - return; - - switch (table->Format) { - case GL_INTENSITY: - /* replace RGBA with I */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][RCOMP] * scale); - GLfloat c = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]); - rgba[i][RCOMP] = rgba[i][GCOMP] = - rgba[i][BCOMP] = rgba[i][ACOMP] = c; - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][RCOMP] * scale); - GLfloat c = lut[CLAMP(j, 0, max)]; - rgba[i][RCOMP] = rgba[i][GCOMP] = - rgba[i][BCOMP] = rgba[i][ACOMP] = c; - } - } - break; - case GL_LUMINANCE: - /* replace RGB with L */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][RCOMP] * scale); - GLfloat c = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]); - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c; - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][RCOMP] * scale); - GLfloat c = lut[CLAMP(j, 0, max)]; - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = c; - } - } - break; - case GL_ALPHA: - /* replace A with A */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][ACOMP] * scale); - rgba[i][ACOMP] = CHAN_TO_FLOAT(lut[CLAMP(j, 0, max)]); - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint j = IROUND(rgba[i][ACOMP] * scale); - rgba[i][ACOMP] = lut[CLAMP(j, 0, max)]; - } - } - break; - case GL_LUMINANCE_ALPHA: - /* replace RGBA with LLLA */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jL = IROUND(rgba[i][RCOMP] * scale); - GLint jA = IROUND(rgba[i][ACOMP] * scale); - GLfloat luminance, alpha; - jL = CLAMP(jL, 0, max); - jA = CLAMP(jA, 0, max); - luminance = CHAN_TO_FLOAT(lut[jL * 2 + 0]); - alpha = CHAN_TO_FLOAT(lut[jA * 2 + 1]); - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance; - rgba[i][ACOMP] = alpha;; - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jL = IROUND(rgba[i][RCOMP] * scale); - GLint jA = IROUND(rgba[i][ACOMP] * scale); - GLfloat luminance, alpha; - jL = CLAMP(jL, 0, max); - jA = CLAMP(jA, 0, max); - luminance = lut[jL * 2 + 0]; - alpha = lut[jA * 2 + 1]; - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = luminance; - rgba[i][ACOMP] = alpha;; - } - } - break; - case GL_RGB: - /* replace RGB with RGB */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jR = IROUND(rgba[i][RCOMP] * scale); - GLint jG = IROUND(rgba[i][GCOMP] * scale); - GLint jB = IROUND(rgba[i][BCOMP] * scale); - jR = CLAMP(jR, 0, max); - jG = CLAMP(jG, 0, max); - jB = CLAMP(jB, 0, max); - rgba[i][RCOMP] = CHAN_TO_FLOAT(lut[jR * 3 + 0]); - rgba[i][GCOMP] = CHAN_TO_FLOAT(lut[jG * 3 + 1]); - rgba[i][BCOMP] = CHAN_TO_FLOAT(lut[jB * 3 + 2]); - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jR = IROUND(rgba[i][RCOMP] * scale); - GLint jG = IROUND(rgba[i][GCOMP] * scale); - GLint jB = IROUND(rgba[i][BCOMP] * scale); - jR = CLAMP(jR, 0, max); - jG = CLAMP(jG, 0, max); - jB = CLAMP(jB, 0, max); - rgba[i][RCOMP] = lut[jR * 3 + 0]; - rgba[i][GCOMP] = lut[jG * 3 + 1]; - rgba[i][BCOMP] = lut[jB * 3 + 2]; - } - } - break; - case GL_RGBA: - /* replace RGBA with RGBA */ - if (!table->FloatTable) { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLchan *lut = (const GLchan *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jR = IROUND(rgba[i][RCOMP] * scale); - GLint jG = IROUND(rgba[i][GCOMP] * scale); - GLint jB = IROUND(rgba[i][BCOMP] * scale); - GLint jA = IROUND(rgba[i][ACOMP] * scale); - jR = CLAMP(jR, 0, max); - jG = CLAMP(jG, 0, max); - jB = CLAMP(jB, 0, max); - jA = CLAMP(jA, 0, max); - rgba[i][RCOMP] = CHAN_TO_FLOAT(lut[jR * 4 + 0]); - rgba[i][GCOMP] = CHAN_TO_FLOAT(lut[jG * 4 + 1]); - rgba[i][BCOMP] = CHAN_TO_FLOAT(lut[jB * 4 + 2]); - rgba[i][ACOMP] = CHAN_TO_FLOAT(lut[jA * 4 + 3]); - } - } - else { - const GLint max = table->Size - 1; - const GLfloat scale = (GLfloat) max; - const GLfloat *lut = (const GLfloat *) table->Table; - GLuint i; - for (i = 0; i < n; i++) { - GLint jR = IROUND(rgba[i][RCOMP] * scale); - GLint jG = IROUND(rgba[i][GCOMP] * scale); - GLint jB = IROUND(rgba[i][BCOMP] * scale); - GLint jA = IROUND(rgba[i][ACOMP] * scale); - jR = CLAMP(jR, 0, max); - jG = CLAMP(jG, 0, max); - jB = CLAMP(jB, 0, max); - jA = CLAMP(jA, 0, max); - rgba[i][RCOMP] = lut[jR * 4 + 0]; - rgba[i][GCOMP] = lut[jG * 4 + 1]; - rgba[i][BCOMP] = lut[jB * 4 + 2]; - rgba[i][ACOMP] = lut[jA * 4 + 3]; - } - } - break; - default: - _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba"); - return; - } -} - - - -/* - * Apply color index shift and offset to an array of pixels. - */ -void -_mesa_shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] ) -{ - GLint shift = ctx->Pixel.IndexShift; - GLint offset = ctx->Pixel.IndexOffset; - GLuint i; - if (shift > 0) { - for (i=0;i> shift) + offset; - } - } - else { - for (i=0;iPixel.MapItoIsize - 1; - GLuint i; - for (i=0;iPixel.MapItoI[ index[i] & mask ]; - } -} - - -/* - * Map color indexes to rgba values. - */ -void -_mesa_map_ci_to_rgba_chan( const GLcontext *ctx, GLuint n, - const GLuint index[], GLchan rgba[][4] ) -{ -#if CHAN_BITS == 8 - GLuint rmask = ctx->Pixel.MapItoRsize - 1; - GLuint gmask = ctx->Pixel.MapItoGsize - 1; - GLuint bmask = ctx->Pixel.MapItoBsize - 1; - GLuint amask = ctx->Pixel.MapItoAsize - 1; - const GLubyte *rMap = ctx->Pixel.MapItoR8; - const GLubyte *gMap = ctx->Pixel.MapItoG8; - const GLubyte *bMap = ctx->Pixel.MapItoB8; - const GLubyte *aMap = ctx->Pixel.MapItoA8; - GLuint i; - for (i=0;iPixel.MapItoRsize - 1; - GLuint gmask = ctx->Pixel.MapItoGsize - 1; - GLuint bmask = ctx->Pixel.MapItoBsize - 1; - GLuint amask = ctx->Pixel.MapItoAsize - 1; - const GLfloat *rMap = ctx->Pixel.MapItoR; - const GLfloat *gMap = ctx->Pixel.MapItoG; - const GLfloat *bMap = ctx->Pixel.MapItoB; - const GLfloat *aMap = ctx->Pixel.MapItoA; - GLuint i; - for (i=0;iPixel.MapItoRsize - 1; - GLuint gmask = ctx->Pixel.MapItoGsize - 1; - GLuint bmask = ctx->Pixel.MapItoBsize - 1; - GLuint amask = ctx->Pixel.MapItoAsize - 1; - const GLfloat *rMap = ctx->Pixel.MapItoR; - const GLfloat *gMap = ctx->Pixel.MapItoG; - const GLfloat *bMap = ctx->Pixel.MapItoB; - const GLfloat *aMap = ctx->Pixel.MapItoA; - GLuint i; - for (i=0;iPixel.MapItoRsize - 1; - GLuint gmask = ctx->Pixel.MapItoGsize - 1; - GLuint bmask = ctx->Pixel.MapItoBsize - 1; - GLuint amask = ctx->Pixel.MapItoAsize - 1; - const GLubyte *rMap = ctx->Pixel.MapItoR8; - const GLubyte *gMap = ctx->Pixel.MapItoG8; - const GLubyte *bMap = ctx->Pixel.MapItoB8; - const GLubyte *aMap = ctx->Pixel.MapItoA8; - GLuint i; - for (i=0;iPixel.MapItoRsize - 1; - GLuint gmask = ctx->Pixel.MapItoGsize - 1; - GLuint bmask = ctx->Pixel.MapItoBsize - 1; - GLuint amask = ctx->Pixel.MapItoAsize - 1; - const GLfloat *rMap = ctx->Pixel.MapItoR; - const GLfloat *gMap = ctx->Pixel.MapItoG; - const GLfloat *bMap = ctx->Pixel.MapItoB; - const GLfloat *aMap = ctx->Pixel.MapItoA; - GLuint i; - for (i=0;iPixel.IndexShift; - GLint offset = ctx->Pixel.IndexOffset; - if (shift > 0) { - for (i=0;i> shift) + offset; - } - } - else { - for (i=0;iPixel.MapStoSsize - 1; - GLuint i; - for (i=0;iPixel.MapStoS[ stencil[i] & mask ]; - } -} - - - -/* - * This function converts an array of GLchan colors to GLfloat colors. - * Most importantly, it undoes the non-uniform quantization of pixel - * values introduced when we convert shallow (< 8 bit) pixel values - * to GLubytes in the ctx->Driver.ReadRGBASpan() functions. - * This fixes a number of OpenGL conformance failures when running on - * 16bpp displays, for example. - */ -void -_mesa_chan_to_float_span(const GLcontext *ctx, GLuint n, - CONST GLchan rgba[][4], GLfloat rgbaf[][4]) -{ -#if CHAN_TYPE == GL_FLOAT - MEMCPY(rgbaf, rgba, n * 4 * sizeof(GLfloat)); -#else - const GLuint rShift = CHAN_BITS - ctx->Visual.redBits; - const GLuint gShift = CHAN_BITS - ctx->Visual.greenBits; - const GLuint bShift = CHAN_BITS - ctx->Visual.blueBits; - GLuint aShift; - const GLfloat rScale = 1.0F / (GLfloat) ((1 << ctx->Visual.redBits ) - 1); - const GLfloat gScale = 1.0F / (GLfloat) ((1 << ctx->Visual.greenBits) - 1); - const GLfloat bScale = 1.0F / (GLfloat) ((1 << ctx->Visual.blueBits ) - 1); - GLfloat aScale; - GLuint i; - - if (ctx->Visual.alphaBits > 0) { - aShift = CHAN_BITS - ctx->Visual.alphaBits; - aScale = 1.0F / (GLfloat) ((1 << ctx->Visual.alphaBits) - 1); - } - else { - aShift = 0; - aScale = 1.0F / CHAN_MAXF; - } - - for (i = 0; i < n; i++) { - const GLint r = rgba[i][RCOMP] >> rShift; - const GLint g = rgba[i][GCOMP] >> gShift; - const GLint b = rgba[i][BCOMP] >> bShift; - const GLint a = rgba[i][ACOMP] >> aShift; - rgbaf[i][RCOMP] = (GLfloat) r * rScale; - rgbaf[i][GCOMP] = (GLfloat) g * gScale; - rgbaf[i][BCOMP] = (GLfloat) b * bScale; - rgbaf[i][ACOMP] = (GLfloat) a * aScale; - } -#endif -} Index: xc/extras/Mesa/src/pixel.h diff -u xc/extras/Mesa/src/pixel.h:1.5 xc/extras/Mesa/src/pixel.h:removed --- xc/extras/Mesa/src/pixel.h:1.5 Fri Feb 22 14:25:38 2002 +++ xc/extras/Mesa/src/pixel.h Wed Mar 16 21:00:32 2005 @@ -1,138 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef PIXEL_H -#define PIXEL_H - - -#include "mtypes.h" - - -/* - * API functions - */ - - -extern void -_mesa_GetPixelMapfv( GLenum map, GLfloat *values ); - -extern void -_mesa_GetPixelMapuiv( GLenum map, GLuint *values ); - -extern void -_mesa_GetPixelMapusv( GLenum map, GLushort *values ); - -extern void -_mesa_PixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ); - -extern void -_mesa_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values ); - -extern void -_mesa_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values ); - -extern void -_mesa_PixelStoref( GLenum pname, GLfloat param ); - -extern void -_mesa_PixelStorei( GLenum pname, GLint param ); - -extern void -_mesa_PixelTransferf( GLenum pname, GLfloat param ); - -extern void -_mesa_PixelTransferi( GLenum pname, GLint param ); - -extern void -_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ); - - - -/* - * Pixel processing functions - */ - -extern void -_mesa_scale_and_bias_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4], - GLfloat rScale, GLfloat gScale, - GLfloat bScale, GLfloat aScale, - GLfloat rBias, GLfloat gBias, - GLfloat bBias, GLfloat aBias); - -extern void -_mesa_map_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]); - - -extern void -_mesa_transform_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]); - - -extern void -_mesa_lookup_rgba(const struct gl_color_table *table, - GLuint n, GLfloat rgba[][4]); - - -extern void -_mesa_shift_and_offset_ci(const GLcontext *ctx, GLuint n, - GLuint indexes[]); - - -extern void -_mesa_map_ci(const GLcontext *ctx, GLuint n, GLuint index[]); - - -extern void -_mesa_map_ci_to_rgba_chan(const GLcontext *ctx, - GLuint n, const GLuint index[], - GLchan rgba[][4]); - - -extern void -_mesa_map_ci_to_rgba(const GLcontext *ctx, - GLuint n, const GLuint index[], GLfloat rgba[][4]); - - -extern void -_mesa_map_ci8_to_rgba(const GLcontext *ctx, - GLuint n, const GLubyte index[], - GLchan rgba[][4]); - - -extern void -_mesa_shift_and_offset_stencil(const GLcontext *ctx, GLuint n, - GLstencil indexes[]); - - -extern void -_mesa_map_stencil(const GLcontext *ctx, GLuint n, GLstencil index[]); - - -extern void -_mesa_chan_to_float_span(const GLcontext *ctx, GLuint n, - CONST GLchan rgba[][4], GLfloat rgbaf[][4]); - - -#endif Index: xc/extras/Mesa/src/points.c diff -u xc/extras/Mesa/src/points.c:1.11 xc/extras/Mesa/src/points.c:removed --- xc/extras/Mesa/src/points.c:1.11 Wed Oct 22 11:44:41 2003 +++ xc/extras/Mesa/src/points.c Wed Mar 16 21:00:32 2005 @@ -1,221 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "mmath.h" -#include "points.h" -#include "texstate.h" -#include "mtypes.h" - - - -void -_mesa_PointSize( GLfloat size ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (size <= 0.0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPointSize" ); - return; - } - - if (ctx->Point.Size == size) - return; - - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.Size = size; - ctx->Point._Size = CLAMP(size, - ctx->Const.MinPointSize, - ctx->Const.MaxPointSize); - - if (ctx->Point._Size == 1.0F) - ctx->_TriangleCaps &= ~DD_POINT_SIZE; - else - ctx->_TriangleCaps |= DD_POINT_SIZE; - - if (ctx->Driver.PointSize) - (*ctx->Driver.PointSize)(ctx, size); -} - - - -/* - * Added by GL_NV_point_sprite - */ -void -_mesa_PointParameteriNV( GLenum pname, GLint param ) -{ - const GLfloat value = (GLfloat) param; - _mesa_PointParameterfvEXT(pname, &value); -} - - -/* - * Added by GL_NV_point_sprite - */ -void -_mesa_PointParameterivNV( GLenum pname, const GLint *params ) -{ - const GLfloat value = (GLfloat) params[0]; - _mesa_PointParameterfvEXT(pname, &value); -} - - - -/* - * Same for both GL_EXT_point_parameters and GL_ARB_point_parameters. - */ -void -_mesa_PointParameterfEXT( GLenum pname, GLfloat param) -{ - _mesa_PointParameterfvEXT(pname, ¶m); -} - - - -/* - * Same for both GL_EXT_point_parameters and GL_ARB_point_parameters. - */ -void -_mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (pname) { - case GL_DISTANCE_ATTENUATION_EXT: - if (ctx->Extensions.EXT_point_parameters) { - const GLboolean tmp = ctx->Point._Attenuated; - if (TEST_EQ_3V(ctx->Point.Params, params)) - return; - - FLUSH_VERTICES(ctx, _NEW_POINT); - COPY_3V(ctx->Point.Params, params); - - /* Update several derived values now. This likely to be - * more efficient than trying to catch this statechange in - * state.c. - */ - ctx->Point._Attenuated = (params[0] != 1.0 || - params[1] != 0.0 || - params[2] != 0.0); - - if (tmp != ctx->Point._Attenuated) { - ctx->_TriangleCaps ^= DD_POINT_ATTEN; - ctx->_NeedEyeCoords ^= NEED_EYE_POINT_ATTEN; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)"); - return; - } - break; - case GL_POINT_SIZE_MIN_EXT: - if (ctx->Extensions.EXT_point_parameters) { - if (params[0] < 0.0F) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glPointParameterf[v]{EXT,ARB}(param)" ); - return; - } - if (ctx->Point.MinSize == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.MinSize = params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)"); - return; - } - break; - case GL_POINT_SIZE_MAX_EXT: - if (ctx->Extensions.EXT_point_parameters) { - if (params[0] < 0.0F) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glPointParameterf[v]{EXT,ARB}(param)" ); - return; - } - if (ctx->Point.MaxSize == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.MaxSize = params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)"); - return; - } - break; - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - if (ctx->Extensions.EXT_point_parameters) { - if (params[0] < 0.0F) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glPointParameterf[v]{EXT,ARB}(param)" ); - return; - } - if (ctx->Point.Threshold == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.Threshold = params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)"); - return; - } - break; - case GL_POINT_SPRITE_R_MODE_NV: - if (ctx->Extensions.NV_point_sprite) { - GLenum value = (GLenum) params[0]; - if (value != GL_ZERO && value != GL_S && value != GL_R) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glPointParameterf[v]{EXT,ARB}(param)"); - return; - } - if (ctx->Point.SpriteRMode == value) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.SpriteRMode = value; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)"); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, - "glPointParameterf[v]{EXT,ARB}(pname)" ); - return; - } - - if (ctx->Driver.PointParameterfv) - (*ctx->Driver.PointParameterfv)(ctx, pname, params); -} Index: xc/extras/Mesa/src/points.h diff -u xc/extras/Mesa/src/points.h:1.5 xc/extras/Mesa/src/points.h:removed --- xc/extras/Mesa/src/points.h:1.5 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/points.h Wed Mar 16 21:00:32 2005 @@ -1,50 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef POINTS_H -#define POINTS_H - - -#include "mtypes.h" - - -extern void -_mesa_PointSize( GLfloat size ); - -extern void -_mesa_PointParameteriNV( GLenum pname, GLint param ); - -extern void -_mesa_PointParameterivNV( GLenum pname, const GLint *params ); - -extern void -_mesa_PointParameterfEXT( GLenum pname, GLfloat param ); - -extern void -_mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params ); - - -#endif Index: xc/extras/Mesa/src/polygon.c diff -u xc/extras/Mesa/src/polygon.c:1.6 xc/extras/Mesa/src/polygon.c:removed --- xc/extras/Mesa/src/polygon.c:1.6 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/polygon.c Wed Mar 16 21:00:32 2005 @@ -1,204 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "image.h" -#include "enums.h" -#include "macros.h" -#include "polygon.h" -#include "mtypes.h" - - -void -_mesa_CullFace( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glCullFace %s\n", _mesa_lookup_enum_by_nr(mode)); - - if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" ); - return; - } - - if (ctx->Polygon.CullFaceMode == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.CullFaceMode = mode; - - if (ctx->Driver.CullFace) - ctx->Driver.CullFace( ctx, mode ); -} - - - -void -_mesa_FrontFace( GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode)); - - if (mode!=GL_CW && mode!=GL_CCW) { - _mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" ); - return; - } - - if (ctx->Polygon.FrontFace == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.FrontFace = mode; - - ctx->Polygon._FrontBit = (GLboolean) (mode == GL_CW); - - if (ctx->Driver.FrontFace) - ctx->Driver.FrontFace( ctx, mode ); -} - - - -void -_mesa_PolygonMode( GLenum face, GLenum mode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glPolygonMode %s %s\n", - _mesa_lookup_enum_by_nr(face), - _mesa_lookup_enum_by_nr(mode)); - - if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) { - _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" ); - return; - } - - switch (face) { - case GL_FRONT: - if (ctx->Polygon.FrontMode == mode) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.FrontMode = mode; - break; - case GL_FRONT_AND_BACK: - if (ctx->Polygon.FrontMode == mode && - ctx->Polygon.BackMode == mode) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.FrontMode = mode; - ctx->Polygon.BackMode = mode; - break; - case GL_BACK: - if (ctx->Polygon.BackMode == mode) - return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.BackMode = mode; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(face)" ); - return; - } - - ctx->_TriangleCaps &= ~DD_TRI_UNFILLED; - if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL) - ctx->_TriangleCaps |= DD_TRI_UNFILLED; - - if (ctx->Driver.PolygonMode) { - (*ctx->Driver.PolygonMode)( ctx, face, mode ); - } -} - - - -void -_mesa_PolygonStipple( const GLubyte *pattern ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glPolygonStipple\n"); - - FLUSH_VERTICES(ctx, _NEW_POLYGONSTIPPLE); - _mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack); - - if (ctx->Driver.PolygonStipple) - ctx->Driver.PolygonStipple( ctx, (const GLubyte *) ctx->PolygonStipple ); -} - - - -void -_mesa_GetPolygonStipple( GLubyte *dest ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glGetPolygonStipple\n"); - - _mesa_pack_polygon_stipple(ctx->PolygonStipple, dest, &ctx->Pack); -} - - - -void -_mesa_PolygonOffset( GLfloat factor, GLfloat units ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glPolygonOffset %f %f\n", factor, units); - - if (ctx->Polygon.OffsetFactor == factor && - ctx->Polygon.OffsetUnits == units) - return; - - FLUSH_VERTICES(ctx, _NEW_POLYGON); - ctx->Polygon.OffsetFactor = factor; - ctx->Polygon.OffsetUnits = units; - - if (ctx->Driver.PolygonOffset) - ctx->Driver.PolygonOffset( ctx, factor, units ); -} - - - -void -_mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_PolygonOffset(factor, bias * ctx->DepthMaxF ); -} Index: xc/extras/Mesa/src/polygon.h diff -u xc/extras/Mesa/src/polygon.h:1.4 xc/extras/Mesa/src/polygon.h:removed --- xc/extras/Mesa/src/polygon.h:1.4 Fri Feb 22 14:25:38 2002 +++ xc/extras/Mesa/src/polygon.h Wed Mar 16 21:00:32 2005 @@ -1,56 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef POLYGON_H -#define POLYGON_H - - -#include "mtypes.h" - - -extern void -_mesa_CullFace( GLenum mode ); - -extern void -_mesa_FrontFace( GLenum mode ); - -extern void -_mesa_PolygonMode( GLenum face, GLenum mode ); - -extern void -_mesa_PolygonOffset( GLfloat factor, GLfloat units ); - -extern void -_mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ); - -extern void -_mesa_PolygonStipple( const GLubyte *mask ); - -extern void -_mesa_GetPolygonStipple( GLubyte *mask ); - - -#endif Index: xc/extras/Mesa/src/rastpos.c diff -u xc/extras/Mesa/src/rastpos.c:1.6 xc/extras/Mesa/src/rastpos.c:removed --- xc/extras/Mesa/src/rastpos.c:1.6 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/rastpos.c Wed Mar 16 21:00:32 2005 @@ -1,787 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "clip.h" -#include "colormac.h" -#include "context.h" -#include "feedback.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "rastpos.h" -#include "state.h" -#include "simple_list.h" -#include "mtypes.h" - -#include "math/m_matrix.h" -#include "math/m_xform.h" - - -/* - * Clip a point against the view volume. - * Input: v - vertex-vector describing the point to clip - * Return: 0 = outside view volume - * 1 = inside view volume - */ -static GLuint -viewclip_point( const GLfloat v[] ) -{ - if ( v[0] > v[3] || v[0] < -v[3] - || v[1] > v[3] || v[1] < -v[3] - || v[2] > v[3] || v[2] < -v[3] ) { - return 0; - } - else { - return 1; - } -} - - -/* As above, but only clip test against far/near Z planes */ -static GLuint -viewclip_point_z( const GLfloat v[] ) -{ - if (v[2] > v[3] || v[2] < -v[3] ) { - return 0; - } - else { - return 1; - } -} - - - -/* - * Clip a point against the user clipping planes. - * Input: v - vertex-vector describing the point to clip. - * Return: 0 = point was clipped - * 1 = point not clipped - */ -static GLuint -userclip_point( GLcontext* ctx, const GLfloat v[] ) -{ - GLuint p; - - for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { - if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { - GLfloat dot = v[0] * ctx->Transform._ClipUserPlane[p][0] - + v[1] * ctx->Transform._ClipUserPlane[p][1] - + v[2] * ctx->Transform._ClipUserPlane[p][2] - + v[3] * ctx->Transform._ClipUserPlane[p][3]; - if (dot < 0.0F) { - return 0; - } - } - } - - return 1; -} - - -/* This has been split off to allow the normal shade routines to - * get a little closer to the vertex buffer, and to use the - * GLvector objects directly. - * Input: ctx - the context - * vertex - vertex location - * normal - normal vector - * Output: Rcolor - returned color - * Rspec - returned specular color (if separate specular enabled) - * Rindex - returned color index - */ -static void -shade_rastpos(GLcontext *ctx, - const GLfloat vertex[4], - const GLfloat normal[3], - GLfloat Rcolor[4], - GLfloat Rspec[4], - GLuint *Rindex) -{ - GLfloat (*base)[3] = ctx->Light._BaseColor; - struct gl_light *light; - GLfloat diffuseColor[4], specularColor[4]; - GLfloat diffuse = 0, specular = 0; - - if (!ctx->_ShineTable[0] || !ctx->_ShineTable[1]) - _mesa_validate_all_lighting_tables( ctx ); - - COPY_3V(diffuseColor, base[0]); - diffuseColor[3] = CLAMP( ctx->Light.Material[0].Diffuse[3], 0.0F, 1.0F ); - ASSIGN_4V(specularColor, 0.0, 0.0, 0.0, 0.0); - - foreach (light, &ctx->Light.EnabledList) { - GLfloat n_dot_h; - GLfloat attenuation = 1.0; - GLfloat VP[3]; - GLfloat n_dot_VP; - GLfloat *h; - GLfloat diffuseContrib[3], specularContrib[3]; - GLboolean normalized; - - if (!(light->_Flags & LIGHT_POSITIONAL)) { - COPY_3V(VP, light->_VP_inf_norm); - attenuation = light->_VP_inf_spot_attenuation; - } - else { - GLfloat d; - - SUB_3V(VP, light->_Position, vertex); - d = (GLfloat) LEN_3FV( VP ); - - if ( d > 1e-6) { - GLfloat invd = 1.0F / d; - SELF_SCALE_SCALAR_3V(VP, invd); - } - attenuation = 1.0F / (light->ConstantAttenuation + d * - (light->LinearAttenuation + d * - light->QuadraticAttenuation)); - - if (light->_Flags & LIGHT_SPOT) { - GLfloat PV_dot_dir = - DOT3(VP, light->_NormDirection); - - if (PV_dot_dir_CosCutoff) { - continue; - } - else { - double x = PV_dot_dir * (EXP_TABLE_SIZE-1); - int k = (int) x; - GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0] - + (x-k)*light->_SpotExpTable[k][1]); - attenuation *= spot; - } - } - } - - if (attenuation < 1e-3) - continue; - - n_dot_VP = DOT3( normal, VP ); - - if (n_dot_VP < 0.0F) { - ACC_SCALE_SCALAR_3V(diffuseColor, attenuation, light->_MatAmbient[0]); - continue; - } - - COPY_3V(diffuseContrib, light->_MatAmbient[0]); - ACC_SCALE_SCALAR_3V(diffuseContrib, n_dot_VP, light->_MatDiffuse[0]); - diffuse += n_dot_VP * light->_dli * attenuation; - ASSIGN_3V(specularContrib, 0.0, 0.0, 0.0); - - { - if (ctx->Light.Model.LocalViewer) { - GLfloat v[3]; - COPY_3V(v, vertex); - NORMALIZE_3FV(v); - SUB_3V(VP, VP, v); - h = VP; - normalized = 0; - } - else if (light->_Flags & LIGHT_POSITIONAL) { - h = VP; - ACC_3V(h, ctx->_EyeZDir); - normalized = 0; - } - else { - h = light->_h_inf_norm; - normalized = 1; - } - - n_dot_h = DOT3(normal, h); - - if (n_dot_h > 0.0F) { - const struct gl_material *mat = &ctx->Light.Material[0]; - GLfloat spec_coef; - GLfloat shininess = mat->Shininess; - - if (!normalized) { - n_dot_h *= n_dot_h; - n_dot_h /= LEN_SQUARED_3FV( h ); - shininess *= .5; - } - - GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef ); - - if (spec_coef > 1.0e-10) { - if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) { - ACC_SCALE_SCALAR_3V( specularContrib, spec_coef, - light->_MatSpecular[0]); - } - else { - ACC_SCALE_SCALAR_3V( diffuseContrib, spec_coef, - light->_MatSpecular[0]); - } - specular += spec_coef * light->_sli * attenuation; - } - } - } - - ACC_SCALE_SCALAR_3V( diffuseColor, attenuation, diffuseContrib ); - ACC_SCALE_SCALAR_3V( specularColor, attenuation, specularContrib ); - } - - if (ctx->Visual.rgbMode) { - Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F); - Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F); - Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F); - Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F); - Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F); - Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F); - Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F); - Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F); - } - else { - struct gl_material *mat = &ctx->Light.Material[0]; - GLfloat d_a = mat->DiffuseIndex - mat->AmbientIndex; - GLfloat s_a = mat->SpecularIndex - mat->AmbientIndex; - GLfloat ind = mat->AmbientIndex - + diffuse * (1.0F-specular) * d_a - + specular * s_a; - if (ind > mat->SpecularIndex) { - ind = mat->SpecularIndex; - } - *Rindex = (GLuint) (GLint) ind; - } - -} - -/* - * Caller: context->API.RasterPos4f - */ -static void -raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GLfloat v[4], eye[4], clip[4], ndc[3], d; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - - if (ctx->NewState) - _mesa_update_state( ctx ); - - ASSIGN_4V( v, x, y, z, w ); - TRANSFORM_POINT( eye, ctx->ModelviewMatrixStack.Top->m, v ); - - /* raster color */ - if (ctx->Light.Enabled) { - GLfloat *norm, eyenorm[3]; - GLfloat *objnorm = ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; - - if (ctx->_NeedEyeCoords) { - GLfloat *inv = ctx->ModelviewMatrixStack.Top->inv; - TRANSFORM_NORMAL( eyenorm, objnorm, inv ); - norm = eyenorm; - } - else { - norm = objnorm; - } - - shade_rastpos( ctx, v, norm, - ctx->Current.RasterColor, - ctx->Current.RasterSecondaryColor, - &ctx->Current.RasterIndex ); - - } - else { - /* use current color or index */ - if (ctx->Visual.rgbMode) { - COPY_4FV(ctx->Current.RasterColor, - ctx->Current.Attrib[VERT_ATTRIB_COLOR0]); - COPY_4FV(ctx->Current.RasterSecondaryColor, - ctx->Current.Attrib[VERT_ATTRIB_COLOR1]); - } - else { - ctx->Current.RasterIndex = ctx->Current.Index; - } - } - - /* compute raster distance */ - if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) - ctx->Current.RasterDistance = ctx->Current.Attrib[VERT_ATTRIB_FOG][0]; - else - ctx->Current.RasterDistance = (GLfloat) - GL_SQRT( eye[0]*eye[0] + eye[1]*eye[1] + eye[2]*eye[2] ); - - /* apply projection matrix: clip = Proj * eye */ - TRANSFORM_POINT( clip, ctx->ProjectionMatrixStack.Top->m, eye ); - - /* clip to view volume */ - if (ctx->Transform.RasterPositionUnclipped) { - /* GL_IBM_rasterpos_clip: only clip against Z */ - if (viewclip_point_z(clip) == 0) { - ctx->Current.RasterPosValid = GL_FALSE; - return; - } - } - else if (viewclip_point(clip) == 0) { - /* Normal OpenGL behaviour */ - ctx->Current.RasterPosValid = GL_FALSE; - return; - } - - /* clip to user clipping planes */ - if (ctx->Transform.ClipPlanesEnabled && !userclip_point(ctx, clip)) { - ctx->Current.RasterPosValid = GL_FALSE; - return; - } - - /* ndc = clip / W */ - d = (clip[3] == 0.0) ? 1.0 : 1.0F / clip[3]; - ndc[0] = clip[0] * d; - ndc[1] = clip[1] * d; - ndc[2] = clip[2] * d; - - ctx->Current.RasterPos[0] = (ndc[0] * ctx->Viewport._WindowMap.m[MAT_SX] + - ctx->Viewport._WindowMap.m[MAT_TX]); - ctx->Current.RasterPos[1] = (ndc[1] * ctx->Viewport._WindowMap.m[MAT_SY] + - ctx->Viewport._WindowMap.m[MAT_TY]); - ctx->Current.RasterPos[2] = (ndc[2] * ctx->Viewport._WindowMap.m[MAT_SZ] + - ctx->Viewport._WindowMap.m[MAT_TZ]) / ctx->DepthMaxF; - ctx->Current.RasterPos[3] = clip[3]; - ctx->Current.RasterPosValid = GL_TRUE; - - { - GLuint texSet; - for (texSet = 0; texSet < ctx->Const.MaxTextureUnits; texSet++) { - COPY_4FV( ctx->Current.RasterTexCoords[texSet], - ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texSet] ); - } - } - - if (ctx->RenderMode==GL_SELECT) { - _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); - } - -} - - -void -_mesa_RasterPos2d(GLdouble x, GLdouble y) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -void -_mesa_RasterPos2f(GLfloat x, GLfloat y) -{ - _mesa_RasterPos4f(x, y, 0.0F, 1.0F); -} - -void -_mesa_RasterPos2i(GLint x, GLint y) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -void -_mesa_RasterPos2s(GLshort x, GLshort y) -{ - _mesa_RasterPos4f(x, y, 0.0F, 1.0F); -} - -void -_mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -void -_mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ - _mesa_RasterPos4f(x, y, z, 1.0F); -} - -void -_mesa_RasterPos3i(GLint x, GLint y, GLint z) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -void -_mesa_RasterPos3s(GLshort x, GLshort y, GLshort z) -{ - _mesa_RasterPos4f(x, y, z, 1.0F); -} - -void -_mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -void -_mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - raster_pos4f(ctx, x, y, z, w); -} - -void -_mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ - _mesa_RasterPos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -void -_mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - _mesa_RasterPos4f(x, y, z, w); -} - -void -_mesa_RasterPos2dv(const GLdouble *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -void -_mesa_RasterPos2fv(const GLfloat *v) -{ - _mesa_RasterPos4f(v[0], v[1], 0.0F, 1.0F); -} - -void -_mesa_RasterPos2iv(const GLint *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -void -_mesa_RasterPos2sv(const GLshort *v) -{ - _mesa_RasterPos4f(v[0], v[1], 0.0F, 1.0F); -} - -void -_mesa_RasterPos3dv(const GLdouble *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -void -_mesa_RasterPos3fv(const GLfloat *v) -{ - _mesa_RasterPos4f(v[0], v[1], v[2], 1.0F); -} - -void -_mesa_RasterPos3iv(const GLint *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -void -_mesa_RasterPos3sv(const GLshort *v) -{ - _mesa_RasterPos4f(v[0], v[1], v[2], 1.0F); -} - -void -_mesa_RasterPos4dv(const GLdouble *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -void -_mesa_RasterPos4fv(const GLfloat *v) -{ - _mesa_RasterPos4f(v[0], v[1], v[2], v[3]); -} - -void -_mesa_RasterPos4iv(const GLint *v) -{ - _mesa_RasterPos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -void -_mesa_RasterPos4sv(const GLshort *v) -{ - _mesa_RasterPos4f(v[0], v[1], v[2], v[3]); -} - - -/**********************************************************************/ -/*** GL_ARB_window_pos / GL_MESA_window_pos ***/ -/**********************************************************************/ - -static void -window_pos3f(GLfloat x, GLfloat y, GLfloat z) -{ - GET_CURRENT_CONTEXT(ctx); - GLfloat z2; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); - - z2 = CLAMP(z, 0.0F, 1.0F) * (ctx->Viewport.Far - ctx->Viewport.Near) - + ctx->Viewport.Near; - - /* set raster position */ - ctx->Current.RasterPos[0] = x; - ctx->Current.RasterPos[1] = y; - ctx->Current.RasterPos[2] = z2; - ctx->Current.RasterPos[3] = 1.0F; - - ctx->Current.RasterPosValid = GL_TRUE; - - if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) - ctx->Current.RasterDistance = ctx->Current.Attrib[VERT_ATTRIB_FOG][0]; - else - ctx->Current.RasterDistance = 0.0; - - /* raster color = current color or index */ - if (ctx->Visual.rgbMode) { - ctx->Current.RasterColor[0] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F); - ctx->Current.RasterColor[1] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F); - ctx->Current.RasterColor[2] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F); - ctx->Current.RasterColor[3] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[0] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[1] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[2] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[3] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F); - } - else { - ctx->Current.RasterIndex = ctx->Current.Index; - } - - /* raster texcoord = current texcoord */ - { - GLuint texSet; - for (texSet = 0; texSet < ctx->Const.MaxTextureUnits; texSet++) { - COPY_4FV( ctx->Current.RasterTexCoords[texSet], - ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texSet] ); - } - } - - if (ctx->RenderMode==GL_SELECT) { - _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); - } -} - - -/* This is just to support the GL_MESA_window_pos version */ -static void -window_pos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - window_pos3f(x, y, z); - ctx->Current.RasterPos[3] = w; -} - - -void -_mesa_WindowPos2dMESA(GLdouble x, GLdouble y) -{ - window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -void -_mesa_WindowPos2fMESA(GLfloat x, GLfloat y) -{ - window_pos4f(x, y, 0.0F, 1.0F); -} - -void -_mesa_WindowPos2iMESA(GLint x, GLint y) -{ - window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); -} - -void -_mesa_WindowPos2sMESA(GLshort x, GLshort y) -{ - window_pos4f(x, y, 0.0F, 1.0F); -} - -void -_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) -{ - window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -void -_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) -{ - window_pos4f(x, y, z, 1.0F); -} - -void -_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z) -{ - window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -void -_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z) -{ - window_pos4f(x, y, z, 1.0F); -} - -void -_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -void -_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - window_pos4f(x, y, z, w); -} - -void -_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w) -{ - window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -void -_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w) -{ - window_pos4f(x, y, z, w); -} - -void -_mesa_WindowPos2dvMESA(const GLdouble *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -void -_mesa_WindowPos2fvMESA(const GLfloat *v) -{ - window_pos4f(v[0], v[1], 0.0F, 1.0F); -} - -void -_mesa_WindowPos2ivMESA(const GLint *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); -} - -void -_mesa_WindowPos2svMESA(const GLshort *v) -{ - window_pos4f(v[0], v[1], 0.0F, 1.0F); -} - -void -_mesa_WindowPos3dvMESA(const GLdouble *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -void -_mesa_WindowPos3fvMESA(const GLfloat *v) -{ - window_pos4f(v[0], v[1], v[2], 1.0); -} - -void -_mesa_WindowPos3ivMESA(const GLint *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); -} - -void -_mesa_WindowPos3svMESA(const GLshort *v) -{ - window_pos4f(v[0], v[1], v[2], 1.0F); -} - -void -_mesa_WindowPos4dvMESA(const GLdouble *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -void -_mesa_WindowPos4fvMESA(const GLfloat *v) -{ - window_pos4f(v[0], v[1], v[2], v[3]); -} - -void -_mesa_WindowPos4ivMESA(const GLint *v) -{ - window_pos4f((GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3]); -} - -void -_mesa_WindowPos4svMESA(const GLshort *v) -{ - window_pos4f(v[0], v[1], v[2], v[3]); -} - - - -#if 0 - -/* - * OpenGL implementation of glWindowPos*MESA() - */ -void glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) -{ - GLfloat fx, fy; - - /* Push current matrix mode and viewport attributes */ - glPushAttrib( GL_TRANSFORM_BIT | GL_VIEWPORT_BIT ); - - /* Setup projection parameters */ - glMatrixMode( GL_PROJECTION ); - glPushMatrix(); - glLoadIdentity(); - glMatrixMode( GL_MODELVIEW ); - glPushMatrix(); - glLoadIdentity(); - - glDepthRange( z, z ); - glViewport( (int) x - 1, (int) y - 1, 2, 2 ); - - /* set the raster (window) position */ - fx = x - (int) x; - fy = y - (int) y; - glRasterPos4f( fx, fy, 0.0, w ); - - /* restore matrices, viewport and matrix mode */ - glPopMatrix(); - glMatrixMode( GL_PROJECTION ); - glPopMatrix(); - - glPopAttrib(); -} - -#endif Index: xc/extras/Mesa/src/rastpos.h diff -u xc/extras/Mesa/src/rastpos.h:1.5 xc/extras/Mesa/src/rastpos.h:removed --- xc/extras/Mesa/src/rastpos.h:1.5 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/rastpos.h Wed Mar 16 21:00:32 2005 @@ -1,184 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef RASTPOS_H -#define RASTPOS_H - - -#include "glheader.h" - - -extern void -_mesa_RasterPos2d(GLdouble x, GLdouble y); - -extern void -_mesa_RasterPos2f(GLfloat x, GLfloat y); - -extern void -_mesa_RasterPos2i(GLint x, GLint y); - -extern void -_mesa_RasterPos2s(GLshort x, GLshort y); - -extern void -_mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z); - -extern void -_mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z); - -extern void -_mesa_RasterPos3i(GLint x, GLint y, GLint z); - -extern void -_mesa_RasterPos3s(GLshort x, GLshort y, GLshort z); - -extern void -_mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); - -extern void -_mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); - -extern void -_mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w); - -extern void -_mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); - -extern void -_mesa_RasterPos2dv(const GLdouble *v); - -extern void -_mesa_RasterPos2fv(const GLfloat *v); - -extern void -_mesa_RasterPos2iv(const GLint *v); - -extern void -_mesa_RasterPos2sv(const GLshort *v); - -extern void -_mesa_RasterPos3dv(const GLdouble *v); - -extern void -_mesa_RasterPos3fv(const GLfloat *v); - -extern void -_mesa_RasterPos3iv(const GLint *v); - -extern void -_mesa_RasterPos3sv(const GLshort *v); - -extern void -_mesa_RasterPos4dv(const GLdouble *v); - -extern void -_mesa_RasterPos4fv(const GLfloat *v); - -extern void -_mesa_RasterPos4iv(const GLint *v); - -extern void -_mesa_RasterPos4sv(const GLshort *v); - - -/**********************************************************************/ -/*** GL_MESA_window_pos ***/ -/**********************************************************************/ - -extern void -_mesa_WindowPos2dMESA(GLdouble x, GLdouble y); - -extern void -_mesa_WindowPos2fMESA(GLfloat x, GLfloat y); - -extern void -_mesa_WindowPos2iMESA(GLint x, GLint y); - -extern void -_mesa_WindowPos2sMESA(GLshort x, GLshort y); - -extern void -_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z); - -extern void -_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z); - -extern void -_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z); - -extern void -_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z); - -extern void -_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w); - -extern void -_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w); - -extern void -_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w); - -extern void -_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w); - -extern void -_mesa_WindowPos2dvMESA(const GLdouble *v); - -extern void -_mesa_WindowPos2fvMESA(const GLfloat *v); - -extern void -_mesa_WindowPos2ivMESA(const GLint *v); - -extern void -_mesa_WindowPos2svMESA(const GLshort *v); - -extern void -_mesa_WindowPos3dvMESA(const GLdouble *v); - -extern void -_mesa_WindowPos3fvMESA(const GLfloat *v); - -extern void -_mesa_WindowPos3ivMESA(const GLint *v); - -extern void -_mesa_WindowPos3svMESA(const GLshort *v); - -extern void -_mesa_WindowPos4dvMESA(const GLdouble *v); - -extern void -_mesa_WindowPos4fvMESA(const GLfloat *v); - -extern void -_mesa_WindowPos4ivMESA(const GLint *v); - -extern void -_mesa_WindowPos4svMESA(const GLshort *v); - - -#endif Index: xc/extras/Mesa/src/simple_list.h diff -u xc/extras/Mesa/src/simple_list.h:1.4 xc/extras/Mesa/src/simple_list.h:removed --- xc/extras/Mesa/src/simple_list.h:1.4 Fri Feb 22 14:25:39 2002 +++ xc/extras/Mesa/src/simple_list.h Wed Mar 16 21:00:32 2005 @@ -1,97 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* Simple macros for typesafe, intrusive lists. - * (C) 1997, Keith Whitwell - * - * Intended to work with a list sentinal which is created as an empty - * list. Insert & delete are O(1). - */ - - -#ifndef _SIMPLE_LIST_H -#define _SIMPLE_LIST_H - -#define remove_from_list(elem) \ -do { \ - (elem)->next->prev = (elem)->prev; \ - (elem)->prev->next = (elem)->next; \ -} while (0) - -#define insert_at_head(list, elem) \ -do { \ - (elem)->prev = list; \ - (elem)->next = (list)->next; \ - (list)->next->prev = elem; \ - (list)->next = elem; \ -} while(0) - -#define insert_at_tail(list, elem) \ -do { \ - (elem)->next = list; \ - (elem)->prev = (list)->prev; \ - (list)->prev->next = elem; \ - (list)->prev = elem; \ -} while(0) - -#define move_to_head(list, elem) \ -do { \ - remove_from_list(elem); \ - insert_at_head(list, elem); \ -} while (0) - -#define move_to_tail(list, elem) \ -do { \ - remove_from_list(elem); \ - insert_at_tail(list, elem); \ -} while (0) - - -#define make_empty_list(sentinal) \ -do { \ - (sentinal)->next = sentinal; \ - (sentinal)->prev = sentinal; \ -} while (0) - - -#define first_elem(list) ((list)->next) -#define last_elem(list) ((list)->prev) -#define next_elem(elem) ((elem)->next) -#define prev_elem(elem) ((elem)->prev) -#define at_end(list, elem) ((elem) == (list)) -#define is_empty_list(list) ((list)->next == (list)) - -#define foreach(ptr, list) \ - for( ptr=(list)->next ; ptr!=list ; ptr=(ptr)->next ) - -/* Kludgey - Lets you unlink the current value during a list - * traversal. Useful for free()-ing a list, element - * by element. - */ -#define foreach_s(ptr, t, list) \ - for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next) - - -#endif Index: xc/extras/Mesa/src/state.c diff -u xc/extras/Mesa/src/state.c:1.14 xc/extras/Mesa/src/state.c:removed --- xc/extras/Mesa/src/state.c:1.14 Sun Sep 28 15:16:58 2003 +++ xc/extras/Mesa/src/state.c Wed Mar 16 21:00:33 2005 @@ -1,1072 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file manages recalculation of derived values in the - * __GLcontext. - */ - - -#include "glheader.h" -#include "accum.h" -#include "api_loopback.h" -#include "attrib.h" -#include "blend.h" -#include "buffers.h" -#include "clip.h" -#include "colortab.h" -#include "context.h" -#include "convolve.h" -#include "depth.h" -#include "dlist.h" -#include "drawpix.h" -#include "enable.h" -#include "eval.h" -#include "get.h" -#include "feedback.h" -#include "fog.h" -#include "hint.h" -#include "histogram.h" -#include "light.h" -#include "lines.h" -#include "matrix.h" -#include "mmath.h" -#include "pixel.h" -#include "points.h" -#include "polygon.h" -#include "rastpos.h" -#include "state.h" -#include "stencil.h" -#include "teximage.h" -#include "texobj.h" -#include "texstate.h" -#include "mtypes.h" -#include "varray.h" -#if FEATURE_NV_vertex_program -#include "vpstate.h" -#endif - -#include "math/m_matrix.h" -#include "math/m_xform.h" - - -static int -generic_noop(void) -{ -#ifdef DEBUG - _mesa_problem(NULL, "User called no-op dispatch function"); -#endif - return 0; -} - - -/* - * Set all pointers in the given dispatch table to point to a - * generic no-op function. - */ -void -_mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize) -{ - GLuint i; - void **dispatch = (void **) table; - for (i = 0; i < tableSize; i++) { - dispatch[i] = (void *) generic_noop; - } -} - - - -/* - * Initialize the given dispatch table with pointers to Mesa's - * immediate-mode commands. - * - * Pointers to begin/end object commands and a few others - * are provided via the vtxfmt interface elsewhere. - */ -void -_mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize) -{ - /* first initialize all dispatch slots to no-op */ - _mesa_init_no_op_table(exec, tableSize); - - _mesa_loopback_init_api_table( exec, GL_TRUE ); - - /* load the dispatch slots we understand */ - exec->Accum = _mesa_Accum; - exec->AlphaFunc = _mesa_AlphaFunc; - exec->Bitmap = _mesa_Bitmap; - exec->BlendFunc = _mesa_BlendFunc; - exec->CallList = _mesa_CallList; - exec->CallLists = _mesa_CallLists; - exec->Clear = _mesa_Clear; - exec->ClearAccum = _mesa_ClearAccum; - exec->ClearColor = _mesa_ClearColor; - exec->ClearDepth = _mesa_ClearDepth; - exec->ClearIndex = _mesa_ClearIndex; - exec->ClearStencil = _mesa_ClearStencil; - exec->ClipPlane = _mesa_ClipPlane; - exec->ColorMask = _mesa_ColorMask; - exec->ColorMaterial = _mesa_ColorMaterial; - exec->CopyPixels = _mesa_CopyPixels; - exec->CullFace = _mesa_CullFace; - exec->DeleteLists = _mesa_DeleteLists; - exec->DepthFunc = _mesa_DepthFunc; - exec->DepthMask = _mesa_DepthMask; - exec->DepthRange = _mesa_DepthRange; - exec->Disable = _mesa_Disable; - exec->DrawBuffer = _mesa_DrawBuffer; - exec->DrawPixels = _mesa_DrawPixels; - exec->Enable = _mesa_Enable; - exec->EndList = _mesa_EndList; - exec->FeedbackBuffer = _mesa_FeedbackBuffer; - exec->Finish = _mesa_Finish; - exec->Flush = _mesa_Flush; - exec->FogCoordPointerEXT = _mesa_FogCoordPointerEXT; - exec->Fogf = _mesa_Fogf; - exec->Fogfv = _mesa_Fogfv; - exec->Fogi = _mesa_Fogi; - exec->Fogiv = _mesa_Fogiv; - exec->FrontFace = _mesa_FrontFace; - exec->Frustum = _mesa_Frustum; - exec->GenLists = _mesa_GenLists; - exec->GetBooleanv = _mesa_GetBooleanv; - exec->GetClipPlane = _mesa_GetClipPlane; - exec->GetDoublev = _mesa_GetDoublev; - exec->GetError = _mesa_GetError; - exec->GetFloatv = _mesa_GetFloatv; - exec->GetIntegerv = _mesa_GetIntegerv; - exec->GetLightfv = _mesa_GetLightfv; - exec->GetLightiv = _mesa_GetLightiv; - exec->GetMapdv = _mesa_GetMapdv; - exec->GetMapfv = _mesa_GetMapfv; - exec->GetMapiv = _mesa_GetMapiv; - exec->GetMaterialfv = _mesa_GetMaterialfv; - exec->GetMaterialiv = _mesa_GetMaterialiv; - exec->GetPixelMapfv = _mesa_GetPixelMapfv; - exec->GetPixelMapuiv = _mesa_GetPixelMapuiv; - exec->GetPixelMapusv = _mesa_GetPixelMapusv; - exec->GetPolygonStipple = _mesa_GetPolygonStipple; - exec->GetString = _mesa_GetString; - exec->GetTexEnvfv = _mesa_GetTexEnvfv; - exec->GetTexEnviv = _mesa_GetTexEnviv; - exec->GetTexGendv = _mesa_GetTexGendv; - exec->GetTexGenfv = _mesa_GetTexGenfv; - exec->GetTexGeniv = _mesa_GetTexGeniv; - exec->GetTexImage = _mesa_GetTexImage; - exec->GetTexLevelParameterfv = _mesa_GetTexLevelParameterfv; - exec->GetTexLevelParameteriv = _mesa_GetTexLevelParameteriv; - exec->GetTexParameterfv = _mesa_GetTexParameterfv; - exec->GetTexParameteriv = _mesa_GetTexParameteriv; - exec->Hint = _mesa_Hint; - exec->IndexMask = _mesa_IndexMask; - exec->InitNames = _mesa_InitNames; - exec->IsEnabled = _mesa_IsEnabled; - exec->IsList = _mesa_IsList; - exec->LightModelf = _mesa_LightModelf; - exec->LightModelfv = _mesa_LightModelfv; - exec->LightModeli = _mesa_LightModeli; - exec->LightModeliv = _mesa_LightModeliv; - exec->Lightf = _mesa_Lightf; - exec->Lightfv = _mesa_Lightfv; - exec->Lighti = _mesa_Lighti; - exec->Lightiv = _mesa_Lightiv; - exec->LineStipple = _mesa_LineStipple; - exec->LineWidth = _mesa_LineWidth; - exec->ListBase = _mesa_ListBase; - exec->LoadIdentity = _mesa_LoadIdentity; - exec->LoadMatrixd = _mesa_LoadMatrixd; - exec->LoadMatrixf = _mesa_LoadMatrixf; - exec->LoadName = _mesa_LoadName; - exec->LogicOp = _mesa_LogicOp; - exec->Map1d = _mesa_Map1d; - exec->Map1f = _mesa_Map1f; - exec->Map2d = _mesa_Map2d; - exec->Map2f = _mesa_Map2f; - exec->MapGrid1d = _mesa_MapGrid1d; - exec->MapGrid1f = _mesa_MapGrid1f; - exec->MapGrid2d = _mesa_MapGrid2d; - exec->MapGrid2f = _mesa_MapGrid2f; - exec->MatrixMode = _mesa_MatrixMode; - exec->MultMatrixd = _mesa_MultMatrixd; - exec->MultMatrixf = _mesa_MultMatrixf; - exec->NewList = _mesa_NewList; - exec->Ortho = _mesa_Ortho; - exec->PassThrough = _mesa_PassThrough; - exec->PixelMapfv = _mesa_PixelMapfv; - exec->PixelMapuiv = _mesa_PixelMapuiv; - exec->PixelMapusv = _mesa_PixelMapusv; - exec->PixelStoref = _mesa_PixelStoref; - exec->PixelStorei = _mesa_PixelStorei; - exec->PixelTransferf = _mesa_PixelTransferf; - exec->PixelTransferi = _mesa_PixelTransferi; - exec->PixelZoom = _mesa_PixelZoom; - exec->PointSize = _mesa_PointSize; - exec->PolygonMode = _mesa_PolygonMode; - exec->PolygonOffset = _mesa_PolygonOffset; - exec->PolygonStipple = _mesa_PolygonStipple; - exec->PopAttrib = _mesa_PopAttrib; - exec->PopMatrix = _mesa_PopMatrix; - exec->PopName = _mesa_PopName; - exec->PushAttrib = _mesa_PushAttrib; - exec->PushMatrix = _mesa_PushMatrix; - exec->PushName = _mesa_PushName; - exec->RasterPos2d = _mesa_RasterPos2d; - exec->RasterPos2dv = _mesa_RasterPos2dv; - exec->RasterPos2f = _mesa_RasterPos2f; - exec->RasterPos2fv = _mesa_RasterPos2fv; - exec->RasterPos2i = _mesa_RasterPos2i; - exec->RasterPos2iv = _mesa_RasterPos2iv; - exec->RasterPos2s = _mesa_RasterPos2s; - exec->RasterPos2sv = _mesa_RasterPos2sv; - exec->RasterPos3d = _mesa_RasterPos3d; - exec->RasterPos3dv = _mesa_RasterPos3dv; - exec->RasterPos3f = _mesa_RasterPos3f; - exec->RasterPos3fv = _mesa_RasterPos3fv; - exec->RasterPos3i = _mesa_RasterPos3i; - exec->RasterPos3iv = _mesa_RasterPos3iv; - exec->RasterPos3s = _mesa_RasterPos3s; - exec->RasterPos3sv = _mesa_RasterPos3sv; - exec->RasterPos4d = _mesa_RasterPos4d; - exec->RasterPos4dv = _mesa_RasterPos4dv; - exec->RasterPos4f = _mesa_RasterPos4f; - exec->RasterPos4fv = _mesa_RasterPos4fv; - exec->RasterPos4i = _mesa_RasterPos4i; - exec->RasterPos4iv = _mesa_RasterPos4iv; - exec->RasterPos4s = _mesa_RasterPos4s; - exec->RasterPos4sv = _mesa_RasterPos4sv; - exec->ReadBuffer = _mesa_ReadBuffer; - exec->ReadPixels = _mesa_ReadPixels; - exec->RenderMode = _mesa_RenderMode; - exec->Rotated = _mesa_Rotated; - exec->Rotatef = _mesa_Rotatef; - exec->Scaled = _mesa_Scaled; - exec->Scalef = _mesa_Scalef; - exec->Scissor = _mesa_Scissor; - exec->SecondaryColorPointerEXT = _mesa_SecondaryColorPointerEXT; - exec->SelectBuffer = _mesa_SelectBuffer; - exec->ShadeModel = _mesa_ShadeModel; - exec->StencilFunc = _mesa_StencilFunc; - exec->StencilMask = _mesa_StencilMask; - exec->StencilOp = _mesa_StencilOp; - exec->TexEnvf = _mesa_TexEnvf; - exec->TexEnvfv = _mesa_TexEnvfv; - exec->TexEnvi = _mesa_TexEnvi; - exec->TexEnviv = _mesa_TexEnviv; - exec->TexGend = _mesa_TexGend; - exec->TexGendv = _mesa_TexGendv; - exec->TexGenf = _mesa_TexGenf; - exec->TexGenfv = _mesa_TexGenfv; - exec->TexGeni = _mesa_TexGeni; - exec->TexGeniv = _mesa_TexGeniv; - exec->TexImage1D = _mesa_TexImage1D; - exec->TexImage2D = _mesa_TexImage2D; - exec->TexParameterf = _mesa_TexParameterf; - exec->TexParameterfv = _mesa_TexParameterfv; - exec->TexParameteri = _mesa_TexParameteri; - exec->TexParameteriv = _mesa_TexParameteriv; - exec->Translated = _mesa_Translated; - exec->Translatef = _mesa_Translatef; - exec->Viewport = _mesa_Viewport; - - /* 1.1 */ - exec->AreTexturesResident = _mesa_AreTexturesResident; - exec->AreTexturesResidentEXT = _mesa_AreTexturesResident; - exec->BindTexture = _mesa_BindTexture; - exec->ColorPointer = _mesa_ColorPointer; - exec->CopyTexImage1D = _mesa_CopyTexImage1D; - exec->CopyTexImage2D = _mesa_CopyTexImage2D; - exec->CopyTexSubImage1D = _mesa_CopyTexSubImage1D; - exec->CopyTexSubImage2D = _mesa_CopyTexSubImage2D; - exec->DeleteTextures = _mesa_DeleteTextures; - exec->DisableClientState = _mesa_DisableClientState; - exec->EdgeFlagPointer = _mesa_EdgeFlagPointer; - exec->EnableClientState = _mesa_EnableClientState; - exec->GenTextures = _mesa_GenTextures; - exec->GenTexturesEXT = _mesa_GenTextures; - exec->GetPointerv = _mesa_GetPointerv; - exec->IndexPointer = _mesa_IndexPointer; - exec->InterleavedArrays = _mesa_InterleavedArrays; - exec->IsTexture = _mesa_IsTexture; - exec->IsTextureEXT = _mesa_IsTexture; - exec->NormalPointer = _mesa_NormalPointer; - exec->PopClientAttrib = _mesa_PopClientAttrib; - exec->PrioritizeTextures = _mesa_PrioritizeTextures; - exec->PushClientAttrib = _mesa_PushClientAttrib; - exec->TexCoordPointer = _mesa_TexCoordPointer; - exec->TexSubImage1D = _mesa_TexSubImage1D; - exec->TexSubImage2D = _mesa_TexSubImage2D; - exec->VertexPointer = _mesa_VertexPointer; - - /* 1.2 */ - exec->CopyTexSubImage3D = _mesa_CopyTexSubImage3D; - exec->TexImage3D = _mesa_TexImage3D; - exec->TexSubImage3D = _mesa_TexSubImage3D; - - /* OpenGL 1.2 GL_ARB_imaging */ - exec->BlendColor = _mesa_BlendColor; - exec->BlendEquation = _mesa_BlendEquation; - exec->ColorSubTable = _mesa_ColorSubTable; - exec->ColorTable = _mesa_ColorTable; - exec->ColorTableParameterfv = _mesa_ColorTableParameterfv; - exec->ColorTableParameteriv = _mesa_ColorTableParameteriv; - exec->ConvolutionFilter1D = _mesa_ConvolutionFilter1D; - exec->ConvolutionFilter2D = _mesa_ConvolutionFilter2D; - exec->ConvolutionParameterf = _mesa_ConvolutionParameterf; - exec->ConvolutionParameterfv = _mesa_ConvolutionParameterfv; - exec->ConvolutionParameteri = _mesa_ConvolutionParameteri; - exec->ConvolutionParameteriv = _mesa_ConvolutionParameteriv; - exec->CopyColorSubTable = _mesa_CopyColorSubTable; - exec->CopyColorTable = _mesa_CopyColorTable; - exec->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D; - exec->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D; - exec->GetColorTable = _mesa_GetColorTable; - exec->GetColorTableEXT = _mesa_GetColorTable; - exec->GetColorTableParameterfv = _mesa_GetColorTableParameterfv; - exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv; - exec->GetColorTableParameteriv = _mesa_GetColorTableParameteriv; - exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv; - exec->GetConvolutionFilter = _mesa_GetConvolutionFilter; - exec->GetConvolutionFilterEXT = _mesa_GetConvolutionFilter; - exec->GetConvolutionParameterfv = _mesa_GetConvolutionParameterfv; - exec->GetConvolutionParameterfvEXT = _mesa_GetConvolutionParameterfv; - exec->GetConvolutionParameteriv = _mesa_GetConvolutionParameteriv; - exec->GetConvolutionParameterivEXT = _mesa_GetConvolutionParameteriv; - exec->GetHistogram = _mesa_GetHistogram; - exec->GetHistogramEXT = _mesa_GetHistogram; - exec->GetHistogramParameterfv = _mesa_GetHistogramParameterfv; - exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv; - exec->GetHistogramParameteriv = _mesa_GetHistogramParameteriv; - exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv; - exec->GetMinmax = _mesa_GetMinmax; - exec->GetMinmaxEXT = _mesa_GetMinmax; - exec->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv; - exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv; - exec->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv; - exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv; - exec->GetSeparableFilter = _mesa_GetSeparableFilter; - exec->GetSeparableFilterEXT = _mesa_GetSeparableFilter; - exec->Histogram = _mesa_Histogram; - exec->Minmax = _mesa_Minmax; - exec->ResetHistogram = _mesa_ResetHistogram; - exec->ResetMinmax = _mesa_ResetMinmax; - exec->SeparableFilter2D = _mesa_SeparableFilter2D; - - /* 2. GL_EXT_blend_color */ -#if 0 - exec->BlendColorEXT = _mesa_BlendColorEXT; -#endif - - /* 3. GL_EXT_polygon_offset */ - exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT; - - /* 6. GL_EXT_texture3d */ -#if 0 - exec->CopyTexSubImage3DEXT = _mesa_CopyTexSubImage3D; - exec->TexImage3DEXT = _mesa_TexImage3DEXT; - exec->TexSubImage3DEXT = _mesa_TexSubImage3D; -#endif - - /* 11. GL_EXT_histogram */ - exec->GetHistogramEXT = _mesa_GetHistogram; - exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv; - exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv; - exec->GetMinmaxEXT = _mesa_GetMinmax; - exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv; - exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv; - - /* ?. GL_SGIX_pixel_texture */ - exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX; - - /* 15. GL_SGIS_pixel_texture */ - exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS; - exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS; - exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS; - exec->PixelTexGenParameterfvSGIS = _mesa_PixelTexGenParameterfvSGIS; - exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS; - exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS; - - /* 30. GL_EXT_vertex_array */ - exec->ColorPointerEXT = _mesa_ColorPointerEXT; - exec->EdgeFlagPointerEXT = _mesa_EdgeFlagPointerEXT; - exec->IndexPointerEXT = _mesa_IndexPointerEXT; - exec->NormalPointerEXT = _mesa_NormalPointerEXT; - exec->TexCoordPointerEXT = _mesa_TexCoordPointerEXT; - exec->VertexPointerEXT = _mesa_VertexPointerEXT; - - /* 37. GL_EXT_blend_minmax */ -#if 0 - exec->BlendEquationEXT = _mesa_BlendEquationEXT; -#endif - - /* 54. GL_EXT_point_parameters */ - exec->PointParameterfEXT = _mesa_PointParameterfEXT; - exec->PointParameterfvEXT = _mesa_PointParameterfvEXT; - - /* 78. GL_EXT_paletted_texture */ -#if 0 - exec->ColorTableEXT = _mesa_ColorTableEXT; - exec->ColorSubTableEXT = _mesa_ColorSubTableEXT; -#endif - exec->GetColorTableEXT = _mesa_GetColorTable; - exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv; - exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv; - - /* 97. GL_EXT_compiled_vertex_array */ - exec->LockArraysEXT = _mesa_LockArraysEXT; - exec->UnlockArraysEXT = _mesa_UnlockArraysEXT; - - /* 148. GL_EXT_multi_draw_arrays */ - exec->MultiDrawArraysEXT = _mesa_MultiDrawArraysEXT; - exec->MultiDrawElementsEXT = _mesa_MultiDrawElementsEXT; - - /* 173. GL_INGR_blend_func_separate */ - exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT; - - /* 196. GL_MESA_resize_buffers */ - exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA; - - /* 197. GL_MESA_window_pos */ - exec->WindowPos2dMESA = _mesa_WindowPos2dMESA; - exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA; - exec->WindowPos2fMESA = _mesa_WindowPos2fMESA; - exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA; - exec->WindowPos2iMESA = _mesa_WindowPos2iMESA; - exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA; - exec->WindowPos2sMESA = _mesa_WindowPos2sMESA; - exec->WindowPos2svMESA = _mesa_WindowPos2svMESA; - exec->WindowPos3dMESA = _mesa_WindowPos3dMESA; - exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA; - exec->WindowPos3fMESA = _mesa_WindowPos3fMESA; - exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA; - exec->WindowPos3iMESA = _mesa_WindowPos3iMESA; - exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA; - exec->WindowPos3sMESA = _mesa_WindowPos3sMESA; - exec->WindowPos3svMESA = _mesa_WindowPos3svMESA; - exec->WindowPos4dMESA = _mesa_WindowPos4dMESA; - exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA; - exec->WindowPos4fMESA = _mesa_WindowPos4fMESA; - exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA; - exec->WindowPos4iMESA = _mesa_WindowPos4iMESA; - exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA; - exec->WindowPos4sMESA = _mesa_WindowPos4sMESA; - exec->WindowPos4svMESA = _mesa_WindowPos4svMESA; - - /* 233. GL_NV_vertex_program */ -#if FEATURE_NV_vertex_program - exec->BindProgramNV = _mesa_BindProgramNV; - exec->DeleteProgramsNV = _mesa_DeleteProgramsNV; - exec->ExecuteProgramNV = _mesa_ExecuteProgramNV; - exec->GenProgramsNV = _mesa_GenProgramsNV; - exec->AreProgramsResidentNV = _mesa_AreProgramsResidentNV; - exec->RequestResidentProgramsNV = _mesa_RequestResidentProgramsNV; - exec->GetProgramParameterfvNV = _mesa_GetProgramParameterfvNV; - exec->GetProgramParameterdvNV = _mesa_GetProgramParameterdvNV; - exec->GetProgramivNV = _mesa_GetProgramivNV; - exec->GetProgramStringNV = _mesa_GetProgramStringNV; - exec->GetTrackMatrixivNV = _mesa_GetTrackMatrixivNV; - exec->GetVertexAttribdvNV = _mesa_GetVertexAttribdvNV; - exec->GetVertexAttribfvNV = _mesa_GetVertexAttribfvNV; - exec->GetVertexAttribivNV = _mesa_GetVertexAttribivNV; - exec->GetVertexAttribPointervNV = _mesa_GetVertexAttribPointervNV; - exec->IsProgramNV = _mesa_IsProgramNV; - exec->LoadProgramNV = _mesa_LoadProgramNV; - exec->ProgramParameter4dNV = _mesa_ProgramParameter4dNV; - exec->ProgramParameter4dvNV = _mesa_ProgramParameter4dvNV; - exec->ProgramParameter4fNV = _mesa_ProgramParameter4fNV; - exec->ProgramParameter4fvNV = _mesa_ProgramParameter4fvNV; - exec->ProgramParameters4dvNV = _mesa_ProgramParameters4dvNV; - exec->ProgramParameters4fvNV = _mesa_ProgramParameters4fvNV; - exec->TrackMatrixNV = _mesa_TrackMatrixNV; - exec->VertexAttribPointerNV = _mesa_VertexAttribPointerNV; -#endif - - /* 262. GL_NV_point_sprite */ - exec->PointParameteriNV = _mesa_PointParameteriNV; - exec->PointParameterivNV = _mesa_PointParameterivNV; - - /* 268. GL_EXT_stencil_two_side */ - exec->ActiveStencilFaceEXT = _mesa_ActiveStencilFaceEXT; - - /* ARB 1. GL_ARB_multitexture */ - exec->ActiveTextureARB = _mesa_ActiveTextureARB; - exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB; - - /* ARB 3. GL_ARB_transpose_matrix */ - exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB; - exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB; - exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB; - exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB; - - /* ARB 5. GL_ARB_multisample */ - exec->SampleCoverageARB = _mesa_SampleCoverageARB; - - /* ARB 12. GL_ARB_texture_compression */ - exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB; - exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB; - exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB; - exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB; - exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB; - exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB; - exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB; - - /* ARB 14. GL_ARB_point_parameters */ - /* reuse EXT_point_parameters functions */ -} - - - -/**********************************************************************/ -/***** State update logic *****/ -/**********************************************************************/ - - -/* - * Check polygon state and set DD_TRI_CULL_FRONT_BACK and/or DD_TRI_OFFSET - * in ctx->_TriangleCaps if needed. - */ -static void -update_polygon( GLcontext *ctx ) -{ - ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); - - if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) - ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; - - /* Any Polygon offsets enabled? */ - if (ctx->Polygon.OffsetPoint || - ctx->Polygon.OffsetLine || - ctx->Polygon.OffsetFill) { - ctx->_TriangleCaps |= DD_TRI_OFFSET; - } -} - -static void -calculate_model_project_matrix( GLcontext *ctx ) -{ - _math_matrix_mul_matrix( &ctx->_ModelProjectMatrix, - ctx->ProjectionMatrixStack.Top, - ctx->ModelviewMatrixStack.Top ); - - _math_matrix_analyse( &ctx->_ModelProjectMatrix ); -} - -static void -update_modelview_scale( GLcontext *ctx ) -{ - ctx->_ModelViewInvScale = 1.0F; - if (ctx->ModelviewMatrixStack.Top->flags & (MAT_FLAG_UNIFORM_SCALE | - MAT_FLAG_GENERAL_SCALE | - MAT_FLAG_GENERAL_3D | - MAT_FLAG_GENERAL) ) { - const GLfloat *m = ctx->ModelviewMatrixStack.Top->inv; - GLfloat f = m[2] * m[2] + m[6] * m[6] + m[10] * m[10]; - if (f < 1e-12) f = 1.0; - if (ctx->_NeedEyeCoords) - ctx->_ModelViewInvScale = (GLfloat) (1.0/GL_SQRT(f)); - else - ctx->_ModelViewInvScale = (GLfloat) GL_SQRT(f); - } -} - - -/* Bring uptodate any state that relies on _NeedEyeCoords. - */ -static void -update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords ) -{ - /* Check if the truth-value interpretations of the bitfields have - * changed: - */ - if ((oldneedeyecoords == 0) != (ctx->_NeedEyeCoords == 0)) { - /* Recalculate all state that depends on _NeedEyeCoords. - */ - update_modelview_scale(ctx); - _mesa_compute_light_positions( ctx ); - - if (ctx->Driver.LightingSpaceChange) - ctx->Driver.LightingSpaceChange( ctx ); - } - else { - GLuint new_state = ctx->NewState; - - /* Recalculate that same state only if it has been invalidated - * by other statechanges. - */ - if (new_state & _NEW_MODELVIEW) - update_modelview_scale(ctx); - - if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW)) - _mesa_compute_light_positions( ctx ); - } -} - - -static void -update_drawbuffer( GLcontext *ctx ) -{ - ctx->DrawBuffer->_Xmin = 0; - ctx->DrawBuffer->_Ymin = 0; - ctx->DrawBuffer->_Xmax = ctx->DrawBuffer->Width; - ctx->DrawBuffer->_Ymax = ctx->DrawBuffer->Height; - if (ctx->Scissor.Enabled) { - if (ctx->Scissor.X > ctx->DrawBuffer->_Xmin) { - ctx->DrawBuffer->_Xmin = ctx->Scissor.X; - } - if (ctx->Scissor.Y > ctx->DrawBuffer->_Ymin) { - ctx->DrawBuffer->_Ymin = ctx->Scissor.Y; - } - if (ctx->Scissor.X + ctx->Scissor.Width < ctx->DrawBuffer->_Xmax) { - ctx->DrawBuffer->_Xmax = ctx->Scissor.X + ctx->Scissor.Width; - } - if (ctx->Scissor.Y + ctx->Scissor.Height < ctx->DrawBuffer->_Ymax) { - ctx->DrawBuffer->_Ymax = ctx->Scissor.Y + ctx->Scissor.Height; - } - } -} - - -/* NOTE: This routine references Tranform attribute values to compute - * userclip positions in clip space, but is only called on - * _NEW_PROJECTION. The _mesa_ClipPlane() function keeps these values - * up to date across changes to the Transform attributes. - */ -static void -update_projection( GLcontext *ctx ) -{ - _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); - - /* Recompute clip plane positions in clipspace. This is also done - * in _mesa_ClipPlane(). - */ - if (ctx->Transform.ClipPlanesEnabled) { - GLuint p; - for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { - if (ctx->Transform.ClipPlanesEnabled & (1 << p)) { - _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], - ctx->Transform.EyeUserPlane[p], - ctx->ProjectionMatrixStack.Top->inv ); - } - } - } -} - - -/* - * Return a bitmask of IMAGE_*_BIT flags which to indicate which - * pixel transfer operations are enabled. - */ -static void -update_image_transfer_state(GLcontext *ctx) -{ - GLuint mask = 0; - - if (ctx->Pixel.RedScale != 1.0F || ctx->Pixel.RedBias != 0.0F || - ctx->Pixel.GreenScale != 1.0F || ctx->Pixel.GreenBias != 0.0F || - ctx->Pixel.BlueScale != 1.0F || ctx->Pixel.BlueBias != 0.0F || - ctx->Pixel.AlphaScale != 1.0F || ctx->Pixel.AlphaBias != 0.0F) - mask |= IMAGE_SCALE_BIAS_BIT; - - if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset) - mask |= IMAGE_SHIFT_OFFSET_BIT; - - if (ctx->Pixel.MapColorFlag) - mask |= IMAGE_MAP_COLOR_BIT; - - if (ctx->Pixel.ColorTableEnabled) - mask |= IMAGE_COLOR_TABLE_BIT; - - if (ctx->Pixel.Convolution1DEnabled || - ctx->Pixel.Convolution2DEnabled || - ctx->Pixel.Separable2DEnabled) { - mask |= IMAGE_CONVOLUTION_BIT; - if (ctx->Pixel.PostConvolutionScale[0] != 1.0F || - ctx->Pixel.PostConvolutionScale[1] != 1.0F || - ctx->Pixel.PostConvolutionScale[2] != 1.0F || - ctx->Pixel.PostConvolutionScale[3] != 1.0F || - ctx->Pixel.PostConvolutionBias[0] != 0.0F || - ctx->Pixel.PostConvolutionBias[1] != 0.0F || - ctx->Pixel.PostConvolutionBias[2] != 0.0F || - ctx->Pixel.PostConvolutionBias[3] != 0.0F) { - mask |= IMAGE_POST_CONVOLUTION_SCALE_BIAS; - } - } - - if (ctx->Pixel.PostConvolutionColorTableEnabled) - mask |= IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT; - - if (ctx->ColorMatrixStack.Top->type != MATRIX_IDENTITY || - ctx->Pixel.PostColorMatrixScale[0] != 1.0F || - ctx->Pixel.PostColorMatrixBias[0] != 0.0F || - ctx->Pixel.PostColorMatrixScale[1] != 1.0F || - ctx->Pixel.PostColorMatrixBias[1] != 0.0F || - ctx->Pixel.PostColorMatrixScale[2] != 1.0F || - ctx->Pixel.PostColorMatrixBias[2] != 0.0F || - ctx->Pixel.PostColorMatrixScale[3] != 1.0F || - ctx->Pixel.PostColorMatrixBias[3] != 0.0F) - mask |= IMAGE_COLOR_MATRIX_BIT; - - if (ctx->Pixel.PostColorMatrixColorTableEnabled) - mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT; - - if (ctx->Pixel.HistogramEnabled) - mask |= IMAGE_HISTOGRAM_BIT; - - if (ctx->Pixel.MinMaxEnabled) - mask |= IMAGE_MIN_MAX_BIT; - - ctx->_ImageTransferState = mask; -} - - - - -/* Note: This routine refers to derived texture attribute values to - * compute the ENABLE_TEXMAT flags, but is only called on - * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE, the ENABLE_TEXMAT - * flags are updated by _mesa_update_textures(), below. - * - * If both TEXTURE and TEXTURE_MATRIX change at once, these values - * will be computed twice. - */ -static void -update_texture_matrices( GLcontext *ctx ) -{ - GLuint i; - - ctx->Texture._TexMatEnabled = 0; - - for (i=0; i < ctx->Const.MaxTextureUnits; i++) { - if (ctx->TextureMatrixStack[i].Top->flags & MAT_DIRTY) { - _math_matrix_analyse( ctx->TextureMatrixStack[i].Top ); - - if (ctx->Texture.Unit[i]._ReallyEnabled && - ctx->TextureMatrixStack[i].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(i); - - if (ctx->Driver.TextureMatrix) - ctx->Driver.TextureMatrix( ctx, i, ctx->TextureMatrixStack[i].Top); - } - } -} - - -/* Note: This routine refers to derived texture matrix values to - * compute the ENABLE_TEXMAT flags, but is only called on - * _NEW_TEXTURE. On changes to _NEW_TEXTURE_MATRIX, the ENABLE_TEXMAT - * flags are updated by _mesa_update_texture_matrices, above. - * - * If both TEXTURE and TEXTURE_MATRIX change at once, these values - * will be computed twice. - */ -static void -update_texture_state( GLcontext *ctx ) -{ - GLuint unit; - - ctx->Texture._EnabledUnits = 0; - ctx->Texture._GenFlags = 0; - ctx->_NeedNormals &= ~NEED_NORMALS_TEXGEN; - ctx->_NeedEyeCoords &= ~NEED_EYE_TEXGEN; - ctx->Texture._TexMatEnabled = 0; - ctx->Texture._TexGenEnabled = 0; - - /* Update texture unit state. - */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - - texUnit->_ReallyEnabled = 0; - texUnit->_GenFlags = 0; - - if (!texUnit->Enabled) - continue; - - /* Look for the highest-priority texture target that's enabled and - * complete. That's the one we'll use for texturing. - */ - if (texUnit->Enabled & TEXTURE_CUBE_BIT) { - struct gl_texture_object *texObj = texUnit->CurrentCubeMap; - if (!texObj->Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->Complete) { - texUnit->_ReallyEnabled = TEXTURE_CUBE_BIT; - texUnit->_Current = texObj; - } - } - - if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE_3D_BIT)) { - struct gl_texture_object *texObj = texUnit->Current3D; - if (!texObj->Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->Complete) { - texUnit->_ReallyEnabled = TEXTURE_3D_BIT; - texUnit->_Current = texObj; - } - } - - if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE_RECT_BIT)) { - struct gl_texture_object *texObj = texUnit->CurrentRect; - if (!texObj->Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->Complete) { - texUnit->_ReallyEnabled = TEXTURE_RECT_BIT; - texUnit->_Current = texObj; - } - } - - if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE_2D_BIT)) { - struct gl_texture_object *texObj = texUnit->Current2D; - if (!texObj->Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->Complete) { - texUnit->_ReallyEnabled = TEXTURE_2D_BIT; - texUnit->_Current = texObj; - } - } - - if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE_1D_BIT)) { - struct gl_texture_object *texObj = texUnit->Current1D; - if (!texObj->Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->Complete) { - texUnit->_ReallyEnabled = TEXTURE_1D_BIT; - texUnit->_Current = texObj; - } - } - - if (!texUnit->_ReallyEnabled) { - texUnit->_Current = NULL; - continue; - } - - if (texUnit->_ReallyEnabled) - ctx->Texture._EnabledUnits |= (1 << unit); - - if (texUnit->TexGenEnabled) { - if (texUnit->TexGenEnabled & S_BIT) { - texUnit->_GenFlags |= texUnit->_GenBitS; - } - if (texUnit->TexGenEnabled & T_BIT) { - texUnit->_GenFlags |= texUnit->_GenBitT; - } - if (texUnit->TexGenEnabled & Q_BIT) { - texUnit->_GenFlags |= texUnit->_GenBitQ; - } - if (texUnit->TexGenEnabled & R_BIT) { - texUnit->_GenFlags |= texUnit->_GenBitR; - } - - ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit); - ctx->Texture._GenFlags |= texUnit->_GenFlags; - } - - if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); - } - - if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS) { - ctx->_NeedNormals |= NEED_NORMALS_TEXGEN; - ctx->_NeedEyeCoords |= NEED_EYE_TEXGEN; - } - - if (ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD) { - ctx->_NeedEyeCoords |= NEED_EYE_TEXGEN; - } -} - - - -/* - * If ctx->NewState is non-zero then this function MUST be called before - * rendering any primitive. Basically, function pointers and miscellaneous - * flags are updated to reflect the current state of the state machine. - * - * The above constraint is now maintained largely by the two Exec - * dispatch tables, which trigger the appropriate flush on transition - * between State and Geometry modes. - * - * Special care is taken with the derived value _NeedEyeCoords. This - * is a bitflag which is updated with information from a number of - * attribute groups (MODELVIEW, LIGHT, TEXTURE). A lot of derived - * state references this value, and must be treated with care to - * ensure that updates are done correctly. All state dependent on - * _NeedEyeCoords is calculated from within _mesa_update_tnl_spaces(), - * and from nowhere else. - */ -void _mesa_update_state( GLcontext *ctx ) -{ - const GLuint new_state = ctx->NewState; - const GLuint oldneedeyecoords = ctx->_NeedEyeCoords; - - if (MESA_VERBOSE & VERBOSE_STATE) - _mesa_print_state("_mesa_update_state", new_state); - - if (new_state & _NEW_MODELVIEW) - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - - if (new_state & _NEW_PROJECTION) - update_projection( ctx ); - - if (new_state & _NEW_TEXTURE_MATRIX) - update_texture_matrices( ctx ); - - if (new_state & _NEW_COLOR_MATRIX) - _math_matrix_analyse( ctx->ColorMatrixStack.Top ); - - /* References ColorMatrix.type (derived above). - */ - if (new_state & _IMAGE_NEW_TRANSFER_STATE) - update_image_transfer_state(ctx); - - /* Contributes to NeedEyeCoords, NeedNormals. - */ - if (new_state & _NEW_TEXTURE) - update_texture_state( ctx ); - - if (new_state & (_NEW_BUFFERS|_NEW_SCISSOR)) - update_drawbuffer( ctx ); - - if (new_state & _NEW_POLYGON) - update_polygon( ctx ); - - /* Contributes to NeedEyeCoords, NeedNormals. - */ - if (new_state & _NEW_LIGHT) - _mesa_update_lighting( ctx ); - - /* We can light in object space if the modelview matrix preserves - * lengths and relative angles. - */ - if (new_state & (_NEW_MODELVIEW|_NEW_LIGHT)) { - ctx->_NeedEyeCoords &= ~NEED_EYE_LIGHT_MODELVIEW; - if (ctx->Light.Enabled && - !TEST_MAT_FLAGS( ctx->ModelviewMatrixStack.Top, MAT_FLAGS_LENGTH_PRESERVING)) - ctx->_NeedEyeCoords |= NEED_EYE_LIGHT_MODELVIEW; - } - - -#if 0 - /* XXX this is a bit of a hack. We should be checking elsewhere if - * vertex program mode is enabled. We set _NeedEyeCoords to zero to - * ensure that the combined modelview/projection matrix is computed - * in calculate_model_project_matrix(). - */ - if (ctx->VertexProgram.Enabled) - ctx->_NeedEyeCoords = 0; - /* KW: it's now always computed. - */ -#endif - - /* Keep ModelviewProject uptodate always to allow tnl - * implementations that go model->clip even when eye is required. - */ - if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION)) - calculate_model_project_matrix(ctx); - - /* ctx->_NeedEyeCoords is now uptodate. - * - * If the truth value of this variable has changed, update for the - * new lighting space and recompute the positions of lights and the - * normal transform. - * - * If the lighting space hasn't changed, may still need to recompute - * light positions & normal transforms for other reasons. - */ - if (new_state & (_NEW_MODELVIEW | - _NEW_LIGHT | - _MESA_NEW_NEED_EYE_COORDS)) - update_tnl_spaces( ctx, oldneedeyecoords ); - - /* - * Here the driver sets up all the ctx->Driver function pointers - * to it's specific, private functions, and performs any - * internal state management necessary, including invalidating - * state of active modules. - * - * Set ctx->NewState to zero to avoid recursion if - * Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?) - */ - ctx->NewState = 0; - ctx->Driver.UpdateState(ctx, new_state); - ctx->Array.NewState = 0; - - /* At this point we can do some assertions to be sure the required - * device driver function pointers are all initialized. - */ - ASSERT(ctx->Driver.GetString); - ASSERT(ctx->Driver.UpdateState); - ASSERT(ctx->Driver.Clear); - ASSERT(ctx->Driver.GetBufferSize); - if (ctx->Visual.accumRedBits > 0) { - ASSERT(ctx->Driver.Accum); - } - ASSERT(ctx->Driver.DrawPixels); - ASSERT(ctx->Driver.ReadPixels); - ASSERT(ctx->Driver.CopyPixels); - ASSERT(ctx->Driver.Bitmap); - ASSERT(ctx->Driver.ResizeBuffers); - ASSERT(ctx->Driver.TexImage1D); - ASSERT(ctx->Driver.TexImage2D); - ASSERT(ctx->Driver.TexImage3D); - ASSERT(ctx->Driver.TexSubImage1D); - ASSERT(ctx->Driver.TexSubImage2D); - ASSERT(ctx->Driver.TexSubImage3D); - ASSERT(ctx->Driver.CopyTexImage1D); - ASSERT(ctx->Driver.CopyTexImage2D); - ASSERT(ctx->Driver.CopyTexSubImage1D); - ASSERT(ctx->Driver.CopyTexSubImage2D); - ASSERT(ctx->Driver.CopyTexSubImage3D); - if (ctx->Extensions.ARB_texture_compression) { -#if 0 /* HW drivers need these, but not SW rasterizers */ - ASSERT(ctx->Driver.CompressedTexImage1D); - ASSERT(ctx->Driver.CompressedTexImage2D); - ASSERT(ctx->Driver.CompressedTexImage3D); - ASSERT(ctx->Driver.CompressedTexSubImage1D); - ASSERT(ctx->Driver.CompressedTexSubImage2D); - ASSERT(ctx->Driver.CompressedTexSubImage3D); -#endif - } -} - -/* Is this helpful? - */ -void -_mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag ) -{ - if (flag) - ctx->_NeedEyeCoords &= ~NEED_EYE_DRIVER; - else - ctx->_NeedEyeCoords |= NEED_EYE_DRIVER; - - ctx->NewState |= _NEW_POINT; /* one of the bits from - * _MESA_NEW_NEED_EYE_COORDS. - */ -} Index: xc/extras/Mesa/src/state.h diff -u xc/extras/Mesa/src/state.h:1.3 xc/extras/Mesa/src/state.h:removed --- xc/extras/Mesa/src/state.h:1.3 Fri Feb 22 14:25:40 2002 +++ xc/extras/Mesa/src/state.h Wed Mar 16 21:00:33 2005 @@ -1,51 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef STATE_H -#define STATE_H - -#include "mtypes.h" - - -extern void -_mesa_init_no_op_table(struct _glapi_table *exec, GLuint tableSize); - -extern void -_mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize); - -extern void -_mesa_update_state( GLcontext *ctx ); - -extern void -_mesa_print_state( const char *msg, GLuint state ); - -extern void -_mesa_print_enable_flags( const char *msg, GLuint flags ); - -extern void -_mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag ); - -#endif Index: xc/extras/Mesa/src/stencil.c diff -u xc/extras/Mesa/src/stencil.c:1.10 xc/extras/Mesa/src/stencil.c:removed --- xc/extras/Mesa/src/stencil.c:1.10 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/stencil.c Wed Mar 16 21:00:33 2005 @@ -1,213 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "depth.h" -#include "macros.h" -#include "stencil.h" -#include "mtypes.h" -#include "enable.h" - - -void -_mesa_ClearStencil( GLint s ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Stencil.Clear == (GLstencil) s) - return; - - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.Clear = (GLstencil) s; - - if (ctx->Driver.ClearStencil) { - (*ctx->Driver.ClearStencil)( ctx, s ); - } -} - - - -void -_mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - const GLint face = ctx->Stencil.ActiveFace; - GLint maxref; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (func) { - case GL_NEVER: - case GL_LESS: - case GL_LEQUAL: - case GL_GREATER: - case GL_GEQUAL: - case GL_EQUAL: - case GL_NOTEQUAL: - case GL_ALWAYS: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glStencilFunc" ); - return; - } - - maxref = (1 << STENCIL_BITS) - 1; - ref = (GLstencil) CLAMP( ref, 0, maxref ); - - if (ctx->Stencil.Function[face] == func && - ctx->Stencil.ValueMask[face] == (GLstencil) mask && - ctx->Stencil.Ref[face] == ref) - return; - - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.Function[face] = func; - ctx->Stencil.Ref[face] = ref; - ctx->Stencil.ValueMask[face] = (GLstencil) mask; - - if (ctx->Driver.StencilFunc) { - (*ctx->Driver.StencilFunc)( ctx, func, ref, mask ); - } -} - - - -void -_mesa_StencilMask( GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - const GLint face = ctx->Stencil.ActiveFace; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Stencil.WriteMask[face] == (GLstencil) mask) - return; - - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.WriteMask[face] = (GLstencil) mask; - - if (ctx->Driver.StencilMask) { - (*ctx->Driver.StencilMask)( ctx, mask ); - } -} - - - -void -_mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - GET_CURRENT_CONTEXT(ctx); - const GLint face = ctx->Stencil.ActiveFace; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (fail) { - case GL_KEEP: - case GL_ZERO: - case GL_REPLACE: - case GL_INCR: - case GL_DECR: - case GL_INVERT: - break; - case GL_INCR_WRAP_EXT: - case GL_DECR_WRAP_EXT: - if (!ctx->Extensions.EXT_stencil_wrap) { - break; - } - /* FALL-THROUGH */ - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); - return; - } - switch (zfail) { - case GL_KEEP: - case GL_ZERO: - case GL_REPLACE: - case GL_INCR: - case GL_DECR: - case GL_INVERT: - break; - case GL_INCR_WRAP_EXT: - case GL_DECR_WRAP_EXT: - if (ctx->Extensions.EXT_stencil_wrap) { - break; - } - /* FALL-THROUGH */ - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); - return; - } - switch (zpass) { - case GL_KEEP: - case GL_ZERO: - case GL_REPLACE: - case GL_INCR: - case GL_DECR: - case GL_INVERT: - break; - case GL_INCR_WRAP_EXT: - case GL_DECR_WRAP_EXT: - if (ctx->Extensions.EXT_stencil_wrap) { - break; - } - /* FALL-THROUGH */ - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp"); - return; - } - - if (ctx->Stencil.ZFailFunc[face] == zfail && - ctx->Stencil.ZPassFunc[face] == zpass && - ctx->Stencil.FailFunc[face] == fail) - return; - - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.ZFailFunc[face] = zfail; - ctx->Stencil.ZPassFunc[face] = zpass; - ctx->Stencil.FailFunc[face] = fail; - - if (ctx->Driver.StencilOp) { - (*ctx->Driver.StencilOp)(ctx, fail, zfail, zpass); - } -} - - -/* GL_EXT_stencil_two_side */ -void -_mesa_ActiveStencilFaceEXT(GLenum face) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (face == GL_FRONT || face == GL_BACK) { - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 1; - } - - if (ctx->Driver.ActiveStencilFace) { - (*ctx->Driver.ActiveStencilFace)( ctx, (GLuint) ctx->Stencil.ActiveFace ); - } -} - Index: xc/extras/Mesa/src/stencil.h diff -u xc/extras/Mesa/src/stencil.h:1.6 xc/extras/Mesa/src/stencil.h:removed --- xc/extras/Mesa/src/stencil.h:1.6 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/stencil.h Wed Mar 16 21:00:33 2005 @@ -1,54 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef STENCIL_H -#define STENCIL_H - - -#include "mtypes.h" - - -extern void -_mesa_ClearStencil( GLint s ); - - -extern void -_mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ); - - -extern void -_mesa_StencilMask( GLuint mask ); - - -extern void -_mesa_StencilOp( GLenum fail, GLenum zfail, GLenum zpass ); - - -extern void -_mesa_ActiveStencilFaceEXT(GLenum face); - - -#endif Index: xc/extras/Mesa/src/texcompress.c diff -u xc/extras/Mesa/src/texcompress.c:1.2 xc/extras/Mesa/src/texcompress.c:removed --- xc/extras/Mesa/src/texcompress.c:1.2 Wed Oct 22 11:27:40 2003 +++ xc/extras/Mesa/src/texcompress.c Wed Mar 16 21:00:33 2005 @@ -1,161 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/texcompress.c,v 1.2 2003/10/22 15:27:40 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "image.h" -#include "texcompress.h" -#include "texformat.h" - - -/** - * Get the list of supported internal compression formats. - * \param formats - the results list (may be NULL) - * \return number of formats. - */ -GLuint -_mesa_get_compressed_formats( GLcontext *ctx, GLint *formats ) -{ - GLuint n = 0; - if (ctx->Extensions.ARB_texture_compression) { - if (ctx->Extensions.TDFX_texture_compression_FXT1) { - if (formats) { - formats[n++] = GL_COMPRESSED_RGB_FXT1_3DFX; - formats[n++] = GL_COMPRESSED_RGBA_FXT1_3DFX; - } - else { - n += 2; - } - } - } - return n; -} - - - -/** - * Return bytes of storage needed for the given texture size and compressed - * format. - * \param width, height, depth - texture size in texels - * \param texFormat - one of the compressed format enums - * \return size in bytes, or zero if bad texFormat - */ -GLuint -_mesa_compressed_texture_size( GLcontext *ctx, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format ) -{ - GLuint size; - - switch (format) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - case GL_COMPRESSED_RGBA_FXT1_3DFX: - /* round up to multiple of 4 */ - size = ((width + 7) / 8) * ((height + 3) / 4) * 16; - return size; - default: - _mesa_problem(ctx, "bad texformat in compressed_texture_size"); - return 0; - } -} - - -/* - * Compute the bytes per row in a compressed texture image. - */ -GLint -_mesa_compressed_row_stride(GLenum format, GLsizei width) -{ -#if 0 - GLint bytesPerTile, stride; - - stride = ((width + 3) / 4) * bytesPerTile; - return stride; -#else - (void) format; - (void) width; - - return 0; -#endif -} - - -/* - * Return the address of the pixel at (col, row, img) in a - * compressed texture image. - * \param col, row, img - image position (3D) - * \param format - compressed image format - * \param width - image width - * \param image - the image address - * \return address of pixel at (row, col) - */ -GLubyte * -_mesa_compressed_image_address(GLint col, GLint row, GLint img, - GLenum format, - GLsizei width, const GLubyte *image) -{ -#if 0 - GLint bytesPerTile, stride; - GLubyte *addr; - - ASSERT((row & 3) == 0); - ASSERT((col & 3) == 0); - (void) img; - - stride = ((width + 3) / 4) * bytesPerTile; - - addr = (GLubyte *) image + (row / 4) * stride + (col / 4) * bytesPerTile; - return addr; -#else - (void) col; - (void) row; - (void) img; - (void) format; - (void) image; - - return (GLubyte *)0; -#endif -} - - - -/* - * \param srcRowStride - source stride, in pixels - */ -void -_mesa_compress_teximage( GLcontext *ctx, GLsizei width, GLsizei height, - GLenum srcFormat, const GLchan *source, - GLint srcRowStride, - const struct gl_texture_format *dstFormat, - GLubyte *dest, GLint dstRowStride ) -{ - switch (dstFormat->MesaFormat) { - default: - _mesa_problem(ctx, "Bad dstFormat in _mesa_compress_teximage()"); - return; - } -} Index: xc/extras/Mesa/src/texcompress.h diff -u xc/extras/Mesa/src/texcompress.h:1.1.1.1 xc/extras/Mesa/src/texcompress.h:removed --- xc/extras/Mesa/src/texcompress.h:1.1.1.1 Sun Sep 28 13:26:10 2003 +++ xc/extras/Mesa/src/texcompress.h Wed Mar 16 21:00:33 2005 @@ -1,57 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef TEXCOMPRESS_H -#define TEXCOMPRESS_H - -#include "mtypes.h" - - -extern GLuint -_mesa_get_compressed_formats( GLcontext *ctx, GLint *formats ); - -extern GLuint -_mesa_compressed_texture_size( GLcontext *ctx, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format ); - -extern GLint -_mesa_compressed_row_stride(GLenum format, GLsizei width); - - -extern GLubyte * -_mesa_compressed_image_address(GLint col, GLint row, GLint img, - GLenum format, - GLsizei width, const GLubyte *image); - - -extern void -_mesa_compress_teximage( GLcontext *ctx, GLsizei width, GLsizei height, - GLenum srcFormat, const GLchan *source, - GLint srcRowStride, - const struct gl_texture_format *dstFormat, - GLubyte *dest, GLint dstRowStride ); - -#endif /* TEXCOMPRESS_H */ Index: xc/extras/Mesa/src/texformat.c diff -u xc/extras/Mesa/src/texformat.c:1.6 xc/extras/Mesa/src/texformat.c:removed --- xc/extras/Mesa/src/texformat.c:1.6 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texformat.c Wed Mar 16 21:00:33 2005 @@ -1,789 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Author: - * Gareth Hughes - */ - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "image.h" -#include "imports.h" -#include "mmath.h" -#include "mtypes.h" -#include "texformat.h" -#include "teximage.h" -#include "texstate.h" - - -/* Texel fetch routines for all supported formats: - */ -#define DIM 1 -#include "texformat_tmp.h" - -#define DIM 2 -#include "texformat_tmp.h" - -#define DIM 3 -#include "texformat_tmp.h" - -/* Have to have this so the FetchTexel function pointer is never NULL. - */ -static void fetch_null_texel( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = 0; - rgba[GCOMP] = 0; - rgba[BCOMP] = 0; - rgba[ACOMP] = 0; -} - - -/* ============================================================= - * Default GLchan-based formats: - */ - -const struct gl_texture_format _mesa_texformat_rgba = { - MESA_FORMAT_RGBA, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - CHAN_BITS, /* RedBits */ - CHAN_BITS, /* GreenBits */ - CHAN_BITS, /* BlueBits */ - CHAN_BITS, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 4 * CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_rgba, /* FetchTexel1D */ - fetch_2d_texel_rgba, /* FetchTexel2D */ - fetch_3d_texel_rgba, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_rgb = { - MESA_FORMAT_RGB, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - CHAN_BITS, /* RedBits */ - CHAN_BITS, /* GreenBits */ - CHAN_BITS, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 3 * CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_rgb, /* FetchTexel1D */ - fetch_2d_texel_rgb, /* FetchTexel2D */ - fetch_3d_texel_rgb, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_alpha = { - MESA_FORMAT_ALPHA, /* MesaFormat */ - GL_ALPHA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - CHAN_BITS, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_alpha, /* FetchTexel1D */ - fetch_2d_texel_alpha, /* FetchTexel2D */ - fetch_3d_texel_alpha, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_luminance = { - MESA_FORMAT_LUMINANCE, /* MesaFormat */ - GL_LUMINANCE, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - CHAN_BITS, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_luminance, /* FetchTexel1D */ - fetch_2d_texel_luminance, /* FetchTexel2D */ - fetch_3d_texel_luminance, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_luminance_alpha = { - MESA_FORMAT_LUMINANCE_ALPHA, /* MesaFormat */ - GL_LUMINANCE_ALPHA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - CHAN_BITS, /* AlphaBits */ - CHAN_BITS, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2 * CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_luminance_alpha, /* FetchTexel1D */ - fetch_2d_texel_luminance_alpha, /* FetchTexel2D */ - fetch_3d_texel_luminance_alpha, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_intensity = { - MESA_FORMAT_INTENSITY, /* MesaFormat */ - GL_INTENSITY, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - CHAN_BITS, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_intensity, /* FetchTexel1D */ - fetch_2d_texel_intensity, /* FetchTexel2D */ - fetch_3d_texel_intensity, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_color_index = { - MESA_FORMAT_COLOR_INDEX, /* MesaFormat */ - GL_COLOR_INDEX, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - CHAN_BITS, /* IndexBits */ - 0, /* DepthBits */ - CHAN_BITS / 8, /* TexelBytes */ - fetch_1d_texel_color_index, /* FetchTexel1D */ - fetch_2d_texel_color_index, /* FetchTexel2D */ - fetch_3d_texel_color_index, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_depth_component = { - MESA_FORMAT_DEPTH_COMPONENT, /* MesaFormat */ - GL_DEPTH_COMPONENT, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - sizeof(GLfloat) * 8, /* DepthBits */ - sizeof(GLfloat), /* TexelBytes */ - fetch_1d_texel_depth_component, /* FetchTexel1D */ - fetch_2d_texel_depth_component, /* FetchTexel2D */ - fetch_3d_texel_depth_component, /* FetchTexel3D */ -}; - - -/* ============================================================= - * Hardware formats: - */ - -const struct gl_texture_format _mesa_texformat_rgba8888 = { - MESA_FORMAT_RGBA8888, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 8, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 4, /* TexelBytes */ - fetch_1d_texel_rgba8888, /* FetchTexel1D */ - fetch_2d_texel_rgba8888, /* FetchTexel2D */ - fetch_3d_texel_rgba8888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_argb8888 = { - MESA_FORMAT_ARGB8888, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 8, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 4, /* TexelBytes */ - fetch_1d_texel_argb8888, /* FetchTexel1D */ - fetch_2d_texel_argb8888, /* FetchTexel2D */ - fetch_3d_texel_argb8888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_rgb888 = { - MESA_FORMAT_RGB888, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 3, /* TexelBytes */ - fetch_1d_texel_rgb888, /* FetchTexel1D */ - fetch_2d_texel_rgb888, /* FetchTexel2D */ - fetch_3d_texel_rgb888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_rgb565 = { - MESA_FORMAT_RGB565, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - 5, /* RedBits */ - 6, /* GreenBits */ - 5, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_rgb565, /* FetchTexel1D */ - fetch_2d_texel_rgb565, /* FetchTexel2D */ - fetch_3d_texel_rgb565, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_argb4444 = { - MESA_FORMAT_ARGB4444, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - 4, /* RedBits */ - 4, /* GreenBits */ - 4, /* BlueBits */ - 4, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_argb4444, /* FetchTexel1D */ - fetch_2d_texel_argb4444, /* FetchTexel2D */ - fetch_3d_texel_argb4444, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_argb1555 = { - MESA_FORMAT_ARGB1555, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - 5, /* RedBits */ - 5, /* GreenBits */ - 5, /* BlueBits */ - 1, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_argb1555, /* FetchTexel1D */ - fetch_2d_texel_argb1555, /* FetchTexel2D */ - fetch_3d_texel_argb1555, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_al88 = { - MESA_FORMAT_AL88, /* MesaFormat */ - GL_LUMINANCE_ALPHA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 8, /* AlphaBits */ - 8, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_al88, /* FetchTexel1D */ - fetch_2d_texel_al88, /* FetchTexel2D */ - fetch_3d_texel_al88, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_rgb332 = { - MESA_FORMAT_RGB332, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - 3, /* RedBits */ - 3, /* GreenBits */ - 2, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_rgb332, /* FetchTexel1D */ - fetch_2d_texel_rgb332, /* FetchTexel2D */ - fetch_3d_texel_rgb332, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_a8 = { - MESA_FORMAT_A8, /* MesaFormat */ - GL_ALPHA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 8, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_a8, /* FetchTexel1D */ - fetch_2d_texel_a8, /* FetchTexel2D */ - fetch_3d_texel_a8, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_l8 = { - MESA_FORMAT_L8, /* MesaFormat */ - GL_LUMINANCE, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 8, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_l8, /* FetchTexel1D */ - fetch_2d_texel_l8, /* FetchTexel2D */ - fetch_3d_texel_l8, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_i8 = { - MESA_FORMAT_I8, /* MesaFormat */ - GL_INTENSITY, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 8, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_i8, /* FetchTexel1D */ - fetch_2d_texel_i8, /* FetchTexel2D */ - fetch_3d_texel_i8, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_ci8 = { - MESA_FORMAT_CI8, /* MesaFormat */ - GL_COLOR_INDEX, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 8, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_ci8, /* FetchTexel1D */ - fetch_2d_texel_ci8, /* FetchTexel2D */ - fetch_3d_texel_ci8, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_ycbcr = { - MESA_FORMAT_YCBCR, /* MesaFormat */ - GL_YCBCR_MESA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_ycbcr, /* FetchTexel1D */ - fetch_2d_texel_ycbcr, /* FetchTexel2D */ - fetch_3d_texel_ycbcr, /* FetchTexel3D */ -}; - - -const struct gl_texture_format _mesa_texformat_ycbcr_rev = { - MESA_FORMAT_YCBCR_REV, /* MesaFormat */ - GL_YCBCR_MESA, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_ycbcr_rev, /* FetchTexel1D */ - fetch_2d_texel_ycbcr_rev, /* FetchTexel2D */ - fetch_3d_texel_ycbcr_rev, /* FetchTexel3D */ -}; - - -/* Big-endian */ -#if 0 -const struct gl_texture_format _mesa_texformat_abgr8888 = { - MESA_FORMAT_ABGR8888, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - GL_UNSIGNED_INT_8_8_8_8, /* Type */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 8, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 4, /* TexelBytes */ - fetch_1d_texel_abgr8888, /* FetchTexel1D */ - fetch_2d_texel_abgr8888, /* FetchTexel2D */ - fetch_3d_texel_abgr8888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgra8888 = { - MESA_FORMAT_BGRA8888, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - GL_UNSIGNED_INT_8_8_8_8, /* Type */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 8, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 4, /* TexelBytes */ - fetch_1d_texel_bgra8888, /* FetchTexel1D */ - fetch_2d_texel_bgra8888, /* FetchTexel2D */ - fetch_3d_texel_bgra8888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgr888 = { - MESA_FORMAT_BGR888, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - GL_UNSIGNED_BYTE, /* Type */ - 8, /* RedBits */ - 8, /* GreenBits */ - 8, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 3, /* TexelBytes */ - fetch_1d_texel_bgr888, /* FetchTexel1D */ - fetch_2d_texel_bgr888, /* FetchTexel2D */ - fetch_3d_texel_bgr888, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgr565 = { - MESA_FORMAT_BGR565, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - GL_UNSIGNED_SHORT_5_6_5, /* Type */ - 5, /* RedBits */ - 6, /* GreenBits */ - 5, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_bgr565, /* FetchTexel1D */ - fetch_2d_texel_bgr565, /* FetchTexel2D */ - fetch_3d_texel_bgr565, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgra4444 = { - MESA_FORMAT_BGRA4444, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - GL_UNSIGNED_SHORT_4_4_4_4_REV, /* Type */ - 4, /* RedBits */ - 4, /* GreenBits */ - 4, /* BlueBits */ - 4, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_bgra4444, /* FetchTexel1D */ - fetch_2d_texel_bgra4444, /* FetchTexel2D */ - fetch_3d_texel_bgra4444, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgra5551 = { - MESA_FORMAT_BGRA5551, /* MesaFormat */ - GL_RGBA, /* BaseFormat */ - GL_UNSIGNED_SHORT_1_5_5_5_REV, /* Type */ - 5, /* RedBits */ - 5, /* GreenBits */ - 5, /* BlueBits */ - 1, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_bgra1555, /* FetchTexel1D */ - fetch_2d_texel_bgra1555, /* FetchTexel2D */ - fetch_3d_texel_bgra1555, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_la88 = { - MESA_FORMAT_LA88, /* MesaFormat */ - GL_LUMINANCE_ALPHA, /* BaseFormat */ - GL_UNSIGNED_BYTE, /* Type */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 8, /* AlphaBits */ - 8, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 2, /* TexelBytes */ - fetch_1d_texel_la88, /* FetchTexel1D */ - fetch_2d_texel_la88, /* FetchTexel2D */ - fetch_3d_texel_la88, /* FetchTexel3D */ -}; - -const struct gl_texture_format _mesa_texformat_bgr233 = { - MESA_FORMAT_BGR233, /* MesaFormat */ - GL_RGB, /* BaseFormat */ - GL_UNSIGNED_BYTE_3_3_2, /* Type */ - 3, /* RedBits */ - 3, /* GreenBits */ - 2, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 1, /* TexelBytes */ - fetch_1d_texel_bgr233, /* FetchTexel1D */ - fetch_2d_texel_bgr233, /* FetchTexel2D */ - fetch_3d_texel_bgr233, /* FetchTexel3D */ -}; -#endif - -/* ============================================================= - * Null format (useful for proxy textures): - */ - -const struct gl_texture_format _mesa_null_texformat = { - -1, /* MesaFormat */ - 0, /* BaseFormat */ - 0, /* RedBits */ - 0, /* GreenBits */ - 0, /* BlueBits */ - 0, /* AlphaBits */ - 0, /* LuminanceBits */ - 0, /* IntensityBits */ - 0, /* IndexBits */ - 0, /* DepthBits */ - 0, /* TexelBytes */ - fetch_null_texel, /* FetchTexel1D */ - fetch_null_texel, /* FetchTexel2D */ - fetch_null_texel, /* FetchTexel3D */ -}; - - -GLboolean -_mesa_is_hardware_tex_format( const struct gl_texture_format *format ) -{ - return (format->MesaFormat < MESA_FORMAT_RGBA); -} - - -/* Given an internal texture format (or 1, 2, 3, 4) return a pointer - * to a gl_texture_format which which to store the texture. - * This is called via ctx->Driver.ChooseTextureFormat(). - * Hardware drivers typically override this function with a specialized - * version. - */ -const struct gl_texture_format * -_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, - GLenum format, GLenum type ) -{ - (void) format; - (void) type; - - switch ( internalFormat ) { - /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has - * got to be better than sticking them way down the end of this - * huge list. - */ - case 4: /* Quake3 uses this... */ - case GL_RGBA: - return &_mesa_texformat_rgba; - - case 3: /* ... and this. */ - case GL_RGB: - return &_mesa_texformat_rgb; - - /* GH: Okay, keep checking as normal. Still test for GL_RGB, - * GL_RGBA formats first. - */ - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return &_mesa_texformat_rgba; - - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return &_mesa_texformat_rgb; - - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return &_mesa_texformat_alpha; - - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return &_mesa_texformat_luminance; - - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return &_mesa_texformat_luminance_alpha; - - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return &_mesa_texformat_intensity; - - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - return &_mesa_texformat_color_index; - - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16_SGIX: - case GL_DEPTH_COMPONENT24_SGIX: - case GL_DEPTH_COMPONENT32_SGIX: - if (!ctx->Extensions.SGIX_depth_texture) - _mesa_problem(ctx, "depth format without GL_SGIX_depth_texture"); - return &_mesa_texformat_depth_component; - - case GL_COMPRESSED_ALPHA_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_alpha; - case GL_COMPRESSED_LUMINANCE_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_luminance; - case GL_COMPRESSED_LUMINANCE_ALPHA_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_luminance_alpha; - case GL_COMPRESSED_INTENSITY_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_intensity; - case GL_COMPRESSED_RGB_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_rgb; - case GL_COMPRESSED_RGBA_ARB: - if (!ctx->Extensions.ARB_texture_compression) - _mesa_problem(ctx, "texture compression extension not enabled"); - return &_mesa_texformat_rgba; - - /* GL_MESA_ycrcr_texture */ - case GL_YCBCR_MESA: - if (type == GL_UNSIGNED_SHORT_8_8_MESA) - return &_mesa_texformat_ycbcr; - else - return &_mesa_texformat_ycbcr_rev; - - default: - _mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()"); - return NULL; - } -} - - - - -/* - * Return the base texture format for the given compressed format - * Called via ctx->Driver.BaseCompressedTexFormat(). - * This function is used by software rasterizers. Hardware drivers - * which support texture compression should not use this function but - * a specialized function instead. - */ -GLint -_mesa_base_compressed_texformat(GLcontext *ctx, GLint intFormat) -{ - switch (intFormat) { - case GL_COMPRESSED_ALPHA_ARB: - return GL_ALPHA; - case GL_COMPRESSED_LUMINANCE_ARB: - return GL_LUMINANCE; - case GL_COMPRESSED_LUMINANCE_ALPHA_ARB: - return GL_LUMINANCE_ALPHA; - case GL_COMPRESSED_INTENSITY_ARB: - return GL_INTENSITY; - case GL_COMPRESSED_RGB_ARB: - return GL_RGB; - case GL_COMPRESSED_RGBA_ARB: - return GL_RGBA; - default: - return -1; /* not a recognized compressed format */ - } -} Index: xc/extras/Mesa/src/texformat.h diff -u xc/extras/Mesa/src/texformat.h:1.7 xc/extras/Mesa/src/texformat.h:removed --- xc/extras/Mesa/src/texformat.h:1.7 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texformat.h Wed Mar 16 21:00:33 2005 @@ -1,148 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Author: - * Gareth Hughes - */ - -#ifndef TEXFORMAT_H -#define TEXFORMAT_H - -#include "mtypes.h" - - -/* - * The Mesa internal texture image types. - * All texture images must be stored in one of these formats. - */ -enum _format { - /* Hardware-friendly formats. Drivers can override the default - * formats and convert texture images to one of these as required. - * The driver's ChooseTextureFormat() function will choose one of - * these formats. - * These formats are all little endian, as shown below. They will be - * most useful for x86-based PC graphics card drivers. - * - * NOTE: In the default case, some of these formats will be - * duplicates of the generic formats listed below. However, these - * formats guarantee their internal component sizes, while GLchan may - * vary betwen GLubyte, GLushort and GLfloat. - */ - /* msb <------ TEXEL BITS -----------> lsb */ - /* ---- ---- ---- ---- ---- ---- ---- ---- */ - MESA_FORMAT_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */ - MESA_FORMAT_ARGB8888, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */ - MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */ - MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */ - MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */ - MESA_FORMAT_ARGB1555, /* ARRR RRGG GGGB BBBB */ - MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */ - MESA_FORMAT_RGB332, /* RRRG GGBB */ - MESA_FORMAT_A8, /* AAAA AAAA */ - MESA_FORMAT_L8, /* LLLL LLLL */ - MESA_FORMAT_I8, /* IIII IIII */ - MESA_FORMAT_CI8, /* CCCC CCCC */ - MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */ - MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */ - -#if 0 - /* upcoming little-endian formats: */ - - /* msb <------ TEXEL BITS -----------> lsb */ - /* ---- ---- ---- ---- ---- ---- ---- ---- */ - MESA_FORMAT_ABGR8888, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */ - MESA_FORMAT_BGRA8888, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */ - MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */ - MESA_FORMAT_BGR565, /* BBBB BGGG GGGR RRRR */ - MESA_FORMAT_BGRA4444, /* BBBB GGGG RRRR AAAA */ - MESA_FORMAT_BGRA5551, /* BBBB BGGG GGRR RRRA */ - MESA_FORMAT_LA88, /* LLLL LLLL AAAA AAAA */ - MESA_FORMAT_BGR233, /* BBGG GRRR */ -#endif - - /* Generic GLchan-based formats. These are the default formats used - * by the software rasterizer and, unless the driver overrides the - * texture image functions, incoming images will be converted to one - * of these formats. Components are arrays of GLchan values, so - * there will be no big/little endian issues. - * - * NOTE: Because these are based on the GLchan datatype, one cannot - * assume 8 bits per channel with these formats. If you require - * GLubyte channels, use one of the hardware formats above. - */ - MESA_FORMAT_RGBA, - MESA_FORMAT_RGB, - MESA_FORMAT_ALPHA, - MESA_FORMAT_LUMINANCE, - MESA_FORMAT_LUMINANCE_ALPHA, - MESA_FORMAT_INTENSITY, - MESA_FORMAT_COLOR_INDEX, - MESA_FORMAT_DEPTH_COMPONENT -}; - - -extern GLboolean -_mesa_is_hardware_tex_format( const struct gl_texture_format *format ); - -extern const struct gl_texture_format * -_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, - GLenum format, GLenum type ); - -extern GLint -_mesa_base_compressed_texformat(GLcontext *ctx, GLint intFormat); - - -/* The default formats, GLchan per component: - */ -extern const struct gl_texture_format _mesa_texformat_rgba; -extern const struct gl_texture_format _mesa_texformat_rgb; -extern const struct gl_texture_format _mesa_texformat_alpha; -extern const struct gl_texture_format _mesa_texformat_luminance; -extern const struct gl_texture_format _mesa_texformat_luminance_alpha; -extern const struct gl_texture_format _mesa_texformat_intensity; -extern const struct gl_texture_format _mesa_texformat_color_index; -extern const struct gl_texture_format _mesa_texformat_depth_component; - -/* The hardware-friendly formats: - */ -extern const struct gl_texture_format _mesa_texformat_rgba8888; -extern const struct gl_texture_format _mesa_texformat_argb8888; -extern const struct gl_texture_format _mesa_texformat_rgb888; -extern const struct gl_texture_format _mesa_texformat_rgb565; -extern const struct gl_texture_format _mesa_texformat_argb4444; -extern const struct gl_texture_format _mesa_texformat_argb1555; -extern const struct gl_texture_format _mesa_texformat_al88; -extern const struct gl_texture_format _mesa_texformat_rgb332; -extern const struct gl_texture_format _mesa_texformat_a8; -extern const struct gl_texture_format _mesa_texformat_l8; -extern const struct gl_texture_format _mesa_texformat_i8; -extern const struct gl_texture_format _mesa_texformat_ci8; -extern const struct gl_texture_format _mesa_texformat_ycbcr; -extern const struct gl_texture_format _mesa_texformat_ycbcr_rev; - -/* The null format: - */ -extern const struct gl_texture_format _mesa_null_texformat; - -#endif Index: xc/extras/Mesa/src/texformat_tmp.h diff -u xc/extras/Mesa/src/texformat_tmp.h:1.3 xc/extras/Mesa/src/texformat_tmp.h:removed --- xc/extras/Mesa/src/texformat_tmp.h:1.3 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texformat_tmp.h Wed Mar 16 21:00:33 2005 @@ -1,460 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - * Brian Paul - */ - - -/* - * This template file generates texel fetch functions for 1-D, 2-D and 3-D - * texture images. - */ - - -#if DIM == 1 - -#define CHAN_SRC( t, i, j, k, sz ) \ - ((GLchan *)(t)->Data + (i) * (sz)) -#define UBYTE_SRC( t, i, j, k, sz ) \ - ((GLubyte *)(t)->Data + (i) * (sz)) -#define USHORT_SRC( t, i, j, k ) \ - ((GLushort *)(t)->Data + (i)) -#define FLOAT_SRC( t, i, j, k ) \ - ((GLfloat *)(t)->Data + (i)) - -#define FETCH(x) fetch_1d_texel_##x - -#elif DIM == 2 - -#define CHAN_SRC( t, i, j, k, sz ) \ - ((GLchan *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)) -#define UBYTE_SRC( t, i, j, k, sz ) \ - ((GLubyte *)(t)->Data + ((t)->RowStride * (j) + (i)) * (sz)) -#define USHORT_SRC( t, i, j, k ) \ - ((GLushort *)(t)->Data + ((t)->RowStride * (j) + (i))) -#define FLOAT_SRC( t, i, j, k ) \ - ((GLfloat *)(t)->Data + ((t)->RowStride * (j) + (i))) - -#define FETCH(x) fetch_2d_texel_##x - -#elif DIM == 3 - -#define CHAN_SRC( t, i, j, k, sz ) \ - (GLchan *)(t)->Data + (((t)->Height * (k) + (j)) * \ - (t)->RowStride + (i)) * (sz) -#define UBYTE_SRC( t, i, j, k, sz ) \ - ((GLubyte *)(t)->Data + (((t)->Height * (k) + (j)) * \ - (t)->RowStride + (i)) * (sz)) -#define USHORT_SRC( t, i, j, k ) \ - ((GLushort *)(t)->Data + (((t)->Height * (k) + (j)) * \ - (t)->RowStride + (i))) -#define FLOAT_SRC( t, i, j, k ) \ - ((GLfloat *)(t)->Data + (((t)->Height * (k) + (j)) * \ - (t)->RowStride + (i))) - -#define FETCH(x) fetch_3d_texel_##x - -#else -#error illegal number of texture dimensions -#endif - - -static void FETCH(rgba)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 4 ); - GLchan *rgba = (GLchan *) texel; - COPY_CHAN4( rgba, src ); -} - -static void FETCH(rgb)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 3 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = src[0]; - rgba[GCOMP] = src[1]; - rgba[BCOMP] = src[2]; - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(alpha)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = 0; - rgba[GCOMP] = 0; - rgba[BCOMP] = 0; - rgba[ACOMP] = src[0]; -} - -static void FETCH(luminance)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = src[0]; - rgba[GCOMP] = src[0]; - rgba[BCOMP] = src[0]; - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(luminance_alpha)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 2 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = src[0]; - rgba[GCOMP] = src[0]; - rgba[BCOMP] = src[0]; - rgba[ACOMP] = src[1]; -} - -static void FETCH(intensity)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = src[0]; - rgba[GCOMP] = src[0]; - rgba[BCOMP] = src[0]; - rgba[ACOMP] = src[0]; -} - -static void FETCH(color_index)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLchan *src = CHAN_SRC( texImage, i, j, k, 1 ); - GLchan *index = (GLchan *) texel; - *index = *src; -} - -static void FETCH(depth_component)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLfloat *src = FLOAT_SRC( texImage, i, j, k ); - GLfloat *depth = (GLfloat *) texel; - *depth = *src; -} - -static void FETCH(rgba8888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 4 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[3] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[0] ); -} - -static void FETCH(argb8888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 4 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[3] ); -} - -static void FETCH(rgb888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 3 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(rgb565)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 8) & 0xf8) * 255 / 0xf8 ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 3) & 0xfc) * 255 / 0xfc ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s << 3) & 0xf8) * 255 / 0xf8 ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(argb4444)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 8) & 0xf) * 255 / 0xf ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 4) & 0xf) * 255 / 0xf ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s ) & 0xf) * 255 / 0xf ); - rgba[ACOMP] = UBYTE_TO_CHAN( ((s >> 12) & 0xf) * 255 / 0xf ); -} - -static void FETCH(argb1555)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 10) & 0x1f) * 255 / 0x1f ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 5) & 0x1f) * 255 / 0x1f ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s ) & 0x1f) * 255 / 0x1f ); - rgba[ACOMP] = UBYTE_TO_CHAN( ((s >> 15) & 0x01) * 255 ); -} - -static void FETCH(al88)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 2 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[1] ); -} - -static void FETCH(rgb332)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - const GLubyte s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s ) & 0xe0) * 255 / 0xe0 ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s << 3) & 0xe0) * 255 / 0xe0 ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s << 5) & 0xc0) * 255 / 0xc0 ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(a8)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = 0; - rgba[GCOMP] = 0; - rgba[BCOMP] = 0; - rgba[ACOMP] = UBYTE_TO_CHAN( src[0] ); -} - -static void FETCH(l8)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(i8)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[0] ); -} - -static void FETCH(ci8)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - GLchan *index = (GLchan *) texel; - *index = UBYTE_TO_CHAN( *src ); -} - -/* XXX this may break if GLchan != GLubyte */ -static void FETCH(ycbcr)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src0 = USHORT_SRC( texImage, (i & ~1), j, k ); /* even */ - const GLushort *src1 = src0 + 1; /* odd */ - const GLubyte y0 = (*src0 >> 8) & 0xff; /* luminance */ - const GLubyte cb = *src0 & 0xff; /* chroma U */ - const GLubyte y1 = (*src1 >> 8) & 0xff; /* luminance */ - const GLubyte cr = *src1 & 0xff; /* chroma V */ - GLchan *rgba = (GLchan *) texel; - GLint r, g, b; - if (i & 1) { - /* odd pixel: use y1,cr,cb */ - r = (GLint) (1.164 * (y1-16) + 1.596 * (cr-128)); - g = (GLint) (1.164 * (y1-16) - 0.813 * (cr-128) - 0.391 * (cb-128)); - b = (GLint) (1.164 * (y1-16) + 2.018 * (cb-128)); - } - else { - /* even pixel: use y0,cr,cb */ - r = (GLint) (1.164 * (y0-16) + 1.596 * (cr-128)); - g = (GLint) (1.164 * (y0-16) - 0.813 * (cr-128) - 0.391 * (cb-128)); - b = (GLint) (1.164 * (y0-16) + 2.018 * (cb-128)); - } - rgba[RCOMP] = CLAMP(r, 0, CHAN_MAX); - rgba[GCOMP] = CLAMP(g, 0, CHAN_MAX); - rgba[BCOMP] = CLAMP(b, 0, CHAN_MAX); - rgba[ACOMP] = CHAN_MAX; -} - -/* XXX this may break if GLchan != GLubyte */ -static void FETCH(ycbcr_rev)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src0 = USHORT_SRC( texImage, (i & ~1), j, k ); /* even */ - const GLushort *src1 = src0 + 1; /* odd */ - const GLubyte y0 = *src0 & 0xff; /* luminance */ - const GLubyte cr = (*src0 >> 8) & 0xff; /* chroma U */ - const GLubyte y1 = *src1 & 0xff; /* luminance */ - const GLubyte cb = (*src1 >> 8) & 0xff; /* chroma V */ - GLchan *rgba = (GLchan *) texel; - GLint r, g, b; - if (i & 1) { - /* odd pixel: use y1,cr,cb */ - r = (GLint) (1.164 * (y1-16) + 1.596 * (cr-128)); - g = (GLint) (1.164 * (y1-16) - 0.813 * (cr-128) - 0.391 * (cb-128)); - b = (GLint) (1.164 * (y1-16) + 2.018 * (cb-128)); - } - else { - /* even pixel: use y0,cr,cb */ - r = (GLint) (1.164 * (y0-16) + 1.596 * (cr-128)); - g = (GLint) (1.164 * (y0-16) - 0.813 * (cr-128) - 0.391 * (cb-128)); - b = (GLint) (1.164 * (y0-16) + 2.018 * (cb-128)); - } - rgba[RCOMP] = CLAMP(r, 0, CHAN_MAX); - rgba[GCOMP] = CLAMP(g, 0, CHAN_MAX); - rgba[BCOMP] = CLAMP(b, 0, CHAN_MAX); - rgba[ACOMP] = CHAN_MAX; -} - - -/* big-endian */ - -#if 0 -static void FETCH(abgr8888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 4 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[3] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[0] ); -} - -static void FETCH(bgra8888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 4 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[3] ); -} - -static void FETCH(bgr888)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 3 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[2] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[1] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(bgr565)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 8) & 0xf8) * 255 / 0xf8 ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 3) & 0xfc) * 255 / 0xfc ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s << 3) & 0xf8) * 255 / 0xf8 ); - rgba[ACOMP] = CHAN_MAX; -} - -static void FETCH(bgra4444)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 8) & 0xf) * 255 / 0xf ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 4) & 0xf) * 255 / 0xf ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s ) & 0xf) * 255 / 0xf ); - rgba[ACOMP] = UBYTE_TO_CHAN( ((s >> 12) & 0xf) * 255 / 0xf ); -} - -static void FETCH(bgra5551)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLushort *src = USHORT_SRC( texImage, i, j, k ); - const GLushort s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s >> 10) & 0x1f) * 255 / 0x1f ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s >> 5) & 0x1f) * 255 / 0x1f ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s ) & 0x1f) * 255 / 0x1f ); - rgba[ACOMP] = UBYTE_TO_CHAN( ((s >> 15) & 0x01) * 255 ); -} - -static void FETCH(la88)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 2 ); - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[GCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[BCOMP] = UBYTE_TO_CHAN( src[0] ); - rgba[ACOMP] = UBYTE_TO_CHAN( src[1] ); -} - -static void FETCH(bgr233)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLvoid *texel ) -{ - const GLubyte *src = UBYTE_SRC( texImage, i, j, k, 1 ); - const GLubyte s = *src; - GLchan *rgba = (GLchan *) texel; - rgba[RCOMP] = UBYTE_TO_CHAN( ((s ) & 0xe0) * 255 / 0xe0 ); - rgba[GCOMP] = UBYTE_TO_CHAN( ((s << 3) & 0xe0) * 255 / 0xe0 ); - rgba[BCOMP] = UBYTE_TO_CHAN( ((s << 5) & 0xc0) * 255 / 0xc0 ); - rgba[ACOMP] = CHAN_MAX; -} -#endif - - -#undef CHAN_SRC -#undef UBYTE_SRC -#undef USHORT_SRC -#undef FLOAT_SRC -#undef FETCH -#undef DIM Index: xc/extras/Mesa/src/teximage.c diff -u xc/extras/Mesa/src/teximage.c:1.24 xc/extras/Mesa/src/teximage.c:removed --- xc/extras/Mesa/src/teximage.c:1.24 Wed Oct 22 11:27:40 2003 +++ xc/extras/Mesa/src/teximage.c Wed Mar 16 21:00:33 2005 @@ -1,2931 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/teximage.c,v 1.24 2003/10/22 15:27:40 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "context.h" -#include "convolve.h" -#include "image.h" -#include "imports.h" -#include "macros.h" -#include "mmath.h" -#include "state.h" -#include "texcompress.h" -#include "texformat.h" -#include "teximage.h" -#include "texstate.h" -#include "texstore.h" -#include "mtypes.h" - - -/* - * NOTES: - * - * Mesa's native texture datatype is GLchan. Native formats are - * GL_ALPHA, GL_LUMINANCE, GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, GL_RGBA, - * and GL_COLOR_INDEX. - * Device drivers are free to implement any internal format they want. - */ - - -#if 0 -static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img) -{ -#if CHAN_TYPE == GL_FLOAT - _mesa_problem(NULL, "PrintTexture doesn't support float channels"); -#else - GLuint i, j, c; - const GLchan *data = (const GLchan *) img->Data; - - if (!data) { - _mesa_printf("No texture data\n"); - return; - } - - switch (img->Format) { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_INTENSITY: - case GL_COLOR_INDEX: - c = 1; - break; - case GL_LUMINANCE_ALPHA: - c = 2; - break; - case GL_RGB: - c = 3; - break; - case GL_RGBA: - c = 4; - break; - default: - _mesa_problem(NULL, "error in PrintTexture\n"); - return; - } - - for (i = 0; i < img->Height; i++) { - for (j = 0; j < img->Width; j++) { - if (c==1) - _mesa_printf("%02x ", data[0]); - else if (c==2) - _mesa_printf("%02x%02x ", data[0], data[1]); - else if (c==3) - _mesa_printf("%02x%02x%02x ", data[0], data[1], data[2]); - else if (c==4) - _mesa_printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]); - data += (img->RowStride - img->Width) * c; - } - _mesa_printf("\n"); - } -#endif -} -#endif - - - -/* - * Compute log base 2 of n. - * If n isn't an exact power of two return -1. - * If n < 0 return -1. - */ -static int -logbase2( int n ) -{ - GLint i = 1; - GLint log2 = 0; - - if (n < 0) { - return -1; - } - - while ( n > i ) { - i *= 2; - log2++; - } - if (i != n) { - return -1; - } - else { - return log2; - } -} - - - -/* - * Given an internal texture format enum or 1, 2, 3, 4 return the - * corresponding _base_ internal format: GL_ALPHA, GL_LUMINANCE, - * GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA. - * - * This is the format which is used during texture application (i.e. the - * texture format and env mode determine the arithmetic used. - * - * Return -1 if invalid enum. - */ -GLint -_mesa_base_tex_format( GLcontext *ctx, GLint format ) -{ - /* - * Ask the driver for the base format, if it doesn't - * know, it will return -1; - */ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return GL_ALPHA; - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return GL_LUMINANCE; - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return GL_INTENSITY; - case 3: - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return GL_RGB; - case 4: - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_RGBA; - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - if (ctx->Extensions.EXT_paletted_texture) - return GL_COLOR_INDEX; - else - return -1; - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16_SGIX: - case GL_DEPTH_COMPONENT24_SGIX: - case GL_DEPTH_COMPONENT32_SGIX: - if (ctx->Extensions.SGIX_depth_texture) - return GL_DEPTH_COMPONENT; - else - return -1; - - /* GL_ARB_texture_compression */ - case GL_COMPRESSED_ALPHA: - if (ctx->Extensions.ARB_texture_compression) - return GL_ALPHA; - else - return -1; - case GL_COMPRESSED_LUMINANCE: - if (ctx->Extensions.ARB_texture_compression) - return GL_LUMINANCE; - else - return -1; - case GL_COMPRESSED_LUMINANCE_ALPHA: - if (ctx->Extensions.ARB_texture_compression) - return GL_LUMINANCE_ALPHA; - else - return -1; - case GL_COMPRESSED_INTENSITY: - if (ctx->Extensions.ARB_texture_compression) - return GL_INTENSITY; - else - return -1; - case GL_COMPRESSED_RGB: - if (ctx->Extensions.ARB_texture_compression) - return GL_RGB; - else - return -1; - case GL_COMPRESSED_RGBA: - if (ctx->Extensions.ARB_texture_compression) - return GL_RGBA; - else - return -1; - case GL_COMPRESSED_RGB_FXT1_3DFX: - if (ctx->Extensions.TDFX_texture_compression_FXT1) - return GL_RGB; - else - return -1; - case GL_COMPRESSED_RGBA_FXT1_3DFX: - if (ctx->Extensions.TDFX_texture_compression_FXT1) - return GL_RGBA; - else - return -1; - - case GL_YCBCR_MESA: - if (ctx->Extensions.MESA_ycbcr_texture) - return GL_YCBCR_MESA; - else - return -1; - - default: - return -1; /* error */ - } -} - - -/* - * Test if the given image format is a color/rgba format. That is, - * not color index, depth, stencil, etc. - */ -static GLboolean -is_color_format(GLenum format) -{ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - case 3: - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - case 4: - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_TRUE; - case GL_YCBCR_MESA: /* not considered to be RGB */ - default: - return GL_FALSE; - } -} - - -static GLboolean -is_index_format(GLenum format) -{ - switch (format) { - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Return GL_TRUE if internalFormat is a supported compressed format, - * return GL_FALSE otherwise. - * \param - internalFormat - the internal format token provided by the user - */ -static GLboolean -is_compressed_format(GLenum internalFormat) -{ - switch (internalFormat) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/* - * Store a gl_texture_image pointer in a gl_texture_object structure - * according to the target and level parameters. - * This was basically prompted by the introduction of cube maps. - */ -void -_mesa_set_tex_image(struct gl_texture_object *tObj, - GLenum target, GLint level, - struct gl_texture_image *texImage) -{ - ASSERT(tObj); - ASSERT(texImage); - switch (target) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - tObj->Image[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - tObj->Image[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - tObj->NegX[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - tObj->PosY[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - tObj->NegY[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - tObj->PosZ[level] = texImage; - return; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - tObj->NegZ[level] = texImage; - return; - case GL_TEXTURE_RECTANGLE_NV: - ASSERT(level == 0); - tObj->Image[level] = texImage; - return; - default: - _mesa_problem(NULL, "bad target in _mesa_set_tex_image()"); - return; - } -} - - - -/* - * Return new gl_texture_image struct with all fields initialized to zero. - */ -struct gl_texture_image * -_mesa_alloc_texture_image( void ) -{ - return CALLOC_STRUCT(gl_texture_image); -} - - - -void -_mesa_free_texture_image( struct gl_texture_image *teximage ) -{ - if (teximage->Data && !teximage->IsClientData) { - MESA_PBUFFER_FREE( teximage->Data ); - teximage->Data = NULL; - } - FREE( teximage ); -} - - -/* - * Return GL_TRUE if the target is a proxy target. - */ -static GLboolean -is_proxy_target(GLenum target) -{ - return (target == GL_PROXY_TEXTURE_1D || - target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || - target == GL_PROXY_TEXTURE_CUBE_MAP_ARB || - target == GL_PROXY_TEXTURE_RECTANGLE_NV); -} - - -/* - * Given a texture unit and a texture target, return the corresponding - * texture object. - */ -struct gl_texture_object * -_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, - GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - return texUnit->Current1D; - case GL_PROXY_TEXTURE_1D: - return ctx->Texture.Proxy1D; - case GL_TEXTURE_2D: - return texUnit->Current2D; - case GL_PROXY_TEXTURE_2D: - return ctx->Texture.Proxy2D; - case GL_TEXTURE_3D: - return texUnit->Current3D; - case GL_PROXY_TEXTURE_3D: - return ctx->Texture.Proxy3D; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? texUnit->CurrentCubeMap : NULL; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? ctx->Texture.ProxyCubeMap : NULL; - case GL_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? texUnit->CurrentRect : NULL; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? ctx->Texture.ProxyRect : NULL; - default: - _mesa_problem(NULL, "bad target in _mesa_select_tex_object()"); - return NULL; - } -} - - -/* - * Return the texture image struct which corresponds to target and level - * for the given texture unit. - */ -struct gl_texture_image * -_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit, - GLenum target, GLint level) -{ - ASSERT(texUnit); - ASSERT(level < MAX_TEXTURE_LEVELS); - switch (target) { - case GL_TEXTURE_1D: - return texUnit->Current1D->Image[level]; - case GL_PROXY_TEXTURE_1D: - return ctx->Texture.Proxy1D->Image[level]; - case GL_TEXTURE_2D: - return texUnit->Current2D->Image[level]; - case GL_PROXY_TEXTURE_2D: - return ctx->Texture.Proxy2D->Image[level]; - case GL_TEXTURE_3D: - return texUnit->Current3D->Image[level]; - case GL_PROXY_TEXTURE_3D: - return ctx->Texture.Proxy3D->Image[level]; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->Image[level]; - else - return NULL; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->NegX[level]; - else - return NULL; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->PosY[level]; - else - return NULL; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->NegY[level]; - else - return NULL; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->PosZ[level]; - else - return NULL; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return texUnit->CurrentCubeMap->NegZ[level]; - else - return NULL; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - if (ctx->Extensions.ARB_texture_cube_map) - return ctx->Texture.ProxyCubeMap->Image[level]; - else - return NULL; - case GL_TEXTURE_RECTANGLE_NV: - if (ctx->Extensions.NV_texture_rectangle) { - ASSERT(level == 0); - return texUnit->CurrentRect->Image[level]; - } - else { - return NULL; - } - case GL_PROXY_TEXTURE_RECTANGLE_NV: - if (ctx->Extensions.NV_texture_rectangle) { - ASSERT(level == 0); - return ctx->Texture.ProxyRect->Image[level]; - } - else { - return NULL; - } - default: - _mesa_problem(ctx, "bad target in _mesa_select_tex_image()"); - return NULL; - } -} - - -/* - * Return the maximum number of allows mipmap levels for the given - * texture target. - */ -GLint -_mesa_max_texture_levels(GLcontext *ctx, GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return ctx->Const.MaxTextureLevels; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - return ctx->Const.Max3DTextureLevels; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return ctx->Const.MaxCubeTextureLevels; - break; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return 1; - break; - default: - return 0; /* bad target */ - } -} - - - -#if 000 /* not used anymore */ -/* - * glTexImage[123]D can accept a NULL image pointer. In this case we - * create a texture image with unspecified image contents per the OpenGL - * spec. - */ -static GLubyte * -make_null_texture(GLint width, GLint height, GLint depth, GLenum format) -{ - const GLint components = _mesa_components_in_format(format); - const GLint numPixels = width * height * depth; - GLubyte *data = (GLubyte *) MALLOC(numPixels * components * sizeof(GLubyte)); - -#ifdef DEBUG - /* - * Let's see if anyone finds this. If glTexImage2D() is called with - * a NULL image pointer then load the texture image with something - * interesting instead of leaving it indeterminate. - */ - if (data) { - static const char message[8][32] = { - " X X XXXXX XXX X ", - " XX XX X X X X X ", - " X X X X X X X ", - " X X XXXX XXX XXXXX ", - " X X X X X X ", - " X X X X X X X ", - " X X XXXXX XXX X X ", - " " - }; - - GLubyte *imgPtr = data; - GLint h, i, j, k; - for (h = 0; h < depth; h++) { - for (i = 0; i < height; i++) { - GLint srcRow = 7 - (i % 8); - for (j = 0; j < width; j++) { - GLint srcCol = j % 32; - GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70; - for (k = 0; k < components; k++) { - *imgPtr++ = texel; - } - } - } - } - } -#endif - - return data; -} -#endif - - - -/* - * Reset the fields of a gl_texture_image struct to zero. - * This is called when a proxy texture test fails, we set all the - * image members (except DriverData) to zero. - * It's also used in glTexImage[123]D as a safeguard to be sure all - * required fields get initialized properly by the Driver.TexImage[123]D - * functions. - */ -static void -clear_teximage_fields(struct gl_texture_image *img) -{ - ASSERT(img); - img->Format = 0; - img->IntFormat = 0; - img->Border = 0; - img->Width = 0; - img->Height = 0; - img->Depth = 0; - img->RowStride = 0; - img->Width2 = 0; - img->Height2 = 0; - img->Depth2 = 0; - img->WidthLog2 = 0; - img->HeightLog2 = 0; - img->DepthLog2 = 0; - img->Data = NULL; - img->TexFormat = &_mesa_null_texformat; - img->FetchTexel = NULL; - img->IsCompressed = 0; - img->CompressedSize = 0; -} - - -/* - * Initialize basic fields of the gl_texture_image struct. - */ -void -_mesa_init_teximage_fields(GLcontext *ctx, GLenum target, - struct gl_texture_image *img, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum internalFormat) -{ - ASSERT(img); - img->Format = _mesa_base_tex_format( ctx, internalFormat ); - ASSERT(img->Format > 0); - img->IntFormat = internalFormat; - img->Border = border; - img->Width = width; - img->Height = height; - img->Depth = depth; - img->RowStride = width; - img->WidthLog2 = logbase2(width - 2 * border); - if (height == 1) /* 1-D texture */ - img->HeightLog2 = 0; - else - img->HeightLog2 = logbase2(height - 2 * border); - if (depth == 1) /* 2-D texture */ - img->DepthLog2 = 0; - else - img->DepthLog2 = logbase2(depth - 2 * border); - img->Width2 = 1 << img->WidthLog2; - img->Height2 = 1 << img->HeightLog2; - img->Depth2 = 1 << img->DepthLog2; - img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2); - img->IsCompressed = is_compressed_format(internalFormat); - if (img->IsCompressed) - img->CompressedSize = _mesa_compressed_texture_size(ctx, width, height, - depth, internalFormat); - else - img->CompressedSize = 0; - - /* Compute Width/Height/DepthScale for mipmap lod computation */ - if (target == GL_TEXTURE_RECTANGLE_NV) { - /* scale = 1.0 since texture coords directly map to texels */ - img->WidthScale = 1.0; - img->HeightScale = 1.0; - img->DepthScale = 1.0; - } - else { - img->WidthScale = (GLfloat) img->Width; - img->HeightScale = (GLfloat) img->Height; - img->DepthScale = (GLfloat) img->Depth; - } -} - - - -/* - * Test glTexImage[123]D() parameters for errors. - * Input: - * dimensions - must be 1 or 2 or 3 - * Return: GL_TRUE = an error was detected, GL_FALSE = no errors - */ -static GLboolean -texture_error_check( GLcontext *ctx, GLenum target, - GLint level, GLint internalFormat, - GLenum format, GLenum type, - GLuint dimensions, - GLint width, GLint height, - GLint depth, GLint border ) -{ - GLboolean isProxy; - GLint maxLevels = 0, maxTextureSize; - - if (dimensions == 1) { - if (target == GL_PROXY_TEXTURE_1D) { - isProxy = GL_TRUE; - } - else if (target == GL_TEXTURE_1D) { - isProxy = GL_FALSE; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); - return GL_TRUE; - } - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (dimensions == 2) { - if (target == GL_PROXY_TEXTURE_2D) { - isProxy = GL_TRUE; - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_TEXTURE_2D) { - isProxy = GL_FALSE; - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage2D(target)"); - return GL_TRUE; - } - isProxy = GL_TRUE; - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage2D(target)"); - return GL_TRUE; - } - isProxy = GL_FALSE; - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage2D(target)"); - return GL_TRUE; - } - isProxy = GL_TRUE; - maxLevels = 1; - } - else if (target == GL_TEXTURE_RECTANGLE_NV) { - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage2D(target)"); - return GL_TRUE; - } - isProxy = GL_FALSE; - maxLevels = 1; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage2D(target)"); - return GL_TRUE; - } - } - else if (dimensions == 3) { - if (target == GL_PROXY_TEXTURE_3D) { - isProxy = GL_TRUE; - } - else if (target == GL_TEXTURE_3D) { - isProxy = GL_FALSE; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); - return GL_TRUE; - } - maxLevels = ctx->Const.Max3DTextureLevels; - } - else { - _mesa_problem( ctx, "bad dims in texture_error_check" ); - return GL_TRUE; - } - - ASSERT(maxLevels > 0); - maxTextureSize = 1 << (maxLevels - 1); - - /* Border */ - if (border != 0 && border != 1) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(border=%d)", dimensions, border); - } - return GL_TRUE; - } - if ((target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0) { - return GL_TRUE; - } - - /* Width */ - if (target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (width < 1 || width > ctx->Const.MaxTextureRectSize) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(width=%d)", dimensions, width); - } - return GL_TRUE; - } - } - else if (width < 2 * border || width > 2 + maxTextureSize - || logbase2( width - 2 * border ) < 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(width=%d)", dimensions, width); - } - return GL_TRUE; - } - - /* Height */ - if (target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (height < 1 || height > ctx->Const.MaxTextureRectSize) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(height=%d)", dimensions, height); - } - return GL_TRUE; - } - } - else if (dimensions >= 2) { - if (height < 2 * border || height > 2 + maxTextureSize - || logbase2( height - 2 * border ) < 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(height=%d)", dimensions, height); - } - return GL_TRUE; - } - } - - /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (width != height) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); - } - return GL_TRUE; - } - } - - /* Depth */ - if (dimensions >= 3) { - if (depth < 2 * border || depth > 2 + maxTextureSize - || logbase2( depth - 2 * border ) < 0) { - if (!isProxy) { - _mesa_error( ctx, GL_INVALID_VALUE, - "glTexImage3D(depth=%d)", depth ); - } - return GL_TRUE; - } - } - - /* Level */ - if (target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (level != 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage2D(level=%d)", level); - } - return GL_TRUE; - } - } - else if (level < 0 || level >= maxLevels) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(level=%d)", dimensions, level); - } - return GL_TRUE; - } - - /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (width != height) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); - return GL_TRUE; - } - } - - if (_mesa_base_tex_format(ctx, internalFormat) < 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(internalFormat=0x%x)", - dimensions, internalFormat); - } - return GL_TRUE; - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - /* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there - * is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4. - */ - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(format or type)", dimensions); - } - return GL_TRUE; - } - - if (format == GL_YCBCR_MESA || internalFormat == GL_YCBCR_MESA) { - ASSERT(ctx->Extensions.MESA_ycbcr_texture); - if (format != GL_YCBCR_MESA || - internalFormat != GL_YCBCR_MESA || - (type != GL_UNSIGNED_SHORT_8_8_MESA && - type != GL_UNSIGNED_SHORT_8_8_REV_MESA)) { - char message[100]; - _mesa_sprintf(message, - "glTexImage%d(format/type/internalFormat YCBCR mismatch", - dimensions); - _mesa_error(ctx, GL_INVALID_ENUM, message); - return GL_TRUE; /* error */ - } - if (target != GL_TEXTURE_2D && - target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_RECTANGLE_NV && - target != GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target)"); - return GL_TRUE; - } - if (border != 0) { - if (!isProxy) { - char message[100]; - _mesa_sprintf(message, - "glTexImage%d(format=GL_YCBCR_MESA and border=%d)", - dimensions, border); - _mesa_error(ctx, GL_INVALID_VALUE, message); - } - return GL_TRUE; - } - } - - if (is_compressed_format(internalFormat)) { - if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) { - /* OK */ - } - else if (ctx->Extensions.ARB_texture_cube_map && - (target == GL_PROXY_TEXTURE_CUBE_MAP || - (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { - /* OK */ - } - else { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexImage%d(target)", dimensions); - return GL_TRUE; - } - } - if (border != 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%D(border!=0)", dimensions); - } - return GL_TRUE; - } - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - - -/* - * Test glTexSubImage[123]D() parameters for errors. - * Input: - * dimensions - must be 1 or 2 or 3 - * Return: GL_TRUE = an error was detected, GL_FALSE = no errors - */ -static GLboolean -subtexture_error_check( GLcontext *ctx, GLuint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type ) -{ - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_image *destTex; - GLint maxLevels = 0; - - if (dimensions == 1) { - if (target == GL_TEXTURE_1D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage1D(target)" ); - return GL_TRUE; - } - } - else if (dimensions == 2) { - if (ctx->Extensions.ARB_texture_cube_map && - target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <=GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (ctx->Extensions.NV_texture_rectangle && - target == GL_TEXTURE_RECTANGLE_NV) { - maxLevels = 1; - } - else if (target == GL_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" ); - return GL_TRUE; - } - } - else if (dimensions == 3) { - if (target == GL_TEXTURE_3D) { - maxLevels = ctx->Const.Max3DTextureLevels; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexSubImage3D(target)" ); - return GL_TRUE; - } - } - else { - _mesa_problem( ctx, "bad dims in texture_error_check" ); - return GL_TRUE; - } - - ASSERT(maxLevels > 0); - - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage2D(level=%d)", level); - return GL_TRUE; - } - - if (width < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexSubImage%dD(width=%d)", dimensions, width); - return GL_TRUE; - } - if (height < 0 && dimensions > 1) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexSubImage%dD(height=%d)", dimensions, height); - return GL_TRUE; - } - if (depth < 0 && dimensions > 2) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(depth=%d)", dimensions, depth); - return GL_TRUE; - } - - destTex = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!destTex) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexSubImage2D"); - return GL_TRUE; - } - - if (xoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset)"); - return GL_TRUE; - } - if (xoffset + width > (GLint) (destTex->Width + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage1/2/3D(xoffset+width)"); - return GL_TRUE; - } - if (dimensions > 1) { - if (yoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset)"); - return GL_TRUE; - } - if (yoffset + height > (GLint) (destTex->Height + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage2/3D(yoffset+height)"); - return GL_TRUE; - } - } - if (dimensions > 2) { - if (zoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)"); - return GL_TRUE; - } - if (zoffset + depth > (GLint) (destTex->Depth + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)"); - return GL_TRUE; - } - } - - if (!_mesa_is_legal_format_and_type(format, type)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexSubImage%dD(format or type)", dimensions); - return GL_TRUE; - } - - if (destTex->IsCompressed) { - const struct gl_texture_unit *texUnit; - const struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D) { - /* OK */ - } - else if (ctx->Extensions.ARB_texture_cube_map && - (target == GL_PROXY_TEXTURE_CUBE_MAP || - (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { - /* OK */ - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexSubImage%D(target)", dimensions); - return GL_TRUE; - } - /* offset must be multiple of 4 */ - if ((xoffset & 3) || (yoffset & 3)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%D(xoffset or yoffset)", dimensions); - return GL_TRUE; - } - /* size must be multiple of 4 or equal to whole texture size */ - if ((width & 3) && (GLuint) width != texImage->Width) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%D(width)", dimensions); - return GL_TRUE; - } - if ((height & 3) && (GLuint) height != texImage->Height) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%D(width)", dimensions); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -/* - * Test glCopyTexImage[12]D() parameters for errors. - * Input: dimensions - must be 1 or 2 or 3 - * Return: GL_TRUE = an error was detected, GL_FALSE = no errors - */ -static GLboolean -copytexture_error_check( GLcontext *ctx, GLuint dimensions, - GLenum target, GLint level, GLint internalFormat, - GLint width, GLint height, GLint border ) -{ - GLint maxLevels = 0, maxTextureSize; - - if (dimensions == 1) { - if (target != GL_TEXTURE_1D) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1D(target)" ); - return GL_TRUE; - } - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (dimensions == 2) { - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); - return GL_TRUE; - } - } - else if (target == GL_TEXTURE_RECTANGLE_NV) { - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); - return GL_TRUE; - } - } - else if (target != GL_TEXTURE_2D) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" ); - return GL_TRUE; - } - if (target == GL_TEXTURE_2D) - maxLevels = ctx->Const.MaxTextureLevels; - else if (target == GL_TEXTURE_RECTANGLE_NV) - maxLevels = 1; - else - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - - ASSERT(maxLevels > 0); - maxTextureSize = 1 << (maxLevels - 1); - - /* Border */ - if (border != 0 && border != 1) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(border)", dimensions); - return GL_TRUE; - } - - /* Width */ - if (width < 2 * border || width > 2 + maxTextureSize - || logbase2( width - 2 * border ) < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(width=%d)", dimensions, width); - return GL_TRUE; - } - - /* Height */ - if (dimensions >= 2) { - if (height < 2 * border || height > 2 + maxTextureSize - || logbase2( height - 2 * border ) < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(height=%d)", dimensions, height); - return GL_TRUE; - } - } - - /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (width != height) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCopyTexImage2D(width != height)"); - return GL_TRUE; - } - } - - /* Level */ - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(level=%d)", dimensions, level); - return GL_TRUE; - } - - if (_mesa_base_tex_format(ctx, internalFormat) < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(internalFormat)", dimensions); - return GL_TRUE; - } - - if (is_compressed_format(internalFormat)) { - if (target != GL_TEXTURE_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glCopyTexImage%d(target)", dimensions); - return GL_TRUE; - } - if (border != 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%D(border!=0)", dimensions); - return GL_TRUE; - } - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - -static GLboolean -copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height ) -{ - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_image *teximage; - GLint maxLevels = 0; - - if (dimensions == 1) { - if (target != GL_TEXTURE_1D) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage1D(target)" ); - return GL_TRUE; - } - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (dimensions == 2) { - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); - return GL_TRUE; - } - } - else if (target == GL_TEXTURE_RECTANGLE_NV) { - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); - return GL_TRUE; - } - } - else if (target != GL_TEXTURE_2D) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" ); - return GL_TRUE; - } - if (target == GL_TEXTURE_2D) - maxLevels = ctx->Const.MaxTextureLevels; - else if (target == GL_TEXTURE_RECTANGLE_NV) - maxLevels = 1; - else - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (dimensions == 3) { - if (target != GL_TEXTURE_3D) { - _mesa_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage3D(target)" ); - return GL_TRUE; - } - maxLevels = ctx->Const.Max3DTextureLevels; - } - - ASSERT(maxLevels > 0); - - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(level=%d)", dimensions, level); - return GL_TRUE; - } - - if (width < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(width=%d)", dimensions, width); - return GL_TRUE; - } - if (dimensions > 1 && height < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(height=%d)", dimensions, height); - return GL_TRUE; - } - - teximage = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!teximage) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(undefined texture level: %d)", - dimensions, level); - return GL_TRUE; - } - - if (xoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset=%d)", dimensions, xoffset); - return GL_TRUE; - } - if (xoffset + width > (GLint) (teximage->Width + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset+width)", dimensions); - return GL_TRUE; - } - if (dimensions > 1) { - if (yoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(yoffset=%d)", dimensions, yoffset); - return GL_TRUE; - } - /* NOTE: we're adding the border here, not subtracting! */ - if (yoffset + height > (GLint) (teximage->Height + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(yoffset+height)", dimensions); - return GL_TRUE; - } - } - - if (dimensions > 2) { - if (zoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(zoffset)", dimensions); - return GL_TRUE; - } - if (zoffset > (GLint) (teximage->Depth + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(zoffset+depth)", dimensions); - return GL_TRUE; - } - } - - if (teximage->IsCompressed) { - if (target != GL_TEXTURE_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glCopyTexSubImage%d(target)", dimensions); - return GL_TRUE; - } - /* offset must be multiple of 4 */ - if ((xoffset & 3) || (yoffset & 3)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%D(xoffset or yoffset)", dimensions); - return GL_TRUE; - } - /* size must be multiple of 4 */ - if ((width & 3) != 0 && (GLuint) width != teximage->Width) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%D(width)", dimensions); - return GL_TRUE; - } - if ((height & 3) != 0 && (GLuint) height != teximage->Height) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%D(height)", dimensions); - return GL_TRUE; - } - } - - if (teximage->IntFormat == GL_YCBCR_MESA) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage2D"); - return GL_TRUE; - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - - -void -_mesa_GetTexImage( GLenum target, GLint level, GLenum format, - GLenum type, GLvoid *pixels ) -{ - const struct gl_texture_unit *texUnit; - const struct gl_texture_object *texObj; - const struct gl_texture_image *texImage; - GLint maxLevels = 0; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - texUnit = &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]); - texObj = _mesa_select_tex_object(ctx, texUnit, target); - if (!texObj || is_proxy_target(target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); - return; - } - - maxLevels = _mesa_max_texture_levels(ctx, target); - ASSERT(maxLevels > 0); /* 0 indicates bad target, caught above */ - - if (level < 0 || level >= maxLevels) { - _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" ); - return; - } - - if (_mesa_sizeof_packed_type(type) <= 0) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); - return; - } - - if (_mesa_components_in_format(format) <= 0 || - format == GL_STENCIL_INDEX) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); - return; - } - - if (!ctx->Extensions.EXT_paletted_texture && is_index_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - } - - if (!ctx->Extensions.SGIX_depth_texture && format == GL_DEPTH_COMPONENT) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - } - - if (!ctx->Extensions.MESA_ycbcr_texture && format == GL_YCBCR_MESA) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - } - - /* XXX what if format/type doesn't match texture format/type? */ - - if (!pixels) - return; - - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!texImage) { - /* invalid mipmap level, not an error */ - return; - } - - if (!texImage->Data) { - /* no image data, not an error */ - return; - } - - { - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - GLint img, row; - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - /* compute destination address in client memory */ - GLvoid *dest = _mesa_image_address( &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - assert(dest); - - if (format == GL_COLOR_INDEX) { - GLuint indexRow[MAX_WIDTH]; - GLint col; - for (col = 0; col < width; col++) { - (*texImage->FetchTexel)(texImage, col, row, img, - (GLvoid *) &indexRow[col]); - } - _mesa_pack_index_span(ctx, width, type, dest, - indexRow, &ctx->Pack, - 0 /* no image transfer */); - } - else if (format == GL_DEPTH_COMPONENT) { - GLfloat depthRow[MAX_WIDTH]; - GLint col; - for (col = 0; col < width; col++) { - (*texImage->FetchTexel)(texImage, col, row, img, - (GLvoid *) &depthRow[col]); - } - _mesa_pack_depth_span(ctx, width, dest, type, - depthRow, &ctx->Pack); - } - else if (format == GL_YCBCR_MESA) { - /* No pixel transfer */ - const GLint rowstride = texImage->RowStride; - MEMCPY(dest, - (const GLushort *) texImage->Data + row * rowstride, - width * sizeof(GLushort)); - /* check for byte swapping */ - if ((texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR - && type == GL_UNSIGNED_SHORT_8_8_REV_MESA) || - (texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR_REV - && type == GL_UNSIGNED_SHORT_8_8_MESA)) { - if (!ctx->Pack.SwapBytes) - _mesa_swap2((GLushort *) dest, width); - } - else if (ctx->Pack.SwapBytes) { - _mesa_swap2((GLushort *) dest, width); - } - } - else { - /* general case: convert row to RGBA format */ - GLchan rgba[MAX_WIDTH][4]; - GLint col; - for (col = 0; col < width; col++) { - (*texImage->FetchTexel)(texImage, col, row, img, - (GLvoid *) rgba[col]); - } - _mesa_pack_rgba_span(ctx, width, (const GLchan (*)[4])rgba, - format, type, dest, &ctx->Pack, - 0 /* no image transfer */); - } /* format */ - } /* row */ - } /* img */ - } -} - - - -/* - * Called from the API. Note that width includes the border. - */ -void -_mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLint border, GLenum format, - GLenum type, const GLvoid *pixels ) -{ - GLsizei postConvWidth = width; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (is_color_format(internalFormat)) { - _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); - } - - if (target == GL_TEXTURE_1D) { - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (texture_error_check(ctx, target, level, internalFormat, - format, type, 1, postConvWidth, 1, 1, border)) { - return; /* error was recorded */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - texObj->Image[level] = texImage; - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - /* free the old texture data */ - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - clear_teximage_fields(texImage); /* not really needed, but helpful */ - _mesa_init_teximage_fields(ctx, target, texImage, - postConvWidth, 1, 1, - border, internalFormat); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - ASSERT(ctx->Driver.TexImage1D); - - /* Give the texture to the driver! may be null! */ - (*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat, - width, border, format, type, pixels, - &ctx->Unpack, texObj, texImage); - - ASSERT(texImage->TexFormat); - if (!texImage->FetchTexel) { - /* If driver didn't explicitly set this, use the default */ - texImage->FetchTexel = texImage->TexFormat->FetchTexel1D; - } - ASSERT(texImage->FetchTexel); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_1D) { - /* Proxy texture: check for errors and update proxy state */ - GLboolean error = texture_error_check(ctx, target, level, internalFormat, - format, type, 1, postConvWidth, 1, 1, border); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, format, type, - postConvWidth, 1, 1, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - if (level >= 0 && level < ctx->Const.MaxTextureLevels) { - clear_teximage_fields(ctx->Texture.Proxy1D->Image[level]); - } - } - else { - /* no error, set the tex image parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, - postConvWidth, 1, 1, - border, internalFormat); - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" ); - return; - } -} - - -void -_mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GLsizei postConvWidth = width, postConvHeight = height; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (is_color_format(internalFormat)) { - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, - &postConvHeight); - } - - if (target == GL_TEXTURE_2D || - (ctx->Extensions.ARB_texture_cube_map && - target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) || - (ctx->Extensions.NV_texture_rectangle && - target == GL_TEXTURE_RECTANGLE_NV)) { - /* non-proxy target */ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (texture_error_check(ctx, target, level, internalFormat, - format, type, 2, postConvWidth, postConvHeight, - 1, border)) { - return; /* error was recorded */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - _mesa_set_tex_image(texObj, target, level, texImage); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - /* free the old texture data */ - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - clear_teximage_fields(texImage); /* not really needed, but helpful */ - _mesa_init_teximage_fields(ctx, target, texImage, - postConvWidth, postConvHeight, 1, - border, internalFormat); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - ASSERT(ctx->Driver.TexImage2D); - - /* Give the texture to the driver! may be null! */ - (*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat, - width, height, border, format, type, pixels, - &ctx->Unpack, texObj, texImage); - - ASSERT(texImage->TexFormat); - if (!texImage->FetchTexel) { - /* If driver didn't explicitly set this, use the default */ - texImage->FetchTexel = texImage->TexFormat->FetchTexel2D; - } - ASSERT(texImage->FetchTexel); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_2D || - (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB && - ctx->Extensions.ARB_texture_cube_map) || - (target == GL_PROXY_TEXTURE_RECTANGLE_NV && - ctx->Extensions.NV_texture_rectangle)) { - /* Proxy texture: check for errors and update proxy state */ - GLboolean error = texture_error_check(ctx, target, level, internalFormat, - format, type, 2, postConvWidth, postConvHeight, 1, border); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, format, type, - postConvWidth, postConvHeight, 1, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - const GLint maxLevels = (target == GL_PROXY_TEXTURE_2D) ? - ctx->Const.MaxTextureLevels : ctx->Const.MaxCubeTextureLevels; - if (level >= 0 && level < maxLevels) { - clear_teximage_fields(ctx->Texture.Proxy2D->Image[level]); - } - } - else { - /* no error, set the tex image parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, - postConvWidth, postConvHeight, 1, - border, internalFormat); - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" ); - return; - } -} - - -/* - * Called by the API or display list executor. - * Note that width and height include the border. - */ -void -_mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target == GL_TEXTURE_3D) { - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (texture_error_check(ctx, target, level, (GLint) internalFormat, - format, type, 3, width, height, depth, border)) { - return; /* error was recorded */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - texObj->Image[level] = texImage; - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - clear_teximage_fields(texImage); /* not really needed, but helpful */ - _mesa_init_teximage_fields(ctx, target, texImage, - width, height, depth, - border, internalFormat); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - ASSERT(ctx->Driver.TexImage3D); - - /* Give the texture to the driver! may be null! */ - (*ctx->Driver.TexImage3D)(ctx, target, level, internalFormat, - width, height, depth, border, format, type, - pixels, &ctx->Unpack, texObj, texImage); - - ASSERT(texImage->TexFormat); - if (!texImage->FetchTexel) { - /* If driver didn't explicitly set this, use the default */ - texImage->FetchTexel = texImage->TexFormat->FetchTexel3D; - } - ASSERT(texImage->FetchTexel); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_3D) { - /* Proxy texture: check for errors and update proxy state */ - GLboolean error = texture_error_check(ctx, target, level, internalFormat, - format, type, 3, width, height, depth, border); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, format, type, - width, height, depth, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - if (level >= 0 && level < ctx->Const.Max3DTextureLevels) { - clear_teximage_fields(ctx->Texture.Proxy3D->Image[level]); - } - } - else { - /* no error, set the tex image parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1, - border, internalFormat); - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" ); - return; - } -} - - -void -_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ) -{ - _mesa_TexImage3D(target, level, (GLint) internalFormat, width, height, - depth, border, format, type, pixels); -} - - - -void -_mesa_TexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GLsizei postConvWidth = width; - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - /* XXX should test internal format */ - if (is_color_format(format)) { - _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); - } - - if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0, - postConvWidth, 1, 1, format, type)) { - return; /* error was detected */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if (width == 0 || !pixels) - return; /* no-op, not an error */ - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - - ASSERT(ctx->Driver.TexSubImage1D); - (*ctx->Driver.TexSubImage1D)(ctx, target, level, xoffset, width, - format, type, pixels, &ctx->Unpack, - texObj, texImage); - ctx->NewState |= _NEW_TEXTURE; -} - - -void -_mesa_TexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GLsizei postConvWidth = width, postConvHeight = height; - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - /* XXX should test internal format */ - if (is_color_format(format)) { - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, - &postConvHeight); - } - - if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0, - postConvWidth, postConvHeight, 1, format, type)) { - return; /* error was detected */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if (width == 0 || height == 0 || !pixels) - return; /* no-op, not an error */ - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - yoffset += texImage->Border; - - ASSERT(ctx->Driver.TexSubImage2D); - (*ctx->Driver.TexSubImage2D)(ctx, target, level, xoffset, yoffset, - width, height, format, type, pixels, - &ctx->Unpack, texObj, texImage); - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_TexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - if (subtexture_error_check(ctx, 3, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, type)) { - return; /* error was detected */ - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if (width == 0 || height == 0 || height == 0 || !pixels) - return; /* no-op, not an error */ - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - yoffset += texImage->Border; - zoffset += texImage->Border; - - ASSERT(ctx->Driver.TexSubImage3D); - (*ctx->Driver.TexSubImage3D)(ctx, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, type, pixels, - &ctx->Unpack, texObj, texImage ); - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_CopyTexImage1D( GLenum target, GLint level, - GLenum internalFormat, - GLint x, GLint y, - GLsizei width, GLint border ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLsizei postConvWidth = width; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - if (is_color_format(internalFormat)) { - _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); - } - - if (copytexture_error_check(ctx, 1, target, level, internalFormat, - postConvWidth, 1, border)) - return; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - _mesa_set_tex_image(texObj, target, level, texImage); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - /* free the old texture data */ - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - - clear_teximage_fields(texImage); /* not really needed, but helpful */ - _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1, - border, internalFormat); - - - ASSERT(ctx->Driver.CopyTexImage1D); - (*ctx->Driver.CopyTexImage1D)(ctx, target, level, internalFormat, - x, y, width, border); - - ASSERT(texImage->TexFormat); - if (!texImage->FetchTexel) { - /* If driver didn't explicitly set this, use the default */ - texImage->FetchTexel = texImage->TexFormat->FetchTexel1D; - } - ASSERT(texImage->FetchTexel); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, - GLint x, GLint y, GLsizei width, GLsizei height, - GLint border ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLsizei postConvWidth = width, postConvHeight = height; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - if (is_color_format(internalFormat)) { - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, - &postConvHeight); - } - - if (copytexture_error_check(ctx, 2, target, level, internalFormat, - postConvWidth, postConvHeight, border)) - return; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - _mesa_set_tex_image(texObj, target, level, texImage); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - /* free the old texture data */ - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - - clear_teximage_fields(texImage); /* not really needed, but helpful */ - _mesa_init_teximage_fields(ctx, target, texImage, - postConvWidth, postConvHeight, 1, - border, internalFormat); - - ASSERT(ctx->Driver.CopyTexImage2D); - (*ctx->Driver.CopyTexImage2D)(ctx, target, level, internalFormat, - x, y, width, height, border); - - ASSERT(texImage->TexFormat); - if (!texImage->FetchTexel) { - /* If driver didn't explicitly set this, use the default */ - texImage->FetchTexel = texImage->TexFormat->FetchTexel2D; - } - ASSERT(texImage->FetchTexel); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_CopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, GLsizei width ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - GLsizei postConvWidth = width; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - /* XXX should test internal format */ - _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); - - if (copytexsubimage_error_check(ctx, 1, target, level, - xoffset, 0, 0, postConvWidth, 1)) - return; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - - ASSERT(ctx->Driver.CopyTexSubImage1D); - (*ctx->Driver.CopyTexSubImage1D)(ctx, target, level, xoffset, x, y, width); - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_CopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - GLsizei postConvWidth = width, postConvHeight = height; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - /* XXX should test internal format */ - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight); - - if (copytexsubimage_error_check(ctx, 2, target, level, xoffset, yoffset, 0, - postConvWidth, postConvHeight)) - return; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - yoffset += texImage->Border; - - ASSERT(ctx->Driver.CopyTexSubImage2D); - (*ctx->Driver.CopyTexSubImage2D)(ctx, target, level, - xoffset, yoffset, x, y, width, height); - ctx->NewState |= _NEW_TEXTURE; -} - - - -void -_mesa_CopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, GLsizei height ) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - GLsizei postConvWidth = width, postConvHeight = height; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE) - _mesa_update_state(ctx); - - /* XXX should test internal format */ - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight); - - if (copytexsubimage_error_check(ctx, 3, target, level, xoffset, yoffset, - zoffset, postConvWidth, postConvHeight)) - return; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - /* If we have a border, xoffset=-1 is legal. Bias by border width */ - xoffset += texImage->Border; - yoffset += texImage->Border; - zoffset += texImage->Border; - - ASSERT(ctx->Driver.CopyTexSubImage3D); - (*ctx->Driver.CopyTexSubImage3D)(ctx, target, level, - xoffset, yoffset, zoffset, - x, y, width, height); - ctx->NewState |= _NEW_TEXTURE; -} - - - - -/**********************************************************************/ -/****** Compressed Textures ******/ -/**********************************************************************/ - - -/** - * Error checking for glCompressedTexImage[123]D(). - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_texture_error_check(GLcontext *ctx, GLint dimensions, - GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize) -{ - GLint expectedSize, maxLevels = 0, maxTextureSize; - - if (dimensions == 1) { - /* 1D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - else if (dimensions == 2) { - if (target == GL_PROXY_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else { - return GL_INVALID_ENUM; /*target*/ - } - } - else if (dimensions == 3) { - /* 3D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - - maxTextureSize = 1 << (maxLevels - 1); - - if (!is_compressed_format(internalFormat)) - return GL_INVALID_ENUM; - - if (border != 0) - return GL_INVALID_VALUE; - - if (width < 1 || width > maxTextureSize || logbase2(width) < 0) - return GL_INVALID_VALUE; - - if ((height < 1 || height > maxTextureSize || logbase2(height) < 0) - && dimensions > 1) - return GL_INVALID_VALUE; - - if ((depth < 1 || depth > maxTextureSize || logbase2(depth) < 0) - && dimensions > 2) - return GL_INVALID_VALUE; - - /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB && width != height) - return GL_INVALID_VALUE; - - if (level < 0 || level >= maxLevels) - return GL_INVALID_VALUE; - - expectedSize = _mesa_compressed_texture_size(ctx, width, height, depth, - internalFormat); - if (expectedSize != imageSize) - return GL_INVALID_VALUE; - - return GL_NO_ERROR; -} - - -/** - * Error checking for glCompressedTexSubImage[123]D(). - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize) -{ - GLint expectedSize, maxLevels = 0, maxTextureSize; - - if (dimensions == 1) { - /* 1D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - else if (dimensions == 2) { - if (target == GL_PROXY_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else { - return GL_INVALID_ENUM; /*target*/ - } - } - else if (dimensions == 3) { - /* 3D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - - maxTextureSize = 1 << (maxLevels - 1); - - if (!is_compressed_format(format)) - return GL_INVALID_ENUM; - - if (width < 1 || width > maxTextureSize || logbase2(width) < 0) - return GL_INVALID_VALUE; - - if ((height < 1 || height > maxTextureSize || logbase2(height) < 0) - && dimensions > 1) - return GL_INVALID_VALUE; - - if (level < 0 || level >= maxLevels) - return GL_INVALID_VALUE; - - if ((xoffset & 3) != 0 || (yoffset & 3) != 0) - return GL_INVALID_VALUE; - - if ((width & 3) != 0 && width != 2 && width != 1) - return GL_INVALID_VALUE; - - if ((height & 3) != 0 && height != 2 && height != 1) - return GL_INVALID_VALUE; - - expectedSize = _mesa_compressed_texture_size(ctx, width, height, depth, - format); - if (expectedSize != imageSize) - return GL_INVALID_VALUE; - - return GL_NO_ERROR; -} - - - -void -_mesa_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target == GL_TEXTURE_1D) { - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error = compressed_texture_error_check(ctx, 1, target, level, - internalFormat, width, 1, 1, border, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexImage1D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - texObj->Image[level] = texImage; - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - - _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1, - border, internalFormat); - - ASSERT(ctx->Driver.CompressedTexImage1D); - (*ctx->Driver.CompressedTexImage1D)(ctx, target, level, - internalFormat, width, border, - imageSize, data, - texObj, texImage); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_1D) { - /* Proxy texture: check for errors and update proxy state */ - GLenum error = compressed_texture_error_check(ctx, 1, target, level, - internalFormat, width, 1, 1, border, imageSize); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, GL_NONE, GL_NONE, - width, 1, 1, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - if (level >= 0 && level < ctx->Const.MaxTextureLevels) { - clear_teximage_fields(ctx->Texture.Proxy1D->Image[level]); - } - } - else { - /* store the teximage parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1, - border, internalFormat); - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage1D(target)"); - return; - } -} - - -void -_mesa_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target == GL_TEXTURE_2D || - (ctx->Extensions.ARB_texture_cube_map && - target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) { - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error = compressed_texture_error_check(ctx, 2, target, level, - internalFormat, width, height, 1, border, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexImage2D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - texObj->Image[level] = texImage; - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - - _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1, - border, internalFormat); - - ASSERT(ctx->Driver.CompressedTexImage2D); - (*ctx->Driver.CompressedTexImage2D)(ctx, target, level, - internalFormat, width, height, - border, imageSize, data, - texObj, texImage); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_2D || - (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB && - ctx->Extensions.ARB_texture_cube_map)) { - /* Proxy texture: check for errors and update proxy state */ - GLenum error = compressed_texture_error_check(ctx, 2, target, level, - internalFormat, width, height, 1, border, imageSize); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, GL_NONE, GL_NONE, - width, height, 1, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - const GLint maxLevels = (target == GL_PROXY_TEXTURE_2D) ? - ctx->Const.MaxTextureLevels : ctx->Const.MaxCubeTextureLevels; - if (level >= 0 && level < maxLevels) { - clear_teximage_fields(ctx->Texture.Proxy2D->Image[level]); - } - } - else { - /* store the teximage parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1, - border, internalFormat); - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage2D(target)"); - return; - } -} - - -void -_mesa_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (target == GL_TEXTURE_3D) { - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error = compressed_texture_error_check(ctx, 3, target, level, - internalFormat, width, height, depth, border, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexImage3D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - if (!texImage) { - texImage = _mesa_alloc_texture_image(); - texObj->Image[level] = texImage; - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3D"); - return; - } - } - else if (texImage->Data && !texImage->IsClientData) { - MESA_PBUFFER_FREE(texImage->Data); - } - texImage->Data = NULL; - - _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth, - border, internalFormat); - - ASSERT(ctx->Driver.CompressedTexImage3D); - (*ctx->Driver.CompressedTexImage3D)(ctx, target, level, - internalFormat, - width, height, depth, - border, imageSize, data, - texObj, texImage); - - /* state update */ - texObj->Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else if (target == GL_PROXY_TEXTURE_3D) { - /* Proxy texture: check for errors and update proxy state */ - GLenum error = compressed_texture_error_check(ctx, 3, target, level, - internalFormat, width, height, depth, border, imageSize); - if (!error) { - ASSERT(ctx->Driver.TestProxyTexImage); - error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level, - internalFormat, GL_NONE, GL_NONE, - width, height, depth, border); - } - if (error) { - /* if error, clear all proxy texture image parameters */ - if (level >= 0 && level < ctx->Const.Max3DTextureLevels) { - clear_teximage_fields(ctx->Texture.Proxy3D->Image[level]); - } - } - else { - /* store the teximage parameters */ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - _mesa_init_teximage_fields(ctx, target, texImage, width, height, - depth, border, internalFormat); - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage3D(target)"); - return; - } -} - - -void -_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - error = compressed_subtexture_error_check(ctx, 1, target, level, - xoffset, 0, 0, width, 1, 1, format, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexSubImage1D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if ((GLint) format != texImage->IntFormat) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage1D(format)"); - return; - } - - if ((width == 1 || width == 2) && (GLuint) width != texImage->Width) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage1D(width)"); - return; - } - - if (width == 0 || !data) - return; /* no-op, not an error */ - - if (ctx->Driver.CompressedTexSubImage1D) { - (*ctx->Driver.CompressedTexSubImage1D)(ctx, target, level, - xoffset, width, - format, imageSize, data, - texObj, texImage); - } - ctx->NewState |= _NEW_TEXTURE; -} - - -void -_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - error = compressed_subtexture_error_check(ctx, 2, target, level, - xoffset, yoffset, 0, width, height, 1, format, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexSubImage2D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if ((GLint) format != texImage->IntFormat) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage2D(format)"); - return; - } - - if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) || - ((height == 1 || height == 2) && (GLuint) height != texImage->Height)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage2D(size)"); - return; - } - - if (width == 0 || height == 0 || !data) - return; /* no-op, not an error */ - - if (ctx->Driver.CompressedTexSubImage2D) { - (*ctx->Driver.CompressedTexSubImage2D)(ctx, target, level, - xoffset, yoffset, width, height, - format, imageSize, data, - texObj, texImage); - } - ctx->NewState |= _NEW_TEXTURE; -} - - -void -_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - error = compressed_subtexture_error_check(ctx, 3, target, level, - xoffset, yoffset, zoffset, width, height, depth, format, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexSubImage2D"); - return; - } - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - assert(texImage); - - if ((GLint) format != texImage->IntFormat) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage3D(format)"); - return; - } - - if (((width == 1 || width == 2) && (GLuint) width != texImage->Width) || - ((height == 1 || height == 2) && (GLuint) height != texImage->Height) || - ((depth == 1 || depth == 2) && (GLuint) depth != texImage->Depth)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage3D(size)"); - return; - } - - if (width == 0 || height == 0 || depth == 0 || !data) - return; /* no-op, not an error */ - - if (ctx->Driver.CompressedTexSubImage3D) { - (*ctx->Driver.CompressedTexSubImage3D)(ctx, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, imageSize, data, - texObj, texImage); - } - ctx->NewState |= _NEW_TEXTURE; -} - - -void -_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) -{ - const struct gl_texture_unit *texUnit; - const struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLint maxLevels; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texObj = _mesa_select_tex_object(ctx, texUnit, target); - if (!texObj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB"); - return; - } - - maxLevels = _mesa_max_texture_levels(ctx, target); - ASSERT(maxLevels > 0); /* 0 indicates bad target, caught above */ - - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)"); - return; - } - - if (is_proxy_target(target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); - return; - } - - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!texImage) { - /* probably invalid mipmap level */ - _mesa_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)"); - return; - } - - if (!texImage->IsCompressed) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB"); - return; - } - - if (!img) - return; - - /* just memcpy, no pixelstore or pixel transfer */ - MEMCPY(img, texImage->Data, texImage->CompressedSize); -} Index: xc/extras/Mesa/src/teximage.h diff -u xc/extras/Mesa/src/teximage.h:1.12 xc/extras/Mesa/src/teximage.h:removed --- xc/extras/Mesa/src/teximage.h:1.12 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/teximage.h Wed Mar 16 21:00:33 2005 @@ -1,205 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef TEXIMAGE_H -#define TEXIMAGE_H - - -#include "mtypes.h" - - -/*** Internal functions ***/ - - -extern GLint -_mesa_base_tex_format( GLcontext *ctx, GLint format ); - - -extern struct gl_texture_image * -_mesa_alloc_texture_image( void ); - - -extern void -_mesa_free_texture_image( struct gl_texture_image *teximage ); - - -extern void -_mesa_init_teximage_fields(GLcontext *ctx, GLenum target, - struct gl_texture_image *img, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum internalFormat); - - -extern void -_mesa_set_tex_image(struct gl_texture_object *tObj, - GLenum target, GLint level, - struct gl_texture_image *texImage); - - -extern struct gl_texture_object * -_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, - GLenum target); - - -extern struct gl_texture_image * -_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit, - GLenum target, GLint level); - - -extern GLint -_mesa_max_texture_levels(GLcontext *ctx, GLenum target); - - -/*** API entry point functions ***/ - - -extern void -_mesa_TexImage1D( GLenum target, GLint level, GLint internalformat, - GLsizei width, GLint border, - GLenum format, GLenum type, const GLvoid *pixels ); - - -extern void -_mesa_TexImage2D( GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, const GLvoid *pixels ); - - -extern void -_mesa_TexImage3D( GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLsizei depth, GLint border, - GLenum format, GLenum type, const GLvoid *pixels ); - - -extern void -_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ); - - -extern void -_mesa_GetTexImage( GLenum target, GLint level, - GLenum format, GLenum type, GLvoid *pixels ); - - -extern void -_mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset, - GLsizei width, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -extern void -_mesa_TexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -extern void -_mesa_TexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -extern void -_mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLint border ); - - -extern void -_mesa_CopyTexImage2D( GLenum target, GLint level, - GLenum internalformat, GLint x, GLint y, - GLsizei width, GLsizei height, GLint border ); - - -extern void -_mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, - GLint x, GLint y, GLsizei width ); - - -extern void -_mesa_CopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height ); - - -extern void -_mesa_CopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, GLsizei height ); - - - -extern void -_mesa_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data); - -extern void -_mesa_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data); - -extern void -_mesa_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data); - -#ifdef VMS -#define _mesa_CompressedTexSubImage1DARB _mesa_CompressedTexSubImage1DAR -#define _mesa_CompressedTexSubImage2DARB _mesa_CompressedTexSubImage2DAR -#define _mesa_CompressedTexSubImage3DARB _mesa_CompressedTexSubImage3DAR -#endif -extern void -_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data); - -extern void -_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img); - - -#endif Index: xc/extras/Mesa/src/texobj.c diff -u xc/extras/Mesa/src/texobj.c:1.17 xc/extras/Mesa/src/texobj.c:removed --- xc/extras/Mesa/src/texobj.c:1.17 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texobj.c Wed Mar 16 21:00:33 2005 @@ -1,874 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "colortab.h" -#include "context.h" -#include "enums.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "teximage.h" -#include "texstate.h" -#include "texobj.h" -#include "mtypes.h" - - -/* - * Allocate a new texture object and put it into the hash table. - * If name>0 then also insert the new texture object into the hash - * table. - * Input: shared - the shared GL state structure to contain the texture object - * name - integer name for the texture object - * target - either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, - * GL_TEXTURE_CUBE_MAP_ARB or GL_TEXTURE_RECTANGLE_NV - * zero is ok for the sake of GenTextures() - * Return: pointer to new texture object - */ -struct gl_texture_object * -_mesa_alloc_texture_object( struct gl_shared_state *shared, - GLuint name, GLenum target ) -{ - struct gl_texture_object *obj; - - ASSERT(target == 0 || - target == GL_TEXTURE_1D || - target == GL_TEXTURE_2D || - target == GL_TEXTURE_3D || - target == GL_TEXTURE_CUBE_MAP_ARB || - target == GL_TEXTURE_RECTANGLE_NV); - - obj = CALLOC_STRUCT(gl_texture_object); - - if (obj) { - /* init the non-zero fields */ - _glthread_INIT_MUTEX(obj->Mutex); - obj->RefCount = 1; - obj->Name = name; - obj->Target = target; - obj->Priority = 1.0F; - if (target == GL_TEXTURE_RECTANGLE_NV) { - obj->WrapS = GL_CLAMP_TO_EDGE; - obj->WrapT = GL_CLAMP_TO_EDGE; - obj->WrapR = GL_CLAMP_TO_EDGE; - obj->MinFilter = GL_LINEAR; - } - else { - obj->WrapS = GL_REPEAT; - obj->WrapT = GL_REPEAT; - obj->WrapR = GL_REPEAT; - obj->MinFilter = GL_NEAREST_MIPMAP_LINEAR; - } - obj->MagFilter = GL_LINEAR; - obj->MinLod = -1000.0; - obj->MaxLod = 1000.0; - obj->BaseLevel = 0; - obj->LodBias = 0.0; /* OpenGL 1.4 */ - obj->MaxLevel = 1000; - obj->MaxAnisotropy = 1.0; - obj->CompareFlag = GL_FALSE; /* SGIX_shadow */ - obj->CompareOperator = GL_TEXTURE_LEQUAL_R_SGIX; /* SGIX_shadow */ - obj->CompareMode = GL_NONE; /* ARB_shadow */ - obj->CompareFunc = GL_LEQUAL; /* ARB_shadow */ - obj->DepthMode = GL_LUMINANCE; /* ARB_depth_texture */ - obj->ShadowAmbient = 0.0F; /* ARB/SGIX_shadow_ambient */ - _mesa_init_colortable(&obj->Palette); - - /* insert into linked list */ - if (shared) { - _glthread_LOCK_MUTEX(shared->Mutex); - obj->Next = shared->TexObjectList; - shared->TexObjectList = obj; - _glthread_UNLOCK_MUTEX(shared->Mutex); - } - - if (name > 0) { - /* insert into hash table */ - _mesa_HashInsert(shared->TexObjects, name, obj); - } - } - return obj; -} - - -/* - * Deallocate a texture object struct and remove it from the given - * shared GL state. - * Input: shared - the shared GL state to which the object belongs - * t - the texture object to delete - */ -void _mesa_free_texture_object( struct gl_shared_state *shared, - struct gl_texture_object *t ) -{ - struct gl_texture_object *tprev, *tcurr; - - assert(t); - - /* unlink t from the linked list */ - if (shared) { - _glthread_LOCK_MUTEX(shared->Mutex); - tprev = NULL; - tcurr = shared->TexObjectList; - while (tcurr) { - if (tcurr==t) { - if (tprev) { - tprev->Next = t->Next; - } - else { - shared->TexObjectList = t->Next; - } - break; - } - tprev = tcurr; - tcurr = tcurr->Next; - } - _glthread_UNLOCK_MUTEX(shared->Mutex); - } - - if (t->Name) { - /* remove from hash table */ - _mesa_HashRemove(shared->TexObjects, t->Name); - } - - _mesa_free_colortable_data(&t->Palette); - - /* free the texture images */ - { - GLuint i; - for (i=0;iImage[i]) { - _mesa_free_texture_image( t->Image[i] ); - } - } - } - - /* destroy the mutex -- it may have allocated memory (eg on bsd) */ - _glthread_DESTROY_MUTEX(t->Mutex); - - /* free this object */ - FREE( t ); -} - - -/* - * Copy texture object state from one texture object to another. - */ -void -_mesa_copy_texture_object( struct gl_texture_object *dest, - const struct gl_texture_object *src ) -{ - dest->Name = src->Name; - dest->Priority = src->Priority; - dest->BorderColor[0] = src->BorderColor[0]; - dest->BorderColor[1] = src->BorderColor[1]; - dest->BorderColor[2] = src->BorderColor[2]; - dest->BorderColor[3] = src->BorderColor[3]; - dest->WrapS = src->WrapS; - dest->WrapT = src->WrapT; - dest->WrapR = src->WrapR; - dest->MinFilter = src->MinFilter; - dest->MagFilter = src->MagFilter; - dest->MinLod = src->MinLod; - dest->MaxLod = src->MaxLod; - dest->LodBias = src->LodBias; - dest->BaseLevel = src->BaseLevel; - dest->MaxLevel = src->MaxLevel; - dest->MaxAnisotropy = src->MaxAnisotropy; - dest->CompareFlag = src->CompareFlag; - dest->CompareOperator = src->CompareOperator; - dest->ShadowAmbient = src->ShadowAmbient; - dest->CompareMode = src->CompareMode; - dest->CompareFunc = src->CompareFunc; - dest->DepthMode = src->DepthMode; - dest->_MaxLevel = src->_MaxLevel; - dest->_MaxLambda = src->_MaxLambda; - dest->GenerateMipmap = src->GenerateMipmap; - dest->Palette = src->Palette; - dest->Complete = src->Complete; -} - - -/* - * Report why a texture object is incomplete. (for debug only) - */ -#if 0 -static void -incomplete(const struct gl_texture_object *t, const char *why) -{ - _mesa_printf("Texture Obj %d incomplete because: %s\n", t->Name, why); -} -#else -#define incomplete(a, b) -#endif - - -/* - * Examine a texture object to determine if it is complete. - * The t->Complete flag will be set to GL_TRUE or GL_FALSE accordingly. - */ -void -_mesa_test_texobj_completeness( const GLcontext *ctx, - struct gl_texture_object *t ) -{ - const GLint baseLevel = t->BaseLevel; - GLint maxLog2 = 0, maxLevels = 0; - - t->Complete = GL_TRUE; /* be optimistic */ - - /* Always need the base level image */ - if (!t->Image[baseLevel]) { - incomplete(t, "Image[baseLevel] == NULL"); - t->Complete = GL_FALSE; - return; - } - - /* Compute _MaxLevel */ - if (t->Target == GL_TEXTURE_1D) { - maxLog2 = t->Image[baseLevel]->WidthLog2; - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (t->Target == GL_TEXTURE_2D) { - maxLog2 = MAX2(t->Image[baseLevel]->WidthLog2, - t->Image[baseLevel]->HeightLog2); - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (t->Target == GL_TEXTURE_3D) { - GLint max = MAX2(t->Image[baseLevel]->WidthLog2, - t->Image[baseLevel]->HeightLog2); - maxLog2 = MAX2(max, (GLint)(t->Image[baseLevel]->DepthLog2)); - maxLevels = ctx->Const.Max3DTextureLevels; - } - else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - maxLog2 = MAX2(t->Image[baseLevel]->WidthLog2, - t->Image[baseLevel]->HeightLog2); - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV) { - maxLog2 = 0; /* not applicable */ - maxLevels = 1; /* no mipmapping */ - } - else { - _mesa_problem(ctx, "Bad t->Target in _mesa_test_texobj_completeness"); - return; - } - - ASSERT(maxLevels > 0); - - t->_MaxLevel = baseLevel + maxLog2; - t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel); - t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1); - - /* Compute _MaxLambda = q - b (see the 1.2 spec) used during mipmapping */ - t->_MaxLambda = (GLfloat) (t->_MaxLevel - t->BaseLevel); - - if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - /* make sure that all six cube map level 0 images are the same size */ - const GLuint w = t->Image[baseLevel]->Width2; - const GLuint h = t->Image[baseLevel]->Height2; - if (!t->NegX[baseLevel] || - t->NegX[baseLevel]->Width2 != w || - t->NegX[baseLevel]->Height2 != h || - !t->PosY[baseLevel] || - t->PosY[baseLevel]->Width2 != w || - t->PosY[baseLevel]->Height2 != h || - !t->NegY[baseLevel] || - t->NegY[baseLevel]->Width2 != w || - t->NegY[baseLevel]->Height2 != h || - !t->PosZ[baseLevel] || - t->PosZ[baseLevel]->Width2 != w || - t->PosZ[baseLevel]->Height2 != h || - !t->NegZ[baseLevel] || - t->NegZ[baseLevel]->Width2 != w || - t->NegZ[baseLevel]->Height2 != h) { - t->Complete = GL_FALSE; - incomplete(t, "Non-quare cubemap image"); - return; - } - } - - if (t->MinFilter != GL_NEAREST && t->MinFilter != GL_LINEAR) { - /* - * Mipmapping: determine if we have a complete set of mipmaps - */ - GLint i; - GLint minLevel = baseLevel; - GLint maxLevel = t->_MaxLevel; - - if (minLevel > maxLevel) { - t->Complete = GL_FALSE; - incomplete(t, "minLevel > maxLevel"); - return; - } - - /* Test dimension-independent attributes */ - for (i = minLevel; i <= maxLevel; i++) { - if (t->Image[i]) { - if (t->Image[i]->TexFormat != t->Image[baseLevel]->TexFormat) { - t->Complete = GL_FALSE; - incomplete(t, "Format[i] != Format[baseLevel]"); - return; - } - if (t->Image[i]->Border != t->Image[baseLevel]->Border) { - t->Complete = GL_FALSE; - incomplete(t, "Border[i] != Border[baseLevel]"); - return; - } - } - } - - /* Test things which depend on number of texture image dimensions */ - if (t->Target == GL_TEXTURE_1D) { - /* Test 1-D mipmaps */ - GLuint width = t->Image[baseLevel]->Width2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[i]) { - t->Complete = GL_FALSE; - incomplete(t, "1D Image[i] == NULL"); - return; - } - if (t->Image[i]->Width2 != width ) { - t->Complete = GL_FALSE; - incomplete(t, "1D Image[i] bad width"); - return; - } - } - if (width == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if (t->Target == GL_TEXTURE_2D) { - /* Test 2-D mipmaps */ - GLuint width = t->Image[baseLevel]->Width2; - GLuint height = t->Image[baseLevel]->Height2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[i]) { - t->Complete = GL_FALSE; - incomplete(t, "2D Image[i] == NULL"); - return; - } - if (t->Image[i]->Width2 != width) { - t->Complete = GL_FALSE; - incomplete(t, "2D Image[i] bad width"); - return; - } - if (t->Image[i]->Height2 != height) { - t->Complete = GL_FALSE; - incomplete(t, "2D Image[i] bad height"); - return; - } - if (width==1 && height==1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - } - else if (t->Target == GL_TEXTURE_3D) { - /* Test 3-D mipmaps */ - GLuint width = t->Image[baseLevel]->Width2; - GLuint height = t->Image[baseLevel]->Height2; - GLuint depth = t->Image[baseLevel]->Depth2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (depth > 1) { - depth /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[i]) { - incomplete(t, "3D Image[i] == NULL"); - t->Complete = GL_FALSE; - return; - } - if (t->Image[i]->Format == GL_DEPTH_COMPONENT) { - t->Complete = GL_FALSE; - incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex"); - return; - } - if (t->Image[i]->Width2 != width) { - t->Complete = GL_FALSE; - incomplete(t, "3D Image[i] bad width"); - return; - } - if (t->Image[i]->Height2 != height) { - t->Complete = GL_FALSE; - incomplete(t, "3D Image[i] bad height"); - return; - } - if (t->Image[i]->Depth2 != depth) { - t->Complete = GL_FALSE; - incomplete(t, "3D Image[i] bad depth"); - return; - } - } - if (width == 1 && height == 1 && depth == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - /* make sure 6 cube faces are consistant */ - GLuint width = t->Image[baseLevel]->Width2; - GLuint height = t->Image[baseLevel]->Height2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (i >= minLevel && i <= maxLevel) { - /* check that we have images defined */ - if (!t->Image[i] || !t->NegX[i] || - !t->PosY[i] || !t->NegY[i] || - !t->PosZ[i] || !t->NegZ[i]) { - t->Complete = GL_FALSE; - incomplete(t, "CubeMap Image[i] == NULL"); - return; - } - /* Don't support GL_DEPTH_COMPONENT for cube maps */ - if (t->Image[i]->Format == GL_DEPTH_COMPONENT) { - t->Complete = GL_FALSE; - incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex"); - return; - } - /* check that all six images have same size */ - if (t->NegX[i]->Width2!=width || t->NegX[i]->Height2!=height || - t->PosY[i]->Width2!=width || t->PosY[i]->Height2!=height || - t->NegY[i]->Width2!=width || t->NegY[i]->Height2!=height || - t->PosZ[i]->Width2!=width || t->PosZ[i]->Height2!=height || - t->NegZ[i]->Width2!=width || t->NegZ[i]->Height2!=height) { - t->Complete = GL_FALSE; - incomplete(t, "CubeMap Image[i] bad size"); - return; - } - } - if (width == 1 && height == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV) { - /* XXX special checking? */ - - } - else { - /* Target = ??? */ - _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n"); - } - } -} - - -_glthread_DECLARE_STATIC_MUTEX(GenTexturesLock); - - -/* - * Execute glGenTextures - */ -void -_mesa_GenTextures( GLsizei n, GLuint *texName ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint first; - GLint i; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" ); - return; - } - - if (!texName) - return; - - /* - * This must be atomic (generation and allocation of texture IDs) - */ - _glthread_LOCK_MUTEX(GenTexturesLock); - - first = _mesa_HashFindFreeKeyBlock(ctx->Shared->TexObjects, n); - - /* Allocate new, empty texture objects and return the IDs */ - for (i=0;iShared, name, target); - if (!texObj) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTextures"); - break; - } - texName[i] = name; - } - - _glthread_UNLOCK_MUTEX(GenTexturesLock); -} - - - -/* - * Execute glDeleteTextures - */ -void -_mesa_DeleteTextures( GLsizei n, const GLuint *texName) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */ - - if (!texName) - return; - - for (i=0;i 0) { - struct gl_texture_object *delObj = (struct gl_texture_object *) - _mesa_HashLookup(ctx->Shared->TexObjects, texName[i]); - if (delObj) { - /* First check if this texture is currently bound. - * If so, unbind it and decrement the reference count. - */ - GLuint u; - for (u = 0; u < MAX_TEXTURE_UNITS; u++) { - struct gl_texture_unit *unit = &ctx->Texture.Unit[u]; - if (delObj == unit->Current1D) { - unit->Current1D = ctx->Shared->Default1D; - ctx->Shared->Default1D->RefCount++; - delObj->RefCount--; - if (delObj == unit->_Current) - unit->_Current = unit->Current1D; - } - else if (delObj == unit->Current2D) { - unit->Current2D = ctx->Shared->Default2D; - ctx->Shared->Default2D->RefCount++; - delObj->RefCount--; - if (delObj == unit->_Current) - unit->_Current = unit->Current2D; - } - else if (delObj == unit->Current3D) { - unit->Current3D = ctx->Shared->Default3D; - ctx->Shared->Default3D->RefCount++; - delObj->RefCount--; - if (delObj == unit->_Current) - unit->_Current = unit->Current3D; - } - else if (delObj == unit->CurrentCubeMap) { - unit->CurrentCubeMap = ctx->Shared->DefaultCubeMap; - ctx->Shared->DefaultCubeMap->RefCount++; - delObj->RefCount--; - if (delObj == unit->_Current) - unit->_Current = unit->CurrentCubeMap; - } - else if (delObj == unit->CurrentRect) { - unit->CurrentRect = ctx->Shared->DefaultRect; - ctx->Shared->DefaultRect->RefCount++; - delObj->RefCount--; - if (delObj == unit->_Current) - unit->_Current = unit->CurrentRect; - } - } - ctx->NewState |= _NEW_TEXTURE; - - /* Decrement reference count and delete if zero */ - delObj->RefCount--; - ASSERT(delObj->RefCount >= 0); - - if (delObj->RefCount == 0) { - ASSERT(delObj->Name != 0); - if (ctx->Driver.DeleteTexture) - (*ctx->Driver.DeleteTexture)( ctx, delObj ); - _mesa_free_texture_object(ctx->Shared, delObj); - } - } - } - } -} - - - -/* - * Execute glBindTexture - */ -void -_mesa_BindTexture( GLenum target, GLuint texName ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - struct gl_texture_object *oldTexObj; - struct gl_texture_object *newTexObj = 0; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glBindTexture %s %d\n", - _mesa_lookup_enum_by_nr(target), (GLint) texName); - - switch (target) { - case GL_TEXTURE_1D: - oldTexObj = texUnit->Current1D; - break; - case GL_TEXTURE_2D: - oldTexObj = texUnit->Current2D; - break; - case GL_TEXTURE_3D: - oldTexObj = texUnit->Current3D; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" ); - return; - } - oldTexObj = texUnit->CurrentCubeMap; - break; - case GL_TEXTURE_RECTANGLE_NV: - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" ); - return; - } - oldTexObj = texUnit->CurrentRect; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" ); - return; - } - - if (oldTexObj->Name == texName) - return; /* rebinding the same texture- no change */ - - /* - * Get pointer to new texture object (newTexObj) - */ - if (texName == 0) { - /* newTexObj = a default texture object */ - switch (target) { - case GL_TEXTURE_1D: - newTexObj = ctx->Shared->Default1D; - break; - case GL_TEXTURE_2D: - newTexObj = ctx->Shared->Default2D; - break; - case GL_TEXTURE_3D: - newTexObj = ctx->Shared->Default3D; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - newTexObj = ctx->Shared->DefaultCubeMap; - break; - case GL_TEXTURE_RECTANGLE_NV: - newTexObj = ctx->Shared->DefaultRect; - break; - default: - ; /* Bad targets are caught above */ - } - } - else { - /* non-default texture object */ - const struct _mesa_HashTable *hash = ctx->Shared->TexObjects; - newTexObj = (struct gl_texture_object *) _mesa_HashLookup(hash, texName); - if (newTexObj) { - /* error checking */ - if (newTexObj->Target != 0 && newTexObj->Target != target) { - /* the named texture object's dimensions don't match the target */ - _mesa_error( ctx, GL_INVALID_OPERATION, - "glBindTexture(wrong dimensionality)" ); - return; - } - if (newTexObj->Target == 0 && target == GL_TEXTURE_RECTANGLE_NV) { - /* have to init wrap and filter state here - kind of klunky */ - newTexObj->WrapS = GL_CLAMP_TO_EDGE; - newTexObj->WrapT = GL_CLAMP_TO_EDGE; - newTexObj->WrapR = GL_CLAMP_TO_EDGE; - newTexObj->MinFilter = GL_LINEAR; - } - } - else { - /* if this is a new texture id, allocate a texture object now */ - newTexObj = _mesa_alloc_texture_object( ctx->Shared, texName, - target); - if (!newTexObj) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture"); - return; - } - } - newTexObj->Target = target; - } - - newTexObj->RefCount++; - - /* do the actual binding, but first flush outstanding vertices: - */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - - switch (target) { - case GL_TEXTURE_1D: - texUnit->Current1D = newTexObj; - break; - case GL_TEXTURE_2D: - texUnit->Current2D = newTexObj; - break; - case GL_TEXTURE_3D: - texUnit->Current3D = newTexObj; - break; - case GL_TEXTURE_CUBE_MAP_ARB: - texUnit->CurrentCubeMap = newTexObj; - break; - case GL_TEXTURE_RECTANGLE_NV: - texUnit->CurrentRect = newTexObj; - break; - default: - _mesa_problem(ctx, "bad target in BindTexture"); - return; - } - - /* Pass BindTexture call to device driver */ - if (ctx->Driver.BindTexture) - (*ctx->Driver.BindTexture)( ctx, target, newTexObj ); - - oldTexObj->RefCount--; - assert(oldTexObj->RefCount >= 0); - if (oldTexObj->RefCount == 0) { - assert(oldTexObj->Name != 0); - if (ctx->Driver.DeleteTexture) { - (*ctx->Driver.DeleteTexture)( ctx, oldTexObj ); - } - _mesa_free_texture_object(ctx->Shared, oldTexObj); - } -} - - - -/* - * Execute glPrioritizeTextures - */ -void -_mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, - const GLclampf *priorities ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (n < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" ); - return; - } - - if (!priorities) - return; - - for (i = 0; i < n; i++) { - if (texName[i] > 0) { - struct gl_texture_object *t = (struct gl_texture_object *) - _mesa_HashLookup(ctx->Shared->TexObjects, texName[i]); - if (t) { - t->Priority = CLAMP( priorities[i], 0.0F, 1.0F ); - if (ctx->Driver.PrioritizeTexture) - ctx->Driver.PrioritizeTexture( ctx, t, t->Priority ); - } - } - } - - ctx->NewState |= _NEW_TEXTURE; -} - - - -/* - * Execute glAreTexturesResident - */ -GLboolean -_mesa_AreTexturesResident(GLsizei n, const GLuint *texName, - GLboolean *residences) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean allResident = GL_TRUE; - GLint i, j; - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)"); - return GL_FALSE; - } - - if (!texName || !residences) - return GL_FALSE; - - for (i = 0; i < n; i++) { - struct gl_texture_object *t; - if (texName[i] == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident"); - return GL_FALSE; - } - t = (struct gl_texture_object *) - _mesa_HashLookup(ctx->Shared->TexObjects, texName[i]); - if (!t) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident"); - return GL_FALSE; - } - if (!ctx->Driver.IsTextureResident || - ctx->Driver.IsTextureResident(ctx, t)) { - /* The texture is resident */ - if (!allResident) - residences[i] = GL_TRUE; - } - else { - /* The texture is not resident */ - if (allResident) { - allResident = GL_FALSE; - for (j = 0; j < i; j++) - residences[j] = GL_TRUE; - } - residences[i] = GL_FALSE; - } - } - - return allResident; -} - - - -/* - * Execute glIsTexture - */ -GLboolean -_mesa_IsTexture( GLuint texture ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - return texture > 0 && _mesa_HashLookup(ctx->Shared->TexObjects, texture); -} Index: xc/extras/Mesa/src/texobj.h diff -u xc/extras/Mesa/src/texobj.h:1.8 xc/extras/Mesa/src/texobj.h:removed --- xc/extras/Mesa/src/texobj.h:1.8 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texobj.h Wed Mar 16 21:00:33 2005 @@ -1,89 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef TEXTOBJ_H -#define TEXTOBJ_H - - -#include "mtypes.h" - - - -/* - * Internal functions - */ - -extern struct gl_texture_object * -_mesa_alloc_texture_object( struct gl_shared_state *shared, GLuint name, - GLenum target ); - - -extern void -_mesa_free_texture_object( struct gl_shared_state *shared, - struct gl_texture_object *t ); - - -extern void -_mesa_copy_texture_object( struct gl_texture_object *dest, - const struct gl_texture_object *src ); - - -extern void -_mesa_test_texobj_completeness( const GLcontext *ctx, - struct gl_texture_object *t ); - - -/* - * API functions - */ - -extern void -_mesa_GenTextures( GLsizei n, GLuint *textures ); - - -extern void -_mesa_DeleteTextures( GLsizei n, const GLuint *textures ); - - -extern void -_mesa_BindTexture( GLenum target, GLuint texture ); - - -extern void -_mesa_PrioritizeTextures( GLsizei n, const GLuint *textures, - const GLclampf *priorities ); - - -extern GLboolean -_mesa_AreTexturesResident( GLsizei n, const GLuint *textures, - GLboolean *residences ); - - -extern GLboolean -_mesa_IsTexture( GLuint texture ); - - -#endif Index: xc/extras/Mesa/src/texstate.c diff -u xc/extras/Mesa/src/texstate.c:1.20 xc/extras/Mesa/src/texstate.c:removed --- xc/extras/Mesa/src/texstate.c:1.20 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texstate.c Wed Mar 16 21:00:34 2005 @@ -1,2616 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "enums.h" -#include "extensions.h" -#include "macros.h" -#include "texobj.h" -#include "teximage.h" -#include "texstate.h" -#include "mtypes.h" -#include "math/m_xform.h" -#include "math/m_matrix.h" - - - -#ifdef SPECIALCAST -/* Needed for an Amiga compiler */ -#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X)) -#define ENUM_TO_DOUBLE(X) ((GLdouble)(GLint)(X)) -#else -/* all other compilers */ -#define ENUM_TO_FLOAT(X) ((GLfloat)(X)) -#define ENUM_TO_DOUBLE(X) ((GLdouble)(X)) -#endif - - - -void -_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) -{ - GLuint i; - - ASSERT(src); - ASSERT(dst); - - dst->Texture.CurrentUnit = src->Texture.CurrentUnit; - dst->Texture._GenFlags = src->Texture._GenFlags; - dst->Texture._TexGenEnabled = src->Texture._TexGenEnabled; - dst->Texture._TexMatEnabled = src->Texture._TexMatEnabled; - dst->Texture.SharedPalette = src->Texture.SharedPalette; - - /* per-unit state */ - for (i = 0; i < src->Const.MaxTextureUnits; i++) { - dst->Texture.Unit[i].Enabled = src->Texture.Unit[i].Enabled; - dst->Texture.Unit[i].EnvMode = src->Texture.Unit[i].EnvMode; - COPY_4V(dst->Texture.Unit[i].EnvColor, src->Texture.Unit[i].EnvColor); - dst->Texture.Unit[i].TexGenEnabled = src->Texture.Unit[i].TexGenEnabled; - dst->Texture.Unit[i].GenModeS = src->Texture.Unit[i].GenModeS; - dst->Texture.Unit[i].GenModeT = src->Texture.Unit[i].GenModeT; - dst->Texture.Unit[i].GenModeR = src->Texture.Unit[i].GenModeR; - dst->Texture.Unit[i].GenModeQ = src->Texture.Unit[i].GenModeQ; - dst->Texture.Unit[i]._GenBitS = src->Texture.Unit[i]._GenBitS; - dst->Texture.Unit[i]._GenBitT = src->Texture.Unit[i]._GenBitT; - dst->Texture.Unit[i]._GenBitR = src->Texture.Unit[i]._GenBitR; - dst->Texture.Unit[i]._GenBitQ = src->Texture.Unit[i]._GenBitQ; - dst->Texture.Unit[i]._GenFlags = src->Texture.Unit[i]._GenFlags; - COPY_4V(dst->Texture.Unit[i].ObjectPlaneS, src->Texture.Unit[i].ObjectPlaneS); - COPY_4V(dst->Texture.Unit[i].ObjectPlaneT, src->Texture.Unit[i].ObjectPlaneT); - COPY_4V(dst->Texture.Unit[i].ObjectPlaneR, src->Texture.Unit[i].ObjectPlaneR); - COPY_4V(dst->Texture.Unit[i].ObjectPlaneQ, src->Texture.Unit[i].ObjectPlaneQ); - COPY_4V(dst->Texture.Unit[i].EyePlaneS, src->Texture.Unit[i].EyePlaneS); - COPY_4V(dst->Texture.Unit[i].EyePlaneT, src->Texture.Unit[i].EyePlaneT); - COPY_4V(dst->Texture.Unit[i].EyePlaneR, src->Texture.Unit[i].EyePlaneR); - COPY_4V(dst->Texture.Unit[i].EyePlaneQ, src->Texture.Unit[i].EyePlaneQ); - dst->Texture.Unit[i].LodBias = src->Texture.Unit[i].LodBias; - - /* GL_EXT_texture_env_combine */ - dst->Texture.Unit[i].CombineModeRGB = src->Texture.Unit[i].CombineModeRGB; - dst->Texture.Unit[i].CombineModeA = src->Texture.Unit[i].CombineModeA; - COPY_3V(dst->Texture.Unit[i].CombineSourceRGB, src->Texture.Unit[i].CombineSourceRGB); - COPY_3V(dst->Texture.Unit[i].CombineSourceA, src->Texture.Unit[i].CombineSourceA); - COPY_3V(dst->Texture.Unit[i].CombineOperandRGB, src->Texture.Unit[i].CombineOperandRGB); - COPY_3V(dst->Texture.Unit[i].CombineOperandA, src->Texture.Unit[i].CombineOperandA); - dst->Texture.Unit[i].CombineScaleShiftRGB = src->Texture.Unit[i].CombineScaleShiftRGB; - dst->Texture.Unit[i].CombineScaleShiftA = src->Texture.Unit[i].CombineScaleShiftA; - - /* texture object state */ - _mesa_copy_texture_object(dst->Texture.Unit[i].Current1D, - src->Texture.Unit[i].Current1D); - _mesa_copy_texture_object(dst->Texture.Unit[i].Current2D, - src->Texture.Unit[i].Current2D); - _mesa_copy_texture_object(dst->Texture.Unit[i].Current3D, - src->Texture.Unit[i].Current3D); - _mesa_copy_texture_object(dst->Texture.Unit[i].CurrentCubeMap, - src->Texture.Unit[i].CurrentCubeMap); - _mesa_copy_texture_object(dst->Texture.Unit[i].CurrentRect, - src->Texture.Unit[i].CurrentRect); - } -} - - -/* - * For debugging - */ -void -_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ) -{ - const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; - _mesa_printf("Texture Unit %d\n", unit); - _mesa_printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); - _mesa_printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeRGB)); - _mesa_printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineModeA)); - _mesa_printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[0])); - _mesa_printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[1])); - _mesa_printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceRGB[2])); - _mesa_printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[0])); - _mesa_printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[1])); - _mesa_printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineSourceA[2])); - _mesa_printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[0])); - _mesa_printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[1])); - _mesa_printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandRGB[2])); - _mesa_printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[0])); - _mesa_printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[1])); - _mesa_printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->CombineOperandA[2])); - _mesa_printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->CombineScaleShiftRGB); - _mesa_printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->CombineScaleShiftA); - _mesa_printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]); -} - - - -/**********************************************************************/ -/* Texture Environment */ -/**********************************************************************/ - - -void -_mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - -#define TE_ERROR(errCode, msg, value) \ - _mesa_error(ctx, errCode, msg, _mesa_lookup_enum_by_nr(value)); - - if (target == GL_TEXTURE_ENV) { - switch (pname) { - case GL_TEXTURE_ENV_MODE: - { - const GLenum mode = (GLenum) (GLint) *param; - if (mode == GL_MODULATE || - mode == GL_BLEND || - mode == GL_DECAL || - mode == GL_REPLACE || - (mode == GL_ADD && ctx->Extensions.EXT_texture_env_add) || - (mode == GL_COMBINE && - (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine))) { - /* legal */ - if (texUnit->EnvMode == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->EnvMode = mode; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - } - break; - case GL_TEXTURE_ENV_COLOR: - { - GLfloat tmp[4]; - tmp[0] = CLAMP( param[0], 0.0F, 1.0F ); - tmp[1] = CLAMP( param[1], 0.0F, 1.0F ); - tmp[2] = CLAMP( param[2], 0.0F, 1.0F ); - tmp[3] = CLAMP( param[3], 0.0F, 1.0F ); - if (TEST_EQ_4V(tmp, texUnit->EnvColor)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EnvColor, tmp); - } - break; - case GL_COMBINE_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum mode = (GLenum) (GLint) *param; - switch (mode) { - case GL_REPLACE: - case GL_MODULATE: - case GL_ADD: - case GL_ADD_SIGNED: - case GL_INTERPOLATE: - /* OK */ - break; - case GL_SUBTRACT: - if (!ctx->Extensions.ARB_texture_env_combine) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - case GL_DOT3_RGB_EXT: - case GL_DOT3_RGBA_EXT: - if (!ctx->Extensions.EXT_texture_env_dot3) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - case GL_DOT3_RGB: - case GL_DOT3_RGBA: - if (!ctx->Extensions.ARB_texture_env_dot3) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - case GL_MODULATE_ADD_ATI: - case GL_MODULATE_SIGNED_ADD_ATI: - case GL_MODULATE_SUBTRACT_ATI: - if (!ctx->Extensions.ATI_texture_env_combine3) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - default: - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - if (texUnit->CombineModeRGB == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineModeRGB = mode; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_COMBINE_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum mode = (GLenum) (GLint) *param; - switch (mode) { - case GL_REPLACE: - case GL_MODULATE: - case GL_ADD: - case GL_ADD_SIGNED: - case GL_INTERPOLATE: - /* OK */ - break; - case GL_SUBTRACT: - if (!ctx->Extensions.ARB_texture_env_combine) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - case GL_MODULATE_ADD_ATI: - case GL_MODULATE_SIGNED_ADD_ATI: - case GL_MODULATE_SUBTRACT_ATI: - if (!ctx->Extensions.ATI_texture_env_combine3) { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - break; - default: - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", mode); - return; - } - - if (texUnit->CombineModeA == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineModeA = mode; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum source = (GLenum) (GLint) *param; - const GLuint s = pname - GL_SOURCE0_RGB; - if (source == GL_TEXTURE || - source == GL_CONSTANT || - source == GL_PRIMARY_COLOR || - source == GL_PREVIOUS || - (ctx->Extensions.ARB_texture_env_crossbar && - source >= GL_TEXTURE0 && - source < GL_TEXTURE0 + ctx->Const.MaxTextureUnits) || - (ctx->Extensions.ATI_texture_env_combine3 && - (source == GL_ZERO || source == GL_ONE))) { - /* legal */ - if (texUnit->CombineSourceRGB[s] == source) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineSourceRGB[s] = source; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", source); - return; - } - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum source = (GLenum) (GLint) *param; - const GLuint s = pname - GL_SOURCE0_ALPHA; - if (source == GL_TEXTURE || - source == GL_CONSTANT || - source == GL_PRIMARY_COLOR || - source == GL_PREVIOUS || - (ctx->Extensions.ARB_texture_env_crossbar && - source >= GL_TEXTURE0 && - source < GL_TEXTURE0 + ctx->Const.MaxTextureUnits) || - (ctx->Extensions.ATI_texture_env_combine3 && - (source == GL_ZERO || source == GL_ONE))) { - /* legal */ - if (texUnit->CombineSourceA[s] == source) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineSourceA[s] = source; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", source); - return; - } - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum operand = (GLenum) (GLint) *param; - const GLuint s = pname - GL_OPERAND0_RGB; - switch (operand) { - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - if (texUnit->CombineOperandRGB[s] == operand) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineOperandRGB[s] = operand; - break; - default: - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", operand); - return; - } - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - const GLenum operand = (GLenum) (GLint) *param; - switch (operand) { - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - if (texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA] == - operand) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineOperandA[pname-GL_OPERAND0_ALPHA] = operand; - break; - default: - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(param=%s)", operand); - return; - } - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_RGB_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - GLuint newshift; - if (*param == 1.0) { - newshift = 0; - } - else if (*param == 2.0) { - newshift = 1; - } - else if (*param == 4.0) { - newshift = 2; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, - "glTexEnv(GL_RGB_SCALE not 1, 2 or 4)" ); - return; - } - if (texUnit->CombineScaleShiftRGB == newshift) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineScaleShiftRGB = newshift; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - case GL_ALPHA_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - GLuint newshift; - if (*param == 1.0) { - newshift = 0; - } - else if (*param == 2.0) { - newshift = 1; - } - else if (*param == 4.0) { - newshift = 2; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, - "glTexEnv(GL_ALPHA_SCALE not 1, 2 or 4)" ); - return; - } - if (texUnit->CombineScaleShiftA == newshift) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->CombineScaleShiftA = newshift; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); - return; - } - } - else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) { - /* GL_EXT_texture_lod_bias */ - if (!ctx->Extensions.EXT_texture_lod_bias) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)", target ); - return; - } - if (pname == GL_TEXTURE_LOD_BIAS_EXT) { - if (texUnit->LodBias == param[0]) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->LodBias = param[0]; - } - else { - TE_ERROR(GL_INVALID_ENUM, "glTexEnv(pname=%s)", pname); - return; - } - } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)", target ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - const GLenum value = (GLenum) param[0]; - if (value == GL_TRUE || value == GL_FALSE) { - /* It's kind of weird to set point state via glTexEnv, - * but that's what the spec calls for. - */ - const GLboolean state = (GLboolean) value; - if (ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] == state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = state; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", value); - return; - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname=0x%x)", pname ); - return; - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)",target ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexEnv %s %s %.1f(%s) ...\n", - _mesa_lookup_enum_by_nr(target), - _mesa_lookup_enum_by_nr(pname), - *param, - _mesa_lookup_enum_by_nr((GLenum) (GLint) *param)); - - /* Tell device driver about the new texture environment */ - if (ctx->Driver.TexEnv) { - (*ctx->Driver.TexEnv)( ctx, target, pname, param ); - } -} - - -void -_mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param ) -{ - _mesa_TexEnvfv( target, pname, ¶m ); -} - - - -void -_mesa_TexEnvi( GLenum target, GLenum pname, GLint param ) -{ - GLfloat p[4]; - p[0] = (GLfloat) param; - p[1] = p[2] = p[3] = 0.0; - _mesa_TexEnvfv( target, pname, p ); -} - - -void -_mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ) -{ - GLfloat p[4]; - if (pname == GL_TEXTURE_ENV_COLOR) { - p[0] = INT_TO_FLOAT( param[0] ); - p[1] = INT_TO_FLOAT( param[1] ); - p[2] = INT_TO_FLOAT( param[2] ); - p[3] = INT_TO_FLOAT( param[3] ); - } - else { - p[0] = (GLfloat) param[0]; - p[1] = p[2] = p[3] = 0; /* init to zero, just to be safe */ - } - _mesa_TexEnvfv( target, pname, p ); -} - - -void -_mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_TEXTURE_ENV) { - switch (pname) { - case GL_TEXTURE_ENV_MODE: - *params = ENUM_TO_FLOAT(texUnit->EnvMode); - break; - case GL_TEXTURE_ENV_COLOR: - COPY_4FV( params, texUnit->EnvColor ); - break; - case GL_COMBINE_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineModeRGB; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_COMBINE_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineModeA; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE0_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceRGB[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE1_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceRGB[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceRGB[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE0_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceA[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE1_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceA[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_SOURCE2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineSourceA[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND0_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandRGB[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND1_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandRGB[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandRGB[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND0_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandA[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND1_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandA[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_OPERAND2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLfloat) texUnit->CombineOperandA[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; - case GL_RGB_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - if (texUnit->CombineScaleShiftRGB == 0) - *params = 1.0; - else if (texUnit->CombineScaleShiftRGB == 1) - *params = 2.0; - else - *params = 4.0; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - return; - } - break; - case GL_ALPHA_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - if (texUnit->CombineScaleShiftA == 0) - *params = 1.0; - else if (texUnit->CombineScaleShiftA == 1) - *params = 2.0; - else - *params = 4.0; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); - } - } - else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) { - /* GL_EXT_texture_lod_bias */ - if (!ctx->Extensions.EXT_texture_lod_bias) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); - return; - } - if (pname == GL_TEXTURE_LOD_BIAS_EXT) { - *params = texUnit->LodBias; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); - return; - } - } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - *params = (GLfloat) ctx->Point.CoordReplace[ctx->Texture.CurrentUnit]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); - return; - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); - return; - } -} - - -void -_mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_TEXTURE_ENV) { - switch (pname) { - case GL_TEXTURE_ENV_MODE: - *params = (GLint) texUnit->EnvMode; - break; - case GL_TEXTURE_ENV_COLOR: - params[0] = FLOAT_TO_INT( texUnit->EnvColor[0] ); - params[1] = FLOAT_TO_INT( texUnit->EnvColor[1] ); - params[2] = FLOAT_TO_INT( texUnit->EnvColor[2] ); - params[3] = FLOAT_TO_INT( texUnit->EnvColor[3] ); - break; - case GL_COMBINE_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineModeRGB; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_COMBINE_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineModeA; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE0_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceRGB[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE1_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceRGB[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceRGB[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE0_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceA[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE1_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceA[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_SOURCE2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineSourceA[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND0_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandRGB[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND1_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandRGB[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND2_RGB: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandRGB[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND0_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandA[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND1_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandA[1]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_OPERAND2_ALPHA: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - *params = (GLint) texUnit->CombineOperandA[2]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - } - break; - case GL_RGB_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - if (texUnit->CombineScaleShiftRGB == 0) - *params = 1; - else if (texUnit->CombineScaleShiftRGB == 1) - *params = 2; - else - *params = 4; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - return; - } - break; - case GL_ALPHA_SCALE: - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - if (texUnit->CombineScaleShiftA == 0) - *params = 1; - else if (texUnit->CombineScaleShiftA == 1) - *params = 2; - else - *params = 4; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)"); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); - } - } - else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) { - /* GL_EXT_texture_lod_bias */ - if (!ctx->Extensions.EXT_texture_lod_bias) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); - return; - } - if (pname == GL_TEXTURE_LOD_BIAS_EXT) { - *params = (GLint) texUnit->LodBias; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); - return; - } - } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - *params = (GLint) ctx->Point.CoordReplace[ctx->Texture.CurrentUnit]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); - return; - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); - return; - } -} - - - - -/**********************************************************************/ -/* Texture Parameters */ -/**********************************************************************/ - - -void -_mesa_TexParameterf( GLenum target, GLenum pname, GLfloat param ) -{ - _mesa_TexParameterfv(target, pname, ¶m); -} - - -void -_mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - GLenum eparam = (GLenum) (GLint) params[0]; - struct gl_texture_object *texObj; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexParameter %s %s %.1f(%s)...\n", - _mesa_lookup_enum_by_nr(target), - _mesa_lookup_enum_by_nr(pname), - *params, - _mesa_lookup_enum_by_nr(eparam)); - - - switch (target) { - case GL_TEXTURE_1D: - texObj = texUnit->Current1D; - break; - case GL_TEXTURE_2D: - texObj = texUnit->Current2D; - break; - case GL_TEXTURE_3D: - texObj = texUnit->Current3D; - break; - case GL_TEXTURE_CUBE_MAP: - if (!ctx->Extensions.ARB_texture_cube_map) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" ); - return; - } - texObj = texUnit->CurrentCubeMap; - break; - case GL_TEXTURE_RECTANGLE_NV: - if (!ctx->Extensions.NV_texture_rectangle) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" ); - return; - } - texObj = texUnit->CurrentRect; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" ); - return; - } - - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - /* A small optimization */ - if (texObj->MinFilter == eparam) - return; - if (eparam==GL_NEAREST || eparam==GL_LINEAR) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MinFilter = eparam; - } - else if ((eparam==GL_NEAREST_MIPMAP_NEAREST || - eparam==GL_LINEAR_MIPMAP_NEAREST || - eparam==GL_NEAREST_MIPMAP_LINEAR || - eparam==GL_LINEAR_MIPMAP_LINEAR) && - texObj->Target != GL_TEXTURE_RECTANGLE_NV) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MinFilter = eparam; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - break; - case GL_TEXTURE_MAG_FILTER: - /* A small optimization */ - if (texObj->MagFilter == eparam) - return; - - if (eparam==GL_NEAREST || eparam==GL_LINEAR) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MagFilter = eparam; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - break; - case GL_TEXTURE_WRAP_S: - if (texObj->WrapS == eparam) - return; - if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE || - (eparam == GL_CLAMP_TO_BORDER && - ctx->Extensions.ARB_texture_border_clamp)) { - /* any texture target */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapS = eparam; - } - else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV && - (eparam == GL_REPEAT || - (eparam == GL_MIRRORED_REPEAT && - ctx->Extensions.ARB_texture_mirrored_repeat) || - (eparam == GL_MIRROR_CLAMP_ATI && - ctx->Extensions.ATI_texture_mirror_once) || - (eparam == GL_MIRROR_CLAMP_TO_EDGE_ATI && - ctx->Extensions.ATI_texture_mirror_once))) { - /* non-rectangle texture */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapS = eparam; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - break; - case GL_TEXTURE_WRAP_T: - if (texObj->WrapT == eparam) - return; - if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE || - (eparam == GL_CLAMP_TO_BORDER && - ctx->Extensions.ARB_texture_border_clamp)) { - /* any texture target */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapT = eparam; - } - else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV && - (eparam == GL_REPEAT || - (eparam == GL_MIRRORED_REPEAT && - ctx->Extensions.ARB_texture_mirrored_repeat) || - (eparam == GL_MIRROR_CLAMP_ATI && - ctx->Extensions.ATI_texture_mirror_once) || - (eparam == GL_MIRROR_CLAMP_TO_EDGE_ATI && - ctx->Extensions.ATI_texture_mirror_once))) { - /* non-rectangle texture */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapT = eparam; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - break; - case GL_TEXTURE_WRAP_R: - if (texObj->WrapR == eparam) - return; - if (eparam == GL_CLAMP || eparam == GL_CLAMP_TO_EDGE || - (eparam == GL_CLAMP_TO_BORDER && - ctx->Extensions.ARB_texture_border_clamp)) { - /* any texture target */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapR = eparam; - } - else if (texObj->Target != GL_TEXTURE_RECTANGLE_NV && - (eparam == GL_REPEAT || - (eparam == GL_MIRRORED_REPEAT && - ctx->Extensions.ARB_texture_mirrored_repeat) || - (eparam == GL_MIRROR_CLAMP_ATI && - ctx->Extensions.ATI_texture_mirror_once) || - (eparam == GL_MIRROR_CLAMP_TO_EDGE_ATI && - ctx->Extensions.ATI_texture_mirror_once))) { - /* non-rectangle texture */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->WrapR = eparam; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - } - break; - case GL_TEXTURE_BORDER_COLOR: - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->BorderColor[RCOMP] = params[0]; - texObj->BorderColor[GCOMP] = params[1]; - texObj->BorderColor[BCOMP] = params[2]; - texObj->BorderColor[ACOMP] = params[3]; - UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[RCOMP], params[0]); - UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[GCOMP], params[1]); - UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[BCOMP], params[2]); - UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[ACOMP], params[3]); - break; - case GL_TEXTURE_MIN_LOD: - if (texObj->MinLod == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MinLod = params[0]; - break; - case GL_TEXTURE_MAX_LOD: - if (texObj->MaxLod == params[0]) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MaxLod = params[0]; - break; - case GL_TEXTURE_BASE_LEVEL: - if (params[0] < 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - if (target == GL_TEXTURE_RECTANGLE_NV && params[0] != 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->BaseLevel = (GLint) params[0]; - break; - case GL_TEXTURE_MAX_LEVEL: - if (params[0] < 0.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MaxLevel = (GLint) params[0]; - break; - case GL_TEXTURE_PRIORITY: - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->Priority = CLAMP( params[0], 0.0F, 1.0F ); - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - if (params[0] < 1.0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" ); - return; - } - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MaxAnisotropy = params[0]; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)"); - return; - } - break; - case GL_TEXTURE_COMPARE_SGIX: - if (ctx->Extensions.SGIX_shadow) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->CompareFlag = params[0] ? GL_TRUE : GL_FALSE; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_COMPARE_SGIX)"); - return; - } - break; - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - if (ctx->Extensions.SGIX_shadow) { - GLenum op = (GLenum) params[0]; - if (op == GL_TEXTURE_LEQUAL_R_SGIX || - op == GL_TEXTURE_GEQUAL_R_SGIX) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->CompareOperator = op; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)"); - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_COMPARE_OPERATOR_SGIX)"); - return; - } - break; - case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - if (ctx->Extensions.SGIX_shadow_ambient) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F); - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_SHADOW_AMBIENT_SGIX)"); - return; - } - break; - case GL_GENERATE_MIPMAP_SGIS: - if (ctx->Extensions.SGIS_generate_mipmap) { - texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_GENERATE_MIPMAP_SGIS)"); - return; - } - break; - case GL_TEXTURE_COMPARE_MODE_ARB: - if (ctx->Extensions.ARB_shadow) { - const GLenum mode = (GLenum) params[0]; - if (mode == GL_NONE || mode == GL_COMPARE_R_TO_TEXTURE_ARB) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->CompareMode = mode; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(bad GL_TEXTURE_COMPARE_MODE_ARB: 0x%x)", mode); - return; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_COMPARE_MODE_ARB)"); - return; - } - break; - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (ctx->Extensions.ARB_shadow) { - const GLenum func = (GLenum) params[0]; - if (func == GL_LEQUAL || func == GL_GEQUAL) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->CompareFunc = func; - } - else if (ctx->Extensions.EXT_shadow_funcs && - (func == GL_EQUAL || - func == GL_NOTEQUAL || - func == GL_LESS || - func == GL_GREATER || - func == GL_ALWAYS || - func == GL_NEVER)) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->CompareFunc = func; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(bad GL_TEXTURE_COMPARE_FUNC_ARB)"); - return; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_COMPARE_FUNC_ARB)"); - return; - } - break; - case GL_DEPTH_TEXTURE_MODE_ARB: - if (ctx->Extensions.ARB_depth_texture) { - const GLenum result = (GLenum) params[0]; - if (result == GL_LUMINANCE || result == GL_INTENSITY - || result == GL_ALPHA) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->DepthMode = result; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(bad GL_DEPTH_TEXTURE_MODE_ARB)"); - return; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_DEPTH_TEXTURE_MODE_ARB)"); - return; - } - break; - case GL_TEXTURE_LOD_BIAS: - /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias*/ - if (ctx->Extensions.EXT_texture_lod_bias) { - if (texObj->LodBias != params[0]) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->LodBias = params[0]; - } - } - break; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=0x%x)", pname); - return; - } - - texObj->Complete = GL_FALSE; - - if (ctx->Driver.TexParameter) { - (*ctx->Driver.TexParameter)( ctx, target, texObj, pname, params ); - } -} - - -void -_mesa_TexParameteri( GLenum target, GLenum pname, GLint param ) -{ - GLfloat fparam[4]; - if (pname == GL_TEXTURE_PRIORITY) - fparam[0] = INT_TO_FLOAT(param); - else - fparam[0] = (GLfloat) param; - fparam[1] = fparam[2] = fparam[3] = 0.0; - _mesa_TexParameterfv(target, pname, fparam); -} - - -void -_mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params ) -{ - GLfloat fparam[4]; - if (pname == GL_TEXTURE_BORDER_COLOR) { - fparam[0] = INT_TO_FLOAT(params[0]); - fparam[1] = INT_TO_FLOAT(params[1]); - fparam[2] = INT_TO_FLOAT(params[2]); - fparam[3] = INT_TO_FLOAT(params[3]); - } - else { - if (pname == GL_TEXTURE_PRIORITY) - fparam[0] = INT_TO_FLOAT(params[0]); - else - fparam[0] = (GLfloat) params[0]; - fparam[1] = fparam[2] = fparam[3] = 0.0F; - } - _mesa_TexParameterfv(target, pname, fparam); -} - - -void -_mesa_GetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ) -{ - GLint iparam; - _mesa_GetTexLevelParameteriv( target, level, pname, &iparam ); - *params = (GLfloat) iparam; -} - - -static GLuint -tex_image_dimensions(GLcontext *ctx, GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - return 1; - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return 2; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - return 3; - case GL_TEXTURE_CUBE_MAP: - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return ctx->Extensions.ARB_texture_cube_map ? 2 : 0; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle ? 2 : 0; - default: - _mesa_problem(ctx, "bad target in _mesa_tex_target_dimensions()"); - return 0; - } -} - - -void -_mesa_GetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - const struct gl_texture_image *img = NULL; - GLuint dimensions; - GLboolean isProxy; - GLint maxLevels; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - /* this will catch bad target values */ - dimensions = tex_image_dimensions(ctx, target); /* 1, 2 or 3 */ - if (dimensions == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(target)"); - return; - } - - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - maxLevels = ctx->Const.MaxTextureLevels; - break; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - maxLevels = ctx->Const.Max3DTextureLevels; - break; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - case GL_PROXY_TEXTURE_CUBE_MAP: - maxLevels = ctx->Const.MaxCubeTextureLevels; - break; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - maxLevels = 1; - break; - default: - _mesa_problem(ctx, "switch in _mesa_GetTexLevelParameter"); - return; - } - - if (level < 0 || level >= maxLevels) { - _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexLevelParameter[if]v" ); - return; - } - - img = _mesa_select_tex_image(ctx, texUnit, target, level); - if (!img || !img->TexFormat) { - /* undefined texture image */ - if (pname == GL_TEXTURE_COMPONENTS) - *params = 1; - else - *params = 0; - return; - } - - isProxy = (target == GL_PROXY_TEXTURE_1D) || - (target == GL_PROXY_TEXTURE_2D) || - (target == GL_PROXY_TEXTURE_3D) || - (target == GL_PROXY_TEXTURE_CUBE_MAP) || - (target == GL_PROXY_TEXTURE_RECTANGLE_NV); - - switch (pname) { - case GL_TEXTURE_WIDTH: - *params = img->Width; - return; - case GL_TEXTURE_HEIGHT: - *params = img->Height; - return; - case GL_TEXTURE_DEPTH: - *params = img->Depth; - return; - case GL_TEXTURE_INTERNAL_FORMAT: - *params = img->IntFormat; - return; - case GL_TEXTURE_BORDER: - *params = img->Border; - return; - case GL_TEXTURE_RED_SIZE: - if (img->Format == GL_RGB || img->Format == GL_RGBA) - *params = img->TexFormat->RedBits; - else - *params = 0; - return; - case GL_TEXTURE_GREEN_SIZE: - if (img->Format == GL_RGB || img->Format == GL_RGBA) - *params = img->TexFormat->GreenBits; - else - *params = 0; - return; - case GL_TEXTURE_BLUE_SIZE: - if (img->Format == GL_RGB || img->Format == GL_RGBA) - *params = img->TexFormat->BlueBits; - else - *params = 0; - return; - case GL_TEXTURE_ALPHA_SIZE: - if (img->Format == GL_ALPHA || img->Format == GL_LUMINANCE_ALPHA || - img->Format == GL_RGBA) - *params = img->TexFormat->AlphaBits; - else - *params = 0; - return; - case GL_TEXTURE_INTENSITY_SIZE: - if (img->Format != GL_INTENSITY) - *params = 0; - else if (img->TexFormat->IntensityBits > 0) - *params = img->TexFormat->IntensityBits; - else /* intensity probably stored as rgb texture */ - *params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits); - return; - case GL_TEXTURE_LUMINANCE_SIZE: - if (img->Format != GL_LUMINANCE && - img->Format != GL_LUMINANCE_ALPHA) - *params = 0; - else if (img->TexFormat->LuminanceBits > 0) - *params = img->TexFormat->LuminanceBits; - else /* luminance probably stored as rgb texture */ - *params = MIN2(img->TexFormat->RedBits, img->TexFormat->GreenBits); - return; - case GL_TEXTURE_INDEX_SIZE_EXT: - if (img->Format == GL_COLOR_INDEX) - *params = img->TexFormat->IndexBits; - else - *params = 0; - return; - case GL_DEPTH_BITS: - /* XXX this isn't in the GL_SGIX_depth_texture spec - * but seems appropriate. - */ - if (ctx->Extensions.SGIX_depth_texture) - *params = img->TexFormat->DepthBits; - else - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetTexLevelParameter[if]v(pname)"); - return; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - if (ctx->Extensions.ARB_texture_compression) { - if (img->IsCompressed && !isProxy) - *params = img->CompressedSize; - else - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexLevelParameter[if]v(pname)"); - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetTexLevelParameter[if]v(pname)"); - } - return; - case GL_TEXTURE_COMPRESSED: - if (ctx->Extensions.ARB_texture_compression) { - *params = (GLint) img->IsCompressed; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetTexLevelParameter[if]v(pname)"); - } - return; - - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetTexLevelParameter[if]v(pname)"); - } -} - - - -void -_mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_object *obj; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - obj = _mesa_select_tex_object(ctx, texUnit, target); - if (!obj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)"); - return; - } - - switch (pname) { - case GL_TEXTURE_MAG_FILTER: - *params = ENUM_TO_FLOAT(obj->MagFilter); - return; - case GL_TEXTURE_MIN_FILTER: - *params = ENUM_TO_FLOAT(obj->MinFilter); - return; - case GL_TEXTURE_WRAP_S: - *params = ENUM_TO_FLOAT(obj->WrapS); - return; - case GL_TEXTURE_WRAP_T: - *params = ENUM_TO_FLOAT(obj->WrapT); - return; - case GL_TEXTURE_WRAP_R: - *params = ENUM_TO_FLOAT(obj->WrapR); - return; - case GL_TEXTURE_BORDER_COLOR: - params[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F); - params[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F); - params[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F); - params[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F); - return; - case GL_TEXTURE_RESIDENT: - { - GLboolean resident; - if (ctx->Driver.IsTextureResident) - resident = ctx->Driver.IsTextureResident(ctx, obj); - else - resident = GL_TRUE; - *params = ENUM_TO_FLOAT(resident); - } - return; - case GL_TEXTURE_PRIORITY: - *params = obj->Priority; - return; - case GL_TEXTURE_MIN_LOD: - *params = obj->MinLod; - return; - case GL_TEXTURE_MAX_LOD: - *params = obj->MaxLod; - return; - case GL_TEXTURE_BASE_LEVEL: - *params = (GLfloat) obj->BaseLevel; - return; - case GL_TEXTURE_MAX_LEVEL: - *params = (GLfloat) obj->MaxLevel; - return; - case GL_TEXTURE_LOD_BIAS: - if (ctx->Extensions.EXT_texture_lod_bias) { - *params = obj->LodBias; - break; - } - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - *params = obj->MaxAnisotropy; - return; - } - break; - case GL_TEXTURE_COMPARE_SGIX: - if (ctx->Extensions.SGIX_shadow) { - *params = (GLfloat) obj->CompareFlag; - return; - } - break; - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - if (ctx->Extensions.SGIX_shadow) { - *params = (GLfloat) obj->CompareOperator; - return; - } - break; - case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - if (ctx->Extensions.SGIX_shadow_ambient) { - *params = obj->ShadowAmbient; - return; - } - break; - case GL_GENERATE_MIPMAP_SGIS: - if (ctx->Extensions.SGIS_generate_mipmap) { - *params = (GLfloat) obj->GenerateMipmap; - return; - } - break; - case GL_TEXTURE_COMPARE_MODE_ARB: - if (ctx->Extensions.ARB_shadow) { - *params = (GLfloat) obj->CompareMode; - return; - } - break; - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (ctx->Extensions.ARB_shadow) { - *params = (GLfloat) obj->CompareFunc; - return; - } - break; - case GL_DEPTH_TEXTURE_MODE_ARB: - if (ctx->Extensions.ARB_depth_texture) { - *params = (GLfloat) obj->DepthMode; - return; - } - break; - default: - ; /* silence warnings */ - } - /* If we get here, pname was an unrecognized enum */ - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" ); -} - - -void -_mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - struct gl_texture_object *obj; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - obj = _mesa_select_tex_object(ctx, texUnit, target); - if (!obj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)"); - return; - } - - switch (pname) { - case GL_TEXTURE_MAG_FILTER: - *params = (GLint) obj->MagFilter; - return; - case GL_TEXTURE_MIN_FILTER: - *params = (GLint) obj->MinFilter; - return; - case GL_TEXTURE_WRAP_S: - *params = (GLint) obj->WrapS; - return; - case GL_TEXTURE_WRAP_T: - *params = (GLint) obj->WrapT; - return; - case GL_TEXTURE_WRAP_R: - *params = (GLint) obj->WrapR; - return; - case GL_TEXTURE_BORDER_COLOR: - { - GLfloat b[4]; - b[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F); - b[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F); - b[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F); - b[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F); - params[0] = FLOAT_TO_INT(b[0]); - params[1] = FLOAT_TO_INT(b[1]); - params[2] = FLOAT_TO_INT(b[2]); - params[3] = FLOAT_TO_INT(b[3]); - } - return; - case GL_TEXTURE_RESIDENT: - { - GLboolean resident; - if (ctx->Driver.IsTextureResident) - resident = ctx->Driver.IsTextureResident(ctx, obj); - else - resident = GL_TRUE; - *params = (GLint) resident; - } - return; - case GL_TEXTURE_PRIORITY: - *params = FLOAT_TO_INT(obj->Priority); - return; - case GL_TEXTURE_MIN_LOD: - *params = (GLint) obj->MinLod; - return; - case GL_TEXTURE_MAX_LOD: - *params = (GLint) obj->MaxLod; - return; - case GL_TEXTURE_BASE_LEVEL: - *params = obj->BaseLevel; - return; - case GL_TEXTURE_MAX_LEVEL: - *params = obj->MaxLevel; - return; - case GL_TEXTURE_LOD_BIAS: - if (ctx->Extensions.EXT_texture_lod_bias) { - *params = (GLint) obj->LodBias; - break; - } - break; - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - *params = (GLint) obj->MaxAnisotropy; - return; - } - break; - case GL_TEXTURE_COMPARE_SGIX: - if (ctx->Extensions.SGIX_shadow) { - *params = (GLint) obj->CompareFlag; - return; - } - break; - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - if (ctx->Extensions.SGIX_shadow) { - *params = (GLint) obj->CompareOperator; - return; - } - break; - case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - if (ctx->Extensions.SGIX_shadow_ambient) { - *params = (GLint) FLOAT_TO_INT(obj->ShadowAmbient); - return; - } - break; - case GL_GENERATE_MIPMAP_SGIS: - if (ctx->Extensions.SGIS_generate_mipmap) { - *params = (GLint) obj->GenerateMipmap; - return; - } - break; - case GL_TEXTURE_COMPARE_MODE_ARB: - if (ctx->Extensions.ARB_shadow) { - *params = (GLint) obj->CompareMode; - return; - } - break; - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (ctx->Extensions.ARB_shadow) { - *params = (GLint) obj->CompareFunc; - return; - } - break; - case GL_DEPTH_TEXTURE_MODE_ARB: - if (ctx->Extensions.ARB_depth_texture) { - *params = (GLint) obj->DepthMode; - return; - } - break; - default: - ; /* silence warnings */ - } - /* If we get here, pname was an unrecognized enum */ - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" ); -} - - - - -/**********************************************************************/ -/* Texture Coord Generation */ -/**********************************************************************/ - - -void -_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint tUnit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexGen %s %s %.1f(%s)...\n", - _mesa_lookup_enum_by_nr(coord), - _mesa_lookup_enum_by_nr(pname), - *params, - _mesa_lookup_enum_by_nr((GLenum) (GLint) *params)); - - switch (coord) { - case GL_S: - if (pname==GL_TEXTURE_GEN_MODE) { - GLenum mode = (GLenum) (GLint) *params; - GLuint bits; - switch (mode) { - case GL_OBJECT_LINEAR: - bits = TEXGEN_OBJ_LINEAR; - break; - case GL_EYE_LINEAR: - bits = TEXGEN_EYE_LINEAR; - break; - case GL_REFLECTION_MAP_NV: - bits = TEXGEN_REFLECTION_MAP_NV; - break; - case GL_NORMAL_MAP_NV: - bits = TEXGEN_NORMAL_MAP_NV; - break; - case GL_SPHERE_MAP: - bits = TEXGEN_SPHERE_MAP; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); - return; - } - if (texUnit->GenModeS == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->GenModeS = mode; - texUnit->_GenBitS = bits; - } - else if (pname==GL_OBJECT_PLANE) { - if (TEST_EQ_4V(texUnit->ObjectPlaneS, params)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->ObjectPlaneS[0] = params[0]; - texUnit->ObjectPlaneS[1] = params[1]; - texUnit->ObjectPlaneS[2] = params[2]; - texUnit->ObjectPlaneS[3] = params[3]; - } - else if (pname==GL_EYE_PLANE) { - GLfloat tmp[4]; - - /* Transform plane equation by the inverse modelview matrix */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) { - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - } - _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); - if (TEST_EQ_4V(texUnit->EyePlaneS, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EyePlaneS, tmp); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); - return; - } - break; - case GL_T: - if (pname==GL_TEXTURE_GEN_MODE) { - GLenum mode = (GLenum) (GLint) *params; - GLuint bitt; - switch (mode) { - case GL_OBJECT_LINEAR: - bitt = TEXGEN_OBJ_LINEAR; - break; - case GL_EYE_LINEAR: - bitt = TEXGEN_EYE_LINEAR; - break; - case GL_REFLECTION_MAP_NV: - bitt = TEXGEN_REFLECTION_MAP_NV; - break; - case GL_NORMAL_MAP_NV: - bitt = TEXGEN_NORMAL_MAP_NV; - break; - case GL_SPHERE_MAP: - bitt = TEXGEN_SPHERE_MAP; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); - return; - } - if (texUnit->GenModeT == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->GenModeT = mode; - texUnit->_GenBitT = bitt; - } - else if (pname==GL_OBJECT_PLANE) { - if (TEST_EQ_4V(texUnit->ObjectPlaneT, params)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->ObjectPlaneT[0] = params[0]; - texUnit->ObjectPlaneT[1] = params[1]; - texUnit->ObjectPlaneT[2] = params[2]; - texUnit->ObjectPlaneT[3] = params[3]; - } - else if (pname==GL_EYE_PLANE) { - GLfloat tmp[4]; - /* Transform plane equation by the inverse modelview matrix */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) { - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - } - _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); - if (TEST_EQ_4V(texUnit->EyePlaneT, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EyePlaneT, tmp); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); - return; - } - break; - case GL_R: - if (pname==GL_TEXTURE_GEN_MODE) { - GLenum mode = (GLenum) (GLint) *params; - GLuint bitr; - switch (mode) { - case GL_OBJECT_LINEAR: - bitr = TEXGEN_OBJ_LINEAR; - break; - case GL_REFLECTION_MAP_NV: - bitr = TEXGEN_REFLECTION_MAP_NV; - break; - case GL_NORMAL_MAP_NV: - bitr = TEXGEN_NORMAL_MAP_NV; - break; - case GL_EYE_LINEAR: - bitr = TEXGEN_EYE_LINEAR; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); - return; - } - if (texUnit->GenModeR == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->GenModeR = mode; - texUnit->_GenBitR = bitr; - } - else if (pname==GL_OBJECT_PLANE) { - if (TEST_EQ_4V(texUnit->ObjectPlaneR, params)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->ObjectPlaneR[0] = params[0]; - texUnit->ObjectPlaneR[1] = params[1]; - texUnit->ObjectPlaneR[2] = params[2]; - texUnit->ObjectPlaneR[3] = params[3]; - } - else if (pname==GL_EYE_PLANE) { - GLfloat tmp[4]; - /* Transform plane equation by the inverse modelview matrix */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) { - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - } - _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); - if (TEST_EQ_4V(texUnit->EyePlaneR, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EyePlaneR, tmp); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); - return; - } - break; - case GL_Q: - if (pname==GL_TEXTURE_GEN_MODE) { - GLenum mode = (GLenum) (GLint) *params; - GLuint bitq; - switch (mode) { - case GL_OBJECT_LINEAR: - bitq = TEXGEN_OBJ_LINEAR; - break; - case GL_EYE_LINEAR: - bitq = TEXGEN_EYE_LINEAR; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); - return; - } - if (texUnit->GenModeQ == mode) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->GenModeQ = mode; - texUnit->_GenBitQ = bitq; - } - else if (pname==GL_OBJECT_PLANE) { - if (TEST_EQ_4V(texUnit->ObjectPlaneQ, params)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->ObjectPlaneQ[0] = params[0]; - texUnit->ObjectPlaneQ[1] = params[1]; - texUnit->ObjectPlaneQ[2] = params[2]; - texUnit->ObjectPlaneQ[3] = params[3]; - } - else if (pname==GL_EYE_PLANE) { - GLfloat tmp[4]; - /* Transform plane equation by the inverse modelview matrix */ - if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) { - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - } - _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); - if (TEST_EQ_4V(texUnit->EyePlaneQ, tmp)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EyePlaneQ, tmp); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(coord)" ); - return; - } - - if (ctx->Driver.TexGen) - ctx->Driver.TexGen( ctx, coord, pname, params ); -} - - -void -_mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) -{ - GLfloat p[4]; - p[0] = (GLfloat) params[0]; - if (pname == GL_TEXTURE_GEN_MODE) { - p[1] = p[2] = p[3] = 0.0F; - } - else { - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; - } - _mesa_TexGenfv(coord, pname, p); -} - - -void -_mesa_TexGend(GLenum coord, GLenum pname, GLdouble param ) -{ - GLfloat p = (GLfloat) param; - _mesa_TexGenfv( coord, pname, &p ); -} - - -void -_mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) -{ - GLfloat p[4]; - p[0] = (GLfloat) params[0]; - if (pname == GL_TEXTURE_GEN_MODE) { - p[1] = p[2] = p[3] = 0.0F; - } - else { - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; - } - _mesa_TexGenfv( coord, pname, p ); -} - - -void -_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) -{ - _mesa_TexGenfv(coord, pname, ¶m); -} - - -void -_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) -{ - _mesa_TexGeniv( coord, pname, ¶m ); -} - - - -void -_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint tUnit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (coord) { - case GL_S: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_DOUBLE(texUnit->GenModeS); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneS ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneS ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); - return; - } - break; - case GL_T: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_DOUBLE(texUnit->GenModeT); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneT ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneT ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); - return; - } - break; - case GL_R: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_DOUBLE(texUnit->GenModeR); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneR ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneR ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); - return; - } - break; - case GL_Q: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_DOUBLE(texUnit->GenModeQ); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneQ ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneQ ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(coord)" ); - return; - } -} - - - -void -_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint tUnit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (coord) { - case GL_S: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_FLOAT(texUnit->GenModeS); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneS ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneS ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); - return; - } - break; - case GL_T: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_FLOAT(texUnit->GenModeT); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneT ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneT ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); - return; - } - break; - case GL_R: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_FLOAT(texUnit->GenModeR); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneR ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneR ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); - return; - } - break; - case GL_Q: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = ENUM_TO_FLOAT(texUnit->GenModeQ); - } - else if (pname==GL_OBJECT_PLANE) { - COPY_4V( params, texUnit->ObjectPlaneQ ); - } - else if (pname==GL_EYE_PLANE) { - COPY_4V( params, texUnit->EyePlaneQ ); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(coord)" ); - return; - } -} - - - -void -_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint tUnit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit]; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (coord) { - case GL_S: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = texUnit->GenModeS; - } - else if (pname==GL_OBJECT_PLANE) { - params[0] = (GLint) texUnit->ObjectPlaneS[0]; - params[1] = (GLint) texUnit->ObjectPlaneS[1]; - params[2] = (GLint) texUnit->ObjectPlaneS[2]; - params[3] = (GLint) texUnit->ObjectPlaneS[3]; - } - else if (pname==GL_EYE_PLANE) { - params[0] = (GLint) texUnit->EyePlaneS[0]; - params[1] = (GLint) texUnit->EyePlaneS[1]; - params[2] = (GLint) texUnit->EyePlaneS[2]; - params[3] = (GLint) texUnit->EyePlaneS[3]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); - return; - } - break; - case GL_T: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = texUnit->GenModeT; - } - else if (pname==GL_OBJECT_PLANE) { - params[0] = (GLint) texUnit->ObjectPlaneT[0]; - params[1] = (GLint) texUnit->ObjectPlaneT[1]; - params[2] = (GLint) texUnit->ObjectPlaneT[2]; - params[3] = (GLint) texUnit->ObjectPlaneT[3]; - } - else if (pname==GL_EYE_PLANE) { - params[0] = (GLint) texUnit->EyePlaneT[0]; - params[1] = (GLint) texUnit->EyePlaneT[1]; - params[2] = (GLint) texUnit->EyePlaneT[2]; - params[3] = (GLint) texUnit->EyePlaneT[3]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); - return; - } - break; - case GL_R: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = texUnit->GenModeR; - } - else if (pname==GL_OBJECT_PLANE) { - params[0] = (GLint) texUnit->ObjectPlaneR[0]; - params[1] = (GLint) texUnit->ObjectPlaneR[1]; - params[2] = (GLint) texUnit->ObjectPlaneR[2]; - params[3] = (GLint) texUnit->ObjectPlaneR[3]; - } - else if (pname==GL_EYE_PLANE) { - params[0] = (GLint) texUnit->EyePlaneR[0]; - params[1] = (GLint) texUnit->EyePlaneR[1]; - params[2] = (GLint) texUnit->EyePlaneR[2]; - params[3] = (GLint) texUnit->EyePlaneR[3]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); - return; - } - break; - case GL_Q: - if (pname==GL_TEXTURE_GEN_MODE) { - params[0] = texUnit->GenModeQ; - } - else if (pname==GL_OBJECT_PLANE) { - params[0] = (GLint) texUnit->ObjectPlaneQ[0]; - params[1] = (GLint) texUnit->ObjectPlaneQ[1]; - params[2] = (GLint) texUnit->ObjectPlaneQ[2]; - params[3] = (GLint) texUnit->ObjectPlaneQ[3]; - } - else if (pname==GL_EYE_PLANE) { - params[0] = (GLint) texUnit->EyePlaneQ[0]; - params[1] = (GLint) texUnit->EyePlaneQ[1]; - params[2] = (GLint) texUnit->EyePlaneQ[2]; - params[3] = (GLint) texUnit->EyePlaneQ[3]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); - return; - } - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(coord)" ); - return; - } -} - - -/* GL_ARB_multitexture */ -void -_mesa_ActiveTextureARB( GLenum target ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = target - GL_TEXTURE0; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glActiveTexture %s\n", - _mesa_lookup_enum_by_nr(target)); - - /* Cater for texture unit 0 is first, therefore use >= */ - if (texUnit >= ctx->Const.MaxTextureUnits) { - _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(target)"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - - ctx->Texture.CurrentUnit = texUnit; - if (ctx->Transform.MatrixMode == GL_TEXTURE) { - /* update current stack pointer */ - ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit]; - } - - if (ctx->Driver.ActiveTexture) { - (*ctx->Driver.ActiveTexture)( ctx, (GLuint) texUnit ); - } -} - - -/* GL_ARB_multitexture */ -void -_mesa_ClientActiveTextureARB( GLenum target ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = target - GL_TEXTURE0; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (texUnit > ctx->Const.MaxTextureUnits) { - _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(target)"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.ActiveTexture = texUnit; -} - - - -/**********************************************************************/ -/* Pixel Texgen Extensions */ -/**********************************************************************/ - -void -_mesa_PixelTexGenSGIX(GLenum mode) -{ - GLenum newRgbSource, newAlphaSource; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - switch (mode) { - case GL_NONE: - newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; - break; - case GL_ALPHA: - newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS; - newAlphaSource = GL_CURRENT_RASTER_COLOR; - break; - case GL_RGB: - newRgbSource = GL_CURRENT_RASTER_COLOR; - newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS; - break; - case GL_RGBA: - newRgbSource = GL_CURRENT_RASTER_COLOR; - newAlphaSource = GL_CURRENT_RASTER_COLOR; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenSGIX(mode)"); - return; - } - - if (newRgbSource == ctx->Pixel.FragmentRgbSource && - newAlphaSource == ctx->Pixel.FragmentAlphaSource) - return; - - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentRgbSource = newRgbSource; - ctx->Pixel.FragmentAlphaSource = newAlphaSource; -} - - -void -_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value) -{ - _mesa_PixelTexGenParameteriSGIS(target, (GLint) value); -} - - -void -_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value) -{ - _mesa_PixelTexGenParameteriSGIS(target, (GLint) *value); -} - - -void -_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (value != GL_CURRENT_RASTER_COLOR && value != GL_PIXEL_GROUP_COLOR_SGIS) { - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(value)"); - return; - } - - switch (target) { - case GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS: - if (ctx->Pixel.FragmentRgbSource == (GLenum) value) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentRgbSource = (GLenum) value; - break; - case GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS: - if (ctx->Pixel.FragmentAlphaSource == (GLenum) value) - return; - FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.FragmentAlphaSource = (GLenum) value; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(target)"); - return; - } -} - - -void -_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value) -{ - _mesa_PixelTexGenParameteriSGIS(target, *value); -} - - -void -_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) { - *value = (GLfloat) ctx->Pixel.FragmentRgbSource; - } - else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) { - *value = (GLfloat) ctx->Pixel.FragmentAlphaSource; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterfvSGIS(target)"); - } -} - - -void -_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) { - *value = (GLint) ctx->Pixel.FragmentRgbSource; - } - else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) { - *value = (GLint) ctx->Pixel.FragmentAlphaSource; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterivSGIS(target)"); - } -} Index: xc/extras/Mesa/src/texstate.h diff -u xc/extras/Mesa/src/texstate.h:1.6 xc/extras/Mesa/src/texstate.h:removed --- xc/extras/Mesa/src/texstate.h:1.6 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texstate.h Wed Mar 16 21:00:34 2005 @@ -1,169 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef TEXSTATE_H -#define TEXSTATE_H - - -#include "mtypes.h" - - -extern void -_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ); - -extern void -_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ); - - -/*** Called from API ***/ - -extern void -_mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); - -extern void -_mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ); - -extern void -_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); - -extern void -_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); - -extern void -_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ); - -extern void -_mesa_GetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ); - -extern void -_mesa_GetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ); - -extern void -_mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); - -extern void -_mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ); - - -extern void -_mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param ); - -extern void -_mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ); - -extern void -_mesa_TexEnvi( GLenum target, GLenum pname, GLint param ); - -extern void -_mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ); - - -extern void -_mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ); - -extern void -_mesa_TexParameterf( GLenum target, GLenum pname, GLfloat param ); - - -extern void -_mesa_TexParameteri( GLenum target, GLenum pname, GLint param ); - -extern void -_mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params ); - - -extern void -_mesa_TexGend( GLenum coord, GLenum pname, GLdouble param ); - -extern void -_mesa_TexGendv( GLenum coord, GLenum pname, const GLdouble *params ); - -extern void -_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ); - -extern void -_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); - -extern void -_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ); - -extern void -_mesa_TexGeniv( GLenum coord, GLenum pname, const GLint *params ); - - - - -/* - * GL_ARB_multitexture - */ -extern void -_mesa_ActiveTextureARB( GLenum target ); - -extern void -_mesa_ClientActiveTextureARB( GLenum target ); - - -/* - * Pixel Texture Extensions - */ - -extern void -_mesa_PixelTexGenSGIX(GLenum mode); - -extern void -_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value); - -#ifdef VMS -#define _mesa_PixelTexGenParameterfvSGIS _mesa_PixelTexGenParameterfv -#endif -extern void -_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value); - -extern void -_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value); - -#ifdef VMS -#define _mesa_PixelTexGenParameterivSGIS _mesa_PixelTexGenParameteriv -#endif -extern void -_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value); - -#ifdef VMS -#define _mesa_GetPixelTexGenParameterfvSGIS _mesa_GetPixelTexGenParameterfv -#endif -extern void -_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value); - -#ifdef VMS -#define _mesa_GetPixelTexGenParameterivSGIS _mesa_GetPixelTexGenParameteriv -#endif -extern void -_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value); - - -#endif Index: xc/extras/Mesa/src/texstore.c diff -u xc/extras/Mesa/src/texstore.c:1.7 xc/extras/Mesa/src/texstore.c:removed --- xc/extras/Mesa/src/texstore.c:1.7 Tue Dec 2 09:28:12 2003 +++ xc/extras/Mesa/src/texstore.c Wed Mar 16 21:00:34 2005 @@ -1,2119 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/texstore.c,v 1.7 2003/12/02 14:28:12 alanh Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Brian Paul - */ - -/* - * The GL texture image functions in teximage.c basically just do - * error checking and data structure allocation. They in turn call - * device driver functions which actually copy/convert/store the user's - * texture image data. - * - * However, most device drivers will be able to use the fallback functions - * in this file. That is, most drivers will have the following bit of - * code: - * ctx->Driver.TexImage1D = _mesa_store_teximage1d; - * ctx->Driver.TexImage2D = _mesa_store_teximage2d; - * ctx->Driver.TexImage3D = _mesa_store_teximage3d; - * etc... - * - * Texture image processing is actually kind of complicated. We have to do: - * Format/type conversions - * pixel unpacking - * pixel transfer (scale, bais, lookup, convolution!, etc) - * - * These functions can handle most everything, including processing full - * images and sub-images. - */ - - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "convolve.h" -#include "image.h" -#include "macros.h" -#include "imports.h" -#include "texcompress.h" -#include "texformat.h" -#include "teximage.h" -#include "texstore.h" -#include "texutil.h" - - -/* - * Given an internal texture format enum or 1, 2, 3, 4 return the - * corresponding _base_ internal format: GL_ALPHA, GL_LUMINANCE, - * GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA. Return the - * number of components for the format. Return -1 if invalid enum. - */ -static GLint -components_in_intformat( GLint format ) -{ - switch (format) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return 1; - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return 1; - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return 2; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return 1; - case 3: - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return 3; - case 4: - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return 4; - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - return 1; - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16_SGIX: - case GL_DEPTH_COMPONENT24_SGIX: - case GL_DEPTH_COMPONENT32_SGIX: - return 1; - case GL_YCBCR_MESA: - return 2; /* Y + (Cb or Cr) */ - default: - return -1; /* error */ - } -} - - -/* - * This function is used to transfer the user's image data into a texture - * image buffer. We handle both full texture images and subtexture images. - * We also take care of all image transfer operations here, including - * convolution, scale/bias, colortables, etc. - * - * The destination texel type is always GLchan. - * The destination texel format is one of the 6 basic types. - * - * A hardware driver may use this as a helper routine to unpack and - * apply pixel transfer ops into a temporary image buffer. Then, - * convert the temporary image into the special hardware format. - * - * Input: - * dimensions - 1, 2, or 3 - * texDestFormat - GL_LUMINANCE, GL_INTENSITY, GL_LUMINANCE_ALPHA, GL_ALPHA, - * GL_RGB or GL_RGBA (the destination format) - * texDestAddr - destination image address - * srcWidth, srcHeight, srcDepth - size (in pixels) of src and dest images - * dstXoffset, dstYoffset, dstZoffset - position to store the image within - * the destination 3D texture - * dstRowStride, dstImageStride - dest image strides in bytes - * srcFormat - source image format (GL_ALPHA, GL_RED, GL_RGB, etc) - * srcType - GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_FLOAT, etc - * srcPacking - describes packing of incoming image. - * transferOps - mask of pixel transfer operations - */ -static void -transfer_teximage(GLcontext *ctx, GLuint dimensions, - GLenum texDestFormat, GLvoid *texDestAddr, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, - GLint dstRowStride, GLint dstImageStride, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps) -{ - GLint texComponents; - - ASSERT(ctx); - ASSERT(dimensions >= 1 && dimensions <= 3); - ASSERT(texDestFormat == GL_LUMINANCE || - texDestFormat == GL_INTENSITY || - texDestFormat == GL_LUMINANCE_ALPHA || - texDestFormat == GL_ALPHA || - texDestFormat == GL_RGB || - texDestFormat == GL_RGBA || - texDestFormat == GL_COLOR_INDEX || - texDestFormat == GL_DEPTH_COMPONENT); - ASSERT(texDestAddr); - ASSERT(srcWidth >= 1); - ASSERT(srcHeight >= 1); - ASSERT(srcDepth >= 1); - ASSERT(dstXoffset >= 0); - ASSERT(dstYoffset >= 0); - ASSERT(dstZoffset >= 0); - ASSERT(dstRowStride >= 0); - ASSERT(dstImageStride >= 0); - ASSERT(srcAddr); - ASSERT(srcPacking); - - texComponents = components_in_intformat(texDestFormat); - - /* try common 2D texture cases first */ - if (!transferOps && dimensions == 2 && srcType == CHAN_TYPE) { - - if (srcFormat == texDestFormat) { - /* This will cover the common GL_RGB, GL_RGBA, GL_ALPHA, - * GL_LUMINANCE_ALPHA, etc. texture formats. Use memcpy(). - */ - const GLchan *src = (const GLchan *) _mesa_image_address( - srcPacking, srcAddr, srcWidth, srcHeight, - srcFormat, srcType, 0, 0, 0); - const GLint srcRowStride = _mesa_image_row_stride(srcPacking, - srcWidth, srcFormat, srcType); - const GLint widthInBytes = srcWidth * texComponents * sizeof(GLchan); - GLchan *dst = (GLchan *) texDestAddr - + dstYoffset * (dstRowStride / sizeof(GLchan)) - + dstXoffset * texComponents; - if (srcRowStride == widthInBytes && dstRowStride == widthInBytes) { - MEMCPY(dst, src, srcHeight * widthInBytes); - } - else { - GLint i; - for (i = 0; i < srcHeight; i++) { - MEMCPY(dst, src, widthInBytes); - src += (srcRowStride / sizeof(GLchan)); - dst += (dstRowStride / sizeof(GLchan)); - } - } - return; /* all done */ - } - else if (srcFormat == GL_RGBA && texDestFormat == GL_RGB) { - /* commonly used by Quake */ - const GLchan *src = (const GLchan *) _mesa_image_address( - srcPacking, srcAddr, srcWidth, srcHeight, - srcFormat, srcType, 0, 0, 0); - const GLint srcRowStride = _mesa_image_row_stride(srcPacking, - srcWidth, srcFormat, srcType); - GLchan *dst = (GLchan *) texDestAddr - + dstYoffset * (dstRowStride / sizeof(GLchan)) - + dstXoffset * texComponents; - GLint i, j; - for (i = 0; i < srcHeight; i++) { - const GLchan *s = src; - GLchan *d = dst; - for (j = 0; j < srcWidth; j++) { - *d++ = *s++; /*red*/ - *d++ = *s++; /*green*/ - *d++ = *s++; /*blue*/ - s++; /*alpha*/ - } - src += (srcRowStride / sizeof(GLchan)); - dst += (dstRowStride / sizeof(GLchan)); - } - return; /* all done */ - } - } - - /* - * General case solutions - */ - if (texDestFormat == GL_COLOR_INDEX) { - /* color index texture */ - const GLenum texType = CHAN_TYPE; - GLint img, row; - GLchan *dest = (GLchan *) texDestAddr - + dstZoffset * (dstImageStride / sizeof(GLchan)) - + dstYoffset * (dstRowStride / sizeof(GLchan)) - + dstXoffset * texComponents; - for (img = 0; img < srcDepth; img++) { - GLchan *destRow = dest; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - _mesa_unpack_index_span(ctx, srcWidth, texType, destRow, - srcType, src, srcPacking, transferOps); - destRow += (dstRowStride / sizeof(GLchan)); - } - dest += dstImageStride; - } - } - else if (texDestFormat == GL_YCBCR_MESA) { - /* YCbCr texture */ - GLint img, row; - GLushort *dest = (GLushort *) texDestAddr - + dstZoffset * (dstImageStride / sizeof(GLushort)) - + dstYoffset * (dstRowStride / sizeof(GLushort)) - + dstXoffset * texComponents; - ASSERT(ctx->Extensions.MESA_ycbcr_texture); - for (img = 0; img < srcDepth; img++) { - GLushort *destRow = dest; - for (row = 0; row < srcHeight; row++) { - const GLvoid *srcRow = _mesa_image_address(srcPacking, - srcAddr, srcWidth, srcHeight, - srcFormat, srcType, img, row, 0); - MEMCPY(destRow, srcRow, srcWidth * sizeof(GLushort)); - destRow += (dstRowStride / sizeof(GLushort)); - } - dest += dstImageStride / sizeof(GLushort); - } - } - else if (texDestFormat == GL_DEPTH_COMPONENT) { - /* Depth texture (shadow maps) */ - GLint img, row; - GLubyte *dest = (GLubyte *) texDestAddr - + dstZoffset * dstImageStride - + dstYoffset * (dstRowStride / sizeof(GLchan)) - + dstXoffset * texComponents; - for (img = 0; img < srcDepth; img++) { - GLubyte *destRow = dest; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - _mesa_unpack_depth_span(ctx, srcWidth, (GLfloat *) destRow, - srcType, src, srcPacking); - destRow += (dstRowStride / sizeof(GLchan)); - } - dest += dstImageStride; - } - } - else { - /* regular, color texture */ - if ((dimensions == 1 && ctx->Pixel.Convolution1DEnabled) || - (dimensions >= 2 && ctx->Pixel.Convolution2DEnabled) || - (dimensions >= 2 && ctx->Pixel.Separable2DEnabled)) { - /* - * Fill texture image with convolution - */ - GLint img, row; - GLint convWidth = srcWidth, convHeight = srcHeight; - GLfloat *tmpImage, *convImage; - tmpImage = (GLfloat *) MALLOC(srcWidth * srcHeight * 4 * sizeof(GLfloat)); - if (!tmpImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); - return; - } - convImage = (GLfloat *) MALLOC(srcWidth * srcHeight * 4 * sizeof(GLfloat)); - if (!convImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); - FREE(tmpImage); - return; - } - - for (img = 0; img < srcDepth; img++) { - const GLfloat *srcf; - GLfloat *dstf = tmpImage; - GLchan *dest; - - /* unpack and do transfer ops up to convolution */ - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(srcPacking, - srcAddr, srcWidth, srcHeight, - srcFormat, srcType, img, row, 0); - _mesa_unpack_float_color_span(ctx, srcWidth, GL_RGBA, dstf, - srcFormat, srcType, src, srcPacking, - transferOps & IMAGE_PRE_CONVOLUTION_BITS, - GL_TRUE); - dstf += srcWidth * 4; - } - - /* convolve */ - if (dimensions == 1) { - ASSERT(ctx->Pixel.Convolution1DEnabled); - _mesa_convolve_1d_image(ctx, &convWidth, tmpImage, convImage); - } - else { - if (ctx->Pixel.Convolution2DEnabled) { - _mesa_convolve_2d_image(ctx, &convWidth, &convHeight, - tmpImage, convImage); - } - else { - ASSERT(ctx->Pixel.Separable2DEnabled); - _mesa_convolve_sep_image(ctx, &convWidth, &convHeight, - tmpImage, convImage); - } - } - - /* packing and transfer ops after convolution */ - srcf = convImage; - dest = (GLchan *) texDestAddr - + (dstZoffset + img) * (dstImageStride / sizeof(GLchan)) - + dstYoffset * (dstRowStride / sizeof(GLchan)); - for (row = 0; row < convHeight; row++) { - _mesa_pack_float_rgba_span(ctx, convWidth, - (const GLfloat (*)[4]) srcf, - texDestFormat, CHAN_TYPE, - dest, &_mesa_native_packing, - transferOps - & IMAGE_POST_CONVOLUTION_BITS); - srcf += convWidth * 4; - dest += (dstRowStride / sizeof(GLchan)); - } - } - - FREE(convImage); - FREE(tmpImage); - } - else { - /* - * no convolution - */ - GLint img, row; - GLchan *dest = (GLchan *) texDestAddr - + dstZoffset * (dstImageStride / sizeof(GLchan)) - + dstYoffset * (dstRowStride / sizeof(GLchan)) - + dstXoffset * texComponents; - for (img = 0; img < srcDepth; img++) { - GLchan *destRow = dest; - for (row = 0; row < srcHeight; row++) { - const GLvoid *srcRow = _mesa_image_address(srcPacking, - srcAddr, srcWidth, srcHeight, - srcFormat, srcType, img, row, 0); - _mesa_unpack_chan_color_span(ctx, srcWidth, texDestFormat, - destRow, srcFormat, srcType, srcRow, - srcPacking, transferOps); - destRow += (dstRowStride / sizeof(GLchan)); - } - dest += dstImageStride / sizeof(GLchan); - } - } - } -} - - - -/* - * Transfer a texture image from user space to applying all - * needed image transfer operations and storing the result in the format - * specified by . may be any format from texformat.h. - * Input: - * dimensions - 1, 2 or 3 - * baseInternalFormat - base format of the internal texture format - * specified by the user. This is very important, see below. - * dstFormat - destination image format - * dstAddr - destination address - * srcWidth, srcHeight, srcDepth - size of source iamge - * dstX/Y/Zoffset - as specified by glTexSubImage - * dstRowStride - stride between dest rows in bytes - * dstImageStride - stride between dest images in bytes - * srcFormat, srcType - incoming image format and datatype - * srcAddr - source image address - * srcPacking - packing params of source image - * - * XXX this function is a bit more complicated than it should be. If - * _mesa_convert_texsubimage[123]d could handle any dest/source formats - * or if transfer_teximage() could store in any MESA_FORMAT_* format, we - * could simplify things here. - */ -void -_mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, - GLenum baseInternalFormat, - const struct gl_texture_format *dstFormat, - GLvoid *dstAddr, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, - GLint dstRowStride, GLint dstImageStride, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking) -{ - const GLint dstRowStridePixels = dstRowStride / dstFormat->TexelBytes; - const GLint dstImageStridePixels = dstImageStride / dstFormat->TexelBytes; - GLboolean makeTemp; - GLuint transferOps = ctx->_ImageTransferState; - GLboolean freeSourceData = GL_FALSE; - GLint postConvWidth = srcWidth, postConvHeight = srcHeight; - - assert(baseInternalFormat > 0); - ASSERT(baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_INTENSITY || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_COLOR_INDEX || - baseInternalFormat == GL_DEPTH_COMPONENT); - - if (transferOps & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dimensions, &postConvWidth, - &postConvHeight); - } - - /* - * Consider this scenario: The user's source image is GL_RGB and the - * requested internal format is GL_LUMINANCE. Now suppose the device - * driver doesn't support GL_LUMINANCE and instead uses RGB16 as the - * texture format. In that case we still need to do an intermediate - * conversion to luminance format so that the incoming red channel gets - * replicated into the dest red, green and blue channels. The following - * code takes care of that. - */ - if (dstFormat->BaseFormat != baseInternalFormat) { - /* Allocate storage for temporary image in the baseInternalFormat */ - const GLint texelSize = _mesa_components_in_format(baseInternalFormat) - * sizeof(GLchan); - const GLint bytes = texelSize * postConvWidth * postConvHeight *srcDepth; - const GLint tmpRowStride = texelSize * postConvWidth; - const GLint tmpImgStride = texelSize * postConvWidth * postConvHeight; - GLvoid *tmpImage = MALLOC(bytes); - if (!tmpImage) - return; - transfer_teximage(ctx, dimensions, baseInternalFormat, tmpImage, - srcWidth, srcHeight, srcDepth, - 0, 0, 0, /* x/y/zoffset */ - tmpRowStride, tmpImgStride, - srcFormat, srcType, srcAddr, srcPacking, transferOps); - - /* this is our new source image */ - srcWidth = postConvWidth; - srcHeight = postConvHeight; - srcFormat = baseInternalFormat; - srcType = CHAN_TYPE; - srcAddr = tmpImage; - srcPacking = &_mesa_native_packing; - freeSourceData = GL_TRUE; - transferOps = 0; /* image transfer ops were completed */ - } - - /* Let the optimized tex conversion functions take a crack at the - * image conversion if the dest format is a h/w format. - */ - if (_mesa_is_hardware_tex_format(dstFormat)) { - if (transferOps) { - makeTemp = GL_TRUE; - } - else { - if (dimensions == 1) { - makeTemp = !_mesa_convert_texsubimage1d(dstFormat->MesaFormat, - dstXoffset, - srcWidth, - srcFormat, srcType, - srcPacking, srcAddr, - dstAddr); - } - else if (dimensions == 2) { - makeTemp = !_mesa_convert_texsubimage2d(dstFormat->MesaFormat, - dstXoffset, dstYoffset, - srcWidth, srcHeight, - dstRowStridePixels, - srcFormat, srcType, - srcPacking, srcAddr, - dstAddr); - } - else { - assert(dimensions == 3); - makeTemp = !_mesa_convert_texsubimage3d(dstFormat->MesaFormat, - dstXoffset, dstYoffset, dstZoffset, - srcWidth, srcHeight, srcDepth, - dstRowStridePixels, dstImageStridePixels, - srcFormat, srcType, - srcPacking, srcAddr, dstAddr); - } - if (!makeTemp) { - /* all done! */ - if (freeSourceData) - FREE((void *) srcAddr); - return; - } - } - } - else { - /* software texture format */ - makeTemp = GL_FALSE; - } - - if (makeTemp) { - GLint postConvWidth = srcWidth, postConvHeight = srcHeight; - GLenum tmpFormat; - GLuint tmpComps, tmpTexelSize; - GLint tmpRowStride, tmpImageStride; - GLubyte *tmpImage; - - if (transferOps & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dimensions, &postConvWidth, - &postConvHeight); - } - - tmpFormat = dstFormat->BaseFormat; - tmpComps = _mesa_components_in_format(tmpFormat); - tmpTexelSize = tmpComps * sizeof(GLchan); - tmpRowStride = postConvWidth * tmpTexelSize; - tmpImageStride = postConvWidth * postConvHeight * tmpTexelSize; - tmpImage = (GLubyte *) MALLOC(postConvWidth * postConvHeight * - srcDepth * tmpTexelSize); - if (!tmpImage) { - if (freeSourceData) - FREE((void *) srcAddr); - return; - } - - transfer_teximage(ctx, dimensions, tmpFormat, tmpImage, - srcWidth, srcHeight, srcDepth, - 0, 0, 0, /* x/y/zoffset */ - tmpRowStride, tmpImageStride, - srcFormat, srcType, srcAddr, srcPacking, transferOps); - - if (freeSourceData) - FREE((void *) srcAddr); - - /* the temp image is our new source image */ - srcWidth = postConvWidth; - srcHeight = postConvHeight; - srcFormat = tmpFormat; - srcType = CHAN_TYPE; - srcAddr = tmpImage; - srcPacking = &_mesa_native_packing; - freeSourceData = GL_TRUE; - } - - if (_mesa_is_hardware_tex_format(dstFormat)) { - assert(makeTemp); - if (dimensions == 1) { - GLboolean b; - b = _mesa_convert_texsubimage1d(dstFormat->MesaFormat, - dstXoffset, - srcWidth, - srcFormat, srcType, - srcPacking, srcAddr, - dstAddr); - (void)b; - assert(b); - } - else if (dimensions == 2) { - GLboolean b; - b = _mesa_convert_texsubimage2d(dstFormat->MesaFormat, - dstXoffset, dstYoffset, - srcWidth, srcHeight, - dstRowStridePixels, - srcFormat, srcType, - srcPacking, srcAddr, - dstAddr); - (void)b; - assert(b); - } - else { - GLboolean b; - b = _mesa_convert_texsubimage3d(dstFormat->MesaFormat, - dstXoffset, dstYoffset, dstZoffset, - srcWidth, srcHeight, srcDepth, - dstRowStridePixels, dstImageStridePixels, - srcFormat, srcType, - srcPacking, srcAddr, dstAddr); - (void)b; - assert(b); - } - } - else { - /* software format */ - assert(!makeTemp); - transfer_teximage(ctx, dimensions, dstFormat->BaseFormat, dstAddr, - srcWidth, srcHeight, srcDepth, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageStride, - srcFormat, srcType, srcAddr, srcPacking, transferOps); - } - - if (freeSourceData) - FREE((void *) srcAddr); /* the temp image */ -} - - - -/** - * Given a user's uncompressed texture image, this function takes care of - * pixel unpacking, pixel transfer, format conversion and compression. - */ -static void -transfer_compressed_teximage(GLcontext *ctx, GLuint dimensions, - GLsizei width, GLsizei height, GLsizei depth, - GLenum srcFormat, GLenum srcType, - const struct gl_pixelstore_attrib *unpacking, - const GLvoid *source, - const struct gl_texture_format *dstFormat, - GLubyte *dest, - GLint dstRowStride) -{ - GLchan *tempImage = NULL; - GLint srcRowStride; - GLenum baseFormat; - - ASSERT(dimensions == 2); - /* TexelBytes is zero if and only if it's a compressed format */ - ASSERT(dstFormat->TexelBytes == 0); - - baseFormat = dstFormat->BaseFormat; - - if (srcFormat != baseFormat || srcType != CHAN_TYPE || - ctx->_ImageTransferState != 0 || unpacking->SwapBytes) { - /* need to convert user's image to texImage->Format, GLchan */ - GLint comps = components_in_intformat(baseFormat); - GLint postConvWidth = width, postConvHeight = height; - - /* XXX convolution untested */ - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, dimensions, &postConvWidth, - &postConvHeight); - } - - tempImage = (GLchan*) MALLOC(width * height * comps * sizeof(GLchan)); - if (!tempImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - return; - } - transfer_teximage(ctx, dimensions, - baseFormat, /* dest format */ - tempImage, /* dst address */ - width, height, depth, /* src size */ - 0, 0, 0, /* x/y/zoffset */ - comps * width, /* dst row stride */ - comps * width * height, /* dst image stride */ - srcFormat, srcType, /* src format, type */ - source, unpacking, /* src and src packing */ - ctx->_ImageTransferState); - source = tempImage; - width = postConvWidth; - height = postConvHeight; - srcRowStride = width; - } - else { - if (unpacking->RowLength) - srcRowStride = unpacking->RowLength; - else - srcRowStride = width; - } - - _mesa_compress_teximage(ctx, width, height, baseFormat, - (const GLchan *) source, srcRowStride, - dstFormat, dest, dstRowStride); - if (tempImage) { - FREE(tempImage); - } -} - - - -/* - * This is the software fallback for Driver.TexImage1D() - * and Driver.CopyTexImage2D(). - * The texture image type will be GLchan. - * The texture image format will be GL_COLOR_INDEX, GL_INTENSITY, - * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_ALPHA, GL_RGB or GL_RGBA. - */ -void -_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLint postConvWidth = width; - GLint texelBytes, sizeInBytes; - - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL); - } - - /* choose the texture format */ - assert(ctx->Driver.ChooseTextureFormat); - texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, - internalFormat, format, type); - assert(texImage->TexFormat); - texImage->FetchTexel = texImage->TexFormat->FetchTexel1D; - - texelBytes = texImage->TexFormat->TexelBytes; - - /* allocate memory */ - if (texImage->IsCompressed) - sizeInBytes = texImage->CompressedSize; - else - sizeInBytes = postConvWidth * texelBytes; - texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); - return; - } - - if (!pixels) - return; - - /* unpack image, apply transfer ops and store in texImage->Data */ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - width); - transfer_compressed_teximage(ctx, 1, width, 1, 1, - format, type, packing, - pixels, texImage->TexFormat, - (GLubyte *) texImage->Data, dstRowStride); - } - else { - _mesa_transfer_teximage(ctx, 1, - texImage->Format, /* base format */ - texImage->TexFormat, texImage->Data, - width, 1, 1, /* src size */ - 0, 0, 0, /* dstX/Y/Zoffset */ - 0, /* dstRowStride */ - 0, /* dstImageStride */ - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - -/* - * This is the software fallback for Driver.TexImage2D() - * and Driver.CopyTexImage2D(). - * The texture image type will be GLchan. - * The texture image format will be GL_COLOR_INDEX, GL_INTENSITY, - * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_ALPHA, GL_RGB or GL_RGBA. - */ -void -_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLint postConvWidth = width, postConvHeight = height; - GLint texelBytes, sizeInBytes; - - if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) { - _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, - &postConvHeight); - } - - /* choose the texture format */ - assert(ctx->Driver.ChooseTextureFormat); - texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, - internalFormat, format, type); - assert(texImage->TexFormat); - texImage->FetchTexel = texImage->TexFormat->FetchTexel2D; - - texelBytes = texImage->TexFormat->TexelBytes; - - /* allocate memory */ - if (texImage->IsCompressed) - sizeInBytes = texImage->CompressedSize; - else - sizeInBytes = postConvWidth * postConvHeight * texelBytes; - texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - return; - } - - if (!pixels) - return; - - /* unpack image, apply transfer ops and store in texImage->Data */ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - width); - transfer_compressed_teximage(ctx, 2, width, height, 1, - format, type, packing, - pixels, texImage->TexFormat, - (GLubyte *) texImage->Data, dstRowStride); - } - else { - _mesa_transfer_teximage(ctx, 2, - texImage->Format, - texImage->TexFormat, texImage->Data, - width, height, 1, /* src size */ - 0, 0, 0, /* dstX/Y/Zoffset */ - texImage->Width * texelBytes, /* dstRowStride */ - 0, /* dstImageStride */ - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - - -/* - * This is the software fallback for Driver.TexImage3D() - * and Driver.CopyTexImage3D(). - * The texture image type will be GLchan. - * The texture image format will be GL_COLOR_INDEX, GL_INTENSITY, - * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_ALPHA, GL_RGB or GL_RGBA. - */ -void -_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLint texelBytes, sizeInBytes; - - /* choose the texture format */ - assert(ctx->Driver.ChooseTextureFormat); - texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, - internalFormat, format, type); - assert(texImage->TexFormat); - texImage->FetchTexel = texImage->TexFormat->FetchTexel3D; - - texelBytes = texImage->TexFormat->TexelBytes; - - /* allocate memory */ - if (texImage->IsCompressed) - sizeInBytes = texImage->CompressedSize; - else - sizeInBytes = width * height * depth * texelBytes; - texImage->Data = MESA_PBUFFER_ALLOC(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); - return; - } - - if (!pixels) - return; - - /* unpack image, apply transfer ops and store in texImage->Data */ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - width); - transfer_compressed_teximage(ctx, 3, width, height, depth, - format, type, packing, - pixels, texImage->TexFormat, - (GLubyte *) texImage->Data, dstRowStride); - } - else { - _mesa_transfer_teximage(ctx, 3, - texImage->Format, - texImage->TexFormat, texImage->Data, - width, height, depth, /* src size */ - 0, 0, 0, /* dstX/Y/Zoffset */ - texImage->Width * texelBytes, /* dstRowStride */ - texImage->Width * texImage->Height * texelBytes, - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - - - -/* - * This is the software fallback for Driver.TexSubImage1D() - * and Driver.CopyTexSubImage1D(). - */ -void -_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint width, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - texImage->Width); - GLubyte *dest = _mesa_compressed_image_address(xoffset, 0, 0, - texImage->IntFormat, - texImage->Width, - (GLubyte*) texImage->Data); - transfer_compressed_teximage(ctx, 1, /* dimensions */ - width, 1, 1, /* size to replace */ - format, type, /* source format/type */ - packing, /* source packing */ - pixels, /* source data */ - texImage->TexFormat,/* dest format */ - dest, dstRowStride); - } - else { - _mesa_transfer_teximage(ctx, 1, - texImage->Format, - texImage->TexFormat, texImage->Data, - width, 1, 1, /* src size */ - xoffset, 0, 0, /* dest offsets */ - 0, /* dstRowStride */ - 0, /* dstImageStride */ - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - - -/* - * This is the software fallback for Driver.TexSubImage2D() - * and Driver.CopyTexSubImage2D(). - */ -void -_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint width, GLint height, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - texImage->Width); - GLubyte *dest = _mesa_compressed_image_address(xoffset, yoffset, 0, - texImage->IntFormat, - texImage->Width, - (GLubyte*) texImage->Data); - transfer_compressed_teximage(ctx, 2, /* dimensions */ - width, height, 1, /* size to replace */ - format, type, /* source format/type */ - packing, /* source packing */ - pixels, /* source data */ - texImage->TexFormat,/* dest format */ - dest, dstRowStride); - } - else { - _mesa_transfer_teximage(ctx, 2, - texImage->Format, - texImage->TexFormat, texImage->Data, - width, height, 1, /* src size */ - xoffset, yoffset, 0, /* dest offsets */ - texImage->Width *texImage->TexFormat->TexelBytes, - 0, /* dstImageStride */ - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - -/* - * This is the software fallback for Driver.TexSubImage3D(). - * and Driver.CopyTexSubImage3D(). - */ -void -_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - if (texImage->IsCompressed) { - GLint dstRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - texImage->Width); - GLubyte *dest = _mesa_compressed_image_address(xoffset, yoffset, zoffset, - texImage->IntFormat, - texImage->Width, - (GLubyte*) texImage->Data); - transfer_compressed_teximage(ctx, 3, /* dimensions */ - width, height, depth,/* size to replace */ - format, type, /* source format/type */ - packing, /* source packing */ - pixels, /* source data */ - texImage->TexFormat,/* dest format */ - dest, dstRowStride); - } - else { - const GLint texelBytes = texImage->TexFormat->TexelBytes; - _mesa_transfer_teximage(ctx, 3, - texImage->Format, - texImage->TexFormat, texImage->Data, - width, height, depth, /* src size */ - xoffset, yoffset, zoffset, /* dest offsets */ - texImage->Width * texelBytes, /* dst row stride */ - texImage->Width * texImage->Height * texelBytes, - format, type, pixels, packing); - } - - /* GL_SGIS_generate_mipmap */ - if (level == texObj->BaseLevel && texObj->GenerateMipmap) { - _mesa_generate_mipmap(ctx, target, - &ctx->Texture.Unit[ctx->Texture.CurrentUnit], - texObj); - } -} - - - - -/* - * Fallback for Driver.CompressedTexImage1D() - */ -void -_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ -} - - - -/* - * Fallback for Driver.CompressedTexImage2D() - */ -void -_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* This is pretty simple, basically just do a memcpy without worrying - * about the usual image unpacking or image transfer operations. - */ - ASSERT(texObj); - ASSERT(texImage); - ASSERT(texImage->Width > 0); - ASSERT(texImage->Height > 0); - ASSERT(texImage->Depth == 1); - ASSERT(texImage->Data == NULL); /* was freed in glCompressedTexImage2DARB */ - - /* choose the texture format */ - assert(ctx->Driver.ChooseTextureFormat); - texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, - internalFormat, 0, 0); - assert(texImage->TexFormat); - texImage->FetchTexel = texImage->TexFormat->FetchTexel2D; - - /* allocate storage */ - texImage->Data = MESA_PBUFFER_ALLOC(imageSize); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); - return; - } - - /* copy the data */ - ASSERT(texImage->CompressedSize == imageSize); - MEMCPY(texImage->Data, data, imageSize); -} - - - -/* - * Fallback for Driver.CompressedTexImage3D() - */ -void -_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ -} - - - -/** - * Fallback for Driver.CompressedTexSubImage1D() - */ -void -_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ -} - - -/** - * Fallback for Driver.CompressedTexSubImage2D() - */ -void -_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLint bytesPerRow, destRowStride, srcRowStride; - GLint i, rows; - GLubyte *dest; - const GLubyte *src; - - /* these should have been caught sooner */ - ASSERT((width & 3) == 0 || width == 2 || width == 1); - ASSERT((height & 3) == 0 || height == 2 || height == 1); - ASSERT((xoffset & 3) == 0); - ASSERT((yoffset & 3) == 0); - - srcRowStride = _mesa_compressed_row_stride(texImage->IntFormat, width); - src = (const GLubyte *) data; - - destRowStride = _mesa_compressed_row_stride(texImage->IntFormat, - texImage->Width); - dest = _mesa_compressed_image_address(xoffset, yoffset, 0, - texImage->IntFormat, - texImage->Width, - (GLubyte*) texImage->Data); - - bytesPerRow = srcRowStride; - rows = height / 4; - - for (i = 0; i < rows; i++) { - MEMCPY(dest, src, bytesPerRow); - dest += destRowStride; - src += srcRowStride; - } -} - - -/** - * Fallback for Driver.CompressedTexSubImage3D() - */ -void -_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ -} - - - - - -/* - * This is the fallback for Driver.TestProxyTexImage(). - */ -GLboolean -_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, GLenum format, GLenum type, - GLint width, GLint height, GLint depth, GLint border) -{ - struct gl_texture_unit *texUnit; - struct gl_texture_image *texImage; - - (void) format; - (void) type; - - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - texImage = _mesa_select_tex_image(ctx, texUnit, target, level); - - /* We always pass. - * The core Mesa code will have already tested the image size, etc. - * If a driver has more stringent texture limits to enforce it will - * have to override this function. - */ - /* choose the texture format */ - assert(ctx->Driver.ChooseTextureFormat); - texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, - internalFormat, format, type); - assert(texImage->TexFormat); - - return GL_TRUE; -} - - - -/* - * Average together two rows of a source image to produce a single new - * row in the dest image. It's legal for the two source rows to point - * to the same data. The source width must be equal to either the - * dest width or two times the dest width. - */ -static void -do_row(const struct gl_texture_format *format, GLint srcWidth, - const GLvoid *srcRowA, const GLvoid *srcRowB, - GLint dstWidth, GLvoid *dstRow) -{ - const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1; - const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2; - - assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth); - - switch (format->MesaFormat) { - case MESA_FORMAT_RGBA: - { - GLuint i, j, k; - const GLchan (*rowA)[4] = (const GLchan (*)[4]) srcRowA; - const GLchan (*rowB)[4] = (const GLchan (*)[4]) srcRowB; - GLchan (*dst)[4] = (GLchan (*)[4]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) / 4; - dst[i][3] = (rowA[j][3] + rowA[k][3] + - rowB[j][3] + rowB[k][3]) / 4; - } - } - return; - case MESA_FORMAT_RGB: - { - GLuint i, j, k; - const GLchan (*rowA)[3] = (const GLchan (*)[3]) srcRowA; - const GLchan (*rowB)[3] = (const GLchan (*)[3]) srcRowB; - GLchan (*dst)[3] = (GLchan (*)[3]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) / 4; - } - } - return; - case MESA_FORMAT_ALPHA: - case MESA_FORMAT_LUMINANCE: - case MESA_FORMAT_INTENSITY: - case MESA_FORMAT_COLOR_INDEX: - { - GLuint i, j, k; - const GLchan *rowA = (const GLchan *) srcRowA; - const GLchan *rowB = (const GLchan *) srcRowB; - GLchan *dst = (GLchan *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4; - } - } - return; - case MESA_FORMAT_LUMINANCE_ALPHA: - { - GLuint i, j, k; - const GLchan (*rowA)[2] = (const GLchan (*)[2]) srcRowA; - const GLchan (*rowB)[2] = (const GLchan (*)[2]) srcRowB; - GLchan (*dst)[2] = (GLchan (*)[2]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) / 4; - } - } - return; - case MESA_FORMAT_DEPTH_COMPONENT: - { - GLuint i, j, k; - const GLfloat *rowA = (const GLfloat *) srcRowA; - const GLfloat *rowB = (const GLfloat *) srcRowB; - GLfloat *dst = (GLfloat *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F; - } - } - return; - /* Begin hardware formats */ - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_ARGB8888: - { - GLuint i, j, k; - const GLubyte (*rowA)[4] = (const GLubyte (*)[4]) srcRowA; - const GLubyte (*rowB)[4] = (const GLubyte (*)[4]) srcRowB; - GLubyte (*dst)[4] = (GLubyte (*)[4]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) / 4; - dst[i][3] = (rowA[j][3] + rowA[k][3] + - rowB[j][3] + rowB[k][3]) / 4; - } - } - return; - case MESA_FORMAT_RGB888: - { - GLuint i, j, k; - const GLubyte (*rowA)[3] = (const GLubyte (*)[3]) srcRowA; - const GLubyte (*rowB)[3] = (const GLubyte (*)[3]) srcRowB; - GLubyte (*dst)[3] = (GLubyte (*)[3]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) / 4; - } - } - return; - case MESA_FORMAT_RGB565: - { - GLuint i, j, k; - const GLushort *rowA = (const GLushort *) srcRowA; - const GLushort *rowB = (const GLushort *) srcRowB; - GLushort *dst = (GLushort *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - const GLint rowAr0 = rowA[j] & 0x1f; - const GLint rowAr1 = rowA[k] & 0x1f; - const GLint rowBr0 = rowB[j] & 0x1f; - const GLint rowBr1 = rowB[k] & 0x1f; - const GLint rowAg0 = (rowA[j] >> 5) & 0x3f; - const GLint rowAg1 = (rowA[k] >> 5) & 0x3f; - const GLint rowBg0 = (rowB[j] >> 5) & 0x3f; - const GLint rowBg1 = (rowB[k] >> 5) & 0x3f; - const GLint rowAb0 = (rowA[j] >> 11) & 0x1f; - const GLint rowAb1 = (rowA[k] >> 11) & 0x1f; - const GLint rowBb0 = (rowB[j] >> 11) & 0x1f; - const GLint rowBb1 = (rowB[k] >> 11) & 0x1f; - const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4; - const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4; - const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4; - dst[i] = (blue << 11) | (green << 5) | red; - } - } - return; - case MESA_FORMAT_ARGB4444: - { - GLuint i, j, k; - const GLushort *rowA = (const GLushort *) srcRowA; - const GLushort *rowB = (const GLushort *) srcRowB; - GLushort *dst = (GLushort *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - const GLint rowAr0 = rowA[j] & 0xf; - const GLint rowAr1 = rowA[k] & 0xf; - const GLint rowBr0 = rowB[j] & 0xf; - const GLint rowBr1 = rowB[k] & 0xf; - const GLint rowAg0 = (rowA[j] >> 4) & 0xf; - const GLint rowAg1 = (rowA[k] >> 4) & 0xf; - const GLint rowBg0 = (rowB[j] >> 4) & 0xf; - const GLint rowBg1 = (rowB[k] >> 4) & 0xf; - const GLint rowAb0 = (rowA[j] >> 8) & 0xf; - const GLint rowAb1 = (rowA[k] >> 8) & 0xf; - const GLint rowBb0 = (rowB[j] >> 8) & 0xf; - const GLint rowBb1 = (rowB[k] >> 8) & 0xf; - const GLint rowAa0 = (rowA[j] >> 12) & 0xf; - const GLint rowAa1 = (rowA[k] >> 12) & 0xf; - const GLint rowBa0 = (rowB[j] >> 12) & 0xf; - const GLint rowBa1 = (rowB[k] >> 12) & 0xf; - const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4; - const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4; - const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4; - const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 4; - dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red; - } - } - return; - case MESA_FORMAT_ARGB1555: - { - GLuint i, j, k; - const GLushort *rowA = (const GLushort *) srcRowA; - const GLushort *rowB = (const GLushort *) srcRowB; - GLushort *dst = (GLushort *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - const GLint rowAr0 = rowA[j] & 0x1f; - const GLint rowAr1 = rowA[k] & 0x1f; - const GLint rowBr0 = rowB[j] & 0x1f; - const GLint rowBr1 = rowB[k] & 0xf; - const GLint rowAg0 = (rowA[j] >> 5) & 0x1f; - const GLint rowAg1 = (rowA[k] >> 5) & 0x1f; - const GLint rowBg0 = (rowB[j] >> 5) & 0x1f; - const GLint rowBg1 = (rowB[k] >> 5) & 0x1f; - const GLint rowAb0 = (rowA[j] >> 10) & 0x1f; - const GLint rowAb1 = (rowA[k] >> 10) & 0x1f; - const GLint rowBb0 = (rowB[j] >> 10) & 0x1f; - const GLint rowBb1 = (rowB[k] >> 10) & 0x1f; - const GLint rowAa0 = (rowA[j] >> 15) & 0x1; - const GLint rowAa1 = (rowA[k] >> 15) & 0x1; - const GLint rowBa0 = (rowB[j] >> 15) & 0x1; - const GLint rowBa1 = (rowB[k] >> 15) & 0x1; - const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4; - const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4; - const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4; - const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 4; - dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red; - } - } - return; - case MESA_FORMAT_AL88: - { - GLuint i, j, k; - const GLubyte (*rowA)[2] = (const GLubyte (*)[2]) srcRowA; - const GLubyte (*rowB)[2] = (const GLubyte (*)[2]) srcRowB; - GLubyte (*dst)[2] = (GLubyte (*)[2]) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) >> 2; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) >> 2; - } - } - return; - case MESA_FORMAT_RGB332: - { - GLuint i, j, k; - const GLubyte *rowA = (const GLubyte *) srcRowA; - const GLubyte *rowB = (const GLubyte *) srcRowB; - GLubyte *dst = (GLubyte *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - const GLint rowAr0 = rowA[j] & 0x3; - const GLint rowAr1 = rowA[k] & 0x3; - const GLint rowBr0 = rowB[j] & 0x3; - const GLint rowBr1 = rowB[k] & 0x3; - const GLint rowAg0 = (rowA[j] >> 2) & 0x7; - const GLint rowAg1 = (rowA[k] >> 2) & 0x7; - const GLint rowBg0 = (rowB[j] >> 2) & 0x7; - const GLint rowBg1 = (rowB[k] >> 2) & 0x7; - const GLint rowAb0 = (rowA[j] >> 5) & 0x7; - const GLint rowAb1 = (rowA[k] >> 5) & 0x7; - const GLint rowBb0 = (rowB[j] >> 5) & 0x7; - const GLint rowBb1 = (rowB[k] >> 5) & 0x7; - const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4; - const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4; - const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4; - dst[i] = (blue << 5) | (green << 2) | red; - } - } - return; - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: - case MESA_FORMAT_CI8: - { - GLuint i, j, k; - const GLubyte *rowA = (const GLubyte *) srcRowA; - const GLubyte *rowB = (const GLubyte *) srcRowB; - GLubyte *dst = (GLubyte *) dstRow; - for (i = j = 0, k = k0; i < (GLuint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2; - } - } - return; - default: - _mesa_problem(NULL, "bad format in do_row()"); - } -} - - -/* - * These functions generate a 1/2-size mipmap image from a source image. - * Texture borders are handled by copying or averaging the source image's - * border texels, depending on the scale-down factor. - */ - -static void -make_1d_mipmap(const struct gl_texture_format *format, GLint border, - GLint srcWidth, const GLubyte *srcPtr, - GLint dstWidth, GLubyte *dstPtr) -{ - const GLint bpt = format->TexelBytes; - const GLubyte *src; - GLubyte *dst; - - /* skip the border pixel, if any */ - src = srcPtr + border * bpt; - dst = dstPtr + border * bpt; - - /* we just duplicate the input row, kind of hack, saves code */ - do_row(format, srcWidth - 2 * border, src, src, - dstWidth - 2 * border, dst); - - if (border) { - /* copy left-most pixel from source */ - MEMCPY(dstPtr, srcPtr, bpt); - /* copy right-most pixel from source */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, - srcPtr + (srcWidth - 1) * bpt, - bpt); - } -} - - -static void -make_2d_mipmap(const struct gl_texture_format *format, GLint border, - GLint srcWidth, GLint srcHeight, const GLubyte *srcPtr, - GLint dstWidth, GLint dstHeight, GLubyte *dstPtr) -{ - const GLint bpt = format->TexelBytes; - const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ - const GLint dstWidthNB = dstWidth - 2 * border; - const GLint dstHeightNB = dstHeight - 2 * border; - const GLint srcRowStride = bpt * srcWidth; - const GLint dstRowStride = bpt * dstWidth; - const GLubyte *srcA, *srcB; - GLubyte *dst; - GLint row; - - /* Compute src and dst pointers, skipping any border */ - srcA = srcPtr + border * ((srcWidth + 1) * bpt); - if (srcHeight > 1) - srcB = srcA + srcRowStride; - else - srcB = srcA; - dst = dstPtr + border * ((dstWidth + 1) * bpt); - - for (row = 0; row < dstHeightNB; row++) { - do_row(format, srcWidthNB, srcA, srcB, - dstWidthNB, dst); - srcA += 2 * srcRowStride; - srcB += 2 * srcRowStride; - dst += dstRowStride; - } - - /* This is ugly but probably won't be used much */ - if (border > 0) { - /* fill in dest border */ - /* lower-left border pixel */ - MEMCPY(dstPtr, srcPtr, bpt); - /* lower-right border pixel */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, - srcPtr + (srcWidth - 1) * bpt, bpt); - /* upper-left border pixel */ - MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt, - srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt); - /* upper-right border pixel */ - MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt, - srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt); - /* lower border */ - do_row(format, srcWidthNB, - srcPtr + bpt, - srcPtr + bpt, - dstWidthNB, dstPtr + bpt); - /* upper border */ - do_row(format, srcWidthNB, - srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, - srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, - dstWidthNB, - dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt); - /* left and right borders */ - if (srcHeight == dstHeight) { - /* copy border pixel from src to dst */ - for (row = 1; row < srcHeight; row++) { - MEMCPY(dstPtr + dstWidth * row * bpt, - srcPtr + srcWidth * row * bpt, bpt); - MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, - srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt); - } - } - else { - /* average two src pixels each dest pixel */ - for (row = 0; row < dstHeightNB; row += 2) { - do_row(format, 1, - srcPtr + (srcWidth * (row * 2 + 1)) * bpt, - srcPtr + (srcWidth * (row * 2 + 2)) * bpt, - 1, dstPtr + (dstWidth * row + 1) * bpt); - do_row(format, 1, - srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt, - srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt, - 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt); - } - } - } -} - - -static void -make_3d_mipmap(const struct gl_texture_format *format, GLint border, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - const GLubyte *srcPtr, - GLint dstWidth, GLint dstHeight, GLint dstDepth, - GLubyte *dstPtr) -{ - const GLint bpt = format->TexelBytes; - const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ - const GLint srcDepthNB = srcDepth - 2 * border; - const GLint dstWidthNB = dstWidth - 2 * border; - const GLint dstHeightNB = dstHeight - 2 * border; - const GLint dstDepthNB = dstDepth - 2 * border; - GLvoid *tmpRowA, *tmpRowB; - GLint img, row; - GLint bytesPerSrcImage, bytesPerDstImage; - GLint bytesPerSrcRow, bytesPerDstRow; - GLint srcImageOffset, srcRowOffset; - - (void) srcDepthNB; /* silence warnings */ - - /* Need two temporary row buffers */ - tmpRowA = MALLOC(srcWidth * bpt); - if (!tmpRowA) - return; - tmpRowB = MALLOC(srcWidth * bpt); - if (!tmpRowB) { - FREE(tmpRowA); - return; - } - - bytesPerSrcImage = srcWidth * srcHeight * bpt; - bytesPerDstImage = dstWidth * dstHeight * bpt; - - bytesPerSrcRow = srcWidth * bpt; - bytesPerDstRow = dstWidth * bpt; - - /* Offset between adjacent src images to be averaged together */ - srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage; - - /* Offset between adjacent src rows to be averaged together */ - srcRowOffset = (srcHeight == dstHeight) ? 0 : srcWidth * bpt; - - /* - * Need to average together up to 8 src pixels for each dest pixel. - * Break that down into 3 operations: - * 1. take two rows from source image and average them together. - * 2. take two rows from next source image and average them together. - * 3. take the two averaged rows and average them for the final dst row. - */ - - /* - _mesa_printf("mip3d %d x %d x %d -> %d x %d x %d\n", - srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth); - */ - - for (img = 0; img < dstDepthNB; img++) { - /* first source image pointer, skipping border */ - const GLubyte *imgSrcA = srcPtr - + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border - + img * (bytesPerSrcImage + srcImageOffset); - /* second source image pointer, skipping border */ - const GLubyte *imgSrcB = imgSrcA + srcImageOffset; - /* address of the dest image, skipping border */ - GLubyte *imgDst = dstPtr - + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border - + img * bytesPerDstImage; - - /* setup the four source row pointers and the dest row pointer */ - const GLubyte *srcImgARowA = imgSrcA; - const GLubyte *srcImgARowB = imgSrcA + srcRowOffset; - const GLubyte *srcImgBRowA = imgSrcB; - const GLubyte *srcImgBRowB = imgSrcB + srcRowOffset; - GLubyte *dstImgRow = imgDst; - - for (row = 0; row < dstHeightNB; row++) { - /* Average together two rows from first src image */ - do_row(format, srcWidthNB, srcImgARowA, srcImgARowB, - srcWidthNB, tmpRowA); - /* Average together two rows from second src image */ - do_row(format, srcWidthNB, srcImgBRowA, srcImgBRowB, - srcWidthNB, tmpRowB); - /* Average together the temp rows to make the final row */ - do_row(format, srcWidthNB, tmpRowA, tmpRowB, - dstWidthNB, dstImgRow); - /* advance to next rows */ - srcImgARowA += bytesPerSrcRow + srcRowOffset; - srcImgARowB += bytesPerSrcRow + srcRowOffset; - srcImgBRowA += bytesPerSrcRow + srcRowOffset; - srcImgBRowB += bytesPerSrcRow + srcRowOffset; - dstImgRow += bytesPerDstRow; - } - } - - FREE(tmpRowA); - FREE(tmpRowB); - - /* Luckily we can leverage the make_2d_mipmap() function here! */ - if (border > 0) { - /* do front border image */ - make_2d_mipmap(format, 1, srcWidth, srcHeight, srcPtr, - dstWidth, dstHeight, dstPtr); - /* do back border image */ - make_2d_mipmap(format, 1, srcWidth, srcHeight, - srcPtr + bytesPerSrcImage * (srcDepth - 1), - dstWidth, dstHeight, - dstPtr + bytesPerDstImage * (dstDepth - 1)); - /* do four remaining border edges that span the image slices */ - if (srcDepth == dstDepth) { - /* just copy border pixels from src to dst */ - for (img = 0; img < dstDepthNB; img++) { - const GLubyte *src; - GLubyte *dst; - - /* do border along [img][row=0][col=0] */ - src = srcPtr + (img + 1) * bytesPerSrcImage; - dst = dstPtr + (img + 1) * bytesPerDstImage; - MEMCPY(dst, src, bpt); - - /* do border along [img][row=dstHeight-1][col=0] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (srcHeight - 1) * bytesPerSrcRow; - dst = dstPtr + (img + 1) * bytesPerDstImage - + (dstHeight - 1) * bytesPerDstRow; - MEMCPY(dst, src, bpt); - - /* do border along [img][row=0][col=dstWidth-1] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (srcWidth - 1) * bpt; - dst = dstPtr + (img + 1) * bytesPerDstImage - + (dstWidth - 1) * bpt; - MEMCPY(dst, src, bpt); - - /* do border along [img][row=dstHeight-1][col=dstWidth-1] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (bytesPerSrcImage - bpt); - dst = dstPtr + (img + 1) * bytesPerDstImage - + (bytesPerDstImage - bpt); - MEMCPY(dst, src, bpt); - } - } - else { - /* average border pixels from adjacent src image pairs */ - ASSERT(srcDepthNB == 2 * dstDepthNB); - for (img = 0; img < dstDepthNB; img++) { - const GLubyte *src; - GLubyte *dst; - - /* do border along [img][row=0][col=0] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage; - dst = dstPtr + (img + 1) * bytesPerDstImage; - do_row(format, 1, src, src + srcImageOffset, 1, dst); - - /* do border along [img][row=dstHeight-1][col=0] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (srcHeight - 1) * bytesPerSrcRow; - dst = dstPtr + (img + 1) * bytesPerDstImage - + (dstHeight - 1) * bytesPerDstRow; - do_row(format, 1, src, src + srcImageOffset, 1, dst); - - /* do border along [img][row=0][col=dstWidth-1] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (srcWidth - 1) * bpt; - dst = dstPtr + (img + 1) * bytesPerDstImage - + (dstWidth - 1) * bpt; - do_row(format, 1, src, src + srcImageOffset, 1, dst); - - /* do border along [img][row=dstHeight-1][col=dstWidth-1] */ - src = srcPtr + (img * 2 + 1) * bytesPerSrcImage - + (bytesPerSrcImage - bpt); - dst = dstPtr + (img + 1) * bytesPerDstImage - + (bytesPerDstImage - bpt); - do_row(format, 1, src, src + srcImageOffset, 1, dst); - } - } - } -} - - -/* - * For GL_SGIX_generate_mipmap: - * Generate a complete set of mipmaps from texObj's base-level image. - * Stop at texObj's MaxLevel or when we get to the 1x1 texture. - */ -void -_mesa_generate_mipmap(GLcontext *ctx, GLenum target, - const struct gl_texture_unit *texUnit, - struct gl_texture_object *texObj) -{ - const struct gl_texture_image *srcImage; - const struct gl_texture_format *convertFormat; - const GLubyte *srcData = NULL; - GLubyte *dstData = NULL; - GLint level, maxLevels; - - ASSERT(texObj); - srcImage = texObj->Image[texObj->BaseLevel]; - ASSERT(srcImage); - - maxLevels = _mesa_max_texture_levels(ctx, texObj->Target); - ASSERT(maxLevels > 0); /* bad target */ - - /* Find convertFormat - the format that do_row() will process */ - if (srcImage->IsCompressed) { - /* setup for compressed textures */ - GLuint row; - GLint components, size; - GLchan *dst; - - assert(texObj->Target == GL_TEXTURE_2D); - - if (srcImage->Format == GL_RGB) { - convertFormat = &_mesa_texformat_rgb; - components = 3; - } - else if (srcImage->Format == GL_RGBA) { - convertFormat = &_mesa_texformat_rgba; - components = 4; - } - else { - _mesa_problem(ctx, "bad srcImage->Format in _mesa_generate_mipmaps"); - return; - } - - /* allocate storage for uncompressed GL_RGB or GL_RGBA images */ - size = _mesa_bytes_per_pixel(srcImage->Format, CHAN_TYPE) - * srcImage->Width * srcImage->Height * srcImage->Depth + 20; - /* 20 extra bytes, just be safe when calling last FetchTexel */ - srcData = (GLubyte *) MALLOC(size); - if (!srcData) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); - return; - } - dstData = (GLubyte *) MALLOC(size / 2); /* 1/4 would probably be OK */ - if (!dstData) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); - FREE((void *) srcData); - return; - } - - /* decompress base image here */ - dst = (GLchan *) srcData; - for (row = 0; row < srcImage->Height; row++) { - GLuint col; - for (col = 0; col < srcImage->Width; col++) { - (*srcImage->FetchTexel)(srcImage, col, row, 0, (GLvoid *) dst); - dst += components; - } - } - } - else { - /* uncompressed */ - convertFormat = srcImage->TexFormat; - } - - for (level = texObj->BaseLevel; level < texObj->MaxLevel - && level < maxLevels - 1; level++) { - /* generate image[level+1] from image[level] */ - const struct gl_texture_image *srcImage; - struct gl_texture_image *dstImage; - GLint srcWidth, srcHeight, srcDepth; - GLint dstWidth, dstHeight, dstDepth; - GLint border, bytesPerTexel; - - /* get src image parameters */ - srcImage = _mesa_select_tex_image(ctx, texUnit, target, level); - ASSERT(srcImage); - srcWidth = srcImage->Width; - srcHeight = srcImage->Height; - srcDepth = srcImage->Depth; - border = srcImage->Border; - - /* compute next (level+1) image size */ - if (srcWidth - 2 * border > 1) { - dstWidth = (srcWidth - 2 * border) / 2 + 2 * border; - } - else { - dstWidth = srcWidth; /* can't go smaller */ - } - if (srcHeight - 2 * border > 1) { - dstHeight = (srcHeight - 2 * border) / 2 + 2 * border; - } - else { - dstHeight = srcHeight; /* can't go smaller */ - } - if (srcDepth - 2 * border > 1) { - dstDepth = (srcDepth - 2 * border) / 2 + 2 * border; - } - else { - dstDepth = srcDepth; /* can't go smaller */ - } - - if (dstWidth == srcWidth && - dstHeight == srcHeight && - dstDepth == srcDepth) { - /* all done */ - if (srcImage->IsCompressed) { - FREE((void *) srcData); - FREE(dstData); - } - return; - } - - /* get dest gl_texture_image */ - dstImage = _mesa_select_tex_image(ctx, texUnit, target, level+1); - if (!dstImage) { - dstImage = _mesa_alloc_texture_image(); - if (!dstImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); - return; - } - _mesa_set_tex_image(texObj, target, level + 1, dstImage); - } - - /* Free old image data */ - if (dstImage->Data) - MESA_PBUFFER_FREE(dstImage->Data); - - /* initialize new image */ - _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight, - dstDepth, border, srcImage->IntFormat); - dstImage->DriverData = NULL; - dstImage->TexFormat = srcImage->TexFormat; - dstImage->FetchTexel = srcImage->FetchTexel; - ASSERT(dstImage->TexFormat); - ASSERT(dstImage->FetchTexel); - - /* Alloc new teximage data buffer. - * Setup src and dest data pointers. - */ - if (dstImage->IsCompressed) { - ASSERT(dstImage->CompressedSize > 0); /* set by init_teximage_fields*/ - dstImage->Data = MESA_PBUFFER_ALLOC(dstImage->CompressedSize); - if (!dstImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); - return; - } - /* srcData and dstData are already set */ - ASSERT(srcData); - ASSERT(dstData); - } - else { - bytesPerTexel = srcImage->TexFormat->TexelBytes; - ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0); - dstImage->Data = MESA_PBUFFER_ALLOC(dstWidth * dstHeight * dstDepth - * bytesPerTexel); - if (!dstImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); - return; - } - srcData = (const GLubyte *) srcImage->Data; - dstData = (GLubyte *) dstImage->Data; - } - - /* - * We use simple 2x2 averaging to compute the next mipmap level. - */ - switch (target) { - case GL_TEXTURE_1D: - make_1d_mipmap(convertFormat, border, - srcWidth, srcData, - dstWidth, dstData); - break; - case GL_TEXTURE_2D: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - make_2d_mipmap(convertFormat, border, - srcWidth, srcHeight, srcData, - dstWidth, dstHeight, dstData); - break; - case GL_TEXTURE_3D: - make_3d_mipmap(convertFormat, border, - srcWidth, srcHeight, srcDepth, srcData, - dstWidth, dstHeight, dstDepth, dstData); - break; - case GL_TEXTURE_RECTANGLE_NV: - /* no mipmaps, do nothing */ - break; - default: - _mesa_problem(ctx, "bad dimensions in _mesa_generate_mipmaps"); - return; - } - - if (dstImage->IsCompressed) { - GLubyte *temp; - /* compress image from dstData into dstImage->Data */ - const GLenum srcFormat = convertFormat->BaseFormat; - GLint dstRowStride = _mesa_compressed_row_stride(srcImage->IntFormat, - dstWidth); - ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA); - _mesa_compress_teximage(ctx, - dstWidth, dstHeight, /* size */ - srcFormat, /* source format */ - (const GLchan *) dstData, /* source buffer */ - dstWidth, /* source row stride */ - dstImage->TexFormat, /* dest format */ - (GLubyte*) dstImage->Data, /* dest buffer */ - dstRowStride ); /* dest row stride */ - - /* swap src and dest pointers */ - temp = (GLubyte *) srcData; - srcData = dstData; - dstData = temp; - } - - } /* loop over mipmap levels */ -} Index: xc/extras/Mesa/src/texstore.h diff -u xc/extras/Mesa/src/texstore.h:1.3 xc/extras/Mesa/src/texstore.h:removed --- xc/extras/Mesa/src/texstore.h:1.3 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texstore.h Wed Mar 16 21:00:34 2005 @@ -1,178 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Authors: - * Brian Paul - */ - - -#ifndef TEXSTORE_H -#define TEXSTORE_H - - -#include "mtypes.h" - - -extern void -_mesa_transfer_teximage(GLcontext *ctx, GLuint dimensions, - GLenum baseInternalFormat, - const struct gl_texture_format *texDestFormat, - GLvoid *texDestAddr, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, - GLint dstRowStride, GLint dstImageStride, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking); - - -extern void -_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint width, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint width, GLint height, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - -extern void -_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - -extern void -_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - -extern void -_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - -extern void -_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern GLboolean -_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, - GLint internalFormat, GLenum format, GLenum type, - GLint width, GLint height, GLint depth, GLint border); - - -extern void -_mesa_generate_mipmap(GLcontext *ctx, GLenum target, - const struct gl_texture_unit *texUnit, - struct gl_texture_object *texObj); - -#endif Index: xc/extras/Mesa/src/texutil.c diff -u xc/extras/Mesa/src/texutil.c:1.15 xc/extras/Mesa/src/texutil.c:removed --- xc/extras/Mesa/src/texutil.c:1.15 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texutil.c Wed Mar 16 21:00:34 2005 @@ -1,1034 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -/* - * Description: - * Functions for texture image conversion. This takes care of converting - * typical GL_RGBA/GLubyte textures into hardware-specific formats. - * We can handle non-standard row strides and pixel unpacking parameters. - */ - - -#include "glheader.h" -#include "context.h" -#include "enums.h" -#include "image.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" -#include "texformat.h" -#include "texutil.h" - - -#define DEBUG_TEXUTIL 0 - - -#ifdef MESA_BIG_ENDIAN -#define APPEND16( a, b ) ( (a) << 16 | (b) ) -#else -#define APPEND16( a, b ) ( (a) | (b) << 16 ) -#endif - - -struct convert_info { - GLint xoffset, yoffset, zoffset; /* Subimage offset */ - GLint width, height, depth; /* Subimage region */ - - GLint dstImageWidth, dstImageHeight; /* Dest image size */ - /* Needed for subimage replacement */ - GLenum format, type; /* Source (user) format and type */ - - const struct gl_pixelstore_attrib *unpacking; - - const GLvoid *srcImage; - GLvoid *dstImage; - - GLint index; -}; - -typedef GLboolean (*convert_func)( const struct convert_info *convert ); - -/* bitvalues for convert->index */ -#define CONVERT_STRIDE_BIT 0x1 -#define CONVERT_UNPACKING_BIT 0x2 - - - -/* ============================================================= - * Convert to RGBA8888 textures: - */ - -#define DST_TYPE GLuint -#define DST_TEXELS_PER_DWORD 1 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( src[3], src[2], src[1], src[0] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_rgba8888_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( src[0], src[1], src[2], src[3] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) CONVERT_TEXEL( dst, src ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_rgba8888 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( src[0], src[1], src[2], 0xff ) - -#define CONVERT_TEXEL_DWORD( dst, src ) CONVERT_TEXEL( dst, src ) - -#define SRC_TEXEL_BYTES 3 - -#define TAG(x) x##_bgr888_to_rgba8888 -#include "texutil_tmp.h" - - -#define CONVERT_RGBA8888( name ) \ -static GLboolean \ -convert_##name##_rgba8888( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_ABGR_EXT && \ - convert->type == GL_UNSIGNED_INT_8_8_8_8_REV ) \ - { \ - tab = name##_tab_rgba8888_direct; \ - } \ - else if ( convert->format == GL_RGBA && \ - ( convert->type == GL_UNSIGNED_BYTE || \ - convert->type == GL_UNSIGNED_INT_8_8_8_8 ) ) \ - { \ - tab = name##_tab_abgr8888_to_rgba8888; \ - } \ - else if ( convert->format == GL_RGB && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_bgr888_to_rgba8888; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_RGBA8888( texsubimage2d ) -CONVERT_RGBA8888( texsubimage3d ) - - - -/* ============================================================= - * Convert to ARGB8888 textures: - */ - -#define DST_TYPE GLuint -#define DST_TEXELS_PER_DWORD 1 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( src[3], src[2], src[1], src[0] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_argb8888_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( src[3], src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) CONVERT_TEXEL( dst, src ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_argb8888 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_8888_LE( 0xff, src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) CONVERT_TEXEL( dst, src ) - -#define SRC_TEXEL_BYTES 3 - -#define TAG(x) x##_bgr888_to_argb8888 -#include "texutil_tmp.h" - - -#define CONVERT_ARGB8888( name ) \ -static GLboolean \ -convert_##name##_argb8888( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_BGRA && \ - convert->type == GL_UNSIGNED_INT_8_8_8_8_REV ) \ - { \ - tab = name##_tab_argb8888_direct; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_abgr8888_to_argb8888; \ - } \ - else if ( convert->format == GL_RGB && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_bgr888_to_argb8888; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_ARGB8888( texsubimage2d ) -CONVERT_ARGB8888( texsubimage3d ) - - - -/* ============================================================= - * Convert to RGB888 textures: - */ - -static GLboolean -convert_texsubimage2d_rgb888( const struct convert_info *convert ) -{ - /* This is a placeholder for now... - */ - return GL_FALSE; -} - -static GLboolean -convert_texsubimage3d_rgb888( const struct convert_info *convert ) -{ - /* This is a placeholder for now... - */ - return GL_FALSE; -} - - - -/* ============================================================= - * Convert to RGB565 textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_565_LE( src[0], src[1], src[2] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_rgb565_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_565_LE( src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_565_LE( src[0], src[1], src[2] ), \ - PACK_COLOR_565_LE( src[3], src[4], src[5] ) ) - -#define SRC_TEXEL_BYTES 3 - -#define TAG(x) x##_bgr888_to_rgb565 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_565_LE( src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_565_LE( src[0], src[1], src[2] ), \ - PACK_COLOR_565_LE( src[4], src[5], src[6] ) ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_rgb565 -#include "texutil_tmp.h" - - -#define CONVERT_RGB565( name ) \ -static GLboolean \ -convert_##name##_rgb565( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_RGB && \ - convert->type == GL_UNSIGNED_SHORT_5_6_5 ) \ - { \ - tab = name##_tab_rgb565_direct; \ - } \ - else if ( convert->format == GL_RGB && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_bgr888_to_rgb565; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_abgr8888_to_rgb565; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_RGB565( texsubimage2d ) -CONVERT_RGB565( texsubimage3d ) - - - -/* ============================================================= - * Convert to ARGB4444 textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_4444_LE( src[3], src[0], src[1], src[2] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_argb4444_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_4444_LE( src[3], src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_4444_LE( src[3], src[0], src[1], src[2] ), \ - PACK_COLOR_4444_LE( src[7], src[4], src[5], src[6] ) ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_argb4444 -#include "texutil_tmp.h" - - -#define CONVERT_ARGB4444( name ) \ -static GLboolean \ -convert_##name##_argb4444( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_BGRA && \ - convert->type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) \ - { \ - tab = name##_tab_argb4444_direct; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_abgr8888_to_argb4444; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_ARGB4444( texsubimage2d ) -CONVERT_ARGB4444( texsubimage3d ) - - - -/* ============================================================= - * Convert to ARGB1555 textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_1555_LE( src[3], src[0], src[1], src[2] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_argb1555_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#ifdef MESA_BIG_ENDIAN - -#define CONVERT_TEXEL( dst, src ) \ - { const GLushort s = *(GLushort *)src; \ - dst = (s >> 9) | ((s & 0x1ff) << 7); } - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - { const GLuint s = ((fi_type *)src)->i; \ - dst = (((s & 0xfe00fe00) >> 9) | \ - ((s & 0x01ff01ff) << 7)); } - -#else - -#define CONVERT_TEXEL( dst, src ) \ - { const GLushort s = *(GLushort *)src; \ - dst = (s >> 1) | ((s & 1) << 15); } - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - { const GLuint s = ((fi_type *)src)->i; \ - dst = (((s & 0xfffefffe) >> 1) | \ - ((s & 0x00010001) << 15)); } - -#endif - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_rgba5551_to_argb1555 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_1555_LE( src[3], src[0], src[1], src[2] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_1555_LE( src[3], src[0], src[1], src[2] ), \ - PACK_COLOR_1555_LE( src[7], src[4], src[5], src[6] ) ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_argb1555 -#include "texutil_tmp.h" - - -#define CONVERT_ARGB1555( name ) \ -static GLboolean \ -convert_##name##_argb1555( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_BGRA && \ - convert->type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) \ - { \ - tab = name##_tab_argb1555_direct; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_SHORT_5_5_5_1 ) \ - { \ - tab = name##_tab_rgba5551_to_argb1555; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_abgr8888_to_argb1555; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_ARGB1555( texsubimage2d ) -CONVERT_ARGB1555( texsubimage3d ) - - - -/* ============================================================= - * AL88 textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_88_LE( src[0], src[1] ) - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_al88_direct -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_88_LE( src[0], 0x00 ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_88_LE( src[0], 0x00 ), \ - PACK_COLOR_88_LE( src[1], 0x00 ) ) - -#define SRC_TEXEL_BYTES 1 - -#define TAG(x) x##_a8_to_al88 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_88_LE( 0xff, src[0] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_88_LE( 0xff, src[0] ), \ - PACK_COLOR_88_LE( 0xff, src[1] ) ) - -#define SRC_TEXEL_BYTES 1 - -#define TAG(x) x##_l8_to_al88 -#define PRESERVE_DST_TYPE -#include "texutil_tmp.h" - - -#define CONVERT_TEXEL( dst, src ) \ - dst = PACK_COLOR_88_LE( src[3], src[0] ) - -#define CONVERT_TEXEL_DWORD( dst, src ) \ - dst = APPEND16( PACK_COLOR_88_LE( src[3], src[0] ), \ - PACK_COLOR_88_LE( src[7], src[4] ) ) - -#define SRC_TEXEL_BYTES 4 - -#define TAG(x) x##_abgr8888_to_al88 -#include "texutil_tmp.h" - - -#define CONVERT_AL88( name ) \ -static GLboolean \ -convert_##name##_al88( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( convert->format == GL_LUMINANCE_ALPHA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_al88_direct; \ - } \ - else if ( convert->format == GL_ALPHA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_a8_to_al88; \ - } \ - else if ( convert->format == GL_LUMINANCE && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_l8_to_al88; \ - } \ - else if ( convert->format == GL_RGBA && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_abgr8888_to_al88; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_AL88( texsubimage2d ) -CONVERT_AL88( texsubimage3d ) - - - -/* ============================================================= - * Convert to RGB332 textures: - */ - -static GLboolean -convert_texsubimage2d_rgb332( const struct convert_info *convert ) -{ - /* This is a placeholder for now... - */ - return GL_FALSE; -} - -static GLboolean -convert_texsubimage3d_rgb332( const struct convert_info *convert ) -{ - /* This is a placeholder for now... - */ - return GL_FALSE; -} - - - -/* ============================================================= - * CI8 (and all other single-byte texel) textures: - */ - -#define DST_TYPE GLubyte -#define DST_TEXELS_PER_DWORD 4 - -#define CONVERT_TEXEL( dst, src ) dst = src[0] - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 1 - -#define TAG(x) x##_ci8_direct -#include "texutil_tmp.h" - - -#define CONVERT_CI8( name ) \ -static GLboolean \ -convert_##name##_ci8( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if ( ( convert->format == GL_ALPHA || \ - convert->format == GL_LUMINANCE || \ - convert->format == GL_INTENSITY || \ - convert->format == GL_COLOR_INDEX ) && \ - convert->type == GL_UNSIGNED_BYTE ) \ - { \ - tab = name##_tab_ci8_direct; \ - } \ - else \ - { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - \ - return tab[index]( convert ); \ -} - -CONVERT_CI8( texsubimage2d ) -CONVERT_CI8( texsubimage3d ) - - -/* ============================================================= - * convert to YCBCR textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = (src[0] << 8) | src[1]; - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_ycbcr_direct -#include "texutil_tmp.h" - - -#define CONVERT_YCBCR( name ) \ -static GLboolean \ -convert_##name##_ycbcr( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if (convert->format != GL_YCBCR_MESA) { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - tab = name##_tab_ycbcr_direct; \ - \ - return tab[index]( convert ); \ -} - -CONVERT_YCBCR( texsubimage2d ) -CONVERT_YCBCR( texsubimage3d ) - - -/* ============================================================= - * convert to YCBCR_REV textures: - */ - -#define DST_TYPE GLushort -#define DST_TEXELS_PER_DWORD 2 - -#define CONVERT_TEXEL( dst, src ) \ - dst = (src[1] << 8) | src[0]; - -#define CONVERT_DIRECT - -#define SRC_TEXEL_BYTES 2 - -#define TAG(x) x##_ycbcr_rev_direct -#include "texutil_tmp.h" - - -#define CONVERT_YCBCR_REV( name ) \ -static GLboolean \ -convert_##name##_ycbcr_rev( const struct convert_info *convert ) \ -{ \ - convert_func *tab; \ - GLint index = convert->index; \ - \ - if (convert->format != GL_YCBCR_MESA) { \ - /* Can't handle this source format/type combination */ \ - return GL_FALSE; \ - } \ - tab = name##_tab_ycbcr_rev_direct; \ - \ - return tab[index]( convert ); \ -} - -CONVERT_YCBCR_REV( texsubimage2d ) -CONVERT_YCBCR_REV( texsubimage3d ) - - - -/* ============================================================= - * Global entry points - */ - -static convert_func convert_texsubimage2d_tab[] = { - convert_texsubimage2d_rgba8888, - convert_texsubimage2d_argb8888, - convert_texsubimage2d_rgb888, - convert_texsubimage2d_rgb565, - convert_texsubimage2d_argb4444, - convert_texsubimage2d_argb1555, - convert_texsubimage2d_al88, - convert_texsubimage2d_rgb332, - convert_texsubimage2d_ci8, /* These are all the same... */ - convert_texsubimage2d_ci8, - convert_texsubimage2d_ci8, - convert_texsubimage2d_ci8, - convert_texsubimage2d_ycbcr, - convert_texsubimage2d_ycbcr_rev, -}; - -static convert_func convert_texsubimage3d_tab[] = { - convert_texsubimage3d_rgba8888, - convert_texsubimage3d_argb8888, - convert_texsubimage3d_rgb888, - convert_texsubimage3d_rgb565, - convert_texsubimage3d_argb4444, - convert_texsubimage3d_argb1555, - convert_texsubimage3d_al88, - convert_texsubimage3d_rgb332, - convert_texsubimage3d_ci8, /* These are all the same... */ - convert_texsubimage3d_ci8, - convert_texsubimage3d_ci8, - convert_texsubimage3d_ci8, - convert_texsubimage3d_ycbcr, - convert_texsubimage3d_ycbcr_rev, -}; - - -/* See if we need to care about the pixel store attributes when we're - * converting the texture image. This should be stored as - * unpacking->_SomeBoolean and updated when the values change, to avoid - * testing every time... - */ -static INLINE GLboolean -convert_needs_unpacking( const struct gl_pixelstore_attrib *unpacking, - GLenum format, GLenum type ) -{ - if ( ( unpacking->Alignment == 1 || - ( unpacking->Alignment == 4 && /* Pick up the common Q3A case... */ - format == GL_RGBA && type == GL_UNSIGNED_BYTE ) ) && - unpacking->RowLength == 0 && - unpacking->SkipPixels == 0 && - unpacking->SkipRows == 0 && - unpacking->ImageHeight == 0 && - unpacking->SkipImages == 0 && - unpacking->SwapBytes == GL_FALSE && - unpacking->LsbFirst == GL_FALSE ) { - return GL_FALSE; - } else { - return GL_TRUE; - } -} - - -GLboolean -_mesa_convert_texsubimage1d( GLint mesaFormat, - GLint xoffset, - GLint width, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpacking, - const GLvoid *srcImage, GLvoid *dstImage ) -{ - struct convert_info convert; - - ASSERT( unpacking ); - ASSERT( srcImage ); - ASSERT( dstImage ); - - ASSERT( mesaFormat >= MESA_FORMAT_RGBA8888 ); - ASSERT( mesaFormat <= MESA_FORMAT_YCBCR_REV ); - - /* Make it easier to pass all the parameters around. - */ - convert.xoffset = xoffset; - convert.yoffset = 0; - convert.width = width; - convert.height = 1; - convert.format = format; - convert.type = type; - convert.unpacking = unpacking; - convert.srcImage = srcImage; - convert.dstImage = dstImage; - - convert.index = 0; - - if ( convert_needs_unpacking( unpacking, format, type ) ) - convert.index |= CONVERT_UNPACKING_BIT; - - ASSERT(convert.index < 4); - - return convert_texsubimage2d_tab[mesaFormat]( &convert ); -} - - -/* Convert a user's 2D image into a texture image. This basically - * repacks pixel data into the special texture formats used by core Mesa - * and the DRI drivers. This function can do full images or subimages. - * - * We return a boolean because this function may not accept some kinds - * of source image formats and/or types. For example, if the incoming - * format/type = GL_BGR, GL_UNSIGNED_INT this function probably won't - * be able to do the conversion. - * - * In that case, the incoming image should first be simplified to one of - * the "canonical" formats (GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, - * GL_INTENSITY, GL_RGB, GL_RGBA) and types (GL_CHAN). We can do that - * with the _mesa_transfer_teximage() function. That function will also - * do image transfer operations such as scale/bias and convolution. - * - * Input: - * mesaFormat - one of the MESA_FORMAT_* values from texformat.h - * xoffset, yoffset - position in dest image to put data - * width, height - incoming image size, also size of dest region. - * dstImageWidth - width (row stride) of dest image in pixels - * format, type - incoming image format and type - * unpacking - describes incoming image unpacking - * srcImage - pointer to source image - * destImage - pointer to dest image - */ -GLboolean -_mesa_convert_texsubimage2d( GLint mesaFormat, /* dest */ - GLint xoffset, GLint yoffset, - GLint width, GLint height, - GLint destImageWidth, - GLenum format, GLenum type, /* source */ - const struct gl_pixelstore_attrib *unpacking, - const GLvoid *srcImage, GLvoid *dstImage ) -{ - struct convert_info convert; - - ASSERT( unpacking ); - ASSERT( srcImage ); - ASSERT( dstImage ); - - ASSERT( mesaFormat >= MESA_FORMAT_RGBA8888 ); - ASSERT( mesaFormat <= MESA_FORMAT_YCBCR_REV ); - - /* Make it easier to pass all the parameters around. - */ - convert.xoffset = xoffset; - convert.yoffset = yoffset; - convert.width = width; - convert.height = height; - convert.dstImageWidth = destImageWidth; - convert.format = format; - convert.type = type; - convert.unpacking = unpacking; - convert.srcImage = srcImage; - convert.dstImage = dstImage; - - convert.index = 0; - - if ( convert_needs_unpacking( unpacking, format, type ) ) - convert.index |= CONVERT_UNPACKING_BIT; - - if ( width != destImageWidth ) - convert.index |= CONVERT_STRIDE_BIT; - - return convert_texsubimage2d_tab[mesaFormat]( &convert ); -} - -GLboolean -_mesa_convert_texsubimage3d( GLint mesaFormat, /* dest */ - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLint dstImageWidth, GLint dstImageHeight, - GLenum format, GLenum type, /* source */ - const struct gl_pixelstore_attrib *unpacking, - const GLvoid *srcImage, GLvoid *dstImage ) -{ - struct convert_info convert; - - ASSERT( unpacking ); - ASSERT( srcImage ); - ASSERT( dstImage ); - - ASSERT( mesaFormat >= MESA_FORMAT_RGBA8888 ); - ASSERT( mesaFormat <= MESA_FORMAT_YCBCR_REV ); - - /* Make it easier to pass all the parameters around. - */ - convert.xoffset = xoffset; - convert.yoffset = yoffset; - convert.zoffset = zoffset; - convert.width = width; - convert.height = height; - convert.depth = depth; - convert.dstImageWidth = dstImageWidth; - convert.dstImageHeight = dstImageHeight; - convert.format = format; - convert.type = type; - convert.unpacking = unpacking; - convert.srcImage = srcImage; - convert.dstImage = dstImage; - - convert.index = 0; - - if ( convert_needs_unpacking( unpacking, format, type ) ) - convert.index |= CONVERT_UNPACKING_BIT; - - if ( width != dstImageWidth || height != dstImageHeight ) - convert.index |= CONVERT_STRIDE_BIT; - - return convert_texsubimage3d_tab[mesaFormat]( &convert ); -} - - - -/* Nearest filtering only (for broken hardware that can't support - * all aspect ratios). This can be made a lot faster, but I don't - * really care enough... - */ -void _mesa_rescale_teximage2d( GLuint bytesPerPixel, GLuint dstRowStride, - GLint srcWidth, GLint srcHeight, - GLint dstWidth, GLint dstHeight, - const GLvoid *srcImage, GLvoid *dstImage ) -{ - GLint row, col; - -#define INNER_LOOP( TYPE, HOP, WOP ) \ - for ( row = 0 ; row < dstHeight ; row++ ) { \ - GLint srcRow = row HOP hScale; \ - for ( col = 0 ; col < dstWidth ; col++ ) { \ - GLint srcCol = col WOP wScale; \ - dst[col] = src[srcRow * srcWidth + srcCol]; \ - } \ - dst = (TYPE *) ((GLubyte *) dst + dstRowStride); \ - } \ - -#define RESCALE_IMAGE( TYPE ) \ -do { \ - const TYPE *src = (const TYPE *)srcImage; \ - TYPE *dst = (TYPE *)dstImage; \ - \ - if ( srcHeight <= dstHeight ) { \ - const GLint hScale = dstHeight / srcHeight; \ - if ( srcWidth <= dstWidth ) { \ - const GLint wScale = dstWidth / srcWidth; \ - INNER_LOOP( TYPE, /, / ); \ - } \ - else { \ - const GLint wScale = srcWidth / dstWidth; \ - INNER_LOOP( TYPE, /, * ); \ - } \ - } \ - else { \ - const GLint hScale = srcHeight / dstHeight; \ - if ( srcWidth <= dstWidth ) { \ - const GLint wScale = dstWidth / srcWidth; \ - INNER_LOOP( TYPE, *, / ); \ - } \ - else { \ - const GLint wScale = srcWidth / dstWidth; \ - INNER_LOOP( TYPE, *, * ); \ - } \ - } \ -} while (0) - - switch ( bytesPerPixel ) { - case 4: - RESCALE_IMAGE( GLuint ); - break; - - case 2: - RESCALE_IMAGE( GLushort ); - break; - - case 1: - RESCALE_IMAGE( GLubyte ); - break; - default: - _mesa_problem(NULL,"unexpected bytes/pixel in _mesa_rescale_teximage2d"); - } -} Index: xc/extras/Mesa/src/texutil.h diff -u xc/extras/Mesa/src/texutil.h:1.9 xc/extras/Mesa/src/texutil.h:removed --- xc/extras/Mesa/src/texutil.h:1.9 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/texutil.h Wed Mar 16 21:00:34 2005 @@ -1,72 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - - -#ifndef TEXUTIL_H -#define TEXUTIL_H - -#include "mtypes.h" -#include "texformat.h" - -extern GLboolean -_mesa_convert_texsubimage1d( GLint mesaFormat, - GLint xoffset, - GLint width, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *packing, - const GLvoid *srcImage, GLvoid *dstImage ); - -extern GLboolean -_mesa_convert_texsubimage2d( GLint mesaFormat, - GLint xoffset, GLint yoffset, - GLint width, GLint height, - GLint imageWidth, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *packing, - const GLvoid *srcImage, GLvoid *dstImage ); - -extern GLboolean -_mesa_convert_texsubimage3d( GLint mesaFormat, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLint imageWidth, GLint imageHeight, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *packing, - const GLvoid *srcImage, GLvoid *dstImage ); - -/* Nearest filtering only (for broken hardware that can't support - * all aspect ratios). FIXME: Make this a subimage update as well... - */ -extern void -_mesa_rescale_teximage2d( GLuint bytesPerPixel, GLuint dstRowStride, - GLint srcWidth, GLint srcHeight, - GLint dstWidth, GLint dstHeight, - const GLvoid *srcImage, GLvoid *dstImage ); - - -#endif Index: xc/extras/Mesa/src/texutil_tmp.h diff -u xc/extras/Mesa/src/texutil_tmp.h:1.4 xc/extras/Mesa/src/texutil_tmp.h:removed --- xc/extras/Mesa/src/texutil_tmp.h:1.4 Wed Oct 22 11:27:41 2003 +++ xc/extras/Mesa/src/texutil_tmp.h Wed Mar 16 21:00:34 2005 @@ -1,478 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/texutil_tmp.h,v 1.4 2003/10/22 15:27:41 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 4.0.2 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Author: - * Gareth Hughes - */ - - -/* - * For 2D and 3D texture images, we generate functions for - * - conversion without pixel unpacking and standard stride - * - conversion without pixel unpacking and non-standard stride - * - conversion with pixel unpacking and standard stride - * - conversion with pixel unpacking and non-standard stride - * - * - * Macros which need to be defined before including this file: - * TAG(x) - the function name wrapper - * DST_TYPE - the destination texel datatype (GLuint, GLushort, etc) - * DST_TEXELS_PER_DWORD - number of dest texels that'll fit in 4 bytes - * CONVERT_TEXEL - code to convert from source to dest texel - * CONVER_TEXEL_DWORD - if multiple texels fit in 4 bytes, this macros - * will convert/store multiple texels at once - * CONVERT_DIRECT - if defined, just memcpy texels from src to dest - * SRC_TEXEL_BYTES - bytes per source texel - * PRESERVE_DST_TYPE - if defined, don't undefined these macros at end - */ - - -#define DST_TEXEL_BYTES (4 / DST_TEXELS_PER_DWORD) -#define DST_ROW_BYTES (convert->width * DST_TEXEL_BYTES) -#define DST_ROW_STRIDE (convert->dstImageWidth * DST_TEXEL_BYTES) -#define DST_IMG_STRIDE (convert->dstImageWidth * \ - convert->dstImageHeight * DST_TEXEL_BYTES) - - -/* ============================================================= - * PRE: No pixelstore attribs, width == dstImageWidth. - */ -static GLboolean -TAG(texsubimage2d)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *)convert->srcImage; - GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + - (convert->yoffset * convert->dstImageWidth + - convert->xoffset) * DST_TEXEL_BYTES); - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ "\n" ); -#endif - -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, convert->height * DST_ROW_BYTES ); -#else - { - const GLint texels = convert->width * convert->height; - const GLint dwords = texels / DST_TEXELS_PER_DWORD; - const GLint leftover = texels - dwords * DST_TEXELS_PER_DWORD; - GLint i; - for ( i = 0 ; i < dwords ; i++ ) { - CONVERT_TEXEL_DWORD( *dst++, src ); - src += SRC_TEXEL_BYTES * DST_TEXELS_PER_DWORD; - } - for ( i = 0; i < leftover; i++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - } -#endif - - return GL_TRUE; -} - -/* PRE: As above, height == dstImageHeight also. - */ -static GLboolean -TAG(texsubimage3d)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *)convert->srcImage; - GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + - ((convert->zoffset * convert->height + - convert->yoffset) * convert->width + - convert->xoffset) * DST_TEXEL_BYTES); -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ "\n" ); -#endif - -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, convert->depth * convert->height * DST_ROW_BYTES ); -#else - { - const GLint texels = convert->width * convert->height * convert->depth; - const GLint dwords = texels / DST_TEXELS_PER_DWORD; - const GLint leftover = texels - dwords * DST_TEXELS_PER_DWORD; - GLint i; - for ( i = 0 ; i < dwords ; i++ ) { - CONVERT_TEXEL_DWORD( *dst++, src ); - src += SRC_TEXEL_BYTES * DST_TEXELS_PER_DWORD; - } - for ( i = 0; i < leftover; i++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - } -#endif - - return GL_TRUE; -} - - - -/* ============================================================= - * PRE: No pixelstore attribs, width != dstImageWidth. - */ -static GLboolean -TAG(texsubimage2d_stride)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *)convert->srcImage; - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - (convert->yoffset * convert->dstImageWidth + - convert->xoffset) * DST_TEXEL_BYTES); - GLint adjust; - GLint row, col; - - adjust = convert->dstImageWidth - convert->width; - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ ":\n" ); - _mesa_debug( NULL, " x=%d y=%d w=%d h=%d s=%d\n", - convert->xoffset, convert->yoffset, convert->width, - convert->height, convert->dstImageWidth ); - _mesa_debug( NULL, " adjust=%d\n", adjust ); -#endif - - for ( row = 0 ; row < convert->height ; row++ ) { - for ( col = 0 ; col < convert->width ; col++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - dst += adjust; - } - - return GL_TRUE; -} - -/* PRE: As above, or height != dstImageHeight also. - */ -static GLboolean -TAG(texsubimage3d_stride)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *)convert->srcImage; - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - ((convert->zoffset * convert->dstImageHeight + - convert->yoffset) * convert->dstImageWidth + - convert->xoffset) * DST_TEXEL_BYTES); - GLint adjust; - GLint row, col, img; - - adjust = convert->dstImageWidth - convert->width; - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ ":\n" ); - _mesa_debug( NULL, " x=%d y=%d w=%d h=%d s=%d\n", - convert->xoffset, convert->yoffset, convert->width, - convert->height, convert->dstImageWidth ); - _mesa_debug( NULL, " adjust=%d\n", adjust ); -#endif - - for ( img = 0 ; img < convert->depth ; img++ ) { - for ( row = 0 ; row < convert->height ; row++ ) { - for ( col = 0 ; col < convert->width ; col++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - dst += adjust; - } - /* FIXME: ... */ - } - - return GL_TRUE; -} - - - -/* ============================================================= - * PRE: Require pixelstore attribs, width == dstImageWidth. - */ -static GLboolean -TAG(texsubimage2d_unpack)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 0, 0, 0 ); - const GLint srcRowStride = - _mesa_image_row_stride( convert->unpacking, convert->width, - convert->format, convert->type ); - GLint row, col; - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ "\n" ); -#endif - - if (convert->width & (DST_TEXELS_PER_DWORD - 1)) { - /* Can't use dword conversion (i.e. when width = 1 and texels/dword = 2 - * or width = 2 and texels/dword = 4). - */ - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - (convert->yoffset * convert->width + - convert->xoffset) * DST_TEXEL_BYTES); - for ( row = 0 ; row < convert->height ; row++ ) { - const GLubyte *srcRow = src; - for ( col = 0; col < convert->width; col++ ) { - CONVERT_TEXEL(*dst, src); - src += SRC_TEXEL_BYTES; - } - src = srcRow + srcRowStride; - } - } - else { - /* the common case */ - GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + - (convert->yoffset * convert->width + - convert->xoffset) * DST_TEXEL_BYTES); - for ( row = 0 ; row < convert->height ; row++ ) { -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, DST_ROW_STRIDE ); - src += srcRowStride; - dst = (GLuint *)((GLubyte *)dst + DST_ROW_STRIDE); -#else - const GLubyte *srcRow = src; - for ( col = convert->width / DST_TEXELS_PER_DWORD ; col ; col-- ) { - CONVERT_TEXEL_DWORD( *dst++, src ); - src += SRC_TEXEL_BYTES * DST_TEXELS_PER_DWORD; - } - src = srcRow + srcRowStride; -#endif - } - } - - return GL_TRUE; -} - -/* PRE: as above, height == dstImageHeight also. - */ -static GLboolean -TAG(texsubimage3d_unpack)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 0, 0, 0 ); - const GLint srcImgStride = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 1, 0, 0 ) - src; - const GLint srcRowStride = - _mesa_image_row_stride( convert->unpacking, convert->width, - convert->format, convert->type ); - GLint row, col, img; - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ "\n" ); -#endif - - if (convert->width & (DST_TEXELS_PER_DWORD - 1)) { - /* Can't use dword conversion (i.e. when width = 1 and texels/dword = 2 - * or width = 2 and texels/dword = 4). - */ - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - ((convert->zoffset * convert->height + - convert->yoffset) * convert->width + - convert->xoffset) * DST_TEXEL_BYTES); - for ( img = 0 ; img < convert->depth ; img++ ) { - const GLubyte *srcImage = src; - for ( row = 0 ; row < convert->height ; row++ ) { - const GLubyte *srcRow = src; - for ( col = 0; col < convert->width; col++ ) { - CONVERT_TEXEL(*dst, src); - src += SRC_TEXEL_BYTES; - } - src = srcRow + srcRowStride; - } - src = srcImage + srcImgStride; - } - } - else { - /* the common case */ - GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + - ((convert->zoffset * convert->height + - convert->yoffset) * convert->width + - convert->xoffset) * DST_TEXEL_BYTES); - for ( img = 0 ; img < convert->depth ; img++ ) { - const GLubyte *srcImage = src; - for ( row = 0 ; row < convert->height ; row++ ) { -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, DST_ROW_STRIDE ); - src += srcRowStride; - dst = (GLuint *)((GLubyte *)dst + DST_ROW_STRIDE); -#else - const GLubyte *srcRow = src; - for ( col = convert->width / DST_TEXELS_PER_DWORD ; col ; col-- ) { - CONVERT_TEXEL_DWORD( *dst++, src ); - src += SRC_TEXEL_BYTES * DST_TEXELS_PER_DWORD; - } - src = srcRow + srcRowStride; -#endif - } - src = srcImage + srcImgStride; - } - } - - return GL_TRUE; -} - - - -/* ============================================================= - * PRE: Require pixelstore attribs, width != dstImageWidth. - */ -static GLboolean -TAG(texsubimage2d_stride_unpack)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 0, 0, 0 ); - const GLint srcRowStride = - _mesa_image_row_stride( convert->unpacking, convert->width, - convert->format, convert->type ); - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - (convert->yoffset * convert->dstImageWidth + - convert->xoffset) * DST_TEXEL_BYTES); - GLint row; - -#ifndef CONVERT_DIRECT - GLint adjust = convert->dstImageWidth - convert->width; -#endif - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ ":\n" ); - _mesa_debug( NULL, " x=%d y=%d w=%d h=%d s=%d\n", - convert->xoffset, convert->yoffset, convert->width, - convert->height, convert->dstImageWidth ); -#endif - - for ( row = 0 ; row < convert->height ; row++ ) { -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, DST_ROW_BYTES ); - src += srcRowStride; - dst += convert->dstImageWidth; -#else - const GLubyte *srcRow = src; - GLint col; - for ( col = 0 ; col < convert->width ; col++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - src = srcRow + srcRowStride; - dst += adjust; -#endif - } - - return GL_TRUE; -} - -/* PRE: As above, or height != dstImageHeight also. - */ -static GLboolean -TAG(texsubimage3d_stride_unpack)( const struct convert_info *convert ) -{ - const GLubyte *src = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 0, 0, 0 ); - const GLint srcImgStride = (const GLubyte *) - _mesa_image_address( convert->unpacking, convert->srcImage, - convert->width, convert->height, - convert->format, convert->type, 1, 0, 0 ) - src; - const GLint srcRowStride = - _mesa_image_row_stride( convert->unpacking, convert->width, - convert->format, convert->type ); - DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + - ((convert->zoffset * convert->dstImageHeight + - convert->yoffset) * convert->dstImageWidth + - convert->xoffset) * DST_TEXEL_BYTES); - GLint row, img; - -#ifndef CONVERT_DIRECT - GLint adjust = convert->dstImageWidth - convert->width; -#endif - -#if DEBUG_TEXUTIL - _mesa_debug( NULL, __FUNCTION__ ":\n" ); - _mesa_debug( NULL, " x=%d y=%d w=%d h=%d s=%d\n", - convert->xoffset, convert->yoffset, convert->width, - convert->height, convert->dstImageWidth ); -#endif - - for ( img = 0 ; img < convert->depth ; img++ ) { - const GLubyte *srcImage = src; - for ( row = 0 ; row < convert->height ; row++ ) { -#ifdef CONVERT_DIRECT - MEMCPY( dst, src, DST_ROW_BYTES ); - src += srcRowStride; - dst += convert->dstImageWidth; -#else - const GLubyte *srcRow = src; - GLint col; - for ( col = 0 ; col < convert->width ; col++ ) { - CONVERT_TEXEL( *dst++, src ); - src += SRC_TEXEL_BYTES; - } - src = srcRow + srcRowStride; - dst += adjust; -#endif - } - src = srcImage + srcImgStride; - } - - return GL_TRUE; -} - - - -static convert_func TAG(texsubimage2d_tab)[] = { - TAG(texsubimage2d), - TAG(texsubimage2d_stride), - TAG(texsubimage2d_unpack), - TAG(texsubimage2d_stride_unpack), -}; - -static convert_func TAG(texsubimage3d_tab)[] = { - TAG(texsubimage3d), - TAG(texsubimage3d_stride), - TAG(texsubimage3d_unpack), - TAG(texsubimage3d_stride_unpack), -}; - - -#ifndef PRESERVE_DST_TYPE -#undef DST_TYPE -#undef DST_TEXELS_PER_DWORD -#endif - -#undef SRC_TEXEL_BYTES -#undef DST_TEXEL_BYTES -#undef DST_ROW_BYTES -#undef DST_ROW_STRIDE - -#undef CONVERT_TEXEL -#undef CONVERT_TEXEL_DWORD -#undef CONVERT_DIRECT - -#undef TAG - -#undef PRESERVE_DST_TYPE Index: xc/extras/Mesa/src/varray.c diff -u xc/extras/Mesa/src/varray.c:1.12 xc/extras/Mesa/src/varray.c:removed --- xc/extras/Mesa/src/varray.c:1.12 Sun Sep 28 15:16:59 2003 +++ xc/extras/Mesa/src/varray.c Wed Mar 16 21:00:34 2005 @@ -1,834 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glheader.h" -#include "context.h" -#include "enable.h" -#include "enums.h" -#include "dlist.h" -#include "light.h" -#include "macros.h" -#include "mmath.h" -#include "state.h" -#include "texstate.h" -#include "mtypes.h" -#include "varray.h" -#include "math/m_translate.h" - - - -void -_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (size < 2 || size > 4) { - _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(size)" ); - return; - } - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(stride)" ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) - _mesa_debug(ctx, "glVertexPointer( sz %d type %s stride %d )\n", size, - _mesa_lookup_enum_by_nr( type ), stride); - - /* always need to check that is legal */ - switch (type) { - case GL_SHORT: - ctx->Array.Vertex.StrideB = size * sizeof(GLshort); - break; - case GL_INT: - ctx->Array.Vertex.StrideB = size * sizeof(GLint); - break; - case GL_FLOAT: - ctx->Array.Vertex.StrideB = size * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.Vertex.StrideB = size * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexPointer(type)" ); - return; - } - - if (stride) - ctx->Array.Vertex.StrideB = stride; - - ctx->Array.Vertex.Size = size; - ctx->Array.Vertex.Type = type; - ctx->Array.Vertex.Stride = stride; - ctx->Array.Vertex.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_VERTEX; - - if (ctx->Driver.VertexPointer) - ctx->Driver.VertexPointer( ctx, size, type, stride, ptr ); -} - - - - -void -_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glNormalPointer(stride)" ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) - _mesa_debug(ctx, "glNormalPointer( type %s stride %d )\n", - _mesa_lookup_enum_by_nr( type ), stride); - - switch (type) { - case GL_BYTE: - ctx->Array.Normal.StrideB = 3 * sizeof(GLbyte); - break; - case GL_SHORT: - ctx->Array.Normal.StrideB = 3 * sizeof(GLshort); - break; - case GL_INT: - ctx->Array.Normal.StrideB = 3 * sizeof(GLint); - break; - case GL_FLOAT: - ctx->Array.Normal.StrideB = 3 * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.Normal.StrideB = 3 * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glNormalPointer(type)" ); - return; - } - if (stride) - ctx->Array.Normal.StrideB = stride; - - ctx->Array.Normal.Size = 3; - ctx->Array.Normal.Type = type; - ctx->Array.Normal.Stride = stride; - ctx->Array.Normal.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_NORMAL; - - if (ctx->Driver.NormalPointer) - ctx->Driver.NormalPointer( ctx, type, stride, ptr ); -} - - - -void -_mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (size < 3 || size > 4) { - _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(size)" ); - return; - } - if (stride<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) - _mesa_debug(ctx, "glColorPointer( sz %d type %s stride %d )\n", size, - _mesa_lookup_enum_by_nr( type ), stride); - - switch (type) { - case GL_BYTE: - ctx->Array.Color.StrideB = size * sizeof(GLbyte); - break; - case GL_UNSIGNED_BYTE: - ctx->Array.Color.StrideB = size * sizeof(GLubyte); - break; - case GL_SHORT: - ctx->Array.Color.StrideB = size * sizeof(GLshort); - break; - case GL_UNSIGNED_SHORT: - ctx->Array.Color.StrideB = size * sizeof(GLushort); - break; - case GL_INT: - ctx->Array.Color.StrideB = size * sizeof(GLint); - break; - case GL_UNSIGNED_INT: - ctx->Array.Color.StrideB = size * sizeof(GLuint); - break; - case GL_FLOAT: - ctx->Array.Color.StrideB = size * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.Color.StrideB = size * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glColorPointer(type)" ); - return; - } - - if (stride) - ctx->Array.Color.StrideB = stride; - - ctx->Array.Color.Size = size; - ctx->Array.Color.Type = type; - ctx->Array.Color.Stride = stride; - ctx->Array.Color.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_COLOR0; - - if (ctx->Driver.ColorPointer) - ctx->Driver.ColorPointer( ctx, size, type, stride, ptr ); -} - - - -void -_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glFogCoordPointer(stride)" ); - return; - } - - switch (type) { - case GL_FLOAT: - ctx->Array.FogCoord.StrideB = sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.FogCoord.StrideB = sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" ); - return; - } - - if (stride) - ctx->Array.FogCoord.StrideB = stride; - - ctx->Array.FogCoord.Size = 1; - ctx->Array.FogCoord.Type = type; - ctx->Array.FogCoord.Stride = stride; - ctx->Array.FogCoord.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_FOGCOORD; - - if (ctx->Driver.FogCoordPointer) - ctx->Driver.FogCoordPointer( ctx, type, stride, ptr ); -} - - -void -_mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glIndexPointer(stride)" ); - return; - } - - switch (type) { - case GL_UNSIGNED_BYTE: - ctx->Array.Index.StrideB = sizeof(GLubyte); - break; - case GL_SHORT: - ctx->Array.Index.StrideB = sizeof(GLshort); - break; - case GL_INT: - ctx->Array.Index.StrideB = sizeof(GLint); - break; - case GL_FLOAT: - ctx->Array.Index.StrideB = sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.Index.StrideB = sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glIndexPointer(type)" ); - return; - } - - if (stride) - ctx->Array.Index.StrideB = stride; - - ctx->Array.Index.Size = 1; - ctx->Array.Index.Type = type; - ctx->Array.Index.Stride = stride; - ctx->Array.Index.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_INDEX; - - if (ctx->Driver.IndexPointer) - ctx->Driver.IndexPointer( ctx, type, stride, ptr ); -} - - -void -_mesa_SecondaryColorPointerEXT(GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (size != 3 && size != 4) { - _mesa_error( ctx, GL_INVALID_VALUE, "glSecondaryColorPointer(size)" ); - return; - } - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glSecondaryColorPointer(stride)" ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) - _mesa_debug(ctx, "glSecondaryColorPointer( sz %d type %s stride %d )\n", - size, _mesa_lookup_enum_by_nr( type ), stride); - - switch (type) { - case GL_BYTE: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLbyte); - break; - case GL_UNSIGNED_BYTE: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLubyte); - break; - case GL_SHORT: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLshort); - break; - case GL_UNSIGNED_SHORT: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLushort); - break; - case GL_INT: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLint); - break; - case GL_UNSIGNED_INT: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLuint); - break; - case GL_FLOAT: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.SecondaryColor.StrideB = size * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type)" ); - return; - } - - if (stride) - ctx->Array.SecondaryColor.StrideB = stride; - - ctx->Array.SecondaryColor.Size = 3; /* hardwire */ - ctx->Array.SecondaryColor.Type = type; - ctx->Array.SecondaryColor.Stride = stride; - ctx->Array.SecondaryColor.Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_COLOR1; - - if (ctx->Driver.SecondaryColorPointer) - ctx->Driver.SecondaryColorPointer( ctx, size, type, stride, ptr ); -} - - - -void -_mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = ctx->Array.ActiveTexture; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (size < 1 || size > 4) { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(size)" ); - return; - } - if (stride < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(stride)" ); - return; - } - - if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API)) - _mesa_debug(ctx, "glTexCoordPointer(unit %u sz %d type %s stride %d)\n", - texUnit, size, _mesa_lookup_enum_by_nr( type ), stride); - - /* always need to check that is legal */ - switch (type) { - case GL_SHORT: - ctx->Array.TexCoord[texUnit].StrideB = size * sizeof(GLshort); - break; - case GL_INT: - ctx->Array.TexCoord[texUnit].StrideB = size * sizeof(GLint); - break; - case GL_FLOAT: - ctx->Array.TexCoord[texUnit].StrideB = size * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.TexCoord[texUnit].StrideB = size * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glTexCoordPointer(type)" ); - return; - } - - if (stride) - ctx->Array.TexCoord[texUnit].StrideB = stride; - - ctx->Array.TexCoord[texUnit].Size = size; - ctx->Array.TexCoord[texUnit].Type = type; - ctx->Array.TexCoord[texUnit].Stride = stride; - ctx->Array.TexCoord[texUnit].Ptr = (void *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_TEXCOORD(texUnit); - - if (ctx->Driver.TexCoordPointer) - ctx->Driver.TexCoordPointer( ctx, size, type, stride, ptr ); -} - - -void -_mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *vptr) -{ - GET_CURRENT_CONTEXT(ctx); - const GLboolean *ptr = (GLboolean *)vptr; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (stride<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glEdgeFlagPointer(stride)" ); - return; - } - ctx->Array.EdgeFlag.Stride = stride; - ctx->Array.EdgeFlag.StrideB = stride ? stride : sizeof(GLboolean); - ctx->Array.EdgeFlag.Ptr = (GLboolean *) ptr; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_EDGEFLAG; - - if (ctx->Driver.EdgeFlagPointer) - ctx->Driver.EdgeFlagPointer( ctx, stride, ptr ); -} - - -void _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= VERT_ATTRIB_MAX) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(index)"); - return; - } - - if (size < 1 || size > 4) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(size)"); - return; - } - - if (stride < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(stride)"); - return; - } - - if (type == GL_UNSIGNED_BYTE && size != 4) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(size!=4)"); - return; - } - - /* check for valid 'type' and compute StrideB right away */ - switch (type) { - case GL_UNSIGNED_BYTE: - ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLubyte); - break; - case GL_SHORT: - ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLshort); - break; - case GL_FLOAT: - ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLfloat); - break; - case GL_DOUBLE: - ctx->Array.VertexAttrib[index].StrideB = size * sizeof(GLdouble); - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttribPointerNV(type)" ); - return; - } - - if (stride) - ctx->Array.VertexAttrib[index].StrideB = stride; - - ctx->Array.VertexAttrib[index].Stride = stride; - ctx->Array.VertexAttrib[index].Size = size; - ctx->Array.VertexAttrib[index].Type = type; - ctx->Array.VertexAttrib[index].Ptr = (void *) ptr; - - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index); - - if (ctx->Driver.VertexAttribPointer) - ctx->Driver.VertexAttribPointer( ctx, index, size, type, stride, ptr ); -} - - -void -_mesa_VertexPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr) -{ - (void) count; - _mesa_VertexPointer(size, type, stride, ptr); -} - - -void -_mesa_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr) -{ - (void) count; - _mesa_NormalPointer(type, stride, ptr); -} - - -void -_mesa_ColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr) -{ - (void) count; - _mesa_ColorPointer(size, type, stride, ptr); -} - - -void -_mesa_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr) -{ - (void) count; - _mesa_IndexPointer(type, stride, ptr); -} - - -void -_mesa_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr) -{ - (void) count; - _mesa_TexCoordPointer(size, type, stride, ptr); -} - - -void -_mesa_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *ptr) -{ - (void) count; - _mesa_EdgeFlagPointer(stride, ptr); -} - - - - -void -_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean tflag, cflag, nflag; /* enable/disable flags */ - GLint tcomps, ccomps, vcomps; /* components per texcoord, color, vertex */ - - GLenum ctype = 0; /* color type */ - GLint coffset = 0, noffset = 0, voffset;/* color, normal, vertex offsets */ - GLint defstride; /* default stride */ - GLint c, f; - GLint coordUnitSave; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - f = sizeof(GLfloat); - c = f * ((4*sizeof(GLubyte) + (f-1)) / f); - - if (stride<0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glInterleavedArrays(stride)" ); - return; - } - - switch (format) { - case GL_V2F: - tflag = GL_FALSE; cflag = GL_FALSE; nflag = GL_FALSE; - tcomps = 0; ccomps = 0; vcomps = 2; - voffset = 0; - defstride = 2*f; - break; - case GL_V3F: - tflag = GL_FALSE; cflag = GL_FALSE; nflag = GL_FALSE; - tcomps = 0; ccomps = 0; vcomps = 3; - voffset = 0; - defstride = 3*f; - break; - case GL_C4UB_V2F: - tflag = GL_FALSE; cflag = GL_TRUE; nflag = GL_FALSE; - tcomps = 0; ccomps = 4; vcomps = 2; - ctype = GL_UNSIGNED_BYTE; - coffset = 0; - voffset = c; - defstride = c + 2*f; - break; - case GL_C4UB_V3F: - tflag = GL_FALSE; cflag = GL_TRUE; nflag = GL_FALSE; - tcomps = 0; ccomps = 4; vcomps = 3; - ctype = GL_UNSIGNED_BYTE; - coffset = 0; - voffset = c; - defstride = c + 3*f; - break; - case GL_C3F_V3F: - tflag = GL_FALSE; cflag = GL_TRUE; nflag = GL_FALSE; - tcomps = 0; ccomps = 3; vcomps = 3; - ctype = GL_FLOAT; - coffset = 0; - voffset = 3*f; - defstride = 6*f; - break; - case GL_N3F_V3F: - tflag = GL_FALSE; cflag = GL_FALSE; nflag = GL_TRUE; - tcomps = 0; ccomps = 0; vcomps = 3; - noffset = 0; - voffset = 3*f; - defstride = 6*f; - break; - case GL_C4F_N3F_V3F: - tflag = GL_FALSE; cflag = GL_TRUE; nflag = GL_TRUE; - tcomps = 0; ccomps = 4; vcomps = 3; - ctype = GL_FLOAT; - coffset = 0; - noffset = 4*f; - voffset = 7*f; - defstride = 10*f; - break; - case GL_T2F_V3F: - tflag = GL_TRUE; cflag = GL_FALSE; nflag = GL_FALSE; - tcomps = 2; ccomps = 0; vcomps = 3; - voffset = 2*f; - defstride = 5*f; - break; - case GL_T4F_V4F: - tflag = GL_TRUE; cflag = GL_FALSE; nflag = GL_FALSE; - tcomps = 4; ccomps = 0; vcomps = 4; - voffset = 4*f; - defstride = 8*f; - break; - case GL_T2F_C4UB_V3F: - tflag = GL_TRUE; cflag = GL_TRUE; nflag = GL_FALSE; - tcomps = 2; ccomps = 4; vcomps = 3; - ctype = GL_UNSIGNED_BYTE; - coffset = 2*f; - voffset = c+2*f; - defstride = c+5*f; - break; - case GL_T2F_C3F_V3F: - tflag = GL_TRUE; cflag = GL_TRUE; nflag = GL_FALSE; - tcomps = 2; ccomps = 3; vcomps = 3; - ctype = GL_FLOAT; - coffset = 2*f; - voffset = 5*f; - defstride = 8*f; - break; - case GL_T2F_N3F_V3F: - tflag = GL_TRUE; cflag = GL_FALSE; nflag = GL_TRUE; - tcomps = 2; ccomps = 0; vcomps = 3; - noffset = 2*f; - voffset = 5*f; - defstride = 8*f; - break; - case GL_T2F_C4F_N3F_V3F: - tflag = GL_TRUE; cflag = GL_TRUE; nflag = GL_TRUE; - tcomps = 2; ccomps = 4; vcomps = 3; - ctype = GL_FLOAT; - coffset = 2*f; - noffset = 6*f; - voffset = 9*f; - defstride = 12*f; - break; - case GL_T4F_C4F_N3F_V4F: - tflag = GL_TRUE; cflag = GL_TRUE; nflag = GL_TRUE; - tcomps = 4; ccomps = 4; vcomps = 4; - ctype = GL_FLOAT; - coffset = 4*f; - noffset = 8*f; - voffset = 11*f; - defstride = 15*f; - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glInterleavedArrays(format)" ); - return; - } - - if (stride==0) { - stride = defstride; - } - - _mesa_DisableClientState( GL_EDGE_FLAG_ARRAY ); - _mesa_DisableClientState( GL_INDEX_ARRAY ); - - /* Texcoords */ - coordUnitSave = ctx->Array.ActiveTexture; - if (tflag) { - GLint i; - GLint factor = ctx->Array.TexCoordInterleaveFactor; - for (i = 0; i < factor; i++) { - _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) ); - _mesa_EnableClientState( GL_TEXTURE_COORD_ARRAY ); - _mesa_TexCoordPointer( tcomps, GL_FLOAT, stride, - (GLubyte *) pointer + i * coffset ); - } - for (i = factor; i < (GLint) ctx->Const.MaxTextureUnits; i++) { - _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) ); - _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY ); - } - } - else { - GLint i; - for (i = 0; i < (GLint) ctx->Const.MaxTextureUnits; i++) { - _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) ); - _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY ); - } - } - /* Restore texture coordinate unit index */ - _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + coordUnitSave) ); - - - /* Color */ - if (cflag) { - _mesa_EnableClientState( GL_COLOR_ARRAY ); - _mesa_ColorPointer( ccomps, ctype, stride, - (GLubyte*) pointer + coffset ); - } - else { - _mesa_DisableClientState( GL_COLOR_ARRAY ); - } - - - /* Normals */ - if (nflag) { - _mesa_EnableClientState( GL_NORMAL_ARRAY ); - _mesa_NormalPointer( GL_FLOAT, stride, - (GLubyte*) pointer + noffset ); - } - else { - _mesa_DisableClientState( GL_NORMAL_ARRAY ); - } - - _mesa_EnableClientState( GL_VERTEX_ARRAY ); - _mesa_VertexPointer( vcomps, GL_FLOAT, stride, - (GLubyte *) pointer + voffset ); -} - - - -void -_mesa_LockArraysEXT(GLint first, GLsizei count) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glLockArrays %d %d\n", first, count); - - if (first == 0 && count > 0 && - count <= (GLint) ctx->Const.MaxArrayLockSize) { - ctx->Array.LockFirst = first; - ctx->Array.LockCount = count; - } - else { - ctx->Array.LockFirst = 0; - ctx->Array.LockCount = 0; - } - - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_ALL; - - if (ctx->Driver.LockArraysEXT) - ctx->Driver.LockArraysEXT( ctx, first, count ); -} - - -void -_mesa_UnlockArraysEXT( void ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glUnlockArrays\n"); - - ctx->Array.LockFirst = 0; - ctx->Array.LockCount = 0; - ctx->NewState |= _NEW_ARRAY; - ctx->Array.NewState |= _NEW_ARRAY_ALL; - - if (ctx->Driver.UnlockArraysEXT) - ctx->Driver.UnlockArraysEXT( ctx ); -} - - - -/* GL_EXT_multi_draw_arrays */ -/* Somebody forgot to spec the first and count parameters as const! */ -void -_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first, - GLsizei *count, GLsizei primcount ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - for (i = 0; i < primcount; i++) { - if (count[i] > 0) { - (ctx->Exec->DrawArrays)(mode, first[i], count[i]); - } - } -} - - -/* GL_EXT_multi_draw_arrays */ -void -_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - for (i = 0; i < primcount; i++) { - if (count[i] > 0) { - (ctx->Exec->DrawElements)(mode, count[i], type, indices[i]); - } - } -} Index: xc/extras/Mesa/src/varray.h diff -u xc/extras/Mesa/src/varray.h:1.7 xc/extras/Mesa/src/varray.h:removed --- xc/extras/Mesa/src/varray.h:1.7 Sun Sep 28 15:17:00 2003 +++ xc/extras/Mesa/src/varray.h Wed Mar 16 21:00:34 2005 @@ -1,122 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef VARRAY_H -#define VARRAY_H - - -#include "mtypes.h" - - -extern void -_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr); - -extern void -_mesa_UnlockArraysEXT( void ); - -extern void -_mesa_LockArraysEXT(GLint first, GLsizei count); - - -extern void -_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr); - - -extern void -_mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_VertexPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr); - - -extern void -_mesa_NormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr); - - -extern void -_mesa_ColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr); - - -extern void -_mesa_IndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, - const GLvoid *ptr); - - -extern void -_mesa_TexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, - GLsizei count, const GLvoid *ptr); - - -extern void -_mesa_EdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean *ptr); - - -extern void -_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_SecondaryColorPointerEXT(GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - - -extern void -_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer); - - -extern void -_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer); - - -extern void -_mesa_MultiDrawArraysEXT( GLenum mode, GLint *first, - GLsizei *count, GLsizei primcount ); - -extern void -_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount ); - - -#endif Index: xc/extras/Mesa/src/vpexec.c diff -u xc/extras/Mesa/src/vpexec.c:1.1.1.1 xc/extras/Mesa/src/vpexec.c:removed --- xc/extras/Mesa/src/vpexec.c:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vpexec.c Wed Mar 16 21:00:35 2005 @@ -1,739 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * -------- Regarding NV_vertex_program -------- - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * o Redistribution of the source code must contain a copyright notice - * and this list of conditions; - * - * o Redistribution in binary and source code form must contain the - * following Notice in the software and any documentation and/or other - * materials provided with the distribution; and - * - * o The name of Nvidia may not be used to promote or endorse software - * derived from the software. - * - * NOTICE: Nvidia hereby grants to each recipient a non-exclusive worldwide - * royalty free patent license under patent claims that are licensable by - * Nvidia and which are necessarily required and for which no commercially - * viable non infringing alternative exists to make, use, sell, offer to sell, - * import and otherwise transfer the vertex extension for the Mesa 3D Graphics - * Library as distributed in source code and object code form. No hardware or - * hardware implementation (including a semiconductor implementation and chips) - * are licensed hereunder. If a recipient makes a patent claim or institutes - * patent litigation against Nvidia or Nvidia's customers for use or sale of - * Nvidia products, then this license grant as to such recipient shall - * immediately terminate and recipient immediately agrees to cease use and - * distribution of the Mesa Program and derivatives thereof. - * - * THE MESA 3D GRAPHICS LIBRARY IS PROVIDED ON AN "AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, - * WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-NFRINGEMENT - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * NVIDIA SHALL NOT HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION - * LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE MESA 3D GRAPHICS - * LIBRARY OR EVIDENCE OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDR, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * If you do not comply with this agreement, then Nvidia may cancel the license - * and rights granted herein. - * --------------------------------------------- - */ - -/** - * \file vpexec.c - * \brief Code to execute vertex programs. - * \author Brian Paul - */ - -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" -#include "vpexec.h" -#include "mmath.h" -#include "math/m_matrix.h" - - -/** - * Load/initialize the vertex program registers. - * This needs to be done per vertex. - */ -void -_mesa_init_vp_registers(GLcontext *ctx) -{ - struct vp_machine *machine = &(ctx->VertexProgram.Machine); - GLuint i; - - /* Input registers get initialized from the current vertex attribs */ - MEMCPY(machine->Registers[VP_INPUT_REG_START], - ctx->Current.Attrib, - 16 * 4 * sizeof(GLfloat)); - - /* Output and temp regs are initialized to [0,0,0,1] */ - for (i = VP_OUTPUT_REG_START; i <= VP_OUTPUT_REG_END; i++) { - machine->Registers[i][0] = 0.0F; - machine->Registers[i][1] = 0.0F; - machine->Registers[i][2] = 0.0F; - machine->Registers[i][3] = 1.0F; - } - for (i = VP_TEMP_REG_START; i <= VP_TEMP_REG_END; i++) { - machine->Registers[i][0] = 0.0F; - machine->Registers[i][1] = 0.0F; - machine->Registers[i][2] = 0.0F; - machine->Registers[i][3] = 1.0F; - } - - /* The program regs aren't touched */ -} - - - -/** - * Copy the 16 elements of a matrix into four consecutive program - * registers starting at 'pos'. - */ -static void -load_matrix(GLfloat registers[][4], GLuint pos, const GLfloat mat[16]) -{ - GLuint i; - pos += VP_PROG_REG_START; - for (i = 0; i < 4; i++) { - registers[pos + i][0] = mat[0 + i]; - registers[pos + i][1] = mat[4 + i]; - registers[pos + i][2] = mat[8 + i]; - registers[pos + i][3] = mat[12 + i]; - } -} - - -/** - * As above, but transpose the matrix. - */ -static void -load_transpose_matrix(GLfloat registers[][4], GLuint pos, - const GLfloat mat[16]) -{ - pos += VP_PROG_REG_START; - MEMCPY(registers[pos], mat, 16 * sizeof(GLfloat)); -} - - -/** - * Load all currently tracked matrices into the program registers. - * This needs to be done per glBegin/glEnd. - */ -void -_mesa_init_tracked_matrices(GLcontext *ctx) -{ - GLuint i; - - for (i = 0; i < VP_NUM_PROG_REGS / 4; i++) { - /* point 'mat' at source matrix */ - GLmatrix *mat; - if (ctx->VertexProgram.TrackMatrix[i] == GL_MODELVIEW) { - mat = ctx->ModelviewMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_PROJECTION) { - mat = ctx->ProjectionMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_TEXTURE) { - mat = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_COLOR) { - mat = ctx->ColorMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i]==GL_MODELVIEW_PROJECTION_NV) { - /* XXX verify the combined matrix is up to date */ - mat = &ctx->_ModelProjectMatrix; - } - else if (ctx->VertexProgram.TrackMatrix[i] >= GL_MATRIX0_NV && - ctx->VertexProgram.TrackMatrix[i] <= GL_MATRIX7_NV) { - GLuint n = ctx->VertexProgram.TrackMatrix[i] - GL_MATRIX0_NV; - ASSERT(n < MAX_PROGRAM_MATRICES); - mat = ctx->ProgramMatrixStack[n].Top; - } - else { - /* no matrix is tracked, but we leave the register values as-is */ - assert(ctx->VertexProgram.TrackMatrix[i] == GL_NONE); - continue; - } - - /* load the matrix */ - if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_IDENTITY_NV) { - load_matrix(ctx->VertexProgram.Machine.Registers, i*4, mat->m); - } - else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_INVERSE_NV) { - _math_matrix_analyse(mat); /* update the inverse */ - assert((mat->flags & MAT_DIRTY_INVERSE) == 0); - load_matrix(ctx->VertexProgram.Machine.Registers, i*4, mat->inv); - } - else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_TRANSPOSE_NV) { - load_transpose_matrix(ctx->VertexProgram.Machine.Registers, i*4, mat->m); - } - else { - assert(ctx->VertexProgram.TrackMatrixTransform[i] - == GL_INVERSE_TRANSPOSE_NV); - _math_matrix_analyse(mat); /* update the inverse */ - assert((mat->flags & MAT_DIRTY_INVERSE) == 0); - load_transpose_matrix(ctx->VertexProgram.Machine.Registers, - i*4, mat->inv); - } - } -} - - - -/** - * For debugging. Dump the current vertex program machine registers. - */ -void -_mesa_dump_vp_machine( const struct vp_machine *machine ) -{ - int i; - _mesa_printf("VertexIn:\n"); - for (i = 0; i < VP_NUM_INPUT_REGS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Registers[i + VP_INPUT_REG_START][0], - machine->Registers[i + VP_INPUT_REG_START][1], - machine->Registers[i + VP_INPUT_REG_START][2], - machine->Registers[i + VP_INPUT_REG_START][3]); - } - _mesa_printf("\n"); - - _mesa_printf("VertexOut:\n"); - for (i = 0; i < VP_NUM_OUTPUT_REGS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Registers[i + VP_OUTPUT_REG_START][0], - machine->Registers[i + VP_OUTPUT_REG_START][1], - machine->Registers[i + VP_OUTPUT_REG_START][2], - machine->Registers[i + VP_OUTPUT_REG_START][3]); - } - _mesa_printf("\n"); - - _mesa_printf("Registers:\n"); - for (i = 0; i < VP_NUM_TEMP_REGS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Registers[i + VP_TEMP_REG_START][0], - machine->Registers[i + VP_TEMP_REG_START][1], - machine->Registers[i + VP_TEMP_REG_START][2], - machine->Registers[i + VP_TEMP_REG_START][3]); - } - _mesa_printf("\n"); - - _mesa_printf("Parameters:\n"); - for (i = 0; i < VP_NUM_PROG_REGS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Registers[i + VP_PROG_REG_START][0], - machine->Registers[i + VP_PROG_REG_START][1], - machine->Registers[i + VP_PROG_REG_START][2], - machine->Registers[i + VP_PROG_REG_START][3]); - } - _mesa_printf("\n"); -} - - -/** - * Fetch a 4-element float vector from the given source register. - * Apply swizzling and negating as needed. - */ -static void -fetch_vector4( const struct vp_src_register *source, - const struct vp_machine *machine, - GLfloat result[4] ) -{ - static const GLfloat zero[4] = { 0, 0, 0, 0 }; - const GLfloat *src; - - if (source->RelAddr) { - const GLint reg = source->Register + machine->AddressReg; - if (reg < 0 || reg > VP_NUM_PROG_REGS) - src = zero; - else - src = machine->Registers[VP_PROG_REG_START + reg]; - } - else { - src = machine->Registers[source->Register]; - } - - if (source->Negate) { - result[0] = -src[source->Swizzle[0]]; - result[1] = -src[source->Swizzle[1]]; - result[2] = -src[source->Swizzle[2]]; - result[3] = -src[source->Swizzle[3]]; - } - else { - result[0] = src[source->Swizzle[0]]; - result[1] = src[source->Swizzle[1]]; - result[2] = src[source->Swizzle[2]]; - result[3] = src[source->Swizzle[3]]; - } -} - - -/** - * As above, but only return result[0] element. - */ -static void -fetch_vector1( const struct vp_src_register *source, - const struct vp_machine *machine, - GLfloat result[4] ) -{ - static const GLfloat zero[4] = { 0, 0, 0, 0 }; - const GLfloat *src; - - if (source->RelAddr) { - const GLint reg = source->Register + machine->AddressReg; - if (reg < 0 || reg > VP_NUM_PROG_REGS) - src = zero; - else - src = machine->Registers[VP_PROG_REG_START + reg]; - } - else { - src = machine->Registers[source->Register]; - } - - if (source->Negate) { - result[0] = -src[source->Swizzle[0]]; - } - else { - result[0] = src[source->Swizzle[0]]; - } -} - - -/** - * Store 4 floats into a register. - */ -static void -store_vector4( const struct vp_dst_register *dest, struct vp_machine *machine, - const GLfloat value[4] ) -{ - GLfloat *dst = machine->Registers[dest->Register]; - - if (dest->WriteMask[0]) - dst[0] = value[0]; - if (dest->WriteMask[1]) - dst[1] = value[1]; - if (dest->WriteMask[2]) - dst[2] = value[2]; - if (dest->WriteMask[3]) - dst[3] = value[3]; -} - - -/** - * Set x to positive or negative infinity. - */ -#ifdef USE_IEEE -#define SET_POS_INFINITY(x) ( *((GLuint *) &x) = 0x7F800000 ) -#define SET_NEG_INFINITY(x) ( *((GLuint *) &x) = 0xFF800000 ) -#elif defined(VMS) -#define SET_POS_INFINITY(x) x = __MAXFLOAT -#define SET_NEG_INFINITY(x) x = -__MAXFLOAT -#else -#define SET_POS_INFINITY(x) x = (GLfloat) HUGE_VAL -#define SET_NEG_INFINITY(x) x = (GLfloat) -HUGE_VAL -#endif - -#define SET_FLOAT_BITS(x, bits) ((fi_type *) &(x))->i = bits - - -/** - * Execute the given vertex program - */ -void -_mesa_exec_program(GLcontext *ctx, const struct vp_program *program) -{ - struct vp_machine *machine = &ctx->VertexProgram.Machine; - const struct vp_instruction *inst; - - /* XXX load vertex fields into input registers */ - /* and do other initialization */ - - - for (inst = program->Instructions; inst->Opcode !=END; inst++) { - switch (inst->Opcode) { - case MOV: - { - GLfloat t[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - store_vector4( &inst->DstReg, machine, t ); - } - break; - case LIT: - { - const GLfloat epsilon = 1.0e-5F; /* XXX fix? */ - GLfloat t[4], lit[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - if (t[3] < -(128.0F - epsilon)) - t[3] = - (128.0F - epsilon); - else if (t[3] > 128.0F - epsilon) - t[3] = 128.0F - epsilon; - if (t[0] < 0.0) - t[0] = 0.0; - if (t[1] < 0.0) - t[1] = 0.0; - lit[0] = 1.0; - lit[1] = t[0]; - lit[2] = (t[0] > 0.0) ? (GLfloat) exp(t[3] * log(t[1])) : 0.0F; - lit[3] = 1.0; - store_vector4( &inst->DstReg, machine, lit ); - } - break; - case RCP: - { - GLfloat t[4]; - fetch_vector1( &inst->SrcReg[0], machine, t ); - if (t[0] != 1.0F) - t[0] = 1.0F / t[0]; /* div by zero is infinity! */ - t[1] = t[2] = t[3] = t[0]; - store_vector4( &inst->DstReg, machine, t ); - } - break; - case RSQ: - { - GLfloat t[4]; - fetch_vector1( &inst->SrcReg[0], machine, t ); - t[0] = (float) (1.0 / sqrt(fabs(t[0]))); - t[1] = t[2] = t[3] = t[0]; - store_vector4( &inst->DstReg, machine, t ); - } - break; - case EXP: - { - GLfloat t[4], q[4], floor_t0; - fetch_vector1( &inst->SrcReg[0], machine, t ); - floor_t0 = (float) floor(t[0]); - if (floor_t0 > FLT_MAX_EXP) { - SET_POS_INFINITY(q[0]); - SET_POS_INFINITY(q[2]); - } - else if (floor_t0 < FLT_MIN_EXP) { - q[0] = 0.0F; - q[2] = 0.0F; - } - else { -#ifdef USE_IEEE - GLint ii = (GLint) floor_t0; - ii = (ii < 23) + 0x3f800000; - SET_FLOAT_BITS(q[0], ii); - q[0] = *((GLfloat *) &ii); -#else - q[0] = (GLfloat) pow(2.0, floor_t0); -#endif - q[2] = (GLfloat) (q[0] * LOG2(q[1])); - } - q[1] = t[0] - floor_t0; - q[3] = 1.0F; - store_vector4( &inst->DstReg, machine, q ); - } - break; - case LOG: - { - GLfloat t[4], q[4], abs_t0; - fetch_vector1( &inst->SrcReg[0], machine, t ); - abs_t0 = (GLfloat) fabs(t[0]); - if (abs_t0 != 0.0F) { - /* Since we really can't handle infinite values on VMS - * like other OSes we'll use __MAXFLOAT to represent - * infinity. This may need some tweaking. - */ -#ifdef VMS - if (abs_t0 == __MAXFLOAT) { -#else - if (IS_INF_OR_NAN(abs_t0)) { -#endif - SET_POS_INFINITY(q[0]); - q[1] = 1.0F; - SET_POS_INFINITY(q[2]); - } - else { - int exponent; - double mantissa = frexp(t[0], &exponent); - q[0] = (GLfloat) (exponent - 1); - q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */ - q[2] = (GLfloat) (q[0] + LOG2(q[1])); - } - } - else { - SET_NEG_INFINITY(q[0]); - q[1] = 1.0F; - SET_NEG_INFINITY(q[2]); - } - q[3] = 1.0; - store_vector4( &inst->DstReg, machine, q ); - } - break; - case MUL: - { - GLfloat t[4], u[4], prod[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - prod[0] = t[0] * u[0]; - prod[1] = t[1] * u[1]; - prod[2] = t[2] * u[2]; - prod[3] = t[3] * u[3]; - store_vector4( &inst->DstReg, machine, prod ); - } - break; - case ADD: - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - sum[0] = t[0] + u[0]; - sum[1] = t[1] + u[1]; - sum[2] = t[2] + u[2]; - sum[3] = t[3] + u[3]; - store_vector4( &inst->DstReg, machine, sum ); - } - break; - case DP3: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( &inst->DstReg, machine, dot ); - } - break; - case DP4: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + t[3] * u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( &inst->DstReg, machine, dot ); - } - break; - case DST: - { - GLfloat t[4], u[4], dst[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - dst[0] = 1.0F; - dst[1] = t[1] * u[1]; - dst[2] = t[2]; - dst[3] = u[3]; - store_vector4( &inst->DstReg, machine, dst ); - } - break; - case MIN: - { - GLfloat t[4], u[4], min[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - min[0] = (t[0] < u[0]) ? t[0] : u[0]; - min[1] = (t[1] < u[1]) ? t[1] : u[1]; - min[2] = (t[2] < u[2]) ? t[2] : u[2]; - min[3] = (t[3] < u[3]) ? t[3] : u[3]; - store_vector4( &inst->DstReg, machine, min ); - } - break; - case MAX: - { - GLfloat t[4], u[4], max[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - max[0] = (t[0] > u[0]) ? t[0] : u[0]; - max[1] = (t[1] > u[1]) ? t[1] : u[1]; - max[2] = (t[2] > u[2]) ? t[2] : u[2]; - max[3] = (t[3] > u[3]) ? t[3] : u[3]; - store_vector4( &inst->DstReg, machine, max ); - } - break; - case SLT: - { - GLfloat t[4], u[4], slt[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - slt[0] = (t[0] < u[0]) ? 1.0F : 0.0F; - slt[1] = (t[1] < u[1]) ? 1.0F : 0.0F; - slt[2] = (t[2] < u[2]) ? 1.0F : 0.0F; - slt[3] = (t[3] < u[3]) ? 1.0F : 0.0F; - store_vector4( &inst->DstReg, machine, slt ); - } - break; - case SGE: - { - GLfloat t[4], u[4], sge[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - sge[0] = (t[0] >= u[0]) ? 1.0F : 0.0F; - sge[1] = (t[1] >= u[1]) ? 1.0F : 0.0F; - sge[2] = (t[2] >= u[2]) ? 1.0F : 0.0F; - sge[3] = (t[3] >= u[3]) ? 1.0F : 0.0F; - store_vector4( &inst->DstReg, machine, sge ); - } - break; - case MAD: - { - GLfloat t[4], u[4], v[4], sum[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - fetch_vector4( &inst->SrcReg[2], machine, v ); - sum[0] = t[0] * u[0] + v[0]; - sum[1] = t[1] * u[1] + v[1]; - sum[2] = t[2] * u[2] + v[2]; - sum[3] = t[3] * u[3] + v[3]; - store_vector4( &inst->DstReg, machine, sum ); - } - break; - case ARL: - { - GLfloat t[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - machine->AddressReg = (GLint) floor(t[0]); - } - break; - case DPH: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( &inst->DstReg, machine, dot ); - } - break; - case RCC: - { - GLfloat t[4], u; - fetch_vector1( &inst->SrcReg[0], machine, t ); - if (t[0] == 1.0F) - u = 1.0F; - else - u = 1.0F / t[0]; - if (u > 0.0F) { - if (u > 1.884467e+019F) { - u = 1.884467e+019F; /* IEEE 32-bit binary value 0x5F800000 */ - } - else if (u < 5.42101e-020F) { - u = 5.42101e-020F; /* IEEE 32-bit binary value 0x1F800000 */ - } - } - else { - if (u < -1.884467e+019F) { - u = -1.884467e+019F; /* IEEE 32-bit binary value 0xDF800000 */ - } - else if (u > -5.42101e-020F) { - u = -5.42101e-020F; /* IEEE 32-bit binary value 0x9F800000 */ - } - } - t[0] = t[1] = t[2] = t[3] = u; - store_vector4( &inst->DstReg, machine, t ); - } - break; - case SUB: - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - fetch_vector4( &inst->SrcReg[1], machine, u ); - sum[0] = t[0] - u[0]; - sum[1] = t[1] - u[1]; - sum[2] = t[2] - u[2]; - sum[3] = t[3] - u[3]; - store_vector4( &inst->DstReg, machine, sum ); - } - break; - case ABS: - { - GLfloat t[4]; - fetch_vector4( &inst->SrcReg[0], machine, t ); - if (t[0] < 0.0) t[0] = -t[0]; - if (t[1] < 0.0) t[1] = -t[1]; - if (t[2] < 0.0) t[2] = -t[2]; - if (t[3] < 0.0) t[3] = -t[3]; - store_vector4( &inst->DstReg, machine, t ); - } - break; - - case END: - return; - default: - /* bad instruction opcode */ - _mesa_problem(ctx, "Bad VP Opcode in _mesa_exec_program"); - return; - } - } -} - - - -/** -Thoughts on vertex program optimization: - -The obvious thing to do is to compile the vertex program into X86/SSE/3DNow! -assembly code. That will probably be a lot of work. - -Another approach might be to replace the vp_instruction->Opcode field with -a pointer to a specialized C function which executes the instruction. -In particular we can write functions which skip swizzling, negating, -masking, relative addressing, etc. when they're not needed. - -For example: - -void simple_add( struct vp_instruction *inst ) -{ - GLfloat *sum = machine->Registers[inst->DstReg.Register]; - GLfloat *a = machine->Registers[inst->SrcReg[0].Register]; - GLfloat *b = machine->Registers[inst->SrcReg[1].Register]; - sum[0] = a[0] + b[0]; - sum[1] = a[1] + b[1]; - sum[2] = a[2] + b[2]; - sum[3] = a[3] + b[3]; -} - -*/ - -/* - -KW: - -A first step would be to 'vectorize' the programs in the same way as -the normal transformation code in the tnl module. Thus each opcode -takes zero or more input vectors (registers) and produces one or more -output vectors. - -These operations would intially be coded in C, with machine-specific -assembly following, as is currently the case for matrix -transformations in the math/ directory. The preprocessing scheme for -selecting simpler operations Brian describes above would also work -here. - -This should give reasonable performance without excessive effort. - -*/ Index: xc/extras/Mesa/src/vpexec.h diff -u xc/extras/Mesa/src/vpexec.h:1.1.1.1 xc/extras/Mesa/src/vpexec.h:removed --- xc/extras/Mesa/src/vpexec.h:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vpexec.h Wed Mar 16 21:00:35 2005 @@ -1,44 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Brian Paul - */ - -#ifndef VPEXEC_H -#define VPEXEC_H - -extern void -_mesa_init_vp_registers(GLcontext *ctx); - -extern void -_mesa_init_tracked_matrices(GLcontext *ctx); - -extern void -_mesa_exec_program(GLcontext *ctx, const struct vp_program *program); - -extern void -_mesa_dump_vp_machine( const struct vp_machine *machine ); - -#endif Index: xc/extras/Mesa/src/vpparse.c diff -u xc/extras/Mesa/src/vpparse.c:1.2 xc/extras/Mesa/src/vpparse.c:removed --- xc/extras/Mesa/src/vpparse.c:1.2 Wed Oct 22 11:27:41 2003 +++ xc/extras/Mesa/src/vpparse.c Wed Mar 16 21:00:35 2005 @@ -1,1630 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/vpparse.c,v 1.2 2003/10/22 15:27:41 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * -------- Regarding NV_vertex_program -------- - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * o Redistribution of the source code must contain a copyright notice - * and this list of conditions; - * - * o Redistribution in binary and source code form must contain the - * following Notice in the software and any documentation and/or other - * materials provided with the distribution; and - * - * o The name of Nvidia may not be used to promote or endorse software - * derived from the software. - * - * NOTICE: Nvidia hereby grants to each recipient a non-exclusive worldwide - * royalty free patent license under patent claims that are licensable by - * Nvidia and which are necessarily required and for which no commercially - * viable non infringing alternative exists to make, use, sell, offer to sell, - * import and otherwise transfer the vertex extension for the Mesa 3D Graphics - * Library as distributed in source code and object code form. No hardware or - * hardware implementation (including a semiconductor implementation and chips) - * are licensed hereunder. If a recipient makes a patent claim or institutes - * patent litigation against Nvidia or Nvidia's customers for use or sale of - * Nvidia products, then this license grant as to such recipient shall - * immediately terminate and recipient immediately agrees to cease use and - * distribution of the Mesa Program and derivatives thereof. - * - * THE MESA 3D GRAPHICS LIBRARY IS PROVIDED ON AN "AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, - * WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-NFRINGEMENT - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * NVIDIA SHALL NOT HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION - * LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE MESA 3D GRAPHICS - * LIBRARY OR EVIDENCE OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDR, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * If you do not comply with this agreement, then Nvidia may cancel the license - * and rights granted herein. - * --------------------------------------------- - */ - -/** - * \file vpparse.c - * \brief Vertex program parser. - * \author Brian Paul - */ - - -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" -#include "vpparse.h" - - - -/************************ Symbol Table ******************************/ - -/* A simple symbol table implementation for ARB_vertex_program - * (not used yet) - */ - -#if 000 -struct symbol -{ - GLubyte *name; - GLint value; - struct symbol *next; -}; - -static struct symbol *SymbolTable = NULL; - -static GLboolean -IsSymbol(const GLubyte *symbol) -{ - struct symbol *s; - for (s = SymbolTable; s; s = s->next) { - if (strcmp((char *) symbol, (char *)s->name) == 0) - return GL_TRUE; - } - return GL_FALSE; -} - -static GLint -GetSymbolValue(const GLubyte *symbol) -{ - struct symbol *s; - for (s = SymbolTable; s; s = s->next) { - if (strcmp((char *) symbol, (char *)s->name) == 0) - return s->value; - } - return 0; -} - -static void -AddSymbol(const GLubyte *symbol, GLint value) -{ - struct symbol *s = MALLOC_STRUCT(symbol); - if (s) { - s->name = (GLubyte *) strdup((char *) symbol); - s->value = value; - s->next = SymbolTable; - SymbolTable = s; - } -} - -static void -ResetSymbolTable(void) -{ - struct symbol *s, *next; - for (s = SymbolTable; s; s = next) { - next = s->next; - FREE(s->name); - FREE(s); - s = next; - } - SymbolTable = NULL; -} -#endif - -/***************************** Parsing ******************************/ - - -static GLboolean IsLetter(GLubyte b) -{ - return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z'); -} - - -static GLboolean IsDigit(GLubyte b) -{ - return b >= '0' && b <= '9'; -} - - -static GLboolean IsWhitespace(GLubyte b) -{ - return b == ' ' || b == '\t' || b == '\n' || b == '\r'; -} - - -/** - * Starting at 'str' find the next token. A token can be an integer, - * an identifier or punctuation symbol. - * \return <= 0 we found an error, else, return number of characters parsed. - */ -static GLint -GetToken(const GLubyte *str, GLubyte *token) -{ - GLint i = 0, j = 0; - - token[0] = 0; - - /* skip whitespace and comments */ - while (str[i] && (IsWhitespace(str[i]) || str[i] == '#')) { - if (str[i] == '#') { - /* skip comment */ - while (str[i] && (str[i] != '\n' && str[i] != '\r')) { - i++; - } - } - else { - /* skip whitespace */ - i++; - } - } - - if (str[i] == 0) - return -i; - - /* try matching an integer */ - while (str[i] && IsDigit(str[i])) { - token[j++] = str[i++]; - } - if (j > 0 || !str[i]) { - token[j] = 0; - return i; - } - - /* try matching an identifier */ - if (IsLetter(str[i])) { - while (str[i] && (IsLetter(str[i]) || IsDigit(str[i]))) { - token[j++] = str[i++]; - } - token[j] = 0; - return i; - } - - /* punctuation */ - if (str[i]) { - token[0] = str[i++]; - token[1] = 0; - return i; - } - - /* end of input */ - token[0] = 0; - return i; -} - - -/** - * Get next token from input stream and increment stream pointer past token. - */ -static GLboolean -Parse_Token(const GLubyte **s, GLubyte *token) -{ - GLint i; - i = GetToken(*s, token); - if (i <= 0) { - *s += (-i); - return GL_FALSE; - } - *s += i; - return GL_TRUE; -} - - -/** - * Get next token from input stream but don't increment stream pointer. - */ -static GLboolean -Peek_Token(const GLubyte **s, GLubyte *token) -{ - GLint i, len; - i = GetToken(*s, token); - if (i <= 0) { - *s += (-i); - return GL_FALSE; - } - len = _mesa_strlen((char *) token); - *s += (i - len); - return GL_TRUE; -} - - -/** - * String equality test - */ -static GLboolean -StrEq(const GLubyte *a, const GLubyte *b) -{ - GLint i; - for (i = 0; a[i] && b[i] && a[i] == b[i]; i++) - ; - if (a[i] == 0 && b[i] == 0) - return GL_TRUE; - else - return GL_FALSE; -} - - -/**********************************************************************/ - -static const char *InputRegisters[] = { - "OPOS", "WGHT", "NRML", "COL0", "COL1", "FOGC", "6", "7", - "TEX0", "TEX1", "TEX2", "TEX3", "TEX4", "TEX5", "TEX6", "TEX7", NULL -}; - -static const char *OutputRegisters[] = { - "HPOS", "COL0", "COL1", "BFC0", "BFC1", "FOGC", "PSIZ", - "TEX0", "TEX1", "TEX2", "TEX3", "TEX4", "TEX5", "TEX6", "TEX7", NULL -}; - -static const char *Opcodes[] = { - "MOV", "LIT", "RCP", "RSQ", "EXP", "LOG", "MUL", "ADD", "DP3", "DP4", - "DST", "MIN", "MAX", "SLT", "SGE", "MAD", "ARL", "DPH", "RCC", "SUB", - "ABS", "END", NULL -}; - - -#ifdef DEBUG - -#define PARSE_ERROR \ -do { \ - _mesa_printf("vpparse.c error at %d: parse error\n", __LINE__); \ - return GL_FALSE; \ -} while(0) - -#define PARSE_ERROR1(msg) \ -do { \ - _mesa_printf("vpparse.c error at %d: %s\n", __LINE__, msg); \ - return GL_FALSE; \ -} while(0) - -#define PARSE_ERROR2(msg1, msg2) \ -do { \ - _mesa_printf("vpparse.c error at %d: %s %s\n", __LINE__, msg1, msg2); \ - return GL_FALSE; \ -} while(0) - -#else - -#define PARSE_ERROR return GL_FALSE -#define PARSE_ERROR1(msg1) return GL_FALSE -#define PARSE_ERROR2(msg1, msg2) return GL_FALSE - -#endif - - -static GLuint -IsProgRegister(GLuint r) -{ - return (GLuint) (r >= VP_PROG_REG_START && r <= VP_PROG_REG_END); -} - -static GLuint -IsInputRegister(GLuint r) -{ - return (GLuint) (/* r >= VP_INPUT_REG_START && */ r <= VP_INPUT_REG_END); -} - -static GLuint -IsOutputRegister(GLuint r) -{ - return (GLuint) (r >= VP_OUTPUT_REG_START && r <= VP_OUTPUT_REG_END); -} - - - -/**********************************************************************/ - -/* XXX - * These shouldn't be globals as that makes the parser non-reentrant. - * We should really define a "ParserContext" class which contains these - * and the pointer into the program text. - */ -static GLboolean IsStateProgram = GL_FALSE; -static GLboolean IsPositionInvariant = GL_FALSE; -static GLboolean IsVersion1_1 = GL_FALSE; - -/** - * Try to match 'pattern' as the next token after any whitespace/comments. - */ -static GLboolean -Parse_String(const GLubyte **s, const char *pattern) -{ - GLint i; - - /* skip whitespace and comments */ - while (IsWhitespace(**s) || **s == '#') { - if (**s == '#') { - while (**s && (**s != '\n' && **s != '\r')) { - *s += 1; - } - } - else { - /* skip whitespace */ - *s += 1; - } - } - - /* Try to match the pattern */ - for (i = 0; pattern[i]; i++) { - if (**s != pattern[i]) - PARSE_ERROR2("failed to match", pattern); /* failure */ - *s += 1; - } - - return GL_TRUE; /* success */ -} - - -/** - * Parse a temporary register: Rnn - */ -static GLboolean -Parse_TempReg(const GLubyte **s, GLint *tempRegNum) -{ - GLubyte token[100]; - - /* Should be 'R##' */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - if (token[0] != 'R') - PARSE_ERROR1("Expected R##"); - - if (IsDigit(token[1])) { - GLint reg = _mesa_atoi((char *) (token + 1)); - if (reg >= VP_NUM_TEMP_REGS) - PARSE_ERROR1("Bad temporary register name"); - *tempRegNum = VP_TEMP_REG_START + reg; - } - else { - PARSE_ERROR1("Bad temporary register name"); - } - - return GL_TRUE; -} - - -/** - * Parse address register "A0.x" - */ -static GLboolean -Parse_AddrReg(const GLubyte **s) -{ - /* match 'A0' */ - if (!Parse_String(s, "A0")) - PARSE_ERROR; - - /* match '.' */ - if (!Parse_String(s, ".")) - PARSE_ERROR; - - /* match 'x' */ - if (!Parse_String(s, "x")) - PARSE_ERROR; - - return GL_TRUE; -} - - -/** - * Parse absolute program parameter register "c[##]" - */ -static GLboolean -Parse_AbsParamReg(const GLubyte **s, GLint *regNum) -{ - GLubyte token[100]; - - if (!Parse_String(s, "c")) - PARSE_ERROR; - - if (!Parse_String(s, "[")) - PARSE_ERROR; - - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (IsDigit(token[0])) { - /* a numbered program parameter register */ - GLint reg = _mesa_atoi((char *) token); - if (reg >= VP_NUM_PROG_REGS) - PARSE_ERROR1("Bad constant program number"); - *regNum = VP_PROG_REG_START + reg; - } - else { - PARSE_ERROR; - } - - if (!Parse_String(s, "]")) - PARSE_ERROR; - - return GL_TRUE; -} - - -static GLboolean -Parse_ParamReg(const GLubyte **s, struct vp_src_register *srcReg) -{ - GLubyte token[100]; - - if (!Parse_String(s, "c")) - PARSE_ERROR; - - if (!Parse_String(s, "[")) - PARSE_ERROR; - - if (!Peek_Token(s, token)) - PARSE_ERROR; - - if (IsDigit(token[0])) { - /* a numbered program parameter register */ - GLint reg; - (void) Parse_Token(s, token); - reg = _mesa_atoi((char *) token); - if (reg >= VP_NUM_PROG_REGS) - PARSE_ERROR1("Bad constant program number"); - srcReg->Register = VP_PROG_REG_START + reg; - } - else if (StrEq(token, (GLubyte *) "A0")) { - /* address register "A0.x" */ - if (!Parse_AddrReg(s)) - PARSE_ERROR; - - srcReg->RelAddr = GL_TRUE; - srcReg->Register = 0; - - /* Look for +/-N offset */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - - if (token[0] == '-' || token[0] == '+') { - const GLubyte sign = token[0]; - (void) Parse_Token(s, token); /* consume +/- */ - - /* an integer should be next */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (IsDigit(token[0])) { - const GLint k = _mesa_atoi((char *) token); - if (sign == '-') { - if (k > 64) - PARSE_ERROR1("Bad address offset"); - srcReg->Register = -k; - } - else { - if (k > 63) - PARSE_ERROR1("Bad address offset"); - srcReg->Register = k; - } - } - else { - PARSE_ERROR; - } - } - else { - /* probably got a ']', catch it below */ - } - } - else { - PARSE_ERROR; - } - - /* Match closing ']' */ - if (!Parse_String(s, "]")) - PARSE_ERROR; - - return GL_TRUE; -} - - -/** - * Parse v[#] or v[] - */ -static GLboolean -Parse_AttribReg(const GLubyte **s, GLint *tempRegNum) -{ - GLubyte token[100]; - GLint j; - - /* Match 'v' */ - if (!Parse_String(s, "v")) - PARSE_ERROR; - - /* Match '[' */ - if (!Parse_String(s, "[")) - PARSE_ERROR; - - /* match number or named register */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (IsStateProgram && token[0] != '0') - PARSE_ERROR1("Only v[0] accessible in vertex state programs"); - - if (IsDigit(token[0])) { - GLint reg = _mesa_atoi((char *) token); - if (reg >= VP_NUM_INPUT_REGS) - PARSE_ERROR1("Bad vertex attribute register name"); - *tempRegNum = VP_INPUT_REG_START + reg; - } - else { - for (j = 0; InputRegisters[j]; j++) { - if (StrEq(token, (const GLubyte *) InputRegisters[j])) { - *tempRegNum = VP_INPUT_REG_START + j; - break; - } - } - if (!InputRegisters[j]) { - /* unknown input register label */ - PARSE_ERROR2("Bad register name", token); - } - } - - /* Match '[' */ - if (!Parse_String(s, "]")) - PARSE_ERROR; - - return GL_TRUE; -} - - -static GLboolean -Parse_OutputReg(const GLubyte **s, GLint *outputRegNum) -{ - GLubyte token[100]; - GLint start, j; - - /* Match 'o' */ - if (!Parse_String(s, "o")) - PARSE_ERROR; - - /* Match '[' */ - if (!Parse_String(s, "[")) - PARSE_ERROR; - - /* Get output reg name */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (IsPositionInvariant) - start = 1; /* skip HPOS register name */ - else - start = 0; - - /* try to match an output register name */ - for (j = start; OutputRegisters[j]; j++) { - if (StrEq(token, (const GLubyte *) OutputRegisters[j])) { - *outputRegNum = VP_OUTPUT_REG_START + j; - break; - } - } - if (!OutputRegisters[j]) - PARSE_ERROR1("Unrecognized output register name"); - - /* Match ']' */ - if (!Parse_String(s, "]")) - PARSE_ERROR1("Expected ]"); - - return GL_TRUE; -} - - -static GLboolean -Parse_MaskedDstReg(const GLubyte **s, struct vp_dst_register *dstReg) -{ - GLubyte token[100]; - - /* Dst reg can be R or o[n] */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - - if (token[0] == 'R') { - /* a temporary register */ - if (!Parse_TempReg(s, &dstReg->Register)) - PARSE_ERROR; - } - else if (!IsStateProgram && token[0] == 'o') { - /* an output register */ - if (!Parse_OutputReg(s, &dstReg->Register)) - PARSE_ERROR; - } - else if (IsStateProgram && token[0] == 'c') { - /* absolute program parameter register */ - if (!Parse_AbsParamReg(s, &dstReg->Register)) - PARSE_ERROR; - } - else { - PARSE_ERROR1("Bad destination register name"); - } - - /* Parse optional write mask */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - - if (token[0] == '.') { - /* got a mask */ - GLint k = 0; - - if (!Parse_String(s, ".")) - PARSE_ERROR; - - if (!Parse_Token(s, token)) - PARSE_ERROR; - - dstReg->WriteMask[0] = GL_FALSE; - dstReg->WriteMask[1] = GL_FALSE; - dstReg->WriteMask[2] = GL_FALSE; - dstReg->WriteMask[3] = GL_FALSE; - - if (token[k] == 'x') { - dstReg->WriteMask[0] = GL_TRUE; - k++; - } - if (token[k] == 'y') { - dstReg->WriteMask[1] = GL_TRUE; - k++; - } - if (token[k] == 'z') { - dstReg->WriteMask[2] = GL_TRUE; - k++; - } - if (token[k] == 'w') { - dstReg->WriteMask[3] = GL_TRUE; - k++; - } - if (k == 0) { - PARSE_ERROR1("Bad writemask character"); - } - return GL_TRUE; - } - else { - dstReg->WriteMask[0] = GL_TRUE; - dstReg->WriteMask[1] = GL_TRUE; - dstReg->WriteMask[2] = GL_TRUE; - dstReg->WriteMask[3] = GL_TRUE; - return GL_TRUE; - } -} - - -static GLboolean -Parse_SwizzleSrcReg(const GLubyte **s, struct vp_src_register *srcReg) -{ - GLubyte token[100]; - - srcReg->RelAddr = GL_FALSE; - - /* check for '-' */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - if (token[0] == '-') { - (void) Parse_String(s, "-"); - srcReg->Negate = GL_TRUE; - if (!Peek_Token(s, token)) - PARSE_ERROR; - } - else { - srcReg->Negate = GL_FALSE; - } - - /* Src reg can be R, c[n], c[n +/- offset], or a named vertex attrib */ - if (token[0] == 'R') { - if (!Parse_TempReg(s, &srcReg->Register)) - PARSE_ERROR; - } - else if (token[0] == 'c') { - if (!Parse_ParamReg(s, srcReg)) - PARSE_ERROR; - } - else if (token[0] == 'v') { - if (!Parse_AttribReg(s, &srcReg->Register)) - PARSE_ERROR; - } - else { - PARSE_ERROR2("Bad source register name", token); - } - - /* init swizzle fields */ - srcReg->Swizzle[0] = 0; - srcReg->Swizzle[1] = 1; - srcReg->Swizzle[2] = 2; - srcReg->Swizzle[3] = 3; - - /* Look for optional swizzle suffix */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - if (token[0] == '.') { - (void) Parse_String(s, "."); /* consume . */ - - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (token[1] == 0) { - /* single letter swizzle */ - if (token[0] == 'x') - ASSIGN_4V(srcReg->Swizzle, 0, 0, 0, 0); - else if (token[0] == 'y') - ASSIGN_4V(srcReg->Swizzle, 1, 1, 1, 1); - else if (token[0] == 'z') - ASSIGN_4V(srcReg->Swizzle, 2, 2, 2, 2); - else if (token[0] == 'w') - ASSIGN_4V(srcReg->Swizzle, 3, 3, 3, 3); - else - PARSE_ERROR1("Expected x, y, z, or w"); - } - else { - /* 2, 3 or 4-component swizzle */ - GLint k; - for (k = 0; token[k] && k < 5; k++) { - if (token[k] == 'x') - srcReg->Swizzle[k] = 0; - else if (token[k] == 'y') - srcReg->Swizzle[k] = 1; - else if (token[k] == 'z') - srcReg->Swizzle[k] = 2; - else if (token[k] == 'w') - srcReg->Swizzle[k] = 3; - else - PARSE_ERROR; - } - if (k >= 5) - PARSE_ERROR; - } - } - - return GL_TRUE; -} - - -static GLboolean -Parse_ScalarSrcReg(const GLubyte **s, struct vp_src_register *srcReg) -{ - GLubyte token[100]; - - srcReg->RelAddr = GL_FALSE; - - /* check for '-' */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - if (token[0] == '-') { - srcReg->Negate = GL_TRUE; - (void) Parse_String(s, "-"); /* consume '-' */ - if (!Peek_Token(s, token)) - PARSE_ERROR; - } - else { - srcReg->Negate = GL_FALSE; - } - - /* Src reg can be R, c[n], c[n +/- offset], or a named vertex attrib */ - if (token[0] == 'R') { - if (!Parse_TempReg(s, &srcReg->Register)) - PARSE_ERROR; - } - else if (token[0] == 'c') { - if (!Parse_ParamReg(s, srcReg)) - PARSE_ERROR; - } - else if (token[0] == 'v') { - if (!Parse_AttribReg(s, &srcReg->Register)) - PARSE_ERROR; - } - else { - PARSE_ERROR2("Bad source register name", token); - } - - /* Look for .[xyzw] suffix */ - if (!Parse_String(s, ".")) - PARSE_ERROR; - - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (token[0] == 'x' && token[1] == 0) { - srcReg->Swizzle[0] = 0; - } - else if (token[0] == 'y' && token[1] == 0) { - srcReg->Swizzle[0] = 1; - } - else if (token[0] == 'z' && token[1] == 0) { - srcReg->Swizzle[0] = 2; - } - else if (token[0] == 'w' && token[1] == 0) { - srcReg->Swizzle[0] = 3; - } - else { - PARSE_ERROR1("Bad scalar source suffix"); - } - srcReg->Swizzle[1] = srcReg->Swizzle[2] = srcReg->Swizzle[3] = 0; - - return GL_TRUE; -} - - -static GLint -Parse_UnaryOpInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - GLubyte token[100]; - - /* opcode */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (StrEq(token, (GLubyte *) "MOV")) { - inst->Opcode = MOV; - } - else if (StrEq(token, (GLubyte *) "LIT")) { - inst->Opcode = LIT; - } - else if (StrEq(token, (GLubyte *) "ABS") && IsVersion1_1) { - inst->Opcode = ABS; - } - else { - PARSE_ERROR; - } - - /* dest reg */ - if (!Parse_MaskedDstReg(s, &inst->DstReg)) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[0])) - PARSE_ERROR; - - /* semicolon */ - if (!Parse_String(s, ";")) - PARSE_ERROR; - - return GL_TRUE; -} - - -static GLboolean -Parse_BiOpInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - GLubyte token[100]; - - /* opcode */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (StrEq(token, (GLubyte *) "MUL")) { - inst->Opcode = MUL; - } - else if (StrEq(token, (GLubyte *) "ADD")) { - inst->Opcode = ADD; - } - else if (StrEq(token, (GLubyte *) "DP3")) { - inst->Opcode = DP3; - } - else if (StrEq(token, (GLubyte *) "DP4")) { - inst->Opcode = DP4; - } - else if (StrEq(token, (GLubyte *) "DST")) { - inst->Opcode = DST; - } - else if (StrEq(token, (GLubyte *) "MIN")) { - inst->Opcode = ADD; - } - else if (StrEq(token, (GLubyte *) "MAX")) { - inst->Opcode = ADD; - } - else if (StrEq(token, (GLubyte *) "SLT")) { - inst->Opcode = SLT; - } - else if (StrEq(token, (GLubyte *) "SGE")) { - inst->Opcode = SGE; - } - else if (StrEq(token, (GLubyte *) "DPH") && IsVersion1_1) { - inst->Opcode = DPH; - } - else if (StrEq(token, (GLubyte *) "SUB") && IsVersion1_1) { - inst->Opcode = SUB; - } - else { - PARSE_ERROR; - } - - /* dest reg */ - if (!Parse_MaskedDstReg(s, &inst->DstReg)) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* first src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[0])) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* second src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[1])) - PARSE_ERROR; - - /* semicolon */ - if (!Parse_String(s, ";")) - PARSE_ERROR; - - /* make sure we don't reference more than one program parameter register */ - if (IsProgRegister(inst->SrcReg[0].Register) && - IsProgRegister(inst->SrcReg[1].Register) && - inst->SrcReg[0].Register != inst->SrcReg[1].Register) - PARSE_ERROR1("Can't reference two program parameter registers"); - - /* make sure we don't reference more than one vertex attribute register */ - if (IsInputRegister(inst->SrcReg[0].Register) && - IsInputRegister(inst->SrcReg[1].Register) && - inst->SrcReg[0].Register != inst->SrcReg[1].Register) - PARSE_ERROR1("Can't reference two vertex attribute registers"); - - return GL_TRUE; -} - - -static GLboolean -Parse_TriOpInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - GLubyte token[100]; - - /* opcode */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (StrEq(token, (GLubyte *) "MAD")) { - inst->Opcode = MAD; - } - else { - PARSE_ERROR; - } - - /* dest reg */ - if (!Parse_MaskedDstReg(s, &inst->DstReg)) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* first src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[0])) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* second src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[1])) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* third src arg */ - if (!Parse_SwizzleSrcReg(s, &inst->SrcReg[2])) - PARSE_ERROR; - - /* semicolon */ - if (!Parse_String(s, ";")) - PARSE_ERROR; - - /* make sure we don't reference more than one program parameter register */ - if ((IsProgRegister(inst->SrcReg[0].Register) && - IsProgRegister(inst->SrcReg[1].Register) && - inst->SrcReg[0].Register != inst->SrcReg[1].Register) || - (IsProgRegister(inst->SrcReg[0].Register) && - IsProgRegister(inst->SrcReg[2].Register) && - inst->SrcReg[0].Register != inst->SrcReg[2].Register) || - (IsProgRegister(inst->SrcReg[1].Register) && - IsProgRegister(inst->SrcReg[2].Register) && - inst->SrcReg[1].Register != inst->SrcReg[2].Register)) - PARSE_ERROR1("Can only reference one program register"); - - /* make sure we don't reference more than one vertex attribute register */ - if ((IsInputRegister(inst->SrcReg[0].Register) && - IsInputRegister(inst->SrcReg[1].Register) && - inst->SrcReg[0].Register != inst->SrcReg[1].Register) || - (IsInputRegister(inst->SrcReg[0].Register) && - IsInputRegister(inst->SrcReg[2].Register) && - inst->SrcReg[0].Register != inst->SrcReg[2].Register) || - (IsInputRegister(inst->SrcReg[1].Register) && - IsInputRegister(inst->SrcReg[2].Register) && - inst->SrcReg[1].Register != inst->SrcReg[2].Register)) - PARSE_ERROR1("Can only reference one input register"); - - return GL_TRUE; -} - - -static GLboolean -Parse_ScalarInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - GLubyte token[100]; - - /* opcode */ - if (!Parse_Token(s, token)) - PARSE_ERROR; - - if (StrEq(token, (GLubyte *) "RCP")) { - inst->Opcode = RCP; - } - else if (StrEq(token, (GLubyte *) "RSQ")) { - inst->Opcode = RSQ; - } - else if (StrEq(token, (GLubyte *) "EXP")) { - inst->Opcode = EXP; - } - else if (StrEq(token, (GLubyte *) "LOG")) { - inst->Opcode = LOG; - } - else if (StrEq(token, (GLubyte *) "RCC") && IsVersion1_1) { - inst->Opcode = RCC; - } - else { - PARSE_ERROR; - } - - /* dest reg */ - if (!Parse_MaskedDstReg(s, &inst->DstReg)) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* first src arg */ - if (!Parse_ScalarSrcReg(s, &inst->SrcReg[0])) - PARSE_ERROR; - - /* semicolon */ - if (!Parse_String(s, ";")) - PARSE_ERROR; - - return GL_TRUE; -} - - -static GLboolean -Parse_AddressInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - inst->Opcode = ARL; - - /* opcode */ - if (!Parse_String(s, "ARL")) - PARSE_ERROR; - - /* dest A0 reg */ - if (!Parse_AddrReg(s)) - PARSE_ERROR; - - /* comma */ - if (!Parse_String(s, ",")) - PARSE_ERROR; - - /* parse src reg */ - if (!Parse_ScalarSrcReg(s, &inst->SrcReg[0])) - PARSE_ERROR; - - /* semicolon */ - if (!Parse_String(s, ";")) - PARSE_ERROR; - - return GL_TRUE; -} - - -static GLboolean -Parse_EndInstruction(const GLubyte **s, struct vp_instruction *inst) -{ - GLubyte token[100]; - - /* opcode */ - if (!Parse_String(s, "END")) - PARSE_ERROR; - - inst->Opcode = END; - - /* this should fail! */ - if (Parse_Token(s, token)) - PARSE_ERROR2("Unexpected token after END:", token); - else - return GL_TRUE; -} - - -static GLboolean -Parse_OptionSequence(const GLubyte **s, struct vp_instruction program[]) -{ - while (1) { - GLubyte token[100]; - if (!Peek_Token(s, token)) { - PARSE_ERROR1("Unexpected end of input"); - return GL_FALSE; /* end of input */ - } - - if (!StrEq(token, (GLubyte *) "OPTION")) - return GL_TRUE; /* probably an instruction */ - - Parse_Token(s, token); - - if (!Parse_String(s, "NV_position_invariant")) - return GL_FALSE; - if (!Parse_String(s, ";")) - return GL_FALSE; - IsPositionInvariant = GL_TRUE; - } -} - - -static GLboolean -Parse_InstructionSequence(const GLubyte **s, struct vp_instruction program[]) -{ - GLubyte token[100]; - GLint count = 0; - - while (1) { - struct vp_instruction *inst = program + count; - - /* Initialize the instruction */ - inst->SrcReg[0].Register = -1; - inst->SrcReg[1].Register = -1; - inst->SrcReg[2].Register = -1; - inst->DstReg.Register = -1; - - if (!Peek_Token(s, token)) - PARSE_ERROR; - - if (StrEq(token, (GLubyte *) "MOV") || - StrEq(token, (GLubyte *) "LIT") || - StrEq(token, (GLubyte *) "ABS")) { - if (!Parse_UnaryOpInstruction(s, inst)) - PARSE_ERROR; - } - else if (StrEq(token, (GLubyte *) "MUL") || - StrEq(token, (GLubyte *) "ADD") || - StrEq(token, (GLubyte *) "DP3") || - StrEq(token, (GLubyte *) "DP4") || - StrEq(token, (GLubyte *) "DST") || - StrEq(token, (GLubyte *) "MIN") || - StrEq(token, (GLubyte *) "MAX") || - StrEq(token, (GLubyte *) "SLT") || - StrEq(token, (GLubyte *) "SGE") || - StrEq(token, (GLubyte *) "DPH") || - StrEq(token, (GLubyte *) "SUB")) { - if (!Parse_BiOpInstruction(s, inst)) - PARSE_ERROR; - } - else if (StrEq(token, (GLubyte *) "MAD")) { - if (!Parse_TriOpInstruction(s, inst)) - PARSE_ERROR; - } - else if (StrEq(token, (GLubyte *) "RCP") || - StrEq(token, (GLubyte *) "RSQ") || - StrEq(token, (GLubyte *) "EXP") || - StrEq(token, (GLubyte *) "LOG") || - StrEq(token, (GLubyte *) "RCC")) { - if (!Parse_ScalarInstruction(s, inst)) - PARSE_ERROR; - } - else if (StrEq(token, (GLubyte *) "ARL")) { - if (!Parse_AddressInstruction(s, inst)) - PARSE_ERROR; - } - else if (StrEq(token, (GLubyte *) "END")) { - if (!Parse_EndInstruction(s, inst)) - PARSE_ERROR; - else - return GL_TRUE; /* all done */ - } - else { - /* bad instruction name */ - PARSE_ERROR2("Unexpected token: ", token); - } - - count++; - if (count >= VP_MAX_INSTRUCTIONS) - PARSE_ERROR1("Program too long"); - } - - PARSE_ERROR; -} - - -static GLboolean -Parse_Program(const GLubyte **s, struct vp_instruction instBuffer[]) -{ - if (IsVersion1_1) { - if (!Parse_OptionSequence(s, instBuffer)) { - return GL_FALSE; - } - } - return Parse_InstructionSequence(s, instBuffer); -} - - -/** - * Parse/compile the 'str' returning the compiled 'program'. - * ctx->VertexProgram.ErrorPos will be -1 if successful. Otherwise, ErrorPos - * indicates the position of the error in 'str'. - */ -void -_mesa_parse_program(GLcontext *ctx, GLenum dstTarget, - const GLubyte *str, struct vp_program *program) -{ - const GLubyte *s; - struct vp_instruction instBuffer[VP_MAX_INSTRUCTIONS]; - GLubyte *newString; - struct vp_instruction *newInst; - GLenum target; - - ctx->VertexProgram.ErrorPos = -1; - IsPositionInvariant = GL_FALSE; - IsVersion1_1 = GL_FALSE; - - /* check the program header */ - if (_mesa_strncmp((const char *) str, "!!VP1.0", 7) == 0) { - target = GL_VERTEX_PROGRAM_NV; - s = str + 7; - IsStateProgram = GL_FALSE; - } - else if (_mesa_strncmp((const char *) str, "!!VP1.1", 7) == 0) { - target = GL_VERTEX_PROGRAM_NV; - s = str + 7; - IsStateProgram = GL_FALSE; - IsVersion1_1 = GL_TRUE; - } - else if (_mesa_strncmp((const char *) str, "!!VSP1.0", 8) == 0) { - target = GL_VERTEX_STATE_PROGRAM_NV; - s = str + 8; - IsStateProgram = GL_TRUE; - } - else { - /* invalid header */ - ctx->VertexProgram.ErrorPos = 0; - _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(bad header)"); - return; - } - - /* make sure target and header match */ - if (target != dstTarget) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glLoadProgramNV(target mismatch)"); - return; - } - - if (Parse_Program(&s, instBuffer)) { - GLuint numInst; - GLuint strLen; - GLuint inputsRead = 0; - GLuint outputsWritten = 0; - GLuint progRegsWritten = 0; - - /* Find length of the program and compute bitmasks to indicate which - * vertex input registers are read, which vertex result registers are - * written to, and which program registers are written to. - * We could actually do this while we parse the program. - */ - for (numInst = 0; instBuffer[numInst].Opcode != END; numInst++) { - const GLint srcReg0 = instBuffer[numInst].SrcReg[0].Register; - const GLint srcReg1 = instBuffer[numInst].SrcReg[1].Register; - const GLint srcReg2 = instBuffer[numInst].SrcReg[2].Register; - const GLint dstReg = instBuffer[numInst].DstReg.Register; - - if (IsOutputRegister(dstReg)) - outputsWritten |= (1 << (dstReg - VP_OUTPUT_REG_START)); - else if (IsProgRegister(dstReg)) - progRegsWritten |= (1 << (dstReg - VP_PROG_REG_START)); - if (IsInputRegister(srcReg0) - && !instBuffer[numInst].SrcReg[0].RelAddr) - inputsRead |= (1 << (srcReg0 - VP_INPUT_REG_START)); - if (IsInputRegister(srcReg1) - && !instBuffer[numInst].SrcReg[1].RelAddr) - inputsRead |= (1 << (srcReg1 - VP_INPUT_REG_START)); - if (IsInputRegister(srcReg2) - && !instBuffer[numInst].SrcReg[2].RelAddr) - inputsRead |= (1 << (srcReg2 - VP_INPUT_REG_START)); - } - numInst++; - - if (IsStateProgram) { - if (progRegsWritten == 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glLoadProgramNV(c[#] not written)"); - return; - } - } - else { - if (!IsPositionInvariant && !(outputsWritten & 1)) { - /* bit 1 = HPOS register */ - _mesa_error(ctx, GL_INVALID_OPERATION, - "glLoadProgramNV(HPOS not written)"); - return; - } - } - - program->InputsRead = inputsRead; - program->OutputsWritten = outputsWritten; - program->IsPositionInvariant = IsPositionInvariant; - - /* make copy of the input program string */ - strLen = _mesa_strlen((const char *) str); - newString = (GLubyte *) MALLOC(strLen + 1); - if (!newString) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; - } - MEMCPY(newString, str, strLen); - newString[strLen] = 0; /* terminate */ - - /* copy the compiled instructions */ - assert(numInst <= VP_MAX_INSTRUCTIONS); - newInst = (struct vp_instruction *) MALLOC(numInst * sizeof(struct vp_instruction)); - if (!newInst) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; /* out of memory */ - } - MEMCPY(newInst, instBuffer, numInst * sizeof(struct vp_instruction)); - - /* install the program */ - program->Target = target; - if (program->String) { - FREE(program->String); - } - program->String = newString; - if (program->Instructions) { - FREE(program->Instructions); - } - program->Instructions = newInst; - -#if 0 - _mesa_printf("--- glLoadProgramNV result ---\n"); - _mesa_print_program(program); - _mesa_printf("------------------------------\n"); -#endif - } - else { - /* Error! */ -#ifdef DEBUG - /* print a message showing the program line containing the error */ - ctx->VertexProgram.ErrorPos = s - str; - { - const GLubyte *p = str, *line = str; - int lineNum = 1, statementNum = 1, column = 0; - char errorLine[1000]; - int i; - while (*p && p < s) { /* s is the error position */ - if (*p == '\n') { - line = p + 1; - lineNum++; - column = 0; - } - else if (*p == ';') { - statementNum++; - } - else - column++; - p++; - } - if (p) { - /* Copy the line with the error into errorLine so we can null- - * terminate it. - */ - for (i = 0; line[i] != '\n' && line[i]; i++) - errorLine[i] = (char) line[i]; - errorLine[i] = 0; - } - /* - _mesa_debug("Error pos = %d (%c) col %d\n", - ctx->VertexProgram.ErrorPos, *s, column); - */ - _mesa_debug(ctx, "Vertex program error on line %2d: %s\n", lineNum, errorLine); - _mesa_debug(ctx, " (statement %2d) near column %2d: ", statementNum, column+1); - for (i = 0; i < column; i++) - _mesa_debug(ctx, " "); - _mesa_debug(ctx, "^\n"); - } -#endif - _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV"); - } -} - - -static void -PrintSrcReg(const struct vp_src_register *src) -{ - static const char comps[5] = "xyzw"; - if (src->Negate) - _mesa_printf("-"); - if (src->RelAddr) { - if (src->Register > 0) - _mesa_printf("c[A0.x + %d]", src->Register); - else if (src->Register < 0) - _mesa_printf("c[A0.x - %d]", -src->Register); - else - _mesa_printf("c[A0.x]"); - } - else if (src->Register >= VP_OUTPUT_REG_START - && src->Register <= VP_OUTPUT_REG_END) { - _mesa_printf("o[%s]", OutputRegisters[src->Register - VP_OUTPUT_REG_START]); - } - else if (src->Register >= VP_INPUT_REG_START - && src->Register <= VP_INPUT_REG_END) { - _mesa_printf("v[%s]", InputRegisters[src->Register - VP_INPUT_REG_START]); - } - else if (src->Register >= VP_PROG_REG_START - && src->Register <= VP_PROG_REG_END) { - _mesa_printf("c[%d]", src->Register - VP_PROG_REG_START); - } - else { - _mesa_printf("R%d", src->Register - VP_TEMP_REG_START); - } - - if (src->Swizzle[0] == src->Swizzle[1] && - src->Swizzle[0] == src->Swizzle[2] && - src->Swizzle[0] == src->Swizzle[3]) { - _mesa_printf(".%c", comps[src->Swizzle[0]]); - } - else if (src->Swizzle[0] != 0 || - src->Swizzle[1] != 1 || - src->Swizzle[2] != 2 || - src->Swizzle[3] != 3) { - _mesa_printf(".%c%c%c%c", - comps[src->Swizzle[0]], - comps[src->Swizzle[1]], - comps[src->Swizzle[2]], - comps[src->Swizzle[3]]); - } -} - - -static void -PrintDstReg(const struct vp_dst_register *dst) -{ - GLint w = dst->WriteMask[0] + dst->WriteMask[1] - + dst->WriteMask[2] + dst->WriteMask[3]; - - if (dst->Register >= VP_OUTPUT_REG_START - && dst->Register <= VP_OUTPUT_REG_END) { - _mesa_printf("o[%s]", OutputRegisters[dst->Register - VP_OUTPUT_REG_START]); - } - else if (dst->Register >= VP_INPUT_REG_START - && dst->Register <= VP_INPUT_REG_END) { - _mesa_printf("v[%s]", InputRegisters[dst->Register - VP_INPUT_REG_START]); - } - else if (dst->Register >= VP_PROG_REG_START - && dst->Register <= VP_PROG_REG_END) { - _mesa_printf("c[%d]", dst->Register - VP_PROG_REG_START); - } - else { - _mesa_printf("R%d", dst->Register - VP_TEMP_REG_START); - } - - if (w != 0 && w != 4) { - _mesa_printf("."); - if (dst->WriteMask[0]) - _mesa_printf("x"); - if (dst->WriteMask[1]) - _mesa_printf("y"); - if (dst->WriteMask[2]) - _mesa_printf("z"); - if (dst->WriteMask[3]) - _mesa_printf("w"); - } -} - - -/** - * Print (unparse) the given vertex program. Just for debugging. - */ -void -_mesa_print_program(const struct vp_program *program) -{ - const struct vp_instruction *inst; - - for (inst = program->Instructions; ; inst++) { - switch (inst->Opcode) { - case MOV: - case LIT: - case RCP: - case RSQ: - case EXP: - case LOG: - case RCC: - case ABS: - _mesa_printf("%s ", Opcodes[(int) inst->Opcode]); - PrintDstReg(&inst->DstReg); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[0]); - _mesa_printf(";\n"); - break; - case MUL: - case ADD: - case DP3: - case DP4: - case DST: - case MIN: - case MAX: - case SLT: - case SGE: - case DPH: - case SUB: - _mesa_printf("%s ", Opcodes[(int) inst->Opcode]); - PrintDstReg(&inst->DstReg); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[0]); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[1]); - _mesa_printf(";\n"); - break; - case MAD: - _mesa_printf("MAD "); - PrintDstReg(&inst->DstReg); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[0]); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[1]); - _mesa_printf(", "); - PrintSrcReg(&inst->SrcReg[2]); - _mesa_printf(";\n"); - break; - case ARL: - _mesa_printf("ARL A0.x, "); - PrintSrcReg(&inst->SrcReg[0]); - _mesa_printf(";\n"); - break; - case END: - _mesa_printf("END\n"); - return; - break; - default: - _mesa_printf("BAD INSTRUCTION\n"); - } - } -} - Index: xc/extras/Mesa/src/vpparse.h diff -u xc/extras/Mesa/src/vpparse.h:1.1.1.1 xc/extras/Mesa/src/vpparse.h:removed --- xc/extras/Mesa/src/vpparse.h:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vpparse.h Wed Mar 16 21:00:35 2005 @@ -1,43 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Brian Paul - */ - - -#ifndef VPPARSE_H -#define VPPARSE_H - - -extern void -_mesa_parse_program(GLcontext *ctx, GLenum target, - const GLubyte *str, struct vp_program *program); - - -extern void -_mesa_print_program(const struct vp_program *program); - - -#endif Index: xc/extras/Mesa/src/vpstate.c diff -u xc/extras/Mesa/src/vpstate.c:1.1.1.1 xc/extras/Mesa/src/vpstate.c:removed --- xc/extras/Mesa/src/vpstate.c:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vpstate.c Wed Mar 16 21:00:36 2005 @@ -1,960 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * -------- Regarding NV_vertex_program -------- - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * o Redistribution of the source code must contain a copyright notice - * and this list of conditions; - * - * o Redistribution in binary and source code form must contain the - * following Notice in the software and any documentation and/or other - * materials provided with the distribution; and - * - * o The name of Nvidia may not be used to promote or endorse software - * derived from the software. - * - * NOTICE: Nvidia hereby grants to each recipient a non-exclusive worldwide - * royalty free patent license under patent claims that are licensable by - * Nvidia and which are necessarily required and for which no commercially - * viable non infringing alternative exists to make, use, sell, offer to sell, - * import and otherwise transfer the vertex extension for the Mesa 3D Graphics - * Library as distributed in source code and object code form. No hardware or - * hardware implementation (including a semiconductor implementation and chips) - * are licensed hereunder. If a recipient makes a patent claim or institutes - * patent litigation against Nvidia or Nvidia's customers for use or sale of - * Nvidia products, then this license grant as to such recipient shall - * immediately terminate and recipient immediately agrees to cease use and - * distribution of the Mesa Program and derivatives thereof. - * - * THE MESA 3D GRAPHICS LIBRARY IS PROVIDED ON AN "AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, - * WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-NFRINGEMENT - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * NVIDIA SHALL NOT HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION - * LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE MESA 3D GRAPHICS - * LIBRARY OR EVIDENCE OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDR, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * If you do not comply with this agreement, then Nvidia may cancel the license - * and rights granted herein. - * --------------------------------------------- - */ - -/** - * \file vpstate.c - * \brief Vertex program state management functions (most map to API functions) - * \author Brian Paul - */ - - -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" -#include "vpexec.h" -#include "vpparse.h" -#include "vpstate.h" - - -/** - * Delete a program and remove it from the hash table, ignoring the - * reference count. - * \note Called from the GL API dispatcher. - */ -void _mesa_delete_program(GLcontext *ctx, GLuint id) -{ - struct vp_program *vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (vprog) { - if (vprog->String) - FREE(vprog->String); - if (vprog->Instructions) - FREE(vprog->Instructions); - _mesa_HashRemove(ctx->Shared->VertexPrograms, id); - FREE(vprog); - } -} - - -/** - * Bind a program (make it current) - * \note Called from the GL API dispatcher. - */ -void _mesa_BindProgramNV(GLenum target, GLuint id) -{ - struct vp_program *vprog; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindProgramNV"); - return; - } - - if (id == ctx->VertexProgram.CurrentID) - return; - - /* decrement refcount on previously bound vertex program */ - if (ctx->VertexProgram.Current) { - ctx->VertexProgram.Current->RefCount--; - /* and delete if refcount goes below one */ - if (ctx->VertexProgram.Current->RefCount <= 0) - _mesa_delete_program(ctx, ctx->VertexProgram.CurrentID); - } - - /* NOTE: binding to a non-existant program is not an error. - * That's supposed to be caught in glBegin. - */ - if (id == 0) { - /* OK, the null program object */ - vprog = NULL; - } - else { - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (!vprog && id > 0){ - /* new program ID */ - vprog = CALLOC_STRUCT(vp_program); - if (!vprog) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindProgramNV"); - return; - } - vprog->Target = target; - vprog->Resident = GL_TRUE; - vprog->RefCount = 1; - _mesa_HashInsert(ctx->Shared->VertexPrograms, id, vprog); - } - } - - ctx->VertexProgram.CurrentID = id; - ctx->VertexProgram.Current = vprog; - if (vprog) - vprog->RefCount++; -} - - -/** - * Delete a list of programs. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_DeleteProgramsNV(GLsizei n, const GLuint *ids) -{ - GLint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glDeleteProgramsNV" ); - return; - } - - for (i = 0; i < n; i++) { - if (ids[i] != 0) { - struct vp_program *vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, ids[i]); - if (ctx->VertexProgram.CurrentID == ids[i]) { - /* unbind this currently bound program */ - _mesa_BindProgramNV(vprog->Target, 0); - } - if (vprog) { - vprog->RefCount--; - if (vprog->RefCount <= 0) { - _mesa_delete_program(ctx, ids[i]); - } - } - } - } -} - - -/** - * Execute a vertex state program. - * \note Called from the GL API dispatcher. - */ -void _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) -{ - struct vp_program *vprog; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_STATE_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glExecuteProgramNV"); - return; - } - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (!vprog || vprog->Target != GL_VERTEX_STATE_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glExecuteProgramNV"); - return; - } - - _mesa_init_vp_registers(ctx); - _mesa_init_tracked_matrices(ctx); - COPY_4V(ctx->VertexProgram.Machine.Registers[VP_INPUT_REG_START], params); - _mesa_exec_program(ctx, vprog); -} - - -/** - * Generate a list of new program identifiers. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GenProgramsNV(GLsizei n, GLuint *ids) -{ - GLuint first; - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGenProgramsNV"); - return; - } - - if (!ids) - return; - - first = _mesa_HashFindFreeKeyBlock(ctx->Shared->VertexPrograms, n); - - for (i = 0; i < (GLuint) n; i++) { - struct vp_program *vprog = CALLOC_STRUCT(vp_program); - if (!vprog) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenProgramsNV"); - return; - } - vprog->RefCount = 1; - _mesa_HashInsert(ctx->Shared->VertexPrograms, first + i, vprog); - } - - /* Return the program names */ - for (i = 0; i < (GLuint) n; i++) { - ids[i] = first + i; - } -} - - -/** - * Determine if a set of programs is resident in hardware. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -GLboolean _mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, - GLboolean *residences) -{ - GLint i, j; - GLboolean allResident = GL_TRUE; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV(n)"); - return GL_FALSE; - } - - for (i = 0; i < n; i++) { - const struct vp_program *prog; - if (ids[i] == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV"); - return GL_FALSE; - } - prog = (const struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, ids[i]); - if (!prog) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreProgramsResidentNV"); - return GL_FALSE; - } - if (prog->Resident) { - if (!allResident) - residences[i] = GL_TRUE; - } - else { - if (allResident) { - allResident = GL_FALSE; - for (j = 0; j < i; j++) - residences[j] = GL_TRUE; - } - residences[i] = GL_FALSE; - } - } - - return allResident; -} - - -/** - * Request that a set of programs be resident in hardware. - * \note Called from the GL API dispatcher. - */ -void _mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids) -{ - GLint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(n)"); - return; - } - - /* just error checking for now */ - for (i = 0; i < n; i++) { - struct vp_program *vprog; - - if (ids[i] == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)"); - return; - } - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, ids[i]); - - if (!vprog) { - _mesa_error(ctx, GL_INVALID_VALUE, "glRequestResidentProgramsNV(id)"); - return; - } - - vprog->Resident = GL_TRUE; - } -} - - -/** - * Get a program parameter register. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetProgramParameterfvNV(GLenum target, GLuint index, - GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramParameterfvNV"); - return; - } - - if (pname != GL_PROGRAM_PARAMETER_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV"); - return; - } - - index += VP_PROG_REG_START; - COPY_4V(params, ctx->VertexProgram.Machine.Registers[index]); -} - - -/** - * Get a program parameter register. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetProgramParameterdvNV(GLenum target, GLuint index, - GLenum pname, GLdouble *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramParameterfvNV"); - return; - } - - if (pname != GL_PROGRAM_PARAMETER_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramParameterfvNV"); - return; - } - - index += VP_PROG_REG_START; - COPY_4V(params, ctx->VertexProgram.Machine.Registers[index]); -} - - -/** - * Get a program attribute. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params) -{ - struct vp_program *vprog; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (!vprog) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramivNV"); - return; - } - - switch (pname) { - case GL_PROGRAM_TARGET_NV: - *params = vprog->Target; - return; - case GL_PROGRAM_LENGTH_NV: - *params = vprog->String ? _mesa_strlen((char *) vprog->String) : 0; - return; - case GL_PROGRAM_RESIDENT_NV: - *params = vprog->Resident; - return; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivNV(pname)"); - return; - } -} - - -/** - * Get the program source code. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program) -{ - struct vp_program *vprog; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname != GL_PROGRAM_STRING_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivNV(pname)"); - return; - } - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (!vprog) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramivNV"); - return; - } - - if (vprog->String) { - MEMCPY(program, vprog->String, _mesa_strlen((char *) vprog->String)); - } - else { - program[0] = 0; - } -} - - -/** - * Get matrix tracking information. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetTrackMatrixivNV(GLenum target, GLuint address, - GLenum pname, GLint *params) -{ - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTrackMatrixivNV"); - return; - } - - if ((address & 0x3) || address > VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetTrackMatrixivNV(address)"); - return; - } - - i = address / 4; - - switch (pname) { - case GL_TRACK_MATRIX_NV: - params[0] = (GLint) ctx->VertexProgram.TrackMatrix[i]; - return; - case GL_TRACK_MATRIX_TRANSFORM_NV: - params[0] = (GLint) ctx->VertexProgram.TrackMatrixTransform[i]; - return; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTrackMatrixivNV"); - return; - } -} - - -/** - * Get a vertex (or vertex array) attribute. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index == 0 || index >= VP_NUM_INPUT_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); - return; - } - - switch (pname) { - case GL_ATTRIB_ARRAY_SIZE_NV: - params[0] = ctx->Array.VertexAttrib[index].Size; - break; - case GL_ATTRIB_ARRAY_STRIDE_NV: - params[0] = ctx->Array.VertexAttrib[index].Stride; - break; - case GL_ATTRIB_ARRAY_TYPE_NV: - params[0] = ctx->Array.VertexAttrib[index].Type; - break; - case GL_CURRENT_ATTRIB_NV: - FLUSH_CURRENT(ctx, 0); - COPY_4V(params, ctx->Current.Attrib[index]); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV"); - return; - } -} - -/** - * Get a vertex (or vertex array) attribute. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index == 0 || index >= VP_NUM_INPUT_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); - return; - } - - switch (pname) { - case GL_ATTRIB_ARRAY_SIZE_NV: - params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Size; - break; - case GL_ATTRIB_ARRAY_STRIDE_NV: - params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Stride; - break; - case GL_ATTRIB_ARRAY_TYPE_NV: - params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Type; - break; - case GL_CURRENT_ATTRIB_NV: - FLUSH_CURRENT(ctx, 0); - COPY_4V(params, ctx->Current.Attrib[index]); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV"); - return; - } -} - -/** - * Get a vertex (or vertex array) attribute. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index == 0 || index >= VP_NUM_INPUT_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribdvNV(index)"); - return; - } - - switch (pname) { - case GL_ATTRIB_ARRAY_SIZE_NV: - params[0] = ctx->Array.VertexAttrib[index].Size; - break; - case GL_ATTRIB_ARRAY_STRIDE_NV: - params[0] = ctx->Array.VertexAttrib[index].Stride; - break; - case GL_ATTRIB_ARRAY_TYPE_NV: - params[0] = ctx->Array.VertexAttrib[index].Type; - break; - case GL_CURRENT_ATTRIB_NV: - FLUSH_CURRENT(ctx, 0); - COPY_4V_CAST(params, ctx->Current.Attrib[index], GLint); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribdvNV"); - return; - } -} - - -/** - * Get a vertex array attribute pointer. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - */ -void _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribPointerNV(index)"); - return; - } - - if (pname != GL_ATTRIB_ARRAY_POINTER_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribPointerNV(pname)"); - return; - } - - *pointer = ctx->Array.VertexAttrib[index].Ptr;; -} - - -/** - * Determine if id names a program. - * \note Not compiled into display lists. - * \note Called from the GL API dispatcher. - * \param id is the program identifier - * \return GL_TRUE if id is a program, else GL_FALSE. - */ -GLboolean _mesa_IsProgramNV(GLuint id) -{ - struct vp_program *vprog; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (id == 0) - return GL_FALSE; - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (vprog && vprog->Target) - return GL_TRUE; - else - return GL_FALSE; -} - - -/** - * Load a vertex program. - * \note Called from the GL API dispatcher. - */ -void _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, - const GLubyte *program) -{ - struct vp_program *vprog; - GLboolean newProgram = GL_FALSE; - GLubyte *programCopy; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (id == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glLoadProgramNV(id)"); - return; - } - - vprog = (struct vp_program *) - _mesa_HashLookup(ctx->Shared->VertexPrograms, id); - - if (vprog && vprog->Target != 0 && vprog->Target != target) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(target)"); - return; - } - - /* make a copy of the program string so that we can null-terminate it */ - /* if we change the parser to stop after characters, instead of */ - /* looking for '\0' we can eliminate this. */ - programCopy = (GLubyte *) MALLOC(len + 1); - if (!programCopy) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; - } - MEMCPY(programCopy, program, len); - programCopy[len] = 0; - - if (!vprog) { - newProgram = GL_TRUE; - vprog = CALLOC_STRUCT(vp_program); - if (!vprog) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; - } - } - - _mesa_parse_program(ctx, target, programCopy, vprog); - if (ctx->VertexProgram.ErrorPos == -1) { - /* loaded and parsed w/out errors */ - if (newProgram) { - _mesa_HashInsert(ctx->Shared->VertexPrograms, id, vprog); - } - vprog->RefCount = 1; - vprog->Resident = GL_TRUE; - } - - FREE(programCopy); -} - - - -/** - * Set a program parameter register. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameter4dNV(GLenum target, GLuint index, - GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameter4dNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameter4dNV"); - return; - } - - index += VP_PROG_REG_START; - ASSIGN_4V(ctx->VertexProgram.Machine.Registers[index], - (GLfloat)x, (GLfloat)y, (GLfloat)z, (GLfloat)w); -} - - -/** - * Set a program parameter register. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameter4dvNV(GLenum target, GLuint index, - const GLdouble *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameter4dvNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameter4dvNV"); - return; - } - - index += VP_PROG_REG_START; - COPY_4V_CAST(ctx->VertexProgram.Machine.Registers[index], params, GLfloat); -} - - -/** - * Set a program parameter register. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameter4fNV(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameter4fNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameter4fNV"); - return; - } - - index += VP_PROG_REG_START; - ASSIGN_4V(ctx->VertexProgram.Machine.Registers[index], x, y, z, w); -} - - -/** - * Set a program parameter register. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameter4fvNV(GLenum target, GLuint index, - const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameter4fNV"); - return; - } - - if (index >= VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameter4fNV"); - return; - } - - index += VP_PROG_REG_START; - COPY_4V(ctx->VertexProgram.Machine.Registers[index], params); -} - - -/** - * Set a sequence of program parameter registers. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameters4dvNV(GLenum target, GLuint index, - GLuint num, const GLdouble *params) -{ - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameters4dvNV"); - return; - } - - if (index + num > VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4dvNV"); - return; - } - - index += VP_PROG_REG_START; - for (i = 0; i < num; i++) { - COPY_4V_CAST(ctx->VertexProgram.Machine.Registers[index + i], - params, GLfloat); - params += 4; - }; -} - - -/** - * Set a sequence of program parameter registers. - * \note Called from the GL API dispatcher. - */ -void _mesa_ProgramParameters4fvNV(GLenum target, GLuint index, - GLuint num, const GLfloat *params) -{ - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameters4fvNV"); - return; - } - - if (index + num > VP_NUM_PROG_REGS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4fvNV"); - return; - } - - index += VP_PROG_REG_START; - for (i = 0; i < num; i++) { - COPY_4V(ctx->VertexProgram.Machine.Registers[index + i], params); - params += 4; - }; -} - - -/** - * Setup tracking of matrices into program parameter registers. - * \note Called from the GL API dispatcher. - */ -void _mesa_TrackMatrixNV(GLenum target, GLuint address, - GLenum matrix, GLenum transform) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_VERTEX_PROGRAM_NV) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(target)"); - return; - } - - if (address & 0x3) { - /* addr must be multiple of four */ - _mesa_error(ctx, GL_INVALID_VALUE, "glTrackMatrixNV(address)"); - return; - } - - switch (matrix) { - case GL_NONE: - case GL_MODELVIEW: - case GL_PROJECTION: - case GL_TEXTURE: - case GL_COLOR: - case GL_MODELVIEW_PROJECTION_NV: - case GL_MATRIX0_NV: - case GL_MATRIX1_NV: - case GL_MATRIX2_NV: - case GL_MATRIX3_NV: - case GL_MATRIX4_NV: - case GL_MATRIX5_NV: - case GL_MATRIX6_NV: - case GL_MATRIX7_NV: - /* OK, fallthrough */ - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(matrix)"); - return; - } - - switch (transform) { - case GL_IDENTITY_NV: - case GL_INVERSE_NV: - case GL_TRANSPOSE_NV: - case GL_INVERSE_TRANSPOSE_NV: - /* OK, fallthrough */ - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glTrackMatrixNV(transform)"); - return; - } - - ctx->VertexProgram.TrackMatrix[address / 4] = matrix; - ctx->VertexProgram.TrackMatrixTransform[address / 4] = transform; -} Index: xc/extras/Mesa/src/vpstate.h diff -u xc/extras/Mesa/src/vpstate.h:1.1.1.1 xc/extras/Mesa/src/vpstate.h:removed --- xc/extras/Mesa/src/vpstate.h:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vpstate.h Wed Mar 16 21:00:36 2005 @@ -1,124 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Brian Paul - */ - - -#ifndef VPSTATE_H -#define VPSTATE_H - - -extern void _mesa_delete_program(GLcontext *ctx, GLuint id); - - -extern void _mesa_BindProgramNV(GLenum target, GLuint id); - -extern void _mesa_DeleteProgramsNV(GLsizei n, const GLuint *ids); - -extern void _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params); - -extern void _mesa_GenProgramsNV(GLsizei n, GLuint *ids); - -extern GLboolean _mesa_AreProgramsResidentNV(GLsizei n, const GLuint *ids, GLboolean *residences); - -extern void _mesa_RequestResidentProgramsNV(GLsizei n, const GLuint *ids); - - -extern void _mesa_GetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat *params); - -extern void _mesa_GetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble *params); - -extern void _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params); - -extern void _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program); - -extern void _mesa_GetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint *params); - -extern void _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params); - -extern void _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params); - -extern void _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params); - -extern void _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer); - -extern GLboolean _mesa_IsProgramNV(GLuint id); - -extern void _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, - const GLubyte *program); - -extern void _mesa_ProgramParameter4dNV(GLenum target, GLuint index, - GLdouble x, GLdouble y, - GLdouble z, GLdouble w); - -extern void _mesa_ProgramParameter4dvNV(GLenum target, GLuint index, - const GLdouble *params); - -extern void _mesa_ProgramParameter4fNV(GLenum target, GLuint index, - GLfloat x, GLfloat y, - GLfloat z, GLfloat w); - -extern void _mesa_ProgramParameter4fvNV(GLenum target, GLuint index, - const GLfloat *params); - -extern void _mesa_ProgramParameters4dvNV(GLenum target, GLuint index, - GLuint num, const GLdouble *params); - -extern void _mesa_ProgramParameters4fvNV(GLenum target, GLuint index, - GLuint num, const GLfloat *params); - -extern void _mesa_TrackMatrixNV(GLenum target, GLuint address, - GLenum matrix, GLenum transform); - - -extern void _mesa_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v); - -extern void _mesa_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v); - -extern void _mesa_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v); - -extern void _mesa_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v); - -extern void _mesa_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v); - -extern void _mesa_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v); - -extern void _mesa_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v); - -extern void _mesa_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v); - -extern void _mesa_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v); - -extern void _mesa_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v); - -extern void _mesa_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v); - -extern void _mesa_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v); - -extern void _mesa_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v); - - -#endif Index: xc/extras/Mesa/src/vsnprintf.c diff -u xc/extras/Mesa/src/vsnprintf.c:1.1.1.1 xc/extras/Mesa/src/vsnprintf.c:removed --- xc/extras/Mesa/src/vsnprintf.c:1.1.1.1 Sun Sep 28 13:26:22 2003 +++ xc/extras/Mesa/src/vsnprintf.c Wed Mar 16 21:00:36 2005 @@ -1,163 +0,0 @@ -/* - * Revision 12: http://theos.com/~deraadt/snprintf.c - * - * Copyright (c) 1997 Theo de Raadt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#if __STDC__ -#include -#include -#else -#include -#endif -#include -#include -#include - -#ifndef roundup -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#endif - -#ifdef __sgi -#define size_t ssize_t -#endif - -static int pgsize; -static char *curobj; -static int caught; -static sigjmp_buf bail; - -#define EXTRABYTES 2 /* XXX: why 2? you don't want to know */ - -static char * -msetup(str, n) - char *str; - size_t n; -{ - char *e; - - if (n == 0) - return NULL; - if (pgsize == 0) - pgsize = getpagesize(); - curobj = (char *)malloc(n + EXTRABYTES + pgsize * 2); - if (curobj == NULL) - return NULL; - e = curobj + n + EXTRABYTES; - e = (char *)roundup((unsigned long)e, pgsize); - if (mprotect(e, pgsize, PROT_NONE) == -1) { - free(curobj); - curobj = NULL; - return NULL; - } - e = e - n - EXTRABYTES; - *e = '\0'; - return (e); -} - -static void - mcatch( int a ) -{ - siglongjmp(bail, 1); -} - -static void -mcleanup(str, n, p) - char *str; - size_t n; - char *p; -{ - strncpy(str, p, n-1); - str[n-1] = '\0'; - if (mprotect((caddr_t)(p + n + EXTRABYTES), pgsize, - PROT_READ|PROT_WRITE|PROT_EXEC) == -1) - mprotect((caddr_t)(p + n + EXTRABYTES), pgsize, - PROT_READ|PROT_WRITE); - free(curobj); -} - -int -#if __STDC__ -vsnprintf(char *str, size_t n, char const *fmt, va_list ap) -#else -vsnprintf(str, n, fmt, ap) - char *str; - size_t n; - char *fmt; - char *ap; -#endif -{ - struct sigaction osa, nsa; - char *p; - int ret = n + 1; /* if we bail, indicated we overflowed */ - - memset(&nsa, 0, sizeof nsa); - nsa.sa_handler = mcatch; - sigemptyset(&nsa.sa_mask); - - p = msetup(str, n); - if (p == NULL) { - *str = '\0'; - return 0; - } - if (sigsetjmp(bail, 1) == 0) { - if (sigaction(SIGSEGV, &nsa, &osa) == -1) { - mcleanup(str, n, p); - return (0); - } - ret = vsprintf(p, fmt, ap); - } - mcleanup(str, n, p); - (void) sigaction(SIGSEGV, &osa, NULL); - return (ret); -} - -int -#if __STDC__ -snprintf(char *str, size_t n, char const *fmt, ...) -#else -snprintf(str, n, fmt, va_alist) - char *str; - size_t n; - char *fmt; - va_dcl -#endif -{ - va_list ap; -#if __STDC__ - va_start(ap, fmt); -#else - va_start(ap); -#endif - - return (vsnprintf(str, n, fmt, ap)); - va_end(ap); -} - - - Index: xc/extras/Mesa/src/vtxfmt.c diff -u xc/extras/Mesa/src/vtxfmt.c:1.3 xc/extras/Mesa/src/vtxfmt.c:removed --- xc/extras/Mesa/src/vtxfmt.c:1.3 Sun Sep 28 15:17:00 2003 +++ xc/extras/Mesa/src/vtxfmt.c Wed Mar 16 21:00:36 2005 @@ -1,176 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - * Gareth Hughes - */ - -#include "glheader.h" -#include "api_loopback.h" -#include "context.h" -#include "imports.h" -#include "mtypes.h" -#include "state.h" -#include "vtxfmt.h" - - -/* The neutral vertex format. This wraps all tnl module functions, - * verifying that the currently-installed module is valid and then - * installing the function pointers in a lazy fashion. It records the - * function pointers that have been swapped out, which allows a fast - * restoration of the neutral module in almost all cases -- a typical - * app might only require 4-6 functions to be modified from the neutral - * baseline, and only restoring these is certainly preferable to doing - * the entire module's 60 or so function pointers. - */ - -#define PRE_LOOPBACK( FUNC ) \ -{ \ - GET_CURRENT_CONTEXT(ctx); \ - struct gl_tnl_module *tnl = &(ctx->TnlModule); \ - \ - ASSERT( tnl->Current ); \ - ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \ - \ - /* Save the swapped function's dispatch entry so it can be */ \ - /* restored later. */ \ - tnl->Swapped[tnl->SwapCount][0] = (void *)&(ctx->Exec->FUNC); \ - tnl->Swapped[tnl->SwapCount][1] = (void *)TAG(FUNC); \ - tnl->SwapCount++; \ - \ - if ( 0 ) \ - _mesa_debug(ctx, " swapping gl" #FUNC"...\n" ); \ - \ - /* Install the tnl function pointer. */ \ - ctx->Exec->FUNC = tnl->Current->FUNC; \ -} - -#define TAG(x) neutral_##x -#include "vtxfmt_tmp.h" - - - -static void install_vtxfmt( struct _glapi_table *tab, GLvertexformat *vfmt ) -{ - tab->ArrayElement = vfmt->ArrayElement; - tab->Color3f = vfmt->Color3f; - tab->Color3fv = vfmt->Color3fv; - tab->Color3ub = vfmt->Color3ub; - tab->Color3ubv = vfmt->Color3ubv; - tab->Color4f = vfmt->Color4f; - tab->Color4fv = vfmt->Color4fv; - tab->Color4ub = vfmt->Color4ub; - tab->Color4ubv = vfmt->Color4ubv; - tab->EdgeFlag = vfmt->EdgeFlag; - tab->EdgeFlagv = vfmt->EdgeFlagv; - tab->EvalCoord1f = vfmt->EvalCoord1f; - tab->EvalCoord1fv = vfmt->EvalCoord1fv; - tab->EvalCoord2f = vfmt->EvalCoord2f; - tab->EvalCoord2fv = vfmt->EvalCoord2fv; - tab->EvalPoint1 = vfmt->EvalPoint1; - tab->EvalPoint2 = vfmt->EvalPoint2; - tab->FogCoordfEXT = vfmt->FogCoordfEXT; - tab->FogCoordfvEXT = vfmt->FogCoordfvEXT; - tab->Indexi = vfmt->Indexi; - tab->Indexiv = vfmt->Indexiv; - tab->Materialfv = vfmt->Materialfv; - tab->MultiTexCoord1fARB = vfmt->MultiTexCoord1fARB; - tab->MultiTexCoord1fvARB = vfmt->MultiTexCoord1fvARB; - tab->MultiTexCoord2fARB = vfmt->MultiTexCoord2fARB; - tab->MultiTexCoord2fvARB = vfmt->MultiTexCoord2fvARB; - tab->MultiTexCoord3fARB = vfmt->MultiTexCoord3fARB; - tab->MultiTexCoord3fvARB = vfmt->MultiTexCoord3fvARB; - tab->MultiTexCoord4fARB = vfmt->MultiTexCoord4fARB; - tab->MultiTexCoord4fvARB = vfmt->MultiTexCoord4fvARB; - tab->Normal3f = vfmt->Normal3f; - tab->Normal3fv = vfmt->Normal3fv; - tab->SecondaryColor3fEXT = vfmt->SecondaryColor3fEXT; - tab->SecondaryColor3fvEXT = vfmt->SecondaryColor3fvEXT; - tab->SecondaryColor3ubEXT = vfmt->SecondaryColor3ubEXT; - tab->SecondaryColor3ubvEXT = vfmt->SecondaryColor3ubvEXT; - tab->TexCoord1f = vfmt->TexCoord1f; - tab->TexCoord1fv = vfmt->TexCoord1fv; - tab->TexCoord2f = vfmt->TexCoord2f; - tab->TexCoord2fv = vfmt->TexCoord2fv; - tab->TexCoord3f = vfmt->TexCoord3f; - tab->TexCoord3fv = vfmt->TexCoord3fv; - tab->TexCoord4f = vfmt->TexCoord4f; - tab->TexCoord4fv = vfmt->TexCoord4fv; - tab->Vertex2f = vfmt->Vertex2f; - tab->Vertex2fv = vfmt->Vertex2fv; - tab->Vertex3f = vfmt->Vertex3f; - tab->Vertex3fv = vfmt->Vertex3fv; - tab->Vertex4f = vfmt->Vertex4f; - tab->Vertex4fv = vfmt->Vertex4fv; - tab->CallList = vfmt->CallList; - tab->Begin = vfmt->Begin; - tab->End = vfmt->End; - tab->VertexAttrib4fNV = vfmt->VertexAttrib4fNV; - tab->Rectf = vfmt->Rectf; - tab->DrawArrays = vfmt->DrawArrays; - tab->DrawElements = vfmt->DrawElements; - tab->DrawRangeElements = vfmt->DrawRangeElements; - tab->EvalMesh1 = vfmt->EvalMesh1; - tab->EvalMesh2 = vfmt->EvalMesh2; - assert(tab->EvalMesh2); -} - - -void _mesa_init_exec_vtxfmt( GLcontext *ctx ) -{ - install_vtxfmt( ctx->Exec, &neutral_vtxfmt ); - ctx->TnlModule.SwapCount = 0; -} - - -void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt ) -{ - ctx->TnlModule.Current = vfmt; - _mesa_restore_exec_vtxfmt( ctx ); - if ( ctx->ExecPrefersFloat != vfmt->prefer_float_colors ) - _mesa_loopback_prefer_float( ctx->Exec, vfmt->prefer_float_colors ); -} - -void _mesa_install_save_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt ) -{ - install_vtxfmt( ctx->Save, vfmt ); - if ( ctx->SavePrefersFloat != vfmt->prefer_float_colors ) - _mesa_loopback_prefer_float( ctx->Save, vfmt->prefer_float_colors ); -} - - -void _mesa_restore_exec_vtxfmt( GLcontext *ctx ) -{ - struct gl_tnl_module *tnl = &(ctx->TnlModule); - GLuint i; - - /* Restore the neutral tnl module wrapper. - */ - for ( i = 0 ; i < tnl->SwapCount ; i++ ) { - *(void **)tnl->Swapped[i][0] = tnl->Swapped[i][1]; - } - - tnl->SwapCount = 0; -} Index: xc/extras/Mesa/src/vtxfmt.h diff -u xc/extras/Mesa/src/vtxfmt.h:1.3 xc/extras/Mesa/src/vtxfmt.h:removed --- xc/extras/Mesa/src/vtxfmt.h:1.3 Sun Sep 28 15:17:00 2003 +++ xc/extras/Mesa/src/vtxfmt.h Wed Mar 16 21:00:36 2005 @@ -1,40 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - * Gareth Hughes - */ - -#ifndef _VTXFMT_H_ -#define _VTXFMT_H_ - -extern void _mesa_init_exec_vtxfmt( GLcontext *ctx ); - -extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt ); -extern void _mesa_install_save_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt ); - -extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx ); - -#endif Index: xc/extras/Mesa/src/vtxfmt_tmp.h diff -u xc/extras/Mesa/src/vtxfmt_tmp.h:1.3 xc/extras/Mesa/src/vtxfmt_tmp.h:removed --- xc/extras/Mesa/src/vtxfmt_tmp.h:1.3 Sun Sep 28 15:17:00 2003 +++ xc/extras/Mesa/src/vtxfmt_tmp.h Wed Mar 16 21:00:36 2005 @@ -1,471 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#ifndef PRE_LOOPBACK -#define PRE_LOOPBACK( FUNC ) -#endif - -static void TAG(ArrayElement)( GLint i ) -{ - PRE_LOOPBACK( ArrayElement ); - _glapi_Dispatch->ArrayElement( i ); -} - -static void TAG(Color3f)( GLfloat r, GLfloat g, GLfloat b ) -{ - PRE_LOOPBACK( Color3f ); - _glapi_Dispatch->Color3f( r, g, b ); -} - -static void TAG(Color3fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Color3fv ); - _glapi_Dispatch->Color3fv( v ); -} - -static void TAG(Color3ub)( GLubyte r, GLubyte g, GLubyte b ) -{ - PRE_LOOPBACK( Color3ub ); - _glapi_Dispatch->Color3ub( r, g, b ); -} - -static void TAG(Color3ubv)( const GLubyte *v ) -{ - PRE_LOOPBACK( Color3ubv ); - _glapi_Dispatch->Color3ubv( v ); -} - -static void TAG(Color4f)( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) -{ - PRE_LOOPBACK( Color4f ); - _glapi_Dispatch->Color4f( r, g, b, a ); -} - -static void TAG(Color4fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Color4fv ); - _glapi_Dispatch->Color4fv( v ); -} - -static void TAG(Color4ub)( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) -{ - PRE_LOOPBACK( Color4ub ); - _glapi_Dispatch->Color4ub( r, g, b, a ); -} - -static void TAG(Color4ubv)( const GLubyte *v ) -{ - PRE_LOOPBACK( Color4ubv ); - _glapi_Dispatch->Color4ubv( v ); -} - -static void TAG(EdgeFlag)( GLboolean e ) -{ - PRE_LOOPBACK( EdgeFlag ); - _glapi_Dispatch->EdgeFlag( e ); -} - -static void TAG(EdgeFlagv)( const GLboolean *v ) -{ - PRE_LOOPBACK( EdgeFlagv ); - _glapi_Dispatch->EdgeFlagv( v ); -} - -static void TAG(EvalCoord1f)( GLfloat s ) -{ - PRE_LOOPBACK( EvalCoord1f ); - _glapi_Dispatch->EvalCoord1f( s ); -} - -static void TAG(EvalCoord1fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( EvalCoord1fv ); - _glapi_Dispatch->EvalCoord1fv( v ); -} - -static void TAG(EvalCoord2f)( GLfloat s, GLfloat t ) -{ - PRE_LOOPBACK( EvalCoord2f ); - _glapi_Dispatch->EvalCoord2f( s, t ); -} - -static void TAG(EvalCoord2fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( EvalCoord2fv ); - _glapi_Dispatch->EvalCoord2fv( v ); -} - -static void TAG(EvalPoint1)( GLint i ) -{ - PRE_LOOPBACK( EvalPoint1 ); - _glapi_Dispatch->EvalPoint1( i ); -} - -static void TAG(EvalPoint2)( GLint i, GLint j ) -{ - PRE_LOOPBACK( EvalPoint2 ); - _glapi_Dispatch->EvalPoint2( i, j ); -} - -static void TAG(FogCoordfEXT)( GLfloat f ) -{ - PRE_LOOPBACK( FogCoordfEXT ); - _glapi_Dispatch->FogCoordfEXT( f ); -} - -static void TAG(FogCoordfvEXT)( const GLfloat *v ) -{ - PRE_LOOPBACK( FogCoordfvEXT ); - _glapi_Dispatch->FogCoordfvEXT( v ); -} - -static void TAG(Indexi)( GLint i ) -{ - PRE_LOOPBACK( Indexi ); - _glapi_Dispatch->Indexi( i ); -} - -static void TAG(Indexiv)( const GLint *v ) -{ - PRE_LOOPBACK( Indexiv ); - _glapi_Dispatch->Indexiv( v ); -} - -static void TAG(Materialfv)( GLenum face, GLenum pname, const GLfloat *v ) -{ - PRE_LOOPBACK( Materialfv ); - _glapi_Dispatch->Materialfv( face, pname, v ); -} - -static void TAG(MultiTexCoord1fARB)( GLenum target, GLfloat a ) -{ - PRE_LOOPBACK( MultiTexCoord1fARB ); - _glapi_Dispatch->MultiTexCoord1fARB( target, a ); -} - -static void TAG(MultiTexCoord1fvARB)( GLenum target, const GLfloat *tc ) -{ - PRE_LOOPBACK( MultiTexCoord1fvARB ); - _glapi_Dispatch->MultiTexCoord1fvARB( target, tc ); -} - -static void TAG(MultiTexCoord2fARB)( GLenum target, GLfloat s, GLfloat t ) -{ - PRE_LOOPBACK( MultiTexCoord2fARB ); - _glapi_Dispatch->MultiTexCoord2fARB( target, s, t ); -} - -static void TAG(MultiTexCoord2fvARB)( GLenum target, const GLfloat *tc ) -{ - PRE_LOOPBACK( MultiTexCoord2fvARB ); - _glapi_Dispatch->MultiTexCoord2fvARB( target, tc ); -} - -static void TAG(MultiTexCoord3fARB)( GLenum target, GLfloat s, - GLfloat t, GLfloat r ) -{ - PRE_LOOPBACK( MultiTexCoord3fARB ); - _glapi_Dispatch->MultiTexCoord3fARB( target, s, t, r ); -} - -static void TAG(MultiTexCoord3fvARB)( GLenum target, const GLfloat *tc ) -{ - PRE_LOOPBACK( MultiTexCoord3fvARB ); - _glapi_Dispatch->MultiTexCoord3fvARB( target, tc ); -} - -static void TAG(MultiTexCoord4fARB)( GLenum target, GLfloat s, - GLfloat t, GLfloat r, GLfloat q ) -{ - PRE_LOOPBACK( MultiTexCoord4fARB ); - _glapi_Dispatch->MultiTexCoord4fARB( target, s, t, r, q ); -} - -static void TAG(MultiTexCoord4fvARB)( GLenum target, const GLfloat *tc ) -{ - PRE_LOOPBACK( MultiTexCoord4fvARB ); - _glapi_Dispatch->MultiTexCoord4fvARB( target, tc ); -} - -static void TAG(Normal3f)( GLfloat x, GLfloat y, GLfloat z ) -{ - PRE_LOOPBACK( Normal3f ); - _glapi_Dispatch->Normal3f( x, y, z ); -} - -static void TAG(Normal3fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Normal3fv ); - _glapi_Dispatch->Normal3fv( v ); -} - -static void TAG(SecondaryColor3fEXT)( GLfloat r, GLfloat g, GLfloat b ) -{ - PRE_LOOPBACK( SecondaryColor3fEXT ); - _glapi_Dispatch->SecondaryColor3fEXT( r, g, b ); -} - -static void TAG(SecondaryColor3fvEXT)( const GLfloat *v ) -{ - PRE_LOOPBACK( SecondaryColor3fvEXT ); - _glapi_Dispatch->SecondaryColor3fvEXT( v ); -} - -static void TAG(SecondaryColor3ubEXT)( GLubyte r, GLubyte g, GLubyte b ) -{ - PRE_LOOPBACK( SecondaryColor3ubEXT ); - _glapi_Dispatch->SecondaryColor3ubEXT( r, g, b ); -} - -static void TAG(SecondaryColor3ubvEXT)( const GLubyte *v ) -{ - PRE_LOOPBACK( SecondaryColor3ubvEXT ); - _glapi_Dispatch->SecondaryColor3ubvEXT( v ); -} - -static void TAG(TexCoord1f)( GLfloat s ) -{ - PRE_LOOPBACK( TexCoord1f ); - _glapi_Dispatch->TexCoord1f( s ); -} - -static void TAG(TexCoord1fv)( const GLfloat *tc ) -{ - PRE_LOOPBACK( TexCoord1fv ); - _glapi_Dispatch->TexCoord1fv( tc ); -} - -static void TAG(TexCoord2f)( GLfloat s, GLfloat t ) -{ - PRE_LOOPBACK( TexCoord2f ); - _glapi_Dispatch->TexCoord2f( s, t ); -} - -static void TAG(TexCoord2fv)( const GLfloat *tc ) -{ - PRE_LOOPBACK( TexCoord2fv ); - _glapi_Dispatch->TexCoord2fv( tc ); -} - -static void TAG(TexCoord3f)( GLfloat s, GLfloat t, GLfloat r ) -{ - PRE_LOOPBACK( TexCoord3f ); - _glapi_Dispatch->TexCoord3f( s, t, r ); -} - -static void TAG(TexCoord3fv)( const GLfloat *tc ) -{ - PRE_LOOPBACK( TexCoord3fv ); - _glapi_Dispatch->TexCoord3fv( tc ); -} - -static void TAG(TexCoord4f)( GLfloat s, GLfloat t, GLfloat r, GLfloat q ) -{ - PRE_LOOPBACK( TexCoord4f ); - _glapi_Dispatch->TexCoord4f( s, t, r, q ); -} - -static void TAG(TexCoord4fv)( const GLfloat *tc ) -{ - PRE_LOOPBACK( TexCoord4fv ); - _glapi_Dispatch->TexCoord4fv( tc ); -} - -static void TAG(Vertex2f)( GLfloat x, GLfloat y ) -{ - PRE_LOOPBACK( Vertex2f ); - _glapi_Dispatch->Vertex2f( x, y ); -} - -static void TAG(Vertex2fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Vertex2fv ); - _glapi_Dispatch->Vertex2fv( v ); -} - -static void TAG(Vertex3f)( GLfloat x, GLfloat y, GLfloat z ) -{ - PRE_LOOPBACK( Vertex3f ); - _glapi_Dispatch->Vertex3f( x, y, z ); -} - -static void TAG(Vertex3fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Vertex3fv ); - _glapi_Dispatch->Vertex3fv( v ); -} - -static void TAG(Vertex4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) -{ - PRE_LOOPBACK( Vertex4f ); - _glapi_Dispatch->Vertex4f( x, y, z, w ); -} - -static void TAG(Vertex4fv)( const GLfloat *v ) -{ - PRE_LOOPBACK( Vertex4fv ); - _glapi_Dispatch->Vertex4fv( v ); -} - -static void TAG(CallList)( GLuint i ) -{ - PRE_LOOPBACK( CallList ); - _glapi_Dispatch->CallList( i ); -} - -static void TAG(Begin)( GLenum mode ) -{ - PRE_LOOPBACK( Begin ); - _glapi_Dispatch->Begin( mode ); -} - -static void TAG(End)( void ) -{ - PRE_LOOPBACK( End ); - _glapi_Dispatch->End(); -} - -static void TAG(Rectf)( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) -{ - PRE_LOOPBACK( Rectf ); - _glapi_Dispatch->Rectf( x1, y1, x2, y2 ); -} - -static void TAG(DrawArrays)( GLenum mode, GLint start, GLsizei count ) -{ - PRE_LOOPBACK( DrawArrays ); - _glapi_Dispatch->DrawArrays( mode, start, count ); -} - -static void TAG(DrawElements)( GLenum mode, GLsizei count, GLenum type, - const void *indices ) -{ - PRE_LOOPBACK( DrawElements ); - _glapi_Dispatch->DrawElements( mode, count, type, indices ); -} - -static void TAG(DrawRangeElements)( GLenum mode, GLuint start, - GLuint end, GLsizei count, - GLenum type, const void *indices ) -{ - PRE_LOOPBACK( DrawRangeElements ); - _glapi_Dispatch->DrawRangeElements( mode, start, end, count, type, indices ); -} - -static void TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 ) -{ - PRE_LOOPBACK( EvalMesh1 ); - _glapi_Dispatch->EvalMesh1( mode, i1, i2 ); -} - -static void TAG(EvalMesh2)( GLenum mode, GLint i1, GLint i2, - GLint j1, GLint j2 ) -{ - PRE_LOOPBACK( EvalMesh2 ); - _glapi_Dispatch->EvalMesh2( mode, i1, i2, j1, j2 ); -} - -static void TAG(VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) -{ - PRE_LOOPBACK( VertexAttrib4fNV ); - _glapi_Dispatch->VertexAttrib4fNV( index, x, y, z, w ); -} - -static void TAG(VertexAttrib4fvNV)( GLuint index, const GLfloat *v ) -{ - PRE_LOOPBACK( VertexAttrib4fNV ); - _glapi_Dispatch->VertexAttrib4fvNV( index, v ); -} - - -static GLvertexformat TAG(vtxfmt) = { - TAG(ArrayElement), - TAG(Color3f), - TAG(Color3fv), - TAG(Color3ub), - TAG(Color3ubv), - TAG(Color4f), - TAG(Color4fv), - TAG(Color4ub), - TAG(Color4ubv), - TAG(EdgeFlag), - TAG(EdgeFlagv), - TAG(EvalCoord1f), - TAG(EvalCoord1fv), - TAG(EvalCoord2f), - TAG(EvalCoord2fv), - TAG(EvalPoint1), - TAG(EvalPoint2), - TAG(FogCoordfEXT), - TAG(FogCoordfvEXT), - TAG(Indexi), - TAG(Indexiv), - TAG(Materialfv), - TAG(MultiTexCoord1fARB), - TAG(MultiTexCoord1fvARB), - TAG(MultiTexCoord2fARB), - TAG(MultiTexCoord2fvARB), - TAG(MultiTexCoord3fARB), - TAG(MultiTexCoord3fvARB), - TAG(MultiTexCoord4fARB), - TAG(MultiTexCoord4fvARB), - TAG(Normal3f), - TAG(Normal3fv), - TAG(SecondaryColor3fEXT), - TAG(SecondaryColor3fvEXT), - TAG(SecondaryColor3ubEXT), - TAG(SecondaryColor3ubvEXT), - TAG(TexCoord1f), - TAG(TexCoord1fv), - TAG(TexCoord2f), - TAG(TexCoord2fv), - TAG(TexCoord3f), - TAG(TexCoord3fv), - TAG(TexCoord4f), - TAG(TexCoord4fv), - TAG(Vertex2f), - TAG(Vertex2fv), - TAG(Vertex3f), - TAG(Vertex3fv), - TAG(Vertex4f), - TAG(Vertex4fv), - TAG(CallList), - TAG(Begin), - TAG(End), - TAG(VertexAttrib4fNV), - TAG(VertexAttrib4fvNV), - TAG(Rectf), - TAG(DrawArrays), - TAG(DrawElements), - TAG(DrawRangeElements), - TAG(EvalMesh1), - TAG(EvalMesh2) -}; - -#undef TAG -#undef PRE_LOOPBACK Index: xc/extras/Mesa/src/OSmesa/osmesa.c diff -u xc/extras/Mesa/src/OSmesa/osmesa.c:1.16 xc/extras/Mesa/src/OSmesa/osmesa.c:removed --- xc/extras/Mesa/src/OSmesa/osmesa.c:1.16 Tue Dec 2 09:28:12 2003 +++ xc/extras/Mesa/src/OSmesa/osmesa.c Wed Mar 16 21:00:43 2005 @@ -1,2179 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/OSmesa/osmesa.c,v 1.16 2003/12/02 14:28:12 alanh Exp $ */ - -/* - * Off-Screen Mesa rendering / Rendering into client memory space - * - * Note on thread safety: this driver is thread safe. All - * functions are reentrant. The notion of current context is - * managed by the core _mesa_make_current() and _mesa_get_current_context() - * functions. Those functions are thread-safe. - */ - - -#include "glheader.h" -#include "GL/osmesa.h" -#include "buffers.h" -#include "context.h" -#include "colormac.h" -#include "depth.h" -#include "extensions.h" -#include "imports.h" -#include "macros.h" -#include "matrix.h" -#include "mmath.h" -#include "mtypes.h" -#include "texformat.h" -#include "texstore.h" -#include "array_cache/acache.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "swrast/s_context.h" -#include "swrast/s_depth.h" -#include "swrast/s_lines.h" -#include "swrast/s_triangle.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - - - -/* - * This is the OS/Mesa context struct. - * Notice how it includes a GLcontext. By doing this we're mimicking - * C++ inheritance/derivation. - * Later, we can cast a GLcontext pointer into an OSMesaContext pointer - * or vice versa. - */ -struct osmesa_context { - GLcontext gl_ctx; /* The core GL/Mesa context */ - GLvisual *gl_visual; /* Describes the buffers */ - GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */ - GLenum format; /* either GL_RGBA or GL_COLOR_INDEX */ - void *buffer; /* the image buffer */ - GLint width, height; /* size of image buffer */ - GLint rowlength; /* number of pixels per row */ - GLint userRowLength; /* user-specified number of pixels per row */ - GLint rshift, gshift; /* bit shifts for RGBA formats */ - GLint bshift, ashift; - GLint rInd, gInd, bInd, aInd;/* index offsets for RGBA formats */ - GLchan *rowaddr[MAX_HEIGHT]; /* address of first pixel in each image row */ - GLboolean yup; /* TRUE -> Y increases upward */ - /* FALSE -> Y increases downward */ -}; - - - -/* A forward declaration: */ -static void osmesa_update_state( GLcontext *ctx, GLuint newstate ); -static void osmesa_register_swrast_functions( GLcontext *ctx ); - - - -#define OSMESA_CONTEXT(ctx) ((OSMesaContext) (ctx->DriverCtx)) - - - -/**********************************************************************/ -/***** Public Functions *****/ -/**********************************************************************/ - - -/* - * Create an Off-Screen Mesa rendering context. The only attribute needed is - * an RGBA vs Color-Index mode flag. - * - * Input: format - either GL_RGBA or GL_COLOR_INDEX - * sharelist - specifies another OSMesaContext with which to share - * display lists. NULL indicates no sharing. - * Return: an OSMesaContext or 0 if error - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContext( GLenum format, OSMesaContext sharelist ) -{ - const GLint accumBits = (format == OSMESA_COLOR_INDEX) ? 0 : 16; - return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS, - 8, accumBits, sharelist); -} - - - -/* - * New in Mesa 3.5 - * - * Create context and specify size of ancillary buffers. - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, - GLint accumBits, OSMesaContext sharelist ) -{ - OSMesaContext osmesa; - GLint rshift, gshift, bshift, ashift; - GLint rind, gind, bind, aind; - GLint indexBits = 0, redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0; - GLboolean rgbmode; - const GLuint i4 = 1; - const GLubyte *i1 = (GLubyte *) &i4; - const GLint little_endian = *i1; - - rind = gind = bind = aind = 0; - if (format==OSMESA_COLOR_INDEX) { - indexBits = 8; - rshift = gshift = bshift = ashift = 0; - rgbmode = GL_FALSE; - } - else if (format==OSMESA_RGBA) { - indexBits = 0; - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - rind = 0; - gind = 1; - bind = 2; - aind = 3; - if (little_endian) { - rshift = 0; - gshift = 8; - bshift = 16; - ashift = 24; - } - else { - rshift = 24; - gshift = 16; - bshift = 8; - ashift = 0; - } - rgbmode = GL_TRUE; - } - else if (format==OSMESA_BGRA) { - indexBits = 0; - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - bind = 0; - gind = 1; - rind = 2; - aind = 3; - if (little_endian) { - bshift = 0; - gshift = 8; - rshift = 16; - ashift = 24; - } - else { - bshift = 24; - gshift = 16; - rshift = 8; - ashift = 0; - } - rgbmode = GL_TRUE; - } - else if (format==OSMESA_ARGB) { - indexBits = 0; - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - aind = 0; - rind = 1; - gind = 2; - bind = 3; - if (little_endian) { - ashift = 0; - rshift = 8; - gshift = 16; - bshift = 24; - } - else { - ashift = 24; - rshift = 16; - gshift = 8; - bshift = 0; - } - rgbmode = GL_TRUE; - } - else if (format==OSMESA_RGB) { - indexBits = 0; - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = 0; - bshift = 0; - gshift = 8; - rshift = 16; - ashift = 24; - rind = 0; - gind = 1; - bind = 2; - rgbmode = GL_TRUE; - } - else if (format==OSMESA_BGR) { - indexBits = 0; - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = 0; - bshift = 0; - gshift = 8; - rshift = 16; - ashift = 24; - rind = 2; - gind = 1; - bind = 0; - rgbmode = GL_TRUE; - } - else if (format==OSMESA_RGB_565) { - indexBits = 0; - redBits = 5; - greenBits = 6; - blueBits = 5; - alphaBits = 0; - rshift = 11; - gshift = 5; - bshift = 0; - ashift = 0; - rind = 0; /* not used */ - gind = 0; - bind = 0; - rgbmode = GL_TRUE; - } - else { - return NULL; - } - - - osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context); - if (osmesa) { - osmesa->gl_visual = _mesa_create_visual( rgbmode, - GL_FALSE, /* double buffer */ - GL_FALSE, /* stereo */ - redBits, - greenBits, - blueBits, - alphaBits, - indexBits, - depthBits, - stencilBits, - accumBits, - accumBits, - accumBits, - alphaBits ? accumBits : 0, - 1 /* num samples */ - ); - if (!osmesa->gl_visual) { - FREE(osmesa); - return NULL; - } - - if (!_mesa_initialize_context(&osmesa->gl_ctx, - osmesa->gl_visual, - sharelist ? &sharelist->gl_ctx - : (GLcontext *) NULL, - (void *) osmesa, - GL_FALSE)) { - _mesa_destroy_visual( osmesa->gl_visual ); - FREE(osmesa); - return NULL; - } - - _mesa_enable_sw_extensions(&(osmesa->gl_ctx)); - _mesa_enable_1_3_extensions(&(osmesa->gl_ctx)); - _mesa_enable_1_4_extensions(&(osmesa->gl_ctx)); - - osmesa->gl_buffer = _mesa_create_framebuffer( osmesa->gl_visual, - (GLboolean) ( osmesa->gl_visual->depthBits > 0 ), - (GLboolean) ( osmesa->gl_visual->stencilBits > 0 ), - (GLboolean) ( osmesa->gl_visual->accumRedBits > 0 ), - GL_FALSE /* s/w alpha */ ); - - if (!osmesa->gl_buffer) { - _mesa_destroy_visual( osmesa->gl_visual ); - _mesa_free_context_data( &osmesa->gl_ctx ); - FREE(osmesa); - return NULL; - } - osmesa->format = format; - osmesa->buffer = NULL; - osmesa->width = 0; - osmesa->height = 0; - osmesa->userRowLength = 0; - osmesa->rowlength = 0; - osmesa->yup = GL_TRUE; - osmesa->rshift = rshift; - osmesa->gshift = gshift; - osmesa->bshift = bshift; - osmesa->ashift = ashift; - osmesa->rInd = rind; - osmesa->gInd = gind; - osmesa->bInd = bind; - osmesa->aInd = aind; - - - /* Initialize the software rasterizer and helper modules. - */ - { - GLcontext *ctx = &osmesa->gl_ctx; - - _swrast_CreateContext( ctx ); - _ac_CreateContext( ctx ); - _tnl_CreateContext( ctx ); - _swsetup_CreateContext( ctx ); - - _swsetup_Wakeup( ctx ); - osmesa_register_swrast_functions( ctx ); - } - } - return osmesa; -} - - - - -/* - * Destroy an Off-Screen Mesa rendering context. - * - * Input: ctx - the context to destroy - */ -GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx ) -{ - if (ctx) { - _swsetup_DestroyContext( &ctx->gl_ctx ); - _tnl_DestroyContext( &ctx->gl_ctx ); - _ac_DestroyContext( &ctx->gl_ctx ); - _swrast_DestroyContext( &ctx->gl_ctx ); - - _mesa_destroy_visual( ctx->gl_visual ); - _mesa_destroy_framebuffer( ctx->gl_buffer ); - _mesa_free_context_data( &ctx->gl_ctx ); - FREE( ctx ); - } -} - - - -/* - * Recompute the values of the context's rowaddr array. - */ -static void compute_row_addresses( OSMesaContext ctx ) -{ - GLint bytesPerPixel, bytesPerRow, i; - GLubyte *origin = (GLubyte *) ctx->buffer; - - if (ctx->format == OSMESA_COLOR_INDEX) { - /* CI mode */ - bytesPerPixel = 1 * sizeof(GLchan); - } - else if ((ctx->format == OSMESA_RGB) || (ctx->format == OSMESA_BGR)) { - /* RGB mode */ - bytesPerPixel = 3 * sizeof(GLchan); - } - else if (ctx->format == OSMESA_RGB_565) { - /* 5/6/5 RGB pixel in 16 bits */ - bytesPerPixel = 2; - } - else { - /* RGBA mode */ - bytesPerPixel = 4 * sizeof(GLchan); - } - - bytesPerRow = ctx->rowlength * bytesPerPixel; - - if (ctx->yup) { - /* Y=0 is bottom line of window */ - for (i = 0; i < MAX_HEIGHT; i++) { - ctx->rowaddr[i] = (GLchan *) ((GLubyte *) origin + i * bytesPerRow); - } - } - else { - /* Y=0 is top line of window */ - for (i = 0; i < MAX_HEIGHT; i++) { - GLint j = ctx->height - i - 1; - ctx->rowaddr[i] = (GLchan *) ((GLubyte *) origin + j * bytesPerRow); - } - } -} - - -/* - * Bind an OSMesaContext to an image buffer. The image buffer is just a - * block of memory which the client provides. Its size must be at least - * as large as width*height*sizeof(type). Its address should be a multiple - * of 4 if using RGBA mode. - * - * Image data is stored in the order of glDrawPixels: row-major order - * with the lower-left image pixel stored in the first array position - * (ie. bottom-to-top). - * - * If the context's viewport hasn't been initialized yet, it will now be - * initialized to (0,0,width,height). - * - * Input: ctx - the rendering context - * buffer - the image buffer memory - * type - data type for pixel components - * Normally, only GL_UNSIGNED_BYTE and GL_UNSIGNED_SHORT_5_6_5 - * are supported. But if Mesa's been compiled with CHAN_BITS==16 - * then type must be GL_UNSIGNED_SHORT. And if Mesa's been build - * with CHAN_BITS==32 then type must be GL_FLOAT. - * width, height - size of image buffer in pixels, at least 1 - * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx, - * invalid buffer address, invalid type, width<1, height<1, - * width>internal limit or height>internal limit. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, - GLsizei width, GLsizei height ) -{ - if (!ctx || !buffer || - width < 1 || height < 1 || - width > MAX_WIDTH || height > MAX_HEIGHT) { - return GL_FALSE; - } - - if (ctx->format == OSMESA_RGB_565) { - if (type != GL_UNSIGNED_SHORT_5_6_5) - return GL_FALSE; - } - else if (type != CHAN_TYPE) { - return GL_FALSE; - } - - osmesa_update_state( &ctx->gl_ctx, 0 ); - _mesa_make_current( &ctx->gl_ctx, ctx->gl_buffer ); - - ctx->buffer = buffer; - ctx->width = width; - ctx->height = height; - if (ctx->userRowLength) - ctx->rowlength = ctx->userRowLength; - else - ctx->rowlength = width; - - compute_row_addresses( ctx ); - - /* init viewport */ - if (ctx->gl_ctx.Viewport.Width == 0) { - /* initialize viewport and scissor box to buffer size */ - _mesa_Viewport( 0, 0, width, height ); - ctx->gl_ctx.Scissor.Width = width; - ctx->gl_ctx.Scissor.Height = height; - } - else { - /* this will make ensure we recognize the new buffer size */ - _mesa_ResizeBuffersMESA(); - } - - /* Added by Gerk Huisma: */ - _tnl_MakeCurrent( &ctx->gl_ctx, ctx->gl_ctx.DrawBuffer, - ctx->gl_ctx.ReadBuffer ); - - return GL_TRUE; -} - - - -GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void ) -{ - GLcontext *ctx = _mesa_get_current_context(); - if (ctx) - return (OSMesaContext) ctx; - else - return NULL; -} - - - -GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value ) -{ - OSMesaContext ctx = OSMesaGetCurrentContext(); - - switch (pname) { - case OSMESA_ROW_LENGTH: - if (value<0) { - _mesa_error( &ctx->gl_ctx, GL_INVALID_VALUE, - "OSMesaPixelStore(value)" ); - return; - } - ctx->userRowLength = value; - ctx->rowlength = value; - break; - case OSMESA_Y_UP: - ctx->yup = value ? GL_TRUE : GL_FALSE; - break; - default: - _mesa_error( &ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" ); - return; - } - - compute_row_addresses( ctx ); -} - - -GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value ) -{ - OSMesaContext ctx = OSMesaGetCurrentContext(); - - switch (pname) { - case OSMESA_WIDTH: - *value = ctx->width; - return; - case OSMESA_HEIGHT: - *value = ctx->height; - return; - case OSMESA_FORMAT: - *value = ctx->format; - return; - case OSMESA_TYPE: - *value = CHAN_TYPE; - return; - case OSMESA_ROW_LENGTH: - *value = ctx->rowlength; - return; - case OSMESA_Y_UP: - *value = ctx->yup; - return; - case OSMESA_MAX_WIDTH: - *value = MAX_WIDTH; - return; - case OSMESA_MAX_HEIGHT: - *value = MAX_HEIGHT; - return; - default: - _mesa_error(&ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)"); - return; - } -} - -/* - * Return the depth buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ) -{ - if ((!c->gl_buffer) || (!c->gl_buffer->DepthBuffer)) { - *width = 0; - *height = 0; - *bytesPerValue = 0; - *buffer = 0; - return GL_FALSE; - } - else { - *width = c->gl_buffer->Width; - *height = c->gl_buffer->Height; - if (c->gl_visual->depthBits <= 16) - *bytesPerValue = sizeof(GLushort); - else - *bytesPerValue = sizeof(GLuint); - *buffer = c->gl_buffer->DepthBuffer; - return GL_TRUE; - } -} - -/* - * Return the color buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * format - the pixel format (OSMESA_FORMAT) - * buffer - pointer to color buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetColorBuffer( OSMesaContext c, GLint *width, - GLint *height, GLint *format, void **buffer ) -{ - if (!c->buffer) { - *width = 0; - *height = 0; - *format = 0; - *buffer = 0; - return GL_FALSE; - } - else { - *width = c->width; - *height = c->height; - *format = c->format; - *buffer = c->buffer; - return GL_TRUE; - } -} - - - -struct name_address { - const char *Name; - GLvoid *Address; -}; - -static struct name_address functions[] = { - { "OSMesaCreateContext", (void *) OSMesaCreateContext }, - { "OSMesaCreateContextExt", (void *) OSMesaCreateContextExt }, - { "OSMesaDestroyContext", (void *) OSMesaDestroyContext }, - { "OSMesaMakeCurrent", (void *) OSMesaMakeCurrent }, - { "OSMesaGetCurrentContext", (void *) OSMesaGetCurrentContext }, - { "OSMesaPixelsStore", (void *) OSMesaPixelStore }, - { "OSMesaGetIntegerv", (void *) OSMesaGetIntegerv }, - { "OSMesaGetDepthBuffer", (void *) OSMesaGetDepthBuffer }, - { "OSMesaGetColorBuffer", (void *) OSMesaGetColorBuffer }, - { "OSMesaGetProcAddress", (void *) OSMesaGetProcAddress }, - { NULL, NULL } -}; - -GLAPI void * GLAPIENTRY -OSMesaGetProcAddress( const char *funcName ) -{ - int i; - for (i = 0; functions[i].Name; i++) { - if (_mesa_strcmp(functions[i].Name, funcName) == 0) - return (void *) functions[i].Address; - } - return (void *) _glapi_get_proc_address(funcName); -} - - -/**********************************************************************/ -/*** Device Driver Functions ***/ -/**********************************************************************/ - - -/* - * Useful macros: - */ - -#if CHAN_TYPE == GL_FLOAT -#define PACK_RGBA(DST, R, G, B, A) \ -do { \ - (DST)[0] = MAX2( R, 0.0F ); \ - (DST)[1] = MAX2( G, 0.0F ); \ - (DST)[2] = MAX2( B, 0.0F ); \ - (DST)[3] = CLAMP(A, 0.0F, CHAN_MAXF);\ -} while (0) -#else -#define PACK_RGBA(DST, R, G, B, A) \ -do { \ - (DST)[osmesa->rInd] = R; \ - (DST)[osmesa->gInd] = G; \ - (DST)[osmesa->bInd] = B; \ - (DST)[osmesa->aInd] = A; \ -} while (0) -#endif - -#define PACK_RGB(DST, R, G, B) \ -do { \ - (DST)[0] = R; \ - (DST)[1] = G; \ - (DST)[2] = B; \ -} while (0) - -#define PACK_BGR(DST, R, G, B) \ -do { \ - (DST)[0] = B; \ - (DST)[1] = G; \ - (DST)[2] = R; \ -} while (0) - -#define PACK_RGB_565(DST, R, G, B) \ -do { \ - (DST) = (((int) (R) << 8) & 0xf800) | (((int) (G) << 3) & 0x7e0) | ((int) (B) >> 3);\ -} while (0) - - -#define UNPACK_RED(P) ( (P)[osmesa->rInd] ) -#define UNPACK_GREEN(P) ( (P)[osmesa->gInd] ) -#define UNPACK_BLUE(P) ( (P)[osmesa->bInd] ) -#define UNPACK_ALPHA(P) ( (P)[osmesa->aInd] ) - - -#define PIXELADDR1(X,Y) (osmesa->rowaddr[Y] + (X)) -#define PIXELADDR2(X,Y) (osmesa->rowaddr[Y] + 2 * (X)) -#define PIXELADDR3(X,Y) (osmesa->rowaddr[Y] + 3 * (X)) -#define PIXELADDR4(X,Y) (osmesa->rowaddr[Y] + 4 * (X)) - - - -static void set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) -{ - /* separate read buffer not supported */ - ASSERT(buffer == ctx->DrawBuffer); - ASSERT(bufferBit == FRONT_LEFT_BIT); -} - - -static void clear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; - - /* sanity check - we only have a front-left buffer */ - ASSERT((mask & (DD_FRONT_RIGHT_BIT | DD_BACK_LEFT_BIT | DD_BACK_RIGHT_BIT)) == 0); - if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) { - if (mask & DD_FRONT_LEFT_BIT) { - if (osmesa->format == OSMESA_COLOR_INDEX) { - if (all) { - /* Clear whole CI buffer */ -#if CHAN_TYPE == GL_UNSIGNED_BYTE - MEMSET(osmesa->buffer, ctx->Color.ClearIndex, - osmesa->rowlength * osmesa->height); -#else - const GLint n = osmesa->rowlength * osmesa->height; - GLchan *buffer = (GLchan *) osmesa->buffer; - GLint i; - for (i = 0; i < n; i ++) { - buffer[i] = ctx->Color.ClearIndex; - } -#endif - } - else { - /* Clear part of CI buffer */ - const GLchan clearIndex = (GLchan) ctx->Color.ClearIndex; - GLint i, j; - for (i = 0; i < height; i++) { - GLchan *ptr1 = PIXELADDR1(x, (y + i)); - for (j = 0; j < width; j++) { - *ptr1++ = clearIndex; - } - } - } - } - else if (osmesa->format == OSMESA_RGB) { - GLchan r, g, b; - CLAMPED_FLOAT_TO_CHAN(r, ctx->Color.ClearColor[0]); - CLAMPED_FLOAT_TO_CHAN(g, ctx->Color.ClearColor[1]); - CLAMPED_FLOAT_TO_CHAN(b, ctx->Color.ClearColor[2]); - if (all) { - /* Clear whole RGB buffer */ - GLuint n = osmesa->rowlength * osmesa->height; - GLchan *ptr3 = (GLchan *) osmesa->buffer; - GLuint i; - for (i = 0; i < n; i++) { - PACK_RGB(ptr3, r, g, b); - ptr3 += 3; - } - } - else { - /* Clear part of RGB buffer */ - GLint i, j; - for (i = 0; i < height; i++) { - GLchan *ptr3 = PIXELADDR3(x, (y + i)); - for (j = 0; j < width; j++) { - PACK_RGB(ptr3, r, g, b); - ptr3 += 3; - } - } - } - } - else if (osmesa->format == OSMESA_BGR) { - GLchan r, g, b; - CLAMPED_FLOAT_TO_CHAN(r, ctx->Color.ClearColor[0]); - CLAMPED_FLOAT_TO_CHAN(g, ctx->Color.ClearColor[1]); - CLAMPED_FLOAT_TO_CHAN(b, ctx->Color.ClearColor[2]); - if (all) { - /* Clear whole RGB buffer */ - const GLint n = osmesa->rowlength * osmesa->height; - GLchan *ptr3 = (GLchan *) osmesa->buffer; - GLint i; - for (i = 0; i < n; i++) { - PACK_BGR(ptr3, r, g, b); - ptr3 += 3; - } - } - else { - /* Clear part of RGB buffer */ - GLint i, j; - for (i = 0; i < height; i++) { - GLchan *ptr3 = PIXELADDR3(x, (y + i)); - for (j = 0; j < width; j++) { - PACK_BGR(ptr3, r, g, b); - ptr3 += 3; - } - } - } - } - else if (osmesa->format == OSMESA_RGB_565) { - GLushort clearPixel; - GLchan r, g, b; - CLAMPED_FLOAT_TO_CHAN(r, ctx->Color.ClearColor[0]); - CLAMPED_FLOAT_TO_CHAN(g, ctx->Color.ClearColor[1]); - CLAMPED_FLOAT_TO_CHAN(b, ctx->Color.ClearColor[2]); - PACK_RGB_565(clearPixel, r, g, b); - if (all) { - /* Clear whole RGB buffer */ - const GLuint n = osmesa->rowlength * osmesa->height; - GLushort *ptr2 = (GLushort *) osmesa->buffer; - GLuint i; - for (i = 0; i < n; i++) { - *ptr2 = clearPixel; - ptr2++; - } - } - else { - /* clear scissored region */ - GLint i, j; - for (i = 0; i < height; i++) { - GLushort *ptr2 = (GLushort *) PIXELADDR2(x, (y + i)); - for (j = 0; j < width; j++) { - *ptr2 = clearPixel; - ptr2++; - } - } - } - } - else { -#if CHAN_TYPE == GL_UNSIGNED_BYTE - /* 4-byte pixel value */ - GLuint clearPixel; - GLchan *clr = (GLchan *) &clearPixel; - CLAMPED_FLOAT_TO_CHAN(clr[osmesa->rInd], ctx->Color.ClearColor[0]); - CLAMPED_FLOAT_TO_CHAN(clr[osmesa->gInd], ctx->Color.ClearColor[1]); - CLAMPED_FLOAT_TO_CHAN(clr[osmesa->bInd], ctx->Color.ClearColor[2]); - CLAMPED_FLOAT_TO_CHAN(clr[osmesa->aInd], ctx->Color.ClearColor[3]); - if (all) { - /* Clear whole RGBA buffer */ - const GLuint n = osmesa->rowlength * osmesa->height; - GLuint *ptr4 = (GLuint *) osmesa->buffer; - GLuint i; - if (clearPixel) { - for (i = 0; i < n; i++) { - *ptr4++ = clearPixel; - } - } - else { - _mesa_bzero(ptr4, n * sizeof(GLuint)); - } - } - else { - /* Clear part of RGBA buffer */ - GLint i, j; - for (i = 0; i < height; i++) { - GLuint *ptr4 = (GLuint *) PIXELADDR4(x, (y + i)); - for (j = 0; j < width; j++) { - *ptr4++ = clearPixel; - } - } - } -#else - GLchan r, g, b, a; - CLAMPED_FLOAT_TO_CHAN(r, ctx->Color.ClearColor[0]); - CLAMPED_FLOAT_TO_CHAN(g, ctx->Color.ClearColor[1]); - CLAMPED_FLOAT_TO_CHAN(b, ctx->Color.ClearColor[2]); - CLAMPED_FLOAT_TO_CHAN(a, ctx->Color.ClearColor[3]); - if (all) { - /* Clear whole RGBA buffer */ - const GLuint n = osmesa->rowlength * osmesa->height; - GLchan *p = (GLchan *) osmesa->buffer; - GLuint i; - for (i = 0; i < n; i++) { - PACK_RGBA(p, r, g, b, a); - p += 4; - } - } - else { - /* Clear part of RGBA buffer */ - GLint i, j; - for (i = 0; i < height; i++) { - GLchan *p = PIXELADDR4(x, (y + i)); - for (j = 0; j < width; j++) { - PACK_RGBA(p, r, g, b, a); - p += 4; - } - } - } - -#endif - } - mask &= ~DD_FRONT_LEFT_BIT; - } - } - - if (mask) - _swrast_Clear( ctx, mask, all, x, y, width, height ); -} - - - -static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) -{ - /* don't use GET_CURRENT_CONTEXT(ctx) here - it's a problem on Windows */ - GLcontext *ctx = (GLcontext *) _glapi_get_context(); - (void) buffer; - if (ctx) { - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - *width = osmesa->width; - *height = osmesa->height; - } -} - - -/**********************************************************************/ -/***** Read/write spans/arrays of RGBA pixels *****/ -/**********************************************************************/ - -/* Write RGBA pixels to an RGBA (or permuted) buffer. */ -static void -write_rgba_span( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR4(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p += 4) { - if (mask[i]) { - PACK_RGBA(p, rgba[i][RCOMP], rgba[i][GCOMP], - rgba[i][BCOMP], rgba[i][ACOMP]); - } - } - } - else { - for (i = 0; i < n; i++, p += 4) { - PACK_RGBA(p, rgba[i][RCOMP], rgba[i][GCOMP], - rgba[i][BCOMP], rgba[i][ACOMP]); - } - } -} - - -/* Write RGBA pixels to an RGBA buffer. This is the fastest span-writer. */ -static void -write_rgba_span_rgba( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint *ptr4 = (GLuint *) PIXELADDR4(x, y); - const GLuint *rgba4 = (const GLuint *) rgba; - GLuint i; - ASSERT(CHAN_TYPE == GL_UNSIGNED_BYTE); - if (mask) { - for (i = 0; i < n; i++) { - if (mask[i]) { - ptr4[i] = rgba4[i]; - } - } - } - else { - MEMCPY( ptr4, rgba4, n * 4 ); - } -} - - -/* Write RGB pixels to an RGBA (or permuted) buffer. */ -static void -write_rgb_span( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgb[][3], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR4(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p+=4) { - if (mask[i]) { - PACK_RGBA(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP], CHAN_MAX); - } - } - } - else { - for (i = 0; i < n; i++, p+=4) { - PACK_RGBA(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP], CHAN_MAX); - } - } -} - - - -static void -write_monocolor_span( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR4(x, y); - GLuint i; - for (i = 0; i < n; i++, p += 4) { - if (mask[i]) { - PACK_RGBA(p, color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP]); - } - } -} - - - -static void -write_rgba_pixels( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR4(x[i], y[i]); - PACK_RGBA(p, rgba[i][RCOMP], rgba[i][GCOMP], - rgba[i][BCOMP], rgba[i][ACOMP]); - } - } -} - - - -static void -write_monocolor_pixels( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR4(x[i], y[i]); - PACK_RGBA(p, color[RCOMP], color[GCOMP], color[BCOMP], color[ACOMP]); - } - } -} - - -static void -read_rgba_span( const GLcontext *ctx, GLuint n, GLint x, GLint y, - GLchan rgba[][4] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - GLchan *p = PIXELADDR4(x, y); - for (i = 0; i < n; i++, p += 4) { - rgba[i][RCOMP] = UNPACK_RED(p); - rgba[i][GCOMP] = UNPACK_GREEN(p); - rgba[i][BCOMP] = UNPACK_BLUE(p); - rgba[i][ACOMP] = UNPACK_ALPHA(p); - } -} - - -/* Read RGBA pixels from an RGBA buffer */ -static void -read_rgba_span_rgba( const GLcontext *ctx, GLuint n, GLint x, GLint y, - GLchan rgba[][4] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint *ptr4 = (GLuint *) PIXELADDR4(x, y); - MEMCPY( rgba, ptr4, n * 4 * sizeof(GLchan) ); -} - - -static void -read_rgba_pixels( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - const GLchan *p = PIXELADDR4(x[i], y[i]); - rgba[i][RCOMP] = UNPACK_RED(p); - rgba[i][GCOMP] = UNPACK_GREEN(p); - rgba[i][BCOMP] = UNPACK_BLUE(p); - rgba[i][ACOMP] = UNPACK_ALPHA(p); - } - } -} - -/**********************************************************************/ -/***** 3 byte RGB pixel support funcs *****/ -/**********************************************************************/ - -/* Write RGBA pixels to an RGB buffer. */ -static void -write_rgba_span_RGB( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_RGB(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, p += 3) { - PACK_RGB(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - -/* Write RGBA pixels to an BGR buffer. */ -static void -write_rgba_span_BGR( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_BGR(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, p += 3) { - PACK_BGR(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - -/* Write RGB pixels to an RGB buffer. */ -static void -write_rgb_span_RGB( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgb[][3], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_RGB(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, p += 3) { - PACK_RGB(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } -} - -/* Write RGB pixels to an BGR buffer. */ -static void -write_rgb_span_BGR( const GLcontext *ctx, GLuint n, GLint x, GLint y, - CONST GLchan rgb[][3], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_BGR(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, p += 3) { - PACK_BGR(p, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } -} - - -static void -write_monocolor_span_RGB( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_RGB(p, color[RCOMP], color[GCOMP], color[BCOMP]); - } - } -} - -static void -write_monocolor_span_BGR( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *p = PIXELADDR3(x, y); - GLuint i; - for (i = 0; i < n; i++, p += 3) { - if (mask[i]) { - PACK_BGR(p, color[RCOMP], color[GCOMP], color[BCOMP]); - } - } -} - -static void -write_rgba_pixels_RGB( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR3(x[i], y[i]); - PACK_RGB(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - -static void -write_rgba_pixels_BGR( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR3(x[i], y[i]); - PACK_BGR(p, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - -static void -write_monocolor_pixels_RGB( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR3(x[i], y[i]); - PACK_RGB(p, color[RCOMP], color[GCOMP], color[BCOMP]); - } - } -} - -static void -write_monocolor_pixels_BGR( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLchan color[4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLchan *p = PIXELADDR3(x[i], y[i]); - PACK_BGR(p, color[RCOMP], color[GCOMP], color[BCOMP]); - } - } -} - -static void -read_rgba_span3( const GLcontext *ctx, GLuint n, GLint x, GLint y, - GLchan rgba[][4] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - const GLchan *p = PIXELADDR3(x, y); - for (i = 0; i < n; i++, p += 3) { - rgba[i][RCOMP] = UNPACK_RED(p); - rgba[i][GCOMP] = UNPACK_GREEN(p); - rgba[i][BCOMP] = UNPACK_BLUE(p); - rgba[i][ACOMP] = CHAN_MAX; - } -} - -static void -read_rgba_pixels3( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLchan rgba[][4], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - const GLchan *p = PIXELADDR3(x[i], y[i]); - rgba[i][RCOMP] = UNPACK_RED(p); - rgba[i][GCOMP] = UNPACK_GREEN(p); - rgba[i][BCOMP] = UNPACK_BLUE(p); - rgba[i][ACOMP] = CHAN_MAX; - } - } -} - - -/**********************************************************************/ -/***** 2 byte RGB pixel support funcs *****/ -/**********************************************************************/ - -/* Write RGBA pixels to an RGB_565 buffer. */ -static void -write_rgba_span2( const GLcontext *ctx, - GLuint n, GLint x, GLint y, - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLushort *ptr2 = (GLushort *) PIXELADDR2(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, ptr2++) { - if (mask[i]) { - PACK_RGB_565(*ptr2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, ptr2++) { - PACK_RGB_565(*ptr2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - - -/* Write RGB pixels to an RGB_565 buffer. */ -static void -write_rgb_span2( const GLcontext *ctx, - GLuint n, GLint x, GLint y, - CONST GLchan rgb[][3], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLushort *ptr2 = (GLushort *) PIXELADDR2(x, y); - GLuint i; - if (mask) { - for (i = 0; i < n; i++, ptr2++) { - if (mask[i]) { - PACK_RGB_565(*ptr2, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } - } - else { - for (i = 0; i < n; i++, ptr2++) { - PACK_RGB_565(*ptr2, rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP]); - } - } -} - - -static void -write_monocolor_span2( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLchan color[4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLushort pixel; - GLushort *ptr2 = (GLushort *) PIXELADDR2(x, y); - GLuint i; - PACK_RGB_565(pixel, color[RCOMP], color[GCOMP], color[BCOMP]); - for (i = 0; i < n; i++, ptr2++) { - if (mask[i]) { - *ptr2 = pixel; - } - } -} - - -static void -write_rgba_pixels2( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - CONST GLchan rgba[][4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - GLushort *ptr2 = (GLushort *) PIXELADDR2(x[i],y[i]); - PACK_RGB_565(*ptr2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]); - } - } -} - -static void -write_monocolor_pixels2( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - const GLchan color[4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - GLushort pixel; - PACK_RGB_565(pixel, color[RCOMP], color[GCOMP], color[BCOMP]); - for (i = 0; i < n; i++) { - if (mask[i]) { - GLushort *ptr2 = (GLushort *) PIXELADDR2(x[i],y[i]); - *ptr2 = pixel; - } - } -} - -static void -read_rgba_span2( const GLcontext *ctx, - GLuint n, GLint x, GLint y, - GLchan rgba[][4] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - const GLushort *ptr2 = (const GLushort *) PIXELADDR2(x, y); - for (i = 0; i < n; i++, ptr2++) { - /* This should be fixed to get the low bits right */ - rgba[i][RCOMP] = (*ptr2 >> 8) & 0xFe; - rgba[i][GCOMP] = (*ptr2 >> 3) & 0xFc; - rgba[i][BCOMP] = (*ptr2 << 3) & 0xFe; - rgba[i][ACOMP] = 0; - } -} - -static void -read_rgba_pixels2( const GLcontext *ctx, - GLuint n, const GLint x[], const GLint y[], - GLchan rgba[][4], const GLubyte mask[] ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLuint i; - for (i = 0; i < n; i++) { - if (mask[i]) { - /* This should be fixed to get the low bits right */ - const GLushort *ptr2 = (const GLushort *) PIXELADDR2(x[i],y[i]); - rgba[i][RCOMP] = (*ptr2 >> 8) & 0xFE; - rgba[i][GCOMP] = (*ptr2 >> 3) & 0xFC; - rgba[i][BCOMP] = (*ptr2 << 3) & 0xFE; - rgba[i][ACOMP] = 0; - } - } -} - - - -/**********************************************************************/ -/***** Read/write spans/arrays of CI pixels *****/ -/**********************************************************************/ - -/* Write 32-bit color index to buffer */ -static void -write_index32_span( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLuint index[], const GLubyte mask[] ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - GLchan *ptr1 = PIXELADDR1(x, y); - GLuint i; - if (mask) { - for (i=0;icolor; - -#define INTERP_XY 1 -#define CLIP_HACK 1 -#define PLOT(X, Y) \ -do { \ - GLchan *p = PIXELADDR4(X, Y); \ - PACK_RGBA(p, color[0], color[1], color[2], color[3]); \ -} while (0) - -#ifdef WIN32 -#include "..\swrast\s_linetemp.h" -#else -#include "swrast/s_linetemp.h" -#endif -} - - -/* - * Draw a flat-shaded, Z-less, RGB line into an osmesa buffer. - */ -static void -flat_rgba_z_line(GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const GLchan *color = vert1->color; - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define CLIP_HACK 1 -#define PLOT(X, Y) \ -do { \ - if (Z < *zPtr) { \ - GLchan *p = PIXELADDR4(X, Y); \ - PACK_RGBA(p, color[RCOMP], color[GCOMP], \ - color[BCOMP], color[ACOMP]); \ - *zPtr = Z; \ - } \ -} while (0) - - -#ifdef WIN32 -#include "..\swrast\s_linetemp.h" -#else -#include "swrast/s_linetemp.h" -#endif -} - - -/* - * Draw a flat-shaded, alpha-blended, RGB line into an osmesa buffer. - * XXX update for GLchan - */ -static void -flat_blend_rgba_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const GLint rshift = osmesa->rshift; - const GLint gshift = osmesa->gshift; - const GLint bshift = osmesa->bshift; - const GLint avalue = vert0->color[3]; - const GLint msavalue = CHAN_MAX - avalue; - const GLint rvalue = vert1->color[0]*avalue; - const GLint gvalue = vert1->color[1]*avalue; - const GLint bvalue = vert1->color[2]*avalue; - -#define INTERP_XY 1 -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - { GLuint *ptr4 = (GLuint *) PIXELADDR4(X, Y); \ - GLuint pixel = 0; \ - pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift);\ - pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift);\ - pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift);\ - *ptr4 = pixel; \ - } - -#if 0 /* XXX use this in the future */ -#define PLOT(X,Y) \ - { \ - GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \ - pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \ - pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \ - pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \ - pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \ - } -#endif - -#ifdef WIN32 -#include "..\swrast\s_linetemp.h" -#else -#include "swrast/s_linetemp.h" -#endif -} - - -/* - * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer. - * But don't write to Z buffer. - * XXX update for GLchan - */ -static void -flat_blend_rgba_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const GLint rshift = osmesa->rshift; - const GLint gshift = osmesa->gshift; - const GLint bshift = osmesa->bshift; - const GLint avalue = vert0->color[3]; - const GLint msavalue = 256 - avalue; - const GLint rvalue = vert1->color[0]*avalue; - const GLint gvalue = vert1->color[1]*avalue; - const GLint bvalue = vert1->color[2]*avalue; - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - GLuint *ptr4 = (GLuint *) PIXELADDR4(X, Y); \ - GLuint pixel = 0; \ - pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift); \ - pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift); \ - pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift); \ - *ptr4 = pixel; \ - } - -#if 0 /* XXX use this in the future */ -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \ - pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \ - pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \ - pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \ - pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \ - } -#endif - -#ifdef WIN32 -#include "..\swrast\s_linetemp.h" -#else -#include "swrast/s_linetemp.h" -#endif -} - - -/* - * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer. - * XXX update for GLchan - */ -static void -flat_blend_rgba_z_line_write( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const GLint rshift = osmesa->rshift; - const GLint gshift = osmesa->gshift; - const GLint bshift = osmesa->bshift; - const GLint avalue = vert0->color[3]; - const GLint msavalue = 256 - avalue; - const GLint rvalue = vert1->color[0]*avalue; - const GLint gvalue = vert1->color[1]*avalue; - const GLint bvalue = vert1->color[2]*avalue; - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - GLuint *ptr4 = (GLuint *) PIXELADDR4(X, Y); \ - GLuint pixel = 0; \ - pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift); \ - pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift); \ - pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift); \ - *ptr4 = pixel; \ - *zPtr = Z; \ - } - -#if 0 /* XXX use this in the future */ -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \ - pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \ - pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \ - pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \ - pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \ - *zPtr = Z; \ - } -#endif - -#ifdef WIN32 -#include "..\swrast\s_linetemp.h" -#else -#include "swrast/s_linetemp.h" -#endif -} - - -/* - * Analyze context state to see if we can provide a fast line drawing - * function, like those in lines.c. Otherwise, return NULL. - */ -static swrast_line_func -osmesa_choose_line_function( GLcontext *ctx ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (CHAN_BITS != 8) return NULL; - if (ctx->RenderMode != GL_RENDER) return NULL; - if (ctx->Line.SmoothFlag) return NULL; - if (ctx->Texture._EnabledUnits) return NULL; - if (ctx->Light.ShadeModel != GL_FLAT) return NULL; - if (ctx->Line.Width != 1.0F) return NULL; - if (ctx->Line.StippleFlag) return NULL; - if (ctx->Line.SmoothFlag) return NULL; - if (osmesa->format != OSMESA_RGBA && - osmesa->format != OSMESA_BGRA && - osmesa->format != OSMESA_ARGB) return NULL; - - if (swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - return (swrast_line_func) flat_rgba_z_line; - } - - if (swrast->_RasterMask == 0) { - return (swrast_line_func) flat_rgba_line; - } - - if (swrast->_RasterMask==(DEPTH_BIT|BLEND_BIT) - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS - && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA - && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendSrcA==GL_SRC_ALPHA - && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) { - return (swrast_line_func) flat_blend_rgba_z_line_write; - } - - if (swrast->_RasterMask==(DEPTH_BIT|BLEND_BIT) - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_FALSE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS - && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA - && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendSrcA==GL_SRC_ALPHA - && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) { - return (swrast_line_func) flat_blend_rgba_z_line; - } - - if (swrast->_RasterMask==BLEND_BIT - && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA - && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendSrcA==GL_SRC_ALPHA - && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA - && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) { - return (swrast_line_func) flat_blend_rgba_line; - } - - return (swrast_line_func) NULL; -} - - -/**********************************************************************/ -/***** Optimized triangle rendering *****/ -/**********************************************************************/ - - -/* - * Smooth-shaded, z-less triangle, RGBA color. - */ -static void smooth_rgba_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define INTERP_ALPHA 1 -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLchan *img = PIXELADDR4(span.x, span.y); \ - for (i = 0; i < span.end; i++, img += 4) { \ - const GLdepth z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PACK_RGBA(img, FixedToChan(span.red), \ - FixedToChan(span.green), FixedToChan(span.blue), \ - FixedToChan(span.alpha)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.alpha += span.alphaStep; \ - span.z += span.zStep; \ - } - -#ifdef WIN32 -#include "..\swrast\s_tritemp.h" -#else -#include "swrast/s_tritemp.h" -#endif -} - - - - -/* - * Flat-shaded, z-less triangle, RGBA color. - */ -static void flat_rgba_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define SETUP_CODE \ - GLuint pixel; \ - PACK_RGBA((GLchan *) &pixel, v2->color[0], v2->color[1], \ - v2->color[2], v2->color[3]); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y); \ - for (i = 0; i < span.end; i++) { \ - const GLdepth z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - img[i] = pixel; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#ifdef WIN32 -#include "..\swrast\s_tritemp.h" -#else -#include "swrast/s_tritemp.h" -#endif -} - - - -/* - * Return pointer to an accelerated triangle function if possible. - */ -static swrast_tri_func -osmesa_choose_triangle_function( GLcontext *ctx ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (CHAN_BITS != 8) return (swrast_tri_func) NULL; - if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; - if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; - if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL; - if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL; - if (osmesa->format != OSMESA_RGBA && - osmesa->format != OSMESA_BGRA && - osmesa->format != OSMESA_ARGB) return (swrast_tri_func) NULL; - if (ctx->Polygon.CullFlag && - ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) - return (swrast_tri_func) NULL; - - if (swrast->_RasterMask == DEPTH_BIT && - ctx->Depth.Func == GL_LESS && - ctx->Depth.Mask == GL_TRUE && - ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - if (ctx->Light.ShadeModel == GL_SMOOTH) { - return (swrast_tri_func) smooth_rgba_z_triangle; - } - else { - return (swrast_tri_func) flat_rgba_z_triangle; - } - } - return (swrast_tri_func) NULL; -} - - - -/* Override for the swrast triangle-selection function. Try to use one - * of our internal triangle functions, otherwise fall back to the - * standard swrast functions. - */ -static void osmesa_choose_triangle( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - swrast->Triangle = osmesa_choose_triangle_function( ctx ); - if (!swrast->Triangle) - _swrast_choose_triangle( ctx ); -} - -static void osmesa_choose_line( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - swrast->Line = osmesa_choose_line_function( ctx ); - if (!swrast->Line) - _swrast_choose_line( ctx ); -} - - -#define OSMESA_NEW_LINE (_NEW_LINE | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - -#define OSMESA_NEW_TRIANGLE (_NEW_POLYGON | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - - -/* Extend the software rasterizer with our line and triangle - * functions. - */ -static void osmesa_register_swrast_functions( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT( ctx ); - - swrast->choose_line = osmesa_choose_line; - swrast->choose_triangle = osmesa_choose_triangle; - - swrast->invalidate_line |= OSMESA_NEW_LINE; - swrast->invalidate_triangle |= OSMESA_NEW_TRIANGLE; -} - - -static const GLubyte *get_string( GLcontext *ctx, GLenum name ) -{ - (void) ctx; - switch (name) { - case GL_RENDERER: -#if CHAN_BITS == 32 - return (const GLubyte *) "Mesa OffScreen32"; -#elif CHAN_BITS == 16 - return (const GLubyte *) "Mesa OffScreen16"; -#else - return (const GLubyte *) "Mesa OffScreen"; -#endif - default: - return NULL; - } -} - - -static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) -{ - OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx ); - TNLcontext *tnl = TNL_CONTEXT(ctx); - - ASSERT((void *) osmesa == (void *) ctx->DriverCtx); - - /* - * XXX these function pointers could be initialized just once during - * context creation since they don't depend on any state changes. - */ - - ctx->Driver.GetString = get_string; - ctx->Driver.UpdateState = osmesa_update_state; - ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; - ctx->Driver.GetBufferSize = buffer_size; - - ctx->Driver.Accum = _swrast_Accum; - ctx->Driver.Bitmap = _swrast_Bitmap; - ctx->Driver.Clear = clear; - ctx->Driver.CopyPixels = _swrast_CopyPixels; - ctx->Driver.DrawPixels = _swrast_DrawPixels; - ctx->Driver.ReadPixels = _swrast_ReadPixels; - ctx->Driver.DrawBuffer = _swrast_DrawBuffer; - - ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; - ctx->Driver.TexImage1D = _mesa_store_teximage1d; - ctx->Driver.TexImage2D = _mesa_store_teximage2d; - ctx->Driver.TexImage3D = _mesa_store_teximage3d; - ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; - ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d; - ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; - ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; - - ctx->Driver.CompressedTexImage1D = _mesa_store_compressed_teximage1d; - ctx->Driver.CompressedTexImage2D = _mesa_store_compressed_teximage2d; - ctx->Driver.CompressedTexImage3D = _mesa_store_compressed_teximage3d; - ctx->Driver.CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; - ctx->Driver.CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; - ctx->Driver.CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; - - ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; - ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; - ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; - ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; - ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; - ctx->Driver.CopyColorTable = _swrast_CopyColorTable; - ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; - ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; - ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; - - swdd->SetBuffer = set_buffer; - - /* RGB(A) span/pixel functions */ - if (osmesa->format == OSMESA_RGB) { - swdd->WriteRGBASpan = write_rgba_span_RGB; - swdd->WriteRGBSpan = write_rgb_span_RGB; - swdd->WriteMonoRGBASpan = write_monocolor_span_RGB; - swdd->WriteRGBAPixels = write_rgba_pixels_RGB; - swdd->WriteMonoRGBAPixels = write_monocolor_pixels_RGB; - swdd->ReadRGBASpan = read_rgba_span3; - swdd->ReadRGBAPixels = read_rgba_pixels3; - } - else if (osmesa->format == OSMESA_BGR) { - swdd->WriteRGBASpan = write_rgba_span_BGR; - swdd->WriteRGBSpan = write_rgb_span_BGR; - swdd->WriteMonoRGBASpan = write_monocolor_span_BGR; - swdd->WriteRGBAPixels = write_rgba_pixels_BGR; - swdd->WriteMonoRGBAPixels = write_monocolor_pixels_BGR; - swdd->ReadRGBASpan = read_rgba_span3; - swdd->ReadRGBAPixels = read_rgba_pixels3; - } - else if (osmesa->format == OSMESA_RGB_565) { - swdd->WriteRGBASpan = write_rgba_span2; - swdd->WriteRGBSpan = write_rgb_span2; - swdd->WriteMonoRGBASpan = write_monocolor_span2; - swdd->WriteRGBAPixels = write_rgba_pixels2; - swdd->WriteMonoRGBAPixels = write_monocolor_pixels2; - swdd->ReadRGBASpan = read_rgba_span2; - swdd->ReadRGBAPixels = read_rgba_pixels2; - } - else { - /* 4 GLchan / pixel in frame buffer */ - swdd->WriteRGBSpan = write_rgb_span; - swdd->WriteRGBAPixels = write_rgba_pixels; - swdd->WriteMonoRGBASpan = write_monocolor_span; - swdd->WriteMonoRGBAPixels = write_monocolor_pixels; - if (osmesa->format == OSMESA_RGBA && - CHAN_TYPE == GL_UNSIGNED_BYTE && - RCOMP==0 && GCOMP==1 && BCOMP==2 && ACOMP==3) { - /* special, fast case */ - swdd->WriteRGBASpan = write_rgba_span_rgba; - swdd->ReadRGBASpan = read_rgba_span_rgba; - } - else { - swdd->WriteRGBASpan = write_rgba_span; - swdd->ReadRGBASpan = read_rgba_span; - } - swdd->ReadRGBAPixels = read_rgba_pixels; - } - - /* CI span/pixel functions */ - swdd->WriteCI32Span = write_index32_span; - swdd->WriteCI8Span = write_index8_span; - swdd->WriteMonoCISpan = write_monoindex_span; - swdd->WriteCI32Pixels = write_index_pixels; - swdd->WriteMonoCIPixels = write_monoindex_pixels; - swdd->ReadCI32Span = read_index_span; - swdd->ReadCI32Pixels = read_index_pixels; - - tnl->Driver.RunPipeline = _tnl_run_pipeline; - - _swrast_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); -} Index: xc/extras/Mesa/src/SPARC/clip.S diff -u xc/extras/Mesa/src/SPARC/clip.S:1.3 xc/extras/Mesa/src/SPARC/clip.S:removed --- xc/extras/Mesa/src/SPARC/clip.S:1.3 Tue Dec 2 15:27:34 2003 +++ xc/extras/Mesa/src/SPARC/clip.S Wed Mar 16 21:00:43 2005 @@ -1,238 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/SPARC/clip.S,v 1.3 2003/12/02 20:27:34 dawes Exp $ */ - -#if defined(__sparc_v9__) && !defined(__linux__) -#define SPARC_64BIT_ADDR -#endif - -#ifdef SPARC_64BIT_ADDR -#define LDPTR ldx -#define V4F_DATA 0x00 -#define V4F_START 0x08 -#define V4F_COUNT 0x10 -#define V4F_STRIDE 0x14 -#define V4F_SIZE 0x18 -#define V4F_FLAGS 0x1c -#else -#define LDPTR ld -#define V4F_DATA 0x00 -#define V4F_START 0x04 -#define V4F_COUNT 0x08 -#define V4F_STRIDE 0x0c -#define V4F_SIZE 0x10 -#define V4F_FLAGS 0x14 -#endif - -#define VEC_SIZE_1 1 -#define VEC_SIZE_2 3 -#define VEC_SIZE_3 7 -#define VEC_SIZE_4 15 - - .text - .align 64 - -one_dot_zero: - .word 0x3f800000 /* 1.0f */ - - /* This trick is shamelessly stolen from the x86 - * Mesa asm. Very clever, and we can do it too - * since we have the necessary add with carry - * instructions on Sparc. - */ -clip_table: - .byte 0, 1, 0, 2, 4, 5, 4, 6 - .byte 0, 1, 0, 2, 8, 9, 8, 10 - .byte 32, 33, 32, 34, 36, 37, 36, 38 - .byte 32, 33, 32, 34, 40, 41, 40, 42 - .byte 0, 1, 0, 2, 4, 5, 4, 6 - .byte 0, 1, 0, 2, 8, 9, 8, 10 - .byte 16, 17, 16, 18, 20, 21, 20, 22 - .byte 16, 17, 16, 18, 24, 25, 24, 26 - .byte 63, 61, 63, 62, 55, 53, 55, 54 - .byte 63, 61, 63, 62, 59, 57, 59, 58 - .byte 47, 45, 47, 46, 39, 37, 39, 38 - .byte 47, 45, 47, 46, 43, 41, 43, 42 - .byte 63, 61, 63, 62, 55, 53, 55, 54 - .byte 63, 61, 63, 62, 59, 57, 59, 58 - .byte 31, 29, 31, 30, 23, 21, 23, 22 - .byte 31, 29, 31, 30, 27, 25, 27, 26 - -/* GLvector4f *clip_vec, GLvector4f *proj_vec, - GLubyte clipMask[], GLubyte *orMask, GLubyte *andMask */ - - .align 64 -__pc_tramp: - retl - nop - - .globl _mesa_sparc_cliptest_points4 -_mesa_sparc_cliptest_points4: - save %sp, -64, %sp - call __pc_tramp - sub %o7, (. - one_dot_zero - 4), %g1 - ld [%g1 + 0x0], %f4 - add %g1, 0x4, %g1 - - ld [%i0 + V4F_STRIDE], %l1 - ld [%i0 + V4F_COUNT], %g7 - LDPTR [%i0 + V4F_START], %i0 - LDPTR [%i1 + V4F_START], %i5 - ldub [%i3], %g2 - ldub [%i4], %g3 - sll %g3, 8, %g3 - or %g2, %g3, %g2 - - ld [%i1 + V4F_FLAGS], %g3 - or %g3, VEC_SIZE_4, %g3 - st %g3, [%i1 + V4F_FLAGS] - mov 3, %g3 - st %g3, [%i1 + V4F_SIZE] - st %g7, [%i1 + V4F_COUNT] - clr %l2 - clr %l0 - - /* l0: i - * g7: count - * l1: stride - * l2: c - * g2: (tmpAndMask << 8) | tmpOrMask - * g1: clip_table - * i0: from[stride][i] - * i2: clipMask - * i5: vProj[4][i] - */ - -1: ld [%i0 + 0x0c], %f3 ! LSU Group - ld [%i0 + 0x0c], %g5 ! LSU Group - ld [%i0 + 0x08], %g4 ! LSU Group - fdivs %f4, %f3, %f8 ! FGM - addcc %g5, %g5, %g5 ! IEU1 Group - addx %g0, 0x0, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - ld [%i0 + 0x04], %g4 ! LSU Group - addx %g3, %g3, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - ld [%i0 + 0x00], %g4 ! LSU Group - addx %g3, %g3, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - ldub [%g1 + %g3], %g3 ! LSU Group - cmp %g3, 0 ! IEU1 Group, stall - be 2f ! CTI - stb %g3, [%i2] ! LSU - sll %g3, 8, %g4 ! IEU1 Group - add %l2, 1, %l2 ! IEU0 - st %g0, [%i5 + 0x00] ! LSU - or %g4, 0xff, %g4 ! IEU0 Group - or %g2, %g3, %g2 ! IEU1 - st %g0, [%i5 + 0x04] ! LSU - and %g2, %g4, %g2 ! IEU0 Group - st %g0, [%i5 + 0x08] ! LSU - b 3f ! CTI - st %f4, [%i5 + 0x0c] ! LSU Group -2: ld [%i0 + 0x00], %f0 ! LSU Group - ld [%i0 + 0x04], %f1 ! LSU Group - ld [%i0 + 0x08], %f2 ! LSU Group - fmuls %f0, %f8, %f0 ! FGM - st %f0, [%i5 + 0x00] ! LSU Group - fmuls %f1, %f8, %f1 ! FGM - st %f1, [%i5 + 0x04] ! LSU Group - fmuls %f2, %f8, %f2 ! FGM - st %f2, [%i5 + 0x08] ! LSU Group - st %f8, [%i5 + 0x0c] ! LSU Group -3: add %i5, 0x10, %i5 ! IEU1 - add %l0, 1, %l0 ! IEU0 Group - add %i2, 1, %i2 ! IEU0 Group - cmp %l0, %g7 ! IEU1 Group - bne 1b ! CTI - add %i0, %l1, %i0 ! IEU0 Group - stb %g2, [%i3] ! LSU - srl %g2, 8, %g3 ! IEU0 Group - cmp %l2, %g7 ! IEU1 Group - bl,a 1f ! CTI - clr %g3 ! IEU0 -1: stb %g3, [%i4] ! LSU Group - ret ! CTI Group - restore %i1, 0x0, %o0 - - .globl _mesa_sparc_cliptest_points4_np -_mesa_sparc_cliptest_points4_np: - save %sp, -64, %sp - - call __pc_tramp - sub %o7, (. - one_dot_zero - 4), %g1 - add %g1, 0x4, %g1 - - ld [%i0 + V4F_STRIDE], %l1 - ld [%i0 + V4F_COUNT], %g7 - LDPTR [%i0 + V4F_START], %i0 - LDPTR [%i1 + V4F_START], %i5 - ldub [%i3], %g2 - ldub [%i4], %g3 - sll %g3, 8, %g3 - or %g2, %g3, %g2 - - ld [%i1 + V4F_FLAGS], %g3 - or %g3, VEC_SIZE_4, %g3 - st %g3, [%i1 + V4F_FLAGS] - mov 3, %g3 - st %g3, [%i1 + V4F_SIZE] - st %g7, [%i1 + V4F_COUNT] - clr %l2 - clr %l0 - - /* l0: i - * g7: count - * l1: stride - * l2: c - * g2: (tmpAndMask << 8) | tmpOrMask - * g1: clip_table - * i0: from[stride][i] - * i2: clipMask - */ - -1: ld [%i0 + 0x0c], %g5 ! LSU Group - ld [%i0 + 0x08], %g4 ! LSU Group - addcc %g5, %g5, %g5 ! IEU1 Group - addx %g0, 0x0, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - ld [%i0 + 0x04], %g4 ! LSU Group - addx %g3, %g3, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - ld [%i0 + 0x00], %g4 ! LSU Group - addx %g3, %g3, %g3 ! IEU1 Group - addcc %g4, %g4, %g4 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - subcc %g5, %g4, %g0 ! IEU1 Group - addx %g3, %g3, %g3 ! IEU1 Group - ldub [%g1 + %g3], %g3 ! LSU Group - cmp %g3, 0 ! IEU1 Group, stall - be 2f ! CTI - stb %g3, [%i2] ! LSU - sll %g3, 8, %g4 ! IEU1 Group - add %l2, 1, %l2 ! IEU0 - or %g4, 0xff, %g4 ! IEU0 Group - or %g2, %g3, %g2 ! IEU1 - and %g2, %g4, %g2 ! IEU0 Group -2: add %l0, 1, %l0 ! IEU0 Group - add %i2, 1, %i2 ! IEU0 Group - cmp %l0, %g7 ! IEU1 Group - bne 1b ! CTI - add %i0, %l1, %i0 ! IEU0 Group - stb %g2, [%i3] ! LSU - srl %g2, 8, %g3 ! IEU0 Group - cmp %l2, %g7 ! IEU1 Group - bl,a 1f ! CTI - clr %g3 ! IEU0 -1: stb %g3, [%i4] ! LSU Group - ret ! CTI Group - restore %i1, 0x0, %o0 Index: xc/extras/Mesa/src/SPARC/glapi_sparc.S diff -u xc/extras/Mesa/src/SPARC/glapi_sparc.S:1.3 xc/extras/Mesa/src/SPARC/glapi_sparc.S:removed --- xc/extras/Mesa/src/SPARC/glapi_sparc.S:1.3 Tue Dec 2 15:27:34 2003 +++ xc/extras/Mesa/src/SPARC/glapi_sparc.S Wed Mar 16 21:00:44 2005 @@ -1,16961 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/SPARC/glapi_sparc.S,v 1.3 2003/12/02 20:27:34 dawes Exp $ */ - -/* DO NOT EDIT - This file generated automatically with glsparcasm.py script */ -#include "../glapioffsets.h" - -/* The _glapi_Dispatch symbol addresses get relocated into the - * sethi/or instruction sequences below at library init time. - */ - - -#if defined(__sparc_v9__) && !defined(__linux__) -#define SPARC_64BIT_ADDR -#endif - - -.text -.align 32 -.globl __glapi_sparc_icache_flush -__glapi_sparc_icache_flush: /* %o0 = insn_addr */ - flush %o0 - retl - nop - -.data -.align 64 - -.globl _mesa_sparc_glapi_begin -.type _mesa_sparc_glapi_begin,#function -_mesa_sparc_glapi_begin: - -.globl glNewList -.type glNewList,#function -glNewList: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_NewList), %g2 - or %g2, %lo(8 * _gloffset_NewList), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_NewList)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEndList -.type glEndList,#function -glEndList: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EndList), %g2 - or %g2, %lo(8 * _gloffset_EndList), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EndList)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCallList -.type glCallList,#function -glCallList: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CallList), %g2 - or %g2, %lo(8 * _gloffset_CallList), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CallList)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCallLists -.type glCallLists,#function -glCallLists: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CallLists), %g2 - or %g2, %lo(8 * _gloffset_CallLists), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CallLists)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDeleteLists -.type glDeleteLists,#function -glDeleteLists: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DeleteLists), %g2 - or %g2, %lo(8 * _gloffset_DeleteLists), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DeleteLists)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGenLists -.type glGenLists,#function -glGenLists: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GenLists), %g2 - or %g2, %lo(8 * _gloffset_GenLists), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GenLists)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glListBase -.type glListBase,#function -glListBase: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ListBase), %g2 - or %g2, %lo(8 * _gloffset_ListBase), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ListBase)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBegin -.type glBegin,#function -glBegin: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Begin), %g2 - or %g2, %lo(8 * _gloffset_Begin), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Begin)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBitmap -.type glBitmap,#function -glBitmap: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Bitmap), %g2 - or %g2, %lo(8 * _gloffset_Bitmap), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Bitmap)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3b -.type glColor3b,#function -glColor3b: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3b), %g2 - or %g2, %lo(8 * _gloffset_Color3b), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3b)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3bv -.type glColor3bv,#function -glColor3bv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3bv), %g2 - or %g2, %lo(8 * _gloffset_Color3bv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3bv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3d -.type glColor3d,#function -glColor3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3d), %g2 - or %g2, %lo(8 * _gloffset_Color3d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3dv -.type glColor3dv,#function -glColor3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3dv), %g2 - or %g2, %lo(8 * _gloffset_Color3dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3f -.type glColor3f,#function -glColor3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3f), %g2 - or %g2, %lo(8 * _gloffset_Color3f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3fv -.type glColor3fv,#function -glColor3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3fv), %g2 - or %g2, %lo(8 * _gloffset_Color3fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3i -.type glColor3i,#function -glColor3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3i), %g2 - or %g2, %lo(8 * _gloffset_Color3i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3iv -.type glColor3iv,#function -glColor3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3iv), %g2 - or %g2, %lo(8 * _gloffset_Color3iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3s -.type glColor3s,#function -glColor3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3s), %g2 - or %g2, %lo(8 * _gloffset_Color3s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3sv -.type glColor3sv,#function -glColor3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3sv), %g2 - or %g2, %lo(8 * _gloffset_Color3sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3ub -.type glColor3ub,#function -glColor3ub: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3ub), %g2 - or %g2, %lo(8 * _gloffset_Color3ub), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3ub)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3ubv -.type glColor3ubv,#function -glColor3ubv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3ubv), %g2 - or %g2, %lo(8 * _gloffset_Color3ubv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3ubv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3ui -.type glColor3ui,#function -glColor3ui: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3ui), %g2 - or %g2, %lo(8 * _gloffset_Color3ui), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3ui)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3uiv -.type glColor3uiv,#function -glColor3uiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3uiv), %g2 - or %g2, %lo(8 * _gloffset_Color3uiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3uiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3us -.type glColor3us,#function -glColor3us: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3us), %g2 - or %g2, %lo(8 * _gloffset_Color3us), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3us)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor3usv -.type glColor3usv,#function -glColor3usv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color3usv), %g2 - or %g2, %lo(8 * _gloffset_Color3usv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color3usv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4b -.type glColor4b,#function -glColor4b: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4b), %g2 - or %g2, %lo(8 * _gloffset_Color4b), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4b)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4bv -.type glColor4bv,#function -glColor4bv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4bv), %g2 - or %g2, %lo(8 * _gloffset_Color4bv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4bv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4d -.type glColor4d,#function -glColor4d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4d), %g2 - or %g2, %lo(8 * _gloffset_Color4d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4dv -.type glColor4dv,#function -glColor4dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4dv), %g2 - or %g2, %lo(8 * _gloffset_Color4dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4f -.type glColor4f,#function -glColor4f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4f), %g2 - or %g2, %lo(8 * _gloffset_Color4f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4fv -.type glColor4fv,#function -glColor4fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4fv), %g2 - or %g2, %lo(8 * _gloffset_Color4fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4i -.type glColor4i,#function -glColor4i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4i), %g2 - or %g2, %lo(8 * _gloffset_Color4i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4iv -.type glColor4iv,#function -glColor4iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4iv), %g2 - or %g2, %lo(8 * _gloffset_Color4iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4s -.type glColor4s,#function -glColor4s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4s), %g2 - or %g2, %lo(8 * _gloffset_Color4s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4sv -.type glColor4sv,#function -glColor4sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4sv), %g2 - or %g2, %lo(8 * _gloffset_Color4sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4ub -.type glColor4ub,#function -glColor4ub: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4ub), %g2 - or %g2, %lo(8 * _gloffset_Color4ub), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4ub)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4ubv -.type glColor4ubv,#function -glColor4ubv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4ubv), %g2 - or %g2, %lo(8 * _gloffset_Color4ubv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4ubv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4ui -.type glColor4ui,#function -glColor4ui: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4ui), %g2 - or %g2, %lo(8 * _gloffset_Color4ui), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4ui)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4uiv -.type glColor4uiv,#function -glColor4uiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4uiv), %g2 - or %g2, %lo(8 * _gloffset_Color4uiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4uiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4us -.type glColor4us,#function -glColor4us: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4us), %g2 - or %g2, %lo(8 * _gloffset_Color4us), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4us)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColor4usv -.type glColor4usv,#function -glColor4usv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Color4usv), %g2 - or %g2, %lo(8 * _gloffset_Color4usv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Color4usv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEdgeFlag -.type glEdgeFlag,#function -glEdgeFlag: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EdgeFlag), %g2 - or %g2, %lo(8 * _gloffset_EdgeFlag), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EdgeFlag)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEdgeFlagv -.type glEdgeFlagv,#function -glEdgeFlagv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EdgeFlagv), %g2 - or %g2, %lo(8 * _gloffset_EdgeFlagv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EdgeFlagv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEnd -.type glEnd,#function -glEnd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_End), %g2 - or %g2, %lo(8 * _gloffset_End), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_End)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexd -.type glIndexd,#function -glIndexd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexd), %g2 - or %g2, %lo(8 * _gloffset_Indexd), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexd)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexdv -.type glIndexdv,#function -glIndexdv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexdv), %g2 - or %g2, %lo(8 * _gloffset_Indexdv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexdv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexf -.type glIndexf,#function -glIndexf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexf), %g2 - or %g2, %lo(8 * _gloffset_Indexf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexfv -.type glIndexfv,#function -glIndexfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexfv), %g2 - or %g2, %lo(8 * _gloffset_Indexfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexi -.type glIndexi,#function -glIndexi: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexi), %g2 - or %g2, %lo(8 * _gloffset_Indexi), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexi)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexiv -.type glIndexiv,#function -glIndexiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexiv), %g2 - or %g2, %lo(8 * _gloffset_Indexiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexs -.type glIndexs,#function -glIndexs: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexs), %g2 - or %g2, %lo(8 * _gloffset_Indexs), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexs)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexsv -.type glIndexsv,#function -glIndexsv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexsv), %g2 - or %g2, %lo(8 * _gloffset_Indexsv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexsv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3b -.type glNormal3b,#function -glNormal3b: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3b), %g2 - or %g2, %lo(8 * _gloffset_Normal3b), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3b)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3bv -.type glNormal3bv,#function -glNormal3bv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3bv), %g2 - or %g2, %lo(8 * _gloffset_Normal3bv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3bv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3d -.type glNormal3d,#function -glNormal3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3d), %g2 - or %g2, %lo(8 * _gloffset_Normal3d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3dv -.type glNormal3dv,#function -glNormal3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3dv), %g2 - or %g2, %lo(8 * _gloffset_Normal3dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3f -.type glNormal3f,#function -glNormal3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3f), %g2 - or %g2, %lo(8 * _gloffset_Normal3f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3fv -.type glNormal3fv,#function -glNormal3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3fv), %g2 - or %g2, %lo(8 * _gloffset_Normal3fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3i -.type glNormal3i,#function -glNormal3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3i), %g2 - or %g2, %lo(8 * _gloffset_Normal3i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3iv -.type glNormal3iv,#function -glNormal3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3iv), %g2 - or %g2, %lo(8 * _gloffset_Normal3iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3s -.type glNormal3s,#function -glNormal3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3s), %g2 - or %g2, %lo(8 * _gloffset_Normal3s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormal3sv -.type glNormal3sv,#function -glNormal3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Normal3sv), %g2 - or %g2, %lo(8 * _gloffset_Normal3sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Normal3sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2d -.type glRasterPos2d,#function -glRasterPos2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2d), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2dv -.type glRasterPos2dv,#function -glRasterPos2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2dv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2f -.type glRasterPos2f,#function -glRasterPos2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2f), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2fv -.type glRasterPos2fv,#function -glRasterPos2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2fv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2i -.type glRasterPos2i,#function -glRasterPos2i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2i), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2iv -.type glRasterPos2iv,#function -glRasterPos2iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2iv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2s -.type glRasterPos2s,#function -glRasterPos2s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2s), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos2sv -.type glRasterPos2sv,#function -glRasterPos2sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos2sv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos2sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos2sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3d -.type glRasterPos3d,#function -glRasterPos3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3d), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3dv -.type glRasterPos3dv,#function -glRasterPos3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3dv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3f -.type glRasterPos3f,#function -glRasterPos3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3f), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3fv -.type glRasterPos3fv,#function -glRasterPos3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3fv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3i -.type glRasterPos3i,#function -glRasterPos3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3i), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3iv -.type glRasterPos3iv,#function -glRasterPos3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3iv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3s -.type glRasterPos3s,#function -glRasterPos3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3s), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos3sv -.type glRasterPos3sv,#function -glRasterPos3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos3sv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos3sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos3sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4d -.type glRasterPos4d,#function -glRasterPos4d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4d), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4dv -.type glRasterPos4dv,#function -glRasterPos4dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4dv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4f -.type glRasterPos4f,#function -glRasterPos4f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4f), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4fv -.type glRasterPos4fv,#function -glRasterPos4fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4fv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4i -.type glRasterPos4i,#function -glRasterPos4i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4i), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4iv -.type glRasterPos4iv,#function -glRasterPos4iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4iv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4s -.type glRasterPos4s,#function -glRasterPos4s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4s), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRasterPos4sv -.type glRasterPos4sv,#function -glRasterPos4sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RasterPos4sv), %g2 - or %g2, %lo(8 * _gloffset_RasterPos4sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RasterPos4sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectd -.type glRectd,#function -glRectd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectd), %g2 - or %g2, %lo(8 * _gloffset_Rectd), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectd)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectdv -.type glRectdv,#function -glRectdv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectdv), %g2 - or %g2, %lo(8 * _gloffset_Rectdv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectdv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectf -.type glRectf,#function -glRectf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectf), %g2 - or %g2, %lo(8 * _gloffset_Rectf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectfv -.type glRectfv,#function -glRectfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectfv), %g2 - or %g2, %lo(8 * _gloffset_Rectfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRecti -.type glRecti,#function -glRecti: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Recti), %g2 - or %g2, %lo(8 * _gloffset_Recti), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Recti)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectiv -.type glRectiv,#function -glRectiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectiv), %g2 - or %g2, %lo(8 * _gloffset_Rectiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRects -.type glRects,#function -glRects: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rects), %g2 - or %g2, %lo(8 * _gloffset_Rects), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rects)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRectsv -.type glRectsv,#function -glRectsv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rectsv), %g2 - or %g2, %lo(8 * _gloffset_Rectsv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rectsv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1d -.type glTexCoord1d,#function -glTexCoord1d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1d), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1dv -.type glTexCoord1dv,#function -glTexCoord1dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1dv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1f -.type glTexCoord1f,#function -glTexCoord1f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1f), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1fv -.type glTexCoord1fv,#function -glTexCoord1fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1fv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1i -.type glTexCoord1i,#function -glTexCoord1i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1i), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1iv -.type glTexCoord1iv,#function -glTexCoord1iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1iv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1s -.type glTexCoord1s,#function -glTexCoord1s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1s), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord1sv -.type glTexCoord1sv,#function -glTexCoord1sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord1sv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord1sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord1sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2d -.type glTexCoord2d,#function -glTexCoord2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2d), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2dv -.type glTexCoord2dv,#function -glTexCoord2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2dv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2f -.type glTexCoord2f,#function -glTexCoord2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2f), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2fv -.type glTexCoord2fv,#function -glTexCoord2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2fv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2i -.type glTexCoord2i,#function -glTexCoord2i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2i), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2iv -.type glTexCoord2iv,#function -glTexCoord2iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2iv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2s -.type glTexCoord2s,#function -glTexCoord2s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2s), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord2sv -.type glTexCoord2sv,#function -glTexCoord2sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord2sv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord2sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord2sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3d -.type glTexCoord3d,#function -glTexCoord3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3d), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3dv -.type glTexCoord3dv,#function -glTexCoord3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3dv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3f -.type glTexCoord3f,#function -glTexCoord3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3f), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3fv -.type glTexCoord3fv,#function -glTexCoord3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3fv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3i -.type glTexCoord3i,#function -glTexCoord3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3i), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3iv -.type glTexCoord3iv,#function -glTexCoord3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3iv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3s -.type glTexCoord3s,#function -glTexCoord3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3s), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord3sv -.type glTexCoord3sv,#function -glTexCoord3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord3sv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord3sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord3sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4d -.type glTexCoord4d,#function -glTexCoord4d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4d), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4dv -.type glTexCoord4dv,#function -glTexCoord4dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4dv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4f -.type glTexCoord4f,#function -glTexCoord4f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4f), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4fv -.type glTexCoord4fv,#function -glTexCoord4fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4fv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4i -.type glTexCoord4i,#function -glTexCoord4i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4i), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4iv -.type glTexCoord4iv,#function -glTexCoord4iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4iv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4s -.type glTexCoord4s,#function -glTexCoord4s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4s), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoord4sv -.type glTexCoord4sv,#function -glTexCoord4sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoord4sv), %g2 - or %g2, %lo(8 * _gloffset_TexCoord4sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoord4sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2d -.type glVertex2d,#function -glVertex2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2d), %g2 - or %g2, %lo(8 * _gloffset_Vertex2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2dv -.type glVertex2dv,#function -glVertex2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2dv), %g2 - or %g2, %lo(8 * _gloffset_Vertex2dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2f -.type glVertex2f,#function -glVertex2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2f), %g2 - or %g2, %lo(8 * _gloffset_Vertex2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2fv -.type glVertex2fv,#function -glVertex2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2fv), %g2 - or %g2, %lo(8 * _gloffset_Vertex2fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2i -.type glVertex2i,#function -glVertex2i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2i), %g2 - or %g2, %lo(8 * _gloffset_Vertex2i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2iv -.type glVertex2iv,#function -glVertex2iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2iv), %g2 - or %g2, %lo(8 * _gloffset_Vertex2iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2s -.type glVertex2s,#function -glVertex2s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2s), %g2 - or %g2, %lo(8 * _gloffset_Vertex2s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex2sv -.type glVertex2sv,#function -glVertex2sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex2sv), %g2 - or %g2, %lo(8 * _gloffset_Vertex2sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex2sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3d -.type glVertex3d,#function -glVertex3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3d), %g2 - or %g2, %lo(8 * _gloffset_Vertex3d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3dv -.type glVertex3dv,#function -glVertex3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3dv), %g2 - or %g2, %lo(8 * _gloffset_Vertex3dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3f -.type glVertex3f,#function -glVertex3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3f), %g2 - or %g2, %lo(8 * _gloffset_Vertex3f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3fv -.type glVertex3fv,#function -glVertex3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3fv), %g2 - or %g2, %lo(8 * _gloffset_Vertex3fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3i -.type glVertex3i,#function -glVertex3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3i), %g2 - or %g2, %lo(8 * _gloffset_Vertex3i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3iv -.type glVertex3iv,#function -glVertex3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3iv), %g2 - or %g2, %lo(8 * _gloffset_Vertex3iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3s -.type glVertex3s,#function -glVertex3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3s), %g2 - or %g2, %lo(8 * _gloffset_Vertex3s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex3sv -.type glVertex3sv,#function -glVertex3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex3sv), %g2 - or %g2, %lo(8 * _gloffset_Vertex3sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex3sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4d -.type glVertex4d,#function -glVertex4d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4d), %g2 - or %g2, %lo(8 * _gloffset_Vertex4d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4dv -.type glVertex4dv,#function -glVertex4dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4dv), %g2 - or %g2, %lo(8 * _gloffset_Vertex4dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4f -.type glVertex4f,#function -glVertex4f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4f), %g2 - or %g2, %lo(8 * _gloffset_Vertex4f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4fv -.type glVertex4fv,#function -glVertex4fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4fv), %g2 - or %g2, %lo(8 * _gloffset_Vertex4fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4i -.type glVertex4i,#function -glVertex4i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4i), %g2 - or %g2, %lo(8 * _gloffset_Vertex4i), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4i)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4iv -.type glVertex4iv,#function -glVertex4iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4iv), %g2 - or %g2, %lo(8 * _gloffset_Vertex4iv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4iv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4s -.type glVertex4s,#function -glVertex4s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4s), %g2 - or %g2, %lo(8 * _gloffset_Vertex4s), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4s)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertex4sv -.type glVertex4sv,#function -glVertex4sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Vertex4sv), %g2 - or %g2, %lo(8 * _gloffset_Vertex4sv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Vertex4sv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClipPlane -.type glClipPlane,#function -glClipPlane: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClipPlane), %g2 - or %g2, %lo(8 * _gloffset_ClipPlane), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClipPlane)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorMaterial -.type glColorMaterial,#function -glColorMaterial: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorMaterial), %g2 - or %g2, %lo(8 * _gloffset_ColorMaterial), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorMaterial)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCullFace -.type glCullFace,#function -glCullFace: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CullFace), %g2 - or %g2, %lo(8 * _gloffset_CullFace), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CullFace)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogf -.type glFogf,#function -glFogf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Fogf), %g2 - or %g2, %lo(8 * _gloffset_Fogf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Fogf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogfv -.type glFogfv,#function -glFogfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Fogfv), %g2 - or %g2, %lo(8 * _gloffset_Fogfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Fogfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogi -.type glFogi,#function -glFogi: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Fogi), %g2 - or %g2, %lo(8 * _gloffset_Fogi), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Fogi)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogiv -.type glFogiv,#function -glFogiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Fogiv), %g2 - or %g2, %lo(8 * _gloffset_Fogiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Fogiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFrontFace -.type glFrontFace,#function -glFrontFace: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FrontFace), %g2 - or %g2, %lo(8 * _gloffset_FrontFace), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FrontFace)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glHint -.type glHint,#function -glHint: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Hint), %g2 - or %g2, %lo(8 * _gloffset_Hint), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Hint)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightf -.type glLightf,#function -glLightf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Lightf), %g2 - or %g2, %lo(8 * _gloffset_Lightf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Lightf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightfv -.type glLightfv,#function -glLightfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Lightfv), %g2 - or %g2, %lo(8 * _gloffset_Lightfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Lightfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLighti -.type glLighti,#function -glLighti: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Lighti), %g2 - or %g2, %lo(8 * _gloffset_Lighti), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Lighti)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightiv -.type glLightiv,#function -glLightiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Lightiv), %g2 - or %g2, %lo(8 * _gloffset_Lightiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Lightiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightModelf -.type glLightModelf,#function -glLightModelf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LightModelf), %g2 - or %g2, %lo(8 * _gloffset_LightModelf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LightModelf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightModelfv -.type glLightModelfv,#function -glLightModelfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LightModelfv), %g2 - or %g2, %lo(8 * _gloffset_LightModelfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LightModelfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightModeli -.type glLightModeli,#function -glLightModeli: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LightModeli), %g2 - or %g2, %lo(8 * _gloffset_LightModeli), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LightModeli)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightModeliv -.type glLightModeliv,#function -glLightModeliv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LightModeliv), %g2 - or %g2, %lo(8 * _gloffset_LightModeliv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LightModeliv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLineStipple -.type glLineStipple,#function -glLineStipple: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LineStipple), %g2 - or %g2, %lo(8 * _gloffset_LineStipple), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LineStipple)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLineWidth -.type glLineWidth,#function -glLineWidth: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LineWidth), %g2 - or %g2, %lo(8 * _gloffset_LineWidth), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LineWidth)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMaterialf -.type glMaterialf,#function -glMaterialf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Materialf), %g2 - or %g2, %lo(8 * _gloffset_Materialf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Materialf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMaterialfv -.type glMaterialfv,#function -glMaterialfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Materialfv), %g2 - or %g2, %lo(8 * _gloffset_Materialfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Materialfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMateriali -.type glMateriali,#function -glMateriali: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Materiali), %g2 - or %g2, %lo(8 * _gloffset_Materiali), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Materiali)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMaterialiv -.type glMaterialiv,#function -glMaterialiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Materialiv), %g2 - or %g2, %lo(8 * _gloffset_Materialiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Materialiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointSize -.type glPointSize,#function -glPointSize: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointSize), %g2 - or %g2, %lo(8 * _gloffset_PointSize), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointSize)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPolygonMode -.type glPolygonMode,#function -glPolygonMode: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PolygonMode), %g2 - or %g2, %lo(8 * _gloffset_PolygonMode), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PolygonMode)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPolygonStipple -.type glPolygonStipple,#function -glPolygonStipple: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PolygonStipple), %g2 - or %g2, %lo(8 * _gloffset_PolygonStipple), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PolygonStipple)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glScissor -.type glScissor,#function -glScissor: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Scissor), %g2 - or %g2, %lo(8 * _gloffset_Scissor), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Scissor)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glShadeModel -.type glShadeModel,#function -glShadeModel: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ShadeModel), %g2 - or %g2, %lo(8 * _gloffset_ShadeModel), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ShadeModel)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexParameterf -.type glTexParameterf,#function -glTexParameterf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexParameterf), %g2 - or %g2, %lo(8 * _gloffset_TexParameterf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexParameterf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexParameterfv -.type glTexParameterfv,#function -glTexParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexParameterfv), %g2 - or %g2, %lo(8 * _gloffset_TexParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexParameteri -.type glTexParameteri,#function -glTexParameteri: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexParameteri), %g2 - or %g2, %lo(8 * _gloffset_TexParameteri), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexParameteri)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexParameteriv -.type glTexParameteriv,#function -glTexParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexParameteriv), %g2 - or %g2, %lo(8 * _gloffset_TexParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexImage1D -.type glTexImage1D,#function -glTexImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexImage1D), %g2 - or %g2, %lo(8 * _gloffset_TexImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexImage2D -.type glTexImage2D,#function -glTexImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexImage2D), %g2 - or %g2, %lo(8 * _gloffset_TexImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexEnvf -.type glTexEnvf,#function -glTexEnvf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexEnvf), %g2 - or %g2, %lo(8 * _gloffset_TexEnvf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexEnvf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexEnvfv -.type glTexEnvfv,#function -glTexEnvfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexEnvfv), %g2 - or %g2, %lo(8 * _gloffset_TexEnvfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexEnvfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexEnvi -.type glTexEnvi,#function -glTexEnvi: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexEnvi), %g2 - or %g2, %lo(8 * _gloffset_TexEnvi), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexEnvi)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexEnviv -.type glTexEnviv,#function -glTexEnviv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexEnviv), %g2 - or %g2, %lo(8 * _gloffset_TexEnviv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexEnviv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGend -.type glTexGend,#function -glTexGend: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGend), %g2 - or %g2, %lo(8 * _gloffset_TexGend), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGend)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGendv -.type glTexGendv,#function -glTexGendv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGendv), %g2 - or %g2, %lo(8 * _gloffset_TexGendv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGendv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGenf -.type glTexGenf,#function -glTexGenf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGenf), %g2 - or %g2, %lo(8 * _gloffset_TexGenf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGenf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGenfv -.type glTexGenfv,#function -glTexGenfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGenfv), %g2 - or %g2, %lo(8 * _gloffset_TexGenfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGenfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGeni -.type glTexGeni,#function -glTexGeni: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGeni), %g2 - or %g2, %lo(8 * _gloffset_TexGeni), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGeni)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexGeniv -.type glTexGeniv,#function -glTexGeniv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexGeniv), %g2 - or %g2, %lo(8 * _gloffset_TexGeniv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexGeniv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFeedbackBuffer -.type glFeedbackBuffer,#function -glFeedbackBuffer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FeedbackBuffer), %g2 - or %g2, %lo(8 * _gloffset_FeedbackBuffer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FeedbackBuffer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSelectBuffer -.type glSelectBuffer,#function -glSelectBuffer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SelectBuffer), %g2 - or %g2, %lo(8 * _gloffset_SelectBuffer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SelectBuffer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRenderMode -.type glRenderMode,#function -glRenderMode: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RenderMode), %g2 - or %g2, %lo(8 * _gloffset_RenderMode), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RenderMode)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glInitNames -.type glInitNames,#function -glInitNames: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_InitNames), %g2 - or %g2, %lo(8 * _gloffset_InitNames), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_InitNames)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadName -.type glLoadName,#function -glLoadName: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadName), %g2 - or %g2, %lo(8 * _gloffset_LoadName), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadName)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPassThrough -.type glPassThrough,#function -glPassThrough: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PassThrough), %g2 - or %g2, %lo(8 * _gloffset_PassThrough), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PassThrough)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPopName -.type glPopName,#function -glPopName: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PopName), %g2 - or %g2, %lo(8 * _gloffset_PopName), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PopName)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPushName -.type glPushName,#function -glPushName: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PushName), %g2 - or %g2, %lo(8 * _gloffset_PushName), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PushName)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawBuffer -.type glDrawBuffer,#function -glDrawBuffer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawBuffer), %g2 - or %g2, %lo(8 * _gloffset_DrawBuffer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawBuffer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClear -.type glClear,#function -glClear: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Clear), %g2 - or %g2, %lo(8 * _gloffset_Clear), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Clear)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClearAccum -.type glClearAccum,#function -glClearAccum: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClearAccum), %g2 - or %g2, %lo(8 * _gloffset_ClearAccum), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClearAccum)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClearIndex -.type glClearIndex,#function -glClearIndex: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClearIndex), %g2 - or %g2, %lo(8 * _gloffset_ClearIndex), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClearIndex)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClearColor -.type glClearColor,#function -glClearColor: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClearColor), %g2 - or %g2, %lo(8 * _gloffset_ClearColor), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClearColor)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClearStencil -.type glClearStencil,#function -glClearStencil: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClearStencil), %g2 - or %g2, %lo(8 * _gloffset_ClearStencil), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClearStencil)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClearDepth -.type glClearDepth,#function -glClearDepth: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClearDepth), %g2 - or %g2, %lo(8 * _gloffset_ClearDepth), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClearDepth)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glStencilMask -.type glStencilMask,#function -glStencilMask: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_StencilMask), %g2 - or %g2, %lo(8 * _gloffset_StencilMask), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_StencilMask)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorMask -.type glColorMask,#function -glColorMask: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorMask), %g2 - or %g2, %lo(8 * _gloffset_ColorMask), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorMask)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDepthMask -.type glDepthMask,#function -glDepthMask: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DepthMask), %g2 - or %g2, %lo(8 * _gloffset_DepthMask), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DepthMask)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexMask -.type glIndexMask,#function -glIndexMask: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IndexMask), %g2 - or %g2, %lo(8 * _gloffset_IndexMask), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IndexMask)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glAccum -.type glAccum,#function -glAccum: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Accum), %g2 - or %g2, %lo(8 * _gloffset_Accum), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Accum)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDisable -.type glDisable,#function -glDisable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Disable), %g2 - or %g2, %lo(8 * _gloffset_Disable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Disable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEnable -.type glEnable,#function -glEnable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Enable), %g2 - or %g2, %lo(8 * _gloffset_Enable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Enable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFinish -.type glFinish,#function -glFinish: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Finish), %g2 - or %g2, %lo(8 * _gloffset_Finish), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Finish)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFlush -.type glFlush,#function -glFlush: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Flush), %g2 - or %g2, %lo(8 * _gloffset_Flush), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Flush)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPopAttrib -.type glPopAttrib,#function -glPopAttrib: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PopAttrib), %g2 - or %g2, %lo(8 * _gloffset_PopAttrib), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PopAttrib)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPushAttrib -.type glPushAttrib,#function -glPushAttrib: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PushAttrib), %g2 - or %g2, %lo(8 * _gloffset_PushAttrib), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PushAttrib)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMap1d -.type glMap1d,#function -glMap1d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Map1d), %g2 - or %g2, %lo(8 * _gloffset_Map1d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Map1d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMap1f -.type glMap1f,#function -glMap1f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Map1f), %g2 - or %g2, %lo(8 * _gloffset_Map1f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Map1f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMap2d -.type glMap2d,#function -glMap2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Map2d), %g2 - or %g2, %lo(8 * _gloffset_Map2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Map2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMap2f -.type glMap2f,#function -glMap2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Map2f), %g2 - or %g2, %lo(8 * _gloffset_Map2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Map2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMapGrid1d -.type glMapGrid1d,#function -glMapGrid1d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MapGrid1d), %g2 - or %g2, %lo(8 * _gloffset_MapGrid1d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MapGrid1d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMapGrid1f -.type glMapGrid1f,#function -glMapGrid1f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MapGrid1f), %g2 - or %g2, %lo(8 * _gloffset_MapGrid1f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MapGrid1f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMapGrid2d -.type glMapGrid2d,#function -glMapGrid2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MapGrid2d), %g2 - or %g2, %lo(8 * _gloffset_MapGrid2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MapGrid2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMapGrid2f -.type glMapGrid2f,#function -glMapGrid2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MapGrid2f), %g2 - or %g2, %lo(8 * _gloffset_MapGrid2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MapGrid2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord1d -.type glEvalCoord1d,#function -glEvalCoord1d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord1d), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord1d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord1d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord1dv -.type glEvalCoord1dv,#function -glEvalCoord1dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord1dv), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord1dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord1dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord1f -.type glEvalCoord1f,#function -glEvalCoord1f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord1f), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord1f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord1f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord1fv -.type glEvalCoord1fv,#function -glEvalCoord1fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord1fv), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord1fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord1fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord2d -.type glEvalCoord2d,#function -glEvalCoord2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord2d), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord2d), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord2d)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord2dv -.type glEvalCoord2dv,#function -glEvalCoord2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord2dv), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord2dv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord2dv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord2f -.type glEvalCoord2f,#function -glEvalCoord2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord2f), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord2f), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord2f)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalCoord2fv -.type glEvalCoord2fv,#function -glEvalCoord2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalCoord2fv), %g2 - or %g2, %lo(8 * _gloffset_EvalCoord2fv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalCoord2fv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalMesh1 -.type glEvalMesh1,#function -glEvalMesh1: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalMesh1), %g2 - or %g2, %lo(8 * _gloffset_EvalMesh1), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalMesh1)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalPoint1 -.type glEvalPoint1,#function -glEvalPoint1: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalPoint1), %g2 - or %g2, %lo(8 * _gloffset_EvalPoint1), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalPoint1)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalMesh2 -.type glEvalMesh2,#function -glEvalMesh2: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalMesh2), %g2 - or %g2, %lo(8 * _gloffset_EvalMesh2), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalMesh2)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEvalPoint2 -.type glEvalPoint2,#function -glEvalPoint2: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EvalPoint2), %g2 - or %g2, %lo(8 * _gloffset_EvalPoint2), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EvalPoint2)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glAlphaFunc -.type glAlphaFunc,#function -glAlphaFunc: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_AlphaFunc), %g2 - or %g2, %lo(8 * _gloffset_AlphaFunc), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_AlphaFunc)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendFunc -.type glBlendFunc,#function -glBlendFunc: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendFunc), %g2 - or %g2, %lo(8 * _gloffset_BlendFunc), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendFunc)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLogicOp -.type glLogicOp,#function -glLogicOp: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LogicOp), %g2 - or %g2, %lo(8 * _gloffset_LogicOp), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LogicOp)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glStencilFunc -.type glStencilFunc,#function -glStencilFunc: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_StencilFunc), %g2 - or %g2, %lo(8 * _gloffset_StencilFunc), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_StencilFunc)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glStencilOp -.type glStencilOp,#function -glStencilOp: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_StencilOp), %g2 - or %g2, %lo(8 * _gloffset_StencilOp), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_StencilOp)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDepthFunc -.type glDepthFunc,#function -glDepthFunc: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DepthFunc), %g2 - or %g2, %lo(8 * _gloffset_DepthFunc), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DepthFunc)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelZoom -.type glPixelZoom,#function -glPixelZoom: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelZoom), %g2 - or %g2, %lo(8 * _gloffset_PixelZoom), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelZoom)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTransferf -.type glPixelTransferf,#function -glPixelTransferf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTransferf), %g2 - or %g2, %lo(8 * _gloffset_PixelTransferf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTransferf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTransferi -.type glPixelTransferi,#function -glPixelTransferi: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTransferi), %g2 - or %g2, %lo(8 * _gloffset_PixelTransferi), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTransferi)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelStoref -.type glPixelStoref,#function -glPixelStoref: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelStoref), %g2 - or %g2, %lo(8 * _gloffset_PixelStoref), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelStoref)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelStorei -.type glPixelStorei,#function -glPixelStorei: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelStorei), %g2 - or %g2, %lo(8 * _gloffset_PixelStorei), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelStorei)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelMapfv -.type glPixelMapfv,#function -glPixelMapfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelMapfv), %g2 - or %g2, %lo(8 * _gloffset_PixelMapfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelMapfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelMapuiv -.type glPixelMapuiv,#function -glPixelMapuiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelMapuiv), %g2 - or %g2, %lo(8 * _gloffset_PixelMapuiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelMapuiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelMapusv -.type glPixelMapusv,#function -glPixelMapusv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelMapusv), %g2 - or %g2, %lo(8 * _gloffset_PixelMapusv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelMapusv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glReadBuffer -.type glReadBuffer,#function -glReadBuffer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ReadBuffer), %g2 - or %g2, %lo(8 * _gloffset_ReadBuffer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ReadBuffer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyPixels -.type glCopyPixels,#function -glCopyPixels: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyPixels), %g2 - or %g2, %lo(8 * _gloffset_CopyPixels), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyPixels)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glReadPixels -.type glReadPixels,#function -glReadPixels: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ReadPixels), %g2 - or %g2, %lo(8 * _gloffset_ReadPixels), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ReadPixels)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawPixels -.type glDrawPixels,#function -glDrawPixels: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawPixels), %g2 - or %g2, %lo(8 * _gloffset_DrawPixels), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawPixels)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetBooleanv -.type glGetBooleanv,#function -glGetBooleanv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetBooleanv), %g2 - or %g2, %lo(8 * _gloffset_GetBooleanv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetBooleanv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetClipPlane -.type glGetClipPlane,#function -glGetClipPlane: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetClipPlane), %g2 - or %g2, %lo(8 * _gloffset_GetClipPlane), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetClipPlane)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetDoublev -.type glGetDoublev,#function -glGetDoublev: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetDoublev), %g2 - or %g2, %lo(8 * _gloffset_GetDoublev), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetDoublev)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetError -.type glGetError,#function -glGetError: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetError), %g2 - or %g2, %lo(8 * _gloffset_GetError), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetError)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFloatv -.type glGetFloatv,#function -glGetFloatv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFloatv), %g2 - or %g2, %lo(8 * _gloffset_GetFloatv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFloatv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetIntegerv -.type glGetIntegerv,#function -glGetIntegerv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetIntegerv), %g2 - or %g2, %lo(8 * _gloffset_GetIntegerv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetIntegerv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetLightfv -.type glGetLightfv,#function -glGetLightfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetLightfv), %g2 - or %g2, %lo(8 * _gloffset_GetLightfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetLightfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetLightiv -.type glGetLightiv,#function -glGetLightiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetLightiv), %g2 - or %g2, %lo(8 * _gloffset_GetLightiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetLightiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMapdv -.type glGetMapdv,#function -glGetMapdv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMapdv), %g2 - or %g2, %lo(8 * _gloffset_GetMapdv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMapdv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMapfv -.type glGetMapfv,#function -glGetMapfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMapfv), %g2 - or %g2, %lo(8 * _gloffset_GetMapfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMapfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMapiv -.type glGetMapiv,#function -glGetMapiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMapiv), %g2 - or %g2, %lo(8 * _gloffset_GetMapiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMapiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMaterialfv -.type glGetMaterialfv,#function -glGetMaterialfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMaterialfv), %g2 - or %g2, %lo(8 * _gloffset_GetMaterialfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMaterialfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMaterialiv -.type glGetMaterialiv,#function -glGetMaterialiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMaterialiv), %g2 - or %g2, %lo(8 * _gloffset_GetMaterialiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMaterialiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPixelMapfv -.type glGetPixelMapfv,#function -glGetPixelMapfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPixelMapfv), %g2 - or %g2, %lo(8 * _gloffset_GetPixelMapfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPixelMapfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPixelMapuiv -.type glGetPixelMapuiv,#function -glGetPixelMapuiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPixelMapuiv), %g2 - or %g2, %lo(8 * _gloffset_GetPixelMapuiv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPixelMapuiv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPixelMapusv -.type glGetPixelMapusv,#function -glGetPixelMapusv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPixelMapusv), %g2 - or %g2, %lo(8 * _gloffset_GetPixelMapusv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPixelMapusv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPolygonStipple -.type glGetPolygonStipple,#function -glGetPolygonStipple: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPolygonStipple), %g2 - or %g2, %lo(8 * _gloffset_GetPolygonStipple), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPolygonStipple)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetString -.type glGetString,#function -glGetString: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetString), %g2 - or %g2, %lo(8 * _gloffset_GetString), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetString)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexEnvfv -.type glGetTexEnvfv,#function -glGetTexEnvfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexEnvfv), %g2 - or %g2, %lo(8 * _gloffset_GetTexEnvfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexEnvfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexEnviv -.type glGetTexEnviv,#function -glGetTexEnviv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexEnviv), %g2 - or %g2, %lo(8 * _gloffset_GetTexEnviv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexEnviv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexGendv -.type glGetTexGendv,#function -glGetTexGendv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexGendv), %g2 - or %g2, %lo(8 * _gloffset_GetTexGendv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexGendv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexGenfv -.type glGetTexGenfv,#function -glGetTexGenfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexGenfv), %g2 - or %g2, %lo(8 * _gloffset_GetTexGenfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexGenfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexGeniv -.type glGetTexGeniv,#function -glGetTexGeniv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexGeniv), %g2 - or %g2, %lo(8 * _gloffset_GetTexGeniv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexGeniv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexImage -.type glGetTexImage,#function -glGetTexImage: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexImage), %g2 - or %g2, %lo(8 * _gloffset_GetTexImage), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexImage)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexParameterfv -.type glGetTexParameterfv,#function -glGetTexParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetTexParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexParameteriv -.type glGetTexParameteriv,#function -glGetTexParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetTexParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexLevelParameterfv -.type glGetTexLevelParameterfv,#function -glGetTexLevelParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexLevelParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetTexLevelParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexLevelParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexLevelParameteriv -.type glGetTexLevelParameteriv,#function -glGetTexLevelParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexLevelParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetTexLevelParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexLevelParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsEnabled -.type glIsEnabled,#function -glIsEnabled: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsEnabled), %g2 - or %g2, %lo(8 * _gloffset_IsEnabled), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsEnabled)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsList -.type glIsList,#function -glIsList: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsList), %g2 - or %g2, %lo(8 * _gloffset_IsList), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsList)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDepthRange -.type glDepthRange,#function -glDepthRange: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DepthRange), %g2 - or %g2, %lo(8 * _gloffset_DepthRange), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DepthRange)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFrustum -.type glFrustum,#function -glFrustum: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Frustum), %g2 - or %g2, %lo(8 * _gloffset_Frustum), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Frustum)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadIdentity -.type glLoadIdentity,#function -glLoadIdentity: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadIdentity), %g2 - or %g2, %lo(8 * _gloffset_LoadIdentity), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadIdentity)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadMatrixf -.type glLoadMatrixf,#function -glLoadMatrixf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadMatrixf), %g2 - or %g2, %lo(8 * _gloffset_LoadMatrixf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadMatrixf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadMatrixd -.type glLoadMatrixd,#function -glLoadMatrixd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadMatrixd), %g2 - or %g2, %lo(8 * _gloffset_LoadMatrixd), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadMatrixd)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMatrixMode -.type glMatrixMode,#function -glMatrixMode: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MatrixMode), %g2 - or %g2, %lo(8 * _gloffset_MatrixMode), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MatrixMode)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultMatrixf -.type glMultMatrixf,#function -glMultMatrixf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultMatrixf), %g2 - or %g2, %lo(8 * _gloffset_MultMatrixf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultMatrixf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultMatrixd -.type glMultMatrixd,#function -glMultMatrixd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultMatrixd), %g2 - or %g2, %lo(8 * _gloffset_MultMatrixd), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultMatrixd)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glOrtho -.type glOrtho,#function -glOrtho: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Ortho), %g2 - or %g2, %lo(8 * _gloffset_Ortho), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Ortho)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPopMatrix -.type glPopMatrix,#function -glPopMatrix: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PopMatrix), %g2 - or %g2, %lo(8 * _gloffset_PopMatrix), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PopMatrix)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPushMatrix -.type glPushMatrix,#function -glPushMatrix: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PushMatrix), %g2 - or %g2, %lo(8 * _gloffset_PushMatrix), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PushMatrix)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRotated -.type glRotated,#function -glRotated: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rotated), %g2 - or %g2, %lo(8 * _gloffset_Rotated), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rotated)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRotatef -.type glRotatef,#function -glRotatef: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Rotatef), %g2 - or %g2, %lo(8 * _gloffset_Rotatef), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Rotatef)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glScaled -.type glScaled,#function -glScaled: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Scaled), %g2 - or %g2, %lo(8 * _gloffset_Scaled), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Scaled)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glScalef -.type glScalef,#function -glScalef: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Scalef), %g2 - or %g2, %lo(8 * _gloffset_Scalef), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Scalef)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTranslated -.type glTranslated,#function -glTranslated: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Translated), %g2 - or %g2, %lo(8 * _gloffset_Translated), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Translated)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTranslatef -.type glTranslatef,#function -glTranslatef: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Translatef), %g2 - or %g2, %lo(8 * _gloffset_Translatef), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Translatef)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glViewport -.type glViewport,#function -glViewport: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Viewport), %g2 - or %g2, %lo(8 * _gloffset_Viewport), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Viewport)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glArrayElement -.type glArrayElement,#function -glArrayElement: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ArrayElement), %g2 - or %g2, %lo(8 * _gloffset_ArrayElement), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ArrayElement)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorPointer -.type glColorPointer,#function -glColorPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorPointer), %g2 - or %g2, %lo(8 * _gloffset_ColorPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDisableClientState -.type glDisableClientState,#function -glDisableClientState: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DisableClientState), %g2 - or %g2, %lo(8 * _gloffset_DisableClientState), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DisableClientState)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawArrays -.type glDrawArrays,#function -glDrawArrays: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawArrays), %g2 - or %g2, %lo(8 * _gloffset_DrawArrays), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawArrays)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawElements -.type glDrawElements,#function -glDrawElements: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawElements), %g2 - or %g2, %lo(8 * _gloffset_DrawElements), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawElements)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEdgeFlagPointer -.type glEdgeFlagPointer,#function -glEdgeFlagPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EdgeFlagPointer), %g2 - or %g2, %lo(8 * _gloffset_EdgeFlagPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EdgeFlagPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEnableClientState -.type glEnableClientState,#function -glEnableClientState: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EnableClientState), %g2 - or %g2, %lo(8 * _gloffset_EnableClientState), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EnableClientState)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPointerv -.type glGetPointerv,#function -glGetPointerv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPointerv), %g2 - or %g2, %lo(8 * _gloffset_GetPointerv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPointerv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexPointer -.type glIndexPointer,#function -glIndexPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IndexPointer), %g2 - or %g2, %lo(8 * _gloffset_IndexPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IndexPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glInterleavedArrays -.type glInterleavedArrays,#function -glInterleavedArrays: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_InterleavedArrays), %g2 - or %g2, %lo(8 * _gloffset_InterleavedArrays), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_InterleavedArrays)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormalPointer -.type glNormalPointer,#function -glNormalPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_NormalPointer), %g2 - or %g2, %lo(8 * _gloffset_NormalPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_NormalPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoordPointer -.type glTexCoordPointer,#function -glTexCoordPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoordPointer), %g2 - or %g2, %lo(8 * _gloffset_TexCoordPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoordPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexPointer -.type glVertexPointer,#function -glVertexPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexPointer), %g2 - or %g2, %lo(8 * _gloffset_VertexPointer), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexPointer)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPolygonOffset -.type glPolygonOffset,#function -glPolygonOffset: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PolygonOffset), %g2 - or %g2, %lo(8 * _gloffset_PolygonOffset), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PolygonOffset)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexImage1D -.type glCopyTexImage1D,#function -glCopyTexImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexImage1D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexImage2D -.type glCopyTexImage2D,#function -glCopyTexImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexImage2D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage1D -.type glCopyTexSubImage1D,#function -glCopyTexSubImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage1D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage2D -.type glCopyTexSubImage2D,#function -glCopyTexSubImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage2D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage1D -.type glTexSubImage1D,#function -glTexSubImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage1D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage2D -.type glTexSubImage2D,#function -glTexSubImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage2D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glAreTexturesResident -.type glAreTexturesResident,#function -glAreTexturesResident: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_AreTexturesResident), %g2 - or %g2, %lo(8 * _gloffset_AreTexturesResident), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_AreTexturesResident)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBindTexture -.type glBindTexture,#function -glBindTexture: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BindTexture), %g2 - or %g2, %lo(8 * _gloffset_BindTexture), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BindTexture)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDeleteTextures -.type glDeleteTextures,#function -glDeleteTextures: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DeleteTextures), %g2 - or %g2, %lo(8 * _gloffset_DeleteTextures), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DeleteTextures)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGenTextures -.type glGenTextures,#function -glGenTextures: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GenTextures), %g2 - or %g2, %lo(8 * _gloffset_GenTextures), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GenTextures)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsTexture -.type glIsTexture,#function -glIsTexture: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsTexture), %g2 - or %g2, %lo(8 * _gloffset_IsTexture), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsTexture)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPrioritizeTextures -.type glPrioritizeTextures,#function -glPrioritizeTextures: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PrioritizeTextures), %g2 - or %g2, %lo(8 * _gloffset_PrioritizeTextures), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PrioritizeTextures)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexub -.type glIndexub,#function -glIndexub: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexub), %g2 - or %g2, %lo(8 * _gloffset_Indexub), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexub)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexubv -.type glIndexubv,#function -glIndexubv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Indexubv), %g2 - or %g2, %lo(8 * _gloffset_Indexubv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Indexubv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPopClientAttrib -.type glPopClientAttrib,#function -glPopClientAttrib: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PopClientAttrib), %g2 - or %g2, %lo(8 * _gloffset_PopClientAttrib), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PopClientAttrib)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPushClientAttrib -.type glPushClientAttrib,#function -glPushClientAttrib: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PushClientAttrib), %g2 - or %g2, %lo(8 * _gloffset_PushClientAttrib), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PushClientAttrib)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendColor -.type glBlendColor,#function -glBlendColor: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendColor), %g2 - or %g2, %lo(8 * _gloffset_BlendColor), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendColor)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendEquation -.type glBlendEquation,#function -glBlendEquation: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendEquation), %g2 - or %g2, %lo(8 * _gloffset_BlendEquation), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendEquation)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawRangeElements -.type glDrawRangeElements,#function -glDrawRangeElements: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawRangeElements), %g2 - or %g2, %lo(8 * _gloffset_DrawRangeElements), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawRangeElements)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTable -.type glColorTable,#function -glColorTable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTable), %g2 - or %g2, %lo(8 * _gloffset_ColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableParameterfv -.type glColorTableParameterfv,#function -glColorTableParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTableParameterfv), %g2 - or %g2, %lo(8 * _gloffset_ColorTableParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTableParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableParameteriv -.type glColorTableParameteriv,#function -glColorTableParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTableParameteriv), %g2 - or %g2, %lo(8 * _gloffset_ColorTableParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTableParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyColorTable -.type glCopyColorTable,#function -glCopyColorTable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyColorTable), %g2 - or %g2, %lo(8 * _gloffset_CopyColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTable -.type glGetColorTable,#function -glGetColorTable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTable), %g2 - or %g2, %lo(8 * _gloffset_GetColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameterfv -.type glGetColorTableParameterfv,#function -glGetColorTableParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameteriv -.type glGetColorTableParameteriv,#function -glGetColorTableParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorSubTable -.type glColorSubTable,#function -glColorSubTable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorSubTable), %g2 - or %g2, %lo(8 * _gloffset_ColorSubTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorSubTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyColorSubTable -.type glCopyColorSubTable,#function -glCopyColorSubTable: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyColorSubTable), %g2 - or %g2, %lo(8 * _gloffset_CopyColorSubTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyColorSubTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionFilter1D -.type glConvolutionFilter1D,#function -glConvolutionFilter1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionFilter1D), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionFilter1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionFilter1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionFilter2D -.type glConvolutionFilter2D,#function -glConvolutionFilter2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionFilter2D), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameterf -.type glConvolutionParameterf,#function -glConvolutionParameterf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameterf), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameterf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameterf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameterfv -.type glConvolutionParameterfv,#function -glConvolutionParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameterfv), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameteri -.type glConvolutionParameteri,#function -glConvolutionParameteri: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameteri), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameteri), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameteri)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameteriv -.type glConvolutionParameteriv,#function -glConvolutionParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameteriv), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyConvolutionFilter1D -.type glCopyConvolutionFilter1D,#function -glCopyConvolutionFilter1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyConvolutionFilter1D), %g2 - or %g2, %lo(8 * _gloffset_CopyConvolutionFilter1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyConvolutionFilter1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyConvolutionFilter2D -.type glCopyConvolutionFilter2D,#function -glCopyConvolutionFilter2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyConvolutionFilter2D), %g2 - or %g2, %lo(8 * _gloffset_CopyConvolutionFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyConvolutionFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionFilter -.type glGetConvolutionFilter,#function -glGetConvolutionFilter: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionFilter), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionFilter), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionFilter)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionParameterfv -.type glGetConvolutionParameterfv,#function -glGetConvolutionParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionParameteriv -.type glGetConvolutionParameteriv,#function -glGetConvolutionParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetSeparableFilter -.type glGetSeparableFilter,#function -glGetSeparableFilter: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetSeparableFilter), %g2 - or %g2, %lo(8 * _gloffset_GetSeparableFilter), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetSeparableFilter)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSeparableFilter2D -.type glSeparableFilter2D,#function -glSeparableFilter2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SeparableFilter2D), %g2 - or %g2, %lo(8 * _gloffset_SeparableFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SeparableFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogram -.type glGetHistogram,#function -glGetHistogram: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogram), %g2 - or %g2, %lo(8 * _gloffset_GetHistogram), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogram)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogramParameterfv -.type glGetHistogramParameterfv,#function -glGetHistogramParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogramParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetHistogramParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogramParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogramParameteriv -.type glGetHistogramParameteriv,#function -glGetHistogramParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogramParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetHistogramParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogramParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmax -.type glGetMinmax,#function -glGetMinmax: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmax), %g2 - or %g2, %lo(8 * _gloffset_GetMinmax), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmax)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmaxParameterfv -.type glGetMinmaxParameterfv,#function -glGetMinmaxParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmaxParameterfv), %g2 - or %g2, %lo(8 * _gloffset_GetMinmaxParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmaxParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmaxParameteriv -.type glGetMinmaxParameteriv,#function -glGetMinmaxParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmaxParameteriv), %g2 - or %g2, %lo(8 * _gloffset_GetMinmaxParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmaxParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glHistogram -.type glHistogram,#function -glHistogram: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Histogram), %g2 - or %g2, %lo(8 * _gloffset_Histogram), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Histogram)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMinmax -.type glMinmax,#function -glMinmax: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Minmax), %g2 - or %g2, %lo(8 * _gloffset_Minmax), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Minmax)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glResetHistogram -.type glResetHistogram,#function -glResetHistogram: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ResetHistogram), %g2 - or %g2, %lo(8 * _gloffset_ResetHistogram), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ResetHistogram)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glResetMinmax -.type glResetMinmax,#function -glResetMinmax: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ResetMinmax), %g2 - or %g2, %lo(8 * _gloffset_ResetMinmax), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ResetMinmax)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexImage3D -.type glTexImage3D,#function -glTexImage3D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexImage3D), %g2 - or %g2, %lo(8 * _gloffset_TexImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage3D -.type glTexSubImage3D,#function -glTexSubImage3D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage3D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage3D -.type glCopyTexSubImage3D,#function -glCopyTexSubImage3D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage3D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glActiveTextureARB -.type glActiveTextureARB,#function -glActiveTextureARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ActiveTextureARB), %g2 - or %g2, %lo(8 * _gloffset_ActiveTextureARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ActiveTextureARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClientActiveTextureARB -.type glClientActiveTextureARB,#function -glClientActiveTextureARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClientActiveTextureARB), %g2 - or %g2, %lo(8 * _gloffset_ClientActiveTextureARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClientActiveTextureARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1dARB -.type glMultiTexCoord1dARB,#function -glMultiTexCoord1dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1dvARB -.type glMultiTexCoord1dvARB,#function -glMultiTexCoord1dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1fARB -.type glMultiTexCoord1fARB,#function -glMultiTexCoord1fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1fvARB -.type glMultiTexCoord1fvARB,#function -glMultiTexCoord1fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1iARB -.type glMultiTexCoord1iARB,#function -glMultiTexCoord1iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1ivARB -.type glMultiTexCoord1ivARB,#function -glMultiTexCoord1ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1sARB -.type glMultiTexCoord1sARB,#function -glMultiTexCoord1sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1svARB -.type glMultiTexCoord1svARB,#function -glMultiTexCoord1svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2dARB -.type glMultiTexCoord2dARB,#function -glMultiTexCoord2dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2dvARB -.type glMultiTexCoord2dvARB,#function -glMultiTexCoord2dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2fARB -.type glMultiTexCoord2fARB,#function -glMultiTexCoord2fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2fvARB -.type glMultiTexCoord2fvARB,#function -glMultiTexCoord2fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2iARB -.type glMultiTexCoord2iARB,#function -glMultiTexCoord2iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2ivARB -.type glMultiTexCoord2ivARB,#function -glMultiTexCoord2ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2sARB -.type glMultiTexCoord2sARB,#function -glMultiTexCoord2sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2svARB -.type glMultiTexCoord2svARB,#function -glMultiTexCoord2svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3dARB -.type glMultiTexCoord3dARB,#function -glMultiTexCoord3dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3dvARB -.type glMultiTexCoord3dvARB,#function -glMultiTexCoord3dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3fARB -.type glMultiTexCoord3fARB,#function -glMultiTexCoord3fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3fvARB -.type glMultiTexCoord3fvARB,#function -glMultiTexCoord3fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3iARB -.type glMultiTexCoord3iARB,#function -glMultiTexCoord3iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3ivARB -.type glMultiTexCoord3ivARB,#function -glMultiTexCoord3ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3sARB -.type glMultiTexCoord3sARB,#function -glMultiTexCoord3sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3svARB -.type glMultiTexCoord3svARB,#function -glMultiTexCoord3svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4dARB -.type glMultiTexCoord4dARB,#function -glMultiTexCoord4dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4dvARB -.type glMultiTexCoord4dvARB,#function -glMultiTexCoord4dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4fARB -.type glMultiTexCoord4fARB,#function -glMultiTexCoord4fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4fvARB -.type glMultiTexCoord4fvARB,#function -glMultiTexCoord4fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4iARB -.type glMultiTexCoord4iARB,#function -glMultiTexCoord4iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4ivARB -.type glMultiTexCoord4ivARB,#function -glMultiTexCoord4ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4sARB -.type glMultiTexCoord4sARB,#function -glMultiTexCoord4sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4svARB -.type glMultiTexCoord4svARB,#function -glMultiTexCoord4svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadTransposeMatrixfARB -.type glLoadTransposeMatrixfARB,#function -glLoadTransposeMatrixfARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadTransposeMatrixfARB), %g2 - or %g2, %lo(8 * _gloffset_LoadTransposeMatrixfARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadTransposeMatrixfARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadTransposeMatrixdARB -.type glLoadTransposeMatrixdARB,#function -glLoadTransposeMatrixdARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadTransposeMatrixdARB), %g2 - or %g2, %lo(8 * _gloffset_LoadTransposeMatrixdARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadTransposeMatrixdARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultTransposeMatrixfARB -.type glMultTransposeMatrixfARB,#function -glMultTransposeMatrixfARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultTransposeMatrixfARB), %g2 - or %g2, %lo(8 * _gloffset_MultTransposeMatrixfARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultTransposeMatrixfARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultTransposeMatrixdARB -.type glMultTransposeMatrixdARB,#function -glMultTransposeMatrixdARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultTransposeMatrixdARB), %g2 - or %g2, %lo(8 * _gloffset_MultTransposeMatrixdARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultTransposeMatrixdARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSampleCoverageARB -.type glSampleCoverageARB,#function -glSampleCoverageARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SampleCoverageARB), %g2 - or %g2, %lo(8 * _gloffset_SampleCoverageARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SampleCoverageARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl gl__unused413 -.type gl__unused413,#function -gl__unused413: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset___unused413), %g2 - or %g2, %lo(8 * _gloffset___unused413), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset___unused413)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage3DARB -.type glCompressedTexImage3DARB,#function -glCompressedTexImage3DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage3DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage3DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage3DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage2DARB -.type glCompressedTexImage2DARB,#function -glCompressedTexImage2DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage2DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage2DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage2DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage1DARB -.type glCompressedTexImage1DARB,#function -glCompressedTexImage1DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage1DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage1DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage1DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage3DARB -.type glCompressedTexSubImage3DARB,#function -glCompressedTexSubImage3DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage3DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage3DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage3DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage2DARB -.type glCompressedTexSubImage2DARB,#function -glCompressedTexSubImage2DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage2DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage2DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage2DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage1DARB -.type glCompressedTexSubImage1DARB,#function -glCompressedTexSubImage1DARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage1DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage1DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage1DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCompressedTexImageARB -.type glGetCompressedTexImageARB,#function -glGetCompressedTexImageARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCompressedTexImageARB), %g2 - or %g2, %lo(8 * _gloffset_GetCompressedTexImageARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCompressedTexImageARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glActiveTexture -.type glActiveTexture,#function -glActiveTexture: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ActiveTextureARB), %g2 - or %g2, %lo(8 * _gloffset_ActiveTextureARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ActiveTextureARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glClientActiveTexture -.type glClientActiveTexture,#function -glClientActiveTexture: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ClientActiveTextureARB), %g2 - or %g2, %lo(8 * _gloffset_ClientActiveTextureARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ClientActiveTextureARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1d -.type glMultiTexCoord1d,#function -glMultiTexCoord1d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1dv -.type glMultiTexCoord1dv,#function -glMultiTexCoord1dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1f -.type glMultiTexCoord1f,#function -glMultiTexCoord1f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1fv -.type glMultiTexCoord1fv,#function -glMultiTexCoord1fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1i -.type glMultiTexCoord1i,#function -glMultiTexCoord1i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1iv -.type glMultiTexCoord1iv,#function -glMultiTexCoord1iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1s -.type glMultiTexCoord1s,#function -glMultiTexCoord1s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord1sv -.type glMultiTexCoord1sv,#function -glMultiTexCoord1sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord1svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord1svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord1svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2d -.type glMultiTexCoord2d,#function -glMultiTexCoord2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2dv -.type glMultiTexCoord2dv,#function -glMultiTexCoord2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2f -.type glMultiTexCoord2f,#function -glMultiTexCoord2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2fv -.type glMultiTexCoord2fv,#function -glMultiTexCoord2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2i -.type glMultiTexCoord2i,#function -glMultiTexCoord2i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2iv -.type glMultiTexCoord2iv,#function -glMultiTexCoord2iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2s -.type glMultiTexCoord2s,#function -glMultiTexCoord2s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord2sv -.type glMultiTexCoord2sv,#function -glMultiTexCoord2sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord2svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord2svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord2svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3d -.type glMultiTexCoord3d,#function -glMultiTexCoord3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3dv -.type glMultiTexCoord3dv,#function -glMultiTexCoord3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3f -.type glMultiTexCoord3f,#function -glMultiTexCoord3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3fv -.type glMultiTexCoord3fv,#function -glMultiTexCoord3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3i -.type glMultiTexCoord3i,#function -glMultiTexCoord3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3iv -.type glMultiTexCoord3iv,#function -glMultiTexCoord3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3s -.type glMultiTexCoord3s,#function -glMultiTexCoord3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord3sv -.type glMultiTexCoord3sv,#function -glMultiTexCoord3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord3svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord3svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord3svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4d -.type glMultiTexCoord4d,#function -glMultiTexCoord4d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4dARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4dARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4dARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4dv -.type glMultiTexCoord4dv,#function -glMultiTexCoord4dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4dvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4dvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4dvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4f -.type glMultiTexCoord4f,#function -glMultiTexCoord4f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4fARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4fARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4fARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4fv -.type glMultiTexCoord4fv,#function -glMultiTexCoord4fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4fvARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4fvARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4fvARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4i -.type glMultiTexCoord4i,#function -glMultiTexCoord4i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4iARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4iARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4iARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4iv -.type glMultiTexCoord4iv,#function -glMultiTexCoord4iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4ivARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4ivARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4ivARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4s -.type glMultiTexCoord4s,#function -glMultiTexCoord4s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4sARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4sARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4sARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiTexCoord4sv -.type glMultiTexCoord4sv,#function -glMultiTexCoord4sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiTexCoord4svARB), %g2 - or %g2, %lo(8 * _gloffset_MultiTexCoord4svARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiTexCoord4svARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadTransposeMatrixf -.type glLoadTransposeMatrixf,#function -glLoadTransposeMatrixf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadTransposeMatrixfARB), %g2 - or %g2, %lo(8 * _gloffset_LoadTransposeMatrixfARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadTransposeMatrixfARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadTransposeMatrixd -.type glLoadTransposeMatrixd,#function -glLoadTransposeMatrixd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadTransposeMatrixdARB), %g2 - or %g2, %lo(8 * _gloffset_LoadTransposeMatrixdARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadTransposeMatrixdARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultTransposeMatrixf -.type glMultTransposeMatrixf,#function -glMultTransposeMatrixf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultTransposeMatrixfARB), %g2 - or %g2, %lo(8 * _gloffset_MultTransposeMatrixfARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultTransposeMatrixfARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultTransposeMatrixd -.type glMultTransposeMatrixd,#function -glMultTransposeMatrixd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultTransposeMatrixdARB), %g2 - or %g2, %lo(8 * _gloffset_MultTransposeMatrixdARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultTransposeMatrixdARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSampleCoverage -.type glSampleCoverage,#function -glSampleCoverage: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SampleCoverageARB), %g2 - or %g2, %lo(8 * _gloffset_SampleCoverageARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SampleCoverageARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage3D -.type glCompressedTexImage3D,#function -glCompressedTexImage3D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage3DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage3DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage3DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage2D -.type glCompressedTexImage2D,#function -glCompressedTexImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage2DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage2DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage2DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexImage1D -.type glCompressedTexImage1D,#function -glCompressedTexImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexImage1DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexImage1DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexImage1DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage3D -.type glCompressedTexSubImage3D,#function -glCompressedTexSubImage3D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage3DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage3DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage3DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage2D -.type glCompressedTexSubImage2D,#function -glCompressedTexSubImage2D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage2DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage2DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage2DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCompressedTexSubImage1D -.type glCompressedTexSubImage1D,#function -glCompressedTexSubImage1D: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CompressedTexSubImage1DARB), %g2 - or %g2, %lo(8 * _gloffset_CompressedTexSubImage1DARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CompressedTexSubImage1DARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCompressedTexImage -.type glGetCompressedTexImage,#function -glGetCompressedTexImage: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCompressedTexImageARB), %g2 - or %g2, %lo(8 * _gloffset_GetCompressedTexImageARB), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCompressedTexImageARB)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendColorEXT -.type glBlendColorEXT,#function -glBlendColorEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendColor), %g2 - or %g2, %lo(8 * _gloffset_BlendColor), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendColor)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPolygonOffsetEXT -.type glPolygonOffsetEXT,#function -glPolygonOffsetEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PolygonOffsetEXT), %g2 - or %g2, %lo(8 * _gloffset_PolygonOffsetEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PolygonOffsetEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexImage3DEXT -.type glTexImage3DEXT,#function -glTexImage3DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexImage3D), %g2 - or %g2, %lo(8 * _gloffset_TexImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage3DEXT -.type glTexSubImage3DEXT,#function -glTexSubImage3DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage3D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTexFilterFuncSGIS -.type glGetTexFilterFuncSGIS,#function -glGetTexFilterFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTexFilterFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_GetTexFilterFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTexFilterFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexFilterFuncSGIS -.type glTexFilterFuncSGIS,#function -glTexFilterFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexFilterFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_TexFilterFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexFilterFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage1DEXT -.type glTexSubImage1DEXT,#function -glTexSubImage1DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage1D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage2DEXT -.type glTexSubImage2DEXT,#function -glTexSubImage2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage2D), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexImage1DEXT -.type glCopyTexImage1DEXT,#function -glCopyTexImage1DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexImage1D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexImage2DEXT -.type glCopyTexImage2DEXT,#function -glCopyTexImage2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexImage2D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage1DEXT -.type glCopyTexSubImage1DEXT,#function -glCopyTexSubImage1DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage1D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage2DEXT -.type glCopyTexSubImage2DEXT,#function -glCopyTexSubImage2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage2D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyTexSubImage3DEXT -.type glCopyTexSubImage3DEXT,#function -glCopyTexSubImage3DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyTexSubImage3D), %g2 - or %g2, %lo(8 * _gloffset_CopyTexSubImage3D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyTexSubImage3D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogramEXT -.type glGetHistogramEXT,#function -glGetHistogramEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogramEXT), %g2 - or %g2, %lo(8 * _gloffset_GetHistogramEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogramEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogramParameterfvEXT -.type glGetHistogramParameterfvEXT,#function -glGetHistogramParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogramParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_GetHistogramParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogramParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetHistogramParameterivEXT -.type glGetHistogramParameterivEXT,#function -glGetHistogramParameterivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetHistogramParameterivEXT), %g2 - or %g2, %lo(8 * _gloffset_GetHistogramParameterivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetHistogramParameterivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmaxEXT -.type glGetMinmaxEXT,#function -glGetMinmaxEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmaxEXT), %g2 - or %g2, %lo(8 * _gloffset_GetMinmaxEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmaxEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmaxParameterfvEXT -.type glGetMinmaxParameterfvEXT,#function -glGetMinmaxParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmaxParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_GetMinmaxParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmaxParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetMinmaxParameterivEXT -.type glGetMinmaxParameterivEXT,#function -glGetMinmaxParameterivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetMinmaxParameterivEXT), %g2 - or %g2, %lo(8 * _gloffset_GetMinmaxParameterivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetMinmaxParameterivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glHistogramEXT -.type glHistogramEXT,#function -glHistogramEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Histogram), %g2 - or %g2, %lo(8 * _gloffset_Histogram), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Histogram)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMinmaxEXT -.type glMinmaxEXT,#function -glMinmaxEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_Minmax), %g2 - or %g2, %lo(8 * _gloffset_Minmax), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_Minmax)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glResetHistogramEXT -.type glResetHistogramEXT,#function -glResetHistogramEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ResetHistogram), %g2 - or %g2, %lo(8 * _gloffset_ResetHistogram), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ResetHistogram)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glResetMinmaxEXT -.type glResetMinmaxEXT,#function -glResetMinmaxEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ResetMinmax), %g2 - or %g2, %lo(8 * _gloffset_ResetMinmax), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ResetMinmax)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionFilter1DEXT -.type glConvolutionFilter1DEXT,#function -glConvolutionFilter1DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionFilter1D), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionFilter1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionFilter1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionFilter2DEXT -.type glConvolutionFilter2DEXT,#function -glConvolutionFilter2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionFilter2D), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameterfEXT -.type glConvolutionParameterfEXT,#function -glConvolutionParameterfEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameterf), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameterf), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameterf)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameterfvEXT -.type glConvolutionParameterfvEXT,#function -glConvolutionParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameterfv), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameteriEXT -.type glConvolutionParameteriEXT,#function -glConvolutionParameteriEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameteri), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameteri), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameteri)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glConvolutionParameterivEXT -.type glConvolutionParameterivEXT,#function -glConvolutionParameterivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ConvolutionParameteriv), %g2 - or %g2, %lo(8 * _gloffset_ConvolutionParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ConvolutionParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyConvolutionFilter1DEXT -.type glCopyConvolutionFilter1DEXT,#function -glCopyConvolutionFilter1DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyConvolutionFilter1D), %g2 - or %g2, %lo(8 * _gloffset_CopyConvolutionFilter1D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyConvolutionFilter1D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyConvolutionFilter2DEXT -.type glCopyConvolutionFilter2DEXT,#function -glCopyConvolutionFilter2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyConvolutionFilter2D), %g2 - or %g2, %lo(8 * _gloffset_CopyConvolutionFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyConvolutionFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionFilterEXT -.type glGetConvolutionFilterEXT,#function -glGetConvolutionFilterEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionFilterEXT), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionFilterEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionFilterEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionParameterfvEXT -.type glGetConvolutionParameterfvEXT,#function -glGetConvolutionParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetConvolutionParameterivEXT -.type glGetConvolutionParameterivEXT,#function -glGetConvolutionParameterivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetConvolutionParameterivEXT), %g2 - or %g2, %lo(8 * _gloffset_GetConvolutionParameterivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetConvolutionParameterivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetSeparableFilterEXT -.type glGetSeparableFilterEXT,#function -glGetSeparableFilterEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetSeparableFilterEXT), %g2 - or %g2, %lo(8 * _gloffset_GetSeparableFilterEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetSeparableFilterEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSeparableFilter2DEXT -.type glSeparableFilter2DEXT,#function -glSeparableFilter2DEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SeparableFilter2D), %g2 - or %g2, %lo(8 * _gloffset_SeparableFilter2D), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SeparableFilter2D)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableSGI -.type glColorTableSGI,#function -glColorTableSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTable), %g2 - or %g2, %lo(8 * _gloffset_ColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableParameterfvSGI -.type glColorTableParameterfvSGI,#function -glColorTableParameterfvSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTableParameterfv), %g2 - or %g2, %lo(8 * _gloffset_ColorTableParameterfv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTableParameterfv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableParameterivSGI -.type glColorTableParameterivSGI,#function -glColorTableParameterivSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTableParameteriv), %g2 - or %g2, %lo(8 * _gloffset_ColorTableParameteriv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTableParameteriv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyColorTableSGI -.type glCopyColorTableSGI,#function -glCopyColorTableSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyColorTable), %g2 - or %g2, %lo(8 * _gloffset_CopyColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableSGI -.type glGetColorTableSGI,#function -glGetColorTableSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableSGI), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableSGI), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableSGI)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameterfvSGI -.type glGetColorTableParameterfvSGI,#function -glGetColorTableParameterfvSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameterfvSGI), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameterfvSGI), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameterfvSGI)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameterivSGI -.type glGetColorTableParameterivSGI,#function -glGetColorTableParameterivSGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameterivSGI), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameterivSGI), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameterivSGI)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTexGenSGIX -.type glPixelTexGenSGIX,#function -glPixelTexGenSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTexGenSGIX), %g2 - or %g2, %lo(8 * _gloffset_PixelTexGenSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTexGenSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTexGenParameteriSGIS -.type glPixelTexGenParameteriSGIS,#function -glPixelTexGenParameteriSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTexGenParameteriSGIS), %g2 - or %g2, %lo(8 * _gloffset_PixelTexGenParameteriSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTexGenParameteriSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTexGenParameterivSGIS -.type glPixelTexGenParameterivSGIS,#function -glPixelTexGenParameterivSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTexGenParameterivSGIS), %g2 - or %g2, %lo(8 * _gloffset_PixelTexGenParameterivSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTexGenParameterivSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTexGenParameterfSGIS -.type glPixelTexGenParameterfSGIS,#function -glPixelTexGenParameterfSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTexGenParameterfSGIS), %g2 - or %g2, %lo(8 * _gloffset_PixelTexGenParameterfSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTexGenParameterfSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPixelTexGenParameterfvSGIS -.type glPixelTexGenParameterfvSGIS,#function -glPixelTexGenParameterfvSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PixelTexGenParameterfvSGIS), %g2 - or %g2, %lo(8 * _gloffset_PixelTexGenParameterfvSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PixelTexGenParameterfvSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPixelTexGenParameterivSGIS -.type glGetPixelTexGenParameterivSGIS,#function -glGetPixelTexGenParameterivSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPixelTexGenParameterivSGIS), %g2 - or %g2, %lo(8 * _gloffset_GetPixelTexGenParameterivSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPixelTexGenParameterivSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPixelTexGenParameterfvSGIS -.type glGetPixelTexGenParameterfvSGIS,#function -glGetPixelTexGenParameterfvSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPixelTexGenParameterfvSGIS), %g2 - or %g2, %lo(8 * _gloffset_GetPixelTexGenParameterfvSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPixelTexGenParameterfvSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexImage4DSGIS -.type glTexImage4DSGIS,#function -glTexImage4DSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexImage4DSGIS), %g2 - or %g2, %lo(8 * _gloffset_TexImage4DSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexImage4DSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexSubImage4DSGIS -.type glTexSubImage4DSGIS,#function -glTexSubImage4DSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexSubImage4DSGIS), %g2 - or %g2, %lo(8 * _gloffset_TexSubImage4DSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexSubImage4DSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glAreTexturesResidentEXT -.type glAreTexturesResidentEXT,#function -glAreTexturesResidentEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_AreTexturesResidentEXT), %g2 - or %g2, %lo(8 * _gloffset_AreTexturesResidentEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_AreTexturesResidentEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBindTextureEXT -.type glBindTextureEXT,#function -glBindTextureEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BindTexture), %g2 - or %g2, %lo(8 * _gloffset_BindTexture), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BindTexture)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDeleteTexturesEXT -.type glDeleteTexturesEXT,#function -glDeleteTexturesEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DeleteTextures), %g2 - or %g2, %lo(8 * _gloffset_DeleteTextures), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DeleteTextures)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGenTexturesEXT -.type glGenTexturesEXT,#function -glGenTexturesEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GenTexturesEXT), %g2 - or %g2, %lo(8 * _gloffset_GenTexturesEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GenTexturesEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsTextureEXT -.type glIsTextureEXT,#function -glIsTextureEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsTextureEXT), %g2 - or %g2, %lo(8 * _gloffset_IsTextureEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsTextureEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPrioritizeTexturesEXT -.type glPrioritizeTexturesEXT,#function -glPrioritizeTexturesEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PrioritizeTextures), %g2 - or %g2, %lo(8 * _gloffset_PrioritizeTextures), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PrioritizeTextures)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDetailTexFuncSGIS -.type glDetailTexFuncSGIS,#function -glDetailTexFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DetailTexFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_DetailTexFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DetailTexFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetDetailTexFuncSGIS -.type glGetDetailTexFuncSGIS,#function -glGetDetailTexFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetDetailTexFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_GetDetailTexFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetDetailTexFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSharpenTexFuncSGIS -.type glSharpenTexFuncSGIS,#function -glSharpenTexFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SharpenTexFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_SharpenTexFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SharpenTexFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetSharpenTexFuncSGIS -.type glGetSharpenTexFuncSGIS,#function -glGetSharpenTexFuncSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetSharpenTexFuncSGIS), %g2 - or %g2, %lo(8 * _gloffset_GetSharpenTexFuncSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetSharpenTexFuncSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSampleMaskSGIS -.type glSampleMaskSGIS,#function -glSampleMaskSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SampleMaskSGIS), %g2 - or %g2, %lo(8 * _gloffset_SampleMaskSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SampleMaskSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSamplePatternSGIS -.type glSamplePatternSGIS,#function -glSamplePatternSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SamplePatternSGIS), %g2 - or %g2, %lo(8 * _gloffset_SamplePatternSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SamplePatternSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glArrayElementEXT -.type glArrayElementEXT,#function -glArrayElementEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ArrayElement), %g2 - or %g2, %lo(8 * _gloffset_ArrayElement), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ArrayElement)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorPointerEXT -.type glColorPointerEXT,#function -glColorPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_ColorPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawArraysEXT -.type glDrawArraysEXT,#function -glDrawArraysEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawArrays), %g2 - or %g2, %lo(8 * _gloffset_DrawArrays), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawArrays)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glEdgeFlagPointerEXT -.type glEdgeFlagPointerEXT,#function -glEdgeFlagPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_EdgeFlagPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_EdgeFlagPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_EdgeFlagPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetPointervEXT -.type glGetPointervEXT,#function -glGetPointervEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetPointerv), %g2 - or %g2, %lo(8 * _gloffset_GetPointerv), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetPointerv)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexPointerEXT -.type glIndexPointerEXT,#function -glIndexPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IndexPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_IndexPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IndexPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glNormalPointerEXT -.type glNormalPointerEXT,#function -glNormalPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_NormalPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_NormalPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_NormalPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTexCoordPointerEXT -.type glTexCoordPointerEXT,#function -glTexCoordPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TexCoordPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_TexCoordPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TexCoordPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexPointerEXT -.type glVertexPointerEXT,#function -glVertexPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_VertexPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendEquationEXT -.type glBlendEquationEXT,#function -glBlendEquationEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendEquation), %g2 - or %g2, %lo(8 * _gloffset_BlendEquation), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendEquation)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSpriteParameterfSGIX -.type glSpriteParameterfSGIX,#function -glSpriteParameterfSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SpriteParameterfSGIX), %g2 - or %g2, %lo(8 * _gloffset_SpriteParameterfSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SpriteParameterfSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSpriteParameterfvSGIX -.type glSpriteParameterfvSGIX,#function -glSpriteParameterfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SpriteParameterfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_SpriteParameterfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SpriteParameterfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSpriteParameteriSGIX -.type glSpriteParameteriSGIX,#function -glSpriteParameteriSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SpriteParameteriSGIX), %g2 - or %g2, %lo(8 * _gloffset_SpriteParameteriSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SpriteParameteriSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSpriteParameterivSGIX -.type glSpriteParameterivSGIX,#function -glSpriteParameterivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SpriteParameterivSGIX), %g2 - or %g2, %lo(8 * _gloffset_SpriteParameterivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SpriteParameterivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfEXT -.type glPointParameterfEXT,#function -glPointParameterfEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfvEXT -.type glPointParameterfvEXT,#function -glPointParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfARB -.type glPointParameterfARB,#function -glPointParameterfARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfvARB -.type glPointParameterfvARB,#function -glPointParameterfvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfSGIS -.type glPointParameterfSGIS,#function -glPointParameterfSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfvSGIS -.type glPointParameterfvSGIS,#function -glPointParameterfvSGIS: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetInstrumentsSGIX -.type glGetInstrumentsSGIX,#function -glGetInstrumentsSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetInstrumentsSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetInstrumentsSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetInstrumentsSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glInstrumentsBufferSGIX -.type glInstrumentsBufferSGIX,#function -glInstrumentsBufferSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_InstrumentsBufferSGIX), %g2 - or %g2, %lo(8 * _gloffset_InstrumentsBufferSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_InstrumentsBufferSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPollInstrumentsSGIX -.type glPollInstrumentsSGIX,#function -glPollInstrumentsSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PollInstrumentsSGIX), %g2 - or %g2, %lo(8 * _gloffset_PollInstrumentsSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PollInstrumentsSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glReadInstrumentsSGIX -.type glReadInstrumentsSGIX,#function -glReadInstrumentsSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ReadInstrumentsSGIX), %g2 - or %g2, %lo(8 * _gloffset_ReadInstrumentsSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ReadInstrumentsSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glStartInstrumentsSGIX -.type glStartInstrumentsSGIX,#function -glStartInstrumentsSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_StartInstrumentsSGIX), %g2 - or %g2, %lo(8 * _gloffset_StartInstrumentsSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_StartInstrumentsSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glStopInstrumentsSGIX -.type glStopInstrumentsSGIX,#function -glStopInstrumentsSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_StopInstrumentsSGIX), %g2 - or %g2, %lo(8 * _gloffset_StopInstrumentsSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_StopInstrumentsSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFrameZoomSGIX -.type glFrameZoomSGIX,#function -glFrameZoomSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FrameZoomSGIX), %g2 - or %g2, %lo(8 * _gloffset_FrameZoomSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FrameZoomSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTagSampleBufferSGIX -.type glTagSampleBufferSGIX,#function -glTagSampleBufferSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TagSampleBufferSGIX), %g2 - or %g2, %lo(8 * _gloffset_TagSampleBufferSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TagSampleBufferSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glReferencePlaneSGIX -.type glReferencePlaneSGIX,#function -glReferencePlaneSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ReferencePlaneSGIX), %g2 - or %g2, %lo(8 * _gloffset_ReferencePlaneSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ReferencePlaneSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFlushRasterSGIX -.type glFlushRasterSGIX,#function -glFlushRasterSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FlushRasterSGIX), %g2 - or %g2, %lo(8 * _gloffset_FlushRasterSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FlushRasterSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorSubTableEXT -.type glColorSubTableEXT,#function -glColorSubTableEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorSubTable), %g2 - or %g2, %lo(8 * _gloffset_ColorSubTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorSubTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCopyColorSubTableEXT -.type glCopyColorSubTableEXT,#function -glCopyColorSubTableEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CopyColorSubTable), %g2 - or %g2, %lo(8 * _gloffset_CopyColorSubTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CopyColorSubTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glHintPGI -.type glHintPGI,#function -glHintPGI: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_HintPGI), %g2 - or %g2, %lo(8 * _gloffset_HintPGI), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_HintPGI)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glColorTableEXT -.type glColorTableEXT,#function -glColorTableEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ColorTable), %g2 - or %g2, %lo(8 * _gloffset_ColorTable), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ColorTable)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableEXT -.type glGetColorTableEXT,#function -glGetColorTableEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableEXT), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameterivEXT -.type glGetColorTableParameterivEXT,#function -glGetColorTableParameterivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameterivEXT), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameterivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameterivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetColorTableParameterfvEXT -.type glGetColorTableParameterfvEXT,#function -glGetColorTableParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetColorTableParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_GetColorTableParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetColorTableParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetListParameterfvSGIX -.type glGetListParameterfvSGIX,#function -glGetListParameterfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetListParameterfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetListParameterfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetListParameterfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetListParameterivSGIX -.type glGetListParameterivSGIX,#function -glGetListParameterivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetListParameterivSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetListParameterivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetListParameterivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glListParameterfSGIX -.type glListParameterfSGIX,#function -glListParameterfSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ListParameterfSGIX), %g2 - or %g2, %lo(8 * _gloffset_ListParameterfSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ListParameterfSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glListParameterfvSGIX -.type glListParameterfvSGIX,#function -glListParameterfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ListParameterfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_ListParameterfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ListParameterfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glListParameteriSGIX -.type glListParameteriSGIX,#function -glListParameteriSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ListParameteriSGIX), %g2 - or %g2, %lo(8 * _gloffset_ListParameteriSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ListParameteriSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glListParameterivSGIX -.type glListParameterivSGIX,#function -glListParameterivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ListParameterivSGIX), %g2 - or %g2, %lo(8 * _gloffset_ListParameterivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ListParameterivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexMaterialEXT -.type glIndexMaterialEXT,#function -glIndexMaterialEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IndexMaterialEXT), %g2 - or %g2, %lo(8 * _gloffset_IndexMaterialEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IndexMaterialEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIndexFuncEXT -.type glIndexFuncEXT,#function -glIndexFuncEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IndexFuncEXT), %g2 - or %g2, %lo(8 * _gloffset_IndexFuncEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IndexFuncEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLockArraysEXT -.type glLockArraysEXT,#function -glLockArraysEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LockArraysEXT), %g2 - or %g2, %lo(8 * _gloffset_LockArraysEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LockArraysEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glUnlockArraysEXT -.type glUnlockArraysEXT,#function -glUnlockArraysEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_UnlockArraysEXT), %g2 - or %g2, %lo(8 * _gloffset_UnlockArraysEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_UnlockArraysEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCullParameterdvEXT -.type glCullParameterdvEXT,#function -glCullParameterdvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CullParameterdvEXT), %g2 - or %g2, %lo(8 * _gloffset_CullParameterdvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CullParameterdvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCullParameterfvEXT -.type glCullParameterfvEXT,#function -glCullParameterfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CullParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_CullParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CullParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentColorMaterialSGIX -.type glFragmentColorMaterialSGIX,#function -glFragmentColorMaterialSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentColorMaterialSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentColorMaterialSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentColorMaterialSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightfSGIX -.type glFragmentLightfSGIX,#function -glFragmentLightfSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightfSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightfSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightfSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightfvSGIX -.type glFragmentLightfvSGIX,#function -glFragmentLightfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightiSGIX -.type glFragmentLightiSGIX,#function -glFragmentLightiSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightiSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightiSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightiSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightivSGIX -.type glFragmentLightivSGIX,#function -glFragmentLightivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightivSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightModelfSGIX -.type glFragmentLightModelfSGIX,#function -glFragmentLightModelfSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightModelfSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightModelfSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightModelfSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightModelfvSGIX -.type glFragmentLightModelfvSGIX,#function -glFragmentLightModelfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightModelfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightModelfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightModelfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightModeliSGIX -.type glFragmentLightModeliSGIX,#function -glFragmentLightModeliSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightModeliSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightModeliSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightModeliSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentLightModelivSGIX -.type glFragmentLightModelivSGIX,#function -glFragmentLightModelivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentLightModelivSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentLightModelivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentLightModelivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentMaterialfSGIX -.type glFragmentMaterialfSGIX,#function -glFragmentMaterialfSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentMaterialfSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentMaterialfSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentMaterialfSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentMaterialfvSGIX -.type glFragmentMaterialfvSGIX,#function -glFragmentMaterialfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentMaterialfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentMaterialfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentMaterialfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentMaterialiSGIX -.type glFragmentMaterialiSGIX,#function -glFragmentMaterialiSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentMaterialiSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentMaterialiSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentMaterialiSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFragmentMaterialivSGIX -.type glFragmentMaterialivSGIX,#function -glFragmentMaterialivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FragmentMaterialivSGIX), %g2 - or %g2, %lo(8 * _gloffset_FragmentMaterialivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FragmentMaterialivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFragmentLightfvSGIX -.type glGetFragmentLightfvSGIX,#function -glGetFragmentLightfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFragmentLightfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetFragmentLightfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFragmentLightfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFragmentLightivSGIX -.type glGetFragmentLightivSGIX,#function -glGetFragmentLightivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFragmentLightivSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetFragmentLightivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFragmentLightivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFragmentMaterialfvSGIX -.type glGetFragmentMaterialfvSGIX,#function -glGetFragmentMaterialfvSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFragmentMaterialfvSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetFragmentMaterialfvSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFragmentMaterialfvSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFragmentMaterialivSGIX -.type glGetFragmentMaterialivSGIX,#function -glGetFragmentMaterialivSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFragmentMaterialivSGIX), %g2 - or %g2, %lo(8 * _gloffset_GetFragmentMaterialivSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFragmentMaterialivSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLightEnviSGIX -.type glLightEnviSGIX,#function -glLightEnviSGIX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LightEnviSGIX), %g2 - or %g2, %lo(8 * _gloffset_LightEnviSGIX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LightEnviSGIX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDrawRangeElementsEXT -.type glDrawRangeElementsEXT,#function -glDrawRangeElementsEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DrawRangeElements), %g2 - or %g2, %lo(8 * _gloffset_DrawRangeElements), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DrawRangeElements)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3bEXT -.type glSecondaryColor3bEXT,#function -glSecondaryColor3bEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3bEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3bEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3bEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3bvEXT -.type glSecondaryColor3bvEXT,#function -glSecondaryColor3bvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3bvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3bvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3bvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3dEXT -.type glSecondaryColor3dEXT,#function -glSecondaryColor3dEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3dEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3dEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3dEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3dvEXT -.type glSecondaryColor3dvEXT,#function -glSecondaryColor3dvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3dvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3dvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3dvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3fEXT -.type glSecondaryColor3fEXT,#function -glSecondaryColor3fEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3fEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3fEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3fEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3fvEXT -.type glSecondaryColor3fvEXT,#function -glSecondaryColor3fvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3fvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3fvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3fvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3iEXT -.type glSecondaryColor3iEXT,#function -glSecondaryColor3iEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3iEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3iEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3iEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ivEXT -.type glSecondaryColor3ivEXT,#function -glSecondaryColor3ivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ivEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3sEXT -.type glSecondaryColor3sEXT,#function -glSecondaryColor3sEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3sEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3sEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3sEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3svEXT -.type glSecondaryColor3svEXT,#function -glSecondaryColor3svEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3svEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3svEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3svEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ubEXT -.type glSecondaryColor3ubEXT,#function -glSecondaryColor3ubEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ubEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ubEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ubEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ubvEXT -.type glSecondaryColor3ubvEXT,#function -glSecondaryColor3ubvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ubvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ubvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ubvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3uiEXT -.type glSecondaryColor3uiEXT,#function -glSecondaryColor3uiEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3uiEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3uiEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3uiEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3uivEXT -.type glSecondaryColor3uivEXT,#function -glSecondaryColor3uivEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3uivEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3uivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3uivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3usEXT -.type glSecondaryColor3usEXT,#function -glSecondaryColor3usEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3usEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3usEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3usEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3usvEXT -.type glSecondaryColor3usvEXT,#function -glSecondaryColor3usvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3usvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3usvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3usvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColorPointerEXT -.type glSecondaryColorPointerEXT,#function -glSecondaryColorPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColorPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColorPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColorPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiDrawArraysEXT -.type glMultiDrawArraysEXT,#function -glMultiDrawArraysEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiDrawArraysEXT), %g2 - or %g2, %lo(8 * _gloffset_MultiDrawArraysEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiDrawArraysEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiDrawElementsEXT -.type glMultiDrawElementsEXT,#function -glMultiDrawElementsEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiDrawElementsEXT), %g2 - or %g2, %lo(8 * _gloffset_MultiDrawElementsEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiDrawElementsEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordfEXT -.type glFogCoordfEXT,#function -glFogCoordfEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordfEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordfvEXT -.type glFogCoordfvEXT,#function -glFogCoordfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordfvEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoorddEXT -.type glFogCoorddEXT,#function -glFogCoorddEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoorddEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoorddEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoorddEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoorddvEXT -.type glFogCoorddvEXT,#function -glFogCoorddvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoorddvEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoorddvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoorddvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordPointerEXT -.type glFogCoordPointerEXT,#function -glFogCoordPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendFuncSeparateEXT -.type glBlendFuncSeparateEXT,#function -glBlendFuncSeparateEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendFuncSeparateEXT), %g2 - or %g2, %lo(8 * _gloffset_BlendFuncSeparateEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendFuncSeparateEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendFuncSeparateINGR -.type glBlendFuncSeparateINGR,#function -glBlendFuncSeparateINGR: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendFuncSeparateEXT), %g2 - or %g2, %lo(8 * _gloffset_BlendFuncSeparateEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendFuncSeparateEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexWeightfEXT -.type glVertexWeightfEXT,#function -glVertexWeightfEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexWeightfEXT), %g2 - or %g2, %lo(8 * _gloffset_VertexWeightfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexWeightfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexWeightfvEXT -.type glVertexWeightfvEXT,#function -glVertexWeightfvEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexWeightfvEXT), %g2 - or %g2, %lo(8 * _gloffset_VertexWeightfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexWeightfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexWeightPointerEXT -.type glVertexWeightPointerEXT,#function -glVertexWeightPointerEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexWeightPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_VertexWeightPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexWeightPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFlushVertexArrayRangeNV -.type glFlushVertexArrayRangeNV,#function -glFlushVertexArrayRangeNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FlushVertexArrayRangeNV), %g2 - or %g2, %lo(8 * _gloffset_FlushVertexArrayRangeNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FlushVertexArrayRangeNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexArrayRangeNV -.type glVertexArrayRangeNV,#function -glVertexArrayRangeNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexArrayRangeNV), %g2 - or %g2, %lo(8 * _gloffset_VertexArrayRangeNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexArrayRangeNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerParameterfvNV -.type glCombinerParameterfvNV,#function -glCombinerParameterfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerParameterfvNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerParameterfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerParameterfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerParameterfNV -.type glCombinerParameterfNV,#function -glCombinerParameterfNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerParameterfNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerParameterfNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerParameterfNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerParameterivNV -.type glCombinerParameterivNV,#function -glCombinerParameterivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerParameteriNV -.type glCombinerParameteriNV,#function -glCombinerParameteriNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerParameteriNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerParameteriNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerParameteriNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerInputNV -.type glCombinerInputNV,#function -glCombinerInputNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerInputNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerInputNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerInputNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glCombinerOutputNV -.type glCombinerOutputNV,#function -glCombinerOutputNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_CombinerOutputNV), %g2 - or %g2, %lo(8 * _gloffset_CombinerOutputNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_CombinerOutputNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFinalCombinerInputNV -.type glFinalCombinerInputNV,#function -glFinalCombinerInputNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FinalCombinerInputNV), %g2 - or %g2, %lo(8 * _gloffset_FinalCombinerInputNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FinalCombinerInputNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCombinerInputParameterfvNV -.type glGetCombinerInputParameterfvNV,#function -glGetCombinerInputParameterfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCombinerInputParameterfvNV), %g2 - or %g2, %lo(8 * _gloffset_GetCombinerInputParameterfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCombinerInputParameterfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCombinerInputParameterivNV -.type glGetCombinerInputParameterivNV,#function -glGetCombinerInputParameterivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCombinerInputParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_GetCombinerInputParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCombinerInputParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCombinerOutputParameterfvNV -.type glGetCombinerOutputParameterfvNV,#function -glGetCombinerOutputParameterfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCombinerOutputParameterfvNV), %g2 - or %g2, %lo(8 * _gloffset_GetCombinerOutputParameterfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCombinerOutputParameterfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetCombinerOutputParameterivNV -.type glGetCombinerOutputParameterivNV,#function -glGetCombinerOutputParameterivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetCombinerOutputParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_GetCombinerOutputParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetCombinerOutputParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFinalCombinerInputParameterfvNV -.type glGetFinalCombinerInputParameterfvNV,#function -glGetFinalCombinerInputParameterfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFinalCombinerInputParameterfvNV), %g2 - or %g2, %lo(8 * _gloffset_GetFinalCombinerInputParameterfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFinalCombinerInputParameterfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFinalCombinerInputParameterivNV -.type glGetFinalCombinerInputParameterivNV,#function -glGetFinalCombinerInputParameterivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFinalCombinerInputParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_GetFinalCombinerInputParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFinalCombinerInputParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glResizeBuffersMESA -.type glResizeBuffersMESA,#function -glResizeBuffersMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ResizeBuffersMESA), %g2 - or %g2, %lo(8 * _gloffset_ResizeBuffersMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ResizeBuffersMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2dMESA -.type glWindowPos2dMESA,#function -glWindowPos2dMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2dvMESA -.type glWindowPos2dvMESA,#function -glWindowPos2dvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2fMESA -.type glWindowPos2fMESA,#function -glWindowPos2fMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2fvMESA -.type glWindowPos2fvMESA,#function -glWindowPos2fvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2iMESA -.type glWindowPos2iMESA,#function -glWindowPos2iMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2ivMESA -.type glWindowPos2ivMESA,#function -glWindowPos2ivMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2sMESA -.type glWindowPos2sMESA,#function -glWindowPos2sMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2svMESA -.type glWindowPos2svMESA,#function -glWindowPos2svMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3dMESA -.type glWindowPos3dMESA,#function -glWindowPos3dMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3dvMESA -.type glWindowPos3dvMESA,#function -glWindowPos3dvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3fMESA -.type glWindowPos3fMESA,#function -glWindowPos3fMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3fvMESA -.type glWindowPos3fvMESA,#function -glWindowPos3fvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3iMESA -.type glWindowPos3iMESA,#function -glWindowPos3iMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3ivMESA -.type glWindowPos3ivMESA,#function -glWindowPos3ivMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3sMESA -.type glWindowPos3sMESA,#function -glWindowPos3sMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3svMESA -.type glWindowPos3svMESA,#function -glWindowPos3svMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4dMESA -.type glWindowPos4dMESA,#function -glWindowPos4dMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4dvMESA -.type glWindowPos4dvMESA,#function -glWindowPos4dvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4fMESA -.type glWindowPos4fMESA,#function -glWindowPos4fMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4fvMESA -.type glWindowPos4fvMESA,#function -glWindowPos4fvMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4iMESA -.type glWindowPos4iMESA,#function -glWindowPos4iMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4ivMESA -.type glWindowPos4ivMESA,#function -glWindowPos4ivMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4sMESA -.type glWindowPos4sMESA,#function -glWindowPos4sMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos4svMESA -.type glWindowPos4svMESA,#function -glWindowPos4svMESA: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos4svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos4svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos4svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTbufferMask3DFX -.type glTbufferMask3DFX,#function -glTbufferMask3DFX: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TbufferMask3DFX), %g2 - or %g2, %lo(8 * _gloffset_TbufferMask3DFX), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TbufferMask3DFX)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSampleMaskEXT -.type glSampleMaskEXT,#function -glSampleMaskEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SampleMaskSGIS), %g2 - or %g2, %lo(8 * _gloffset_SampleMaskSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SampleMaskSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSamplePatternEXT -.type glSamplePatternEXT,#function -glSamplePatternEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SamplePatternSGIS), %g2 - or %g2, %lo(8 * _gloffset_SamplePatternSGIS), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SamplePatternSGIS)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDeleteFencesNV -.type glDeleteFencesNV,#function -glDeleteFencesNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DeleteFencesNV), %g2 - or %g2, %lo(8 * _gloffset_DeleteFencesNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DeleteFencesNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGenFencesNV -.type glGenFencesNV,#function -glGenFencesNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GenFencesNV), %g2 - or %g2, %lo(8 * _gloffset_GenFencesNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GenFencesNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsFenceNV -.type glIsFenceNV,#function -glIsFenceNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsFenceNV), %g2 - or %g2, %lo(8 * _gloffset_IsFenceNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsFenceNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTestFenceNV -.type glTestFenceNV,#function -glTestFenceNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TestFenceNV), %g2 - or %g2, %lo(8 * _gloffset_TestFenceNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TestFenceNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetFenceivNV -.type glGetFenceivNV,#function -glGetFenceivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetFenceivNV), %g2 - or %g2, %lo(8 * _gloffset_GetFenceivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetFenceivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFinishFenceNV -.type glFinishFenceNV,#function -glFinishFenceNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FinishFenceNV), %g2 - or %g2, %lo(8 * _gloffset_FinishFenceNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FinishFenceNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSetFenceNV -.type glSetFenceNV,#function -glSetFenceNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SetFenceNV), %g2 - or %g2, %lo(8 * _gloffset_SetFenceNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SetFenceNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2dARB -.type glWindowPos2dARB,#function -glWindowPos2dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2fARB -.type glWindowPos2fARB,#function -glWindowPos2fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2iARB -.type glWindowPos2iARB,#function -glWindowPos2iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2sARB -.type glWindowPos2sARB,#function -glWindowPos2sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2dvARB -.type glWindowPos2dvARB,#function -glWindowPos2dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2fvARB -.type glWindowPos2fvARB,#function -glWindowPos2fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2ivARB -.type glWindowPos2ivARB,#function -glWindowPos2ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2svARB -.type glWindowPos2svARB,#function -glWindowPos2svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3dARB -.type glWindowPos3dARB,#function -glWindowPos3dARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3fARB -.type glWindowPos3fARB,#function -glWindowPos3fARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3iARB -.type glWindowPos3iARB,#function -glWindowPos3iARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3sARB -.type glWindowPos3sARB,#function -glWindowPos3sARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3dvARB -.type glWindowPos3dvARB,#function -glWindowPos3dvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3fvARB -.type glWindowPos3fvARB,#function -glWindowPos3fvARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3ivARB -.type glWindowPos3ivARB,#function -glWindowPos3ivARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3svARB -.type glWindowPos3svARB,#function -glWindowPos3svARB: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glAreProgramsResidentNV -.type glAreProgramsResidentNV,#function -glAreProgramsResidentNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_AreProgramsResidentNV), %g2 - or %g2, %lo(8 * _gloffset_AreProgramsResidentNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_AreProgramsResidentNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBindProgramNV -.type glBindProgramNV,#function -glBindProgramNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BindProgramNV), %g2 - or %g2, %lo(8 * _gloffset_BindProgramNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BindProgramNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glDeleteProgramsNV -.type glDeleteProgramsNV,#function -glDeleteProgramsNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_DeleteProgramsNV), %g2 - or %g2, %lo(8 * _gloffset_DeleteProgramsNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_DeleteProgramsNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glExecuteProgramNV -.type glExecuteProgramNV,#function -glExecuteProgramNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ExecuteProgramNV), %g2 - or %g2, %lo(8 * _gloffset_ExecuteProgramNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ExecuteProgramNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGenProgramsNV -.type glGenProgramsNV,#function -glGenProgramsNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GenProgramsNV), %g2 - or %g2, %lo(8 * _gloffset_GenProgramsNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GenProgramsNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetProgramParameterdvNV -.type glGetProgramParameterdvNV,#function -glGetProgramParameterdvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetProgramParameterdvNV), %g2 - or %g2, %lo(8 * _gloffset_GetProgramParameterdvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetProgramParameterdvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetProgramParameterfvNV -.type glGetProgramParameterfvNV,#function -glGetProgramParameterfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetProgramParameterfvNV), %g2 - or %g2, %lo(8 * _gloffset_GetProgramParameterfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetProgramParameterfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetProgramivNV -.type glGetProgramivNV,#function -glGetProgramivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetProgramivNV), %g2 - or %g2, %lo(8 * _gloffset_GetProgramivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetProgramivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetProgramStringNV -.type glGetProgramStringNV,#function -glGetProgramStringNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetProgramStringNV), %g2 - or %g2, %lo(8 * _gloffset_GetProgramStringNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetProgramStringNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetTrackMatrixivNV -.type glGetTrackMatrixivNV,#function -glGetTrackMatrixivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetTrackMatrixivNV), %g2 - or %g2, %lo(8 * _gloffset_GetTrackMatrixivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetTrackMatrixivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetVertexAttribdvNV -.type glGetVertexAttribdvNV,#function -glGetVertexAttribdvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetVertexAttribdvNV), %g2 - or %g2, %lo(8 * _gloffset_GetVertexAttribdvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetVertexAttribdvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetVertexAttribfvNV -.type glGetVertexAttribfvNV,#function -glGetVertexAttribfvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetVertexAttribfvNV), %g2 - or %g2, %lo(8 * _gloffset_GetVertexAttribfvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetVertexAttribfvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetVertexAttribivNV -.type glGetVertexAttribivNV,#function -glGetVertexAttribivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetVertexAttribivNV), %g2 - or %g2, %lo(8 * _gloffset_GetVertexAttribivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetVertexAttribivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glGetVertexAttribPointervNV -.type glGetVertexAttribPointervNV,#function -glGetVertexAttribPointervNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_GetVertexAttribPointervNV), %g2 - or %g2, %lo(8 * _gloffset_GetVertexAttribPointervNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_GetVertexAttribPointervNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glIsProgramNV -.type glIsProgramNV,#function -glIsProgramNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_IsProgramNV), %g2 - or %g2, %lo(8 * _gloffset_IsProgramNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_IsProgramNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glLoadProgramNV -.type glLoadProgramNV,#function -glLoadProgramNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_LoadProgramNV), %g2 - or %g2, %lo(8 * _gloffset_LoadProgramNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_LoadProgramNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameter4dNV -.type glProgramParameter4dNV,#function -glProgramParameter4dNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameter4dNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameter4dNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameter4dNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameter4dvNV -.type glProgramParameter4dvNV,#function -glProgramParameter4dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameter4dvNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameter4dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameter4dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameter4fNV -.type glProgramParameter4fNV,#function -glProgramParameter4fNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameter4fNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameter4fNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameter4fNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameter4fvNV -.type glProgramParameter4fvNV,#function -glProgramParameter4fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameter4fvNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameter4fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameter4fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameters4dvNV -.type glProgramParameters4dvNV,#function -glProgramParameters4dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameters4dvNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameters4dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameters4dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glProgramParameters4fvNV -.type glProgramParameters4fvNV,#function -glProgramParameters4fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ProgramParameters4fvNV), %g2 - or %g2, %lo(8 * _gloffset_ProgramParameters4fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ProgramParameters4fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glRequestResidentProgramsNV -.type glRequestResidentProgramsNV,#function -glRequestResidentProgramsNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_RequestResidentProgramsNV), %g2 - or %g2, %lo(8 * _gloffset_RequestResidentProgramsNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_RequestResidentProgramsNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glTrackMatrixNV -.type glTrackMatrixNV,#function -glTrackMatrixNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_TrackMatrixNV), %g2 - or %g2, %lo(8 * _gloffset_TrackMatrixNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_TrackMatrixNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribPointerNV -.type glVertexAttribPointerNV,#function -glVertexAttribPointerNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribPointerNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribPointerNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribPointerNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1dNV -.type glVertexAttrib1dNV,#function -glVertexAttrib1dNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1dNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1dNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1dNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1dvNV -.type glVertexAttrib1dvNV,#function -glVertexAttrib1dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1fNV -.type glVertexAttrib1fNV,#function -glVertexAttrib1fNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1fNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1fNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1fNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1fvNV -.type glVertexAttrib1fvNV,#function -glVertexAttrib1fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1sNV -.type glVertexAttrib1sNV,#function -glVertexAttrib1sNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1sNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1sNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1sNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib1svNV -.type glVertexAttrib1svNV,#function -glVertexAttrib1svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib1svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib1svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib1svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2dNV -.type glVertexAttrib2dNV,#function -glVertexAttrib2dNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2dNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2dNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2dNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2dvNV -.type glVertexAttrib2dvNV,#function -glVertexAttrib2dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2fNV -.type glVertexAttrib2fNV,#function -glVertexAttrib2fNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2fNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2fNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2fNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2fvNV -.type glVertexAttrib2fvNV,#function -glVertexAttrib2fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2sNV -.type glVertexAttrib2sNV,#function -glVertexAttrib2sNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2sNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2sNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2sNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib2svNV -.type glVertexAttrib2svNV,#function -glVertexAttrib2svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib2svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib2svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib2svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3dNV -.type glVertexAttrib3dNV,#function -glVertexAttrib3dNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3dNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3dNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3dNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3dvNV -.type glVertexAttrib3dvNV,#function -glVertexAttrib3dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3fNV -.type glVertexAttrib3fNV,#function -glVertexAttrib3fNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3fNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3fNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3fNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3fvNV -.type glVertexAttrib3fvNV,#function -glVertexAttrib3fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3sNV -.type glVertexAttrib3sNV,#function -glVertexAttrib3sNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3sNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3sNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3sNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib3svNV -.type glVertexAttrib3svNV,#function -glVertexAttrib3svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib3svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib3svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib3svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4dNV -.type glVertexAttrib4dNV,#function -glVertexAttrib4dNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4dNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4dNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4dNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4dvNV -.type glVertexAttrib4dvNV,#function -glVertexAttrib4dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4fNV -.type glVertexAttrib4fNV,#function -glVertexAttrib4fNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4fNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4fNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4fNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4fvNV -.type glVertexAttrib4fvNV,#function -glVertexAttrib4fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4sNV -.type glVertexAttrib4sNV,#function -glVertexAttrib4sNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4sNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4sNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4sNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4svNV -.type glVertexAttrib4svNV,#function -glVertexAttrib4svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4ubNV -.type glVertexAttrib4ubNV,#function -glVertexAttrib4ubNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4ubNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4ubNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4ubNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttrib4ubvNV -.type glVertexAttrib4ubvNV,#function -glVertexAttrib4ubvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttrib4ubvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttrib4ubvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttrib4ubvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs1dvNV -.type glVertexAttribs1dvNV,#function -glVertexAttribs1dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs1dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs1dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs1dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs1fvNV -.type glVertexAttribs1fvNV,#function -glVertexAttribs1fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs1fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs1fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs1fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs1svNV -.type glVertexAttribs1svNV,#function -glVertexAttribs1svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs1svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs1svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs1svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs2dvNV -.type glVertexAttribs2dvNV,#function -glVertexAttribs2dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs2dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs2dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs2dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs2fvNV -.type glVertexAttribs2fvNV,#function -glVertexAttribs2fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs2fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs2fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs2fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs2svNV -.type glVertexAttribs2svNV,#function -glVertexAttribs2svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs2svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs2svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs2svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs3dvNV -.type glVertexAttribs3dvNV,#function -glVertexAttribs3dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs3dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs3dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs3dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs3fvNV -.type glVertexAttribs3fvNV,#function -glVertexAttribs3fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs3fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs3fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs3fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs3svNV -.type glVertexAttribs3svNV,#function -glVertexAttribs3svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs3svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs3svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs3svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs4dvNV -.type glVertexAttribs4dvNV,#function -glVertexAttribs4dvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs4dvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs4dvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs4dvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs4fvNV -.type glVertexAttribs4fvNV,#function -glVertexAttribs4fvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs4fvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs4fvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs4fvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs4svNV -.type glVertexAttribs4svNV,#function -glVertexAttribs4svNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs4svNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs4svNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs4svNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glVertexAttribs4ubvNV -.type glVertexAttribs4ubvNV,#function -glVertexAttribs4ubvNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_VertexAttribs4ubvNV), %g2 - or %g2, %lo(8 * _gloffset_VertexAttribs4ubvNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_VertexAttribs4ubvNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameteriNV -.type glPointParameteriNV,#function -glPointParameteriNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameteriNV), %g2 - or %g2, %lo(8 * _gloffset_PointParameteriNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameteriNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterivNV -.type glPointParameterivNV,#function -glPointParameterivNV: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_PointParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glBlendFuncSeparate -.type glBlendFuncSeparate,#function -glBlendFuncSeparate: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_BlendFuncSeparateEXT), %g2 - or %g2, %lo(8 * _gloffset_BlendFuncSeparateEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_BlendFuncSeparateEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordf -.type glFogCoordf,#function -glFogCoordf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordfEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordfv -.type glFogCoordfv,#function -glFogCoordfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordfvEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordd -.type glFogCoordd,#function -glFogCoordd: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoorddEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoorddEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoorddEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoorddv -.type glFogCoorddv,#function -glFogCoorddv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoorddvEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoorddvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoorddvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glFogCoordPointer -.type glFogCoordPointer,#function -glFogCoordPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_FogCoordPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_FogCoordPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_FogCoordPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiDrawArrays -.type glMultiDrawArrays,#function -glMultiDrawArrays: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiDrawArraysEXT), %g2 - or %g2, %lo(8 * _gloffset_MultiDrawArraysEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiDrawArraysEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glMultiDrawElements -.type glMultiDrawElements,#function -glMultiDrawElements: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_MultiDrawElementsEXT), %g2 - or %g2, %lo(8 * _gloffset_MultiDrawElementsEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_MultiDrawElementsEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterf -.type glPointParameterf,#function -glPointParameterf: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameterfv -.type glPointParameterfv,#function -glPointParameterfv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterfvEXT), %g2 - or %g2, %lo(8 * _gloffset_PointParameterfvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterfvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameteri -.type glPointParameteri,#function -glPointParameteri: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameteriNV), %g2 - or %g2, %lo(8 * _gloffset_PointParameteriNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameteriNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glPointParameteriv -.type glPointParameteriv,#function -glPointParameteriv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_PointParameterivNV), %g2 - or %g2, %lo(8 * _gloffset_PointParameterivNV), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_PointParameterivNV)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3b -.type glSecondaryColor3b,#function -glSecondaryColor3b: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3bEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3bEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3bEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3bv -.type glSecondaryColor3bv,#function -glSecondaryColor3bv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3bvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3bvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3bvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3d -.type glSecondaryColor3d,#function -glSecondaryColor3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3dEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3dEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3dEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3dv -.type glSecondaryColor3dv,#function -glSecondaryColor3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3dvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3dvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3dvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3f -.type glSecondaryColor3f,#function -glSecondaryColor3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3fEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3fEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3fEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3fv -.type glSecondaryColor3fv,#function -glSecondaryColor3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3fvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3fvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3fvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3i -.type glSecondaryColor3i,#function -glSecondaryColor3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3iEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3iEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3iEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3iv -.type glSecondaryColor3iv,#function -glSecondaryColor3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ivEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3s -.type glSecondaryColor3s,#function -glSecondaryColor3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3sEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3sEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3sEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3sv -.type glSecondaryColor3sv,#function -glSecondaryColor3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3svEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3svEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3svEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ub -.type glSecondaryColor3ub,#function -glSecondaryColor3ub: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ubEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ubEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ubEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ubv -.type glSecondaryColor3ubv,#function -glSecondaryColor3ubv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3ubvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3ubvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3ubvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3ui -.type glSecondaryColor3ui,#function -glSecondaryColor3ui: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3uiEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3uiEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3uiEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3uiv -.type glSecondaryColor3uiv,#function -glSecondaryColor3uiv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3uivEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3uivEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3uivEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3us -.type glSecondaryColor3us,#function -glSecondaryColor3us: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3usEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3usEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3usEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColor3usv -.type glSecondaryColor3usv,#function -glSecondaryColor3usv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColor3usvEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColor3usvEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColor3usvEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glSecondaryColorPointer -.type glSecondaryColorPointer,#function -glSecondaryColorPointer: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_SecondaryColorPointerEXT), %g2 - or %g2, %lo(8 * _gloffset_SecondaryColorPointerEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_SecondaryColorPointerEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2d -.type glWindowPos2d,#function -glWindowPos2d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2dv -.type glWindowPos2dv,#function -glWindowPos2dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2f -.type glWindowPos2f,#function -glWindowPos2f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2fv -.type glWindowPos2fv,#function -glWindowPos2fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2i -.type glWindowPos2i,#function -glWindowPos2i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2iv -.type glWindowPos2iv,#function -glWindowPos2iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2s -.type glWindowPos2s,#function -glWindowPos2s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos2sv -.type glWindowPos2sv,#function -glWindowPos2sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos2svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos2svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos2svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3d -.type glWindowPos3d,#function -glWindowPos3d: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3dv -.type glWindowPos3dv,#function -glWindowPos3dv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3dvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3dvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3dvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3f -.type glWindowPos3f,#function -glWindowPos3f: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3fv -.type glWindowPos3fv,#function -glWindowPos3fv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3fvMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3fvMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3fvMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3i -.type glWindowPos3i,#function -glWindowPos3i: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3iMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3iMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3iMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3iv -.type glWindowPos3iv,#function -glWindowPos3iv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3ivMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3ivMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3ivMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3s -.type glWindowPos3s,#function -glWindowPos3s: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3sMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3sMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3sMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glWindowPos3sv -.type glWindowPos3sv,#function -glWindowPos3sv: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_WindowPos3svMESA), %g2 - or %g2, %lo(8 * _gloffset_WindowPos3svMESA), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_WindowPos3svMESA)], %g3 -#endif - jmpl %g3, %g0 - nop - -.globl glActiveStencilFaceEXT -.type glActiveStencilFaceEXT,#function -glActiveStencilFaceEXT: -#ifdef SPARC_64BIT_ADDR - sethi %hi(0x00000000), %g2 - sethi %hi(0x00000000), %g1 - or %g2, %lo(0x00000000), %g2 - or %g1, %lo(0x00000000), %g1 - sllx %g2, 32, %g2 - ldx [%g1 + %g2], %g1 - sethi %hi(8 * _gloffset_ActiveStencilFaceEXT), %g2 - or %g2, %lo(8 * _gloffset_ActiveStencilFaceEXT), %g2 - ldx [%g1 + %g2], %g3 -#else - sethi %hi(0x00000000), %g1 - ld [%g1 + %lo(0x00000000)], %g1 - ld [%g1 + (4 * _gloffset_ActiveStencilFaceEXT)], %g3 -#endif - jmpl %g3, %g0 - nop - nop - -.globl _mesa_sparc_glapi_end -.type _mesa_sparc_glapi_end,#function -_mesa_sparc_glapi_end: - Index: xc/extras/Mesa/src/SPARC/norm.S diff -u xc/extras/Mesa/src/SPARC/norm.S:1.3 xc/extras/Mesa/src/SPARC/norm.S:removed --- xc/extras/Mesa/src/SPARC/norm.S:1.3 Tue Dec 2 15:27:34 2003 +++ xc/extras/Mesa/src/SPARC/norm.S Wed Mar 16 21:00:45 2005 @@ -1,609 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/SPARC/norm.S,v 1.3 2003/12/02 20:27:34 dawes Exp $ */ - -#include "sparc_matrix.h" - -#if defined(__sparc_v9__) && !defined(__linux__) -#undef SPARC_64BIT_ADDR -#define SPARC_64BIT_ADDR -#endif - - - .text - -#ifdef SPARC_64BIT_ADDR -#define STACK_VAR_OFF (2047 + (8 * 16)) -#else -#define STACK_VAR_OFF (4 * 16) -#endif - - /* Newton-Raphson approximation turns out to be slower - * (and less accurate) than direct fsqrts/fdivs. - */ -#define ONE_DOT_ZERO 0x3f800000 - - .globl _mesa_sparc_transform_normalize_normals -_mesa_sparc_transform_normalize_normals: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - - sethi %hi(ONE_DOT_ZERO), %g2 - sub %sp, 16, %sp - st %g2, [%sp + STACK_VAR_OFF+0x0] - st %o1, [%sp + STACK_VAR_OFF+0x4] - ld [%sp + STACK_VAR_OFF+0x0], %f12 ! f12 = 1.0f - ld [%sp + STACK_VAR_OFF+0x4], %f15 ! f15 = scale - add %sp, 16, %sp - - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_1_2_4_5_6_8_9_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - cmp %o3, 0 - bne 4f - clr %o4 ! 'i' for STRIDE_LOOP - -1: /* LENGTHS == NULL */ - ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) + (uy * m1) + (uz * m2) - * ty (f5) = (ux * m4) + (uy * m5) + (uz * m6) - * tz (f7) = (ux * m8) + (uy * m9) + (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - fmuls %f1, M1, %f4 ! FGM Group - fmuls %f0, M4, %f5 ! FGM Group - fmuls %f1, M5, %f6 ! FGM Group - fmuls %f0, M8, %f7 ! FGM Group f3 available - fmuls %f1, M9, %f8 ! FGM Group f4 available - fadds %f3, %f4, %f3 ! FGA - fmuls %f2, M2, %f10 ! FGM Group f5 available - fmuls %f2, M6, %f0 ! FGM Group f6 available - fadds %f5, %f6, %f5 ! FGA - fmuls %f2, M10, %f4 ! FGM Group f7 available - fadds %f7, %f8, %f7 ! FGA Group f8,f3 available - fadds %f3, %f10, %f3 ! FGA Group f10 available - fadds %f5, %f0, %f5 ! FGA Group stall f0,f5 available - fadds %f7, %f4, %f7 ! FGA Group stall f4,f7 available - - /* f3=tx, f5=ty, f7=tz */ - - /* len (f6) = (tx * tx) + (ty * ty) + (tz * tz) */ - fmuls %f3, %f3, %f6 ! FGM Group f3 available - fmuls %f5, %f5, %f8 ! FGM Group f5 available - fmuls %f7, %f7, %f10 ! FGM Group f7 available - fadds %f6, %f8, %f6 ! FGA Group 2cyc stall f6,f8 available - fadds %f6, %f10, %f6 ! FGA Group 4cyc stall f6,f10 available - - /* scale (f6) = 1.0 / sqrt(len) */ - fsqrts %f6, %f6 ! FDIV 20 cycles - fdivs %f12, %f6, %f6 ! FDIV 14 cycles - - fmuls %f3, %f6, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * scale - fmuls %f5, %f6, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * scale - fmuls %f7, %f6, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * scale - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - - ba 7f - nop - -4: /* LENGTHS != NULL */ - fmuls M0, %f15, M0 - fmuls M1, %f15, M1 - fmuls M2, %f15, M2 - fmuls M4, %f15, M4 - fmuls M5, %f15, M5 - fmuls M6, %f15, M6 - fmuls M8, %f15, M8 - fmuls M9, %f15, M9 - fmuls M10, %f15, M10 - -5: - ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) + (uy * m1) + (uz * m2) - * ty (f5) = (ux * m4) + (uy * m5) + (uz * m6) - * tz (f7) = (ux * m8) + (uy * m9) + (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - fmuls %f1, M1, %f4 ! FGM Group - fmuls %f0, M4, %f5 ! FGM Group - fmuls %f1, M5, %f6 ! FGM Group - fmuls %f0, M8, %f7 ! FGM Group f3 available - fmuls %f1, M9, %f8 ! FGM Group f4 available - fadds %f3, %f4, %f3 ! FGA - fmuls %f2, M2, %f10 ! FGM Group f5 available - fmuls %f2, M6, %f0 ! FGM Group f6 available - fadds %f5, %f6, %f5 ! FGA - fmuls %f2, M10, %f4 ! FGM Group f7 available - fadds %f7, %f8, %f7 ! FGA Group f8,f3 available - fadds %f3, %f10, %f3 ! FGA Group f10 available - ld [%o3], %f13 ! LSU - fadds %f5, %f0, %f5 ! FGA Group stall f0,f5 available - add %o3, 4, %o3 ! IEU0 - fadds %f7, %f4, %f7 ! FGA Group stall f4,f7 available - - /* f3=tx, f5=ty, f7=tz, f13=lengths[i] */ - - fmuls %f3, %f13, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * len - fmuls %f5, %f13, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * len - fmuls %f7, %f13, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * len - - cmp %o4, %g1 ! continue if (i < count) - bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_transform_normalize_normals_no_rot -_mesa_sparc_transform_normalize_normals_no_rot: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - - sethi %hi(ONE_DOT_ZERO), %g2 - sub %sp, 16, %sp - st %g2, [%sp + STACK_VAR_OFF+0x0] - st %o1, [%sp + STACK_VAR_OFF+0x4] - ld [%sp + STACK_VAR_OFF+0x0], %f12 ! f12 = 1.0f - ld [%sp + STACK_VAR_OFF+0x4], %f15 ! f15 = scale - add %sp, 16, %sp - - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_5_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - cmp %o3, 0 - bne 4f - clr %o4 ! 'i' for STRIDE_LOOP - -1: /* LENGTHS == NULL */ - ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) - * ty (f5) = (uy * m5) - * tz (f7) = (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - fmuls %f1, M5, %f5 ! FGM Group - fmuls %f2, M10, %f7 ! FGM Group - - /* f3=tx, f5=ty, f7=tz */ - - /* len (f6) = (tx * tx) + (ty * ty) + (tz * tz) */ - fmuls %f3, %f3, %f6 ! FGM Group stall, f3 available - fmuls %f5, %f5, %f8 ! FGM Group f5 available - fmuls %f7, %f7, %f10 ! FGM Group f7 available - fadds %f6, %f8, %f6 ! FGA Group 2cyc stall f6,f8 available - fadds %f6, %f10, %f6 ! FGA Group 4cyc stall f6,f10 available - - /* scale (f6) = 1.0 / sqrt(len) */ - fsqrts %f6, %f6 ! FDIV 20 cycles - fdivs %f12, %f6, %f6 ! FDIV 14 cycles - - fmuls %f3, %f6, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * scale - fmuls %f5, %f6, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * scale - fmuls %f7, %f6, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * scale - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - - ba 7f - nop - -4: /* LENGTHS != NULL */ - fmuls M0, %f15, M0 - fmuls M5, %f15, M5 - fmuls M10, %f15, M10 - -5: - ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) - * ty (f5) = (uy * m5) - * tz (f7) = (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - ld [%o3], %f13 ! LSU - fmuls %f1, M5, %f5 ! FGM Group - add %o3, 4, %o3 ! IEU0 - fmuls %f2, M10, %f7 ! FGM Group - - /* f3=tx, f5=ty, f7=tz, f13=lengths[i] */ - - fmuls %f3, %f13, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * len - fmuls %f5, %f13, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * len - fmuls %f7, %f13, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * len - - cmp %o4, %g1 ! continue if (i < count) - bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_transform_rescale_normals_no_rot -_mesa_sparc_transform_rescale_normals_no_rot: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - sub %sp, 16, %sp - st %o1, [%sp + STACK_VAR_OFF+0x0] - ld [%sp + STACK_VAR_OFF+0x0], %f15 ! f15 = scale - add %sp, 16, %sp - - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_5_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - clr %o4 ! 'i' for STRIDE_LOOP - - fmuls M0, %f15, M0 - fmuls M5, %f15, M5 - fmuls M10, %f15, M10 - -1: ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) - * ty (f5) = (uy * m5) - * tz (f7) = (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - st %f3, [%g3 + 0x00] ! LSU - fmuls %f1, M5, %f5 ! FGM Group - st %f5, [%g3 + 0x04] ! LSU - fmuls %f2, M10, %f7 ! FGM Group - st %f7, [%g3 + 0x08] ! LSU - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_transform_rescale_normals -_mesa_sparc_transform_rescale_normals: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - sub %sp, 16, %sp - st %o1, [%sp + STACK_VAR_OFF+0x0] - ld [%sp + STACK_VAR_OFF+0x0], %f15 ! f15 = scale - add %sp, 16, %sp - - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_1_2_4_5_6_8_9_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - clr %o4 ! 'i' for STRIDE_LOOP - - fmuls M0, %f15, M0 - fmuls M1, %f15, M1 - fmuls M2, %f15, M2 - fmuls M4, %f15, M4 - fmuls M5, %f15, M5 - fmuls M6, %f15, M6 - fmuls M8, %f15, M8 - fmuls M9, %f15, M9 - fmuls M10, %f15, M10 - -1: ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - fmuls %f0, M0, %f3 ! FGM Group - fmuls %f1, M1, %f4 ! FGM Group - fmuls %f0, M4, %f5 ! FGM Group - fmuls %f1, M5, %f6 ! FGM Group - fmuls %f0, M8, %f7 ! FGM Group f3 available - fmuls %f1, M9, %f8 ! FGM Group f4 available - fadds %f3, %f4, %f3 ! FGA - fmuls %f2, M2, %f10 ! FGM Group f5 available - fmuls %f2, M6, %f0 ! FGM Group f6 available - fadds %f5, %f6, %f5 ! FGA - fmuls %f2, M10, %f4 ! FGM Group f7 available - fadds %f7, %f8, %f7 ! FGA Group f8,f3 available - fadds %f3, %f10, %f3 ! FGA Group f10 available - st %f3, [%g3 + 0x00] ! LSU - fadds %f5, %f0, %f5 ! FGA Group stall f0,f5 available - st %f5, [%g3 + 0x04] ! LSU - fadds %f7, %f4, %f7 ! FGA Group stall f4,f7 available - st %f7, [%g3 + 0x08] ! LSU - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_transform_normals_no_rot -_mesa_sparc_transform_normals_no_rot: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_5_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - clr %o4 ! 'i' for STRIDE_LOOP - -1: ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* tx (f3) = (ux * m0) - * ty (f5) = (uy * m5) - * tz (f7) = (uz * m10) - */ - fmuls %f0, M0, %f3 ! FGM Group - st %f3, [%g3 + 0x00] ! LSU - fmuls %f1, M5, %f5 ! FGM Group - st %f5, [%g3 + 0x04] ! LSU - fmuls %f2, M10, %f7 ! FGM Group - st %f7, [%g3 + 0x08] ! LSU - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_transform_normals -_mesa_sparc_transform_normals: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - LDMATRIX_0_1_2_4_5_6_8_9_10(%o0) - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - clr %o4 ! 'i' for STRIDE_LOOP - -1: ld [%o5 + 0x00], %f0 ! ux = from[0] - ld [%o5 + 0x04], %f1 ! uy = from[1] - ld [%o5 + 0x08], %f2 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - fmuls %f0, M0, %f3 ! FGM Group - fmuls %f1, M1, %f4 ! FGM Group - fmuls %f0, M4, %f5 ! FGM Group - fmuls %f1, M5, %f6 ! FGM Group - fmuls %f0, M8, %f7 ! FGM Group f3 available - fmuls %f1, M9, %f8 ! FGM Group f4 available - fadds %f3, %f4, %f3 ! FGA - fmuls %f2, M2, %f10 ! FGM Group f5 available - fmuls %f2, M6, %f0 ! FGM Group f6 available - fadds %f5, %f6, %f5 ! FGA - fmuls %f2, M10, %f4 ! FGM Group f7 available - fadds %f7, %f8, %f7 ! FGA Group f8,f3 available - fadds %f3, %f10, %f3 ! FGA Group f10 available - st %f3, [%g3 + 0x00] ! LSU - fadds %f5, %f0, %f5 ! FGA Group stall f0,f5 available - st %f5, [%g3 + 0x04] ! LSU - fadds %f7, %f4, %f7 ! FGA Group stall f4,f7 available - st %f7, [%g3 + 0x08] ! LSU - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_normalize_normals -_mesa_sparc_normalize_normals: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - - sethi %hi(ONE_DOT_ZERO), %g2 - sub %sp, 16, %sp - st %g2, [%sp + STACK_VAR_OFF+0x0] - ld [%sp + STACK_VAR_OFF+0x0], %f12 ! f12 = 1.0f - add %sp, 16, %sp - - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - cmp %o3, 0 - bne 4f - clr %o4 ! 'i' for STRIDE_LOOP - -1: /* LENGTHS == NULL */ - ld [%o5 + 0x00], %f3 ! ux = from[0] - ld [%o5 + 0x04], %f5 ! uy = from[1] - ld [%o5 + 0x08], %f7 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* f3=tx, f5=ty, f7=tz */ - - /* len (f6) = (tx * tx) + (ty * ty) + (tz * tz) */ - fmuls %f3, %f3, %f6 ! FGM Group f3 available - fmuls %f5, %f5, %f8 ! FGM Group f5 available - fmuls %f7, %f7, %f10 ! FGM Group f7 available - fadds %f6, %f8, %f6 ! FGA Group 2cyc stall f6,f8 available - fadds %f6, %f10, %f6 ! FGA Group 4cyc stall f6,f10 available - - /* scale (f6) = 1.0 / sqrt(len) */ - fsqrts %f6, %f6 ! FDIV 20 cycles - fdivs %f12, %f6, %f6 ! FDIV 14 cycles - - fmuls %f3, %f6, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * scale - fmuls %f5, %f6, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * scale - fmuls %f7, %f6, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * scale - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - - ba 7f - nop - -4: /* LENGTHS != NULL */ - -5: - ld [%o5 + 0x00], %f3 ! ux = from[0] - ld [%o5 + 0x04], %f5 ! uy = from[1] - ld [%o5 + 0x08], %f7 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - ld [%o3], %f13 ! LSU - add %o3, 4, %o3 ! IEU0 - - /* f3=tx, f5=ty, f7=tz, f13=lengths[i] */ - - fmuls %f3, %f13, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * len - fmuls %f5, %f13, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * len - fmuls %f7, %f13, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * len - - cmp %o4, %g1 ! continue if (i < count) - bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop - - .globl _mesa_sparc_rescale_normals -_mesa_sparc_rescale_normals: - /* o0=mat o1=scale o2=in o3=lengths o4=dest */ - - sethi %hi(ONE_DOT_ZERO), %g2 - sub %sp, 16, %sp - st %o1, [%sp + STACK_VAR_OFF+0x0] - ld [%sp + STACK_VAR_OFF+0x0], %f15 ! f15 = scale - add %sp, 16, %sp - - LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start - ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count - ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride - LDPTR [%o4 + V4F_START], %g3 ! g3 = 'out' dest->start - - /* dest->count = in->count */ - st %g1, [%o4 + V4F_COUNT] - - cmp %g1, 1 - bl 7f - clr %o4 ! 'i' for STRIDE_LOOP - -1: - ld [%o5 + 0x00], %f3 ! ux = from[0] - ld [%o5 + 0x04], %f5 ! uy = from[1] - ld [%o5 + 0x08], %f7 ! uz = from[2] - add %o5, %g2, %o5 ! STRIDE_F(from, stride) - add %o4, 1, %o4 ! i++ - - /* f3=tx, f5=ty, f7=tz */ - - fmuls %f3, %f15, %f3 - st %f3, [%g3 + 0x00] ! out[i][0] = tx * scale - fmuls %f5, %f15, %f5 - st %f5, [%g3 + 0x04] ! out[i][1] = ty * scale - fmuls %f7, %f15, %f7 - st %f7, [%g3 + 0x08] ! out[i][2] = tz * scale - - cmp %o4, %g1 ! continue if (i < count) - bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer - -7: retl - nop Index: xc/extras/Mesa/src/SPARC/sparc.c diff -u xc/extras/Mesa/src/SPARC/sparc.c:1.4 xc/extras/Mesa/src/SPARC/sparc.c:removed --- xc/extras/Mesa/src/SPARC/sparc.c:1.4 Tue Dec 2 15:27:34 2003 +++ xc/extras/Mesa/src/SPARC/sparc.c Wed Mar 16 21:00:45 2005 @@ -1,182 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/SPARC/sparc.c,v 1.4 2003/12/02 20:27:34 dawes Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Sparc assembly code by David S. Miller - */ - - -#include "context.h" -#include "math/m_xform.h" -#include "tnl/t_context.h" -#include "sparc.h" -#if defined(__sparc_v9__) && !defined(__linux__) -#define SPARC_64BIT_ADDR -#endif - -#ifdef DEBUG -#include "math/m_debug.h" -#endif - -#define XFORM_ARGS GLvector4f *to_vec, \ - const GLfloat m[16], \ - const GLvector4f *from_vec - -#define DECLARE_XFORM_GROUP(pfx, sz) \ - extern void _mesa_##pfx##_transform_points##sz##_general(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_identity(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_3d_no_rot(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_perspective(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_2d(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_2d_no_rot(XFORM_ARGS); \ - extern void _mesa_##pfx##_transform_points##sz##_3d(XFORM_ARGS); - -#define ASSIGN_XFORM_GROUP(pfx, sz) \ - _mesa_transform_tab[sz][MATRIX_GENERAL] = \ - _mesa_##pfx##_transform_points##sz##_general; \ - _mesa_transform_tab[sz][MATRIX_IDENTITY] = \ - _mesa_##pfx##_transform_points##sz##_identity; \ - _mesa_transform_tab[sz][MATRIX_3D_NO_ROT] = \ - _mesa_##pfx##_transform_points##sz##_3d_no_rot; \ - _mesa_transform_tab[sz][MATRIX_PERSPECTIVE] = \ - _mesa_##pfx##_transform_points##sz##_perspective; \ - _mesa_transform_tab[sz][MATRIX_2D] = \ - _mesa_##pfx##_transform_points##sz##_2d; \ - _mesa_transform_tab[sz][MATRIX_2D_NO_ROT] = \ - _mesa_##pfx##_transform_points##sz##_2d_no_rot; \ - _mesa_transform_tab[sz][MATRIX_3D] = \ - _mesa_##pfx##_transform_points##sz##_3d; - - -#ifdef USE_SPARC_ASM -DECLARE_XFORM_GROUP(sparc, 1) -DECLARE_XFORM_GROUP(sparc, 2) -DECLARE_XFORM_GROUP(sparc, 3) -DECLARE_XFORM_GROUP(sparc, 4) - -extern GLvector4f *_mesa_sparc_cliptest_points4(GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask); - -extern GLvector4f *_mesa_sparc_cliptest_points4_np(GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask); - -#define NORM_ARGS const GLmatrix *mat, \ - GLfloat scale, \ - const GLvector3f *in, \ - const GLfloat *lengths, \ - GLvector3f *dest - -extern void _mesa_sparc_transform_normalize_normals(NORM_ARGS); -extern void _mesa_sparc_transform_normalize_normals_no_rot(NORM_ARGS); -extern void _mesa_sparc_transform_rescale_normals_no_rot(NORM_ARGS); -extern void _mesa_sparc_transform_rescale_normals(NORM_ARGS); -extern void _mesa_sparc_transform_normals_no_rot(NORM_ARGS); -extern void _mesa_sparc_transform_normals(NORM_ARGS); -extern void _mesa_sparc_normalize_normals(NORM_ARGS); -extern void _mesa_sparc_rescale_normals(NORM_ARGS); - -#endif - -void _mesa_init_all_sparc_transform_asm(void) -{ -#ifdef USE_SPARC_ASM - ASSIGN_XFORM_GROUP(sparc, 1) - ASSIGN_XFORM_GROUP(sparc, 2) - ASSIGN_XFORM_GROUP(sparc, 3) - ASSIGN_XFORM_GROUP(sparc, 4) - -#if 0 - /* Disabled for now. See Mesa bug report # 544665. Evidently these - * functions are using SPARC registers that shouldn't be touched. - */ - _mesa_clip_tab[4] = _mesa_sparc_cliptest_points4; - _mesa_clip_np_tab[4] = _mesa_sparc_cliptest_points4_np; -#endif -#if 0 - /* disable these too. See bug 673938 */ - _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] = - _mesa_sparc_transform_normalize_normals; - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] = - _mesa_sparc_transform_normalize_normals_no_rot; - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] = - _mesa_sparc_transform_rescale_normals_no_rot; - _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] = - _mesa_sparc_transform_rescale_normals; - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] = - _mesa_sparc_transform_normals_no_rot; - _mesa_normal_tab[NORM_TRANSFORM] = - _mesa_sparc_transform_normals; - _mesa_normal_tab[NORM_NORMALIZE] = - _mesa_sparc_normalize_normals; - _mesa_normal_tab[NORM_RESCALE] = - _mesa_sparc_rescale_normals; -#endif - -#ifdef DEBUG - _math_test_all_transform_functions("sparc"); - _math_test_all_cliptest_functions("sparc"); - _math_test_all_normal_transform_functions("sparc"); -#endif - -#endif -} - -extern unsigned int _mesa_sparc_glapi_begin; -extern unsigned int _mesa_sparc_glapi_end; -extern void __glapi_sparc_icache_flush(unsigned int *); - -void _mesa_init_sparc_glapi_relocs(void) -{ - unsigned int *insn_ptr, *end_ptr; - unsigned long disp_addr; - - insn_ptr = &_mesa_sparc_glapi_begin; - end_ptr = &_mesa_sparc_glapi_end; - disp_addr = (unsigned long) &_glapi_Dispatch; - - while (insn_ptr < end_ptr) { -#ifdef SPARC_64BIT_ADDR - insn_ptr[0] |= (disp_addr >> (32 + 10)); - insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10); - __glapi_sparc_icache_flush(&insn_ptr[0]); - insn_ptr[2] |= ((disp_addr >> 32) & ((1 << 10) - 1)); - insn_ptr[3] |= (disp_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&insn_ptr[2]); - insn_ptr += 11; -#else - insn_ptr[0] |= (disp_addr >> 10); - insn_ptr[1] |= (disp_addr & ((1 << 10) - 1)); - __glapi_sparc_icache_flush(&insn_ptr[0]); - insn_ptr += 5; -#endif - } -} Index: xc/extras/Mesa/src/SPARC/sparc.h diff -u xc/extras/Mesa/src/SPARC/sparc.h:1.2 xc/extras/Mesa/src/SPARC/sparc.h:removed --- xc/extras/Mesa/src/SPARC/sparc.h:1.2 Mon Dec 16 11:18:30 2002 +++ xc/extras/Mesa/src/SPARC/sparc.h Wed Mar 16 21:00:45 2005 @@ -1,37 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.1 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Sparc assembly code by David S. Miller - */ - - -#ifndef SPARC_H -#define SPARC_H - -extern void _mesa_init_all_sparc_transform_asm(void); -extern void _mesa_init_sparc_glapi_relocs(void); - -#endif /* !(SPARC_H) */ Index: xc/extras/Mesa/src/SPARC/sparc_matrix.h diff -u xc/extras/Mesa/src/SPARC/sparc_matrix.h:1.3 xc/extras/Mesa/src/SPARC/sparc_matrix.h:removed --- xc/extras/Mesa/src/SPARC/sparc_matrix.h:1.3 Tue Dec 2 15:27:34 2003 +++ xc/extras/Mesa/src/SPARC/sparc_matrix.h Wed Mar 16 21:00:45 2005 @@ -1,172 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/SPARC/sparc_matrix.h,v 1.3 2003/12/02 20:27:34 dawes Exp $ */ - -#ifndef _SPARC_MATRIX_H -#define _SPARC_MATRIX_H - -#if defined(__sparc_v9__) && !defined(__linux__) -#define SPARC_64BIT_ADDR -#endif - -#ifdef SPARC_64BIT_ADDR -#define LDPTR ldx -#define MAT_M 0x00 -#define MAT_INV 0x08 -#define V4F_DATA 0x00 -#define V4F_START 0x08 -#define V4F_COUNT 0x10 -#define V4F_STRIDE 0x14 -#define V4F_SIZE 0x18 -#define V4F_FLAGS 0x1c -#else -#define LDPTR ld -#define MAT_M 0x00 -#define MAT_INV 0x04 -#define V4F_DATA 0x00 -#define V4F_START 0x04 -#define V4F_COUNT 0x08 -#define V4F_STRIDE 0x0c -#define V4F_SIZE 0x10 -#define V4F_FLAGS 0x14 -#endif - -#define VEC_SIZE_1 1 -#define VEC_SIZE_2 3 -#define VEC_SIZE_3 7 -#define VEC_SIZE_4 15 - -#define M0 %f16 -#define M1 %f17 -#define M2 %f18 -#define M3 %f19 -#define M4 %f20 -#define M5 %f21 -#define M6 %f22 -#define M7 %f23 -#define M8 %f24 -#define M9 %f25 -#define M10 %f26 -#define M11 %f27 -#define M12 %f28 -#define M13 %f29 -#define M14 %f30 -#define M15 %f31 - -#define LDMATRIX_0_1_2_3_12_13_14_15(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + (12 * 0x4)], M12; \ - ldd [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_12_13(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + (12 * 0x4)], M12 - -#define LDMATRIX_0_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + (12 * 0x4)], M12 - -#define LDMATRIX_0_1_2_12_13_14(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_2_3_4_5_6_7_12_13_14_15(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ldd [BASE + ( 6 * 0x4)], M6; \ - ldd [BASE + (12 * 0x4)], M12; \ - ldd [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ldd [BASE + (12 * 0x4)], M12 - -#define LDMATRIX_0_1_2_3_4_5_6_12_13_14(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ldd [BASE + ( 6 * 0x4)], M6; \ - ldd [BASE + ( 8 * 0x4)], M8; \ - ldd [BASE + (10 * 0x4)], M10; \ - ldd [BASE + (12 * 0x4)], M12; \ - ldd [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_1_4_5_12_13(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ldd [BASE + (12 * 0x4)], M12 - -#define LDMATRIX_0_5_12_13(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ldd [BASE + (12 * 0x4)], M12 - -#define LDMATRIX_0_1_2_4_5_6_8_9_10(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ldd [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + (10 * 0x4)], M10 - -#define LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(BASE) \ - ldd [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 2 * 0x4)], M2; \ - ldd [BASE + ( 4 * 0x4)], M4; \ - ld [BASE + ( 6 * 0x4)], M6; \ - ldd [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + (10 * 0x4)], M10; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_10(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (10 * 0x4)], M10; \ - -#define LDMATRIX_0_5_10_12_13_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ld [BASE + (10 * 0x4)], M10; \ - ldd [BASE + (12 * 0x4)], M12; \ - ld [BASE + (14 * 0x4)], M14 - -#define LDMATRIX_0_5_8_9_10_14(BASE) \ - ld [BASE + ( 0 * 0x4)], M0; \ - ld [BASE + ( 5 * 0x4)], M5; \ - ldd [BASE + ( 8 * 0x4)], M8; \ - ld [BASE + (10 * 0x4)], M10; \ - ld [BASE + (14 * 0x4)], M14 - -#endif /* !(_SPARC_MATRIX_H) */ Index: xc/extras/Mesa/src/SPARC/xform.S diff -u xc/extras/Mesa/src/SPARC/xform.S:1.2 xc/extras/Mesa/src/SPARC/xform.S:removed --- xc/extras/Mesa/src/SPARC/xform.S:1.2 Mon Dec 16 11:18:30 2002 +++ xc/extras/Mesa/src/SPARC/xform.S Wed Mar 16 21:00:45 2005 @@ -1,1386 +0,0 @@ - - /* TODO - * - * 1) It would be nice if load/store double could be used - * at least for the matrix parts. I think for the matrices - * it is safe, but for the vertices it probably is not due to - * things like glInterleavedArrays etc. - * - * UPDATE: Trying this now in sparc_matrix.h -DaveM_990624 - * - * 2) One extremely slick trick would be if we could enclose - * groups of xform calls on the same vertices such that - * we just load the matrix into f16-->f31 before the calls - * and then we would not have to do them here. This may be - * tricky and not much of a gain though. - */ - -#include "sparc_matrix.h" - - .text - .align 64 - -__set_v4f_1: - ld [%o0 + V4F_FLAGS], %g2 - mov 1, %g1 - st %g1, [%o0 + V4F_SIZE] - or %g2, VEC_SIZE_1, %g2 - retl - st %g2, [%o0 + V4F_FLAGS] -__set_v4f_2: - ld [%o0 + V4F_FLAGS], %g2 - mov 2, %g1 - st %g1, [%o0 + V4F_SIZE] - or %g2, VEC_SIZE_2, %g2 - retl - st %g2, [%o0 + V4F_FLAGS] -__set_v4f_3: - ld [%o0 + V4F_FLAGS], %g2 - mov 3, %g1 - st %g1, [%o0 + V4F_SIZE] - or %g2, VEC_SIZE_3, %g2 - retl - st %g2, [%o0 + V4F_FLAGS] -__set_v4f_4: - ld [%o0 + V4F_FLAGS], %g2 - mov 4, %g1 - st %g1, [%o0 + V4F_SIZE] - or %g2, VEC_SIZE_4, %g2 - retl - st %g2, [%o0 + V4F_FLAGS] - - /* First the raw versions. */ - - .globl _mesa_sparc_transform_points1_general -_mesa_sparc_transform_points1_general: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_3_12_13_14_15(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f8 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group 1-cycle stall on %f0 - fmuls %f0, M1, %f2 ! FGM Group - fmuls %f0, M2, %f3 ! FGM Group - fmuls %f0, M3, %f4 ! FGM Group - fmuls %f8, M0, %f9 ! FGM Group f1 available - fadds %f1, M12, %f1 ! FGA - st %f1, [%g2 + 0x00] ! LSU - fmuls %f8, M1, %f10 ! FGM Group f2 available - fadds %f2, M13, %f2 ! FGA - st %f2, [%g2 + 0x04] ! LSU - fmuls %f8, M2, %f11 ! FGM Group f3 available - fadds %f3, M14, %f3 ! FGA - st %f3, [%g2 + 0x08] ! LSU - fmuls %f8, M3, %f12 ! FGM Group f4 available - fadds %f4, M15, %f4 ! FGA - st %f4, [%g2 + 0x0c] ! LSU - fadds %f9, M12, %f9 ! FGA Group f9 available - st %f9, [%g2 + 0x10] ! LSU - fadds %f10, M13, %f10 ! FGA Group f10 available - st %f10, [%g2 + 0x14] ! LSU - fadds %f11, M14, %f11 ! FGA Group f11 available - st %f11, [%g2 + 0x18] ! LSU - fadds %f12, M15, %f12 ! FGA Group f12 available - st %f12, [%g2 + 0x1c] ! LSU - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 ! LSU Group - fmuls %f0, M0, %f1 ! FGM Group 1-cycle stall on %f0 - fmuls %f0, M1, %f2 ! FGM Group - fmuls %f0, M2, %f3 ! FGM Group - fmuls %f0, M3, %f4 ! FGM Group - fadds %f1, M12, %f1 ! FGA Group - st %f1, [%g2 + 0x00] ! LSU - fadds %f2, M13, %f2 ! FGA Group - st %f2, [%g2 + 0x04] ! LSU - fadds %f3, M14, %f3 ! FGA Group - st %f3, [%g2 + 0x08] ! LSU - fadds %f4, M15, %f4 ! FGA Group - st %f4, [%g2 + 0x0c] ! LSU - -3: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points1_identity -_mesa_sparc_transform_points1_identity: - cmp %o0, %o2 - be 4f - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f1 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - st %f0, [%g2 + 0x00] ! LSU Group - cmp %o1, %o2 ! IEU1 - st %f1, [%g2 + 0x10] ! LSU Group - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - addx %g0, %g0, %g0 - st %f0, [%g2 + 0x00] - -3: - ba __set_v4f_1 - nop - -4: retl - nop - - .globl _mesa_sparc_transform_points1_2d -_mesa_sparc_transform_points1_2d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_12_13(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f8 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group - fmuls %f0, M1, %f2 ! FGM Group - fmuls %f8, M0, %f9 ! FGM Group - fmuls %f8, M1, %f10 ! FGM Group - fadds %f1, M12, %f3 ! FGA Group f1 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f2, M13, %f4 ! FGA Group f2 available - st %f4, [%g2 + 0x04] ! LSU - fadds %f9, M12, %f11 ! FGA Group f9 available - st %f11, [%g2 + 0x10] ! LSU - fadds %f10, M13, %f12 ! FGA Group f10 available - st %f12, [%g2 + 0x14] ! LSU - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - fmuls %f0, M0, %f1 - fmuls %f0, M1, %f2 - fadds %f1, M12, %f3 - st %f3, [%g2 + 0x00] - fadds %f2, M13, %f4 - st %f4, [%g2 + 0x04] - -3: - ba __set_v4f_2 - nop - - .globl _mesa_sparc_transform_points1_2d_no_rot -_mesa_sparc_transform_points1_2d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_12_13(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f4 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group - fmuls %f4, M0, %f5 ! FGM Group - fadds %f1, M12, %f3 ! FGA Group, 2 cycle stall, f1 available - st %f3, [%g2 + 0x00] ! LSU - st M13, [%g2 + 0x04] ! LSU Group, f5 available - fadds %f5, M12, %f6 ! FGA - st %f6, [%g2 + 0x10] ! LSU Group - st M13, [%g2 + 0x14] ! LSU Group - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - fmuls %f0, M0, %f1 - fadds %f1, M12, %f3 - st %f3, [%g2 + 0x00] - st M13, [%g2 + 0x04] - -3: - ba __set_v4f_2 - nop - - .globl _mesa_sparc_transform_points1_3d -_mesa_sparc_transform_points1_3d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_12_13_14(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f4 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group - fmuls %f0, M1, %f2 ! FGM Group - fmuls %f0, M2, %f3 ! FGM Group - fmuls %f4, M0, %f5 ! FGM Group - fadds %f1, M12, %f1 ! FGA Group, f1 available - st %f1, [%g2 + 0x00] ! LSU - fmuls %f4, M1, %f6 ! FGM - fadds %f2, M13, %f2 ! FGA Group, f2 available - st %f2, [%g2 + 0x04] ! LSU - fmuls %f4, M2, %f7 ! FGM - fadds %f3, M14, %f3 ! FGA Group, f3 available - st %f3, [%g2 + 0x08] ! LSU - fadds %f5, M12, %f5 ! FGA Group, f5 available - st %f5, [%g2 + 0x10] ! LSU - fadds %f6, M13, %f6 ! FGA Group, f6 available - st %f6, [%g2 + 0x14] ! LSU - fadds %f7, M14, %f7 ! FGA Group, f7 available - st %f7, [%g2 + 0x18] ! LSU - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - fmuls %f0, M0, %f1 - fmuls %f0, M1, %f2 - fmuls %f0, M2, %f3 - fadds %f1, M12, %f1 - st %f1, [%g2 + 0x00] - fadds %f2, M13, %f2 - st %f2, [%g2 + 0x04] - fadds %f3, M14, %f3 - st %f3, [%g2 + 0x08] - -3: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points1_3d_no_rot -_mesa_sparc_transform_points1_3d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_12_13_14(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f2 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group - fmuls %f2, M0, %f3 ! FGM Group - fadds %f1, M12, %f1 ! FGA Group, 2 cycle stall, f1 available - st %f1, [%g2 + 0x00] ! LSU - fadds %f3, M12, %f3 ! FGA Group, f3 available - st M13, [%g2 + 0x04] ! LSU - st M14, [%g2 + 0x08] ! LSU Group - st %f3, [%g2 + 0x10] ! LSU Group - st M13, [%g2 + 0x14] ! LSU Group - st M14, [%g2 + 0x18] ! LSU Group - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - fmuls %f0, M0, %f1 - fadds %f1, M12, %f1 - st %f1, [%g2 + 0x00] - st M13, [%g2 + 0x04] - st M14, [%g2 + 0x08] - -3: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points1_perspective -_mesa_sparc_transform_points1_perspective: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_14(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - ld [%g1 + 0x00], %f2 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f1 ! FGM Group - st %f1, [%g2 + 0x00] ! LSU - fmuls %f2, M0, %f3 ! FGM Group - st %g0, [%g2 + 0x04] ! LSU - st M14, [%g2 + 0x08] ! LSU Group - st %g0, [%g2 + 0x0c] ! LSU Group - st %f3, [%g2 + 0x10] ! LSU Group - st %g0, [%g2 + 0x14] ! LSU Group - st M14, [%g2 + 0x18] ! LSU Group - st %g0, [%g2 + 0x1c] ! LSU Group - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 - fmuls %f0, M0, %f1 - st %f1, [%g2 + 0x00] - st %g0, [%g2 + 0x04] - st M14, [%g2 + 0x08] - st %g0, [%g2 + 0x0c] - -3: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points2_general -_mesa_sparc_transform_points2_general: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_3_4_5_6_7_12_13_14_15(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f2 ! FGM Group - fmuls %f0, M1, %f3 ! FGM Group - fmuls %f0, M2, %f4 ! FGM Group - fmuls %f0, M3, %f5 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group f2 available - fmuls %f1, M4, %f6 ! FGM - fadds %f3, M13, %f3 ! FGA Group f3 available - fmuls %f1, M5, %f7 ! FGM - fadds %f4, M14, %f4 ! FGA Group f4 available - fmuls %f1, M6, %f8 ! FGM - fadds %f5, M15, %f5 ! FGA Group f5 available - fmuls %f1, M7, %f9 ! FGM - fadds %f2, %f6, %f2 ! FGA Group f6 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, %f7, %f3 ! FGA Group f7 available - st %f3, [%g2 + 0x04] ! LSU - fadds %f4, %f8, %f4 ! FGA Group f8 available - st %f4, [%g2 + 0x08] ! LSU - fadds %f5, %f9, %f5 ! FGA Group f9 available - st %f5, [%g2 + 0x0c] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points2_identity -_mesa_sparc_transform_points2_identity: - cmp %o2, %o0 - be 3f - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - add %o1, 1, %o1 ! IEU0 - ld [%g1 + 0x04], %f1 ! LSU Group - add %g1, %o5, %g1 ! IEU0 - cmp %o1, %g3 ! IEU1 - st %f0, [%g2 + 0x00] ! LSU Group - st %f1, [%g2 + 0x04] ! LSU Group - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 -2: - ba __set_v4f_2 - nop - -3: retl - nop - - .globl _mesa_sparc_transform_points2_2d -_mesa_sparc_transform_points2_2d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_4_5_12_13(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f2 ! FGM - ld [%g1 + 0x00], %f8 ! LSU Group - fmuls %f0, M1, %f3 ! FGM - ld [%g1 + 0x04], %f9 ! LSU Group - fmuls %f1, M4, %f6 ! FGM - fmuls %f1, M5, %f7 ! FGM Group - add %g1, %o5, %g1 ! IEU0 - fmuls %f8, M0, %f10 ! FGM Group f2 available - fadds %f2, M12, %f2 ! FGA - fmuls %f8, M1, %f11 ! FGM Group f3 available - fadds %f3, M13, %f3 ! FGA - fmuls %f9, M4, %f12 ! FGM Group - fmuls %f9, M5, %f13 ! FGM Group - fadds %f10, M12, %f10 ! FGA Group f2, f10 available - fadds %f2, %f6, %f2 ! FGA Group f3, f11 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f11, M13, %f11 ! FGA Group f12 available - fadds %f3, %f7, %f3 ! FGA Group f13 available - st %f3, [%g2 + 0x04] ! LSU - fadds %f10, %f12, %f10 ! FGA Group f10 available - st %f10, [%g2 + 0x10] ! LSU - fadds %f11, %f13, %f11 ! FGA Group f11 available - st %f11, [%g2 + 0x14] ! LSU - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - fmuls %f0, M0, %f2 ! FGM Group - fmuls %f0, M1, %f3 ! FGM Group - fmuls %f1, M4, %f6 ! FGM Group - fmuls %f1, M5, %f7 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group f2 available - fadds %f3, M13, %f3 ! FGA Group f3 available - fadds %f2, %f6, %f2 ! FGA Group 2 cycle stall, f2 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, %f7, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x04] ! LSU - -3: - ba __set_v4f_2 - nop - - .globl _mesa_sparc_transform_points2_2d_no_rot -_mesa_sparc_transform_points2_2d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_12_13(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - ld [%g1 + 0x00], %f4 ! LSU Group - fmuls %f0, M0, %f2 ! FGM - ld [%g1 + 0x04], %f5 ! LSU Group - fmuls %f1, M5, %f3 ! FGM - fmuls %f4, M0, %f6 ! FGM Group - add %g1, %o5, %g1 ! IEU0 - fmuls %f5, M5, %f7 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group f2 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, M13, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x04] ! LSU - fadds %f6, M12, %f6 ! FGA Group f6 available - st %f6, [%g2 + 0x10] ! LSU - fadds %f7, M13, %f7 ! FGA Group f7 available - st %f7, [%g2 + 0x14] ! LSU - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - fmuls %f0, M0, %f2 ! FGM Group - fmuls %f1, M5, %f3 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group, 2 cycle stall, f2 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, M13, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x04] ! LSU - -3: - ba __set_v4f_2 - nop - - /* orig: 12 cycles */ - .globl _mesa_sparc_transform_points2_3d -_mesa_sparc_transform_points2_3d: - ld [%o2 + V4F_STRIDE], %o5 - ld [%o2 + V4F_START], %g1 - ld [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_3_4_5_6_12_13_14(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o1 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - add %o1, 2, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - ld [%g1 + 0x00], %f9 ! LSU Group - fmuls %f0, M0, %f2 ! FGM - ld [%g1 + 0x04], %f10 ! LSU Group - fmuls %f0, M1, %f3 ! FGM - fmuls %f0, M2, %f4 ! FGM Group - add %g1, %o5, %g1 ! IEU0 - fmuls %f1, M4, %f6 ! FGM Group - fmuls %f1, M5, %f7 ! FGM Group f2 available - fadds %f2, M12, %f2 ! FGA - fmuls %f1, M6, %f8 ! FGM Group f3 available - fadds %f3, M13, %f3 ! FGA - fmuls %f9, M0, %f11 ! FGM Group f4 available - fadds %f4, M14, %f4 ! FGA - fmuls %f9, M1, %f12 ! FGM Group f6 available - fmuls %f9, M2, %f13 ! FGM Group f2, f7 available - fadds %f2, %f6, %f2 ! FGA - st %f2, [%g2 + 0x00] ! LSU - fmuls %f10, M4, %f14 ! FGM Group f3, f8 available - fadds %f3, %f7, %f3 ! FGA - st %f3, [%g2 + 0x04] ! LSU - fmuls %f10, M5, %f15 ! FGM Group f4, f11 available - fadds %f11, M12, %f11 ! FGA - fmuls %f10, M6, %f0 ! FGM Group f12 available - fadds %f12, M13, %f12 ! FGA - fadds %f13, M14, %f13 ! FGA Group f13 available - fadds %f4, %f8, %f4 ! FGA Group f14 available - st %f4, [%g2 + 0x08] ! LSU - fadds %f11, %f14, %f11 ! FGA Group f15, f11 available - st %f11, [%g2 + 0x10] ! LSU - fadds %f12, %f15, %f12 ! FGA Group f0, f12 available - st %f12, [%g2 + 0x14] ! LSU - fadds %f13, %f0, %f13 ! FGA Group f13 available - st %f13, [%g2 + 0x18] ! LSU - - cmp %o1, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o1, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - fmuls %f0, M0, %f2 ! FGM Group - fmuls %f0, M1, %f3 ! FGM Group - fmuls %f0, M2, %f4 ! FGM Group - fmuls %f1, M4, %f6 ! FGM Group - fmuls %f1, M5, %f7 ! FGM Group f2 available - fadds %f2, M12, %f2 ! FGA - fmuls %f1, M6, %f8 ! FGM Group f3 available - fadds %f3, M13, %f3 ! FGA - fadds %f4, M14, %f4 ! FGA Group f4 available - fadds %f2, %f6, %f2 ! FGA Group stall, f2, f6, f7 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, %f7, %f3 ! FGA Group f3, f8 available - st %f3, [%g2 + 0x04] ! LSU - fadds %f4, %f8, %f4 ! FGA Group f4 available - st %f4, [%g2 + 0x08] ! LSU - -3: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points2_3d_no_rot -_mesa_sparc_transform_points2_3d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_12_13_14(%o1) - - cmp %g3, 1 - st %g3, [%o0 + V4F_COUNT] - bl 3f - clr %o3 - - be 2f - andn %g3, 1, %o2 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - add %o3, 2, %o3 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - ld [%g1 + 0x00], %f4 ! LSU Group - fmuls %f0, M0, %f2 ! FGM - ld [%g1 + 0x04], %f5 ! LSU Group - fmuls %f1, M5, %f3 ! FGM - fmuls %f4, M0, %f6 ! FGM Group - add %g1, %o5, %g1 ! IEU0 - fmuls %f5, M5, %f7 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group f2 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, M13, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x04] ! LSU - fadds %f6, M12, %f6 ! FGA Group f6 available - st M14, [%g2 + 0x08] ! LSU - fadds %f7, M13, %f7 ! FGA Group f7 available - st %f6, [%g2 + 0x10] ! LSU - st %f7, [%g2 + 0x14] ! LSU Group - st M14, [%g2 + 0x18] ! LSU Group - cmp %o3, %o2 ! IEU1 - bne 1b ! CTI - add %g2, 0x20, %g2 ! IEU0 Group - - cmp %o3, %g3 - be 3f - nop - -2: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - fmuls %f0, M0, %f2 ! FGM Group - fmuls %f1, M5, %f3 ! FGM Group - fadds %f2, M12, %f2 ! FGA Group, 2 cycle stall, f2 available - st %f2, [%g2 + 0x00] ! LSU - fadds %f3, M13, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x04] ! LSU - st M14, [%g2 + 0x08] ! LSU Group - -3: ld [%o1 + (14 * 0x4)], %g3 - cmp %g3, 0 - bne __set_v4f_3 - nop - ba __set_v4f_2 - nop - - .globl _mesa_sparc_transform_points2_perspective -_mesa_sparc_transform_points2_perspective: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 - ld [%g1 + 0x04], %f1 - add %o1, 1, %o1 - add %g1, %o5, %g1 - fmuls %f0, M0, %f2 - st %f2, [%g2 + 0x00] - fmuls %f1, M5, %f3 - st %f3, [%g2 + 0x04] - st M14, [%g2 + 0x08] - st %g0, [%g2 + 0x0c] - cmp %o1, %g3 - bne 1b - add %g2, 0x10, %g2 -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points3_general -_mesa_sparc_transform_points3_general: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f3 ! FGM - fmuls %f1, M4, %f7 ! FGM Group - fmuls %f0, M1, %f4 ! FGM Group - fmuls %f1, M5, %f8 ! FGM Group - fmuls %f0, M2, %f5 ! FGM Group f3 available - fmuls %f1, M6, %f9 ! FGM Group f7 available - fadds %f3, %f7, %f3 ! FGA - fmuls %f0, M3, %f6 ! FGM Group f4 available - fmuls %f1, M7, %f10 ! FGM Group f8 available - fadds %f4, %f8, %f4 ! FGA - fmuls %f2, M8, %f7 ! FGM Group f5 available - fmuls %f2, M9, %f8 ! FGM Group f9,f3 available - fadds %f5, %f9, %f5 ! FGA - fmuls %f2, M10, %f9 ! FGM Group f6 available - fadds %f6, %f10, %f6 ! FGA Group f10,f4 available - fmuls %f2, M11, %f10 ! FGM - fadds %f3, M12, %f3 ! FGA Group f7 available - fadds %f4, M13, %f4 ! FGA Group f8,f5 available - fadds %f5, M14, %f5 ! FGA Group f9 available - fadds %f6, M15, %f6 ! FGA Group f10,f6 available - fadds %f3, %f7, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, %f8, %f4 ! FGA Group f4 available - st %f4, [%g2 + 0x04] ! LSU - fadds %f5, %f9, %f5 ! FGA Group f5 available - st %f5, [%g2 + 0x08] ! LSU - fadds %f6, %f10, %f6 ! FGA Group f6 available - st %f6, [%g2 + 0x0c] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points3_identity -_mesa_sparc_transform_points3_identity: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 - ld [%g1 + 0x04], %f1 - ld [%g1 + 0x08], %f2 - add %o1, 1, %o1 - add %g1, %o5, %g1 - cmp %o1, %g3 - st %f0, [%g2 + 0x00] - st %f1, [%g2 + 0x04] - st %f2, [%g2 + 0x08] - bne 1b - add %g2, 0x10, %g2 -2: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points3_2d -_mesa_sparc_transform_points3_2d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_4_5_12_13(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f3 ! FGM - fmuls %f0, M1, %f4 ! FGM Group - fmuls %f1, M4, %f6 ! FGM Group - fmuls %f1, M5, %f7 ! FGM Group - fadds %f3, M12, %f3 ! FGA Group f3 available - fadds %f4, M13, %f4 ! FGA Group f4 available - fadds %f3, %f6, %f3 ! FGA Group f6 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, %f7, %f4 ! FGA Group f7 available - st %f4, [%g2 + 0x04] ! LSU - st %f2, [%g2 + 0x08] ! LSU Group - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points3_2d_no_rot -_mesa_sparc_transform_points3_2d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_12_13(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f3 ! FGM - fmuls %f1, M5, %f4 ! FGM Group - st %f2, [%g2 + 0x08] ! LSU - fadds %f3, M12, %f3 ! FGA Group - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, M13, %f4 ! FGA Group - st %f4, [%g2 + 0x04] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points3_3d -_mesa_sparc_transform_points3_3d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f3 ! FGM - fmuls %f1, M4, %f6 ! FGM Group - fmuls %f0, M1, %f4 ! FGM Group - fmuls %f1, M5, %f7 ! FGM Group - fmuls %f0, M2, %f5 ! FGM Group f3 available - fmuls %f1, M6, %f8 ! FGM Group f6 available - fadds %f3, %f6, %f3 ! FGA - fmuls %f2, M8, %f9 ! FGM Group f4 available - fmuls %f2, M9, %f10 ! FGM Group f7 available - fadds %f4, %f7, %f4 ! FGA - fmuls %f2, M10, %f11 ! FGM Group f5 available - fadds %f5, %f8, %f5 ! FGA Group f8, f3 available - fadds %f3, %f9, %f3 ! FGA Group f9 available - fadds %f4, %f10, %f4 ! FGA Group f10, f4 available - fadds %f5, %f11, %f5 ! FGA Group stall, f11, f5 available - fadds %f3, M12, %f3 ! FGA Group f3 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, M13, %f4 ! FGA Group f4 available - st %f4, [%g2 + 0x04] ! LSU - fadds %f5, M14, %f5 ! FGA Group f5 available - st %f5, [%g2 + 0x08] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points3_3d_no_rot -_mesa_sparc_transform_points3_3d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_10_12_13_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - cmp %o1, %g3 ! IEU1 Group - fmuls %f0, M0, %f3 ! FGM - fmuls %f1, M5, %f4 ! FGM Group - fmuls %f2, M10, %f5 ! FGM Group - fadds %f3, M12, %f3 ! FGA Group, stall, f3 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, M13, %f4 ! FGA Group, f4 available - st %f4, [%g2 + 0x04] ! LSU - fadds %f5, M14, %f5 ! FGA Group, f5 available - st %f5, [%g2 + 0x08] ! LEU - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_3 - nop - - .globl _mesa_sparc_transform_points3_perspective -_mesa_sparc_transform_points3_perspective: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_8_9_10_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f3 ! FGM - fmuls %f2, M8, %f6 ! FGM Group - fmuls %f1, M5, %f4 ! FGM Group - fmuls %f2, M9, %f7 ! FGM Group - fmuls %f2, M10, %f5 ! FGM Group f3 available - fadds %f3, %f6, %f3 ! FGA Group f6 available - st %f3, [%g2 + 0x00] ! LSU - fadds %f4, %f7, %f4 ! FGA Group stall, f4, f7 available - st %f4, [%g2 + 0x04] ! LSU - fadds %f5, M14, %f5 ! FGA Group - st %f5, [%g2 + 0x08] ! LSU - fnegs %f2, %f6 ! FGA Group - st %f6, [%g2 + 0x0c] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_general -_mesa_sparc_transform_points4_general: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - ld [%g1 + 0x0c], %f3 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f4 ! FGM Group - fmuls %f1, M4, %f8 ! FGM Group - fmuls %f0, M1, %f5 ! FGM Group - fmuls %f1, M5, %f9 ! FGM Group - fmuls %f0, M2, %f6 ! FGM Group f4 available - fmuls %f1, M6, %f10 ! FGM Group f8 available - fadds %f4, %f8, %f4 ! FGA - fmuls %f0, M3, %f7 ! FGM Group f5 available - fmuls %f1, M7, %f11 ! FGM Group f9 available - fadds %f5, %f9, %f5 ! FGA - fmuls %f2, M8, %f12 ! FGM Group f6 available - fmuls %f2, M9, %f13 ! FGM Group f10, f4 available - fadds %f6, %f10, %f6 ! FGA - fmuls %f2, M10, %f14 ! FGM Group f7 available - fmuls %f2, M11, %f15 ! FGM Group f11, f5 available - fadds %f7, %f11, %f7 ! FGA - fmuls %f3, M12, %f8 ! FGM Group f12 available - fadds %f4, %f12, %f4 ! FGA - fmuls %f3, M13, %f9 ! FGM Group f13, f6 available - fadds %f5, %f13, %f5 ! FGA - fmuls %f3, M14, %f10 ! FGM Group f14 available - fadds %f6, %f14, %f6 ! FGA - fmuls %f3, M15, %f11 ! FGM Group f15, f7 available - fadds %f7, %f15, %f7 ! FGA - fadds %f4, %f8, %f4 ! FGA Group f8, f4 available - st %f4, [%g2 + 0x00] ! LSU - fadds %f5, %f9, %f5 ! FGA Group f9, f5 available - st %f5, [%g2 + 0x04] ! LSU - fadds %f6, %f10, %f6 ! FGA Group f10, f6 available - st %f6, [%g2 + 0x08] ! LSU - fadds %f7, %f11, %f7 ! FGA Group f11, f7 available - st %f7, [%g2 + 0x0c] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_identity -_mesa_sparc_transform_points4_identity: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 - ld [%g1 + 0x04], %f1 - ld [%g1 + 0x08], %f2 - add %o1, 1, %o1 - ld [%g1 + 0x0c], %f3 - add %g1, %o5, %g1 - st %f0, [%g2 + 0x00] - st %f1, [%g2 + 0x04] - st %f2, [%g2 + 0x08] - cmp %o1, %g3 - st %f3, [%g2 + 0x0c] - bne 1b - add %g2, 0x10, %g2 -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_2d -_mesa_sparc_transform_points4_2d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_4_5_12_13(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - ld [%g1 + 0x0c], %f3 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f4 ! FGM - fmuls %f1, M4, %f8 ! FGM Group - fmuls %f0, M1, %f5 ! FGM Group - fmuls %f1, M5, %f9 ! FGM Group f4 available - fmuls %f3, M12, %f12 ! FGM Group - fmuls %f3, M13, %f13 ! FGM Group f8 available - fadds %f4, %f8, %f4 ! FGA - fadds %f5, %f9, %f5 ! FGA Group stall, f5, f9 available - fadds %f4, %f12, %f4 ! FGA Group 2 cycle stall, f4, f12, f13 avail - st %f4, [%g2 + 0x00] ! LSU - fadds %f5, %f13, %f5 ! FGA Group f5 available - st %f5, [%g2 + 0x04] ! LSU - st %f2, [%g2 + 0x08] ! LSU Group - st %f3, [%g2 + 0x0c] ! LSU Group - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_2d_no_rot -_mesa_sparc_transform_points4_2d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_4_5_12_13(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 - ld [%g1 + 0x04], %f1 - ld [%g1 + 0x08], %f2 - ld [%g1 + 0x0c], %f3 - add %o1, 1, %o1 - add %g1, %o5, %g1 - fmuls %f0, M0, %f4 - fmuls %f3, M12, %f8 - fmuls %f1, M5, %f5 - fmuls %f3, M13, %f9 - fadds %f4, %f8, %f4 - st %f4, [%g2 + 0x00] - fadds %f5, %f9, %f5 - st %f5, [%g2 + 0x04] - st %f2, [%g2 + 0x08] - st %f3, [%g2 + 0x0c] - cmp %o1, %g3 - bne 1b - add %g2, 0x10, %g2 -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_3d -_mesa_sparc_transform_points4_3d: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - ld [%g1 + 0x0c], %f3 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f4 ! FGM - fmuls %f1, M4, %f7 ! FGM Group - fmuls %f0, M1, %f5 ! FGM Group - fmuls %f1, M5, %f8 ! FGM Group - fmuls %f0, M2, %f6 ! FGM Group f4 available - fmuls %f1, M6, %f9 ! FGM Group f7 available - fadds %f4, %f7, %f4 ! FGA - fmuls %f2, M8, %f10 ! FGM Group f5 available - fmuls %f2, M9, %f11 ! FGM Group f8 available - fadds %f5, %f8, %f5 ! FGA - fmuls %f2, M10, %f12 ! FGM Group f6 available - fmuls %f3, M12, %f13 ! FGM Group f9, f4 available - fadds %f6, %f9, %f6 ! FGA - fmuls %f3, M13, %f14 ! FGM Group f10 available - fadds %f4, %f10, %f4 ! FGA - fmuls %f3, M14, %f15 ! FGM Group f11, f5 available - fadds %f5, %f11, %f5 ! FGA - fadds %f6, %f12, %f6 ! FGA Group stall, f12, f13, f6 available - fadds %f4, %f13, %f4 ! FGA Group f14, f4 available - st %f4, [%g2 + 0x00] ! LSU - fadds %f5, %f14, %f5 ! FGA Group f15, f5 available - st %f5, [%g2 + 0x04] ! LSU - fadds %f6, %f15, %f6 ! FGA Group f6 available - st %f6, [%g2 + 0x08] ! LSU - st %f3, [%g2 + 0x0c] ! LSU Group - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_3d_no_rot -_mesa_sparc_transform_points4_3d_no_rot: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_10_12_13_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - ld [%g1 + 0x0c], %f3 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f4 ! FGM - fmuls %f3, M12, %f7 ! FGM Group - fmuls %f1, M5, %f5 ! FGM Group - fmuls %f3, M13, %f8 ! FGM Group - fmuls %f2, M10, %f6 ! FGM Group f4 available - fmuls %f3, M14, %f9 ! FGM Group f7 available - fadds %f4, %f7, %f4 ! FGA - st %f4, [%g2 + 0x00] ! LSU - fadds %f5, %f8, %f5 ! FGA Group stall, f5, f8 available - st %f5, [%g2 + 0x04] ! LSU - fadds %f6, %f9, %f6 ! FGA Group stall, f6, f9 available - st %f6, [%g2 + 0x08] ! LSU - st %f3, [%g2 + 0x0c] ! LSU Group - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop - - .globl _mesa_sparc_transform_points4_perspective -_mesa_sparc_transform_points4_perspective: - ld [%o2 + V4F_STRIDE], %o5 - LDPTR [%o2 + V4F_START], %g1 - LDPTR [%o0 + V4F_START], %g2 - ld [%o2 + V4F_COUNT], %g3 - - LDMATRIX_0_5_8_9_10_14(%o1) - - cmp %g3, 0 - st %g3, [%o0 + V4F_COUNT] - be 2f - clr %o1 - -1: ld [%g1 + 0x00], %f0 ! LSU Group - ld [%g1 + 0x04], %f1 ! LSU Group - ld [%g1 + 0x08], %f2 ! LSU Group - ld [%g1 + 0x0c], %f3 ! LSU Group - add %o1, 1, %o1 ! IEU0 - add %g1, %o5, %g1 ! IEU1 - fmuls %f0, M0, %f4 ! FGM - fmuls %f2, M8, %f7 ! FGM Group - fmuls %f1, M5, %f5 ! FGM Group - fmuls %f2, M9, %f8 ! FGM Group - fmuls %f2, M10, %f6 ! FGM Group f4 available - fmuls %f3, M14, %f9 ! FGM Group f7 available - fadds %f4, %f7, %f4 ! FGA - st %f4, [%g2 + 0x00] ! LSU - fadds %f5, %f8, %f5 ! FGA Group stall, f5, f8 available - st %f5, [%g2 + 0x04] ! LSU - fadds %f6, %f9, %f6 ! FGA Group stall, f6, f9 available - st %f6, [%g2 + 0x08] ! LSU - fnegs %f2, %f7 ! FGA Group - st %f7, [%g2 + 0x0c] ! LSU - cmp %o1, %g3 ! IEU1 - bne 1b ! CTI - add %g2, 0x10, %g2 ! IEU0 Group -2: - ba __set_v4f_4 - nop Index: xc/extras/Mesa/src/Trace/tr_commands.h diff -u xc/extras/Mesa/src/Trace/tr_commands.h:1.4 xc/extras/Mesa/src/Trace/tr_commands.h:removed --- xc/extras/Mesa/src/Trace/tr_commands.h:1.4 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/Trace/tr_commands.h Wed Mar 16 21:00:46 2005 @@ -1,643 +0,0 @@ -/* This may look like C code, but it is really -*- C++ -*- */ - -/* - * DebugGL - * Version: 1.0 - * - * Copyright (C) 1999-2000 Bernd Kreimeier, Loki Entertainment - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef TR_COMMANDS_H -#define TR_COMMANDS_H - - -/** - * Enumeration of GL commands, for metafile format - * and networking protocol. Has to be re-indexed - * if (ever) used as GLX stream. This uses the - * Mesa internal values. - */ - -#define CMD_NEWLIST 0 -#define CMD_ENDLIST 1 -#define CMD_CALLLIST 2 -#define CMD_CALLLISTS 3 -#define CMD_DELETELISTS 4 -#define CMD_GENLISTS 5 -#define CMD_LISTBASE 6 -#define CMD_BEGIN 7 -#define CMD_BITMAP 8 -#define CMD_COLOR3B 9 -#define CMD_COLOR3BV 10 -#define CMD_COLOR3D 11 -#define CMD_COLOR3DV 12 -#define CMD_COLOR3F 13 -#define CMD_COLOR3FV 14 -#define CMD_COLOR3I 15 -#define CMD_COLOR3IV 16 -#define CMD_COLOR3S 17 -#define CMD_COLOR3SV 18 -#define CMD_COLOR3UB 19 -#define CMD_COLOR3UBV 20 -#define CMD_COLOR3UI 21 -#define CMD_COLOR3UIV 22 -#define CMD_COLOR3US 23 -#define CMD_COLOR3USV 24 -#define CMD_COLOR4B 25 -#define CMD_COLOR4BV 26 -#define CMD_COLOR4D 27 -#define CMD_COLOR4DV 28 -#define CMD_COLOR4F 29 -#define CMD_COLOR4FV 30 -#define CMD_COLOR4I 31 -#define CMD_COLOR4IV 32 -#define CMD_COLOR4S 33 -#define CMD_COLOR4SV 34 -#define CMD_COLOR4UB 35 -#define CMD_COLOR4UBV 36 -#define CMD_COLOR4UI 37 -#define CMD_COLOR4UIV 38 -#define CMD_COLOR4US 39 -#define CMD_COLOR4USV 40 -#define CMD_EDGEFLAG 41 -#define CMD_EDGEFLAGV 42 -#define CMD_END 43 -#define CMD_INDEXD 44 -#define CMD_INDEXDV 45 -#define CMD_INDEXF 46 -#define CMD_INDEXFV 47 -#define CMD_INDEXI 48 -#define CMD_INDEXIV 49 -#define CMD_INDEXS 50 -#define CMD_INDEXSV 51 -#define CMD_NORMAL3B 52 -#define CMD_NORMAL3BV 53 -#define CMD_NORMAL3D 54 -#define CMD_NORMAL3DV 55 -#define CMD_NORMAL3F 56 -#define CMD_NORMAL3FV 57 -#define CMD_NORMAL3I 58 -#define CMD_NORMAL3IV 59 -#define CMD_NORMAL3S 60 -#define CMD_NORMAL3SV 61 -#define CMD_RASTERPOS2D 62 -#define CMD_RASTERPOS2DV 63 -#define CMD_RASTERPOS2F 64 -#define CMD_RASTERPOS2FV 65 -#define CMD_RASTERPOS2I 66 -#define CMD_RASTERPOS2IV 67 -#define CMD_RASTERPOS2S 68 -#define CMD_RASTERPOS2SV 69 -#define CMD_RASTERPOS3D 70 -#define CMD_RASTERPOS3DV 71 -#define CMD_RASTERPOS3F 72 -#define CMD_RASTERPOS3FV 73 -#define CMD_RASTERPOS3I 74 -#define CMD_RASTERPOS3IV 75 -#define CMD_RASTERPOS3S 76 -#define CMD_RASTERPOS3SV 77 -#define CMD_RASTERPOS4D 78 -#define CMD_RASTERPOS4DV 79 -#define CMD_RASTERPOS4F 80 -#define CMD_RASTERPOS4FV 81 -#define CMD_RASTERPOS4I 82 -#define CMD_RASTERPOS4IV 83 -#define CMD_RASTERPOS4S 84 -#define CMD_RASTERPOS4SV 85 -#define CMD_RECTD 86 -#define CMD_RECTDV 87 -#define CMD_RECTF 88 -#define CMD_RECTFV 89 -#define CMD_RECTI 90 -#define CMD_RECTIV 91 -#define CMD_RECTS 92 -#define CMD_RECTSV 93 -#define CMD_TEXCOORD1D 94 -#define CMD_TEXCOORD1DV 95 -#define CMD_TEXCOORD1F 96 -#define CMD_TEXCOORD1FV 97 -#define CMD_TEXCOORD1I 98 -#define CMD_TEXCOORD1IV 99 -#define CMD_TEXCOORD1S 100 -#define CMD_TEXCOORD1SV 101 -#define CMD_TEXCOORD2D 102 -#define CMD_TEXCOORD2DV 103 -#define CMD_TEXCOORD2F 104 -#define CMD_TEXCOORD2FV 105 -#define CMD_TEXCOORD2I 106 -#define CMD_TEXCOORD2IV 107 -#define CMD_TEXCOORD2S 108 -#define CMD_TEXCOORD2SV 109 -#define CMD_TEXCOORD3D 110 -#define CMD_TEXCOORD3DV 111 -#define CMD_TEXCOORD3F 112 -#define CMD_TEXCOORD3FV 113 -#define CMD_TEXCOORD3I 114 -#define CMD_TEXCOORD3IV 115 -#define CMD_TEXCOORD3S 116 -#define CMD_TEXCOORD3SV 117 -#define CMD_TEXCOORD4D 118 -#define CMD_TEXCOORD4DV 119 -#define CMD_TEXCOORD4F 120 -#define CMD_TEXCOORD4FV 121 -#define CMD_TEXCOORD4I 122 -#define CMD_TEXCOORD4IV 123 -#define CMD_TEXCOORD4S 124 -#define CMD_TEXCOORD4SV 125 -#define CMD_VERTEX2D 126 -#define CMD_VERTEX2DV 127 -#define CMD_VERTEX2F 128 -#define CMD_VERTEX2FV 129 -#define CMD_VERTEX2I 130 -#define CMD_VERTEX2IV 131 -#define CMD_VERTEX2S 132 -#define CMD_VERTEX2SV 133 -#define CMD_VERTEX3D 134 -#define CMD_VERTEX3DV 135 -#define CMD_VERTEX3F 136 -#define CMD_VERTEX3FV 137 -#define CMD_VERTEX3I 138 -#define CMD_VERTEX3IV 139 -#define CMD_VERTEX3S 140 -#define CMD_VERTEX3SV 141 -#define CMD_VERTEX4D 142 -#define CMD_VERTEX4DV 143 -#define CMD_VERTEX4F 144 -#define CMD_VERTEX4FV 145 -#define CMD_VERTEX4I 146 -#define CMD_VERTEX4IV 147 -#define CMD_VERTEX4S 148 -#define CMD_VERTEX4SV 149 -#define CMD_CLIPPLANE 150 -#define CMD_COLORMATERIAL 151 -#define CMD_CULLFACE 152 -#define CMD_FOGF 153 -#define CMD_FOGFV 154 -#define CMD_FOGI 155 -#define CMD_FOGIV 156 -#define CMD_FRONTFACE 157 -#define CMD_HINT 158 -#define CMD_LIGHTF 159 -#define CMD_LIGHTFV 160 -#define CMD_LIGHTI 161 -#define CMD_LIGHTIV 162 -#define CMD_LIGHTMODELF 163 -#define CMD_LIGHTMODELFV 164 -#define CMD_LIGHTMODELI 165 -#define CMD_LIGHTMODELIV 166 -#define CMD_LINESTIPPLE 167 -#define CMD_LINEWIDTH 168 -#define CMD_MATERIALF 169 -#define CMD_MATERIALFV 170 -#define CMD_MATERIALI 171 -#define CMD_MATERIALIV 172 -#define CMD_POINTSIZE 173 -#define CMD_POLYGONMODE 174 -#define CMD_POLYGONSTIPPLE 175 -#define CMD_SCISSOR 176 -#define CMD_SHADEMODEL 177 -#define CMD_TEXPARAMETERF 178 -#define CMD_TEXPARAMETERFV 179 -#define CMD_TEXPARAMETERI 180 -#define CMD_TEXPARAMETERIV 181 -#define CMD_TEXIMAGE1D 182 -#define CMD_TEXIMAGE2D 183 -#define CMD_TEXENVF 184 -#define CMD_TEXENVFV 185 -#define CMD_TEXENVI 186 -#define CMD_TEXENVIV 187 -#define CMD_TEXGEND 188 -#define CMD_TEXGENDV 189 -#define CMD_TEXGENF 190 -#define CMD_TEXGENFV 191 -#define CMD_TEXGENI 192 -#define CMD_TEXGENIV 193 -#define CMD_FEEDBACKBUFFER 194 -#define CMD_SELECTBUFFER 195 -#define CMD_RENDERMODE 196 -#define CMD_INITNAMES 197 -#define CMD_LOADNAME 198 -#define CMD_PASSTHROUGH 199 -#define CMD_POPNAME 200 -#define CMD_PUSHNAME 201 -#define CMD_DRAWBUFFER 202 -#define CMD_CLEAR 203 -#define CMD_CLEARACCUM 204 -#define CMD_CLEARINDEX 205 -#define CMD_CLEARCOLOR 206 -#define CMD_CLEARSTENCIL 207 -#define CMD_CLEARDEPTH 208 -#define CMD_STENCILMASK 209 -#define CMD_COLORMASK 210 -#define CMD_DEPTHMASK 211 -#define CMD_INDEXMASK 212 -#define CMD_ACCUM 213 -#define CMD_DISABLE 214 -#define CMD_ENABLE 215 -#define CMD_FINISH 216 -#define CMD_FLUSH 217 -#define CMD_POPATTRIB 218 -#define CMD_PUSHATTRIB 219 -#define CMD_MAP1D 220 -#define CMD_MAP1F 221 -#define CMD_MAP2D 222 -#define CMD_MAP2F 223 -#define CMD_MAPGRID1D 224 -#define CMD_MAPGRID1F 225 -#define CMD_MAPGRID2D 226 -#define CMD_MAPGRID2F 227 -#define CMD_EVALCOORD1D 228 -#define CMD_EVALCOORD1DV 229 -#define CMD_EVALCOORD1F 230 -#define CMD_EVALCOORD1FV 231 -#define CMD_EVALCOORD2D 232 -#define CMD_EVALCOORD2DV 233 -#define CMD_EVALCOORD2F 234 -#define CMD_EVALCOORD2FV 235 -#define CMD_EVALMESH1 236 -#define CMD_EVALPOINT1 237 -#define CMD_EVALMESH2 238 -#define CMD_EVALPOINT2 239 -#define CMD_ALPHAFUNC 240 -#define CMD_BLENDFUNC 241 -#define CMD_LOGICOP 242 -#define CMD_STENCILFUNC 243 -#define CMD_STENCILOP 244 -#define CMD_DEPTHFUNC 245 -#define CMD_PIXELZOOM 246 -#define CMD_PIXELTRANSFERF 247 -#define CMD_PIXELTRANSFERI 248 -#define CMD_PIXELSTOREF 249 -#define CMD_PIXELSTOREI 250 -#define CMD_PIXELMAPFV 251 -#define CMD_PIXELMAPUIV 252 -#define CMD_PIXELMAPUSV 253 -#define CMD_READBUFFER 254 -#define CMD_COPYPIXELS 255 -#define CMD_READPIXELS 256 -#define CMD_DRAWPIXELS 257 -#define CMD_GETBOOLEANV 258 -#define CMD_GETCLIPPLANE 259 -#define CMD_GETDOUBLEV 260 -#define CMD_GETERROR 261 -#define CMD_GETFLOATV 262 -#define CMD_GETINTEGERV 263 -#define CMD_GETLIGHTFV 264 -#define CMD_GETLIGHTIV 265 -#define CMD_GETMAPDV 266 -#define CMD_GETMAPFV 267 -#define CMD_GETMAPIV 268 -#define CMD_GETMATERIALFV 269 -#define CMD_GETMATERIALIV 270 -#define CMD_GETPIXELMAPFV 271 -#define CMD_GETPIXELMAPUIV 272 -#define CMD_GETPIXELMAPUSV 273 -#define CMD_GETPOLYGONSTIPPLE 274 -#define CMD_GETSTRING 275 -#define CMD_GETTEXENVFV 276 -#define CMD_GETTEXENVIV 277 -#define CMD_GETTEXGENDV 278 -#define CMD_GETTEXGENFV 279 -#define CMD_GETTEXGENIV 280 -#define CMD_GETTEXIMAGE 281 -#define CMD_GETTEXPARAMETERFV 282 -#define CMD_GETTEXPARAMETERIV 283 -#define CMD_GETTEXLEVELPARAMETERFV 284 -#define CMD_GETTEXLEVELPARAMETERIV 285 -#define CMD_ISENABLED 286 -#define CMD_ISLIST 287 -#define CMD_DEPTHRANGE 288 -#define CMD_FRUSTUM 289 -#define CMD_LOADIDENTITY 290 -#define CMD_LOADMATRIXF 291 -#define CMD_LOADMATRIXD 292 -#define CMD_MATRIXMODE 293 -#define CMD_MULTMATRIXF 294 -#define CMD_MULTMATRIXD 295 -#define CMD_ORTHO 296 -#define CMD_POPMATRIX 297 -#define CMD_PUSHMATRIX 298 -#define CMD_ROTATED 299 -#define CMD_ROTATEF 300 -#define CMD_SCALED 301 -#define CMD_SCALEF 302 -#define CMD_TRANSLATED 303 -#define CMD_TRANSLATEF 304 -#define CMD_VIEWPORT 305 -#define CMD_ARRAYELEMENT 306 -#define CMD_BINDTEXTURE 307 -#define CMD_COLORPOINTER 308 -#define CMD_DISABLECLIENTSTATE 309 -#define CMD_DRAWARRAYS 310 -#define CMD_DRAWELEMENTS 311 -#define CMD_EDGEFLAGPOINTER 312 -#define CMD_ENABLECLIENTSTATE 313 -#define CMD_INDEXPOINTER 314 -#define CMD_INDEXUB 315 -#define CMD_INDEXUBV 316 -#define CMD_INTERLEAVEDARRAYS 317 -#define CMD_NORMALPOINTER 318 -#define CMD_POLYGONOFFSET 319 -#define CMD_TEXCOORDPOINTER 320 -#define CMD_VERTEXPOINTER 321 -#define CMD_ARETEXTURESRESIDENT 322 -#define CMD_COPYTEXIMAGE1D 323 -#define CMD_COPYTEXIMAGE2D 324 -#define CMD_COPYTEXSUBIMAGE1D 325 -#define CMD_COPYTEXSUBIMAGE2D 326 -#define CMD_DELETETEXTURES 327 -#define CMD_GENTEXTURES 328 -#define CMD_GETPOINTERV 329 -#define CMD_ISTEXTURE 330 -#define CMD_PRIORITIZETEXTURES 331 -#define CMD_TEXSUBIMAGE1D 332 -#define CMD_TEXSUBIMAGE2D 333 -#define CMD_POPCLIENTATTRIB 334 -#define CMD_PUSHCLIENTATTRIB 335 -#define CMD_BLENDCOLOR 336 -#define CMD_BLENDEQUATION 337 -#define CMD_DRAWRANGEELEMENTS 338 -#define CMD_COLORTABLE 339 -#define CMD_COLORTABLEPARAMETERFV 340 -#define CMD_COLORTABLEPARAMETERIV 341 -#define CMD_COPYCOLORTABLE 342 -#define CMD_GETCOLORTABLE 343 -#define CMD_GETCOLORTABLEPARAMETERFV 344 -#define CMD_GETCOLORTABLEPARAMETERIV 345 -#define CMD_COLORSUBTABLE 346 -#define CMD_COPYCOLORSUBTABLE 347 -#define CMD_CONVOLUTIONFILTER1D 348 -#define CMD_CONVOLUTIONFILTER2D 349 -#define CMD_CONVOLUTIONPARAMETERF 350 -#define CMD_CONVOLUTIONPARAMETERFV 351 -#define CMD_CONVOLUTIONPARAMETERI 352 -#define CMD_CONVOLUTIONPARAMETERIV 353 -#define CMD_COPYCONVOLUTIONFILTER1D 354 -#define CMD_COPYCONVOLUTIONFILTER2D 355 -#define CMD_GETCONVOLUTIONFILTER 356 -#define CMD_GETCONVOLUTIONPARAMETERFV 357 -#define CMD_GETCONVOLUTIONPARAMETERIV 358 -#define CMD_GETSEPARABLEFILTER 359 -#define CMD_SEPARABLEFILTER2D 360 -#define CMD_GETHISTOGRAM 361 -#define CMD_GETHISTOGRAMPARAMETERFV 362 -#define CMD_GETHISTOGRAMPARAMETERIV 363 -#define CMD_GETMINMAX 364 -#define CMD_GETMINMAXPARAMETERFV 365 -#define CMD_GETMINMAXPARAMETERIV 366 -#define CMD_HISTOGRAM 367 -#define CMD_MINMAX 368 -#define CMD_RESETHISTOGRAM 369 -#define CMD_RESETMINMAX 370 -#define CMD_TEXIMAGE3D 371 -#define CMD_TEXSUBIMAGE3D 372 -#define CMD_COPYTEXSUBIMAGE3D 373 -#define CMD_ACTIVETEXTUREARB 374 -#define CMD_CLIENTACTIVETEXTUREARB 375 -#define CMD_MULTITEXCOORD1DARB 376 -#define CMD_MULTITEXCOORD1DVARB 377 -#define CMD_MULTITEXCOORD1FARB 378 -#define CMD_MULTITEXCOORD1FVARB 379 -#define CMD_MULTITEXCOORD1IARB 380 -#define CMD_MULTITEXCOORD1IVARB 381 -#define CMD_MULTITEXCOORD1SARB 382 -#define CMD_MULTITEXCOORD1SVARB 383 -#define CMD_MULTITEXCOORD2DARB 384 -#define CMD_MULTITEXCOORD2DVARB 385 -#define CMD_MULTITEXCOORD2FARB 386 -#define CMD_MULTITEXCOORD2FVARB 387 -#define CMD_MULTITEXCOORD2IARB 388 -#define CMD_MULTITEXCOORD2IVARB 389 -#define CMD_MULTITEXCOORD2SARB 390 -#define CMD_MULTITEXCOORD2SVARB 391 -#define CMD_MULTITEXCOORD3DARB 392 -#define CMD_MULTITEXCOORD3DVARB 393 -#define CMD_MULTITEXCOORD3FARB 394 -#define CMD_MULTITEXCOORD3FVARB 395 -#define CMD_MULTITEXCOORD3IARB 396 -#define CMD_MULTITEXCOORD3IVARB 397 -#define CMD_MULTITEXCOORD3SARB 398 -#define CMD_MULTITEXCOORD3SVARB 399 -#define CMD_MULTITEXCOORD4DARB 400 -#define CMD_MULTITEXCOORD4DVARB 401 -#define CMD_MULTITEXCOORD4FARB 402 -#define CMD_MULTITEXCOORD4FVARB 403 -#define CMD_MULTITEXCOORD4IARB 404 -#define CMD_MULTITEXCOORD4IVARB 405 -#define CMD_MULTITEXCOORD4SARB 406 -#define CMD_MULTITEXCOORD4SVARB 407 -#define CMD_LOADTRANSPOSEMATRIXFARB 408 -#define CMD_LOADTRANSPOSEMATRIXDARB 409 -#define CMD_MULTTRANSPOSEMATRIXFARB 410 -#define CMD_MULTTRANSPOSEMATRIXDARB 411 -#define CMD_SAMPLECOVERAGEARB 412 -#define CMD_SAMPLEPASSARB 413 -#define CMD_POLYGONOFFSETEXT 414 -#define CMD_GETTEXFILTERFUNCSGIS 415 -#define CMD_TEXFILTERFUNCSGIS 416 -#define CMD_GETHISTOGRAMEXT 417 -#define CMD_GETHISTOGRAMPARAMETERFVEXT 418 -#define CMD_GETHISTOGRAMPARAMETERIVEXT 419 -#define CMD_GETMINMAXEXT 420 -#define CMD_GETMINMAXPARAMETERFVEXT 421 -#define CMD_GETMINMAXPARAMETERIVEXT 422 -#define CMD_GETCONVOLUTIONFILTEREXT 423 -#define CMD_GETCONVOLUTIONPARAMETERFVEXT 424 -#define CMD_GETCONVOLUTIONPARAMETERIVEXT 425 -#define CMD_GETSEPARABLEFILTEREXT 426 -#define CMD_GETCOLORTABLESGI 427 -#define CMD_GETCOLORTABLEPARAMETERFVSGI 428 -#define CMD_GETCOLORTABLEPARAMETERIVSGI 429 -#define CMD_PIXELTEXGENSGIX 430 -#define CMD_PIXELTEXGENPARAMETERISGIS 431 -#define CMD_PIXELTEXGENPARAMETERIVSGIS 432 -#define CMD_PIXELTEXGENPARAMETERFSGIS 433 -#define CMD_PIXELTEXGENPARAMETERFVSGIS 434 -#define CMD_GETPIXELTexGenPARAMETERIVSGIS 435 -#define CMD_GETPIXELTexGenPARAMETERFVSGIS 436 -#define CMD_TEXIMAGE4DSGIS 437 -#define CMD_TEXSUBIMAGE4DSGIS 438 -#define CMD_ARETEXTURESRESIDENTEXT 439 -#define CMD_GENTEXTURESEXT 440 -#define CMD_ISTEXTUREEXT 441 -#define CMD_DETAILTEXFUNCSGIS 442 -#define CMD_GETDETAILTEXFUNCSGIS 443 -#define CMD_SHARPENTEXFUNCSGIS 444 -#define CMD_GETSHARPENTEXFUNCSGIS 445 -#define CMD_SAMPLEMASKSGIS 446 -#define CMD_SAMPLEPATTERNSGIS 447 -#define CMD_COLORPOINTEREXT 448 -#define CMD_EDGEFLAGPOINTEREXT 449 -#define CMD_INDEXPOINTEREXT 450 -#define CMD_NORMALPOINTEREXT 451 -#define CMD_TEXCOORDPOINTEREXT 452 -#define CMD_VERTEXPOINTEREXT 453 -#define CMD_SPRITEPARAMETERFSGIX 454 -#define CMD_SPRITEPARAMETERFVSGIX 455 -#define CMD_SPRITEPARAMETERISGIX 456 -#define CMD_SPRITEPARAMETERIVSGIX 457 -#define CMD_POINTPARAMETERFEXT 458 -#define CMD_POINTPARAMETERFVEXT 459 -#define CMD_GETINSTRUMENTSSGIX 460 -#define CMD_INSTRUMENTSBUFFERSGIX 461 -#define CMD_POLLINSTRUMENTSSGIX 462 -#define CMD_READINSTRUMENTSSGIX 463 -#define CMD_STARTINSTRUMENTSSGIX 464 -#define CMD_STOPINSTRUMENTSSGIX 465 -#define CMD_FRAMEZOOMSGIX 466 -#define CMD_TAGSAMPLEBUFFERSGIX 467 -#define CMD_REFERENCEPLANESGIX 468 -#define CMD_FLUSHRASTERSGIX 469 -#define CMD_GETLISTPARAMETERFVSGIX 470 -#define CMD_GETLISTPARAMETERIVSGIX 471 -#define CMD_LISTPARAMETERFSGIX 472 -#define CMD_LISTPARAMETERFVSGIX 473 -#define CMD_LISTPARAMETERISGIX 474 -#define CMD_LISTPARAMETERIVSGIX 475 -#define CMD_FRAGMENTCOLORMATERIALSGIX 476 -#define CMD_FRAGMENTLIGHTFSGIX 477 -#define CMD_FRAGMENTLIGHTFVSGIX 478 -#define CMD_FRAGMENTLIGHTISGIX 479 -#define CMD_FRAGMENTLIGHTIVSGIX 480 -#define CMD_FRAGMENTLIGHTMODELFSGIX 481 -#define CMD_FRAGMENTLIGHTMODELFVSGIX 482 -#define CMD_FRAGMENTLIGHTMODELISGIX 483 -#define CMD_FRAGMENTLIGHTMODELIVSGIX 484 -#define CMD_FRAGMENTMATERIALFSGIX 485 -#define CMD_FRAGMENTMATERIALFVSGIX 486 -#define CMD_FRAGMENTMATERIALISGIX 487 -#define CMD_FRAGMENTMATERIALIVSGIX 488 -#define CMD_GETFRAGMENTLIGHTFVSGIX 489 -#define CMD_GETFRAGMENTLIGHTIVSGIX 490 -#define CMD_GETFRAGMENTMATERIALFVSGIX 491 -#define CMD_GETFRAGMENTMATERIALIVSGIX 492 -#define CMD_LIGHTENVISGIX 493 -#define CMD_VERTEXWEIGHTFEXT 494 -#define CMD_VERTEXWEIGHTFVEXT 495 -#define CMD_VERTEXWEIGHTPOINTEREXT 496 -#define CMD_FLUSHVERTEXARRAYRANGENV 497 -#define CMD_VERTEXARRAYRANGENV 498 -#define CMD_COMBINERPARAMETERFVNV 499 -#define CMD_COMBINERPARAMETERFNV 500 -#define CMD_COMBINERPARAMETERIVNV 501 -#define CMD_COMBINERPARAMETERINV 502 -#define CMD_COMBINERINPUTNV 503 -#define CMD_COMBINEROUTPUTNV 504 -#define CMD_FINALCOMBINERINPUTNV 505 -#define CMD_GETCOMBINERINPUTPARAMETERFVNV 506 -#define CMD_GETCOMBINERINPUTPARAMETERIVNV 507 -#define CMD_GETCOMBINEROUTPUTPARAMETERFVNV 508 -#define CMD_GETCOMBINEROUTPUTPARAMETERIVNV 509 -#define CMD_GETFINALCOMBINERINPUTPARAMETERFVNV 510 -#define CMD_GETFINALCOMBINERINPUTPARAMETERIVNV 511 -#define CMD_RESIZEBUFFERSMESA 512 -#define CMD_WINDOWPOS2DMESA 513 -#define CMD_WINDOWPOS2DVMESA 514 -#define CMD_WINDOWPOS2FMESA 515 -#define CMD_WINDOWPOS2FVMESA 516 -#define CMD_WINDOWPOS2IMESA 517 -#define CMD_WINDOWPOS2IVMESA 518 -#define CMD_WINDOWPOS2SMESA 519 -#define CMD_WINDOWPOS2SVMESA 520 -#define CMD_WINDOWPOS3DMESA 521 -#define CMD_WINDOWPOS3DVMESA 522 -#define CMD_WINDOWPOS3FMESA 523 -#define CMD_WINDOWPOS3FVMESA 524 -#define CMD_WINDOWPOS3IMESA 525 -#define CMD_WINDOWPOS3IVMESA 526 -#define CMD_WINDOWPOS3SMESA 527 -#define CMD_WINDOWPOS3SVMESA 528 -#define CMD_WINDOWPOS4DMESA 529 -#define CMD_WINDOWPOS4DVMESA 530 -#define CMD_WINDOWPOS4FMESA 531 -#define CMD_WINDOWPOS4FVMESA 532 -#define CMD_WINDOWPOS4IMESA 533 -#define CMD_WINDOWPOS4IVMESA 534 -#define CMD_WINDOWPOS4SMESA 535 -#define CMD_WINDOWPOS4SVMESA 536 -#define CMD_BLENDFUNCSEPARATEEXT 537 -#define CMD_INDEXMATERIALEXT 538 -#define CMD_INDEXFUNCEXT 539 -#define CMD_LOCKARRAYSEXT 540 -#define CMD_UNLOCKARRAYSEXT 541 -#define CMD_CULLPARAMETERDVEXT 542 -#define CMD_CULLPARAMETERFVEXT 543 -#define CMD_HINTPGI 544 -#define CMD_FOGCOORDFEXT 545 -#define CMD_FOGCOORDFVEXT 546 -#define CMD_FOGCOORDDEXT 547 -#define CMD_FOGCOORDDVEXT 548 -#define CMD_FOGCOORDPOINTEREXT 549 -#define CMD_GETCOLORTABLEEXT 550 -#define CMD_GETCOLORTABLEPARAMETERIVEXT 551 -#define CMD_GETCOLORTABLEPARAMETERFVEXT 552 - - -/* FIXME: Trace Extension itself - not yet defined. */ -#define CMD_NEWTRACEMESA 666 -#define CMD_ENDTRACEMESA 667 -#define CMD_TRACECOMMENTMESA 668 - - - -/** - * Enumeration of non-GL entries in trace stream. - * This is (static) variable and "various" data, - * some of which optional. All these values are - * negative. - */ -#define VAR_VERSION -1 /* Metafile version. Mandatory. */ -#define VAR_CYCLES -2 /* Profiling, CPU cycles. Optional. */ -#define VAR_CONTEXT -3 /* Context ID. Optional. */ -#define VAR_THREAD -4 /* Thread ID. Optional. */ -#define VAR_STRING -5 /* Internally generated. Optional. */ - -#define VAR_COLORELEMENT -6 -#define VAR_EDGEFLAGELEMENT -7 -#define VAR_INDEXELEMENT -8 -#define VAR_NORMALELEMENT -9 -#define VAR_TEXCOORDELEMENT -10 -#define VAR_VERTEXELEMENT -11 /* Dereferenced Vertex Array Data. */ - - -/* FIXME: more VAR_ as needed. */ -/* - * Mindbender - The following two vars are needed to surround the queries - * performed when the trace context is in a half initialized - * state. - */ -#define VAR_OOBBEGIN -14 -#define VAR_OOBEND -15 - -/* - * Mindbender - These are needed when the pointer changes through one of the - * XXXPointer calls. Change these as needed. - */ -#define VAR_COLORPOINTER -8 -#define VAR_EDGEFLAGPOINTER -9 -#define VAR_INDEXPOINTER -10 -#define VAR_NORMALPOINTER -11 -#define VAR_TEXCOORDPOINTER -12 -#define VAR_VERTEXPOINTER -13 - - -#endif Index: xc/extras/Mesa/src/Trace/tr_context.c diff -u xc/extras/Mesa/src/Trace/tr_context.c:1.3 xc/extras/Mesa/src/Trace/tr_context.c:removed --- xc/extras/Mesa/src/Trace/tr_context.c:1.3 Wed Dec 11 16:13:32 2002 +++ xc/extras/Mesa/src/Trace/tr_context.c Wed Mar 16 21:00:46 2005 @@ -1,118 +0,0 @@ -#ifdef MESA_TRACE - -#include "glheader.h" -#include "glapi.h" -#include "glapitable.h" -#include "context.h" -#include "tr_context.h" - - -/* Full precision on floats/double, else human readable. */ -#define TR_FULL_PRECISION 0x000000001 - - -void trInitContext( trace_context_t * tr_context ) -{ - int i; - - if (!tr_context) - return; - - tr_context->traceEnabled = GL_FALSE; - tr_context->logFP = stdout; - tr_context->traceName = NULL; - - tr_context->traceAttribLogBits = GL_ALL_ATTRIB_BITS; - tr_context->traceEnableLogBits = GL_TRACE_ALL_BITS_MESA; - - tr_context->betweenBeginEnd = GL_FALSE; - - tr_context->framecounter = 0; - - tr_context->trDoPrint = GL_TRUE; - tr_context->doExec = GL_TRUE; - tr_context->check_errors = GL_TRUE; - - tr_context->head_errors = 0; - tr_context->tail_errors = 0; - - for( i = 0; i < TR_MAX_QUEUED_ERRORS; i++ ) { - tr_context->cached_errors[i] = GL_NO_ERROR; - } - -#if 0 - tr_context->doAsserts = GL_TRUE; - tr_context->clientStateValid = GL_FALSE; -#endif -} - - -/** - * Get the current context. - */ -trace_context_t* trCtx() { - GLcontext * ctx; - ctx = (GLcontext *)_glapi_get_context(); - - assert(ctx); - assert(ctx->TraceCtx); - if( (!ctx) || !(ctx->TraceCtx) ) { - _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__ ); - return NULL; - } - - return ctx->TraceCtx; -} - - -/** - * Get the current, real dispatch table pointer. - */ -struct _glapi_table* trGetDispatch() { - return _glapi_get_dispatch(); -} - - -void trSetTraceDispatch( void ) { - GLcontext * ctx; - ctx = (GLcontext *)_glapi_get_context(); - - assert( ctx ); - assert( ctx->TraceCtx ); - assert( ctx->TraceDispatch ); - - ctx->TraceCtx->traceEnabled = GL_TRUE; - - /* XXX save returned value */ - (void) _glapi_begin_dispatch_override(ctx->TraceDispatch); -} - - -void trSetOriginalDispatch( void ) { - GLcontext * ctx; - ctx = (GLcontext *)_glapi_get_context(); - - assert( ctx ); - assert( ctx->TraceCtx ); - assert( ctx->TraceDispatch ); - - ctx->TraceCtx->traceEnabled = GL_FALSE; - - /* XXX pass value we got from _glapi_begin_dispatch_override() */ - _glapi_end_dispatch_override(1); -} - - -/** - * Is error checking enabled? - */ -GLboolean trDoErrorCheck() { - return trCtx()->check_errors; -} - -#else -extern void tr_context_dummy_func(void); -void tr_context_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_context.h diff -u xc/extras/Mesa/src/Trace/tr_context.h:1.3 xc/extras/Mesa/src/Trace/tr_context.h:removed --- xc/extras/Mesa/src/Trace/tr_context.h:1.3 Wed Dec 11 16:13:32 2002 +++ xc/extras/Mesa/src/Trace/tr_context.h Wed Mar 16 21:00:46 2005 @@ -1,80 +0,0 @@ -#ifndef TR_CONTEXT_H -#define TR_CONTEXT_H - -#include "glheader.h" -#include "glapitable.h" - -#define TR_MAX_QUEUED_ERRORS 8 - - -/** - * State Variables. - * To make this thread-safe we'd maintain such - * a set per thread/context. - */ -typedef struct t_t{ - - GLboolean traceEnabled; - - /* The current log file pointer. */ - FILE * logFP; - - char * traceName; - - /* What frame we're currently on. */ - GLint framecounter; - - /* Not yet used. This field will control which attributes should be logged. */ - GLbitfield traceAttribLogBits; - - GLbitfield traceEnableLogBits; - - /* Used to short-circuit writing to the file, if the disk is full */ - GLboolean trDoPrint; - - /* Used to toggle whether the gl command should - * actually be executed. For now this will always be true. - */ - GLboolean doExec; - - /* Verify GL_NO_ERROR wherever possible. */ - GLboolean check_errors; - - /* Loop over all GL errors. - * TODO: We have to make sure the application gets - * the exact same errors despite our checking. - * That basically means we have to queue all - * errors from our internal checks. - */ - GLint head_errors; - GLint tail_errors; - - GLenum cached_errors[TR_MAX_QUEUED_ERRORS]; - - /* Not yet used. The 1st of many state flags used to - * track the current state of the GL state machine. - */ - GLboolean betweenBeginEnd; - -#if 0 - GLboolean doAsserts; - GLboolean clientStateValid; -#endif - -} trace_context_t; - - -extern void trInitContext( trace_context_t * tr_context ); - -extern trace_context_t* trCtx( void ); - -extern struct _glapi_table* trGetDispatch( void ); - -extern void trSetTraceDispatch( void ); - -extern void trSetOriginalDispatch( void ); - -extern GLboolean trDoErrorCheck( void ); - - -#endif Index: xc/extras/Mesa/src/Trace/tr_control.c diff -u xc/extras/Mesa/src/Trace/tr_control.c:1.3 xc/extras/Mesa/src/Trace/tr_control.c:removed --- xc/extras/Mesa/src/Trace/tr_control.c:1.3 Wed Dec 11 16:13:32 2002 +++ xc/extras/Mesa/src/Trace/tr_control.c Wed Mar 16 21:00:46 2005 @@ -1,147 +0,0 @@ -#ifdef MESA_TRACE -#include "glheader.h" -#include "glapi.h" -#include "context.h" /* for _mesa_error */ -#include "mtypes.h" -#include "tr_context.h" -#include "tr_write.h" - - -void glEnableTraceMESA( GLbitfield mask ) -{ - trace_context_t * tctx = trCtx(); - - tctx->traceEnableLogBits = mask; - tctx->traceEnabled = GL_TRUE; -} - - -void glDisableTraceMESA( GLbitfield mask ) -{ - /* Reset traceEnableLogBits ? */ - trCtx()->traceEnabled = GL_FALSE; -} - - -void glNewTraceMESA( GLbitfield logbits, const GLubyte * traceName ) -{ - char * newname; - GLint length; - GLcontext * ctx; - const char * defaultName = "traceGL"; - - ctx = (GLcontext *)_glapi_get_context(); - - assert(ctx); - assert(ctx->TraceCtx); - assert(ctx->TraceDispatch); - if( !ctx || /* Do we even have a context ? */ - (ctx->TraceCtx->betweenBeginEnd == GL_TRUE) || /* Are we currently between glBegin and glEnd ? */ - (ctx->TraceDispatch == _glapi_get_override_dispatch(1)) ) { /* Has a trace already started ? */ - _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__ ); - return; - } - - /* FIXME!!! When do we free tracename after the app is finished? */ - if( ctx->TraceCtx->traceName ) { - free( ctx->TraceCtx->traceName ); - } - - length = strlen((char *)traceName) + 1; - if( length != 1 ) { - newname = (char *)malloc( length ); - strncpy( (char *)newname, (char *)traceName, length ); - } else { - length = strlen( defaultName ); - newname = (char *)malloc( length ); - strncpy( (char *)newname, defaultName, length ); - } - ctx->TraceCtx->traceName = newname; - ctx->TraceCtx->traceAttribLogBits = logbits; - - trOpenLogFile(); - trSetTraceDispatch(); -} - - -void glEndTraceMESA(void) -{ - GLcontext * ctx; - - ctx = (GLcontext *)_glapi_get_context(); - assert(ctx); - assert(ctx->TraceCtx); - assert(ctx->TraceDispatch); - - /* Do we even have a context ? */ - /* Are we currently between glBegin and glEnd ? */ - /* Are we sure the current dispatch _is_ the TraceDispatch ? */ - if (!ctx || - (ctx->TraceCtx->betweenBeginEnd == GL_TRUE) || - (ctx->TraceDispatch != _glapi_get_override_dispatch(1)) ) { - _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__ ); - return; - } - -#if 0 - /* Always dump the max indices */ -// But not yet... - trWriteCMD( VAR_COLORPOINTER ); - trWritei( ctx->TraceCtx->trColorPtrState.maxIndex ); - trWriteCMD( VAR_EDGEFLAGPOINTER ); - trWritei( ctx->TraceCtx->trEdgeFlagPtrState.maxIndex ); - trWriteCMD( VAR_INDEXPOINTER ); - trWritei( ctx->TraceCtx->trIndexPtrState.maxIndex ); - trWriteCMD( VAR_NORMALPOINTER ); - trWritei( ctx->TraceCtx->trNormalPtrState.maxIndex ); - trWriteCMD( VAR_TEXCOORDPOINTER ); - trWritei( ctx->TraceCtx->trTexCoordPtrState.maxIndex ); - trWriteCMD( VAR_VERTEXPOINTER ); - trWritei( ctx->TraceCtx->trVertexPtrState.maxIndex ); -#endif - - trCloseLogFile(); - trSetOriginalDispatch(); -} - - -void glTraceAssertAttribMESA( GLbitfield attribMask ) -{ -#warning TraceAssertAttrib not implemented -} - - -void glTraceCommentMESA( const GLubyte * comment ) -{ - trWriteString( (char *)comment ); -} - - -void glTraceTextureMESA( GLuint name, const GLubyte* comment ) -{ -#warning TraceTexture not implemented -} - -void glTraceListMESA( GLuint name, const GLubyte* comment ) -{ -#warning TraceList not implemented -} - - -void glTracePointerMESA( GLvoid* pointer, const GLubyte* comment ) -{ -#warning TracePointer not implemented -} - - -void glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment ) -{ -#warning TracePointerRange not implemented -} - -#else -extern void tr_control_dummy_func(void); -void tr_control_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_error.c diff -u xc/extras/Mesa/src/Trace/tr_error.c:1.3 xc/extras/Mesa/src/Trace/tr_error.c:removed --- xc/extras/Mesa/src/Trace/tr_error.c:1.3 Wed Dec 11 16:13:33 2002 +++ xc/extras/Mesa/src/Trace/tr_error.c Wed Mar 16 21:00:46 2005 @@ -1,40 +0,0 @@ -#ifdef MESA_TRACE - -#include "tr_context.h" -#include "tr_error.h" -#include "tr_write.h" - - -/* Have a Begin/End flag, skip checks if in-between. */ - - -/** - * Some GL implementations cache errors internally, - * thus we have to loop until we do not get - * any errors. - */ -void trError( void ) { - int sanity = 0; /* Bail out on endless loops. */ - GLenum err; - - if( !(trCtx()->check_errors) ) - return; - - while ( (err=trGetDispatch()->GetError())!=GL_NO_ERROR ) { - trWriteEnum(err); - sanity++; - - if (sanity > TR_MAX_QUEUED_ERRORS ) { - /* Too many errors */ - return; - } - } -} - - -#else -extern void tr_error_dummy_func(void); -void tr_error_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_error.h diff -u xc/extras/Mesa/src/Trace/tr_error.h:1.3 xc/extras/Mesa/src/Trace/tr_error.h:removed --- xc/extras/Mesa/src/Trace/tr_error.h:1.3 Wed Dec 11 16:13:33 2002 +++ xc/extras/Mesa/src/Trace/tr_error.h Wed Mar 16 21:00:46 2005 @@ -1,7 +0,0 @@ -#ifndef TR_ERROR_H -#define TR_ERROR_H - -extern void trError( void ); - -#endif - Index: xc/extras/Mesa/src/Trace/tr_support.c diff -u xc/extras/Mesa/src/Trace/tr_support.c:1.3 xc/extras/Mesa/src/Trace/tr_support.c:removed --- xc/extras/Mesa/src/Trace/tr_support.c:1.3 Wed Dec 11 16:13:33 2002 +++ xc/extras/Mesa/src/Trace/tr_support.c Wed Mar 16 21:00:46 2005 @@ -1,584 +0,0 @@ -#ifdef MESA_TRACE - -#include "GL/gl.h" -#include "tr_context.h" -#include "tr_support.h" -#include "tr_write.h" - - -#if 0 -static void trQueryConvolutionState( void ) { - - if( trCtx()->trConvolutionWidth == -1 ) { - /* Query it */ - trWriteCMD( VAR_OOBBEGIN ); - trGetDispatch()->GetConvolutionParameteriv( GL_SEPARABLE_2D, GL_CONVOLUTION_WIDTH, - &(trCtx()->trConvolutionWidth) ); - trWriteCMD( VAR_OOBEND ); - } - - if( trCtx()->trConvolutionHeight == -1 ) { - /* Query it */ - trWriteCMD( VAR_OOBBEGIN ); - trGetDispatch()->GetConvolutionParameteriv( GL_SEPARABLE_2D, GL_CONVOLUTION_HEIGHT, - &(trCtx()->trConvolutionHeight) ); - trWriteCMD( VAR_OOBEND ); - } -} -#endif - - -void trZeroGetterData( GLenum pname, GLsizei typesize, GLvoid * params ) { - - switch( pname ) { - case GL_COLOR_MATRIX: - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - memset( params, 0, typesize * 16 ); - break; - - case GL_ACCUM_CLEAR_VALUE: - case GL_BLEND_COLOR: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_CURRENT_COLOR: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_POSITION: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_TEXTURE_COORDS: - case GL_LIGHT_MODEL_AMBIENT: - case GL_MAP2_GRID_DOMAIN: - case GL_SCISSOR_BOX: - case GL_VIEWPORT: - memset( params, 0, typesize * 4 ); - break; - - case GL_CURRENT_NORMAL: - memset( params, 0, typesize * 3 ); - break; - - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_RANGE: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_MAX_VIEWPORT_DIMS: - case GL_POLYGON_MODE: - case GL_SMOOTH_LINE_WIDTH_RANGE: - case GL_SMOOTH_POINT_SIZE_RANGE: - memset( params, 0, typesize * 2 ); - break; - - case GL_ACCUM_ALPHA_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACTIVE_TEXTURE_ARB: - case GL_ALPHA_BIAS: - case GL_ALPHA_BITS: - case GL_ALPHA_SCALE: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_ATTRIB_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_AUX_BUFFERS: - case GL_BLEND: - case GL_BLEND_SRC: - case GL_BLUE_BIAS: - case GL_BLUE_BITS: - case GL_BLUE_SCALE: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_STRIDE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_LOGIC_OP: - case GL_COLOR_MATERIAL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_DISTANCE: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_DEPTH_BIAS: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_DEPTH_SCALE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DITHER: - case GL_DOUBLEBUFFER: - case GL_DRAW_BUFFER: - case GL_EDGE_FLAG: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_FEEDBACK_BUFFER_SIZE: - case GL_FEEDBACK_BUFFER_TYPE: - case GL_FOG: - case GL_FOG_DENSITY: - case GL_FOG_END: - case GL_FOG_HINT: - case GL_FOG_INDEX: - case GL_FOG_MODE: - case GL_FOG_START: - case GL_FRONT_FACE: - case GL_GREEN_BIAS: - case GL_GREEN_BITS: - case GL_GREEN_SCALE: - case GL_HISTOGRAM: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_BITS: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_LOGIC_OP: - case GL_INDEX_MODE: - case GL_INDEX_OFFSET: - case GL_INDEX_SHIFT: - case GL_INDEX_WRITEMASK: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_LIGHTING: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LINE_SMOOTH: - case GL_LINE_SMOOTH_HINT: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LINE_WIDTH: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_LIST_MODE: - case GL_LOGIC_OP_MODE: - case GL_MAP1_COLOR_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_MATRIX_MODE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_CLIP_PLANES: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_LIST_NESTING: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_TEXTURE_UNITS_ARB: - case GL_MINMAX: - case GL_MODELVIEW_STACK_DEPTH: - case GL_NAME_STACK_DEPTH: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMALIZE: - case GL_PACK_ALIGNMENT: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SWAP_BYTES: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_POINT_SIZE: - case GL_POINT_SMOOTH: - case GL_POINT_SMOOTH_HINT: - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - case GL_POLYGON_OFFSET_FILL: - case GL_POLYGON_OFFSET_LINE: - case GL_POLYGON_OFFSET_POINT: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_SMOOTH_HINT: - case GL_POLYGON_STIPPLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_PROJECTION_STACK_DEPTH: - case GL_READ_BUFFER: - case GL_RED_BIAS: - case GL_RED_BITS: - case GL_RED_SCALE: - case GL_RENDER_MODE: - case GL_RESCALE_NORMAL: - case GL_RGBA_MODE: - case GL_SCISSOR_TEST: - case GL_SELECTION_BUFFER_SIZE: - case GL_SEPARABLE_2D: - case GL_SHADE_MODEL: - case GL_SMOOTH_LINE_WIDTH_GRANULARITY: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_STENCIL_BITS: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FAIL: - case GL_STENCIL_FUNC: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_TEST: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_WRITEMASK: - case GL_STEREO: - case GL_SUBPIXEL_BITS: - case GL_TEXTURE_1D: - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_GEN_Q: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_STACK_DEPTH: - case GL_UNPACK_ALIGNMENT: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SWAP_BYTES: - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_VERTEX_ARRAY_TYPE: - case GL_ZOOM_X: - case GL_ZOOM_Y: - memset( params, 0, typesize ); - break; - - default: - /* Bad enum. What should we do? */ - break; - } -} - - -void trPrintColorTableData( GLenum pname, GLenum type, GLvoid * params ) { - if( !(trCtx()->doExec) ) { - switch( pname ) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - if( type == GL_FLOAT ) { - memset( params, 0, 4 * sizeof(GLfloat) ); - } else { - memset( params, 0, 4 * sizeof(GLint) ); - } - break; - - case GL_COLOR_TABLE_FORMAT: - case GL_COLOR_TABLE_WIDTH: - case GL_COLOR_TABLE_RED_SIZE: - case GL_COLOR_TABLE_GREEN_SIZE: - case GL_COLOR_TABLE_BLUE_SIZE: - case GL_COLOR_TABLE_ALPHA_SIZE: - case GL_COLOR_TABLE_LUMINANCE_SIZE: - case GL_COLOR_TABLE_INTENSITY_SIZE: - if( type == GL_FLOAT ) { - ((GLfloat *)params)[0] = 0.0; - } else { - ((GLint *)params)[0] = 0; - } - break; - - default: - /* The 2nd pass should catch this */ - break; - } - } - - switch( pname ) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - if( type == GL_FLOAT ) { - trWriteArrayf( 4, (GLfloat *)params ); - } else { - trWriteArrayi( 4, (GLint *)params ); - } - break; - - case GL_COLOR_TABLE_FORMAT: - case GL_COLOR_TABLE_WIDTH: - case GL_COLOR_TABLE_RED_SIZE: - case GL_COLOR_TABLE_GREEN_SIZE: - case GL_COLOR_TABLE_BLUE_SIZE: - case GL_COLOR_TABLE_ALPHA_SIZE: - case GL_COLOR_TABLE_LUMINANCE_SIZE: - case GL_COLOR_TABLE_INTENSITY_SIZE: - if( type == GL_FLOAT ) { - trWritef( ((GLfloat *)params)[0] ); - } else { - trWritei( ((GLint *)params)[0] ); - } - break; - - default: - /* The 2nd pass should catch this */ - break; - } -} - - -void trWriteTypeArray( GLenum type, GLsizei width, GLsizei pixelsize, GLint start, const GLvoid * ptr ) { - - switch( type ) { - case GL_BYTE: - { - GLbyte * p = (GLbyte *)ptr + start * pixelsize; - trWriteArrayb( width * pixelsize, p ); - } - break; - - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - { - GLubyte * p = (GLubyte *)ptr + start * pixelsize; - trWriteArrayub( width * pixelsize, p ); - } - break; - - case GL_SHORT: - { - GLshort * p = (GLshort *)ptr + start * pixelsize; - trWriteArrays( width * pixelsize, p ); - } - break; - - case GL_UNSIGNED_SHORT: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - { - GLushort * p = (GLushort *)ptr + start * pixelsize; - trWriteArrayus( width * pixelsize, p ); - } - break; - - case GL_INT: - { - GLint * p = (GLint *)ptr + start * pixelsize; - trWriteArrayi( width * pixelsize, p ); - } - break; - - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - { - GLuint * p = (GLuint *)ptr + start * pixelsize; - trWriteArrayui( width * pixelsize, p ); - } - break; - - case GL_FLOAT: - { - GLfloat * p = (GLfloat *)ptr + start * pixelsize; - trWriteArrayf( width * pixelsize, p ); - } - break; - - default: - /* The 2nd pass should catch this. */ - break; - } -} - - -static GLint trGetFormatSize( GLenum format ) { - GLint pixelsize; - - switch( format ) { - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_INTENSITY: - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - pixelsize = 1; - break; - case GL_LUMINANCE_ALPHA: - pixelsize = 2; - break; - case GL_RGB: - case GL_BGR: - pixelsize = 3; - break; - case GL_RGBA: - case GL_BGRA: - pixelsize = 4; - break; - default: - /* The 2nd pass should catch this. */ - pixelsize = 0; - break; - } - - return pixelsize; -} - - -GLint trGetPixelSize( GLenum format, GLenum type ) { - GLint retval; - GLint formatsize = trGetFormatSize( format ); - - switch( type ) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - retval = formatsize * sizeof(GLubyte); - break; - - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - if( (type == GL_RGB) || (type == GL_BGR) ) { - retval = sizeof(GLubyte); - } else { - retval = -1; - } - break; - - case GL_SHORT: - case GL_UNSIGNED_SHORT: - retval = sizeof(GLushort); - break; - - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - if( (type == GL_RGB) || (type == GL_BGR) ) { - retval = sizeof(GLushort); - } else { - retval = -1; - } - break; - - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - if( (type == GL_RGBA) || (type == GL_BGRA) ) { - retval = sizeof(GLushort); - } else { - retval = -1; - } - break; - - case GL_INT: - case GL_UNSIGNED_INT: - retval = sizeof(GLuint); - break; - - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - if( (type == GL_RGBA) || (type == GL_BGRA) ) { - retval = sizeof(GLuint); - } else { - retval = -1; - } - break; - - case GL_FLOAT: - retval = sizeof(GLfloat); - break; - - default: - retval = -1; - break; - } - - return retval; -} - - -#else -extern void tr_support_dummy_func(void); -void tr_support_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_support.h diff -u xc/extras/Mesa/src/Trace/tr_support.h:1.3 xc/extras/Mesa/src/Trace/tr_support.h:removed --- xc/extras/Mesa/src/Trace/tr_support.h:1.3 Wed Dec 11 16:13:33 2002 +++ xc/extras/Mesa/src/Trace/tr_support.h Wed Mar 16 21:00:46 2005 @@ -1,16 +0,0 @@ -#ifndef TR_SUPPORT_H -#define TR_SUPPORT_H - - -extern void trQueryConvolutionState( void ); - -extern void trZeroGetterData( GLenum pname, GLsizei typesize, GLvoid * params ); - -extern void trPrintColorTableData( GLenum pname, GLenum type, GLvoid * params ); - -extern void trWriteTypeArray( GLenum type, GLsizei width, GLsizei pixelsize, GLint start, const GLvoid * ptr ); - -extern GLint trGetPixelSize( GLenum format, GLenum type ); - - -#endif Index: xc/extras/Mesa/src/Trace/tr_wrapper.c diff -u xc/extras/Mesa/src/Trace/tr_wrapper.c:1.3 xc/extras/Mesa/src/Trace/tr_wrapper.c:removed --- xc/extras/Mesa/src/Trace/tr_wrapper.c:1.3 Wed Dec 11 16:13:33 2002 +++ xc/extras/Mesa/src/Trace/tr_wrapper.c Wed Mar 16 21:00:46 2005 @@ -1,9311 +0,0 @@ -#ifdef MESA_TRACE - -#include "glheader.h" -#include "glapitable.h" -#include "tr_write.h" -#include "tr_error.h" -#include "tr_context.h" -#include "tr_commands.h" -#include "tr_support.h" -#include "tr_wrapper.h" - - -#ifdef GLAPI -#undef GLAPI -#endif -#define GLAPI static - -#ifdef GLAPIENTRY -#undef GLAPIENTRY -#endif -#define GLAPIENTRY - - -GLAPI void GLAPIENTRY trAccum( GLenum op, GLfloat value ) { - trWriteCMD( CMD_ACCUM ); - trWriteEnum( op ); - trWritef( value ); - - if( trCtx()->doExec ) { - trGetDispatch()->Accum( op, value ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trActiveTextureARB( GLenum texture) { - trWriteCMD( CMD_ACTIVETEXTUREARB ); - trWriteEnum( texture ); - - if( trCtx()->doExec ) { - trGetDispatch()->ActiveTextureARB( texture ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trAlphaFunc( GLenum func, GLclampf ref ) { - trWriteCMD( CMD_ALPHAFUNC ); - trWriteEnum( func ); - trWriteClampf( ref ); - - if( trCtx()->doExec ) { - trGetDispatch()->AlphaFunc( func, ref ); - trError(); - } -} - - -GLAPI GLboolean GLAPIENTRY trAreTexturesResident( GLsizei n, const GLuint *textures, GLboolean *residences ) { - GLboolean retval; - - trWriteCMD( CMD_ARETEXTURESRESIDENT ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - trWritePointer( (void *)residences ); - trFileFlush(); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->AreTexturesResident( n, textures, residences ); - trError(); - } else { - memset( residences, 0, n * sizeof(GLboolean) ); - retval = GL_NO_ERROR; - } - - trWriteBool( retval ); - trWriteArrayBool( n, residences ); - - return retval; -} - - -GLAPI GLboolean GLAPIENTRY trAreTexturesResidentEXT( GLsizei n, const GLuint *textures, GLboolean *residences ) { - GLboolean retval; - - trWriteCMD( CMD_ARETEXTURESRESIDENTEXT ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - trWritePointer( (void *)residences ); - trFileFlush(); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->AreTexturesResidentEXT( n, textures, residences ); - trError(); - } else { - memset( residences, 0, n * sizeof(GLboolean) ); - retval = GL_NO_ERROR; - } - - trWriteBool( retval ); - trWriteArrayBool( n, residences ); - - return retval; -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trArrayElementEXT( GLint i ) { - trWriteCMD( CMD_ARRAYELEMENTEXT ); - trWritei( i ); - - if( trCtx()->doExec ) { - trGetDispatch()->ArrayElementEXT( i ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trArrayElement( GLint i ) { - trace_context_t * tctx; - - trWriteCMD( CMD_ARRAYELEMENT ); - trWritei( i ); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->ArrayElement( i ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trBegin( GLenum mode ) { - trWriteCMD( CMD_BEGIN ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->Begin( mode ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trBindTextureEXT( GLenum target, GLuint texture ) { - trWriteCMD( CMD_BINDTEXTUREEXT ); - trWriteEnum( target ); - trWriteui( texture ); - - if( trCtx()->doExec ) { - trGetDispatch()->BindTextureEXT( target, texture ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trBindTexture( GLenum target, GLuint texture ) { - trWriteCMD( CMD_BINDTEXTURE ); - trWriteEnum( target ); - trWriteui( texture ); - - if( trCtx()->doExec ) { - trGetDispatch()->BindTexture( target, texture ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trBitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap ) { - trWriteCMD( CMD_BITMAP ); - trWriteSizei( width ); - trWriteSizei( height ); - trWritef( xorig ); - trWritef( yorig ); - trWritef( xmove ); - trWritef( ymove ); - trWritePointer( (void *)bitmap ); - trFileFlush(); - trWriteArrayub( width * height / 8, bitmap ); - - if( trCtx()->doExec ) { - trGetDispatch()->Bitmap( width, height, xorig, yorig, xmove, ymove, bitmap ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trBlendColorEXT( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) { - trWriteCMD( CMD_BLENDCOLOREXT ); - trWriteClampf( red ); - trWriteClampf( green ); - trWriteClampf( blue ); - trWriteClampf( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->BlendColorEXT( red, green, blue, alpha ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trBlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) { - trWriteCMD( CMD_BLENDCOLOR ); - trWriteClampf( red ); - trWriteClampf( green ); - trWriteClampf( blue ); - trWriteClampf( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->BlendColor( red, green, blue, alpha ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trBlendEquationEXT( GLenum mode ) { - trWriteCMD( CMD_BLENDEQUATIONEXT ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->BlendEquationEXT( mode ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trBlendEquation( GLenum mode ) { - trWriteCMD( CMD_BLENDEQUATION ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->BlendEquation( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trBlendFunc( GLenum sfactor, GLenum dfactor ) { - trWriteCMD( CMD_BLENDFUNC ); - trWriteEnum( sfactor ); - trWriteEnum( dfactor ); - - if( trCtx()->doExec ) { - trGetDispatch()->BlendFunc( sfactor, dfactor ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCallList( GLuint list ) { - trWriteCMD( CMD_CALLLIST ); - trWriteui( list ); - - if( trCtx()->doExec ) { - trSetOriginalDispatch(); - trGetDispatch()->CallList( list ); - trSetTraceDispatch(); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCallLists( GLsizei n, GLenum type, const GLvoid *lists ) { - trWriteCMD( CMD_CALLLISTS ); - trWriteSizei( n ); - trWriteEnum( type ); - trWritePointer( (void *)lists ); - trFileFlush(); - - switch( type ) { - case GL_2_BYTES: - trWriteTypeArray( GL_UNSIGNED_BYTE, n, 2, 0, lists ); - break; - case GL_3_BYTES: - trWriteTypeArray( GL_UNSIGNED_BYTE, n, 3, 0, lists ); - break; - case GL_4_BYTES: - trWriteTypeArray( GL_UNSIGNED_BYTE, n, 4, 0, lists ); - break; - default: - trWriteTypeArray( type, n, 1, 0, lists ); - break; - } - - if( trCtx()->doExec ) { - trSetOriginalDispatch(); - trGetDispatch()->CallLists( n, type, lists ); - trSetTraceDispatch(); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) { - trWriteCMD( CMD_CLEARACCUM ); - trWritef( red ); - trWritef( green ); - trWritef( blue ); - trWritef( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClearAccum( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) { - trWriteCMD( CMD_CLEARCOLOR ); - trWriteClampf( red ); - trWriteClampf( green ); - trWriteClampf( blue ); - trWriteClampf( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClearColor( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClearDepth( GLclampd depth ) { - trWriteCMD( CMD_CLEARDEPTH ); - trWriteClampd( depth ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClearDepth( depth ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClear( GLbitfield mask ) { - trWriteCMD( CMD_CLEAR ); - trWriteBits( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->Clear( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClearIndex( GLfloat c ) { - trWriteCMD( CMD_CLEARINDEX ); - trWritef( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClearIndex( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClearStencil( GLint s ) { - trWriteCMD( CMD_CLEARSTENCIL ); - trWritei( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClearStencil( s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClientActiveTextureARB( GLenum texture) { - trWriteCMD( CMD_CLIENTACTIVETEXTUREARB ); - trWriteEnum( texture ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClientActiveTextureARB( texture ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trClipPlane( GLenum plane, const GLdouble *equation ) { - trWriteCMD( CMD_CLIPPLANE ); - trWriteEnum( plane ); - trWritePointer( (void *)equation ); - trFileFlush(); - trWriteArrayd( 4, equation ); - - if( trCtx()->doExec ) { - trGetDispatch()->ClipPlane( plane, equation ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3b( GLbyte red, GLbyte green, GLbyte blue ) { - trWriteCMD( CMD_COLOR3B ); - trWriteb( red ); - trWriteb( green ); - trWriteb( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3b( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3bv( const GLbyte *v ) { - trWriteCMD( CMD_COLOR3BV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayb( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3bv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3d( GLdouble red, GLdouble green, GLdouble blue ) { - trWriteCMD( CMD_COLOR3D ); - trWrited( red ); - trWrited( green ); - trWrited( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3d( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3dv( const GLdouble *v ) { - trWriteCMD( CMD_COLOR3DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3f( GLfloat red, GLfloat green, GLfloat blue ) { - trWriteCMD( CMD_COLOR3F ); - trWritef( red ); - trWritef( green ); - trWritef( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3f( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3fv( const GLfloat *v ) { - trWriteCMD( CMD_COLOR3FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3i( GLint red, GLint green, GLint blue ) { - trWriteCMD( CMD_COLOR3I ); - trWritei( red ); - trWritei( green ); - trWritei( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3i( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3iv( const GLint *v ) { - trWriteCMD( CMD_COLOR3IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3s( GLshort red, GLshort green, GLshort blue ) { - trWriteCMD( CMD_COLOR3S ); - trWrites( red ); - trWrites( green ); - trWrites( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3s( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3sv( const GLshort *v ) { - trWriteCMD( CMD_COLOR3SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3ub( GLubyte red, GLubyte green, GLubyte blue ) { - trWriteCMD( CMD_COLOR3UB ); - trWriteub( red ); - trWriteub( green ); - trWriteub( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3ub( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3ubv( const GLubyte *v ) { - trWriteCMD( CMD_COLOR3UBV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayub( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3ubv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3ui( GLuint red, GLuint green, GLuint blue ) { - trWriteCMD( CMD_COLOR3UI ); - trWriteui( red ); - trWriteui( green ); - trWriteui( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3ui( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3uiv( const GLuint *v ) { - trWriteCMD( CMD_COLOR3UIV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayui( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3uiv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3us( GLushort red, GLushort green, GLushort blue ) { - trWriteCMD( CMD_COLOR3US ); - trWriteus( red ); - trWriteus( green ); - trWriteus( blue ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3us( red, green, blue ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor3usv( const GLushort *v ) { - trWriteCMD( CMD_COLOR3USV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayus( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color3usv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4b( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ) { - trWriteCMD( CMD_COLOR4B ); - trWriteb( red ); - trWriteb( green ); - trWriteb( blue ); - trWriteb( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4b( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4bv( const GLbyte *v ) { - trWriteCMD( CMD_COLOR4BV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayb( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4bv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) { - trWriteCMD( CMD_COLOR4D ); - trWrited( red ); - trWrited( green ); - trWrited( blue ); - trWrited( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4d( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4dv( const GLdouble *v ) { - trWriteCMD( CMD_COLOR4DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4f( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) { - trWriteCMD( CMD_COLOR4F ); - trWritef( red ); - trWritef( green ); - trWritef( blue ); - trWritef( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4f( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4fv( const GLfloat *v ) { - trWriteCMD( CMD_COLOR4FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4i( GLint red, GLint green, GLint blue, GLint alpha ) { - trWriteCMD( CMD_COLOR4I ); - trWritei( red ); - trWritei( green ); - trWritei( blue ); - trWritei( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4i( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4iv( const GLint *v ) { - trWriteCMD( CMD_COLOR4IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4s( GLshort red, GLshort green, GLshort blue, GLshort alpha ) { - trWriteCMD( CMD_COLOR4S ); - trWrites( red ); - trWrites( green ); - trWrites( blue ); - trWrites( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4s( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4sv( const GLshort *v ) { - trWriteCMD( CMD_COLOR4SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) { - trWriteCMD( CMD_COLOR4UB ); - trWriteub( red ); - trWriteub( green ); - trWriteub( blue ); - trWriteub( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4ub( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4ubv( const GLubyte *v ) { - trWriteCMD( CMD_COLOR4UBV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayub( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4ubv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha ) { - trWriteCMD( CMD_COLOR4UI ); - trWriteui( red ); - trWriteui( green ); - trWriteui( blue ); - trWriteui( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4ui( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4uiv( const GLuint *v ) { - trWriteCMD( CMD_COLOR4UIV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayui( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4uiv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4us( GLushort red, GLushort green, GLushort blue, GLushort alpha ) { - trWriteCMD( CMD_COLOR4US ); - trWriteus( red ); - trWriteus( green ); - trWriteus( blue ); - trWriteus( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4us( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColor4usv( const GLushort *v ) { - trWriteCMD( CMD_COLOR4USV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayus( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Color4usv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) { - trWriteCMD( CMD_COLORMASK ); - trWriteBool( red ); - trWriteBool( green ); - trWriteBool( blue ); - trWriteBool( alpha ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorMask( red, green, blue, alpha ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorMaterial( GLenum face, GLenum mode ) { - trWriteCMD( CMD_COLORMATERIAL ); - trWriteEnum( face ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorMaterial( face, mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_COLORPOINTEREXT ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorPointerEXT( size, type, stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ) { - trace_context_t * tctx; - - trWriteCMD( CMD_COLORPOINTER ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( tctx->doExec ) { - trGetDispatch()->ColorPointer( size, type, stride, ptr ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trColorSubTableEXT( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ) { - GLint pixelsize; - - trWriteCMD( CMD_COLORSUBTABLEEXT ); - trWriteEnum( target ); - trWriteSizei( start ); - trWriteSizei( count ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)data ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - trWriteTypeArray( type, count, pixelsize, start, data ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorSubTableEXT( target, start, count, format, type, data ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trColorSubTable( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ) { - GLint pixelsize; - - trWriteCMD( CMD_COLORSUBTABLE ); - trWriteEnum( target ); - trWriteSizei( start ); - trWriteSizei( count ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)data ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - trWriteTypeArray( type, count, pixelsize, start, data ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorSubTable( target, start, count, format, type, data ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trColorTableEXT( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ) { - GLint pixelsize; - - trWriteCMD( CMD_COLORTABLEEXT ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteSizei( width ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)table ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - trWriteTypeArray( type, width, pixelsize, 0, table ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorTableEXT( target, internalformat, width, format, type, table ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trColorTable( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_COLORTABLE ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteSizei( width ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)table ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorTable( target, internalformat, width, format, type, table ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorTableParameterfv( GLenum target, GLenum pname, const GLfloat *params) { - trWriteCMD( CMD_COLORTABLEPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - trWriteArrayf( 4, params ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorTableParameterfv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trColorTableParameteriv( GLenum target, GLenum pname, const GLint *params) { - trWriteCMD( CMD_COLORTABLEPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - trWriteArrayi( 4, params ); - - if( trCtx()->doExec ) { - trGetDispatch()->ColorTableParameteriv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionFilter1D( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image ) { - GLint pixelsize; - - trWriteCMD( CMD_CONVOLUTIONFILTER1D ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteSizei( width ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)image ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - trWriteTypeArray( type, width, pixelsize, 0, image ); - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionFilter1D( target, internalformat, width, format, type, image ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionFilter2D( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image ) { - GLint i; - GLint pixelsize; - - trWriteCMD( CMD_CONVOLUTIONFILTER2D ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)image ); - trFileFlush(); - - /* p76 of GL spec says this isn't subject to unpack_row_width... */ - pixelsize = trGetPixelSize( format, type ); - for( i = 0; i < height; i++ ) { - trWriteTypeArray( type, width, pixelsize, i * width, image ); - } - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionFilter2D( target, internalformat, width, height, format, type, image ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionParameterf( GLenum target, GLenum pname, GLfloat params ) { - trWriteCMD( CMD_CONVOLUTIONPARAMETERF ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritef( params ); - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionParameterf( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionParameterfv( GLenum target, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_CONVOLUTIONPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_CONVOLUTION_BORDER_MODE: - trWritef( params[0] ); - break; - case GL_CONVOLUTION_BORDER_COLOR: - trWriteArrayf( 4, params ); - break; - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionParameterfv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionParameteri( GLenum target, GLenum pname, GLint params ) { - trWriteCMD( CMD_CONVOLUTIONPARAMETERI ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritei( params ); - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionParameteri( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trConvolutionParameteriv( GLenum target, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_CONVOLUTIONPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_CONVOLUTION_BORDER_MODE: - trWritei( params[0] ); - break; - case GL_CONVOLUTION_BORDER_COLOR: - trWriteArrayi( 4, params ); - break; - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->ConvolutionParameteriv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyColorSubTable( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ) { - trWriteCMD( CMD_COPYCOLORSUBTABLE ); - trWriteEnum( target ); - trWriteSizei( start ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyColorSubTable( target, start, x, y, width ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyColorTable( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ) { - trWriteCMD( CMD_COPYCOLORTABLE ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyColorTable( target, internalformat, x, y, width ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyConvolutionFilter1D( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ) { - trWriteCMD( CMD_COPYCONVOLUTIONFILTER1D ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyConvolutionFilter1D( target, internalformat, x, y, width ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyConvolutionFilter2D( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) { - trWriteCMD( CMD_COPYCONVOLUTIONFILTER2D ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyConvolutionFilter2D( target, internalformat, x, y, width, height ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ) { - trWriteCMD( CMD_COPYPIXELS ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( type ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyPixels( x, y, width, height, type ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ) { - trWriteCMD( CMD_COPYTEXIMAGE1D ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( internalformat ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWritei( border ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexImage1D( target, level, internalformat, x, y, width, border ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) { - trWriteCMD( CMD_COPYTEXIMAGE2D ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( internalformat ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - trWritei( border ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexImage2D( target, level, internalformat, x, y, width, height, border ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) { - trWriteCMD( CMD_COPYTEXSUBIMAGE1D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexSubImage1D( target, level, xoffset, x, y, width ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - trWriteCMD( CMD_COPYTEXSUBIMAGE2D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trCopyTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - trWriteCMD( CMD_COPYTEXSUBIMAGE3DEXT ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWritei( zoffset ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexSubImage3DEXT( target, level, xoffset, yoffset, zoffset, x, y, width, height ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) { - trWriteCMD( CMD_COPYTEXSUBIMAGE3D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWritei( zoffset ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->CopyTexSubImage3D( target, level, xoffset, yoffset, zoffset, x, y, width, height ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trCullFace( GLenum mode ) { - trWriteCMD( CMD_CULLFACE ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->CullFace( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDeleteLists( GLuint list, GLsizei range ) { - trWriteCMD( CMD_DELETELISTS ); - trWriteui( list ); - trWriteSizei( range ); - - if( trCtx()->doExec ) { - trGetDispatch()->DeleteLists( list, range ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trDeleteTexturesEXT( GLsizei n, const GLuint *textures) { - trWriteCMD( CMD_DELETETEXTURESEXT ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - - if( trCtx()->doExec ) { - trGetDispatch()->DeleteTexturesEXT( n, textures ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trDeleteTextures( GLsizei n, const GLuint *textures) { - trWriteCMD( CMD_DELETETEXTURES ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - - if( trCtx()->doExec ) { - trGetDispatch()->DeleteTextures( n, textures ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDepthFunc( GLenum func ) { - trWriteCMD( CMD_DEPTHFUNC ); - trWriteEnum( func ); - - if( trCtx()->doExec ) { - trGetDispatch()->DepthFunc( func ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDepthMask( GLboolean flag ) { - trWriteCMD( CMD_DEPTHMASK ); - trWriteBool( flag ); - - if( trCtx()->doExec ) { - trGetDispatch()->DepthMask( flag ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDepthRange( GLclampd near_val, GLclampd far_val ) { - trWriteCMD( CMD_DEPTHRANGE ); - trWriteClampd( near_val ); - trWriteClampd( far_val ); - - if( trCtx()->doExec ) { - trGetDispatch()->DepthRange( near_val, far_val ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDisableClientState( GLenum cap ) { - trace_context_t * tctx; - - trWriteCMD( CMD_DISABLECLIENTSTATE ); - trWriteEnum( cap ); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->DisableClientState( cap ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDisable( GLenum cap ) { - trWriteCMD( CMD_DISABLE ); - trWriteEnum( cap ); - - if( trCtx()->doExec ) { - trGetDispatch()->Disable( cap ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trDrawArraysEXT( GLenum mode, GLint first, GLsizei count ) { - trWriteCMD( CMD_DRAWARRAYSEXT ); - trWriteEnum( mode ); - trWritei( first ); - trWriteSizei( count ); - - if( trCtx()->doExec ) { - trGetDispatch()->DrawArraysEXT( mode, first, count ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trDrawArrays( GLenum mode, GLint first, GLsizei count ) { - - trWriteCMD( CMD_DRAWARRAYS ); - trWriteEnum( mode ); - trWritei( first ); - trWriteSizei( count ); - - if( trCtx()->doExec ) { - trGetDispatch()->DrawArrays( mode, first, count ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDrawBuffer( GLenum mode ) { - trWriteCMD( CMD_DRAWBUFFER ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->DrawBuffer( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) { - trace_context_t * tctx; - - trWriteCMD( CMD_DRAWELEMENTS ); - trWriteEnum( mode ); - trWriteSizei( count ); - trWriteEnum( type ); - trWritePointer( (void *)indices ); - trFileFlush(); - /* Why isn't the indices a GLint * ? */ - trWriteArrayi( count, (GLint *)indices ); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->DrawElements( mode, count, type, indices ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDrawPixels( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_DRAWPIXELS ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->DrawPixels( width, height, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) { - trace_context_t * tctx; - - trWriteCMD( CMD_DRAWRANGEELEMENTS ); - trWriteEnum( mode ); - trWriteui( start ); - trWriteui( end ); - trWriteSizei( count ); - trWriteEnum( type ); - trWritePointer( (void *)indices ); - trFileFlush(); - switch( type ) { - case GL_UNSIGNED_BYTE: - trWriteArrayub( count, (GLubyte *)indices ); - break; - case GL_UNSIGNED_SHORT: - trWriteArrayus( count, (GLushort *)indices ); - break; - case GL_UNSIGNED_INT: - trWriteArrayui( count, (GLuint *)indices ); - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - tctx = trCtx(); - - if( trCtx()->doExec ) { - trGetDispatch()->DrawRangeElements( mode, start, end, count, type, indices ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEdgeFlag( GLboolean flag ) { - trWriteCMD( CMD_EDGEFLAG ); - trWriteBool( flag ); - - if( trCtx()->doExec ) { - trGetDispatch()->EdgeFlag( flag ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEdgeFlagPointerEXT( GLsizei stride, GLsizei count, const GLboolean *ptr ) { /* TODO */ - trWriteCMD( CMD_EDGEFLAGPOINTEREXT ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->EdgeFlagPointerEXT( stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ) { /* TODO */ - trace_context_t * tctx; - - trWriteCMD( CMD_EDGEFLAGPOINTER ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->EdgeFlagPointer( stride, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEdgeFlagv( const GLboolean *flag ) { - trWriteCMD( CMD_EDGEFLAGV ); - trWritePointer( (void *)flag ); - trFileFlush(); - trWriteBool( flag[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->EdgeFlagv( flag ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEnableClientState( GLenum cap ) { - trace_context_t * tctx; - - trWriteCMD( CMD_ENABLECLIENTSTATE ); - trWriteEnum( cap ); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->EnableClientState( cap ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEnable( GLenum cap ) { - trWriteCMD( CMD_ENABLE ); - trWriteEnum( cap ); - - if( trCtx()->doExec ) { - trGetDispatch()->Enable( cap ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEndList( void ) { - trWriteCMD( CMD_ENDLIST ); - - if( trCtx()->doExec ) { - trGetDispatch()->EndList( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEnd( void ) { - trWriteCMD( CMD_END ); - - if( trCtx()->doExec ) { - trGetDispatch()->End( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord1d( GLdouble u ) { - trWriteCMD( CMD_EVALCOORD1D ); - trWrited( u ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord1d( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord1dv( const GLdouble *u ) { - trWriteCMD( CMD_EVALCOORD1DV ); - trWritePointer( (void *)u ); - trFileFlush(); - trWrited( u[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord1dv( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord1f( GLfloat u ) { - trWriteCMD( CMD_EVALCOORD1F ); - trWritef( u ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord1f( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord1fv( const GLfloat *u ) { - trWriteCMD( CMD_EVALCOORD1FV ); - trWritePointer( (void *)u ); - trFileFlush(); - trWritef( u[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord1fv( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord2d( GLdouble u, GLdouble v ) { - trWriteCMD( CMD_EVALCOORD2D ); - trWrited( u ); - trWrited( v ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord2d( u, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord2dv( const GLdouble *u ) { - trWriteCMD( CMD_EVALCOORD2DV ); - trWritePointer( (void *)u ); - trFileFlush(); - trWriteArrayd( 2, u ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord2dv( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord2f( GLfloat u, GLfloat v ) { - trWriteCMD( CMD_EVALCOORD2F ); - trWritef( u ); - trWritef( v ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord2f( u, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalCoord2fv( const GLfloat *u ) { - trWriteCMD( CMD_EVALCOORD2FV ); - trWritePointer( (void *)u ); - trFileFlush(); - trWriteArrayf( 2, u ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalCoord2fv( u ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalMesh1( GLenum mode, GLint i1, GLint i2 ) { - trWriteCMD( CMD_EVALMESH1 ); - trWriteEnum( mode ); - trWritei( i1 ); - trWritei( i2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalMesh1( mode, i1, i2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) { - trWriteCMD( CMD_EVALMESH2 ); - trWriteEnum( mode ); - trWritei( i1 ); - trWritei( i2 ); - trWritei( j1 ); - trWritei( j2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalMesh2( mode, i1, i2, j1, j2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalPoint1( GLint i ) { - trWriteCMD( CMD_EVALPOINT1 ); - trWritei( i ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalPoint1( i ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trEvalPoint2( GLint i, GLint j ) { - trWriteCMD( CMD_EVALPOINT2 ); - trWritei( i ); - trWritei( j ); - - if( trCtx()->doExec ) { - trGetDispatch()->EvalPoint2( i, j ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) { - trWriteCMD( CMD_FEEDBACKBUFFER ); - trWriteSizei( size ); - trWriteEnum( type ); - trWritePointer( (void *)buffer ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->FeedbackBuffer( size, type, buffer ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFinish( void ) { - trWriteCMD( CMD_FINISH ); - - if( trCtx()->doExec ) { - trGetDispatch()->Finish( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFlush( void ) { - trWriteCMD( CMD_FLUSH ); - - if( trCtx()->doExec ) { - trGetDispatch()->Flush( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFogf( GLenum pname, GLfloat param ) { - trWriteCMD( CMD_FOGF ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Fogf( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFogfv( GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_FOGFV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_FOG_MODE: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_INDEX: - trWritef( params[0] ); - break; - - case GL_FOG_COLOR: - trWriteArrayf( 4, params ); - break; - - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Fogfv( pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFogi( GLenum pname, GLint param ) { - trWriteCMD( CMD_FOGI ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Fogi( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFogiv( GLenum pname, const GLint *params ) { - trWriteCMD( CMD_FOGIV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_FOG_MODE: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_INDEX: - trWritei( params[0] ); - break; - - case GL_FOG_COLOR: - trWriteArrayi( 4, params ); - break; - - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Fogiv( pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFrontFace( GLenum mode ) { - trWriteCMD( CMD_FRONTFACE ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->FrontFace( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) { - trWriteCMD( CMD_FRUSTUM ); - trWrited( left ); - trWrited( right ); - trWrited( bottom ); - trWrited( top ); - trWrited( near_val ); - trWrited( far_val ); - - if( trCtx()->doExec ) { - trGetDispatch()->Frustum( left, right, bottom, top, near_val, far_val ); - trError(); - } -} - - -GLAPI GLuint GLAPIENTRY trGenLists( GLsizei range ) { - GLuint retval; - - trWriteCMD( CMD_GENLISTS ); - trWriteSizei( range ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->GenLists( range ); - trError(); - } else { - retval = 0; - } - - trWriteui( retval ); - return retval; -} - - -GLAPI void GLAPIENTRY trGenTexturesEXT( GLsizei n, GLuint *textures ) { - trWriteCMD( CMD_GENTEXTURESEXT ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GenTexturesEXT( n, textures ); - trError(); - } - - if( !(trCtx()->doExec) ) { - memset( textures, 0, n * sizeof(GLuint) ); - } - - trWriteArrayui( n, textures ); -} - - -GLAPI void GLAPIENTRY trGenTextures( GLsizei n, GLuint *textures ) { - trWriteCMD( CMD_GENTEXTURES ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GenTextures( n, textures ); - trError(); - } - - if( !(trCtx()->doExec) ) { - memset( textures, 0, n * sizeof(GLuint) ); - } - - trWriteArrayui( n, textures ); -} - - -GLAPI void GLAPIENTRY trGetBooleanv( GLenum pname, GLboolean *params ) { /* TODO */ - trWriteCMD( CMD_GETBOOLEANV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_COLOR_MATRIX: - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - trWriteArrayBool( 16, params ); - break; - - case GL_ACCUM_CLEAR_VALUE: - case GL_BLEND_COLOR: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_CURRENT_COLOR: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_POSITION: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_TEXTURE_COORDS: - case GL_LIGHT_MODEL_AMBIENT: - case GL_MAP2_GRID_DOMAIN: - case GL_SCISSOR_BOX: - case GL_VIEWPORT: - trWriteArrayBool( 4, params ); - break; - - case GL_CURRENT_NORMAL: - trWriteArrayBool( 3, params ); - break; - - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_RANGE: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_MAX_VIEWPORT_DIMS: - case GL_POLYGON_MODE: - case GL_SMOOTH_LINE_WIDTH_RANGE: - case GL_SMOOTH_POINT_SIZE_RANGE: - trWriteArrayBool( 2, params ); - break; - - case GL_ACCUM_ALPHA_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACTIVE_TEXTURE_ARB: - case GL_ALPHA_BIAS: - case GL_ALPHA_BITS: - case GL_ALPHA_SCALE: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_ATTRIB_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_AUX_BUFFERS: - case GL_BLEND: - case GL_BLEND_SRC: - case GL_BLUE_BIAS: - case GL_BLUE_BITS: - case GL_BLUE_SCALE: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_STRIDE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_LOGIC_OP: - case GL_COLOR_MATERIAL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_DISTANCE: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_DEPTH_BIAS: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_DEPTH_SCALE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DITHER: - case GL_DOUBLEBUFFER: - case GL_DRAW_BUFFER: - case GL_EDGE_FLAG: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_FEEDBACK_BUFFER_SIZE: - case GL_FEEDBACK_BUFFER_TYPE: - case GL_FOG: - case GL_FOG_DENSITY: - case GL_FOG_END: - case GL_FOG_HINT: - case GL_FOG_INDEX: - case GL_FOG_MODE: - case GL_FOG_START: - case GL_FRONT_FACE: - case GL_GREEN_BIAS: - case GL_GREEN_BITS: - case GL_GREEN_SCALE: - case GL_HISTOGRAM: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_BITS: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_LOGIC_OP: - case GL_INDEX_MODE: - case GL_INDEX_OFFSET: - case GL_INDEX_SHIFT: - case GL_INDEX_WRITEMASK: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_LIGHTING: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LINE_SMOOTH: - case GL_LINE_SMOOTH_HINT: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LINE_WIDTH: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_LIST_MODE: - case GL_LOGIC_OP_MODE: - case GL_MAP1_COLOR_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_MATRIX_MODE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_CLIP_PLANES: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_LIST_NESTING: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_TEXTURE_UNITS_ARB: - case GL_MINMAX: - case GL_MODELVIEW_STACK_DEPTH: - case GL_NAME_STACK_DEPTH: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMALIZE: - case GL_PACK_ALIGNMENT: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SWAP_BYTES: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_POINT_SIZE: - case GL_POINT_SMOOTH: - case GL_POINT_SMOOTH_HINT: - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - case GL_POLYGON_OFFSET_FILL: - case GL_POLYGON_OFFSET_LINE: - case GL_POLYGON_OFFSET_POINT: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_SMOOTH_HINT: - case GL_POLYGON_STIPPLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_PROJECTION_STACK_DEPTH: - case GL_READ_BUFFER: - case GL_RED_BIAS: - case GL_RED_BITS: - case GL_RED_SCALE: - case GL_RENDER_MODE: - case GL_RESCALE_NORMAL: - case GL_RGBA_MODE: - case GL_SCISSOR_TEST: - case GL_SELECTION_BUFFER_SIZE: - case GL_SEPARABLE_2D: - case GL_SHADE_MODEL: - case GL_SMOOTH_LINE_WIDTH_GRANULARITY: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_STENCIL_BITS: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FAIL: - case GL_STENCIL_FUNC: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_TEST: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_WRITEMASK: - case GL_STEREO: - case GL_SUBPIXEL_BITS: - case GL_TEXTURE_1D: - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_GEN_Q: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_STACK_DEPTH: - case GL_UNPACK_ALIGNMENT: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SWAP_BYTES: - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_VERTEX_ARRAY_TYPE: - case GL_ZOOM_X: - case GL_ZOOM_Y: - trWriteBool( params[0] ); - break; - - default: - /* Bad enum. What should we do? */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->GetBooleanv( pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetClipPlane( GLenum plane, GLdouble *equation ) { - trWriteCMD( CMD_GETCLIPPLANE ); - trWriteEnum( plane ); - trWritePointer( (void *)equation ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetClipPlane( plane, equation ); - trError(); - } - - if( !(trCtx()->doExec) ) { - memset( equation, 0, sizeof(GLdouble) ); - } - - trWriteArrayd( 4, equation ); -} - - -GLAPI void GLAPIENTRY trGetColorTableEXT( GLenum target, GLenum format, GLenum type, GLvoid *table ) { /* TODO */ - - trWriteCMD( CMD_GETCOLORTABLEEXT ); - trWriteEnum( target ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)table ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTableEXT( target, format, type, table ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *table ) { /* TODO */ - trWriteCMD( CMD_GETCOLORTABLE ); - trWriteEnum( target ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)table ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTable( target, format, type, table ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetColorTableParameterfvEXT( GLenum target, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETCOLORTABLEPARAMETERFVEXT ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTableParameterfvEXT( target, pname, params ); - trError(); - } else { - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - memset( params, 0, sizeof(GLfloat) * 4 ); - } else { - params[0] = 0.0; - } - } - - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - trWriteArrayf( 4, params ); - } else { - trWritef( params[0] ); - } -} - - -GLAPI void GLAPIENTRY trGetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETCOLORTABLEPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTableParameterfv( target, pname, params ); - trError(); - } else { - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - memset( params, 0, sizeof(GLfloat) * 4 ); - } else { - params[0] = 0.0; - } - } - - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - trWriteArrayf( 4, params ); - } else { - trWritef( params[0] ); - } -} - - -GLAPI void GLAPIENTRY trGetColorTableParameterivEXT( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETCOLORTABLEPARAMETERIVEXT ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTableParameterivEXT( target, pname, params ); - trError(); - } else { - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - memset( params, 0, sizeof(GLint) * 4 ); - } else { - params[0] = 0; - } - } - - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - trWriteArrayi( 4, params ); - } else { - trWritei( params[0] ); - } -} - - -GLAPI void GLAPIENTRY trGetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETCOLORTABLEPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetColorTableParameteriv( target, pname, params ); - trError(); - } else { - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - memset( params, 0, sizeof(GLint) * 4 ); - } else { - params[0] = 0; - } - } - - if( pname == GL_COLOR_TABLE_BIAS || pname == GL_COLOR_TABLE_SCALE ) { - trWriteArrayi( 4, params ); - } else { - trWritei( params[0] ); - } -} - - -GLAPI void GLAPIENTRY trGetConvolutionFilter( GLenum target, GLenum format, GLenum type, GLvoid *image ) { - trace_context_t * tctx; - - trWriteCMD( CMD_GETCONVOLUTIONFILTER ); - trWriteEnum( target ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)image ); - trFileFlush(); - - if( tctx->doExec ) { - trGetDispatch()->GetConvolutionFilter( target, format, type, image ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetConvolutionParameterfv( GLenum target, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETCONVOLUTIONPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetConvolutionParameterfv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - memset( params, 0, 4 * sizeof(GLfloat) ); - break; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - params[0] = 0; - break; - default: - /* The 2nd pass should catch this */ - break; - } - } - - switch( pname ) { - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - trWriteArrayf( 4, params ); - break; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - trWritef( params[0] ); - break; - default: - /* The 2nd pass should catch this */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetConvolutionParameteriv( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETCONVOLUTIONPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetConvolutionParameteriv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - memset( params, 0, 4 * sizeof(GLint) ); - break; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - params[0] = 0; - break; - default: - /* The 2nd pass should catch this */ - break; - } - } - - switch( pname ) { - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - trWriteArrayi( 4, params ); - break; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - trWritei( params[0] ); - break; - default: - /* The 2nd pass should catch this */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetDoublev( GLenum pname, GLdouble *params ) { - trWriteCMD( CMD_GETDOUBLEV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetDoublev( pname, params ); - trError(); - } else { - trZeroGetterData( pname, sizeof(GLdouble), params ); - } - - switch( pname ) { - case GL_COLOR_MATRIX: - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - trWriteArrayd( 16, params ); - break; - - case GL_ACCUM_CLEAR_VALUE: - case GL_BLEND_COLOR: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_CURRENT_COLOR: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_POSITION: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_TEXTURE_COORDS: - case GL_LIGHT_MODEL_AMBIENT: - case GL_MAP2_GRID_DOMAIN: - case GL_SCISSOR_BOX: - case GL_VIEWPORT: - trWriteArrayd( 4, params ); - break; - - case GL_CURRENT_NORMAL: - trWriteArrayd( 3, params ); - break; - - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_RANGE: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_MAX_VIEWPORT_DIMS: - case GL_POLYGON_MODE: - case GL_SMOOTH_LINE_WIDTH_RANGE: - case GL_SMOOTH_POINT_SIZE_RANGE: - trWriteArrayd( 2, params ); - break; - - case GL_ACCUM_ALPHA_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACTIVE_TEXTURE_ARB: - case GL_ALPHA_BIAS: - case GL_ALPHA_BITS: - case GL_ALPHA_SCALE: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_ATTRIB_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_AUX_BUFFERS: - case GL_BLEND: - case GL_BLEND_SRC: - case GL_BLUE_BIAS: - case GL_BLUE_BITS: - case GL_BLUE_SCALE: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_STRIDE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_LOGIC_OP: - case GL_COLOR_MATERIAL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_DISTANCE: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_DEPTH_BIAS: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_DEPTH_SCALE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DITHER: - case GL_DOUBLEBUFFER: - case GL_DRAW_BUFFER: - case GL_EDGE_FLAG: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_FEEDBACK_BUFFER_SIZE: - case GL_FEEDBACK_BUFFER_TYPE: - case GL_FOG: - case GL_FOG_DENSITY: - case GL_FOG_END: - case GL_FOG_HINT: - case GL_FOG_INDEX: - case GL_FOG_MODE: - case GL_FOG_START: - case GL_FRONT_FACE: - case GL_GREEN_BIAS: - case GL_GREEN_BITS: - case GL_GREEN_SCALE: - case GL_HISTOGRAM: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_BITS: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_LOGIC_OP: - case GL_INDEX_MODE: - case GL_INDEX_OFFSET: - case GL_INDEX_SHIFT: - case GL_INDEX_WRITEMASK: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_LIGHTING: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LINE_SMOOTH: - case GL_LINE_SMOOTH_HINT: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LINE_WIDTH: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_LIST_MODE: - case GL_LOGIC_OP_MODE: - case GL_MAP1_COLOR_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_MATRIX_MODE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_CLIP_PLANES: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_LIST_NESTING: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_TEXTURE_UNITS_ARB: - case GL_MINMAX: - case GL_MODELVIEW_STACK_DEPTH: - case GL_NAME_STACK_DEPTH: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMALIZE: - case GL_PACK_ALIGNMENT: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SWAP_BYTES: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_POINT_SIZE: - case GL_POINT_SMOOTH: - case GL_POINT_SMOOTH_HINT: - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - case GL_POLYGON_OFFSET_FILL: - case GL_POLYGON_OFFSET_LINE: - case GL_POLYGON_OFFSET_POINT: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_SMOOTH_HINT: - case GL_POLYGON_STIPPLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_PROJECTION_STACK_DEPTH: - case GL_READ_BUFFER: - case GL_RED_BIAS: - case GL_RED_BITS: - case GL_RED_SCALE: - case GL_RENDER_MODE: - case GL_RESCALE_NORMAL: - case GL_RGBA_MODE: - case GL_SCISSOR_TEST: - case GL_SELECTION_BUFFER_SIZE: - case GL_SEPARABLE_2D: - case GL_SHADE_MODEL: - case GL_SMOOTH_LINE_WIDTH_GRANULARITY: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_STENCIL_BITS: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FAIL: - case GL_STENCIL_FUNC: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_TEST: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_WRITEMASK: - case GL_STEREO: - case GL_SUBPIXEL_BITS: - case GL_TEXTURE_1D: - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_GEN_Q: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_STACK_DEPTH: - case GL_UNPACK_ALIGNMENT: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SWAP_BYTES: - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_VERTEX_ARRAY_TYPE: - case GL_ZOOM_X: - case GL_ZOOM_Y: - trWrited( params[0] ); - break; - - default: - /* Bad enum. What should we do? */ - break; - } - -} - - -GLAPI GLenum GLAPIENTRY trGetError( void ) { - GLenum retval; - trWriteCMD( CMD_GETERROR ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->GetError( ); - trError(); - } else { - retval = GL_NO_ERROR; - } - - trWriteEnum( retval ); - return retval; -} - - -GLAPI void GLAPIENTRY trGetFloatv( GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETFLOATV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetFloatv( pname, params ); - trError(); - } else { - trZeroGetterData( pname, sizeof(GLfloat), params ); - } - - switch( pname ) { - case GL_COLOR_MATRIX: - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - trWriteArrayf( 16, params ); - break; - - case GL_ACCUM_CLEAR_VALUE: - case GL_BLEND_COLOR: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_CURRENT_COLOR: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_POSITION: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_TEXTURE_COORDS: - case GL_LIGHT_MODEL_AMBIENT: - case GL_MAP2_GRID_DOMAIN: - case GL_SCISSOR_BOX: - case GL_VIEWPORT: - trWriteArrayf( 4, params ); - break; - - case GL_CURRENT_NORMAL: - trWriteArrayf( 3, params ); - break; - - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_RANGE: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_MAX_VIEWPORT_DIMS: - case GL_POLYGON_MODE: - case GL_SMOOTH_LINE_WIDTH_RANGE: - case GL_SMOOTH_POINT_SIZE_RANGE: - trWriteArrayf( 2, params ); - break; - - case GL_ACCUM_ALPHA_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACTIVE_TEXTURE_ARB: - case GL_ALPHA_BIAS: - case GL_ALPHA_BITS: - case GL_ALPHA_SCALE: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_ATTRIB_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_AUX_BUFFERS: - case GL_BLEND: - case GL_BLEND_SRC: - case GL_BLUE_BIAS: - case GL_BLUE_BITS: - case GL_BLUE_SCALE: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_STRIDE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_LOGIC_OP: - case GL_COLOR_MATERIAL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_DISTANCE: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_DEPTH_BIAS: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_DEPTH_SCALE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DITHER: - case GL_DOUBLEBUFFER: - case GL_DRAW_BUFFER: - case GL_EDGE_FLAG: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_FEEDBACK_BUFFER_SIZE: - case GL_FEEDBACK_BUFFER_TYPE: - case GL_FOG: - case GL_FOG_DENSITY: - case GL_FOG_END: - case GL_FOG_HINT: - case GL_FOG_INDEX: - case GL_FOG_MODE: - case GL_FOG_START: - case GL_FRONT_FACE: - case GL_GREEN_BIAS: - case GL_GREEN_BITS: - case GL_GREEN_SCALE: - case GL_HISTOGRAM: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_BITS: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_LOGIC_OP: - case GL_INDEX_MODE: - case GL_INDEX_OFFSET: - case GL_INDEX_SHIFT: - case GL_INDEX_WRITEMASK: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_LIGHTING: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LINE_SMOOTH: - case GL_LINE_SMOOTH_HINT: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LINE_WIDTH: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_LIST_MODE: - case GL_LOGIC_OP_MODE: - case GL_MAP1_COLOR_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_MATRIX_MODE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_CLIP_PLANES: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_LIST_NESTING: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_TEXTURE_UNITS_ARB: - case GL_MINMAX: - case GL_MODELVIEW_STACK_DEPTH: - case GL_NAME_STACK_DEPTH: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMALIZE: - case GL_PACK_ALIGNMENT: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SWAP_BYTES: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_POINT_SIZE: - case GL_POINT_SMOOTH: - case GL_POINT_SMOOTH_HINT: - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - case GL_POLYGON_OFFSET_FILL: - case GL_POLYGON_OFFSET_LINE: - case GL_POLYGON_OFFSET_POINT: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_SMOOTH_HINT: - case GL_POLYGON_STIPPLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_PROJECTION_STACK_DEPTH: - case GL_READ_BUFFER: - case GL_RED_BIAS: - case GL_RED_BITS: - case GL_RED_SCALE: - case GL_RENDER_MODE: - case GL_RESCALE_NORMAL: - case GL_RGBA_MODE: - case GL_SCISSOR_TEST: - case GL_SELECTION_BUFFER_SIZE: - case GL_SEPARABLE_2D: - case GL_SHADE_MODEL: - case GL_SMOOTH_LINE_WIDTH_GRANULARITY: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_STENCIL_BITS: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FAIL: - case GL_STENCIL_FUNC: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_TEST: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_WRITEMASK: - case GL_STEREO: - case GL_SUBPIXEL_BITS: - case GL_TEXTURE_1D: - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_GEN_Q: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_STACK_DEPTH: - case GL_UNPACK_ALIGNMENT: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SWAP_BYTES: - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_VERTEX_ARRAY_TYPE: - case GL_ZOOM_X: - case GL_ZOOM_Y: - trWritef( params[0] ); - break; - - default: - /* Bad enum. What should we do? */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetHistogram( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values ) { /* TODO */ - trWriteCMD( CMD_GETHISTOGRAM ); - trWriteEnum( target ); - trWriteBool( reset ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)values ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetHistogram( target, reset, format, type, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetHistogramParameterfv( GLenum target, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETHISTOGRAMPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetHistogramParameterfv( target, pname, params ); - trError(); - } else { - params[0] = 0; - } - - trWritef( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetHistogramParameteriv( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETHISTOGRAMPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetHistogramParameteriv( target, pname, params ); - trError(); - } else { - params[0] = 0; - } - - trWritei( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetIntegerv( GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETINTEGERV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetIntegerv( pname, params ); - trError(); - } else { - trZeroGetterData( pname, sizeof(GLint), params ); - } - - switch( pname ) { - case GL_COLOR_MATRIX: - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - trWriteArrayi( 16, params ); - break; - - case GL_ACCUM_CLEAR_VALUE: - case GL_BLEND_COLOR: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_CURRENT_COLOR: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_POSITION: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_TEXTURE_COORDS: - case GL_LIGHT_MODEL_AMBIENT: - case GL_MAP2_GRID_DOMAIN: - case GL_SCISSOR_BOX: - case GL_VIEWPORT: - trWriteArrayi( 4, params ); - break; - - case GL_CURRENT_NORMAL: - trWriteArrayi( 3, params ); - break; - - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_RANGE: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_MAX_VIEWPORT_DIMS: - case GL_POLYGON_MODE: - case GL_SMOOTH_LINE_WIDTH_RANGE: - case GL_SMOOTH_POINT_SIZE_RANGE: - trWriteArrayi( 2, params ); - break; - - case GL_ACCUM_ALPHA_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACTIVE_TEXTURE_ARB: - case GL_ALPHA_BIAS: - case GL_ALPHA_BITS: - case GL_ALPHA_SCALE: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_ATTRIB_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_AUX_BUFFERS: - case GL_BLEND: - case GL_BLEND_SRC: - case GL_BLUE_BIAS: - case GL_BLUE_BITS: - case GL_BLUE_SCALE: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_STRIDE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_LOGIC_OP: - case GL_COLOR_MATERIAL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_DISTANCE: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_DEPTH_BIAS: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_DEPTH_SCALE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DITHER: - case GL_DOUBLEBUFFER: - case GL_DRAW_BUFFER: - case GL_EDGE_FLAG: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_FEEDBACK_BUFFER_SIZE: - case GL_FEEDBACK_BUFFER_TYPE: - case GL_FOG: - case GL_FOG_DENSITY: - case GL_FOG_END: - case GL_FOG_HINT: - case GL_FOG_INDEX: - case GL_FOG_MODE: - case GL_FOG_START: - case GL_FRONT_FACE: - case GL_GREEN_BIAS: - case GL_GREEN_BITS: - case GL_GREEN_SCALE: - case GL_HISTOGRAM: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_BITS: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_LOGIC_OP: - case GL_INDEX_MODE: - case GL_INDEX_OFFSET: - case GL_INDEX_SHIFT: - case GL_INDEX_WRITEMASK: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_LIGHTING: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LINE_SMOOTH: - case GL_LINE_SMOOTH_HINT: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LINE_WIDTH: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_LIST_MODE: - case GL_LOGIC_OP_MODE: - case GL_MAP1_COLOR_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_MATRIX_MODE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_CLIP_PLANES: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_LIST_NESTING: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_TEXTURE_UNITS_ARB: - case GL_MINMAX: - case GL_MODELVIEW_STACK_DEPTH: - case GL_NAME_STACK_DEPTH: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMALIZE: - case GL_PACK_ALIGNMENT: - case GL_PACK_IMAGE_HEIGHT: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SWAP_BYTES: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_POINT_SIZE: - case GL_POINT_SMOOTH: - case GL_POINT_SMOOTH_HINT: - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - case GL_POLYGON_OFFSET_FILL: - case GL_POLYGON_OFFSET_LINE: - case GL_POLYGON_OFFSET_POINT: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_SMOOTH_HINT: - case GL_POLYGON_STIPPLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_PROJECTION_STACK_DEPTH: - case GL_READ_BUFFER: - case GL_RED_BIAS: - case GL_RED_BITS: - case GL_RED_SCALE: - case GL_RENDER_MODE: - case GL_RESCALE_NORMAL: - case GL_RGBA_MODE: - case GL_SCISSOR_TEST: - case GL_SELECTION_BUFFER_SIZE: - case GL_SEPARABLE_2D: - case GL_SHADE_MODEL: - case GL_SMOOTH_LINE_WIDTH_GRANULARITY: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_STENCIL_BITS: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FAIL: - case GL_STENCIL_FUNC: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_TEST: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_WRITEMASK: - case GL_STEREO: - case GL_SUBPIXEL_BITS: - case GL_TEXTURE_1D: - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_GEN_Q: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_STACK_DEPTH: - case GL_UNPACK_ALIGNMENT: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SWAP_BYTES: - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_VERTEX_ARRAY_TYPE: - case GL_ZOOM_X: - case GL_ZOOM_Y: - trWritei( params[0] ); - break; - - default: - /* Bad enum. What should we do? */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetLightfv( GLenum light, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETLIGHTFV ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetLightfv( light, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - memset( params, 0, 4 * sizeof(GLfloat) ); - break; - case GL_SPOT_DIRECTION: - memset( params, 0, 3 * sizeof(GLfloat) ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - params[0] = 0; - break; - default: - /* The 2nd pass should catch this */ - break; - } - } - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - trWriteArrayf( 4, params ); - break; - case GL_SPOT_DIRECTION: - trWriteArrayf( 3, params ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - trWritef( params[0] ); - break; - default: - /* The 2nd pass should catch this */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetLightiv( GLenum light, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETLIGHTIV ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetLightiv( light, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - memset( params, 0, 4 * sizeof(GLint) ); - break; - case GL_SPOT_DIRECTION: - memset( params, 0, 3 * sizeof(GLint) ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - params[0] = 0; - break; - default: - /* The 2nd pass should catch this */ - break; - } - } - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - trWriteArrayi( 4, params ); - break; - case GL_SPOT_DIRECTION: - trWriteArrayi( 3, params ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - trWritei( params[0] ); - break; - default: - /* The 2nd pass should catch this */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetMapdv( GLenum target, GLenum query, GLdouble *v ) { /* TODO */ - trWriteCMD( CMD_GETMAPDV ); - trWriteEnum( target ); - trWriteEnum( query ); - trWritePointer( (void *)v ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMapdv( target, query, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetMapfv( GLenum target, GLenum query, GLfloat *v ) { /* TODO */ - trWriteCMD( CMD_GETMAPFV ); - trWriteEnum( target ); - trWriteEnum( query ); - trWritePointer( (void *)v ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMapfv( target, query, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetMapiv( GLenum target, GLenum query, GLint *v ) { /* TODO */ - trWriteCMD( CMD_GETMAPIV ); - trWriteEnum( target ); - trWriteEnum( query ); - trWritePointer( (void *)v ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMapiv( target, query, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETMATERIALFV ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMaterialfv( face, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - memset( params, 0, 4 * sizeof(GLfloat) ); - break; - case GL_COLOR_INDEXES: - memset( params, 0, 3 * sizeof(GLfloat) ); - break; - case GL_SHININESS: - params[0] = 0; - break; - default: - /* The 2nd pass will pick this up. */ - break; - } - } - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - trWriteArrayf( 4, params ); - break; - case GL_COLOR_INDEXES: - trWriteArrayf( 3, params ); - break; - case GL_SHININESS: - trWritef( params[0] ); - break; - default: - /* The 2nd pass will pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetMaterialiv( GLenum face, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETMATERIALIV ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMaterialiv( face, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - memset( params, 0, 4 * sizeof(GLint) ); - break; - case GL_COLOR_INDEXES: - memset( params, 0, 3 * sizeof(GLint) ); - break; - case GL_SHININESS: - params[0] = 0; - break; - default: - /* The 2nd pass will pick this up. */ - break; - } - } - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - trWriteArrayi( 4, params ); - break; - case GL_COLOR_INDEXES: - trWriteArrayi( 3, params ); - break; - case GL_SHININESS: - trWritei( params[0] ); - break; - default: - /* The 2nd pass will pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetMinmax( GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values ) { - GLint pixelsize; - - trWriteCMD( CMD_GETMINMAX ); - trWriteEnum( target ); - trWriteBool( reset ); - trWriteEnum( format ); - trWriteEnum( types ); - trWritePointer( (void *)values ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMinmax( target, reset, format, types, values ); - trError(); - } else { - switch( types ) { - case GL_BYTE: - ((GLbyte *)values)[0] = 0; - ((GLbyte *)values)[1] = 0; - break; - - case GL_UNSIGNED_BYTE: - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - ((GLubyte *)values)[0] = 0; - ((GLubyte *)values)[1] = 0; - break; - - case GL_SHORT: - ((GLshort *)values)[0] = 0; - ((GLshort *)values)[1] = 0; - break; - - case GL_UNSIGNED_SHORT: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - ((GLshort *)values)[0] = 0; - ((GLshort *)values)[1] = 0; - break; - - case GL_INT: - ((GLint *)values)[0] = 0; - ((GLint *)values)[1] = 0; - break; - - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - ((GLuint *)values)[0] = 0; - ((GLuint *)values)[1] = 0; - break; - - case GL_FLOAT: - ((GLfloat *)values)[0] = 0.0; - ((GLfloat *)values)[1] = 0.0; - break; - - default: - /* The 2nd pass should catch this. */ - break; - } - } - - pixelsize = trGetPixelSize( format, types ); - trWriteTypeArray( types, 2, pixelsize, 0, values ); -} - - -GLAPI void GLAPIENTRY trGetMinmaxParameterfv( GLenum target, GLenum pname, GLfloat *params ) { /* TODO */ - trWriteCMD( CMD_GETMINMAXPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMinmaxParameterfv( target, pname, params ); - trError(); - } else { - params[0] = 0.0; - } - - trWritef( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetMinmaxParameteriv( GLenum target, GLenum pname, GLint *params ) { /* TODO */ - trWriteCMD( CMD_GETMINMAXPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetMinmaxParameteriv( target, pname, params ); - trError(); - } else { - params[0] = 0; - } - - trWritei( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetPixelMapfv( GLenum map, GLfloat *values ) { /* TODO */ - trWriteCMD( CMD_GETPIXELMAPFV ); - trWriteEnum( map ); - trWritePointer( (void *)values ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPixelMapfv( map, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetPixelMapuiv( GLenum map, GLuint *values ) { /* TODO */ - trWriteCMD( CMD_GETPIXELMAPUIV ); - trWriteEnum( map ); - trWritePointer( (void *)values ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPixelMapuiv( map, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetPixelMapusv( GLenum map, GLushort *values ) { /* TODO */ - trWriteCMD( CMD_GETPIXELMAPUSV ); - trWriteEnum( map ); - trWritePointer( (void *)values ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPixelMapusv( map, values ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trGetPointervEXT( GLenum pname, void **params ) { - trWriteCMD( CMD_GETPOINTERVEXT ); - trWriteEnum( pname ); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPointervEXT( pname, params ); - trError(); - } else { - *params = NULL; - } - trWritePointer( (void *)(*params) ); -} -#endif - - -GLAPI void GLAPIENTRY trGetPointerv( GLenum pname, void **params ) { - trWriteCMD( CMD_GETPOINTERV ); - trWriteEnum( pname ); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPointerv( pname, params ); - trError(); - } else { - *params = NULL; - } - trWritePointer( (void *)(*params) ); -} - - -GLAPI void GLAPIENTRY trGetPolygonStipple( GLubyte *mask ) { - GLint i; - - trWriteCMD( CMD_GETPOLYGONSTIPPLE ); - trWritePointer( (void *)mask ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetPolygonStipple( mask ); - trError(); - } else { - for( i = 0; i < 8 * 8; i++ ) { - mask[i] = 0x0; - } - } - for( i = 0; i < 8 * 8; i++ ) { - trWriteub( mask[i] ); - } -} - - -GLAPI void GLAPIENTRY trGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ) { - - trWriteCMD( CMD_GETSEPARABLEFILTER ); - trWriteEnum( target ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)row ); - trFileFlush(); - trWritePointer( (void *)column ); - trFileFlush(); - trWritePointer( (void *)span ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetSeparableFilter( target, format, type, row, column, span ); - trError(); - } -} - - -GLAPI const GLubyte* GLAPIENTRY trGetString( GLenum name ) { - const GLubyte * tmpstring; - - trWriteCMD( CMD_GETSTRING ); - trWriteEnum( name ); - - if( trCtx()->doExec ) { - tmpstring = trGetDispatch()->GetString( name ); - trError(); - } else { - tmpstring = NULL; - } - - trWriteString( (char *)tmpstring ); - return tmpstring; -} - - -GLAPI void GLAPIENTRY trGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETTEXENVFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexEnvfv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - params[0] = 0.0; - break; - case GL_TEXTURE_ENV_COLOR: - memset( params, 0, 4 * sizeof(GLfloat) ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - trWritef( params[0] ); - break; - case GL_TEXTURE_ENV_COLOR: - trWriteArrayf( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexEnviv( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETTEXENVIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexEnviv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - params[0] = 0; - break; - case GL_TEXTURE_ENV_COLOR: - memset( params, 0, 4 * sizeof(GLint) ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - trWritei( params[0] ); - break; - case GL_TEXTURE_ENV_COLOR: - trWriteArrayi( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) { - trWriteCMD( CMD_GETTEXGENDV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexGendv( coord, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - params[0] = 0.0; - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - memset( params, 0, 4 * sizeof(GLdouble) ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWrited( params[0] ); - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayd( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETTEXGENFV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexGenfv( coord, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - params[0] = 0.0; - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - memset( params, 0, 4 * sizeof(GLfloat) ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWritef( params[0] ); - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayf( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexGeniv( GLenum coord, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETTEXGENIV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexGeniv( coord, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - params[0] = 0; - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - memset( params, 0, 4 * sizeof(GLint) ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWritei( params[0] ); - break; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayi( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ) { /* TODO */ - - trWriteCMD( CMD_GETTEXIMAGE ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexImage( target, level, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params ) { - trWriteCMD( CMD_GETTEXLEVELPARAMETERFV ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexLevelParameterfv( target, level, pname, params ); - trError(); - } else { - params[0] = 0.0; - } - trWritef( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETTEXLEVELPARAMETERIV ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexLevelParameteriv( target, level, pname, params ); - trError(); - } else { - params[0] = 0; - } - trWritei( params[0] ); -} - - -GLAPI void GLAPIENTRY trGetTexParameterfv( GLenum target, GLenum pname, GLfloat *params) { - trWriteCMD( CMD_GETTEXPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexParameterfv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - params[0] = 0.0; - break; - case GL_TEXTURE_BORDER_COLOR: - memset( params, 0, 4 * sizeof(GLfloat) ); - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - trWritef( params[0] ); - break; - case GL_TEXTURE_BORDER_COLOR: - trWriteArrayf( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trGetTexParameteriv( GLenum target, GLenum pname, GLint *params ) { - trWriteCMD( CMD_GETTEXPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->GetTexParameteriv( target, pname, params ); - trError(); - } else { - switch( pname ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - params[0] = 0; - break; - case GL_TEXTURE_BORDER_COLOR: - memset( params, 0, 4 * sizeof(GLint) ); - default: - /* The 2nd pass should pick this up. */ - break; - } - } - switch( pname ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - trWritei( params[0] ); - break; - case GL_TEXTURE_BORDER_COLOR: - trWriteArrayi( 4, params ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } -} - - -GLAPI void GLAPIENTRY trHint( GLenum target, GLenum mode ) { - trWriteCMD( CMD_HINT ); - trWriteEnum( target ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->Hint( target, mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trHistogram( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ) { - trWriteCMD( CMD_HISTOGRAM ); - trWriteEnum( target ); - trWriteSizei( width ); - trWriteEnum( internalformat ); - trWriteBool( sink ); - - if( trCtx()->doExec ) { - trGetDispatch()->Histogram( target, width, internalformat, sink ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexd( GLdouble c ) { - trWriteCMD( CMD_INDEXD ); - trWrited( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexd( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexdv( const GLdouble *c ) { - trWriteCMD( CMD_INDEXDV ); - trWritePointer( (void *)c ); - trFileFlush(); - trWrited( c[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexdv( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexf( GLfloat c ) { - trWriteCMD( CMD_INDEXF ); - trWritef( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexf( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexfv( const GLfloat *c ) { - trWriteCMD( CMD_INDEXFV ); - trWritePointer( (void *)c ); - trFileFlush(); - trWritef( c[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexfv( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexi( GLint c ) { - trWriteCMD( CMD_INDEXI ); - trWritei( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexi( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexiv( const GLint *c ) { - trWriteCMD( CMD_INDEXIV ); - trWritePointer( (void *)c ); - trFileFlush(); - trWritei( c[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexiv( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexMask( GLuint mask ) { - trWriteCMD( CMD_INDEXMASK ); - trWriteui( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->IndexMask( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexPointerEXT( GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_INDEXPOINTEREXT ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->IndexPointerEXT( type, stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexPointer( GLenum type, GLsizei stride, const GLvoid *ptr ) { /* TODO */ - trace_context_t * tctx; - - trWriteCMD( CMD_INDEXPOINTER ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - tctx = trCtx(); - - if( tctx->doExec ) { - trGetDispatch()->IndexPointer( type, stride, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexs( GLshort c ) { - trWriteCMD( CMD_INDEXS ); - trWrites( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexs( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexsv( const GLshort *c ) { - trWriteCMD( CMD_INDEXSV ); - trWritePointer( (void *)c ); - trFileFlush(); - trWrites( c[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexsv( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexub( GLubyte c ) { - trWriteCMD( CMD_INDEXUB ); - trWriteub( c ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexub( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trIndexubv( const GLubyte *c ) { - trWriteCMD( CMD_INDEXUBV ); - trWritePointer( (void *)c ); - trFileFlush(); - trWriteub( c[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->Indexubv( c ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trInitNames( void ) { - trWriteCMD( CMD_INITNAMES ); - - if( trCtx()->doExec ) { - trGetDispatch()->InitNames( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trInterleavedArrays( GLenum format, GLsizei stride, const GLvoid *pointer ) { /* TODO */ - trace_context_t * tctx = trCtx(); - - trWriteCMD( CMD_INTERLEAVEDARRAYS ); - trWriteEnum( format ); - trWriteSizei( stride ); - trWritePointer( (void *)pointer ); - trFileFlush(); - - if( tctx->doExec ) { - trSetOriginalDispatch(); - trGetDispatch()->InterleavedArrays( format, stride, pointer ); - trSetTraceDispatch(); - trError(); - } -} - - -GLAPI GLboolean GLAPIENTRY trIsEnabled( GLenum cap ) { - GLboolean retval; - - trWriteCMD( CMD_ISENABLED ); - trWriteEnum( cap ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->IsEnabled( cap ); - trError(); - } else { - retval = GL_FALSE; - } - trWriteBool( retval ); - return retval; -} - - -GLAPI GLboolean GLAPIENTRY trIsList( GLuint list ) { - GLboolean retval; - - trWriteCMD( CMD_ISLIST ); - trWriteui( list ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->IsList( list ); - trError(); - } else { - retval = GL_FALSE; - } - trWriteBool( retval ); - return retval; -} - - -GLAPI GLboolean GLAPIENTRY trIsTexture( GLuint texture ) { - GLboolean retval; - - trWriteCMD( CMD_ISTEXTURE ); - trWriteui( texture ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->IsTexture( texture ); - trError(); - } else { - retval = GL_FALSE; - } - trWriteBool( retval ); - return retval; -} - - -GLAPI GLboolean GLAPIENTRY trIsTextureEXT( GLuint texture ) { - GLboolean retval; - - trWriteCMD( CMD_ISTEXTUREEXT ); - trWriteui( texture ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->IsTextureEXT( texture ); - trError(); - } else { - retval = GL_FALSE; - } - trWriteBool( retval ); - return retval; -} - - -GLAPI void GLAPIENTRY trLightf( GLenum light, GLenum pname, GLfloat param ) { - trWriteCMD( CMD_LIGHTF ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Lightf( light, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightfv( GLenum light, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_LIGHTFV ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - trWriteArrayf( 4, params ); - break; - case GL_SPOT_DIRECTION: - trWriteArrayf( 3, params ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - trWritef( params[0] ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Lightfv( light, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLighti( GLenum light, GLenum pname, GLint param ) { - trWriteCMD( CMD_LIGHTI ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Lighti( light, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightiv( GLenum light, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_LIGHTIV ); - trWriteEnum( light ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - trWriteArrayi( 4, params ); - break; - case GL_SPOT_DIRECTION: - trWriteArrayi( 3, params ); - break; - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - trWritei( params[0] ); - break; - default: - /* The 2nd pass should pick this up. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Lightiv( light, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightModelf( GLenum pname, GLfloat param ) { - trWriteCMD( CMD_LIGHTMODELF ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->LightModelf( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightModelfv( GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_LIGHTMODELFV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_LIGHT_MODEL_AMBIENT: - trWriteArrayf( 4, params ); - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - trWritef( params[0] ); - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->LightModelfv( pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightModeli( GLenum pname, GLint param ) { - trWriteCMD( CMD_LIGHTMODELI ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->LightModeli( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLightModeliv( GLenum pname, const GLint *params ) { - trWriteCMD( CMD_LIGHTMODELIV ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_LIGHT_MODEL_AMBIENT: - trWriteArrayi( 4, params ); - break; - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - trWritei( params[0] ); - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->LightModeliv( pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLineStipple( GLint factor, GLushort pattern ) { - trWriteCMD( CMD_LINESTIPPLE ); - trWritei( factor ); - trWriteus( pattern ); - - if( trCtx()->doExec ) { - trGetDispatch()->LineStipple( factor, pattern ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLineWidth( GLfloat width ) { - trWriteCMD( CMD_LINEWIDTH ); - trWritef( width ); - - if( trCtx()->doExec ) { - trGetDispatch()->LineWidth( width ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trListBase( GLuint base ) { - trWriteCMD( CMD_LISTBASE ); - trWriteui( base ); - - if( trCtx()->doExec ) { - trGetDispatch()->ListBase( base ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLoadIdentity( void ) { - trWriteCMD( CMD_LOADIDENTITY ); - - if( trCtx()->doExec ) { - trGetDispatch()->LoadIdentity( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLoadMatrixd( const GLdouble *m ) { - trWriteCMD( CMD_LOADMATRIXD ); - trWritePointer( (void *)m ); - trFileFlush(); - trWriteArrayd( 16, m ); - - if( trCtx()->doExec ) { - trGetDispatch()->LoadMatrixd( m ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLoadMatrixf( const GLfloat *m ) { - trWriteCMD( CMD_LOADMATRIXF ); - trWritePointer( (void *)m ); - trFileFlush(); - trWriteArrayf( 16, m ); - - if( trCtx()->doExec ) { - trGetDispatch()->LoadMatrixf( m ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLoadName( GLuint name ) { - trWriteCMD( CMD_LOADNAME ); - trWriteui( name ); - - if( trCtx()->doExec ) { - trGetDispatch()->LoadName( name ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLockArraysEXT( GLint first, GLsizei count ) { - trWriteCMD( CMD_LOCKARRAYSEXT ); - trWritei( first ); - trWriteSizei( count ); - - if( trCtx()->doExec ) { - trGetDispatch()->LockArraysEXT( first, count ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trLogicOp( GLenum opcode ) { - trWriteCMD( CMD_LOGICOP ); - trWriteEnum( opcode ); - - if( trCtx()->doExec ) { - trGetDispatch()->LogicOp( opcode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMap1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points ) { - GLint i; - - trWriteCMD( CMD_MAP1D ); - trWriteEnum( target ); - trWrited( u1 ); - trWrited( u2 ); - trWritei( stride ); - trWritei( order ); - trWritePointer( (void *)points ); - trFileFlush(); - - switch( target ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - for( i = 0; i < stride * order; i += stride ) { - trWrited( points[i] ); - } - break; - case GL_MAP1_TEXTURE_COORD_2: - for( i = 0; i < stride * order; i += stride ) { - trWrited( points[i] ); - trWrited( points[i + 1] ); - } - break; - case GL_MAP1_VERTEX_3: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - for( i = 0; i < stride * order; i += stride ) { - trWrited( points[i] ); - trWrited( points[i + 1] ); - trWrited( points[i + 2] ); - } - break; - case GL_MAP1_VERTEX_4: - case GL_MAP1_TEXTURE_COORD_4: - for( i = 0; i < stride * order; i += stride ) { - trWrited( points[i] ); - trWrited( points[i + 1] ); - trWrited( points[i + 2] ); - trWrited( points[i + 3] ); - } - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Map1d( target, u1, u2, stride, order, points ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMap1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points ) { - GLint i; - - trWriteCMD( CMD_MAP1F ); - trWriteEnum( target ); - trWritef( u1 ); - trWritef( u2 ); - trWritei( stride ); - trWritei( order ); - trWritePointer( (void *)points ); - trFileFlush(); - - switch( target ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - for( i = 0; i < stride * order; i += stride ) { - trWritef( points[i] ); - } - break; - case GL_MAP1_TEXTURE_COORD_2: - for( i = 0; i < stride * order; i += stride ) { - trWritef( points[i] ); - trWritef( points[i + 1] ); - } - break; - case GL_MAP1_VERTEX_3: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - for( i = 0; i < stride * order; i += stride ) { - trWritef( points[i] ); - trWritef( points[i + 1] ); - trWritef( points[i + 2] ); - } - break; - case GL_MAP1_VERTEX_4: - case GL_MAP1_TEXTURE_COORD_4: - for( i = 0; i < stride * order; i += stride ) { - trWritef( points[i] ); - trWritef( points[i + 1] ); - trWritef( points[i + 2] ); - trWritef( points[i + 3] ); - } - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Map1f( target, u1, u2, stride, order, points ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMap2d( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points ) { - GLint i; - GLint j; - - trWriteCMD( CMD_MAP2D ); - trWriteEnum( target ); - trWrited( u1 ); - trWrited( u2 ); - trWritei( ustride ); - trWritei( uorder ); - trWrited( v1 ); - trWrited( v2 ); - trWritei( vstride ); - trWritei( vorder ); - trWritePointer( (void *)points ); - trFileFlush(); - - switch( target ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWrited( points[i + j] ); - } - } - break; - case GL_MAP1_TEXTURE_COORD_2: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWrited( points[i + j] ); - trWrited( points[i + j + 1] ); - } - } - break; - case GL_MAP1_VERTEX_3: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWrited( points[i + j] ); - trWrited( points[i + j + 1] ); - trWrited( points[i + j + 2] ); - } - } - break; - case GL_MAP1_VERTEX_4: - case GL_MAP1_TEXTURE_COORD_4: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWrited( points[i + j] ); - trWrited( points[i + j + 1] ); - trWrited( points[i + j + 2] ); - trWrited( points[i + j + 3] ); - } - } - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Map2d( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMap2f( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points ) { - GLint i; - GLint j; - - trWriteCMD( CMD_MAP2F ); - trWriteEnum( target ); - trWritef( u1 ); - trWritef( u2 ); - trWritei( ustride ); - trWritei( uorder ); - trWritef( v1 ); - trWritef( v2 ); - trWritei( vstride ); - trWritei( vorder ); - trWritePointer( (void *)points ); - trFileFlush(); - - switch( target ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWritef( points[i + j] ); - } - } - break; - case GL_MAP1_TEXTURE_COORD_2: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWritef( points[i + j] ); - trWritef( points[i + j + 1] ); - } - } - break; - case GL_MAP1_VERTEX_3: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWritef( points[i + j] ); - trWritef( points[i + j + 1] ); - trWritef( points[i + j + 2] ); - } - } - break; - case GL_MAP1_VERTEX_4: - case GL_MAP1_TEXTURE_COORD_4: - for( j = 0; j < vstride * vorder; j += vstride ) { - for( i = 0; i < ustride * uorder; i += ustride ) { - trWritef( points[i + j] ); - trWritef( points[i + j + 1] ); - trWritef( points[i + j + 2] ); - trWritef( points[i + j + 3] ); - } - } - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Map2f( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ) { - trWriteCMD( CMD_MAPGRID1D ); - trWritei( un ); - trWrited( u1 ); - trWrited( u2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->MapGrid1d( un, u1, u2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) { - trWriteCMD( CMD_MAPGRID1F ); - trWritei( un ); - trWritef( u1 ); - trWritef( u2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->MapGrid1f( un, u1, u2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMapGrid2d( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ) { - trWriteCMD( CMD_MAPGRID2D ); - trWritei( un ); - trWrited( u1 ); - trWrited( u2 ); - trWritei( vn ); - trWrited( v1 ); - trWrited( v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->MapGrid2d( un, u1, u2, vn, v1, v2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMapGrid2f( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ) { - trWriteCMD( CMD_MAPGRID2F ); - trWritei( un ); - trWritef( u1 ); - trWritef( u2 ); - trWritei( vn ); - trWritef( v1 ); - trWritef( v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->MapGrid2f( un, u1, u2, vn, v1, v2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMaterialf( GLenum face, GLenum pname, GLfloat param ) { - trWriteCMD( CMD_MATERIALF ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Materialf( face, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMaterialfv( GLenum face, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_MATERIALFV ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_AMBIENT_AND_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - trWriteArrayf( 4, params ); - break; - case GL_SHININESS: - trWritef( params[0] ); - break; - case GL_COLOR_INDEXES: - trWriteArrayf( 3, params ); - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Materialfv( face, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMateriali( GLenum face, GLenum pname, GLint param ) { - trWriteCMD( CMD_MATERIALI ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->Materiali( face, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMaterialiv( GLenum face, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_MATERIALIV ); - trWriteEnum( face ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_AMBIENT_AND_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - trWriteArrayi( 4, params ); - break; - case GL_SHININESS: - trWritei( params[0] ); - break; - case GL_COLOR_INDEXES: - trWriteArrayi( 3, params ); - break; - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->Materialiv( face, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMatrixMode( GLenum mode ) { - trWriteCMD( CMD_MATRIXMODE ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->MatrixMode( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMinmax( GLenum target, GLenum internalformat, GLboolean sink ) { - trWriteCMD( CMD_MINMAX ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteBool( sink ); - - if( trCtx()->doExec ) { - trGetDispatch()->Minmax( target, internalformat, sink ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1dARB( GLenum target, GLdouble s) { - trWriteCMD( CMD_MULTITEXCOORD1DARB ); - trWriteEnum( target ); - trWrited( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1dARB( target, s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1dvARB( GLenum target, const GLdouble *v) { - trWriteCMD( CMD_MULTITEXCOORD1DVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWrited( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1dvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1fARB( GLenum target, GLfloat s) { - trWriteCMD( CMD_MULTITEXCOORD1FARB ); - trWriteEnum( target ); - trWritef( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1fARB( target, s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1fvARB( GLenum target, const GLfloat *v) { - trWriteCMD( CMD_MULTITEXCOORD1FVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWritef( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1fvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1iARB( GLenum target, GLint s) { - trWriteCMD( CMD_MULTITEXCOORD1IARB ); - trWriteEnum( target ); - trWritei( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1iARB( target, s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1ivARB( GLenum target, const GLint *v) { - trWriteCMD( CMD_MULTITEXCOORD1IVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWritei( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1ivARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1sARB( GLenum target, GLshort s) { - trWriteCMD( CMD_MULTITEXCOORD1SARB ); - trWriteEnum( target ); - trWrites( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1sARB( target, s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord1svARB( GLenum target, const GLshort *v) { - trWriteCMD( CMD_MULTITEXCOORD1SVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWrites( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord1svARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2dARB( GLenum target, GLdouble s, GLdouble t) { - trWriteCMD( CMD_MULTITEXCOORD2DARB ); - trWriteEnum( target ); - trWrited( s ); - trWrited( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2dARB( target, s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2dvARB( GLenum target, const GLdouble *v) { - trWriteCMD( CMD_MULTITEXCOORD2DVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2dvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat t) { - trWriteCMD( CMD_MULTITEXCOORD2FARB ); - trWriteEnum( target ); - trWritef( s ); - trWritef( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2fARB( target, s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2fvARB( GLenum target, const GLfloat *v) { - trWriteCMD( CMD_MULTITEXCOORD2FVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2fvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2iARB( GLenum target, GLint s, GLint t) { - trWriteCMD( CMD_MULTITEXCOORD2IARB ); - trWriteEnum( target ); - trWritei( s ); - trWritei( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2iARB( target, s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2ivARB( GLenum target, const GLint *v) { - trWriteCMD( CMD_MULTITEXCOORD2IVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2ivARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2sARB( GLenum target, GLshort s, GLshort t) { - trWriteCMD( CMD_MULTITEXCOORD2SARB ); - trWriteEnum( target ); - trWrites( s ); - trWrites( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2sARB( target, s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord2svARB( GLenum target, const GLshort *v) { - trWriteCMD( CMD_MULTITEXCOORD2SVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord2svARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r) { - trWriteCMD( CMD_MULTITEXCOORD3DARB ); - trWriteEnum( target ); - trWrited( s ); - trWrited( t ); - trWrited( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3dARB( target, s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3dvARB( GLenum target, const GLdouble *v) { - trWriteCMD( CMD_MULTITEXCOORD3DVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3dvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r) { - trWriteCMD( CMD_MULTITEXCOORD3FARB ); - trWriteEnum( target ); - trWritef( s ); - trWritef( t ); - trWritef( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3fARB( target, s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3fvARB( GLenum target, const GLfloat *v) { - trWriteCMD( CMD_MULTITEXCOORD3FVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3fvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3iARB( GLenum target, GLint s, GLint t, GLint r) { - trWriteCMD( CMD_MULTITEXCOORD3IARB ); - trWriteEnum( target ); - trWritei( s ); - trWritei( t ); - trWritei( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3iARB( target, s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3ivARB( GLenum target, const GLint *v) { - trWriteCMD( CMD_MULTITEXCOORD3IVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3ivARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3sARB( GLenum target, GLshort s, GLshort t, GLshort r) { - trWriteCMD( CMD_MULTITEXCOORD3SARB ); - trWriteEnum( target ); - trWrites( s ); - trWrites( t ); - trWrites( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3sARB( target, s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord3svARB( GLenum target, const GLshort *v) { - trWriteCMD( CMD_MULTITEXCOORD3SVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord3svARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4dARB( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) { - trWriteCMD( CMD_MULTITEXCOORD4DARB ); - trWriteEnum( target ); - trWrited( s ); - trWrited( t ); - trWrited( r ); - trWrited( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4dARB( target, s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4dvARB( GLenum target, const GLdouble *v) { - trWriteCMD( CMD_MULTITEXCOORD4DVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4dvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4fARB( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) { - trWriteCMD( CMD_MULTITEXCOORD4FARB ); - trWriteEnum( target ); - trWritef( s ); - trWritef( t ); - trWritef( r ); - trWritef( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4fARB( target, s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4fvARB( GLenum target, const GLfloat *v) { - trWriteCMD( CMD_MULTITEXCOORD4FVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4fvARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4iARB( GLenum target, GLint s, GLint t, GLint r, GLint q) { - trWriteCMD( CMD_MULTITEXCOORD4IARB ); - trWriteEnum( target ); - trWritei( s ); - trWritei( t ); - trWritei( r ); - trWritei( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4iARB( target, s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4ivARB( GLenum target, const GLint *v) { - trWriteCMD( CMD_MULTITEXCOORD4IVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4ivARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4sARB( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) { - trWriteCMD( CMD_MULTITEXCOORD4SARB ); - trWriteEnum( target ); - trWrites( s ); - trWrites( t ); - trWrites( r ); - trWrites( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4sARB( target, s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultiTexCoord4svARB( GLenum target, const GLshort *v) { - trWriteCMD( CMD_MULTITEXCOORD4SVARB ); - trWriteEnum( target ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultiTexCoord4svARB( target, v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultMatrixd( const GLdouble *m ) { - trWriteCMD( CMD_MULTMATRIXD ); - trWritePointer( (void *)m ); - trFileFlush(); - trWriteArrayd( 16, m ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultMatrixd( m ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trMultMatrixf( const GLfloat *m ) { - trWriteCMD( CMD_MULTMATRIXF ); - trWritePointer( (void *)m ); - trFileFlush(); - trWriteArrayf( 16, m ); - - if( trCtx()->doExec ) { - trGetDispatch()->MultMatrixf( m ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNewList( GLuint list, GLenum mode ) { - trWriteCMD( CMD_NEWLIST ); - trWriteui( list ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->NewList( list, mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ) { - trWriteCMD( CMD_NORMAL3B ); - trWriteb( nx ); - trWriteb( ny ); - trWriteb( nz ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3b( nx, ny, nz ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3bv( const GLbyte *v ) { - trWriteCMD( CMD_NORMAL3BV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayb( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3bv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ) { - trWriteCMD( CMD_NORMAL3D ); - trWrited( nx ); - trWrited( ny ); - trWrited( nz ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3d( nx, ny, nz ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3dv( const GLdouble *v ) { - trWriteCMD( CMD_NORMAL3DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ) { - trWriteCMD( CMD_NORMAL3F ); - trWritef( nx ); - trWritef( ny ); - trWritef( nz ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3f( nx, ny, nz ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3fv( const GLfloat *v ) { - trWriteCMD( CMD_NORMAL3FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3i( GLint nx, GLint ny, GLint nz ) { - trWriteCMD( CMD_NORMAL3I ); - trWritei( nx ); - trWritei( ny ); - trWritei( nz ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3i( nx, ny, nz ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3iv( const GLint *v ) { - trWriteCMD( CMD_NORMAL3IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3s( GLshort nx, GLshort ny, GLshort nz ) { - trWriteCMD( CMD_NORMAL3S ); - trWrites( nx ); - trWrites( ny ); - trWrites( nz ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3s( nx, ny, nz ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormal3sv( const GLshort *v ) { - trWriteCMD( CMD_NORMAL3SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Normal3sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormalPointerEXT( GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_NORMALPOINTEREXT ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->NormalPointerEXT( type, stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trNormalPointer( GLenum type, GLsizei stride, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_NORMALPOINTER ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->NormalPointer( type, stride, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ) { - trWriteCMD( CMD_ORTHO ); - trWrited( left ); - trWrited( right ); - trWrited( bottom ); - trWrited( top ); - trWrited( near_val ); - trWrited( far_val ); - - if( trCtx()->doExec ) { - trGetDispatch()->Ortho( left, right, bottom, top, near_val, far_val ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPassThrough( GLfloat token ) { - trWriteCMD( CMD_PASSTHROUGH ); - trWritef( token ); - - if( trCtx()->doExec ) { - trGetDispatch()->PassThrough( token ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) { - trWriteCMD( CMD_PIXELMAPFV ); - trWriteEnum( map ); - trWritei( mapsize ); - trWritePointer( (void *)values ); - trFileFlush(); - trWriteArrayf( mapsize, values ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelMapfv( map, mapsize, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelMapuiv( GLenum map, GLint mapsize, const GLuint *values ) { - trWriteCMD( CMD_PIXELMAPUIV ); - trWriteEnum( map ); - trWritei( mapsize ); - trWritePointer( (void *)values ); - trFileFlush(); - trWriteArrayui( mapsize, values ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelMapuiv( map, mapsize, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelMapusv( GLenum map, GLint mapsize, const GLushort *values ) { - trWriteCMD( CMD_PIXELMAPUSV ); - trWriteEnum( map ); - trWritei( mapsize ); - trWritePointer( (void *)values ); - trFileFlush(); - trWriteArrayus( mapsize, values ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelMapusv( map, mapsize, values ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelStoref( GLenum pname, GLfloat param ) { - trWriteCMD( CMD_PIXELSTOREF ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelStoref( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelStorei( GLenum pname, GLint param ) { - trWriteCMD( CMD_PIXELSTOREI ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelStorei( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelTransferf( GLenum pname, GLfloat param ) { - trWriteCMD( CMD_PIXELTRANSFERF ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelTransferf( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelTransferi( GLenum pname, GLint param ) { - trWriteCMD( CMD_PIXELTRANSFERI ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelTransferi( pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPixelZoom( GLfloat xfactor, GLfloat yfactor ) { - trWriteCMD( CMD_PIXELZOOM ); - trWritef( xfactor ); - trWritef( yfactor ); - - if( trCtx()->doExec ) { - trGetDispatch()->PixelZoom( xfactor, yfactor ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPointParameterfEXT( GLenum pname, GLfloat param ) { - trWriteCMD( CMD_POINTPARAMETERFEXT ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PointParameterfEXT( pname, param ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trPointParameterfSGIS( GLenum pname, GLfloat param) { - trWriteCMD( CMD_POINTPARAMETERFSGIS ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->PointParameterfSGIS( pname, param ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trPointParameterfvEXT( GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_POINTPARAMETERFVEXT ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_POINT_SIZE_MIN_EXT: - case GL_POINT_SIZE_MAX_EXT: - case GL_POINT_FADE_THRESHOLD_SIZE_EXT: - trWritef( params[0] ); - break; - - case GL_DISTANCE_ATTENUATION_EXT: - trWriteArrayf( 3, params ); - break; - - default: - /* The 2nd pass should handle this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->PointParameterfvEXT( pname, params ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trPointParameterfvSGIS( GLenum pname, const GLfloat *params) { /* TODO */ - trWriteCMD( CMD_POINTPARAMETERFVSGIS ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->PointParameterfvSGIS( pname, params ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trPointSize( GLfloat size ) { - trWriteCMD( CMD_POINTSIZE ); - trWritef( size ); - - if( trCtx()->doExec ) { - trGetDispatch()->PointSize( size ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPolygonMode( GLenum face, GLenum mode ) { - trWriteCMD( CMD_POLYGONMODE ); - trWriteEnum( face ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->PolygonMode( face, mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPolygonOffsetEXT( GLfloat factor, GLfloat bias ) { - trWriteCMD( CMD_POLYGONOFFSETEXT ); - trWritef( factor ); - trWritef( bias ); - - if( trCtx()->doExec ) { - trGetDispatch()->PolygonOffsetEXT( factor, bias ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPolygonOffset( GLfloat factor, GLfloat units ) { - trWriteCMD( CMD_POLYGONOFFSET ); - trWritef( factor ); - trWritef( units ); - - if( trCtx()->doExec ) { - trGetDispatch()->PolygonOffset( factor, units ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPolygonStipple( const GLubyte *mask ) { - trWriteCMD( CMD_POLYGONSTIPPLE ); - trWritePointer( (void *)mask ); - trFileFlush(); - trWriteArrayub( 64, mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->PolygonStipple( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPopAttrib( void ) { - trWriteCMD( CMD_POPATTRIB ); - - if( trCtx()->doExec ) { - trGetDispatch()->PopAttrib( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPopClientAttrib( void ) { - trWriteCMD( CMD_POPCLIENTATTRIB ); - - if( trCtx()->doExec ) { - trGetDispatch()->PopClientAttrib( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPopMatrix( void ) { - trWriteCMD( CMD_POPMATRIX ); - - if( trCtx()->doExec ) { - trGetDispatch()->PopMatrix( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPopName( void ) { - trWriteCMD( CMD_POPNAME ); - - if( trCtx()->doExec ) { - trGetDispatch()->PopName( ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trPrioritizeTexturesEXT( GLsizei n, const GLuint *textures, const GLclampf *priorities ) { - trWriteCMD( CMD_PRIORITIZETEXTURESEXT ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - - trWritePointer( (void *)priorities ); - trFileFlush(); - /* FIXME!!! */ - trWriteArrayf( n, priorities ); - - if( trCtx()->doExec ) { - trGetDispatch()->PrioritizeTexturesEXT( n, textures, priorities ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trPrioritizeTextures( GLsizei n, const GLuint *textures, const GLclampf *priorities ) { - trWriteCMD( CMD_PRIORITIZETEXTURES ); - trWriteSizei( n ); - trWritePointer( (void *)textures ); - trFileFlush(); - trWriteArrayui( n, textures ); - - trWritePointer( (void *)priorities ); - trFileFlush(); - /* FIXME!!! */ - trWriteArrayf( n, priorities ); - - if( trCtx()->doExec ) { - trGetDispatch()->PrioritizeTextures( n, textures, priorities ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPushAttrib( GLbitfield mask ) { - trWriteCMD( CMD_PUSHATTRIB ); - trWriteBits( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->PushAttrib( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPushClientAttrib( GLbitfield mask ) { - trWriteCMD( CMD_PUSHCLIENTATTRIB ); - trWriteBits( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->PushClientAttrib( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPushMatrix( void ) { - trWriteCMD( CMD_PUSHMATRIX ); - - if( trCtx()->doExec ) { - trGetDispatch()->PushMatrix( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trPushName( GLuint name ) { - trWriteCMD( CMD_PUSHNAME ); - trWriteui( name ); - - if( trCtx()->doExec ) { - trGetDispatch()->PushName( name ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2d( GLdouble x, GLdouble y ) { - trWriteCMD( CMD_RASTERPOS2D ); - trWrited( x ); - trWrited( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2d( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2dv( const GLdouble *v ) { - trWriteCMD( CMD_RASTERPOS2DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2f( GLfloat x, GLfloat y ) { - trWriteCMD( CMD_RASTERPOS2F ); - trWritef( x ); - trWritef( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2f( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2fv( const GLfloat *v ) { - trWriteCMD( CMD_RASTERPOS2FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2i( GLint x, GLint y ) { - trWriteCMD( CMD_RASTERPOS2I ); - trWritei( x ); - trWritei( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2i( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2iv( const GLint *v ) { - trWriteCMD( CMD_RASTERPOS2IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2s( GLshort x, GLshort y ) { - trWriteCMD( CMD_RASTERPOS2S ); - trWrites( x ); - trWrites( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2s( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos2sv( const GLshort *v ) { - trWriteCMD( CMD_RASTERPOS2SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos2sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3d( GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_RASTERPOS3D ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3d( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3dv( const GLdouble *v ) { - trWriteCMD( CMD_RASTERPOS3DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3f( GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_RASTERPOS3F ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3f( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3fv( const GLfloat *v ) { - trWriteCMD( CMD_RASTERPOS3FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3i( GLint x, GLint y, GLint z ) { - trWriteCMD( CMD_RASTERPOS3I ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3i( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3iv( const GLint *v ) { - trWriteCMD( CMD_RASTERPOS3IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3s( GLshort x, GLshort y, GLshort z ) { - trWriteCMD( CMD_RASTERPOS3S ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3s( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos3sv( const GLshort *v ) { - trWriteCMD( CMD_RASTERPOS3SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos3sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - trWriteCMD( CMD_RASTERPOS4D ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - trWrited( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4d( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4dv( const GLdouble *v ) { - trWriteCMD( CMD_RASTERPOS4DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - trWriteCMD( CMD_RASTERPOS4F ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - trWritef( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4f( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4fv( const GLfloat *v ) { - trWriteCMD( CMD_RASTERPOS4FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4i( GLint x, GLint y, GLint z, GLint w ) { - trWriteCMD( CMD_RASTERPOS4I ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - trWritei( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4i( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4iv( const GLint *v ) { - trWriteCMD( CMD_RASTERPOS4IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ) { - trWriteCMD( CMD_RASTERPOS4S ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - trWrites( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4s( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRasterPos4sv( const GLshort *v ) { - trWriteCMD( CMD_RASTERPOS4SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->RasterPos4sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trReadBuffer( GLenum mode ) { - trWriteCMD( CMD_READBUFFER ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->ReadBuffer( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) { - GLint pixelsize; - - trWriteCMD( CMD_READPIXELS ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - if( trCtx()->doExec ) { - trGetDispatch()->ReadPixels( x, y, width, height, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ) { - trWriteCMD( CMD_RECTD ); - trWrited( x1 ); - trWrited( y1 ); - trWrited( x2 ); - trWrited( y2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectd( x1, y1, x2, y2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectdv( const GLdouble *v1, const GLdouble *v2 ) { - trWriteCMD( CMD_RECTDV ); - trWritePointer( (void *)v1 ); - trFileFlush(); - trWriteArrayd( 2, v1 ); - - trWritePointer( (void *)v2 ); - trFileFlush(); - trWriteArrayd( 2, v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectdv( v1, v2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ) { - trWriteCMD( CMD_RECTF ); - trWritef( x1 ); - trWritef( y1 ); - trWritef( x2 ); - trWritef( y2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectf( x1, y1, x2, y2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectfv( const GLfloat *v1, const GLfloat *v2 ) { - trWriteCMD( CMD_RECTFV ); - trWritePointer( (void *)v1 ); - trFileFlush(); - trWriteArrayf( 2, v1 ); - - trWritePointer( (void *)v2 ); - trFileFlush(); - trWriteArrayf( 2, v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectfv( v1, v2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRecti( GLint x1, GLint y1, GLint x2, GLint y2 ) { - trWriteCMD( CMD_RECTI ); - trWritei( x1 ); - trWritei( y1 ); - trWritei( x2 ); - trWritei( y2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Recti( x1, y1, x2, y2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectiv( const GLint *v1, const GLint *v2 ) { - trWriteCMD( CMD_RECTIV ); - trWritePointer( (void *)v1 ); - trFileFlush(); - trWriteArrayi( 2, v1 ); - - trWritePointer( (void *)v2 ); - trFileFlush(); - trWriteArrayi( 2, v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectiv( v1, v2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ) { - trWriteCMD( CMD_RECTS ); - trWrites( x1 ); - trWrites( y1 ); - trWrites( x2 ); - trWrites( y2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rects( x1, y1, x2, y2 ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRectsv( const GLshort *v1, const GLshort *v2 ) { - trWriteCMD( CMD_RECTSV ); - trWritePointer( (void *)v1 ); - trFileFlush(); - trWriteArrays( 2, v1 ); - - trWritePointer( (void *)v2 ); - trFileFlush(); - trWriteArrays( 2, v2 ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rectsv( v1, v2 ); - trError(); - } -} - - -GLAPI GLint GLAPIENTRY trRenderMode( GLenum mode ) { - GLint retval; - - trWriteCMD( CMD_RENDERMODE ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - retval = trGetDispatch()->RenderMode( mode ); - trError(); - } else { - retval = 0; - } - - trWritei( retval ); - return retval; -} - - -GLAPI void GLAPIENTRY trResetHistogram( GLenum target ) { - trWriteCMD( CMD_RESETHISTOGRAM ); - trWriteEnum( target ); - - if( trCtx()->doExec ) { - trGetDispatch()->ResetHistogram( target ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trResetMinmax( GLenum target ) { - trWriteCMD( CMD_RESETMINMAX ); - trWriteEnum( target ); - - if( trCtx()->doExec ) { - trGetDispatch()->ResetMinmax( target ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trResizeBuffersMESA( void ) { - trWriteCMD( CMD_RESIZEBUFFERSMESA ); - - if( trCtx()->doExec ) { - trGetDispatch()->ResizeBuffersMESA( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_ROTATED ); - trWrited( angle ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rotated( angle, x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trRotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_ROTATEF ); - trWritef( angle ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Rotatef( angle, x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trScaled( GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_SCALED ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Scaled( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trScalef( GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_SCALEF ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Scalef( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trScissor( GLint x, GLint y, GLsizei width, GLsizei height) { - trWriteCMD( CMD_SCISSOR ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->Scissor( x, y, width, height ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trSelectBuffer( GLsizei size, GLuint *buffer ) { - trWriteCMD( CMD_SELECTBUFFER ); - trWriteSizei( size ); - trWritePointer( (void *)buffer ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->SelectBuffer( size, buffer ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trSeparableFilter2D( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column ) { - GLint pixelsize; - - trWriteCMD( CMD_SEPARABLEFILTER2D ); - trWriteEnum( target ); - trWriteEnum( internalformat ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)row ); - trFileFlush(); - trWritePointer( (void *)column ); - trFileFlush(); - - pixelsize = trGetPixelSize( format, type ); - trWriteTypeArray( type, width, pixelsize, 0, row ); - trWriteTypeArray( type, height, pixelsize, 0, column ); - - if( trCtx()->doExec ) { - trGetDispatch()->SeparableFilter2D( target, internalformat, width, height, format, type, row, column ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trShadeModel( GLenum mode ) { - trWriteCMD( CMD_SHADEMODEL ); - trWriteEnum( mode ); - - if( trCtx()->doExec ) { - trGetDispatch()->ShadeModel( mode ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trStencilFunc( GLenum func, GLint ref, GLuint mask ) { - trWriteCMD( CMD_STENCILFUNC ); - trWriteEnum( func ); - trWritei( ref ); - trWriteui( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->StencilFunc( func, ref, mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trStencilMask( GLuint mask ) { - trWriteCMD( CMD_STENCILMASK ); - trWriteui( mask ); - - if( trCtx()->doExec ) { - trGetDispatch()->StencilMask( mask ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trStencilOp( GLenum fail, GLenum zfail, GLenum zpass ) { - trWriteCMD( CMD_STENCILOP ); - trWriteEnum( fail ); - trWriteEnum( zfail ); - trWriteEnum( zpass ); - - if( trCtx()->doExec ) { - trGetDispatch()->StencilOp( fail, zfail, zpass ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1d( GLdouble s ) { - trWriteCMD( CMD_TEXCOORD1D ); - trWrited( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1d( s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1dv( const GLdouble *v ) { - trWriteCMD( CMD_TEXCOORD1DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWrited( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1f( GLfloat s ) { - trWriteCMD( CMD_TEXCOORD1F ); - trWritef( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1f( s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1fv( const GLfloat *v ) { - trWriteCMD( CMD_TEXCOORD1FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWritef( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1i( GLint s ) { - trWriteCMD( CMD_TEXCOORD1I ); - trWritei( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1i( s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1iv( const GLint *v ) { - trWriteCMD( CMD_TEXCOORD1IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWritei( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1s( GLshort s ) { - trWriteCMD( CMD_TEXCOORD1S ); - trWrites( s ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1s( s ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord1sv( const GLshort *v ) { - trWriteCMD( CMD_TEXCOORD1SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWrites( v[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord1sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2d( GLdouble s, GLdouble t ) { - trWriteCMD( CMD_TEXCOORD2D ); - trWrited( s ); - trWrited( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2d( s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2dv( const GLdouble *v ) { - trWriteCMD( CMD_TEXCOORD2DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2f( GLfloat s, GLfloat t ) { - trWriteCMD( CMD_TEXCOORD2F ); - trWritef( s ); - trWritef( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2f( s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2fv( const GLfloat *v ) { - trWriteCMD( CMD_TEXCOORD2FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2i( GLint s, GLint t ) { - trWriteCMD( CMD_TEXCOORD2I ); - trWritei( s ); - trWritei( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2i( s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2iv( const GLint *v ) { - trWriteCMD( CMD_TEXCOORD2IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2s( GLshort s, GLshort t ) { - trWriteCMD( CMD_TEXCOORD2S ); - trWrites( s ); - trWrites( t ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2s( s, t ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord2sv( const GLshort *v ) { - trWriteCMD( CMD_TEXCOORD2SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord2sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3d( GLdouble s, GLdouble t, GLdouble r ) { - trWriteCMD( CMD_TEXCOORD3D ); - trWrited( s ); - trWrited( t ); - trWrited( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3d( s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3dv( const GLdouble *v ) { - trWriteCMD( CMD_TEXCOORD3DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3f( GLfloat s, GLfloat t, GLfloat r ) { - trWriteCMD( CMD_TEXCOORD3F ); - trWritef( s ); - trWritef( t ); - trWritef( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3f( s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3fv( const GLfloat *v ) { - trWriteCMD( CMD_TEXCOORD3FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3i( GLint s, GLint t, GLint r ) { - trWriteCMD( CMD_TEXCOORD3I ); - trWritei( s ); - trWritei( t ); - trWritei( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3i( s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3iv( const GLint *v ) { - trWriteCMD( CMD_TEXCOORD3IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3s( GLshort s, GLshort t, GLshort r ) { - trWriteCMD( CMD_TEXCOORD3S ); - trWrites( s ); - trWrites( t ); - trWrites( r ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3s( s, t, r ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord3sv( const GLshort *v ) { - trWriteCMD( CMD_TEXCOORD3SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord3sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ) { - trWriteCMD( CMD_TEXCOORD4D ); - trWrited( s ); - trWrited( t ); - trWrited( r ); - trWrited( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4d( s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4dv( const GLdouble *v ) { - trWriteCMD( CMD_TEXCOORD4DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ) { - trWriteCMD( CMD_TEXCOORD4F ); - trWritef( s ); - trWritef( t ); - trWritef( r ); - trWritef( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4f( s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4fv( const GLfloat *v ) { - trWriteCMD( CMD_TEXCOORD4FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4i( GLint s, GLint t, GLint r, GLint q ) { - trWriteCMD( CMD_TEXCOORD4I ); - trWritei( s ); - trWritei( t ); - trWritei( r ); - trWritei( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4i( s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4iv( const GLint *v ) { - trWriteCMD( CMD_TEXCOORD4IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ) { - trWriteCMD( CMD_TEXCOORD4S ); - trWrites( s ); - trWrites( t ); - trWrites( r ); - trWrites( q ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4s( s, t, r, q ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoord4sv( const GLshort *v ) { - trWriteCMD( CMD_TEXCOORD4SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoord4sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoordPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_TEXCOORDPOINTEREXT ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexCoordPointerEXT( size, type, stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexCoordPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ) { /* TODO */ - trace_context_t * tctx; - - trWriteCMD( CMD_TEXCOORDPOINTER ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( tctx->doExec ) { - trGetDispatch()->TexCoordPointer( size, type, stride, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexEnvf( GLenum target, GLenum pname, GLfloat param ) { - trWriteCMD( CMD_TEXENVF ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexEnvf( target, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_TEXENVFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - trWritef( params[0] ); - break; - case GL_TEXTURE_ENV_COLOR: - trWriteArrayf( 4, params ); - break; - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexEnvfv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexEnvi( GLenum target, GLenum pname, GLint param ) { - trWriteCMD( CMD_TEXENVI ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexEnvi( target, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexEnviv( GLenum target, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_TEXENVIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_TEXTURE_ENV_MODE: - trWritei( params[0] ); - break; - case GL_TEXTURE_ENV_COLOR: - trWriteArrayi( 4, params ); - break; - default: - /* The 2nd pass should catch this */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexEnviv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGend( GLenum coord, GLenum pname, GLdouble param ) { - trWriteCMD( CMD_TEXGEND ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWrited( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexGend( coord, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGendv( GLenum coord, GLenum pname, const GLdouble *params ) { - trWriteCMD( CMD_TEXGENDV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWrited( params[0] ); - break; - - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayd( 4, params ); - break; - - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexGendv( coord, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGenf( GLenum coord, GLenum pname, GLfloat param ) { - trWriteCMD( CMD_TEXGENF ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexGenf( coord, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_TEXGENFV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWritef( params[0] ); - break; - - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayf( 4, params ); - break; - - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexGenfv( coord, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGeni( GLenum coord, GLenum pname, GLint param ) { - trWriteCMD( CMD_TEXGENI ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexGeni( coord, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexGeniv( GLenum coord, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_TEXGENIV ); - trWriteEnum( coord ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - - switch( pname ) { - case GL_TEXTURE_GEN_MODE: - trWritei( params[0] ); - break; - - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - trWriteArrayi( 4, params ); - break; - - default: - /* The 2nd pass should catch this. */ - break; - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexGeniv( coord, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexImage1D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXIMAGE1D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( internalFormat ); - trWriteSizei( width ); - trWritei( border ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexImage1D( target, level, internalFormat, width, border, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexImage2D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXIMAGE2D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( internalFormat ); - trWriteSizei( width ); - trWriteSizei( height ); - trWritei( border ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexImage2D( target, level, internalFormat, width, height, border, format, type, pixels ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trTexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - - trWriteCMD( CMD_TEXIMAGE3DEXT ); - trWriteEnum( target ); - trWritei( level ); - trWriteEnum( internalFormat ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteSizei( depth ); - trWritei( border ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - /* Pixels isn't touched if target is GL_PROXY_TEXTURE_3D */ - if( target != GL_PROXY_TEXTURE_3D ) { - pixelsize = trGetPixelSize( format, type ); - trWritePixelArray( GL_FALSE, type, width, height, depth, pixelsize, pixels ); - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexImage3DEXT( target, level, internalFormat, width, height, depth, border, format, type, pixels ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trTexImage3D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXIMAGE3D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( internalFormat ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteSizei( depth ); - trWritei( border ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexImage3D( target, level, internalFormat, width, height, depth, border, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexParameterf( GLenum target, GLenum pname, GLfloat param ) { - trWriteCMD( CMD_TEXPARAMETERF ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritef( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexParameterf( target, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) { - trWriteCMD( CMD_TEXPARAMETERFV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - trWritef( params[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexParameterfv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexParameteri( GLenum target, GLenum pname, GLint param ) { - trWriteCMD( CMD_TEXPARAMETERI ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritei( param ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexParameteri( target, pname, param ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexParameteriv( GLenum target, GLenum pname, const GLint *params ) { - trWriteCMD( CMD_TEXPARAMETERIV ); - trWriteEnum( target ); - trWriteEnum( pname ); - trWritePointer( (void *)params ); - trFileFlush(); - trWritei( params[0] ); - - if( trCtx()->doExec ) { - trGetDispatch()->TexParameteriv( target, pname, params ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXSUBIMAGE1D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWriteSizei( width ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexSubImage1D( target, level, xoffset, width, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXSUBIMAGE2D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels ); - trError(); - } -} - - -#if 0 -// Not in MESAs dispatch table -GLAPI void GLAPIENTRY trTexSubImage3DEXT( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXSUBIMAGE3DEXT ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWritei( zoffset ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteSizei( depth ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - /* Pixels isn't touched if target is GL_PROXY_TEXTURE_3D */ - if( target != GL_PROXY_TEXTURE_3D ) { - pixelsize = trGetPixelSize( format, type ); - trWritePixelArray( GL_FALSE, type, width, height, depth, pixelsize, pixels ); - } - - if( trCtx()->doExec ) { - trGetDispatch()->TexSubImage3DEXT( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); - trError(); - } -} -#endif - - -GLAPI void GLAPIENTRY trTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) { /* TODO */ - GLint pixelsize; - - trWriteCMD( CMD_TEXSUBIMAGE3D ); - trWriteEnum( target ); - trWritei( level ); - trWritei( xoffset ); - trWritei( yoffset ); - trWritei( zoffset ); - trWriteSizei( width ); - trWriteSizei( height ); - trWriteSizei( depth ); - trWriteEnum( format ); - trWriteEnum( type ); - trWritePointer( (void *)pixels ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->TexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTranslated( GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_TRANSLATED ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Translated( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trTranslatef( GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_TRANSLATEF ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Translatef( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trUnlockArraysEXT( void ) { - trWriteCMD( CMD_UNLOCKARRAYSEXT ); - - if( trCtx()->doExec ) { - trGetDispatch()->UnlockArraysEXT( ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2d( GLdouble x, GLdouble y ) { - trWriteCMD( CMD_VERTEX2D ); - trWrited( x ); - trWrited( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2d( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2dv( const GLdouble *v ) { - trWriteCMD( CMD_VERTEX2DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2f( GLfloat x, GLfloat y ) { - trWriteCMD( CMD_VERTEX2F ); - trWritef( x ); - trWritef( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2f( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2fv( const GLfloat *v ) { - trWriteCMD( CMD_VERTEX2FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2i( GLint x, GLint y ) { - trWriteCMD( CMD_VERTEX2I ); - trWritei( x ); - trWritei( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2i( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2iv( const GLint *v ) { - trWriteCMD( CMD_VERTEX2IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2s( GLshort x, GLshort y ) { - trWriteCMD( CMD_VERTEX2S ); - trWrites( x ); - trWrites( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2s( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex2sv( const GLshort *v ) { - trWriteCMD( CMD_VERTEX2SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 2, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex2sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3d( GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_VERTEX3D ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3d( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3dv( const GLdouble *v ) { - trWriteCMD( CMD_VERTEX3DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3f( GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_VERTEX3F ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3f( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3fv( const GLfloat *v ) { - trWriteCMD( CMD_VERTEX3FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3i( GLint x, GLint y, GLint z ) { - trWriteCMD( CMD_VERTEX3I ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3i( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3iv( const GLint *v ) { - trWriteCMD( CMD_VERTEX3IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3s( GLshort x, GLshort y, GLshort z ) { - trWriteCMD( CMD_VERTEX3S ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3s( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex3sv( const GLshort *v ) { - trWriteCMD( CMD_VERTEX3SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 3, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex3sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ) { - trWriteCMD( CMD_VERTEX4D ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - trWrited( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4d( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4dv( const GLdouble *v ) { - trWriteCMD( CMD_VERTEX4DV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayd( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4dv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - trWriteCMD( CMD_VERTEX4F ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - trWritef( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4f( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4fv( const GLfloat *v ) { - trWriteCMD( CMD_VERTEX4FV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayf( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4fv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4i( GLint x, GLint y, GLint z, GLint w ) { - trWriteCMD( CMD_VERTEX4I ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - trWritei( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4i( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4iv( const GLint *v ) { - trWriteCMD( CMD_VERTEX4IV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrayi( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4iv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ) { - trWriteCMD( CMD_VERTEX4S ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - trWrites( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4s( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertex4sv( const GLshort *v ) { - trWriteCMD( CMD_VERTEX4SV ); - trWritePointer( (void *)v ); - trFileFlush(); - trWriteArrays( 4, v ); - - if( trCtx()->doExec ) { - trGetDispatch()->Vertex4sv( v ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_VERTEXPOINTEREXT ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWriteSizei( count ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->VertexPointerEXT( size, type, stride, count, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trVertexPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr ) { /* TODO */ - trWriteCMD( CMD_VERTEXPOINTER ); - trWritei( size ); - trWriteEnum( type ); - trWriteSizei( stride ); - trWritePointer( (void *)ptr ); - trFileFlush(); - - if( trCtx()->doExec ) { - trGetDispatch()->VertexPointer( size, type, stride, ptr ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trViewport( GLint x, GLint y, GLsizei width, GLsizei height ) { - trWriteCMD( CMD_VIEWPORT ); - trWritei( x ); - trWritei( y ); - trWriteSizei( width ); - trWriteSizei( height ); - - if( trCtx()->doExec ) { - trGetDispatch()->Viewport( x, y, width, height ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2dMESA( GLdouble x, GLdouble y ) { - trWriteCMD( CMD_WINDOWPOS2DMESA ); - trWrited( x ); - trWrited( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2dMESA( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2dvMESA( const GLdouble *p ) { - trWriteCMD( CMD_WINDOWPOS2DVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayd( 2, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2dvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2fMESA( GLfloat x, GLfloat y ) { - trWriteCMD( CMD_WINDOWPOS2FMESA ); - trWritef( x ); - trWritef( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2fMESA( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2fvMESA( const GLfloat *p ) { - trWriteCMD( CMD_WINDOWPOS2FVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayf( 2, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2fvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2iMESA( GLint x, GLint y ) { - trWriteCMD( CMD_WINDOWPOS2IMESA ); - trWritei( x ); - trWritei( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2iMESA( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2ivMESA( const GLint *p ) { - trWriteCMD( CMD_WINDOWPOS2IVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayi( 2, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2ivMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2sMESA( GLshort x, GLshort y ) { - trWriteCMD( CMD_WINDOWPOS2SMESA ); - trWrites( x ); - trWrites( y ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2sMESA( x, y ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos2svMESA( const GLshort *p ) { - trWriteCMD( CMD_WINDOWPOS2SVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrays( 2, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos2svMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3dMESA( GLdouble x, GLdouble y, GLdouble z ) { - trWriteCMD( CMD_WINDOWPOS3DMESA ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3dMESA( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3dvMESA( const GLdouble *p ) { - trWriteCMD( CMD_WINDOWPOS3DVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayd( 3, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3dvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3fMESA( GLfloat x, GLfloat y, GLfloat z ) { - trWriteCMD( CMD_WINDOWPOS3FMESA ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3fMESA( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3fvMESA( const GLfloat *p ) { - trWriteCMD( CMD_WINDOWPOS3FVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayf( 3, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3fvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3iMESA( GLint x, GLint y, GLint z ) { - trWriteCMD( CMD_WINDOWPOS3IMESA ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3iMESA( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3ivMESA( const GLint *p ) { - trWriteCMD( CMD_WINDOWPOS3IVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayi( 3, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3ivMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3sMESA( GLshort x, GLshort y, GLshort z ) { - trWriteCMD( CMD_WINDOWPOS3SMESA ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3sMESA( x, y, z ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos3svMESA( const GLshort *p ) { - trWriteCMD( CMD_WINDOWPOS3SVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrays( 3, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos3svMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4dMESA( GLdouble x, GLdouble y, GLdouble z, GLdouble w) { - trWriteCMD( CMD_WINDOWPOS4DMESA ); - trWrited( x ); - trWrited( y ); - trWrited( z ); - trWrited( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4dMESA( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4dvMESA( const GLdouble *p ) { - trWriteCMD( CMD_WINDOWPOS4DVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayd( 4, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4dvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - trWriteCMD( CMD_WINDOWPOS4FMESA ); - trWritef( x ); - trWritef( y ); - trWritef( z ); - trWritef( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4fMESA( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4fvMESA( const GLfloat *p ) { - trWriteCMD( CMD_WINDOWPOS4FVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayf( 4, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4fvMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4iMESA( GLint x, GLint y, GLint z, GLint w ) { - trWriteCMD( CMD_WINDOWPOS4IMESA ); - trWritei( x ); - trWritei( y ); - trWritei( z ); - trWritei( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4iMESA( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4ivMESA( const GLint *p ) { - trWriteCMD( CMD_WINDOWPOS4IVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrayi( 4, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4ivMESA( p ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4sMESA( GLshort x, GLshort y, GLshort z, GLshort w ) { - trWriteCMD( CMD_WINDOWPOS4SMESA ); - trWrites( x ); - trWrites( y ); - trWrites( z ); - trWrites( w ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4sMESA( x, y, z, w ); - trError(); - } -} - - -GLAPI void GLAPIENTRY trWindowPos4svMESA( const GLshort *p ) { - trWriteCMD( CMD_WINDOWPOS4SVMESA ); - trWritePointer( (void *)p ); - trFileFlush(); - trWriteArrays( 4, p ); - - if( trCtx()->doExec ) { - trGetDispatch()->WindowPos4svMESA( p ); - trError(); - } -} - - -void trInitDispatch( struct _glapi_table* dispatch ) { - - /* assert(dispatch); */ - if (!dispatch) - return; - - memset(dispatch,0,sizeof(struct _glapi_table)); - - dispatch->NewList = trNewList; /* 0 */ - dispatch->EndList = trEndList; /* 1 */ - dispatch->CallList = trCallList; /* 2 */ - dispatch->CallLists = trCallLists; /* 3 */ - dispatch->DeleteLists = trDeleteLists; /* 4 */ - dispatch->GenLists = trGenLists; /* 5 */ - dispatch->ListBase = trListBase; /* 6 */ - dispatch->Begin = trBegin; /* 7 */ - dispatch->Bitmap = trBitmap; /* 8 */ - dispatch->Color3b = trColor3b; /* 9 */ - dispatch->Color3bv = trColor3bv; /* 10 */ - dispatch->Color3d = trColor3d; /* 11 */ - dispatch->Color3dv = trColor3dv; /* 12 */ - dispatch->Color3f = trColor3f; /* 13 */ - dispatch->Color3fv = trColor3fv; /* 14 */ - dispatch->Color3i = trColor3i; /* 15 */ - dispatch->Color3iv = trColor3iv; /* 16 */ - dispatch->Color3s = trColor3s; /* 17 */ - dispatch->Color3sv = trColor3sv; /* 18 */ - dispatch->Color3ub = trColor3ub; /* 19 */ - dispatch->Color3ubv = trColor3ubv; /* 20 */ - dispatch->Color3ui = trColor3ui; /* 21 */ - dispatch->Color3uiv = trColor3uiv; /* 22 */ - dispatch->Color3us = trColor3us; /* 23 */ - dispatch->Color3usv = trColor3usv; /* 24 */ - dispatch->Color4b = trColor4b; /* 25 */ - dispatch->Color4bv = trColor4bv; /* 26 */ - dispatch->Color4d = trColor4d; /* 27 */ - dispatch->Color4dv = trColor4dv; /* 28 */ - dispatch->Color4f = trColor4f; /* 29 */ - dispatch->Color4fv = trColor4fv; /* 30 */ - dispatch->Color4i = trColor4i; /* 31 */ - dispatch->Color4iv = trColor4iv; /* 32 */ - dispatch->Color4s = trColor4s; /* 33 */ - dispatch->Color4sv = trColor4sv; /* 34 */ - dispatch->Color4ub = trColor4ub; /* 35 */ - dispatch->Color4ubv = trColor4ubv; /* 36 */ - dispatch->Color4ui = trColor4ui; /* 37 */ - dispatch->Color4uiv = trColor4uiv; /* 38 */ - dispatch->Color4us = trColor4us; /* 39 */ - dispatch->Color4usv = trColor4usv; /* 40 */ - dispatch->EdgeFlag = trEdgeFlag; /* 41 */ - dispatch->EdgeFlagv = trEdgeFlagv; /* 42 */ - dispatch->End = trEnd; /* 43 */ - dispatch->Indexd = trIndexd; /* 44 */ - dispatch->Indexdv = trIndexdv; /* 45 */ - dispatch->Indexf = trIndexf; /* 46 */ - dispatch->Indexfv = trIndexfv; /* 47 */ - dispatch->Indexi = trIndexi; /* 48 */ - dispatch->Indexiv = trIndexiv; /* 49 */ - dispatch->Indexs = trIndexs; /* 50 */ - dispatch->Indexsv = trIndexsv; /* 51 */ - dispatch->Normal3b = trNormal3b; /* 52 */ - dispatch->Normal3bv = trNormal3bv; /* 53 */ - dispatch->Normal3d = trNormal3d; /* 54 */ - dispatch->Normal3dv = trNormal3dv; /* 55 */ - dispatch->Normal3f = trNormal3f; /* 56 */ - dispatch->Normal3fv = trNormal3fv; /* 57 */ - dispatch->Normal3i = trNormal3i; /* 58 */ - dispatch->Normal3iv = trNormal3iv; /* 59 */ - dispatch->Normal3s = trNormal3s; /* 60 */ - dispatch->Normal3sv = trNormal3sv; /* 61 */ - dispatch->RasterPos2d = trRasterPos2d; /* 62 */ - dispatch->RasterPos2dv = trRasterPos2dv; /* 63 */ - dispatch->RasterPos2f = trRasterPos2f; /* 64 */ - dispatch->RasterPos2fv = trRasterPos2fv; /* 65 */ - dispatch->RasterPos2i = trRasterPos2i; /* 66 */ - dispatch->RasterPos2iv = trRasterPos2iv; /* 67 */ - dispatch->RasterPos2s = trRasterPos2s; /* 68 */ - dispatch->RasterPos2sv = trRasterPos2sv; /* 69 */ - dispatch->RasterPos3d = trRasterPos3d; /* 70 */ - dispatch->RasterPos3dv = trRasterPos3dv; /* 71 */ - dispatch->RasterPos3f = trRasterPos3f; /* 72 */ - dispatch->RasterPos3fv = trRasterPos3fv; /* 73 */ - dispatch->RasterPos3i = trRasterPos3i; /* 74 */ - dispatch->RasterPos3iv = trRasterPos3iv; /* 75 */ - dispatch->RasterPos3s = trRasterPos3s; /* 76 */ - dispatch->RasterPos3sv = trRasterPos3sv; /* 77 */ - dispatch->RasterPos4d = trRasterPos4d; /* 78 */ - dispatch->RasterPos4dv = trRasterPos4dv; /* 79 */ - dispatch->RasterPos4f = trRasterPos4f; /* 80 */ - dispatch->RasterPos4fv = trRasterPos4fv; /* 81 */ - dispatch->RasterPos4i = trRasterPos4i; /* 82 */ - dispatch->RasterPos4iv = trRasterPos4iv; /* 83 */ - dispatch->RasterPos4s = trRasterPos4s; /* 84 */ - dispatch->RasterPos4sv = trRasterPos4sv; /* 85 */ - dispatch->Rectd = trRectd; /* 86 */ - dispatch->Rectdv = trRectdv; /* 87 */ - dispatch->Rectf = trRectf; /* 88 */ - dispatch->Rectfv = trRectfv; /* 89 */ - dispatch->Recti = trRecti; /* 90 */ - dispatch->Rectiv = trRectiv; /* 91 */ - dispatch->Rects = trRects; /* 92 */ - dispatch->Rectsv = trRectsv; /* 93 */ - dispatch->TexCoord1d = trTexCoord1d; /* 94 */ - dispatch->TexCoord1dv = trTexCoord1dv; /* 95 */ - dispatch->TexCoord1f = trTexCoord1f; /* 96 */ - dispatch->TexCoord1fv = trTexCoord1fv; /* 97 */ - dispatch->TexCoord1i = trTexCoord1i; /* 98 */ - dispatch->TexCoord1iv = trTexCoord1iv; /* 99 */ - dispatch->TexCoord1s = trTexCoord1s; /* 100 */ - dispatch->TexCoord1sv = trTexCoord1sv; /* 101 */ - dispatch->TexCoord2d = trTexCoord2d; /* 102 */ - dispatch->TexCoord2dv = trTexCoord2dv; /* 103 */ - dispatch->TexCoord2f = trTexCoord2f; /* 104 */ - dispatch->TexCoord2fv = trTexCoord2fv; /* 105 */ - dispatch->TexCoord2i = trTexCoord2i; /* 106 */ - dispatch->TexCoord2iv = trTexCoord2iv; /* 107 */ - dispatch->TexCoord2s = trTexCoord2s; /* 108 */ - dispatch->TexCoord2sv = trTexCoord2sv; /* 109 */ - dispatch->TexCoord3d = trTexCoord3d; /* 110 */ - dispatch->TexCoord3dv = trTexCoord3dv; /* 111 */ - dispatch->TexCoord3f = trTexCoord3f; /* 112 */ - dispatch->TexCoord3fv = trTexCoord3fv; /* 113 */ - dispatch->TexCoord3i = trTexCoord3i; /* 114 */ - dispatch->TexCoord3iv = trTexCoord3iv; /* 115 */ - dispatch->TexCoord3s = trTexCoord3s; /* 116 */ - dispatch->TexCoord3sv = trTexCoord3sv; /* 117 */ - dispatch->TexCoord4d = trTexCoord4d; /* 118 */ - dispatch->TexCoord4dv = trTexCoord4dv; /* 119 */ - dispatch->TexCoord4f = trTexCoord4f; /* 120 */ - dispatch->TexCoord4fv = trTexCoord4fv; /* 121 */ - dispatch->TexCoord4i = trTexCoord4i; /* 122 */ - dispatch->TexCoord4iv = trTexCoord4iv; /* 123 */ - dispatch->TexCoord4s = trTexCoord4s; /* 124 */ - dispatch->TexCoord4sv = trTexCoord4sv; /* 125 */ - dispatch->Vertex2d = trVertex2d; /* 126 */ - dispatch->Vertex2dv = trVertex2dv; /* 127 */ - dispatch->Vertex2f = trVertex2f; /* 128 */ - dispatch->Vertex2fv = trVertex2fv; /* 129 */ - dispatch->Vertex2i = trVertex2i; /* 130 */ - dispatch->Vertex2iv = trVertex2iv; /* 131 */ - dispatch->Vertex2s = trVertex2s; /* 132 */ - dispatch->Vertex2sv = trVertex2sv; /* 133 */ - dispatch->Vertex3d = trVertex3d; /* 134 */ - dispatch->Vertex3dv = trVertex3dv; /* 135 */ - dispatch->Vertex3f = trVertex3f; /* 136 */ - dispatch->Vertex3fv = trVertex3fv; /* 137 */ - dispatch->Vertex3i = trVertex3i; /* 138 */ - dispatch->Vertex3iv = trVertex3iv; /* 139 */ - dispatch->Vertex3s = trVertex3s; /* 140 */ - dispatch->Vertex3sv = trVertex3sv; /* 141 */ - dispatch->Vertex4d = trVertex4d; /* 142 */ - dispatch->Vertex4dv = trVertex4dv; /* 143 */ - dispatch->Vertex4f = trVertex4f; /* 144 */ - dispatch->Vertex4fv = trVertex4fv; /* 145 */ - dispatch->Vertex4i = trVertex4i; /* 146 */ - dispatch->Vertex4iv = trVertex4iv; /* 147 */ - dispatch->Vertex4s = trVertex4s; /* 148 */ - dispatch->Vertex4sv = trVertex4sv; /* 149 */ - dispatch->ClipPlane = trClipPlane; /* 150 */ - dispatch->ColorMaterial = trColorMaterial; /* 151 */ - dispatch->CullFace = trCullFace; /* 152 */ - dispatch->Fogf = trFogf; /* 153 */ - dispatch->Fogfv = trFogfv; /* 154 */ - dispatch->Fogi = trFogi; /* 155 */ - dispatch->Fogiv = trFogiv; /* 156 */ - dispatch->FrontFace = trFrontFace; /* 157 */ - dispatch->Hint = trHint; /* 158 */ - dispatch->Lightf = trLightf; /* 159 */ - dispatch->Lightfv = trLightfv; /* 160 */ - dispatch->Lighti = trLighti; /* 161 */ - dispatch->Lightiv = trLightiv; /* 162 */ - dispatch->LightModelf = trLightModelf; /* 163 */ - dispatch->LightModelfv = trLightModelfv; /* 164 */ - dispatch->LightModeli = trLightModeli; /* 165 */ - dispatch->LightModeliv = trLightModeliv; /* 166 */ - dispatch->LineStipple = trLineStipple; /* 167 */ - dispatch->LineWidth = trLineWidth; /* 168 */ - dispatch->Materialf = trMaterialf; /* 169 */ - dispatch->Materialfv = trMaterialfv; /* 170 */ - dispatch->Materiali = trMateriali; /* 171 */ - dispatch->Materialiv = trMaterialiv; /* 172 */ - dispatch->PointSize = trPointSize; /* 173 */ - dispatch->PolygonMode = trPolygonMode; /* 174 */ - dispatch->PolygonStipple = trPolygonStipple; /* 175 */ - dispatch->Scissor = trScissor; /* 176 */ - dispatch->ShadeModel = trShadeModel; /* 177 */ - dispatch->TexParameterf = trTexParameterf; /* 178 */ - dispatch->TexParameterfv = trTexParameterfv; /* 179 */ - dispatch->TexParameteri = trTexParameteri; /* 180 */ - dispatch->TexParameteriv = trTexParameteriv; /* 181 */ - dispatch->TexImage1D = trTexImage1D; /* 182 */ - dispatch->TexImage2D = trTexImage2D; /* 183 */ - dispatch->TexEnvf = trTexEnvf; /* 184 */ - dispatch->TexEnvfv = trTexEnvfv; /* 185 */ - dispatch->TexEnvi = trTexEnvi; /* 186 */ - dispatch->TexEnviv = trTexEnviv; /* 187 */ - dispatch->TexGend = trTexGend; /* 188 */ - dispatch->TexGendv = trTexGendv; /* 189 */ - dispatch->TexGenf = trTexGenf; /* 190 */ - dispatch->TexGenfv = trTexGenfv; /* 191 */ - dispatch->TexGeni = trTexGeni; /* 192 */ - dispatch->TexGeniv = trTexGeniv; /* 193 */ - dispatch->FeedbackBuffer = trFeedbackBuffer; /* 194 */ - dispatch->SelectBuffer = trSelectBuffer; /* 195 */ - dispatch->RenderMode = trRenderMode; /* 196 */ - dispatch->InitNames = trInitNames; /* 197 */ - dispatch->LoadName = trLoadName; /* 198 */ - dispatch->PassThrough = trPassThrough; /* 199 */ - dispatch->PopName = trPopName; /* 200 */ - dispatch->PushName = trPushName; /* 201 */ - dispatch->DrawBuffer = trDrawBuffer; /* 202 */ - dispatch->Clear = trClear; /* 203 */ - dispatch->ClearAccum = trClearAccum; /* 204 */ - dispatch->ClearIndex = trClearIndex; /* 205 */ - dispatch->ClearColor = trClearColor; /* 206 */ - dispatch->ClearStencil = trClearStencil; /* 207 */ - dispatch->ClearDepth = trClearDepth; /* 208 */ - dispatch->StencilMask = trStencilMask; /* 209 */ - dispatch->ColorMask = trColorMask; /* 210 */ - dispatch->DepthMask = trDepthMask; /* 211 */ - dispatch->IndexMask = trIndexMask; /* 212 */ - dispatch->Accum = trAccum; /* 213 */ - dispatch->Disable = trDisable; /* 214 */ - dispatch->Enable = trEnable; /* 215 */ - dispatch->Finish = trFinish; /* 216 */ - dispatch->Flush = trFlush; /* 217 */ - dispatch->PopAttrib = trPopAttrib; /* 218 */ - dispatch->PushAttrib = trPushAttrib; /* 219 */ - dispatch->Map1d = trMap1d; /* 220 */ - dispatch->Map1f = trMap1f; /* 221 */ - dispatch->Map2d = trMap2d; /* 222 */ - dispatch->Map2f = trMap2f; /* 223 */ - dispatch->MapGrid1d = trMapGrid1d; /* 224 */ - dispatch->MapGrid1f = trMapGrid1f; /* 225 */ - dispatch->MapGrid2d = trMapGrid2d; /* 226 */ - dispatch->MapGrid2f = trMapGrid2f; /* 227 */ - dispatch->EvalCoord1d = trEvalCoord1d; /* 228 */ - dispatch->EvalCoord1dv = trEvalCoord1dv; /* 229 */ - dispatch->EvalCoord1f = trEvalCoord1f; /* 230 */ - dispatch->EvalCoord1fv = trEvalCoord1fv; /* 231 */ - dispatch->EvalCoord2d = trEvalCoord2d; /* 232 */ - dispatch->EvalCoord2dv = trEvalCoord2dv; /* 233 */ - dispatch->EvalCoord2f = trEvalCoord2f; /* 234 */ - dispatch->EvalCoord2fv = trEvalCoord2fv; /* 235 */ - dispatch->EvalMesh1 = trEvalMesh1; /* 236 */ - dispatch->EvalPoint1 = trEvalPoint1; /* 237 */ - dispatch->EvalMesh2 = trEvalMesh2; /* 238 */ - dispatch->EvalPoint2 = trEvalPoint2; /* 239 */ - dispatch->AlphaFunc = trAlphaFunc; /* 240 */ - dispatch->BlendFunc = trBlendFunc; /* 241 */ - dispatch->LogicOp = trLogicOp; /* 242 */ - dispatch->StencilFunc = trStencilFunc; /* 243 */ - dispatch->StencilOp = trStencilOp; /* 244 */ - dispatch->DepthFunc = trDepthFunc; /* 245 */ - dispatch->PixelZoom = trPixelZoom; /* 246 */ - dispatch->PixelTransferf = trPixelTransferf; /* 247 */ - dispatch->PixelTransferi = trPixelTransferi; /* 248 */ - dispatch->PixelStoref = trPixelStoref; /* 249 */ - dispatch->PixelStorei = trPixelStorei; /* 250 */ - dispatch->PixelMapfv = trPixelMapfv; /* 251 */ - dispatch->PixelMapuiv = trPixelMapuiv; /* 252 */ - dispatch->PixelMapusv = trPixelMapusv; /* 253 */ - dispatch->ReadBuffer = trReadBuffer; /* 254 */ - dispatch->CopyPixels = trCopyPixels; /* 255 */ - dispatch->ReadPixels = trReadPixels; /* 256 */ - dispatch->DrawPixels = trDrawPixels; /* 257 */ - dispatch->GetBooleanv = trGetBooleanv; /* 258 */ - dispatch->GetClipPlane = trGetClipPlane; /* 259 */ - dispatch->GetDoublev = trGetDoublev; /* 260 */ - dispatch->GetError = trGetError; /* 261 */ - dispatch->GetFloatv = trGetFloatv; /* 262 */ - dispatch->GetIntegerv = trGetIntegerv; /* 263 */ - dispatch->GetLightfv = trGetLightfv; /* 264 */ - dispatch->GetLightiv = trGetLightiv; /* 265 */ - dispatch->GetMapdv = trGetMapdv; /* 266 */ - dispatch->GetMapfv = trGetMapfv; /* 267 */ - dispatch->GetMapiv = trGetMapiv; /* 268 */ - dispatch->GetMaterialfv = trGetMaterialfv; /* 269 */ - dispatch->GetMaterialiv = trGetMaterialiv; /* 270 */ - dispatch->GetPixelMapfv = trGetPixelMapfv; /* 271 */ - dispatch->GetPixelMapuiv = trGetPixelMapuiv; /* 272 */ - dispatch->GetPixelMapusv = trGetPixelMapusv; /* 273 */ - dispatch->GetPolygonStipple = trGetPolygonStipple; /* 274 */ - dispatch->GetString = trGetString; /* 275 */ - dispatch->GetTexEnvfv = trGetTexEnvfv; /* 276 */ - dispatch->GetTexEnviv = trGetTexEnviv; /* 277 */ - dispatch->GetTexGendv = trGetTexGendv; /* 278 */ - dispatch->GetTexGenfv = trGetTexGenfv; /* 279 */ - dispatch->GetTexGeniv = trGetTexGeniv; /* 280 */ - dispatch->GetTexImage = trGetTexImage; /* 281 */ - dispatch->GetTexParameterfv = trGetTexParameterfv; /* 282 */ - dispatch->GetTexParameteriv = trGetTexParameteriv; /* 283 */ - dispatch->GetTexLevelParameterfv = trGetTexLevelParameterfv; /* 284 */ - dispatch->GetTexLevelParameteriv = trGetTexLevelParameteriv; /* 285 */ - dispatch->IsEnabled = trIsEnabled; /* 286 */ - dispatch->IsList = trIsList; /* 287 */ - dispatch->DepthRange = trDepthRange; /* 288 */ - dispatch->Frustum = trFrustum; /* 289 */ - dispatch->LoadIdentity = trLoadIdentity; /* 290 */ - dispatch->LoadMatrixf = trLoadMatrixf; /* 291 */ - dispatch->LoadMatrixd = trLoadMatrixd; /* 292 */ - dispatch->MatrixMode = trMatrixMode; /* 293 */ - dispatch->MultMatrixf = trMultMatrixf; /* 294 */ - dispatch->MultMatrixd = trMultMatrixd; /* 295 */ - dispatch->Ortho = trOrtho; /* 296 */ - dispatch->PopMatrix = trPopMatrix; /* 297 */ - dispatch->PushMatrix = trPushMatrix; /* 298 */ - dispatch->Rotated = trRotated; /* 299 */ - dispatch->Rotatef = trRotatef; /* 300 */ - dispatch->Scaled = trScaled; /* 301 */ - dispatch->Scalef = trScalef; /* 302 */ - dispatch->Translated = trTranslated; /* 303 */ - dispatch->Translatef = trTranslatef; /* 304 */ - dispatch->Viewport = trViewport; /* 305 */ - dispatch->ArrayElement = trArrayElement; /* 306 */ - dispatch->BindTexture = trBindTexture; /* 307 */ - dispatch->ColorPointer = trColorPointer; /* 308 */ - dispatch->DisableClientState = trDisableClientState; /* 309 */ - dispatch->DrawArrays = trDrawArrays; /* 310 */ - dispatch->DrawElements = trDrawElements; /* 311 */ - dispatch->EdgeFlagPointer = trEdgeFlagPointer; /* 312 */ - dispatch->EnableClientState = trEnableClientState; /* 313 */ - dispatch->IndexPointer = trIndexPointer; /* 314 */ - dispatch->Indexub = trIndexub; /* 315 */ - dispatch->Indexubv = trIndexubv; /* 316 */ - dispatch->InterleavedArrays = trInterleavedArrays; /* 317 */ - dispatch->NormalPointer = trNormalPointer; /* 318 */ - dispatch->PolygonOffset = trPolygonOffset; /* 319 */ - dispatch->TexCoordPointer = trTexCoordPointer; /* 320 */ - dispatch->VertexPointer = trVertexPointer; /* 321 */ - dispatch->AreTexturesResident = trAreTexturesResident; /* 322 */ - dispatch->CopyTexImage1D = trCopyTexImage1D; /* 323 */ - dispatch->CopyTexImage2D = trCopyTexImage2D; /* 324 */ - dispatch->CopyTexSubImage1D = trCopyTexSubImage1D; /* 325 */ - dispatch->CopyTexSubImage2D = trCopyTexSubImage2D; /* 326 */ - dispatch->DeleteTextures = trDeleteTextures; /* 327 */ - dispatch->GenTextures = trGenTextures; /* 328 */ - dispatch->GetPointerv = trGetPointerv; /* 329 */ - dispatch->IsTexture = trIsTexture; /* 330 */ - dispatch->PrioritizeTextures = trPrioritizeTextures; /* 331 */ - dispatch->TexSubImage1D = trTexSubImage1D; /* 332 */ - dispatch->TexSubImage2D = trTexSubImage2D; /* 333 */ - dispatch->PopClientAttrib = trPopClientAttrib; /* 334 */ - dispatch->PushClientAttrib = trPushClientAttrib; /* 335 */ -#if 1 - dispatch->BlendColor = trBlendColor; /* 336 */ - dispatch->BlendEquation = trBlendEquation; /* 337 */ - dispatch->DrawRangeElements = trDrawRangeElements; /* 338 */ - dispatch->ColorTable = trColorTable; /* 339 */ - dispatch->ColorTableParameterfv = trColorTableParameterfv; /* 340 */ - dispatch->ColorTableParameteriv = trColorTableParameteriv; /* 341 */ - dispatch->CopyColorTable = trCopyColorTable; /* 342 */ - dispatch->GetColorTable = trGetColorTable; /* 343 */ - dispatch->GetColorTableParameterfv = trGetColorTableParameterfv; /* 344 */ - dispatch->GetColorTableParameteriv = trGetColorTableParameteriv; /* 345 */ - dispatch->ColorSubTable = trColorSubTable; /* 346 */ - dispatch->CopyColorSubTable = trCopyColorSubTable; /* 347 */ - dispatch->ConvolutionFilter1D = trConvolutionFilter1D; /* 348 */ - dispatch->ConvolutionFilter2D = trConvolutionFilter2D; /* 349 */ - dispatch->ConvolutionParameterf = trConvolutionParameterf; /* 350 */ - dispatch->ConvolutionParameterfv = trConvolutionParameterfv; /* 351 */ - dispatch->ConvolutionParameteri = trConvolutionParameteri; /* 352 */ - dispatch->ConvolutionParameteriv = trConvolutionParameteriv; /* 353 */ - dispatch->CopyConvolutionFilter1D = trCopyConvolutionFilter1D; /* 354 */ - dispatch->CopyConvolutionFilter2D = trCopyConvolutionFilter2D; /* 355 */ - dispatch->GetConvolutionFilter = trGetConvolutionFilter; /* 356 */ - dispatch->GetConvolutionParameterfv = trGetConvolutionParameterfv;/* 357 */ - dispatch->GetConvolutionParameteriv = trGetConvolutionParameteriv;/* 358 */ - dispatch->GetSeparableFilter = trGetSeparableFilter; /* 359 */ - dispatch->SeparableFilter2D = trSeparableFilter2D; /* 360 */ - dispatch->GetHistogram = trGetHistogram; /* 361 */ - dispatch->GetHistogramParameterfv = trGetHistogramParameterfv; /* 362 */ - dispatch->GetHistogramParameteriv = trGetHistogramParameteriv; /* 363 */ - dispatch->GetMinmax = trGetMinmax; /* 364 */ - dispatch->GetMinmaxParameterfv = trGetMinmaxParameterfv; /* 365 */ - dispatch->GetMinmaxParameteriv = trGetMinmaxParameteriv; /* 366 */ -#endif -#if 0 - dispatch->Histogram = trHistogram /* 367 */ - dispatch->Minmax = trMinmax /* 368 */ - dispatch->ResetHistogram = trResetHistogram /* 369 */ - dispatch->ResetMinmax = trResetMinmax /* 370 */ - dispatch->TexImage3D = trTexImage3D /* 371 */ - dispatch->TexSubImage3D = trTexSubImage3D /* 372 */ - dispatch->CopyTexSubImage3D = trCopyTexSubImage3D /* 373 */ - dispatch->ActiveTextureARB = trActiveTextureARB /* 374 */ - dispatch->ClientActiveTextureARB = trClientActiveTextureARB /* 375 */ - dispatch->MultiTexCoord1dARB = trMultiTexCoord1dARB /* 376 */ - dispatch->MultiTexCoord1dvARB = trMultiTexCoord1dvARB /* 377 */ - dispatch->MultiTexCoord1fARB = trMultiTexCoord1fARB /* 378 */ - dispatch->MultiTexCoord1fvARB = trMultiTexCoord1fvARB /* 379 */ - dispatch->MultiTexCoord1iARB = trMultiTexCoord1iARB /* 380 */ - dispatch->MultiTexCoord1ivARB = trMultiTexCoord1ivARB /* 381 */ - dispatch->MultiTexCoord1sARB = trMultiTexCoord1sARB /* 382 */ - dispatch->MultiTexCoord1svARB = trMultiTexCoord1svARB /* 383 */ - dispatch->MultiTexCoord2dARB = trMultiTexCoord2dARB /* 384 */ - dispatch->MultiTexCoord2dvARB = trMultiTexCoord2dvARB /* 385 */ - dispatch->MultiTexCoord2fARB = trMultiTexCoord2fARB /* 386 */ - dispatch->MultiTexCoord2fvARB = trMultiTexCoord2fvARB /* 387 */ - dispatch->MultiTexCoord2iARB = trMultiTexCoord2iARB /* 388 */ - dispatch->MultiTexCoord2ivARB = trMultiTexCoord2ivARB /* 389 */ - dispatch->MultiTexCoord2sARB = trMultiTexCoord2sARB /* 390 */ - dispatch->MultiTexCoord2svARB = trMultiTexCoord2svARB /* 391 */ - dispatch->MultiTexCoord3dARB = trMultiTexCoord3dARB /* 392 */ - dispatch->MultiTexCoord3dvARB = trMultiTexCoord3dvARB /* 393 */ - dispatch->MultiTexCoord3fARB = trMultiTexCoord3fARB /* 394 */ - dispatch->MultiTexCoord3fvARB = trMultiTexCoord3fvARB /* 395 */ - dispatch->MultiTexCoord3iARB = trMultiTexCoord3iARB /* 396 */ - dispatch->MultiTexCoord3ivARB = trMultiTexCoord3ivARB /* 397 */ - dispatch->MultiTexCoord3sARB = trMultiTexCoord3sARB /* 398 */ - dispatch->MultiTexCoord3svARB = trMultiTexCoord3svARB /* 399 */ - dispatch->MultiTexCoord4dARB = trMultiTexCoord4dARB /* 400 */ - dispatch->MultiTexCoord4dvARB = trMultiTexCoord4dvARB /* 401 */ - dispatch->MultiTexCoord4fARB = trMultiTexCoord4fARB /* 402 */ - dispatch->MultiTexCoord4fvARB = trMultiTexCoord4fvARB /* 403 */ - dispatch->MultiTexCoord4iARB = trMultiTexCoord4iARB /* 404 */ - dispatch->MultiTexCoord4ivARB = trMultiTexCoord4ivARB /* 405 */ - dispatch->MultiTexCoord4sARB = trMultiTexCoord4sARB /* 406 */ - dispatch->MultiTexCoord4svARB = trMultiTexCoord4svARB /* 407 */ - dispatch->LoadTransposeMatrixfARB = trLoadTransposeMatrixfARB /* 408 */ - dispatch->LoadTransposeMatrixdARB = trLoadTransposeMatrixdARB /* 409 */ - dispatch->MultTransposeMatrixfARB = trMultTransposeMatrixfARB /* 410 */ - dispatch->MultTransposeMatrixdARB = trMultTransposeMatrixdARB /* 411 */ - dispatch->SampleCoverageARB = trSampleCoverageARB /* 412 */ - dispatch->SamplePassARB = trSamplePassARB /* 413 */ - dispatch->PolygonOffsetEXT = trPolygonOffsetEXT /* 414 */ - dispatch->GetTexFilterFuncSGIS = trGetTexFilterFuncSGIS /* 415 */ - dispatch->TexFilterFuncSGIS = trTexFilterFuncSGIS /* 416 */ - dispatch->GetHistogramEXT = trGetHistogramEXT /* 417 */ - dispatch->GetHistogramParameterfvEXT = trGetHistogramParameterfvEXT /* 418 */ - dispatch->GetHistogramParameterivEXT = trGetHistogramParameterivEXT /* 419 */ - dispatch->GetMinmaxEXT = trGetMinmaxEXT /* 420 */ - dispatch->GetMinmaxParameterfvEXT = trGetMinmaxParameterfvEXT /* 421 */ - dispatch->GetMinmaxParameterivEXT = trGetMinmaxParameterivEXT /* 422 */ - dispatch->GetConvolutionFilterEXT = trGetConvolutionFilterEXT /* 423 */ - dispatch->GetConvolutionParameterfvEXT = trGetConvolutionParameterfvEXT /* 424 */ - dispatch->GetConvolutionParameterivEXT = trGetConvolutionParameterivEXT /* 425 */ - dispatch->GetSeparableFilterEXT = trGetSeparableFilterEXT /* 426 */ - dispatch->GetColorTableSGI = trGetColorTableSGI /* 427 */ - dispatch->GetColorTableParameterfvSGI = trGetColorTableParameterfvSGI /* 428 */ - dispatch->GetColorTableParameterivSGI = trGetColorTableParameterivSGI /* 429 */ - dispatch->PixelTexGenSGIX = trPixelTexGenSGIX /* 430 */ - dispatch->PixelTexGenParameteriSGIS = trPixelTexGenParameteriSGIS /* 431 */ - dispatch->PixelTexGenParameterivSGIS = trPixelTexGenParameterivSGIS /* 432 */ - dispatch->PixelTexGenParameterfSGIS = trPixelTexGenParameterfSGIS /* 433 */ - dispatch->PixelTexGenParameterfvSGIS = trPixelTexGenParameterfvSGIS /* 434 */ - dispatch->GetPixelTexGenParameterivSGIS = trGetPixelTexGenParameterivSGIS /* 435 */ - dispatch->GetPixelTexGenParameterfvSGIS = trGetPixelTexGenParameterfvSGIS /* 436 */ - dispatch->TexImage4DSGIS = trTexImage4DSGIS /* 437 */ - dispatch->TexSubImage4DSGIS = trTexSubImage4DSGIS /* 438 */ - dispatch->AreTexturesResidentEXT = trAreTexturesResidentEXT /* 439 */ - dispatch->GenTexturesEXT = trGenTexturesEXT /* 440 */ - dispatch->IsTextureEXT = trIsTextureEXT /* 441 */ - dispatch->DetailTexFuncSGIS = trDetailTexFuncSGIS /* 442 */ - dispatch->GetDetailTexFuncSGIS = trGetDetailTexFuncSGIS /* 443 */ - dispatch->SharpenTexFuncSGIS = trSharpenTexFuncSGIS /* 444 */ - dispatch->GetSharpenTexFuncSGIS = trGetSharpenTexFuncSGIS /* 445 */ - dispatch->SampleMaskSGIS = trSampleMaskSGIS /* 446 */ - dispatch->SamplePatternSGIS = trSamplePatternSGIS /* 447 */ - dispatch->ColorPointerEXT = trColorPointerEXT /* 448 */ - dispatch->EdgeFlagPointerEXT = trEdgeFlagPointerEXT /* 449 */ - dispatch->IndexPointerEXT = trIndexPointerEXT /* 450 */ - dispatch->NormalPointerEXT = trNormalPointerEXT /* 451 */ - dispatch->TexCoordPointerEXT = trTexCoordPointerEXT /* 452 */ - dispatch->VertexPointerEXT = trVertexPointerEXT /* 453 */ - dispatch->SpriteParameterfSGIX = trSpriteParameterfSGIX /* 454 */ - dispatch->SpriteParameterfvSGIX = trSpriteParameterfvSGIX /* 455 */ - dispatch->SpriteParameteriSGIX = trSpriteParameteriSGIX /* 456 */ - dispatch->SpriteParameterivSGIX = trSpriteParameterivSGIX /* 457 */ - dispatch->PointParameterfEXT = trPointParameterfEXT /* 458 */ - dispatch->PointParameterfvEXT = trPointParameterfvEXT /* 459 */ - dispatch->GetInstrumentsSGIX = trGetInstrumentsSGIX /* 460 */ - dispatch->InstrumentsBufferSGIX = trInstrumentsBufferSGIX /* 461 */ - dispatch->PollInstrumentsSGIX = trPollInstrumentsSGIX /* 462 */ - dispatch->ReadInstrumentsSGIX = trReadInstrumentsSGIX /* 463 */ - dispatch->StartInstrumentsSGIX = trStartInstrumentsSGIX /* 464 */ - dispatch->StopInstrumentsSGIX = trStopInstrumentsSGIX /* 465 */ - dispatch->FrameZoomSGIX = trFrameZoomSGIX /* 466 */ - dispatch->TagSampleBufferSGIX = trTagSampleBufferSGIX /* 467 */ - dispatch->ReferencePlaneSGIX = trReferencePlaneSGIX /* 468 */ - dispatch->FlushRasterSGIX = trFlushRasterSGIX /* 469 */ - dispatch->GetListParameterfvSGIX = trGetListParameterfvSGIX /* 470 */ - dispatch->GetListParameterivSGIX = trGetListParameterivSGIX /* 471 */ - dispatch->ListParameterfSGIX = trListParameterfSGIX /* 472 */ - dispatch->ListParameterfvSGIX = trListParameterfvSGIX /* 473 */ - dispatch->ListParameteriSGIX = trListParameteriSGIX /* 474 */ - dispatch->ListParameterivSGIX = trListParameterivSGIX /* 475 */ - dispatch->FragmentColorMaterialSGIX = trFragmentColorMaterialSGIX /* 476 */ - dispatch->FragmentLightfSGIX = trFragmentLightfSGIX /* 477 */ - dispatch->FragmentLightfvSGIX = trFragmentLightfvSGIX /* 478 */ - dispatch->FragmentLightiSGIX = trFragmentLightiSGIX /* 479 */ - dispatch->FragmentLightivSGIX = trFragmentLightivSGIX /* 480 */ - dispatch->FragmentLightModelfSGIX = trFragmentLightModelfSGIX /* 481 */ - dispatch->FragmentLightModelfvSGIX = trFragmentLightModelfvSGIX /* 482 */ - dispatch->FragmentLightModeliSGIX = trFragmentLightModeliSGIX /* 483 */ - dispatch->FragmentLightModelivSGIX = trFragmentLightModelivSGIX /* 484 */ - dispatch->FragmentMaterialfSGIX = trFragmentMaterialfSGIX /* 485 */ - dispatch->FragmentMaterialfvSGIX = trFragmentMaterialfvSGIX /* 486 */ - dispatch->FragmentMaterialiSGIX = trFragmentMaterialiSGIX /* 487 */ - dispatch->FragmentMaterialivSGIX = trFragmentMaterialivSGIX /* 488 */ - dispatch->GetFragmentLightfvSGIX = trGetFragmentLightfvSGIX /* 489 */ - dispatch->GetFragmentLightivSGIX = trGetFragmentLightivSGIX /* 490 */ - dispatch->GetFragmentMaterialfvSGIX = trGetFragmentMaterialfvSGIX /* 491 */ - dispatch->GetFragmentMaterialivSGIX = trGetFragmentMaterialivSGIX /* 492 */ - dispatch->LightEnviSGIX = trLightEnviSGIX /* 493 */ - dispatch->VertexWeightfEXT = trVertexWeightfEXT /* 494 */ - dispatch->VertexWeightfvEXT = trVertexWeightfvEXT /* 495 */ - dispatch->VertexWeightPointerEXT = trVertexWeightPointerEXT /* 496 */ - dispatch->FlushVertexArrayRangeNV = trFlushVertexArrayRangeNV /* 497 */ - dispatch->VertexArrayRangeNV = trVertexArrayRangeNV /* 498 */ - dispatch->CombinerParameterfvNV = trCombinerParameterfvNV /* 499 */ - dispatch->CombinerParameterfNV = trCombinerParameterfNV /* 500 */ - dispatch->CombinerParameterivNV = trCombinerParameterivNV /* 501 */ - dispatch->CombinerParameteriNV = trCombinerParameteriNV /* 502 */ - dispatch->CombinerInputNV = trCombinerInputNV /* 503 */ - dispatch->CombinerOutputNV = trCombinerOutputNV /* 504 */ - dispatch->FinalCombinerInputNV = trFinalCombinerInputNV /* 505 */ - dispatch->GetCombinerInputParameterfvNV = trGetCombinerInputParameterfvNV /* 506 */ - dispatch->GetCombinerInputParameterivNV = trGetCombinerInputParameterivNV /* 507 */ - dispatch->GetCombinerOutputParameterfvNV = trGetCombinerOutputParameterfvNV /* 508 */ - dispatch->GetCombinerOutputParameterivNV = trGetCombinerOutputParameterivNV /* 509 */ - dispatch->GetFinalCombinerInputParameterfvNV = trGetFinalCombinerInputParameterfvNV /* 510 */ - dispatch->GetFinalCombinerInputParameterivNV = trGetFinalCombinerInputParameterivNV /* 511 */ - dispatch->ResizeBuffersMESA = trResizeBuffersMESA /* 512 */ - dispatch->WindowPos2dMESA = trWindowPos2dMESA /* 513 */ - dispatch->WindowPos2dvMESA = trWindowPos2dvMESA /* 514 */ - dispatch->WindowPos2fMESA = trWindowPos2fMESA /* 515 */ - dispatch->WindowPos2fvMESA = trWindowPos2fvMESA /* 516 */ - dispatch->WindowPos2iMESA = trWindowPos2iMESA /* 517 */ - dispatch->WindowPos2ivMESA = trWindowPos2ivMESA /* 518 */ - dispatch->WindowPos2sMESA = trWindowPos2sMESA /* 519 */ - dispatch->WindowPos2svMESA = trWindowPos2svMESA /* 520 */ - dispatch->WindowPos3dMESA = trWindowPos3dMESA /* 521 */ - dispatch->WindowPos3dvMESA = trWindowPos3dvMESA /* 522 */ - dispatch->WindowPos3fMESA = trWindowPos3fMESA /* 523 */ - dispatch->WindowPos3fvMESA = trWindowPos3fvMESA /* 524 */ - dispatch->WindowPos3iMESA = trWindowPos3iMESA /* 525 */ - dispatch->WindowPos3ivMESA = trWindowPos3ivMESA /* 526 */ - dispatch->WindowPos3sMESA = trWindowPos3sMESA /* 527 */ - dispatch->WindowPos3svMESA = trWindowPos3svMESA /* 528 */ - dispatch->WindowPos4dMESA = trWindowPos4dMESA /* 529 */ - dispatch->WindowPos4dvMESA = trWindowPos4dvMESA /* 530 */ - dispatch->WindowPos4fMESA = trWindowPos4fMESA /* 531 */ - dispatch->WindowPos4fvMESA = trWindowPos4fvMESA /* 532 */ - dispatch->WindowPos4iMESA = trWindowPos4iMESA /* 533 */ - dispatch->WindowPos4ivMESA = trWindowPos4ivMESA /* 534 */ - dispatch->WindowPos4sMESA = trWindowPos4sMESA /* 535 */ - dispatch->WindowPos4svMESA = trWindowPos4svMESA /* 536 */ - dispatch->BlendFuncSeparateEXT = trBlendFuncSeparateEXT /* 537 */ - dispatch->IndexMaterialEXT = trIndexMaterialEXT /* 538 */ - dispatch->IndexFuncEXT = trIndexFuncEXT /* 539 */ - dispatch->LockArraysEXT = trLockArraysEXT /* 540 */ - dispatch->UnlockArraysEXT = trUnlockArraysEXT /* 541 */ - dispatch->CullParameterdvEXT = trCullParameterdvEXT /* 542 */ - dispatch->CullParameterfvEXT = trCullParameterfvEXT /* 543 */ - dispatch->HintPGI = trHintPGI /* 544 */ - dispatch->FogCoordfEXT = trFogCoordfEXT /* 545 */ - dispatch->FogCoordfvEXT = trFogCoordfvEXT /* 546 */ - dispatch->FogCoorddEXT = trFogCoorddEXT /* 547 */ - dispatch->FogCoorddvEXT = trFogCoorddvEXT /* 548 */ - dispatch->FogCoordPointerEXT = trFogCoordPointerEXT /* 549 */ - dispatch->GetColorTableEXT = trGetColorTableEXT /* 550 */ - dispatch->GetColorTableParameterivEXT = trGetColorTableParameterivEXT /* 551 */ - dispatch->GetColorTableParameterfvEXT = trGetColorTableParameterfvEXT /* 552 */ -#endif -} - - -#else -extern void tr_wrapper_dummy_func(void); -void tr_wrapper_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_wrapper.h diff -u xc/extras/Mesa/src/Trace/tr_wrapper.h:1.3 xc/extras/Mesa/src/Trace/tr_wrapper.h:removed --- xc/extras/Mesa/src/Trace/tr_wrapper.h:1.3 Wed Dec 11 16:13:34 2002 +++ xc/extras/Mesa/src/Trace/tr_wrapper.h Wed Mar 16 21:00:47 2005 @@ -1,8 +0,0 @@ -#ifndef TR_WRAPPER_H -#define TR_WRAPPER_H - -#include "glapitable.h" - -void trInitDispatch( struct _glapi_table* dispatch ); - -#endif Index: xc/extras/Mesa/src/Trace/tr_write.c diff -u xc/extras/Mesa/src/Trace/tr_write.c:1.3 xc/extras/Mesa/src/Trace/tr_write.c:removed --- xc/extras/Mesa/src/Trace/tr_write.c:1.3 Wed Dec 11 16:13:34 2002 +++ xc/extras/Mesa/src/Trace/tr_write.c Wed Mar 16 21:00:47 2005 @@ -1,238 +0,0 @@ -#ifdef MESA_TRACE - -#include "glheader.h" -#include /* XXX move into glheader.h */ -#include "tr_write.h" -#include "tr_context.h" - -#define PATH_MAX 4098 - - -static void trWriteFile( const void * buf, GLint recsize, GLint numrecs, const char * funcname ) { - GLint recswritten; - - if( !(trCtx()->trDoPrint) ) { - return; - } - - recswritten = fwrite( buf, recsize, numrecs, trCtx()->logFP ); - if( recswritten != numrecs ) { - fprintf( stderr, "Error writing to file in %s\n", funcname ); - fprintf( stderr, "Perhaps the disk is full?\n" ); - /* Should we abort ? */ - trCtx()->trDoPrint = GL_FALSE; - } -} - - -static void (*trWrite)( const void *, GLint, GLint, const char *) = trWriteFile; - - -void trWriteCMD( GLint cmd ) { - trWrite( (void*)&cmd, sizeof(GLint), 1, "trWriteCMD" ); -} - -void trWriteb( GLbyte b ) { - trWrite( (void*)&b, sizeof(GLbyte), 1, "trWriteb" ); -} - -void trWrited( GLdouble d ) { - trWrite( (void*)&d, sizeof(GLdouble), 1, "trWrited" ); -} - -void trWriteClampd( GLclampd cd ) { - trWrite( (void*)&cd, sizeof(GLclampd), 1, "trWriteClampd" ); -} - -void trWritef( GLfloat f ) { - trWrite( (void*)&f, sizeof(GLfloat), 1, "trWritef" ); -} - -void trWriteClampf( GLclampf cf ) { - trWrite( (void*)&cf, sizeof(GLclampf), 1, "trWriteClampf" ); -} - -void trWritei( GLint i ) { - trWrite( (void*)&i, sizeof(GLint), 1, "trWritei" ); -} - -void trWrites( GLshort s ) { - trWrite( (void*)&s, sizeof(GLshort), 1, "trWrites" ); -} - -void trWriteub( GLubyte ub ) { - trWrite( (void*)&ub, sizeof(GLubyte), 1, "trWriteub" ); -} - -void trWriteui( GLuint ui ) { - trWrite( (void*)&ui, sizeof(GLuint), 1, "trWriteui" ); -} - -void trWriteus( GLushort us ) { - trWrite( (void*)&us, sizeof(GLushort), 1, "trWriteus" ); -} - -void trWriteBool( GLboolean b ) { - trWrite( (void*)&b, sizeof(GLboolean), 1, "trWriteBool" ); -} - -void trWriteBits( GLbitfield bf ) { - trWrite( (void*)&bf, sizeof(GLbitfield), 1, "trWriteBits" ); -} - -void trWriteEnum( GLenum en ) { - trWrite( (void*)&en, sizeof(GLenum), 1, "trWriteEnum" ); -} - -void trWriteSizei( GLsizei si ) { - trWrite( (void*)&si, sizeof(GLsizei), 1, "trWriteSizei" ); -} - - -void trWritePointer( const void * p ) { - trWrite( (void*)&p, sizeof(void *), 1, "trWritePointer" ); -} - - -void trWriteArrayb( GLsizei n, const GLbyte * b ) { - trWrite( (void *)b, sizeof(GLbyte), n, "trWriteArrayb" ); -} - - -void trWriteArrayub( GLsizei n, const GLubyte * ub ) { - trWrite( (void *)ub, sizeof(GLubyte), n, "trWriteArrayub" ); -} - - -void trWriteArrays( GLsizei n, const GLshort * s ) { - trWrite( (void *)s, sizeof(GLshort), n, "trWriteArrays" ); -} - - -void trWriteArrayus( GLsizei n, const GLushort * us ) { - trWrite( (void *)us, sizeof(GLushort), n, "trWriteArrayus" ); -} - - -void trWriteArrayi( GLsizei n, const GLint * i ) { - trWrite( (void *)i, sizeof(GLint), n, "trWriteArrayi" ); -} - - -void trWriteArrayui( GLsizei n, const GLuint * ui ) { - trWrite( (void *)ui, sizeof(GLuint), n, "trWriteArrayui" ); -} - - -void trWriteArrayBool( GLsizei n, const GLboolean * b ) { - trWrite( (void *)b, sizeof(GLboolean), n, "trWriteArrayBool" ); -} - - -void trWriteArrayf( GLsizei n, const GLfloat * f ) { - trWrite( (void *)f, sizeof(GLfloat), n, "trWriteArrayf" ); -} - - -void trWriteArrayd( GLsizei n, const GLdouble * d ) { - trWrite( (void *)d, sizeof(GLdouble), n, "trWriteArrayd" ); -} - - -void trWriteString( const char * str ) { - GLuint length = strlen(str); - trWriteui( length ); - trWrite( (void *)str, sizeof(GLubyte), length, "trWriteString" ); -} - - -void trFileFlush( void ) { - fflush( trCtx()->logFP ); -} - - -static void trWriteTypeInformation( void ) { - - trWriteub( sizeof(GLint) ); - trWriteub( sizeof(GLshort) ); - trWriteub( sizeof(GLfloat) ); - trWriteub( sizeof(GLdouble) ); - trWriteub( sizeof(GLboolean) ); - trWriteub( sizeof(GLenum) ); - trWriteub( sizeof(GLsizei) ); - trWriteub( sizeof(GLbitfield) ); - trWriteub( sizeof(GLclampf) ); - trWriteub( sizeof(GLclampd) ); - trWriteub( sizeof(GLvoid *) ); - -} - - -static void trWriteHeader( void ) { - struct tm *newtime; - time_t aclock; - char timestring[256]; - - trWriteString( "0.0.1" ); - trWriteString( trCtx()->traceName ); - trWritei( trCtx()->framecounter ); - - /* Always print this! */ - time( &aclock ); - newtime = localtime( &aclock ); - asctime( newtime ); - snprintf( timestring, sizeof(timestring), "Time: %s", asctime( newtime ) ); - trWriteString( timestring ); -} - - -static void trWriteGLState( void ) { - /* - * This function will write all the queryable GL state at - * the time the trace is started. - */ -} - - -void trOpenLogFile( void ) { - GLint numchars; - char buffer[PATH_MAX]; - - numchars = snprintf( buffer, sizeof(buffer), "%s-gl.log.%d", - trCtx()->traceName, trCtx()->framecounter ); - if( numchars > -1 && numchars < sizeof(buffer) ) { - trCtx()->logFP = fopen( buffer, "wb" ); - - /* This information is needed before we can extract _anything_ */ - trWriteTypeInformation(); - trWriteHeader(); - trWriteGLState(); - - (trCtx()->framecounter)++; - } else if( numchars > -1 ) { - fprintf( stderr, "buffer needs to be %d bytes long for logging to work.\n", - numchars + 1 ); - exit( -1 ); - } else { - fprintf( stderr, "buffer needs to grow for logging to work. Try %d bytes.\n", - sizeof(buffer) * 2 ); - exit( -1 ); - } -} - - -void trCloseLogFile( void ) { - if( trCtx()->logFP != NULL ) { - fclose(trCtx()->logFP); - } - - trCtx()->logFP = NULL; -} - - -#else -extern void tr_write_dummy_func(void); -void tr_write_dummy_func(void) -{ -} -#endif Index: xc/extras/Mesa/src/Trace/tr_write.h diff -u xc/extras/Mesa/src/Trace/tr_write.h:1.4 xc/extras/Mesa/src/Trace/tr_write.h:removed --- xc/extras/Mesa/src/Trace/tr_write.h:1.4 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/Trace/tr_write.h Wed Mar 16 21:00:47 2005 @@ -1,67 +0,0 @@ -/* This may look like C code, but it is really -*- C++ -*- */ - -/* - * DebugGL - * Version: 1.0 - * - * Copyright (C) 1999-2000 Loki Entertainment - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef __TR_WRITE_H -#define __TR_WRITE_H - -#include "GL/gl.h" - -void trWriteCMD( GLint opcode ); -void trWriteb( GLbyte byte ); -void trWriteub( GLubyte ub ); -void trWrited( GLdouble d ); -void trWritef( GLfloat f ); -void trWritei( GLint i ); -void trWriteui( GLuint ui ); -void trWrites( GLshort s ); -void trWriteus( GLushort us ); -void trWriteBool( GLboolean b ); -void trWriteBits( GLbitfield bf ); -void trWriteEnum( GLenum en ); -void trWriteSizei( GLsizei si ); -void trWriteClampf( GLclampf cf ); -void trWriteClampd( GLclampd cd ); -void trWritePointer( const void * p ); - -void trWriteArrayb( GLsizei n, const GLbyte * b ); -void trWriteArrayub( GLsizei n, const GLubyte * ub ); -void trWriteArrays( GLsizei n, const GLshort * s ); -void trWriteArrayus( GLsizei n, const GLushort * us ); -void trWriteArrayi( GLsizei n, const GLint * i ); -void trWriteArrayui( GLsizei n, const GLuint * ui ); -void trWriteArrayBool( GLsizei n, const GLboolean * b ); -void trWriteArrayf( GLsizei n, const GLfloat * f ); -void trWriteArrayd( GLsizei n, const GLdouble * d ); - -void trWriteString( const char * str ); - -void trFileFlush( void ); - -void trOpenLogFile( void ); -void trCloseLogFile( void ); - -#endif Index: xc/extras/Mesa/src/X/fakeglx.c diff -u xc/extras/Mesa/src/X/fakeglx.c:1.19 xc/extras/Mesa/src/X/fakeglx.c:removed --- xc/extras/Mesa/src/X/fakeglx.c:1.19 Wed Oct 22 11:27:44 2003 +++ xc/extras/Mesa/src/X/fakeglx.c Wed Mar 16 21:00:47 2005 @@ -1,2789 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X/fakeglx.c,v 1.19 2003/10/22 15:27:44 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This is an emulation of the GLX API which allows Mesa/GLX-based programs - * to run on X servers which do not have the real GLX extension. - * - * Thanks to the contributors: - * - * Initial version: Philip Brown (phil@bolthole.com) - * Better glXGetConfig() support: Armin Liebchen (liebchen@asylum.cs.utah.edu) - * Further visual-handling refinements: Wolfram Gloger - * (wmglo@Dent.MED.Uni-Muenchen.DE). - * - * Notes: - * Don't be fooled, stereo isn't supported yet. - */ - - - -#include "glxheader.h" -#include "glxapi.h" -#include "GL/xmesa.h" -#include "context.h" -#include "config.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" -#include "mtypes.h" -#include "xfonts.h" -#include "xmesaP.h" - - -/* This indicates the client-side GLX API and GLX encoder version. */ -#define CLIENT_MAJOR_VERSION 1 -#define CLIENT_MINOR_VERSION 4 /* but don't have 1.3's pbuffers, etc yet */ - -/* This indicates the server-side GLX decoder version. - * GLX 1.4 indicates OpenGL 1.3 support - */ -#define SERVER_MAJOR_VERSION 1 -#define SERVER_MINOR_VERSION 4 - -/* This is appended onto the glXGetClient/ServerString version strings. */ -#define MESA_GLX_VERSION "Mesa 5.0.2" - -/* Who implemented this GLX? */ -#define VENDOR "Brian Paul" - -#define EXTENSIONS \ - "GLX_MESA_set_3dfx_mode " \ - "GLX_MESA_copy_sub_buffer " \ - "GLX_MESA_pixmap_colormap " \ - "GLX_MESA_release_buffers " \ - "GLX_ARB_get_proc_address " \ - "GLX_EXT_visual_info " \ - "GLX_EXT_visual_rating " \ - "GLX_SGI_video_sync " \ - "GLX_SGIX_fbconfig " \ - "GLX_SGIX_pbuffer" - - -/* Silence compiler warnings */ -extern void Fake_glXDummyFunc( void ); -void Fake_glXDummyFunc( void ) -{ - (void) kernel8; - (void) DitherValues; - (void) HPCR_DRGB; - (void) kernel1; -} - - -/* - * Our fake GLX context will contain a "real" GLX context and an XMesa context. - * - * Note that a pointer to a __GLXcontext is a pointer to a fake_glx_context, - * and vice versa. - * - * We really just need this structure in order to make the libGL functions - * glXGetCurrentContext(), glXGetCurrentDrawable() and glXGetCurrentDisplay() - * work correctly. - */ -struct fake_glx_context { - __GLXcontext glxContext; /* this MUST be first! */ - XMesaContext xmesaContext; -}; - - - -/**********************************************************************/ -/*** GLX Visual Code ***/ -/**********************************************************************/ - -#define DONT_CARE -1 - - -#define MAX_VISUALS 100 -static XMesaVisual VisualTable[MAX_VISUALS]; -static int NumVisuals = 0; - - -/* - * This struct and some code fragments borrowed - * from Mark Kilgard's GLUT library. - */ -typedef struct _OverlayInfo { - /* Avoid 64-bit portability problems by being careful to use - longs due to the way XGetWindowProperty is specified. Note - that these parameters are passed as CARD32s over X - protocol. */ - unsigned long overlay_visual; - long transparent_type; - long value; - long layer; -} OverlayInfo; - - - -/* Macro to handle c_class vs class field name in XVisualInfo struct */ -#if defined(__cplusplus) || defined(c_plusplus) -#define CLASS c_class -#else -#define CLASS class -#endif - - - - -/* - * Test if the given XVisualInfo is usable for Mesa rendering. - */ -static GLboolean is_usable_visual( XVisualInfo *vinfo ) -{ - switch (vinfo->CLASS) { - case StaticGray: - case GrayScale: - /* Any StaticGray/GrayScale visual works in RGB or CI mode */ - return GL_TRUE; - case StaticColor: - case PseudoColor: - /* Any StaticColor/PseudoColor visual of at least 4 bits */ - if (vinfo->depth>=4) { - return GL_TRUE; - } - else { - return GL_FALSE; - } - case TrueColor: - case DirectColor: - /* Any depth of TrueColor or DirectColor works in RGB mode */ - return GL_TRUE; - default: - /* This should never happen */ - return GL_FALSE; - } -} - - - -/* - * Return the level (overlay, normal, underlay) of a given XVisualInfo. - * Input: dpy - the X display - * vinfo - the XVisualInfo to test - * Return: level of the visual: - * 0 = normal planes - * >0 = overlay planes - * <0 = underlay planes - */ -static int level_of_visual( Display *dpy, XVisualInfo *vinfo ) -{ - Atom overlayVisualsAtom; - OverlayInfo *overlay_info = NULL; - int numOverlaysPerScreen; - Status status; - Atom actualType; - int actualFormat; - unsigned long sizeData, bytesLeft; - int i; - - /* - * The SERVER_OVERLAY_VISUALS property on the root window contains - * a list of overlay visuals. Get that list now. - */ - overlayVisualsAtom = XInternAtom(dpy,"SERVER_OVERLAY_VISUALS", True); - if (overlayVisualsAtom == None) { - return 0; - } - - status = XGetWindowProperty(dpy, RootWindow( dpy, vinfo->screen ), - overlayVisualsAtom, 0L, (long) 10000, False, - overlayVisualsAtom, &actualType, &actualFormat, - &sizeData, &bytesLeft, - (unsigned char **) &overlay_info ); - - if (status != Success || actualType != overlayVisualsAtom || - actualFormat != 32 || sizeData < 4) { - /* something went wrong */ - XFree((void *) overlay_info); - return 0; - } - - /* search the overlay visual list for the visual ID of interest */ - numOverlaysPerScreen = (int) (sizeData / 4); - for (i=0;ioverlay_visual==vinfo->visualid) { - /* found the visual */ - if (/*ov->transparent_type==1 &&*/ ov->layer!=0) { - int level = ov->layer; - XFree((void *) overlay_info); - return level; - } - else { - XFree((void *) overlay_info); - return 0; - } - } - } - - /* The visual ID was not found in the overlay list. */ - XFree((void *) overlay_info); - return 0; -} - - - - -/* - * Given an XVisualInfo and RGB, Double, and Depth buffer flags, save the - * configuration in our list of GLX visuals. - */ -static XMesaVisual -save_glx_visual( Display *dpy, XVisualInfo *vinfo, - GLboolean rgbFlag, GLboolean alphaFlag, GLboolean dbFlag, - GLboolean stereoFlag, - GLint depth_size, GLint stencil_size, - GLint accumRedSize, GLint accumGreenSize, - GLint accumBlueSize, GLint accumAlphaSize, - GLint level ) -{ - GLboolean ximageFlag = GL_TRUE; - XMesaVisual xmvis; - GLint i; - GLboolean comparePointers; - - if (dbFlag) { - /* Check if the MESA_BACK_BUFFER env var is set */ - char *backbuffer = _mesa_getenv("MESA_BACK_BUFFER"); - if (backbuffer) { - if (backbuffer[0]=='p' || backbuffer[0]=='P') { - ximageFlag = GL_FALSE; - } - else if (backbuffer[0]=='x' || backbuffer[0]=='X') { - ximageFlag = GL_TRUE; - } - else { - _mesa_warning(NULL, "Mesa: invalid value for MESA_BACK_BUFFER environment variable, using an XImage."); - } - } - } - - /* Comparing IDs uses less memory but sometimes fails. */ - /* XXX revisit this after 3.0 is finished. */ - if (_mesa_getenv("MESA_GLX_VISUAL_HACK")) - comparePointers = GL_TRUE; - else - comparePointers = GL_FALSE; - - /* First check if a matching visual is already in the list */ - for (i=0; idisplay == dpy - && v->level == level - && v->ximage_flag == ximageFlag - && v->mesa_visual.rgbMode == rgbFlag - && v->mesa_visual.doubleBufferMode == dbFlag - && v->mesa_visual.stereoMode == stereoFlag - && (v->mesa_visual.alphaBits > 0) == alphaFlag - && (v->mesa_visual.depthBits >= depth_size || depth_size == 0) - && (v->mesa_visual.stencilBits >= stencil_size || stencil_size == 0) - && (v->mesa_visual.accumRedBits >= accumRedSize || accumRedSize == 0) - && (v->mesa_visual.accumGreenBits >= accumGreenSize || accumGreenSize == 0) - && (v->mesa_visual.accumBlueBits >= accumBlueSize || accumBlueSize == 0) - && (v->mesa_visual.accumAlphaBits >= accumAlphaSize || accumAlphaSize == 0)) { - /* now either compare XVisualInfo pointers or visual IDs */ - if ((!comparePointers && v->visinfo->visualid == vinfo->visualid) - || (comparePointers && v->vishandle == vinfo)) { - return v; - } - } - } - - /* Create a new visual and add it to the list. */ - - if (NumVisuals >= MAX_VISUALS) { - _mesa_problem(NULL, "GLX Error: maximum number of visuals exceeded"); - return NULL; - } - - xmvis = XMesaCreateVisual( dpy, vinfo, rgbFlag, alphaFlag, dbFlag, - stereoFlag, ximageFlag, - depth_size, stencil_size, - accumRedSize, accumBlueSize, - accumBlueSize, accumAlphaSize, 0, level, - GLX_NONE_EXT ); - if (xmvis) { - /* Save a copy of the pointer now so we can find this visual again - * if we need to search for it in find_glx_visual(). - */ - xmvis->vishandle = vinfo; - /* add xmvis to the list */ - VisualTable[NumVisuals] = xmvis; - NumVisuals++; - } - return xmvis; -} - - - -/* - * Create a GLX visual from a regular XVisualInfo. - * This is called when Fake GLX is given an XVisualInfo which wasn't - * returned by glXChooseVisual. Since this is the first time we're - * considering this visual we'll take a guess at reasonable values - * for depth buffer size, stencil size, accum size, etc. - * This is the best we can do with a client-side emulation of GLX. - */ -static XMesaVisual -create_glx_visual( Display *dpy, XVisualInfo *visinfo ) -{ - int vislevel; - - vislevel = level_of_visual( dpy, visinfo ); - if (vislevel) { - /* Configure this visual as a CI, single-buffered overlay */ - return save_glx_visual( dpy, visinfo, - GL_FALSE, /* rgb */ - GL_FALSE, /* alpha */ - GL_FALSE, /* double */ - GL_FALSE, /* stereo */ - 0, /* depth bits */ - 0, /* stencil bits */ - 0,0,0,0, /* accum bits */ - vislevel /* level */ - ); - } - else if (is_usable_visual( visinfo )) { - if (_mesa_getenv("MESA_GLX_FORCE_CI")) { - /* Configure this visual as a COLOR INDEX visual. */ - return save_glx_visual( dpy, visinfo, - GL_FALSE, /* rgb */ - GL_FALSE, /* alpha */ - GL_TRUE, /* double */ - GL_FALSE, /* stereo */ - DEFAULT_SOFTWARE_DEPTH_BITS, - 8 * sizeof(GLstencil), - 0 * sizeof(GLaccum), /* r */ - 0 * sizeof(GLaccum), /* g */ - 0 * sizeof(GLaccum), /* b */ - 0 * sizeof(GLaccum), /* a */ - 0 /* level */ - ); - } - else { - /* Configure this visual as RGB, double-buffered, depth-buffered. */ - /* This is surely wrong for some people's needs but what else */ - /* can be done? They should use glXChooseVisual(). */ - return save_glx_visual( dpy, visinfo, - GL_TRUE, /* rgb */ - GL_FALSE, /* alpha */ - GL_TRUE, /* double */ - GL_FALSE, /* stereo */ - DEFAULT_SOFTWARE_DEPTH_BITS, - 8 * sizeof(GLstencil), - 8 * sizeof(GLaccum), /* r */ - 8 * sizeof(GLaccum), /* g */ - 8 * sizeof(GLaccum), /* b */ - 8 * sizeof(GLaccum), /* a */ - 0 /* level */ - ); - } - } - else { - _mesa_warning(NULL, "Mesa: error in glXCreateContext: bad visual\n"); - return NULL; - } -} - - - -/* - * Find the GLX visual associated with an XVisualInfo. - */ -static XMesaVisual -find_glx_visual( Display *dpy, XVisualInfo *vinfo ) -{ - int i; - - /* try to match visual id */ - for (i=0;idisplay==dpy - && VisualTable[i]->visinfo->visualid == vinfo->visualid) { - return VisualTable[i]; - } - } - - /* if that fails, try to match pointers */ - for (i=0;idisplay==dpy && VisualTable[i]->vishandle==vinfo) { - return VisualTable[i]; - } - } - - return NULL; -} - - - -/* - * Return the transparent pixel value for a GLX visual. - * Input: glxvis - the glx_visual - * Return: a pixel value or -1 if no transparent pixel - */ -static int transparent_pixel( XMesaVisual glxvis ) -{ - Display *dpy = glxvis->display; - XVisualInfo *vinfo = glxvis->visinfo; - Atom overlayVisualsAtom; - OverlayInfo *overlay_info = NULL; - int numOverlaysPerScreen; - Status status; - Atom actualType; - int actualFormat; - unsigned long sizeData, bytesLeft; - int i; - - /* - * The SERVER_OVERLAY_VISUALS property on the root window contains - * a list of overlay visuals. Get that list now. - */ - overlayVisualsAtom = XInternAtom(dpy,"SERVER_OVERLAY_VISUALS", True); - if (overlayVisualsAtom == None) { - return -1; - } - - status = XGetWindowProperty(dpy, RootWindow( dpy, vinfo->screen ), - overlayVisualsAtom, 0L, (long) 10000, False, - overlayVisualsAtom, &actualType, &actualFormat, - &sizeData, &bytesLeft, - (unsigned char **) &overlay_info ); - - if (status != Success || actualType != overlayVisualsAtom || - actualFormat != 32 || sizeData < 4) { - /* something went wrong */ - XFree((void *) overlay_info); - return -1; - } - - /* search the overlay visual list for the visual ID of interest */ - numOverlaysPerScreen = (int) (sizeData / 4); - for (i=0;ioverlay_visual==vinfo->visualid) { - /* found it! */ - if (ov->transparent_type==0) { - /* type 0 indicates no transparency */ - XFree((void *) overlay_info); - return -1; - } - else { - /* ov->value is the transparent pixel */ - XFree((void *) overlay_info); - return ov->value; - } - } - } - - /* The visual ID was not found in the overlay list. */ - XFree((void *) overlay_info); - return -1; -} - - - -/* - * Try to get an X visual which matches the given arguments. - */ -static XVisualInfo *get_visual( Display *dpy, int scr, - unsigned int depth, int xclass ) -{ - XVisualInfo temp, *vis; - long mask; - int n; - unsigned int default_depth; - int default_class; - - mask = VisualScreenMask | VisualDepthMask | VisualClassMask; - temp.screen = scr; - temp.depth = depth; - temp.CLASS = xclass; - - default_depth = DefaultDepth(dpy,scr); - default_class = DefaultVisual(dpy,scr)->CLASS; - - if (depth==default_depth && xclass==default_class) { - /* try to get root window's visual */ - temp.visualid = DefaultVisual(dpy,scr)->visualid; - mask |= VisualIDMask; - } - - vis = XGetVisualInfo( dpy, mask, &temp, &n ); - - /* In case bits/pixel > 24, make sure color channels are still <=8 bits. - * An SGI Infinite Reality system, for example, can have 30bpp pixels: - * 10 bits per color channel. Mesa's limited to a max of 8 bits/channel. - */ - if (vis && depth > 24 && (xclass==TrueColor || xclass==DirectColor)) { - if (_mesa_bitcount((GLuint) vis->red_mask ) <= 8 && - _mesa_bitcount((GLuint) vis->green_mask) <= 8 && - _mesa_bitcount((GLuint) vis->blue_mask ) <= 8) { - return vis; - } - else { - XFree((void *) vis); - return NULL; - } - } - - return vis; -} - - - -/* - * Retrieve the value of the given environment variable and find - * the X visual which matches it. - * Input: dpy - the display - * screen - the screen number - * varname - the name of the environment variable - * Return: an XVisualInfo pointer to NULL if error. - */ -static XVisualInfo *get_env_visual(Display *dpy, int scr, const char *varname) -{ - char value[100], type[100]; - int depth, xclass = -1; - XVisualInfo *vis; - - if (!_mesa_getenv( varname )) { - return NULL; - } - - _mesa_strncpy( value, _mesa_getenv(varname), 100 ); - value[99] = 0; - - sscanf( value, "%s %d", type, &depth ); - - if (_mesa_strcmp(type,"TrueColor")==0) xclass = TrueColor; - else if (_mesa_strcmp(type,"DirectColor")==0) xclass = DirectColor; - else if (_mesa_strcmp(type,"PseudoColor")==0) xclass = PseudoColor; - else if (_mesa_strcmp(type,"StaticColor")==0) xclass = StaticColor; - else if (_mesa_strcmp(type,"GrayScale")==0) xclass = GrayScale; - else if (_mesa_strcmp(type,"StaticGray")==0) xclass = StaticGray; - - if (xclass>-1 && depth>0) { - vis = get_visual( dpy, scr, depth, xclass ); - if (vis) { - return vis; - } - } - - _mesa_warning(NULL, "GLX unable to find visual class=%s, depth=%d.", - type, depth); - - return NULL; -} - - - -/* - * Select an X visual which satisfies the RGBA/CI flag and minimum depth. - * Input: dpy, screen - X display and screen number - * rgba - GL_TRUE = RGBA mode, GL_FALSE = CI mode - * min_depth - minimum visual depth - * preferred_class - preferred GLX visual class or DONT_CARE - * Return: pointer to an XVisualInfo or NULL. - */ -static XVisualInfo *choose_x_visual( Display *dpy, int screen, - GLboolean rgba, int min_depth, - int preferred_class ) -{ - XVisualInfo *vis; - int xclass, visclass = 0; - int depth; - - if (rgba) { - Atom hp_cr_maps = XInternAtom(dpy, "_HP_RGB_SMOOTH_MAP_LIST", True); - /* First see if the MESA_RGB_VISUAL env var is defined */ - vis = get_env_visual( dpy, screen, "MESA_RGB_VISUAL" ); - if (vis) { - return vis; - } - /* Otherwise, search for a suitable visual */ - if (preferred_class==DONT_CARE) { - for (xclass=0;xclass<6;xclass++) { - switch (xclass) { - case 0: visclass = TrueColor; break; - case 1: visclass = DirectColor; break; - case 2: visclass = PseudoColor; break; - case 3: visclass = StaticColor; break; - case 4: visclass = GrayScale; break; - case 5: visclass = StaticGray; break; - } - if (min_depth==0) { - /* start with shallowest */ - for (depth=0;depth<=32;depth++) { - if (visclass==TrueColor && depth==8 && !hp_cr_maps) { - /* Special case: try to get 8-bit PseudoColor before */ - /* 8-bit TrueColor */ - vis = get_visual( dpy, screen, 8, PseudoColor ); - if (vis) { - return vis; - } - } - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - else { - /* start with deepest */ - for (depth=32;depth>=min_depth;depth--) { - if (visclass==TrueColor && depth==8 && !hp_cr_maps) { - /* Special case: try to get 8-bit PseudoColor before */ - /* 8-bit TrueColor */ - vis = get_visual( dpy, screen, 8, PseudoColor ); - if (vis) { - return vis; - } - } - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - } - } - else { - /* search for a specific visual class */ - switch (preferred_class) { - case GLX_TRUE_COLOR_EXT: visclass = TrueColor; break; - case GLX_DIRECT_COLOR_EXT: visclass = DirectColor; break; - case GLX_PSEUDO_COLOR_EXT: visclass = PseudoColor; break; - case GLX_STATIC_COLOR_EXT: visclass = StaticColor; break; - case GLX_GRAY_SCALE_EXT: visclass = GrayScale; break; - case GLX_STATIC_GRAY_EXT: visclass = StaticGray; break; - default: return NULL; - } - if (min_depth==0) { - /* start with shallowest */ - for (depth=0;depth<=32;depth++) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - else { - /* start with deepest */ - for (depth=32;depth>=min_depth;depth--) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - } - } - else { - /* First see if the MESA_CI_VISUAL env var is defined */ - vis = get_env_visual( dpy, screen, "MESA_CI_VISUAL" ); - if (vis) { - return vis; - } - /* Otherwise, search for a suitable visual, starting with shallowest */ - if (preferred_class==DONT_CARE) { - for (xclass=0;xclass<4;xclass++) { - switch (xclass) { - case 0: visclass = PseudoColor; break; - case 1: visclass = StaticColor; break; - case 2: visclass = GrayScale; break; - case 3: visclass = StaticGray; break; - } - /* try 8-bit up through 16-bit */ - for (depth=8;depth<=16;depth++) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - /* try min_depth up to 8-bit */ - for (depth=min_depth;depth<8;depth++) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - } - else { - /* search for a specific visual class */ - switch (preferred_class) { - case GLX_TRUE_COLOR_EXT: visclass = TrueColor; break; - case GLX_DIRECT_COLOR_EXT: visclass = DirectColor; break; - case GLX_PSEUDO_COLOR_EXT: visclass = PseudoColor; break; - case GLX_STATIC_COLOR_EXT: visclass = StaticColor; break; - case GLX_GRAY_SCALE_EXT: visclass = GrayScale; break; - case GLX_STATIC_GRAY_EXT: visclass = StaticGray; break; - default: return NULL; - } - /* try 8-bit up through 16-bit */ - for (depth=8;depth<=16;depth++) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - /* try min_depth up to 8-bit */ - for (depth=min_depth;depth<8;depth++) { - vis = get_visual( dpy, screen, depth, visclass ); - if (vis) { - return vis; - } - } - } - } - - /* didn't find a visual */ - return NULL; -} - - - -/* - * Find the deepest X over/underlay visual of at least min_depth. - * Input: dpy, screen - X display and screen number - * level - the over/underlay level - * trans_type - transparent pixel type: GLX_NONE_EXT, - * GLX_TRANSPARENT_RGB_EXT, GLX_TRANSPARENT_INDEX_EXT, - * or DONT_CARE - * trans_value - transparent pixel value or DONT_CARE - * min_depth - minimum visual depth - * preferred_class - preferred GLX visual class or DONT_CARE - * Return: pointer to an XVisualInfo or NULL. - */ -static XVisualInfo *choose_x_overlay_visual( Display *dpy, int scr, - GLboolean rgbFlag, - int level, int trans_type, - int trans_value, - int min_depth, - int preferred_class ) -{ - Atom overlayVisualsAtom; - OverlayInfo *overlay_info; - int numOverlaysPerScreen; - Status status; - Atom actualType; - int actualFormat; - unsigned long sizeData, bytesLeft; - int i; - XVisualInfo *deepvis; - int deepest; - - /*DEBUG int tt, tv; */ - - switch (preferred_class) { - case GLX_TRUE_COLOR_EXT: preferred_class = TrueColor; break; - case GLX_DIRECT_COLOR_EXT: preferred_class = DirectColor; break; - case GLX_PSEUDO_COLOR_EXT: preferred_class = PseudoColor; break; - case GLX_STATIC_COLOR_EXT: preferred_class = StaticColor; break; - case GLX_GRAY_SCALE_EXT: preferred_class = GrayScale; break; - case GLX_STATIC_GRAY_EXT: preferred_class = StaticGray; break; - default: preferred_class = DONT_CARE; - } - - /* - * The SERVER_OVERLAY_VISUALS property on the root window contains - * a list of overlay visuals. Get that list now. - */ - overlayVisualsAtom = XInternAtom(dpy,"SERVER_OVERLAY_VISUALS", True); - if (overlayVisualsAtom == (Atom) None) { - return NULL; - } - - status = XGetWindowProperty(dpy, RootWindow( dpy, scr ), - overlayVisualsAtom, 0L, (long) 10000, False, - overlayVisualsAtom, &actualType, &actualFormat, - &sizeData, &bytesLeft, - (unsigned char **) &overlay_info ); - - if (status != Success || actualType != overlayVisualsAtom || - actualFormat != 32 || sizeData < 4) { - /* something went wrong */ - return NULL; - } - - /* Search for the deepest overlay which satisifies all criteria. */ - deepest = min_depth; - deepvis = NULL; - - numOverlaysPerScreen = (int) (sizeData / 4); - for (i=0;ilayer!=level) { - /* failed overlay level criteria */ - continue; - } - if (!(trans_type==DONT_CARE - || (trans_type==GLX_TRANSPARENT_INDEX_EXT - && ov->transparent_type>0) - || (trans_type==GLX_NONE_EXT && ov->transparent_type==0))) { - /* failed transparent pixel type criteria */ - continue; - } - if (trans_value!=DONT_CARE && trans_value!=ov->value) { - /* failed transparent pixel value criteria */ - continue; - } - - /* get XVisualInfo and check the depth */ - vistemplate.visualid = ov->overlay_visual; - vistemplate.screen = scr; - vislist = XGetVisualInfo( dpy, VisualIDMask | VisualScreenMask, - &vistemplate, &count ); - - if (count!=1) { - /* something went wrong */ - continue; - } - if (preferred_class!=DONT_CARE && preferred_class!=vislist->CLASS) { - /* wrong visual class */ - continue; - } - - /* if RGB was requested, make sure we have True/DirectColor */ - if (rgbFlag && vislist->CLASS != TrueColor - && vislist->CLASS != DirectColor) - continue; - - /* if CI was requested, make sure we have a color indexed visual */ - if (!rgbFlag - && (vislist->CLASS == TrueColor || vislist->CLASS == DirectColor)) - continue; - - if (deepvis==NULL || vislist->depth > deepest) { - /* YES! found a satisfactory visual */ - if (deepvis) { - XFree( deepvis ); - } - deepest = vislist->depth; - deepvis = vislist; - /* DEBUG tt = ov->transparent_type;*/ - /* DEBUG tv = ov->value; */ - } - } - -/*DEBUG - if (deepvis) { - printf("chose 0x%x: layer=%d depth=%d trans_type=%d trans_value=%d\n", - deepvis->visualid, level, deepvis->depth, tt, tv ); - } -*/ - return deepvis; -} - - -/**********************************************************************/ -/*** Begin Fake GLX API Functions ***/ -/**********************************************************************/ - - -static XMesaVisual choose_visual( Display *dpy, int screen, const int *list ) -{ - const int *parselist; - XVisualInfo *vis; - int min_ci = 0; - int min_red=0, min_green=0, min_blue=0; - GLboolean rgb_flag = GL_FALSE; - GLboolean alpha_flag = GL_FALSE; - GLboolean double_flag = GL_FALSE; - GLboolean stereo_flag = GL_FALSE; - GLint depth_size = 0; - GLint stencil_size = 0; - GLint accumRedSize = 0; - GLint accumGreenSize = 0; - GLint accumBlueSize = 0; - GLint accumAlphaSize = 0; - int level = 0; - int visual_type = DONT_CARE; - int trans_type = DONT_CARE; - int trans_value = DONT_CARE; - GLint caveat = DONT_CARE; - XMesaVisual xmvis = NULL; - - parselist = list; - - while (*parselist) { - - switch (*parselist) { - case GLX_USE_GL: - /* ignore */ - parselist++; - break; - case GLX_BUFFER_SIZE: - parselist++; - min_ci = *parselist++; - break; - case GLX_LEVEL: - parselist++; - level = *parselist++; - break; - case GLX_RGBA: - rgb_flag = GL_TRUE; - parselist++; - break; - case GLX_DOUBLEBUFFER: - double_flag = GL_TRUE; - parselist++; - break; - case GLX_STEREO: - stereo_flag = GL_TRUE; - return NULL; - case GLX_AUX_BUFFERS: - /* ignore */ - parselist++; - parselist++; - break; - case GLX_RED_SIZE: - parselist++; - min_red = *parselist++; - break; - case GLX_GREEN_SIZE: - parselist++; - min_green = *parselist++; - break; - case GLX_BLUE_SIZE: - parselist++; - min_blue = *parselist++; - break; - case GLX_ALPHA_SIZE: - parselist++; - { - GLint size = *parselist++; - alpha_flag = size>0 ? 1 : 0; - } - break; - case GLX_DEPTH_SIZE: - parselist++; - depth_size = *parselist++; - break; - case GLX_STENCIL_SIZE: - parselist++; - stencil_size = *parselist++; - break; - case GLX_ACCUM_RED_SIZE: - parselist++; - { - GLint size = *parselist++; - accumRedSize = MAX2( accumRedSize, size ); - } - break; - case GLX_ACCUM_GREEN_SIZE: - parselist++; - { - GLint size = *parselist++; - accumGreenSize = MAX2( accumGreenSize, size ); - } - break; - case GLX_ACCUM_BLUE_SIZE: - parselist++; - { - GLint size = *parselist++; - accumBlueSize = MAX2( accumBlueSize, size ); - } - break; - case GLX_ACCUM_ALPHA_SIZE: - parselist++; - { - GLint size = *parselist++; - accumAlphaSize = MAX2( accumAlphaSize, size ); - } - break; - - /* - * GLX_EXT_visual_info extension - */ - case GLX_X_VISUAL_TYPE_EXT: - parselist++; - visual_type = *parselist++; - break; - case GLX_TRANSPARENT_TYPE_EXT: - parselist++; - trans_type = *parselist++; - break; - case GLX_TRANSPARENT_INDEX_VALUE_EXT: - parselist++; - trans_value = *parselist++; - break; - case GLX_TRANSPARENT_RED_VALUE_EXT: - case GLX_TRANSPARENT_GREEN_VALUE_EXT: - case GLX_TRANSPARENT_BLUE_VALUE_EXT: - case GLX_TRANSPARENT_ALPHA_VALUE_EXT: - /* ignore */ - parselist++; - parselist++; - break; - - /* - * GLX_EXT_visual_info extension - */ - case GLX_VISUAL_CAVEAT_EXT: - parselist++; - caveat = *parselist++; /* ignored for now */ - (void) caveat; - break; - - /* - * GLX_ARB_multisample - */ - case GLX_SAMPLE_BUFFERS_ARB: - /* ms not supported */ - return NULL; - case GLX_SAMPLES_ARB: - /* ms not supported */ - return NULL; - - /* - * FBConfig attribs. - */ - case GLX_RENDER_TYPE: - parselist++; - if (*parselist == GLX_RGBA_BIT) { - rgb_flag = GL_TRUE; - } - else if (*parselist == GLX_COLOR_INDEX_BIT) { - rgb_flag = GL_FALSE; - } - else if (*parselist == 0) { - rgb_flag = GL_TRUE; - } - parselist++; - break; - case GLX_DRAWABLE_TYPE: - parselist++; - if (*parselist & ~(GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT)) { - return NULL; /* bad bit */ - } - parselist++; - break; - - case None: - break; - - default: - /* undefined attribute */ - _mesa_warning(NULL, "unexpected attrib 0x%x in choose_visual()", - *parselist); - return NULL; - } - } - - /* - * Since we're only simulating the GLX extension this function will never - * find any real GL visuals. Instead, all we can do is try to find an RGB - * or CI visual of appropriate depth. Other requested attributes such as - * double buffering, depth buffer, etc. will be associated with the X - * visual and stored in the VisualTable[]. - */ - if (level==0) { - /* normal color planes */ - if (rgb_flag) { - /* Get an RGB visual */ - int min_rgb = min_red + min_green + min_blue; - if (min_rgb>1 && min_rgb<8) { - /* a special case to be sure we can get a monochrome visual */ - min_rgb = 1; - } - vis = choose_x_visual( dpy, screen, rgb_flag, min_rgb, visual_type ); - } - else { - /* Get a color index visual */ - vis = choose_x_visual( dpy, screen, rgb_flag, min_ci, visual_type ); - accumRedSize = accumGreenSize = accumBlueSize = accumAlphaSize = 0; - } - } - else { - /* over/underlay planes */ - if (rgb_flag) { - /* rgba overlay */ - int min_rgb = min_red + min_green + min_blue; - if (min_rgb>1 && min_rgb<8) { - /* a special case to be sure we can get a monochrome visual */ - min_rgb = 1; - } - vis = choose_x_overlay_visual( dpy, screen, rgb_flag, level, - trans_type, trans_value, min_rgb, visual_type ); - } - else { - /* color index overlay */ - vis = choose_x_overlay_visual( dpy, screen, rgb_flag, level, - trans_type, trans_value, min_ci, visual_type ); - } - } - - if (vis) { - /* Note: we're not exactly obeying the glXChooseVisual rules here. - * When GLX_DEPTH_SIZE = 1 is specified we're supposed to choose the - * largest depth buffer size, which is 32bits/value. Instead, we - * return 16 to maintain performance with earlier versions of Mesa. - */ - if (depth_size > 24) - depth_size = 31; /* 32 causes int overflow problems */ - else if (depth_size > 16) - depth_size = 24; - else if (depth_size > 0) - depth_size = DEFAULT_SOFTWARE_DEPTH_BITS; /*16*/ - - /* we only support one size of stencil and accum buffers. */ - if (stencil_size > 0) - stencil_size = STENCIL_BITS; - if (accumRedSize > 0 || accumGreenSize > 0 || accumBlueSize > 0 || - accumAlphaSize > 0) { - accumRedSize = ACCUM_BITS; - accumGreenSize = ACCUM_BITS; - accumBlueSize = ACCUM_BITS; - accumAlphaSize = alpha_flag ? ACCUM_BITS : 0; - } - - xmvis = save_glx_visual( dpy, vis, rgb_flag, alpha_flag, double_flag, - stereo_flag, depth_size, stencil_size, - accumRedSize, accumGreenSize, - accumBlueSize, accumAlphaSize, level ); - } - - return xmvis; -} - - -static XVisualInfo * -Fake_glXChooseVisual( Display *dpy, int screen, int *list ) -{ - XMesaVisual xmvis = choose_visual(dpy, screen, list); - if (xmvis) { -#if 0 - return xmvis->vishandle; -#else - /* create a new vishandle - the cached one may be stale */ - xmvis->vishandle = _mesa_malloc(sizeof(XVisualInfo)); - if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); - } - return xmvis->vishandle; -#endif - } - else - return NULL; -} - - -static GLXContext -Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo, - GLXContext share_list, Bool direct ) -{ - XMesaVisual xmvis; - struct fake_glx_context *glxCtx; - struct fake_glx_context *shareCtx = (struct fake_glx_context *) share_list; - - if (!dpy || !visinfo) - return 0; - - glxCtx = CALLOC_STRUCT(fake_glx_context); - if (!glxCtx) - return 0; - - /* deallocate unused windows/buffers */ - XMesaGarbageCollect(); - - xmvis = find_glx_visual( dpy, visinfo ); - if (!xmvis) { - /* This visual wasn't found with glXChooseVisual() */ - xmvis = create_glx_visual( dpy, visinfo ); - if (!xmvis) { - /* unusable visual */ - FREE(glxCtx); - return NULL; - } - } - - glxCtx->xmesaContext = XMesaCreateContext(xmvis, - shareCtx ? shareCtx->xmesaContext : NULL); - if (!glxCtx->xmesaContext) { - FREE(glxCtx); - return NULL; - } - - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); - - return (GLXContext) glxCtx; -} - - -/* XXX these may have to be removed due to thread-safety issues. */ -static GLXContext MakeCurrent_PrevContext = 0; -static GLXDrawable MakeCurrent_PrevDrawable = 0; -static GLXDrawable MakeCurrent_PrevReadable = 0; -static XMesaBuffer MakeCurrent_PrevDrawBuffer = 0; -static XMesaBuffer MakeCurrent_PrevReadBuffer = 0; - - -/* GLX 1.3 and later */ -static Bool -Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext ctx ) -{ - struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; - - if (ctx && draw && read) { - XMesaBuffer drawBuffer, readBuffer; - XMesaContext xmctx = glxCtx->xmesaContext; - - /* Find the XMesaBuffer which corresponds to the GLXDrawable 'draw' */ - if (ctx == MakeCurrent_PrevContext - && draw == MakeCurrent_PrevDrawable) { - drawBuffer = MakeCurrent_PrevDrawBuffer; - } - else { - drawBuffer = XMesaFindBuffer( dpy, draw ); - } - if (!drawBuffer) { - /* drawable must be a new window! */ - drawBuffer = XMesaCreateWindowBuffer2( xmctx->xm_visual, draw, xmctx); - if (!drawBuffer) { - /* Out of memory, or context/drawable depth mismatch */ - return False; - } - } - - /* Find the XMesaBuffer which corresponds to the GLXDrawable 'read' */ - if (ctx == MakeCurrent_PrevContext - && read == MakeCurrent_PrevReadable) { - readBuffer = MakeCurrent_PrevReadBuffer; - } - else { - readBuffer = XMesaFindBuffer( dpy, read ); - } - if (!readBuffer) { - /* drawable must be a new window! */ - readBuffer = XMesaCreateWindowBuffer2(glxCtx->xmesaContext->xm_visual, - read, xmctx); - if (!readBuffer) { - /* Out of memory, or context/drawable depth mismatch */ - return False; - } - } - - MakeCurrent_PrevContext = ctx; - MakeCurrent_PrevDrawable = draw; - MakeCurrent_PrevReadable = read; - MakeCurrent_PrevDrawBuffer = drawBuffer; - MakeCurrent_PrevReadBuffer = readBuffer; - - /* Now make current! */ - if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) { - ((__GLXcontext *) ctx)->currentDpy = dpy; - ((__GLXcontext *) ctx)->currentDrawable = draw; -#ifndef GLX_BUILT_IN_XMESA - ((__GLXcontext *) ctx)->currentReadable = read; -#else - __glXSetCurrentContext(ctx); -#endif - return True; - } - else { - return False; - } - } - else if (!ctx && !draw && !read) { - /* release current context w/out assigning new one. */ - XMesaMakeCurrent( NULL, NULL ); - MakeCurrent_PrevContext = 0; - MakeCurrent_PrevDrawable = 0; - MakeCurrent_PrevReadable = 0; - MakeCurrent_PrevDrawBuffer = 0; - MakeCurrent_PrevReadBuffer = 0; -#ifdef GLX_BUILT_IN_XMESA - /* XXX bind dummy context with __glXSetCurrentContext(ctx); */ -#endif - return True; - } - else { - /* The args must either all be non-zero or all zero. - * This is an error. - */ - return False; - } -} - - - -static Bool -Fake_glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx ) -{ - return Fake_glXMakeContextCurrent( dpy, drawable, drawable, ctx ); -} - - - -static GLXPixmap -Fake_glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap ) -{ - XMesaVisual v; - XMesaBuffer b; - - v = find_glx_visual( dpy, visinfo ); - if (!v) { - v = create_glx_visual( dpy, visinfo ); - if (!v) { - /* unusable visual */ - return 0; - } - } - - b = XMesaCreatePixmapBuffer( v, pixmap, 0 ); - if (!b) { - return 0; - } - return b->frontbuffer; -} - - -/*** GLX_MESA_pixmap_colormap ***/ - -static GLXPixmap -Fake_glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visinfo, - Pixmap pixmap, Colormap cmap ) -{ - XMesaVisual v; - XMesaBuffer b; - - v = find_glx_visual( dpy, visinfo ); - if (!v) { - v = create_glx_visual( dpy, visinfo ); - if (!v) { - /* unusable visual */ - return 0; - } - } - - b = XMesaCreatePixmapBuffer( v, pixmap, cmap ); - if (!b) { - return 0; - } - return b->frontbuffer; -} - - -static void -Fake_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ) -{ - XMesaBuffer b = XMesaFindBuffer(dpy, pixmap); - if (b) { - XMesaDestroyBuffer(b); - } - else if (_mesa_getenv("MESA_DEBUG")) { - _mesa_warning(NULL, "Mesa: glXDestroyGLXPixmap: invalid pixmap\n"); - } -} - - - -static void -Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, - unsigned long mask ) -{ - struct fake_glx_context *fakeSrc = (struct fake_glx_context *) src; - struct fake_glx_context *fakeDst = (struct fake_glx_context *) dst; - XMesaContext xm_src = fakeSrc->xmesaContext; - XMesaContext xm_dst = fakeDst->xmesaContext; - (void) dpy; - _mesa_copy_context( xm_src->gl_ctx, xm_dst->gl_ctx, (GLuint) mask ); -} - - - -static Bool -Fake_glXQueryExtension( Display *dpy, int *errorb, int *event ) -{ - /* Mesa's GLX isn't really an X extension but we try to act like one. */ - (void) dpy; - (void) errorb; - (void) event; - return True; -} - - -extern void _kw_ungrab_all( Display *dpy ); -void _kw_ungrab_all( Display *dpy ) -{ - XUngrabPointer( dpy, CurrentTime ); - XUngrabKeyboard( dpy, CurrentTime ); -} - - -static void -Fake_glXDestroyContext( Display *dpy, GLXContext ctx ) -{ - struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; - (void) dpy; - MakeCurrent_PrevContext = 0; - MakeCurrent_PrevDrawable = 0; - MakeCurrent_PrevReadable = 0; - MakeCurrent_PrevDrawBuffer = 0; - MakeCurrent_PrevReadBuffer = 0; - XMesaDestroyContext( glxCtx->xmesaContext ); - XMesaGarbageCollect(); -} - - - -static Bool -Fake_glXIsDirect( Display *dpy, GLXContext ctx ) -{ - struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; - (void) dpy; - return glxCtx->xmesaContext->direct; -} - - - -static void -Fake_glXSwapBuffers( Display *dpy, GLXDrawable drawable ) -{ - XMesaBuffer buffer = XMesaFindBuffer( dpy, drawable ); - - if (buffer) { - XMesaSwapBuffers(buffer); - } - else if (_mesa_getenv("MESA_DEBUG")) { - _mesa_warning(NULL, "Mesa: glXSwapBuffers: invalid drawable\n"); - } -} - - - -/*** GLX_MESA_copy_sub_buffer ***/ - -static void -Fake_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ) -{ - XMesaBuffer buffer = XMesaFindBuffer( dpy, drawable ); - if (buffer) { - XMesaCopySubBuffer(buffer, x, y, width, height); - } - else if (_mesa_getenv("MESA_DEBUG")) { - _mesa_warning(NULL, "Mesa: glXCopySubBufferMESA: invalid drawable\n"); - } -} - - - -static Bool -Fake_glXQueryVersion( Display *dpy, int *maj, int *min ) -{ - (void) dpy; - /* Return GLX version, not Mesa version */ - assert(CLIENT_MAJOR_VERSION == SERVER_MAJOR_VERSION); - *maj = CLIENT_MAJOR_VERSION; - *min = MIN2( CLIENT_MINOR_VERSION, SERVER_MINOR_VERSION ); - return True; -} - - - -/* - * Query the GLX attributes of the given XVisualInfo. - */ -static int -get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig ) -{ - ASSERT(xmvis); - switch(attrib) { - case GLX_USE_GL: - *value = (int) True; - return 0; - case GLX_BUFFER_SIZE: - *value = xmvis->visinfo->depth; - return 0; - case GLX_LEVEL: - *value = xmvis->level; - return 0; - case GLX_RGBA: - if (xmvis->mesa_visual.rgbMode) { - *value = True; - } - else { - *value = False; - } - return 0; - case GLX_DOUBLEBUFFER: - *value = (int) xmvis->mesa_visual.doubleBufferMode; - return 0; - case GLX_STEREO: - *value = (int) xmvis->mesa_visual.stereoMode; - return 0; - case GLX_AUX_BUFFERS: - *value = (int) False; - return 0; - case GLX_RED_SIZE: - *value = xmvis->mesa_visual.redBits; - return 0; - case GLX_GREEN_SIZE: - *value = xmvis->mesa_visual.greenBits; - return 0; - case GLX_BLUE_SIZE: - *value = xmvis->mesa_visual.blueBits; - return 0; - case GLX_ALPHA_SIZE: - *value = xmvis->mesa_visual.alphaBits; - return 0; - case GLX_DEPTH_SIZE: - *value = xmvis->mesa_visual.depthBits; - return 0; - case GLX_STENCIL_SIZE: - *value = xmvis->mesa_visual.stencilBits; - return 0; - case GLX_ACCUM_RED_SIZE: - *value = xmvis->mesa_visual.accumRedBits; - return 0; - case GLX_ACCUM_GREEN_SIZE: - *value = xmvis->mesa_visual.accumGreenBits; - return 0; - case GLX_ACCUM_BLUE_SIZE: - *value = xmvis->mesa_visual.accumBlueBits; - return 0; - case GLX_ACCUM_ALPHA_SIZE: - *value = xmvis->mesa_visual.accumAlphaBits; - return 0; - - /* - * GLX_EXT_visual_info extension - */ - case GLX_X_VISUAL_TYPE_EXT: - switch (xmvis->visinfo->CLASS) { - case StaticGray: *value = GLX_STATIC_GRAY_EXT; return 0; - case GrayScale: *value = GLX_GRAY_SCALE_EXT; return 0; - case StaticColor: *value = GLX_STATIC_GRAY_EXT; return 0; - case PseudoColor: *value = GLX_PSEUDO_COLOR_EXT; return 0; - case TrueColor: *value = GLX_TRUE_COLOR_EXT; return 0; - case DirectColor: *value = GLX_DIRECT_COLOR_EXT; return 0; - } - return 0; - case GLX_TRANSPARENT_TYPE_EXT: - if (xmvis->level==0) { - /* normal planes */ - *value = GLX_NONE_EXT; - } - else if (xmvis->level>0) { - /* overlay */ - if (xmvis->mesa_visual.rgbMode) { - *value = GLX_TRANSPARENT_RGB_EXT; - } - else { - *value = GLX_TRANSPARENT_INDEX_EXT; - } - } - else if (xmvis->level<0) { - /* underlay */ - *value = GLX_NONE_EXT; - } - return 0; - case GLX_TRANSPARENT_INDEX_VALUE_EXT: - { - int pixel = transparent_pixel( xmvis ); - if (pixel>=0) { - *value = pixel; - } - /* else undefined */ - } - return 0; - case GLX_TRANSPARENT_RED_VALUE_EXT: - /* undefined */ - return 0; - case GLX_TRANSPARENT_GREEN_VALUE_EXT: - /* undefined */ - return 0; - case GLX_TRANSPARENT_BLUE_VALUE_EXT: - /* undefined */ - return 0; - case GLX_TRANSPARENT_ALPHA_VALUE_EXT: - /* undefined */ - return 0; - - /* - * GLX_EXT_visual_info extension - */ - case GLX_VISUAL_CAVEAT_EXT: - /* test for zero, just in case */ - if (xmvis->VisualCaveat > 0) - *value = xmvis->VisualCaveat; - else - *value = GLX_NONE_EXT; - return 0; - - /* - * GLX_ARB_multisample - */ - case GLX_SAMPLE_BUFFERS_ARB: - *value = 0; - return 0; - case GLX_SAMPLES_ARB: - *value = 0; - return 0; - - /* - * For FBConfigs: - */ - case GLX_SCREEN_EXT: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = xmvis->visinfo->screen; - break; - case GLX_DRAWABLE_TYPE: /*SGIX too */ - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; - break; - case GLX_RENDER_TYPE_SGIX: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - if (xmvis->mesa_visual.rgbMode) - *value = GLX_RGBA_BIT; - else - *value = GLX_COLOR_INDEX_BIT; - break; - case GLX_X_RENDERABLE_SGIX: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = True; /* XXX really? */ - break; - case GLX_FBCONFIG_ID_SGIX: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = xmvis->visinfo->visualid; - break; - case GLX_MAX_PBUFFER_WIDTH: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - /* XXX or MAX_WIDTH? */ - *value = DisplayWidth(xmvis->display, xmvis->visinfo->screen); - break; - case GLX_MAX_PBUFFER_HEIGHT: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = DisplayHeight(xmvis->display, xmvis->visinfo->screen); - break; - case GLX_MAX_PBUFFER_PIXELS: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = DisplayWidth(xmvis->display, xmvis->visinfo->screen) * - DisplayHeight(xmvis->display, xmvis->visinfo->screen); - break; - case GLX_VISUAL_ID: - if (!fbconfig) - return GLX_BAD_ATTRIBUTE; - *value = xmvis->visinfo->visualid; - break; - - default: - return GLX_BAD_ATTRIBUTE; - } - return Success; -} - - -static int -Fake_glXGetConfig( Display *dpy, XVisualInfo *visinfo, - int attrib, int *value ) -{ - XMesaVisual xmvis; - - xmvis = find_glx_visual( dpy, visinfo ); - if (!xmvis) { - /* this visual wasn't obtained with glXChooseVisual */ - xmvis = create_glx_visual( dpy, visinfo ); - if (!xmvis) { - /* this visual can't be used for GL rendering */ - if (attrib==GLX_USE_GL) { - *value = (int) False; - return 0; - } - else { - return GLX_BAD_VISUAL; - } - } - } - - return get_config(xmvis, attrib, value, GL_FALSE); -} - - -static void -Fake_glXWaitGL( void ) -{ - XMesaContext xmesa = XMesaGetCurrentContext(); - XMesaFlush( xmesa ); -} - - - -static void -Fake_glXWaitX( void ) -{ - XMesaContext xmesa = XMesaGetCurrentContext(); - XMesaFlush( xmesa ); -} - - -static const char * -get_extensions( void ) -{ -#ifdef FX - const char *fx = _mesa_getenv("MESA_GLX_FX"); - if (fx && fx[0] != 'd') { - return EXTENSIONS; - } -#endif - return EXTENSIONS + 23; /* skip "GLX_MESA_set_3dfx_mode" */ -} - - - -/* GLX 1.1 and later */ -static const char * -Fake_glXQueryExtensionsString( Display *dpy, int screen ) -{ - (void) dpy; - (void) screen; - return get_extensions(); -} - - - -/* GLX 1.1 and later */ -static const char * -Fake_glXQueryServerString( Display *dpy, int screen, int name ) -{ - static char version[1000]; - _mesa_sprintf(version, "%d.%d %s", - SERVER_MAJOR_VERSION, SERVER_MINOR_VERSION, MESA_GLX_VERSION); - - (void) dpy; - (void) screen; - - switch (name) { - case GLX_EXTENSIONS: - return get_extensions(); - case GLX_VENDOR: - return VENDOR; - case GLX_VERSION: - return version; - default: - return NULL; - } -} - - - -/* GLX 1.1 and later */ -static const char * -Fake_glXGetClientString( Display *dpy, int name ) -{ - static char version[1000]; - _mesa_sprintf(version, "%d.%d %s", CLIENT_MAJOR_VERSION, - CLIENT_MINOR_VERSION, MESA_GLX_VERSION); - - (void) dpy; - - switch (name) { - case GLX_EXTENSIONS: - return get_extensions(); - case GLX_VENDOR: - return VENDOR; - case GLX_VERSION: - return version; - default: - return NULL; - } -} - - - -/* - * GLX 1.3 and later - */ - - -static GLXFBConfig * -Fake_glXChooseFBConfig( Display *dpy, int screen, - const int *attribList, int *nitems ) -{ - XMesaVisual xmvis = choose_visual(dpy, screen, attribList); - if (xmvis) { - GLXFBConfig *config = _mesa_malloc(sizeof(XMesaVisual)); - if (!config) { - *nitems = 0; - return NULL; - } - *nitems = 1; - config[0] = (GLXFBConfig) xmvis; - return (GLXFBConfig *) config; - } - else { - *nitems = 0; - return NULL; - } -} - - -static int -Fake_glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, - int attribute, int *value ) -{ - XMesaVisual v = (XMesaVisual) config; - (void) dpy; - (void) config; - - if (!dpy || !config || !value) - return -1; - - return get_config(v, attribute, value, GL_TRUE); -} - - -static GLXFBConfig * -Fake_glXGetFBConfigs( Display *dpy, int screen, int *nelements ) -{ - XVisualInfo *visuals, visTemplate; - const long visMask = VisualScreenMask; - int i; - - /* Get list of all X visuals */ - visTemplate.screen = screen; - visuals = XGetVisualInfo(dpy, visMask, &visTemplate, nelements); - if (*nelements > 0) { - XMesaVisual *results; - results = _mesa_malloc(*nelements * sizeof(XMesaVisual)); - if (!results) { - *nelements = 0; - return NULL; - } - for (i = 0; i < *nelements; i++) { - results[i] = create_glx_visual(dpy, visuals + i); - } - return (GLXFBConfig *) results; - } - return NULL; -} - - -static XVisualInfo * -Fake_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) -{ - if (dpy && config) { - XMesaVisual xmvis = (XMesaVisual) config; -#if 0 - return xmvis->vishandle; -#else - /* create a new vishandle - the cached one may be stale */ - xmvis->vishandle = _mesa_malloc(sizeof(XVisualInfo)); - if (xmvis->vishandle) { - _mesa_memcpy(xmvis->vishandle, xmvis->visinfo, sizeof(XVisualInfo)); - } - return xmvis->vishandle; -#endif - } - else { - return NULL; - } -} - - -static GLXWindow -Fake_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win, - const int *attribList ) -{ - (void) dpy; - (void) config; - (void) win; - (void) attribList; /* Ignored in GLX 1.3 */ - - return win; /* A hack for now */ -} - - -static void -Fake_glXDestroyWindow( Display *dpy, GLXWindow window ) -{ - XMesaBuffer b = XMesaFindBuffer(dpy, (XMesaDrawable) window); - if (b) - XMesaDestroyBuffer(b); - /* don't destroy X window */ -} - - -/* XXX untested */ -static GLXPixmap -Fake_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap, - const int *attribList ) -{ - XMesaVisual v = (XMesaVisual) config; - XMesaBuffer b; - - (void) dpy; - (void) config; - (void) pixmap; - (void) attribList; /* Ignored in GLX 1.3 */ - - if (!dpy || !config || !pixmap) - return 0; - - b = XMesaCreatePixmapBuffer( v, pixmap, 0 ); - if (!b) { - return 0; - } - - return pixmap; -} - - -static void -Fake_glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ) -{ - XMesaBuffer b = XMesaFindBuffer(dpy, (XMesaDrawable)pixmap); - if (b) - XMesaDestroyBuffer(b); - /* don't destroy X pixmap */ -} - - -static GLXPbuffer -Fake_glXCreatePbuffer( Display *dpy, GLXFBConfig config, - const int *attribList ) -{ - XMesaVisual xmvis = (XMesaVisual) config; - XMesaBuffer xmbuf; - const int *attrib; - int width = 0, height = 0; - - (void) dpy; - - for (attrib = attribList; *attrib; attrib++) { - switch (*attrib) { - case GLX_PBUFFER_WIDTH: - attrib++; - width = *attrib; - break; - case GLX_PBUFFER_HEIGHT: - attrib++; - height = *attrib; - break; - case GLX_PRESERVED_CONTENTS: - attrib++; - break; - case GLX_LARGEST_PBUFFER: - attrib++; - break; - default: - return 0; - } - } - - if (width == 0 || height == 0) - return 0; - - xmbuf = XMesaCreatePBuffer( xmvis, 0, width, height); - /* A GLXPbuffer handle must be an X Drawable because that's what - * glXMakeCurrent takes. - */ - return (GLXPbuffer) xmbuf->frontbuffer; -} - - -static void -Fake_glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ) -{ - XMesaBuffer b = XMesaFindBuffer(dpy, pbuf); - if (b) { - XMesaDestroyBuffer(b); - } -} - - -static void -Fake_glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, - unsigned int *value ) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, draw); - if (!xmbuf) - return; - - switch (attribute) { - case GLX_WIDTH: - *value = xmbuf->width; - break; - case GLX_HEIGHT: - *value = xmbuf->height; - break; - case GLX_PRESERVED_CONTENTS: - *value = True; - break; - case GLX_LARGEST_PBUFFER: - *value = xmbuf->width * xmbuf->height; - break; - case GLX_FBCONFIG_ID: - *value = xmbuf->xm_visual->visinfo->visualid; - return; - default: - return; /* GLX_BAD_ATTRIBUTE? */ - } -} - - -static GLXContext -Fake_glXCreateNewContext( Display *dpy, GLXFBConfig config, - int renderType, GLXContext shareList, Bool direct ) -{ - struct fake_glx_context *glxCtx; - struct fake_glx_context *shareCtx = (struct fake_glx_context *) shareList; - XMesaVisual xmvis = (XMesaVisual) config; - - if (!dpy || !config || - (renderType != GLX_RGBA_TYPE && renderType != GLX_COLOR_INDEX_TYPE)) - return 0; - - glxCtx = CALLOC_STRUCT(fake_glx_context); - if (!glxCtx) - return 0; - - /* deallocate unused windows/buffers */ - XMesaGarbageCollect(); - - glxCtx->xmesaContext = XMesaCreateContext(xmvis, - shareCtx ? shareCtx->xmesaContext : NULL); - if (!glxCtx->xmesaContext) { - FREE(glxCtx); - return NULL; - } - - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); - - return (GLXContext) glxCtx; -} - - -static int -Fake_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value ) -{ - struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; - XMesaContext xmctx = glxCtx->xmesaContext; - - (void) dpy; - (void) ctx; - - switch (attribute) { - case GLX_FBCONFIG_ID: - *value = xmctx->xm_visual->visinfo->visualid; - break; - case GLX_RENDER_TYPE: - if (xmctx->xm_visual->mesa_visual.rgbMode) - *value = GLX_RGBA_BIT; - else - *value = GLX_COLOR_INDEX_BIT; - break; - case GLX_SCREEN: - *value = 0; - return Success; - default: - return GLX_BAD_ATTRIBUTE; - } - return 0; -} - - -static void -Fake_glXSelectEvent( Display *dpy, GLXDrawable drawable, unsigned long mask ) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable); - if (xmbuf) - xmbuf->selectedEvents = mask; -} - - -static void -Fake_glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, - unsigned long *mask ) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable); - if (xmbuf) - *mask = xmbuf->selectedEvents; - else - *mask = 0; -} - - - -/*** GLX_SGI_swap_control ***/ - -static int -Fake_glXSwapIntervalSGI(int interval) -{ - (void) interval; - return 0; -} - - - -/*** GLX_SGI_video_sync ***/ - -static int -Fake_glXGetVideoSyncSGI(unsigned int *count) -{ - (void) count; - return 0; -} - -static int -Fake_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) -{ - (void) divisor; - (void) remainder; - (void) count; - return 0; -} - - - -/*** GLX_SGI_make_current_read ***/ - -static Bool -Fake_glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) -{ - return Fake_glXMakeContextCurrent( dpy, draw, read, ctx ); -} - -/* not used -static GLXDrawable -Fake_glXGetCurrentReadDrawableSGI(void) -{ - return 0; -} -*/ - - -/*** GLX_SGIX_video_source ***/ -#if defined(_VL_H) - -static GLXVideoSourceSGIX -Fake_glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode) -{ - (void) dpy; - (void) screen; - (void) server; - (void) path; - (void) nodeClass; - (void) drainNode; - return 0; -} - -static void -Fake_glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src) -{ - (void) dpy; - (void) src; -} - -#endif - - -/*** GLX_EXT_import_context ***/ - -static void -Fake_glXFreeContextEXT(Display *dpy, GLXContext context) -{ - (void) dpy; - (void) context; -} - -static GLXContextID -Fake_glXGetContextIDEXT(const GLXContext context) -{ - (void) context; - return 0; -} - -static GLXContext -Fake_glXImportContextEXT(Display *dpy, GLXContextID contextID) -{ - (void) dpy; - (void) contextID; - return 0; -} - -static int -Fake_glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *value) -{ - (void) dpy; - (void) context; - (void) attribute; - (void) value; - return 0; -} - - - -/*** GLX_SGIX_fbconfig ***/ - -static int -Fake_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) -{ - return Fake_glXGetFBConfigAttrib(dpy, config, attribute, value); -} - -static GLXFBConfigSGIX * -Fake_glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements) -{ - return (GLXFBConfig *) Fake_glXChooseFBConfig(dpy, screen, attrib_list, nelements); -} - - -static GLXPixmap -Fake_glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) -{ - XMesaVisual xmvis = (XMesaVisual) config; - XMesaBuffer xmbuf = XMesaCreatePixmapBuffer(xmvis, pixmap, 0); - return xmbuf->frontbuffer; /* need to return an X ID */ -} - - -static GLXContext -Fake_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) -{ - XMesaVisual xmvis = (XMesaVisual) config; - struct fake_glx_context *glxCtx; - struct fake_glx_context *shareCtx = (struct fake_glx_context *) share_list; - - glxCtx = CALLOC_STRUCT(fake_glx_context); - if (!glxCtx) - return 0; - - /* deallocate unused windows/buffers */ - XMesaGarbageCollect(); - - glxCtx->xmesaContext = XMesaCreateContext(xmvis, - shareCtx ? shareCtx->xmesaContext : NULL); - if (!glxCtx->xmesaContext) { - FREE(glxCtx); - return NULL; - } - - glxCtx->xmesaContext->direct = GL_FALSE; - glxCtx->glxContext.isDirect = GL_FALSE; - glxCtx->glxContext.currentDpy = dpy; - glxCtx->glxContext.xid = (XID) glxCtx; /* self pointer */ - - assert((void *) glxCtx == (void *) &(glxCtx->glxContext)); - - return (GLXContext) glxCtx; -} - - -static XVisualInfo * -Fake_glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config) -{ - return Fake_glXGetVisualFromFBConfig(dpy, config); -} - - -static GLXFBConfigSGIX -Fake_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis) -{ - XMesaVisual xmvis = find_glx_visual(dpy, vis); - if (!xmvis) { - /* This visual wasn't found with glXChooseVisual() */ - xmvis = create_glx_visual(dpy, vis); - } - - return (GLXFBConfigSGIX) xmvis; -} - - - -/*** GLX_SGIX_pbuffer ***/ - -static GLXPbufferSGIX -Fake_glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, - unsigned int width, unsigned int height, - int *attribList) -{ - XMesaVisual xmvis = (XMesaVisual) config; - XMesaBuffer xmbuf; - const int *attrib; - - (void) dpy; - - for (attrib = attribList; *attrib; attrib++) { - switch (*attrib) { - case GLX_PRESERVED_CONTENTS_SGIX: - attrib++; - break; - case GLX_LARGEST_PBUFFER_SGIX: - attrib++; - break; - default: - return 0; - } - } - - xmbuf = XMesaCreatePBuffer( xmvis, 0, width, height); - /* A GLXPbuffer handle must be an X Drawable because that's what - * glXMakeCurrent takes. - */ - return (GLXPbuffer) xmbuf->frontbuffer; -} - - -static void -Fake_glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, pbuf); - if (xmbuf) { - XMesaDestroyBuffer(xmbuf); - } -} - - -static int -Fake_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value) -{ - const XMesaBuffer xmbuf = XMesaFindBuffer(dpy, pbuf); - - if (!xmbuf) { - /* Generate GLXBadPbufferSGIX for bad pbuffer */ - return 0; - } - - switch (attribute) { - case GLX_PRESERVED_CONTENTS_SGIX: - *value = True; - break; - case GLX_LARGEST_PBUFFER_SGIX: - *value = xmbuf->width * xmbuf->height; - break; - case GLX_WIDTH_SGIX: - *value = xmbuf->width; - break; - case GLX_HEIGHT_SGIX: - *value = xmbuf->height; - break; - case GLX_EVENT_MASK_SGIX: - *value = 0; /* XXX might be wrong */ - break; - default: - *value = 0; - } - return 0; -} - - -static void -Fake_glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable); - if (xmbuf) { - /* Note: we'll never generate clobber events */ - xmbuf->selectedEvents = mask; - } -} - - -static void -Fake_glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask) -{ - XMesaBuffer xmbuf = XMesaFindBuffer(dpy, drawable); - if (xmbuf) { - *mask = xmbuf->selectedEvents; - } - else { - *mask = 0; - } -} - - - -/*** GLX_SGI_cushion ***/ - -static void -Fake_glXCushionSGI(Display *dpy, Window win, float cushion) -{ - (void) dpy; - (void) win; - (void) cushion; -} - - - -/*** GLX_SGIX_video_resize ***/ - -static int -Fake_glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) window; - return 0; -} - -static int -Fake_glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) x; - (void) y; - (void) w; - (void) h; - return 0; -} - -static int -Fake_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) x; - (void) y; - (void) w; - (void) h; - return 0; -} - -static int -Fake_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) dx; - (void) dy; - (void) dw; - (void) dh; - return 0; -} - -static int -Fake_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype) -{ - (void) dpy; - (void) screen; - (void) channel; - (void) synctype; - return 0; -} - - - -/*** GLX_SGIX_dmbuffer **/ - -#if defined(_DM_BUFFER_H_) -static Bool -Fake_glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer) -{ - (void) dpy; - (void) pbuffer; - (void) params; - (void) dmbuffer; - return False; -} -#endif - - -/*** GLX_SGIX_swap_group ***/ - -static void -Fake_glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member) -{ - (void) dpy; - (void) drawable; - (void) member; -} - - - -/*** GLX_SGIX_swap_barrier ***/ - -static void -Fake_glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier) -{ - (void) dpy; - (void) drawable; - (void) barrier; -} - -static Bool -Fake_glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max) -{ - (void) dpy; - (void) screen; - (void) max; - return False; -} - - - -/*** GLX_SUN_get_transparent_index ***/ - -static Status -Fake_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent) -{ - (void) dpy; - (void) overlay; - (void) underlay; - (void) pTransparent; - return 0; -} - - - -/*** GLX_MESA_release_buffers ***/ - -/* - * Release the depth, stencil, accum buffers attached to a GLXDrawable - * (a window or pixmap) prior to destroying the GLXDrawable. - */ -static Bool -Fake_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ) -{ - XMesaBuffer b = XMesaFindBuffer(dpy, d); - if (b) { - XMesaDestroyBuffer(b); - return True; - } - return False; -} - - - -/*** GLX_MESA_set_3dfx_mode ***/ - -static Bool -Fake_glXSet3DfxModeMESA( int mode ) -{ - return XMesaSetFXmode( mode ); -} - - - -/*** AGP memory allocation ***/ -static void * -Fake_glXAllocateMemoryNV( GLsizei size, - GLfloat readFrequency, - GLfloat writeFrequency, - GLfloat priority ) -{ - (void) size; - (void) readFrequency; - (void) writeFrequency; - (void) priority; - return NULL; -} - - -static void -Fake_glXFreeMemoryNV( GLvoid *pointer ) -{ - (void) pointer; -} - - -/*** GLX_MESA_agp_offset */ - -static GLuint -Fake_glXGetAGPOffsetMESA( const GLvoid *pointer ) -{ - (void) pointer; - return ~0; -} - - -extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void); -struct _glxapi_table *_mesa_GetGLXDispatchTable(void) -{ - static struct _glxapi_table glx; - - /* be sure our dispatch table size <= libGL's table */ - { - GLuint size = sizeof(struct _glxapi_table) / sizeof(void *); - (void) size; - assert(_glxapi_get_dispatch_table_size() >= size); - } - - /* initialize the whole table to no-ops */ - _glxapi_set_no_op_table(&glx); - - /* now initialize the table with the functions I implement */ - glx.ChooseVisual = Fake_glXChooseVisual; - glx.CopyContext = Fake_glXCopyContext; - glx.CreateContext = Fake_glXCreateContext; - glx.CreateGLXPixmap = Fake_glXCreateGLXPixmap; - glx.DestroyContext = Fake_glXDestroyContext; - glx.DestroyGLXPixmap = Fake_glXDestroyGLXPixmap; - glx.GetConfig = Fake_glXGetConfig; - /*glx.GetCurrentContext = Fake_glXGetCurrentContext;*/ - /*glx.GetCurrentDrawable = Fake_glXGetCurrentDrawable;*/ - glx.IsDirect = Fake_glXIsDirect; - glx.MakeCurrent = Fake_glXMakeCurrent; - glx.QueryExtension = Fake_glXQueryExtension; - glx.QueryVersion = Fake_glXQueryVersion; - glx.SwapBuffers = Fake_glXSwapBuffers; - glx.UseXFont = Fake_glXUseXFont; - glx.WaitGL = Fake_glXWaitGL; - glx.WaitX = Fake_glXWaitX; - - /*** GLX_VERSION_1_1 ***/ - glx.GetClientString = Fake_glXGetClientString; - glx.QueryExtensionsString = Fake_glXQueryExtensionsString; - glx.QueryServerString = Fake_glXQueryServerString; - - /*** GLX_VERSION_1_2 ***/ - /*glx.GetCurrentDisplay = Fake_glXGetCurrentDisplay;*/ - - /*** GLX_VERSION_1_3 ***/ - glx.ChooseFBConfig = Fake_glXChooseFBConfig; - glx.CreateNewContext = Fake_glXCreateNewContext; - glx.CreatePbuffer = Fake_glXCreatePbuffer; - glx.CreatePixmap = Fake_glXCreatePixmap; - glx.CreateWindow = Fake_glXCreateWindow; - glx.DestroyPbuffer = Fake_glXDestroyPbuffer; - glx.DestroyPixmap = Fake_glXDestroyPixmap; - glx.DestroyWindow = Fake_glXDestroyWindow; - /*glx.GetCurrentReadDrawable = Fake_glXGetCurrentReadDrawable;*/ - glx.GetFBConfigAttrib = Fake_glXGetFBConfigAttrib; - glx.GetFBConfigs = Fake_glXGetFBConfigs; - glx.GetSelectedEvent = Fake_glXGetSelectedEvent; - glx.GetVisualFromFBConfig = Fake_glXGetVisualFromFBConfig; - glx.MakeContextCurrent = Fake_glXMakeContextCurrent; - glx.QueryContext = Fake_glXQueryContext; - glx.QueryDrawable = Fake_glXQueryDrawable; - glx.SelectEvent = Fake_glXSelectEvent; - - /*** GLX_SGI_swap_control ***/ - glx.SwapIntervalSGI = Fake_glXSwapIntervalSGI; - - /*** GLX_SGI_video_sync ***/ - glx.GetVideoSyncSGI = Fake_glXGetVideoSyncSGI; - glx.WaitVideoSyncSGI = Fake_glXWaitVideoSyncSGI; - - /*** GLX_SGI_make_current_read ***/ - glx.MakeCurrentReadSGI = Fake_glXMakeCurrentReadSGI; - /*glx.GetCurrentReadDrawableSGI = Fake_glXGetCurrentReadDrawableSGI;*/ - -/*** GLX_SGIX_video_source ***/ -#if defined(_VL_H) - glx.CreateGLXVideoSourceSGIX = Fake_glXCreateGLXVideoSourceSGIX; - glx.DestroyGLXVideoSourceSGIX = Fake_glXDestroyGLXVideoSourceSGIX; -#endif - - /*** GLX_EXT_import_context ***/ - glx.FreeContextEXT = Fake_glXFreeContextEXT; - glx.GetContextIDEXT = Fake_glXGetContextIDEXT; - /*glx.GetCurrentDisplayEXT = Fake_glXGetCurrentDisplayEXT;*/ - glx.ImportContextEXT = Fake_glXImportContextEXT; - glx.QueryContextInfoEXT = Fake_glXQueryContextInfoEXT; - - /*** GLX_SGIX_fbconfig ***/ - glx.GetFBConfigAttribSGIX = Fake_glXGetFBConfigAttribSGIX; - glx.ChooseFBConfigSGIX = Fake_glXChooseFBConfigSGIX; - glx.CreateGLXPixmapWithConfigSGIX = Fake_glXCreateGLXPixmapWithConfigSGIX; - glx.CreateContextWithConfigSGIX = Fake_glXCreateContextWithConfigSGIX; - glx.GetVisualFromFBConfigSGIX = Fake_glXGetVisualFromFBConfigSGIX; - glx.GetFBConfigFromVisualSGIX = Fake_glXGetFBConfigFromVisualSGIX; - - /*** GLX_SGIX_pbuffer ***/ - glx.CreateGLXPbufferSGIX = Fake_glXCreateGLXPbufferSGIX; - glx.DestroyGLXPbufferSGIX = Fake_glXDestroyGLXPbufferSGIX; - glx.QueryGLXPbufferSGIX = Fake_glXQueryGLXPbufferSGIX; - glx.SelectEventSGIX = Fake_glXSelectEventSGIX; - glx.GetSelectedEventSGIX = Fake_glXGetSelectedEventSGIX; - - /*** GLX_SGI_cushion ***/ - glx.CushionSGI = Fake_glXCushionSGI; - - /*** GLX_SGIX_video_resize ***/ - glx.BindChannelToWindowSGIX = Fake_glXBindChannelToWindowSGIX; - glx.ChannelRectSGIX = Fake_glXChannelRectSGIX; - glx.QueryChannelRectSGIX = Fake_glXQueryChannelRectSGIX; - glx.QueryChannelDeltasSGIX = Fake_glXQueryChannelDeltasSGIX; - glx.ChannelRectSyncSGIX = Fake_glXChannelRectSyncSGIX; - - /*** GLX_SGIX_dmbuffer **/ -#if defined(_DM_BUFFER_H_) - glx.AssociateDMPbufferSGIX = NULL; -#endif - - /*** GLX_SGIX_swap_group ***/ - glx.JoinSwapGroupSGIX = Fake_glXJoinSwapGroupSGIX; - - /*** GLX_SGIX_swap_barrier ***/ - glx.BindSwapBarrierSGIX = Fake_glXBindSwapBarrierSGIX; - glx.QueryMaxSwapBarriersSGIX = Fake_glXQueryMaxSwapBarriersSGIX; - - /*** GLX_SUN_get_transparent_index ***/ - glx.GetTransparentIndexSUN = Fake_glXGetTransparentIndexSUN; - - /*** GLX_MESA_copy_sub_buffer ***/ - glx.CopySubBufferMESA = Fake_glXCopySubBufferMESA; - - /*** GLX_MESA_release_buffers ***/ - glx.ReleaseBuffersMESA = Fake_glXReleaseBuffersMESA; - - /*** GLX_MESA_pixmap_colormap ***/ - glx.CreateGLXPixmapMESA = Fake_glXCreateGLXPixmapMESA; - - /*** GLX_MESA_set_3dfx_mode ***/ - glx.Set3DfxModeMESA = Fake_glXSet3DfxModeMESA; - - /*** GLX_NV_vertex_array_range ***/ - glx.AllocateMemoryNV = Fake_glXAllocateMemoryNV; - glx.FreeMemoryNV = Fake_glXFreeMemoryNV; - - /*** GLX_MESA_agp_offset ***/ - glx.GetAGPOffsetMESA = Fake_glXGetAGPOffsetMESA; - - return &glx; -} Index: xc/extras/Mesa/src/X/glxapi.c diff -u xc/extras/Mesa/src/X/glxapi.c:1.10 xc/extras/Mesa/src/X/glxapi.c:removed --- xc/extras/Mesa/src/X/glxapi.c:1.10 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/glxapi.c Wed Mar 16 21:00:47 2005 @@ -1,1277 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.0.2 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This is the GLX API dispatcher. Calls to the glX* functions are - * either routed to the real GLX encoders or to Mesa's pseudo-GLX functions. - * See the glxapi.h file for more details. - */ - - -#include -#include -#include -#include -#include "glapi.h" -#include "glxapi.h" - - -extern struct _glxapi_table *_real_GetGLXDispatchTable(void); -extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void); - - -struct display_dispatch { - Display *Dpy; - struct _glxapi_table *Table; - struct display_dispatch *Next; -}; - -static struct display_dispatch *DispatchList = NULL; - - -/* Display -> Dispatch caching */ -static Display *prevDisplay = NULL; -static struct _glxapi_table *prevTable = NULL; - - -static struct _glxapi_table * -get_dispatch(Display *dpy) -{ - if (!dpy) - return NULL; - - /* search list of display/dispatch pairs for this display */ - { - const struct display_dispatch *d = DispatchList; - while (d) { - if (d->Dpy == dpy) { - prevDisplay = dpy; - prevTable = d->Table; - return d->Table; /* done! */ - } - d = d->Next; - } - } - - /* A new display, determine if we should use real GLX - * or Mesa's pseudo-GLX. - */ - { - struct _glxapi_table *t = NULL; - -#ifdef GLX_BUILT_IN_XMESA - if (!getenv("LIBGL_FORCE_XMESA")) { - int ignore; - if (XQueryExtension( dpy, "GLX", &ignore, &ignore, &ignore )) { - /* the X server has the GLX extension */ - t = _real_GetGLXDispatchTable(); - } - } -#endif - - if (!t) { - /* Fallback to Mesa with Xlib driver */ -#ifdef GLX_BUILT_IN_XMESA - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, - "libGL: server %s lacks the GLX extension.", - dpy->display_name); - fprintf(stderr, " Using Mesa Xlib renderer.\n"); - } -#endif - t = _mesa_GetGLXDispatchTable(); - assert(t); /* this has to work */ - } - - if (t) { - struct display_dispatch *d; - d = (struct display_dispatch *) malloc(sizeof(struct display_dispatch)); - if (d) { - d->Dpy = dpy; - d->Table = t; - /* insert at head of list */ - d->Next = DispatchList; - DispatchList = d; - /* update cache */ - prevDisplay = dpy; - prevTable = t; - return t; - } - } - } - - /* If we get here that means we can't use real GLX on this display - * and the Mesa pseudo-GLX software renderer wasn't compiled in. - * Or, we ran out of memory! - */ - return NULL; -} - - -#define GET_DISPATCH(DPY, TABLE) \ - if (DPY == prevDisplay) { \ - TABLE = prevTable; \ - } \ - else if (!DPY) { \ - TABLE = NULL; \ - } \ - else { \ - TABLE = get_dispatch(DPY); \ - } - - - - -/* Set by glXMakeCurrent() and glXMakeContextCurrent() only */ -#ifndef GLX_BUILT_IN_XMESA -static GLXContext CurrentContext = 0; -#define __glXGetCurrentContext() CurrentContext; -#endif - - -/* - * GLX API entrypoints - */ - -/*** GLX_VERSION_1_0 ***/ - -XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *list) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->ChooseVisual)(dpy, screen, list); -} - - -void glXCopyContext(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->CopyContext)(dpy, src, dst, mask); -} - - -GLXContext glXCreateContext(Display *dpy, XVisualInfo *visinfo, GLXContext shareList, Bool direct) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateContext)(dpy, visinfo, shareList, direct); -} - - -GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateGLXPixmap)(dpy, visinfo, pixmap); -} - - -void glXDestroyContext(Display *dpy, GLXContext ctx) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyContext)(dpy, ctx); -} - - -void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pixmap) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyGLXPixmap)(dpy, pixmap); -} - - -int glXGetConfig(Display *dpy, XVisualInfo *visinfo, int attrib, int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return GLX_NO_EXTENSION; - return (t->GetConfig)(dpy, visinfo, attrib, value); -} - - -#ifdef GLX_BUILT_IN_XMESA -/* Use real libGL's glXGetCurrentContext() function */ -#else -/* stand-alone Mesa */ -GLXContext glXGetCurrentContext(void) -{ - return CurrentContext; -} -#endif - - -#ifdef GLX_BUILT_IN_XMESA -/* Use real libGL's glXGetCurrentContext() function */ -#else -/* stand-alone Mesa */ -GLXDrawable glXGetCurrentDrawable(void) -{ - __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext(); - return gc ? gc->currentDrawable : 0; -} -#endif - - -Bool glXIsDirect(Display *dpy, GLXContext ctx) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->IsDirect)(dpy, ctx); -} - - -Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx) -{ - Bool b; - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) { - return False; - } - b = (*t->MakeCurrent)(dpy, drawable, ctx); -#ifndef GLX_BUILT_IN_XMESA - if (b) { - CurrentContext = ctx; - } -#endif - return b; -} - - -Bool glXQueryExtension(Display *dpy, int *errorb, int *event) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->QueryExtension)(dpy, errorb, event); -} - - -Bool glXQueryVersion(Display *dpy, int *maj, int *min) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->QueryVersion)(dpy, maj, min); -} - - -void glXSwapBuffers(Display *dpy, GLXDrawable drawable) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->SwapBuffers)(dpy, drawable); -} - - -void glXUseXFont(Font font, int first, int count, int listBase) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->UseXFont)(font, first, count, listBase); -} - - -void glXWaitGL(void) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->WaitGL)(); -} - - -void glXWaitX(void) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->WaitX)(); -} - - - -/*** GLX_VERSION_1_1 ***/ - -const char *glXGetClientString(Display *dpy, int name) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->GetClientString)(dpy, name); -} - - -const char *glXQueryExtensionsString(Display *dpy, int screen) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->QueryExtensionsString)(dpy, screen); -} - - -const char *glXQueryServerString(Display *dpy, int screen, int name) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->QueryServerString)(dpy, screen, name); -} - - -/*** GLX_VERSION_1_2 ***/ - -#if !defined(GLX_BUILT_IN_XMESA) -Display *glXGetCurrentDisplay(void) -{ - /* Same code as in libGL's glxext.c */ - __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext(); - if (NULL == gc) return NULL; - return gc->currentDpy; -} -#endif - - - -/*** GLX_VERSION_1_3 ***/ - -GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->ChooseFBConfig)(dpy, screen, attribList, nitems); -} - - -GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateNewContext)(dpy, config, renderType, shareList, direct); -} - - -GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreatePbuffer)(dpy, config, attribList); -} - - -GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreatePixmap)(dpy, config, pixmap, attribList); -} - - -GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateWindow)(dpy, config, win, attribList); -} - - -void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyPbuffer)(dpy, pbuf); -} - - -void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyPixmap)(dpy, pixmap); -} - - -void glXDestroyWindow(Display *dpy, GLXWindow window) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyWindow)(dpy, window); -} - - -#ifdef GLX_BUILT_IN_XMESA -/* Use the glXGetCurrentReadDrawable() function from libGL */ -#else -GLXDrawable glXGetCurrentReadDrawable(void) -{ - __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext(); - return gc ? gc->currentReadable : 0; -} -#endif - - -int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return GLX_NO_EXTENSION; - return (t->GetFBConfigAttrib)(dpy, config, attribute, value); -} - - -GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->GetFBConfigs)(dpy, screen, nelements); -} - -void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->GetSelectedEvent)(dpy, drawable, mask); -} - - -XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->GetVisualFromFBConfig)(dpy, config); -} - - -Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) -{ - Bool b; - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - b = (t->MakeContextCurrent)(dpy, draw, read, ctx); -#ifndef GLX_BUILT_IN_XMESA - if (b) { - CurrentContext = ctx; - } -#endif - return b; -} - - -int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - assert(t); - if (!t) - return 0; /* XXX correct? */ - return (t->QueryContext)(dpy, ctx, attribute, value); -} - - -void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->QueryDrawable)(dpy, draw, attribute, value); -} - - -void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->SelectEvent)(dpy, drawable, mask); -} - - - -/*** GLX_SGI_swap_control ***/ - -int glXSwapIntervalSGI(int interval) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->SwapIntervalSGI)(interval); -} - - - -/*** GLX_SGI_video_sync ***/ - -int glXGetVideoSyncSGI(unsigned int *count) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->GetVideoSyncSGI)(count); -} - -int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->WaitVideoSyncSGI)(divisor, remainder, count); -} - - - -/*** GLX_SGI_make_current_read ***/ - -Bool glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx); -} - -#ifdef GLX_BUILT_IN_XMESA -/* Use glXGetCurrentReadDrawableSGI() from libGL */ -#else -/* stand-alone Mesa */ -GLXDrawable glXGetCurrentReadDrawableSGI(void) -{ - return glXGetCurrentReadDrawable(); -} -#endif - - -#if defined(_VL_H) - -GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateGLXVideoSourceSGIX)(dpy, screen, server, path, nodeClass, drainNode); -} - -void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->DestroyGLXVideoSourceSGIX)(dpy, src); -} - -#endif - - -/*** GLX_EXT_import_context ***/ - -void glXFreeContextEXT(Display *dpy, GLXContext context) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->FreeContextEXT)(dpy, context); -} - -#ifdef GLX_BUILT_IN_XMESA -/* Use real libGL's glXGetContextIDEXT() function */ -#else -/* stand-alone Mesa */ -GLXContextID glXGetContextIDEXT(const GLXContext context) -{ - return ((__GLXcontext *) context)->xid; -} -#endif - -#ifdef GLX_BUILT_IN_XMESA -/* Use real libGL's glXGetCurrentDisplayEXT() function */ -#else -/* stand-alone Mesa */ -Display *glXGetCurrentDisplayEXT(void) -{ - return glXGetCurrentDisplay(); -} -#endif - -GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->ImportContextEXT)(dpy, contextID); -} - -int glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; /* XXX ok? */ - return (t->QueryContextInfoEXT)(dpy, context, attribute, value); -} - - - -/*** GLX_SGIX_fbconfig ***/ - -int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value); -} - -GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements); -} - -GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap); -} - -GLXContext glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct); -} - -XVisualInfo * glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->GetVisualFromFBConfigSGIX)(dpy, config); -} - -GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->GetFBConfigFromVisualSGIX)(dpy, vis); -} - - - -/*** GLX_SGIX_pbuffer ***/ - -GLXPbufferSGIX glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list); -} - -void glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->DestroyGLXPbufferSGIX)(dpy, pbuf); -} - -int glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->QueryGLXPbufferSGIX)(dpy, pbuf, attribute, value); -} - -void glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->SelectEventSGIX)(dpy, drawable, mask); -} - -void glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->GetSelectedEventSGIX)(dpy, drawable, mask); -} - - - -/*** GLX_SGI_cushion ***/ - -void glXCushionSGI(Display *dpy, Window win, float cushion) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->CushionSGI)(dpy, win, cushion); -} - - - -/*** GLX_SGIX_video_resize ***/ - -int glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window); -} - -int glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->ChannelRectSGIX)(dpy, screen, channel, x, y, w, h); -} - -int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->QueryChannelRectSGIX)(dpy, screen, channel, x, y, w, h); -} - -int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh); -} - -int glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->ChannelRectSyncSGIX)(dpy, screen, channel, synctype); -} - - - -#if defined(_DM_BUFFER_H_) - -Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->AssociateDMPbufferSGIX)(dpy, pbuffer, params, dmbuffer); -} - -#endif - - -/*** GLX_SGIX_swap_group ***/ - -void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (*t->JoinSwapGroupSGIX)(dpy, drawable, member); -} - - -/*** GLX_SGIX_swap_barrier ***/ - -void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (*t->BindSwapBarrierSGIX)(dpy, drawable, barrier); -} - -Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (*t->QueryMaxSwapBarriersSGIX)(dpy, screen, max); -} - - - -/*** GLX_SUN_get_transparent_index ***/ - -Status glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (*t->GetTransparentIndexSUN)(dpy, overlay, underlay, pTransparent); -} - - - -/*** GLX_MESA_copy_sub_buffer ***/ - -void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->CopySubBufferMESA)(dpy, drawable, x, y, width, height); -} - - - -/*** GLX_MESA_release_buffers ***/ - -Bool glXReleaseBuffersMESA(Display *dpy, Window w) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->ReleaseBuffersMESA)(dpy, w); -} - - - -/*** GLX_MESA_pixmap_colormap ***/ - -GLXPixmap glXCreateGLXPixmapMESA(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap) -{ - struct _glxapi_table *t; - GET_DISPATCH(dpy, t); - if (!t) - return 0; - return (t->CreateGLXPixmapMESA)(dpy, visinfo, pixmap, cmap); -} - - - -/*** GLX_MESA_set_3dfx_mode ***/ - -Bool glXSet3DfxModeMESA(int mode) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return False; - return (t->Set3DfxModeMESA)(mode); -} - - - -/*** AGP memory allocation ***/ - -void * -glXAllocateMemoryNV( GLsizei size, - GLfloat readFrequency, - GLfloat writeFrequency, - GLfloat priority ) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return NULL; - return (t->AllocateMemoryNV)(size, readFrequency, writeFrequency, priority); -} - - -void -glXFreeMemoryNV( GLvoid *pointer ) -{ - struct _glxapi_table *t; - Display *dpy = glXGetCurrentDisplay(); - GET_DISPATCH(dpy, t); - if (!t) - return; - (t->FreeMemoryNV)(pointer); -} - - - -/**********************************************************************/ -/* GLX API management functions */ -/**********************************************************************/ - - -const char * -_glxapi_get_version(void) -{ - return "1.3"; -} - - -/* - * Return array of extension strings. - */ -const char ** -_glxapi_get_extensions(void) -{ - static const char *extensions[] = { -#ifdef GLX_EXT_import_context - "GLX_EXT_import_context", -#endif -#ifdef GLX_SGI_video_sync - "GLX_SGI_video_sync", -#endif -#ifdef GLX_MESA_copy_sub_buffer - "GLX_MESA_copy_sub_buffer", -#endif -#ifdef GLX_MESA_release_buffers - "GLX_MESA_release_buffers", -#endif -#ifdef GLX_MESA_pixmap_colormap - "GLX_MESA_pixmap_colormap", -#endif -#ifdef GLX_MESA_set_3dfx_mode - "GLX_MESA_set_3dfx_mode", -#endif - NULL - }; - return extensions; -} - - -/* - * Return size of the GLX dispatch table, in entries, not bytes. - */ -GLuint -_glxapi_get_dispatch_table_size(void) -{ - return sizeof(struct _glxapi_table) / sizeof(void *); -} - - -static int -generic_no_op_func(void) -{ - return 0; -} - - -/* - * Initialize all functions in given dispatch table to be no-ops - */ -void -_glxapi_set_no_op_table(struct _glxapi_table *t) -{ - GLuint n = _glxapi_get_dispatch_table_size(); - GLuint i; - void **dispatch = (void **) t; - for (i = 0; i < n; i++) { - dispatch[i] = (void *) generic_no_op_func; - } -} - - -struct name_address_pair { - const char *Name; - GLvoid *Address; -}; - -static struct name_address_pair GLX_functions[] = { - /*** GLX_VERSION_1_0 ***/ - { "glXChooseVisual", (GLvoid *) glXChooseVisual }, - { "glXCopyContext", (GLvoid *) glXCopyContext }, - { "glXCreateContext", (GLvoid *) glXCreateContext }, - { "glXCreateGLXPixmap", (GLvoid *) glXCreateGLXPixmap }, - { "glXDestroyContext", (GLvoid *) glXDestroyContext }, - { "glXDestroyGLXPixmap", (GLvoid *) glXDestroyGLXPixmap }, - { "glXGetConfig", (GLvoid *) glXGetConfig }, - { "glXGetCurrentContext", (GLvoid *) glXGetCurrentContext }, - { "glXGetCurrentDrawable", (GLvoid *) glXGetCurrentDrawable }, - { "glXIsDirect", (GLvoid *) glXIsDirect }, - { "glXMakeCurrent", (GLvoid *) glXMakeCurrent }, - { "glXQueryExtension", (GLvoid *) glXQueryExtension }, - { "glXQueryVersion", (GLvoid *) glXQueryVersion }, - { "glXSwapBuffers", (GLvoid *) glXSwapBuffers }, - { "glXUseXFont", (GLvoid *) glXUseXFont }, - { "glXWaitGL", (GLvoid *) glXWaitGL }, - { "glXWaitX", (GLvoid *) glXWaitX }, - - /*** GLX_VERSION_1_1 ***/ - { "glXGetClientString", (GLvoid *) glXGetClientString }, - { "glXQueryExtensionsString", (GLvoid *) glXQueryExtensionsString }, - { "glXQueryServerString", (GLvoid *) glXQueryServerString }, - - /*** GLX_VERSION_1_2 ***/ - { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay }, - - /*** GLX_VERSION_1_3 ***/ - { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig }, - { "glXCreateNewContext", (GLvoid *) glXCreateNewContext }, - { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer }, - { "glXCreatePixmap", (GLvoid *) glXCreatePixmap }, - { "glXCreateWindow", (GLvoid *) glXCreateWindow }, - { "glXDestroyPbuffer", (GLvoid *) glXDestroyPbuffer }, - { "glXDestroyPixmap", (GLvoid *) glXDestroyPixmap }, - { "glXDestroyWindow", (GLvoid *) glXDestroyWindow }, - { "glXGetCurrentReadDrawable", (GLvoid *) glXGetCurrentReadDrawable }, - { "glXGetFBConfigAttrib", (GLvoid *) glXGetFBConfigAttrib }, - { "glXGetFBConfigs", (GLvoid *) glXGetFBConfigs }, - { "glXGetSelectedEvent", (GLvoid *) glXGetSelectedEvent }, - { "glXGetVisualFromFBConfig", (GLvoid *) glXGetVisualFromFBConfig }, - { "glXMakeContextCurrent", (GLvoid *) glXMakeContextCurrent }, - { "glXQueryContext", (GLvoid *) glXQueryContext }, - { "glXQueryDrawable", (GLvoid *) glXQueryDrawable }, - { "glXSelectEvent", (GLvoid *) glXSelectEvent }, - - /*** GLX_VERSION_1_4 ***/ - { "glXGetProcAddress", (GLvoid *) glXGetProcAddress }, - - /*** GLX_SGI_swap_control ***/ - { "glXSwapIntervalSGI", (GLvoid *) glXSwapIntervalSGI }, - - /*** GLX_SGI_video_sync ***/ - { "glXGetVideoSyncSGI", (GLvoid *) glXGetVideoSyncSGI }, - { "glXWaitVideoSyncSGI", (GLvoid *) glXWaitVideoSyncSGI }, - - /*** GLX_SGI_make_current_read ***/ - { "glXMakeCurrentReadSGI", (GLvoid *) glXMakeCurrentReadSGI }, - { "glXGetCurrentReadDrawableSGI", (GLvoid *) glXGetCurrentReadDrawableSGI }, - - /*** GLX_SGIX_video_source ***/ -#if defined(_VL_H) - { "glXCreateGLXVideoSourceSGIX", (GLvoid *) glXCreateGLXVideoSourceSGIX }, - { "glXDestroyGLXVideoSourceSGIX", (GLvoid *) glXDestroyGLXVideoSourceSGIX }, -#endif - - /*** GLX_EXT_import_context ***/ - { "glXFreeContextEXT", (GLvoid *) glXFreeContextEXT }, - { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT }, - { "glXGetCurrentDisplayEXT", (GLvoid *) glXGetCurrentDisplayEXT }, - { "glXImportContextEXT", (GLvoid *) glXImportContextEXT }, - { "glXQueryContextInfoEXT", (GLvoid *) glXQueryContextInfoEXT }, - - /*** GLX_SGIX_fbconfig ***/ - { "glXGetFBConfigAttribSGIX", (GLvoid *) glXGetFBConfigAttribSGIX }, - { "glXChooseFBConfigSGIX", (GLvoid *) glXChooseFBConfigSGIX }, - { "glXCreateGLXPixmapWithConfigSGIX", (GLvoid *) glXCreateGLXPixmapWithConfigSGIX }, - { "glXCreateContextWithConfigSGIX", (GLvoid *) glXCreateContextWithConfigSGIX }, - { "glXGetVisualFromFBConfigSGIX", (GLvoid *) glXGetVisualFromFBConfigSGIX }, - { "glXGetFBConfigFromVisualSGIX", (GLvoid *) glXGetFBConfigFromVisualSGIX }, - - /*** GLX_SGIX_pbuffer ***/ - { "glXCreateGLXPbufferSGIX", (GLvoid *) glXCreateGLXPbufferSGIX }, - { "glXDestroyGLXPbufferSGIX", (GLvoid *) glXDestroyGLXPbufferSGIX }, - { "glXQueryGLXPbufferSGIX", (GLvoid *) glXQueryGLXPbufferSGIX }, - { "glXSelectEventSGIX", (GLvoid *) glXSelectEventSGIX }, - { "glXGetSelectedEventSGIX", (GLvoid *) glXGetSelectedEventSGIX }, - - /*** GLX_SGI_cushion ***/ - { "glXCushionSGI", (GLvoid *) glXCushionSGI }, - - /*** GLX_SGIX_video_resize ***/ - { "glXBindChannelToWindowSGIX", (GLvoid *) glXBindChannelToWindowSGIX }, - { "glXChannelRectSGIX", (GLvoid *) glXChannelRectSGIX }, - { "glXQueryChannelRectSGIX", (GLvoid *) glXQueryChannelRectSGIX }, - { "glXQueryChannelDeltasSGIX", (GLvoid *) glXQueryChannelDeltasSGIX }, - { "glXChannelRectSyncSGIX", (GLvoid *) glXChannelRectSyncSGIX }, - - /*** GLX_SGIX_dmbuffer **/ -#if defined(_DM_BUFFER_H_) - { "glXAssociateDMPbufferSGIX", (GLvoid *) glXAssociateDMPbufferSGIX }, -#endif - - /*** GLX_SGIX_swap_group ***/ - { "glXJoinSwapGroupSGIX", (GLvoid *) glXJoinSwapGroupSGIX }, - - /*** GLX_SGIX_swap_barrier ***/ - { "glXBindSwapBarrierSGIX", (GLvoid *) glXBindSwapBarrierSGIX }, - { "glXQueryMaxSwapBarriersSGIX", (GLvoid *) glXQueryMaxSwapBarriersSGIX }, - - /*** GLX_SUN_get_transparent_index ***/ - { "glXGetTransparentIndexSUN", (GLvoid *) glXGetTransparentIndexSUN }, - - /*** GLX_MESA_copy_sub_buffer ***/ - { "glXCopySubBufferMESA", (GLvoid *) glXCopySubBufferMESA }, - - /*** GLX_MESA_pixmap_colormap ***/ - { "glXCreateGLXPixmapMESA", (GLvoid *) glXCreateGLXPixmapMESA }, - - /*** GLX_MESA_release_buffers ***/ - { "glXReleaseBuffersMESA", (GLvoid *) glXReleaseBuffersMESA }, - - /*** GLX_MESA_set_3dfx_mode ***/ - { "glXSet3DfxModeMESA", (GLvoid *) glXSet3DfxModeMESA }, - - /*** GLX_ARB_get_proc_address ***/ - { "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB }, - - /*** GLX AGP memory allocation ***/ - { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV }, - { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV }, - - { NULL, NULL } /* end of list */ -}; - - - -/* - * Return address of named glX function, or NULL if not found. - */ -const GLvoid * -_glxapi_get_proc_address(const char *funcName) -{ - GLuint i; - for (i = 0; GLX_functions[i].Name; i++) { - if (strcmp(GLX_functions[i].Name, funcName) == 0) - return GLX_functions[i].Address; - } - return NULL; -} - - - -/* - * This function does not get dispatched through the dispatch table - * since it's really a "meta" function. - */ -void (*glXGetProcAddressARB(const GLubyte *procName))() -{ - typedef void (*gl_function)(); - gl_function f; - - f = (gl_function) _glxapi_get_proc_address((const char *) procName); - if (f) { - return f; - } - - f = (gl_function) _glapi_get_proc_address((const char *) procName); - return f; -} - - -/* GLX 1.4 */ -void (*glXGetProcAddress(const GLubyte *procName))() -{ - return glXGetProcAddressARB(procName); -} Index: xc/extras/Mesa/src/X/glxapi.h diff -u xc/extras/Mesa/src/X/glxapi.h:1.9 xc/extras/Mesa/src/X/glxapi.h:removed --- xc/extras/Mesa/src/X/glxapi.h:1.9 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/glxapi.h Wed Mar 16 21:00:47 2005 @@ -1,231 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.0.2 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _glxapi_h_ -#define _glxapi_h_ - - -#define GLX_GLXEXT_PROTOTYPES -#include "GL/glx.h" - - -#ifdef GLX_BUILT_IN_XMESA -/* The GLX API dispatcher (i.e. this code) is being built into XFree86's - * libGL so we'll use the __GLXContextRec defined in xc/lib/GL/glx/glxclient.h -*/ -#include "glxclient.h" -#else -/* The GLX API dispatcher (i.e. this code) is being built into stand-alone - * Mesa. We don't know anything about XFree86 or real GLX so we define a - * minimal __GLXContextRec here so some of the functions in this file can - * work properly. - */ -typedef struct __GLXcontextRec { - Display *currentDpy; - GLboolean isDirect; - GLXDrawable currentDrawable; - GLXDrawable currentReadable; - XID xid; -} __GLXcontext; -#endif - - -/* - * Almost all the GLX API functions get routed through this dispatch table. - * The exceptions are the glXGetCurrentXXX() functions. - * - * This dispatch table allows multiple GLX client-side modules to coexist. - * Specifically, a real GLX library (like SGI's or the Utah GLX) and Mesa's - * pseudo-GLX can be present at the same time. The former being used on - * GLX-enabled X servers and the later on non-GLX X servers. - * - * Red Hat has been using this since Red Hat Linux 7.0 (I think). - * This'll be a standard feature in XFree86 4.3. It basically allows one - * libGL to do both DRI-rendering and "fake GLX" rendering to X displays - * that lack the GLX extension. - */ -struct _glxapi_table { - /*** GLX_VERSION_1_0 ***/ - XVisualInfo *(*ChooseVisual)(Display *dpy, int screen, int *list); - void (*CopyContext)(Display *dpy, GLXContext src, GLXContext dst, unsigned long mask); - GLXContext (*CreateContext)(Display *dpy, XVisualInfo *visinfo, GLXContext shareList, Bool direct); - GLXPixmap (*CreateGLXPixmap)(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap); - void (*DestroyContext)(Display *dpy, GLXContext ctx); - void (*DestroyGLXPixmap)(Display *dpy, GLXPixmap pixmap); - int (*GetConfig)(Display *dpy, XVisualInfo *visinfo, int attrib, int *value); - /*GLXContext (*GetCurrentContext)(void);*/ - /*GLXDrawable (*GetCurrentDrawable)(void);*/ - Bool (*IsDirect)(Display *dpy, GLXContext ctx); - Bool (*MakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx); - Bool (*QueryExtension)(Display *dpy, int *errorb, int *event); - Bool (*QueryVersion)(Display *dpy, int *maj, int *min); - void (*SwapBuffers)(Display *dpy, GLXDrawable drawable); - void (*UseXFont)(Font font, int first, int count, int listBase); - void (*WaitGL)(void); - void (*WaitX)(void); - - /*** GLX_VERSION_1_1 ***/ - const char *(*GetClientString)(Display *dpy, int name); - const char *(*QueryExtensionsString)(Display *dpy, int screen); - const char *(*QueryServerString)(Display *dpy, int screen, int name); - - /*** GLX_VERSION_1_2 ***/ - /*Display *(*GetCurrentDisplay)(void);*/ - - /*** GLX_VERSION_1_3 ***/ - GLXFBConfig *(*ChooseFBConfig)(Display *dpy, int screen, const int *attribList, int *nitems); - GLXContext (*CreateNewContext)(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct); - GLXPbuffer (*CreatePbuffer)(Display *dpy, GLXFBConfig config, const int *attribList); - GLXPixmap (*CreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList); - GLXWindow (*CreateWindow)(Display *dpy, GLXFBConfig config, Window win, const int *attribList); - void (*DestroyPbuffer)(Display *dpy, GLXPbuffer pbuf); - void (*DestroyPixmap)(Display *dpy, GLXPixmap pixmap); - void (*DestroyWindow)(Display *dpy, GLXWindow window); - /*GLXDrawable (*GetCurrentReadDrawable)(void);*/ - int (*GetFBConfigAttrib)(Display *dpy, GLXFBConfig config, int attribute, int *value); - GLXFBConfig *(*GetFBConfigs)(Display *dpy, int screen, int *nelements); - void (*GetSelectedEvent)(Display *dpy, GLXDrawable drawable, unsigned long *mask); - XVisualInfo *(*GetVisualFromFBConfig)(Display *dpy, GLXFBConfig config); - Bool (*MakeContextCurrent)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); - int (*QueryContext)(Display *dpy, GLXContext ctx, int attribute, int *value); - void (*QueryDrawable)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); - void (*SelectEvent)(Display *dpy, GLXDrawable drawable, unsigned long mask); - - /*** GLX_SGI_swap_control ***/ - int (*SwapIntervalSGI)(int); - - /*** GLX_SGI_video_sync ***/ - int (*GetVideoSyncSGI)(unsigned int *count); - int (*WaitVideoSyncSGI)(int divisor, int remainder, unsigned int *count); - - /*** GLX_SGI_make_current_read ***/ - Bool (*MakeCurrentReadSGI)(Display *, GLXDrawable, GLXDrawable, GLXContext); - /*GLXDrawable (*GetCurrentReadDrawableSGI)(void);*/ - - /*** GLX_SGIX_video_source (needs video library) ***/ -#if defined(_VL_H_) - GLXVideoSourceSGIX (*CreateGLXVideoSourceSGIX)(Display *, int, VLServer, VLPath, int, VLNode); - void (*DestroyGLXVideoSourceSGIX)(Display *, GLXVideoSourceSGIX); -#else - void *CreateGLXVideoSourceSGIX; - void *DestroyGLXVideoSourceSGIX; -#endif - - /*** GLX_EXT_import_context ***/ - void (*FreeContextEXT)(Display *dpy, GLXContext context); - GLXContextID (*GetContextIDEXT)(const GLXContext context); - /*Display *(*GetCurrentDisplayEXT)(void);*/ - GLXContext (*ImportContextEXT)(Display *dpy, GLXContextID contextID); - int (*QueryContextInfoEXT)(Display *dpy, GLXContext context, int attribute,int *value); - - /*** GLX_SGIX_fbconfig ***/ - int (*GetFBConfigAttribSGIX)(Display *, GLXFBConfigSGIX, int, int *); - GLXFBConfigSGIX * (*ChooseFBConfigSGIX)(Display *, int, int *, int *); - GLXPixmap (*CreateGLXPixmapWithConfigSGIX)(Display *, GLXFBConfigSGIX, Pixmap); - GLXContext (*CreateContextWithConfigSGIX)(Display *, GLXFBConfigSGIX, int, GLXContext, Bool); - XVisualInfo * (*GetVisualFromFBConfigSGIX)(Display *, GLXFBConfigSGIX); - GLXFBConfigSGIX (*GetFBConfigFromVisualSGIX)(Display *, XVisualInfo *); - - /*** GLX_SGIX_pbuffer ***/ - GLXPbufferSGIX (*CreateGLXPbufferSGIX)(Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *); - void (*DestroyGLXPbufferSGIX)(Display *, GLXPbufferSGIX); - int (*QueryGLXPbufferSGIX)(Display *, GLXPbufferSGIX, int, unsigned int *); - void (*SelectEventSGIX)(Display *, GLXDrawable, unsigned long); - void (*GetSelectedEventSGIX)(Display *, GLXDrawable, unsigned long *); - - /*** GLX_SGI_cushion ***/ - void (*CushionSGI)(Display *, Window, float); - - /*** GLX_SGIX_video_resize ***/ - int (*BindChannelToWindowSGIX)(Display *, int, int, Window); - int (*ChannelRectSGIX)(Display *, int, int, int, int, int, int); - int (*QueryChannelRectSGIX)(Display *, int, int, int *, int *, int *, int *); - int (*QueryChannelDeltasSGIX)(Display *, int, int, int *, int *, int *, int *); - int (*ChannelRectSyncSGIX)(Display *, int, int, GLenum); - - /*** GLX_SGIX_dmbuffer (needs dmedia library) ***/ -#if defined (_DM_BUFFER_H_) - Bool (*AssociateDMPbufferSGIX)(Display *, GLXPbufferSGIX, DMparams *, DMbuffer); -#else - void *AssociciateDMPbufferSGIX; -#endif - - /*** GLX_SGIX_swap_group ***/ - void (*JoinSwapGroupSGIX)(Display *, GLXDrawable, GLXDrawable); - - /*** GLX_SGIX_swap_barrier ***/ - void (*BindSwapBarrierSGIX)(Display *, GLXDrawable, int); - Bool (*QueryMaxSwapBarriersSGIX)(Display *, int, int *); - - /*** GLX_SUN_get_transparent_index ***/ - Status (*GetTransparentIndexSUN)(Display *, Window, Window, long *); - - /*** GLX_MESA_copy_sub_buffer ***/ - void (*CopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); - - /*** GLX_MESA_release_buffers ***/ - Bool (*ReleaseBuffersMESA)(Display *dpy, Window w); - - /*** GLX_MESA_pixmap_colormap ***/ - GLXPixmap (*CreateGLXPixmapMESA)(Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap); - - /*** GLX_MESA_set_3dfx_mode ***/ - Bool (*Set3DfxModeMESA)(int mode); - - /*** GLX_NV_vertex_array_range ***/ - void * (*AllocateMemoryNV)( GLsizei size, - GLfloat readFrequency, - GLfloat writeFrequency, - GLfloat priority ); - void (*FreeMemoryNV)( GLvoid *pointer ); - - /*** GLX_MESA_agp_offset ***/ - GLuint (*GetAGPOffsetMESA)( const GLvoid *pointer ); -}; - - - -extern const char * -_glxapi_get_version(void); - - -extern const char ** -_glxapi_get_extensions(void); - - -extern GLuint -_glxapi_get_dispatch_table_size(void); - - -extern void -_glxapi_set_no_op_table(struct _glxapi_table *t); - - -extern const GLvoid * -_glxapi_get_proc_address(const char *funcName); - - -#endif Index: xc/extras/Mesa/src/X/glxheader.h diff -u xc/extras/Mesa/src/X/glxheader.h:1.5 xc/extras/Mesa/src/X/glxheader.h:removed --- xc/extras/Mesa/src/X/glxheader.h:1.5 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/glxheader.h Wed Mar 16 21:00:47 2005 @@ -1,71 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLX_HEADER_H -#define GLX_HEADER_H - -#ifdef __VMS -#include -#endif - -#ifdef HAVE_CONFIG_H -#include "conf.h" -#endif - - -#include "glheader.h" - - -#ifdef XFree86Server - -# include "resource.h" -# include "windowstr.h" -# include "gcstruct.h" -# include "GL/xf86glx.h" -# include "xf86glx_util.h" - -#else - -# include -# include -# ifdef USE_XSHM /* was SHM */ -# include -# include -# include -# endif -# include - -#endif - - - -/* this silences a compiler warning on several systems */ -struct timespec; -struct itimerspec; - - - -#endif /*GLX_HEADER*/ Index: xc/extras/Mesa/src/X/realglx.c diff -u xc/extras/Mesa/src/X/realglx.c:1.8 xc/extras/Mesa/src/X/realglx.c:removed --- xc/extras/Mesa/src/X/realglx.c:1.8 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/realglx.c Wed Mar 16 21:00:47 2005 @@ -1,180 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include "realglx.h" -#include "glxapi.h" - - -struct _glxapi_table * -_real_GetGLXDispatchTable(void) -{ - static struct _glxapi_table glx; - - /* be sure our dispatch table size <= libGL's table */ - { - GLuint size = sizeof(struct _glxapi_table) / sizeof(void *); - (void) size; - assert(_glxapi_get_dispatch_table_size() >= size); - } - - /* initialize the whole table to no-ops */ - _glxapi_set_no_op_table(&glx); - - /* now initialize the table with the functions I implement */ - - /*** GLX_VERSION_1_0 ***/ - glx.ChooseVisual = _real_glXChooseVisual; - glx.CopyContext = _real_glXCopyContext; - glx.CreateContext = _real_glXCreateContext; - glx.CreateGLXPixmap = _real_glXCreateGLXPixmap; - glx.DestroyContext = _real_glXDestroyContext; - glx.DestroyGLXPixmap = _real_glXDestroyGLXPixmap; - glx.GetConfig = _real_glXGetConfig; - /*glx.GetCurrentContext = _real_glXGetCurrentContext;*/ - /*glx.GetCurrentDrawable = _real_glXGetCurrentDrawable;*/ - glx.IsDirect = _real_glXIsDirect; - glx.MakeCurrent = _real_glXMakeCurrent; - glx.QueryExtension = _real_glXQueryExtension; - glx.QueryVersion = _real_glXQueryVersion; - glx.SwapBuffers = _real_glXSwapBuffers; - glx.UseXFont = _real_glXUseXFont; - glx.WaitGL = _real_glXWaitGL; - glx.WaitX = _real_glXWaitX; - - /*** GLX_VERSION_1_1 ***/ - glx.GetClientString = _real_glXGetClientString; - glx.QueryExtensionsString = _real_glXQueryExtensionsString; - glx.QueryServerString = _real_glXQueryServerString; - - /*** GLX_VERSION_1_2 ***/ - /*glx.GetCurrentDisplay = _real_glXGetCurrentDisplay;*/ - - /*** GLX_VERSION_1_3 ***/ - glx.ChooseFBConfig = _real_glXChooseFBConfig; - glx.CreateNewContext = _real_glXCreateNewContext; - glx.CreatePbuffer = _real_glXCreatePbuffer; - glx.CreatePixmap = _real_glXCreatePixmap; - glx.CreateWindow = _real_glXCreateWindow; - glx.DestroyPbuffer = _real_glXDestroyPbuffer; - glx.DestroyPixmap = _real_glXDestroyPixmap; - glx.DestroyWindow = _real_glXDestroyWindow; - /*glx.GetCurrentReadDrawable = _real_glXGetCurrentReadDrawable;*/ - glx.GetFBConfigAttrib = _real_glXGetFBConfigAttrib; - glx.GetFBConfigs = _real_glXGetFBConfigs; - glx.GetSelectedEvent = _real_glXGetSelectedEvent; - glx.GetVisualFromFBConfig = _real_glXGetVisualFromFBConfig; - glx.MakeContextCurrent = _real_glXMakeContextCurrent; - glx.QueryContext = _real_glXQueryContext; - glx.QueryDrawable = _real_glXQueryDrawable; - glx.SelectEvent = _real_glXSelectEvent; - - /*** GLX_SGI_swap_control ***/ - glx.SwapIntervalSGI = _real_glXSwapIntervalSGI; - - /*** GLX_SGI_video_sync ***/ - glx.GetVideoSyncSGI = _real_glXGetVideoSyncSGI; - glx.WaitVideoSyncSGI = _real_glXWaitVideoSyncSGI; - - /*** GLX_SGI_make_current_read ***/ - glx.MakeCurrentReadSGI = _real_glXMakeCurrentReadSGI; - /*glx.GetCurrentReadDrawableSGI = _real_glXGetCurrentReadDrawableSGI;*/ - -#if defined(_VL_H) - /*** GLX_SGIX_video_source ***/ - glx.CreateGLXVideoSourceSGIX = _real_glXCreateGLXVideoSourceSGIX; - glx.DestroyGLXVideoSourceSGIX = _real_glXDestroyGLXVideoSourceSGIX; -#endif - - /*** GLX_EXT_import_context ***/ - glx.FreeContextEXT = _real_glXFreeContextEXT; - /*glx.GetContextIDEXT = _real_glXGetContextIDEXT;*/ - /*glx.GetCurrentDisplayEXT = _real_glXGetCurrentDisplayEXT;*/ - glx.ImportContextEXT = _real_glXImportContextEXT; - glx.QueryContextInfoEXT = _real_glXQueryContextInfoEXT; - - /*** GLX_SGIX_fbconfig ***/ - glx.GetFBConfigAttribSGIX = _real_glXGetFBConfigAttribSGIX; - glx.ChooseFBConfigSGIX = _real_glXChooseFBConfigSGIX; - glx.CreateGLXPixmapWithConfigSGIX = _real_glXCreateGLXPixmapWithConfigSGIX; - glx.CreateContextWithConfigSGIX = _real_glXCreateContextWithConfigSGIX; - glx.GetVisualFromFBConfigSGIX = _real_glXGetVisualFromFBConfigSGIX; - glx.GetFBConfigFromVisualSGIX = _real_glXGetFBConfigFromVisualSGIX; - - /*** GLX_SGIX_pbuffer ***/ - glx.CreateGLXPbufferSGIX = _real_glXCreateGLXPbufferSGIX; - glx.DestroyGLXPbufferSGIX = _real_glXDestroyGLXPbufferSGIX; - glx.QueryGLXPbufferSGIX = _real_glXQueryGLXPbufferSGIX; - glx.SelectEventSGIX = _real_glXSelectEventSGIX; - glx.GetSelectedEventSGIX = _real_glXGetSelectedEventSGIX; - - /*** GLX_SGI_cushion ***/ - glx.CushionSGI = _real_glXCushionSGI; - - /*** GLX_SGIX_video_resize ***/ - glx.BindChannelToWindowSGIX = _real_glXBindChannelToWindowSGIX; - glx.ChannelRectSGIX = _real_glXChannelRectSGIX; - glx.QueryChannelRectSGIX = _real_glXQueryChannelRectSGIX; - glx.QueryChannelDeltasSGIX = _real_glXQueryChannelDeltasSGIX; - glx.ChannelRectSyncSGIX = _real_glXChannelRectSyncSGIX; - -#if defined(_DM_BUFFER_H_) - /*** (GLX_SGIX_dmbuffer ***/ - glx.AssociateDMPbufferSGIX = NULL; -#endif - - /*** GLX_SGIX_swap_group ***/ - glx.JoinSwapGroupSGIX = _real_glXJoinSwapGroupSGIX; - - /*** GLX_SGIX_swap_barrier ***/ - glx.BindSwapBarrierSGIX = _real_glXBindSwapBarrierSGIX; - glx.QueryMaxSwapBarriersSGIX = _real_glXQueryMaxSwapBarriersSGIX; - - /*** GLX_SUN_get_transparent_index ***/ - glx.GetTransparentIndexSUN = _real_glXGetTransparentIndexSUN; - - /*** GLX_MESA_copy_sub_buffer ***/ - glx.CopySubBufferMESA = _real_glXCopySubBufferMESA; - - /*** GLX_MESA_release_buffers ***/ - glx.ReleaseBuffersMESA = _real_glXReleaseBuffersMESA; - - /*** GLX_MESA_pixmap_colormap ***/ - glx.CreateGLXPixmapMESA = _real_glXCreateGLXPixmapMESA; - - /*** GLX_MESA_set_3dfx_mode ***/ - glx.Set3DfxModeMESA = _real_glXSet3DfxModeMESA; - - /*** GLX_NV_vertex_array_range ***/ - glx.AllocateMemoryNV = _real_glXAllocateMemoryNV; - glx.FreeMemoryNV = _real_glXFreeMemoryNV; - - /*** GLX_MESA_agp_offset ***/ - glx.GetAGPOffsetMESA = _real_glXGetAGPOffsetMESA; - - return &glx; -} Index: xc/extras/Mesa/src/X/realglx.h diff -u xc/extras/Mesa/src/X/realglx.h:1.8 xc/extras/Mesa/src/X/realglx.h:removed --- xc/extras/Mesa/src/X/realglx.h:1.8 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/realglx.h Wed Mar 16 21:00:47 2005 @@ -1,326 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef REALGLX_H -#define REALGLX_H - - -extern struct _glxapi_table * -_real_GetGLXDispatchTable(void); - - -/* - * Basically just need these to prevent compiler warnings. - */ - - -extern XVisualInfo * -_real_glXChooseVisual( Display *dpy, int screen, int *list ); - -extern GLXContext -_real_glXCreateContext( Display *dpy, XVisualInfo *visinfo, - GLXContext share_list, Bool direct ); - -extern GLXPixmap -_real_glXCreateGLXPixmap( Display *dpy, XVisualInfo *visinfo, Pixmap pixmap ); - -extern GLXPixmap -_real_glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visinfo, - Pixmap pixmap, Colormap cmap ); - -extern void -_real_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ); - -extern void -_real_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, - unsigned long mask ); - -extern Bool -_real_glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx ); - -extern Bool -_real_glXQueryExtension( Display *dpy, int *errorb, int *event ); - -extern void -_real_glXDestroyContext( Display *dpy, GLXContext ctx ); - -extern Bool -_real_glXIsDirect( Display *dpy, GLXContext ctx ); - -extern void -_real_glXSwapBuffers( Display *dpy, GLXDrawable drawable ); - -extern void -_real_glXUseXFont( Font font, int first, int count, int listbase ); - -extern Bool -_real_glXQueryVersion( Display *dpy, int *maj, int *min ); - -extern int -_real_glXGetConfig( Display *dpy, XVisualInfo *visinfo, - int attrib, int *value ); - -extern void -_real_glXWaitGL( void ); - - -extern void -_real_glXWaitX( void ); - -/* GLX 1.1 and later */ -extern const char * -_real_glXQueryExtensionsString( Display *dpy, int screen ); - -/* GLX 1.1 and later */ -extern const char * -_real_glXQueryServerString( Display *dpy, int screen, int name ); - -/* GLX 1.1 and later */ -extern const char * -_real_glXGetClientString( Display *dpy, int name ); - - -/* - * GLX 1.3 and later - */ - -extern GLXFBConfig * -_real_glXChooseFBConfig( Display *dpy, int screen, - const int *attribList, int *nitems ); - -extern int -_real_glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, - int attribute, int *value ); - -extern GLXFBConfig * -_real_glXGetFBConfigs( Display *dpy, int screen, int *nelements ); - -extern XVisualInfo * -_real_glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ); - -extern GLXWindow -_real_glXCreateWindow( Display *dpy, GLXFBConfig config, Window win, - const int *attribList ); - -extern void -_real_glXDestroyWindow( Display *dpy, GLXWindow window ); - -extern GLXPixmap -_real_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap, - const int *attribList ); - -extern void -_real_glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); - -extern GLXPbuffer -_real_glXCreatePbuffer( Display *dpy, GLXFBConfig config, - const int *attribList ); - -extern void -_real_glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); - -extern void -_real_glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, - unsigned int *value ); - -extern GLXContext -_real_glXCreateNewContext( Display *dpy, GLXFBConfig config, - int renderType, GLXContext shareList, Bool direct ); - - -extern Bool -_real_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext ctx ); - -extern int -_real_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value ); - -extern void -_real_glXSelectEvent( Display *dpy, GLXDrawable drawable, unsigned long mask ); - -extern void -_real_glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, - unsigned long *mask ); - -#ifdef GLX_SGI_swap_control -extern int -_real_glXSwapIntervalSGI(int interval); -#endif - - -#ifdef GLX_SGI_video_sync -extern int -_real_glXGetVideoSyncSGI(unsigned int *count); - -extern int -_real_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count); -#endif - - -#ifdef GLX_SGI_make_current_read -extern Bool -_real_glXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); - -extern GLXDrawable -_real_glXGetCurrentReadDrawableSGI(void); -#endif - -#if defined(_VL_H) && defined(GLX_SGIX_video_source) -extern GLXVideoSourceSGIX -_real_glXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); - -extern void -_real_glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src); -#endif - -#ifdef GLX_EXT_import_context -extern void -_real_glXFreeContextEXT(Display *dpy, GLXContext context); - -extern GLXContextID -_real_glXGetContextIDEXT(const GLXContext context); - -extern Display * -_real_glXGetCurrentDisplayEXT(void); - -extern GLXContext -_real_glXImportContextEXT(Display *dpy, GLXContextID contextID); - -extern int -_real_glXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute, int *value); -#endif - -#ifdef GLX_SGIX_fbconfig -extern int -_real_glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); - -extern GLXFBConfigSGIX * -_real_glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements); - -extern GLXPixmap -_real_glXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); - -extern GLXContext -_real_glXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); - -extern XVisualInfo * -_real_glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config); - -extern GLXFBConfigSGIX -_real_glXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis); -#endif - -#ifdef GLX_SGIX_pbuffer -extern GLXPbufferSGIX -_real_glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); - -extern void -_real_glXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf); - -extern int -_real_glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); - -extern void -_real_glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask); - -extern void -_real_glXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask); -#endif - -#ifdef GLX_SGI_cushion -extern void -_real_glXCushionSGI(Display *dpy, Window win, float cushion); -#endif - -#ifdef GLX_SGIX_video_resize -extern int -_real_glXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window); - -extern int -_real_glXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h); - -extern int -_real_glXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h); - -extern int -_real_glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh); - -extern int -_real_glXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype); -#endif - -#if defined(_DM_BUFFER_H_) && defined(GLX_SGIX_dmbuffer) -extern Bool -_real_glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif - -#ifdef GLX_SGIX_swap_group -extern void -_real_glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member); -#endif - -#ifdef GLX_SGIX_swap_barrier -extern void -_real_glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable, int barrier); - -extern Bool -_real_glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max); -#endif - -#ifdef GLX_SUN_get_transparent_index -extern Status -_real_glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay, long *pTransparent); -#endif - -#ifdef GLX_MESA_release_buffers -extern Bool -_real_glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ); -#endif - -#ifdef GLX_MESA_set_3dfx_mode -extern Bool -_real_glXSet3DfxModeMESA( int mode ); -#endif - -#ifdef GLX_NV_vertex_array_range -extern void * -_real_glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void -_real_glXFreeMemoryNV(GLvoid *pointer); -#endif - -#ifdef GLX_MESA_agp_offset -extern GLuint -_real_glXGetAGPOffsetMESA(const GLvoid *pointer); -#endif - -#ifdef GLX_MESA_copy_sub_buffer -extern void -_real_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ); -#endif - -#endif /* REALGLX_H */ Index: xc/extras/Mesa/src/X/xfonts.c diff -u xc/extras/Mesa/src/X/xfonts.c:1.10 xc/extras/Mesa/src/X/xfonts.c:removed --- xc/extras/Mesa/src/X/xfonts.c:1.10 Sun Sep 28 15:17:05 2003 +++ xc/extras/Mesa/src/X/xfonts.c Wed Mar 16 21:00:47 2005 @@ -1,375 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* xfonts.c -- glXUseXFont() for Mesa written by - * Copyright (C) 1995 Thorsten.Ohl @ Physik.TH-Darmstadt.de - */ - -#ifdef __VMS -#include -#endif - -#include "glxheader.h" -#include "context.h" -#include "imports.h" -#include "xfonts.h" - - -/* Some debugging info. */ - -#ifdef DEBUG -#undef _R -#undef _G -#undef _B -#include - -int debug_xfonts = 0; - -static void -dump_char_struct (XCharStruct *ch, char *prefix) -{ - printf ("%slbearing = %d, rbearing = %d, width = %d\n", - prefix, ch->lbearing, ch->rbearing, ch->width); - printf ("%sascent = %d, descent = %d, attributes = %u\n", - prefix, ch->ascent, ch->descent, (unsigned int) ch->attributes); -} - -static void -dump_font_struct (XFontStruct *font) -{ - printf ("ascent = %d, descent = %d\n", font->ascent, font->descent); - printf ("char_or_byte2 = (%u,%u)\n", - font->min_char_or_byte2, font->max_char_or_byte2); - printf ("byte1 = (%u,%u)\n", font->min_byte1, font->max_byte1); - printf ("all_chars_exist = %s\n", font->all_chars_exist ? "True" : -"False"); - printf ("default_char = %c (\\%03o)\n", - (char) (isprint (font->default_char) ? font->default_char : ' '), - font->default_char); - dump_char_struct (&font->min_bounds, "min> "); - dump_char_struct (&font->max_bounds, "max> "); -#if 0 - for (c = font->min_char_or_byte2; c <= font->max_char_or_byte2; c++) - { - char prefix[8]; - sprintf (prefix, "%d> ", c); - dump_char_struct (&font->per_char[c], prefix); - } -#endif -} - -static void -dump_bitmap (unsigned int width, unsigned int height, GLubyte *bitmap) -{ - unsigned int x, y; - - printf (" "); - for (x = 0; x < 8*width; x++) - printf ("%o", 7 - (x % 8)); - putchar ('\n'); - for (y = 0; y < height; y++) - { - printf ("%3o:", y); - for (x = 0; x < 8*width; x++) - putchar ((bitmap[width*(height - y - 1) + x/8] & (1 << (7 - (x % -8)))) - ? '*' : '.'); - printf (" "); - for (x = 0; x < width; x++) - printf ("0x%02x, ", bitmap[width*(height - y - 1) + x]); - putchar ('\n'); - } -} -#endif /* DEBUG */ - - -/* Implementation. */ - -/* Fill a BITMAP with a character C from thew current font - in the graphics context GC. WIDTH is the width in bytes - and HEIGHT is the height in bits. - - Note that the generated bitmaps must be used with - - glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - - Possible optimizations: - - * use only one reusable pixmap with the maximum dimensions. - * draw the entire font into a single pixmap (careful with - proportional fonts!). -*/ - - -/* - * Generate OpenGL-compatible bitmap. - */ -static void -fill_bitmap (Display *dpy, Window win, GC gc, - unsigned int width, unsigned int height, - int x0, int y0, unsigned int c, GLubyte *bitmap) -{ - XImage *image; - unsigned int x, y; - Pixmap pixmap; - XChar2b char2b; - - pixmap = XCreatePixmap (dpy, win, 8*width, height, 1); - XSetForeground(dpy, gc, 0); - XFillRectangle (dpy, pixmap, gc, 0, 0, 8*width, height); - XSetForeground(dpy, gc, 1); - - char2b.byte1 = (c >> 8) & 0xff; - char2b.byte2 = (c & 0xff); - - XDrawString16 (dpy, pixmap, gc, x0, y0, &char2b, 1); - - image = XGetImage (dpy, pixmap, 0, 0, 8*width, height, 1, XYPixmap); - if (image) { - /* Fill the bitmap (X11 and OpenGL are upside down wrt each other). */ - for (y = 0; y < height; y++) - for (x = 0; x < 8*width; x++) - if (XGetPixel (image, x, y)) - bitmap[width*(height - y - 1) + x/8] |= (1 << (7 - (x % 8))); - XDestroyImage (image); - } - - XFreePixmap (dpy, pixmap); -} - -/* - * determine if a given glyph is valid and return the - * corresponding XCharStruct. - */ -static XCharStruct *isvalid(XFontStruct *fs, unsigned int which) -{ - unsigned int rows,pages; - unsigned int byte1 = 0,byte2 = 0; - int i,valid = 1; - - rows = fs->max_byte1 - fs->min_byte1 + 1; - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - - if (rows == 1) { - /* "linear" fonts */ - if ((fs->min_char_or_byte2 > which) || - (fs->max_char_or_byte2 < which)) valid = 0; - } else { - /* "matrix" fonts */ - byte2 = which & 0xff; - byte1 = which >> 8; - if ((fs->min_char_or_byte2 > byte2) || - (fs->max_char_or_byte2 < byte2) || - (fs->min_byte1 > byte1) || - (fs->max_byte1 < byte1)) valid = 0; - } - - if (valid) { - if (fs->per_char) { - if (rows == 1) { - /* "linear" fonts */ - return(fs->per_char + (which-fs->min_char_or_byte2) ); - } else { - /* "matrix" fonts */ - i = ((byte1 - fs->min_byte1) * pages) + - (byte2 - fs->min_char_or_byte2); - return(fs->per_char + i); - } - } else { - return(&fs->min_bounds); - } - } - return(NULL); -} - - -void Fake_glXUseXFont( Font font, int first, int count, int listbase ) -{ - Display *dpy; - Window win; - Pixmap pixmap; - GC gc; - XGCValues values; - unsigned long valuemask; - XFontStruct *fs; - GLint swapbytes, lsbfirst, rowlength; - GLint skiprows, skippixels, alignment; - unsigned int max_width, max_height, max_bm_width, max_bm_height; - GLubyte *bm; - int i; - - dpy = glXGetCurrentDisplay(); - if (!dpy) - return; /* I guess glXMakeCurrent wasn't called */ - win = RootWindow(dpy, DefaultScreen(dpy)); - - fs = XQueryFont (dpy, font); - if (!fs) { - _mesa_error(NULL, GL_INVALID_VALUE, - "Couldn't get font structure information"); - return; - } - - /* Allocate a bitmap that can fit all characters. */ - max_width = fs->max_bounds.rbearing - fs->min_bounds.lbearing; - max_height = fs->max_bounds.ascent + fs->max_bounds.descent; - max_bm_width = (max_width + 7) / 8; - max_bm_height = max_height; - - bm = (GLubyte *) MALLOC((max_bm_width * max_bm_height) * sizeof -(GLubyte)); - if (!bm) { - XFreeFontInfo( NULL, fs, 1 ); - _mesa_error(NULL, GL_OUT_OF_MEMORY, - "Couldn't allocate bitmap in glXUseXFont()"); - return; - } - -#if 0 - /* get the page info */ - pages = fs->max_char_or_byte2 - fs->min_char_or_byte2 + 1; - firstchar = (fs->min_byte1 << 8) + fs->min_char_or_byte2; - lastchar = (fs->max_byte1 << 8) + fs->max_char_or_byte2; - rows = fs->max_byte1 - fs->min_byte1 + 1; - unsigned int first_char, last_char, pages, rows; -#endif - - /* Save the current packing mode for bitmaps. */ - glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes); - glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst); - glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength); - glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows); - glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels); - glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment); - - /* Enforce a standard packing mode which is compatible with - fill_bitmap() from above. This is actually the default mode, - except for the (non)alignment. */ - glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE); - glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); - glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei (GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - - pixmap = XCreatePixmap (dpy, win, 10, 10, 1); - values.foreground = BlackPixel (dpy, DefaultScreen (dpy)); - values.background = WhitePixel (dpy, DefaultScreen (dpy)); - values.font = fs->fid; - valuemask = GCForeground | GCBackground | GCFont; - gc = XCreateGC (dpy, pixmap, valuemask, &values); - XFreePixmap (dpy, pixmap); - -#ifdef DEBUG - if (debug_xfonts) - dump_font_struct (fs); -#endif - - for (i = 0; i < count; i++) - { - unsigned int width, height, bm_width, bm_height; - GLfloat x0, y0, dx, dy; - XCharStruct *ch; - int x, y; - unsigned int c = first + i; - int list = listbase + i; - int valid; - - /* check on index validity and get the bounds */ - ch = isvalid(fs, c); - if (!ch) { - ch = &fs->max_bounds; - valid = 0; - } else { - valid = 1; - } - -#ifdef DEBUG - if (debug_xfonts) { - char s[7]; - sprintf (s, isprint (c) ? "%c> " : "\\%03o> ", c); - dump_char_struct (ch, s); - } -#endif - - /* glBitmap()' parameters: - straight from the glXUseXFont(3) manpage. */ - width = ch->rbearing - ch->lbearing; - height = ch->ascent + ch->descent; - x0 = - ch->lbearing; - y0 = ch->descent - 0; /* XXX used to subtract 1 here */ - /* but that caused a conformace failure */ - dx = ch->width; - dy = 0; - - /* X11's starting point. */ - x = - ch->lbearing; - y = ch->ascent; - - /* Round the width to a multiple of eight. We will use this also - for the pixmap for capturing the X11 font. This is slightly - inefficient, but it makes the OpenGL part real easy. */ - bm_width = (width + 7) / 8; - bm_height = height; - - glNewList (list, GL_COMPILE); - if (valid && (bm_width > 0) && (bm_height > 0)) { - - MEMSET (bm, '\0', bm_width * bm_height); - fill_bitmap (dpy, win, gc, bm_width, bm_height, x, y, c, bm); - - glBitmap (width, height, x0, y0, dx, dy, bm); -#ifdef DEBUG - if (debug_xfonts) { - printf ("width/height = %u/%u\n", width, height); - printf ("bm_width/bm_height = %u/%u\n", bm_width, -bm_height); - dump_bitmap (bm_width, bm_height, bm); - } -#endif - } else { - glBitmap (0, 0, 0.0, 0.0, dx, dy, NULL); - } - glEndList (); - } - - FREE(bm); - XFreeFontInfo( NULL, fs, 1 ); - XFreeGC (dpy, gc); - - /* Restore saved packing modes. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); -} Index: xc/extras/Mesa/src/X/xfonts.h diff -u xc/extras/Mesa/src/X/xfonts.h:1.3 xc/extras/Mesa/src/X/xfonts.h:removed --- xc/extras/Mesa/src/X/xfonts.h:1.3 Fri Feb 22 14:28:22 2002 +++ xc/extras/Mesa/src/X/xfonts.h Wed Mar 16 21:00:47 2005 @@ -1,41 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef XFONTS_H -#define XFONTS_H - -#ifdef __VMS -#include -#endif - -#include - - -extern void Fake_glXUseXFont( Font font, int first, int count, int listbase ); - - -#endif - Index: xc/extras/Mesa/src/X/xm_api.c diff -u xc/extras/Mesa/src/X/xm_api.c:1.10 xc/extras/Mesa/src/X/xm_api.c:removed --- xc/extras/Mesa/src/X/xm_api.c:1.10 Mon Dec 22 12:48:01 2003 +++ xc/extras/Mesa/src/X/xm_api.c Wed Mar 16 21:00:47 2005 @@ -1,2613 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/X/xm_api.c,v 1.10 2003/12/22 17:48:01 tsi Exp $ */ - -/* - * This file contains the implementations of all the XMesa* functions. - * - * - * NOTES: - * - * The window coordinate system origin (0,0) is in the lower-left corner - * of the window. X11's window coordinate origin is in the upper-left - * corner of the window. Therefore, most drawing functions in this - * file have to flip Y coordinates. - * - * Define USE_XSHM in the Makefile with -DUSE_XSHM if you want to compile - * in support for the MIT Shared Memory extension. If enabled, when you - * use an Ximage for the back buffer in double buffered mode, the "swap" - * operation will be faster. You must also link with -lXext. - * - * Byte swapping: If the Mesa host and the X display use a different - * byte order then there's some trickiness to be aware of when using - * XImages. The byte ordering used for the XImage is that of the X - * display, not the Mesa host. - * The color-to-pixel encoding for True/DirectColor must be done - * according to the display's visual red_mask, green_mask, and blue_mask. - * If XPutPixel is used to put a pixel into an XImage then XPutPixel will - * do byte swapping if needed. If one wants to directly "poke" the pixel - * into the XImage's buffer then the pixel must be byte swapped first. In - * Mesa, when byte swapping is needed we use the PF_TRUECOLOR pixel format - * and use XPutPixel everywhere except in the implementation of - * glClear(GL_COLOR_BUFFER_BIT). We want this function to be fast so - * instead of using XPutPixel we "poke" our values after byte-swapping - * the clear pixel value if needed. - * - */ - -#ifdef __CYGWIN__ -#undef WIN32 -#undef __WIN32__ -#endif - -#include "glxheader.h" -#include "GL/xmesa.h" -#include "xmesaP.h" -#include "context.h" -#include "extensions.h" -#include "glthread.h" -#include "imports.h" -#include "matrix.h" -#include "mmath.h" -#include "mtypes.h" -#include "macros.h" -#include "texformat.h" -#include "texstore.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "array_cache/acache.h" -#include "tnl/tnl.h" - -#ifndef GLX_NONE_EXT -#define GLX_NONE_EXT 0x8000 -#endif - - -/* - * Global X driver lock - */ -_glthread_Mutex _xmesa_lock; - - - -/* - * Lookup tables for HPCR pixel format: - */ -static short hpcr_rgbTbl[3][256] = { -{ - 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, - 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, - 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, - 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, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, -208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, -224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239 -}, -{ - 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, - 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, - 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, - 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, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, -208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, -224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239 -}, -{ - 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, - 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, - 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, - 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, - 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71, - 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, - 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87, - 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, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, -208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223 -} -}; - - - -/**********************************************************************/ -/***** X Utility Functions *****/ -/**********************************************************************/ - - -/* - * Return the host's byte order as LSBFirst or MSBFirst ala X. - */ -#ifndef XFree86Server -static int host_byte_order( void ) -{ - int i = 1; - char *cptr = (char *) &i; - return (*cptr==1) ? LSBFirst : MSBFirst; -} -#endif - - -/* - * Error handling. - */ -#if !defined(XFree86Server) && defined(USE_XSHM) -static volatile int mesaXErrorFlag = 0; - -static int mesaHandleXError( XMesaDisplay *dpy, XErrorEvent *event ) -{ - (void) dpy; - (void) event; - mesaXErrorFlag = 1; - return 0; -} -#endif - - -/* - * Check if the X Shared Memory extension is available. - * Return: 0 = not available - * 1 = shared XImage support available - * 2 = shared Pixmap support available also - */ -#ifndef XFree86Server -static int check_for_xshm( XMesaDisplay *display ) -{ -#ifdef USE_XSHM - int major, minor, ignore; - Bool pixmaps; - - if (XQueryExtension( display, "MIT-SHM", &ignore, &ignore, &ignore )) { - if (XShmQueryVersion( display, &major, &minor, &pixmaps )==True) { - return (pixmaps==True) ? 2 : 1; - } - else { - return 0; - } - } - else { - return 0; - } -#else - /* Can't compile XSHM support */ - return 0; -#endif -} -#endif - - -/* - * Return the width and height of the given drawable. - */ -static void get_drawable_size( XMesaDisplay *dpy, XMesaDrawable d, - unsigned int *width, unsigned int *height) -{ -#ifdef XFree86Server - (void) dpy; - *width = d->width; - *height = d->height; -#else - Window root; - int x, y; - unsigned int bw, depth; - - _glthread_LOCK_MUTEX(_xmesa_lock); - XGetGeometry( dpy, d, &root, &x, &y, width, height, &bw, &depth ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); -#endif -} - - -/* - * Apply gamma correction to an intensity value in [0..max]. Return the - * new intensity value. - */ -static GLint gamma_adjust( GLfloat gamma, GLint value, GLint max ) -{ - if (gamma == 1.0) { - return value; - } - else { - double x = (double) value / (double) max; - return IROUND_POS((GLfloat) max * _mesa_pow(x, 1.0F/gamma)); - } -} - - - -/* - * Return the true number of bits per pixel for XImages. - * For example, if we request a 24-bit deep visual we may actually need/get - * 32bpp XImages. This function returns the appropriate bpp. - * Input: dpy - the X display - * visinfo - desribes the visual to be used for XImages - * Return: true number of bits per pixel for XImages - */ -#ifdef XFree86Server - -static int bits_per_pixel( XMesaVisual xmv ) -{ - XMesaVisualInfo visinfo = xmv->visinfo; - const int depth = visinfo->nplanes; - int i; - for (i = 0; i < screenInfo.numPixmapFormats; i++) { - if (screenInfo.formats[i].depth == depth) - return screenInfo.formats[i].bitsPerPixel; - } - return depth; /* should never get here, but this should be safe */ -} - -#else - -static int bits_per_pixel( XMesaVisual xmv ) -{ - XMesaDisplay *dpy = xmv->display; - XMesaVisualInfo visinfo = xmv->visinfo; - XMesaImage *img; - int bitsPerPixel; - /* Create a temporary XImage */ - img = XCreateImage( dpy, visinfo->visual, visinfo->depth, - ZPixmap, 0, /*format, offset*/ - (char*) MALLOC(8), /*data*/ - 1, 1, /*width, height*/ - 32, /*bitmap_pad*/ - 0 /*bytes_per_line*/ - ); - assert(img); - /* grab the bits/pixel value */ - bitsPerPixel = img->bits_per_pixel; - /* free the XImage */ - FREE( img->data ); - img->data = NULL; - XMesaDestroyImage( img ); - return bitsPerPixel; -} -#endif - - - -/* - * Determine if a given X window ID is valid (window exists). - * Do this by calling XGetWindowAttributes() for the window and - * checking if we catch an X error. - * Input: dpy - the display - * win - the window to check for existance - * Return: GL_TRUE - window exists - * GL_FALSE - window doesn't exist - */ -#ifndef XFree86Server -static GLboolean WindowExistsFlag; - -static int window_exists_err_handler( XMesaDisplay* dpy, XErrorEvent* xerr ) -{ - (void) dpy; - if (xerr->error_code == BadWindow) { - WindowExistsFlag = GL_FALSE; - } - return 0; -} - -static GLboolean window_exists( XMesaDisplay *dpy, Window win ) -{ - XWindowAttributes wa; - int (*old_handler)( XMesaDisplay*, XErrorEvent* ); - WindowExistsFlag = GL_TRUE; - old_handler = XSetErrorHandler(window_exists_err_handler); - XGetWindowAttributes( dpy, win, &wa ); /* dummy request */ - XSetErrorHandler(old_handler); - return WindowExistsFlag; -} -#endif - - - -/**********************************************************************/ -/***** Linked list of XMesaBuffers *****/ -/**********************************************************************/ - -static XMesaBuffer XMesaBufferList = NULL; - - -/* Allocate a new XMesaBuffer, add to linked list */ -static XMesaBuffer alloc_xmesa_buffer(void) -{ - XMesaBuffer b = (XMesaBuffer) CALLOC_STRUCT(xmesa_buffer); - if (b) { - b->Next = XMesaBufferList; - XMesaBufferList = b; - } - return b; -} - - -/* - * Find an XMesaBuffer by matching X display and colormap but NOT matching - * the notThis buffer. - */ -static XMesaBuffer find_xmesa_buffer(XMesaDisplay *dpy, - XMesaColormap cmap, - XMesaBuffer notThis) -{ - XMesaBuffer b; - for (b=XMesaBufferList; b; b=b->Next) { - if (b->display==dpy && b->cmap==cmap && b!=notThis) { - return b; - } - } - return NULL; -} - - -/* - * Free an XMesaBuffer, remove from linked list, perhaps free X colormap - * entries. - */ -static void free_xmesa_buffer(int client, XMesaBuffer buffer) -{ - XMesaBuffer prev = NULL, b; - (void) client; - for (b=XMesaBufferList; b; b=b->Next) { - if (b==buffer) { - /* unlink bufer from list */ - if (prev) - prev->Next = buffer->Next; - else - XMesaBufferList = buffer->Next; - /* Check to free X colors */ - if (buffer->num_alloced>0) { - /* If no other buffer uses this X colormap then free the colors. */ - if (!find_xmesa_buffer(buffer->display, buffer->cmap, buffer)) { -#ifdef XFree86Server - (void)FreeColors(buffer->cmap, client, - buffer->num_alloced, buffer->alloced_colors, - 0); -#else - XFreeColors(buffer->display, buffer->cmap, - buffer->alloced_colors, buffer->num_alloced, 0); -#endif - } - } - - _mesa_free_framebuffer_data(&buffer->mesa_buffer); - FREE(buffer); - - return; - } - /* continue search */ - prev = b; - } - /* buffer not found in XMesaBufferList */ - _mesa_problem(NULL,"free_xmesa_buffer() - buffer not found\n"); -} - - -/* Copy X color table stuff from one XMesaBuffer to another. */ -static void copy_colortable_info(XMesaBuffer dst, const XMesaBuffer src) -{ - MEMCPY(dst->color_table, src->color_table, sizeof(src->color_table)); - MEMCPY(dst->pixel_to_r, src->pixel_to_r, sizeof(src->pixel_to_r)); - MEMCPY(dst->pixel_to_g, src->pixel_to_g, sizeof(src->pixel_to_g)); - MEMCPY(dst->pixel_to_b, src->pixel_to_b, sizeof(src->pixel_to_b)); - dst->num_alloced = src->num_alloced; - MEMCPY(dst->alloced_colors, src->alloced_colors, - sizeof(src->alloced_colors)); -} - - - -/**********************************************************************/ -/***** Misc Private Functions *****/ -/**********************************************************************/ - - -/* - * Return number of bits set in n. - */ -static int bitcount( unsigned long n ) -{ - int bits; - for (bits=0; n>0; n=n>>1) { - if (n&1) { - bits++; - } - } - return bits; -} - - - -/* - * Allocate a shared memory XImage back buffer for the given XMesaBuffer. - * Return: GL_TRUE if success, GL_FALSE if error - */ -#ifndef XFree86Server -static GLboolean alloc_shm_back_buffer( XMesaBuffer b ) -{ -#ifdef USE_XSHM - /* - * We have to do a _lot_ of error checking here to be sure we can - * really use the XSHM extension. It seems different servers trigger - * errors at different points if the extension won't work. Therefore - * we have to be very careful... - */ - GC gc; - int (*old_handler)( XMesaDisplay *, XErrorEvent * ); - - b->backimage = XShmCreateImage( b->xm_visual->display, - b->xm_visual->visinfo->visual, - b->xm_visual->visinfo->depth, - ZPixmap, NULL, &b->shminfo, - b->width, b->height ); - if (b->backimage == NULL) { - _mesa_warning(NULL, "alloc_back_buffer: Shared memory error (XShmCreateImage), disabling."); - b->shm = 0; - return GL_FALSE; - } - - b->shminfo.shmid = shmget( IPC_PRIVATE, b->backimage->bytes_per_line - * b->backimage->height, IPC_CREAT|0777 ); - if (b->shminfo.shmid < 0) { - _mesa_warning(NULL, "shmget failed while allocating back buffer"); - XDestroyImage( b->backimage ); - b->backimage = NULL; - _mesa_warning(NULL, "alloc_back_buffer: Shared memory error (shmget), disabling."); - b->shm = 0; - return GL_FALSE; - } - - b->shminfo.shmaddr = b->backimage->data - = (char*)shmat( b->shminfo.shmid, 0, 0 ); - if (b->shminfo.shmaddr == (char *) -1) { - _mesa_warning(NULL, "shmat() failed while allocating back buffer"); - XDestroyImage( b->backimage ); - shmctl( b->shminfo.shmid, IPC_RMID, 0 ); - b->backimage = NULL; - _mesa_warning(NULL, "alloc_back_buffer: Shared memory error (shmat), disabling."); - b->shm = 0; - return GL_FALSE; - } - - b->shminfo.readOnly = False; - mesaXErrorFlag = 0; - old_handler = XSetErrorHandler( mesaHandleXError ); - /* This may trigger the X protocol error we're ready to catch: */ - XShmAttach( b->xm_visual->display, &b->shminfo ); - XSync( b->xm_visual->display, False ); - - if (mesaXErrorFlag) { - /* we are on a remote display, this error is normal, don't print it */ - XFlush( b->xm_visual->display ); - mesaXErrorFlag = 0; - XDestroyImage( b->backimage ); - shmdt( b->shminfo.shmaddr ); - shmctl( b->shminfo.shmid, IPC_RMID, 0 ); - b->backimage = NULL; - b->shm = 0; - (void) XSetErrorHandler( old_handler ); - return GL_FALSE; - } - - shmctl( b->shminfo.shmid, IPC_RMID, 0 ); /* nobody else needs it */ - - /* Finally, try an XShmPutImage to be really sure the extension works */ - gc = XCreateGC( b->xm_visual->display, b->frontbuffer, 0, NULL ); - XShmPutImage( b->xm_visual->display, b->frontbuffer, gc, - b->backimage, 0, 0, 0, 0, 1, 1 /*one pixel*/, False ); - XSync( b->xm_visual->display, False ); - XFreeGC( b->xm_visual->display, gc ); - (void) XSetErrorHandler( old_handler ); - if (mesaXErrorFlag) { - XFlush( b->xm_visual->display ); - mesaXErrorFlag = 0; - XDestroyImage( b->backimage ); - shmdt( b->shminfo.shmaddr ); - shmctl( b->shminfo.shmid, IPC_RMID, 0 ); - b->backimage = NULL; - b->shm = 0; - return GL_FALSE; - } - - if (b->backimage) { - int height = b->backimage->height; - /* Needed by PIXELADDR1 macro */ - b->ximage_width1 = b->backimage->bytes_per_line; - b->ximage_origin1 = (GLubyte *) b->backimage->data - + b->ximage_width1 * (height-1); - /* Needed by PIXELADDR2 macro */ - b->ximage_width2 = b->backimage->bytes_per_line / 2; - b->ximage_origin2 = (GLushort *) b->backimage->data - + b->ximage_width2 * (height-1); - /* Needed by PIXELADDR3 macro */ - b->ximage_width3 = b->backimage->bytes_per_line; - b->ximage_origin3 = (GLubyte *) b->backimage->data - + b->ximage_width3 * (height-1); - /* Needed by PIXELADDR4 macro */ - b->ximage_width4 = b->backimage->width; - b->ximage_origin4 = (GLuint *) b->backimage->data - + b->ximage_width4 * (height-1); - } - - return GL_TRUE; -#else - /* Can't compile XSHM support */ - return GL_FALSE; -#endif -} -#endif - - - -/* - * Setup an off-screen pixmap or Ximage to use as the back buffer. - * Input: b - the X/Mesa buffer - */ -void xmesa_alloc_back_buffer( XMesaBuffer b ) -{ - if (b->db_state==BACK_XIMAGE) { - /* Deallocate the old backimage, if any */ - if (b->backimage) { -#if defined(USE_XSHM) && !defined(XFree86Server) - if (b->shm) { - XShmDetach( b->xm_visual->display, &b->shminfo ); - XDestroyImage( b->backimage ); - shmdt( b->shminfo.shmaddr ); - } - else -#endif - XMesaDestroyImage( b->backimage ); - b->backimage = NULL; - } - - /* Allocate new back buffer */ -#ifdef XFree86Server - { - /* Allocate a regular XImage for the back buffer. */ - b->backimage = XMesaCreateImage(b->xm_visual->BitsPerPixel, - b->width, b->height, NULL); -#else - if (b->shm==0 || alloc_shm_back_buffer(b)==GL_FALSE) { - /* Allocate a regular XImage for the back buffer. */ - b->backimage = XCreateImage( b->xm_visual->display, - b->xm_visual->visinfo->visual, - GET_VISUAL_DEPTH(b->xm_visual), - ZPixmap, 0, /* format, offset */ - NULL, b->width, b->height, - 8, 0 ); /* pad, bytes_per_line */ -#endif - if (!b->backimage) { - _mesa_warning(NULL, "alloc_back_buffer: XCreateImage failed."); - } - b->backimage->data = (char *) MALLOC( b->backimage->height - * b->backimage->bytes_per_line ); - if (!b->backimage->data) { - _mesa_warning(NULL, "alloc_back_buffer: MALLOC failed."); - XMesaDestroyImage( b->backimage ); - b->backimage = NULL; - } - } - b->backpixmap = None; - } - else if (b->db_state==BACK_PIXMAP) { - XMesaPixmap old_pixmap = b->backpixmap; - /* Free the old back pixmap */ - if (b->backpixmap) { - XMesaFreePixmap( b->xm_visual->display, b->backpixmap ); - } - /* Allocate new back pixmap */ - b->backpixmap = XMesaCreatePixmap( b->xm_visual->display, b->frontbuffer, - b->width, b->height, - GET_VISUAL_DEPTH(b->xm_visual) ); - b->backimage = NULL; - /* update other references to backpixmap */ - if (b->buffer==(XMesaDrawable)old_pixmap) { - b->buffer = (XMesaDrawable)b->backpixmap; - } - } -} - - - -/* - * A replacement for XAllocColor. This function should never - * fail to allocate a color. When XAllocColor fails, we return - * the nearest matching color. If we have to allocate many colors - * this function isn't too efficient; the XQueryColors() could be - * done just once. - * Written by Michael Pichler, Brian Paul, Mark Kilgard - * Input: dpy - X display - * cmap - X colormap - * cmapSize - size of colormap - * In/Out: color - the XColor struct - * Output: exact - 1=exact color match, 0=closest match - * alloced - 1=XAlloc worked, 0=XAlloc failed - */ -static void -noFaultXAllocColor( int client, - XMesaDisplay *dpy, - XMesaColormap cmap, - int cmapSize, - XMesaColor *color, - int *exact, int *alloced ) -{ -#ifdef XFree86Server - Pixel *ppixIn; - xrgb *ctable; -#else - /* we'll try to cache ctable for better remote display performance */ - static Display *prevDisplay = NULL; - static XMesaColormap prevCmap = 0; - static int prevCmapSize = 0; - static XMesaColor *ctable = NULL; -#endif - XMesaColor subColor; - int i, bestmatch; - double mindist; /* 3*2^16^2 exceeds long int precision. */ - - (void) client; - - /* First try just using XAllocColor. */ -#ifdef XFree86Server - if (AllocColor(cmap, - &color->red, &color->green, &color->blue, - &color->pixel, - client) == Success) { -#else - if (XAllocColor(dpy, cmap, color)) { -#endif - *exact = 1; - *alloced = 1; - return; - } - - /* Alloc failed, search for closest match */ - - /* Retrieve color table entries. */ - /* XXX alloca candidate. */ -#ifdef XFree86Server - ppixIn = (Pixel *) MALLOC(cmapSize * sizeof(Pixel)); - ctable = (xrgb *) MALLOC(cmapSize * sizeof(xrgb)); - for (i = 0; i < cmapSize; i++) { - ppixIn[i] = i; - } - QueryColors(cmap, cmapSize, ppixIn, ctable); -#else - if (prevDisplay != dpy || prevCmap != cmap - || prevCmapSize != cmapSize || !ctable) { - /* free previously cached color table */ - if (ctable) - FREE(ctable); - /* Get the color table from X */ - ctable = (XMesaColor *) MALLOC(cmapSize * sizeof(XMesaColor)); - assert(ctable); - for (i = 0; i < cmapSize; i++) { - ctable[i].pixel = i; - } - XQueryColors(dpy, cmap, ctable, cmapSize); - prevDisplay = dpy; - prevCmap = cmap; - prevCmapSize = cmapSize; - } -#endif - - /* Find best match. */ - bestmatch = -1; - mindist = 0.0; - for (i = 0; i < cmapSize; i++) { - double dr = 0.30 * ((double) color->red - (double) ctable[i].red); - double dg = 0.59 * ((double) color->green - (double) ctable[i].green); - double db = 0.11 * ((double) color->blue - (double) ctable[i].blue); - double dist = dr * dr + dg * dg + db * db; - if (bestmatch < 0 || dist < mindist) { - bestmatch = i; - mindist = dist; - } - } - - /* Return result. */ - subColor.red = ctable[bestmatch].red; - subColor.green = ctable[bestmatch].green; - subColor.blue = ctable[bestmatch].blue; - /* Try to allocate the closest match color. This should only - * fail if the cell is read/write. Otherwise, we're incrementing - * the cell's reference count. - */ -#ifdef XFree86Server - if (AllocColor(cmap, - &subColor.red, &subColor.green, &subColor.blue, - &subColor.pixel, - client) == Success) { -#else - if (XAllocColor(dpy, cmap, &subColor)) { -#endif - *alloced = 1; - } - else { - /* do this to work around a problem reported by Frank Ortega */ - subColor.pixel = (unsigned long) bestmatch; - subColor.red = ctable[bestmatch].red; - subColor.green = ctable[bestmatch].green; - subColor.blue = ctable[bestmatch].blue; - subColor.flags = DoRed | DoGreen | DoBlue; - *alloced = 0; - } -#ifdef XFree86Server - FREE(ppixIn); - FREE(ctable); -#else - /* don't free table, save it for next time */ -#endif - - *color = subColor; - *exact = 0; -} - - - - -/* - * Do setup for PF_GRAYSCALE pixel format. - * Note that buffer may be NULL. - */ -static GLboolean setup_grayscale( int client, XMesaVisual v, - XMesaBuffer buffer, XMesaColormap cmap ) -{ - if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) { - return GL_FALSE; - } - - if (buffer) { - XMesaBuffer prevBuffer; - - if (!cmap) { - return GL_FALSE; - } - - prevBuffer = find_xmesa_buffer(v->display, cmap, buffer); - if (prevBuffer && - (buffer->xm_visual->mesa_visual.rgbMode == - prevBuffer->xm_visual->mesa_visual.rgbMode)) { - /* Copy colormap stuff from previous XMesaBuffer which uses same - * X colormap. Do this to avoid time spent in noFaultXAllocColor. - */ - copy_colortable_info(buffer, prevBuffer); - } - else { - /* Allocate 256 shades of gray */ - int gray; - int colorsfailed = 0; - for (gray=0;gray<256;gray++) { - GLint r = gamma_adjust( v->RedGamma, gray, 255 ); - GLint g = gamma_adjust( v->GreenGamma, gray, 255 ); - GLint b = gamma_adjust( v->BlueGamma, gray, 255 ); - int exact, alloced; - XMesaColor xcol; - xcol.red = (r << 8) | r; - xcol.green = (g << 8) | g; - xcol.blue = (b << 8) | b; - noFaultXAllocColor( client, v->display, - cmap, GET_COLORMAP_SIZE(v), - &xcol, &exact, &alloced ); - if (!exact) { - colorsfailed++; - } - if (alloced) { - assert(buffer->num_alloced<256); - buffer->alloced_colors[buffer->num_alloced] = xcol.pixel; - buffer->num_alloced++; - } - - /*OLD - assert(gray < 576); - buffer->color_table[gray*3+0] = xcol.pixel; - buffer->color_table[gray*3+1] = xcol.pixel; - buffer->color_table[gray*3+2] = xcol.pixel; - assert(xcol.pixel < 65536); - buffer->pixel_to_r[xcol.pixel] = gray * 30 / 100; - buffer->pixel_to_g[xcol.pixel] = gray * 59 / 100; - buffer->pixel_to_b[xcol.pixel] = gray * 11 / 100; - */ - buffer->color_table[gray] = xcol.pixel; - assert(xcol.pixel < 65536); - buffer->pixel_to_r[xcol.pixel] = gray; - buffer->pixel_to_g[xcol.pixel] = gray; - buffer->pixel_to_b[xcol.pixel] = gray; - } - - if (colorsfailed && _mesa_getenv("MESA_DEBUG")) { - _mesa_warning(NULL, - "Note: %d out of 256 needed colors do not match exactly.\n", - colorsfailed ); - } - } - } - - v->dithered_pf = PF_GRAYSCALE; - v->undithered_pf = PF_GRAYSCALE; - return GL_TRUE; -} - - - -/* - * Setup RGB rendering for a window with a PseudoColor, StaticColor, - * or 8-bit TrueColor visual visual. We try to allocate a palette of 225 - * colors (5 red, 9 green, 5 blue) and dither to approximate a 24-bit RGB - * color. While this function was originally designed just for 8-bit - * visuals, it has also proven to work from 4-bit up to 16-bit visuals. - * Dithering code contributed by Bob Mercier. - */ -static GLboolean setup_dithered_color( int client, XMesaVisual v, - XMesaBuffer buffer, XMesaColormap cmap ) -{ - (void) DitherValues; /* Muffle compiler */ - - if (GET_VISUAL_DEPTH(v)<4 || GET_VISUAL_DEPTH(v)>16) { - return GL_FALSE; - } - - if (buffer) { - XMesaBuffer prevBuffer; - - if (!cmap) { - return GL_FALSE; - } - - prevBuffer = find_xmesa_buffer(v->display, cmap, buffer); - if (prevBuffer && - (buffer->xm_visual->mesa_visual.rgbMode == - prevBuffer->xm_visual->mesa_visual.rgbMode)) { - /* Copy colormap stuff from previous, matching XMesaBuffer. - * Do this to avoid time spent in noFaultXAllocColor. - */ - copy_colortable_info(buffer, prevBuffer); - } - else { - /* Allocate X colors and initialize color_table[], red_table[], etc */ - int r, g, b, i; - int colorsfailed = 0; - for (r = 0; r < DITH_R; r++) { - for (g = 0; g < DITH_G; g++) { - for (b = 0; b < DITH_B; b++) { - XMesaColor xcol; - int exact, alloced; - xcol.red =gamma_adjust(v->RedGamma, r*65535/(DITH_R-1),65535); - xcol.green=gamma_adjust(v->GreenGamma, g*65535/(DITH_G-1),65535); - xcol.blue =gamma_adjust(v->BlueGamma, b*65535/(DITH_B-1),65535); - noFaultXAllocColor( client, v->display, - cmap, GET_COLORMAP_SIZE(v), - &xcol, &exact, &alloced ); - if (!exact) { - colorsfailed++; - } - if (alloced) { - assert(buffer->num_alloced<256); - buffer->alloced_colors[buffer->num_alloced] = xcol.pixel; - buffer->num_alloced++; - } - i = DITH_MIX( r, g, b ); - assert(i < 576); - buffer->color_table[i] = xcol.pixel; - assert(xcol.pixel < 65536); - buffer->pixel_to_r[xcol.pixel] = r * 255 / (DITH_R-1); - buffer->pixel_to_g[xcol.pixel] = g * 255 / (DITH_G-1); - buffer->pixel_to_b[xcol.pixel] = b * 255 / (DITH_B-1); - } - } - } - - if (colorsfailed && _mesa_getenv("MESA_DEBUG")) { - _mesa_warning(NULL, - "Note: %d out of %d needed colors do not match exactly.\n", - colorsfailed, DITH_R * DITH_G * DITH_B ); - } - } - } - - v->dithered_pf = PF_DITHER; - v->undithered_pf = PF_LOOKUP; - return GL_TRUE; -} - - -/* - * Setup for Hewlett Packard Color Recovery 8-bit TrueColor mode. - * HPCR simulates 24-bit color fidelity with an 8-bit frame buffer. - * Special dithering tables have to be initialized. - */ -static void setup_8bit_hpcr( XMesaVisual v ) -{ - /* HP Color Recovery contributed by: Alex De Bruyn (ad@lms.be) - * To work properly, the atom _HP_RGB_SMOOTH_MAP_LIST must be defined - * on the root window AND the colormap obtainable by XGetRGBColormaps - * for that atom must be set on the window. (see also tkInitWindow) - * If that colormap is not set, the output will look stripy. - */ - - /* Setup color tables with gamma correction */ - int i; - double g; - - g = 1.0 / v->RedGamma; - for (i=0; i<256; i++) { - GLint red = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[0][i]/255.0, g )); - v->hpcr_rgbTbl[0][i] = CLAMP( red, 16, 239 ); - } - - g = 1.0 / v->GreenGamma; - for (i=0; i<256; i++) { - GLint green = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[1][i]/255.0, g )); - v->hpcr_rgbTbl[1][i] = CLAMP( green, 16, 239 ); - } - - g = 1.0 / v->BlueGamma; - for (i=0; i<256; i++) { - GLint blue = IROUND_POS(255.0 * _mesa_pow( hpcr_rgbTbl[2][i]/255.0, g )); - v->hpcr_rgbTbl[2][i] = CLAMP( blue, 32, 223 ); - } - v->undithered_pf = PF_HPCR; /* can't really disable dithering for now */ - v->dithered_pf = PF_HPCR; - - /* which method should I use to clear */ - /* GL_FALSE: keep the ordinary method */ - /* GL_TRUE : clear with dither pattern */ - v->hpcr_clear_flag = _mesa_getenv("MESA_HPCR_CLEAR") ? GL_TRUE : GL_FALSE; - - if (v->hpcr_clear_flag) { - v->hpcr_clear_pixmap = XMesaCreatePixmap(v->display, - DefaultRootWindow(v->display), - 16, 2, 8); -#ifndef XFree86Server - v->hpcr_clear_ximage = XGetImage(v->display, v->hpcr_clear_pixmap, - 0, 0, 16, 2, AllPlanes, ZPixmap); -#endif - } -} - - -/* - * Setup RGB rendering for a window with a True/DirectColor visual. - */ -static void setup_truecolor( XMesaVisual v, XMesaBuffer buffer, - XMesaColormap cmap ) -{ - unsigned long rmask, gmask, bmask; - (void) buffer; - (void) cmap; - - /* Compute red multiplier (mask) and bit shift */ - v->rshift = 0; - rmask = GET_REDMASK(v); - while ((rmask & 1)==0) { - v->rshift++; - rmask = rmask >> 1; - } - - /* Compute green multiplier (mask) and bit shift */ - v->gshift = 0; - gmask = GET_GREENMASK(v); - while ((gmask & 1)==0) { - v->gshift++; - gmask = gmask >> 1; - } - - /* Compute blue multiplier (mask) and bit shift */ - v->bshift = 0; - bmask = GET_BLUEMASK(v); - while ((bmask & 1)==0) { - v->bshift++; - bmask = bmask >> 1; - } - - /* - * Compute component-to-pixel lookup tables and dithering kernel - */ - { - static GLubyte kernel[16] = { - 0*16, 8*16, 2*16, 10*16, - 12*16, 4*16, 14*16, 6*16, - 3*16, 11*16, 1*16, 9*16, - 15*16, 7*16, 13*16, 5*16, - }; - GLint rBits = bitcount(rmask); - GLint gBits = bitcount(gmask); - GLint bBits = bitcount(bmask); - GLint maxBits; - GLuint i; - - /* convert pixel components in [0,_mask] to RGB values in [0,255] */ - for (i=0; i<=rmask; i++) - v->PixelToR[i] = (unsigned char) ((i * 255) / rmask); - for (i=0; i<=gmask; i++) - v->PixelToG[i] = (unsigned char) ((i * 255) / gmask); - for (i=0; i<=bmask; i++) - v->PixelToB[i] = (unsigned char) ((i * 255) / bmask); - - /* convert RGB values from [0,255] to pixel components */ - - for (i=0;i<256;i++) { - GLint r = gamma_adjust(v->RedGamma, i, 255); - GLint g = gamma_adjust(v->GreenGamma, i, 255); - GLint b = gamma_adjust(v->BlueGamma, i, 255); - v->RtoPixel[i] = (r >> (8-rBits)) << v->rshift; - v->GtoPixel[i] = (g >> (8-gBits)) << v->gshift; - v->BtoPixel[i] = (b >> (8-bBits)) << v->bshift; - } - /* overflow protection */ - for (i=256;i<512;i++) { - v->RtoPixel[i] = v->RtoPixel[255]; - v->GtoPixel[i] = v->GtoPixel[255]; - v->BtoPixel[i] = v->BtoPixel[255]; - } - - /* setup dithering kernel */ - maxBits = rBits; - if (gBits > maxBits) maxBits = gBits; - if (bBits > maxBits) maxBits = bBits; - for (i=0;i<16;i++) { - v->Kernel[i] = kernel[i] >> maxBits; - } - - v->undithered_pf = PF_TRUECOLOR; - v->dithered_pf = (GET_VISUAL_DEPTH(v)<24) ? PF_TRUEDITHER : PF_TRUECOLOR; - } - - /* - * Now check for TrueColor visuals which we can optimize. - */ - if ( GET_REDMASK(v) ==0x0000ff - && GET_GREENMASK(v)==0x00ff00 - && GET_BLUEMASK(v) ==0xff0000 - && CHECK_BYTE_ORDER(v) - && v->BitsPerPixel==32 - && sizeof(GLuint)==4 - && v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) { - /* common 32 bpp config used on SGI, Sun */ - v->undithered_pf = v->dithered_pf = PF_8A8B8G8R; - } - else if (GET_REDMASK(v) ==0xff0000 - && GET_GREENMASK(v)==0x00ff00 - && GET_BLUEMASK(v) ==0x0000ff - && CHECK_BYTE_ORDER(v) - && v->BitsPerPixel==32 - && sizeof(GLuint)==4 - && v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) { - /* common 32 bpp config used on Linux, HP, IBM */ - v->undithered_pf = v->dithered_pf = PF_8R8G8B; - } - else if (GET_REDMASK(v) ==0xff0000 - && GET_GREENMASK(v)==0x00ff00 - && GET_BLUEMASK(v) ==0x0000ff - && CHECK_BYTE_ORDER(v) - && v->BitsPerPixel==24 - && sizeof(GLuint)==4 - && v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) { - /* common packed 24 bpp config used on Linux */ - v->undithered_pf = v->dithered_pf = PF_8R8G8B24; - } - else if (GET_REDMASK(v) ==0xf800 - && GET_GREENMASK(v)==0x07e0 - && GET_BLUEMASK(v) ==0x001f - && CHECK_BYTE_ORDER(v) - && v->BitsPerPixel==16 - && sizeof(GLushort)==2 - && v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) { - /* 5-6-5 color weight on common PC VGA boards */ - v->undithered_pf = PF_5R6G5B; - v->dithered_pf = PF_DITHER_5R6G5B; - } - else if (GET_REDMASK(v) ==0xe0 - && GET_GREENMASK(v)==0x1c - && GET_BLUEMASK(v) ==0x03 - && CHECK_FOR_HPCR(v)) { - setup_8bit_hpcr( v ); - } -} - - - -/* - * Setup RGB rendering for a window with a monochrome visual. - */ -static void setup_monochrome( XMesaVisual v, XMesaBuffer b ) -{ - (void) b; - v->dithered_pf = v->undithered_pf = PF_1BIT; - /* if black=1 then we must flip pixel values */ - v->bitFlip = (GET_BLACK_PIXEL(v) != 0); -} - - - -/* - * When a context is "made current" for the first time, we can finally - * finish initializing the context's visual and buffer information. - * Input: v - the XMesaVisual to initialize - * b - the XMesaBuffer to initialize (may be NULL) - * rgb_flag - TRUE = RGBA mode, FALSE = color index mode - * window - the window/pixmap we're rendering into - * cmap - the colormap associated with the window/pixmap - * Return: GL_TRUE=success, GL_FALSE=failure - */ -static GLboolean initialize_visual_and_buffer( int client, - XMesaVisual v, - XMesaBuffer b, - GLboolean rgb_flag, - XMesaDrawable window, - XMesaColormap cmap ) -{ -#ifndef XFree86Server - XGCValues gcvalues; -#endif - - if (b) { - assert(b->xm_visual == v); - } - - /* Save true bits/pixel */ - v->BitsPerPixel = bits_per_pixel(v); - assert(v->BitsPerPixel > 0); - - - if (rgb_flag==GL_FALSE) { - /* COLOR-INDEXED WINDOW: - * Even if the visual is TrueColor or DirectColor we treat it as - * being color indexed. This is weird but might be useful to someone. - */ - v->dithered_pf = v->undithered_pf = PF_INDEX; - v->index_bits = GET_VISUAL_DEPTH(v); - } - else { - /* RGB WINDOW: - * We support RGB rendering into almost any kind of visual. - */ - int xclass; - xclass = GET_VISUAL_CLASS(v); - if (xclass==TrueColor || xclass==DirectColor) { - setup_truecolor( v, b, cmap ); - } - else if (xclass==StaticGray && GET_VISUAL_DEPTH(v)==1) { - setup_monochrome( v, b ); - } - else if (xclass==GrayScale || xclass==StaticGray) { - if (!setup_grayscale( client, v, b, cmap )) { - return GL_FALSE; - } - } - else if ((xclass==PseudoColor || xclass==StaticColor) - && GET_VISUAL_DEPTH(v)>=4 && GET_VISUAL_DEPTH(v)<=16) { - if (!setup_dithered_color( client, v, b, cmap )) { - return GL_FALSE; - } - } - else { - _mesa_warning(NULL, "XMesa: RGB mode rendering not supported in given visual."); - return GL_FALSE; - } - v->index_bits = 0; - - if (_mesa_getenv("MESA_NO_DITHER")) { - v->dithered_pf = v->undithered_pf; - } - } - - - /* - * If MESA_INFO env var is set print out some debugging info - * which can help Brian figure out what's going on when a user - * reports bugs. - */ - if (_mesa_getenv("MESA_INFO")) { - _mesa_printf("X/Mesa visual = %p\n", (void *) v); - _mesa_printf("X/Mesa dithered pf = %u\n", v->dithered_pf); - _mesa_printf("X/Mesa undithered pf = %u\n", v->undithered_pf); - _mesa_printf("X/Mesa level = %d\n", v->level); - _mesa_printf("X/Mesa depth = %d\n", GET_VISUAL_DEPTH(v)); - _mesa_printf("X/Mesa bits per pixel = %d\n", v->BitsPerPixel); - } - - if (b && window) { - /* Do window-specific initializations */ - - /* Window dimensions */ - unsigned int w, h; - get_drawable_size( v->display, window, &w, &h ); - b->width = w; - b->height = h; - - b->frontbuffer = window; - - /* Setup for single/double buffering */ - if (v->mesa_visual.doubleBufferMode) { - /* Double buffered */ -#ifndef XFree86Server - b->shm = check_for_xshm( v->display ); -#endif - xmesa_alloc_back_buffer( b ); - if (b->db_state==BACK_PIXMAP) { - b->buffer = (XMesaDrawable)b->backpixmap; - } - else { - b->buffer = XIMAGE; - } - } - else { - /* Single Buffered */ - b->buffer = b->frontbuffer; - } - - /* X11 graphics contexts */ -#ifdef XFree86Server - b->gc = CreateScratchGC(v->display, window->depth); -#else - b->gc = XCreateGC( v->display, window, 0, NULL ); -#endif - XMesaSetFunction( v->display, b->gc, GXcopy ); - - /* cleargc - for glClear() */ -#ifdef XFree86Server - b->cleargc = CreateScratchGC(v->display, window->depth); -#else - b->cleargc = XCreateGC( v->display, window, 0, NULL ); -#endif - XMesaSetFunction( v->display, b->cleargc, GXcopy ); - - /* - * Don't generate Graphics Expose/NoExpose events in swapbuffers(). - * Patch contributed by Michael Pichler May 15, 1995. - */ -#ifdef XFree86Server - b->swapgc = CreateScratchGC(v->display, window->depth); - { - CARD32 v[1]; - v[0] = FALSE; - dixChangeGC(NullClient, b->swapgc, GCGraphicsExposures, v, NULL); - } -#else - gcvalues.graphics_exposures = False; - b->swapgc = XCreateGC( v->display, window, - GCGraphicsExposures, &gcvalues); -#endif - XMesaSetFunction( v->display, b->swapgc, GXcopy ); - /* - * Set fill style and tile pixmap once for all for HPCR stuff - * (instead of doing it each time in clear_color_HPCR_pixmap()) - * Initialize whole stuff - * Patch contributed by Jacques Leroy March 8, 1998. - */ - if (v->hpcr_clear_flag && b->buffer!=XIMAGE) { - int i; - for (i=0; i<16; i++) - { - XMesaPutPixel(v->hpcr_clear_ximage, i, 0, 0); - XMesaPutPixel(v->hpcr_clear_ximage, i, 1, 0); - } - XMesaPutImage(b->display, (XMesaDrawable)v->hpcr_clear_pixmap, - b->cleargc, v->hpcr_clear_ximage, 0, 0, 0, 0, 16, 2); - XMesaSetFillStyle( v->display, b->cleargc, FillTiled); - XMesaSetTile( v->display, b->cleargc, v->hpcr_clear_pixmap ); - } - - /* Initialize the row buffer XImage for use in write_color_span() */ -#ifdef XFree86Server - b->rowimage = XMesaCreateImage(GET_VISUAL_DEPTH(v), MAX_WIDTH, 1, - (char *)MALLOC(MAX_WIDTH*4)); -#else - b->rowimage = XCreateImage( v->display, - v->visinfo->visual, - v->visinfo->depth, - ZPixmap, 0, /*format, offset*/ - (char*) MALLOC(MAX_WIDTH*4), /*data*/ - MAX_WIDTH, 1, /*width, height*/ - 32, /*bitmap_pad*/ - 0 /*bytes_per_line*/ ); -#endif - } - - return GL_TRUE; -} - - - -/* - * Convert an RGBA color to a pixel value. - */ -unsigned long -xmesa_color_to_pixel( XMesaContext xmesa, GLubyte r, GLubyte g, GLubyte b, GLubyte a, - GLuint pixelFormat) -{ - switch (pixelFormat) { - case PF_INDEX: - return 0; - case PF_TRUECOLOR: - { - unsigned long p; - PACK_TRUECOLOR( p, r, g, b ); - return p; - } - case PF_8A8B8G8R: - return PACK_8A8B8G8R( r, g, b, a ); - case PF_8R8G8B: - /* fall through */ - case PF_8R8G8B24: - return PACK_8R8G8B( r, g, b ); - case PF_5R6G5B: - return PACK_5R6G5B( r, g, b ); - case PF_DITHER: - { - DITHER_SETUP; - return DITHER( 1, 0, r, g, b ); - } - case PF_1BIT: - /* 382 = (3*255)/2 */ - return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip; - case PF_HPCR: - return DITHER_HPCR(1, 1, r, g, b); - case PF_LOOKUP: - { - LOOKUP_SETUP; - return LOOKUP( r, g, b ); - } - case PF_GRAYSCALE: - return GRAY_RGB( r, g, b ); - case PF_TRUEDITHER: - /* fall through */ - case PF_DITHER_5R6G5B: - { - unsigned long p; - PACK_TRUEDITHER(p, 1, 0, r, g, b); - return p; - } - default: - _mesa_problem(NULL, "Bad pixel format in xmesa_color_to_pixel"); - } - return 0; -} - - -/**********************************************************************/ -/***** Public Functions *****/ -/**********************************************************************/ - - -/* - * Create a new X/Mesa visual. - * Input: display - X11 display - * visinfo - an XVisualInfo pointer - * rgb_flag - GL_TRUE = RGB mode, - * GL_FALSE = color index mode - * alpha_flag - alpha buffer requested? - * db_flag - GL_TRUE = double-buffered, - * GL_FALSE = single buffered - * stereo_flag - stereo visual? - * ximage_flag - GL_TRUE = use an XImage for back buffer, - * GL_FALSE = use an off-screen pixmap for back buffer - * depth_size - requested bits/depth values, or zero - * stencil_size - requested bits/stencil values, or zero - * accum_red_size - requested bits/red accum values, or zero - * accum_green_size - requested bits/green accum values, or zero - * accum_blue_size - requested bits/blue accum values, or zero - * accum_alpha_size - requested bits/alpha accum values, or zero - * num_samples - number of samples/pixel if multisampling, or zero - * level - visual level, usually 0 - * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT - * Return; a new XMesaVisual or 0 if error. - */ -XMesaVisual XMesaCreateVisual( XMesaDisplay *display, - XMesaVisualInfo visinfo, - GLboolean rgb_flag, - GLboolean alpha_flag, - GLboolean db_flag, - GLboolean stereo_flag, - GLboolean ximage_flag, - GLint depth_size, - GLint stencil_size, - GLint accum_red_size, - GLint accum_green_size, - GLint accum_blue_size, - GLint accum_alpha_size, - GLint num_samples, - GLint level, - GLint visualCaveat ) -{ - char *gamma; - XMesaVisual v; - GLint red_bits, green_bits, blue_bits, alpha_bits; - - /* For debugging only */ - if (_mesa_getenv("MESA_XSYNC")) { - /* This makes debugging X easier. - * In your debugger, set a breakpoint on _XError to stop when an - * X protocol error is generated. - */ -#ifdef XFree86Server - /* NOT_NEEDED */ -#else - XSynchronize( display, 1 ); -#endif - } - - v = (XMesaVisual) CALLOC_STRUCT(xmesa_visual); - if (!v) { - return NULL; - } - - /* - * In the X server, NULL is passed in for the display. It will have - * to be set before using this visual. See XMesaSetVisualDisplay() - * below. - */ - v->display = display; - - /* Save a copy of the XVisualInfo struct because the user may XFREE() - * the struct but we may need some of the information contained in it - * at a later time. - */ -#ifdef XFree86Server - v->visinfo = visinfo; -#else - v->visinfo = (XVisualInfo *) MALLOC(sizeof(*visinfo)); - if(!v->visinfo) { - FREE(v); - return NULL; - } - MEMCPY(v->visinfo, visinfo, sizeof(*visinfo)); -#endif - -#ifdef XFree86Server - /* Initialize the depth of the screen */ - { - PixmapFormatRec *format; - - for (format = screenInfo.formats; - format->depth != display->rootDepth; - format++) - ; - v->screen_depth = format->bitsPerPixel; - } -#endif - - /* check for MESA_GAMMA environment variable */ - gamma = _mesa_getenv("MESA_GAMMA"); - if (gamma) { - v->RedGamma = v->GreenGamma = v->BlueGamma = 0.0; - sscanf( gamma, "%f %f %f", &v->RedGamma, &v->GreenGamma, &v->BlueGamma ); - if (v->RedGamma<=0.0) v->RedGamma = 1.0; - if (v->GreenGamma<=0.0) v->GreenGamma = v->RedGamma; - if (v->BlueGamma<=0.0) v->BlueGamma = v->RedGamma; - } - else { - v->RedGamma = v->GreenGamma = v->BlueGamma = 1.0; - } - - v->ximage_flag = ximage_flag; - v->level = level; - v->VisualCaveat = visualCaveat; - - (void) initialize_visual_and_buffer( 0, v, NULL, rgb_flag, 0, 0 ); - - { - int xclass; - xclass = GET_VISUAL_CLASS(v); - if (xclass==TrueColor || xclass==DirectColor) { - red_bits = bitcount(GET_REDMASK(v)); - green_bits = bitcount(GET_GREENMASK(v)); - blue_bits = bitcount(GET_BLUEMASK(v)); - alpha_bits = 0; - } - else { - /* this is an approximation */ - int depth; - depth = GET_VISUAL_DEPTH(v); - red_bits = depth / 3; - depth -= red_bits; - green_bits = depth / 2; - depth -= green_bits; - blue_bits = depth; - alpha_bits = 0; - assert( red_bits + green_bits + blue_bits == GET_VISUAL_DEPTH(v) ); - } - } - - if (alpha_flag && alpha_bits == 0) - alpha_bits = 8; - - _mesa_initialize_visual( &v->mesa_visual, - rgb_flag, db_flag, stereo_flag, - red_bits, green_bits, - blue_bits, alpha_bits, - v->index_bits, - depth_size, - stencil_size, - accum_red_size, accum_green_size, - accum_blue_size, accum_alpha_size, - 0 ); - return v; -} - - -void XMesaSetVisualDisplay( XMesaDisplay *dpy, XMesaVisual v ) -{ - v->display = dpy; -} - - -void XMesaDestroyVisual( XMesaVisual v ) -{ -#ifndef XFree86Server - FREE(v->visinfo); -#endif - FREE(v); -} - - - -/* - * Create a new XMesaContext. - * Input: v - XMesaVisual - * share_list - another XMesaContext with which to share display - * lists or NULL if no sharing is wanted. - * Return: an XMesaContext or NULL if error. - */ -XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) -{ - static GLboolean firstTime = GL_TRUE; - XMesaContext c; - GLcontext *ctx; - GLboolean direct = GL_TRUE; /* not really */ - - if (firstTime) { - _glthread_INIT_MUTEX(_xmesa_lock); - firstTime = GL_FALSE; - } - - c = (XMesaContext) CALLOC_STRUCT(xmesa_context); - if (!c) { - return NULL; - } - - ctx = c->gl_ctx = _mesa_create_context( &v->mesa_visual, - share_list ? share_list->gl_ctx : (GLcontext *) NULL, - (void *) c, direct); - if (!c->gl_ctx) { - FREE(c); - return NULL; - } - - _mesa_enable_sw_extensions(ctx); - _mesa_enable_1_3_extensions(ctx); - _mesa_enable_1_4_extensions(ctx); - - if (CHECK_BYTE_ORDER(v)) { - c->swapbytes = GL_FALSE; - } - else { - c->swapbytes = GL_TRUE; - } - - c->xm_visual = v; - c->xm_draw_buffer = NULL; /* set later by XMesaMakeCurrent */ - c->xm_read_buffer = NULL; /* set later by XMesaMakeCurrent */ - c->xm_buffer = NULL; /* set later by XMesaMakeCurrent */ - c->display = v->display; - c->pixelformat = v->dithered_pf; /* Dithering is enabled by default */ - - ctx->Driver.UpdateState = xmesa_update_state; - - /* Initialize the software rasterizer and helper modules. - */ - _swrast_CreateContext( ctx ); - _ac_CreateContext( ctx ); - _tnl_CreateContext( ctx ); - _swsetup_CreateContext( ctx ); - - xmesa_register_swrast_functions( ctx ); - - /* Set up some constant pointers: - */ - xmesa_init_pointers( ctx ); - - return c; -} - - - - -void XMesaDestroyContext( XMesaContext c ) -{ -#ifdef FX - if (c->xm_draw_buffer && c->xm_buffer->FXctx) - fxMesaDestroyContext(c->xm_draw_buffer->FXctx); -#endif - if (c->gl_ctx) { - _swsetup_DestroyContext( c->gl_ctx ); - _swrast_DestroyContext( c->gl_ctx ); - _tnl_DestroyContext( c->gl_ctx ); - _ac_DestroyContext( c->gl_ctx ); - _mesa_destroy_context( c->gl_ctx ); - } - - FREE( c ); -} - - - -/* - * XXX this isn't a public function! It's a hack for the 3Dfx driver. - * Create a new XMesaBuffer from an X window. - * Input: v - the XMesaVisual - * w - the window - * c - the context - * Return: new XMesaBuffer or NULL if error - */ -XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, XMesaWindow w, - XMesaContext c ) -{ -#ifndef XFree86Server - XWindowAttributes attr; -#endif -#ifdef FX - char *fxEnvVar; -#endif - int client = 0; - - XMesaBuffer b = alloc_xmesa_buffer(); - if (!b) { - return NULL; - } - - (void) c; - -#ifdef XFree86Server - client = CLIENT_ID(((XMesaDrawable)w)->id); -#endif - - assert(v); - -#ifdef XFree86Server - if (GET_VISUAL_DEPTH(v) != ((XMesaDrawable)w)->depth) { -#else - XGetWindowAttributes( v->display, w, &attr ); - - if (GET_VISUAL_DEPTH(v) != attr.depth) { -#endif - _mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between visual and window!\n"); - return NULL; - } - - b->xm_visual = v; - b->type = WINDOW; - b->display = v->display; -#ifdef XFree86Server - b->cmap = (ColormapPtr)LookupIDByType(wColormap(w), RT_COLORMAP); -#else - if (attr.colormap) { - b->cmap = attr.colormap; - } - else { - _mesa_warning(NULL, "Window %u has no colormap!\n", (unsigned int) w); - /* this is weird, a window w/out a colormap!? */ - /* OK, let's just allocate a new one and hope for the best */ - b->cmap = XCreateColormap(v->display, w, attr.visual, AllocNone); - } -#endif - - /* determine back buffer implementation */ - if (v->mesa_visual.doubleBufferMode) { - if (v->ximage_flag) { - b->db_state = BACK_XIMAGE; - } - else { - b->db_state = BACK_PIXMAP; - } - } - else { - b->db_state = 0; - } - - _mesa_initialize_framebuffer(&b->mesa_buffer, - &v->mesa_visual, - v->mesa_visual.depthBits > 0, - v->mesa_visual.stencilBits > 0, - v->mesa_visual.accumRedBits > 0, - v->mesa_visual.alphaBits > 0 ); - - if (!initialize_visual_and_buffer( client, v, b, v->mesa_visual.rgbMode, - (XMesaDrawable)w, b->cmap )) { - free_xmesa_buffer(client, b); - return NULL; - } - -#ifdef FX - fxEnvVar = _mesa_getenv("MESA_GLX_FX"); - if (fxEnvVar) { - if (fxEnvVar[0]!='d') { - int attribs[100]; - int numAttribs = 0; - int hw; - if (v->mesa_visual.depthBits > 0) { - attribs[numAttribs++] = FXMESA_DEPTH_SIZE; - attribs[numAttribs++] = 1; - } - if (v->mesa_visual.doubleBufferMode) { - attribs[numAttribs++] = FXMESA_DOUBLEBUFFER; - } - if (v->mesa_visual.accumRedBits > 0) { - attribs[numAttribs++] = FXMESA_ACCUM_SIZE; - attribs[numAttribs++] = v->mesa_visual.accumRedBits; - } - if (v->mesa_visual.stencilBits > 0) { - attribs[numAttribs++] = FXMESA_STENCIL_SIZE; - attribs[numAttribs++] = v->mesa_visual.stencilBits; - } - if (v->mesa_visual.alphaBits > 0) { - attribs[numAttribs++] = FXMESA_ALPHA_SIZE; - attribs[numAttribs++] = 1; - } - if (c->gl_ctx) { -#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with fxapi.c! */ - attribs[numAttribs++] = FXMESA_SHARE_CONTEXT; - attribs[numAttribs++] = (int) c->gl_ctx; - } - attribs[numAttribs++] = FXMESA_NONE; - - if ((hw = fxQueryHardware())==GR_SSTTYPE_VOODOO) { - b->FXctx = fxMesaCreateBestContext(0, b->width, b->height, attribs); - if ((v->undithered_pf!=PF_INDEX) && (b->backimage)) { - b->FXisHackUsable = b->FXctx ? GL_TRUE : GL_FALSE; - if (fxEnvVar[0]=='w' || fxEnvVar[0]=='W') - b->FXwindowHack = b->FXctx ? GL_TRUE : GL_FALSE; - else - b->FXwindowHack = GL_FALSE; - } - } - else { - if (fxEnvVar[0]=='w' || fxEnvVar[0]=='W') - b->FXctx = fxMesaCreateContext(w, GR_RESOLUTION_NONE, - GR_REFRESH_75Hz, attribs); - else - b->FXctx = fxMesaCreateBestContext(0, b->width, b->height, attribs); - b->FXisHackUsable = GL_FALSE; - b->FXwindowHack = GL_FALSE; - } - /* - fprintf(stderr, - "voodoo %d, wid %d height %d hack: usable %d active %d\n", - hw, b->width, b->height, b->FXisHackUsable, b->FXwindowHack); - */ - } - } - else { - _mesa_warning(NULL, "WARNING: This Mesa Library includes the Glide driver but\n"); - _mesa_warning(NULL, " you have not defined the MESA_GLX_FX env. var.\n"); - _mesa_warning(NULL, " (check the README.3DFX file for more information).\n\n"); - _mesa_warning(NULL, " you can disable this message with a 'export MESA_GLX_FX=disable'.\n"); - } -#endif - - return b; -} - - -XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w ) -{ - return XMesaCreateWindowBuffer2( v, w, NULL ); -} - - -/* - * Create a new XMesaBuffer from an X pixmap. - * Input: v - the XMesaVisual - * p - the pixmap - * cmap - the colormap, may be 0 if using a TrueColor or DirectColor - * visual for the pixmap - * Return: new XMesaBuffer or NULL if error - */ -XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, - XMesaPixmap p, XMesaColormap cmap ) -{ - int client = 0; - XMesaBuffer b = alloc_xmesa_buffer(); - if (!b) { - return NULL; - } - - -#ifdef XFree86Server - client = CLIENT_ID(((XMesaDrawable)p)->id); -#endif - - assert(v); - - b->xm_visual = v; - b->type = PIXMAP; - b->display = v->display; - b->cmap = cmap; - - /* determine back buffer implementation */ - if (v->mesa_visual.doubleBufferMode) { - if (v->ximage_flag) { - b->db_state = BACK_XIMAGE; - } - else { - b->db_state = BACK_PIXMAP; - } - } - else { - b->db_state = 0; - } - - _mesa_initialize_framebuffer(&b->mesa_buffer, - &v->mesa_visual, - v->mesa_visual.depthBits > 0, - v->mesa_visual.stencilBits > 0, - v->mesa_visual.accumRedBits + - v->mesa_visual.accumGreenBits + - v->mesa_visual.accumBlueBits > 0, - v->mesa_visual.alphaBits > 0 ); - - if (!initialize_visual_and_buffer(client, v, b, v->mesa_visual.rgbMode, - (XMesaDrawable)p, cmap)) { - free_xmesa_buffer(client, b); - return NULL; - } - - return b; -} - - - -XMesaBuffer XMesaCreatePBuffer( XMesaVisual v, XMesaColormap cmap, - unsigned int width, unsigned int height ) -{ -#ifdef XFree86Server - return 0; -#else - int client = 0; - XMesaWindow root; - XMesaDrawable drawable; /* X Pixmap Drawable */ - XMesaBuffer b = alloc_xmesa_buffer(); - if (!b) { - return NULL; - } - - b->xm_visual = v; - b->type = PBUFFER; - b->display = v->display; - b->cmap = cmap; - - /* allocate pixmap for front buffer */ - root = RootWindow( v->display, v->visinfo->screen ); - drawable = XCreatePixmap( v->display, root, width, height, v->visinfo->depth ); - - /* determine back buffer implementation */ - if (v->mesa_visual.doubleBufferMode) { - if (v->ximage_flag) { - b->db_state = BACK_XIMAGE; - } - else { - b->db_state = BACK_PIXMAP; - } - } - else { - b->db_state = 0; - } - - _mesa_initialize_framebuffer(&b->mesa_buffer, - &v->mesa_visual, - v->mesa_visual.depthBits > 0, - v->mesa_visual.stencilBits > 0, - v->mesa_visual.accumRedBits + - v->mesa_visual.accumGreenBits + - v->mesa_visual.accumBlueBits > 0, - v->mesa_visual.alphaBits > 0 ); - - if (!initialize_visual_and_buffer(client, v, b, v->mesa_visual.rgbMode, - drawable, cmap)) { - free_xmesa_buffer(client, b); - return NULL; - } - - return b; -#endif -} - - - -/* - * Deallocate an XMesaBuffer structure and all related info. - */ -void XMesaDestroyBuffer( XMesaBuffer b ) -{ - int client = 0; - -#ifdef XFree86Server - if (b->frontbuffer) - client = CLIENT_ID(b->frontbuffer->id); -#endif - - if (b->gc) XMesaFreeGC( b->xm_visual->display, b->gc ); - if (b->cleargc) XMesaFreeGC( b->xm_visual->display, b->cleargc ); - if (b->swapgc) XMesaFreeGC( b->xm_visual->display, b->swapgc ); - - if (b->backimage) { -#if defined(USE_XSHM) && !defined(XFree86Server) - if (b->shm) { - XShmDetach( b->xm_visual->display, &b->shminfo ); - XDestroyImage( b->backimage ); - shmdt( b->shminfo.shmaddr ); - } - else -#endif - XMesaDestroyImage( b->backimage ); - } - if (b->backpixmap) { - XMesaFreePixmap( b->xm_visual->display, b->backpixmap ); - if (b->xm_visual->hpcr_clear_flag) { - XMesaFreePixmap( b->xm_visual->display, - b->xm_visual->hpcr_clear_pixmap ); - XMesaDestroyImage( b->xm_visual->hpcr_clear_ximage ); - } - } - if (b->rowimage) { - FREE( b->rowimage->data ); - b->rowimage->data = NULL; - XMesaDestroyImage( b->rowimage ); - } - - free_xmesa_buffer(client, b); -} - - - -/* - * Bind buffer b to context c and make c the current rendering context. - */ -GLboolean XMesaMakeCurrent( XMesaContext c, XMesaBuffer b ) -{ - return XMesaMakeCurrent2( c, b, b ); -} - - -/* - * Bind buffer b to context c and make c the current rendering context. - */ -GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer, - XMesaBuffer readBuffer ) -{ - if (c) { - if (!drawBuffer || !readBuffer) - return GL_FALSE; /* must specify buffers! */ - -#ifdef FX - if (drawBuffer->FXctx) { - fxMesaMakeCurrent(drawBuffer->FXctx); - - c->xm_draw_buffer = drawBuffer; - c->xm_read_buffer = readBuffer; - c->xm_buffer = drawBuffer; - - return GL_TRUE; - } -#endif - if (c->gl_ctx == _mesa_get_current_context() - && c->xm_draw_buffer == drawBuffer - && c->xm_read_buffer == readBuffer - && c->xm_draw_buffer->wasCurrent) { - /* same context and buffer, do nothing */ - return GL_TRUE; - } - - c->xm_draw_buffer = drawBuffer; - c->xm_read_buffer = readBuffer; - c->xm_buffer = drawBuffer; - - _mesa_make_current2(c->gl_ctx, - &drawBuffer->mesa_buffer, - &readBuffer->mesa_buffer); - - if (c->gl_ctx->Viewport.Width == 0) { - /* initialize viewport to window size */ - _mesa_Viewport( 0, 0, drawBuffer->width, drawBuffer->height ); - c->gl_ctx->Scissor.Width = drawBuffer->width; - c->gl_ctx->Scissor.Height = drawBuffer->height; - } - - if (c->xm_visual->mesa_visual.rgbMode) { - /* - * Must recompute and set these pixel values because colormap - * can be different for different windows. - */ - c->clearpixel = xmesa_color_to_pixel( c, - c->clearcolor[0], - c->clearcolor[1], - c->clearcolor[2], - c->clearcolor[3], - c->xm_visual->undithered_pf); - XMesaSetForeground(c->display, c->xm_draw_buffer->cleargc, c->clearpixel); - } - - /* Solution to Stephane Rehel's problem with glXReleaseBuffersMESA(): */ - c->xm_draw_buffer->wasCurrent = GL_TRUE; - } - else { - /* Detach */ - _mesa_make_current2( NULL, NULL, NULL ); - } - return GL_TRUE; -} - - -/* - * Unbind the context c from its buffer. - */ -GLboolean XMesaUnbindContext( XMesaContext c ) -{ - /* A no-op for XFree86 integration purposes */ - return GL_TRUE; -} - - -XMesaContext XMesaGetCurrentContext( void ) -{ - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - return xmesa; - } - else { - return 0; - } -} - - -XMesaBuffer XMesaGetCurrentBuffer( void ) -{ - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - return xmesa->xm_draw_buffer; - } - else { - return 0; - } -} - - -/* New in Mesa 3.1 */ -XMesaBuffer XMesaGetCurrentReadBuffer( void ) -{ - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - return xmesa->xm_read_buffer; - } - else { - return 0; - } -} - - -GLboolean XMesaForceCurrent(XMesaContext c) -{ - if (c) { - if (c->gl_ctx != _mesa_get_current_context()) { - _mesa_make_current(c->gl_ctx, &c->xm_draw_buffer->mesa_buffer); - } - } - else { - _mesa_make_current(NULL, NULL); - } - return GL_TRUE; -} - - -GLboolean XMesaLoseCurrent(XMesaContext c) -{ - (void) c; - _mesa_make_current(NULL, NULL); - return GL_TRUE; -} - - -/* - * Switch 3Dfx support hack between window and full-screen mode. - */ -GLboolean XMesaSetFXmode( GLint mode ) -{ -#ifdef FX - const char *fx = _mesa_getenv("MESA_GLX_FX"); - if (fx && fx[0] != 'd') { - GET_CURRENT_CONTEXT(ctx); - GrHwConfiguration hw; - if (!FX_grSstQueryHardware(&hw)) { - /*fprintf(stderr, "!grSstQueryHardware\n");*/ - return GL_FALSE; - } - if (hw.num_sst < 1) { - /*fprintf(stderr, "hw.num_sst < 1\n");*/ - return GL_FALSE; - } - if (ctx) { - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (mode == XMESA_FX_WINDOW) { - if (xmesa->xm_draw_buffer->FXisHackUsable) { - FX_grSstControl(GR_CONTROL_DEACTIVATE); - xmesa->xm_draw_buffer->FXwindowHack = GL_TRUE; - return GL_TRUE; - } - } - else if (mode == XMESA_FX_FULLSCREEN) { - FX_grSstControl(GR_CONTROL_ACTIVATE); - xmesa->xm_draw_buffer->FXwindowHack = GL_FALSE; - return GL_TRUE; - } - else { - /* Error: Bad mode value */ - } - } - } - /*fprintf(stderr, "fallthrough\n");*/ -#else - (void) mode; -#endif - return GL_FALSE; -} - - - -#ifdef FX -/* - * Read image from VooDoo frame buffer into X/Mesa's back XImage. - */ -static void FXgetImage( XMesaBuffer b ) -{ - GET_CURRENT_CONTEXT(ctx); - static unsigned short pixbuf[MAX_WIDTH]; - GLuint x, y; - int xpos, ypos; - XMesaWindow root; - unsigned int bw, depth, width, height; - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - -#ifdef XFree86Server - x = b->frontbuffer->x; - y = b->frontbuffer->y; - width = b->frontbuffer->width; - height = b->frontbuffer->height; - depth = b->frontbuffer->depth; -#else - XGetGeometry( b->xm_visual->display, b->frontbuffer, - &root, &xpos, &ypos, &width, &height, &bw, &depth); -#endif - if (b->width != width || b->height != height) { - b->width = MIN2((int)width, b->FXctx->width); - b->height = MIN2((int)height, b->FXctx->height); - if (b->width & 1) - b->width--; /* prevent odd width */ - xmesa_alloc_back_buffer( b ); - } - - grLfbWriteColorFormat(GR_COLORFORMAT_ARGB); - if (b->xm_visual->undithered_pf==PF_5R6G5B) { - /* Special case: 16bpp RGB */ - grLfbReadRegion( GR_BUFFER_FRONTBUFFER, /* src buffer */ - 0, b->FXctx->height - b->height, /*pos*/ - b->width, b->height, /* size */ - b->width * sizeof(GLushort), /* stride */ - b->backimage->data); /* dest buffer */ - } - else if (b->xm_visual->dithered_pf==PF_DITHER - && GET_VISUAL_DEPTH(b->xm_visual)==8) { - /* Special case: 8bpp RGB */ - for (y=0;yheight;y++) { - GLubyte *ptr = (GLubyte*) b->backimage->data - + b->backimage->bytes_per_line * y; - XDITHER_SETUP(y); - - /* read row from 3Dfx frame buffer */ - grLfbReadRegion( GR_BUFFER_FRONTBUFFER, - 0, b->FXctx->height-(b->height-y), - b->width, 1, - 0, - pixbuf ); - - /* write to XImage back buffer */ - for (x=0;xwidth;x++) { - GLubyte r = (pixbuf[x] & 0xf800) >> 8; - GLubyte g = (pixbuf[x] & 0x07e0) >> 3; - GLubyte b = (pixbuf[x] & 0x001f) << 3; - *ptr++ = XDITHER( x, r, g, b); - } - } - } - else { - /* General case: slow! */ - for (y=0;yheight;y++) { - /* read row from 3Dfx frame buffer */ - grLfbReadRegion( GR_BUFFER_FRONTBUFFER, - 0, b->FXctx->height-(b->height-y), - b->width, 1, - 0, - pixbuf ); - - /* write to XImage back buffer */ - for (x=0;xwidth;x++) { - XMesaPutPixel(b->backimage,x,y, - xmesa_color_to_pixel(xmesa, - (pixbuf[x] & 0xf800) >> 8, - (pixbuf[x] & 0x07e0) >> 3, - (pixbuf[x] & 0x001f) << 3, - 0xff, - b->xm_visual->undithered_pf)); - } - } - } - grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); -} -#endif - - -/* - * Copy the back buffer to the front buffer. If there's no back buffer - * this is a no-op. - */ -void XMesaSwapBuffers( XMesaBuffer b ) -{ - GET_CURRENT_CONTEXT(ctx); - - /* If we're swapping the buffer associated with the current context - * we have to flush any pending rendering commands first. - */ - if (ctx && ctx->DrawBuffer == &(b->mesa_buffer)) - _mesa_notifySwapBuffers(ctx); - - if (b->db_state) { -#ifdef FX - if (b->FXctx) { - fxMesaSwapBuffers(); - - if (b->FXwindowHack) - FXgetImage(b); - else - return; - } -#endif - if (b->backimage) { - /* Copy Ximage from host's memory to server's window */ -#if defined(USE_XSHM) && !defined(XFree86Server) - if (b->shm) { - /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ - XShmPutImage( b->xm_visual->display, b->frontbuffer, - b->swapgc, - b->backimage, 0, 0, - 0, 0, b->width, b->height, False ); - /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ - } - else -#endif - { - /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ - XMesaPutImage( b->xm_visual->display, b->frontbuffer, - b->swapgc, - b->backimage, 0, 0, - 0, 0, b->width, b->height ); - /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ - } - } - else { - /* Copy pixmap to window on server */ - /*_glthread_LOCK_MUTEX(_xmesa_lock);*/ - XMesaCopyArea( b->xm_visual->display, - b->backpixmap, /* source drawable */ - b->frontbuffer, /* dest. drawable */ - b->swapgc, - 0, 0, b->width, b->height, /* source region */ - 0, 0 /* dest region */ - ); - /*_glthread_UNLOCK_MUTEX(_xmesa_lock);*/ - } - } -#if !defined(XFree86Server) - XSync( b->xm_visual->display, False ); -#endif -} - - - -/* - * Copy sub-region of back buffer to front buffer - */ -void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height ) -{ - GET_CURRENT_CONTEXT(ctx); - - /* If we're swapping the buffer associated with the current context - * we have to flush any pending rendering commands first. - */ - if (ctx && ctx->DrawBuffer == &(b->mesa_buffer)) - _mesa_notifySwapBuffers(ctx); - - if (b->db_state) { - int yTop = b->height - y - height; -#ifdef FX - if (b->FXctx) { - fxMesaSwapBuffers(); - if (b->FXwindowHack) - FXgetImage(b); - else - return; - } -#endif - if (b->backimage) { - /* Copy Ximage from host's memory to server's window */ -#if defined(USE_XSHM) && !defined(XFree86Server) - if (b->shm) { - /* XXX assuming width and height aren't too large! */ - XShmPutImage( b->xm_visual->display, b->frontbuffer, - b->swapgc, - b->backimage, x, yTop, - x, yTop, width, height, False ); - /* wait for finished event??? */ - } - else -#endif - { - /* XXX assuming width and height aren't too large! */ - XMesaPutImage( b->xm_visual->display, b->frontbuffer, - b->swapgc, - b->backimage, x, yTop, - x, yTop, width, height ); - } - } - else { - /* Copy pixmap to window on server */ - XMesaCopyArea( b->xm_visual->display, - b->backpixmap, /* source drawable */ - b->frontbuffer, /* dest. drawable */ - b->swapgc, - x, yTop, width, height, /* source region */ - x, yTop /* dest region */ - ); - } - } -} - - -/* - * Return a pointer to the XMesa backbuffer Pixmap or XImage. This function - * is a way to get "under the hood" of X/Mesa so one can manipulate the - * back buffer directly. - * Output: pixmap - pointer to back buffer's Pixmap, or 0 - * ximage - pointer to back buffer's XImage, or NULL - * Return: GL_TRUE = context is double buffered - * GL_FALSE = context is single buffered - */ -GLboolean XMesaGetBackBuffer( XMesaBuffer b, - XMesaPixmap *pixmap, - XMesaImage **ximage ) -{ - if (b->db_state) { - if (pixmap) *pixmap = b->backpixmap; - if (ximage) *ximage = b->backimage; - return GL_TRUE; - } - else { - *pixmap = 0; - *ximage = NULL; - return GL_FALSE; - } -} - - -/* - * Return the depth buffer associated with an XMesaBuffer. - * Input: b - the XMesa buffer handle - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLboolean XMesaGetDepthBuffer( XMesaBuffer b, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ) -{ - if (!b->mesa_buffer.DepthBuffer) { - *width = 0; - *height = 0; - *bytesPerValue = 0; - *buffer = 0; - return GL_FALSE; - } - else { - *width = b->mesa_buffer.Width; - *height = b->mesa_buffer.Height; - *bytesPerValue = sizeof(GLdepth); - *buffer = b->mesa_buffer.DepthBuffer; - return GL_TRUE; - } -} - - -void XMesaFlush( XMesaContext c ) -{ - if (c && c->xm_visual) { -#ifdef XFree86Server - /* NOT_NEEDED */ -#else - XSync( c->xm_visual->display, False ); -#endif - } -} - - - -const char *XMesaGetString( XMesaContext c, int name ) -{ - (void) c; - if (name==XMESA_VERSION) { - return "5.0.1"; - } - else if (name==XMESA_EXTENSIONS) { - return ""; - } - else { - return NULL; - } -} - - - -XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy, XMesaDrawable d ) -{ - XMesaBuffer b; - for (b=XMesaBufferList; b; b=b->Next) { - if (b->frontbuffer==d && b->display==dpy) { - return b; - } - } - return NULL; -} - - - -/* - * Look for XMesaBuffers whose X window has been destroyed. - * Deallocate any such XMesaBuffers. - */ -void XMesaGarbageCollect( void ) -{ - XMesaBuffer b, next; - for (b=XMesaBufferList; b; b=next) { - next = b->Next; - if (b->display && b->frontbuffer && b->type == WINDOW) { -#ifdef XFree86Server - /* NOT_NEEDED */ -#else - XSync(b->display, False); - if (!window_exists( b->display, b->frontbuffer )) { - /* found a dead window, free the ancillary info */ - XMesaDestroyBuffer( b ); - } -#endif - } - } -} - - -void XMesaReset( void ) -{ - while (XMesaBufferList) - XMesaDestroyBuffer(XMesaBufferList); - - XMesaBufferList = NULL; -} - - -unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, - GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ) -{ - GLint r = (GLint) (red * 255.0F); - GLint g = (GLint) (green * 255.0F); - GLint b = (GLint) (blue * 255.0F); - GLint a = (GLint) (alpha * 255.0F); - - switch (xmesa->pixelformat) { - case PF_INDEX: - return 0; - case PF_TRUECOLOR: - { - unsigned long p; - PACK_TRUECOLOR( p, r, g, b ); - return p; - } - case PF_8A8B8G8R: - return PACK_8A8B8G8R( r, g, b, a ); - case PF_8R8G8B: - return PACK_8R8G8B( r, g, b ); - case PF_5R6G5B: - return PACK_5R6G5B( r, g, b ); - case PF_DITHER: - { - DITHER_SETUP; - return DITHER( x, y, r, g, b ); - } - case PF_1BIT: - /* 382 = (3*255)/2 */ - return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip; - case PF_HPCR: - return DITHER_HPCR(x, y, r, g, b); - case PF_LOOKUP: - { - LOOKUP_SETUP; - return LOOKUP( r, g, b ); - } - case PF_GRAYSCALE: - return GRAY_RGB( r, g, b ); - case PF_DITHER_5R6G5B: - /* fall through */ - case PF_TRUEDITHER: - { - unsigned long p; - PACK_TRUEDITHER(p, x, y, r, g, b); - return p; - } - default: - _mesa_problem(NULL, "Bad pixel format in XMesaDitherColor"); - } - return 0; -} - - -/* - * This is typically called when the window size changes and we need - * to reallocate the buffer's back/depth/stencil/accum buffers. - */ -void XMesaResizeBuffers( XMesaBuffer b ) -{ - xmesa_resize_buffers( &(b->mesa_buffer) ); - -} - Index: xc/extras/Mesa/src/X/xm_dd.c diff -u xc/extras/Mesa/src/X/xm_dd.c:1.9 xc/extras/Mesa/src/X/xm_dd.c:removed --- xc/extras/Mesa/src/X/xm_dd.c:1.9 Wed Oct 22 11:27:44 2003 +++ xc/extras/Mesa/src/X/xm_dd.c Wed Mar 16 21:00:47 2005 @@ -1,1043 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/X/xm_dd.c,v 1.9 2003/10/22 15:27:44 tsi Exp $ */ - -#include "glxheader.h" -#include "context.h" -#include "colormac.h" -#include "depth.h" -#include "drawpix.h" -#include "extensions.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" -#include "state.h" -#include "texstore.h" -#include "texformat.h" -#include "xmesaP.h" -#include "array_cache/acache.h" -#include "swrast/s_context.h" -#include "swrast/swrast.h" -#include "swrast/s_alphabuf.h" -#include "swrast_setup/swrast_setup.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" - - -/* - * Return the size (width, height) of the X window for the given GLframebuffer. - * Output: width - width of buffer in pixels. - * height - height of buffer in pixels. - */ -static void -get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height ) -{ - /* We can do this cast because the first field in the XMesaBuffer - * struct is a GLframebuffer struct. If this weren't true, we'd - * need a pointer from the GLframebuffer to the XMesaBuffer. - */ - const XMesaBuffer xmBuffer = (XMesaBuffer) buffer; - unsigned int winwidth, winheight; -#ifdef XFree86Server - /* XFree86 GLX renderer */ - if (xmBuffer->frontbuffer->width > MAX_WIDTH || - xmBuffer->frontbuffer->height > MAX_HEIGHT) { - winwidth = buffer->Width; - winheight = buffer->Height; - } else { - winwidth = xmBuffer->frontbuffer->width; - winheight = xmBuffer->frontbuffer->height; - } -#else - Window root; - int winx, winy; - unsigned int bw, d; - - _glthread_LOCK_MUTEX(_xmesa_lock); - XSync(xmBuffer->xm_visual->display, 0); /* added for Chromium */ - XGetGeometry( xmBuffer->xm_visual->display, xmBuffer->frontbuffer, &root, - &winx, &winy, &winwidth, &winheight, &bw, &d ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); -#endif - - (void)kernel8; /* Muffle compiler */ - - *width = winwidth; - *height = winheight; -} - - -static void -finish( GLcontext *ctx ) -{ -#ifdef XFree86Server - /* NOT_NEEDED */ -#else - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (xmesa) { - _glthread_LOCK_MUTEX(_xmesa_lock); - XSync( xmesa->display, False ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); - } -#endif -} - - -static void -flush( GLcontext *ctx ) -{ -#ifdef XFree86Server - /* NOT_NEEDED */ -#else - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (xmesa) { - _glthread_LOCK_MUTEX(_xmesa_lock); - XFlush( xmesa->display ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); - } -#endif -} - - - -/* - * This chooses the color buffer for reading and writing spans, points, - * lines, and triangles. - */ -static void -set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) -{ - /* We can make this cast since the XMesaBuffer wraps GLframebuffer. - * GLframebuffer is the first member in a XMesaBuffer struct. - */ - XMesaBuffer target = (XMesaBuffer) buffer; - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - - /* This assignment tells the span/point/line/triangle functions - * which XMesaBuffer to use. - */ - xmesa->xm_buffer = target; - - /* - * Now determine front vs back color buffer. - */ - if (bufferBit == FRONT_LEFT_BIT) { - target->buffer = target->frontbuffer; - } - else if (bufferBit == BACK_LEFT_BIT) { - ASSERT(target->db_state); - if (target->backpixmap) { - /* back buffer is a pixmape */ - target->buffer = (XMesaDrawable)target->backpixmap; - } - else if (target->backimage) { - /* back buffer is an XImage */ - target->buffer = None; - } - else { - /* No back buffer!!!! Must be out of memory, use front buffer */ - target->buffer = target->frontbuffer; - } - } - else { - _mesa_problem(ctx, "invalid buffer 0x%x in set_buffer() in xm_dd.c"); - return; - } - xmesa_update_span_funcs(ctx); -} - - - -static void -clear_index( GLcontext *ctx, GLuint index ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - xmesa->clearpixel = (unsigned long) index; - XMesaSetForeground( xmesa->display, xmesa->xm_draw_buffer->cleargc, - (unsigned long) index ); -} - - -static void -clear_color( GLcontext *ctx, const GLfloat color[4] ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[2], color[2]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[3], color[3]); - xmesa->clearpixel = xmesa_color_to_pixel( xmesa, - xmesa->clearcolor[0], - xmesa->clearcolor[1], - xmesa->clearcolor[2], - xmesa->clearcolor[3], - xmesa->xm_visual->undithered_pf ); - _glthread_LOCK_MUTEX(_xmesa_lock); - XMesaSetForeground( xmesa->display, xmesa->xm_draw_buffer->cleargc, - xmesa->clearpixel ); - _glthread_UNLOCK_MUTEX(_xmesa_lock); -} - - - -/* Set index mask ala glIndexMask */ -static void -index_mask( GLcontext *ctx, GLuint mask ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (xmesa->xm_draw_buffer->buffer != XIMAGE) { - unsigned long m; - if (mask==0xffffffff) { - m = ((unsigned long)~0L); - } - else { - m = (unsigned long) mask; - } - XMesaSetPlaneMask( xmesa->display, xmesa->xm_draw_buffer->cleargc, m ); - XMesaSetPlaneMask( xmesa->display, xmesa->xm_draw_buffer->gc, m ); - } -} - - -/* Implements glColorMask() */ -static void -color_mask(GLcontext *ctx, - GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - int xclass = GET_VISUAL_CLASS(xmesa->xm_visual); - (void) amask; - - if (xclass == TrueColor || xclass == DirectColor) { - unsigned long m; - if (rmask && gmask && bmask) { - m = ((unsigned long)~0L); - } - else { - m = 0; - if (rmask) m |= GET_REDMASK(xmesa->xm_visual); - if (gmask) m |= GET_GREENMASK(xmesa->xm_visual); - if (bmask) m |= GET_BLUEMASK(xmesa->xm_visual); - } - XMesaSetPlaneMask( xmesa->display, xmesa->xm_draw_buffer->cleargc, m ); - XMesaSetPlaneMask( xmesa->display, xmesa->xm_draw_buffer->gc, m ); - } -} - - - -/**********************************************************************/ -/*** glClear implementations ***/ -/**********************************************************************/ - - -static void -clear_front_pixmap( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->frontbuffer, - xmesa->xm_draw_buffer->cleargc, - 0, 0, - xmesa->xm_draw_buffer->width+1, - xmesa->xm_draw_buffer->height+1 ); - } - else { - XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->frontbuffer, - xmesa->xm_draw_buffer->cleargc, - x, xmesa->xm_draw_buffer->height - y - height, - width, height ); - } -} - - -static void -clear_back_pixmap( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->backpixmap, - xmesa->xm_draw_buffer->cleargc, - 0, 0, - xmesa->xm_draw_buffer->width+1, - xmesa->xm_draw_buffer->height+1 ); - } - else { - XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->backpixmap, - xmesa->xm_draw_buffer->cleargc, - x, xmesa->xm_draw_buffer->height - y - height, - width, height ); - } -} - - -static void -clear_8bit_ximage( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - size_t n = xmesa->xm_draw_buffer->backimage->bytes_per_line - * xmesa->xm_draw_buffer->backimage->height; - MEMSET( xmesa->xm_draw_buffer->backimage->data, xmesa->clearpixel, n ); - } - else { - GLint i; - for (i=0;ixm_draw_buffer, x, y+i ); - MEMSET( ptr, xmesa->clearpixel, width ); - } - } -} - - -static void -clear_HPCR_ximage( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - GLint i, c16 = (xmesa->xm_draw_buffer->backimage->bytes_per_line>>4)<<4; - GLubyte *ptr = (GLubyte *)xmesa->xm_draw_buffer->backimage->data; - for (i=0; ixm_draw_buffer->backimage->height; i++) { - GLint j; - GLubyte *sptr = xmesa->xm_visual->hpcr_clear_ximage_pattern[0]; - if (i&1) { - sptr += 16; - } - for (j=0; jxm_draw_buffer->backimage->bytes_per_line; j++) { - *ptr = sptr[j&15]; - ptr++; - } - } - } - else { - GLint i; - for (i=y; ixm_draw_buffer, x, i ); - int j; - GLubyte *sptr = xmesa->xm_visual->hpcr_clear_ximage_pattern[0]; - if (i&1) { - sptr += 16; - } - for (j=x; jDriverCtx; - register GLuint pixel = (GLuint) xmesa->clearpixel; - if (xmesa->swapbytes) { - pixel = ((pixel >> 8) & 0x00ff) | ((pixel << 8) & 0xff00); - } - if (all) { - register GLuint n; - register GLuint *ptr4 = (GLuint *) xmesa->xm_draw_buffer->backimage->data; - if ((pixel & 0xff) == ((pixel >> 8) & 0xff)) { - /* low and high bytes are equal so use memset() */ - n = xmesa->xm_draw_buffer->backimage->bytes_per_line - * xmesa->xm_draw_buffer->height; - MEMSET( ptr4, pixel & 0xff, n ); - } - else { - pixel = pixel | (pixel<<16); - n = xmesa->xm_draw_buffer->backimage->bytes_per_line - * xmesa->xm_draw_buffer->height / 4; - do { - *ptr4++ = pixel; - n--; - } while (n!=0); - - if ((xmesa->xm_draw_buffer->backimage->bytes_per_line * - xmesa->xm_draw_buffer->height) & 0x2) - *(GLushort *)ptr4 = pixel & 0xffff; - } - } - else { - register int i, j; - for (j=0;jxm_draw_buffer, x, y+j ); - for (i=0;i */ -static void -clear_24bit_ximage( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = xmesa->clearcolor[0]; - const GLubyte g = xmesa->clearcolor[1]; - const GLubyte b = xmesa->clearcolor[2]; -#if 0 /* See below */ - register GLuint clearPixel; - if (xmesa->swapbytes) { - clearPixel = (b << 16) | (g << 8) | r; - } - else { - clearPixel = (r << 16) | (g << 8) | b; - } -#endif - - if (all) { - if (r==g && g==b) { - /* same value for all three components (gray) */ - const GLint w3 = xmesa->xm_draw_buffer->width * 3; - const GLint h = xmesa->xm_draw_buffer->height; - GLint i; - for (i = 0; i < h; i++) { - bgr_t *ptr3 = PIXELADDR3(xmesa->xm_draw_buffer, 0, i); - MEMSET(ptr3, r, w3); - } - } - else { - /* the usual case */ - const GLint w = xmesa->xm_draw_buffer->width; - const GLint h = xmesa->xm_draw_buffer->height; - GLint i, j; - for (i = 0; i < h; i++) { - bgr_t *ptr3 = PIXELADDR3(xmesa->xm_draw_buffer, 0, i); - for (j = 0; j < w; j++) { - ptr3->r = r; - ptr3->g = g; - ptr3->b = b; - ptr3++; - } - } -#if 0 /* this code doesn't work for all window widths */ - register GLuint *ptr4 = (GLuint *) ptr3; - register GLuint px; - GLuint pixel4[3]; - register GLuint *p = pixel4; - pixel4[0] = clearPixel | (clearPixel << 24); - pixel4[1] = (clearPixel << 16) | (clearPixel >> 8); - pixel4[2] = (clearPixel << 8) | (clearPixel >> 16); - switch (3 & (int)(ptr3 - (bgr_t*) ptr4)){ - case 0: - break; - case 1: - px = *ptr4 & 0x00ffffff; - px |= pixel4[0] & 0xff000000; - *ptr4++ = px; - px = *ptr4 & 0xffff0000; - px |= pixel4[2] & 0x0000ffff; - *ptr4 = px; - if (0 == --n) - break; - case 2: - px = *ptr4 & 0x0000fffff; - px |= pixel4[1] & 0xffff0000; - *ptr4++ = px; - px = *ptr4 & 0xffffff00; - px |= pixel4[2] & 0x000000ff; - *ptr4 = px; - if (0 == --n) - break; - case 3: - px = *ptr4 & 0x000000ff; - px |= pixel4[2] & 0xffffff00; - *ptr4++ = px; - --n; - break; - } - while (n > 3) { - p = pixel4; - *ptr4++ = *p++; - *ptr4++ = *p++; - *ptr4++ = *p++; - n -= 4; - } - switch (n) { - case 3: - p = pixel4; - *ptr4++ = *p++; - *ptr4++ = *p++; - px = *ptr4 & 0xffffff00; - px |= clearPixel & 0xff; - *ptr4 = px; - break; - case 2: - p = pixel4; - *ptr4++ = *p++; - px = *ptr4 & 0xffff0000; - px |= *p & 0xffff; - *ptr4 = px; - break; - case 1: - px = *ptr4 & 0xff000000; - px |= *p & 0xffffff; - *ptr4 = px; - break; - case 0: - break; - } -#endif - } - } - else { - /* only clear subrect of color buffer */ - if (r==g && g==b) { - /* same value for all three components (gray) */ - GLint j; - for (j=0;jxm_draw_buffer, x, y+j ); - MEMSET(ptr3, r, 3 * width); - } - } - else { - /* non-gray clear color */ - GLint i, j; - for (j = 0; j < height; j++) { - bgr_t *ptr3 = PIXELADDR3( xmesa->xm_draw_buffer, x, y+j ); - for (i = 0; i < width; i++) { - ptr3->r = r; - ptr3->g = g; - ptr3->b = b; - ptr3++; - } - } -#if 0 /* this code might not always (seems ptr3 always == ptr4) */ - GLint j; - GLuint pixel4[3]; - pixel4[0] = clearPixel | (clearPixel << 24); - pixel4[1] = (clearPixel << 16) | (clearPixel >> 8); - pixel4[2] = (clearPixel << 8) | (clearPixel >> 16); - for (j=0;jxm_draw_buffer, x, y+j ); - register GLuint *ptr4 = (GLuint *)ptr3; - register GLuint *p, px; - GLuint w = width; - switch (3 & (int)(ptr3 - (bgr_t*) ptr4)){ - case 0: - break; - case 1: - px = *ptr4 & 0x00ffffff; - px |= pixel4[0] & 0xff000000; - *ptr4++ = px; - px = *ptr4 & 0xffff0000; - px |= pixel4[2] & 0x0000ffff; - *ptr4 = px; - if (0 == --w) - break; - case 2: - px = *ptr4 & 0x0000fffff; - px |= pixel4[1] & 0xffff0000; - *ptr4++ = px; - px = *ptr4 & 0xffffff00; - px |= pixel4[2] & 0x000000ff; - *ptr4 = px; - if (0 == --w) - break; - case 3: - px = *ptr4 & 0x000000ff; - px |= pixel4[2] & 0xffffff00; - *ptr4++ = px; - --w; - break; - } - while (w > 3){ - p = pixel4; - *ptr4++ = *p++; - *ptr4++ = *p++; - *ptr4++ = *p++; - w -= 4; - } - switch (w) { - case 3: - p = pixel4; - *ptr4++ = *p++; - *ptr4++ = *p++; - px = *ptr4 & 0xffffff00; - px |= *p & 0xff; - *ptr4 = px; - break; - case 2: - p = pixel4; - *ptr4++ = *p++; - px = *ptr4 & 0xffff0000; - px |= *p & 0xffff; - *ptr4 = px; - break; - case 1: - px = *ptr4 & 0xff000000; - px |= pixel4[0] & 0xffffff; - *ptr4 = px; - break; - case 0: - break; - } - } -#endif - } - } -} - - -static void -clear_32bit_ximage( GLcontext *ctx, GLboolean all, - GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint pixel = (GLuint) xmesa->clearpixel; - if (xmesa->swapbytes) { - pixel = ((pixel >> 24) & 0x000000ff) - | ((pixel >> 8) & 0x0000ff00) - | ((pixel << 8) & 0x00ff0000) - | ((pixel << 24) & 0xff000000); - } - if (all) { - register GLint n = xmesa->xm_draw_buffer->width * xmesa->xm_draw_buffer->height; - register GLuint *ptr4 = (GLuint *) xmesa->xm_draw_buffer->backimage->data; - if (pixel==0) { - MEMSET( ptr4, pixel, 4*n ); - } - else { - do { - *ptr4++ = pixel; - n--; - } while (n!=0); - } - } - else { - register int i, j; - for (j=0;jxm_draw_buffer, x, y+j ); - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_draw_buffer->backimage; - if (all) { - register int i, j; - width = xmesa->xm_draw_buffer->width; - height = xmesa->xm_draw_buffer->height; - for (j=0;jclearpixel ); - } - } - } - else { - /* TODO: optimize this */ - register int i, j; - y = FLIP(xmesa->xm_draw_buffer, y); - for (j=0;jclearpixel ); - } - } - } -} - - - -static void -clear_buffers( GLcontext *ctx, GLbitfield mask, - GLboolean all, GLint x, GLint y, GLint width, GLint height ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; - - if ((mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) && - xmesa->xm_draw_buffer->mesa_buffer.UseSoftwareAlphaBuffers && - ctx->Color.ColorMask[ACOMP]) { - _mesa_clear_alpha_buffers(ctx); - } - - /* we can't handle color or index masking */ - if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) { - if (mask & DD_FRONT_LEFT_BIT) { - ASSERT(xmesa->xm_draw_buffer->front_clear_func); - (*xmesa->xm_draw_buffer->front_clear_func)( ctx, all, x, y, width, height ); - mask &= ~DD_FRONT_LEFT_BIT; - } - if (mask & DD_BACK_LEFT_BIT) { - ASSERT(xmesa->xm_draw_buffer->back_clear_func); - (*xmesa->xm_draw_buffer->back_clear_func)( ctx, all, x, y, width, height ); - mask &= ~DD_BACK_LEFT_BIT; - } - } - - if (mask) - _swrast_Clear( ctx, mask, all, x, y, width, height ); -} - - -/* - * When we detect that the user has resized the window this function will - * get called. Here we'll reallocate the back buffer, depth buffer, - * stencil buffer etc. to match the new window size. - */ -void -xmesa_resize_buffers( GLframebuffer *buffer ) -{ - int height = (int) buffer->Height; - /* We can do this cast because the first field in the XMesaBuffer - * struct is a GLframebuffer struct. If this weren't true, we'd - * need a pointer from the GLframebuffer to the XMesaBuffer. - */ - XMesaBuffer xmBuffer = (XMesaBuffer) buffer; - - xmBuffer->width = buffer->Width; - xmBuffer->height = buffer->Height; - xmesa_alloc_back_buffer( xmBuffer ); - - /* Needed by FLIP macro */ - xmBuffer->bottom = height - 1; - - if (xmBuffer->backimage) { - /* Needed by PIXELADDR1 macro */ - xmBuffer->ximage_width1 = xmBuffer->backimage->bytes_per_line; - xmBuffer->ximage_origin1 = (GLubyte *) xmBuffer->backimage->data - + xmBuffer->ximage_width1 * (height-1); - - /* Needed by PIXELADDR2 macro */ - xmBuffer->ximage_width2 = xmBuffer->backimage->bytes_per_line / 2; - xmBuffer->ximage_origin2 = (GLushort *) xmBuffer->backimage->data - + xmBuffer->ximage_width2 * (height-1); - - /* Needed by PIXELADDR3 macro */ - xmBuffer->ximage_width3 = xmBuffer->backimage->bytes_per_line; - xmBuffer->ximage_origin3 = (GLubyte *) xmBuffer->backimage->data - + xmBuffer->ximage_width3 * (height-1); - - /* Needed by PIXELADDR4 macro */ - xmBuffer->ximage_width4 = xmBuffer->backimage->width; - xmBuffer->ximage_origin4 = (GLuint *) xmBuffer->backimage->data - + xmBuffer->ximage_width4 * (height-1); - } - - _swrast_alloc_buffers( buffer ); -} - -#if 0 -/* - * This function implements glDrawPixels() with an XPutImage call when - * drawing to the front buffer (X Window drawable). - * The image format must be GL_BGRA to match the PF_8R8G8B pixel format. - * XXX top/bottom edge clipping is broken! - */ -static GLboolean -drawpixels_8R8G8B( GLcontext *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_draw_buffer->buffer; - XMesaGC gc = xmesa->xm_draw_buffer->gc; - assert(dpy); - assert(buffer); - assert(gc); - - /* XXX also check for pixel scale/bias/lookup/zooming! */ - if (format == GL_BGRA && type == GL_UNSIGNED_BYTE) { - int dstX = x; - int dstY = y; - int w = width; - int h = height; - int srcX = unpack->SkipPixels; - int srcY = unpack->SkipRows; - if (_mesa_clip_pixelrect(ctx, &dstX, &dstY, &w, &h, &srcX, &srcY)) { - XMesaImage ximage; - MEMSET(&ximage, 0, sizeof(XMesaImage)); - ximage.width = width; - ximage.height = height; - ximage.format = ZPixmap; - ximage.data = (char *) pixels + (height - 1) * width * 4; - ximage.byte_order = LSBFirst; - ximage.bitmap_unit = 32; - ximage.bitmap_bit_order = LSBFirst; - ximage.bitmap_pad = 32; - ximage.depth = 24; - ximage.bytes_per_line = -width * 4; - ximage.bits_per_pixel = 32; - ximage.red_mask = 0xff0000; - ximage.green_mask = 0x00ff00; - ximage.blue_mask = 0x0000ff; - dstY = FLIP(xmesa->xm_draw_buffer,dstY) - height + 1; - XPutImage(dpy, buffer, gc, &ximage, srcX, srcY, dstX, dstY, w, h); - return GL_TRUE; - } - } - return GL_FALSE; -} -#endif - - - -static const GLubyte * -get_string( GLcontext *ctx, GLenum name ) -{ - (void) ctx; - switch (name) { - case GL_RENDERER: -#ifdef XFree86Server - return (const GLubyte *) "Mesa GLX Indirect"; -#else - return (const GLubyte *) "Mesa X11"; -#endif - case GL_VENDOR: -#ifdef XFree86Server - return (const GLubyte *) "Mesa project: www.mesa3d.org"; -#else - return NULL; -#endif - default: - return NULL; - } -} - - -static void -enable( GLcontext *ctx, GLenum pname, GLboolean state ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - - switch (pname) { - case GL_DITHER: - if (state) - xmesa->pixelformat = xmesa->xm_visual->dithered_pf; - else - xmesa->pixelformat = xmesa->xm_visual->undithered_pf; - break; - default: - ; /* silence compiler warning */ - } -} - - -void xmesa_update_state( GLcontext *ctx, GLuint new_state ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - - /* Propogate statechange information to swrast and swrast_setup - * modules. The X11 driver has no internal GL-dependent state. - */ - _swrast_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); - - - /* setup pointers to front and back buffer clear functions */ - xmesa->xm_draw_buffer->front_clear_func = clear_front_pixmap; - if (xmesa->xm_draw_buffer->backpixmap != XIMAGE) { - xmesa->xm_draw_buffer->back_clear_func = clear_back_pixmap; - } - else if (sizeof(GLushort)!=2 || sizeof(GLuint)!=4) { - xmesa->xm_draw_buffer->back_clear_func = clear_nbit_ximage; - } - else switch (xmesa->xm_visual->BitsPerPixel) { - case 8: - if (xmesa->xm_visual->hpcr_clear_flag) { - xmesa->xm_draw_buffer->back_clear_func = clear_HPCR_ximage; - } - else { - xmesa->xm_draw_buffer->back_clear_func = clear_8bit_ximage; - } - break; - case 16: - xmesa->xm_draw_buffer->back_clear_func = clear_16bit_ximage; - break; - case 24: - xmesa->xm_draw_buffer->back_clear_func = clear_24bit_ximage; - break; - case 32: - xmesa->xm_draw_buffer->back_clear_func = clear_32bit_ximage; - break; - default: - xmesa->xm_draw_buffer->back_clear_func = clear_nbit_ximage; - break; - } - - xmesa_update_span_funcs(ctx); -} - - - -/* Setup pointers and other driver state that is constant for the life - * of a context. - */ -void xmesa_init_pointers( GLcontext *ctx ) -{ - TNLcontext *tnl; - struct swrast_device_driver *dd = _swrast_GetDeviceDriverReference( ctx ); - - ctx->Driver.GetString = get_string; - ctx->Driver.GetBufferSize = get_buffer_size; - ctx->Driver.Flush = flush; - ctx->Driver.Finish = finish; - - /* Software rasterizer pixel paths: - */ - ctx->Driver.Accum = _swrast_Accum; - ctx->Driver.Bitmap = _swrast_Bitmap; - ctx->Driver.Clear = clear_buffers; - ctx->Driver.ResizeBuffers = xmesa_resize_buffers; - ctx->Driver.CopyPixels = _swrast_CopyPixels; - ctx->Driver.DrawPixels = _swrast_DrawPixels; - ctx->Driver.ReadPixels = _swrast_ReadPixels; - ctx->Driver.DrawBuffer = _swrast_DrawBuffer; - - /* Software texture functions: - */ - ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; - ctx->Driver.TexImage1D = _mesa_store_teximage1d; - ctx->Driver.TexImage2D = _mesa_store_teximage2d; - ctx->Driver.TexImage3D = _mesa_store_teximage3d; - ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; - ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d; - ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; - ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; - - ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; - ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; - ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; - ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; - ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; - - ctx->Driver.CompressedTexImage1D = _mesa_store_compressed_teximage1d; - ctx->Driver.CompressedTexImage2D = _mesa_store_compressed_teximage2d; - ctx->Driver.CompressedTexImage3D = _mesa_store_compressed_teximage3d; - ctx->Driver.CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; - ctx->Driver.CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; - ctx->Driver.CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; - - /* Swrast hooks for imaging extensions: - */ - ctx->Driver.CopyColorTable = _swrast_CopyColorTable; - ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; - ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; - ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; - - - /* Statechange callbacks: - */ - ctx->Driver.ClearIndex = clear_index; - ctx->Driver.ClearColor = clear_color; - ctx->Driver.IndexMask = index_mask; - ctx->Driver.ColorMask = color_mask; - ctx->Driver.Enable = enable; - - - /* Initialize the TNL driver interface: - */ - tnl = TNL_CONTEXT(ctx); - tnl->Driver.RunPipeline = _tnl_run_pipeline; - - dd->SetBuffer = set_buffer; - - /* Install swsetup for tnl->Driver.Render.*: - */ - _swsetup_Wakeup(ctx); - - (void) DitherValues; /* silenced unused var warning */ -} - - - - - -#define XMESA_NEW_POINT (_NEW_POINT | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - -#define XMESA_NEW_LINE (_NEW_LINE | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - -#define XMESA_NEW_TRIANGLE (_NEW_POLYGON | \ - _NEW_TEXTURE | \ - _NEW_LIGHT | \ - _NEW_DEPTH | \ - _NEW_RENDERMODE | \ - _SWRAST_NEW_RASTERMASK) - - -/* Extend the software rasterizer with our line/point/triangle - * functions. - */ -void xmesa_register_swrast_functions( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT( ctx ); - - swrast->choose_point = xmesa_choose_point; - swrast->choose_line = xmesa_choose_line; - swrast->choose_triangle = xmesa_choose_triangle; - - swrast->invalidate_point |= XMESA_NEW_POINT; - swrast->invalidate_line |= XMESA_NEW_LINE; - swrast->invalidate_triangle |= XMESA_NEW_TRIANGLE; -} Index: xc/extras/Mesa/src/X/xm_line.c diff -u xc/extras/Mesa/src/X/xm_line.c:1.3 xc/extras/Mesa/src/X/xm_line.c:removed --- xc/extras/Mesa/src/X/xm_line.c:1.3 Sun Sep 28 15:17:06 2003 +++ xc/extras/Mesa/src/X/xm_line.c Wed Mar 16 21:00:47 2005 @@ -1,633 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file contains "accelerated" point, line, and triangle functions. - * It should be fairly easy to write new special-purpose point, line or - * triangle functions and hook them into this module. - */ - - -#include "glxheader.h" -#include "depth.h" -#include "macros.h" -#include "mmath.h" -#include "mtypes.h" -#include "xmesaP.h" - -/* Internal swrast includes: - */ -#include "swrast/s_depth.h" -#include "swrast/s_points.h" -#include "swrast/s_lines.h" -#include "swrast/s_context.h" - - -/**********************************************************************/ -/*** Point rendering ***/ -/**********************************************************************/ - - -/* - * Render an array of points into a pixmap, any pixel format. - */ -#if 000 -/* XXX don't use this, it doesn't dither correctly */ -static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - - if (xmesa->xm_visual->mesa_visual.RGBAflag) { - register int x, y; - const GLubyte *color = vert->color; - unsigned long pixel = xmesa_color_to_pixel( xmesa, - color[0], color[1], - color[2], color[3], - xmesa->pixelformat); - XMesaSetForeground( dpy, gc, pixel ); - x = (GLint) vert->win[0]; - y = FLIP( xmesa->xm_buffer, (GLint) vert->win[1] ); - XMesaDrawPoint( dpy, buffer, gc, x, y); - } - else { - /* Color index mode */ - register int x, y; - XMesaSetForeground( dpy, gc, vert->index ); - x = (GLint) vert->win[0]; - y = FLIP( xmesa->xm_buffer, (GLint) vert->win[1] ); - XMesaDrawPoint( dpy, buffer, gc, x, y); - } -} -#endif - - -/* Override the swrast point-selection function. Try to use one of - * our internal point functions, otherwise fall back to the standard - * swrast functions. - */ -void xmesa_choose_point( GLcontext *ctx ) -{ -#if 0 - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (ctx->RenderMode == GL_RENDER - && ctx->Point.Size == 1.0F && !ctx->Point.SmoothFlag - && swrast->_RasterMask == 0 - && !ctx->Texture._EnabledUnits - && xmesa->xm_buffer->buffer != XIMAGE) { - swrast->Point = draw_points_ANY_pixmap; - } - else { - _swrast_choose_point( ctx ); - } -#else - _swrast_choose_point( ctx ); -#endif -} - - - -/**********************************************************************/ -/*** Line rendering ***/ -/**********************************************************************/ - - -/* - * Draw a flat-shaded, PF_TRUECOLOR line into an XImage. - */ -static void flat_TRUECOLOR_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - XMesaImage *img = xmesa->xm_buffer->backimage; - unsigned long pixel; - PACK_TRUECOLOR( pixel, color[0], color[1], color[2] ); - -#define INTERP_XY 1 -#define CLIP_HACK 1 -#define PLOT(X,Y) XMesaPutPixel( img, X, FLIP(xmesa->xm_buffer, Y), pixel ); - -#include "swrast/s_linetemp.h" -} - - - -/* - * Draw a flat-shaded, PF_8A8B8G8R line into an XImage. - */ -static void flat_8A8B8G8R_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLuint pixel = PACK_8B8G8R( color[0], color[1], color[2] ); - -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = pixel; - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_8R8G8B line into an XImage. - */ -static void flat_8R8G8B_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLuint pixel = PACK_8R8G8B( color[0], color[1], color[2] ); - -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = pixel; - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_8R8G8B24 line into an XImage. - */ -static void flat_8R8G8B24_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) { \ - pixelPtr->r = color[RCOMP]; \ - pixelPtr->g = color[GCOMP]; \ - pixelPtr->b = color[BCOMP]; \ -} - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_5R6G5B line into an XImage. - */ -static void flat_5R6G5B_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLushort pixel = PACK_5R6G5B( color[0], color[1], color[2] ); - -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = pixel; - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_DITHER_5R6G5B line into an XImage. - */ -static void flat_DITHER_5R6G5B_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) PACK_TRUEDITHER( *pixelPtr, X, Y, color[0], color[1], color[2] ); - -#include "swrast/s_linetemp.h" -} - - - -/* - * Draw a flat-shaded, PF_DITHER 8-bit line into an XImage. - */ -static void flat_DITHER8_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLint r = color[0], g = color[1], b = color[2]; - DITHER_SETUP; - -#define INTERP_XY 1 -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = DITHER(X,Y,r,g,b); - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_LOOKUP 8-bit line into an XImage. - */ -static void flat_LOOKUP8_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLubyte pixel; - LOOKUP_SETUP; - pixel = (GLubyte) LOOKUP( color[0], color[1], color[2] ); - -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = pixel; - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, PF_HPCR line into an XImage. - */ -static void flat_HPCR_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLint r = color[0], g = color[1], b = color[2]; - -#define INTERP_XY 1 -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) *pixelPtr = (GLubyte) DITHER_HPCR(X,Y,r,g,b); - -#include "swrast/s_linetemp.h" -} - - - -/* - * Draw a flat-shaded, Z-less, PF_TRUECOLOR line into an XImage. - */ -static void flat_TRUECOLOR_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - XMesaImage *img = xmesa->xm_buffer->backimage; - unsigned long pixel; - PACK_TRUECOLOR( pixel, color[0], color[1], color[2] ); - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - XMesaPutPixel( img, X, FLIP(xmesa->xm_buffer, Y), pixel ); \ - } - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_8A8B8G8R line into an XImage. - */ -static void flat_8A8B8G8R_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLuint pixel = PACK_8B8G8R( color[0], color[1], color[2] ); - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = pixel; \ - } - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_8R8G8B line into an XImage. - */ -static void flat_8R8G8B_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLuint pixel = PACK_8R8G8B( color[0], color[1], color[2] ); - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = pixel; \ - } - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_8R8G8B24 line into an XImage. - */ -static void flat_8R8G8B24_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - pixelPtr->r = color[RCOMP]; \ - pixelPtr->g = color[GCOMP]; \ - pixelPtr->b = color[BCOMP]; \ - } - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_5R6G5B line into an XImage. - */ -static void flat_5R6G5B_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLushort pixel = PACK_5R6G5B( color[0], color[1], color[2] ); - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = pixel; \ - } -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_DITHER_5R6G5B line into an XImage. - */ -static void flat_DITHER_5R6G5B_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - PACK_TRUEDITHER(*pixelPtr, X, Y, color[0], color[1], color[2]); \ - } -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_DITHER 8-bit line into an XImage. - */ -static void flat_DITHER8_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLint r = color[0], g = color[1], b = color[2]; - DITHER_SETUP; - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = (GLubyte) DITHER( X, Y, r, g, b); \ - } -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_LOOKUP 8-bit line into an XImage. - */ -static void flat_LOOKUP8_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLubyte pixel; - LOOKUP_SETUP; - pixel = (GLubyte) LOOKUP( color[0], color[1], color[2] ); - -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = pixel; \ - } - -#include "swrast/s_linetemp.h" -} - - -/* - * Draw a flat-shaded, Z-less, PF_HPCR line into an XImage. - */ -static void flat_HPCR_z_line( GLcontext *ctx, - const SWvertex *vert0, const SWvertex *vert1 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = vert1->color; - GLint r = color[0], g = color[1], b = color[2]; - -#define INTERP_XY 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define CLIP_HACK 1 -#define PLOT(X,Y) \ - if (Z < *zPtr) { \ - *zPtr = Z; \ - *pixelPtr = (GLubyte) DITHER_HPCR( X, Y, r, g, b); \ - } - -#include "swrast/s_linetemp.h" -} - - -static swrast_line_func get_line_func( GLcontext *ctx ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - SWcontext *swrast = SWRAST_CONTEXT(ctx); - int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); - - (void) DitherValues; /* silence unused var warning */ - (void) kernel1; /* silence unused var warning */ - - if (ctx->RenderMode != GL_RENDER) return (swrast_line_func) NULL; - if (ctx->Line.SmoothFlag) return (swrast_line_func) NULL; - if (ctx->Texture._EnabledUnits) return (swrast_line_func) NULL; - if (ctx->Light.ShadeModel != GL_FLAT) return (swrast_line_func) NULL; - if (ctx->Line.StippleFlag) return (swrast_line_func) NULL; - if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_line_func) NULL; - - if (xmesa->xm_buffer->buffer==XIMAGE - && swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS - && ctx->Line.Width==1.0F) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - return flat_TRUECOLOR_z_line; - case PF_8A8B8G8R: - return flat_8A8B8G8R_z_line; - case PF_8R8G8B: - return flat_8R8G8B_z_line; - case PF_8R8G8B24: - return flat_8R8G8B24_z_line; - case PF_5R6G5B: - return flat_5R6G5B_z_line; - case PF_DITHER_5R6G5B: - return flat_DITHER_5R6G5B_z_line; - case PF_DITHER: - return (depth==8) ? flat_DITHER8_z_line : (swrast_line_func) NULL; - case PF_LOOKUP: - return (depth==8) ? flat_LOOKUP8_z_line : (swrast_line_func) NULL; - case PF_HPCR: - return flat_HPCR_z_line; - default: - return (swrast_line_func)NULL; - } - } - if (xmesa->xm_buffer->buffer==XIMAGE - && swrast->_RasterMask==0 - && ctx->Line.Width==1.0F) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - return flat_TRUECOLOR_line; - case PF_8A8B8G8R: - return flat_8A8B8G8R_line; - case PF_8R8G8B: - return flat_8R8G8B_line; - case PF_8R8G8B24: - return flat_8R8G8B24_line; - case PF_5R6G5B: - return flat_5R6G5B_line; - case PF_DITHER_5R6G5B: - return flat_DITHER_5R6G5B_line; - case PF_DITHER: - return (depth==8) ? flat_DITHER8_line : (swrast_line_func) NULL; - case PF_LOOKUP: - return (depth==8) ? flat_LOOKUP8_line : (swrast_line_func) NULL; - case PF_HPCR: - return flat_HPCR_line; - default: - return (swrast_line_func)NULL; - } - } - - return (swrast_line_func) NULL; -} - -/* Override for the swrast line-selection function. Try to use one - * of our internal line functions, otherwise fall back to the - * standard swrast functions. - */ -void xmesa_choose_line( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (!(swrast->Line = get_line_func( ctx ))) - _swrast_choose_line( ctx ); -} Index: xc/extras/Mesa/src/X/xm_span.c diff -u xc/extras/Mesa/src/X/xm_span.c:1.7 xc/extras/Mesa/src/X/xm_span.c:removed --- xc/extras/Mesa/src/X/xm_span.c:1.7 Wed Oct 22 11:44:42 2003 +++ xc/extras/Mesa/src/X/xm_span.c Wed Mar 16 21:00:47 2005 @@ -1,4484 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 5.0.2 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "glxheader.h" -#include "colormac.h" -#include "context.h" -#include "depth.h" -#include "drawpix.h" -#include "extensions.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" -#include "state.h" -#include "xmesaP.h" - -#include "swrast/swrast.h" - - -/* - * The following functions are used to trap XGetImage() calls which - * generate BadMatch errors if the drawable isn't mapped. - */ - -#ifndef XFree86Server -static int caught_xgetimage_error = 0; -static int (*old_xerror_handler)( XMesaDisplay *dpy, XErrorEvent *ev ); -static unsigned long xgetimage_serial; - -/* - * This is the error handler which will be called if XGetImage fails. - */ -static int xgetimage_error_handler( XMesaDisplay *dpy, XErrorEvent *ev ) -{ - if (ev->serial==xgetimage_serial && ev->error_code==BadMatch) { - /* caught the expected error */ - caught_xgetimage_error = 0; - } - else { - /* call the original X error handler, if any. otherwise ignore */ - if (old_xerror_handler) { - (*old_xerror_handler)( dpy, ev ); - } - } - return 0; -} - - -/* - * Call this right before XGetImage to setup error trap. - */ -static void catch_xgetimage_errors( XMesaDisplay *dpy ) -{ - xgetimage_serial = NextRequest( dpy ); - old_xerror_handler = XSetErrorHandler( xgetimage_error_handler ); - caught_xgetimage_error = 0; -} - - -/* - * Call this right after XGetImage to check if an error occured. - */ -static int check_xgetimage_errors( void ) -{ - /* restore old handler */ - (void) XSetErrorHandler( old_xerror_handler ); - /* return 0=no error, 1=error caught */ - return caught_xgetimage_error; -} -#endif - - -/* - * Read a pixel from an X drawable. - */ -static unsigned long read_pixel( XMesaDisplay *dpy, - XMesaDrawable d, int x, int y ) -{ - unsigned long p; -#ifndef XFree86Server - XMesaImage *pixel = NULL; - int error; - - catch_xgetimage_errors( dpy ); - pixel = XGetImage( dpy, d, x, y, 1, 1, AllPlanes, ZPixmap ); - error = check_xgetimage_errors(); - if (pixel && !error) { - p = XMesaGetPixel( pixel, 0, 0 ); - } - else { - p = 0; - } - if (pixel) { - XMesaDestroyImage( pixel ); - } -#else - (*dpy->GetImage)(d, x, y, 1, 1, ZPixmap, ~0L, (pointer)&p); -#endif - return p; -} - - - -/* - * The Mesa library needs to be able to draw pixels in a number of ways: - * 1. RGB vs Color Index - * 2. as horizontal spans (polygons, images) vs random locations (points, - * lines) - * 3. different color per-pixel or same color for all pixels - * - * Furthermore, the X driver needs to support rendering to 3 possible - * "buffers", usually one, but sometimes two at a time: - * 1. The front buffer as an X window - * 2. The back buffer as a Pixmap - * 3. The back buffer as an XImage - * - * Finally, if the back buffer is an XImage, we can avoid using XPutPixel and - * optimize common cases such as 24-bit and 8-bit modes. - * - * By multiplication, there's at least 48 possible combinations of the above. - * - * Below are implementations of the most commonly used combinations. They are - * accessed through function pointers which get initialized here and are used - * directly from the Mesa library. The 8 function pointers directly correspond - * to the first 3 cases listed above. - * - * - * The function naming convention is: - * - * write_[span|pixels]_[mono]_[format]_[pixmap|ximage] - * - * New functions optimized for specific cases can be added without too much - * trouble. An example might be the 24-bit TrueColor mode 8A8R8G8B which is - * found on IBM RS/6000 X servers. - */ - - - - -/**********************************************************************/ -/*** Write COLOR SPAN functions ***/ -/**********************************************************************/ - - -#define RGBA_SPAN_ARGS const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - CONST GLubyte rgba[][4], const GLubyte mask[] - -#define RGB_SPAN_ARGS const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, \ - CONST GLubyte rgb[][3], const GLubyte mask[] - - -/* NOTE: if mask==NULL, draw all pixels */ - - -/* - * Write a span of PF_TRUECOLOR pixels to a pixmap. - */ -static void write_span_TRUECOLOR_pixmap( RGBA_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - - (void)DitherValues; /* Muffle compiler */ - - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - register GLuint i; - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - register GLuint pixel; - static const GLuint shift[4] = {0, 8, 16, 24}; - register GLuint i = 0; - int w = n; - while (w > 3) { - pixel = rgba[i][BCOMP] /* << shift[0]*/; - pixel |= rgba[i][GCOMP] << shift[1]; - pixel |= rgba[i++][RCOMP] << shift[2]; - pixel |= rgba[i][BCOMP] << shift[3]; - *ptr4++ = pixel; - - pixel = rgba[i][GCOMP] /* << shift[0]*/; - pixel |= rgba[i++][RCOMP] << shift[1]; - pixel |= rgba[i][BCOMP] << shift[2]; - pixel |= rgba[i][GCOMP] << shift[3]; - *ptr4++ = pixel; - - pixel = rgba[i++][RCOMP]/* << shift[0]*/; - pixel |= rgba[i][BCOMP] << shift[1]; - pixel |= rgba[i][GCOMP] << shift[2]; - pixel |= rgba[i++][RCOMP] << shift[3]; - *ptr4++ = pixel; - - w -= 4; - } - switch (w) { - case 3: - pixel = 0; - pixel |= rgba[i][BCOMP] /*<< shift[0]*/; - pixel |= rgba[i][GCOMP] << shift[1]; - pixel |= rgba[i++][RCOMP] << shift[2]; - pixel |= rgba[i][BCOMP] << shift[3]; - *ptr4++ = pixel; - pixel = 0; - pixel |= rgba[i][GCOMP] /*<< shift[0]*/; - pixel |= rgba[i++][RCOMP] << shift[1]; - pixel |= rgba[i][BCOMP] << shift[2]; - pixel |= rgba[i][GCOMP] << shift[3]; - *ptr4++ = pixel; - pixel = 0xffffff00 & *ptr4; - pixel |= rgba[i][RCOMP] /*<< shift[0]*/; - *ptr4 = pixel; - break; - case 2: - pixel = 0; - pixel |= rgba[i][BCOMP] /*<< shift[0]*/; - pixel |= rgba[i][GCOMP] << shift[1]; - pixel |= rgba[i++][RCOMP] << shift[2]; - pixel |= rgba[i][BCOMP] << shift[3]; - *ptr4++ = pixel; - pixel = 0xffff0000 & *ptr4; - pixel |= rgba[i][GCOMP] /*<< shift[0]*/; - pixel |= rgba[i][RCOMP] << shift[1]; - *ptr4 = pixel; - break; - case 1: - pixel = 0xff000000 & *ptr4; - pixel |= rgba[i][BCOMP] /*<< shift[0]*/; - pixel |= rgba[i][GCOMP] << shift[1]; - pixel |= rgba[i][RCOMP] << shift[2]; - *ptr4 = pixel; - break; - case 0: - break; - } - XMesaPutImage( dpy, buffer, gc, rowimg, 0, 0, x, y, n, 1 ); - } -} - - -/* - * Write a span of PF_8R8G8B pixels to a pixmap (no alpha). - */ -static void write_span_rgb_8R8G8B_pixmap( RGB_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - register GLuint i; - for (i=0;ixm_buffer->rowimage; - register GLuint *ptr4 = (GLuint *) rowimg->data; - register GLuint pixel; - static const GLuint shift[4] = {0, 8, 16, 24}; - unsigned w = n; - register GLuint i = 0; - while (w > 3) { - pixel = 0; - pixel |= rgb[i][BCOMP]/* << shift[0]*/; - pixel |= rgb[i][GCOMP] << shift[1]; - pixel |= rgb[i++][RCOMP] << shift[2]; - pixel |= rgb[i][BCOMP] <DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLushort *ptr2 = (GLushort *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLushort *ptr2 = (GLushort *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLushort *ptr2 = (GLushort *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLushort *ptr2 = (GLushort *) rowimg->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - XDITHER_SETUP(y); - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - XDITHER_SETUP(y); - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLubyte *ptr = (GLubyte *) xmesa->xm_buffer->rowimage->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - register GLubyte *ptr = (GLubyte *) xmesa->xm_buffer->rowimage->data; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - LOOKUP_SETUP; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - LOOKUP_SETUP; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;ixm_buffer->rowimage; - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = (GLubyte *) PIXELADDR3( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;i 3) { - pixel = rgba[i][BCOMP]; - pixel |= rgba[i][GCOMP] << 8; - pixel |= rgba[i++][RCOMP] << 16; - pixel |= rgba[i][BCOMP] << 24; - *ptr4++ = pixel; - pixel = rgba[i][GCOMP]; - pixel |= rgba[i++][RCOMP] << 8; - pixel |= rgba[i][BCOMP] << 16; - pixel |= rgba[i][GCOMP] << 24; - *ptr4++ = pixel; - pixel = rgba[i++][RCOMP]; - pixel |= rgba[i][BCOMP] << 8; - pixel |= rgba[i][GCOMP] << 16; - pixel |= rgba[i++][RCOMP] << 24; - *ptr4++ = pixel; - w -= 4; - } - switch (w) { - case 0: - break; - case 1: - pixel = *ptr4 & 0xff000000; - pixel |= rgba[i][BCOMP]; - pixel |= rgba[i][GCOMP] << 8; - pixel |= rgba[i][RCOMP] << 16; - *ptr4 = pixel; - break; - case 2: - pixel = rgba[i][BCOMP]; - pixel |= rgba[i][GCOMP] << 8; - pixel |= rgba[i++][RCOMP] << 16; - pixel |= rgba[i][BCOMP] << 24; - *ptr4++ = pixel; - pixel = *ptr4 & 0xffff0000; - pixel |= rgba[i][GCOMP]; - pixel |= rgba[i][RCOMP] << 8; - *ptr4 = pixel; - break; - case 3: - pixel = rgba[i][BCOMP]; - pixel |= rgba[i][GCOMP] << 8; - pixel |= rgba[i++][RCOMP] << 16; - pixel |= rgba[i][BCOMP] << 24; - *ptr4++ = pixel; - pixel = rgba[i][GCOMP]; - pixel |= rgba[i++][RCOMP] << 8; - pixel |= rgba[i][BCOMP] << 16; - pixel |= rgba[i][GCOMP] << 24; - *ptr4++ = pixel; - pixel = *ptr4 & 0xffffff00; - pixel |= rgba[i][RCOMP]; - *ptr4 = pixel; - break; - } - } -} - - -/* - * Write a span of PF_8R8G8B-format pixels to an ximage (no alpha). - */ -static void write_span_rgb_8R8G8B_ximage( RGB_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = (GLubyte *) PIXELADDR3( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y ); - const GLint y2 = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - int yy = FLIP(xmesa->xm_buffer, y); - XDITHER_SETUP(yy); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - int yy = FLIP(xmesa->xm_buffer, y); - XDITHER_SETUP(yy); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - XDITHER_SETUP(y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - XDITHER_SETUP(y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - LOOKUP_SETUP; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - LOOKUP_SETUP; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - LOOKUP_SETUP; - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - LOOKUP_SETUP; - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y ); - if (mask) { - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_TRUEDITHER pixels to a pixmap. - */ -static void write_pixels_TRUEDITHER_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_8A8B8G8R pixels to a pixmap. - */ -static void write_pixels_8A8B8G8R_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_8R8G8B pixels to a pixmap. - */ -static void write_pixels_8R8G8B_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_8R8G8B24 pixels to a pixmap. - */ -static void write_pixels_8R8G8B24_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_5R6G5B pixels to a pixmap. - */ -static void write_pixels_5R6G5B_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_DITHER_5R6G5B pixels to a pixmap. - */ -static void write_pixels_DITHER_5R6G5B_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_DITHER pixels to a pixmap. - */ -static void write_pixels_DITHER_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - DITHER_SETUP; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_1BIT pixels to a pixmap. - */ -static void write_pixels_1BIT_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - SETUP_1BIT; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_HPCR pixels to a pixmap. - */ -static void write_pixels_HPCR_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_LOOKUP pixels to a pixmap. - */ -static void write_pixels_LOOKUP_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - LOOKUP_SETUP; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_GRAYSCALE pixels to a pixmap. - */ -static void write_pixels_GRAYSCALE_pixmap( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_TRUECOLOR pixels to an ximage. - */ -static void write_pixels_TRUECOLOR_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - for (i=0;ixm_buffer, y[i]), p ); - } - } -} - - -/* - * Write an array of PF_TRUEDITHER pixels to an XImage. - */ -static void write_pixels_TRUEDITHER_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - for (i=0;ixm_buffer, y[i]), p ); - } - } -} - - -/* - * Write an array of PF_8A8B8G8R pixels to an ximage. - */ -static void write_pixels_8A8B8G8R_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = PACK_8A8B8G8R( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP], rgba[i][ACOMP] ); - } - } -} - - -/* - * Write an array of PF_8R8G8B pixels to an ximage. - */ -static void write_pixels_8R8G8B_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = PACK_8R8G8B( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_8R8G8B24 pixels to an ximage. - */ -static void write_pixels_8R8G8B24_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - ptr->r = rgba[i][RCOMP]; - ptr->g = rgba[i][GCOMP]; - ptr->b = rgba[i][BCOMP]; - } - } -} - - -/* - * Write an array of PF_5R6G5B pixels to an ximage. - */ -static void write_pixels_5R6G5B_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = PACK_5R6G5B( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_DITHER_5R6G5B pixels to an ximage. - */ -static void write_pixels_DITHER_5R6G5B_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - PACK_TRUEDITHER( *ptr, x[i], y[i], rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_DITHER pixels to an XImage. - */ -static void write_pixels_DITHER_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - DITHER_SETUP; - for (i=0;ixm_buffer, y[i]), - DITHER( x[i], y[i], rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ) ); - } - } -} - - -/* - * Write an array of 8-bit PF_DITHER pixels to an XImage. - */ -static void write_pixels_DITHER8_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - DITHER_SETUP; - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = (GLubyte) DITHER( x[i], y[i], rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_1BIT pixels to an XImage. - */ -static void write_pixels_1BIT_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - SETUP_1BIT; - for (i=0;ixm_buffer, y[i]), - DITHER_1BIT( x[i], y[i], rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] )); - } - } -} - - -/* - * Write an array of PF_HPCR pixels to an XImage. - */ -static void write_pixels_HPCR_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = (GLubyte) DITHER_HPCR( x[i], y[i], rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_LOOKUP pixels to an XImage. - */ -static void write_pixels_LOOKUP_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - LOOKUP_SETUP; - for (i=0;ixm_buffer, y[i]), LOOKUP(rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]) ); - } - } -} - - -/* - * Write an array of 8-bit PF_LOOKUP pixels to an XImage. - */ -static void write_pixels_LOOKUP8_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - LOOKUP_SETUP; - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = (GLubyte) LOOKUP( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - -/* - * Write an array of PF_GRAYSCALE pixels to an XImage. - */ -static void write_pixels_GRAYSCALE_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - for (i=0;ixm_buffer, y[i]), - GRAY_RGB( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ) ); - } - } -} - - -/* - * Write an array of 8-bit PF_GRAYSCALE pixels to an XImage. - */ -static void write_pixels_GRAYSCALE8_ximage( RGBA_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = (GLubyte) GRAY_RGB( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] ); - } - } -} - - - - -/**********************************************************************/ -/*** Write MONO COLOR SPAN functions ***/ -/**********************************************************************/ - -#define MONO_SPAN_ARGS const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, const GLchan color[4], \ - const GLubyte mask[] - - -/* - * Write a span of identical pixels to a pixmap. - */ -static void write_span_mono_pixmap( MONO_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP], - color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat); - register GLuint i; - XMesaSetForeground( xmesa->display, gc, pixel ); - y = FLIP(xmesa->xm_buffer, y); - - /* New code contributed by Jeff Epler and cleaned up by Keith - * Whitwell. - */ - for (i = 0; i < n; ) { - GLuint start = i; - - /* Identify and emit contiguous rendered pixels - */ - while (i < n && mask[i]) - i++; - - if (start < i) - XMesaFillRectangle( dpy, buffer, gc, - (int)(x+start), (int) y, - (int)(i-start), 1); - - /* Eat up non-rendered pixels - */ - while (i < n && !mask[i]) - i++; - } -} - - - -static void write_span_mono_index_pixmap( const GLcontext *ctx, GLuint n, - GLint x, GLint y, GLuint colorIndex, - const GLubyte mask[] ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - XMesaSetForeground( xmesa->display, gc, colorIndex ); - y = FLIP(xmesa->xm_buffer, y); - - for (i = 0 ; i < n ;) { - GLuint start = i; - - /* Identify and emit contiguous rendered pixels - */ - while (i < n && mask[i]) - i++; - - if (start < i) - XMesaFillRectangle( dpy, buffer, gc, - (int)(x+start), (int) y, - (int)(i-start), 1); - - /* Eat up non-rendered pixels - */ - while (i < n && !mask[i]) - i++; - } -} - - - -/* - * Write a span of PF_TRUEDITHER pixels to a pixmap. - */ -static void write_span_mono_TRUEDITHER_pixmap( MONO_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - int yy = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - int yy = FLIP(xmesa->xm_buffer, y); - XDITHER_SETUP(yy); - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP], - color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat); - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - GLuint i; - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - GLuint i, *ptr; - const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP], - color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat); - ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - for (i=0;iDriverCtx; - const GLuint pixel = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]); - GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y ); - GLuint i; - for (i=0;iDriverCtx; - const GLubyte r = color[RCOMP]; - const GLubyte g = color[GCOMP]; - const GLubyte b = color[BCOMP]; - GLuint i; - bgr_t *ptr = PIXELADDR3( xmesa->xm_buffer, x, y ); - for (i=0;iDriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - XMesaImage *img = xmesa->xm_buffer->backimage; - int yy = FLIP(xmesa->xm_buffer, y); - register GLuint i; - XDITHER_SETUP(yy); - for (i=0;iDriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y); - register GLuint i; - XDITHER_SETUP(y); - for (i=0;iDriverCtx; - register GLuint i; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y); - GLubyte pixel; - LOOKUP_SETUP; - pixel = LOOKUP(color[RCOMP], color[GCOMP], color[BCOMP]); - for (i=0;iDriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - SETUP_1BIT; - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y); - register GLuint i; - for (i=0;iDriverCtx; - const GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]); - GLubyte *ptr = (GLubyte *) PIXELADDR1( xmesa->xm_buffer,x,y); - GLuint i; - for (i=0;iDriverCtx; - register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y ); - const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - GLuint i; - y = FLIP(xmesa->xm_buffer, y); - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP], - color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat); - XMesaSetForeground( xmesa->display, gc, pixel ); - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -static void write_pixels_mono_index_pixmap(const GLcontext *ctx, - GLuint n, - const GLint x[], const GLint y[], - GLuint colorIndex, - const GLubyte mask[] ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - XMesaSetForeground( xmesa->display, gc, colorIndex ); - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_TRUEDITHER pixels to a pixmap. - */ -static void write_pixels_mono_TRUEDITHER_pixmap( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_DITHER pixels to a pixmap. - */ -static void write_pixels_mono_DITHER_pixmap( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - DITHER_SETUP; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of PF_1BIT pixels to a pixmap. - */ -static void write_pixels_mono_1BIT_pixmap( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - SETUP_1BIT; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of identical pixels to an XImage. - */ -static void write_pixels_mono_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP], - color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat); - for (i=0;ixm_buffer, y[i]), pixel ); - } - } -} - - -static void write_pixels_mono_index_ximage( const GLcontext *ctx, GLuint n, - const GLint x[], const GLint y[], - GLuint colorIndex, - const GLubyte mask[] ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - for (i=0;ixm_buffer, y[i]), colorIndex ); - } - } -} - - -/* - * Write an array of identical TRUEDITHER pixels to an XImage. - */ -static void write_pixels_mono_TRUEDITHER_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - for (i=0;ixm_buffer, y[i]), r, g, b); - XMesaPutPixel( img, x[i], FLIP(xmesa->xm_buffer, y[i]), p ); - } - } -} - - - -/* - * Write an array of identical 8A8B8G8R pixels to an XImage - */ -static void write_pixels_mono_8A8B8G8R_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLuint p = PACK_8A8B8G8R(color[RCOMP], color[GCOMP], - color[BCOMP], color[ACOMP]); - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = p; - } - } -} - - -/* - * Write an array of identical 8R8G8B pixels to an XImage. - */ -static void write_pixels_mono_8R8G8B_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - const GLuint p = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]); - for (i=0;ixm_buffer, x[i], y[i] ); - *ptr = p; - } - } -} - - -/* - * Write an array of identical 8R8G8B pixels to an XImage. - */ -static void write_pixels_mono_8R8G8B24_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - ptr->r = r; - ptr->g = g; - ptr->b = b; - } - } -} - - -/* - * Write an array of identical PF_DITHER pixels to an XImage. - */ -static void write_pixels_mono_DITHER_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - DITHER_SETUP; - for (i=0;ixm_buffer, y[i]), DITHER( x[i], y[i], r, g, b ) ); - } - } -} - - -/* - * Write an array of identical 8-bit PF_DITHER pixels to an XImage. - */ -static void write_pixels_mono_DITHER8_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - DITHER_SETUP; - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = (GLubyte) DITHER( x[i], y[i], r, g, b ); - } - } -} - - -/* - * Write an array of identical 8-bit PF_LOOKUP pixels to an XImage. - */ -static void write_pixels_mono_LOOKUP8_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - GLubyte pixel; - LOOKUP_SETUP; - pixel = LOOKUP(color[RCOMP], color[GCOMP], color[BCOMP]); - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = pixel; - } - } -} - - - -/* - * Write an array of identical PF_1BIT pixels to an XImage. - */ -static void write_pixels_mono_1BIT_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - SETUP_1BIT; - for (i=0;ixm_buffer, y[i]), - DITHER_1BIT( x[i], y[i], r, g, b )); - } - } -} - - -/* - * Write an array of identical PF_HPCR pixels to an XImage. - */ -static void write_pixels_mono_HPCR_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = DITHER_HPCR( x[i], y[i], r, g, b ); - } - } -} - - -/* - * Write an array of identical 8-bit PF_GRAYSCALE pixels to an XImage. - */ -static void write_pixels_mono_GRAYSCALE8_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - register GLuint i; - register GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]); - for (i=0;ixm_buffer,x[i],y[i]); - *ptr = p; - } - } -} - - -/* - * Write an array of identical PF_DITHER_5R6G5B pixels to an XImage. - */ -static void write_pixels_mono_DITHER_5R6G5B_ximage( MONO_PIXEL_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP]; - register GLuint i; - for (i=0;ixm_buffer, x[i], y[i] ); - PACK_TRUEDITHER(*ptr, x[i], y[i], r, g, b); - } - } -} - - - -/**********************************************************************/ -/*** Write INDEX SPAN functions ***/ -/**********************************************************************/ - -#define INDEX_SPAN_ARGS const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, const GLuint index[], \ - const GLubyte mask[] - -#define INDEX8_SPAN_ARGS const GLcontext *ctx, \ - GLuint n, GLint x, GLint y, const GLubyte index[], \ - const GLubyte mask[] - - -/* - * Write a span of CI pixels to a Pixmap. - */ -static void write_span_index_pixmap( INDEX_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - y = FLIP(xmesa->xm_buffer, y); - if (mask) { - for (i=0;iDriverCtx; - if (mask) { - GLuint i; - for (i=0;ixm_buffer->backimage, x+i, y, index[i]); - } - } - } - else { - GLuint i; - for (i=0;ixm_buffer->backimage, x+i, y, index[i]); - } - } -} - -/* - * Write a span of 8-bit CI pixels to an 8-bit XImage. - */ -static void write_span_index8_ximage8( INDEX8_SPAN_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - GLubyte *dst = PIXELADDR1( xmesa->xm_buffer,x,y); - if (mask) { - GLuint i; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - XMesaDrawable buffer = xmesa->xm_buffer->buffer; - XMesaGC gc = xmesa->xm_buffer->gc; - register GLuint i; - for (i=0;ixm_buffer, y[i]) ); - } - } -} - - -/* - * Write an array of CI pixels to an XImage. - */ -static void write_pixels_index_ximage( INDEX_PIXELS_ARGS ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; - register GLuint i; - for (i=0;ixm_buffer, y[i]), (unsigned long) index[i] ); - } - } -} - - - - -/**********************************************************************/ -/***** Pixel reading *****/ -/**********************************************************************/ - - - -/* - * Read a horizontal span of color-index pixels. - */ -static void read_index_span( const GLcontext *ctx, - GLuint n, GLint x, GLint y, GLuint index[] ) -{ - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaBuffer source = xmesa->xm_buffer; - GLuint i; - - y = FLIP(source, y); - - if (source->buffer) { -#ifndef XFree86Server - XMesaImage *span = NULL; - int error; - catch_xgetimage_errors( xmesa->display ); - span = XGetImage( xmesa->display, source->buffer, - x, y, n, 1, AllPlanes, ZPixmap ); - error = check_xgetimage_errors(); - if (span && !error) { - for (i=0;idisplay->GetImage)(source->buffer, - x, y, n, 1, ZPixmap, - ~0L, (pointer)index); -#endif - } - else if (source->backimage) { - XMesaImage *img = source->backimage; - for (i=0;iDriverCtx; - XMesaBuffer source = xmesa->xm_buffer; - - if (source->buffer) { - /* Read from Pixmap or Window */ - XMesaImage *span = NULL; - int error; -#ifdef XFree86Server - span = XMesaCreateImage(xmesa->xm_visual->BitsPerPixel, n, 1, NULL); - span->data = (char *)MALLOC(span->height * span->bytes_per_line); - error = (!span->data); - (*xmesa->display->GetImage)(source->buffer, - x, FLIP(source, y), n, 1, ZPixmap, - ~0L, (pointer)span->data); -#else - catch_xgetimage_errors( xmesa->display ); - span = XGetImage( xmesa->display, source->buffer, - x, FLIP(source, y), n, 1, AllPlanes, ZPixmap ); - error = check_xgetimage_errors(); -#endif - if (span && !error) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - case PF_TRUEDITHER: - { - const GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - const GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - const GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - unsigned long rMask = GET_REDMASK(xmesa->xm_visual); - unsigned long gMask = GET_GREENMASK(xmesa->xm_visual); - unsigned long bMask = GET_BLUEMASK(xmesa->xm_visual); - GLint rShift = xmesa->xm_visual->rshift; - GLint gShift = xmesa->xm_visual->gshift; - GLint bShift = xmesa->xm_visual->bshift; - GLuint i; - for (i=0;i> rShift]; - rgba[i][GCOMP] = pixelToG[(p & gMask) >> gShift]; - rgba[i][BCOMP] = pixelToB[(p & bMask) >> bShift]; - rgba[i][ACOMP] = 255; - } - } - break; - case PF_5R6G5B: - case PF_DITHER_5R6G5B: - { - const GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - const GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - const GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - GLuint i; - for (i=0;i> 8) & 0xf8); - rgba[i][GCOMP] = ((p >> 3) & 0xfc); - rgba[i][BCOMP] = ((p << 3) & 0xff); - */ - rgba[i][RCOMP] = pixelToR[p >> 11]; - rgba[i][GCOMP] = pixelToG[(p >> 5) & 0x3f]; - rgba[i][BCOMP] = pixelToB[p & 0x1f]; - rgba[i][ACOMP] = 255; - } - } - break; - case PF_8A8B8G8R: - { - const GLuint *ptr4 = (GLuint *) span->data; - GLuint i; - for (i=0;i> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ((p4 >> 16) & 0xff); - rgba[i][ACOMP] = (GLubyte) ((p4 >> 24) & 0xff); - } - } - break; - case PF_8R8G8B: - { - const GLuint *ptr4 = (GLuint *) span->data; - GLuint i; - for (i=0;i> 16) & 0xff); - rgba[i][GCOMP] = (GLubyte) ((p4 >> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ( p4 & 0xff); - rgba[i][ACOMP] = 255; - } - } - break; - case PF_8R8G8B24: - { - const bgr_t *ptr3 = (bgr_t *) span->data; - GLuint i; - for (i=0;idata; - GLuint i; - for (i=0;ipixel_to_r; - GLubyte *gTable = source->pixel_to_g; - GLubyte *bTable = source->pixel_to_b; - if (GET_VISUAL_DEPTH(xmesa->xm_visual)==8) { - const GLubyte *ptr1 = (GLubyte *) span->data; - GLuint i; - for (i=0;ixm_visual->bitFlip; - GLuint i; - for (i=0;ibackimage) { - /* Read from XImage back buffer */ - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - case PF_TRUEDITHER: - { - const GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - const GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - const GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - unsigned long rMask = GET_REDMASK(xmesa->xm_visual); - unsigned long gMask = GET_GREENMASK(xmesa->xm_visual); - unsigned long bMask = GET_BLUEMASK(xmesa->xm_visual); - GLint rShift = xmesa->xm_visual->rshift; - GLint gShift = xmesa->xm_visual->gshift; - GLint bShift = xmesa->xm_visual->bshift; - XMesaImage *img = source->backimage; - GLuint i; - y = FLIP(source, y); - for (i=0;i> rShift]; - rgba[i][GCOMP] = pixelToG[(p & gMask) >> gShift]; - rgba[i][BCOMP] = pixelToB[(p & bMask) >> bShift]; - rgba[i][ACOMP] = 255; - } - } - break; - case PF_5R6G5B: - case PF_DITHER_5R6G5B: - { - const GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - const GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - const GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - const GLushort *ptr2 = PIXELADDR2( source, x, y ); - GLuint i; -#if defined(__i386__) /* word stores don't have to be on 4-byte boundaries */ - const GLuint *ptr4 = (const GLuint *) ptr2; - GLuint extraPixel = (n & 1); - n -= extraPixel; - for (i = 0; i < n; i += 2) { - const GLuint p = *ptr4++; - const GLuint p0 = p & 0xffff; - const GLuint p1 = p >> 16; - /* fast, but not quite accurate - rgba[i][RCOMP] = ((p >> 8) & 0xf8); - rgba[i][GCOMP] = ((p >> 3) & 0xfc); - rgba[i][BCOMP] = ((p << 3) & 0xff); - */ - rgba[i][RCOMP] = pixelToR[p0 >> 11]; - rgba[i][GCOMP] = pixelToG[(p0 >> 5) & 0x3f]; - rgba[i][BCOMP] = pixelToB[p0 & 0x1f]; - rgba[i][ACOMP] = 255; - rgba[i+1][RCOMP] = pixelToR[p1 >> 11]; - rgba[i+1][GCOMP] = pixelToG[(p1 >> 5) & 0x3f]; - rgba[i+1][BCOMP] = pixelToB[p1 & 0x1f]; - rgba[i+1][ACOMP] = 255; - } - if (extraPixel) { - GLushort p = ptr2[n]; - rgba[n][RCOMP] = pixelToR[p >> 11]; - rgba[n][GCOMP] = pixelToG[(p >> 5) & 0x3f]; - rgba[n][BCOMP] = pixelToB[p & 0x1f]; - rgba[n][ACOMP] = 255; - } -#else - for (i = 0; i < n; i++) { - const GLushort p = ptr2[i]; - rgba[i][RCOMP] = pixelToR[p >> 11]; - rgba[i][GCOMP] = pixelToG[(p >> 5) & 0x3f]; - rgba[i][BCOMP] = pixelToB[p & 0x1f]; - rgba[i][ACOMP] = 255; - } -#endif - } - break; - case PF_8A8B8G8R: - { - const GLuint *ptr4 = PIXELADDR4( source, x, y ); - GLuint i; - for (i=0;i> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ((p4 >> 16) & 0xff); - rgba[i][ACOMP] = (GLint) ((p4 >> 24) & 0xff); - } - } - break; - case PF_8R8G8B: - { - const GLuint *ptr4 = PIXELADDR4( source, x, y ); - GLuint i; - for (i=0;i> 16) & 0xff); - rgba[i][GCOMP] = (GLubyte) ((p4 >> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ( p4 & 0xff); - rgba[i][ACOMP] = 255; - } - } - break; - case PF_8R8G8B24: - { - const bgr_t *ptr3 = PIXELADDR3( source, x, y ); - GLuint i; - for (i=0;ipixel_to_r; - const GLubyte *gTable = source->pixel_to_g; - const GLubyte *bTable = source->pixel_to_b; - if (GET_VISUAL_DEPTH(xmesa->xm_visual)==8) { - GLubyte *ptr1 = PIXELADDR1( source, x, y ); - GLuint i; - for (i=0;ibackimage; - GLuint i; - y = FLIP(source, y); - for (i=0;ibackimage; - int bitFlip = xmesa->xm_visual->bitFlip; - GLuint i; - y = FLIP(source, y); - for (i=0;iDriverCtx; - register GLuint i; - XMesaBuffer source = xmesa->xm_buffer; - - if (source->buffer) { - for (i=0;idisplay, - source->buffer, - x[i], FLIP(source, y[i]) ); - } - } - } - else if (source->backimage) { - XMesaImage *img = source->backimage; - for (i=0;iDriverCtx; - XMesaDisplay *dpy = xmesa->xm_visual->display; - register GLuint i; - XMesaBuffer source = xmesa->xm_buffer; - XMesaDrawable buffer = source->buffer; /* the X drawable */ - - if (source->buffer) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - case PF_TRUEDITHER: - case PF_5R6G5B: - case PF_DITHER_5R6G5B: - { - unsigned long rMask = GET_REDMASK(xmesa->xm_visual); - unsigned long gMask = GET_GREENMASK(xmesa->xm_visual); - unsigned long bMask = GET_BLUEMASK(xmesa->xm_visual); - GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - GLint rShift = xmesa->xm_visual->rshift; - GLint gShift = xmesa->xm_visual->gshift; - GLint bShift = xmesa->xm_visual->bshift; - for (i=0;i> rShift]; - rgba[i][GCOMP] = pixelToG[(p & gMask) >> gShift]; - rgba[i][BCOMP] = pixelToB[(p & bMask) >> bShift]; - rgba[i][ACOMP] = 255; - } - } - } - break; - case PF_8A8B8G8R: - for (i=0;i> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ((p >> 16) & 0xff); - rgba[i][ACOMP] = (GLubyte) ((p >> 24) & 0xff); - } - } - break; - case PF_8R8G8B: - for (i=0;i> 16) & 0xff); - rgba[i][GCOMP] = (GLubyte) ((p >> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ( p & 0xff); - rgba[i][ACOMP] = 255; - } - } - break; - case PF_8R8G8B24: - for (i=0;i> 16) & 0xff); - rgba[i][GCOMP] = (GLubyte) ((p >> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ( p & 0xff); - rgba[i][ACOMP] = 255; - } - } - break; - case PF_HPCR: - { - for (i=0;ipixel_to_r; - GLubyte *gTable = source->pixel_to_g; - GLubyte *bTable = source->pixel_to_b; - for (i=0;ixm_visual->bitFlip; - for (i=0;ibackimage) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - case PF_TRUEDITHER: - case PF_5R6G5B: - case PF_DITHER_5R6G5B: - { - unsigned long rMask = GET_REDMASK(xmesa->xm_visual); - unsigned long gMask = GET_GREENMASK(xmesa->xm_visual); - unsigned long bMask = GET_BLUEMASK(xmesa->xm_visual); - GLubyte *pixelToR = xmesa->xm_visual->PixelToR; - GLubyte *pixelToG = xmesa->xm_visual->PixelToG; - GLubyte *pixelToB = xmesa->xm_visual->PixelToB; - GLint rShift = xmesa->xm_visual->rshift; - GLint gShift = xmesa->xm_visual->gshift; - GLint bShift = xmesa->xm_visual->bshift; - XMesaImage *img = source->backimage; - for (i=0;i> rShift]; - rgba[i][GCOMP] = pixelToG[(p & gMask) >> gShift]; - rgba[i][BCOMP] = pixelToB[(p & bMask) >> bShift]; - rgba[i][ACOMP] = 255; - } - } - } - break; - case PF_8A8B8G8R: - for (i=0;i> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ((p4 >> 16) & 0xff); - rgba[i][ACOMP] = (GLubyte) ((p4 >> 24) & 0xff); - } - } - break; - case PF_8R8G8B: - for (i=0;i> 16) & 0xff); - rgba[i][GCOMP] = (GLubyte) ((p4 >> 8) & 0xff); - rgba[i][BCOMP] = (GLubyte) ( p4 & 0xff); - rgba[i][ACOMP] = 255; - } - } - break; - case PF_8R8G8B24: - for (i=0;ir; - rgba[i][GCOMP] = ptr3->g; - rgba[i][BCOMP] = ptr3->b; - rgba[i][ACOMP] = 255; - } - } - break; - case PF_HPCR: - for (i=0;ipixel_to_r; - GLubyte *gTable = source->pixel_to_g; - GLubyte *bTable = source->pixel_to_b; - XMesaImage *img = source->backimage; - for (i=0;ibackimage; - int bitFlip = xmesa->xm_visual->bitFlip; - for (i=0;iDriverCtx; - - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[2], color[2]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[3], color[3]); - - if (color[0] == 0.0 && color[1] == 0.0 && color[2] == 0.0) { - /* black is black */ - MEMSET( xmesa->xm_visual->hpcr_clear_ximage_pattern, 0x0 , - sizeof(xmesa->xm_visual->hpcr_clear_ximage_pattern)); - } - else { - /* build clear pattern */ - for (i=0; i<16; i++) { - xmesa->xm_visual->hpcr_clear_ximage_pattern[0][i] = - DITHER_HPCR(i, 0, - xmesa->clearcolor[0], - xmesa->clearcolor[1], - xmesa->clearcolor[2]); - xmesa->xm_visual->hpcr_clear_ximage_pattern[1][i] = - DITHER_HPCR(i, 1, - xmesa->clearcolor[0], - xmesa->clearcolor[1], - xmesa->clearcolor[2]); - } - } -} - - -static void -clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] ) -{ - int i; - const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[2], color[2]); - CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[3], color[3]); - - if (color[0] == 0.0 && color[1] == 0.0 && color[2] == 0.0) { - /* black is black */ - for (i=0; i<16; i++) { - XMesaPutPixel(xmesa->xm_visual->hpcr_clear_ximage, i, 0, 0); - XMesaPutPixel(xmesa->xm_visual->hpcr_clear_ximage, i, 1, 0); - } - } - else { - for (i=0; i<16; i++) { - XMesaPutPixel(xmesa->xm_visual->hpcr_clear_ximage, i, 0, - DITHER_HPCR(i, 0, - xmesa->clearcolor[0], - xmesa->clearcolor[1], - xmesa->clearcolor[2])); - XMesaPutPixel(xmesa->xm_visual->hpcr_clear_ximage, i, 1, - DITHER_HPCR(i, 1, - xmesa->clearcolor[0], - xmesa->clearcolor[1], - xmesa->clearcolor[2])); - } - } - /* change tile pixmap content */ - XMesaPutImage(xmesa->display, - (XMesaDrawable)xmesa->xm_visual->hpcr_clear_pixmap, - xmesa->xm_buffer->cleargc, - xmesa->xm_visual->hpcr_clear_ximage, 0, 0, 0, 0, 16, 2); -} - - - -void xmesa_update_span_funcs( GLcontext *ctx ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - int depth=GET_VISUAL_DEPTH(xmesa->xm_visual); - struct swrast_device_driver *dd = _swrast_GetDeviceDriverReference( ctx ); - - /* - * These drawing functions depend on color buffer config: - */ - if (xmesa->xm_buffer->buffer!=XIMAGE) { - /* Writing to window or back pixmap */ - switch (xmesa->pixelformat) { - case PF_INDEX: - dd->WriteCI32Span = write_span_index_pixmap; - dd->WriteCI8Span = write_span_index8_pixmap; - dd->WriteMonoCISpan = write_span_mono_index_pixmap; - dd->WriteCI32Pixels = write_pixels_index_pixmap; - dd->WriteMonoCIPixels = write_pixels_mono_index_pixmap; - break; - case PF_TRUECOLOR: - dd->WriteRGBASpan = write_span_TRUECOLOR_pixmap; - dd->WriteRGBSpan = write_span_rgb_TRUECOLOR_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_TRUECOLOR_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_TRUEDITHER: - dd->WriteRGBASpan = write_span_TRUEDITHER_pixmap; - dd->WriteRGBSpan = write_span_rgb_TRUEDITHER_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_pixmap; - dd->WriteRGBAPixels = write_pixels_TRUEDITHER_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_TRUEDITHER_pixmap; - break; - case PF_8A8B8G8R: - dd->WriteRGBASpan = write_span_8A8B8G8R_pixmap; - dd->WriteRGBSpan = write_span_rgb_8A8B8G8R_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_8A8B8G8R_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_8R8G8B: - dd->WriteRGBASpan = write_span_8R8G8B_pixmap; - dd->WriteRGBSpan = write_span_rgb_8R8G8B_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_8R8G8B_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_8R8G8B24: - dd->WriteRGBASpan = write_span_8R8G8B24_pixmap; - dd->WriteRGBSpan = write_span_rgb_8R8G8B24_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_8R8G8B24_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_5R6G5B: - dd->WriteRGBASpan = write_span_5R6G5B_pixmap; - dd->WriteRGBSpan = write_span_rgb_5R6G5B_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_5R6G5B_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_DITHER_5R6G5B: - dd->WriteRGBASpan = write_span_DITHER_5R6G5B_pixmap; - dd->WriteRGBSpan = write_span_rgb_DITHER_5R6G5B_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_pixmap; - dd->WriteRGBAPixels = write_pixels_DITHER_5R6G5B_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_TRUEDITHER_pixmap; - break; - case PF_DITHER: - dd->WriteRGBASpan = write_span_DITHER_pixmap; - dd->WriteRGBSpan = write_span_rgb_DITHER_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_DITHER_pixmap; - dd->WriteRGBAPixels = write_pixels_DITHER_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_pixmap; - break; - case PF_1BIT: - dd->WriteRGBASpan = write_span_1BIT_pixmap; - dd->WriteRGBSpan = write_span_rgb_1BIT_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_1BIT_pixmap; - dd->WriteRGBAPixels = write_pixels_1BIT_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_1BIT_pixmap; - break; - case PF_HPCR: - dd->WriteRGBASpan = write_span_HPCR_pixmap; - dd->WriteRGBSpan = write_span_rgb_HPCR_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_HPCR_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - if (xmesa->xm_visual->hpcr_clear_flag) { - ctx->Driver.ClearColor = clear_color_HPCR_pixmap; - } - break; - case PF_LOOKUP: - dd->WriteRGBASpan = write_span_LOOKUP_pixmap; - dd->WriteRGBSpan = write_span_rgb_LOOKUP_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_LOOKUP_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - case PF_GRAYSCALE: - dd->WriteRGBASpan = write_span_GRAYSCALE_pixmap; - dd->WriteRGBSpan = write_span_rgb_GRAYSCALE_pixmap; - dd->WriteMonoRGBASpan = write_span_mono_pixmap; - dd->WriteRGBAPixels = write_pixels_GRAYSCALE_pixmap; - dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap; - break; - default: - _mesa_problem(NULL,"Bad pixel format in xmesa_update_state (1)"); - return; - } - } - else if (xmesa->xm_buffer->buffer==XIMAGE) { - /* Writing to back XImage */ - switch (xmesa->pixelformat) { - case PF_INDEX: - dd->WriteCI32Span = write_span_index_ximage; - if (depth==8) - dd->WriteCI8Span = write_span_index8_ximage8; - else - dd->WriteCI8Span = write_span_index8_ximage; - dd->WriteMonoCISpan = write_span_mono_index_ximage; - dd->WriteCI32Pixels = write_pixels_index_ximage; - dd->WriteMonoCIPixels = write_pixels_mono_index_ximage; - break; - case PF_TRUECOLOR: - /* Generic RGB */ - dd->WriteRGBASpan = write_span_TRUECOLOR_ximage; - dd->WriteRGBSpan = write_span_rgb_TRUECOLOR_ximage; - dd->WriteMonoRGBASpan = write_span_mono_ximage; - dd->WriteRGBAPixels = write_pixels_TRUECOLOR_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_ximage; - break; - case PF_TRUEDITHER: - dd->WriteRGBASpan = write_span_TRUEDITHER_ximage; - dd->WriteRGBSpan = write_span_rgb_TRUEDITHER_ximage; - dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_ximage; - dd->WriteRGBAPixels = write_pixels_TRUEDITHER_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_TRUEDITHER_ximage; - break; - case PF_8A8B8G8R: - dd->WriteRGBASpan = write_span_8A8B8G8R_ximage; - dd->WriteRGBSpan = write_span_rgb_8A8B8G8R_ximage; - dd->WriteMonoRGBASpan = write_span_mono_8A8B8G8R_ximage; - dd->WriteRGBAPixels = write_pixels_8A8B8G8R_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_8A8B8G8R_ximage; - break; - case PF_8R8G8B: - dd->WriteRGBASpan = write_span_8R8G8B_ximage; - dd->WriteRGBSpan = write_span_rgb_8R8G8B_ximage; - dd->WriteMonoRGBASpan = write_span_mono_8R8G8B_ximage; - dd->WriteRGBAPixels = write_pixels_8R8G8B_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_8R8G8B_ximage; - break; - case PF_8R8G8B24: - dd->WriteRGBASpan = write_span_8R8G8B24_ximage; - dd->WriteRGBSpan = write_span_rgb_8R8G8B24_ximage; - dd->WriteMonoRGBASpan = write_span_mono_8R8G8B24_ximage; - dd->WriteRGBAPixels = write_pixels_8R8G8B24_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_8R8G8B24_ximage; - break; - case PF_5R6G5B: - dd->WriteRGBASpan = write_span_5R6G5B_ximage; - dd->WriteRGBSpan = write_span_rgb_5R6G5B_ximage; - dd->WriteMonoRGBASpan = write_span_mono_ximage; - dd->WriteRGBAPixels = write_pixels_5R6G5B_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_ximage; - break; - case PF_DITHER_5R6G5B: - dd->WriteRGBASpan = write_span_DITHER_5R6G5B_ximage; - dd->WriteRGBSpan = write_span_rgb_DITHER_5R6G5B_ximage; - dd->WriteMonoRGBASpan = write_span_mono_DITHER_5R6G5B_ximage; - dd->WriteRGBAPixels = write_pixels_DITHER_5R6G5B_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_5R6G5B_ximage; - break; - case PF_DITHER: - if (depth==8) { - dd->WriteRGBASpan = write_span_DITHER8_ximage; - dd->WriteRGBSpan = write_span_rgb_DITHER8_ximage; - dd->WriteMonoRGBASpan = write_span_mono_DITHER8_ximage; - dd->WriteRGBAPixels = write_pixels_DITHER8_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER8_ximage; - } - else { - dd->WriteRGBASpan = write_span_DITHER_ximage; - dd->WriteRGBSpan = write_span_rgb_DITHER_ximage; - dd->WriteMonoRGBASpan = write_span_mono_DITHER_ximage; - dd->WriteRGBAPixels = write_pixels_DITHER_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_ximage; - } - break; - case PF_1BIT: - dd->WriteRGBASpan = write_span_1BIT_ximage; - dd->WriteRGBSpan = write_span_rgb_1BIT_ximage; - dd->WriteMonoRGBASpan = write_span_mono_1BIT_ximage; - dd->WriteRGBAPixels = write_pixels_1BIT_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_1BIT_ximage; - break; - case PF_HPCR: - dd->WriteRGBASpan = write_span_HPCR_ximage; - dd->WriteRGBSpan = write_span_rgb_HPCR_ximage; - dd->WriteMonoRGBASpan = write_span_mono_HPCR_ximage; - dd->WriteRGBAPixels = write_pixels_HPCR_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_HPCR_ximage; - if (xmesa->xm_visual->hpcr_clear_flag) { - ctx->Driver.ClearColor = clear_color_HPCR_ximage; - } - break; - case PF_LOOKUP: - if (depth==8) { - dd->WriteRGBASpan = write_span_LOOKUP8_ximage; - dd->WriteRGBSpan = write_rgb_LOOKUP8_ximage; - dd->WriteMonoRGBASpan = write_span_mono_LOOKUP8_ximage; - dd->WriteRGBAPixels = write_pixels_LOOKUP8_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_LOOKUP8_ximage; - } - else { - dd->WriteRGBASpan = write_span_LOOKUP_ximage; - dd->WriteRGBSpan = write_span_rgb_LOOKUP_ximage; - dd->WriteMonoRGBASpan = write_span_mono_ximage; - dd->WriteRGBAPixels = write_pixels_LOOKUP_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_ximage; - } - break; - case PF_GRAYSCALE: - if (depth==8) { - dd->WriteRGBASpan = write_span_GRAYSCALE8_ximage; - dd->WriteRGBSpan = write_span_rgb_GRAYSCALE8_ximage; - dd->WriteMonoRGBASpan = write_span_mono_GRAYSCALE8_ximage; - dd->WriteRGBAPixels = write_pixels_GRAYSCALE8_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_GRAYSCALE8_ximage; - } - else { - dd->WriteRGBASpan = write_span_GRAYSCALE_ximage; - dd->WriteRGBSpan = write_span_rgb_GRAYSCALE_ximage; - dd->WriteMonoRGBASpan = write_span_mono_ximage; - dd->WriteRGBAPixels = write_pixels_GRAYSCALE_ximage; - dd->WriteMonoRGBAPixels = write_pixels_mono_ximage; - } - break; - default: - _mesa_problem(NULL,"Bad pixel format in xmesa_update_state (2)"); - return; - } - } - - /* Pixel/span reading functions: */ - dd->ReadCI32Span = read_index_span; - dd->ReadRGBASpan = read_color_span; - dd->ReadCI32Pixels = read_index_pixels; - dd->ReadRGBAPixels = read_color_pixels; -} Index: xc/extras/Mesa/src/X/xm_tri.c diff -u xc/extras/Mesa/src/X/xm_tri.c:1.3 xc/extras/Mesa/src/X/xm_tri.c:removed --- xc/extras/Mesa/src/X/xm_tri.c:1.3 Sun Sep 28 15:17:06 2003 +++ xc/extras/Mesa/src/X/xm_tri.c Wed Mar 16 21:00:47 2005 @@ -1,1702 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file contains "accelerated" triangle functions. It should be - * fairly easy to write new special-purpose triangle functions and hook - * them into this module. - */ - - -#include "glxheader.h" -#include "depth.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" -#include "mtypes.h" -#include "xmesaP.h" - -/* Internal swrast includes: - */ -#include "swrast/s_context.h" -#include "swrast/s_depth.h" -#include "swrast/s_triangle.h" - - - -/**********************************************************************/ -/*** Triangle rendering ***/ -/**********************************************************************/ - - -/* - * XImage, smooth, depth-buffered, PF_TRUECOLOR triangle. - */ -static void smooth_TRUECOLOR_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 - -#define RENDER_SPAN( span ) \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - GLuint i; \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - unsigned long p; \ - PACK_TRUECOLOR(p, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - XMesaPutPixel(img, x, y, p); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - - -/* - * XImage, smooth, depth-buffered, PF_8A8B8G8R triangle. - */ -static void smooth_8A8B8G8R_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = PACK_8B8G8R(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_8R8G8B triangle. - */ -static void smooth_8R8G8B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = PACK_8R8G8B(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_8R8G8B24 triangle. - */ -static void smooth_8R8G8B24_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PIXEL_TYPE *ptr = pRow + i; \ - ptr->r = FixedToInt(span.red); \ - ptr->g = FixedToInt(span.green); \ - ptr->b = FixedToInt(span.blue); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_TRUEDITHER triangle. - */ -static void smooth_TRUEDITHER_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - unsigned long p; \ - PACK_TRUEDITHER(p, x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - XMesaPutPixel(img, x, y, p); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_5R6G5B triangle. - */ -static void smooth_5R6G5B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = PACK_5R6G5B(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_DITHER_5R6G5B triangle. - */ -static void smooth_DITHER_5R6G5B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PACK_TRUEDITHER(pRow[i], x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, 8-bit, PF_DITHER8 triangle. - */ -static void smooth_DITHER8_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - XDITHER_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) XDITHER(x, FixedToInt(span.red),\ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, PF_DITHER triangle. - */ -static void smooth_DITHER_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - XDITHER_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - unsigned long p = XDITHER(x, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - XMesaPutPixel(img, x, y, p); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, depth-buffered, 8-bit PF_LOOKUP triangle. - */ -static void smooth_LOOKUP8_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - LOOKUP_SETUP; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = LOOKUP(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - - -/* - * XImage, smooth, depth-buffered, 8-bit PF_HPCR triangle. - */ -static void smooth_HPCR_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = DITHER_HPCR(x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_TRUECOLOR triangle. - */ -static void flat_TRUECOLOR_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define SETUP_CODE \ - unsigned long pixel; \ - PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - XMesaPutPixel(img, x, y, pixel); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_8A8B8G8R triangle. - */ -static void flat_8A8B8G8R_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_8B8G8R( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) p; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_8R8G8B triangle. - */ -static void flat_8R8G8B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_8R8G8B( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) p; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_8R8G8B24 triangle. - */ -static void flat_8R8G8B24_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = v2->color; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PIXEL_TYPE *ptr = pRow + i; \ - ptr->r = color[RCOMP]; \ - ptr->g = color[GCOMP]; \ - ptr->b = color[BCOMP]; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_TRUEDITHER triangle. - */ -static void flat_TRUEDITHER_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - unsigned long p; \ - PACK_TRUEDITHER(p, x, y, v2->color[0], \ - v2->color[1], v2->color[2]); \ - XMesaPutPixel(img, x, y, p); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_5R6G5B triangle. - */ -static void flat_5R6G5B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_5R6G5B( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) p; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_DITHER_5R6G5B triangle. - */ -static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = v2->color; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PACK_TRUEDITHER(pRow[i], x, y, color[RCOMP], \ - color[GCOMP], color[BCOMP]); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, 8-bit PF_DITHER triangle. - */ -static void flat_DITHER8_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] ); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - FLAT_DITHER_ROW_SETUP(FLIP(xmesa->xm_buffer, y)); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) FLAT_DITHER(x); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, PF_DITHER triangle. - */ -static void flat_DITHER_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define SETUP_CODE \ - FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] ); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - FLAT_DITHER_ROW_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - unsigned long p = FLAT_DITHER(x); \ - XMesaPutPixel(img, x, y, p); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, 8-bit PF_HPCR triangle. - */ -static void flat_HPCR_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - GLubyte r = v2->color[0]; \ - GLubyte g = v2->color[1]; \ - GLubyte b = v2->color[2]; -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, depth-buffered, 8-bit PF_LOOKUP triangle. - */ -static void flat_LOOKUP8_z_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - LOOKUP_SETUP; \ - GLubyte r = v2->color[0]; \ - GLubyte g = v2->color[1]; \ - GLubyte b = v2->color[2]; \ - GLubyte p = LOOKUP(r,g,b); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - const DEPTH_TYPE z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - pRow[i] = p; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } - -#include "swrast/s_tritemp.h" -} - - - -/* - * XImage, smooth, NON-depth-buffered, PF_TRUECOLOR triangle. - */ -static void smooth_TRUECOLOR_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_RGB 1 -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - unsigned long p; \ - PACK_TRUECOLOR(p, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - XMesaPutPixel(img, x, y, p); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_8A8B8G8R triangle. - */ -static void smooth_8A8B8G8R_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = PACK_8B8G8R(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } \ - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle. - */ -static void smooth_8R8G8B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = PACK_8R8G8B(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle. - */ -static void smooth_8R8G8B24_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - PIXEL_TYPE *pixel = pRow; \ - for (i = 0; i < span.end; i++, pixel++) { \ - pixel->r = FixedToInt(span.red); \ - pixel->g = FixedToInt(span.green); \ - pixel->b = FixedToInt(span.blue); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_TRUEDITHER triangle. - */ -static void smooth_TRUEDITHER_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_RGB 1 -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - unsigned long p; \ - PACK_TRUEDITHER(p, x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - XMesaPutPixel(img, x, y, p ); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_5R6G5B triangle. - */ -static void smooth_5R6G5B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = (PIXEL_TYPE) PACK_5R6G5B(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_DITHER_5R6G5B triangle. - */ -static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - PACK_TRUEDITHER(pRow[i], x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, 8-bit PF_DITHER triangle. - */ -static void smooth_DITHER8_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - XDITHER_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - pRow[i] = (PIXEL_TYPE) XDITHER(x, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, PF_DITHER triangle. - */ -static void smooth_DITHER_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define INTERP_RGB 1 -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - XDITHER_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - unsigned long p = XDITHER(x, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue) ); \ - XMesaPutPixel(img, x, y, p); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, smooth, NON-depth-buffered, 8-bit PF_LOOKUP triangle. - */ -static void smooth_LOOKUP8_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - LOOKUP_SETUP; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = LOOKUP(FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue));\ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - - -/* - * XImage, smooth, NON-depth-buffered, 8-bit PF_HPCR triangle. - */ -static void smooth_HPCR_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define INTERP_RGB 1 -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - pRow[i] = DITHER_HPCR(x, y, FixedToInt(span.red), \ - FixedToInt(span.green), FixedToInt(span.blue)); \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_TRUECOLOR triangle. - */ -static void flat_TRUECOLOR_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define SETUP_CODE \ - unsigned long pixel; \ - PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - XMesaPutPixel(img, x, y, pixel); \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_8A8B8G8R triangle. - */ -static void flat_8A8B8G8R_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_8B8G8R( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = (PIXEL_TYPE) p; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_8R8G8B triangle. - */ -static void flat_8R8G8B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLuint -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_8R8G8B( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = (PIXEL_TYPE) p; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_8R8G8B24 triangle. - */ -static void flat_8R8G8B24_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = v2->color; -#define PIXEL_ADDRESS(X,Y) PIXELADDR3(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE bgr_t -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - PIXEL_TYPE *pixel = pRow; \ - for (i = 0; i < span.end; i++, pixel++) { \ - pixel->r = color[RCOMP]; \ - pixel->g = color[GCOMP]; \ - pixel->b = color[BCOMP]; \ - } - -#include "swrast/s_tritemp.h" -} - -/* - * XImage, flat, NON-depth-buffered, PF_TRUEDITHER triangle. - */ -static void flat_TRUEDITHER_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - unsigned long p; \ - PACK_TRUEDITHER(p, x, y, v2->color[0], \ - v2->color[1], v2->color[2] ); \ - XMesaPutPixel(img, x, y, p); \ - } - -#include "swrast/s_tritemp.h" -} - - - -/* - * XImage, flat, NON-depth-buffered, PF_5R6G5B triangle. - */ -static void flat_5R6G5B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - unsigned long p = PACK_5R6G5B( v2->color[0], \ - v2->color[1], v2->color[2] ); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = (PIXEL_TYPE) p; \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_DITHER_5R6G5B triangle. - */ -static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - const GLubyte *color = v2->color; -#define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLushort -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - PACK_TRUEDITHER(pRow[i], x, y, color[RCOMP], \ - color[GCOMP], color[BCOMP]); \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, 8-bit PF_DITHER triangle. - */ -static void flat_DITHER8_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] ); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - FLAT_DITHER_ROW_SETUP(FLIP(xmesa->xm_buffer, y)); \ - for (i = 0; i < span.end; i++, x++) { \ - pRow[i] = (PIXEL_TYPE) FLAT_DITHER(x); \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, PF_DITHER triangle. - */ -static void flat_DITHER_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - XMesaImage *img = xmesa->xm_buffer->backimage; -#define SETUP_CODE \ - FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] ); - -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - FLAT_DITHER_ROW_SETUP(y); \ - for (i = 0; i < span.end; i++, x++) { \ - unsigned long p = FLAT_DITHER(x); \ - XMesaPutPixel(img, x, y, p ); \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, 8-bit PF_HPCR triangle. - */ -static void flat_HPCR_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - GLubyte r = v2->color[0]; \ - GLubyte g = v2->color[1]; \ - GLubyte b = v2->color[2]; -#define RENDER_SPAN( span ) \ - GLuint i; \ - GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \ - for (i = 0; i < span.end; i++, x++) { \ - pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \ - } - -#include "swrast/s_tritemp.h" -} - - -/* - * XImage, flat, NON-depth-buffered, 8-bit PF_LOOKUP triangle. - */ -static void flat_LOOKUP8_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2 ) -{ - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; -#define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) -#define PIXEL_TYPE GLubyte -#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line) -#define SETUP_CODE \ - LOOKUP_SETUP; \ - GLubyte r = v2->color[0]; \ - GLubyte g = v2->color[1]; \ - GLubyte b = v2->color[2]; \ - GLubyte p = LOOKUP(r,g,b); -#define RENDER_SPAN( span ) \ - GLuint i; \ - for (i = 0; i < span.end; i++) { \ - pRow[i] = (PIXEL_TYPE) p; \ - } - -#include "swrast/s_tritemp.h" -} - - -#ifdef DEBUG -extern void _xmesa_print_triangle_func( swrast_tri_func triFunc ); -void _xmesa_print_triangle_func( swrast_tri_func triFunc ) -{ - _mesa_printf("XMesa tri func = "); - if (triFunc ==smooth_TRUECOLOR_z_triangle) - _mesa_printf("smooth_TRUECOLOR_z_triangle\n"); - else if (triFunc ==smooth_8A8B8G8R_z_triangle) - _mesa_printf("smooth_8A8B8G8R_z_triangle\n"); - else if (triFunc ==smooth_8R8G8B_z_triangle) - _mesa_printf("smooth_8R8G8B_z_triangle\n"); - else if (triFunc ==smooth_8R8G8B24_z_triangle) - _mesa_printf("smooth_8R8G8B24_z_triangle\n"); - else if (triFunc ==smooth_TRUEDITHER_z_triangle) - _mesa_printf("smooth_TRUEDITHER_z_triangle\n"); - else if (triFunc ==smooth_5R6G5B_z_triangle) - _mesa_printf("smooth_5R6G5B_z_triangle\n"); - else if (triFunc ==smooth_DITHER_5R6G5B_z_triangle) - _mesa_printf("smooth_DITHER_5R6G5B_z_triangle\n"); - else if (triFunc ==smooth_HPCR_z_triangle) - _mesa_printf("smooth_HPCR_z_triangle\n"); - else if (triFunc ==smooth_DITHER8_z_triangle) - _mesa_printf("smooth_DITHER8_z_triangle\n"); - else if (triFunc ==smooth_LOOKUP8_z_triangle) - _mesa_printf("smooth_LOOKUP8_z_triangle\n"); - else if (triFunc ==flat_TRUECOLOR_z_triangle) - _mesa_printf("flat_TRUECOLOR_z_triangle\n"); - else if (triFunc ==flat_8A8B8G8R_z_triangle) - _mesa_printf("flat_8A8B8G8R_z_triangle\n"); - else if (triFunc ==flat_8R8G8B_z_triangle) - _mesa_printf("flat_8R8G8B_z_triangle\n"); - else if (triFunc ==flat_8R8G8B24_z_triangle) - _mesa_printf("flat_8R8G8B24_z_triangle\n"); - else if (triFunc ==flat_TRUEDITHER_z_triangle) - _mesa_printf("flat_TRUEDITHER_z_triangle\n"); - else if (triFunc ==flat_5R6G5B_z_triangle) - _mesa_printf("flat_5R6G5B_z_triangle\n"); - else if (triFunc ==flat_DITHER_5R6G5B_z_triangle) - _mesa_printf("flat_DITHER_5R6G5B_z_triangle\n"); - else if (triFunc ==flat_HPCR_z_triangle) - _mesa_printf("flat_HPCR_z_triangle\n"); - else if (triFunc ==flat_DITHER8_z_triangle) - _mesa_printf("flat_DITHER8_z_triangle\n"); - else if (triFunc ==flat_LOOKUP8_z_triangle) - _mesa_printf("flat_LOOKUP8_z_triangle\n"); - else if (triFunc ==smooth_TRUECOLOR_triangle) - _mesa_printf("smooth_TRUECOLOR_triangle\n"); - else if (triFunc ==smooth_8A8B8G8R_triangle) - _mesa_printf("smooth_8A8B8G8R_triangle\n"); - else if (triFunc ==smooth_8R8G8B_triangle) - _mesa_printf("smooth_8R8G8B_triangle\n"); - else if (triFunc ==smooth_8R8G8B24_triangle) - _mesa_printf("smooth_8R8G8B24_triangle\n"); - else if (triFunc ==smooth_TRUEDITHER_triangle) - _mesa_printf("smooth_TRUEDITHER_triangle\n"); - else if (triFunc ==smooth_5R6G5B_triangle) - _mesa_printf("smooth_5R6G5B_triangle\n"); - else if (triFunc ==smooth_DITHER_5R6G5B_triangle) - _mesa_printf("smooth_DITHER_5R6G5B_triangle\n"); - else if (triFunc ==smooth_HPCR_triangle) - _mesa_printf("smooth_HPCR_triangle\n"); - else if (triFunc ==smooth_DITHER8_triangle) - _mesa_printf("smooth_DITHER8_triangle\n"); - else if (triFunc ==smooth_LOOKUP8_triangle) - _mesa_printf("smooth_LOOKUP8_triangle\n"); - else if (triFunc ==flat_TRUECOLOR_triangle) - _mesa_printf("flat_TRUECOLOR_triangle\n"); - else if (triFunc ==flat_TRUEDITHER_triangle) - _mesa_printf("flat_TRUEDITHER_triangle\n"); - else if (triFunc ==flat_8A8B8G8R_triangle) - _mesa_printf("flat_8A8B8G8R_triangle\n"); - else if (triFunc ==flat_8R8G8B_triangle) - _mesa_printf("flat_8R8G8B_triangle\n"); - else if (triFunc ==flat_8R8G8B24_triangle) - _mesa_printf("flat_8R8G8B24_triangle\n"); - else if (triFunc ==flat_5R6G5B_triangle) - _mesa_printf("flat_5R6G5B_triangle\n"); - else if (triFunc ==flat_DITHER_5R6G5B_triangle) - _mesa_printf("flat_DITHER_5R6G5B_triangle\n"); - else if (triFunc ==flat_HPCR_triangle) - _mesa_printf("flat_HPCR_triangle\n"); - else if (triFunc ==flat_DITHER8_triangle) - _mesa_printf("flat_DITHER8_triangle\n"); - else if (triFunc ==flat_LOOKUP8_triangle) - _mesa_printf("flat_LOOKUP8_triangle\n"); - else - _mesa_printf("???\n"); -} -#endif - - -#ifdef DEBUG - -/* record the current triangle function name */ -static const char *triFuncName = NULL; - -#define USE(triFunc) \ -do { \ - triFuncName = #triFunc; \ - return triFunc; \ -} while (0) - -#else - -#define USE(triFunc) return triFunc - -#endif - - -static swrast_tri_func get_triangle_func( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); - - (void) kernel1; - -#ifdef DEBUG - triFuncName = NULL; -#endif - - if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; - if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; - if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL; - if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_tri_func) NULL; - if (ctx->Polygon.CullFlag && - ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) - return (swrast_tri_func) NULL; - - if (xmesa->xm_buffer->buffer==XIMAGE) { - if ( ctx->Light.ShadeModel==GL_SMOOTH - && swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS - && ctx->Polygon.StippleFlag==GL_FALSE) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - USE(smooth_TRUECOLOR_z_triangle); - case PF_8A8B8G8R: - USE(smooth_8A8B8G8R_z_triangle); - case PF_8R8G8B: - USE(smooth_8R8G8B_z_triangle); - case PF_8R8G8B24: - USE(smooth_8R8G8B24_z_triangle); - case PF_TRUEDITHER: - USE(smooth_TRUEDITHER_z_triangle); - case PF_5R6G5B: - USE(smooth_5R6G5B_z_triangle); - case PF_DITHER_5R6G5B: - USE(smooth_DITHER_5R6G5B_z_triangle); - case PF_HPCR: - USE(smooth_HPCR_z_triangle); - case PF_DITHER: - if (depth == 8) - USE(smooth_DITHER8_z_triangle); - else - USE(smooth_DITHER_z_triangle); - break; - case PF_LOOKUP: - if (depth == 8) - USE(smooth_LOOKUP8_z_triangle); - else - return (swrast_tri_func) NULL; - default: - return (swrast_tri_func) NULL; - } - } - if ( ctx->Light.ShadeModel==GL_FLAT - && swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS - && ctx->Polygon.StippleFlag==GL_FALSE) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - USE(flat_TRUECOLOR_z_triangle); - case PF_8A8B8G8R: - USE(flat_8A8B8G8R_z_triangle); - case PF_8R8G8B: - USE(flat_8R8G8B_z_triangle); - case PF_8R8G8B24: - USE(flat_8R8G8B24_z_triangle); - case PF_TRUEDITHER: - USE(flat_TRUEDITHER_z_triangle); - case PF_5R6G5B: - USE(flat_5R6G5B_z_triangle); - case PF_DITHER_5R6G5B: - USE(flat_DITHER_5R6G5B_z_triangle); - case PF_HPCR: - USE(flat_HPCR_z_triangle); - case PF_DITHER: - if (depth == 8) - USE(flat_DITHER8_z_triangle); - else - USE(flat_DITHER_z_triangle); - break; - case PF_LOOKUP: - if (depth == 8) - USE(flat_LOOKUP8_z_triangle); - else - return (swrast_tri_func) NULL; - default: - return (swrast_tri_func) NULL; - } - } - if ( swrast->_RasterMask==0 /* no depth test */ - && ctx->Light.ShadeModel==GL_SMOOTH - && ctx->Polygon.StippleFlag==GL_FALSE) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - USE(smooth_TRUECOLOR_triangle); - case PF_8A8B8G8R: - USE(smooth_8A8B8G8R_triangle); - case PF_8R8G8B: - USE(smooth_8R8G8B_triangle); - case PF_8R8G8B24: - USE(smooth_8R8G8B24_triangle); - case PF_TRUEDITHER: - USE(smooth_TRUEDITHER_triangle); - case PF_5R6G5B: - USE(smooth_5R6G5B_triangle); - case PF_DITHER_5R6G5B: - USE(smooth_DITHER_5R6G5B_triangle); - case PF_HPCR: - USE(smooth_HPCR_triangle); - case PF_DITHER: - if (depth == 8) - USE(smooth_DITHER8_triangle); - else - USE(smooth_DITHER_triangle); - break; - case PF_LOOKUP: - if (depth == 8) - USE(smooth_LOOKUP8_triangle); - else - return (swrast_tri_func) NULL; - default: - return (swrast_tri_func) NULL; - } - } - - if ( swrast->_RasterMask==0 /* no depth test */ - && ctx->Light.ShadeModel==GL_FLAT - && ctx->Polygon.StippleFlag==GL_FALSE) { - switch (xmesa->pixelformat) { - case PF_TRUECOLOR: - USE(flat_TRUECOLOR_triangle); - case PF_TRUEDITHER: - USE(flat_TRUEDITHER_triangle); - case PF_8A8B8G8R: - USE(flat_8A8B8G8R_triangle); - case PF_8R8G8B: - USE(flat_8R8G8B_triangle); - case PF_8R8G8B24: - USE(flat_8R8G8B24_triangle); - case PF_5R6G5B: - USE(flat_5R6G5B_triangle); - case PF_DITHER_5R6G5B: - USE(flat_DITHER_5R6G5B_triangle); - case PF_HPCR: - USE(flat_HPCR_triangle); - case PF_DITHER: - if (depth == 8) - USE(flat_DITHER8_triangle); - else - USE(flat_DITHER_triangle); - break; - case PF_LOOKUP: - if (depth == 8) - USE(flat_LOOKUP8_triangle); - else - return (swrast_tri_func) NULL; - default: - return (swrast_tri_func) NULL; - } - } - - return (swrast_tri_func) NULL; - } - else { - /* draw to pixmap */ - return (swrast_tri_func) NULL; - } -} - - -/* Override for the swrast tri-selection function. Try to use one - * of our internal tri functions, otherwise fall back to the - * standard swrast functions. - */ -void xmesa_choose_triangle( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (!(swrast->Triangle = get_triangle_func( ctx ))) - _swrast_choose_triangle( ctx ); -} - Index: xc/extras/Mesa/src/X/xmesaP.h diff -u xc/extras/Mesa/src/X/xmesaP.h:1.12 xc/extras/Mesa/src/X/xmesaP.h:removed --- xc/extras/Mesa/src/X/xmesaP.h:1.12 Sun Sep 28 15:17:07 2003 +++ xc/extras/Mesa/src/X/xmesaP.h Wed Mar 16 21:00:48 2005 @@ -1,539 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef XMESAP_H -#define XMESAP_H - - -#ifdef XFree86Server -# include "GL/xf86glx.h" -# include "xf86glx_util.h" -#else -# ifdef USE_XSHM -# include -# endif -#endif -#include "GL/xmesa.h" -#include "mtypes.h" -#if defined(FX) -#include "GL/fxmesa.h" -#include "FX/fxdrv.h" -#endif - - -extern _glthread_Mutex _xmesa_lock; - - -/* for PF_8R8G8B24 pixel format */ -typedef struct { - GLubyte b; - GLubyte g; - GLubyte r; -} bgr_t; - - -/* Function pointer for clearing color buffers */ -typedef void (*clear_func)( GLcontext *ctx, - GLboolean all, GLint x, GLint y, - GLint width, GLint height ); - - -/* - * "Derived" from GLvisual. Basically corresponds to an XVisualInfo. - */ -struct xmesa_visual { - GLvisual mesa_visual; /* Device independent visual parameters */ - XMesaDisplay *display; /* The X11 display */ -#ifdef XFree86Server - GLint screen_depth; /* The depth of the screen */ -#else - XVisualInfo *vishandle; /* Only used in fakeglx.c */ -#endif - XMesaVisualInfo visinfo; /* X's visual info (pointer to private copy) */ - GLint BitsPerPixel; /* True bits per pixel for XImages */ - - GLint level; /* 0=normal, 1=overlay, etc */ - GLint VisualCaveat; /* for GLX_EXT_visual_rating extension */ - - GLboolean ximage_flag; /* Use XImage for back buffer (not pixmap)? */ - - GLuint dithered_pf; /* Pixel format when dithering */ - GLuint undithered_pf; /* Pixel format when not dithering */ - - GLfloat RedGamma; /* Gamma values, 1.0 is default */ - GLfloat GreenGamma; - GLfloat BlueGamma; - - GLint rmult, gmult, bmult; /* Range of color values */ - GLint index_bits; /* Bits per pixel in CI mode */ - - /* For PF_TRUECOLOR */ - GLint rshift, gshift, bshift;/* Pixel color component shifts */ - GLubyte Kernel[16]; /* Dither kernel */ - unsigned long RtoPixel[512]; /* RGB to pixel conversion */ - unsigned long GtoPixel[512]; - unsigned long BtoPixel[512]; - GLubyte PixelToR[256]; /* Pixel to RGB conversion */ - GLubyte PixelToG[256]; - GLubyte PixelToB[256]; - - /* For PF_HPCR */ - short hpcr_rgbTbl[3][256]; - GLboolean hpcr_clear_flag; - GLubyte hpcr_clear_ximage_pattern[2][16]; - XMesaImage *hpcr_clear_ximage; - XMesaPixmap hpcr_clear_pixmap; - - /* For PF_1BIT */ - int bitFlip; -}; - - - -/* - * "Derived" from __GLcontextRec. Basically corresponds to a GLXContext. - */ -struct xmesa_context { - GLcontext *gl_ctx; /* the core library context */ - XMesaVisual xm_visual; /* Describes the buffers */ - XMesaBuffer xm_draw_buffer; /* current draw framebuffer */ - XMesaBuffer xm_read_buffer; /* current read framebuffer */ - XMesaBuffer xm_buffer; /* current span/point/line/triangle buffer */ - - XMesaDisplay *display; /* == xm_visual->display */ - GLboolean swapbytes; /* Host byte order != display byte order? */ - GLboolean direct; /* Direct rendering context? */ - - GLuint pixelformat; /* Current pixel format */ - - GLubyte clearcolor[4]; /* current clearing color */ - unsigned long clearpixel; /* current clearing pixel value */ -}; - - - -typedef enum { - WINDOW, /* An X window */ - GLXWINDOW, /* GLX window */ - PIXMAP, /* GLX pixmap */ - PBUFFER /* GLX Pbuffer */ -} BufferType; - - -/* - * "Derived" from GLframebuffer. Basically corresponds to a GLXDrawable. - */ -struct xmesa_buffer { - GLframebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */ - /* This MUST BE FIRST! */ - GLboolean wasCurrent; /* was ever the current buffer? */ - XMesaVisual xm_visual; /* the X/Mesa visual */ - - XMesaDisplay *display; - BufferType type; /* window, pixmap, pbuffer or glxwindow */ - XMesaDrawable frontbuffer; /* either a window or pixmap */ - XMesaPixmap backpixmap; /* back buffer Pixmap */ - XMesaImage *backimage; /* back buffer simulated XImage */ - - XMesaDrawable buffer; /* the current buffer, either equal to */ - /* frontbuffer, backpixmap or XIMAGE (None) */ - - XMesaColormap cmap; /* the X colormap */ - - unsigned long selectedEvents;/* for pbuffers only */ - - GLint db_state; /* 0 = single buffered */ - /* BACK_PIXMAP = use Pixmap for back buffer */ - /* BACK_XIMAGE = use XImage for back buffer */ - -#ifndef XFree86Server - GLuint shm; /* X Shared Memory extension status: */ - /* 0 = not available */ - /* 1 = XImage support available */ - /* 2 = Pixmap support available too */ -#ifdef USE_XSHM - XShmSegmentInfo shminfo; -#endif -#endif - - XMesaImage *rowimage; /* Used for optimized span writing */ - - GLuint width, height; /* size of buffer */ - - GLint bottom; /* used for FLIP macro below */ - GLubyte *ximage_origin1; /* used for PIXELADDR1 macro */ - GLint ximage_width1; - GLushort *ximage_origin2; /* used for PIXELADDR2 macro */ - GLint ximage_width2; - GLubyte *ximage_origin3; /* used for PIXELADDR3 macro */ - GLint ximage_width3; - GLuint *ximage_origin4; /* used for PIXELADDR4 macro */ - GLint ximage_width4; - - XMesaPixmap stipple_pixmap; /* For polygon stippling */ - XMesaGC stipple_gc; /* For polygon stippling */ - - XMesaGC gc; /* scratch GC for span, line, tri drawing */ - XMesaGC cleargc; /* GC for clearing the color buffer */ - XMesaGC swapgc; /* GC for swapping the color buffers */ - - /* The following are here instead of in the XMesaVisual - * because they depend on the window's colormap. - */ - - /* For PF_DITHER, PF_LOOKUP, PF_GRAYSCALE */ - unsigned long color_table[576]; /* RGB -> pixel value */ - - /* For PF_DITHER, PF_LOOKUP, PF_GRAYSCALE */ - GLubyte pixel_to_r[65536]; /* pixel value -> red */ - GLubyte pixel_to_g[65536]; /* pixel value -> green */ - GLubyte pixel_to_b[65536]; /* pixel value -> blue */ - - /* Used to do XAllocColor/XFreeColors accounting: */ - int num_alloced; -#if defined(XFree86Server) - Pixel alloced_colors[256]; -#else - unsigned long alloced_colors[256]; -#endif - -#if defined( FX ) - /* For 3Dfx Glide only */ - GLboolean FXisHackUsable; /* Can we render into window? */ - GLboolean FXwindowHack; /* Are we rendering into a window? */ - fxMesaContext FXctx; -#endif - - /* functions for clearing the front and back color buffers */ - clear_func front_clear_func; - clear_func back_clear_func; - - struct xmesa_buffer *Next; /* Linked list pointer: */ -}; - - - -/* Values for xmesa->dest: */ -#define FRONT_PIXMAP 1 -#define BACK_PIXMAP 2 -#define BACK_XIMAGE 4 - - -/* Values for xmesa->pixelformat: */ -#define PF_INDEX 1 /* Color Index mode */ -#define PF_TRUECOLOR 2 /* TrueColor or DirectColor, any depth */ -#define PF_TRUEDITHER 3 /* TrueColor with dithering */ -#define PF_8A8B8G8R 4 /* 32-bit TrueColor: 8-A, 8-B, 8-G, 8-R */ -#define PF_8R8G8B 5 /* 32-bit TrueColor: 8-R, 8-G, 8-B bits */ -#define PF_5R6G5B 6 /* 16-bit TrueColor: 5-R, 6-G, 5-B bits */ -#define PF_DITHER 7 /* Color-mapped RGB with dither */ -#define PF_LOOKUP 8 /* Color-mapped RGB without dither */ -#define PF_HPCR 9 /* HP Color Recovery (ad@lms.be 30/08/95) */ -#define PF_1BIT 10 /* monochrome dithering of RGB */ -#define PF_GRAYSCALE 11 /* Grayscale or StaticGray */ -#define PF_8R8G8B24 12 /* 24-bit TrueColor: 8-R, 8-G, 8-B bits */ -#define PF_DITHER_5R6G5B 13 /* 16-bit dithered TrueColor: 5-R, 6-G, 5-B */ - - -/* - * If pixelformat==PF_TRUECOLOR: - */ -#define PACK_TRUECOLOR( PIXEL, R, G, B ) \ - PIXEL = xmesa->xm_visual->RtoPixel[R] \ - | xmesa->xm_visual->GtoPixel[G] \ - | xmesa->xm_visual->BtoPixel[B]; \ - - -/* - * If pixelformat==PF_TRUEDITHER: - */ -#define PACK_TRUEDITHER( PIXEL, X, Y, R, G, B ) \ -{ \ - int d = xmesa->xm_visual->Kernel[((X)&3) | (((Y)&3)<<2)]; \ - PIXEL = xmesa->xm_visual->RtoPixel[(R)+d] \ - | xmesa->xm_visual->GtoPixel[(G)+d] \ - | xmesa->xm_visual->BtoPixel[(B)+d]; \ -} - - - -/* - * If pixelformat==PF_8A8B8G8R: - */ -#define PACK_8A8B8G8R( R, G, B, A ) \ - ( ((A) << 24) | ((B) << 16) | ((G) << 8) | (R) ) - - -/* - * Like PACK_8A8B8G8R() but don't use alpha. This is usually an acceptable - * shortcut. - */ -#define PACK_8B8G8R( R, G, B ) ( ((B) << 16) | ((G) << 8) | (R) ) - - - -/* - * If pixelformat==PF_8R8G8B: - */ -#define PACK_8R8G8B( R, G, B) ( ((R) << 16) | ((G) << 8) | (B) ) - - -/* - * If pixelformat==PF_5R6G5B: - */ -#define PACK_5R6G5B( R, G, B) ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) ) - - - - -/* - * If pixelformat==PF_DITHER: - * - * Improved 8-bit RGB dithering code contributed by Bob Mercier - * (mercier@hollywood.cinenet.net). Thanks Bob! - */ -#ifdef DITHER666 -# define DITH_R 6 -# define DITH_G 6 -# define DITH_B 6 -# define DITH_MIX(r,g,b) (((r) * DITH_G + (g)) * DITH_B + (b)) -#else -# define DITH_R 5 -# define DITH_G 9 -# define DITH_B 5 -# define DITH_MIX(r,g,b) (((g) << 6) | ((b) << 3) | (r)) -#endif -#define DITH_DX 4 -#define DITH_DY 4 -#define DITH_N (DITH_DX * DITH_DY) - -/*#define _dither(C,c,d) (((unsigned)((DITH_N*(C-1)+1)*c+d))/(DITH_N*256))*/ -#define _dither(C, c, d) (((unsigned)((DITH_N * (C - 1) + 1) * c + d)) >> 12) - -#define MAXC 256 -static int kernel8[DITH_DY * DITH_DX] = { - 0 * MAXC, 8 * MAXC, 2 * MAXC, 10 * MAXC, - 12 * MAXC, 4 * MAXC, 14 * MAXC, 6 * MAXC, - 3 * MAXC, 11 * MAXC, 1 * MAXC, 9 * MAXC, - 15 * MAXC, 7 * MAXC, 13 * MAXC, 5 * MAXC, -}; - -/* Dither for random X,Y */ -#define DITHER_SETUP \ - int __d; \ - unsigned long *ctable = xmesa->xm_buffer->color_table; - -#define DITHER( X, Y, R, G, B ) \ - (__d = kernel8[(((Y)&3)<<2) | ((X)&3)], \ - ctable[DITH_MIX(_dither(DITH_R, (R), __d), \ - _dither(DITH_G, (G), __d), \ - _dither(DITH_B, (B), __d))]) - -/* Dither for random X, fixed Y */ -#define XDITHER_SETUP(Y) \ - int __d; \ - unsigned long *ctable = xmesa->xm_buffer->color_table; \ - int *kernel = &kernel8[ ((Y)&3) << 2 ]; - -#define XDITHER( X, R, G, B ) \ - (__d = kernel[(X)&3], \ - ctable[DITH_MIX(_dither(DITH_R, (R), __d), \ - _dither(DITH_G, (G), __d), \ - _dither(DITH_B, (B), __d))]) - - - -/* - * Dithering for flat-shaded triangles. Precompute all 16 possible - * pixel values given the triangle's RGB color. Contributed by Martin Shenk. - */ -static GLushort DitherValues[16]; /* array of (up to) 16-bit pixel values */ - -#define FLAT_DITHER_SETUP( R, G, B ) \ - { \ - unsigned long *ctable = xmesa->xm_buffer->color_table; \ - int msdr = (DITH_N*((DITH_R)-1)+1) * (R); \ - int msdg = (DITH_N*((DITH_G)-1)+1) * (G); \ - int msdb = (DITH_N*((DITH_B)-1)+1) * (B); \ - int i; \ - for (i=0;i<16;i++) { \ - int k = kernel8[i]; \ - int j = DITH_MIX( (msdr+k)>>12, (msdg+k)>>12, (msdb+k)>>12 ); \ - DitherValues[i] = (GLushort) ctable[j]; \ - } \ - } - -#define FLAT_DITHER_ROW_SETUP(Y) \ - GLushort *ditherRow = DitherValues + ( ((Y)&3) << 2); - -#define FLAT_DITHER(X) ditherRow[(X)&3] - - - -/* - * If pixelformat==PF_LOOKUP: - */ -#define _dither_lookup(C, c) (((unsigned)((DITH_N * (C - 1) + 1) * c)) >> 12) - -#define LOOKUP_SETUP \ - unsigned long *ctable = xmesa->xm_buffer->color_table - -#define LOOKUP( R, G, B ) \ - ctable[DITH_MIX(_dither_lookup(DITH_R, (R)), \ - _dither_lookup(DITH_G, (G)), \ - _dither_lookup(DITH_B, (B)))] - - - -/* - * If pixelformat==PF_HPCR: - * - * HP Color Recovery dithering (ad@lms.be 30/08/95) - * HP has on it's 8-bit 700-series computers, a feature called - * 'Color Recovery'. This allows near 24-bit output (so they say). - * It is enabled by selecting the 8-bit TrueColor visual AND - * corresponding colormap (see tkInitWindow) AND doing some special - * dither. - */ -static const short HPCR_DRGB[3][2][16] = { -{ - { 16, -4, 1,-11, 14, -6, 3, -9, 15, -5, 2,-10, 13, -7, 4, -8}, - {-15, 5, 0, 12,-13, 7, -2, 10,-14, 6, -1, 11,-12, 8, -3, 9} -}, -{ - {-11, 15, -7, 3, -8, 14, -4, 2,-10, 16, -6, 4, -9, 13, -5, 1}, - { 12,-14, 8, -2, 9,-13, 5, -1, 11,-15, 7, -3, 10,-12, 6, 0} -}, -{ - { 6,-18, 26,-14, 2,-22, 30,-10, 8,-16, 28,-12, 4,-20, 32, -8}, - { -4, 20,-24, 16, 0, 24,-28, 12, -6, 18,-26, 14, -2, 22,-30, 10} -} -}; - -#define DITHER_HPCR( X, Y, R, G, B ) \ - ( ((xmesa->xm_visual->hpcr_rgbTbl[0][R] + HPCR_DRGB[0][(Y)&1][(X)&15]) & 0xE0) \ - |(((xmesa->xm_visual->hpcr_rgbTbl[1][G] + HPCR_DRGB[1][(Y)&1][(X)&15]) & 0xE0)>>3) \ - | ((xmesa->xm_visual->hpcr_rgbTbl[2][B] + HPCR_DRGB[2][(Y)&1][(X)&15])>>6) \ - ) - - - -/* - * If pixelformat==PF_1BIT: - */ -static int const kernel1[16] = { - 0*47, 9*47, 4*47, 12*47, /* 47 = (255*3)/16 */ - 6*47, 2*47, 14*47, 8*47, - 10*47, 1*47, 5*47, 11*47, - 7*47, 13*47, 3*47, 15*47 }; - -#define SETUP_1BIT int bitFlip = xmesa->xm_visual->bitFlip -#define DITHER_1BIT( X, Y, R, G, B ) \ - (( ((int)(R)+(int)(G)+(int)(B)) > kernel1[(((Y)&3) << 2) | ((X)&3)] ) ^ bitFlip) - - - -/* - * If pixelformat==PF_GRAYSCALE: - */ -#define GRAY_RGB( R, G, B ) xmesa->xm_buffer->color_table[((R) + (G) + (B))/3] - - - -#define XIMAGE None - - -/* - * Converts a GL window Y coord to an X window Y coord: - */ -#define FLIP(BUFFER, Y) ((BUFFER)->bottom-(Y)) - - -/* - * Return the address of a 1, 2 or 4-byte pixel in the back XImage: - * X==0 is left, Y==0 is bottom. - */ -#define PIXELADDR1( BUFFER, X, Y ) \ - ( (BUFFER)->ximage_origin1 - (Y) * (BUFFER)->ximage_width1 + (X) ) - -#define PIXELADDR2( BUFFER, X, Y ) \ - ( (BUFFER)->ximage_origin2 - (Y) * (BUFFER)->ximage_width2 + (X) ) - -#define PIXELADDR3( BUFFER, X, Y ) \ - ( (bgr_t *) ( (BUFFER)->ximage_origin3 - (Y) * (BUFFER)->ximage_width3 + 3 * (X) )) - -#define PIXELADDR4( BUFFER, X, Y ) \ - ( (BUFFER)->ximage_origin4 - (Y) * (BUFFER)->ximage_width4 + (X) ) - - - -/* - * External functions: - */ - -extern unsigned long -xmesa_color_to_pixel( XMesaContext xmesa, - GLubyte r, GLubyte g, GLubyte b, GLubyte a, - GLuint pixelFormat ); - -extern void xmesa_alloc_back_buffer( XMesaBuffer b ); - -extern void xmesa_init_pointers( GLcontext *ctx ); -extern void xmesa_update_state( GLcontext *ctx, GLuint new_state ); - -extern void xmesa_update_span_funcs( GLcontext *ctx ); - -/* Plugged into the software rasterizer. Try to use internal - * swrast-style point, line and triangle functions. - */ -extern void xmesa_choose_point( GLcontext *ctx ); -extern void xmesa_choose_line( GLcontext *ctx ); -extern void xmesa_choose_triangle( GLcontext *ctx ); - - -extern void xmesa_register_swrast_functions( GLcontext *ctx ); - - - -/* XXX this is a hack to implement shared display lists with 3Dfx */ -extern XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, - XMesaWindow w, - XMesaContext c - ); - -/* - * These are the extra routines required for integration with XFree86. - * None of these routines should be user visible. -KEM - */ -extern void XMesaSetVisualDisplay( XMesaDisplay *dpy, XMesaVisual v ); -extern GLboolean XMesaForceCurrent(XMesaContext c); -extern GLboolean XMesaLoseCurrent(XMesaContext c); -extern void XMesaReset( void ); - -extern void xmesa_resize_buffers( GLframebuffer *buffer ); - - -#endif Index: xc/extras/Mesa/src/X86/3dnow.c diff -u xc/extras/Mesa/src/X86/3dnow.c:1.11 xc/extras/Mesa/src/X86/3dnow.c:removed --- xc/extras/Mesa/src/X86/3dnow.c:1.11 Sun Sep 28 15:17:07 2003 +++ xc/extras/Mesa/src/X86/3dnow.c Wed Mar 16 21:00:48 2005 @@ -1,91 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * 3DNow! optimizations contributed by - * Holger Waechtler - */ - -#include "glheader.h" -#include "context.h" -#include "math/m_xform.h" -#include "tnl/t_context.h" - -#include "3dnow.h" -#include "common_x86_macros.h" - -#ifdef DEBUG -#include "math/m_debug.h" -#endif - - -#ifdef USE_3DNOW_ASM -DECLARE_XFORM_GROUP( 3dnow, 2 ) -DECLARE_XFORM_GROUP( 3dnow, 3 ) -DECLARE_XFORM_GROUP( 3dnow, 4 ) - -DECLARE_NORM_GROUP( 3dnow ) - - -extern void _ASMAPI -_mesa_v16_3dnow_general_xform( GLfloat *first_vert, - const GLfloat *m, - const GLfloat *src, - GLuint src_stride, - GLuint count ); - -extern void _ASMAPI -_mesa_3dnow_project_vertices( GLfloat *first, - GLfloat *last, - const GLfloat *m, - GLuint stride ); - -extern void _ASMAPI -_mesa_3dnow_project_clipped_vertices( GLfloat *first, - GLfloat *last, - const GLfloat *m, - GLuint stride, - const GLubyte *clipmask ); -#endif - - -void _mesa_init_3dnow_transform_asm( void ) -{ -#ifdef USE_3DNOW_ASM - ASSIGN_XFORM_GROUP( 3dnow, 2 ); - ASSIGN_XFORM_GROUP( 3dnow, 3 ); - ASSIGN_XFORM_GROUP( 3dnow, 4 ); - - /* There's a bug somewhere in the 3dnow_normal.S file that causes - * bad shading. Disable for now. - ASSIGN_NORM_GROUP( 3dnow ); - */ - -#ifdef DEBUG - _math_test_all_transform_functions( "3DNow!" ); - _math_test_all_normal_transform_functions( "3DNow!" ); -#endif -#endif -} Index: xc/extras/Mesa/src/X86/3dnow.h diff -u xc/extras/Mesa/src/X86/3dnow.h:1.7 xc/extras/Mesa/src/X86/3dnow.h:removed --- xc/extras/Mesa/src/X86/3dnow.h:1.7 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/3dnow.h Wed Mar 16 21:00:48 2005 @@ -1,38 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * 3DNow! optimizations contributed by - * Holger Waechtler - */ - -#ifndef __3DNOW_H__ -#define __3DNOW_H__ - -#include "math/m_xform.h" - -void _mesa_init_3dnow_transform_asm( void ); - -#endif Index: xc/extras/Mesa/src/X86/3dnow_normal.S diff -u xc/extras/Mesa/src/X86/3dnow_normal.S:1.4 xc/extras/Mesa/src/X86/3dnow_normal.S:removed --- xc/extras/Mesa/src/X86/3dnow_normal.S:1.4 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/3dnow_normal.S Wed Mar 16 21:00:48 2005 @@ -1,836 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/X86/3dnow_normal.S,v 1.4 2003/09/28 19:17:08 alanh Exp $ */ - -/* - * 3Dnow assembly code by Holger Waechtler - */ - -#include "matypes.h" -#include "norm_args.h" - - SEG_TEXT - -#define M(i) REGOFF(i * 4, ECX) -#define STRIDE REGOFF(12, ESI) - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_normalize_normals) -GLNAME(_mesa_3dnow_transform_normalize_normals): - -#define FRAME_OFFSET 12 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - PUSH_L ( EBP ) - - MOV_L ( ARG_LENGTHS, EDI ) - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */ - MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - - CMP_L ( CONST(0), EBP ) /* count > 0 ?? */ - JE ( LLBL (G3TN_end) ) - - MOV_L ( REGOFF (V3F_COUNT, ESI), EBP ) - FEMMS - - PUSH_L ( EBP ) - PUSH_L ( EAX ) - PUSH_L ( EDX ) /* save counter & pointer for */ - /* the normalize pass */ -#undef FRAME_OFFSET -#define FRAME_OFFSET 24 - - MOVQ ( M(0), MM3 ) /* m1 | m0 */ - MOVQ ( M(4), MM4 ) /* m5 | m4 */ - - MOVD ( M(2), MM5 ) /* | m2 */ - PUNPCKLDQ ( M(6), MM5 ) /* m6 | m2 */ - - MOVQ ( M(8), MM6 ) /* m9 | m8 */ - MOVQ ( M(10), MM7 ) /* | m10 */ - - CMP_L ( CONST(0), EDI ) /* lengths == 0 ? */ - JNE ( LLBL (G3TN_scale_end ) ) - - MOVD ( ARG_SCALE, MM0 ) /* | scale */ - PUNPCKLDQ ( MM0, MM0 ) /* scale | scale */ - - PFMUL ( MM0, MM3 ) /* scale * m1 | scale * m0 */ - PFMUL ( MM0, MM4 ) /* scale * m5 | scale * m4 */ - PFMUL ( MM0, MM5 ) /* scale * m6 | scale * m2 */ - PFMUL ( MM0, MM6 ) /* scale * m9 | scale * m8 */ - PFMUL ( MM0, MM7 ) /* | scale * m10 */ - -ALIGNTEXT32 -LLBL (G3TN_scale_end): -LLBL (G3TN_transform): - MOVQ ( REGIND (EDX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF (8, EDX), MM2 ) /* | x2 */ - - MOVQ ( MM0, MM1 ) /* x1 | x0 */ - PUNPCKLDQ ( MM2, MM2 ) /* x2 | x2 */ - - PFMUL ( MM3, MM0 ) /* x1*m1 | x0*m0 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PREFETCHW ( REGIND(EAX) ) - - PFMUL ( MM4, MM1 ) /* x1*m5 | x0*m4 */ - PFACC ( MM1, MM0 ) /* x0*m4+x1*m5 | x0*m0+x1*m1 */ - - PFMUL ( MM5, MM2 ) /* x2*m6 | x2*m2 */ - PFADD ( MM2, MM0 ) /* x0*m4+x1*m5+x2*m6| x0*m0+...+x2**/ - - MOVQ ( REGIND (EDX), MM1 ) /* x1 | x0 */ - MOVQ ( MM0, REGOFF(-16, EAX) ) /* write r0, r1 */ - - PFMUL ( MM6, MM1 ) /* x1*m9 | x0*m8 */ - MOVD ( REGOFF (8, EDX), MM2 ) /* | x2 */ - - PFMUL ( MM7, MM2 ) /* | x2*m10 */ - PFACC ( MM1, MM1 ) /* *not used* | x0*m8+x1*m9 */ - - PFADD ( MM2, MM1 ) /* *not used* | x0*m8+x1*m9+x2*m*/ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - MOVD ( MM1, REGOFF(-8, EAX) ) /* write r2 */ - DEC_L ( EBP ) /* decrement normal counter */ - JA ( LLBL (G3TN_transform) ) - - - POP_L ( EDX ) /* end of transform --- */ - POP_L ( EAX ) /* now normalizing ... */ - POP_L ( EBP ) - - CMP_L ( CONST(0), EDI ) /* lengths == 0 ? */ - JE ( LLBL (G3TN_norm ) ) /* calculate lengths */ - - -ALIGNTEXT32 -LLBL (G3TN_norm_w_lengths): - - PREFETCHW ( REGOFF(12,EAX) ) - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM1 ) /* | x2 */ - - MOVD ( REGIND (EDI), MM3 ) /* | length (x) */ - PFMUL ( MM3, MM1 ) /* | x2 (normalize*/ - - PUNPCKLDQ ( MM3, MM3 ) /* length (x) | length (x) */ - PFMUL ( MM3, MM0 ) /* x1 (normalized) | x0 (normalize*/ - - ADD_L ( STRIDE, EDX ) /* next normal */ - ADD_L ( CONST(4), EDI ) /* next length */ - - PREFETCH ( REGIND(EDI) ) - - MOVQ ( MM0, REGIND(EAX) ) /* write new x0, x1 */ - MOVD ( MM1, REGOFF(8, EAX) ) /* write new x2 */ - - ADD_L ( CONST(16), EAX ) /* next r */ - DEC_L ( EBP ) /* decrement normal counter */ - - JA ( LLBL (G3TN_norm_w_lengths) ) - JMP ( LLBL (G3TN_exit_3dnow) ) - -ALIGNTEXT32 -LLBL (G3TN_norm): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND (EAX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM1 ) /* | x2 */ - - MOVQ ( MM0, MM3 ) /* x1 | x0 */ - MOVQ ( MM1, MM4 ) /* | x2 */ - - PFMUL ( MM0, MM3 ) /* x1*x1 | x0*x0 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PFMUL ( MM1, MM4 ) /* | x2*x2 */ - PFADD ( MM4, MM3 ) /* | x0*x0+x2*x2 */ - - PFACC ( MM3, MM3 ) /* **not used** | x0*x0+x1*x1+x2**/ - PFRSQRT ( MM3, MM5 ) /* 1/sqrt (x0*x0+x1*x1+x2*x2) */ - - MOVQ ( MM5, MM4 ) - PUNPCKLDQ ( MM3, MM3 ) - - DEC_L ( EBP ) /* decrement normal counter */ - PFMUL ( MM5, MM5 ) - - PFRSQIT1 ( MM3, MM5 ) - PFRCPIT2 ( MM4, MM5 ) - - PFMUL ( MM5, MM0 ) /* x1 (normalized) | x0 (normalize*/ - - MOVQ ( MM0, REGOFF(-16, EAX) ) /* write new x0, x1 */ - PFMUL ( MM5, MM1 ) /* | x2 (normalize*/ - - MOVD ( MM1, REGOFF(-8, EAX) ) /* write new x2 */ - JA ( LLBL (G3TN_norm) ) - -LLBL (G3TN_exit_3dnow): - FEMMS - -LLBL (G3TN_end): - POP_L ( EBP ) - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_normalize_normals_no_rot) -GLNAME(_mesa_3dnow_transform_normalize_normals_no_rot): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 12 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - PUSH_L ( EBP ) - - MOV_L ( ARG_LENGTHS, EDI ) - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */ - MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - - CMP_L ( CONST(0), EBP ) /* count > 0 ?? */ - JE ( LLBL (G3TNNR_end) ) - - FEMMS - - MOVD ( M(0), MM0 ) /* | m0 */ - PUNPCKLDQ ( M(5), MM0 ) /* m5 | m0 */ - - MOVD ( M(10), MM2 ) /* | m10 */ - PUNPCKLDQ ( MM2, MM2 ) /* m10 | m10 */ - - CMP_L ( CONST(0), EDI ) /* lengths == 0 ? */ - JNE ( LLBL (G3TNNR_scale_end ) ) - - MOVD ( ARG_SCALE, MM7 ) /* | scale */ - PUNPCKLDQ ( MM7, MM7 ) /* scale | scale */ - - PFMUL ( MM7, MM0 ) /* scale * m5 | scale * m0 */ - PFMUL ( MM7, MM2 ) /* scale * m10 | scale * m10 */ - -ALIGNTEXT32 -LLBL (G3TNNR_scale_end): - CMP_L ( CONST(0), EDI ) /* lengths == 0 ? */ - JE ( LLBL (G3TNNR_norm) ) /* need to calculate lengths */ - - MOVD ( REGIND(EDI), MM3 ) /* | length (x) */ - - -ALIGNTEXT32 -LLBL (G3TNNR_norm_w_lengths): /* use precalculated lengths */ - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM6 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM7 ) /* | x2 */ - - PFMUL ( MM0, MM6 ) /* x1*m5 | x0*m0 */ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - PFMUL ( MM2, MM7 ) /* | x2*m10 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PFMUL ( MM3, MM7 ) /* | x2 (normalized) */ - PUNPCKLDQ ( MM3, MM3 ) /* length (x) | length (x) */ - - ADD_L ( CONST(4), EDI ) /* next length */ - PFMUL ( MM3, MM6 ) /* x1 (normalized) | x0 (normalized) */ - - DEC_L ( EBP ) /* decrement normal counter */ - MOVQ ( MM6, REGOFF(-16, EAX) ) /* write r0, r1 */ - - MOVD ( MM7, REGOFF(-8, EAX) ) /* write r2 */ - MOVD ( REGIND(EDI), MM3 ) /* | length (x) */ - - JA ( LLBL (G3TNNR_norm_w_lengths) ) - JMP ( LLBL (G3TNNR_exit_3dnow) ) - -ALIGNTEXT32 -LLBL (G3TNNR_norm): /* need to calculate lengths */ - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM6 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM7 ) /* | x2 */ - - PFMUL ( MM0, MM6 ) /* x1*m5 | x0*m0 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PFMUL ( MM2, MM7 ) /* | x2*m10 */ - MOVQ ( MM6, MM3 ) /* x1 (transformed)| x0 (transformed) */ - - MOVQ ( MM7, MM4 ) /* | x2 (transformed) */ - PFMUL ( MM6, MM3 ) /* x1*x1 | x0*x0 */ - - - PFMUL ( MM7, MM4 ) /* | x2*x2 */ - PFACC ( MM3, MM3 ) /* **not used** | x0*x0+x1*x1 */ - - PFADD ( MM4, MM3 ) /* | x0*x0+x1*x1+x2*x2*/ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - PFRSQRT ( MM3, MM5 ) /* 1/sqrt (x0*x0+x1*x1+x2*x2) */ - MOVQ ( MM5, MM4 ) - - PUNPCKLDQ ( MM3, MM3 ) - PFMUL ( MM5, MM5 ) - - PFRSQIT1 ( MM3, MM5 ) - DEC_L ( EBP ) /* decrement normal counter */ - - PFRCPIT2 ( MM4, MM5 ) - PFMUL ( MM5, MM6 ) /* x1 (normalized) | x0 (normalized) */ - - MOVQ ( MM6, REGOFF(-16, EAX) ) /* write r0, r1 */ - PFMUL ( MM5, MM7 ) /* | x2 (normalized) */ - - MOVD ( MM7, REGOFF(-8, EAX) ) /* write r2 */ - JA ( LLBL (G3TNNR_norm) ) - - -LLBL (G3TNNR_exit_3dnow): - FEMMS - -LLBL (G3TNNR_end): - POP_L ( EBP ) - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_rescale_normals_no_rot) -GLNAME(_mesa_3dnow_transform_rescale_normals_no_rot): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 12 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - PUSH_L ( EBP ) - - MOV_L ( ARG_IN, EAX ) - MOV_L ( ARG_DEST, EDX ) - MOV_L ( REGOFF(V3F_COUNT, EAX), EBP ) /* dest->count = in->count */ - MOV_L ( EBP, REGOFF(V3F_COUNT, EDX) ) - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - MOV_L ( REGOFF(V3F_START, EDX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - - CMP_L ( CONST(0), EBP ) - JE ( LLBL (G3TRNR_end) ) - - FEMMS - - MOVD ( ARG_SCALE, MM6 ) /* | scale */ - PUNPCKLDQ ( MM6, MM6 ) /* scale | scale */ - - MOVD ( REGIND(ECX), MM0 ) /* | m0 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m5 | m0 */ - - PFMUL ( MM6, MM0 ) /* scale*m5 | scale*m0 */ - MOVD ( REGOFF(40, ECX), MM2 ) /* | m10 */ - - PFMUL ( MM6, MM2 ) /* | scale*m10 */ - -ALIGNTEXT32 -LLBL (G3TRNR_rescale): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM4 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM5 ) /* | x2 */ - - PFMUL ( MM0, MM4 ) /* x1*m5 | x0*m0 */ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - PFMUL ( MM2, MM5 ) /* | x2*m10 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - DEC_L ( EBP ) /* decrement normal counter */ - MOVQ ( MM4, REGOFF(-16, EAX) ) /* write r0, r1 */ - - MOVD ( MM5, REGOFF(-8, EAX) ) /* write r2 */ - JA ( LLBL (G3TRNR_rescale) ) /* cnt > 0 ? -> process next normal */ - - FEMMS - -LLBL (G3TRNR_end): - POP_L ( EBP ) - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_rescale_normals) -GLNAME(_mesa_3dnow_transform_rescale_normals): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 8 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */ - MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - - CMP_L ( CONST(0), EDI ) - JE ( LLBL (G3TR_end) ) - - FEMMS - - MOVQ ( REGIND(ECX), MM3 ) /* m1 | m0 */ - - MOVQ ( REGOFF(16,ECX), MM4 ) /* m5 | m4 */ - MOVD ( ARG_SCALE, MM0 ) /* scale */ - - MOVD ( REGOFF(8,ECX), MM5 ) /* | m2 */ - PUNPCKLDQ ( MM0, MM0 ) /* scale | scale */ - - PUNPCKLDQ ( REGOFF(24, ECX), MM5 ) - PFMUL ( MM0, MM3 ) /* scale*m1 | scale*m0 */ - - MOVQ ( REGOFF(32, ECX), MM6 ) /* m9 | m8*/ - PFMUL ( MM0, MM4 ) /* scale*m5 | scale*m4 */ - - MOVD ( REGOFF(40, ECX), MM7 ) /* | m10 */ - PFMUL ( MM0, MM5 ) /* scale*m6 | scale*m2 */ - - PFMUL ( MM0, MM6 ) /* scale*m9 | scale*m8 */ - - PFMUL ( MM0, MM7 ) /* | scale*m10 */ - -ALIGNTEXT32 -LLBL (G3TR_rescale): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM2 ) /* | x2 */ - - MOVQ ( MM0, MM1 ) /* x1 | x0 */ - PUNPCKLDQ ( MM2, MM2 ) /* x2 | x2 */ - - PFMUL ( MM3, MM0 ) /* x1*m1 | x0*m0 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PFMUL ( MM4, MM1 ) /* x1*m5 | x0*m4 */ - PFACC ( MM1, MM0 ) /* x0*m4+x1*m5 | x0*m0+x1*m1 */ - - MOVQ ( REGIND(EDX), MM1 ) /* x1 | x0 */ - - PFMUL ( MM5, MM2 ) /* x2*m6 | x2*m2 */ - PFADD ( MM2, MM0 ) /* x0*m4...+x2*m6| x0*m0+x1*m1+x2*m2 */ - - MOVD ( REGOFF(8, EDX), MM2 ) /* | x2 */ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - MOVQ ( MM0, REGOFF(-16, EAX) ) /* write r0, r1 */ - PFMUL ( MM6, MM1 ) /* x1*m9 | x0*m8 */ - - PFMUL ( MM7, MM2 ) /* | x2*m10 */ - PFACC ( MM1, MM1 ) /* *not used* | x0*m8+x1*m9 */ - - PFADD ( MM2, MM1 ) /* *not used* | x0*m8+x1*m9+x2*m10 */ - MOVD ( MM1, REGOFF(-8, EAX) ) /* write r2 */ - - DEC_L ( EDI ) /* decrement normal counter */ - JA ( LLBL (G3TR_rescale) ) - - FEMMS - -LLBL (G3TR_end): - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_normals_no_rot) -GLNAME(_mesa_3dnow_transform_normals_no_rot): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 8 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */ - MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - - CMP_L ( CONST(0), EDI ) - JE ( LLBL (G3TNR_end) ) - - FEMMS - - MOVD ( REGIND(ECX), MM0 ) /* | m0 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m5 | m0 */ - - MOVD ( REGOFF(40, ECX), MM2 ) /* | m10 */ - PUNPCKLDQ ( MM2, MM2 ) /* m10 | m10 */ - -ALIGNTEXT32 -LLBL (G3TNR_transform): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM4 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM5 ) /* | x2 */ - - PFMUL ( MM0, MM4 ) /* x1*m5 | x0*m0 */ - ADD_L ( STRIDE, EDX) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - PFMUL ( MM2, MM5 ) /* | x2*m10 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - DEC_L ( EDI ) /* decrement normal counter */ - MOVQ ( MM4, REGOFF(-16, EAX) ) /* write r0, r1 */ - - MOVD ( MM5, REGOFF(-8, EAX) ) /* write r2 */ - JA ( LLBL (G3TNR_transform) ) - - FEMMS - -LLBL (G3TNR_end): - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_transform_normals) -GLNAME(_mesa_3dnow_transform_normals): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 8 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( ARG_MAT, ECX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */ - MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */ - MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */ - - CMP_L ( CONST(0), EDI ) /* count > 0 ?? */ - JE ( LLBL (G3T_end) ) - - FEMMS - - MOVQ ( REGIND(ECX), MM3 ) /* m1 | m0 */ - MOVQ ( REGOFF(16, ECX), MM4 ) /* m5 | m4 */ - - MOVD ( REGOFF(8, ECX), MM5 ) /* | m2 */ - PUNPCKLDQ ( REGOFF(24, ECX), MM5 ) /* m6 | m2 */ - - MOVQ ( REGOFF(32, ECX), MM6 ) /* m9 | m8 */ - MOVD ( REGOFF(40, ECX), MM7 ) /* | m10 */ - -ALIGNTEXT32 -LLBL (G3T_transform): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(EDX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EDX), MM2 ) /* | x2 */ - - MOVQ ( MM0, MM1 ) /* x1 | x0 */ - PUNPCKLDQ ( MM2, MM2 ) /* x2 | x2 */ - - PFMUL ( MM3, MM0 ) /* x1*m1 | x0*m0 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - PFMUL ( MM4, MM1 ) /* x1*m5 | x0*m4 */ - PFACC ( MM1, MM0 ) /* x0*m4+x1*m5 | x0*m0+x1*m1 */ - - PFMUL ( MM5, MM2 ) /* x2*m6 | x2*m2 */ - PFADD ( MM2, MM0 ) /* x0*m4...+x2*m6| x0*m0+x1*m1+x2*m2 */ - - MOVQ ( REGIND(EDX), MM1 ) /* x1 | x0 */ - MOVQ ( MM0, REGOFF(-16, EAX) ) /* write r0, r1 */ - - PFMUL ( MM6, MM1 ) /* x1*m9 | x0*m8 */ - MOVD ( REGOFF(8, EDX), MM2 ) /* | x2 */ - - PFMUL ( MM7, MM2 ) /* | x2*m10 */ - ADD_L ( STRIDE, EDX ) /* next normal */ - - PREFETCH ( REGIND(EDX) ) - - PFACC ( MM1, MM1 ) /* *not used* | x0*m8+x1*m9 */ - PFADD ( MM2, MM1 ) /* *not used* | x0*m8+x1*m9+x2*m10 */ - - MOVD ( MM1, REGOFF(-8, EAX) ) /* write r2 */ - DEC_L ( EDI ) /* decrement normal counter */ - - JA ( LLBL (G3T_transform) ) - - FEMMS - -LLBL (G3T_end): - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_normalize_normals) -GLNAME(_mesa_3dnow_normalize_normals): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 12 - - PUSH_L ( EDI ) - PUSH_L ( ESI ) - PUSH_L ( EBP ) - - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */ - MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), ECX ) /* in->start */ - MOV_L ( ARG_LENGTHS, EDX ) - - CMP_L ( CONST(0), EBP ) /* count > 0 ?? */ - JE ( LLBL (G3N_end) ) - - FEMMS - - CMP_L ( CONST(0), EDX ) /* lengths == 0 ? */ - JE ( LLBL (G3N_norm2) ) /* calculate lengths */ - -ALIGNTEXT32 -LLBL (G3N_norm1): /* use precalculated lengths */ - - PREFETCH ( REGIND(EAX) ) - - MOVQ ( REGIND(ECX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, ECX), MM1 ) /* | x2 */ - - MOVD ( REGIND(EDX), MM3 ) /* | length (x) */ - PFMUL ( MM3, MM1 ) /* | x2 (normalized) */ - - PUNPCKLDQ ( MM3, MM3 ) /* length (x) | length (x) */ - ADD_L ( STRIDE, ECX ) /* next normal */ - - PREFETCH ( REGIND(ECX) ) - - PFMUL ( MM3, MM0 ) /* x1 (normalized) | x0 (normalized) */ - MOVQ ( MM0, REGIND(EAX) ) /* write new x0, x1 */ - - MOVD ( MM1, REGOFF(8, EAX) ) /* write new x2 */ - ADD_L ( CONST(16), EAX ) /* next r */ - - ADD_L ( CONST(4), EDX ) /* next length */ - DEC_L ( EBP ) /* decrement normal counter */ - - JA ( LLBL (G3N_norm1) ) - - JMP ( LLBL (G3N_end1) ) - -ALIGNTEXT32 -LLBL (G3N_norm2): /* need to calculate lengths */ - - PREFETCHW ( REGIND(EAX) ) - - PREFETCH ( REGIND(ECX) ) - - MOVQ ( REGIND(ECX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, ECX), MM1 ) /* | x2 */ - - MOVQ ( MM0, MM3 ) /* x1 | x0 */ - ADD_L ( STRIDE, ECX ) /* next normal */ - - PFMUL ( MM0, MM3 ) /* x1*x1 | x0*x0 */ - MOVQ ( MM1, MM4 ) /* | x2 */ - - ADD_L ( CONST(16), EAX ) /* next r */ - PFMUL ( MM1, MM4 ) /* | x2*x2 */ - - PFADD ( MM4, MM3 ) /* | x0*x0+x2*x2 */ - PFACC ( MM3, MM3 ) /* x0*x0+...+x2*x2 | x0*x0+x1*x1+x2*x2*/ - - PFRSQRT ( MM3, MM5 ) /* 1/sqrt (x0*x0+x1*x1+x2*x2) */ - MOVQ ( MM5, MM4 ) - - PUNPCKLDQ ( MM3, MM3 ) - PFMUL ( MM5, MM5 ) - - PFRSQIT1 ( MM3, MM5 ) - DEC_L ( EBP ) /* decrement normal counter */ - - PFRCPIT2 ( MM4, MM5 ) - - PFMUL ( MM5, MM0 ) /* x1 (normalized) | x0 (normalized) */ - MOVQ ( MM0, REGOFF(-16, EAX) ) /* write new x0, x1 */ - - PFMUL ( MM5, MM1 ) /* | x2 (normalized) */ - MOVD ( MM1, REGOFF(-8, EAX) ) /* write new x2 */ - - JA ( LLBL (G3N_norm2) ) - -LLBL (G3N_end1): - FEMMS - -LLBL (G3N_end): - POP_L ( EBP ) - POP_L ( ESI ) - POP_L ( EDI ) - RET - - - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_3dnow_rescale_normals) -GLNAME(_mesa_3dnow_rescale_normals): - -#undef FRAME_OFFSET -#define FRAME_OFFSET 8 - PUSH_L ( EDI ) - PUSH_L ( ESI ) - - MOV_L ( ARG_IN, ESI ) - MOV_L ( ARG_DEST, EAX ) - MOV_L ( REGOFF(V3F_COUNT, ESI), EDX ) /* dest->count = in->count */ - MOV_L ( EDX, REGOFF(V3F_COUNT, EAX) ) - MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */ - MOV_L ( REGOFF(V3F_START, ESI), ECX ) /* in->start */ - - CMP_L ( CONST(0), EDX ) - JE ( LLBL (G3R_end) ) - - FEMMS - - MOVD ( ARG_SCALE, MM0 ) /* scale */ - PUNPCKLDQ ( MM0, MM0 ) - -ALIGNTEXT32 -LLBL (G3R_rescale): - - PREFETCHW ( REGIND(EAX) ) - - MOVQ ( REGIND(ECX), MM1 ) /* x1 | x0 */ - MOVD ( REGOFF(8, ECX), MM2 ) /* | x2 */ - - PFMUL ( MM0, MM1 ) /* x1*scale | x0*scale */ - ADD_L ( STRIDE, ECX ) /* next normal */ - - PREFETCH ( REGIND(ECX) ) - - PFMUL ( MM0, MM2 ) /* | x2*scale */ - ADD_L ( CONST(16), EAX ) /* next r */ - - MOVQ ( MM1, REGOFF(-16, EAX) ) /* write r0, r1 */ - MOVD ( MM2, REGOFF(-8, EAX) ) /* write r2 */ - - DEC_L ( EDX ) /* decrement normal counter */ - JA ( LLBL (G3R_rescale) ) - - FEMMS - -LLBL (G3R_end): - POP_L ( ESI ) - POP_L ( EDI ) - RET Index: xc/extras/Mesa/src/X86/3dnow_xform1.S diff -u xc/extras/Mesa/src/X86/3dnow_xform1.S:1.2 xc/extras/Mesa/src/X86/3dnow_xform1.S:removed --- xc/extras/Mesa/src/X86/3dnow_xform1.S:1.2 Mon Dec 16 11:18:32 2002 +++ xc/extras/Mesa/src/X86/3dnow_xform1.S Wed Mar 16 21:00:48 2005 @@ -1,422 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FRAME_OFFSET 4 - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_general ) -GLNAME( _mesa_3dnow_transform_points1_general ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPGR_3 ) ) - - MOVQ ( REGIND(ECX), MM0 ) /* m01 | m00 */ - MOVQ ( REGOFF(8, ECX), MM1 ) /* m03 | m02 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - MOVQ ( REGOFF(56, ECX), MM3 ) /* m33 | m32 */ - -ALIGNTEXT16 -LLBL( G3TPGR_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - PUNPCKLDQ ( MM4, MM4 ) /* x0 | x0 */ - - MOVQ ( MM4, MM5 ) /* x0 | x0 */ - PFMUL ( MM0, MM4 ) /* x0*m01 | x0*m00 */ - - PFMUL ( MM1, MM5 ) /* x0*m03 | x0*m02 */ - PFADD ( MM2, MM4 ) /* x0*m01+m31 | x0*m00+m30 */ - - PFADD ( MM3, MM5 ) /* x0*m03+m33 | x0*m02+m32 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - - MOVQ ( MM5, REGOFF(8, EDX) ) /* write r3, r2 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TPGR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPGR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_identity ) -GLNAME( _mesa_3dnow_transform_points1_identity ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(1), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_1), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPIR_4) ) - -ALIGNTEXT16 -LLBL( G3TPIR_3 ): - - MOVD ( REGIND(EAX), MM0 ) /* | x0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - MOVD ( MM0, REGIND(EDX) ) /* | r0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPIR_3 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPIR_4 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_3d_no_rot ) -GLNAME( _mesa_3dnow_transform_points1_3d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3NRR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TP3NRR_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - PFMUL ( MM0, MM4 ) /* | x0*m00 */ - - PFADD ( MM2, MM4 ) /* m31 | x0*m00+m30 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - - MOVD ( MM3, REGOFF(8, EDX) ) /* write r2 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP3NRR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3NRR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_perspective ) -GLNAME( _mesa_3dnow_transform_points1_perspective ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPPR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TPPR_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* 0 | x0 */ - PFMUL ( MM0, MM4 ) /* 0 | x0*m00 */ - - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - MOVQ ( MM3, REGOFF(8, EDX) ) /* write r2 (=m32), r3 (=0) */ - - ADD_L ( EDI, EAX ) /* next vertex */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPPR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPPR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_2d ) -GLNAME( _mesa_3dnow_transform_points1_2d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(2), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2R_3 ) ) - - MOVQ ( REGIND(ECX), MM0 ) /* m01 | m00 */ - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2R_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - PUNPCKLDQ ( MM4, MM4 ) /* x0 | x0 */ - - PFMUL ( MM0, MM4 ) /* x0*m01 | x0*m00 */ - PFADD ( MM2, MM4 ) /* x0*m01+m31 | x0*m00+m30 */ - - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP2R_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2R_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_2d_no_rot ) -GLNAME( _mesa_3dnow_transform_points1_2d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(2), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2NRR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2NRR_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - PFMUL ( MM0, MM4 ) /* | x0*m00 */ - PFADD ( MM2, MM4 ) /* m31 | x0*m00+m30 */ - - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP2NRR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2NRR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points1_3d ) -GLNAME( _mesa_3dnow_transform_points1_3d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(4, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3R_3 ) ) - - MOVQ ( REGIND(ECX), MM0 ) /* m01 | m00 */ - MOVD ( REGOFF(8, ECX), MM1 ) /* | m02 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TP3R_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - PUNPCKLDQ ( MM4, MM4 ) /* x0 | x0 */ - - MOVQ ( MM4, MM5 ) /* | x0 */ - PFMUL ( MM0, MM4 ) /* x0*m01 | x0*m00 */ - - PFMUL ( MM1, MM5 ) /* | x0*m02 */ - PFADD ( MM2, MM4 ) /* x0*m01+m31 | x0*m00+m30 */ - - PFADD ( MM3, MM5 ) /* | x0*m02+m32 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - - MOVD ( MM5, REGOFF(8, EDX) ) /* write r2 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP3R_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3R_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET Index: xc/extras/Mesa/src/X86/3dnow_xform2.S diff -u xc/extras/Mesa/src/X86/3dnow_xform2.S:1.2 xc/extras/Mesa/src/X86/3dnow_xform2.S:removed --- xc/extras/Mesa/src/X86/3dnow_xform2.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/3dnow_xform2.S Wed Mar 16 21:00:48 2005 @@ -1,463 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FRAME_OFFSET 4 - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_general ) -GLNAME( _mesa_3dnow_transform_points2_general ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPGR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(16, ECX), MM0 ) /* m10 | m00 */ - - MOVD ( REGOFF(4, ECX), MM1 ) /* | m01 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM1 ) /* m11 | m01 */ - - MOVD ( REGOFF(8, ECX), MM2 ) /* | m02 */ - PUNPCKLDQ ( REGOFF(24, ECX), MM2 ) /* m12 | m02 */ - - MOVD ( REGOFF(12, ECX), MM3 ) /* | m03 */ - PUNPCKLDQ ( REGOFF(28, ECX), MM3 ) /* m13 | m03 */ - - MOVQ ( REGOFF(48, ECX), MM4 ) /* m31 | m30 */ - MOVQ ( REGOFF(56, ECX), MM5 ) /* m33 | m32 */ - -ALIGNTEXT16 -LLBL( G3TPGR_2 ): - - MOVQ ( REGIND(EAX), MM6 ) /* x1 | x0 */ - MOVQ ( MM6, MM7 ) /* x1 | x0 */ - - PFMUL ( MM0, MM6 ) /* x1*m10 | x0*m00 */ - PFMUL ( MM1, MM7 ) /* x1*m11 | x0*m01 */ - - PFACC ( MM7, MM6 ) /* x0*m01+x1*m11 | x0*x00+x1*m10 */ - PFADD ( MM4, MM6 ) /* x0*...*m11+m31 | x0*...*m10+m30 */ - - MOVQ ( MM6, REGIND(EDX) ) /* write r1, r0 */ - MOVQ ( REGIND(EAX), MM6 ) /* x1 | x0 */ - - MOVQ ( MM6, MM7 ) /* x1 | x0 */ - PFMUL ( MM2, MM6 ) /* x1*m12 | x0*m02 */ - - PFMUL ( MM3, MM7 ) /* x1*m13 | x0*m03 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - PFACC ( MM7, MM6 ) /* x0*m03+x1*m13 | x0*x02+x1*m12 */ - PFADD ( MM5, MM6 ) /* x0*...*m13+m33 | x0*...*m12+m32 */ - - MOVQ ( MM6, REGOFF(8, EDX) ) /* write r3, r2 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPGR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPGR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_perspective ) -GLNAME( _mesa_3dnow_transform_points2_perspective ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPPR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TPPR_2 ): - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - MOVQ ( MM3, REGOFF(8, EDX) ) /* write r2 (=m32), r3 (=0) */ - - ADD_L ( EDI, EAX ) /* next vertex */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPPR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPPR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_3d ) -GLNAME( _mesa_3dnow_transform_points2_3d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3 ), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3R_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(16, ECX), MM0 ) /* m10 | m00 */ - - MOVD ( REGOFF(4, ECX), MM1 ) /* | m01 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM1 ) /* m11 | m01 */ - - MOVD ( REGOFF(8, ECX), MM2 ) /* | m02 */ - PUNPCKLDQ ( REGOFF(24, ECX), MM2 ) /* m12 | m02 */ - - MOVQ ( REGOFF(48, ECX), MM4 ) /* m31 | m30 */ - MOVD ( REGOFF(56, ECX), MM5 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TP3R_2 ): - - MOVQ ( REGIND(EAX), MM6 ) /* x1 | x0 */ - MOVQ ( MM6, MM7 ) /* x1 | x0 */ - - PFMUL ( MM0, MM6 ) /* x1*m10 | x0*m00 */ - PFMUL ( MM1, MM7 ) /* x1*m11 | x0*m01 */ - - PFACC ( MM7, MM6 ) /* x0*m01+x1*m11 | x0*x00+x1*m10 */ - PFADD ( MM4, MM6 ) /* x0*...*m11+m31 | x0*...*m10+m30 */ - - MOVQ ( MM6, REGIND(EDX) ) /* write r1, r0 */ - MOVQ ( REGIND(EAX), MM6 ) /* x1 | x0 */ - - MOVQ ( MM6, MM7 ) /* x1 | x0 */ - PFMUL ( MM2, MM6 ) /* x1*m12 | x0*m02 */ - - PFACC ( MM7, MM6 ) /* ***trash*** | x0*x02+x1*m12 */ - PFADD ( MM5, MM6 ) /* ***trash*** | x0*...*m12+m32 */ - - MOVD ( MM6, REGOFF(8, EDX) ) /* write r2 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP3R_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3R_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_3d_no_rot ) -GLNAME( _mesa_3dnow_transform_points2_3d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3 ), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3NRR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TP3NRR_2 ): - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - - PFADD ( MM2, MM4 ) /* x1*m11+m31 | x0*m00+m30 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - - MOVD ( MM3, REGOFF(8, EDX) ) /* write r2 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP3NRR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3NRR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_2d ) -GLNAME( _mesa_3dnow_transform_points2_2d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(2), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2R_3 ) ) - - MOVQ ( REGIND(ECX), MM0 ) /* m01 | m00 */ - MOVQ ( REGOFF(16, ECX), MM1 ) /* m11 | m10 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2R_2 ): - - MOVD ( REGIND(EAX), MM4 ) /* | x0 */ - MOVD ( REGOFF(4, EAX), MM5 ) /* | x1 */ - - PUNPCKLDQ ( MM4, MM4 ) /* x0 | x0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - PFMUL ( MM0, MM4 ) /* x0*m01 | x0*m00 */ - PUNPCKLDQ ( MM5, MM5 ) /* x1 | x1 */ - - PFMUL ( MM1, MM5 ) /* x1*m11 | x1*m10 */ - PFADD ( MM2, MM4 ) /* x...x1*m11+31 | x0*..*m10+m30 */ - - PFADD ( MM5, MM4 ) /* x0*m01+x1*m11 | x0*m00+x1*m10 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP2R_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2R_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_2d_no_rot ) -GLNAME( _mesa_3dnow_transform_points2_2d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(2), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2NRR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2NRR_2 ): - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - PFADD ( MM2, MM4 ) /* m31 | x0*m00+m30 */ - - MOVQ ( MM4, REGIND(EDX) ) /* write r1, r0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP2NRR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2NRR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points2_identity ) -GLNAME( _mesa_3dnow_transform_points2_identity ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(2), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPIR_3 ) ) - -ALIGNTEXT16 -LLBL( G3TPIR_3 ): - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - ADD_L ( EDI, EAX ) /* next vertex */ - - MOVQ ( MM0, REGIND(EDX) ) /* r1 | r0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPIR_3 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPIR_4 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET Index: xc/extras/Mesa/src/X86/3dnow_xform3.S diff -u xc/extras/Mesa/src/X86/3dnow_xform3.S:1.2 xc/extras/Mesa/src/X86/3dnow_xform3.S:removed --- xc/extras/Mesa/src/X86/3dnow_xform3.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/3dnow_xform3.S Wed Mar 16 21:00:48 2005 @@ -1,547 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FRAME_OFFSET 4 - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_general ) -GLNAME( _mesa_3dnow_transform_points3_general ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPGR_2 ) ) - - PREFETCHW ( REGIND(EDX) ) - -ALIGNTEXT16 -LLBL( G3TPGR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM2 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - MOVQ ( MM0, MM1 ) /* x1 | x0 */ - PUNPCKLDQ ( MM2, MM2 ) /* x2 | x2 */ - - PUNPCKLDQ ( MM0, MM0 ) /* x0 | x0 */ - MOVQ ( MM2, MM5 ) /* x2 | x2 */ - - PUNPCKHDQ ( MM1, MM1 ) /* x1 | x1 */ - PFMUL ( REGOFF(32, ECX), MM2 ) /* x2*m9 | x2*m8 */ - - MOVQ ( MM0, MM3 ) /* x0 | x0 */ - PFMUL ( REGOFF(40, ECX), MM5 ) /* x2*m11 | x2*m10 */ - - MOVQ ( MM1, MM4 ) /* x1 | x1 */ - PFMUL ( REGIND(ECX), MM0 ) /* x0*m1 | x0*m0 */ - - PFADD ( REGOFF(48, ECX), MM2 ) /* x2*m9+m13 | x2*m8+m12 */ - PFMUL ( REGOFF(16, ECX), MM1 ) /* x1*m5 | x1*m4 */ - - PFADD ( REGOFF(56, ECX), MM5 ) /* x2*m11+m15 | x2*m10+m14 */ - PFADD ( MM0, MM1 ) /* x0*m1+x1*m5 | x0*m0+x1*m4 */ - - PFMUL ( REGOFF(8, ECX), MM3 ) /* x0*m3 | x0*m2 */ - PFADD ( MM1, MM2 ) /* r1 | r0 */ - - PFMUL ( REGOFF(24, ECX), MM4 ) /* x1*m7 | x1*m6 */ - ADD_L ( CONST(16), EDX ) /* next output vertex */ - - PFADD ( MM3, MM4 ) /* x0*m3+x1*m7 | x0*m2+x1*m6 */ - MOVQ ( MM2, REGOFF(-16, EDX) ) /* write r0, r1 */ - - PFADD ( MM4, MM5 ) /* r3 | r2 */ - MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPGR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPGR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_perspective ) -GLNAME( _mesa_3dnow_transform_points3_perspective ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPPR_2 ) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCHW ( REGIND(EDX) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVQ ( REGOFF(32, ECX), MM1 ) /* m21 | m20 */ - MOVD ( REGOFF(40, ECX), MM2 ) /* | m22 */ - - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - -ALIGNTEXT16 -LLBL( G3TPPR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVD ( REGOFF(8, EAX), MM5 ) /* | x2 */ - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - PXOR ( MM7, MM7 ) /* 0 | 0 */ - MOVQ ( MM5, MM6 ) /* | x2 */ - - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - PFSUB ( MM5, MM7 ) /* | -x2 */ - - PFMUL ( MM2, MM6 ) /* | x2*m22 */ - PUNPCKLDQ ( MM5, MM5 ) /* x2 | x2 */ - - ADD_L ( CONST(16), EDX ) /* next r */ - PFMUL ( MM1, MM5 ) /* x2*m21 | x2*m20 */ - - PFADD ( MM3, MM6 ) /* | x2*m22+m32 */ - PFADD ( MM4, MM5 ) /* x1*m11+x2*m21 | x0*m00+x2*m20 */ - - MOVQ ( MM5, REGOFF(-16, EDX) ) /* write r0, r1 */ - MOVD ( MM6, REGOFF(-8, EDX) ) /* write r2 */ - - MOVD ( MM7, REGOFF(-4, EDX) ) /* write r3 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPPR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPPR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_3d ) -GLNAME( _mesa_3dnow_transform_points3_3d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3R_2 ) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCH ( REGIND(EDX) ) - - MOVD ( REGOFF(8, ECX), MM7 ) /* | m2 */ - PUNPCKLDQ ( REGOFF(24, ECX), MM7 ) /* m6 | m2 */ - - -ALIGNTEXT16 -LLBL( G3TP3R_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM1 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - MOVQ ( MM0, MM2 ) /* x1 | x0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PUNPCKLDQ ( MM2, MM2 ) /* x0 | x0 */ - MOVQ ( MM0, MM3 ) /* x1 | x0 */ - - PFMUL ( REGIND(ECX), MM2 ) /* x0*m1 | x0*m0 */ - PUNPCKHDQ ( MM3, MM3 ) /* x1 | x1 */ - - MOVQ ( MM1, MM4 ) /* | x2 */ - PFMUL ( REGOFF(16, ECX), MM3 ) /* x1*m5 | x1*m4 */ - - PUNPCKLDQ ( MM4, MM4 ) /* x2 | x2 */ - PFADD ( MM2, MM3 ) /* x0*m1+x1*m5 | x0*m0+x1*m4 */ - - PFMUL ( REGOFF(32, ECX), MM4 ) /* x2*m9 | x2*m8 */ - PFADD ( REGOFF(48, ECX), MM3 ) /* x0*m1+...+m11 | x0*m0+x1*m4+m12 */ - - PFMUL ( MM7, MM0 ) /* x1*m6 | x0*m2 */ - PFADD ( MM4, MM3 ) /* r1 | r0 */ - - PFMUL ( REGOFF(40, ECX), MM1 ) /* | x2*m10 */ - PUNPCKLDQ ( REGOFF(56, ECX), MM1 ) /* m14 | x2*m10 */ - - PFACC ( MM0, MM1 ) - - MOVQ ( MM3, REGOFF(-16, EDX) ) /* write r0, r1 */ - PFACC ( MM1, MM1 ) /* | r2 */ - - MOVD ( MM1, REGOFF(-8, EDX) ) /* write r2 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP3R_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3R_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_3d_no_rot ) -GLNAME( _mesa_3dnow_transform_points3_3d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3NRR_2 ) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCHW ( REGIND(EDX) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVD ( REGOFF(40, ECX), MM2 ) /* | m22 */ - PUNPCKLDQ ( MM2, MM2 ) /* m22 | m22 */ - - MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */ - MOVD ( REGOFF(56, ECX), MM3 ) /* | m32 */ - - PUNPCKLDQ ( MM3, MM3 ) /* m32 | m32 */ - - -ALIGNTEXT16 -LLBL( G3TP3NRR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM5 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCHW ( REGIND(EAX) ) - - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - - PFADD ( MM1, MM4 ) /* x1*m11+m31 | x0*m00+m30 */ - PFMUL ( MM2, MM5 ) /* | x2*m22 */ - - PFADD ( MM3, MM5 ) /* | x2*m22+m32 */ - MOVQ ( MM4, REGIND(EDX) ) /* write r0, r1 */ - - ADD_L ( CONST(16), EDX ) /* next r */ - DEC_L ( ESI ) /* decrement vertex counter */ - - MOVD ( MM5, REGOFF(-8, EDX) ) /* write r2 */ - JNZ ( LLBL( G3TP3NRR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3NRR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_2d ) -GLNAME( _mesa_3dnow_transform_points3_2d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2R_3) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCHW ( REGIND(EDX) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(16, ECX), MM0 ) /* m10 | m00 */ - - MOVD ( REGOFF(4, ECX), MM1 ) /* | m01 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM1 ) /* m11 | m01 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2R_2 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM3 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM5 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - MOVQ ( MM3, MM4 ) /* x1 | x0 */ - PFMUL ( MM0, MM3 ) /* x1*m10 | x0*m00 */ - - ADD_L ( CONST(16), EDX ) /* next r */ - PFMUL ( MM1, MM4 ) /* x1*m11 | x0*m01 */ - - PFACC ( MM4, MM3 ) /* x0*m00+x1*m10 | x0*m01+x1*m11 */ - MOVD ( MM5, REGOFF(-8, EDX) ) /* write r2 (=x2) */ - - PFADD ( MM2, MM3 ) /* x0*...*m10+m30 | x0*...*m11+m31 */ - MOVQ ( MM3, REGOFF(-16, EDX) ) /* write r0, r1 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP2R_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2R_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_2d_no_rot ) -GLNAME( _mesa_3dnow_transform_points3_2d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2NRR_2 ) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCHW ( REGIND(EDX) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */ - - -ALIGNTEXT16 -LLBL( G3TP2NRR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM5 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PFADD ( MM1, MM4 ) /* x1*m11+m31 | x0*m00+m30 */ - - MOVQ ( MM4, REGOFF(-16, EDX) ) /* write r0, r1 */ - MOVD ( MM5, REGOFF(-8, EDX) ) /* write r2 (=x2) */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP2NRR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2NRR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points3_identity ) -GLNAME( _mesa_3dnow_transform_points3_identity ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(3), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPIR_2 ) ) - - PREFETCHW ( REGIND(EDX) ) - -ALIGNTEXT16 -LLBL( G3TPIR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVD ( REGOFF(8, EAX), MM1 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - ADD_L ( CONST(16), EDX ) /* next r */ - - DEC_L ( ESI ) /* decrement vertex counter */ - MOVQ ( MM0, REGOFF(-16, EDX) ) /* r1 | r0 */ - - MOVD ( MM1, REGOFF(-8, EDX) ) /* | r2 */ - JNZ ( LLBL( G3TPIR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPIR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET Index: xc/extras/Mesa/src/X86/3dnow_xform4.S diff -u xc/extras/Mesa/src/X86/3dnow_xform4.S:1.2 xc/extras/Mesa/src/X86/3dnow_xform4.S:removed --- xc/extras/Mesa/src/X86/3dnow_xform4.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/3dnow_xform4.S Wed Mar 16 21:00:48 2005 @@ -1,556 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FRAME_OFFSET 4 - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_general ) -GLNAME( _mesa_3dnow_transform_points4_general ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPGR_2 ) ) - - PREFETCHW ( REGIND(EDX) ) - -ALIGNTEXT16 -LLBL( G3TPGR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM4 ) /* x3 | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - MOVQ ( MM0, MM2 ) /* x1 | x0 */ - MOVQ ( MM4, MM6 ) /* x3 | x2 */ - - PUNPCKLDQ ( MM0, MM0 ) /* x0 | x0 */ - PUNPCKHDQ ( MM2, MM2 ) /* x1 | x1 */ - - MOVQ ( MM0, MM1 ) /* x0 | x0 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PFMUL ( REGIND(ECX), MM0 ) /* x0*m1 | x0*m0 */ - MOVQ ( MM2, MM3 ) /* x1 | x1 */ - - PFMUL ( REGOFF(8, ECX), MM1 ) /* x0*m3 | x0*m2 */ - PUNPCKLDQ ( MM4, MM4 ) /* x2 | x2 */ - - PFMUL ( REGOFF(16, ECX), MM2 ) /* x1*m5 | x1*m4 */ - MOVQ ( MM4, MM5 ) /* x2 | x2 */ - - PFMUL ( REGOFF(24, ECX), MM3 ) /* x1*m7 | x1*m6 */ - PUNPCKHDQ ( MM6, MM6 ) /* x3 | x3 */ - - PFMUL ( REGOFF(32, ECX), MM4 ) /* x2*m9 | x2*m8 */ - MOVQ ( MM6, MM7 ) /* x3 | x3 */ - - PFMUL ( REGOFF(40, ECX), MM5 ) /* x2*m11 | x2*m10 */ - PFADD ( MM0, MM2 ) - - PFMUL ( REGOFF(48, ECX), MM6 ) /* x3*m13 | x3*m12 */ - PFADD ( MM1, MM3 ) - - PFMUL ( REGOFF(56, ECX), MM7 ) /* x3*m15 | x3*m14 */ - PFADD ( MM4, MM6 ) - - PFADD ( MM5, MM7 ) - PFADD ( MM2, MM6 ) - - PFADD ( MM3, MM7 ) - MOVQ ( MM6, REGOFF(-16, EDX) ) - - MOVQ ( MM7, REGOFF(-8, EDX) ) - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPGR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPGR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_perspective ) -GLNAME( _mesa_3dnow_transform_points4_perspective ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPPR_2 ) ) - - PREFETCH ( REGIND(EAX) ) - PREFETCHW ( REGIND(EDX) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVD ( REGOFF(40, ECX), MM1 ) /* | m22 */ - PUNPCKLDQ ( REGOFF(56, ECX), MM1 ) /* m32 | m22 */ - - MOVQ ( REGOFF(32, ECX), MM2 ) /* m21 | m20 */ - PXOR ( MM7, MM7 ) /* 0 | 0 */ - -ALIGNTEXT16 -LLBL( G3TPPR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */ - MOVD ( REGOFF(8, EAX), MM3 ) /* | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGOFF(32, EAX) ) /* hopefully stride is zero */ - - MOVQ ( MM5, MM6 ) /* x3 | x2 */ - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - - PUNPCKLDQ ( MM5, MM5 ) /* x2 | x2 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PFMUL ( MM2, MM5 ) /* x2*m21 | x2*m20 */ - PFSUBR ( MM7, MM3 ) /* | -x2 */ - - PFMUL ( MM1, MM6 ) /* x3*m32 | x2*m22 */ - PFADD ( MM4, MM5 ) /* x1*m11+x2*m21 | x0*m00+x2*m20 */ - - PFACC ( MM3, MM6 ) /* -x2 | x2*m22+x3*m32 */ - MOVQ ( MM5, REGOFF(-16, EDX) ) /* write r0, r1 */ - - MOVQ ( MM6, REGOFF(-8, EDX) ) /* write r2, r3 */ - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TPPR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPPR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_3d ) -GLNAME( _mesa_3dnow_transform_points4_3d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3R_2 ) ) - - MOVD ( REGOFF(8, ECX), MM6 ) /* | m2 */ - PUNPCKLDQ ( REGOFF(24, ECX), MM6 ) /* m6 | m2 */ - - MOVD ( REGOFF(40, ECX), MM7 ) /* | m10 */ - PUNPCKLDQ ( REGOFF(56, ECX), MM7 ) /* m14 | m10 */ - -ALIGNTEXT16 -LLBL( G3TP3R_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - PREFETCH ( REGOFF(32, EAX) ) /* hopefully array is tightly packed */ - - MOVQ ( REGIND(EAX), MM2 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM3 ) /* x3 | x2 */ - - MOVQ ( MM2, MM0 ) /* x1 | x0 */ - MOVQ ( MM3, MM4 ) /* x3 | x2 */ - - MOVQ ( MM0, MM1 ) /* x1 | x0 */ - MOVQ ( MM4, MM5 ) /* x3 | x2 */ - - PUNPCKLDQ ( MM0, MM0 ) /* x0 | x0 */ - PUNPCKHDQ ( MM1, MM1 ) /* x1 | x1 */ - - PFMUL ( REGIND(ECX), MM0 ) /* x0*m1 | x0*m0 */ - PUNPCKLDQ ( MM3, MM3 ) /* x2 | x2 */ - - PFMUL ( REGOFF(16, ECX), MM1 ) /* x1*m5 | x1*m4 */ - PUNPCKHDQ ( MM4, MM4 ) /* x3 | x3 */ - - PFMUL ( MM6, MM2 ) /* x1*m6 | x0*m2 */ - PFADD ( MM0, MM1 ) /* x0*m1+x1*m5 | x0*m0+x1*m4 */ - - PFMUL ( REGOFF(32, ECX), MM3 ) /* x2*m9 | x2*m8 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PFMUL ( REGOFF(48, ECX), MM4 ) /* x3*m13 | x3*m12 */ - PFADD ( MM1, MM3 ) /* x0*m1+..+x2*m9 | x0*m0+...+x2*m8 */ - - PFMUL ( MM7, MM5 ) /* x3*m14 | x2*m10 */ - PFADD ( MM3, MM4 ) /* r1 | r0 */ - - PFACC ( MM2, MM5 ) /* x0*m2+x1*m6 | x2*m10+x3*m14 */ - MOVD ( REGOFF(12, EAX), MM0 ) /* | x3 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PFACC ( MM0, MM5 ) /* r3 | r2 */ - - MOVQ ( MM4, REGOFF(-16, EDX) ) /* write r0, r1 */ - MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP3R_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3R_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ) -GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ): - - PUSH_L ( ESI ) - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP3NRR_2 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVD ( REGOFF(40, ECX), MM2 ) /* | m22 */ - PUNPCKLDQ ( REGOFF(56, ECX), MM2 ) /* m32 | m22 */ - - MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP3NRR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */ - MOVD ( REGOFF(12, EAX), MM7 ) /* | x3 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGOFF(32, EAX) ) /* hopefully stride is zero */ - - MOVQ ( MM5, MM6 ) /* x3 | x2 */ - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - - PUNPCKHDQ ( MM6, MM6 ) /* x3 | x3 */ - PFMUL ( MM2, MM5 ) /* x3*m32 | x2*m22 */ - - PFMUL ( MM1, MM6 ) /* x3*m31 | x3*m30 */ - PFACC ( MM7, MM5 ) /* x3 | x2*m22+x3*m32 */ - - PFADD ( MM6, MM4 ) /* x1*m11+x3*m31 | x0*m00+x3*m30 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - MOVQ ( MM4, REGOFF(-16, EDX) ) /* write r0, r1 */ - MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP3NRR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP3NRR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_2d ) -GLNAME( _mesa_3dnow_transform_points4_2d ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2R_2 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(16, ECX), MM0 ) /* m10 | m00 */ - - MOVD ( REGOFF(4, ECX), MM1 ) /* | m01 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM1 ) /* m11 | m01 */ - - MOVQ ( REGOFF(48, ECX), MM2 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2R_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM3 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - MOVQ ( MM3, MM4 ) /* x1 | x0 */ - MOVQ ( MM5, MM6 ) /* x3 | x2 */ - - PFMUL ( MM1, MM4 ) /* x1*m11 | x0*m01 */ - PUNPCKHDQ ( MM6, MM6 ) /* x3 | x3 */ - - PFMUL ( MM0, MM3 ) /* x1*m10 | x0*m00 */ - ADD_L ( CONST(16), EDX ) /* next r */ - - PFACC ( MM4, MM3 ) /* x0*m01+x1*m11 | x0*m00+x1*m10 */ - PFMUL ( MM2, MM6 ) /* x3*m31 | x3*m30 */ - - PFADD ( MM6, MM3 ) /* r1 | r0 */ - MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */ - - MOVQ ( MM3, REGOFF(-16, EDX) ) /* write r0, r1 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TP2R_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2R_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ) -GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TP2NRR_3 ) ) - - MOVD ( REGIND(ECX), MM0 ) /* | m00 */ - PUNPCKLDQ ( REGOFF(20, ECX), MM0 ) /* m11 | m00 */ - - MOVQ ( REGOFF(48, ECX), MM1 ) /* m31 | m30 */ - -ALIGNTEXT16 -LLBL( G3TP2NRR_2 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM4 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM5 ) /* x3 | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - PFMUL ( MM0, MM4 ) /* x1*m11 | x0*m00 */ - MOVQ ( MM5, MM6 ) /* x3 | x2 */ - - ADD_L ( CONST(16), EDX ) /* next r */ - PUNPCKHDQ ( MM6, MM6 ) /* x3 | x3 */ - - PFMUL ( MM1, MM6 ) /* x3*m31 | x3*m30 */ - PFADD ( MM4, MM6 ) /* x1*m11+x3*m31 | x0*m00+x3*m30 */ - - MOVQ ( MM6, REGOFF(-16, EDX) ) /* write r0, r1 */ - MOVQ ( MM5, REGOFF(-8, EDX) ) /* write r2, r3 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - - JNZ ( LLBL( G3TP2NRR_2 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TP2NRR_3 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_3dnow_transform_points4_identity ) -GLNAME( _mesa_3dnow_transform_points4_identity ): - - PUSH_L ( ESI ) - - MOV_L ( ARG_DEST, ECX ) - MOV_L ( ARG_MATRIX, ESI ) - MOV_L ( ARG_SOURCE, EAX ) - MOV_L ( CONST(4), REGOFF(V4F_SIZE, ECX) ) - OR_B ( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, ECX) ) - MOV_L ( REGOFF(V4F_COUNT, EAX), EDX ) - MOV_L ( EDX, REGOFF(V4F_COUNT, ECX) ) - - PUSH_L ( EDI ) - - MOV_L ( REGOFF(V4F_START, ECX), EDX ) - MOV_L ( ESI, ECX ) - MOV_L ( REGOFF(V4F_COUNT, EAX), ESI ) - MOV_L ( REGOFF(V4F_STRIDE, EAX), EDI ) - MOV_L ( REGOFF(V4F_START, EAX), EAX ) - - TEST_L ( ESI, ESI ) - JZ ( LLBL( G3TPIR_2 ) ) - -ALIGNTEXT16 -LLBL( G3TPIR_1 ): - - PREFETCHW ( REGOFF(32, EDX) ) /* prefetch 2 vertices ahead */ - - MOVQ ( REGIND(EAX), MM0 ) /* x1 | x0 */ - MOVQ ( REGOFF(8, EAX), MM1 ) /* x3 | x2 */ - - ADD_L ( EDI, EAX ) /* next vertex */ - PREFETCH ( REGIND(EAX) ) - - ADD_L ( CONST(16), EDX ) /* next r */ - MOVQ ( MM0, REGOFF(-16, EDX) ) /* r1 | r0 */ - - MOVQ ( MM1, REGOFF(-8, EDX) ) /* r3 | r2 */ - - DEC_L ( ESI ) /* decrement vertex counter */ - JNZ ( LLBL( G3TPIR_1 ) ) /* cnt > 0 ? -> process next vertex */ - -LLBL( G3TPIR_2 ): - - FEMMS - POP_L ( EDI ) - POP_L ( ESI ) - RET Index: xc/extras/Mesa/src/X86/assyntax.h diff -u xc/extras/Mesa/src/X86/assyntax.h:1.16 xc/extras/Mesa/src/X86/assyntax.h:removed --- xc/extras/Mesa/src/X86/assyntax.h:1.16 Thu Nov 6 13:37:53 2003 +++ xc/extras/Mesa/src/X86/assyntax.h Wed Mar 16 21:00:48 2005 @@ -1,1702 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X86/assyntax.h,v 1.16 2003/11/06 18:37:53 tsi Exp $ */ - -#ifndef __ASSYNTAX_H__ -#define __ASSYNTAX_H__ - -/* - * Copyright 1992 Vrije Universiteit, The Netherlands - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of the Vrije Universiteit not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The Vrije Universiteit makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL The Vrije Universiteit BE LIABLE FOR ANY SPECIAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * assyntax.h - * - * Select the syntax appropriate to the 386 assembler being used - * To add support for more assemblers add more columns to the CHOICE - * macro. Note that register names must also have uppercase names - * to avoid macro recursion. e.g., #define ah %ah recurses! - * - * NB 1. Some of the macros for certain assemblers imply that the code is to - * run in protected mode!! Caveat emptor. - * - * NB 2. 486 specific instructions are not included. This is to discourage - * their accidental use in code that is intended to run on 386 and 486 - * systems. - * - * Supported assemblers: - * - * (a) AT&T SysVr4 as(1): define ATT_ASSEMBLER - * (b) GNU Assembler gas: define GNU_ASSEMBLER (default) - * (c) Amsterdam Compiler kit: define ACK_ASSEMBLER - * (d) The Netwide Assembler: define NASM_ASSEMBLER - * (e) Microsoft Assembler: define MASM_ASSEMBLER (UNTESTED!) - * - * The following naming conventions have been used to identify the various - * data types: - * _SR = segment register version - * Integer: - * _Q = quadword = 64 bits - * _L = long = 32 bits - * _W = short = 16 bits - * _B = byte = 8 bits - * Floating-point: - * _X = m80real = 80 bits - * _D = double = 64 bits - * _S = single = 32 bits - * - * Author: Gregory J. Sharp, Sept 1992 - * Vrije Universiteit, Amsterdam, The Netherlands - * - * [support for Intel syntax added by Josh Vanderhoof, 1999] - */ - -#if !(defined(NASM_ASSEMBLER) || defined(MASM_ASSEMBLER)) - -/* Default to ATT_ASSEMBLER when SVR4 or SYSV are defined */ -#if (defined(SVR4) || defined(SYSV)) && !defined(GNU_ASSEMBLER) -#define ATT_ASSEMBLER -#endif - -#if !defined(ATT_ASSEMBLER) && !defined(GNU_ASSEMBLER) && !defined(ACK_ASSEMBLER) -#define GNU_ASSEMBLER -#endif - -#if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (i386) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__)) -#define CONCAT(x, y) x ## y -#define CONCAT3(x, y, z) x ## y ## z -#else -#define CONCAT(x, y) x/**/y -#define CONCAT3(x, y, z) x/**/y/**/z -#endif - -#ifdef ACK_ASSEMBLER - -/* Assume we write code for 32-bit protected mode! */ - -/* Redefine register names for GAS & AT&T assemblers */ -#define AL al -#define AH ah -#define AX ax -#define EAX ax -#define BL bl -#define BH bh -#define BX bx -#define EBX bx -#define CL cl -#define CH ch -#define CX cx -#define ECX cx -#define DL dl -#define DH dh -#define DX dx -#define EDX dx -#define BP bp -#define EBP bp -#define SI si -#define ESI si -#define DI di -#define EDI di -#define SP sp -#define ESP sp -#define CS cs -#define SS ss -#define DS ds -#define ES es -#define FS fs -#define GS gs -/* Control Registers */ -#define CR0 cr0 -#define CR1 cr1 -#define CR2 cr2 -#define CR3 cr3 -/* Debug Registers */ -#define DR0 dr0 -#define DR1 dr1 -#define DR2 dr2 -#define DR3 dr3 -#define DR4 dr4 -#define DR5 dr5 -#define DR6 dr6 -#define DR7 dr7 -/* Floating-point Stack */ -#define ST st - -#define AS_BEGIN .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text - - -#define _WTOG o16 /* word toggle for _W instructions */ -#define _LTOG /* long toggle for _L instructions */ -#define ADDR_TOGGLE a16 -#define OPSZ_TOGGLE o16 -#define USE16 .use16 -#define USE32 .use32 - -#define CHOICE(a,b,c) c - -#else /* AT&T or GAS */ - -/* Redefine register names for GAS & AT&T assemblers */ -#define AL %al -#define AH %ah -#define AX %ax -#define EAX %eax -#define BL %bl -#define BH %bh -#define BX %bx -#define EBX %ebx -#define CL %cl -#define CH %ch -#define CX %cx -#define ECX %ecx -#define DL %dl -#define DH %dh -#define DX %dx -#define EDX %edx -#define BP %bp -#define EBP %ebp -#define SI %si -#define ESI %esi -#define DI %di -#define EDI %edi -#define SP %sp -#define ESP %esp -#define CS %cs -#define SS %ss -#define DS %ds -#define ES %es -#define FS %fs -#define GS %gs -/* Control Registers */ -#define CR0 %cr0 -#define CR1 %cr1 -#define CR2 %cr2 -#define CR3 %cr3 -/* Debug Registers */ -#define DR0 %db0 -#define DR1 %db1 -#define DR2 %db2 -#define DR3 %db3 -#define DR4 %db4 -#define DR5 %db5 -#define DR6 %db6 -#define DR7 %db7 -/* Floating-point Stack */ -#define _STX0 %st(0) -#define _STX1 %st(1) -#define _STX2 %st(2) -#define _STX3 %st(3) -#define _STX4 %st(4) -#define _STX5 %st(5) -#define _STX6 %st(6) -#define _STX7 %st(7) -#define ST(x) CONCAT(_STX,x) -#ifdef GNU_ASSEMBLER -#define ST0 %st(0) -#else -#define ST0 %st -#endif -/* MMX Registers */ -#define MM0 %mm0 -#define MM1 %mm1 -#define MM2 %mm2 -#define MM3 %mm3 -#define MM4 %mm4 -#define MM5 %mm5 -#define MM6 %mm6 -#define MM7 %mm7 -/* SSE Registers */ -#define XMM0 %xmm0 -#define XMM1 %xmm1 -#define XMM2 %xmm2 -#define XMM3 %xmm3 -#define XMM4 %xmm4 -#define XMM5 %xmm5 -#define XMM6 %xmm6 -#define XMM7 %xmm7 - -#define AS_BEGIN -#define USE16 -#define USE32 - -#ifdef GNU_ASSEMBLER - -#define ADDR_TOGGLE aword -#define OPSZ_TOGGLE word - -#define CHOICE(a,b,c) b - -#else -/* - * AT&T ASSEMBLER SYNTAX - * ********************* - */ -#define CHOICE(a,b,c) a - -#define ADDR_TOGGLE addr16 -#define OPSZ_TOGGLE data16 - -#endif /* GNU_ASSEMBLER */ -#endif /* ACK_ASSEMBLER */ - - -#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) || defined(__GNUC__) && !defined(DJGPP) -#define GLNAME(a) a -#else -#define GLNAME(a) CONCAT(_,a) -#endif - - - /****************************************/ - /* */ - /* Select the various choices */ - /* */ - /****************************************/ - - -/* Redefine assembler directives */ -/*********************************/ -#define GLOBL CHOICE(.globl, .globl, .extern) -#define GLOBAL GLOBL -#define EXTERN GLOBL -/* -#define ALIGNTEXT32 CHOICE(.align 32, .align ARG2(5,0x90), .align 32) -*/ -#define ALIGNTEXT32 CHOICE(.align 32, .balign 32, .align 32) -#define ALIGNTEXT16 CHOICE(.align 16, .balign 16, .align 16) -#define ALIGNTEXT8 CHOICE(.align 8, .balign 8, .align 8) -#define ALIGNTEXT4 CHOICE(.align 4, .balign 4, .align 4) -#define ALIGNTEXT2 CHOICE(.align 2, .balign 2, .align 2) -/* ALIGNTEXT4ifNOP is the same as ALIGNTEXT4, but only if the space is - * guaranteed to be filled with NOPs. Otherwise it does nothing. - */ -#define ALIGNTEXT32ifNOP CHOICE(.align 32, .balign ARG2(32,0x90), /*can't do it*/) -#define ALIGNTEXT16ifNOP CHOICE(.align 16, .balign ARG2(16,0x90), /*can't do it*/) -#define ALIGNTEXT8ifNOP CHOICE(.align 8, .balign ARG2(8,0x90), /*can't do it*/) -#define ALIGNTEXT4ifNOP CHOICE(.align 4, .balign ARG2(4,0x90), /*can't do it*/) -#define ALIGNDATA32 CHOICE(.align 32, .balign ARG2(32,0x0), .align 32) -#define ALIGNDATA16 CHOICE(.align 16, .balign ARG2(16,0x0), .align 16) -#define ALIGNDATA8 CHOICE(.align 8, .balign ARG2(8,0x0), .align 8) -#define ALIGNDATA4 CHOICE(.align 4, .balign ARG2(4,0x0), .align 4) -#define ALIGNDATA2 CHOICE(.align 2, .balign ARG2(2,0x0), .align 2) -#define FILE(s) CHOICE(.file s, .file s, .file s) -#define STRING(s) CHOICE(.string s, .asciz s, .asciz s) -#define D_LONG CHOICE(.long, .long, .data4) -#define D_WORD CHOICE(.value, .short, .data2) -#define D_BYTE CHOICE(.byte, .byte, .data1) -#define SPACE CHOICE(.comm, .space, .space) -#define COMM CHOICE(.comm, .comm, .comm) -#define SEG_DATA CHOICE(.data, .data, .sect .data) -#define SEG_TEXT CHOICE(.text, .text, .sect .text) -#define SEG_BSS CHOICE(.bss, .bss, .sect .bss) - -#ifdef GNU_ASSEMBLER -#define D_SPACE(n) . = . + n -#else -#define D_SPACE(n) .space n -#endif - -/* Addressing Modes */ -/* Immediate Mode */ -#define ADDR(a) CHOICE(CONCAT($,a), CONCAT($,a), a) -#define CONST(a) CHOICE(CONCAT($,a), CONCAT($,a), a) - -/* Indirect Mode */ -#define CONTENT(a) CHOICE(a, a, (a)) /* take contents of variable */ -#define REGIND(a) CHOICE((a), (a), (a)) /* Register a indirect */ -/* Register b indirect plus displacement a */ -#define REGOFF(a, b) CHOICE(a(b), a(b), a(b)) -/* Reg indirect Base + Index + Displacement - this is mainly for 16-bit mode - * which has no scaling - */ -#define REGBID(b,i,d) CHOICE(d(b,i), d(b,i), d(b)(i)) -/* Reg indirect Base + (Index * Scale) */ -#define REGBIS(b,i,s) CHOICE((b,i,s), (b,i,s), (b)(i*s)) -/* Reg indirect Base + (Index * Scale) + Displacement */ -#define REGBISD(b,i,s,d) CHOICE(d(b,i,s), d(b,i,s), d(b)(i*s)) -/* Displaced Scaled Index: */ -#define REGDIS(d,i,s) CHOICE(d(,i,s), d(,i,s), d(i * s)) -/* Indexed Base: */ -#define REGBI(b,i) CHOICE((b,i), (b,i), (b)(i)) -/* Displaced Base: */ -#define REGDB(d,b) CHOICE(d(b), d(b), d(b)) -/* Variable indirect: */ -#define VARINDIRECT(var) CHOICE(*var, *var, (var)) -/* Use register contents as jump/call target: */ -#define CODEPTR(reg) CHOICE(*reg, *reg, reg) - -/* For expressions requiring bracketing - * eg. (CRT0_PM | CRT_EM) - */ - -#define EXPR(a) CHOICE([a], (a), [a]) -#define ENOT(a) CHOICE(0!a, ~a, ~a) -#define EMUL(a,b) CHOICE(a\*b, a*b, a*b) -#define EDIV(a,b) CHOICE(a\/b, a/b, a/b) - -/* - * We have to beat the problem of commas within arguments to choice. - * eg. choice (add a,b, add b,a) will get argument mismatch. Luckily ANSI - * and other known cpp definitions evaluate arguments before substitution - * so the following works. - */ -#define ARG2(a, b) a,b -#define ARG3(a,b,c) a,b,c - -/* Redefine assembler commands */ -#define AAA CHOICE(aaa, aaa, aaa) -#define AAD CHOICE(aad, aad, aad) -#define AAM CHOICE(aam, aam, aam) -#define AAS CHOICE(aas, aas, aas) -#define ADC_L(a, b) CHOICE(adcl ARG2(a,b), adcl ARG2(a,b), _LTOG adc ARG2(b,a)) -#define ADC_W(a, b) CHOICE(adcw ARG2(a,b), adcw ARG2(a,b), _WTOG adc ARG2(b,a)) -#define ADC_B(a, b) CHOICE(adcb ARG2(a,b), adcb ARG2(a,b), adcb ARG2(b,a)) -#define ADD_L(a, b) CHOICE(addl ARG2(a,b), addl ARG2(a,b), _LTOG add ARG2(b,a)) -#define ADD_W(a, b) CHOICE(addw ARG2(a,b), addw ARG2(a,b), _WTOG add ARG2(b,a)) -#define ADD_B(a, b) CHOICE(addb ARG2(a,b), addb ARG2(a,b), addb ARG2(b,a)) -#define AND_L(a, b) CHOICE(andl ARG2(a,b), andl ARG2(a,b), _LTOG and ARG2(b,a)) -#define AND_W(a, b) CHOICE(andw ARG2(a,b), andw ARG2(a,b), _WTOG and ARG2(b,a)) -#define AND_B(a, b) CHOICE(andb ARG2(a,b), andb ARG2(a,b), andb ARG2(b,a)) -#define ARPL(a,b) CHOICE(arpl ARG2(a,b), arpl ARG2(a,b), arpl ARG2(b,a)) -#define BOUND_L(a, b) CHOICE(boundl ARG2(a,b), boundl ARG2(b,a), _LTOG bound ARG2(b,a)) -#define BOUND_W(a, b) CHOICE(boundw ARG2(a,b), boundw ARG2(b,a), _WTOG bound ARG2(b,a)) -#define BSF_L(a, b) CHOICE(bsfl ARG2(a,b), bsfl ARG2(a,b), _LTOG bsf ARG2(b,a)) -#define BSF_W(a, b) CHOICE(bsfw ARG2(a,b), bsfw ARG2(a,b), _WTOG bsf ARG2(b,a)) -#define BSR_L(a, b) CHOICE(bsrl ARG2(a,b), bsrl ARG2(a,b), _LTOG bsr ARG2(b,a)) -#define BSR_W(a, b) CHOICE(bsrw ARG2(a,b), bsrw ARG2(a,b), _WTOG bsr ARG2(b,a)) -#define BT_L(a, b) CHOICE(btl ARG2(a,b), btl ARG2(a,b), _LTOG bt ARG2(b,a)) -#define BT_W(a, b) CHOICE(btw ARG2(a,b), btw ARG2(a,b), _WTOG bt ARG2(b,a)) -#define BTC_L(a, b) CHOICE(btcl ARG2(a,b), btcl ARG2(a,b), _LTOG btc ARG2(b,a)) -#define BTC_W(a, b) CHOICE(btcw ARG2(a,b), btcw ARG2(a,b), _WTOG btc ARG2(b,a)) -#define BTR_L(a, b) CHOICE(btrl ARG2(a,b), btrl ARG2(a,b), _LTOG btr ARG2(b,a)) -#define BTR_W(a, b) CHOICE(btrw ARG2(a,b), btrw ARG2(a,b), _WTOG btr ARG2(b,a)) -#define BTS_L(a, b) CHOICE(btsl ARG2(a,b), btsl ARG2(a,b), _LTOG bts ARG2(b,a)) -#define BTS_W(a, b) CHOICE(btsw ARG2(a,b), btsw ARG2(a,b), _WTOG bts ARG2(b,a)) -#define CALL(a) CHOICE(call a, call a, call a) -#define CALLF(s,a) CHOICE(lcall ARG2(s,a), lcall ARG2(s,a), callf s:a) -#define CBW CHOICE(cbtw, cbw, cbw) -#define CWDE CHOICE(cwtd, cwde, cwde) -#define CLC CHOICE(clc, clc, clc) -#define CLD CHOICE(cld, cld, cld) -#define CLI CHOICE(cli, cli, cli) -#define CLTS CHOICE(clts, clts, clts) -#define CMC CHOICE(cmc, cmc, cmc) -#define CMP_L(a, b) CHOICE(cmpl ARG2(a,b), cmpl ARG2(a,b), _LTOG cmp ARG2(b,a)) -#define CMP_W(a, b) CHOICE(cmpw ARG2(a,b), cmpw ARG2(a,b), _WTOG cmp ARG2(b,a)) -#define CMP_B(a, b) CHOICE(cmpb ARG2(a,b), cmpb ARG2(a,b), cmpb ARG2(b,a)) -#define CMPS_L CHOICE(cmpsl, cmpsl, _LTOG cmps) -#define CMPS_W CHOICE(cmpsw, cmpsw, _WTOG cmps) -#define CMPS_B CHOICE(cmpsb, cmpsb, cmpsb) -#define CWD CHOICE(cwtl, cwd, cwd) -#define CDQ CHOICE(cltd, cdq, cdq) -#define DAA CHOICE(daa, daa, daa) -#define DAS CHOICE(das, das, das) -#define DEC_L(a) CHOICE(decl a, decl a, _LTOG dec a) -#define DEC_W(a) CHOICE(decw a, decw a, _WTOG dec a) -#define DEC_B(a) CHOICE(decb a, decb a, decb a) -#define DIV_L(a) CHOICE(divl a, divl a, div a) -#define DIV_W(a) CHOICE(divw a, divw a, div a) -#define DIV_B(a) CHOICE(divb a, divb a, divb a) -#define ENTER(a,b) CHOICE(enter ARG2(a,b), enter ARG2(a,b), enter ARG2(b,a)) -#define HLT CHOICE(hlt, hlt, hlt) -#define IDIV_L(a) CHOICE(idivl a, idivl a, _LTOG idiv a) -#define IDIV_W(a) CHOICE(idivw a, idivw a, _WTOG idiv a) -#define IDIV_B(a) CHOICE(idivb a, idivb a, idivb a) -/* More forms than this for imul!! */ -#define IMUL_L(a, b) CHOICE(imull ARG2(a,b), imull ARG2(a,b), _LTOG imul ARG2(b,a)) -#define IMUL_W(a, b) CHOICE(imulw ARG2(a,b), imulw ARG2(a,b), _WTOG imul ARG2(b,a)) -#define IMUL_B(a) CHOICE(imulb a, imulb a, imulb a) -#define IN_L CHOICE(inl (DX), inl ARG2(DX,EAX), _LTOG in DX) -#define IN_W CHOICE(inw (DX), inw ARG2(DX,AX), _WTOG in DX) -#define IN_B CHOICE(inb (DX), inb ARG2(DX,AL), inb DX) -/* Please AS code writer: use the following ONLY, if you refer to ports<256 - * directly, but not in IN1_W(DX), for instance, even if IN1_ looks nicer - */ -#if defined (sun) -#define IN1_L(a) CHOICE(inl (a), inl ARG2(a,EAX), _LTOG in a) -#define IN1_W(a) CHOICE(inw (a), inw ARG2(a,AX), _WTOG in a) -#define IN1_B(a) CHOICE(inb (a), inb ARG2(a,AL), inb a) -#else -#define IN1_L(a) CHOICE(inl a, inl ARG2(a,EAX), _LTOG in a) -#define IN1_W(a) CHOICE(inw a, inw ARG2(a,AX), _WTOG in a) -#define IN1_B(a) CHOICE(inb a, inb ARG2(a,AL), inb a) -#endif -#define INC_L(a) CHOICE(incl a, incl a, _LTOG inc a) -#define INC_W(a) CHOICE(incw a, incw a, _WTOG inc a) -#define INC_B(a) CHOICE(incb a, incb a, incb a) -#define INS_L CHOICE(insl, insl, _LTOG ins) -#define INS_W CHOICE(insw, insw, _WTOG ins) -#define INS_B CHOICE(insb, insb, insb) -#define INT(a) CHOICE(int a, int a, int a) -#define INT3 CHOICE(int CONST(3), int3, int CONST(3)) -#define INTO CHOICE(into, into, into) -#define IRET CHOICE(iret, iret, iret) -#define IRETD CHOICE(iret, iret, iretd) -#define JA(a) CHOICE(ja a, ja a, ja a) -#define JAE(a) CHOICE(jae a, jae a, jae a) -#define JB(a) CHOICE(jb a, jb a, jb a) -#define JBE(a) CHOICE(jbe a, jbe a, jbe a) -#define JC(a) CHOICE(jc a, jc a, jc a) -#define JE(a) CHOICE(je a, je a, je a) -#define JG(a) CHOICE(jg a, jg a, jg a) -#define JGE(a) CHOICE(jge a, jge a, jge a) -#define JL(a) CHOICE(jl a, jl a, jl a) -#define JLE(a) CHOICE(jle a, jle a, jle a) -#define JNA(a) CHOICE(jna a, jna a, jna a) -#define JNAE(a) CHOICE(jnae a, jnae a, jnae a) -#define JNB(a) CHOICE(jnb a, jnb a, jnb a) -#define JNBE(a) CHOICE(jnbe a, jnbe a, jnbe a) -#define JNC(a) CHOICE(jnc a, jnc a, jnc a) -#define JNE(a) CHOICE(jne a, jne a, jne a) -#define JNG(a) CHOICE(jng a, jng a, jng a) -#define JNGE(a) CHOICE(jnge a, jnge a, jnge a) -#define JNL(a) CHOICE(jnl a, jnl a, jnl a) -#define JNLE(a) CHOICE(jnle a, jnle a, jnle a) -#define JNO(a) CHOICE(jno a, jno a, jno a) -#define JNP(a) CHOICE(jnp a, jnp a, jnp a) -#define JNS(a) CHOICE(jns a, jns a, jns a) -#define JNZ(a) CHOICE(jnz a, jnz a, jnz a) -#define JO(a) CHOICE(jo a, jo a, jo a) -#define JP(a) CHOICE(jp a, jp a, jp a) -#define JPE(a) CHOICE(jpe a, jpe a, jpe a) -#define JPO(a) CHOICE(jpo a, jpo a, jpo a) -#define JS(a) CHOICE(js a, js a, js a) -#define JZ(a) CHOICE(jz a, jz a, jz a) -#define JMP(a) CHOICE(jmp a, jmp a, jmp a) -#define JMPF(s,a) CHOICE(ljmp ARG2(s,a), ljmp ARG2(s,a), jmpf s:a) -#define LAHF CHOICE(lahf, lahf, lahf) -#if !defined(_REAL_MODE) && !defined(_V86_MODE) -#define LAR(a, b) CHOICE(lar ARG2(a, b), lar ARG2(a, b), lar ARG2(b, a)) -#endif -#define LEA_L(a, b) CHOICE(leal ARG2(a,b), leal ARG2(a,b), _LTOG lea ARG2(b,a)) -#define LEA_W(a, b) CHOICE(leaw ARG2(a,b), leaw ARG2(a,b), _WTOG lea ARG2(b,a)) -#define LEAVE CHOICE(leave, leave, leave) -#define LGDT(a) CHOICE(lgdt a, lgdt a, lgdt a) -#define LIDT(a) CHOICE(lidt a, lidt a, lidt a) -#define LDS(a, b) CHOICE(ldsl ARG2(a,b), lds ARG2(a,b), lds ARG2(b,a)) -#define LES(a, b) CHOICE(lesl ARG2(a,b), les ARG2(a,b), les ARG2(b,a)) -#define LFS(a, b) CHOICE(lfsl ARG2(a,b), lfs ARG2(a,b), lfs ARG2(b,a)) -#define LGS(a, b) CHOICE(lgsl ARG2(a,b), lgs ARG2(a,b), lgs ARG2(b,a)) -#define LSS(a, b) CHOICE(lssl ARG2(a,b), lss ARG2(a,b), lss ARG2(b,a)) -#define LLDT(a) CHOICE(lldt a, lldt a, lldt a) -#define LMSW(a) CHOICE(lmsw a, lmsw a, lmsw a) -#define LOCK CHOICE(lock, lock, lock) -#define LODS_L CHOICE(lodsl, lodsl, _LTOG lods) -#define LODS_W CHOICE(lodsw, lodsw, _WTOG lods) -#define LODS_B CHOICE(lodsb, lodsb, lodsb) -#define LOOP(a) CHOICE(loop a, loop a, loop a) -#define LOOPE(a) CHOICE(loope a, loope a, loope a) -#define LOOPZ(a) CHOICE(loopz a, loopz a, loopz a) -#define LOOPNE(a) CHOICE(loopne a, loopne a, loopne a) -#define LOOPNZ(a) CHOICE(loopnz a, loopnz a, loopnz a) -#if !defined(_REAL_MODE) && !defined(_V86_MODE) -#define LSL(a, b) CHOICE(lsl ARG2(a,b), lsl ARG2(a,b), lsl ARG2(b,a)) -#endif -#define LTR(a) CHOICE(ltr a, ltr a, ltr a) -#define MOV_SR(a, b) CHOICE(movw ARG2(a,b), mov ARG2(a,b), mov ARG2(b,a)) -#define MOV_L(a, b) CHOICE(movl ARG2(a,b), movl ARG2(a,b), _LTOG mov ARG2(b,a)) -#define MOV_W(a, b) CHOICE(movw ARG2(a,b), movw ARG2(a,b), _WTOG mov ARG2(b,a)) -#define MOV_B(a, b) CHOICE(movb ARG2(a,b), movb ARG2(a,b), movb ARG2(b,a)) -#define MOVS_L CHOICE(movsl, movsl, _LTOG movs) -#define MOVS_W CHOICE(movsw, movsw, _WTOG movs) -#define MOVS_B CHOICE(movsb, movsb, movsb) -#define MOVSX_BL(a, b) CHOICE(movsbl ARG2(a,b), movsbl ARG2(a,b), movsx ARG2(b,a)) -#define MOVSX_BW(a, b) CHOICE(movsbw ARG2(a,b), movsbw ARG2(a,b), movsx ARG2(b,a)) -#define MOVSX_WL(a, b) CHOICE(movswl ARG2(a,b), movswl ARG2(a,b), movsx ARG2(b,a)) -#define MOVZX_BL(a, b) CHOICE(movzbl ARG2(a,b), movzbl ARG2(a,b), movzx ARG2(b,a)) -#define MOVZX_BW(a, b) CHOICE(movzbw ARG2(a,b), movzbw ARG2(a,b), movzx ARG2(b,a)) -#define MOVZX_WL(a, b) CHOICE(movzwl ARG2(a,b), movzwl ARG2(a,b), movzx ARG2(b,a)) -#define MUL_L(a) CHOICE(mull a, mull a, _LTOG mul a) -#define MUL_W(a) CHOICE(mulw a, mulw a, _WTOG mul a) -#define MUL_B(a) CHOICE(mulb a, mulb a, mulb a) -#define NEG_L(a) CHOICE(negl a, negl a, _LTOG neg a) -#define NEG_W(a) CHOICE(negw a, negw a, _WTOG neg a) -#define NEG_B(a) CHOICE(negb a, negb a, negb a) -#define NOP CHOICE(nop, nop, nop) -#define NOT_L(a) CHOICE(notl a, notl a, _LTOG not a) -#define NOT_W(a) CHOICE(notw a, notw a, _WTOG not a) -#define NOT_B(a) CHOICE(notb a, notb a, notb a) -#define OR_L(a,b) CHOICE(orl ARG2(a,b), orl ARG2(a,b), _LTOG or ARG2(b,a)) -#define OR_W(a,b) CHOICE(orw ARG2(a,b), orw ARG2(a,b), _WTOG or ARG2(b,a)) -#define OR_B(a,b) CHOICE(orb ARG2(a,b), orb ARG2(a,b), orb ARG2(b,a)) -#define OUT_L CHOICE(outl (DX), outl ARG2(EAX,DX), _LTOG out DX) -#define OUT_W CHOICE(outw (DX), outw ARG2(AX,DX), _WTOG out DX) -#define OUT_B CHOICE(outb (DX), outb ARG2(AL,DX), outb DX) -/* Please AS code writer: use the following ONLY, if you refer to ports<256 - * directly, but not in OUT1_W(DX), for instance, even if OUT1_ looks nicer - */ -#define OUT1_L(a) CHOICE(outl (a), outl ARG2(EAX,a), _LTOG out a) -#define OUT1_W(a) CHOICE(outw (a), outw ARG2(AX,a), _WTOG out a) -#define OUT1_B(a) CHOICE(outb (a), outb ARG2(AL,a), outb a) -#define OUTS_L CHOICE(outsl, outsl, _LTOG outs) -#define OUTS_W CHOICE(outsw, outsw, _WTOG outs) -#define OUTS_B CHOICE(outsb, outsb, outsb) -#define POP_SR(a) CHOICE(pop a, pop a, pop a) -#define POP_L(a) CHOICE(popl a, popl a, _LTOG pop a) -#define POP_W(a) CHOICE(popw a, popw a, _WTOG pop a) -#define POPA_L CHOICE(popal, popal, _LTOG popa) -#define POPA_W CHOICE(popaw, popaw, _WTOG popa) -#define POPF_L CHOICE(popfl, popfl, _LTOG popf) -#define POPF_W CHOICE(popfw, popfw, _WTOG popf) -#define PUSH_SR(a) CHOICE(push a, push a, push a) -#define PUSH_L(a) CHOICE(pushl a, pushl a, _LTOG push a) -#define PUSH_W(a) CHOICE(pushw a, pushw a, _WTOG push a) -#define PUSH_B(a) CHOICE(push a, pushb a, push a) -#define PUSHA_L CHOICE(pushal, pushal, _LTOG pusha) -#define PUSHA_W CHOICE(pushaw, pushaw, _WTOG pusha) -#define PUSHF_L CHOICE(pushfl, pushfl, _LTOG pushf) -#define PUSHF_W CHOICE(pushfw, pushfw, _WTOG pushf) -#define RCL_L(a, b) CHOICE(rcll ARG2(a,b), rcll ARG2(a,b), _LTOG rcl ARG2(b,a)) -#define RCL_W(a, b) CHOICE(rclw ARG2(a,b), rclw ARG2(a,b), _WTOG rcl ARG2(b,a)) -#define RCL_B(a, b) CHOICE(rclb ARG2(a,b), rclb ARG2(a,b), rclb ARG2(b,a)) -#define RCR_L(a, b) CHOICE(rcrl ARG2(a,b), rcrl ARG2(a,b), _LTOG rcr ARG2(b,a)) -#define RCR_W(a, b) CHOICE(rcrw ARG2(a,b), rcrw ARG2(a,b), _WTOG rcr ARG2(b,a)) -#define RCR_B(a, b) CHOICE(rcrb ARG2(a,b), rcrb ARG2(a,b), rcrb ARG2(b,a)) -#define ROL_L(a, b) CHOICE(roll ARG2(a,b), roll ARG2(a,b), _LTOG rol ARG2(b,a)) -#define ROL_W(a, b) CHOICE(rolw ARG2(a,b), rolw ARG2(a,b), _WTOG rol ARG2(b,a)) -#define ROL_B(a, b) CHOICE(rolb ARG2(a,b), rolb ARG2(a,b), rolb ARG2(b,a)) -#define ROR_L(a, b) CHOICE(rorl ARG2(a,b), rorl ARG2(a,b), _LTOG ror ARG2(b,a)) -#define ROR_W(a, b) CHOICE(rorw ARG2(a,b), rorw ARG2(a,b), _WTOG ror ARG2(b,a)) -#define ROR_B(a, b) CHOICE(rorb ARG2(a,b), rorb ARG2(a,b), rorb ARG2(b,a)) -#define REP CHOICE(rep ;, rep ;, repe) -#define REPE CHOICE(repz ;, repe ;, repe) -#define REPNE CHOICE(repnz ;, repne ;, repne) -#define REPNZ REPNE -#define REPZ REPE -#define RET CHOICE(ret, ret, ret) -#define SAHF CHOICE(sahf, sahf, sahf) -#define SAL_L(a, b) CHOICE(sall ARG2(a,b), sall ARG2(a,b), _LTOG sal ARG2(b,a)) -#define SAL_W(a, b) CHOICE(salw ARG2(a,b), salw ARG2(a,b), _WTOG sal ARG2(b,a)) -#define SAL_B(a, b) CHOICE(salb ARG2(a,b), salb ARG2(a,b), salb ARG2(b,a)) -#define SAR_L(a, b) CHOICE(sarl ARG2(a,b), sarl ARG2(a,b), _LTOG sar ARG2(b,a)) -#define SAR_W(a, b) CHOICE(sarw ARG2(a,b), sarw ARG2(a,b), _WTOG sar ARG2(b,a)) -#define SAR_B(a, b) CHOICE(sarb ARG2(a,b), sarb ARG2(a,b), sarb ARG2(b,a)) -#define SBB_L(a, b) CHOICE(sbbl ARG2(a,b), sbbl ARG2(a,b), _LTOG sbb ARG2(b,a)) -#define SBB_W(a, b) CHOICE(sbbw ARG2(a,b), sbbw ARG2(a,b), _WTOG sbb ARG2(b,a)) -#define SBB_B(a, b) CHOICE(sbbb ARG2(a,b), sbbb ARG2(a,b), sbbb ARG2(b,a)) -#define SCAS_L CHOICE(scasl, scasl, _LTOG scas) -#define SCAS_W CHOICE(scasw, scasw, _WTOG scas) -#define SCAS_B CHOICE(scasb, scasb, scasb) -#define SETA(a) CHOICE(seta a, seta a, seta a) -#define SETAE(a) CHOICE(setae a, setae a, setae a) -#define SETB(a) CHOICE(setb a, setb a, setb a) -#define SETBE(a) CHOICE(setbe a, setbe a, setbe a) -#define SETC(a) CHOICE(setc a, setb a, setb a) -#define SETE(a) CHOICE(sete a, sete a, sete a) -#define SETG(a) CHOICE(setg a, setg a, setg a) -#define SETGE(a) CHOICE(setge a, setge a, setge a) -#define SETL(a) CHOICE(setl a, setl a, setl a) -#define SETLE(a) CHOICE(setle a, setle a, setle a) -#define SETNA(a) CHOICE(setna a, setna a, setna a) -#define SETNAE(a) CHOICE(setnae a, setnae a, setnae a) -#define SETNB(a) CHOICE(setnb a, setnb a, setnb a) -#define SETNBE(a) CHOICE(setnbe a, setnbe a, setnbe a) -#define SETNC(a) CHOICE(setnc a, setnb a, setnb a) -#define SETNE(a) CHOICE(setne a, setne a, setne a) -#define SETNG(a) CHOICE(setng a, setng a, setng a) -#define SETNGE(a) CHOICE(setnge a, setnge a, setnge a) -#define SETNL(a) CHOICE(setnl a, setnl a, setnl a) -#define SETNLE(a) CHOICE(setnle a, setnle a, setnle a) -#define SETNO(a) CHOICE(setno a, setno a, setno a) -#define SETNP(a) CHOICE(setnp a, setnp a, setnp a) -#define SETNS(a) CHOICE(setns a, setns a, setna a) -#define SETNZ(a) CHOICE(setnz a, setnz a, setnz a) -#define SETO(a) CHOICE(seto a, seto a, seto a) -#define SETP(a) CHOICE(setp a, setp a, setp a) -#define SETPE(a) CHOICE(setpe a, setpe a, setpe a) -#define SETPO(a) CHOICE(setpo a, setpo a, setpo a) -#define SETS(a) CHOICE(sets a, sets a, seta a) -#define SETZ(a) CHOICE(setz a, setz a, setz a) -#define SGDT(a) CHOICE(sgdt a, sgdt a, sgdt a) -#define SIDT(a) CHOICE(sidt a, sidt a, sidt a) -#define SHL_L(a, b) CHOICE(shll ARG2(a,b), shll ARG2(a,b), _LTOG shl ARG2(b,a)) -#define SHL_W(a, b) CHOICE(shlw ARG2(a,b), shlw ARG2(a,b), _WTOG shl ARG2(b,a)) -#define SHL_B(a, b) CHOICE(shlb ARG2(a,b), shlb ARG2(a,b), shlb ARG2(b,a)) -#define SHLD_L(a,b,c) CHOICE(shldl ARG3(a,b,c), shldl ARG3(a,b,c), _LTOG shld ARG3(c,b,a)) -#define SHLD2_L(a,b) CHOICE(shldl ARG2(a,b), shldl ARG3(CL,a,b), _LTOG shld ARG3(b,a,CL)) -#define SHLD_W(a,b,c) CHOICE(shldw ARG3(a,b,c), shldw ARG3(a,b,c), _WTOG shld ARG3(c,b,a)) -#define SHLD2_W(a,b) CHOICE(shldw ARG2(a,b), shldw ARG3(CL,a,b), _WTOG shld ARG3(b,a,CL)) -#define SHR_L(a, b) CHOICE(shrl ARG2(a,b), shrl ARG2(a,b), _LTOG shr ARG2(b,a)) -#define SHR_W(a, b) CHOICE(shrw ARG2(a,b), shrw ARG2(a,b), _WTOG shr ARG2(b,a)) -#define SHR_B(a, b) CHOICE(shrb ARG2(a,b), shrb ARG2(a,b), shrb ARG2(b,a)) -#define SHRD_L(a,b,c) CHOICE(shrdl ARG3(a,b,c), shrdl ARG3(a,b,c), _LTOG shrd ARG3(c,b,a)) -#define SHRD2_L(a,b) CHOICE(shrdl ARG2(a,b), shrdl ARG3(CL,a,b), _LTOG shrd ARG3(b,a,CL)) -#define SHRD_W(a,b,c) CHOICE(shrdw ARG3(a,b,c), shrdw ARG3(a,b,c), _WTOG shrd ARG3(c,b,a)) -#define SHRD2_W(a,b) CHOICE(shrdw ARG2(a,b), shrdw ARG3(CL,a,b), _WTOG shrd ARG3(b,a,CL)) -#define SLDT(a) CHOICE(sldt a, sldt a, sldt a) -#define SMSW(a) CHOICE(smsw a, smsw a, smsw a) -#define STC CHOICE(stc, stc, stc) -#define STD CHOICE(std, std, std) -#define STI CHOICE(sti, sti, sti) -#define STOS_L CHOICE(stosl, stosl, _LTOG stos) -#define STOS_W CHOICE(stosw, stosw, _WTOG stos) -#define STOS_B CHOICE(stosb, stosb, stosb) -#define STR(a) CHOICE(str a, str a, str a) -#define SUB_L(a, b) CHOICE(subl ARG2(a,b), subl ARG2(a,b), _LTOG sub ARG2(b,a)) -#define SUB_W(a, b) CHOICE(subw ARG2(a,b), subw ARG2(a,b), _WTOG sub ARG2(b,a)) -#define SUB_B(a, b) CHOICE(subb ARG2(a,b), subb ARG2(a,b), subb ARG2(b,a)) -#define TEST_L(a, b) CHOICE(testl ARG2(a,b), testl ARG2(a,b), _LTOG test ARG2(b,a)) -#define TEST_W(a, b) CHOICE(testw ARG2(a,b), testw ARG2(a,b), _WTOG test ARG2(b,a)) -#define TEST_B(a, b) CHOICE(testb ARG2(a,b), testb ARG2(a,b), testb ARG2(b,a)) -#define VERR(a) CHOICE(verr a, verr a, verr a) -#define VERW(a) CHOICE(verw a, verw a, verw a) -#define WAIT CHOICE(wait, wait, wait) -#define XCHG_L(a, b) CHOICE(xchgl ARG2(a,b), xchgl ARG2(a,b), _LTOG xchg ARG2(b,a)) -#define XCHG_W(a, b) CHOICE(xchgw ARG2(a,b), xchgw ARG2(a,b), _WTOG xchg ARG2(b,a)) -#define XCHG_B(a, b) CHOICE(xchgb ARG2(a,b), xchgb ARG2(a,b), xchgb ARG2(b,a)) -#define XLAT CHOICE(xlat, xlat, xlat) -#define XOR_L(a, b) CHOICE(xorl ARG2(a,b), xorl ARG2(a,b), _LTOG xor ARG2(b,a)) -#define XOR_W(a, b) CHOICE(xorw ARG2(a,b), xorw ARG2(a,b), _WTOG xor ARG2(b,a)) -#define XOR_B(a, b) CHOICE(xorb ARG2(a,b), xorb ARG2(a,b), xorb ARG2(b,a)) - - -/* Floating Point Instructions */ -#define F2XM1 CHOICE(f2xm1, f2xm1, f2xm1) -#define FABS CHOICE(fabs, fabs, fabs) -#define FADD_D(a) CHOICE(faddl a, faddl a, faddd a) -#define FADD_S(a) CHOICE(fadds a, fadds a, fadds a) -#define FADD2(a, b) CHOICE(fadd ARG2(a,b), fadd ARG2(a,b), fadd ARG2(b,a)) -#define FADDP(a, b) CHOICE(faddp ARG2(a,b), faddp ARG2(a,b), faddp ARG2(b,a)) -#define FIADD_L(a) CHOICE(fiaddl a, fiaddl a, fiaddl a) -#define FIADD_W(a) CHOICE(fiadd a, fiadds a, fiadds a) -#define FBLD(a) CHOICE(fbld a, fbld a, fbld a) -#define FBSTP(a) CHOICE(fbstp a, fbstp a, fbstp a) -#define FCHS CHOICE(fchs, fchs, fchs) -#define FCLEX CHOICE(fclex, wait; fnclex, wait; fclex) -#define FNCLEX CHOICE(fnclex, fnclex, fclex) -#define FCOM(a) CHOICE(fcom a, fcom a, fcom a) -#define FCOM_D(a) CHOICE(fcoml a, fcoml a, fcomd a) -#define FCOM_S(a) CHOICE(fcoms a, fcoms a, fcoms a) -#define FCOMP(a) CHOICE(fcomp a, fcomp a, fcomp a) -#define FCOMP_D(a) CHOICE(fcompl a, fcompl a, fcompd a) -#define FCOMP_S(a) CHOICE(fcomps a, fcomps a, fcomps a) -#define FCOMPP CHOICE(fcompp, fcompp, fcompp) -#define FCOS CHOICE(fcos, fcos, fcos) -#define FDECSTP CHOICE(fdecstp, fdecstp, fdecstp) -#define FDIV_D(a) CHOICE(fdivl a, fdivl a, fdivd a) -#define FDIV_S(a) CHOICE(fdivs a, fdivs a, fdivs a) -#define FDIV2(a, b) CHOICE(fdiv ARG2(a,b), fdiv ARG2(a,b), fdiv ARG2(b,a)) -#define FDIVP(a, b) CHOICE(fdivp ARG2(a,b), fdivp ARG2(a,b), fdivp ARG2(b,a)) -#define FIDIV_L(a) CHOICE(fidivl a, fidivl a, fidivl a) -#define FIDIV_W(a) CHOICE(fidiv a, fidivs a, fidivs a) -#define FDIVR_D(a) CHOICE(fdivrl a, fdivrl a, fdivrd a) -#define FDIVR_S(a) CHOICE(fdivrs a, fdivrs a, fdivrs a) -#define FDIVR2(a, b) CHOICE(fdivr ARG2(a,b), fdivr ARG2(a,b), fdivr ARG2(b,a)) -#define FDIVRP(a, b) CHOICE(fdivrp ARG2(a,b), fdivrp ARG2(a,b), fdivrp ARG2(b,a)) -#define FIDIVR_L(a) CHOICE(fidivrl a, fidivrl a, fidivrl a) -#define FIDIVR_W(a) CHOICE(fidivr a, fidivrs a, fidivrs a) -#define FFREE(a) CHOICE(ffree a, ffree a, ffree a) -#define FICOM_L(a) CHOICE(ficoml a, ficoml a, ficoml a) -#define FICOM_W(a) CHOICE(ficom a, ficoms a, ficoms a) -#define FICOMP_L(a) CHOICE(ficompl a, ficompl a, ficompl a) -#define FICOMP_W(a) CHOICE(ficomp a, ficomps a, ficomps a) -#define FILD_Q(a) CHOICE(fildll a, fildq a, fildq a) -#define FILD_L(a) CHOICE(fildl a, fildl a, fildl a) -#define FILD_W(a) CHOICE(fild a, filds a, filds a) -#define FINCSTP CHOICE(fincstp, fincstp, fincstp) -#define FINIT CHOICE(finit, wait; fninit, wait; finit) -#define FNINIT CHOICE(fninit, fninit, finit) -#define FIST_L(a) CHOICE(fistl a, fistl a, fistl a) -#define FIST_W(a) CHOICE(fist a, fists a, fists a) -#define FISTP_Q(a) CHOICE(fistpll a, fistpq a, fistpq a) -#define FISTP_L(a) CHOICE(fistpl a, fistpl a, fistpl a) -#define FISTP_W(a) CHOICE(fistp a, fistps a, fistps a) -#define FLD_X(a) CHOICE(fldt a, fldt a, fldx a) /* 80 bit data type! */ -#define FLD_D(a) CHOICE(fldl a, fldl a, fldd a) -#define FLD_S(a) CHOICE(flds a, flds a, flds a) -#define FLD1 CHOICE(fld1, fld1, fld1) -#define FLDL2T CHOICE(fldl2t, fldl2t, fldl2t) -#define FLDL2E CHOICE(fldl2e, fldl2e, fldl2e) -#define FLDPI CHOICE(fldpi, fldpi, fldpi) -#define FLDLG2 CHOICE(fldlg2, fldlg2, fldlg2) -#define FLDLN2 CHOICE(fldln2, fldln2, fldln2) -#define FLDZ CHOICE(fldz, fldz, fldz) -#define FLDCW(a) CHOICE(fldcw a, fldcw a, fldcw a) -#define FLDENV(a) CHOICE(fldenv a, fldenv a, fldenv a) -#define FMUL_S(a) CHOICE(fmuls a, fmuls a, fmuls a) -#define FMUL_D(a) CHOICE(fmull a, fmull a, fmuld a) -#define FMUL2(a, b) CHOICE(fmul ARG2(a,b), fmul ARG2(a,b), fmul ARG2(b,a)) -#define FMULP(a, b) CHOICE(fmulp ARG2(a,b), fmulp ARG2(a,b), fmulp ARG2(b,a)) -#define FIMUL_L(a) CHOICE(fimull a, fimull a, fimull a) -#define FIMUL_W(a) CHOICE(fimul a, fimuls a, fimuls a) -#define FNOP CHOICE(fnop, fnop, fnop) -#define FPATAN CHOICE(fpatan, fpatan, fpatan) -#define FPREM CHOICE(fprem, fprem, fprem) -#define FPREM1 CHOICE(fprem1, fprem1, fprem1) -#define FPTAN CHOICE(fptan, fptan, fptan) -#define FRNDINT CHOICE(frndint, frndint, frndint) -#define FRSTOR(a) CHOICE(frstor a, frstor a, frstor a) -#define FSAVE(a) CHOICE(fsave a, wait; fnsave a, wait; fsave a) -#define FNSAVE(a) CHOICE(fnsave a, fnsave a, fsave a) -#define FSCALE CHOICE(fscale, fscale, fscale) -#define FSIN CHOICE(fsin, fsin, fsin) -#define FSINCOS CHOICE(fsincos, fsincos, fsincos) -#define FSQRT CHOICE(fsqrt, fsqrt, fsqrt) -#define FST_D(a) CHOICE(fstl a, fstl a, fstd a) -#define FST_S(a) CHOICE(fsts a, fsts a, fsts a) -#define FSTP_X(a) CHOICE(fstpt a, fstpt a, fstpx a) -#define FSTP_D(a) CHOICE(fstpl a, fstpl a, fstpd a) -#define FSTP_S(a) CHOICE(fstps a, fstps a, fstps a) -#define FSTP(a) CHOICE(fstp a, fstp a, fstp a) -#define FSTCW(a) CHOICE(fstcw a, wait; fnstcw a, wait; fstcw a) -#define FNSTCW(a) CHOICE(fnstcw a, fnstcw a, fstcw a) -#define FSTENV(a) CHOICE(fstenv a, wait; fnstenv a, fstenv a) -#define FNSTENV(a) CHOICE(fnstenv a, fnstenv a, fstenv a) -#define FSTSW(a) CHOICE(fstsw a, wait; fnstsw a, wait; fstsw a) -#define FNSTSW(a) CHOICE(fnstsw a, fnstsw a, fstsw a) -#define FSUB_S(a) CHOICE(fsubs a, fsubs a, fsubs a) -#define FSUB_D(a) CHOICE(fsubl a, fsubl a, fsubd a) -#define FSUB2(a, b) CHOICE(fsub ARG2(a,b), fsub ARG2(a,b), fsub ARG2(b,a)) -#define FSUBP(a, b) CHOICE(fsubp ARG2(a,b), fsubp ARG2(a,b), fsubp ARG2(b,a)) -#define FISUB_L(a) CHOICE(fisubl a, fisubl a, fisubl a) -#define FISUB_W(a) CHOICE(fisub a, fisubs a, fisubs a) -#define FSUBR_S(a) CHOICE(fsubrs a, fsubrs a, fsubrs a) -#define FSUBR_D(a) CHOICE(fsubrl a, fsubrl a, fsubrd a) -#define FSUBR2(a, b) CHOICE(fsubr ARG2(a,b), fsubr ARG2(a,b), fsubr ARG2(b,a)) -#define FSUBRP(a, b) CHOICE(fsubrp ARG2(a,b), fsubrp ARG2(a,b), fsubrp ARG2(b,a)) -#define FISUBR_L(a) CHOICE(fisubrl a, fisubrl a, fisubrl a) -#define FISUBR_W(a) CHOICE(fisubr a, fisubrs a, fisubrs a) -#define FTST CHOICE(ftst, ftst, ftst) -#define FUCOM(a) CHOICE(fucom a, fucom a, fucom a) -#define FUCOMP(a) CHOICE(fucomp a, fucomp a, fucomp a) -#define FUCOMPP CHOICE(fucompp, fucompp, fucompp) -#define FWAIT CHOICE(wait, wait, wait) -#define FXAM CHOICE(fxam, fxam, fxam) -#define FXCH(a) CHOICE(fxch a, fxch a, fxch a) -#define FXTRACT CHOICE(fxtract, fxtract, fxtract) -#define FYL2X CHOICE(fyl2x, fyl2x, fyl2x) -#define FYL2XP1 CHOICE(fyl2xp1, fyl2xp1, fyl2xp1) - -/* New instructions */ -#define CPUID CHOICE(D_BYTE ARG2(15, 162), cpuid, D_BYTE ARG2(15, 162)) -#define RDTSC CHOICE(D_BYTE ARG2(15, 49), rdtsc, D_BYTE ARG2(15, 49)) - -#else /* NASM_ASSEMBLER || MASM_ASSEMBLER is defined */ - - /****************************************/ - /* */ - /* Intel style assemblers. */ - /* (NASM and MASM) */ - /* */ - /****************************************/ - -#define P_EAX EAX -#define L_EAX EAX -#define W_AX AX -#define B_AH AH -#define B_AL AL - -#define P_EBX EBX -#define L_EBX EBX -#define W_BX BX -#define B_BH BH -#define B_BL BL - -#define P_ECX ECX -#define L_ECX ECX -#define W_CX CX -#define B_CH CH -#define B_CL CL - -#define P_EDX EDX -#define L_EDX EDX -#define W_DX DX -#define B_DH DH -#define B_DL DL - -#define P_EBP EBP -#define L_EBP EBP -#define W_BP BP - -#define P_ESI ESI -#define L_ESI ESI -#define W_SI SI - -#define P_EDI EDI -#define L_EDI EDI -#define W_DI DI - -#define P_ESP ESP -#define L_ESP ESP -#define W_SP SP - -#define W_CS CS -#define W_SS SS -#define W_DS DS -#define W_ES ES -#define W_FS FS -#define W_GS GS - -#define X_ST ST -#define D_ST ST -#define L_ST ST - -#define P_MM0 mm0 -#define P_MM1 mm1 -#define P_MM2 mm2 -#define P_MM3 mm3 -#define P_MM4 mm4 -#define P_MM5 mm5 -#define P_MM6 mm6 -#define P_MM7 mm7 - -#define P_XMM0 xmm0 -#define P_XMM1 xmm1 -#define P_XMM2 xmm2 -#define P_XMM3 xmm3 -#define P_XMM4 xmm4 -#define P_XMM5 xmm5 -#define P_XMM6 xmm6 -#define P_XMM7 xmm7 - -#define CONCAT(x, y) x ## y -#define CONCAT3(x, y, z) x ## y ## z - -#if defined(NASM_ASSEMBLER) - -#define ST(n) st ## n -#define ST0 st0 - -#define TBYTE_PTR tword -#define QWORD_PTR qword -#define DWORD_PTR dword -#define WORD_PTR word -#define BYTE_PTR byte - -#define OFFSET - -#define GLOBL GLOBAL -#define ALIGNTEXT32 ALIGN 32 -#define ALIGNTEXT16 ALIGN 16 -#define ALIGNTEXT8 ALIGN 8 -#define ALIGNTEXT4 ALIGN 4 -#define ALIGNTEXT2 ALIGN 2 -#define ALIGNTEXT32ifNOP ALIGN 32 -#define ALIGNTEXT16ifNOP ALIGN 16 -#define ALIGNTEXT8ifNOP ALIGN 8 -#define ALIGNTEXT4ifNOP ALIGN 4 -#define ALIGNDATA32 ALIGN 32 -#define ALIGNDATA16 ALIGN 16 -#define ALIGNDATA8 ALIGN 8 -#define ALIGNDATA4 ALIGN 4 -#define ALIGNDATA2 ALIGN 2 -#define FILE(s) -#define STRING(s) db s -#define D_LONG dd -#define D_WORD dw -#define D_BYTE db -/* #define SPACE */ -/* #define COMM */ -#if defined(__WATCOMC__) -SECTION _TEXT public align=16 class=CODE use32 flat -SECTION _DATA public align=16 class=DATA use32 flat -#define SEG_TEXT SECTION _TEXT -#define SEG_DATA SECTION _DATA -#define SEG_BSS SECTION .bss -#else -#define SEG_DATA SECTION .data -#define SEG_TEXT SECTION .text -#define SEG_BSS SECTION .bss -#endif - -#define D_SPACE(n) db n REP 0 - -#define AS_BEGIN - -/* Jcc's should be handled better than this... */ -#define NEAR near - -#else /* MASM */ - -#define TBYTE_PTR tbyte ptr -#define QWORD_PTR qword ptr -#define DWORD_PTR dword ptr -#define WORD_PTR word ptr -#define BYTE_PTR byte ptr - -#define OFFSET offset - -#define GLOBL GLOBAL -#define ALIGNTEXT32 ALIGN 32 -#define ALIGNTEXT16 ALIGN 16 -#define ALIGNTEXT8 ALIGN 8 -#define ALIGNTEXT4 ALIGN 4 -#define ALIGNTEXT2 ALIGN 2 -#define ALIGNTEXT32ifNOP ALIGN 32 -#define ALIGNTEXT16ifNOP ALIGN 16 -#define ALIGNTEXT8ifNOP ALIGN 8 -#define ALIGNTEXT4ifNOP ALIGN 4 -#define ALIGNDATA32 ALIGN 32 -#define ALIGNDATA16 ALIGN 16 -#define ALIGNDATA8 ALIGN 8 -#define ALIGNDATA4 ALIGN 4 -#define ALIGNDATA2 ALIGN 2 -#define FILE(s) -#define STRING(s) db s -#define D_LONG dd -#define D_WORD dw -#define D_BYTE db -/* #define SPACE */ -/* #define COMM */ -#define SEG_DATA .DATA -#define SEG_TEXT .CODE -#define SEG_BSS .DATA - -#define D_SPACE(n) db n REP 0 - -#define AS_BEGIN - -#define NEAR - -#endif - -#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \ - || (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \ - || defined(__FreeBSD__) && __FreeBSD__ >= 3 -#define GLNAME(a) a -#else -#define GLNAME(a) CONCAT(_, a) -#endif - -/* - * Addressing Modes - */ - -/* Immediate Mode */ -#define P_ADDR(a) OFFSET a -#define X_ADDR(a) OFFSET a -#define D_ADDR(a) OFFSET a -#define L_ADDR(a) OFFSET a -#define W_ADDR(a) OFFSET a -#define B_ADDR(a) OFFSET a - -#define P_CONST(a) a -#define X_CONST(a) a -#define D_CONST(a) a -#define L_CONST(a) a -#define W_CONST(a) a -#define B_CONST(a) a - -/* Indirect Mode */ -#ifdef NASM_ASSEMBLER -#define P_CONTENT(a) [a] -#define X_CONTENT(a) TBYTE_PTR [a] -#define D_CONTENT(a) QWORD_PTR [a] -#define L_CONTENT(a) DWORD_PTR [a] -#define W_CONTENT(a) WORD_PTR [a] -#define B_CONTENT(a) BYTE_PTR [a] -#else -#define P_CONTENT(a) a -#define X_CONTENT(a) TBYTE_PTR a -#define D_CONTENT(a) QWORD_PTR a -#define L_CONTENT(a) DWORD_PTR a -#define W_CONTENT(a) WORD_PTR a -#define B_CONTENT(a) BYTE_PTR a -#endif - -/* Register a indirect */ -#define P_REGIND(a) [a] -#define X_REGIND(a) TBYTE_PTR [a] -#define D_REGIND(a) QWORD_PTR [a] -#define L_REGIND(a) DWORD_PTR [a] -#define W_REGIND(a) WORD_PTR [a] -#define B_REGIND(a) BYTE_PTR [a] - -/* Register b indirect plus displacement a */ -#define P_REGOFF(a, b) [b + a] -#define X_REGOFF(a, b) TBYTE_PTR [b + a] -#define D_REGOFF(a, b) QWORD_PTR [b + a] -#define L_REGOFF(a, b) DWORD_PTR [b + a] -#define W_REGOFF(a, b) WORD_PTR [b + a] -#define B_REGOFF(a, b) BYTE_PTR [b + a] - -/* Reg indirect Base + Index + Displacement - this is mainly for 16-bit mode - * which has no scaling - */ -#define P_REGBID(b, i, d) [b + i + d] -#define X_REGBID(b, i, d) TBYTE_PTR [b + i + d] -#define D_REGBID(b, i, d) QWORD_PTR [b + i + d] -#define L_REGBID(b, i, d) DWORD_PTR [b + i + d] -#define W_REGBID(b, i, d) WORD_PTR [b + i + d] -#define B_REGBID(b, i, d) BYTE_PTR [b + i + d] - -/* Reg indirect Base + (Index * Scale) */ -#define P_REGBIS(b, i, s) [b + i * s] -#define X_REGBIS(b, i, s) TBYTE_PTR [b + i * s] -#define D_REGBIS(b, i, s) QWORD_PTR [b + i * s] -#define L_REGBIS(b, i, s) DWORD_PTR [b + i * s] -#define W_REGBIS(b, i, s) WORD_PTR [b + i * s] -#define B_REGBIS(b, i, s) BYTE_PTR [b + i * s] - -/* Reg indirect Base + (Index * Scale) + Displacement */ -#define P_REGBISD(b, i, s, d) [b + i * s + d] -#define X_REGBISD(b, i, s, d) TBYTE_PTR [b + i * s + d] -#define D_REGBISD(b, i, s, d) QWORD_PTR [b + i * s + d] -#define L_REGBISD(b, i, s, d) DWORD_PTR [b + i * s + d] -#define W_REGBISD(b, i, s, d) WORD_PTR [b + i * s + d] -#define B_REGBISD(b, i, s, d) BYTE_PTR [b + i * s + d] - -/* Displaced Scaled Index: */ -#define P_REGDIS(d, i, s) [i * s + d] -#define X_REGDIS(d, i, s) TBYTE_PTR [i * s + d] -#define D_REGDIS(d, i, s) QWORD_PTR [i * s + d] -#define L_REGDIS(d, i, s) DWORD_PTR [i * s + d] -#define W_REGDIS(d, i, s) WORD_PTR [i * s + d] -#define B_REGDIS(d, i, s) BYTE_PTR [i * s + d] - -/* Indexed Base: */ -#define P_REGBI(b, i) [b + i] -#define X_REGBI(b, i) TBYTE_PTR [b + i] -#define D_REGBI(b, i) QWORD_PTR [b + i] -#define L_REGBI(b, i) DWORD_PTR [b + i] -#define W_REGBI(b, i) WORD_PTR [b + i] -#define B_REGBI(b, i) BYTE_PTR [b + i] - -/* Displaced Base: */ -#define P_REGDB(d, b) [b + d] -#define X_REGDB(d, b) TBYTE_PTR [b + d] -#define D_REGDB(d, b) QWORD_PTR [b + d] -#define L_REGDB(d, b) DWORD_PTR [b + d] -#define W_REGDB(d, b) WORD_PTR [b + d] -#define B_REGDB(d, b) BYTE_PTR [b + d] - -/* Variable indirect: */ -#define VARINDIRECT(var) var - -/* Use register contents as jump/call target: */ -#define CODEPTR(reg) P_(reg) - -/* - * Redefine assembler commands - */ - -#define P_(a) P_ ## a -#define X_(a) X_ ## a -#define D_(a) D_ ## a -#define S_(a) L_ ## a -#define L_(a) L_ ## a -#define W_(a) W_ ## a -#define B_(a) B_ ## a - -#define AAA aaa -#define AAD aad -#define AAM aam -#define AAS aas -#define ADC_L(a, b) adc L_(b), L_(a) -#define ADC_W(a, b) adc W_(b), W_(a) -#define ADC_B(a, b) adc B_(b), B_(a) -#define ADD_L(a, b) add L_(b), L_(a) -#define ADD_W(a, b) add W_(b), W_(a) -#define ADD_B(a, b) add B_(b), B_(a) -#define AND_L(a, b) and L_(b), L_(a) -#define AND_W(a, b) and W_(b), W_(a) -#define AND_B(a, b) and B_(b), B_(a) -#define ARPL(a,b) arpl W_(b), a -#define BOUND_L(a, b) bound L_(b), L_(a) -#define BOUND_W(a, b) bound W_(b), W_(a) -#define BSF_L(a, b) bsf L_(b), L_(a) -#define BSF_W(a, b) bsf W_(b), W_(a) -#define BSR_L(a, b) bsr L_(b), L_(a) -#define BSR_W(a, b) bsr W_(b), W_(a) -#define BT_L(a, b) bt L_(b), L_(a) -#define BT_W(a, b) bt W_(b), W_(a) -#define BTC_L(a, b) btc L_(b), L_(a) -#define BTC_W(a, b) btc W_(b), W_(a) -#define BTR_L(a, b) btr L_(b), L_(a) -#define BTR_W(a, b) btr W_(b), W_(a) -#define BTS_L(a, b) bts L_(b), L_(a) -#define BTS_W(a, b) bts W_(b), W_(a) -#define CALL(a) call a -#define CALLF(s,a) call far s:a -#define CBW cbw -#define CWDE cwde -#define CLC clc -#define CLD cld -#define CLI cli -#define CLTS clts -#define CMC cmc -#define CMP_L(a, b) cmp L_(b), L_(a) -#define CMP_W(a, b) cmp W_(b), W_(a) -#define CMP_B(a, b) cmp B_(b), B_(a) -#define CMPS_L cmpsd -#define CMPS_W cmpsw -#define CMPS_B cmpsb -#define CPUID cpuid -#define CWD cwd -#define CDQ cdq -#define DAA daa -#define DAS das -#define DEC_L(a) dec L_(a) -#define DEC_W(a) dec W_(a) -#define DEC_B(a) dec B_(a) -#define DIV_L(a) div L_(a) -#define DIV_W(a) div W_(a) -#define DIV_B(a) div B_(a) -#define ENTER(a,b) enter b, a -#define HLT hlt -#define IDIV_L(a) idiv L_(a) -#define IDIV_W(a) idiv W_(a) -#define IDIV_B(a) idiv B_(a) -#define IMUL_L(a, b) imul L_(b), L_(a) -#define IMUL_W(a, b) imul W_(b), W_(a) -#define IMUL_B(a) imul B_(a) -#define IN_L in EAX, DX -#define IN_W in AX, DX -#define IN_B in AL, DX -#define IN1_L(a) in1 L_(a) -#define IN1_W(a) in1 W_(a) -#define IN1_B(a) in1 B_(a) -#define INC_L(a) inc L_(a) -#define INC_W(a) inc W_(a) -#define INC_B(a) inc B_(a) -#define INS_L ins -#define INS_W ins -#define INS_B ins -#define INT(a) int B_(a) -#define INT3 int3 -#define INTO into -#define IRET iret -#define IRETD iretd -#define JA(a) ja NEAR a -#define JAE(a) jae NEAR a -#define JB(a) jb NEAR a -#define JBE(a) jbe NEAR a -#define JC(a) jc NEAR a -#define JE(a) je NEAR a -#define JG(a) jg NEAR a -#define JGE(a) jge NEAR a -#define JL(a) jl NEAR a -#define JLE(a) jle NEAR a -#define JNA(a) jna NEAR a -#define JNAE(a) jnae NEAR a -#define JNB(a) jnb NEAR a -#define JNBE(a) jnbe NEAR a -#define JNC(a) jnc NEAR a -#define JNE(a) jne NEAR a -#define JNG(a) jng NEAR a -#define JNGE(a) jnge NEAR a -#define JNL(a) jnl NEAR a -#define JNLE(a) jnle NEAR a -#define JNO(a) jno NEAR a -#define JNP(a) jnp NEAR a -#define JNS(a) jns NEAR a -#define JNZ(a) jnz NEAR a -#define JO(a) jo NEAR a -#define JP(a) jp NEAR a -#define JPE(a) jpe NEAR a -#define JPO(a) jpo NEAR a -#define JS(a) js NEAR a -#define JZ(a) jz NEAR a -#define JMP(a) jmp a -#define JMPF(s,a) jmp far s:a -#define LAHF lahf -#define LAR(a, b) lar b, a -#define LEA_L(a, b) lea P_(b), P_(a) -#define LEA_W(a, b) lea P_(b), P_(a) -#define LEAVE leave -#define LGDT(a) lgdt a -#define LIDT(a) lidt a -#define LDS(a, b) lds b, a -#define LES(a, b) les b, a -#define LFS(a, b) lfs b, a -#define LGS(a, b) lgs b, a -#define LSS(a, b) lss b, a -#define LLDT(a) lldt a -#define LMSW(a) lmsw a -#define LOCK lock -#define LODS_L lodsd -#define LODS_W lodsw -#define LODS_B lodsb -#define LOOP(a) loop a -#define LOOPE(a) loope a -#define LOOPZ(a) loopz a -#define LOOPNE(a) loopne a -#define LOOPNZ(a) loopnz a -#define LSL(a, b) lsl b, a -#define LTR(a) ltr a -#define MOV_SR(a, b) mov S_(b), S_(a) -#define MOV_L(a, b) mov L_(b), L_(a) -#define MOV_W(a, b) mov W_(b), W_(a) -#define MOV_B(a, b) mov B_(b), B_(a) -#define MOVS_L movsd -#define MOVS_W movsw -#define MOVS_B movsb -#define MOVSX_BL(a, b) movsx B_(b), B_(a) -#define MOVSX_BW(a, b) movsx B_(b), B_(a) -#define MOVSX_WL(a, b) movsx W_(b), W_(a) -#define MOVZX_BL(a, b) movzx B_(b), B_(a) -#define MOVZX_BW(a, b) movzx B_(b), B_(a) -#define MOVZX_WL(a, b) movzx W_(b), W_(a) -#define MUL_L(a) mul L_(a) -#define MUL_W(a) mul W_(a) -#define MUL_B(a) mul B_(a) -#define NEG_L(a) neg L_(a) -#define NEG_W(a) neg W_(a) -#define NEG_B(a) neg B_(a) -#define NOP nop -#define NOT_L(a) not L_(a) -#define NOT_W(a) not W_(a) -#define NOT_B(a) not B_(a) -#define OR_L(a,b) or L_(b), L_(a) -#define OR_W(a,b) or W_(b), W_(a) -#define OR_B(a,b) or B_(b), B_(a) -#define OUT_L out DX, EAX -#define OUT_W out DX, AX -#define OUT_B out DX, AL -#define OUT1_L(a) out1 L_(a) -#define OUT1_W(a) out1 W_(a) -#define OUT1_B(a) out1 B_(a) -#define OUTS_L outsd -#define OUTS_W outsw -#define OUTS_B outsb -#define POP_SR(a) pop S_(a) -#define POP_L(a) pop L_(a) -#define POP_W(a) pop W_(a) -#define POPA_L popad -#define POPA_W popa -#define POPF_L popfd -#define POPF_W popf -#define PUSH_SR(a) push S_(a) -#define PUSH_L(a) push L_(a) -#define PUSH_W(a) push W_(a) -#define PUSH_B(a) push B_(a) -#define PUSHA_L pushad -#define PUSHA_W pusha -#define PUSHF_L pushfd -#define PUSHF_W pushf -#define RCL_L(a, b) rcl L_(b), L_(a) -#define RCL_W(a, b) rcl W_(b), W_(a) -#define RCL_B(a, b) rcl B_(b), B_(a) -#define RCR_L(a, b) rcr L_(b), L_(a) -#define RCR_W(a, b) rcr W_(b), W_(a) -#define RCR_B(a, b) rcr B_(b), B_(a) -#define RDTSC rdtsc -#define ROL_L(a, b) rol L_(b), L_(a) -#define ROL_W(a, b) rol W_(b), W_(a) -#define ROL_B(a, b) rol B_(b), B_(a) -#define ROR_L(a, b) ror L_(b), L_(a) -#define ROR_W(a, b) ror W_(b), W_(a) -#define ROR_B(a, b) ror B_(b), B_(a) -#define REP rep -#define REPE repe -#define REPNE repne -#define REPNZ REPNE -#define REPZ REPE -#define RET ret -#define SAHF sahf -#define SAL_L(a, b) sal L_(b), L_(a) -#define SAL_W(a, b) sal W_(b), W_(a) -#define SAL_B(a, b) sal B_(b), B_(a) -#define SAR_L(a, b) sar L_(b), L_(a) -#define SAR_W(a, b) sar W_(b), W_(a) -#define SAR_B(a, b) sar B_(b), B_(a) -#define SBB_L(a, b) sbb L_(b), L_(a) -#define SBB_W(a, b) sbb W_(b), W_(a) -#define SBB_B(a, b) sbb B_(b), B_(a) -#define SCAS_L scas -#define SCAS_W scas -#define SCAS_B scas -#define SETA(a) seta a -#define SETAE(a) setae a -#define SETB(a) setb a -#define SETBE(a) setbe a -#define SETC(a) setc a -#define SETE(a) sete a -#define SETG(a) setg a -#define SETGE(a) setge a -#define SETL(a) setl a -#define SETLE(a) setle a -#define SETNA(a) setna a -#define SETNAE(a) setnae a -#define SETNB(a) setnb a -#define SETNBE(a) setnbe a -#define SETNC(a) setnc a -#define SETNE(a) setne a -#define SETNG(a) setng a -#define SETNGE(a) setnge a -#define SETNL(a) setnl a -#define SETNLE(a) setnle a -#define SETNO(a) setno a -#define SETNP(a) setnp a -#define SETNS(a) setns a -#define SETNZ(a) setnz a -#define SETO(a) seto a -#define SETP(a) setp a -#define SETPE(a) setpe a -#define SETPO(a) setpo a -#define SETS(a) sets a -#define SETZ(a) setz a -#define SGDT(a) sgdt a -#define SIDT(a) sidt a -#define SHL_L(a, b) shl L_(b), L_(a) -#define SHL_W(a, b) shl W_(b), W_(a) -#define SHL_B(a, b) shl B_(b), B_(a) -#define SHLD_L(a,b,c) shld -#define SHLD2_L(a,b) shld L_(b), L_(a) -#define SHLD_W(a,b,c) shld -#define SHLD2_W(a,b) shld W_(b), W_(a) -#define SHR_L(a, b) shr L_(b), L_(a) -#define SHR_W(a, b) shr W_(b), W_(a) -#define SHR_B(a, b) shr B_(b), B_(a) -#define SHRD_L(a,b,c) shrd -#define SHRD2_L(a,b) shrd L_(b), L_(a) -#define SHRD_W(a,b,c) shrd -#define SHRD2_W(a,b) shrd W_(b), W_(a) -#define SLDT(a) sldt a -#define SMSW(a) smsw a -#define STC stc -#define STD std -#define STI sti -#define STOS_L stos -#define STOS_W stos -#define STOS_B stos -#define STR(a) str a -#define SUB_L(a, b) sub L_(b), L_(a) -#define SUB_W(a, b) sub W_(b), W_(a) -#define SUB_B(a, b) sub B_(b), B_(a) -#define TEST_L(a, b) test L_(b), L_(a) -#define TEST_W(a, b) test W_(b), W_(a) -#define TEST_B(a, b) test B_(b), B_(a) -#define VERR(a) verr a -#define VERW(a) verw a -#define WAIT wait -#define XCHG_L(a, b) xchg L_(b), L_(a) -#define XCHG_W(a, b) xchg W_(b), W_(a) -#define XCHG_B(a, b) xchg B_(b), B_(a) -#define XLAT xlat -#define XOR_L(a, b) xor L_(b), L_(a) -#define XOR_W(a, b) xor W_(b), W_(a) -#define XOR_B(a, b) xor B_(b), B_(a) - - -/* Floating Point Instructions */ -#define F2XM1 f2xm1 -#define FABS fabs -#define FADD_D(a) fadd D_(a) -#define FADD_S(a) fadd S_(a) -#define FADD2(a, b) fadd b, a -#define FADDP(a, b) faddp b, a -#define FIADD_L(a) fiadd L_(a) -#define FIADD_W(a) fiadd W_(a) -#define FBLD(a) fbld a -#define FBSTP(a) fbstp a -#define FCHS fchs -#define FCLEX fclex -#define FNCLEX fnclex -#define FCOM(a) fcom a -#define FCOM_D(a) fcom D_(a) -#define FCOM_S(a) fcom S_(a) -#define FCOMP(a) fcomp a -#define FCOMP_D(a) fcomp D_(a) -#define FCOMP_S(a) fcomp S_(a) -#define FCOMPP fcompp -#define FCOS fcos -#define FDECSTP fdecstp -#define FDIV_D(a) fdiv D_(a) -#define FDIV_S(a) fdiv S_(a) -#define FDIV2(a, b) fdiv b, a -#define FDIVP(a, b) fdivp b, a -#define FIDIV_L(a) fidiv L_(a) -#define FIDIV_W(a) fidiv W_(a) -#define FDIVR_D(a) fdivr D_(a) -#define FDIVR_S(a) fdivr S_(a) -#define FDIVR2(a, b) fdivr b, a -#define FDIVRP(a, b) fdivrp b, a -#define FIDIVR_L(a) fidivr L_(a) -#define FIDIVR_W(a) fidivr W_(a) -#define FFREE(a) ffree a -#define FICOM_L(a) ficom L_(a) -#define FICOM_W(a) ficom W_(a) -#define FICOMP_L(a) ficomp L_(a) -#define FICOMP_W(a) ficomp W_(a) -#define FILD_Q(a) fild D_(a) -#define FILD_L(a) fild L_(a) -#define FILD_W(a) fild W_(a) -#define FINCSTP fincstp -#define FINIT finit -#define FNINIT fninit -#define FIST_L(a) fist L_(a) -#define FIST_W(a) fist W_(a) -#define FISTP_Q(a) fistp D_(a) -#define FISTP_L(a) fistp L_(a) -#define FISTP_W(a) fistp W_(a) -#define FLD_X(a) fld X_(a) -#define FLD_D(a) fld D_(a) -#define FLD_S(a) fld S_(a) -#define FLD1 fld1 -#define FLDL2T fldl2t -#define FLDL2E fldl2e -#define FLDPI fldpi -#define FLDLG2 fldlg2 -#define FLDLN2 fldln2 -#define FLDZ fldz -#define FLDCW(a) fldcw a -#define FLDENV(a) fldenv a -#define FMUL_S(a) fmul S_(a) -#define FMUL_D(a) fmul D_(a) -#define FMUL2(a, b) fmul b, a -#define FMULP(a, b) fmulp b, a -#define FIMUL_L(a) fimul L_(a) -#define FIMUL_W(a) fimul W_(a) -#define FNOP fnop -#define FPATAN fpatan -#define FPREM fprem -#define FPREM1 fprem1 -#define FPTAN fptan -#define FRNDINT frndint -#define FRSTOR(a) frstor a -#define FSAVE(a) fsave a -#define FNSAVE(a) fnsave a -#define FSCALE fscale -#define FSIN fsin -#define FSINCOS fsincos -#define FSQRT fsqrt -#define FST_D(a) fst D_(a) -#define FST_S(a) fst S_(a) -#define FSTP_X(a) fstp X_(a) -#define FSTP_D(a) fstp D_(a) -#define FSTP_S(a) fstp S_(a) -#define FSTP(a) fstp a -#define FSTCW(a) fstcw a -#define FNSTCW(a) fnstcw a -#define FSTENV(a) fstenv a -#define FNSTENV(a) fnstenv a -#define FSTSW(a) fstsw a -#define FNSTSW(a) fnstsw a -#define FSUB_S(a) fsub S_(a) -#define FSUB_D(a) fsub D_(a) -#define FSUB2(a, b) fsub b, a -#define FSUBP(a, b) fsubp b, a -#define FISUB_L(a) fisub L_(a) -#define FISUB_W(a) fisub W_(a) -#define FSUBR_S(a) fsubr S_(a) -#define FSUBR_D(a) fsubr D_(a) -#define FSUBR2(a, b) fsubr b, a -#define FSUBRP(a, b) fsubrp b, a -#define FISUBR_L(a) fisubr L_(a) -#define FISUBR_W(a) fisubr W_(a) -#define FTST ftst -#define FUCOM(a) fucom a -#define FUCOMP(a) fucomp a -#define FUCOMPP fucompp -#define FWAIT fwait -#define FXAM fxam -#define FXCH(a) fxch a -#define FXTRACT fxtract -#define FYL2X fyl2x -#define FYL2XP1 fyl2xp1 - -#endif /* NASM_ASSEMBLER, MASM_ASSEMBLER */ - - /****************************************/ - /* */ - /* Extensions to x86 insn set - */ - /* MMX, 3DNow! */ - /* */ - /****************************************/ - -#if defined(NASM_ASSEMBLER) || defined(MASM_ASSEMBLER) -#define P_ARG1(a) P_ ## a -#define P_ARG2(a, b) P_ ## b, P_ ## a -#define P_ARG3(a, b, c) P_ ## c, P_ ## b, P_ ## a -#else -#define P_ARG1(a) a -#define P_ARG2(a, b) a, b -#define P_ARG3(a, b, c) a, b, c -#endif - -/* MMX */ -#define MOVD(a, b) movd P_ARG2(a, b) -#define MOVQ(a, b) movq P_ARG2(a, b) - -#define PADDB(a, b) paddb P_ARG2(a, b) -#define PADDW(a, b) paddw P_ARG2(a, b) -#define PADDD(a, b) paddd P_ARG2(a, b) - -#define PADDSB(a, b) paddsb P_ARG2(a, b) -#define PADDSW(a, b) paddsw P_ARG2(a, b) - -#define PADDUSB(a, b) paddusb P_ARG2(a, b) -#define PADDUSW(a, b) paddusw P_ARG2(a, b) - -#define PSUBB(a, b) psubb P_ARG2(a, b) -#define PSUBW(a, b) psubw P_ARG2(a, b) -#define PSUBD(a, b) psubd P_ARG2(a, b) - -#define PSUBSB(a, b) psubsb P_ARG2(a, b) -#define PSUBSW(a, b) psubsw P_ARG2(a, b) - -#define PSUBUSB(a, b) psubusb P_ARG2(a, b) -#define PSUBUSW(a, b) psubusw P_ARG2(a, b) - -#define PCMPEQB(a, b) pcmpeqb P_ARG2(a, b) -#define PCMPEQW(a, b) pcmpeqw P_ARG2(a, b) -#define PCMPEQD(a, b) pcmpeqd P_ARG2(a, b) - -#define PCMPGTB(a, b) pcmpgtb P_ARG2(a, b) -#define PCMPGTW(a, b) pcmpgtw P_ARG2(a, b) -#define PCMPGTD(a, b) pcmpgtd P_ARG2(a, b) - -#define PMULHW(a, b) pmulhw P_ARG2(a, b) -#define PMULLW(a, b) pmullw P_ARG2(a, b) - -#define PMADDWD(a, b) pmaddwd P_ARG2(a, b) - -#define PAND(a, b) pand P_ARG2(a, b) - -#define PANDN(a, b) pandn P_ARG2(a, b) - -#define POR(a, b) por P_ARG2(a, b) - -#define PXOR(a, b) pxor P_ARG2(a, b) - -#define PSRAW(a, b) psraw P_ARG2(a, b) -#define PSRAD(a, b) psrad P_ARG2(a, b) - -#define PSRLW(a, b) psrlw P_ARG2(a, b) -#define PSRLD(a, b) psrld P_ARG2(a, b) -#define PSRLQ(a, b) psrlq P_ARG2(a, b) - -#define PSLLW(a, b) psllw P_ARG2(a, b) -#define PSLLD(a, b) pslld P_ARG2(a, b) -#define PSLLQ(a, b) psllq P_ARG2(a, b) - -#define PACKSSWB(a, b) packsswb P_ARG2(a, b) -#define PACKSSDW(a, b) packssdw P_ARG2(a, b) -#define PACKUSWB(a, b) packuswb P_ARG2(a, b) - -#define PUNPCKHBW(a, b) punpckhbw P_ARG2(a, b) -#define PUNPCKHWD(a, b) punpckhwd P_ARG2(a, b) -#define PUNPCKHDQ(a, b) punpckhdq P_ARG2(a, b) -#define PUNPCKLBW(a, b) punpcklbw P_ARG2(a, b) -#define PUNPCKLWD(a, b) punpcklwd P_ARG2(a, b) -#define PUNPCKLDQ(a, b) punpckldq P_ARG2(a, b) - -#define EMMS emms - -/* AMD 3DNow! */ -#define PAVGUSB(a, b) pavgusb P_ARG2(a, b) -#define PFADD(a, b) pfadd P_ARG2(a, b) -#define PFSUB(a, b) pfsub P_ARG2(a, b) -#define PFSUBR(a, b) pfsubr P_ARG2(a, b) -#define PFACC(a, b) pfacc P_ARG2(a, b) -#define PFCMPGE(a, b) pfcmpge P_ARG2(a, b) -#define PFCMPGT(a, b) pfcmpgt P_ARG2(a, b) -#define PFCMPEQ(a, b) pfcmpeq P_ARG2(a, b) -#define PFMIN(a, b) pfmin P_ARG2(a, b) -#define PFMAX(a, b) pfmax P_ARG2(a, b) -#define PI2FD(a, b) pi2fd P_ARG2(a, b) -#define PF2ID(a, b) pf2id P_ARG2(a, b) -#define PFRCP(a, b) pfrcp P_ARG2(a, b) -#define PFRSQRT(a, b) pfrsqrt P_ARG2(a, b) -#define PFMUL(a, b) pfmul P_ARG2(a, b) -#define PFRCPIT1(a, b) pfrcpit1 P_ARG2(a, b) -#define PFRSQIT1(a, b) pfrsqit1 P_ARG2(a, b) -#define PFRCPIT2(a, b) pfrcpit2 P_ARG2(a, b) -#define PMULHRW(a, b) pmulhrw P_ARG2(a, b) - -#define FEMMS femms -#define PREFETCH(a) prefetch P_ARG1(a) -#define PREFETCHW(a) prefetchw P_ARG1(a) - -/* Intel SSE */ -#define ADDPS(a, b) addps P_ARG2(a, b) -#define ADDSS(a, b) addss P_ARG2(a, b) -#define ANDNPS(a, b) andnps P_ARG2(a, b) -#define ANDPS(a, b) andps P_ARG2(a, b) -/* NASM only knows the pseudo ops for these. -#define CMPPS(a, b, c) cmpps P_ARG3(a, b, c) -#define CMPSS(a, b, c) cmpss P_ARG3(a, b, c) -*/ -#define CMPEQPS(a, b) cmpeqps P_ARG2(a, b) -#define CMPLTPS(a, b) cmpltps P_ARG2(a, b) -#define CMPLEPS(a, b) cmpleps P_ARG2(a, b) -#define CMPUNORDPS(a, b) cmpunordps P_ARG2(a, b) -#define CMPNEQPS(a, b) cmpneqps P_ARG2(a, b) -#define CMPNLTPS(a, b) cmpnltps P_ARG2(a, b) -#define CMPNLEPS(a, b) cmpnleps P_ARG2(a, b) -#define CMPORDPS(a, b) cmpordps P_ARG2(a, b) -#define CMPEQSS(a, b) cmpeqss P_ARG2(a, b) -#define CMPLTSS(a, b) cmpltss P_ARG2(a, b) -#define CMPLESS(a, b) cmpless P_ARG2(a, b) -#define CMPUNORDSS(a, b) cmpunordss P_ARG2(a, b) -#define CMPNEQSS(a, b) cmpneqss P_ARG2(a, b) -#define CMPNLTSS(a, b) cmpnltss P_ARG2(a, b) -#define CMPNLESS(a, b) cmpnless P_ARG2(a, b) -#define CMPORDSS(a, b) cmpordss P_ARG2(a, b) -#define COMISS(a, b) comiss P_ARG2(a, b) -#define CVTPI2PS(a, b) cvtpi2ps P_ARG2(a, b) -#define CVTPS2PI(a, b) cvtps2pi P_ARG2(a, b) -#define CVTSI2SS(a, b) cvtsi2ss P_ARG2(a, b) -#define CVTSS2SI(a, b) cvtss2si P_ARG2(a, b) -#define CVTTPS2PI(a, b) cvttps2pi P_ARG2(a, b) -#define CVTTSS2SI(a, b) cvttss2si P_ARG2(a, b) -#define DIVPS(a, b) divps P_ARG2(a, b) -#define DIVSS(a, b) divss P_ARG2(a, b) -#define FXRSTOR(a) fxrstor P_ARG1(a) -#define FXSAVE(a) fxsave P_ARG1(a) -#define LDMXCSR(a) ldmxcsr P_ARG1(a) -#define MAXPS(a, b) maxps P_ARG2(a, b) -#define MAXSS(a, b) maxss P_ARG2(a, b) -#define MINPS(a, b) minps P_ARG2(a, b) -#define MINSS(a, b) minss P_ARG2(a, b) -#define MOVAPS(a, b) movaps P_ARG2(a, b) -#define MOVHLPS(a, b) movhlps P_ARG2(a, b) -#define MOVHPS(a, b) movhps P_ARG2(a, b) -#define MOVLHPS(a, b) movlhps P_ARG2(a, b) -#define MOVLPS(a, b) movlps P_ARG2(a, b) -#define MOVMSKPS(a, b) movmskps P_ARG2(a, b) -#define MOVNTPS(a, b) movntps P_ARG2(a, b) -#define MOVNTQ(a, b) movntq P_ARG2(a, b) -#define MOVSS(a, b) movss P_ARG2(a, b) -#define MOVUPS(a, b) movups P_ARG2(a, b) -#define MULPS(a, b) mulps P_ARG2(a, b) -#define MULSS(a, b) mulss P_ARG2(a, b) -#define ORPS(a, b) orps P_ARG2(a, b) -#define RCPPS(a, b) rcpps P_ARG2(a, b) -#define RCPSS(a, b) rcpss P_ARG2(a, b) -#define RSQRTPS(a, b) rsqrtps P_ARG2(a, b) -#define RSQRTSS(a, b) rsqrtss P_ARG2(a, b) -#define SHUFPS(a, b, c) shufps P_ARG3(a, b, c) -#define SQRTPS(a, b) sqrtps P_ARG2(a, b) -#define SQRTSS(a, b) sqrtss P_ARG2(a, b) -#define STMXCSR(a) stmxcsr P_ARG1(a) -#define SUBPS(a, b) subps P_ARG2(a, b) -#define UCOMISS(a, b) ucomiss P_ARG2(a, b) -#define UNPCKHPS(a, b) unpckhps P_ARG2(a, b) -#define UNPCKLPS(a, b) unpcklps P_ARG2(a, b) -#define XORPS(a, b) xorps P_ARG2(a, b) - -#define PREFETCHNTA(a) prefetchnta P_ARG1(a) -#define PREFETCHT0(a) prefetcht0 P_ARG1(a) -#define PREFETCHT1(a) prefetcht1 P_ARG1(a) -#define PREFETCHT2(a) prefetcht2 P_ARG1(a) -#define SFENCE sfence - -/* Added by BrianP for FreeBSD (per David Dawes) */ -#if !defined(NASM_ASSEMBLER) && !defined(MASM_ASSEMBLER) && !defined(__bsdi__) -#define LLBL(a) CONCAT(.L,a) -#define LLBL2(a,b) CONCAT3(.L,a,b) -#else -#define LLBL(a) a -#define LLBL2(a,b) CONCAT(a,b) -#endif - - -#endif /* __ASSYNTAX_H__ */ Index: xc/extras/Mesa/src/X86/clip_args.h diff -u xc/extras/Mesa/src/X86/clip_args.h:1.4 xc/extras/Mesa/src/X86/clip_args.h:removed --- xc/extras/Mesa/src/X86/clip_args.h:1.4 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/clip_args.h Wed Mar 16 21:00:48 2005 @@ -1,59 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Clip test function interface for assembly code. Simply define - * FRAME_OFFSET to the number of bytes pushed onto the stack before - * using the ARG_* argument macros. - * - * Gareth Hughes - */ - -#ifndef __CLIP_ARGS_H__ -#define __CLIP_ARGS_H__ - -/* - * Offsets for clip_func arguments - * - * typedef GLvector4f *(*clip_func)( GLvector4f *clip_vec, - * GLvector4f *proj_vec, - * GLubyte clipMask[], - * GLubyte *orMask, - * GLubyte *andMask ); - */ - -#define OFFSET_SOURCE 4 -#define OFFSET_DEST 8 -#define OFFSET_CLIP 12 -#define OFFSET_OR 16 -#define OFFSET_AND 20 - -#define ARG_SOURCE REGOFF(FRAME_OFFSET+OFFSET_SOURCE, ESP) -#define ARG_DEST REGOFF(FRAME_OFFSET+OFFSET_DEST, ESP) -#define ARG_CLIP REGOFF(FRAME_OFFSET+OFFSET_CLIP, ESP) -#define ARG_OR REGOFF(FRAME_OFFSET+OFFSET_OR, ESP) -#define ARG_AND REGOFF(FRAME_OFFSET+OFFSET_AND, ESP) - -#endif Index: xc/extras/Mesa/src/X86/common_x86.c diff -u xc/extras/Mesa/src/X86/common_x86.c:1.14 xc/extras/Mesa/src/X86/common_x86.c:removed --- xc/extras/Mesa/src/X86/common_x86.c:1.14 Wed Oct 22 11:44:42 2003 +++ xc/extras/Mesa/src/X86/common_x86.c Wed Mar 16 21:00:48 2005 @@ -1,288 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X86/common_x86.c,v 1.14 2003/10/22 15:44:42 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Check CPU capabilities & initialize optimized funtions for this particular - * processor. - * - * Written by Holger Waechtler - * Changed by Andre Werthmann for using the - * new SSE functions. - */ - -#include -#include -#if defined(USE_SSE_ASM) && defined(__linux__) -#include -#endif -#if defined(USE_SSE_ASM) && defined(__FreeBSD__) -#include -#include -#endif - -#include "context.h" -#include "common_x86_asm.h" -#include "imports.h" - - -int _mesa_x86_cpu_features = 0; - -/* No reason for this to be public. - */ -extern int _mesa_identify_x86_cpu_features( void ); - - -static void message( const char *msg ) -{ - GLboolean debug; -#ifdef DEBUG - debug = GL_TRUE; -#else - if ( getenv( "MESA_DEBUG" ) ) { - debug = GL_TRUE; - } else { - debug = GL_FALSE; - } -#endif - if ( debug ) { - fprintf( stderr, "%s", msg ); - } -} - -#if defined(USE_SSE_ASM) -/* - * We must verify that the Streaming SIMD Extensions are truly supported - * on this processor before we go ahead and hook out the optimized code. - * Unfortunately, the CPUID bit isn't enough, as the OS must set the - * OSFXSR bit in CR4 if it supports the extended FPU save and restore - * required to use SSE. Unfortunately, we can't just go ahead and read - * this register, as only the kernel can do that. Similarly, we must - * verify that the OSXMMEXCPT bit in CR4 has been set by the OS, - * signifying that it supports unmasked SIMD FPU exceptions. If we take - * an unmasked exception and the OS doesn't correctly support them, the - * best we'll get is a SIGILL and the worst we'll get is an infinite - * loop in the signal delivery from the kernel as we can't interact with - * the SIMD FPU state to clear the exception bits. Either way, this is - * not good. - */ - -extern void _mesa_test_os_sse_support( void ); -extern void _mesa_test_os_sse_exception_support( void ); - -#if defined(__linux__) && defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) -static void sigill_handler( int signal, struct sigcontext sc ) -{ - message( "SIGILL, " ); - - /* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1" - * instructions are 3 bytes long. We must increment the instruction - * pointer manually to avoid repeated execution of the offending - * instruction. - * - * If the SIGILL is caused by a divide-by-zero when unmasked - * exceptions aren't supported, the SIMD FPU status and control - * word will be restored at the end of the test, so we don't need - * to worry about doing it here. Besides, we may not be able to... - */ - sc.eip += 3; - - _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); -} - -static void sigfpe_handler( int signal, struct sigcontext sc ) -{ - message( "SIGFPE, " ); - - if ( sc.fpstate->magic != 0xffff ) { - /* Our signal context has the extended FPU state, so reset the - * divide-by-zero exception mask and clear the divide-by-zero - * exception bit. - */ - sc.fpstate->mxcsr |= 0x00000200; - sc.fpstate->mxcsr &= 0xfffffffb; - } else { - /* If we ever get here, we're completely hosed. - */ - message( "\n\n" ); - _mesa_problem( NULL, "SSE enabling test failed badly!" ); - } -} -#endif /* __linux__ && _POSIX_SOURCE && X86_FXSR_MAGIC */ - -/* If we're running on a processor that can do SSE, let's see if we - * are allowed to or not. This will catch 2.4.0 or later kernels that - * haven't been configured for a Pentium III but are running on one, - * and RedHat patched 2.2 kernels that have broken exception handling - * support for user space apps that do SSE. - * - * GH: Isn't this just awful? - */ -static void check_os_sse_support( void ) -{ -#if defined(__linux__) -#if defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) - struct sigaction saved_sigill; - struct sigaction saved_sigfpe; - - /* Save the original signal handlers. - */ - sigaction( SIGILL, NULL, &saved_sigill ); - sigaction( SIGFPE, NULL, &saved_sigfpe ); - - signal( SIGILL, (void (*)(int))sigill_handler ); - signal( SIGFPE, (void (*)(int))sigfpe_handler ); - - /* Emulate test for OSFXSR in CR4. The OS will set this bit if it - * supports the extended FPU save and restore required for SSE. If - * we execute an SSE instruction on a PIII and get a SIGILL, the OS - * doesn't support Streaming SIMD Exceptions, even if the processor - * does. - */ - if ( cpu_has_xmm ) { - message( "Testing OS support for SSE... " ); - - _mesa_test_os_sse_support(); - - if ( cpu_has_xmm ) { - message( "yes.\n" ); - } else { - message( "no!\n" ); - } - } - - /* Emulate test for OSXMMEXCPT in CR4. The OS will set this bit if - * it supports unmasked SIMD FPU exceptions. If we unmask the - * exceptions, do a SIMD divide-by-zero and get a SIGILL, the OS - * doesn't support unmasked SIMD FPU exceptions. If we get a SIGFPE - * as expected, we're okay but we need to clean up after it. - * - * Are we being too stringent in our requirement that the OS support - * unmasked exceptions? Certain RedHat 2.2 kernels enable SSE by - * setting CR4.OSFXSR but don't support unmasked exceptions. Win98 - * doesn't even support them. We at least know the user-space SSE - * support is good in kernels that do support unmasked exceptions, - * and therefore to be safe I'm going to leave this test in here. - */ - if ( cpu_has_xmm ) { - message( "Testing OS support for SSE unmasked exceptions... " ); - - _mesa_test_os_sse_exception_support(); - - if ( cpu_has_xmm ) { - message( "yes.\n" ); - } else { - message( "no!\n" ); - } - } - - /* Restore the original signal handlers. - */ - sigaction( SIGILL, &saved_sigill, NULL ); - sigaction( SIGFPE, &saved_sigfpe, NULL ); - - /* If we've gotten to here and the XMM CPUID bit is still set, we're - * safe to go ahead and hook out the SSE code throughout Mesa. - */ - if ( cpu_has_xmm ) { - message( "Tests of OS support for SSE passed.\n" ); - } else { - message( "Tests of OS support for SSE failed!\n" ); - } -#else - /* We can't use POSIX signal handling to test the availability of - * SSE, so we disable it by default. - */ - message( "Cannot test OS support for SSE, disabling to be safe.\n" ); - _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); -#endif /* _POSIX_SOURCE && X86_FXSR_MAGIC */ -#elif defined(__FreeBSD__) - { - int ret, len, enabled; - len = sizeof(enabled); - ret = sysctlbyname("hw.instruction_sse", &enabled, &len, NULL, 0); - if (ret || !enabled) - _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); - } -#else - /* Do nothing on other platforms for now. - */ - message( "Not testing OS support for SSE, leaving enabled.\n" ); -#endif /* __linux__ */ -} - -#endif /* USE_SSE_ASM */ - - -void _mesa_init_all_x86_transform_asm( void ) -{ - (void) message; /* silence warning */ -#ifdef USE_X86_ASM - _mesa_x86_cpu_features = _mesa_identify_x86_cpu_features(); - - if ( getenv( "MESA_NO_ASM" ) ) { - _mesa_x86_cpu_features = 0; - } - - if ( _mesa_x86_cpu_features ) { - _mesa_init_x86_transform_asm(); - } - -#ifdef USE_MMX_ASM - if ( cpu_has_mmx ) { - if ( getenv( "MESA_NO_MMX" ) == 0 ) { - message( "MMX cpu detected.\n" ); - } else { - _mesa_x86_cpu_features &= ~(X86_FEATURE_MMX); - } - } -#endif - -#ifdef USE_3DNOW_ASM - if ( cpu_has_3dnow ) { - if ( getenv( "MESA_NO_3DNOW" ) == 0 ) { - message( "3DNow! cpu detected.\n" ); - _mesa_init_3dnow_transform_asm(); - } else { - _mesa_x86_cpu_features &= ~(X86_FEATURE_3DNOW); - } - } -#endif - -#ifdef USE_SSE_ASM - if ( cpu_has_xmm && getenv( "MESA_FORCE_SSE" ) == 0 ) { - check_os_sse_support(); - } - if ( cpu_has_xmm ) { - if ( getenv( "MESA_NO_SSE" ) == 0 ) { - message( "SSE cpu detected.\n" ); - _mesa_init_sse_transform_asm(); - } else { - _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM); - } - } -#endif -#endif -} - Index: xc/extras/Mesa/src/X86/common_x86_asm.S diff -u xc/extras/Mesa/src/X86/common_x86_asm.S:1.17 xc/extras/Mesa/src/X86/common_x86_asm.S:removed --- xc/extras/Mesa/src/X86/common_x86_asm.S:1.17 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/common_x86_asm.S Wed Mar 16 21:00:48 2005 @@ -1,237 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/* $XFree86: xc/extras/Mesa/src/X86/common_x86_asm.S,v 1.17 2003/09/28 19:17:08 alanh Exp $ */ - -/* - * Check extended CPU capabilities. Now justs returns the raw CPUID - * feature information, allowing the higher level code to interpret the - * results. - * - * Written by Holger Waechtler - * - * Cleaned up and simplified by Gareth Hughes - */ - -/* - * NOTE: Avoid using spaces in between '(' ')' and arguments, especially - * with macros like CONST, LLBL that expand to CONCAT(...). Putting spaces - * in there will break the build on some platforms. - */ - -#include "matypes.h" -#include "common_x86_features.h" - - -/* Intel vendor string - */ -#define GENU 0x756e6547 /* "Genu" */ -#define INEI 0x49656e69 /* "ineI" */ -#define NTEL 0x6c65746e /* "ntel" */ - -/* AMD vendor string - */ -#define AUTH 0x68747541 /* "Auth" */ -#define ENTI 0x69746e65 /* "enti" */ -#define CAMD 0x444d4163 /* "cAMD" */ - - - SEG_DATA - -/* We might want to print out some useful messages. - */ -GLNAME( found_intel ): STRING( "Genuine Intel processor found\n\0" ) -GLNAME( found_amd ): STRING( "Authentic AMD processor found\n\0" ) - - - SEG_TEXT - -ALIGNTEXT4 -GLOBL GLNAME( _mesa_identify_x86_cpu_features ) -GLNAME( _mesa_identify_x86_cpu_features ): - - PUSH_L ( EBX ) - PUSH_L ( ESI ) - - /* Test for the CPUID command. If the ID Flag bit in EFLAGS - * (bit 21) is writable, the CPUID command is present. - */ - PUSHF_L - POP_L ( EAX ) - MOV_L ( EAX, ECX ) - XOR_L ( CONST(0x00200000), EAX ) - PUSH_L ( EAX ) - POPF_L - PUSHF_L - POP_L ( EAX ) - - /* Verify the ID Flag bit has been written. - */ - CMP_L ( ECX, EAX ) - JZ ( LLBL (cpuid_done) ) - - /* Get the CPU vendor info. - */ - XOR_L ( EAX, EAX ) - CPUID - - /* Test for Intel processors. We must look for the - * "GenuineIntel" string in EBX, ECX and EDX. - */ - CMP_L ( CONST(GENU), EBX ) - JNE ( LLBL(cpuid_amd) ) - CMP_L ( CONST(INEI), EDX ) - JNE ( LLBL(cpuid_amd) ) - CMP_L ( CONST(NTEL), ECX ) - JNE ( LLBL(cpuid_amd) ) - - /* We have an Intel processor, so we can get the feature - * information with an CPUID input value of 1. - */ - MOV_L ( CONST(0x1), EAX ) - CPUID - MOV_L ( EDX, EAX ) - - /* Mask out highest bit, which is used by AMD for 3dnow. - * Newer Intel have this bit set, but do not support 3dnow. - */ - AND_L ( CONST(0X7FFFFFFF), EAX) - JMP ( LLBL(cpuid_done) ) - -LLBL(cpuid_amd): - - /* Test for AMD processors. We must look for the - * "AuthenticAMD" string in EBX, ECX and EDX. - */ - CMP_L ( CONST(AUTH), EBX ) - JNE ( LLBL(cpuid_other) ) - CMP_L ( CONST(ENTI), EDX ) - JNE ( LLBL(cpuid_other) ) - CMP_L ( CONST(CAMD), ECX ) - JNE ( LLBL(cpuid_other) ) - - /* We have an AMD processor, so we can get the feature - * information after we verify that the extended functions are - * supported. - */ - /* The features we need are almost all in the extended set. The - * exception is SSE enable, which is in the standard set (0x1). - */ - MOV_L ( CONST(0x1), EAX ) - CPUID - TEST_L ( EAX, EAX ) - JZ ( LLBL (cpuid_failed) ) - MOV_L ( EDX, ESI ) - - MOV_L ( CONST(0x80000000), EAX ) - CPUID - TEST_L ( EAX, EAX ) - JZ ( LLBL (cpuid_failed) ) - - MOV_L ( CONST(0x80000001), EAX ) - CPUID - MOV_L ( EDX, EAX ) - - AND_L ( CONST(0x02000000), ESI ) /* OR in the SSE bit */ - OR_L ( ESI, EAX ) - - JMP ( LLBL (cpuid_done) ) - -LLBL(cpuid_other): - - /* Test for other processors here when required. - */ - -LLBL(cpuid_failed): - - /* If we can't determine the feature information, we must - * return zero to indicate that no platform-specific - * optimizations can be used. - */ - MOV_L ( CONST(0), EAX ) - -LLBL (cpuid_done): - - POP_L ( ESI ) - POP_L ( EBX ) - RET - - -#ifdef USE_SSE_ASM -/* Execute an SSE instruction to see if the operating system correctly - * supports SSE. A signal handler for SIGILL should have been set - * before calling this function, otherwise this could kill the client - * application. - */ -ALIGNTEXT4 -GLOBL GLNAME( _mesa_test_os_sse_support ) -GLNAME( _mesa_test_os_sse_support ): - - XORPS ( XMM0, XMM0 ) - - RET - - -/* Perform an SSE divide-by-zero to see if the operating system - * correctly supports unmasked SIMD FPU exceptions. Signal handlers for - * SIGILL and SIGFPE should have been set before calling this function, - * otherwise this could kill the client application. - */ -ALIGNTEXT4 -GLOBL GLNAME( _mesa_test_os_sse_exception_support ) -GLNAME( _mesa_test_os_sse_exception_support ): - - PUSH_L ( EBP ) - MOV_L ( ESP, EBP ) - SUB_L ( CONST( 8 ), ESP ) - - /* Save the original MXCSR register value. - */ - STMXCSR ( REGOFF( -4, EBP ) ) - - /* Unmask the divide-by-zero exception and perform one. - */ - STMXCSR ( REGOFF( -8, EBP ) ) - AND_L ( CONST( 0xfffffdff ), REGOFF( -8, EBP ) ) - LDMXCSR ( REGOFF( -8, EBP ) ) - - XORPS ( XMM0, XMM0 ) - - PUSH_L ( CONST( 0x3f800000 ) ) - PUSH_L ( CONST( 0x3f800000 ) ) - PUSH_L ( CONST( 0x3f800000 ) ) - PUSH_L ( CONST( 0x3f800000 ) ) - - MOVUPS ( REGIND( ESP ), XMM1 ) - - DIVPS ( XMM0, XMM1 ) - - /* Restore the original MXCSR register value. - */ - LDMXCSR ( REGOFF( -4, EBP ) ) - - LEAVE - RET - -#endif Index: xc/extras/Mesa/src/X86/common_x86_asm.h diff -u xc/extras/Mesa/src/X86/common_x86_asm.h:1.7 xc/extras/Mesa/src/X86/common_x86_asm.h:removed --- xc/extras/Mesa/src/X86/common_x86_asm.h:1.7 Wed Oct 22 11:44:42 2003 +++ xc/extras/Mesa/src/X86/common_x86_asm.h Wed Mar 16 21:00:48 2005 @@ -1,63 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X86/common_x86_asm.h,v 1.7 2003/10/22 15:44:42 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Check CPU capabilities & initialize optimized funtions for this particular - * processor. - * - * Written by Holger Waechtler - * Changed by Andre Werthmann for using the - * new SSE functions - * - * Reimplemented by Gareth Hughes in a more - * future-proof manner, based on code in the Linux kernel. - */ - -#ifndef __COMMON_X86_ASM_H__ -#define __COMMON_X86_ASM_H__ - -/* Do not reference mtypes.h from this file. - */ -#include "common_x86_features.h" - -#ifdef HAVE_CONFIG_H -#include "conf.h" -#endif - -#ifdef USE_X86_ASM -#include "x86.h" -#ifdef USE_3DNOW_ASM -#include "3dnow.h" -#endif -#ifdef USE_SSE_ASM -#include "sse.h" -#endif -#endif - -extern int _mesa_x86_cpu_features; - -extern void _mesa_init_all_x86_transform_asm( void ); - -#endif Index: xc/extras/Mesa/src/X86/common_x86_features.h diff -u xc/extras/Mesa/src/X86/common_x86_features.h:1.4 xc/extras/Mesa/src/X86/common_x86_features.h:removed --- xc/extras/Mesa/src/X86/common_x86_features.h:1.4 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/common_x86_features.h Wed Mar 16 21:00:48 2005 @@ -1,79 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * x86 CPUID feature information. The raw data is returned by - * _mesa_identify_x86_cpu_features() and interpreted with the cpu_has_* - * helper macros. - * - * Gareth Hughes - */ - -#ifndef __COMMON_X86_FEATURES_H__ -#define __COMMON_X86_FEATURES_H__ - -/* Capabilities of CPUs - */ -#define X86_FEATURE_FPU 0x00000001 -#define X86_FEATURE_VME 0x00000002 -#define X86_FEATURE_DE 0x00000004 -#define X86_FEATURE_PSE 0x00000008 -#define X86_FEATURE_TSC 0x00000010 -#define X86_FEATURE_MSR 0x00000020 -#define X86_FEATURE_PAE 0x00000040 -#define X86_FEATURE_MCE 0x00000080 -#define X86_FEATURE_CX8 0x00000100 -#define X86_FEATURE_APIC 0x00000200 -#define X86_FEATURE_10 0x00000400 -#define X86_FEATURE_SEP 0x00000800 -#define X86_FEATURE_MTRR 0x00001000 -#define X86_FEATURE_PGE 0x00002000 -#define X86_FEATURE_MCA 0x00004000 -#define X86_FEATURE_CMOV 0x00008000 -#define X86_FEATURE_PAT 0x00010000 -#define X86_FEATURE_PSE36 0x00020000 -#define X86_FEATURE_18 0x00040000 -#define X86_FEATURE_19 0x00080000 -#define X86_FEATURE_20 0x00100000 -#define X86_FEATURE_21 0x00200000 -#define X86_FEATURE_MMXEXT 0x00400000 -#define X86_FEATURE_MMX 0x00800000 -#define X86_FEATURE_FXSR 0x01000000 -#define X86_FEATURE_XMM 0x02000000 -#define X86_FEATURE_XMM2 0x04000000 -#define X86_FEATURE_27 0x08000000 -#define X86_FEATURE_28 0x10000000 -#define X86_FEATURE_29 0x20000000 -#define X86_FEATURE_3DNOWEXT 0x40000000 -#define X86_FEATURE_3DNOW 0x80000000 - -#define cpu_has_mmx (_mesa_x86_cpu_features & X86_FEATURE_MMX) -#define cpu_has_mmxext (_mesa_x86_cpu_features & X86_FEATURE_MMXEXT) -#define cpu_has_xmm (_mesa_x86_cpu_features & X86_FEATURE_XMM) -#define cpu_has_xmm2 (_mesa_x86_cpu_features & X86_FEATURE_XMM2) -#define cpu_has_3dnow (_mesa_x86_cpu_features & X86_FEATURE_3DNOW) -#define cpu_has_3dnowext (_mesa_x86_cpu_features & X86_FEATURE_3DNOWEXT) - -#endif Index: xc/extras/Mesa/src/X86/common_x86_macros.h diff -u xc/extras/Mesa/src/X86/common_x86_macros.h:1.3 xc/extras/Mesa/src/X86/common_x86_macros.h:removed --- xc/extras/Mesa/src/X86/common_x86_macros.h:1.3 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/common_x86_macros.h Wed Mar 16 21:00:48 2005 @@ -1,106 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#ifndef __COMMON_X86_MACROS_H__ -#define __COMMON_X86_MACROS_H__ - - -/* ============================================================= - * Transformation function declarations: - */ - -#define XFORM_ARGS GLvector4f *to_vec, \ - const GLfloat m[16], \ - const GLvector4f *from_vec - -#define DECLARE_XFORM_GROUP( pfx, sz ) \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_general( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_identity( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d_no_rot( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_perspective( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d_no_rot( XFORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d( XFORM_ARGS ); - -#define ASSIGN_XFORM_GROUP( pfx, sz ) \ - _mesa_transform_tab[sz][MATRIX_GENERAL] = \ - _mesa_##pfx##_transform_points##sz##_general; \ - _mesa_transform_tab[sz][MATRIX_IDENTITY] = \ - _mesa_##pfx##_transform_points##sz##_identity; \ - _mesa_transform_tab[sz][MATRIX_3D_NO_ROT] = \ - _mesa_##pfx##_transform_points##sz##_3d_no_rot; \ - _mesa_transform_tab[sz][MATRIX_PERSPECTIVE] = \ - _mesa_##pfx##_transform_points##sz##_perspective; \ - _mesa_transform_tab[sz][MATRIX_2D] = \ - _mesa_##pfx##_transform_points##sz##_2d; \ - _mesa_transform_tab[sz][MATRIX_2D_NO_ROT] = \ - _mesa_##pfx##_transform_points##sz##_2d_no_rot; \ - _mesa_transform_tab[sz][MATRIX_3D] = \ - _mesa_##pfx##_transform_points##sz##_3d; - - -/* ============================================================= - * Normal transformation function declarations: - */ - -#define NORM_ARGS const GLmatrix *mat, \ - GLfloat scale, \ - const GLvector4f *in, \ - const GLfloat *lengths, \ - GLvector4f *dest - -#define DECLARE_NORM_GROUP( pfx ) \ -extern void _ASMAPI _mesa_##pfx##_rescale_normals( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_normalize_normals( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_normals( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_normals_no_rot( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals_no_rot( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals( NORM_ARGS ); \ -extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals_no_rot( NORM_ARGS ); - -#define ASSIGN_NORM_GROUP( pfx ) \ - _mesa_normal_tab[NORM_RESCALE] = \ - _mesa_##pfx##_rescale_normals; \ - _mesa_normal_tab[NORM_NORMALIZE] = \ - _mesa_##pfx##_normalize_normals; \ - _mesa_normal_tab[NORM_TRANSFORM] = \ - _mesa_##pfx##_transform_normals; \ - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] = \ - _mesa_##pfx##_transform_normals_no_rot; \ - _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] = \ - _mesa_##pfx##_transform_rescale_normals; \ - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] = \ - _mesa_##pfx##_transform_rescale_normals_no_rot; \ - _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] = \ - _mesa_##pfx##_transform_normalize_normals; \ - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] = \ - _mesa_##pfx##_transform_normalize_normals_no_rot; - - -#endif Index: xc/extras/Mesa/src/X86/gen_matypes.c diff -u xc/extras/Mesa/src/X86/gen_matypes.c:1.3 xc/extras/Mesa/src/X86/gen_matypes.c:removed --- xc/extras/Mesa/src/X86/gen_matypes.c:1.3 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/gen_matypes.c Wed Mar 16 21:00:48 2005 @@ -1,291 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -/* - * This generates an asm version of mtypes.h (called matypes.h), so that - * Mesa's x86 assembly code can access the internal structures easily. - * This will be particularly useful when developing new x86 asm code for - * Mesa, including lighting, clipping, texture image conversion etc. - */ - -#include "glheader.h" -#include "mtypes.h" -#include "tnl/t_context.h" - - -#undef offsetof -#define offsetof( type, member ) ((size_t) &((type *)0)->member) - - -#define OFFSET_HEADER( x ) \ -do { \ - printf( "\n" ); \ - printf( "\n" ); \ - printf( "/* =====================================================" \ - "========\n" ); \ - printf( " * Offsets for %s\n", x ); \ - printf( " */\n" ); \ - printf( "\n" ); \ -} while (0) - -#define DEFINE_HEADER( x ) \ -do { \ - printf( "\n" ); \ - printf( "/*\n" ); \ - printf( " * Flags for %s\n", x ); \ - printf( " */\n" ); \ - printf( "\n" ); \ -} while (0) - -#if defined(__BEOS__) -#define OFFSET( s, t, m ) \ - printf( "#define %s\t%ld\n", s, offsetof( t, m ) ); -#else -#define OFFSET( s, t, m ) \ - printf( "#define %s\t%d\n", s, offsetof( t, m ) ); -#endif - -#if defined(__BEOS__) -#define SIZEOF( s, t ) \ - printf( "#define %s\t%ld\n", s, sizeof(t) ); -#else -#define SIZEOF( s, t ) \ - printf( "#define %s\t%d\n", s, sizeof(t) ); -#endif - -#define DEFINE( s, d ) \ - printf( "#define %s\t0x%x\n", s, d ); - - - -int main( int argc, char **argv ) -{ - printf( "/*\n" ); - printf( " * This file is automatically generated from the Mesa internal type\n" ); - printf( " * definitions. Do not edit directly.\n" ); - printf( " */\n" ); - printf( "\n" ); - printf( "#ifndef __ASM_TYPES_H__\n" ); - printf( "#define __ASM_TYPES_H__\n" ); - printf( "\n" ); - printf( "#include \"assyntax.h\"\n" ); - - - /* GLcontext offsets: - */ - OFFSET_HEADER( "GLcontext" ); - - OFFSET( "CTX_DRIVER_CTX ", GLcontext, DriverCtx ); - printf( "\n" ); - OFFSET( "CTX_LIGHT_ENABLED ", GLcontext, Light.Enabled ); - OFFSET( "CTX_LIGHT_SHADE_MODEL ", GLcontext, Light.ShadeModel ); - OFFSET( "CTX_LIGHT_COLOR_MAT_FACE ", GLcontext, Light.ColorMaterialFace ); - OFFSET( "CTX_LIGHT_COLOR_MAT_MODE ", GLcontext, Light.ColorMaterialMode ); - OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", GLcontext, Light.ColorMaterialBitmask ); - OFFSET( "CTX_LIGHT_COLOR_MAT_ENABLED ", GLcontext, Light.ColorMaterialEnabled ); - OFFSET( "CTX_LIGHT_ENABLED_LIST ", GLcontext, Light.EnabledList ); - OFFSET( "CTX_LIGHT_NEED_VERTS ", GLcontext, Light._NeedVertices ); - OFFSET( "CTX_LIGHT_FLAGS ", GLcontext, Light._Flags ); - OFFSET( "CTX_LIGHT_BASE_COLOR ", GLcontext, Light._BaseColor ); - - - /* struct vertex_buffer offsets: - */ - OFFSET_HEADER( "struct vertex_buffer" ); - - OFFSET( "VB_SIZE ", struct vertex_buffer, Size ); - OFFSET( "VB_COUNT ", struct vertex_buffer, Count ); - printf( "\n" ); - OFFSET( "VB_FIRST_CLIPPED ", struct vertex_buffer, FirstClipped ); - OFFSET( "VB_FIRST_PRIMITIVE ", struct vertex_buffer, FirstPrimitive ); - printf( "\n" ); - OFFSET( "VB_ELTS ", struct vertex_buffer, Elts ); - OFFSET( "VB_OBJ_PTR ", struct vertex_buffer, ObjPtr ); - OFFSET( "VB_EYE_PTR ", struct vertex_buffer, EyePtr ); - OFFSET( "VB_CLIP_PTR ", struct vertex_buffer, ClipPtr ); - OFFSET( "VB_PROJ_CLIP_PTR ", struct vertex_buffer, NdcPtr ); - OFFSET( "VB_CLIP_OR_MASK ", struct vertex_buffer, ClipOrMask ); - OFFSET( "VB_CLIP_MASK ", struct vertex_buffer, ClipMask ); - OFFSET( "VB_NORMAL_PTR ", struct vertex_buffer, NormalPtr ); - OFFSET( "VB_EDGE_FLAG ", struct vertex_buffer, EdgeFlag ); - OFFSET( "VB_TEX0_COORD_PTR ", struct vertex_buffer, TexCoordPtr[0] ); - OFFSET( "VB_TEX1_COORD_PTR ", struct vertex_buffer, TexCoordPtr[1] ); - OFFSET( "VB_TEX2_COORD_PTR ", struct vertex_buffer, TexCoordPtr[2] ); - OFFSET( "VB_TEX3_COORD_PTR ", struct vertex_buffer, TexCoordPtr[3] ); - OFFSET( "VB_INDEX_PTR ", struct vertex_buffer, IndexPtr ); - OFFSET( "VB_COLOR_PTR ", struct vertex_buffer, ColorPtr ); - OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, SecondaryColorPtr ); - OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, FogCoordPtr ); - OFFSET( "VB_POINT_SIZE_PTR ", struct vertex_buffer, PointSizePtr ); - OFFSET( "VB_MATERIAL ", struct vertex_buffer, Material ); - OFFSET( "VB_MATERIAL_MASK ", struct vertex_buffer, MaterialMask ); - OFFSET( "VB_FLAG ", struct vertex_buffer, Flag ); - OFFSET( "VB_PRIMITIVE ", struct vertex_buffer, Primitive ); - OFFSET( "VB_PRIMITIVE_LENGTH ", struct vertex_buffer, PrimitiveLength ); - printf( "\n" ); - OFFSET( "VB_IMPORTABLE_DATA ", struct vertex_buffer, importable_data ); - printf( "\n" ); - OFFSET( "VB_LAST_CLIPPED ", struct vertex_buffer, LastClipped ); - - DEFINE_HEADER( "struct vertex_buffer" ); - - /* XXX use new labels here someday after vertex proram is done */ - DEFINE( "VERT_BIT_OBJ ", VERT_BIT_POS ); - DEFINE( "VERT_BIT_NORM ", VERT_BIT_NORMAL ); - DEFINE( "VERT_BIT_RGBA ", VERT_BIT_COLOR0 ); - DEFINE( "VERT_BIT_SPEC_RGB ", VERT_BIT_COLOR1 ); - DEFINE( "VERT_BIT_FOG_COORD ", VERT_BIT_FOG ); - DEFINE( "VERT_BIT_INDEX ", VERT_BIT_INDEX ); - DEFINE( "VERT_BIT_EDGE ", VERT_BIT_EDGEFLAG ); - DEFINE( "VERT_BIT_TEX0 ", VERT_BIT_TEX0 ); - DEFINE( "VERT_BIT_TEX1 ", VERT_BIT_TEX1 ); - DEFINE( "VERT_BIT_TEX2 ", VERT_BIT_TEX2 ); - DEFINE( "VERT_BIT_TEX3 ", VERT_BIT_TEX3 ); - DEFINE( "VERT_BIT_EVAL_C1 ", VERT_BIT_EVAL_C1 ); - DEFINE( "VERT_BIT_EVAL_C2 ", VERT_BIT_EVAL_C2 ); - DEFINE( "VERT_BIT_EVAL_P1 ", VERT_BIT_EVAL_P1 ); - DEFINE( "VERT_BIT_EVAL_P2 ", VERT_BIT_EVAL_P2 ); - DEFINE( "VERT_BIT_OBJ_3 ", VERT_BIT_OBJ_3 ); - DEFINE( "VERT_BIT_OBJ_4 ", VERT_BIT_OBJ_4 ); - DEFINE( "VERT_BIT_MATERIAL ", VERT_BIT_MATERIAL ); - DEFINE( "VERT_BIT_ELT ", VERT_BIT_ELT ); - DEFINE( "VERT_BIT_BEGIN ", VERT_BIT_BEGIN ); - DEFINE( "VERT_BIT_END ", VERT_BIT_END ); - DEFINE( "VERT_BIT_END_VB ", VERT_BIT_END_VB ); - DEFINE( "VERT_BIT_POINT_SIZE ", VERT_BIT_POINT_SIZE ); - DEFINE( "VERT_BIT_EYE ", VERT_BIT_EYE ); - DEFINE( "VERT_BIT_CLIP ", VERT_BIT_CLIP ); - printf( "\n" ); - DEFINE( "VERT_BIT_OBJ_23 ", VERT_BIT_OBJ_3 ); - DEFINE( "VERT_BIT_OBJ_234 ", VERT_BIT_OBJ_4 ); - - - /* GLvector3f offsets: - */ - OFFSET_HEADER( "GLvector3f" ); - - OFFSET( "V3F_DATA ", GLvector3f, data ); - OFFSET( "V3F_START ", GLvector3f, start ); - OFFSET( "V3F_COUNT ", GLvector3f, count ); - OFFSET( "V3F_STRIDE ", GLvector3f, stride ); - OFFSET( "V3F_FLAGS ", GLvector3f, flags ); - - - /* GLvector4f offsets: - */ - OFFSET_HEADER( "GLvector4f" ); - - OFFSET( "V4F_DATA ", GLvector4f, data ); - OFFSET( "V4F_START ", GLvector4f, start ); - OFFSET( "V4F_COUNT ", GLvector4f, count ); - OFFSET( "V4F_STRIDE ", GLvector4f, stride ); - OFFSET( "V4F_SIZE ", GLvector4f, size ); - OFFSET( "V4F_FLAGS ", GLvector4f, flags ); - - DEFINE_HEADER( "GLvector4f" ); - - DEFINE( "VEC_MALLOC ", VEC_MALLOC ); - DEFINE( "VEC_NOT_WRITEABLE ", VEC_NOT_WRITEABLE ); - DEFINE( "VEC_BAD_STRIDE ", VEC_BAD_STRIDE ); - printf( "\n" ); - DEFINE( "VEC_SIZE_1 ", VEC_SIZE_1 ); - DEFINE( "VEC_SIZE_2 ", VEC_SIZE_2 ); - DEFINE( "VEC_SIZE_3 ", VEC_SIZE_3 ); - DEFINE( "VEC_SIZE_4 ", VEC_SIZE_4 ); - - - /* GLmatrix offsets: - */ - OFFSET_HEADER( "GLmatrix" ); - - OFFSET( "MATRIX_DATA ", GLmatrix, m ); - OFFSET( "MATRIX_INV ", GLmatrix, inv ); - OFFSET( "MATRIX_FLAGS ", GLmatrix, flags ); - OFFSET( "MATRIX_TYPE ", GLmatrix, type ); - - - /* struct gl_light offsets: - */ - OFFSET_HEADER( "struct gl_light" ); - - OFFSET( "LIGHT_NEXT ", struct gl_light, next ); - OFFSET( "LIGHT_PREV ", struct gl_light, prev ); - printf( "\n" ); - OFFSET( "LIGHT_AMBIENT ", struct gl_light, Ambient ); - OFFSET( "LIGHT_DIFFUSE ", struct gl_light, Diffuse ); - OFFSET( "LIGHT_SPECULAR ", struct gl_light, Specular ); - OFFSET( "LIGHT_EYE_POSITION ", struct gl_light, EyePosition ); - OFFSET( "LIGHT_EYE_DIRECTION ", struct gl_light, EyeDirection ); - OFFSET( "LIGHT_SPOT_EXPONENT ", struct gl_light, SpotExponent ); - OFFSET( "LIGHT_SPOT_CUTOFF ", struct gl_light, SpotCutoff ); - OFFSET( "LIGHT_COS_CUTOFF ", struct gl_light, _CosCutoff ); - OFFSET( "LIGHT_CONST_ATTEN ", struct gl_light, ConstantAttenuation ); - OFFSET( "LIGHT_LINEAR_ATTEN ", struct gl_light, LinearAttenuation ); - OFFSET( "LIGHT_QUADRATIC_ATTEN ", struct gl_light, QuadraticAttenuation ); - OFFSET( "LIGHT_ENABLED ", struct gl_light, Enabled ); - printf( "\n" ); - OFFSET( "LIGHT_FLAGS ", struct gl_light, _Flags ); - printf( "\n" ); - OFFSET( "LIGHT_POSITION ", struct gl_light, _Position ); - OFFSET( "LIGHT_VP_INF_NORM ", struct gl_light, _VP_inf_norm ); - OFFSET( "LIGHT_H_INF_NORM ", struct gl_light, _h_inf_norm ); - OFFSET( "LIGHT_NORM_DIRECTION ", struct gl_light, _NormDirection ); - OFFSET( "LIGHT_VP_INF_SPOT_ATTEN ", struct gl_light, _VP_inf_spot_attenuation ); - printf( "\n" ); - OFFSET( "LIGHT_SPOT_EXP_TABLE ", struct gl_light, _SpotExpTable ); - OFFSET( "LIGHT_MAT_AMBIENT ", struct gl_light, _MatAmbient ); - OFFSET( "LIGHT_MAT_DIFFUSE ", struct gl_light, _MatDiffuse ); - OFFSET( "LIGHT_MAT_SPECULAR ", struct gl_light, _MatSpecular ); - printf( "\n" ); - SIZEOF( "SIZEOF_GL_LIGHT ", struct gl_light ); - - DEFINE_HEADER( "struct gl_light" ); - - DEFINE( "LIGHT_SPOT ", LIGHT_SPOT ); - DEFINE( "LIGHT_LOCAL_VIEWER ", LIGHT_LOCAL_VIEWER ); - DEFINE( "LIGHT_POSITIONAL ", LIGHT_POSITIONAL ); - printf( "\n" ); - DEFINE( "LIGHT_NEED_VERTICES ", LIGHT_NEED_VERTICES ); - - - /* struct gl_lightmodel offsets: - */ - OFFSET_HEADER( "struct gl_lightmodel" ); - - OFFSET( "LIGHT_MODEL_AMBIENT ", struct gl_lightmodel, Ambient ); - OFFSET( "LIGHT_MODEL_LOCAL_VIEWER ", struct gl_lightmodel, LocalViewer ); - OFFSET( "LIGHT_MODEL_TWO_SIDE ", struct gl_lightmodel, TwoSide ); - OFFSET( "LIGHT_MODEL_COLOR_CONTROL ", struct gl_lightmodel, ColorControl ); - - - printf( "\n" ); - printf( "\n" ); - printf( "#endif /* __ASM_TYPES_H__ */\n" ); - - return 0; -} Index: xc/extras/Mesa/src/X86/glapi_x86.S diff -u xc/extras/Mesa/src/X86/glapi_x86.S:1.9 xc/extras/Mesa/src/X86/glapi_x86.S:removed --- xc/extras/Mesa/src/X86/glapi_x86.S:1.9 Tue Dec 2 09:28:13 2003 +++ xc/extras/Mesa/src/X86/glapi_x86.S Wed Mar 16 21:00:48 2005 @@ -1,4861 +0,0 @@ -/* DO NOT EDIT - This file generated automatically with glx86asm.py script */ -#include "assyntax.h" -#include "../glapioffsets.h" - -#ifndef __WIN32__ - -#if defined(USE_MGL_NAMESPACE) -#define GL_PREFIX(n) GLNAME(CONCAT(mgl,n)) -#else -#define GL_PREFIX(n) GLNAME(CONCAT(gl,n)) -#endif - -#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) - -#if defined(GNU_ASSEMBLER) && !defined(DJGPP) -#define GLOBL_FN(x) GLOBL x ; .type x,@function -#else -#define GLOBL_FN(x) GLOBL x -#endif - - -EXTERN GLNAME(_glapi_Dispatch) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(NewList)) -GL_PREFIX(NewList): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_NewList)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EndList)) -GL_PREFIX(EndList): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EndList)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CallList)) -GL_PREFIX(CallList): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CallList)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CallLists)) -GL_PREFIX(CallLists): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CallLists)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DeleteLists)) -GL_PREFIX(DeleteLists): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DeleteLists)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GenLists)) -GL_PREFIX(GenLists): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GenLists)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ListBase)) -GL_PREFIX(ListBase): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ListBase)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Begin)) -GL_PREFIX(Begin): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Begin)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Bitmap)) -GL_PREFIX(Bitmap): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Bitmap)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3b)) -GL_PREFIX(Color3b): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3b)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3bv)) -GL_PREFIX(Color3bv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3bv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3d)) -GL_PREFIX(Color3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3dv)) -GL_PREFIX(Color3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3f)) -GL_PREFIX(Color3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3fv)) -GL_PREFIX(Color3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3i)) -GL_PREFIX(Color3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3iv)) -GL_PREFIX(Color3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3s)) -GL_PREFIX(Color3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3sv)) -GL_PREFIX(Color3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3ub)) -GL_PREFIX(Color3ub): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3ub)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3ubv)) -GL_PREFIX(Color3ubv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3ubv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3ui)) -GL_PREFIX(Color3ui): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3ui)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3uiv)) -GL_PREFIX(Color3uiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3uiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3us)) -GL_PREFIX(Color3us): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3us)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color3usv)) -GL_PREFIX(Color3usv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color3usv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4b)) -GL_PREFIX(Color4b): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4b)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4bv)) -GL_PREFIX(Color4bv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4bv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4d)) -GL_PREFIX(Color4d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4dv)) -GL_PREFIX(Color4dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4f)) -GL_PREFIX(Color4f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4fv)) -GL_PREFIX(Color4fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4i)) -GL_PREFIX(Color4i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4iv)) -GL_PREFIX(Color4iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4s)) -GL_PREFIX(Color4s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4sv)) -GL_PREFIX(Color4sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4ub)) -GL_PREFIX(Color4ub): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4ub)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4ubv)) -GL_PREFIX(Color4ubv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4ubv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4ui)) -GL_PREFIX(Color4ui): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4ui)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4uiv)) -GL_PREFIX(Color4uiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4uiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4us)) -GL_PREFIX(Color4us): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4us)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Color4usv)) -GL_PREFIX(Color4usv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Color4usv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EdgeFlag)) -GL_PREFIX(EdgeFlag): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EdgeFlag)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EdgeFlagv)) -GL_PREFIX(EdgeFlagv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EdgeFlagv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(End)) -GL_PREFIX(End): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_End)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexd)) -GL_PREFIX(Indexd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexd)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexdv)) -GL_PREFIX(Indexdv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexdv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexf)) -GL_PREFIX(Indexf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexfv)) -GL_PREFIX(Indexfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexi)) -GL_PREFIX(Indexi): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexi)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexiv)) -GL_PREFIX(Indexiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexs)) -GL_PREFIX(Indexs): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexs)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexsv)) -GL_PREFIX(Indexsv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexsv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3b)) -GL_PREFIX(Normal3b): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3b)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3bv)) -GL_PREFIX(Normal3bv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3bv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3d)) -GL_PREFIX(Normal3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3dv)) -GL_PREFIX(Normal3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3f)) -GL_PREFIX(Normal3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3fv)) -GL_PREFIX(Normal3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3i)) -GL_PREFIX(Normal3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3iv)) -GL_PREFIX(Normal3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3s)) -GL_PREFIX(Normal3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Normal3sv)) -GL_PREFIX(Normal3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Normal3sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2d)) -GL_PREFIX(RasterPos2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2dv)) -GL_PREFIX(RasterPos2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2f)) -GL_PREFIX(RasterPos2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2fv)) -GL_PREFIX(RasterPos2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2i)) -GL_PREFIX(RasterPos2i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2iv)) -GL_PREFIX(RasterPos2iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2s)) -GL_PREFIX(RasterPos2s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos2sv)) -GL_PREFIX(RasterPos2sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos2sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3d)) -GL_PREFIX(RasterPos3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3dv)) -GL_PREFIX(RasterPos3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3f)) -GL_PREFIX(RasterPos3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3fv)) -GL_PREFIX(RasterPos3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3i)) -GL_PREFIX(RasterPos3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3iv)) -GL_PREFIX(RasterPos3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3s)) -GL_PREFIX(RasterPos3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos3sv)) -GL_PREFIX(RasterPos3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos3sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4d)) -GL_PREFIX(RasterPos4d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4dv)) -GL_PREFIX(RasterPos4dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4f)) -GL_PREFIX(RasterPos4f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4fv)) -GL_PREFIX(RasterPos4fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4i)) -GL_PREFIX(RasterPos4i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4iv)) -GL_PREFIX(RasterPos4iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4s)) -GL_PREFIX(RasterPos4s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RasterPos4sv)) -GL_PREFIX(RasterPos4sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RasterPos4sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectd)) -GL_PREFIX(Rectd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectd)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectdv)) -GL_PREFIX(Rectdv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectdv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectf)) -GL_PREFIX(Rectf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectfv)) -GL_PREFIX(Rectfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Recti)) -GL_PREFIX(Recti): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Recti)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectiv)) -GL_PREFIX(Rectiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rects)) -GL_PREFIX(Rects): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rects)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rectsv)) -GL_PREFIX(Rectsv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rectsv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1d)) -GL_PREFIX(TexCoord1d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1dv)) -GL_PREFIX(TexCoord1dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1f)) -GL_PREFIX(TexCoord1f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1fv)) -GL_PREFIX(TexCoord1fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1i)) -GL_PREFIX(TexCoord1i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1iv)) -GL_PREFIX(TexCoord1iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1s)) -GL_PREFIX(TexCoord1s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord1sv)) -GL_PREFIX(TexCoord1sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord1sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2d)) -GL_PREFIX(TexCoord2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2dv)) -GL_PREFIX(TexCoord2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2f)) -GL_PREFIX(TexCoord2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2fv)) -GL_PREFIX(TexCoord2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2i)) -GL_PREFIX(TexCoord2i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2iv)) -GL_PREFIX(TexCoord2iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2s)) -GL_PREFIX(TexCoord2s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord2sv)) -GL_PREFIX(TexCoord2sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord2sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3d)) -GL_PREFIX(TexCoord3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3dv)) -GL_PREFIX(TexCoord3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3f)) -GL_PREFIX(TexCoord3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3fv)) -GL_PREFIX(TexCoord3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3i)) -GL_PREFIX(TexCoord3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3iv)) -GL_PREFIX(TexCoord3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3s)) -GL_PREFIX(TexCoord3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord3sv)) -GL_PREFIX(TexCoord3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord3sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4d)) -GL_PREFIX(TexCoord4d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4dv)) -GL_PREFIX(TexCoord4dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4f)) -GL_PREFIX(TexCoord4f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4fv)) -GL_PREFIX(TexCoord4fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4i)) -GL_PREFIX(TexCoord4i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4iv)) -GL_PREFIX(TexCoord4iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4s)) -GL_PREFIX(TexCoord4s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoord4sv)) -GL_PREFIX(TexCoord4sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoord4sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2d)) -GL_PREFIX(Vertex2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2dv)) -GL_PREFIX(Vertex2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2f)) -GL_PREFIX(Vertex2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2fv)) -GL_PREFIX(Vertex2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2i)) -GL_PREFIX(Vertex2i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2iv)) -GL_PREFIX(Vertex2iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2s)) -GL_PREFIX(Vertex2s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex2sv)) -GL_PREFIX(Vertex2sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex2sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3d)) -GL_PREFIX(Vertex3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3dv)) -GL_PREFIX(Vertex3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3f)) -GL_PREFIX(Vertex3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3fv)) -GL_PREFIX(Vertex3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3i)) -GL_PREFIX(Vertex3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3iv)) -GL_PREFIX(Vertex3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3s)) -GL_PREFIX(Vertex3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex3sv)) -GL_PREFIX(Vertex3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex3sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4d)) -GL_PREFIX(Vertex4d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4dv)) -GL_PREFIX(Vertex4dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4f)) -GL_PREFIX(Vertex4f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4fv)) -GL_PREFIX(Vertex4fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4i)) -GL_PREFIX(Vertex4i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4i)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4iv)) -GL_PREFIX(Vertex4iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4iv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4s)) -GL_PREFIX(Vertex4s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4s)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Vertex4sv)) -GL_PREFIX(Vertex4sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Vertex4sv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClipPlane)) -GL_PREFIX(ClipPlane): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClipPlane)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorMaterial)) -GL_PREFIX(ColorMaterial): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorMaterial)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CullFace)) -GL_PREFIX(CullFace): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CullFace)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Fogf)) -GL_PREFIX(Fogf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Fogf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Fogfv)) -GL_PREFIX(Fogfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Fogfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Fogi)) -GL_PREFIX(Fogi): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Fogi)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Fogiv)) -GL_PREFIX(Fogiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Fogiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FrontFace)) -GL_PREFIX(FrontFace): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FrontFace)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Hint)) -GL_PREFIX(Hint): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Hint)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Lightf)) -GL_PREFIX(Lightf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Lightf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Lightfv)) -GL_PREFIX(Lightfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Lightfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Lighti)) -GL_PREFIX(Lighti): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Lighti)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Lightiv)) -GL_PREFIX(Lightiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Lightiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LightModelf)) -GL_PREFIX(LightModelf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LightModelf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LightModelfv)) -GL_PREFIX(LightModelfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LightModelfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LightModeli)) -GL_PREFIX(LightModeli): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LightModeli)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LightModeliv)) -GL_PREFIX(LightModeliv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LightModeliv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LineStipple)) -GL_PREFIX(LineStipple): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LineStipple)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LineWidth)) -GL_PREFIX(LineWidth): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LineWidth)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Materialf)) -GL_PREFIX(Materialf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Materialf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Materialfv)) -GL_PREFIX(Materialfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Materialfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Materiali)) -GL_PREFIX(Materiali): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Materiali)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Materialiv)) -GL_PREFIX(Materialiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Materialiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointSize)) -GL_PREFIX(PointSize): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointSize)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PolygonMode)) -GL_PREFIX(PolygonMode): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PolygonMode)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PolygonStipple)) -GL_PREFIX(PolygonStipple): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PolygonStipple)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Scissor)) -GL_PREFIX(Scissor): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Scissor)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ShadeModel)) -GL_PREFIX(ShadeModel): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ShadeModel)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexParameterf)) -GL_PREFIX(TexParameterf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexParameterf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexParameterfv)) -GL_PREFIX(TexParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexParameteri)) -GL_PREFIX(TexParameteri): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexParameteri)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexParameteriv)) -GL_PREFIX(TexParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexImage1D)) -GL_PREFIX(TexImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexImage2D)) -GL_PREFIX(TexImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexEnvf)) -GL_PREFIX(TexEnvf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexEnvf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexEnvfv)) -GL_PREFIX(TexEnvfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexEnvfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexEnvi)) -GL_PREFIX(TexEnvi): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexEnvi)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexEnviv)) -GL_PREFIX(TexEnviv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexEnviv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGend)) -GL_PREFIX(TexGend): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGend)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGendv)) -GL_PREFIX(TexGendv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGendv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGenf)) -GL_PREFIX(TexGenf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGenf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGenfv)) -GL_PREFIX(TexGenfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGenfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGeni)) -GL_PREFIX(TexGeni): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGeni)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexGeniv)) -GL_PREFIX(TexGeniv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexGeniv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FeedbackBuffer)) -GL_PREFIX(FeedbackBuffer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FeedbackBuffer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SelectBuffer)) -GL_PREFIX(SelectBuffer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SelectBuffer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RenderMode)) -GL_PREFIX(RenderMode): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RenderMode)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(InitNames)) -GL_PREFIX(InitNames): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_InitNames)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadName)) -GL_PREFIX(LoadName): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadName)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PassThrough)) -GL_PREFIX(PassThrough): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PassThrough)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PopName)) -GL_PREFIX(PopName): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PopName)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PushName)) -GL_PREFIX(PushName): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PushName)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawBuffer)) -GL_PREFIX(DrawBuffer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawBuffer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Clear)) -GL_PREFIX(Clear): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Clear)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClearAccum)) -GL_PREFIX(ClearAccum): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClearAccum)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClearIndex)) -GL_PREFIX(ClearIndex): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClearIndex)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClearColor)) -GL_PREFIX(ClearColor): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClearColor)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClearStencil)) -GL_PREFIX(ClearStencil): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClearStencil)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClearDepth)) -GL_PREFIX(ClearDepth): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClearDepth)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(StencilMask)) -GL_PREFIX(StencilMask): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_StencilMask)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorMask)) -GL_PREFIX(ColorMask): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorMask)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DepthMask)) -GL_PREFIX(DepthMask): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DepthMask)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IndexMask)) -GL_PREFIX(IndexMask): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IndexMask)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Accum)) -GL_PREFIX(Accum): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Accum)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Disable)) -GL_PREFIX(Disable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Disable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Enable)) -GL_PREFIX(Enable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Enable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Finish)) -GL_PREFIX(Finish): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Finish)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Flush)) -GL_PREFIX(Flush): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Flush)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PopAttrib)) -GL_PREFIX(PopAttrib): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PopAttrib)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PushAttrib)) -GL_PREFIX(PushAttrib): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PushAttrib)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Map1d)) -GL_PREFIX(Map1d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Map1d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Map1f)) -GL_PREFIX(Map1f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Map1f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Map2d)) -GL_PREFIX(Map2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Map2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Map2f)) -GL_PREFIX(Map2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Map2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MapGrid1d)) -GL_PREFIX(MapGrid1d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MapGrid1d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MapGrid1f)) -GL_PREFIX(MapGrid1f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MapGrid1f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MapGrid2d)) -GL_PREFIX(MapGrid2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MapGrid2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MapGrid2f)) -GL_PREFIX(MapGrid2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MapGrid2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord1d)) -GL_PREFIX(EvalCoord1d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord1d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord1dv)) -GL_PREFIX(EvalCoord1dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord1dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord1f)) -GL_PREFIX(EvalCoord1f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord1f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord1fv)) -GL_PREFIX(EvalCoord1fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord1fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord2d)) -GL_PREFIX(EvalCoord2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord2d)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord2dv)) -GL_PREFIX(EvalCoord2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord2dv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord2f)) -GL_PREFIX(EvalCoord2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord2f)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalCoord2fv)) -GL_PREFIX(EvalCoord2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalCoord2fv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalMesh1)) -GL_PREFIX(EvalMesh1): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalMesh1)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalPoint1)) -GL_PREFIX(EvalPoint1): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalPoint1)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalMesh2)) -GL_PREFIX(EvalMesh2): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalMesh2)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EvalPoint2)) -GL_PREFIX(EvalPoint2): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EvalPoint2)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(AlphaFunc)) -GL_PREFIX(AlphaFunc): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_AlphaFunc)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendFunc)) -GL_PREFIX(BlendFunc): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendFunc)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LogicOp)) -GL_PREFIX(LogicOp): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LogicOp)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(StencilFunc)) -GL_PREFIX(StencilFunc): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_StencilFunc)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(StencilOp)) -GL_PREFIX(StencilOp): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_StencilOp)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DepthFunc)) -GL_PREFIX(DepthFunc): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DepthFunc)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelZoom)) -GL_PREFIX(PixelZoom): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelZoom)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTransferf)) -GL_PREFIX(PixelTransferf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTransferf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTransferi)) -GL_PREFIX(PixelTransferi): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTransferi)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelStoref)) -GL_PREFIX(PixelStoref): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelStoref)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelStorei)) -GL_PREFIX(PixelStorei): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelStorei)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelMapfv)) -GL_PREFIX(PixelMapfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelMapfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelMapuiv)) -GL_PREFIX(PixelMapuiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelMapuiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelMapusv)) -GL_PREFIX(PixelMapusv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelMapusv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ReadBuffer)) -GL_PREFIX(ReadBuffer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ReadBuffer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyPixels)) -GL_PREFIX(CopyPixels): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyPixels)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ReadPixels)) -GL_PREFIX(ReadPixels): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ReadPixels)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawPixels)) -GL_PREFIX(DrawPixels): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawPixels)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetBooleanv)) -GL_PREFIX(GetBooleanv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetBooleanv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetClipPlane)) -GL_PREFIX(GetClipPlane): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetClipPlane)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetDoublev)) -GL_PREFIX(GetDoublev): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetDoublev)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetError)) -GL_PREFIX(GetError): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetError)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFloatv)) -GL_PREFIX(GetFloatv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFloatv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetIntegerv)) -GL_PREFIX(GetIntegerv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetIntegerv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetLightfv)) -GL_PREFIX(GetLightfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetLightfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetLightiv)) -GL_PREFIX(GetLightiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetLightiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMapdv)) -GL_PREFIX(GetMapdv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMapdv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMapfv)) -GL_PREFIX(GetMapfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMapfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMapiv)) -GL_PREFIX(GetMapiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMapiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMaterialfv)) -GL_PREFIX(GetMaterialfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMaterialfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMaterialiv)) -GL_PREFIX(GetMaterialiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMaterialiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPixelMapfv)) -GL_PREFIX(GetPixelMapfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPixelMapfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPixelMapuiv)) -GL_PREFIX(GetPixelMapuiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPixelMapuiv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPixelMapusv)) -GL_PREFIX(GetPixelMapusv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPixelMapusv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPolygonStipple)) -GL_PREFIX(GetPolygonStipple): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPolygonStipple)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetString)) -GL_PREFIX(GetString): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetString)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexEnvfv)) -GL_PREFIX(GetTexEnvfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexEnvfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexEnviv)) -GL_PREFIX(GetTexEnviv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexEnviv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexGendv)) -GL_PREFIX(GetTexGendv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexGendv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexGenfv)) -GL_PREFIX(GetTexGenfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexGenfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexGeniv)) -GL_PREFIX(GetTexGeniv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexGeniv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexImage)) -GL_PREFIX(GetTexImage): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexImage)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexParameterfv)) -GL_PREFIX(GetTexParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexParameteriv)) -GL_PREFIX(GetTexParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexLevelParameterfv)) -GL_PREFIX(GetTexLevelParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexLevelParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexLevelParameteriv)) -GL_PREFIX(GetTexLevelParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexLevelParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsEnabled)) -GL_PREFIX(IsEnabled): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsEnabled)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsList)) -GL_PREFIX(IsList): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsList)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DepthRange)) -GL_PREFIX(DepthRange): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DepthRange)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Frustum)) -GL_PREFIX(Frustum): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Frustum)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadIdentity)) -GL_PREFIX(LoadIdentity): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadIdentity)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadMatrixf)) -GL_PREFIX(LoadMatrixf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadMatrixf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadMatrixd)) -GL_PREFIX(LoadMatrixd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadMatrixd)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MatrixMode)) -GL_PREFIX(MatrixMode): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MatrixMode)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultMatrixf)) -GL_PREFIX(MultMatrixf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultMatrixf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultMatrixd)) -GL_PREFIX(MultMatrixd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultMatrixd)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Ortho)) -GL_PREFIX(Ortho): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Ortho)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PopMatrix)) -GL_PREFIX(PopMatrix): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PopMatrix)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PushMatrix)) -GL_PREFIX(PushMatrix): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PushMatrix)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rotated)) -GL_PREFIX(Rotated): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rotated)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Rotatef)) -GL_PREFIX(Rotatef): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Rotatef)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Scaled)) -GL_PREFIX(Scaled): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Scaled)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Scalef)) -GL_PREFIX(Scalef): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Scalef)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Translated)) -GL_PREFIX(Translated): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Translated)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Translatef)) -GL_PREFIX(Translatef): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Translatef)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Viewport)) -GL_PREFIX(Viewport): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Viewport)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ArrayElement)) -GL_PREFIX(ArrayElement): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ArrayElement)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorPointer)) -GL_PREFIX(ColorPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DisableClientState)) -GL_PREFIX(DisableClientState): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DisableClientState)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawArrays)) -GL_PREFIX(DrawArrays): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawArrays)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawElements)) -GL_PREFIX(DrawElements): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawElements)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EdgeFlagPointer)) -GL_PREFIX(EdgeFlagPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EdgeFlagPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EnableClientState)) -GL_PREFIX(EnableClientState): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EnableClientState)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPointerv)) -GL_PREFIX(GetPointerv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPointerv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IndexPointer)) -GL_PREFIX(IndexPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IndexPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(InterleavedArrays)) -GL_PREFIX(InterleavedArrays): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_InterleavedArrays)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(NormalPointer)) -GL_PREFIX(NormalPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_NormalPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoordPointer)) -GL_PREFIX(TexCoordPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoordPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexPointer)) -GL_PREFIX(VertexPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexPointer)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PolygonOffset)) -GL_PREFIX(PolygonOffset): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PolygonOffset)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexImage1D)) -GL_PREFIX(CopyTexImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexImage2D)) -GL_PREFIX(CopyTexImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage1D)) -GL_PREFIX(CopyTexSubImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage2D)) -GL_PREFIX(CopyTexSubImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage1D)) -GL_PREFIX(TexSubImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage2D)) -GL_PREFIX(TexSubImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(AreTexturesResident)) -GL_PREFIX(AreTexturesResident): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_AreTexturesResident)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BindTexture)) -GL_PREFIX(BindTexture): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BindTexture)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DeleteTextures)) -GL_PREFIX(DeleteTextures): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DeleteTextures)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GenTextures)) -GL_PREFIX(GenTextures): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GenTextures)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsTexture)) -GL_PREFIX(IsTexture): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsTexture)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PrioritizeTextures)) -GL_PREFIX(PrioritizeTextures): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PrioritizeTextures)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexub)) -GL_PREFIX(Indexub): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexub)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Indexubv)) -GL_PREFIX(Indexubv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Indexubv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PopClientAttrib)) -GL_PREFIX(PopClientAttrib): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PopClientAttrib)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PushClientAttrib)) -GL_PREFIX(PushClientAttrib): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PushClientAttrib)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendColor)) -GL_PREFIX(BlendColor): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendColor)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendEquation)) -GL_PREFIX(BlendEquation): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendEquation)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawRangeElements)) -GL_PREFIX(DrawRangeElements): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawRangeElements)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTable)) -GL_PREFIX(ColorTable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableParameterfv)) -GL_PREFIX(ColorTableParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTableParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableParameteriv)) -GL_PREFIX(ColorTableParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTableParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyColorTable)) -GL_PREFIX(CopyColorTable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTable)) -GL_PREFIX(GetColorTable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameterfv)) -GL_PREFIX(GetColorTableParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameteriv)) -GL_PREFIX(GetColorTableParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorSubTable)) -GL_PREFIX(ColorSubTable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorSubTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyColorSubTable)) -GL_PREFIX(CopyColorSubTable): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyColorSubTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionFilter1D)) -GL_PREFIX(ConvolutionFilter1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionFilter1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionFilter2D)) -GL_PREFIX(ConvolutionFilter2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameterf)) -GL_PREFIX(ConvolutionParameterf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameterf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameterfv)) -GL_PREFIX(ConvolutionParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameteri)) -GL_PREFIX(ConvolutionParameteri): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameteri)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameteriv)) -GL_PREFIX(ConvolutionParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyConvolutionFilter1D)) -GL_PREFIX(CopyConvolutionFilter1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyConvolutionFilter2D)) -GL_PREFIX(CopyConvolutionFilter2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionFilter)) -GL_PREFIX(GetConvolutionFilter): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionFilter)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionParameterfv)) -GL_PREFIX(GetConvolutionParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionParameteriv)) -GL_PREFIX(GetConvolutionParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetSeparableFilter)) -GL_PREFIX(GetSeparableFilter): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetSeparableFilter)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SeparableFilter2D)) -GL_PREFIX(SeparableFilter2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SeparableFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogram)) -GL_PREFIX(GetHistogram): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogram)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogramParameterfv)) -GL_PREFIX(GetHistogramParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogramParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogramParameteriv)) -GL_PREFIX(GetHistogramParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogramParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmax)) -GL_PREFIX(GetMinmax): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmax)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmaxParameterfv)) -GL_PREFIX(GetMinmaxParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmaxParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmaxParameteriv)) -GL_PREFIX(GetMinmaxParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmaxParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Histogram)) -GL_PREFIX(Histogram): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Histogram)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(Minmax)) -GL_PREFIX(Minmax): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Minmax)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ResetHistogram)) -GL_PREFIX(ResetHistogram): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ResetHistogram)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ResetMinmax)) -GL_PREFIX(ResetMinmax): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ResetMinmax)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexImage3D)) -GL_PREFIX(TexImage3D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage3D)) -GL_PREFIX(TexSubImage3D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage3D)) -GL_PREFIX(CopyTexSubImage3D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ActiveTextureARB)) -GL_PREFIX(ActiveTextureARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ActiveTextureARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClientActiveTextureARB)) -GL_PREFIX(ClientActiveTextureARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClientActiveTextureARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1dARB)) -GL_PREFIX(MultiTexCoord1dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1dvARB)) -GL_PREFIX(MultiTexCoord1dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1fARB)) -GL_PREFIX(MultiTexCoord1fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1fvARB)) -GL_PREFIX(MultiTexCoord1fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1iARB)) -GL_PREFIX(MultiTexCoord1iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1ivARB)) -GL_PREFIX(MultiTexCoord1ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1sARB)) -GL_PREFIX(MultiTexCoord1sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1svARB)) -GL_PREFIX(MultiTexCoord1svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2dARB)) -GL_PREFIX(MultiTexCoord2dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2dvARB)) -GL_PREFIX(MultiTexCoord2dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2fARB)) -GL_PREFIX(MultiTexCoord2fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2fvARB)) -GL_PREFIX(MultiTexCoord2fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2iARB)) -GL_PREFIX(MultiTexCoord2iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2ivARB)) -GL_PREFIX(MultiTexCoord2ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2sARB)) -GL_PREFIX(MultiTexCoord2sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2svARB)) -GL_PREFIX(MultiTexCoord2svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3dARB)) -GL_PREFIX(MultiTexCoord3dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3dvARB)) -GL_PREFIX(MultiTexCoord3dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3fARB)) -GL_PREFIX(MultiTexCoord3fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3fvARB)) -GL_PREFIX(MultiTexCoord3fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3iARB)) -GL_PREFIX(MultiTexCoord3iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3ivARB)) -GL_PREFIX(MultiTexCoord3ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3sARB)) -GL_PREFIX(MultiTexCoord3sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3svARB)) -GL_PREFIX(MultiTexCoord3svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4dARB)) -GL_PREFIX(MultiTexCoord4dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4dvARB)) -GL_PREFIX(MultiTexCoord4dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4fARB)) -GL_PREFIX(MultiTexCoord4fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4fvARB)) -GL_PREFIX(MultiTexCoord4fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4iARB)) -GL_PREFIX(MultiTexCoord4iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4ivARB)) -GL_PREFIX(MultiTexCoord4ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4sARB)) -GL_PREFIX(MultiTexCoord4sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4svARB)) -GL_PREFIX(MultiTexCoord4svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadTransposeMatrixfARB)) -GL_PREFIX(LoadTransposeMatrixfARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixfARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadTransposeMatrixdARB)) -GL_PREFIX(LoadTransposeMatrixdARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixdARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultTransposeMatrixfARB)) -GL_PREFIX(MultTransposeMatrixfARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultTransposeMatrixfARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultTransposeMatrixdARB)) -GL_PREFIX(MultTransposeMatrixdARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultTransposeMatrixdARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SampleCoverageARB)) -GL_PREFIX(SampleCoverageARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SampleCoverageARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(__unused413)) -GL_PREFIX(__unused413): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset___unused413)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage3DARB)) -GL_PREFIX(CompressedTexImage3DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage3DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage2DARB)) -GL_PREFIX(CompressedTexImage2DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage2DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage1DARB)) -GL_PREFIX(CompressedTexImage1DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage1DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage3DARB)) -GL_PREFIX(CompressedTexSubImage3DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage3DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage2DARB)) -GL_PREFIX(CompressedTexSubImage2DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage2DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage1DARB)) -GL_PREFIX(CompressedTexSubImage1DARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage1DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCompressedTexImageARB)) -GL_PREFIX(GetCompressedTexImageARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCompressedTexImageARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ActiveTexture)) -GL_PREFIX(ActiveTexture): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ActiveTextureARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ClientActiveTexture)) -GL_PREFIX(ClientActiveTexture): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ClientActiveTextureARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1d)) -GL_PREFIX(MultiTexCoord1d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1dv)) -GL_PREFIX(MultiTexCoord1dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1f)) -GL_PREFIX(MultiTexCoord1f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1fv)) -GL_PREFIX(MultiTexCoord1fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1i)) -GL_PREFIX(MultiTexCoord1i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1iv)) -GL_PREFIX(MultiTexCoord1iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1s)) -GL_PREFIX(MultiTexCoord1s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord1sv)) -GL_PREFIX(MultiTexCoord1sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord1svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2d)) -GL_PREFIX(MultiTexCoord2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2dv)) -GL_PREFIX(MultiTexCoord2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2f)) -GL_PREFIX(MultiTexCoord2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2fv)) -GL_PREFIX(MultiTexCoord2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2i)) -GL_PREFIX(MultiTexCoord2i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2iv)) -GL_PREFIX(MultiTexCoord2iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2s)) -GL_PREFIX(MultiTexCoord2s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord2sv)) -GL_PREFIX(MultiTexCoord2sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord2svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3d)) -GL_PREFIX(MultiTexCoord3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3dv)) -GL_PREFIX(MultiTexCoord3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3f)) -GL_PREFIX(MultiTexCoord3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3fv)) -GL_PREFIX(MultiTexCoord3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3i)) -GL_PREFIX(MultiTexCoord3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3iv)) -GL_PREFIX(MultiTexCoord3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3s)) -GL_PREFIX(MultiTexCoord3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord3sv)) -GL_PREFIX(MultiTexCoord3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord3svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4d)) -GL_PREFIX(MultiTexCoord4d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4dARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4dv)) -GL_PREFIX(MultiTexCoord4dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4dvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4f)) -GL_PREFIX(MultiTexCoord4f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4fARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4fv)) -GL_PREFIX(MultiTexCoord4fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4fvARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4i)) -GL_PREFIX(MultiTexCoord4i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4iARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4iv)) -GL_PREFIX(MultiTexCoord4iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4ivARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4s)) -GL_PREFIX(MultiTexCoord4s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4sARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiTexCoord4sv)) -GL_PREFIX(MultiTexCoord4sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiTexCoord4svARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadTransposeMatrixf)) -GL_PREFIX(LoadTransposeMatrixf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixfARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadTransposeMatrixd)) -GL_PREFIX(LoadTransposeMatrixd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixdARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultTransposeMatrixf)) -GL_PREFIX(MultTransposeMatrixf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultTransposeMatrixfARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultTransposeMatrixd)) -GL_PREFIX(MultTransposeMatrixd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultTransposeMatrixdARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SampleCoverage)) -GL_PREFIX(SampleCoverage): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SampleCoverageARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage3D)) -GL_PREFIX(CompressedTexImage3D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage3DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage2D)) -GL_PREFIX(CompressedTexImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage2DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexImage1D)) -GL_PREFIX(CompressedTexImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexImage1DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage3D)) -GL_PREFIX(CompressedTexSubImage3D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage3DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage2D)) -GL_PREFIX(CompressedTexSubImage2D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage2DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CompressedTexSubImage1D)) -GL_PREFIX(CompressedTexSubImage1D): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CompressedTexSubImage1DARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCompressedTexImage)) -GL_PREFIX(GetCompressedTexImage): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCompressedTexImageARB)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendColorEXT)) -GL_PREFIX(BlendColorEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendColor)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PolygonOffsetEXT)) -GL_PREFIX(PolygonOffsetEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PolygonOffsetEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexImage3DEXT)) -GL_PREFIX(TexImage3DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage3DEXT)) -GL_PREFIX(TexSubImage3DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTexFilterFuncSGIS)) -GL_PREFIX(GetTexFilterFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTexFilterFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexFilterFuncSGIS)) -GL_PREFIX(TexFilterFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexFilterFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage1DEXT)) -GL_PREFIX(TexSubImage1DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage2DEXT)) -GL_PREFIX(TexSubImage2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexImage1DEXT)) -GL_PREFIX(CopyTexImage1DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexImage2DEXT)) -GL_PREFIX(CopyTexImage2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage1DEXT)) -GL_PREFIX(CopyTexSubImage1DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage2DEXT)) -GL_PREFIX(CopyTexSubImage2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyTexSubImage3DEXT)) -GL_PREFIX(CopyTexSubImage3DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogramEXT)) -GL_PREFIX(GetHistogramEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogramEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogramParameterfvEXT)) -GL_PREFIX(GetHistogramParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogramParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetHistogramParameterivEXT)) -GL_PREFIX(GetHistogramParameterivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetHistogramParameterivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmaxEXT)) -GL_PREFIX(GetMinmaxEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmaxEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmaxParameterfvEXT)) -GL_PREFIX(GetMinmaxParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmaxParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetMinmaxParameterivEXT)) -GL_PREFIX(GetMinmaxParameterivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetMinmaxParameterivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(HistogramEXT)) -GL_PREFIX(HistogramEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Histogram)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MinmaxEXT)) -GL_PREFIX(MinmaxEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_Minmax)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ResetHistogramEXT)) -GL_PREFIX(ResetHistogramEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ResetHistogram)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ResetMinmaxEXT)) -GL_PREFIX(ResetMinmaxEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ResetMinmax)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionFilter1DEXT)) -GL_PREFIX(ConvolutionFilter1DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionFilter1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionFilter2DEXT)) -GL_PREFIX(ConvolutionFilter2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameterfEXT)) -GL_PREFIX(ConvolutionParameterfEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameterf)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameterfvEXT)) -GL_PREFIX(ConvolutionParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameteriEXT)) -GL_PREFIX(ConvolutionParameteriEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameteri)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ConvolutionParameterivEXT)) -GL_PREFIX(ConvolutionParameterivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ConvolutionParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyConvolutionFilter1DEXT)) -GL_PREFIX(CopyConvolutionFilter1DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter1D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyConvolutionFilter2DEXT)) -GL_PREFIX(CopyConvolutionFilter2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionFilterEXT)) -GL_PREFIX(GetConvolutionFilterEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionFilterEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionParameterfvEXT)) -GL_PREFIX(GetConvolutionParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetConvolutionParameterivEXT)) -GL_PREFIX(GetConvolutionParameterivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetConvolutionParameterivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetSeparableFilterEXT)) -GL_PREFIX(GetSeparableFilterEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetSeparableFilterEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SeparableFilter2DEXT)) -GL_PREFIX(SeparableFilter2DEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SeparableFilter2D)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableSGI)) -GL_PREFIX(ColorTableSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableParameterfvSGI)) -GL_PREFIX(ColorTableParameterfvSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTableParameterfv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableParameterivSGI)) -GL_PREFIX(ColorTableParameterivSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTableParameteriv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyColorTableSGI)) -GL_PREFIX(CopyColorTableSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableSGI)) -GL_PREFIX(GetColorTableSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableSGI)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameterfvSGI)) -GL_PREFIX(GetColorTableParameterfvSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameterfvSGI)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameterivSGI)) -GL_PREFIX(GetColorTableParameterivSGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameterivSGI)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTexGenSGIX)) -GL_PREFIX(PixelTexGenSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTexGenSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTexGenParameteriSGIS)) -GL_PREFIX(PixelTexGenParameteriSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTexGenParameteriSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTexGenParameterivSGIS)) -GL_PREFIX(PixelTexGenParameterivSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTexGenParameterivSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTexGenParameterfSGIS)) -GL_PREFIX(PixelTexGenParameterfSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTexGenParameterfSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PixelTexGenParameterfvSGIS)) -GL_PREFIX(PixelTexGenParameterfvSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PixelTexGenParameterfvSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterivSGIS)) -GL_PREFIX(GetPixelTexGenParameterivSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterivSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterfvSGIS)) -GL_PREFIX(GetPixelTexGenParameterfvSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterfvSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexImage4DSGIS)) -GL_PREFIX(TexImage4DSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexImage4DSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexSubImage4DSGIS)) -GL_PREFIX(TexSubImage4DSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexSubImage4DSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(AreTexturesResidentEXT)) -GL_PREFIX(AreTexturesResidentEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_AreTexturesResidentEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BindTextureEXT)) -GL_PREFIX(BindTextureEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BindTexture)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DeleteTexturesEXT)) -GL_PREFIX(DeleteTexturesEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DeleteTextures)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GenTexturesEXT)) -GL_PREFIX(GenTexturesEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GenTexturesEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsTextureEXT)) -GL_PREFIX(IsTextureEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsTextureEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PrioritizeTexturesEXT)) -GL_PREFIX(PrioritizeTexturesEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PrioritizeTextures)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DetailTexFuncSGIS)) -GL_PREFIX(DetailTexFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DetailTexFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetDetailTexFuncSGIS)) -GL_PREFIX(GetDetailTexFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetDetailTexFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SharpenTexFuncSGIS)) -GL_PREFIX(SharpenTexFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SharpenTexFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetSharpenTexFuncSGIS)) -GL_PREFIX(GetSharpenTexFuncSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetSharpenTexFuncSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SampleMaskSGIS)) -GL_PREFIX(SampleMaskSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SampleMaskSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SamplePatternSGIS)) -GL_PREFIX(SamplePatternSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SamplePatternSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ArrayElementEXT)) -GL_PREFIX(ArrayElementEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ArrayElement)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorPointerEXT)) -GL_PREFIX(ColorPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawArraysEXT)) -GL_PREFIX(DrawArraysEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawArrays)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(EdgeFlagPointerEXT)) -GL_PREFIX(EdgeFlagPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_EdgeFlagPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetPointervEXT)) -GL_PREFIX(GetPointervEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetPointerv)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IndexPointerEXT)) -GL_PREFIX(IndexPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IndexPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(NormalPointerEXT)) -GL_PREFIX(NormalPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_NormalPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TexCoordPointerEXT)) -GL_PREFIX(TexCoordPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TexCoordPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexPointerEXT)) -GL_PREFIX(VertexPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendEquationEXT)) -GL_PREFIX(BlendEquationEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendEquation)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SpriteParameterfSGIX)) -GL_PREFIX(SpriteParameterfSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SpriteParameterfSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SpriteParameterfvSGIX)) -GL_PREFIX(SpriteParameterfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SpriteParameterfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SpriteParameteriSGIX)) -GL_PREFIX(SpriteParameteriSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SpriteParameteriSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SpriteParameterivSGIX)) -GL_PREFIX(SpriteParameterivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SpriteParameterivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfEXT)) -GL_PREFIX(PointParameterfEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfvEXT)) -GL_PREFIX(PointParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfARB)) -GL_PREFIX(PointParameterfARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfvARB)) -GL_PREFIX(PointParameterfvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfSGIS)) -GL_PREFIX(PointParameterfSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfvSGIS)) -GL_PREFIX(PointParameterfvSGIS): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetInstrumentsSGIX)) -GL_PREFIX(GetInstrumentsSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetInstrumentsSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(InstrumentsBufferSGIX)) -GL_PREFIX(InstrumentsBufferSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_InstrumentsBufferSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PollInstrumentsSGIX)) -GL_PREFIX(PollInstrumentsSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PollInstrumentsSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ReadInstrumentsSGIX)) -GL_PREFIX(ReadInstrumentsSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ReadInstrumentsSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(StartInstrumentsSGIX)) -GL_PREFIX(StartInstrumentsSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_StartInstrumentsSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(StopInstrumentsSGIX)) -GL_PREFIX(StopInstrumentsSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_StopInstrumentsSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FrameZoomSGIX)) -GL_PREFIX(FrameZoomSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FrameZoomSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TagSampleBufferSGIX)) -GL_PREFIX(TagSampleBufferSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TagSampleBufferSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ReferencePlaneSGIX)) -GL_PREFIX(ReferencePlaneSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ReferencePlaneSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FlushRasterSGIX)) -GL_PREFIX(FlushRasterSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FlushRasterSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorSubTableEXT)) -GL_PREFIX(ColorSubTableEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorSubTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CopyColorSubTableEXT)) -GL_PREFIX(CopyColorSubTableEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CopyColorSubTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(HintPGI)) -GL_PREFIX(HintPGI): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_HintPGI)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ColorTableEXT)) -GL_PREFIX(ColorTableEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ColorTable)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableEXT)) -GL_PREFIX(GetColorTableEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameterivEXT)) -GL_PREFIX(GetColorTableParameterivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameterivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetColorTableParameterfvEXT)) -GL_PREFIX(GetColorTableParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetColorTableParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetListParameterfvSGIX)) -GL_PREFIX(GetListParameterfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetListParameterfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetListParameterivSGIX)) -GL_PREFIX(GetListParameterivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetListParameterivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ListParameterfSGIX)) -GL_PREFIX(ListParameterfSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ListParameterfSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ListParameterfvSGIX)) -GL_PREFIX(ListParameterfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ListParameterfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ListParameteriSGIX)) -GL_PREFIX(ListParameteriSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ListParameteriSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ListParameterivSGIX)) -GL_PREFIX(ListParameterivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ListParameterivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IndexMaterialEXT)) -GL_PREFIX(IndexMaterialEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IndexMaterialEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IndexFuncEXT)) -GL_PREFIX(IndexFuncEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IndexFuncEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LockArraysEXT)) -GL_PREFIX(LockArraysEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LockArraysEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(UnlockArraysEXT)) -GL_PREFIX(UnlockArraysEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_UnlockArraysEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CullParameterdvEXT)) -GL_PREFIX(CullParameterdvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CullParameterdvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CullParameterfvEXT)) -GL_PREFIX(CullParameterfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CullParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentColorMaterialSGIX)) -GL_PREFIX(FragmentColorMaterialSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentColorMaterialSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightfSGIX)) -GL_PREFIX(FragmentLightfSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightfSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightfvSGIX)) -GL_PREFIX(FragmentLightfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightiSGIX)) -GL_PREFIX(FragmentLightiSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightiSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightivSGIX)) -GL_PREFIX(FragmentLightivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightModelfSGIX)) -GL_PREFIX(FragmentLightModelfSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightModelfSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightModelfvSGIX)) -GL_PREFIX(FragmentLightModelfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightModelfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightModeliSGIX)) -GL_PREFIX(FragmentLightModeliSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightModeliSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentLightModelivSGIX)) -GL_PREFIX(FragmentLightModelivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentLightModelivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentMaterialfSGIX)) -GL_PREFIX(FragmentMaterialfSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentMaterialfSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentMaterialfvSGIX)) -GL_PREFIX(FragmentMaterialfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentMaterialfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentMaterialiSGIX)) -GL_PREFIX(FragmentMaterialiSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentMaterialiSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FragmentMaterialivSGIX)) -GL_PREFIX(FragmentMaterialivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FragmentMaterialivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFragmentLightfvSGIX)) -GL_PREFIX(GetFragmentLightfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFragmentLightfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFragmentLightivSGIX)) -GL_PREFIX(GetFragmentLightivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFragmentLightivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFragmentMaterialfvSGIX)) -GL_PREFIX(GetFragmentMaterialfvSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFragmentMaterialfvSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFragmentMaterialivSGIX)) -GL_PREFIX(GetFragmentMaterialivSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFragmentMaterialivSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LightEnviSGIX)) -GL_PREFIX(LightEnviSGIX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LightEnviSGIX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DrawRangeElementsEXT)) -GL_PREFIX(DrawRangeElementsEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DrawRangeElements)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3bEXT)) -GL_PREFIX(SecondaryColor3bEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3bEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3bvEXT)) -GL_PREFIX(SecondaryColor3bvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3bvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3dEXT)) -GL_PREFIX(SecondaryColor3dEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3dEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3dvEXT)) -GL_PREFIX(SecondaryColor3dvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3dvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3fEXT)) -GL_PREFIX(SecondaryColor3fEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3fEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3fvEXT)) -GL_PREFIX(SecondaryColor3fvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3fvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3iEXT)) -GL_PREFIX(SecondaryColor3iEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3iEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ivEXT)) -GL_PREFIX(SecondaryColor3ivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3sEXT)) -GL_PREFIX(SecondaryColor3sEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3sEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3svEXT)) -GL_PREFIX(SecondaryColor3svEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3svEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ubEXT)) -GL_PREFIX(SecondaryColor3ubEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ubEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ubvEXT)) -GL_PREFIX(SecondaryColor3ubvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ubvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3uiEXT)) -GL_PREFIX(SecondaryColor3uiEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3uiEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3uivEXT)) -GL_PREFIX(SecondaryColor3uivEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3uivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3usEXT)) -GL_PREFIX(SecondaryColor3usEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3usEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3usvEXT)) -GL_PREFIX(SecondaryColor3usvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3usvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColorPointerEXT)) -GL_PREFIX(SecondaryColorPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColorPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiDrawArraysEXT)) -GL_PREFIX(MultiDrawArraysEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiDrawArraysEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiDrawElementsEXT)) -GL_PREFIX(MultiDrawElementsEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiDrawElementsEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordfEXT)) -GL_PREFIX(FogCoordfEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordfvEXT)) -GL_PREFIX(FogCoordfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoorddEXT)) -GL_PREFIX(FogCoorddEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoorddEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoorddvEXT)) -GL_PREFIX(FogCoorddvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoorddvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordPointerEXT)) -GL_PREFIX(FogCoordPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendFuncSeparateEXT)) -GL_PREFIX(BlendFuncSeparateEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendFuncSeparateEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendFuncSeparateINGR)) -GL_PREFIX(BlendFuncSeparateINGR): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendFuncSeparateEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexWeightfEXT)) -GL_PREFIX(VertexWeightfEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexWeightfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexWeightfvEXT)) -GL_PREFIX(VertexWeightfvEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexWeightfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexWeightPointerEXT)) -GL_PREFIX(VertexWeightPointerEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexWeightPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FlushVertexArrayRangeNV)) -GL_PREFIX(FlushVertexArrayRangeNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FlushVertexArrayRangeNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexArrayRangeNV)) -GL_PREFIX(VertexArrayRangeNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexArrayRangeNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerParameterfvNV)) -GL_PREFIX(CombinerParameterfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerParameterfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerParameterfNV)) -GL_PREFIX(CombinerParameterfNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerParameterfNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerParameterivNV)) -GL_PREFIX(CombinerParameterivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerParameteriNV)) -GL_PREFIX(CombinerParameteriNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerParameteriNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerInputNV)) -GL_PREFIX(CombinerInputNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerInputNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(CombinerOutputNV)) -GL_PREFIX(CombinerOutputNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_CombinerOutputNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FinalCombinerInputNV)) -GL_PREFIX(FinalCombinerInputNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FinalCombinerInputNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCombinerInputParameterfvNV)) -GL_PREFIX(GetCombinerInputParameterfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCombinerInputParameterfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCombinerInputParameterivNV)) -GL_PREFIX(GetCombinerInputParameterivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCombinerInputParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCombinerOutputParameterfvNV)) -GL_PREFIX(GetCombinerOutputParameterfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCombinerOutputParameterfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetCombinerOutputParameterivNV)) -GL_PREFIX(GetCombinerOutputParameterivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetCombinerOutputParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFinalCombinerInputParameterfvNV)) -GL_PREFIX(GetFinalCombinerInputParameterfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFinalCombinerInputParameterfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFinalCombinerInputParameterivNV)) -GL_PREFIX(GetFinalCombinerInputParameterivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFinalCombinerInputParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ResizeBuffersMESA)) -GL_PREFIX(ResizeBuffersMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ResizeBuffersMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2dMESA)) -GL_PREFIX(WindowPos2dMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2dvMESA)) -GL_PREFIX(WindowPos2dvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2fMESA)) -GL_PREFIX(WindowPos2fMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2fvMESA)) -GL_PREFIX(WindowPos2fvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2iMESA)) -GL_PREFIX(WindowPos2iMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2ivMESA)) -GL_PREFIX(WindowPos2ivMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2sMESA)) -GL_PREFIX(WindowPos2sMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2svMESA)) -GL_PREFIX(WindowPos2svMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3dMESA)) -GL_PREFIX(WindowPos3dMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3dvMESA)) -GL_PREFIX(WindowPos3dvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3fMESA)) -GL_PREFIX(WindowPos3fMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3fvMESA)) -GL_PREFIX(WindowPos3fvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3iMESA)) -GL_PREFIX(WindowPos3iMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3ivMESA)) -GL_PREFIX(WindowPos3ivMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3sMESA)) -GL_PREFIX(WindowPos3sMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3svMESA)) -GL_PREFIX(WindowPos3svMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4dMESA)) -GL_PREFIX(WindowPos4dMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4dvMESA)) -GL_PREFIX(WindowPos4dvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4fMESA)) -GL_PREFIX(WindowPos4fMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4fvMESA)) -GL_PREFIX(WindowPos4fvMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4iMESA)) -GL_PREFIX(WindowPos4iMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4ivMESA)) -GL_PREFIX(WindowPos4ivMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4sMESA)) -GL_PREFIX(WindowPos4sMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos4svMESA)) -GL_PREFIX(WindowPos4svMESA): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos4svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TbufferMask3DFX)) -GL_PREFIX(TbufferMask3DFX): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TbufferMask3DFX)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SampleMaskEXT)) -GL_PREFIX(SampleMaskEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SampleMaskSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SamplePatternEXT)) -GL_PREFIX(SamplePatternEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SamplePatternSGIS)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DeleteFencesNV)) -GL_PREFIX(DeleteFencesNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DeleteFencesNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GenFencesNV)) -GL_PREFIX(GenFencesNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GenFencesNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsFenceNV)) -GL_PREFIX(IsFenceNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsFenceNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TestFenceNV)) -GL_PREFIX(TestFenceNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TestFenceNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetFenceivNV)) -GL_PREFIX(GetFenceivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetFenceivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FinishFenceNV)) -GL_PREFIX(FinishFenceNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FinishFenceNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SetFenceNV)) -GL_PREFIX(SetFenceNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SetFenceNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2dARB)) -GL_PREFIX(WindowPos2dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2fARB)) -GL_PREFIX(WindowPos2fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2iARB)) -GL_PREFIX(WindowPos2iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2sARB)) -GL_PREFIX(WindowPos2sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2dvARB)) -GL_PREFIX(WindowPos2dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2fvARB)) -GL_PREFIX(WindowPos2fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2ivARB)) -GL_PREFIX(WindowPos2ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2svARB)) -GL_PREFIX(WindowPos2svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3dARB)) -GL_PREFIX(WindowPos3dARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3fARB)) -GL_PREFIX(WindowPos3fARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3iARB)) -GL_PREFIX(WindowPos3iARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3sARB)) -GL_PREFIX(WindowPos3sARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3dvARB)) -GL_PREFIX(WindowPos3dvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3fvARB)) -GL_PREFIX(WindowPos3fvARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3ivARB)) -GL_PREFIX(WindowPos3ivARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3svARB)) -GL_PREFIX(WindowPos3svARB): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(AreProgramsResidentNV)) -GL_PREFIX(AreProgramsResidentNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_AreProgramsResidentNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BindProgramNV)) -GL_PREFIX(BindProgramNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BindProgramNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(DeleteProgramsNV)) -GL_PREFIX(DeleteProgramsNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_DeleteProgramsNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ExecuteProgramNV)) -GL_PREFIX(ExecuteProgramNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ExecuteProgramNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GenProgramsNV)) -GL_PREFIX(GenProgramsNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GenProgramsNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetProgramParameterdvNV)) -GL_PREFIX(GetProgramParameterdvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetProgramParameterdvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetProgramParameterfvNV)) -GL_PREFIX(GetProgramParameterfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetProgramParameterfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetProgramivNV)) -GL_PREFIX(GetProgramivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetProgramivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetProgramStringNV)) -GL_PREFIX(GetProgramStringNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetProgramStringNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetTrackMatrixivNV)) -GL_PREFIX(GetTrackMatrixivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetTrackMatrixivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetVertexAttribdvNV)) -GL_PREFIX(GetVertexAttribdvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetVertexAttribdvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetVertexAttribfvNV)) -GL_PREFIX(GetVertexAttribfvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetVertexAttribfvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetVertexAttribivNV)) -GL_PREFIX(GetVertexAttribivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetVertexAttribivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(GetVertexAttribPointervNV)) -GL_PREFIX(GetVertexAttribPointervNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_GetVertexAttribPointervNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(IsProgramNV)) -GL_PREFIX(IsProgramNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_IsProgramNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(LoadProgramNV)) -GL_PREFIX(LoadProgramNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_LoadProgramNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameter4dNV)) -GL_PREFIX(ProgramParameter4dNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameter4dNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameter4dvNV)) -GL_PREFIX(ProgramParameter4dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameter4dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameter4fNV)) -GL_PREFIX(ProgramParameter4fNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameter4fNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameter4fvNV)) -GL_PREFIX(ProgramParameter4fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameter4fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameters4dvNV)) -GL_PREFIX(ProgramParameters4dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameters4dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ProgramParameters4fvNV)) -GL_PREFIX(ProgramParameters4fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ProgramParameters4fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(RequestResidentProgramsNV)) -GL_PREFIX(RequestResidentProgramsNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_RequestResidentProgramsNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(TrackMatrixNV)) -GL_PREFIX(TrackMatrixNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_TrackMatrixNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribPointerNV)) -GL_PREFIX(VertexAttribPointerNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribPointerNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1dNV)) -GL_PREFIX(VertexAttrib1dNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1dNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1dvNV)) -GL_PREFIX(VertexAttrib1dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1fNV)) -GL_PREFIX(VertexAttrib1fNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1fNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1fvNV)) -GL_PREFIX(VertexAttrib1fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1sNV)) -GL_PREFIX(VertexAttrib1sNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1sNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib1svNV)) -GL_PREFIX(VertexAttrib1svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib1svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2dNV)) -GL_PREFIX(VertexAttrib2dNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2dNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2dvNV)) -GL_PREFIX(VertexAttrib2dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2fNV)) -GL_PREFIX(VertexAttrib2fNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2fNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2fvNV)) -GL_PREFIX(VertexAttrib2fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2sNV)) -GL_PREFIX(VertexAttrib2sNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2sNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib2svNV)) -GL_PREFIX(VertexAttrib2svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib2svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3dNV)) -GL_PREFIX(VertexAttrib3dNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3dNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3dvNV)) -GL_PREFIX(VertexAttrib3dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3fNV)) -GL_PREFIX(VertexAttrib3fNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3fNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3fvNV)) -GL_PREFIX(VertexAttrib3fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3sNV)) -GL_PREFIX(VertexAttrib3sNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3sNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib3svNV)) -GL_PREFIX(VertexAttrib3svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib3svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4dNV)) -GL_PREFIX(VertexAttrib4dNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4dNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4dvNV)) -GL_PREFIX(VertexAttrib4dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4fNV)) -GL_PREFIX(VertexAttrib4fNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4fNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4fvNV)) -GL_PREFIX(VertexAttrib4fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4sNV)) -GL_PREFIX(VertexAttrib4sNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4sNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4svNV)) -GL_PREFIX(VertexAttrib4svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4ubNV)) -GL_PREFIX(VertexAttrib4ubNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4ubNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttrib4ubvNV)) -GL_PREFIX(VertexAttrib4ubvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttrib4ubvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs1dvNV)) -GL_PREFIX(VertexAttribs1dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs1dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs1fvNV)) -GL_PREFIX(VertexAttribs1fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs1fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs1svNV)) -GL_PREFIX(VertexAttribs1svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs1svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs2dvNV)) -GL_PREFIX(VertexAttribs2dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs2dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs2fvNV)) -GL_PREFIX(VertexAttribs2fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs2fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs2svNV)) -GL_PREFIX(VertexAttribs2svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs2svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs3dvNV)) -GL_PREFIX(VertexAttribs3dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs3dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs3fvNV)) -GL_PREFIX(VertexAttribs3fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs3fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs3svNV)) -GL_PREFIX(VertexAttribs3svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs3svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs4dvNV)) -GL_PREFIX(VertexAttribs4dvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs4dvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs4fvNV)) -GL_PREFIX(VertexAttribs4fvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs4fvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs4svNV)) -GL_PREFIX(VertexAttribs4svNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs4svNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(VertexAttribs4ubvNV)) -GL_PREFIX(VertexAttribs4ubvNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_VertexAttribs4ubvNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameteriNV)) -GL_PREFIX(PointParameteriNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameteriNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterivNV)) -GL_PREFIX(PointParameterivNV): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(BlendFuncSeparate)) -GL_PREFIX(BlendFuncSeparate): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_BlendFuncSeparateEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordf)) -GL_PREFIX(FogCoordf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordfv)) -GL_PREFIX(FogCoordfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordd)) -GL_PREFIX(FogCoordd): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoorddEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoorddv)) -GL_PREFIX(FogCoorddv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoorddvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(FogCoordPointer)) -GL_PREFIX(FogCoordPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_FogCoordPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiDrawArrays)) -GL_PREFIX(MultiDrawArrays): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiDrawArraysEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(MultiDrawElements)) -GL_PREFIX(MultiDrawElements): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_MultiDrawElementsEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterf)) -GL_PREFIX(PointParameterf): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameterfv)) -GL_PREFIX(PointParameterfv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterfvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameteri)) -GL_PREFIX(PointParameteri): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameteriNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(PointParameteriv)) -GL_PREFIX(PointParameteriv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_PointParameterivNV)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3b)) -GL_PREFIX(SecondaryColor3b): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3bEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3bv)) -GL_PREFIX(SecondaryColor3bv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3bvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3d)) -GL_PREFIX(SecondaryColor3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3dEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3dv)) -GL_PREFIX(SecondaryColor3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3dvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3f)) -GL_PREFIX(SecondaryColor3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3fEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3fv)) -GL_PREFIX(SecondaryColor3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3fvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3i)) -GL_PREFIX(SecondaryColor3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3iEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3iv)) -GL_PREFIX(SecondaryColor3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3s)) -GL_PREFIX(SecondaryColor3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3sEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3sv)) -GL_PREFIX(SecondaryColor3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3svEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ub)) -GL_PREFIX(SecondaryColor3ub): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ubEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ubv)) -GL_PREFIX(SecondaryColor3ubv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3ubvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3ui)) -GL_PREFIX(SecondaryColor3ui): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3uiEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3uiv)) -GL_PREFIX(SecondaryColor3uiv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3uivEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3us)) -GL_PREFIX(SecondaryColor3us): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3usEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColor3usv)) -GL_PREFIX(SecondaryColor3usv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColor3usvEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(SecondaryColorPointer)) -GL_PREFIX(SecondaryColorPointer): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_SecondaryColorPointerEXT)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2d)) -GL_PREFIX(WindowPos2d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2dv)) -GL_PREFIX(WindowPos2dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2f)) -GL_PREFIX(WindowPos2f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2fv)) -GL_PREFIX(WindowPos2fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2i)) -GL_PREFIX(WindowPos2i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2iv)) -GL_PREFIX(WindowPos2iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2s)) -GL_PREFIX(WindowPos2s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos2sv)) -GL_PREFIX(WindowPos2sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos2svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3d)) -GL_PREFIX(WindowPos3d): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3dv)) -GL_PREFIX(WindowPos3dv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3dvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3f)) -GL_PREFIX(WindowPos3f): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3fv)) -GL_PREFIX(WindowPos3fv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3fvMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3i)) -GL_PREFIX(WindowPos3i): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3iMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3iv)) -GL_PREFIX(WindowPos3iv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3ivMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3s)) -GL_PREFIX(WindowPos3s): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3sMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(WindowPos3sv)) -GL_PREFIX(WindowPos3sv): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_WindowPos3svMESA)) - -ALIGNTEXT16 -GLOBL_FN(GL_PREFIX(ActiveStencilFaceEXT)) -GL_PREFIX(ActiveStencilFaceEXT): - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) - JMP(GL_OFFSET(_gloffset_ActiveStencilFaceEXT)) - - -#endif /* __WIN32__ */ Index: xc/extras/Mesa/src/X86/mmx.h diff -u xc/extras/Mesa/src/X86/mmx.h:1.6 xc/extras/Mesa/src/X86/mmx.h:removed --- xc/extras/Mesa/src/X86/mmx.h:1.6 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/mmx.h Wed Mar 16 21:00:48 2005 @@ -1,50 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef ASM_MMX_H -#define ASM_MMX_H - -extern void _ASMAPI -_mesa_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); - -extern void _ASMAPI -_mesa_mmx_blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); - -extern void _ASMAPI -_mesa_mmx_blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); - -extern void _ASMAPI -_mesa_mmx_blend_max( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); - -extern void _ASMAPI -_mesa_mmx_blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[], - GLubyte rgba[][4], const GLubyte dest[][4] ); - -#endif Index: xc/extras/Mesa/src/X86/mmx_blend.S diff -u xc/extras/Mesa/src/X86/mmx_blend.S:1.7 xc/extras/Mesa/src/X86/mmx_blend.S:removed --- xc/extras/Mesa/src/X86/mmx_blend.S:1.7 Mon Nov 3 20:03:35 2003 +++ xc/extras/Mesa/src/X86/mmx_blend.S Wed Mar 16 21:00:48 2005 @@ -1,365 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X86/mmx_blend.S,v 1.7 2003/11/04 01:03:35 dawes Exp $ */ - -/* - * Written by José Fonseca - */ - -#include "matypes.h" - - -/* integer multiplication - alpha plus one - * - * makes the following approximation to the division (Sree) - * - * rgb*a/255 ~= (rgb*(a+1)) >> 256 - * - * which is the fastest method that satisfies the following OpenGL criteria - * - * 0*0 = 0 and 255*255 = 255 - * - * note that MX1 is a register with 0xffffffffffffffff constant which can be easily obtained making - * - * PCMPEQW ( MX1, MX1 ) - */ -#define GMB_MULT_AP1( MP1, MA1, MP2, MA2, MX1 ) \ - PSUBW ( MX1, MA1 ) /* a1 + 1 | a1 + 1 | a1 + 1 | a1 + 1 */ ;\ - PMULLW ( MP1, MA1 ) /* t1 = p1*a1 */ ;\ - ;\ -TWO(PSUBW ( MX1, MA2 )) /* a2 + 1 | a2 + 1 | a2 + 1 | a2 + 1 */ ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = p2*a2 */ ;\ - ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 ~= t1/255 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 ~= t2/255 */ - - -/* integer multiplication - geometric series - * - * takes the geometric series approximation to the division - * - * t/255 = (t >> 8) + (t >> 16) + (t >> 24) .. - * - * in this case just the first two terms to fit in 16bit arithmetic - * - * t/255 ~= (t + (t >> 8)) >> 8 - * - * note that just by itself it doesn't satisfies the OpenGL criteria, as 255*255 = 254, - * so the special case a = 255 must be accounted or roundoff must be used - */ -#define GMB_MULT_GS( MP1, MA1, MP2, MA2 ) \ - PMULLW ( MP1, MA1 ) /* t1 = p1*a1 */ ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = p2*a2 */ ;\ - ;\ - MOVQ ( MA1, MP1 ) ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 */ ;\ - ;\ -TWO(MOVQ ( MA2, MP2 )) ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 */ ;\ - ;\ - PADDW ( MP1, MA1 ) /* t1 + (t1 >> 8) ~= (t1/255) << 8 */ ;\ - PSRLW ( CONST(8), MA1 ) /* sa1 | sb1 | sg1 | sr1 */ ;\ - ;\ -TWO(PADDW ( MP2, MA2 )) /* t2 + (t2 >> 8) ~= (t2/255) << 8 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* sa2 | sb2 | sg2 | sr2 */ - - -/* integer multiplication - geometric series plus rounding - * - * when using a geometric series division instead of truncating the result - * use roundoff in the approximation (Jim Blinn) - * - * t = rgb*a + 0x80 - * - * achieving the exact results - * - * note that M80 is register with the 0x0080008000800080 constant - */ -#define GMB_MULT_GSR( MP1, MA1, MP2, MA2, M80 ) \ - PMULLW ( MP1, MA1 ) /* t1 = p1*a1 */ ;\ - PADDW ( M80, MA1 ) /* t1 += 0x80 */ ;\ - ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = p2*a2 */ ;\ -TWO(PADDW ( M80, MA2 )) /* t2 += 0x80 */ ;\ - ;\ - MOVQ ( MA1, MP1 ) ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 */ ;\ - ;\ -TWO(MOVQ ( MA2, MP2 )) ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 */ ;\ - ;\ - PADDW ( MP1, MA1 ) /* t1 + (t1 >> 8) ~= (t1/255) << 8 */ ;\ - PSRLW ( CONST(8), MA1 ) /* sa1 | sb1 | sg1 | sr1 */ ;\ - ;\ -TWO(PADDW ( MP2, MA2 )) /* t2 + (t2 >> 8) ~= (t2/255) << 8 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* sa2 | sb2 | sg2 | sr2 */ - - -/* linear interpolation - geometric series - */ -#define GMB_LERP_GS( MP1, MQ1, MA1, MP2, MQ2, MA2) \ - PSUBW ( MQ1, MP1 ) /* pa1 - qa1 | pb1 - qb1 | pg1 - qg1 | pr1 - qr1 */ ;\ - PSLLW ( CONST(8), MQ1 ) /* q1 << 8 */ ;\ - PMULLW ( MP1, MA1 ) /* t1 = (q1 - p1)*pa1 */ ;\ - ;\ -TWO(PSUBW ( MQ2, MP2 )) /* pa2 - qa2 | pb2 - qb2 | pg2 - qg2 | pr2 - qr2 */ ;\ -TWO(PSLLW ( CONST(8), MQ2 )) /* q2 << 8 */ ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = (q2 - p2)*pa2 */ ;\ - ;\ - MOVQ ( MA1, MP1 ) ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 */ ;\ - ;\ -TWO(MOVQ ( MA2, MP2 )) ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 */ ;\ - ;\ - PADDW ( MP1, MA1 ) /* t1 + (t1 >> 8) ~= (t1/255) << 8 */ ;\ -TWO(PADDW ( MP2, MA2 )) /* t2 + (t2 >> 8) ~= (t2/255) << 8 */ ;\ - ;\ - PADDW ( MQ1, MA1 ) /* (t1/255 + q1) << 8 */ ;\ -TWO(PADDW ( MQ2, MA2 )) /* (t2/255 + q2) << 8 */ ;\ - ;\ - PSRLW ( CONST(8), MA1 ) /* sa1 | sb1 | sg1 | sr1 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* sa2 | sb2 | sg2 | sr2 */ - - -/* linear interpolation - geometric series with roundoff - * - * this is a generalization of Blinn's formula to signed arithmetic - * - * note that M80 is a register with the 0x0080008000800080 constant - */ -#define GMB_LERP_GSR( MP1, MQ1, MA1, MP2, MQ2, MA2, M80) \ - PSUBW ( MQ1, MP1 ) /* pa1 - qa1 | pb1 - qb1 | pg1 - qg1 | pr1 - qr1 */ ;\ - PSLLW ( CONST(8), MQ1 ) /* q1 << 8 */ ;\ - PMULLW ( MP1, MA1 ) /* t1 = (q1 - p1)*pa1 */ ;\ - ;\ -TWO(PSUBW ( MQ2, MP2 )) /* pa2 - qa2 | pb2 - qb2 | pg2 - qg2 | pr2 - qr2 */ ;\ -TWO(PSLLW ( CONST(8), MQ2 )) /* q2 << 8 */ ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = (q2 - p2)*pa2 */ ;\ - ;\ - PSRLW ( CONST(15), MP1 ) /* q1 > p1 ? 1 : 0 */ ;\ -TWO(PSRLW ( CONST(15), MP2 )) /* q2 > q2 ? 1 : 0 */ ;\ - ;\ - PSLLW ( CONST(8), MP1 ) /* q1 > p1 ? 0x100 : 0 */ ;\ -TWO(PSLLW ( CONST(8), MP2 )) /* q2 > q2 ? 0x100 : 0 */ ;\ - ;\ - PSUBW ( MP1, MA1 ) /* t1 -=? 0x100 */ ;\ -TWO(PSUBW ( MP2, MA2 )) /* t2 -=? 0x100 */ ;\ - ;\ - PADDW ( M80, MA1 ) /* t1 += 0x80 */ ;\ -TWO(PADDW ( M80, MA2 )) /* t2 += 0x80 */ ;\ - ;\ - MOVQ ( MA1, MP1 ) ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 */ ;\ - ;\ -TWO(MOVQ ( MA2, MP2 )) ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 */ ;\ - ;\ - PADDW ( MP1, MA1 ) /* t1 + (t1 >> 8) ~= (t1/255) << 8 */ ;\ -TWO(PADDW ( MP2, MA2 )) /* t2 + (t2 >> 8) ~= (t2/255) << 8 */ ;\ - ;\ - PADDW ( MQ1, MA1 ) /* (t1/255 + q1) << 8 */ ;\ -TWO(PADDW ( MQ2, MA2 )) /* (t2/255 + q2) << 8 */ ;\ - ;\ - PSRLW ( CONST(8), MA1 ) /* sa1 | sb1 | sg1 | sr1 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* sa2 | sb2 | sg2 | sr2 */ - - -/* linear interpolation - geometric series with correction - * - * instead of the roundoff this adds a small correction to satisfy the OpenGL criteria - * - * t/255 ~= (t + (t >> 8) + (t >> 15)) >> 8 - * - * note that although is faster than rounding off it doesn't give always the exact results - */ -#define GMB_LERP_GSC( MP1, MQ1, MA1, MP2, MQ2, MA2) \ - PSUBW ( MQ1, MP1 ) /* pa1 - qa1 | pb1 - qb1 | pg1 - qg1 | pr1 - qr1 */ ;\ - PSLLW ( CONST(8), MQ1 ) /* q1 << 8 */ ;\ - PMULLW ( MP1, MA1 ) /* t1 = (q1 - p1)*pa1 */ ;\ - ;\ -TWO(PSUBW ( MQ2, MP2 )) /* pa2 - qa2 | pb2 - qb2 | pg2 - qg2 | pr2 - qr2 */ ;\ -TWO(PSLLW ( CONST(8), MQ2 )) /* q2 << 8 */ ;\ -TWO(PMULLW ( MP2, MA2 )) /* t2 = (q2 - p2)*pa2 */ ;\ - ;\ - MOVQ ( MA1, MP1 ) ;\ - PSRLW ( CONST(8), MA1 ) /* t1 >> 8 */ ;\ - ;\ -TWO(MOVQ ( MA2, MP2 )) ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* t2 >> 8 */ ;\ - ;\ - PADDW ( MA1, MP1 ) /* t1 + (t1 >> 8) ~= (t1/255) << 8 */ ;\ - PSRLW ( CONST(7), MA1 ) /* t1 >> 15 */ ;\ - ;\ -TWO(PADDW ( MA2, MP2 )) /* t2 + (t2 >> 8) ~= (t2/255) << 8 */ ;\ -TWO(PSRLW ( CONST(7), MA2 )) /* t2 >> 15 */ ;\ - ;\ - PADDW ( MP1, MA1 ) /* t1 + (t1 >> 8) + (t1 >>15) ~= (t1/255) << 8 */ ;\ -TWO(PADDW ( MP2, MA2 )) /* t2 + (t2 >> 8) + (t2 >>15) ~= (t2/255) << 8 */ ;\ - ;\ - PADDW ( MQ1, MA1 ) /* (t1/255 + q1) << 8 */ ;\ -TWO(PADDW ( MQ2, MA2 )) /* (t2/255 + q2) << 8 */ ;\ - ;\ - PSRLW ( CONST(8), MA1 ) /* sa1 | sb1 | sg1 | sr1 */ ;\ -TWO(PSRLW ( CONST(8), MA2 )) /* sa2 | sb2 | sg2 | sr2 */ - - -/* common blending setup code - * - * note that M00 is a register with 0x0000000000000000 constant which can be easily obtained making - * - * PXOR ( M00, M00 ) - */ -#define GMB_LOAD(rgba, dest, MPP, MQQ) \ -ONE(MOVD ( REGIND(rgba), MPP )) /* | | | | qa1 | qb1 | qg1 | qr1 */ ;\ -ONE(MOVD ( REGIND(dest), MQQ )) /* | | | | pa1 | pb1 | pg1 | pr1 */ ;\ - ;\ -TWO(MOVQ ( REGIND(rgba), MPP )) /* qa2 | qb2 | qg2 | qr2 | qa1 | qb1 | qg1 | qr1 */ ;\ -TWO(MOVQ ( REGIND(dest), MQQ )) /* pa2 | pb2 | pg2 | pr2 | pa1 | pb1 | pg1 | pr1 */ - -#define GMB_UNPACK(MP1, MQ1, MP2, MQ2, M00) \ -TWO(MOVQ ( MP1, MP2 )) ;\ -TWO(MOVQ ( MQ1, MQ2 )) ;\ - ;\ - PUNPCKLBW ( M00, MQ1 ) /* qa1 | qb1 | qg1 | qr1 */ ;\ -TWO(PUNPCKHBW ( M00, MQ2 )) /* qa2 | qb2 | qg2 | qr2 */ ;\ - PUNPCKLBW ( M00, MP1 ) /* pa1 | pb1 | pg1 | pr1 */ ;\ -TWO(PUNPCKHBW ( M00, MP2 )) /* pa2 | pb2 | pg2 | pr2 */ - -#define GMB_ALPHA(MP1, MA1, MP2, MA2) \ - MOVQ ( MP1, MA1 ) ;\ -TWO(MOVQ ( MP2, MA2 )) ;\ - ;\ - PUNPCKHWD ( MA1, MA1 ) /* pa1 | pa1 | | */ ;\ -TWO(PUNPCKHWD ( MA2, MA2 )) /* pa2 | pa2 | | */ ;\ - PUNPCKHDQ ( MA1, MA1 ) /* pa1 | pa1 | pa1 | pa1 */ ;\ -TWO(PUNPCKHDQ ( MA2, MA2 )) /* pa2 | pa2 | pa2 | pa2 */ - -#define GMB_PACK( MS1, MS2 ) \ - PACKUSWB ( MS2, MS1 ) /* sa2 | sb2 | sg2 | sr2 | sa1 | sb1 | sg1 | sr1 */ ;\ - -#define GMB_STORE(rgba, MSS ) \ -ONE(MOVD ( MSS, REGIND(rgba) )) /* | | | | sa1 | sb1 | sg1 | sr1 */ ;\ -TWO(MOVQ ( MSS, REGIND(rgba) )) /* sa2 | sb2 | sg2 | sr2 | sa1 | sb1 | sg1 | sr1 */ - - - SEG_DATA - -ALIGNDATA8 -const_0080: - D_LONG 0x00800080, 0x00800080 - -const_80: - D_LONG 0x80808080, 0x80808080 - - SEG_TEXT - - -/* Blend transparency function - */ - -#define TAG(x) CONCAT(x,_transparency) -#define LLTAG(x) LLBL2(x,_transparency) - -#define INIT \ - PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ - -#define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ - GMB_UNPACK( MM1, MM2, MM4, MM5, MM0 ) ;\ - GMB_ALPHA( MM1, MM3, MM4, MM6 ) ;\ - GMB_LERP_GSC( MM1, MM2, MM3, MM4, MM5, MM6 ) ;\ - GMB_PACK( MM3, MM6 ) ;\ - GMB_STORE( rgba, MM3 ) - -#include "mmx_blendtmp.h" - - -/* Blend add function - * - * FIXME: Add some loop unrolling here... - */ - -#define TAG(x) CONCAT(x,_add) -#define LLTAG(x) LLBL2(x,_add) - -#define INIT - -#define MAIN( rgba, dest ) \ -ONE(MOVD ( REGIND(rgba), MM1 )) /* | | | | qa1 | qb1 | qg1 | qr1 */ ;\ -ONE(MOVD ( REGIND(dest), MM2 )) /* | | | | pa1 | pb1 | pg1 | pr1 */ ;\ -ONE(PADDUSB ( MM2, MM1 )) ;\ -ONE(MOVD ( MM1, REGIND(rgba) )) /* | | | | sa1 | sb1 | sg1 | sr1 */ ;\ - ;\ -TWO(MOVQ ( REGIND(rgba), MM1 )) /* qa2 | qb2 | qg2 | qr2 | qa1 | qb1 | qg1 | qr1 */ ;\ -TWO(PADDUSB ( REGIND(dest), MM1 )) /* sa2 | sb2 | sg2 | sr2 | sa1 | sb1 | sg1 | sr1 */ ;\ -TWO(MOVQ ( MM1, REGIND(rgba) )) - -#include "mmx_blendtmp.h" - - -/* Blend min function - */ - -#define TAG(x) CONCAT(x,_min) -#define LLTAG(x) LLBL2(x,_min) - -#define INIT \ - MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ - -#define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ - MOVQ ( MM1, MM3 ) ;\ - MOVQ ( MM2, MM4 ) ;\ - PXOR ( MM7, MM3 ) /* unsigned -> signed */ ;\ - PXOR ( MM7, MM4 ) /* unsigned -> signed */ ;\ - PCMPGTB ( MM3, MM4 ) /* q > p ? 0xff : 0x00 */ ;\ - PAND ( MM4, MM1 ) /* q > p ? p : 0 */ ;\ - PANDN ( MM2, MM4 ) /* q > p ? 0 : q */ ;\ - POR ( MM1, MM4 ) /* q > p ? p : q */ ;\ - GMB_STORE( rgba, MM4 ) - -#include "mmx_blendtmp.h" - - -/* Blend max function - */ - -#define TAG(x) CONCAT(x,_max) -#define LLTAG(x) LLBL2(x,_max) - -#define INIT \ - MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ - -#define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ - MOVQ ( MM1, MM3 ) ;\ - MOVQ ( MM2, MM4 ) ;\ - PXOR ( MM7, MM3 ) /* unsigned -> signed */ ;\ - PXOR ( MM7, MM4 ) /* unsigned -> signed */ ;\ - PCMPGTB ( MM3, MM4 ) /* q > p ? 0xff : 0x00 */ ;\ - PAND ( MM4, MM2 ) /* q > p ? q : 0 */ ;\ - PANDN ( MM1, MM4 ) /* q > p ? 0 : p */ ;\ - POR ( MM2, MM4 ) /* q > p ? p : q */ ;\ - GMB_STORE( rgba, MM4 ) - -#include "mmx_blendtmp.h" - - -/* Blend modulate function - */ - -#define TAG(x) CONCAT(x,_modulate) -#define LLTAG(x) LLBL2(x,_modulate) - -#define INIT \ - PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\ - MOVQ ( CONTENT(const_0080), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ - -#define MAIN( rgba, dest ) \ - GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ - GMB_UNPACK( MM1, MM2, MM4, MM5, MM0 ) ;\ - GMB_MULT_GSR( MM1, MM2, MM4, MM5, MM7 ) ;\ - GMB_PACK( MM2, MM5 ) ;\ - GMB_STORE( rgba, MM2 ) - -#include "mmx_blendtmp.h" - Index: xc/extras/Mesa/src/X86/mmx_blendtmp.h diff -u xc/extras/Mesa/src/X86/mmx_blendtmp.h:1.2 xc/extras/Mesa/src/X86/mmx_blendtmp.h:removed --- xc/extras/Mesa/src/X86/mmx_blendtmp.h:1.2 Mon Nov 3 20:03:35 2003 +++ xc/extras/Mesa/src/X86/mmx_blendtmp.h Wed Mar 16 21:00:48 2005 @@ -1,116 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/X86/mmx_blendtmp.h,v 1.2 2003/11/04 01:03:35 dawes Exp $ */ - -/* - * Written by José Fonseca - */ - - -/* - * void _mesa_mmx_blend( GLcontext *ctx, - * GLuint n, - * const GLubyte mask[], - * GLchan rgba[][4], - * CONST GLchan dest[][4] ) - * - */ -ALIGNTEXT16 -GLOBL GLNAME( TAG(_mesa_mmx_blend) ) - -GLNAME( TAG(_mesa_mmx_blend) ): - - PUSH_L ( EBP ) - MOV_L ( ESP, EBP ) - PUSH_L ( ESI ) - PUSH_L ( EDI ) - PUSH_L ( EBX ) - - MOV_L ( REGOFF(12, EBP), ECX ) /* n */ - CMP_L ( CONST(0), ECX) - JE ( LLTAG(GMB_return) ) - - MOV_L ( REGOFF(16, EBP), EBX ) /* mask */ - MOV_L ( REGOFF(20, EBP), EDI ) /* rgba */ - MOV_L ( REGOFF(24, EBP), ESI ) /* dest */ - - INIT - - TEST_L ( CONST(4), EDI ) /* align rgba on an 8-byte boundary */ - JZ ( LLTAG(GMB_align_end) ) - - CMP_B ( CONST(0), REGIND(EBX) ) /* *mask == 0 */ - JE ( LLTAG(GMB_align_continue) ) - - /* runin */ -#define ONE(x) x -#define TWO(x) - MAIN ( EDI, ESI ) -#undef ONE -#undef TWO - -LLTAG(GMB_align_continue): - - DEC_L ( ECX ) /* n -= 1 */ - INC_L ( EBX ) /* mask += 1 */ - ADD_L ( CONST(4), EDI ) /* rgba += 1 */ - ADD_L ( CONST(4), ESI ) /* dest += 1 */ - -LLTAG(GMB_align_end): - - CMP_L ( CONST(2), ECX) - JB ( LLTAG(GMB_loop_end) ) - -ALIGNTEXT16 -LLTAG(GMB_loop_begin): - - CMP_W ( CONST(0), REGIND(EBX) ) /* *mask == 0 && *(mask + 1) == 0 */ - JE ( LLTAG(GMB_loop_continue) ) - - /* main loop */ -#define ONE(x) -#define TWO(x) x - MAIN ( EDI, ESI ) -#undef ONE -#undef TWO - -LLTAG(GMB_loop_continue): - - DEC_L ( ECX ) - DEC_L ( ECX ) /* n -= 2 */ - ADD_L ( CONST(2), EBX ) /* mask += 2 */ - ADD_L ( CONST(8), EDI ) /* rgba += 2 */ - ADD_L ( CONST(8), ESI ) /* dest += 2 */ - CMP_L ( CONST(2), ECX ) - JAE ( LLTAG(GMB_loop_begin) ) - -LLTAG(GMB_loop_end): - - CMP_L ( CONST(1), ECX ) - JB ( LLTAG(GMB_done) ) - - CMP_B ( CONST(0), REGIND(EBX) ) /* *mask == 0 */ - JE ( LLTAG(GMB_done) ) - - /* runout */ -#define ONE(x) x -#define TWO(x) - MAIN ( EDI, ESI ) -#undef ONE -#undef TWO - -LLTAG(GMB_done): - - EMMS - -LLTAG(GMB_return): - - POP_L ( EBX ) - POP_L ( EDI ) - POP_L ( ESI ) - MOV_L ( EBP, ESP ) - POP_L ( EBP ) - RET - -#undef TAG -#undef LLTAG -#undef INIT -#undef MAIN Index: xc/extras/Mesa/src/X86/norm_args.h diff -u xc/extras/Mesa/src/X86/norm_args.h:1.3 xc/extras/Mesa/src/X86/norm_args.h:removed --- xc/extras/Mesa/src/X86/norm_args.h:1.3 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/norm_args.h Wed Mar 16 21:00:48 2005 @@ -1,57 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Normal transform function interface for assembly code. Simply define - * FRAME_OFFSET to the number of bytes pushed onto the stack before - * using the ARG_* argument macros. - * - * Gareth Hughes - */ - -#ifndef __NORM_ARGS_H__ -#define __NORM_ARGS_H__ - -/* Offsets for normal_func arguments - * - * typedef void (*normal_func)( CONST GLmatrix *mat, - * GLfloat scale, - * CONST GLvector3f *in, - * CONST GLfloat lengths[], - * GLvector3f *dest ); - */ -#define OFFSET_MAT 4 -#define OFFSET_SCALE 8 -#define OFFSET_IN 12 -#define OFFSET_LENGTHS 16 -#define OFFSET_DEST 20 - -#define ARG_MAT REGOFF(FRAME_OFFSET+OFFSET_MAT, ESP) -#define ARG_SCALE REGOFF(FRAME_OFFSET+OFFSET_SCALE, ESP) -#define ARG_IN REGOFF(FRAME_OFFSET+OFFSET_IN, ESP) -#define ARG_LENGTHS REGOFF(FRAME_OFFSET+OFFSET_LENGTHS, ESP) -#define ARG_DEST REGOFF(FRAME_OFFSET+OFFSET_DEST, ESP) - -#endif Index: xc/extras/Mesa/src/X86/sse.c diff -u xc/extras/Mesa/src/X86/sse.c:1.3 xc/extras/Mesa/src/X86/sse.c:removed --- xc/extras/Mesa/src/X86/sse.c:1.3 Sun Sep 28 15:17:08 2003 +++ xc/extras/Mesa/src/X86/sse.c Wed Mar 16 21:00:48 2005 @@ -1,118 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * PentiumIII-SIMD (SSE) optimizations contributed by - * Andre Werthmann - */ - -#include "glheader.h" -#include "context.h" -#include "math/m_xform.h" -#include "tnl/t_context.h" - -#include "sse.h" -#include "common_x86_macros.h" - -#ifdef DEBUG -#include "math/m_debug.h" -#endif - - -#ifdef USE_SSE_ASM -DECLARE_XFORM_GROUP( sse, 2 ) -DECLARE_XFORM_GROUP( sse, 3 ) - -#if 1 -/* Some functions are not written in SSE-assembly, because the fpu ones are faster */ -extern void _mesa_sse_transform_normals_no_rot( NORM_ARGS ); -extern void _mesa_sse_transform_rescale_normals( NORM_ARGS ); -extern void _mesa_sse_transform_rescale_normals_no_rot( NORM_ARGS ); - -extern void _mesa_sse_transform_points4_general( XFORM_ARGS ); -extern void _mesa_sse_transform_points4_3d( XFORM_ARGS ); -extern void _mesa_sse_transform_points4_identity( XFORM_ARGS ); -#else -DECLARE_NORM_GROUP( sse ) -#endif - - -extern void _ASMAPI -_mesa_v16_sse_general_xform( GLfloat *first_vert, - const GLfloat *m, - const GLfloat *src, - GLuint src_stride, - GLuint count ); - -extern void _ASMAPI -_mesa_sse_project_vertices( GLfloat *first, - GLfloat *last, - const GLfloat *m, - GLuint stride ); - -extern void _ASMAPI -_mesa_sse_project_clipped_vertices( GLfloat *first, - GLfloat *last, - const GLfloat *m, - GLuint stride, - const GLubyte *clipmask ); -#endif - - -void _mesa_init_sse_transform_asm( void ) -{ -#ifdef USE_SSE_ASM - ASSIGN_XFORM_GROUP( sse, 2 ); - ASSIGN_XFORM_GROUP( sse, 3 ); - -#if 1 - /* TODO: Finish these off. - */ - _mesa_transform_tab[4][MATRIX_GENERAL] = - _mesa_sse_transform_points4_general; - _mesa_transform_tab[4][MATRIX_3D] = - _mesa_sse_transform_points4_3d; - _mesa_transform_tab[4][MATRIX_IDENTITY] = - _mesa_sse_transform_points4_identity; - - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] = - _mesa_sse_transform_normals_no_rot; - _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] = - _mesa_sse_transform_rescale_normals; - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] = - _mesa_sse_transform_rescale_normals_no_rot; -#else - ASSIGN_XFORM_GROUP( sse, 4 ); - - ASSIGN_NORM_GROUP( sse ); -#endif - -#ifdef DEBUG - _math_test_all_transform_functions( "SSE" ); - _math_test_all_normal_transform_functions( "SSE" ); -#endif -#endif -} - Index: xc/extras/Mesa/src/X86/sse.h diff -u xc/extras/Mesa/src/X86/sse.h:1.3 xc/extras/Mesa/src/X86/sse.h:removed --- xc/extras/Mesa/src/X86/sse.h:1.3 Sun Sep 28 15:17:09 2003 +++ xc/extras/Mesa/src/X86/sse.h Wed Mar 16 21:00:48 2005 @@ -1,38 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * PentiumIII-SIMD (SSE) optimizations contributed by - * Andre Werthmann - */ - -#ifndef __SSE_H__ -#define __SSE_H__ - -#include "math/m_xform.h" - -void _mesa_init_sse_transform_asm( void ); - -#endif Index: xc/extras/Mesa/src/X86/sse_normal.S diff -u xc/extras/Mesa/src/X86/sse_normal.S:1.3 xc/extras/Mesa/src/X86/sse_normal.S:removed --- xc/extras/Mesa/src/X86/sse_normal.S:1.3 Sun Sep 28 15:17:09 2003 +++ xc/extras/Mesa/src/X86/sse_normal.S Wed Mar 16 21:00:48 2005 @@ -1,251 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** TODO: - * - insert PREFETCH instructions to avoid cache-misses ! - * - some more optimizations are possible... - * - for 40-50% more performance in the SSE-functions, the - * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! - */ - -#include "matypes.h" -#include "norm_args.h" - - SEG_TEXT - -#define M(i) REGOFF(i * 4, EDX) -#define S(i) REGOFF(i * 4, ESI) -#define D(i) REGOFF(i * 4, EDI) -#define STRIDE REGOFF(12, ESI) - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_sse_transform_rescale_normals_no_rot) -GLNAME(_mesa_sse_transform_rescale_normals_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L ( ARG_IN, ESI ) /* ptr to source GLvector3f */ - MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */ - - MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */ - MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */ - - MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */ - - TEST_L ( ECX, ECX ) - JZ( LLBL(K_G3TRNNRR_finish) ) /* count was zero; go to finish */ - - MOV_L ( STRIDE, EAX ) /* stride */ - MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */ - - IMUL_L( CONST(16), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* m0 */ - MOVSS ( M(5), XMM2 ) /* m5 */ - UNPCKLPS( XMM2, XMM1 ) /* m5 | m0 */ - MOVSS ( ARG_SCALE, XMM0 ) /* scale */ - SHUFPS ( CONST(0x0), XMM0, XMM0 ) /* scale | scale */ - MULPS ( XMM0, XMM1 ) /* m5*scale | m0*scale */ - MULSS ( M(10), XMM0 ) /* m10*scale */ - -ALIGNTEXT32 -LLBL(K_G3TRNNRR_top): - MOVLPS ( S(0), XMM2 ) /* uy | ux */ - MULPS ( XMM1, XMM2 ) /* uy*m5*scale | ux*m0*scale */ - MOVLPS ( XMM2, D(0) ) /* ->D(1) | D(0) */ - - MOVSS ( S(2), XMM2 ) /* uz */ - MULSS ( XMM0, XMM2 ) /* uz*m10*scale */ - MOVSS ( XMM2, D(2) ) /* ->D(2) */ - -LLBL(K_G3TRNNRR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_G3TRNNRR_top) ) - -LLBL(K_G3TRNNRR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_sse_transform_rescale_normals) -GLNAME(_mesa_sse_transform_rescale_normals): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L ( ARG_IN, ESI ) /* ptr to source GLvector3f */ - MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */ - - MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */ - MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */ - - MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */ - - TEST_L ( ECX, ECX ) - JZ( LLBL(K_G3TRNR_finish) ) /* count was zero; go to finish */ - - MOV_L ( STRIDE, EAX ) /* stride */ - MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */ - - IMUL_L( CONST(16), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM0 ) /* m0 */ - MOVSS ( M(4), XMM1 ) /* m4 */ - UNPCKLPS( XMM1, XMM0 ) /* m4 | m0 */ - - MOVSS ( ARG_SCALE, XMM4 ) /* scale */ - SHUFPS ( CONST(0x0), XMM4, XMM4 ) /* scale | scale */ - - MULPS ( XMM4, XMM0 ) /* m4*scale | m0*scale */ - MOVSS ( M(1), XMM1 ) /* m1 */ - MOVSS ( M(5), XMM2 ) /* m5 */ - UNPCKLPS( XMM2, XMM1 ) /* m5 | m1 */ - MULPS ( XMM4, XMM1 ) /* m5*scale | m1*scale */ - MOVSS ( M(2), XMM2 ) /* m2 */ - MOVSS ( M(6), XMM3 ) /* m6 */ - UNPCKLPS( XMM3, XMM2 ) /* m6 | m2 */ - MULPS ( XMM4, XMM2 ) /* m6*scale | m2*scale */ - - MOVSS ( M(8), XMM6 ) /* m8 */ - MULSS ( ARG_SCALE, XMM6 ) /* m8*scale */ - MOVSS ( M(9), XMM7 ) /* m9 */ - MULSS ( ARG_SCALE, XMM7 ) /* m9*scale */ - -ALIGNTEXT32 -LLBL(K_G3TRNR_top): - MOVSS ( S(0), XMM3 ) /* ux */ - SHUFPS ( CONST(0x0), XMM3, XMM3 ) /* ux | ux */ - MULPS ( XMM0, XMM3 ) /* ux*m4 | ux*m0 */ - MOVSS ( S(1), XMM4 ) /* uy */ - SHUFPS ( CONST(0x0), XMM4, XMM4 ) /* uy | uy */ - MULPS ( XMM1, XMM4 ) /* uy*m5 | uy*m1 */ - MOVSS ( S(2), XMM5 ) /* uz */ - SHUFPS ( CONST(0x0), XMM5, XMM5 ) /* uz | uz */ - MULPS ( XMM2, XMM5 ) /* uz*m6 | uz*m2 */ - - ADDPS ( XMM4, XMM3 ) - ADDPS ( XMM5, XMM3 ) - MOVLPS ( XMM3, D(0) ) - - MOVSS ( M(10), XMM3 ) /* m10 */ - MULSS ( ARG_SCALE, XMM3 ) /* m10*scale */ - MULSS ( S(2), XMM3 ) /* m10*scale*uz */ - MOVSS ( S(1), XMM4 ) /* uy */ - MULSS ( XMM7, XMM4 ) /* uy*m9*scale */ - MOVSS ( S(0), XMM5 ) /* ux */ - MULSS ( XMM6, XMM5 ) /* ux*m8*scale */ - - ADDSS ( XMM4, XMM3 ) - ADDSS ( XMM5, XMM3 ) - MOVSS ( XMM3, D(2) ) - -LLBL(K_G3TRNR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_G3TRNR_top) ) - -LLBL(K_G3TRNR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_sse_transform_normals_no_rot) -GLNAME(_mesa_sse_transform_normals_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L ( ARG_IN, ESI ) /* ptr to source GLvector3f */ - MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */ - - MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */ - MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */ - - MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */ - - TEST_L ( ECX, ECX ) - JZ( LLBL(K_G3TNNRR_finish) ) /* count was zero; go to finish */ - - MOV_L ( STRIDE, EAX ) /* stride */ - MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */ - - IMUL_L( CONST(16), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS( M(0), XMM0 ) /* m0 */ - MOVSS( M(5), XMM1 ) /* m5 */ - UNPCKLPS( XMM1, XMM0 ) /* m5 | m0 */ - MOVSS( M(10), XMM1 ) /* m10 */ - -ALIGNTEXT32 -LLBL(K_G3TNNRR_top): - MOVLPS( S(0), XMM2 ) /* uy | ux */ - MULPS( XMM0, XMM2 ) /* uy*m5 | ux*m0 */ - MOVLPS( XMM2, D(0) ) - - MOVSS( S(2), XMM2 ) /* uz */ - MULSS( XMM1, XMM2 ) /* uz*m10 */ - MOVSS( XMM2, D(2) ) - -LLBL(K_G3TNNRR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_G3TNNRR_top) ) - -LLBL(K_G3TNNRR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET Index: xc/extras/Mesa/src/X86/sse_xform1.S diff -u xc/extras/Mesa/src/X86/sse_xform1.S:1.2 xc/extras/Mesa/src/X86/sse_xform1.S:removed --- xc/extras/Mesa/src/X86/sse_xform1.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/sse_xform1.S Wed Mar 16 21:00:49 2005 @@ -1,432 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** TODO: - * - insert PREFETCH instructions to avoid cache-misses ! - * - some more optimizations are possible... - * - for 40-50% more performance in the SSE-functions, the - * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define S(i) REGOFF(i * 4, ESI) -#define D(i) REGOFF(i * 4, EDI) -#define M(i) REGOFF(i * 4, EDX) - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_general) -GLNAME( _mesa_sse_transform_points1_general ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - CMP_L( CONST(0), ECX ) /* count == 0 ? */ - JE( LLBL(K_GTP1GR_finish) ) /* yes -> nothing to do. */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVAPS( M(0), XMM0 ) /* m3 | m2 | m1 | m0 */ - MOVAPS( M(12), XMM1 ) /* m15 | m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP1GR_top): - MOVSS( S(0), XMM2 ) /* ox */ - SHUFPS( CONST(0x0), XMM2, XMM2 ) /* ox | ox | ox | ox */ - MULPS( XMM0, XMM2 ) /* ox*m3 | ox*m2 | ox*m1 | ox*m0 */ - ADDPS( XMM1, XMM2 ) /* + | + | + | + */ - MOVUPS( XMM2, D(0) ) - -LLBL(K_GTP1GR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP1GR_top) ) - -LLBL(K_GTP1GR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_identity) -GLNAME( _mesa_sse_transform_points1_identity ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP1IR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_1), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(1), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - CMP_L( ESI, EDI ) - JE( LLBL(K_GTP1IR_finish) ) - - -ALIGNTEXT32 -LLBL(K_GTP1IR_top): - MOV_L( S(0), EDX ) - MOV_L( EDX, D(0) ) - -LLBL(K_GTP1IR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP1IR_top) ) - -LLBL(K_GTP1IR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_3d_no_rot) -GLNAME(_mesa_sse_transform_points1_3d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP13DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVSS( M(0), XMM0 ) /* m0 */ - MOVSS( M(12), XMM1 ) /* m12 */ - MOVSS( M(13), XMM2 ) /* m13 */ - MOVSS( M(14), XMM3 ) /* m14 */ - -ALIGNTEXT32 -LLBL(K_GTP13DNRR_top): - MOVSS( S(0), XMM4 ) /* ox */ - MULSS( XMM0, XMM4 ) /* ox*m0 */ - ADDSS( XMM1, XMM4 ) /* ox*m0+m12 */ - MOVSS( XMM4, D(0) ) - - MOVSS( XMM2, D(1) ) - MOVSS( XMM3, D(2) ) - -LLBL(K_GTP13DNRR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP13DNRR_top) ) - -LLBL(K_GTP13DNRR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_perspective) -GLNAME(_mesa_sse_transform_points1_perspective): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP13PR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - XORPS( XMM0, XMM0 ) /* 0 | 0 | 0 | 0 */ - MOVSS( M(0), XMM1 ) /* m0 */ - MOVSS( M(14), XMM2 ) /* m14 */ - -ALIGNTEXT32 -LLBL(K_GTP13PR_top): - MOVSS( S(0), XMM3 ) /* ox */ - MULSS( XMM1, XMM3 ) /* ox*m0 */ - MOVSS( XMM3, D(0) ) /* ox*m0->D(0) */ - MOVSS( XMM2, D(2) ) /* m14->D(2) */ - - MOVSS( XMM0, D(1) ) - MOVSS( XMM0, D(3) ) - -LLBL(K_GTP13PR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP13PR_top) ) - -LLBL(K_GTP13PR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_2d) -GLNAME(_mesa_sse_transform_points1_2d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP13P2DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVLPS( M(0), XMM0 ) /* m1 | m0 */ - MOVLPS( M(12), XMM1 ) /* m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP13P2DR_top): - MOVSS( S(0), XMM2 ) /* ox */ - SHUFPS( CONST(0x0), XMM2, XMM2 ) /* ox | ox | ox | ox */ - MULPS( XMM0, XMM2 ) /* - | - | ox*m1 | ox*m0 */ - ADDPS( XMM1, XMM2 ) /* - | - | ox*m1+m13 | ox*m0+m12 */ - MOVLPS( XMM2, D(0) ) - -LLBL(K_GTP13P2DR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP13P2DR_top) ) - -LLBL(K_GTP13P2DR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_2d_no_rot) -GLNAME(_mesa_sse_transform_points1_2d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP13P2DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS( M(0), XMM0 ) /* m0 */ - MOVSS( M(12), XMM1 ) /* m12 */ - MOVSS( M(13), XMM2 ) /* m13 */ - -ALIGNTEXT32 -LLBL(K_GTP13P2DNRR_top): - MOVSS( S(0), XMM3 ) /* ox */ - MULSS( XMM0, XMM3 ) /* ox*m0 */ - ADDSS( XMM1, XMM3 ) /* ox*m0+m12 */ - MOVSS( XMM3, D(0) ) - MOVSS( XMM2, D(1) ) - -LLBL(K_GTP13P2DNRR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP13P2DNRR_top) ) - -LLBL(K_GTP13P2DNRR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points1_3d) -GLNAME(_mesa_sse_transform_points1_3d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP13P3DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVAPS( M(0), XMM0 ) /* m3 | m2 | m1 | m0 */ - MOVAPS( M(12), XMM1 ) /* m15 | m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP13P3DR_top): - MOVSS( S(0), XMM2 ) /* ox */ - SHUFPS( CONST(0x0), XMM2, XMM2 ) /* ox | ox | ox | ox */ - MULPS( XMM0, XMM2 ) /* ox*m3 | ox*m2 | ox*m1 | ox*m0 */ - ADDPS( XMM1, XMM2 ) /* +m15 | +m14 | +m13 | +m12 */ - MOVLPS( XMM2, D(0) ) /* - | - | ->D(1)| ->D(0)*/ - UNPCKHPS( XMM2, XMM2 ) /* ox*m3+m15 | ox*m3+m15 | ox*m2+m14 | ox*m2+m14 */ - MOVSS( XMM2, D(2) ) - -LLBL(K_GTP13P3DR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP13P3DR_top) ) - -LLBL(K_GTP13P3DR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET Index: xc/extras/Mesa/src/X86/sse_xform2.S diff -u xc/extras/Mesa/src/X86/sse_xform2.S:1.2 xc/extras/Mesa/src/X86/sse_xform2.S:removed --- xc/extras/Mesa/src/X86/sse_xform2.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/sse_xform2.S Wed Mar 16 21:00:49 2005 @@ -1,451 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** TODO: - * - insert PREFETCH instructions to avoid cache-misses ! - * - some more optimizations are possible... - * - for 40-50% more performance in the SSE-functions, the - * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define S(i) REGOFF(i * 4, ESI) -#define D(i) REGOFF(i * 4, EDI) -#define M(i) REGOFF(i * 4, EDX) - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_general) -GLNAME( _mesa_sse_transform_points2_general ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX ) - JZ( LLBL(K_GTP2GR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVAPS( M(0), XMM0 ) /* m3 | m2 | m1 | m0 */ - MOVAPS( M(4), XMM1 ) /* m7 | m6 | m5 | m4 */ - MOVAPS( M(12), XMM2 ) /* m15 | m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP2GR_top): - MOVSS( S(0), XMM3 ) /* ox */ - SHUFPS( CONST(0x0), XMM3, XMM3 ) /* ox | ox | ox | ox */ - MULPS( XMM0, XMM3 ) /* ox*m3 | ox*m2 | ox*m1 | ox*m0 */ - MOVSS( S(1), XMM4 ) /* oy */ - SHUFPS( CONST(0x0), XMM4, XMM4 ) /* oy | oy | oy | oy */ - MULPS( XMM1, XMM4 ) /* oy*m7 | oy*m6 | oy*m5 | oy*m4 */ - - ADDPS( XMM4, XMM3 ) - ADDPS( XMM2, XMM3 ) - MOVAPS( XMM3, D(0) ) - -LLBL(K_GTP2GR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP2GR_top) ) - -LLBL(K_GTP2GR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_identity) -GLNAME( _mesa_sse_transform_points2_identity ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP2IR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - CMP_L( ESI, EDI ) - JE( LLBL(K_GTP2IR_finish) ) - - -ALIGNTEXT32 -LLBL(K_GTP2IR_top): - MOV_L ( S(0), EDX ) - MOV_L ( EDX, D(0) ) - MOV_L ( S(1), EDX ) - MOV_L ( EDX, D(1) ) - -LLBL(K_GTP2IR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP2IR_top) ) - -LLBL(K_GTP2IR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_3d_no_rot) -GLNAME(_mesa_sse_transform_points2_3d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP23DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */ - MOVSS ( M(5), XMM2 ) /* - | - | - | m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* - | - | m5 | m0 */ - MOVLPS ( M(12), XMM2 ) /* - | - | m13 | m12 */ - MOVSS ( M(14), XMM3 ) /* - | - | - | m14 */ - -ALIGNTEXT32 -LLBL(K_GTP23DNRR_top): - MOVLPS ( S(0), XMM0 ) /* - | - | oy | ox */ - MULPS ( XMM1, XMM0 ) /* - | - | oy*m5 | ox*m0 */ - ADDPS ( XMM2, XMM0 ) /* - | - | +m13 | +m12 */ - MOVLPS ( XMM0, D(0) ) /* -> D(1) | -> D(0) */ - - MOVSS ( XMM3, D(2) ) /* -> D(2) */ - -LLBL(K_GTP23DNRR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP23DNRR_top) ) - -LLBL(K_GTP23DNRR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_perspective) -GLNAME(_mesa_sse_transform_points2_perspective): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP23PR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */ - MOVSS ( M(5), XMM2 ) /* - | - | - | m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* - | - | m5 | m0 */ - MOVSS ( M(14), XMM3 ) /* m14 */ - XORPS ( XMM0, XMM0 ) /* 0 | 0 | 0 | 0 */ - -ALIGNTEXT32 -LLBL(K_GTP23PR_top): - MOVLPS( S(0), XMM4 ) /* oy | ox */ - MULPS( XMM1, XMM4 ) /* oy*m5 | ox*m0 */ - MOVLPS( XMM4, D(0) ) /* ->D(1) | ->D(0) */ - MOVSS( XMM3, D(2) ) /* ->D(2) */ - MOVSS( XMM0, D(3) ) /* ->D(3) */ - -LLBL(K_GTP23PR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP23PR_top) ) - -LLBL(K_GTP23PR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_2d) -GLNAME(_mesa_sse_transform_points2_2d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP23P2DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVLPS( M(0), XMM0 ) /* m1 | m0 */ - MOVLPS( M(4), XMM1 ) /* m5 | m4 */ - MOVLPS( M(12), XMM2 ) /* m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP23P2DR_top): - MOVSS( S(0), XMM3 ) /* ox */ - SHUFPS( CONST(0x0), XMM3, XMM3 ) /* ox | ox */ - MULPS( XMM0, XMM3 ) /* ox*m1 | ox*m0 */ - - MOVSS( S(1), XMM4 ) /* oy */ - SHUFPS( CONST(0x0), XMM4, XMM4 ) /* oy | oy */ - MULPS( XMM1, XMM4 ) /* oy*m5 | oy*m4 */ - - ADDPS( XMM4, XMM3 ) - ADDPS( XMM2, XMM3 ) - MOVLPS( XMM3, D(0) ) /* ->D(1) | ->D(0) */ - -LLBL(K_GTP23P2DR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP23P2DR_top) ) - -LLBL(K_GTP23P2DR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_2d_no_rot) -GLNAME(_mesa_sse_transform_points2_2d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP23P2DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* m0 */ - MOVSS ( M(5), XMM2 ) /* m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* m5 | m0 */ - MOVLPS ( M(12), XMM2 ) /* m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP23P2DNRR_top): - MOVLPS( S(0), XMM0 ) /* oy | ox */ - MULPS( XMM1, XMM0 ) /* oy*m5 | ox*m0 */ - ADDPS( XMM2, XMM0 ) /* +m13 | +m12 */ - MOVLPS( XMM0, D(0) ) /* ->D(1) | ->D(0) */ - -LLBL(K_GTP23P2DNRR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP23P2DNRR_top) ) - -LLBL(K_GTP23P2DNRR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points2_3d) -GLNAME(_mesa_sse_transform_points2_3d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP23P3DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVAPS( M(0), XMM0 ) /* m2 | m1 | m0 */ - MOVAPS( M(4), XMM1 ) /* m6 | m5 | m4 */ - MOVAPS( M(12), XMM2 ) /* m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP23P3DR_top): - MOVSS( S(0), XMM3 ) /* ox */ - SHUFPS( CONST(0x0), XMM3, XMM3 ) /* ox | ox | ox */ - MULPS( XMM0, XMM3 ) /* ox*m2 | ox*m1 | ox*m0 */ - - MOVSS( S(1), XMM4 ) /* oy */ - SHUFPS( CONST(0x0), XMM4, XMM4 ) /* oy | oy | oy */ - MULPS( XMM1, XMM4 ) /* oy*m6 | oy*m5 | oy*m4 */ - - ADDPS( XMM4, XMM3 ) - ADDPS( XMM2, XMM3 ) - - MOVLPS( XMM3, D(0) ) /* ->D(1) | ->D(0) */ - UNPCKHPS( XMM3, XMM3 ) - MOVSS( XMM3, D(2) ) /* ->D(2) */ - -LLBL(K_GTP23P3DR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP23P3DR_top) ) - -LLBL(K_GTP23P3DR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET Index: xc/extras/Mesa/src/X86/sse_xform3.S diff -u xc/extras/Mesa/src/X86/sse_xform3.S:1.2 xc/extras/Mesa/src/X86/sse_xform3.S:removed --- xc/extras/Mesa/src/X86/sse_xform3.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/sse_xform3.S Wed Mar 16 21:00:49 2005 @@ -1,497 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** TODO: - * - insert PREFETCH instructions to avoid cache-misses ! - * - some more optimizations are possible... - * - for 40-50% more performance in the SSE-functions, the - * data (trans-matrix, src_vert, dst_vert) needs to be 16byte aligned ! - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define S(i) REGOFF(i * 4, ESI) -#define D(i) REGOFF(i * 4, EDI) -#define M(i) REGOFF(i * 4, EDX) - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_general) -GLNAME( _mesa_sse_transform_points3_general ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - CMP_L ( CONST(0), ECX ) /* count == 0 ? */ - JE ( LLBL(K_GTPGR_finish) ) /* yes -> nothing to do. */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVAPS ( REGOFF(0, EDX), XMM0 ) /* m0 | m1 | m2 | m3 */ - MOVAPS ( REGOFF(16, EDX), XMM1 ) /* m4 | m5 | m6 | m7 */ - MOVAPS ( REGOFF(32, EDX), XMM2 ) /* m8 | m9 | m10 | m11 */ - MOVAPS ( REGOFF(48, EDX), XMM3 ) /* m12 | m13 | m14 | m15 */ - - -ALIGNTEXT32 -LLBL(K_GTPGR_top): - MOVSS ( REGOFF(0, ESI), XMM4 ) /* | | | ox */ - SHUFPS ( CONST(0x0), XMM4, XMM4 ) /* ox | ox | ox | ox */ - MOVSS ( REGOFF(4, ESI), XMM5 ) /* | | | oy */ - SHUFPS ( CONST(0x0), XMM5, XMM5 ) /* oy | oy | oy | oy */ - MOVSS ( REGOFF(8, ESI), XMM6 ) /* | | | oz */ - SHUFPS ( CONST(0x0), XMM6, XMM6 ) /* oz | oz | oz | oz */ - - MULPS ( XMM0, XMM4 ) /* m3*ox | m2*ox | m1*ox | m0*ox */ - MULPS ( XMM1, XMM5 ) /* m7*oy | m6*oy | m5*oy | m4*oy */ - MULPS ( XMM2, XMM6 ) /* m11*oz | m10*oz | m9*oz | m8*oz */ - - ADDPS ( XMM5, XMM4 ) - ADDPS ( XMM6, XMM4 ) - ADDPS ( XMM3, XMM4 ) - - MOVAPS ( XMM4, REGOFF(0, EDI) ) - -LLBL(K_GTPGR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTPGR_top) ) - -LLBL(K_GTPGR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_identity) -GLNAME( _mesa_sse_transform_points3_identity ): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTPIR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - CMP_L( ESI, EDI ) - JE( LLBL(K_GTPIR_finish) ) - - -ALIGNTEXT32 -LLBL(K_GTPIR_top): - MOVLPS ( S(0), XMM0 ) - MOVLPS ( XMM0, D(0) ) - MOVSS ( S(2), XMM0 ) - MOVSS ( XMM0, D(2) ) - -LLBL(K_GTPIR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTPIR_top) ) - -LLBL(K_GTPIR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_3d_no_rot) -GLNAME(_mesa_sse_transform_points3_3d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP3DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */ - MOVSS ( M(5), XMM2 ) /* - | - | - | m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* - | - | m5 | m0 */ - MOVLPS ( M(12), XMM2 ) /* - | - | m13 | m12 */ - MOVSS ( M(10), XMM3 ) /* - | - | - | m10 */ - MOVSS ( M(14), XMM4 ) /* - | - | - | m14 */ - -ALIGNTEXT32 -LLBL(K_GTP3DNRR_top): - - MOVLPS ( S(0), XMM0 ) /* - | - | s1 | s0 */ - MULPS ( XMM1, XMM0 ) /* - | - | s1*m5 | s0*m0 */ - ADDPS ( XMM2, XMM0 ) /* - | - | +m13 | +m12 */ - MOVLPS ( XMM0, D(0) ) /* -> D(1) | -> D(0) */ - - MOVSS ( S(2), XMM0 ) /* sz */ - MULSS ( XMM3, XMM0 ) /* sz*m10 */ - ADDSS ( XMM4, XMM0 ) /* +m14 */ - MOVSS ( XMM0, D(2) ) /* -> D(2) */ - -LLBL(K_GTP3DNRR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP3DNRR_top) ) - -LLBL(K_GTP3DNRR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_perspective) -GLNAME(_mesa_sse_transform_points3_perspective): - -#define FRAME_OFFSET 8 - PUSH_L ( ESI ) - PUSH_L ( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP3PR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* - | - | - | m0 */ - MOVSS ( M(5), XMM2 ) /* - | - | - | m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* - | - | m5 | m0 */ - MOVLPS ( M(8), XMM2 ) /* - | - | m9 | m8 */ - MOVSS ( M(10), XMM3 ) /* m10 */ - MOVSS ( M(14), XMM4 ) /* m14 */ - XORPS ( XMM6, XMM6 ) /* 0 */ - -ALIGNTEXT32 -LLBL(K_GTP3PR_top): - MOVLPS ( S(0), XMM0 ) /* oy | ox */ - MULPS ( XMM1, XMM0 ) /* oy*m5 | ox*m0 */ - MOVSS ( S(2), XMM5 ) /* oz */ - SHUFPS ( CONST(0x0), XMM5, XMM5 ) /* oz | oz */ - MULPS ( XMM2, XMM5 ) /* oz*m9 | oz*m8 */ - ADDPS ( XMM5, XMM0 ) /* +oy*m5 | +ox*m0 */ - MOVLPS ( XMM0, D(0) ) /* ->D(1) | ->D(0) */ - - MOVSS ( S(2), XMM0 ) /* oz */ - MULSS ( XMM3, XMM0 ) /* oz*m10 */ - ADDSS ( XMM4, XMM0 ) /* +m14 */ - MOVSS ( XMM0, D(2) ) /* ->D(2) */ - - MOVSS ( S(2), XMM0 ) /* oz */ - MOVSS ( XMM6, XMM5 ) /* 0 */ - SUBPS ( XMM0, XMM5 ) /* -oz */ - MOVSS ( XMM5, D(3) ) /* ->D(3) */ - -LLBL(K_GTP3PR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP3PR_top) ) - -LLBL(K_GTP3PR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_2d) -GLNAME(_mesa_sse_transform_points3_2d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP3P2DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVLPS( M(0), XMM0 ) /* m1 | m0 */ - MOVLPS( M(4), XMM1 ) /* m5 | m4 */ - MOVLPS( M(12), XMM2 ) /* m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP3P2DR_top): - MOVSS ( S(0), XMM3 ) /* ox */ - SHUFPS ( CONST(0x0), XMM3, XMM3 ) /* ox | ox */ - MULPS ( XMM0, XMM3 ) /* ox*m1 | ox*m0 */ - MOVSS ( S(1), XMM4 ) /* oy */ - SHUFPS ( CONST(0x0), XMM4, XMM4 ) /* oy | oy */ - MULPS ( XMM1, XMM4 ) /* oy*m5 | oy*m4 */ - - ADDPS ( XMM4, XMM3 ) - ADDPS ( XMM2, XMM3 ) - MOVLPS ( XMM3, D(0) ) - - MOVSS ( S(2), XMM3 ) - MOVSS ( XMM3, D(2) ) - -LLBL(K_GTP3P2DR_skip): - ADD_L ( CONST(16), EDI ) - ADD_L ( EAX, ESI ) - CMP_L ( ECX, EDI ) - JNE ( LLBL(K_GTP3P2DR_top) ) - -LLBL(K_GTP3P2DR_finish): - POP_L ( EDI ) - POP_L ( ESI ) - RET -#undef FRAME_OFFSET - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_2d_no_rot) -GLNAME(_mesa_sse_transform_points3_2d_no_rot): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP3P2DNRR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - -ALIGNTEXT32 - MOVSS ( M(0), XMM1 ) /* m0 */ - MOVSS ( M(5), XMM2 ) /* m5 */ - UNPCKLPS ( XMM2, XMM1 ) /* m5 | m0 */ - MOVLPS ( M(12), XMM2 ) /* m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP3P2DNRR_top): - MOVLPS( S(0), XMM0 ) /* oy | ox */ - MULPS( XMM1, XMM0 ) /* oy*m5 | ox*m0 */ - ADDPS( XMM2, XMM0 ) /* +m13 | +m12 */ - MOVLPS( XMM0, D(0) ) /* ->D(1) | ->D(0) */ - - MOVSS( S(2), XMM0 ) - MOVSS( XMM0, D(2) ) - -LLBL(K_GTP3P2DNRR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP3P2DNRR_top) ) - -LLBL(K_GTP3P2DNRR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT4 -GLOBL GLNAME(_mesa_sse_transform_points3_3d) -GLNAME(_mesa_sse_transform_points3_3d): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( REGOFF(OFFSET_SOURCE+8, ESP), ESI ) /* ptr to source GLvector4f */ - MOV_L( REGOFF(OFFSET_DEST+8, ESP), EDI ) /* ptr to dest GLvector4f */ - - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP3P3DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) /* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - -ALIGNTEXT32 - MOVAPS( M(0), XMM0 ) /* m2 | m1 | m0 */ - MOVAPS( M(4), XMM1 ) /* m6 | m5 | m4 */ - MOVAPS( M(8), XMM2 ) /* m10 | m9 | m8 */ - MOVAPS( M(12), XMM3 ) /* m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL(K_GTP3P3DR_top): - MOVSS( S(0), XMM4 ) - SHUFPS( CONST(0x0), XMM4, XMM4 ) /* ox | ox | ox */ - MULPS( XMM0, XMM4 ) /* ox*m2 | ox*m1 | ox*m0 */ - - MOVSS( S(1), XMM5 ) - SHUFPS( CONST(0x0), XMM5, XMM5 ) /* oy | oy | oy */ - MULPS( XMM1, XMM5 ) /* oy*m6 | oy*m5 | oy*m4 */ - - MOVSS( S(2), XMM6 ) - SHUFPS( CONST(0x0), XMM6, XMM6 ) /* oz | oz | oz */ - MULPS( XMM2, XMM6 ) /* oz*m10 | oz*m9 | oz*m8 */ - - ADDPS( XMM5, XMM4 ) /* + | + | + */ - ADDPS( XMM6, XMM4 ) /* + | + | + */ - ADDPS( XMM3, XMM4 ) /* + | + | + */ - - MOVLPS( XMM4, D(0) ) /* => D(1) | => D(0) */ - UNPCKHPS( XMM4, XMM4 ) - MOVSS( XMM4, D(2) ) - -LLBL(K_GTP3P3DR_skip): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP3P3DR_top) ) - -LLBL(K_GTP3P3DR_finish): - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET Index: xc/extras/Mesa/src/X86/sse_xform4.S diff -u xc/extras/Mesa/src/X86/sse_xform4.S:1.2 xc/extras/Mesa/src/X86/sse_xform4.S:removed --- xc/extras/Mesa/src/X86/sse_xform4.S:1.2 Mon Dec 16 11:18:33 2002 +++ xc/extras/Mesa/src/X86/sse_xform4.S Wed Mar 16 21:00:49 2005 @@ -1,225 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FRAME_OFFSET 8 - -#define SRC(i) REGOFF(i * 4, ESI) -#define DST(i) REGOFF(i * 4, EDI) -#define MAT(i) REGOFF(i * 4, EDX) - -#define SELECT(r0, r1, r2, r3) CONST( r0 * 64 + r1 * 16 + r2 * 4 + r3 ) - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_sse_transform_points4_general ) -GLNAME( _mesa_sse_transform_points4_general ): - - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) /* verify non-zero count */ - JE( LLBL( sse_general_done ) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) )/* set dest size */ - - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - - PREFETCHT0( REGIND(ESI) ) - - MOVAPS( MAT(0), XMM4 ) /* m3 | m2 | m1 | m0 */ - MOVAPS( MAT(4), XMM5 ) /* m7 | m6 | m5 | m4 */ - MOVAPS( MAT(8), XMM6 ) /* m11 | m10 | m9 | m8 */ - MOVAPS( MAT(12), XMM7 ) /* m15 | m14 | m13 | m12 */ - -ALIGNTEXT16 -LLBL( sse_general_loop ): - - MOVSS( SRC(0), XMM0 ) /* ox */ - SHUFPS( CONST(0x0), XMM0, XMM0 ) /* ox | ox | ox | ox */ - MULPS( XMM4, XMM0 ) /* ox*m3 | ox*m2 | ox*m1 | ox*m0 */ - - MOVSS( SRC(1), XMM1 ) /* oy */ - SHUFPS( CONST(0x0), XMM1, XMM1 ) /* oy | oy | oy | oy */ - MULPS( XMM5, XMM1 ) /* oy*m7 | oy*m6 | oy*m5 | oy*m4 */ - - MOVSS( SRC(2), XMM2 ) /* oz */ - SHUFPS( CONST(0x0), XMM2, XMM2 ) /* oz | oz | oz | oz */ - MULPS( XMM6, XMM2 ) /* oz*m11 | oz*m10 | oz*m9 | oz*m8 */ - - MOVSS( SRC(3), XMM3 ) /* ow */ - SHUFPS( CONST(0x0), XMM3, XMM3 ) /* ow | ow | ow | ow */ - MULPS( XMM7, XMM3 ) /* ow*m15 | ow*m14 | ow*m13 | ow*m12 */ - - ADDPS( XMM1, XMM0 ) /* ox*m3+oy*m7 | ... */ - ADDPS( XMM2, XMM0 ) /* ox*m3+oy*m7+oz*m11 | ... */ - ADDPS( XMM3, XMM0 ) /* ox*m3+oy*m7+oz*m11+ow*m15 | ... */ - MOVAPS( XMM0, DST(0) ) /* ->D(3) | ->D(2) | ->D(1) | ->D(0) */ - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - - DEC_L( ECX ) - JNZ( LLBL( sse_general_loop ) ) - -LLBL( sse_general_done ): - - POP_L( EDI ) - POP_L( ESI ) - RET - - - - -ALIGNTEXT4 -GLOBL GLNAME( _mesa_sse_transform_points4_3d ) -GLNAME( _mesa_sse_transform_points4_3d ): - - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) /* ptr to source GLvector4f */ - MOV_L( ARG_DEST, EDI ) /* ptr to dest GLvector4f */ - - MOV_L( ARG_MATRIX, EDX ) /* ptr to matrix */ - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */ - - TEST_L( ECX, ECX) - JZ( LLBL(K_GTP43P3DR_finish) ) /* count was zero; go to finish */ - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) )/* set dest size */ - - SHL_L( CONST(4), ECX ) /* count *= 16 */ - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - ADD_L( EDI, ECX ) /* count += dest ptr */ - - MOVAPS( MAT(0), XMM0 ) /* m3 | m2 | m1 | m0 */ - MOVAPS( MAT(4), XMM1 ) /* m7 | m6 | m5 | m4 */ - MOVAPS( MAT(8), XMM2 ) /* m11 | m10 | m9 | m8 */ - MOVAPS( MAT(12), XMM3 ) /* m15 | m14 | m13 | m12 */ - -ALIGNTEXT32 -LLBL( K_GTP43P3DR_top ): - MOVSS( SRC(0), XMM4 ) /* ox */ - SHUFPS( CONST(0x0), XMM4, XMM4 ) /* ox | ox | ox | ox */ - MULPS( XMM0, XMM4 ) /* ox*m3 | ox*m2 | ox*m1 | ox*m0 */ - - MOVSS( SRC(1), XMM5 ) /* oy */ - SHUFPS( CONST(0x0), XMM5, XMM5 ) /* oy | oy | oy | oy */ - MULPS( XMM1, XMM5 ) /* oy*m7 | oy*m6 | oy*m5 | oy*m4 */ - - MOVSS( SRC(2), XMM6 ) /* oz */ - SHUFPS( CONST(0x0), XMM6, XMM6 ) /* oz | oz | oz | oz */ - MULPS( XMM2, XMM6 ) /* oz*m11 | oz*m10 | oz*m9 | oz*m8 */ - - MOVSS( SRC(3), XMM7 ) /* ow */ - SHUFPS( CONST(0x0), XMM7, XMM7 ) /* ow | ow | ow | ow */ - MULPS( XMM3, XMM7 ) /* ow*m15 | ow*m14 | ow*m13 | ow*m12 */ - - ADDPS( XMM5, XMM4 ) /* ox*m3+oy*m7 | ... */ - ADDPS( XMM6, XMM4 ) /* ox*m3+oy*m7+oz*m11 | ... */ - ADDPS( XMM7, XMM4 ) /* ox*m3+oy*m7+oz*m11+ow*m15 | ... */ - MOVAPS( XMM4, DST(0) ) /* ->D(3) | ->D(2) | ->D(1) | ->D(0) */ - - MOVSS( SRC(3), XMM4 ) /* ow */ - MOVSS( XMM4, DST(3) ) /* ->D(3) */ - -LLBL( K_GTP43P3DR_skip ): - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(K_GTP43P3DR_top) ) - -LLBL( K_GTP43P3DR_finish ): - POP_L( EDI ) - POP_L( ESI ) - RET - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_sse_transform_points4_identity ) -GLNAME( _mesa_sse_transform_points4_identity ): - - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) /* verify non-zero count */ - JE( LLBL( sse_identity_done ) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) /* stride */ - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) /* set dest flags */ - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest count */ - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) )/* set dest size */ - - MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */ - MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */ - -ALIGNTEXT16 -LLBL( sse_identity_loop ): - - PREFETCHNTA( REGOFF(32, ESI) ) - - MOVAPS( REGIND(ESI), XMM0 ) - ADD_L( EAX, ESI ) - - MOVAPS( XMM0, REGIND(EDI) ) - ADD_L( CONST(16), EDI ) - - DEC_L( ECX ) - JNZ( LLBL( sse_identity_loop ) ) - -LLBL( sse_identity_done ): - - POP_L( EDI ) - POP_L( ESI ) - RET Index: xc/extras/Mesa/src/X86/x86.c diff -u xc/extras/Mesa/src/X86/x86.c:1.10 xc/extras/Mesa/src/X86/x86.c:removed --- xc/extras/Mesa/src/X86/x86.c:1.10 Sun Sep 28 15:17:09 2003 +++ xc/extras/Mesa/src/X86/x86.c Wed Mar 16 21:00:49 2005 @@ -1,95 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Intel x86 assembly code by Josh Vanderhoof - */ - -#include "glheader.h" -#include "context.h" -#include "math/m_xform.h" -#include "tnl/t_context.h" - -#include "x86.h" -#include "common_x86_macros.h" - -#ifdef DEBUG -#include "math/m_debug.h" -#endif - - -#ifdef USE_X86_ASM -DECLARE_XFORM_GROUP( x86, 2 ) -DECLARE_XFORM_GROUP( x86, 3 ) -DECLARE_XFORM_GROUP( x86, 4 ) - - -extern GLvector4f * _ASMAPI -_mesa_x86_cliptest_points4( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ); - -extern GLvector4f * _ASMAPI -_mesa_x86_cliptest_points4_np( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ); - -extern void _ASMAPI -_mesa_v16_x86_cliptest_points4( GLfloat *first_vert, - GLfloat *last_vert, - GLubyte *or_mask, - GLubyte *and_mask, - GLubyte *clip_mask ); - -extern void _ASMAPI -_mesa_v16_x86_general_xform( GLfloat *dest, - const GLfloat *m, - const GLfloat *src, - GLuint src_stride, - GLuint count ); -#endif - - -void _mesa_init_x86_transform_asm( void ) -{ -#ifdef USE_X86_ASM - ASSIGN_XFORM_GROUP( x86, 2 ); - ASSIGN_XFORM_GROUP( x86, 3 ); - ASSIGN_XFORM_GROUP( x86, 4 ); - - _mesa_clip_tab[4] = _mesa_x86_cliptest_points4; - _mesa_clip_np_tab[4] = _mesa_x86_cliptest_points4_np; - -#ifdef DEBUG - _math_test_all_transform_functions( "x86" ); - _math_test_all_cliptest_functions( "x86" ); -#endif -#endif -} - Index: xc/extras/Mesa/src/X86/x86.h diff -u xc/extras/Mesa/src/X86/x86.h:1.6 xc/extras/Mesa/src/X86/x86.h:removed --- xc/extras/Mesa/src/X86/x86.h:1.6 Sun Sep 28 15:17:09 2003 +++ xc/extras/Mesa/src/X86/x86.h Wed Mar 16 21:00:49 2005 @@ -1,35 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Intel x86 assembly code by Josh Vanderhoof - */ - -#ifndef __X86_H__ -#define __X86_H__ - -extern void _mesa_init_x86_transform_asm( void ); - -#endif Index: xc/extras/Mesa/src/X86/x86_cliptest.S diff -u xc/extras/Mesa/src/X86/x86_cliptest.S:1.6 xc/extras/Mesa/src/X86/x86_cliptest.S:removed --- xc/extras/Mesa/src/X86/x86_cliptest.S:1.6 Wed Oct 22 11:44:42 2003 +++ xc/extras/Mesa/src/X86/x86_cliptest.S Wed Mar 16 21:00:49 2005 @@ -1,400 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * NOTE: Avoid using spaces in between '(' ')' and arguments, especially - * with macros like CONST, LLBL that expand to CONCAT(...). Putting spaces - * in there will break the build on some platforms. - */ - -#include "matypes.h" -#include "clip_args.h" - -#define SRC0 REGOFF(0, ESI) -#define SRC1 REGOFF(4, ESI) -#define SRC2 REGOFF(8, ESI) -#define SRC3 REGOFF(12, ESI) -#define DST0 REGOFF(0, EDI) -#define DST1 REGOFF(4, EDI) -#define DST2 REGOFF(8, EDI) -#define DST3 REGOFF(12, EDI) -#define MAT0 REGOFF(0, EDX) -#define MAT1 REGOFF(4, EDX) -#define MAT2 REGOFF(8, EDX) -#define MAT3 REGOFF(12, EDX) - - -/* - * Table for clip test. - * - * bit6 = SRC3 < 0 - * bit5 = SRC2 < 0 - * bit4 = abs(S(2)) > abs(S(3)) - * bit3 = SRC1 < 0 - * bit2 = abs(S(1)) > abs(S(3)) - * bit1 = SRC0 < 0 - * bit0 = abs(S(0)) > abs(S(3)) - */ - - SEG_DATA - -clip_table: - D_BYTE 0x00, 0x01, 0x00, 0x02, 0x04, 0x05, 0x04, 0x06 - D_BYTE 0x00, 0x01, 0x00, 0x02, 0x08, 0x09, 0x08, 0x0a - D_BYTE 0x20, 0x21, 0x20, 0x22, 0x24, 0x25, 0x24, 0x26 - D_BYTE 0x20, 0x21, 0x20, 0x22, 0x28, 0x29, 0x28, 0x2a - D_BYTE 0x00, 0x01, 0x00, 0x02, 0x04, 0x05, 0x04, 0x06 - D_BYTE 0x00, 0x01, 0x00, 0x02, 0x08, 0x09, 0x08, 0x0a - D_BYTE 0x10, 0x11, 0x10, 0x12, 0x14, 0x15, 0x14, 0x16 - D_BYTE 0x10, 0x11, 0x10, 0x12, 0x18, 0x19, 0x18, 0x1a - D_BYTE 0x3f, 0x3d, 0x3f, 0x3e, 0x37, 0x35, 0x37, 0x36 - D_BYTE 0x3f, 0x3d, 0x3f, 0x3e, 0x3b, 0x39, 0x3b, 0x3a - D_BYTE 0x2f, 0x2d, 0x2f, 0x2e, 0x27, 0x25, 0x27, 0x26 - D_BYTE 0x2f, 0x2d, 0x2f, 0x2e, 0x2b, 0x29, 0x2b, 0x2a - D_BYTE 0x3f, 0x3d, 0x3f, 0x3e, 0x37, 0x35, 0x37, 0x36 - D_BYTE 0x3f, 0x3d, 0x3f, 0x3e, 0x3b, 0x39, 0x3b, 0x3a - D_BYTE 0x1f, 0x1d, 0x1f, 0x1e, 0x17, 0x15, 0x17, 0x16 - D_BYTE 0x1f, 0x1d, 0x1f, 0x1e, 0x1b, 0x19, 0x1b, 0x1a - - - SEG_TEXT - -/* - * _mesa_x86_cliptest_points4 - * - * AL: ormask - * AH: andmask - * EBX: temp0 - * ECX: temp1 - * EDX: clipmask[] - * ESI: clip[] - * EDI: proj[] - * EBP: temp2 - */ - -#if defined(__ELF__) && defined(__PIC__) && defined(GNU_ASSEMBLER) && !defined(ELFPIC) -#define ELFPIC -#endif - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_cliptest_points4 ) -GLNAME( _mesa_x86_cliptest_points4 ): - -#ifdef ELFPIC -#define FRAME_OFFSET 20 -#else -#define FRAME_OFFSET 16 -#endif - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBP ) - PUSH_L( EBX ) - -#ifdef ELFPIC - /* store pointer to clip_table on stack */ - CALL( LLBL(ctp4_get_eip) ) - ADD_L( CONST(_GLOBAL_OFFSET_TABLE_), EBX ) - MOV_L( REGOFF(clip_table@GOT, EBX), EBX ) - PUSH_L( EBX ) - JMP( LLBL(ctp4_clip_table_ready) ) - -LLBL(ctp4_get_eip): - /* store eip in ebx */ - MOV_L( REGIND(ESP), EBX ) - RET - -LLBL(ctp4_clip_table_ready): -#endif - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_CLIP, EDX ) - MOV_L( ARG_OR, EBX ) - - MOV_L( ARG_AND, EBP ) - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - MOV_L( EAX, ARG_SOURCE ) /* put stride in ARG_SOURCE */ - - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDX, ECX ) - - MOV_L( ECX, ARG_CLIP ) /* put clipmask + count in ARG_CLIP */ - CMP_L( ECX, EDX ) - - MOV_B( REGIND(EBX), AL ) - MOV_B( REGIND(EBP), AH ) - - JZ( LLBL(ctp4_finish) ) - -ALIGNTEXT16 -LLBL(ctp4_top): - - FLD1 /* F3 */ - FDIV_S( SRC3 ) /* GH: don't care about div-by-zero */ - - MOV_L( SRC3, EBP ) - MOV_L( SRC2, EBX ) - - XOR_L( ECX, ECX ) - ADD_L( EBP, EBP ) /* ebp = abs(S(3))*2 ; carry = sign of S(3) */ - - ADC_L( ECX, ECX ) - ADD_L( EBX, EBX ) /* ebx = abs(S(2))*2 ; carry = sign of S(2) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(2))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - MOV_L( SRC1, EBX ) - - ADD_L( EBX, EBX ) /* ebx = abs(S(1))*2 ; carry = sign of S(1) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(1))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - MOV_L( SRC0, EBX ) - - ADD_L( EBX, EBX ) /* ebx = abs(S(0))*2 ; carry = sign of S(0) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(0))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - -#ifdef ELFPIC - MOV_L( REGIND(ESP), EBP ) /* clip_table */ - - MOV_B( REGBI(EBP, ECX), CL ) -#else - MOV_B( REGOFF(clip_table,ECX), CL ) -#endif - - OR_B( CL, AL ) - AND_B( CL, AH ) - - TEST_B( CL, CL ) - MOV_B( CL, REGIND(EDX) ) - - JZ( LLBL(ctp4_proj) ) - -LLBL(ctp4_noproj): - - FSTP( ST(0) ) /* */ - - MOV_L( CONST(0), DST0 ) - MOV_L( CONST(0), DST1 ) - MOV_L( CONST(0), DST2 ) - MOV_L( CONST(0x3f800000), DST3 ) - - JMP( LLBL(ctp4_next) ) - -LLBL(ctp4_proj): - - FLD_S( SRC0 ) /* F0 F3 */ - FMUL2( ST(1), ST0 ) - - FLD_S( SRC1 ) /* F1 F0 F3 */ - FMUL2( ST(2), ST0 ) - - FLD_S( SRC2 ) /* F2 F1 F0 F3 */ - FMUL2( ST(3), ST0 ) - - FXCH( ST(2) ) /* F0 F1 F2 F3 */ - FSTP_S( DST0 ) /* F1 F2 F3 */ - FSTP_S( DST1 ) /* F2 F3 */ - FSTP_S( DST2 ) /* F3 */ - FSTP_S( DST3 ) /* */ - -LLBL(ctp4_next): - - INC_L( EDX ) - ADD_L( CONST(16), EDI ) - - ADD_L( ARG_SOURCE, ESI ) - CMP_L( EDX, ARG_CLIP ) - - JNZ( LLBL(ctp4_top) ) - - MOV_L( ARG_OR, ECX ) - MOV_L( ARG_AND, EDX ) - - MOV_B( AL, REGIND(ECX) ) - MOV_B( AH, REGIND(EDX) ) - -LLBL(ctp4_finish): - - MOV_L( ARG_DEST, EAX ) -#ifdef ELFPIC - POP_L( ESI ) /* discard ptr to clip_table */ -#endif - POP_L( EBX ) - POP_L( EBP ) - POP_L( EDI ) - POP_L( ESI ) - - RET - - - - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_cliptest_points4_np ) -GLNAME( _mesa_x86_cliptest_points4_np ): - -#ifdef ELFPIC -#define FRAME_OFFSET 20 -#else -#define FRAME_OFFSET 16 -#endif - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBP ) - PUSH_L( EBX ) - -#ifdef ELFPIC - /* store pointer to clip_table on stack */ - CALL( LLBL(ctp4_np_get_eip) ) - ADD_L( CONST(_GLOBAL_OFFSET_TABLE_), EBX ) - MOV_L( REGOFF(clip_table@GOT, EBX), EBX ) - PUSH_L( EBX ) - JMP( LLBL(ctp4_np_clip_table_ready) ) - -LLBL(ctp4_np_get_eip): - /* store eip in ebx */ - MOV_L( REGIND(ESP), EBX ) - RET - -LLBL(ctp4_np_clip_table_ready): -#endif - - MOV_L( ARG_SOURCE, ESI ) - /* slot */ - - MOV_L( ARG_CLIP, EDX ) - MOV_L( ARG_OR, EBX ) - - MOV_L( ARG_AND, EBP ) - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( EAX, ARG_DEST ) /* put stride in ARG_DEST */ - ADD_L( EDX, ECX ) - - MOV_L( ECX, EDI ) /* put clipmask + count in EDI */ - CMP_L( ECX, EDX ) - - MOV_B( REGIND(EBX), AL ) - MOV_B( REGIND(EBP), AH ) - - JZ( LLBL(ctp4_np_finish) ) - -ALIGNTEXT16 -LLBL(ctp4_np_top): - - MOV_L( SRC3, EBP ) - MOV_L( SRC2, EBX ) - - XOR_L( ECX, ECX ) - ADD_L( EBP, EBP ) /* ebp = abs(S(3))*2 ; carry = sign of S(3) */ - - ADC_L( ECX, ECX ) - ADD_L( EBX, EBX ) /* ebx = abs(S(2))*2 ; carry = sign of S(2) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(2))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - MOV_L( SRC1, EBX ) - - ADD_L( EBX, EBX ) /* ebx = abs(S(1))*2 ; carry = sign of S(1) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(1))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - MOV_L( SRC0, EBX ) - - ADD_L( EBX, EBX ) /* ebx = abs(S(0))*2 ; carry = sign of S(0) */ - - ADC_L( ECX, ECX ) - CMP_L( EBX, EBP ) /* carry = abs(S(0))*2 > abs(S(3))*2 */ - - ADC_L( ECX, ECX ) - -#ifdef ELFPIC - MOV_L( REGIND(ESP), EBP ) /* clip_table */ - - MOV_B( REGBI(EBP, ECX), CL ) -#else - MOV_B( REGOFF(clip_table,ECX), CL ) -#endif - - OR_B( CL, AL ) - AND_B( CL, AH ) - - TEST_B( CL, CL ) - MOV_B( CL, REGIND(EDX) ) - - INC_L( EDX ) - /* slot */ - - ADD_L( ARG_DEST, ESI ) - CMP_L( EDX, EDI ) - - JNZ( LLBL(ctp4_np_top) ) - - MOV_L( ARG_OR, ECX ) - MOV_L( ARG_AND, EDX ) - - MOV_B( AL, REGIND(ECX) ) - MOV_B( AH, REGIND(EDX) ) - -LLBL(ctp4_np_finish): - - MOV_L( ARG_SOURCE, EAX ) -#ifdef ELFPIC - POP_L( ESI ) /* discard ptr to clip_table */ -#endif - POP_L( EBX ) - POP_L( EBP ) - POP_L( EDI ) - POP_L( ESI ) - - RET Index: xc/extras/Mesa/src/X86/x86_xform2.S diff -u xc/extras/Mesa/src/X86/x86_xform2.S:1.5 xc/extras/Mesa/src/X86/x86_xform2.S:removed --- xc/extras/Mesa/src/X86/x86_xform2.S:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/X86/x86_xform2.S Wed Mar 16 21:00:49 2005 @@ -1,562 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * NOTE: Avoid using spaces in between '(' ')' and arguments, especially - * with macros like CONST, LLBL that expand to CONCAT(...). Putting spaces - * in there will break the build on some platforms. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FP_ONE 1065353216 -#define FP_ZERO 0 - -#define SRC0 REGOFF(0, ESI) -#define SRC1 REGOFF(4, ESI) -#define SRC2 REGOFF(8, ESI) -#define SRC3 REGOFF(12, ESI) -#define DST0 REGOFF(0, EDI) -#define DST1 REGOFF(4, EDI) -#define DST2 REGOFF(8, EDI) -#define DST3 REGOFF(12, EDI) -#define MAT0 REGOFF(0, EDX) -#define MAT1 REGOFF(4, EDX) -#define MAT2 REGOFF(8, EDX) -#define MAT3 REGOFF(12, EDX) -#define MAT4 REGOFF(16, EDX) -#define MAT5 REGOFF(20, EDX) -#define MAT6 REGOFF(24, EDX) -#define MAT7 REGOFF(28, EDX) -#define MAT8 REGOFF(32, EDX) -#define MAT9 REGOFF(36, EDX) -#define MAT10 REGOFF(40, EDX) -#define MAT11 REGOFF(44, EDX) -#define MAT12 REGOFF(48, EDX) -#define MAT13 REGOFF(52, EDX) -#define MAT14 REGOFF(56, EDX) -#define MAT15 REGOFF(60, EDX) - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_general ) -GLNAME( _mesa_x86_transform_points2_general ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_gr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p2_gr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - FLD_S( SRC0 ) /* F7 F6 F5 F4 */ - FMUL_S( MAT3 ) - - FLD_S( SRC1 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT6 ) - FLD_S( SRC1 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT7 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FXCH( ST(3) ) /* F4 F6 F5 F7 */ - FADD_S( MAT12 ) - FXCH( ST(2) ) /* F5 F6 F4 F7 */ - FADD_S( MAT13 ) - FXCH( ST(1) ) /* F6 F5 F4 F7 */ - FADD_S( MAT14 ) - FXCH( ST(3) ) /* F7 F5 F4 F6 */ - FADD_S( MAT15 ) - - FXCH( ST(2) ) /* F4 F5 F7 F6 */ - FSTP_S( DST0 ) /* F5 F7 F6 */ - FSTP_S( DST1 ) /* F7 F6 */ - FXCH( ST(1) ) /* F6 F7 */ - FSTP_S( DST2 ) /* F7 */ - FSTP_S( DST3 ) /* */ - -LLBL(x86_p2_gr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_gr_loop) ) - -LLBL(x86_p2_gr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_perspective ) -GLNAME( _mesa_x86_transform_points2_perspective ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_pr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - - MOV_L( MAT14, EBX ) - -ALIGNTEXT16 -LLBL(x86_p2_pr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F1 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F4 F1 */ - FSTP_S( DST0 ) /* F1 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - MOV_L( CONST(FP_ZERO), DST3 ) - -LLBL(x86_p2_pr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_pr_loop) ) - -LLBL(x86_p2_pr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_3d ) -GLNAME( _mesa_x86_transform_points2_3d ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_3dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p2_3dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - - FLD_S( SRC1 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT6 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - FXCH( ST(2) ) /* F4 F5 F6 */ - FADD_S( MAT12 ) - FXCH( ST(1) ) /* F5 F4 F6 */ - FADD_S( MAT13 ) - FXCH( ST(2) ) /* F6 F4 F5 */ - FADD_S( MAT14 ) - - FXCH( ST(1) ) /* F4 F6 F5 */ - FSTP_S( DST0 ) /* F6 F5 */ - FXCH( ST(1) ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - -LLBL(x86_p2_3dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_3dr_loop) ) - -LLBL(x86_p2_3dr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_3d_no_rot ) -GLNAME( _mesa_x86_transform_points2_3d_no_rot ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_3dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - - MOV_L( MAT14, EBX ) - -ALIGNTEXT16 -LLBL(x86_p2_3dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F1 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F4 F1 */ - FADD_S( MAT12 ) - FLD_S( MAT13 ) /* F5 F4 F1 */ - FXCH( ST(2) ) /* F1 F4 F5 */ - FADDP( ST0, ST(2) ) /* F4 F5 */ - - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - -LLBL(x86_p2_3dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_3dnrr_loop) ) - -LLBL(x86_p2_3dnrr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_2d ) -GLNAME( _mesa_x86_transform_points2_2d ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_2dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p2_2dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - - FLD_S( SRC1 ) /* F0 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F0 F1 F5 F4 */ - FADDP( ST0, ST(3) ) /* F1 F5 F4 */ - FADDP( ST0, ST(1) ) /* F5 F4 */ - - FXCH( ST(1) ) /* F4 F5 */ - FADD_S( MAT12 ) - FXCH( ST(1) ) /* F5 F4 */ - FADD_S( MAT13 ) - - FXCH( ST(1) ) /* F4 F5 */ - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - -LLBL(x86_p2_2dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_2dr_loop) ) - -LLBL(x86_p2_2dr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT4 -GLOBL GLNAME( _mesa_x86_transform_points2_2d_no_rot ) -GLNAME( _mesa_x86_transform_points2_2d_no_rot ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_2dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p2_2dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F1 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F4 F1 */ - FADD_S( MAT12 ) - FLD_S( MAT13 ) /* F5 F4 F1 */ - FXCH( ST(2) ) /* F1 F4 F5 */ - FADDP( ST0, ST(2) ) /* F4 F5 */ - - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - -LLBL(x86_p2_2dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_2dnrr_loop) ) - -LLBL(x86_p2_2dnrr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points2_identity ) -GLNAME( _mesa_x86_transform_points2_identity ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p2_ir_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_2), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(2), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - - CMP_L( ESI, EDI ) - JE( LLBL(x86_p2_ir_done) ) - -ALIGNTEXT16 -LLBL(x86_p2_ir_loop): - - MOV_L( SRC0, EBX ) - MOV_L( SRC1, EDX ) - - MOV_L( EBX, DST0 ) - MOV_L( EDX, DST1 ) - -LLBL(x86_p2_ir_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p2_ir_loop) ) - -LLBL(x86_p2_ir_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET Index: xc/extras/Mesa/src/X86/x86_xform3.S diff -u xc/extras/Mesa/src/X86/x86_xform3.S:1.5 xc/extras/Mesa/src/X86/x86_xform3.S:removed --- xc/extras/Mesa/src/X86/x86_xform3.S:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/X86/x86_xform3.S Wed Mar 16 21:00:49 2005 @@ -1,632 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * NOTE: Avoid using spaces in between '(' ')' and arguments, especially - * with macros like CONST, LLBL that expand to CONCAT(...). Putting spaces - * in there will break the build on some platforms. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FP_ONE 1065353216 -#define FP_ZERO 0 - -#define SRC0 REGOFF(0, ESI) -#define SRC1 REGOFF(4, ESI) -#define SRC2 REGOFF(8, ESI) -#define SRC3 REGOFF(12, ESI) -#define DST0 REGOFF(0, EDI) -#define DST1 REGOFF(4, EDI) -#define DST2 REGOFF(8, EDI) -#define DST3 REGOFF(12, EDI) -#define MAT0 REGOFF(0, EDX) -#define MAT1 REGOFF(4, EDX) -#define MAT2 REGOFF(8, EDX) -#define MAT3 REGOFF(12, EDX) -#define MAT4 REGOFF(16, EDX) -#define MAT5 REGOFF(20, EDX) -#define MAT6 REGOFF(24, EDX) -#define MAT7 REGOFF(28, EDX) -#define MAT8 REGOFF(32, EDX) -#define MAT9 REGOFF(36, EDX) -#define MAT10 REGOFF(40, EDX) -#define MAT11 REGOFF(44, EDX) -#define MAT12 REGOFF(48, EDX) -#define MAT13 REGOFF(52, EDX) -#define MAT14 REGOFF(56, EDX) -#define MAT15 REGOFF(60, EDX) - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_general ) -GLNAME( _mesa_x86_transform_points3_general ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_gr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_gr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - FLD_S( SRC0 ) /* F7 F6 F5 F4 */ - FMUL_S( MAT3 ) - - FLD_S( SRC1 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT6 ) - FLD_S( SRC1 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT7 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FLD_S( SRC2 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT10 ) - FLD_S( SRC2 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT11 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FXCH( ST(3) ) /* F4 F6 F5 F7 */ - FADD_S( MAT12 ) - FXCH( ST(2) ) /* F5 F6 F4 F7 */ - FADD_S( MAT13 ) - FXCH( ST(1) ) /* F6 F5 F4 F7 */ - FADD_S( MAT14 ) - FXCH( ST(3) ) /* F7 F5 F4 F6 */ - FADD_S( MAT15 ) - - FXCH( ST(2) ) /* F4 F5 F7 F6 */ - FSTP_S( DST0 ) /* F5 F7 F6 */ - FSTP_S( DST1 ) /* F7 F6 */ - FXCH( ST(1) ) /* F6 F7 */ - FSTP_S( DST2 ) /* F7 */ - FSTP_S( DST3 ) /* */ - -LLBL(x86_p3_gr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_gr_loop) ) - -LLBL(x86_p3_gr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_perspective ) -GLNAME( _mesa_x86_transform_points3_perspective ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_pr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_pr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F5 F4 */ - FMUL_S( MAT5 ) - - FLD_S( SRC2 ) /* F0 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F2 F1 F0 F5 F4 */ - FMUL_S( MAT10 ) - - FXCH( ST(2) ) /* F0 F1 F2 F5 F4 */ - FADDP( ST0, ST(4) ) /* F1 F2 F5 F4 */ - FADDP( ST0, ST(2) ) /* F2 F5 F4 */ - FLD_S( MAT14 ) /* F6 F2 F5 F4 */ - FXCH( ST(1) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - MOV_L( SRC2, EBX ) - XOR_L( CONST(-2147483648), EBX )/* change sign */ - - FXCH( ST(2) ) /* F4 F5 F6 */ - FSTP_S( DST0 ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - MOV_L( EBX, DST3 ) - -LLBL(x86_p3_pr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_pr_loop) ) - -LLBL(x86_p3_pr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_3d ) -GLNAME( _mesa_x86_transform_points3_3d ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_3dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_3dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - - FLD_S( SRC1 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT6 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - FLD_S( SRC2 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT10 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - FXCH( ST(2) ) /* F4 F5 F6 */ - FADD_S( MAT12 ) - FXCH( ST(1) ) /* F5 F4 F6 */ - FADD_S( MAT13 ) - FXCH( ST(2) ) /* F6 F4 F5 */ - FADD_S( MAT14 ) - - FXCH( ST(1) ) /* F4 F6 F5 */ - FSTP_S( DST0 ) /* F6 F5 */ - FXCH( ST(1) ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - -LLBL(x86_p3_3dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_3dr_loop) ) - -LLBL(x86_p3_3dr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_3d_no_rot ) -GLNAME( _mesa_x86_transform_points3_3d_no_rot ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_3dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_3dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F1 F4 */ - FMUL_S( MAT5 ) - - FLD_S( SRC2 ) /* F2 F1 F4 */ - FMUL_S( MAT10 ) - - FXCH( ST(2) ) /* F4 F1 F2 */ - FADD_S( MAT12 ) - FLD_S( MAT13 ) /* F5 F4 F1 F2 */ - FXCH( ST(2) ) /* F1 F4 F5 F2 */ - FADDP( ST0, ST(2) ) /* F4 F5 F2 */ - FLD_S( MAT14 ) /* F6 F4 F5 F2 */ - FXCH( ST(3) ) /* F2 F4 F5 F6 */ - FADDP( ST0, ST(3) ) /* F4 F5 F6 */ - - FSTP_S( DST0 ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - -LLBL(x86_p3_3dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_3dnrr_loop) ) - -LLBL(x86_p3_3dnrr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_2d ) -GLNAME( _mesa_x86_transform_points3_2d ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_2dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_2dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - - FLD_S( SRC1 ) /* F0 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F0 F1 F5 F4 */ - FADDP( ST0, ST(3) ) /* F1 F5 F4 */ - FADDP( ST0, ST(1) ) /* F5 F4 */ - - FXCH( ST(1) ) /* F4 F5 */ - FADD_S( MAT12 ) - FXCH( ST(1) ) /* F5 F4 */ - FADD_S( MAT13 ) - - MOV_L( SRC2, EBX ) - - FXCH( ST(1) ) /* F4 F5 */ - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - -LLBL(x86_p3_2dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_2dr_loop) ) - -LLBL(x86_p3_2dr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_2d_no_rot ) -GLNAME( _mesa_x86_transform_points3_2d_no_rot ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_2dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p3_2dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F1 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F4 F1 */ - FADD_S( MAT12 ) - FLD_S( MAT13 ) /* F5 F4 F1 */ - - FXCH( ST(2) ) /* F1 F4 F5 */ - FADDP( ST0, ST(2) ) /* F4 F5 */ - - MOV_L( SRC2, EBX ) - - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - -LLBL(x86_p3_2dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_2dnrr_loop) ) - -LLBL(x86_p3_2dnrr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points3_identity ) -GLNAME(_mesa_x86_transform_points3_identity ): - -#define FRAME_OFFSET 16 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - PUSH_L( EBP ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p3_ir_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_3), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(3), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - - CMP_L( ESI, EDI ) - JE( LLBL(x86_p3_ir_done) ) - -ALIGNTEXT16 -LLBL(x86_p3_ir_loop): - -#if 1 - MOV_L( SRC0, EBX ) - MOV_L( SRC1, EBP ) - MOV_L( SRC2, EDX ) - - MOV_L( EBX, DST0 ) - MOV_L( EBP, DST1 ) - MOV_L( EDX, DST2 ) -#else - FLD_S( SRC0 ) - FLD_S( SRC1 ) - FLD_S( SRC2 ) - - FSTP_S( DST2 ) - FSTP_S( DST1 ) - FSTP_S( DST0 ) -#endif - -LLBL(x86_p3_ir_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p3_ir_loop) ) - -LLBL(x86_p3_ir_done): - - POP_L( EBP ) - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET Index: xc/extras/Mesa/src/X86/x86_xform4.S diff -u xc/extras/Mesa/src/X86/x86_xform4.S:1.5 xc/extras/Mesa/src/X86/x86_xform4.S:removed --- xc/extras/Mesa/src/X86/x86_xform4.S:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/X86/x86_xform4.S Wed Mar 16 21:00:49 2005 @@ -1,665 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * NOTE: Avoid using spaces in between '(' ')' and arguments, especially - * with macros like CONST, LLBL that expand to CONCAT(...). Putting spaces - * in there will break the build on some platforms. - */ - -#include "matypes.h" -#include "xform_args.h" - - SEG_TEXT - -#define FP_ONE 1065353216 -#define FP_ZERO 0 - -#define SRC0 REGOFF(0, ESI) -#define SRC1 REGOFF(4, ESI) -#define SRC2 REGOFF(8, ESI) -#define SRC3 REGOFF(12, ESI) -#define DST0 REGOFF(0, EDI) -#define DST1 REGOFF(4, EDI) -#define DST2 REGOFF(8, EDI) -#define DST3 REGOFF(12, EDI) -#define MAT0 REGOFF(0, EDX) -#define MAT1 REGOFF(4, EDX) -#define MAT2 REGOFF(8, EDX) -#define MAT3 REGOFF(12, EDX) -#define MAT4 REGOFF(16, EDX) -#define MAT5 REGOFF(20, EDX) -#define MAT6 REGOFF(24, EDX) -#define MAT7 REGOFF(28, EDX) -#define MAT8 REGOFF(32, EDX) -#define MAT9 REGOFF(36, EDX) -#define MAT10 REGOFF(40, EDX) -#define MAT11 REGOFF(44, EDX) -#define MAT12 REGOFF(48, EDX) -#define MAT13 REGOFF(52, EDX) -#define MAT14 REGOFF(56, EDX) -#define MAT15 REGOFF(60, EDX) - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_general ) -GLNAME( _mesa_x86_transform_points4_general ): - -#define FRAME_OFFSET 8 - PUSH_L( ESI ) - PUSH_L( EDI ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_gr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_gr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - FLD_S( SRC0 ) /* F7 F6 F5 F4 */ - FMUL_S( MAT3 ) - - FLD_S( SRC1 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT6 ) - FLD_S( SRC1 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT7 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FLD_S( SRC2 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT10 ) - FLD_S( SRC2 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT11 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FLD_S( SRC3 ) /* F0 F7 F6 F5 F4 */ - FMUL_S( MAT12 ) - FLD_S( SRC3 ) /* F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT13 ) - FLD_S( SRC3 ) /* F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT14 ) - FLD_S( SRC3 ) /* F3 F2 F1 F0 F7 F6 F5 F4 */ - FMUL_S( MAT15 ) - - FXCH( ST(3) ) /* F0 F2 F1 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(7) ) /* F2 F1 F3 F7 F6 F5 F4 */ - FXCH( ST(1) ) /* F1 F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F2 F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F3 F7 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F7 F6 F5 F4 */ - - FXCH( ST(3) ) /* F4 F6 F5 F7 */ - FSTP_S( DST0 ) /* F6 F5 F7 */ - FXCH( ST(1) ) /* F5 F6 F7 */ - FSTP_S( DST1 ) /* F6 F7 */ - FSTP_S( DST2 ) /* F7 */ - FSTP_S( DST3 ) /* */ - -LLBL(x86_p4_gr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_gr_loop) ) - -LLBL(x86_p4_gr_done): - - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_perspective ) -GLNAME( _mesa_x86_transform_points4_perspective ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_pr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_pr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F5 F4 */ - FMUL_S( MAT5 ) - - FLD_S( SRC2 ) /* F0 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F6 F1 F0 F5 F4 */ - FMUL_S( MAT10 ) - - FXCH( ST(2) ) /* F0 F1 F6 F5 F4 */ - FADDP( ST0, ST(4) ) /* F1 F6 F5 F4 */ - FADDP( ST0, ST(2) ) /* F6 F5 F4 */ - - FLD_S( SRC3 ) /* F2 F6 F5 F4 */ - FMUL_S( MAT14 ) - - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - MOV_L( SRC2, EBX ) - XOR_L( CONST(-2147483648), EBX )/* change sign */ - - FXCH( ST(2) ) /* F4 F5 F6 */ - FSTP_S( DST0 ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - MOV_L( EBX, DST3 ) - -LLBL(x86_p4_pr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_pr_loop) ) - -LLBL(x86_p4_pr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_3d ) -GLNAME( _mesa_x86_transform_points4_3d ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_3dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_3dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - FLD_S( SRC0 ) /* F6 F5 F4 */ - FMUL_S( MAT2 ) - - FLD_S( SRC1 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT5 ) - FLD_S( SRC1 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT6 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - FLD_S( SRC2 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT8 ) - FLD_S( SRC2 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT9 ) - FLD_S( SRC2 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT10 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - FLD_S( SRC3 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT12 ) - FLD_S( SRC3 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT13 ) - FLD_S( SRC3 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT14 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - MOV_L( SRC3, EBX ) - - FXCH( ST(2) ) /* F4 F5 F6 */ - FSTP_S( DST0 ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - MOV_L( EBX, DST3 ) - -LLBL(x86_p4_3dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_3dr_loop) ) - -LLBL(x86_p4_3dr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME(_mesa_x86_transform_points4_3d_no_rot) -GLNAME(_mesa_x86_transform_points4_3d_no_rot): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_3dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_3dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F5 F4 */ - FMUL_S( MAT5 ) - - FLD_S( SRC2 ) /* F6 F5 F4 */ - FMUL_S( MAT10 ) - - FLD_S( SRC3 ) /* F0 F6 F5 F4 */ - FMUL_S( MAT12 ) - FLD_S( SRC3 ) /* F1 F0 F6 F5 F4 */ - FMUL_S( MAT13 ) - FLD_S( SRC3 ) /* F2 F1 F0 F6 F5 F4 */ - FMUL_S( MAT14 ) - - FXCH( ST(2) ) /* F0 F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(5) ) /* F1 F2 F6 F5 F4 */ - FADDP( ST0, ST(3) ) /* F2 F6 F5 F4 */ - FADDP( ST0, ST(1) ) /* F6 F5 F4 */ - - MOV_L( SRC3, EBX ) - - FXCH( ST(2) ) /* F4 F5 F6 */ - FSTP_S( DST0 ) /* F5 F6 */ - FSTP_S( DST1 ) /* F6 */ - FSTP_S( DST2 ) /* */ - MOV_L( EBX, DST3 ) - -LLBL(x86_p4_3dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_3dnrr_loop) ) - -LLBL(x86_p4_3dnrr_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_2d ) -GLNAME( _mesa_x86_transform_points4_2d ): - -#define FRAME_OFFSET 16 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - PUSH_L( EBP ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_2dr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_2dr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - FLD_S( SRC0 ) /* F5 F4 */ - FMUL_S( MAT1 ) - - FLD_S( SRC1 ) /* F0 F5 F4 */ - FMUL_S( MAT4 ) - FLD_S( SRC1 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT5 ) - - FXCH( ST(1) ) /* F0 F1 F5 F4 */ - FADDP( ST0, ST(3) ) /* F1 F5 F4 */ - FADDP( ST0, ST(1) ) /* F5 F4 */ - - FLD_S( SRC3 ) /* F0 F5 F4 */ - FMUL_S( MAT12 ) - FLD_S( SRC3 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT13 ) - - FXCH( ST(1) ) /* F0 F1 F5 F4 */ - FADDP( ST0, ST(3) ) /* F1 F5 F4 */ - FADDP( ST0, ST(1) ) /* F5 F4 */ - - MOV_L( SRC2, EBX ) - MOV_L( SRC3, EBP ) - - FXCH( ST(1) ) /* F4 F5 */ - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - MOV_L( EBP, DST3 ) - -LLBL(x86_p4_2dr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_2dr_loop) ) - -LLBL(x86_p4_2dr_done): - - POP_L( EBP ) - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_2d_no_rot ) -GLNAME( _mesa_x86_transform_points4_2d_no_rot ): - -#define FRAME_OFFSET 16 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - PUSH_L( EBP ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_2dnrr_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - -ALIGNTEXT16 -LLBL(x86_p4_2dnrr_loop): - - FLD_S( SRC0 ) /* F4 */ - FMUL_S( MAT0 ) - - FLD_S( SRC1 ) /* F5 F4 */ - FMUL_S( MAT5 ) - - FLD_S( SRC3 ) /* F0 F5 F4 */ - FMUL_S( MAT12 ) - FLD_S( SRC3 ) /* F1 F0 F5 F4 */ - FMUL_S( MAT13 ) - - FXCH( ST(1) ) /* F0 F1 F5 F4 */ - FADDP( ST0, ST(3) ) /* F1 F5 F4 */ - FADDP( ST0, ST(1) ) /* F5 F4 */ - - MOV_L( SRC2, EBX ) - MOV_L( SRC3, EBP ) - - FXCH( ST(1) ) /* F4 F5 */ - FSTP_S( DST0 ) /* F5 */ - FSTP_S( DST1 ) /* */ - MOV_L( EBX, DST2 ) - MOV_L( EBP, DST3 ) - -LLBL(x86_p4_2dnrr_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_2dnrr_loop) ) - -LLBL(x86_p4_2dnrr_done): - - POP_L( EBP ) - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET -#undef FRAME_OFFSET - - - - -ALIGNTEXT16 -GLOBL GLNAME( _mesa_x86_transform_points4_identity ) -GLNAME( _mesa_x86_transform_points4_identity ): - -#define FRAME_OFFSET 12 - PUSH_L( ESI ) - PUSH_L( EDI ) - PUSH_L( EBX ) - - MOV_L( ARG_SOURCE, ESI ) - MOV_L( ARG_DEST, EDI ) - - MOV_L( ARG_MATRIX, EDX ) - MOV_L( REGOFF(V4F_COUNT, ESI), ECX ) - - TEST_L( ECX, ECX ) - JZ( LLBL(x86_p4_ir_done) ) - - MOV_L( REGOFF(V4F_STRIDE, ESI), EAX ) - OR_L( CONST(VEC_SIZE_4), REGOFF(V4F_FLAGS, EDI) ) - - MOV_L( ECX, REGOFF(V4F_COUNT, EDI) ) - MOV_L( CONST(4), REGOFF(V4F_SIZE, EDI) ) - - SHL_L( CONST(4), ECX ) - MOV_L( REGOFF(V4F_START, ESI), ESI ) - - MOV_L( REGOFF(V4F_START, EDI), EDI ) - ADD_L( EDI, ECX ) - - CMP_L( ESI, EDI ) - JE( LLBL(x86_p4_ir_done) ) - -ALIGNTEXT16 -LLBL(x86_p4_ir_loop): - - MOV_L( SRC0, EBX ) - MOV_L( SRC1, EDX ) - - MOV_L( EBX, DST0 ) - MOV_L( EDX, DST1 ) - - MOV_L( SRC2, EBX ) - MOV_L( SRC3, EDX ) - - MOV_L( EBX, DST2 ) - MOV_L( EDX, DST3 ) - -LLBL(x86_p4_ir_skip): - - ADD_L( CONST(16), EDI ) - ADD_L( EAX, ESI ) - CMP_L( ECX, EDI ) - JNE( LLBL(x86_p4_ir_loop) ) - -LLBL(x86_p4_ir_done): - - POP_L( EBX ) - POP_L( EDI ) - POP_L( ESI ) - RET Index: xc/extras/Mesa/src/X86/xform_args.h diff -u xc/extras/Mesa/src/X86/xform_args.h:1.4 xc/extras/Mesa/src/X86/xform_args.h:removed --- xc/extras/Mesa/src/X86/xform_args.h:1.4 Sun Sep 28 15:17:09 2003 +++ xc/extras/Mesa/src/X86/xform_args.h Wed Mar 16 21:00:49 2005 @@ -1,51 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Transform function interface for assembly code. Simply define - * FRAME_OFFSET to the number of bytes pushed onto the stack before - * using the ARG_* argument macros. - * - * Gareth Hughes - */ - -#ifndef __XFORM_ARGS_H__ -#define __XFORM_ARGS_H__ - -/* Offsets for transform_func arguments - * - * typedef void (*transform_func)( GLvector4f *to_vec, - * const GLfloat m[16], - * const GLvector4f *from_vec ); - */ -#define OFFSET_DEST 4 -#define OFFSET_MATRIX 8 -#define OFFSET_SOURCE 12 - -#define ARG_DEST REGOFF(FRAME_OFFSET+OFFSET_DEST, ESP) -#define ARG_MATRIX REGOFF(FRAME_OFFSET+OFFSET_MATRIX, ESP) -#define ARG_SOURCE REGOFF(FRAME_OFFSET+OFFSET_SOURCE, ESP) - -#endif Index: xc/extras/Mesa/src/array_cache/ac_context.c diff -u xc/extras/Mesa/src/array_cache/ac_context.c:1.3 xc/extras/Mesa/src/array_cache/ac_context.c:removed --- xc/extras/Mesa/src/array_cache/ac_context.c:1.3 Sun Sep 28 15:17:10 2003 +++ xc/extras/Mesa/src/array_cache/ac_context.c Wed Mar 16 21:00:49 2005 @@ -1,314 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#include "glheader.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" -#include "mtypes.h" - -#include "array_cache/ac_context.h" - - -/* - * Initialize the array fallbacks. That is, by default the fallback arrays - * point into the current vertex attribute values in ctx->Current.Attrib[] - */ -static void _ac_fallbacks_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *cl; - GLuint i; - - cl = &ac->Fallback.Normal; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - cl = &ac->Fallback.Color; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - cl = &ac->Fallback.SecondaryColor; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - cl = &ac->Fallback.FogCoord; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) &ctx->Current.Attrib[VERT_ATTRIB_FOG]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - cl = &ac->Fallback.Index; - cl->Size = 1; - cl->Type = GL_UNSIGNED_INT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) &ctx->Current.Index; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) { - cl = &ac->Fallback.TexCoord[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - } - - cl = &ac->Fallback.EdgeFlag; - cl->Size = 1; - cl->Type = GL_UNSIGNED_BYTE; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) &ctx->Current.EdgeFlag; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - - for (i = 0; i < VERT_ATTRIB_MAX; i++) { - cl = &ac->Fallback.Attrib[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 0; - cl->Ptr = (void *) ctx->Current.Attrib[i]; - cl->Enabled = 1; - cl->Flags = CA_CLIENT_DATA; /* hack */ - } -} - - -/* - * Initialize the array cache pointers, types, strides, etc. - */ -static void _ac_cache_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *cl; - GLuint size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES; - GLuint i; - - cl = &ac->Cache.Vertex; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - cl = &ac->Cache.Normal; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 3 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - cl = &ac->Cache.Color; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - cl = &ac->Cache.SecondaryColor; - cl->Size = 3; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - cl = &ac->Cache.FogCoord; - cl->Size = 1; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - cl = &ac->Cache.Index; - cl->Size = 1; - cl->Type = GL_UNSIGNED_INT; - cl->Stride = 0; - cl->StrideB = sizeof(GLuint); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - cl = &ac->Cache.TexCoord[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - } - - cl = &ac->Cache.EdgeFlag; - cl->Size = 1; - cl->Type = GL_UNSIGNED_BYTE; - cl->Stride = 0; - cl->StrideB = sizeof(GLubyte); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - - for (i = 0 ; i < VERT_ATTRIB_MAX; i++) { - cl = &ac->Cache.Attrib[i]; - cl->Size = 4; - cl->Type = GL_FLOAT; - cl->Stride = 0; - cl->StrideB = 4 * sizeof(GLfloat); - cl->Ptr = MALLOC( cl->StrideB * size ); - cl->Enabled = 1; - cl->Flags = 0; - } -} - - -/* This storage used to hold translated client data if type or stride - * need to be fixed. - */ -static void _ac_elts_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLuint size = 1000; - - ac->Elts = (GLuint *)MALLOC( sizeof(GLuint) * size ); - ac->elt_size = size; -} - -static void _ac_raw_init( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLuint i; - - ac->Raw.Color = ac->Fallback.Color; - ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; - ac->Raw.FogCoord = ac->Fallback.FogCoord; - ac->Raw.Index = ac->Fallback.Index; - ac->Raw.Normal = ac->Fallback.Normal; - ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; - ac->Raw.Vertex = ctx->Array.Vertex; - - ac->IsCached.Color = GL_FALSE; - ac->IsCached.EdgeFlag = GL_FALSE; - ac->IsCached.FogCoord = GL_FALSE; - ac->IsCached.Index = GL_FALSE; - ac->IsCached.Normal = GL_FALSE; - ac->IsCached.SecondaryColor = GL_FALSE; - ac->IsCached.Vertex = GL_FALSE; - - for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) { - ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i]; - ac->IsCached.TexCoord[i] = GL_FALSE; - } - - for (i = 0 ; i < VERT_ATTRIB_MAX ; i++) { - ac->Raw.Attrib[i] = ac->Fallback.Attrib[i]; - ac->IsCached.Attrib[i] = GL_FALSE; - } -} - -GLboolean _ac_CreateContext( GLcontext *ctx ) -{ - ctx->acache_context = CALLOC(sizeof(ACcontext)); - if (ctx->acache_context) { - _ac_cache_init( ctx ); - _ac_fallbacks_init( ctx ); - _ac_raw_init( ctx ); - _ac_elts_init( ctx ); - return GL_TRUE; - } - return GL_FALSE; -} - -void _ac_DestroyContext( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLint i; - - if (ac->Cache.Vertex.Ptr) FREE( ac->Cache.Vertex.Ptr ); - if (ac->Cache.Normal.Ptr) FREE( ac->Cache.Normal.Ptr ); - if (ac->Cache.Color.Ptr) FREE( ac->Cache.Color.Ptr ); - if (ac->Cache.SecondaryColor.Ptr) FREE( ac->Cache.SecondaryColor.Ptr ); - if (ac->Cache.EdgeFlag.Ptr) FREE( ac->Cache.EdgeFlag.Ptr ); - if (ac->Cache.Index.Ptr) FREE( ac->Cache.Index.Ptr ); - if (ac->Cache.FogCoord.Ptr) FREE( ac->Cache.FogCoord.Ptr ); - - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - if (ac->Cache.TexCoord[i].Ptr) - FREE( ac->Cache.TexCoord[i].Ptr ); - } - - for (i = 0; i < VERT_ATTRIB_MAX; i++) { - if (ac->Cache.Attrib[i].Ptr) - FREE( ac->Cache.Attrib[i].Ptr ); - } - - if (ac->Elts) FREE( ac->Elts ); - - /* Free the context structure itself */ - FREE(ac); - ctx->acache_context = NULL; -} - -void _ac_InvalidateState( GLcontext *ctx, GLuint new_state ) -{ - AC_CONTEXT(ctx)->NewState |= new_state; - AC_CONTEXT(ctx)->NewArrayState |= ctx->Array.NewState; -} Index: xc/extras/Mesa/src/array_cache/ac_context.h diff -u xc/extras/Mesa/src/array_cache/ac_context.h:1.3 xc/extras/Mesa/src/array_cache/ac_context.h:removed --- xc/extras/Mesa/src/array_cache/ac_context.h:1.3 Sun Sep 28 15:17:10 2003 +++ xc/extras/Mesa/src/array_cache/ac_context.h Wed Mar 16 21:00:49 2005 @@ -1,99 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifndef _AC_CONTEXT_H -#define _AC_CONTEXT_H - -#include "glheader.h" -#include "mtypes.h" - -#include "array_cache/acache.h" - -/* These are used to make the ctx->Current values look like - * arrays (with zero StrideB). - */ -struct ac_arrays { - struct gl_client_array Vertex; - struct gl_client_array Normal; - struct gl_client_array Color; - struct gl_client_array SecondaryColor; - struct gl_client_array FogCoord; - struct gl_client_array Index; - struct gl_client_array TexCoord[MAX_TEXTURE_UNITS]; - struct gl_client_array EdgeFlag; - struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - -struct ac_array_pointers { - struct gl_client_array *Vertex; - struct gl_client_array *Normal; - struct gl_client_array *Color; - struct gl_client_array *SecondaryColor; - struct gl_client_array *FogCoord; - struct gl_client_array *Index; - struct gl_client_array *TexCoord[MAX_TEXTURE_UNITS]; - struct gl_client_array *EdgeFlag; - struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - -struct ac_array_flags { - GLboolean Vertex; - GLboolean Normal; - GLboolean Color; - GLboolean SecondaryColor; - GLboolean FogCoord; - GLboolean Index; - GLboolean TexCoord[MAX_TEXTURE_UNITS]; - GLboolean EdgeFlag; - GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ -}; - - -typedef struct { - GLuint NewState; /* not needed? */ - GLuint NewArrayState; - - /* Facility for importing and caching array data: - */ - struct ac_arrays Fallback; - struct ac_arrays Cache; - struct ac_arrays Raw; - struct ac_array_flags IsCached; - GLuint start; - GLuint count; - - /* Facility for importing element lists: - */ - GLuint *Elts; - GLuint elt_size; - -} ACcontext; - -#define AC_CONTEXT(ctx) ((ACcontext *)ctx->acache_context) - -#endif Index: xc/extras/Mesa/src/array_cache/ac_import.c diff -u xc/extras/Mesa/src/array_cache/ac_import.c:1.3 xc/extras/Mesa/src/array_cache/ac_import.c:removed --- xc/extras/Mesa/src/array_cache/ac_import.c:1.3 Sun Sep 28 15:17:10 2003 +++ xc/extras/Mesa/src/array_cache/ac_import.c Wed Mar 16 21:00:49 2005 @@ -1,928 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#include "glheader.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" -#include "mtypes.h" - -#include "math/m_translate.h" -#include "array_cache/ac_context.h" -#include "math/m_translate.h" - -#define STRIDE_ARRAY( array, offset ) \ -do { \ - char *tmp = (char *) (array).Ptr; \ - tmp += (offset) * (array).StrideB; \ - (array).Ptr = tmp; \ -} while (0) - -/* Set the array pointer back to its source when the cached data is - * invalidated: - */ - -static void reset_texcoord( GLcontext *ctx, GLuint unit ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_TEXCOORD(unit)) { - ac->Raw.TexCoord[unit] = ctx->Array.TexCoord[unit]; - STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start); - } - else { - ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit]; - - if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0) - ac->Raw.TexCoord[unit].Size = 4; - else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0) - ac->Raw.TexCoord[unit].Size = 3; - else - ac->Raw.TexCoord[unit].Size = 2; - } - - ac->IsCached.TexCoord[unit] = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_TEXCOORD(unit); -} - -static void reset_vertex( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - ASSERT(ctx->Array.Vertex.Enabled - || (ctx->VertexProgram.Enabled && ctx->Array.VertexAttrib[0].Enabled)); - ac->Raw.Vertex = ctx->Array.Vertex; - STRIDE_ARRAY(ac->Raw.Vertex, ac->start); - ac->IsCached.Vertex = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_VERTEX; -} - - -static void reset_normal( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_NORMAL) { - ac->Raw.Normal = ctx->Array.Normal; - STRIDE_ARRAY(ac->Raw.Normal, ac->start); - } - else { - ac->Raw.Normal = ac->Fallback.Normal; - } - - ac->IsCached.Normal = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_NORMAL; -} - - -static void reset_color( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - - if (ctx->Array._Enabled & _NEW_ARRAY_COLOR0) { - ac->Raw.Color = ctx->Array.Color; - STRIDE_ARRAY(ac->Raw.Color, ac->start); - } - else - ac->Raw.Color = ac->Fallback.Color; - - ac->IsCached.Color = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_COLOR0; -} - - -static void reset_secondarycolor( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_COLOR1) { - ac->Raw.SecondaryColor = ctx->Array.SecondaryColor; - STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start); - } - else - ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; - - ac->IsCached.SecondaryColor = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_COLOR1; -} - - -static void reset_index( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_INDEX) { - ac->Raw.Index = ctx->Array.Index; - STRIDE_ARRAY(ac->Raw.Index, ac->start); - } - else - ac->Raw.Index = ac->Fallback.Index; - - ac->IsCached.Index = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_INDEX; -} - - -static void reset_fogcoord( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_FOGCOORD) { - ac->Raw.FogCoord = ctx->Array.FogCoord; - STRIDE_ARRAY(ac->Raw.FogCoord, ac->start); - } - else - ac->Raw.FogCoord = ac->Fallback.FogCoord; - - ac->IsCached.FogCoord = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_FOGCOORD; -} - - -static void reset_edgeflag( GLcontext *ctx ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (ctx->Array._Enabled & _NEW_ARRAY_EDGEFLAG) { - ac->Raw.EdgeFlag = ctx->Array.EdgeFlag; - STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start); - } - else - ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; - - ac->IsCached.EdgeFlag = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_EDGEFLAG; -} - - -static void reset_attrib( GLcontext *ctx, GLuint index ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - GLboolean fallback = GL_FALSE; - - /* - * The 16 NV vertex attribute arrays have top priority. If one of those - * is not enabled, look if a corresponding conventional array is enabled. - * If nothing else, use the fallback (ctx->Current.Attrib) values. - */ - if (ctx->Array._Enabled & _NEW_ARRAY_ATTRIB(index)) { - ac->Raw.Attrib[index] = ctx->Array.VertexAttrib[index]; - STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start); - } - else if (ctx->Array._Enabled & (1 << index)) { - /* use conventional vertex array if possible */ - if (index == VERT_ATTRIB_POS) { - ac->Raw.Attrib[index] = ctx->Array.Vertex; - } - else if (index == VERT_ATTRIB_NORMAL) { - ac->Raw.Attrib[index] = ctx->Array.Normal; - } - else if (index == VERT_ATTRIB_COLOR0) { - ac->Raw.Attrib[index] = ctx->Array.Color; - } - else if (index == VERT_ATTRIB_COLOR1) { - ac->Raw.Attrib[index] = ctx->Array.SecondaryColor; - } - else if (index == VERT_ATTRIB_FOG) { - ac->Raw.Attrib[index] = ctx->Array.FogCoord; - } - else if (index >= VERT_ATTRIB_TEX0 && index <= VERT_ATTRIB_TEX7) { - GLuint unit = index - VERT_ATTRIB_TEX0; - ASSERT(unit < MAX_TEXTURE_UNITS); - ac->Raw.Attrib[index] = ctx->Array.TexCoord[unit]; - } - else { - /* missing conventional array (vertex weight, for example) */ - fallback = GL_TRUE; - } - if (!fallback) - STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start); - } - else { - fallback = GL_TRUE; - } - - if (fallback) { - /* fallback to ctx->Current.Attrib values */ - ac->Raw.Attrib[index] = ac->Fallback.Attrib[index]; - - if (ctx->Current.Attrib[index][3] != 1.0) - ac->Raw.Attrib[index].Size = 4; - else if (ctx->Current.Attrib[index][2] != 0.0) - ac->Raw.Attrib[index].Size = 3; - else - ac->Raw.Attrib[index].Size = 2; - } - - ac->IsCached.Attrib[index] = GL_FALSE; - ac->NewArrayState &= ~_NEW_ARRAY_ATTRIB(index); -} - - -/* - * Generic import function for color data - */ -static void import( GLcontext *ctx, - GLenum type, - struct gl_client_array *to, - struct gl_client_array *from ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (type == 0) - type = from->Type; - - switch (type) { - case GL_FLOAT: - _math_trans_4fc( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - break; - - case GL_UNSIGNED_BYTE: - _math_trans_4ub( (GLubyte (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLubyte); - to->Type = GL_UNSIGNED_BYTE; - break; - - case GL_UNSIGNED_SHORT: - _math_trans_4us( (GLushort (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->StrideB = 4 * sizeof(GLushort); - to->Type = GL_UNSIGNED_SHORT; - break; - - default: - ASSERT(0); - break; - } -} - - - -/* - * Functions to import array ranges with specified types and strides. - * For example, if the vertex data is GLshort[2] and we want GLfloat[3] - * we'll use an import function to do the data conversion. - */ - -static void import_texcoord( GLcontext *ctx, GLuint unit, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.TexCoord[unit]; - struct gl_client_array *to = &ac->Cache.TexCoord[unit]; - - ASSERT(unit < ctx->Const.MaxTextureUnits); - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.TexCoord[unit] = GL_TRUE; -} - -static void import_vertex( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.Vertex; - struct gl_client_array *to = &ac->Cache.Vertex; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Vertex = GL_TRUE; -} - -static void import_normal( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.Normal; - struct gl_client_array *to = &ac->Cache.Normal; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 3*sizeof(GLfloat) || stride == 0); - - _math_trans_3f( (GLfloat (*)[3]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = 3 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Normal = GL_TRUE; -} - -static void import_color( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.Color; - struct gl_client_array *to = &ac->Cache.Color; - - import( ctx, type, to, from ); - - ac->IsCached.Color = GL_TRUE; -} - -static void import_index( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.Index; - struct gl_client_array *to = &ac->Cache.Index; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_UNSIGNED_INT); - ASSERT(stride == sizeof(GLuint) || stride == 0); - - _math_trans_1ui( (GLuint *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLuint); - to->Type = GL_UNSIGNED_INT; - ac->IsCached.Index = GL_TRUE; -} - -static void import_secondarycolor( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.SecondaryColor; - struct gl_client_array *to = &ac->Cache.SecondaryColor; - - import( ctx, type, to, from ); - - ac->IsCached.SecondaryColor = GL_TRUE; -} - -static void import_fogcoord( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.FogCoord; - struct gl_client_array *to = &ac->Cache.FogCoord; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == sizeof(GLfloat) || stride == 0); - - _math_trans_1f( (GLfloat *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.FogCoord = GL_TRUE; -} - -static void import_edgeflag( GLcontext *ctx, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.EdgeFlag; - struct gl_client_array *to = &ac->Cache.EdgeFlag; - - /* Limited choices at this stage: - */ - ASSERT(type == GL_UNSIGNED_BYTE); - ASSERT(stride == sizeof(GLubyte) || stride == 0); - - _math_trans_1ub( (GLubyte *) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - 0, - ac->count - ac->start); - - to->StrideB = sizeof(GLubyte); - to->Type = GL_UNSIGNED_BYTE; - ac->IsCached.EdgeFlag = GL_TRUE; -} - -static void import_attrib( GLcontext *ctx, GLuint index, - GLenum type, GLuint stride ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - struct gl_client_array *from = &ac->Raw.Attrib[index]; - struct gl_client_array *to = &ac->Cache.Attrib[index]; - - ASSERT(index < VERT_ATTRIB_MAX); - - /* Limited choices at this stage: - */ - ASSERT(type == GL_FLOAT); - ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); - ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); - - _math_trans_4f( (GLfloat (*)[4]) to->Ptr, - from->Ptr, - from->StrideB, - from->Type, - from->Size, - 0, - ac->count - ac->start); - - to->Size = from->Size; - to->StrideB = 4 * sizeof(GLfloat); - to->Type = GL_FLOAT; - ac->IsCached.Attrib[index] = GL_TRUE; -} - - - -/* - * Externals to request arrays with specific properties: - */ - - -struct gl_client_array *_ac_import_texcoord( GLcontext *ctx, - GLuint unit, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - ASSERT(unit < ctx->Const.MaxTextureUnits); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_TEXCOORD(unit)) - reset_texcoord( ctx, unit ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize) - return 0; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.TexCoord[unit].Type != type || - (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.TexCoord[unit]) - import_texcoord(ctx, unit, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.TexCoord[unit]; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.TexCoord[unit]; - } -} - -struct gl_client_array *_ac_import_vertex( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_VERTEX) - reset_vertex( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize) - return 0; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Vertex.Type != type || - (reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Vertex) - import_vertex(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Vertex; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Vertex; - } -} - -struct gl_client_array *_ac_import_normal( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_NORMAL) - reset_normal( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Normal.Type != type || - (reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Normal) - import_normal(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Normal; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Normal; - } -} - -struct gl_client_array *_ac_import_color( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR0) - reset_color( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) { - return 0; - } - - /* Do we need to pull in a copy of the client data: - */ - if ((type != 0 && ac->Raw.Color.Type != type) || - (reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Color) - import_color(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Color; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Color; - } -} - -struct gl_client_array *_ac_import_index( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_INDEX) - reset_index( ctx ); - - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Index.Type != type || - (reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.Index) - import_index(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Index; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Index; - } -} - -struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR1) - reset_secondarycolor( ctx ); - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize) - return 0; - - /* Do we need to pull in a copy of the client data: - */ - if ((type != 0 && ac->Raw.SecondaryColor.Type != type) || - (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.SecondaryColor) - import_secondarycolor(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.SecondaryColor; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.SecondaryColor; - } -} - -struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD) - reset_fogcoord( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.FogCoord.Type != type || - (reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.FogCoord) - import_fogcoord(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.FogCoord; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.FogCoord; - } -} - -struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG) - reset_edgeflag( ctx ); - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.EdgeFlag.Type != type || - (reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) || - reqwriteable) - { - if (!ac->IsCached.EdgeFlag) - import_edgeflag(ctx, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.EdgeFlag; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.EdgeFlag; - } -} - -/* GL_NV_vertex_program */ -struct gl_client_array *_ac_import_attrib( GLcontext *ctx, - GLuint index, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwriteable, - GLboolean *writeable ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - ASSERT(index < VERT_ATTRIB_MAX); - - /* Can we keep the existing version? - */ - if (ac->NewArrayState & _NEW_ARRAY_ATTRIB(index)) { - reset_attrib( ctx, index ); - } - else if (ac->NewArrayState & (1 << index)) { - /* Also need to check conventional attributes */ - reset_attrib( ctx, index ); - } - - /* Is the request impossible? - */ - if (reqsize != 0 && ac->Raw.Attrib[index].Size > (GLint) reqsize) - return NULL; - - /* Do we need to pull in a copy of the client data: - */ - if (ac->Raw.Attrib[index].Type != type || - (reqstride != 0 && ac->Raw.Attrib[index].StrideB != (GLint)reqstride) || - reqwriteable) - { - if (!ac->IsCached.Attrib[index]) - import_attrib(ctx, index, type, reqstride ); - *writeable = GL_TRUE; - return &ac->Cache.Attrib[index]; - } - else { - *writeable = GL_FALSE; - return &ac->Raw.Attrib[index]; - } -} - - -/* Clients must call this function to validate state and set bounds - * before importing any data: - */ -void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (!ctx->Array.LockCount) { - /* Not locked, discard cached data. Changes to lock - * status are caught via. _ac_invalidate_state(). - */ - ac->NewArrayState = _NEW_ARRAY_ALL; - ac->start = start; - ac->count = count; - } - else { - /* Locked, discard data for any disabled arrays. Require that - * the whole locked range always be dealt with, otherwise hard to - * maintain cached data in the face of clipping. - */ - ac->NewArrayState |= ~ctx->Array._Enabled; - ac->start = ctx->Array.LockFirst; - ac->count = ctx->Array.LockCount; - ASSERT(ac->start == start); /* hmm? */ - ASSERT(ac->count == count); - } -} - - - -/* Additional convienence function for importing the element list - * for glDrawElements() and glDrawRangeElements(). - */ -CONST void * -_ac_import_elements( GLcontext *ctx, - GLenum new_type, - GLuint count, - GLenum old_type, - CONST void *indices ) -{ - ACcontext *ac = AC_CONTEXT(ctx); - - if (old_type == new_type) - return indices; - - if (ac->elt_size < count * sizeof(GLuint)) { - if (ac->Elts) FREE(ac->Elts); - while (ac->elt_size < count * sizeof(GLuint)) - ac->elt_size *= 2; - ac->Elts = (GLuint *) MALLOC(ac->elt_size); - } - - switch (new_type) { - case GL_UNSIGNED_BYTE: - ASSERT(0); - return 0; - case GL_UNSIGNED_SHORT: - ASSERT(0); - return 0; - case GL_UNSIGNED_INT: { - GLuint *out = (GLuint *)ac->Elts; - GLuint i; - - switch (old_type) { - case GL_UNSIGNED_BYTE: { - CONST GLubyte *in = (CONST GLubyte *)indices; - for (i = 0 ; i < count ; i++) - out[i] = in[i]; - break; - } - case GL_UNSIGNED_SHORT: { - CONST GLushort *in = (CONST GLushort *)indices; - for (i = 0 ; i < count ; i++) - out[i] = in[i]; - break; - } - default: - ASSERT(0); - } - - return (CONST void *)out; - } - default: - ASSERT(0); - break; - } - - return 0; -} Index: xc/extras/Mesa/src/array_cache/acache.h diff -u xc/extras/Mesa/src/array_cache/acache.h:1.3 xc/extras/Mesa/src/array_cache/acache.h:removed --- xc/extras/Mesa/src/array_cache/acache.h:1.3 Sun Sep 28 15:17:10 2003 +++ xc/extras/Mesa/src/array_cache/acache.h Wed Mar 16 21:00:49 2005 @@ -1,132 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifndef _ARRAYCACHE_H -#define _ARRAYCACHE_H - -#include "mtypes.h" - - -extern GLboolean -_ac_CreateContext( GLcontext *ctx ); - -extern void -_ac_DestroyContext( GLcontext *ctx ); - -extern void -_ac_InvalidateState( GLcontext *ctx, GLuint new_state ); - -extern struct gl_client_array * -_ac_import_vertex( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_normal( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_color( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_index( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_secondarycolor( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_fogcoord( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_edgeflag( GLcontext *ctx, - GLenum type, - GLuint reqstride, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_texcoord( GLcontext *ctx, - GLuint unit, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - -extern struct gl_client_array * -_ac_import_attrib( GLcontext *ctx, - GLuint index, - GLenum type, - GLuint reqstride, - GLuint reqsize, - GLboolean reqwritable, - GLboolean *writable ); - - -/* Clients must call this function to validate state and set bounds - * before importing any data: - */ -extern void -_ac_import_range( GLcontext *ctx, GLuint start, GLuint count ); - - -/* Additional convenience function: - */ -extern CONST void * -_ac_import_elements( GLcontext *ctx, - GLenum new_type, - GLuint count, - GLenum old_type, - CONST void *indices ); - - -#endif Index: xc/extras/Mesa/src/glu/Makefile diff -u /dev/null xc/extras/Mesa/src/glu/Makefile:1.1.1.1 --- /dev/null Wed Mar 16 21:00:49 2005 +++ xc/extras/Mesa/src/glu/Makefile Fri Dec 10 10:04:28 2004 @@ -0,0 +1,20 @@ +# src/glu/Makefile + +TOP = ../.. + +include $(TOP)/configs/current + + +SUBDIRS = $(GLU_DIRS) + + +default: $(TOP)/configs/current + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE)) ; \ + done + + +clean: + @for dir in $(SUBDIRS) ; do \ + (cd $$dir ; $(MAKE) clean) ; \ + done Index: xc/extras/Mesa/src/glu/mesa/Makefile diff -u /dev/null xc/extras/Mesa/src/glu/mesa/Makefile:1.1.1.1 --- /dev/null Wed Mar 16 21:00:49 2005 +++ xc/extras/Mesa/src/glu/mesa/Makefile Fri Dec 10 10:04:40 2004 @@ -0,0 +1,56 @@ +# src/glu/mesa/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +GLU_MAJOR = 1 +GLU_MINOR = 1 +GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) + +C_SOURCES = \ + glu.c \ + mipmap.c \ + nurbs.c \ + nurbscrv.c \ + nurbssrf.c \ + nurbsutl.c \ + polytest.c \ + project.c \ + quadric.c \ + tess.c \ + tesselat.c + +OBJECTS = $(C_SOURCES:.c=.o) + +INCLUDES = -I. -I- -I$(TOP)/include + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ + +##### TARGETS ##### + +default: + @if [ "${CONFIG_NAME}" = "beos" ] ; then \ + echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \ + exit 0 ; \ + else \ + $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \ + fi + +$(LIB_DIR): + -mkdir $(LIB_DIR) + +# Make the library: +$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS) + @CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \ + -minor $(GLU_MINOR) -patch $(GLU_TINY) \ + $(MKLIB_OPTIONS) -install $(LIB_DIR) \ + $(GLU_LIB_DEPS) $(OBJECTS) + +clean: + -rm -f *.o */*.o */*/*.o + -rm -f *.lo */*.lo */*/*.lo + -rm -f *.la */*.la */*/*.la Index: xc/extras/Mesa/src/glu/sgi/Makefile diff -u /dev/null xc/extras/Mesa/src/glu/sgi/Makefile:1.1.1.1 --- /dev/null Wed Mar 16 21:00:50 2005 +++ xc/extras/Mesa/src/glu/sgi/Makefile Fri Dec 10 10:04:28 2004 @@ -0,0 +1,148 @@ +# src/glu/sgi/Makefile + +.SUFFIXES : .cc + +TOP = ../../.. + +include $(TOP)/configs/current + +GLU_MAJOR = 1 +GLU_MINOR = 3 +GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) + +INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess + +C_SOURCES = \ + libutil/error.c \ + libutil/glue.c \ + libutil/mipmap.c \ + libutil/project.c \ + libutil/quad.c \ + libutil/registry.c \ + libtess/dict.c \ + libtess/geom.c \ + libtess/memalloc.c \ + libtess/mesh.c \ + libtess/normal.c \ + libtess/priorityq.c \ + libtess/render.c \ + libtess/sweep.c \ + libtess/tess.c \ + libtess/tessmono.c + +CC_SOURCES = \ + libnurbs/interface/bezierEval.cc \ + libnurbs/interface/bezierPatch.cc \ + libnurbs/interface/bezierPatchMesh.cc \ + libnurbs/interface/glcurveval.cc \ + libnurbs/interface/glinterface.cc \ + libnurbs/interface/glrenderer.cc \ + libnurbs/interface/glsurfeval.cc \ + libnurbs/interface/incurveeval.cc \ + libnurbs/interface/insurfeval.cc \ + libnurbs/internals/arc.cc \ + libnurbs/internals/arcsorter.cc \ + libnurbs/internals/arctess.cc \ + libnurbs/internals/backend.cc \ + libnurbs/internals/basiccrveval.cc \ + libnurbs/internals/basicsurfeval.cc \ + libnurbs/internals/bin.cc \ + libnurbs/internals/bufpool.cc \ + libnurbs/internals/cachingeval.cc \ + libnurbs/internals/ccw.cc \ + libnurbs/internals/coveandtiler.cc \ + libnurbs/internals/curve.cc \ + libnurbs/internals/curvelist.cc \ + libnurbs/internals/curvesub.cc \ + libnurbs/internals/dataTransform.cc \ + libnurbs/internals/displaylist.cc \ + libnurbs/internals/flist.cc \ + libnurbs/internals/flistsorter.cc \ + libnurbs/internals/hull.cc \ + libnurbs/internals/intersect.cc \ + libnurbs/internals/knotvector.cc \ + libnurbs/internals/mapdesc.cc \ + libnurbs/internals/mapdescv.cc \ + libnurbs/internals/maplist.cc \ + libnurbs/internals/mesher.cc \ + libnurbs/internals/monoTriangulationBackend.cc \ + libnurbs/internals/monotonizer.cc \ + libnurbs/internals/mycode.cc \ + libnurbs/internals/nurbsinterfac.cc \ + libnurbs/internals/nurbstess.cc \ + libnurbs/internals/patch.cc \ + libnurbs/internals/patchlist.cc \ + libnurbs/internals/quilt.cc \ + libnurbs/internals/reader.cc \ + libnurbs/internals/renderhints.cc \ + libnurbs/internals/slicer.cc \ + libnurbs/internals/sorter.cc \ + libnurbs/internals/splitarcs.cc \ + libnurbs/internals/subdivider.cc \ + libnurbs/internals/tobezier.cc \ + libnurbs/internals/trimline.cc \ + libnurbs/internals/trimregion.cc \ + libnurbs/internals/trimvertpool.cc \ + libnurbs/internals/uarray.cc \ + libnurbs/internals/varray.cc \ + libnurbs/nurbtess/directedLine.cc \ + libnurbs/nurbtess/gridWrap.cc \ + libnurbs/nurbtess/monoChain.cc \ + libnurbs/nurbtess/monoPolyPart.cc \ + libnurbs/nurbtess/monoTriangulation.cc \ + libnurbs/nurbtess/partitionX.cc \ + libnurbs/nurbtess/partitionY.cc \ + libnurbs/nurbtess/polyDBG.cc \ + libnurbs/nurbtess/polyUtil.cc \ + libnurbs/nurbtess/primitiveStream.cc \ + libnurbs/nurbtess/quicksort.cc \ + libnurbs/nurbtess/rectBlock.cc \ + libnurbs/nurbtess/sampleComp.cc \ + libnurbs/nurbtess/sampleCompBot.cc \ + libnurbs/nurbtess/sampleCompRight.cc \ + libnurbs/nurbtess/sampleCompTop.cc \ + libnurbs/nurbtess/sampleMonoPoly.cc \ + libnurbs/nurbtess/sampledLine.cc \ + libnurbs/nurbtess/searchTree.cc + +SOURCES = $(C_SOURCES) $(CC_SOURCES) + +C_OBJECTS = $(C_SOURCES:.c=.o) +CC_OBJECTS = $(CC_SOURCES:.cc=.o) +OBJECTS = $(C_OBJECTS) $(CC_OBJECTS) + + +##### RULES ##### + +.c.o: + $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@ + +.cc.o: + $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@ + + +##### TARGETS ##### + +default: + @if [ "${CONFIG_NAME}" = "beos" ] ; then \ + echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \ + exit 0 ; \ + else \ + $(MAKE) "${LIB_DIR}/${GLU_LIB_NAME}" ; \ + fi + +$(LIB_DIR): + -mkdir $(LIB_DIR) + +# Make the library: +$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS) + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \ + -minor $(GLU_MINOR) -patch $(GLU_TINY) \ + -cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \ + $(GLU_LIB_DEPS) $(OBJECTS) + + +clean: + -rm -f *.o */*.o */*/*.o + -rm -f *.lo */*.lo */*/*.lo + -rm -f *.la */*.la */*/*.la Index: xc/extras/Mesa/src/math/m_clip_tmp.h diff -u xc/extras/Mesa/src/math/m_clip_tmp.h:1.2 xc/extras/Mesa/src/math/m_clip_tmp.h:removed --- xc/extras/Mesa/src/math/m_clip_tmp.h:1.2 Mon Dec 16 11:18:35 2002 +++ xc/extras/Mesa/src/math/m_clip_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,228 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.0.3 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -/* KW: a clever asm implementation would nestle integer versions - * of the outcode calculation underneath the division. Gcc won't - * do this, strangely enough, so I only do the divide in - * the case where the cliptest passes. This isn't essential, - * and an asm implementation needn't replicate that behaviour. - */ -static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLfloat *from = (GLfloat *)clip_vec->start; - const GLuint count = clip_vec->count; - GLuint c = 0; - GLfloat (*vProj)[4] = (GLfloat (*)[4])proj_vec->start; - GLubyte tmpAndMask = *andMask; - GLubyte tmpOrMask = *orMask; - GLuint i; - STRIDE_LOOP { - const GLfloat cx = from[0]; - const GLfloat cy = from[1]; - const GLfloat cz = from[2]; - const GLfloat cw = from[3]; -#if defined(macintosh) || defined(__powerpc__) - /* on powerpc cliptest is 17% faster in this way. */ - GLuint mask; - mask = (((cw < cx) << CLIP_RIGHT_SHIFT)); - mask |= (((cw < -cx) << CLIP_LEFT_SHIFT)); - mask |= (((cw < cy) << CLIP_TOP_SHIFT)); - mask |= (((cw < -cy) << CLIP_BOTTOM_SHIFT)); - mask |= (((cw < cz) << CLIP_FAR_SHIFT)); - mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); -#else /* !defined(macintosh)) */ - GLubyte mask = 0; - if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; - if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; - if (-cy + cw < 0) mask |= CLIP_TOP_BIT; - if ( cy + cw < 0) mask |= CLIP_BOTTOM_BIT; - if (-cz + cw < 0) mask |= CLIP_FAR_BIT; - if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; -#endif /* defined(macintosh) */ - - clipMask[i] = mask; - if (mask) { - c++; - tmpAndMask &= mask; - tmpOrMask |= mask; - vProj[i][0] = 0; - vProj[i][1] = 0; - vProj[i][2] = 0; - vProj[i][3] = 1; - } else { - GLfloat oow = 1.0F / cw; - vProj[i][0] = cx * oow; - vProj[i][1] = cy * oow; - vProj[i][2] = cz * oow; - vProj[i][3] = oow; - } - } - - *orMask = tmpOrMask; - *andMask = (GLubyte) (c < count ? 0 : tmpAndMask); - - proj_vec->flags |= VEC_SIZE_4; - proj_vec->size = 4; - proj_vec->count = clip_vec->count; - return proj_vec; -} - - - -static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - GLuint c = 0; - GLubyte tmpAndMask = *andMask; - GLubyte tmpOrMask = *orMask; - GLuint i; - STRIDE_LOOP { - const GLfloat cx = from[0]; - const GLfloat cy = from[1]; - const GLfloat cz = from[2]; - const GLfloat cw = from[3]; -#if defined(macintosh) || defined(__powerpc__) - /* on powerpc cliptest is 17% faster in this way. */ - GLuint mask; - mask = (((cw < cx) << CLIP_RIGHT_SHIFT)); - mask |= (((cw < -cx) << CLIP_LEFT_SHIFT)); - mask |= (((cw < cy) << CLIP_TOP_SHIFT)); - mask |= (((cw < -cy) << CLIP_BOTTOM_SHIFT)); - mask |= (((cw < cz) << CLIP_FAR_SHIFT)); - mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); -#else /* !defined(macintosh)) */ - GLubyte mask = 0; - if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; - if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; - if (-cy + cw < 0) mask |= CLIP_TOP_BIT; - if ( cy + cw < 0) mask |= CLIP_BOTTOM_BIT; - if (-cz + cw < 0) mask |= CLIP_FAR_BIT; - if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; -#endif /* defined(macintosh) */ - - clipMask[i] = mask; - if (mask) { - c++; - tmpAndMask &= mask; - tmpOrMask |= mask; - } - } - - *orMask = tmpOrMask; - *andMask = (GLubyte) (c < count ? 0 : tmpAndMask); - return clip_vec; -} - - -static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - - GLubyte tmpOrMask = *orMask; - GLubyte tmpAndMask = *andMask; - GLuint i; - STRIDE_LOOP { - const GLfloat cx = from[0], cy = from[1], cz = from[2]; - GLubyte mask = 0; - if (cx > 1.0) mask |= CLIP_RIGHT_BIT; - else if (cx < -1.0) mask |= CLIP_LEFT_BIT; - if (cy > 1.0) mask |= CLIP_TOP_BIT; - else if (cy < -1.0) mask |= CLIP_BOTTOM_BIT; - if (cz > 1.0) mask |= CLIP_FAR_BIT; - else if (cz < -1.0) mask |= CLIP_NEAR_BIT; - clipMask[i] = mask; - tmpOrMask |= mask; - tmpAndMask &= mask; - } - - *orMask = tmpOrMask; - *andMask = tmpAndMask; - return clip_vec; -} - - -static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - - GLubyte tmpOrMask = *orMask; - GLubyte tmpAndMask = *andMask; - GLuint i; - STRIDE_LOOP { - const GLfloat cx = from[0], cy = from[1]; - GLubyte mask = 0; - if (cx > 1.0) mask |= CLIP_RIGHT_BIT; - else if (cx < -1.0) mask |= CLIP_LEFT_BIT; - if (cy > 1.0) mask |= CLIP_TOP_BIT; - else if (cy < -1.0) mask |= CLIP_BOTTOM_BIT; - clipMask[i] = mask; - tmpOrMask |= mask; - tmpAndMask &= mask; - } - - *orMask = tmpOrMask; - *andMask = tmpAndMask; - return clip_vec; -} - - -static void TAG(init_c_cliptest)( void ) -{ - _mesa_clip_tab[4] = TAG(cliptest_points4); - _mesa_clip_tab[3] = TAG(cliptest_points3); - _mesa_clip_tab[2] = TAG(cliptest_points2); - - _mesa_clip_np_tab[4] = TAG(cliptest_np_points4); - _mesa_clip_np_tab[3] = TAG(cliptest_points3); - _mesa_clip_np_tab[2] = TAG(cliptest_points2); -} Index: xc/extras/Mesa/src/math/m_copy_tmp.h diff -u xc/extras/Mesa/src/math/m_copy_tmp.h:1.2 xc/extras/Mesa/src/math/m_copy_tmp.h:removed --- xc/extras/Mesa/src/math/m_copy_tmp.h:1.2 Mon Dec 16 11:18:36 2002 +++ xc/extras/Mesa/src/math/m_copy_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,86 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -#define COPY_FUNC( BITS ) \ -static void TAG2(copy, BITS)( GLvector4f *to, const GLvector4f *f ) \ -{ \ - GLfloat (*t)[4] = (GLfloat (*)[4])to->start; \ - GLfloat *from = f->start; \ - GLuint stride = f->stride; \ - GLuint count = f->count; \ - GLuint i; \ - \ - if (BITS) \ - STRIDE_LOOP { \ - if (BITS&1) t[i][0] = from[0]; \ - if (BITS&2) t[i][1] = from[1]; \ - if (BITS&4) t[i][2] = from[2]; \ - if (BITS&8) t[i][3] = from[3]; \ - } \ -} - -/* We got them all here: - */ -COPY_FUNC( 0x0 ) /* noop */ -COPY_FUNC( 0x1 ) -COPY_FUNC( 0x2 ) -COPY_FUNC( 0x3 ) -COPY_FUNC( 0x4 ) -COPY_FUNC( 0x5 ) -COPY_FUNC( 0x6 ) -COPY_FUNC( 0x7 ) -COPY_FUNC( 0x8 ) -COPY_FUNC( 0x9 ) -COPY_FUNC( 0xa ) -COPY_FUNC( 0xb ) -COPY_FUNC( 0xc ) -COPY_FUNC( 0xd ) -COPY_FUNC( 0xe ) -COPY_FUNC( 0xf ) - -static void TAG2(init_copy, 0)( void ) -{ - _mesa_copy_tab[0x0] = TAG2(copy, 0x0); - _mesa_copy_tab[0x1] = TAG2(copy, 0x1); - _mesa_copy_tab[0x2] = TAG2(copy, 0x2); - _mesa_copy_tab[0x3] = TAG2(copy, 0x3); - _mesa_copy_tab[0x4] = TAG2(copy, 0x4); - _mesa_copy_tab[0x5] = TAG2(copy, 0x5); - _mesa_copy_tab[0x6] = TAG2(copy, 0x6); - _mesa_copy_tab[0x7] = TAG2(copy, 0x7); - _mesa_copy_tab[0x8] = TAG2(copy, 0x8); - _mesa_copy_tab[0x9] = TAG2(copy, 0x9); - _mesa_copy_tab[0xa] = TAG2(copy, 0xa); - _mesa_copy_tab[0xb] = TAG2(copy, 0xb); - _mesa_copy_tab[0xc] = TAG2(copy, 0xc); - _mesa_copy_tab[0xd] = TAG2(copy, 0xd); - _mesa_copy_tab[0xe] = TAG2(copy, 0xe); - _mesa_copy_tab[0xf] = TAG2(copy, 0xf); -} Index: xc/extras/Mesa/src/math/m_debug.h diff -u xc/extras/Mesa/src/math/m_debug.h:1.3 xc/extras/Mesa/src/math/m_debug.h:removed --- xc/extras/Mesa/src/math/m_debug.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_debug.h Wed Mar 16 21:00:59 2005 @@ -1,42 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#ifndef __M_DEBUG_H__ -#define __M_DEBUG_H__ - -extern void _math_test_all_transform_functions( char *description ); -extern void _math_test_all_normal_transform_functions( char *description ); -extern void _math_test_all_cliptest_functions( char *description ); - -/* Deprecated? - */ -extern void _math_test_all_vertex_functions( char *description ); - -extern char *mesa_profile; - -#endif Index: xc/extras/Mesa/src/math/m_debug_clip.c diff -u xc/extras/Mesa/src/math/m_debug_clip.c:1.5 xc/extras/Mesa/src/math/m_debug_clip.c:removed --- xc/extras/Mesa/src/math/m_debug_clip.c:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/math/m_debug_clip.c Wed Mar 16 21:00:59 2005 @@ -1,370 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/math/m_debug_clip.c,v 1.5 2003/10/22 15:44:43 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 5.0 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" - -#include "m_matrix.h" -#include "m_xform.h" - -#include "m_debug.h" -#include "m_debug_util.h" - -#ifdef __UNIXOS2__ -static char dummy; -#endif - -#ifdef DEBUG /* This code only used for debugging */ - -static clip_func *clip_tab[2] = { - _mesa_clip_tab, - _mesa_clip_np_tab -}; -static char *cnames[2] = { - "_mesa_clip_tab", - "_mesa_clip_np_tab" -}; -#ifdef RUN_DEBUG_BENCHMARK -static char *cstrings[2] = { - "clip, perspective divide", - "clip, no divide" -}; -#endif - - -/* ============================================================= - * Reference cliptests - */ - -static GLvector4f *ref_cliptest_points4( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - GLuint c = 0; - GLfloat (*vProj)[4] = (GLfloat (*)[4])proj_vec->start; - GLubyte tmpAndMask = *andMask; - GLubyte tmpOrMask = *orMask; - GLuint i; - for ( i = 0 ; i < count ; i++, STRIDE_F(from, stride) ) { - const GLfloat cx = from[0]; - const GLfloat cy = from[1]; - const GLfloat cz = from[2]; - const GLfloat cw = from[3]; - GLubyte mask = 0; - if ( -cx + cw < 0 ) mask |= CLIP_RIGHT_BIT; - if ( cx + cw < 0 ) mask |= CLIP_LEFT_BIT; - if ( -cy + cw < 0 ) mask |= CLIP_TOP_BIT; - if ( cy + cw < 0 ) mask |= CLIP_BOTTOM_BIT; - if ( -cz + cw < 0 ) mask |= CLIP_FAR_BIT; - if ( cz + cw < 0 ) mask |= CLIP_NEAR_BIT; - clipMask[i] = mask; - if ( mask ) { - c++; - tmpAndMask &= mask; - tmpOrMask |= mask; - vProj[i][0] = 0; - vProj[i][1] = 0; - vProj[i][2] = 0; - vProj[i][3] = 1; - } else { - GLfloat oow = 1.0F / cw; - vProj[i][0] = cx * oow; - vProj[i][1] = cy * oow; - vProj[i][2] = cz * oow; - vProj[i][3] = oow; - } - } - - *orMask = tmpOrMask; - *andMask = (GLubyte) (c < count ? 0 : tmpAndMask); - - proj_vec->flags |= VEC_SIZE_4; - proj_vec->size = 4; - proj_vec->count = clip_vec->count; - return proj_vec; -} - -/* Keep these here for now, even though we don't use them... - */ -static GLvector4f *ref_cliptest_points3( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - - GLubyte tmpOrMask = *orMask; - GLubyte tmpAndMask = *andMask; - GLuint i; - for ( i = 0 ; i < count ; i++, STRIDE_F(from, stride) ) { - const GLfloat cx = from[0], cy = from[1], cz = from[2]; - GLubyte mask = 0; - if ( cx > 1.0 ) mask |= CLIP_RIGHT_BIT; - else if ( cx < -1.0 ) mask |= CLIP_LEFT_BIT; - if ( cy > 1.0 ) mask |= CLIP_TOP_BIT; - else if ( cy < -1.0 ) mask |= CLIP_BOTTOM_BIT; - if ( cz > 1.0 ) mask |= CLIP_FAR_BIT; - else if ( cz < -1.0 ) mask |= CLIP_NEAR_BIT; - clipMask[i] = mask; - tmpOrMask |= mask; - tmpAndMask &= mask; - } - - *orMask = tmpOrMask; - *andMask = tmpAndMask; - return clip_vec; -} - -static GLvector4f * ref_cliptest_points2( GLvector4f *clip_vec, - GLvector4f *proj_vec, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ) -{ - const GLuint stride = clip_vec->stride; - const GLuint count = clip_vec->count; - const GLfloat *from = (GLfloat *)clip_vec->start; - - GLubyte tmpOrMask = *orMask; - GLubyte tmpAndMask = *andMask; - GLuint i; - for ( i = 0 ; i < count ; i++, STRIDE_F(from, stride) ) { - const GLfloat cx = from[0], cy = from[1]; - GLubyte mask = 0; - if ( cx > 1.0 ) mask |= CLIP_RIGHT_BIT; - else if ( cx < -1.0 ) mask |= CLIP_LEFT_BIT; - if ( cy > 1.0 ) mask |= CLIP_TOP_BIT; - else if ( cy < -1.0 ) mask |= CLIP_BOTTOM_BIT; - clipMask[i] = mask; - tmpOrMask |= mask; - tmpAndMask &= mask; - } - - *orMask = tmpOrMask; - *andMask = tmpAndMask; - return clip_vec; -} - -static clip_func ref_cliptest[5] = { - 0, - 0, - ref_cliptest_points2, - ref_cliptest_points3, - ref_cliptest_points4 -}; - - -/* ============================================================= - * Cliptest tests - */ - -static GLfloat s[TEST_COUNT][4] ALIGN16; -static GLfloat d[TEST_COUNT][4] ALIGN16; -static GLfloat r[TEST_COUNT][4] ALIGN16; - -static int test_cliptest_function( clip_func func, int np, - int psize, long *cycles ) -{ - GLvector4f source[1], dest[1], ref[1]; - GLubyte dm[TEST_COUNT], dco, dca; - GLubyte rm[TEST_COUNT], rco, rca; - int i, j; -#ifdef RUN_DEBUG_BENCHMARK - int cycle_i; /* the counter for the benchmarks we run */ -#endif - - (void) cycles; - - if ( psize > 4 ) { - _mesa_problem( NULL, "test_cliptest_function called with psize > 4\n" ); - return 0; - } - - for ( i = 0 ; i < TEST_COUNT ; i++) { - ASSIGN_4V( d[i], 0.0, 0.0, 0.0, 1.0 ); - ASSIGN_4V( s[i], 0.0, 0.0, 0.0, 1.0 ); - for ( j = 0 ; j < psize ; j++ ) - s[i][j] = rnd(); - } - - source->data = (GLfloat(*)[4])s; - source->start = (GLfloat *)s; - source->count = TEST_COUNT; - source->stride = sizeof(s[0]); - source->size = 4; - source->flags = 0; - - dest->data = (GLfloat(*)[4])d; - dest->start = (GLfloat *)d; - dest->count = TEST_COUNT; - dest->stride = sizeof(float[4]); - dest->size = 0; - dest->flags = 0; - - ref->data = (GLfloat(*)[4])r; - ref->start = (GLfloat *)r; - ref->count = TEST_COUNT; - ref->stride = sizeof(float[4]); - ref->size = 0; - ref->flags = 0; - - dco = rco = 0; - dca = rca = CLIP_ALL_BITS; - - ref_cliptest[psize]( source, ref, rm, &rco, &rca ); - - if ( mesa_profile ) { - BEGIN_RACE( *cycles ); - func( source, dest, dm, &dco, &dca ); - END_RACE( *cycles ); - } - else { - func( source, dest, dm, &dco, &dca ); - } - - if ( dco != rco ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco ); - return 0; - } - if ( dca != rca ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "dca = 0x%02x rca = 0x%02x\n", dca, rca ); - return 0; - } - for ( i = 0 ; i < TEST_COUNT ; i++ ) { - if ( dm[i] != rm[i] ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "(i = %i)\n", i ); - _mesa_printf( "dm = 0x%02x rm = 0x%02x\n", dm[i], rm[i] ); - return 0; - } - } - - /* Only verify output on projected points4 case. FIXME: Do we need - * to test other cases? - */ - if ( np || psize < 4 ) - return 1; - - for ( i = 0 ; i < TEST_COUNT ; i++ ) { - for ( j = 0 ; j < 4 ; j++ ) { - if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n", - i, j, dm[i], rm[i] ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][0], r[i][0], r[i][0]-d[i][0], - MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][1], r[i][1], r[i][1]-d[i][1], - MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][2], r[i][2], r[i][2]-d[i][2], - MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][3], r[i][3], r[i][3]-d[i][3], - MAX_PRECISION - significand_match( d[i][3], r[i][3] ) ); - return 0; - } - } - } - - return 1; -} - -void _math_test_all_cliptest_functions( char *description ) -{ - int np, psize; - long benchmark_tab[2][4]; - static int first_time = 1; - - if ( first_time ) { - first_time = 0; - mesa_profile = _mesa_getenv( "MESA_PROFILE" ); - } - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - if ( !counter_overhead ) { - INIT_COUNTER(); - _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead ); - } - _mesa_printf( "cliptest results after hooking in %s functions:\n", description ); - } -#endif - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - _mesa_printf( "\n\t" ); - for ( psize = 2 ; psize <= 4 ; psize++ ) { - _mesa_printf( " p%d\t", psize ); - } - _mesa_printf( "\n--------------------------------------------------------\n\t" ); - } -#endif - - for ( np = 0 ; np < 2 ; np++ ) { - for ( psize = 2 ; psize <= 4 ; psize++ ) { - clip_func func = clip_tab[np][psize]; - long *cycles = &(benchmark_tab[np][psize-1]); - - if ( test_cliptest_function( func, np, psize, cycles ) == 0 ) { - char buf[100]; - _mesa_sprintf( buf, "%s[%d] failed test (%s)", - cnames[np], psize, description ); - _mesa_problem( NULL, buf ); - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf( " %li\t", benchmark_tab[np][psize-1] ); -#endif - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf( " | [%s]\n\t", cstrings[np] ); -#endif - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf( "\n" ); -#endif -} - - -#endif /* DEBUG */ Index: xc/extras/Mesa/src/math/m_debug_norm.c diff -u xc/extras/Mesa/src/math/m_debug_norm.c:1.5 xc/extras/Mesa/src/math/m_debug_norm.c:removed --- xc/extras/Mesa/src/math/m_debug_norm.c:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/math/m_debug_norm.c Wed Mar 16 21:00:59 2005 @@ -1,383 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/math/m_debug_norm.c,v 1.5 2003/10/22 15:44:43 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" - -#include "m_matrix.h" -#include "m_xform.h" - -#include "m_debug.h" -#include "m_debug_util.h" - -#ifdef __UNIXOS2__ -static char dummy; -#endif - -#ifdef DEBUG /* This code only used for debugging */ - - -static int m_norm_identity[16] = { - ONE, NIL, NIL, NIL, - NIL, ONE, NIL, NIL, - NIL, NIL, ONE, NIL, - NIL, NIL, NIL, NIL -}; -static int m_norm_general[16] = { - VAR, VAR, VAR, NIL, - VAR, VAR, VAR, NIL, - VAR, VAR, VAR, NIL, - NIL, NIL, NIL, NIL -}; -static int m_norm_no_rot[16] = { - VAR, NIL, NIL, NIL, - NIL, VAR, NIL, NIL, - NIL, NIL, VAR, NIL, - NIL, NIL, NIL, NIL -}; -static int *norm_templates[8] = { - m_norm_no_rot, - m_norm_no_rot, - m_norm_no_rot, - m_norm_general, - m_norm_general, - m_norm_general, - m_norm_identity, - m_norm_identity -}; -static int norm_types[8] = { - NORM_TRANSFORM_NO_ROT, - NORM_TRANSFORM_NO_ROT | NORM_RESCALE, - NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE, - NORM_TRANSFORM, - NORM_TRANSFORM | NORM_RESCALE, - NORM_TRANSFORM | NORM_NORMALIZE, - NORM_RESCALE, - NORM_NORMALIZE -}; -static int norm_scale_types[8] = { /* rescale factor */ - NIL, /* NIL disables rescaling */ - VAR, - NIL, - NIL, - VAR, - NIL, - VAR, - NIL -}; -static int norm_normalize_types[8] = { /* normalizing ?? (no = 0) */ - 0, - 0, - 1, - 0, - 0, - 1, - 0, - 1 -}; -static char *norm_strings[8] = { - "NORM_TRANSFORM_NO_ROT", - "NORM_TRANSFORM_NO_ROT | NORM_RESCALE", - "NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE", - "NORM_TRANSFORM", - "NORM_TRANSFORM | NORM_RESCALE", - "NORM_TRANSFORM | NORM_NORMALIZE", - "NORM_RESCALE", - "NORM_NORMALIZE" -}; - - -/* ============================================================= - * Reference transformations - */ - -static void ref_norm_transform_rescale( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLuint i; - const GLfloat *s = in->start; - const GLfloat *m = mat->inv; - GLfloat (*out)[4] = (GLfloat (*)[4]) dest->start; - - (void) lengths; - - for ( i = 0 ; i < in->count ; i++ ) { - GLfloat t[3]; - - TRANSFORM_NORMAL( t, s, m ); - SCALE_SCALAR_3V( out[i], scale, t ); - - s = (GLfloat *)((char *)s + in->stride); - } -} - -static void ref_norm_transform_normalize( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLuint i; - const GLfloat *s = in->start; - const GLfloat *m = mat->inv; - GLfloat (*out)[4] = (GLfloat (*)[4]) dest->start; - - for ( i = 0 ; i < in->count ; i++ ) { - GLfloat t[3]; - - TRANSFORM_NORMAL( t, s, m ); - - if ( !lengths ) { - GLfloat len = LEN_SQUARED_3FV( t ); - if ( len > 1e-20 ) { - /* Hmmm, don't know how we could test the precalculated - * length case... - */ - scale = 1.0 / sqrt( len ); - SCALE_SCALAR_3V( out[i], scale, t ); - } else { - out[i][0] = out[i][1] = out[i][2] = 0; - } - } else { - scale = lengths[i];; - SCALE_SCALAR_3V( out[i], scale, t ); - } - - s = (GLfloat *)((char *)s + in->stride); - } -} - - -/* ============================================================= - * Normal transformation tests - */ - -static void init_matrix( GLfloat *m ) -{ - m[0] = 63.0; m[4] = 43.0; m[ 8] = 29.0; m[12] = 43.0; - m[1] = 55.0; m[5] = 17.0; m[ 9] = 31.0; m[13] = 7.0; - m[2] = 44.0; m[6] = 9.0; m[10] = 7.0; m[14] = 3.0; - m[3] = 11.0; m[7] = 23.0; m[11] = 91.0; m[15] = 9.0; -} - - -static int test_norm_function( normal_func func, int mtype, long *cycles ) -{ - GLvector4f source[1], dest[1], dest2[1], ref[1], ref2[1]; - GLmatrix mat[1]; - GLfloat s[TEST_COUNT][5], d[TEST_COUNT][4], r[TEST_COUNT][4]; - GLfloat d2[TEST_COUNT][4], r2[TEST_COUNT][4], length[TEST_COUNT]; - GLfloat scale; - GLfloat *m; - int i, j; -#ifdef RUN_DEBUG_BENCHMARK - int cycle_i; /* the counter for the benchmarks we run */ -#endif - - (void) cycles; - - mat->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); - mat->inv = m = mat->m; - - init_matrix( m ); - - scale = 1.0F + rnd () * norm_scale_types[mtype]; - - for ( i = 0 ; i < 4 ; i++ ) { - for ( j = 0 ; j < 4 ; j++ ) { - switch ( norm_templates[mtype][i * 4 + j] ) { - case NIL: - m[j * 4 + i] = 0.0; - break; - case ONE: - m[j * 4 + i] = 1.0; - break; - case NEG: - m[j * 4 + i] = -1.0; - break; - case VAR: - break; - default: - abort(); - } - } - } - - for ( i = 0 ; i < TEST_COUNT ; i++ ) { - ASSIGN_3V( d[i], 0.0, 0.0, 0.0 ); - ASSIGN_3V( s[i], 0.0, 0.0, 0.0 ); - ASSIGN_3V( d2[i], 0.0, 0.0, 0.0 ); - for ( j = 0 ; j < 3 ; j++ ) - s[i][j] = rnd(); - length[i] = 1 / sqrt( LEN_SQUARED_3FV( s[i] ) ); - } - - source->data = (GLfloat(*)[4]) s; - source->start = (GLfloat *) s; - source->count = TEST_COUNT; - source->stride = sizeof(s[0]); - source->flags = 0; - - dest->data = d; - dest->start = (GLfloat *) d; - dest->count = TEST_COUNT; - dest->stride = sizeof(float[4]); - dest->flags = 0; - - dest2->data = d2; - dest2->start = (GLfloat *) d2; - dest2->count = TEST_COUNT; - dest2->stride = sizeof(float[4]); - dest2->flags = 0; - - ref->data = r; - ref->start = (GLfloat *) r; - ref->count = TEST_COUNT; - ref->stride = sizeof(float[4]); - ref->flags = 0; - - ref2->data = r2; - ref2->start = (GLfloat *) r2; - ref2->count = TEST_COUNT; - ref2->stride = sizeof(float[4]); - ref2->flags = 0; - - if ( norm_normalize_types[mtype] == 0 ) { - ref_norm_transform_rescale( mat, scale, source, NULL, ref ); - } else { - ref_norm_transform_normalize( mat, scale, source, NULL, ref ); - ref_norm_transform_normalize( mat, scale, source, length, ref2 ); - } - - if ( mesa_profile ) { - BEGIN_RACE( *cycles ); - func( mat, scale, source, NULL, dest ); - END_RACE( *cycles ); - func( mat, scale, source, length, dest2 ); - } else { - func( mat, scale, source, NULL, dest ); - func( mat, scale, source, length, dest2 ); - } - - for ( i = 0 ; i < TEST_COUNT ; i++ ) { - for ( j = 0 ; j < 3 ; j++ ) { - if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "-----------------------------\n" ); - _mesa_printf( "(i = %i, j = %i)\n", i, j ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d[i][0], r[i][0], r[i][0]/d[i][0], - MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d[i][1], r[i][1], r[i][1]/d[i][1], - MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d[i][2], r[i][2], r[i][2]/d[i][2], - MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); - return 0; - } - - if ( norm_normalize_types[mtype] != 0 ) { - if ( significand_match( d2[i][j], r2[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "------------------- precalculated length case ------\n" ); - _mesa_printf( "(i = %i, j = %i)\n", i, j ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d2[i][0], r2[i][0], r2[i][0]/d2[i][0], - MAX_PRECISION - significand_match( d2[i][0], r2[i][0] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d2[i][1], r2[i][1], r2[i][1]/d2[i][1], - MAX_PRECISION - significand_match( d2[i][1], r2[i][1] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", - d2[i][2], r2[i][2], r2[i][2]/d2[i][2], - MAX_PRECISION - significand_match( d2[i][2], r2[i][2] ) ); - return 0; - } - } - } - } - - ALIGN_FREE( mat->m ); - return 1; -} - -void _math_test_all_normal_transform_functions( char *description ) -{ - int mtype; - long benchmark_tab[0xf]; - static int first_time = 1; - - if ( first_time ) { - first_time = 0; - mesa_profile = getenv( "MESA_PROFILE" ); - } - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - if ( !counter_overhead ) { - INIT_COUNTER(); - _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead ); - } - _mesa_printf( "normal transform results after hooking in %s functions:\n", - description ); - _mesa_printf( "\n-------------------------------------------------------\n" ); - } -#endif - - for ( mtype = 0 ; mtype < 8 ; mtype++ ) { - normal_func func = _mesa_normal_tab[norm_types[mtype]]; - long *cycles = &benchmark_tab[mtype]; - - if ( test_norm_function( func, mtype, cycles ) == 0 ) { - char buf[100]; - _mesa_sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)", - norm_strings[mtype], description ); - _mesa_problem( NULL, buf ); - } - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - _mesa_printf( " %li\t", benchmark_tab[mtype] ); - _mesa_printf( " | [%s]\n", norm_strings[mtype] ); - } -#endif - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - _mesa_printf( "\n" ); - fflush( stdout ); - } -#endif -} - - -#endif /* DEBUG */ Index: xc/extras/Mesa/src/math/m_debug_util.h diff -u xc/extras/Mesa/src/math/m_debug_util.h:1.3 xc/extras/Mesa/src/math/m_debug_util.h:removed --- xc/extras/Mesa/src/math/m_debug_util.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_debug_util.h Wed Mar 16 21:00:59 2005 @@ -1,279 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Gareth Hughes - */ - -#ifndef __M_DEBUG_UTIL_H__ -#define __M_DEBUG_UTIL_H__ - - -#ifdef DEBUG /* This code only used for debugging */ - - -/* Comment this out to deactivate the cycle counter. - * NOTE: it works only on CPUs which know the 'rdtsc' command (586 or higher) - * (hope, you don't try to debug Mesa on a 386 ;) - */ -#if defined(__GNUC__) && \ - ((defined(__i386__) && defined(USE_X86_ASM)) || \ - (defined(__sparc__) && defined(USE_SPARC_ASM))) -#define RUN_DEBUG_BENCHMARK -#endif - -#define TEST_COUNT 128 /* size of the tested vector array */ - -#define REQUIRED_PRECISION 10 /* allow 4 bits to miss */ -#define MAX_PRECISION 24 /* max. precision possible */ - - -#ifdef RUN_DEBUG_BENCHMARK -/* Overhead of profiling counter in cycles. Automatically adjusted to - * your machine at run time - counter initialization should give very - * consistent results. - */ -extern long counter_overhead; - -/* This is the value of the environment variable MESA_PROFILE, and is - * used to determine if we should benchmark the functions as well as - * verify their correctness. - */ -extern char *mesa_profile; - -/* Modify the the number of tests if you like. - * We take the minimum of all results, because every error should be - * positive (time used by other processes, task switches etc). - * It is assumed that all calculations are done in the cache. - */ - -#if defined(__i386__) - -#if 1 /* PPro, PII, PIII version */ - -/* Profiling on the P6 architecture requires a little more work, due to - * the internal out-of-order execution. We must perform a serializing - * 'cpuid' instruction before and after the 'rdtsc' instructions to make - * sure no other uops are executed when we sample the timestamp counter. - */ -#define INIT_COUNTER() \ - do { \ - int cycle_i; \ - counter_overhead = LONG_MAX; \ - for ( cycle_i = 0 ; cycle_i < 8 ; cycle_i++ ) { \ - long cycle_tmp1 = 0, cycle_tmp2 = 0; \ - __asm__ __volatile__ ( "push %%ebx \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "rdtsc \n" \ - "mov %%eax, %0 \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "pop %%ebx \n" \ - "push %%ebx \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "rdtsc \n" \ - "mov %%eax, %1 \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "pop %%ebx \n" \ - : "=m" (cycle_tmp1), "=m" (cycle_tmp2) \ - : : "eax", "ecx", "edx" ); \ - if ( counter_overhead > (cycle_tmp2 - cycle_tmp1) ) { \ - counter_overhead = cycle_tmp2 - cycle_tmp1; \ - } \ - } \ - } while (0) - -#define BEGIN_RACE(x) \ - x = LONG_MAX; \ - for ( cycle_i = 0 ; cycle_i < 10 ; cycle_i++ ) { \ - long cycle_tmp1 = 0, cycle_tmp2 = 0; \ - __asm__ __volatile__ ( "push %%ebx \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "rdtsc \n" \ - "mov %%eax, %0 \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "pop %%ebx \n" \ - : "=m" (cycle_tmp1) \ - : : "eax", "ecx", "edx" ); - -#define END_RACE(x) \ - __asm__ __volatile__ ( "push %%ebx \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "rdtsc \n" \ - "mov %%eax, %0 \n" \ - "xor %%eax, %%eax \n" \ - "cpuid \n" \ - "pop %%ebx \n" \ - : "=m" (cycle_tmp2) \ - : : "eax", "ecx", "edx" ); \ - if ( x > (cycle_tmp2 - cycle_tmp1) ) { \ - x = cycle_tmp2 - cycle_tmp1; \ - } \ - } \ - x -= counter_overhead; - -#else /* PPlain, PMMX version */ - -/* To ensure accurate results, we stall the pipelines with the - * non-pairable 'cdq' instruction. This ensures all the code being - * profiled is complete when the 'rdtsc' instruction executes. - */ -#define INIT_COUNTER(x) \ - do { \ - int cycle_i; \ - x = LONG_MAX; \ - for ( cycle_i = 0 ; cycle_i < 32 ; cycle_i++ ) { \ - long cycle_tmp1, cycle_tmp2, dummy; \ - __asm__ ( "mov %%eax, %0" : "=a" (cycle_tmp1) ); \ - __asm__ ( "mov %%eax, %0" : "=a" (cycle_tmp2) ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "rdtsc" : "=a" (cycle_tmp1), "=d" (dummy) ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "rdtsc" : "=a" (cycle_tmp2), "=d" (dummy) ); \ - if ( x > (cycle_tmp2 - cycle_tmp1) ) \ - x = cycle_tmp2 - cycle_tmp1; \ - } \ - } while (0) - -#define BEGIN_RACE(x) \ - x = LONG_MAX; \ - for ( cycle_i = 0 ; cycle_i < 16 ; cycle_i++ ) { \ - long cycle_tmp1, cycle_tmp2, dummy; \ - __asm__ ( "mov %%eax, %0" : "=a" (cycle_tmp1) ); \ - __asm__ ( "mov %%eax, %0" : "=a" (cycle_tmp2) ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "rdtsc" : "=a" (cycle_tmp1), "=d" (dummy) ); - - -#define END_RACE(x) \ - __asm__ ( "cdq" ); \ - __asm__ ( "cdq" ); \ - __asm__ ( "rdtsc" : "=a" (cycle_tmp2), "=d" (dummy) ); \ - if ( x > (cycle_tmp2 - cycle_tmp1) ) \ - x = cycle_tmp2 - cycle_tmp1; \ - } \ - x -= counter_overhead; - -#endif - -#elif defined(__sparc__) - -#define INIT_COUNTER() \ - do { counter_overhead = 5; } while(0) - -#define BEGIN_RACE(x) \ -x = LONG_MAX; \ -for (cycle_i = 0; cycle_i <10; cycle_i++) { \ - register long cycle_tmp1 asm("l0"); \ - register long cycle_tmp2 asm("l1"); \ - /* rd %tick, %l0 */ \ - __asm__ __volatile__ (".word 0xa1410000" : "=r" (cycle_tmp1)); /* save timestamp */ - -#define END_RACE(x) \ - /* rd %tick, %l1 */ \ - __asm__ __volatile__ (".word 0xa3410000" : "=r" (cycle_tmp2)); \ - if (x > (cycle_tmp2-cycle_tmp1)) x = cycle_tmp2 - cycle_tmp1; \ -} \ -x -= counter_overhead; - -#else -#error Your processor is not supported for RUN_XFORM_BENCHMARK -#endif - -#else - -#define BEGIN_RACE(x) -#define END_RACE(x) - -#endif - - -/* ============================================================= - * Helper functions - */ - -static GLfloat rnd( void ) -{ - GLfloat f = (GLfloat)rand() / (GLfloat)RAND_MAX; - GLfloat gran = (GLfloat)(1 << 13); - - f = (GLfloat)(GLint)(f * gran) / gran; - - return f * 2.0 - 1.0; -} - -static int significand_match( GLfloat a, GLfloat b ) -{ - GLfloat d = a - b; - int a_ex, b_ex, d_ex; - - if ( d == 0.0F ) { - return MAX_PRECISION; /* Exact match */ - } - - if ( a == 0.0F || b == 0.0F ) { - /* It would probably be better to check if the - * non-zero number is denormalized and return - * the index of the highest set bit here. - */ - return 0; - } - - frexp( a, &a_ex ); - frexp( b, &b_ex ); - frexp( d, &d_ex ); - - if ( a_ex < b_ex ) { - return a_ex - d_ex; - } else { - return b_ex - d_ex; - } -} - -enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 }; - -/* Ensure our arrays are correctly aligned. - */ -#if defined(__GNUC__) -# define ALIGN16 __attribute__ ((aligned (16))) -#elif defined(__MSC__) -# define ALIGN16 __declspec(align(16)) /* GH: Does this work? */ -#else -# warning "ALIGN16 will not 16-byte align!\n" -# define ALIGN16 -#endif - - -#endif /* DEBUG */ - -#endif /* __M_DEBUG_UTIL_H__ */ Index: xc/extras/Mesa/src/math/m_debug_xform.c diff -u xc/extras/Mesa/src/math/m_debug_xform.c:1.5 xc/extras/Mesa/src/math/m_debug_xform.c:removed --- xc/extras/Mesa/src/math/m_debug_xform.c:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/math/m_debug_xform.c Wed Mar 16 21:00:59 2005 @@ -1,338 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/math/m_debug_xform.c,v 1.5 2003/10/22 15:44:43 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Updated for P6 architecture by Gareth Hughes. - */ - -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" - -#include "m_matrix.h" -#include "m_xform.h" - -#include "m_debug.h" -#include "m_debug_util.h" - -#ifdef __UNIXOS2__ -static char dummy; -#endif - -#ifdef DEBUG /* This code only used for debugging */ - - -/* Overhead of profiling counter in cycles. Automatically adjusted to - * your machine at run time - counter initialization should give very - * consistent results. - */ -long counter_overhead = 0; - -/* This is the value of the environment variable MESA_PROFILE, and is - * used to determine if we should benchmark the functions as well as - * verify their correctness. - */ -char *mesa_profile = NULL; - - -static int m_general[16] = { - VAR, VAR, VAR, VAR, - VAR, VAR, VAR, VAR, - VAR, VAR, VAR, VAR, - VAR, VAR, VAR, VAR -}; -static int m_identity[16] = { - ONE, NIL, NIL, NIL, - NIL, ONE, NIL, NIL, - NIL, NIL, ONE, NIL, - NIL, NIL, NIL, ONE -}; -static int m_2d[16] = { - VAR, VAR, NIL, VAR, - VAR, VAR, NIL, VAR, - NIL, NIL, ONE, NIL, - NIL, NIL, NIL, ONE -}; -static int m_2d_no_rot[16] = { - VAR, NIL, NIL, VAR, - NIL, VAR, NIL, VAR, - NIL, NIL, ONE, NIL, - NIL, NIL, NIL, ONE -}; -static int m_3d[16] = { - VAR, VAR, VAR, VAR, - VAR, VAR, VAR, VAR, - VAR, VAR, VAR, VAR, - NIL, NIL, NIL, ONE -}; -static int m_3d_no_rot[16] = { - VAR, NIL, NIL, VAR, - NIL, VAR, NIL, VAR, - NIL, NIL, VAR, VAR, - NIL, NIL, NIL, ONE -}; -static int m_perspective[16] = { - VAR, NIL, VAR, NIL, - NIL, VAR, VAR, NIL, - NIL, NIL, VAR, VAR, - NIL, NIL, NEG, NIL -}; -static int *templates[7] = { - m_general, - m_identity, - m_3d_no_rot, - m_perspective, - m_2d, - m_2d_no_rot, - m_3d -}; -static int mtypes[7] = { - MATRIX_GENERAL, - MATRIX_IDENTITY, - MATRIX_3D_NO_ROT, - MATRIX_PERSPECTIVE, - MATRIX_2D, - MATRIX_2D_NO_ROT, - MATRIX_3D -}; -static char *mstrings[7] = { - "MATRIX_GENERAL", - "MATRIX_IDENTITY", - "MATRIX_3D_NO_ROT", - "MATRIX_PERSPECTIVE", - "MATRIX_2D", - "MATRIX_2D_NO_ROT", - "MATRIX_3D" -}; - - -/* ============================================================= - * Reference transformations - */ - -static void ref_transform( GLvector4f *dst, - const GLmatrix *mat, - const GLvector4f *src ) -{ - GLuint i; - GLfloat *s = (GLfloat *)src->start; - GLfloat (*d)[4] = (GLfloat (*)[4])dst->start; - const GLfloat *m = mat->m; - - for ( i = 0 ; i < src->count ; i++ ) { - TRANSFORM_POINT( d[i], m, s ); - s = (GLfloat *)((char *)s + src->stride); - } -} - - -/* ============================================================= - * Vertex transformation tests - */ - -static void init_matrix( GLfloat *m ) -{ - m[0] = 63.0; m[4] = 43.0; m[ 8] = 29.0; m[12] = 43.0; - m[1] = 55.0; m[5] = 17.0; m[ 9] = 31.0; m[13] = 7.0; - m[2] = 44.0; m[6] = 9.0; m[10] = 7.0; m[14] = 3.0; - m[3] = 11.0; m[7] = 23.0; m[11] = 91.0; m[15] = 9.0; -} - -static GLfloat s[TEST_COUNT][4] ALIGN16; -static GLfloat d[TEST_COUNT][4] ALIGN16; -static GLfloat r[TEST_COUNT][4] ALIGN16; - -static int test_transform_function( transform_func func, int psize, - int mtype, long *cycles ) -{ - GLvector4f source[1], dest[1], ref[1]; - GLmatrix mat[1]; - GLfloat *m; - int i, j; -#ifdef RUN_DEBUG_BENCHMARK - int cycle_i; /* the counter for the benchmarks we run */ -#endif - - (void) cycles; - - if ( psize > 4 ) { - _mesa_problem( NULL, "test_transform_function called with psize > 4\n" ); - return 0; - } - - mat->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); - mat->type = mtypes[mtype]; - - m = mat->m; - ASSERT( ((GLuint)m & 15) == 0 ); - - init_matrix( m ); - - for ( i = 0 ; i < 4 ; i++ ) { - for ( j = 0 ; j < 4 ; j++ ) { - switch ( templates[mtype][i * 4 + j] ) { - case NIL: - m[j * 4 + i] = 0.0; - break; - case ONE: - m[j * 4 + i] = 1.0; - break; - case NEG: - m[j * 4 + i] = -1.0; - break; - case VAR: - break; - default: - abort(); - } - } - } - - for ( i = 0 ; i < TEST_COUNT ; i++) { - ASSIGN_4V( d[i], 0.0, 0.0, 0.0, 1.0 ); - ASSIGN_4V( s[i], 0.0, 0.0, 0.0, 1.0 ); - for ( j = 0 ; j < psize ; j++ ) - s[i][j] = rnd(); - } - - source->data = (GLfloat(*)[4])s; - source->start = (GLfloat *)s; - source->count = TEST_COUNT; - source->stride = sizeof(s[0]); - source->size = 4; - source->flags = 0; - - dest->data = (GLfloat(*)[4])d; - dest->start = (GLfloat *)d; - dest->count = TEST_COUNT; - dest->stride = sizeof(float[4]); - dest->size = 0; - dest->flags = 0; - - ref->data = (GLfloat(*)[4])r; - ref->start = (GLfloat *)r; - ref->count = TEST_COUNT; - ref->stride = sizeof(float[4]); - ref->size = 0; - ref->flags = 0; - - ref_transform( ref, mat, source ); - - if ( mesa_profile ) { - BEGIN_RACE( *cycles ); - func( dest, mat->m, source ); - END_RACE( *cycles ); - } - else { - func( dest, mat->m, source ); - } - - for ( i = 0 ; i < TEST_COUNT ; i++ ) { - for ( j = 0 ; j < 4 ; j++ ) { - if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf("-----------------------------\n" ); - _mesa_printf("(i = %i, j = %i)\n", i, j ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][0], r[i][0], r[i][0]-d[i][0], - MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][1], r[i][1], r[i][1]-d[i][1], - MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][2], r[i][2], r[i][2]-d[i][2], - MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", - d[i][3], r[i][3], r[i][3]-d[i][3], - MAX_PRECISION - significand_match( d[i][3], r[i][3] ) ); - return 0; - } - } - } - - ALIGN_FREE( mat->m ); - return 1; -} - -void _math_test_all_transform_functions( char *description ) -{ - int psize, mtype; - long benchmark_tab[4][7]; - static int first_time = 1; - - if ( first_time ) { - first_time = 0; - mesa_profile = getenv( "MESA_PROFILE" ); - } - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - if ( !counter_overhead ) { - INIT_COUNTER(); - _mesa_printf("counter overhead: %ld cycles\n\n", counter_overhead ); - } - _mesa_printf("transform results after hooking in %s functions:\n", description ); - } -#endif - -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) { - _mesa_printf("\n" ); - for ( psize = 1 ; psize <= 4 ; psize++ ) { - _mesa_printf(" p%d\t", psize ); - } - _mesa_printf("\n--------------------------------------------------------\n" ); - } -#endif - - for ( mtype = 0 ; mtype < 7 ; mtype++ ) { - for ( psize = 1 ; psize <= 4 ; psize++ ) { - transform_func func = _mesa_transform_tab[psize][mtypes[mtype]]; - long *cycles = &(benchmark_tab[psize-1][mtype]); - - if ( test_transform_function( func, psize, mtype, cycles ) == 0 ) { - char buf[100]; - _mesa_sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)", - psize, mstrings[mtype], description ); - _mesa_problem( NULL, buf ); - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf(" %li\t", benchmark_tab[psize-1][mtype] ); -#endif - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf(" | [%s]\n", mstrings[mtype] ); -#endif - } -#ifdef RUN_DEBUG_BENCHMARK - if ( mesa_profile ) - _mesa_printf( "\n" ); -#endif -} - - -#endif /* DEBUG */ Index: xc/extras/Mesa/src/math/m_dotprod_tmp.h diff -u xc/extras/Mesa/src/math/m_dotprod_tmp.h:1.2 xc/extras/Mesa/src/math/m_dotprod_tmp.h:removed --- xc/extras/Mesa/src/math/m_dotprod_tmp.h:1.2 Mon Dec 16 11:18:36 2002 +++ xc/extras/Mesa/src/math/m_dotprod_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,102 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -/* Note - respects the stride of the output vector. - */ -static void TAG(dotprod_vec2)( GLfloat *out, - GLuint outstride, - const GLvector4f *coord_vec, - const GLfloat plane[4] ) -{ - GLuint stride = coord_vec->stride; - GLfloat *coord = coord_vec->start; - GLuint count = coord_vec->count; - - GLuint i; - - const GLfloat plane0 = plane[0], plane1 = plane[1], plane3 = plane[3]; - - for (i=0;istride; - GLfloat *coord = coord_vec->start; - GLuint count = coord_vec->count; - - GLuint i; - - const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2]; - const GLfloat plane3 = plane[3]; - - for (i=0;istride; - GLfloat *coord = coord_vec->start; - GLuint count = coord_vec->count; - GLuint i; - - const GLfloat plane0 = plane[0], plane1 = plane[1], plane2 = plane[2]; - const GLfloat plane3 = plane[3]; - - for (i=0;i= 2) { - bincoeff = (GLfloat) (order - 1); - s = 1.0F - t; - - for (k = 0; k < dim; k++) - out[k] = s * cp[k] + bincoeff * t * cp[dim + k]; - - for (i = 2, cp += 2 * dim, powert = t * t; i < order; - i++, powert *= t, cp += dim) { - bincoeff *= (GLfloat) (order - i); - bincoeff *= inv_tab[i]; - - for (k = 0; k < dim; k++) - out[k] = s * out[k] + bincoeff * powert * cp[k]; - } - } - else { /* order=1 -> constant curve */ - - for (k = 0; k < dim; k++) - out[k] = cp[k]; - } -} - -/* - * Tensor product Bezier surfaces - * - * Again the Horner scheme is used to compute a point on a - * TP Bezier surface. First a control polygon for a curve - * on the surface in one parameter direction is computed, - * then the point on the curve for the other parameter - * direction is evaluated. - * - * To store the curve control polygon additional storage - * for max(uorder,vorder) points is needed in the - * control net cn. - */ - -void -_math_horner_bezier_surf(GLfloat * cn, GLfloat * out, GLfloat u, GLfloat v, - GLuint dim, GLuint uorder, GLuint vorder) -{ - GLfloat *cp = cn + uorder * vorder * dim; - GLuint i, uinc = vorder * dim; - - if (vorder > uorder) { - if (uorder >= 2) { - GLfloat s, poweru, bincoeff; - GLuint j, k; - - /* Compute the control polygon for the surface-curve in u-direction */ - for (j = 0; j < vorder; j++) { - GLfloat *ucp = &cn[j * dim]; - - /* Each control point is the point for parameter u on a */ - /* curve defined by the control polygons in u-direction */ - bincoeff = (GLfloat) (uorder - 1); - s = 1.0F - u; - - for (k = 0; k < dim; k++) - cp[j * dim + k] = s * ucp[k] + bincoeff * u * ucp[uinc + k]; - - for (i = 2, ucp += 2 * uinc, poweru = u * u; i < uorder; - i++, poweru *= u, ucp += uinc) { - bincoeff *= (GLfloat) (uorder - i); - bincoeff *= inv_tab[i]; - - for (k = 0; k < dim; k++) - cp[j * dim + k] = - s * cp[j * dim + k] + bincoeff * poweru * ucp[k]; - } - } - - /* Evaluate curve point in v */ - _math_horner_bezier_curve(cp, out, v, dim, vorder); - } - else /* uorder=1 -> cn defines a curve in v */ - _math_horner_bezier_curve(cn, out, v, dim, vorder); - } - else { /* vorder <= uorder */ - - if (vorder > 1) { - GLuint i; - - /* Compute the control polygon for the surface-curve in u-direction */ - for (i = 0; i < uorder; i++, cn += uinc) { - /* For constant i all cn[i][j] (j=0..vorder) are located */ - /* on consecutive memory locations, so we can use */ - /* horner_bezier_curve to compute the control points */ - - _math_horner_bezier_curve(cn, &cp[i * dim], v, dim, vorder); - } - - /* Evaluate curve point in u */ - _math_horner_bezier_curve(cp, out, u, dim, uorder); - } - else /* vorder=1 -> cn defines a curve in u */ - _math_horner_bezier_curve(cn, out, u, dim, uorder); - } -} - -/* - * The direct de Casteljau algorithm is used when a point on the - * surface and the tangent directions spanning the tangent plane - * should be computed (this is needed to compute normals to the - * surface). In this case the de Casteljau algorithm approach is - * nicer because a point and the partial derivatives can be computed - * at the same time. To get the correct tangent length du and dv - * must be multiplied with the (u2-u1)/uorder-1 and (v2-v1)/vorder-1. - * Since only the directions are needed, this scaling step is omitted. - * - * De Casteljau needs additional storage for uorder*vorder - * values in the control net cn. - */ - -void -_math_de_casteljau_surf(GLfloat * cn, GLfloat * out, GLfloat * du, - GLfloat * dv, GLfloat u, GLfloat v, GLuint dim, - GLuint uorder, GLuint vorder) -{ - GLfloat *dcn = cn + uorder * vorder * dim; - GLfloat us = 1.0F - u, vs = 1.0F - v; - GLuint h, i, j, k; - GLuint minorder = uorder < vorder ? uorder : vorder; - GLuint uinc = vorder * dim; - GLuint dcuinc = vorder; - - /* Each component is evaluated separately to save buffer space */ - /* This does not drasticaly decrease the performance of the */ - /* algorithm. If additional storage for (uorder-1)*(vorder-1) */ - /* points would be available, the components could be accessed */ - /* in the innermost loop which could lead to less cache misses. */ - -#define CN(I,J,K) cn[(I)*uinc+(J)*dim+(K)] -#define DCN(I, J) dcn[(I)*dcuinc+(J)] - if (minorder < 3) { - if (uorder == vorder) { - for (k = 0; k < dim; k++) { - /* Derivative direction in u */ - du[k] = vs * (CN(1, 0, k) - CN(0, 0, k)) + - v * (CN(1, 1, k) - CN(0, 1, k)); - - /* Derivative direction in v */ - dv[k] = us * (CN(0, 1, k) - CN(0, 0, k)) + - u * (CN(1, 1, k) - CN(1, 0, k)); - - /* bilinear de Casteljau step */ - out[k] = us * (vs * CN(0, 0, k) + v * CN(0, 1, k)) + - u * (vs * CN(1, 0, k) + v * CN(1, 1, k)); - } - } - else if (minorder == uorder) { - for (k = 0; k < dim; k++) { - /* bilinear de Casteljau step */ - DCN(1, 0) = CN(1, 0, k) - CN(0, 0, k); - DCN(0, 0) = us * CN(0, 0, k) + u * CN(1, 0, k); - - for (j = 0; j < vorder - 1; j++) { - /* for the derivative in u */ - DCN(1, j + 1) = CN(1, j + 1, k) - CN(0, j + 1, k); - DCN(1, j) = vs * DCN(1, j) + v * DCN(1, j + 1); - - /* for the `point' */ - DCN(0, j + 1) = us * CN(0, j + 1, k) + u * CN(1, j + 1, k); - DCN(0, j) = vs * DCN(0, j) + v * DCN(0, j + 1); - } - - /* remaining linear de Casteljau steps until the second last step */ - for (h = minorder; h < vorder - 1; h++) - for (j = 0; j < vorder - h; j++) { - /* for the derivative in u */ - DCN(1, j) = vs * DCN(1, j) + v * DCN(1, j + 1); - - /* for the `point' */ - DCN(0, j) = vs * DCN(0, j) + v * DCN(0, j + 1); - } - - /* derivative direction in v */ - dv[k] = DCN(0, 1) - DCN(0, 0); - - /* derivative direction in u */ - du[k] = vs * DCN(1, 0) + v * DCN(1, 1); - - /* last linear de Casteljau step */ - out[k] = vs * DCN(0, 0) + v * DCN(0, 1); - } - } - else { /* minorder == vorder */ - - for (k = 0; k < dim; k++) { - /* bilinear de Casteljau step */ - DCN(0, 1) = CN(0, 1, k) - CN(0, 0, k); - DCN(0, 0) = vs * CN(0, 0, k) + v * CN(0, 1, k); - for (i = 0; i < uorder - 1; i++) { - /* for the derivative in v */ - DCN(i + 1, 1) = CN(i + 1, 1, k) - CN(i + 1, 0, k); - DCN(i, 1) = us * DCN(i, 1) + u * DCN(i + 1, 1); - - /* for the `point' */ - DCN(i + 1, 0) = vs * CN(i + 1, 0, k) + v * CN(i + 1, 1, k); - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - } - - /* remaining linear de Casteljau steps until the second last step */ - for (h = minorder; h < uorder - 1; h++) - for (i = 0; i < uorder - h; i++) { - /* for the derivative in v */ - DCN(i, 1) = us * DCN(i, 1) + u * DCN(i + 1, 1); - - /* for the `point' */ - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - } - - /* derivative direction in u */ - du[k] = DCN(1, 0) - DCN(0, 0); - - /* derivative direction in v */ - dv[k] = us * DCN(0, 1) + u * DCN(1, 1); - - /* last linear de Casteljau step */ - out[k] = us * DCN(0, 0) + u * DCN(1, 0); - } - } - } - else if (uorder == vorder) { - for (k = 0; k < dim; k++) { - /* first bilinear de Casteljau step */ - for (i = 0; i < uorder - 1; i++) { - DCN(i, 0) = us * CN(i, 0, k) + u * CN(i + 1, 0, k); - for (j = 0; j < vorder - 1; j++) { - DCN(i, j + 1) = us * CN(i, j + 1, k) + u * CN(i + 1, j + 1, k); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* remaining bilinear de Casteljau steps until the second last step */ - for (h = 2; h < minorder - 1; h++) - for (i = 0; i < uorder - h; i++) { - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - for (j = 0; j < vorder - h; j++) { - DCN(i, j + 1) = us * DCN(i, j + 1) + u * DCN(i + 1, j + 1); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* derivative direction in u */ - du[k] = vs * (DCN(1, 0) - DCN(0, 0)) + v * (DCN(1, 1) - DCN(0, 1)); - - /* derivative direction in v */ - dv[k] = us * (DCN(0, 1) - DCN(0, 0)) + u * (DCN(1, 1) - DCN(1, 0)); - - /* last bilinear de Casteljau step */ - out[k] = us * (vs * DCN(0, 0) + v * DCN(0, 1)) + - u * (vs * DCN(1, 0) + v * DCN(1, 1)); - } - } - else if (minorder == uorder) { - for (k = 0; k < dim; k++) { - /* first bilinear de Casteljau step */ - for (i = 0; i < uorder - 1; i++) { - DCN(i, 0) = us * CN(i, 0, k) + u * CN(i + 1, 0, k); - for (j = 0; j < vorder - 1; j++) { - DCN(i, j + 1) = us * CN(i, j + 1, k) + u * CN(i + 1, j + 1, k); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* remaining bilinear de Casteljau steps until the second last step */ - for (h = 2; h < minorder - 1; h++) - for (i = 0; i < uorder - h; i++) { - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - for (j = 0; j < vorder - h; j++) { - DCN(i, j + 1) = us * DCN(i, j + 1) + u * DCN(i + 1, j + 1); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* last bilinear de Casteljau step */ - DCN(2, 0) = DCN(1, 0) - DCN(0, 0); - DCN(0, 0) = us * DCN(0, 0) + u * DCN(1, 0); - for (j = 0; j < vorder - 1; j++) { - /* for the derivative in u */ - DCN(2, j + 1) = DCN(1, j + 1) - DCN(0, j + 1); - DCN(2, j) = vs * DCN(2, j) + v * DCN(2, j + 1); - - /* for the `point' */ - DCN(0, j + 1) = us * DCN(0, j + 1) + u * DCN(1, j + 1); - DCN(0, j) = vs * DCN(0, j) + v * DCN(0, j + 1); - } - - /* remaining linear de Casteljau steps until the second last step */ - for (h = minorder; h < vorder - 1; h++) - for (j = 0; j < vorder - h; j++) { - /* for the derivative in u */ - DCN(2, j) = vs * DCN(2, j) + v * DCN(2, j + 1); - - /* for the `point' */ - DCN(0, j) = vs * DCN(0, j) + v * DCN(0, j + 1); - } - - /* derivative direction in v */ - dv[k] = DCN(0, 1) - DCN(0, 0); - - /* derivative direction in u */ - du[k] = vs * DCN(2, 0) + v * DCN(2, 1); - - /* last linear de Casteljau step */ - out[k] = vs * DCN(0, 0) + v * DCN(0, 1); - } - } - else { /* minorder == vorder */ - - for (k = 0; k < dim; k++) { - /* first bilinear de Casteljau step */ - for (i = 0; i < uorder - 1; i++) { - DCN(i, 0) = us * CN(i, 0, k) + u * CN(i + 1, 0, k); - for (j = 0; j < vorder - 1; j++) { - DCN(i, j + 1) = us * CN(i, j + 1, k) + u * CN(i + 1, j + 1, k); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* remaining bilinear de Casteljau steps until the second last step */ - for (h = 2; h < minorder - 1; h++) - for (i = 0; i < uorder - h; i++) { - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - for (j = 0; j < vorder - h; j++) { - DCN(i, j + 1) = us * DCN(i, j + 1) + u * DCN(i + 1, j + 1); - DCN(i, j) = vs * DCN(i, j) + v * DCN(i, j + 1); - } - } - - /* last bilinear de Casteljau step */ - DCN(0, 2) = DCN(0, 1) - DCN(0, 0); - DCN(0, 0) = vs * DCN(0, 0) + v * DCN(0, 1); - for (i = 0; i < uorder - 1; i++) { - /* for the derivative in v */ - DCN(i + 1, 2) = DCN(i + 1, 1) - DCN(i + 1, 0); - DCN(i, 2) = us * DCN(i, 2) + u * DCN(i + 1, 2); - - /* for the `point' */ - DCN(i + 1, 0) = vs * DCN(i + 1, 0) + v * DCN(i + 1, 1); - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - } - - /* remaining linear de Casteljau steps until the second last step */ - for (h = minorder; h < uorder - 1; h++) - for (i = 0; i < uorder - h; i++) { - /* for the derivative in v */ - DCN(i, 2) = us * DCN(i, 2) + u * DCN(i + 1, 2); - - /* for the `point' */ - DCN(i, 0) = us * DCN(i, 0) + u * DCN(i + 1, 0); - } - - /* derivative direction in u */ - du[k] = DCN(1, 0) - DCN(0, 0); - - /* derivative direction in v */ - dv[k] = us * DCN(0, 2) + u * DCN(1, 2); - - /* last linear de Casteljau step */ - out[k] = us * DCN(0, 0) + u * DCN(1, 0); - } - } -#undef DCN -#undef CN -} - - -/* - * Do one-time initialization for evaluators. - */ -void -_math_init_eval(void) -{ - GLuint i; - - /* KW: precompute 1/x for useful x. - */ - for (i = 1; i < MAX_EVAL_ORDER; i++) - inv_tab[i] = 1.0F / i; -} Index: xc/extras/Mesa/src/math/m_eval.h diff -u xc/extras/Mesa/src/math/m_eval.h:1.2 xc/extras/Mesa/src/math/m_eval.h:removed --- xc/extras/Mesa/src/math/m_eval.h:1.2 Mon Dec 16 11:18:36 2002 +++ xc/extras/Mesa/src/math/m_eval.h Wed Mar 16 21:00:59 2005 @@ -1,103 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _M_EVAL_H -#define _M_EVAL_H - -#include "glheader.h" - -void _math_init_eval( void ); - - -/* - * Horner scheme for Bezier curves - * - * Bezier curves can be computed via a Horner scheme. - * Horner is numerically less stable than the de Casteljau - * algorithm, but it is faster. For curves of degree n - * the complexity of Horner is O(n) and de Casteljau is O(n^2). - * Since stability is not important for displaying curve - * points I decided to use the Horner scheme. - * - * A cubic Bezier curve with control points b0, b1, b2, b3 can be - * written as - * - * (([3] [3] ) [3] ) [3] - * c(t) = (([0]*s*b0 + [1]*t*b1)*s + [2]*t^2*b2)*s + [3]*t^2*b3 - * - * [n] - * where s=1-t and the binomial coefficients [i]. These can - * be computed iteratively using the identity: - * - * [n] [n ] [n] - * [i] = (n-i+1)/i * [i-1] and [0] = 1 - */ - - -void -_math_horner_bezier_curve(const GLfloat *cp, GLfloat *out, GLfloat t, - GLuint dim, GLuint order); - - -/* - * Tensor product Bezier surfaces - * - * Again the Horner scheme is used to compute a point on a - * TP Bezier surface. First a control polygon for a curve - * on the surface in one parameter direction is computed, - * then the point on the curve for the other parameter - * direction is evaluated. - * - * To store the curve control polygon additional storage - * for max(uorder,vorder) points is needed in the - * control net cn. - */ - -void -_math_horner_bezier_surf(GLfloat *cn, GLfloat *out, GLfloat u, GLfloat v, - GLuint dim, GLuint uorder, GLuint vorder); - - -/* - * The direct de Casteljau algorithm is used when a point on the - * surface and the tangent directions spanning the tangent plane - * should be computed (this is needed to compute normals to the - * surface). In this case the de Casteljau algorithm approach is - * nicer because a point and the partial derivatives can be computed - * at the same time. To get the correct tangent length du and dv - * must be multiplied with the (u2-u1)/uorder-1 and (v2-v1)/vorder-1. - * Since only the directions are needed, this scaling step is omitted. - * - * De Casteljau needs additional storage for uorder*vorder - * values in the control net cn. - */ - -void -_math_de_casteljau_surf(GLfloat *cn, GLfloat *out, GLfloat *du, GLfloat *dv, - GLfloat u, GLfloat v, GLuint dim, - GLuint uorder, GLuint vorder); - - -#endif Index: xc/extras/Mesa/src/math/m_matrix.c diff -u xc/extras/Mesa/src/math/m_matrix.c:1.5 xc/extras/Mesa/src/math/m_matrix.c:removed --- xc/extras/Mesa/src/math/m_matrix.c:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/math/m_matrix.c Wed Mar 16 21:00:59 2005 @@ -1,1180 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 5.0.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Matrix operations - * - * NOTES: - * 1. 4x4 transformation matrices are stored in memory in column major order. - * 2. Points/vertices are to be thought of as column vectors. - * 3. Transformation of a point p by a matrix M is: p' = M * p - */ - -#include "glheader.h" -#include "imports.h" -#include "macros.h" -#include "imports.h" -#include "mmath.h" - -#include "m_matrix.h" - - -static const char *types[] = { - "MATRIX_GENERAL", - "MATRIX_IDENTITY", - "MATRIX_3D_NO_ROT", - "MATRIX_PERSPECTIVE", - "MATRIX_2D", - "MATRIX_2D_NO_ROT", - "MATRIX_3D" -}; - - -static GLfloat Identity[16] = { - 1.0, 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, - 0.0, 0.0, 1.0, 0.0, - 0.0, 0.0, 0.0, 1.0 -}; - - - - -/* - * This matmul was contributed by Thomas Malik - * - * Perform a 4x4 matrix multiplication (product = a x b). - * Input: a, b - matrices to multiply - * Output: product - product of a and b - * WARNING: (product != b) assumed - * NOTE: (product == a) allowed - * - * KW: 4*16 = 64 muls - */ -#define A(row,col) a[(col<<2)+row] -#define B(row,col) b[(col<<2)+row] -#define P(row,col) product[(col<<2)+row] - -static void matmul4( GLfloat *product, const GLfloat *a, const GLfloat *b ) -{ - GLint i; - for (i = 0; i < 4; i++) { - const GLfloat ai0=A(i,0), ai1=A(i,1), ai2=A(i,2), ai3=A(i,3); - P(i,0) = ai0 * B(0,0) + ai1 * B(1,0) + ai2 * B(2,0) + ai3 * B(3,0); - P(i,1) = ai0 * B(0,1) + ai1 * B(1,1) + ai2 * B(2,1) + ai3 * B(3,1); - P(i,2) = ai0 * B(0,2) + ai1 * B(1,2) + ai2 * B(2,2) + ai3 * B(3,2); - P(i,3) = ai0 * B(0,3) + ai1 * B(1,3) + ai2 * B(2,3) + ai3 * B(3,3); - } -} - - -/* Multiply two matrices known to occupy only the top three rows, such - * as typical model matrices, and ortho matrices. - */ -static void matmul34( GLfloat *product, const GLfloat *a, const GLfloat *b ) -{ - GLint i; - for (i = 0; i < 3; i++) { - const GLfloat ai0=A(i,0), ai1=A(i,1), ai2=A(i,2), ai3=A(i,3); - P(i,0) = ai0 * B(0,0) + ai1 * B(1,0) + ai2 * B(2,0); - P(i,1) = ai0 * B(0,1) + ai1 * B(1,1) + ai2 * B(2,1); - P(i,2) = ai0 * B(0,2) + ai1 * B(1,2) + ai2 * B(2,2); - P(i,3) = ai0 * B(0,3) + ai1 * B(1,3) + ai2 * B(2,3) + ai3; - } - P(3,0) = 0; - P(3,1) = 0; - P(3,2) = 0; - P(3,3) = 1; -} - - -#undef A -#undef B -#undef P - - -/* - * Multiply a matrix by an array of floats with known properties. - */ -static void matrix_multf( GLmatrix *mat, const GLfloat *m, GLuint flags ) -{ - mat->flags |= (flags | MAT_DIRTY_TYPE | MAT_DIRTY_INVERSE); - - if (TEST_MAT_FLAGS(mat, MAT_FLAGS_3D)) - matmul34( mat->m, mat->m, m ); - else - matmul4( mat->m, mat->m, m ); -} - - -static void print_matrix_floats( const GLfloat m[16] ) -{ - int i; - for (i=0;i<4;i++) { - _mesa_debug(NULL,"\t%f %f %f %f\n", m[i], m[4+i], m[8+i], m[12+i] ); - } -} - -void -_math_matrix_print( const GLmatrix *m ) -{ - _mesa_debug(NULL, "Matrix type: %s, flags: %x\n", types[m->type], m->flags); - print_matrix_floats(m->m); - _mesa_debug(NULL, "Inverse: \n"); - if (m->inv) { - GLfloat prod[16]; - print_matrix_floats(m->inv); - matmul4(prod, m->m, m->inv); - _mesa_debug(NULL, "Mat * Inverse:\n"); - print_matrix_floats(prod); - } - else { - _mesa_debug(NULL, " - not available\n"); - } -} - - - - -#define SWAP_ROWS(a, b) { GLfloat *_tmp = a; (a)=(b); (b)=_tmp; } -#define MAT(m,r,c) (m)[(c)*4+(r)] - -/* - * Compute inverse of 4x4 transformation matrix. - * Code contributed by Jacques Leroy jle@star.be - * Return GL_TRUE for success, GL_FALSE for failure (singular matrix) - */ -static GLboolean invert_matrix_general( GLmatrix *mat ) -{ - const GLfloat *m = mat->m; - GLfloat *out = mat->inv; - GLfloat wtmp[4][8]; - GLfloat m0, m1, m2, m3, s; - GLfloat *r0, *r1, *r2, *r3; - - r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3]; - - r0[0] = MAT(m,0,0), r0[1] = MAT(m,0,1), - r0[2] = MAT(m,0,2), r0[3] = MAT(m,0,3), - r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0, - - r1[0] = MAT(m,1,0), r1[1] = MAT(m,1,1), - r1[2] = MAT(m,1,2), r1[3] = MAT(m,1,3), - r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0, - - r2[0] = MAT(m,2,0), r2[1] = MAT(m,2,1), - r2[2] = MAT(m,2,2), r2[3] = MAT(m,2,3), - r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0, - - r3[0] = MAT(m,3,0), r3[1] = MAT(m,3,1), - r3[2] = MAT(m,3,2), r3[3] = MAT(m,3,3), - r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0; - - /* choose pivot - or die */ - if (fabs(r3[0])>fabs(r2[0])) SWAP_ROWS(r3, r2); - if (fabs(r2[0])>fabs(r1[0])) SWAP_ROWS(r2, r1); - if (fabs(r1[0])>fabs(r0[0])) SWAP_ROWS(r1, r0); - if (0.0 == r0[0]) return GL_FALSE; - - /* eliminate first variable */ - m1 = r1[0]/r0[0]; m2 = r2[0]/r0[0]; m3 = r3[0]/r0[0]; - s = r0[1]; r1[1] -= m1 * s; r2[1] -= m2 * s; r3[1] -= m3 * s; - s = r0[2]; r1[2] -= m1 * s; r2[2] -= m2 * s; r3[2] -= m3 * s; - s = r0[3]; r1[3] -= m1 * s; r2[3] -= m2 * s; r3[3] -= m3 * s; - s = r0[4]; - if (s != 0.0) { r1[4] -= m1 * s; r2[4] -= m2 * s; r3[4] -= m3 * s; } - s = r0[5]; - if (s != 0.0) { r1[5] -= m1 * s; r2[5] -= m2 * s; r3[5] -= m3 * s; } - s = r0[6]; - if (s != 0.0) { r1[6] -= m1 * s; r2[6] -= m2 * s; r3[6] -= m3 * s; } - s = r0[7]; - if (s != 0.0) { r1[7] -= m1 * s; r2[7] -= m2 * s; r3[7] -= m3 * s; } - - /* choose pivot - or die */ - if (fabs(r3[1])>fabs(r2[1])) SWAP_ROWS(r3, r2); - if (fabs(r2[1])>fabs(r1[1])) SWAP_ROWS(r2, r1); - if (0.0 == r1[1]) return GL_FALSE; - - /* eliminate second variable */ - m2 = r2[1]/r1[1]; m3 = r3[1]/r1[1]; - r2[2] -= m2 * r1[2]; r3[2] -= m3 * r1[2]; - r2[3] -= m2 * r1[3]; r3[3] -= m3 * r1[3]; - s = r1[4]; if (0.0 != s) { r2[4] -= m2 * s; r3[4] -= m3 * s; } - s = r1[5]; if (0.0 != s) { r2[5] -= m2 * s; r3[5] -= m3 * s; } - s = r1[6]; if (0.0 != s) { r2[6] -= m2 * s; r3[6] -= m3 * s; } - s = r1[7]; if (0.0 != s) { r2[7] -= m2 * s; r3[7] -= m3 * s; } - - /* choose pivot - or die */ - if (fabs(r3[2])>fabs(r2[2])) SWAP_ROWS(r3, r2); - if (0.0 == r2[2]) return GL_FALSE; - - /* eliminate third variable */ - m3 = r3[2]/r2[2]; - r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4], - r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6], - r3[7] -= m3 * r2[7]; - - /* last check */ - if (0.0 == r3[3]) return GL_FALSE; - - s = 1.0F/r3[3]; /* now back substitute row 3 */ - r3[4] *= s; r3[5] *= s; r3[6] *= s; r3[7] *= s; - - m2 = r2[3]; /* now back substitute row 2 */ - s = 1.0F/r2[2]; - r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2), - r2[6] = s * (r2[6] - r3[6] * m2), r2[7] = s * (r2[7] - r3[7] * m2); - m1 = r1[3]; - r1[4] -= r3[4] * m1, r1[5] -= r3[5] * m1, - r1[6] -= r3[6] * m1, r1[7] -= r3[7] * m1; - m0 = r0[3]; - r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0, - r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0; - - m1 = r1[2]; /* now back substitute row 1 */ - s = 1.0F/r1[1]; - r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1), - r1[6] = s * (r1[6] - r2[6] * m1), r1[7] = s * (r1[7] - r2[7] * m1); - m0 = r0[2]; - r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0, - r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0; - - m0 = r0[1]; /* now back substitute row 0 */ - s = 1.0F/r0[0]; - r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0), - r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0); - - MAT(out,0,0) = r0[4]; MAT(out,0,1) = r0[5], - MAT(out,0,2) = r0[6]; MAT(out,0,3) = r0[7], - MAT(out,1,0) = r1[4]; MAT(out,1,1) = r1[5], - MAT(out,1,2) = r1[6]; MAT(out,1,3) = r1[7], - MAT(out,2,0) = r2[4]; MAT(out,2,1) = r2[5], - MAT(out,2,2) = r2[6]; MAT(out,2,3) = r2[7], - MAT(out,3,0) = r3[4]; MAT(out,3,1) = r3[5], - MAT(out,3,2) = r3[6]; MAT(out,3,3) = r3[7]; - - return GL_TRUE; -} -#undef SWAP_ROWS - - -/* Adapted from graphics gems II. - */ -static GLboolean invert_matrix_3d_general( GLmatrix *mat ) -{ - const GLfloat *in = mat->m; - GLfloat *out = mat->inv; - GLfloat pos, neg, t; - GLfloat det; - - /* Calculate the determinant of upper left 3x3 submatrix and - * determine if the matrix is singular. - */ - pos = neg = 0.0; - t = MAT(in,0,0) * MAT(in,1,1) * MAT(in,2,2); - if (t >= 0.0) pos += t; else neg += t; - - t = MAT(in,1,0) * MAT(in,2,1) * MAT(in,0,2); - if (t >= 0.0) pos += t; else neg += t; - - t = MAT(in,2,0) * MAT(in,0,1) * MAT(in,1,2); - if (t >= 0.0) pos += t; else neg += t; - - t = -MAT(in,2,0) * MAT(in,1,1) * MAT(in,0,2); - if (t >= 0.0) pos += t; else neg += t; - - t = -MAT(in,1,0) * MAT(in,0,1) * MAT(in,2,2); - if (t >= 0.0) pos += t; else neg += t; - - t = -MAT(in,0,0) * MAT(in,2,1) * MAT(in,1,2); - if (t >= 0.0) pos += t; else neg += t; - - det = pos + neg; - - if (det*det < 1e-25) - return GL_FALSE; - - det = 1.0F / det; - MAT(out,0,0) = ( (MAT(in,1,1)*MAT(in,2,2) - MAT(in,2,1)*MAT(in,1,2) )*det); - MAT(out,0,1) = (- (MAT(in,0,1)*MAT(in,2,2) - MAT(in,2,1)*MAT(in,0,2) )*det); - MAT(out,0,2) = ( (MAT(in,0,1)*MAT(in,1,2) - MAT(in,1,1)*MAT(in,0,2) )*det); - MAT(out,1,0) = (- (MAT(in,1,0)*MAT(in,2,2) - MAT(in,2,0)*MAT(in,1,2) )*det); - MAT(out,1,1) = ( (MAT(in,0,0)*MAT(in,2,2) - MAT(in,2,0)*MAT(in,0,2) )*det); - MAT(out,1,2) = (- (MAT(in,0,0)*MAT(in,1,2) - MAT(in,1,0)*MAT(in,0,2) )*det); - MAT(out,2,0) = ( (MAT(in,1,0)*MAT(in,2,1) - MAT(in,2,0)*MAT(in,1,1) )*det); - MAT(out,2,1) = (- (MAT(in,0,0)*MAT(in,2,1) - MAT(in,2,0)*MAT(in,0,1) )*det); - MAT(out,2,2) = ( (MAT(in,0,0)*MAT(in,1,1) - MAT(in,1,0)*MAT(in,0,1) )*det); - - /* Do the translation part */ - MAT(out,0,3) = - (MAT(in,0,3) * MAT(out,0,0) + - MAT(in,1,3) * MAT(out,0,1) + - MAT(in,2,3) * MAT(out,0,2) ); - MAT(out,1,3) = - (MAT(in,0,3) * MAT(out,1,0) + - MAT(in,1,3) * MAT(out,1,1) + - MAT(in,2,3) * MAT(out,1,2) ); - MAT(out,2,3) = - (MAT(in,0,3) * MAT(out,2,0) + - MAT(in,1,3) * MAT(out,2,1) + - MAT(in,2,3) * MAT(out,2,2) ); - - return GL_TRUE; -} - - -static GLboolean invert_matrix_3d( GLmatrix *mat ) -{ - const GLfloat *in = mat->m; - GLfloat *out = mat->inv; - - if (!TEST_MAT_FLAGS(mat, MAT_FLAGS_ANGLE_PRESERVING)) { - return invert_matrix_3d_general( mat ); - } - - if (mat->flags & MAT_FLAG_UNIFORM_SCALE) { - GLfloat scale = (MAT(in,0,0) * MAT(in,0,0) + - MAT(in,0,1) * MAT(in,0,1) + - MAT(in,0,2) * MAT(in,0,2)); - - if (scale == 0.0) - return GL_FALSE; - - scale = 1.0F / scale; - - /* Transpose and scale the 3 by 3 upper-left submatrix. */ - MAT(out,0,0) = scale * MAT(in,0,0); - MAT(out,1,0) = scale * MAT(in,0,1); - MAT(out,2,0) = scale * MAT(in,0,2); - MAT(out,0,1) = scale * MAT(in,1,0); - MAT(out,1,1) = scale * MAT(in,1,1); - MAT(out,2,1) = scale * MAT(in,1,2); - MAT(out,0,2) = scale * MAT(in,2,0); - MAT(out,1,2) = scale * MAT(in,2,1); - MAT(out,2,2) = scale * MAT(in,2,2); - } - else if (mat->flags & MAT_FLAG_ROTATION) { - /* Transpose the 3 by 3 upper-left submatrix. */ - MAT(out,0,0) = MAT(in,0,0); - MAT(out,1,0) = MAT(in,0,1); - MAT(out,2,0) = MAT(in,0,2); - MAT(out,0,1) = MAT(in,1,0); - MAT(out,1,1) = MAT(in,1,1); - MAT(out,2,1) = MAT(in,1,2); - MAT(out,0,2) = MAT(in,2,0); - MAT(out,1,2) = MAT(in,2,1); - MAT(out,2,2) = MAT(in,2,2); - } - else { - /* pure translation */ - MEMCPY( out, Identity, sizeof(Identity) ); - MAT(out,0,3) = - MAT(in,0,3); - MAT(out,1,3) = - MAT(in,1,3); - MAT(out,2,3) = - MAT(in,2,3); - return GL_TRUE; - } - - if (mat->flags & MAT_FLAG_TRANSLATION) { - /* Do the translation part */ - MAT(out,0,3) = - (MAT(in,0,3) * MAT(out,0,0) + - MAT(in,1,3) * MAT(out,0,1) + - MAT(in,2,3) * MAT(out,0,2) ); - MAT(out,1,3) = - (MAT(in,0,3) * MAT(out,1,0) + - MAT(in,1,3) * MAT(out,1,1) + - MAT(in,2,3) * MAT(out,1,2) ); - MAT(out,2,3) = - (MAT(in,0,3) * MAT(out,2,0) + - MAT(in,1,3) * MAT(out,2,1) + - MAT(in,2,3) * MAT(out,2,2) ); - } - else { - MAT(out,0,3) = MAT(out,1,3) = MAT(out,2,3) = 0.0; - } - - return GL_TRUE; -} - - - -static GLboolean invert_matrix_identity( GLmatrix *mat ) -{ - MEMCPY( mat->inv, Identity, sizeof(Identity) ); - return GL_TRUE; -} - - -static GLboolean invert_matrix_3d_no_rot( GLmatrix *mat ) -{ - const GLfloat *in = mat->m; - GLfloat *out = mat->inv; - - if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0 || MAT(in,2,2) == 0 ) - return GL_FALSE; - - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); - MAT(out,0,0) = 1.0F / MAT(in,0,0); - MAT(out,1,1) = 1.0F / MAT(in,1,1); - MAT(out,2,2) = 1.0F / MAT(in,2,2); - - if (mat->flags & MAT_FLAG_TRANSLATION) { - MAT(out,0,3) = - (MAT(in,0,3) * MAT(out,0,0)); - MAT(out,1,3) = - (MAT(in,1,3) * MAT(out,1,1)); - MAT(out,2,3) = - (MAT(in,2,3) * MAT(out,2,2)); - } - - return GL_TRUE; -} - - -static GLboolean invert_matrix_2d_no_rot( GLmatrix *mat ) -{ - const GLfloat *in = mat->m; - GLfloat *out = mat->inv; - - if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0) - return GL_FALSE; - - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); - MAT(out,0,0) = 1.0F / MAT(in,0,0); - MAT(out,1,1) = 1.0F / MAT(in,1,1); - - if (mat->flags & MAT_FLAG_TRANSLATION) { - MAT(out,0,3) = - (MAT(in,0,3) * MAT(out,0,0)); - MAT(out,1,3) = - (MAT(in,1,3) * MAT(out,1,1)); - } - - return GL_TRUE; -} - - -#if 0 -/* broken */ -static GLboolean invert_matrix_perspective( GLmatrix *mat ) -{ - const GLfloat *in = mat->m; - GLfloat *out = mat->inv; - - if (MAT(in,2,3) == 0) - return GL_FALSE; - - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); - - MAT(out,0,0) = 1.0F / MAT(in,0,0); - MAT(out,1,1) = 1.0F / MAT(in,1,1); - - MAT(out,0,3) = MAT(in,0,2); - MAT(out,1,3) = MAT(in,1,2); - - MAT(out,2,2) = 0; - MAT(out,2,3) = -1; - - MAT(out,3,2) = 1.0F / MAT(in,2,3); - MAT(out,3,3) = MAT(in,2,2) * MAT(out,3,2); - - return GL_TRUE; -} -#endif - - -typedef GLboolean (*inv_mat_func)( GLmatrix *mat ); - - -static inv_mat_func inv_mat_tab[7] = { - invert_matrix_general, - invert_matrix_identity, - invert_matrix_3d_no_rot, -#if 0 - /* Don't use this function for now - it fails when the projection matrix - * is premultiplied by a translation (ala Chromium's tilesort SPU). - */ - invert_matrix_perspective, -#else - invert_matrix_general, -#endif - invert_matrix_3d, /* lazy! */ - invert_matrix_2d_no_rot, - invert_matrix_3d -}; - - -static GLboolean matrix_invert( GLmatrix *mat ) -{ - if (inv_mat_tab[mat->type](mat)) { - mat->flags &= ~MAT_FLAG_SINGULAR; - return GL_TRUE; - } else { - mat->flags |= MAT_FLAG_SINGULAR; - MEMCPY( mat->inv, Identity, sizeof(Identity) ); - return GL_FALSE; - } -} - - - - - - -/* - * Generate a 4x4 transformation matrix from glRotate parameters, and - * postmultiply the input matrix by it. - * This function contributed by Erich Boleyn (erich@uruk.org). - * Optimizatios contributed by Rudolf Opalla (rudi@khm.de). - */ -void -_math_matrix_rotate( GLmatrix *mat, - GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) -{ - GLfloat xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c, s, c; - GLfloat m[16]; - GLboolean optimized; - - s = (GLfloat) sin( angle * DEG2RAD ); - c = (GLfloat) cos( angle * DEG2RAD ); - - MEMCPY(m, Identity, sizeof(GLfloat)*16); - optimized = GL_FALSE; - -#define M(row,col) m[col*4+row] - - if (x == 0.0F) { - if (y == 0.0F) { - if (z != 0.0F) { - optimized = GL_TRUE; - /* rotate only around z-axis */ - M(0,0) = c; - M(1,1) = c; - if (z < 0.0F) { - M(0,1) = s; - M(1,0) = -s; - } - else { - M(0,1) = -s; - M(1,0) = s; - } - } - } - else if (z == 0.0F) { - optimized = GL_TRUE; - /* rotate only around y-axis */ - M(0,0) = c; - M(2,2) = c; - if (y < 0.0F) { - M(0,2) = -s; - M(2,0) = s; - } - else { - M(0,2) = s; - M(2,0) = -s; - } - } - } - else if (y == 0.0F) { - if (z == 0.0F) { - optimized = GL_TRUE; - /* rotate only around x-axis */ - M(1,1) = c; - M(2,2) = c; - if (x < 0.0F) { - M(1,2) = s; - M(2,1) = -s; - } - else { - M(1,2) = -s; - M(2,1) = s; - } - } - } - - if (!optimized) { - const GLfloat mag = (GLfloat) GL_SQRT(x * x + y * y + z * z); - - if (mag <= 1.0e-4) { - /* no rotation, leave mat as-is */ - return; - } - - x /= mag; - y /= mag; - z /= mag; - - - /* - * Arbitrary axis rotation matrix. - * - * This is composed of 5 matrices, Rz, Ry, T, Ry', Rz', multiplied - * like so: Rz * Ry * T * Ry' * Rz'. T is the final rotation - * (which is about the X-axis), and the two composite transforms - * Ry' * Rz' and Rz * Ry are (respectively) the rotations necessary - * from the arbitrary axis to the X-axis then back. They are - * all elementary rotations. - * - * Rz' is a rotation about the Z-axis, to bring the axis vector - * into the x-z plane. Then Ry' is applied, rotating about the - * Y-axis to bring the axis vector parallel with the X-axis. The - * rotation about the X-axis is then performed. Ry and Rz are - * simply the respective inverse transforms to bring the arbitrary - * axis back to it's original orientation. The first transforms - * Rz' and Ry' are considered inverses, since the data from the - * arbitrary axis gives you info on how to get to it, not how - * to get away from it, and an inverse must be applied. - * - * The basic calculation used is to recognize that the arbitrary - * axis vector (x, y, z), since it is of unit length, actually - * represents the sines and cosines of the angles to rotate the - * X-axis to the same orientation, with theta being the angle about - * Z and phi the angle about Y (in the order described above) - * as follows: - * - * cos ( theta ) = x / sqrt ( 1 - z^2 ) - * sin ( theta ) = y / sqrt ( 1 - z^2 ) - * - * cos ( phi ) = sqrt ( 1 - z^2 ) - * sin ( phi ) = z - * - * Note that cos ( phi ) can further be inserted to the above - * formulas: - * - * cos ( theta ) = x / cos ( phi ) - * sin ( theta ) = y / sin ( phi ) - * - * ...etc. Because of those relations and the standard trigonometric - * relations, it is pssible to reduce the transforms down to what - * is used below. It may be that any primary axis chosen will give the - * same results (modulo a sign convention) using thie method. - * - * Particularly nice is to notice that all divisions that might - * have caused trouble when parallel to certain planes or - * axis go away with care paid to reducing the expressions. - * After checking, it does perform correctly under all cases, since - * in all the cases of division where the denominator would have - * been zero, the numerator would have been zero as well, giving - * the expected result. - */ - - xx = x * x; - yy = y * y; - zz = z * z; - xy = x * y; - yz = y * z; - zx = z * x; - xs = x * s; - ys = y * s; - zs = z * s; - one_c = 1.0F - c; - - /* We already hold the identity-matrix so we can skip some statements */ - M(0,0) = (one_c * xx) + c; - M(0,1) = (one_c * xy) - zs; - M(0,2) = (one_c * zx) + ys; -/* M(0,3) = 0.0F; */ - - M(1,0) = (one_c * xy) + zs; - M(1,1) = (one_c * yy) + c; - M(1,2) = (one_c * yz) - xs; -/* M(1,3) = 0.0F; */ - - M(2,0) = (one_c * zx) - ys; - M(2,1) = (one_c * yz) + xs; - M(2,2) = (one_c * zz) + c; -/* M(2,3) = 0.0F; */ - -/* - M(3,0) = 0.0F; - M(3,1) = 0.0F; - M(3,2) = 0.0F; - M(3,3) = 1.0F; -*/ - } -#undef M - - matrix_multf( mat, m, MAT_FLAG_ROTATION ); -} - - - -void -_math_matrix_frustum( GLmatrix *mat, - GLfloat left, GLfloat right, - GLfloat bottom, GLfloat top, - GLfloat nearval, GLfloat farval ) -{ - GLfloat x, y, a, b, c, d; - GLfloat m[16]; - - x = (2.0F*nearval) / (right-left); - y = (2.0F*nearval) / (top-bottom); - a = (right+left) / (right-left); - b = (top+bottom) / (top-bottom); - c = -(farval+nearval) / ( farval-nearval); - d = -(2.0F*farval*nearval) / (farval-nearval); /* error? */ - -#define M(row,col) m[col*4+row] - M(0,0) = x; M(0,1) = 0.0F; M(0,2) = a; M(0,3) = 0.0F; - M(1,0) = 0.0F; M(1,1) = y; M(1,2) = b; M(1,3) = 0.0F; - M(2,0) = 0.0F; M(2,1) = 0.0F; M(2,2) = c; M(2,3) = d; - M(3,0) = 0.0F; M(3,1) = 0.0F; M(3,2) = -1.0F; M(3,3) = 0.0F; -#undef M - - matrix_multf( mat, m, MAT_FLAG_PERSPECTIVE ); -} - -void -_math_matrix_ortho( GLmatrix *mat, - GLfloat left, GLfloat right, - GLfloat bottom, GLfloat top, - GLfloat nearval, GLfloat farval ) -{ - GLfloat x, y, z; - GLfloat tx, ty, tz; - GLfloat m[16]; - - x = 2.0F / (right-left); - y = 2.0F / (top-bottom); - z = -2.0F / (farval-nearval); - tx = -(right+left) / (right-left); - ty = -(top+bottom) / (top-bottom); - tz = -(farval+nearval) / (farval-nearval); - -#define M(row,col) m[col*4+row] - M(0,0) = x; M(0,1) = 0.0F; M(0,2) = 0.0F; M(0,3) = tx; - M(1,0) = 0.0F; M(1,1) = y; M(1,2) = 0.0F; M(1,3) = ty; - M(2,0) = 0.0F; M(2,1) = 0.0F; M(2,2) = z; M(2,3) = tz; - M(3,0) = 0.0F; M(3,1) = 0.0F; M(3,2) = 0.0F; M(3,3) = 1.0F; -#undef M - - matrix_multf( mat, m, (MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION)); -} - - -#define ZERO(x) (1<m; - GLuint mask = 0; - GLuint i; - - for (i = 0 ; i < 16 ; i++) { - if (m[i] == 0.0) mask |= (1<flags &= ~MAT_FLAGS_GEOMETRY; - - /* Check for translation - no-one really cares - */ - if ((mask & MASK_NO_TRX) != MASK_NO_TRX) - mat->flags |= MAT_FLAG_TRANSLATION; - - /* Do the real work - */ - if (mask == (GLuint) MASK_IDENTITY) { - mat->type = MATRIX_IDENTITY; - } - else if ((mask & MASK_2D_NO_ROT) == (GLuint) MASK_2D_NO_ROT) { - mat->type = MATRIX_2D_NO_ROT; - - if ((mask & MASK_NO_2D_SCALE) != MASK_NO_2D_SCALE) - mat->flags = MAT_FLAG_GENERAL_SCALE; - } - else if ((mask & MASK_2D) == (GLuint) MASK_2D) { - GLfloat mm = DOT2(m, m); - GLfloat m4m4 = DOT2(m+4,m+4); - GLfloat mm4 = DOT2(m,m+4); - - mat->type = MATRIX_2D; - - /* Check for scale */ - if (SQ(mm-1) > SQ(1e-6) || - SQ(m4m4-1) > SQ(1e-6)) - mat->flags |= MAT_FLAG_GENERAL_SCALE; - - /* Check for rotation */ - if (SQ(mm4) > SQ(1e-6)) - mat->flags |= MAT_FLAG_GENERAL_3D; - else - mat->flags |= MAT_FLAG_ROTATION; - - } - else if ((mask & MASK_3D_NO_ROT) == (GLuint) MASK_3D_NO_ROT) { - mat->type = MATRIX_3D_NO_ROT; - - /* Check for scale */ - if (SQ(m[0]-m[5]) < SQ(1e-6) && - SQ(m[0]-m[10]) < SQ(1e-6)) { - if (SQ(m[0]-1.0) > SQ(1e-6)) { - mat->flags |= MAT_FLAG_UNIFORM_SCALE; - } - } - else { - mat->flags |= MAT_FLAG_GENERAL_SCALE; - } - } - else if ((mask & MASK_3D) == (GLuint) MASK_3D) { - GLfloat c1 = DOT3(m,m); - GLfloat c2 = DOT3(m+4,m+4); - GLfloat c3 = DOT3(m+8,m+8); - GLfloat d1 = DOT3(m, m+4); - GLfloat cp[3]; - - mat->type = MATRIX_3D; - - /* Check for scale */ - if (SQ(c1-c2) < SQ(1e-6) && SQ(c1-c3) < SQ(1e-6)) { - if (SQ(c1-1.0) > SQ(1e-6)) - mat->flags |= MAT_FLAG_UNIFORM_SCALE; - /* else no scale at all */ - } - else { - mat->flags |= MAT_FLAG_GENERAL_SCALE; - } - - /* Check for rotation */ - if (SQ(d1) < SQ(1e-6)) { - CROSS3( cp, m, m+4 ); - SUB_3V( cp, cp, (m+8) ); - if (LEN_SQUARED_3FV(cp) < SQ(1e-6)) - mat->flags |= MAT_FLAG_ROTATION; - else - mat->flags |= MAT_FLAG_GENERAL_3D; - } - else { - mat->flags |= MAT_FLAG_GENERAL_3D; /* shear, etc */ - } - } - else if ((mask & MASK_PERSPECTIVE) == MASK_PERSPECTIVE && m[11]==-1.0F) { - mat->type = MATRIX_PERSPECTIVE; - mat->flags |= MAT_FLAG_GENERAL; - } - else { - mat->type = MATRIX_GENERAL; - mat->flags |= MAT_FLAG_GENERAL; - } -} - - -/* Analyse a matrix given that its flags are accurate - this is the - * more common operation, hopefully. - */ -static void analyse_from_flags( GLmatrix *mat ) -{ - const GLfloat *m = mat->m; - - if (TEST_MAT_FLAGS(mat, 0)) { - mat->type = MATRIX_IDENTITY; - } - else if (TEST_MAT_FLAGS(mat, (MAT_FLAG_TRANSLATION | - MAT_FLAG_UNIFORM_SCALE | - MAT_FLAG_GENERAL_SCALE))) { - if ( m[10]==1.0F && m[14]==0.0F ) { - mat->type = MATRIX_2D_NO_ROT; - } - else { - mat->type = MATRIX_3D_NO_ROT; - } - } - else if (TEST_MAT_FLAGS(mat, MAT_FLAGS_3D)) { - if ( m[ 8]==0.0F - && m[ 9]==0.0F - && m[2]==0.0F && m[6]==0.0F && m[10]==1.0F && m[14]==0.0F) { - mat->type = MATRIX_2D; - } - else { - mat->type = MATRIX_3D; - } - } - else if ( m[4]==0.0F && m[12]==0.0F - && m[1]==0.0F && m[13]==0.0F - && m[2]==0.0F && m[6]==0.0F - && m[3]==0.0F && m[7]==0.0F && m[11]==-1.0F && m[15]==0.0F) { - mat->type = MATRIX_PERSPECTIVE; - } - else { - mat->type = MATRIX_GENERAL; - } -} - - -void -_math_matrix_analyse( GLmatrix *mat ) -{ - if (mat->flags & MAT_DIRTY_TYPE) { - if (mat->flags & MAT_DIRTY_FLAGS) - analyse_from_scratch( mat ); - else - analyse_from_flags( mat ); - } - - if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) { - matrix_invert( mat ); - } - - mat->flags &= ~(MAT_DIRTY_FLAGS| - MAT_DIRTY_TYPE| - MAT_DIRTY_INVERSE); -} - - -void -_math_matrix_copy( GLmatrix *to, const GLmatrix *from ) -{ - MEMCPY( to->m, from->m, sizeof(Identity) ); - to->flags = from->flags; - to->type = from->type; - - if (to->inv != 0) { - if (from->inv == 0) { - matrix_invert( to ); - } - else { - MEMCPY(to->inv, from->inv, sizeof(GLfloat)*16); - } - } -} - - -void -_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ) -{ - GLfloat *m = mat->m; - m[0] *= x; m[4] *= y; m[8] *= z; - m[1] *= x; m[5] *= y; m[9] *= z; - m[2] *= x; m[6] *= y; m[10] *= z; - m[3] *= x; m[7] *= y; m[11] *= z; - - if (fabs(x - y) < 1e-8 && fabs(x - z) < 1e-8) - mat->flags |= MAT_FLAG_UNIFORM_SCALE; - else - mat->flags |= MAT_FLAG_GENERAL_SCALE; - - mat->flags |= (MAT_DIRTY_TYPE | - MAT_DIRTY_INVERSE); -} - - -void -_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ) -{ - GLfloat *m = mat->m; - m[12] = m[0] * x + m[4] * y + m[8] * z + m[12]; - m[13] = m[1] * x + m[5] * y + m[9] * z + m[13]; - m[14] = m[2] * x + m[6] * y + m[10] * z + m[14]; - m[15] = m[3] * x + m[7] * y + m[11] * z + m[15]; - - mat->flags |= (MAT_FLAG_TRANSLATION | - MAT_DIRTY_TYPE | - MAT_DIRTY_INVERSE); -} - - -void -_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ) -{ - MEMCPY( mat->m, m, 16*sizeof(GLfloat) ); - mat->flags = (MAT_FLAG_GENERAL | MAT_DIRTY); -} - -void -_math_matrix_ctr( GLmatrix *m ) -{ - m->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); - if (m->m) - MEMCPY( m->m, Identity, sizeof(Identity) ); - m->inv = NULL; - m->type = MATRIX_IDENTITY; - m->flags = 0; -} - -void -_math_matrix_dtr( GLmatrix *m ) -{ - if (m->m) { - ALIGN_FREE( m->m ); - m->m = NULL; - } - if (m->inv) { - ALIGN_FREE( m->inv ); - m->inv = NULL; - } -} - - -void -_math_matrix_alloc_inv( GLmatrix *m ) -{ - if (!m->inv) { - m->inv = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); - if (m->inv) - MEMCPY( m->inv, Identity, 16 * sizeof(GLfloat) ); - } -} - - -void -_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ) -{ - dest->flags = (a->flags | - b->flags | - MAT_DIRTY_TYPE | - MAT_DIRTY_INVERSE); - - if (TEST_MAT_FLAGS(dest, MAT_FLAGS_3D)) - matmul34( dest->m, a->m, b->m ); - else - matmul4( dest->m, a->m, b->m ); -} - - -void -_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *m ) -{ - dest->flags |= (MAT_FLAG_GENERAL | - MAT_DIRTY_TYPE | - MAT_DIRTY_INVERSE); - - matmul4( dest->m, dest->m, m ); -} - -void -_math_matrix_set_identity( GLmatrix *mat ) -{ - MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) ); - - if (mat->inv) - MEMCPY( mat->inv, Identity, 16*sizeof(GLfloat) ); - - mat->type = MATRIX_IDENTITY; - mat->flags &= ~(MAT_DIRTY_FLAGS| - MAT_DIRTY_TYPE| - MAT_DIRTY_INVERSE); -} - - - -void -_math_transposef( GLfloat to[16], const GLfloat from[16] ) -{ - to[0] = from[0]; - to[1] = from[4]; - to[2] = from[8]; - to[3] = from[12]; - to[4] = from[1]; - to[5] = from[5]; - to[6] = from[9]; - to[7] = from[13]; - to[8] = from[2]; - to[9] = from[6]; - to[10] = from[10]; - to[11] = from[14]; - to[12] = from[3]; - to[13] = from[7]; - to[14] = from[11]; - to[15] = from[15]; -} - - -void -_math_transposed( GLdouble to[16], const GLdouble from[16] ) -{ - to[0] = from[0]; - to[1] = from[4]; - to[2] = from[8]; - to[3] = from[12]; - to[4] = from[1]; - to[5] = from[5]; - to[6] = from[9]; - to[7] = from[13]; - to[8] = from[2]; - to[9] = from[6]; - to[10] = from[10]; - to[11] = from[14]; - to[12] = from[3]; - to[13] = from[7]; - to[14] = from[11]; - to[15] = from[15]; -} - -void -_math_transposefd( GLfloat to[16], const GLdouble from[16] ) -{ - to[0] = (GLfloat) from[0]; - to[1] = (GLfloat) from[4]; - to[2] = (GLfloat) from[8]; - to[3] = (GLfloat) from[12]; - to[4] = (GLfloat) from[1]; - to[5] = (GLfloat) from[5]; - to[6] = (GLfloat) from[9]; - to[7] = (GLfloat) from[13]; - to[8] = (GLfloat) from[2]; - to[9] = (GLfloat) from[6]; - to[10] = (GLfloat) from[10]; - to[11] = (GLfloat) from[14]; - to[12] = (GLfloat) from[3]; - to[13] = (GLfloat) from[7]; - to[14] = (GLfloat) from[11]; - to[15] = (GLfloat) from[15]; -} Index: xc/extras/Mesa/src/math/m_matrix.h diff -u xc/extras/Mesa/src/math/m_matrix.h:1.2 xc/extras/Mesa/src/math/m_matrix.h:removed --- xc/extras/Mesa/src/math/m_matrix.h:1.2 Mon Dec 16 11:18:36 2002 +++ xc/extras/Mesa/src/math/m_matrix.h Wed Mar 16 21:00:59 2005 @@ -1,175 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _M_MATRIX_H -#define _M_MATRIX_H - - - -/* Give symbolic names to some of the entries in the matrix to help - * out with the rework of the viewport_map as a matrix transform. - */ -#define MAT_SX 0 -#define MAT_SY 5 -#define MAT_SZ 10 -#define MAT_TX 12 -#define MAT_TY 13 -#define MAT_TZ 14 - -/* - * Different kinds of 4x4 transformation matrices: - */ -#define MATRIX_GENERAL 0 /* general 4x4 matrix */ -#define MATRIX_IDENTITY 1 /* identity matrix */ -#define MATRIX_3D_NO_ROT 2 /* ortho projection and others... */ -#define MATRIX_PERSPECTIVE 3 /* perspective projection matrix */ -#define MATRIX_2D 4 /* 2-D transformation */ -#define MATRIX_2D_NO_ROT 5 /* 2-D scale & translate only */ -#define MATRIX_3D 6 /* 3-D transformation */ - -#define MAT_FLAG_IDENTITY 0 -#define MAT_FLAG_GENERAL 0x1 -#define MAT_FLAG_ROTATION 0x2 -#define MAT_FLAG_TRANSLATION 0x4 -#define MAT_FLAG_UNIFORM_SCALE 0x8 -#define MAT_FLAG_GENERAL_SCALE 0x10 -#define MAT_FLAG_GENERAL_3D 0x20 -#define MAT_FLAG_PERSPECTIVE 0x40 -#define MAT_FLAG_SINGULAR 0x80 -#define MAT_DIRTY_TYPE 0x100 -#define MAT_DIRTY_FLAGS 0x200 -#define MAT_DIRTY_INVERSE 0x400 - -#define MAT_FLAGS_ANGLE_PRESERVING (MAT_FLAG_ROTATION | \ - MAT_FLAG_TRANSLATION | \ - MAT_FLAG_UNIFORM_SCALE) - -#define MAT_FLAGS_LENGTH_PRESERVING (MAT_FLAG_ROTATION | \ - MAT_FLAG_TRANSLATION) - -#define MAT_FLAGS_3D (MAT_FLAG_ROTATION | \ - MAT_FLAG_TRANSLATION | \ - MAT_FLAG_UNIFORM_SCALE | \ - MAT_FLAG_GENERAL_SCALE | \ - MAT_FLAG_GENERAL_3D) - -#define MAT_FLAGS_GEOMETRY (MAT_FLAG_GENERAL | \ - MAT_FLAG_ROTATION | \ - MAT_FLAG_TRANSLATION | \ - MAT_FLAG_UNIFORM_SCALE | \ - MAT_FLAG_GENERAL_SCALE | \ - MAT_FLAG_GENERAL_3D | \ - MAT_FLAG_PERSPECTIVE | \ - MAT_FLAG_SINGULAR) - -#define MAT_DIRTY (MAT_DIRTY_TYPE | \ - MAT_DIRTY_FLAGS | \ - MAT_DIRTY_INVERSE) - -#define TEST_MAT_FLAGS(mat, a) \ - ((MAT_FLAGS_GEOMETRY & (~(a)) & ((mat)->flags) ) == 0) - - -typedef struct { - GLfloat *m; /* 16-byte aligned */ - GLfloat *inv; /* optional, 16-byte aligned */ - GLuint flags; - GLuint type; /* one of the MATRIX_* values */ -} GLmatrix; - - - - -extern void -_math_matrix_ctr( GLmatrix *m ); - -extern void -_math_matrix_dtr( GLmatrix *m ); - -extern void -_math_matrix_alloc_inv( GLmatrix *m ); - -extern void -_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); - -extern void -_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); - -extern void -_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); - -extern void -_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); - -extern void -_math_matrix_rotate( GLmatrix *m, GLfloat angle, - GLfloat x, GLfloat y, GLfloat z ); - -extern void -_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); - -extern void -_math_matrix_ortho( GLmatrix *mat, - GLfloat left, GLfloat right, - GLfloat bottom, GLfloat top, - GLfloat nearval, GLfloat farval ); - -extern void -_math_matrix_frustum( GLmatrix *mat, - GLfloat left, GLfloat right, - GLfloat bottom, GLfloat top, - GLfloat nearval, GLfloat farval ); - -extern void -_math_matrix_set_identity( GLmatrix *dest ); - -extern void -_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); - -extern void -_math_matrix_analyse( GLmatrix *mat ); - -extern void -_math_matrix_print( const GLmatrix *m ); - - - - -/* Related functions that don't actually operate on GLmatrix structs: - */ -extern void -_math_transposef( GLfloat to[16], const GLfloat from[16] ); - -extern void -_math_transposed( GLdouble to[16], const GLdouble from[16] ); - -extern void -_math_transposefd( GLfloat to[16], const GLdouble from[16] ); - - - - -#endif Index: xc/extras/Mesa/src/math/m_norm_tmp.h diff -u xc/extras/Mesa/src/math/m_norm_tmp.h:1.3 xc/extras/Mesa/src/math/m_norm_tmp.h:removed --- xc/extras/Mesa/src/math/m_norm_tmp.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_norm_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,390 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - -/* Functions to tranform a vector of normals. This includes applying - * the transformation matrix, rescaling and normalization. - */ - -/* - * mat - the 4x4 transformation matrix - * scale - uniform scale factor of the transformation matrix (not always used) - * in - the source vector of normals - * lengths - length of each incoming normal (may be NULL) (a display list - * optimization) - * dest - the destination vector of normals - */ -static void _XFORMAPI -TAG(transform_normalize_normals)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - const GLfloat *m = mat->inv; - GLfloat m0 = m[0], m4 = m[4], m8 = m[8]; - GLfloat m1 = m[1], m5 = m[5], m9 = m[9]; - GLfloat m2 = m[2], m6 = m[6], m10 = m[10]; - GLuint i; - - if (!lengths) { - STRIDE_LOOP { - GLfloat tx, ty, tz; - { - const GLfloat ux = from[0], uy = from[1], uz = from[2]; - tx = ux * m0 + uy * m1 + uz * m2; - ty = ux * m4 + uy * m5 + uz * m6; - tz = ux * m8 + uy * m9 + uz * m10; - } - { - GLdouble len = tx*tx + ty*ty + tz*tz; - if (len > 1e-20) { - GLdouble scale = 1.0 / GL_SQRT(len); - out[i][0] = (GLfloat) (tx * scale); - out[i][1] = (GLfloat) (ty * scale); - out[i][2] = (GLfloat) (tz * scale); - } - else { - out[i][0] = out[i][1] = out[i][2] = 0; - } - } - } - } - else { - if (scale != 1.0) { - m0 *= scale, m4 *= scale, m8 *= scale; - m1 *= scale, m5 *= scale, m9 *= scale; - m2 *= scale, m6 *= scale, m10 *= scale; - } - - STRIDE_LOOP { - GLfloat tx, ty, tz; - { - const GLfloat ux = from[0], uy = from[1], uz = from[2]; - tx = ux * m0 + uy * m1 + uz * m2; - ty = ux * m4 + uy * m5 + uz * m6; - tz = ux * m8 + uy * m9 + uz * m10; - } - { - GLfloat len = lengths[i]; - out[i][0] = tx * len; - out[i][1] = ty * len; - out[i][2] = tz * len; - } - } - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - const GLfloat *m = mat->inv; - GLfloat m0 = m[0]; - GLfloat m5 = m[5]; - GLfloat m10 = m[10]; - GLuint i; - - if (!lengths) { - STRIDE_LOOP { - GLfloat tx, ty, tz; - { - const GLfloat ux = from[0], uy = from[1], uz = from[2]; - tx = ux * m0 ; - ty = uy * m5 ; - tz = uz * m10; - } - { - GLdouble len = tx*tx + ty*ty + tz*tz; - if (len > 1e-20) { - GLdouble scale = 1.0 / GL_SQRT(len); - out[i][0] = (GLfloat) (tx * scale); - out[i][1] = (GLfloat) (ty * scale); - out[i][2] = (GLfloat) (tz * scale); - } - else { - out[i][0] = out[i][1] = out[i][2] = 0; - } - } - } - } - else { - m0 *= scale; - m5 *= scale; - m10 *= scale; - - STRIDE_LOOP { - GLfloat tx, ty, tz; - { - const GLfloat ux = from[0], uy = from[1], uz = from[2]; - tx = ux * m0 ; - ty = uy * m5 ; - tz = uz * m10; - } - { - GLfloat len = lengths[i]; - out[i][0] = tx * len; - out[i][1] = ty * len; - out[i][2] = tz * len; - } - } - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - const GLfloat *m = mat->inv; - const GLfloat m0 = scale*m[0]; - const GLfloat m5 = scale*m[5]; - const GLfloat m10 = scale*m[10]; - GLuint i; - - (void) lengths; - - STRIDE_LOOP { - GLfloat ux = from[0], uy = from[1], uz = from[2]; - out[i][0] = ux * m0; - out[i][1] = uy * m5; - out[i][2] = uz * m10; - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(transform_rescale_normals)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - /* Since we are unlikely to have < 3 vertices in the buffer, - * it makes sense to pre-multiply by scale. - */ - const GLfloat *m = mat->inv; - const GLfloat m0 = scale*m[0], m4 = scale*m[4], m8 = scale*m[8]; - const GLfloat m1 = scale*m[1], m5 = scale*m[5], m9 = scale*m[9]; - const GLfloat m2 = scale*m[2], m6 = scale*m[6], m10 = scale*m[10]; - GLuint i; - - (void) lengths; - - STRIDE_LOOP { - GLfloat ux = from[0], uy = from[1], uz = from[2]; - out[i][0] = ux * m0 + uy * m1 + uz * m2; - out[i][1] = ux * m4 + uy * m5 + uz * m6; - out[i][2] = ux * m8 + uy * m9 + uz * m10; - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(transform_normals_no_rot)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - const GLfloat *m = mat->inv; - const GLfloat m0 = m[0]; - const GLfloat m5 = m[5]; - const GLfloat m10 = m[10]; - GLuint i; - - (void) scale; - (void) lengths; - - STRIDE_LOOP { - GLfloat ux = from[0], uy = from[1], uz = from[2]; - out[i][0] = ux * m0; - out[i][1] = uy * m5; - out[i][2] = uz * m10; - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(transform_normals)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - const GLfloat *m = mat->inv; - const GLfloat m0 = m[0], m4 = m[4], m8 = m[8]; - const GLfloat m1 = m[1], m5 = m[5], m9 = m[9]; - const GLfloat m2 = m[2], m6 = m[6], m10 = m[10]; - GLuint i; - - (void) scale; - (void) lengths; - - STRIDE_LOOP { - GLfloat ux = from[0], uy = from[1], uz = from[2]; - out[i][0] = ux * m0 + uy * m1 + uz * m2; - out[i][1] = ux * m4 + uy * m5 + uz * m6; - out[i][2] = ux * m8 + uy * m9 + uz * m10; - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(normalize_normals)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - GLuint i; - - (void) mat; - (void) scale; - - if (lengths) { - STRIDE_LOOP { - const GLfloat x = from[0], y = from[1], z = from[2]; - GLfloat invlen = lengths[i]; - out[i][0] = x * invlen; - out[i][1] = y * invlen; - out[i][2] = z * invlen; - } - } - else { - STRIDE_LOOP { - const GLfloat x = from[0], y = from[1], z = from[2]; - GLdouble len = x * x + y * y + z * z; - if (len > 1e-50) { - len = 1.0 / GL_SQRT(len); - out[i][0] = (GLfloat) (x * len); - out[i][1] = (GLfloat) (y * len); - out[i][2] = (GLfloat) (z * len); - } - else { - out[i][0] = x; - out[i][1] = y; - out[i][2] = z; - } - } - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(rescale_normals)( const GLmatrix *mat, - GLfloat scale, - const GLvector4f *in, - const GLfloat *lengths, - GLvector4f *dest ) -{ - GLfloat (*out)[4] = (GLfloat (*)[4])dest->start; - const GLfloat *from = in->start; - const GLuint stride = in->stride; - const GLuint count = in->count; - GLuint i; - - (void) mat; - (void) lengths; - - STRIDE_LOOP { - SCALE_SCALAR_3V( out[i], scale, from ); - } - dest->count = in->count; -} - - -static void _XFORMAPI -TAG(init_c_norm_transform)( void ) -{ - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] = - TAG(transform_normals_no_rot); - - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] = - TAG(transform_rescale_normals_no_rot); - - _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] = - TAG(transform_normalize_normals_no_rot); - - _mesa_normal_tab[NORM_TRANSFORM] = - TAG(transform_normals); - - _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] = - TAG(transform_rescale_normals); - - _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] = - TAG(transform_normalize_normals); - - _mesa_normal_tab[NORM_RESCALE] = - TAG(rescale_normals); - - _mesa_normal_tab[NORM_NORMALIZE] = - TAG(normalize_normals); -} Index: xc/extras/Mesa/src/math/m_trans_tmp.h diff -u xc/extras/Mesa/src/math/m_trans_tmp.h:1.3 xc/extras/Mesa/src/math/m_trans_tmp.h:removed --- xc/extras/Mesa/src/math/m_trans_tmp.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_trans_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,287 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.0.2 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -/* KW: This file also included by tnl/trans_elt.c to build code - * specific to the implementation of array-elements in the - * tnl module. - */ - - -#ifdef DEST_4F -static void DEST_4F( GLfloat (*t)[4], - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - - (void) first; - (void) start; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - if (SZ >= 1) t[i][0] = TRX_4F(f, 0); - if (SZ >= 2) t[i][1] = TRX_4F(f, 1); - if (SZ >= 3) t[i][2] = TRX_4F(f, 2); - if (SZ == 4) t[i][3] = TRX_4F(f, 3); else t[i][3] = 1.0; - } - } -} -#endif - - - -#ifdef DEST_4FC -static void DEST_4FC( GLfloat (*t)[4], - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - - (void) first; - (void) start; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - if (SZ >= 1) t[i][0] = TRX_4FC(f, 0); - if (SZ >= 2) t[i][1] = TRX_4FC(f, 1); - if (SZ >= 3) t[i][2] = TRX_4FC(f, 2); - if (SZ == 4) t[i][3] = TRX_4FC(f, 3); else t[i][3] = 1.0; - } - } -} -#endif - - -#ifdef DEST_3F -static void DEST_3F( GLfloat (*t)[3], - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - (void) first; - (void) start; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - t[i][0] = TRX_3F(f, 0); - t[i][1] = TRX_3F(f, 1); - t[i][2] = TRX_3F(f, 2); - } - } -} -#endif - -#ifdef DEST_1F -static void DEST_1F( GLfloat *t, - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - (void) first; - (void) start; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - t[i] = TRX_1F(f, 0); - } - } -} -#endif - -#ifdef DEST_4UB -static void DEST_4UB( GLubyte (*t)[4], - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - (void) start; - (void) first; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - if (SZ >= 1) TRX_UB(t[i][0], f, 0); - if (SZ >= 2) TRX_UB(t[i][1], f, 1); - if (SZ >= 3) TRX_UB(t[i][2], f, 2); - if (SZ == 4) TRX_UB(t[i][3], f, 3); else t[i][3] = 255; - } - } -} -#endif - - -#ifdef DEST_4US -static void DEST_4US( GLushort (*t)[4], - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ((GLubyte *) ptr + SRC_START * stride); - const GLubyte *first = f; - GLuint i; - (void) start; - (void) first; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - if (SZ >= 1) TRX_US(t[i][0], f, 0); - if (SZ >= 2) TRX_US(t[i][1], f, 1); - if (SZ >= 3) TRX_US(t[i][2], f, 2); - if (SZ == 4) TRX_US(t[i][3], f, 3); else t[i][3] = 65535; - } - } -} -#endif - - -#ifdef DEST_1UB -static void DEST_1UB( GLubyte *t, - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - (void) start; - (void) first; - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - TRX_UB(t[i], f, 0); - } - } -} -#endif - - -#ifdef DEST_1UI -static void DEST_1UI( GLuint *t, - CONST void *ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) ptr + SRC_START * stride; - const GLubyte *first = f; - GLuint i; - (void) start; - (void) first; - - for (i = DST_START ; i < n ; i++, NEXT_F) { - CHECK { - NEXT_F2; - t[i] = TRX_UI(f, 0); - } - } -} -#endif - - -static void INIT(void) -{ -#ifdef DEST_1UI - ASSERT(SZ == 1); - TAB(_1ui)[SRC_IDX] = DEST_1UI; -#endif -#ifdef DEST_1UB - ASSERT(SZ == 1); - TAB(_1ub)[SRC_IDX] = DEST_1UB; -#endif -#ifdef DEST_1F - ASSERT(SZ == 1); - TAB(_1f)[SRC_IDX] = DEST_1F; -#endif -#ifdef DEST_3F - ASSERT(SZ == 3); - TAB(_3f)[SRC_IDX] = DEST_3F; -#endif -#ifdef DEST_4UB - TAB(_4ub)[SZ][SRC_IDX] = DEST_4UB; -#endif -#ifdef DEST_4US - TAB(_4us)[SZ][SRC_IDX] = DEST_4US; -#endif -#ifdef DEST_4F - TAB(_4f)[SZ][SRC_IDX] = DEST_4F; -#endif -#ifdef DEST_4FC - TAB(_4fc)[SZ][SRC_IDX] = DEST_4FC; -#endif - -} - - -#ifdef INIT -#undef INIT -#endif -#ifdef DEST_1UI -#undef DEST_1UI -#endif -#ifdef DEST_1UB -#undef DEST_1UB -#endif -#ifdef DEST_4UB -#undef DEST_4UB -#endif -#ifdef DEST_4US -#undef DEST_4US -#endif -#ifdef DEST_3F -#undef DEST_3F -#endif -#ifdef DEST_4F -#undef DEST_4F -#endif -#ifdef DEST_4FC -#undef DEST_4FC -#endif -#ifdef DEST_1F -#undef DEST_1F -#endif -#ifdef SZ -#undef SZ -#endif -#ifdef TAG -#undef TAG -#endif Index: xc/extras/Mesa/src/math/m_translate.c diff -u xc/extras/Mesa/src/math/m_translate.c:1.3 xc/extras/Mesa/src/math/m_translate.c:removed --- xc/extras/Mesa/src/math/m_translate.c:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_translate.c Wed Mar 16 21:00:59 2005 @@ -1,718 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 4.1 - * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -#include "glheader.h" -#include "mtypes.h" /* GLchan hack */ -#include "colormac.h" -#include "mmath.h" - -#include "m_translate.h" - - - -typedef void (*trans_1f_func)(GLfloat *to, - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_1ui_func)(GLuint *to, - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_1ub_func)(GLubyte *to, - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_4ub_func)(GLubyte (*to)[4], - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_4us_func)(GLushort (*to)[4], - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_4f_func)(GLfloat (*to)[4], - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - -typedef void (*trans_3f_func)(GLfloat (*to)[3], - CONST void *ptr, - GLuint stride, - GLuint start, - GLuint n ); - - - - -#define TYPE_IDX(t) ((t) & 0xf) -#define MAX_TYPES TYPE_IDX(GL_DOUBLE)+1 /* 0xa + 1 */ - - -/* This macro is used on other systems, so undefine it for this module */ - -#undef CHECK - -static trans_1f_func _math_trans_1f_tab[MAX_TYPES]; -static trans_1ui_func _math_trans_1ui_tab[MAX_TYPES]; -static trans_1ub_func _math_trans_1ub_tab[MAX_TYPES]; -static trans_3f_func _math_trans_3f_tab[MAX_TYPES]; -static trans_4ub_func _math_trans_4ub_tab[5][MAX_TYPES]; -static trans_4us_func _math_trans_4us_tab[5][MAX_TYPES]; -static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES]; -static trans_4f_func _math_trans_4fc_tab[5][MAX_TYPES]; - - -#define PTR_ELT(ptr, elt) (((SRC *)ptr)[elt]) - - -#define TAB(x) _math_trans##x##_tab -#define ARGS GLuint start, GLuint n -#define SRC_START start -#define DST_START 0 -#define STRIDE stride -#define NEXT_F f += stride -#define NEXT_F2 -#define CHECK - - - - -/* GL_BYTE - */ -#define SRC GLbyte -#define SRC_IDX TYPE_IDX(GL_BYTE) -#define TRX_3F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4FC(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_UB(ub, f,n) ub = BYTE_TO_UBYTE( PTR_ELT(f,n) ) -#define TRX_US(ch, f,n) ch = BYTE_TO_USHORT( PTR_ELT(f,n) ) -#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n)) - - -#define SZ 4 -#define INIT init_trans_4_GLbyte_raw -#define DEST_4F trans_4_GLbyte_4f_raw -#define DEST_4FC trans_4_GLbyte_4fc_raw -#define DEST_4UB trans_4_GLbyte_4ub_raw -#define DEST_4US trans_4_GLbyte_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLbyte_raw -#define DEST_4F trans_3_GLbyte_4f_raw -#define DEST_4FC trans_3_GLbyte_4fc_raw -#define DEST_4UB trans_3_GLbyte_4ub_raw -#define DEST_4US trans_3_GLbyte_4us_raw -#define DEST_3F trans_3_GLbyte_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLbyte_raw -#define DEST_4F trans_2_GLbyte_4f_raw -#define DEST_4FC trans_2_GLbyte_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLbyte_raw -#define DEST_4F trans_1_GLbyte_4f_raw -#define DEST_4FC trans_1_GLbyte_4fc_raw -#define DEST_1UB trans_1_GLbyte_1ub_raw -#define DEST_1UI trans_1_GLbyte_1ui_raw -#include "m_trans_tmp.h" - -#undef SRC -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI -#undef SRC_IDX - - -/* GL_UNSIGNED_BYTE - */ -#define SRC GLubyte -#define SRC_IDX TYPE_IDX(GL_UNSIGNED_BYTE) -#define TRX_3F(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n)) -#define TRX_4F(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n)) -#define TRX_4FC(f,n) UBYTE_TO_FLOAT(PTR_ELT(f,n)) -#define TRX_UB(ub, f,n) ub = PTR_ELT(f,n) -#define TRX_US(us, f,n) us = UBYTE_TO_USHORT(PTR_ELT(f,n)) -#define TRX_UI(f,n) (GLuint)PTR_ELT(f,n) - -/* 4ub->4ub handled in special case below. - */ -#define SZ 4 -#define INIT init_trans_4_GLubyte_raw -#define DEST_4F trans_4_GLubyte_4f_raw -#define DEST_4FC trans_4_GLubyte_4fc_raw -#define DEST_4US trans_4_GLubyte_4us_raw -#include "m_trans_tmp.h" - - -#define SZ 3 -#define INIT init_trans_3_GLubyte_raw -#define DEST_4UB trans_3_GLubyte_4ub_raw -#define DEST_4US trans_3_GLubyte_4us_raw -#define DEST_3F trans_3_GLubyte_3f_raw -#define DEST_4F trans_3_GLubyte_4f_raw -#define DEST_4FC trans_3_GLubyte_4fc_raw -#include "m_trans_tmp.h" - - -#define SZ 1 -#define INIT init_trans_1_GLubyte_raw -#define DEST_1UI trans_1_GLubyte_1ui_raw -#define DEST_1UB trans_1_GLubyte_1ub_raw -#include "m_trans_tmp.h" - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -/* GL_SHORT - */ -#define SRC GLshort -#define SRC_IDX TYPE_IDX(GL_SHORT) -#define TRX_3F(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_4FC(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_UB(ub, f,n) ub = SHORT_TO_UBYTE(PTR_ELT(f,n)) -#define TRX_US(us, f,n) us = SHORT_TO_USHORT(PTR_ELT(f,n)) -#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n)) - - -#define SZ 4 -#define INIT init_trans_4_GLshort_raw -#define DEST_4F trans_4_GLshort_4f_raw -#define DEST_4FC trans_4_GLshort_4fc_raw -#define DEST_4UB trans_4_GLshort_4ub_raw -#define DEST_4US trans_4_GLshort_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLshort_raw -#define DEST_4F trans_3_GLshort_4f_raw -#define DEST_4FC trans_3_GLshort_4fc_raw -#define DEST_4UB trans_3_GLshort_4ub_raw -#define DEST_4US trans_3_GLshort_4us_raw -#define DEST_3F trans_3_GLshort_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLshort_raw -#define DEST_4F trans_2_GLshort_4f_raw -#define DEST_4FC trans_2_GLshort_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLshort_raw -#define DEST_4F trans_1_GLshort_4f_raw -#define DEST_4FC trans_1_GLshort_4fc_raw -#define DEST_1UB trans_1_GLshort_1ub_raw -#define DEST_1UI trans_1_GLshort_1ui_raw -#include "m_trans_tmp.h" - - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -/* GL_UNSIGNED_SHORT - */ -#define SRC GLushort -#define SRC_IDX TYPE_IDX(GL_UNSIGNED_SHORT) -#define TRX_3F(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_4FC(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_UB(ub,f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 8) -#define TRX_US(us,f,n) us = (GLushort) (PTR_ELT(f,n) >> 8) -#define TRX_UI(f,n) (GLuint) PTR_ELT(f,n) - - -#define SZ 4 -#define INIT init_trans_4_GLushort_raw -#define DEST_4F trans_4_GLushort_4f_raw -#define DEST_4FC trans_4_GLushort_4fc_raw -#define DEST_4UB trans_4_GLushort_4ub_raw -#define DEST_4US trans_4_GLushort_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLushort_raw -#define DEST_4F trans_3_GLushort_4f_raw -#define DEST_4FC trans_3_GLushort_4fc_raw -#define DEST_4UB trans_3_GLushort_4ub_raw -#define DEST_4US trans_3_GLushort_4us_raw -#define DEST_3F trans_3_GLushort_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLushort_raw -#define DEST_4F trans_2_GLushort_4f_raw -#define DEST_4FC trans_2_GLushort_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLushort_raw -#define DEST_4F trans_1_GLushort_4f_raw -#define DEST_4FC trans_1_GLushort_4fc_raw -#define DEST_1UB trans_1_GLushort_1ub_raw -#define DEST_1UI trans_1_GLushort_1ui_raw -#include "m_trans_tmp.h" - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -/* GL_INT - */ -#define SRC GLint -#define SRC_IDX TYPE_IDX(GL_INT) -#define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_4FC(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_UB(ub, f,n) ub = INT_TO_UBYTE(PTR_ELT(f,n)) -#define TRX_US(us, f,n) us = INT_TO_USHORT(PTR_ELT(f,n)) -#define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n)) - - -#define SZ 4 -#define INIT init_trans_4_GLint_raw -#define DEST_4F trans_4_GLint_4f_raw -#define DEST_4FC trans_4_GLint_4fc_raw -#define DEST_4UB trans_4_GLint_4ub_raw -#define DEST_4US trans_4_GLint_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLint_raw -#define DEST_4F trans_3_GLint_4f_raw -#define DEST_4FC trans_3_GLint_4fc_raw -#define DEST_4UB trans_3_GLint_4ub_raw -#define DEST_4US trans_3_GLint_4us_raw -#define DEST_3F trans_3_GLint_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLint_raw -#define DEST_4F trans_2_GLint_4f_raw -#define DEST_4FC trans_2_GLint_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLint_raw -#define DEST_4F trans_1_GLint_4f_raw -#define DEST_4FC trans_1_GLint_4fc_raw -#define DEST_1UB trans_1_GLint_1ub_raw -#define DEST_1UI trans_1_GLint_1ui_raw -#include "m_trans_tmp.h" - - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -/* GL_UNSIGNED_INT - */ -#define SRC GLuint -#define SRC_IDX TYPE_IDX(GL_UNSIGNED_INT) -#define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) ) -#define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_4FC(f,n) (GLfloat)( PTR_ELT(f,n) ) -#define TRX_UB(ub, f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 24) -#define TRX_US(us, f,n) us = (GLshort) (PTR_ELT(f,n) >> 16) -#define TRX_UI(f,n) PTR_ELT(f,n) - - -#define SZ 4 -#define INIT init_trans_4_GLuint_raw -#define DEST_4F trans_4_GLuint_4f_raw -#define DEST_4FC trans_4_GLuint_4fc_raw -#define DEST_4UB trans_4_GLuint_4ub_raw -#define DEST_4US trans_4_GLuint_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLuint_raw -#define DEST_4F trans_3_GLuint_4f_raw -#define DEST_4FC trans_3_GLuint_4fc_raw -#define DEST_4UB trans_3_GLuint_4ub_raw -#define DEST_4US trans_3_GLuint_4us_raw -#define DEST_3F trans_3_GLuint_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLuint_raw -#define DEST_4F trans_2_GLuint_4f_raw -#define DEST_4FC trans_2_GLuint_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLuint_raw -#define DEST_4F trans_1_GLuint_4f_raw -#define DEST_4FC trans_1_GLuint_4fc_raw -#define DEST_1UB trans_1_GLuint_1ub_raw -#define DEST_1UI trans_1_GLuint_1ui_raw -#include "m_trans_tmp.h" - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -/* GL_DOUBLE - */ -#define SRC GLdouble -#define SRC_IDX TYPE_IDX(GL_DOUBLE) -#define TRX_3F(f,n) (GLfloat) PTR_ELT(f,n) -#define TRX_4F(f,n) (GLfloat) PTR_ELT(f,n) -#define TRX_4FC(f,n) (GLfloat) PTR_ELT(f,n) -#define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n)) -#define TRX_US(us,f,n) UNCLAMPED_FLOAT_TO_USHORT(us, PTR_ELT(f,n)) -#define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n) -#define TRX_1F(f,n) (GLfloat) PTR_ELT(f,n) - - -#define SZ 4 -#define INIT init_trans_4_GLdouble_raw -#define DEST_4F trans_4_GLdouble_4f_raw -#define DEST_4FC trans_4_GLdouble_4fc_raw -#define DEST_4UB trans_4_GLdouble_4ub_raw -#define DEST_4US trans_4_GLdouble_4us_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLdouble_raw -#define DEST_4F trans_3_GLdouble_4f_raw -#define DEST_4FC trans_3_GLdouble_4fc_raw -#define DEST_4UB trans_3_GLdouble_4ub_raw -#define DEST_4US trans_3_GLdouble_4us_raw -#define DEST_3F trans_3_GLdouble_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLdouble_raw -#define DEST_4F trans_2_GLdouble_4f_raw -#define DEST_4FC trans_2_GLdouble_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLdouble_raw -#define DEST_4F trans_1_GLdouble_4f_raw -#define DEST_4FC trans_1_GLdouble_4fc_raw -#define DEST_1UB trans_1_GLdouble_1ub_raw -#define DEST_1UI trans_1_GLdouble_1ui_raw -#define DEST_1F trans_1_GLdouble_1f_raw -#include "m_trans_tmp.h" - -#undef SRC -#undef SRC_IDX - -/* GL_FLOAT - */ -#define SRC GLfloat -#define SRC_IDX TYPE_IDX(GL_FLOAT) -#define SZ 4 -#define INIT init_trans_4_GLfloat_raw -#define DEST_4UB trans_4_GLfloat_4ub_raw -#define DEST_4US trans_4_GLfloat_4us_raw -#define DEST_4F trans_4_GLfloat_4f_raw -#define DEST_4FC trans_4_GLfloat_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 3 -#define INIT init_trans_3_GLfloat_raw -#define DEST_4F trans_3_GLfloat_4f_raw -#define DEST_4FC trans_3_GLfloat_4fc_raw -#define DEST_4UB trans_3_GLfloat_4ub_raw -#define DEST_4US trans_3_GLfloat_4us_raw -#define DEST_3F trans_3_GLfloat_3f_raw -#include "m_trans_tmp.h" - -#define SZ 2 -#define INIT init_trans_2_GLfloat_raw -#define DEST_4F trans_2_GLfloat_4f_raw -#define DEST_4FC trans_2_GLfloat_4fc_raw -#include "m_trans_tmp.h" - -#define SZ 1 -#define INIT init_trans_1_GLfloat_raw -#define DEST_4F trans_1_GLfloat_4f_raw -#define DEST_4FC trans_1_GLfloat_4fc_raw -#define DEST_1UB trans_1_GLfloat_1ub_raw -#define DEST_1UI trans_1_GLfloat_1ui_raw -#define DEST_1F trans_1_GLfloat_1f_raw - -#include "m_trans_tmp.h" - -#undef SRC -#undef SRC_IDX -#undef TRX_3F -#undef TRX_4F -#undef TRX_4FC -#undef TRX_UB -#undef TRX_US -#undef TRX_UI - - -static void trans_4_GLubyte_4ub_raw(GLubyte (*t)[4], - CONST void *Ptr, - GLuint stride, - ARGS ) -{ - const GLubyte *f = (GLubyte *) Ptr + SRC_START * stride; - GLuint i; - - if (((((long) f | (long) stride)) & 3L) == 0L) { - /* Aligned. - */ - for (i = DST_START ; i < n ; i++, f += stride) { - COPY_4UBV( t[i], f ); - } - } else { - for (i = DST_START ; i < n ; i++, f += stride) { - t[i][0] = f[0]; - t[i][1] = f[1]; - t[i][2] = f[2]; - t[i][3] = f[3]; - } - } -} - - -static void init_translate_raw(void) -{ - MEMSET( TAB(_1ui), 0, sizeof(TAB(_1ui)) ); - MEMSET( TAB(_1ub), 0, sizeof(TAB(_1ub)) ); - MEMSET( TAB(_3f), 0, sizeof(TAB(_3f)) ); - MEMSET( TAB(_4ub), 0, sizeof(TAB(_4ub)) ); - MEMSET( TAB(_4us), 0, sizeof(TAB(_4us)) ); - MEMSET( TAB(_4f), 0, sizeof(TAB(_4f)) ); - MEMSET( TAB(_4fc), 0, sizeof(TAB(_4fc)) ); - - init_trans_4_GLbyte_raw(); - init_trans_3_GLbyte_raw(); - init_trans_2_GLbyte_raw(); - init_trans_1_GLbyte_raw(); - init_trans_1_GLubyte_raw(); - init_trans_3_GLubyte_raw(); - init_trans_4_GLubyte_raw(); - init_trans_4_GLshort_raw(); - init_trans_3_GLshort_raw(); - init_trans_2_GLshort_raw(); - init_trans_1_GLshort_raw(); - init_trans_4_GLushort_raw(); - init_trans_3_GLushort_raw(); - init_trans_2_GLushort_raw(); - init_trans_1_GLushort_raw(); - init_trans_4_GLint_raw(); - init_trans_3_GLint_raw(); - init_trans_2_GLint_raw(); - init_trans_1_GLint_raw(); - init_trans_4_GLuint_raw(); - init_trans_3_GLuint_raw(); - init_trans_2_GLuint_raw(); - init_trans_1_GLuint_raw(); - init_trans_4_GLdouble_raw(); - init_trans_3_GLdouble_raw(); - init_trans_2_GLdouble_raw(); - init_trans_1_GLdouble_raw(); - init_trans_4_GLfloat_raw(); - init_trans_3_GLfloat_raw(); - init_trans_2_GLfloat_raw(); - init_trans_1_GLfloat_raw(); - - TAB(_4ub)[4][TYPE_IDX(GL_UNSIGNED_BYTE)] = trans_4_GLubyte_4ub_raw; -} - - -#undef TAB -#undef CLASS -#undef ARGS -#undef CHECK -#undef SRC_START -#undef DST_START -#undef NEXT_F -#undef NEXT_F2 - - - - - -void _math_init_translate( void ) -{ - init_translate_raw(); -} - - - -void _math_trans_1f(GLfloat *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ) -{ - _math_trans_1f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_1ui(GLuint *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ) -{ - _math_trans_1ui_tab[TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_1ub(GLubyte *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ) -{ - _math_trans_1ub_tab[TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - - -void _math_trans_4ub(GLubyte (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ) -{ - _math_trans_4ub_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_4chan( GLchan (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ) -{ -#if CHAN_TYPE == GL_UNSIGNED_BYTE - _math_trans_4ub( to, ptr, stride, type, size, start, n ); -#elif CHAN_TYPE == GL_UNSIGNED_SHORT - _math_trans_4us( to, ptr, stride, type, size, start, n ); -#elif CHAN_TYPE == GL_FLOAT - _math_trans_4fc( to, ptr, stride, type, size, start, n ); -#endif -} - -void _math_trans_4us(GLushort (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ) -{ - _math_trans_4us_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_4f(GLfloat (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ) -{ - _math_trans_4f_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_4fc(GLfloat (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ) -{ - _math_trans_4fc_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n ); -} - -void _math_trans_3f(GLfloat (*to)[3], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ) -{ - _math_trans_3f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n ); -} Index: xc/extras/Mesa/src/math/m_translate.h diff -u xc/extras/Mesa/src/math/m_translate.h:1.3 xc/extras/Mesa/src/math/m_translate.h:removed --- xc/extras/Mesa/src/math/m_translate.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_translate.h Wed Mar 16 21:00:59 2005 @@ -1,106 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _M_TRANSLATE_H_ -#define _M_TRANSLATE_H_ - -#include "config.h" -#include "mtypes.h" /* hack for GLchan */ - - - -extern void _math_trans_1f(GLfloat *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ); - -extern void _math_trans_1ui(GLuint *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ); - -extern void _math_trans_1ub(GLubyte *to, - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ); - -extern void _math_trans_4ub(GLubyte (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ); - -extern void _math_trans_4chan( GLchan (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ); - -extern void _math_trans_4us(GLushort (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ); - -extern void _math_trans_4f(GLfloat (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ); - -extern void _math_trans_4fc(GLfloat (*to)[4], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint size, - GLuint start, - GLuint n ); - -extern void _math_trans_3f(GLfloat (*to)[3], - CONST void *ptr, - GLuint stride, - GLenum type, - GLuint start, - GLuint n ); - -extern void _math_init_translate( void ); - - -#endif Index: xc/extras/Mesa/src/math/m_vector.c diff -u xc/extras/Mesa/src/math/m_vector.c:1.3 xc/extras/Mesa/src/math/m_vector.c:removed --- xc/extras/Mesa/src/math/m_vector.c:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_vector.c Wed Mar 16 21:00:59 2005 @@ -1,429 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -#include "glheader.h" -#include "imports.h" -#include "macros.h" -#include "imports.h" - -#include "m_vector.h" - - - -/* - * Given a vector [count][4] of floats, set all the [][elt] values - * to 0 (if elt = 0, 1, 2) or 1.0 (if elt = 3). - */ -void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint count, GLuint elt ) -{ - static const GLubyte elem_bits[4] = { - VEC_DIRTY_0, - VEC_DIRTY_1, - VEC_DIRTY_2, - VEC_DIRTY_3 - }; - static const GLfloat clean[4] = { 0, 0, 0, 1 }; - const GLfloat v = clean[elt]; - GLfloat (*data)[4] = (GLfloat (*)[4])vec->start; - GLuint i; - - for (i = 0 ; i < count ; i++) - data[i][elt] = v; - - vec->flags &= ~elem_bits[elt]; -} - -static const GLubyte size_bits[5] = { - 0, - VEC_SIZE_1, - VEC_SIZE_2, - VEC_SIZE_3, - VEC_SIZE_4, -}; - - - -/* - * Initialize GLvector objects. - * Input: v - the vector object to initialize. - * flags - bitwise-OR of VEC_* flags - * storage - pointer to storage for the vector's data - */ - - -void _mesa_vector4f_init( GLvector4f *v, GLuint flags, GLfloat (*storage)[4] ) -{ - v->stride = 4 * sizeof(GLfloat); - v->size = 2; /* may change: 2-4 for vertices and 1-4 for texcoords */ - v->data = storage; - v->start = (GLfloat *) storage; - v->count = 0; - v->flags = size_bits[4] | flags ; -} - -void _mesa_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*storage)[3] ) -{ - v->stride = 3 * sizeof(GLfloat); - v->data = storage; - v->start = (GLfloat *) storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector1f_init( GLvector1f *v, GLuint flags, GLfloat *storage ) -{ - v->stride = 1*sizeof(GLfloat); - v->data = storage; - v->start = (GLfloat *)storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags, GLubyte (*storage)[4] ) -{ - v->stride = 4 * sizeof(GLubyte); - v->data = storage; - v->start = (GLubyte *) storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags, GLchan (*storage)[4] ) -{ - v->stride = 4 * sizeof(GLchan); - v->data = storage; - v->start = (GLchan *) storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector4us_init( GLvector4us *v, GLuint flags, GLushort (*storage)[4] ) -{ - v->stride = 4 * sizeof(GLushort); - v->data = storage; - v->start = (GLushort *) storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage ) -{ - v->stride = 1 * sizeof(GLubyte); - v->data = storage; - v->start = (GLubyte *) storage; - v->count = 0; - v->flags = flags ; -} - -void _mesa_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ) -{ - v->stride = 1 * sizeof(GLuint); - v->data = storage; - v->start = (GLuint *) storage; - v->count = 0; - v->flags = flags ; -} - - -/* - * Initialize GLvector objects and allocate storage. - * Input: v - the vector object - * sz - unused???? - * flags - bitwise-OR of VEC_* flags - * count - number of elements to allocate in vector - * alignment - desired memory alignment for the data (in bytes) - */ - - -void _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 4 * sizeof(GLfloat); - v->size = 2; - v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLfloat), alignment ); - v->start = (GLfloat *) v->storage; - v->data = (GLfloat (*)[4]) v->storage; - v->count = 0; - v->flags = size_bits[4] | flags | VEC_MALLOC ; -} - -void _mesa_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 3 * sizeof(GLfloat); - v->storage = ALIGN_MALLOC( count * 3 * sizeof(GLfloat), alignment ); - v->start = (GLfloat *) v->storage; - v->data = (GLfloat (*)[3]) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = sizeof(GLfloat); - v->storage = v->start = (GLfloat *) - ALIGN_MALLOC( count * sizeof(GLfloat), alignment ); - v->data = v->start; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 4 * sizeof(GLubyte); - v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLubyte), alignment ); - v->start = (GLubyte *) v->storage; - v->data = (GLubyte (*)[4]) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 4 * sizeof(GLchan); - v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLchan), alignment ); - v->start = (GLchan *) v->storage; - v->data = (GLchan (*)[4]) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 4 * sizeof(GLushort); - v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLushort), alignment ); - v->start = (GLushort *) v->storage; - v->data = (GLushort (*)[4]) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 1 * sizeof(GLubyte); - v->storage = ALIGN_MALLOC( count * sizeof(GLubyte), alignment ); - v->start = (GLubyte *) v->storage; - v->data = (GLubyte *) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - -void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, - GLuint alignment ) -{ - v->stride = 1 * sizeof(GLuint); - v->storage = ALIGN_MALLOC( count * sizeof(GLuint), alignment ); - v->start = (GLuint *) v->storage; - v->data = (GLuint *) v->storage; - v->count = 0; - v->flags = flags | VEC_MALLOC ; -} - - - -/* - * Vector deallocation. Free whatever memory is pointed to by the - * vector's storage field if the VEC_MALLOC flag is set. - * DO NOT free the GLvector object itself, though. - */ - - -void _mesa_vector4f_free( GLvector4f *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector3f_free( GLvector3f *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = 0; - v->start = 0; - v->storage = 0; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector1f_free( GLvector1f *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector4ub_free( GLvector4ub *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector4chan_free( GLvector4chan *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector4us_free( GLvector4us *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector1ub_free( GLvector1ub *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - -void _mesa_vector1ui_free( GLvector1ui *v ) -{ - if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); - v->data = NULL; - v->start = NULL; - v->storage = NULL; - v->flags &= ~VEC_MALLOC; - } -} - - -/* - * For debugging - */ -void _mesa_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling ) -{ - GLfloat c[4] = { 0, 0, 0, 1 }; - const char *templates[5] = { - "%d:\t0, 0, 0, 1\n", - "%d:\t%f, 0, 0, 1\n", - "%d:\t%f, %f, 0, 1\n", - "%d:\t%f, %f, %f, 1\n", - "%d:\t%f, %f, %f, %f\n" - }; - - const char *t = templates[v->size]; - GLfloat *d = (GLfloat *)v->data; - GLuint j, i = 0, count; - - _mesa_printf("data-start\n"); - for ( ; d != v->start ; STRIDE_F(d, v->stride), i++) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); - - _mesa_printf("start-count(%u)\n", v->count); - count = i + v->count; - - if (culling) { - for ( ; i < count ; STRIDE_F(d, v->stride), i++) - if (cullmask[i]) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); - } - else { - for ( ; i < count ; STRIDE_F(d, v->stride), i++) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); - } - - for (j = v->size ; j < 4; j++) { - if ((v->flags & (1<data ; - i < count && d[j] == c[j] ; - i++, STRIDE_F(d, v->stride)) {}; - - if (i == count) - _mesa_printf(" --> ok\n"); - else - _mesa_printf(" --> Failed at %u ******\n", i); - } - } -} - - -/* - * For debugging - */ -void _mesa_vector3f_print( GLvector3f *v, GLubyte *cullmask, GLboolean culling ) -{ - GLfloat *d = (GLfloat *)v->data; - GLuint i = 0, count; - - _mesa_printf("data-start\n"); - for ( ; d != v->start ; STRIDE_F(d,v->stride), i++) - _mesa_printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]); - - _mesa_printf("start-count(%u)\n", v->count); - count = i + v->count; - - if (culling) { - for ( ; i < count ; STRIDE_F(d,v->stride), i++) - if (cullmask[i]) - _mesa_printf("%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]); - } - else { - for ( ; i < count ; STRIDE_F(d,v->stride), i++) - _mesa_printf("%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]); - } -} Index: xc/extras/Mesa/src/math/m_vector.h diff -u xc/extras/Mesa/src/math/m_vector.h:1.2 xc/extras/Mesa/src/math/m_vector.h:removed --- xc/extras/Mesa/src/math/m_vector.h:1.2 Mon Dec 16 11:18:37 2002 +++ xc/extras/Mesa/src/math/m_vector.h Wed Mar 16 21:00:59 2005 @@ -1,221 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -#ifndef _M_VECTOR_H_ -#define _M_VECTOR_H_ - -#include "glheader.h" -#include "mtypes.h" /* hack for GLchan */ - - -#define VEC_DIRTY_0 0x1 -#define VEC_DIRTY_1 0x2 -#define VEC_DIRTY_2 0x4 -#define VEC_DIRTY_3 0x8 -#define VEC_MALLOC 0x10 /* storage field points to self-allocated mem*/ -#define VEC_NOT_WRITEABLE 0x40 /* writable elements to hold clipped data */ -#define VEC_BAD_STRIDE 0x100 /* matches tnl's prefered stride */ - - -#define VEC_SIZE_1 VEC_DIRTY_0 -#define VEC_SIZE_2 (VEC_DIRTY_0|VEC_DIRTY_1) -#define VEC_SIZE_3 (VEC_DIRTY_0|VEC_DIRTY_1|VEC_DIRTY_2) -#define VEC_SIZE_4 (VEC_DIRTY_0|VEC_DIRTY_1|VEC_DIRTY_2|VEC_DIRTY_3) - - - -/* Wrap all the information about vectors up in a struct. Has - * additional fields compared to the other vectors to help us track of - * different vertex sizes, and whether we need to clean columns out - * because they contain non-(0,0,0,1) values. - * - * The start field is used to reserve data for copied vertices at the - * end of _mesa_transform_vb, and avoids the need for a multiplication in - * the transformation routines. - */ -typedef struct { - GLfloat (*data)[4]; /* may be malloc'd or point to client data */ - GLfloat *start; /* points somewhere inside of */ - GLuint count; /* size of the vector (in elements) */ - GLuint stride; /* stride from one element to the next (in bytes) */ - GLuint size; /* 2-4 for vertices and 1-4 for texcoords */ - GLuint flags; /* which columns are dirty */ - void *storage; /* self-allocated storage */ -} GLvector4f; - - -extern void _mesa_vector4f_init( GLvector4f *v, GLuint flags, - GLfloat (*storage)[4] ); -extern void _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, - GLuint count, GLuint alignment ); -extern void _mesa_vector4f_free( GLvector4f *v ); -extern void _mesa_vector4f_print( GLvector4f *v, GLubyte *, GLboolean ); -extern void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint nr, GLuint elt ); - - -/* Could use a single vector type for normals and vertices, but - * this way avoids some casts. - */ -typedef struct { - GLfloat (*data)[3]; - GLfloat *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector3f; - -extern void _mesa_vector3f_init( GLvector3f *v, GLuint flags, GLfloat (*)[3] ); -extern void _mesa_vector3f_alloc( GLvector3f *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector3f_free( GLvector3f *v ); -extern void _mesa_vector3f_print( GLvector3f *v, GLubyte *, GLboolean ); - - -typedef struct { - GLfloat *data; - GLfloat *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector1f; - -extern void _mesa_vector1f_free( GLvector1f *v ); -extern void _mesa_vector1f_init( GLvector1f *v, GLuint flags, GLfloat * ); -extern void _mesa_vector1f_alloc( GLvector1f *v, GLuint flags, GLuint count, - GLuint alignment ); - - -/* For 4ub rgba values. - */ -typedef struct { - GLubyte (*data)[4]; - GLubyte *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector4ub; - -extern void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags, - GLubyte (*storage)[4] ); -extern void _mesa_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector4ub_free( GLvector4ub * ); - - -/* For 4 * GLchan values. - */ -typedef struct { - GLchan (*data)[4]; - GLchan *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector4chan; - -extern void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags, - GLchan (*storage)[4] ); -extern void _mesa_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector4chan_free( GLvector4chan * ); - - - - -/* For 4 * GLushort rgba values. - */ -typedef struct { - GLushort (*data)[4]; - GLushort *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector4us; - -extern void _mesa_vector4us_init( GLvector4us *v, GLuint flags, - GLushort (*storage)[4] ); -extern void _mesa_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector4us_free( GLvector4us * ); - - - - -/* For 1ub values, eg edgeflag. - */ -typedef struct { - GLubyte *data; - GLubyte *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector1ub; - -extern void _mesa_vector1ub_init( GLvector1ub *v, GLuint flags, GLubyte *storage); -extern void _mesa_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector1ub_free( GLvector1ub * ); - - - - -/* For, eg Index, Array element. - */ -typedef struct { - GLuint *data; - GLuint *start; - GLuint count; - GLuint stride; - GLuint flags; - void *storage; -} GLvector1ui; - -extern void _mesa_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage ); -extern void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count, - GLuint alignment ); -extern void _mesa_vector1ui_free( GLvector1ui * ); - - - -/* - * Given vector , return a pointer (cast to to the -th element. - * - * End up doing a lot of slow imuls if not careful. - */ -#define VEC_ELT( v, type, i ) \ - ( (type *) ( ((GLbyte *) ((v)->data)) + (i) * (v)->stride) ) - - -#endif Index: xc/extras/Mesa/src/math/m_xform.c diff -u xc/extras/Mesa/src/math/m_xform.c:1.5 xc/extras/Mesa/src/math/m_xform.c:removed --- xc/extras/Mesa/src/math/m_xform.c:1.5 Wed Oct 22 11:44:43 2003 +++ xc/extras/Mesa/src/math/m_xform.c Wed Mar 16 21:00:59 2005 @@ -1,221 +0,0 @@ -/* $XFree86: xc/extras/Mesa/src/math/m_xform.c,v 1.5 2003/10/22 15:44:43 tsi Exp $ */ -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Matrix/vertex/vector transformation stuff - * - * - * NOTES: - * 1. 4x4 transformation matrices are stored in memory in column major order. - * 2. Points/vertices are to be thought of as column vectors. - * 3. Transformation of a point p by a matrix M is: p' = M * p - */ - -#include "glheader.h" -#include "macros.h" -#include "mmath.h" - -#include "m_eval.h" -#include "m_matrix.h" -#include "m_translate.h" -#include "m_xform.h" -#include "mathmod.h" - - -#ifdef DEBUG -#include "m_debug.h" -#endif - -#ifdef USE_X86_ASM -#include "X86/common_x86_asm.h" -#endif - -#ifdef USE_SPARC_ASM -#include "SPARC/sparc.h" -#endif - -clip_func _mesa_clip_tab[5]; -clip_func _mesa_clip_np_tab[5]; -dotprod_func _mesa_dotprod_tab[5]; -vec_copy_func _mesa_copy_tab[0x10]; -normal_func _mesa_normal_tab[0xf]; -transform_func *_mesa_transform_tab[5]; - - -/* Raw data format used for: - * - Object-to-eye transform prior to culling, although this too - * could be culled under some circumstances. - * - Eye-to-clip transform (via the function above). - * - Cliptesting - * - And everything else too, if culling happens to be disabled. - * - * GH: It's used for everything now, as clipping/culling is done - * elsewhere (most often by the driver itself). - */ -#define TAG(x) x -#define TAG2(x,y) x##y -#define STRIDE_LOOP for ( i = 0 ; i < count ; i++, STRIDE_F(from, stride) ) -#define LOOP for ( i = 0 ; i < n ; i++ ) -#define ARGS -#include "m_xform_tmp.h" -#include "m_clip_tmp.h" -#include "m_norm_tmp.h" -#include "m_dotprod_tmp.h" -#include "m_copy_tmp.h" -#undef TAG -#undef TAG2 -#undef LOOP -#undef ARGS - - - - -GLvector4f *_mesa_project_points( GLvector4f *proj_vec, - const GLvector4f *clip_vec ) -{ - const GLuint stride = clip_vec->stride; - const GLfloat *from = (GLfloat *)clip_vec->start; - const GLuint count = clip_vec->count; - GLfloat (*vProj)[4] = (GLfloat (*)[4])proj_vec->start; - GLuint i; - - for (i = 0 ; i < count ; i++, STRIDE_F(from, stride)) - { - GLfloat oow = 1.0F / from[3]; - vProj[i][3] = oow; - vProj[i][0] = from[0] * oow; - vProj[i][1] = from[1] * oow; - vProj[i][2] = from[2] * oow; - } - - proj_vec->flags |= VEC_SIZE_4; - proj_vec->size = 3; - proj_vec->count = clip_vec->count; - return proj_vec; -} - - - - - - -/* - * Transform a 4-element row vector (1x4 matrix) by a 4x4 matrix. This - * function is used for transforming clipping plane equations and spotlight - * directions. - * Mathematically, u = v * m. - * Input: v - input vector - * m - transformation matrix - * Output: u - transformed vector - */ -void _mesa_transform_vector( GLfloat u[4], const GLfloat v[4], const GLfloat m[16] ) -{ - GLfloat v0=v[0], v1=v[1], v2=v[2], v3=v[3]; -#define M(row,col) m[row + col*4] - u[0] = v0 * M(0,0) + v1 * M(1,0) + v2 * M(2,0) + v3 * M(3,0); - u[1] = v0 * M(0,1) + v1 * M(1,1) + v2 * M(2,1) + v3 * M(3,1); - u[2] = v0 * M(0,2) + v1 * M(1,2) + v2 * M(2,2) + v3 * M(3,2); - u[3] = v0 * M(0,3) + v1 * M(1,3) + v2 * M(2,3) + v3 * M(3,3); -#undef M -} - - -/* Useful for one-off point transformations, as in clipping. - * Note that because the matrix isn't analysed we do too many - * multiplies, and that the result is always 4-clean. - */ -void _mesa_transform_point_sz( GLfloat Q[4], const GLfloat M[16], - const GLfloat P[4], GLuint sz ) -{ - if (Q == P) - return; - - if (sz == 4) - { - Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12] * P[3]; - Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13] * P[3]; - Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14] * P[3]; - Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15] * P[3]; - } - else if (sz == 3) - { - Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12]; - Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13]; - Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14]; - Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15]; - } - else if (sz == 2) - { - Q[0] = M[0] * P[0] + M[4] * P[1] + M[12]; - Q[1] = M[1] * P[0] + M[5] * P[1] + M[13]; - Q[2] = M[2] * P[0] + M[6] * P[1] + M[14]; - Q[3] = M[3] * P[0] + M[7] * P[1] + M[15]; - } - else if (sz == 1) - { - Q[0] = M[0] * P[0] + M[12]; - Q[1] = M[1] * P[0] + M[13]; - Q[2] = M[2] * P[0] + M[14]; - Q[3] = M[3] * P[0] + M[15]; - } -} - - -/* - * This is called only once. It initializes several tables with pointers - * to optimized transformation functions. This is where we can test for - * AMD 3Dnow! capability, Intel SSE, etc. and hook in the right code. - */ -void -_math_init_transformation( void ) -{ - init_c_transformations(); - init_c_norm_transform(); - init_c_cliptest(); - init_copy0(); - init_dotprod(); - -#ifdef DEBUG - _math_test_all_transform_functions( "default" ); - _math_test_all_normal_transform_functions( "default" ); - _math_test_all_cliptest_functions( "default" ); -#endif - -#ifdef USE_X86_ASM - _mesa_init_all_x86_transform_asm(); -#endif -#ifdef USE_SPARC_ASM - _mesa_init_all_sparc_transform_asm(); -#endif -} - -void -_math_init( void ) -{ - _math_init_transformation(); - _math_init_translate(); - _math_init_eval(); -} Index: xc/extras/Mesa/src/math/m_xform.h diff -u xc/extras/Mesa/src/math/m_xform.h:1.3 xc/extras/Mesa/src/math/m_xform.h:removed --- xc/extras/Mesa/src/math/m_xform.h:1.3 Sun Sep 28 15:17:11 2003 +++ xc/extras/Mesa/src/math/m_xform.h Wed Mar 16 21:00:59 2005 @@ -1,216 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - - - -#ifndef _M_XFORM_H -#define _M_XFORM_H - - -#include "glheader.h" -#include "config.h" -#include "math/m_vector.h" -#include "math/m_matrix.h" - -#ifdef USE_X86_ASM -#define _XFORMAPI _ASMAPI -#define _XFORMAPIP _ASMAPIP -#else -#define _XFORMAPI -#define _XFORMAPIP * -#endif - -/* - * Transform a point (column vector) by a matrix: Q = M * P - */ -#define TRANSFORM_POINT( Q, M, P ) \ - Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12] * P[3]; \ - Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13] * P[3]; \ - Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14] * P[3]; \ - Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15] * P[3]; - - -#define TRANSFORM_POINT3( Q, M, P ) \ - Q[0] = M[0] * P[0] + M[4] * P[1] + M[8] * P[2] + M[12]; \ - Q[1] = M[1] * P[0] + M[5] * P[1] + M[9] * P[2] + M[13]; \ - Q[2] = M[2] * P[0] + M[6] * P[1] + M[10] * P[2] + M[14]; \ - Q[3] = M[3] * P[0] + M[7] * P[1] + M[11] * P[2] + M[15]; - - -/* - * Transform a normal (row vector) by a matrix: [NX NY NZ] = N * MAT - */ -#define TRANSFORM_NORMAL( TO, N, MAT ) \ -do { \ - TO[0] = N[0] * MAT[0] + N[1] * MAT[1] + N[2] * MAT[2]; \ - TO[1] = N[0] * MAT[4] + N[1] * MAT[5] + N[2] * MAT[6]; \ - TO[2] = N[0] * MAT[8] + N[1] * MAT[9] + N[2] * MAT[10]; \ -} while (0) - - -extern void _mesa_transform_vector( GLfloat u[4], - CONST GLfloat v[4], - CONST GLfloat m[16] ); - - -extern void -_math_init_transformation( void ); - - -/* KW: Clip functions now do projective divide as well. The projected - * coordinates are very useful to us because they let us cull - * backfaces and eliminate vertices from lighting, fogging, etc - * calculations. Despite the fact that this divide could be done one - * day in hardware, we would still have a reason to want to do it here - * as long as those other calculations remain in software. - * - * Clipping is a convenient place to do the divide on x86 as it should be - * possible to overlap with integer outcode calculations. - * - * There are two cases where we wouldn't want to do the divide in cliptest: - * - When we aren't clipping. We still might want to cull backfaces - * so the divide should be done elsewhere. This currently never - * happens. - * - * - When culling isn't likely to help us, such as when the GL culling - * is disabled and we not lighting or are only lighting - * one-sided. In this situation, backface determination provides - * us with no useful information. A tricky case to detect is when - * all input data is already culled, although hopefully the - * application wouldn't turn on culling in such cases. - * - * We supply a buffer to hold the [x/w,y/w,z/w,1/w] values which - * are the result of the projection. This is only used in the - * 4-vector case - in other cases, we just use the clip coordinates - * as the projected coordinates - they are identical. - * - * This is doubly convenient because it means the Win[] array is now - * of the same stride as all the others, so I can now turn map_vertices - * into a straight-forward matrix transformation, with asm acceleration - * automatically available. - */ - -/* Vertex buffer clipping flags - */ -#define CLIP_RIGHT_SHIFT 0 -#define CLIP_LEFT_SHIFT 1 -#define CLIP_TOP_SHIFT 2 -#define CLIP_BOTTOM_SHIFT 3 -#define CLIP_NEAR_SHIFT 4 -#define CLIP_FAR_SHIFT 5 - -#define CLIP_RIGHT_BIT 0x01 -#define CLIP_LEFT_BIT 0x02 -#define CLIP_TOP_BIT 0x04 -#define CLIP_BOTTOM_BIT 0x08 -#define CLIP_NEAR_BIT 0x10 -#define CLIP_FAR_BIT 0x20 -#define CLIP_USER_BIT 0x40 -#define CLIP_ALL_BITS 0x3f - - -typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip, - GLvector4f *vProj, - GLubyte clipMask[], - GLubyte *orMask, - GLubyte *andMask ); - -typedef void (*dotprod_func)( GLfloat *out, - GLuint out_stride, - CONST GLvector4f *coord_vec, - CONST GLfloat plane[4] ); - -typedef void (*vec_copy_func)( GLvector4f *to, - CONST GLvector4f *from ); - - - -/* - * Functions for transformation of normals in the VB. - */ -typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat, - GLfloat scale, - CONST GLvector4f *in, - CONST GLfloat lengths[], - GLvector4f *dest ); - - -/* Flags for selecting a normal transformation function. - */ -#define NORM_RESCALE 0x1 /* apply the scale factor */ -#define NORM_NORMALIZE 0x2 /* normalize */ -#define NORM_TRANSFORM 0x4 /* apply the transformation matrix */ -#define NORM_TRANSFORM_NO_ROT 0x8 /* apply the transformation matrix */ - - - - -/* KW: New versions of the transform function allow a mask array - * specifying that individual vector transform should be skipped - * when the mask byte is zero. This is always present as a - * parameter, to allow a unified interface. - */ -typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec, - CONST GLfloat m[16], - CONST GLvector4f *from_vec ); - - -extern GLvector4f *_mesa_project_points( GLvector4f *to, - CONST GLvector4f *from ); - -extern void _mesa_transform_bounds3( GLubyte *orMask, GLubyte *andMask, - CONST GLfloat m[16], - CONST GLfloat src[][3] ); - -extern void _mesa_transform_bounds2( GLubyte *orMask, GLubyte *andMask, - CONST GLfloat m[16], - CONST GLfloat src[][3] ); - - -extern dotprod_func _mesa_dotprod_tab[5]; -extern vec_copy_func _mesa_copy_tab[0x10]; -extern vec_copy_func _mesa_copy_clean_tab[5]; -extern clip_func _mesa_clip_tab[5]; -extern clip_func _mesa_clip_np_tab[5]; -extern normal_func _mesa_normal_tab[0xf]; - -/* Use of 2 layers of linked 1-dimensional arrays to reduce - * cost of lookup. - */ -extern transform_func *_mesa_transform_tab[5]; - - -extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16], - CONST GLfloat P[4], GLuint sz ); - - -#define TransformRaw( to, mat, from ) \ - ( _mesa_transform_tab[(from)->size][(mat)->type]( to, (mat)->m, from ), \ - (to) ) - - -#endif Index: xc/extras/Mesa/src/math/m_xform_tmp.h diff -u xc/extras/Mesa/src/math/m_xform_tmp.h:1.2 xc/extras/Mesa/src/math/m_xform_tmp.h:removed --- xc/extras/Mesa/src/math/m_xform_tmp.h:1.2 Mon Dec 16 11:18:37 2002 +++ xc/extras/Mesa/src/math/m_xform_tmp.h Wed Mar 16 21:00:59 2005 @@ -1,806 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * New (3.1) transformation code written by Keith Whitwell. - */ - - -/*---------------------------------------------------------------------- - * Begin Keith's new code - * - *---------------------------------------------------------------------- - */ - -/* KW: Fixed stride, now measured in bytes as is the OpenGL array stride. - */ - -/* KW: These are now parameterized to produce two versions, one - * which transforms all incoming points, and a second which - * takes notice of a cullmask array, and only transforms - * unculled vertices. - */ - -/* KW: 1-vectors can sneak into the texture pipeline via the array - * interface. These functions are here because I want consistant - * treatment of the vertex sizes and a lazy strategy for - * cleaning unused parts of the vector, and so as not to exclude - * them from the vertex array interface. - * - * Under our current analysis of matrices, there is no way that - * the product of a matrix and a 1-vector can remain a 1-vector, - * with the exception of the identity transform. - */ - -/* KW: No longer zero-pad outgoing vectors. Now that external - * vectors can get into the pipeline we cannot ever assume - * that there is more to a vector than indicated by its - * size. - */ - -/* KW: Now uses clipmask and a flag to allow us to skip both/either - * cliped and/or culled vertices. - */ - -/* GH: Not any more -- it's easier (and faster) to just process the - * entire vector. Clipping and culling are handled further down - * the pipe, most often during or after the conversion to some - * driver-specific vertex format. - */ - -static void _XFORMAPI -TAG(transform_points1_general)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m12 = m[12]; - const GLfloat m1 = m[1], m13 = m[13]; - const GLfloat m2 = m[2], m14 = m[14]; - const GLfloat m3 = m[3], m15 = m[15]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox + m12; - to[i][1] = m1 * ox + m13; - to[i][2] = m2 * ox + m14; - to[i][3] = m3 * ox + m15; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points1_identity)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLuint count = from_vec->count; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint i; - if (to_vec == from_vec) return; - STRIDE_LOOP { - to[i][0] = from[0]; - } - to_vec->size = 1; - to_vec->flags |= VEC_SIZE_1; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points1_2d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1]; - const GLfloat m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox + m12; - to[i][1] = m1 * ox + m13; - } - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox + m12; - to[i][1] = m13; - } - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points1_3d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m2 = m[2]; - const GLfloat m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox + m12; - to[i][1] = m1 * ox + m13; - to[i][2] = m2 * ox + m14; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - - -static void _XFORMAPI -TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0]; - const GLfloat m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox + m12; - to[i][1] = m13; - to[i][2] = m14; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points1_perspective)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0]; - to[i][0] = m0 * ox ; - to[i][1] = 0 ; - to[i][2] = m14; - to[i][3] = 0; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - - - - -/* 2-vectors, which are a lot more relevant than 1-vectors, are - * present early in the geometry pipeline and throughout the - * texture pipeline. - */ -static void _XFORMAPI -TAG(transform_points2_general)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m4 = m[4], m12 = m[12]; - const GLfloat m1 = m[1], m5 = m[5], m13 = m[13]; - const GLfloat m2 = m[2], m6 = m[6], m14 = m[14]; - const GLfloat m3 = m[3], m7 = m[7], m15 = m[15]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox + m4 * oy + m12; - to[i][1] = m1 * ox + m5 * oy + m13; - to[i][2] = m2 * ox + m6 * oy + m14; - to[i][3] = m3 * ox + m7 * oy + m15; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points2_identity)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - GLuint i; - if (to_vec == from_vec) return; - STRIDE_LOOP { - to[i][0] = from[0]; - to[i][1] = from[1]; - } - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points2_2d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5]; - const GLfloat m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox + m4 * oy + m12; - to[i][1] = m1 * ox + m5 * oy + m13; - } - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox + m12; - to[i][1] = m5 * oy + m13; - } - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points2_3d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m2 = m[2], m4 = m[4], m5 = m[5]; - const GLfloat m6 = m[6], m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox + m4 * oy + m12; - to[i][1] = m1 * ox + m5 * oy + m13; - to[i][2] = m2 * ox + m6 * oy + m14; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - - -/* I would actually say this was a fairly important function, from - * a texture transformation point of view. - */ -static void _XFORMAPI -TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5]; - const GLfloat m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox + m12; - to[i][1] = m5 * oy + m13; - to[i][2] = m14; - } - if (m14 == 0) { - to_vec->size = 2; - to_vec->flags |= VEC_SIZE_2; - } else { - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - } - to_vec->count = from_vec->count; -} - - -static void _XFORMAPI -TAG(transform_points2_perspective)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1]; - to[i][0] = m0 * ox ; - to[i][1] = m5 * oy ; - to[i][2] = m14; - to[i][3] = 0; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - - - -static void _XFORMAPI -TAG(transform_points3_general)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m4 = m[4], m8 = m[8], m12 = m[12]; - const GLfloat m1 = m[1], m5 = m[5], m9 = m[9], m13 = m[13]; - const GLfloat m2 = m[2], m6 = m[6], m10 = m[10], m14 = m[14]; - const GLfloat m3 = m[3], m7 = m[7], m11 = m[11], m15 = m[15]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12; - to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13; - to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14; - to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points3_identity)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - GLuint i; - if (to_vec == from_vec) return; - STRIDE_LOOP { - to[i][0] = from[0]; - to[i][1] = from[1]; - to[i][2] = from[2]; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points3_2d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5]; - const GLfloat m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m4 * oy + m12 ; - to[i][1] = m1 * ox + m5 * oy + m13 ; - to[i][2] = + oz ; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m12 ; - to[i][1] = m5 * oy + m13 ; - to[i][2] = + oz ; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points3_3d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m2 = m[2], m4 = m[4], m5 = m[5]; - const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10]; - const GLfloat m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 ; - to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 ; - to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 ; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -/* previously known as ortho... - */ -static void _XFORMAPI -TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5]; - const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m12 ; - to[i][1] = m5 * oy + m13 ; - to[i][2] = m10 * oz + m14 ; - } - to_vec->size = 3; - to_vec->flags |= VEC_SIZE_3; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points3_perspective)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9]; - const GLfloat m10 = m[10], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2]; - to[i][0] = m0 * ox + m8 * oz ; - to[i][1] = m5 * oy + m9 * oz ; - to[i][2] = m10 * oz + m14 ; - to[i][3] = -oz ; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - - - -static void _XFORMAPI -TAG(transform_points4_general)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m4 = m[4], m8 = m[8], m12 = m[12]; - const GLfloat m1 = m[1], m5 = m[5], m9 = m[9], m13 = m[13]; - const GLfloat m2 = m[2], m6 = m[6], m10 = m[10], m14 = m[14]; - const GLfloat m3 = m[3], m7 = m[7], m11 = m[11], m15 = m[15]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow; - to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow; - to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow; - to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_identity)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - GLuint i; - if (to_vec == from_vec) return; - STRIDE_LOOP { - to[i][0] = from[0]; - to[i][1] = from[1]; - to[i][2] = from[2]; - to[i][3] = from[3]; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_2d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5]; - const GLfloat m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m4 * oy + m12 * ow; - to[i][1] = m1 * ox + m5 * oy + m13 * ow; - to[i][2] = + oz ; - to[i][3] = ow; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m12 * ow; - to[i][1] = m5 * oy + m13 * ow; - to[i][2] = + oz ; - to[i][3] = ow; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_3d)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m1 = m[1], m2 = m[2], m4 = m[4], m5 = m[5]; - const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10]; - const GLfloat m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m4 * oy + m8 * oz + m12 * ow; - to[i][1] = m1 * ox + m5 * oy + m9 * oz + m13 * ow; - to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow; - to[i][3] = ow; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5]; - const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m12 * ow; - to[i][1] = m5 * oy + m13 * ow; - to[i][2] = m10 * oz + m14 * ow; - to[i][3] = ow; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static void _XFORMAPI -TAG(transform_points4_perspective)( GLvector4f *to_vec, - const GLfloat m[16], - const GLvector4f *from_vec ) -{ - const GLuint stride = from_vec->stride; - GLfloat *from = from_vec->start; - GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start; - GLuint count = from_vec->count; - const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9]; - const GLfloat m10 = m[10], m14 = m[14]; - GLuint i; - STRIDE_LOOP { - const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3]; - to[i][0] = m0 * ox + m8 * oz ; - to[i][1] = m5 * oy + m9 * oz ; - to[i][2] = m10 * oz + m14 * ow ; - to[i][3] = -oz ; - } - to_vec->size = 4; - to_vec->flags |= VEC_SIZE_4; - to_vec->count = from_vec->count; -} - -static transform_func _XFORMAPI TAG(transform_tab_1)[7]; -static transform_func _XFORMAPI TAG(transform_tab_2)[7]; -static transform_func _XFORMAPI TAG(transform_tab_3)[7]; -static transform_func _XFORMAPI TAG(transform_tab_4)[7]; - -/* Similar functions could be called several times, with more highly - * optimized routines overwriting the arrays. This only occurs during - * startup. - */ -static void _XFORMAPI TAG(init_c_transformations)( void ) -{ -#define TAG_TAB _mesa_transform_tab -#define TAG_TAB_1 TAG(transform_tab_1) -#define TAG_TAB_2 TAG(transform_tab_2) -#define TAG_TAB_3 TAG(transform_tab_3) -#define TAG_TAB_4 TAG(transform_tab_4) - - TAG_TAB[1] = TAG_TAB_1; - TAG_TAB[2] = TAG_TAB_2; - TAG_TAB[3] = TAG_TAB_3; - TAG_TAB[4] = TAG_TAB_4; - - /* 1-D points (ie texcoords) */ - TAG_TAB_1[MATRIX_GENERAL] = TAG(transform_points1_general); - TAG_TAB_1[MATRIX_IDENTITY] = TAG(transform_points1_identity); - TAG_TAB_1[MATRIX_3D_NO_ROT] = TAG(transform_points1_3d_no_rot); - TAG_TAB_1[MATRIX_PERSPECTIVE] = TAG(transform_points1_perspective); - TAG_TAB_1[MATRIX_2D] = TAG(transform_points1_2d); - TAG_TAB_1[MATRIX_2D_NO_ROT] = TAG(transform_points1_2d_no_rot); - TAG_TAB_1[MATRIX_3D] = TAG(transform_points1_3d); - - /* 2-D points */ - TAG_TAB_2[MATRIX_GENERAL] = TAG(transform_points2_general); - TAG_TAB_2[MATRIX_IDENTITY] = TAG(transform_points2_identity); - TAG_TAB_2[MATRIX_3D_NO_ROT] = TAG(transform_points2_3d_no_rot); - TAG_TAB_2[MATRIX_PERSPECTIVE] = TAG(transform_points2_perspective); - TAG_TAB_2[MATRIX_2D] = TAG(transform_points2_2d); - TAG_TAB_2[MATRIX_2D_NO_ROT] = TAG(transform_points2_2d_no_rot); - TAG_TAB_2[MATRIX_3D] = TAG(transform_points2_3d); - - /* 3-D points */ - TAG_TAB_3[MATRIX_GENERAL] = TAG(transform_points3_general); - TAG_TAB_3[MATRIX_IDENTITY] = TAG(transform_points3_identity); - TAG_TAB_3[MATRIX_3D_NO_ROT] = TAG(transform_points3_3d_no_rot); - TAG_TAB_3[MATRIX_PERSPECTIVE] = TAG(transform_points3_perspective); - TAG_TAB_3[MATRIX_2D] = TAG(transform_points3_2d); - TAG_TAB_3[MATRIX_2D_NO_ROT] = TAG(transform_points3_2d_no_rot); - TAG_TAB_3[MATRIX_3D] = TAG(transform_points3_3d); - - /* 4-D points */ - TAG_TAB_4[MATRIX_GENERAL] = TAG(transform_points4_general); - TAG_TAB_4[MATRIX_IDENTITY] = TAG(transform_points4_identity); - TAG_TAB_4[MATRIX_3D_NO_ROT] = TAG(transform_points4_3d_no_rot); - TAG_TAB_4[MATRIX_PERSPECTIVE] = TAG(transform_points4_perspective); - TAG_TAB_4[MATRIX_2D] = TAG(transform_points4_2d); - TAG_TAB_4[MATRIX_2D_NO_ROT] = TAG(transform_points4_2d_no_rot); - TAG_TAB_4[MATRIX_3D] = TAG(transform_points4_3d); - -#undef TAG_TAB -#undef TAG_TAB_1 -#undef TAG_TAB_2 -#undef TAG_TAB_3 -#undef TAG_TAB_4 -} Index: xc/extras/Mesa/src/math/mathmod.h diff -u xc/extras/Mesa/src/math/mathmod.h:1.2 xc/extras/Mesa/src/math/mathmod.h:removed --- xc/extras/Mesa/src/math/mathmod.h:1.2 Mon Dec 16 11:18:37 2002 +++ xc/extras/Mesa/src/math/mathmod.h Wed Mar 16 21:00:59 2005 @@ -1,31 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _MESA_MATH_H_ -#define _MESA_MATH_H_ - -extern void _math_init( void ); - -#endif Index: xc/extras/Mesa/src/mesa/Makefile diff -u /dev/null xc/extras/Mesa/src/mesa/Makefile:1.1.1.2 --- /dev/null Wed Mar 16 21:00:59 2005 +++ xc/extras/Mesa/src/mesa/Makefile Fri Dec 10 10:32:10 2004 @@ -0,0 +1,183 @@ +# src/mesa/Makefile + +TOP = ../.. +include $(TOP)/configs/current + +include sources + + +GL_MAJOR = 1 +GL_MINOR = 5 +GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) + + +.c.o: + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + +.S.o: + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + + +# Figure out what to make here +default: + @if [ "${DRIVER_DIRS}" = "dri" ] ; then \ + $(MAKE) linux-solo ; \ + elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ + $(MAKE) osmesa-only ; \ + elif [ "$(DRIVER_DIRS)" = "beos" ]; then \ + $(MAKE) beos ; \ + else \ + $(MAKE) stand-alone ; \ + fi + +# BeOS driver target +beos: depend subdirs mesa.a + cd drivers/beos; $(MAKE) + + +###################################################################### +# Linux solo DRI drivers + +SOLO_C_SOURCES = \ + $(MAIN_SOURCES) \ + $(MATH_SOURCES) \ + $(ARRAY_CACHE_SOURCES) \ + $(TNL_SOURCES) \ + $(SWRAST_SOURCES) \ + $(SWRAST_SETUP_SOURCES) \ + $(SHADER_SOURCES) \ + $(ASM_C_SOURCES) + +SOLO_OBJECTS = $(SOLO_C_SOURCES:.c=.o) \ + $(ASM_SOURCES:.S=.o) + +linux-solo: depend subdirs mesa.a drivers-dri + +# Make archive of core object files +mesa.a: $(SOLO_OBJECTS) + rm -f $@ + ar rcv $@ $(SOLO_OBJECTS) + ranlib $@ + @if [ "${CONFIG_NAME}" = "beos" ] ; then \ + mimeset -f "$@" ; \ + fi + +# note: cannot use the name of the directory ("drivers") as the +# target, otherwise make will look & see that the "drivers" directory +# already exists, so not try to rebuild it... +drivers-dri: + cd drivers/dri ; $(MAKE) + + +###################################################################### +# Stand-alone Mesa libGL and libOSMesa + +STAND_ALONE_DRIVER_SOURCES = \ + $(COMMON_DRIVER_SOURCES) \ + $(X11_DRIVER_SOURCES) \ + $(GLIDE_DRIVER_SOURCES) \ + $(SVGA_DRIVER_SOURCES) \ + $(FBDEV_DRIVER_SOURCES) + +STAND_ALONE_SOURCES = \ + $(CORE_SOURCES) \ + $(ASM_SOURCES) \ + $(STAND_ALONE_DRIVER_SOURCES) + +# ASM_SOURCES is defined in the config file +ASM_OBJECTS = $(ASM_SOURCES:.S=.o) + +STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o) + +STAND_ALONE_OBJECTS = \ + $(CORE_OBJECTS) \ + $(ASM_OBJECTS) \ + $(STAND_ALONE_DRIVER_OBJECTS) + +# For libOSMesa16 or libOSMesa32 we link _all_ the objects into the library, +# not just the osmesa.o object (i.e. we don't have a libGL). +OSMESA16_OBJECTS = \ + $(CORE_OBJECTS) \ + $(ASM_OBJECTS) \ + $(COMMON_DRIVER_OBJECTS) \ + $(OSMESA_DRIVER_OBJECTS) + + +stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NAME) + +osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME) + +subdirs: + @ (cd x86 ; $(MAKE)) + +# Make the GL library +$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \ + -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIB_DIR) \ + $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) + +# Make the OSMesa library +$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) + if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \ + -minor $(MESA_MINOR) -patch $(MESA_TINY) \ + -install $(LIB_DIR) $(MKLIB_OPTIONS) \ + $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \ + else \ + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \ + -minor $(MESA_MINOR) -patch $(GL_TINY) \ + -install $(LIB_DIR) $(MKLIB_OPTIONS) \ + $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \ + fi + + +###################################################################### +# 16 (or 32) bit/channel OSMesa + +# $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA16_OBJECTS) +# $(TOP)/bin/mklib -o $(OSMESA_LIB) \ +# -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ +# -install $(LIB_DIR) \ +# $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OSMESA16_OBJECTS) + + + +###################################################################### +# Generic stuff + +ALL_SOURCES = \ + $(GLAPI_SOURCES) \ + $(MAIN_SOURCES) \ + $(MATH_SOURCES) \ + $(ARRAY_CACHE_SOURCES) \ + $(TNL_SOURCES) \ + $(SHADER_SOURCES) \ + $(SWRAST_SOURCES) \ + $(SWRAST_SETUP_SOURCES) \ + $(ASM_C_SOURCES) \ + $(X86_SOURCES) \ + $(COMMON_DRIVER_SOURCES) + + +SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \ + tnl tnl_dd + + +# Update dependencies +depend: $(ALL_SOURCES) + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \ + > /dev/null 2>&1 + + +# Emacs tags +tags: + etags `find . -name \*.[ch]` `find ../include` + +clean: + -rm -f */*.o + -rm -f depend depend.bak mesa.a + -rm -f drivers/*/*.o + (cd drivers/dri ; $(MAKE) clean) + +include depend Index: xc/extras/Mesa/src/mesa/array_cache/ac_context.c diff -u /dev/null xc/extras/Mesa/src/mesa/array_cache/ac_context.c:1.1.1.1 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/array_cache/ac_context.c Thu Apr 8 05:16:45 2004 @@ -0,0 +1,375 @@ +/* + * Mesa 3-D graphics library + * Version: 5.1 + * + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + +#include "glheader.h" +#include "macros.h" +#include "imports.h" +#include "mtypes.h" + +#include "array_cache/ac_context.h" + + +/* + * Initialize the array fallbacks. That is, by default the fallback arrays + * point into the current vertex attribute values in ctx->Current.Attrib[] + */ +static void _ac_fallbacks_init( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + struct gl_client_array *cl; + GLuint i; + + cl = &ac->Fallback.Normal; + cl->Size = 3; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Fallback.Color; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Fallback.SecondaryColor; + cl->Size = 3; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Fallback.FogCoord; + cl->Size = 1; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Fallback.Index; + cl->Size = 1; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) &ctx->Current.Index; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) { + cl = &ac->Fallback.TexCoord[i]; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + } + + cl = &ac->Fallback.EdgeFlag; + cl->Size = 1; + cl->Type = GL_UNSIGNED_BYTE; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + for (i = 0; i < VERT_ATTRIB_MAX; i++) { + cl = &ac->Fallback.Attrib[i]; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (GLubyte *) ctx->Current.Attrib[i]; + cl->Enabled = 1; + cl->Flags = CA_CLIENT_DATA; /* hack */ +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + } +} + + +/* + * Initialize the array cache pointers, types, strides, etc. + */ +static void _ac_cache_init( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + struct gl_client_array *cl; + GLuint size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES; + GLuint i; + + cl = &ac->Cache.Vertex; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 4 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Cache.Normal; + cl->Size = 3; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 3 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Cache.Color; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 4 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Cache.SecondaryColor; + cl->Size = 3; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 4 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Cache.FogCoord; + cl->Size = 1; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + cl = &ac->Cache.Index; + cl->Size = 1; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + cl = &ac->Cache.TexCoord[i]; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 4 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + } + + cl = &ac->Cache.EdgeFlag; + cl->Size = 1; + cl->Type = GL_UNSIGNED_BYTE; + cl->Stride = 0; + cl->StrideB = sizeof(GLubyte); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + + for (i = 0 ; i < VERT_ATTRIB_MAX; i++) { + cl = &ac->Cache.Attrib[i]; + cl->Size = 4; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 4 * sizeof(GLfloat); + cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size ); + cl->Enabled = 1; + cl->Flags = 0; +#if FEATURE_ARB_vertex_buffer_object + cl->BufferObj = ctx->Array.NullBufferObj; +#endif + } +} + + +/* This storage used to hold translated client data if type or stride + * need to be fixed. + */ +static void _ac_elts_init( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + GLuint size = 1000; + + ac->Elts = (GLuint *)MALLOC( sizeof(GLuint) * size ); + ac->elt_size = size; +} + +static void _ac_raw_init( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + GLuint i; + + ac->Raw.Color = ac->Fallback.Color; + ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; + ac->Raw.FogCoord = ac->Fallback.FogCoord; + ac->Raw.Index = ac->Fallback.Index; + ac->Raw.Normal = ac->Fallback.Normal; + ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; + ac->Raw.Vertex = ctx->Array.Vertex; + + ac->IsCached.Color = GL_FALSE; + ac->IsCached.EdgeFlag = GL_FALSE; + ac->IsCached.FogCoord = GL_FALSE; + ac->IsCached.Index = GL_FALSE; + ac->IsCached.Normal = GL_FALSE; + ac->IsCached.SecondaryColor = GL_FALSE; + ac->IsCached.Vertex = GL_FALSE; + + for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) { + ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i]; + ac->IsCached.TexCoord[i] = GL_FALSE; + } + + for (i = 0 ; i < VERT_ATTRIB_MAX ; i++) { + ac->Raw.Attrib[i] = ac->Fallback.Attrib[i]; + ac->IsCached.Attrib[i] = GL_FALSE; + } +} + +GLboolean _ac_CreateContext( GLcontext *ctx ) +{ + ctx->acache_context = CALLOC(sizeof(ACcontext)); + if (ctx->acache_context) { + _ac_cache_init( ctx ); + _ac_fallbacks_init( ctx ); + _ac_raw_init( ctx ); + _ac_elts_init( ctx ); + return GL_TRUE; + } + return GL_FALSE; +} + +void _ac_DestroyContext( GLcontext *ctx ) +{ + struct gl_buffer_object *nullObj = ctx->Array.NullBufferObj; + ACcontext *ac = AC_CONTEXT(ctx); + GLint i; + + /* only free vertex data if it's really a pointer to vertex data and + * not an offset into a buffer object. + */ + if (ac->Cache.Vertex.Ptr && ac->Cache.Vertex.BufferObj == nullObj) + FREE( (void *) ac->Cache.Vertex.Ptr ); + if (ac->Cache.Normal.Ptr && ac->Cache.Normal.BufferObj == nullObj) + FREE( (void *) ac->Cache.Normal.Ptr ); + if (ac->Cache.Color.Ptr && ac->Cache.Color.BufferObj == nullObj) + FREE( (void *) ac->Cache.Color.Ptr ); + if (ac->Cache.SecondaryColor.Ptr && ac->Cache.SecondaryColor.BufferObj == nullObj) + FREE( (void *) ac->Cache.SecondaryColor.Ptr ); + if (ac->Cache.EdgeFlag.Ptr && ac->Cache.EdgeFlag.BufferObj == nullObj) + FREE( (void *) ac->Cache.EdgeFlag.Ptr ); + if (ac->Cache.Index.Ptr && ac->Cache.Index.BufferObj == nullObj) + FREE( (void *) ac->Cache.Index.Ptr ); + if (ac->Cache.FogCoord.Ptr && ac->Cache.FogCoord.BufferObj == nullObj) + FREE( (void *) ac->Cache.FogCoord.Ptr ); + + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + if (ac->Cache.TexCoord[i].Ptr && ac->Cache.TexCoord[i].BufferObj == nullObj) + FREE( (void *) ac->Cache.TexCoord[i].Ptr ); + } + + for (i = 0; i < VERT_ATTRIB_MAX; i++) { + if (ac->Cache.Attrib[i].Ptr && ac->Cache.Attrib[i].BufferObj == nullObj) + FREE( (void *) ac->Cache.Attrib[i].Ptr ); + } + + if (ac->Elts) + FREE( ac->Elts ); + + /* Free the context structure itself */ + FREE(ac); + ctx->acache_context = NULL; +} + +void _ac_InvalidateState( GLcontext *ctx, GLuint new_state ) +{ + AC_CONTEXT(ctx)->NewState |= new_state; + AC_CONTEXT(ctx)->NewArrayState |= ctx->Array.NewState; +} Index: xc/extras/Mesa/src/mesa/array_cache/ac_context.h diff -u /dev/null xc/extras/Mesa/src/mesa/array_cache/ac_context.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/array_cache/ac_context.h Thu Apr 8 05:16:45 2004 @@ -0,0 +1,99 @@ + +/* + * Mesa 3-D graphics library + * Version: 5.1 + * + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + +#ifndef _AC_CONTEXT_H +#define _AC_CONTEXT_H + +#include "glheader.h" +#include "mtypes.h" + +#include "array_cache/acache.h" + +/* These are used to make the ctx->Current values look like + * arrays (with zero StrideB). + */ +struct ac_arrays { + struct gl_client_array Vertex; + struct gl_client_array Normal; + struct gl_client_array Color; + struct gl_client_array SecondaryColor; + struct gl_client_array FogCoord; + struct gl_client_array Index; + struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS]; + struct gl_client_array EdgeFlag; + struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ +}; + +struct ac_array_pointers { + struct gl_client_array *Vertex; + struct gl_client_array *Normal; + struct gl_client_array *Color; + struct gl_client_array *SecondaryColor; + struct gl_client_array *FogCoord; + struct gl_client_array *Index; + struct gl_client_array *TexCoord[MAX_TEXTURE_COORD_UNITS]; + struct gl_client_array *EdgeFlag; + struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ +}; + +struct ac_array_flags { + GLboolean Vertex; + GLboolean Normal; + GLboolean Color; + GLboolean SecondaryColor; + GLboolean FogCoord; + GLboolean Index; + GLboolean TexCoord[MAX_TEXTURE_COORD_UNITS]; + GLboolean EdgeFlag; + GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */ +}; + + +typedef struct { + GLuint NewState; /* not needed? */ + GLuint NewArrayState; + + /* Facility for importing and caching array data: + */ + struct ac_arrays Fallback; + struct ac_arrays Cache; + struct ac_arrays Raw; + struct ac_array_flags IsCached; + GLuint start; + GLuint count; + + /* Facility for importing element lists: + */ + GLuint *Elts; + GLuint elt_size; + +} ACcontext; + +#define AC_CONTEXT(ctx) ((ACcontext *)ctx->acache_context) + +#endif Index: xc/extras/Mesa/src/mesa/array_cache/ac_import.c diff -u /dev/null xc/extras/Mesa/src/mesa/array_cache/ac_import.c:1.1.1.2 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/array_cache/ac_import.c Fri Dec 10 10:06:44 2004 @@ -0,0 +1,902 @@ +/* + * Mesa 3-D graphics library + * Version: 6.1 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + +#include "glheader.h" +#include "macros.h" +#include "imports.h" +#include "mtypes.h" + +#include "math/m_translate.h" +#include "array_cache/ac_context.h" +#include "math/m_translate.h" + +#define STRIDE_ARRAY( array, offset ) \ +do { \ + GLubyte *tmp = ADD_POINTERS( (array).BufferObj->Data, (array).Ptr ) \ + + (offset) * (array).StrideB; \ + (array).Ptr = tmp; \ +} while (0) + + +/* Set the array pointer back to its source when the cached data is + * invalidated: + */ +static void +reset_texcoord( GLcontext *ctx, GLuint unit ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.TexCoord[unit].Enabled) { + ac->Raw.TexCoord[unit] = ctx->Array.TexCoord[unit]; + STRIDE_ARRAY(ac->Raw.TexCoord[unit], ac->start); + } + else { + ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit]; + + if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3] != 1.0) + ac->Raw.TexCoord[unit].Size = 4; + else if (ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2] != 0.0) + ac->Raw.TexCoord[unit].Size = 3; + else + ac->Raw.TexCoord[unit].Size = 2; + } + + ac->IsCached.TexCoord[unit] = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_TEXCOORD(unit); +} + +static void +reset_vertex( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + ASSERT(ctx->Array.Vertex.Enabled + || (ctx->VertexProgram._Enabled && ctx->Array.VertexAttrib[0].Enabled)); + ac->Raw.Vertex = ctx->Array.Vertex; + STRIDE_ARRAY(ac->Raw.Vertex, ac->start); + ac->IsCached.Vertex = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_VERTEX; +} + + +static void +reset_normal( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.Normal.Enabled) { + ac->Raw.Normal = ctx->Array.Normal; + STRIDE_ARRAY(ac->Raw.Normal, ac->start); + } + else { + ac->Raw.Normal = ac->Fallback.Normal; + } + + ac->IsCached.Normal = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_NORMAL; +} + + +static void +reset_color( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.Color.Enabled) { + ac->Raw.Color = ctx->Array.Color; + STRIDE_ARRAY(ac->Raw.Color, ac->start); + } + else + ac->Raw.Color = ac->Fallback.Color; + + ac->IsCached.Color = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_COLOR0; +} + + +static void +reset_secondarycolor( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.SecondaryColor.Enabled) { + ac->Raw.SecondaryColor = ctx->Array.SecondaryColor; + STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start); + } + else + ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; + + ac->IsCached.SecondaryColor = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_COLOR1; +} + + +static void +reset_index( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.Index.Enabled) { + ac->Raw.Index = ctx->Array.Index; + STRIDE_ARRAY(ac->Raw.Index, ac->start); + } + else + ac->Raw.Index = ac->Fallback.Index; + + ac->IsCached.Index = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_INDEX; +} + + +static void +reset_fogcoord( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.FogCoord.Enabled) { + ac->Raw.FogCoord = ctx->Array.FogCoord; + STRIDE_ARRAY(ac->Raw.FogCoord, ac->start); + } + else + ac->Raw.FogCoord = ac->Fallback.FogCoord; + + ac->IsCached.FogCoord = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_FOGCOORD; +} + + +static void +reset_edgeflag( GLcontext *ctx ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.EdgeFlag.Enabled) { + ac->Raw.EdgeFlag = ctx->Array.EdgeFlag; + STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start); + } + else + ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; + + ac->IsCached.EdgeFlag = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_EDGEFLAG; +} + + +static void +reset_attrib( GLcontext *ctx, GLuint index ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (ctx->Array.VertexAttrib[index].Enabled) { + ac->Raw.Attrib[index] = ctx->Array.VertexAttrib[index]; + STRIDE_ARRAY(ac->Raw.Attrib[index], ac->start); + } + else + ac->Raw.Attrib[index] = ac->Fallback.Attrib[index]; + + ac->IsCached.Attrib[index] = GL_FALSE; + ac->NewArrayState &= ~_NEW_ARRAY_ATTRIB(index); +} + + +/** + * Generic import function for color data + */ +static void +import( const GLcontext *ctx, + GLenum destType, + struct gl_client_array *to, + const struct gl_client_array *from ) +{ + const ACcontext *ac = AC_CONTEXT(ctx); + + if (destType == 0) + destType = from->Type; + + switch (destType) { + case GL_FLOAT: + _math_trans_4fc( (GLfloat (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->StrideB = 4 * sizeof(GLfloat); + to->Type = GL_FLOAT; + break; + + case GL_UNSIGNED_BYTE: + _math_trans_4ub( (GLubyte (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->StrideB = 4 * sizeof(GLubyte); + to->Type = GL_UNSIGNED_BYTE; + break; + + case GL_UNSIGNED_SHORT: + _math_trans_4us( (GLushort (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->StrideB = 4 * sizeof(GLushort); + to->Type = GL_UNSIGNED_SHORT; + break; + + default: + _mesa_problem(ctx, "Unexpected dest format in import()"); + break; + } +} + + + +/* + * Functions to import array ranges with specified types and strides. + * For example, if the vertex data is GLshort[2] and we want GLfloat[3] + * we'll use an import function to do the data conversion. + */ + +static void +import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.TexCoord[unit]; + struct gl_client_array *to = &ac->Cache.TexCoord[unit]; + (void) type; (void) stride; + + ASSERT(unit < ctx->Const.MaxTextureCoordUnits); + + /* Limited choices at this stage: + */ + ASSERT(type == GL_FLOAT); + ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); + ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); + + _math_trans_4f( (GLfloat (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->Size = from->Size; + to->StrideB = 4 * sizeof(GLfloat); + to->Type = GL_FLOAT; + ac->IsCached.TexCoord[unit] = GL_TRUE; +} + +static void +import_vertex( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.Vertex; + struct gl_client_array *to = &ac->Cache.Vertex; + (void) type; (void) stride; + + /* Limited choices at this stage: + */ + ASSERT(type == GL_FLOAT); + ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); + + _math_trans_4f( (GLfloat (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->Size = from->Size; + to->StrideB = 4 * sizeof(GLfloat); + to->Type = GL_FLOAT; + ac->IsCached.Vertex = GL_TRUE; +} + +static void +import_normal( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.Normal; + struct gl_client_array *to = &ac->Cache.Normal; + (void) type; (void) stride; + + /* Limited choices at this stage: + */ + ASSERT(type == GL_FLOAT); + ASSERT(stride == 3*sizeof(GLfloat) || stride == 0); + + _math_trans_3f( (GLfloat (*)[3]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + 0, + ac->count - ac->start); + + to->StrideB = 3 * sizeof(GLfloat); + to->Type = GL_FLOAT; + ac->IsCached.Normal = GL_TRUE; +} + +static void +import_color( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.Color; + struct gl_client_array *to = &ac->Cache.Color; + (void) stride; + + import( ctx, type, to, from ); + + ac->IsCached.Color = GL_TRUE; +} + +static void +import_index( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.Index; + struct gl_client_array *to = &ac->Cache.Index; + (void) type; (void) stride; + + /* Limited choices at this stage: + */ + ASSERT(type == GL_UNSIGNED_INT); + ASSERT(stride == sizeof(GLuint) || stride == 0); + + _math_trans_1ui( (GLuint *) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + 0, + ac->count - ac->start); + + to->StrideB = sizeof(GLuint); + to->Type = GL_UNSIGNED_INT; + ac->IsCached.Index = GL_TRUE; +} + +static void +import_secondarycolor( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.SecondaryColor; + struct gl_client_array *to = &ac->Cache.SecondaryColor; + (void) stride; + + import( ctx, type, to, from ); + + ac->IsCached.SecondaryColor = GL_TRUE; +} + +static void +import_fogcoord( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.FogCoord; + struct gl_client_array *to = &ac->Cache.FogCoord; + (void) type; (void) stride; + + /* Limited choices at this stage: + */ + ASSERT(type == GL_FLOAT); + ASSERT(stride == sizeof(GLfloat) || stride == 0); + + _math_trans_1f( (GLfloat *) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + 0, + ac->count - ac->start); + + to->StrideB = sizeof(GLfloat); + to->Type = GL_FLOAT; + ac->IsCached.FogCoord = GL_TRUE; +} + +static void +import_edgeflag( GLcontext *ctx, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.EdgeFlag; + struct gl_client_array *to = &ac->Cache.EdgeFlag; + (void) type; (void) stride; + + /* Limited choices at this stage: + */ + ASSERT(type == GL_UNSIGNED_BYTE); + ASSERT(stride == sizeof(GLubyte) || stride == 0); + + _math_trans_1ub( (GLubyte *) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + 0, + ac->count - ac->start); + + to->StrideB = sizeof(GLubyte); + to->Type = GL_UNSIGNED_BYTE; + ac->IsCached.EdgeFlag = GL_TRUE; +} + +static void +import_attrib( GLcontext *ctx, GLuint index, GLenum type, GLuint stride ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + const struct gl_client_array *from = &ac->Raw.Attrib[index]; + struct gl_client_array *to = &ac->Cache.Attrib[index]; + (void) type; (void) stride; + + ASSERT(index < VERT_ATTRIB_MAX); + + /* Limited choices at this stage: + */ + ASSERT(type == GL_FLOAT); + ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); + ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); + + _math_trans_4f( (GLfloat (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + ac->count - ac->start); + + to->Size = from->Size; + to->StrideB = 4 * sizeof(GLfloat); + to->Type = GL_FLOAT; + ac->IsCached.Attrib[index] = GL_TRUE; +} + + + +/* + * Externals to request arrays with specific properties: + */ + + +struct gl_client_array * +_ac_import_texcoord( GLcontext *ctx, + GLuint unit, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + ASSERT(unit < ctx->Const.MaxTextureCoordUnits); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_TEXCOORD(unit)) + reset_texcoord( ctx, unit ); + + /* Is the request impossible? + */ + if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize) + return 0; + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.TexCoord[unit].Type != type || + (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint)reqstride) || + reqwriteable) + { + if (!ac->IsCached.TexCoord[unit]) + import_texcoord(ctx, unit, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.TexCoord[unit]; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.TexCoord[unit]; + } +} + +struct gl_client_array * +_ac_import_vertex( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_VERTEX) + reset_vertex( ctx ); + + /* Is the request impossible? + */ + if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize) + return 0; + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.Vertex.Type != type || + (reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.Vertex) + import_vertex(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.Vertex; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.Vertex; + } +} + +struct gl_client_array * +_ac_import_normal( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_NORMAL) + reset_normal( ctx ); + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.Normal.Type != type || + (reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.Normal) + import_normal(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.Normal; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.Normal; + } +} + +struct gl_client_array * +_ac_import_color( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_COLOR0) + reset_color( ctx ); + + /* Is the request impossible? + */ + if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) { + return 0; + } + + /* Do we need to pull in a copy of the client data: + */ + if ((type != 0 && ac->Raw.Color.Type != type) || + (reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.Color) { + import_color(ctx, type, reqstride ); + } + *writeable = GL_TRUE; + return &ac->Cache.Color; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.Color; + } +} + +struct gl_client_array * +_ac_import_index( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_INDEX) + reset_index( ctx ); + + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.Index.Type != type || + (reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.Index) + import_index(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.Index; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.Index; + } +} + +struct gl_client_array * +_ac_import_secondarycolor( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_COLOR1) + reset_secondarycolor( ctx ); + + /* Is the request impossible? + */ + if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize) + return 0; + + /* Do we need to pull in a copy of the client data: + */ + if ((type != 0 && ac->Raw.SecondaryColor.Type != type) || + (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint)reqstride) || + reqwriteable) + { + if (!ac->IsCached.SecondaryColor) + import_secondarycolor(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.SecondaryColor; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.SecondaryColor; + } +} + +struct gl_client_array * +_ac_import_fogcoord( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD) + reset_fogcoord( ctx ); + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.FogCoord.Type != type || + (reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.FogCoord) + import_fogcoord(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.FogCoord; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.FogCoord; + } +} + +struct gl_client_array * +_ac_import_edgeflag( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG) + reset_edgeflag( ctx ); + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.EdgeFlag.Type != type || + (reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) || + reqwriteable) + { + if (!ac->IsCached.EdgeFlag) + import_edgeflag(ctx, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.EdgeFlag; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.EdgeFlag; + } +} + +/* GL_NV_vertex_program */ +struct gl_client_array * +_ac_import_attrib( GLcontext *ctx, + GLuint index, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwriteable, + GLboolean *writeable ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + ASSERT(index < VERT_ATTRIB_MAX); + + /* Can we keep the existing version? + */ + if (ac->NewArrayState & _NEW_ARRAY_ATTRIB(index)) + reset_attrib( ctx, index ); + + /* Is the request impossible? + */ + if (reqsize != 0 && ac->Raw.Attrib[index].Size > (GLint) reqsize) + return NULL; + + /* Do we need to pull in a copy of the client data: + */ + if (ac->Raw.Attrib[index].Type != type || + (reqstride != 0 && ac->Raw.Attrib[index].StrideB != (GLint)reqstride) || + reqwriteable) + { + if (!ac->IsCached.Attrib[index]) + import_attrib(ctx, index, type, reqstride ); + *writeable = GL_TRUE; + return &ac->Cache.Attrib[index]; + } + else { + *writeable = GL_FALSE; + return &ac->Raw.Attrib[index]; + } +} + + +/* Clients must call this function to validate state and set bounds + * before importing any data: + */ +void +_ac_import_range( GLcontext *ctx, GLuint start, GLuint count ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (!ctx->Array.LockCount) { + /* Not locked, discard cached data. Changes to lock + * status are caught via. _ac_invalidate_state(). + */ + ac->NewArrayState = _NEW_ARRAY_ALL; + ac->start = start; + ac->count = count; + } + else { + /* Locked, discard data for any disabled arrays. Require that + * the whole locked range always be dealt with, otherwise hard to + * maintain cached data in the face of clipping. + */ + ac->NewArrayState |= ~ctx->Array._Enabled; + ac->start = ctx->Array.LockFirst; + ac->count = ctx->Array.LockCount; + ASSERT(ac->start == start); /* hmm? */ + ASSERT(ac->count == count); + } +} + + + +/* Additional convienence function for importing the element list + * for glDrawElements() and glDrawRangeElements(). + */ +CONST void * +_ac_import_elements( GLcontext *ctx, + GLenum new_type, + GLuint count, + GLenum old_type, + CONST void *indices ) +{ + ACcontext *ac = AC_CONTEXT(ctx); + + if (old_type == new_type) + return indices; + + if (ac->elt_size < count * sizeof(GLuint)) { + if (ac->Elts) FREE(ac->Elts); + while (ac->elt_size < count * sizeof(GLuint)) + ac->elt_size *= 2; + ac->Elts = (GLuint *) MALLOC(ac->elt_size); + } + + switch (new_type) { + case GL_UNSIGNED_BYTE: + ASSERT(0); + return 0; + case GL_UNSIGNED_SHORT: + ASSERT(0); + return 0; + case GL_UNSIGNED_INT: { + GLuint *out = (GLuint *)ac->Elts; + GLuint i; + + switch (old_type) { + case GL_UNSIGNED_BYTE: { + CONST GLubyte *in = (CONST GLubyte *)indices; + for (i = 0 ; i < count ; i++) + out[i] = in[i]; + break; + } + case GL_UNSIGNED_SHORT: { + CONST GLushort *in = (CONST GLushort *)indices; + for (i = 0 ; i < count ; i++) + out[i] = in[i]; + break; + } + default: + ASSERT(0); + } + + return (CONST void *)out; + } + default: + ASSERT(0); + break; + } + + return 0; +} Index: xc/extras/Mesa/src/mesa/array_cache/acache.h diff -u /dev/null xc/extras/Mesa/src/mesa/array_cache/acache.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/array_cache/acache.h Thu Apr 8 05:16:45 2004 @@ -0,0 +1,132 @@ + +/* + * Mesa 3-D graphics library + * Version: 4.1 + * + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + */ + +#ifndef _ARRAYCACHE_H +#define _ARRAYCACHE_H + +#include "mtypes.h" + + +extern GLboolean +_ac_CreateContext( GLcontext *ctx ); + +extern void +_ac_DestroyContext( GLcontext *ctx ); + +extern void +_ac_InvalidateState( GLcontext *ctx, GLuint new_state ); + +extern struct gl_client_array * +_ac_import_vertex( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_normal( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_color( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_index( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_secondarycolor( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_fogcoord( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_edgeflag( GLcontext *ctx, + GLenum type, + GLuint reqstride, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_texcoord( GLcontext *ctx, + GLuint unit, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwritable, + GLboolean *writable ); + +extern struct gl_client_array * +_ac_import_attrib( GLcontext *ctx, + GLuint index, + GLenum type, + GLuint reqstride, + GLuint reqsize, + GLboolean reqwritable, + GLboolean *writable ); + + +/* Clients must call this function to validate state and set bounds + * before importing any data: + */ +extern void +_ac_import_range( GLcontext *ctx, GLuint start, GLuint count ); + + +/* Additional convenience function: + */ +extern CONST void * +_ac_import_elements( GLcontext *ctx, + GLenum new_type, + GLuint count, + GLenum old_type, + CONST void *indices ); + + +#endif Index: xc/extras/Mesa/src/mesa/drivers/common/descrip.mms diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/common/descrip.mms:1.1.1.2 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/drivers/common/descrip.mms Fri Dec 10 10:06:34 2004 @@ -0,0 +1,37 @@ +# Makefile for core library for VMS +# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl +# Last revision : 16 June 2003 + +.first + define gl [----.include.gl] + define math [--.math] + define swrast [--.swrast] + +.include [----]mms-config. + +##### MACROS ##### + +VPATH = RCS + +INCDIR = [----.include],[--.main],[--.glapi],[--.shader] +LIBDIR = [----.lib] +CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short) + +SOURCES = driverfuncs.c + +OBJECTS =driverfuncs.obj + +##### RULES ##### + +VERSION=Mesa V3.4 + +##### TARGETS ##### +# Make the library +$(LIBDIR)$(GL_LIB) : $(OBJECTS) + @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) + +clean : + purge + delete *.obj;* + +driverfuncs.obj : driverfuncs.c Index: xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.c:1.1.1.2 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.c Fri Dec 10 10:06:34 2004 @@ -0,0 +1,211 @@ +/* + * Mesa 3-D graphics library + * Version: 6.1 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "glheader.h" +#include "imports.h" +#include "buffers.h" +#include "context.h" +#include "program.h" +#include "texcompress.h" +#include "texformat.h" +#include "teximage.h" +#include "texobj.h" +#include "texstore.h" +#include "bufferobj.h" + +#include "driverfuncs.h" +#include "swrast/swrast.h" + + + +/** + * Plug in default functions for all pointers in the dd_function_table + * structure. + * Device drivers should call this function and then plug in any + * functions which it wants to override. + * Some functions (pointers) MUST be implemented by all drivers (REQUIRED). + * + * \param table the dd_function_table to initialize + */ +void +_mesa_init_driver_functions(struct dd_function_table *driver) +{ + _mesa_bzero(driver, sizeof(*driver)); + + driver->GetString = NULL; /* REQUIRED! */ + driver->UpdateState = NULL; /* REQUIRED! */ + driver->GetBufferSize = NULL; /* REQUIRED! */ + driver->ResizeBuffers = _swrast_alloc_buffers; + driver->Error = NULL; + + driver->Finish = NULL; + driver->Flush = NULL; + + /* framebuffer/image functions */ + driver->Clear = _swrast_Clear; + driver->Accum = _swrast_Accum; + driver->DrawPixels = _swrast_DrawPixels; + driver->ReadPixels = _swrast_ReadPixels; + driver->CopyPixels = _swrast_CopyPixels; + driver->Bitmap = _swrast_Bitmap; + + /* Texture functions */ + driver->ChooseTextureFormat = _mesa_choose_tex_format; + driver->TexImage1D = _mesa_store_teximage1d; + driver->TexImage2D = _mesa_store_teximage2d; + driver->TexImage3D = _mesa_store_teximage3d; + driver->TexSubImage1D = _mesa_store_texsubimage1d; + driver->TexSubImage2D = _mesa_store_texsubimage2d; + driver->TexSubImage3D = _mesa_store_texsubimage3d; + driver->CopyTexImage1D = _swrast_copy_teximage1d; + driver->CopyTexImage2D = _swrast_copy_teximage2d; + driver->CopyTexSubImage1D = _swrast_copy_texsubimage1d; + driver->CopyTexSubImage2D = _swrast_copy_texsubimage2d; + driver->CopyTexSubImage3D = _swrast_copy_texsubimage3d; + driver->TestProxyTexImage = _mesa_test_proxy_teximage; + driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d; + driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d; + driver->CompressedTexImage3D = _mesa_store_compressed_teximage3d; + driver->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; + driver->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; + driver->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; + driver->CompressedTextureSize = _mesa_compressed_texture_size; + driver->BindTexture = NULL; + driver->NewTextureObject = _mesa_new_texture_object; + driver->DeleteTexture = _mesa_delete_texture_object; + driver->NewTextureImage = _mesa_new_texture_image; + driver->IsTextureResident = NULL; + driver->PrioritizeTexture = NULL; + driver->ActiveTexture = NULL; + driver->UpdateTexturePalette = NULL; + + /* imaging */ + driver->CopyColorTable = _swrast_CopyColorTable; + driver->CopyColorSubTable = _swrast_CopyColorSubTable; + driver->CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + driver->CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; + + /* Vertex/fragment programs */ + driver->BindProgram = NULL; + driver->NewProgram = _mesa_new_program; + driver->DeleteProgram = _mesa_delete_program; + + /* simple state commands */ + driver->AlphaFunc = NULL; + driver->BlendColor = NULL; + driver->BlendEquationSeparate = NULL; + driver->BlendFuncSeparate = NULL; + driver->ClearColor = NULL; + driver->ClearDepth = NULL; + driver->ClearIndex = NULL; + driver->ClearStencil = NULL; + driver->ClipPlane = NULL; + driver->ColorMask = NULL; + driver->ColorMaterial = NULL; + driver->CullFace = NULL; + driver->DrawBuffer = _swrast_DrawBuffer; + driver->FrontFace = NULL; + driver->DepthFunc = NULL; + driver->DepthMask = NULL; + driver->DepthRange = NULL; + driver->Enable = NULL; + driver->Fogfv = NULL; + driver->Hint = NULL; + driver->IndexMask = NULL; + driver->Lightfv = NULL; + driver->LightModelfv = NULL; + driver->LineStipple = NULL; + driver->LineWidth = NULL; + driver->LogicOpcode = NULL; + driver->PointParameterfv = NULL; + driver->PointSize = NULL; + driver->PolygonMode = NULL; + driver->PolygonOffset = NULL; + driver->PolygonStipple = NULL; + driver->ReadBuffer = NULL; + driver->RenderMode = NULL; + driver->Scissor = NULL; + driver->ShadeModel = NULL; + driver->StencilFunc = NULL; + driver->StencilMask = NULL; + driver->StencilOp = NULL; + driver->ActiveStencilFace = NULL; + driver->TexGen = NULL; + driver->TexEnv = NULL; + driver->TexParameter = NULL; + driver->TextureMatrix = NULL; + driver->Viewport = NULL; + + /* vertex arrays */ + driver->VertexPointer = NULL; + driver->NormalPointer = NULL; + driver->ColorPointer = NULL; + driver->FogCoordPointer = NULL; + driver->IndexPointer = NULL; + driver->SecondaryColorPointer = NULL; + driver->TexCoordPointer = NULL; + driver->EdgeFlagPointer = NULL; + driver->VertexAttribPointer = NULL; + driver->LockArraysEXT = NULL; + driver->UnlockArraysEXT = NULL; + + /* state queries */ + driver->GetBooleanv = NULL; + driver->GetDoublev = NULL; + driver->GetFloatv = NULL; + driver->GetIntegerv = NULL; + driver->GetPointerv = NULL; + +#if FEATURE_ARB_vertex_buffer_object + driver->NewBufferObject = _mesa_new_buffer_object; + driver->DeleteBuffer = _mesa_delete_buffer_object; + driver->BindBuffer = NULL; + driver->BufferData = _mesa_buffer_data; + driver->BufferSubData = _mesa_buffer_subdata; + driver->GetBufferSubData = _mesa_buffer_get_subdata; + driver->MapBuffer = _mesa_buffer_map; + driver->UnmapBuffer = NULL; +#endif + + /* T&L stuff */ + driver->NeedValidate = GL_FALSE; + driver->ValidateTnlModule = NULL; + driver->CurrentExecPrimitive = 0; + driver->CurrentSavePrimitive = 0; + driver->NeedFlush = 0; + driver->SaveNeedFlush = 0; + + driver->FlushVertices = NULL; + driver->SaveFlushVertices = NULL; + driver->NotifySaveBegin = NULL; + driver->LightingSpaceChange = NULL; + driver->MakeCurrent = NULL; + + /* display list */ + driver->NewList = NULL; + driver->EndList = NULL; + driver->BeginCallList = NULL; + driver->EndCallList = NULL; +} Index: xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:00 2005 +++ xc/extras/Mesa/src/mesa/drivers/common/driverfuncs.h Thu Jun 10 10:22:36 2004 @@ -0,0 +1,32 @@ +/* + * Mesa 3-D graphics library + * Version: 6.1 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef DRIVERFUNCS_H +#define DRIVERFUNCS_H + +extern void +_mesa_init_driver_functions(struct dd_function_table *driver); + +#endif Index: xc/extras/Mesa/src/mesa/drivers/dri/Makefile diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/Makefile:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/Makefile Fri Dec 10 10:05:36 2004 @@ -0,0 +1,28 @@ +# src/mesa/drivers/dri/Makefile + +TOP = ../../../.. + +include $(TOP)/configs/current + + + +default: $(LIB_DIR) subdirs + + +$(LIB_DIR): + -mkdir $(LIB_DIR) + + +subdirs: + echo $(DRI_DIRS) + @for dir in $(DRI_DIRS) ; do \ + echo $$dir ; \ + (cd $$dir ; $(MAKE)) || exit 1; \ + done + + +clean: + @for dir in $(DRI_DIRS) ; do \ + (cd $$dir ; $(MAKE) clean) ; \ + done + -rm -f common/*.o Index: xc/extras/Mesa/src/mesa/drivers/dri/Makefile.template diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/Makefile.template:1.1.1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/Makefile.template Fri Dec 10 10:32:40 2004 @@ -0,0 +1,101 @@ +# -*-makefile-*- + +MESA_MODULES = $(TOP)/src/mesa/mesa.a + + +ifeq ($(WINDOW_SYSTEM),dri) +WINOBJ=../dri_client/dri.a +WINLIB= +INCLUDES = $(SHARED_INCLUDES) \ + -I../dri_client \ + -I../dri_client/imports + +OBJECTS = $(C_SOURCES:.c=.o) \ + $(ASM_SOURCES:.S=.o) + +else +WINOBJ= +WINLIB=-L$(MESA)/src/glx/mini +MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini +INCLUDES = $(MINIGLX_INCLUDES) \ + -I$(DRM_SOURCE_PATH)/shared \ + -I$(DRM_SOURCE_PATH)/libdrm \ + $(SHARED_INCLUDES) + +OBJECTS = $(C_SOURCES:.c=.o) \ + $(MINIGLX_SOURCES:.c=.o) \ + $(ASM_SOURCES:.S=.o) +endif + + + + + +### Include directories +SHARED_INCLUDES = \ + -I. \ + -I$(TOP)/src/mesa/drivers/dri/common \ + -Iserver \ + -I$(DRM_SOURCE_PATH)/shared \ + -I$(DRM_SOURCE_PATH)/linux \ + -I$(TOP)/include \ + -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mesa \ + -I$(TOP)/src/mesa/main \ + -I$(TOP)/src/mesa/glapi \ + -I$(TOP)/src/mesa/math \ + -I$(TOP)/src/mesa/transform \ + -I$(TOP)/src/mesa/shader \ + -I$(TOP)/src/mesa/swrast \ + -I$(TOP)/src/mesa/swrast_setup + +# Of course we're direct rendering. Redundant #ifdefs in the code +# from prehistory require this: +# +DEFINES += -DGLX_DIRECT_RENDERING + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + +.S.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + + +##### TARGETS ##### + +default: depend symlinks $(LIB_DIR)/$(LIBNAME) + + +#$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile +# @echo BUILDING FOR: $(WINDOW_SYSTEM) +# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \ +# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS) + + +$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template + rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(GL_LIB_DEPS) + + + + +# Run 'make depend' to update the dependencies if you change +# what's included by any source file. +depend: $(C_SOURCES) $(ASM_SOURCES) + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \ + > /dev/null 2>&1 + + +# Emacs tags +tags: + etags `find . -name \*.[ch]` `find ../include` + + +# Remove .o and backup files +clean: + -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS) + -rm -f depend depend.bak + +include depend Index: xc/extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h:1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h Mon Dec 13 17:40:49 2004 @@ -0,0 +1,216 @@ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/depthtmp.h,v 1.2 2004/12/13 22:40:49 tsi Exp $ */ + +#ifndef DBG +#define DBG 0 +#endif + + +#ifndef HAVE_HW_DEPTH_SPANS +#define HAVE_HW_DEPTH_SPANS 0 +#endif +#ifndef HAVE_HW_DEPTH_PIXELS +#define HAVE_HW_DEPTH_PIXELS 0 +#endif + +#ifndef HW_READ_LOCK +#define HW_READ_LOCK() HW_LOCK() +#endif +#ifndef HW_READ_UNLOCK +#define HW_READ_UNLOCK() HW_UNLOCK() +#endif + +static void TAG(WriteDepthSpan)( GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLdepth *depth, + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint x1; + GLint n1; + LOCAL_DEPTH_VARS; + + y = Y_FLIP( y ); + +#if HAVE_HW_DEPTH_SPANS + (void) x1; (void) n1; + + if ( DBG ) fprintf( stderr, "WriteDepthSpan 0..%d (x1 %d)\n", + (int)n, (int)x ); + + WRITE_DEPTH_SPAN(); +#else + HW_CLIPLOOP() + { + GLint i = 0; + CLIPSPAN( x, y, n, x1, n1, i ); + + if ( DBG ) fprintf( stderr, "WriteDepthSpan %d..%d (x1 %d)\n", + (int)i, (int)n1, (int)x1 ); + + if ( mask ) { + for ( ; i < n1 ; i++, x1++ ) { + if ( mask[i] ) WRITE_DEPTH( x1, y, depth[i] ); + } + } else { + for ( ; i < n1 ; i++, x1++ ) { + WRITE_DEPTH( x1, y, depth[i] ); + } + } + } + HW_ENDCLIPLOOP(); +#endif + } + HW_WRITE_UNLOCK(); +} + +#ifndef NO_MONO + +static void TAG(WriteMonoDepthSpan)( GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLdepth depth, + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint x1; + GLint n1; + LOCAL_DEPTH_VARS; + + y = Y_FLIP( y ); + + HW_CLIPLOOP() + { + GLint i = 0; + CLIPSPAN( x, y, n, x1, n1, i ); + + if ( DBG ) fprintf( stderr, "%s %d..%d (x1 %d) = %u\n", + __FUNCTION__, (int)i, (int)n1, (int)x1, (GLuint)depth ); + + if ( mask ) { + for ( ; i < n1 ; i++, x1++ ) { + if ( mask[i] ) WRITE_DEPTH( x1, y, depth ); + } + } else { + for ( ; i < n1 ; i++, x1++ ) { + WRITE_DEPTH( x1, y, depth ); + } + } + } + HW_ENDCLIPLOOP(); + } + HW_WRITE_UNLOCK(); +} + +#endif + +static void TAG(WriteDepthPixels)( GLcontext *ctx, + GLuint n, + const GLint x[], + const GLint y[], + const GLdepth depth[], + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint i; + LOCAL_DEPTH_VARS; + + if ( DBG ) fprintf( stderr, "WriteDepthPixels\n" ); + +#if HAVE_HW_DEPTH_PIXELS + (void) i; + + WRITE_DEPTH_PIXELS(); +#else + HW_CLIPLOOP() + { + for ( i = 0 ; i < n ; i++ ) { + if ( mask[i] ) { + const int fy = Y_FLIP( y[i] ); + if ( CLIPPIXEL( x[i], fy ) ) + WRITE_DEPTH( x[i], fy, depth[i] ); + } + } + } + HW_ENDCLIPLOOP(); +#endif + } + HW_WRITE_UNLOCK(); +} + + +/* Read depth spans and pixels + */ +static void TAG(ReadDepthSpan)( GLcontext *ctx, + GLuint n, GLint x, GLint y, + GLdepth depth[] ) +{ + HW_READ_LOCK() + { + GLint x1, n1; + LOCAL_DEPTH_VARS; + + y = Y_FLIP( y ); + + if ( DBG ) fprintf( stderr, "ReadDepthSpan\n" ); + +#if HAVE_HW_DEPTH_SPANS + (void) x1; (void) n1; + + READ_DEPTH_SPAN(); +#else + HW_CLIPLOOP() + { + GLint i = 0; + CLIPSPAN( x, y, n, x1, n1, i ); + for ( ; i < n1 ; i++ ) + READ_DEPTH( depth[i], (x1+i), y ); + } + HW_ENDCLIPLOOP(); +#endif + } + HW_READ_UNLOCK(); +} + +static void TAG(ReadDepthPixels)( GLcontext *ctx, GLuint n, + const GLint x[], const GLint y[], + GLdepth depth[] ) +{ + HW_READ_LOCK() + { + GLint i; + LOCAL_DEPTH_VARS; + + if ( DBG ) fprintf( stderr, "ReadDepthPixels\n" ); + +#if HAVE_HW_DEPTH_PIXELS + (void) i; + + READ_DEPTH_PIXELS(); +#else + HW_CLIPLOOP() + { + for ( i = 0 ; i < n ;i++ ) { + int fy = Y_FLIP( y[i] ); + if ( CLIPPIXEL( x[i], fy ) ) + READ_DEPTH( depth[i], x[i], fy ); + } + } + HW_ENDCLIPLOOP(); +#endif + } + HW_READ_UNLOCK(); +} + + +#if HAVE_HW_DEPTH_SPANS +#undef WRITE_DEPTH_SPAN +#undef WRITE_DEPTH_PIXELS +#undef READ_DEPTH_SPAN +#undef READ_DEPTH_PIXELS +#else +#undef WRITE_DEPTH +#undef READ_DEPTH +#endif +#undef TAG Index: xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c:1.3 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c Mon Dec 13 17:40:49 2004 @@ -0,0 +1,1714 @@ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.c,v 1.3 2004/12/13 22:40:49 tsi Exp $ */ +/** + * \file dri_util.c + * DRI utility functions. + * + * This module acts as glue between GLX and the actual hardware driver. A DRI + * driver doesn't really \e have to use any of this - it's optional. But, some + * useful stuff is done here that otherwise would have to be duplicated in most + * drivers. + * + * Basically, these utility functions take care of some of the dirty details of + * screen initialization, context creation, context binding, DRM setup, etc. + * + * These functions are compiled into each DRI driver so libGL.so knows nothing + * about them. + * + * \note + * When \c DRI_NEW_INTERFACE_ONLY is defined, code is built / not built so + * that only the "new" libGL-to-driver interfaces are supported. This breaks + * backwards compatability. However, this may be necessary when DRI drivers + * are built to be used in non-XFree86 environments. + * + * \todo There are still some places in the code that need to be wrapped with + * \c DRI_NEW_INTERFACE_ONLY. + */ + + +#ifdef GLX_DIRECT_RENDERING + +#include +#include +#include +#include +#include + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) +#endif + +#ifndef DRI_NEW_INTERFACE_ONLY +# include +# include +# include +# include "xf86dri.h" +# define _mesa_malloc(b) Xmalloc(b) +# define _mesa_free(m) Xfree(m) +#else +# include "imports.h" +# define None 0 +#endif /* DRI_NEW_INTERFACE_ONLY */ + +#include "dri_util.h" +#include "drm_sarea.h" +#include "glcontextmodes.h" + +/** + * Weak thread-safety dispatch pointer. Older versions of libGL will not have + * this symbol, so a "weak" version is included here so that the driver will + * dynamically link properly. The value is set to \c NULL. This forces the + * driver to fall back to the old dispatch interface. + */ +struct _glapi_table *_glapi_DispatchTSD __attribute__((weak)) = NULL; + +/** + * This is used in a couple of places that call \c driCreateNewDrawable. + */ +static const int empty_attribute_list[1] = { None }; + +/** + * Function used to determine if a drawable (window) still exists. Ideally + * this function comes from libGL. With older versions of libGL from XFree86 + * we can fall-back to an internal version. + * + * \sa __driWindowExists __glXWindowExists + */ +static PFNGLXWINDOWEXISTSPROC window_exists; + +typedef GLboolean (*PFNGLXCREATECONTEXTWITHCONFIGPROC)( __DRInativeDisplay*, int, int, void *, + drm_context_t * ); + +static PFNGLXCREATECONTEXTWITHCONFIGPROC create_context_with_config; + +/** + * Cached copy of the internal API version used by libGL and the client-side + * DRI driver. + */ +static int api_ver = 0; + +/* forward declarations */ +static int driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv, + int64_t * sbc, int64_t * missedFrames, float * lastMissedUsage, + float * usage ); + +static void *driCreateNewDrawable(__DRInativeDisplay *dpy, const __GLcontextModes *modes, + __DRIid draw, __DRIdrawable *pdraw, int renderType, const int *attrs); + +static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate); + + + + +#ifdef not_defined +static GLboolean driFeatureOn(const char *name) +{ + char *env = getenv(name); + + if (!env) return GL_FALSE; + if (!strcasecmp(env, "enable")) return GL_TRUE; + if (!strcasecmp(env, "1")) return GL_TRUE; + if (!strcasecmp(env, "on")) return GL_TRUE; + if (!strcasecmp(env, "true")) return GL_TRUE; + if (!strcasecmp(env, "t")) return GL_TRUE; + if (!strcasecmp(env, "yes")) return GL_TRUE; + if (!strcasecmp(env, "y")) return GL_TRUE; + + return GL_FALSE; +} +#endif /* not_defined */ + + +/** + * Print message to \c stderr if the \c LIBGL_DEBUG environment variable + * is set. + * + * Is called from the drivers. + * + * \param f \c printf like format string. + */ +void +__driUtilMessage(const char *f, ...) +{ + va_list args; + + if (getenv("LIBGL_DEBUG")) { + fprintf(stderr, "libGL error: \n"); + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + fprintf(stderr, "\n"); + } +} + +/* + * fd.o bug #1713: Some rare libGL's have __glXFindDRIScreen defined but do not + * export it via glXGetProcAddress. These are not supported anymore, so print + * an error message to that effect. - ajax 2004-10-26 + */ +typedef __DRIscreen *(*PFNGLXFINDDRISCREEN)(__DRInativeDisplay *, int); + +static __DRIscreen *glx_find_dri_screen(__DRInativeDisplay *d, int i) +{ + PFNGLXFINDDRISCREEN findscreen = + (PFNGLXFINDDRISCREEN)glXGetProcAddress("__glXFindDRIScreen"); + + if (!findscreen) + { + __driUtilMessage("glXGetProcAddress(\"__glXFindDRIScreen\") failed!"); + __driUtilMessage("Your libGL is too old, please upgrade."); + return NULL; + } + else return findscreen(d, i); +} + +/*****************************************************************/ +/** \name Visual utility functions */ +/*****************************************************************/ +/*@{*/ + +#ifndef DRI_NEW_INTERFACE_ONLY +/** + * Find a \c __GLcontextModes structure matching the given visual ID. + * + * \param dpy Display to search for a matching configuration. + * \param scrn Screen number on \c dpy to be searched. + * \param vid Desired \c VisualID to find. + * + * \returns A pointer to a \c __GLcontextModes structure that matches \c vid, + * if found, or \c NULL if no match is found. + */ +static const __GLcontextModes * +findConfigMode(__DRInativeDisplay *dpy, int scrn, VisualID vid, + const __DRIscreen * pDRIScreen) +{ + if ( (pDRIScreen != NULL) && (pDRIScreen->private != NULL) ) { + const __DRIscreenPrivate * const psp = + (const __DRIscreenPrivate *) pDRIScreen->private; + + return _gl_context_modes_find_visual( psp->modes, vid ); + } + + return NULL; +} + + +/** + * This function is a hack to work-around old versions of libGL.so that + * do not export \c XF86DRICreateContextWithConfig. I would modify the + * code to just use this function, but the stand-alone driver (i.e., DRI + * drivers that are built to work without XFree86) shouldn't have to know + * about X structures like a \c Visual. + */ +static GLboolean +fake_XF86DRICreateContextWithConfig( __DRInativeDisplay* dpy, int screen, int configID, + XID* context, drm_context_t * hHWContext ) +{ + Visual vis; + + vis.visualid = configID; + return XF86DRICreateContext( dpy, screen, & vis, context, hHWContext ); +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/*@}*/ + + +/*****************************************************************/ +/** \name Drawable list management */ +/*****************************************************************/ +/*@{*/ + +static GLboolean __driAddDrawable(void *drawHash, __DRIdrawable *pdraw) +{ + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; + + if (drmHashInsert(drawHash, pdp->draw, pdraw)) + return GL_FALSE; + + return GL_TRUE; +} + +static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw) +{ + int retcode; + union + { + __DRIdrawable *pdraw; + void *ptr; + } p; + + retcode = drmHashLookup(drawHash, draw, &p.ptr); + if (retcode) + return NULL; + + return p.pdraw; +} + +static void __driRemoveDrawable(void *drawHash, __DRIdrawable *pdraw) +{ + int retcode; + union + { + __DRIdrawablePrivate *pdp; + void *ptr; + } p; + + p.pdp = (__DRIdrawablePrivate *)pdraw->private; + + retcode = drmHashLookup(drawHash, p.pdp->draw, &p.ptr); + if (!retcode) { /* Found */ + drmHashDelete(drawHash, p.pdp->draw); + } +} + +#ifndef DRI_NEW_INTERFACE_ONLY +static GLboolean __driWindowExistsFlag; + +static int __driWindowExistsErrorHandler(Display *dpy, XErrorEvent *xerr) +{ + if (xerr->error_code == BadWindow) { + __driWindowExistsFlag = GL_FALSE; + } + return 0; +} + +/** + * Determine if a window associated with a \c GLXDrawable exists on the + * X-server. + * + * \param dpy Display associated with the drawable to be queried. + * \param draw \c GLXDrawable to test. + * + * \returns \c GL_TRUE if a window exists that is associated with \c draw, + * otherwise \c GL_FALSE is returned. + * + * \warning This function is not currently thread-safe. + * + * \deprecated + * \c __glXWindowExists (from libGL) is prefered over this function. Starting + * with the next major release of XFree86, this function will be removed. + * Even now this function is no longer directly called. Instead it is called + * via a function pointer if and only if \c __glXWindowExists does not exist. + * + * \sa __glXWindowExists glXGetProcAddress window_exists + */ +static GLboolean __driWindowExists(Display *dpy, GLXDrawable draw) +{ + XWindowAttributes xwa; + int (*oldXErrorHandler)(Display *, XErrorEvent *); + + XSync(dpy, GL_FALSE); + __driWindowExistsFlag = GL_TRUE; + oldXErrorHandler = XSetErrorHandler(__driWindowExistsErrorHandler); + XGetWindowAttributes(dpy, draw, &xwa); /* dummy request */ + XSetErrorHandler(oldXErrorHandler); + return __driWindowExistsFlag; +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/** + * Find drawables in the local hash that have been destroyed on the + * server. + * + * \param drawHash Hash-table containing all know drawables. + */ +static void __driGarbageCollectDrawables(void *drawHash) +{ + __DRIid draw; + __DRInativeDisplay *dpy; + union + { + __DRIdrawable *pdraw; + void *ptr; + } p; + + if (drmHashFirst(drawHash, &draw, &p.ptr)) { + do { + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)p.pdraw->private; + dpy = pdp->driScreenPriv->display; + if (! (*window_exists)(dpy, draw)) { + /* Destroy the local drawable data in the hash table, if the + drawable no longer exists in the Xserver */ + __driRemoveDrawable(drawHash, p.pdraw); + (*p.pdraw->destroyDrawable)(dpy, p.pdraw->private); + _mesa_free(p.pdraw); + } + } while (drmHashNext(drawHash, &draw, &p.ptr)); + } +} + +/*@}*/ + + +/*****************************************************************/ +/** \name Context (un)binding functions */ +/*****************************************************************/ +/*@{*/ + +/** + * Unbind context. + * + * \param dpy the display handle. + * \param scrn the screen number. + * \param draw drawable. + * \param read Current reading drawable. + * \param gc context. + * + * \return \c GL_TRUE on success, or \c GL_FALSE on failure. + * + * \internal + * This function calls __DriverAPIRec::UnbindContext, and then decrements + * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful + * return. + * + * While casting the opaque private pointers associated with the parameters + * into their respective real types it also assures they are not \c NULL. + */ +static GLboolean driUnbindContext3(__DRInativeDisplay *dpy, int scrn, + __DRIid draw, __DRIid read, + __DRIcontext *ctx) +{ + __DRIscreen *pDRIScreen; + __DRIdrawable *pdraw; + __DRIdrawable *pread; + __DRIcontextPrivate *pcp; + __DRIscreenPrivate *psp; + __DRIdrawablePrivate *pdp; + __DRIdrawablePrivate *prp; + + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driUnbindContext3. + */ + + if (ctx == NULL || draw == None || read == None) { + /* ERROR!!! */ + return GL_FALSE; + } + + pDRIScreen = glx_find_dri_screen(dpy, scrn); + if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { + /* ERROR!!! */ + return GL_FALSE; + } + + psp = (__DRIscreenPrivate *)pDRIScreen->private; + pcp = (__DRIcontextPrivate *)ctx->private; + + pdraw = __driFindDrawable(psp->drawHash, draw); + if (!pdraw) { + /* ERROR!!! */ + return GL_FALSE; + } + pdp = (__DRIdrawablePrivate *)pdraw->private; + + pread = __driFindDrawable(psp->drawHash, read); + if (!pread) { + /* ERROR!!! */ + return GL_FALSE; + } + prp = (__DRIdrawablePrivate *)pread->private; + + + /* Let driver unbind drawable from context */ + (*psp->DriverAPI.UnbindContext)(pcp); + + + if (pdp->refcount == 0) { + /* ERROR!!! */ + return GL_FALSE; + } + + pdp->refcount--; + + if (prp != pdp) { + if (prp->refcount == 0) { + /* ERROR!!! */ + return GL_FALSE; + } + + prp->refcount--; + } + + + /* XXX this is disabled so that if we call SwapBuffers on an unbound + * window we can determine the last context bound to the window and + * use that context's lock. (BrianP, 2-Dec-2000) + */ +#if 0 + /* Unbind the drawable */ + pcp->driDrawablePriv = NULL; + pdp->driContextPriv = &psp->dummyContextPriv; +#endif + + return GL_TRUE; +} + + +/** + * This function takes both a read buffer and a draw buffer. This is needed + * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent + * function. + * + * \bug This function calls \c driCreateNewDrawable in two places with the + * \c renderType hard-coded to \c GLX_WINDOW_BIT. Some checking might + * be needed in those places when support for pbuffers and / or pixmaps + * is added. Is it safe to assume that the drawable is a window? + */ +static GLboolean DoBindContext(__DRInativeDisplay *dpy, + __DRIid draw, __DRIid read, + __DRIcontext *ctx, const __GLcontextModes * modes, + __DRIscreenPrivate *psp) +{ + __DRIdrawable *pdraw; + __DRIdrawablePrivate *pdp; + __DRIdrawable *pread; + __DRIdrawablePrivate *prp; + __DRIcontextPrivate * const pcp = ctx->private; + + + /* Find the _DRIdrawable which corresponds to the writing drawable. */ + pdraw = __driFindDrawable(psp->drawHash, draw); + if (!pdraw) { + /* Allocate a new drawable */ + pdraw = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); + if (!pdraw) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* Create a new drawable */ + driCreateNewDrawable(dpy, modes, draw, pdraw, GLX_WINDOW_BIT, + empty_attribute_list); + if (!pdraw->private) { + /* ERROR!!! */ + _mesa_free(pdraw); + return GL_FALSE; + } + + } + pdp = (__DRIdrawablePrivate *) pdraw->private; + + /* Find the _DRIdrawable which corresponds to the reading drawable. */ + if (read == draw) { + /* read buffer == draw buffer */ + prp = pdp; + } + else { + pread = __driFindDrawable(psp->drawHash, read); + if (!pread) { + /* Allocate a new drawable */ + pread = (__DRIdrawable *)_mesa_malloc(sizeof(__DRIdrawable)); + if (!pread) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* Create a new drawable */ + driCreateNewDrawable(dpy, modes, read, pread, GLX_WINDOW_BIT, + empty_attribute_list); + if (!pread->private) { + /* ERROR!!! */ + _mesa_free(pread); + return GL_FALSE; + } + } + prp = (__DRIdrawablePrivate *) pread->private; + } + + /* Bind the drawable to the context */ + pcp->driDrawablePriv = pdp; + pdp->driContextPriv = pcp; + pdp->refcount++; + if ( pdp != prp ) { + prp->refcount++; + } + + /* + ** Now that we have a context associated with this drawable, we can + ** initialize the drawable information if has not been done before. + */ + if (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp) { + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + __driUtilUpdateDrawableInfo(pdp); + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + } + + /* Call device-specific MakeCurrent */ + (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp); + + return GL_TRUE; +} + + +/** + * This function takes both a read buffer and a draw buffer. This is needed + * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent + * function. + */ +static GLboolean driBindContext3(__DRInativeDisplay *dpy, int scrn, + __DRIid draw, __DRIid read, + __DRIcontext * ctx) +{ + __DRIscreen *pDRIScreen; + + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driBindContext. + */ + + if (ctx == NULL || draw == None || read == None) { + /* ERROR!!! */ + return GL_FALSE; + } + + pDRIScreen = glx_find_dri_screen(dpy, scrn); + if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { + /* ERROR!!! */ + return GL_FALSE; + } + + return DoBindContext( dpy, draw, read, ctx, ctx->mode, + (__DRIscreenPrivate *)pDRIScreen->private ); +} + + +#ifndef DRI_NEW_INTERFACE_ONLY +/** + * This function takes both a read buffer and a draw buffer. This is needed + * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent + * function. + */ +static GLboolean driBindContext2(Display *dpy, int scrn, + GLXDrawable draw, GLXDrawable read, + GLXContext gc) +{ + __DRIscreen *pDRIScreen; + const __GLcontextModes *modes; + + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driBindContext. + */ + + if (gc == NULL || draw == None || read == None) { + /* ERROR!!! */ + return GL_FALSE; + } + + pDRIScreen = glx_find_dri_screen(dpy, scrn); + modes = (driCompareGLXAPIVersion( 20040317 ) >= 0) + ? gc->driContext.mode + : findConfigMode( dpy, scrn, gc->vid, pDRIScreen ); + + if ( modes == NULL ) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* findConfigMode will return NULL if the DRI screen or screen private + * are NULL. + */ + assert( (pDRIScreen != NULL) && (pDRIScreen->private != NULL) ); + + return DoBindContext( dpy, draw, read, & gc->driContext, modes, + (__DRIscreenPrivate *)pDRIScreen->private ); +} + +static GLboolean driUnbindContext2(Display *dpy, int scrn, + GLXDrawable draw, GLXDrawable read, + GLXContext gc) +{ + return driUnbindContext3(dpy, scrn, draw, read, & gc->driContext); +} + +/* + * Simply call bind with the same GLXDrawable for the read and draw buffers. + */ +static GLboolean driBindContext(Display *dpy, int scrn, + GLXDrawable draw, GLXContext gc) +{ + return driBindContext2(dpy, scrn, draw, draw, gc); +} + + +/* + * Simply call bind with the same GLXDrawable for the read and draw buffers. + */ +static GLboolean driUnbindContext(Display *dpy, int scrn, + GLXDrawable draw, GLXContext gc, + int will_rebind) +{ + (void) will_rebind; + return driUnbindContext2( dpy, scrn, draw, draw, gc ); +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/*@}*/ + + +/*****************************************************************/ +/** \name Drawable handling functions */ +/*****************************************************************/ +/*@{*/ + +/** + * Update private drawable information. + * + * \param pdp pointer to the private drawable information to update. + * + * This function basically updates the __DRIdrawablePrivate struct's + * cliprect information by calling \c __DRIDrawablePrivate::getInfo. This is + * usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which + * compares the __DRIdrwablePrivate pStamp and lastStamp values. If + * the values are different that means we have to update the clipping + * info. + */ +void +__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) +{ + __DRIscreenPrivate *psp; + __DRIcontextPrivate *pcp = pdp->driContextPriv; + + if (!pcp || (pdp != pcp->driDrawablePriv)) { + /* ERROR!!! */ + return; + } + + psp = pdp->driScreenPriv; + if (!psp) { + /* ERROR!!! */ + return; + } + + if (pdp->pClipRects) { + _mesa_free(pdp->pClipRects); + } + + if (pdp->pBackClipRects) { + _mesa_free(pdp->pBackClipRects); + } + + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + + if (!__driFindDrawable(psp->drawHash, pdp->draw) || + ! (*pdp->getInfo)(pdp->display, pdp->screen, pdp->draw, + &pdp->index, &pdp->lastStamp, + &pdp->x, &pdp->y, &pdp->w, &pdp->h, + &pdp->numClipRects, &pdp->pClipRects, + &pdp->backX, + &pdp->backY, + &pdp->numBackClipRects, + &pdp->pBackClipRects )) { + /* Error -- eg the window may have been destroyed. Keep going + * with no cliprects. + */ + pdp->pStamp = &pdp->lastStamp; /* prevent endless loop */ + pdp->numClipRects = 0; + pdp->pClipRects = NULL; + pdp->numBackClipRects = 0; + pdp->pBackClipRects = NULL; + } + else + pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp); + + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + +} + +/*@}*/ + +/*****************************************************************/ +/** \name GLX callbacks */ +/*****************************************************************/ +/*@{*/ + +/** + * Swap buffers. + * + * \param dpy the display handle. + * \param drawablePrivate opaque pointer to the per-drawable private info. + * + * \internal + * This function calls __DRIdrawablePrivate::swapBuffers. + * + * Is called directly from glXSwapBuffers(). + */ +static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate ) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + dPriv->swapBuffers(dPriv); + (void) dpy; +} + +/** + * Called directly from a number of higher-level GLX functions. + */ +static int driGetMSC( void *screenPrivate, int64_t *msc ) +{ + __DRIscreenPrivate *sPriv = (__DRIscreenPrivate *) screenPrivate; + + return sPriv->DriverAPI.GetMSC( sPriv, msc ); +} + +/** + * Called directly from a number of higher-level GLX functions. + */ +static int driGetSBC( __DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + __DRIswapInfo sInfo; + int status; + + + status = dPriv->driScreenPriv->DriverAPI.GetSwapInfo( dPriv, & sInfo ); + *sbc = sInfo.swap_count; + + return status; +} + +static int driWaitForSBC( __DRInativeDisplay * dpy, void *drawablePriv, + int64_t target_sbc, + int64_t * msc, int64_t * sbc ) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; + + return dPriv->driScreenPriv->DriverAPI.WaitForSBC( dPriv, target_sbc, + msc, sbc ); +} + +static int driWaitForMSC( __DRInativeDisplay * dpy, void *drawablePriv, + int64_t target_msc, + int64_t divisor, int64_t remainder, + int64_t * msc, int64_t * sbc ) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; + __DRIswapInfo sInfo; + int status; + + + status = dPriv->driScreenPriv->DriverAPI.WaitForMSC( dPriv, target_msc, + divisor, remainder, + msc ); + + /* GetSwapInfo() may not be provided by the driver if GLX_SGI_video_sync + * is supported but GLX_OML_sync_control is not. Therefore, don't return + * an error value if GetSwapInfo() is not implemented. + */ + if ( status == 0 + && dPriv->driScreenPriv->DriverAPI.GetSwapInfo ) { + status = dPriv->driScreenPriv->DriverAPI.GetSwapInfo( dPriv, & sInfo ); + *sbc = sInfo.swap_count; + } + + return status; +} + +static int64_t driSwapBuffersMSC( __DRInativeDisplay * dpy, void *drawablePriv, + int64_t target_msc, + int64_t divisor, int64_t remainder ) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePriv; + + return dPriv->driScreenPriv->DriverAPI.SwapBuffersMSC( dPriv, target_msc, + divisor, + remainder ); +} + + +/** + * This is called via __DRIscreenRec's createNewDrawable pointer. + */ +static void *driCreateNewDrawable(__DRInativeDisplay *dpy, + const __GLcontextModes *modes, + __DRIid draw, + __DRIdrawable *pdraw, + int renderType, + const int *attrs) +{ + __DRIscreen * const pDRIScreen = glx_find_dri_screen(dpy, modes->screen); + __DRIscreenPrivate *psp; + __DRIdrawablePrivate *pdp; + + + pdraw->private = NULL; + + /* Since pbuffers are not yet supported, no drawable attributes are + * supported either. + */ + (void) attrs; + + if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { + return NULL; + } + + pdp = (__DRIdrawablePrivate *)_mesa_malloc(sizeof(__DRIdrawablePrivate)); + if (!pdp) { + return NULL; + } + + if (!XF86DRICreateDrawable(dpy, modes->screen, draw, &pdp->hHWDrawable)) { + _mesa_free(pdp); + return NULL; + } + + pdp->draw = draw; + pdp->pdraw = pdraw; + pdp->refcount = 0; + pdp->pStamp = NULL; + pdp->lastStamp = 0; + pdp->index = 0; + pdp->x = 0; + pdp->y = 0; + pdp->w = 0; + pdp->h = 0; + pdp->numClipRects = 0; + pdp->numBackClipRects = 0; + pdp->pClipRects = NULL; + pdp->pBackClipRects = NULL; + pdp->display = dpy; + pdp->screen = modes->screen; + + psp = (__DRIscreenPrivate *)pDRIScreen->private; + pdp->driScreenPriv = psp; + pdp->driContextPriv = &psp->dummyContextPriv; + + pdp->getInfo = (PFNGLXGETDRAWABLEINFOPROC) + glXGetProcAddress( (const GLubyte *) "__glXGetDrawableInfo" ); + if ( pdp->getInfo == NULL ) { +#ifdef DRI_NEW_INTERFACE_ONLY + (void)XF86DRIDestroyDrawable(dpy, modes->screen, pdp->draw); + _mesa_free(pdp); + return NULL; +#else + pdp->getInfo = (PFNGLXGETDRAWABLEINFOPROC) XF86DRIGetDrawableInfo; +#endif /* DRI_NEW_INTERFACE_ONLY */ + } + + if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, modes, + renderType == GLX_PIXMAP_BIT)) { + (void)XF86DRIDestroyDrawable(dpy, modes->screen, pdp->draw); + _mesa_free(pdp); + return NULL; + } + + pdraw->private = pdp; + pdraw->destroyDrawable = driDestroyDrawable; + pdraw->swapBuffers = driSwapBuffers; /* called by glXSwapBuffers() */ + + if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) { + pdraw->getSBC = driGetSBC; + pdraw->waitForSBC = driWaitForSBC; + pdraw->waitForMSC = driWaitForMSC; + pdraw->swapBuffersMSC = driSwapBuffersMSC; + pdraw->frameTracking = NULL; + pdraw->queryFrameTracking = driQueryFrameTracking; + + /* This special default value is replaced with the configured + * default value when the drawable is first bound to a direct + * rendering context. */ + pdraw->swap_interval = (unsigned)-1; + } + + pdp->swapBuffers = psp->DriverAPI.SwapBuffers; + + /* Add pdraw to drawable list */ + if (!__driAddDrawable(psp->drawHash, pdraw)) { + /* ERROR!!! */ + (*pdraw->destroyDrawable)(dpy, pdp); + _mesa_free(pdp); + pdp = NULL; + pdraw->private = NULL; + } + + return (void *) pdp; +} + +static __DRIdrawable *driGetDrawable(__DRInativeDisplay *dpy, __DRIid draw, + void *screenPrivate) +{ + __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; + + /* + ** Make sure this routine returns NULL if the drawable is not bound + ** to a direct rendering context! + */ + return __driFindDrawable(psp->drawHash, draw); +} + +static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate; + __DRIscreenPrivate *psp = pdp->driScreenPriv; + int scrn = psp->myNum; + + if (pdp) { + (*psp->DriverAPI.DestroyBuffer)(pdp); + if ((*window_exists)(dpy, pdp->draw)) + (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); + if (pdp->pClipRects) { + _mesa_free(pdp->pClipRects); + pdp->pClipRects = NULL; + } + if (pdp->pBackClipRects) { + _mesa_free(pdp->pBackClipRects); + pdp->pBackClipRects = NULL; + } + _mesa_free(pdp); + } +} + +/*@}*/ + + +/*****************************************************************/ +/** \name Context handling functions */ +/*****************************************************************/ +/*@{*/ + +/** + * Destroy the per-context private information. + * + * \param dpy the display handle. + * \param scrn the screen number. + * \param contextPrivate opaque pointer to the per-drawable private info. + * + * \internal + * This function calls __DriverAPIRec::DestroyContext on \p contextPrivate, calls + * drmDestroyContext(), and finally frees \p contextPrivate. + */ +static void driDestroyContext(__DRInativeDisplay *dpy, int scrn, void *contextPrivate) +{ + __DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate; + + if (pcp) { + (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); + __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); + (void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID); + _mesa_free(pcp); + } +} + + +/** + * Create the per-drawable private driver information. + * + * \param dpy The display handle. + * \param modes Mode used to create the new context. + * \param render_type Type of rendering target. \c GLX_RGBA is the only + * type likely to ever be supported for direct-rendering. + * \param sharedPrivate The shared context dependent methods or \c NULL if + * non-existent. + * \param pctx DRI context to receive the context dependent methods. + * + * \returns An opaque pointer to the per-context private information on + * success, or \c NULL on failure. + * + * \internal + * This function allocates and fills a __DRIcontextPrivateRec structure. It + * performs some device independent initialization and passes all the + * relevent information to __DriverAPIRec::CreateContext to create the + * context. + * + */ +static void * +driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes, + int render_type, void *sharedPrivate, __DRIcontext *pctx) +{ + __DRIscreen *pDRIScreen; + __DRIcontextPrivate *pcp; + __DRIcontextPrivate *pshare = (__DRIcontextPrivate *) sharedPrivate; + __DRIscreenPrivate *psp; + void * const shareCtx = (pshare != NULL) ? pshare->driverPrivate : NULL; + + pDRIScreen = glx_find_dri_screen(dpy, modes->screen); + if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { + /* ERROR!!! */ + return NULL; + } + + psp = (__DRIscreenPrivate *)pDRIScreen->private; + + pcp = (__DRIcontextPrivate *)_mesa_malloc(sizeof(__DRIcontextPrivate)); + if (!pcp) { + return NULL; + } + + if (! (*create_context_with_config)(dpy, modes->screen, modes->fbconfigID, + &pcp->contextID, &pcp->hHWContext)) { + _mesa_free(pcp); + return NULL; + } + + pcp->display = dpy; + pcp->driScreenPriv = psp; + pcp->driDrawablePriv = NULL; + + /* When the first context is created for a screen, initialize a "dummy" + * context. + */ + + if (!psp->dummyContextPriv.driScreenPriv) { + psp->dummyContextPriv.contextID = 0; + psp->dummyContextPriv.hHWContext = psp->pSAREA->dummy_context; + psp->dummyContextPriv.driScreenPriv = psp; + psp->dummyContextPriv.driDrawablePriv = NULL; + psp->dummyContextPriv.driverPrivate = NULL; + /* No other fields should be used! */ + } + + pctx->destroyContext = driDestroyContext; +#ifdef DRI_NEW_INTERFACE_ONLY + pctx->bindContext = NULL; + pctx->unbindContext = NULL; + pctx->bindContext2 = NULL; + pctx->unbindContext2 = NULL; + pctx->bindContext3 = driBindContext3; + pctx->unbindContext3 = driUnbindContext3; +#else + pctx->bindContext = (void *)driBindContext; + pctx->unbindContext = (void *)driUnbindContext; + if ( driCompareGLXAPIVersion( 20030606 ) >= 0 ) { + pctx->bindContext2 = (void *)driBindContext2; + pctx->unbindContext2 = (void *)driUnbindContext2; + } + + if ( driCompareGLXAPIVersion( 20040415 ) >= 0 ) { + pctx->bindContext3 = (void *)driBindContext3; + pctx->unbindContext3 = (void *)driUnbindContext3; + } +#endif + + if ( !(*psp->DriverAPI.CreateContext)(modes, pcp, shareCtx) ) { + (void)XF86DRIDestroyContext(dpy, modes->screen, pcp->contextID); + _mesa_free(pcp); + return NULL; + } + + __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); + + return pcp; +} + + +#ifndef DRI_NEW_INTERFACE_ONLY +/** + * Create the per-drawable private driver information. + * + * \param dpy the display handle. + * \param vis the visual information. + * \param sharedPrivate the shared context dependent methods or \c NULL if + * non-existent. + * \param pctx will receive the context dependent methods. + * + * \returns a opaque pointer to the per-context private information on success, or \c NULL + * on failure. + * + * \deprecated + * This function has been replaced by \c driCreateNewContext. In drivers + * built to work with XFree86, this function will continue to exist to support + * older versions of libGL. Starting with the next major relelase of XFree86, + * this function will be removed. + * + * \internal + * This function allocates and fills a __DRIcontextPrivateRec structure. It + * gets the visual, converts it into a __GLcontextModesRec and passes it + * to __DriverAPIRec::CreateContext to create the context. + */ +static void *driCreateContext(Display *dpy, XVisualInfo *vis, + void *sharedPrivate, __DRIcontext *pctx) +{ + __DRIscreen *pDRIScreen; + const __GLcontextModes *modes; + + pDRIScreen = glx_find_dri_screen(dpy, vis->screen); + if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { + /* ERROR!!! */ + return NULL; + } + + + /* Setup a __GLcontextModes struct corresponding to vis->visualid + * and create the rendering context. + */ + + modes = findConfigMode(dpy, vis->screen, vis->visualid, pDRIScreen); + return (modes == NULL) + ? NULL + : driCreateNewContext( dpy, modes, GLX_RGBA_TYPE, + sharedPrivate, pctx ); +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/*@}*/ + + +/*****************************************************************/ +/** \name Screen handling functions */ +/*****************************************************************/ +/*@{*/ + +/** + * Destroy the per-screen private information. + * + * \param dpy the display handle. + * \param scrn the screen number. + * \param screenPrivate opaque pointer to the per-screen private information. + * + * \internal + * This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls + * drmClose(), and finally frees \p screenPrivate. + */ +static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPrivate) +{ + __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; + + if (psp) { + /* No interaction with the X-server is possible at this point. This + * routine is called after XCloseDisplay, so there is no protocol + * stream open to the X-server anymore. + */ + + if (psp->DriverAPI.DestroyScreen) + (*psp->DriverAPI.DestroyScreen)(psp); + + (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); + (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); + _mesa_free(psp->pDevPriv); + (void)drmClose(psp->fd); + if ( psp->modes != NULL ) { + _gl_context_modes_destroy( psp->modes ); + } + _mesa_free(psp); + } +} + + +/** + * Utility function used to create a new driver-private screen structure. + * + * \param dpy Display pointer + * \param scrn Index of the screen + * \param psc DRI screen data (not driver private) + * \param modes Linked list of known display modes. This list is, at a + * minimum, a list of modes based on the current display mode. + * These roughly match the set of available X11 visuals, but it + * need not be limited to X11! The calling libGL should create + * a list that will inform the driver of the current display + * mode (i.e., color buffer depth, depth buffer depth, etc.). + * \param ddx_version Version of the 2D DDX. This may not be meaningful for + * all drivers. + * \param dri_version Version of the "server-side" DRI. + * \param drm_version Version of the kernel DRM. + * \param frame_buffer Data describing the location and layout of the + * framebuffer. + * \param pSAREA Pointer the the SAREA. + * \param fd Device handle for the DRM. + * \param internal_api_version Version of the internal interface between the + * driver and libGL. + * \param driverAPI Driver API functions used by other routines in dri_util.c. + */ +__DRIscreenPrivate * +__driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, + __GLcontextModes * modes, + const __DRIversion * ddx_version, + const __DRIversion * dri_version, + const __DRIversion * drm_version, + const __DRIframebuffer * frame_buffer, + drm_sarea_t *pSAREA, + int fd, + int internal_api_version, + const struct __DriverAPIRec *driverAPI) +{ + __DRIscreenPrivate *psp; + + +#ifdef DRI_NEW_INTERFACE_ONLY + if ( internal_api_version < 20040602 ) { + fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. " + "20040602 or later is required.\n", internal_api_version ); + return NULL; + } +#else + if ( internal_api_version == 20031201 ) { + fprintf( stderr, "libGL error: libGL version 20031201 has critical " + "binary compatilibity bugs.\nlibGL error: You must upgrade " + "to use direct-rendering!\n" ); + return NULL; + } +#endif /* DRI_NEW_INTERFACE_ONLY */ + + + window_exists = (PFNGLXWINDOWEXISTSPROC) + glXGetProcAddress( (const GLubyte *) "__glXWindowExists" ); + + if ( window_exists == NULL ) { +#ifdef DRI_NEW_INTERFACE_ONLY + fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. " + "20021128 or later is required.\n", internal_api_version ); + return NULL; +#else + window_exists = (PFNGLXWINDOWEXISTSPROC) __driWindowExists; +#endif /* DRI_NEW_INTERFACE_ONLY */ + } + + create_context_with_config = (PFNGLXCREATECONTEXTWITHCONFIGPROC) + glXGetProcAddress( (const GLubyte *) "__glXCreateContextWithConfig" ); + if ( create_context_with_config == NULL ) { +#ifdef DRI_NEW_INTERFACE_ONLY + fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. " + "20031201 or later is required.\n", internal_api_version ); + return NULL; +#else + create_context_with_config = (PFNGLXCREATECONTEXTWITHCONFIGPROC) + fake_XF86DRICreateContextWithConfig; +#endif /* DRI_NEW_INTERFACE_ONLY */ + } + + api_ver = internal_api_version; + + psp = (__DRIscreenPrivate *)_mesa_malloc(sizeof(__DRIscreenPrivate)); + if (!psp) { + return NULL; + } + + /* Create the hash table */ + psp->drawHash = drmHashCreate(); + if ( psp->drawHash == NULL ) { + _mesa_free( psp ); + return NULL; + } + + psp->display = dpy; + psp->myNum = scrn; + psp->psc = psc; + psp->modes = modes; + + /* + ** NOT_DONE: This is used by the X server to detect when the client + ** has died while holding the drawable lock. The client sets the + ** drawable lock to this value. + */ + psp->drawLockID = 1; + + psp->drmMajor = drm_version->major; + psp->drmMinor = drm_version->minor; + psp->drmPatch = drm_version->patch; + psp->ddxMajor = ddx_version->major; + psp->ddxMinor = ddx_version->minor; + psp->ddxPatch = ddx_version->patch; + psp->driMajor = dri_version->major; + psp->driMinor = dri_version->minor; + psp->driPatch = dri_version->patch; + + /* install driver's callback functions */ + memcpy( &psp->DriverAPI, driverAPI, sizeof(struct __DriverAPIRec) ); + + psp->pSAREA = pSAREA; + + psp->pFB = frame_buffer->base; + psp->fbSize = frame_buffer->size; + psp->fbStride = frame_buffer->stride; + psp->fbWidth = frame_buffer->width; + psp->fbHeight = frame_buffer->height; + psp->devPrivSize = frame_buffer->dev_priv_size; + psp->pDevPriv = frame_buffer->dev_priv; + + psp->fd = fd; + + /* + ** Do not init dummy context here; actual initialization will be + ** done when the first DRI context is created. Init screen priv ptr + ** to NULL to let CreateContext routine that it needs to be inited. + */ + psp->dummyContextPriv.driScreenPriv = NULL; + + psc->destroyScreen = driDestroyScreen; +#ifndef DRI_NEW_INTERFACE_ONLY + psc->createContext = driCreateContext; +#else + psc->createContext = NULL; +#endif + psc->createNewDrawable = driCreateNewDrawable; + psc->getDrawable = driGetDrawable; +#ifdef DRI_NEW_INTERFACE_ONLY + psc->getMSC = driGetMSC; + psc->createNewContext = driCreateNewContext; +#else + if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) { + psc->getMSC = driGetMSC; + + if ( driCompareGLXAPIVersion( 20030824 ) >= 0 ) { + psc->createNewContext = driCreateNewContext; + } + } +#endif + + if ( (psp->DriverAPI.InitDriver != NULL) + && !(*psp->DriverAPI.InitDriver)(psp) ) { + _mesa_free( psp ); + return NULL; + } + + + return psp; +} + + +#ifndef DRI_NEW_INTERFACE_ONLY +/** + * Utility function used to create a new driver-private screen structure. + * + * \param dpy Display pointer. + * \param scrn Index of the screen. + * \param psc DRI screen data (not driver private) + * \param numConfigs Number of visual configs pointed to by \c configs. + * \param configs Array of GLXvisualConfigs exported by the 2D driver. + * \param driverAPI Driver API functions used by other routines in dri_util.c. + * + * \deprecated + * This function has been replaced by \c __driUtilCreateNewScreen. In drivers + * built to work with XFree86, this function will continue to exist to support + * older versions of libGL. Starting with the next major relelase of XFree86, + * this function will be removed. + */ +__DRIscreenPrivate * +__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *configs, + const struct __DriverAPIRec *driverAPI) +{ + int directCapable; + __DRIscreenPrivate *psp = NULL; + drm_handle_t hSAREA; + drmAddress pSAREA; + char *BusID; + __GLcontextModes *modes; + __GLcontextModes *temp; + int i; + __DRIversion ddx_version; + __DRIversion dri_version; + __DRIversion drm_version; + __DRIframebuffer framebuffer; + int fd = -1; + int status; + const char * err_msg; + const char * err_extra; + + + if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable) + || !directCapable) { + return NULL; + } + + + /* Create the linked list of context modes, and populate it with the + * GLX visual information passed in by libGL. + */ + + modes = _gl_context_modes_create( numConfigs, sizeof(__GLcontextModes) ); + if ( modes == NULL ) { + return NULL; + } + + temp = modes; + for ( i = 0 ; i < numConfigs ; i++ ) { + assert( temp != NULL ); + _gl_copy_visual_to_context_mode( temp, & configs[i] ); + temp->screen = scrn; + + temp = temp->next; + } + + err_msg = "XF86DRIOpenConnection"; + err_extra = NULL; + + if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) { + fd = drmOpen(NULL,BusID); + _mesa_free(BusID); /* No longer needed */ + + err_msg = "open DRM"; + err_extra = strerror( -fd ); + + if (fd >= 0) { + drm_magic_t magic; + + err_msg = "drmGetMagic"; + err_extra = NULL; + + if (!drmGetMagic(fd, &magic)) { + drmVersionPtr version = drmGetVersion(fd); + if (version) { + drm_version.major = version->version_major; + drm_version.minor = version->version_minor; + drm_version.patch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + drm_version.major = -1; + drm_version.minor = -1; + drm_version.patch = -1; + } + + err_msg = "XF86DRIAuthConnection"; + if (XF86DRIAuthConnection(dpy, scrn, magic)) { + char *driverName; + + /* + * Get device name (like "tdfx") and the ddx version numbers. + * We'll check the version in each DRI driver's "createScreen" + * function. + */ + err_msg = "XF86DRIGetClientDriverName"; + if (XF86DRIGetClientDriverName(dpy, scrn, + &ddx_version.major, + &ddx_version.minor, + &ddx_version.patch, + &driverName)) { + + /* No longer needed. */ + _mesa_free( driverName ); + + /* + * Get the DRI X extension version. + */ + err_msg = "XF86DRIQueryVersion"; + if (XF86DRIQueryVersion(dpy, + &dri_version.major, + &dri_version.minor, + &dri_version.patch)) { + drm_handle_t hFB; + int junk; + + /* + * Get device-specific info. pDevPriv will point to a struct + * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) + * that has information about the screen size, depth, pitch, + * ancilliary buffers, DRM mmap handles, etc. + */ + err_msg = "XF86DRIGetDeviceInfo"; + if (XF86DRIGetDeviceInfo(dpy, scrn, + &hFB, + &junk, + &framebuffer.size, + &framebuffer.stride, + &framebuffer.dev_priv_size, + &framebuffer.dev_priv)) { + framebuffer.width = DisplayWidth(dpy, scrn); + framebuffer.height = DisplayHeight(dpy, scrn); + + /* + * Map the framebuffer region. + */ + status = drmMap(fd, hFB, framebuffer.size, + (drmAddressPtr)&framebuffer.base); + + err_msg = "drmMap of framebuffer"; + err_extra = strerror( -status ); + + if ( status == 0 ) { + /* + * Map the SAREA region. Further mmap regions may be setup in + * each DRI driver's "createScreen" function. + */ + status = drmMap(fd, hSAREA, SAREA_MAX, + &pSAREA); + + err_msg = "drmMap of sarea"; + err_extra = strerror( -status ); + + if ( status == 0 ) { + PFNGLXGETINTERNALVERSIONPROC get_ver; + + get_ver = (PFNGLXGETINTERNALVERSIONPROC) + glXGetProcAddress( (const GLubyte *) "__glXGetInternalVersion" ); + + err_msg = "InitDriver"; + err_extra = NULL; + psp = __driUtilCreateNewScreen( dpy, scrn, psc, modes, + & ddx_version, + & dri_version, + & drm_version, + & framebuffer, + pSAREA, + fd, + (get_ver != NULL) ? (*get_ver)() : 1, + driverAPI ); + } + } + } + } + } + } + } + } + } + + if ( psp == NULL ) { + if ( pSAREA != MAP_FAILED ) { + (void)drmUnmap(pSAREA, SAREA_MAX); + } + + if ( framebuffer.base != MAP_FAILED ) { + (void)drmUnmap((drmAddress)framebuffer.base, framebuffer.size); + } + + if ( framebuffer.dev_priv != NULL ) { + _mesa_free(framebuffer.dev_priv); + } + + if ( fd >= 0 ) { + (void)drmClose(fd); + } + + if ( modes != NULL ) { + _gl_context_modes_destroy( modes ); + } + + (void)XF86DRICloseConnection(dpy, scrn); + + if ( err_extra != NULL ) { + fprintf(stderr, "libGL error: %s failed (%s)\n", err_msg, + err_extra); + } + else { + fprintf(stderr, "libGL error: %s failed\n", err_msg ); + } + + fprintf(stderr, "libGL error: reverting to (slow) indirect rendering\n"); + } + + return psp; +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + + +/** + * Compare the current GLX API version with a driver supplied required version. + * + * The minimum required version is compared with the API version exported by + * the \c __glXGetInternalVersion function (in libGL.so). + * + * \param required_version Minimum required internal GLX API version. + * \return A tri-value return, as from strcmp is returned. A value less + * than, equal to, or greater than zero will be returned if the + * internal GLX API version is less than, equal to, or greater + * than \c required_version. + * + * \sa __glXGetInternalVersion(). + */ +int driCompareGLXAPIVersion( GLuint required_version ) +{ + if ( api_ver > required_version ) { + return 1; + } + else if ( api_ver == required_version ) { + return 0; + } + + return -1; +} + + +static int +driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv, + int64_t * sbc, int64_t * missedFrames, + float * lastMissedUsage, float * usage ) +{ + static PFNGLXGETUSTPROC get_ust; + __DRIswapInfo sInfo; + int status; + int64_t ust; + __DRIdrawablePrivate * dpriv = (__DRIdrawablePrivate *) priv; + + if ( get_ust == NULL ) { + get_ust = (PFNGLXGETUSTPROC) glXGetProcAddress( (const GLubyte *) "__glXGetUST" ); + } + + status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo ); + if ( status == 0 ) { + *sbc = sInfo.swap_count; + *missedFrames = sInfo.swap_missed_count; + *lastMissedUsage = sInfo.swap_missed_usage; + + (*get_ust)( & ust ); + *usage = driCalculateSwapUsage( dpriv, sInfo.swap_ust, ust ); + } + + return status; +} + + +/** + * Calculate amount of swap interval used between GLX buffer swaps. + * + * The usage value, on the range [0,max], is the fraction of total swap + * interval time used between GLX buffer swaps is calculated. + * + * \f$p = t_d / (i * t_r)\f$ + * + * Where \f$t_d\f$ is the time since the last GLX buffer swap, \f$i\f$ is the + * swap interval (as set by \c glXSwapIntervalSGI), and \f$t_r\f$ time + * required for a single vertical refresh period (as returned by \c + * glXGetMscRateOML). + * + * See the documentation for the GLX_MESA_swap_frame_usage extension for more + * details. + * + * \param dPriv Pointer to the private drawable structure. + * \return If less than a single swap interval time period was required + * between GLX buffer swaps, a number greater than 0 and less than + * 1.0 is returned. If exactly one swap interval time period is + * required, 1.0 is returned, and if more than one is required then + * a number greater than 1.0 will be returned. + * + * \sa glXSwapIntervalSGI glXGetMscRateOML + * + * \todo Instead of caching the \c glXGetMscRateOML function pointer, would it + * be possible to cache the sync rate? + */ +float +driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, + int64_t current_ust ) +{ + static PFNGLXGETMSCRATEOMLPROC get_msc_rate = NULL; + int32_t n; + int32_t d; + int interval; + float usage = 1.0; + + + if ( get_msc_rate == NULL ) { + get_msc_rate = (PFNGLXGETMSCRATEOMLPROC) + glXGetProcAddress( (const GLubyte *) "glXGetMscRateOML" ); + } + + if ( (get_msc_rate != NULL) + && get_msc_rate( dPriv->display, dPriv->draw, &n, &d ) ) { + interval = (dPriv->pdraw->swap_interval != 0) + ? dPriv->pdraw->swap_interval : 1; + + + /* We want to calculate + * (current_UST - last_swap_UST) / (interval * us_per_refresh). We get + * current_UST by calling __glXGetUST. last_swap_UST is stored in + * dPriv->swap_ust. interval has already been calculated. + * + * The only tricky part is us_per_refresh. us_per_refresh is + * 1000000 / MSC_rate. We know the MSC_rate is n / d. We can flip it + * around and say us_per_refresh = 1000000 * d / n. Since this goes in + * the denominator of the final calculation, we calculate + * (interval * 1000000 * d) and move n into the numerator. + */ + + usage = (current_ust - last_swap_ust); + usage *= n; + usage /= (interval * d); + usage /= 1000000.0; + } + + return usage; +} + +/*@}*/ + +#endif /* GLX_DIRECT_RENDERING */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h:1.3 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h Mon Dec 13 17:40:49 2004 @@ -0,0 +1,562 @@ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/dri_util.h,v 1.3 2004/12/13 22:40:49 tsi Exp $ */ +/** + * \file dri_util.h + * DRI utility functions definitions. + * + * This module acts as glue between GLX and the actual hardware driver. A DRI + * driver doesn't really \e have to use any of this - it's optional. But, some + * useful stuff is done here that otherwise would have to be duplicated in most + * drivers. + * + * Basically, these utility functions take care of some of the dirty details of + * screen initialization, context creation, context binding, DRM setup, etc. + * + * These functions are compiled into each DRI driver so libGL.so knows nothing + * about them. + * + * \sa dri_util.c. + * + * \author Kevin E. Martin + * \author Brian Paul + */ + +/* + * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef _DRI_UTIL_H_ +#define _DRI_UTIL_H_ + +#ifdef GLX_DIRECT_RENDERING + +#define CAPI /* XXX this should be globally defined somewhere */ + +#ifdef DRI_NEW_INTERFACE_ONLY +# include +#else +# include "glxclient.h" +#endif /* DRI_NEW_INTERFACE_ONLY */ +#include "drm.h" +#include "drm_sarea.h" +#include "GL/internal/glcore.h" +#include "GL/internal/dri_interface.h" + +#define GLX_BAD_CONTEXT 5 + +/* This is a temporary relic. Once all drivers are converted to support + * the new interface, it can go away. + */ +#ifdef DRI_NEW_INTERFACE_ONLY +#define USE_NEW_INTERFACE +#endif + +typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate; +typedef struct __DRIscreenPrivateRec __DRIscreenPrivate; +typedef struct __DRIcontextPrivateRec __DRIcontextPrivate; +typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate; +typedef struct __DRIswapInfoRec __DRIswapInfo; + + +/** + * Used by DRI_VALIDATE_DRAWABLE_INFO + */ +#define DRI_VALIDATE_DRAWABLE_INFO_ONCE(pDrawPriv) \ + do { \ + if (*(pDrawPriv->pStamp) != pDrawPriv->lastStamp) { \ + __driUtilUpdateDrawableInfo(pDrawPriv); \ + } \ + } while (0) + + +/** + * Utility macro to validate the drawable information. + * + * See __DRIdrawablePrivate::pStamp and __DRIdrawablePrivate::lastStamp. + */ +#define DRI_VALIDATE_DRAWABLE_INFO(psp, pdp) \ +do { \ + while (*(pdp->pStamp) != pdp->lastStamp) { \ + DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, \ + pdp->driContextPriv->hHWContext); \ + \ + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ + DRI_VALIDATE_DRAWABLE_INFO_ONCE(pdp); \ + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ + \ + DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, \ + pdp->driContextPriv->hHWContext); \ + } \ +} while (0) + + +/** + * Driver callback functions. + * + * Each DRI driver must have one of these structures with all the pointers set + * to appropriate functions within the driver. + * + * When glXCreateContext() is called, for example, it'll call a helper function + * dri_util.c which in turn will jump through the \a CreateContext pointer in + * this structure. + */ +struct __DriverAPIRec { + /** + * Driver initialization callback + */ + GLboolean (*InitDriver)(__DRIscreenPrivate *driScrnPriv); + + /** + * Screen destruction callback + */ + void (*DestroyScreen)(__DRIscreenPrivate *driScrnPriv); + + /** + * Context creation callback + */ + GLboolean (*CreateContext)(const __GLcontextModes *glVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate); + + /** + * Context destruction callback + */ + void (*DestroyContext)(__DRIcontextPrivate *driContextPriv); + + /** + * Buffer (drawable) creation callback + */ + GLboolean (*CreateBuffer)(__DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *glVis, + GLboolean pixmapBuffer); + + /** + * Buffer (drawable) destruction callback + */ + void (*DestroyBuffer)(__DRIdrawablePrivate *driDrawPriv); + + /** + * Buffer swapping callback + */ + void (*SwapBuffers)(__DRIdrawablePrivate *driDrawPriv); + + /** + * Context activation callback + */ + GLboolean (*MakeCurrent)(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv); + + /** + * Context unbinding callback + */ + GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv); + + /** + * Retrieves statistics about buffer swap operations. Required if + * GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported. + */ + int (*GetSwapInfo)( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); + + + /** + * Required if GLX_SGI_video_sync or GLX_OML_sync_control is + * supported. + */ + int (*GetMSC)( __DRIscreenPrivate * priv, int64_t * count ); + + /** + * These are required if GLX_OML_sync_control is supported. + */ + /*@{*/ + int (*WaitForMSC)( __DRIdrawablePrivate *priv, int64_t target_msc, + int64_t divisor, int64_t remainder, + int64_t * msc ); + int (*WaitForSBC)( __DRIdrawablePrivate *priv, int64_t target_sbc, + int64_t * msc, int64_t * sbc ); + + int64_t (*SwapBuffersMSC)( __DRIdrawablePrivate *priv, int64_t target_msc, + int64_t divisor, int64_t remainder ); + /*@}*/ +}; + + +struct __DRIswapInfoRec { + /** + * Number of swapBuffers operations that have been *completed*. + */ + u_int64_t swap_count; + + /** + * Unadjusted system time of the last buffer swap. This is the time + * when the swap completed, not the time when swapBuffers was called. + */ + int64_t swap_ust; + + /** + * Number of swap operations that occurred after the swap deadline. That + * is if a swap happens more than swap_interval frames after the previous + * swap, it has missed its deadline. If swap_interval is 0, then the + * swap deadline is 1 frame after the previous swap. + */ + u_int64_t swap_missed_count; + + /** + * Amount of time used by the last swap that missed its deadline. This + * is calculated as (__glXGetUST() - swap_ust) / (swap_interval * + * time_for_single_vrefresh)). If the actual value of swap_interval is + * 0, then 1 is used instead. If swap_missed_count is non-zero, this + * should be greater-than 1.0. + */ + float swap_missed_usage; +}; + + +/** + * Per-drawable private DRI driver information. + */ +struct __DRIdrawablePrivateRec { + /** + * Kernel drawable handle + */ + drm_drawable_t hHWDrawable; + + /** + * Driver's private drawable information. + * + * This structure is opaque. + */ + void *driverPrivate; + + /** + * X's drawable ID associated with this private drawable. + */ + __DRIid draw; + __DRIdrawable *pdraw; + + /** + * Reference count for number of context's currently bound to this + * drawable. + * + * Once it reaches zero, the drawable can be destroyed. + * + * \note This behavior will change with GLX 1.3. + */ + int refcount; + + /** + * Index of this drawable information in the SAREA. + */ + unsigned int index; + + /** + * Pointer to the "drawable has changed ID" stamp in the SAREA. + */ + unsigned int *pStamp; + + /** + * Last value of the stamp. + * + * If this differs from the value stored at __DRIdrawablePrivate::pStamp, + * then the drawable information has been modified by the X server, and the + * drawable information (below) should be retrieved from the X server. + */ + unsigned int lastStamp; + + /** + * \name Drawable + * + * Drawable information used in software fallbacks. + */ + /*@{*/ + int x; + int y; + int w; + int h; + int numClipRects; + drm_clip_rect_t *pClipRects; + /*@}*/ + + /** + * \name Back and depthbuffer + * + * Information about the back and depthbuffer where different from above. + */ + /*@{*/ + int backX; + int backY; + int backClipRectType; + int numBackClipRects; + drm_clip_rect_t *pBackClipRects; + /*@}*/ + + /** + * Pointer to context to which this drawable is currently bound. + */ + __DRIcontextPrivate *driContextPriv; + + /** + * Pointer to screen on which this drawable was created. + */ + __DRIscreenPrivate *driScreenPriv; + + /** + * \name Display and screen information. + * + * Basically just need these for when the locking code needs to call + * __driUtilUpdateDrawableInfo() which calls XF86DRIGetDrawableInfo(). + */ + /*@{*/ + __DRInativeDisplay *display; + int screen; + /*@}*/ + + /** + * Called via glXSwapBuffers(). + */ + void (*swapBuffers)( __DRIdrawablePrivate *dPriv ); + + /** + * Get information about the location, size, and clip rects of the + * drawable within the display. + */ + PFNGLXGETDRAWABLEINFOPROC getInfo; +}; + +/** + * Per-context private driver information. + */ +struct __DRIcontextPrivateRec { + /** + * Kernel context handle used to access the device lock. + */ + __DRIid contextID; + + /** + * Kernel context handle used to access the device lock. + */ + drm_context_t hHWContext; + + /** + * Device driver's private context data. This structure is opaque. + */ + void *driverPrivate; + + /** + * This context's display pointer. + */ + __DRInativeDisplay *display; + + /** + * Pointer to drawable currently bound to this context. + */ + __DRIdrawablePrivate *driDrawablePriv; + + /** + * Pointer to screen on which this context was created. + */ + __DRIscreenPrivate *driScreenPriv; +}; + +/** + * Per-screen private driver information. + */ +struct __DRIscreenPrivateRec { + /** + * Display for this screen + */ + __DRInativeDisplay *display; + + /** + * Current screen's number + */ + int myNum; + + /** + * Callback functions into the hardware-specific DRI driver code. + */ + struct __DriverAPIRec DriverAPI; + + /** + * \name DDX version + * DDX / 2D driver version information. + * \todo Replace these fields with a \c __DRIversionRec. + */ + /*@{*/ + int ddxMajor; + int ddxMinor; + int ddxPatch; + /*@}*/ + + /** + * \name DRI version + * DRI X extension version information. + * \todo Replace these fields with a \c __DRIversionRec. + */ + /*@{*/ + int driMajor; + int driMinor; + int driPatch; + /*@}*/ + + /** + * \name DRM version + * DRM (kernel module) version information. + * \todo Replace these fields with a \c __DRIversionRec. + */ + /*@{*/ + int drmMajor; + int drmMinor; + int drmPatch; + /*@}*/ + + /** + * ID used when the client sets the drawable lock. + * + * The X server uses this value to detect if the client has died while + * holding the drawable lock. + */ + int drawLockID; + + /** + * File descriptor returned when the kernel device driver is opened. + * + * Used to: + * - authenticate client to kernel + * - map the frame buffer, SAREA, etc. + * - close the kernel device driver + */ + int fd; + + /** + * SAREA pointer + * + * Used to access: + * - the device lock + * - the device-independent per-drawable and per-context(?) information + */ + drm_sarea_t *pSAREA; + + /** + * \name Direct frame buffer access information + * Used for software fallbacks. + */ + /*@{*/ + unsigned char *pFB; + int fbSize; + int fbOrigin; + int fbStride; + int fbWidth; + int fbHeight; + int fbBPP; + /*@}*/ + + /** + * \name Device-dependent private information (stored in the SAREA). + * + * This data is accessed by the client driver only. + */ + /*@{*/ + void *pDevPriv; + int devPrivSize; + /*@}*/ + + /** + * Dummy context to which drawables are bound when not bound to any + * other context. + * + * A dummy hHWContext is created for this context, and is used by the GL + * core when a hardware lock is required but the drawable is not currently + * bound (e.g., potentially during a SwapBuffers request). The dummy + * context is created when the first "real" context is created on this + * screen. + */ + __DRIcontextPrivate dummyContextPriv; + + /** + * Hash table to hold the drawable information for this screen. + */ + void *drawHash; + + /** + * Device-dependent private information (not stored in the SAREA). + * + * This pointer is never touched by the DRI layer. + */ + void *private; + + /** + * GLX visuals / FBConfigs for this screen. These are stored as a + * linked list. + * + * \note + * This field is \b only used in conjunction with the old interfaces. If + * the new interfaces are used, this field will be set to \c NULL and will + * not be dereferenced. + */ + __GLcontextModes *modes; + + /** + * Pointer back to the \c __DRIscreen that contains this structure. + */ + + __DRIscreen *psc; +}; + + + +extern void +__driUtilMessage(const char *f, ...); + + +extern void +__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp); + + +extern __DRIscreenPrivate * __driUtilCreateNewScreen( __DRInativeDisplay *dpy, + int scrn, __DRIscreen *psc, __GLcontextModes * modes, + const __DRIversion * ddx_version, const __DRIversion * dri_version, + const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, + drm_sarea_t *pSAREA, int fd, int internal_api_version, + const struct __DriverAPIRec *driverAPI ); + +#ifndef DRI_NEW_INTERFACE_ONLY +extern __DRIscreenPrivate * +__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config, + const struct __DriverAPIRec *driverAPI); +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/* Test the version of the internal GLX API. Returns a value like strcmp. */ +extern int +driCompareGLXAPIVersion( GLuint required_version ); + +extern float +driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, + int64_t last_swap_ust, int64_t current_ust ); + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* _DRI_UTIL_H_ */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c Fri Dec 10 10:06:13 2004 @@ -0,0 +1,496 @@ +/* + * (C) Copyright IBM Corporation 2003 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file glcontextmodes.c + * Utility routines for working with \c __GLcontextModes structures. At + * some point most or all of these functions will be moved to the Mesa + * code base. + * + * \author Ian Romanick + */ + +#ifdef DRI_NEW_INTERFACE_ONLY +# include +# include +# include +# include "dri_interface.h" +# include "imports.h" +# define __glXMemset memset +#else +# include +# include +# include "GL/glxint.h" + +# ifdef XFree86Server +# include "GL/glx_ansic.h" +extern void * __glXMalloc( size_t size ); +extern void __glXFree( void * ptr ); +# define _mesa_malloc(b) __glXMalloc(b) +# define _mesa_free(m) __glXFree(m) +# else +# include +# define __glXMemset memset +# define _mesa_malloc(b) Xmalloc(b) +# define _mesa_free(m) Xfree(m) +# endif /* XFree86Server */ +#endif /* DRI_NEW_INTERFACE_ONLY */ + +#include "glcontextmodes.h" + +#ifndef DRI_NEW_INTERFACE_ONLY +#define NUM_VISUAL_TYPES 6 + +/** + * Convert an X visual type to a GLX visual type. + * + * \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.) + * to be converted. + * \return If \c visualType is a valid X visual type, a GLX visual type will + * be returned. Otherwise \c GLX_NONE will be returned. + */ +GLint +_gl_convert_from_x_visual_type( int visualType ) +{ + static const int glx_visual_types[ NUM_VISUAL_TYPES ] = { + GLX_STATIC_GRAY, GLX_GRAY_SCALE, + GLX_STATIC_COLOR, GLX_PSEUDO_COLOR, + GLX_TRUE_COLOR, GLX_DIRECT_COLOR + }; + + return ( (unsigned) visualType < NUM_VISUAL_TYPES ) + ? glx_visual_types[ visualType ] : GLX_NONE; +} + + +/** + * Convert a GLX visual type to an X visual type. + * + * \param visualType GLX visual type (i.e., \c GLX_TRUE_COLOR, + * \c GLX_STATIC_GRAY, etc.) to be converted. + * \return If \c visualType is a valid GLX visual type, an X visual type will + * be returned. Otherwise -1 will be returned. + */ +GLint +_gl_convert_to_x_visual_type( int visualType ) +{ + static const int x_visual_types[ NUM_VISUAL_TYPES ] = { + TrueColor, DirectColor, + PseudoColor, StaticColor, + GrayScale, StaticGray + }; + + return ( (unsigned) (visualType - GLX_TRUE_COLOR) <= NUM_VISUAL_TYPES ) + ? x_visual_types[ visualType - GLX_TRUE_COLOR ] : -1; +} + + +/** + * Copy a GLX visual config structure to a GL context mode structure. All + * of the fields in \c config are copied to \c mode. Additional fields in + * \c mode that can be derrived from the fields of \c config (i.e., + * \c haveDepthBuffer) are also filled in. The remaining fields in \c mode + * that cannot be derrived are set to default values. + * + * \param mode Destination GL context mode. + * \param config Source GLX visual config. + * + * \note + * The \c fbconfigID and \c visualID fields of the \c __GLcontextModes + * structure will be set to the \c vid of the \c __GLXvisualConfig structure. + */ +void +_gl_copy_visual_to_context_mode( __GLcontextModes * mode, + const __GLXvisualConfig * config ) +{ + __GLcontextModes * const next = mode->next; + + (void) __glXMemset( mode, 0, sizeof( __GLcontextModes ) ); + mode->next = next; + + mode->visualID = config->vid; + mode->visualType = _gl_convert_from_x_visual_type( config->class ); + mode->xRenderable = GL_TRUE; + mode->fbconfigID = config->vid; + mode->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + + mode->rgbMode = (config->rgba != 0); + mode->renderType = (mode->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; + + mode->colorIndexMode = !(mode->rgbMode); + mode->doubleBufferMode = (config->doubleBuffer != 0); + mode->stereoMode = (config->stereo != 0); + + mode->haveAccumBuffer = ((config->accumRedSize + + config->accumGreenSize + + config->accumBlueSize + + config->accumAlphaSize) > 0); + mode->haveDepthBuffer = (config->depthSize > 0); + mode->haveStencilBuffer = (config->stencilSize > 0); + + mode->redBits = config->redSize; + mode->greenBits = config->greenSize; + mode->blueBits = config->blueSize; + mode->alphaBits = config->alphaSize; + mode->redMask = config->redMask; + mode->greenMask = config->greenMask; + mode->blueMask = config->blueMask; + mode->alphaMask = config->alphaMask; + mode->rgbBits = config->bufferSize; + mode->indexBits = config->bufferSize; + + mode->accumRedBits = config->accumRedSize; + mode->accumGreenBits = config->accumGreenSize; + mode->accumBlueBits = config->accumBlueSize; + mode->accumAlphaBits = config->accumAlphaSize; + mode->depthBits = config->depthSize; + mode->stencilBits = config->stencilSize; + + mode->numAuxBuffers = config->auxBuffers; + mode->level = config->level; + + mode->visualRating = config->visualRating; + mode->transparentPixel = config->transparentPixel; + mode->transparentRed = config->transparentRed; + mode->transparentGreen = config->transparentGreen; + mode->transparentBlue = config->transparentBlue; + mode->transparentAlpha = config->transparentAlpha; + mode->transparentIndex = config->transparentIndex; + + mode->swapMethod = GLX_SWAP_UNDEFINED_OML; +} + + +/** + * Get data from a GL context mode. + * + * \param mode GL context mode whose data is to be returned. + * \param attribute Attribute of \c mode that is to be returned. + * \param value_return Location to store the data member of \c mode. + * \return If \c attribute is a valid attribute of \c mode, zero is + * returned. Otherwise \c GLX_BAD_ATTRIBUTE is returned. + */ +int +_gl_get_context_mode_data(const __GLcontextModes *mode, int attribute, + int *value_return) +{ + switch (attribute) { + case GLX_USE_GL: + *value_return = GL_TRUE; + return 0; + case GLX_BUFFER_SIZE: + *value_return = mode->rgbBits; + return 0; + case GLX_RGBA: + *value_return = mode->rgbMode; + return 0; + case GLX_RED_SIZE: + *value_return = mode->redBits; + return 0; + case GLX_GREEN_SIZE: + *value_return = mode->greenBits; + return 0; + case GLX_BLUE_SIZE: + *value_return = mode->blueBits; + return 0; + case GLX_ALPHA_SIZE: + *value_return = mode->alphaBits; + return 0; + case GLX_DOUBLEBUFFER: + *value_return = mode->doubleBufferMode; + return 0; + case GLX_STEREO: + *value_return = mode->stereoMode; + return 0; + case GLX_AUX_BUFFERS: + *value_return = mode->numAuxBuffers; + return 0; + case GLX_DEPTH_SIZE: + *value_return = mode->depthBits; + return 0; + case GLX_STENCIL_SIZE: + *value_return = mode->stencilBits; + return 0; + case GLX_ACCUM_RED_SIZE: + *value_return = mode->accumRedBits; + return 0; + case GLX_ACCUM_GREEN_SIZE: + *value_return = mode->accumGreenBits; + return 0; + case GLX_ACCUM_BLUE_SIZE: + *value_return = mode->accumBlueBits; + return 0; + case GLX_ACCUM_ALPHA_SIZE: + *value_return = mode->accumAlphaBits; + return 0; + case GLX_LEVEL: + *value_return = mode->level; + return 0; + case GLX_TRANSPARENT_TYPE_EXT: + *value_return = mode->transparentPixel; + return 0; + case GLX_TRANSPARENT_RED_VALUE: + *value_return = mode->transparentRed; + return 0; + case GLX_TRANSPARENT_GREEN_VALUE: + *value_return = mode->transparentGreen; + return 0; + case GLX_TRANSPARENT_BLUE_VALUE: + *value_return = mode->transparentBlue; + return 0; + case GLX_TRANSPARENT_ALPHA_VALUE: + *value_return = mode->transparentAlpha; + return 0; + case GLX_TRANSPARENT_INDEX_VALUE: + *value_return = mode->transparentIndex; + return 0; + case GLX_X_VISUAL_TYPE: + *value_return = mode->visualType; + return 0; + case GLX_CONFIG_CAVEAT: + *value_return = mode->visualRating; + return 0; + case GLX_VISUAL_ID: + *value_return = mode->visualID; + return 0; + case GLX_DRAWABLE_TYPE: + *value_return = mode->drawableType; + return 0; + case GLX_RENDER_TYPE: + *value_return = mode->renderType; + return 0; + case GLX_X_RENDERABLE: + *value_return = mode->xRenderable; + return 0; + case GLX_FBCONFIG_ID: + *value_return = mode->fbconfigID; + return 0; + case GLX_MAX_PBUFFER_WIDTH: + *value_return = mode->maxPbufferWidth; + return 0; + case GLX_MAX_PBUFFER_HEIGHT: + *value_return = mode->maxPbufferHeight; + return 0; + case GLX_MAX_PBUFFER_PIXELS: + *value_return = mode->maxPbufferPixels; + return 0; + case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX: + *value_return = mode->optimalPbufferWidth; + return 0; + case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX: + *value_return = mode->optimalPbufferHeight; + return 0; + case GLX_SWAP_METHOD_OML: + *value_return = mode->swapMethod; + return 0; + case GLX_SAMPLE_BUFFERS_SGIS: + *value_return = mode->sampleBuffers; + return 0; + case GLX_SAMPLES_SGIS: + *value_return = mode->samples; + return 0; + + /* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX. + * It is ONLY for communication between the GLX client and the GLX + * server. + */ + case GLX_VISUAL_SELECT_GROUP_SGIX: + default: + return GLX_BAD_ATTRIBUTE; + } +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + + +/** + * Allocate a linked list of \c __GLcontextModes structures. The fields of + * each structure will be initialized to "reasonable" default values. In + * most cases this is the default value defined by table 3.4 of the GLX + * 1.3 specification. This means that most values are either initialized to + * zero or \c GLX_DONT_CARE (which is -1). As support for additional + * extensions is added, the new values will be initialized to appropriate + * values from the extension specification. + * + * \param count Number of structures to allocate. + * \param minimum_size Minimum size of a structure to allocate. This allows + * for differences in the version of the + * \c __GLcontextModes stucture used in libGL and in a + * DRI-based driver. + * \returns A pointer to the first element in a linked list of \c count + * stuctures on success, or \c NULL on failure. + * + * \warning Use of \c minimum_size does \b not guarantee binary compatibility. + * The fundamental assumption is that if the \c minimum_size + * specified by the driver and the size of the \c __GLcontextModes + * structure in libGL is the same, then the meaning of each byte in + * the structure is the same in both places. \b Be \b careful! + * Basically this means that fields have to be added in libGL and + * then propagated to drivers. Drivers should \b never arbitrarilly + * extend the \c __GLcontextModes data-structure. + */ +__GLcontextModes * +_gl_context_modes_create( unsigned count, size_t minimum_size ) +{ + const size_t size = (minimum_size > sizeof( __GLcontextModes )) + ? minimum_size : sizeof( __GLcontextModes ); + __GLcontextModes * base = NULL; + __GLcontextModes ** next; + unsigned i; + + next = & base; + for ( i = 0 ; i < count ; i++ ) { + *next = (__GLcontextModes *) _mesa_malloc( size ); + if ( *next == NULL ) { + _gl_context_modes_destroy( base ); + base = NULL; + break; + } + + (void) __glXMemset( *next, 0, size ); + (*next)->visualID = GLX_DONT_CARE; + (*next)->visualType = GLX_DONT_CARE; + (*next)->visualRating = GLX_NONE; + (*next)->transparentPixel = GLX_NONE; + (*next)->transparentRed = GLX_DONT_CARE; + (*next)->transparentGreen = GLX_DONT_CARE; + (*next)->transparentBlue = GLX_DONT_CARE; + (*next)->transparentAlpha = GLX_DONT_CARE; + (*next)->transparentIndex = GLX_DONT_CARE; + (*next)->xRenderable = GLX_DONT_CARE; + (*next)->fbconfigID = GLX_DONT_CARE; + (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML; + + next = & ((*next)->next); + } + + return base; +} + + +/** + * Destroy a linked list of \c __GLcontextModes structures created by + * \c _gl_context_modes_create. + * + * \param modes Linked list of structures to be destroyed. All structres + * in the list will be freed. + */ +void +_gl_context_modes_destroy( __GLcontextModes * modes ) +{ + while ( modes != NULL ) { + __GLcontextModes * const next = modes->next; + + _mesa_free( modes ); + modes = next; + } +} + + +/** + * Find a context mode matching a Visual ID. + * + * \param modes List list of context-mode structures to be searched. + * \param vid Visual ID to be found. + * \returns A pointer to a context-mode in \c modes if \c vid was found in + * the list, or \c NULL if it was not. + */ + +__GLcontextModes * +_gl_context_modes_find_visual( __GLcontextModes * modes, int vid ) +{ + while ( modes != NULL ) { + if ( modes->visualID == vid ) { + break; + } + + modes = modes->next; + } + + return modes; +} + + +/** + * Determine if two context-modes are the same. This is intended to be used + * by libGL implementations to compare to sets of driver generated FBconfigs. + * + * \param a Context-mode to be compared. + * \param b Context-mode to be compared. + * \returns \c GL_TRUE if the two context-modes are the same. \c GL_FALSE is + * returned otherwise. + */ +GLboolean +_gl_context_modes_are_same( const __GLcontextModes * a, + const __GLcontextModes * b ) +{ + return( (a->rgbMode == b->rgbMode) && + (a->floatMode == b->floatMode) && + (a->colorIndexMode == b->colorIndexMode) && + (a->doubleBufferMode == b->doubleBufferMode) && + (a->stereoMode == b->stereoMode) && + (a->redBits == b->redBits) && + (a->greenBits == b->greenBits) && + (a->blueBits == b->blueBits) && + (a->alphaBits == b->alphaBits) && +#if 0 /* For some reason these don't get set on the client-side in libGL. */ + (a->redMask == b->redMask) && + (a->greenMask == b->greenMask) && + (a->blueMask == b->blueMask) && + (a->alphaMask == b->alphaMask) && +#endif + (a->rgbBits == b->rgbBits) && + (a->indexBits == b->indexBits) && + (a->accumRedBits == b->accumRedBits) && + (a->accumGreenBits == b->accumGreenBits) && + (a->accumBlueBits == b->accumBlueBits) && + (a->accumAlphaBits == b->accumAlphaBits) && + (a->depthBits == b->depthBits) && + (a->stencilBits == b->stencilBits) && + (a->numAuxBuffers == b->numAuxBuffers) && + (a->level == b->level) && + (a->pixmapMode == b->pixmapMode) && + (a->visualRating == b->visualRating) && + + (a->transparentPixel == b->transparentPixel) && + + ((a->transparentPixel != GLX_TRANSPARENT_RGB) || + ((a->transparentRed == b->transparentRed) && + (a->transparentGreen == b->transparentGreen) && + (a->transparentBlue == b->transparentBlue) && + (a->transparentAlpha == b->transparentAlpha))) && + + ((a->transparentPixel != GLX_TRANSPARENT_INDEX) || + (a->transparentIndex == b->transparentIndex)) && + + (a->sampleBuffers == b->sampleBuffers) && + (a->samples == b->samples) && + ((a->drawableType & b->drawableType) != 0) && + (a->renderType == b->renderType) && + (a->maxPbufferWidth == b->maxPbufferWidth) && + (a->maxPbufferHeight == b->maxPbufferHeight) && + (a->maxPbufferPixels == b->maxPbufferPixels) && + (a->optimalPbufferWidth == b->optimalPbufferWidth) && + (a->optimalPbufferHeight == b->optimalPbufferHeight) && + (a->swapMethod == b->swapMethod) ); +} Index: xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.h Fri Dec 10 10:06:13 2004 @@ -0,0 +1,52 @@ +/* + * (C) Copyright IBM Corporation 2003 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file glcontextmodes.h + * \author Ian Romanick + */ + +#ifndef GLCONTEXTMODES_H +#define GLCONTEXTMODES_H + +#include "GL/internal/glcore.h" + +#ifndef DRI_NEW_INTERFACE_ONLY +extern GLint _gl_convert_from_x_visual_type( int visualType ); +extern GLint _gl_convert_to_x_visual_type( int visualType ); +extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode, + const __GLXvisualConfig * config ); +extern int _gl_get_context_mode_data( const __GLcontextModes *mode, + int attribute, int *value_return ); +#endif /* DRI_NEW_INTERFACE_ONLY */ + +extern __GLcontextModes * _gl_context_modes_create( unsigned count, + size_t minimum_size ); +extern void _gl_context_modes_destroy( __GLcontextModes * modes ); +extern __GLcontextModes * _gl_context_modes_find_visual( + __GLcontextModes * modes, int vid ); +extern GLboolean _gl_context_modes_are_same( const __GLcontextModes * a, + const __GLcontextModes * b ); + +#endif /* GLCONTEXTMODES_H */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/mm.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/mm.c:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/mm.c Thu Apr 8 05:16:49 2004 @@ -0,0 +1,196 @@ +/* + * GLX Hardware Device Driver common code + * Copyright (C) 1999 Wittawat Yamwong + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/mm.c,v 1.1.1.1 2004/04/08 09:16:49 alanh Exp $ */ + +#include +#include + +#include "mm.h" + + +void mmDumpMemInfo( memHeap_t *heap ) +{ + TMemBlock *p; + + fprintf(stderr, "Memory heap %p:\n", (void *)heap); + if (heap == 0) { + fprintf(stderr, " heap == 0\n"); + } else { + p = (TMemBlock *)heap; + while (p) { + fprintf(stderr, " Offset:%08x, Size:%08x, %c%c\n",p->ofs,p->size, + p->free ? '.':'U', + p->reserved ? 'R':'.'); + p = p->next; + } + } + fprintf(stderr, "End of memory blocks\n"); +} + +memHeap_t *mmInit(int ofs, + int size) +{ + PMemBlock blocks; + + if (size <= 0) { + return 0; + } + blocks = (TMemBlock *) calloc(1,sizeof(TMemBlock)); + if (blocks) { + blocks->ofs = ofs; + blocks->size = size; + blocks->free = 1; + return (memHeap_t *)blocks; + } else + return 0; +} + + +static TMemBlock* SliceBlock(TMemBlock *p, + int startofs, int size, + int reserved, int alignment) +{ + TMemBlock *newblock; + + /* break left */ + if (startofs > p->ofs) { + newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; + newblock->ofs = startofs; + newblock->size = p->size - (startofs - p->ofs); + newblock->free = 1; + newblock->next = p->next; + p->size -= newblock->size; + p->next = newblock; + p = newblock; + } + + /* break right */ + if (size < p->size) { + newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; + newblock->ofs = startofs + size; + newblock->size = p->size - size; + newblock->free = 1; + newblock->next = p->next; + p->size = size; + p->next = newblock; + } + + /* p = middle block */ + p->align = alignment; + p->free = 0; + p->reserved = reserved; + return p; +} + +PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, int startSearch) +{ + int mask,startofs,endofs; + TMemBlock *p; + + if (!heap || align2 < 0 || size <= 0) + return NULL; + mask = (1 << align2)-1; + startofs = 0; + p = (TMemBlock *)heap; + while (p) { + if ((p)->free) { + startofs = (p->ofs + mask) & ~mask; + if ( startofs < startSearch ) { + startofs = startSearch; + } + endofs = startofs+size; + if (endofs <= (p->ofs+p->size)) + break; + } + p = p->next; + } + if (!p) + return NULL; + p = SliceBlock(p,startofs,size,0,mask+1); + p->heap = heap; + return p; +} + +static __inline__ int Join2Blocks(TMemBlock *p) +{ + if (p->free && p->next && p->next->free) { + TMemBlock *q = p->next; + p->size += q->size; + p->next = q->next; + free(q); + return 1; + } + return 0; +} + +int mmFreeMem(PMemBlock b) +{ + TMemBlock *p,*prev; + + if (!b) + return 0; + if (!b->heap) { + fprintf(stderr, "no heap\n"); + return -1; + } + p = b->heap; + prev = NULL; + while (p && p != b) { + prev = p; + p = p->next; + } + if (!p || p->free || p->reserved) { + if (!p) + fprintf(stderr, "block not found in heap\n"); + else if (p->free) + fprintf(stderr, "block already free\n"); + else + fprintf(stderr, "block is reserved\n"); + return -1; + } + p->free = 1; + Join2Blocks(p); + if (prev) + Join2Blocks(prev); + return 0; +} + + +void mmDestroy(memHeap_t *heap) +{ + TMemBlock *p,*q; + + if (!heap) + return; + p = (TMemBlock *)heap; + while (p) { + q = p->next; + free(p); + p = q; + } +} Index: xc/extras/Mesa/src/mesa/drivers/dri/common/mm.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/mm.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/mm.h Thu Apr 8 05:16:49 2004 @@ -0,0 +1,82 @@ +/* + * GLX Hardware Device Driver common code + * Copyright (C) 1999 Keith Whitwell + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef MM_INC +#define MM_INC + +struct mem_block_t { + struct mem_block_t *next; + struct mem_block_t *heap; + int ofs,size; + int align; + int free:1; + int reserved:1; +}; +typedef struct mem_block_t TMemBlock; +typedef struct mem_block_t *PMemBlock; + +/* a heap is just the first block in a chain */ +typedef struct mem_block_t memHeap_t; + +static __inline__ int mmBlockSize(PMemBlock b) +{ return b->size; } + +static __inline__ int mmOffset(PMemBlock b) +{ return b->ofs; } + +/* + * input: total size in bytes + * return: a heap pointer if OK, NULL if error + */ +memHeap_t *mmInit( int ofs, int size ); + +/* + * Allocate 'size' bytes with 2^align2 bytes alignment, + * restrict the search to free memory after 'startSearch' + * depth and back buffers should be in different 4mb banks + * to get better page hits if possible + * input: size = size of block + * align2 = 2^align2 bytes alignment + * startSearch = linear offset from start of heap to begin search + * return: pointer to the allocated block, 0 if error + */ +PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, + int startSearch ); + +/* + * Free block starts at offset + * input: pointer to a block + * return: 0 if OK, -1 if error + */ +int mmFreeMem( PMemBlock b ); + +/* + * destroy MM + */ +void mmDestroy( memHeap_t *mmInit ); + +/* For debuging purpose. */ +void mmDumpMemInfo( memHeap_t *mmInit ); + +#endif Index: xc/extras/Mesa/src/mesa/drivers/dri/common/mmio.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/mmio.h:1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/mmio.h Mon Dec 13 17:40:49 2004 @@ -0,0 +1,62 @@ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/mmio.h,v 1.2 2004/12/13 22:40:49 tsi Exp $ */ +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file mmio.h + * Functions for properly handling memory mapped IO on various platforms. + * + * \author Ian Romanick + */ + + +#ifndef MMIO_H +#define MMIO_H + +#if defined( __powerpc__ ) + +static __inline__ u_int32_t +read_MMIO_LE32( volatile void * base, unsigned long offset ) +{ + volatile void * p = ((volatile char *) base) + offset; + u_int32_t val; + + __asm__ __volatile__( "lwbrx %0, %1, %2 ; eieio" + : "=r" (val) + : "b" (base), "r" (offset), "m" (p) ); + return val; +} + +#else + +static __inline__ u_int32_t +read_MMIO_LE32( volatile void * base, unsigned long offset ) +{ + volatile u_int32_t * p = (volatile u_int32_t *) (((volatile char *) base) + offset); + return LE32_TO_CPU( p[0] ); +} + +#endif + +#endif /* MMIO_H */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/mmx.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/mmx.h:1.1.1.1 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/mmx.h Thu Apr 8 05:16:50 2004 @@ -0,0 +1,560 @@ +/* mmx.h + + MultiMedia eXtensions GCC interface library for IA32. + + To use this library, simply include this header file + and compile with GCC. You MUST have inlining enabled + in order for mmx_ok() to work; this can be done by + simply using -O on the GCC command line. + + Compiling with -DMMX_TRACE will cause detailed trace + output to be sent to stderr for each mmx operation. + This adds lots of code, and obviously slows execution to + a crawl, but can be very useful for debugging. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR ANY PARTICULAR PURPOSE. + + 1997-98 by H. Dietz and R. Fisher + + History: + 97-98* R.Fisher Early versions + 980501 R.Fisher Original Release + 980611* H.Dietz Rewrite, correctly implementing inlines, and + R.Fisher including direct register accesses. + 980616 R.Fisher Release of 980611 as 980616. + 980714 R.Fisher Minor corrections to Makefile, etc. + 980715 R.Fisher mmx_ok() now prevents optimizer from using + clobbered values. + mmx_ok() now checks if cpuid instruction is + available before trying to use it. + 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix + Extended MMX, and standard MMX. It returns a + value which is positive if any of these are + supported, and can be masked with constants to + see which. mmx_ok() is now a call to this + 980726* R.Fisher Added i2r support for shift functions + 980919 R.Fisher Fixed AMD extended feature recognition bug. + 980921 R.Fisher Added definition/check for _MMX_H. + Added "float s[2]" to mmx_t for use with + 3DNow and EMMX. So same mmx_t can be used. + 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) + Fixed psllq_i2r error in mmxtest.c + + * Unreleased (internal or interim) versions + + Notes: + It appears that the latest gas has the pand problem fixed, therefore + I'll undefine BROKEN_PAND by default. + String compares may be quicker than the multiple test/jumps in vendor + test sequence in mmx_ok(), but I'm not concerned with that right now. + + Acknowledgments: + Jussi Laako for pointing out the errors ultimately found to be + connected to the failure to notify the optimizer of clobbered values. + Roger Hardiman for reminding us that CPUID isn't everywhere, and that + someone may actually try to use this on a machine without CPUID. + Also for suggesting code for checking this. + Robert Dale for pointing out the AMD recognition bug. + Jimmy Mayfield and Carl Witty for pointing out the Intel recognition + bug. + Carl Witty for pointing out the psllq_i2r test bug. +*/ + +#ifndef _MMX_H +#define _MMX_H + +//#define MMX_TRACE + +/* Warning: at this writing, the version of GAS packaged + with most Linux distributions does not handle the + parallel AND operation mnemonic correctly. If the + symbol BROKEN_PAND is defined, a slower alternative + coding will be used. If execution of mmxtest results + in an illegal instruction fault, define this symbol. +*/ +#undef BROKEN_PAND + + +/* The type of an value that fits in an MMX register + (note that long long constant values MUST be suffixed + by LL and unsigned long long values by ULL, lest + they be truncated by the compiler) +*/ +typedef union { + long long q; /* Quadword (64-bit) value */ + unsigned long long uq; /* Unsigned Quadword */ + int d[2]; /* 2 Doubleword (32-bit) values */ + unsigned int ud[2]; /* 2 Unsigned Doubleword */ + short w[4]; /* 4 Word (16-bit) values */ + unsigned short uw[4]; /* 4 Unsigned Word */ + char b[8]; /* 8 Byte (8-bit) values */ + unsigned char ub[8]; /* 8 Unsigned Byte */ + float s[2]; /* Single-precision (32-bit) value */ +} mmx_t; + +/* Helper functions for the instruction macros that follow... + (note that memory-to-register, m2r, instructions are nearly + as efficient as register-to-register, r2r, instructions; + however, memory-to-memory instructions are really simulated + as a convenience, and are only 1/3 as efficient) +*/ +#ifdef MMX_TRACE + +/* Include the stuff for printing a trace to stderr... +*/ + +#include + +#define mmx_i2r(op, imm, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (imm); \ + fprintf(stderr, #op "_i2r(" #imm "=0x%016llx, ", mmx_trace.q); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (imm)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ + } + +#define mmx_m2r(op, mem, reg) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mem); \ + fprintf(stderr, #op "_m2r(" #mem "=0x%016llx, ", mmx_trace.q); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%016llx) => ", mmx_trace.q); \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)); \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #reg "=0x%016llx\n", mmx_trace.q); \ + } + +#define mmx_r2m(op, reg, mem) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #reg ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #op "_r2m(" #reg "=0x%016llx, ", mmx_trace.q); \ + mmx_trace = (mem); \ + fprintf(stderr, #mem "=0x%016llx) => ", mmx_trace.q); \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ); \ + mmx_trace = (mem); \ + fprintf(stderr, #mem "=0x%016llx\n", mmx_trace.q); \ + } + +#define mmx_r2r(op, regs, regd) \ + { \ + mmx_t mmx_trace; \ + __asm__ __volatile__ ("movq %%" #regs ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #op "_r2r(" #regs "=0x%016llx, ", mmx_trace.q); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #regd "=0x%016llx) => ", mmx_trace.q); \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd); \ + __asm__ __volatile__ ("movq %%" #regd ", %0" \ + : "=X" (mmx_trace) \ + : /* nothing */ ); \ + fprintf(stderr, #regd "=0x%016llx\n", mmx_trace.q); \ + } + +#define mmx_m2m(op, mems, memd) \ + { \ + mmx_t mmx_trace; \ + mmx_trace = (mems); \ + fprintf(stderr, #op "_m2m(" #mems "=0x%016llx, ", mmx_trace.q); \ + mmx_trace = (memd); \ + fprintf(stderr, #memd "=0x%016llx) => ", mmx_trace.q); \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)); \ + mmx_trace = (memd); \ + fprintf(stderr, #memd "=0x%016llx\n", mmx_trace.q); \ + } + +#else + +/* These macros are a lot simpler without the tracing... +*/ + +#define mmx_i2r(op, imm, reg) \ + __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ + : /* nothing */ \ + : /* nothing */); + +#define mmx_m2r(op, mem, reg) \ + __asm__ __volatile__ (#op " %0, %%" #reg \ + : /* nothing */ \ + : "X" (mem)) + +#define mmx_r2m(op, reg, mem) \ + __asm__ __volatile__ (#op " %%" #reg ", %0" \ + : "=X" (mem) \ + : /* nothing */ ) + +#define mmx_r2r(op, regs, regd) \ + __asm__ __volatile__ (#op " %" #regs ", %" #regd) + +#define mmx_m2m(op, mems, memd) \ + __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ + #op " %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (memd) \ + : "X" (mems)) + +#endif + + +/* 1x64 MOVe Quadword + (this is both a load and a store... + in fact, it is the only way to store) +*/ +#define movq_m2r(var, reg) mmx_m2r(movq, var, reg) +#define movq_r2m(reg, var) mmx_r2m(movq, reg, var) +#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) +#define movq(vars, vard) \ + __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ + "movq %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 1x32 MOVe Doubleword + (like movq, this is both load and store... + but is most useful for moving things between + mmx registers and ordinary registers) +*/ +#define movd_m2r(var, reg) mmx_m2r(movd, var, reg) +#define movd_r2m(reg, var) mmx_r2m(movd, reg, var) +#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) +#define movd(vars, vard) \ + __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ + "movd %%mm0, %0" \ + : "=X" (vard) \ + : "X" (vars)) + + +/* 2x32, 4x16, and 8x8 Parallel ADDs +*/ +#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) +#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) +#define paddd(vars, vard) mmx_m2m(paddd, vars, vard) + +#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) +#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) +#define paddw(vars, vard) mmx_m2m(paddw, vars, vard) + +#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) +#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) +#define paddb(vars, vard) mmx_m2m(paddb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic +*/ +#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) +#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) +#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) + +#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) +#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) +#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) + + +/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic +*/ +#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) +#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) +#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) + +#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) +#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) +#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel SUBs +*/ +#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) +#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) +#define psubd(vars, vard) mmx_m2m(psubd, vars, vard) + +#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) +#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) +#define psubw(vars, vard) mmx_m2m(psubw, vars, vard) + +#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) +#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) +#define psubb(vars, vard) mmx_m2m(psubb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic +*/ +#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) +#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) +#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) + +#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) +#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) +#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) + + +/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic +*/ +#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) +#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) +#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) + +#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) +#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) +#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) + + +/* 4x16 Parallel MULs giving Low 4x16 portions of results +*/ +#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) +#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) +#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) + + +/* 4x16 Parallel MULs giving High 4x16 portions of results +*/ +#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) +#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) +#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) + + +/* 4x16->2x32 Parallel Mul-ADD + (muls like pmullw, then adds adjacent 16-bit fields + in the multiply result to make the final 2x32 result) +*/ +#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) +#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) +#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) + + +/* 1x64 bitwise AND +*/ +#ifdef BROKEN_PAND +#define pand_m2r(var, reg) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, reg); \ + mmx_m2r(pandn, var, reg); \ + } +#define pand_r2r(regs, regd) \ + { \ + mmx_m2r(pandn, (mmx_t) -1LL, regd); \ + mmx_r2r(pandn, regs, regd) \ + } +#define pand(vars, vard) \ + { \ + movq_m2r(vard, mm0); \ + mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ + mmx_m2r(pandn, vars, mm0); \ + movq_r2m(mm0, vard); \ + } +#else +#define pand_m2r(var, reg) mmx_m2r(pand, var, reg) +#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) +#define pand(vars, vard) mmx_m2m(pand, vars, vard) +#endif + + +/* 1x64 bitwise AND with Not the destination +*/ +#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) +#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) +#define pandn(vars, vard) mmx_m2m(pandn, vars, vard) + + +/* 1x64 bitwise OR +*/ +#define por_m2r(var, reg) mmx_m2r(por, var, reg) +#define por_r2r(regs, regd) mmx_r2r(por, regs, regd) +#define por(vars, vard) mmx_m2m(por, vars, vard) + + +/* 1x64 bitwise eXclusive OR +*/ +#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) +#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) +#define pxor(vars, vard) mmx_m2m(pxor, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality + (resulting fields are either 0 or -1) +*/ +#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) +#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) +#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) + +#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) +#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) +#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) + +#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) +#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) +#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) + + +/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than + (resulting fields are either 0 or -1) +*/ +#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) +#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) +#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) + +#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) +#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) +#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) + +#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) +#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) +#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical +*/ +#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) +#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) +#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) +#define psllq(vars, vard) mmx_m2m(psllq, vars, vard) + +#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) +#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) +#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) +#define pslld(vars, vard) mmx_m2m(pslld, vars, vard) + +#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) +#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) +#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) +#define psllw(vars, vard) mmx_m2m(psllw, vars, vard) + + +/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical +*/ +#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) +#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) +#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) +#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) + +#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) +#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) +#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) +#define psrld(vars, vard) mmx_m2m(psrld, vars, vard) + +#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) +#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) +#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) +#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) + + +/* 2x32 and 4x16 Parallel Shift Right Arithmetic +*/ +#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) +#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) +#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) +#define psrad(vars, vard) mmx_m2m(psrad, vars, vard) + +#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) +#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) +#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) +#define psraw(vars, vard) mmx_m2m(psraw, vars, vard) + + +/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate + (packs source and dest fields into dest in that order) +*/ +#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) +#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) +#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) + +#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) +#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) +#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) + + +/* 4x16->8x8 PACK and Unsigned Saturate + (packs source and dest fields into dest in that order) +*/ +#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) +#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) +#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low + (interleaves low half of dest with low half of source + as padding in each result field) +*/ +#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) +#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) +#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) + +#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) +#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) +#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) + +#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) +#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) +#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) + + +/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High + (interleaves high half of dest with high half of source + as padding in each result field) +*/ +#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) +#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) +#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) + +#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) +#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) +#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) + +#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) +#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) +#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) + + +/* Empty MMx State + (used to clean-up when going from mmx to float use + of the registers that are shared by both; note that + there is no float-to-mmx operation needed, because + only the float tag word info is corruptible) +*/ +#ifdef MMX_TRACE + +#define emms() \ + { \ + fprintf(stderr, "emms()\n"); \ + __asm__ __volatile__ ("emms"); \ + } + +#else + +#define emms() __asm__ __volatile__ ("emms") + +#endif + +#endif + Index: xc/extras/Mesa/src/mesa/drivers/dri/common/spantmp.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/spantmp.h:1.1.1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/spantmp.h Fri Dec 10 10:06:12 2004 @@ -0,0 +1,303 @@ +#ifndef DBG +#define DBG 0 +#endif + +#ifndef HW_WRITE_LOCK +#define HW_WRITE_LOCK() HW_LOCK() +#endif + +#ifndef HW_WRITE_UNLOCK +#define HW_WRITE_UNLOCK() HW_UNLOCK() +#endif + +#ifndef HW_READ_LOCK +#define HW_READ_LOCK() HW_LOCK() +#endif + +#ifndef HW_READ_UNLOCK +#define HW_READ_UNLOCK() HW_UNLOCK() +#endif + +#ifndef HW_READ_CLIPLOOP +#define HW_READ_CLIPLOOP() HW_CLIPLOOP() +#endif + +#ifndef HW_WRITE_CLIPLOOP +#define HW_WRITE_CLIPLOOP() HW_CLIPLOOP() +#endif + + +static void TAG(WriteRGBASpan)( const GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLubyte rgba[][4], + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint x1; + GLint n1; + LOCAL_VARS; + + y = Y_FLIP(y); + + HW_WRITE_CLIPLOOP() + { + GLint i = 0; + CLIPSPAN(x,y,n,x1,n1,i); + + if (DBG) fprintf(stderr, "WriteRGBASpan %d..%d (x1 %d)\n", + (int)i, (int)n1, (int)x1); + + if (mask) + { + for (;n1>0;i++,x1++,n1--) + if (mask[i]) + WRITE_RGBA( x1, y, + rgba[i][0], rgba[i][1], + rgba[i][2], rgba[i][3] ); + } + else + { + for (;n1>0;i++,x1++,n1--) + WRITE_RGBA( x1, y, + rgba[i][0], rgba[i][1], + rgba[i][2], rgba[i][3] ); + } + } + HW_ENDCLIPLOOP(); + } + HW_WRITE_UNLOCK(); +} + +static void TAG(WriteRGBSpan)( const GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLubyte rgb[][3], + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint x1; + GLint n1; + LOCAL_VARS; + + y = Y_FLIP(y); + + HW_WRITE_CLIPLOOP() + { + GLint i = 0; + CLIPSPAN(x,y,n,x1,n1,i); + + if (DBG) fprintf(stderr, "WriteRGBSpan %d..%d (x1 %d)\n", + (int)i, (int)n1, (int)x1); + + if (mask) + { + for (;n1>0;i++,x1++,n1--) + if (mask[i]) + WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); + } + else + { + for (;n1>0;i++,x1++,n1--) + WRITE_RGBA( x1, y, rgb[i][0], rgb[i][1], rgb[i][2], 255 ); + } + } + HW_ENDCLIPLOOP(); + } + HW_WRITE_UNLOCK(); +} + +static void TAG(WriteRGBAPixels)( const GLcontext *ctx, + GLuint n, + const GLint x[], + const GLint y[], + const GLubyte rgba[][4], + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint i; + LOCAL_VARS; + + if (DBG) fprintf(stderr, "WriteRGBAPixels\n"); + + HW_WRITE_CLIPLOOP() + { + if (mask) + { + for (i=0;i0;i++,x1++,n1--) + if (mask[i]) + WRITE_PIXEL( x1, y, p ); + } + else + { + for (;n1>0;i++,x1++,n1--) + WRITE_PIXEL( x1, y, p ); + } + } + HW_ENDCLIPLOOP(); + } + HW_WRITE_UNLOCK(); +} + + +static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx, + GLuint n, + const GLint x[], const GLint y[], + const GLchan color[], + const GLubyte mask[] ) +{ + HW_WRITE_LOCK() + { + GLint i; + LOCAL_VARS; + INIT_MONO_PIXEL(p, color); + + if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); + + HW_WRITE_CLIPLOOP() + { + if (mask) + { + for (i=0;i0;i++,x1++,n1--) + READ_RGBA( rgba[i], x1, y ); + } + HW_ENDCLIPLOOP(); + } + HW_READ_UNLOCK(); +} + + +static void TAG(ReadRGBAPixels)( const GLcontext *ctx, + GLuint n, const GLint x[], const GLint y[], + GLubyte rgba[][4], const GLubyte mask[] ) +{ + HW_READ_LOCK() + { + GLint i; + LOCAL_VARS; + + if (DBG) fprintf(stderr, "ReadRGBAPixels\n"); + + HW_READ_CLIPLOOP() + { + if (mask) + { + for (i=0;i + * Keith Whitwell + * Kevin E. Martin + * Gareth Hughes + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/texmem.c,v 1.4 2004/12/10 15:30:09 alanh Exp $ */ + +/** \file texmem.c + * Implements all of the device-independent texture memory management. + * + * Currently, only a simple LRU texture memory management policy is + * implemented. In the (hopefully very near) future, better policies will be + * implemented. The idea is that the DRI should be able to run in one of two + * modes. In the default mode the DRI will dynamically attempt to discover + * the best texture management policy for the running application. In the + * other mode, the user (via some sort of as yet TBD mechanism) will select + * a texture management policy that is known to work well with the + * application. + */ + +#include "texmem.h" +#include "simple_list.h" +#include "imports.h" +#include "macros.h" +#include "texformat.h" + +#include + + + +static unsigned dummy_swap_counter; + + +/** + * Calculate \f$\log_2\f$ of a value. This is a particularly poor + * implementation of this function. However, since system performance is in + * no way dependent on this function, the slowness of the implementation is + * irrelevent. + * + * \param n Value whose \f$\log_2\f$ is to be calculated + */ + +static GLuint +driLog2( GLuint n ) +{ + GLuint log2; + + for ( log2 = 1 ; n > 1 ; log2++ ) { + n >>= 1; + } + + return log2; +} + + + + +/** + * Determine if a texture is resident in textureable memory. Depending on + * the driver, this may or may not be on-card memory. It could be AGP memory + * or anyother type of memory from which the hardware can directly read + * texels. + * + * This function is intended to be used as the \c IsTextureResident function + * in the device's \c dd_function_table. + * + * \param ctx GL context pointer (currently unused) + * \param texObj Texture object to be tested + */ + +GLboolean +driIsTextureResident( GLcontext * ctx, + struct gl_texture_object * texObj ) +{ + driTextureObject * t; + + + t = (driTextureObject *) texObj->DriverData; + return( (t != NULL) && (t->memBlock != NULL) ); +} + + + + +/** + * (Re)initialize the global circular LRU list. The last element + * in the array (\a heap->nrRegions) is the sentinal. Keeping it + * at the end of the array allows the other elements of the array + * to be addressed rationally when looking up objects at a particular + * location in texture memory. + * + * \param heap Texture heap to be reset + */ + +static void resetGlobalLRU( driTexHeap * heap ) +{ + drmTextureRegionPtr list = heap->global_regions; + unsigned sz = 1U << heap->logGranularity; + unsigned i; + + for (i = 0 ; (i+1) * sz <= heap->size ; i++) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = heap->nrRegions; + list[i].prev = i-1; + list[i].next = heap->nrRegions; + list[heap->nrRegions].prev = i; + list[heap->nrRegions].next = 0; + heap->global_age[0] = 0; +} + +/** + * Print out debugging information about the local texture LRU. + * + * \param heap Texture heap to be printed + * \param callername Name of calling function + */ +static void printLocalLRU( driTexHeap * heap, const char *callername ) +{ + driTextureObject *t; + unsigned sz = 1U << heap->logGranularity; + + fprintf( stderr, "%s in %s:\nLocal LRU, heap %d:\n", + __FUNCTION__, callername, heap->heapId ); + + foreach ( t, &heap->texture_objects ) { + if (!t->memBlock) + continue; + if (!t->tObj) { + fprintf( stderr, "Placeholder (%p) %d at 0x%x sz 0x%x\n", + (void *)t, + t->memBlock->ofs / sz, + t->memBlock->ofs, + t->memBlock->size ); + } else { + fprintf( stderr, "Texture (%p) at 0x%x sz 0x%x\n", + (void *)t, + t->memBlock->ofs, + t->memBlock->size ); + } + } + foreach ( t, heap->swapped_objects ) { + if (!t->tObj) { + fprintf( stderr, "Swapped Placeholder (%p)\n", (void *)t ); + } else { + fprintf( stderr, "Swapped Texture (%p)\n", (void *)t ); + } + } + + fprintf( stderr, "\n" ); +} + +/** + * Print out debugging information about the global texture LRU. + * + * \param heap Texture heap to be printed + * \param callername Name of calling function + */ +static void printGlobalLRU( driTexHeap * heap, const char *callername ) +{ + drmTextureRegionPtr list = heap->global_regions; + int i, j; + + fprintf( stderr, "%s in %s:\nGlobal LRU, heap %d list %p:\n", + __FUNCTION__, callername, heap->heapId, (void *)list ); + + for ( i = 0, j = heap->nrRegions ; i < heap->nrRegions ; i++ ) { + fprintf( stderr, "list[%d] age %d next %d prev %d in_use %d\n", + j, list[j].age, list[j].next, list[j].prev, list[j].in_use ); + j = list[j].next; + if ( j == heap->nrRegions ) break; + } + + if ( j != heap->nrRegions ) { + fprintf( stderr, "Loop detected in global LRU\n" ); + for ( i = 0 ; i < heap->nrRegions ; i++ ) { + fprintf( stderr, "list[%d] age %d next %d prev %d in_use %d\n", + i, list[i].age, list[i].next, list[i].prev, list[i].in_use ); + } + } + + fprintf( stderr, "\n" ); +} + + +/** + * Called by the client whenever it touches a local texture. + * + * \param t Texture object that the client has accessed + */ + +void driUpdateTextureLRU( driTextureObject * t ) +{ + driTexHeap * heap; + drmTextureRegionPtr list; + unsigned shift; + unsigned start; + unsigned end; + unsigned i; + + + heap = t->heap; + if ( heap != NULL ) { + shift = heap->logGranularity; + start = t->memBlock->ofs >> shift; + end = (t->memBlock->ofs + t->memBlock->size - 1) >> shift; + + + heap->local_age = ++heap->global_age[0]; + list = heap->global_regions; + + + /* Update the context's local LRU + */ + + move_to_head( & heap->texture_objects, t ); + + + for (i = start ; i <= end ; i++) { + list[i].age = heap->local_age; + + /* remove_from_list(i) + */ + list[(unsigned)list[i].next].prev = list[i].prev; + list[(unsigned)list[i].prev].next = list[i].next; + + /* insert_at_head(list, i) + */ + list[i].prev = heap->nrRegions; + list[i].next = list[heap->nrRegions].next; + list[(unsigned)list[heap->nrRegions].next].prev = i; + list[heap->nrRegions].next = i; + } + + if ( 0 ) { + printGlobalLRU( heap, __FUNCTION__ ); + printLocalLRU( heap, __FUNCTION__ ); + } + } +} + + + + +/** + * Keep track of swapped out texture objects. + * + * \param t Texture object to be "swapped" out of its texture heap + */ + +void driSwapOutTextureObject( driTextureObject * t ) +{ + unsigned face; + + + if ( t->memBlock != NULL ) { + assert( t->heap != NULL ); + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + + if (t->timestamp > t->heap->timestamp) + t->heap->timestamp = t->timestamp; + + t->heap->texture_swaps[0]++; + move_to_tail( t->heap->swapped_objects, t ); + t->heap = NULL; + } + else { + assert( t->heap == NULL ); + } + + + for ( face = 0 ; face < 6 ; face++ ) { + t->dirty_images[face] = ~0; + } +} + + + + +/** + * Destroy hardware state associated with texture \a t. Calls the + * \a destroy_texture_object method associated with the heap from which + * \a t was allocated. + * + * \param t Texture object to be destroyed + */ + +void driDestroyTextureObject( driTextureObject * t ) +{ + driTexHeap * heap; + + + if ( 0 ) { + fprintf( stderr, "[%s:%d] freeing %p (tObj = %p, DriverData = %p)\n", + __FILE__, __LINE__, + (void *)t, + (void *)((t != NULL) ? t->tObj : NULL), + (void *)((t != NULL && t->tObj != NULL) ? t->tObj->DriverData : NULL )); + } + + if ( t != NULL ) { + if ( t->memBlock ) { + heap = t->heap; + assert( heap != NULL ); + + heap->texture_swaps[0]++; + + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + + if (t->timestamp > t->heap->timestamp) + t->heap->timestamp = t->timestamp; + + heap->destroy_texture_object( heap->driverContext, t ); + t->heap = NULL; + } + + if ( t->tObj != NULL ) { + assert( t->tObj->DriverData == t ); + t->tObj->DriverData = NULL; + } + + remove_from_list( t ); + FREE( t ); + } + + if ( 0 ) { + fprintf( stderr, "[%s:%d] done freeing %p\n", __FILE__, __LINE__, (void *)t ); + } +} + + + + +/** + * Update the local heap's representation of texture memory based on + * data in the SAREA. This is done each time it is detected that some other + * direct rendering client has held the lock. This pertains to both our local + * textures and the textures belonging to other clients. Keep track of other + * client's textures by pushing a placeholder texture onto the LRU list -- + * these are denoted by \a tObj being \a NULL. + * + * \param heap Heap whose state is to be updated + * \param offset Byte offset in the heap that has been stolen + * \param size Size, in bytes, of the stolen block + * \param in_use Non-zero if the block is pinned/reserved by the kernel + */ + +static void driTexturesGone( driTexHeap * heap, int offset, int size, + int in_use ) +{ + driTextureObject * t; + driTextureObject * tmp; + + + foreach_s ( t, tmp, & heap->texture_objects ) { + if ( (t->memBlock->ofs < (offset + size)) + && ((t->memBlock->ofs + t->memBlock->size) > offset) ) { + /* It overlaps - kick it out. If the texture object is just a + * place holder, then destroy it all together. Otherwise, mark + * it as being swapped out. + */ + + if ( t->tObj != NULL ) { + driSwapOutTextureObject( t ); + } + else { + driDestroyTextureObject( t ); + } + } + } + + + { + t = (driTextureObject *) CALLOC( heap->texture_object_size ); + if ( t == NULL ) return; + + t->memBlock = mmAllocMem( heap->memory_heap, size, 0, offset ); + if ( t->memBlock == NULL ) { + fprintf( stderr, "Couldn't alloc placeholder: heap %u sz %x ofs %x\n", heap->heapId, + (int)size, (int)offset ); + mmDumpMemInfo( heap->memory_heap ); + return; + } + t->heap = heap; + if (in_use) + t->bound = 99; + insert_at_head( & heap->texture_objects, t ); + } +} + + + + +/** + * Called by the client on lock contention to determine whether textures have + * been stolen. If another client has modified a region in which we have + * textures, then we need to figure out which of our textures have been + * removed and update our global LRU. + * + * \param heap Texture heap to be updated + */ + +void driAgeTextures( driTexHeap * heap ) +{ + drmTextureRegionPtr list = heap->global_regions; + unsigned sz = 1U << (heap->logGranularity); + unsigned i, nr = 0; + + + /* Have to go right round from the back to ensure stuff ends up + * LRU in the local list... Fix with a cursor pointer. + */ + + for (i = list[heap->nrRegions].prev ; + i != heap->nrRegions && nr < heap->nrRegions ; + i = list[i].prev, nr++) { + /* If switching texturing schemes, then the SAREA might not have been + * properly cleared, so we need to reset the global texture LRU. + */ + + if ( (i * sz) > heap->size ) { + nr = heap->nrRegions; + break; + } + + if (list[i].age > heap->local_age) + driTexturesGone( heap, i * sz, sz, list[i].in_use); + } + + /* Loop or uninitialized heap detected. Reset. + */ + + if (nr == heap->nrRegions) { + driTexturesGone( heap, 0, heap->size, 0); + resetGlobalLRU( heap ); + } + + if ( 0 ) { + printGlobalLRU( heap, __FUNCTION__ ); + printLocalLRU( heap, __FUNCTION__ ); + } + + heap->local_age = heap->global_age[0]; +} + + + + +/** + * Allocate memory from a texture heap to hold a texture object. This + * routine will attempt to allocate memory for the texture from the heaps + * specified by \c heap_array in order. That is, first it will try to + * allocate from \c heap_array[0], then \c heap_array[1], and so on. + * + * \param heap_array Array of pointers to texture heaps to use + * \param nr_heaps Number of heap pointer in \a heap_array + * \param t Texture object for which space is needed + * \return The ID of the heap from which memory was allocated, or -1 if + * memory could not be allocated. + * + * \bug The replacement policy implemented by this function is horrible. + */ + + +int +driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps, + driTextureObject * t ) +{ + driTexHeap * heap; + driTextureObject * temp; + driTextureObject * cursor; + unsigned id; + + + /* In case it already has texture space, initialize heap. This also + * prevents GCC from issuing a warning that heap might be used + * uninitialized. + */ + + heap = t->heap; + + + /* Run through each of the existing heaps and try to allocate a buffer + * to hold the texture. + */ + + for ( id = 0 ; (t->memBlock == NULL) && (id < nr_heaps) ; id++ ) { + heap = heap_array[ id ]; + if ( heap != NULL ) { + t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize, + heap->alignmentShift, 0 ); + } + } + + + /* Kick textures out until the requested texture fits. + */ + + if ( t->memBlock == NULL ) { + for ( id = 0 ; (t->memBlock == NULL) && (id < nr_heaps) ; id++ ) { + heap = heap_array[ id ]; + if ( t->totalSize <= heap->size ) { + + for ( cursor = heap->texture_objects.prev, temp = cursor->prev; + cursor != &heap->texture_objects ; + cursor = temp, temp = cursor->prev ) { + + /* The the LRU element. If the texture is bound to one of + * the texture units, then we cannot kick it out. + */ + if ( cursor->bound /* || cursor->reserved */ ) { + continue; + } + + /* If this is a placeholder, there's no need to keep it */ + if (cursor->tObj) + driSwapOutTextureObject( cursor ); + else + driDestroyTextureObject( cursor ); + + t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize, + heap->alignmentShift, 0 ); + + if (t->memBlock) + break; + } + } /* if ( t->totalSize <= heap->size ) ... */ + } + } + + + if ( t->memBlock != NULL ) { + /* id and heap->heapId may or may not be the same value here. + */ + + assert( heap != NULL ); + assert( (t->heap == NULL) || (t->heap == heap) ); + + t->heap = heap; + return heap->heapId; + } + else { + assert( t->heap == NULL ); + + fprintf( stderr, "[%s:%d] unable to allocate texture\n", + __FUNCTION__, __LINE__ ); + return -1; + } +} + + + + + + +/** + * Set the location where the texture-swap counter is stored. + */ + +void +driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter ) +{ + heap->texture_swaps = (counter == NULL) ? & dummy_swap_counter : counter; +} + + + + +/** + * Create a new heap for texture data. + * + * \param heap_id Device-dependent heap identifier. This value + * will returned by driAllocateTexture when memory + * is allocated from this heap. + * \param context Device-dependent driver context. This is + * supplied as the first parameter to the + * \c destroy_tex_obj function. + * \param size Size, in bytes, of the texture region + * \param alignmentShift Alignment requirement for textures. If textures + * must be allocated on a 4096 byte boundry, this + * would be 12. + * \param nr_regions Number of regions into which this texture space + * should be partitioned + * \param global_regions Array of \c drmTextureRegion structures in the SAREA + * \param global_age Pointer to the global texture age in the SAREA + * \param swapped_objects Pointer to the list of texture objects that are + * not in texture memory (i.e., have been swapped + * out). + * \param texture_object_size Size, in bytes, of a device-dependent texture + * object + * \param destroy_tex_obj Function used to destroy a device-dependent + * texture object + * + * \sa driDestroyTextureHeap + */ + +driTexHeap * +driCreateTextureHeap( unsigned heap_id, void * context, unsigned size, + unsigned alignmentShift, unsigned nr_regions, + drmTextureRegionPtr global_regions, unsigned * global_age, + driTextureObject * swapped_objects, + unsigned texture_object_size, + destroy_texture_object_t * destroy_tex_obj + ) +{ + driTexHeap * heap; + unsigned l; + + + if ( 0 ) + fprintf( stderr, "%s( %u, %p, %u, %u, %u )\n", + __FUNCTION__, + heap_id, (void *)context, size, alignmentShift, nr_regions ); + + heap = (driTexHeap *) CALLOC( sizeof( driTexHeap ) ); + if ( heap != NULL ) { + l = driLog2( (size - 1) / nr_regions ); + if ( l < alignmentShift ) + { + l = alignmentShift; + } + + heap->logGranularity = l; + heap->size = size & ~((1L << l) - 1); + + heap->memory_heap = mmInit( 0, heap->size ); + if ( heap->memory_heap != NULL ) { + heap->heapId = heap_id; + heap->driverContext = context; + + heap->alignmentShift = alignmentShift; + heap->nrRegions = nr_regions; + heap->global_regions = global_regions; + heap->global_age = global_age; + heap->swapped_objects = swapped_objects; + heap->texture_object_size = texture_object_size; + heap->destroy_texture_object = destroy_tex_obj; + + /* Force global heap init */ + if (heap->global_age[0] == 0) + heap->local_age = ~0; + else + heap->local_age = 0; + + make_empty_list( & heap->texture_objects ); + driSetTextureSwapCounterLocation( heap, NULL ); + } + else { + FREE( heap ); + heap = NULL; + } + } + + + if ( 0 ) + fprintf( stderr, "%s returning %p\n", __FUNCTION__, (void *)heap ); + + return heap; +} + + + + +/** Destroys a texture heap + * + * \param heap Texture heap to be destroyed + */ + +void +driDestroyTextureHeap( driTexHeap * heap ) +{ + driTextureObject * t; + driTextureObject * temp; + + + if ( heap != NULL ) { + foreach_s( t, temp, & heap->texture_objects ) { + driDestroyTextureObject( t ); + } + foreach_s( t, temp, heap->swapped_objects ) { + driDestroyTextureObject( t ); + } + + mmDestroy( heap->memory_heap ); + FREE( heap ); + } +} + + + + +/****************************************************************************/ +/** + * Determine how many texels (including all mipmap levels) would be required + * for a texture map of size \f$2^^\c base_size_log2\f$ would require. + * + * \param base_size_log2 \f$log_2\f$ of the size of a side of the texture + * \param dimensions Number of dimensions of the texture. Either 2 or 3. + * \param faces Number of faces of the texture. Either 1 or 6 (for cube maps). + * \return Number of texels + */ + +static unsigned +texels_this_map_size( int base_size_log2, unsigned dimensions, unsigned faces ) +{ + unsigned texels; + + + assert( (faces == 1) || (faces == 6) ); + assert( (dimensions == 2) || (dimensions == 3) ); + + texels = 0; + if ( base_size_log2 >= 0 ) { + texels = (1U << (dimensions * base_size_log2)); + + /* See http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg03636.html + * for the complete explaination of why this formulation is used. + * Basically, the smaller mipmap levels sum to 0.333 the size of the + * level 0 map. The total size is therefore the size of the map + * multipled by 1.333. The +2 is there to round up. + */ + + texels = (texels * 4 * faces + 2) / 3; + } + + return texels; +} + + + + +struct maps_per_heap { + unsigned c[32]; +}; + +static void +fill_in_maximums( driTexHeap * const * heaps, unsigned nr_heaps, + unsigned max_bytes_per_texel, unsigned max_size, + unsigned mipmaps_at_once, unsigned dimensions, + unsigned faces, struct maps_per_heap * max_textures ) +{ + unsigned heap; + unsigned log2_size; + unsigned mask; + + + /* Determine how many textures of each size can be stored in each + * texture heap. + */ + + for ( heap = 0 ; heap < nr_heaps ; heap++ ) { + if ( heaps[ heap ] == NULL ) { + (void) memset( max_textures[ heap ].c, 0, + sizeof( max_textures[ heap ].c ) ); + continue; + } + + mask = (1U << heaps[ heap ]->logGranularity) - 1; + + if ( 0 ) { + fprintf( stderr, "[%s:%d] heap[%u] = %u bytes, mask = 0x%08x\n", + __FILE__, __LINE__, + heap, heaps[ heap ]->size, mask ); + } + + for ( log2_size = max_size ; log2_size > 0 ; log2_size-- ) { + unsigned total; + + + /* Determine the total number of bytes required by a texture of + * size log2_size. + */ + + total = texels_this_map_size( log2_size, dimensions, faces ) + - texels_this_map_size( log2_size - mipmaps_at_once, + dimensions, faces ); + total *= max_bytes_per_texel; + total = (total + mask) & ~mask; + + /* The number of textures of a given size that will fit in a heap + * is equal to the size of the heap divided by the size of the + * texture. + */ + + max_textures[ heap ].c[ log2_size ] = heaps[ heap ]->size / total; + + if ( 0 ) { + fprintf( stderr, "[%s:%d] max_textures[%u].c[%02u] " + "= 0x%08x / 0x%08x " + "= %u (%u)\n", + __FILE__, __LINE__, + heap, log2_size, + heaps[ heap ]->size, total, + heaps[ heap ]->size / total, + max_textures[ heap ].c[ log2_size ] ); + } + } + } +} + + +static unsigned +get_max_size( unsigned nr_heaps, + unsigned texture_units, + unsigned max_size, + int all_textures_one_heap, + struct maps_per_heap * max_textures ) +{ + unsigned heap; + unsigned log2_size; + + + /* Determine the largest texture size such that a texture of that size + * can be bound to each texture unit at the same time. Some hardware + * may require that all textures be in the same texture heap for + * multitexturing. + */ + + for ( log2_size = max_size ; log2_size > 0 ; log2_size-- ) { + unsigned total = 0; + + for ( heap = 0 ; heap < nr_heaps ; heap++ ) + { + total += max_textures[ heap ].c[ log2_size ]; + + if ( 0 ) { + fprintf( stderr, "[%s:%d] max_textures[%u].c[%02u] = %u, " + "total = %u\n", __FILE__, __LINE__, heap, log2_size, + max_textures[ heap ].c[ log2_size ], total ); + } + + if ( (max_textures[ heap ].c[ log2_size ] >= texture_units) + || (!all_textures_one_heap && (total >= texture_units)) ) { + /* The number of mipmap levels is the log-base-2 of the + * maximum texture size plus 1. If the maximum texture size + * is 1x1, the log-base-2 is 0 and 1 mipmap level (the base + * level) is available. + */ + + return log2_size + 1; + } + } + } + + /* This should NEVER happen. It should always be possible to have at + * *least* a 1x1 texture in memory! + */ + assert( log2_size != 0 ); + return 0; +} + +#define SET_MAX(f,v) \ + do { if ( max_sizes[v] != 0 ) { limits-> f = max_sizes[v]; } } while( 0 ) + +#define SET_MAX_RECT(f,v) \ + do { if ( max_sizes[v] != 0 ) { limits-> f = 1 << max_sizes[v]; } } while( 0 ) + + +/** + * Given the amount of texture memory, the number of texture units, and the + * maximum size of a texel, calculate the maximum texture size the driver can + * advertise. + * + * \param heaps Texture heaps for this card + * \param nr_heap Number of texture heaps + * \param limits OpenGL contants. MaxTextureUnits must be set. + * \param max_bytes_per_texel Maximum size of a single texel, in bytes + * \param max_2D_size \f$\log_2\f$ of the maximum 2D texture size (i.e., + * 1024x1024 textures, this would be 10) + * \param max_3D_size \f$\log_2\f$ of the maximum 3D texture size (i.e., + * 1024x1024x1024 textures, this would be 10) + * \param max_cube_size \f$\log_2\f$ of the maximum cube texture size (i.e., + * 1024x1024 textures, this would be 10) + * \param max_rect_size \f$\log_2\f$ of the maximum texture rectangle size + * (i.e., 1024x1024 textures, this would be 10). This is a power-of-2 + * even though texture rectangles need not be a power-of-2. + * \param mipmaps_at_once Total number of mipmaps that can be used + * at one time. For most hardware this will be \f$\c max_size + 1\f$. + * For hardware that does not support mipmapping, this will be 1. + * \param all_textures_one_heap True if the hardware requires that all + * textures be in a single texture heap for multitexturing. + */ + +void +driCalculateMaxTextureLevels( driTexHeap * const * heaps, + unsigned nr_heaps, + struct gl_constants * limits, + unsigned max_bytes_per_texel, + unsigned max_2D_size, + unsigned max_3D_size, + unsigned max_cube_size, + unsigned max_rect_size, + unsigned mipmaps_at_once, + int all_textures_one_heap ) +{ + struct maps_per_heap max_textures[8]; + unsigned i; + const unsigned dimensions[4] = { 2, 3, 2, 2 }; + const unsigned faces[4] = { 1, 1, 6, 1 }; + unsigned max_sizes[4]; + unsigned mipmaps[4]; + + + max_sizes[0] = max_2D_size; + max_sizes[1] = max_3D_size; + max_sizes[2] = max_cube_size; + max_sizes[3] = max_rect_size; + + mipmaps[0] = mipmaps_at_once; + mipmaps[1] = mipmaps_at_once; + mipmaps[2] = 1; + mipmaps[3] = mipmaps_at_once; + + + /* Calculate the maximum number of texture levels in two passes. The + * first pass determines how many textures of each power-of-two size + * (including all mipmap levels for that size) can fit in each texture + * heap. The second pass finds the largest texture size that allows + * a texture of that size to be bound to every texture unit. + */ + + for ( i = 0 ; i < 4 ; i++ ) { + if ( max_sizes[ i ] != 0 ) { + fill_in_maximums( heaps, nr_heaps, max_bytes_per_texel, + max_sizes[ i ], mipmaps[ i ], + dimensions[ i ], faces[ i ], + max_textures ); + + max_sizes[ i ] = get_max_size( nr_heaps, + limits->MaxTextureUnits, + max_sizes[ i ], + all_textures_one_heap, + max_textures ); + } + } + + SET_MAX( MaxTextureLevels, 0 ); + SET_MAX( Max3DTextureLevels, 1 ); + SET_MAX( MaxCubeTextureLevels, 2 ); + SET_MAX_RECT( MaxTextureRectSize, 3 ); +} + + + + +/** + * Perform initial binding of default textures objects on a per unit, per + * texture target basis. + * + * \param ctx Current OpenGL context + * \param swapped List of swapped-out textures + * \param targets Bit-mask of value texture targets + */ + +void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped, + GLuint targets ) +{ + struct gl_texture_object *texObj; + GLuint tmp = ctx->Texture.CurrentUnit; + unsigned i; + + + for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) { + ctx->Texture.CurrentUnit = i; + + if ( (targets & DRI_TEXMGR_DO_TEXTURE_1D) != 0 ) { + texObj = ctx->Texture.Unit[i].Current1D; + ctx->Driver.BindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); + } + + if ( (targets & DRI_TEXMGR_DO_TEXTURE_2D) != 0 ) { + texObj = ctx->Texture.Unit[i].Current2D; + ctx->Driver.BindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); + } + + if ( (targets & DRI_TEXMGR_DO_TEXTURE_3D) != 0 ) { + texObj = ctx->Texture.Unit[i].Current3D; + ctx->Driver.BindTexture( ctx, GL_TEXTURE_3D, texObj ); + move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); + } + + if ( (targets & DRI_TEXMGR_DO_TEXTURE_CUBE) != 0 ) { + texObj = ctx->Texture.Unit[i].CurrentCubeMap; + ctx->Driver.BindTexture( ctx, GL_TEXTURE_CUBE_MAP_ARB, texObj ); + move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); + } + + if ( (targets & DRI_TEXMGR_DO_TEXTURE_RECT) != 0 ) { + texObj = ctx->Texture.Unit[i].CurrentRect; + ctx->Driver.BindTexture( ctx, GL_TEXTURE_RECTANGLE_NV, texObj ); + move_to_tail( swapped, (driTextureObject *) texObj->DriverData ); + } + } + + ctx->Texture.CurrentUnit = tmp; +} + + + + +/** + * Verify that the specified texture is in the specificed heap. + * + * \param tex Texture to be tested. + * \param heap Texture memory heap to be tested. + * \return True if the texture is in the heap, false otherwise. + */ + +static GLboolean +check_in_heap( const driTextureObject * tex, const driTexHeap * heap ) +{ +#if 1 + return tex->heap == heap; +#else + driTextureObject * curr; + + foreach( curr, & heap->texture_objects ) { + if ( curr == tex ) { + break; + } + } + + return curr == tex; +#endif +} + + + +/****************************************************************************/ +/** + * Validate the consistency of a set of texture heaps. + * Original version by Keith Whitwell in r200/r200_sanity.c. + */ + +GLboolean +driValidateTextureHeaps( driTexHeap * const * texture_heaps, + unsigned nr_heaps, const driTextureObject * swapped ) +{ + driTextureObject *t; + unsigned i; + + for ( i = 0 ; i < nr_heaps ; i++ ) { + int last_end = 0; + unsigned textures_in_heap = 0; + unsigned blocks_in_mempool = 0; + const driTexHeap * heap = texture_heaps[i]; + const memHeap_t * p = heap->memory_heap; + + /* Check each texture object has a MemBlock, and is linked into + * the correct heap. + * + * Check the texobj base address corresponds to the MemBlock + * range. Check the texobj size (recalculate?) fits within + * the MemBlock. + * + * Count the number of texobj's using this heap. + */ + + foreach ( t, &heap->texture_objects ) { + if ( !check_in_heap( t, heap ) ) { + fprintf( stderr, "%s memory block for texture object @ %p not " + "found in heap #%d\n", + __FUNCTION__, (void *)t, i ); + return GL_FALSE; + } + + + if ( t->totalSize > t->memBlock->size ) { + fprintf( stderr, "%s: Memory block for texture object @ %p is " + "only %u bytes, but %u are required\n", + __FUNCTION__, (void *)t, t->totalSize, t->memBlock->size ); + return GL_FALSE; + } + + textures_in_heap++; + } + + /* Validate the contents of the heap: + * - Ordering + * - Overlaps + * - Bounds + */ + + while ( p != NULL ) { + if (p->reserved) { + fprintf( stderr, "%s: Block (%08x,%x), is reserved?!\n", + __FUNCTION__, p->ofs, p->size ); + return GL_FALSE; + } + + if (p->ofs != last_end) { + fprintf( stderr, "%s: blocks_in_mempool = %d, last_end = %d, p->ofs = %d\n", + __FUNCTION__, blocks_in_mempool, last_end, p->ofs ); + return GL_FALSE; + } + + if (!p->reserved && !p->free) { + blocks_in_mempool++; + } + + last_end = p->ofs + p->size; + p = p->next; + } + + if (textures_in_heap != blocks_in_mempool) { + fprintf( stderr, "%s: Different number of textures objects (%u) and " + "inuse memory blocks (%u)\n", + __FUNCTION__, textures_in_heap, blocks_in_mempool ); + return GL_FALSE; + } + +#if 0 + fprintf( stderr, "%s: textures_in_heap = %u\n", + __FUNCTION__, textures_in_heap ); +#endif + } + + + /* Check swapped texobj's have zero memblocks + */ + i = 0; + foreach ( t, swapped ) { + if ( t->memBlock != NULL ) { + fprintf( stderr, "%s: Swapped texobj %p has non-NULL memblock %p\n", + __FUNCTION__, (void *)t, (void *)t->memBlock ); + return GL_FALSE; + } + i++; + } + +#if 0 + fprintf( stderr, "%s: swapped texture count = %u\n", __FUNCTION__, i ); +#endif + + return GL_TRUE; +} + + + + +/****************************************************************************/ +/** + * Compute which mipmap levels that really need to be sent to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + */ + +void +driCalculateTextureFirstLastLevel( driTextureObject * t ) +{ + struct gl_texture_object * const tObj = t->tObj; + const struct gl_texture_image * const baseImage = + tObj->Image[0][tObj->BaseLevel]; + + /* These must be signed values. MinLod and MaxLod can be negative numbers, + * and having firstLevel and lastLevel as signed prevents the need for + * extra sign checks. + */ + int firstLevel; + int lastLevel; + + /* Yes, this looks overly complicated, but it's all needed. + */ + + switch (tObj->Target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_TEXTURE_3D: + case GL_TEXTURE_CUBE_MAP: + if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) { + /* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL. + */ + + firstLevel = lastLevel = tObj->BaseLevel; + } + else { + firstLevel = tObj->BaseLevel + (GLint)(tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, t->tObj->BaseLevel); + lastLevel = MIN2(lastLevel, t->tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, t->tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + } + break; + case GL_TEXTURE_RECTANGLE_NV: + case GL_TEXTURE_4D_SGIS: + firstLevel = lastLevel = 0; + break; + default: + return; + } + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; +} + + + + +/** + * \name DRI texture formats. Pointers initialized to either the big- or + * little-endian Mesa formats. + */ +/*@{*/ +const struct gl_texture_format *_dri_texformat_rgba8888 = NULL; +const struct gl_texture_format *_dri_texformat_argb8888 = NULL; +const struct gl_texture_format *_dri_texformat_rgb565 = NULL; +const struct gl_texture_format *_dri_texformat_argb4444 = NULL; +const struct gl_texture_format *_dri_texformat_argb1555 = NULL; +const struct gl_texture_format *_dri_texformat_al88 = NULL; +const struct gl_texture_format *_dri_texformat_a8 = &_mesa_texformat_a8; +const struct gl_texture_format *_dri_texformat_ci8 = &_mesa_texformat_ci8; +const struct gl_texture_format *_dri_texformat_i8 = &_mesa_texformat_i8; +const struct gl_texture_format *_dri_texformat_l8 = &_mesa_texformat_l8; +/*@}*/ + + +/** + * Initialize little endian target, host byte order independent texture formats + */ +void +driInitTextureFormats(void) +{ + const GLuint ui = 1; + const GLubyte littleEndian = *((const GLubyte *) &ui); + + if (littleEndian) { + _dri_texformat_rgba8888 = &_mesa_texformat_rgba8888; + _dri_texformat_argb8888 = &_mesa_texformat_argb8888; + _dri_texformat_rgb565 = &_mesa_texformat_rgb565; + _dri_texformat_argb4444 = &_mesa_texformat_argb4444; + _dri_texformat_argb1555 = &_mesa_texformat_argb1555; + _dri_texformat_al88 = &_mesa_texformat_al88; + } + else { + _dri_texformat_rgba8888 = &_mesa_texformat_rgba8888_rev; + _dri_texformat_argb8888 = &_mesa_texformat_argb8888_rev; + _dri_texformat_rgb565 = &_mesa_texformat_rgb565_rev; + _dri_texformat_argb4444 = &_mesa_texformat_argb4444_rev; + _dri_texformat_argb1555 = &_mesa_texformat_argb1555_rev; + _dri_texformat_al88 = &_mesa_texformat_al88_rev; + } +} Index: xc/extras/Mesa/src/mesa/drivers/dri/common/texmem.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/texmem.h:1.1.1.3 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/texmem.h Fri Dec 10 10:06:13 2004 @@ -0,0 +1,310 @@ +/* + * Copyright 2000-2001 VA Linux Systems, Inc. + * (c) Copyright IBM Corporation 2002 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Ian Romanick + * Keith Whitwell + * Kevin E. Martin + * Gareth Hughes + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/texmem.h,v 1.1.1.3 2004/12/10 15:06:13 alanh Exp $ */ + +/** \file texmem.h + * Public interface to the DRI texture memory management routines. + * + * \sa texmem.c + */ + +#ifndef DRI_TEXMEM_H +#define DRI_TEXMEM_H + +#include "mtypes.h" +#include "mm.h" +#include "xf86drm.h" + +struct dri_tex_heap; +typedef struct dri_tex_heap driTexHeap; + +struct dri_texture_object; +typedef struct dri_texture_object driTextureObject; + + +/** + * Base texture object type. Each driver will extend this type with its own + * private data members. + */ + +struct dri_texture_object { + struct dri_texture_object * next; + struct dri_texture_object * prev; + + driTexHeap * heap; /**< Texture heap currently stored in */ + struct gl_texture_object * tObj;/**< Pointer to Mesa texture object + * If NULL, this texture object is a + * "placeholder" object representing + * texture memory in use by another context. + * A placeholder should have a heap and a memBlock. + */ + PMemBlock memBlock; /**< Memory block containing texture */ + unsigned bound; /**< Texture unit currently bound to */ + + unsigned totalSize; /**< Total size of the texture, + * including all mipmap levels + */ + + unsigned dirty_images[6]; /**< Flags for whether or not images + * need to be uploaded to local or + * AGP texture space. One flag set + * for each cube face for cubic + * textures. Bit zero corresponds to + * the base-level, which may or may + * not be the level zero mipmap. + */ + + unsigned timestamp; /**< Timestamp used to + * synchronize with 3d engine + * in hardware where textures + * are uploaded directly to + * the framebuffer. + */ + + unsigned firstLevel; /**< Image in \c tObj->Image[0] that + * corresponds to the base-level of + * this texture object. + */ + + unsigned lastLevel; /**< Last image in \c tObj->Image[0] + * used by the + * current LOD settings of + * this texture object. This + * value must be greater than + * or equal to \c firstLevel. + */ +}; + + +typedef void (destroy_texture_object_t)( void * driverContext, + driTextureObject * t ); + +/** + * Client-private representation of texture memory state. + * + * Clients will place one or more of these structs in their driver + * context struct to manage one or more global texture heaps. + */ + +struct dri_tex_heap { + + /** Client-supplied heap identifier + */ + unsigned heapId; + + /** Pointer to the client's private context + */ + void *driverContext; + + /** Total size of the heap, in bytes + */ + unsigned size; + + /** \brief \f$log_2\f$ of size of single heap region + * + * Each context takes memory from the global texture heap in + * \f$2^{logGranularity}\f$ byte blocks. The value of + * \a logGranularity is based on the amount of memory represented + * by the heap and the maximum number of regions in the SAREA. Given + * \a b bytes of texture memory an \a n regions in the SAREA, + * \a logGranularity will be \f$\lfloor\log_2( b / n )\rfloor\f$. + */ + unsigned logGranularity; + + /** \brief Required alignment of allocations in this heap + * + * The alignment shift is supplied to \a mmAllocMem when memory is + * allocated from this heap. The value of \a alignmentShift will + * typically reflect some require of the hardware. This value has + * \b no \b relation to \a logGranularity. \a alignmentShift is a + * per-context value. + * + * \sa mmAllocMem + */ + unsigned alignmentShift; + + /** Number of elements in global list (the SAREA). + */ + unsigned nrRegions; + + /** Pointer to SAREA \a driTexRegion array + */ + drmTextureRegionPtr global_regions; + + /** Pointer to the texture state age (generation number) in the SAREA + */ + unsigned * global_age; + + /** Local age (generation number) of texture state + */ + unsigned local_age; + + /** Memory heap used to manage texture memory represented by + * this texture heap. + */ + memHeap_t * memory_heap; + + /** List of objects that we currently believe to be in texture + * memory. + */ + driTextureObject texture_objects; + + /** Pointer to the list of texture objects that are not in + * texture memory. + */ + driTextureObject * swapped_objects; + + /** Size of the driver-speicific texture object. + */ + unsigned texture_object_size; + + + /** + * \brief Function to destroy driver-specific texture object data. + * + * This function is supplied by the driver so that the texture manager + * can release all resources associated with a texture object. This + * function should only release driver-specific data. That is, + * \a driDestroyTextureObject will release the texture memory + * associated with the texture object, it will release the memory + * for the texture object itself, and it will unlink the texture + * object from the texture object lists. + * + * \param driverContext Pointer to the driver supplied context + * \param t Texture object that is to be destroyed + * \sa driDestroyTextureObject + */ + + destroy_texture_object_t * destroy_texture_object; + + + /** + */ + unsigned * texture_swaps; + + /** + * Timestamp used to synchronize with 3d engine in hardware + * where textures are uploaded directly to the + * framebuffer. + */ + unsigned timestamp; +}; + + + + +/** + * Called by the client on lock contention to determine whether textures have + * been stolen. If another client has modified a region in which we have + * textures, then we need to figure out which of our textures have been + * removed and update our global LRU. + * + * \param heap Texture heap to be updated + * \hideinitializer + */ + +#define DRI_AGE_TEXTURES( heap ) \ + do { \ + if ( ((heap) != NULL) \ + && ((heap)->local_age != (heap)->global_age[0]) ) \ + driAgeTextures( heap ); \ + } while( 0 ) + + + + +/* This should be called whenever there has been contention on the hardware + * lock. driAgeTextures should not be called directly. Instead, clients + * should use DRI_AGE_TEXTURES, above. + */ + +void driAgeTextures( driTexHeap * heap ); + +void driUpdateTextureLRU( driTextureObject * t ); +void driSwapOutTextureObject( driTextureObject * t ); +void driDestroyTextureObject( driTextureObject * t ); +int driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps, + driTextureObject * t ); + +GLboolean driIsTextureResident( GLcontext * ctx, + struct gl_texture_object * texObj ); + +driTexHeap * driCreateTextureHeap( unsigned heap_id, void * context, + unsigned size, unsigned alignmentShift, unsigned nr_regions, + drmTextureRegionPtr global_regions, unsigned * global_age, + driTextureObject * swapped_objects, unsigned texture_object_size, + destroy_texture_object_t * destroy_tex_obj ); +void driDestroyTextureHeap( driTexHeap * heap ); + +void +driCalculateMaxTextureLevels( driTexHeap * const * heaps, + unsigned nr_heaps, + struct gl_constants * limits, + unsigned max_bytes_per_texel, + unsigned max_2D_size, + unsigned max_3D_size, + unsigned max_cube_size, + unsigned max_rect_size, + unsigned mipmaps_at_once, + int all_textures_one_heap ); + +void +driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter ); + +#define DRI_TEXMGR_DO_TEXTURE_1D 0x0001 +#define DRI_TEXMGR_DO_TEXTURE_2D 0x0002 +#define DRI_TEXMGR_DO_TEXTURE_3D 0x0004 +#define DRI_TEXMGR_DO_TEXTURE_CUBE 0x0008 +#define DRI_TEXMGR_DO_TEXTURE_RECT 0x0010 + +void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped, + GLuint targets ); + +GLboolean driValidateTextureHeaps( driTexHeap * const * texture_heaps, + unsigned nr_heaps, const driTextureObject * swapped ); + +extern void driCalculateTextureFirstLastLevel( driTextureObject * t ); + + +extern const struct gl_texture_format *_dri_texformat_rgba8888; +extern const struct gl_texture_format *_dri_texformat_argb8888; +extern const struct gl_texture_format *_dri_texformat_rgb565; +extern const struct gl_texture_format *_dri_texformat_argb4444; +extern const struct gl_texture_format *_dri_texformat_argb1555; +extern const struct gl_texture_format *_dri_texformat_al88; +extern const struct gl_texture_format *_dri_texformat_a8; +extern const struct gl_texture_format *_dri_texformat_ci8; +extern const struct gl_texture_format *_dri_texformat_i8; +extern const struct gl_texture_format *_dri_texformat_l8; + +extern void driInitTextureFormats( void ); + +#endif /* DRI_TEXMEM_H */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/utils.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/utils.c:1.4 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/utils.c Mon Dec 13 17:40:49 2004 @@ -0,0 +1,531 @@ +/* + * (C) Copyright IBM Corporation 2002, 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Ian Romanick + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/utils.c,v 1.4 2004/12/13 22:40:49 tsi Exp $ */ + +#include +#include +#include "mtypes.h" +#include "extensions.h" +#include "utils.h" + +#if !defined( DRI_NEW_INTERFACE_ONLY ) +#include "xf86dri.h" /* For XF86DRIQueryVersion prototype. */ +#endif + +#if defined(USE_X86_ASM) +#include "x86/common_x86_asm.h" +#endif + +unsigned +driParseDebugString( const char * debug, + const struct dri_debug_control * control ) +{ + unsigned flag; + + + flag = 0; + if ( debug != NULL ) { + while( control->string != NULL ) { + if ( !strcmp( debug, "all" ) || + strstr( debug, control->string ) != NULL ) { + flag |= control->flag; + } + + control++; + } + } + + return flag; +} + + + + +unsigned +driGetRendererString( char * buffer, const char * hardware_name, + const char * driver_date, GLuint agp_mode ) +{ +#ifdef USE_X86_ASM + char * x86_str = ""; + char * mmx_str = ""; + char * tdnow_str = ""; + char * sse_str = ""; +#endif + unsigned offset; + + + offset = sprintf( buffer, "Mesa DRI %s %s", hardware_name, driver_date ); + + /* Append any AGP-specific information. + */ + switch ( agp_mode ) { + case 1: + case 2: + case 4: + case 8: + offset += sprintf( & buffer[ offset ], " AGP %ux", agp_mode ); + break; + + default: + break; + } + + /* Append any CPU-specific information. + */ +#ifdef USE_X86_ASM + if ( _mesa_x86_cpu_features ) { + x86_str = " x86"; + } +# ifdef USE_MMX_ASM + if ( cpu_has_mmx ) { + mmx_str = (cpu_has_mmxext) ? "/MMX+" : "/MMX"; + } +# endif +# ifdef USE_3DNOW_ASM + if ( cpu_has_3dnow ) { + tdnow_str = (cpu_has_3dnowext) ? "/3DNow!+" : "/3DNow!"; + } +# endif +# ifdef USE_SSE_ASM + if ( cpu_has_xmm ) { + sse_str = (cpu_has_xmm2) ? "/SSE2" : "/SSE"; + } +# endif + + offset += sprintf( & buffer[ offset ], "%s%s%s%s", + x86_str, mmx_str, tdnow_str, sse_str ); + +#elif defined(USE_SPARC_ASM) + + offset += sprintf( & buffer[ offset ], " Sparc" ); + +#endif + + return offset; +} + + + + +void driInitExtensions( GLcontext * ctx, + const char * const extensions_to_enable[], + GLboolean enable_imaging ) +{ + unsigned i; + + if ( enable_imaging ) { + _mesa_enable_imaging_extensions( ctx ); + } + + for ( i = 0 ; extensions_to_enable[i] != NULL ; i++ ) { + _mesa_enable_extension( ctx, extensions_to_enable[i] ); + } +} + + + + +#ifndef DRI_NEW_INTERFACE_ONLY +/** + * Utility function used by drivers to test the verions of other components. + * + * \deprecated + * All drivers using the new interface should use \c driCheckDriDdxVersions2 + * instead. This function is implemented using a call that is not available + * to drivers using the new interface. Furthermore, the information gained + * by this call (the DRI and DDX version information) is already provided to + * the driver via the new interface. + */ +GLboolean +driCheckDriDdxDrmVersions(__DRIscreenPrivate *sPriv, + const char * driver_name, + int dri_major, int dri_minor, + int ddx_major, int ddx_minor, + int drm_major, int drm_minor) +{ + static const char format[] = "%s DRI driver expected %s version %d.%d.x " + "but got version %d.%d.%d"; + int major, minor, patch; + + /* Check the DRI version */ + if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { + if (major != dri_major || minor < dri_minor) { + __driUtilMessage(format, driver_name, "DRI", dri_major, dri_minor, + major, minor, patch); + return GL_FALSE; + } + } + + /* Check that the DDX driver version is compatible */ + if (sPriv->ddxMajor != ddx_major || sPriv->ddxMinor < ddx_minor) { + __driUtilMessage(format, driver_name, "DDX", ddx_major, ddx_minor, + sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if (sPriv->drmMajor != drm_major || sPriv->drmMinor < drm_minor) { + __driUtilMessage(format, driver_name, "DRM", drm_major, drm_minor, + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + return GL_FALSE; + } + + return GL_TRUE; +} +#endif /* DRI_NEW_INTERFACE_ONLY */ + +/** + * Utility function used by drivers to test the verions of other components. + * + * If one of the version requirements is not met, a message is logged using + * \c __driUtilMessage. + * + * \param driver_name Name of the driver. Used in error messages. + * \param driActual Actual DRI version supplied __driCreateNewScreen. + * \param driExpected Minimum DRI version required by the driver. + * \param ddxActual Actual DDX version supplied __driCreateNewScreen. + * \param ddxExpected Minimum DDX version required by the driver. + * \param drmActual Actual DRM version supplied __driCreateNewScreen. + * \param drmExpected Minimum DRM version required by the driver. + * + * \returns \c GL_TRUE if all version requirements are met. Otherwise, + * \c GL_FALSE is returned. + * + * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions, __driUtilMessage + */ +GLboolean +driCheckDriDdxDrmVersions2(const char * driver_name, + const __DRIversion * driActual, + const __DRIversion * driExpected, + const __DRIversion * ddxActual, + const __DRIversion * ddxExpected, + const __DRIversion * drmActual, + const __DRIversion * drmExpected) +{ + static const char format[] = "%s DRI driver expected %s version %d.%d.x " + "but got version %d.%d.%d"; + + + /* Check the DRI version */ + if ( (driActual->major != driExpected->major) + || (driActual->minor < driExpected->minor) ) { + __driUtilMessage(format, driver_name, "DRI", + driExpected->major, driExpected->minor, + driActual->major, driActual->minor, driActual->patch); + return GL_FALSE; + } + + /* Check that the DDX driver version is compatible */ + if ( (ddxActual->major != ddxExpected->major) + || (ddxActual->minor < ddxExpected->minor) ) { + __driUtilMessage(format, driver_name, "DDX", + ddxExpected->major, ddxExpected->minor, + ddxActual->major, ddxActual->minor, ddxActual->patch); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( (drmActual->major != drmExpected->major) + || (drmActual->minor < drmExpected->minor) ) { + __driUtilMessage(format, driver_name, "DRM", + drmExpected->major, drmExpected->minor, + drmActual->major, drmActual->minor, drmActual->patch); + return GL_FALSE; + } + + return GL_TRUE; +} + + +GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, + GLint *x, GLint *y, + GLsizei *width, GLsizei *height ) +{ + /* left clipping */ + if (*x < buffer->_Xmin) { + *width -= (buffer->_Xmin - *x); + *x = buffer->_Xmin; + } + + /* right clipping */ + if (*x + *width > buffer->_Xmax) + *width -= (*x + *width - buffer->_Xmax - 1); + + if (*width <= 0) + return GL_FALSE; + + /* bottom clipping */ + if (*y < buffer->_Ymin) { + *height -= (buffer->_Ymin - *y); + *y = buffer->_Ymin; + } + + /* top clipping */ + if (*y + *height > buffer->_Ymax) + *height -= (*y + *height - buffer->_Ymax - 1); + + if (*height <= 0) + return GL_FALSE; + + return GL_TRUE; +} + + + +/** + * Creates a set of \c __GLcontextModes that a driver will expose. + * + * A set of \c __GLcontextModes will be created based on the supplied + * parameters. The number of modes processed will be 2 * + * \c num_depth_stencil_bits * \c num_db_modes. + * + * For the most part, data is just copied from \c depth_bits, \c stencil_bits, + * \c db_modes, and \c visType into each \c __GLcontextModes element. + * However, the meanings of \c fb_format and \c fb_type require further + * explanation. The \c fb_format specifies which color components are in + * each pixel and what the default order is. For example, \c GL_RGB specifies + * that red, green, blue are available and red is in the "most significant" + * position and blue is in the "least significant". The \c fb_type specifies + * the bit sizes of each component and the actual ordering. For example, if + * \c GL_UNSIGNED_SHORT_5_6_5_REV is specified with \c GL_RGB, bits [15:11] + * are the blue value, bits [10:5] are the green value, and bits [4:0] are + * the red value. + * + * One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either + * of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the + * \c __GLcontextModes structure is \b identical to the \c GL_RGBA or + * \c GL_BGRA case, except the \c alphaMask is zero. This means that, as + * far as this routine is concerned, \c GL_RGB with \c GL_UNSIGNED_INT_8_8_8_8 + * still uses 32-bits. + * + * If in doubt, look at the tables used in the function. + * + * \param ptr_to_modes Pointer to a pointer to a linked list of + * \c __GLcontextModes. Upon completion, a pointer to + * the next element to be process will be stored here. + * If the function fails and returns \c GL_FALSE, this + * value will be unmodified, but some elements in the + * linked list may be modified. + * \param fb_format Format of the framebuffer. Currently only \c GL_RGB, + * \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported. + * \param fb_type Type of the pixels in the framebuffer. Currently only + * \c GL_UNSIGNED_SHORT_5_6_5, + * \c GL_UNSIGNED_SHORT_5_6_5_REV, + * \c GL_UNSIGNED_INT_8_8_8_8, and + * \c GL_UNSIGNED_INT_8_8_8_8_REV are supported. + * \param depth_bits Array of depth buffer sizes to be exposed. + * \param stencil_bits Array of stencil buffer sizes to be exposed. + * \param num_depth_stencil_bits Number of entries in both \c depth_bits and + * \c stencil_bits. + * \param db_modes Array of buffer swap modes. If an element has a + * value of \c GLX_NONE, then it represents a + * single-buffered mode. Other valid values are + * \c GLX_SWAP_EXCHANGE_OML, \c GLX_SWAP_COPY_OML, and + * \c GLX_SWAP_UNDEFINED_OML. See the + * GLX_OML_swap_method extension spec for more details. + * \param num_db_modes Number of entries in \c db_modes. + * \param visType GLX visual type. Usually either \c GLX_TRUE_COLOR or + * \c GLX_DIRECT_COLOR. + * + * \returns + * \c GL_TRUE on success or \c GL_FALSE on failure. Currently the only + * cause of failure is a bad parameter (i.e., unsupported \c fb_format or + * \c fb_type). + * + * \todo + * There is currently no way to support packed RGB modes (i.e., modes with + * exactly 3 bytes per pixel) or floating-point modes. This could probably + * be done by creating some new, private enums with clever names likes + * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32, + * \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it. + */ +GLboolean +driFillInModes( __GLcontextModes ** ptr_to_modes, + GLenum fb_format, GLenum fb_type, + const u_int8_t * depth_bits, const u_int8_t * stencil_bits, + unsigned num_depth_stencil_bits, + const GLenum * db_modes, unsigned num_db_modes, + int visType ) +{ + static const u_int8_t bits_table[3][4] = { + /* R G B A */ + { 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */ + { 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */ + { 8, 8, 8, 8 } /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */ + }; + + /* The following arrays are all indexed by the fb_type masked with 0x07. + * Given the four supported fb_type values, this results in valid array + * indices of 3, 4, 5, and 7. + */ + static const u_int32_t masks_table_rgb[8][4] = { + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ + { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ + { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 }, /* 8_8_8_8 */ + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 } /* 8_8_8_8_REV */ + }; + + static const u_int32_t masks_table_rgba[8][4] = { + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */ + { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */ + { 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF }, /* 8_8_8_8 */ + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }, /* 8_8_8_8_REV */ + }; + + static const u_int32_t masks_table_bgr[8][4] = { + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ + { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ + { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 }, /* 8_8_8_8 */ + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, /* 8_8_8_8_REV */ + }; + + static const u_int32_t masks_table_bgra[8][4] = { + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */ + { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */ + { 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF }, /* 8_8_8_8 */ + { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */ + }; + + static const u_int8_t bytes_per_pixel[8] = { + 0, 0, 0, 2, 2, 4, 0, 4 + }; + + const u_int8_t * bits; + const u_int32_t * masks; + const int index = fb_type & 0x07; + __GLcontextModes * modes = *ptr_to_modes; + unsigned i; + unsigned j; + unsigned k; + + + if ( bytes_per_pixel[ index ] == 0 ) { + fprintf( stderr, "[%s:%u] Framebuffer type 0x%04x has 0 bytes per pixel.\n", + __FUNCTION__, __LINE__, fb_type ); + return GL_FALSE; + } + + + /* Valid types are GL_UNSIGNED_SHORT_5_6_5 and GL_UNSIGNED_INT_8_8_8_8 and + * the _REV versions. + * + * Valid formats are GL_RGBA, GL_RGB, and GL_BGRA. + */ + + switch ( fb_format ) { + case GL_RGB: + bits = (bytes_per_pixel[ index ] == 2) + ? bits_table[0] : bits_table[1]; + masks = masks_table_rgb[ index ]; + break; + + case GL_RGBA: + bits = (bytes_per_pixel[ index ] == 2) + ? bits_table[0] : bits_table[2]; + masks = masks_table_rgba[ index ]; + break; + + case GL_BGR: + bits = (bytes_per_pixel[ index ] == 2) + ? bits_table[0] : bits_table[1]; + masks = masks_table_bgr[ index ]; + break; + + case GL_BGRA: + bits = (bytes_per_pixel[ index ] == 2) + ? bits_table[0] : bits_table[2]; + masks = masks_table_bgra[ index ]; + break; + + default: + fprintf( stderr, "[%s:%u] Framebuffer format 0x%04x is not GL_RGB, GL_RGBA, GL_BGR, or GL_BGRA.\n", + __FUNCTION__, __LINE__, fb_format ); + return GL_FALSE; + } + + + for ( k = 0 ; k < num_depth_stencil_bits ; k++ ) { + for ( i = 0 ; i < num_db_modes ; i++ ) { + for ( j = 0 ; j < 2 ; j++ ) { + + modes->redBits = bits[0]; + modes->greenBits = bits[1]; + modes->blueBits = bits[2]; + modes->alphaBits = bits[3]; + modes->redMask = masks[0]; + modes->greenMask = masks[1]; + modes->blueMask = masks[2]; + modes->alphaMask = masks[3]; + modes->rgbBits = modes->redBits + modes->greenBits + + modes->blueBits + modes->alphaBits; + + modes->accumRedBits = 16 * j; + modes->accumGreenBits = 16 * j; + modes->accumBlueBits = 16 * j; + modes->accumAlphaBits = (masks[3] != 0) ? 16 * j : 0; + modes->visualRating = (j == 0) ? GLX_NONE : GLX_SLOW_CONFIG; + + modes->stencilBits = stencil_bits[k]; + modes->depthBits = depth_bits[k]; + + modes->visualType = visType; + modes->renderType = GLX_RGBA_BIT; + modes->drawableType = GLX_WINDOW_BIT; + modes->rgbMode = GL_TRUE; + + if ( db_modes[i] == GLX_NONE ) { + modes->doubleBufferMode = GL_FALSE; + } + else { + modes->doubleBufferMode = GL_TRUE; + modes->swapMethod = db_modes[i]; + } + + modes = modes->next; + } + } + } + + *ptr_to_modes = modes; + return GL_TRUE; +} Index: xc/extras/Mesa/src/mesa/drivers/dri/common/utils.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/utils.h:1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/utils.h Mon Dec 13 17:40:49 2004 @@ -0,0 +1,71 @@ +/* + * (C) Copyright IBM Corporation 2002, 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Ian Romanick + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/utils.h,v 1.2 2004/12/13 22:40:49 tsi Exp $ */ + +#ifndef DRI_DEBUG_H +#define DRI_DEBUG_H + +#include "context.h" +#include "dri_util.h" + +struct dri_debug_control +{ + const char * string; + unsigned flag; +}; + +extern unsigned driParseDebugString( const char * debug, + const struct dri_debug_control * control ); + +extern unsigned driGetRendererString( char * buffer, + const char * hardware_name, const char * driver_date, GLuint agp_mode ); + +extern void driInitExtensions( GLcontext * ctx, + const char * const card_extensions[], GLboolean enable_imaging ); + +#ifndef DRI_NEW_INTERFACE_ONLY +extern GLboolean driCheckDriDdxDrmVersions( __DRIscreenPrivate *sPriv, + const char * driver_name, int dri_major, int dri_minor, + int ddx_major, int ddx_minor, int drm_major, int drm_minor ); +#endif + +extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name, + const __DRIversion * driActual, const __DRIversion * driExpected, + const __DRIversion * ddxActual, const __DRIversion * ddxExpected, + const __DRIversion * drmActual, const __DRIversion * drmExpected); + +extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer, + GLint *x, GLint *y, + GLsizei *width, GLsizei *height ); + +extern GLboolean driFillInModes( __GLcontextModes ** modes, + GLenum fb_format, GLenum fb_type, + const u_int8_t * depth_bits, const u_int8_t * stencil_bits, + unsigned num_depth_stencil_bits, + const GLenum * db_modes, unsigned num_db_modes, int visType ); + +#endif /* DRI_DEBUG_H */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.c:1.1.1.2 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.c Fri Dec 10 10:06:14 2004 @@ -0,0 +1,349 @@ +/* -*- mode: c; c-basic-offset: 3 -*- */ +/* + * (c) Copyright IBM Corporation 2002 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Ian Romanick + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.c,v 1.1.1.2 2004/12/10 15:06:14 alanh Exp $ */ + +#include "glheader.h" +#include "xf86drm.h" +#include "mtypes.h" +#include "macros.h" +#include "dd.h" +#include "vblank.h" +#include "xmlpool.h" + + +/****************************************************************************/ +/** + * Get the current MSC refresh counter. + * + * Stores the 64-bit count of vertical refreshes since some (arbitrary) + * point in time in \c count. Unless the value wraps around, which it + * may, it will never decrease. + * + * \warning This function is called from \c glXGetVideoSyncSGI, which expects + * a \c count of type \c unsigned (32-bit), and \c glXGetSyncValuesOML, which + * expects a \c count of type \c int64_t (signed 64-bit). The kernel ioctl + * currently always returns a \c sequence of type \c unsigned. + * + * \param priv Pointer to the DRI screen private struct. + * \param count Storage to hold MSC counter. + * \return Zero is returned on success. A negative errno value + * is returned on failure. + */ +int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ) +{ + drmVBlank vbl; + int ret; + + /* Don't wait for anything. Just get the current refresh count. */ + + vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.sequence = 0; + + ret = drmWaitVBlank( priv->fd, &vbl ); + *count = (int64_t)vbl.reply.sequence; + + return ret; +} + + +/****************************************************************************/ +/** + * Wait for a specified refresh count. This implements most of the + * functionality of \c glXWaitForMscOML from the GLX_OML_sync_control spec. + * Waits for the \c target_msc refresh. If that has already passed, it + * waits until \f$(MSC \bmod divisor)\f$ is equal to \c remainder. If + * \c target_msc is 0, use the behavior of glXWaitVideoSyncSGI(), which + * omits the initial check against a target MSC value. + * + * This function is actually something of a hack. The problem is that, at + * the time of this writing, none of the existing DRM modules support an + * ioctl that returns a 64-bit count (at least not on 32-bit platforms). + * However, this function exists to support a GLX function that requires + * the use of 64-bit counts. As such, there is a little bit of ugly + * hackery at the end of this function to make the 32-bit count act like + * a 64-bit count. There are still some cases where this will break, but + * I believe it catches the most common cases. + * + * The real solution is to provide an ioctl that uses a 64-bit count. + * + * \param dpy Pointer to the \c Display. + * \param priv Pointer to the DRI drawable private. + * \param target_msc Desired refresh count to wait for. A value of 0 + * means to use the glXWaitVideoSyncSGI() behavior. + * \param divisor MSC divisor if \c target_msc is already reached. + * \param remainder Desired MSC remainder if \c target_msc is already + * reached. + * \param msc Buffer to hold MSC when done waiting. + * + * \return Zero on success or \c GLX_BAD_CONTEXT on failure. + */ + +int driWaitForMSC32( __DRIdrawablePrivate *priv, + int64_t target_msc, int64_t divisor, int64_t remainder, + int64_t * msc ) +{ + drmVBlank vbl; + + + if ( divisor != 0 ) { + unsigned int target = (unsigned int)target_msc; + unsigned int next = target; + unsigned int r; + int dont_wait = (target_msc == 0); + + do { + /* dont_wait means we're using the glXWaitVideoSyncSGI() behavior. + * The first time around, just get the current count and proceed + * to the test for (MSC % divisor) == remainder. + */ + vbl.request.type = dont_wait ? DRM_VBLANK_RELATIVE : + DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = next; + + if ( drmWaitVBlank( priv->driScreenPriv->fd, &vbl ) != 0 ) { + /* FIXME: This doesn't seem like the right thing to return here. + */ + return GLX_BAD_CONTEXT; + } + + dont_wait = 0; + if (target_msc != 0 && vbl.reply.sequence == target) + break; + + /* Assuming the wait-done test fails, the next refresh to wait for + * will be one that satisfies (MSC % divisor) == remainder. The + * value (MSC - (MSC % divisor) + remainder) is the refresh value + * closest to the current value that would satisfy the equation. + * If this refresh has already happened, we add divisor to obtain + * the next refresh after the current one that will satisfy it. + */ + r = (vbl.reply.sequence % (unsigned int)divisor); + next = (vbl.reply.sequence - r + (unsigned int)remainder); + if (next <= vbl.reply.sequence) next += (unsigned int)divisor; + + } while ( r != (unsigned int)remainder ); + } + else { + /* If the \c divisor is zero, just wait until the MSC is greater + * than or equal to \c target_msc. + */ + + vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = target_msc; + + if ( drmWaitVBlank( priv->driScreenPriv->fd, &vbl ) != 0 ) { + /* FIXME: This doesn't seem like the right thing to return here. + */ + return GLX_BAD_CONTEXT; + } + } + + *msc = (target_msc & 0xffffffff00000000LL); + *msc |= vbl.reply.sequence; + if ( *msc < target_msc ) { + *msc += 0x0000000100000000LL; + } + + return 0; +} + + +/****************************************************************************/ +/** + * Gets a set of default vertical-blank-wait flags based on the internal GLX + * API version and several configuration options. + */ + +GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ) +{ + GLuint flags = 0; + int vblank_mode; + + flags |= (driCompareGLXAPIVersion( 20030317 ) >= 0) + ? VBLANK_FLAG_INTERVAL : 0; + + if ( driCheckOption( optionCache, "vblank_mode", DRI_ENUM ) ) + vblank_mode = driQueryOptioni( optionCache, "vblank_mode" ); + else + vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; + + switch (vblank_mode) { + case DRI_CONF_VBLANK_NEVER: + flags = 0; + break; + case DRI_CONF_VBLANK_DEF_INTERVAL_0: + break; + case DRI_CONF_VBLANK_DEF_INTERVAL_1: + flags |= VBLANK_FLAG_THROTTLE; + break; + case DRI_CONF_VBLANK_ALWAYS_SYNC: + flags |= VBLANK_FLAG_SYNC; + break; + } + + return flags; +} + + +/****************************************************************************/ +/** + * Sets the default swap interval when the drawable is first bound to a + * direct rendering context. + */ + +void driDrawableInitVBlank( __DRIdrawablePrivate *priv, GLuint flags ) +{ + if ( priv->pdraw->swap_interval == (unsigned)-1 ) { + priv->pdraw->swap_interval = (flags & VBLANK_FLAG_THROTTLE) != 0 ? 1 : 0; + } +} + + +/****************************************************************************/ +/** + * Wrapper to call \c drmWaitVBlank. The main purpose of this function is to + * wrap the error message logging. The error message should only be logged + * the first time the \c drmWaitVBlank fails. If \c drmWaitVBlank is + * successful, \c vbl_seq will be set the sequence value in the reply. + * + * \param vbl Pointer to drmVBlank packet desribing how to wait. + * \param vbl_seq Location to store the current refresh counter. + * \param fd File descriptor use to call into the DRM. + * \return Zero on success or -1 on failure. + */ + +static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd ) +{ + int ret; + + + ret = drmWaitVBlank( fd, vbl ); + if ( ret != 0 ) { + static GLboolean first_time = GL_TRUE; + + if ( first_time ) { + fprintf(stderr, + "%s: drmWaitVBlank returned %d, IRQs don't seem to be" + " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" + " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); + first_time = GL_FALSE; + } + + return -1; + } + + *vbl_seq = vbl->reply.sequence; + return 0; +} + + +/****************************************************************************/ +/** + * Waits for the vertical blank for use with glXSwapBuffers. + * + * \param vbl_seq Vertical blank sequence number (MSC) after the last buffer + * swap. Updated after this wait. + * \param flags \c VBLANK_FLAG bits that control how long to wait. + * \param missed_deadline Set to \c GL_TRUE if the MSC after waiting is later + * than the "target" based on \c flags. The idea is that if + * \c missed_deadline is set, then the application is not + * achieving its desired framerate. + * \return Zero on success, -1 on error. + */ + +int +driWaitForVBlank( const __DRIdrawablePrivate *priv, GLuint * vbl_seq, + GLuint flags, GLboolean * missed_deadline ) +{ + drmVBlank vbl; + unsigned original_seq; + unsigned deadline; + unsigned interval; + + + *missed_deadline = GL_FALSE; + if ( (flags & (VBLANK_FLAG_INTERVAL | + VBLANK_FLAG_THROTTLE | + VBLANK_FLAG_SYNC)) == 0 || + (flags & VBLANK_FLAG_NO_IRQ) != 0 ) { + return 0; + } + + + /* VBLANK_FLAG_SYNC means to wait for at least one vertical blank. If + * that flag is not set, do a fake wait for zero vertical blanking + * periods so that we can get the current MSC. + * + * VBLANK_FLAG_INTERVAL and VBLANK_FLAG_THROTTLE mean to wait for at + * least one vertical blank since the last wait. Since do_wait modifies + * vbl_seq, we have to save the original value of vbl_seq for the + * VBLANK_FLAG_INTERVAL / VBLANK_FLAG_THROTTLE calculation later. + */ + + original_seq = *vbl_seq; + + vbl.request.sequence = ((flags & VBLANK_FLAG_SYNC) != 0) ? 1 : 0; + vbl.request.type = DRM_VBLANK_RELATIVE; + + if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { + return -1; + } + + + vbl.request.type = DRM_VBLANK_ABSOLUTE; + + if ( (flags & VBLANK_FLAG_INTERVAL) != 0 ) { + interval = priv->pdraw->swap_interval; + /* this must have been initialized when the drawable was first bound + * to a direct rendering context. */ + assert ( interval != (unsigned)-1 ); + } + else if ( (flags & VBLANK_FLAG_THROTTLE) != 0 ) { + interval = 1; + } + else { + interval = 0; + } + + + /* Wait until the next vertical blank. If the interval is zero, then + * the deadline is one vertical blank after the previous wait. + */ + + vbl.request.sequence = original_seq + interval; + if ( *vbl_seq < vbl.request.sequence ) { + if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { + return -1; + } + } + + deadline = original_seq + ((interval == 0) ? 1 : interval); + *missed_deadline = ( *vbl_seq > deadline ); + + return 0; +} Index: xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.h diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.h:1.5 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.h Fri Dec 10 10:30:09 2004 @@ -0,0 +1,69 @@ +/* -*- mode: c; c-basic-offset: 3 -*- */ +/* + * (c) Copyright IBM Corporation 2002 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Ian Romanick + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/vblank.h,v 1.5 2004/12/10 15:30:09 alanh Exp $ */ + +#ifndef DRI_VBLANK_H +#define DRI_VBLANK_H + +#include "context.h" +#include "dri_util.h" +#include "xmlconfig.h" + +#define VBLANK_FLAG_INTERVAL (1U << 0) /* Respect the swap_interval setting + */ +#define VBLANK_FLAG_THROTTLE (1U << 1) /* Wait 1 refresh since last call. + */ +#define VBLANK_FLAG_SYNC (1U << 2) /* Sync to the next refresh. + */ +#define VBLANK_FLAG_NO_IRQ (1U << 7) /* DRM has no IRQ to wait on. + */ + +extern int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ); +extern int driWaitForMSC32( __DRIdrawablePrivate *priv, + int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ); +extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ); +extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv, GLuint flags ); +extern int driWaitForVBlank( const __DRIdrawablePrivate *priv, + GLuint * vbl_seq, GLuint flags, GLboolean * missed_deadline ); + +#undef usleep +#include /* for usleep() */ +#include /* for sched_yield() */ + +#ifdef linux +#include /* for sched_yield() */ +#endif + +#define DO_USLEEP(nr) \ + do { \ + if (0) fprintf(stderr, "%s: usleep for %u\n", __FUNCTION__, nr ); \ + if (1) usleep( nr ); \ + sched_yield(); \ + } while( 0 ) + +#endif /* DRI_VBLANK_H */ Index: xc/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c diff -u /dev/null xc/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c:1.5 --- /dev/null Wed Mar 16 21:01:01 2005 +++ xc/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c Fri Dec 10 10:41:00 2004 @@ -0,0 +1,1003 @@ +/* + * XML DRI client-side driver configuration + * Copyright (C) 2003 Felix Kuehling + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ +/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/common/xmlconfig.c,v 1.5 2004/12/10 15:41:00 alanh Exp $ */ +/** + * \file xmlconfig.c + * \brief Driver-independent client-side part of the XML configuration + * \author Felix Kuehling + */ + +#include "glheader.h" + +#include +#include +#include +#include +#include +#include +#include "imports.h" +#include "dri_util.h" +#include "xmlconfig.h" + +/* + * OS dependent ways of getting the name of the running program + */ +#if (defined(__unix__) || defined(unix)) && !defined(USG) +#include +#endif + +#undef GET_PROGRAM_NAME + +#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__) +# if !defined(__GLIBC__) || (__GLIBC__ < 2) +/* These aren't declared in any libc5 header */ +extern char *program_invocation_name, *program_invocation_short_name; +# endif +# define GET_PROGRAM_NAME() program_invocation_short_name +#elif defined(__FreeBSD__) && (__FreeBSD__ >= 2) +# include +# if (__FreeBSD_version >= 440000) +# include +# define GET_PROGRAM_NAME() getprogname() +# endif +#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100) +# include +# define GET_PROGRAM_NAME() getprogname() +#endif + +#if !defined(GET_PROGRAM_NAME) +# if defined(OpenBSD) || defined(NetBSD) || defined(__UCLIBC__) +/* This is a hack. It's said to work on OpenBSD, NetBSD and GNU. + * Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's + * used as a last resort, if there is no documented facility available. */ +static const char *__getProgramName () { + extern const char *__progname; + char * arg = strrchr(__progname, '/'); + if (arg) + return arg+1; + else + return __progname; +} +# define GET_PROGRAM_NAME() __getProgramName() +# else +# define GET_PROGRAM_NAME() "" +# warning "Per application configuration won't work with your OS version." +# endif +#endif + +/** \brief Find an option in an option cache with the name as key */ +static GLuint findOption (const driOptionCache *cache, const char *name) { + GLuint len = strlen (name); + GLuint size = 1 << cache->tableSize, mask = size - 1; + GLuint hash = 0; + GLuint i, shift; + + /* compute a hash from the variable length name */ + for (i = 0, shift = 0; i < len; ++i, shift = (shift+8) & 31) + hash += (GLuint)name[i] << shift; + hash *= hash; + hash = (hash >> (16-cache->tableSize/2)) & mask; + + /* this is just the starting point of the linear search for the option */ + for (i = 0; i < size; ++i, hash = (hash+1) & mask) { + /* if we hit an empty entry then the option is not defined (yet) */ + if (cache->info[hash].name == 0) + break; + else if (!strcmp (name, cache->info[hash].name)) + break; + } + /* this assertion fails if the hash table is full */ + assert (i < size); + + return hash; +} + +/** \brief Count the real number of options in an option cache */ +static GLuint countOptions (const driOptionCache *cache) { + GLuint size = 1 << cache->tableSize; + GLuint i, count = 0; + for (i = 0; i < size; ++i) + if (cache->info[i].name) + count++; + return count; +} + +/** \brief Like strdup but using MALLOC and with error checking. */ +#define XSTRDUP(dest,source) do { \ + GLuint len = strlen (source); \ + if (!(dest = MALLOC (len+1))) { \ + fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__); \ + abort(); \ + } \ + memcpy (dest, source, len+1); \ +} while (0) + +static int compare (const void *a, const void *b) { + return strcmp (*(char *const*)a, *(char *const*)b); +} +/** \brief Binary search in a string array. */ +static GLuint bsearchStr (const XML_Char *name, + const XML_Char *elems[], GLuint count) { + const XML_Char **found; + found = bsearch (&name, elems, count, sizeof (XML_Char *), compare); + if (found) + return found - elems; + else + return count; +} + +/** \brief Locale-independent integer parser. + * + * Works similar to strtol. Leading space is NOT skipped. The input + * number may have an optional sign. Radix is specified by base. If + * base is 0 then decimal is assumed unless the input number is + * prefixed by 0x or 0X for hexadecimal or 0 for octal. After + * returning tail points to the first character that is not part of + * the integer number. If no number was found then tail points to the + * start of the input string. */ +static GLint strToI (const XML_Char *string, const XML_Char **tail, int base) { + GLint radix = base == 0 ? 10 : base; + GLint result = 0; + GLint sign = 1; + GLboolean numberFound = GL_FALSE; + const XML_Char *start = string; + + assert (radix >= 2 && radix <= 36); + + if (*string == '-') { + sign = -1; + string++; + } else if (*string == '+') + string++; + if (base == 0 && *string == '0') { + numberFound = GL_TRUE; + if (*(string+1) == 'x' || *(string+1) == 'X') { + radix = 16; + string += 2; + } else { + radix = 8; + string++; + } + } + do { + GLint digit = -1; + if (radix <= 10) { + if (*string >= '0' && *string < '0' + radix) + digit = *string - '0'; + } else { + if (*string >= '0' && *string <= '9') + digit = *string - '0'; + else if (*string >= 'a' && *string < 'a' + radix - 10) + digit = *string - 'a' + 10; + else if (*string >= 'A' && *string < 'A' + radix - 10) + digit = *string - 'A' + 10; + } + if (digit != -1) { + numberFound = GL_TRUE; + result = radix*result + digit; + string++; + } else + break; + } while (GL_TRUE); + *tail = numberFound ? string : start; + return sign * result; +} + +/** \brief Locale-independent floating-point parser. + * + * Works similar to strtod. Leading space is NOT skipped. The input + * number may have an optional sign. '.' is interpreted as decimal + * point and may occor at most once. Optionally the number may end in + * [eE], where is an integer as recognized by + * strToI. In that case the result is number * 10^exponent. After + * returning tail points to the first character that is not part of + * the floating point number. If no number was found then tail points + * to the start of the input string. + * + * Uses two passes for maximum accuracy. */ +static GLfloat strToF (const XML_Char *string, const XML_Char **tail) { + GLint nDigits = 0, pointPos, exponent; + GLfloat sign = 1.0f, result = 0.0f, scale; + const XML_Char *start = string, *numStart; + + /* sign */ + if (*string == '-') { + sign = -1.0f; + string++; + } else if (*string == '+') + string++; + + /* first pass: determine position of decimal point, number of + * digits, exponent and the end of the number. */ + numStart = string; + while (*string >= '0' && *string <= '9') { + string++; + nDigits++; + } + pointPos = nDigits; + if (*string == '.') { + string++; + while (*string >= '0' && *string <= '9') { + string++; + nDigits++; + } + } + if (nDigits == 0) { + /* no digits, no number */ + *tail = start; + return 0.0f; + } + *tail = string; + if (*string == 'e' || *string == 'E') { + const XML_Char *expTail; + exponent = strToI (string+1, &expTail, 10); + if (expTail == string+1) + exponent = 0; + else + *tail = expTail; + } else + exponent = 0; + string = numStart; + + /* scale of the first digit */ + scale = sign * (GLfloat)pow (10.0, (GLdouble)(pointPos-1 + exponent)); + + /* second pass: parse digits */ + do { + if (*string != '.') { + assert (*string >= '0' && *string <= '9'); + result += scale * (GLfloat)(*string - '0'); + scale *= 0.1f; + nDigits--; + } + string++; + } while (nDigits > 0); + + return result; +} + +/** \brief Parse a value of a given type. */ +static GLboolean parseValue (driOptionValue *v, driOptionType type, + const XML_Char *string) { + const XML_Char *tail; + /* skip leading white-space */ + string += strspn (string, " \f\n\r\t\v"); + switch (type) { + case DRI_BOOL: + if (!strcmp (string, "false")) { + v->_bool = GL_FALSE; + tail = string + 5; + } else if (!strcmp (string, "true")) { + v->_bool = GL_TRUE; + tail = string + 4; + } + else + return GL_FALSE; + break; + case DRI_ENUM: /* enum is just a special integer */ + case DRI_INT: + v->_int = strToI (string, &tail, 0); + break; + case DRI_FLOAT: + v->_float = strToF (string, &tail); + break; + } + + if (tail == string) + return GL_FALSE; /* empty string (or containing only white-space) */ + /* skip trailing white space */ + if (*tail) + tail += strspn (tail, " \f\n\r\t\v"); + if (*tail) + return GL_FALSE; /* something left over that is not part of value */ + + return GL_TRUE; +} + +/** \brief Parse a list of ranges of type info->type. */ +static GLboolean parseRanges (driOptionInfo *info, const XML_Char *string) { + XML_Char *cp, *range; + GLuint nRanges, i; + driOptionRange *ranges; + + XSTRDUP (cp, string); + /* pass 1: determine the number of ranges (number of commas + 1) */ + range = cp; + for (nRanges = 1; *range; ++range) + if (*range == ',') + ++nRanges; + + if ((ranges = MALLOC (nRanges*sizeof(driOptionRange))) == NULL) { + fprintf (stderr, "%s: %d: out of memory.\n", __FILE__, __LINE__); + abort(); + } + + /* pass 2: parse all ranges into preallocated array */ + range = cp; + for (i = 0; i < nRanges; ++i) { + XML_Char *end, *sep; + assert (range); + end = strchr (range, ','); + if (end) + *end = '\0'; + sep = strchr (range, ':'); + if (sep) { /* non-empty interval */ + *sep = '\0'; + if (!parseValue (&ranges[i].start, info->type, range) || + !parseValue (&ranges[i].end, info->type, sep+1)) + break; + if (info->type == DRI_INT && + ranges[i].start._int > ranges[i].end._int) + break; + if (info->type == DRI_FLOAT && + ranges[i].start._float > ranges[i].end._float) + break; + } else { /* empty interval */ + if (!parseValue (&ranges[i].start, info->type, range)) + break; + ranges[i].end = ranges[i].start; + } + if (end) + range = end+1; + else + range = NULL; + } + FREE (cp); + if (i < nRanges) { + FREE (ranges); + return GL_FALSE; + } else + assert (range == NULL); + + info->nRanges = nRanges; + info->ranges = ranges; + return GL_TRUE; +} + +/** \brief Check if a value is in one of info->ranges. */ +static GLboolean checkValue (const driOptionValue *v, const driOptionInfo *info) { + GLuint i; + assert (info->type != DRI_BOOL); /* should be caught by the parser */ + if (info->nRanges == 0) + return GL_TRUE; + switch (info->type) { + case DRI_ENUM: /* enum is just a special integer */ + case DRI_INT: + for (i = 0; i < info->nRanges; ++i) + if (v->_int >= info->ranges[i].start._int && + v->_int <= info->ranges[i].end._int) + return GL_TRUE; + break; + case DRI_FLOAT: + for (i = 0; i < info->nRanges; ++i) + if (v->_float >= info->ranges[i].start._float && + v->_float <= info->ranges[i].end._float) + return GL_TRUE; + break; + default: + assert (0); /* should never happen */ + } + return GL_FALSE; +} + +/** \brief Output a warning message. */ +#define XML_WARNING1(msg) do {\ + __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser)); \ +} while (0) +#define XML_WARNING(msg,args...) do { \ + __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser), \ + args); \ +} while (0) +/** \brief Output an error message. */ +#define XML_ERROR1(msg) do { \ + __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser)); \ +} while (0) +#define XML_ERROR(msg,args...) do { \ + __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser), \ + args); \ +} while (0) +/** \brief Output a fatal error message and abort. */ +#define XML_FATAL1(msg) do { \ + fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ + data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser)); \ + abort();\ +} while (0) +#define XML_FATAL(msg,args...) do { \ + fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ + data->name, \ + XML_GetCurrentLineNumber(data->parser), \ + XML_GetCurrentColumnNumber(data->parser), \ + args); \ + abort();\ +} while (0) + +/** \brief Parser context for __driConfigOptions. */ +struct OptInfoData { + const char *name; + XML_Parser parser; + driOptionCache *cache; + GLboolean inDriInfo; + GLboolean inSection; + GLboolean inDesc; + GLboolean inOption; + GLboolean inEnum; + int curOption; +}; + +/** \brief Elements in __driConfigOptions. */ +enum OptInfoElem { + OI_DESCRIPTION = 0, OI_DRIINFO, OI_ENUM, OI_OPTION, OI_SECTION, OI_COUNT +}; +static const XML_Char *OptInfoElems[] = { + "description", "driinfo", "enum", "option", "section" +}; + +/** \brief Parse attributes of an enum element. + * + * We're not actually interested in the data. Just make sure this is ok + * for external configuration tools. + */ +static void parseEnumAttr (struct OptInfoData *data, const XML_Char **attr) { + GLuint i; + const XML_Char *value = NULL, *text = NULL; + driOptionValue v; + GLuint opt = data->curOption; + for (i = 0; attr[i]; i += 2) { + if (!strcmp (attr[i], "value")) value = attr[i+1]; + else if (!strcmp (attr[i], "text")) text = attr[i+1]; + else XML_FATAL("illegal enum attribute: %s.", attr[i]); + } + if (!value) XML_FATAL1 ("value attribute missing in enum."); + if (!text) XML_FATAL1 ("text attribute missing in enum."); + if (!parseValue (&v, data->cache->info[opt].type, value)) + XML_FATAL ("illegal enum value: %s.", value); + if (!checkValue (&v, &data->cache->info[opt])) + XML_FATAL ("enum value out of valid range: %s.", value); +} + +/** \brief Parse attributes of a description element. + * + * We're not actually interested in the data. Just make sure this is ok + * for external configuration tools. + */ +static void parseDescAttr (struct OptInfoData *data, const XML_Char **attr) { + GLuint i; + const XML_Char *lang = NULL, *text = NULL; + for (i = 0; attr[i]; i += 2) { + if (!strcmp (attr[i], "lang")) lang = attr[i+1]; + else if (!strcmp (attr[i], "text")) text = attr[i+1]; + else XML_FATAL("illegal description attribute: %s.", attr[i]); + } + if (!lang) XML_FATAL1 ("lang attribute missing in description."); + if (!text) XML_FATAL1 ("text attribute missing in description."); +} + +/** \brief Parse attributes of an option element. */ +static void parseOptInfoAttr (struct OptInfoData *data, const XML_Char **attr) { + enum OptAttr {OA_DEFAULT = 0, OA_NAME, OA_TYPE, OA_VALID, OA_COUNT}; + static const XML_Char *optAttr[] = {"default", "name", "type", "valid"}; + const XML_Char *attrVal[OA_COUNT] = {NULL, NULL, NULL, NULL}; + const char *defaultVal; + driOptionCache *cache = data->cache; + GLuint opt, i; + for (i = 0; attr[i]; i += 2) { + GLuint attrName = bsearchStr (attr[i], optAttr, OA_COUNT); + if (attrName >= OA_COUNT) + XML_FATAL ("illegal option attribute: %s", attr[i]); + attrVal[attrName] = attr[i+1]; + } + if (!attrVal[OA_NAME]) XML_FATAL1 ("name attribute missing in option."); + if (!attrVal[OA_TYPE]) XML_FATAL1 ("type attribute missing in option."); + if (!attrVal[OA_DEFAULT]) XML_FATAL1 ("default attribute missing in option."); + + opt = findOption (cache, attrVal[OA_NAME]); + if (cache->info[opt].name) + XML_FATAL ("option %s redefined.", attrVal[OA_NAME]); + data->curOption = opt; + + XSTRDUP (cache->info[opt].name, attrVal[OA_NAME]); + + if (!strcmp (attrVal[OA_TYPE], "bool")) + cache->info[opt].type = DRI_BOOL; + else if (!strcmp (attrVal[OA_TYPE], "enum")) + cache->info[opt].type = DRI_ENUM; + else if (!strcmp (attrVal[OA_TYPE], "int")) + cache->info[opt].type = DRI_INT; + else if (!strcmp (attrVal[OA_TYPE], "float")) + cache->info[opt].type = DRI_FLOAT; + else + XML_FATAL ("illegal type in option: %s.", attrVal[OA_TYPE]); + + defaultVal = getenv (cache->info[opt].name); + if (defaultVal != NULL) { + /* don't use XML_WARNING, we want the user to see this! */ + fprintf (stderr, + "ATTENTION: default value of option %s overridden by environment.\n", + cache->info[opt].name); + } else + defaultVal = attrVal[OA_DEFAULT]; + if (!parseValue (&cache->values[opt], cache->info[opt].type, defaultVal)) + XML_FATAL ("illegal default value: %s.", defaultVal); + + if (attrVal[OA_VALID]) { + if (cache->info[opt].type == DRI_BOOL) + XML_FATAL1 ("boolean option with valid attribute."); + if (!parseRanges (&cache->info[opt], attrVal[OA_VALID])) + XML_FATAL ("illegal valid attribute: %s.", attrVal[OA_VALID]); + if (!checkValue (&cache->values[opt], &cache->info[opt])) + XML_FATAL ("default value out of valid range '%s': %s.", + attrVal[OA_VALID], defaultVal); + } else if (cache->info[opt].type == DRI_ENUM) { + XML_FATAL1 ("valid attribute missing in option (mandatory for enums)."); + } else { + cache->info[opt].nRanges = 0; + cache->info[opt].ranges = NULL; + } +} + +/** \brief Handler for start element events. */ +static void optInfoStartElem (void *userData, const XML_Char *name, + const XML_Char **attr) { + struct OptInfoData *data = (struct OptInfoData *)userData; + enum OptInfoElem elem = bsearchStr (name, OptInfoElems, OI_COUNT); + switch (elem) { + case OI_DRIINFO: + if (data->inDriInfo) + XML_FATAL1 ("nested elements."); + if (attr[0]) + XML_FATAL1 ("attributes specified on element."); + data->inDriInfo = GL_TRUE; + break; + case OI_SECTION: + if (!data->inDriInfo) + XML_FATAL1 ("
    must be inside ."); + if (data->inSection) + XML_FATAL1 ("nested
    elements."); + if (attr[0]) + XML_FATAL1 ("attributes specified on
    element."); + data->inSection = GL_TRUE; + break; + case OI_DESCRIPTION: + if (!data->inSection && !data->inOption) + XML_FATAL1 (" must be inside or inDesc) + XML_FATAL1 ("nested elements."); + data->inDesc = GL_TRUE; + parseDescAttr (data, attr); + break; + case OI_OPTION: + if (!data->inSection) + XML_FATAL1 ("